blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 2 616 | content_id stringlengths 40 40 | detected_licenses listlengths 0 69 | license_type stringclasses 2
values | repo_name stringlengths 5 118 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 63 | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 2.91k 686M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 23
values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 213
values | src_encoding stringclasses 30
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 2 10.3M | extension stringclasses 246
values | content stringlengths 2 10.3M | authors listlengths 1 1 | author_id stringlengths 0 212 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ec23a853f5ceb288a79ccc61e24ce866e8b343d7 | c8fface11c98413c17c1a839fae323be76bf00d2 | /4Dobble Game.py | a31cafdd301e2cd7cdcc377e1e0a1100b3d21b0a | [] | no_license | praveen-95572/Nptel-the-joy-of-computing-using-python- | 6dd75bf669bdd3493f0ab6b1a993399662eb18c1 | 46c34f3e303fa3fb46e0c9f2f2dc5f61ea22ac8e | refs/heads/master | 2023-06-24T08:29:50.225493 | 2021-07-26T13:04:34 | 2021-07-26T13:04:34 | 389,632,106 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 998 | py | import string
import random
#print(string.ascii_letters)
symbols=[]
symbols=list(string.ascii_letters)
card1=[0]*5
card2=[0]*5
pos1=random.randint(0,4)
pos2=random.randint(0,4) #pos1 and pos2 are same symbol position in card1 and card2 respectively
samesymbol=random.choice(symbols)
symbols.remove(samesymbol)
if(p... | [
"[email protected]"
] | |
a1be103c453678ec3adbbd37563c923bc80349e7 | 913ffcf29991e57c504bc639cfabe471dfd41782 | /Draw Chat/menu_inicial.py | 6f4b787d6202c659479626f3793eb14b1510374c | [] | no_license | JaimeGo/PyQt-Projects | ef30761c5c2c025b9f98db7ed7e7d66b32d9b535 | c54eeaff69424ab463d64391422005bba3ceabd7 | refs/heads/master | 2020-03-18T13:52:40.067614 | 2018-05-25T07:01:57 | 2018-05-25T07:01:57 | 134,814,650 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,052 | py | from PyQt4 import QtGui, uic, QtCore
from sys import exit
from chat_grupal import ChatGrupal
formulario_1 = uic.loadUiType("menu_inicio.ui")
class MenuInicial(formulario_1[0], formulario_1[1]):
def __init__(self, cliente):
super().__init__()
self.cliente = cliente
self.setupUi(self)
... | [
"[email protected]"
] | |
7dc6e352a48eddfe374a1dd70cd502f92368190a | 3b376850dd360e0eaeb4f710bbec30cd2e4f8f4a | /users/urls.py | b898aae8777a3f975e96f05e2fde286668f9b9ab | [] | no_license | nielHNIA/Crm-project | 409dfc28e0086a7ade36972d4043e92ac29badf7 | 6f342a83652fe210ad76ba6322dc11e1df710689 | refs/heads/master | 2023-02-05T04:58:51.572334 | 2021-01-02T02:57:06 | 2021-01-02T02:57:06 | 326,096,976 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 200 | py | from django.urls import path, include
app_name = 'users'
from . import views
urlpatterns = [
path('', include('django.contrib.auth.urls')),
path('register/', views.register, name='register'),
]
| [
"[email protected]"
] | |
d793aff26fdb5850f8ce22d236f87142a4d570d6 | 781e2692049e87a4256320c76e82a19be257a05d | /all_data/exercism_data/python/word-count/67602c62088e448aa6899a2feae08bb8.py | 9742b7715ac57210a724a124215699112573a4b4 | [] | no_license | itsolutionscorp/AutoStyle-Clustering | 54bde86fe6dbad35b568b38cfcb14c5ffaab51b0 | be0e2f635a7558f56c61bc0b36c6146b01d1e6e6 | refs/heads/master | 2020-12-11T07:27:19.291038 | 2016-03-16T03:18:00 | 2016-03-16T03:18:42 | 59,454,921 | 4 | 0 | null | 2016-05-23T05:40:56 | 2016-05-23T05:40:56 | null | UTF-8 | Python | false | false | 256 | py | #
# word-count exercise
# iter. 2
#
def word_count(phrase):
wordlist = phrase.split()
#output in dictionary format to past the test
output = {}
for x in wordlist :
if x not in output :
output [x] = 1
else : output [x] += 1
return output
| [
"[email protected]"
] | |
9195a76592f3dbac3dc38ac9aa7b3815503c4e68 | db7601406ea38e0b361d9a1c54ba640ae9b132eb | /10494 If We Were a Child Again.py | e91933043b3c91fcfde5c909009fb177d10bb283 | [] | no_license | FalseF/Algorithms-and-Problem-Solving-with-Python | c06c049d7499df76795eac8b82d8f5aebe126109 | d53ee80da5ff865eef05bbe280bdc68dae4f275d | refs/heads/master | 2023-07-17T06:24:47.918286 | 2021-09-06T16:32:30 | 2021-09-06T16:32:30 | 403,690,848 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 71 | py |
n=12
ck=95.123
r=1
while(n):
n=n-1
r*=ck
print(r)
| [
"[email protected]"
] | |
61cfada2daa7561decdbe434fcd476886f36a64b | a884525000ecec4e14e51ffa2a3f7ddc7d0e516e | /Intermediate/Day 39/Calling constructor from outside.py | a6f477b71a38316d634ee5311103b5d78d421ff8 | [] | no_license | Dong2Yo/Learning-Python | 0fac4437126da0b2351a4212f6bb1355df87724e | 8599c3a97afa2dc3fcb4e72c654e90f4b1848fe6 | refs/heads/main | 2023-08-25T03:46:08.660780 | 2021-10-17T10:50:22 | 2021-10-17T10:50:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 113 | py | class sample:
def __init__(self):
print("Class instantiated")
mysample=sample()
mysample.__init__()
| [
"[email protected]"
] | |
8f77c9a2fe285d78dd8306f572f66615be551d8d | 0bfe2290ecb7212f03c5a36d6de2a0441423fbd2 | /weekly-stats.py | dd9241143a82f6ab66e7a36a98d6f5fb88029e46 | [
"MIT"
] | permissive | ca4ti/call-stats | 5e4bd482cf883378c6e1c82c809c410415d2a891 | 7413636918f438043a00158bd26a777002acdbfc | refs/heads/master | 2023-02-25T05:23:45.462700 | 2016-08-15T11:20:10 | 2016-08-15T11:20:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 802 | py | from asternic_email import CallStats
import local_settings
import optparse
import arrow
last_week = arrow.get().replace(days=-7).format('YYYY-MM-DD')
help_txt = (
"Date inside of the week you wish to create a"
" report for. For example for last week use {}").format(last_week)
parser = optparse.OptionParser()
... | [
"[email protected]"
] | |
83f0a7ab3cbfab9a992ced7a1692165995ce681f | 3ea7513732b5c38d485a2be3d327a7c079329331 | /crudapi/views.py | bbfff5dd59057df93a1d62902cb712355050c851 | [] | no_license | manojpraveen101/api | 285e4a992419333ead98f33c333b47975926dfe6 | 46defb852bf013c86b73889b16ebfca36fe9eb5a | refs/heads/master | 2023-03-16T16:37:58.938862 | 2021-03-08T13:16:46 | 2021-03-08T13:16:46 | 345,570,164 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,620 | py | import logging
from django.core.exceptions import ObjectDoesNotExist, EmptyResultSet
from django.http.response import JsonResponse, HttpResponse
from django.shortcuts import render
from rest_framework.decorators import api_view
from rest_framework.parsers import JSONParser
from crudapi.models import Employee
from crud... | [
"[email protected]"
] | |
47eee066e6b2436acfd0b25a8c700664ca98fd5c | a4deea660ea0616f3b5ee0b8bded03373c5bbfa2 | /executale_binaries/register-variants/pshufb_xmm_xmm.gen.vex.py | e4c89ba1279d236c1e25139f95a869d267887f3b | [] | no_license | Vsevolod-Livinskij/x86-64-instruction-summary | 4a43472e26f0e4ec130be9a82f7e3f3c1361ccfd | c276edab1b19e3929efb3ebe7514489f66087764 | refs/heads/master | 2022-02-02T18:11:07.818345 | 2019-01-25T17:19:21 | 2019-01-25T17:19:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 158 | py | import angr
proj = angr.Project('pshufb_xmm_xmm.exe')
print proj.arch
print proj.entry
print proj.filename
irsb = proj.factory.block(proj.entry).vex
irsb.pp() | [
"[email protected]"
] | |
c152fe84a4529c8caaabf63186e0a65476cfe50a | 7e963835ac072178b415c992cccc24c161dad32f | /venv/bin/sqlformat | 338a7f966051794ea80430265b4b37042139f480 | [] | no_license | urmi6750/new-djnago | cf47d5796007c7e1d15de71765fb1fd76fc44dfb | 3840ba2e4f2e2790698b0d3537734d1daa7e051f | refs/heads/master | 2021-05-17T16:06:09.610551 | 2020-04-01T20:13:32 | 2020-04-01T20:13:32 | 250,861,226 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 256 | #!/home/fariya/PycharmProjects/untitled/venv/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from sqlparse.__main__ import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(main())
| [
"[email protected]"
] | ||
a1b304081c5ddb28ccb5c07f0347c0e5a72b93f7 | 1ec86f822bb30ea18f992bfc0badc818423a2161 | /venv/Scripts/pip3-script.py | 21c1769b7a28819993aaa80e796fd701f1350e65 | [] | no_license | urbrob/strona | 58ad912529a4148855fa171b0d0966c090f691f4 | 4c5962fe05e1460197510ce38b820495bcf067b9 | refs/heads/master | 2020-04-27T08:38:04.563497 | 2019-03-06T07:55:04 | 2019-03-06T07:55:04 | 174,178,786 | 0 | 0 | null | 2019-03-06T16:17:06 | 2019-03-06T16:17:05 | null | UTF-8 | Python | false | false | 412 | py | #!C:\Users\sylwi\PycharmProjects\strona\venv\Scripts\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'pip==10.0.1','console_scripts','pip3'
__requires__ = 'pip==10.0.1'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0... | [
"[email protected]"
] | |
396d25013a696593483857993a2a2f54c29edbf4 | ae3ddb20e33ea0e6b3af8d738532b1b8c21e2e74 | /scripts/genome_assembly_annotate.py | 9dee024eb9a39f6215b58f3bfe217da1364bcb11 | [] | no_license | TonyMannion/Microbial-Comparative-Genomics | dded0e8e5a1cf4101bf76ca0fff2ddfc0c764d39 | 33067214fa248badc0d2a3e0bace417163c1d6a7 | refs/heads/master | 2021-07-14T12:35:01.463328 | 2021-02-15T14:51:15 | 2021-02-15T14:51:15 | 236,011,461 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,811 | py | import os
import time
import glob
import argparse
import numpy as np
import pandas as pd
parser = argparse.ArgumentParser()
parser.add_argument('-u', '--username', dest='username', help='Provide username for PATRIC account. Prompt to enter password will appear.')
parser.add_argument('-m','--metadata_file',dest='metada... | [
"[email protected]"
] | |
d83ee3ab1824a8146fa04d80c14a0b011af7d09e | 047031e749f95f385e45629e540b002e132d8520 | /PMT/projects/migrations/0003_project_slug.py | fff1ac6e753b1efd4e5570652bdc7de0ab95156a | [] | no_license | carsonalexander14/project-management-tool | 907e968a8c2a7a2914d992f81cfe54ae83294b8a | 8987b22364e366f033ee739690598206aab00ad6 | refs/heads/master | 2022-11-26T16:37:02.772473 | 2021-04-15T17:40:47 | 2021-04-15T17:40:47 | 243,101,283 | 0 | 0 | null | 2022-11-22T07:54:47 | 2020-02-25T20:59:11 | CSS | UTF-8 | Python | false | false | 391 | py | # Generated by Django 3.0.3 on 2021-01-21 02:45
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('projects', '0002_remove_position_related_skill'),
]
operations = [
migrations.AddField(
model_name='project',
name='... | [
"[email protected]"
] | |
1a7942bfa09a42c5b1e7c442e32d5b0be847dcc1 | cbb805d9efd3bd5a03a32a234c84eca06297e21c | /main.py | 6099667cb777dfff3ef82c4a1085fb2d5b133bbf | [] | no_license | kaungmyatthumdy/FlaskWithJinja | 4cac0dad018135b5165fb93aaaf8137be5552569 | 8dc403a1074b28bd500b7daa5ccef7dd68cad38f | refs/heads/master | 2020-03-22T02:53:58.546975 | 2018-07-02T08:03:58 | 2018-07-02T08:03:58 | 139,400,201 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 196 | py | from flask import Flask, render_template
myapp = Flask(__name__)
@myapp.route("/")
def hello():
return render_template("index.html")
if __name__ == "__main__":
myapp.run(debug=True)
| [
"[email protected]"
] | |
a06d251656d70de9cf2669ad98288f791db8af37 | 150464efa69db3abf328ef8cd912e8e248c633e6 | /_4.python/__code/Python大數據特訓班(第二版)/ch03/ch03_all.py | 5b3de4b523557a5a8656e835bb3ba0eb10899289 | [] | no_license | bunshue/vcs | 2d194906b7e8c077f813b02f2edc70c4b197ab2b | d9a994e3afbb9ea84cc01284934c39860fea1061 | refs/heads/master | 2023-08-23T22:53:08.303457 | 2023-08-23T13:02:34 | 2023-08-23T13:02:34 | 127,182,360 | 6 | 3 | null | 2023-05-22T21:33:09 | 2018-03-28T18:33:23 | C# | UTF-8 | Python | false | false | 10,672 | py | # filewrite1.py
content='''Hello Python
中文字測試
Welcome'''
f=open('file1.txt', 'w' ,encoding='utf-8', newline="")
f.write(content)
f.close()
# filewrite2.py
content='''Hello Python
中文字測試
Welcome'''
with open('file1.txt', 'w' ,encoding='utf-8', newline="") as f:
f.write(content)
# fileread1.py
with open('file1.t... | [
"[email protected]"
] | |
199aa3a40db1995b68f6f7db614edf3060fc6fa3 | 925293c229ea4e51ede2f00964e1d474693ed726 | /neuralnet.py | bd27014f8dd8db09adb7dafa5205eeb3186dfdd2 | [] | no_license | jessprim/IntroNeuralNet | 4041a53fc07c9c7dfedbb4d74f21f827f570a0d0 | e7693445d1e9aa7b05e9ad96e4f57175545b8181 | refs/heads/master | 2021-04-30T00:07:10.068851 | 2018-02-15T04:42:05 | 2018-02-15T04:42:05 | 121,570,225 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 979 | py | # Load Dependency:
import numpy as np
# Activation Function:
def activate(x,deriv=False):
if(deriv==True):
return x*(1-x)
return 1/(1+np.exp(-x))
# Input Dataset:
_input = np.array([ [0,0,1],
[0,1,1],
[1,0,1],
[1,1,1] ])
# Output Dataset ... | [
"[email protected]"
] | |
f4b7beae000280cf87847699e43e1a68ed71e434 | c8dbd229195a384ae8e4e671a6a59b67352de167 | /python_rest/venv/bin/easy_install | 8abed8dd358f7d3df9082c4db730064e18483fd6 | [] | no_license | shinde-prasad/booklist-oops-js | a97990c9eb4234929538c11b8831359a1853fc8b | 99b4a5c9c12a4bc08728f8805215a27a53e1646e | refs/heads/master | 2020-03-29T15:20:54.691354 | 2018-09-27T11:49:18 | 2018-09-27T11:49:18 | 150,058,352 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 313 | #!/mnt/D0A2B33FA2B328BC/Frontend-Workspace/VS-workspace/oop-book-list/python_rest/venv/bin/python2
# -*- coding: utf-8 -*-
import re
import sys
from setuptools.command.easy_install import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())
| [
"[email protected]"
] | ||
453bf4ec36013630bd101b835594ecaf92567b0e | 0146c1c427453f170ba0cb1b76a8ac1f1d2b194c | /juggle.py | 0bde64e97df1c342e13eedbf82485daa1d5a2d81 | [] | no_license | ismarou/isaacgym_sandbox | ee7d71e5702cfdc1eda7d57b2cce8c8d6c7ea7de | 30368cb37d07bfdce45b2fbb3ba3ec86d66cdc95 | refs/heads/master | 2023-04-28T06:46:50.570236 | 2021-05-18T08:53:08 | 2021-05-18T08:53:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,097 | py | """
[email protected]
"""
import matplotlib.pyplot as plt
import numpy as np
import time
from policies import CubicMP, PiecewiseMP
from envs import IsaacSim, IsaacJugglingWam4
from ereps import eREPS
# stroke based movement primitive to get going
poss_stroke = np.array([[- 0.10, 1.20, 0.0, 1.25],
... | [
"[email protected]"
] | |
28c7b91ebf60af1184a4ec46854dbac4312490ea | a62b4b44572f6551db6ea3498e38f57476e3e911 | /demo02.py | 47a32a3ce85fc82b8d78b233062c09dfad626889 | [] | no_license | lmjdas/exe | 6da004ee661cf06ff0c3dce1c7970f3dfee67b3e | 6bd5472b8869dbbd1a2b34a04c9ca23061693deb | refs/heads/main | 2023-08-23T01:51:32.144750 | 2021-10-15T13:15:35 | 2021-10-15T13:15:35 | 416,738,390 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 20 | py | 2+2
print("智障")
| [
"[email protected]"
] | |
5ab5444b4709afc95701728675b9a2b1d60faf77 | 165dcb74cd7c489fa65d2c02e2421a5928f95a02 | /find_path.py | 22221e79a664f4ec1ab0bf3b5a44af60c6f556c5 | [] | no_license | TongBaoTran/Graph-Theory-Programming | 6e972cc47a10dbfcba6ae53bbce825ef7ee0e622 | e3fb2ee518aed3c1e8cd8126843d92285b56378d | refs/heads/master | 2022-06-05T17:26:37.506384 | 2020-03-06T18:50:27 | 2020-03-06T18:50:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,035 | py | # -*- coding: utf-8 -*-
"""
Created on Fri Mar 6 19:41:44 2020
@author: baotr
"""
class Graph(object):
def __init__(self, graph_dict=None):
if graph_dict == None:
graph_dict={}
self.graph_dict=graph_dict
def neighbors(self, node):
return self.graph_dict[... | [
"[email protected]"
] | |
8e4deeb02622dcbe1ed430ad3b1918bef54bf16d | 0d3ab7354bf54ddd78ee2d3a48796691eb41bb68 | /mnist.py | c665b59b4ae71dd6c91400d972f65b888837a7b4 | [] | no_license | WinstonQian7/ml-learning-repo | 89ce2e7d7b5bd83ffa2f363687722c7b9272e070 | 8d8eb392e6b62a30ff4d8b30c9a4d77ea54ea2c4 | refs/heads/main | 2023-08-19T10:44:49.326490 | 2021-10-14T15:10:25 | 2021-10-14T15:10:25 | 405,760,604 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,535 | py | from keras.datasets import mnist
from keras.models import Sequential
from keras.layers import Dense
from keras.layers import Dropout
from keras.layers import Flatten
from keras.layers import BatchNormalization
from keras.layers.convolutional import Conv2D
from keras.layers.convolutional import MaxPooling2D
from... | [
"[email protected]"
] | |
7a06523870d885350bcd34d61515636f04dbade5 | a2e8e2d72bc084c2fd6edc9d0d4fcfab83b0dc41 | /src/normalAnalysis.py | e752f584036d7f0c3533a0f7152524fe2e7d0259 | [] | no_license | kingjin94/enhanced_simulation | 6899df1968a8e5d4be5b2881494f8d0a1b7f8549 | 45021f9691e5f772ef4840d69b0d504a6ee79441 | refs/heads/master | 2020-06-13T13:14:48.414887 | 2019-11-13T14:27:25 | 2019-11-13T14:27:25 | 194,667,626 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,224 | py | import rospy
import numpy as np
from geometry_msgs.msg import WrenchStamped
from gazebo_msgs.msg import ContactsState
rospy.init_node("Test", anonymous=True)
# get state
msg = rospy.wait_for_message("/panda/ft/tool", WrenchStamped)
F = np.asarray((msg.wrench.force.x, msg.wrench.force.y, msg.wrench.force.z))
M = np.a... | [
"[email protected]"
] | |
321e910f13675a64ef9a7d4e04c7325c66131994 | 71ca21a02e5ab15715fc9b2c89ef6d2fb4cef75d | /studies_api/rest/v1/exceptions/submission.py | 3b4831900bf6aa867f45aca407a8729eafdf7e6c | [] | no_license | stephenomalley/study-api | 3da4dbce9c17ddf56bec431beeebed722557655a | 669497dbad65466b456728428f70ed8f124527f7 | refs/heads/master | 2021-05-04T07:30:06.173914 | 2016-10-13T19:27:44 | 2016-10-13T19:27:44 | 70,636,540 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 309 | py | class SubmissionLimitExceeded(Exception):
"""
Exception thrown when the maximum number of places on a study already exists.
"""
pass
class StudyNotCreated(Exception):
"""
Exception type thrown when an attempt to create a submission with an invalid study id is made.
"""
pass
| [
"[email protected]"
] | |
47a5283f013e69c0e318103c2aab7676938afc29 | 77e9d856429373258ff98d49fbe0c585549ffda0 | /PJ1_search/search.py | 20d1fb3a755814316c92249569933bbcfa331423 | [
"Apache-2.0"
] | permissive | beibidesr/CS188-Homework | 7dccf162ffe74ad95c22cba85eb6afdf7fca9ee8 | 6712da1b27907f4096752c379c342481927000c8 | refs/heads/master | 2022-12-22T08:38:06.276030 | 2020-09-27T15:01:20 | 2020-09-27T15:01:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,382 | py | # search.py
# ---------
# Licensing Information: You are free to use or extend these projects for
# educational purposes provided that (1) you do not distribute or publish
# solutions, (2) you retain this notice, and (3) you provide clear
# attribution to UC Berkeley, including a link to http://ai.berkeley.edu.
#
# A... | [
"[email protected]"
] | |
8da161cd6f56e6ed705cee2eb410fc227eacde91 | 16fb4d7d9277f738463eaa0a1e5b3e0329df4a7a | /clases.py | 35848f59cd378f34a85b9894cf403b73a42b2ca4 | [] | no_license | gchapa22/python_workshop | e7267840e64980fad6adc6dc86fee521d1f29bbf | 41ef18107952af16632eb8f051463e5689765226 | refs/heads/master | 2016-09-06T18:18:21.122727 | 2014-04-03T17:55:45 | 2014-04-03T17:55:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 308 | py |
class Animal(object):
def __init__(self):
self.attr = 1
def speak(self):
return "Noise"
class Dog(Animal):
def speak(self):
return "Waw"
def bite(self):
return "chomp"
class Cat(Animal):
def speak(self):
return "Miau"
fido = Dog()
pelusa = Cat()
print fido.speak()
print pelusa.speak()
| [
"[email protected]"
] | |
40df7bdb6d3ff42134e00c035dac62fe565ad508 | 9181d67cdbc8ffbb8b4bdd8c7605df544fc1a37a | /venv/Scripts/easy_install-script.py | 1d25dfec4918fd0dd33f930999b9228bcb4c8757 | [] | no_license | DmitryDankov207/resender-bot | 21cfc37f007cc6efc67b9af96a78996ade497cad | 07dad8f6dd23e6b601411951af67f59225fbf2c0 | refs/heads/master | 2022-02-27T11:36:51.696951 | 2019-11-04T09:02:38 | 2019-11-04T09:02:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 446 | py | #!C:\Users\12dda\PycharmProjects\bot\venv\Scripts\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==40.8.0','console_scripts','easy_install'
__requires__ = 'setuptools==40.8.0'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)... | [
"[email protected]"
] | |
cc58cd6f621d9910d0ad66afdebbf2d5ef6d9c08 | b2acf2dab56a42c22304b0e236b154d453175d6d | /Forex/Account.py | dd10ebe408b05f733a47a2298d40d575eaa813bd | [
"MIT"
] | permissive | bitsalt/bitbot | 8cd14da5015598e18e65d41843ab7ecb7d3347da | 24dcc037fcc2778929cb1091f2c87f38359e50c1 | refs/heads/main | 2023-03-29T22:07:01.746273 | 2021-04-13T20:42:25 | 2021-04-13T20:42:25 | 357,523,571 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,200 | py | import Forex.config as fxconfig
class Account:
def __init__(self):
cfg = fxconfig.make_config_instance()
api = cfg.create_context()
response = api.account.summary(cfg.active_account)
account = response.body['account']
self.id = account.id
#
# Client-assign... | [
"[email protected]"
] | |
33fefc0ea918910f473b074cc5dc93ae1294a282 | 225723d8311f63378b729e576aaa2c0cf977f6c9 | /myCVGenerator/myCVGenerator/wsgi.py | 2876240cf95bae39b2bfdd59b28398ed2f41c215 | [] | no_license | Acerosa/CV-Generator | f7e3625264e1242e8086a85b79717b1ac6fda73a | 389280def918d037b557a909685c3eceaeb99481 | refs/heads/main | 2023-01-04T07:34:28.042004 | 2020-11-03T09:44:33 | 2020-11-03T09:44:33 | 308,640,180 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 403 | py | """
WSGI config for myCVGenerator project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO... | [
"[email protected]"
] | |
a82572d154e3b2593d02ea5e3d02809cfbda836d | 6084cf0b13307fe7c09e2e336ceaec321f21757b | /small_tests/runner_threading_test.py | c4599ef48bcc96c1f84a3c0bf6239fe5d7a74342 | [] | no_license | asmialek/python_experiments | eae349b718e0e1c3d70f95cee2a0c6e03ba70971 | daef809564afb77b705486bb7241fae6c0940390 | refs/heads/master | 2020-03-12T15:51:02.645817 | 2019-04-03T21:51:41 | 2019-04-03T21:51:41 | 130,701,122 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,977 | py | import sys
import copy
import builtins
import traceback
# from queue import Queue
import queue
import threading
import time
################# look at me ################################
# http://www.rueckstiess.net/research/snippets/show/ca1d7d90
############################################################... | [
"[email protected]"
] | |
3e25deebd22289144408e2ae152663c49c07bb88 | 7ce0f3ce7dff2bf3050fca752373c39dbed41ebf | /LoanAnalyticsssss/LoanAnalytics/loan_analytics/loan_analytics/Helper.py | d84b7119b718fd306a7d9a0d454761e412a8f337 | [] | no_license | jiying9/loanAnalysis | dc079c4051d4438d872fffc73dc56af229ae8c6f | 3b12d39c00bee7ccca0e99998ccaac787093c0d5 | refs/heads/main | 2023-01-24T02:03:09.228359 | 2020-11-27T17:18:20 | 2020-11-27T17:18:20 | 316,558,618 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,719 | py | from prettytable import PrettyTable
import matplotlib.pyplot as plt
import numpy as np
import decimal
import plotly.graph_objs as go
from plotly.graph_objs import Scatter,Layout
import plotly
import plotly.offline as py
import pandas as pd
import plotly.express as px
class Helper:
""" Helper class fo... | [
"[email protected]"
] | |
162955668c9881485c3760eae76a6559879c4eb3 | e48704ccf1ff1ff83163b8b7deed5c2973d70b30 | /yield/test8_except.py | 3343045c4bd566e955f6bf89c152a7b9fba9334a | [] | no_license | nilecui/nile_python_swk | e410c9ead2c6455b4c0ff55f1188f287f9fabe1b | cf39d7272821edb74c0bcca7120514e4e23a3b80 | refs/heads/master | 2021-03-12T23:01:20.038183 | 2013-04-06T09:30:38 | 2013-04-06T09:30:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 516 | py | #!/usr/bin/python
#-*- coding:utf-8 -*-
def echo(value=None):
print "Excution starts when next() is called for the first time."
try:
while True:
try:
value=(yield value)
except Exception,e:
value=3
finally:
print "Don't forget to clea... | [
"[email protected]"
] | |
cc932fa561bbdb458aab97b1b882a7a91e775d24 | 6fa7f99d3d3d9b177ef01ebf9a9da4982813b7d4 | /Pf2kDoCRvEL8qzKTs_1.py | ba8544a0fea52347f5454de892ffd9d16371d082 | [] | no_license | daniel-reich/ubiquitous-fiesta | 26e80f0082f8589e51d359ce7953117a3da7d38c | 9af2700dbe59284f5697e612491499841a6c126f | refs/heads/master | 2023-04-05T06:40:37.328213 | 2021-04-06T20:17:44 | 2021-04-06T20:17:44 | 355,318,759 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 293 | py |
def order_people(lst, people):
if lst[0] * lst[1] < people: return 'overcrowded'
res = []
for row in range(lst[0]):
direc = -1 if len(res) % 2 else 1
res.append([n if n <= people else 0 for n in range(len(res) * lst[1] + 1, (len(res) + 1) * lst[1] + 1)][::direc])
return res
| [
"[email protected]"
] | |
c6e4684f00604f3de05e374e87b459aa5bea5fce | 7aa9f792cf95a9819b974f4a83f4af9c39606b30 | /src/__init__.py | a05cc4c8be3eacec8edb2dc20c27e9b9ec489eca | [] | no_license | brolze/okex_test_project | e7b38a2638c0fa6410347c5d3003cacba0945493 | 3206e54c3990e0ae4235b8517ce9f9499ca67bc1 | refs/heads/main | 2023-03-23T11:24:39.301862 | 2021-03-20T07:42:26 | 2021-03-20T07:42:26 | 334,464,430 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 113 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Jan 30 17:30:54 2021
@author: xujianqiao
"""
| [
"[email protected]"
] | |
c7118b9671b22885cdb4e72acc137c952a2ac1f2 | 3413f253ba9b11fa795a57306be714d3f317e155 | /dfvfs/analyzer/qcow_analyzer_helper.py | 78a96b3447827aca49f19355ea1dda90798b3f97 | [
"Apache-2.0"
] | permissive | ekristen/dfvfs | 5e7e87b2fa9b39c15817dc42228b0f943abbf735 | 2dcb8a3e5bdc36bcb11f133a18f718b3010dd93e | refs/heads/master | 2021-01-17T22:11:59.482625 | 2016-05-14T08:15:12 | 2016-05-14T08:15:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,179 | py | # -*- coding: utf-8 -*-
"""The QCOW format analyzer helper implementation."""
from dfvfs.analyzer import analyzer
from dfvfs.analyzer import analyzer_helper
from dfvfs.analyzer import specification
from dfvfs.lib import definitions
class QCOWAnalyzerHelper(analyzer_helper.AnalyzerHelper):
"""Class that implements ... | [
"[email protected]"
] | |
35196e8a2bbb42d4660f9850ec32b9729408a369 | 8931d9e5a7cab2a4363105d3bd72de629b3444af | /auth.py | 4fd9e15e6594e2f69b1fef9b3a304b4847d4ad1a | [] | no_license | kpurusho/MoneySquareBackend | de255a5995a5888298151dac97f06a8fcda7a328 | 1939317ec92b44e2161cf38d4adf249a996cfd18 | refs/heads/master | 2022-11-20T23:58:39.713941 | 2020-07-26T12:21:39 | 2020-07-26T12:21:39 | 275,732,456 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 990 | py | import os
import cachecontrol
import google.auth.transport.requests
import requests
from functools import wraps
from google.oauth2 import id_token
class AuthenticationFailedException(Exception):
pass
def oidc_auth_required(request, email=None, audience=None):
def decorator(f):
@wraps(f)
def wr... | [
"[email protected]"
] | |
c4f20fce595f09bdabfdbdf0d65d5b1465e45826 | 9f91fa2910d13273a50ae416c116e16385a4eb95 | /natvenv/env/bin/jp.py | d6d50fb640cee342a3af191071bf38b79dcb68ac | [] | no_license | natrayanp/mysb_v2 | cac811e7f66670f8546cccdbca386ba6ff4f8cd6 | 24dea04e2a631ca6b465b3f62077a83a5dce9758 | refs/heads/master | 2022-11-20T16:49:30.341095 | 2018-07-31T17:18:04 | 2018-07-31T17:18:04 | 116,319,931 | 0 | 1 | null | 2022-11-14T21:09:17 | 2018-01-05T00:05:13 | Python | UTF-8 | Python | false | false | 1,748 | py | #!/home/natrayan/project/AwsProject/Python/Tradingapp/tradingapp5/natvenv/env/bin/python3.6
import sys
import json
import argparse
from pprint import pformat
import jmespath
from jmespath import exceptions
def main():
parser = argparse.ArgumentParser()
parser.add_argument('expression')
parser.add_argume... | [
"[email protected]"
] | |
0cbe366c9fcfb220b4dc178aaae8b058b5713ff2 | 63ce91bae5eeadf885262b8fe0e769a64454d257 | /ray_torch_lightning_advanced.py | 9d62f3141c7e6f55a16c79f12c3cd7dd81faca0d | [
"Apache-2.0"
] | permissive | Data-drone/cv_experiments | c7349e7808f7f9c1315ce1efe33be1f86f4a9f80 | d6e1d9716c03a9165e3d8a08f4cc1287323a56ca | refs/heads/master | 2021-06-26T04:33:10.079771 | 2021-01-19T11:40:30 | 2021-01-19T11:40:30 | 196,596,871 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,559 | py | ### test script for Ray and
import torch
import pytorch_lightning as pl
from torch.utils.data import DataLoader, random_split
from torch.nn import functional as F
from torchvision.datasets import CIFAR100
from torchvision import transforms
from torchvision import models
from torch.nn import CrossEntropyLoss
import os... | [
"[email protected]"
] | |
7361bd53a9be6f44f6b646cdbedc297239e87561 | eea1d77d08b3e64519e8ac86f0cabcb78a14e7de | /main.py | a8fefa41a6d891c234790f2d5bfb33d971f98bde | [] | no_license | colemai/nutritics_client | 02f93f4a42c29be9f0a4badaa33671b485bb32eb | 788a65ef5a095c750e67385888e0ffb2846a9777 | refs/heads/master | 2022-10-25T09:05:33.478644 | 2020-06-13T08:57:20 | 2020-06-13T08:57:20 | 271,804,448 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 494 | py | #!/usr/bin/env python3
"""
Author: Ian Coleman
Purpose: Call the Nutritics API
"""
import pdb
import requests
api_address = "https://iancoleman1a:Pokemon124*@www.nutritics.com/api/v1.1/"
def get_users ():
all_users = requests.get("{}LIST/&client".format(api_address))
return all_users.text
def create_user (uid):
... | [
"[email protected]"
] | |
19546a5640b4da97df0abe9a12cf7adb5607d3dd | ba6454efa22648faf4de1b8de069294d4cb7d09b | /python/meetup/meetup.py | 5ace7b4fcc4b3bf0fda4cd43dc59872c32fcfe74 | [] | no_license | GreatBahram/exercism | c876e727b0c42f625f71d09f721ed8416cbbbcd6 | d3e63dd7e5753e7c8356c10c7b7f796db0c90163 | refs/heads/master | 2020-04-17T03:34:06.188855 | 2019-08-15T11:23:28 | 2019-08-15T11:23:28 | 166,189,724 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 960 | py | import datetime
from calendar import day_name
class MeetupDayException(Exception):
pass
def weekdays_in_month(year, month, weekday):
"""Return all 4/5 dates with given weekday."""
date = datetime.date(year, month, 1)
date += datetime.timedelta(days=(weekday - date.weekday()) % 7)
first_to_fifth ... | [
"[email protected]"
] | |
b8b00de4949bf71e8d3937c558e0b4579c217e27 | fccaec3ce13d96d853b888e49ed4177de621f3cd | /choose_your_own/your_algorithm_rf.py | 52eecba74cf19558837127207043d7a454fde16c | [] | no_license | Lundgren/ud120-intro-ml | e83471bebc1213520c531d359f3b51add0ca992b | f36a89bee650a13263dab7ae8e9b5ff3fbb8e60c | refs/heads/master | 2021-03-19T09:32:42.073926 | 2017-02-28T18:45:16 | 2017-02-28T18:45:16 | 82,955,031 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,598 | py | #!/usr/bin/python
import matplotlib.pyplot as plt
from prep_terrain_data import makeTerrainData
from class_vis import prettyPicture
features_train, labels_train, features_test, labels_test = makeTerrainData()
### the training data (features_train, labels_train) have both "fast" and "slow"
### points mixed together-... | [
"[email protected]"
] | |
dce128646442ea8ce80d326e0a857c00cff81ee8 | d05abfff9c45ec8eef6f2b2dfeec2aa3662fecdf | /Courses/Phys 241/MICE.py | e8b28b0095aa449200285eb6d7daf447ffa3337f | [] | no_license | Srivastava/Hello-World | 9d695e8caa9e9117e94963a5b3a0a0ced2f5dd3c | 1f57b7b7edffd3934d75d76f495ebcab48f58911 | refs/heads/master | 2020-04-04T07:51:32.837730 | 2017-01-09T18:32:28 | 2017-01-09T18:32:28 | 51,562,562 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,077 | py | import sys
import time
import math
import scipy as sp
import numpy as np
import matplotlib.pyplot as plt
import csv
from mpl_toolkits.mplot3d import Axes3D
from matplotlib.backends.backend_pdf import PdfPages
import matplotlib.animation as animation
#GM =0.00029632889 * 10E11
GM = 4.498309551e-13
#GM=4.43E-6
#GM =1E-3... | [
"[email protected]"
] | |
88fcaf6f65d7eace44bd670058f01549c220a470 | d066f1ef43678f93b516534ebe3674c7b09e309b | /PyThon学习笔记+代码/update_ini_config/Module/psutil/cpu1.py | 4d5a22ab551189a4d6578d738c4b5d2accc6903c | [] | no_license | lantian316/Stone_Study_Box | daaee53c63fc35c9a33353a885ba0a7b78202863 | d13c0338c74acfffc9b4627799249561d8dda822 | refs/heads/master | 2021-04-29T09:31:54.298740 | 2018-02-05T14:35:33 | 2018-02-05T14:35:33 | 77,659,704 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,425 | py | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
import psutil
print(psutil.cpu_times()) #显示cpu的整个信息
print(psutil.cpu_times().user)
print(psutil.cpu_count()) #获取cpu的逻辑个数(核心)
print(psutil.cpu_count( logical=False ))
print(psutil.swap_memory())
print(psutil.disk_io_counters(... | [
"[email protected]"
] | |
3c4fc4b4311666ae69e4ff6c2501b873ceba975e | 31a97987247fb9c23d19e7dcccd0ff0f27be94be | /bert-sklearn/bert_sklearn/model/utils.py | 14cefab33b2ce4a0ad8856a8e895d04d5ca8cdaa | [
"Apache-2.0"
] | permissive | uphill-ai/NAS2019 | 31302027b46ca11b41c167aacc14dc5da1cc92ab | fe356878d7c007013002e86dd3c7a83333e01084 | refs/heads/master | 2022-12-23T14:54:51.211530 | 2022-04-06T21:14:16 | 2022-04-06T21:14:16 | 202,396,842 | 2 | 2 | Apache-2.0 | 2022-12-17T06:11:36 | 2019-08-14T17:32:03 | Jupyter Notebook | UTF-8 | Python | false | false | 3,702 | py | import torch
from .pytorch_pretrained import BertTokenizer, BasicTokenizer
from .pytorch_pretrained import PYTORCH_PRETRAINED_BERT_CACHE
from .model import BertPlusMLP
def get_basic_tokenizer(do_lower_case):
"""
Get a basic tokenizer(punctuation splitting, lower casing, etc.).
"""
return BasicTokeni... | [
"[email protected]"
] | |
e9be198289de62167eb43eb5900f051d45b63886 | 5eb1ab885494f7952a104bcc3756235c8116b3c5 | /Module_2_Challenge/Starter_Code/qualifier/tests/test_qualifier.py | c39d8f0300f891904302b71596b08199be2ef526 | [
"MIT"
] | permissive | abolla04/Module_2_Challenge | 24ad33d6e8e086f925fd0a11092974b7e66b7109 | 1c583e83a9bfe936a6c2b9327031affdac044600 | refs/heads/main | 2023-05-27T10:46:09.953612 | 2021-06-14T04:51:16 | 2021-06-14T04:51:16 | 376,175,792 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,177 | py | # Import pathlib
from pathlib import Path
#Import fileio
from qualifier.utils import fileio
# Import Calculators
from qualifier.utils import calculators
# Import Filters
from qualifier.filters import credit_score
from qualifier.filters import debt_to_income
from qualifier.filters import loan_to_value
from qualifier.... | [
"[email protected]"
] | |
d56decb5438d33d14d13d2c472bbc9a6720fb931 | 2f98aa7e5bfc2fc5ef25e4d5cfa1d7802e3a7fae | /python/python_21210.py | 9693c1c30eb08a3645f37e8fdea9224e4e16f558 | [] | no_license | AK-1121/code_extraction | cc812b6832b112e3ffcc2bb7eb4237fd85c88c01 | 5297a4a3aab3bb37efa24a89636935da04a1f8b6 | refs/heads/master | 2020-05-23T08:04:11.789141 | 2015-10-22T19:19:40 | 2015-10-22T19:19:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 140 | py | # Django: Custom User form instead of built in + custom required fields
help_text=_("Enter the same password as above, for verification."))
| [
"[email protected]"
] | |
4817b10d73911622da1ebaca2741e011f56ae9f2 | 149bffb7c3fc7e4dc38da892b7f6fb588408b0e3 | /2017/solutions/assignment1/cs231n/classifiers/k_nearest_neighbor.py | 9169ff640474f9c68d4f545ac0ab13f4d7b14890 | [] | no_license | Luvata/CS231N-2017-2018-Solutions | e4ef936d8f7f08e661e7005d90cb37f0c2dd3645 | 4a53cf9131b1822c3312a3ea105c8c88c33b3950 | refs/heads/master | 2020-03-19T04:23:07.485586 | 2018-06-18T20:06:51 | 2018-06-18T20:06:51 | 135,822,219 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,140 | py | import numpy as np
from past.builtins import xrange
class KNearestNeighbor(object):
""" a kNN classifier with L2 distance """
def __init__(self):
pass
def train(self, X, y):
"""
Train the classifier. For k-nearest neighbors this is just
memorizing the training data.
Inputs:
- X: A nu... | [
"[email protected]"
] | |
35c73627210b1a7f1a5074fa2d0e88abcd642a6c | bfa99342c8ae0a411e75ada24dd43017a4624d5e | /PushMessageTest/pushmessage.py | e014ddeaa25cd52e5729ac10b5622022a9fcbefd | [] | no_license | dumbcat/ROM-line-bot | 03969f79e0ecba3b0837e4a891c36b2a036506c7 | 89547b84f9ba132767cb7174dba50022d10201f6 | refs/heads/master | 2022-11-24T16:24:27.040068 | 2020-07-26T11:49:17 | 2020-07-26T11:49:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,385 | py | import json
import requests
import configparser
def sender(token, id, message):
"""Use line message api to push message to line user, group, or chat room.
Args:
token (string): Channel access token of message api.
id (string): Line ser, group, or chat room id.
message (string): A mess... | [
"[email protected]"
] | |
d05028c308d892473fe48052245b721f6dc4a996 | ac10e9ebc0de81dcfd3090b59991400eb338b9fb | /main.py | 026cbeecf6e8401e43713f9ccb03c36bb121ad65 | [] | no_license | mack-book-review/CarGame | 78bcc309667ba07356b302165a9b1bd8becfcaef | 2e34e3528cfaff31ab6ec641e6962a9f65ab4d22 | refs/heads/master | 2023-08-30T09:49:37.609406 | 2021-11-04T02:56:11 | 2021-11-04T02:56:11 | 424,453,145 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 384 | py | from game import Game
def print_hi(name):
# Use a breakpoint in the code line below to debug your script.
print(f'Hi, {name}') # Press ⌘F8 to toggle the breakpoint.
def main():
game = Game()
game.run()
# Press the green button in the gutter to run the script.
if __name__ == '__main__':
main()
... | [
"[email protected]"
] | |
2ba8d89941a2e6ce76eb48b159481e5ed6b30d8a | d81501a3e150ce2c63a755988fb7da10af1a7d91 | /code/predictors/axis.py | a4643d65cf1d177b35a7122fd4381a9e5fdd9052 | [
"MIT"
] | permissive | alexmbird/luckyhorse | b6a1c64b7368b081037b097bf95ec4f6be44ceea | 815502c06117c22456d20a5064a20e95bce4470d | refs/heads/master | 2021-10-13T11:24:19.528610 | 2021-10-12T08:47:54 | 2021-10-12T08:47:54 | 77,913,644 | 4 | 0 | MIT | 2021-10-12T08:47:20 | 2017-01-03T12:05:09 | Python | UTF-8 | Python | false | false | 6,607 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from collections import deque, defaultdict, namedtuple
import random
from operator import itemgetter
import numpy as np
from concurrent.futures import ThreadPoolExecutor
from predictors.container import PredictionContainer
from predictors.coefficient import BaseCoeffici... | [
"[email protected]"
] | |
ba9bbd7d6df3b5dc24a42b58d5db54048471ec38 | 2eec9b249e7243277b59695499c779e5509c7d68 | /alldata/migrations/0009_announcement_announcementnotification_answerchoice_assignment_assignmentsubmission_coursepagemodule_.py | d578e2170496d6fcfaf6bb97e2e38e5cc5ab0b56 | [
"MIT"
] | permissive | askhatkenenbay/Learning_Management_System_Backend | 04e7121cad7c46f32742d9274b0fce2cf562cd3b | 3e241a9f401623eec1c705ee5a38ad595b899c3b | refs/heads/master | 2023-04-07T10:59:12.431974 | 2021-04-18T06:47:13 | 2021-04-18T06:47:13 | 299,650,943 | 0 | 0 | null | 2021-02-25T08:40:46 | 2020-09-29T14:58:12 | Python | UTF-8 | Python | false | false | 9,322 | py | # Generated by Django 3.1.2 on 2020-10-12 14:57
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('alldata', '0008_advice_coursegrades_courseinstructor_studentenrollment'),
]
operations = [
migrations.Creat... | [
"[email protected]"
] | |
3d898e9cd22c5c11329910a8c028e68b0b8622b6 | 0745860246fcf79ebb468d91ffee4c79ee3d4945 | /daily_odds/models.py | 65297cc30257db2fb2e2d7295c7d98439a15db88 | [] | no_license | Esschichu/socceranalyst | 7fd8aa486e8d6f6d1fb355be15960aa3d896dab9 | 45bd621fc1e65a0d8d7fd14ff404a1943063499e | refs/heads/master | 2023-03-18T03:11:14.703502 | 2018-05-03T19:38:52 | 2018-05-03T19:38:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,131 | py | from django.db import models
import datetime
from django.db import models
from django.utils import timezone
class DailyMain(models.Model):
slip_date = models.DateTimeField('slip_date', default=None)
slip_name = models.CharField(max_length=40, null=True, blank=True)
def name(self):
return self.ou... | [
"[email protected]"
] | |
7c2ff7068c4a75e9c61c48204c463f7cc357e497 | 4cb33f37e1322b5e7d4a8c2dc1dcd9867b03dd42 | /tstDates/myCal.py | ff0fc6bacc9e917f91ec3c9243dbe0412af72994 | [] | no_license | gilgamesh7/learn-python | 8190b72fed33653a98d2380a001a574942ee4f8f | 9eaf85ec992be5bc6d545a443bcf6ecd37cacb15 | refs/heads/master | 2020-04-07T10:21:10.805884 | 2018-12-11T08:31:21 | 2018-12-11T08:31:21 | 158,283,568 | 0 | 0 | null | 2018-11-20T00:40:28 | 2018-11-19T20:08:45 | Python | UTF-8 | Python | false | false | 378 | py | import calendar
def tstCal():
myCal=calendar.TextCalendar(calendar.MONDAY)
fmtMyCal=myCal.formatmonth(2018, 11, 1, 1)
print(fmtMyCal)
for myMonth in range(1,13):
myCal=calendar.TextCalendar(calendar.MONDAY)
fmtMyCal=myCal.formatmonth(2018,myMonth,1,1)
print(fmtMyCal)
... | [
"[email protected]"
] | |
fcb3525b6b449bfe3b6d056191b980d8dad95733 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03044/s603271997.py | 359e1984b099d65a4e94c67dda0f5a26eb748584 | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 494 | py | from collections import deque
n = int(input())
uvw = [list(map(int, input().split())) for _ in range(n-1)]
l = [[] for _ in range(n)]
for u, v, w in uvw:
u, v = u-1, v-1
l[u].append((v, w))
l[v].append((u, w))
ans = [0] * n
parents = [-1] * n
q = deque([0])
while q:
a = q.pop()
for i, j in l[a]:
... | [
"[email protected]"
] | |
d9cd792f95700d7261bd95f404dea35e3f406bb2 | dec643e844179268a889d47172a52fd35f8a853c | /data_prep.py | beef8ae17aae0dfdd339e10a3788336601f22d86 | [
"MIT"
] | permissive | harpreet153/Simple_Neural_Network | a26058642543d90495316057b98c0f34f6ca17c6 | ab59c19f09bd15158867cdab55243a94065b9402 | refs/heads/master | 2020-04-07T18:47:16.176234 | 2018-11-28T20:44:42 | 2018-11-28T20:44:42 | 158,623,390 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 812 | py |
# coding: utf-8
import numpy as np
import pandas as pd
admissions = pd.read_csv('student_data.csv')
# Make dummy variables for rank
data = pd.concat([admissions, pd.get_dummies(admissions['rank'], prefix='rank')], axis=1)
data = data.drop('rank', axis=1)
# Standarize features
for field in ['gre', 'gp... | [
"[email protected]"
] | |
80c8c3d3ff1516f508803938c89e42a30ca9e1dc | ad670c6a90f7ee300460934691879810914d38f6 | /backend/collectors/ucas/data.py | b78a2233ead5102567ad9a8673854e5fff07e5f1 | [] | no_license | kennydude/comparethatuni | a767bfb7d786b9e5601b2e1d2597b2a491dda7b7 | 16cef01500e91904204b9033a88087898aa21896 | refs/heads/master | 2016-08-05T12:21:50.205702 | 2012-11-10T18:37:04 | 2012-11-10T18:37:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,697 | py | data = {}
# Auto:
data["BSC"] = "Bachelor of Science"
data["BA"] = "Bachelor of Arts"
data["BACC"] = "Bachelor of Accounting"
data["BAE"] = "Bachelor of Arts and Economics"
data["BARCH"] = "Bachelor of Architecture"
data["BASC"] = "Bachelor of Applied Science"
data["BAS"] = "Bachelor of Applied Science"
data["BAPPSC"]... | [
"[email protected]"
] | |
f84eea71e90ff7d2d7a6dddbf57e751ba15463fc | bec09fcb7126390f1738c4990fa08b95d0b42e95 | /CrawlerXingzhengquhuaFileTest.py | dad38273a93a3ce0e64970ef4b460c3a2cf898b1 | [] | no_license | javasqlbug/pythonProject | 5bb65807872a65c14c531027007fb3ed10c36119 | e6eb38ec7ef6e08beec343177e77f01952494746 | refs/heads/master | 2022-12-23T19:44:21.680262 | 2020-09-16T13:08:07 | 2020-09-16T13:08:07 | 295,891,536 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,136 | py | #!/usr/bin/python
# -*- coding: UTF-8 -*-
#参考自http://c.biancheng.net/view/2011.html
import requests #导入requests包
from bs4 import BeautifulSoup
import re
import time
file_name = 'D:\\test\\xingzhengquhua\\xingzhengquhua.txt'
url='https://xingzhengquhua.51240.com/'
strhtml=requests.get(url)
soup=BeautifulSoup(... | [
"[email protected]"
] | |
030e8876934a3a45463110d92ce353acf7e3978b | 564f887b3e4e81568e0088d3f4915d424213fee4 | /RE.CNN/code/cnn.py | 71ec84df1332b8c3ddcb01c2c6b9969fa1d54ca9 | [] | no_license | Minzhe/KerasDeepLearning | 9153eb836a80456c2397342236f5099c9826bb6b | 0ec0b6c0641e0f9f8a0bebc28af745de6b665b45 | refs/heads/master | 2020-03-21T09:11:02.651379 | 2018-06-30T08:36:11 | 2018-06-30T08:36:11 | 138,386,452 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,183 | py | ##########################################################################################################
### CNN.py ###
##########################################################################################################... | [
"[email protected]"
] | |
5784709a950d180e39c1205f1d2e1a0f2b52130e | 9e55492c1ea09b518b778a54bf513bb5ec573dcb | /Tools/python/userConfig_TEMPLATE.py | f94e387db161972b09492ec24bf6cb832ee9afc0 | [] | no_license | prafullaiitm/LatinoAnalysis | 36f5d2e1c2d4dfb08709e74aeab17cfb7201d6ce | ff71f4821f000a9f31fecfe0a66547a0d5265c5a | refs/heads/master | 2021-01-19T05:00:14.110174 | 2017-04-04T17:19:11 | 2017-04-04T17:19:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 137 | py | #!/usr/bin/env python
baseDir = '/afs/cern.ch/user/x/xjanssen/cms/HWW2015/'
jobDir = baseDir+'jobs/'
workDir = baseDir+'workspace/'
| [
"[email protected]"
] | |
08a3b367ed240d7bf2c7506b76c8e53f5a8ade3b | 339ff1f2089a085641c6b76818927f6b711c4750 | /eic/identities.py | 92ee4da245df8961e9cffdce60ed58c8ccd65e2d | [] | no_license | Muterra/muse-experiments | b670c67a2726722695487f2f77dcdddd1a86f65a | 4ef87a6279d60d5d25493266b21d830050ac1c1a | refs/heads/master | 2020-05-24T15:31:10.949179 | 2015-07-27T15:54:56 | 2015-07-27T15:54:56 | 39,783,223 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,529 | py | '''
LICENSING
-------------------------------------------------
pyEIC: A python library for EIC manipulation.
Copyright (C) 2014-2015 Nicholas Badger
[email protected]
nickbadger.com
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General... | [
"[email protected]"
] | |
67f79154b5a77882ba2db7f43578b38243154c28 | 91c9f6c1c6933d21076b29fce93580a4cca63ab2 | /setup.py | c5100378629fbf20ed0894b594c98d8b44576c51 | [
"Apache-2.0"
] | permissive | pansiyuan123/mmdetection-rocm | cb4ee8474978019963f3192e2bcdff5a46601d75 | 5fbfedd4ea73645750626d70ac8ed456759b6b4f | refs/heads/master | 2022-11-18T09:01:40.626726 | 2020-07-01T05:43:22 | 2020-07-01T05:43:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,160 | py | #!/usr/bin/env python
import os
import subprocess
import time
from setuptools import find_packages, setup
import torch
from torch.utils.cpp_extension import (BuildExtension, CppExtension,
CUDAExtension)
def readme():
with open('README.md', encoding='utf-8') as f:
co... | [
"[email protected]"
] | |
e2048391927256fc2515bf8c8bfb13dd16269986 | ce76b3ef70b885d7c354b6ddb8447d111548e0f1 | /week/case/large_day/way/bad_thing_and_person/eye.py | 9d986299d4e6b9d77f6fec2a2c89dd8ed8aab7a9 | [] | no_license | JingkaiTang/github-play | 9bdca4115eee94a7b5e4ae9d3d6052514729ff21 | 51b550425a91a97480714fe9bc63cb5112f6f729 | refs/heads/master | 2021-01-20T20:18:21.249162 | 2016-08-19T07:20:12 | 2016-08-19T07:20:12 | 60,834,519 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 217 | py |
#! /usr/bin/env python
def time_or_old_fact(str_arg):
life(str_arg)
print('small_company')
def life(str_arg):
print(str_arg)
if __name__ == '__main__':
time_or_old_fact('say_high_person_up_thing')
| [
"[email protected]"
] | |
8315cc52bffb847852532e37dd45604b0dec1350 | d904ecb1cf65ffbd2bd0332b46ae3c90a9d96158 | /dzz/dz.py | 62bb5fcb4b8ca30dc8e048af5f60992d83359f27 | [] | no_license | EraSilv/day2 | 9e1b5573017a6c3e3a4afa3cc0d19de10fcc4d34 | a1528897b150cd856d72e7ab387a1dbb5e0189ee | refs/heads/master | 2023-06-04T00:09:18.992833 | 2021-06-28T11:45:36 | 2021-06-28T11:45:36 | 368,862,399 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 586 | py | #a = 35
#b = int(input())
#print(b > a)
#rint(b < a)
#print(b == a)
#print(b != a)
#a = int(input("первое число:"))
#b = int(input("второе число:"))
#print(a + b)
#print(a * b)
#a = int(input( "ur first no:"))
#b = float(input("ur second no:"))
#c = int(input("ur third no:"))
#print(a == b == c)
location = input("... | [
"[email protected]"
] | |
ba382696da0039d785ebfec6866480fa880b41ae | 38ae0a339102c9fa0c24ecac7901a0103f87c1fe | /Lib/site-packages/pip/_vendor/pep517/wrappers.py | fe5b787c9e9a772e68d4f31be10a41b8036235e0 | [] | no_license | Tanzin-Ul-Islam/Django_dynamic_filterform | 11cf897391abc56929b3e6d5156660312a65ef13 | 76eb92d65a8cab5a9b294f87c144e425227feee5 | refs/heads/main | 2023-02-23T02:38:51.562393 | 2021-01-26T20:36:20 | 2021-01-26T20:36:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,291 | py | import threading
from contextlib import contextmanager
import os
from os.path import dirname, abspath, join as pjoin
import shutil
from subprocess import check_call, check_output, STDOUT
import sys
from tempfile import mkdtemp
from . import compat
__all__ = [
'BackendUnavailable',
'BackendInvalid',
'HookM... | [
"[email protected]"
] | |
0b283bf769e85611ae53808e6e2aa56546029522 | 50a21aa11a8d55fdaf8de6eb3804fdc27c16ca24 | /failed examples/try1/server1.py | e0504e42eda80e2b911041649709f6c4559ea973 | [] | no_license | gideon59a/websock | 50624ed35107202c359ba4fc1f24ef5b20e3b5d8 | eac5875033f80b06fec1254edbd9b35a0978b779 | refs/heads/main | 2023-07-18T21:15:13.073419 | 2021-09-28T08:56:51 | 2021-09-28T08:56:51 | 411,205,209 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 805 | py | # Ref (works ok): https://pythonprogramminglanguage.com/python-flask-websocket/
# NOTE: The server fails until I downgraded flask-socketio to 4.3.2 per https://github.com/miguelgrinberg/Flask-SocketIO/issues/1432
# C:\Python\Python39\Scripts\pip.exe install -Iv flask-socketio==4.3.2
from flask import Flask, render_tem... | [
"[email protected]"
] | |
1ea6b52092f1832a41e71c7d18ba2b6654e3d8c8 | 7c5d7347294afced072950c2b22cf8a12d54a3cc | /src/calibration.py | 8840f7488bbe1a530a7b11195ea4e2fe56fdea25 | [] | no_license | DinoHub-SubT/basestation_gui_python | 129b7d2cf90175b17462f7c36f0ebf684e5f8562 | e4cf13f4f0ab9811880981d8623c085b6509eda5 | refs/heads/master | 2023-08-29T11:16:28.108675 | 2019-12-21T23:23:03 | 2019-12-21T23:23:03 | 423,113,324 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 23,348 | py | from __future__ import print_function
import os
import math
import random
import datetime
import json
import re
import subprocess
import rospkg
import rospy
import robots
from qt_gui.plugin import Plugin
from python_qt_binding import loadUi, QtCore, QtGui, QtWidgets
from nav_msgs.msg import Odometry
from geometry_msg... | [
"[email protected]"
] | |
85f7d9eaace33e3aa4d27ed43863e1f564756294 | e19704c2098066c58a45112f0978c84cb5b0abfb | /웹 크롤링 해본 것/2. StarBucks Address/starbucks.py | 1d1602055e77c5cb5dbe55da50b976ec88b86456 | [] | no_license | Aqudi/HTML-and-python-crawling | ab911a15350562ac28b7a633dfbcf6554a54af21 | 0249dad99f690737c37bc89c0a67a6f0bfb9a938 | refs/heads/master | 2021-09-27T19:52:47.429625 | 2018-11-11T04:18:55 | 2018-11-11T04:18:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,565 | py | import sys
import io
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
import time
from bs4 import BeautifulSoup
import requests
import os
sys.stdout = io.TextIOWrapper(sys.stdout.detach(), encoding = 'utf-8')
sys.stderr = io.TextIOWrapper(sys.stderr.detach(), encoding = 'u... | [
"[email protected]"
] | |
2b40ae5ae6fe610502c28aa2772491f48e6e5c52 | 6ad9d8ff71dd0261d91d04859bbf99e003177a79 | /learn/test.py | 4caec70226a305c26049a711a388d06eb592096d | [] | no_license | youzeliang/Crwal | 4901f6fb13017ec4b95813eb21b7da55765588b9 | ae1e4243466e4ebc066f81e131d712d26215f994 | refs/heads/master | 2021-09-17T21:09:45.636029 | 2018-07-05T13:42:01 | 2018-07-05T13:42:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 254 | py | classmate = ['fdf','fff','aa']
classmate.append("admin")
classmate.insert(1,"d")
print (classmate[-2])
classmate.pop(1)
print (len(classmate))
age = 1
if age < 3:
print ("ff")
sum = 0
for x in [1,2,3,4,5,66,7]:
print(x)
print(list(range(7))) | [
"[email protected]"
] | |
e2bd7f6056a49e659124e5499e35dcc66db14362 | 0ba5622abc2125ac8a9907757680da4d7cb7b47e | /Knowrob/indigo/indigo-knowrob-dev/catkin_ws/devel/lib/python2.7/dist-packages/scanning_table_msgs/msg/_scanning_tableResult.py | b244c5b9a487f7423cb2420f13c20b29c231dd57 | [] | no_license | IoT-Lab-Minden/docker-ros | c2a327117bdf1d0b861d4580156e595a079ec5d5 | 5c57c15717cbcae515d82c3dc75470587bb2508e | refs/heads/master | 2021-01-18T03:33:22.128596 | 2017-05-17T13:48:05 | 2017-05-17T13:48:05 | 85,809,457 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 127 | py | /root/catkin_ws/devel/.private/scanning_table_msgs/lib/python2.7/dist-packages/scanning_table_msgs/msg/_scanning_tableResult.py | [
"[email protected]"
] | |
52044bae579c7563300a029eaebfea9252bd78bd | 2ca8409e3e575c65754e54948ada9a00a9c02a7e | /Arrays/maxDiff.py | 3e951ef1852d667e8cc1578f9af7b0d3a2686603 | [] | no_license | wmaxlloyd/CodingQuestions | 0fc230e1861d5d33768d453c11c377221ae65a05 | 805e522f0e2077ffef36edb44b6b605fd727c3d8 | refs/heads/master | 2020-08-26T19:47:54.904406 | 2020-06-29T02:45:54 | 2020-06-29T02:45:54 | 217,126,563 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 480 | py | # Given an array,find the maximum j – i such that arr[j] > arr[i]
inputArray = [100,200,8,4,6,3,6,9,8,3,5,3,6,3,5,7,8,5,0]
pointerDifference = len(inputArray) - 1
answer = None
while pointerDifference > 0:
p1 = 0
p2 = p1 + pointerDifference
while p2 < len(inputArray):
if inputArray[p2] > inputArr... | [
"[email protected]"
] | |
e77f286f9171f97ede448b137bb6a79cd31e0429 | 85a9ffeccb64f6159adbd164ff98edf4ac315e33 | /pysnmp-with-texts/RUCKUS-ZD-EVENT-MIB.py | f63918726cf10f7df19477dc47046783d777c829 | [
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-proprietary-license",
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | agustinhenze/mibs.snmplabs.com | 5d7d5d4da84424c5f5a1ed2752f5043ae00019fb | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | refs/heads/master | 2020-12-26T12:41:41.132395 | 2019-08-16T15:51:41 | 2019-08-16T15:53:57 | 237,512,469 | 0 | 0 | Apache-2.0 | 2020-01-31T20:41:36 | 2020-01-31T20:41:35 | null | UTF-8 | Python | false | false | 47,858 | py | #
# PySNMP MIB module RUCKUS-ZD-EVENT-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/RUCKUS-ZD-EVENT-MIB
# Produced by pysmi-0.3.4 at Wed May 1 14:59:13 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default... | [
"[email protected]"
] | |
292803bf884231c3e3166c8b4fb1fdcad553334b | 974f13d47d2ff698e663698eee20c3d8b1030410 | /taobao/taobao/pipelines.py | 3e8419f5f9e4c13656b879bf3e4ebde26fda9bed | [] | no_license | zhengdongge/Spider | 76d538f8914eb2d071e1b540e42869c1470e20c5 | e1ae195af7a800584066fa6c5ac282ec55adad84 | refs/heads/master | 2020-03-28T05:05:44.529874 | 2018-08-30T10:19:59 | 2018-08-30T10:19:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,008 | py | # -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: https://doc.scrapy.org/en/latest/topics/item-pipeline.html
import pymongo
class TaobaoPipeline(object):
def __init__(self,mongo_url,mongo_db):
self.mongo_url=mongo_url
... | [
"[email protected]"
] | |
50dc83a0e57be73f6f4fa4c42dd70fbe8deaa155 | aaf8069252f781bc8b9b541da568f8fcc1232d6a | /camera_handler.py | b653766d68b5c3ee4f42cff97b345bd4a82853e2 | [] | no_license | KoheiEnju/streaming-cam | 4748e1543cbbbc210e95769f6cf9545d5a83957b | 0d5eb7e3c75f231d438bfa098de6cca739b3532b | refs/heads/master | 2023-07-04T09:48:47.223525 | 2021-08-04T13:33:42 | 2021-08-04T13:33:42 | 392,699,278 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 408 | py | import cv2
from base_camera import BaseCamera
class Camera(BaseCamera):
def __init__(self):
super().__init__()
@staticmethod
def frames():
camera = cv2.VideoCapture(0)
if not camera.isOpened():
raise RuntimeError("Could not start camera.")
while True:
... | [
"[email protected]"
] | |
be7c7c03c5f9a32d601d32946e75bb0fa31897e3 | f73dbdd567664f94a0d954d51fb469b522386b07 | /data.py | 26ac26ce2cf642bb97198f96ff6ae30be1d92d46 | [] | no_license | SoundsSerious/BeemClient | 20a7c4f1bf3b8507be6f6174dd050b19008648d9 | 2048b49e1639d6c54a9c556293af258379e25159 | refs/heads/master | 2022-05-02T15:50:32.925779 | 2018-10-14T20:05:39 | 2018-10-14T20:05:39 | 141,741,705 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,187 | py | # -*- coding: utf-8 -*-
"""
Created on Tue Dec 5 13:26:26 2017
@author: Cabin
"""
from kivy.lang import Builder
from plyer import gps
from kivy.uix.widget import Widget
from kivy.uix.floatlayout import FloatLayout
from kivy.properties import *
from kivy.event import *
from kivy.clock import Clock, mainthread
from k... | [
"[email protected]"
] | |
c71be37264e1828fb4eb25125e16964b72926553 | b1a3b2d113693af130595911255ec7c349fbb341 | /netbox_ddns/tables.py | 8cbef21564842cddd75e769a9918f086490449fc | [
"Apache-2.0"
] | permissive | k4mil666/netbox-ddns | 741a426a4d4351629ede197b741884d0594143fc | c183152a8d66aff07126c5d991c08025432b8bd7 | refs/heads/main | 2023-02-04T00:02:51.044356 | 2020-12-26T18:56:53 | 2020-12-26T18:56:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,498 | py | import django_tables2 as tables
from netbox_ddns.models import ExtraDNSName
from utilities.tables import BaseTable, ToggleColumn
FORWARD_DNS = """
{% if record.forward_action is not None %}
{{ record.get_forward_action_display }}:
{{ record.get_forward_rcode_html_display }}
{% else %}
... | [
"[email protected]"
] | |
7cadad47c0c6452d14ef654bb3cebead5bf6b731 | a8dc53e3b078c526cd19563b98decc5acc581962 | /Newbie_experiments/Ex_Files_Programming_Realworld/Exercise Files/Ch01/01_01/start_01_01_breakfast_functions.py | e4e4a6cc50bb4ae1059eff67a4beca1da5cef645 | [] | no_license | cristianbostan/Developer | 46c7dca6949a864e25e050e72c5c5bef87b0be9e | a6ffa79dda54cc22956fdee4eba31b74416d0536 | refs/heads/master | 2021-09-11T01:21:29.605868 | 2018-04-05T15:18:19 | 2018-04-05T15:18:19 | 126,076,162 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 348 | py | """ A Functional Breakfast """
def make_omelette():
print('Mixing the ingredients')
print('Pouring the mixture into a frying pan')
print('Cooking the first side')
print('Flipping it!')
print('Cooking the other side')
omelette = 'a tasty omelette'
return omelette
omelette1 = make_omelette()... | [
"[email protected]"
] | |
398fc4fe8205b361ca80d37fda8461fb36a5fc9d | 48f43a3eee114a5684c2c869b4e030ba27b8540b | /BridgeDataAnalysis/PyVision/dummydata.py | a2f107801350ea4a4b73474f858388bfffe350e0 | [] | no_license | ishjain/Traffic-Inference | 294a3c3cd3b07ee389cfd336e4e0cb95ec251915 | d86dd999bf3ec1541e51f79f38622a8ed79b6764 | refs/heads/master | 2021-01-21T16:38:33.080214 | 2017-05-20T22:57:53 | 2017-05-20T22:57:53 | 91,900,605 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 608 | py |
'''
Ish Kumar Jain: I ran logistic regression on this dummy data set and got
train accuracy = 40%
test accuracy = 40%
validate accuracy = 60%
default learning rate (.13)
'''
import numpy as np
x_tr = np.array([[1,2,3,4,5],[2,1,4,5,4]])
y_tr = np.array([1,-1,1,1,-1])
x_te = np.array([[4,5,6,7,8],[3,4,5,8,9]])
y_te ... | [
"[email protected]"
] | |
daf21b1fd3bfbf1438347e86182f777cbd1d1ccc | 0f69325ad7cba43146df33955076d3fd7aee29d9 | /generate_content_df.py | e52d014f32bc3f4c8a5594fd047cea1ca6705993 | [] | no_license | I85YL64/dashboardom | 25db8357774045904d95a1acef272a746f67b9e6 | e279fbc6245edef64e6e023f20724e61a5101a33 | refs/heads/master | 2022-04-10T21:21:11.000157 | 2020-02-04T21:02:41 | 2020-02-04T21:02:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,723 | py | import pandas as pd
dashboard_df = pd.DataFrame({
'dashboard': [
'migration-population',
'gold-reserves',
'google-serp',
'twitterdash',
'trending-twitter',
'us-baby-names',
'advertools',
'boxofficemojo',
'health-spending',
'life-exp',
... | [
"[email protected]"
] | |
ae0c8a6c7c2349018e3c51f99c07684073579d6f | 5b51f7d73ee14e40017d27be91dc4fe2212c58ff | /config/wsgi.py | 0c7c70440644e97cb10eac5e47e5f609f4c562e9 | [] | no_license | yatemmma/grock | 527037d5163d4a8ee17d0a924863d9a55c5e9db6 | 9cf2b1d4889b2379a6f6ead57e04302ca245ed26 | refs/heads/master | 2021-05-22T06:01:26.550664 | 2020-04-25T16:41:40 | 2020-04-25T16:41:40 | 32,218,890 | 0 | 0 | null | 2018-05-27T11:50:07 | 2015-03-14T15:40:14 | CSS | UTF-8 | Python | false | false | 572 | py | """
WSGI config for grock project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
from django.conf import settings
from w... | [
"[email protected]"
] | |
5f3251561f4d13abe9c031bc4b769ee6145896fe | a46f40398d398f001e78fba6f6c3606ed0a87759 | /02-Livros/IntroduçãoAProgramaçãoComPython/CapituloV/Exercicio5.10.py | b028d55a0dbcb0c58aa7e6e99c27e6c01cb536b1 | [] | no_license | jocelinoFG017/IntroducaoAoPython | b2b95b392eba14d92192f95d1a6720306223c780 | e0672bd1ed376795e13b5f44f2fc6e3bcc350a6d | refs/heads/main | 2023-08-21T10:06:32.079082 | 2021-09-19T01:03:41 | 2021-09-19T01:03:41 | 322,012,658 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 982 | py | """
# Programa anterior
pontos = 0
questao = 1
while questao <= 3:
resposta = input("Resposta da questao {} : ".format(questao))
if questao == 1 and resposta == "b":
pontos = pontos +1
if questao == 2 and resposta == "a"
pontos = pontos + 1
if questao == 3 and resposta == "d"
pon... | [
"[email protected]"
] | |
721e4acbc32086ba414b5491823839e1b328d854 | 0617f0626b09840805a2f4edbd1e3278c2883702 | /pytorch-工作中遇到的函数/98-transpose().py | 5b2ba5fd5e4f55f23dc1f4b21ec9b46a3266c26c | [] | no_license | yflfly/learn_pytorch | 29b920f59f18f95ee396c82442fe8cfd69fe2314 | daae77d1bf7cd9e03b236737d6ee0dd53b1831e9 | refs/heads/master | 2023-03-07T17:08:43.024056 | 2021-02-25T02:31:50 | 2021-02-25T02:31:50 | 284,202,495 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,203 | py | # coding:utf-8
import torch
'''
官方文档:
torch.transpose(input, dim0, dim1, out=None) → Tensor
函数返回输入矩阵input的转置。交换维度dim0和dim1
参数:
input (Tensor) – 输入张量,必填
dim0 (int) – 转置的第一维,默认0,可选
dim1 (int) – 转置的第二维,默认1,可选
'''
# 创造二维数据x,dim=0时候2,dim=1时候3
x = torch.randn(2, 3) # 'x.shape → [2,3]'
# 创造三维数据y,dim=0时候2,dim=1时候3,dim=2时候... | [
"[email protected]"
] | |
447dd2afc75fa1a182e314360b7a37bca96e2bc3 | 1cae26aeed8f3f8ea3864521d441958cb8fa9e3f | /Email/models.py | 13d413504b2da002fa6d929194b60eaaacdcb0c2 | [] | no_license | gledong12/Email-subscribe-system | 5d13dcb08ea21a7f96f4900d042f2ab25985d4ac | ac317f16778f764ad538d1d230a7e4a7bbaea780 | refs/heads/main | 2023-05-28T21:50:58.798610 | 2021-06-09T01:21:34 | 2021-06-09T01:21:34 | 373,383,310 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,177 | py | from django.db import models
from user.models import models
class Category(models.Model):
name = models.CharField(max_length=50)
class Meta:
db_table = 'categories'
class Email(models.Model):
subject = models.CharField(max_length=100)
content = models.TextField()
created_a... | [
"[email protected]"
] | |
8957de375ffde3cf6e3756ac194445e31145a999 | b490f3d5219812127b0af77c447e4bc80c616f73 | /aleph/index/entities.py | 9de0b0f81c226d98c88e71490a9b623bf62a27ec | [
"MIT"
] | permissive | batman59/aleph | 30a72bec9143c437baf0ddebece4416370066ef0 | d02068ece529ce86219387f7d078b7a97e2ef643 | refs/heads/main | 2023-04-07T15:58:08.958163 | 2021-04-12T22:45:12 | 2021-04-12T22:45:12 | 356,256,707 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,589 | py | import logging
import fingerprints
import warnings
from pprint import pprint, pformat # noqa
from banal import ensure_list, first
from followthemoney import model
from followthemoney.types import registry
from elasticsearch.helpers import scan
from aleph.core import es, cache
from aleph.model import Entity
from aleph... | [
"[email protected]"
] | |
836bb34a019039ab8c3df90c6fe0873bb8d46d15 | c94ab5242d3ca5c95a7227219ab8e42145b37cce | /db/__init__.py | 6f868c9c9aa4ef7ef381888ff376ae57fa3aede7 | [
"MIT"
] | permissive | kekecoco/py_text_to_audio | 7d7e84662caedd14248110c37ac18528c701a273 | 399a685318e19992cd932efe804d7508af9e4a25 | refs/heads/develop_dev | 2021-04-06T00:22:27.337565 | 2018-03-20T08:02:20 | 2018-03-20T08:02:20 | 124,878,403 | 1 | 0 | MIT | 2018-03-19T09:33:31 | 2018-03-12T11:24:28 | Python | UTF-8 | Python | false | false | 90 | py | # -*- coding: utf-8 -*-
# @author Wu Lihua
# @email [email protected]
from db import * | [
"[email protected]"
] | |
0f4027eae87108f86b40e63e93b1c8d5a28ceee0 | eac7ae395c4832ac394087054ab014d1d6a9f6a6 | /python_experiments/run_experiments/ppscan/run_ppSCAN_gen_gt.py | 8e301fa2e3767c47b2d15889cde0cfe23caaa991 | [
"MIT"
] | permissive | mexuaz/AccTrussDecomposition | 21be22007e1c50ca4b7df6fbbad1dfbf4c2fffae | 15a9e8fd2f123f5acace5f3b40b94f1a74eb17d4 | refs/heads/master | 2022-12-14T03:41:05.133564 | 2020-09-03T00:35:33 | 2020-09-03T00:35:33 | 291,565,779 | 0 | 0 | MIT | 2020-08-30T22:57:55 | 2020-08-30T22:57:55 | null | UTF-8 | Python | false | false | 2,983 | py | import subprocess
import socket
import sys
import time
from exec_utilities import time_out_util
from config import *
my_splitter = '-'.join(['*' for _ in range(20)])
def kill_all():
exec_name_lst = []
for exec_name in exec_name_lst:
err_code, output = subprocess.getstatusoutput("ps -ef | grep " + exe... | [
"[email protected]"
] | |
d29f550b849772338f52473d7c5d0a6fe2bc584b | b9134f1aa6e98afc52d9b08eaa1dc48921fff262 | /django_backend/project/urls.py | 9aea40e1dd5b79c63933bc3856dfc5fc7363fcc3 | [] | no_license | parvez301/document-management-system | e208e6786105001a2c12f6c294bb6205b789daac | e9aae1188c864eaf624fb1b7266f8805175257ff | refs/heads/master | 2022-12-10T14:42:34.531767 | 2018-04-17T06:00:51 | 2018-04-17T06:00:51 | 128,873,553 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 714 | py | from django.conf.urls import include, url
from django.contrib import admin
from django.views.generic import TemplateView
from rest_framework import routers
from user_profile.views import UserViewSet
router = routers.DefaultRouter()
router.register(r'user', UserViewSet,)
urlpatterns = [
url(r'^admin/', include(a... | [
"[email protected]"
] | |
9b47a510e8d1feddca50084cb85b99f69648aaaf | a5a88a49c5537fb979fce54699402e76f7e6b25f | /tm_manager_backend/contrib/sites/migrations/0003_set_site_domain_and_name.py | 72b33de57583dcd1501a052e012c2b27dd81dafb | [
"MIT"
] | permissive | nachos5/tm_manager_backend | 053bbad2fb9bedd8b4dbb844e78e1185a9b8fc68 | 27b0479b239a6ce3073b4de2f76b402ec986975c | refs/heads/master | 2020-08-28T13:41:34.184528 | 2020-04-16T07:27:28 | 2020-04-16T07:27:28 | 217,715,259 | 0 | 0 | MIT | 2019-11-28T00:51:59 | 2019-10-26T13:47:53 | Python | UTF-8 | Python | false | false | 1,016 | py | """
To understand why this file is here, please read:
http://cookiecutter-django.readthedocs.io/en/latest/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django
"""
from django.conf import settings
from django.db import migrations
def update_site_forward(apps, schema_editor):
"""Set site d... | [
"[email protected]"
] | |
1862703f8c01562c66bd7a1c6efecc2f6807570c | b2c8ccbf7466f7a920a2b19c64dcfb4f2b72f836 | /api/app/models.py | 9b98473ee096164d1e3ba48ded2991b1f17b7a67 | [
"MIT"
] | permissive | duranlopes/k8s-iac | 534f056c9a076e0c7f7a2291a99c56ffbd327d39 | 5bdc872b19a9117d48c0f1777a4c5d4246ea7b3b | refs/heads/main | 2023-05-12T00:14:40.956062 | 2021-04-14T02:52:26 | 2021-04-14T02:52:26 | 338,554,678 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 750 | py | from sqlalchemy import Boolean, Column, ForeignKey, Integer, String
from sqlalchemy.orm import relationship
from .database import Base
class User(Base):
__tablename__ = "users"
id = Column(Integer, primary_key=True, index=True)
email = Column(String(100), unique=True, index=True)
hashed_password = Co... | [
"[email protected]"
] | |
fdb72ad1d70d9151373c79a0df8aafb4db9eb3eb | 75af5903e789ba0c50336e802d4828d8eb69c269 | /src/variational_strategies.py | d4d9ae73fe9fab669314225c225e60849fe53a46 | [
"MIT"
] | permissive | jackgoffinet/poe-vae | a7a990c893bb29b532c565bf1af3f654754b6f85 | 18ca2cd4cffe3259e19525c2dc65c84d7219e9d6 | refs/heads/master | 2023-09-06T09:45:30.037720 | 2021-11-15T16:39:27 | 2021-11-15T16:39:27 | 329,687,476 | 8 | 3 | null | null | null | null | UTF-8 | Python | false | false | 8,940 | py | """
Define strategies for combining evidence into variational distributions.
These strategies all subclass `torch.nn.Module`. Their job is to convert
parameter values straight out of the encoder into a variational posterior,
combining evidence across the different modalities in some way.
TO DO
-----
* The GaussianPoe... | [
"[email protected]"
] | |
29ca1331b2e363267325dd1a0b8e07a808ab8d0b | aea28642b2f680c1597bf73dd0025e5be2837919 | /fizzbuzz.py | 93786563960931a8a454b6f2663d87cbb36a327d | [] | no_license | krushigada/fizzbuzz | cd0134be0caabfb8536f5d71287743e893263f4c | bcbc0359b0e5556db42158f0cf616d4ae38e4b1a | refs/heads/master | 2020-06-15T13:52:44.395878 | 2016-12-01T12:26:08 | 2016-12-01T12:26:08 | 75,288,114 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,060 | py | play="start"
while(play=="start"):
print("Multiples of 3 represented by Fizz\nMultiples of 5 represented by Buzz\n")
n=input("Enter number limit:")
i=1
while(i<=n):
if(i%2!=0):
if(i%3!=0 and i%5!=0):
print "Computer: ",i
elif(i%3==0 and i%5==0):
... | [
"[email protected]"
] | |
5328383760e66d74cccabfe70245b53bafd48034 | 5ae88a0a197a52086edffe9c031bc424634b55d4 | /AizuOnlineJudge/ITP1/4/C.py | 4c5a62f99eaf85c97dcbe26bf43acbd39a709a6d | [] | no_license | muck0120/contest | 1b1226f62e0fd4cf3bd483e40ad6559a6f5401cb | de3877822def9e0fe91d21fef0fecbf025bb1583 | refs/heads/master | 2022-07-17T17:31:50.934829 | 2020-05-18T09:55:30 | 2020-05-18T09:55:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 264 | py | a, op, b = 0, '', 0
while op != '?':
a, op, b = input().split()
if op == '+':
print(int(a) + int(b))
if op == '-':
print(int(a) - int(b))
if op == '*':
print(int(a) * int(b))
if op == '/':
print(int(a) // int(b)) | [
"[email protected]"
] | |
57fbff1ecd278da221595af255f9a54d9e4a0ef2 | 452c698c426c45b306b4959f89799d9560601449 | /polynomial_regression.py | 7d7d63f6a732f4852bf1f998dfc362de2a495c0e | [] | no_license | khushipathak/ML_templates | a0f54f357b108903c3e422ca5b0c56a2aba913a1 | e9928c0c81cffffa925070a062c173e0c1868d13 | refs/heads/master | 2022-04-16T07:55:30.651556 | 2020-04-16T13:05:09 | 2020-04-16T13:05:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,279 | py | # Polynomial Regression
# Importing the libraries
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
# Importing the dataset
dataset = pd.read_csv('Position_Salaries.csv')
X = dataset.iloc[:, 1:2].values
y = dataset.iloc[:, 2].values
# Splitting the dataset into the Training set and Test set
# WE... | [
"[email protected]"
] | |
d2fec5ef863a58ae882b3eaa5bf73ef6f3839f05 | bc76caf747d4de910de768a9809c85e57ee45ebc | /nba_automation/utilities/CustomListener.py | 283a50dc6fc411591c4e4fa8aedb5487e68bbad8 | [
"MIT"
] | permissive | sohailchd/RobotAndLocust | 48b7491f227ee97bd618b0a6df292a626c58dc67 | 9ae953e293e12129db761b553691da935f6db89f | refs/heads/master | 2020-04-17T01:30:44.986583 | 2019-01-17T17:25:01 | 2019-01-17T17:25:01 | 166,095,392 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,757 | py | from utilities.BrowserManager import BrowserManager
from robot.libraries.BuiltIn import BuiltIn
from robot.libraries.Screenshot import Screenshot
import conf
from utilities.CustomUtils import CustomUtils
from robot.api import logger
class CustomListener(object):
ROBOT_LIBRARY_SCOPE = 'TEST SUITE'
ROBOT_LISTENE... | [
"[email protected]"
] | |
d9cf2daff3cef138e42f78dcdd0a82fc58ac3ee8 | 4cf9acba6ef4ec25eee76ad66cb595cacb09c181 | /server.py | 7cd81008afe6486f5138f1688fc885a555765e0d | [] | no_license | jscott1989/BlueBallsInc | f8c6a0b3cbe9b3701dc16f91daa05b06650331e3 | 2e8b2dfae6053dc7d286cddc26faefcf60e0d1a3 | refs/heads/master | 2016-09-05T18:13:41.568795 | 2012-08-09T06:47:20 | 2012-08-09T06:47:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,484 | py | """
Server side of Blue Balls Inc.
"""
from sys import argv
import os
import bottle
from bottle import get, post, view, static_file, route, redirect, abort, request
from couchdbkit import Server
import json
bottle.debug(True)
bottle.reload = True
bottle.TEMPLATE_PATH = ["./templates"]
root_directory = os.path.dirna... | [
"[email protected]"
] | |
2b880ed1f82c06098d72ea38fd63ef4dfa9eb407 | bc09d43caaa31697c8099bfafefb56e48504bfea | /occurrence_of_ME_and_MY.py | bfff98cdb76a53df5988df6df9f276e1105f805f | [] | no_license | FatemaBohra/python-program | 103f2584eb2a31de0080059d013051e415ce23c9 | ce647be15245098ae562099475cac52582e1b30f | refs/heads/main | 2023-09-04T06:22:41.012712 | 2021-11-04T15:00:25 | 2021-11-04T15:00:25 | 418,728,284 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 349 | py | # Quetion-8(FILE HANDLING)
def occurrence_of_ME_MY(file_name):
file = open(file_name, 'r')
file_list = file.read().split()
count = 0
for i in range(0, len(file_list)):
if file_list[i] == 'MY' or file_list[i] == 'ME':
count = count + 1
file.close()
return count
print(occurren... | [
"[email protected]"
] | |
6643171f45a1abb55c1f08e0b88e1f793f5b599c | 5efc306e30024bc0490bb3e22810669b590e19a4 | /baidupic/spiders/baidupic.py | 1beec79e7951c617777c0053ece0ba847e79f253 | [] | no_license | ZGC-demo/Baidupic | 2aa127ed771214dc3c07db9c198d216cb2cc8943 | 312239fda0284220304370d1397f8846afe5cb87 | refs/heads/master | 2020-03-19T20:40:00.995880 | 2018-06-11T07:58:42 | 2018-06-11T07:58:42 | 136,910,843 | 1 | 0 | null | 2018-06-11T10:27:33 | 2018-06-11T10:27:33 | null | UTF-8 | Python | false | false | 948 | py | import scrapy
import json
from ..items import BaidupicItem
class BaidupicSpider(scrapy.Spider):
name = 'baidupicspider'
allowed_domains = ['image.baidu.com']
pn = 0
def __init__(self, keywords=None, page=None, *args, **kwargs):
super(BaidupicSpider, self).__init__(*args, **kwargs)
sel... | [
"[email protected]"
] | |
b08740255346a53fa8ec7c2417b89339512cad71 | c16ea32a4cddb6b63ad3bacce3c6db0259d2bacd | /google/ads/googleads/v5/googleads-py/google/ads/googleads/v5/services/types/carrier_constant_service.py | f2b6d5375d401f3038ed62a7fe4870b6286bb9b8 | [
"Apache-2.0"
] | permissive | dizcology/googleapis-gen | 74a72b655fba2565233e5a289cfaea6dc7b91e1a | 478f36572d7bcf1dc66038d0e76b9b3fa2abae63 | refs/heads/master | 2023-06-04T15:51:18.380826 | 2021-06-16T20:42:38 | 2021-06-16T20:42:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,276 | py | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | [
"bazel-bot-development[bot]@users.noreply.github.com"
] | bazel-bot-development[bot]@users.noreply.github.com |
6a1b449d48374d0236e01a797249dc7ed36bda8f | fcd965c9333ee328ec51bc41f5bc0300cc06dc33 | /Trees/BinaryTrees/invertBinaryTree.py | ff36aca852fde299f4c691638ebff0e31c239ed8 | [] | no_license | henrylin2008/Coding_Problems | 699bb345481c14dc3faa8bab439776c7070a1cb0 | 281067e872f73a27f76ae10ab0f1564916bddd28 | refs/heads/master | 2023-01-11T11:55:47.936163 | 2022-12-24T07:50:17 | 2022-12-24T07:50:17 | 170,151,972 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,260 | py | # Invert Binary Tree
# Level: Medium
# https://www.algoexpert.io/questions/Invert%20Binary%20Tree
# Write a function that takes in a Binary Tree and inverts it. In other words, the function should swap every left node
# in the tree for its corresponding (mirrored) right node. Each Binary Tree node has a value stored in... | [
"[email protected]"
] | |
2d1867c309751c37b717ebd8c792178e29f3ec0b | 8afb5afd38548c631f6f9536846039ef6cb297b9 | /_REPO/MICROSOFT/c9-python-getting-started/python-for-beginners/03_-_Comments/comments_for_debugging.py | 0e556337e3699fa7ccc4a48a6c38132b1035d9e2 | [
"MIT",
"LicenseRef-scancode-generic-cla"
] | permissive | bgoonz/UsefulResourceRepo2.0 | d87588ffd668bb498f7787b896cc7b20d83ce0ad | 2cb4b45dd14a230aa0e800042e893f8dfb23beda | refs/heads/master | 2023-03-17T01:22:05.254751 | 2022-08-11T03:18:22 | 2022-08-11T03:18:22 | 382,628,698 | 10 | 12 | MIT | 2022-10-10T14:13:54 | 2021-07-03T13:58:52 | null | UTF-8 | Python | false | false | 59 | py | print('Hello world')
print('It's a small world after all')
| [
"[email protected]"
] | |
40c900c79c7327d8f8160ca53984e624ccd1db22 | 06ee5a5d83466896bbfd1653206da0151d6aa81a | /apps/business/serializers/reason_serializer.py | 163498465bee80f27fd29bf7a66b1577347785ed | [] | no_license | fengjy96/rest_task | 201421a40ce42031223f61135d1d5e85809188e6 | db1d7c4eb2d5d229ab54c6d5775f96fc1843716e | refs/heads/master | 2020-07-22T19:48:19.940094 | 2019-09-02T13:40:11 | 2019-09-02T13:40:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 741 | py | from rest_framework import serializers
from business.models.reason import Reason
class ReasonsListSerializer(serializers.ModelSerializer):
"""
原因:增删改查
"""
sender = serializers.SerializerMethodField()
receiver = serializers.SerializerMethodField()
def get_sender(self, obj):
... | [
"[email protected]"
] | |
6ff1780b3c83117a2da2abf8d6d4dbed1e39d2c7 | 4727dc81850451f9bb0578bccb24731f10d0b225 | /file_cache/app.py | 4d0dc4fcc58c08d187aea3502dc97c0507962e9d | [
"MIT"
] | permissive | Chise1/file_cache | 27bac3b1e8116829f6f265d1466878cc060f01ca | 3fa3da64ffb414102c1db454fcb5abc59ac74162 | refs/heads/main | 2023-04-15T07:27:50.530564 | 2021-04-24T01:56:41 | 2021-04-24T01:56:41 | 359,651,364 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,007 | py | from fastapi import FastAPI, File, UploadFile
from pydantic import BaseModel
from file_cache import settings
try:
import asyncio
import uvloop
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
except:
pass
if settings.CACHE == "MEMORY":
from file_cache.memory_cache import default_file_path, g... | [
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.