blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
2
283
content_id
stringlengths
40
40
detected_licenses
listlengths
0
91
license_type
stringclasses
2 values
repo_name
stringlengths
3
135
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
68
visit_date
timestamp[ns]date
2015-07-25 20:53:29
2023-09-06 10:46:05
revision_date
timestamp[ns]date
1970-01-01 00:00:00
2037-05-03 13:00:00
committer_date
timestamp[ns]date
1970-01-01 00:00:00
2036-02-09 17:40:36
github_id
int64
1.61k
691M
⌀
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
24 values
gha_event_created_at
timestamp[ns]date
2012-06-03 10:21:33
2023-09-14 21:59:50
⌀
gha_created_at
timestamp[ns]date
2008-03-27 23:40:48
2023-09-13 22:40:33
⌀
gha_language
stringclasses
250 values
src_encoding
stringclasses
27 values
language
stringclasses
1 value
is_vendor
bool
2 classes
is_generated
bool
2 classes
length_bytes
int64
6
10M
extension
stringclasses
289 values
filename
stringlengths
1
218
content
stringlengths
6
10M
dd24af7ea97f0f1d990c48d6139ec74ee79ea444
7739aa9aff8ce3e613c2e1e945a5b5f633b1e785
/autogrow4/autogrow/docking/concatenate_files.py
78bcb526ad601736e2ca3364bcfc92e4da8384fe
[ "Apache-2.0" ]
permissive
tahornback/AutoGrow4Server
cee89381284a0a8cef77edc81627aae164eeee7d
bcdd52fde0aaa843806aa747d11c0a0b2ec97681
refs/heads/master
2023-01-16T05:12:10.061242
2020-11-23T21:53:47
2020-11-23T21:53:47
292,933,905
2
0
null
2020-10-28T20:11:49
2020-09-04T19:48:43
Python
UTF-8
Python
false
false
5,875
py
concatenate_files.py
""" This script compresses files which makes it easier to transfer data To decompress the files use the script in $PATH/autogrow4/accessory_scripts/file_concatenation_and_compression.py . """ import glob import gzip import os import shutil def compress_file(file_name): """ Compress the concatenated f...
16af73a98b3897a8426852f590b35334d107fb8c
a0ae6a0a2e2e960edc9977bc024c13a78890cb78
/350_Intersection_of_Two_Arrays_II.py
b98ec8328137cf9473ef412e77daa271a26c99d2
[]
no_license
ivy2350442/Leetcode_challenge
de93234fa2343090142b980dcdfba5405d52aed3
084a52dafefbd64846cfd5ff98be5508cda9d293
refs/heads/master
2020-03-22T06:55:56.909993
2018-09-19T11:56:06
2018-09-19T11:56:06
139,667,065
0
0
null
null
null
null
UTF-8
Python
false
false
525
py
350_Intersection_of_Two_Arrays_II.py
class Solution: def intersect(self, nums1, nums2): """ :type nums1: List[int] :type nums2: List[int] :rtype: List[int] """ inter = list(set(nums1) & set(nums2)) count1 = collections.Counter(nums1) count2 = collections.Counter(nums2) ...
2b767f86a08e77f6cd629c5e4bd4e10f90c4f682
61673ab9a42f7151de7337608c442fa6247f13bb
/tkinter/__canvas__/canvas-center-text-image/main.py
62231b6bcb8eba73a254dda52c652d8c28150163
[ "MIT" ]
permissive
furas/python-examples
22d101670ecd667a29376d7c7d7d86f8ec71f6cf
95cb53b664f312e0830f010c0c96be94d4a4db90
refs/heads/master
2022-08-23T23:55:08.313936
2022-08-01T14:48:33
2022-08-01T14:48:33
45,575,296
176
91
MIT
2021-02-17T23:33:37
2015-11-04T23:54:32
Python
UTF-8
Python
false
false
1,879
py
main.py
#!/usr/bin/env python3 # http://effbot.org/tkinterbook/canvas.htm # http://effbot.org/tkinterbook/photoimage.htm import tkinter as tk from PIL import Image, ImageTk # --- constants --- WIDTH = 400 HEIGHT = 300 # --- functions --- def on_click(): w = int(c['width']) h = int(c['height']) print('minimal ...
3ae451c1a33516b8b0d5c2bc76ec6c7fc3badfaa
2ded0551bbeb323159cea04285c45a31c43d19bb
/main.py
fe2d0f0f2217eae352cc9c08434268c4c44b79fb
[]
no_license
Mouad501/Grammar_Analyzer
fa6d1787e6807e8ef213b831629eaee4523a3459
bbfc5d30ce62e69b38c378a1c725742e649d9347
refs/heads/master
2023-08-29T12:38:28.423826
2021-10-30T16:31:51
2021-10-30T16:31:51
422,918,935
1
0
null
null
null
null
UTF-8
Python
false
false
2,328
py
main.py
# This is a sample Python script. # Press Maj+F10 to execute it or replace it with your code. Press Double # Shift to search everywhere for classes, files, tool windows, actions, # and settings. import sentencizer as s import SentenceStructure as struct import spacy # Press the green button in the gutter to run the s...
687a5bd4fca5788b1fc59e258655f59d085a7ab5
7a5c7352e5b5452a95f09d2b99a032d9e72738f4
/vision3d/engine/context_manager.py
33e8495dc31c6ef550fc78de2ed214c98e289d7b
[ "MIT" ]
permissive
qinzheng93/vision3d
978a97d2b98904cdb42aaea50887da8fde1b55df
29c1c02134c20a14337458d18826e4a6f80e844e
refs/heads/main
2023-05-12T18:12:08.224566
2023-05-08T14:11:01
2023-05-08T14:11:01
230,056,087
20
1
null
null
null
null
UTF-8
Python
false
false
1,888
py
context_manager.py
import os.path as osp import warnings import torch from torch import Tensor class ContextManager: def __init__(self): self._data_dict = {} self._scope = [] def register(self, name, value, retain_grad=True): name = osp.join(*self._scope, name) if isinstance(value, Tensor) and ...
4f9e352ca1efc86d802ec5e25738ccd874b3af7d
1ace9b7cbe4fd632410abe33a2a28f8fd97e0eb4
/driverpgm.py
41096534c9ad75603db0f4c0ca4a1a91d138b5c7
[]
no_license
sebinpoulose/ICD_Code_Identification
5e0e16fd67162ee823d2254ca2b06ef8be82c363
b27adfc86067124bd6c2f1dd777ef2165816988f
refs/heads/master
2020-04-27T20:24:36.027269
2019-03-24T04:57:52
2019-03-24T04:57:52
null
0
0
null
null
null
null
UTF-8
Python
false
false
335
py
driverpgm.py
from Extractor import Extractor import os datadir = './newdata/' inputfiles = os.listdir(datadir) for i in xrange(len(inputfiles)): inputfiles[i] = datadir+inputfiles[i] result = Extractor(inputfiles) ans = result.getalldiagnosis() print(ans) new = [] for i, j in ans.items(): new += j for i in new: ...
804d5faeb002598655caa4699e68cef3e8577eed
bd3805c139b6f2e7733612c524d84ec15106e38c
/面向对象/1545-三角形类.py
68f76b9ebe36ac031dcc3ae2ef8a9e746de33fbd
[]
no_license
hurttttr/MyPythonCode
fc0787cfb317f3dbff78488e119a00fce6c69f3d
339c4648da0265931abf567e91101cbd5ad3e72c
refs/heads/master
2023-09-04T08:59:40.781407
2021-10-12T15:26:55
2021-10-12T15:26:55
364,437,579
2
4
null
2021-05-05T02:47:15
2021-05-05T02:07:22
null
UTF-8
Python
false
false
995
py
1545-三角形类.py
class GeometricObject(): def __init__(self, scolor, sfilled): self.color = scolor self.filled = sfilled class Triangle(GeometricObject): def __init__(self, scolor, bfilled, side1=1.0, side2=1.0, side3=1.0): super().__init__(scolor, bfilled) self.side1 = side1 self.side2...
d6e19fa0945256c7694b1e5d85658748f485649b
02d5e3c6a43e1a281cb24ba1ebbbdd3330941a3d
/methods/adaptation/advent_loop.py
38846fcae5d1304c940476a279540e62a0438799
[]
no_license
Nico995/Self-Supervised-Adversarial-Domain-Adaptation-in-Sematic-Segmentation
81dedacf61edf7b345e1cbb8e057da9cdd3edc40
ab7b00f66122c2ca94fed33f7103e8f6d1849052
refs/heads/master
2023-06-22T21:45:55.001962
2021-07-15T09:54:13
2021-07-15T09:54:13
366,005,131
0
0
null
null
null
null
UTF-8
Python
false
false
7,407
py
advent_loop.py
import os import numpy as np import torch import tqdm from tensorboardX import SummaryWriter from utils import intersection_over_union from utils.utils import poly_lr_scheduler from .advent_training import advent_training from .advent_validation import advent_validation classes = ['Byc', 'Bld', 'Car', 'Pol', "Fnc", ...
d253284491c4c4a0d6154b408ab0310963ae39ee
1e9c9f2a9639db7cdb032aae69cb4d99aef1d3a5
/tutsPlus/gettingStartedwithPython/files/functions.py
197421947e0cf0ce148b74b7eee17fb9b6da3064
[ "MIT" ]
permissive
sagarnikam123/learnNPractice
f0da3f8acf653e56c591353ab342765a6831698c
1b3b0cb2cff2f478006626a4c37a99102acbb628
refs/heads/master
2023-02-04T11:21:18.211654
2023-01-24T14:47:52
2023-01-24T14:47:52
61,184,927
2
1
MIT
2022-03-06T11:07:18
2016-06-15T06:57:19
Python
UTF-8
Python
false
false
302
py
functions.py
#! /usr/bin/env python def dbLookup() : dict = {} dict['amazon'] = 100 dict['ebay'] = 120 dict['bestBuy'] = 34 return dict def shoppingCart(itemName, avgPrices): print 'item : ', itemName for price in avgPrices: print price, 'price: ', avgPrices[price] shoppingCart('computer',dbLookup())
5ca84b87750059c393910d043170d51251758057
4ef59da7002bcc9abc1a5d15a8ee9acadef5600f
/scripts/upload.py
335d3f05e09d481b254979bfe4df8408e0801688
[]
no_license
jadamsit/Meme-Creating-Site
bfb0fc15632110ef5f1a79566b31890cbac460d7
2c0a862e27f297bf60aeed7c13a7a4f861875760
refs/heads/master
2020-04-06T12:18:44.815367
2018-11-13T21:46:00
2018-11-13T21:46:00
157,450,609
0
0
null
null
null
null
UTF-8
Python
false
false
1,315
py
upload.py
#!/usr/bin/env python2 import MySQLdb import urllib import urllib2 from PIL import Image #not my class! Found online! class reg(object): def __init__(self, cursor, row): for (attr, val) in zip((d[0] for d in cursor.description), row) : setattr(self, attr, val) basewidth = 500 iss = "192.168.1...
9492449015147d3fabdbc40b98de64899c49041a
f724ace89e9e22de416bcc547b7d8f0e4f51f0ac
/apps/customer/urls.py
d6580ed7b46de3232ab3ba2f23a56982c80f66de
[]
no_license
Caesark1/minor_django_project
50b6cf0382a5877803ed80288f73d0396b9ac6c7
5e642843e65d8850496d1be7695de0a22b308efd
refs/heads/main
2023-03-12T14:13:12.311301
2021-03-01T17:29:12
2021-03-01T17:29:12
341,646,861
0
0
null
null
null
null
UTF-8
Python
false
false
210
py
urls.py
from django.urls import path from . import views urlpatterns = [ path('', views.ProfilePageView.as_view(), name='profile'), path('profile_update/', views.user_profile_update, name='profile_update') ]
e6a00557eeb5f3dff9f8450628276b49698cbccd
8105d532e96ee3a62376fd3b56c34fb984c51802
/SVM_RC_Infectious.py
e6bbeeb76d4e1ebb753ec8353979168ec8dead9f
[]
no_license
Robayet19/Classification-of-serum-samples-
2f758034c0de8b4d7b846686f5bef0c337e6be75
2f0644619a0fe9dad9c300e4a0d9840b8a9bb292
refs/heads/main
2023-08-23T16:45:32.123078
2021-09-16T21:39:35
2021-09-16T21:39:35
337,478,319
0
0
null
null
null
null
UTF-8
Python
false
false
6,821
py
SVM_RC_Infectious.py
from sklearn import svm from sklearn.metrics import roc_curve from sklearn.metrics import roc_auc_score import pandas as pd import numpy as np import matplotlib.pyplot as plt import random from scipy.stats import ttest_ind import time tic = time.time() # set up the parameters sample_trainfraction = 0.2 # pe...
b818ffdae57363d3a108e2a118867d1418a061dc
8d8282080792e229e8de5ade7ff393b2dc3d705f
/programacao/python/python_basico/scripts/tabuada.py
6d15b8206b09b6adfb2e69c545653117adff4508
[]
no_license
heavyrick/datascience
8896509234260e5bdd1441d0c5f7a3ce4e506de6
42a7c616499f51ad50a4d6585a279ae4aab02963
refs/heads/master
2023-05-12T04:02:56.927838
2022-10-27T22:37:30
2022-10-27T22:37:30
156,853,033
0
0
null
2023-05-02T00:15:19
2018-11-09T11:27:36
Jupyter Notebook
UTF-8
Python
false
false
330
py
tabuada.py
import time print('Tabuada') numero_digitado = input('Digite o número da tabuada que deseja calcular: ') print('Vamos calcular a tabuada do ' + numero_digitado + '\n') time.sleep(2) i = 0 while i < 11: total = int(numero_digitado) * i print('{} x {} = {}'.format(numero_digitado, i, total)) i += 1 pr...
df1b8eefd2389d1e2fc97dd60918953e21936bdb
3564e8f250a38bf851a8697383bb1d7e86b50369
/pwsocket.py
4dd63e7496de21e96f887fc5b5ffe012d5657578
[ "MIT" ]
permissive
ffjh520/pwsocket
efb6f601cfd01aedef2b56cd3a3217aa101cbba1
274e87aea7ac711e3afdf39bd8a8380c546c66fc
refs/heads/master
2023-08-13T19:29:11.910337
2018-12-04T11:43:55
2018-12-04T11:43:55
null
0
0
null
null
null
null
UTF-8
Python
false
false
6,382
py
pwsocket.py
##################### # PWSocket # Author: yzt # License: MIT ##################### import socket, hashlib, base64, struct class WebSocket(): class Error(Exception): def __str__(self): return '[Error]' + self.message class ConnectionFailureError(Error): def __init_...
daac30fa7cf20441f0fde418534e542ae1a602f3
ea8d64a5210c3d192b647360474996ebf4127b10
/HLMVModel.py
92f62a3ca7f190971382fb1e385687391aab3035
[]
no_license
jbzdarkid/3D-Models-automaton
01ee89a0a7db21d72e203ea9bc30f5a129ad2c2b
2e70c6dfc8ef08abd3f56333b230c919f3b47424
refs/heads/master
2022-10-16T13:52:59.383230
2022-10-01T08:04:52
2022-10-01T08:04:52
58,107,277
0
3
null
2017-11-02T01:15:21
2016-05-05T05:43:16
Python
UTF-8
Python
false
false
2,287
py
HLMVModel.py
from math import sin, cos, radians from subprocess import Popen, PIPE def mem(*params): """ Communicate with the C memory management utility via subprocess.Popen Takes in a series of arguments as parameters for mem.exe Returns parsed response, raises all exceptions """ params = ['mem.exe'] + [str(param) fo...
19a10c2e389db4f355920376bdce86c66d79c00e
4b9115c7d85b35aa0174a122a8b6516df2f0ff51
/config.py
979270cb0fc562944b86abcadf267200de5c6809
[]
no_license
kimyu92/flask-boilerplate
686b7e9b7b971f0bb800a331343069d643b4b95b
09148946b700f6f73cb2b12ce91465bffdbf2f34
refs/heads/master
2016-09-03T06:31:19.287686
2015-07-27T01:03:33
2015-07-27T01:03:33
38,630,905
0
0
null
null
null
null
UTF-8
Python
false
false
1,904
py
config.py
import os import jinja2 """ https://github.com/mitsuhiko/flask/wiki/Large-app-how-to 1. _basedir is a trick for you to get the folder where the script runs 2. DEBUG indicates that it is a dev environment, you'll get the very helpful error page from flask when an error occurs. 3. SECRET_KEY will be used to sign cooki...
b61e902eab7eefd664a429dfc443601e33039a30
d572121cb6e80a08172169be024d13ddda1bfcf9
/shop/migrations/0011_auto_20200207_0514.py
6ce0196acbde9e1c445f3f5b9eba9743b7ba2eb7
[]
no_license
adinai-omurbaeva/avc-handmade
e386f21117b18b0feaf0dc1ffc74e9cb6eee8d37
f6a837dca4a753b93c97c02e439d69c7fbb47c23
refs/heads/master
2020-12-30T03:02:14.647818
2020-02-19T06:15:28
2020-02-19T06:15:28
238,837,720
0
0
null
null
null
null
UTF-8
Python
false
false
906
py
0011_auto_20200207_0514.py
# Generated by Django 2.2.8 on 2020-02-07 05:14 from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('shop', '0010_delete_entry'), ] operations = [ ...
4d93db1329b90ec57c67fa002a46bc12244f663a
253940b6d55878493989faf1c8300dded7d44c44
/users/api/views.py
5a31f46cff4c460cd272415770a42b472eedfece
[]
no_license
waqasahmad115/foraws
df3efa6063acacbeacb567a70975c95755d035a8
172e119b1492aa0f50f837d062ca2a8a30416168
refs/heads/master
2022-12-10T23:16:06.012715
2019-12-10T17:52:16
2019-12-10T17:52:16
227,146,720
2
0
null
2022-12-08T07:00:19
2019-12-10T14:53:25
Python
UTF-8
Python
false
false
1,249
py
views.py
from rest_framework.generics import CreateAPIView from django.db.models import Q from django.contrib.auth import get_user_model from rest_framework.response import Response from rest_framework.status import HTTP_200_OK,HTTP_400_BAD_REQUEST from rest_framework.views import APIView from .serializers import SecurityPerso...
f1e6748a0efe1c156093e43c420f7c16862573db
8aa1b94626402c0c614128d6061edb771dad05cf
/stu02/999test_user.py
5b48e67c1eaea2db5b122eaee9ffccbb00699acd
[]
no_license
netfj/Project_Stu02
31e76c1b656ee74c54cae2185821dec7ccf50401
afc1b26b7c586fd6979ab574c7d357a6b9ef4d29
refs/heads/master
2023-03-13T22:24:40.364167
2021-02-23T09:53:31
2021-02-23T09:53:31
341,506,093
0
0
null
null
null
null
UTF-8
Python
false
false
98
py
999test_user.py
a=[(1,2,3),('a','b','c')] print(a) print(a[0]) print(a[1][1]) for n in range(1,10): print(n)
d249d130b163c4b22125277b12cef7c6475f9531
6db85bdf5724f1f5d6835d61807ee9817a3a7070
/Plus_One.py
2237efc004077174b75f402e0cde6573ceb86145
[]
no_license
dandan224/String
825552346bb7ac667c40f4d1b939a4a256b719e8
64a35ba9b89d67d5282cda4ce322322dbfd54c97
refs/heads/master
2020-07-03T19:00:35.878797
2019-08-14T04:45:37
2019-08-14T04:45:37
202,015,515
0
0
null
null
null
null
UTF-8
Python
false
false
742
py
Plus_One.py
class Solution(object): def plus(self, digits): """ input: int[] digits return: int[] """ # write your solution here if not digits: return if len(digits) == 0: digits[0] = 1 return digits carry = 0 if digits[len(digits) - 1] + 1 >= 10: digits[len(digits) - 1...
a17ee9f753f0e9284365c3169dd2c7d0dfe9ef57
73c49f252bdf9ee9c07f5351b2f0ff58158999e6
/basic/recursive_fibonacci_number.py
05cf871d58c10867b15a9774b0a1e8f700b7f60a
[]
no_license
anandaug30/Python_Code_Snippet
f00b79b1847d5031d7b1f90a290cb39bce8495be
436a38d0d9631beb02cd57329f9fa3e7fac18496
refs/heads/master
2020-09-24T18:21:45.069576
2019-12-27T10:56:46
2019-12-27T10:56:46
225,815,728
0
0
null
null
null
null
UTF-8
Python
false
false
1,818
py
recursive_fibonacci_number.py
from functools import lru_cache def recursive_fibonacci_number(n): """" basic Fibonacci number function""" if n == 1 or n == 2: return 1 elif n > 2: return recursive_fibonacci_number(n - 1) + recursive_fibonacci_number(n - 2) fibonacci_cache = {} def recursive_fibonacci_number_cache(n)...
8ea6897911848edccf9678db4e64a6a268c42c7f
07dbecefe57979de517bd4a6ff74af9b089edab0
/Python/Exceptions Handling.py
383998aa932b1e542941b778c216f19fa8ef1d85
[]
no_license
jigglypuff27/MSI
d8a99892a56192110f42f97f434ee52306332e8c
1fca3326d291db00408fcb361ef059d5e43a6daf
refs/heads/main
2023-05-10T00:37:06.732686
2021-06-15T11:47:07
2021-06-15T11:47:07
377,127,208
0
0
null
null
null
null
UTF-8
Python
false
false
570
py
Exceptions Handling.py
#Exceptions Handling import sys def main(): try: print('hi') x=15/0 x=int(y) #except ZeroDivisionError: #print("dont divide by zero") except: print(f"unkwnoun error {sys.exc_info()[1]}") else: print('good job') def func1(): ...
3768d6705664e4cad52f6a18a517a984697cb5b2
87c3dc063386af70299cc9ec9e7351f1a6d3405b
/project/calc/views.py
f5b9b85788748707439c84a7a590e5e760a5a748
[ "Apache-2.0" ]
permissive
MiguelAngulo9/X-Serv-15.4-Django-calc
33afbf04af7aba3196c3d871d7eea2fea1f4fb5d
8ad82fba5127d34ad6e623fbd7694d41783fc397
refs/heads/master
2020-05-29T11:01:53.813486
2016-03-22T11:58:19
2016-03-22T11:58:19
54,470,522
0
0
null
2016-03-22T11:42:30
2016-03-22T11:42:30
null
UTF-8
Python
false
false
785
py
views.py
from django.shortcuts import render from django.http import HttpResponse # Create your views here. def suma(request, numero1, numero2): resultado = int(numero1) + int(numero2) return HttpResponse('El resultado es ' + str(resultado)) def resta(request, numero1, numero2): resultado = int(numero1) - int(num...
5951434cdb7a3fd5d5a0dfd4cf5e8ffe7471eef7
26793449658e36f5f826551123cb0b01f211aec9
/bioweb_api/apis/snp_search/SnpFunction.py
5ead3e4c5c223541dcac4f2d20f29c7721543498
[]
no_license
dicara/flask-app
71845ad639a6b29499443307c96d9482cf4d2743
64a79b4dcb2d835e7656d9eba32862fbb61e9431
refs/heads/master
2020-03-18T00:21:42.936333
2017-09-15T12:56:36
2017-09-15T12:56:36
134,090,083
0
0
null
null
null
null
UTF-8
Python
false
false
3,077
py
SnpFunction.py
""" Copyright 2014 Bio-Rad Laboratories, Inc. 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 agreed to in writi...
6552cbf31c75b3f6f8a38e312ab24d678f02dac3
d5595c199880e5789a3a18de8643594ff9067122
/mysite/graph/migrations/0003_auto_20160420_1948.py
0b3b3a4eba136aa64c17ef2f98688f577bcd61c0
[]
no_license
flame/blisview
33da7f002b478e33a7910494cc441be60b51309b
7b3e609b339046714c95302aaf268cc1bb4281b7
refs/heads/master
2023-08-03T01:43:45.741217
2016-05-06T18:32:25
2016-05-06T18:32:25
58,078,626
1
2
null
null
null
null
UTF-8
Python
false
false
672
py
0003_auto_20160420_1948.py
# -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2016-04-20 19:48 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('graph', '0002_auto_20160418_2048'), ] operations = [ migrations.RenameField(...
0f6b9a99c4c98287a594ccb255f9553ca574ed2b
5c600fd35558be3de7bf349200eec026314afde3
/src/models/timer.py
58bdc0ae4e1b17f027fdd8077df7dc646111a39e
[]
no_license
wold23/autoAnswer
a102fdc593862c1a543c98d5fc975c8c289a8bae
de397c65f30ca18076793e7cdc90999aa096da71
refs/heads/master
2022-03-14T10:34:46.199682
2022-02-20T15:23:56
2022-02-20T15:23:56
119,913,158
0
0
null
2018-02-09T01:07:44
2018-02-02T01:05:48
Python
UTF-8
Python
false
false
956
py
timer.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ #Author: smilesmith #Date: 2018-01-25 #Desc: 计时器类 """ import time class Timer(object): """定时器,定时执行指定的函数 """ def __init__(self, start, interval=0): """ @start, int, 延迟执行的秒数 @interval, int, 每次执行的间隔秒数 """ s...
818fd2309e723c9e95659ee822300b5022616fb8
54305135fc59c9eb27d905f54bc05e46646b68f1
/test/test_game_match.py
274d148795aae18f349b2c41b183e89c59a5fa8e
[]
no_license
sjournea/golf
bce7f4bf7a905a8579afeef75f867ae47e9980da
fc8632ab08195fe5f441e8a5773c966d2d35756b
refs/heads/master
2021-06-01T17:49:29.574963
2020-05-03T22:22:56
2020-05-03T22:22:56
83,992,552
0
0
null
2020-03-17T23:37:47
2017-03-05T18:30:21
Python
UTF-8
Python
false
false
3,177
py
test_game_match.py
import datetime from golf_db.round import GolfRound from golf_db.player import GolfPlayer from golf_db.course import GolfCourse from golf_db.db import GolfDBAdmin # from golf_db.game import GolfGame, SkinsGame, NetGame from golf_db.game_match import MatchGame # from golf_db.game_factory import GolfGameFactory # from...
62536c694786908b7f26b9cc92979229ea98dda4
7c2dc28a3054aadcd977f919837de17a9d0ccff7
/comics/migrations/0003_comicseries_last_update.py
85d6a8c418732a87225aec884524c4a7556c4256
[]
no_license
njaugodfrey/nako-comics
208f3b2144ceef04b9e6dbae0ca4412797bf2160
5f79335f844ced90aaa34ec89f14a895c6470798
refs/heads/master
2023-07-28T17:14:45.643803
2021-09-10T15:22:31
2021-09-10T15:22:31
384,695,885
0
0
null
null
null
null
UTF-8
Python
false
false
506
py
0003_comicseries_last_update.py
# Generated by Django 3.2.5 on 2021-08-03 12:08 import datetime from django.db import migrations, models from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('comics', '0002_auto_20210730_1726'), ] operations = [ migrations.AddField( ...
b2a57fddc8a440696c4548efda58520d058aa69c
49b04052cf67d1292194d3f9dd82c48624bd6065
/send_command.py
75414435d4a91154f80946a5dfe33429a1abc8f9
[ "CC0-1.0" ]
permissive
Leberwurscht/vivosmart
b5c9be70369aa805363453c0ef4d7d6d758f55f3
3bafaba041193417160e956277c9021548296fc0
refs/heads/master
2021-06-01T13:44:24.862304
2020-09-15T08:15:09
2020-09-15T08:15:09
91,027,420
10
1
null
null
null
null
UTF-8
Python
false
false
691
py
send_command.py
#!/usr/bin/env python from __future__ import print_function import sys, usb.core, binascii dev = usb.core.find(idVendor=0x091e, idProduct=0x0003) if dev is None: sys.exit("No Garmin found in the system"); try: if dev.is_kernel_driver_active(0) is True: dev.detach_kernel_driver(0) except usb.core.USBError as e: ...
9aaa9a8d8a65b88b62bf3fa5434dcec236e8e910
5623743fba13a9bbf23df7f9606ffc5ed8f633d1
/pytrade_stocktracker.py
e501f201af7bfd7409e463f67cdf39756bfe0e15
[]
no_license
TMo484/pytrader
5a720dd4b0484934ece1f428d9548c02fd7f7ca0
06118e8e958c8ec298e0698a087b995acf2fc47f
refs/heads/master
2020-03-19T05:43:37.685752
2018-06-04T01:48:08
2018-06-04T01:48:08
135,956,935
0
0
null
null
null
null
UTF-8
Python
false
false
1,790
py
pytrade_stocktracker.py
import pytrade_stockanalysis as sa import pytrade_robinhood as rh import pandas as pd import csv ## build an empty dataframe to store stock analysis data df_columns = ['Last Price', 'Price with Returns', 'Expected Price', 'Recommended Position', 'Stock Owned', 'Stock Price Slope', 'Percent around Expected', 'Vol...
049302b8d0b3c0d5e6780a574c96c2a9014953ca
58e1c39639da886694805ba7b4d11794d0c1e18d
/Homework/Week_1/scraper/tvscraper.py
7e9a045577a7aa12a34bd04e113fe5c8ca8955d0
[]
no_license
Amerens8/Dataprocessing
d5f44bf7c085bd8ae126a6a7fbbf626b55b4fc3e
9385aec8b9f9ea813fad0ee5ab0608b40f139224
refs/heads/master
2020-03-09T11:10:58.681700
2018-05-24T20:25:41
2018-05-24T20:25:41
128,755,265
0
0
null
null
null
null
UTF-8
Python
false
false
4,692
py
tvscraper.py
#!/usr/bin/env python # Name: Amerens Jongsma # Student number: 10735666 # sources: BeautifulSoup documentation and "Web Scraping with Python and BeautifulSoup" # https://www.dataquest.io/blog/web-scraping-beautifulsoup/ """ This script scrapes IMDB and outputs a CSV file with highest rated tv series. """ import csv i...
42518ab0cd44511c7bffea50876e3547b327c404
a42bdffc7c69cfbc7e43a57b1c839228cbfcefc4
/BACKEND/Models.py
6955d6ea31da81903e25d1ac80672e306d48d34c
[]
no_license
KristianB2020/Aplikacija_za_predikciju
26cf01c64fd185741e9804d3c17cea1570bd49c4
7b3eccb24dcc20fabf8905288711badcddcce1f0
refs/heads/master
2022-12-21T14:08:00.710821
2020-09-28T19:51:44
2020-09-28T19:51:44
294,936,727
0
0
null
null
null
null
UTF-8
Python
false
false
7,442
py
Models.py
# models.py from pony.orm import Database, PrimaryKey, Required, Set, db_session, Optional from uuid import uuid4 as gid, UUID import datetime as dt import os db = Database() db.bind(provider='postgres', user='Kris', password='bbforlife', host='localhost', database='Mlprojekt') class User(db.Entity): id = Pri...
3a3479a091f436e99ec93d7cde1aade7190e8f67
f9ff9a5fa4160b6c9bb1bb462a907b7db08ae7bb
/tools/migrations/0003_auto_20200220_1841.py
e0b0bc7d2d4e16bb7212f6d37f055d26c19009f1
[]
no_license
TheLukeRussell/7-4-hey-neighbor
b5633ab11d9f8cb579483b3a15817f4fa99b8d5d
844167714223cb6d6a73bf486bcb472391801329
refs/heads/master
2022-12-06T06:39:56.955971
2020-02-22T18:12:32
2020-02-22T18:12:32
241,920,897
0
0
null
2022-11-22T05:20:40
2020-02-20T15:35:42
Python
UTF-8
Python
false
false
1,478
py
0003_auto_20200220_1841.py
# Generated by Django 3.0.3 on 2020-02-20 18:41 import datetime from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('tools', ...
27bda53a740a3d89d90eb6d68069460186e082fa
7518928a9857046f37c96951855d9bf1f41a19f3
/Python/fakeClass.py
e132fca0071c37d6d4db2586231988167e39dfda
[]
no_license
xmonkee/Shards
02f4106123d2ccd321156b0d86fda50289d1817f
13f3a353e70f48f90b669c22b4f3af5ab0f39c0b
refs/heads/master
2021-01-18T14:06:08.428836
2015-03-19T03:13:02
2015-03-19T03:13:02
30,336,967
0
0
null
null
null
null
UTF-8
Python
false
false
427
py
fakeClass.py
def Account(balance): def call(): return call.balance call.balance = balance def increase(amount): call.balance += amount call.lastamount = amount return call.balance def call.last(): return call.lastamount def increase_and_print(amount): increase(amou...
402ab9e36f77ab82c4d4588a65fc433c72310263
ca7aa979e7059467e158830b76673f5b77a0f5a3
/Python_codes/p02835/s286317070.py
e85d96ad29b5d6153f5dacced067bd5838174c52
[]
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
93
py
s286317070.py
a = sum(list(map(int, input().split()))) if a >+ 21: print('bust') else: print('win')
46ee9ce617f7baae0dc8ed4b6dc67aa27d7fee01
e1e732d5b71ba890fd8b3338253cf379038ed855
/twtbot.py
b78b4e14a268b726f49cc302ba70f63af3c7bfd9
[]
no_license
SwansonRoss/tweetbot
3b53b7f388629806dd6ce10f24b177a5b124b9e7
a5cb8412e91eb71172d8073eee3901a30d5895e0
refs/heads/master
2020-04-26T15:20:22.314392
2019-03-03T23:53:59
2019-03-03T23:53:59
173,644,120
0
0
null
null
null
null
UTF-8
Python
false
false
1,074
py
twtbot.py
# Some helper code for scrape, parse, and tweet.py # v 0.0 - Ross Swanson - 3/03/19 def dedupe(arr): dedupeArr = { each['tweet'] : each for each in arr}.values() return dedupeArr def dedupeScrapes(arr): dedupeArr = { each['url'] : each for each in arr}.values() return dedupeArr def findDayBefore(i, ...
e3ab9ddb6143bf97ff88523602c9cfce04ef3d19
f0e36c160c2235bbcbc848e0374d573c2ac92866
/optional_personal_lms/portal/migrations/0005_auto_20200919_1650.py
04678c20bbfc6b2316b3d7cb60e01248a3244877
[]
no_license
RiksEddy/HackMIT-EduCast-4Idiots
4128bac308c908137d6ac017be33478f07f98eca
bcc62bf2c79c5260941510f782c681af0221fb41
refs/heads/master
2022-12-17T17:15:50.035957
2020-09-20T17:31:25
2020-09-20T17:31:25
295,752,991
0
0
null
null
null
null
UTF-8
Python
false
false
874
py
0005_auto_20200919_1650.py
# Generated by Django 3.1 on 2020-09-19 16:50 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('portal', '0004_auto_202009...
11eb777270662f020e0677824d2e81bc21e2f78a
1abb669180af409765d1fc8f34c5ce44c3ff1015
/gameChallenge/gameViewer/urls.py
d6ed9a80a7fe598a9359fc7925e8f166c604cd78
[]
no_license
ngkenn/gameviewer
464f9c0d48948867201de35af9a616b3c9dba2ce
92fe38010a9bf01b6c9979a3c23e22c8da532c36
refs/heads/master
2021-09-25T10:38:51.519116
2019-12-16T06:46:41
2019-12-16T06:46:41
227,478,460
0
0
null
2021-09-22T18:07:05
2019-12-11T23:17:37
Python
UTF-8
Python
false
false
359
py
urls.py
from django.urls import path from django.conf.urls.static import static from . import views from django.conf import settings from django.conf.urls import url urlpatterns = [ path('', views.index, name='index'), url(r'^add_game/$', views.addGame, name='add_game'), url(r'^game/(?P<game_name_slug>[\w\-]+)/$'...
b85fd371e3b6542c7a49a1bbd55c0e50e10c3112
c49ba441a2f4fc94e54358a7436b9c12d538279a
/agent/src/agent/pipeline/config/stages/source/rrd.py
43e24520de9d744d6358a88a6d1e9795a1fe05c5
[ "Apache-2.0" ]
permissive
anodot/daria
86523a9f699577c8cf61120e2c27589a4ade48bb
4aa800e26b585a8582ec2e088384a474148d114d
refs/heads/master
2023-07-20T11:36:58.353251
2023-07-17T17:33:57
2023-07-17T17:33:57
224,878,130
16
6
Apache-2.0
2023-07-12T13:07:25
2019-11-29T15:23:32
Python
UTF-8
Python
false
false
1,011
py
rrd.py
from agent.pipeline.config.stages.base import JythonDataExtractorSource class RRD(JythonDataExtractorSource): JYTHON_SCRIPT = 'rrd.py' DATA_EXTRACTOR_API_ENDPOINT = 'data_extractor/rrd' def _get_script_params(self) -> list[dict]: return [ { 'key': 'RRD_SOURCE_URL', ...
3f91e1f92a52d196ac2432a54b788ad36fbf8b65
5cebd4beacf3b4ba864ff04ff25e35fc8d92ffb3
/cars/forms.py
fe2b15b7de0c8ea9b081023bd66ceace40bdd716
[]
no_license
ANAND-NANDU/django-basics
cce06c860971cbc777b314192a753bf0a3a30d42
97257a1e90d62c9c8b84238d83eff40cabd0e98d
refs/heads/main
2023-06-29T09:51:28.734192
2021-07-28T04:09:00
2021-07-28T04:09:00
389,971,570
0
0
null
null
null
null
UTF-8
Python
false
false
274
py
forms.py
from django import forms from .models import cars class carForm(forms.Form): name=forms.CharField(label="name",max_length=100) company=forms.CharField(label="company",max_length=100) class carModelForm(forms.ModelForm): class Meta: model=cars fields = "__all__"
4edf90a99cc70f600fb6d291654df6ca21d6ceec
fad144fea8c9404741b8e514ff31fe484a9663b5
/class_inheritance.py
6e3f5e317d996f63ec16ccd593e1fb62f13b8c35
[]
no_license
adarsh2804/python_practice_codes
739e7308d47484c22a5218aeadda0fed25c54e80
c008deb19d70c661a84ded38c7df19f4d6771410
refs/heads/master
2023-03-12T23:12:36.182235
2021-03-01T13:17:43
2021-03-01T13:17:43
343,419,921
0
0
null
null
null
null
UTF-8
Python
false
false
1,102
py
class_inheritance.py
class Parent: # parent/super class def feature1(self): print("Feature 1 working") def feature2(self): print("Feature 2 working") class Child(Parent): # child/sub class inherited from parent class def feature3(self): print("Feature 3 wo...
4c208fd5282b81d62de3cd7ac8fcd3f13139fd78
02adeee0e6b0457fa3dc171a96d7dae9558d8047
/pocket-learning-algorithm-and-feature-engineering/perceptron_classifier.py
dfa58c902dc0c0650e6f4c250e83e5c5601e0e16
[ "Apache-2.0" ]
permissive
pfvaldez/blog-post
7d19456ad03984e4729f19bb075efdcf10ca18d3
ab159bb44ed57e73c7467197f7adec6e30b4dbc0
refs/heads/master
2020-04-04T13:12:07.636645
2018-02-13T04:03:36
2018-02-13T04:03:36
null
0
0
null
null
null
null
UTF-8
Python
false
false
3,139
py
perceptron_classifier.py
import numpy as np class PerceptronClassifier: '''Preceptron Binary Classifier uses Perceptron Learning Algorithm to classify two classes data. Parameters ---------- number_of_attributes: int The number of attributes of the data set. class_labels: tuple of the class labels ...
48caffcb20724b97f6fab6ecd55f53443a8c2cef
cabcd8f61a38f3a37679f7e37e46bf7c91aa42c4
/HOSPITAL_MANAGEMENT_SYSTEM/HR/models.py
d502db9a237573ce469d0c8fc3c6148cfeac636a
[]
no_license
rakshithkumarmr/HOSPITL-MANAGEMENT-SYSTE-
b9a6093383fbc7de2df0bfb294b247af3f07a670
9ff1c9edd87f601f7a53d17cd7483453a89d3885
refs/heads/master
2022-08-06T05:54:12.573446
2020-05-25T11:43:58
2020-05-25T11:43:58
266,410,620
0
0
null
null
null
null
UTF-8
Python
false
false
364
py
models.py
from django.db import models from Patient.models import PatientModel class OutstandingModel(models.Model): date =models.DateField(auto_now_add=True) patient_name =models.ForeignKey(PatientModel,on_delete=models.CASCADE) paid = models.DecimalField(max_digits=10,decimal_places=2) outstanding = models.D...
e8fb6cb412d038bb516dbe0e8a9a2bc370fb9894
1df0ecdf3757a56d2c8eb6e07493d2924bcb9269
/superannotate/input_converters/converters/vgg_converters/vgg_strategies.py
5db02b510d72b2ac1958ae1ab35ecb3aa946aecd
[ "MIT" ]
permissive
dlmelendez/superannotate-python-sdk
b41e8627710ff7651ba6d13e06b899d00301fa41
09c8a3bf494fe9a6d3c6578f44c30f94153bbace
refs/heads/master
2023-01-23T23:42:02.472807
2020-11-26T14:00:26
2020-11-26T14:00:26
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,419
py
vgg_strategies.py
import json from .vgg_converter import VGGConverter from .vgg_to_sa_vector import vgg_object_detection_to_sa_vector, vgg_instance_segmentation_to_sa_vector, vgg_to_sa class VGGObjectDetectionStrategy(VGGConverter): name = "ObjectDetection converter" def __init__(self, args): super().__init__(args) ...
b3e21d221d9f90205256dfa1dc017f732a11d91b
9a432edbcd95b0098e0579214c38a9435bf8e0f6
/collatzNumber.py
c7ff5cd99ab7c6ef51994c4f68cc745c0888f378
[ "MIT" ]
permissive
wesliang/automate-python-side-projects
f9d721b46812258c4b2f087f033dbb37f455edc5
2c979a1746391488ab0de07c586e7f3fdaf2e991
refs/heads/master
2021-05-31T19:13:13.119622
2016-01-25T12:32:40
2016-01-25T12:32:40
null
0
0
null
null
null
null
UTF-8
Python
false
false
838
py
collatzNumber.py
# collatzNum.py - Finds the collatz number of any number # The program seeks to return 1 from any integer by either dividing # or multiplying it by 3 and adding 1 to it until it can divide to 1. import sys def collatzFind(number): if number == 1: # breaks recursion if collatz found sys.exit() elif nu...
2edcea6bc56b153d7d50c9ca595938ce43154b87
9fe368284427ef9d3a5652b61deb5737e0afe62e
/MusicDownloader/MusicSource/kuwo.py
4765c658d69132d163bd862676d572c07ef5acf1
[]
no_license
JackieCooo/MusicDownloader
10c4d12ee3bcea246aa11b68896be84f1b0bc26e
f006f0ebcfe74d6ef5cd3b3161a361ba2f074c3a
refs/heads/master
2022-11-18T21:18:26.972990
2020-07-20T13:24:31
2020-07-20T13:24:31
258,165,223
0
0
null
null
null
null
UTF-8
Python
false
false
5,393
py
kuwo.py
import requests from InfoInsert import SongInfoInsert class KuwoMusic(object): # 酷我音乐主程序 ''' 版本:1.0 ''' def __init__(self): self.headers = { 'user-agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36', '...
1530ce3c2b61ed114783de2794aaf68a440f6cdd
8f38d4a61d040323e67153052b5cb4bbbbcdac9b
/base/management/commands/init_accounts.py
0023f932794114e8dc076894e1e2554ebd60cc9a
[]
no_license
jy02383505/portal
4af29431f8466ba5be46d3f150354c2b14e37e6b
a6902af1265f9059137c369be009c49c7afdde45
refs/heads/master
2022-12-23T18:50:52.368771
2020-01-03T04:55:45
2020-01-03T04:55:45
231,514,705
0
0
null
2022-12-08T05:25:17
2020-01-03T04:55:17
JavaScript
UTF-8
Python
false
false
27,344
py
init_accounts.py
# -*- coding:utf-8 -*- """ 初始化项目权限系统 """ import os import shutil from django.conf import settings from django.contrib.auth.models import Group from django.core.management.base import BaseCommand from base.models import * def init_group(): """ 创建资源云平台初始化角色 供应商: supplier 管理员: admin 客户...
5bf02e7c42cac9acaf620f7a1dfcf779fd9d880a
0785833a52073d5f54b84513a2afeb04009fb421
/example.py
744ba3d00aa43e44ccea06e900627513103cfcb9
[]
no_license
zhang1998/intelnovel
9d143f4dfa81ff8fd28224511c94048bb7cccf6b
300351cc3008e758e154e99e39eef42d45d8c5d0
refs/heads/master
2020-04-08T15:14:44.483783
2019-07-13T13:41:34
2019-07-13T13:41:34
159,471,095
0
0
null
null
null
null
UTF-8
Python
false
false
2,792
py
example.py
# -*-coding:utf-8-*- _author_ = 'jianliu' #引入所需要的包 import jieba import pandas as pd import numpy as np from scipy.misc import imread from wordcloud import WordCloud,ImageColorGenerator import matplotlib.pyplot as plt # plt 用于显示图片 #定义文件路径 dir = "/Users/jianliu/Downloads/chat1/wordcloud/" #定义语料文件路径 file = "".join([dir,"z...
a1896caa78b37eb26945d0d3c024657bc7c0e974
798ddc879ba16bde549b1cb7d2b459337bd2d771
/Firefly/automation/routine_old.py
de65e4809eee8b4d61496ae3ec5a3324b2062abf
[ "Apache-2.0" ]
permissive
Firefly-Automation/Firefly
64002a8acbd22c3c0551a6009d0080a254fc437f
fccf40b8f6e015ef34c292264184090eb8d860b7
refs/heads/firefly3
2018-12-10T05:09:25.352708
2018-09-12T06:38:11
2018-09-12T06:38:11
51,870,369
21
5
Apache-2.0
2018-01-24T04:07:03
2016-02-16T21:08:54
Python
UTF-8
Python
false
false
1,858
py
routine_old.py
from Firefly import logging from Firefly.automation import Automation from Firefly.helpers.events import Command from Firefly.const import SERVICE_NOTIFICATION, COMMAND_NOTIFY, AUTHOR TITLE = 'Firefly Routines' COMMANDS = ['add_action', 'execute'] def Setup(firefly, package, **kwargs): logging.message('Entering %s...
1cab548782a6bd3cb6694521c0d63c5ed443a5ba
f900e970ebc4048cc3e32941c9c719fe3166c835
/Skolekoding/introduksjon/3_1variabler.py
521cfbc29ac7a90f5ce938b3b121919b6cd6b894
[]
no_license
Skolekode/Introduksjon
0ad755e0e110b3ae0ea5406bf996883b18278104
93964f7f2c99612dad28a3a8e526a9b65968b15f
refs/heads/main
2023-03-05T18:31:42.470571
2021-02-17T13:20:06
2021-02-17T13:20:06
337,350,686
0
0
null
null
null
null
UTF-8
Python
false
false
416
py
3_1variabler.py
""" Vi har sett at variabler er noe vi lagrer verdier i. Verdiene kan både bare tall, tekststrenger og andre datatyper. Vi kan også endre verdien til eksisterende variabler. Før du kjører programmet, hvilken verdi har variabelen navn i utprinten? Kan vi bruke tegning for å se for oss endringene som skjer? navn = "To...
475f7d2e4ab4f0c67768639be2c43f784017645e
405082652f56c4837007eb0eaeff9250b0b12cdb
/kevin/leet/add_two_numbers.py
1ccf7f1b26eb3b6b81a46417049ac15a52d885fb
[ "MIT", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
kalyons11/kevin
1398c666ec70bfd460d2507f8ef10a649bb2da2a
4e222fcd8ee7f2a275390f532c2fa5fef39060e8
refs/heads/main
2021-07-20T18:12:05.914762
2021-07-06T18:22:08
2021-07-06T18:22:08
99,180,621
1
0
MIT
2019-12-20T21:59:48
2017-08-03T02:17:38
Python
UTF-8
Python
false
false
1,148
py
add_two_numbers.py
""" https://leetcode.com/problems/add-two-numbers/description/ """ class ListNode: def __init__(self, val=0, next=None): self.val = val self.next = next class Solution: def add_two_numbers(self, l1: ListNode, l2: ListNode, carry: int = 0) \ -> ListNode: # idea: ...
e55166948f752dcae9b12a00615b6102bf53b2dd
e14de9ecba830a991c872b7113f012a6a24bcd5f
/python/ds_set.py
ef6dec81bd983908f05c4efcec938006e84c5cb3
[]
no_license
mattcraig/datasploration
21dfc4f6f3caaddc5435d7cbeb2cb66522037336
6f8d5d81863f6b4d2239d63e8537609a92d1fca3
refs/heads/master
2020-04-25T23:27:30.303354
2012-07-17T02:22:17
2012-07-17T02:22:17
null
0
0
null
null
null
null
UTF-8
Python
false
false
2,885
py
ds_set.py
class DSSet : def __init__(self, items = []): self.set_data = {} for item in items : self.add(item) def add(self, item) : set_item = self._get_key(item) self.set_data[set_item] = item def remove(self, item) : set_item = self._get_key(item) if s...
f7acce50d3db56bb0fa5cb57a12c58eac1e1164a
9613c9bb75b65a76b14856f6b8a8604101d5abce
/mqtt-connector/setup.py
b4087df0b4c5bf6b03498029048d5d0e9aa6cfbe
[]
no_license
CristinaStaicu/AstroPlant-BackEnd
f9d6bfa61c95bb552cc09239f2efaf5bb7a84655
feee40f5516072dee56071a08047793299fb8866
refs/heads/master
2022-11-06T12:27:44.207998
2020-06-26T10:53:53
2020-06-26T10:59:09
null
0
0
null
null
null
null
UTF-8
Python
false
false
843
py
setup.py
#!/usr/bin/env python from astroplant_mqtt_connector import __version__ try: from setuptools import setup except ImportError: from distutils.core import setup setup( name="astroplant-mqtt-connector", version=__version__, description="AstroPlant MQTT Connector", author="Thomas Churchman", ...
ee6be4aa6795864960856c1619d8bbdaad348669
0bf3119e0722f3c9488220f4df6b2b091466a200
/Arrays/Hotel Bookings Possible.py
05784318420aa0639a4bd25c5239fb875f03eeed
[]
no_license
RANJEET16520/InterviewBit
94013e88975a66c24ad4dc9d2e039ff0b823ca9d
7b93b559c75150c9c6d4cdb789bf76c870667eda
refs/heads/master
2022-12-20T10:09:59.387893
2020-09-24T06:26:16
2020-09-24T06:26:16
261,094,845
0
0
null
null
null
null
UTF-8
Python
false
false
552
py
Hotel Bookings Possible.py
# https://www.interviewbit.com/problems/hotel-bookings-possible/ def Bookings(arrive, depart, K): store = [] for i in range(len(arrive)): store.append((arrive[i],1)) store.append((depart[i],0)) store.sort() cur_book, max_book = 0, 0 for i in range(len(store)): if store[i][1]==1: cur_book...
b24f350dc1ac575ad37362d8ec1bc4335173bf1f
e4bd32ce4f91b9e8905a8983082f5d18038e4bed
/test/test_image_reconstruction.py
5a7bfd3f9b616602e839cdb797d4435b215c3a77
[ "MIT" ]
permissive
computational-imaging/DepthFromDefocusWithLearnedOptics
5bc0cac2377b2987e048a9ea1d982329bb5fa9d9
c3cf3fb46f2151e67236a294f8b19ba2269a47ca
refs/heads/main
2023-05-25T15:27:22.204475
2021-06-10T11:09:15
2021-06-10T11:09:15
353,502,152
39
10
null
null
null
null
UTF-8
Python
false
false
3,388
py
test_image_reconstruction.py
import itertools import numpy as np import pytest import torch from numpy.testing import assert_almost_equal from solvers import image_reconstruction from util import complex torch.manual_seed(0) def test_compute_regularized_normal_inv(): K = 5 beta = 1.5 compvec = torch.rand((K, 2)) compeye = comp...
3f72d32f1bc4e5314b2d71c5bc6bca7bb19c34c8
0a87905a1442c8c9f4e904232763bc5abffb5770
/utils/fscripts/test_att.py
66ff426926bbd23c8b76478305ef9934d8791b2b
[]
no_license
gijsdelange/utils
f60107ba00af9e1197817b38576b59722b4201b5
b363da4d7967566dedbf6b4bd450765be93c3c07
refs/heads/master
2020-03-06T16:55:53.003419
2018-11-14T17:32:33
2018-11-14T17:32:33
126,980,290
0
0
null
null
null
null
UTF-8
Python
false
false
771
py
test_att.py
import qt import matplotlib.pyplot as plt import numpy as np from time import time VATT = qt.instruments['VATT'] HM = qt.instruments['HM'] ATS = qt.instruments['ATS'] def set_att_and_probe(att): VATT.set_attenuation(att) if att >80: ATS.set_ch1_range(1) elif 50<att<=80: ATS.set_ch1_rang...
884138024f99057c04f6ce42f9494bdba4d1c1d0
00b5538720aa3f21b9cb01a1036c3cdfb39092ea
/core/views.py
c72f26435bdcc9566ba02854aa6378f480974d35
[]
no_license
gillesvtsilvano/site_proxy
10a46d566e0df85ce3c683e827af54c45e65184a
65d1919f03c3e1b6218c3015ba7833000ac7c1bb
refs/heads/master
2020-05-17T16:32:46.738191
2019-05-18T01:54:06
2019-05-18T01:54:06
183,822,447
0
0
null
null
null
null
UTF-8
Python
false
false
334
py
views.py
from django.shortcuts import render from django.http import HttpResponseRedirect from django.contrib.auth.decorators import login_required from django.views import generic @login_required def site(request): profile = request.user.profile return HttpResponseRedirect(profile.site) class SignUp(generic.CreateVi...
62ad9111d8d5125d16306de140e346d20fa7a811
0481385cbce461b0d15796d1a8e28b0d7ec6d145
/about_us/admin.py
fbbaf20caf1b5f870d2a3b7837f8b333fbae79ba
[]
no_license
marklit/heroku-django-example
2930b2c5de7467efe9792e8493535aa4ec78a92c
9f01e54ee0522214997fda4fd2399becea29f375
refs/heads/master
2021-01-21T04:55:46.160542
2012-05-14T19:10:09
2012-05-14T19:10:09
4,306,083
2
3
null
null
null
null
UTF-8
Python
false
false
310
py
admin.py
from about_us.models import Person, Role from django.contrib import admin class PersonAdmin(admin.ModelAdmin): list_display = ['first_name', 'last_name'] list_filter = ('first_name',) search_fields = ['first_name', 'last_name'] admin.site.register(Person, PersonAdmin) admin.site.register(Role)
c5279225508681a5c560df6114e4d7a4faaffc6f
52ccb4d0d11f0bdc24f953b385466f5c3e0662c5
/practice/dline.py
e3d6f89db29f44a333de39ecdb0dca04d072a2b8
[]
no_license
Himanshu-srihsk/COMPUTER_GRAPHICS_LAB
d224a68e92cc24aee02fb54160a1b0117b99cbec
0a383f73fa25aa85df062cc40c48fcad38452912
refs/heads/master
2020-12-03T07:20:23.646829
2020-01-01T18:12:51
2020-01-01T18:12:51
231,240,511
0
0
null
null
null
null
UTF-8
Python
false
false
4,144
py
dline.py
# not working for input line[[20,20],[250,180]], sq region [[50,50],[200,200]] from OpenGL.GL import * from OpenGL.GLU import * from OpenGL.GLUT import * import sys from time import * import time INSIDE = 0 #0000 LEFT = 1 #0001 RIGHT = 2 #0010 BOTTOM = 4 #0100 TOP = 8 #1000 global tx,ty,t1x,t1y def ROUND(a...
5837a69b21d85764777035f455878b5ff883e04b
0b02b0b249d85f9fd12c77c8dc583eac5dbb42d3
/Python_Basic/16.Decorator.py
3d72484c3e452f95d4652be6d2b4f6b0330c665c
[]
no_license
Nihooo/Python
b3deb63fbed58469cbb066a7a7c7369c52645ffe
fb46ac40b165ed6c0f198829a55dde550457569a
refs/heads/master
2020-03-27T17:27:26.550477
2018-09-13T07:28:45
2018-09-13T07:28:45
146,852,735
0
0
null
null
null
null
UTF-8
Python
false
false
5,886
py
16.Decorator.py
# 装饰器:本质就是函数,为其他函数 # 原则:1.不修改被修饰函数的源代码 # 2.不修改被修饰函数的调用方法添加附加功能 # 装饰器 = 高阶函数 + 函数嵌套 + 闭包 # 高阶函数:1.函数接收的参数是一个函数名 或 # 2.函数的返回值是一个函数名 # 不修改foo的源代码 # 不修改foo的调用方式 本来通过foo()去运行,现在通过timer(foo)来调用了 # 单独的高阶函数无法实现计算一个函数运行时间的功能 ''' import time def foo(): time.sleep(2) print('from foo') # 多运行了一次foo...
02fa5589b1789ef51fe12bc9d6303570830fa955
a15f1e9d685d7e8ff5621144f67bad22ac3fd5c7
/auftrag_model.py
b64174c4237ed6f17f4e85acc7ed5b2cb2821ec9
[ "Apache-2.0" ]
permissive
Stepan080888/df
7edf80c37ad24fea1a917447866fa7d57307f6fd
3b24a801cd578cf2620a494e3c144774e146cc94
refs/heads/master
2020-12-04T02:53:53.408517
2020-01-04T15:18:11
2020-01-04T15:18:11
231,580,195
0
0
null
null
null
null
UTF-8
Python
false
false
77
py
auftrag_model.py
class Auftrag: def __init__(self, domain): self.domain = domain
d953c7a031ea4ac5db621e192150a1ec516f8de7
806fc1e626dd102cee6677958528cf210ef4a2b3
/train/readpkl.py
1d55948cea7886f336a8f503a1effcfbeb0a9fc6
[]
no_license
samimideksa/EyeOpenDetection
86818e3562ed1714854c7d70525d763a519dc3a8
33d3a62feb940ccbab4fa14b36bd95ac957070ef
refs/heads/master
2020-03-15T10:49:06.338447
2018-06-11T13:37:10
2018-06-11T13:37:10
132,107,583
0
0
null
2018-05-04T07:52:18
2018-05-04T07:52:18
null
UTF-8
Python
false
false
204
py
readpkl.py
import pickle as pkl import pandas as pd if __name__ == '__main__': pkl.HIGHEST_PROTOCOL = 2 df = pd.read_pickle(r"/home/samuel/dataset/eye-closed/dataset_B_FacialImages/train.pkl") print(df)
6802fc6def8971db61bfbbc069247fa100eabaa8
a0ad739c8323a577fc59cf9918a57040f06bd359
/time_converter.py
285090bf2c99f3246a478f9cb6624f259d04e0a0
[]
no_license
oscarjeff920/The-Solar-System
e8e0f222f196ad5f63d49f258cef463e65e5dafd
3b1e0d08a9feb196191004681a0e9a82a4ae3f6b
refs/heads/main
2023-04-20T08:55:00.255524
2021-05-10T17:45:33
2021-05-10T17:45:33
366,124,893
1
0
null
null
null
null
UTF-8
Python
false
false
1,694
py
time_converter.py
def time_converter(seconds, **to_seconds): """time converter function either converts seconds into larger denominations or it calculates how many seconds in a specified number of years, months, millenia... etc""" denominations = dict(universe_age = 4.34548152e+17, earth_age = 1.749...
2ec005c32dc3cf8a77ec26043094360d41fcfd4a
0a6eeb90a12570be8790c7eff904c4a57cabf5e4
/tagger/test_tag/__init__.py
968e2b292988cd88e704bf9df018d91d60034d0c
[]
no_license
johnlimed/pos_tagger
9e7aef18f17e1d72779614b2ac18eeb37b1e78ae
a7d722830c64497da82113f9bd4bb1e088d489fe
refs/heads/master
2020-04-30T07:45:03.584054
2016-10-13T02:37:38
2016-10-13T02:37:38
68,630,168
0
0
null
null
null
null
UTF-8
Python
false
false
3,179
py
__init__.py
import math import pprint import tagger.utils as utils FILE_DIR = "tagger" COUNT_PREV_TAG_V_TAG = "count_prev_tag_v_tag" COUNT_TAG = "count_total_tag" COUNT_T_V_W = "count_t_v_w" COUNT_W_V_T = "count_w_v_t" PROB_PREV_TAG_V_TAG = "prob_tag_v_prev_tag" PROB_W_V_T = "prob_w_v_t" SPECIAL_START = "<S>" SPECIAL_END = "/<S>"...
8b2103096409c290fd5bd1298039aaf6d48bcc8f
aad0df25a6b2048cdde7e7b1c21a700993a3ae4a
/appEntry.py
5f8499755a947e54ae6c5b6c4ee23bd9d42aab8a
[]
no_license
sleepyfurious/fluid_simulation
76fba9ad3c3d462bd327785a1cbd07216171c113
0d3e9dce4469eaeeb74a1f2ebe737dade63c82b1
refs/heads/master
2020-07-10T07:52:43.213626
2019-05-31T14:05:27
2019-05-31T14:05:27
204,209,345
0
0
null
null
null
null
UTF-8
Python
false
false
6,998
py
appEntry.py
import sys from PyQt5.QtCore import QUrl, QPoint, QObject from PyQt5.QtGui import QGuiApplication, QSurfaceFormat, QVector3D, QMatrix4x4 from PyQt5.QtQml import QQmlApplicationEngine from OpenGL.GL import * from looptimer import LoopTimer import qquickitem_glfbo as ...
4f2948d554ae5e487682b4bfb5ae2477958035f8
747febe786dd6b7fd6c63cfe73dbe3023354daa8
/src/tt_data_protector/tt_data_protector/plugins/internal.py
8d1eee827a1e69f85663690550d821c9348174ef
[ "BSD-3-Clause" ]
permissive
the-tale/the-tale
4e4b8d91dc873a5fb935fe58e9721a877baa6d3f
e8450bd2332344da805b1851e728da5a3e5bf0ef
refs/heads/develop
2023-08-01T13:53:46.835667
2022-12-25T18:04:56
2022-12-25T18:04:56
1,949,167
98
52
BSD-3-Clause
2023-02-15T18:57:33
2011-06-24T18:49:48
Python
UTF-8
Python
false
false
4,346
py
internal.py
import copy import aiohttp from tt_protocol.protocol import data_protector_pb2 from tt_web import log from tt_web import s11n from .. import relations class Plugin: __slots__ = ('report_url', 'deletion_url', 'secret') def __init__(self, report_url, deletion_url, secret): self.report_url = report_...
fa31bff30429c860fc7628072cb3978ab486c104
29e7d27ec93b4114bddfb33723f43595f2d8187a
/Test_Proj/Testing/test.py
2f763bc31f1b26c5575629226cf9a17313631d30
[]
no_license
bharathstomail/MyWork_Bench
2c2f937ab66a9c4c6a499e8495868e0328e29abb
907304ed8cea83bc173bdb665fb3896ea20b8f27
refs/heads/master
2020-03-27T02:51:55.042245
2018-08-23T10:55:24
2018-08-23T10:55:24
145,822,875
0
0
null
null
null
null
UTF-8
Python
false
false
206
py
test.py
''' Created on Aug 23, 2018 @author: HSBHARA ''' class MyClass(object): ''' classdocs ''' def __init__(self, params): ''' Constructor '''
7b015db97d09766aea310f9df54e26be4b0745f2
076e619396598cfe74f531f7b1f43ad89ca86e37
/wav/generate sine tone with numpy.py
9c8582e258d12686bd069814a0fd497fdead87f5
[]
no_license
angelfaraldo/pythangel
15cdbaafcbc5664c9f60ec0c022e799cdfa58096
6952f5058c92a6e76d3feedb2db886c4c1edf112
refs/heads/master
2023-03-07T02:35:37.849302
2023-02-27T18:50:08
2023-02-27T18:50:08
32,524,386
1
0
null
null
null
null
UTF-8
Python
false
false
689
py
generate sine tone with numpy.py
import numpy as np import time import sounddevice as sd from scipy.io.wavfile import write # samples per second sps = 48000 # sine wave parameters freq_hz = 440.0 duration_s = 5.0 # NumPy processing t_samples = np.arange(duration_s * sps) waveform = np.sin(2 * np.pi * t_samples * freq_hz / sps) waveform_quiet = wave...
e30972200f68026f58a4e3e0e8c4c803de0736c3
d65cb684d344ab072d0f9801afbd074768a059a2
/Dynamic programming/地下城游戏L174.py
16b30935c8f6aaca4f52b7f9c07e7a2b2f8efd51
[]
no_license
QiuHongHao123/Algorithm-Practise
a918debd002182010b78e284df038c01d9921619
e7a7b7537edbbb8fa35c2dddf2b122cf863e479d
refs/heads/master
2023-03-14T09:16:28.407137
2021-03-01T11:57:54
2021-03-01T11:57:54
272,642,085
0
0
null
null
null
null
UTF-8
Python
false
false
1,631
py
地下城游戏L174.py
from typing import List class Solution: """ 一些恶魔抓住了公主(P)并将她关在了地下城的右下角。地下城是由 M x N 个房间组成的二维网格。我们英勇的骑士(K)最初被安置在左上角的房间里 ,他必须穿过地下城并通过对抗恶魔来拯救公主。 骑士的初始健康点数为一个正整数。如果他的健康点数在某一时刻降至 0 或以下,他会立即死亡。 有些房间由恶魔守卫,因此骑士在进入这些房间时会失去健康点数(若房间里的值为负整数,则表示骑士将损失健康点数); 其他房间要么是空的(房间里的值为 0),要么包含增加骑士健康点数的魔法球(若房间里的值为正整数,则表示骑士将...
2a54f5725b96b41935bd1bbccd10bff43ae2cbd5
e72c9e619629f1b29066bd05f76232895fb3586e
/srcGetskl/ngramProbTest.py
f8d6b3ec0c14e49ca64a78a60abfa5da37430c08
[]
no_license
sarveshsparab/FrED
b671e356b71b143396c0bc7e98544eb5b3c065a4
87dd75a576e8270085d182cf78baaa7ccab84357
refs/heads/master
2020-04-25T20:34:20.152512
2018-11-12T13:24:39
2018-11-12T13:24:39
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,450
py
ngramProbTest.py
#! /usr/bin/env python #coding=utf-8 import urllib import urllib2 import os import re import time import sys ## main print "Program starts at time:" + str(time.asctime()) #"are_dunes_on_saturn's_-kidscantravel" #saturn #finished_wants_to #finished #gramStr = "estes_punto_de_besarla_nombre" gramStr ...
be673319a1091831e74da8b017c901aa064cbc54
dcfba9fa0012bc267146774f1cb249e70457367a
/medx/migrations/0009_diabetes_name.py
868e503861a031240c8a3d27bc3a314dcf47ad28
[]
no_license
ag602/medstartup
0ce4d68f4af8337c6ec223c62aae4497ce8f4e29
76c95d9bec5b3811c0607f44dddb8ae45d9d6ef7
refs/heads/master
2021-06-23T04:20:28.083129
2020-02-22T09:43:40
2020-02-22T09:43:40
226,587,306
0
1
null
2021-06-10T22:22:30
2019-12-07T23:04:51
Python
UTF-8
Python
false
false
421
py
0009_diabetes_name.py
# Generated by Django 2.1.7 on 2020-01-22 07:06 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('medx', '0008_remove_diabetes_slug'), ] operations = [ migrations.AddField( model_name='diabetes', name='name', ...
6f96ed29b6f7fa433d8cf1d8ade49f430e722e45
cdbcb7fe84f5d794ac1f58203a4d4024e30270dc
/Lista_de_Exercício_06/ex010.py
9d9e3cec33c9c64b5fdc7ddc3a2031f7b860cc3c
[]
no_license
AdriandersonLira/APE
13c8bbb9c698d546a3a4dc19501f1b865aa9844d
b96df3817645aa6807c8f30772dbd4dfdd7e8806
refs/heads/master
2021-07-23T06:21:36.707886
2020-06-14T01:47:39
2020-06-14T01:47:39
182,209,398
1
1
null
null
null
null
UTF-8
Python
false
false
441
py
ex010.py
ponto_A = 0 ponto_B = 0 while True: if ( ponto_A >= 21 and ponto_A - ponto_B >= 2 ) or ( ponto_B >= 21 and ponto_B - ponto_A >= 2 ): break saber = input('Qual equipe fez ponto ( A / B )? ').upper() if saber == 'A': ponto_A += 1 elif saber == 'B': ponto_B += 1 print(f'Equipe A {pont...
f09cf0b8101fbffec3df11dc3ba89fedee11005c
73a4a91cfc4db3976266d779e859556a69a8aa73
/The_2nd_week_in_Oct_2017/if_.py
609306c439062aa12872a2734061c73ebb1fe8d4
[]
no_license
fujunguo/learning_python
fe51977dd58ee55264305696f0d5ba31ce4b82ab
8e29210e8b25f80ac08b99535385f02a6f1ff2c8
refs/heads/master
2021-07-09T12:41:06.698406
2019-06-12T05:52:04
2019-06-12T05:52:04
101,965,637
0
0
null
null
null
null
UTF-8
Python
false
false
442
py
if_.py
number=23 guess=int(input('Enter an integer:')) if guess==number: #新块在这里开始 print('Congratulations,you guessed it.') print('(but you do not win any prizes!)') #新块在这里结束 elif guess<number: #另一代码块 print('No,it is a little higher than that') #你可以在此处做任何你希望在该代码块内进行的事情 else: print('No,it is a l...
6f99dced5a4b2e17ecdd67695f60b0d33182c644
48e01fdd0219c70064d4f3a051a099ed451d90c6
/venv/Experiment/control_modes/keyboard_control_mode.py
ea7d2b5490142cf6bd9dec66e1296e7f2fca22f2
[]
no_license
ehudb9/cyberBall
9a7dbbb474a1b7f5b94149e7a7d758451b393d53
60ba8af906221e387b59d5101390d8c0e3840c4e
refs/heads/main
2023-02-13T07:38:13.482799
2021-01-10T19:47:15
2021-01-10T19:47:15
328,463,521
0
0
null
null
null
null
UTF-8
Python
false
false
1,116
py
keyboard_control_mode.py
from venv.Experiment.arm_movement_control import ArmMotorControl from venv.Experiment.constants import * from pynput import keyboard class KeyboardControlMode: def __init__(self): self.arm = ArmMotorControl() self.arm.set_moving_speed(MOTOR_NAME, 120) self.arm.set_acceleration(MOTOR_NAME, ...
a4fb8a25ecfc45d1df923ce7cf85879d12886d17
5d02a83c3ef92e1cf850c07d0dec1da5061d6f93
/purchase_log/models.py
258ddd8bb78b03e3ca0782bf99d3a5a11895c114
[]
no_license
jcarvin/grocery_helper
175951ffbca7dc97a3c35d8798ec288a609c4ba8
8a9caa28b49ebf96935edf310f2b86994e763fb9
refs/heads/master
2021-06-11T16:43:32.133760
2017-01-27T13:08:38
2017-01-27T13:08:38
68,408,283
1
0
null
null
null
null
UTF-8
Python
false
false
2,637
py
models.py
from django.db import models from django.contrib.auth.models import User from django.utils import timezone class Store(models.Model): name = models.CharField(max_length=250) owner = models.ForeignKey(User) def __str__(self): return self.name class Product(models.Model): type = models.CharF...
0827aee1eda7c4fbc4a0bed57681e8d30eb1a717
a54b2e587763e1ef80572f89086ba85f9616e8d9
/day10/save_file.py
a0115bc65824b70a318165b5798bcaad1f29e73c
[]
no_license
Linkin-1995/test_code2
66848a5c00f747a911929d9a0fe2e869e1d50555
fae7a7fb36583acbe4a592736acd88823506d548
refs/heads/master
2022-12-05T03:08:48.386272
2020-08-21T10:42:55
2020-08-21T10:42:55
null
0
0
null
null
null
null
UTF-8
Python
false
false
982
py
save_file.py
""" 存储文件 1. 将文件已二进制方式读取出来 2. 将该数据存储在 blob 类型字段中 """ import pymysql # 连接数据库 (连接本机可以不写host和port) db = pymysql.connect(host = "localhost", port = 3306, user = "root", password = "123456", database = "stu", charset = ...
0ec0dbac95386d79b44698f34887745404934c6e
ef4bd152c448cc4304e292bfbe38c08f0e9ed685
/tests/unittests/wrappers/test_bootstrapping.py
7d38d5728ac712a10a5cddca2e1ea18644cc1521
[ "Apache-2.0", "LicenseRef-scancode-proprietary-license" ]
permissive
Lightning-AI/torchmetrics
05aef74af7a167bdbf0f6f605454656a4031e26a
66f1859c5fefffcb37de4f430a6fbf71fb6c8c6b
refs/heads/master
2023-08-31T20:50:41.184700
2023-08-31T16:17:12
2023-08-31T16:17:12
323,721,661
295
59
Apache-2.0
2023-09-14T14:58:53
2020-12-22T20:02:42
Python
UTF-8
Python
false
false
5,079
py
test_bootstrapping.py
# Copyright The Lightning team. # # 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 agreed to in writin...
63e2fded153deffdc3614e0fd497ef95cd16d3ba
c8b39acfd4a857dc15ed3375e0d93e75fa3f1f64
/Engine/Extras/ThirdPartyNotUE/emsdk/emscripten/1.37.19/tools/autodediffer.py
68ecf821c3f7cd851f53eb71a112e9a09bfc64da
[ "MIT", "LicenseRef-scancode-proprietary-license", "NCSA", "BSD-3-Clause", "LicenseRef-scancode-other-permissive", "LicenseRef-scancode-mit-nagy", "LicenseRef-scancode-public-domain", "BSD-2-Clause" ]
permissive
windystrife/UnrealEngine_NVIDIAGameWorks
c3c7863083653caf1bc67d3ef104fb4b9f302e2a
b50e6338a7c5b26374d66306ebc7807541ff815e
refs/heads/4.18-GameWorks
2023-03-11T02:50:08.471040
2022-01-13T20:50:29
2022-01-13T20:50:29
124,100,479
262
179
MIT
2022-12-16T05:36:38
2018-03-06T15:44:09
C++
UTF-8
Python
false
false
1,249
py
autodediffer.py
''' A semi-smart diff for autodebugger logs. Run it with filenames of two autodebugger logs as parameters ''' import os, sys def process_line(line): #AD:2041,0.900000 if not line.startswith('AD:'): return line = line.split(':')[1] num, val = line.split(',') return [int(num), float(val)] a = open(sys.argv...
917079b0b6911a190218fe87b460bdad442cdcef
637d2b471ab26a683cf67b259c58d2f9318a1bf2
/McUtils/Parallelizers/__init__.py
d55d40b52527a2afa6ffc1247f9d842ce4f940df
[ "MIT" ]
permissive
McCoyGroup/McUtils
9c1c3befcef88d6094961e23a894efb4d97c84b1
c7c3910e7cb5105c65b01ecb17a6668d126b2063
refs/heads/master
2023-08-18T16:24:17.718849
2023-08-11T23:10:21
2023-08-11T23:10:21
188,920,933
0
2
MIT
2022-12-15T19:17:02
2019-05-27T23:29:24
Python
UTF-8
Python
false
false
1,036
py
__init__.py
""" Provides utilities for setting up platform-independent parallelism in a hopefully unobtrusive way. This is used more extensively in `Psience`, but the design is to unify the MPI and `multiprocessing` APIs so that one can simply pass in a `Parallelizer` object to a function and obtain parallelism over as many proce...
dcf0547c7aba66bc11f2bc0b54f0e2e2f6ea92c9
5b87b5f5e214d1eb14ebb8fcf74abb813f29700a
/0403_Frog_Jump.py
7005f4164bcd0af210decc0a7c1c309706ed40a9
[]
no_license
cankutergen/leetcode
8be7681c336b49cea61dbaa88f673b1bcdb11d1d
0112d9682621bd43dc36532b09306bd3f5bd336e
refs/heads/main
2023-04-25T00:56:47.676965
2021-05-07T08:01:06
2021-05-07T08:01:06
357,075,021
0
0
null
null
null
null
UTF-8
Python
false
false
692
py
0403_Frog_Jump.py
class Solution: def canCross(self, stones) -> bool: if stones is None or len(stones) == 0: return False memo = {} return self.dp(stones, 1, 1, stones[-1], memo) def dp(self, stones, position, k, target, memo): if position == target: return True ...
2bbb58bdd4b6828c24c54545baf80a5312e7d830
9dce460002a827f0cab9c93dd05e513a5d67a3c3
/reset-demo.py
20dd231ec79cac513a8a2863ffeb6623ddc36fa1
[]
no_license
rickseeger/ripple
541b449d7255d349ba6e8f64ebdbc3d4265866df
39435cfc9ababfda16c9fa694a456e47d4a8d532
refs/heads/master
2020-05-25T01:01:28.501671
2017-03-14T15:06:55
2017-03-14T15:06:55
84,895,241
0
0
null
null
null
null
UTF-8
Python
false
false
1,110
py
reset-demo.py
#!/usr/bin/env python # artificially set last known ledger index to a recent value import sys from common import db, fetch, logger, pluralize # required parameter: how many ledgers behind we should be delta = None try: delta = int(sys.argv[1]) except: sys.stderr.write('usage: {} delta\n'.format(sys.argv[0...
6128e6af98863b822b4abc0d2c53a17a66f2f8c2
a25885497027568649cbe8fc34ead804d6e4f3d4
/src/main.py
8937223c55976399163877ab406c672921ecf66c
[]
no_license
shruti-bt/fish-classification
663e476806c9fd37b7e9d9a222d55ec24110bf4e
0d556c26c0c61394513c0f4e38f2d61a3fda0ec0
refs/heads/master
2023-04-18T13:29:57.476553
2021-05-06T11:13:03
2021-05-06T11:13:03
364,847,753
2
0
null
null
null
null
UTF-8
Python
false
false
3,710
py
main.py
import os import random random.seed(99) import cv2 import argparse import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' from pathlib import Path import tensorflow as tf from tensorflow.keras import metrics from tensorflow.keras.optimizers...
e7c511e44e4e6a7c84617bc28f92ee329638a211
4ff06639c80c83a59d04cc1b55b8075ec7b01a53
/OOP/fighter.py
dd5d89f4a7abd051c0310a21281cb416bb6df901
[]
no_license
DanTeegan/python
7fd2e3df27b79d49316f3815bebaf3db7df031a3
05fc7c1ad466f6cc49101089882e0099d9fff55c
refs/heads/master
2022-12-09T21:38:50.233768
2020-07-28T18:35:20
2020-07-28T18:35:20
282,689,448
0
0
null
null
null
null
UTF-8
Python
false
false
448
py
fighter.py
class Fighter: def __init__(self, fname, lname, age, wins, losses): self.fname = fname self.lname = lname self.age = age self.wins = wins self.losses = losses def full_name(self): print(self.fname + " " + self.lname) f1 = Fighter("Jon", "Jones", 32, 20, 1) f2 ...
db23c7c9742c34897e32a81e991991eb24e065fc
6d0e41dd43eb2cf5ffd637c2c5dd7e30e90009df
/playground.py
c69680ee967880c2df53b054052f3644714e18b9
[]
no_license
Aster1222/CS-1111-Game-Project
df13ff1f5f63bca0d10fee43951373d0cf627e75
a92548816edbb41def86e7f539f113752921a87f
refs/heads/master
2020-07-02T11:58:54.504727
2016-12-01T04:33:31
2016-12-01T04:33:31
74,305,343
0
1
null
2016-11-28T19:09:29
2016-11-20T22:00:41
Python
UTF-8
Python
false
false
276
py
playground.py
#score_record = open('scoreboard.txt', 'w') score_rec_disp = open('scoreboard.txt', 'r') line1 = score_rec_disp.readline().split(',') for scores in range(len(line1)): line1[scores] = int(line1[scores]) line1 = sorted(line1) print(line1) score_rec_disp.close()
0ce72380c4cf7f8ec5d0702b22f5df6e60f39595
e64ec24eed5f1c82017b2a4fbb5827b57e84977a
/talentmap_api/common/filters.py
22ffd00dc5524e5819d0eb65a775db07eff61867
[ "LicenseRef-scancode-public-domain", "CC0-1.0" ]
permissive
MetaPhase-Consulting/State-TalentMAP-API
b7b07f36a20357fd8fb65b7c9adad4947509baf2
95735dfb3960e219fbb11337d8b8e9bac7a451a4
refs/heads/dev
2023-08-19T02:50:12.414838
2023-08-16T12:49:47
2023-08-16T12:49:47
153,376,898
8
1
NOASSERTION
2023-09-14T04:06:12
2018-10-17T01:22:57
Python
UTF-8
Python
false
false
7,987
py
filters.py
from django.db.models import Q from django.db.models.constants import LOOKUP_SEP from django.db.models.functions import Lower from django.contrib.postgres.search import SearchVector from django.core.exceptions import FieldDoesNotExist from rest_framework_filters.backends import RestFrameworkFilterBackend from rest_fra...
2f509762b8a48f6e6a24fb571141bd3085e9524e
16c5c4e18b0e60010432738626ffb88de7ebfdd6
/checkout/views.py
06ebb2dd4d14c57cc0b2f48be21d1b01cc74e5fc
[]
no_license
Code-Institute-Submissions/XRYO
8fd72532e375e57f1053133b5a4b5cb577be108f
4050197141da358f6f4ff2208a3214e57d9e1feb
refs/heads/master
2023-04-27T18:09:20.016343
2021-04-30T07:14:43
2021-04-30T07:14:43
null
0
0
null
null
null
null
UTF-8
Python
false
false
8,898
py
views.py
from django.shortcuts import ( render, redirect, reverse, get_object_or_404, HttpResponse ) from django.views.decorators.http import require_POST from django.contrib import messages from django.conf import settings from .forms import OrderForm from .models import Order, OrderItem from products.models import Produ...
3f65592c74ee20ad101a7c973412330cdbce2716
c3ff71a15caca5915f1ed6fc721c189545340349
/17_5.py
5a15f9033eb8d708a74d78f0c84a19c489edf28e
[]
no_license
kai-ton/foxford_gorskaya57
6e03d2c33e5abda46cc5a1aaee14a9e5d5bd7ece
f0322ca780b1d468d54699d998d1d83c20ebe00e
refs/heads/master
2023-07-13T11:12:33.354405
2021-08-21T12:26:34
2021-08-21T12:26:34
371,505,073
0
0
null
null
null
null
UTF-8
Python
false
false
242
py
17_5.py
def f(a): if len(a) == 1: return a[0] if len(a) == 2: if a[1] == 0: return a[0] return f([a[1], a[0] % a[1]]) return f([a[0], f(a[1::])]) int(input()) print(f(list(map(int, input().split()))))
36b725ec59503194c1909aa8866b3b4c26bbf708
8e378526090ebb46d373b5683fa45dd577de7a31
/src/zords/tests.py
9e10a3ccb3883ac6507259f33878123af9affc81
[ "MIT" ]
permissive
Joe-Thompson/power-rangers-api
633a4dac65911871bc6aa21da25280f4ce2972ae
13ce639a7f5e9d4b106ce5f094c076db0aad398e
refs/heads/master
2020-08-29T02:42:30.208042
2017-03-01T18:24:06
2017-03-01T18:24:06
null
0
0
null
null
null
null
UTF-8
Python
false
false
970
py
tests.py
from django.test import TestCase from zords import constants from zords.models import Zord class ZordTestCase(TestCase): fixtures = ['zords.json'] def test_zord(self): zord = Zord.objects.get(pk=18) self.assertIsInstance(zord, Zord) self.assertEqual(zord.name, 'Unicorn Thunderzord') ...
12c60f5ae394f343056619738299f0d2a68e9bbb
6aa4b4bc8619657ac35159e0e1932fa697cc9425
/力扣/Mysort.py
3b7dd8cfe6096c0a3b5260bea69da8b97fcb3667
[]
no_license
userzz15/-
901f4e7b9c406e09ee624b4e0235601e1e483243
4f7d446801f173053a10b316cb7a42e51ab0b7d7
refs/heads/main
2023-02-05T15:23:16.497782
2020-12-21T16:30:32
2020-12-21T16:30:32
317,557,892
0
0
null
null
null
null
UTF-8
Python
false
false
2,774
py
Mysort.py
import random def bubble_sort(arr, size): """冒泡排序""" for i in range(size - 1): for j in range(size - 1 - i): if arr[j] > arr[j + 1]: arr[j], arr[j + 1] = arr[j + 1], arr[j] def select_sort(arr, size): """选择排序""" for i in range(size - 1): temp = i f...
c5b1a17787642055f4f9af8ee6c828bfe796fd5d
4c1d81b1d8d525ebed52b552c13c33eb71b71e02
/softDevelopement/timeTable_prolog/knowledge_base_gen.py
067af60c5366216a10dbb152fcd9554c188556d1
[]
no_license
zaeemyousaf/zaeem
41d109ec9d419f2705e7c318cd1b791bc2d904b7
6fa3740ebd8f3f2897176272908b9e64d5e27942
refs/heads/master
2023-09-01T19:15:19.831538
2023-08-11T03:07:28
2023-08-11T03:07:28
89,089,491
2
2
null
2020-03-16T05:11:14
2017-04-22T18:06:41
Python
UTF-8
Python
false
false
21
py
knowledge_base_gen.py
# read userData file
ba6f8766f217a7b501c73c3f6d25558731cefc5e
d189349db46d02afff2439505809c27c22a11f06
/jobs/models.py
5725c6c1cf91123bbcde319f7a7493fa2f41cece
[]
no_license
nuriddin2468/Freelance_pro
3fa8576f393b24ff5f46d0eb06504174172d28a7
cea55d180bed2ee2ff6a469854f3724ffdfa1578
refs/heads/master
2022-03-24T04:58:32.242174
2019-11-07T11:15:38
2019-11-07T11:15:38
208,807,936
0
0
null
null
null
null
UTF-8
Python
false
false
2,540
py
models.py
from django.db import models from django.contrib.auth.models import User import uuid from accounts.models import EmployerModel # Create your models here. class SkillsModel(models.Model): name = models.CharField(unique=True, max_length=120) def __str__(self): return self.name class JobsModel(models....
84e28c18275fd594fcd50b6cc28185f7f4081d3c
099be7cce2213485eb708f3e91ea67e8b7935fdf
/Ron Hadri/DataProcMap.py
4b72454da253a789b615f8cfdef103d5f412a916
[]
no_license
blakethompson82/ECEN403-404-CTSDD
0aa8fb047bca52b8d6efc281ecf5e04f928a6440
f52efc986dcfc46b8ea43befda1b3d105b76c3a4
refs/heads/master
2020-04-01T19:39:26.376412
2019-04-29T19:02:48
2019-04-29T19:02:48
153,564,983
0
3
null
2019-02-13T07:45:28
2018-10-18T04:47:23
Python
UTF-8
Python
false
false
8,687
py
DataProcMap.py
import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import axes3d, Axes3D import math from math import sin, cos, sqrt, atan2, radians, exp import pdb ####################################################################################################################### # NOTE FOR FUT...
a2ff80f19fb5b59f7334c9b8e3dae3877cf03dd2
b1031e2213a9ddb7d49889523947769bde853a1f
/mysql-workbench-plugin-doc-generating.py
d060e846e43180399f552d13d64458e243531ad2
[ "MIT" ]
permissive
cryptmarcus/mysql-workbench-plugin-doc-generating
810cd8ae06eb833ab49c5349da3983bef85c7782
4ead8f55a9d484b1c35f987ea70074a6027247c0
refs/heads/master
2022-01-15T18:33:15.862405
2019-07-19T09:05:02
2019-07-19T09:05:02
null
0
0
null
null
null
null
UTF-8
Python
false
false
4,100
py
mysql-workbench-plugin-doc-generating.py
# -*- coding: utf-8 -*- # MySQL Workbench Plugin # Written in MySQL Workbench 6.3.10 # # Original Author: Hieu Le # Author: thefreelux <https://github.com/thefreelux> from wb import * import grt import mforms ModuleInfo = DefineModule("ModelDocumentation", author="Hieu Le", version="1.0.0", description="Génération de...
a4610d377f4b4378713c054efabff377e394fac6
d80b73ce6ceb86ecccece1a001e5c7d6a2b299e7
/Beginner/3089 - Christmas Gifts/main.py
af8b7ab08f6118799b829109709bee41a3de01d8
[]
no_license
ewalldo/URI-OnlineJudge-Problems
cc8d3649eda1fc042502e77e81d1fbdf5dfe22ff
8c4cb0b87195b15752eda6af43d12666bae31dc7
refs/heads/master
2022-12-15T15:41:10.082976
2020-09-04T03:18:29
2020-09-04T03:18:29
277,761,760
0
0
null
2020-07-17T03:09:57
2020-07-07T08:33:46
Python
UTF-8
Python
false
false
371
py
main.py
while True: n_grandchildren = int(input()) if n_grandchildren == 0: break present_value = list(map(int, input().split(' '))) pair_value = [] for x in range(n_grandchildren): pair_value.append((present_value[x] + present_value[n_grandchildren * 2 - x - 1])) pair_value = sorted(pair_value) print("%d %d" %...
ce9436cff73207dc6cbf2fc451d1eb30a9d3c1d2
4645f94b87a89761dab1779ab73694f2602b47c5
/scripts/ajk-delete
c04460616c2e6a51984012f7c0be34c41baa120e
[]
no_license
OddBloke/autojenkins
40fb1d2ac7e69581e4b0f28edaf591c092d8c21e
a2ad8941849dc7aaf89eb4355a01a8816c395655
refs/heads/master
2021-01-15T21:24:17.740404
2011-12-12T15:33:05
2011-12-12T15:33:05
2,964,991
0
0
null
null
null
null
UTF-8
Python
false
false
255
ajk-delete
#!/usr/bin/python from autojenkins.run import * parser = create_opts_parser('delete a job') (options, args) = parser.parse_args() if len(args) == 2: host = args[0] jobname = args[1] delete_job(host, jobname) else: parser.print_help()
1160ea867e552e3ce70fe40f502d8f5b7325cf31
b2fdf7287f3da3f97cd7711ce22426787dba466c
/accuweather.py
60d767c83361653c282f8eef8043e51b34f05cad
[]
no_license
kesterallen/twitterbots
ee4cf8fa1084d9f3c8fb1843e2cb666a116470ef
a660a05d7e6c627419838186134163471e6c04f8
refs/heads/main
2023-06-08T13:23:24.506337
2023-05-26T03:07:13
2023-05-26T03:07:13
85,345,585
2
1
null
null
null
null
UTF-8
Python
false
false
3,648
py
accuweather.py
""" Get weather from AccuWeather and email it """ from datetime import datetime as dt import sys import requests # https://github.com/sendgrid/sendgrid-python #pylint: disable=line-too-long from sendgrid import SendGridAPIClient from sendgrid.helpers.mail import Mail from python_http_client.exceptions import Unauth...
946cb14d27b5d526ab2a033846e2b91a6a550333
9fb7f919406868e8a2186f6be3d10e8a6d1ef718
/src/globalconfig/__init__.py
d41e961fe258f416de15a9c6e81e3e41634fe1d7
[ "MIT" ]
permissive
TechFitU/SctVehCheck
ff7c4326642d760d48169d5cbc0fc55e6a408f07
4e034c6040dccda8477a3ded14b2fb571fde70b9
refs/heads/master
2022-12-16T15:26:50.916289
2018-09-13T02:44:09
2018-09-13T02:44:09
136,707,998
0
0
MIT
2022-11-22T02:34:14
2018-06-09T09:08:33
Python
UTF-8
Python
false
false
53
py
__init__.py
default_app_config = 'globalconfig.apps.GlobalConfig'
3fdeda5c971c05fae37d70e4fa20cf5999bbb1a2
f63824e94208d86e9958011858ce697bc4889270
/pics/models.py
8d1557552ac0f1d64df577e87dd8ecfd3200c1ca
[ "MIT" ]
permissive
seron-ux/Gallery
60abb08712432f9541d8c3cba0c2ed5cc09b161b
e867dffad6ca8a54cbe49f3ea504b87222d3ccc4
refs/heads/master
2023-03-23T10:43:31.124624
2021-03-22T10:08:29
2021-03-22T10:08:29
349,559,469
0
0
null
null
null
null
UTF-8
Python
false
false
669
py
models.py
from django.db import models # Create your models here. class Image(models.Model): caption = models.CharField(max_length=100) title = models.CharField(max_length=200, default='') location = models.TextField(max_length=30,null=False,blank=False, default='') image=models.ImageField(upload_to='images/',de...
76297672b4f83de025705e1d7c00337f4f242d49
522e59a7e250cbb58195c0917e52dd59af17e49c
/server/lexer.py
01e39af73056df6a03074004bf8a3740cfe9ad84
[]
no_license
lucfg/compilador
fade911e74ed45c1874111239efc1d81e8d5eece
966794e6731f4cda6f8a134dbd0dd10e8d084a86
refs/heads/master
2021-04-26T22:33:15.631136
2018-05-21T16:43:36
2018-05-21T16:43:36
124,110,872
0
0
null
null
null
null
UTF-8
Python
false
false
2,360
py
lexer.py
import ply.lex as lex # Reserved Words reserved = { #Input & Output 'print' : 'PRINT', 'read' : 'READ', #Key Words 'main' : 'MAIN', 'program' : 'PROGRAM', 'func' : 'FUNCTION', 'var' : 'VAR', 'true' : 'BOOLEAN', 'false' : 'BOOLEAN', 'return' : 'RETURN', # Conditionals 'if' : 'IF', 'else' : 'E...
e9c4423852c5a3654c5bc9ecb0600887712b409b
0a9bfbc0bdfe87492511a0417f4ae2b773c94125
/src/autograd/RoundIdGradient.py
5cce733ccd23a9927bcc7f80ec339e16604acd74
[]
no_license
maximsmol/Neural-Image-Compression
cac821dc78eaae78c76ac09f1c68716425f91ac0
da882356d11d8ada7290f3cea64806480a428ff4
refs/heads/master
2020-09-13T14:20:14.949217
2019-12-13T23:11:14
2019-12-13T23:11:14
222,814,506
1
0
null
null
null
null
UTF-8
Python
false
false
176
py
RoundIdGradient.py
import torch class RoundIdGradient(torch.autograd.Function): @staticmethod def forward(ctx, x): return x.round() @staticmethod def backward(ctx, g): return g