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
c9ace9c8e09f6125eea357a9ea259c43833edac6
1007214e4bd6ae7e477b8bc9c253f082e95bcf05
/front_ops.py
15209e52ba8416fc39486b06c2c069993564c0c0
[]
no_license
TimothyLinDev/SFU-CMPT474-Database-Project-
18775a9189c9a1683a1ac3bfb950a5c50d224ee1
8a8d916e675869a63756539f18af015d19a8c865
refs/heads/master
2021-11-25T02:47:02.778251
2016-08-07T19:02:32
2016-08-07T19:02:32
null
0
0
null
null
null
null
UTF-8
Python
false
false
10,395
py
front_ops.py
''' Ops for the frontend of Assignment 3, Summer 2016 CMPT 474. ''' # Standard library packages import json import os # Installed packages import boto.sqs # Imports of unqualified names from bottle import post, get, put, delete, request, response import boto.dynamodb2 import boto.dynamodb2.table import boto.sqs ...
61eb30a174fb983feb82eebda743e8b1f43c16f4
253c0606a301125e275c81f664bc05963886d796
/views.py
06b6405958320a622bcf2df4f63aaadb0684be49
[]
no_license
ManikaMohapatra/Bank-Note-Authentication
147ef625ea42c86f7d352ae29339d19c12c6d0e5
6dfbed5100476fb69b20129876e5df2112d83b70
refs/heads/master
2023-02-16T15:14:03.681188
2021-01-16T13:54:19
2021-01-16T13:54:19
298,298,861
1
0
null
null
null
null
UTF-8
Python
false
false
565
py
views.py
from django.shortcuts import render from django.http import HttpResponse import joblib import pickle def home(request): return render(request,"Home.html") def result(request): pickle_in=open('classifier.pkl','rb') classifier=pickle.load(pickle_in) lis=[] lis.append(request.POST["...
8c0464552c1b24a8d0839ee14566e66fc27ab018
d0a05fb995f57131ffa3741125d03c032cef1c0c
/Chapter05/coin_change.py
b478ddfc6cca0156fb568c135de86f1c75162783
[ "MIT" ]
permissive
adityashah95/The-Reinforcement-Learning-Workshop
c0f2ad2315d91da4905e7e735d89563431ff1775
6efe78c68379dd27df6ff56846df49eb60ac81f1
refs/heads/master
2022-07-02T00:11:13.354102
2020-05-11T21:51:11
2020-05-11T21:51:11
263,224,746
0
0
MIT
2020-05-12T03:40:31
2020-05-12T03:40:31
null
UTF-8
Python
false
false
1,780
py
coin_change.py
import numpy as np import pandas as pd def count_changes(N, denominations): """ Counts the number of ways to add the coin denominations to N. Args: N: number to sum up to denominations: list of coins Returns: """ print(f"Counting number of ways to get to {N} using coins: ...
5010b3018fca8c1253e049f443a639131d94d6cc
b2fef77e77f77b6cfd83da4ec2f89cbe73330844
/tests/test_set_determinism.py
aab7af10791cc1b7bbc39892a0e4ae6072be6ed7
[ "Apache-2.0" ]
permissive
Project-MONAI/MONAI
8ef2593cc5fd1cd16e13464f927fe563fe3f5bac
e48c3e2c741fa3fc705c4425d17ac4a5afac6c47
refs/heads/dev
2023-09-02T00:21:04.532596
2023-09-01T06:46:45
2023-09-01T06:46:45
214,485,001
4,805
996
Apache-2.0
2023-09-14T15:19:30
2019-10-11T16:41:38
Python
UTF-8
Python
false
false
2,682
py
test_set_determinism.py
# Copyright (c) MONAI Consortium # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, so...
fc6e82655de6bab81ed5bae62bf5aa7f21a26e6b
25ebc03b92df764ff0a6c70c14c2848a49fe1b0b
/daily/20191215/example_monogusa/03hai/cli.py
a092e10ede78ce14f08af4e3bb6442113d59fb09
[]
no_license
podhmo/individual-sandbox
18db414fafd061568d0d5e993b8f8069867dfcfb
cafee43b4cf51a321f4e2c3f9949ac53eece4b15
refs/heads/master
2023-07-23T07:06:57.944539
2023-07-09T11:45:53
2023-07-09T11:45:53
61,940,197
6
0
null
2022-10-19T05:01:17
2016-06-25T11:27:04
Python
UTF-8
Python
false
false
280
py
cli.py
from __future__ import annotations from monogusa import component def hello(db: DB, *, name: str) -> None: db.save(f"hello {name}") class DB: def save(self, message: str) -> None: print("save: ---", message, "---") @component def db() -> DB: return DB()
77327660a929cfd2acfd4e2b905c638a7f6196ed
4caa326ed6cd77b4756e70614f478a423eeb8798
/src/__init__.py
1c2de196ca9384ab4fd005a5b3e5f786a21477c3
[]
no_license
shwiseman/Python_SNePS
8e7b83237b730a5879ea14dc2d655c36d91b2ef3
70b580a4475575164f29686156489ce194277c17
refs/heads/master
2022-11-22T16:30:58.866792
2020-07-17T17:14:35
2020-07-17T17:14:35
273,263,478
0
0
null
2020-06-18T14:42:40
2020-06-18T14:42:39
null
UTF-8
Python
false
false
149
py
__init__.py
# Python_SNePS from .sneps.Network import Network as Network from .snips.Inference import Inference as Inference __all__ = ['Network', 'Inference']
cfacef610b38a5242db60c512d6de213bd426863
d37e0b072f7a448595dbc1b7e9ad474f115f38df
/move_robot_.py
9579c236a648e3d06be649cf637e7cae8287fce1
[]
no_license
prakashece/Trajectory-planning-algorithm
fbf1376817ac7f4a97bf790545e86a39471684e1
ce9bf4f87a9b8146bb824b352142c3a84f7490d2
refs/heads/main
2023-07-31T23:47:53.778416
2021-09-14T18:49:28
2021-09-14T18:49:28
406,469,711
0
0
null
null
null
null
UTF-8
Python
false
false
7,337
py
move_robot_.py
#!/usr/bin/env python import rospy import tf import numpy as np import matplotlib.pyplot as plt from geometry_msgs.msg import Twist from nav_msgs.msg import Odometry from math import pi, sqrt, atan2 import math import csv class PID: """ Discrete PID control """ def __init__(self, P=0.0, I=0.0, D=0.0, D...
b913d947c0d280a9db830a40cca825d4ce4e3c04
3f3b3a08cb56077f94fab9ae5b89c8596fc1457a
/data/data.py
eb9f40bffaf7245167854e95e029071f71f9f609
[]
no_license
guadoc/framework
3efc78fb77af777a3115d90d296808cd7facf474
53e6e1f2dd0b6f133e0d1d971b529daa680ec822
refs/heads/master
2020-06-23T10:06:51.122766
2016-12-19T16:50:36
2016-12-19T16:50:36
74,655,266
2
0
null
null
null
null
UTF-8
Python
false
false
557
py
data.py
import numpy as np class Data: def __init__(self, meta_data): self.size = 0 self.data = meta_data self.dim = [1] def sample(self, quantity): batch = {'inputs':None, 'labels':None} batch['inputs'] = np.random.random_sample(quantity).reshape(quantity,1) batch['lab...
0e73ca7290c8362914c431eb82a688d204562e34
d144d1f0238a80cae6604d6db38aff2fe2f66750
/sdks/python/apache_beam/ml/inference/sklearn_inference_test.py
f1efe73c96cd70d3174b62b0b5296fcc9821bdb4
[ "Apache-2.0", "BSD-3-Clause", "MIT", "LicenseRef-scancode-protobuf", "Python-2.0" ]
permissive
egalpin/beam
9e0aa5d07bb21156bab12d874af0d60d1e0c386c
a1c3d0cd60d686196e8643ebf3eef9816a24b66a
refs/heads/master
2023-08-17T00:25:58.861493
2022-06-08T06:07:37
2022-06-08T06:07:37
229,315,363
0
0
Apache-2.0
2023-09-13T14:46:18
2019-12-20T18:20:38
Java
UTF-8
Python
false
false
6,245
py
sklearn_inference_test.py
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
67a2f44e70b5b21171c9598c9cea95ba4e134273
c6c8de769b1a1376a74410294294d73d740ac5ed
/seisPlotPy/obspyPssac.py
e1fb37853f98358b02038958fb87280dfc02241e
[]
no_license
ziyixiArchive/seisPlotPy
da8f2f6e1599202bddb0ec967ee3364472762169
fc7cc45a1c1c5ebdda407f9353f6b011e7b2c9d3
refs/heads/master
2021-09-26T10:18:07.538149
2018-10-29T03:17:21
2018-10-29T03:17:21
null
0
0
null
null
null
null
UTF-8
Python
false
false
12,570
py
obspyPssac.py
import numpy as np import obspy import obspy.taup from matplotlib.figure import Figure class Pssac(object): def __init__(self, canvas, config=None): self.canvas = canvas self.config = config self.baseurl = "./data/" self._handleConfig() def test(self): # TODO: delete ...
ad6eb5dbc0685fdb814c9170bf4f12972b94ca44
e43ff8f429a6938a4f16edc4b2c94976acbff157
/ABC/ABC 158/b.py
0956bb894276c23019d43f3bc75f921cfd393643
[]
no_license
Soule50431/AtCoder
4fcd6ab6b771d55c90dc62aedd75eb81fd067466
118ac5d03630ce143fb50153402eee38e988ae0c
refs/heads/master
2023-06-18T13:07:13.843361
2021-07-14T01:56:20
2021-07-14T01:56:20
357,827,698
0
0
null
null
null
null
UTF-8
Python
false
false
184
py
b.py
n, a, b = map(int, input().split()) a_b = n // (a + b) left = n - (a+b) * a_b # print(a_b, left) ans = a * a_b if a <= left: ans += a elif a > left: ans += left print(ans)
91e49750928e22ddb674fc23c07aa8d6808eb4d3
b21b7e9da588abfdb6e0ba4c42fc73270124b19e
/01-Qualification/02-Nesting_Depth/solution.py
746e13d50f3615f823b2cb08a6dc8790b71ba3f2
[]
no_license
luispmenezes/Google-Code-Jam-2020
442fc148afc887443807c949a2d76105e7f8a493
655ea66dbf36dbb93e2046d8daf60df5c3b9096b
refs/heads/master
2022-04-10T06:22:46.210862
2020-04-05T11:28:16
2020-04-05T11:28:16
252,834,069
0
0
null
null
null
null
UTF-8
Python
false
false
576
py
solution.py
def main(): t = int(input()) for t_idx in range(1, t + 1): s = input() new_s = "" current_depth = 0 for n in s: new_depth = int(n) if new_depth > current_depth: new_s += "(" * (new_depth - current_depth) elif new_depth < curre...
5ed81ec2ef26431a4eb0f74645017f5d1a1d2400
52c4f6bf665b799c1ee9e9e26253137909fb4536
/pi_image/client/Sensor.py
65fac9956449e70e4da4adbdbe432a53bfa2221c
[]
no_license
symborsk/capstone
c1c923b64b4a71cc86c33a1c7499dde40c336814
d7f6d0ae41b463e2f495896e19972013046ef86c
refs/heads/master
2021-03-24T13:43:01.464646
2018-04-13T05:14:55
2018-04-13T05:14:55
119,416,284
1
0
null
null
null
null
UTF-8
Python
false
false
1,095
py
Sensor.py
############################################################################# # Sensor.py # # By: Joey-Michael Fallone # # Here are the Sensor objects that will be used for SensorSweep to get data # from whatever sensors currently exist. The goal here is to make it easy # to add new sensors in the future, so there ar...
e06a24c646b662e9c10e521f651d89668a56a76f
cdcd811f7ceb17ce66f8c51e786069ac38168def
/scripts/16_thief.py
0e068329dc86846972083a170a9c965ad8d458e9
[]
no_license
buptatx/myPython100Days
54abbd35d54b4463e2e91702ef3a8337ebea0d8e
9f32261b05d164bee3f8b3bb7c925f6b93f7fcf4
refs/heads/master
2020-06-17T06:13:46.794988
2019-10-30T07:27:33
2019-10-30T07:27:33
195,825,713
0
0
null
null
null
null
UTF-8
Python
false
false
1,770
py
16_thief.py
#! -*- coding:utf-8 -*- """ 贪婪法:在对问题求解时,总是做出在当前看来是最好的选择,不追求最优解,快速找到满意解。 输入: 20 6 电脑 200 20 收音机 20 4 钟 175 10 花瓶 50 2 书 10 1 油画 90 9 """ class Thing(object): def __init__(self, name, price, weight): self._price = price self._weight = weight self._name = name @property def price(se...
0929e60b7f36e04f3e4e7d663d2a0dd5c38c8a95
9f682c3b6880c1683b5b7d2fa16b7f2f82398da9
/남수경/0822/그래프경로.py
8f4709f8470d99746dfb11904579586a779ff302
[]
no_license
nsk324/TIL
f5c132ed377cbed4e40889a1668d8e91c1ec44cc
55438d5db02ea7b080ef621bb17b0ba9a75fe27a
refs/heads/master
2023-01-11T21:42:24.899763
2019-11-29T05:29:29
2019-11-29T05:29:29
195,937,996
1
1
null
2023-01-07T21:53:36
2019-07-09T05:22:45
Jupyter Notebook
UTF-8
Python
false
false
778
py
그래프경로.py
import sys sys.stdin = open("그래프경로_input.txt") def dfs(v): visited[v] = 1 # print(v, end=' ') for w in range(V+1): if G[v][w] == 1 and visited[w] == 0: # 현재 v와 연결되어있으며 방문한 적이 없는 w에대해 dfs(w) # 불러오쇼 T = int(input()) for tc in range(T): V,E = map(int,input().split()) #노드, 줄의 갯수 ...
993167c14798e9532e57e0c53d12de747aa6707b
b9acd96ae46809772bbe4f58c6af954103e579e4
/aula19/ex019.py
10590185228d4447b57faa87b5a0ef7d4f67a7e8
[]
no_license
AlissonSantana/curso_python
51ff5cd657cd3d349706fcda348593272b6ac46a
3fb0382c926f1d25dbaac454b2eea3e69de0c986
refs/heads/master
2023-03-04T14:19:44.423934
2021-02-20T21:31:40
2021-02-20T21:31:40
279,724,172
0
1
null
2021-02-20T21:21:50
2020-07-15T00:40:08
Python
UTF-8
Python
false
false
2,491
py
ex019.py
from random import randint from operator import itemgetter pessoas = {'nome': 'Gustavo', 'sexo': 'M', 'idade': 22} pessoas['nome'] = 'Jose' pessoas['peso'] = '90.5' print(f'Seu nome é {pessoas["nome"]} e sua idade é {pessoas["idade"]}') print(pessoas.keys()) print(pessoas.values()) print(pessoas.items()) for k in pess...
d65b5cefbe4e801e804c2cdf0a304faf9d0a37b5
4d51a7caa3db73ba74e6e00b9a1b51494b866b75
/core/models.py
42df03daf88830655d1a3ef6448af73c932a3deb
[]
no_license
ramm8469/QuizApp
69688d8e9828f0dcee32d88eeafb9e03da85ccab
e09117e2eae4c0c3af7d46fd91897ac24bc6b0c0
refs/heads/master
2022-12-16T17:45:23.293906
2020-09-23T13:31:12
2020-09-23T13:31:12
297,980,392
0
0
null
null
null
null
UTF-8
Python
false
false
3,663
py
models.py
from django.db import models from users.models import CustomUserModel # Create your models here. class Questions(models.Model): question = models.TextField(max_length = 300) option_1 = models.CharField(max_length = 30) option_2 = models.CharField(max_length = 30) option_3 = models.CharField(max_length...
fb4e7d799e2b5d8cd9105811a829baf4a350e7d8
7a388c5a6bd087e47ce7a2f5d40b13b6d645dcdc
/app.py
20c0d9875d883b1e7ce0005d507d5be28a8c5916
[]
no_license
pwilson802/covid19nsw
741937884cb957f12c4ed7efcfa996e8709bda0e
9c848624975d1b8cb72e57b951fcbfa73dd6ef22
refs/heads/master
2022-12-21T14:12:03.899832
2021-12-04T02:29:58
2021-12-04T02:29:58
253,496,893
0
0
null
2022-06-22T01:43:21
2020-04-06T12:52:51
JavaScript
UTF-8
Python
false
false
11,332
py
app.py
from flask import Flask, render_template, request import json from datetime import datetime, timedelta import os.path from difflib import get_close_matches from maps import popup_html, all_map, remove_bootstrap3, random_map_name app = Flask(__name__) data_folder = os.environ.get("COVID_DATA") today = da...
88d6268ac8524cace84e740c0a64331f34324e7c
dbc3d71d121fb5278ada2f718e868dc6a758f7df
/message/views.py
75ba2ffe5dc4469a73338dae94a9fd2881f00959
[]
no_license
whiteath/ours
45dd8aa69ecc25fdc98d93efb85584498fca49f4
0373ff105b82f545e2ca895693614eac5593cb0c
refs/heads/master
2021-01-19T05:36:27.896974
2014-10-10T12:25:23
2014-10-10T12:25:23
null
0
0
null
null
null
null
UTF-8
Python
false
false
698
py
views.py
#coding:utf-8 from django.shortcuts import render from django.http import HttpResponse from message.models import Messa from django.core.context_processors import csrf from django.contrib.auth.decorators import login_required # Create your views here. @login_required def home(request): if request.POST: sub...
2961c341bd6a85f8a7819593adc49fceadff9628
048d079e724b5b0e2aee7f6121f0308d889e8e9c
/pythonTest.py
e9f6391ee82279a23ab8b1cc3095693c3d70332f
[ "MIT" ]
permissive
ken-kun/udpSocketServerSolution
decee385a2dd367c5b74111b3bd2d48d7c3669e9
4edabb7764e6faada3322f46162c7a3cebaf718f
refs/heads/master
2020-12-27T20:56:40.641279
2020-02-10T20:20:43
2020-02-10T20:20:43
238,051,298
0
0
MIT
2020-02-03T20:05:34
2020-02-03T20:05:33
null
UTF-8
Python
false
false
289
py
pythonTest.py
x = {} x['hello'] = 'goodbye' x['Kevin'] = 'hello world' x['players'] = [] player = {} player['id'] = 12345 player['name'] = 'Galal' x ['players'].append(player) player = {} player ['id'] = 54321 player['name'] = 'Kevin' x['players'].append(player) print (str(x)) print (x['players'][1])
9e407e71513bcbb22b06866bd45f0607180f6a55
38b034516b6533615a65caea8e47c6af5399e378
/Prediction of Number of orders/app.py
4a08096688fde95359616a6726086eb91aed7a03
[]
no_license
hichamabc/End-to-End-ML-app
aa1e3128c66ba7e3b7107233884880ae154131ea
a7a6785eb9c47ad0492641b8d9c7a1d9a7485480
refs/heads/main
2023-07-31T19:14:57.060439
2021-09-07T13:22:47
2021-09-07T13:22:47
403,631,450
0
0
null
null
null
null
UTF-8
Python
false
false
1,445
py
app.py
# -*- coding: utf-8 -*- """ Éditeur de Spyder Ceci est un script temporaire. """ from flask import Flask, request, jsonify, render_template import pickle import pandas as pd import json import numpy as np from MyModel import My_Model app=Flask(__name__) model=pickle.load(open('Model_V_2.sav','rb')) ...
e1aa1043ee964fc37ae9249df60c96fc3653d762
f2c1c86b1eedf46e62834644758a44e16dde6119
/keepercommander/plugins/plugin_manager.py
72206254bd9f20bf8276e7732250ffcc82160906
[ "MIT" ]
permissive
Keeper-Security/Commander
8ba7e3dbe2a75ca524546e0714ed180c714a01e2
06cb3af20a5c115b09d7276d5f618545278e5351
refs/heads/master
2023-08-30T19:28:58.166103
2023-08-25T19:17:36
2023-08-25T20:14:29
41,707,343
201
90
MIT
2023-09-11T19:05:15
2015-09-01T00:19:47
Python
UTF-8
Python
false
false
7,818
py
plugin_manager.py
# _ __ # | |/ /___ ___ _ __ ___ _ _ ® # | ' </ -_) -_) '_ \/ -_) '_| # |_|\_\___\___| .__/\___|_| # |_| # # Keeper Commander # Contact: ops@keepersecurity.com # import importlib import logging from urllib.parse import urlparse from . import noop CONVERT_KWARG_TO_INT = ('port', 'length...
16bf03747b5fe07a3fad51ab65432543d40b5087
6de05800f20f2b883f3dfb2acf359ea10c860f4c
/5_math/easy/171. Excel Sheet Column Number.py
5113a33b106a60ff27bf4a55602308aa8c2a7ffc
[]
no_license
Jerrydepon/LeetCode
8d505608efeeb98ca81f9a72af278853e52c408a
93c4712779d3631adca1f40004f2ed9ee4fad766
refs/heads/master
2020-05-25T19:24:28.415969
2019-10-26T23:39:49
2019-10-26T23:39:49
187,950,378
0
0
null
null
null
null
UTF-8
Python
false
false
421
py
171. Excel Sheet Column Number.py
# similar to normal decimal calculation but use 26 as base # ord() class Solution: def titleToNumber(self, s: str) -> int: res = 0 for i in s: res = res*26 + ord(i)-ord('A')+1 return res # s = s[::-1] # c = 1 # out = 0 # for dig in s: ...
d20a7a9d68b97dffda5c2bcb05188b9c7a6c357b
5ef6c8d47864f471e26b9902d61f8c687e941f05
/src/genie/libs/parser/iosxe/tests/ShowL2vpnVfi/cli/equal/golden_output_3_expected.py
ae040e8b3fc1ea94bdb267f5e0585004891de424
[ "Apache-2.0" ]
permissive
CiscoTestAutomation/genieparser
169c196558f1c1a0f0d10650876096f993224917
b531eff760b2e44cd69d7a2716db6f866907c239
refs/heads/master
2023-09-03T08:56:18.831340
2023-08-29T22:32:02
2023-08-29T22:32:02
131,621,824
247
409
Apache-2.0
2023-08-29T22:32:04
2018-04-30T16:51:50
Python
UTF-8
Python
false
false
1,875
py
golden_output_3_expected.py
expected_output = { "vfi": { "vfi-sample": { "ve_range": 15, "ve_id": 1, "type": "multipoint", "bd_vfi_name": "vfi-sample", "state": "up", "bridge_domain": { "30": { "vfi": { "...
38a1a21ac3b8df6a40a2d8a3896846e5c6e6baff
2324dea2cb3003c8ab7e8fd80588d44973eb8c77
/Euler_9_490.py
50f8493b2fe43c0c0b90c3f99ac3a2104996b2b2
[]
no_license
MikeOcc/MyProjectEulerFiles
5f51bc516cb6584732dc67bb2f9c7fd9e6d51e56
4d066d52380aade215636953589bf56d6b88f745
refs/heads/master
2021-01-16T18:45:44.133229
2015-05-27T18:28:43
2015-05-27T18:28:43
5,876,116
0
0
null
null
null
null
UTF-8
Python
false
false
283
py
Euler_9_490.py
from itertools import combinations from Functions import gcd, nCr def T(n): ntmax = n/2 tot = 0 for i in xrange(ntmax): opentiles = n - i*2 c = nCr(n,opentiles) tot +=c print n,i,opentiles, c, 10**opentiles return tot for i in xrange( 2, 10): print T(i)
82506d32f3bd9dccfe5f74ace5193a8e0499884e
5e6f07a7f44a5594b994838898014b99d3af91cd
/1700-1799/1736. 替换隐藏数字得到的最晚时间.py
fb63c81ffcc1a55dd9e87023f4cf52eec76f0cc7
[]
no_license
hangwudy/leetcode
9abf731f76a09e1bd90de7bc66f368a051522676
0528ec312b017a478fa71840adfbb14931703995
refs/heads/master
2022-05-04T02:03:29.903967
2022-03-25T15:09:21
2022-03-25T15:09:21
208,445,602
0
0
null
null
null
null
UTF-8
Python
false
false
872
py
1736. 替换隐藏数字得到的最晚时间.py
class Solution: def maximumTime(self, time: str) -> str: time = list(time) for i in range(len(time)): if time[i] == ":": continue elif time[i] != "?": continue else: if i == 0 and time[i + 1] == "?": ...
1d5c7c1a95c1b9ff1a52b8614f14db7ded95edf6
41083aae45958313cd8af2d48c356dfb298e9af1
/flask_app/models/reg_login.py
944da3e33d66e87788256e40bc023e0731894191
[]
no_license
jmalone801/logInAndRegistration
ad2140621cef567267a586d8dba2d7fcdd78c80b
9ab334b728f40470f9563d1cf83a03381e76729d
refs/heads/master
2023-09-02T12:20:48.066462
2021-11-09T19:22:14
2021-11-09T19:22:14
426,358,009
0
0
null
null
null
null
UTF-8
Python
false
false
2,373
py
reg_login.py
from flask_app.config.mysqlconnection import connectToMySQL from flask import flash, request import re class Registration: def __init__(self,data): self.id = data ['id'] self.first_name = data ['first_name'] self.last_name = data ['last_name'] self.email = data ['email'] se...
cef6436e073d4af87d5e9925131ba4949b4fcac3
7f78d6c5a5aa32368f771ac713dd925bc710c4e4
/exam/Categorical_Feature_Encoding_Challenge/Categorical_Feature_Encoding_Challenge_ml.py
ec39993f279d25013dbfdb1cf219850828f2a251
[]
no_license
wangseop/bit_ai_study
e0ffefd6136ad3babccab760a7054e6f95c8937d
d648699b531edada3766962177c897dbc2a4db3e
refs/heads/master
2020-07-09T11:29:54.419510
2019-09-04T03:13:51
2019-09-04T03:13:51
203,754,389
0
0
null
null
null
null
UTF-8
Python
false
false
6,004
py
Categorical_Feature_Encoding_Challenge_ml.py
import pandas as pd import numpy as np from keras.models import Sequential from keras.layers import Dense, Dropout train_x = np.load('./data/kaggle/categorical_feature_encoding_challenge/npy/train_x.npy') test_x = np.load('./data/kaggle/categorical_feature_encoding_challenge/npy/test_x.npy') train_y = np.load('./data/...
9e56ac6bbe95c603ebadde48d9af1642ebb24388
3843ec9c13ff0331c7ad15aacc06a9bef9b98d77
/burst/proxy/task_dispatcher.py
c4c91c328b63e50bb5c3ce154766347c8afccbac
[ "MIT" ]
permissive
xubingyue/burst
bac138775c55f401bc53e5b374e312fd188251bc
900d80f4aca177d15fd5fa7317f0b568c0934889
refs/heads/master
2020-12-26T08:16:57.766586
2016-03-21T11:57:10
2016-03-21T11:57:10
null
0
0
null
null
null
null
UTF-8
Python
false
false
3,103
py
task_dispatcher.py
# -*- coding: utf-8 -*- from collections import defaultdict from ..share import constants from group_queue import GroupQueue class TaskDispatcher(object): """ 任务管理 主要包括: 消息来了之后的分发 """ # 之所以不用WeakSet的原因是,经过测试worker断掉之后,对象不会立即被删除,极有有可能会被用到。 # 繁忙worker列表 busy_workers_dict = None # 空闲 ...
a1791909aa045bd4b1c3e1f0eaf767f4aba5745c
2c7cd91522440b33f77453893fe413dd973967bc
/hospital/migrations/0003_indexvideo_bg_file.py
3d2c2abe9dea1c6b0cfadd837f48f5adaafd8d4e
[]
no_license
santhosh0209/acsmedicalcollege
6a2bf759acb1d2b261ebaa4aed916f9baaff3030
419ee02ec974616d0146e04fa37fd4384f0c5862
refs/heads/main
2023-03-06T06:02:13.379727
2021-02-19T11:30:00
2021-02-19T11:30:00
340,297,936
0
0
null
2021-02-19T09:57:53
2021-02-19T07:59:59
CSS
UTF-8
Python
false
false
450
py
0003_indexvideo_bg_file.py
# Generated by Django 3.1.2 on 2020-11-24 05:56 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('hospital', '0002_auto_20201124_1125'), ] operations = [ migrations.AddField( model_name='indexvideo', name='bg_file'...
80bb62794df6356423031a3165d21c2c057bdd0e
dcdf9f70001eefdf73bb2aed19a88b3e7e3f85a7
/mediaManager/moviedatabase/models.py
85b1d14556f61e76e360f27d0cef04cf258b4f51
[]
no_license
V3tor/workingTitle
c9be2b0c2b35acb3fc1eefc1ebecedd7148dfee5
591c45f28309e8103bec547c054611575054d188
refs/heads/master
2021-01-10T19:31:32.195682
2013-10-24T07:41:02
2013-10-24T07:41:02
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,274
py
models.py
from django.db import models # Create your models here. class Actor(models.Model): id = models.IntegerField(primary_key=True,unique=True) fname = models.CharField(max_length=100) lname = models.CharField(max_length=100) bdate = models.DateField() blocation = models.CharField(max_length=100) bio = models.TextFie...
0d47945cb4120283573fd8abe347df6a6bf456fc
d06b95c92af6c229ea680af7ed1346133b17657b
/lineas.py
675b0b254d834a338e85957b655462a8a931d02d
[]
no_license
flgomezc/makefiles
defd98c98a8c29f03a5210d9ae24aef44fd42635
822e18af980dce35473f8de7896c82a39d07f6e0
refs/heads/master
2021-01-17T14:40:18.966476
2016-08-02T22:11:00
2016-08-02T22:11:00
51,657,645
0
0
null
null
null
null
UTF-8
Python
false
false
276
py
lineas.py
filein = open ("numeros.txt", "r") lineas = filein.readlines() n_lineas = len(lineas) fileout = open("lineas_1.txt", "w") fileout.write("{}".format(n_lineas)+"\n") fileout.close() fileout = open("lineas_2.txt", "w") fileout.write("{}".format(n_lineas)+"\n") fileout.close()
d775ceb1cfac893c403b90f67cd5568af581be9d
7dd1a4e3c348d0d3d11bc5550be021b00c89e643
/IMAgent/imagent/core/communication/RabbitMQWrapper.py
da85fb68ae51a14b630e74669e3f309596e0d841
[]
no_license
zuiyuemuai/z_imonitor
c770e85f2f4c7c114b5ab3f134c0698b0d7c2d7b
c0f7d08afb1c46d7b150daa2b8f46c15a70058bd
refs/heads/master
2020-06-01T20:03:28.235304
2017-06-12T10:22:35
2017-06-12T10:22:35
94,083,296
0
0
null
null
null
null
UTF-8
Python
false
false
1,173
py
RabbitMQWrapper.py
# -*- coding:UTF-8 -*- """ @author: hzjianghongxiang @date: 2015-01-04 @contact: jhx1008@gmail.com version: 1.0 @todo: @modify: """ import pika class RabbitMQWrapper: def __init__(self, name_="RabbitMQWrapper", host_='localhost', port_=5672, exchange_='exchange', queue_='', routing_key_='ke...
ed2898d5202d638e5e30609d0dd627085fbca784
3a822595372c5393c62481b6d2b0b0d04035499a
/backend/location/api/views.py
53573953a80d9e310a37a7346b3d3ace412b47d7
[]
no_license
dbrucknr/Django-Portfolio-2
1c71b06e8961b0e1da41748b3d58b6903f639c04
74f13a567662855ee1b617688a73b61ea8013dd5
refs/heads/main
2023-05-13T21:27:18.443022
2021-05-16T21:58:04
2021-05-16T21:58:04
367,987,725
0
0
null
null
null
null
UTF-8
Python
false
false
777
py
views.py
from rest_framework import generics from location.models import Zipcode from .serializers import ZipcodeSerializer # Search and Filter zipcode packages: from rest_framework import filters from .filters import DynamicSearchFilter from rest_framework import filters from django_filters.rest_framework import DjangoFilterBa...
c3c3cabead6e00aebde2552208a314d8f5b4d439
16ec928055e0eb9d56914053333fcdbcfa475572
/v1.1/facial_action.py
7b817f6099d48df098c616551d2d63a82b993552
[]
no_license
gbalcantara/eyeSmart_main_process
5298b9b15314d0a5b78643717b1b3eae835a64e1
24a99fef8a42c532e7cb7976ca8801b424c557bd
refs/heads/master
2022-01-05T22:34:58.670135
2019-05-30T15:06:31
2019-05-30T15:06:31
175,216,687
0
0
null
null
null
null
UTF-8
Python
false
false
4,370
py
facial_action.py
""" Classify a few images through our CNN. """ import numpy as np import operator import random import glob import os.path from data import DataSet from processor import process_image from keras.models import load_model from imutils import paths import face_recognition import argparse import pickle import cv2 def main...
0e9d870f6ffadef5f32fcf3e625dacb211054888
2d71c6c9467eb8013119da755b282cd1e336d2cf
/test.py
869e72b311d55e4a859b8b2f4c71b4a78076d876
[]
no_license
Ashok-SMS/SMS
c87c1dda6d0d1bd97aa036f34b6905aa9b90dce5
d6304a317c96a41855a7a69b2cdab31e0bd73577
refs/heads/master
2020-05-16T09:18:37.207706
2020-03-03T17:35:19
2020-03-03T17:35:19
182,944,496
0
2
null
null
null
null
UTF-8
Python
false
false
15
py
test.py
print("ASHOK")
70371c53f6489209fcce1ef749398e382de72682
14d5f9103a1fe7ab42198e880535365d16334f97
/model/transformer.py
671766dfcb775d7da27aaf2dd92e529c60a48982
[]
no_license
LeeKLTW/tf1
a2ee0c0ca953d498568850820daa531ea93c085a
2c934397921ae637e2c964b577130b1705244f58
refs/heads/master
2022-12-11T23:53:11.191380
2019-06-13T04:49:18
2019-06-13T04:49:18
171,241,193
1
0
null
2022-12-08T01:37:27
2019-02-18T08:09:44
Jupyter Notebook
UTF-8
Python
false
false
10,819
py
transformer.py
# -*- coding: utf-8 -*- import tensorflow as tf from tensorflow import keras from tensorflow.keras import backend as K import numpy as np # tf.enable_eager_execution() MAX_WORD = 10000 MAX_LEN = 200 class PositionalEncoding(keras.layers.Layer): """3.5 Positional encoding.""" def __init__(self, dim_k=64, n_h...
2028d4937e3b0479002e01edfcc62b78b04d420e
6a37c9b0d19d9ac6660bf58fc3cc61c7c316d83e
/test/test_water_bot.py
7cd594397667572a99d5de9a0df79afdf13decb0
[]
no_license
ChristianCelora/SlackWaterBot
6be75f96cd66b5f3bee638a2ce8b59fab6370b26
587b788f25fa046801c59ee435e7963bb15f3acd
refs/heads/main
2023-01-20T09:22:01.277750
2020-11-20T12:17:58
2020-11-20T12:17:58
311,610,579
1
0
null
null
null
null
UTF-8
Python
false
false
7,028
py
test_water_bot.py
import pytest from WaterBot.bot import WaterBot, User from freezegun import freeze_time from datetime import datetime, timedelta, time, date # from WaterBot.mongo import MongoConnector # replace with mongo mock from WaterBot.mongo import MockMongoManager # mongo mock # INIT db = MockMongoManager.getInstance() #db = Mo...
2e0c685a23065058b119dddac94966b43c390129
77d22e8eb0d56b406d39417ca3e44186c67fdd2c
/12.07 1.py
e454fa5883547867b86bc18eba9cd7e990f24930
[]
no_license
Sayitkamol/Python_darslari1
38d5ca94d1fcef6bfbec094f3db47ee75b043240
2299c6551115fc76ac5bc21e1439f53b198aa5fe
refs/heads/main
2023-06-24T15:22:49.426947
2021-07-17T06:57:23
2021-07-17T06:57:23
null
0
0
null
null
null
null
UTF-8
Python
false
false
2,110
py
12.07 1.py
# # # # a = int(input('a=:')) # # # # b = int(input('b=:')) # # # # # # # # # # # # def qushish(a, b): # # # # return a + b # # # # # # # # # # # # def urta_arifmetik(): # # # # return qushish(a, b) / 2 #ikki sonning o'rta arifmetigini chiqarish # # # # # # # # # # # # print(urta_arifmetik()) # # ...
60efc2cfacf9791b1f596007ec96cd1535def50d
237d2914b9278b1ae3d126907f03f9399f36cb84
/xmca/tools/text.py
c1df72fa0e5bb215d557ff047c09ff5833dc350a
[ "MIT" ]
permissive
nicrie/xmca
edb52798c22818fc11430e49b3bc3d3b5cb46953
35c166a83b7763743593ae169d9cb7f46f756413
refs/heads/main
2023-07-21T01:24:23.255476
2023-07-07T10:44:43
2023-07-07T10:44:43
278,134,135
48
15
MIT
2022-02-24T15:46:54
2020-07-08T16:00:48
Python
UTF-8
Python
false
false
795
py
text.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ''' Collection of tools for text-related modifications. ''' # ============================================================================= # Imports # ============================================================================= import matplotlib.pyplot as plt import tex...
2a68847a861e35da32a3472cd2bceb7963129d45
24986c881bdbbd3927475aadaaacaacd8ff39fa8
/snmp/dump-mibs/dump-mibs.py
18d23136e2bdebf634eeb68d4a366e5a392db3b8
[ "MIT" ]
permissive
alexanderfefelov/scripts
5f6274610db786b7d6bcb721157ae4be876623f2
8e8f0e66a130a1ac69ef76ddcf4cced169e5a75b
refs/heads/master
2023-07-19T02:33:12.100736
2021-09-22T02:02:44
2021-09-22T02:02:44
285,469,846
1
1
null
null
null
null
UTF-8
Python
false
false
2,339
py
dump-mibs.py
#!/usr/bin/env python3 import os import re import sys from pathlib import Path VENDORS = [ 'Cisco', 'D-Link', 'Extreme', 'Juniper', 'MikroTik', 'NAG', 'NetPing', 'TFortis', 'TP-Link', 'ZyXEL' ] SOURCE_ROOT_DIR = 'mibs' TARGET_ROOT_DIR = 'out/target' LOG_ROOT_DIR = 'out/log' CM...
7300f41cce0771d9d23393bbf5a748768953f8e7
b6bd031b6124cc6163387ad37c1ed968c7130b33
/examples/hello_world.py
a7f876a8df64e092b3c5c7c296d148e8d48c601d
[ "BSD-3-Clause" ]
permissive
hugosenari/simplui
6ffb4f86de0543c320d3faa57b559be5c13c6fba
f06b666614e4606824e5f090583c6c5e03a05aad
refs/heads/master
2021-01-18T13:45:58.710151
2015-09-28T01:01:41
2015-09-28T01:01:41
42,160,806
0
0
null
2015-09-09T06:39:46
2015-09-09T06:39:46
null
UTF-8
Python
false
false
695
py
hello_world.py
#! /usr/bin/env python #insert projet at path import sys from os import path my_dir = path.dirname(path.abspath(__file__)) sys.path = [my_dir + "/../"] + sys.path # import pyglet, as usual from pyglet.window import Window from pyglet.app import run # import simplui from simplui.theme import pywidget_theme from simpl...
c1752e038751dd166ce4b42b515a6a1b2dab4147
321b4ed83b6874eeb512027eaa0b17b0daf3c289
/451/451.sort-characters-by-frequency.233531781.Accepted.leetcode.py
bf76cff8e3b349bcbbbf0be48a6cf3c550125a8e
[]
no_license
huangyingw/submissions
7a610613bdb03f1223cdec5f6ccc4391149ca618
bfac1238ecef8b03e54842b852f6fec111abedfa
refs/heads/master
2023-07-25T09:56:46.814504
2023-07-16T07:38:36
2023-07-16T07:38:36
143,352,065
0
1
null
null
null
null
UTF-8
Python
false
false
323
py
451.sort-characters-by-frequency.233531781.Accepted.leetcode.py
from collections import Counter class Solution(object): def frequencySort(self, s): freq = Counter(s) pairs = [(count, c) for c, count in freq.items()] pairs.sort(reverse=True) result = [] for count, c in pairs: result += [c] * count return "".join(resul...
24f101602f31913ed07d285c1a356e0cfff8a705
11bcf630d99bd9da799c1d1d038babdda448398c
/simplecalc.py
11630fadb6ad4443d959e63a2af4879a77d7cabe
[]
no_license
noob-wale/simplecalc
4c4087f5a0304a87be651f697777878cc813af41
e7d1a64519d620419eece337c4747339356a1981
refs/heads/master
2020-06-18T13:52:52.427903
2019-07-11T05:18:03
2019-07-11T05:18:03
196,323,896
0
0
null
null
null
null
UTF-8
Python
false
false
569
py
simplecalc.py
print('This is a program that reads two intergers and performs addition, subtraction, multiplication and dividsion on them.') #request for user data num_A = float(input('Enter a number: ')) num_B = float(input('Enter another number: ')) total_sum = float(num_A + num_B) total_substraction = float(num_A - num_B) ...
312cda3a86ae0429a40d4a60ff4951296a7b8a1e
fb468df86be50325a7d5f99b01a6b092677764ef
/binarysearch/heater.py
63cfd97203f6f0aa7bea95fbcc826e4134014d5c
[]
no_license
donata001/leetcode
47925958692c2d27d6d6a3c34376799edab186dd
a8bd74e8c2cf43eb645b92f0b2664f79371d4478
refs/heads/master
2021-01-20T05:20:08.297213
2017-08-25T18:40:43
2017-08-25T18:40:43
101,432,376
0
0
null
null
null
null
UTF-8
Python
false
false
761
py
heater.py
class Solution(object): def findRadius(self, houses, heaters): """ :type houses: List[int] :type heaters: List[int] :rtype: int """ # find the closest point in another array closet_point = 0 heaters.sort() for house in houses: clos...
76f24b640bc9fa095b00d119a6c0909225d98418
410f8832ff3f17dec9803a425d74578b6dbed098
/基础语法/1.py
eb77a12993732f9e66399a27f6f033d7ac35bfb7
[]
no_license
heting-intesim/python-base
c8afe154d85d4fa38241ea0479aa28954807b895
91e243720f47c713b4ab30384e242eb4ed4eff8f
refs/heads/master
2022-11-30T11:56:08.305937
2020-08-19T07:38:39
2020-08-19T07:38:39
267,249,779
1
0
null
null
null
null
UTF-8
Python
false
false
682
py
1.py
class Game(): top_score_info = {'player':'','score':0} @staticmethod def show_help(): print('帮助信息:\n...\n...') @classmethod def show_top_score(cls): print(f'游戏最高记录:[{cls.top_score_info["player"]}] --- {cls.top_score_info["score"]}') def __init__(self, player_name): ...
cffd802536400f9a5d47cd69215c346512634e11
ff590b37206257098a257da2362c5c25ee6d768f
/day7/复制文件2[复本].py
004b303b077c37bd674714ccfe6d6a4b12080472
[]
no_license
vhjmlw/Learn-Python
16de29962bcc045fcedb5cef30e172a7036224ca
b77a1e91a49ca83b3f7610e07cd418c862db37b7
refs/heads/master
2021-01-21T13:25:14.481018
2017-10-10T01:10:48
2017-10-10T01:10:48
102,117,465
0
0
null
null
null
null
UTF-8
Python
false
false
434
py
复制文件2[复本].py
# -*- coding:utf-8 -*- old_file_name = input('请输入要复制的文件名') old_file = open(old_file_name,'r') point_index = old_file_name.rfind('.') new_file_name = old_file_name[:point_index] + '[复本]' + old_file_name[point_index:] new_file = open(new_file_name,'w') while True: content = old_file.read(1024*100) if len(con...
bcd3e2cfd728581059ceb667f96cb0799d490a8a
b066907aca987eb5502411dbb16bee23b55f617f
/source/training/ppo.py
523f9df77b87edd8c557eae84333bc6e704533b3
[ "MIT" ]
permissive
Aethiles/ppo-pytorch
ecb353e9334b61f614506fd1057b7a2b5ce44758
b3fb6bdb466056cf84115ca7b0af21d2b48185ae
refs/heads/main
2022-12-01T01:25:45.049031
2020-08-10T07:07:43
2020-08-10T07:07:43
256,139,090
0
0
null
null
null
null
UTF-8
Python
false
false
12,150
py
ppo.py
import torch import torch.utils.data.sampler as samplers from source.training.rollout import Rollout from source.policy.parameters import AtariParameters from source.policy.policy import Policy from source.utilities.errors import ShapeError from source.utilities.logging.abstract_logger import AbstractLogger from sourc...
63c3325f0321eb5b2d4124b3fbe776d6d19b94c6
c45daff1c03ba48df7ba1b71684181a2d583580a
/scripts/gen_compiler_script.py
3b044ee2dd03072903eb8fcb22245c55545eb047
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
gijs/WebViewer
45b9eb7f3a028a729887314e937d7d80e8c3e491
b02359fae12b7c2ca2c03f0af4c949173540ea7f
refs/heads/master
2021-01-16T21:51:38.850249
2011-05-02T06:31:29
2011-05-02T06:31:29
null
0
0
null
null
null
null
UTF-8
Python
false
false
755
py
gen_compiler_script.py
import os import os.path import glob path = '../source/core' files = [] command = "java -jar ../external/closure/compiler.jar " for infile in glob.glob( os.path.join(path, '*.js') ): files.append(infile) for infile in glob.glob( os.path.join(path+"/layer", '*.js') ): files.append(infile) ...
a75b6f2af75e03f28a959a9ff48267955b21460d
7556a73d5f982dbd4fc393a16e0b42f4ca87f28c
/test/fixtures/jobs/fake_job/whatever_i_want.py
3c64ef3ec237c20fbf8841a0d8c7270ced8140e0
[ "Apache-2.0", "MIT", "BSD-3-Clause" ]
permissive
dessa-oss/local-docker-scheduler
23815ef32ac1751407325634be7a1f8154f21909
0e47f43b31cb8e03228cd61724d378e8f3acf6d2
refs/heads/master
2022-04-11T03:35:06.702428
2020-03-16T19:24:49
2020-03-16T19:24:49
204,787,501
5
0
null
null
null
null
UTF-8
Python
false
false
308
py
whatever_i_want.py
import math import os import time current_time = math.floor(time.time()) job_id = os.environ['FOUNDATIONS_JOB_ID'] os.makedirs(f'/job/job_archive/{job_id}', exist_ok=True) with open(f'/job/job_archive/{job_id}/timestamp-{current_time}', 'w') as timestamp_file: timestamp_file.write(str(current_time))
33e9206698f47bf345dd7b95bd96f94645a260f5
c00b2c1e83311b7bd1864d06f9e40a7f00bbf830
/Desafio05.py
b5793eb7b8bbb0222da3d74ce1def419a07863ae
[]
no_license
Commandoz/Portif-lio
cad9a0946c51a0c1b15d2d6c6ec55d7dea8a3ad3
6c23f570f78ca61d8f0b6b63a34e4a32747b57d5
refs/heads/master
2020-07-21T07:49:55.634874
2020-05-08T15:43:01
2020-05-08T15:43:01
206,784,227
1
0
null
null
null
null
UTF-8
Python
false
false
249
py
Desafio05.py
print('Desagio 05 - Antecessor e Sucessor!') print('Escolha um numero para saber seu Antecessor e Sucessor') n1 = int(input('O número escolhido foi: ')) ant = n1 - 1 suc = n1 + 1 print('O Antecessor é {} e o Sucessor é {}!'.format(ant, suc))
2a366377308754d2bd942f4e64b8f1919dcbc6fd
7950c4faf15ec1dc217391d839ddc21efd174ede
/leetcode-cn/sword2offer/000剑指0_Offer_21._调整数组顺序使奇数位于偶数前面.py
4e6595d542dc2a7b5f92314aec03471269341290
[]
no_license
lixiang2017/leetcode
f462ecd269c7157aa4f5854f8c1da97ca5375e39
f93380721b8383817fe2b0d728deca1321c9ef45
refs/heads/master
2023-08-25T02:56:58.918792
2023-08-22T16:43:36
2023-08-22T16:43:36
153,090,613
5
0
null
null
null
null
UTF-8
Python
false
false
871
py
000剑指0_Offer_21._调整数组顺序使奇数位于偶数前面.py
''' approach: Two Pointers (Head & Tail) # 首尾双指针 Time: O(N) Space: O(1) 执行结果:通过 显示详情 执行用时:36 ms, 在所有 Python 提交中击败了80.61%的用户 内存消耗:18.1 MB, 在所有 Python 提交中击败了83.82%的用户 ''' class Solution(object): def exchange(self, nums): """ :type nums: List[int] :rtype: List[int] """ size = ...
16b30b1f2f9f76a6028a1cb1bdae95bcfd9548cb
4a94984cc65fedfae24c5b5344cccbce807e944d
/Day1/Assignments/Assignment2.py
f0a530bf0d2f0d94e39e9cf34b25b42aa159bdad
[]
no_license
intkhabahmed/PythonProject
72724f927c2c43fef49d5a827d0f544c81e67d6b
d8474c33b0bb42e631f4d0416a4e5b9ab2ee27cd
refs/heads/master
2021-08-28T03:04:26.810579
2017-12-11T04:35:42
2017-12-11T04:35:42
112,294,087
0
0
null
null
null
null
UTF-8
Python
false
false
109
py
Assignment2.py
word = raw_input("Enter a word and we will print it after reversing it") reverse = word[::-1] print(reverse)
d9ee9d122fc0bd97b4042fb05b9c159b4840b1e4
6d80ce7a1f44ddf5741fd190ddfe0d9be8e5f162
/engine/trainer_collection/RARE.py
d7caecc0b415e63020f2dc2488840d80eda47cfa
[ "MIT" ]
permissive
dun933/FudanOCR
dd8830ca4b8ebb08acd31326fcf5aa3c961886a0
fd79b679044ea23fd9eb30691453ed0805d2e98b
refs/heads/master
2021-04-03T19:50:47.646099
2020-03-16T08:43:59
2020-03-16T08:43:59
248,391,401
1
0
MIT
2020-03-19T02:23:11
2020-03-19T02:23:10
null
UTF-8
Python
false
false
3,065
py
RARE.py
from engine.trainer import Trainer class RARE_Trainer(Trainer): ''' 重载训练器 主要重载函数为pretreatment与posttreatment两个函数,为数据前处理与数据后处理 数据前处理:从dataloader加载出来的数据需要经过加工才可以进入model进行训练 数据后处理:经过模型训练的数据是编码好的,需要进一步解码用来计算损失函数 不同模型的数据前处理与后处理的方式不一致,因此需要进行函数重载 ''' def __init__(self, modelObject, ...
3ccdad710012388025177b411df494729b8608e2
80f5d5f956f7d971099a8b21ec4aa07072e41ebb
/iaba-backend/server.py
cce3b34b8776aa250fe589b35fce6a1b0732a75a
[]
no_license
Amogh100/SabermetricsFinalProject
94fc937bde14c90f8d46fa17376a1fedcad73864
60529bc8d83d645a5c7639d06693bc13884825fa
refs/heads/master
2020-05-09T15:42:07.018669
2019-05-01T01:43:53
2019-05-01T01:43:53
181,242,395
0
1
null
null
null
null
UTF-8
Python
false
false
2,507
py
server.py
from flask import Flask, jsonify, request import pandas as pd from flask_cors import CORS app = Flask(__name__) cors = CORS(app, resources={r"/*": {"origins": "*"}}) #For now let's just load from the CSV's. Don't worry about SQL team_iaba = pd.read_csv("../team_iaba.csv") def build_player_details_dicts(): pla...
b8203ada0ca41eb4238e949e2061d7ff0c8e7385
a8b070f4fb402dc055c5c467d59aa307f646ae74
/0x01-python_hello_world/.#1-print.py
b4c95a7b7f6e9485a3ca8ca79bedf053737a5e84
[]
no_license
cesaravina/holbertonschool-python-camp
09b8b4fa11679145dcf413b0b373bb330b00ffb7
a4cfedba0c808dc653a4aad234093a02df96bbca
refs/heads/master
2020-03-19T04:39:08.834912
2018-06-04T01:01:39
2018-06-04T01:01:39
135,850,558
0
0
null
null
null
null
UTF-8
Python
false
false
37
py
.#1-print.py
vagrant@ubuntu-xenial.5791:1527959692
69923affb4407dfd3f45795c603961df0bf5f375
1a55541766dd6fef0c9dec74ad8b84a0a8eae7a9
/day7/day7.py
2be1be77926d07c05c1c1f25e9699e7e22803e31
[]
no_license
rahagi/adventofcode2020
2bba3318b76eac685060e21492a32ff68d219c9c
75d2b9e06e9dadd44ba60cca7b688a2a54bad713
refs/heads/master
2023-03-08T12:06:36.957232
2020-12-10T09:23:41
2020-12-10T09:23:41
null
0
0
null
null
null
null
UTF-8
Python
false
false
872
py
day7.py
#!/usr/bin/env python3 inpt = [x.strip() for x in open('input', 'r')] rules = {} for r in inpt: p, c = r.split(' bags contain ') if 'no' in c: continue c = [x.strip('s') for x in c[:-1].split(', ')] c = {x[2:-4]: int(x[:-len(x)+1]) for x in c} rules[p] = c def find_...
6b08168cb4c49d5b64ebafe0c81bf20c613b47da
4de049c060d28e60fd4108cb11d9dccb6b98c338
/backend_flask_demo/demo1.py
7334373248b3e7f7ee3a6aae8af34db5c6792730
[]
no_license
jumper0419/HogwartsStudy
92e6d5d2665620b99ceb84c423d111f0eda8dc60
955a6453d0e041a5af19f1eadaac00c15e9d5850
refs/heads/master
2023-07-03T13:44:18.970910
2021-08-04T04:39:10
2021-08-04T04:39:10
342,179,116
2
0
null
null
null
null
UTF-8
Python
false
false
320
py
demo1.py
from flask import Flask, request app = Flask(__name__) @app.route("/") def hello_world(): return "hello world" @app.route("/get_params") def get_params(): return request.args @app.route("/get_body", methods=['POST']) def get_post_res(): return request.body if __name__ == "__main__": app.run(debug=True)
97d3bcd8803df0bdaed1a8a8300801909160f7bd
d287681df2aea49f6cabd14a73a300ef483953d4
/aguaclara/core/cache.py
8e98c642cc4c1b6bf4bf3c438f57cf302ef6e3f9
[ "MIT" ]
permissive
AguaClara/aguaclara
1da1c82c279a69196f7468034259b7b229292da7
4db315b3df149019f142d95e24405e43c6ab1ca2
refs/heads/master
2023-08-30T07:24:56.487641
2023-02-08T17:33:51
2023-02-08T17:33:51
92,859,213
9
8
MIT
2023-02-08T17:27:03
2017-05-30T17:35:36
Python
UTF-8
Python
false
false
2,037
py
cache.py
# The cache decorator does not support objects nested within datastructures or other objects. It is quite limited # because the hash function is limited. This could be revisited and we could use a serialization library like Pickle # if this proved to be an issue (which it most likely will when we get more complex class...
25b21a25b5686df711234878f170f5122b0e399d
22bc57229b697d50504c44d54ebc5c05a5ecf86e
/preprocess_data.py
8f6536fb75c7650a6a208070a1d2b15b57692062
[]
no_license
sronnqvist/doc-level-multilabel
34cd62722fdae130802e510c94e5dbaa41ca79ae
730628965f92979e8cca021c865698968dafb462
refs/heads/master
2022-12-04T19:07:45.705642
2020-08-26T15:12:57
2020-08-26T15:12:57
290,531,100
1
0
null
null
null
null
UTF-8
Python
false
false
12,772
py
preprocess_data.py
import csv, gzip, os, sys csv.field_size_limit(sys.maxsize) try: import ujson as json except ImportError: import json import numpy as np from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter from itertools import chain from functools import partial from collections import Counter from multiproce...
b42839ce1bfeef88b7d47786dae2a29c1a55e206
c0425cb3c67b0f9e9077475d70e463c06aa176f6
/chicago.py
62ad7bb03952179967b0abd8ecb4b0a7facda0bf
[]
no_license
EugeneStill/PythonCodeChallenges
e3eba938c74cb64347843cb7e8c8937b6d50aed8
4ddeb506f984503d83cb0ad1a2fa2e915009c38f
refs/heads/main
2023-04-29T00:26:26.537946
2023-04-15T01:18:33
2023-04-15T01:18:33
145,318,074
0
1
null
2023-04-15T01:18:34
2018-08-19T16:09:34
Python
UTF-8
Python
false
false
1,417
py
chicago.py
import unittest import heapq class Skyline(unittest.TestCase): # https://leetcode.com/problems/the-skyline-problem/submissions/ def get_skyline(self, buildings): MAX_HEAP_HEIGHT, MAX_HEAP_X, RESULT_X, RESULT_HEIGHT = 0, 1, 0, 1 # get tuples of building coords + 0 height endpoints for right side of...
b65af7a0209a16d3fa23494680cdaa6cd0a6eaef
aac5982c8dcf26221419086fb90c399b9f4324ef
/DFTB/Modeling/thomson.py
119cac52ea210bdda73d7975f49f257bea21a1a0
[]
no_license
by-student-2017/DFTBaby-0.1.0-31Jul2019
99184d3fa2976d4e02f7f1bddee97e56526d9365
92cb73f1a6472f88588986561349d7f2ad1b1c15
refs/heads/master
2022-12-12T00:12:50.449505
2020-09-01T21:05:59
2020-09-01T21:05:59
290,116,049
1
0
null
null
null
null
UTF-8
Python
false
false
6,936
py
thomson.py
import numpy as np import numpy.linalg as la from scipy import optimize from DFTB import XYZ #################### CARTESIAN COORDINATES WITH CONSTRAINTS ####################### # objective function def f_cart(x): x = rescale(x) n = x.shape[0] npts = n/3 coul = 0.0 for i in range(0, npts): ...
731997e2fc134babf3e30e0d868152500aa80343
18c23cd79c60997f445851bcbd4513804f8d2cd0
/tea/disk/__init__.py
303d731ac119c99f3a709851881b9a0d9c838b5b
[]
no_license
davidkyalo/pytea
4ad766fdc26024b450c31d1698818726cb9c7064
0fd578feed57b0f544b564b8ae0e7523c02939a6
refs/heads/master
2021-01-11T21:50:44.738027
2017-03-10T19:53:24
2017-03-10T19:53:24
78,865,119
0
0
null
null
null
null
UTF-8
Python
false
false
39
py
__init__.py
from .func import * from .file import *
e036227b9321731d31d900ab3c3b9d237f1ca2fc
c01cb22b1a36e58309166b11f0b5528c205dde16
/x1.py
6a1908100c51925f4cc5cce8606e74e7fa7c0f57
[]
no_license
mohammad373/x1
e6670acd161a8b4f8e2cfb66307bdd8dc92bc814
213d6289ad82b2cf5adcd7c3c12b22e960ce374d
refs/heads/main
2023-01-24T05:39:14.206246
2020-12-09T07:00:50
2020-12-09T07:00:50
319,866,769
0
0
null
null
null
null
UTF-8
Python
false
false
3,894
py
x1.py
# x1 import os import sys import socket import time import webbrowser as wb from colorama import Fore def __wb__(): os.system("clear") try: time.sleep(1) print(Fore.YELLOW + "[*] ~ Hello . Welcome Back ;)") time.sleep(1) target = input(Fore.GREEN + "\n[!] - Enter your Address T...
def5c47a40c1dda5fae3cf87968bad113dd023cf
78d5a6e0846cb6b03544e4f717651ca59dfc620c
/treasury-admin/bureau/migrations/0019_auto_20190331_0033.py
d71255f5c93ca05c74b03eeb4915b0efbc4d16a7
[]
no_license
bsca-bank/treasury-admin
8952788a9a6e25a1c59aae0a35bbee357d94e685
5167d6c4517028856701066dd5ed6ac9534a9151
refs/heads/master
2023-02-05T12:45:52.945279
2020-12-13T08:07:41
2020-12-13T08:07:41
320,323,196
0
0
null
null
null
null
UTF-8
Python
false
false
1,289
py
0019_auto_20190331_0033.py
# Generated by Django 2.1.2 on 2019-03-30 16:33 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('bureau', '0018_auto_20190331_0021'), ] operations = [ migrations.AlterField( model_name='intern...
fd91fac8556daecb165d4d2c718d3cf88a09bbe0
3ad0a3797fecbf5c44e5f7b0c1978fdd2cf89086
/cogs/Information.py
37b48bd37383d11f2f1f93c9eba05bfa93c147b4
[]
no_license
SteeleJr98/SteeleHook
0437d8b930969f4dea95234b088fe17fd73c7ffd
13f563bebe2dc7e608ce7cb19d09d3a2efdc04de
refs/heads/master
2021-06-19T11:53:58.644894
2021-05-26T10:01:24
2021-05-26T10:01:24
214,788,463
0
0
null
null
null
null
UTF-8
Python
false
false
7,104
py
Information.py
import discord from discord.ext import commands, tasks from itertools import cycle import asyncio import random import psutil import platform from .Logging import * uname = platform.uname() SystemType = uname.system if SystemType == 'Windows': status = (['Currently Testing']) else: status = (['Generating Cr...
f53f76ad738b1a8611fa24f40fc5cf30b1dd3a28
e6a5cc6e3db72686dbbaf71bc1ba93988d542036
/mergeMe.py
f0457d2c77e8851887a185dd507128cca0ac8e7e
[]
no_license
efwoods/pptx2py
e2571ac7c6961880af095d1f41370df830840cf6
ba8a1781611c9baf3088f12d4e4a12541ecb4cd1
refs/heads/master
2020-08-02T14:41:40.916800
2019-09-30T03:00:22
2019-09-30T03:00:22
211,393,221
1
0
null
null
null
null
UTF-8
Python
false
false
16,041
py
mergeMe.py
from pptx import Presentation from pptx.enum.shapes import MSO_SHAPE from pptx.util import Inches, Pt from pptx.dml.color import RGBColor prs = Presentation() title_slide_layout = prs.slide_layouts[0] slide = prs.slides.add_slide(title_slide_layout) slide = prs.slides.add_slide(title_slide_layout) LEFT = 1645920 TOP =...
ac64f0dfe91554d841685a2e51160edf3027b6f9
6be789ae824e6995641b74238d866312497573aa
/session_3_class_70/handle_exception.py
ed8551e99ed660ed825cd27e4845f3bfb2359f37
[]
no_license
bruno-novo-it/the-python-mega-course
96fed1aa36e72dc1ff500d0fe4902ae32d294af1
bdeaeb56c45887fb56bb7479b62ebec115ce2021
refs/heads/master
2021-06-13T13:09:14.587736
2021-03-03T22:59:59
2021-03-03T22:59:59
155,412,695
0
0
null
null
null
null
UTF-8
Python
false
false
136
py
handle_exception.py
def divide(a,b): try: return a/b except: return "Zero division is meaningless, NOT PERMITED" print(divide(1,0))
e65a7798760ade7f061938b2b0aecdfefeb76273
0a3001248c0b642397af5664c6eac343a624bf5d
/for_loop.py
35b4edd07b016da2d125155aaf53c2ec492ed62e
[]
no_license
yasanmaduranga/Pythonlearning
020c83369d73c95218dd02fdaaf94885773173bb
6e501570cbced4b766c9d66e7e567da4d3fe0f83
refs/heads/main
2023-05-29T21:01:09.836550
2021-06-10T06:22:08
2021-06-10T06:22:08
371,917,487
0
0
null
null
null
null
UTF-8
Python
false
false
252
py
for_loop.py
for letter in "blue": print(letter) colors = ["black","yellow","green","red"] for one_color in colors: print(one_color) if one_color=="green": break for number in range(5): print(number) for x in range(20,30): print(x)
9c5d930f278186cd5691c429caf550883831275f
c27d64fc5ec120ce16f681028c5de7220b640665
/Alphabet/alphabet.py
0e1b7349a0e5f8310975994ab594e0e072279f73
[]
no_license
KostyaRed444/-omputer-vision
c34ada37e931b7ae739908fd57f29931ec6824a2
6f21edf190649c3dda963e0b6d74b7189cb50504
refs/heads/main
2023-02-19T07:23:53.739543
2021-01-20T06:10:17
2021-01-20T06:10:17
302,832,381
0
0
null
null
null
null
UTF-8
Python
false
false
4,240
py
alphabet.py
# -*- coding: utf-8 -*- import numpy as np from skimage import filters from skimage.measure import label, regionprops from skimage import morphology from skimage import draw import matplotlib.pyplot as plt def count_holes(s): s = np.logical_not(s).astype('uint8') ss = np.ones((s.shape[0] + 2, s.shape[1] ...
7e3e22155f42e3a42df298db602489710045bbc0
abd8b83bc651b872194e18c920c0e76af62189e5
/stubs/kafka/metrics/stats/max_stat.pyi
62ec9c75a6cc93c9bd89b8372a481f3f36a1319d
[ "Apache-2.0" ]
permissive
patkivikram/aiokafka-1
ad40f011bb6bb5c8c3fe1ba46349d9b8021272c3
bbbfc4bf4ed02c0a25b4a86c8ec7afa5b5867975
refs/heads/master
2023-02-02T15:50:03.538294
2020-12-11T21:26:43
2020-12-11T21:26:43
309,823,242
1
2
Apache-2.0
2020-12-11T21:26:44
2020-11-03T22:34:52
Python
UTF-8
Python
false
false
326
pyi
max_stat.pyi
from kafka.metrics.stats.sampled_stat import AbstractSampledStat as AbstractSampledStat from typing import Any class Max(AbstractSampledStat): def __init__(self) -> None: ... def update(self, sample: Any, config: Any, value: Any, now: Any) -> None: ... def combine(self, samples: Any, config: Any, now: Any)...
cedef963db89cf3e5060600cee7d16a6f9909704
8acffb8c4ddca5bfef910e58d3faa0e4de83fce8
/ml-flask/share/doc/networkx-2.5/examples/drawing/plot_house_with_colors.py
531246316e9dfc465df311e0478d739641e27490
[ "BSD-3-Clause", "MIT" ]
permissive
YaminiHP/SimilitudeApp
8cbde52caec3c19d5fa73508fc005f38f79b8418
005c59894d8788c97be16ec420c0a43aaec99b80
refs/heads/master
2023-06-27T00:03:00.404080
2021-07-25T17:51:27
2021-07-25T17:51:27
389,390,951
0
0
null
null
null
null
UTF-8
Python
false
false
128
py
plot_house_with_colors.py
version https://git-lfs.github.com/spec/v1 oid sha256:2ec5931e3bdc85335b9399836f9bcd3bd1b7e5a2ac97c8927c605a9054fb5111 size 488
4514d97f7993ee54ec57331efb3677b8e73bdb27
b611c91ccca36ef12bf5c1cdefeeb453e5b7ca37
/sobel.py
dd3d894592e69468f277f4b8b29363a1510d733a
[]
no_license
purisc-group/purisc-comm
b8aaa342612f702fc09f2b10a76a60750dc12c63
d0b151613d76279e948ac2f37823c5980e075d44
refs/heads/master
2020-05-16T23:47:30.036143
2015-04-06T17:19:39
2015-04-06T17:19:39
33,227,271
0
0
null
null
null
null
UTF-8
Python
false
false
984
py
sobel.py
import numpy as np from subprocess import * import getopt, sys import struct from kernel import Kernel def main(argv): compilerPath, kernelName = parseInput(argv); kernel = Kernel(compilerPath, kernelName); kernel.compile(); inn = np.zeros([10,20]); inn = 100*inn; out = np.zeros([10,20])...
0a98842ecbd18b5b0664c224f7e480ebd8bd205b
6a1cd533ae16857a771549a2420b536d871a6067
/code/interview-problems/knights-dialer/level_2.py
4ae4f4880c4e5ecac05f9ad1e5e9411e5701ba74
[ "MIT" ]
permissive
alexgolec/career-advice
b6f38483bc0612f221232c2a35496f67b6f570ba
134b4f6d8c19524cdd61a03a283c77aaa93d67d3
refs/heads/master
2023-06-03T13:37:27.511069
2021-06-22T11:48:02
2021-06-22T11:48:02
160,075,577
18
0
null
null
null
null
UTF-8
Python
false
false
549
py
level_2.py
# Level 2: An exponential-time naive recursive implementation which counts # sequences without generating them explicitly. from neighbors import neighbors def count_sequences(start_position, num_hops): if num_hops == 0: return 1 num_sequences = 0 for position in neighbors(start_posit...
b18bc796f5ccb76ed6b142e913de26bb0f0c054f
7bfbb981162d39c466331064bc2c7a4609c8c136
/protein_transformer/models/transformer/Encoder.py
a42497da92f6de02b52dcb1300d62ba8d55c4d68
[ "BSD-3-Clause" ]
permissive
icemansina/protein-transformer
ad5599f5c8c52458f1aa9856ce89ea6b76886d22
4e73b17f2a4b89ba1a9f6703976d1a31b7a8a5eb
refs/heads/master
2021-03-07T04:38:57.540710
2020-03-09T18:15:35
2020-03-09T18:15:35
246,246,218
1
0
BSD-3-Clause
2020-03-10T08:27:57
2020-03-10T08:27:56
null
UTF-8
Python
false
false
1,918
py
Encoder.py
import torch from .Attention import MultiHeadedAttention from .Sublayers import PositionwiseFeedForward, PositionalEncoding, \ SublayerConnection, Embeddings class Encoder(torch.nn.Module): """ Transformer encoder model. """ def __init__(self, din, dm, dff, n_heads, n_enc_layers, max_seq_len, dr...
59e4614ade320318f5f78a0812cca59990daec6f
e1a2008adb902596f65f84028fdd84003e16a47a
/account/models.py
5a3944bb782f4cac5baeddb0e8d02568671325f6
[]
no_license
KrolikMarcin/Climbing-ranking
fcabadf30f0ae547f1dc085d72c14f303b98a0c7
fc9165ccbdf530feb479cf10c87414fd63b0dbcd
refs/heads/master
2020-03-22T01:02:26.305739
2018-07-02T07:39:21
2018-07-02T07:39:21
135,444,828
0
0
null
null
null
null
UTF-8
Python
false
false
1,146
py
models.py
from django.db import models from django.db.models import Sum from django.contrib.auth.models import AbstractUser from django.utils import timezone class MyUser(AbstractUser): date_of_birth = models.DateField(blank=True, null=True) sex = models.CharField(max_length=1, blank=True, null=True) def get_asce...
735557c3175021368ab6d06877bb00a66c10746e
21e3aaccddaa714a05f8699d21b58bc5d960dd5d
/chain/__init__.py
bd5f919b562e45e3c5acf25c501e9085119852b6
[ "Apache-2.0", "MIT" ]
permissive
ajpen/chain
60f7634eee2df4dcb9058b9ebb37be6cfa3bc3ec
9f4d5cd7268ae001661655c69989b080c31e5633
refs/heads/master
2021-06-02T18:10:09.997953
2019-07-19T16:44:33
2019-07-19T16:44:33
89,098,551
1
0
null
2017-05-16T12:59:40
2017-04-22T20:54:09
Python
UTF-8
Python
false
false
211
py
__init__.py
from .client import Client """chain - An expressive clean way to interact with RESTful APIs.""" __version__ = '0.1.7' __author__ = 'Anfernee Jervis <anferneejervis@gmail.com>' __all__ = [Client.__name__]
64fe7915a63cdd7b0f9ce54dc2ba53c02e1775e1
57c570d1b5a621158d8763f935e2069be6b8c90a
/tykj-operation/tykj-operation/MarketSearchCrawler/services/incrementupdate/add_urls.py
42bad28b444bc7555b9408e37a54229ce231fae6
[]
no_license
liuliainio/liuli
e011decf45f7eca7009a12ad4a96f33a17055945
203fbf4f135efb6432c77b937633003ce2f2c9a2
refs/heads/master
2021-01-10T20:35:08.070770
2018-08-21T05:52:59
2018-08-21T05:52:59
25,625,853
1
1
null
null
null
null
UTF-8
Python
false
false
3,419
py
add_urls.py
#-*- coding: utf-8 -*- ''' Created on Feb 19, 2014 @author: gmliao ''' import datetime from services.db import MySQLdbWrapper from _mysql_exceptions import MySQLError import pika from crawler import settings import traceback from utils import logger import sys import os import time _db = MySQLdbWrapper() logger = log...
ecdf7204147bbf488ec25d1d9cd24f3bc78b54dd
7a4cb45a8337cc4918e022049d72b3484700914d
/Next bigger number with the same digits.py
b8827401f7caa12ebc008c9e6965721c75702b00
[]
no_license
XYandan/Codewars
ac494d8f08f9fde627d417f4aadf1e76e3b7adfb
3df32dd63e66470c9d9b6f70ba181e507b1958ab
refs/heads/master
2022-09-26T09:19:41.751389
2020-05-29T11:46:13
2020-05-29T11:46:13
267,838,283
0
0
null
null
null
null
UTF-8
Python
false
false
712
py
Next bigger number with the same digits.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2020/5/29 19:40 # @Author : ZhangYongjie def swap_first_with_higher(digits): for pos in range(len(digits) - 1, 0, -1): if digits[0] < digits[pos]: digits[0], digits[pos] = digits[pos], digits[0] break return digits ...
bd31b96cfee5e23e27fec746066611af4660d897
3439ac3529562b9c8d8795ef708cb1ac394cba06
/lec10/games.py
7e96ee0f8966b5c72a24253be568d0151f9cb8ff
[]
no_license
ucsb-cs8-f17/cs8-f17-lecture-code
41851a7dff1677ab4af617feb82948b3e1f303b1
4e5187ee1b73da0c74b3124f3107c1d1de677373
refs/heads/master
2021-08-23T23:33:02.231263
2017-12-07T03:04:31
2017-12-07T03:04:31
106,199,692
0
1
null
null
null
null
UTF-8
Python
false
false
514
py
games.py
import random def playCoinToss(): print('Welcome to this game of chance!!!') coinSides= ['Heads', 'Tails'] #Infinite loop - not generally good c ='y' while c=='y': playerChoice = input('\n\nPick a side Heads (H) or Tails (T): ') result = random.choice(coinSides) if playerChoi...
5c5ca93041441fce078210fb4e28dcd0d7780ae6
254d7adfa1af1dcaa9697d5fa836740c00cdb1a1
/40. Combination Sum II/40.py
8a4447fd89e962adb688fe185a306f446a2ecd0c
[]
no_license
BaldrLector/Leetcode-Personal-Record
f265edd9e029311132b83fb57290085cfeb9d251
71bee343f0bb5cf27edce5367f5f10ac8dfa4789
refs/heads/master
2021-09-15T09:38:08.417988
2018-05-30T02:50:13
2018-05-30T02:50:13
115,602,863
0
0
null
null
null
null
UTF-8
Python
false
false
664
py
40.py
class Solution(object): def combinationSum2(self, candidates, target): """ :type candidates: List[int] :type target: int :rtype: List[List[int]] """ candidates.sort() return self.dfs(candidates,0,[],[],target) def dfs(self, candidates,start,res,ans,target)...
cd10113b01033ee719ee2302e7fbbe5bec8381a1
99591b4df3e5254163486f6204cbf4f0be7df484
/Ex 7/ex7_pca.py
05ae3a2b8ae3713582c7ab172eb7ea261a7d890f
[]
no_license
ravi4k/coursera-machine-learning-stanford
f71144e85a58aa942247483dae2bcc3944057ab4
f88cd426880f39934de2a785cfbf2a1a437c9b62
refs/heads/master
2022-01-14T21:54:06.956683
2019-06-10T14:35:48
2019-06-10T14:35:48
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,046
py
ex7_pca.py
# -*- coding: utf-8 -*- from scipy.io import loadmat import matplotlib.pyplot as plt import numpy as np data = loadmat("ex7data1.mat") X = data['X'] def featureNormalize(X): mean = np.mean(X, axis = 0) std = np.std(X, axis = 0) return (X - mean)/std, mean, std def pca(X): m = len(X) sigma = (X....
babd3371d915716ff682da583fda163b78c9613e
6114460bcf5e678dc562a1df58ae949a2182677e
/problems/migrations/0002_auto_20190226_1734.py
eadd951e74563796818cb885cfc651bf0d8295c4
[ "MIT" ]
permissive
dandolal/astro-problems_review
ca8a551e54ea2fa07b37d496af3f2cf2e3a40ca7
5a43e689ce478e0de2e2f913fc26a1d17f92cbf7
refs/heads/master
2022-01-09T22:53:47.703881
2019-04-17T19:15:18
2019-04-17T19:15:18
181,953,027
0
0
null
null
null
null
UTF-8
Python
false
false
403
py
0002_auto_20190226_1734.py
# Generated by Django 2.1.1 on 2019-02-26 17:34 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('problems', '0001_initial'), ] operations = [ migrations.AlterField( model_name='theme', name='problems', ...
2b45ba528d652157c3a81129ebf1cec2014d5033
65da2489bf25ec60d9cd60ad789c65ad4645e9f8
/SmartBin_Solution_detect/SmartBin_Hub/arm_controller.py
5d0f666e260e88f2a097357f83c1f0b7d29f6665
[]
no_license
diy-hus/Code_Isef_Bao
fa95cbede1d54a8ee29beae8d834228b8f78f1ff
e73362c396f17f69e6a0801064115c85b9444b20
refs/heads/master
2020-07-22T06:47:59.597140
2019-10-01T10:07:23
2019-10-01T10:07:23
207,106,746
0
0
null
null
null
null
UTF-8
Python
false
false
4,354
py
arm_controller.py
import pigpio from time import sleep import math from config import * class ArmController: def __init__(self): self.pi = pigpio.pi() self.servoPos = {} self.servoPos[str(SERVO1)] = 0 self.servoPos[str(SERVO2)] = 0 self.servoPos[str(SERVO3)] = 0 self.se...
93485ed385cb1febb7cd7199e02efd956a3e98f1
93f22df6c7ccdf5080fbd716a983b02f45693a92
/Util.py
92ab1b0f3340f711abfaa1a52017db46259a0114
[]
no_license
ruizhang84/MapperReducer
d1e68b33d57fddcb413a409f5a1d1382f5624293
006d59976f61f98986f80d2e16514c22a0defb33
refs/heads/master
2020-05-07T15:53:55.133438
2019-04-10T20:27:19
2019-04-10T20:27:19
180,658,263
0
0
null
null
null
null
UTF-8
Python
false
false
1,498
py
Util.py
import math import inspect, os def count_line(file_name): line_number = 0 with open(file_name, 'r') as f: for _ in f: line_number += 1 return line_number def write_file(file_path, i, write_out): _, file_name = os.path.split(file_path) out_name = "Input_" + str(i) + "_" + file...
0bd1c69a43462de288781468a3551edcba5e49f0
e01d20f2095f4a468f5a7a9d44f84a8a0ef11cfb
/RobotInterface/Nextage/NextageInterfaceWindows/HiroNX_idl_example.py
47f4c35bc31fc0b317af1863b73cde3326104411
[]
no_license
malwaru/graspPlugin
b086ab7cfa9ee21de518905fe3dedbc552842a69
267301ed9b4f932a28b3671c6b50de8377b63f11
refs/heads/master
2023-08-05T16:45:56.821509
2021-10-07T05:52:40
2021-10-07T05:52:40
null
0
0
null
null
null
null
UTF-8
Python
false
false
2,676
py
HiroNX_idl_example.py
#!/usr/bin/env python """ \file HiroNX_idl_examplefile.py \brief Python example implementations generated from HiroNX.idl \date $Date$ """ import HiroNXManipulator import CORBA, PortableServer import _GlobalIDL, _GlobalIDL__POA class HiroNX_i (_GlobalIDL__POA.HiroNX): """ \class HiroNX_i Example cl...
75a0173ddc69a04519a7d20fc6d56893b959823e
e9315507b19f98cf4605013478b64fa797fa2600
/CNN PJ3 Code/platformerbot-master/PlatformerBot/player.py
55bbc77e1175bd6b629941a746bc38f7b84468db
[]
no_license
BrooklynZhang/Personal
72c123f44330341cdcf54f4a71d60bf73441ce9a
92d59d273bef330e8da738c0c4a403b29318e505
refs/heads/master
2020-08-07T03:30:30.845810
2020-07-23T17:44:39
2020-07-23T17:44:39
213,280,144
0
0
null
null
null
null
UTF-8
Python
false
false
9,047
py
player.py
#PlatformBotProj import numpy as np import kivy from kivy.app import App from kivy.properties import Property, BooleanProperty, NumericProperty, StringProperty from kivy.uix.widget import Widget from kivy.uix.button import Button from kivy.uix.boxlayout import BoxLayout from kivy.core.window import Window from kivy.clo...
3105daa0e4f7d8facb661b0efa4b5a7f2b44e954
3b44b21c23ea141da2cf23201a7f737efe2ed788
/comprehension_test.py
c786cbde784523d3f1e3892cb225dd2c3294884c
[]
no_license
carlvin/pythonProject
b7384524fffba786e002e5b46f8da32f9b6667ae
313d4dbfb70e7090ed4bf0a721ca86b2b7474a25
refs/heads/master
2023-03-30T07:43:20.513062
2021-04-13T22:38:54
2021-04-13T22:38:54
356,960,842
0
0
null
null
null
null
UTF-8
Python
false
false
1,246
py
comprehension_test.py
# example 1 # Constructing output list WITHOUT # Using List comprehensions # input_list = [1, 2, 3, 4, 4, 5, 6, 7, 7] # # # #using for loop # # output_list = [] # # # # for x in input_list: # # if x % 2 == 0: # # output_list.append(x) # # print(set(output_list)) # # # # using comprehensions # # # # output_...
859d64cc701edae523284e832435907888878288
58b4f8e0b3c197d74479717b0e66ec05daad351e
/shared/FunctionTimer.py
7c43d8580424ce1f6ecad92241f1954531c69718
[]
no_license
lamchau/class-01
9b00754bed199187d00995a2f71320e7886ef3e9
d823dc342bf0b3eb4717a5c2e0bf627d2a7d97b0
refs/heads/master
2016-09-05T13:55:14.485391
2015-07-09T00:35:03
2015-07-09T00:35:03
38,787,469
0
0
null
null
null
null
UTF-8
Python
false
false
504
py
FunctionTimer.py
#!/usr/bin/env python import time class Timer: start = None stop = None result = None def __init__(self): pass def start(self): self.start = time.time() self.result = 0 return self.start def stop(self): self.stop = time.time() self.result = self.stop - self.start self.start = 0 return self.sto...
bb144cb1964c94c131936c8ceb610393e05c14ca
ade5ad5e9f712eddd861f5e680b8201d6febae5e
/app/models.py
3ba12ead436f26c7e6a346158884731d73902ad5
[]
no_license
ochen/flask-notification
a7408ba0d1ec1d175935cd48ace9e0df5a3cc2c2
042bb70a2a569a4214a0fdb095db71146536d994
refs/heads/master
2016-08-05T13:59:09.872421
2014-03-21T00:49:35
2014-03-21T00:49:35
17,886,653
2
0
null
null
null
null
UTF-8
Python
false
false
1,491
py
models.py
from app import app, db SEND_METHOD_EMAIL = 0 SEND_METHOD_SMS = 1 SEND_METHOD_APP = 2 class User(db.Model): id = db.Column(db.Integer, primary_key=True) nickname = db.Column(db.String(64), index=True, unique=True) email = db.Column(db.String(120)) mobile = db.Column(db.String(16)) email_notificati...
f1e3a2b92e53e0a20530808db6a79eafd0e29cf5
d1675430aed59ea23a86420a55fa115a41be03b4
/puppies_query.py
243522b11907d9182d75c13cd57fec92d2204715
[]
no_license
datalord123/Puppies
bb047a586f6cc59252c00f8b0e8a1a748994064e
de3f141a8af89634bc9f69756a9c026296e1a627
refs/heads/master
2021-01-01T03:57:47.736652
2016-04-12T19:15:26
2016-04-12T19:15:26
56,090,440
0
0
null
null
null
null
UTF-8
Python
false
false
4,669
py
puppies_query.py
from sqlalchemy import create_engine from sqlalchemy import func from sqlalchemy.orm import sessionmaker from puppies import Base, Shelter, Puppy, Adopter_Puppy,Adopter,PuppyProfile #from flask.ext.sqlalchemy import SQLAlchemy from random import randint import datetime import random engine = create_engine('sqlite:///p...
8bf9f90d4fad3d4c24d32d97a07f09f37eab8597
f39587afc8769c52fe692878fc4866a85e75fc96
/utils/layers.py
f3d4843642398a551beb0fed513e7d30a2e41f8c
[ "MIT" ]
permissive
chaeb/Hyperbolic_embedding_for_QAKG
4245a5882531f580178316aced19f705e39c4c25
df36329075af182d29aaa3a7df52d537ed9bfa7c
refs/heads/master
2023-08-16T01:53:53.877296
2021-09-29T00:25:07
2021-09-29T00:25:07
402,586,225
1
0
null
null
null
null
UTF-8
Python
false
false
25,907
py
layers.py
import torch import torch.nn as nn import torch.nn.functional as F from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence import numpy as np import math from utils.utils import freeze_net from manifolds import hyperboloid def gelu(x): """ Implementation of the gelu activation function currently ...
f9be1a5aa5f762e413c25d120e00709e5be3722c
447b13cf9d0a0e15f81c07129f303654fdaa150c
/Factors of a Number.py
cb9907e4f7f02feee89dd9c0d9a332b489f18ff3
[]
no_license
lokeshiiitnuz/beginner-project-solutions
292d58fa4b87c69d577e8ba2b8dd7829e3cb9dde
b116e661f07f497946f9f9ff4b698011cca243b4
refs/heads/master
2022-02-18T12:14:54.140064
2019-07-28T15:47:09
2019-07-28T15:47:09
null
0
0
null
null
null
null
UTF-8
Python
false
false
647
py
Factors of a Number.py
#### Factors of a Number def f(n): l = [] #for zero if n == 0: l.append(0) #negative numbers elif n<0: for i in range(n,-n+1): if i == 0: pass elif n%i == 0: l.append(i) #positive numbers else: for i in range(-n,n+1): if i == 0: pass elif n%i == 0: l.ap...
47145c5c2bb2477130fd94c3570b8891fe159e20
48aa9436bdd738cbbd09cfa381b6a5f60d18525d
/bricks/db/sqlalchemy/alembic/versions/4307e329ce2e_.py
57e68646b090e51f7d7ecf29bea75ee2e1210ae0
[ "Apache-2.0" ]
permissive
CloudBrewery/bricks-service
b41b302d88b7dead01440e39c6e6765a169c1140
e905c324b062bfd8a8b3917c788849ea0d497e54
refs/heads/master
2020-05-17T20:18:40.431719
2014-11-06T20:59:50
2014-11-06T20:59:50
33,747,242
0
0
null
null
null
null
UTF-8
Python
false
false
630
py
4307e329ce2e_.py
"""empty message Revision ID: 4307e329ce2e Revises: 5314cde0aa04 Create Date: 2014-04-01 14:39:58.054363 """ # revision identifiers, used by Alembic. revision = '4307e329ce2e' down_revision = '5314cde0aa04' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic - ...
b8df7d79541b7e4379a321b7fd22eacd8ff383ec
7b216ce7de0252d3a1abaffee1ace9175690105e
/client.py
ed9348ea7b47ec0dd754b8a3c760c988d6b29d8f
[]
no_license
Lizonghang/leaf-mx
9a0d8e5ca2e38b2d26fc882ecddac8d2c5ff4bca
0df0ec7a375427cfa292cffdf41f149fc76636f3
refs/heads/main
2023-08-14T03:39:52.886595
2023-07-26T16:43:10
2023-07-26T16:43:10
338,591,796
8
1
null
null
null
null
UTF-8
Python
false
false
3,421
py
client.py
import warnings from mxnet import nd class Client: def __init__(self, client_id, group, train_data, test_data, model): self._model = model self.id = client_id self.group = group self.train_data = { "x": self.process_data(train_data["x"]), "y": self.process_...
3731b3dbf3561222fc34c652398c49cf53e2ae7c
451a9b48bbb685442d64af6658ff2e962167e4da
/astar.py
51069508fb6c1d4b10c38d7558a4fa4671c61d6e
[]
no_license
ajonnala/GraphSearch
21daf44a940f69d577d5f606b113a0cb0b887d6b
b5792d0d3b824530f07a8abd0b3298237997cc8d
refs/heads/master
2021-01-10T14:53:39.681476
2016-04-29T20:15:58
2016-04-29T20:15:58
55,803,475
0
0
null
null
null
null
UTF-8
Python
false
false
8,561
py
astar.py
#Author: Alekhya Jonnalagedda import Queue as Q import math import solution ###################graph ########################## BuiltGraph = {1 : [40.4378402, -79.9307115, None, 5, 2, None], 10 : [40.4357557, -79.92765510000001, 6, 14, 11, 9], 11 : [40.4360277, -79.9228808, 7, 15, 12, 10], ...
23ba8fcf73bc1118f17af8d6e65852da78448a4f
db2496b0d68fee8e4385c499066d06ae6eb5760c
/huawei/test_protocol.py
abef3e2e1e0fff210523eae578eb05c02b9d761d
[ "MIT" ]
permissive
zyv/huawei-lpv2
eb386daa421c479c21c17c66484e011b4104e550
22532a8c40293725ae27b92499c9aa51828e915a
refs/heads/master
2023-08-28T08:09:36.064599
2022-04-19T09:59:08
2022-04-19T09:59:08
204,341,215
46
13
MIT
2022-04-19T09:59:09
2019-08-25T19:36:38
Python
UTF-8
Python
false
false
8,535
py
test_protocol.py
import asyncio import unittest from .protocol import ( AES_KEY_SIZE, ENCRYPTION_COUNTER_MAX, HUAWEI_LPV2_MAGIC, NONCE_LENGTH, TLV, AuthVersion, Command, MismatchError, Packet, VarInt, check_result, compute_digest, create_bonding_key, create_secret_key, decode...
c90866ae41fe6fd69df70606cfd1b8dbcd7ff5b5
f6e4700ae1d7a31682a23e3bee4631d7c58b3c62
/CH3/AR.py
91abe9516388d08d7cda072449f45c1fa8f5fcca
[]
no_license
takhida/Python-code-for-anomaly-detection
e45d17d67283b2681b558c07b7554774620a36bb
44944fd4459bad337cbdeb1bb276afc994ca77bc
refs/heads/main
2023-05-06T11:43:58.879907
2021-06-03T02:08:11
2021-06-03T02:08:11
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,926
py
AR.py
import numpy as np import matplotlib.pyplot as plt import pandas as pd import statsmodels.api as sm import statsmodels import io import requests from statsmodels.tsa.arima_model import ARMA # 月ごとの飛行機の乗客数データ url = "https://www.analyticsvidhya.com/wp-content/uploads/2016/02/AirPassengers.csv" stream = requests.get(url)...
8fe24ae3746fd9231e66cb62f3c20f7d9fe76868
9af0031714c2eeeb247450b624d04baf487e2bda
/task_3_5_6.py
e8ff0191bcd3500396e4281b6df864ffb7cdc1eb
[]
no_license
AlterFritz88/flask_practice
f89ce2eb76650e09860ea3f60f346fdaafda94a3
4703af22240ec55d65555fe521779ed4f312815e
refs/heads/master
2020-12-30T05:32:44.791879
2020-02-09T17:22:40
2020-02-09T17:22:40
238,877,411
0
0
null
null
null
null
UTF-8
Python
false
false
479
py
task_3_5_6.py
from flask import Flask, request app = Flask(__name__) @app.route('/') def index(): form = ''' <form class="search-form" action="/search" method="GET" > <input type="text" name="s" /> <input type="submit" value="Найти" /> </form> ''' return form @app.route("/search", methods=['POST', 'GET'...
f83484c9a142ecfb8dafa40902871026785c4040
319cbe5e71154952049a77f2f802ed44071415b0
/Module01/LearningQGIS_ThirdEdition_Code/Chapter6_code/my_first_script.py
bab2782f3137a62801132f8d56e800339de35d10
[ "MIT" ]
permissive
PacktPublishing/QGIS-Becoming-a-GIS-Power-User
a44129bb8e167e5219c252b552df49555d62679c
c3ecde9542e93df80de55dcde86b5a8f6d61f52b
refs/heads/master
2023-02-12T20:11:19.868061
2023-01-30T08:53:37
2023-01-30T08:53:37
83,635,945
7
8
null
null
null
null
UTF-8
Python
false
false
114
py
my_first_script.py
##Learning QGIS=group ##input_layer=vector my_layer = processing.getObject(input_layer) print my_layer.name()