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
ab12468b1da20c896e3578091fd9ba245dcfa0a4
3e4f985a6aebae684199b27dbb31289427b1387f
/core/migrations/0004_auto_20200311_1348.py
72def8b2fe8dad3ce2d1ff0a33a37d3128c4ec66
[]
no_license
momentum-cohort-2020-01/django-multiple-choice-ktmeg
ad2c28eac244d29e6300583d6a9500a7c14d1472
c15b6d4a9689c734cf6908d90a7d3e54fe19ee0f
refs/heads/master
2021-09-25T08:08:35.766268
2020-03-20T03:19:10
2020-03-20T03:19:10
246,059,825
0
0
null
2021-09-22T18:47:26
2020-03-09T14:36:51
Python
UTF-8
Python
false
false
693
py
0004_auto_20200311_1348.py
# Generated by Django 3.0.4 on 2020-03-11 17:48 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0003_auto_20200310_1620'), ] operations = [ migrations.AddField( model_name='tag', name='name', ...
6e253747182716f84aa6326aafe15ff82be17378
d6ab5ad73d8ef74ae653f0f4e8cb1d9ccd1471e7
/post_to_srv.py
d4daf0eae356c6b5f487917925e84b74ee62a120
[]
no_license
boer0924/custom_monitor
e5689d92d2f4d7f315fdfea3ef78f711cdab262d
67c8f1d03fcf1fe468f49e511c8480a757281ecc
refs/heads/master
2021-01-16T17:39:39.903656
2017-11-03T06:14:15
2017-11-03T06:14:15
100,011,548
0
0
null
null
null
null
UTF-8
Python
false
false
3,279
py
post_to_srv.py
import os import sys import time import json import socket from urllib import request, parse from concurrent.futures import ThreadPoolExecutor from multiprocessing import Process import psutil from daemon import DaemonBase from host_performence import * class MyDaemon(DaemonBase): """Real Daemon class""" d...
603708c830dadb6f1a3e5de00536d558f448b5fb
5ff86ba6eb10624372dfb2d8f9bf055e2a80b266
/lib/libs/webhelper.py
fca560cfdfd8cad298a9bc19d1e48bbd3584bd85
[ "MIT" ]
permissive
supmagc/script.artwork.beef
4d564c3d711a989fd6acc4f9c5a1d27455a01ca4
afd76b290d13b2e9ea00d7f9772961353f4640b8
refs/heads/master
2020-11-27T12:34:50.594681
2020-01-02T21:36:07
2020-01-02T21:36:07
229,442,474
1
0
MIT
2019-12-21T14:56:16
2019-12-21T14:56:15
null
UTF-8
Python
false
false
2,329
py
webhelper.py
import requests from requests.adapters import HTTPAdapter from requests.exceptions import ConnectionError, Timeout, RequestException # import from `requests` because Jarvis / some platforms still have old urllib3 from requests.packages.urllib3.util.retry import Retry def retryable_session(retries=3, backoff_factor=0.5...
b8ab6b8c111876d6a781c82438f79307a849c47a
8203cb5b3086b5ecd71314c89655c15ecfec301b
/Python/Namecheap/regcheck.py
e61de7e683e73161b5bdf218c2448a1222e19fa6
[]
no_license
rox04/pri_code
8e22828cfe64decfc66fe63a0b89249c546bddee
67e3576e98a7a6ed6b39874799c46e3f2746907e
refs/heads/master
2023-03-14T21:56:33.888550
2018-08-27T18:09:19
2018-08-27T18:09:19
null
0
0
null
null
null
null
UTF-8
Python
false
false
2,750
py
regcheck.py
# -*- coding: utf-8 -*- import requests import Queue import codecs import os import urllib import base64 from threading import Thread from Crypto.Cipher import AES requests.packages.urllib3.disable_warnings() def check(q): while True: try: c = q.get() user = c.split(':')[0] ...
3ac13cc74a7eabef686ceb9d9e46f2ef109a225e
03854bbb28194418cbfbc57e0c83f30efe3f030f
/utils/crt.py
b75cb23bb9523d89790f05f4ab91cd9ece60dc62
[]
no_license
ShirleyLiuhy/Subdomain
9070c3391aa25ced8d95040cc31302d1ab87413f
d5bff31fc7dfcbb53a36e252cc08e4363bc31c95
refs/heads/master
2020-03-17T05:25:10.227487
2018-05-14T07:00:42
2018-05-14T07:00:42
133,315,878
1
0
null
null
null
null
UTF-8
Python
false
false
723
py
crt.py
#!/usr/bin/env python # -*-coding:utf-8 -*- from common import http_requests_get,is_domain import re class Crt(object): def __init__(self, domain): self.domain=domain self.site='http://crt.sh/?q=%25.' self.result=[] def run(self): url = self.site + self.domain print u...
af4d2380f92ea636594695e5ad4ba766d6874dd3
32c5cb32c804ce81679d692fc04963a73857ba1c
/app/external_tools.py
c716dd833de6490e10c61245aa83928239097d9f
[]
no_license
StanislavKraev/jb_code
87a08e2acade3688b5da240240c8040b51724525
9d178440c130590d2027bca976b54e6a33bc0c6d
refs/heads/master
2020-12-24T19:36:01.410748
2016-04-27T18:16:11
2016-04-27T18:16:11
57,235,797
0
0
null
null
null
null
UTF-8
Python
false
false
2,676
py
external_tools.py
# -*- coding: utf-8 -*- from fw.api import dadata_proxy from flask import current_app from fw.cache.cache_wrapper import CacheWrapper cache = CacheWrapper() def dadata_suggest(method, data): return dadata_proxy.dadata_suggest(method, data) def dadata_clean(method, data): return dadata_proxy.dadata_clean(...
a8ae59bb525c52ef852655f0ef1e32d96c8914d6
8980b15747c82623c7aae3c687c133e2e3fe9721
/src/handler/reload_model_handler.py
7110834aea4e9fa2b88f0368f246bcb01d24f40e
[ "Apache-2.0" ]
permissive
caserwin/SimpleRestfulML
753e9e0e945e7e6de99c79ab2beac8935cc17cfb
2fc5674a579fb7dc498f5e1cc6bbb888b6506906
refs/heads/master
2022-12-09T01:48:06.439102
2021-01-24T05:11:48
2021-01-24T05:11:48
172,831,854
11
1
Apache-2.0
2022-11-22T03:22:19
2019-02-27T02:58:01
Python
UTF-8
Python
false
false
1,185
py
reload_model_handler.py
# -*- coding: utf-8 -*- # @Time : 2019/3/5 上午9:55 # @Author : yidxue from src.handler.base.base_handler import BaseHandler from src.utils.tools import read_model from tornado.options import options import os module_path = os.path.abspath(os.path.join(os.curdir)) model_path = os.path.join(module_path, 'model') cl...
9ed674513bebe65ece538e9ce2b3945bb0c532cc
9adea66d98a1a12383a363ba66147ebd8405cbbe
/speech_handling/text_to_speech.py
4153e5de393f00fe1a1a64afc9720a75b9dddc50
[ "MIT" ]
permissive
markusgl/SocialCompanion
98a56fa5c7ed2bd54f9a1bb6abd15a036812b09c
e816af21c600b33dbcac25d088d4d75957d0349a
refs/heads/master
2021-06-09T04:51:04.408799
2019-11-03T14:32:01
2019-11-03T14:32:01
139,131,058
2
0
MIT
2021-03-31T18:58:36
2018-06-29T09:39:02
Python
UTF-8
Python
false
false
1,909
py
text_to_speech.py
import pyttsx3 import pyglet import time import logging import os from gtts import gTTS ROOT_DIR = os.path.dirname(os.path.abspath(__file__)) class GoogleTTS: def utter_voice_message(self, message): try: # Google Text-to-Speech API - needs internet connectivity #filename = ROOT_D...
3496216de9f6b7d9d3db69eb4d8f8c0fdcd5123c
6639761e05e3b0aae3f6ce53558e99149e11a09e
/rsa.py
34eab61f40e5d7d15189dd5f3b8071bf645b0396
[]
no_license
futurulus/coop-nets
34bdeefab21cb6763e43e346f6ed2c666a5dee62
01b1710b71358b224494d3329cc31b3cff9e10f6
refs/heads/master
2021-01-24T06:06:13.349155
2018-03-31T05:04:43
2018-03-31T05:04:43
48,348,170
11
5
null
2017-10-24T15:13:20
2015-12-21T03:17:28
OpenEdge ABL
UTF-8
Python
false
false
28,339
py
rsa.py
import operator import theano.tensor as T from collections import OrderedDict from lasagne.layers import get_output from stanza.research import config from neural import SimpleLasagneModel, NeuralLearner from vectorizers import SequenceVectorizer, BucketsVectorizer from neural import OPTIMIZERS, get_named_layers from ...
d30e2fa4d5b0a0965dad7d69b672b8f4ad137ff4
d19c86a46bd6cc17591e46e451bdd61dc4fefe11
/get_vocabs.py
2a658ad20884c593aa23dd592be25ddaf2fdf35d
[]
no_license
Brainmaker/hierarchical_feature_extractor
d854aeaaca5d366de7f4ea2bbe3c39d959bb33b6
01183a382d38a3db9dbe01cf7ece94d0e5195135
refs/heads/master
2021-05-31T18:09:57.048406
2016-06-20T13:22:20
2016-06-20T13:22:20
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,547
py
get_vocabs.py
#!/usr/bin/python # -*- coding: utf-8 -*- import os import os.path import json from collections import defaultdict, Counter MOST_COMMON = 120000 savepath = r'D:\My Documents\My Project\experiment1\finished\test_vocabs.json' dirpath = 'D:\\My Documents\\My Project\\experiment1\\finished\\test' #dirpath = 'D:\\Corpus\...
7ff3635b6d87e37f5648e0ffd07ef6de0c07f1c8
aadd990d4454078d5efd253b4e4835cca2f4970b
/p_analyzing/m_analyze.py
8b5e67ded5210d1a4f9f979c9bcedf2cd34a1078
[]
no_license
JieDh/ih_project_m1
50fa6fbb58486009cb2b69949c90532921c7bbbe
98fa5f19d6414bbf3adb7cacd4d48e3395deaac3
refs/heads/main
2023-03-02T06:00:44.186758
2021-01-29T23:34:34
2021-01-29T23:34:34
328,496,067
0
0
null
null
null
null
UTF-8
Python
false
false
1,282
py
m_analyze.py
def country_df (project_df): countries = project_df['Country'].unique().tolist() select_country = input(f' Which country df dou you want to see? Options are:\n "all" or one of those\n{countries}') project_df.sort_values(by='Country') if select_country == 'all': # % people working in X job, X co...
32c069997c02e3b3a7eb5ea4c1c542207ef27272
4b28ffb3f7326427f9e864ab3a5ce5b95f21c310
/tmv/connectors/overtime/overtime_data_import.py
62090c14a956bcdb2052e9b55e8b57baed6aff74
[ "MIT" ]
permissive
triad-moritz/team-metrics-visualizer
e77ab2f7ca2361c1a8870ee1e39a08927f78cae9
6022932274d1827cf617b594e917cc0b851ab294
refs/heads/master
2022-12-06T16:33:24.525755
2020-08-21T05:58:32
2020-08-24T05:21:16
278,000,657
0
0
null
2020-07-08T05:45:17
2020-07-08T05:45:17
null
UTF-8
Python
false
false
5,415
py
overtime_data_import.py
import logging from typing import List from datetime import datetime from connectors.shared import FileImporter, ImporterFileType from connectors.shared import ImporterReasonForSkip from database import db from helpers.time import to_timedelta from structure.organization import Team # pylint: disable=unused-import f...
bed08f558a1bf2cb3fea8c2483a58137a46d92b4
d19a3a03a74fb9756e426099610acf19c2373399
/app_rocinante/urls.py
da44d23b979f3b93939c1047ec25bd17cf41e884
[]
no_license
bogdanned/dulcinea
68c55cf337088e3af9de0ed6f5d3da4bfbfafa10
5d2b028183e942dafb0b60008f58e384bceaf2e2
refs/heads/master
2022-01-13T02:04:34.815437
2016-08-11T00:18:21
2016-08-11T00:18:21
84,355,258
0
0
null
2022-01-10T14:09:55
2017-03-08T18:53:38
Python
UTF-8
Python
false
false
145
py
urls.py
from django.conf.urls import include, url import views urlpatterns = [ url(r'^connection/$', views.ConnectionTest, name='db_conection'), ]
c809ac076320e253f02cc6a7d0b81b2f9e605ed3
038be9e9702d1b24728760cb52f90f1b59a0f4b7
/tori/navigation.py
7d09c218324667c9809972d1c0b33aae5684cc36
[ "MIT" ]
permissive
shiroyuki/Tori
04f7e6b48a87a80d218ff55a8e6fbfa6d1650856
143b99075bf9e8d469d117f056516ab847234c8c
refs/heads/master
2020-12-25T17:14:25.803362
2016-08-15T02:28:39
2016-08-15T02:28:39
2,555,800
1
0
null
2014-07-21T15:29:31
2011-10-11T14:26:18
Python
UTF-8
Python
false
false
12,315
py
navigation.py
# -*- coding: utf-8 -*- """ :Author: Juti Noppornpitaks :Purpose: Internal Use Only The navigation module is designed specifically for the dependency-injectable Application. Please note that the term *DOMElement* used on this page denotes any of :class:`yotsuba.kotoba.Kotoba`, :class:`yotsuba.kotoba.DOMElements` and...
db5248005b4ff36b7449d19d60caac21fe338c26
ab60e054be38350c39da41b6e43d1a9b39e3a046
/utils.py
6fc75115c5ace8b395a87b478800698a543b8219
[]
no_license
alexMet/ProjectEuler
c9982fb762e1d40f9477f19b5c0f614ad060afdb
91b3bb0c160c1d93125b72488f025f6c5441e1bd
refs/heads/master
2021-05-08T03:18:12.682270
2020-02-01T18:00:53
2020-02-01T18:00:53
108,183,889
0
0
null
null
null
null
UTF-8
Python
false
false
2,573
py
utils.py
from functools import reduce from math import floor, sqrt, ceil def is_palindrome(word): l = len(word) for i in range(ceil(l / 2)): if word[i] != word[l - i - 1]: return False return True def sieve(limit): a = [True] * limit a[0] = a[1] = False for (i, isprime) in enumer...
cb90b355b77b8adae0154fde7f33e95c3d50f46b
afde732d20cfc0500f0681a47a5984088f6e6ec9
/www/cgi-bin/login_cgi.py~
55e9ab5e440fffcb15b18e7f8f3075d59b835607
[]
no_license
lordzuko/IVORY-B.R.I.G.H.T
e4de2631ddca5c2daeafa7054a30b9f137518d72
cc2e4aeb1d4b172af95b0368a995269573936bcb
refs/heads/master
2020-04-05T22:57:48.864476
2016-10-01T17:01:21
2016-10-01T17:01:21
41,604,963
1
1
null
null
null
null
UTF-8
Python
false
false
587
login_cgi.py~
#!/usr/bin/python2 import sys import cgi import os print 'content-type:text/html' print print '<h1> hi </h1>' form = cgi.FieldStorage() username = form['username'].value password = form['password'].value #s ="\"Dashboard.html\"" #print "<script> function lw(){document.location.href="+s+" ;}</script>" #print "<bod...
aef4c270654ff124ea581669c63c0ea69570f7bd
901a35a359ba5a5c3a0f6ff0b9096309423861cc
/src/riotwatcher/_apis/league_of_legends/urls/ChallengesApiV1Urls.py
24eda2a98daea9fba8a5af0b23b1a02eb15de51e
[ "MIT" ]
permissive
pseudonym117/Riot-Watcher
3b8d8411e5a960df4eefa3028cb9639589de9d97
10bf58ebd6a4a2f543367551e710609e3255e74d
refs/heads/master
2023-08-07T12:29:39.612831
2023-05-20T22:11:20
2023-05-20T22:11:20
16,613,581
593
246
MIT
2023-05-20T22:11:22
2014-02-07T12:08:14
Python
UTF-8
Python
false
false
721
py
ChallengesApiV1Urls.py
from .LeagueEndpoint import LeagueEndpoint class ChallengesApiV1Endpoints(LeagueEndpoint): def __init__(self, url, **kwargs): nurl = f"/challenges/v1{url}" super().__init__(nurl, **kwargs) class ChallengesApiV1Urls: config = ChallengesApiV1Endpoints("/challenges/config") percentiles = Ch...
f6ca3e47fbf2e282139f256e4cb38722ca3d927e
fe174f1363467ec3976766a87a87e08651f42533
/project_start_code/repositories/country_repository.py
8ea2e107155b07edbff4b20e268abfb73224bd94
[]
no_license
spencerT101/Bucket_list_project_1
e134648d18ca2706daf66e1694d2b6cda9dbd7fc
557c56a777ca6e80b770a2ffbe4ce778cbe20744
refs/heads/main
2023-07-03T03:26:40.752636
2021-07-26T20:24:19
2021-07-26T20:24:19
360,921,268
0
0
null
null
null
null
UTF-8
Python
false
false
1,785
py
country_repository.py
from db.run_sql import run_sql from models.bucket_list import BucketList from models.country import Country from models.destination import Destination def save(country): sql = "INSERT INTO countries (name, continent) VALUES (%s, %s) RETURNING *" values = [country.name, country.continent] results = run_sql...
5027b0080988a0b8b0de4efa38511e3e8bcf3e38
df29ecfae690c22aa61f08ec42fff389f3a705a7
/Day4/18Json反序列化3.py
23e26fc2d1ee4e20068b9cdb07ccfa9c8031234f
[]
no_license
stecat/pyTraining
a7db7e65b0f519a042c0f86d4fa0fe7870cf06f4
7ffe44935dfaee43fb6ef0657bc12c21c71d9178
refs/heads/master
2020-04-09T08:01:30.513961
2018-12-22T10:07:35
2018-12-22T10:07:35
160,141,386
0
0
null
null
null
null
UTF-8
Python
false
false
170
py
18Json反序列化3.py
# Author:Steve #多次反序列化,但是3.0无法load多次,所以无法多次 f=open("test.txt","r") import json data3=json.loads(f.read()) print(data3['age'])
9ba0eb48424132636122464bf8c4f28270614e12
42516b0348936e257d04113c2e632dc72ba58e91
/test_env/test_suit_launcher/test_suit_launcher_case2.py
f98f3782e039f0b7c0fcb6ccb691c05278fa3d19
[]
no_license
wwlwwlqaz/Qualcomm
2c3a225875fba955d771101f3c38ca0420d8f468
a04b717ae437511abae1e7e9e399373c161a7b65
refs/heads/master
2021-01-11T19:01:06.123677
2017-04-05T07:57:21
2017-04-05T07:57:21
79,292,426
1
1
null
null
null
null
UTF-8
Python
false
false
766
py
test_suit_launcher_case2.py
from case_utility import * from qrd_shared.case import * from test_case_base import TestCaseBase ############################################ #author: # liqiang@cienet.com.cn #function: # 1.Home screen, long press blank space. ############################################ class test_suit_launcher_case2(TestCase...
db88e283877297581d35c68c9122e27b4bc9623f
5d0546717ca236def4e741f8677f60b47d83d4bf
/Arcade/The-Core/Loop-Tunnel/rounders.py
cfefce7f3cd9cfb3e2359d6b8ce12153542b6086
[]
no_license
javokhirbek1999/CodeSignal
067ceab417edf82b8d47a1692c2588b89726ffa0
4075532ec9e1ee8688d32cf886f8eccafea67d62
refs/heads/main
2023-08-14T06:11:01.490290
2021-09-21T19:04:36
2021-09-21T19:04:36
349,864,572
3
0
null
null
null
null
UTF-8
Python
false
false
293
py
rounders.py
def rounders(n): s = [int(i) for i in list(str(n))] k = -1 for i in range(len(s)-1): if s[k] != 0 and s[k] >= 5: s[k] = 0 s[k-1] +=1 elif s[k] != 0 and s[k] < 5: s[k] = 0 k-=1 return int("".join([str(i) for i in s]))
73b90e32d164947e9c74c79c6629479b5c1d0ae3
ba697e1272c8be95b3906a723d6adad49173654f
/src/search/functions.py
b6ce658d901d76aa18dcf9e99385d56261cf0d16
[]
no_license
Diallo/Zoekmachines-Final
1a7bbceb5366efd4bdb87608f0c5c924a4d460c1
250ae3424be51f9812c1342b8748855b133b1cb7
refs/heads/master
2020-03-31T16:54:44.862280
2018-10-28T21:49:29
2018-10-28T21:49:29
152,397,527
2
0
null
null
null
null
UTF-8
Python
false
false
4,275
py
functions.py
""" Description """ from autocorrect import spell from nltk.corpus import stopwords from src.server import app def search_multiple(fields,transcript): query = {"query": { "bool": { "must": [], "should": [], } } } # TODO: descripti...
672196a8707a880cf22a25e50efa5bb7549d2606
e638eecb84283087fe70c56ed5a7073a75e53c7f
/project/shop/API/closet.py
7f9e146d0afd38905eff3b40bf613db911b33035
[]
no_license
shunnyjang/Prography-Dahaeng-Backend
61e8a7e70e15fb0670046a9d73a17cf332bb89d8
db1b012c586b2e3bcc6e7a23e9518e7f333ea30b
refs/heads/master
2023-02-22T14:09:58.516945
2021-01-16T06:00:01
2021-01-16T06:00:01
null
0
0
null
null
null
null
UTF-8
Python
false
false
2,579
py
closet.py
from drf_spectacular.utils import extend_schema from rest_framework.views import APIView from rest_framework.response import Response from config.permissions import MyIsAuthenticated from core.models import Profile from core.ERROR.error_cases import GlobalErrorMessage, GlobalErrorMessage400 from shop.models import It...
9d6737139c307e05615acf1a755961fdd953ff8e
8115eecdaccd82da8b9e75dae6ff46e2199dcdac
/notebooks/migrations/0006_auto_20210906_2115.py
68fffc1fe04cbeee64e7099103ea615f06334aee
[]
no_license
noushkia/data-platform
ab53231a982c2c78089959d08a6e2f0f29ff08f7
4a1393ddc7cb4e8947c07b653ab597ef2ba5dae0
refs/heads/main
2023-08-02T16:41:14.363584
2021-09-08T07:24:08
2021-09-08T07:24:08
405,649,152
3
0
null
null
null
null
UTF-8
Python
false
false
766
py
0006_auto_20210906_2115.py
# Generated by Django 3.2.6 on 2021-09-06 16:45 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('datasets', '0008_alter_dataset_data_source'), ('notebooks', '0005_auto_20210904_1329'), ] operations = [ ...
0a57ac1340d1ebf9130464fc93a7ee53e0141977
cbe47638660f33a9c49901236797995466c38977
/Solutions_CS20M064/question2iii.py
d11e734f9db72e4cde9f22e05c45522e752a1e14
[]
no_license
shubham303/ML-assignments
becd9b73b0b06c6263f0af13a5edbab4f573318b
6bf3bd2c0852aa02a6cc0123caa6f01ee56902ce
refs/heads/master
2023-02-25T22:20:34.419057
2021-01-28T19:51:03
2021-01-28T19:51:03
333,896,548
0
0
null
null
null
null
UTF-8
Python
false
false
1,075
py
question2iii.py
import glob from PIL import Image from numpy import asarray import numpy as np from numpy import genfromtxt from numpy import linalg as LA import matplotlib.pyplot as plt from mpl_toolkits import mplot3d import matplotlib import math import random def distance(A,B): i=0 n=len(A) distance=0 while(i<n): ...
9e1b1a4303f231131d6bd5caee4056d7487e4b68
2f98aa7e5bfc2fc5ef25e4d5cfa1d7802e3a7fae
/python/python_15426.py
5112426cfc9ca03973c679426fb54d4a57f3fd71
[]
no_license
AK-1121/code_extraction
cc812b6832b112e3ffcc2bb7eb4237fd85c88c01
5297a4a3aab3bb37efa24a89636935da04a1f8b6
refs/heads/master
2020-05-23T08:04:11.789141
2015-10-22T19:19:40
2015-10-22T19:19:40
null
0
0
null
null
null
null
UTF-8
Python
false
false
98
py
python_15426.py
# Using Theano.scan with shared variables Tsumprod = theano.function([], outputs=Tsumprod_result)
99e8c1de00b7a8f8d13a558dd87c59e1ebc51f12
15af7eec62ec3acc2bc3ea08fcff02f67bb70e30
/app/fixtures/test_report_builder.py
6bd21c7de8df435bdbed6646ea4a88d370dbb7f4
[ "BSD-3-Clause" ]
permissive
michaelscales88/falcon_reporting
198b4fe0dc84bd3706c77721b2cabdd35d731b4e
939501e1709710a833ef0da67227413b89f1f49d
refs/heads/master
2021-06-19T15:12:09.320059
2017-07-19T15:18:53
2017-07-19T15:18:53
78,150,267
0
0
null
null
null
null
UTF-8
Python
false
false
2,255
py
test_report_builder.py
from app.lib.report_builder import ReportBuilder from app.lib.sla_cache import cache from app.lib.sla_report import report from pandas import DataFrame from sqlalchemy import func from app.fixtures.base_test import BaseTest from app.report.src.call_center import CallCenter class ReportBuilderTest(BaseTest): def...
3d3598ae6c586433749d8637fe5ad2adf53ca2cb
f40290d6bbec25f3a3a95f39e83460aaeeb80a65
/a1/code/GradientDescent_Numpy.py
3243f1435bab94e70117c65290ce9ac372bdc676
[]
no_license
xunathan96/ECE421
2bb1cd2167cebf3a6770f4dfdfab80bad2ae627e
9e8f6af4ea457db66ba66e562f7913fa0debfbdc
refs/heads/master
2020-04-21T19:07:42.648785
2019-04-05T05:16:45
2019-04-05T05:16:45
169,795,331
0
1
null
null
null
null
UTF-8
Python
false
false
2,293
py
GradientDescent_Numpy.py
from starter import * def gradMSE(w, b, X, y, reg): N = np.size(X, 0) # number of rows in X ones = np.ones(N) gradMSE_W = (1/N) * X.T @ (X @ w + b - y) + reg*w gradMSE_B = (1/N) * ones.T @ (X @ w + b - y) return gradMSE_W, gradMSE_B def gradCE(w, b, X, y, reg): N = np.size(X, 0) ...
ce4d26831b6e1f3d67b9fb6966aa612aa300a8a0
ce8b77ebda03144a0c8a5901bfabf45453cca4d5
/cliente.py
c13587bc58aec710a283de6dba0f966683a9a0c3
[]
no_license
acissejnotosi/ProcessamentoDigitalImagens
a8cb3e92abeab302b04600ac5aed32683972a3f0
68f87dc30b03481d5dba873114fbbe9be7e40719
refs/heads/master
2021-06-24T08:10:18.115651
2017-09-10T14:41:51
2017-09-10T14:41:51
103,036,505
0
0
null
null
null
null
UTF-8
Python
false
false
4,867
py
cliente.py
#!/usr/bin/python ##Client RestFul in python ##Author: Allan Patrick ##Distribuidos ## run command line use $ python3 client.py import urllib.request, json, sys,requests,ast, random print ("Welcome to REST Bank!") # Cliente brief entry witch the client have the option to entry with a account already existence test...
2f70f977c59cd6a1872f32cb58156c2e29baab36
af99a4f094784eaf6c7310b46e5dee07a12d052c
/python-practice/project-euler/problem_seventeen/library/helpers.py
f6a8697559bc2e4c9a68f25b2140d4f6c78f57ba
[ "MIT" ]
permissive
zacharyaanglin/python-practice
66214e27aa14af716c2325e6c656a5b58961030b
6f3927fa844d2b87c69f85f185b40ab3a1eee7dc
refs/heads/master
2021-06-25T00:34:51.032369
2020-11-20T18:01:36
2020-11-20T18:01:36
176,119,436
0
0
null
null
null
null
UTF-8
Python
false
false
1,617
py
helpers.py
"""Helper functions to solve problem seventeen.""" from typing import Dict from library.constants import number_words def translate_num_to_words(num: int, number_words: Dict[int, str] = number_words) -> str: """Translate an incoming number to its English written representation.""" thousands = num // 1_000 ...
034e30a771db876b8bfbdfbaee5f0a4a1aeac323
b3b9984fee0f4f9d3a980fb1e1b27d0df4532944
/aux/cypher/aes/__init__.py
19f5b0c8c5e0720d53d125234fdcd9393688409a
[]
no_license
henrique-marcomini-movile/cryptopals-challenge-solves
fdf312ee964d806f8cd54f19edc8eea661dd34e7
cd3ef6959c798bd7b41138618ceafe3b067f92de
refs/heads/main
2023-02-15T18:32:06.977136
2021-01-19T02:36:49
2021-01-19T02:36:49
285,546,280
1
0
null
null
null
null
UTF-8
Python
false
false
4,486
py
__init__.py
from aux.cypher.aes.operations import add_sub_key, break_in_grids_of_16, expand_key, extract_key_for_round, mix_columns, rotate_row_left, sbox_reverse_lookup, sbox_lookup from aux.padding import padd_PKCS7 class AES(): def __init__(self, key, mode="ECB"): self.key = key self.mode = mode def ...
62b8384f5fbc53f8485bd84bb1615ee464433d89
6af80f9a6aeca9c1b65092afcbbc6ff7608b844a
/Rockland/bidsify_nfb_logs.py
8b96bd984173f95e175dfd4c76eee8129a9e7967
[]
no_license
FCP-INDI/indi_bidsification
0d34dac3debc982e0ea21a691d5541b3173d28f3
f45c831f78c58b4525222f8a9d6c0a6b0500792d
refs/heads/master
2020-07-15T23:51:10.012208
2017-05-18T21:25:02
2017-05-18T21:25:02
73,956,486
4
1
null
null
null
null
UTF-8
Python
false
false
2,637
py
bidsify_nfb_logs.py
#!/usr/bin/env python ''' bidsify_nfb_logs.py Usage: bidsify_nfb_logs.py <datadir> <outdir> <taskname> ''' import os, sys import pandas as pd import shutil import re import commands if not len(sys.argv) == 4: print "Usage: %s <datadir> <outdir> <taskname>" % sys.argv[0] sys.exit(1) datadir = sys.argv[1] outdi...
74f4a5ab61775b3d141029ae090864d513e75e7d
6ab3def2012b67eedfcdac36608d4906c7e27510
/models/roberta_encoder.py
860e11f9b34fedb0f6eb0896a42efd7fb132cc7f
[]
no_license
fvlieshout/ATCS_group1
0fc12563546f7c977ab253ad4ea90f13f6425034
54d41e199d3e018ac77cc916258db4b1b8198178
refs/heads/main
2023-05-13T00:38:19.356206
2021-05-28T17:53:56
2021-05-28T17:53:56
362,404,181
0
0
null
2021-05-28T15:57:14
2021-04-28T09:03:57
Python
UTF-8
Python
false
false
2,022
py
roberta_encoder.py
from torch import nn from transformers import RobertaModel class RobertaEncoder(nn.Module): """ Wrapper for the roberta model, which loads the model from HuggingFace, possibly freezes some of the layers, and conducts the forward pass. """ def __init__(self, h_search=False): """ Ar...
644eda0fe3ecaf0fc288b844d686c113efd1623e
76f70aee589eae0436e062d7b45bddac8713587f
/dashboard/api/viewsets.py
62240ad713b9f70d14c86929c7d146f8ea857821
[]
no_license
princedograAU/type2beat
426ae8b661f4cd15db4b126226a9e233efd800a4
1347ad0375bd9d1c1ccb687638e0da1599cf1615
refs/heads/master
2023-01-19T07:35:12.672037
2020-11-25T05:10:24
2020-11-25T05:10:24
297,223,973
1
0
null
null
null
null
UTF-8
Python
false
false
1,257
py
viewsets.py
from rest_framework.permissions import IsAuthenticated from rest_framework.authentication import SessionAuthentication, BasicAuthentication from rest_framework import viewsets from rest_framework.response import Response from dashboard.models import FoodItem, MedicalRecord from .serializers import FoodItemSerializer, ...
7655897cbf39b616c470f437ef8f2d71d007ce17
c7a0a74ec7470fa3051e398ca879599c9f58e39c
/samples/python/mnist/MnistDifferentiableLutSimple.py
91fbdcc089c1f8d783dcff90afeebe1156279d62
[ "MIT" ]
permissive
ryuz/BinaryBrain
cd79019f4b1cbc5b7c03889f4274b7b06d082eeb
d03c890e2da046f5cb5567856a748f31a3726cba
refs/heads/master
2023-08-29T11:32:01.912092
2023-08-15T09:26:18
2023-08-15T09:26:18
143,534,336
105
15
MIT
2023-08-15T09:26:20
2018-08-04T14:10:46
C++
UTF-8
Python
false
false
3,995
py
MnistDifferentiableLutSimple.py
# -*- coding: utf-8 -*- import os import shutil import numpy as np from tqdm import tqdm import torch import torchvision import torchvision.transforms as transforms import binarybrain as bb def main(): # configuration data_path = './data/' net_name = 'MnistDifferentiableLutSimp...
2493a5d965eb1e402f9b230e03c87c54bef7d2a2
a39343e7ac54bf453d0d0b34a635747d502975ce
/v3.1/gamepad.py
4b58d477c7c78729552e440bced80e691de1fc8a
[]
no_license
Jess15/Ioby
a29484f044a47b9a603fe04aeb815e76feec0ebf
165bb286cff8aecc59d25d4abbaf7c20313d47b5
refs/heads/master
2021-01-11T16:12:16.263023
2017-01-25T17:08:23
2017-01-25T17:08:23
null
0
0
null
null
null
null
UTF-8
Python
false
false
4,409
py
gamepad.py
###Code Version: 3.0 from moves import Move from threading import Thread import pygame import time class gamepadConnect(): def __init__(self): pygame.init() pygame.joystick.init() self.moves = Move() self.moves.stop() self.flag = True self.tmpDirectionalValue = 0 ...
0d453d102e72b31de072ef8f8ecc5188abfae879
832f4bb6b0e7e9f2d298b1c8f7089b2af928da6b
/labs/lab9/checkpoint5.py
42e75158545c53eed6f496bfd605afb640283e81
[]
no_license
tsanford13/OSS-Labs
5d90b2b45c38d2211b0f4063835c52df2462a00d
c8f0ab53974580bcd0f14999cb002e2ef243aa6e
refs/heads/master
2023-04-17T23:33:31.916084
2021-04-15T19:18:37
2021-04-15T19:18:37
336,667,355
0
1
null
null
null
null
UTF-8
Python
false
false
1,065
py
checkpoint5.py
from pymongo import MongoClient import datetime import random import copy client = MongoClient('mongodb://localhost:27017/') db = client['mongo_db_lab'] collection = db['mongo_db_lab.collection'] definitions = db.definitions def random_word_requester(): ''' This function should return a random word and its de...
095651fe056bc05a35b7ce27afccb73982cbad38
da6b79902775c30911eabf791b55898a6136a9a1
/database_handler/pidor_handle.py
0b442b938982631562e1ec410e6b0cc053c8b63a
[]
no_license
s3b00/ToolsBot
1d9e7df8c75a64e08cde6c0766cd39a029d5e18e
7aa887fa3582ed40edef5b988c9d0056aad899e9
refs/heads/master
2023-07-05T04:15:09.575044
2021-08-17T15:31:13
2021-08-17T15:31:13
387,596,888
1
0
null
null
null
null
UTF-8
Python
false
false
2,413
py
pidor_handle.py
import sqlite3 conn = sqlite3.connect("mydb.db") cursor = conn.cursor() def pidor_games_members_add(groupid): cursor.execute(f"""INSERT INTO pidor_games_member VALUES ('{groupid}', '0') """) conn.commit() def pidor_games_members_remove(groupid: str): cursor.execute(f"""DELETE FROM pidor_game...
5f4959cdbf33092b2fa465b6605183e5204fd4d9
f61e3c7384a8672ccae11a768f46517a296993c5
/neural_networks/tf_rnn.py
5bdffa61d13679b5d2bb67deb3c9fa4d94c83703
[]
no_license
giacomolanciano/sequence-classification
dbf8f48fe6aecb93e8d057748fb6b4e89e5eac9a
248a704857647a3ff9e827d9ee542c3a3036069c
refs/heads/master
2021-01-20T12:10:56.259340
2017-06-05T09:29:17
2017-06-05T09:29:17
81,941,743
3
0
null
null
null
null
UTF-8
Python
false
false
8,412
py
tf_rnn.py
import os import sys import functools from datetime import timedelta import tensorflow as tf import matplotlib.pyplot as plt import time import numpy as np from memory_profiler import profile sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.path.pardir)) from machine_learning.sequence_classifier_input i...
422b4971a9a35c47997f4cbc014fefb898c21370
2031771d8c226806a0b35c3579af990dd0747e64
/pyobjc-framework-AVFoundation/PyObjCTest/test_avmidiplayer.py
3bc88546d77973b69165270261ae70494ac01de4
[ "MIT" ]
permissive
GreatFruitOmsk/pyobjc-mirror
a146b5363a5e39181f09761087fd854127c07c86
4f4cf0e4416ea67240633077e5665f5ed9724140
refs/heads/master
2018-12-22T12:38:52.382389
2018-11-12T09:54:18
2018-11-12T09:54:18
109,211,701
2
0
null
null
null
null
UTF-8
Python
false
false
584
py
test_avmidiplayer.py
from PyObjCTools.TestSupport import * import AVFoundation AVMIDIPlayerCompletionHandler = b'v' class TestAVMIDIPlayer (TestCase): @min_os_level('10.10') def testMethods(self): self.assertArgIsOut(AVFoundation.AVMIDIPlayer.initWithContentsOfURL_soundBankURL_error_, 2) self.assertArgIsOut(AVFou...
48605764f59fbfb60558a854e65c27db78992688
bc43b8675b190d08ad45da86fbbee0f61052829f
/python_block-main/파이썬 강의/fast.py
a299276b791b650e1331f4a45750571cdf142dfb
[]
no_license
MONO-ON/python_study
e4c7d063ea72b4f49edd2d66fd24734db75f92ed
be03737362fc188ba8d1fb91fa3aa3c9fdd29074
refs/heads/main
2023-06-30T09:10:12.621121
2021-08-03T02:59:30
2021-08-03T02:59:30
390,617,992
0
0
null
null
null
null
UTF-8
Python
false
false
90
py
fast.py
from random import choice def pick() : return choice(['서울', '성남','대구'])
4a975572141eae25f62c0d1d2e58527e9cab701f
59fe5992a0494ab5514dc6f1708d149d800bbd72
/short_scripts/VideoReaderMPE.py
4c548e8c10b28ce3978b104c544c77faa0d023e7
[]
no_license
chamecall/scripts
5aae23b62e432f80c069cc411d2443a11bd8d19b
0f316a925370fe8d45c905a06ad42f1c88fa5946
refs/heads/master
2022-11-29T03:56:16.978004
2020-04-04T18:55:39
2020-04-04T18:55:39
252,541,026
3
0
null
2022-11-22T05:07:56
2020-04-02T18:55:49
Jupyter Notebook
UTF-8
Python
false
false
1,023
py
VideoReaderMPE.py
import cv2 import moviepy.editor as mpe import numpy as np class VideoReader: def __init__(self, video_file_name): self.cap = cv2.VideoCapture(video_file_name) # self.cap.set(cv2.CAP_PROP_POS_FRAMES, 4950) video = mpe.VideoFileClip(video_file_name) self.length = video.reader.nframe...
7ab122c485b7510e5b598696d15fa3f1461020d6
dd39545b32bda8a793037229ab649b5c29d6773d
/utils/util.py
5c56b594f722fefd7df77b2deffedfaf8d43c778
[]
no_license
baldimario/wnet
8781e15c19c808aa3a35b3f167c198ea0bab5072
5f08a94d3797d23c1aa04f1868a259ff55f5dcf1
refs/heads/master
2022-09-22T12:58:52.652079
2020-05-26T20:48:04
2020-05-26T20:48:04
267,052,524
0
0
null
null
null
null
UTF-8
Python
false
false
333
py
util.py
import numpy as np def receptive_field(n_layers, n_dilation_depth, factor=2): kernel_size = 2 dilation = lambda x: factor ** x dilations = [dilation(i % n_dilation_depth) for i in range(1, n_layers+1)] return (kernel_size - 1) * sum(dilations) + 1 #return n_stack * (2 ** n_dilation_depth) - ...
56119a14b4390e6ce4da08d6d0ac141efc598819
b9c795006a35ff3347e59d04db898860100747f2
/setup.py
adeb9b9e669d3392105f3b9514b677a4a5675a3e
[ "MIT" ]
permissive
uhurun/django-notifs
6f280c71d4bdf203bc94dca4a53c9e355e495789
c8c408948874d3edf5d9260e91be212ab3dd81d6
refs/heads/master
2023-04-30T05:38:28.208481
2021-05-27T00:09:20
2021-05-27T00:09:20
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,305
py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from os import path from setuptools import find_packages, setup # Package meta-data. NAME = 'django-notifs' DESCRIPTION = 'Modular notifications for Django' URL = 'https://github.com/danidee10/django-notifs' EMAIL = 'osaetindaniel@gmail.com' AUTHOR = 'Osaetin Daniel' REQ...
59f6ef31ac07071cee76dacace608e68efa1bcbc
cf4414958a5bea19c26802dcff01b225a2c4c8c6
/countries/admin.py
c5a0f42d8c2c322a326b07fe9a7052e881acb44c
[]
no_license
menosbel/django-countriesAPI
75fa871ad4fcdfb7f832d9c4ca49f9efc5476bd3
7d50702a35a4c96d4f9cd491fb46b8ebb35a4ce3
refs/heads/main
2023-04-12T15:51:00.982705
2021-04-25T14:38:23
2021-04-25T14:38:23
361,452,514
0
0
null
null
null
null
UTF-8
Python
false
false
95
py
admin.py
from django.contrib import admin from .models import Countries admin.site.register(Countries)
73da5b1e424f5ce3e1324b1ff6e16bc29647a8f9
edbaaf7e68c5ae78f6d0d4b964baa4e30b4f88bc
/app/server/__init__.py
c6d24e2f1edcfcc7b123390d61736e51dbff0471
[]
no_license
soulhave/stack-gallery
52a71d0876f267befa5d5a0faf3769b9830f12b8
762435be26d90bd01c3cdf9b5b7ba602305bc9d5
refs/heads/master
2021-01-12T08:09:17.637167
2016-12-20T18:48:45
2016-12-20T18:48:45
76,485,747
0
0
null
2016-12-14T18:24:14
2016-12-14T18:24:14
null
UTF-8
Python
false
false
1,538
py
__init__.py
from server import util from flask import Flask import sys import logging from os.path import join, dirname, abspath, isfile from dotenv import load_dotenv logger = logging.getLogger('stack') dotenv_path = abspath(join(dirname(__file__), '..', '.env')) load_dotenv(dotenv_path) current_path = dirname(__file__) client...
5ce9964e3d845cf75477f5a5e9ca4101d5e5ae8f
15f58c27a8b8d79ff99198655f61eff277bfd37d
/TP/migrate/neo4j/init-csv.py
21ba254729b11369106bebb474725ec3f99db737
[]
no_license
beatrizfrocha/BDNoSQL2021
747cf9f00210a635d986c1000951f968b68ebb26
534e11b98895f80235b2ff1e4d7004e781f6dc89
refs/heads/main
2023-05-04T10:14:45.692872
2021-04-25T14:44:47
2021-04-25T14:44:47
null
0
0
null
null
null
null
UTF-8
Python
false
false
4,908
py
init-csv.py
import cx_Oracle import configparser import csv import glob import os import shutil from datetime import datetime from pprint import pprint from neo4j import GraphDatabase GEN_CSV_FOLDER = "gen_csv" INIT_SQL = "init.sql" EXPORT_FOLDER = "/var/lib/neo4j/import/gen_csv" def main(): # read configuration fi...
84dfabbdbab0c8e22f04e64fe5f950e7612e7306
38654a7c7f613a2d8f936c72306df17a38f9e8d6
/run.py
43d26b4c05581720f7fde930bd597ddddfa11709
[]
no_license
jpb80/workflowchallenge
b8db068f40c3a22386317f0d49e052350e983b09
1c159cb921e5187bef9b889693883c746557b63d
refs/heads/master
2020-12-03T06:40:27.512184
2017-07-03T15:33:31
2017-07-03T15:33:31
95,716,561
1
0
null
2017-07-02T02:26:53
2017-06-28T22:22:32
Python
UTF-8
Python
false
false
228
py
run.py
import os, sys FILE_PATH = os.path.realpath(__file__) head, tail = os.path.split(FILE_PATH) sys.path.insert(0, head + "/src/workflowapp/") import workflow def main(): workflow.run() if __name__ == "__main__": main()
0834c79790954f2ccc45da286d3d0474799c27f4
999f6b0dfdb387a8e4dfbbcda184582b26475a45
/promgen/management/commands/export-urls.py
c757b16491d8c34f345affbaef9f3449c19ffbc1
[ "MIT", "BSD-3-Clause" ]
permissive
line/promgen
86fc6f69969ed4197caca41242206716d88335ef
b99f2ba1c8f41d676d43ae9a5f63f1e4fff9b664
refs/heads/master
2023-08-19T11:46:12.251750
2023-08-18T04:50:12
2023-08-18T04:50:12
64,717,629
1,049
169
MIT
2023-08-18T04:50:13
2016-08-02T02:35:13
Python
UTF-8
Python
false
false
896
py
export-urls.py
# Copyright (c) 2017 LINE Corporation # These sources are released under the terms of the MIT license: see LICENSE import logging from django.core.management.base import BaseCommand from promgen import models, prometheus, tasks logger = logging.getLogger(__name__) class Command(BaseCommand): def add_arguments...
b8c3aabaf2b65a48729a42f23fa117c2cb02ca39
cb4a7dc3abc3fe1135aa8f8506aed872c0b92026
/run.py
794702ee9d6c83dc40c2ace01b40f2fb84524ae9
[]
no_license
s0i/one-per-person
2eada932e099da24fa5aae7d582e5e7d371969c4
d4445806c2197be909ab9a6a50dc7c8f6540f452
refs/heads/master
2021-11-23T15:35:50.819364
2021-11-04T16:46:39
2021-11-04T16:46:39
201,804,815
0
0
null
2021-11-04T16:46:40
2019-08-11T19:12:35
Python
UTF-8
Python
false
false
203
py
run.py
from core.search import Search if __name__ == '__main__': bot = Search() while True: try: bot.run() except Exception as e: print(e) break
8bc4fcb4dc405eaa4f4c25b507d43e3de9375c5a
79e06336e4d3e3dd50cc842809883f6e3b8976b6
/q1-nopackage.py
0930df595bd6ef3923c2d52146db816d5c7076ac
[]
no_license
fym0503/Signals-and-Systems-Hw
66a80f2ed272544af0e6c832af9c1894f724aa11
6c83de472433da9463bb106f76980161e552046f
refs/heads/master
2020-05-30T11:36:40.751405
2019-06-01T08:28:37
2019-06-01T08:28:37
189,708,828
0
0
null
null
null
null
UTF-8
Python
false
false
1,615
py
q1-nopackage.py
''' this is the code written by FYM this is the impletetion of the first question without using fft package ''' import numpy as np import matplotlib.pyplot as plt def f(x): return np.exp(-1*np.pi*x*x) def imagine_generator(n): return np.array([-1*np.sin(k*2*np.pi/1000*n) for k in range(0,1000)]...
ec60a103f9ac43513ee497509e302e7258c94835
865b77b175aaada8c31b9cf29c989967a3758121
/util/common_util.py
3095f62f4b10eaea0cd1d95db733354c59523984
[ "Apache-2.0" ]
permissive
LenKerr/BookManage
4ce9064b91f2d552f7a905f139f3e81ce1da38e1
7c90adf37e7cbd8b7cfeb8992c3a7ee86b263300
refs/heads/master
2022-07-07T05:42:30.575754
2020-05-12T02:26:22
2020-05-12T02:26:22
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,377
py
common_util.py
""" coding:utf-8 file: common_util.py @author: jiangwei @contact: jiangwei_1994124@163.com @time: 2020/5/9 20:09 @desc: """ import datetime import hashlib from PyQt5.QtWidgets import QMessageBox import uuid import frozen_dir SUPER_DIR = frozen_dir.app_path() ROLE_MAP = {'0': '管理员', '1': '普通用户'} APP_ICON = SUPER_DIR + ...
871d6125f4df036abc4155199129386017d95a25
248a00d550c9995216ac881fee455220aeed76e5
/simulator/tester.py
a82185fde15b566d65000f46c241cb52c16ed436
[]
no_license
BruscoDavide/Maximal-covering-OR-project
ed1bf48fdffe57859ad0d0ce27dcca4a20ad9e17
a52e57e1068bf2d13cb29cc46095aa3a9753ffcf
refs/heads/main
2023-06-10T16:37:33.730067
2021-07-02T22:26:33
2021-07-02T22:26:33
372,418,714
0
1
null
2021-06-04T12:19:24
2021-05-31T07:24:10
Python
UTF-8
Python
false
false
9,861
py
tester.py
# -*- coding: utf-8 -*- import os import time import logging import json from networkx.classes.function import nodes import numpy as np import gurobipy as gp from gurobipy import GRB def compute_succ(g, R, z_j): succ_computed=[] for i in range(len(R)): for j in R[i]: if j==z_j: ...
ff86107f00366000e76a395e787c884450f07791
8ee81ee9acf0652ae1c17e221a2e7e4ac40fe4ec
/Codility/counting_bounded_slices/fast.py
5ca11cdb66616064c6ef42878ba6392913e805a5
[]
no_license
veerapalla/cracking_the_coding_interview
b875c39a4411480c8bb752d40aa1d0427d58d28c
f10556d7e7a5e8de44190609f17d1c990053879d
refs/heads/master
2021-05-28T16:29:53.787989
2014-09-28T06:42:36
2014-09-28T06:42:36
null
0
0
null
null
null
null
UTF-8
Python
false
false
2,178
py
fast.py
#!/usr/bin/python # -*- coding: utf-8 -*- from math import log, ceil def build_seg_tree(A): """Build segment tree from an array and return an array.""" length = len(A) height = int(ceil(log(length, 2))) tree_size = 2 * 2 ** height seg_tree = list([float("inf")] * tree_size) build_seg_tree_help...
457fef5e3b913a35abd4ebfa40a5c345c80adb20
d94c5849e6308901f9af8a4edf8c8369d46576d1
/BOJ/13458_시험감독.py
3636cc3630c89670d9374c3d6b0d65015bab7e90
[]
no_license
AhnDogeon/algorithm_study
b4c961b934b5e27afccdf2713a2ccb0174d9a698
b8de39fff92cc98281ba7e94df82bcc9b1503243
refs/heads/master
2022-06-05T11:33:27.392131
2022-05-23T06:37:50
2022-05-23T06:37:50
188,783,176
1
0
null
null
null
null
UTF-8
Python
false
false
397
py
13458_시험감독.py
import sys sys.stdin = open('13458_시험감독.txt', 'r') N = int(input()) Ai = list(map(int, input().split())) B, C = map(int, input().split()) cnt = N for i in range(len(Ai)): Ai[i] -= B for j in range(len(Ai)): if Ai[j] >= 0: z = Ai[j] / C if Ai[j] % C: cnt = cnt + int(Ai[j] / C) +...
53762adc3250acfe43c5844c2dd9ece41b03a4df
dad5525a0756ab2bb5664ddcd3a82af5a03b5114
/Week 3/Almost_Rectangle.py
c9f42bd1bd46299b3271854ea9b044db1f492a9d
[]
no_license
renanbabinski/Competitive_Programing
2248b47c380d09960b61947e50dbd272ecc3b890
51203e4ef425b2fdf06ae7de0fa11282e2758af6
refs/heads/main
2023-07-16T17:07:12.878905
2021-09-02T01:21:42
2021-09-02T01:21:42
377,667,719
0
0
null
null
null
null
UTF-8
Python
false
false
1,381
py
Almost_Rectangle.py
import numpy as np t = int(input()) def append_array(array, x): array = np.hstack((array, x)) return array for i in range(t): n = int(input()) array = np.full((n,n), '.') for j in range(n): linha = list(input()) linha = np.array(linha) array[j] = linha mask = array == ...
88927d6abe7f1633febc57fd0b8e8989b2d779a5
edea96d26838eb8b440771222b48a2927479b58e
/crawler/crawler.py
c6f8637ffe4c89fd63362ecc574889b8d66d0eaa
[]
no_license
xorium/prog_writeups
1c563a44ff3216a41436c1a6cb390f26756aa5bf
b60463394c82c9ef2db7c3cfdefbbc9c359f0860
refs/heads/master
2021-01-22T15:51:12.846366
2018-02-02T13:34:55
2018-02-02T13:34:55
102,383,293
0
1
null
null
null
null
UTF-8
Python
false
false
7,433
py
crawler.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Requirements: sudo pip3 install ws4py """ import os import sys import json import time import traceback import logging from datetime import datetime from threading import Thread from ws4py.client.threadedclient import WebSocketClient """ WebsocketWorker class is f...
40f63b5e3fff396af71a1761ee6c27a8f961d583
079c14bcf35d886ec38834a428d8147bbf3d8dea
/Leetcode_30day_challenge/September_Challenge_2020/Day-14_House_Robber.py
29e7bcc45b36d2c4ce64f69eab10f165f5f04bc7
[]
no_license
yash-markad/Python-Competitive-Programming
882666a17dfd93346ed5f75609e5d9e8ad36ac46
7fc5d32115bf80f7210f591a2de9a53adc297d98
refs/heads/master
2023-05-28T12:00:45.892633
2021-06-16T11:13:02
2021-06-16T11:13:02
null
0
0
null
null
null
null
UTF-8
Python
false
false
364
py
Day-14_House_Robber.py
# Method 1 class Solution: def rob(self, nums: List[int]) -> int: n = len(nums) a, b = 0, 0 for i in range(n): if i % 2 == 0: a = max(a + nums[i], b) else: b = max(a, b + nums[i]) return max(a,b) #Method - 2 Can be don...
84ee51cb9c49e70e4685ea96c79b6c5a8d64ac95
8998e4da64a41950d2f027df0290a2feae8f4cab
/PUSB/main_linear_kernel2.py
70d3522291405b7cd7b202f0edaa0114943166fc
[]
no_license
bjutliulei/Positive-and-Unlabeled-Learning
323a825dd61995585d62472dbe9ad227527e0a65
c52d2024d85548a8469a17b83c94fa5ba1f4b812
refs/heads/main
2023-02-25T18:16:23.284594
2021-01-28T09:48:34
2021-01-28T09:48:34
null
0
0
null
null
null
null
UTF-8
Python
false
false
5,466
py
main_linear_kernel2.py
''' Libsvm数据格式 ''' import numpy as np import pandas as pd from sklearn.linear_model import LogisticRegression from sklearn.metrics import f1_score from pusb_linear_kernel import PU from densratio import densratio from Conversion import CSV def experiment(): percent_p = 3 path = r'C:\Users\yyveggie...
36c3d76b4453dfd19fef117b3805d9a2c913010a
2772f804bae2bf1dad1c9fcab435c98696465c65
/二刷+题解/剑指offer/isBalanced.py
b8c2c77ee9ec59db0be7bdf635d75b4dac520ac3
[]
no_license
1oser5/LeetCode
75e15a2f7a1a7de1251fe5f785ad06a58b4b8889
40726506802d2d60028fdce206696b1df2f63ece
refs/heads/master
2021-07-19T04:40:17.637575
2020-09-30T00:16:39
2020-09-30T00:16:39
211,662,258
0
0
null
null
null
null
UTF-8
Python
false
false
875
py
isBalanced.py
#!/usr/bin/env python3 # -*- encoding: utf-8 -*- ''' @File : isBalanced.py @Time : 2020/04/17 08:36:15 @Author : Apus @Version : 1.0 @Contact : snoopy98@163.com @License : (C)Copyright 2020-2021, HB.Company @Desc : None ''' # here put the import lib # Definition for a binary tree node. # class ...
16879598a8b1a0b23c5ea6de18f8fb0b0b77201c
618785dcf2424ac92c59daa3706c0b554fb5a72c
/config.py
02f12d929b7ffe2c09741f7f01fb07ebcac04370
[ "MIT" ]
permissive
casperboone/sleepcycle-webhooks
eb385511cac671612cadefc533aa9c5c9fc294aa
a6c3982c38216ba691ea13dbc50b62cffa175b40
refs/heads/master
2020-12-26T09:37:50.839215
2020-01-31T16:23:06
2020-01-31T16:23:06
237,468,415
0
0
null
null
null
null
UTF-8
Python
false
false
227
py
config.py
from functools import reduce import confuse config = confuse.Configuration('SleepCycleWebhooks') config.set_file('config.yaml') def get(path): return reduce(lambda view, part: view[part], path.split('.'), config).get()
267695555e876dc2fe5820dc194490aad9e5e344
43638719264ed7fd9ba5d5161990b023b8a46d48
/Cluster/cluster.py
07a16c03ca9493668ef4f8a7b26afe3c96cb55c4
[]
no_license
Kyeonga-Kim/Data-Analysis_PJ
638b63147e85455c2e4726ea7ab4d3571d09c0c0
fa3f0936e005ba120abac0db2949d65804fcfc53
refs/heads/master
2023-02-19T14:27:31.465528
2021-01-20T13:08:14
2021-01-20T13:08:14
257,752,587
0
0
null
null
null
null
UTF-8
Python
false
false
5,058
py
cluster.py
#library import pandas as pd import numpy as np import sys from tqdm import tqdm # appear the precess of running situation. import time from scipy.spatial.distance import pdist, squareform #0. Data Load data = pd.read_csv(sys.argv[1], delimiter='\t') # Load train (input text file) #1. Data Preprocessing all_element...
61f2fbed184ff6f842ba9527456da453844f8dc6
99d192f941b6b76fe83906b2d92f43e889e315a9
/3.b. Data Types - Strings (Veri tipleri - Dizinler).py
ebe4f377318be3d66f4ebf2b0b0010578734b0e3
[]
no_license
gokayozcoban/3.b.-Data-Types---Strings-Veri-tipleri---Dizinler-
9b6c0c451087a647b9e4435dbcea5b07266a7a93
3f35e46de844da0535bfa716d4a6c3c65810b127
refs/heads/main
2023-02-09T03:17:32.322028
2020-12-31T21:28:05
2020-12-31T21:28:05
325,630,166
0
0
null
null
null
null
UTF-8
Python
false
false
1,417
py
3.b. Data Types - Strings (Veri tipleri - Dizinler).py
# DATA TYPES (DATA TİPLERİ) # STRİNGS (KARAKTER DİZİNLERİ) # Bir karakter dizinini tanımlamak için tırnaklar kullanılır. birkaç satır ka- # rakter dizini yazıyorsak 3 tırnak kullanılır: print("""Üç tırnaklı karakter dizinine örnek""") üç tırnaklı karakter dizinine örnek print('Tek tırnak: Tek satırlık...
2b87b8571664989e78790bd9df23eee9cbd44035
6497bc5638453877744c900f7accef0203f36e89
/微信自动回复/main.py
5db822c3c6895dcb2e31e1e1b98ec6290921576d
[]
no_license
budaLi/leetcode-python-
82e9affb3317f63a82d89d7e82650de3c804a5ac
4221172b46d286ab6bf4c74f4d015ee9ef3bda8d
refs/heads/master
2022-01-30T00:55:26.209864
2022-01-05T01:01:47
2022-01-05T01:01:47
148,323,318
46
23
null
null
null
null
UTF-8
Python
false
false
249
py
main.py
# @Time : 2019/12/12 15:54 # @Author : Libuda # @FileName: 远程服务器文件监控.py # @Software: PyCharm import itchat @itchat.msg_register(itchat.content.TEXT) def text_reply(msg): return msg.text itchat.auto_login() itchat.run()
9c3f6c368c764918da5cce44da574b7c041fa414
03d975dd4ec370e01f98ca94364d721f5558b6eb
/src/Node.py
d0a1ad72b7ea5d25c3208c3a487a50d18827f22b
[]
no_license
ItaiLash/ex3
5158ed1fd87d3f9b9bdca9ffb8938c2ace999e6a
1943a7363cd4099f8a3cccb1eec958c5ffee3969
refs/heads/master
2023-02-22T08:07:07.989236
2021-01-12T16:15:41
2021-01-12T16:15:41
327,679,384
0
4
null
null
null
null
UTF-8
Python
false
false
3,734
py
Node.py
class Node: """ This class represent a node (vertex). """ def __init__(self, k: int = None, loc: tuple = None, **kwargs): """ Each node contain dew fields: key: node_id. location: node's position represent as 3DPoint. ni_out: a dictionary that holds all the "edge...
21d261dec6668a24030f37b7dcb87c0132e63528
74e26d51edc6361f7eb57a5988d64f42e9b6bd3b
/mysite/core/views.py
24c4b8923e7ce3e735c93912ea313df2ec156605
[]
no_license
oronibrian/zalegoWebInteview
4a6cf485f9c2e192b5f2089693776137334c3153
0a0634d54974dd9b3e83bfbb708c816f1c78b348
refs/heads/master
2020-03-17T20:45:25.421941
2018-05-18T10:52:14
2018-05-18T10:52:14
133,927,238
0
0
null
null
null
null
UTF-8
Python
false
false
1,219
py
views.py
from django.contrib.auth.decorators import login_required from django.contrib.auth import login, authenticate from django.shortcuts import render, redirect from mysite.core.forms import SignUpForm,UserProfileForm from django.views.generic import UpdateView from .models import Profile from django.contrib.auth.mixins im...
c8565e1b5659dd0908aabf91e07738a798dc3232
463b81f5800fbc442ddf39e24e616d5c4cbec3f3
/Master Machine Learning A-Z (Udemy)/Machine Learning A-Z/Part 2 - Regression/Section 8 - Decision Tree Regression/Lesson6.py
13d7190c2ce5cb5582d4dd3eada4d060a7232487
[ "MIT" ]
permissive
ngiakhanh/MasterMLUdemy
083a3655e6332ebaacb8dca4a568aadd3895032b
ddbfb62256e02452d02c07d3c51dc076e0ce0421
refs/heads/master
2020-05-22T13:09:37.640802
2019-05-13T05:33:38
2019-05-13T05:33:38
186,351,233
0
0
null
null
null
null
UTF-8
Python
false
false
761
py
Lesson6.py
import numpy as np import matplotlib.pyplot as plt import pandas as pd dataset = pd.read_csv('Position_Salaries.csv') X = dataset.iloc[:, 1:-1].values y = dataset.iloc[:, dataset.shape[1]-1].values #Fitting the Decision Tree Regression from sklearn.tree import DecisionTreeRegressor regressor = DecisionTreeRegressor(r...
53cd9d5a79e97bb1af69446a82c747248c3cc298
21a17a87d7060230fe1a284f22ab17170d81b0cf
/sentry_sdk/_werkzeug.py
197c5c19b1eb14b4f1740dd3c67a348aadd0f290
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
getsentry/sentry-python
7af29660fc9dfccf2b44e91d050b004523d5a464
7a7867b2fe0ad8b3d7aeea778b2992b1c506509d
refs/heads/master
2023-08-31T11:14:32.795497
2023-08-30T07:38:21
2023-08-30T07:38:21
137,814,779
1,634
501
MIT
2023-09-14T09:52:34
2018-06-18T22:51:10
Python
UTF-8
Python
false
false
3,790
py
_werkzeug.py
""" Copyright (c) 2007 by the Pallets team. Some rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the f...
ee5e970f32b1d601f9dc3ab37a5028ce7ff8a32e
0998a98fd2658ab5ed5f8c5fca50cef4c6f58f2c
/第二章 变量和简单数据类型/2.2变量.py
3ad6e0895a9b2d22965c37a05380a5f2a5eeb23f
[]
no_license
moran-ai/python-baise
50fdece066c206c43f2a476f75f50afdad8de88e
fcbee59325a8c288fbe9132964d80118b7220e6e
refs/heads/master
2020-09-17T11:00:56.442418
2019-12-15T08:56:24
2019-12-15T08:56:24
224,081,632
0
0
null
null
null
null
UTF-8
Python
false
false
78
py
2.2变量.py
# message 为定义的变量 message = 'Hello Python World ' print(message)
8d1067a9bb0629276ef27de91f63cf2370a44e24
8142863ae96501aacea140953f052a19cf7b51a8
/scripts/protocol/protocol.py
8369fdca289f5dda1a59fbd686b3536456a6ace4
[]
no_license
temp-man/QABot
88508fd145a10f2fb9615555ca83a283d1ff8fdf
7616ae90bcadb02adaf401ffa9a0cdc2857773b3
refs/heads/master
2020-12-24T17:17:34.821173
2014-06-30T05:46:31
2014-06-30T05:46:31
21,331,145
1
1
null
null
null
null
UTF-8
Python
false
false
741
py
protocol.py
from abc import ABCMeta, abstractmethod __author__ = 'Alexiy' class Protocol: """base protocol class""" __metaclass__ = ABCMeta FAIL = 'Failed' @abstractmethod def execute(self, command): """"execute command method""" class LocalProtocol(Protocol): """simple protocol for using bot...
99e2e793522f4237bdb85c22c2067d4a230584e0
38453ed90ea825bda25e6fcdda05744eefda855e
/reconstruction/general_utils/terminal_utils.py
f4ef5aa9a8dc192916e9941d7ba06c04888ed059
[ "Apache-2.0" ]
permissive
tecdatalab/biostructure
4b50f297932b2394d924e7de64f0d957f219dffd
a30e907e83fa5bbfb934d951b7c663b622104fcc
refs/heads/master
2023-08-31T00:32:08.694944
2021-06-05T20:21:45
2021-06-05T20:21:45
164,712,917
0
0
Apache-2.0
2023-01-07T18:31:01
2019-01-08T18:53:02
PLpgSQL
UTF-8
Python
false
false
335
py
terminal_utils.py
def get_out(*args): import getpass, subprocess args1 = list(args) if args[0] == "chimerax": if (getpass.getuser() == "lcastillo"): args1[0] = "ChimeraX" result = subprocess.run(args1, stdout=subprocess.PIPE, check=True, timeout=900) exit_text = result.stdout.decode('utf-8') return result.returnc...
3c0fda84ceaabfd9d2d4ccf8edf1861aef7d8b62
a63b33088836aeb87a7f4ee68e761ca42cdced18
/pro45.py
0435283276c514112f9cfd6e5cbd092e0767134a
[]
no_license
qinggeouye/ProjectEuler
e1e157cce014ad09ab2292e3253e8d9799e2602c
868594008969d0ace56cde5a85305096d3dbce47
refs/heads/master
2020-04-21T21:21:20.013312
2019-07-14T18:08:53
2019-07-14T18:08:53
169,876,654
0
0
null
null
null
null
UTF-8
Python
false
false
679
py
pro45.py
# find the next triangle number that is also pentagonal and hexagonal def triangular_pentagonal_hexagonal(): t = 286 p = 166 h = 144 while True: triangle = t * (t + 1) // 2 pentagonal = p * (3 * p - 1) // 2 hexagnoal = h * (2 * h - 1) min_num = min(triangle, pentagonal, h...
1175fec304ea0f8fe0668c58cdc08a5c17c2c12b
255021fadf9f739db042809ca95f5b9f75609ec5
/Baeckjun/10163 색종이.py
641bb19b84d748b4fa3463161e9f5ee2ba608def
[]
no_license
unsung107/Algorithm_study
13bfff518fc1bd0e7a020bb006c88375c9ccacb2
fb3b8563bae7640c52dbe9324d329ca9ee981493
refs/heads/master
2022-12-13T02:10:31.173333
2020-09-13T11:32:10
2020-09-13T11:32:10
295,137,458
0
0
null
null
null
null
UTF-8
Python
false
false
580
py
10163 색종이.py
N = int(input()) papers = [False for _ in range(N)] papers_num = [False for _ in range(N)] board = [[0 for _ in range(102)] for _ in range(102)] for case in range(N): papers[case] = tuple(map(int,input().split())) for i in range(N - 1, -1, -1): count = 0 for y in range(papers[i][1], papers[i][1]+papers[i]...
a0a57ad46c5cf6699b08d8fc2ac61a732c0ace15
470aac146ecae638ca3ed56a80adf8cf00169c91
/setup.py
2ecdc36adb0b4c91a713b0eef1ba5cbbc15b1a73
[ "MIT" ]
permissive
mrh1997/headlock
4db2e176e3f27c2c853a3eb871bb10f0000e95ee
fce340b25dfb98f8509f6957e91545cb39fd7bde
refs/heads/master
2023-02-03T15:32:14.203629
2023-02-01T16:19:18
2023-02-01T16:19:18
109,750,094
2
0
MIT
2023-09-12T13:21:51
2017-11-06T21:08:40
Python
UTF-8
Python
false
false
1,403
py
setup.py
#!python3.6 # -*- coding: utf-8 -*- from setuptools import setup from headlock import __version__ from pathlib import Path README_PATH = Path(__file__).parent / 'README.md' setup( name='headlock', version=__version__, description='An adapter for making C code testable from Python', long_description=...
de6e2ee482db62aa8a2617794602828f41357f94
6c1a1657c8e75f2d9265ec2d3e7fe843e858eeaa
/Web app/app/sentimentAnalysis.py
57da96c3cc504f65fe1608d6365a9c38cabefd75
[]
no_license
Zeliax/DataMiningUsingPython
c5f94422650690fa6a1f2268f4986d6de4badd64
2759316347298525a937a64bff9c08554f3a3579
refs/heads/master
2021-01-17T06:24:43.579860
2014-12-08T10:04:55
2014-12-08T10:04:55
23,545,979
2
0
null
null
null
null
UTF-8
Python
false
false
2,290
py
sentimentAnalysis.py
"""Contains the functions for making sentiment analysis.""" from detect_lang import LanguageDetector from nltk.tokenize import RegexpTokenizer import numpy as np import codecs import os def wordlist_to_dict(): """Create a dictionary from a wordlist.""" path = os.getcwd() # Runs from web app folder word_l...
0a84cfa1a571957f5dc916798cdf8427e991aada
d15f1c2e7b958e7212ddf3d23c0e02d2611e9120
/config_example.py
e9a94a42770e94ab598690a24f0fc87d33e57df0
[ "Apache-2.0" ]
permissive
chiaki64/DisqusCollector
de48485f3fbc6a20fe7d38e2c36f518b1230cd43
c7ce2bd1a120b59eb024aa385032a2f7bcf2766e
refs/heads/master
2020-05-25T05:42:48.626364
2017-03-27T06:19:17
2017-03-27T06:19:17
84,915,710
2
0
null
null
null
null
UTF-8
Python
false
false
195
py
config_example.py
# Database Prefix REDIS_NAME = "Disqus" # Disqus Secret Key SECRET_KEY = '' # Disqus Public Key PUBLIC_KEY = '' # Disqus Short Name SHORT_NAME = '' # Server PORT PORT = '1065' DEV = False
4bbad92eba9a1485494e13ef4a66a380320d634a
f8a4e0a934d5a8c81d5947a0f5068fc434f685cc
/sqlalchemy/phones_and_users/phone_manager.py
1c1cb137cac2a6d53634fbdd5d37d896fedf4673
[]
no_license
dlz215/hello_sqlite_python
9c07a213a539722e906bd0af246ba0a0600907d0
292cd1938130297b90199c48110abeb6ec055e29
refs/heads/main
2023-08-14T02:32:24.855557
2021-09-22T23:06:27
2021-09-22T23:06:27
null
0
0
null
null
null
null
UTF-8
Python
false
false
2,927
py
phone_manager.py
import configure # Runs the code in the configure module to set up the mappings from configure import User, Phone from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker engine = create_engine('sqlite:///user.db', echo=False) Session = sessionmaker(bind=engine) print('Welcome to the phone man...
d11519068463c503891e4f88d05080709bfd07bc
f482381453d3fe5e0b5eb99223f6cd18ac965d32
/escape_char.py
8d1904318fb74bfa345ce2d0f430b2512874cb57
[]
no_license
iceand543/python_notes
73bfbb860c67275764d8b10ab961f03860c878c4
5a56b0f746e631e1b98e0e5fd6c56c5e846ca680
refs/heads/master
2023-05-14T10:53:57.040907
2021-05-31T04:11:46
2021-05-31T04:11:46
357,379,944
0
0
null
null
null
null
UTF-8
Python
false
false
1,120
py
escape_char.py
sample_string = "akfhalhflakskdhflk\nnfd,s.nads.,,n\ndhfkhskdf\thkshd" print(sample_string) #\n newline #\t tabspace #\ can be use to escape any special characters, example is below print("\"pet shop owner said something that i don't care\"") # alternate to above way is useing """ print(""" "pet shop owner said somethi...
89695311441430c8414cdba6b493b8f1cd250d2e
d5844cfece8c0ea36db66880a41030818e6c40e0
/vuelafacil/Usuarios/serializers.py
95f90d699502e513515740065efced9ffff82ab9
[]
no_license
lapicos/vuelafacil
05e43a39698703f4cfb94223ded89e8d6b6d3c6a
0251bc318ef6150b9ba913904205d7dec4bf8c69
refs/heads/main
2023-08-28T03:22:25.016937
2021-10-12T03:42:07
2021-10-12T03:42:07
400,661,854
0
9
null
2021-10-10T02:43:46
2021-08-28T00:00:46
JavaScript
UTF-8
Python
false
false
702
py
serializers.py
from rest_framework import serializers from django.contrib.auth import get_user_model from Usuarios.models import * class UserSerial(serializers.ModelSerializer): class Meta: model = get_user_model() fields = ['username', 'email', 'password'] extra_kwargs = { #Proteger contraseña de usuari...
91ef2fa8dc1cd2f26db08e0179569766f45bd2b8
10d53d2d14ced82cc8a235609a92be1b51d1be28
/task6/uppercaseInString.py
368db063ae716c61ae047b64cf96f98b5715b952
[]
no_license
madhuriagrawal/python_assignment
080deb53645a50934c29cb1931137776b6475332
00bdd981ff87823b6513e67a579395fa26d112d6
refs/heads/master
2023-04-14T07:32:02.672116
2021-05-07T06:51:06
2021-05-07T06:51:06
357,785,499
0
0
null
null
null
null
UTF-8
Python
false
false
83
py
uppercaseInString.py
inputString="sdhjGkjU" output=[x for x in inputString if x.isupper()] print(output)
cc77236129b823d82798144ce6318f421c02573c
80a5b90f358af7634fe19e7aa0446b882e7ce1fd
/buttplug/template/__init__.py
312f64d8dcd52b140ff498bb42538e80ca425908
[ "BSD-3-Clause" ]
permissive
buttplugio/buttplug-py-deprecated
9e7c039c80f41ef8cf6afbbad77ff32b68b21ec9
02b30db87968d23038fecf9b01e02f18e3ba80ae
refs/heads/master
2021-09-27T00:57:17.391826
2018-11-05T01:06:15
2018-11-05T01:06:15
13,166,690
1
0
null
null
null
null
UTF-8
Python
false
false
74
py
__init__.py
from buttplug.template import client from buttplug.template import plugin
5083211e73ad2eba371fa2a36318460b10738e27
b64025b164bc4e7f175e3fa52ed78e17a3054ef1
/rsa-dec.py
cc27be9a8a345fa75d4cbf0f0c284a816a1b0c3b
[]
no_license
Mlwhitmer/encryption2
c8110cc064e5e940fc7b8a3eeddc8c6db32fe8b9
4a7b4217f784fce98d69b57c79dc6ffce7d20488
refs/heads/master
2020-04-05T19:28:40.212482
2018-11-16T21:17:25
2018-11-16T21:17:25
157,136,323
0
0
null
null
null
null
UTF-8
Python
false
false
1,619
py
rsa-dec.py
#!/usr/bin/env python3 #rsa decryption from Crypto import Util import argparse import binascii def decode(c): # Get the length of the byte array bytes_length = len(c.to_bytes((c.bit_length() + 7) // 8, 'big') or b'\0') plain_text_bytes = [] padding_flag = False #start at 2 ...
1bd3db71ad11e1295fe8dd0fa9d1f39971584937
ee974d693ca4c4156121f8cb385328b52eaac07c
/env/lib/python3.6/site-packages/wheel/cli/pack.py
e42df09499af4eebb203ede64bd6eeee1470e589
[]
no_license
ngonhi/Attendance_Check_System_with_Face_Recognition
f4531cc4dee565d0e45c02217f73f3eda412b414
92ff88cbc0c740ad48e149033efd38137c9be88d
refs/heads/main
2023-03-12T07:03:25.302649
2021-02-26T15:37:33
2021-02-26T15:37:33
341,493,686
1
0
null
null
null
null
UTF-8
Python
false
false
129
py
pack.py
version https://git-lfs.github.com/spec/v1 oid sha256:74ce044d3267d73dc5d4a56bc94b1f1dcbb543875f613b7d8f6f5e7e66136586 size 2321
1d1d8ee032a6c401faf226ecab03438a8674f62c
0aaccdbd59a1da934ef21f074b9d7c61d6a6dd0e
/00_Datset_Generator_images/Python_scripts/000_image_augmentator.py
b996524e9a49aaf5684187f1a139231f3dea2d7d
[ "MIT" ]
permissive
FreeworkEarth/AI-for-object-detection-and-OCR-objective-character-recognition-for-UAV-s-drones
24b032ad4bed0ccb9da43c6860492c9375b96088
ed5b6da5cf381435e2cb411e171d2215ab5de814
refs/heads/master
2023-01-12T01:48:32.258188
2020-11-12T14:09:31
2020-11-12T14:09:31
261,775,028
0
0
MIT
2020-11-12T14:09:32
2020-05-06T13:58:02
null
UTF-8
Python
false
false
729
py
000_image_augmentator.py
from matplotlib import pyplot as plt import numpy as np import cv2 import random import string import os from PIL import ImageFont, ImageDraw, Image from pathlib import Path, PurePath import pathlib import Augmentor path_to_training_images = Path(r"C:\Users\chari\Google Drive\00_Masterthesis\Masterarbeit\10_MA_COde\D...
e318e58c7159b3bb7aa7af55dc256326abb5da15
0d4ec25fb2819de88a801452f176500ccc269724
/chefham.py
ed9fa27a83024ef34fe2640b084410ae7708af02
[]
no_license
zopepy/leetcode
7f4213764a6a079f58402892bd0ede0514e06fcf
3bfee704adb1d94efc8e531b732cf06c4f8aef0f
refs/heads/master
2022-01-09T16:13:09.399620
2019-05-29T20:00:11
2019-05-29T20:00:11
null
0
0
null
null
null
null
UTF-8
Python
false
false
466
py
chefham.py
def dist(a, ans): c = 0 for i in range(0, n): if a[i] == ans[i]: c+=1 return c t=int(input()) for iteration in range(0, t): n = int(input()) a = list(map(int, input().split(" "))) ans = [i for i in a] c = dist(a, ans) for i in range(0, n): if a[i]==ans[i]: for j in range(0, n): if i!=j and a[i]...
e97e81865b9ee66c8c046437f3853883fa2af5e7
0162f87f61c91a7d7c7eeee57b704a0a9cacd651
/k.py
d01e32c4161b75fcc61f58f00e16fcff99e611f3
[]
no_license
BradDoddsProjects/kMeans
d5a0bc13824600a052e33a169b797f959508e04f
307081fd856ae6188642f0d2ea75318d6b1cd1ae
refs/heads/master
2021-01-06T18:24:15.572682
2020-02-20T18:16:04
2020-02-20T18:16:04
241,438,391
0
0
null
null
null
null
UTF-8
Python
false
false
2,666
py
k.py
import numpy as np import pandas as pd import matplotlib.pyplot as plt # INITIALIZATION number of klusters and initial centroids K = 3 convergeTotal = 10 initial_centroids = np.array([[3, 3], [6, 2], [8, 5]]) df = pd.read_csv('file.csv', delimiter=',', header=None, names=['A', 'B']) X = np.array(df) #pri...
b8e7df71039cd0093efaba54818effb5eac5b854
76b48fe57ca42ed7c9900ed6b7f93231928038cb
/Jun_19.py
990220e30db7e7cbe4fa6b80040b5f9bb3f348ab
[ "MIT" ]
permissive
keiraaaaa/Leetcode
47c3c88d67831f310c1d915697d39ceced6d8a35
90bf174f5613c79119aec58a1f0d1d2c1c3496bb
refs/heads/master
2021-08-07T05:26:12.827554
2018-08-15T19:07:08
2018-08-15T19:07:08
135,496,667
0
0
null
null
null
null
UTF-8
Python
false
false
2,881
py
Jun_19.py
''' ##################################### # 238. Product of Array Except Self ##################################### class Solution: def productExceptSelf(self, nums): """ :type nums: List[int] :rtype: List[int] """ if nums: res = [0] * len(nums) res[0]...
366d56695a9728e97782a2c9f32ed7211b6449f7
56667c657578d2ef378e6d4877c6fccf9ab9242b
/PythonExercicios/ex010 - Conversor de Moedas.py
ad2507cadbcf3ed79eb863b4588d842057bd549a
[ "MIT" ]
permissive
caique-santana/CursoEmVideo-Curso_Python3
043ba9fb82c369bf782538eb95acbc84064ac0cd
86bb67bbbf348544e1135d8657672d4e33fa70e2
refs/heads/master
2022-08-16T17:38:38.066353
2020-05-21T20:41:13
2020-05-21T20:41:13
252,039,301
1
0
null
null
null
null
UTF-8
Python
false
false
439
py
ex010 - Conversor de Moedas.py
# Crie um programa que leia quanto dinheiro uma pessoa tem na carteira e mostre quantos Dólares ela pode comprar. Considere US$1,00 = R$3,27 reais = float(input('Quantos R$ você tem ? ')) print('Você pode comprar {:.2f} dólares.'.format(reais/5.20)) # Gustavo Guanabara print('') real = float(input('Quanto dinheir você...
1c7be110aafbb8ef15533865447f767e137b469e
7e9e66dc6d5f6850eb0483fdff8f2bcbdbd2279c
/mcur/problem/migrations/0010_auto_20200203_1513.py
068b1f8a5feb61cba2e9591635a782e09c1579c7
[]
no_license
kalan4iki/cur-problem
b778072e2cd0ac6586a77d3668a1c9dc2eff2894
d86fdc1a376c6e4973ff304e285a0aa31b3ea7fb
refs/heads/master
2020-12-07T18:21:44.114187
2020-07-17T07:03:23
2020-07-17T07:03:23
232,769,478
1
0
null
null
null
null
UTF-8
Python
false
false
1,819
py
0010_auto_20200203_1513.py
# Generated by Django 3.0.1 on 2020-02-03 12:13 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('problem', '0009_auto_20200130_1014'), ] operations = [ migrations.CreateModel( name='Answer', fields=[ ...
a1521a2949b0b9f788dd56f0c2f02c68b1ac87dc
ae333003a102da890a4a35cd55c6d0bfd498ef6a
/strings/ways_to_select_buildings.py
929c9067cca6342d743753d0f5a7fa8e13545b69
[]
no_license
jschnab/leetcode
e4624181525577d335af4774c4d07b577f80fb04
6fe9ea880dbc27c654205bf5c52a09c6313e70e9
refs/heads/master
2023-07-06T11:54:31.061907
2023-07-04T02:42:10
2023-07-04T02:42:10
224,428,490
0
1
null
null
null
null
UTF-8
Python
false
false
1,376
py
ways_to_select_buildings.py
""" Given a string S that contains 0 or 1 at each position (0 is an office building and 1 is a restaurant). A city official would like to select 3 building for random inspections such that no two consecutive selected building are the same type. Return the number of valid ways to select buildings. """ def select_buil...
afab51a42017643bffb2a374afaf86e70c2976f0
7962ae415f2774fd9237a34cea260c0224b772e1
/util.py
d9acd8811ad8168bc9ef4edaa049344f1e391a53
[]
no_license
hairav/SlideSpawn
4678e75fff0c295720e642da01bf2499853b3294
4d97220a67c772e1b06efdb84c51ec8f9659b5a7
refs/heads/master
2022-07-04T23:57:25.533806
2020-05-15T09:07:19
2020-05-15T09:07:19
256,566,818
2
1
null
null
null
null
UTF-8
Python
false
false
5,541
py
util.py
import numpy as np import nltk import nltk.data from nltk.corpus import stopwords from nltk.stem import PorterStemmer from nltk.tokenize import RegexpTokenizer from math import log from collections import deque def cosine(a,b): a = np.array(a) b = np.array(b) c=np.sqrt(np.sum(a**2)*np.sum(b**2)) if c==...
00414ad728223ec3fbaaecb4d9315fce89e95604
2a28c5af01509ab14148da9b2920243bbf157c5b
/picdown.py
9b7dc0cf2c8e1606a7af62e8e94dcca36737333c
[]
no_license
is-xuwei/python_test
e5382186ad01846aeb65add22127ae9398522774
b6947b80f9290762d33fa876ad107cdb617ae17b
refs/heads/master
2023-07-19T09:05:16.570317
2018-06-11T10:09:06
2018-06-11T10:09:06
null
0
0
null
null
null
null
UTF-8
Python
false
false
899
py
picdown.py
#coding=utf-8 import re import requests url = 'http://eyval.net/10224' #设置headers,网站会根据这个判断你的浏览器及操作系统,很多网站没有此信息将拒绝你访问 header = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 UBrowser/6.1.2107.204 Safari/537.36'} #用get方法打开url并发送headers html = ...
09449ac20db3ebba096023e6924ded022b0de488
ca7aa979e7059467e158830b76673f5b77a0f5a3
/Python_codes/p02883/s020465382.py
baa6ea91ae4a46c9ab736e78497124dbb0dbc437
[]
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
475
py
s020465382.py
import sys input = sys.stdin.readline MI=lambda:map(int,input().split()) LI=lambda:list(map(int,input().split())) N,K=MI() A=LI() A.sort(reverse=True) F=LI() F.sort() def check(x): # x分以内に食べきれるための修行回数はK回以下か k=0 for i in range(N): k+=max(int(0--(A[i]-x//F[i])//1),0) return k<=K ok=10**13 ...
bcf1549f4abd27bd5a8c6f09dc46c48b4e605eee
61b419bbb23bfd8633ec1bef5d539008a6af9a74
/invert_binary_tree.py
28e618c8c1cc841516d2dae06d36dd594f5b56ea
[]
no_license
ttnguyen2203/code-problems-python
542d6920462968849e0721db533bc09d39472115
4478cb499d4a1631f14dd9d8223b09f5529843c2
refs/heads/master
2020-03-28T18:34:29.911566
2017-08-18T19:53:46
2017-08-18T19:53:46
null
0
0
null
null
null
null
UTF-8
Python
false
false
679
py
invert_binary_tree.py
''' Invert a binary tree. 4 / \ 2 7 / \ / \ 1 3 6 9 to 4 / \ 7 2 / \ / \ 9 6 3 1 # Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None # self.right = None Difficulty: Easy ''' ...
0b40d551202ccd0b571ee05679dff2927526954b
03489b5e37d3533eb88dd59ea4ba043e14334406
/solution/value_iteration.py
1006798214920b5cb0966968dd1ad541e3c07777
[]
no_license
novatig/RL_workshop
a5f606342dcd6c9240a261a4ffc9df8a7e56f970
5d588d7217b3abf04bbef85ce24e7f2e23884904
refs/heads/main
2023-03-14T10:31:27.317568
2021-03-08T10:17:48
2021-03-08T10:17:48
345,613,016
1
0
null
null
null
null
UTF-8
Python
false
false
3,406
py
value_iteration.py
from algorithms import BaseAlgorithm, computeDiscountedRewards import numpy as np import torch import policies #------------------------------------------------------------------------------- # Implementation of the reinforce algorithm # class ValueIteration(BaseAlgorithm): def __init__(self, Qnet, gamma=0.99, le...
a095b9d21c107b5b5ad62aa210aa36858869cac2
d13208e61877ef7baa8fdc396027da0fc6cad013
/dataStructure/GetMaxSubArray.py
36408b1fcdc15098f336fd0ef36a53437ddd4294
[]
no_license
gaotiecheng1982/pythonSample
22506d6a0ef3a5131417ac34e42efd7bc5cf76d6
56662983583e9576731fed195d4d837f31c3891f
refs/heads/master
2021-07-10T18:45:42.637104
2021-04-09T04:07:32
2021-04-09T04:07:32
79,978,339
0
0
null
null
null
null
UTF-8
Python
false
false
1,300
py
GetMaxSubArray.py
def MaxCrossSubarray(a, low, mid, high): left_sum = -65535 sum = 0 for i in range(mid, low - 1, -1): # 递减,实现mid至low!!! sum = sum + a[i] if sum > left_sum: left_sum = sum max_left = i right_sum = -65535 sum = 0 for j in range(mid + 1, high + 1): s...
f78f20dc8d020a8ff543d52d58c85afaa05b7d0d
e8af1ea4a136c5cf05c5bdee54ce954143b50196
/pie.py
2e780b880369da8233fa7e506ec8066d3aac91d4
[]
no_license
Williams1316/backup2
52dd8274a034d442f5e55d7b1f5904fa939b6b40
5034b76799e776194ad13b6b939d0856545cfa83
refs/heads/master
2020-08-26T21:38:19.605241
2019-10-24T22:00:20
2019-10-24T22:00:20
217,156,494
2
0
null
null
null
null
UTF-8
Python
false
false
281
py
pie.py
# how to turn a string into a list myString = "arizona" myList = list(myString) print(myList) # how to create a list with _ in place of letters for a in myList: secret.append("_") print(secret) # how to replace an _ with a letter secret[2] = "_" print(secret)
b0aca3266df7f730bd11655292fd1a7274bc1511
4309959d9344b1412ee99fd85eb4c9b1b0268b2f
/CanvasSync/entities/course.py
8257a2760ec183bd6ddfaf8c64f4a427cfde6e3b
[ "MIT" ]
permissive
perslev/CanvasSync
ef224c35aa981afd13af994988165c6fba76afb6
2f5ed8bf5ba7e6194e552d1885e795e2ddb494ac
refs/heads/master
2023-08-17T06:21:58.250874
2022-08-26T11:44:58
2022-08-26T11:44:58
81,222,906
52
33
MIT
2023-08-25T06:46:13
2017-02-07T15:26:25
Python
UTF-8
Python
false
false
6,230
py
course.py
""" CanvasSync by Mathias Perslev February 2017 -------------------------------------------- course.py, Second level class in hierarchy The Course class is the second level CanvasEntity object in the folder hierarchy. It inherits from the base CanvasEntity class and extends its functionality to allow downloading inf...
9a5b2b146dcab1e692b855f65af2efddd6a722f1
0c7b4ed254fff4dad09a3144038b2fe9e42ce3f3
/my_recognizer.py
40a978bc58e90c871c17cd910a7c294e2c46fe6c
[]
no_license
ryrizo/AIND-Recognizer
54290fba492ecf4efddcb6781555bb39f8b98a21
4f5980c7147073634236d1a7fe7a4cfd53bf8f25
refs/heads/master
2021-01-20T04:12:05.484998
2017-05-11T23:38:08
2017-05-11T23:38:08
89,657,517
0
1
null
null
null
null
UTF-8
Python
false
false
1,679
py
my_recognizer.py
import warnings from asl_data import SinglesData import math def recognize(models: dict, test_set: SinglesData): """ Recognize test word sequences from word models set :param models: dict of trained models {'SOMEWORD': GaussianHMM model object, 'SOMEOTHERWORD': GaussianHMM model object, ...} :param t...
8a96c2b9e2d3a9858f64223f42cd50bb818df24a
e3cda94903490be9babc5a3241a40d9c476f005c
/Project3-Gov-Responses-AirQuality_Python/00...BalancedPanelByCity直辖市港澳.py
6c0bb0388c49c7802aeccdb2ff968a19c72f9759
[]
no_license
yanbingtao/Y1_Summer_Big-Data-Research-Internship
ea991773db662977335d42e6517180d40e2c87ac
01cf97195465b56e3e00f1113cc2dad3980ab7cd
refs/heads/master
2022-11-30T20:09:18.331799
2020-08-09T02:54:58
2020-08-09T02:54:58
286,153,645
0
0
null
null
null
null
UTF-8
Python
false
false
7,124
py
00...BalancedPanelByCity直辖市港澳.py
import csv import operator import math as math import datetime import glob path=r"C:\Users\yanbi\Desktop\Sum_Research3\National data" # filename= path+"\All_"+prov+".csv" fileNameList = glob.glob(path+"/*.csv") prov="上海市" citiesInProv=["上海市"] fileNameList = [path+'\历史天气_5.csv',path+'\历史天气_12.csv'] # prov="北京市" # citi...