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
2abb5aaeff5a1322ee25b7f45527896bd030afdf
29e0ab7de99fd10dde1015e022aff1e36bff4687
/day11/1.作业讲解.py
62b2f7f3922a1b71253ed82611047d00d9fb3808
[]
no_license
LannibaleS/Python_fullstack
c94bc957677a93b8912c1df4febae325dcf06b3c
86b130f825f566cc127c1041f7f1e3facf47cdc0
refs/heads/master
2020-05-16T23:43:15.194372
2019-07-08T10:00:26
2019-07-08T10:00:26
183,375,832
0
0
null
null
null
null
UTF-8
Python
false
false
507
py
1.作业讲解.py
# 2、写函数,接受n个数字,求这些参数数字的和 def sun_func(*args): sum = 0 for i in args: sum += i return sum print(sun_func(5,6,5,6,4)) # 3、读代码,写出a b c的值 a = 10 b = 20 def test5(a, b): print(a, b) # 20, 10 c = test5(b, a) print(c) # None 因为test5没有返回值,所以c为None # 4、3、读代码,写出a b c的值 a = 10 b = 20 def test5(a, b): ...
c767cab1ca18b57f0a683a95cac1e5c2a9bb5e8d
10283441e499f916b9f37d7c3e18218c4702efad
/apurinto_vacuum.py
7cddd3d78c34c7df7437d2aa68d2dd7578abd22e
[]
no_license
AaronPurinton/Vacuum_AI_Project
492cb410d85684e98c74d3ac0c71c4513c6de5fd
bf2d69f524a1177acdc6059b4af3c83acc33d02a
refs/heads/master
2020-04-08T05:10:20.870759
2018-11-25T16:09:05
2018-11-25T16:09:05
159,049,340
0
0
null
null
null
null
UTF-8
Python
false
false
7,951
py
apurinto_vacuum.py
#ok now what import copy import random from vacuum import VacuumAgent rg = 60 #room finder square drop = 79 #value of points we are alowed to lase at a time l = 'Left' r = 'Right' u = 'Up' d = 'Down' s = 'Suck' n = 'NoOp' #shorthand ^ ''' notes: use map to find location O ...
85269b1deac1c3bb96378caee94dfa5e1a689fd8
c3eb053d63e26a2ba43e775fe83409494e5ad229
/test/analysis_test.py
fd5289be88d3ef3af418b21302d54206874a1031
[ "MIT" ]
permissive
galaxy-genome-annotation/python-chado
37a4f41857da7bff2813aa1a3fc7f245cc6e9d51
3a254e911dfc56022d7e0fbb28fc04ee308ee3f3
refs/heads/master
2022-05-27T22:50:01.537675
2022-05-10T08:59:34
2022-05-10T08:59:34
65,215,242
8
6
MIT
2022-05-10T08:59:35
2016-08-08T15:20:14
Python
UTF-8
Python
false
false
5,259
py
analysis_test.py
from . import ChadoTestCase, ci, ci_no_reflect class AnalysisTest(ChadoTestCase): def test_add_analysis(self): name = "analysis x" program = "Magic" programversion = "1.0" algorithm = "mind" sourcename = "src" sourceversion = "2.1beta" sourceuri = "http://...
22f78d513a58ea2e252ceaa9fbdf7af618841d4f
d160c113d739229b4c9b8464c075183dcec33950
/leave_the_notebook/run.py
c80227e1db56787337963fbca2ffbffbf59e3c2c
[]
no_license
Junyinghuang/PHY-250
1f4e144d825cc33d222f1b82aee85b69e8873bc8
fadbeaecc1107e348cf967a476e662346cc0223e
refs/heads/master
2021-05-26T00:25:52.391933
2020-04-19T20:47:56
2020-04-19T20:47:56
253,980,434
0
0
null
null
null
null
UTF-8
Python
false
false
291
py
run.py
import Cellular_Automata from matplotlib import pyplot as plt initial_conditions = Cellular_Automata.random_string(20) field = Cellular_Automata.ECA(initial_conditions) Cellular_Automata.spacetime_diagram(field.evolve(20, Cellular_Automata.internary(3101)), 12) plt.savefig('rule3101.pdf')
63962d73ec6c85dbc4accd4bac1b2a6e2e433397
ac4c0dd5af8b741400039cca913b81a2b17493c2
/2. Preprocessing/6. Splitting Data/test4.py
3ce7a88f18e90be07d0ced15fac83b33d50af184
[]
no_license
hanwjdgh/NLU-basic
3b95a0787c28d5b8d7314e49d8292730b3aa0dff
d83e04692d4fc1c87dc739454f15d682d3fc9b59
refs/heads/master
2022-03-25T19:26:33.129605
2019-11-30T05:35:43
2019-11-30T05:35:43
162,359,842
1
1
null
null
null
null
UTF-8
Python
false
false
910
py
test4.py
import numpy as np from sklearn.model_selection import train_test_split X, Y = np.arange(10).reshape((5, 2)), range(5) print(X) print(list(Y)) """ → [[0 1] [2 3] [4 5] [6 7] [8 9]] [0, 1, 2, 3, 4] """ """ X : 독립 변수 데이터. (배열이나 데이터프레임) Y : 종속 변수 데이터. 레이블 데이터. test_size : 테스트용 데이터 개수를 지정한다. 1보다 작은 실수를 기재할 경우, 비율...
a9871c0e4a116883c2e0de5313a40a0ce038ff4d
294b5071d6bbab2a6937b32c396cb8206384341d
/main_experiments/settings/settings-K.py
deca56cbf7b2f439ea9ffcb3a4bd8c95089ee136
[]
no_license
malvikamodi/Emulating-Downward-Spiral-Effect
8a9f43041a807661ac6e0ed185b3cf66b853fa52
d03baf3a557fdcc389704e17059026cc8f4d3fe2
refs/heads/master
2020-03-31T19:44:29.831456
2018-10-11T00:57:29
2018-10-11T00:57:29
152,509,221
0
0
null
null
null
null
UTF-8
Python
false
false
323
py
settings-K.py
# K] A with 1 fourth segment size experiment_duration = 600 competing_flow_start_at = 200 competing_flow_duration = 300 playback_buffer_limit = 200 playback_rate_selection = True smoothing = 10 segment_seconds = 1 optimistic = False radical_client = Fa...
d4a9e893a971812c9c4e694925675669a1a633d6
e5adaa30da05ef9cd4551a118bca78e769bc0b50
/2_1a.py
e3091c9b7935853870d04ea790d0c98cf9bfcfc7
[]
no_license
QBlek/SVM_sklearn_test
b59b5da7aa7a74da56ed6ce649b937af542429f0
4f20383199151242b96f75a6e0562639e3e8c734
refs/heads/master
2023-08-16T07:56:37.607787
2021-10-23T00:34:25
2021-10-23T00:34:25
420,276,787
0
0
null
null
null
null
UTF-8
Python
false
false
2,527
py
2_1a.py
import pandas as pd import numpy as np import matplotlib.pyplot as plt from sklearn import svm from sklearn.metrics import accuracy_score if __name__ == '__main__': # Dataset setting dataset = pd.read_csv('./data/fashion-mnist_train.csv') testset = pd.read_csv('./data/fashion-mnist_test.csv') labels...
8c32677447b73955c844012d798e1021333a5bc4
6241b14b7dff303597260bdd5787214227092f65
/1.basics/4-repetition/2-for-loop/3-range/bot.py
047b7c3b6152f02e393af602d379cc770252a76b
[]
no_license
4roses41/COM404
f87760312fe852349689f22ab791d98e8e6aa409
7347c35caab4c59c8d7afc80679d2d3c3e84392d
refs/heads/master
2020-07-31T09:15:26.911263
2019-12-03T12:47:56
2019-12-03T12:47:56
210,556,908
0
0
null
null
null
null
UTF-8
Python
false
false
290
py
bot.py
brightness = int(input("What level of brightness is required? ")) print(brightness) bop = "*" beep = "*" for starts in range(2,brightness,2): print("Beep's brightness level: " + starts * beep) print("Bop's brightness level: " + starts * bop ) print("Adjustments complete!")
68901d662ccee8600f22f95f37d8eff8532210ae
b053b33477057609b0866f029e735a953bf3354f
/AutoEncoder/parse_5cat.py
2305b5ccef7b0029df140549e1c50397f268230c
[]
no_license
waxzdert/DeepLearningIDS
099198808210febfa1118c56369997f342a2f977
afc787ff2bc792374bdccd235fd76f751413bbc7
refs/heads/master
2018-12-20T22:33:16.727176
2018-09-19T10:43:58
2018-09-19T10:43:58
116,964,717
1
1
null
null
null
null
UTF-8
Python
false
false
370
py
parse_5cat.py
import pandas as pd import math file_dict = { 'Train':'C:\\Users\\MaxWu\\Documents\\GitHub\\DeepLearningIDS\\AutoEncoder\\Processed_Data_Train.csv', 'Test':'C:\\Users\\MaxWu\\Documents\\GitHub\\DeepLearningIDS\\AutoEncoder\\Processed_Data_Test.csv', 'Minus21':'C:\\Users\\MaxWu\\Documents\\GitHub\\DeepLearn...
ed0d73918f7895a32bc79ee718c44593bc9c557a
b9f21bc90eed396dde950c30a1b482be0fb8ba30
/AtCoder/ABC/084-B.py
c487ccbaf346928845960c00b3cc5910f8d7ad2b
[]
no_license
nanigasi-san/nanigasi
127a21db1b31759908fd74cebabe240e5abf8267
5e3c3e78344dd9558cafe439beb272b9a80d0f3a
refs/heads/master
2020-04-03T18:57:40.132489
2019-06-19T15:03:38
2019-06-19T15:03:38
155,504,101
1
0
null
2019-02-20T09:40:05
2018-10-31T05:33:11
Python
UTF-8
Python
false
false
187
py
084-B.py
import sys A,B = map(int,input().split()) S = input() if S[A]!="-": print("No") sys.exit() try: a = int(S[:A]) a = int(S[A+1:]) print("Yes") except: print("No")
e13b947a1bb88a98cb4777310e1d4b86b3b77bad
d2c909b1f063e011049c55326b2c6ba7dc397639
/My_Aos/infer.py
8727b822b9a0b66148e21b1497d3ff7c74c9c391
[ "Apache-2.0" ]
permissive
SaiKrishna1207/aos
72504785e8b4b0403cae0aba8117378f707992a6
a55a1eed80dc9b21f7e295b265228c0d54072a66
refs/heads/master
2022-12-06T14:23:08.374755
2020-08-24T16:21:09
2020-08-24T16:21:09
288,228,108
0
0
Apache-2.0
2020-08-17T16:16:48
2020-08-17T16:16:47
null
UTF-8
Python
false
false
1,644
py
infer.py
import aos import os import numpy as np import pycuda.autoinit import pycuda.driver as drv from pycuda.compiler import SourceModule def infer(x): aos_op = "" if isinstance(x, int): return "int" elif isinstance(x, str): return "str" elif isinstance(x, float): return "float" ...
3c0a3ed4482d3d347d8d13ec74365f4c948c5f1a
524dd3061c835163183c8283f470ac23246e264e
/Server/model/MainModel.py
84626bc4bba064bcd5d3a83633b50b5698264cb1
[]
no_license
tarunkhajuria42/Amezzon-distributed-sysmems
b727dd5445b262dd7a2b8c5f10ed415fca35ba0d
3be1064ef675ea5a2ad17664c99a17ea64e7b5a6
refs/heads/master
2020-07-04T13:20:08.914831
2019-01-17T13:10:30
2019-01-17T13:10:30
202,297,411
0
0
null
null
null
null
UTF-8
Python
false
false
1,531
py
MainModel.py
from model.UserModel import UserModel from model.ProductModel import ProductModel from service.DatabaseService import DatabaseService from DBStatements.DatabaseStatement import DatabaseStatement from DTO_Parser.DTO_Parser import DTO_Parser from service.TokenService import TokenService class MainModel(object): def __in...
1add3e0ff2a4068d2945f780140a61e4783f86b6
fb8d2142a76e0ba2e8d5b17d7e08d7d727beec74
/broadview_lib/config/bhd.py
5d65657fac84c454ca54b6a1c1c427ed4c7df400
[ "Apache-2.0" ]
permissive
Broadcom-Switch/broadview-lib
3ad346a509347091ee5ab14a964b4e9715c6f313
70fc32e4f82ed8d6aaefdaad1a01b896d17b8fa9
refs/heads/master
2021-01-11T02:29:32.640831
2016-11-09T02:50:19
2016-11-09T02:50:19
70,961,439
4
2
null
null
null
null
UTF-8
Python
false
false
17,730
py
bhd.py
# (C) Copyright Broadcom Corporation 2016 # # 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 ...
7cd2a039e9b883f2e25e75d8c9353084e0457a9b
876999e251a35b3cf5036155246a8cb430d4d15c
/SMSPAM v2.1/Dashboard.py
9c0af2f0d3d111d371a784860d130b8094fc2ff9
[]
no_license
R2xpdGNo/SMSPAM
475f1437369d6682d9bd1dc33dc8f93cd1ee1451
50adb081d48d66647b2b4711c42194946a18f256
refs/heads/master
2021-06-19T10:04:35.369364
2021-03-22T00:41:58
2021-03-22T00:41:58
193,710,700
0
0
null
null
null
null
UTF-8
Python
false
false
13,323
py
Dashboard.py
from tkinter import * from tkinter import ttk from tkinter import messagebox import configparser import smtplib Program = Tk() # Global Variables config = configparser.RawConfigParser() config.read('config.ini') # Tab Control TabControl = ttk.Notebook(Program) SendEmail = ttk.Frame(TabControl) SendSMS =...
3d6d026f77277c165f737d5fb481cee086119b3d
539c4169bf12dad255888424e8ba7508ebdda68c
/StandCheck/main.py
097e33c87a31ab3c926d15b56d86c88de44bdca8
[]
no_license
maqiuping59/EfficientTools
cf5aca9e1bfbb40a1af61270b3f9f3e5df809685
77adf64099286c5c4b427209212804e872609df6
refs/heads/main
2023-03-06T02:40:41.028617
2021-02-23T11:07:15
2021-02-23T11:07:15
341,524,328
0
0
null
null
null
null
UTF-8
Python
false
false
535
py
main.py
from PyPDF2 import PdfFileReader,PdfFileWriter def splitPdf(path,name_of_split): pdf=PdfFileReader(path) for page in range(pdf.getNumPages()): pdf_writer=PdfFileWriter() pdf_writer.addPage(pdf.getPage(page)) output = f'E:\\ToolsDevelop\\StandCheck\\{name_of_split}{page}...
4cadb96c843aafd554b5da2c27ce4f36f4fc50ee
1a363e506b7ba17be1ed744643f331ccaf91c560
/qa/views.py
0efe3fc28647b12d6fd40e859422a12f554f01bb
[]
no_license
pavankomarina/qamvit
aba73f3ec2660e412ec434d2b77d550682aa7a2c
3be0bb47962d5d948467e09680bbb6ad6d06e8f9
refs/heads/master
2023-08-03T02:08:23.101466
2021-10-07T16:59:25
2021-10-07T16:59:25
111,845,171
0
3
null
2021-06-10T21:35:11
2017-11-23T19:48:46
CSS
UTF-8
Python
false
false
11,666
py
views.py
from django.contrib.auth import authenticate, login from django.contrib.auth import logout from django.http import JsonResponse from django.shortcuts import render, get_object_or_404,redirect,HttpResponseRedirect from .forms import UserdetailsForm,UserForm,QuestionForm,AnswerForm,BlogForm,TagForm from .models import * ...
87fdf5037c5dc8097e18b8b98697c7ae3f97fe72
ba3f95ad408cf5be9f09d1a516e7050d02a2d492
/tools/feature_visual_comparison.py
2259bf935f190fe94984a100b776f7eef2564120
[]
no_license
kingwongf/janestreetKaggle
a37ee24ce650270acfa1e1b92c91ba78c61c58ec
04432e760bce254d5c827824f437cd05d34cf557
refs/heads/master
2023-02-12T10:48:28.276158
2021-01-15T01:06:37
2021-01-15T01:06:37
318,177,549
0
0
null
null
null
null
UTF-8
Python
false
false
1,504
py
feature_visual_comparison.py
# coding=utf-8 import numpy as np import janestreetKaggle.tools.big_csv_reader as bcr from matplotlib import pyplot as plt # THIS FILE EXTRACT A SMALL SUBSET OF THE DATA TO EXPLORE THE CORRELATION AMONG DIFFERENT FEATURES. # USE "PLOT_FEATURE" TO PLOT ONE FEATURE # USE "VIA" TO REMOVE ONE PLOT def trend_with_exp_wei...
afafc6a9d13305873e94104aac3fd7d0b5b8ab98
44d379302787c5b65a3f5a8143431a3c19c3604a
/c05_tstory_project/tstory/posts/admin.py
fa9a507b6741d0ee6a8c5c2aa2cc5a32d5c078cc
[]
no_license
Miniminis/python-study-note
71bde562be1111ea4cfae38613f604f4bfe3cba5
4b70c2f0ad0a449fcd6f213aeec69d1e40bd3fb2
refs/heads/master
2023-03-04T08:53:17.113739
2020-09-09T21:11:13
2020-09-09T21:11:13
237,565,137
0
0
null
null
null
null
UTF-8
Python
false
false
391
py
admin.py
from django.contrib import admin from .models import TPost, TComment # Register your models here. class TPostAdmin(admin.ModelAdmin): list_display = ('writer', 'title', 'created_at', 'modified_at') class TCommentAdmin(admin.ModelAdmin): list_display = ('comment', 'post', 'writer', 'created_at') admin.site.re...
bfe0ce39e8f594df35cfce4eacd0b7611f46715f
531bed1c670f1a31067b91f9f8ab88b85d64bbb8
/entry.py
56b638053d628d886fbc015d162d95be16310f68
[]
no_license
seanvk/kindle-dict
27c601ac8f6c6a66f9bcb5a88182c8cd6279f86c
3429ebc8475591f39fb0d542000cc2bc18bd04e2
refs/heads/master
2021-09-26T15:20:49.557660
2018-10-31T11:02:27
2018-10-31T11:02:27
198,011,350
1
0
null
2019-07-21T04:20:43
2019-07-21T04:20:43
null
UTF-8
Python
false
false
856
py
entry.py
import re # Capture {comment}, <comment>, [comment]. REGEX = re.compile(r"(\s{.*}\s?)?(\s<.*>\s?)?(\s\[.*\]\s?)?$") class Entry(): def __init__(self, nb, pos, de): nb_comment = re.search(REGEX, nb) if nb_comment: self.nb_comment = nb_comment.group(0) self.nb_word = nb.re...
1eae208344c6923a84832579178b085c7c0bcaac
bb4a9f5dfd44f94479fc7b9723d0702ef1c9552e
/classes/init.py
e6b8b3cc7bd18e78782cf43efb8de45a828dc7c4
[]
no_license
aa-ahmed-aa/Python_Projects
0a535477ea6ab1bd1ce625e0f70b4c95fab26198
e45ffcb7e833de831eab6ce5071ba9b67610dcd0
refs/heads/master
2016-09-10T19:54:15.501880
2015-06-30T16:39:08
2015-06-30T16:39:08
38,320,186
0
0
null
null
null
null
UTF-8
Python
false
false
347
py
init.py
'''class T: def __init__(self): print("Hi hi fb Alkndfsflsdf ") def swim(self): print("i am swimming !!!") finger = T() finger.swim() ''' class enemy: def __init__(self,x): self.energy = x def printting(self): print(self.energy) finger=enemy(5) fan=enemy(12) finger....
1ea71f7b17809189eeacf19a6b7c4c7d88a5022c
7ad74616df8b4529360f8b70d0811b6335053e30
/dataloaders/__init__.py
cb126432c4ce1d60a878279ea1064ee6eafe573b
[ "MIT" ]
permissive
sunggukcha/pascal2007
b16a78f079c270f8886959da74fbfda1fa79113f
f5a9851c4eb1cb3e41b314266c5da38f98832061
refs/heads/master
2020-09-02T04:42:16.236339
2020-01-06T05:49:26
2020-01-06T05:49:26
219,134,154
1
0
null
null
null
null
UTF-8
Python
false
false
1,161
py
__init__.py
from dataloaders.datasets import caltech, embedding from torch.utils.data import DataLoader def make_data_loader(args, **kwargs): if args.dataset == 'caltech101': train_set = caltech.caltech101Classification(args, split='train') val_set = caltech.caltech101Classification(args, split='val') test_set = caltech.c...
2ca1b603b18316bc1d970b5e32389e10e4b532e2
ef4d70b484967fd3026a9614f1981c7f19065b64
/client/CLIENT.py
faebe266cc893dc39f3ab4cb015ce329c1841312
[]
no_license
Swe1807/Gandharv
3e285d82d9511b3fa3b97d75bcfec44f56cb94da
e9e17f8178925624b4a2bae7c1a9d3bea83c6d00
refs/heads/master
2020-04-30T22:32:29.392120
2014-03-11T07:48:18
2014-03-11T07:48:18
null
0
0
null
null
null
null
UTF-8
Python
false
false
677
py
CLIENT.py
import configure import connectify import userlog import dirlog import time def getUser(sock): try: userinfo = userlog.getInfo() except: userinfo = configure.init(sock) userinfo = userinfo.split('^')[0] # print userinfo return userinfo if __name__=="__main__": sock = connectify.createCon() userinfo = get...
07544d1eb039da0081716aa489fc1a0a5a200145
cb1640b44fe9b7a2ea71dfde79a6f4fa0fc0d2ff
/main.py
4565de26ed2797d3d4b83f3935dffe7f112bcdf7
[]
no_license
dilmurodb/project-9
76f299182ef1f4900272b10389b3840d2cc67abe
6b48bbce2946e8960407ccffe5a4505649e5ecc8
refs/heads/master
2020-12-12T17:47:23.539568
2020-01-21T19:05:50
2020-01-21T19:05:50
234,188,770
0
0
null
null
null
null
UTF-8
Python
false
false
2,657
py
main.py
from peewee import * db = PostgresqlDatabase('contacts', user='postgres', password='', host='localhost', port=5432) intro_question = input("What would you like to do with Contacts? Create? Read? Find? Delete? Update? ") def read_contact(): contacts = Contact.select() for contact in c...
289aa48b4433be533c3916dd039136df45e0ac0b
da64994d73d250d19a30381de7462c5729372f81
/apps/student/migrations/0009_auto_20191024_1311.py
825fdd680871e0e5514bd7ba5f6097c35f677bd9
[]
no_license
Mid0Riii/psybackend
2f872c1dd21e97ba0a46efa10f2b3246ac8bb2b5
2cd477f01111a816b17725a00ffa77a156dec7b0
refs/heads/master
2023-03-26T07:55:17.580161
2021-03-14T01:45:19
2021-03-14T01:45:19
305,083,821
0
1
null
2021-03-14T01:45:20
2020-10-18T11:15:48
Python
UTF-8
Python
false
false
3,202
py
0009_auto_20191024_1311.py
# Generated by Django 2.2.5 on 2019-10-24 05:11 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('student', '0008_studentbasic_stu_class_num'), ] operations = [ migrations.AlterModelOptions( name='onduty', options=...
03062ea08bd6ad88376f7c2aa2c89d2194ed8b2e
fed36f15855aaadeef51bf388f36de7cb6d15f95
/fibonacci.py
f75121f7451e3025ad7e06f1b775904e1425dafa
[]
no_license
KyouX/EjerciciosPython
22d3f6fe6ff1fb0428efc8d5c2851daa812e8aa6
c88ce7a479bd3061a9d7a493bacb16a81bbc5e83
refs/heads/master
2021-11-28T22:59:15.379842
2018-03-02T18:10:40
2018-03-02T18:10:40
null
0
0
null
null
null
null
UTF-8
Python
false
false
457
py
fibonacci.py
''' fibonacci(6) => [1, 1, 2, 3, 5, 8] fibonacci(7) => [1, 1, 2, 3, 5, 8, 13] ''' def fibonacci(n): if n == 0: return [] elif n == 1: return [1] elif n == 2: return [1, 1] else: lista = fibonacci(n-1) suma = lista[len(lista)-1] + lista[len(lista)-2] lista...
af668751074df6f182c7121821587270734ea5af
258ce5d2846ed3469b6c21996a0a1bff47125dc5
/scrapy/topdb/topdb/spiders/novels.py
eb011560889e07edcb651bbd74d1d58f85891f76
[]
no_license
withJackson/NovelWebsite
8b6005460dcc9fc68104e4b1b3f73d87c3051cbe
253552608e3b6e9714f7acde6ce22d77c54eef09
refs/heads/master
2022-12-26T05:06:21.795448
2020-10-06T14:05:31
2020-10-06T14:05:31
292,723,764
3
0
null
null
null
null
UTF-8
Python
false
false
3,633
py
novels.py
# -*- coding: utf-8 -*- import scrapy import os from topdb.items import BiqugeItem class NovelsSpider(scrapy.Spider): name = 'novels' allowed_domains = ['xbiquge.la'] start_urls = ['http://www.xbiquge.la/xiaoshuodaquan/'] def parse(self, response): # 小说分类 path = '/Users/qx/Documents...
06f961c07695d1c312cb943afbfa64508a709c7e
21e4e20174db66596fbacbd89edfc4673677667f
/progressbar/show-alive-progress.py
85bdf06844833e8f70095f7b7d09fc90660232e5
[ "Apache-2.0" ]
permissive
sangshuduo/python_misc
05a3bada1f9d7778e272845dd3498c47d827badb
dba7c668313bdc5b5b224ffbe1cc787c3bfb7778
refs/heads/main
2023-06-23T23:52:38.934639
2021-07-31T05:49:25
2021-07-31T05:49:25
391,264,016
0
0
Apache-2.0
2021-07-31T05:49:26
2021-07-31T05:29:04
null
UTF-8
Python
false
false
476
py
show-alive-progress.py
from alive_progress import alive_bar from time import sleep with alive_bar(100) as bar: # default setting for i in range(100): sleep(0.03) bar() # call after consuming one item # using bubble bar and notes spinner with alive_bar(200, bar='bubbles', spinner=...
1fafbc1e415b5089afcd2976d4f0dc2aa1c5a144
480ef178622c12adbadb37d204ee7afc7be5a8d3
/python/151-160/Maximum Product Subarray.py
f7b7a62c920c8bfdb902aa755b7d32a6184a0890
[]
no_license
talentlei/leetcode
9e71154af31c1fe563f7ad8f64dbc442d1148108
edf983bffe51ba7842446957ae9f34af6decb917
refs/heads/master
2021-01-19T07:43:16.483054
2015-07-07T15:20:09
2015-07-07T15:20:09
30,535,746
0
0
null
null
null
null
UTF-8
Python
false
false
426
py
Maximum Product Subarray.py
def maxProduct(self, A): size= len(A) if size==1: return A[0] Max=[A[0]] Min=[A[0]] for i in range(1,size): Max.append(max(max(Max[i-1]*A[i],Min[i-1]*A[i]),A[i])) Min.append(min(min(Max[i-1]*A[i],Min[i-1]*A[i]),A[i])) tmax=Max[0] ...
9a6ceeb286bb6c3d5923fe3b53be90a097e16ef5
ae8b810911ffbe09b145ed0568ece3d33faf1cd4
/seq2seq/process_data.py
6a779ad440f8e6bc468a6af2b5d0ce95dc41cd8b
[]
no_license
catli/seinfeld-attention
577a249512809538f575b58127e189a86b1d0083
59874200b2ae446fa70e0536b82abe94e85a0d54
refs/heads/master
2020-04-23T12:51:29.068301
2019-03-07T06:07:20
2019-03-07T06:07:20
171,182,976
0
0
null
null
null
null
UTF-8
Python
false
false
8,453
py
process_data.py
''' Create a dictionary of fasttext embedding, stored locally fasttext import. This will hopefully make it easier to load and train data. This will also be used to store the Steps to clean scripts (codify): 1) copy direct from website (space-delimited text) 2) remove actions in ...
618aa64c08ebf8d9a0bc9662195ece2bbd485c17
353b6aaf19758a53447946a479a2636509313dc2
/excessoes e testes/exeption_classe.py
7248d05539e7f2712e2b5121da780653ce5ad8f4
[]
no_license
delmondesfe/python_fundamentals
55dc4d75986f58f07def572a2571477b6a41dc69
615fd497c024b7daa2988a93583ebc9661a11ea4
refs/heads/master
2023-07-31T12:00:27.363520
2021-09-14T00:20:07
2021-09-14T00:20:07
404,510,545
0
0
null
null
null
null
UTF-8
Python
false
false
87
py
exeption_classe.py
dic = {} try: print(dic[55]) except Exception as err: print('Mensagem: ',err)
2f1e2b3dffab66299601c7c54d5c90ed75490b08
2e083b7dbbce8c823c38a1a5d0863fe2f96903ff
/ShotOfLife/accounts/urls.py
c9ba8de1bf659c95a7fb615e459ff1c0e8d6837c
[]
no_license
jayquake/Django_Applications
4d49023f954c86e0c53e18ec8e67137c9fe016a0
ee0e12e8af502ca4fa0f6281ead955b1b1e7ebb1
refs/heads/master
2023-03-10T07:12:52.192224
2021-02-21T10:58:58
2021-02-21T10:58:58
259,059,961
0
0
null
null
null
null
UTF-8
Python
false
false
758
py
urls.py
from django.urls import include, path from .views import ContributorRegisterView, DownloaderRegisterView, registration_home,profile from django.contrib.auth import views as auth_views urlpatterns = [ path('', registration_home, name='registration_home'), path('account/profile/', profile, name='profile'), ...
01d67cfc4806a6c2820b110b5f609a8b53b8a8bf
e89121a1d25ba8b6d543b711ec9f522bbe0d685b
/transition_dp/core/utils.py
530f53a9d0daba5ad29ef9511367d62789e9c512
[]
no_license
tonyabracadabra/Atari-Game-with-DQN
d23e50d3c207c0e51370b27030e0333a78455430
3e7399632d99622a3a7d86f41081865a4cbd153d
refs/heads/master
2021-11-29T02:53:48.996986
2021-11-06T12:18:17
2021-11-06T12:18:17
83,743,183
5
4
null
null
null
null
UTF-8
Python
false
false
8,338
py
utils.py
"""Common functions you may find useful in your implementation.""" import semver import tensorflow as tf import re import numpy as np import random from string import punctuation def get_uninitialized_variables(variables=None): """Return a list of uninitialized tf variables. Parameters ---------- va...
723aa5763f7df57c9118926fad73752351256143
7f714c77be3eec1cc03a3e2a314b47c176df2be8
/UVV/src/plugins/logger/__init__.py
096f6b955a26347aa168206c499c91bcfeb15ad5
[]
no_license
Moonenzyw/Dicecho_Dicer
ea0c8d31c512e074ecd7df6ab488d9ebbc5d01ee
1de2d5b6effc39243ecbf236526d448626a19aba
refs/heads/master
2023-03-22T12:18:46.076824
2021-03-17T16:31:14
2021-03-17T16:31:14
345,698,971
0
0
null
2021-03-08T15:45:27
2021-03-08T15:17:22
Python
UTF-8
Python
false
false
2,583
py
__init__.py
import time import os from nonebot import on_message from nonebot.adapters import Event,Bot from nonebot.adapters.cqhttp import PrivateMessageEvent from .sqlite import is_logging,start_logging,stop_logging from .s3 import upload_file TRPGLogger=on_message(priority=1,block=False) @TRPGLogger.handle() async def _(bot...
b07c1f2754bad413a433c503f1fc65d1e4a351e7
69ca8d141de2e3a6ba0f3626d7c6d54123e1b005
/paper2/tests/test_eI.py
78312deac07d48e56e58eb8fd3dae7fdb94790bc
[ "MIT" ]
permissive
rodluger/mapping_stellar_surfaces
8c91550b1349947417f59ef8f96fc781e2984699
638e07e3264cfa0a1795e3eb34660e91117f8edd
refs/heads/master
2023-04-05T00:00:08.790657
2021-03-31T14:39:12
2021-03-31T14:39:12
331,419,125
11
2
MIT
2021-01-28T19:09:40
2021-01-20T20:08:32
TeX
UTF-8
Python
false
false
3,885
py
test_eI.py
import numpy as np from scipy.special import gamma as Gamma from scipy.special import hyp2f1 from scipy.integrate import quad from wigner import R from starry_process.ops import rTA1Op def factorial(n): return Gamma(n + 1) def Ul(l): """ Return the transformation matrix from complex to real Ylms. "...
d467210bf05733c6c0488f730e13e451a465afe8
1eff6ab9ee865d436c93f1f6857f1ce8f47da340
/airbnbdata.py
54928b7964122487c75ee2b2a011a5f899a15d22
[]
no_license
mann579/AirBnBMachineLearning
3e5758645e1493b27007f1968ec0944e815ff484
0701b517e17f2b1194fe68d11349f3bdc236fe27
refs/heads/main
2023-02-22T00:32:41.560453
2021-01-28T15:38:46
2021-01-28T15:38:46
305,659,047
0
1
null
null
null
null
UTF-8
Python
false
false
10,964
py
airbnbdata.py
# -*- coding: utf-8 -*- """airbnbdata.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1VMKyRS9Ou0bv3YeyzC4lkhw602B0xUk- Importing all libraries """ import numpy as np import pandas as pd import matplotlib.pyplot as plt import statsmodels.api as ...
7eadc958306e9e74e61ed94390ca6011ade01803
7c8f1826aa142c9c991174e2086baab5c8dd49a9
/implementations/GANILLA/utils.py
882201b3b5442792b4ef90f56fbc8bc2b3782d71
[ "MIT" ]
permissive
johndpope/animeface
783cf9d93d508d2d2eba1d1295ae1760d97c53d2
7638543b88ff1a19a691209a889da09acfbc0e90
refs/heads/master
2023-07-13T07:01:12.662314
2021-07-12T10:35:57
2021-07-12T10:35:57
null
0
0
null
null
null
null
UTF-8
Python
false
false
8,808
py
utils.py
import itertools import torch import torch.nn as nn import torch.optim as optim from torch.cuda.amp import autocast, GradScaler from torch.utils.data import random_split from torchvision.utils import save_image from ..general import AnimeFaceCelebADataset, DanbooruPortraitCelebADataset, to_loader from ..general impo...
704e2a3e7427fc7151f9ad471b6f485061d9ef3c
65306b41168a5afa6fc80904cc0fbf737939a01a
/scale/job/test/messages/test_cancel_jobs.py
6fdc97b02206462ac33c6d0d205efa90e6f28bca
[ "LicenseRef-scancode-free-unknown", "Apache-2.0", "LicenseRef-scancode-public-domain" ]
permissive
kfconsultant/scale
9e5df45cd36211d1bc5e946cf499a4584a2d71de
28618aee07ceed9e4a6eb7b8d0e6f05b31d8fd6b
refs/heads/master
2020-12-07T00:04:37.737556
2020-01-06T12:57:03
2020-01-06T12:57:03
232,587,229
0
0
Apache-2.0
2020-01-08T14:53:36
2020-01-08T14:53:35
null
UTF-8
Python
false
false
7,084
py
test_cancel_jobs.py
from __future__ import unicode_literals import django from django.test import TestCase from django.utils.timezone import now from job.configuration.data.job_data import JobData from job.messages.cancel_jobs import CancelJobs from job.models import Job from job.test import utils as job_test_utils class TestCancelJob...
cbeeeb5904aefdf1e1196a0dd232d949ebec14cc
08e61eeed9acf82ebe92e12c839a8a8601faedd3
/Container with most water.py
b3e7defe2caa70a89df882aee8561fa7d0b31e8e
[]
no_license
ntkaggarwal/Two-Pointers-1
10156c14ab51cbe60673c3caeac50b15549e16fa
db693cf39df4a14ce6767fa37ff74bec496dec6b
refs/heads/master
2021-01-09T01:21:31.004861
2020-02-21T18:46:37
2020-02-21T18:46:37
242,201,905
0
0
null
2020-02-21T18:11:16
2020-02-21T18:11:16
null
UTF-8
Python
false
false
1,055
py
Container with most water.py
#Time Complexity : O(n) #Space Complexity : O(1) #Did this code successfully run on Leetcode : Yes #Any problem you faced while coding this :None # ============================================================================= #Solution: Take 2 pointers low at 0 index and high at last index. #Width will d...
6539d322d6cb8b38edff1ce93fb63c8aedee8921
40377679ffd8a89ca4044fcf87c80faccaf1740a
/Server/authentication.py
845ff64019af548a3cbe643b2a38e4dbbb1b0aa5
[]
no_license
nqkpro96/project2
e695f292797fc6ce92f847db6875d370c8a91e6e
8fd313ad86e348bf7acea4d75a1660d7a4bdea3d
refs/heads/master
2021-01-20T14:19:00.642716
2017-06-05T04:10:04
2017-06-05T04:10:04
90,586,804
0
0
null
null
null
null
UTF-8
Python
false
false
2,139
py
authentication.py
import hashlib, binascii, usb2 import pickle def input(): name = raw_input("Username:") password = raw_input("Password:") usbid = usb2.main() return (name, hashlib.pbkdf2_hmac('sha256', password, b'abcd', 1000), usbid) class user(object): def __init__(self, (name, password, usbid)): self.na...
6b41f6b00b63c4838b6577c6098dfb0ae9954233
fbd6917a9ec37345cdbe988858b3bbedcebf0bce
/distribution/resampling/resampling_algorithm.py
68f567fd606f074d35bfb309cdd3e581150c2f08
[]
no_license
barrosfabio/data-distribution
81b78d70a33bd33dbad31263e1b003707fcd2cde
80746d696d7be0713acbd72d8b162534fab333b5
refs/heads/master
2023-08-20T23:10:20.662246
2021-09-26T17:20:02
2021-09-26T17:20:02
400,356,144
0
0
null
null
null
null
UTF-8
Python
false
false
6,474
py
resampling_algorithm.py
from imblearn.combine import SMOTETomek, SMOTEENN from imblearn.over_sampling import SMOTE, BorderlineSMOTE, RandomOverSampler, ADASYN, KMeansSMOTE, SVMSMOTE from imblearn.under_sampling import RandomUnderSampler, NeighbourhoodCleaningRule, TomekLinks, EditedNearestNeighbours, \ NearMiss, AllKNN from distribution.r...
96f4f27a11ff88ae9d88676ba2490e86cdfa5af4
d571d407cfda435fcab8b7ccadb1be812c7047c7
/guild/_api.py
1a3777f65d0326bf3b91dda038d663db862d6f69
[ "Apache-2.0", "LicenseRef-scancode-free-unknown" ]
permissive
guildai/guildai
2d8661a2a6bf0d1ced6334095c8bf5a8e391d8af
149055da49f57eaf4aec418f2e339c8905c1f02f
refs/heads/main
2023-08-25T10:09:58.560059
2023-08-12T20:19:05
2023-08-12T20:19:05
105,057,392
833
86
Apache-2.0
2023-08-07T19:34:27
2017-09-27T18:57:50
Python
UTF-8
Python
false
false
15,456
py
_api.py
# Copyright 2017-2022 RStudio, PBC # # 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 writing...
01918caeb0d37bc8510681fdf594198bf3312412
ab7af010d05e41cfaa7d30dfbd603adf84aa83b6
/src/OwlPub.py
5e8b84bc28b7ff25a997f48dbf37e4e075832a48
[ "MIT" ]
permissive
ashepherd/owl-pub
84a41fb05233b65ecdb0dc2c7405c60792c0462e
c2cb5ffafe90a750f35f89cf030c46718d591a9a
refs/heads/master
2021-06-19T10:17:41.673811
2017-06-26T04:15:58
2017-06-26T04:15:58
null
0
0
null
null
null
null
UTF-8
Python
false
false
5,174
py
OwlPub.py
#!/usr/bin/python3 -B # coding=utf-8 import json from datetime import datetime from os.path import abspath, join, splitext, basename, realpath, dirname, exists from jinja2 import Environment from RepoHandler import RepoHandler class ParseConfigError(Exception): def __init__(self, arg): super(ParseConfi...
4784532bcf89454c0a10b118211a32522095f89a
8c89d06785ba995595bf1946cd162b80d2015867
/trademan/cli/fyb.py
7998e13ae7f582a75210c158096e53f6543dbbc1
[ "MIT" ]
permissive
gldeng/TradeManagement
71589f72e0244ad3326c05f38805b2f76c578c11
9ac4a16f9b8c81f83c0b2eaf394cf3e124aaabf4
refs/heads/master
2021-09-13T10:37:45.192958
2018-04-28T11:55:52
2018-04-28T11:55:52
125,690,683
0
0
null
null
null
null
UTF-8
Python
false
false
3,002
py
fyb.py
import pandas as pd import json from bs4 import BeautifulSoup from datetime import datetime import re def parse_file(html_file): with open(html_file) as fi: soup = BeautifulSoup(fi.read(), 'html.parser') table = [ [td.text.strip() for td in tr.findAll('td')] for tr in soup.find('div', ...
a8bbc8134fecfdba767f2386a28c133d80e50e6c
58a4a8b6823d60d46ed26583a51c86a58b146969
/fuzzer.py
4b74c48ef2b9e5b9457f5221dc8e9ef81c51b2c0
[]
no_license
ChristopherYork98/COMP6447-Fuzzer
e799be1ad37613e203712b20c8aced098f1997d0
19f07a05b685390dfc674a8d6db4f986bc88a689
refs/heads/master
2022-11-24T08:38:35.678473
2020-07-11T19:10:34
2020-07-11T19:10:34
279,023,017
0
0
null
2020-07-12T08:27:44
2020-07-12T08:27:43
null
UTF-8
Python
false
false
4,856
py
fuzzer.py
from pwn import * import sys ############################ ##### HELPER FUNCTIONS ##### ############################ ##### FORMAT CHECK ##### def isJSON(lines): return False def isXML(lines): return False # Checks if input is CSV # Idea: # - count the number of commas for each line # - every line should hav...
274d64cf774b982554998a669b097ed0c3739d18
893a1163c7761be56c3c5c19cd08e20d0a813b02
/2019/1b.py
d8641d27c8c38cf920d6e0cfce621dca8dd1f4a0
[]
no_license
varunjm/advent_of_code
54833110595e3770797b70c50335656b6c10c1cf
777c282a8562e1856be12876c2b4691f9e533461
refs/heads/master
2020-09-23T09:34:04.864662
2019-12-20T01:31:30
2019-12-20T01:31:30
225,467,430
0
0
null
null
null
null
UTF-8
Python
false
false
268
py
1b.py
import sys def fuel_weight(fuel): if fuel < 7: return fuel additional = fuel_weight(fuel/3-2) return fuel + additional f = open(sys.argv[1], "r") weights = f.readlines() fuel=0 for weight in weights: fuel = fuel + fuel_weight(int(weight)/3-2) print(fuel)
d913c6b99f4c2108bfa3b2e43aacc347d8b08392
c38c6a416c1fa9f273e1de2d5b295b1a01aa3893
/lab2/example5.py
ff1764bb640e685547d43a738cd78dea1de6b1d2
[]
no_license
i67655685/270201016
aab268b1299101ccb6889b2328ce1161248d89c1
0ba6707ee9bc40eaeaea228b77a3a3c736a2975c
refs/heads/master
2023-02-17T19:18:23.949078
2021-01-18T09:13:20
2021-01-18T09:13:20
305,204,462
0
0
null
null
null
null
UTF-8
Python
false
false
130
py
example5.py
a = int(input("Enter fisrt edge: ")) b = int(input("Enter second edge: ")) c = ((a**2)+(b**2))**0.5 print("Third edge is :", c )
6f779999df0fb77c0b88e0869c7c53904bdce682
fc6d3281164303abc89dde8f1554622e233ac906
/programs/migrations/0012_auto_20180419_1912.py
40dbbe3c8cc42c2ddb101895e8109b25775d7d4d
[]
no_license
UCF/Search-Service-Django
46b65fb2ecfa0721f24e2785991b0976fe0f8353
5f2efbff2aae9579ff1a78216ed948f158daa4e4
refs/heads/master
2023-09-02T07:58:16.658821
2023-08-25T15:17:40
2023-08-25T15:17:40
128,795,665
0
0
null
2023-08-04T15:08:48
2018-04-09T15:44:01
Python
UTF-8
Python
false
false
398
py
0012_auto_20180419_1912.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.12 on 2018-04-19 19:12 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('programs', '0011_auto_20180419_1621'), ] operations = [ migrations.AlterUniqueTogether( name='program', ...
2009cae3d5648521351e034342e845b91b561b3d
c36679186f669c6e3bd1c106c96d4a17be1f5ab1
/Practice_Anisul/276.py
1a17799bd2b5fda7ab2178e8b1297f4eddb4e0a8
[]
no_license
touhiduzzaman-tuhin/python-code-university-life
60a3d671b200a6f5222c6d176c13c5f20f013509
6d2e3d90d430faa5c83fe79e7fb1ebe516994762
refs/heads/master
2023-03-22T15:18:10.636203
2021-03-06T18:52:04
2021-03-06T18:52:04
332,467,190
0
0
null
null
null
null
UTF-8
Python
false
false
139
py
276.py
import re pattern = r"color" if re.match(pattern, "Red is a color, I Love red color"): print("Match") else: print("Not Match")
9d6016a3d6e4d5e735aa437559a3a5380a4af5d7
47d09deda56c4bbbb03a6930e826b738d8ebb45b
/file.py
427a1e8bdbbd1f8b3c88b8b6743883c44cf6ffe1
[]
no_license
raza4399/jenkins-git
4d694d20e7b42354ded6477fd9d2b344e3b5ae2c
ae41f44520937aa20a9107c9544cdfd52401ecc4
refs/heads/master
2023-05-20T06:32:30.381530
2021-06-12T16:47:15
2021-06-12T16:47:15
375,549,515
0
0
null
null
null
null
UTF-8
Python
false
false
58
py
file.py
print("hiii") print("webhook working good") print("good")
3497f4cc43fb57e27e2661c8051d913fcab18516
a2ec559f4f05fde98f06a716ba81d4f0bba7bad0
/Maths Quiz/Maths Quiz.py
d8b75a97429f6d088dee694bacf31aafcf42a6a9
[ "MIT" ]
permissive
Software-Cat/PythonMiniProjects
083604abb7226c8e455c078909b22c6df772eb2b
3e8a150758eddfc2b21a5e8c665fd6eca850e55d
refs/heads/master
2023-01-23T01:18:46.462340
2020-12-01T05:28:14
2020-12-01T05:28:14
273,659,090
0
0
MIT
2020-08-10T12:33:46
2020-06-20T07:20:52
Python
UTF-8
Python
false
false
8,943
py
Maths Quiz.py
import random #Question Generator termNum = random.randint(1,10) term1 = [] term2 = [] term3 = [] term4 = [] term5 = [] term6 = [] term7 = [] term8 = [] term9 = [] term10 = [] connectingOperators = [] for i in range(1,termNum): connectingOperators.append(random.choice(["+","-"])) #T1 for i in range(random.randint(1...
2c65e7fecc6a677fd70e5d38411d1992dc8a77b4
3f8cc11f2322a2939a992378e1d3e478684ce770
/8_5_DGL_mit_Euler_Mittelpunkt_und_mod-Euler.py
110f31141b73d29ef6d20e1c7f02e80f75cfb461
[]
no_license
Finrod-Amandil/hm-scripts
6b37f0c0df2b6b34a9edd2b8f36ad3dd3731f3d8
ddd98ba2194933dc4654030eb4fa6a72fdb3b604
refs/heads/main
2023-06-10T04:06:02.448179
2021-06-27T14:24:39
2021-06-27T14:24:39
372,249,707
2
1
null
null
null
null
UTF-8
Python
false
false
1,927
py
8_5_DGL_mit_Euler_Mittelpunkt_und_mod-Euler.py
import numpy as np import matplotlib.pyplot as plt def interpolate_euler(f, x, h, y0): y = np.full(x.shape[0], 0, dtype=np.float64) y[0] = y0 for i in range(x.shape[0] - 1): y[i + 1] = y[i] + h * f(x[i], y[i]) return y def interpolate_midpoint(f, x, h, y0): y = np.full(x.shape[0], 0, d...
5515c849ac9bf56205cee43c73cf6f98e4c6257d
41624e7b8265f22dec48fedb81c11b390ee92bf6
/Python Coding/python_work/Emplyee_class.py
43c65288eefc37cf4623228b572d38cf62f72799
[]
no_license
laychow/Self-study
afe8b3759a0d09f3136e100ec72ab11c090cca98
f30c164eda63213d218325b958d8f729ce4444a6
refs/heads/master
2021-05-12T06:16:48.670470
2018-01-26T14:03:19
2018-01-26T14:03:19
117,215,428
0
0
null
null
null
null
UTF-8
Python
false
false
313
py
Emplyee_class.py
class Employee(): def _init_(self,first,last,salary): self.first_name=first self.last_name=last self.salary=salary def give_raise(self,increase=5000): self.salary+=increase def Information_display(self): full_name=first_name+' '+last_name print("\nName: "+full_name.title()+" "+salary);
17dd15f4961e5715622971a8778ba1a2728c3774
5f2b9f4debad9cc904d607000b1ae98de1eda9e9
/lib/python/treadmill/diskbenchmark.py
c1af118dcaba6bed98a01813da20071cba7127c7
[ "Apache-2.0" ]
permissive
bretttegart/treadmill
42ccb6123ce136292217d528fee37c8b1657ea0b
812109e31c503a6eddaee2d3f2e1faf2833b6aaf
refs/heads/master
2021-05-05T17:38:22.611431
2018-04-09T17:30:31
2018-04-09T17:30:31
103,435,056
2
0
Apache-2.0
2018-04-09T14:51:10
2017-09-13T18:18:10
Python
UTF-8
Python
false
false
8,401
py
diskbenchmark.py
"""Benchmark disk IO performance. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import io import logging import os import shutil import tempfile import enum import six from six.moves import configparser from ...
cf87d50acfb7c3951f73fffb158f9cc628763b07
053f25139f8568d609f2b02540e92bbf8bbd911e
/bin/bin-imports/motortest.py
f3309199e272fba889290bad7e5a55b0ce6b1e5b
[]
no_license
sebastian-king/UT-Region5-Robotics-2017
ac26a16df82aa251874eb9144364e371db09c604
9f48b3d4b9ceadb44f876226aca7f086174fa77f
refs/heads/master
2021-06-16T16:57:26.602317
2017-05-11T04:31:05
2017-05-11T04:31:05
null
0
0
null
null
null
null
UTF-8
Python
false
false
5,639
py
motortest.py
#!/usr/bin/env python #WHAT WE NEED TO DO: MOVEMENT TESTING #this is a simple test for the encoder and motor, the right front #import motortest in python on the pi #call initMotor() #call clockwise(1, 1), counter_clockwise(1, 1), and stop(1) #if all of the above works: #call runMotor(num_pulses), make sure it rotates ...
1d71fb1bcc6fb6115438465c4a45269ee1f1c8ee
eb4540a95b5232e0676ae53d0529a7d84d948ea1
/input.py
d783eed1d6ecab97a329c9f0d660968f4969ebb2
[ "Apache-2.0" ]
permissive
sanjushekhawat/Face-Recognition-System-using-opencv
aab2fc2f63a27c0d8824f1cd821724319450db0c
f42ece6900c84012ff57114d8198ca9470db6d76
refs/heads/master
2020-08-19T03:41:52.854460
2019-10-17T20:01:14
2019-10-17T20:01:14
215,872,933
0
0
null
null
null
null
UTF-8
Python
false
false
723
py
input.py
import cv2 face_classifier = cv2.CascadeClassifier('C:/Users/sanju/python/Lib/site-packages/cv2/data/haarcascade_frontalface_default.xml') cap = cv2.VideoCapture(0) id=input('Enter user id') sample=0 while (True): ret, frame = cap.read() gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) faces = face_...
8de83165f821a3fcd7cb5d41b24f2ac1c452b3b1
c207946edd3d8d05dbb850814524b830a451e368
/iteration.py
a68c61f97d7324de718a5de216c869979857daa2
[]
no_license
YskSt030/Python_algo
dfe53b12540d3b0bbe6fd543ae5a8e8ba200ddce
d09d5fd5063468776e604b687f5ede4920c2d204
refs/heads/master
2020-07-27T17:35:00.405653
2019-11-06T11:52:02
2019-11-06T11:52:02
209,173,717
0
0
null
null
null
null
UTF-8
Python
false
false
776
py
iteration.py
import os def line_asterlisks(n): str1 = '' for i in range(n, 0, -1): for j in range(n - i): str1 = str1 + '' for j in range(2 * i - 1): str1 = str1 + '*' print(str1) def mod(n): result = 0 while n > 0: n = n // 10 result += 1 return ...
4a0c7bff910ee91f48fd4a3036b4f4aeb647d88b
a6ca20071972c57c66640c07959dfa118aa8d581
/tests/test_random_transforms.py
250e1a4d703ad40e6bfc8cf505baba400951fc55
[ "BSD-3-Clause" ]
permissive
gregunz/invertransforms
3470fa9709a6199feb10df3b6793698ebb96bd36
1d43d4b4567b7667cccb4d19e2b11d9f566a5757
refs/heads/master
2022-10-28T10:45:51.258195
2022-10-18T16:26:21
2022-10-18T16:26:21
214,382,591
5
1
null
null
null
null
UTF-8
Python
false
false
1,951
py
test_random_transforms.py
import torch from PIL import Image import invertransforms as T import invertransforms.crop_pad from invertransforms.lib import InvertibleError from tests.invertible_test_case import InvertibleTestCase class TestRandomApply(InvertibleTestCase): def test_invert_before_apply(self): with self.assertRaises(I...
5f93f21253e91213e188fca53be038489d34207a
540d3223d74e00faec210b1491561be32e914be9
/atlas/util/vector2.py
d0af55e733e0ac8bd5d4b1921a836736c21b46dd
[]
no_license
speas038/atlas-py
7e54ba00a2ae0c58f05794756490de4aaa68b784
af733bdbc2b8209b16d364bb8577381f6d28c7fb
refs/heads/master
2021-01-23T22:39:26.198866
2013-02-05T18:05:36
2013-02-05T18:05:36
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,001
py
vector2.py
import math # rotates a vector clockwise def rotate_vector(vector, angle): x = vector['x'] y = vector['y'] cosa = math.cos(angle * math.pi / 180) sina = math.sin(angle * math.pi / 180) result = dict(x = x * cosa - y * sina, y = x * sina + y * cosa) return result # Finds the angle that passes ...
822066006adca6ffb721f6549f2a5836c65c84f2
70a48b4e28579fd19c4a640a947bfee13a365efc
/notes/urls.py
1ae9099432ca6a520b5274a3b703b2a7604b6333
[]
no_license
2379415638/Main6
251a227a045e6cb1fc607504389dae504027ed01
fb684cd24565e33e7ff0c10e2f4de5a1c187367f
refs/heads/master
2021-09-01T08:52:20.053222
2017-12-26T03:28:40
2017-12-26T03:28:40
115,381,732
0
0
null
null
null
null
UTF-8
Python
false
false
795
py
urls.py
from django.conf.urls import url from notes import views urlpatterns = [ url(r'time',views.time,name = 'time'), url(r'^$',views.index,name = 'index'), url(r'^topics/$',views.Topic,name = 'Topic'), url(r'^topics/(\d+)/$',views.topic,name='topic'), url(r'^topics/(\d+)/(\d+)/$',views.entry,name = 'entr...
b3d77535b79ed79da408f8fae7b58d54fee441f0
a418c7510f86943a104fb4a77ee95fb078c52d8c
/runtime/base/game/actors/CCamera.py
1bced0f0f49157087f3fec2d1ea5b84ffce9a7c5
[]
no_license
chainsheep/sylphis3d
42d1bf3d2980e3e4875279369d7bce7d8f9ee1d4
9462a9569de1f2e824ecb152722c249602edfeb7
refs/heads/master
2020-04-08T13:26:35.158959
2015-02-15T22:58:48
2015-02-15T22:58:48
null
0
0
null
null
null
null
UTF-8
Python
false
false
2,688
py
CCamera.py
""" This file is part of the "Sylphis" 3D engine Copyright (c) 2002 - 2007 by Harry Kalogirou Copyright (c) 2013 Charilaos Kalogirou. All rights reserved. Redistribution and use in source and binary forms are permitted provided that the above copyright notice and this paragraph are duplicated in all suc...
eea3db5a2ea0fd1368732d3c1f6dce3306a87b4b
1c6be2ae80823f30a580656d2f1e99ac57e67094
/StudProjects/team02/App/Algorithms/get_test_results.py
d4e138caec63eb2c385e4b29614b4e5e09243f12
[]
no_license
lauradiosan/MIRPR-2019-2020
3eb799f4af62abbd597389cf6b1859a3e7026673
b7154e763dd1eeb4ad5fa9ca2fd2109682824dea
refs/heads/master
2023-01-12T03:20:35.950502
2020-09-26T08:34:09
2020-09-26T08:34:09
210,589,829
10
23
null
2023-01-07T13:39:43
2019-09-24T11:49:24
Python
UTF-8
Python
false
false
2,675
py
get_test_results.py
import cv2 from tinydb import TinyDB, Query from config import * global db_path db = TinyDB(db_path) def read_test_labels(): """ Read the file containing labels for the test images :return: dictionary of type (slot -> occupancy) """ print("reading labels") global test_dataset, test_labels ...
1aa2fb8b34eec7ef1ec191783e3dff8639afb9e0
fa0b0ae3fa60b9ee449ee834176f0eeb2a79fc7e
/django_exercise/cron_tasks/cron_tasks.py
64e10afb2fa4aae416389404c254c135061efe9c
[]
no_license
billjyc/girls_django
ef06564a0ead23aec80a795b0d9b7d9d7ad80339
83b7fef7069a1247fa3a362af6709fbb7a7e64a7
refs/heads/master
2023-09-04T01:32:34.232738
2023-08-31T08:51:53
2023-08-31T08:51:53
107,850,642
2
0
null
2020-09-10T23:58:59
2017-10-22T08:50:48
Python
UTF-8
Python
false
false
312
py
cron_tasks.py
# -*- coding: utf-8 -*- from celery.schedules import crontab CELERY_BEAT_SCHEDULE = { 'update_weibo_follower_count': { 'task': 'snh48.tasks.update_weibo_followers_count', 'schedule': crontab(minute=12, hour=21), 'args': (), # 'options': {'queue': 'your_queue_name'}, }, }
559ac8e1cb26ac489f73f289115c0e3ffcb7ff7a
c792277f5565350c52d08790807f1ca8866970f6
/src/dbtease/warehouses/base.py
0c85d821d0fd242a9e89e52bfad32e5f60ef3edd
[ "MIT" ]
permissive
tailsdotcom/dbtease
d3e7c4403e1d10258e40da869500bc6b0df262b1
87a2d3bbc5f34723b8a56ac0c50e33cab4f77e1c
refs/heads/master
2023-06-19T14:14:10.567995
2021-07-26T10:53:16
2021-07-26T10:53:16
359,438,235
2
0
MIT
2021-06-08T11:35:05
2021-04-19T11:41:54
Python
UTF-8
Python
false
false
2,879
py
base.py
"""Base warehouse class.""" import datetime from abc import ABC, abstractmethod from dataclasses import dataclass from typing import Union, Tuple, Dict, Optional, List import click import uuid from contextlib import contextmanager @dataclass class Sql: """Container for a statment with optional p...
88af65b1dbd7d13cfe04ce58a8aef1818ee371a6
3ff9b25ff0273ec663549a3efb98944067e66334
/D_Day7/package/pack/hii.py
02da105de8f2db0711fa56b22da851156d89635f
[]
no_license
devendra3583/Python
b18a2123be8d9b4ae9ae8bb2532a859981ef2ae0
cfca2931645c78e863447c200ad773c9cfbdcb8b
refs/heads/master
2022-06-04T18:54:27.401351
2022-05-17T06:42:55
2022-05-17T06:42:55
237,605,238
0
0
null
null
null
null
UTF-8
Python
false
false
63
py
hii.py
def add(x,y): print x+y if __name__ == "__main__": add(3,4)
e69a02aa856f54cf13325eb99d8bd3fb0bc5ee7b
bbde4aef8c09e1db387ed0585298aad9fb03ade4
/skinnywms/data/mvfs.py
ce5de0d0cb4400b723e7e7c477ffa9422cf9534e
[ "Apache-2.0" ]
permissive
ecmwf/skinnywms
d30fd04a2859b74f99c1838525e35171a00983d5
d486f272d47130fca76b846292421d1f00133480
refs/heads/master
2023-08-11T03:31:37.531534
2023-06-29T12:22:04
2023-06-29T12:22:04
200,835,726
48
28
Apache-2.0
2023-07-18T13:03:00
2019-08-06T11:12:36
Python
UTF-8
Python
false
false
8,564
py
mvfs.py
# (C) Copyright 2012-2019 ECMWF. # # This software is licensed under the terms of the Apache Licence Version 2.0 # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. # In applying this licence, ECMWF does not waive the privileges and immunities # granted to it by virtue of its status as an intergovern...
f1f28ab3390f80d7b346fb432e6bf30a55a3db73
eba2e4b8a2d0fde59c416b03c0af80a1b0e38f4b
/Q1/dataloader.py
b9bc18c672ef140c78c5bdc290578c65fcd85868
[]
no_license
LEE-JAEHA/NN_HW2
628567037c2d81979a8a5bc4f1a9d43e57a04993
4a8800981c942afc42332e67944fc4c75c2a5484
refs/heads/main
2023-05-27T12:47:07.866736
2021-06-06T13:01:33
2021-06-06T13:01:33
368,065,637
0
0
null
null
null
null
UTF-8
Python
false
false
2,331
py
dataloader.py
import torch import torchvision import torchvision.transforms as transforms ######################################################################## """torchvision datasets은 pickle module로 객체 구조를 갖는 cifar10 데이터들을 serialize, pickle 설명> https://pythontips.com/2013/08/02/what-is-pickle-in-python/ pillow library로 ...
72c038e230addefbdb0e2c7db5f203a211f07d1e
6d7a00c44b4d5ad44d786a0bb684b892efc1a4a0
/analysis/feature-covariance.py
8400817222621f4e3fd136fd2af1910abe880cb6
[ "MIT" ]
permissive
jrbourbeau/composition
397c387e698fc32bd23303699dcc036dbd8edf4c
f8debd81b0467a6094d5ba56a5f0fc6047369d30
refs/heads/master
2021-01-10T18:08:35.018994
2016-11-22T21:44:59
2016-11-22T21:44:59
71,941,695
1
0
null
null
null
null
UTF-8
Python
false
false
2,679
py
feature-covariance.py
#!/usr/bin/env python from __future__ import division import argparse import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn.apionly as sns from sklearn.metrics import accuracy_score from sklearn.model_selection import StratifiedShuffleSplit, cross_val_score from composition.analysis.l...
0911b17c48dedeb6d73da828032083c5b42f04ea
1fc0d2ad5b4bcfde3e0af2dcddae9d25e7fa73ce
/searchdir.py
3ac7521925644731769678ce9685f77028b47526
[]
no_license
smithc0222/FlaskMaintenanceApp
27e8391c55897a11ad748c6aefaa42da3c33a0d9
e43c62529e02e68c8ae4877784e45de5cda4d82d
refs/heads/master
2021-01-12T04:01:06.603226
2017-01-19T18:10:56
2017-01-19T18:10:56
77,468,926
0
0
null
null
null
null
UTF-8
Python
false
false
2,184
py
searchdir.py
import os,csv testlist=[] comparelist=[] comparelist1=[] successlist=[] faillist=[] with open('testlist.csv', 'rb') as inp: valid_rows=[row for row in csv.reader(inp) if any(field.strip() for field in row)] with open('testlist.csv', 'wb') as out: csv.writer(out).writerows(valid_rows) with open('testlist.csv...
161ff45bde22fe7a9050fcc644ce05b97965831d
72c3bd0436eee908d848f32308509c663285cf20
/Shape.py
3fea62dd269ec04ab4dd63587c3a17c5ac20cf9e
[]
no_license
DeepTrial/EasyLabel
edb2bbc4d61fedaddbdccbd241c14846ad0cbdbc
dabdefd67fb9cb96af6ba59743eb36b69166060d
refs/heads/master
2020-05-14T19:11:06.552702
2019-04-24T08:47:01
2019-04-24T08:47:01
181,924,759
0
0
null
null
null
null
UTF-8
Python
false
false
3,286
py
Shape.py
from lib.SHAPE_LIB import * from lib.JSON_LIB import * class ShapeLabel(): def __init__(self): self.shape_dict=[] self.shape_name=["keep_in_save","rectangle","polygon"] self.skip_label=[] self.data_dict={} self.saver=JSON() def clear(self): self.shape_dict=[] ...
b83e813ea432752e9e8fa5ef53b46defae1e6ad1
e17af622d1cd98a3f7da95363142148c6d32289a
/hello.py
688c120b8459c8cc7c990efe52677f81b59ee2bf
[]
no_license
olwenwilson/my_first_app
54a1eae8e6e11bbd1b915171a23b49565f14a744
e33f48295b0f2aebf5ca9312ca465426fe35a981
refs/heads/master
2021-04-15T11:46:26.581453
2018-03-21T20:39:05
2018-03-21T20:39:05
126,237,565
0
0
null
null
null
null
UTF-8
Python
false
false
1,058
py
hello.py
from flask import Flask, render_template, request app = Flask("MyApp") @app.route("/") def hello(): return "Hello World!" #@app.route("/idontexist") #def idontexist(): # return "I do exist now!" #@app.route("/Olwens_here") #def Olwens_here(): # return "Yes I'm here!" @app.route("/<name>") def hello_someone(name...
eb480449259239f73bfd5c356a0876fcfbd8e653
a68c54397ce93a69349e873d5c59876aa6e06e8d
/2. General/5.challange100.py
ea2b4b499366f84e34dace1236bc291a1841ce63
[]
no_license
josetapadas/cryptopals
373da76e244e6439508af1cd0ba69eb81612d6af
b9b8c5b0fdcba5c507f27bc8bba4130c3ec655f1
refs/heads/main
2023-08-04T09:19:46.649439
2021-09-14T08:47:12
2021-09-14T08:47:12
406,290,385
0
0
null
null
null
null
UTF-8
Python
false
false
1,328
py
5.challange100.py
import pwn import json import base64 import codecs import random from Crypto.Util import number remote_server = pwn.remote('socket.cryptohack.org', 13377, level = 'debug') def read_message(): line = remote_server.recvline() return json.loads(line.decode()) def send_message(object): line = json.dumps(object).en...
f1a22f122fe55298c77cd9bce118162d60239796
7346c1a2eb900be5caa24a2662527206be7d4fdd
/homepage/views.py
6e3cb20d918e15776921f31e5588cd709392d52d
[]
no_license
shayweitzman/BossDiary
a1a6f13b593306892282a4ba988b543c1e3d6a65
d85b8e08a8f3cb5929936f19c04ae0a0bd247365
refs/heads/master
2023-03-01T10:35:48.007159
2021-02-08T19:55:40
2021-02-08T19:55:40
336,585,460
0
0
null
null
null
null
UTF-8
Python
false
false
224
py
views.py
from django.shortcuts import render, get_object_or_404,redirect from workers.models import Worker, Job as job from workers.forms import JobForm def homepage(request): return render(request,'homepage/homepage.html')
a2721e5022baff4efed004300ff0f8f4439bbd9e
4f54bc04548c5179c0fed810b0ee573fd9cfd00d
/1-basic/3-decision/6-counter/bot.py
688daecd0d8ed8f041c0114902d81b2f613520cb
[]
no_license
m07yannis/com404
55ed08d3af6af03031773fc61c44aa9906543230
c04e7be9afae15550f231fa72f7d68dd502169fa
refs/heads/master
2020-03-29T22:54:14.980850
2019-07-02T22:58:07
2019-07-02T22:58:07
150,446,595
1
0
null
null
null
null
UTF-8
Python
false
false
465
py
bot.py
print("Please enter the second number") number_2 = float(input()) print("Please enter the third number") number_3 = float(input()) #declare some counters evens = 0 odds = 0 if(number_1 % 2 == 0): evens = evens + 1 else: odds = odds +1 if(number_2 % 2 == 0): evens = evens + 1 else: odds = odds +1 if(num...
5ebaad5d71e5c7d363d0be4906f3654d2cd678d1
b8f251205d6dfe927e6cbbb8415ce34669ec8d6a
/centipede/tests.py
a94c8ab39354a333bdd76b4c9307df0d9283583f
[]
no_license
zexindai/otree_centipede
18a2c784548f48217b13f3b5b673cb25e9fad94f
55ac7ae7f3cc7ae5c98fc9050b80ee2a1b080797
refs/heads/master
2023-05-27T20:18:13.445824
2021-06-15T08:56:53
2021-06-15T08:56:53
null
0
0
null
null
null
null
UTF-8
Python
false
false
438
py
tests.py
from otree.api import Currency as c, currency_range from . import pages from ._builtin import Bot from .models import Constants import numpy as np class PlayerBot(Bot): def play_round(self): if self.group.game_on: coinflip = np.random.binomial(1, 0.9) if coinflip == 1: ...
d84288fe8f8c85255f2c2ba67ff0cd6e322f116f
e53431b669ce4c557eb8c354326de7ba492ca77f
/twisper/products/models.py
794ec1253374da141d4555e54506ee7f831507a9
[]
no_license
RohatV/SWE573-Rohat_Vural
3af397742b8c0eea3c9ca2f16479746a187947a9
1563630dd9f7713b45c5d57647af8845a6772d5b
refs/heads/main
2023-02-27T10:49:38.472205
2021-02-02T12:56:51
2021-02-02T12:56:51
309,325,536
0
0
null
2021-02-02T12:45:53
2020-11-02T09:49:22
Python
UTF-8
Python
false
false
467
py
models.py
from django.db import models # Create your models here. class tweets(models.Model): query= models.CharField(max_length=20) tweet = models.TextField(null=True, blank=True) #favoriteNumber= models.IntegerField(default=0) #retweetNum= models.IntegerField(default=0) author = models.CharField(max_lengt...
634c8a63ef3c777a8739b317ed5dc94582cb0a05
dd3e22041f168f8188d4d34a286fa19fb020d3ac
/resume_site/migrations/0002_auto_20210304_2243.py
10592d0f1f3bf08e7e5a7c0b75284bec189a715c
[]
no_license
Akassh09/resumefry
296288134ad5a9aa187c1484149d8542a84fde08
faaac1224f117b56dc0e972d318d6a55c18308c5
refs/heads/main
2023-04-07T11:34:18.790315
2021-04-15T14:51:53
2021-04-15T14:51:53
null
0
0
null
null
null
null
UTF-8
Python
false
false
531
py
0002_auto_20210304_2243.py
# Generated by Django 3.1.2 on 2021-03-04 17:13 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('resume_site', '0001_initial'), ] operations = [ migrations.AlterField( model_name='cv', name='dateofEnding', ...
5933b4ff2c85a039fa6508e15315c3516afff285
4893f02f8e3107f6f97afe62b6520d06a5299cb8
/src/analyzer.py
824770e7d76e2f1ed9bc22cb2e3ad8cab431b26a
[]
no_license
fgirardin/worldtour
0a1162a71baf8ba75ba9d7206a3b2c6b5695297e
5ae288651a33b788cee3f95f919d0048e22334da
refs/heads/master
2022-04-22T22:12:04.762069
2020-04-21T22:00:14
2020-04-21T22:00:14
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,610
py
analyzer.py
"""Analyzer module: utilities to manipulate list of cities.""" import pandas as pd def normalize(x): """Normalize longitude.""" if x < -0.2: x += 360 return x class Analyzer(): """Class to analyze and manipulate list of cities.""" def __init__(self, file): """Init class.""" ...
246f49a05b6d9a130407ea2b539f0d504af69edf
8d575ac0b9dc9eac2f4de464247be8a56b29fe27
/claand/contactos/migrations/0015_auto_20150414_1858.py
622ddd6ffb9eec56aa32a69326183132d141d6cd
[]
no_license
juliannieb/claand
c5a525b9439967d54dbfe6cd15dc28cbbc2a7178
4b918c3d1e3867a81f54fbf50a29b3f697df72cc
refs/heads/master
2021-01-17T20:59:03.204457
2015-05-13T01:55:26
2015-05-13T01:55:26
null
0
0
null
null
null
null
UTF-8
Python
false
false
688
py
0015_auto_20150414_1858.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('contactos', '0014_auto_20150408_0005'), ] operations = [ migrations.AlterField( model_name='numerotelefonico', ...
c892b34d0343c9f74b0150b4ff6c7fa29d6f5342
8987232c04df87abfe7bbd3825f33469b2fcce71
/nextalbums/discogs_cache.py
04475590c9b3788e697a2cd8bcd449c65260701b
[ "MIT" ]
permissive
seanbreckenridge/albums
38bce9245034f421be6fd71ca27ab30714c765cb
f28241bfce50dfc8e143b1f522d15660f93530fb
refs/heads/master
2023-04-13T14:44:55.265364
2023-04-12T22:04:01
2023-04-12T22:04:01
126,751,465
7
0
MIT
2021-06-02T01:41:39
2018-03-26T00:09:21
Python
UTF-8
Python
false
false
3,743
py
discogs_cache.py
""" uses https://github.com/seanbreckenridge/url_cache to cache discogs API data locally """ import os import functools from functools import cache from typing import Any, Dict, Tuple from datetime import datetime from urllib.parse import urlparse import requests import backoff # type: ignore[import] import discogs_...
feba8dbcbd1cee45721e5bdea2de0bd8868baa2c
2305ce053d16652d31823bd07faf38553b4f9b63
/books/AutomateTheBoringStuffWithPython/Chapter16/P05_textMyself.py
236e155e988cd03029316a5c3be47de84387148a
[ "MIT" ]
permissive
leihuagh/python-tutorials
cff3c5e250a152252d4b725bca19f55721483249
33831b983d7bd1491e367b6c7654e687d5ba709b
refs/heads/master
2020-03-29T17:59:31.226400
2018-09-24T08:41:26
2018-09-24T08:41:26
null
0
0
null
null
null
null
UTF-8
Python
false
false
560
py
P05_textMyself.py
#! python3 # P05_textMyself.py - Defines the textmyself() function that texts a message # passed to it as a string. from twilio.rest import Client # Preset values: filepath = '/home/jose/PycharmProjects/python-tutorials/books/AutomateTheBoringStuffWithPython/Chapter16/twilio_info' with open(filepath) as config: a...
8f5d9918260e2f50fb229a7067f820a186101b99
43ebc9ebc42d5634c7138b12ef892b345d83cd40
/src/python/peakFinder.py
8252c112571e72e239c148655b8f24746f8cb8d6
[]
no_license
duythanhphan/waveletPeakFinder
1df531f39ebb2fc59d220ce0b106ecf19d318707
b295cdea464a217b5af4541e34780fdca6107279
refs/heads/master
2020-06-05T04:51:48.799843
2014-01-12T18:09:36
2014-01-12T18:09:36
18,260,496
0
2
null
null
null
null
UTF-8
Python
false
false
6,350
py
peakFinder.py
import numpy as np from scipy import stats from scipy import interpolate from math import factorial from scipy import signal """ A continuous wavelet transform based peak finder. Tested exclusively on Raman spectra, however, it should work for most datasets. Parameters ---------- lowerBound: The lowest value of the...
e51c0d8c6430603d989d55a64fdf77f9e1a2397b
8a85eb9b50864626cd2674f15b07df3d5dbe0b73
/neo/test/iotest/test_exampleio.py
7dd3b2c7629022a38a5fc5664b21ea771fbd5bb7
[ "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
NeuralEnsemble/python-neo
287d3457a44c45f4dcbee0e9f9a2a5d83142de69
354c8d9d5fbc4daad3547773d2f281f8c163d208
refs/heads/master
2023-09-06T03:29:34.835053
2023-09-01T09:17:14
2023-09-01T09:17:14
3,949,530
265
213
BSD-3-Clause
2023-09-14T19:09:24
2012-04-06T12:48:48
Python
UTF-8
Python
false
false
3,966
py
test_exampleio.py
""" Tests of neo.io.exampleio """ import pathlib import unittest from neo.io.exampleio import ExampleIO # , HAVE_SCIPY from neo.test.iotest.common_io_test import BaseTestIO from neo.test.iotest.tools import get_test_file_full_path from neo.io.proxyobjects import (AnalogSignalProxy, SpikeTrainProxy, E...
57b51ea36e9e2a095cf7e9646db2cc400cc72b83
4cd70ee39ae94c7c4cb9c634bf86e9cb90524aa8
/MESA_Models/main.py
84c86c112d581aef6102fc517f08bfcc72b445e7
[]
no_license
jamesilloyd/IP_Festo_Fetch.ai
afadb1a04af2ffdec45c5310ab9edc9e364c6ae1
dbb078661efc03fe49742fde6dbac30f7054d02f
refs/heads/master
2023-06-07T01:57:55.965053
2021-06-24T10:51:47
2021-06-24T10:51:47
335,610,281
1
0
null
null
null
null
UTF-8
Python
false
false
12,236
py
main.py
from mesa.visualization.modules import CanvasGrid from mesa.visualization.ModularVisualization import ModularServer from mesa.visualization.modules import ChartModule from mesa.batchrunner import BatchRunner from agentPortrayal import agent_portrayal import metrics from matplotlib import pyplot as plt from Architecture...
f5dffa3c22bb35ed07cb5ca28f2ba02ea3c07dda
98248ae1cb620ab95481cbf76623c83033020de4
/SpaceInvaders.py
d7ba426b4ea92931dcccf1e3f35ec9670e9581c9
[]
no_license
Rloaded/SpaceInvaders
c994e3c2b90e7bfa45531e24e730b8e8daf3a66f
c2b207bdc13b42b7ccb339ecc8be2181fce201c4
refs/heads/master
2023-03-23T06:26:37.004735
2020-04-27T15:29:38
2020-04-27T15:29:38
259,380,920
0
0
null
2021-03-20T12:59:32
2020-04-27T15:57:13
Python
UTF-8
Python
false
false
7,662
py
SpaceInvaders.py
import math import random import pygame pygame.init() SCREEN_WIDTH = 800 SCREEN_HEIGHT = 600 screen = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT)) clock = pygame.time.Clock() pygame.display.set_caption('space invaders') background = pygame.image.load('background.png') score = 0 previous_score = 0 score...
e2e4adaa8f7f62662e0c2915faff1bed72986351
ef3ed0015180595283050b307929cca76b10e64a
/datashield/hash/admin.py
fc1972cf6920121dce8fbb8b22603c3dc5c315b8
[]
no_license
diaakasem/dpctero
00aa0f4b7103fc8920207142b29f73697d9de6d0
92e7b079b90e100218102ac7c54b1cb11a3090d2
refs/heads/master
2016-09-06T15:10:35.970308
2015-08-30T17:07:04
2015-08-30T17:07:04
38,624,597
1
0
null
null
null
null
UTF-8
Python
false
false
84
py
admin.py
from django.contrib import admin from .models import Hash admin.site.register(Hash)
d8af43d24a2f2b99bc8b5098f251e017852d6d86
41126ab1a3cdf7c514ad91eb531eecc19eae2382
/executors/base_executor.py
c67015e1202bd509194c76091e39211f21e20424
[]
no_license
lenashanchuk/linux_command_executor
9079bcc3e4a486892155cf007efa33f63292404a
16c4da8b852cc98109da12c4482d176752bb03f0
refs/heads/master
2020-05-02T16:32:21.620370
2019-08-01T21:55:26
2019-08-01T21:55:26
178,071,664
0
1
null
null
null
null
UTF-8
Python
false
false
465
py
base_executor.py
import subprocess class BaseExecution: def __init__(self, flag, parser): self.flag = flag self.parser = parser def execute(self): process = subprocess.Popen(f'df {self.flag}', shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) output, err = process.communicate() ...
2f2030107f3a23c0d2f404a838eaccc8b35ac410
4600b34f7368d2dcdbe720bf866f72dbc5eba9fb
/python_lesson/Exercises/example_9.py
e7d7f387c8e33b7e3f1cae7f813eecb25acc3e35
[]
no_license
htasoftware99/CENG111-PYTHON
330cac76c93502075ba1b44fab7646283d41328d
9a4c3e3e3204d6347c10bc0aae35a84417d7d24e
refs/heads/main
2023-08-30T11:54:42.093397
2021-10-06T17:25:20
2021-10-06T17:25:20
412,164,709
0
0
null
null
null
null
UTF-8
Python
false
false
139
py
example_9.py
fahrenheit = float(input("Enter a fahrenheit degree: ")) celcius = ((fahrenheit - 32) * 5) / 9 print("From fahrenheit to celcius", celcius)
c4fbf206482a04f3e2d2aa98a0dbf525a176c4e7
e938197f9f5a4d24779867ad5d77de136327fe30
/test/test_grocery_functions.py
7db2000d653492aee86bda244b44ffd002a16848
[]
no_license
norazulick/GroceryApp
462d6387396c0675e0deb72f8770b90fcf796bb8
8fe78f5c7a967cc9e0955a8820112e9c4d6608dd
refs/heads/master
2021-06-29T16:54:24.107883
2017-09-19T05:15:37
2017-09-19T05:15:37
null
0
0
null
null
null
null
UTF-8
Python
false
false
3,699
py
test_grocery_functions.py
__author__ = 'Joe' import sys sys.path.insert(0,'../src/') import grocery_functions import unittest class TestGroceryFuncs(unittest.TestCase): def test_getRecipeNames(self): recipe_names = grocery_functions.get_recipe_names("test-recipes") self.assertTrue(recipe_names[0] == "Cajun Chicken & Rice"...
a7db627c49b53cd3a073d866a0373336a46b4053
1161ce74b4ef413f417af72c52d02385bc5176ca
/exceptions_tree.py
c6efdb90a3e31e2a757a70f1a32fdfc389ae3b4e
[]
no_license
iddoberger/python3_exceptions
e9c4024a7eb92ba5fdd03f6f4ac895afa811f9b1
480aeb71a0c7e87521751d1f9e22a1073a8ade40
refs/heads/master
2021-01-25T10:07:35.062409
2018-02-28T21:23:01
2018-02-28T21:23:01
123,341,386
0
1
null
null
null
null
UTF-8
Python
false
false
2,304
py
exceptions_tree.py
from graphviz import Digraph dot = Digraph() dot.edge("BaseException", "SystemExit") dot.edge("BaseException", "KeyboardInterrupt") dot.edge("BaseException", "GeneratorExit") dot.edge("BaseException", "Exception") dot.edge("Exception", "StopIteration") dot.edge("Exception", "StopAsyncIteration") dot.edge("Exception",...
438efbaf35401a29ea5408fee3b49b85f237760e
10ae42799b92ae281c35777d3614eede7c4cfeab
/home/migrations/0011_auto_20170512_2248.py
6fde9c25b309598abb1f3ff873dbee726dcebbd8
[]
no_license
Barsom/my-first-blog
487162f99f0d58503613e0ea5c76457646edd488
7b15731f4cb8433e646624912be1e75f475b65b2
refs/heads/master
2020-12-30T13:39:23.189341
2017-05-15T14:23:49
2017-05-15T14:23:49
91,237,609
1
0
null
null
null
null
UTF-8
Python
false
false
620
py
0011_auto_20170512_2248.py
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-05-12 20:48 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('home', '0010_auto_20170512_2248'), ] o...
15596b4c3d58bba8e277ed58b06fecf6d2259b19
c220d80ffd70a17b9c3e70addd39b7ab2fa192e1
/TP-Link-Device.indigoPlugin/Contents/Server Plugin/tpl_relayswitch_poll.py
a0239e2d80bae64f1e8c3ea6437c7d5ae80acca7
[ "Unlicense" ]
permissive
jtburgess/indigo-TP-LInk
f8c19fafb08c8e501ca7cff0f0c6fbc83831fc86
9799edc910cd538922b9cb32990993703e8e5a11
refs/heads/master
2023-06-12T23:16:08.693255
2023-05-27T22:49:20
2023-05-27T22:49:20
142,224,556
2
5
Unlicense
2019-09-17T21:48:30
2018-07-24T23:57:46
Python
UTF-8
Python
false
false
10,278
py
tpl_relayswitch_poll.py
#! /usr/bin/env python # -*- coding: utf-8 -*- #################### import indigo import inspect import json import pdb from threading import Thread from time import sleep # only works for Relayswitch devices from tplink_relayswitch_protocol import tplink_relayswitch_protocol from tpl_polling import pollingThread ##...
0d5af65d27b460db68f7d33f251e6c320783a649
bc4e5665a0e1b272f19a5a4ee0f3bd825254ec5f
/Listas_ex_Valores_unicos.py
329411bf4bad48f96ab049955410b992089e7dfb
[]
no_license
LeandroAzevedo-1/Listas_Dicion-rio_python
44ffe21f1b8674ee3bbc62b050ab6224be4c4dd4
ae2d6bccd52c3943a1126c5f13e778bd75380793
refs/heads/master
2023-08-31T12:21:49.721545
2021-10-27T21:31:22
2021-10-27T21:31:22
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,461
py
Listas_ex_Valores_unicos.py
'''Crie um programa onde o usuário possa digitar vários VALORES NUMÉRICOS e cadastre-se em uma LISTA. Caso o número já exista lá desntro, ele não será adcionado. No final ,serão exibidos todos os VALORES ÚNICOS digitados, em ordem CRESCENTE''' '''Vamos criar uma lista que não sabemos quantos valores podem serem acresc...
3d370030279d816b820dcd51f4610ebb23fdfa8b
85e50dc8487701f0c15c72141681c849021d9826
/news/admin.py
5c750674d81bb747173971a93e4aded1b72b06a5
[]
no_license
sadakchap/news-aggregator
4c46a9b3ab18cf4c693dff2c71c9c7fc58f1ee1c
dbd7e031d783f9cc9cf9e652be8b70d73d53d9cb
refs/heads/master
2022-12-09T12:34:43.929043
2021-06-02T01:46:30
2021-06-02T01:46:30
199,251,857
0
0
null
null
null
null
UTF-8
Python
false
false
120
py
admin.py
from django.contrib import admin from .models import NewsBox # Register your models here. admin.site.register(NewsBox)
38f3e388bb9db6ace0aedb03fe4eb5d088956758
32f115a9fcaaa6e3e0de7a1c7a4a198928b2a31f
/tests/example.py
b3f370562b3b30c099f696850b67fc8b666b7115
[ "BSD-3-Clause", "CC-BY-3.0" ]
permissive
caltechlibrary/urlup
4cfb11484aa762f8cba8aa74e79cb3064dc75766
5d1cdb87e85c0650bb4732ebeaf71444408e4a59
refs/heads/main
2021-06-11T05:12:35.949903
2021-03-09T22:19:16
2021-03-09T22:19:16
128,484,671
3
0
null
null
null
null
UTF-8
Python
false
false
482
py
example.py
#!/usr/bin/env python3 # Simple demonstration of using urlup programmatically. # This requires urlup to be installed on your system. from urlup import updated_urls for result in updated_urls(['http://caltech.edu', 'http://notarealurl.nowhere']): print('Original URL: ' + result.original) if result.error: ...
be780f7ce33a47a2b2617fb6850ce21cd2e4e6f8
934005e036e7eb51fab75854d6fb4289790232a9
/Canny.py
f019521db59dc09251d81230e9e4817bcff8676d
[]
no_license
SuperTou4a/ML_CourseProject
eed471732d8d547ed18a7a3fc82d409be5a065d1
def4b09376c86618532e5fa354854229e0d3b0cb
refs/heads/main
2023-05-27T00:42:11.446767
2021-06-20T14:45:24
2021-06-20T14:45:24
378,628,181
0
0
null
null
null
null
UTF-8
Python
false
false
4,284
py
Canny.py
#!/usr/bin/env python # coding: utf-8 # In[233]: import numpy as np import cv2 as cv import os from matplotlib import pyplot as plt # In[234]: #读取图片 def read_directory(directory_name): array_of_img = [] for filename in os.listdir(r"./"+directory_name): img = cv.imread(directory_name + "/" + file...
a375a94d354b605eac27f9c829ab7a1f8654ba92
bf554882bcacd13c8754ef91f5c23bb3bddd85f9
/bang.py
b7f0a09a7aecf70364f77b8a265bfd29007d4b6b
[]
no_license
azumads/selenium
4cd206afdca2252de07fb125ed5c86e7f98a7a70
7b60d63b8d6464d24decfc9ff85ed80d14ea7b89
refs/heads/master
2021-05-24T04:27:04.087193
2021-03-30T06:24:15
2021-03-30T06:24:15
65,370,724
1
0
null
null
null
null
UTF-8
Python
false
false
4,264
py
bang.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import os import re import csv import stat imports = '''import new, sys, csv\n''' setups = ''' self.driver = webdriver.Chrome() self.driver.set_window_size(1280, 1024) self.driver.implicitly_wait(15) ''' sendkeyRe = "send_key...
b2debdea13e020ca52c94da06cab541252f7eb4c
6bbec53d2871d42ecbbd2515151c76e4cc377cde
/NNRunViewer/NNRunViewer/Scripts/data.py
a505f687bb8fca548bc7beb8a9e6a9fea428dea8
[]
no_license
Bradpat28/NeuralNetworkGeneralization
d0225c02125e87dcde1d5056974b0c4bbe469b41
b13d43cd6e4956231008be722b3bad5d0a50db16
refs/heads/master
2020-03-19T22:30:28.005755
2018-06-11T19:38:49
2018-06-11T19:38:49
136,972,363
0
0
null
null
null
null
UTF-8
Python
false
false
601
py
data.py
import timeit from parseHelper import parseNNRunFile import pickle def manageData(filename, dir): print "\t--------------" start_time = timeit.default_timer() print "\tManaging Data..." #Create a NNRun object to represent the NNRun nnRun = parseNNRunFile(filename, dir) nnRunFile = open(dir +...
662df8b4b56e4ded48c9ffbf7de4be6e809d7b32
6a35a228bdf76882132a43d04730d69190df0fc7
/weatherterm/core/enum/base_enum.py
4c1d091fa16b09ef17a80a97fa347817bbb04daf
[]
no_license
MikeJSantos/weather-terminal
c27f60c91cce067a30de2f6b53069643e84279c5
4488a5e658e41c3be4087eeaa1281cd7234313f9
refs/heads/master
2022-11-29T04:05:46.567656
2020-07-30T20:06:23
2020-07-30T20:06:23
282,965,281
0
0
null
2020-07-30T20:06:24
2020-07-27T17:16:23
Python
UTF-8
Python
false
false
253
py
base_enum.py
from enum import Enum class BaseEnum(Enum): def _generate_next_value_(self, start, count, last_value): # Overriden so that enums derived from BaseEnum with auto() # properties will get same value as property name return self
c3722945f761158db83cf2013da96191e8efd415
5ea782aed1844b8e4e61bb1dd5b6d89498866710
/api_basic/views.py
d263c811d669c758f7133703354c749f26721a99
[]
no_license
oduorsamuel/Electonic-Market-Place
5637e810dc845f46a721ce594856c641ec876138
e020e19180ef1ae59261b094be10b17e9da509d3
refs/heads/main
2023-03-01T07:19:08.807672
2021-01-27T12:44:37
2021-01-27T12:44:37
324,717,063
0
0
null
null
null
null
UTF-8
Python
false
false
6,565
py
views.py
from django.shortcuts import render from django.http import HttpResponse, JsonResponse from django.views.decorators.csrf import csrf_exempt from rest_framework import status, generics, mixins from rest_framework.decorators import api_view from rest_framework.parsers import JSONParser from rest_framework.response import...
bba94fb06d276fb85b391b55a3a0c67d385b6260
72e390c7a6446db4317b69530c19fe241474c6ae
/configs.py
2e9faf79d0456da5b052fbbe21c1753b9e95119a
[]
no_license
jtyuan/RacetrackEmulator
16b25b7f5f3cbb125f2743a2d6bcc3b8eca23300
4e49a5657b84e9bc66986e08bfa2c04a87b37628
refs/heads/master
2021-01-01T18:23:22.677341
2015-01-25T16:13:03
2015-01-25T16:13:03
29,723,612
0
0
null
null
null
null
UTF-8
Python
false
false
5,727
py
configs.py
__author__ = 'bilibili' import math class Configs: CPU_CLOCK = 2 * 1000 ** 3 # 2GHz CLOCK_CYCLE = 1000 # 1000ticks per cycle L2_SIZE = 4 * 2 ** 20 # 4MB as default L2_ASSOC = 8 # Associativity L2_R_LATENCY = 1 # cycles L2_W_LATENCY = 1 # cycles L2_AC...