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
c9be93e3c55a4edc708a368af9abacb630ffde62
b40d1a26ea04a19ec0da7bf55db84b7ee36cc898
/leetcode.com/python/567_Permutation_in_String.py
c0d9eda9e9fbb633a51af968611bf162a2923095
[ "MIT" ]
permissive
partho-maple/coding-interview-gym
5e8af7d404c28d4b9b52e5cffc540fd51d8025cf
20ae1a048eddbc9a32c819cf61258e2b57572f05
refs/heads/master
2022-09-11T16:36:01.702626
2022-03-14T08:39:47
2022-03-14T08:39:47
69,802,909
862
438
MIT
2022-08-18T06:42:46
2016-10-02T14:51:31
Python
UTF-8
Python
false
false
603
py
567_Permutation_in_String.py
from collections import Counter class Solution(object): def checkInclusion(self, s1, s2): """ :type s1: str :type s2: str :rtype: bool """ s1Counter = Counter(s1) s2Counter = Counter(s2[:len(s1) - 1]) for right in range(len(s1) - 1, len(s2)): ...
ffc898ef5a54bdf39203d8b440359ac024b9032c
6874015cb6043d1803b61f8978627ddce64963b4
/django/bin/roub/home/models.py
b76260251795b8ae676a89dd6d08c23bf0759138
[ "BSD-3-Clause", "Python-2.0" ]
permissive
yephper/django
25fbfb4147211d08ec87c41e08a695ac016454c6
cdd1689fb354886362487107156978ae84e71453
refs/heads/master
2021-01-21T12:59:14.443153
2016-04-27T09:51:41
2016-04-27T09:51:41
56,134,291
0
1
null
null
null
null
UTF-8
Python
false
false
2,030
py
models.py
from django.db import models # Create your models here. class Users(models.Model): username = models.CharField(max_length=30,unique=True) age = models.IntegerField() password = models.CharField( max_length=128) created_at = models.DateTimeField(u'创建时间', auto_now_add=True, editable = True) ...
c540f4e58ed2a9d6e1f1a782ca144f96ba78a3f8
fa3e527114cd5799dddb0a25067da4923eae354e
/DataPrepare/FastSim/bes3/workarea/TestRelease/TestRelease-00-00-86/SingleElecPositronSim/jobs_reco/make.py
f360b1e15ae3cd465d19f4fa73bd27dcf7cd18ae
[]
no_license
wenxingfang/FastSim_ML
e64c6b56ce2afd703d1ddda0ada2de6f65fde049
d2f1abbb2f6879313d5f4f137b64c4d8bf10fe83
refs/heads/master
2022-11-28T01:35:39.727895
2020-08-03T15:47:37
2020-08-03T15:47:37
284,734,310
0
0
null
null
null
null
UTF-8
Python
false
false
17,668
py
make.py
import os sim_file = {} sim_file['Single_e_0'] = '/junofs/users/wxfang/FastSim/bes3/workarea/TestRelease/TestRelease-00-00-86/SingleElecPositronSim/raw/em_E_gauss1p77/Single_e_0.rtraw' sim_file['Single_e_10'] = '/junofs/users/wxfang/FastSim/bes3/workarea/TestRelease/TestRelease-00-00-86/SingleElecPositronSim/raw/em_...
16f2b20574aee4db77b460a22f2c6f2c006f1f62
75dcb56e318688499bdab789262839e7f58bd4f6
/_algorithms_challenges/codeabbey/_CodeAbbeyPythonSolutions-master/triangle_area.py
c9ec5d0146e2e33bd8baa0afebeb604f195b61c3
[]
no_license
syurskyi/Algorithms_and_Data_Structure
9a1f358577e51e89c862d0f93f373b7f20ddd261
929dde1723fb2f54870c8a9badc80fc23e8400d3
refs/heads/master
2023-02-22T17:55:55.453535
2022-12-23T03:15:00
2022-12-23T03:15:00
226,243,987
4
1
null
2023-02-07T21:01:45
2019-12-06T04:14:10
Jupyter Notebook
UTF-8
Python
false
false
385
py
triangle_area.py
amount_values = int(input()) results = [] def get_area(x1, y1, x2, y2, x3, y3): return (x1*(y2-y3)+x2*(y3-y1)+x3*(y1-y2))/2 for i in range(amount_values): x1, y1, x2, y2, x3, y3 = map(int, input().split()) area_of_triangle = get_area(x1,y1,x2,y2,x3,y3) if(area_of_triangle < 0): area_of_trian...
da9e84e112936e6f41970f1b671e1988c18a476b
2759cffcc9709cf127400332c052711e4de966d1
/backend/app.py
3d94811ea1019cb5be31422c369c34265c410696
[ "MIT" ]
permissive
miversen33/ProjectPsittacosaurus
5017391047e3c60c118e3e8d8108782162473ee9
0a97586a914e260b8570a10d0ab53ca73e2e9250
refs/heads/main
2021-06-13T06:04:36.590015
2021-03-13T20:58:03
2021-03-13T20:58:03
163,046,641
8
0
null
null
null
null
UTF-8
Python
false
false
4,350
py
app.py
#!/usr/bin/env python import os from typing import Any import logging from flask import Flask, json, request from flask_sqlalchemy import SQLAlchemy def create_app(): app = Flask(__name__) init_app(app) return app def init_app(app): load_config(app) init_db(app) create_routes(app) return...
050200716b62ecd85cfd2ba1bfa318e7caa625e1
07504838d12c6328da093dce3726e8ed096cecdb
/pylon/resources/enumerations/months_t.py
40f4d9f7fd9d4ca627e3fbf195844953e617ffe2
[]
no_license
lcoppa/fiat-lux
9caaa7f3105e692a149fdd384ec590676f06bf00
7c166bcc08768da67c241078b397570de159e240
refs/heads/master
2020-04-04T02:47:19.917668
2013-10-10T10:22:51
2013-10-10T10:22:51
null
0
0
null
null
null
null
UTF-8
Python
false
false
3,203
py
months_t.py
"""months_t standard enumeration type, originally defined in resource file set standard 00:00:00:00:00:00:00:00-0.""" # Copyright (C) 2013 Echelon Corporation. All Rights Reserved. # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (t...
b095dbafe3d29e0a8a3d715e50310439d8d1713b
1709cadc8c4147dede2be0d68ee1584bc28c3957
/models/networks.py
f8b15d952ea98e8491dfa651a08c268b399f801b
[ "MIT" ]
permissive
NagisaZj/map_planner
21fb16d7063c965e8277a680d9b2827c18072773
c4db4b1a0de8be511c4cec4c120992bf1bf32031
refs/heads/master
2022-04-14T12:40:07.495129
2020-04-07T06:26:49
2020-04-07T06:26:49
null
0
0
null
null
null
null
UTF-8
Python
false
false
6,300
py
networks.py
import torch.nn.functional as F import sys sys.path.append('../') from models.distance import * import numpy as np """ the input x in both networks should be [o, g], where o is the observation and g is the goal. """ def initialize_metrics(metric, dim): if metric == 'L1': return L1() elif metric == 'L2'...
ad82eb563a9578d98151d4e4fd09911108934b1e
6ddfd22ab706feb4a7a0649b768c42bfbe74fbb4
/draxe/draxe/spiders/draxe.py
915cd13f3b3158fb40d7c637a65f4a90c0a7ea99
[]
no_license
xfffrank/Scrapy
fbe2cfed0e99b328738fdb1b85672209c9057d11
eec08acbbce327fe30a8b6b519898accbe12d5e5
refs/heads/master
2020-03-18T16:11:33.234555
2018-07-27T08:54:02
2018-07-27T08:54:02
134,951,585
0
0
null
2018-07-16T09:16:46
2018-05-26T10:26:07
Python
UTF-8
Python
false
false
4,641
py
draxe.py
from scrapy.http import Request from scrapy import Spider from bs4 import BeautifulSoup import logging from draxe.items import DraxeItem from draxe.pipelines import DraxePipeline as dp import re logger = logging.getLogger('Draxe') logger.setLevel(logging.DEBUG) fh = logging.FileHandler('draxe.log', encoding='utf-8') ...
2c5c661c843628a23b3dd26eb5629b22264cada4
b68082ce554fecad480df013f25178f955c226e8
/pong-game/main.py
e51fb6064a8f88acdb1e7d15b387a40ed1e5952d
[]
no_license
sakshamsangraula/Python-Projects
808894713d92d35bff317228fdebf3c18d4e0df0
cdc8f5dad8320b19f56c1aff6357ecf8b3785d93
refs/heads/master
2023-08-08T02:06:28.732058
2021-08-10T22:10:08
2021-08-10T22:10:08
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,691
py
main.py
# create a screen (800 by 600) and black background from turtle import Screen from paddle import Paddle from ball import Ball from score_board import ScoreBoard import time screen = Screen() screen.setup(width=800, height=600) screen.title("Pong Game") screen.bgcolor("black") # turn off animation by setting tracer to ...
fea4e10cb042e25c556ab7beec5385b14869a001
f123a93a331d31ac1382c73fdb5d18c991e4695d
/Ray_Phi_Integration.py
b44f6c704b31f780b3cebd63f13337df9273d96b
[]
no_license
ddas-04/Ray_testing
490128971af0420a15181176c0916871e8d38876
2e2c96836d9aad8cb8578a03057a5a88fba7a45e
refs/heads/master
2022-08-29T14:49:07.502657
2020-05-20T10:18:18
2020-05-20T10:18:18
265,264,196
0
1
null
null
null
null
UTF-8
Python
false
false
4,602
py
Ray_Phi_Integration.py
# ### Importing Modules print('Import starts') from fipy import FaceVariable, CellVariable, Gmsh2DIn3DSpace, VTKViewer, TransientTerm, ExplicitDiffusionTerm, DiffusionTerm, ExponentialConvectionTerm, DefaultSolver #, getCellVariableDatapoint from fipy.variables.variable import Variable from fipy.tools import numerix ...
b8ff69b463e827f91821d7f86e7a3fdd3a4ea947
ba964f7fa7263ea42ce18d7ed854de61a37e7903
/tests/test_order_maker.py
e8e0f203fcfcd11bb3f39196b8cd8a8befc486a9
[]
no_license
sirnicolaz/trading-facility
7fc9d7622ea878f70422abc3a4febbfbbc1d7f66
bc0c68eee6e8f2d11fd7ac046a68f245e805b970
refs/heads/master
2021-03-30T17:14:35.341744
2017-10-21T22:40:43
2017-10-21T22:40:43
102,450,272
0
0
null
null
null
null
UTF-8
Python
false
false
6,597
py
test_order_maker.py
from unittest import TestCase from unittest.mock import patch from controllers.order_maker import cancel_all_opened_sell_orders, sell_all_limit, force_put_sell_all_limit_order, \ force_put_conditional_sell_all_order class TestOrderMaker(TestCase): @patch("controllers.order_maker.get_balance") @patch("con...
81cf86977ec1c01fdca182455140390aee120a31
b7ced519161dbda1fdceceeb0d8b93980e982eaa
/nnt/server/file.py
a272fbb8d14faadebc9192612f481d827de1443d
[]
no_license
wybosys/nnt.logic.py
4a17911778a28b30c67aa59460c47fb2e55d65a7
c8f60b8bc1ce25fd45ea695809e736c74a6b3595
refs/heads/master
2023-04-30T09:38:08.507024
2020-04-29T07:20:14
2020-04-29T07:20:14
248,126,563
2
0
null
null
null
null
UTF-8
Python
false
false
2,016
py
file.py
import datetime import os from ..core.file import * class RespFile: """ 专用来返回的文件对象 """ @staticmethod def Regular(file: str, typ: str = None) -> 'RespFile': r = RespFile() if not typ: typ = Mime.Type(file) r._file = file r.type = typ r._stat = os.stat(...
5bb8bba845702701f897df78c090cd24882e7243
d6c4dcc20d56206e5f7f6f6d9a102ed1c6872dd4
/examples/CoinapiDataService/runService.py
4826e810a46b4e55efe578d2db3acb5dedc6d5fb
[ "MIT" ]
permissive
KilimanjaroFreeman/vnpy
d6b4cf790311a588a31366d2b2f4fcfd03d47540
75f95a00e7eb569cb7cc530ea55d6646ba4595c1
refs/heads/master
2021-10-20T18:25:34.967809
2019-03-01T06:20:15
2019-03-01T06:20:15
157,499,660
3
0
MIT
2018-11-14T06:08:33
2018-11-14T06:08:33
null
UTF-8
Python
false
false
986
py
runService.py
# encoding: UTF-8 """ 定时服务,可无人值守运行,实现每日自动下载更新历史行情数据到数据库中。 """ from __future__ import print_function from dataService import * if __name__ == '__main__': taskCompletedDate = None taskTime = datetime.time(hour=22, minute=0) # 进入主循环 while True: t = datetime.datetime.now() ...
f860fcb777b918849a36ed3ae9a4d2f3d6c2d683
e37d24c3365d94270c082159adea871586da8bc2
/tests/test_homework9/test_task3.py
c1b17faaf53a7d445e5af73ac4118d487364390b
[]
no_license
JeRusakow/epam_python_course
2b26d72d66384cedc09242335375672aea0b5c8f
ba8bd780e5c2974486a44f742affe2deb7ccae1f
refs/heads/main
2023-06-06T05:03:40.936738
2021-06-28T10:49:24
2021-06-28T10:49:24
358,729,333
0
0
null
2021-06-28T10:49:25
2021-04-16T22:01:11
HTML
UTF-8
Python
false
false
1,554
py
test_task3.py
import random from pathlib import Path import pytest from homework9.task3.hw3 import universal_file_counter @pytest.fixture(scope="session") def test_dir_path(): return Path("tests/test_data/hw_9/task3") @pytest.fixture(scope="session") def empty_directory(tmpdir_factory): return Path(tmpdir_factory.mktem...
e41c1ee9339a3ac35cf85930615875524e431c11
b96e0ca43db5c155772de9e77eb68928069b1265
/post/belsendi/digest/api.py
aa65a5131334d7f8e182bdb533cb1c3341772627
[]
no_license
Bakdaulet123/moviestar
f7eb1adf40876e80ca6a2900d15f933fb66fb4a6
a72e37d462bb30abc6cb78a00ed994d2144a7f00
refs/heads/master
2023-01-20T14:12:29.188352
2019-12-13T18:22:05
2019-12-13T18:22:05
227,897,895
0
0
null
2023-01-05T02:57:54
2019-12-13T18:18:21
JavaScript
UTF-8
Python
false
false
308
py
api.py
from digest.models import Digest from rest_framework import viewsets, permissions from .serializers import DigestSerializer class DigestViewSet(viewsets.ModelViewSet): queryset = Digest.objects.all() permission_classes = [ permissions.AllowAny, ] serializer_class = DigestSerializer
b72f5efe5abf867ae5a47d3981869da6636613bc
cef57c2d05cfc67267959d8068cbf1f8dfb3e93c
/libs/websocket/__init__.py
2f55de35609940631e3e6727afc74f15717d38c9
[]
no_license
Arox/chat
91fbdff8ab31240475c33d013f5af9f6349ef5f7
87b40f8ef215ee97b0b03ee1aab1402867e639d7
refs/heads/master
2021-01-02T22:59:50.527928
2017-08-21T08:04:58
2017-08-21T08:04:58
99,433,949
0
0
null
null
null
null
UTF-8
Python
false
false
264
py
__init__.py
import django.conf.urls def url(regex, view, kwargs=None, name=None, method=None): if not method: method = 'http.request' if not kwargs: kwargs = {} kwargs['method'] = method return django.conf.urls.url(regex, view, kwargs, name)
71ffab2e34d54b3a69147c3872caaca908e4db68
6f9bbc703b5609939ef84d3f8da6849b0187f101
/hw1/preprocess_rnn.py
c9cbc1be232500469e58a1e571de63055c80ceef
[]
no_license
o20021106/deepLearningHW
089f2a941da06c3fe1fffed3faa08ec629149637
25f549ab601f1a90770252577b29a977e9cdaf00
refs/heads/master
2021-04-28T04:47:15.982222
2018-03-07T02:46:20
2018-03-07T02:46:20
122,167,006
0
0
null
null
null
null
UTF-8
Python
false
false
7,865
py
preprocess_rnn.py
import pandas as pd import numpy as np import re import os import pickle train_feature_path = 'mfcc/train.ark' test_feature_path = 'mfcc/test.ark' train_label_path = 'train.lab' feature_size = 39 phone_letter_path = '48phone_char.map' to_39_path = 'phones/48_39.map' X_merge_path = 'merge.pickle' merge_test = 'merge_te...
e7209c2aa0596f0910e8df696af7c8b447c26e78
24ace3ccbe85d9757a27a8d8f92a5a28a8191703
/src/basegame/basegame.py
1a89ec48a26fadbbf7ad3c6f789158ffb1b3b4d6
[]
no_license
dsemi/ai-versus
67fff16bacb948439108415c2bed41931bb2f836
e76b9e67a87be6dd9a4b8fd0de93c939028c6b08
refs/heads/master
2021-03-12T23:12:00.773502
2014-04-29T03:34:07
2014-04-29T03:34:07
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,202
py
basegame.py
#!/usr/bin/python3 # Client running code, isolated and keep process available for stdin and stdout # maybe make this a class from queue import Queue from subprocess import Popen,PIPE class BaseGame: def __init__(self, players): self.players = players # Use list of workers self.player_han...
326a1a2402eeeef5ea7f63704a32763657d08030
491002828e6d21bba3ef95561fd5a6de73579c0a
/cuenta atras.py
63441ce4907cf6d1faeb7108026a8bed7f790627
[]
no_license
Cainuriel/Training-Python-
bc892b3edec4b5e55083ef81697603643ef89a01
750235d2d515aa76da49002e6d3f2a90f573d3b7
refs/heads/master
2020-04-18T19:17:47.861335
2019-02-13T21:49:36
2019-02-13T21:49:36
167,708,625
0
0
null
null
null
null
UTF-8
Python
false
false
120
py
cuenta atras.py
num=10 for i in range(1,num+1): print(" ",num-i) print("Hasta la vista, Baby.")#un poco de humor
743d0894277e98e1759644f894ba4afb25368985
86ee21e508a99f9c3c3c5d7c353d71766209e58f
/lbw/urls.py
cefcc2f30c4a85803490580e88024d10ce0a78b2
[]
no_license
lbedford/lbwreg-django
5b662e7ca9396becdebd4248f10ac16c30be8d84
f5a4b545b0569a742275a42ed5b19fb1a7ea5a69
refs/heads/master
2023-04-13T13:10:26.378728
2023-04-06T07:11:38
2023-04-06T07:11:38
142,314,682
0
1
null
2023-04-06T07:11:39
2018-07-25T14:53:01
Python
UTF-8
Python
false
false
338
py
urls.py
from django.urls import include, path from django.contrib import admin from registration import urls as registration_urls from accounts import urls as accounts_urls urlpatterns = [ path('', include(registration_urls, namespace='registration')), path('accounts/', include(accounts_urls)), path('rawadmin/', a...
66c962d2b6895f6708dab5ffbda5ab83e1b429d1
dcb6825f0e90a09dc77ca4beeb181fb0f1e55a5d
/bg41 k.py
8a1433f007201e8cf29016d68b0881821a9f7d54
[]
no_license
ayyappanveera/python
d96bc411f2541f8979c2bb4820e5de64cf519f89
b5e797a2d0e1ea4e3e63b05a3039847ef7d741f1
refs/heads/master
2022-02-16T12:05:12.455668
2019-08-12T07:25:09
2019-08-12T07:25:09
198,072,127
1
0
null
null
null
null
UTF-8
Python
false
false
76
py
bg41 k.py
s,n=map(str,input().split()) temp=int(n) for i in range(temp): print(s)
7633ab1c941885111624e08a2a1dc851dbe08109
d308fffe3db53b034132fb1ea6242a509f966630
/pirates/map/MapBall.py
203028ef4d6495907af54069ad1c61bfd5fe4047
[ "BSD-3-Clause" ]
permissive
rasheelprogrammer/pirates
83caac204965b77a1b9c630426588faa01a13391
6ca1e7d571c670b0d976f65e608235707b5737e3
refs/heads/master
2020-03-18T20:03:28.687123
2018-05-28T18:05:25
2018-05-28T18:05:25
135,193,362
3
2
null
null
null
null
UTF-8
Python
false
false
1,947
py
MapBall.py
# uncompyle6 version 3.2.0 # Python bytecode 2.4 (62061) # Decompiled from: Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)] # Embedded file name: pirates.map.MapBall from pandac.PandaModules import * from direct.showbase.PythonUtil import clampScalar from pirates.map.ArcBall import...
2c6c6589db178062fe41c57324e6c75d4e7e36d5
3777658387aa9e78d7c04202d7fd47d59b9e1271
/NetworkAnalysis/bipartite/bipartite2.py
bb6d09bd5c23e1dcb30bb3937e38982b70845748
[]
no_license
jocoder22/PythonDataScience
709363ada65b6db61ee73c27d8be60587a74f072
c5a9af42e41a52a7484db0732ac93b5945ade8bb
refs/heads/master
2022-11-08T17:21:08.548942
2022-10-27T03:21:53
2022-10-27T03:21:53
148,178,242
4
0
null
null
null
null
UTF-8
Python
false
false
4,252
py
bipartite2.py
from collections import defaultdict import os import networkx as nx import nxviz as nv import numpy as np import pandas as pd import matplotlib.pyplot as plt from sklearn import datasets # plt.style.use('ggplot') def get_nodes_from_partition(Graph, partition): # Initialize an empty list for nodes to be returned ...
d39222de9fae94719fe8588ebb6fa9ee64a1ad33
b304a1e42f25ed4dc0ad57f8659c6e003e0c1af7
/aiopyql/cache.py
4cbcf7b059d7ebde53c1c58490bae90a0a545702
[ "MIT" ]
permissive
bsjung/aiopyql
72498601f81f5f77f59b77ff60a6d5f111f3bf66
0071c87ca3fbdd3dd011c94286ae7a7569ac5e7b
refs/heads/master
2023-08-26T02:16:43.169213
2021-05-21T21:37:45
2021-05-21T21:37:45
null
0
0
null
null
null
null
UTF-8
Python
false
false
2,776
py
cache.py
import time from collections import deque class Cache: """ Used for managing cache rotation & retention, max len """ def __init__(self, parent, **kw): self.parent = parent self.cache = {} self.log = self.parent.log self.timestamp_to_cache = {} self.access_history...
e9600c08ebf17e2197aaeb17a93b0de5bebcd92a
e1db5158fda7f19d9e5ab42b20376c2e20b24dbc
/test_hello.py
7d683e9585271afd2d410997124ec71f78f9760a
[ "MIT" ]
permissive
janucaria/cpp-boost-python-example
a20f1f6336832154429cddf4c69843a51bfc82bd
0d1008d520d0d4382af6de3a33e73aece37e826f
refs/heads/master
2020-07-01T06:55:54.080595
2019-08-08T07:22:47
2019-08-08T07:22:47
201,082,036
0
0
null
null
null
null
UTF-8
Python
false
false
72
py
test_hello.py
from build.janucaria import HelloWorld b = HelloWorld() b.say_hello()
4bf5695f5cafe9779fd052fa924faccc4ff6b1a2
5e4ce077cd9c6893b1d8eefcd7108ac5a328351b
/University of Oregon Coursework/Intro to Computer Science/GOT Game/src/common/GameWorld.py
4e584b54aceb8a8ca7c0eac4086ee47830418504
[]
no_license
satello/work-samples
08edd4db9f4037b19f36c0a8f18626b222a9459d
b14f4c31ad531c8f9cb5068afe67893626e4f6fe
refs/heads/master
2020-05-17T11:06:30.964847
2015-03-03T05:48:45
2015-03-03T05:48:45
17,323,726
0
1
null
null
null
null
UTF-8
Python
false
false
4,672
py
GameWorld.py
__author__ = 'Sam' from src.army.Army import * from src.common.cities import * import time class GameSet(object): def __init__(self): super(GameSet,self).__init__() self.playerArmy = None self.compArmy = None self._playerCities = list() self._compCities = list() self...
bd2ef51a3f12cf30cbfcaf15242f1bd3fcfa75ac
e8cc392c83d11155f07157a83c00caeeb7f3a74b
/Py_Login/manage.py
63123949dece0cf0b7020cc47ad9bcc346e5d920
[]
no_license
HsuanAnChou/PythonClass
1bd5d4106fef380f51f78a850fe0a6d21333fdc9
5eda688dca8b77f8d3b01804e2bef6c89599acc5
refs/heads/master
2021-01-21T12:31:23.199291
2017-08-28T03:55:35
2017-08-28T03:55:35
102,079,388
1
0
null
2017-09-01T06:06:21
2017-09-01T06:06:20
null
UTF-8
Python
false
false
3,344
py
manage.py
import os,ast def menu(): os.system('clear') print('帳號密碼管理系統:') print('====================') print('1. 輸入帳號密碼:') print('2. 顯示帳號密碼:') print('3. 修改密碼:') print('4. 刪除') print('5. 結束程式') print('====================') def checkFile(): file = "test.txt" if os.path.exists(file): ...
a9b5b1c6c53f832058da1072a0da1d553b163a71
3420ca126483910247532901ed81923e03becf19
/Lists_Dictionaries/list_map.py
02f3a25605a5759fbd9078040cc6af4caf2f6846
[]
no_license
biodataprog/code_templates
493c04470fd74eaeb70ec2c11836e2963968c1da
7fd03ae1367273c0bf8ebe4d66b535286cd9d2dd
refs/heads/master
2021-08-24T04:57:36.596115
2017-12-08T04:05:11
2017-12-08T04:05:11
107,725,239
0
1
null
null
null
null
UTF-8
Python
false
false
338
py
list_map.py
#!/usr/bin/env python3 l = [ 'a', 100, 12/3.3 ] print(l) ['a', 100, 3.6363636363636367] #",".join(l) # this throws an error ";".join(map(str,l)) # have to cast numbers as string l = [1,2,3,4] print(l) squares = list(map(lambda x: x**2, l)) print(squares) l = ['zzz','yyy','a'] print(list(reversed(l))) for n in reversed...
cd032aaa05cbd2c6047ba3a9812790f367391995
be0477612ff5010bde54b2a71099279970ee9854
/backend/crud.py
f6bc674469d5a70de6754dc07d7b67d182906302
[]
no_license
Obazure/fastapi-react-household-applience
17395af912fba65a5c5e55a751e511e4ce254349
d0a166141f982631e0ce9f25812694a7e628f0e1
refs/heads/master
2022-12-25T16:06:25.264592
2020-09-26T22:40:24
2020-09-26T22:40:24
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,152
py
crud.py
from sqlalchemy.orm import Session from sqlalchemy.orm.exc import NoResultFound import models import schemas def create_entity(db_session: Session, entity: schemas.HouseholdCreate): db_entity = models.Household(**entity.dict()) db_session.add(db_entity) db_session.commit() db_session.refresh(db_entit...
061cc2e658017069058de36958e08575e1464800
0580c278e2e63f5f6a16fe071dae5943c4f3e1ef
/exercises/star4.py
09020b796d488f7cf514ab03dd7336167e660ec3
[]
no_license
lulu20006/python_exercises
555caa3a74d2f4478fe4816004aa350728129ce0
fef335ce3969dad9b2842ccf7aa33fa188f63c35
refs/heads/master
2020-03-13T05:52:48.899083
2018-05-03T12:32:52
2018-05-03T12:32:52
130,992,464
0
0
null
null
null
null
UTF-8
Python
false
false
53
py
star4.py
for x in range(1,12,2): print((6-x/2)*' '+x*'*')
7604ae5d7f91b3f43e41ed9d7197a8cf37a76e25
fff48ec34cde65f65f8502972f07d2af9fd9537c
/SRR_AccUnpacker.py
e03872f9c1e871b7272fe0973d3200d8c688d61d
[]
no_license
SykesZachary/LongReadAccuracyVerification
6c7acdde2ed393bb3916ad9f241292dc970405dd
b70fc5e2ee5d618fd486d417e50abc82c0e098cf
refs/heads/master
2021-04-22T01:00:03.354650
2020-04-09T11:06:06
2020-04-09T11:06:06
249,836,474
0
1
null
null
null
null
UTF-8
Python
false
false
922
py
SRR_AccUnpacker.py
### Script to wrap two bash scripts for dumping FASTQ files ### 26.03.2020 import subprocess import os # CHANGE PATH FOR YOUR MACHINE topLevelPATH = '/home/sykes/LongReadAccuracyVerification/' shortRead_GZ_loc = f'{topLevelPATH}SRRshortReads_Files_GZ/' longRead_GZ_loc = f'{topLevelPATH}SRRlongReads_Files_GZ/' def u...
eadc94df2756722edcd1877d3c4c59123eafece6
a27197ded1307aa5cd0e485a8d7965338c03b461
/most_frequent.py
138d7cd8f60ae2bd652e1f64cc446e726af71cec
[]
no_license
manuel1alvarez/Python-Problems
cec21dbd86d892f7cc3b48cbcca94c5a561c9229
2ad09a18d01b6c787dd75e2c9b73d45215c7fae1
refs/heads/master
2022-11-07T21:02:13.878142
2022-10-29T03:03:20
2022-10-29T03:03:20
134,486,752
0
0
null
null
null
null
UTF-8
Python
false
false
1,176
py
most_frequent.py
# Problem: Given an array find the most frequent item in O(n) time. """ Solution: Build a hashtable/dictionary containing the items in the array as keys the values will represent the number of times the item occured in the array. Next run a for loop through the hashtable and find the most occurent item and return i...
969a829c872cc4ce0b9e468770e847ede141b379
926d93f74d83f30e34bde9a169b7811335ee0c0d
/Decision Trees/Decision_Trees.py
02f777a7bdbdad83386ca87bdb94ea8cd2d23fb9
[ "MIT" ]
permissive
shreshthtuli/ML-Assignments
27aa80d585ac3d6506df31e32e29c6cda1d29804
64228fdb602e21064b18dd5aa4e5f7de7e8df2ec
refs/heads/master
2020-04-18T12:55:59.606823
2019-04-07T12:46:54
2019-04-07T12:46:54
167,548,423
1
1
null
null
null
null
UTF-8
Python
false
false
15,110
py
Decision_Trees.py
""" MIT License Copyright (c) 2019 Shreshth Tuli Machine Learning Model : Decision Trees """ import matplotlib matplotlib.use('Agg') import numpy as np from sys import argv import itertools from sklearn.tree import DecisionTreeClassifier from sklearn.ensemble import RandomForestClassifier import matplotlib.pyplot a...
e33c731825dec05ef8c8c7e15dfef5772e6ab837
d2ab3fc1c4c17a2099cbf301202f278c9c300df6
/backend/events/serializers/login_serializer.py
c6d632c1bbfb680a0ebb3cfa5792fa07fb2b5594
[]
no_license
naderalexan/sherpany-coding-challenge
be69676122dd6776594ae76af02db40d66183224
dd8779330dab8116207c3bd7ca77ea06f9db542c
refs/heads/master
2022-11-29T14:02:51.874772
2020-05-01T13:35:41
2020-05-01T13:35:41
285,543,320
0
0
null
null
null
null
UTF-8
Python
false
false
1,268
py
login_serializer.py
from django.contrib.auth import authenticate from django.contrib.auth.models import User from django.core import exceptions from rest_framework import serializers from .. import type_declarations as td class LoginSerializer(serializers.Serializer): email = serializers.EmailField(required=True) password = ser...
96a74a9aba1351a3024d5f96ecf9c51c63db7775
6e46ebf000998994593443c64e44c8cfeffbd9eb
/day12.py
75ef893c02ec094be40d430d6bb88cf899ca41fe
[]
no_license
mistotebe/adventofcode
f04c23915e83e9b1ed18833c5e2885031e9de3b8
4dce8e16cbd9dd3acddeddb44423f9a5e1273aa4
refs/heads/master
2021-01-10T06:42:41.311211
2016-01-02T19:53:28
2016-01-02T19:53:28
48,922,463
0
0
null
null
null
null
UTF-8
Python
false
false
558
py
day12.py
#!/usr/bin/env python import json f = lambda x: True def s(j): if not f(j): return 0 if isinstance(j, (int, long)): return j if isinstance(j, basestring): return 0 if isinstance(j, dict): return sum(s(k) + s(v) for k,v in j.iteritems()) if hasattr(j, '__iter__'): ...
02a31cccf16a15ee09aa5a7ab3016e39a5d97e40
f6a62f964720a36aad2b233c8fec81bbf5bd758b
/macropy/core/test/unparse.py
fa5d56fdfee02762f88b9a1a2bdf2566fc1d115b
[ "MIT" ]
permissive
azazel75/macropy
6748245ad50f938cc196aa1de5511c5f97ebc295
a815a76e6a70e56fd36b200eab7b924f5b0cc369
refs/heads/master
2021-01-19T03:40:58.596264
2020-04-03T00:15:56
2020-04-03T00:15:56
87,332,680
37
6
null
2020-08-18T11:32:01
2017-04-05T16:34:21
TSQL
UTF-8
Python
false
false
4,475
py
unparse.py
# -*- coding: utf-8 -*- import unittest import macropy.core import macropy.core.compat as compat def convert(code): " string -> ast -> string " return macropy.core.unparse(macropy.core.parse_stmt(code)) class Tests(unittest.TestCase): def convert_test(self, code): # check if unparsing the ast ...
54630784c58fec22ba2b13d581ba193898711f4e
59a67175281d5633413999aa3c0154acad81518d
/maquina_virtual/bkp/maquina_virtual.py
1af0edd8b4446dda6534e6ee3899be5b4d04221d
[]
no_license
antunsz/copilador-2020
85da0a0996d567e47c870c8fff21de140411b9a8
d20393031a51a1ee12a9cc0d03892a0aed6fea56
refs/heads/main
2023-01-28T13:42:24.825775
2020-12-10T01:39:40
2020-12-10T01:39:40
320,118,337
0
0
null
null
null
null
UTF-8
Python
false
false
21,655
py
maquina_virtual.py
#! /usr/bin/env python # -*- coding: utf-8 -*- # # GUI module generated by PAGE version 5.4 # in conjunction with Tcl version 8.6 # Aug 19, 2020 12:10:30 PM -03 platform: Windows NT import sys import traceback try: import Tkinter as tk except ImportError: import tkinter as tk try: import ttk py...
ca10bc8560c3d72d00c1e87d0aa86f1f7227a5a0
39e23178614d6c0e7fcbc1e37c9956e97cf6ccba
/test.py
3c89576cf06d29a63a046820b8131225fee5de7f
[ "MIT" ]
permissive
zhangks93/ASPS
47441cb87ae8a0838780166d9f1861b8ecb659fc
02f1f8cd563cdccea01dedc950fa38c570dc996e
refs/heads/master
2020-03-25T11:41:24.847777
2018-10-07T10:15:17
2018-10-07T10:15:17
143,743,235
2
0
null
null
null
null
UTF-8
Python
false
false
1,389
py
test.py
import influent as If import reactor as Ra import clarifier as Ca import constant import pandas as pd import numpy as np Influent=If.influent('influent',0,'data/bsm1LT.xlsx') A=Ra.bioreactor('Reactor1',0,1000) B=Ra.bioreactor('Reactor2',0,1000) C=Ra.bioreactor('Reactor3',0,1333) D=Ra.bioreactor('Reactor4',0,1333) E=Ra...
b99a0fcab174b0ae02541536e08ebdd4eaafd961
435f5e26db89184440361093245df450e0670aa5
/Controller.py
f912a9951278a1d5a17d8df109f7624416bff91c
[]
no_license
plloppii/reCovery
37b9a810f2f869bd9270f6265b9cab1e9700e3c7
6ade2459944bdd6dd23fcc88772a20a5b98e9a37
refs/heads/master
2020-03-27T11:41:13.708695
2019-04-04T02:00:55
2019-04-04T02:00:55
146,502,097
0
0
null
null
null
null
UTF-8
Python
false
false
3,193
py
Controller.py
from tkinter import * from tkinter import ttk #import Model #import View from Model import recover from View import recoveryFrame from os.path import isfile class reCoveryInterface: def __init__(self,model,view): self.model= model self.view= view self.gcodeVar=StringVar() self.gcodeVar.set("") self.resta...
5d6e66b2271ff570e82822e77ae138cfc1cb95d6
e79888cd68177e7ec5125270cdc52f888e211e78
/hwichan/chapter07/knock65.py
0344db8e8a94cf0b8fe84621ff25cd97bb7c99da
[]
no_license
cafenoctua/100knock2019
ec259bee27936bdacfe0097d42f23cc7500f0a07
88717a78c4290101a021fbe8b4f054f76c9d3fa6
refs/heads/master
2022-06-22T04:42:03.939373
2019-09-03T11:05:19
2019-09-03T11:05:19
null
0
0
null
null
null
null
UTF-8
Python
false
false
968
py
knock65.py
import json import pymongo from pymongo import MongoClient def main(): client = MongoClient('localhost', 27017) # 第一引数にはアドレス、第二引数にはポート番号 # データベースの呼び出し、なかったら自動的に作成される db = client.knock64 # コレクションの呼び出し、RDBでいうとテーブル、なかったら自動的に作成される collection = db.artist_info # collection.find({'n...
6af94ab104f71699d33242a8fbf7e49b80a013cb
2e8beb4921099cd386c8330d5e79a37fbc5de835
/Problem solving/Algorithm/bigger_is_greater.txt
41c7ebb24747a39c0e061fb842df172bcc8cf232
[]
no_license
eminem18753/hackerrank
79b6d9d3940e211c7864de82670cf218a7b58e5e
345832cb8f39e1b7789948376cd697a7202d5ba9
refs/heads/master
2022-10-11T21:07:03.002955
2020-06-09T06:12:01
2020-06-09T06:12:01
270,917,234
0
0
null
null
null
null
UTF-8
Python
false
false
988
txt
bigger_is_greater.txt
#!/bin/python import math import os import random import re import sys # Complete the biggerIsGreater function below. def biggerIsGreater(w): index=0 number=0 flag=0 minimum=100000000 minimumIndex=-1 w=list(w) for i in range(len(w)-2,-1,-1): if ord(w[i])<ord(w[i+1]): in...
2fc1759534d2a28aef90fd8aa2aa9b238021ff0e
7ce9d7264cfad9019c1d7ae2fbae5624de0a1525
/ex29.py
25ce7c9720d223f85593f4e564382b7c17430197
[]
no_license
rahulshivsharan/LearnPython01
76e7c3fe7104228b01ba2e906777404866468080
f735f92428bc78e9c57dbadb290cd94f2f080f66
refs/heads/master
2020-07-13T20:43:02.779030
2019-10-03T08:43:07
2019-10-03T08:43:07
205,151,041
0
0
null
null
null
null
UTF-8
Python
false
false
313
py
ex29.py
# creating a class Car and adding properties and methods to it class Car: modelName = "Suzuki WagonR" def getInfo(self): return "The model name of this car is "+self.modelName # main function def mainFunc(): car = Car() print(car.modelName) print(car.getInfo()) mainFunc()
8e94c5747cf857088c700ba2d13f63d11c5fddcd
ef7a5e1445706482a0e20d2632f6cd3d0e279031
/amy/autoemails/mixins.py
3614c4ac1942ea7c0a6a5094a582fb13c50110a1
[ "MIT" ]
permissive
pbanaszkiewicz/amy
7bf054463f4ecfa217cc9e52a7927d22d32bcd84
f97631b2f3dd8e8f502e90bdb04dd72f048d4837
refs/heads/develop
2022-11-17T18:56:18.975192
2022-11-03T23:19:41
2022-11-03T23:19:41
28,005,098
0
3
MIT
2018-03-20T18:48:55
2014-12-14T19:25:22
Python
UTF-8
Python
false
false
308
py
mixins.py
from django.db import models class RQJobsMixin(models.Model): rq_jobs = models.ManyToManyField( "autoemails.RQJob", verbose_name="Related Redis Queue jobs", help_text="This should be filled out by AMY itself.", blank=True, ) class Meta: abstract = True
f75c1ad7c02b172e106c2a91cc22df6a251b498d
8d211c3dd6a8b1d92c85b9591d22632a790413a0
/test.py
ba9926088bc6902327ee2ae652e47f00f3399362
[]
no_license
sevheng/deepface-testing
87f2942520ef578a6523008715cb51b7b58faeb4
c2ac8f92853f6d1041823a41d1627e43dcfa7152
refs/heads/main
2023-04-07T07:53:59.341592
2021-04-12T12:19:51
2021-04-12T12:19:51
353,658,141
0
0
null
null
null
null
UTF-8
Python
false
false
1,012
py
test.py
from functions import find_face_similarity, ExtractFace, find_face_similarity_test, test from deepface.commons import functions from deepface import DeepFace import timeit import os start = timeit.default_timer() video_path = 'test_data/5s.mp4' image_path = 'test_data/test1.png' dateset_path = 'dataset' if not os.pa...
25622c3db1eeeee31b6ffe6acbd8180a2a75d5b5
399f17fec02bd685fcef256bfa921a4849a0a4b7
/aabs_detekce_qrs.py
ee0ea83b66b8900c227db9cdfe11b14fae0b0cdb
[]
no_license
JacobKaspar/Blo
21aa91af13b8c406212aeb789295a121b17ac45e
c8bf3e9ba466f78c2cd24157cb09b9f560fa526b
refs/heads/master
2020-11-25T10:55:19.344535
2019-12-17T14:15:02
2019-12-17T14:15:02
228,628,529
0
0
null
2019-12-17T14:31:02
2019-12-17T13:59:28
Python
UTF-8
Python
false
false
650
py
aabs_detekce_qrs.py
import numpy as np import matplotlib.pyplot as plt from scipy.io import loadmat import scipy.signal as signal data = loadmat('MO1_117_03.mat') x=data['x'] x=x[0,:] plt.plot(x) plt.show() b=signal.firwin(81,cutoff=[16-5,16+5],pass_zero='bandpass',fs=500) a=np.zeros(len(b)) a[0]=1 y1=signal.lfilter(b, a, x) ...
ba04ea29a5df3b8a81f1d9001390e46112711aa8
7326b5b405f13f4e6c822178c2cf8cb39d6e6ce4
/Projetos de Aprendizado/Project_07/src/schemas/schemas.py
6ac63024d707af0519ec0069a0bfb1c698a1886c
[]
no_license
ramonvaleriano/Projetos-FastAPI
0a37ef0ad21e2722ac2f196049e577732923049e
c3d6d2f48ee1b3215a870b40357da20bbe860cd1
refs/heads/main
2023-07-13T22:08:57.823147
2021-08-22T20:41:38
2021-08-22T20:41:38
394,751,061
0
0
null
2021-08-22T20:39:45
2021-08-10T18:46:34
Python
UTF-8
Python
false
false
1,061
py
schemas.py
# Importando a classe base que será o modelo de analise # de saída dos dados. from pydantic import BaseModel # Lib responsável por deixar como opcional o tipo de uma variável # Lib responsável por tipa uma lista para a model from typing import Optional, List class Usuario(BaseModel): """ Model que caract...
3f6124aefda9da8b8ac9f36eb22dc3a3bd890290
1b44a99e84c6a0cd6e371cd9f575d0666285e9f3
/final_model.py
130f406636aee2333dd88dd563a16ad39d0b562b
[]
no_license
mwwu/Kuzushiji_Character_Classification
285b95408cff32c1bf5d9ddc0de42f9caba7a7cb
c33ffe137ffc901d80ffb71bdde73dfdeef95e0f
refs/heads/master
2020-05-06T15:45:47.519934
2019-03-19T05:02:40
2019-03-19T05:02:40
null
0
0
null
null
null
null
UTF-8
Python
false
false
2,521
py
final_model.py
from my_resnet import ResNet import numpy as np from keras.models import Sequential from keras import metrics import keras from sklearn import model_selection import matplotlib.pyplot as plt from io import BytesIO import tensorflow as tf from tensorflow.python.lib.io import file_io """ ______________________________...
b88c6b1dc721a3b4afc2d54e81abe0373c6e17e4
ac0d7050a91fea2bdaa50b9350c69616a38bdc9b
/easy/valid_palindrome.py
b886fbbffde322096178f04b55d2ec3474de16c7
[]
no_license
sarthakkhandelwal7/LeetCode
4d330ddfe4815968b93ab1aee65731513853f070
52f8c90c6bcd95aba1ef68c1c969303c255d2bd7
refs/heads/master
2020-07-06T11:35:03.736593
2020-04-19T09:04:57
2020-04-19T09:04:57
203,004,056
0
0
null
null
null
null
UTF-8
Python
false
false
147
py
valid_palindrome.py
""" Input: "A man, a plan, a canal: Panama" Output: true """ if __name__ == '__main__': print(Solution().isPalindrome("race a car"))
272f8d2389b6bcdccbeff406784ad4eb50a7c7f0
88b3faddf4f7b7322b86b6e7388d6fe6204eaa43
/src/apps/story/admin.py
9c7cad08ba6010f7bc5e5eeb8f8da81869357e86
[]
no_license
campherkurt/glowmob
464432050786f3fb79ee8febc8ae494d485df916
a83e1b91e31c5ece0844973365b362a637a6218d
refs/heads/master
2021-01-19T00:11:51.678468
2012-05-31T10:20:47
2012-05-31T10:20:47
3,572,961
0
0
null
null
null
null
UTF-8
Python
false
false
3,552
py
admin.py
from django.contrib import admin from django.db import models from django import forms from apps.story.models import Story, Genre, Chapter, Download, Announcement, Competition, CompetitionEntry, Series, Language, WriteStoryEntry, Review import settings from django.contrib.contenttypes.models import ContentType from dja...
5c0cfabfdc8d0a7c766ad4576c4bd4d5ed2c64a7
a67d62770a8307930d0c39c6798c182ceaff063c
/tesseract.py
982bbed22894fcda654a2f30fe07afafb23dff98
[]
no_license
zhjc1124/http
1bf8e70115640faaebf8a4bae1895bdaed005569
07dca2a3f9f4a6d53af3375634685b5bb2583344
refs/heads/master
2021-03-28T20:58:45.642770
2017-10-10T05:47:20
2017-10-10T05:47:20
101,481,190
0
0
null
null
null
null
UTF-8
Python
false
false
577
py
tesseract.py
# -*- coding: utf8-*- from pytesseract import image_to_string from PIL import Image def to_string(filename): image = Image.open(filename + '.jpg') lang = 'eng' config = '-psm 10 -c tessedit_char_whitelist="ABCDEFGHJKLMNPQRSTUVWXYZ0123456789"' if filename == '1': lang = 'chi_sim' config...
468412a1aabec9af0bc253c9b1d6e716e7fccc69
08c50b2939bb84e465798d673b7e1c964959990a
/pages/outlook.py
0633e839abd497f7e4071a8231b37c427c8e87d9
[]
no_license
StefanBloemheuvel/dashboard_template
51560401ecda92017baa9208071e1a2589418dde
ce41b5effd0bf59c986c09276ae20f0c0e4fecf6
refs/heads/main
2023-08-27T18:06:06.106848
2021-10-27T12:41:05
2021-10-27T12:41:05
null
0
0
null
null
null
null
UTF-8
Python
false
false
246
py
outlook.py
import dash dash.register_page( __name__, title='Forward Outlook', description='This is the forward outlook', # should accept callable too order=2, path='/forward-outlook', image='birds.jpeg' ) def layout(): return 'Forward outlook'
88c6392d07ab946ab29c3a2f9a4e0d245e43a550
6d6f962f07c2df079745860a9d84649961c2a33c
/favorite/urls.py
dcb4a243f8d5a5eb1376e73df608e599867c018e
[]
no_license
sharkdaddyAI/fintastic-django
50c24615d6dc0966c1f934c57ab0863df80a92f6
b9a6e3af9e38c72378e0273be939058f726033be
refs/heads/master
2022-12-11T21:26:06.649178
2018-07-10T01:18:05
2018-07-10T01:18:05
139,480,669
0
0
null
2022-07-06T19:49:24
2018-07-02T18:38:43
HTML
UTF-8
Python
false
false
186
py
urls.py
from django.conf.urls import url, include from . import views app_name='favorite' urlpatterns = [ url('', views.index,name='index'), url('one_day/', views.one_day, name='one_day') ]
632b1ab64e37736605935130e61eedb5a7469feb
f097d1648e1d3b5815483bc623cfc503e8c6028c
/examples/example_discovery/registry.py
efba15ae9f3153cc1ff2e6582e30753d7251ead2
[ "MIT" ]
permissive
vladcalin/gemstone
0728ad443343ef9ce1d547af556b8e3840205eaa
325a49d17621b9d45ffd2b5eca6f0de284de8ba4
refs/heads/master
2021-06-16T19:45:23.428993
2017-04-22T15:11:48
2017-04-22T15:11:48
73,922,375
11
1
null
2017-04-22T15:11:48
2016-11-16T13:23:36
Python
UTF-8
Python
false
false
602
py
registry.py
import threading import gemstone class ServiceRegistry(gemstone.MicroService): name = "service_registry" port = 8080 services = {} lock = threading.Lock() @gemstone.exposed_method() def ping(self, name, url): with self.lock: self.services[name] = url @gemstone.expo...
1fa0a372c7ced1e99dd83f60231fe22e54f53c30
13a01334af0384a8db434b0b3a82eee10bbccb5f
/wog/MainScores.py
817602db70608781f734bc4360481dba817bf8b3
[ "MIT" ]
permissive
Tomer9000/wog
a051f2a5995006b13cad2abc2346ae553326a997
07dcbec2b6869a687e6f48fbf83f1b7732ad403b
refs/heads/main
2023-01-27T19:56:24.559313
2020-12-10T14:50:32
2020-12-10T14:50:32
319,326,384
0
0
null
null
null
null
UTF-8
Python
false
false
1,369
py
MainScores.py
import os from flask import Flask, render_template from .Utils import Utils class MainScores(Utils): """ serve the user’s score currently in the scores.txt file over HTTP with HTML. """ def __init__(self): """ This runs every time a user calls the class and it initializes neces...
57bbcd81fa7ba3a803bd9f941a160c6a4aa45d54
b49712cea80960e678e082755b357c8d76e95b63
/Visualization.py
0aee02a3d25bd34b75caadde46afc62dc3721412
[]
no_license
ioanacocu/BondAgents
f2accd0a2ac8edd3561e06dd8725624e7eac89df
db1f9d2961d3cec93bc98dadd8301bea414c77e0
refs/heads/master
2022-11-04T23:14:24.156969
2020-06-30T21:12:22
2020-06-30T21:12:22
270,024,005
0
0
null
null
null
null
UTF-8
Python
false
false
2,009
py
Visualization.py
from datetime import datetime from tkinter import * from Agent import * from InitializeValues import * from scipy.stats import truncnorm root = Toplevel() root.geometry("620x600") label1 = Label(root, text="Legal obligation") label1.pack(side=TOP) var1=IntVar(); def selectedValue1(): label1.configure(text='Lega...
341b9bbd7acb4673f83da566a86dc3dcce95ca1f
a51ded82c895649cad5a36f11acdad232e20fc68
/Lecture104_Jarossiri_J.py
1e08feafd57ed3929c7df9b0122d6aca5a6a6f45
[]
no_license
Plata12/TestGit
58106fc3b188687b97fadc15c7fc5c48fce2aa77
df703f30d681091d11dc2985458431184766fb00
refs/heads/master
2023-02-06T12:54:42.579396
2020-12-26T08:20:49
2020-12-26T08:20:49
322,191,735
0
0
null
null
null
null
UTF-8
Python
false
false
766
py
Lecture104_Jarossiri_J.py
class Customer: name = " " lastName = " " age = 0 def addCart(self): print("Added product to", self.name,self.lastName,"'s cart") customer1 = Customer() customer1.name = "Pla" customer1.lastName ="Johnson" customer1.age = 38 customer1.addCart() customer2 = Customer() customer2.name...
23cd1c03a6db26bd46bfb1f87c1b6306c08e4c5b
0bc5b71439749e5f62cf229e98932bf96d387247
/template/sort.py
b86eed8088fe49dff5ef6b723ae212c448d2ee1a
[]
no_license
hjabbot/PyWiFeS_py27
1313238f6754a01e9bef84cd69568c6d1e83fe4e
d358e6479768d41a5174fc403ede513904206829
refs/heads/master
2023-06-26T06:51:38.107917
2021-07-13T02:41:43
2021-07-13T02:41:43
347,620,644
0
3
null
2021-07-13T02:41:44
2021-03-14T11:41:47
Python
UTF-8
Python
false
false
2,992
py
sort.py
import sys import os import subprocess DIR_PATH = sys.argv[1] # PATH/*.fits def get_fits_in_dir(PATH): fits_files = [] for file in os.listdir(PATH): if file.endswith('.fits'): fits_files.append({ 'FILE_NAME': file, 'FILE_PATH': os.path.join(PATH, file) ...
11443b2faa6bbe3d491f17c7e07466f99e618021
91d1a6968b90d9d461e9a2ece12b465486e3ccc2
/s3api_write_3/bucket-inventory-configuration_put.py
72b3f1ef1ef9da90fa5e6ad5de35b0ee11697220
[]
no_license
lxtxl/aws_cli
c31fc994c9a4296d6bac851e680d5adbf7e93481
aaf35df1b7509abf5601d3f09ff1fece482facda
refs/heads/master
2023-02-06T09:00:33.088379
2020-12-27T13:38:45
2020-12-27T13:38:45
318,686,394
0
0
null
null
null
null
UTF-8
Python
false
false
1,364
py
bucket-inventory-configuration_put.py
#!/usr/bin/python # -*- codding: utf-8 -*- import os import sys sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__)))) from common.execute_command import write_three_parameter # url : https://awscli.amazonaws.com/v2/documentation/api/latest/reference/s3api/put-bucket-inventory-configuration.html ...
9cd3be259e310f99ea5e5a1ccbdf8931d916cf92
73b0a93d0910edaee123a4199a3df3eb43f67138
/queueprocess.py
dbf4ab827f8603cf368d5d769419b65fcd279ddb
[]
no_license
elifehacker/playground
4f6e1f56b3f04a4be991db13aed6aa3a9a37ea30
61fed25d2e13c92ae32ed4ae063d7fdf8fccfe86
refs/heads/master
2023-07-08T13:48:22.563147
2021-08-15T06:32:04
2021-08-15T06:32:04
391,574,548
0
0
null
null
null
null
UTF-8
Python
false
false
1,294
py
queueprocess.py
import threading import queue import time thread_names = ["t1","t2","t3"] task_strs = ['job1','job2','job3','job4','j5','j6','j7'] lock = threading.Lock() todos = queue.Queue(5) class Processor(threading.Thread): def __init__(self, name): super().__init__() self.name = name def run(self): ...
06cca8ff14c7d053d660d0547d69cf489f58f9e5
28cffbf72941da5a413e7db2097e0dd695424308
/Day 1/date-diff.py
2586523d81c1b0e7ac70b3bbebed76dac0d9a72b
[]
no_license
idebosmitha/Python-practice
27e98a49f29661b9842a7069f1821c0af88fd88a
ab2ca5415df8f6ca5d533b409c77bb692b162a0a
refs/heads/master
2020-04-15T11:02:53.144174
2019-02-27T08:45:06
2019-02-27T08:45:06
164,610,919
1
0
null
null
null
null
UTF-8
Python
false
false
574
py
date-diff.py
''' 12/04/2019 2018 years + 3 months + 12 days leap year: y / 400 == 0 || (y % 4 == 0 && y % 100 != 0) year = 413 year//4 - year//100 + year//400 ''' def count_days(date): months = (31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31) day, month, year = tuple(map(int, date.split('/'))) days = year * 365 + year//400 +...
055090398d81b6b50c3031c4b0a461d6dc136f9c
f04155c3e753a0511cefd786d3943218c24f4566
/tests/test_simple.py
6bde49e4f1730ac283fb249284748b7dba0543ba
[ "Apache-2.0" ]
permissive
Tinche/aiofiles
a75708590ca7c473978291eef97b3c1e20d5e454
3f7638b46187e73a6604f1f12dcc9a19e0aecb7d
refs/heads/main
2023-09-03T17:27:28.993913
2023-08-17T19:25:44
2023-08-17T19:25:44
33,088,125
2,483
194
Apache-2.0
2023-08-17T19:25:45
2015-03-29T20:28:14
Python
UTF-8
Python
false
false
1,874
py
test_simple.py
"""Simple tests verifying basic functionality.""" import asyncio from aiofiles import threadpool import pytest @pytest.mark.asyncio async def test_serve_small_bin_file_sync(event_loop, tmpdir, unused_tcp_port): """Fire up a small simple file server, and fetch a file. The file is read into memory synchronousl...
40458f7c13094df84895b97cad1956fb256e447f
4e0ee6e7ce329f91b543c89858793428baf46b8d
/tests/test.py
53432a332241c8c7299ada338e326f5385523550
[ "MIT" ]
permissive
N4S4/thingspeakWrapper
cfe549d93a92b80b09792a4eb0519c2cc0f59f9c
f5c26e52c09124b85cc6056782d766d145e65a31
refs/heads/master
2020-03-18T07:06:43.819811
2019-01-22T00:03:50
2019-01-22T00:03:50
null
0
0
null
null
null
null
UTF-8
Python
false
false
2,537
py
test.py
import time import thingspeak_wrapper as tsw # Initiate the class ThingWrapper with (CHANNEL_ID, WRITE_API__KEY, READ_API_KEY) # if is a public channel just pass the CHANNEL_ID argument, api_key defaults are None my_channel = tsw.wrapper.ThingWrapper(501309, '6TQDNWJQ44FA0GAQ', '10EVD2N6YIHI5O7Z') # all set of func...
db982cd8f9b7a9d37fe76c152cdb87881334e315
dc8fecc12a0787995577a3551687422fbfd0bae8
/habitat_baselines/common/tensor_dict.py
94b3d25df8c246f2ed4654f6e7136ac6af17ed1c
[ "MIT", "CC-BY-NC-SA-3.0" ]
permissive
Skylark0924/habitat-lab
57a4adf7b70454337c39be6c6c8bc8e368c915a5
31bb5777f73a0540222a6668c57673a07b6f311e
refs/heads/master
2023-04-21T17:13:47.778184
2021-05-05T15:06:37
2021-05-05T15:06:37
335,334,676
1
0
MIT
2021-03-12T15:16:02
2021-02-02T15:28:39
Python
UTF-8
Python
false
false
4,213
py
tensor_dict.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import copy import numbers from typing import Callable, Dict, Optional, Tuple, Union, overload import numpy as np impo...
0ba0bb3b76e044a46daf17b12f93527cbf5d2497
c492be9e7b31d973f42aa8f5b96e02ad63e4df4f
/MA/FitnessFunction.py
78e5ed82ee09e9a3278fc28299cafed4f32ccb41
[]
no_license
BenteCodes/learnedwalking
5f04183d6ff5432cbdcd4f5d409d0bc4fbb6c426
7e49b73aa5f5ec1c58c891fca4d554b04394b890
refs/heads/master
2021-07-08T02:08:10.044440
2020-07-17T13:24:15
2020-07-17T13:24:15
140,084,955
0
0
null
null
null
null
UTF-8
Python
false
false
1,230
py
FitnessFunction.py
import math from FitnessFunctionAbstract import FitnessFunctionAbstract class FitnessFunction(FitnessFunctionAbstract): def __init__(self): pass def getFitness(self, did_fall, position_ref, position_robot_foot_r, position_robot_foot_l): fitness = 0 # fitness += self.penalizeNonMo...
9a72363f7a9b2b8e730cec8426a3c9733cac0072
e8d2156f5b6f5e08c6903fcdb57efa11b0e2afc1
/debug.py
bca7e88c6b70c09509f67632bc10df43f717cc14
[]
no_license
shiotomo/pyMusic3
9485f7cdd427b77f4c9bb5583568b5d06541f633
ff04fee3695df039497446e81b958a307f087cb2
refs/heads/master
2021-01-21T21:14:52.252148
2017-06-21T10:39:22
2017-06-21T10:39:22
94,791,904
0
0
null
null
null
null
UTF-8
Python
false
false
157
py
debug.py
from listUp import ListUp from readJson import ReadJson listUp = ListUp() listUp.listUp() readJson = ReadJson() hoge = readJson.jsonNumber() print (hoge)
12fefef780bf255766f2d8c64e91c0a1556cc60f
2e04a5972727029dbe4b3c827cda39030b4fb7b8
/dbuild/dcontext.py
cfa67a68f1e5e7db9799b32efee85e38e7c5a297
[ "MIT" ]
permissive
mickare/docker_build_environment
f8b3acfa7282cdb54cd50f19543e738bd99b266a
770bb41097ed8b98eef719a614d78d3229655e8d
refs/heads/master
2021-03-22T04:32:23.281193
2017-12-24T14:01:59
2017-12-24T14:01:59
114,499,512
0
0
null
null
null
null
UTF-8
Python
false
false
3,254
py
dcontext.py
from typing import Dict, List, Set import docker import os import yaml from docker import DockerClient from docker.errors import ImageNotFound from dbuild.config.config import Config from dbuild.denvironment import BuildHandler, BuildContainer def getOrCreateImage(client: DockerClient, config: Config): image_na...
e19c5a126d9133dd9d63846714614df03ac8b6d4
8700b9bab7aa676efa697f5290edd99f8011a865
/DNA/TEST/decode_test.py
7dfcbfec334f771a60965e2cdd3641aad9c0a84b
[]
no_license
anaganitejaswini/DNA-compression
a11850f40946068a3495b2882e29d9ae61217e79
d0a17410006cb6bdacc58cc89115dd0d582de86b
refs/heads/master
2022-12-02T05:34:26.649251
2020-08-14T16:16:12
2020-08-14T16:16:12
287,573,819
0
0
null
null
null
null
UTF-8
Python
false
false
487
py
decode_test.py
from bitarray import bitarray from bitstring import BitStream, BitArray import numpy as np import json import binascii def huffmanDecode(dictionary, text): res = "" while text: for k in dictionary: if text.startswith(k): #print(text) res += dictionary[k] ...
c12e490b3ee5c0295d343e291c815b52c21837b4
75c3a5e1ec4b2e5b4c2fc876b1515e15d077e20d
/Preprocessing part/11.03.1.py
698fa676564a11978be615fa219709e7ba40d61d
[]
no_license
William0111/Speech-separation
1a2b2c2c0115ee7e054999e1c79dadaafb710413
c60b37fd978624ac13a7ec55a303644d559e51ca
refs/heads/master
2020-05-01T08:51:14.331098
2019-05-10T20:39:32
2019-05-10T20:39:32
177,387,174
1
0
null
null
null
null
UTF-8
Python
false
false
466
py
11.03.1.py
#目的:找到可以直接学习的代码,利用mask的方法分离噪音 #加噪(1,找到噪声,加上去 # import torch as t import matplotlib.pyplot as plt import soundfile as sf import numpy as np signalData1, samplingFrequency1 = \ sf.read('/Users/admin/Desktop/practiceunderpycharm/flac/2.flac') samplingFrequency1 = int(samplingFrequency1) Sxx, f, t, im = plt.specgr...
a5d816dd304938aceac89c1c20f54ecc4ed0131a
ac985aef16aa2dd72760b350e65f1023959c439f
/Scrapping/Archive/SingleProject/denton_run_2.py
ab94a9da52fb0324e980498ce41aa3fc4a47f8e3
[]
no_license
osamascience96/Python
e9398f428a7e363387da19a5fdf862e554831577
74a9342a1fd445f890f6ee53416e8dedbd7992df
refs/heads/master
2022-07-07T06:35:51.321952
2022-06-29T13:32:52
2022-06-29T13:32:52
182,198,144
0
0
null
null
null
null
UTF-8
Python
false
false
3,684
py
denton_run_2.py
from bs4 import BeautifulSoup import pandas as pd from gspread_dataframe import set_with_dataframe from selenium.webdriver.common.by import By from loader import initChromeDriver import time def run(input_sheets, output): print("=="*30) print("Denton Scrapping Second Instance Starting") pri...
fd5b91e16b3d2b5b1c4cf53c7a88a963932e77c3
2dfbd1328e4dd6dc9852d52e90cd627b402059e1
/OOPALL/fundamentel/decoder.py
f57468686e72b891e02005429e9992ba02f4ccfa
[]
no_license
Bappy200/Python
2817bcb32bf751033fadc960694704a546055e47
0ad3d53cc204af361890182585cdf9bd3ec9a199
refs/heads/main
2023-03-01T05:29:32.994940
2021-02-12T23:08:36
2021-02-12T23:08:36
338,268,623
0
0
null
null
null
null
UTF-8
Python
false
false
369
py
decoder.py
'''def result(fnu): def inner(): print('start') fnu() print('end') return inner @result def data(): print('Hi how are your') data() ''' def start_decoder(fnc): def inner(x): print('start') re = fnc(x) print('end') return re return inner @...
81315e5f8d09001b7039e8e579bc243807c43c01
a93a2ac2b0228dd64a139fbc620468c04416af73
/scripts/ObjectivesPerRegion.py
0e724cc395291924b163996513131988b9626cbb
[]
no_license
camargodev/lol-data-analysis
b8bf826dba7a65eb79fd718730c4a97a6d9047a8
3858e93d2213ae7d44813143b504e4551835886d
refs/heads/master
2020-03-18T23:50:51.474876
2018-07-11T04:07:37
2018-07-11T04:07:37
135,432,920
1
0
null
null
null
null
UTF-8
Python
false
false
6,082
py
ObjectivesPerRegion.py
import csv PATH = 'C:/Users/camar/Desktop/UFRGS/T31/lol-data-analysis' FILE = PATH + '/sheets/LOL.csv' REGION_INDEX = 0 WINNER_INDEX = 5 B_INFO = 12 R_INFO = 19 TOWER = 0 INHIB = 1 DRAGON = 2 BARON = 3 HERALD = 4 B_TOWERS = B_INFO + TOWER B_INHIBS = B_INFO + INHIB B_DRAGONS = B_INFO + DRAGON B_BARONS = B_INFO + BAR...
8397c649a2ded9fcac08b6f3e37d9a1fe9b201ba
4b9f438901559312ad95386bc3cbd5151a1f12cb
/main.py
888cf1683cbd1004e7a8127889a90bd91103ca32
[]
no_license
XuepingCao/Code-Generation-System
e8c4c39c87a4e20035decc80f72e70944042b9ce
bd28c6cc730f9b1f9908e4e8e5f2723b639b3efa
refs/heads/main
2023-08-19T23:21:39.638745
2021-10-25T10:14:04
2021-10-25T10:14:04
null
0
0
null
null
null
null
UTF-8
Python
false
false
3,152
py
main.py
""" 企业编码生成系统的主程序模块主要实现对各任务功能的选择和管理。 """ import re import time from securitycodegen import * from barorqrcodegen import * from lottery import * def menu(): print('''\033[1;35m **************************************************** 企业编码生成系统 *******************...
ec4be876f1b7d88f1beb903f1bf991216d8aaa9c
1a13f8071c704aa511139f90276713b86f1e47fa
/bench_search.py
2663de67568542f8b09fd0a3d382b7b066bedc61
[]
no_license
thomasgreg/dcv-benchmarks
8a1c135ec9336a4e7fbe160a90a5bc3fb451ac46
40caf638bb6825e576d8cbb0ecf05cdd5b18954e
refs/heads/master
2021-01-01T04:07:40.927805
2017-07-13T13:35:30
2017-07-13T13:35:30
97,124,058
0
0
null
null
null
null
UTF-8
Python
false
false
5,644
py
bench_search.py
import multiprocessing from time import time import pandas as pd import traces from distributed import Client, LocalCluster from distributed.diagnostics.eventstream import EventStream from sklearn.datasets import fetch_20newsgroups from sklearn.feature_extraction.text import CountVectorizer from sklearn.feature_extrac...
7aca4ec9642b97c749548b22c33c7e4361e171d5
81655d51d70d0b539bd0edf41e62592f786db2e3
/Day 62 - Coffee and Wifi/main.py
1a44f41e125353ed0d59206befd26958ee743884
[ "MIT" ]
permissive
atulmkamble/100DaysOfCode
b6cfe9b0b9c7f5bebe2f61ada7cdcaf0f851fe64
ccfb6cb8582be69c63c666a3b097e0130585e4c9
refs/heads/main
2023-04-12T01:39:33.165239
2021-04-28T08:00:54
2021-04-28T08:00:54
335,040,719
2
1
null
null
null
null
UTF-8
Python
false
false
2,335
py
main.py
from flask import Flask, render_template, redirect, url_for from flask_bootstrap import Bootstrap from flask_wtf import FlaskForm from wtforms import StringField, SubmitField, SelectField from wtforms.validators import DataRequired, URL import csv app = Flask(__name__) app.config['SECRET_KEY'] = '8BYkEfBA6O6donzWlSihB...
1cfcedaf7d62927fec3cebc659081693bb0a0487
81da0c0cb39b8458ded7ade1ffc63ac0e283dd82
/input.py
3e6b95cfaaaada014aeb7abda94db6b3d20515fb
[]
no_license
Kalininator/HashCode2018
58f5b2fa15b1b421dbf7247c94266c843a849824
3589034e68dd02565f425e74301d28eb063e49a4
refs/heads/master
2021-01-25T12:20:52.267785
2018-03-01T21:28:36
2018-03-01T21:28:36
123,467,431
0
0
null
null
null
null
UTF-8
Python
false
false
960
py
input.py
import numpy as np from Ride import Ride from Map import Map from Vehicle import Vehicle def createMapFromFile(filename): mydata = np.genfromtxt(filename, delimiter=" ",dtype=int) criticaldata = mydata[0] row = criticaldata[0] col = criticaldata[1] vehicles = criticaldata[2] rides = criticaldata[3] bonus = cri...
68d0cbc65fe47f43eadc604709259869e458594d
0662d077d50e98f87551ebf714890eeecc2a7975
/stock_analysis_tool/model_research/Phase4_models/models_p4_3_best_mixed.py
a0c1f0ee1dbb5c17c79e2f419ce4b3e17643d591
[]
no_license
ryans2014/nindex_stock_prediction
dc18f11aed6006fba78d9c5e828fda18787c26fd
70a612fde8c6098fd1a8a87d9daceeb07e165607
refs/heads/master
2020-07-06T14:26:37.469978
2019-10-07T04:28:37
2019-10-07T04:28:37
203,048,748
0
0
null
null
null
null
UTF-8
Python
false
false
9,828
py
models_p4_3_best_mixed.py
import tensorflow as tf import utility @utility.multi_input_model @utility.named_model def p4_3_cnn_multi_input_deep(): def get_submodel(): input_ts = tf.keras.layers.Input(shape=(20, 1)) temp1 = tf.keras.layers.Convolution1D(8, 3)(input_ts) temp1 = tf.keras.layers.BatchNormalization(axis...
103bed08924f8cf21d238b5045e310dbb17e9401
4d2976248a71b5bb430f65f72127944fb3eecaa5
/test.py
c1dec3a993b8eacd7afe711eee65e0e046e4d549
[]
no_license
GRamakiran/python-programming
06cb1f0de2a4a36be364323db337169acb087ff9
07d88765adcb564f498b2836fcca5c3845c6503b
refs/heads/master
2023-04-08T22:23:47.333381
2021-04-12T06:54:23
2021-04-12T06:54:23
355,417,299
0
0
null
null
null
null
UTF-8
Python
false
false
81
py
test.py
import test1 import test2 res=test1.max(10,20,30) print(res) print(test2.fun(22))
e3fc76b0a7c6b1538dc10809ca852086638fb9df
de9af4aec75b1f16220e123f07fb20250e356167
/asyncio/hateblo/future1.py
3778f6c2fe98766a0c68c6b7cbd50fdfdbfb0bdf
[]
no_license
tommarute/python-sandbox
fb979baa8d66ca82b1841a8519581f3ac2d8828a
c640eb425a534e10998edf3ecc5412cf21e7e2f4
refs/heads/master
2021-07-21T06:34:09.217665
2021-01-01T03:12:04
2021-01-01T03:12:04
231,442,194
0
0
null
null
null
null
UTF-8
Python
false
false
413
py
future1.py
import asyncio import logging logging.basicConfig(level=logging.DEBUG) def set_result_to_future(value, future): if not future.done(): future.set_result(value) loop = asyncio.get_event_loop() loop.set_debug(True) future = loop.create_future() loop.call_soon(set_result_to_future, 'DONE!', future) result = ...
e01f540c7df42894e6b75cf6091bbbd4f14a7856
b7d642b29ec27f2b1402dd3e1428b534c2508f3f
/Practical Practice/SH2/T1W9/2.py
3f28aa25664a9491a6c904570ca980a7a36ba75d
[]
no_license
liuya2360/H2-Computing
57b604d3807381d2777dd913491d23b4300caadd
2472c22b09ce27d7be745851e27354cb1ba0f134
refs/heads/master
2021-07-12T01:54:07.470996
2020-08-13T11:21:00
2020-08-13T11:21:00
177,277,298
9
0
null
null
null
null
UTF-8
Python
false
false
3,890
py
2.py
import random class cell(): def __init__(self, x, y): self.x = x self.y = y self.bomb = False self.neighbour_bomb = 0 def setBomb(self): self.bomb = True def isBomb(self): return self.bomb def addNeighbourBomb(self): self.neigh...
18d036d390abeeee349f62cd455dcddb289a56bc
50969dc5360b0a616d5524e32eab8e560194d2ed
/apps/datauploader.py
cce6522aa4c9acd185dd52ebb5372457af593e1d
[ "Apache-2.0" ]
permissive
forty/Webapp-Personal-Data
ab4a11fcfa6f0b236268b8e9410c988277040ff7
c36a315924a7996ad4dc9952ed8cc02dc852eb59
refs/heads/main
2023-08-22T04:22:49.900302
2021-09-19T19:08:59
2021-09-19T19:08:59
null
0
0
null
null
null
null
UTF-8
Python
false
false
14,903
py
datauploader.py
import dash_core_components as dcc import dash_html_components as html import dash_bootstrap_components as dbc from apps.tasks.datauploader.parse_facebook_files import parse_facebook_files, loading_state_fb from apps.tasks.datauploader.parse_google_files import parse_google_files, loading_state_gg from app import app...
4abc9650e434b628ad7b1f4a1b75e8db6e81ec40
d804c9aa9b3054bd57c61a8c911327db4d0e17ae
/Assignment 1/assignment_2/mapper.py
ac24b8c0664acc0ee563126ffcaa6d93a80b1159
[]
no_license
Ghosh-Anisha/Big-Data-Assignment
4ca1260554ea932bd51ac7e495afb2ecb9269b7d
e8866b68ac3503b591f6f11d886c801cf0e320db
refs/heads/main
2023-09-06T08:10:53.097686
2021-11-04T14:59:23
2021-11-04T14:59:23
405,600,489
0
1
null
null
null
null
UTF-8
Python
false
false
790
py
mapper.py
#! /usr/bin/env python3 import sys import json import math import requests lat= float(sys.argv[1].strip()) long= float(sys.argv[2].strip()) D= float(sys.argv[3].strip()) def euclidean_distance(obj): x1=float(ob["Start_Lat"]) x2=float(ob["Start_Lng"]) if (math.isnan(x1) or math.isnan(x2)): retur...
25333947875a1a75ce97ed2f102f315bb3ed92dd
8fa8c555be01e335236796b0a71f3901e7f58b14
/survey.py
d1f18306b3018f71028328fcfe576348457b3cc7
[]
no_license
RemiRaff/simplon
9ab42e05eb5b3a527d7421a3a30d8aae1ae4888a
cbc83adaab542a6c503d7a8ef8b347ea61488267
refs/heads/main
2023-05-16T10:43:50.383366
2021-06-11T10:13:06
2021-06-11T10:13:06
352,962,431
0
0
null
null
null
null
UTF-8
Python
false
false
9,888
py
survey.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Jun 8 15:23:50 2021 @author: simplon """ import pandas as pd from sqlalchemy import create_engine import re def fill_table_df(table_name,data,data_col_name): columns_name = pd.read_sql_query("select * from "+table_name+" limit 1;",engine).columns...
f945437ec181fe4194bae8715f70dea8464f1f28
61464954e225c431cb795e7febe9da06bc4dd8ad
/Polynomial Linear Regression.py
a86c948d730229c61b6bc2170a8b4af4eea3926b
[]
no_license
shivam-ctrl/Regressors-in-Data-Science-Implemented-Examples-
af491137e1ee79ef94c38431020c6c8066ee691f
f108196970d6674d4cf8e182c423e92617203f97
refs/heads/main
2023-06-17T03:53:39.219946
2021-07-11T20:28:17
2021-07-11T20:28:17
385,043,431
0
0
null
null
null
null
UTF-8
Python
false
false
2,121
py
Polynomial Linear Regression.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Mar 15 00:11:21 2021 @author: shivamaditya """ # Importing Libraries import numpy as np import matplotlib.pyplot as plt import pandas as pd # Importing Dataset dataset = pd.read_csv('Position_Salaries.csv') X = dataset.iloc[:, 1].values # we used 1:2 i...
4c12d922a322df873421e214a2821c6ca99bbdf4
9a2a6476c75a4d51bea221a226b5fb5926512fa1
/run.py
f904767ab7d9edc771d2b818f8ccbe0d57332111
[]
no_license
Forest-13/China-Online-Music-Sales-Data-Crawler
a44aa65a8e63e515a80e85fea004af5e9150b57b
5c319057fd0a516e64bbe0b13b156fc1ac84896d
refs/heads/master
2023-05-09T20:52:12.699195
2021-06-03T11:23:56
2021-06-03T11:23:56
373,480,489
1
0
null
null
null
null
UTF-8
Python
false
false
2,805
py
run.py
import os import sys ''' 1. 下载首页的网页,确定总的表格页数 2. 下载每一页的表格,拿到专辑名字与id的对应关系 3. 有了id就可以下载每个专辑的每日数据,专辑名字+歌手名作为命名 ''' def get_page_num(path='homepage.txt'): with open(path, 'r') as f: contents = f.read() page_num = contents.count('?page=') return page_num def download_table_page(page_num, prefix='http:...
c211dafad035a7d48499d2c3fc426ce65b29b1b6
5470398ea762e484d75f8230343bef4465ddf968
/hesap.py
d38eb89b31e5afa71b9efbcdabb3bc7caf95cb2f
[ "Apache-2.0" ]
permissive
bydeath69/Shthesapmakinesi
e7e2bca58cf467cc4a019b2832377006bc12819b
87eee8fd708db3b67fb59ec31a26616a99794560
refs/heads/master
2022-12-13T10:13:50.776255
2020-08-22T18:54:47
2020-08-22T18:54:47
null
0
0
null
null
null
null
UTF-8
Python
false
false
850
py
hesap.py
#python 3.7.1 def add(x, y): return x + y # This function subtracts two numbers def subtract(x, y): return x - y # This function multiplies two numbers def multiply(x, y): return x * y # This function divides two numbers def divide(x, y): return x / y print("Select operation.") print("1.Ekle") print("2.Çı...
30dfec8ef39b032c36a7ee8da09ee1ce93fac6a5
a8a1169c117a51a6d75c5b2b16d9a7690ebe3905
/viz.py
c03f402d2ed8f5e4588ed981baffb417a671a3f6
[]
no_license
andreamad8/jacobiMethod
fde60cc5cba28c51f136901802abfb6dbcbcfb7a
f9899bd3a5b9431a57a86594a846f4552c468806
refs/heads/master
2021-01-13T05:30:07.711905
2017-02-22T12:46:34
2017-02-22T12:46:34
80,342,968
0
0
null
null
null
null
UTF-8
Python
false
false
5,854
py
viz.py
import json import os import numpy as np import scipy as sp import pandas as pd from pandas.tools.plotting import scatter_matrix import seaborn as sns import matplotlib.pyplot as plt from mpl_toolkits.axes_grid.inset_locator import inset_axes import ast #sns.palplot() sns.color_palette("Set1", n_colors=8, desat=.5) PR...
21259daf5845fe5cdf21142f215962a4c890e495
5765a89f16f498bcce1ed1a62a1652d8bac44b27
/aldryn_search/helpers.py
5f7c813131f992e48519d4a477561abccb15b87d
[ "BSD-3-Clause" ]
permissive
mcldev/aldryn-search
d5c6ecdd3660dc07a1426646b5632f975c31423d
6a3b4ee4521902d23ca462926a997c5a1464f43c
refs/heads/master
2022-12-07T22:45:51.144142
2017-11-02T08:44:23
2017-11-02T08:44:23
109,761,423
0
1
null
2017-11-06T23:18:24
2017-11-06T23:18:24
null
UTF-8
Python
false
false
3,239
py
helpers.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib.auth.models import AnonymousUser from django.template import RequestContext, Engine from django.test import RequestFactory from django.utils.text import smart_split try: from django.utils.encoding import force_unicode except Import...
85feb62b1551e77fa46b71bc4d507a50bc3ad092
0d788163528e9593d0ce95baafb7b3f1ce1979a9
/print_an_array_in_pendulum_arrangement.py
8f34f4186cb551fb54e5f7491c8bc15d89d0a6cc
[]
no_license
jaysiyaram/Geeks_for_geeks-Placement_track_solutions
32b821d8869b8474841f21a753e522c8fca0c27d
66bd6067a7a836d1d5ee154dcc5d56aa5d5a658a
refs/heads/master
2020-03-23T08:16:48.217720
2019-03-04T16:10:20
2019-03-04T16:10:20
141,318,008
0
0
null
null
null
null
UTF-8
Python
false
false
602
py
print_an_array_in_pendulum_arrangement.py
test_cases = int(input()) for _ in range(test_cases): arr_len = int(input()) arr = list(map(int, input().split())) temp = sorted(arr) # print(temp) if arr_len & 1: index = arr_len//2 else: index = (arr_len-1)//2 arr[index] = temp[0] for i in range(1, ar...
0feaea7dec3a946b4e87e2f5b94444b4b22b46af
9cb3f0f678bfd1b294a85136560d36c62466020e
/python/septembre_12/src/get_url_threads.py
0dc00f1595d8b1d5ee88a159a81216c8f1fd3d7c
[]
no_license
netantho/mes_presentations
550823b097037b65bf194b5cbe76fee0c674cbfe
d4b3046ae4257ace1867ebab2320c5adfbb24a05
refs/heads/master
2020-05-15T02:11:43.966800
2012-10-18T16:14:00
2012-10-18T16:14:00
2,975,972
0
0
null
null
null
null
UTF-8
Python
false
false
802
py
get_url_threads.py
import urllib, threading import time class FileGetter(threading.Thread): def __init__(self, url): self.url = url self.result = None threading.Thread.__init__(self) def get_result(self): return self.result def run(self): try: mytime = time.ctime() ...
83c5105a3294ad05116f9e3596a7c6f9555f99c2
c3d2d5f90deab913e2ebb091c4e48817c0df6344
/migrations/versions/887862cdc2a_.py
caba20871b99c5dbd1a6f22babe2be893b874a2b
[ "MIT" ]
permissive
elmehdiceo/Artistfunds
7aa6fc5e40c232bbdd6a307fdc36e2250c07c3c2
6ba38964984538e7389592117e2865e5d726f040
refs/heads/master
2021-05-31T22:32:49.949121
2016-02-04T05:10:29
2016-02-04T05:10:29
null
0
0
null
null
null
null
UTF-8
Python
false
false
2,249
py
887862cdc2a_.py
"""empty message Revision ID: 887862cdc2a Revises: None Create Date: 2015-10-29 11:29:06.138242 """ # revision identifiers, used by Alembic. revision = '887862cdc2a' down_revision = None from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic - please adjust! ### ...
f7a24c8cc4ae0dab259fa9b5e8c401689d17a7c4
d4b92dc0cbbd3da6271379baa26ce5ddff631ec7
/vortex/test/store/sql/test_indexes.py
edfacadc52ea64281c9191dffa6c755464a614f9
[ "BSD-3-Clause" ]
permissive
7scientists/vortex
7110c33f511abae9f6049c2ed1bb850e7f2d621c
0f3c6102bc065bdb4ddce3d6a77c2dab8489be06
refs/heads/master
2021-07-12T00:00:36.052722
2017-10-15T21:02:16
2017-10-15T21:02:16
104,393,793
4
0
null
null
null
null
UTF-8
Python
false
false
2,745
py
test_indexes.py
import os from sqlalchemy import create_engine from sqlalchemy.types import Integer,String,VARCHAR,Text,Boolean from vortex.sql import Store from . import StoreTest class IndexesTest(StoreTest): class Meta(Store.Meta): vertex_indexes = {'node_type' : {'type' : VARCHAR(64)},} edge_indexes = {'no...
9fab00dfea816dccf942f813633e3fba3d386b5e
a8bb27b1c6911a629b9b3e3c0d62cec8942fe93e
/tester.py
400a5562bea9c3b21fea80e180e81267216f25dc
[]
no_license
JesseAldridge/test_filesystem_load
25079edf2cb27aa7697a8b73f0cd3fb1f39135c8
2265f158ec14d3e492766e642560a7512e451566
refs/heads/master
2020-03-26T17:30:14.933493
2018-08-18T02:21:26
2018-08-18T02:21:26
145,165,061
0
0
null
null
null
null
UTF-8
Python
false
false
2,475
py
tester.py
import os, time, subprocess, random, json, threading, sys from multiprocessing.pool import ThreadPool import file_readers, file_listers, config, clear_ram_cache def load_test_data(dir_path, each_filename, read_files): start_time = time.time() old_wd = os.getcwd() os.chdir(dir_path) try: text_list = rea...
3b3805c4d1c6468afa78c1ba439ce031edc7a6af
41baf71ec617740fb305862a33900de5381fe7b8
/generate_anchors.py
eb708686ad6558f8ab5fb4e8ee9469b13648bab6
[]
no_license
xiaoshuliu/YOLOv3-tensorflow
94c59c0e635876749f4e7241cc8b4834df9f9d85
d2ebf6c13bddd3ec151841a2e094bf5c980beba9
refs/heads/master
2020-03-30T08:06:22.405384
2018-11-06T03:23:53
2018-11-06T03:23:53
150,989,853
0
0
null
2018-09-30T17:34:54
2018-09-30T17:34:54
null
UTF-8
Python
false
false
1,501
py
generate_anchors.py
import matplotlib.pyplot as plt import seaborn as sns sns.set() # for plot styling from sklearn.cluster import KMeans from sklearn.datasets.samples_generator import make_blobs from config import path, Input_shape import numpy as np from PIL import Image annotation_path_train = path + '/model/bdd_train.txt' def test_...
dfb67f443e0ffa71e0355a2021a0e626a7e0d156
5a52ccea88f90dd4f1acc2819997fce0dd5ffb7d
/alipay/aop/api/response/AlipayCommerceLogisticsOrderInstantdeliveryPrecreateResponse.py
66677c7bf6694af53e62e9716e0c126eee304b59
[ "Apache-2.0" ]
permissive
alipay/alipay-sdk-python-all
8bd20882852ffeb70a6e929038bf88ff1d1eff1c
1fad300587c9e7e099747305ba9077d4cd7afde9
refs/heads/master
2023-08-27T21:35:01.778771
2023-08-23T07:12:26
2023-08-23T07:12:26
133,338,689
247
70
Apache-2.0
2023-04-25T04:54:02
2018-05-14T09:40:54
Python
UTF-8
Python
false
false
1,139
py
AlipayCommerceLogisticsOrderInstantdeliveryPrecreateResponse.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.response.AlipayResponse import AlipayResponse from alipay.aop.api.domain.PreCreateWaybillIstd import PreCreateWaybillIstd class AlipayCommerceLogisticsOrderInstantdeliveryPrecreateResponse(AlipayResponse): def __init__(self): ...
62cd30c2060b1f0522b0e252189c33116625418c
ed62ef77667aefe3eecb6f4a6b42aedcca298a55
/knightbot/knightMoves.py
2c5bb88ab0975c12bb1ba0fe82580d388e001bba
[]
no_license
nhat-nguyen/scribblerbot
19d5c6d13643c05a004259f66a28705a480e7f0e
fe42e1a5ca648c954b30f781f5345990f0c7a414
refs/heads/master
2020-05-09T21:06:11.361292
2014-11-20T05:27:57
2014-11-20T05:27:57
24,999,548
1
0
null
2014-11-13T17:51:31
2014-10-09T17:03:29
Python
UTF-8
Python
false
false
1,135
py
knightMoves.py
from myro import * from bfs import bfs init("/dev/tty.IPRE6-197621-DevB") def rightNinety(): # turnRight(0.5, 1.15) # turnRight(0.3, 2.1) turnRight(0.25, 3.05) def leftNinety(): # turnLeft(0.3, 2.1) turnLeft(0.25, 3.05) def getLines(): return sum(get('line')) def moveForward(): # while (getLines() >= 1): ...
1aa0923db0889bddeb3bbd5226491eb848e83b44
d86add94a5848a1901c62235f969e8d17d9e1ad6
/app/controllers/api/restrictions.py
62bba76282e556c12bb42ae453cac366ef9ce20b
[ "MIT" ]
permissive
Excloudx6/SnitchDNS
3a948623892d1ffbd2118ac40df8acaad86e6578
8f76a76618a3609ec35c5be678b87e90254c8ed2
refs/heads/master
2023-07-26T04:48:38.837761
2021-09-15T08:52:39
2021-09-15T08:52:39
null
0
0
null
null
null
null
UTF-8
Python
false
false
2,050
py
restrictions.py
from . import bp from app.lib.base.decorators import api_auth from app.lib.api.restrictions import ApiRestrictions from flask_login import current_user @bp.route('/zones/<string:zone>/restrictions', methods=['GET']) @api_auth def zone_restrictions(zone): user_id = None if current_user.admin else current_user.id ...
6b30219e4106ab75948c1ec725acc73a7a51600e
d1f4c69f3c048a7dd22d7e04c18a373d73cb4acb
/src/wscript
ced12eaf1d569041d9d6ae9565ae1e8c2bcdfb54
[ "BSD-3-Clause" ]
permissive
mnkil/Quantitative_Economic_History
91fc5d025305dc22882779e72453fa909202763f
c64b5ad877eb995629d4b31f8a8500e7565a953a
refs/heads/master
2021-06-01T04:41:27.754327
2016-07-04T18:30:20
2016-07-04T18:30:20
null
0
0
null
null
null
null
UTF-8
Python
false
false
424
wscript
#! python def build(ctx): ctx.recurse('data_management') ctx.recurse('descriptive_statistics') # go to descr. stat and do data plot ctx.recurse('analysis') #Safety measure -- else the LaTeX scanner might fail because some '.tex'-source file has not been generated. ctx.add_group() # hint by gaudeck...
4f0673cbcc4f6cef9381dc165e584d25e9401091
cda38a5a865a7db2948f8c77e921f898621f6e4e
/OTP_decode.py
49f184b01f547f6e549412c545853b4349c58a1d
[]
no_license
SRingshandl/OneTimePad
ef869b18039be274e04ad937298368601605c1e2
7595dae711f42ec6de109d6dd7bc0b6d676e4bbb
refs/heads/main
2023-07-17T15:03:28.191344
2021-09-03T10:01:01
2021-09-03T10:01:01
402,719,292
0
0
null
null
null
null
UTF-8
Python
false
false
1,011
py
OTP_decode.py
#OTP decoder import sys import random if(len(sys.argv) == 3): print("files given, proceeding") else: sys.exit("missing or to many arguments --> aborting") filehandle = open(sys.argv[1], 'r') file1 = filehandle.readlines() filehandle.close() string1_list = list(''.join(file1).replace('\n', ' ...
945be923248a908a306ae822835d97bfe240afe5
4a30453ce7838c1ea2918e92fe60390e329134f1
/examples/example.py
dfd2cbe9d5d2638b5ae854b4afdc5c7bc4adad2b
[ "Apache-2.0" ]
permissive
xros/pytrends
f8b6f45b0230e1220ecf449ed0c5aa7634773c19
43347bfc84ea1be5ae56d6c4164e0c9135af8787
refs/heads/master
2021-01-24T04:35:48.080213
2016-05-25T20:47:21
2016-05-25T20:47:21
41,013,211
1
0
null
2016-05-25T20:47:21
2015-08-19T04:25:44
Python
UTF-8
Python
false
false
550
py
example.py
from pytrends.pyGTrends import pyGTrends import time from random import randint google_username = "an_email@gmail.com" google_password = "password" path = "" # connect to Google connector = pyGTrends(google_username, google_password) # make request connector.request_report("Pizza") # wait a random amount of time be...
763ad789592af44ea17c5b968975398a4f38564c
9e9dfbc4575b2dbb88a66063c71579b193ec7acf
/apps/web/__init__.py
a6e8f3671894b88a8b5eae4a7b60865c2a706885
[]
no_license
cuixiaozhao/FishBook
f28de5afc2aa20c12e0b693846c25dad108f0d28
12c2088f3dcacb46a9725df37e5a3abb0f782145
refs/heads/master
2022-12-14T07:57:45.119318
2018-09-28T03:16:43
2018-09-28T03:16:43
150,292,076
0
0
null
2022-12-08T02:57:46
2018-09-25T15:57:02
Python
UTF-8
Python
false
false
338
py
__init__.py
#!/usr/bin/python3 # -*- coding:utf-8 -*- # Project: FishBook # Software: PyCharm # Time : 2018-09-27 09:17 # File : __init__.py # Author : 天晴天朗 # Email : tqtl@tqtl.org from flask import Blueprint # 蓝图或者蓝本,blueprint; web = Blueprint('web', __name__) from apps.web import book from apps.web import user