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
c830a35408128756991d8d4b32d07628883a44ad
87e7b4559566050768130d82e9d422e2fefc1a49
/BasicDemo/learnPython1.3.py
bcaa9a5d12ba4bd5d3464a33cfdcaaacdeffd27b
[]
no_license
sunshinelu/pythonDemo
dc52cfea6c43eaab93b3660857b217ab42c1f889
5275a61cbe6426110c42d6bcd89c9b5cd204c538
refs/heads/master
2021-01-17T17:58:37.298023
2018-04-16T02:16:18
2018-04-16T02:16:18
95,527,761
0
0
null
null
null
null
UTF-8
Python
false
false
880
py
learnPython1.3.py
# -*- coding:utf-8 -*- import sys import os import jieba reload(sys) sys.setdefaultencoding('utf-8') #结巴分词--全模式 sent = '在包含问题的所有解的解空间树中,按照深度优先搜索的策略,从根节点出发深度探索空间树。' wordlist = jieba.cut(sent, cut_all=True) print " | ".join(wordlist) #结巴分词--精确分词 wordlist2 = jieba.cut(sent) print " | ".join(wordlist2) #结巴分词--搜索引擎模式 wordl...
af70e41e24e85b6bcbae6f9e9fa57ad89811a83f
2c4bbc39196c9aa2de5455355be5f1e904fc0bb9
/test/test_cli.py
6e769810c456af1b1570461d260ec4d61f398dad
[]
no_license
phizaz/remote-docker
cc34c0ade8d56276f5fda84f7e315277d5eddf15
60f3e77f598c0e7eb7536e096cb6ad8b63258b4a
refs/heads/master
2020-09-23T11:42:43.793751
2017-02-20T12:23:07
2017-02-20T12:23:07
67,024,297
3
0
null
null
null
null
UTF-8
Python
false
false
8,700
py
test_cli.py
import unittest ''' Usage: remotedocker list $ tag host step time elapsed $ firstrun ta@home sync to remote 5 minute $ secondrun test@remote building 3 seconds remotedocker run [options] [cmd [args...]] remotedocker run -t tagname python test.py [args...] ...
e3e30f3dec3911f15cdc611c3fc1833b87eb6ad3
90d39aa2f36783b89a17e0687980b1139b6c71ce
/SPOJ/GEOPROB.py
4c4507ee0a31e0d735bde7baabb567fbc21f837d
[]
no_license
nims11/coding
634983b21ad98694ef9badf56ec8dfc950f33539
390d64aff1f0149e740629c64e1d00cd5fb59042
refs/heads/master
2021-03-22T08:15:29.770903
2018-05-28T23:27:37
2018-05-28T23:27:37
247,346,971
4
0
null
null
null
null
UTF-8
Python
false
false
119
py
GEOPROB.py
#!/usr/bin/python t = input() while t>0: b,c,d = tuple(raw_input().split()) print 2*int(c) - (int(b)+int(d)) t -= 1
e251f1fa059f45763eb53063adcc7eeee892bdf6
00d48eece80a2c4cfe70512ea6b044c30b7ac614
/squares.py
fd4d6d80b43a4ef7c6d13f96649007604e8151a7
[]
no_license
frankbryce/fsys
6605f72c9f448d0c333c7e300b2b9d7de5599478
46ccdf5274e5b1684cc428283e87759e656861e6
refs/heads/master
2022-11-06T17:08:46.321673
2020-06-19T03:08:00
2020-06-19T03:08:00
272,865,592
0
0
null
null
null
null
UTF-8
Python
false
false
473
py
squares.py
import re def _isAxiom1(a): return a in A def AddAxiom(a): if _isAxiom1(a): A.add(a) T.add(a) else: raise Exception("this is not an axiom") def AddTheorem(r, t): assert t in T assert r in R newT = re.sub(r'^{}$'.format(r[0]), r[1], t) T.add(newT) A = set(['N-']) T...
817d2c4bf0090c4e44291440e662762a5f4b7d4d
75c6e58a2313689b7dceff73043af3915b57592c
/LeetCode/1732. Find the Highest Altitude.py
45bd075f266bc977235e22c7860f5b38babfd154
[]
no_license
bunedin81/coding_test
200f615900f75676d7ba7fe36ca3faffaf47b7fb
0acf718558c76bdf7b9774fd9259ecb5fb2bd5e8
refs/heads/main
2023-06-05T20:15:55.923150
2021-06-22T14:24:02
2021-06-22T14:24:02
372,347,173
0
0
null
null
null
null
UTF-8
Python
false
false
451
py
1732. Find the Highest Altitude.py
class Solution: def largestAltitude(self, gain: List[int]) -> int: max = 0 gain_sum = 0 for i in gain: gain_sum += i if gain_sum > max: max = gain_sum return max #Runtime: 32 ms, faster than 83.33% of Python3 online submissions for Fin...
ac3d865a7fc3ea90f53bf62ab11418fa6b722885
d08e0a71b493ab9233149a4f3f5b1ad80746a1ca
/main.py
39c42aabaa7a12b13ca79cad263004e5ca934ea8
[]
no_license
premk2304/hello-world
2534269c7978bab7bc1339435e4ddc4f153e8b17
a320d9ac56f73b20373af9566ea30359d1e3e1b8
refs/heads/master
2021-03-26T04:09:38.914955
2020-03-15T21:03:05
2020-03-15T21:03:05
247,671,498
0
0
null
2020-03-16T10:19:17
2020-03-16T10:19:16
null
UTF-8
Python
false
false
98
py
main.py
print ("Hello, World!!") print("change in master branch") print("Only adding into my repository")
089225f054d18ae66521e696e55e53f269f99f1b
9030b9a695c5a73c528d2c82c417be76c0ac44ca
/web/web/urls.py
32aebb15e5ddc79af2e74d88ce0f7158b9b2fb6f
[]
no_license
Dharatee/Emporium
00a721b3ff161d378181f8be7ace284204b1e1f1
fe78da53fdfa324ee5c4406f3bb82d2759e89251
refs/heads/master
2020-06-24T15:11:52.543707
2019-07-31T09:04:29
2019-07-31T09:04:29
198,997,366
0
0
null
null
null
null
UTF-8
Python
false
false
283
py
urls.py
from django.contrib import admin from django.urls import path, include urlpatterns = [ path('admin/', admin.site.urls), path('', include('index.urls'), name="index"), # path('', include('user.urls'), name ="user"), path('user/', include('user.urls'), name = "user") ]
b10ae3b294f9fbfaaa8298159e64bda201e5c301
618ff458ffbcfa4c66930d47667162b148bcb57a
/exe1/gerador_inst.py
a171865d033f1f46a3fe428ae2fa91dcb5e9780f
[]
no_license
dsaleixo/TrabalhoInf628
351f9095b80a74eb5cdd35fc7348756f4265dcff
b132846c4fab416ad0759ca266f0ba17b17db694
refs/heads/master
2022-12-02T18:03:27.870502
2020-08-11T00:19:38
2020-08-11T00:19:38
278,403,853
0
1
null
null
null
null
UTF-8
Python
false
false
1,506
py
gerador_inst.py
import numpy as np from random import randint def floyd(Dist,n) : for k in range(n): for i in range(n): for j in range(n): if Dist[i][k] * Dist[k][j] != 0 and i != j : if Dist[i][k] + Dist[k][j] < Dist[i][j] or Dist[i][j] == 0: Di...
d1dc24daa453ff897462879a0c21643571490742
af2791239bc8dbf9d7aa94e8dcde0674180abd2f
/qt/topic_trade.py
14b85f4d4c20c079a8769d916f579a9e09279c9f
[]
no_license
zhenpingli/TDTSystem
8ac9be039a59293650355b8af7b6fe548c4c6671
a06103ddf36a69b026cdc899fb222bb89da5b138
refs/heads/master
2021-01-08T04:07:28.472682
2019-07-25T08:09:53
2019-07-25T08:09:53
241,907,760
1
0
null
2020-02-20T14:39:42
2020-02-20T14:39:41
null
UTF-8
Python
false
false
3,531
py
topic_trade.py
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'self.ui' # # Created by: PyQt5 UI code generator 5.11.3 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets import sys # sys.path.append('E:\Python\workspace\TDTSystem') from setting import ...
26e78e3be4b8e83b568e73ef2e194bf98a5b70b7
6275390a4ce4b2a359b196131c47312a54e79c57
/helper_files/support/expressions.py
6b61aada9236f2ef6a93d664b0f282bb784f93c7
[]
no_license
PatrickKreitzberg/Greenland
356564a17ddb0f8d3b47c64785c2252c4ee9929c
0f705c8d7b89fa46d980afdebcde838daa18d43b
refs/heads/master
2021-01-01T16:03:25.171475
2017-09-26T21:47:26
2017-09-26T21:47:26
97,765,016
2
2
null
null
null
null
UTF-8
Python
false
false
658
py
expressions.py
from dolfin import Expression,exp # For idealized cases these are functions, will later be read from files. # Surface mass balance, if using a mathematical expression: class Adot(Expression): def eval(self,values,x): ''' :param values: value 1d array of length 1 with value ~0.69 in one case :param x: ...
3070344f23259cf275108cbd4ce79992cffc6e95
a974de6285db76b669937e9619a805c226bb11a6
/01_Python_Crash_Course/0901_class/0902_class.py
8332a96ed75f94de584a515a65b683426bc3bc76
[]
no_license
Vincent105/python
1b3f753e6b9db711e320b53c3e0a04c9fc818c37
65351234310a81a85331b0f11aef42507868774d
refs/heads/master
2021-08-03T21:06:57.977065
2021-07-30T09:02:56
2021-07-30T09:02:56
185,359,652
2
0
null
null
null
null
UTF-8
Python
false
false
1,433
py
0902_class.py
class Car(): """一次模擬汽車的簡單測試""" def __init__(self, make, model, year): self.make = make self.model = model self.year = year self.odometer = 0 def get_descriptive_name(self): long_name = str(self.year) + ' ' + self.make + ' ' + self.model return long_name.titl...
784182fc7698072b410fd349ecbaf93d9023eaf1
a5882c7de2e7675536b652120846a5ad567d3d5b
/Main.py
1a2d890468ed4b7d737c053b5aac2eaaf3842946
[]
no_license
Retiwer/Funcion.py
5e630221ed1bec696cdf9972f8787f73581ce6b6
9a47879b9644b3c18423ea4f96910e39a23124b8
refs/heads/master
2021-01-17T12:50:49.948844
2016-07-14T21:02:48
2016-07-14T21:02:48
58,083,556
0
1
null
null
null
null
UTF-8
Python
false
false
1,343
py
Main.py
import Libreria #Importar la libreria creada import rand """ La Tabla de Excel fue copiada en una hoja diferente de la que originalmente se presento, aun dentro del mismo documento, debido a que existian problemas de formatoen la hoja de excel, externos a los configurados o soportados por la funcion de lectura. los d...
fd7df995a30cda6133e8b851746cb1cc1adde9a1
e585ab47e0902aa649e76a3cb5a6e643f23c3bf4
/SOL/17201.py
1fc0317e4ce36ed65625a217771c032efedfdc29
[]
no_license
donghoney/Algorithm
c755c273ca451b8886d7e5f93c5ee5b9ce50a573
02d19d4808be767270ec92b9120fac78327ae9ac
refs/heads/master
2021-06-30T23:51:26.791156
2020-10-16T11:07:43
2020-10-16T11:07:43
179,057,978
1
0
null
null
null
null
UTF-8
Python
false
false
265
py
17201.py
n = int(input()) mg = input() num = 0 if len(mg) != n*2: print("No") else: pre = mg[0] for a in mg: if a == '1' and pre == '2': pre = a num+=1 elif a == '2' and pre == '1': pre = a num+=1 if num == (2*n-1): print("Yes") else: print("No")
00b807217929803c31e5f03ff148ffbd739f7536
308a9672ac3513d12a40e566cc3d2887fb5371c8
/test_dxs/unit/test_crosstalk_processor.py
074b526597cdbfbf93a825a42c2e31fd3fa2093f
[]
no_license
aidansedgewick/dxs
1620c0dd4909172504920c5ceb5140b3ca6c44ef
401f875c9deb4dbf7025810e151021675dcaca90
refs/heads/main
2021-12-24T05:50:17.685940
2021-12-15T11:56:37
2021-12-15T11:56:37
150,768,011
0
0
null
null
null
null
UTF-8
Python
false
false
7,067
py
test_crosstalk_processor.py
import os import numpy as np from astropy.table import Table from astropy.io import fits from astropy.wcs import WCS from dxs import CrosstalkProcessor from dxs.utils.image import build_mosaic_wcs from dxs import paths def test__crosstalk_processor_init(): test_stacks = [] test_table = Table() test_cr...
4116b605fb92dc6c6a9eb8432c8fb37d1808c53b
483de272d4c92b403cccb9e3e8eda9ea839c0b1e
/lab_01/mainwindow.py
4677a84d0e073013e4bab581f2e7c918210501c0
[]
no_license
AnaNek/Planning_experiment
bcd453761a255b13b30e9099ac2eba60e06d3bc5
c4362ac9aef83b1c0f2ae27240c63986a9684435
refs/heads/main
2023-04-28T04:20:32.104573
2021-05-13T09:38:08
2021-05-13T09:38:08
360,290,376
0
0
null
null
null
null
UTF-8
Python
false
false
10,488
py
mainwindow.py
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'mainwindow.ui' # # Created by: PyQt5 UI code generator 5.15.4 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 import QtCore, Q...
04e7ee13c22ea15dd8dbe6ee731bd59772ca68e2
8e9c8687ede82bd297c701f3b6a47f311c7d7737
/myrpg/resources/tileset.py
f1547445afc617c3c0da55dab6f4dc4d704b349f
[]
no_license
linkdd/myrpg
193a64f2f5feec44b80e357f92febfcb0f3cc183
69a67d8353d74669119c5aaeb4277a792e2c49d6
refs/heads/master
2021-04-30T23:51:19.235199
2016-03-29T11:53:56
2016-03-29T11:53:56
54,377,347
0
0
null
null
null
null
UTF-8
Python
false
false
749
py
tileset.py
# -*- coding: utf-8 -*- from myrpg.resources.base import Resource import pyglet import json import os class TilesetResource(Resource): def get_object(self, name, stream, otype=None): if otype == 'def': return json.load(stream) elif otype == 'img': return pyglet.image.load...
a1263dfd18d5f0defef0bd8df3b15980a6f30fbd
52a6a2461b81c973e5307298ce03cf0475aaf9ff
/webA/__init__.py
7e1a937bc27de7c31fd0cb6232535079b877368f
[]
no_license
popai/intro
27c854248a4d627d73814238c35c2b897fc7c7da
ffe427fb08fb1a448760e32520655af53e9708fe
refs/heads/master
2020-12-25T16:58:00.220901
2016-08-06T13:11:25
2016-08-06T13:11:25
53,073,180
0
0
null
null
null
null
UTF-8
Python
false
false
700
py
__init__.py
from flask import Flask app = Flask(__name__) #app = Flask(__name__) # Create dummy secrey key so we can use sessions app.config['SECRET_KEY'] = '123456790' app.config["MAIL_SERVER"] = "smtp.gmail.com" app.config["MAIL_PORT"] = 465 app.config["MAIL_USE_SSL"] = True app.config["MAIL_USERNAME"] = 'popai...
a2144e522316ad81beffe1657597b5e880dd7b7e
e9049d66eb85e6eb7fc6ade2b58027da25a672f8
/0x0F-python-object_relational_mapping/3-my_safe_filter_states.py
ab53239dc67006c9ba82a76972d23b5527f58bb1
[]
no_license
Andmontc/holbertonschool-higher_level_programming
43858e7dcfcb664947509f04e0b9805b7a37fba7
9d5aafb930f7e06543d788fc23d8ced5913eca10
refs/heads/master
2022-12-20T08:40:20.583698
2020-09-24T21:20:54
2020-09-24T21:20:54
259,387,429
0
0
null
null
null
null
UTF-8
Python
false
false
445
py
3-my_safe_filter_states.py
#!/usr/bin/python3 """ SQL Injection """ import MySQLdb import sys if __name__ == "__main__": db = MySQLdb.connect(host="localhost", port=3306, user=sys.argv[1], passwd=sys.argv[2], db=sys.argv[3]) statename = sys.argv[4] c = db.cursor() c.execute("SELECT * FROM states WHERE n...
7a583cdfba1d0ec22c48d46c1b84f0324703cfbf
71278f8b928a81bad9bd6f1031b6d8fe9fa15b92
/backward/qlearn-cartpole-master/src/cartpole.py
4124eec3524531a9763f06e5dd97ef9b9cd32a39
[]
no_license
aidarshakerimov/Backward-Q-Learning
5f83c7b37bc9f4f93a7c64429584b5699efa3412
f23e4977f9ac330cd0cedda8b31d40d5b867623a
refs/heads/master
2023-01-09T19:08:18.949351
2020-11-04T10:23:05
2020-11-04T10:23:05
280,324,145
0
1
null
2020-07-27T18:13:16
2020-07-17T04:15:12
Python
UTF-8
Python
false
false
730
py
cartpole.py
""" Brute force implementation for Cartpole """ import gym import numpy as np env = gym.make('CartPole-v0') def run_episode(params): total_reward = 0 observation = env.reset() while True: action = 0 if (params @ observation) < 0 else 1 observation, reward, done, info = env.step(action) print(observation) ...
d4ecd07b23674f1548f9fbf1ecf5ed66a991716f
fbba57bd6125fe9cc534886031019ad3416839ef
/db/5.py
e95de1bd1ced8fa8311ed2f8e5ee6ac162fda5cb
[]
no_license
dkrajeshwari/python
ba1b8df5303e4606be2d6941aca0002194f5fbf7
840b18577caac0409cd970cc4fb6c7fa467e9ad6
refs/heads/master
2022-02-12T16:16:42.670339
2019-08-03T10:18:52
2019-08-03T10:18:52
198,152,929
0
0
null
null
null
null
UTF-8
Python
false
false
182
py
5.py
from openpyxl import Workbook import openpyxl as pyxl wb=pyxl.load_workbook("ws.xlsx") sheet=wb.active for row in sheet.iter_rows(): data=[c.value for c in row] print(data)
c29edb7b8571af652c016fb24e70b39c1ce8e5bd
b7dd464515fbdbafb609e9441c4aafb53bf1a6c8
/app/lotto/tests.py
dc3cedd1a5dccecad2054ad478211f1af996e8f6
[]
no_license
djshin2000/lotto-analysis
6387f993d97d342cd7ceee44670930a548efd158
4be5621b5c013e7d48cf77434a3048de89ff9b38
refs/heads/master
2022-12-09T09:48:07.126021
2018-03-26T01:23:16
2018-03-26T01:23:16
126,457,233
0
0
null
2022-12-08T00:57:01
2018-03-23T08:42:48
Python
UTF-8
Python
false
false
540
py
tests.py
from django.test import TestCase # Create your tests here. # test_num = 11 # if test_num in range(1, 11): # print('true') # else: # print('false') class LottoNumber: CHOICES_GROUP_TYPE = ( ('1~10', '1그룹(1~10)'), ('11~20', '2그룹(11~20)'), ('21~30', '3그룹(21~30)'), ('31~40', ...
c4aaa924728ffa149887d7f4ae7d2c8af813056d
0527702156634050107c1381ad6fc166f5da39fa
/server/api/controllers/auth.py
9c4928f901fd1ee4a32bb9d71e65ee65112186bd
[]
no_license
gilmoreg/legocollector
06ea31c61ea285c917c83246ad89b0f8fe99eab9
5d6bb50e559742eb6cbae9a0a285cc771d154b71
refs/heads/master
2021-09-03T15:22:36.185497
2017-11-20T23:18:36
2017-11-20T23:18:36
104,140,541
0
0
null
2017-11-20T23:18:37
2017-09-19T23:31:14
JavaScript
UTF-8
Python
false
false
2,993
py
auth.py
""" /server/api/controllers/auth.py Authentication controller functions """ import jwt import requests from os import environ from api.models import User from api.errors import FlaskError def create_jwt(user_id): """ Create JSON Web Token and decode to string :param user_id: Primary key identifying User ...
560f632dfa863c97ac3c6cd28e187bb09099e53a
0650740f3374d7c403b05c3c4c9babb48fc6e98e
/app/__init__.py
5798ea7d9caf7c23ef838bfd9455f44dc55dbe58
[]
no_license
houxiaozhao/python3-flask-mysql
37111ec7efc6ed2c76d07a340a2f21963bc23bc5
5338a70ad94f279a76415ae70418aa5a265f1efb
refs/heads/master
2023-05-28T14:25:45.653744
2021-04-22T09:30:39
2021-04-22T09:30:39
146,063,006
11
2
null
2023-05-01T21:37:13
2018-08-25T03:55:20
Python
UTF-8
Python
false
false
386
py
__init__.py
from flask import Flask from flask_sqlalchemy import SQLAlchemy app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql+pymysql://root:root@localhost/hhh' app.config['SQLALCHEMY_COMMIT_ON_TEARDOWN'] = True app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = True db = SQLAlchemy(app) from app.api import bp app...
a5dbfd72bfe602c385fec8132a5e18c59f4eaed2
0809673304fe85a163898983c2cb4a0238b2456e
/src/lesson_file_system/pathlib_from_existing.py
3601851c22f1f0455a8d40b9717408437d5a0546
[ "Apache-2.0" ]
permissive
jasonwee/asus-rt-n14uhp-mrtg
244092292c94ff3382f88f6a385dae2aa6e4b1e1
4fa96c3406e32ea6631ce447db6d19d70b2cd061
refs/heads/master
2022-12-13T18:49:02.908213
2018-10-05T02:16:41
2018-10-05T02:16:41
25,589,776
3
1
Apache-2.0
2022-11-27T04:03:06
2014-10-22T15:42:28
Python
UTF-8
Python
false
false
183
py
pathlib_from_existing.py
import pathlib ind = pathlib.PurePosixPath('source/pathlib/index.rst') print(ind) py = ind.with_name('pathlib_from_existing.py') print(py) pyc = py.with_suffix('.pyc') print(pyc)
0e8a3220cd1a9b36fa8e2b33f3df08154e116d03
b98225b71738e599a07b8755501370004fd771d1
/chatbot/chatbot/v1/api/Timeslot.py
9b60ab1c19fe770290bc2179ebe9cebba7b31728
[]
no_license
yashtamakuwala/Dental-Clinic-System
2cf93b14e52f55817edd00f3edbe9ead83729ba6
1183c8902c0fd2842e0e25432bbb18c1da31bf03
refs/heads/main
2023-01-28T20:16:25.920617
2020-12-02T13:25:27
2020-12-02T13:25:27
311,544,262
1
0
null
null
null
null
UTF-8
Python
false
false
323
py
Timeslot.py
import requests TIME_SERVER= 'http://127.0.0.1:' TIME_PORT = '8000' GET_TIMES = '/v1/timeslots' class Timeslot: def get_all_timeslots(self) -> str: ep = TIME_SERVER + TIME_PORT + GET_TIMES result = requests.get(ep) result = result.json() result = result['data'] return resu...
5e0cd91c0b6c6cfe83e60002b1857169e25183df
6839c9ce7593a0f9c1b289cb3c64eacf6ccb58be
/plant_light.py
40bec01045f8a70a8de8080b318ed54d025e02df
[]
no_license
Tpsych/aqua_botanical
77d8108bef2836ab8f03c45193faa2a0c19aef59
edd1fd602ec31823da45a9912f4cfa6852e90211
refs/heads/master
2020-05-18T22:32:01.372816
2019-09-30T06:54:05
2019-09-30T06:54:05
184,693,058
0
0
null
null
null
null
UTF-8
Python
false
false
53
py
plant_light.py
#Aqua Botanical System #Author: Barry Hao, Tony Tsai
0d36980dd6db67ca5760eb7bd216d84018248494
af90514bfad0563997453f6ade9888ee921bb27f
/LeetCode/dfs/1.py
a96a6d41ebcfbbf4941192789ec25770b0f61ef6
[]
no_license
xiang510/practice
5bb7e54934243e943acf2e7ae3eb6bfe2896770d
526d2d03a7e809494526a4a4044f088f70dfa219
refs/heads/master
2023-08-10T00:31:18.571856
2021-09-10T02:33:01
2021-09-10T02:33:01
310,512,295
0
0
null
null
null
null
UTF-8
Python
false
false
244
py
1.py
''' code template ''' visited = set() def dfs(node, visited): if node in visited: return visited.add(node) for next_node in node.children(): if not next_node in visited: dfs(next_node, visited)
ed2d5d41f5cf534ff7c0854536572bc85f18ab3a
1aa61ebc480e699e79d3f5ebc170000f9c87fe12
/Dummy_Device_IoTtalk_v1_py-master/DAI.py
55aab8c31ff7dcb37b0ecd19b6320ed6b11aa6a0
[ "MIT" ]
permissive
a8252525/IoTTalk
5c9d7ec4d758bbfebb4f60480f011e0d2e6357e1
07a84cf4278ea12d830aa3f71728a557f5b81899
refs/heads/master
2020-09-02T23:15:57.960594
2019-12-11T13:56:12
2019-12-11T13:56:12
219,329,476
0
0
null
null
null
null
UTF-8
Python
false
false
1,439
py
DAI.py
import time, random, requests import DAN #ServerURL = 'http://IP:9999' #with non-secure connection ServerURL = 'https://5.IoTtalk.tw' #with SSL connection Reg_addr = None #if None, Reg_addr = MAC address DAN.profile['dm_name']='T0858812' DAN.profile['df_list']=['T0858812-I', 'T0858812-O',] #DAN.profile['d_name']...
b54a1081832967fd892f4f0563609a07481031e7
347c91cc8e15de5255da06a6ebae0d257e164ec1
/zombie.py
8c1b29d933e812912c12d21b160104a137f38693
[]
no_license
rramdehol/python_101
541fa047afef76b1e4ae4a5916a557a105fc6ed9
0d35a7185246d73557df1361cdd2a113ae2606c9
refs/heads/master
2021-01-21T05:13:57.863381
2017-02-27T15:47:41
2017-02-27T15:47:41
83,153,885
0
0
null
null
null
null
UTF-8
Python
false
false
225
py
zombie.py
class Zombie(object): def __init__(self,speed,strength,hunger,weapon,health): self.speed = speed; self.strength = strength; self.hunger = hunger; self.weapon = weapon; self.health = health; self.type = 'Zombie';
9cedc25ddf48f14f2e61bbf6611d96afff0c5b1d
e06b0734cbadac85aa61c5aa256604766d70056e
/Tester.py
a8356945ed294cad767aa019548055128f6a8f37
[]
no_license
Chaz93/fixeh-testsuit
14d9e84c9ff12a66b3770dcdb4d3237648bebb3f
2b0f21a20d60f520cff5cb4f3b1ea634b1a941e6
refs/heads/master
2020-05-14T12:12:01.401812
2019-04-19T05:48:52
2019-04-19T05:48:52
181,789,822
0
0
null
null
null
null
UTF-8
Python
false
false
584
py
Tester.py
import PolicyGenerator if __name__ == '__main__': generator = PolicyGenerator.PolicyGenerator(tri_exception='java.io.IOException',tri_maxcount='2') #generator.analyze_carsh_log(analyze_file='1.log',outformat_file='2.log') policy = generator.generator_methodfilter_policy() print(policy) generator.analyz...
fb8e7307b9c66cd7690083ce0495e67da9fbc3aa
a8639af9de7f3ebbba497380e8c9de2132cf2d89
/python/2020/day4/day4.py
7a1ccf292e1dfe9558e23523547bd37f75e33860
[]
no_license
mrgalopes/AdventOfCode
679c9a3e2142a0fce7bce396938b2148bb7d7a34
d7c816774737cc473d64e1bd8993f055f7cc635c
refs/heads/master
2023-01-29T06:17:18.092611
2020-12-10T02:15:01
2020-12-10T02:15:01
318,550,295
0
0
null
null
null
null
UTF-8
Python
false
false
2,022
py
day4.py
def has_required_fields(passport): expected_fields = ['byr', 'iyr', 'eyr', 'hgt', 'hcl', 'ecl', 'pid'] for field in expected_fields: if field not in passport: return False return True def has_validated_fields(passport): for field in passport.replace('\n', ' ').strip().split(' '): ...
cdc340410d1a9bacadcc6b90c92865b455685a10
7f42a45385d00ac283a64180fb8d0aa2683195f9
/Courses/CS2004(Intro to OS)/A5/BestfitDynamic.py
49d1fed29cedf641c038475686e261fbced437c2
[]
no_license
Nicholas-O-Atkins/Projects
d918fd9da8f6f37605b54a3066ecaee52cd757bc
7f1095aecd6c4d182c9efbf53db1b926859b3c53
refs/heads/master
2021-09-26T08:54:38.909370
2019-03-07T21:50:59
2019-03-07T21:50:59
166,110,575
0
0
null
null
null
null
UTF-8
Python
false
false
7,322
py
BestfitDynamic.py
""" Author: Nicholas Atkins Due Date: 3/4/2018 Purpose: To demonstrate the best fit algorithm with dynamic partitioned memory Problems: There are a lot of if and else statements making this very hard to understand just by reading the code, I hope the comments spread throughout the code will help understand the thought ...
470208360506958161a0238aef810d17d996d68c
bba1e0a5cd42ecf261777140473760d8e1d913e8
/Nacl/main.py
5823d5b436ad6da67cf3e3668a5bb943cfb9be19
[ "MIT" ]
permissive
nishant34/Variational_Algorithms
8b1a77a0bcf25f87a53ac04b9829130ec8f1b761
b5ba768b60af79556aa414b391aa57bfcac3e51f
refs/heads/main
2023-07-05T16:13:16.728326
2021-08-18T18:37:56
2021-08-18T18:37:56
320,540,328
0
0
null
null
null
null
UTF-8
Python
false
false
3,803
py
main.py
import cirq import tensorflow as tf import tensorflow_quantum as tfq import numpy as np from config import * from Data_prepare import * from Hardware import * from Nacl_Model import * from Gate_set import * from State import * from train_helper import * from utility import * import argparse """ This con...
47e9f9d4decfb191d170ae45c7dd2c1d7c12cbcb
998abfd774245e1d344d7e7940368165026b852f
/test.py
5f585c5ea7d1b31bfa365630e771a327a4e6c52c
[]
no_license
amiths/Tennis_scores
a838e156babf9f2c942519cdd50fd954d1999af3
f96860e5f1552a4f514a103a689253f53aca154c
refs/heads/master
2021-01-12T15:04:24.428455
2016-12-27T08:42:09
2016-12-27T08:42:09
71,679,403
0
0
null
null
null
null
UTF-8
Python
false
false
1,770
py
test.py
#!/usr/bin/python import sys import re import os import shutil import urllib2 import time from bs4 import BeautifulSoup import smtplib from twilio.rest import TwilioRestClient def send_mail(email_msg): server = smtplib.SMTP('smtp.gmail.com', 587) server.starttls() server.login("stinson840@gmail.com", "iamamith") ...
a1d227ed56707bfabda6ab8bad1c61b6de409123
76d288fd21bd32fcf01c12f1bb1488f2317e6ef2
/fibonacci_sum_squares.py
a5ae8a0deee84518eae5eeab3a8c7d6bc4ce7eaa
[]
no_license
JinZjt/UCSD-Algorithm-Toolbox-coursera
00f17e8ac4885520f698eb45a8cecebc7d7c4932
b132ac452d1851bcc4f9cd0475c80fb19c88936e
refs/heads/master
2020-03-25T08:18:40.599491
2018-11-14T13:48:52
2018-11-14T13:48:52
null
0
0
null
null
null
null
UTF-8
Python
false
false
838
py
fibonacci_sum_squares.py
# Uses python3 from sys import stdin '''def fibonacci_sum_squares_naive(n): if n <= 1: return n previous = 0 current = 1 sum = 1 for _ in range(n - 1): previous, current = current, previous + current sum += current * current return sum % 10 ''' def calc_fib_s...
85cb64e64e85981ad1115aa08dc620d00dd57250
e54611ae94a389e3df4e07bf188f1b284012df07
/receptorctl/tests/test_workunit.py
e92f10ac87999eab17658a962c2b7113d1c50ae0
[ "Apache-2.0" ]
permissive
ghjm/receptor
e49ca66747f0eaf155d85f0474a97b14066f9094
ba3ed4532509e9d92a4d0bd89c0a284ee13f58a0
refs/heads/devel
2023-06-29T01:37:55.574018
2022-07-21T20:37:01
2022-07-21T20:37:01
215,142,089
0
0
Apache-2.0
2019-10-14T20:46:23
2019-10-14T20:46:22
null
UTF-8
Python
false
false
5,534
py
test_workunit.py
# The goal is to write tests following the click documentation: # https://click.palletsprojects.com/en/8.0.x/testing/ import pytest import time @pytest.fixture(scope="function") def wait_for_workunit_state(): def _wait_for_workunit_state( node_controller, unitid: str, expected_detail: str...
2b8cae0735c44f084b90d681be57fd984a72c646
6f5a46cb15caca0794927ff77dc84b38fdf7d975
/cnn_training_top_k/model.py
9c3f7984fc5caf752031d63d2601fb9526b70d2b
[]
no_license
liuhu-bigeye/continuous_sign_recog
9c94d4459da31f76ad37f6536097a9121a8159f1
dbfc752d6e850ac6f0d4921cdea2d1aa2124e631
refs/heads/master
2021-01-02T22:30:12.074063
2017-07-04T13:41:57
2017-07-04T13:41:57
99,332,962
0
0
null
null
null
null
UTF-8
Python
false
false
14,697
py
model.py
import os import glog import pickle import theano import numpy as np import theano.tensor as T import lasagne from lasagne.layers import * from lasagne.nonlinearities import * # import caffe from try_ctc.m_ctc_cost import ctc_cost, best_right_path_cost from utils import Softmax class Model(object): def __init__(...
69f3d7e3dc57cd22e0a437ca3ae718b4da750362
257cc8368f6f35b937a6864edaf741f7795af19e
/testing/helpers.py
1eb6906c8ae0238b9d5ec0339d1e9f1c72f0425b
[ "Apache-2.0" ]
permissive
Telefonica/testing.hadoop
97d7af2b2ec284b902e819fcf7c22536d1fb4b3e
3ebdc42de8da478bcba3ff776690f23b080aa574
refs/heads/master
2020-03-27T03:27:49.146550
2018-08-24T12:08:17
2018-08-24T12:08:17
145,864,982
1
0
null
null
null
null
UTF-8
Python
false
false
810
py
helpers.py
import sys import collections import os import subprocess import javaproperties def get_path_of(name): if os.name == 'nt': which = 'where' else: which = 'which' try: path = subprocess.Popen([which, name], stdout=subprocess.PIPE, ...
55e084521536f1a1b30c70011f23ee6730e47b9a
1c1fb600686348dbe81b3eab7388532c8362e0be
/app/__init__.py
a8dde2c8bf2eedbd20101987f3fbb0eab20737ef
[]
no_license
BraveChen95/wallet
b70d7ca9062c20be027be026308ba30b54910d42
2b324e7b648a26d66ddfc6bc9186373c7a9d96e4
refs/heads/master
2020-12-04T08:47:58.306230
2020-01-04T03:10:46
2020-01-04T03:10:46
231,700,257
0
0
null
null
null
null
UTF-8
Python
false
false
3,193
py
__init__.py
from flask import Flask, config, request, jsonify from flask_sqlalchemy import SQLAlchemy from flask_mail import Mail from config import config # from flask_debugtoolbar import DebugToolbarExtension from werkzeug.contrib.fixers import ProxyFix from flask_loginmanager import LoginManager from flask_migrate import...
7aed4bd6b72e174b6123f499dccb0964897ec95b
db5b47d7de31529e743e0f0a34f150fe78faaa1c
/clase8/sec5/append.py
d3a43763ebd08d79bf8d568a48b0281b7b26d63e
[]
no_license
CAUN94/tics1002021
5893656ee80da67e24f734a0c60f1fa7214ddf22
bdf82473701b94c9586dbaa33a88fbdccb30f259
refs/heads/main
2023-06-06T14:19:21.625588
2021-06-30T21:42:22
2021-06-30T21:42:22
348,362,025
2
2
null
null
null
null
UTF-8
Python
false
false
222
py
append.py
lista = [] # list() print(lista) lista.append(2) print(lista) lista.append('Hola') print(lista) lista.append([2,3,4]) print(lista) lista.append(2.2) print(lista) lista.append(True) print(lista) lista.append(2) print(lista)
06476f3e7caa0abcbb46428ed2a08d4f94b04935
3e0ceced589a32047d8369485057cc48e03659eb
/updelinsert.py
bf64469f25e01fc39733983466cb3eb4b3b231f8
[]
no_license
nikrhem/simmm
73c3f64d62bf4c0019f247b4e84488e59eb54a84
6d49b56907bb4584e28b49591c13be006ff5bf83
refs/heads/master
2020-05-23T11:29:37.927837
2019-07-19T06:02:37
2019-07-19T06:02:37
186,737,818
0
1
null
null
null
null
UTF-8
Python
false
false
158
py
updelinsert.py
a,b=input().split() n=abs(len(a)-len(b)) for i in range(len(a)): if len(b)==1 and b[i] in a: break if a[i]!=b[i]: n+=1 print(n)
da51df1510f19dcf7d24c308bce38272a4d995b2
e7af5a3e76e674be0a85628067fa494348d45123
/Python-for-Finance-Second-Edition-master/Chapter12/c12_05_lognormal_graphs.py
f31c0f5c3a659387a63a6dea6b41fe124bef4cc0
[ "MIT" ]
permissive
SeyedShobeiri/Work
8321ead6f11de8297fa18d70a450602f700f26fb
f758e758106fbd53236a7fadae42e4ec6a4e8244
refs/heads/master
2022-07-25T02:33:25.852521
2020-05-17T16:11:27
2020-05-17T16:11:27
264,706,380
0
1
null
null
null
null
UTF-8
Python
false
false
911
py
c12_05_lognormal_graphs.py
""" Name : c12_05_lognormal_graphs.py Book : Python for Finance (2nd ed.) Publisher: Packt Publishing Ltd. Author : Yuxing Yan Date : 6/6/2017 email : yany@canisius.edu paulyxy@hotmail.com """ import scipy as sp import numpy as np import matplotlib.pyplot as plt from scipy i...
ca96dc85aea267ba4d2e338ce805eb6612bc5ae2
a6d4496ab515fa9c278affd9217c5f1660b90717
/python-mxnet/ibdm/ngram_hashing/embedding.py
29060f84b66719e5c42c19341c011af3cd87bb1e
[]
no_license
jgolebiowski/coding-workspace
092eb372cec37e99c83dc9b39382fb572648a73d
0101dc52d0e3a76911d159307b255f6ce6c547d3
refs/heads/master
2021-07-03T08:06:05.843905
2019-03-13T21:09:09
2019-03-13T21:09:09
79,723,950
0
0
null
null
null
null
UTF-8
Python
false
false
6,598
py
embedding.py
"""This is a class with the base implementation fo the word embedding tool""" import heapq import numpy as np class WordEmbeddingNGramHashing(object): """ This is the word embedding model based on n-gram hashing Parameters ---------- max_ngram : int Maximum n-gram length to use for the em...
6e2ff6554bcff34f47aca7da9318e44847f04623
e15555f56a4bdc8a08e62557e8d8dc3241522b9c
/db/models.py
b229c3f425f0bc2140c1581269b05d05beb3f913
[]
no_license
tgoldman1/QUOREM
ef752c150bc6982cb773c183cda1b58f7c267411
98c8efb935200676d07ddd6cda103407b7828959
refs/heads/master
2020-07-24T06:57:41.137828
2019-08-30T22:51:40
2019-08-30T22:51:40
null
0
0
null
null
null
null
UTF-8
Python
false
false
14,167
py
models.py
from django.db import models from django.contrib.auth import get_user_model from django.contrib.contenttypes.fields import GenericForeignKey, GenericRelation from django.contrib.contenttypes.models import ContentType #for searching from django.contrib.postgres.search import SearchVectorField from django.contrib.postg...
7264c06c4327d762d4f072a4c903cc6fd79cf3c4
051b9060d89a8c29bba5f0c9fc9b20ca30040a4d
/calculator/sum.py
f432ade107072e41fe68b11333994f8263076bea
[]
no_license
krishnachouhan/calculator
b636235c156b5f3c4b4929aecbff7f772a55dcfe
74e5eb84533d68d37567fd8ddb6d7dd427fd9e7c
refs/heads/master
2020-06-26T15:01:47.016321
2019-07-30T13:30:25
2019-07-30T13:30:25
199,666,351
0
0
null
null
null
null
UTF-8
Python
false
false
1,200
py
sum.py
# Sum Module def sum(a, b, verbose=0): ''' Writing this Sample doc. This is useful as when you type __doc(sum)__, this text is printed. hence its a good practice to use this. Here, - parameters are to be explained. - return values are to be explained. - finally, dependencies ar...
c25e4bc42dd6c2438ecd2151e1b15dcab85655f1
afd7ef4d95b701f734a79e98e19074456444180e
/Projects/call_python.py
4cb09006f8e2aafbb691a7df919f4baf75649b89
[]
no_license
GauravGaur-957/Python-Projects
52478b61db5667c9a03516c0d40bf43df331819c
c18746da0a99ee2b0f4084126e7dbb1684ceb0fa
refs/heads/master
2022-07-30T13:49:31.654200
2020-05-20T06:42:10
2020-05-20T06:42:10
265,444,980
1
0
null
null
null
null
UTF-8
Python
false
false
359
py
call_python.py
from twilio.rest import Client account_sid = '#sid' auth_token = '#auth token' client = Client('#sid', '#token') message= client.messages.create(to="#any custom number, from_="#twilio generated number", body="Hello this is Gaurav,I am texting you from my P...
5273325d8e0ff8a0136599efa619acff502303e9
674f5dde693f1a60e4480e5b66fba8f24a9cb95d
/armulator/armv6/opcodes/concrete/b_t3.py
b7c4802bcda4e0bb79ba671639fef167a5f26095
[ "MIT" ]
permissive
matan1008/armulator
75211c18ebc9cd9d33a02890e76fc649483c3aad
44f4275ab1cafff3cf7a1b760bff7f139dfffb07
refs/heads/master
2023-08-17T14:40:52.793120
2023-08-08T04:57:02
2023-08-08T04:57:02
91,716,042
29
7
MIT
2023-08-08T04:55:59
2017-05-18T16:37:55
Python
UTF-8
Python
false
false
582
py
b_t3.py
from armulator.armv6.bits_ops import substring, bit_at, chain from armulator.armv6.opcodes.abstract_opcodes.b import B class BT3(B): @staticmethod def from_bitarray(instr, processor): imm11 = substring(instr, 10, 0) imm6 = substring(instr, 21, 16) j2 = bit_at(instr, 11) j1 = bi...
d188cecae55cb07c49a3d79b40c2c5adc4194054
03729a27360524c55bbe5a239ffaf78ea7777a28
/development/ezproxy-research/network-modeling/create-dash-cytoscape-visuals.py
465be58d3e5719f382b184e25d67a01819d241ee
[ "MIT" ]
permissive
humford/EdLabResearch
b30a83fee5e86b215eab32cf4416b55f02d8c2fb
e6479d731e9d149be0d6cd0e8ed5cd1bf7e9f3c7
refs/heads/master
2020-06-05T10:40:42.960101
2019-07-24T18:41:07
2019-07-24T18:41:07
192,412,280
1
0
null
null
null
null
UTF-8
Python
false
false
1,196
py
create-dash-cytoscape-visuals.py
import dash import dash_cytoscape as cyto import dash_html_components as html from graph_tool.all import * from os import listdir from os.path import isfile, join from halo import Halo import re # Get graph from file def get_graph_from_folder(): files = [f for f in listdir("./tmp/") if isfile(join("./tmp/",f)) and r...
cad85cac054396512d537f61168a33cd3a5e1e30
5afc3d718fd774c6eb6ce4d6785955b3f77167be
/data_type_q2.py
7e90858d25a1a430e8899e30c98fdcd656163323
[]
no_license
Bhagyashri1811/practised
d8b24aa256d980d97644eff1aa09e95d3ed6911c
25e4cb198573c0c32e57a9d6360dbd5e2354e07b
refs/heads/main
2023-06-15T22:58:51.629394
2021-07-10T06:38:52
2021-07-10T06:38:52
384,628,524
0
0
null
null
null
null
UTF-8
Python
false
false
511
py
data_type_q2.py
# -*- coding: utf-8 -*- """ Created on Mon Feb 15 09:55:51 2021 @author: Bhagyashri """ """ Problem 2: Suppose we have to take two strings “1234” and “6543” from user. Convert these two strings into integer. calculate their Sum and display the sum at output screen. (Note: Your code must run for similar type of...
0eb715e722a3adb1d82b9b4d8a17cce4afeafdda
e3daee1b230989cc05df7fdf78c1ab3e94b2c6cc
/states/wait_message_manual.py
26bcff9632a5f70ca4dd2acfb8b357cf9cb71090
[]
no_license
kimmoahola/ilp-commander
8434a34e397397b571f08dc5d09fb7f4b05e1a4e
bfd0fbb9197616923045ff469e9ad64b340205a1
refs/heads/master
2022-09-25T22:30:35.656682
2022-09-19T11:34:57
2022-09-19T11:34:57
94,101,252
0
0
null
2019-10-04T09:44:30
2017-06-12T13:49:03
Python
UTF-8
Python
false
false
417
py
wait_message_manual.py
from poller_helpers import get_most_recent_message from states import State class WaitMessageManual(State): def run(self, payload): return get_most_recent_message() def nex(self, payload): from states.auto_pipeline import AutoPipeline from states.manual import Manual if paylo...
787afa023e939b0619c187faaa88e8a22212d14d
2734b77a68f6d7e22e8b823418ad1c59fe1a34af
/opengever/usermigration/localroles.py
48c5c2d1bb647b2f07644d0d5efbcbd841875b2c
[]
no_license
4teamwork/opengever.core
5963660f5f131bc12fd0a5898f1d7c8f24a5e2b1
a01bec6c00d203c21a1b0449f8d489d0033c02b7
refs/heads/master
2023-08-30T23:11:27.914905
2023-08-25T14:27:15
2023-08-25T14:27:15
9,788,097
19
8
null
2023-09-14T13:28:56
2013-05-01T08:28:16
Python
UTF-8
Python
false
false
3,657
py
localroles.py
from opengever.base.role_assignments import RoleAssignmentManager from zope.annotation.interfaces import IAnnotatable def migrate_localroles(context, mapping, mode='move', replace=False): """Recursively migrate local roles on the given context. This method customizes ftw.usermigration.localroles.migrate_loc...
a84eddc0299e10b8c9666fdaec86ca619d3f6f3e
6bed8b7f6f9f111c295fd01c774789b9856ad1d7
/permissions_auditor/tests/fixtures/decorator_views.py
56ed822c2dc1e1ae70baade1aa66a39999c4a58f
[ "MIT" ]
permissive
AACEngineering/django-permissions-auditor
9419c49da4062eaba2b45e4f51e078e4fcba9d66
6a26e0f455a54fdad6d6f7f29a79c27db5853ba1
refs/heads/master
2023-04-16T04:11:16.068006
2023-04-12T22:52:18
2023-04-12T22:52:18
163,992,978
16
4
MIT
2023-04-12T22:33:07
2019-01-03T15:52:23
Python
UTF-8
Python
false
false
2,992
py
decorator_views.py
"""Views used for decorator testing.""" from django.contrib.admin.views.decorators import staff_member_required from django.contrib.auth.decorators import ( login_required, permission_required, user_passes_test ) from django.utils.decorators import method_decorator from django.views.generic import View @login_req...
1012d39aef464ea500afe09cd48417141626f953
3c4499e3743d361c7b223f36c99bfbe76ffa5193
/transfer_amplitudes+clock+offset.py
ffb2cf3268c76426dab66217f081a0fff6282929
[]
no_license
tammojan/facet-calibration
4d50f72b44c6b54af2f0f78d882dac6fb098f3f2
6b84dd61e38c125660902a4793201107515be658
refs/heads/master
2020-05-30T06:38:30.253415
2016-08-25T13:26:11
2016-08-25T13:26:11
34,381,010
6
3
null
2015-05-09T10:04:21
2015-04-22T09:18:36
Python
UTF-8
Python
false
false
6,088
py
transfer_amplitudes+clock+offset.py
import os import numpy import sys import glob import pyrap.tables as pt import lofar.parmdb #import pyrap.tables as pt import argparse def give_ampl(amps_in, freqs_amps, freqms): #given nearest element in freq_amps for freqms el = min(range(len(freqs_amps)), key=lambda i: abs(freqs_amps[i]-freqms)) amp = ...
213fab3a4218445ee8ad3e0dcca7184f412dffa4
d8a406c8c70f55e5b830cbdf932968ce9a4eda5e
/Code/Python/DataProcessor.py
2a1a0b7da6458ef6745f7389b93ca6b455b8c1ae
[]
no_license
Chan-Hee/BioDataLab
54d71483adb51ca30804950a4fd0cec1219b1c7c
c4ce9f25a94685e96beff7cf670f31b5da212e41
refs/heads/master
2021-09-14T07:54:39.731210
2018-05-10T07:34:25
2018-05-10T07:34:25
105,616,308
6
1
null
2017-11-05T17:35:47
2017-10-03T05:07:21
Python
UTF-8
Python
false
false
1,755
py
DataProcessor.py
import numpy as np class DataProcessor(object): def __init__(self): pass def fivefold(self, data , key): """ :param: data is whole data for trainning and testing :return: seperate data for five dataframe or list """ self.data = data data_five = [] ...
df945caf0f9c8727f81ecf91d4e08fa0fd6e08bd
0aa853d4c4a839dda1ebb761c5d1fe522892b895
/server.py
8f451eb6ee7049aa0df7e6fbfd4791dfeab11f61
[]
no_license
manoj2601/Client-Proxy-Server-Network
b0a31464bb14d5fbd78d7a2e3d8cb38f6676818e
c703346d097d2d9784fe872012e23695deb756f4
refs/heads/master
2023-01-22T19:43:15.317851
2020-12-08T14:17:18
2020-12-08T14:17:18
319,659,701
0
0
null
null
null
null
UTF-8
Python
false
false
2,483
py
server.py
import sys import socket import threading #It creates a message that is meant to be sent to the next proxy/server def createRequestMsg(filename, servers): req_sent = filename+"\n" for i in range(1, len(servers)): req_sent += servers[i]+'\n' return req_sent #whenever a new client hand-shakes with the server def n...
983ffa371ef158cdeef8792a5fd4f52c390ce346
66179673611621031e15c3db7b9927b20e6067d9
/easy/1_two_sum.py
76c3cb8410c0fd58171cfc3985e7952e0dc3fbc0
[]
no_license
borntoburnyo/AlgorithmInPython
b3f7dc11d389d1a43c3c66a8764bab441411c354
d6db8f572422eb550b81c04a0419fd59d6b9091b
refs/heads/master
2022-07-11T23:36:34.932943
2022-06-26T02:59:13
2022-06-26T02:59:13
143,560,766
0
0
null
2022-06-26T02:02:09
2018-08-04T20:25:40
Python
UTF-8
Python
false
false
300
py
1_two_sum.py
class Solution: def twoSum(self, nums, target): nums_d = {n:i for i,n in enumerate(nums)} for i in range(len(nums)): remn = target - nums[i] if remn in nums_d and nums_d[remn] != i: return [i, nums_d[remn]] # Need store index as requested by the return # Note the sum-number1=number2
0aef4f33c492ab829e49e3cbd532fea650d156f8
9ae97fb0d8f246cb8044ff5b9ab45fb3e1848bbc
/foxchicfeed/foxchicfeed/dock.py
652d1850d42424e36ff03b5a778fe3a07e798bd0
[]
no_license
marcusshepp/intro_ai
e444c0e1a8daef9f3c507f8bef211b87fa655604
e99778b9b8dc141806391b53b6ba541c65a974ff
refs/heads/master
2020-05-18T19:52:01.131072
2015-11-10T01:17:51
2015-11-10T01:17:51
41,801,396
0
0
null
null
null
null
UTF-8
Python
false
false
1,226
py
dock.py
class Dock(): def __init__(self, items, side): self.items = items self.side = side def _has(self, name): # checks if dock has that item if len(self.items) > 0: print self.side print self.items[0].name print self.items[1].name prin...
509676eeda084ed81b63f1587d30fb250c9804db
f3525c2869b545886091361861e08c91427b3b87
/Python/anti11/solution.py
07f31406e4f56f4ef9ffda879893565dd33405ee
[ "MIT" ]
permissive
iMylene/OpenKattis
06a3df8ea43671a54950b4caa98ae62404558ebf
2dcb1d370afa55f79306829b6dbdd4d0fe4455fc
refs/heads/master
2020-04-08T13:43:47.994564
2020-02-16T13:14:09
2020-02-16T13:14:09
159,404,030
1
0
null
2018-11-27T21:50:21
2018-11-27T21:50:21
null
UTF-8
Python
false
false
450
py
solution.py
import sys data = [int(x) for x in sys.stdin.readlines()[1:]] storage = {} def fib(n): n1, n2 = 2, 3 global storage if n == 1: return n1 elif n == 2: return n2 else: if n-1 not in storage.keys(): storage[n-1] = fib(n-1) if n-2 not in storage.keys(): ...
5465fb672c27b1678e1f108774f3389ad2c85650
7576ae1e7aacea27916ef9ce9b19c2b004682bc9
/main.py
55816d2ee54f7a3534848336b41097eff3f5b396
[ "MIT" ]
permissive
affromero/SMIT
51a075b936e2bdd8d8ab500bb8c622d56d18a62f
946963637845b3a1fa2a8adc351ef5ec9a7d533f
refs/heads/master
2020-07-19T23:12:48.875263
2019-09-26T10:31:10
2019-09-26T10:31:10
206,529,495
0
0
null
2019-09-05T09:47:45
2019-09-05T09:47:43
null
UTF-8
Python
false
false
2,568
py
main.py
#!/usr/bin/ipython from __future__ import print_function from misc.utils import PRINT, config_yaml import os from data_loader import get_loader import config as cfg import warnings import sys import torch from misc.utils import horovod hvd = horovod() warnings.filterwarnings('ignore') def _PRINT(config): string =...
21c40dd8078c76c71741ba0c29831194ef10a665
9207321a34ab688512b874c1b4efcef5709723e6
/api/utils/database_handler.py
e94cf314ae16832431539fd130fd1c15d457468a
[]
no_license
OCCCAS/YandexProject
befc0592030b00f4acb361ee22554ce7970ab2fc
3bbb8ad6c4a56c184f8384f78186763d29fd8bd6
refs/heads/master
2023-08-23T05:54:39.275368
2021-10-21T21:08:49
2021-10-21T21:08:49
418,653,844
0
0
null
null
null
null
UTF-8
Python
false
false
190
py
database_handler.py
import sqlite3 from config import DATABASE_FILENAME conn = sqlite3.connect(DATABASE_FILENAME) cur = conn.cursor() def execute_command(command): cur.execute(command) conn.close()
d9ed1cc734ef07bc533c9acc844e2000d0a2c392
a5717097e58037df5fb23961942b56a985cc9e3e
/plugins/operators/has_rows_operator.py
e13b4afbd177ff6591c52313700f71c690918160
[]
no_license
deningsr/MLB-Pitch-Data
0ebb2eba4b53ed9b798fa2d323bf16b483446468
b623bf044cffbe1872cad9346bab3be6f4983523
refs/heads/master
2023-02-24T06:45:40.852153
2021-02-03T04:34:48
2021-02-03T04:34:48
294,298,358
0
0
null
null
null
null
UTF-8
Python
false
false
1,158
py
has_rows_operator.py
from airflow.models import BaseOperator from airflow.utils.decorators import apply_defaults from airflow.hooks.postgres_hook import PostgresHook class HasRowsOperator(BaseOperator): """ Data check to ensure the Postgres table is not empty. """ @apply_defaults def __init__(self, ...
bccc8ada2105e37113c42244ee65368c8d434434
d6430f1efd7ef2c3065db46ec6a2244f5a23ca56
/MergeSort.py
2fd9a37b1ed6dbf4755fd4df1f9ddcc93134a939
[]
no_license
johneddcooper/algorithms
c993a0dbcf61f8e2008cb726fa39f83fba0fdf82
7906a6dfd82d8922b27a09888cc1a8ffe1f250b4
refs/heads/master
2020-03-28T18:40:16.785333
2018-10-14T17:42:41
2018-10-14T17:42:41
148,900,141
0
0
null
null
null
null
UTF-8
Python
false
false
746
py
MergeSort.py
def merge_sort(list): if len(list) == 1: return list newlist = [] l_list = merge_sort(list[len(list) // 2:]) r_list = merge_sort(list[:len(list) // 2]) l_list_index = 0 r_list_index = 0 while True: if len(l_list) == l_list_index: newlist.extend(r_list[r_list_index...
bb07a1c74634546abbb10f82c7fd7445affb6e64
903c032f1b5bf61dd9ab6501e3d68af0c473e6ad
/examples/robot2d.py
3f0c686657e9c489d29b4858b980c462b2bb0807
[]
no_license
PopcornPaws/particle
e7201e6a31e51fea72a2bc23c5f84f6e8cd75457
1b6fef5d22dac0c0bfe54103333b081af96fa65f
refs/heads/main
2023-03-16T13:29:17.161687
2021-03-13T16:42:37
2021-03-13T16:42:37
347,422,558
0
0
null
null
null
null
UTF-8
Python
false
false
2,957
py
robot2d.py
from ..particle import ParticleFilter, RobotInput, RobotState import matplotlib.pyplot as plt import matplotlib.animation as animation import numpy as np # depth sensor parameters angle_of_sight = np.radians(15) rays = np.linspace(-angle_of_sight, angle_of_sight, 5) sensor_range = 3 pf = ParticleFilter( xlim...
61235788ab9e8bc570719376e1910c331ec78b99
cfce9dd2bf5608322d0c3f923b0f715eba2a2f5f
/long_read/pacbio_to_tss.py
31dde3478214f3ef25fb26cdac5c3ec7c33044e8
[]
no_license
ENCODE-AWG/tss-annotation
e8ea9de2a343bf811dff1ce6a80d0eed0bd661a4
6eb3aa425d2d86757ef88b19e61e40f920ef5e55
refs/heads/master
2023-04-05T14:55:41.678383
2021-04-16T18:08:15
2021-04-16T18:08:15
271,075,196
0
2
null
2021-04-16T18:08:16
2020-06-09T18:05:46
Python
UTF-8
Python
false
false
14,082
py
pacbio_to_tss.py
#!/usr/bin/python3 # Copyright 2020 California Institute of Technology # Authors: Diane Trout # # BSD license with the additional requirement that # Neither the name of the copyright holder nor the names of its # contributors may be used to endorse or promote products derived from # this software without specific prior...
38ebfcdd803141e936d08cf97f8a96b6c7d213e5
2c43fa66dbec4680920e27da63868549d47c3dbb
/euler.py
c8259ed670836c623a6be19a5b6ba6e9350c02b4
[]
no_license
AnastasiyaZakh/course_work
376e7f7b95bc746ba7fd9818d06580b22ed954d9
c36f209564d47c94bfad38cb62654f2d8d9a6311
refs/heads/master
2020-05-24T05:05:05.858718
2019-06-03T22:59:42
2019-06-03T22:59:42
187,106,869
0
0
null
null
null
null
UTF-8
Python
false
false
1,375
py
euler.py
#!/usr/bin/env python import unittest from math import sqrt def euler(n: int) -> int: phi = 1 for d in range(2, int(sqrt(n)) + 1): if n % d == 0: n //= d phi *= d - 1 while n % d == 0: n //= d phi *= d if n > 1: return phi...
deab86bbd59f1ba2b6e9c865c4b11287455db8e7
d7516f5faf2933936a7a045f31e62ead9d0d6724
/findr/migrations/0009_auto_20191221_1720.py
81f6096f03b8895bae68ca16587c587afa8424f1
[]
no_license
nalindobhal/Findr-API
c09c0a17610588f50ead8e92d292347aa0376cc1
f3baa53f77f24d887ce84d45a26fd812b2f47d91
refs/heads/master
2020-11-30T23:42:07.107730
2019-12-27T20:32:28
2019-12-27T20:32:28
230,512,233
0
0
null
2019-12-27T20:14:45
2019-12-27T20:14:44
null
UTF-8
Python
false
false
796
py
0009_auto_20191221_1720.py
# Generated by Django 3.0 on 2019-12-21 16:20 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('findr', '0008_user_username'), ] operations = [ migrations.AlterField( model_name='apartment', name='house_address', ...
d63a5f67bf2872fe15bcbeec52af337d3d285abc
680554aa0ab05cbd4b5beba7f480da668a8c2da0
/examples/long_running_session.py
93c5fef096d835fa6c36d26fcfa51bfad2ae75f3
[ "BSD-3-Clause" ]
permissive
metricq/aiocouch
abb6215d1ab9cfbce1d80d7444cb9cdf5d745204
b9d253fd7fd7728d2c9b0172904dd12d94ffc31b
refs/heads/master
2023-08-17T14:42:54.244257
2023-08-07T17:45:52
2023-08-07T17:45:52
191,375,558
27
9
BSD-3-Clause
2023-08-25T13:39:34
2019-06-11T13:18:29
Python
UTF-8
Python
false
false
607
py
long_running_session.py
import asyncio from aiocouch import CouchDB async def main() -> None: async with CouchDB( "http://localhost:5984", user="admin", password="admin" ) as couchdb: elapsed_time = 0 while True: _, result = await couchdb._server._get("/_session") assert not isinstan...
931d83c2b4974eaac4face0ef8c9661bb442fc44
4da6290aa529a5c2b3e606b8a4d3f977cfc90fe1
/onadata/apps/main/models/google_oath.py
46df88fc0164a975ecfc20914df6cd9f7261419e
[ "BSD-2-Clause" ]
permissive
simatei/onadata
63bfdaf479aa50c5d33b10387ddf383240477c09
855d132deeefca36bf172e8ad582e4644788c283
refs/heads/master
2022-11-10T16:30:39.679337
2022-10-27T07:59:10
2022-10-27T07:59:10
306,317,083
1
0
NOASSERTION
2020-11-26T11:23:52
2020-10-22T11:36:34
Python
UTF-8
Python
false
false
518
py
google_oath.py
# -*- coding: utf-8 -*- """ Google auth token storage model class """ from django.conf import settings from django.db import models from oauth2client.contrib.django_util.models import CredentialsField class TokenStorageModel(models.Model): """ Google Auth Token storage model """ id = models.OneToOneF...
f34aa4ca70672966e3e143e632241450537d4b8a
349c4f37b6a003d10dd78d864395a0d596d24fe6
/SWEA D3/2814_longestpath.py
1346c274d340c7151410450eb90e9d5119e48421
[]
no_license
bwjubrother/Algorithms
55c2980a4540a7e48cb3afd298cbd2e3d81c594e
03daa2c778b1cc59ce1920363a27c88bec5ec289
refs/heads/master
2023-04-07T00:38:58.715786
2021-04-25T08:00:08
2021-04-25T08:00:08
279,016,520
0
0
null
null
null
null
UTF-8
Python
false
false
549
py
2814_longestpath.py
import sys sys.stdin = open('2814.txt', 'r') def dfs(s, l): visited[s] = 1 results.append(l) for k in a[s]: if not visited[k]: dfs(k, l+1) visited[k] = 0 T = int(input()) for tc in range(T): n, m = map(int, input().split()) a = [[] for _ in range(n+1)] results ...
f1a991845b0916335db2640934e9f5d8d69dee4c
1c319b61ffe1da559e03fc91ee146515304cd879
/UK_handler.py
698375e2338d84c656779d40291ffbad85186377
[]
no_license
juhao666/database_script_convert_tools
3687c316c3887a3b0c7f7275a3e14445d211e677
a929960f5def2dbc4398dad21401f454f389a358
refs/heads/master
2021-03-31T01:43:00.522503
2018-03-13T01:57:32
2018-03-13T01:57:32
124,512,970
0
0
null
null
null
null
UTF-8
Python
false
false
2,292
py
UK_handler.py
# coding=utf-8 # ! # ------------------------------------------------------------------------------- # Description :UK handler for aspira UKs # # Pre-requests: n/a # History : # DATE AUTHOR DESCRIPTION # ---------- ---------- ---------------------------------------------------- # 03/0...
acf6e49d8b97293c39be9fb5662225f6b310ee5b
05f35c039a0a7d81391cc7f43c17669fb9e2856e
/linsamp
0ab1c24c55a9c259e3afb4fc16e282599422bb8b
[]
no_license
cpesyna/oddball_utils
44e233c378c063f9472e3be459300f3d289d1e48
6155b7bc89031ab48fcd28d698f9c61feb1fe76e
refs/heads/master
2021-01-22T13:47:31.502827
2012-07-27T00:34:44
2012-07-27T00:34:44
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,068
linsamp
#!/usr/bin/python import argparse from random import random from sys import stdin, stdout def init(): parser = argparse.ArgumentParser(description="Subsample a data file") # No default parser.add_argument("--probability", "-p", type = float) # Default parser.add_argument("--headerlines", "-hl", ...
d346735577cabdb3b145368a1e39b995fd128e9d
3aafaf3ec1c9bbccadad7dfb488c7f3c802b5291
/website/views/AHJ.py
018db9f1aaea0ef87b29c36eee1d173a77c28e4b
[ "BSD-2-Clause", "Apache-2.0" ]
permissive
renic/solarpermit
4e885030c4597748579ed7c25cf3e7df78a385a2
bc3c8b3ef452b3ad2263b08f07da079fd26fd739
refs/heads/master
2021-01-16T19:09:24.358477
2013-09-30T23:26:37
2013-09-30T23:26:37
null
0
0
null
null
null
null
UTF-8
Python
false
false
81,639
py
AHJ.py
import re from django.http import HttpResponseRedirect, HttpResponse, Http404 from django.contrib.auth.decorators import login_required from django.contrib.localflavor.us.us_states import US_STATES from django.contrib import messages from django.template.loader import get_template as django_get_template from djan...
8ef4a8f8f543185968d008fb8f23a99a59727176
9a67b622be00d5a2f7d94fde02facbf0de2d6ec2
/pyotp/totp.py
98a95fb4f49436aa99cc58865aff58f1b3c1f5ed
[ "WTFPL" ]
permissive
Elizafox/pyotp
bd8beef5916192229c0f1194e88b85f2467fb86d
78789b3514befcd9e2e7fb1f7ffe74249432240a
refs/heads/master
2020-03-17T08:16:56.934097
2018-05-20T20:17:07
2018-05-20T20:17:07
133,432,225
0
0
null
null
null
null
UTF-8
Python
false
false
3,032
py
totp.py
# Copyright (C) 2018 Elizabeth Myers. All rights reserved. # See the included LICENSE file for terms of distribution. """TOTP-related functions.""" from time import time from pyotp.constants import HashAlgorithm from pyotp.common import get_code, check_range, check_range_constant def get_totp_code(secret, timest...
79c075b6d3ebc4dd2fefb4e07f39cd707bba9571
1757ef1ed8c9bccfc033af6365a469dc9a77ad95
/crawler/crawling/spiders/parsing_link_spider.py
cd54775d44b2f1d0f58a8d069753454674452738
[ "MIT" ]
permissive
Jenniferrrrrr/scrapy-cluster
ef79801d19b5cc0682cb6678d610fbd9d8ddf34c
4e0fa0e883ae0de8b428813c4bdd0d189ed7d4fb
refs/heads/master
2020-05-05T11:50:46.609642
2018-12-03T19:00:48
2018-12-03T19:00:48
null
0
0
null
null
null
null
UTF-8
Python
false
false
7,521
py
parsing_link_spider.py
from __future__ import absolute_import import scrapy from scrapy.http import Request from crawling.spiders.lxmlhtml import CustomLxmlLinkExtractor as LinkExtractor from scrapy.conf import settings from crawling.items import RawResponseItem from crawling.spiders.redis_spider import RedisSpider import uuid from bs4 im...
051c5660f4775e93504fde991a09e9fc606269d0
1f92f877b3831722d6ad949bfb5911480bc9e71b
/input.py
0ac986d4929cfbfde689646f08eb2bfd9b9036d0
[]
no_license
aaronBurns59/3rd-year-python-command-line
389ab0da6022197b6f4b0ce57e4ab57af0b21312
be23dac00ffd1f689e88395e17f628b179b38132
refs/heads/master
2020-05-02T16:16:23.087155
2019-03-27T20:03:31
2019-03-27T20:03:31
null
0
0
null
null
null
null
UTF-8
Python
false
false
380
py
input.py
# import used for reading input from the console import sys # prints the name of the script that is running # print (f"Script is called {sys.argv[0]}") # for argv in sys.argv: # # allows you to list the extra information in a command line # print(sys.argv) if len(sys.argv) == 2: print("We're ready to go....
b67ea64e34950d104200f631d6ad2367efa540d9
2924bcf532a03b23f7962d43046d40444d271e50
/Deck/Connector.py
98b5dfcac2daec9572525eeb6f92a61510c1a2df
[]
no_license
OchiZockt/OZ-StreamDeck
5c55ec49a1add04a6fc4f555acce336d5988b755
077927246ad7cd9b6264f476e8aa9ffd41ae3eb5
refs/heads/master
2023-02-21T06:16:26.783692
2021-01-23T14:05:01
2021-01-23T14:05:01
287,745,333
2
0
null
null
null
null
UTF-8
Python
false
false
275
py
Connector.py
from Messages.Common import * class Connector: def __init__(self, backend): self._backend = backend def send_to_frontend(self, msg): self._backend.route(FRONTEND, msg) def recv(self, msg): pass def stop(self): pass
74ce971cef26bed9f1b201c75b330b9e6db157d4
9340f09096c9ac6b6d3f78a088382d46520d1bbb
/catonmat/views/admin/login.py
5690143369c82b2f48f7ebae0700fa16a0f9bd9b
[]
no_license
stjordanis/catonmat.net
ae7c1f23fa16f6d3790aba089f942fd636e806f0
7b6287417c6dfc5fb3e885ec89dad94b655154d6
refs/heads/master
2022-01-15T13:55:33.197379
2019-01-19T13:14:33
2019-01-19T13:14:33
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,181
py
login.py
#!/usr/bin/python # # Peteris Krumins (peter@catonmat.net) # http://www.catonmat.net -- good coders code, great reuse # # The new catonmat.net website. # # Code is licensed under GNU GPL license. # from werkzeug import redirect from catonmat.views.utils import display_plain_templ...
619d0008835b96e3bd7575553825eb7b45c38df9
50c803d575e82ac3cf20ae00200aaca0a436e98c
/find_pointing_start.py
c9255efcab178139c7773f80a97b6735bec7ceea
[ "MIT" ]
permissive
albertfxwang/clear
71c824064329c83e6177f594ac2e73cbd4d82f66
29b482ebeb02d8d7c75a586bf65edef15eaabfbe
refs/heads/master
2021-06-19T05:37:17.227425
2020-07-23T19:27:40
2020-07-23T19:27:40
183,165,554
0
0
MIT
2019-04-24T06:46:37
2019-04-24T06:46:37
null
UTF-8
Python
false
false
2,935
py
find_pointing_start.py
#! /usr/bin/env python """ Determines from timestamps whether a pointing started with grism or a direct image. Authors: C.M. Gosmeyer, 29 Feb. 2016 Outputs: """ import numpy as np import os from astropy.time import Time from astropy.io import ascii from clear_tools import set_paths def find_pointing_st...
469e613f09deed5d4bcf179a0b6bbc3dee0d7af0
2f350354681af12cf374b28c4448727e66966f85
/GeneticAlg.py
23425d602788f478cd0e82110a789154460613f3
[]
no_license
cezidev/SnakeAI
e6e06b61d49f41fc6ad5993f16d3215e15a74429
74412be5f33f73b88d793a2fc2763541c0a417c5
refs/heads/master
2022-02-06T20:45:38.660862
2019-06-27T23:01:50
2019-06-27T23:01:50
null
0
0
null
null
null
null
UTF-8
Python
false
false
4,899
py
GeneticAlg.py
import random as rd from tqdm import tqdm from multiprocessing import Process, Queue from SnakeGame import SnakeGame from NeuralNet import NeuralNet #---------------- Genetic Algorithm def evaluate(newGen, meanOn, Q): rewards = [] N = len(newGen) for _ in range(meanOn): games = [SnakeGame() for _ in range(N)] ...
f02ace2ad79be50ef3bb06d3062ac929cc5f6c48
c671acb541b75351a1ea35f14df4a235d8e6ae18
/scripts/display-live-records.py
7077f0b56e2fae74612b9e626a6999b30f7b875a
[]
no_license
stephane-klein/how-i-manage-my-dns
e51f4c88ae7c26120a577c0231e87926e4f96b96
e6fce1036187c0691d1157ccd559559f42587f9c
refs/heads/master
2020-03-27T10:08:53.055778
2019-01-08T15:37:46
2019-01-08T15:37:46
null
0
0
null
null
null
null
UTF-8
Python
false
false
500
py
display-live-records.py
#!/usr/bin/env python3 from pathlib import Path from urllib.request import urlopen, Request DOMAIN_NAME = Path(".").resolve().name # read api-key with open("api-key.secret", "r") as f: API_KEY = f.read().strip() # read DOMAIN_NAME records with urlopen( Request( url="https://dns.api.gandi.net/api/v5/d...
c3cda3a2188cf12a3a4d28f67fa1b9a10dded938
3295ce2294cc866aa3ff90f24f08efcea80859d9
/CauLenhContinue/HocContinue.py
1c9fc680e3f0de11c7d2b497ccc16dd74afa5920
[]
no_license
kitajima2910/python-tutorials
81ffb8d8f395d5b0d16bf0b674f2a1fa12603ccd
84be6525db4f194aa9b1e0c25075eaf507b1f9ad
refs/heads/master
2022-02-01T14:10:53.125539
2019-08-04T10:15:36
2019-08-04T10:15:36
199,682,741
0
0
null
2019-08-04T10:15:37
2019-07-30T15:50:07
Python
UTF-8
Python
false
false
103
py
HocContinue.py
n = 15 s = 0 for i in range(1, n + 1, 2): if i in [3, 11]: continue s = s + i print(s)
331da78c8ca5b4871c5d19484f825f8fae2c430e
86393bd0d16c69363aa1afb4c4841fff6314493c
/executor/samples/local/tfserving/convert.py
6658ece11ce6853e1c304d5f83aac7043fac3933
[ "Apache-2.0" ]
permissive
SeldonIO/seldon-core
0179fc490c439dbc04f2b8e6157f39291cb11aac
6652d080ea10cfca082be7090d12b9e776d96d7a
refs/heads/master
2023-08-19T08:32:10.714354
2023-08-15T12:55:57
2023-08-15T12:55:57
114,898,943
3,947
885
Apache-2.0
2023-09-13T11:29:37
2017-12-20T14:51:54
HTML
UTF-8
Python
false
false
296
py
convert.py
import tensorflow as tf from google.protobuf import json_format loaded = tf.saved_model.load("./saved_model_half_plus_two_cpu/00000123") print(list(loaded.signatures.keys())) print(loaded) print(loaded.signatures["serving_default"].inputs[0]) #json_string = json_format.MessageToJson(graph_def)
d62b78d769ba15ab877bfe45ca2995c1502bbb4f
4e5bd5e6e44c8c6d9d1556a9b8c1936a960c23b6
/63-I like Pi/I like Pi.py
b0dd828f6896864e6c05a95e212782326c1ad115
[]
no_license
GeorgeJopson/OCR-A-Level-Coding-Challenges
058a2a528229715f5de8904d1d594e12b19e9f1c
12d3cdd50a613b844fa276bc991b42da2552fdf5
refs/heads/master
2022-12-06T20:02:34.241449
2020-09-04T10:58:47
2020-09-04T10:58:47
288,129,155
3
0
null
null
null
null
UTF-8
Python
false
false
1,264
py
I like Pi.py
#Given enough iterations this could do the job but my computer takes age to do it #Therefore there is a speedy one below, however it is far less understandable ##pi=3 ##num=2 ##for index in range(1000000): ## if(index%2==0): ## pi+=4/((num)*(num+1)*(num+2)) ## else: ## pi-=4/((num)*(num+1)*(num+2)) ...
df6f2092f9a2dfcf9458378f6acf4021bdf9e431
4620e96d34d2c4475dd0987ff6244cb06ff20605
/PyGame/5_slide_puzzle.py
0a3544424e3792dc579b2430536e755e4ed69b42
[]
no_license
volpid/_PythonStudy
c36956e1946e760ac2bf30b491d7389a0125bc74
4ddc25298d3fed2e012bf0fc4794047a50e1ead4
refs/heads/master
2021-01-18T21:53:23.207862
2019-02-23T09:06:58
2019-02-23T09:06:58
87,024,016
0
0
null
null
null
null
UTF-8
Python
false
false
10,024
py
5_slide_puzzle.py
#!/usr/bin/python3 # -*-coding-utf8-*- import random import pygame import sys from pygame import * BOARD_WIDTH = 4 BOARD_HEIGHT = 4 TILE_SIZE = 80 WINDOW_WIDTH = 640 WINDOW_HEIGHT = 480 FPS = 30 BLANK = None BLACK = (0, 0, 0) WHITE = (255, 255, 255) NAVYBLUE = (60, 60, 100) DARKTURQUISE = (3, 54, 74) GREEN = (0, 255...
e2d1763708b2b76377e8e37a044ce244227cbeff
12ce2fb95462069ed934dbd91557c814bf4db2e5
/models/group.py
773b544912ab97d3de7f3135d54b814e28ee0e90
[]
no_license
icoxfog417/robinchorus
fc887bf16f9e688694ac3f216c258c5a43420c21
a0ec4d92142b4b4988a4899809c5982ac45ac86d
refs/heads/master
2021-01-15T16:29:36.363331
2015-10-11T06:54:11
2015-10-11T06:54:11
20,610,352
1
0
null
2014-11-05T03:50:16
2014-06-08T05:47:01
Python
UTF-8
Python
false
false
1,009
py
group.py
from .base_model import BaseModel class Group(BaseModel): def __init__(self, **kwargs): super().__init__(**kwargs) self.name = super()._dget("name", kwargs) def __chat_list(self): if self.key: return self.key + ":chat" else: raise Exception("Can not ac...
ef8e92daeda2630440fcf95d986ca17e476f40f8
0c79f36da68f46d1e2ba19f0c2d3296f008f86c1
/BruteForceFTP.py
c132931e734d65641a02721cb31401197ed8acb5
[ "MIT" ]
permissive
XarisA/nethack
ecf78e82c41ef2a0b8b29b9c852244ba2a899e2f
b5622286679cc0d337270b3c7fcb9f36885ed80f
refs/heads/master
2023-01-10T22:43:41.445861
2020-11-21T15:54:22
2020-11-21T15:54:22
109,478,635
0
0
null
null
null
null
UTF-8
Python
false
false
4,753
py
BruteForceFTP.py
#!/usr/bin/env python import ftplib import argparse import sys # Usage python BruteForceFTP.py -a 192.168.3.84 -d data/passwords.txt -u data/usernames.txt # Or python BruteForceFTP.py -a 192.168.3.84 -d data/passwords.txt -s ftpuser if sys.version_info[0] >= 3: raw_input = input str = str def connect(host, user...
6158a631fee901ad7f29716dd493e95c3cc463d1
1cbd4ba724d4b0a11e171685f7375711788ae114
/secapr/automate_all.py
6df96048aa135ec3fe28b63d98b57bbc7795abbc
[ "MIT" ]
permissive
AntonelliLab/seqcap_processor
eca0c45f1e04921fa38d873f9136430eaa1a65e4
a2f960498519a1e65a7a901665e879ad7c6e9f40
refs/heads/master
2023-06-01T02:50:12.141857
2023-05-30T16:21:29
2023-05-30T16:21:29
43,844,244
17
14
MIT
2023-05-30T15:19:11
2015-10-07T20:54:49
Python
UTF-8
Python
false
false
19,440
py
automate_all.py
# encoding: utf-8 #author: Tobias Andermann, tobias.andermann@bioenv.gu.se """ This script automates the complete secapr pipeline, producing MSAs (allele, contig and BAM-consensus) from FASTQ files """ import os import sys import glob import fnmatch import shutil import configparser from .utils import CompletePath imp...
a5d8861747a5adec33e16f544efe549b2a3cd991
d6dce4e626a96fbc21dea0013bf68b7d06b81581
/alg/auc_fifo_loglink.py
5661b866e77b932f06e0fc429e3eb0933a682459
[]
no_license
zhenhuan-yang/simple-pairwise
9ef02ae226d637fe98ca64529f03f9ffef0fe1ad
bbed08c4fcddddb906c72404928c421722a3ba14
refs/heads/main
2023-08-24T01:13:06.327981
2021-10-26T18:16:56
2021-10-26T18:16:56
369,265,647
2
0
null
null
null
null
UTF-8
Python
false
false
3,612
py
auc_fifo_loglink.py
import numpy as np from sklearn import metrics import timeit from utils import get_idx def auc_fifo_loglink(x_tr, y_tr, x_te, y_te, options): # get n_tr = options['n_tr'] dim = options['dim'] n_pass = options['n_pass'] start = timeit.default_timer() ids = get_idx(n_tr, n_pass) n_iter = len(...
e391355d76cb4bdaf634753c8b27ae429bb93243
10d0f589d198484ecf1e87ce0a301180d2fcce5d
/ReadIMU/ReadSerial.py
25669517778ca482fde91febe509c3db0858bde3
[]
no_license
namita-kumar/ReadFilterIMU
b1c3d5f5cbe1e3d12c16e3c9bbc2c30b2099841e
a9856bd135f6daa409b2df72865582cac8993c6f
refs/heads/master
2020-05-03T06:11:27.182422
2019-03-29T22:52:13
2019-03-29T22:52:13
178,466,992
1
0
null
null
null
null
UTF-8
Python
false
false
537
py
ReadSerial.py
#This script reads the data in the serial port and stores it in output.txt import serial #Select serial port to read from serial_port = 'COM3'; baud_rate = 38400; #In arduino, Serial.begin(baud_rate) #Create or open output file write_to_file_path = "output.txt"; output_file = open(write_to_file_path, "w+"); s...
42a75a2d44304c22ee5547fd5f4b9beb543993aa
f3faf9d29bba85320dedd5cd2b452b0a1efe3c55
/thimbles/coordinatization.py
9431d77426d670b7e5f24a49c605ee9c7eb4cf24
[ "MIT" ]
permissive
quidditymaster/thimbles
2f764e35aeaa76aa2136e24fe24d171630a1f277
b122654a012f0eb4f043d1ee757f884707c97615
refs/heads/master
2021-01-11T23:26:33.694235
2017-05-14T14:32:36
2017-05-14T14:32:36
78,581,998
0
0
null
null
null
null
UTF-8
Python
false
false
26,588
py
coordinatization.py
import numpy as np import scipy import thimbles as tmb from .thimblesdb import ThimblesTable, Base from .modeling import Parameter, FloatParameter from .modeling import Model from .sqlaimports import * from functools import reduce class CoordinatizationError(Exception): pass def edges_to_centers(edges): """c...
f710180dbdc55d762d0f190186b3279f49290f51
628d6f3993bea1bb4924553a8b6472a2f6d8b3e6
/view_segment.py
daacddc481d1cddf291263e6b0d40cf04f435887
[]
no_license
JavongChang/DenseHumanBodyCorrespondence
4e94f1841ff4728ca95dcce5e50c19989cfee8d5
5d3731cef55c632f65c1b4011f6f983548d7eebe
refs/heads/master
2020-12-30T10:37:34.403845
2017-04-17T14:30:00
2017-04-17T14:30:00
null
0
0
null
null
null
null
UTF-8
Python
false
false
3,054
py
view_segment.py
# Basic OBJ file viewer. needs objloader from: # http://www.pygame.org/wiki/OBJFileLoader # LMB + move: rotate # RMB + move: pan # Scroll wheel: zoom in/out from config import * import numpy as np from matplotlib import cm import sys import pygame from pygame.locals import * from pygame.constants import * from OpenGL....
b144b6faee6648089369e243a52f5e5b1145d73c
afb7006e47e70c1deb2ddb205f06eaf67de3df72
/testing/web-platform/tests/xhr/resources/access-control-auth-basic.py
9c35fccc48b248b1660cdbdb47ae214a75642028
[ "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
marco-c/gecko-dev-wordified
a66383f85db33911b6312dd094c36f88c55d2e2c
3509ec45ecc9e536d04a3f6a43a82ec09c08dff6
refs/heads/master
2023-08-10T16:37:56.660204
2023-08-01T00:39:54
2023-08-01T00:39:54
211,297,590
1
0
null
null
null
null
UTF-8
Python
false
false
978
py
access-control-auth-basic.py
def main ( request response ) : response . headers . set ( b " Cache - Control " b " no - store " ) response . headers . set ( b " Access - Control - Allow - Origin " request . headers . get ( b " origin " ) ) response . headers . set ( b " Access - Control - Allow - Credentials " b " true " ) uid =...
b11a26d5c778741e7674d7452a467de088044806
e6e83295622b6955f4e326264f0883c7169499ce
/Impement_1.py
c8ac56398b0243aefbe2548750d27a89a14f6f7a
[]
no_license
elinbua/TileTraveller
fed7a46cb90ccb24768ec428ee38661ac149cc2a
39c5643d1d9d9e746a7bcff101df3b23520b0022
refs/heads/master
2020-03-28T23:08:28.949751
2018-09-21T18:07:26
2018-09-21T18:07:26
149,278,224
0
0
null
null
null
null
UTF-8
Python
false
false
2,870
py
Impement_1.py
#Github: https://github.com/elinbua/TileTraveller #Player starts in tile(1.1) in 3x3 grid. #Enter direction according instruction printing on the screen (north/south/east/west). #When moving north, 0.1 is added to current tile. #When moving south, 0.1 is subtracted from current tile. #When moving east, 1 is added to cu...
d9c8c8f725168f9778cc297d035cdbe42f602048
bbf513ab2534fb60fb100cbf440e9cb33bfe1f15
/examples/techfest/images.py
e0a4fff877ab22ed69b92955e6c82605592fb360
[]
no_license
markovg/slithy
8cc53d8ee2644d7b8c59068595e3d64cf560b4b4
49d6669aa5d05c001e7970ef4c00540948daf106
refs/heads/master
2021-01-10T07:13:38.944966
2016-02-22T10:32:35
2016-02-22T10:32:35
52,266,156
0
0
null
null
null
null
UTF-8
Python
false
false
4,919
py
images.py
from slithy.library import * import slithy.objects class ScalarTuple(tuple): def interp( self, other, u ): if len(self) != len(other): raise ValueError, "can't interp ScalarTuples of different size" up = 1.0 - u return ScalarTuple( [x*up + y*u for x,y in zip(self,other)] ) ...
34093634928884baaf4890f4025ee25730d8835e
ac019c7b901473bf96f06fb30df95f34ee54c638
/board/models.py
a1e0f329cbb8b763c7ede5045f95c32b47723583
[]
no_license
kpiszczek/ubershop
9d9b976bd1a9e5b9f35540b6f080f49e3c213cc8
5642cd8ffa814e4a8375ca4c35124948a88408a2
refs/heads/master
2016-08-03T17:10:56.893000
2014-01-10T16:22:56
2014-01-10T16:22:56
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,539
py
models.py
from django.db import models from django.contrib import admin class Board(models.Model): name = models.CharField(max_length=100) description = models.TextField() staff_only = models.BooleanField() def __unicode__(self): return str(self.name) class Topic(models.Model): ...
96a683857b6e884c7b347048f971523aade6c77d
03a7ba0f5e7bc748c831b4236796dd0c0b783c9d
/spectral-cluster-mesh.py
9d468bd03bc26ce250f2248b4a2885e6535fbecc
[]
no_license
josephdviviano/cerebellum
74baeef4f5bb6b9268d23f4bd4a386f2e147d07c
79dbc1b493752c04e15cd097ed2ce68468d7e4a9
refs/heads/master
2021-01-14T12:31:11.622879
2017-12-17T00:04:04
2017-12-17T00:04:04
45,480,425
0
0
null
null
null
null
UTF-8
Python
false
false
178
py
spectral-cluster-mesh.py
#!/bin/usr/env python # it's easy bro from sklearn.cluster import spectral_clustering labels = spectral_clustering(adjmat, n_clusters=n_clusters, assign_labels='discretize')
6e3ad14c443729b5d194984c7022667fa399eda3
014fc7fcc30d34b7ff438c8e478b5106c90efad7
/loveAlicia4.py
3d876a8a80d9244977c40236e01c2cd2da8846b0
[]
no_license
CharlesGe129/MyPrincess
be9e06af8f7533eb9553bea2300957734629559b
4ac97491d77db468342d2d5cc972def8d43fb5a3
refs/heads/master
2021-10-26T23:19:32.137243
2019-04-14T19:08:45
2019-04-14T19:08:45
116,811,014
0
0
null
null
null
null
UTF-8
Python
false
false
1,337
py
loveAlicia4.py
import os import time def print_slow(content): for each in content: print(each, end='') time.sleep(0.1) print() print_slow("从2018年1月16日开始异国恋,距今已经452天了。") print_slow("在这452天中,我一共回国6次,其中自费回国4次。") print_slow("最长一次在国内待了38天,从2018年12月13日到2019年1月20号。") print_slow("最短一次在国内待了3天,从2018年4月28日到2018年5月1日。...
5dfa3ddbda53b93c3d169f0c6718346b20a0e624
ffcc9e4fa11afff4ce01947b7549978f999aabf0
/libraries/pos_tagger/models/__init__.py
c789fd2e10e5d857fb0bd88c4c26a38418087163
[]
no_license
xuetf/allennlp-as-a-library-example
28dab09bc86f21a662f67c20ab518478c3abfa04
6f5c4835b379d2d80b6725f9e212bfa69d07d61b
refs/heads/master
2020-04-29T10:15:46.898406
2020-02-07T03:33:59
2020-02-07T03:33:59
176,055,498
0
0
null
null
null
null
UTF-8
Python
false
false
60
py
__init__.py
from libraries.pos_tagger.models.crf_tagger import CrfTagger
b9394f0774a2dffdcf6d66225230cfa0b1e396c1
afef6e44ae80f8c1479d06878a1db830e8e1eefc
/utils/db_util.py
ceadc32c4913180de6f1810e5340ddd166b0e334
[]
no_license
lazysjb/LinkedIn
5761b25aac70954a0c22f8ed20bdca919ce909d5
a820e74fd22f6b873f332f3036828465e1ba979e
refs/heads/master
2020-07-09T15:33:52.155614
2020-06-07T01:10:09
2020-06-07T01:10:09
204,011,140
2
0
null
null
null
null
UTF-8
Python
false
false
1,578
py
db_util.py
import os import pandas as pd from sqlalchemy import create_engine from db_config import ( SCHEMA ) _DEFAULT_DB_NAME = 'postgres' def _get_local_host_url(db_name=_DEFAULT_DB_NAME): url = 'postgresql://{usr}:{password}@localhost:5432/{db_name}'.format(usr=os.environ['POSTGRES_USR'], ...
9b23bcb8ed9c3c6d01a429ca4b6e67ac12416927
0b3ffb0346c1eca41e8aa0af5a74623e13392af4
/Myhomepage/Sendemail/views.py
97c0cae1c69df5df2121a516fb4bc409a189d3ce
[]
no_license
wwjdtm/Django_web
77fc9d0c4c42c3cab892f712b3f40fbcbb7598f4
a7960bbf783e30b8df52ea8279b04d315532c887
refs/heads/master
2022-12-14T02:01:05.554310
2020-09-04T08:27:06
2020-09-04T08:27:06
null
0
0
null
null
null
null
UTF-8
Python
false
false
134
py
views.py
from django.shortcuts import render from Sendemail.models import Sendemail admin.site.register(Sendemail) # Create your views here.