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
20dc929b387303b475d2fd692b5ba3c504a38223
a3c68eafdb433c981f2b90e86f895e4f121c69fb
/leetcode/605-种花.py
0562674c5e48e210edd9b3de44649c7c26660d6d
[]
no_license
Cassiexyq/Program-Exercise
ccc236ea76ca99ddc6fe0c4c47edebc3d557cfad
e962cc3add047d61df275dd3e22a091018fd964a
refs/heads/master
2020-04-25T20:27:33.561226
2019-09-22T15:29:35
2019-09-22T15:29:35
173,050,531
0
0
null
null
null
null
UTF-8
Python
false
false
733
py
605-种花.py
# -*- coding: utf-8 -*- # @Author: xyq # 尽量多插花, 把0变1,1旁边相邻只能0 # 前后元素连续两个0 # 中间连续3个0 def solver(flowerbed,n): i = 0 cnt = 0 while i < len(flowerbed): if flowerbed[i] == 0: if i == 0 and (len(flowerbed) == 1 or flowerbed[i+1] == 0): cnt += 1 flowerbed[0] = ...
6886fff5a3bca2c24da3f885ab3d0a541536abed
78b599ee027e24b32d12d6ca21f1991ff43c3539
/search/Find Minimum in Rotated Sorted Array.py
0cc1ba6b314e1621a4a92645b09301036e2ad5c8
[]
no_license
fnnntc/leetcode
8b54c4513f15acdc94e52f1542e915b594a49fd6
040c7cdb0ba3c7abecbdfae5e2245ca7a3f1759d
refs/heads/master
2023-01-22T12:06:38.675099
2020-11-18T22:24:21
2020-11-18T22:24:21
298,389,974
0
0
null
2020-09-24T20:48:15
2020-09-24T20:38:54
Python
UTF-8
Python
false
false
151
py
Find Minimum in Rotated Sorted Array.py
nums=[3,4,5,1,2] l,r=0,len(nums)-1 while l<r: m=(l+r)//2 if nums[m]>nums[r]: l=m+1 else: r=m else: return(nums[l])
dccfacbbaf48b767bd4af0ef13b3cbe5ec305514
e1643f544aa5508940867dd8c0167b19450afebd
/detectHTMLTags.py
32efebf2695f274afd8c9f90f3310bd38f561c29
[]
no_license
stratigoster/HackerRankQuestions
b8022f46384f8df31ccfa33ed48ded1156627a0f
577a3feafa7ab6b1dcda5f01935a7eaa67b4b556
refs/heads/master
2021-01-21T10:13:22.782859
2017-02-28T06:51:22
2017-02-28T06:51:22
83,396,446
0
0
null
null
null
null
UTF-8
Python
false
false
431
py
detectHTMLTags.py
# Enter your code here. Read input from STDIN. Print output to STDOUT import re a = set() output="" n = int(raw_input()) for i in range(0,n): line = raw_input() input = re.split("(<\w.*?>)", line) for x in input: m = re.search("<([^/].*?)[\s>]", x) if m: a.add(str(m.group(1))) ou...
9512f4239eaa008b5efbd9d1d1d59e3558c2ddd8
7d78a18fcb8f34cc84e9439bd19cf491e3e0ec49
/Code/Particle_Identification/add-ML/pretrained_vae.py
bdaf3f1eba05a58f497b0318255427a527870f6d
[]
no_license
PsycheShaman/MSc-thesis
62767951b67b922ce5a21cad5bdb258998b7d2ea
34504499df64c7d6cc7c89af9618cd58d6378e8e
refs/heads/master
2022-03-12T07:17:57.309357
2019-12-10T21:17:39
2019-12-10T21:17:39
151,471,442
4
0
null
null
null
null
UTF-8
Python
false
false
9,347
py
pretrained_vae.py
# -*- coding: utf-8 -*- """ Created on Mon Sep 2 15:36:16 2019 @author: gerhard """ import tensorflow as tf from tensorflow import keras import os import matplotlib.pyplot as plt def plot_results(models, data, batch_size=32, model_name="vae_pre...
1a365ab0cac55083f8319326951a301147427295
be9d00c1181db7570c4df78200eb06b756a96ba6
/Uniformed Search Strategy/DepthLimitedSearch/GraphClosed/Main.py
ae5114f224e3508f43eb69753a7e5c4463e623b1
[]
no_license
Sergio05Rule/AI
7aa34aa86580ae13c545ab750943940d80ddcf22
89648351910c794a985206c53a238c0080590cc6
refs/heads/master
2020-08-07T07:57:50.963253
2020-04-19T19:04:13
2020-04-19T19:04:13
213,361,498
0
0
null
null
null
null
UTF-8
Python
false
false
672
py
Main.py
import TreeNode as TN import Problem as P import Problem_State as PS import time import Graph as G if __name__ == '__main__': g = G.Graph() # definizione grafo # inizializzazione grafo g.add_edge('a', 'c', 1) g.add_edge('a', 'b', 1) g.add_edge('b', 'd', 1) g.add_edge('d', 'e', 1) g.add_e...
35aec93031417d77b2f42f9063e3c104b2b44b52
3cd3080fa3b21baf3d8a28bc001647ae1ab4ec1c
/apigetter.py
062305b913f1708a5e9327fc839e672a4e647bf2
[]
no_license
lchln/PermitDataTool
66b041d04ae95138d1af7bf8109057f9d0acae64
42592be7ede0b47f09478bffbf1e37c832773c12
refs/heads/master
2020-12-19T11:58:07.242343
2020-01-25T22:42:54
2020-01-25T22:42:54
235,725,983
0
0
null
null
null
null
UTF-8
Python
false
false
1,035
py
apigetter.py
""" API GETTER FOR PERMIT DATA""" import sys from api_tools import constants, socrata_tools def main(mode_select): """main function""" soc_tools = socrata_tools.DFTools() if mode_select == 'get': print('Getting new data from', constants.OD_PORTAL, 'to', constants.DATAFILE_PATH, '....
2059f4943b851c462565c274e053f714e61550b6
4e3cd5743b3be3d4b23b85733c6c1b448cc90e95
/menu.py
030552ee93e8b9d7da7927c4fe59489cb4434457
[]
no_license
sureshmelvinsigera/ecommerce-project
e38671a31c1d2446d5e0e79ced3eec461908aeff
422145dc675461bc83eec908c4b243b7cd1ad158
refs/heads/main
2023-06-20T07:45:47.788773
2021-07-17T17:26:11
2021-07-17T17:26:11
385,054,810
0
0
null
null
null
null
UTF-8
Python
false
false
1,665
py
menu.py
import sys from PyInquirer import prompt from product import Product class Menu: pass # def site_admin(self, account_number): # while True: # admin_menu = [ # { # 'type': 'list', # 'name': 'admin-menu-selection', # ...
0d7bd5c61b8e74fdba394f4321acc3c57ce19d26
48e4102c9b21bcae0bf95fe487ba25cbada39257
/celebrate/login/urls.py
202bb31d5491016e62f97dcf45ee586b403fd9df
[]
no_license
parupallihemanth/Celebrate
b0ef91ee4ab26f73175c838ce40de915fbcf6bd9
45730c9c5b03a20c288da7a690bd4ef3e60ec579
refs/heads/master
2022-10-21T00:51:45.179664
2019-08-13T05:30:29
2019-08-13T05:30:29
198,511,340
0
1
null
2022-10-06T05:18:52
2019-07-23T21:33:19
Python
UTF-8
Python
false
false
116
py
urls.py
from django.urls import path from . import views urlpatterns = [ path('log',views.login, name="login"), ]
8792a388ef723a44748fd5c0d99e53076c3971d9
f1e98113b8c1ffc333319b7f819c5c07d726b926
/api.py
f7f853b4fbdf1f1519a3a67d991d76446d775b0f
[]
no_license
enisimsar/social-media-harvesting
ba98133974fb33442437de20a58cda5052f8aed3
3e474463beb1e1b6d67c5c387d6251d5025cc861
refs/heads/master
2021-06-16T18:20:39.022244
2017-05-16T10:00:32
2017-05-16T10:00:32
83,846,208
1
0
null
null
null
null
UTF-8
Python
false
false
6,554
py
api.py
import re import search import pymongo from application.Connections import Connection from time import gmtime, strftime, strptime import time import json import logic from goose import Goose import summary def getThemes(userid): Connection.Instance().cur.execute("select alertid, alertname from alerts where userid ...
30408808bd69086146038b2fec19f9af682bc273
4702250d6e240d11c29335839a3a9970ef631904
/controllers/profile_controller.py
419ade9a1779c44f2158c62115a937297171bb13
[ "Apache-2.0" ]
permissive
maxziv/SE-Server
94302c5ff7deb4753bf9e8b7211593f0acb6f935
97fe06389998af362bde70344daa6452084c280d
refs/heads/master
2021-01-17T23:29:49.372992
2014-05-03T19:48:03
2014-05-03T19:48:03
null
0
0
null
null
null
null
UTF-8
Python
false
false
4,898
py
profile_controller.py
from flask import Blueprint from flask import request from flask import render_template from bson import json_util from main import app,db,security, User from models.models import ProfileModel profile_api = Blueprint('profile_api', __name__) # API for viewing user profile, provide user id in url @profile_api.route(...
2cd851f232b80429b6687e55e514ebb0d1b57c35
f421d56bd76085cc6aa93d56d5e112272f0810af
/src/scs_analysis/sample_midpoint.py
4171624e4f60bb2cbd0be7fd6a2ad57b1caf5e36
[ "MIT" ]
permissive
RawPlutonium/scs_analysis
808c7c74d49fa5b8a5b0c4c724b2ffaa5bfb02e3
0eeecfc68d04caf91d42af60a50fe90b0eeb07e4
refs/heads/master
2021-05-06T12:45:58.948750
2017-11-29T12:34:06
2017-11-29T12:34:06
null
0
0
null
null
null
null
UTF-8
Python
false
false
3,738
py
sample_midpoint.py
#!/usr/bin/env python3 """ Created on 23 Aug 2017 @author: Bruno Beloff (bruno.beloff@southcoastscience.com) DESCRIPTION The XX utility is used to . EXAMPLES xx FILES ~/SCS/aws/ DOCUMENT EXAMPLE xx SEE ALSO scs_analysis/ command line example: ./socket_receiver.py | ./sample_regression.py val.sht.tmp -t 4 """...
b7adce0aa272cb6444fc8bf474fe44c77f717fb3
b88edefdc174435abac8692b309dc2a738117000
/dataset.py
e21ed9dc7c75316e414f4e3efbe3a369af57db18
[ "MIT" ]
permissive
chenneng/FashionAI
17036196f2e8fdec91ad9276231290c20f85cd32
a462bb2eafb70a4f3e6a59da5ba79046d6aef72f
refs/heads/master
2020-04-19T10:42:30.425785
2019-02-19T11:43:44
2019-02-19T11:43:44
168,148,055
2
0
null
null
null
null
UTF-8
Python
false
false
2,580
py
dataset.py
import os import csv import math import torch from PIL import Image from torchvision import transforms from torch.utils.data import Dataset import random class fashionData(Dataset): def __init__(self, root, split, data_type, transform = None): self.root_path = root self.transform = transform ...
f79a9b9b0598b40e93fe3c936e3c9598da23c5d9
083f0f0d3d131afff1995e3e1941cfe58c0af46f
/atom-io-signin.py
47c01ef79accfe028884d65fd30276a1fec41f5f
[]
no_license
morfyum/selenium-example
17e72ed3fd1c7b0d96ded4d93ba58bde8016f0ae
a6901f8c40f4bbc2aa256e422a037b85de29f96a
refs/heads/master
2023-05-04T03:06:08.506864
2021-05-21T13:57:10
2021-05-21T13:57:10
286,441,905
1
0
null
null
null
null
UTF-8
Python
false
false
978
py
atom-io-signin.py
from selenium import webdriver #from selenium.webdriver.common.keys import Keys from time import sleep # FIREFOX #browser = webdriver.Firefox(executable_path='./geckodriver') # CHROME browser = webdriver.Chrome(executable_path='./chromedriver') # BROWSER SETTING browser.set_window_size(1260,700) browser.set_window_p...
17c9b360361127e70d9b4ba6894b463be4480ab7
08afc5088431bfadf307ca22ec2d4a9d187ccc27
/projects/models.py
1a1a00c0c97e7c1b106f95ad3def0e4b8ec7080f
[]
no_license
AustralianSynchrotron/mx-sample-manager
68afab6f830d81db1785e956da4ea5a554e00399
00970fc5bc76ae70a42d85b753866f8da8cf5582
refs/heads/master
2021-01-17T01:54:28.816446
2019-07-31T22:55:40
2019-07-31T22:55:40
48,398,046
0
0
null
null
null
null
UTF-8
Python
false
false
1,272
py
models.py
from flask_mongokit import Document from mongokit import ObjectId, IS class Project(Document): __collection__ = 'projects' structure = { 'name': unicode, 'description': unicode, 'sequence': unicode, } required_fields = ['name'] # default_values = {'creation': datetime.utcnow...
0fc960fe7014d8566c0e50bb1e9dbe6ccdf74cfa
d9ec83067d689ce4d269ef3e78ad0b7f83ae6aea
/learning_based/parser.py
192477deddd3e58a5179dcc138f7e060eecf2451
[]
no_license
shateiely/MMNet
b0f5450bc77f7a84bdd118635f52ed28fa586821
3b746c9a1db33b0c5d397b2fa76a0147660f06be
refs/heads/master
2020-06-09T10:29:09.555968
2019-06-17T02:13:45
2019-06-17T02:13:45
193,423,116
1
0
null
2019-06-24T02:51:45
2019-06-24T02:51:45
null
UTF-8
Python
false
false
4,601
py
parser.py
import argparse def parse(): parser = argparse.ArgumentParser(description='MIMO signal detection simulator') parser.add_argument('--x-size', '-xs', type = int, required=True, help = 'Number of senders') parser.add_argument('--y-size', '-ys', type = ...
5ffef76ec82b258f2c17ba43a5e5903910bf5a15
29e449e5cc2b89a7880e39a28ef8cc454af0d7a2
/internetwache-ctf/crypto/90/ct.py
29a61e591833e6c3f1c685b2f8c79cc73f0f9551
[]
no_license
yanapermana/ctf-2016
f0a1ea9e51d2ddbad095c5ef7ae62a7f11a3c274
40367d84029f3837747c277f79d5829ae52b8736
refs/heads/master
2021-01-10T01:21:56.792438
2016-03-27T15:02:55
2016-03-27T15:02:55
49,835,688
0
3
null
null
null
null
UTF-8
Python
false
false
430
py
ct.py
def forge(ctx): p = 'TRANSACTION: 5000' p += chr(0x09)*(17-len(p)) p = p[::-1] ct = ctx ct = ct.decode('hex') ct = ct[::-1] update = [] for ci,pl in zip(ct, p): x = ord(ci) ^ ord(pl) if pl == ':': break else: update.append(chr((ord('9') ^ x)).encode('hex')) update.reverse() return ctx[0:len(ctx)-1...
004f98b96c03d8f2ea24f1abb7605027549cc496
0247c5be6a1a207007f68feb67027963a949222a
/src/quant_model/Vgg16.py
6d2704d730af33ae5017e29036bf985f960fbe80
[]
no_license
Fcccccc/Quantization
4c6167945b44d46e60cf58b3da8a125523a6f324
641acf831b1b8b6659e754bc393fb72e8542819f
refs/heads/master
2020-05-06T14:02:25.370080
2019-06-18T15:34:34
2019-06-18T15:34:34
180,169,768
0
0
null
null
null
null
UTF-8
Python
false
false
3,309
py
Vgg16.py
import sys import os from src.quant_model.base import quant_base import tensorflow as tf import numpy as np class Vgg16(quant_base): def __init__(self, hyperparams): quant_base.__init__(self, hyperparams) def build(self, quant_bits = 8): current_tensor = self.Utils.quant_conv2d_bn_relu("conv1_...
f354556f398dee18cd411c994e8675739fd649ab
ae67c6107dcc81f2d1e924c8fa59b8f51bab1c8b
/MDSimulation/Src/time-KE/average/KE-times.py
bc57920c4f914d4b9a23d52f5b1be435da6ba5f1
[]
no_license
braceal/REAP-ReinforcementLearningBasedAdaptiveSampling
4576ff60a6128007440fec39a9a7109ee5f6f26c
947fa7489100ceecc396314bb0e4e7ce3a3536fd
refs/heads/master
2020-12-22T16:18:53.525011
2019-04-30T16:00:42
2019-04-30T16:00:42
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,033
py
KE-times.py
import numpy as np Atimes = [] n_trj = 95 for i in range(n_trj): try: trjs_theta = np.load('../data/trjs-theta/trjs_theta' + str(i) + '.npy') KE = [] KE_min = [] for frame in range(len(trjs_theta[1])): KE.append(trjs_theta[1][frame]) if frame>1000: KE10minMean = np.average(np.sort(KE)[0:1000]) e...
b4240decd102836614b367c730d468f39f3059b7
ba2bac4ee2b533d2706dbcc47c89281b5a2c8715
/VariousEigenValuesMethods.py
392a682fef64adf7f38b98ddf0456e24545b9df7
[]
no_license
Suvorovkot/ComputationalPractice
657648291ca6ff99e9115c8af1f79f99af9807b1
cdf4c818b34c760ff39e3d913880843587b71342
refs/heads/master
2020-03-09T23:53:49.012223
2018-11-19T18:44:47
2018-11-19T18:44:47
129,068,887
0
0
null
null
null
null
UTF-8
Python
false
false
1,488
py
VariousEigenValuesMethods.py
import numpy as np from numpy import linalg def powerMethod(A, eps): Yk = np.array([1., 0.0001, 0.0001]) res = 1 k = 0 while res >= eps: k+=1 Yk1 = np.dot(A, Yk) Yk1norm = np.linalg.norm(Yk1) Yk = Yk1 / Yk1norm l1 = Yk1[0]/Yk[0] res = linalg.norm(np.dot(...
520e8d47bf335529b9149075a45279d8085a1f18
e75865dbeb45315db58ba0027a40a8b8634069af
/Policy Gradient/src/PPO/Memory.py
a7f5b0061c532db546e98a698ed711d58b5a2ae0
[]
no_license
MrHeadshot99/rl_lib
382adc3f4d4e7ace97f58044ebfe5779b1fabde1
f165aabb328cb5c798360640fcef58792a72ae8a
refs/heads/master
2023-06-03T18:26:55.363255
2021-02-27T09:25:37
2021-02-27T09:25:37
null
0
0
null
null
null
null
UTF-8
Python
false
false
492
py
Memory.py
class Memory: def __init__(self): self.states = [] self.actions = [] self.rewards = [] self.log_probs = [] self.dones = [] def add(self, state, action, reward, log_prob, done): self.states.append(state) self.actions.append(action) self.rewards.append(reward) self.log_probs.app...
dab3571230fb50a36b66157e10e01c232501914f
e334aa5efe412a954022961582b6d2a8b81856f0
/workOrder/migrations/0036_auto_20200921_1853.py
c78b579fa93d086d98bbf048f46091e16ac9bb8a
[]
no_license
slametsampon/cmms
7b145081eef57104ed16f1b99185305f61a716f4
1053b6036a759abef10b80e07f03e85b24d87d79
refs/heads/master
2022-12-20T01:37:55.599730
2020-10-01T03:16:34
2020-10-01T03:16:34
288,321,026
0
0
null
2020-08-19T08:54:07
2020-08-18T01:03:49
TSQL
UTF-8
Python
false
false
992
py
0036_auto_20200921_1853.py
# Generated by Django 3.1 on 2020-09-21 11:53 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('workOrder', '0035_auto_20200921_1127'), ] operations = [ migrations.RenameField( model_name='wo_instruction', old_name...
5d24c88ad3b52207e93a5e6440d765e8ece702cd
202be342b0ad1597eee5976222636e7ea235c580
/fthd.py
fecb42913cba8edcf191efcaa784b264763bdafc
[]
no_license
simgenurcankaya/Network_TP2
2ecc872ebc147f074e4dec0f6a0d812d369a8108
eb22400b50d6ea2d8c51798fa2aea06b36c6926e
refs/heads/master
2020-11-27T13:11:56.185947
2020-01-04T19:22:20
2020-01-04T19:22:20
229,455,384
0
0
null
null
null
null
UTF-8
Python
false
false
11,791
py
fthd.py
import threading import socket import time #For the experiment we only needed S-R3-D implementation, #so other ports are not implemented. # D is the Destination and only receives from and sends to R3. ip_send_r3 = "10.10.7.2" ip_get_r3 = "10.10.7.1" port1_d = 45678 port2_d = 45679 datafromS1 = [] datafromS2 = [] Si...
41b973f4979c8891ac8715abacf2b0eabf2f1122
49e79b470c5b0e84d27e2e1e03a9ce543cbcd962
/timediary/views.py
b503c9b6c6d78290e0630aff6e8495ac4fd05d7e
[ "MIT" ]
permissive
TimeDiary/hhmmss_server
6450f655d0ada3855358817fa1fb072ad84721de
c0c7cb1b19e15afce92a57ac499d98bb323cd26d
refs/heads/master
2020-04-04T18:35:32.473926
2018-11-10T10:17:28
2018-11-10T10:17:28
156,169,885
1
1
MIT
2018-11-10T10:17:29
2018-11-05T06:18:35
Python
UTF-8
Python
false
false
289
py
views.py
from django.shortcuts import render from rest_framework import viewsets from .serializers import UserSettingSerializer from .models import UserSetting class UserSettingViewSet(viewsets.ModelViewSet): queryset = UserSetting.objects.all() serializer_class = UserSettingSerializer
dca14afcb3fda62a0269296118866446362ac357
ae7ebed6180d97cc2898729e8507a5fb403b4584
/app/sessions.py
3fcd7d7a41b92e22966ffe1f5eaee16b48b115a5
[]
no_license
slushkovsky/test-parser
3ba0a0eb4e8adf3ff77b9c8a0824255ac55817a3
f48caa87e91959403498bdb603aa46d42f75da58
refs/heads/master
2020-09-22T12:44:27.314736
2016-09-02T05:54:58
2016-09-02T05:54:58
67,025,133
0
0
null
null
null
null
UTF-8
Python
false
false
3,604
py
sessions.py
import json import random import string from redis import StrictRedis redis = StrictRedis() def set_status(box, progress, status, extra_info={}): ''' Updates parsing status. Parameters ---------- box <str> Key for store status progress <int> Current parsing progress (i...
88542540764433bef94cfd7892199810ec6992df
18c000991060b67c39cdf5cd0c4c6b719150ec33
/gb2db.py
f69e1a93972d4601894bdb7e5fd70300a667a352
[]
no_license
open-projects/scripts
7529b2a7da6ddc47fd552843f20c8f8a703a9fbe
d838fdb951b2705f79e4fe73ba5cfe0740d16b26
refs/heads/master
2022-11-16T04:39:15.180536
2020-07-07T09:38:57
2020-07-07T09:38:57
255,279,713
0
0
null
null
null
null
UTF-8
Python
false
false
2,599
py
gb2db.py
#!/usr/bin/env python3 import os import re import argparse import hashlib from Bio import SeqIO def main(): input_parser = argparse.ArgumentParser(description='gb2db: the script to parse GenBank files to load them in a database.') input_parser.add_argument('-f', metavar='input_file.gb', help='GenBank input fi...
0bd11af74720eabc419eabba5983fbae751cbe49
fd997f82341087eadaf85124ade255cca7254983
/api_service/api.py
5baff8a4a95601f72f5c3c56c1c3cbec01c41d7e
[]
no_license
arongeerts/kafka-livescore-app
103b41633b59890157ea5ea29b08fb67f8820478
910089aa6d625ebba2ffaeeed0f44622a8a486e8
refs/heads/main
2023-01-07T11:05:32.434759
2020-11-15T14:44:08
2020-11-15T14:44:08
313,049,403
1
0
null
null
null
null
UTF-8
Python
false
false
1,215
py
api.py
import asyncio import json import threading import uvicorn from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware from starlette.websockets import WebSocket, WebSocketDisconnect import api_service.kakfa_thread as kafka_thread from api_service.helpers import DataManager, ConnectionManager, Game...
54dfa437a4bb6128612d6a78a72aff4f0e3b5112
e7be780445627afa456df916d5fecfc4d4453036
/backoffice/migrations/0014_auto_20180420_1459.py
0b75b046018c963d82a865cb138509e6d313d33c
[]
no_license
nicolas-pantel/MiWo
0729bc4eb4b73a687ec443deb4e7e7e7ea9a4ce4
347836d856c01b08fcd426cb676ab3c3e17237a6
refs/heads/master
2021-03-27T13:30:04.732499
2018-07-10T13:36:56
2018-07-10T13:36:56
123,339,908
0
0
null
null
null
null
UTF-8
Python
false
false
733
py
0014_auto_20180420_1459.py
# Generated by Django 2.0.2 on 2018-04-20 14:59 import datetime from django.db import migrations, models from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('backoffice', '0013_auto_20180420_0747'), ] operations = [ migrations.AddField( ...
be328ca4eeb7da39e619135756203873f5f8b763
b2a3ee96c24e242a440612d8a4dbd1810621ea70
/shifts.py
03fd0ead87133fbd9596dedfa971a998f9e645d0
[]
no_license
grimmo/torque
cf810cf621fabb07a2193cfc8432a75cb3c04759
a641f47aa688d45bf56ef672f8e9e8e68a3af42e
refs/heads/master
2021-06-02T22:46:43.629742
2015-03-17T15:11:37
2015-03-17T15:11:37
32,400,997
2
0
null
2020-10-13T08:40:07
2015-03-17T15:12:41
Python
UTF-8
Python
false
false
5,573
py
shifts.py
import falcon import datetime import dateutil.parser import logging from bson import json_util from pymongo.errors import DuplicateKeyError from bson.errors import InvalidId from bson.objectid import ObjectId class StorageError(Exception): @staticmethod def handle(ex, req, resp, params): description =...
3a69229efa5f43e6f8c0b8ee1996f95092526381
d4f38c9a5d392de35f2c66b6e8e22a1ce9d10bd5
/daemon/db/eswitch_db.py
72805833da1904914565ae2fd2ed06358e4fb23e
[]
no_license
pperezrubio/mellanox-quantum-plugin
7779e746840e41a60abb14aecbbf0354fb5d40b6
6242e800af50ded037bf09927292026881e021e2
refs/heads/master
2021-01-18T13:55:55.301743
2013-02-04T14:11:19
2013-02-04T14:11:19
null
0
0
null
null
null
null
UTF-8
Python
false
false
4,206
py
eswitch_db.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2013 Mellanox Technologies, Ltd # # 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 # #...
02a329d730fe3225cf706ebb89b4a05fc0691b75
1ea4b7b981c7be30b6e668424c0645a995f82adb
/Aulas_Python/Python/Exercícios/Exe051-Progressão Aritmética.py
3bc258dc32aac623fbbc0e979da0871392fdc8ea
[ "MIT" ]
permissive
DanielMGuedes/Exercicios_Python_Prof_Guanabara
4f21353aa46a595ba8a3e3730e5ef2b7260cda5a
8a683615acfa47f5aa89f53e426d784aa1a2936e
refs/heads/main
2023-02-03T09:26:51.255399
2020-12-22T20:49:37
2020-12-22T20:49:37
305,674,705
0
0
null
null
null
null
UTF-8
Python
false
false
215
py
Exe051-Progressão Aritmética.py
primeiro = int(input('Primeiro Termo: ')) razão = int(input('Razão: ')) décimo=primeiro +(10-1) * razão for c in range (primeiro, décimo + razão, razão): print('{} '.format(c), end=' -> ') print('ACABOU')
cc9642a9649af73f6eca8fafe115e3cf9d5bdc2f
735f86b9abcb9e863b26b14abe395eeed172c72c
/twist.py
c023fded8988a0369ef458c961a01bb737c4bfb2
[]
no_license
kml27/graphics_algos
79f2e9656da71a24e99f7e2883790f9dee05e27d
fe9f913b13aca0d03490c0353569eaa192b2bce8
refs/heads/master
2022-07-20T00:43:53.234599
2018-04-21T21:39:44
2018-04-21T21:39:44
264,089,091
0
0
null
null
null
null
UTF-8
Python
false
false
10,860
py
twist.py
from __future__ import division import os,sys,translation os.environ["PYSDL2_DLL_PATH"]="." import sdl2, sdl2.ext#, sdl2.color import math, random window_size=(1920,1080) #window_size=(800,600) txtr=1 #fit to old code class rectangle(object): def __init__(self, x1, y1, x2, y2): self.bottom=...
805df749bf0ab7770eae1ff4e10608017b4e4574
61daad3963790ab4afe3923a1b134f09f2bb8ddd
/Smelted_Settings.py
ac5fd9cf701faaf4c974e47c89a81ebf04aece1f
[ "MIT" ]
permissive
gamernetwork/smelted
4f9bde3b33438adbb6c0fa26095dc2ed2f0cc03f
4919dd68dd679ca2afd4da0a4895686da63cbf08
refs/heads/master
2021-01-10T21:15:34.632576
2017-08-10T18:04:51
2017-08-10T18:04:51
31,663,323
5
4
null
null
null
null
UTF-8
Python
false
false
96
py
Smelted_Settings.py
program_title = "Smelted: Rezz-a-tron 4000" HOST = "localhost" PORT = 5250 current_unit = "U0"
b540f64d9de5403a8969575ebc88830386e44911
6826b539df3a2e2342d1a4fa3a4034739ae63fce
/main.py
2b3f33e1a8d47004720346ad2e41a032265423a2
[]
no_license
jgphy/lensingResearch
9758897d3cb52d068fcd01e95e901c2cb61d8af4
ec6ec7a11221a1226eef0bfe4c7d4fd7c45173b8
refs/heads/master
2021-03-22T00:39:18.546164
2017-03-15T14:47:25
2017-03-15T14:47:25
55,302,878
0
0
null
null
null
null
UTF-8
Python
false
false
1,285
py
main.py
import quasar import structures import plotMethods import calculations from constants import * import numpy def main(): # SET UP STUFF===================================== quasarName="PG1115+080" mapSize=500 BHmass=1.0e9*solarMass print(BHmass) spin='no spin' R_E= 3.62e14 isco=quasar.isco(BHmass,"no spin") pr...
51580891cb85dbb30326becbea27873aceef69b2
581457946402d62ade174e44af068e0b5ae9955c
/py_stringmatching/similarity_measure/jaro.py
0553694e9cf7b1c045984d93cade3e34f3b6c6f0
[]
no_license
asharma567/example_of_lambda_deployment
fdf1f024c9713ac794b1d40d43e4b0ca69c932d0
0f6169f1c81d6d3f17b5efe502b5419cd4ba8548
refs/heads/master
2021-09-10T03:07:33.200096
2018-03-20T21:14:05
2018-03-20T21:14:05
110,161,787
0
0
null
null
null
null
UTF-8
Python
false
false
3,636
py
jaro.py
from py_stringmatching import utils from six.moves import xrange from py_stringmatching.similarity_measure.sequence_similarity_measure import \ SequenceSimilarityMeasure class Jaro(SequenceSimilarityMeasure): """Computes Jaro measure. The Jaro measure is a ...
705d39c031bc0d08edb8188025c087ccd12bfd25
3122b0102f271423427b5397bd5112ba3e7bacfb
/mysite/mysite/urls.py
fbc15fc3b52f1180add248cff921b18635214c56
[]
no_license
Alexiaognard/PiscineTOEIC
f544f7e393f1d003bf2deadcd702dad3e4923596
d8877e091f1a37f7be6b2ddf1ee84d5a0c6b1435
refs/heads/master
2020-08-03T18:19:33.435127
2020-01-15T18:03:09
2020-01-15T18:03:09
211,842,589
0
0
null
null
null
null
UTF-8
Python
false
false
3,107
py
urls.py
"""mysite URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based ...
eb7a41950cc063bf15b6fcf9d618ac476ac083b8
81de228709cfa344eba7da7d7cefdb570211a91e
/snippets/commandtest.py
6060eaaa440c5229216a3306c5b4b83ce0257ad1
[]
no_license
djlancelot/momuv
9a65aff92c716920ea528d721154dbb294df9921
e6a4a3cca9a708b27e26cc9d2292819f42e74775
refs/heads/master
2020-08-27T23:03:43.983364
2019-11-09T05:15:22
2019-11-09T05:15:22
217,514,188
1
0
null
null
null
null
UTF-8
Python
false
false
620
py
commandtest.py
import subprocess import time import socket "https://zindilis.com/blog/2016/10/23/control-vlc-with-python.html" host = "localhost" port = 8888 cmd = '"c:\\Program Files (x86)\\VideoLAN\VLC\\vlc.exe" -I rc --rc-host {}:{} --play-and-pause d:\\Videok\\vagott.mpg'.format(host, port) sock = socket.socket(socket.AF_INET, s...
74bb264c710cee8127f9c25ff73ac7c195845a1e
0d031035dd2c58f38ec145f426a1541d0de6aa36
/classifier_linear.py
f92adefb018ca44e70af3ccacc9e807f0ff4f780
[]
no_license
carloserocha/ml_cerveja
b124a95460f1be8cade1f57423855f01d227e332
62ce71bad31d6d757e4c1e1de5108759920913c0
refs/heads/master
2020-08-28T06:53:00.652296
2019-10-26T01:25:37
2019-10-26T01:25:37
217,627,977
0
0
null
null
null
null
UTF-8
Python
false
false
2,109
py
classifier_linear.py
# -*- coding:utf-8 -*- from log import log # def print import sys import cv2 import numpy as np from sklearn.svm import SVC from sklearn.svm import SVR ''' Imagens de Treinamento ''' h1 = cv2.imread('imagens/heineken/1.jpg') h2 = cv2.imread('imagens/heineken/2.jpg') h3 = cv2.imread('imagens/heineken/3.jpg') h4 = ...
3bf6fedf6936cb042eba224b24b08deb2e9acc4f
b4584970c03524d8e75df80804ed3540b5ff375d
/Python/BlackJack/Card.py
8f6e4cdc1f1cb90b09e7276ed0e51b3a72cf4b01
[]
no_license
FrazerBayley/FB-examples
4d4398f9926d5db794e6f7db8e2850fcf8a6cfcc
27f47f24c3122ce391bbb79f2529ca61873904b9
refs/heads/master
2021-01-10T17:23:25.938183
2017-08-24T15:35:31
2017-08-24T15:35:31
49,525,947
0
0
null
null
null
null
UTF-8
Python
false
false
3,379
py
Card.py
# Frazer Bayley # CIS 211 # Project #2; "Card.py" """ Card.py takes a numerical value from 0 through 51 to turn into a playing card object. The first class [Card] takes the value and gives it a string representation of a standard playing card as well as giving that card a point value. The second class [BlackjackCard...
0798aa566f6893da857fe5edba0e602900e6e373
341eb52a6b65e15648275dcf6a450718cb7e5284
/windowbox/models/attachment.py
6b110f9be39ca585990069f1f33535d6d5595cec
[]
no_license
smitelli/windowbox
4b32c99f09c8fda6a9fec271600c80e75b7ab086
72e73cd10465095b19772c79c45432e997f9a7e7
refs/heads/master
2023-06-11T04:40:22.905753
2023-05-30T01:08:57
2023-05-30T01:10:19
8,422,029
0
0
null
2023-05-25T23:14:44
2013-02-26T01:00:38
Python
UTF-8
Python
false
false
13,832
py
attachment.py
""" Attachment model. Attributes: Dimensions: namedtuple that conveniently encodes the width, height, and allow_crop flag to identify a specific Derivative. EXIF_Field: namedtuple to store the key/description/value/extra data of a single piece of EXIF data. EXIF_CATEGORIES: Mapping of EXIF ...
c47f3e291e53a542e12c9060c687dfc3bae24671
61460a632b7a402b900c0f9eb82fc3030bf683d1
/ABC/ABC-training/Virtual_contests_04/b.py
0b207929018c92199e98a5a6747b51fca4f407b4
[]
no_license
tuna0808/Atcoder
44479b74aac73662253377d68f8d74f6b0ce82b1
7bbb07587424a5c66d4ffd84c5bc504de7103a36
refs/heads/master
2021-06-30T20:27:33.000600
2021-06-09T05:07:55
2021-06-09T05:07:55
240,917,955
0
0
null
null
null
null
UTF-8
Python
false
false
246
py
b.py
D = sorted(list(map(int, input().split()))) S = sorted(list(map(int, input().split()))) D_v = D[0]*D[1]*D[2] S_v = S[0]*S[1]*S[2] while(len(D)>0): d = D.pop() s = S.pop() if d < s: print(0) exit() print(D_v // S_v)
398386841bb02a75f17e64b1ee5fe87ea0408df2
2584e34edc0ad95c50200ca209aacd92294a81bc
/video_psd_integrate.py
583b2eb8cc2e2524520e6abf6c1dffa947c4c068
[]
no_license
antiface/dsp-playground
06fc23c57c1d6277dd6bfb598932ccae20983284
5f7de253c3fa623160d599a6230f806d5ebf1ae4
refs/heads/master
2021-01-15T14:42:47.790278
2012-05-30T14:12:02
2012-05-30T14:12:02
null
0
0
null
null
null
null
UTF-8
Python
false
false
12,941
py
video_psd_integrate.py
#!/usr/bin/python import sys import os import tempfile import shutil import subprocess import traceback import threading from threading import Thread, Semaphore import Queue import matplotlib.pyplot as plt import matplotlib.mlab as mlab import numpy as np import matplotlib.cm as cm from psd_integrate import integrat...
c70f2aff9ca767706c305e47f82ecc5f0ef03c25
3b385bc581792256306407c1b691222914107f47
/singlecharxordetect.py
edb146193bb7f6c74e8af9b8448592fcb29c50eb
[]
no_license
andrewzigerelli/cryptopals
9aa13b2e0a2bd3792e97149e7eb4b384bc10ce72
b39110f37d67e7624dfd6ced75132baf77456952
refs/heads/master
2021-01-16T18:21:56.702031
2018-01-03T03:25:45
2018-01-03T03:25:45
100,062,611
0
0
null
null
null
null
UTF-8
Python
false
false
691
py
singlecharxordetect.py
#!/usr/bin/python from singlebytexor import freq_score, singlebytexor from operator import itemgetter def main(): lines = [] for line in open("4.txt"): lines.append(line.rstrip()) freq_scores = [freq_score(line) for line in lines] freq_max = [score[0] for score in freq_scores] index, max...
1ffbdb85d9ff29e765a53f22be638d375bd5345e
211e4920cc57e300a0c1f85e9d08f79c41d6fd6c
/Lab/Lab3/Source/logistic_regression.py
78515ac61a371e243b93db81518733940e9a934e
[]
no_license
srividyavn/Python-DL
34d2497c8a5b395b4426e9e90989e57f3854d297
85f4c64e28e0003ef17a1f8ecb49a90b11bafddd
refs/heads/master
2020-04-18T16:04:23.407642
2019-05-18T03:47:53
2019-05-18T03:47:53
167,626,124
1
0
null
null
null
null
UTF-8
Python
false
false
2,029
py
logistic_regression.py
from __future__ import print_function import keras from keras_preprocessing import sequence from keras.utils import to_categorical from keras.datasets import imdb from keras.models import Sequential,load_model from keras.layers import Dense, Dropout, Flatten from keras.layers import Conv1D, MaxPooling1D from keras impo...
0b0406b2c351120a5a51ad190bfe3b7ae0023290
7bef7b2c88774fbe2c5eb07fa97fbfc9c676907b
/sort2.py
507e4915f15362d07ce9040be709aa4b47ae0584
[]
no_license
otteydw/bggsorter
4a4832268e3bd12b06e9b1cd1fdf610bac2dcf1d
6d294d64bb57f7e3398b9ec8bc1007ed2c54c443
refs/heads/master
2020-03-31T10:59:30.262366
2019-07-05T18:29:33
2019-07-05T18:29:33
152,158,522
0
0
null
null
null
null
UTF-8
Python
false
false
1,134
py
sort2.py
#!/usr/bin/python import json class Game: id = None name = None plays = None def __init__(self, id, name, plays): self.id = id self.name = name self.plays = plays def toJSON(self): return json.dumps(self, default=lambda o: o.__dict__, sort_keys=True, i...
c4b3b7222de0d09a0d8feea933346b1b57c31151
e5d24ae39ffb7513f442a2af25a14f17c2ba9e3d
/models/user.py
aee10e08f964663db84fdc49547dbd59a5f99726
[ "MIT" ]
permissive
chance-nelson/SnowStorm
bb98b8ce440acae7eaeda83ad95eaa5168053088
65352080c8590aa0ec5fa17ce625bd95c16264a7
refs/heads/master
2022-12-09T17:36:44.336518
2020-05-07T03:08:55
2020-05-07T03:08:55
171,823,551
6
14
MIT
2022-05-25T03:37:36
2019-02-21T07:37:33
Python
UTF-8
Python
false
false
153
py
user.py
from mongoengine import fields from .entity import Entity class User(Entity): username = fields.StringField() password = fields.StringField()
b09a8dc7928dd09ff3d5bfcc098690fa9faae2d2
952abfc855d0fca89200f1e428aac9a87f1d3295
/dacon/sun/sun_light_LGBM_model_ex.py
d7d97ae7bddfc4c91a193140aa9cf342a94a320c
[]
no_license
TaeYeon-kim-ai/STUDY_1.py
7570b4510bf8d9791447efe3a97a9668a1cabe06
e14392c706b7e51e40f1ac68555e26558e25b38f
refs/heads/master
2023-06-03T09:04:13.498591
2021-06-21T17:10:47
2021-06-21T17:10:47
329,834,933
1
0
null
null
null
null
UTF-8
Python
false
false
5,101
py
sun_light_LGBM_model_ex.py
import pandas as pd import numpy as np import os import glob import random import warnings # 경고제어 warnings.filterwarnings("ignore") train = pd.read_csv('./dacon/data/train/train.csv') submission = pd.read_csv('./dacon/data/sample_submission.csv') submission.tail() def preprocess_data(data, is_train=True): te...
c2eedc62014d4377cefdae9e849f7af45ba19b46
c1373176125221d61391bc4493a2be0cae8960e2
/uu/trac/adapter.py
f5814b0085b2e94f8184178c1102c6e49f02ba3d
[]
no_license
mostscript/uu.trac
cecf0bf0fa9e24c9407b324e85b5269473962308
afbd73052e96feb7b619bf10f62ed99cbb1eb5dc
refs/heads/master
2020-03-18T08:04:24.129550
2016-02-23T21:55:18
2016-02-23T21:55:18
134,487,905
0
0
null
null
null
null
UTF-8
Python
false
false
1,655
py
adapter.py
import itertools import xmlrpclib from zope.interface import implements from interfaces import ITickets class TracTickets(object): """ Adapter of trac listing, fronts a read-only mapping of tickets from Trac site fetched over XML-RPC. Key is ticket number integer. """ implements(ITickets) ...
88b83af0df00315fda28f36ae00fb0cdfc381dbf
ce6b02735382d0ed00908363980f3ea0ea1e2364
/models.py
96eca2b86b9c26d8da930da732af6c780368429d
[]
no_license
xpt1x/summer-project
96ecd3661d37163029819ab57bb4910d97ce43d0
4de3db2aee190658183eda2c82f09519e9ea5449
refs/heads/master
2020-05-30T15:09:40.526423
2020-02-15T12:43:43
2020-02-15T12:43:43
189,811,239
0
0
null
null
null
null
UTF-8
Python
false
false
1,380
py
models.py
from flask_sqlalchemy import SQLAlchemy from flask import render_template, url_for db = SQLAlchemy() class Bus(db.Model): __tablename__ = "bus_data" id = db.Column(db.Integer, primary_key=True) origin = db.Column(db.String, nullable=False) destination = db.Column(db.String, nullable=False) ...
8c0d64498e0e6210a13386371388a71483751c67
8fa1e42e7a38b3ffef736e4851e0aab5700b62be
/questões/questao_04.py
197974b6a3dd6b7ec327b2468ab36e2c4d3b1ef6
[]
no_license
ifpb-cz-ads/pw1-2020-2-ac04-team-alexfrancisco
6289df0384a19e1f5ba238c35059c973f8af84fc
1584d7509c090695dc94b51be344446cedb87e36
refs/heads/main
2023-03-21T12:18:54.115161
2021-03-04T01:36:37
2021-03-04T01:36:37
342,600,122
0
0
null
null
null
null
UTF-8
Python
false
false
45
py
questao_04.py
x = 0 while x < 30: x += 3 print(x)
d91422d323f742378efca894c510d5eb71a63e1f
98ed73e8c2abda8cc4dc3486e2e8d9834110cb60
/src/enumeration/turn_off_lights/turn_off_lights.py
6e0c260bfb54a77ff6ec1866e9bfb521f227ed43
[]
no_license
dd89757/fun_algo_solutions
162eef7aba59201f1a0bdc93790854cda70b492c
2dc8aaa12d36e1509921b4ce243ada3cf84a9241
refs/heads/main
2023-08-07T01:35:40.611980
2021-10-07T17:04:41
2021-10-07T17:04:41
334,617,487
1
1
null
2021-10-07T08:49:17
2021-01-31T09:25:18
Python
UTF-8
Python
false
false
3,237
py
turn_off_lights.py
import logging import sys from src.enumeration.turn_off_lights.input import lights logging.basicConfig(stream=sys.stdout, level=logging.INFO) def turn_off_lights(lights): # enumerate the first column, once the status of the first column is fixed, then the next column is also fixed, ... # can also enumerate ...
82ae53ea634ed18e0d1e938630dcfd6af3bab630
8fd3621607e125bdbb055b60c753ddb98483fe91
/app/console/shutdown.py
7228dca3e1c8b05823fa9f1348fc700c773a6f95
[]
no_license
ccdv2and4dalao/CenterAirConditioner
e674c6c64639cbdb92a308bf1ecff200c012e59c
42a2d4a1d03067a76948b2616ac60749fc0d3254
refs/heads/master
2022-11-01T04:06:40.394362
2020-06-16T16:10:48
2020-06-16T16:10:48
268,403,396
3
0
null
null
null
null
UTF-8
Python
false
false
731
py
shutdown.py
from abstract.consensus import ConsolePrefix from abstract.console import ShutdownConsole from abstract.service.admin import AdminShutdownMasterService from app.console.base_subconsole import BaseSubConsoleImpl from proto.admin.shutdown import AdminShutdownRequest, AdminShutdownResponse class ShutdownConsoleImpl(Shu...
cd7993d9b3ce401ae0eeac09d0da3ed6d75ff51f
711985d1ca5c9431e7ad20d4375b2761f7b42ea9
/hr/migrations/0001_initial.py
ff9341232d45bc1af829d865f15c99827569ab15
[]
no_license
mu7affarmirzo/ung-from-server
498684f262cfb9385406a137c200c8fa87fb4916
f65913d7f0d42e1fdf190f334d3399b00b0436a7
refs/heads/main
2023-08-14T04:23:21.481479
2021-08-30T12:11:32
2021-08-30T12:11:32
318,401,877
0
0
null
null
null
null
UTF-8
Python
false
false
5,295
py
0001_initial.py
# Generated by Django 2.2.2 on 2021-08-24 06:47 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='UploadCv', fields=[ ...
f07d04f725d7b1c0c68a21fdd67ade9b9e20443d
9fe9e99f229cb07ce883ede1c5a2882a5750c04f
/prac_01/extension_work2.py
8b9e9e421e7a2c26e3f868564d6c1aa704d1cc0a
[]
no_license
nurullputrii/CP1404
b80855f8bd1bf7a45be9e20f522e75cb3199a2b9
92404acc171e19fdad3df080edbc75de875d8fe2
refs/heads/master
2020-06-21T16:24:56.593429
2019-09-12T13:34:42
2019-09-12T13:34:42
197,501,968
1
0
null
null
null
null
UTF-8
Python
false
false
583
py
extension_work2.py
""" TARIFF_11 = 0.244618 TARIFF_31 = 0.136928 """ # price_in_cents = int(input("enter the price in cents: ")) daily_in_kwh = float(input("enter daily use in kwh: ")) billing_days = int(input("enter number of billing days: ")) tariff_input = int(input("tariff 11 or 31? ")) TARIFF_11 = 0.244618 TARIFF_31 = 0.136928 if t...
e0bc2d9ad736acfb9a024d324d8549e40c806c0a
e986b7650d2317f740d65f44b19e663cb646d85e
/jdaviz/tests/test_utils.py
c243c1a71488000bee51cbc16b0ef6355a82be19
[ "BSD-3-Clause" ]
permissive
spacetelescope/jdaviz
a223230d2296f7fdee17a43ae1a4bee45452ec13
17a864ed7d64cece18fbc29f3561c137e6bf0942
refs/heads/main
2023-08-17T05:59:55.109052
2023-08-15T19:46:49
2023-08-15T19:46:49
185,452,341
105
70
BSD-3-Clause
2023-09-14T15:20:16
2019-05-07T17:54:06
Python
UTF-8
Python
false
false
558
py
test_utils.py
import pytest from jdaviz import utils @pytest.mark.parametrize("test_input,expected", [(0, 'a'), (1, 'b'), (25, 'z'), (26, 'aa'), (701, 'zz'), (702, '{a')]) def test_alpha_index(test_input, expected): assert utils.alpha_index(test_input) == expected ...
0786984eb42df4973144ce4a13a8b1ef96e63038
b06bad82b97c15551b44d1d8ca9e39a9e9a712fa
/models/sirx.py
051af5a92c7f49d427f3f37da5787c59b2af2dc1
[ "MIT" ]
permissive
sasalatart/open-sir
bd5a5db90bab96281c584bb1872aacb84fb66e4a
d65ca288d62d2d750fd2f93d179839b0a10afd78
refs/heads/master
2021-05-25T13:41:11.415999
2020-04-06T21:37:30
2020-04-07T11:00:11
253,776,235
0
0
MIT
2020-04-07T11:43:36
2020-04-07T11:43:35
null
UTF-8
Python
false
false
2,041
py
sirx.py
"""Contains class and ODE system of SIR-X model""" from .model import Model def sirx(w, t, p): # pylint: disable=unused-argument """ SIR-X: Dynamic outbreaks with temporally increasing intervention inputs: w: vector of state variables [S,I,R,X] where S: Fraction of the population susc...
a53a5418b5c28c8aceaa2a2f15ee1a78fba05cca
464787bf6cbfff2fb62225a3c3594596773e24a3
/src/00-Data_Extraction.py
1034e90631c2d30e50ad1555e2cba4d3ff35c0f4
[ "BSD-3-Clause" ]
permissive
jasoncpit/osm_association_rules
ec8953a44f7d9aa668aa835cc45e0809f53baf31
33975ce25047f9ab3b21e890bc5ed9bab59a0a2f
refs/heads/master
2023-05-30T06:18:29.369982
2021-06-16T09:59:06
2021-06-16T09:59:06
null
0
0
null
null
null
null
UTF-8
Python
false
false
4,079
py
00-Data_Extraction.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """Performs data extraction for association rule analysis using the ohsome API """ __author__ = "Christina Ludwig, GIScience Research Group, Heidelberg University" __email__ = "christina.ludwig@uni-heidelberg.de" import os, sys import argparse import geopy from data_ext...
f8e21daafa476f8d00fc71ac3a702dddeda3a753
706bb7d13326cad2591b5d92ddc94bd4c1d54afb
/UNIT_10_리스트와 튜플 사용하기/119p_range 를 사용하여 튜플 만들기.py
3dcf338ef8c0f6103ab74ca51f26ad6704d61bcd
[]
no_license
qkrwldnjs89/dojang_python
bd27a336a1c433954a610411042d4ac55b1c4f37
341f15d6d92a0730a5e32e974dc0efbdea41d651
refs/heads/master
2022-11-13T02:34:59.468716
2020-07-01T12:10:14
2020-07-01T12:10:14
275,792,473
0
0
null
null
null
null
UTF-8
Python
false
false
79
py
119p_range 를 사용하여 튜플 만들기.py
# range 를 사용하여 튜플 만들기 a = tuple(range(0, 10, 2)) print(a)
023d1d28e97c8a69844ae613487d99cccc669d2f
6d45f8b90b8f2d23ace948669ad655bb171ae1f7
/solution/load_club_ready_reservations.py
4a15c044c424add64e40182805f6279f263b69b8
[]
no_license
trjohns87/peerfit_demo
929c3e2c54efaf7f23513058448c137a7a447ae1
495919f7064ffcae13a0b2d82e57e30080d80ceb
refs/heads/master
2021-03-27T18:23:45.493518
2018-02-23T03:36:51
2018-02-23T03:36:51
122,555,670
0
0
null
null
null
null
UTF-8
Python
false
false
1,883
py
load_club_ready_reservations.py
def xstrip(s): return None if not s else s.strip() def nstrip(s): return None if not s else int(s.strip()) def dfix(s): if not s: return None elif len(s) ==7: return s+'-01 00:00:00' #elif len(s) ==8: # return date_keys[loop_count] + ' ' + s else: return xstrip(s) def bfix(s): if s.lower()=='t': ret...
eb2fe3acd8e2a450dc8c3e27c23d4d55032e4e9b
b631cab7d87c062d47385751edc0d7f08d5d2e34
/conftest.py
9ccce53b2f8ba1bb1ba38bfbdc8e525c2fa82a74
[]
no_license
patrickylam/nav-editor
ee5f8f5d6478b080d6c2b3118af17cc858448e46
362e6221a34e7619b9b38b1625d2d740a016ad38
refs/heads/master
2021-05-05T03:05:28.057704
2018-02-01T03:00:59
2018-02-01T03:00:59
119,774,425
0
0
null
null
null
null
UTF-8
Python
false
false
1,077
py
conftest.py
# Copyright (c) 2017 lululemon athletica Canada inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
f0a2246a1d8b6376a6d55c86660f761a1176712f
347cfd0e5a072975b4fab4c726739b686ad561a9
/list_operations.py
bf0676c025af091ea751bb473183f6d864e79ebf
[]
no_license
justindcoleman/PYTHON3-7--PracticePython
2473fea0c94493c8db7a53367fccfa6d83676777
df48e91cf3a913835ff2053f08a635125a0ac241
refs/heads/master
2020-03-27T18:37:54.693460
2019-04-04T13:51:01
2019-04-04T13:51:01
146,933,668
0
0
null
null
null
null
UTF-8
Python
false
false
1,360
py
list_operations.py
import random while True: numlist = [] listavg = 0 count = int(input("How big is the list: ")) while count > 0: randint = random.randint(10, 100) numlist.append(randint) count = count - 1 print("The list contains: ") for i in numlist: print(i, end="\t") prin...
4dfcde4f4b97f98dc309701596fe845677932a88
2a54a18f6e66adca8f2b7391ef755681fdddc572
/main/models.py
1fa161f5856f34e5f85ca01aead70bb438e69c3c
[]
no_license
paolobejarano/proyecto-django-dse
c33c1430fbeb0f505dcfa1dc4500bc662ed73689
c4dbccacca7ae391ffbf7626b8c39ddd272ec1e1
refs/heads/master
2022-12-23T19:41:30.297893
2020-09-26T14:47:02
2020-09-26T14:47:02
298,833,565
0
0
null
null
null
null
UTF-8
Python
false
false
2,331
py
models.py
from django.db import models # Create your models here. class Proveedor(models.Model): ruc = models.CharField(max_length=11) razon_social = models.CharField(max_length=20) telefono = models.CharField(max_length=9) class Categoria(models.Model): codigo = models.CharField(max_length=4) nombre = models.CharFi...
654326609661993748dd001bba8d4fc735be038e
78e5dfe798aebd096d71e5b8ffff8669fe39955c
/level 3/prepare-the-bunnies-escape/my-solution.py
d79212b3eee5823f9a8998cb7643207f8c547e36
[]
no_license
shakirshakeelzargar/google-foobar
3ea25e4c3b4d874a4fb76cdf874f9a54a6eefb34
5b4d5f4660d358275869e7ec7daf88b95eb688cd
refs/heads/master
2022-06-08T08:40:17.993098
2020-05-08T17:13:34
2020-05-08T17:13:34
262,363,674
0
0
null
null
null
null
UTF-8
Python
false
false
7,531
py
my-solution.py
def exists(ls,x,y): path_exists=False if y!=0: try: if ls[y-1][x]==0: path_exists=True except: pass if y!=len(ls)-1: try: if ls[y+1][x]==0: path_exists=True except: pass if x...
433470c2eee610ea597c6ecaa7647085027c85aa
22283e763c764f7739b1c337833208b4c69b0733
/automate.py
24c225ca50974ba9852ba93db0822480c8611f1f
[]
no_license
satishtrip/automationselenium
a23f4bf8b7c98b5acb7425ed8c7ea28434e43e29
1c7cf1fe7869afe6c6b63ef22d649097bceda008
refs/heads/master
2023-01-24T08:50:18.745745
2020-11-25T22:14:17
2020-11-25T22:14:17
315,129,908
0
0
null
null
null
null
UTF-8
Python
false
false
1,357
py
automate.py
from selenium import webdriver import time from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.common.by import By from selenium.common.exceptions import NoSuchElementException, ElementClickInterceptedException, NoSuchElementEx...
d7c8b966e9bf2369a08f69e36d547a39de44664f
8d0b156356550ea9ae7ca3341eea254cf3858119
/main.py
3ca3373d19404bfc43122f6bf5ecdbd6a8365c49
[ "BSD-2-Clause" ]
permissive
charulagrl/closest-customers
01b28d6122e347e76812dd3ffd4f7caed1d764d5
6a7ba3ec342f6fd80589401cbe46c0405faa312c
refs/heads/master
2021-04-15T15:38:07.429820
2018-03-28T19:13:42
2018-03-28T19:13:42
126,677,818
0
0
null
null
null
null
UTF-8
Python
false
false
1,159
py
main.py
import logging import sys import argparse from closest_customers.models import customer from closest_customers.store import data_loader, data_store from closest_customers.controller import distance from closest_customers.views import results from closest_customers.config import Production if __name__ == "__main__": ...
ca3322bacd4039bef234187f11f7e7988ff9e0ca
7a88534aea49d86bb94c1aef0c59e90f8ef08577
/AttendanceGUI.py
3d8348c1f7f7d995ee4e8f5f491bc1d6a5f08e9b
[]
no_license
Mohamed-Shaaban/odu-attendance-pi
333de1f607027cec904363c7ea24c1e8ba7b50df
3b6121f7909b0cd56056a6dc679cd2a2fb548203
refs/heads/master
2020-06-09T03:54:55.933628
2019-06-23T15:38:41
2019-06-23T15:38:41
193,365,291
0
0
null
null
null
null
UTF-8
Python
false
false
12,374
py
AttendanceGUI.py
import json import time import pyqrcode import requests import logging import logging.handlers import os from tkinter import * from configapi import get_config_info as configs from PIL import ImageTk, Image from AnimatedGIF import AnimatedGIF class Window(Tk): cardCode = '' theToken = '' cancel_after_id =...
103b804b10958a8fe200e1d7fe88f5f22278386f
59d5a8c66e0f9366e46f795dd9224aa7aa253748
/GnC/permissions.py
c2586dde169d034fc2878e01d3bb71992941a19e
[]
no_license
kratinidh/denselightpmp
25f771b44e058fd683f428a10443865a02da4b7b
071cb69644fbd591e3230e3591ac9ba5f6d14881
refs/heads/master
2023-02-01T23:07:01.068145
2020-12-18T04:00:48
2020-12-18T04:00:48
314,800,136
0
0
null
null
null
null
UTF-8
Python
false
false
404
py
permissions.py
from rest_framework import permissions class UpdateOwnComment(permissions.BasePermission): """""" def has_object_permission(self, request, view, obj): """""" if request.method in permissions.SAFE_METHODS: # print("safe met") return True # print("out") # ...
a9b827067127e81ba90cd08ba9157b4f6cc40657
e5e78c5596fd0617f8626917b8c99a8b33176d07
/duplicateimagefinder/output_formats/human.py
01bd35a71b7471c63eb144d4fa3c576b89fbae30
[ "MIT" ]
permissive
RoxasShadow/duplicate-image-finder
d7cf6fb5052200ab6d1fc263e8acb0b7f6247ee5
c9d11a28515306ba3bc69885d602fa9d0f210625
refs/heads/master
2021-05-17T07:03:29.921198
2020-03-28T02:26:55
2020-03-28T02:26:55
250,687,455
0
0
null
2020-03-28T01:19:48
2020-03-28T01:19:48
null
UTF-8
Python
false
false
943
py
human.py
from types import * import sys import os import base class HumanFormat(base.BaseFormatter): def output(self, data): assert type(data) is ListType, "data is not a list" if not len(data): print "No results." return # List the images that are similar to each other ...
124711b41088039a1dc39310442fac2ba5bbb7e2
0a3c5546ce68ce26b4a59a79eba6851b988b2b78
/my_brainfuck.py
d553bec820bf63cd7b66c2dd629f408b897f32bb
[ "MIT" ]
permissive
math974/brainfuck_interpreter
8c5488a21a84b2eafb00344e6d28c87c5eef68eb
a72921073c40a8ae1d52666a09b28ea9173289de
refs/heads/master
2023-06-08T18:14:34.717664
2021-06-28T12:15:52
2021-06-28T12:15:52
368,203,748
2
0
null
null
null
null
UTF-8
Python
false
false
5,911
py
my_brainfuck.py
#!/usr/bin/env python # -*- coding: UTF8 -*- import sys import re """ Date : 18/06/2021 Auteur : Mathias BALLOT Project : brainfuck interpreter Licence : MIT """ class Node: """ Linked List in python """ def __init__(self, value): """ construct list """ self.value = va...
5c8f8a8d9b82e226edd03b26156fd66611e2f897
2da4d3d9cfeeea04ba4c7b287e911c39635a86fe
/piperlearn/setup.py
396bc8e62f028dcb0e19c9fc546fdf425d505112
[ "MIT" ]
permissive
dolremi/PiperLearn
dd7691f4ddb2ddb8f7c53ef5a9718bba7d46814c
fbaea5f9f3cb0cff76c88169799c408de515030b
refs/heads/master
2021-09-06T11:36:14.551621
2018-02-06T04:26:17
2018-02-06T04:26:17
107,074,803
1
2
null
null
null
null
UTF-8
Python
false
false
652
py
setup.py
from __future__ import print_function import sys from setuptools import setup, find_packages with open('requirements.txt') as f: INSTALL_REQUIRES = [l.strip() for l in f.readline() if l] try: import numpy except ImportError: print('numpy is required during installation') sys.exit(1) try: import...
ec818b3deb4f3fae764ddd130c0c7aa16e8ecd57
8674983f33aef6202d6810b93a6845151824d7dc
/blog/views.py
dc9235150bb1756af75a795f2e938095af17079c
[]
no_license
kartikeya23/kartechtips
782865cf7ede927af1d5e9b4216de6f488ef8b10
398b30b5c2691b6ebc45ae273b110b77c538c1d5
refs/heads/master
2023-07-09T20:55:44.828765
2019-11-16T15:25:38
2019-11-16T15:25:38
222,117,999
0
0
null
2023-07-04T07:18:53
2019-11-16T15:20:56
CSS
UTF-8
Python
false
false
462
py
views.py
from django.shortcuts import render from .models import Blog, Category, ExternalURL def home(request): featured = Category.objects.get(name='Trending').blog_set.all()[:2] categories = Category.objects.exclude(name='Trending') recent = Blog.objects.order_by('-posted_on')[:2] return render(request, 'blog/home.html'...
77fd46fb192bd33872b47e3ff3aed77ba9d07cf1
3e4b7dba91aabd67396563632fb9c64e42616217
/virtualenv/lib/python3.6/encodings/cp856.py
639df62209eafc6f9782c845a2d838b0f643dbc8
[]
no_license
c0c1/flask-api
aa5bb9e88deea2e1e395dcaadb78b238a1b8a29b
db377591774eaf0c0d9b287ed4448d5853757592
refs/heads/master
2022-12-31T23:44:36.752255
2020-03-12T14:41:55
2020-03-12T14:41:55
null
0
0
null
null
null
null
UTF-8
Python
false
false
39
py
cp856.py
/usr/lib64/python3.6/encodings/cp856.py
d3b8ed3e57c6d7f11a8777a779e005ff62a94349
0ec179729d7d6c32be2f132c3fe604bb9dd4e66e
/Model/Classifier_Mixmatch.py
2c7929430f060b21ea4abfc79d9a4534a57306ed
[ "MIT" ]
permissive
maple-research-lab/EnAET
8cb2277e6d1bd764f34bf579701041b94d46415b
45872fc8704b723395e8c5a489a3157a771fc6df
refs/heads/master
2023-08-03T14:57:27.024739
2020-12-28T01:49:54
2020-12-28T01:49:54
222,971,462
88
9
MIT
2023-07-27T20:57:22
2019-11-20T15:42:27
Python
UTF-8
Python
false
false
1,301
py
Classifier_Mixmatch.py
# /******************************************************************************* # * Author : Xiao Wang # * Email : wang3702@purdue.edu xiaowang20140001@gmail.com # *******************************************************************************/ import math import torch import torch.nn as nn import torch.nn.functi...
937388042b36bb5e9b1894648ff710c98feb3ba0
f433e231142e95828135727c48ec9e5bb8edd81d
/src/cifar100/data_utils.py
14db8cc0e838638ae3edcd2091c00cbedc66bb24
[ "Apache-2.0" ]
permissive
xianyafu/enas
70f584c7a52a49475abfeb8b564e4208aaec81ec
52a817a7408c8272b43ea6da5d8d82884ba9af33
refs/heads/master
2020-05-20T10:04:05.842605
2019-06-04T03:21:34
2019-06-04T03:21:34
185,517,325
0
0
Apache-2.0
2019-05-08T02:59:17
2019-05-08T02:59:17
null
UTF-8
Python
false
false
5,858
py
data_utils.py
import os import sys #import cPickle as pickle import pickle import numpy as np import tensorflow as tf class StrToBytes: def __init__(self, fileobj): self.fileobj = fileobj def read(self, size): return self.fileobj.read(size).encode() def readline(self, size=-1): return self.fileobj...
cbedb2de334fa6cd96ab677232634964fdc9f60a
ddf1e274d57c18420efdecda313769999c07799e
/conta/migrations/0001_initial.py
ee5ea77905a4f676e601ab39f6e4c3b4d0a58977
[]
no_license
Mhsp990/SigorUnivasfDjango
9a8a1fe2829d7452f7f72d8cf4df7b66ff930064
bbe47e1611ce27f7a0c6faab175021dabe24675d
refs/heads/master
2023-05-10T08:56:18.788536
2021-06-14T00:02:56
2021-06-14T00:02:56
376,642,018
0
0
null
null
null
null
UTF-8
Python
false
false
903
py
0001_initial.py
# Generated by Django 2.2.5 on 2021-06-07 22:43 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Conta', fields=[ ('id', models.AutoField(au...
ace2cab0fb53431c203abd6d2f209f525d5337c8
f29eced3edb8df2ad975f2f0fc1807cf24bd0fac
/yuv2rgb/yuv2rgb.py
671ae99e2dcd3590fcd978ff851d712fa0bde807
[]
no_license
adastimes/code
abe6a0af8b609d52a10905bc3b7c8c428ba02a61
e55e1e5a5e31dc2d9ad3f59b53fe8d2008c6dedf
refs/heads/master
2023-03-19T20:44:31.021220
2021-03-11T06:30:52
2021-03-11T06:30:52
326,248,793
0
0
null
null
null
null
UTF-8
Python
false
false
6,673
py
yuv2rgb.py
from PIL import Image import numpy as np import os import ctypes import numpy import glob # find the shared library, the path depends on the platform and Python version libfile = '/mnt/nvme/adas/code/ctypes/build/lib.linux-x86_64-3.8/yuv2rgb.cpython-38-x86_64-linux-gnu.so' # 1. open the shared library yuvlib = ctype...
c43058ca6032ba5b15dd4a72d08b0922d217be37
f42a0fe90c44c7a4adec36ad9519137fd64f20b0
/search_normal_incidence.py
6ed479f8aef578e358846536d57e5468bb87d3de
[]
no_license
lixx11/coreshell
9066428a4ee9dc7043eda75252b7ef4b64999023
37535389d4a1f08de5e916ebc08474e92322167a
refs/heads/master
2021-01-11T15:18:42.064308
2017-04-30T05:55:43
2017-04-30T05:55:43
80,326,558
0
0
null
null
null
null
UTF-8
Python
false
false
2,519
py
search_normal_incidence.py
import numpy as np import scipy as sp from scipy.signal import argrelmax from util import * import matplotlib.pyplot as plt import glob import os def get_all_pairs(array): assert len(array.shape) == 1 array = np.sort(array) pairs = [] for i in range(array.size): for j in range(array.size): ...
7076a637b45148af6740844ac690cb8f19846b66
86ff54f6171e3d513cc833efc486adad6a78b29a
/compare_vcf.py
49befd4bfa6463bca078cdb947f993cbb534d49d
[]
no_license
alisonparedes/homoeolog_assembly
768a6f4a25079c2136f60700adc3fe87d14e7434
0b928c92e8648ce6fbddd34999aca699092ae5f4
refs/heads/master
2021-04-29T17:31:39.986759
2018-05-15T19:56:55
2018-05-15T19:56:55
121,671,528
0
1
null
null
null
null
UTF-8
Python
false
false
3,589
py
compare_vcf.py
import argparse import re import sys def vcf_reader(vcf_file_name=None): if vcf_file_name: with open(vcf_file_name, 'r') as vcf_file: for line in vcf_file: vcf = parse_vcf(line) if vcf: yield vcf else: for line in sys.stdin: ...
5bebf856e9b778863db78e95457fd227f2820149
15e7d52d7c6c61fe9173ac7ae038b73073d9ebea
/data_service/db_util.py
966765497affa8d91e67567292e9e916e7fb9a5e
[]
no_license
SmartRiver/python
4e81d867ee44f3776c6ad216d56d3c9c4982337f
4b90c8f31ebc71df907ff47dbb964c0f9d4d0bc9
refs/heads/master
2021-01-21T04:30:39.339351
2017-07-10T06:12:19
2017-07-10T06:12:19
50,099,716
3
4
null
2016-05-13T16:30:20
2016-01-21T10:21:08
Python
UTF-8
Python
false
false
2,250
py
db_util.py
# -*- coding: utf:-8 -*- import pymongo from pymongo import MongoClient import logging import logging.config __author__ = 'xiaohe' __doc__ = '''this py file is the collection of those operation functions or methods used in db''' global db_logger # db logger '''日志配置''' def logging_conf(): try: global db...
82de8ebf6531b9ea113748bdb92e27a8977e792c
6a7d8b67aad59c51dafdfb8bcffd53864a3d65b0
/LeetCode/rotateString.py
42de5a60f5a95e3ecef2a8771c952ea3b8462917
[]
no_license
dicao425/algorithmExercise
8bba36c1a08a232678e5085d24bac1dbee7e5364
36cb33af758b1d01da35982481a8bbfbee5c2810
refs/heads/master
2021-10-07T08:56:18.030583
2018-12-04T05:59:17
2018-12-04T05:59:17
103,611,760
0
0
null
null
null
null
UTF-8
Python
false
false
347
py
rotateString.py
#!/usr/bin/python import sys class Solution(object): def rotateString(self, A, B): """ :type A: str :type B: str :rtype: bool """ if len(A) != len(B): return False return B in A+A def main(): aa = Solution() return 0 if __name__ == "__ma...
cdf3202320c800433ac3ecb13687ecee8034a7a5
cd68b7361b02fb4cdfe8e0c80fb9e0be6169b9a1
/text_class_ch/word2vec.py
8e15fe5115e7efbe6f0e07813afffe1898670631
[]
no_license
xlzhu92/playground
206488149cd3b6c6583fa2da60095c2bf6b55eb9
4feb65a2b86d63d072026aa7af73d8d9bbdc5528
refs/heads/master
2021-09-04T05:31:27.496372
2018-01-16T09:46:40
2018-01-16T09:46:40
115,188,423
0
0
null
null
null
null
UTF-8
Python
false
false
1,183
py
word2vec.py
# -*- coding: utf-8 -*- import gensim import jieba import pandas as pd import numpy as np from keras.utils import to_categorical from sklearn.preprocessing import LabelEncoder,OneHotEncoder from keras.preprocessing.sequence import pad_sequences import multiprocessing np.random.seed(7) train = pd.read_csv('origin_dat...
b5db051e20fa0d911d37db41efc421e562404f53
5b3d4b629f8f73e3dcb519da5a6c4a734013c58a
/key-schedule/keySchedule.py
6e94c121895416832c1d3d444cc3632f55c1977d
[]
no_license
jdavidpm/cryptography-basics
e7daa7a6bcd2c91e93833aad3a3b9a71d92b2dff
74a6447108380e9f2de9d696f02fbce32563218a
refs/heads/master
2023-04-21T06:07:17.722812
2021-05-16T19:31:48
2021-05-16T19:32:22
367,968,948
0
0
null
null
null
null
UTF-8
Python
false
false
1,812
py
keySchedule.py
from bitstring import * arrPC1 = [57, 49, 41, 33, 25, 17, 9,\ 1, 58, 50, 42, 34, 26, 18,\ 10, 2, 59, 51, 43, 35, 27,\ 19, 11, 3, 60, 52, 44, 36,\ 63, 55, 47, 39, 31, 23, 15,\ 7, 62, 54, 46, 38, 30, 22,\ 14, 6, 61, 53, 45, 37, 29,\ 21, 13, 5, 28, 20, 12, 4] arrPC2 = [14, 17, 11, 24, 1, 5...
1fa0e8c99c858342e718145149df5dc20dd73676
49c688f2980c06151d015d9043f0fe9763310b5b
/test/game/test_tree.py
876e46e13e5a0ebf79c490cb8401bfaffb69b0ae
[ "MIT" ]
permissive
JialianLee/PokerRL
1ebb2d31450998edc0f182da0f601ce92aebd23a
ad999da166e0ccf5ae0f853a1c8ea5995ba01841
refs/heads/master
2022-11-11T04:45:10.420758
2020-06-28T00:06:41
2020-06-28T00:06:41
275,465,124
1
1
MIT
2020-06-27T22:44:07
2020-06-27T22:44:07
null
UTF-8
Python
false
false
4,904
py
test_tree.py
# Copyright (c) 2019 Eric Steinberger import unittest from unittest import TestCase import numpy as np from PokerRL.game._.tree.PublicTree import PublicTree from PokerRL.game.games import StandardLeduc, DiscretizedNLLeduc from PokerRL.game.wrappers import HistoryEnvBuilder class TestGameTree(TestCase): def t...
3ea5b0029c0adcf9c9e98f314cbe61cd2ed92b9b
682a90f98860b88425fa6d5714eceb3ae824dfb6
/test_boost_svm.py
6ab6e0e463013ea79379c452c4f09ee7afea8ac6
[]
no_license
yy642/Trumps-Tweets
544016f4ad5048b1d497d2491f3514f1e70eafa0
47a57250fb56eb6e94a257e405d9c4e5a1444333
refs/heads/master
2020-04-07T05:25:36.015051
2019-09-01T18:22:42
2019-09-01T18:22:42
158,096,213
1
0
null
null
null
null
UTF-8
Python
false
false
927
py
test_boost_svm.py
import numpy as np #from CART import boosttree, evalforest from dataloader import splitdata from boosting_kernal_svm import evalboostingSVM,boostSVM from kernel_svm import dualSVM extractfeatures = 'one_word_bag' feature_value = 'simple' B = 512 eps = 0.1 trainSet, valSet, _ = splitdata(['val'], extractfeatures, feat...
e99d6fd6d7915ac2be29d1e4f687bb53f90efaf1
951232d4fada05abce23a0a0f6e4338d656e428f
/user/views.py
9fa832a653f7457fa2c01c92c1e4dedb889a6b4a
[]
no_license
DevRyu/Toy_ShoppingBoard_Django
dbd35cbc21df7a341dd935ce39ffb205e9613c85
4c34fec553b7b99cc0403fd2040febcf46217ec2
refs/heads/master
2020-07-19T17:02:30.747664
2019-12-22T14:08:41
2019-12-22T14:08:41
206,484,002
0
0
null
null
null
null
UTF-8
Python
false
false
1,740
py
views.py
from django.shortcuts import render, redirect from django.views.generic import DetailView from django.views.generic.edit import FormView # 폼뷰를 가져온다 from django.contrib.auth.hashers import make_password from .forms import RegisterForm, LoginForm from .models import User def index(request): return render(request, ...
8da7b6abdbe05603933f563f1a4826772c59cfd9
e8f28b323d0911cac4ae6464b25f1fcabf23240a
/aethez/main.py
a9f48700b73ee499e3f73db51bec4726149d839d
[]
no_license
Mrmatiiii/tf2-utils
f9b2829b5df6cafa35ab495b648c58c5c043a2a9
a97a3de9e7d2bc713206572d2e4f20ee599f2214
refs/heads/master
2020-05-09T06:36:38.707436
2019-03-22T18:38:45
2019-03-22T18:38:45
null
0
0
null
null
null
null
UTF-8
Python
false
false
366
py
main.py
import requests import json r = requests.get('https://api.aethez.me/tf2/currencies').json() def get_key_price(r): return r['currencies']['key'] def get_time(r): return r['time'] if r['success'] == "true": #aethez fix this now print(get_key_price(r)) print(get_time(r)) else: print('Wrong response...
68fe53093e03ab843367b48f401b92880bd003b8
45b5e4059e60d6796e0107ea213ceafc844f51fa
/packages/Common/process_usermgr.py
4c0c59d9ae17264a8aede91134bc37c88fce38e9
[]
no_license
ddayzzz/Appointed2-Server-Redesign
4bf6b635c626d257d9b725c69bd5c6bc4e4891ac
026d129f4a4c7d6be1a3e53f33473760dbf7a695
refs/heads/master
2020-03-15T04:08:45.231576
2018-06-15T15:46:15
2018-06-15T15:46:15
131,958,603
0
0
null
null
null
null
UTF-8
Python
false
false
4,803
py
process_usermgr.py
# coding=utf-8 __author__ = 'Shu Wang <wangshu214@live.cn>' __version__ = '0.0.0.1' __all__ = ['create', 'authenticate', 'signout', 'cookie2user', 'user2cookie' ] __doc__ = '提供基本Appointed2用户管理' from packages.Common import Models import re import hashlib from aiohttp import web import json import time from packages imp...
a93fd99d2daa4d8e7aacdcd1a51b08ea9d278188
93257df2ef5c66ac6919c47e4f2c5b13ac256cf8
/coding_dojo/algos/chapter1_fundamentals/jan-26-2018/poor_kenny.py
fb4ca3832806f0c002f6c58291f92054d73e9c8d
[]
no_license
sindhugudivada/algorithms
3f26a9fb3995db1b812881235efade8838781ab9
cf7943e5ec3fbb9c508c50aad1a0db87ade21014
refs/heads/master
2018-11-04T11:14:58.421025
2018-09-08T01:32:04
2018-09-08T01:32:04
120,232,721
0
0
null
null
null
null
UTF-8
Python
false
false
414
py
poor_kenny.py
def whathappentoday(probability): if probability <= 0.10: print "volcanos" elif probability >0.1 and probability <= 0.25: print "tsunami" elif probability > 0.25 and probability <= 0.45: print "earthquake" elif probability > 0.45 and probability <= 0.70: print "blizzards" elif probability > 0.70...
b641ee127513457d8f1c398634b7aa0c5a936e9e
27dd33362ea9c723db275f2710cb46cdaeb15ed9
/src/duqtools/sync_prominence.py
9e39988d0c168ec7e1c59de58517a7b55a23d5f0
[ "Apache-2.0" ]
permissive
duqtools/duqtools
5697a95115e35b1a9a5265db016b3f1bb1843d04
22dfd35887044e28bff17bfcbeb2641b7cad756f
refs/heads/main
2023-07-29T11:20:49.700565
2023-07-12T13:26:37
2023-07-12T13:26:37
492,734,189
9
2
Apache-2.0
2023-09-14T14:09:28
2022-05-16T07:50:18
Python
UTF-8
Python
false
false
1,573
py
sync_prominence.py
import os import subprocess from .config import Config from .models import Job, Locations from .operations import add_to_op_queue, op_queue @add_to_op_queue('Getting data', 'job {job.path.name} from prominence') def get_data_from_prominence(job: Job): with open(job.lockfile) as f: prom_id = f.readline()....
fccbce4dc0d5b3f4c25b88b28bcdaeb051fa3238
c8dbd04d798187eb93497cd6bbd4ed3b8a4d2d0d
/Vorbereitung.py
f118a1df66f78326d6423bbb8d4d2a16291728d0
[]
no_license
yifei55/FEM-Praktikum-Code
2cd04fca01ab069c62ef651bb2ef327ba5aedbee
f6475e437b97284f0c5d6238e4213af41d2328ca
refs/heads/master
2022-08-06T15:52:56.692729
2016-07-04T13:49:23
2016-07-04T13:49:23
null
0
0
null
null
null
null
UTF-8
Python
false
false
646
py
Vorbereitung.py
import numpy as np Se = np.array(([1, -1], [-1, 1])) def stiffness_matrix(e_num, N_num): # calculate the dimension of stiffness matrix S_num = e_num * N_num - e_num + 1 S = np.zeros((S_num, S_num)) for e in range(e_num): el = (N_num - 1) * e for i in range(N_num): for j in ra...
e4fd5dc6733f153daa2b523ca29c3c4e096b74be
86cf9b729cef0a91879a54a3cdd0071650d69d71
/MD5check.py
efe2ba294db4c089b033fba49b74ba28dc89e770
[ "MIT" ]
permissive
TongjiZhanglab/wwang_bioinfo_tools
beaf46186298750c176df14349e4cee7c18316b1
4fcd05328e09b2f8e0153898eb75e608befc01c0
refs/heads/master
2023-05-12T00:02:52.983717
2023-04-22T00:42:14
2023-04-22T00:42:14
232,345,378
0
0
MIT
2021-04-01T05:39:14
2020-01-07T14:44:22
Python
UTF-8
Python
false
false
4,586
py
MD5check.py
#! /usr/bin/env python3 # Nov-1-2018 # MD5 auto check on server import subprocess import sys import threading from distutils.spawn import find_executable from optparse import OptionParser def prepare_optparser(): '''\ Prepare optparser object. New options will be added in thisfunction first. ''' us...
ab8231640f3d4e287d0852819a1d2f20585912e6
63870f39c2fd700e5474247a4dfc3cb7cbfea7ac
/border.py
489a1957ffd0cdc5a02a31c383d46f2ee2b88137
[]
no_license
DaviPMello27/PythonImageProcessing
2616e306a79d0d26c7af5106ee0110b6e7bd1d3d
c348cf1a38880a76ddb3e8a8edd3cfbbc21e5df3
refs/heads/master
2020-08-23T14:15:59.250354
2019-11-08T20:49:10
2019-11-08T20:49:10
216,636,278
0
0
null
null
null
null
UTF-8
Python
false
false
565
py
border.py
import matplotlib.pyplot as plt import numpy as np import cv2 def showImage(title, image, pos = 111, effect = None): plot = plt.subplot(pos) plot.set_yticks([]) plot.set_xticks([]) plot.set_title(title) plot.imshow(image, cmap = effect) img = cv2.imread("img/anime.jpg") img = cv2.cvtColor(img, cv2...
0afb137e69e326c44448dbf00bbc98b2051c12c5
ca7aa979e7059467e158830b76673f5b77a0f5a3
/Python_codes/p03805/s408970133.py
bcd4dab17bce08b7de63da710e780671f239f1a1
[]
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
421
py
s408970133.py
from itertools import permutations as per n,m = map(int,input().split()) g = [[] for _ in range(n+1)] for i in range(m): a,b = map(int,input().split()) g[a-1].append(b-1) g[b-1].append(a-1) ans = 0 for l in per(range(n)): if l[0] != 0: continue flag = 1 for i in range(n-1): if l...
bcd63aef48e858214ac2b23ec8143b2b7fd7a8d6
864d684500ded8a36577349225927e33f1958f58
/hello.py
8190260d09e9a1509f1909addbafaae4bcedee97
[]
no_license
Quarte1/git_sublime
ec0c34b0fc9f78b0b2106934b13fbd35b1b80fa7
15be6245bd748e49c6e737cd97f4b0158069bd04
refs/heads/master
2020-04-16T01:40:17.305265
2014-11-27T07:46:40
2014-11-27T07:46:40
null
0
0
null
null
null
null
UTF-8
Python
false
false
40
py
hello.py
print "Hello Miku" print "Github world"
eabfcf91e669e5d3ca39c4997f28cea4f8ceb90a
8997db4f63fbe785d3869217afbe7f8699b7a047
/study/utils.py
d0c13f911a01eb4a78e4eaa7cb09869f0eeb82dd
[]
no_license
pythauresk/mixkmeans
41726963e24245a9222db7d85454f197760a7633
04af4050569e59c82f3b1aad07bc6103adc7eb5f
refs/heads/main
2023-08-11T05:25:14.749314
2021-09-03T21:47:37
2021-09-03T21:47:37
351,788,086
0
0
null
null
null
null
UTF-8
Python
false
false
2,404
py
utils.py
import pickle from scipy import sparse import numpy as np from mixkmeans.mixkmeans import MixKMeans from mixkmeans.distances import composite_distance def update_model(mkm_object): """ Set an object MixKMeans for use of predict() method model was save as a pkl file and we use prototypes this functio...
bc6223fa3ced046664c3197ff7946de74a99c7c0
f1a646f038b13ae470fc5880c18cfbcac4e43d19
/src/task.py
a261cc2f8787df090338d8d4094a41c6747fc4a5
[]
no_license
titoffag/diploma
afca47482866c1b54e8d54f297fc389f6fac6e6a
22f34468b3534e1b99ae6400fad977e8d69a6fe1
refs/heads/master
2020-04-29T20:08:41.572490
2019-06-16T19:11:05
2019-06-16T19:11:05
176,376,213
0
0
null
null
null
null
UTF-8
Python
false
false
5,383
py
task.py
import db import plot import utils import numpy as np from sympy import integrate, symbols from scipy.optimize import fsolve from scipy.integrate import odeint from scipy.interpolate import make_interp_spline, BSpline # константы alpha1 = 1.5 alpha3 = 1.5 end_time = 9 # интервал (1.5, 3.7) с углами в 50 градусов # ин...
d9de6c6d8843b10057a4d2f7e4f57149c14b5973
a9f38e4e97877148cf7e352c685c713a17247a36
/test.py
6819973a226503e5ec9d309bf3810b5cfb85d2ed
[]
no_license
iStar-s/baostock_builder
a2dca02e194942b5ae2e0a8f53b441c11a8d06dd
a90848f864399f177389c172971f6e335f80def0
refs/heads/master
2023-02-15T08:29:02.041260
2021-01-13T00:46:08
2021-01-13T00:46:08
290,741,898
0
1
null
null
null
null
UTF-8
Python
false
false
865
py
test.py
from create_index import create_index as ci import threading def loop(self,fff): return fff def my_thread(self): ss = threading.Thread() if __name__ == "__main__": # ci().plot_index(["hs_300","sz_50","zz_500"]) ci().plot_industry_index(["计算机","银行","汽车"]) # "食品饮料","交通运输","休闲服务","传媒","公用事业","农林牧渔",...
7950022c41084b644e8f9defa1894b63d2f87a2e
6254e066188c57ed2b7b807100142fc3c31717d7
/src/gui/migrations/0010_auto_20190821_1023.py
e5e3a1b372dd52a1c470c0f098c27739feb558f7
[ "MIT" ]
permissive
digitalfabrik/ish-goalkeeper
64540fb6978d7b4bdf913fbc9aa6b78ea10ef052
3e204dd6e3703483266d08a37d94c08525b3ef9e
refs/heads/master
2023-08-18T21:38:18.077886
2023-08-10T08:06:34
2023-08-10T08:06:34
185,191,491
13
0
MIT
2023-07-12T07:49:52
2019-05-06T12:23:10
Python
UTF-8
Python
false
false
354
py
0010_auto_20190821_1023.py
# Generated by Django 2.2.1 on 2019-08-21 10:23 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('gui', '0009_news_added_by'), ] operations = [ migrations.RenameField( model_name='news', old_name='added_by', ne...
b7ca8d6c3a23b5282f8f32fd6a6ffe73ba397be8
6a063100b5ea8ef19543f77718e3cc28cd9cb7ca
/ADA1/bin/inversion.py
f21536075d5f086eb1025fd5dc81c31d903b7fc4
[]
no_license
bigdig/Coursera
fd9f1b4ab4936f20e4eb0c490ddf2c172f0f1536
22f26045c814c06a47c124beb2a7c4b1b1b1f796
refs/heads/master
2021-01-11T20:18:18.693106
2015-07-01T03:54:01
2015-07-01T03:54:01
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,672
py
inversion.py
# Algorithms: Design and Analysis Part 1, Coursera # Problem 1: Counting the number of inversions in O(nlogn) time # This file contains all of the 100,000 integers between 1 and 100,000 (inclusive) in some random order, with no integer repeated. Your task is to compute the number of inversions in the file given, where ...
838c5f9221290ba408edd899228b1399f4553d99
b3ebed1d1d2d0b51498a98ba187f8693ed8e049f
/COMP9318-Lab5_new/submission.py
cafcb2aea5cbf6e21ccb1f7c1faaa293f159d1ea
[]
no_license
lindsay-unsw/Data-Mining-and-Warehouse
17e68fbedc883a253e52e8b76a13697a08f26222
59b408ed9ebc463e35ebbe372ae6e31c74ed1d6c
refs/heads/master
2022-02-20T16:08:22.773056
2019-08-15T08:44:46
2019-08-15T08:44:46
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,272
py
submission.py
def spectral_clustering(G): # do not change the heading of the function import numpy as np import networkx as nx from networkx import laplacian_matrix import nltk import random #print('hey') L = nx.laplacian_matrix(G).todense() nodes = [] for i in G: nodes.append(i) #prin...
bc94327c47337b1f3c583563bbeb0ff44528d12c
b9aa2a6dfc114ec6f28afc29c7fcfc7edd5786fe
/trainingRL.py
8a1567c853027fd6c5e845b74c9f8a37f7015d96
[ "MIT" ]
permissive
phraust1612/MinervaSc2
0f2634affda0ab87016a2cd6197ecf6c7afa10c0
3d2b7082fc797c1e1ce0572b2e69a6db33a6184a
refs/heads/master
2021-01-18T08:06:57.007293
2017-08-29T07:32:11
2017-08-29T07:32:11
100,353,904
16
5
null
null
null
null
UTF-8
Python
false
false
8,622
py
trainingRL.py
import tensorflow as tf import numpy as np from pysc2.env import sc2_env from pysc2.lib import actions as actlib from pysc2.lib import app from collections import deque from typing import List import random import minerva_agent import dqn import sys import time import gflags as flags import psutil import resource FLAGS...