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
79fa188cf80e35ec80dca30d8945085bcbb85e0d
9325de5c0d152fc2ec0e6ea6b376a3ede46b9545
/medianTwoSortedArrays.py
4b5e8b44fcbf57c0b3f94bc0b0858cc59e72fa00
[]
no_license
sergeichestakov/InterviewPrep
868e152e2b278b180ededc0a3e04616b224eda4b
ed904cbca90e7b9004cc4a0f9662c8e498847e07
refs/heads/master
2022-11-03T08:47:21.888972
2020-06-19T05:32:18
2020-06-19T05:32:18
130,618,434
0
1
null
null
null
null
UTF-8
Python
false
false
1,786
py
medianTwoSortedArrays.py
# Find the median of 2 sorted arrays class Solution: def median(self, arr): if len(arr) == 0: return None length = len(arr) mid = length // 2 if length % 2 == 0: return (arr[mid] + arr[mid - 1]) / 2.0 else: return arr[mid] def findMedi...
dfbf67cb56de999285347cdd3dde34f7610293ff
7d2fa2fafbf5a02f92b61ef012217b841d4139f2
/src/errors/not_found.py
40d4152d868ba258889042f39aa265e4704dbe2e
[]
no_license
bartrpay-admin/webapi
07ec9598fca94b036d97e8b86a0ae0f19f6458f2
515f9c6c02065849c9c8540ddec1937a8167393b
refs/heads/main
2023-05-08T21:52:40.738145
2021-06-04T17:30:53
2021-06-04T17:30:53
null
0
0
null
null
null
null
UTF-8
Python
false
false
167
py
not_found.py
from errors.custom_error import CustomException class NotFoundError (CustomException): status_code = 404 def get_message(self): return "Not fonud"
7a4a2074330ac19f9dfb8accf586953accc5e5fa
539b469c80ba0f4498588813fcd6f123022263fe
/mxonline/apps/courses/migrations/0007_auto_20170408_2142.py
8b603cf110f155e61c20e7cc3e3b9db2774518bc
[]
no_license
cucy/mxonline
0052e8abef529c256563e1883ecc2b589d6c1235
3e6a204fd98b88da1896bef48f9b31d160290fdf
refs/heads/master
2021-01-18T17:28:02.636671
2017-09-29T05:24:21
2017-09-29T05:24:21
86,804,047
0
0
null
null
null
null
UTF-8
Python
false
false
698
py
0007_auto_20170408_2142.py
# -*- coding: utf-8 -*- # Generated by Django 1.9.12 on 2017-04-08 21:42 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('courses', '0006_auto_20170408_2141'), ] operations = [ migrations.AddField(...
c4b2ba65374bf7bcee364ad31d2a300f950cf401
dc02de84e3a0234a1b10a8da65ec851bcd951fe2
/preprocessing.py
84e089ce2e4e9134ea8e81ff24aa6c976167503f
[]
no_license
bjorngronntun/FYS-STK4155-project1-old
f45a89d9369e3dc46e925cd68acb11006bf8251d
e3e72e9fb563e3454424e908da21b49bfa9592bb
refs/heads/master
2020-03-29T03:50:34.930662
2018-10-04T13:09:12
2018-10-04T13:09:12
null
0
0
null
null
null
null
UTF-8
Python
false
false
406
py
preprocessing.py
import numpy as np def polynomial_combinations(input_data, max_degree): data_points = input_data.shape[0] # This is bad, as it really works only with two-dimensional # input data: x = input_data[:, 0] y = input_data[:, 1] X = np.zeros((data_points, 0)) for i in range(max_degree + 1): ...
64b62259294c4813d995de3446d90e8f9d69a34a
7ce0d2d23b7810dc70465222a9b6e90010cb415a
/apps/activities/urls.py
86ce4bd5b75eef6d39092e8e324bc7d3e1811c66
[]
no_license
yupengbo/fenpuwang
4010c2c93ee722129ad1422fee5c9d2a4e38a96f
8ab262962b1d7918dc290fcfe3beddf56db5b5c6
refs/heads/master
2020-06-01T10:18:24.256015
2015-05-06T02:11:40
2015-05-06T02:11:40
34,783,889
1
0
null
null
null
null
UTF-8
Python
false
false
656
py
urls.py
# -*- coding: utf-8 -*- from django.conf.urls import patterns, url from apps.activities import views urlpatterns = patterns('', url(r'^(?P<activity_id>\d+)/$', views.activity, name='activity'), url(r'^openbonus/(?P<activity_id>\d+)/$', views.open_bonus, name='open_bonus'), url(r'^shareactivity/(?P<activity_id>...
16b9757b944c4fc6a914f0f81cfd5d1e9fa30fc5
b9f10bcce568f0aec090ac9cbe099c656c80bdc9
/ipymol/ipymol/__init__.py
d56654ac30eeb4c75509058df5ef7bf14398a14c
[ "MIT" ]
permissive
boilerine/ipymol
95ce89e290481707f7b7ce4b39d0e1dc17fbf5aa
b7c387c0694aa5531226783186301fa2188becb9
refs/heads/master
2020-06-16T01:04:39.773772
2016-08-31T21:58:58
2016-08-31T21:58:58
null
0
0
null
null
null
null
UTF-8
Python
false
false
105
py
__init__.py
__name__ = 'ipymol' __version__ = '0.4' __author__ = 'Carlos Xavier Hernandez' from ipymol.core import *
1fd209e8486f878e1f6b938c8a2a644c70205da6
18b7f6e6a64ff4e33202f4c647d33240bf8ce015
/Implementation/Baek_10988.py
bd56069fd81efa438aa79441b816c80b9065978d
[]
no_license
qorjiwon/LevelUp-Algorithm
80734b88e2543fb4b6da48377bb31b70d972b448
62a71552427290361e6ade9dcfe3ffc90a9d86e2
refs/heads/master
2023-06-16T16:33:44.427818
2021-03-12T14:39:25
2021-03-12T14:39:25
null
0
0
null
null
null
null
UTF-8
Python
false
false
310
py
Baek_10988.py
""" @ Baek 10988 팰린드롬인지 확인하기 @ Prob. https://www.acmicpc.net/problem/10988 Ref. Ref Prob. @ Algo: 구현 @ Start day: 20. 03. 04. @ End day: 20. 03. 04. """ inputStr = input() if inputStr == inputStr[::-1]: print(1) else: print(0) """ level > 1 """
fb21cd53f78e508718c16d1e7823986bf74b68d4
48175752838f9bae96f2facd29b27fac52e8d84a
/main.py
f11798c02f940cf459d4186ff8b252a46ca266ed
[]
no_license
prometeyqwe/SieveOfEratosthenes
81565cc3b069425beab76fd47933d91b2aa71a87
b76a6f72a1fc14b631af2f042181df1db5c82f78
refs/heads/master
2020-03-26T08:46:15.774486
2018-08-30T11:36:17
2018-08-30T11:36:17
144,719,702
0
0
null
null
null
null
UTF-8
Python
false
false
488
py
main.py
def sieve(pp): num_pp=2 while num_pp*pp <= max : for i in range(0, len(arr)): if arr[i] == num_pp*pp : arr[i] = -1 break num_pp+=1 for i in arr: if i>pp : pp = i break if 2*pp <= max : sieve(p...
68a44f95e36556252c08cee6600c79ed342c68b0
cb7f3cf04a038555187988b1e866860eec284ddf
/main.py
a1a36f01a105b6a183f2682d6b005130c73e08bc
[]
no_license
ogonwodoh/Rihanna-Shoe-Bot
1f0ea96e2f9f547a14d12006b01a583195f8d794
f9ca5b4a0d0201e01a10e856e39c1a94616bf4dc
refs/heads/master
2021-06-18T14:20:48.603236
2017-05-15T16:33:23
2017-05-15T16:33:23
90,996,675
1
0
null
null
null
null
UTF-8
Python
false
false
4,505
py
main.py
import argparse,datetime from puma_shoe import puma_shoe from functools import reduce comparison_list=[] shoe_prices={} size_product_number={} def tester(runs=1): shoe=puma_shoe("000000") assert "000000" == shoe.product_number tests1=[("12",True),("365774",False),("365776",False),("000000",True),("594132",False)]...
52d8fba00dd6245d84d469f429f502e50d4cd0bf
a3079f20c18d5bedcb155d5b79c8b20a82a2c1be
/testcase/case6/Server.py
92490208e34909fa3dbd162ff21a2263ca82fb6a
[]
no_license
alexvanc/REPTrace
2a1cd64d02c0cf521a700c3f412b0cd41b6c0e23
246d067a4ef380c924fdbad8192ab57c1c578cba
refs/heads/master
2023-04-29T14:22:56.767856
2023-04-15T03:25:20
2023-04-15T03:25:20
113,174,402
2
3
null
null
null
null
UTF-8
Python
false
false
615
py
Server.py
#coding=utf-8 #reference :http://www.cnblogs.com/ajianbeyourself/p/3771198.html from SocketServer import BaseRequestHandler,ThreadingTCPServer import threading BUFSIZE = 1024 class Handler(BaseRequestHandler): # to process the connect def handle(self): data = self.request.recv(BUFSIZE) print 'Serv...
fbc8856ec52fec722ab802b9669795abe7a1ca68
8edcdb086aecfeb2feb269cf9b5fc70e97e448ec
/Reinforcement Learning/q_learning.py
da4c1fc1196822b568e33f07a7e978114f6f9af4
[]
no_license
jelgun/Artificial-Intelligence
27b99fe8763cb66088b75fa37eae27c3248aea0e
c74d928966fe345f89566cf7b33211d09fe5b65b
refs/heads/master
2023-02-22T10:54:25.377851
2021-01-22T13:30:05
2021-01-22T13:30:05
331,954,226
2
0
null
null
null
null
UTF-8
Python
false
false
10,436
py
q_learning.py
import numpy as np import copy import matplotlib.pyplot as plt np.random.seed(62) # PARAMETERS R = -0.01 # state rewads D = 0.9 # discount factor P = 0.8 # probability # epsilon for convergences eps = 1e-3 env = [ [0, 0, 0, 1], [0, 0, 0, 0], [0, 0, 0, 0], [0, 1, -10, 10] ] end_positions = [[0, 3], [...
442059cae6330502c32c3eac1e93caab21dbcb2f
20ffcf659d71c70dd61ea043ea79f172eb451801
/Macros/Crafting/Blacksmith/AddToDeedCreatedItems.py
a773ffadd7545c7ff93810f2783c442af4397a40
[]
no_license
marcoeqms/classicassistmacrocopy
5cfc3421270623d850c46f4ffd035e91fd56178a
e00cc23d34b722c5b2a0c2f6668a52a2eee6ae08
refs/heads/master
2023-06-24T12:32:46.640400
2021-07-22T14:06:47
2021-07-22T14:06:47
388,484,002
1
0
null
null
null
null
UTF-8
Python
false
false
1,295
py
AddToDeedCreatedItems.py
# Name: Add to deed created items # Description: Search and add items corresponding to prompted deed. Gumps for deed may vary in different shards. # Author: Aru # Era: AOS import clr import System clr.AddReference('System.Core') clr.ImportExtensions(System.Linq) from Assistant import Engine def GetBackpackItems(filte...
dc1bd81e44585d810b5d9d8f76b72088f383537d
7448b23adc31d1fcdd2225959aafd3436ba4624d
/My_Contacts/contacts/urls.py
75366f74649a09add0b01415ef65e37d56ec3be8
[]
no_license
nameis-vivek/Phone-contacts
a9326cdf22bc8811b11d5094a19551cad2272e6f
6714d9ac5a2f6ad4fe68281c3a220ecdf1cd855f
refs/heads/master
2020-12-26T08:40:59.340293
2020-02-23T11:02:28
2020-02-23T11:02:28
237,451,437
0
0
null
null
null
null
UTF-8
Python
false
false
459
py
urls.py
from django.urls import path from .views import * from django.contrib.auth.views import LoginView,LogoutView urlpatterns = [ path('',index.as_view(),name='index'), path('login/',LoginView.as_view(),name='login'), path('logout/',LogoutView.as_view(),name='logout'), path('signup/',signup,name='signup'),...
aff4cee4a2a19735ea41ce0c4ff286e5f2754421
ecb7e109a62f6a2a130e3320ed1fb580ba4fc2de
/reference-code/lambda/cm-premembers-backend/tests/common/FileUtils/test_read_yaml.py
af8097b6297c01e9b2fa3418a070708bd58d34d1
[]
no_license
nisheeth84/prjs_sample
df732bc1eb58bc4fd4da6e76e6d59a2e81f53204
3fb10823ca4c0eb3cd92bcd2d5d4abc8d59436d9
refs/heads/master
2022-12-25T22:44:14.767803
2020-10-07T14:55:52
2020-10-07T14:55:52
null
0
0
null
null
null
null
UTF-8
Python
false
false
909
py
test_read_yaml.py
import copy from tests.testcasebase import TestCaseBase from unittest.mock import patch from tests.mock.data.file_utils.data_yaml import DataYaml from tests.mock.data.file_utils.data_json import DataJson from tests.mock.data.aws.dynamodb.data_common import DataCommon from premembers.common import FileUtils from premem...
a7a05f10af2018e25daf36f4954cea6a1ab72dc7
b0031e0832d8d2c3b1bdbc8e9b1d9b744ce33f97
/tiantu.py
71c7a944b78be26c945bc3cac14d563f3da5a549
[]
no_license
lifulin921874610/astro-python
0405810aac6e52b8be5f68638f73afc4c3478b6a
c68da82448eff67e14964f645650127e55fb2785
refs/heads/master
2020-04-17T10:18:28.034395
2019-01-19T02:29:57
2019-01-19T02:29:57
166,496,220
0
0
null
null
null
null
UTF-8
Python
false
false
1,157
py
tiantu.py
from matplotlib.patches import Ellipse import matplotlib.pyplot as plt from astropy.coordinates import SkyCoord from astropy import units as u import numpy as np def dot(ra, dec, color='k', markersize=2): plt.gca() c = SkyCoord(ra, dec, frame='icrs') plt.plot(c.ra.wrap_at(180*u.deg).radian, c.dec.radian, linestyle...
3bd547f2b571bd6198481cd1140b11452d2b1cd5
e85f5ebcad7fcb0ff37d45e00356879d9f95ddb9
/infinite_next.py
e3f9936cd0b0034d3e85473eb9cf75a721dec371
[]
no_license
sarnaizgarcia/yield_examples
9365bd6bcfee312c63ad85866c31dbcaa08d195c
97b6c3bdb016ed01baa4be99ae3dc83aea985db5
refs/heads/master
2020-09-28T21:18:39.491947
2019-12-09T12:35:02
2019-12-09T12:35:02
226,867,149
0
0
null
null
null
null
UTF-8
Python
false
false
149
py
infinite_next.py
def infinite(): num = 0 while True: yield num num += 1 gen = infinite() print(next(gen)) print(next(gen)) print(next(gen))
9c076710207fcd38e963778329c4038c4618b373
9ee2fcac79784884fe43f1881b43d9090d75a562
/earthchem/transform/utilities.py
1892ce99fa682e9dee1285ef1215d810c426a0df
[ "MIT" ]
permissive
morganjwilliams/earthchem-pyclient
16b2eeaa2c65015a3b5f9bc31fa364711bbc04f2
9cf3973d958680cf28426b4ad5d7962fa69971fb
refs/heads/master
2020-03-17T16:15:41.839807
2018-06-25T01:43:54
2018-06-25T01:43:54
133,742,376
1
0
MIT
2018-05-17T01:30:57
2018-05-17T01:30:57
null
UTF-8
Python
false
false
1,496
py
utilities.py
""" file: utilities.py author: Jess Robertson CSIRO Mineral Resources date: January 2017 (happy new year!) description: Utilities for transforms """ import numpy as np def closure(X, total=1): """ The closure operator: scale X so that everything sums to unity. Parameters:...
b0d0099f9eb0b788b120c9d720427b7176d3a20c
61273ccc79091a15ed0820c6ab521f2b396cffd6
/Src/PickleDump.py
0c7ab96c680f651e40be7fd79a47f8222f5e6a0e
[ "MIT" ]
permissive
thejonatanmr/DungeonCrawler
520695235c850ebb9d3a81147f8880e77d0e9956
c68f7d6f4e49f24787691213824c41b0ab3c283d
refs/heads/master
2021-09-01T03:46:10.782894
2017-12-24T15:49:56
2017-12-24T15:49:56
114,675,607
0
0
MIT
2017-12-18T19:01:59
2017-12-18T18:40:31
Python
UTF-8
Python
false
false
656
py
PickleDump.py
import pickle from Structure import * import os working_dir = os.getcwd() dir_list = working_dir.split("\\") dir_list.pop() working_dir = "\\".join(dir_list) test_weapon = BaseWeapon("Stick", "A plain old stick", is_owned=True) test_weapon1 = BaseWeapon("Sharpened Stick", "Careful, it's pointy", is_owned=True, rarity...
1b4155ae99d7b2668e636408073a15c9a538e282
9e49136dd0d178ad7df9bad882816fd28c8ed6e8
/10_2.py
9f4d61b55b886d5371698ba9e51e5418c0983c4a
[]
no_license
jansyzhang/data_mining
e999a6d61b2184cc6f63276663b24eefc940a65d
9ffa8503efc338a0f23590fbcdeba1001ff86698
refs/heads/master
2020-04-11T11:45:24.087737
2018-12-14T09:19:42
2018-12-14T09:19:42
161,758,291
0
0
null
null
null
null
UTF-8
Python
false
false
1,301
py
10_2.py
# -*- coding: utf-8 -*- """ Created on Wed Nov 21 09:59:42 2018 """ import numpy as np import pandas as pd inputfile = "F:\spyder\datamining\chapter10\demo\data\water_heater.xls" outputfile = "F:\spyder\datamining\chapter10\\2.xls" n = 4 #使用以后四个点的平均斜率 threshold = pd.Timedelta(minutes=5) #专家阈值,创建时间间隔对象 data = pd.rea...
17892a59f35f320eac983e8d96e330ebbbea1731
717635b291fc391bcc58a3414f0725acc7d7350d
/Crypt_RSA.py
049aa1dd3afe80bd5a5f54e57d8497e411fff793
[]
no_license
LucasACH/rsa-cryptosystem
86c2b9a2036d43843792e3065ef2c1ea9dda70bd
077b3d404baf401bebd87708e68bb1cf7c961529
refs/heads/master
2023-05-12T08:59:57.108486
2021-06-02T15:31:29
2021-06-02T15:31:29
373,206,461
0
0
null
null
null
null
UTF-8
Python
false
false
3,013
py
Crypt_RSA.py
import string import sympy from text import welcomeMessage, keysExplainMessage, startMessage, generateKeys1, showPandQ, showNandλ, showPublicAndSecret, encryptMessage1, encryptMessage2, encryptMessage3, encryptMessage4, decryptMessage1, decryptMessage2, goodByeMessage from math import gcd from progress.bar import Charg...
00531c5a7fdcd24204b0546c081bbe7d63d0a6b2
bd9fa6701a91ae844bfad7fb9f4e42bdf1266eb5
/Challenge #1/Easy/challenge-1.py
b21ede2d07e9ea9995a734faad5e253e78ecd1cf
[]
no_license
Secris/DailyProgrammer
3855c0940c8ed035138a9b7a20c0046939e85fe8
db5a961a1741d7fd3ea70a577199a7cb23587d17
refs/heads/master
2020-07-06T06:34:11.497298
2017-01-23T05:03:46
2017-01-23T05:03:46
74,055,163
0
3
null
null
null
null
UTF-8
Python
false
false
530
py
challenge-1.py
# Create a program that will ask the users name, age, and reddit username. # Have it tell them the information back, in the format: # # Your name is (blank), you are (blank) years old, and your username is (blank) # # For extra credit, have the program log this information in a file to be accessed later. # name = ...
3024359710148bfbb15677973555f214b1f878b7
f2d69e03f68d3362a1558a4175a2393e94364c56
/compare_classifiers.py
b5c80ab58d85bad6a1a7b4c6091a0377dd6f7db0
[]
no_license
ikoko3/data-mining
02735e49102864e5f9683646df1599427eeb341a
59e5f3ddf943090a5b416f4a671b179bdd381201
refs/heads/master
2020-04-14T21:38:11.388998
2019-01-25T15:52:31
2019-01-25T15:52:31
164,134,774
0
0
null
null
null
null
UTF-8
Python
false
false
1,116
py
compare_classifiers.py
from sklearn import svm, metrics, tree from sklearn.ensemble import AdaBoostClassifier from sklearn.neighbors import KNeighborsClassifier import numpy as np my_data = np.loadtxt('edited_data/dataset_regression_edited.csv',delimiter=',', dtype='str') training_data = my_data[:, 0:6] validation_data = my_data[:, 6] ...
20fe9b68e65f6f017897bfa8e99d0c21ba1617fb
6ee99be75ddff2b4c78434595d568d3cccfcf530
/codinggame/printTrueorFalse.py
70d21dfcd6efab525e32123a79ac0fcbdf447e82
[]
no_license
swordwielder/python3
e66f3de18c25fb861b4b697a5349099825f1983d
105ff3a499ce7f3459591107becd8847f30b5f7c
refs/heads/master
2023-01-19T10:39:51.570407
2020-11-30T17:33:27
2020-11-30T17:33:27
192,809,604
0
0
null
null
null
null
UTF-8
Python
false
false
174
py
printTrueorFalse.py
print(input()in[str(i**i+i)for i in range(11)]) num = int(input()) suma = 0 x = 0 while(suma < num): x += 1 suma = x**x + x print(True if suma == num else False
cf2bbe332237bd849df62be099f1719eaf1f2082
e2e0cff25f11770f6fb04bcff7f78b91247483aa
/shirotokuro/game/fire.py
cf64a9cb3f7e0aa94f383a9c0db4409f6b0b8003
[]
no_license
shirotokuro/cs145
e5675a77b743c8400c276d863a1a5451aa73a8f2
93fb9e0530e352ed057a8e20856cd0079ae3deab
refs/heads/master
2021-01-25T12:19:41.345602
2014-04-04T08:36:11
2014-04-04T08:36:11
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,077
py
fire.py
import pyglet import math from lvl1_resources import fireball class Fire(pyglet.sprite.Sprite): def __init__( self, *args, **kwargs): super(Fire, self).__init__(img= fireball, *args, **kwargs) self.rotation= 45 self.rotate_speed= 5 self.velocity_x= 5 def check_bounds(self): max_x= 1000 + self.image.width/...
94f5fa411f8a41985caaf4eb7ab1cb4e45439405
1063a2759e174972cf06442a1d1acfd36c099846
/rio/serialize.py
d0ba7fa3736f574eb7eddeddaadb995109fe78c4
[]
no_license
sambvfx/rio
9a5f80dc1bd4ecc84df3527a08037e9db8a39b4a
7e410b02c176d00b8dac7d958bcb420724bb120d
refs/heads/master
2020-05-18T18:35:24.102766
2019-05-29T08:08:13
2019-05-29T08:08:13
184,590,570
5
1
null
null
null
null
UTF-8
Python
false
false
6,443
py
serialize.py
import abc try: import cPickle as pickle except ImportError: import pickle from typing import * T = TypeVar('T') class BaseSerializer(Generic[T]): """ The serializer is responsible for converting complex python data types into primitive types that can be sent over zmq ports via msgpack. ""...
1a05817c4c16f2d9234e504b0c98f9c9ae2dc3f7
5e7ccf4ba165b5c01e633626ee87d2cf29d9f54c
/ratings/templatetags/rating_block.py
cdad9dc4731ab054ae8da227adcb277dabaaf13e
[]
no_license
traditio/blogs
409d7bc1c60abc99308d0f0e1c96e4c9b6ab7a10
8e5bb4127fd919ff7d14fc2aeb34a9910dd87be2
refs/heads/master
2020-07-20T18:06:06.826111
2011-08-08T13:11:12
2011-08-08T13:11:12
2,106,783
0
0
null
null
null
null
UTF-8
Python
false
false
1,174
py
rating_block.py
#coding=utf-8 from django import template from classytags.helpers import InclusionTag from classytags.core import Tag, Options from classytags.arguments import Argument from ratings.models import RatedItem from blogs.permissions import Permissions class RatingBlock(InclusionTag): name = 'rating' template = '...
9206e4c4eff8ca64266ce53705e88069912b80d8
c185b34c445837a89c99e8633a38d35c47127399
/magestic-2018-master/library_annotations/createBarcodeDict.py
026695a6e95078eba27e84ca2c511d51809c53c5
[]
no_license
arl94/magestic
5fd80bd5fbb634a6ab5992da7307c777ca580db3
860cb4d593caf9d83d7e57d53b1dcbb91d6aeb78
refs/heads/master
2020-06-09T20:15:34.648646
2019-07-13T17:29:07
2019-07-13T17:29:07
193,498,167
0
0
null
null
null
null
UTF-8
Python
false
false
6,022
py
createBarcodeDict.py
""" Process pair-end reads of barcode-guide-donor Step 1 cassette to generate a library reference table mapping barcodes to features. Create dictionaries mapping barcodes to forward and reverse reads, split into sub-segments. R1_dict: map barcodes to corresponding R1 sequences. R2_dict: map barcodes to corresponding R...
957db647500433fd73723fdeb3933037ba0641b1
b2abced9cc2d6e5b90fb1f09839d18799d68909a
/djshoproj/wechat/migrations/0001_initial.py
793ca4a1fe6eec4d1a0c2f523f3ed9ae6f2971cd
[]
no_license
Helenbj/djshop
e6d72f3206ff9ec9f120de25e63ca7fdb752caaf
b3a121b0cad06ef4a940836336a85a0d8e500e98
refs/heads/master
2021-09-07T16:43:53.203939
2018-02-26T07:28:12
2018-02-26T07:28:12
110,086,159
0
0
null
2017-11-09T09:15:51
2017-11-09T08:11:31
null
UTF-8
Python
false
false
648
py
0001_initial.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2018-01-26 05:04 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Discou...
2d36ae916ad257615016ed6c0bc67e506ee313c9
7e77aceba64b38b1c1b12102687802ac085b44d7
/inventorymgr/auth.py
2ad789d13f72d474cb70b465aaae8123c5903868
[ "MIT" ]
permissive
CruzR/inventorymgr
512d630580f19b2f45f3d4402da923cd9f45c83f
27762ebdfadf585a73e963d1e47429239a714bb3
refs/heads/main
2022-06-26T12:09:31.528448
2022-06-02T08:20:58
2022-06-02T08:20:58
235,224,991
1
0
null
null
null
null
UTF-8
Python
false
false
3,019
py
auth.py
""" Authentication views. login() Flask view to log a user in. """ import functools from typing import Any, Callable, cast, Dict from flask import Blueprint, make_response, request, session from werkzeug.security import check_password_hash as _check_password_hash from .accesscontrol import PERMISSIONS from .api...
42be9077ec51a9be1d4923011a38cd64d829f876
2d539c226cfcaf141ad5d2108a3d399ba095fa31
/step_2_2_3.py
368c63dd5ea070fb09fb7e7679cef0e032871d17
[]
no_license
NadezhdaLuzhetckaia/stepik---auto-tests-course
cded7f14908147ec88d3c2569473a35d7a407803
e5346fe5fe4d8a21564c30ddd3e81e85fb94e713
refs/heads/master
2020-09-05T09:57:42.245283
2019-11-06T19:06:29
2019-11-06T19:06:29
220,066,000
0
0
null
null
null
null
UTF-8
Python
false
false
526
py
step_2_2_3.py
from selenium import webdriver import time with webdriver.Chrome() as browser: browser.get("http://suninjuly.github.io/selects1.html") time.sleep(1) x = int(browser.find_element_by_id("num1").text) y = int(browser.find_element_by_id("num2").text) sum_xy = str(int(x)+int(y)) browser.find_element...
ae36c48b98c1af5b707ddc96605130c9e2f9b0f0
1b4d3e6272cc04df16f65154acdb5b6caab5dd3f
/evening/views.py
052f12d98925e08b3929c030f1dd1a051085c668
[]
no_license
yusufcanb/evening
5a0aece251b01f0174e5c80082f38c29a414fddf
9b21b307b33be74b64ec50776491e18485d4de25
refs/heads/master
2023-03-12T10:04:49.912058
2021-02-28T00:08:38
2021-02-28T00:08:38
null
0
0
null
null
null
null
UTF-8
Python
false
false
451
py
views.py
from flask import jsonify from datetime import datetime from . import __version__ def ping(): return jsonify(pong=True) def health_check(): now = datetime.now() return jsonify(alive=True, last_checked=now.utcnow()) def landing(): return jsonify( name="Evening API", version=__versi...
6da1361e282ff70045166f626f1e7769a116a600
41646e62480a7c99381f2dd8dadc0afd1427f449
/betterweb_project/betterweb_project/settings.py
cc6f3c6948dd55769de632e12807ec806a5a186d
[]
no_license
ykorman/betterweb-django
402855cbe0ab861a52f74614f17b0cb4e1e59b67
661aec5b717d97144b45dba8b9c666f41668d5a4
refs/heads/master
2020-02-26T14:54:43.067752
2014-02-01T14:12:21
2014-02-01T14:12:21
null
0
0
null
null
null
null
UTF-8
Python
false
false
3,301
py
settings.py
""" Django settings for betterweb_project project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DI...
c3c82b4749ee43c84beac4f11d6af18ae4b7444e
486696e5ee4ccc7a6d0b95b4ce8f0e8f3046756e
/lib/PFPConfig.py
01103c72c331a1dba31a669116c804d266291d2f
[ "Apache-2.0" ]
permissive
Bosco-Don/amp
4865263886c5730839d5efc71c368eb981638f92
16ce98c3e9b8b16cc1a1e1b65c5dda76c76089f8
refs/heads/master
2020-03-29T02:30:56.264816
2018-09-19T11:37:27
2018-09-19T11:37:27
149,440,840
0
0
null
null
null
null
UTF-8
Python
false
false
12,946
py
PFPConfig.py
#!/usr/bin/python # -*- coding: utf-8 -*- from InternalModules.pfp_sdk.PFPUtil import * class PFPConfig(wx.Dialog): def __init__(self, parent, title): wx.Dialog.__init__(self, parent, title=title, size=(610, 450)) self.InitUI() self.Centre() self.Show() def Ini...
e9f388497e60549528825507da240d21619e6f3d
d26c381653aaa28246f6fb7f106724b8e4b53740
/esp8266/main.py
0206ea59f46a3ab9f092377d093fb9722fdc32fc
[]
no_license
mariostyvenv/mqtttelegram
86e532726488fb6ca69f8fd326dca5c769a5714a
2aa55d80dc0a2a003acef0dcee92edcc01690546
refs/heads/master
2023-03-29T15:59:27.415331
2021-04-11T01:26:59
2021-04-11T01:26:59
356,738,864
1
0
null
null
null
null
UTF-8
Python
false
false
1,746
py
main.py
from umqtt.robust import MQTTClient import network import uasyncio import machine import ujson wifiUsername = '' wifiPassword = '' mqttClientId = '' mqttHost = '' mqttPort = 1883 mqttUsername = '' mqttPassword = '' async def connectWifi(): wlan = network.WLAN(network.STA_IF) wlan.active(True) wlan.connec...
dc7c955bedd91d8f2c83f966c7f4282ecb54b2c2
d62514b4ceb7cd6c3fbba344b392ea4e0c3a4b1b
/dae_fbx_to_bvh.py
f61d70999e95a2e5e19d19a63b72ea6bb838ed61
[]
no_license
dabeschte/dae_fbx_to_bvh
c5438d37ff49f50761f2fc9041a3b1aac4fe0f06
d0242caffe80a3b7b3b70164f7906147b6c36d2f
refs/heads/master
2020-05-28T02:08:07.960053
2019-05-27T14:38:01
2019-05-27T14:38:01
188,850,183
0
0
null
2019-05-27T13:38:37
2019-05-27T13:38:37
null
UTF-8
Python
false
false
1,838
py
dae_fbx_to_bvh.py
import bpy import os def export_bvh(file): bpy.ops.object.select_all(action='TOGGLE') obj = scene.objects.get(bpy.data.armatures[0].name) if obj != None: obj.select = True scene.objects.active = obj #cont = bpy.context.area.type #print(str(cont)) frame_start =...
afe73194adead089c790f58a1159ba3a94981f33
8f0f749f5d031c4625d52ada13db0656d9de564b
/plugins/kek.py
7b96b6e5eebbf75804890fa1f057dd4a64b3df9a
[]
no_license
Augmeneco/KBot8-Telegram
b141f3a66b66c21ade7add61c240b0c982172c73
c2d26301e1f34ccb65eca209c46ddc4842203127
refs/heads/main
2023-03-07T21:53:18.119448
2021-02-13T21:21:58
2021-02-13T21:21:58
338,672,218
0
0
null
null
null
null
UTF-8
Python
false
false
1,169
py
kek.py
from PIL import Image, ImageDraw, ImageFont from io import BytesIO from plugins.utils import * class kek: level = 1 names = ['кек','kek'] def execute(self,msg): if len(msg.files) == 0: msg.sendMessage('Фото забыл приложить') return ret = requests.get(msg.files[0],stream=True).content outimgs = [] ...
c8b2c9cb877f040d457939012fcab394e378ce84
2eef04f5aee801c41119566430976e90c96a9112
/lesson8/8.py
a44034421e462835070d575126c9137001fa80d7
[]
no_license
Boris-0412/python-boris
98857022741f2319162254355fc82139ddf61508
c3f2ffa1316e847213b008504b119418a5d09227
refs/heads/master
2023-06-02T23:25:08.670283
2021-06-26T07:06:28
2021-06-26T07:06:28
345,014,234
0
0
null
null
null
null
UTF-8
Python
false
false
2,118
py
8.py
from pycat.window import Window from pycat.sprite import Sprite window=Window(background_image="img/forest_04.png", draw_sprite_rects=True) clicked_sprites=[] class Card(Sprite): def on_create(self): self.is_visible=False def on_left_click(self): if len(clicked_sprites) < 2: ...
50045804ff1aab8f8a710f37b9c44ad07b4e9d8a
47c478c72fde1572b167982baa1c7d427020555d
/PycharmProjects/tree.py
5232b3a2777be667d9397adf75ab89ce018946f9
[]
no_license
SarahFudy/Python-Homework
c392bcd02df5f07596db7cfd1da3d2d08c4a9a50
4598d337dd3ef93fa989f09920e0fe3d79d36d1e
refs/heads/master
2020-04-28T00:10:26.614996
2019-03-10T10:57:21
2019-03-10T10:57:21
174,728,174
1
0
null
null
null
null
UTF-8
Python
false
false
969
py
tree.py
import turtle turtle.speed(9) #画分形树,递归函数 def appletree(distance): distance = int(distance) if (distance >= 4): if distance < 40: turtle.color('green') else: turtle.color('black') # 主干黑色,最外枝干绿色 turtle.forward(distance) turtle.right(25) applet...
6709b3db8d26edfbf36d8daffffbf07e503889fe
cbf0a4c6287377bda54cde4f40f0de76082bd7c9
/Mundo 1/Desafio/005.py
e64b01ee2334c101db6ce5d6867505c05f9662a8
[ "MIT" ]
permissive
LeonardoJosedaSilveira/Curso-de-python
02656ca437ed0d1cd701f78c90d3056419ea56a9
e5b7920ce75a3c7af9b8250e18cabaa173e2478b
refs/heads/master
2022-11-30T21:57:39.062713
2020-08-18T23:34:10
2020-08-18T23:34:10
273,072,293
0
0
null
null
null
null
UTF-8
Python
false
false
194
py
005.py
n1 = int(input('Digite um valor ')) n2 = n1-1 n3 = n1+1 #print('\033[1;34;45mO antecessor é {} \033[me o sucessor {}'.format(n2, n3)) print('O antecessor é {} e o sucessor {}'.format(n2, n3))
6af29705c0e5389aa7ee5c40c698acd69de4825a
67bb8ae725fc0cf798505ab372b3ce31ca0697a2
/image_divide_part.py
12aac5512f99a44c4b58fa5eaf4db8315e3d34dd
[]
no_license
kongzhiyou/utils
7a85b17ac7b4c71946b34590acfbcb2a95695021
ee03e91458422a9f718690bee2cc3ed4ccd88362
refs/heads/master
2020-05-07T05:44:00.491901
2019-06-05T02:49:58
2019-06-05T02:49:58
180,282,984
1
0
null
null
null
null
UTF-8
Python
false
false
597
py
image_divide_part.py
import cv2 import glob import random image_path = '/Users/peter/data/wl/*.jpg' save_path = '/Users/peter/data/' ''' 将一个文件夹中的很多图片,随机分配到数个文件夹中 ''' def image_divide(): image_list = glob.glob(image_path) for img in image_list: num = random.randint(1,len(image_list)) n = num%3 if(n==0):i...
9f04b265df3c603e9e5bd53061d970f63bab9a4e
08706431c28d92934c3a948f89971d7d2fca6ec7
/data/scripts/crime_numbers_to_rates.py
d1e917cd1f2a867f70a4f3786aaf0f1c0d71d3f5
[ "MIT" ]
permissive
Crains-Chicago/where-to-buy
1ceaafb32422400745edefaabbe59986609f3d68
895829ad64fa505affd576c52e5c8a811cd2332d
refs/heads/master
2021-01-20T00:27:24.023459
2017-05-19T14:56:47
2017-05-19T14:56:47
84,583,367
8
1
null
null
null
null
UTF-8
Python
false
false
5,319
py
crime_numbers_to_rates.py
import sys import csv import psycopg2 location = sys.argv[1] assert location in ["chicago", "suburbs"] if location == "suburbs": dbname = sys.argv[2] reader = csv.reader(sys.stdin) writer = csv.writer(sys.stdout) header = next(reader) if location == "chicago": writer.writerow(header[:len(header)-1]) for...
002fb38eef5697a7a86f430d5fccfdf1dc352171
4c245010f55043fd883a826413ead67a58a68efd
/m1sem/int_in_ml/MyOptim.py
37c1524415454727bd605707f5f67b5feac2b711
[]
no_license
desoo40/mai_labs
387e1b6a09c91d81ec18ce69f5c2d4a2d6ea8389
4f0438e1ae15a721b188fd2ed8c52230a87082ea
refs/heads/master
2022-07-11T18:48:41.820796
2019-12-11T14:16:12
2019-12-11T14:16:12
59,506,903
4
5
null
2022-06-22T16:29:47
2016-05-23T18:07:53
Jupyter Notebook
UTF-8
Python
false
false
612
py
MyOptim.py
import numpy as np from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt from matplotlib import cm from matplotlib.ticker import LinearLocator, FormatStrFormatter def my_func(x): return x**2 + 2 * x * - np.sin(x) x = np.linspace(-2, 2, 101) y = my_func(x) #+ np.sin(x * 25.5) plt.plot(x, y) fr...
2e57b654f591c2b37b7ca34bf69850bd5f770a07
60aae1d71a43fafa34bf26495c051f719672e9e9
/zillow_db_insert.py
342d191fea16575cb3b73f1716bb2e6b5fad2e67
[]
no_license
qlanners/zillow_data_pull
b8f1ee4f3c9d5e70119b8b6571319df9f9d5fa18
90ff187f2f9c8bf6acd5466b723089e1a626cf8b
refs/heads/master
2020-12-19T12:03:11.495438
2020-01-23T07:06:35
2020-01-23T07:06:35
235,727,976
1
0
null
null
null
null
UTF-8
Python
false
false
3,693
py
zillow_db_insert.py
from datetime import datetime from sqlalchemy import create_engine, inspect import pandas as pd import os from os import listdir, getcwd from os.path import isfile, join import sys def insert_data(type, csv_name, log_name): engine = create_engine('{}://{}:{}@{}:{}/{}'.format(*sys.argv[1:])) db_log = open(log_name,...
35c78a785be236128347b9859b5ae45fe716fc08
535f33c915542405a29291b48eab14e84bff3303
/application/src/main/python/modules/logins/model.py
5722877ae5695ddc81fb79c010b663af419ff2dd
[ "Apache-2.0" ]
permissive
okebinda/base.api.python
18c256842397d6b41dd3ef2ec9a1cd1c907c980b
fdf6dc02ab73d588919f38d6017788f7822cfd04
refs/heads/main
2022-12-12T22:27:19.069437
2021-09-30T03:03:15
2021-09-30T03:03:15
216,417,114
0
0
NOASSERTION
2022-12-09T05:25:05
2019-10-20T19:39:51
Python
UTF-8
Python
false
false
1,526
py
model.py
""" SQLAlchemy database record definitions for the Logins module. This file is subject to the terms and conditions defined in file 'LICENSE', which is part of this source code package. """ # pylint: disable=no-member,too-few-public-methods from init_dep import db class Login(db.Model): """Model for Login""" ...
9cff57ce75c32a9d58b6d399323ad23d2db9f8c8
057a475216e9beed41983481aafcaf109bbf58da
/tests/ci/cherry_pick.py
07cdcc76c3ac74ff25326b4b8b56d05da0733de4
[ "Apache-2.0" ]
permissive
ClickHouse/ClickHouse
fece5204263a5b4d693854b6039699265f1bb27f
6649328db809d51a694c358571539bc5820464be
refs/heads/master
2023-08-31T18:48:36.615225
2023-08-31T17:51:24
2023-08-31T17:51:24
60,246,359
23,878
5,449
Apache-2.0
2023-09-14T20:10:52
2016-06-02T08:28:18
C++
UTF-8
Python
false
false
25,057
py
cherry_pick.py
#!/usr/bin/env python3 """ A plan: - TODO: consider receiving GH objects cache from S3, but it's really a few of requests to API currently - Get all open release PRs (20.10, 21.8, 22.5, etc.) - Get all pull-requests between the date of the merge-base for the oldest PR with labels pr-must-backport an...
6883532fbe48b025c68f0fa7d5139d8a7e769e71
030dd811a852cc9440282ea80fe996782d33f3dd
/code/analysis/combination.screen.kras.py
4a4d224e420c9293371f40c7083bf4dc61b2f764
[]
no_license
Minzhe/DLMed
64575af2d8963fb9d66436dd5e47cb7246e474ac
de166ad8b00100aa111b3de8c989154b699a148b
refs/heads/master
2020-04-02T07:58:30.187600
2020-03-10T22:02:40
2020-03-10T22:02:40
154,223,453
1
1
null
null
null
null
UTF-8
Python
false
false
9,332
py
combination.screen.kras.py
######################################################################################################### ### combination.effect.kras.py ### ######################################################################################################### ...
ab63206e5a7edca104b5d2f69738e106d8aee774
3950b8064e2c8309ae5488d1c0d92cb80e3f13da
/app/getblobs.py
5a9de1f707f6613cddd9cf5429fd2c326303178f
[]
no_license
Vitaliy-Kalinichenko/TaskFromPerfsys
6cf22d5b33e9d2cf756455b053b95274b736c946
aca5486fbdd9ccad62223a5011a941aa714b1286
refs/heads/master
2023-08-15T03:36:24.293813
2021-09-19T20:12:23
2021-09-19T20:12:23
403,254,879
0
0
null
null
null
null
UTF-8
Python
false
false
667
py
getblobs.py
import boto3 import os import json dynamodb_client = boto3.client("dynamodb") BLOBS_TABLE = os.environ['BLOBS_TABLE'] def get_blob(event, context): blob_id = event["pathParameters"]["blob_id"] result = dynamodb_client.get_item( TableName=BLOBS_TABLE, Key={"blob_id": {"S": blob_id}} ) ...
2d15c5059591ba9f3d06ba4a56dc3ed5345fd67a
7c0e18d21cbcfacc253c49eb286f314a9b28c78a
/report/migrations/0011_auto_20200819_2102.py
684d85b0de68204343f2ce920f487633ed1e5332
[]
no_license
geoffrey-wen/TA
abd92d179fe79d9690fa362f8a462ff4b3f77c20
620fe067396e35dfaa1ac094f31a29454bbda1d2
refs/heads/master
2023-01-30T19:04:42.692716
2020-12-17T05:23:50
2020-12-17T05:23:50
294,910,270
0
1
null
null
null
null
UTF-8
Python
false
false
812
py
0011_auto_20200819_2102.py
# Generated by Django 3.0.9 on 2020-08-19 14:02 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), ('report', '0010_tag'), ...
e3e2d7720261ae345cc652c9a92c4eca1328fa14
f321df2075ff4a4e69cb94040fb0c8053d40b445
/samllestPair_codechef.py
662b428336879f45b852208d94d434a2695a7eed
[]
no_license
ajraj27/Begining-Programs
9b2afd48aa75c53470069aa311636f111dac05f6
6dfd5df4361ac83d0794b2978e818d2aba002df3
refs/heads/master
2021-05-06T09:54:50.843008
2020-08-24T12:14:55
2020-08-24T12:14:55
114,112,158
1
4
null
2019-10-24T20:19:12
2017-12-13T11:22:50
C++
UTF-8
Python
false
false
144
py
samllestPair_codechef.py
t=int(input()) while(t!=0): n=int(input()) small=list(map(int,input().split())) small.sort() print(small[0]+small[1]) t=t-1
f077280a117b695bb3fd5067da6f8e28bf40da8d
b93d19c5d8a2ecd1bb62e9185bafe4f97aef1891
/AVShop/admin.py
927dbf81af3bc42e927a230992c2c01145113bb2
[]
no_license
Brain-0ut/AV-Shop
1258b7edae1a242be3a08673e0799b2f5418ad37
435700d215fe22d41765d67ce0f84ab118e153da
refs/heads/master
2022-11-15T05:50:56.411467
2020-07-15T15:22:22
2020-07-15T15:22:22
275,191,943
0
0
null
null
null
null
UTF-8
Python
false
false
163
py
admin.py
from django.contrib import admin from . import models admin.site.register(models.Product) admin.site.register(models.Purchase) admin.site.register(models.Refund)
d50a99158f2268641902943d16aa0d3e478dc679
84724b34b3f1e84dc53cbca5f3660590dbc34a9f
/nova/api/openstack/compute/multinic.py
afe11e0baa110c3b2149d2525df461dabf2fa57c
[ "Apache-2.0" ]
permissive
openstack/nova
2c24b64e3677595611715bae6dda14edd3f90a24
065c5906d2da3e2bb6eeb3a7a15d4cd8d98b35e9
refs/heads/master
2023-08-28T15:10:05.126314
2023-08-25T20:31:27
2023-08-25T20:31:27
790,031
2,287
2,320
Apache-2.0
2023-07-08T02:10:29
2010-07-22T02:04:27
Python
UTF-8
Python
false
false
2,787
py
multinic.py
# Copyright 2011 OpenStack Foundation # All Rights Reserved. # # 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 requ...
fbecfe64946f5c132d3e719af82fc4ca9e0bf5b8
4a478d5cea1660cbf54171228c2a7609e9264eb4
/Unit 5/05.05 Number of Even Values.py
3dc367d2c9b6b9016cae2b58e2f3bb29a84cc520
[]
no_license
sarahvestal/ifsc-1202
3f5f7291d217945dad7d39913048943f13d60a23
98faa71518aafa85737bf5e53e77eff9d9e12a44
refs/heads/main
2023-03-09T09:20:01.025399
2021-02-08T16:14:27
2021-02-08T16:14:27
335,051,512
0
0
null
null
null
null
UTF-8
Python
false
false
258
py
05.05 Number of Even Values.py
#Prompt for a sequence of numbers, the last number being zero. #Print the number of even values. #Enter a Number (zero to quit): 2 #Enter a Number (zero to quit): 1 #Enter a Number (zero to quit): 4 #Enter a Number (zero to quit): 0 #Number of Even Values: 2
298368fb391beb61547c7c0c97437d3eed1b2014
af01f9ec93beef062604b60c3bd86dccc5efdeae
/guess_number.py
b4195a86c300b5ddcf6fed792767d63459ccd99a
[]
no_license
damilarey98/guess-game
19ef22f4ebffcb43203145b8ab31b67bc6b164e6
5b3a7f6a0e9e30356469d790ed94469a9cd0e939
refs/heads/master
2022-04-24T00:57:48.283131
2020-04-23T11:38:39
2020-04-23T11:38:39
258,085,395
0
0
null
null
null
null
UTF-8
Python
false
false
1,793
py
guess_number.py
import random guess_num = [] diff = 0 tries = 0 print("Hello! What is your name?: ") userName = input() play = True while play: print( """Three levels of difficulty: Level 1 => easy (e) Level 2 => medium (m) Level 3 => hard (h) """) level = input("Welcome {}, What level of difficulty do...
99312bfc587d37425a9f9fb09df163a63d97c9f9
ecfda21fda5e65eb4a767724101f5ec023d78234
/OldCode/confmatrix.py
ef8feb9e12a3361e9f895ac67d65cd8a8436cb77
[]
no_license
Albocoder/MLProject
d8b6433d18035b90a925d261be30a233152dcc8e
598187489c23bd0ba516c70b855cdb87479f961d
refs/heads/master
2021-01-22T04:09:52.065027
2017-05-25T19:11:19
2017-05-25T19:11:19
92,435,707
0
0
null
null
null
null
UTF-8
Python
false
false
1,301
py
confmatrix.py
from __future__ import division import itertools import numpy as np import matplotlib.pyplot as plt from sklearn.model_selection import train_test_split from sklearn.metrics import confusion_matrix def plotConfMatrix(theMatrix,theClasses,title='The Confusion matrix',colorRange=plt.cm.GnBu): # creating the image...
8cc8c4ef25adc3b9ce7a1e2028dabe8e994f2171
e99c208668c4f42a311033395028f88c1f810cd0
/ihome_python04/ihome/api_1_0/demo.py
e8a1e51e6af8ce70e3181899106e70c724be98e0
[]
no_license
biersign/i-home
a22e92614644728ccf1483a3c23e05e9a1efaa29
88fad755b426679f7571399430637d4d30d1b7fd
refs/heads/master
2020-08-09T09:03:53.006363
2019-10-10T01:27:44
2019-10-10T01:27:44
213,855,562
0
0
null
null
null
null
UTF-8
Python
false
false
2,116
py
demo.py
# coding:utf-8 from . import api from ihome import db, models # import logging from flask import current_app @api.route("/index") def index(): #print("hello") # logging.error() # 记录错误信息 # logging.warn() # 警告 # logging.info() # 信息 # logging.debug() # 调试 current_app.logger.error("error ...
68f348f513b91c32d500d8a3272d40b99cc7a7ca
d772869033c47a666622e9ee518bb306db5451a5
/unified/modules/main/categories/infinity/todoist/app.py
2ee182406a857a69619922c9df2148d1b969d723
[]
no_license
funny2code/unified_api
920f1e19b2304e331b019f8a531d412b8759e725
ffa28ba0e5c0bd8ad7dd44a468e3d1e777bba725
refs/heads/main
2023-08-31T16:00:17.074427
2021-10-04T04:09:45
2021-10-04T04:09:45
null
0
0
null
null
null
null
UTF-8
Python
false
false
573
py
app.py
import json from infinity.todoist.actions import TodoistActions from infinity.todoist.triggers import TodoistTriggers from unified.core.app import App, AuthInfo class TodoistApp(App,TodoistActions,TodoistTriggers): def __init__(self): super().__init__( name="Todoist", description="...
e1425c2e0a29841750c7d817d82c74c6d82c553d
02a59854a07739fc6d169623afb591e224e9d2f3
/filter_csv.py
5c5e852fbfc7b64e9919561d2ec843d80df3c370
[]
no_license
johncf/backblaze-proc
e0b287e5938763edb17835ddf8c2c2f9bf455d9c
befd104839dc0b70dc3604a126cc3d2c78e90cbe
refs/heads/master
2021-05-04T20:53:42.556362
2018-02-07T16:01:43
2018-02-07T16:01:43
119,846,243
0
0
null
null
null
null
UTF-8
Python
false
false
1,398
py
filter_csv.py
#!/bin/env python3 import csv import os import sys def eprint(*args): print(*args, file=sys.stderr) def csv_filter(csvwriter, infile): total = 0 ignored = 0 eprint("Reading:", infile) with open(infile, 'r') as f: reader = csv.DictReader(f) for row in reader: if len(row["serial_number"]) == 0:...
c76ba107434a1d9c2de5415d6212704ded5774ff
1de8ad3fa43a54707e2c1ea91694672dbc83e7d9
/app.py
4b9ec75a59e9d51f6929ac07c4511b724bfac1a6
[]
no_license
apoorv-arora/Zapplon-Bigturner
e312b721ef68f550e98f5918d9457dc52216f530
1d60c225ea0381b7185de21829fd1662a9a3e3e1
refs/heads/master
2021-06-17T10:04:21.178928
2017-05-15T06:58:15
2017-05-15T06:58:15
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,793
py
app.py
################# #### imports #### ################# import os from flask import Flask, render_template from flask.ext.login import LoginManager from flask.ext.bcrypt import Bcrypt from flask_mail import Mail from flask.ext.debugtoolbar import DebugToolbarExtension from flask.ext.sqlalchemy import SQLAlchemy #####...
05f0de0223aed1964a00bf2022269747eac80b4d
79e410d0811febf4992907051f043a14a495b674
/MySQLTestProject/src/AddEmployee.py
bde1bf7c23bb48328c33affa91f0c789db19205c
[]
no_license
rwondoloski/MySQLTest
3d89fa8ed80deb420dc85e64960d8514e2277ba3
383270b69f4cb666477a55e3814a19d46a4079a0
refs/heads/master
2021-01-22T07:11:22.402804
2015-05-21T01:26:40
2015-05-21T01:26:40
34,007,347
0
0
null
null
null
null
UTF-8
Python
false
false
2,624
py
AddEmployee.py
''' Created on Apr 15, 2015 @author: robert wondoloski ''' #!/usr/bin/python import MySQLdb def AddTable(tablename,field1,fieldtype): sql= "CREATE TABLE `TestDB`.`%s` \ ( `%s` %s) COMMENT='';" % (tablename,field1,fieldtype) try: cursor.execute(sql) db.commit() return except Ex...
b3363cb83c710da943dc89bb958ebb1c738e5611
d561d9d796398cff7a97d20ea308e1a4ce559982
/backend/dublinbus/forms.py
bc06364391b01f2cd479cf5987b7ae552855561f
[ "MIT" ]
permissive
Botazio/UCD-DublinBus
db8585dc3692b633152ca609bd17ed0fd5b8c405
35955cd9166b086f59157d23ed05a8ffcf82b617
refs/heads/main
2023-07-16T09:15:51.472348
2021-08-24T19:49:57
2021-08-24T19:49:57
375,993,567
5
0
null
null
null
null
UTF-8
Python
false
false
562
py
forms.py
from django.contrib.auth.forms import UserCreationForm, UserChangeForm from .models import CustomUser class CustomUserCreationForm(UserCreationForm): """ A subclass of the UserCreationForm so that they admin dashboard uses the CustomUser model. """ class Meta: model = CustomUser fiel...
7c2d6b0e359c6c562eafba942b6086a709ab044f
70d5d5e70f11f881fbf17c75fbb762201ad159cb
/euler-2.py
c278e0802592e5fd3b76f474ff28218e7f7561b9
[]
no_license
bruce-szalwinski/lpthw
e51b7b99ab4fbf59877e33a4a8b93ebe30068fb2
ee2edf10c000aa24bfe32d27d529a1dc66bad7e8
refs/heads/master
2021-01-01T17:41:16.958512
2017-08-06T19:31:07
2017-08-06T19:31:07
98,135,318
0
0
null
null
null
null
UTF-8
Python
false
false
129
py
euler-2.py
s = 0 a = 1 b = 1 limit = 4000000 while b < limit: if b % 2 == 0: s += b h = a + b a = b b = h print s
9bcab74bf65d04af39eba9bc27765b068c5d5451
94518964528b69c7dfe1705c573201898daac7a1
/Bot_main.py
3035b8f097f16a53153c64004384a4fc60d3b637
[]
no_license
Hunter-Will/Taxia-class-emotion-analyzer-Beta-
6b7b303c3c98b6dd6aceebe09ab026ba1bacf814
97cfec1e646e7f0c76a113bfc889f2367a9f4e8f
refs/heads/master
2020-12-20T15:04:10.199965
2020-10-15T11:35:39
2020-10-15T11:35:39
236,116,313
1
1
null
2020-10-17T02:54:58
2020-01-25T02:31:02
Python
UTF-8
Python
false
false
3,284
py
Bot_main.py
### Require chatterbot from Sentiment import SentimentVec from preprocessor import cleanstop,chprocess from chatterbot import ChatBot from ResponseSelection import sentiment_response import ChatTrain import os import sys def inie(): with open("./Data/SelfEom","w") as f: for i in range(10): f.wr...
81b42a7b772698b0cc41e9358d5e4656127b1987
f0255a43c7251fc3b0ea4ce74159c0951deec795
/oops/class_object.py
6cdc9b906627592989c304b2de1844a802b6a102
[]
no_license
SoundaryaGajjam/PythonPractice
46b10dbd55f50281b7b2b36f16c846bc5910f103
274582ffd9e401a23c47c7f97c6dfde23678dfa3
refs/heads/master
2020-07-01T17:31:44.195469
2019-09-10T05:50:28
2019-09-10T05:50:28
201,239,839
0
0
null
null
null
null
UTF-8
Python
false
false
754
py
class_object.py
class Employee: 'Common base cls for all emps' empCnt=0 def __init__(self, nm, sal): self.name=nm self.salary=sal Employee.empCnt+=1 def displayCount(self): print("Total emp count : %d" % Employee.empCnt) def displayEmp(self): print("Name : ", self.name, " ...
72d05b0a9a1bbb0ae2e86193c0ff6204a25df702
a9be32022e82253ad416befbc0379df618b73bba
/scraping_tickets_v0.5.py
7f1d7143ae1ccffe833cdc14188d55479798b630
[]
no_license
brunoparodi/ticketStatusWithPython
8b40224e8cf581c0e6b2b9d0b0885ca2a1cb5e89
1d702237b41add63ca422c3cbcaa6c2fa894a4fc
refs/heads/master
2020-03-27T15:54:55.145658
2019-03-27T11:37:09
2019-03-27T11:37:09
146,747,186
0
1
null
null
null
null
UTF-8
Python
false
false
3,507
py
scraping_tickets_v0.5.py
##'~~~~~~~~~~~~~~~~') ##'by Bruno Parodi ') ##'~~~~~~~~~~~~~~~~') from bs4 import BeautifulSoup from os.path import expanduser import platform, os, requests class userConfig(): #print user OS (Linux for Linux, Darwin for Mac and Windows for Windows) def user_os(self): return platform.system...
ecce12c57f45f839025ec7f1ddd5a640ed530a22
e397e3cdbe86fd71d2b110f0ee7110e40c62caac
/src/matcher/chain/ContractTypeMatcher.py
495300bae162da00ed5d305c76003677567265aa
[]
no_license
Platron-Tech/python-regex-matcher-chain
fb2f96a76b79c704d2cec7313970ffb672bd48d0
f587229826c05e8c0fd351f091179a72db761e0d
refs/heads/master
2023-02-01T18:47:02.640267
2020-12-07T10:59:53
2020-12-07T10:59:53
319,291,282
0
0
null
null
null
null
UTF-8
Python
false
false
1,252
py
ContractTypeMatcher.py
from src.matcher.chain.AbstractMatcherChain import AbstractMatcherChain from src.matcher.chain.contracttype.AnnulmentContractTypeMatcher import AnnulmentContractTypeMatcher from src.matcher.result.MatchResult import MatchResult class ContractTypeMatcher(AbstractMatcherChain): __first_pattern = '((proje|geliştirme...
255367a01a35f6b41ba4981aa6cf9cc4fd940bef
f9d57a2180d76aab16b5b67642f5ff6e09babf53
/examples/coco_caption/retrieval_experiment.py
942743332a7bc1358fadd2904ff6480df5b60db8
[]
no_license
qin901102/caffe-multilabel-1
963c89e54a4ee80620ec5561bc1094522dbc89c1
cf93d96c9f82c929900734e2ab1f22746247899f
refs/heads/master
2021-01-25T06:49:11.928096
2016-10-08T15:17:00
2016-10-08T15:17:00
null
0
0
null
null
null
null
UTF-8
Python
false
false
15,538
py
retrieval_experiment.py
#!/usr/bin/env python from collections import OrderedDict import json import numpy as np import pprint import cPickle as pickle import string import sys # seed the RNG so we evaluate on the same subset each time np.random.seed(seed=0) from coco_to_hdf5_data import * from captioner import Captioner COCO_EVAL_PATH = ...
70c910d94cc879aff287c2bbc3853e935fcafff0
331635a7ffc237ebc34722d6eb2ae69e0b82c3a2
/20190927-baseball/main.py
117b1705c034e5ebda724688fb48ea5160784576
[]
no_license
brmcdonnell/riddlers
22192dd07288be99f5fcd659d68be9a65a32f3f7
674cb31637ed88f29f37078de1945d367895a2ca
refs/heads/master
2022-04-20T08:36:00.402698
2020-03-28T20:44:54
2020-03-28T20:44:54
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,031
py
main.py
from teams import Moonwalkers, Doubloons, Taters def sim_game(t1, t2): t1.sim_game() t2.sim_game() while t1.score == t2.score: t1.overtime_inning() t2.overtime_inning() return t1.name if t1.score > t2.score else t2.name N_GAMES = 10000 m_wins = d_wins = t_wins = 0 # Moonwalkers vs D...
aae65b45c7b38e81873f46f26493fea16b691030
6a838d462947b0d46bbb041f89d87a78e2d481bc
/ForOffer24.py
2ccda5025cd03709d3ddd129512365734b04d156
[]
no_license
oo363636/test
f198237055f0393be2271499a080696801dda5c5
ec5b8128205c15dd4fd17786d1dff66e57995f68
refs/heads/master
2023-03-04T14:53:53.430602
2021-02-18T03:09:23
2021-02-18T03:09:23
275,282,749
2
0
null
null
null
null
UTF-8
Python
false
false
2,280
py
ForOffer24.py
"""定义一个函数,输入一个链表的头节点,反转该链表并输出反转后链表的头节点""" class Solution: class ListNode: def __init__(self, x): self.val = x self.next = None def reverse_list(self, head: ListNode) -> ListNode: # stack = [] # Stack # cur = head # while cur: # stack.app...
4047a2474cd997c471ed383cd713056ea82801bb
903a0ad898485219dc09b4dd1bd298885cd82505
/secondary_implementations/python/modules/AbstractModule.py
0489835eaa9d053dc4bfaa74c2f42aa66af3dc08
[ "MIT" ]
permissive
caseyagil/shard
541a9c412022e892079e954c20eccee748717a65
6bb761dc7f458fa33419da758f610313e21284e6
refs/heads/master
2021-01-22T10:02:11.568765
2016-07-13T03:46:24
2016-07-13T03:46:24
63,238,800
1
0
null
2016-07-13T10:57:47
2016-07-13T10:57:47
null
UTF-8
Python
false
false
461
py
AbstractModule.py
import random from abc import ABCMeta, abstractmethod class AbstractModule: __metaclass__ = ABCMeta def user_agent(self): agents = [ "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (...
6c467b6f8bd4d0251f2da87ef85004c263509b9b
46c13686d9d596a853f5c459e9798f63e160db46
/BlackJack_01.py
347f0a87a73adf847cf3cf6acf1c62e768acf20e
[]
no_license
markbbbnyc/BlackJack
5f66e0dcac106d4426faaaba097d041dfbc0ecec
f21f4f9b4994b30813984ad26aceb563ca178d25
refs/heads/master
2020-04-26T11:05:10.366144
2019-03-03T04:15:53
2019-03-03T04:15:53
173,504,911
0
0
null
null
null
null
UTF-8
Python
false
false
4,955
py
BlackJack_01.py
''' Udemy Python Course Milestone 2 Challange to create a Black Jack game with the following assumtions: You need to create a simple text-based BlackJack game The game needs to have one player versus an automated dealer. The player can stand or hit. The player must be able to pick their betting amount....
bdbfcabe739096ca07e2d8c5e0fb90cbe96f616f
9628220b15d2bfa216b487398d7dc15a6fead299
/Controller/OpenSecrets.py
f35a9ecc18276a86c89846f622d7dd136f4713ae
[]
no_license
tommy3531/PythonDataScience
5be8b8067f76fe5096991831bdc0ad936f2fa2a4
06e9a4bd57dd525ea27e72cae80e3f552ed254c3
refs/heads/master
2020-03-28T12:05:15.250499
2018-10-28T21:37:19
2018-10-28T21:37:19
148,269,074
1
0
null
null
null
null
UTF-8
Python
false
false
2,448
py
OpenSecrets.py
# API: 95616cf411e10bdf902c3681fe59fda5 import requests import pprint def get_top_contributors_for_rep(crp_id): print("Top Contributors" + "\n") api_key = '95616cf411e10bdf902c3681fe59fda5' url = 'https://www.opensecrets.org/api/?method=candContrib&cid=' + crp_id + '&cycle=2018&output=json&apikey=' + api_...
4224364661d4b47666286d29520fa290c5d9e5c3
ace98f6a25a41d93ac51307f45a79029e0913547
/Huawei_config_int.py
bcd166ff6ed9eeefb9600feaa9e46be6e87eec57
[]
no_license
evbedarev/learn_python
954c1d707b6e9c6c6a9511d59126867b926c23c7
cc3653950194355ce7ee47f744596f6d47ec9d1f
refs/heads/master
2021-09-06T06:43:14.028561
2018-02-03T11:04:13
2018-02-03T11:04:13
105,275,712
0
0
null
null
null
null
UTF-8
Python
false
false
283
py
Huawei_config_int.py
import re data = 'interface range gW/0/1 to gW/0/48' for i in range(0, 5): dat = re.subn(r'W', str(i), data) print(dat[0]) # f = open(r'/home/mj/rr1.txt', 'r') # for line in f: # print(line.strip()) # f.close() print('undo shutdown') print('quit')
119e7f160d40ca2cdd58f7baff9a83de78656f3f
3f41bafb8012f264605724dbe9b1a6ee11a1f767
/source/object_detection/test/utils/dataloader.py
d886517c46e23fde427710d9a12a2927b2fad484
[]
no_license
pervin0527/pervinco
6d0c9aad8dbf6d944960b2e2c963054d1d91b29a
9ced846438130341726e31954cc7e45a887281ef
refs/heads/master
2022-11-26T02:11:00.848871
2022-11-24T00:56:14
2022-11-24T00:56:14
223,062,903
5
3
null
null
null
null
UTF-8
Python
false
false
2,708
py
dataloader.py
import cv2 import math import numpy as np import tensorflow as tf from PIL import Image from utils.utils import cvtColor, preprocess_input class DataGenerator(tf.keras.utils.Sequence): def __init__(self, annotation_lines, input_shape, batch_size, num_classes, max_detections): self.annotation_lines = annota...
cc269f88ca39efd2ec6369b715e95e00ba366d41
46bd3e3ba590785cbffed5f044e69f1f9bafbce5
/env/lib/python3.8/site-packages/pip/_internal/configuration.py
5b2428fdada66163b5c1fb5a4286a197c6fa1cc1
[]
no_license
adamkluk/casper-getstarted
a6a6263f1547354de0e49ba2f1d57049a5fdec2b
01e846621b33f54ed3ec9b369e9de3872a97780d
refs/heads/master
2023-08-13T11:04:05.778228
2021-09-19T22:56:59
2021-09-19T22:56:59
408,036,193
0
0
null
null
null
null
UTF-8
Python
false
false
130
py
configuration.py
version https://git-lfs.github.com/spec/v1 oid sha256:4012df86ffac6cffa8474f0d1714989effe62c1f9282d34eb165c017db4311c3 size 13725
e745e2ccdfbe9f5ce1f72eadee9aa64ea8f8f615
eb9f655206c43c12b497c667ba56a0d358b6bc3a
/python/helpers/typeshed/stdlib/email/headerregistry.pyi
b2b63c4ac72c66f4e8efddd1e1e782f2ab13a21f
[ "Apache-2.0", "MIT" ]
permissive
JetBrains/intellij-community
2ed226e200ecc17c037dcddd4a006de56cd43941
05dbd4575d01a213f3f4d69aa4968473f2536142
refs/heads/master
2023-09-03T17:06:37.560889
2023-09-03T11:51:00
2023-09-03T12:12:27
2,489,216
16,288
6,635
Apache-2.0
2023-09-12T07:41:58
2011-09-30T13:33:05
null
UTF-8
Python
false
false
6,260
pyi
headerregistry.pyi
import sys import types from _typeshed import Self from collections.abc import Iterable, Mapping from datetime import datetime as _datetime from email._header_value_parser import ( AddressList, ContentDisposition, ContentTransferEncoding, ContentType, MIMEVersion, TokenList, UnstructuredToke...
81f52aa6a776a234fee07e431d4579f4e2953105
55269ba2d05473bac4bc03199988ef3ac850ac08
/Beam.py
07c1430f68f93c4197f8ea746f165411f34b6e84
[]
no_license
sarwar187/Neural-Query-Translation
3bc49cda834f15cb0ab397659d5af6af2f133381
005472448fc94227a7642fb7da3ec8eb901af8c4
refs/heads/master
2021-06-18T23:29:11.594006
2019-10-12T20:28:23
2019-10-12T20:28:23
212,120,948
0
1
null
2021-05-23T06:08:27
2019-10-01T14:42:40
Jupyter Notebook
UTF-8
Python
false
false
6,392
py
Beam.py
import torch from Batch import nopeak_mask import torch.nn.functional as F import math import numpy as np def init_vars(src, model, SRC, TRG, opt): init_tok = TRG.vocab.stoi['<sos>'] src_mask = (src != SRC.vocab.stoi['<pad>']).unsqueeze(-2) # this is the output from the encoder e_output = model.encode...
f6da4b71fc689d8b20983a5c7faba0084d03f7f5
73bb76f8dd97bfc4c5785fef6c6d36b953a4bbd4
/code/p02.py
3d3fd1c1f3e161d36a92d3a6bd94a0b132e76b76
[]
no_license
xju2/alg4interview
28b11cbaa1d0a541e1bcfbb6d98f220d5e41059e
f4d0f0b6519ec6793c11b4e8f509852b3b0d943a
refs/heads/master
2021-01-18T14:22:14.239422
2015-01-30T01:51:08
2015-01-30T01:51:08
29,868,050
0
0
null
null
null
null
UTF-8
Python
false
false
1,080
py
p02.py
#!/usr/bin/env python """create a strack with min(), which returns the minimum. the time cost of pop(), push() and min() is order of O(1)""" class Stack: def __init__(self): print "Stack is created" self.currentMin = 9999999 self.minArray = [] self.array = [] def push(self, v...
b846b1e2e85dee105ae204f00ca375244a2cb0f4
3785fb56f213d5035ff8e4b13cb5889e35921713
/practice6.py
86224bad02db97147d470ab4db3b7278c0d77b19
[]
no_license
devamcodes/mini_projects
38a7ef4045db58f2c9a05e7403d39d80b7d3170f
aaa023bfbb6c8158c492d7d3c7888bdb463f0e8f
refs/heads/master
2022-12-28T21:58:58.853390
2020-10-19T12:26:00
2020-10-19T12:26:00
278,716,436
0
0
null
null
null
null
UTF-8
Python
false
false
310
py
practice6.py
name = input("PLEASE ENTER YOUR NAME:") me = "devam" if me==name: print(f"Hello, {name.title()}") print ("YOU CAN RUN THE PROGRAM.") user = input("ENTER LOTTERY OR OPERATION:") for lottery in user: print("TRY YOUR LUCK HERE.") else: print("SORRY YOU ARE NOT AUTHORISED.")
11b9cea353137fe0beecf250871faf096c64bab7
047af8599688672431bbb65f4e90967e660feab9
/osaka/storage/file.py
102353f9750141d4c10c91d791ce8a0548962385
[ "LicenseRef-scancode-proprietary-license", "Apache-2.0" ]
permissive
hysds/osaka
eeb1b186288f8ec1a16ce41c8fdac3373f431f79
f6f83c3e766ed0ee6d26f0cb5fbff35411cafd75
refs/heads/develop
2023-06-22T12:07:33.735901
2023-06-09T17:25:59
2023-06-09T17:25:59
106,748,707
7
12
Apache-2.0
2023-06-09T17:26:01
2017-10-12T21:46:36
Python
UTF-8
Python
false
false
7,162
py
file.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from builtins import object from builtins import open import urllib3.response from future import standard_library standard_library.install_aliases() import urllib.parse...
366447c587cf99469278ac6bec6dc49f139290de
74374652a31242cba8a67934c91140b4526c33d5
/worker/submit.py
48d7694681c35c3ac9da936d862a3a7ab9fd641e
[]
no_license
medford-group/jobs-worker
86384ce387db695b4c37d57d01e6b5194f77d3b1
ccf07c6e0360b6a1133f2c738adb6caec9925835
refs/heads/master
2021-01-20T03:17:10.506586
2017-04-25T14:12:51
2017-04-25T14:12:51
null
0
0
null
null
null
null
UTF-8
Python
false
false
2,217
py
submit.py
import json from string import Template import os from popen2 import popen2 cwd = os.path.dirname(os.path.abspath(__file__)) full_storage_dir = cwd + '/../storage' if not os.path.exists(full_storage_dir): os.makedirs(full_storage_dir) def main(): submit_jobs() def submit_jobs(): with open(cwd + '/../jobs/meta...
4d35bb83378805daf4392a1752386ab1403404e0
5605b0b433f664a445f565de8e8e464ae7e3713a
/3_Collections/1_Lists.py
92eae6b7b823aaf6e00ad44693df9bf5c8ff37cf
[]
no_license
SandeepDhamale19/TestAutomation.Python.Basics
8afa01222d5022c38e15efebf69c5220acd95f35
57e823e55c16bf757730703785830f4832bbcc3f
refs/heads/master
2022-12-02T06:45:17.941330
2020-07-31T06:11:03
2020-07-31T06:11:03
null
0
0
null
null
null
null
UTF-8
Python
false
false
5,590
py
1_Lists.py
# Lists are sequence of objects # Mutable # Lists are represented within square brackets and items are seperated by commas #-----------------------------------Lists-----------------------------------# # Lists of Numbers print("\n1. Lists of Numbers") print("\t" + str([1,2,3])) # Lists of Strings print("\n2. Lists of ...
bbd50c40bc0897fe7a93f277bcfdcba3ba6d6f2a
920b9cb23d3883dcc93b1682adfee83099fee826
/itsm/openapi/management/commands/data/api_resource_add_sub_path.py
bc5214058152d25d3cf9a9cf800ed28149020c15
[ "MIT", "LGPL-2.1-or-later", "LGPL-3.0-only" ]
permissive
TencentBlueKing/bk-itsm
f817fb166248d3059857b57d03e8b5ec1b78ff5b
2d708bd0d869d391456e0fb8d644af3b9f031acf
refs/heads/master
2023-08-31T23:42:32.275836
2023-08-22T08:17:54
2023-08-22T08:17:54
391,839,825
100
86
MIT
2023-09-14T08:24:54
2021-08-02T06:35:16
Python
UTF-8
Python
false
false
735
py
api_resource_add_sub_path.py
# -*- coding: utf-8 -*- import sys import yaml def add_sub_path(yaml_path): file = open(yaml_path, "r", encoding="utf-8") file_data = file.read() file.close() data = yaml.safe_load(file_data) for p, p_info in data.get("paths", {}).items(): for method, m_info in p_info.items(): ...
af40239551709eff02b8a1f034583ab80845d1d7
ca7aa979e7059467e158830b76673f5b77a0f5a3
/Python_codes/p03326/s901823639.py
51d7905da15b8d08d6cb4aad2ac05558cf9785d5
[]
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
433
py
s901823639.py
import numpy as np N, M = (int(x) for x in input().split()) x, y, z = np.zeros(N, dtype=int), np.zeros(N, dtype=int), np.zeros(N, dtype=int) for i in range(N): x[i], y[i], z[i] = (int(x) for x in input().split()) temp = [] for sx in (-1, 1): for sy in (-1, 1): for sz in (-1, 1): _x, _y, _z =...
0dad1937df39c012f7991c3897f27964bed1d5a0
2ad1f7e48c8d2dfc9b1810e2d5d14807d3614126
/cross_validation.py
b5346320733737d1404b4969b18c0a999e3010b0
[]
no_license
aravindsairam/Pytorch_classification-CatsvsDogs
1922b2bf990c17dbd216ee9e05fbe58e48939673
fc6193261d42dd4dcf4d38e6dd0ec168ca76dfe6
refs/heads/master
2022-07-30T08:51:06.412292
2020-05-12T22:32:21
2020-05-12T22:32:21
261,208,693
0
0
null
null
null
null
UTF-8
Python
false
false
3,871
py
cross_validation.py
import numpy as np from sklearn import model_selection from iterstrat.ml_stratifiers import MultilabelStratifiedKFold """ - binary cross-validate - multi-class cross-validate - multi-label cross-validate - holdout - regression """ class CrossValidate(object): def __init__(self, df, target_cols...
9c2cc5b993f020b8a1c96ea4cd5c2fb2da44a251
c7c5597e8863e9485c11de9acc20b9d38473aff8
/src/pycolocstats/tools/tracks.py
b8cc50cceaafbcf5ad3e144cc396ec72690902b4
[ "Apache-2.0" ]
permissive
hyperbrowser/pycolocstats
5f890c1549155ec25804946ad3df25fe769c31c6
7996f222a38d11d0cc69fdc1ec05e8645fa44a30
refs/heads/master
2023-07-22T22:23:14.375767
2022-03-25T03:49:19
2022-03-25T03:49:19
110,252,158
2
0
Apache-2.0
2023-07-16T09:18:57
2017-11-10T13:51:31
Python
UTF-8
Python
false
false
2,816
py
tracks.py
from __future__ import absolute_import, division, print_function, unicode_literals import os from collections import defaultdict from past.builtins import basestring from pycolocstats.core.config import REF_COLL_GSUITES_PATH __metaclass__ = type class RefTrackCollectionRegistry(object): PREBUILT = '__prebuilt_...
951fafe9f1b9a3273f30d101831d1e59e26fe85d
df60f701501a09f32614db44ba14d9776efa2cc7
/wapi/models.py
2a82cbb3a4774b45a6b3f61171a972f90c026cf7
[ "Apache-2.0" ]
permissive
lunious/wdjango
6dcf787c6d694e0ba0b1a5bae9df769c18c385ac
dd1dc2f8716e38a773ba279269572b6af4266608
refs/heads/master
2020-03-21T10:51:11.397978
2018-08-06T03:54:02
2018-08-06T03:54:02
138,474,654
0
0
null
null
null
null
UTF-8
Python
false
false
2,517
py
models.py
from django.db import models class ScggjyList(models.Model): title = models.CharField(max_length=255) pubData = models.CharField(db_column='pubData', max_length=255) detailLink = models.CharField(db_column='detailLink', max_length=255) detailTitle = models.CharField(db_column='detailTitle', max_length...
81f0119f6f348f6d33e8d22f588fc8c2e0593d3c
0142e61b3d124668480151621b1cee660c5db7e5
/sponsors/models.py
2caf457453fe685d1cfe8d2e4ff2536bce7b61dc
[]
no_license
ShubhankarSingh/College-Fest-Management
dd8b29c14cf4330fd2240684f8f46758de9a4097
89b6b53d2f5ca736a93f377e1987c2adf192b6fa
refs/heads/master
2023-05-21T01:15:19.565507
2021-06-11T17:28:02
2021-06-11T17:28:02
376,096,277
0
0
null
null
null
null
UTF-8
Python
false
false
829
py
models.py
from django.db import models from django.utils.text import slugify # Create your models here. class SponsorType(models.Model): name = models.CharField(max_length=100) def __str__(self): return self.name class Sponsor(models.Model): type = models.ForeignKey(SponsorType, on_delete=models.CASCADE, ...
f702cdef3782ddc96244f3cf8e2026581d60baa9
39a94a69c82fc4f6df8956d811ae1a14cc58a042
/brewery/scaffolding/schema.py
aa25c4afc7abcc7dde107382d8a000f71ddde939
[ "Apache-2.0" ]
permissive
massimosammito/terminusdb-tutorials
9afcbede11edf6709564a821b031b4aa0ce399fc
25f072c5f2579af88a90f2f0fa85dd861305f731
refs/heads/master
2023-08-20T04:12:50.181626
2021-10-21T16:32:04
2021-10-21T16:32:04
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,291
py
schema.py
#### # This is the script for storing the schema of your TerminusDB # database for your project. # Use 'terminusdb commit' to commit changes to the database and # use 'terminusdb sync' to change this file according to # the exsisting database schema #### from typing import List from terminusdb_client.woqlschema impor...
5c3bf49f88dec429ec85cceb8130cccf2691363b
a6638d0741e831e1f3fb244b44a19dce9a8eb850
/dive-into-python3/chapter04/ex_string.py
050640fc8d68a2e7edb3ab85ffa062eddbdf52ec
[]
no_license
hsoh1990/learning-python
d5e834b475c06bda87caa740a1ccf5fdcf154749
c0b5ede2832a08d194c30eac7e5daea9b4ac0e8c
refs/heads/master
2020-03-25T19:27:05.296080
2018-09-14T07:03:16
2018-09-14T07:03:16
144,083,736
0
0
null
null
null
null
UTF-8
Python
false
false
634
py
ex_string.py
if __name__ == '__main__': print('--------------------------------------') query = 'user=pilgrim&database=master&password=PapayaWhip' a_list = query.split('&') print(a_list) print('--------------------------------------') a_list_of_lists = [v.split('=', 1) for v in a_list if '=' in v] prin...
a0ffb793650b0e911dd9bcbec0b7ba76f7829c12
163bbb4e0920dedd5941e3edfb2d8706ba75627d
/Code/CodeRecords/2692/60749/236088.py
1fd1975f4de5d652c2305db61cadd9d9de711eab
[]
no_license
AdamZhouSE/pythonHomework
a25c120b03a158d60aaa9fdc5fb203b1bb377a19
ffc5606817a666aa6241cfab27364326f5c066ff
refs/heads/master
2022-11-24T08:05:22.122011
2020-07-28T16:21:24
2020-07-28T16:21:24
259,576,640
2
1
null
null
null
null
UTF-8
Python
false
false
678
py
236088.py
def minvalue(weight,Day): maximum = 0 res = 0 for x in range(0, len(weight)): if weight[x] > maximum: maximum = weight[x] res += weight[x] Capitivity = max(res // Day, maximum) while True: sum=0 day=1 for t in range(0, len(weight)): if ...
25bd0b443153aa901815755b154be1ffcfc5597a
97d762a0902c5a67989670a31025a357d77097db
/privat/spiders/spider.py
614d613f4f8c79b6d7e7069b825bdff3101fd54c
[]
no_license
SimeonYS/privat
d90971c2e16f6a92323393e3fde1c5cd333c8c2f
2ec29cb587d4e9e14d18af621d8a7dbfd7956b5e
refs/heads/main
2023-03-14T02:41:48.487318
2021-03-02T11:36:18
2021-03-02T11:36:18
343,752,911
0
0
null
null
null
null
UTF-8
Python
false
false
1,155
py
spider.py
import re import scrapy from scrapy.loader import ItemLoader from ..items import PrivatItem from itemloaders.processors import TakeFirst pattern = r'(\xa0)?' class PrivatSpider(scrapy.Spider): name = 'privat' start_urls = ['https://privatbank.com.cy/en/news/'] def parse(self, response): post_links = response.x...
9822240650cc20cab55f5b8ced9b4854387b149f
ff642c107f68787cae4fb3cf95e428e7e0856228
/FAQ1/urls.py
4e41ace3ade3092272f11b29367c8304ed53ba25
[]
no_license
riteshsharthi/botx
62d0d86fdcde58e4222cbf6655e1315175d2d3d3
dc6031ac1bb788bae6697eacbd5c2d942d7f9f95
refs/heads/master
2022-12-08T09:46:10.626671
2019-01-03T12:03:05
2019-01-03T12:03:05
163,968,682
0
0
null
2022-11-22T03:11:05
2019-01-03T12:12:58
HTML
UTF-8
Python
false
false
2,248
py
urls.py
from django.conf.urls import url from rest_framework.urlpatterns import format_suffix_patterns from . import views, views1, viewsbot, newviews urlpatterns = [ url('^entity/$', views.Entity_Details, name='entity'), url('^entitycreate/$', views.Entity_Create, name='entityCreate'), url('^entitydelete/(?P<id>...
3157e0ad03fcb08e0b66cad6242aef367d509433
c6109521be9423620afea564ed66bfc5e581ecdd
/examples/get_demo.py
904c47e923b9afab88f5ad1ca81357ab2cfd05a3
[ "MIT" ]
permissive
justagist/torchdiffeq
a08604c8d20bb0b855076328825252bbb69ced80
7a862fe68c987a38250f1eef28038e5e2688cfc9
refs/heads/master
2021-06-30T18:36:35.133289
2019-03-10T11:29:01
2019-03-10T11:29:01
174,814,063
1
0
MIT
2021-02-12T13:30:37
2019-03-10T11:27:01
Python
UTF-8
Python
false
false
842
py
get_demo.py
import torch import numpy as np data_file = '../data/js_to_os_traj.csv' # data_file = '../data/push_traj.csv' def load_demo(): data = [] ee_pos_data = np.loadtxt(open(data_file, "rb"), delimiter=",", skiprows=0)[100:1100] x_data = np.flip(ee_pos_data[:,0]) y_data = -np.flip(ee_pos_data[:,1]) ...
a51de430f543aa551c409a12fde05b0c187dcc92
d0e186abbc8cb8d59a15e40f3d4c48f56b3a8028
/test.py
9421037043fdf663c94e6dc9514c3a160858886f
[]
no_license
xiongma/HAN
6f2f416ca44f4c584eab321817f7ef2acaab7d48
d20e2ec11d93c419549cd3f0c153d65222813e4b
refs/heads/master
2021-09-22T11:56:14.033362
2018-09-10T08:58:30
2018-09-10T08:58:30
143,026,017
1
0
null
null
null
null
UTF-8
Python
false
false
825
py
test.py
import tensorflow as tf # 两个矩阵相乘 x = tf.constant([[1.0, 2.0, 3.0], [1.0, 2.0, 3.0], [1.0, 2.0, 3.0]]) y = tf.constant([[0, 0, 1.0], [0, 0, 1.0], [0, 0, 1.0]]) # 注意这里这里x,y要有相同的数据类型,不然就会因为数据类型不匹配而出错 z = tf.multiply(x, y) # 两个数相乘 x1 = tf.constant(1) y1 = tf.constant(2) # 注意这里这里x1,y1要有相同的数据类型,不然就会因为数据类型不匹配而出错 ...
3387223917f97a1075f2173b84306d25aeb1a2bd
a8d68074db5c2b2697650ed0281979d3e00cf5a8
/python-spider/one_hour_spider/unsplash20180731.py
2b6c72791a9b64269f2751a416712ffaee32903d
[]
no_license
15807857476/bogdata-2
9595609ea2ae5ae0a48c511f911df2498456467e
1934cdfa234b77ca91e349b84688db113ff39e8c
refs/heads/master
2023-05-26T19:10:18.439269
2019-05-24T02:50:41
2019-05-24T02:50:41
188,327,526
3
1
null
2023-05-22T21:37:27
2019-05-24T00:53:28
Python
UTF-8
Python
false
false
1,207
py
unsplash20180731.py
# -*- coding:utf-8 -*- import requests import json import os from contextlib import closing """ 从https://unsplash.com/爬取壁纸代码,使用时我是开启了代理软件 国内网速貌似有些限制,很慢 2018-07-31 """ # 本地保存图片根路径(请确保根路径存在) save_path = 'G:/pythonlearn' dir_path=save_path+'/'+'unsplash-image' if not os.path.exists(dir_path): os.path.join(save_p...
f42336e4763e8d2d344f8d26ebbdccdd14f5e002
b732f63f54d6ca73afee55e333e2ce78fbc83a03
/ecs/signature/utils.py
b1230975feb8e6268d299556ed7aa84f824de22f
[ "Apache-2.0" ]
permissive
ecs-org/ecs
c1df0817ed06fe662a590be1cbf1db191d32e1a6
b09f0d57572e0e320e51c8acb0229250892ecfbb
refs/heads/master
2022-09-01T03:35:50.828804
2021-05-20T15:13:39
2021-05-20T16:13:01
81,847,697
10
4
NOASSERTION
2022-08-12T13:17:52
2017-02-13T16:46:14
Python
UTF-8
Python
false
false
3,173
py
utils.py
import random from functools import wraps from datetime import timedelta import urllib.request, urllib.parse, urllib.error from django.conf import settings from django.core.cache import cache from django.http import Http404 from django.core.urlresolvers import reverse def _total_seconds(td): # work around python < 2....
d639c7cd162cfd168eb46da57c604884cc4e5f57
54bcc87b187bbeb7a8ae93f7f08368668ac24303
/app/models/reply.py
f7b69e65d651b12908c50c0473029c73f3bf6465
[]
no_license
ikebo/flea
aff73d007fdfae2d1e0781004154155ca4858367
c06370ad2e3201cff9293459c3ee3c0a063824eb
refs/heads/master
2022-12-09T12:48:52.260652
2018-12-13T12:26:59
2018-12-13T12:26:59
136,294,239
4
0
null
2022-12-08T01:16:43
2018-06-06T08:02:12
Python
UTF-8
Python
false
false
1,116
py
reply.py
""" Created by kebo on 2018/10/15 """ import datetime from . import db from app.models.base import Base from flask_sqlalchemy import orm class Reply(Base): __tablename__ = 'reply' id = db.Column(db.Integer, autoincrement=True, primary_key=True) content = db.Column(db.String(100)) ...
495d5d77714e5e6f64a0b298fde907e49750cbed
520ac1b830da8626b3f049e92a73f4223eaf87df
/tests/SharedFunc.py
59bfddee87a5fce1249fd930fdbc75b59c38060d
[]
no_license
genycho/sample-python-selenium
474cc4c43b00588c134577ab37d283a1472bdf91
50a921643f3f119b12de8404adf24d61b7cfb49e
refs/heads/main
2023-03-15T03:01:46.559672
2021-03-16T01:45:42
2021-03-16T01:45:42
347,914,289
0
0
null
null
null
null
UTF-8
Python
false
false
2,246
py
SharedFunc.py
import os import requests from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from tests import Env4Dev def getProductType(targetUrl): apiPath = "/gcm/product-type" re...
2c25d8ccd92922594b0df77e1242fcf2bb696f9f
bb15e87e77086dc99a43544e7481c77f3481bd7b
/tests/test_models/test_place.py
89362fba0ab4041127f56799e69afe1cdcc9e08a
[]
no_license
julianalvarezcaro/AirBnB_clone_v2
4435a4e9cc992b161f06dcd778b99ab0f1ec02bc
f77a4b578e463b03eff378f92c68e08ab455026e
refs/heads/master
2023-02-16T21:56:23.500399
2021-01-20T02:11:35
2021-01-20T02:11:35
321,492,213
1
1
null
null
null
null
UTF-8
Python
false
false
2,699
py
test_place.py
#!/usr/bin/python3 """ """ from tests.test_models.test_base_model import test_basemodel from models.place import Place import unittest import pep8 from models.base_model import BaseModel class test_Place(test_basemodel): """ """ def __init__(self, *args, **kwargs): """ """ super().__init__(*a...
09d8a42a066b65cab299523cb752cd7be242aced
cce1ba5ed224fadd98c96dd697972fd16479a849
/lib/kinect_tracking_to_arduino.py
1cc398caafddff4a938a2d47b5b7443dac4d6d9f
[]
no_license
shanewwarren/animatronic-eyes-kinect-tracking
d48623f719630cc812d85002f385ca712ec651ff
933618d6d6642976f2e007ad62ca48cee1e45a8c
refs/heads/master
2020-05-17T17:20:30.150453
2012-11-13T16:35:07
2012-11-13T16:35:07
null
0
0
null
null
null
null
UTF-8
Python
false
false
4,076
py
kinect_tracking_to_arduino.py
#!/usr/bin/env python import freenect import cv import frame_convert import time import serial import math from classifier_group import ClassifierGroup from classifier import Classifier def get_video(): video = freenect.sync_get_video() return frame_convert.video_cv(video[0]) def detect_and_display(frame):...