hexsha
stringlengths
40
40
size
int64
5
2.06M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
248
max_stars_repo_name
stringlengths
5
125
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
3
248
max_issues_repo_name
stringlengths
5
125
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
3
248
max_forks_repo_name
stringlengths
5
125
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
5
2.06M
avg_line_length
float64
1
1.02M
max_line_length
int64
3
1.03M
alphanum_fraction
float64
0
1
count_classes
int64
0
1.6M
score_classes
float64
0
1
count_generators
int64
0
651k
score_generators
float64
0
1
count_decorators
int64
0
990k
score_decorators
float64
0
1
count_async_functions
int64
0
235k
score_async_functions
float64
0
1
count_documentation
int64
0
1.04M
score_documentation
float64
0
1
12f6a69fd0573ee6b9b0a6c81a158a82f44d6769
6,480
py
Python
playground/pets_dubins.py
pecey/mbrl-lib
ebca518b35a1370dbaede2a1c96fcde714bc5489
[ "MIT" ]
null
null
null
playground/pets_dubins.py
pecey/mbrl-lib
ebca518b35a1370dbaede2a1c96fcde714bc5489
[ "MIT" ]
null
null
null
playground/pets_dubins.py
pecey/mbrl-lib
ebca518b35a1370dbaede2a1c96fcde714bc5489
[ "MIT" ]
null
null
null
import matplotlib as mpl import matplotlib.pyplot as plt import numpy as np import torch import omegaconf import mbrl.env.continuous_dubins as dubins_env import mbrl.env.reward_fns as reward_fns import mbrl.env.termination_fns as termination_fns import mbrl.models as models import mbrl.planning as planning import mbrl...
34.105263
114
0.622531
0
0
0
0
0
0
0
0
1,828
0.282099
12f7704aea2bda946e46a42c6fdb1b32ab8e104a
39
py
Python
pixiv_spider/__init__.py
Uzukidd/Pixiv-spider
10d21bf8f1e0ec0b0792383ae9e8ae55e77efd17
[ "MIT" ]
1
2021-11-12T19:16:56.000Z
2021-11-12T19:16:56.000Z
pixiv_spider/__init__.py
Uzukidd/Pixiv-web-crawler
10d21bf8f1e0ec0b0792383ae9e8ae55e77efd17
[ "MIT" ]
null
null
null
pixiv_spider/__init__.py
Uzukidd/Pixiv-web-crawler
10d21bf8f1e0ec0b0792383ae9e8ae55e77efd17
[ "MIT" ]
null
null
null
# from pixiv_web_crawler import Getters
39
39
0.871795
0
0
0
0
0
0
0
0
39
1
12f80c5f985c410a5af8bdf06f87e46b6aa396c4
1,241
py
Python
parsers/parsers_base.py
xm4dn355x/async_test
92e7ec6a693ff4850ed603c0f4f0fa83e63b4e49
[ "MIT" ]
null
null
null
parsers/parsers_base.py
xm4dn355x/async_test
92e7ec6a693ff4850ed603c0f4f0fa83e63b4e49
[ "MIT" ]
null
null
null
parsers/parsers_base.py
xm4dn355x/async_test
92e7ec6a693ff4850ed603c0f4f0fa83e63b4e49
[ "MIT" ]
null
null
null
# # Общие функции для всех парсеров # # Автор: Никитенко Михаил # Лицензия: MIT License # from time import sleep import requests def get_htmls(urls): """ Получает список URL-адресов Возвращает список из всех полученных HTML документов :param urls: Список URL-адресов :type u...
27.577778
109
0.654311
0
0
0
0
0
0
0
0
1,350
0.793184
12f867945891bf95b1fd61c639ac565c8cecb9f9
16,303
py
Python
smbspider/smbspider.py
vonahi/pentesting_scripts
233b07a13e631cd121985465c083327f2fe372b6
[ "MIT" ]
13
2019-09-18T17:15:22.000Z
2022-02-20T00:28:35.000Z
smbspider/smbspider.py
vonahi/pentesting_scripts
233b07a13e631cd121985465c083327f2fe372b6
[ "MIT" ]
null
null
null
smbspider/smbspider.py
vonahi/pentesting_scripts
233b07a13e631cd121985465c083327f2fe372b6
[ "MIT" ]
4
2019-07-24T10:03:41.000Z
2021-11-22T06:19:54.000Z
#!/usr/bin/python # # This post-exploitation script can be used to spider numerous systems # to identify sensitive and/or confidential data. A good scenario to # use this script is when you have admin credentials to tons of # Windows systems, and you want to look for files containing data such # as PII, network pas...
38.541371
157
0.626326
10,829
0.664234
0
0
0
0
0
0
5,905
0.362203
12fad400aa5ee6c8bf4a6f0d061c8bf3df14fbb1
1,675
py
Python
api-inference-community/docker_images/spacy/app/pipelines/text_classification.py
mlonaws/huggingface_hub
588f74b98fbcab2cd7e61a74cc6d9649a92e0ef2
[ "Apache-2.0" ]
362
2020-12-22T10:24:06.000Z
2022-03-30T22:47:25.000Z
api-inference-community/docker_images/spacy/app/pipelines/text_classification.py
mlonaws/huggingface_hub
588f74b98fbcab2cd7e61a74cc6d9649a92e0ef2
[ "Apache-2.0" ]
547
2020-12-24T13:35:57.000Z
2022-03-31T17:32:42.000Z
api-inference-community/docker_images/spacy/app/pipelines/text_classification.py
mlonaws/huggingface_hub
588f74b98fbcab2cd7e61a74cc6d9649a92e0ef2
[ "Apache-2.0" ]
98
2021-01-06T17:37:09.000Z
2022-03-29T07:20:08.000Z
import os import subprocess import sys from typing import Dict, List from app.pipelines import Pipeline class TextClassificationPipeline(Pipeline): def __init__( self, model_id: str, ): # At the time, only public models from spaCy are allowed in the inference API. full_model_p...
34.895833
128
0.601791
1,567
0.935522
0
0
0
0
0
0
788
0.470448
12fb3b1f1de02a4bb72cea078775fd6a9b6cb1ac
4,867
py
Python
aws/logs_monitoring/tests/test_cloudtrail_s3.py
rkitron/datadog-serverless-functions
d69fe6fdb489c262ffa76a529b22f2a81ae6deba
[ "Apache-2.0" ]
232
2018-11-20T16:57:04.000Z
2022-03-23T14:38:11.000Z
aws/logs_monitoring/tests/test_cloudtrail_s3.py
rkitron/datadog-serverless-functions
d69fe6fdb489c262ffa76a529b22f2a81ae6deba
[ "Apache-2.0" ]
207
2018-10-25T11:48:20.000Z
2022-03-23T00:21:10.000Z
aws/logs_monitoring/tests/test_cloudtrail_s3.py
rkitron/datadog-serverless-functions
d69fe6fdb489c262ffa76a529b22f2a81ae6deba
[ "Apache-2.0" ]
308
2018-10-24T13:36:05.000Z
2022-03-21T21:17:02.000Z
from unittest.mock import MagicMock, patch import os import sys import unittest import json import copy import io import gzip sys.modules["trace_forwarder.connection"] = MagicMock() sys.modules["datadog_lambda.wrapper"] = MagicMock() sys.modules["datadog_lambda.metric"] = MagicMock() sys.modules["datadog"] = MagicMock...
32.231788
115
0.543661
1,861
0.382371
0
0
1,602
0.329156
0
0
1,958
0.402301
12fc144c5d332d1edd841f8f777a22d5c30bf0b9
487
py
Python
ch_06/tests/test_lookup_mapping.py
real-slim-chadi/Python-Object-Oriented-Programming---4th-edition
7c486866171786b620795fa33a79ec9ac9a8ba1b
[ "MIT" ]
43
2021-06-03T18:39:09.000Z
2022-03-29T20:32:13.000Z
ch_06/tests/test_lookup_mapping.py
real-slim-chadi/Python-Object-Oriented-Programming---4th-edition
7c486866171786b620795fa33a79ec9ac9a8ba1b
[ "MIT" ]
16
2022-02-08T22:41:30.000Z
2022-03-25T22:48:28.000Z
ch_06/tests/test_lookup_mapping.py
real-slim-chadi/Python-Object-Oriented-Programming---4th-edition
7c486866171786b620795fa33a79ec9ac9a8ba1b
[ "MIT" ]
36
2021-06-19T07:14:09.000Z
2022-03-12T22:17:09.000Z
""" Python 3 Object-Oriented Programming Chapter 6, Abstract Base Classes and Operator Overloading """ from lookup_mapping import Lookup def test_lookup_mapping(): x = Lookup( [ ["z", "Zillah"], ["a", "Amy"], ["c", "Clara"], ["b", "Basil"], ] ) ...
20.291667
57
0.486653
0
0
0
0
0
0
0
0
179
0.367556
12fd58577de1528a698dc2d572273da89af94b00
217
py
Python
serempre_todo/utils/choices.py
pygabo/Serempre
6b29e337abd8d1b3f71ee889d318a2d473d6c744
[ "MIT" ]
null
null
null
serempre_todo/utils/choices.py
pygabo/Serempre
6b29e337abd8d1b3f71ee889d318a2d473d6c744
[ "MIT" ]
null
null
null
serempre_todo/utils/choices.py
pygabo/Serempre
6b29e337abd8d1b3f71ee889d318a2d473d6c744
[ "MIT" ]
null
null
null
TASK_STATUS = [ ('TD', 'To Do'), ('IP', 'In Progress'), ('QA', 'Testing'), ('DO', 'Done'), ] TASK_PRIORITY = [ ('ME', 'Medium'), ('HI', 'Highest'), ('HG', 'High'), ('LO', 'Lowest'), ]
15.5
26
0.40553
0
0
0
0
0
0
0
0
98
0.451613
12fda5a81fde9ab3c46b39a497e89d5ab29b6639
17,673
py
Python
symbols/block.py
zerofo/sdu-face-alignment
f4b57fde0576d2327369884fd5d5e9a7765a0790
[ "MIT" ]
192
2019-03-27T02:40:41.000Z
2022-03-18T15:35:17.000Z
symbols/block.py
zerofo/sdu-face-alignment
f4b57fde0576d2327369884fd5d5e9a7765a0790
[ "MIT" ]
4
2019-04-01T14:51:22.000Z
2020-11-25T08:22:04.000Z
symbols/block.py
zerofo/sdu-face-alignment
f4b57fde0576d2327369884fd5d5e9a7765a0790
[ "MIT" ]
38
2019-03-30T05:33:48.000Z
2021-10-01T06:08:17.000Z
from __future__ import absolute_import from __future__ import division from __future__ import print_function import mxnet as mx import numpy as np from config import config def Conv(**kwargs): body = mx.sym.Convolution(**kwargs) return body def Act(data, act_type, name): if act_type=='prelu': body...
54.378462
148
0.62106
1,911
0.108131
0
0
0
0
0
0
3,220
0.182199
12fde371c750b67c435196b6031afbfb913cf73d
9,198
py
Python
train/metric.py
alexandrosstergiou/Squeeze-and-Recursion-Temporal-Gates
1641b59b73c951a5b05d17b5528894ae73a014b8
[ "MIT" ]
54
2020-06-16T08:11:21.000Z
2022-03-18T14:54:52.000Z
train/metric.py
alexandrosstergiou/Squeeze-and-Recursion-Temporal-Gates
1641b59b73c951a5b05d17b5528894ae73a014b8
[ "MIT" ]
10
2020-06-23T07:57:45.000Z
2021-12-16T04:18:03.000Z
train/metric.py
alexandrosstergiou/Squeeze-and-Recursion-Temporal-Gates
1641b59b73c951a5b05d17b5528894ae73a014b8
[ "MIT" ]
7
2020-09-12T12:46:54.000Z
2021-11-15T09:00:55.000Z
''' --- I M P O R T S T A T E M E N T S --- ''' import coloredlogs, logging coloredlogs.install() import numpy as np ''' === S T A R T O F C L A S S E V A L M E T R I C === [About] Object class for calculating average values. [Init Args] - name: String for the variable name to calc...
30.356436
103
0.593064
4,506
0.489889
0
0
0
0
0
0
4,130
0.449011
12fe867458db015f3b4f5fd16c3634fc1b9c4dae
3,018
py
Python
poly/repl.py
jdanford/poly
4f3a242dbb54fb68375a310af943be759588f459
[ "0BSD" ]
null
null
null
poly/repl.py
jdanford/poly
4f3a242dbb54fb68375a310af943be759588f459
[ "0BSD" ]
null
null
null
poly/repl.py
jdanford/poly
4f3a242dbb54fb68375a310af943be759588f459
[ "0BSD" ]
null
null
null
import sys from string import whitespace from clint.textui import puts, indent, colored from poly.common import * from poly.node import * def repl_main(args): repl = Repl("repl") repl.run() class UndefinedCommandError(PolyError): def __init__(self, command): self.message = "Undefined command '{}...
23.578125
63
0.503313
2,609
0.86448
0
0
0
0
0
0
141
0.04672
12fea94d07f9c12bbbce2e89b9de91f96defafac
1,330
py
Python
resources/mgltools_x86_64Linux2_1.5.6/lib/python2.5/site-packages/Pmw/Pmw_1_3/demos/SelectionDialog.py
J-E-J-S/aaRS-Pipeline
43f59f28ab06e4b16328c3bc405cdddc6e69ac44
[ "MIT" ]
3
2017-09-26T03:09:14.000Z
2022-03-20T11:12:34.000Z
resources/mgltools_x86_64Linux2_1.5.6/lib/python2.5/site-packages/Pmw/Pmw_1_3/demos/SelectionDialog.py
J-E-J-S/aaRS-Pipeline
43f59f28ab06e4b16328c3bc405cdddc6e69ac44
[ "MIT" ]
null
null
null
resources/mgltools_x86_64Linux2_1.5.6/lib/python2.5/site-packages/Pmw/Pmw_1_3/demos/SelectionDialog.py
J-E-J-S/aaRS-Pipeline
43f59f28ab06e4b16328c3bc405cdddc6e69ac44
[ "MIT" ]
2
2019-10-05T23:02:41.000Z
2020-06-25T20:21:02.000Z
title = 'Pmw.SelectionDialog demonstration' # Import Pmw from this directory tree. import sys sys.path[:0] = ['../../..'] import Tkinter import Pmw class Demo: def __init__(self, parent): # Create the dialog. self.dialog = Pmw.SelectionDialog(parent, title = 'My SelectionDialog', buttons = ('OK', 'Ca...
27.708333
76
0.619549
806
0.606015
0
0
0
0
0
0
446
0.335338
12ff9748e2c126e4060dc274380a9e865c327195
778
py
Python
py3plex/algorithms/infomap/examples/python/example-simple.py
awesome-archive/Py3plex
a099acb992441c1630208ba13694acb8e2a38895
[ "BSD-3-Clause" ]
1
2020-02-20T07:37:02.000Z
2020-02-20T07:37:02.000Z
py3plex/algorithms/infomap/examples/python/example-simple.py
awesome-archive/Py3plex
a099acb992441c1630208ba13694acb8e2a38895
[ "BSD-3-Clause" ]
null
null
null
py3plex/algorithms/infomap/examples/python/example-simple.py
awesome-archive/Py3plex
a099acb992441c1630208ba13694acb8e2a38895
[ "BSD-3-Clause" ]
null
null
null
from infomap import infomap infomapWrapper = infomap.Infomap("--two-level") # Add weight as an optional third argument infomapWrapper.addLink(0, 1) infomapWrapper.addLink(0, 2) infomapWrapper.addLink(0, 3) infomapWrapper.addLink(1, 0) infomapWrapper.addLink(1, 2) infomapWrapper.addLink(2, 1) infomapWrapper.addLink(2,...
25.096774
89
0.75964
0
0
0
0
0
0
0
0
116
0.1491
12ffa5ef886269b64400e6ff0dbf8d65f1d35e0b
305
py
Python
api/tests.py
everett-toews/metaslacker
ec4bf3c4b39aa16b5ae46a0c3e732b8b9cb2cf72
[ "MIT" ]
90
2015-09-17T00:38:59.000Z
2021-05-29T02:36:42.000Z
api/tests.py
everett-toews/metaslacker
ec4bf3c4b39aa16b5ae46a0c3e732b8b9cb2cf72
[ "MIT" ]
null
null
null
api/tests.py
everett-toews/metaslacker
ec4bf3c4b39aa16b5ae46a0c3e732b8b9cb2cf72
[ "MIT" ]
10
2016-02-23T16:28:32.000Z
2021-06-01T20:24:31.000Z
import unittest class MainTestCase(unittest.TestCase): def test_two_and_two(self): four = 2 + 2 self.assertEqual(four, 4) self.assertNotEqual(four, 5) self.assertNotEqual(four, 6) self.assertNotEqual(four, 22) if __name__ == '__main__': unittest.main()
20.333333
38
0.642623
238
0.780328
0
0
0
0
0
0
10
0.032787
12ffe639dabbddd0482e5d8aa0dc1908fa825881
18,741
py
Python
tools/modules/verify.py
andscha/containerization-for-sap-s4hana
337df7b3b515dad9c243eae6b58ee95bf749782a
[ "Apache-2.0" ]
6
2020-12-16T13:12:42.000Z
2022-02-09T17:38:47.000Z
tools/modules/verify.py
andscha/containerization-for-sap-s4hana
337df7b3b515dad9c243eae6b58ee95bf749782a
[ "Apache-2.0" ]
5
2021-04-07T07:19:02.000Z
2022-03-31T08:40:01.000Z
tools/modules/verify.py
andscha/containerization-for-sap-s4hana
337df7b3b515dad9c243eae6b58ee95bf749782a
[ "Apache-2.0" ]
7
2021-05-21T04:36:44.000Z
2022-03-31T07:36:48.000Z
# ------------------------------------------------------------------------ # Copyright 2020, 2021 IBM Corp. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http:/...
38.561728
100
0.566138
17,182
0.916618
0
0
0
0
0
0
6,585
0.351294
4200fb28b1b5da3ed4576b7e698fb2853d8ef02a
1,060
py
Python
rainbow/rainbow.py
jaxzin/adafruit-voice-docker
8932e2432f56e795c4160dfeef8f61aa5a3da15a
[ "MIT" ]
null
null
null
rainbow/rainbow.py
jaxzin/adafruit-voice-docker
8932e2432f56e795c4160dfeef8f61aa5a3da15a
[ "MIT" ]
null
null
null
rainbow/rainbow.py
jaxzin/adafruit-voice-docker
8932e2432f56e795c4160dfeef8f61aa5a3da15a
[ "MIT" ]
null
null
null
import time import board import adafruit_dotstar import atexit import signal kill_now = False DOTSTAR_DATA = board.D5 DOTSTAR_CLOCK = board.D6 dots = adafruit_dotstar.DotStar(DOTSTAR_CLOCK, DOTSTAR_DATA, 3, brightness=0.5) def exit_handler(): kill_now = True # turn off the pixel dots for i in range(3): ...
24.090909
79
0.6
0
0
0
0
0
0
0
0
124
0.116981
4201d4e01f67d6a8af781c7b4dac4cc684c59e89
117
py
Python
src/iranlowo/corpus/__init__.py
Niger-Volta-LTI/iranlowo
0046b61105ffadfff21dd8b37754b9d95177fbf8
[ "MIT" ]
17
2019-07-05T20:30:35.000Z
2022-02-28T10:00:24.000Z
src/iranlowo/corpus/__init__.py
Olamyy/iranlowo
1feb123988a8afac3ac53c7acfb72df862c4bc18
[ "MIT" ]
17
2019-07-06T09:10:10.000Z
2020-11-13T08:30:37.000Z
src/iranlowo/corpus/__init__.py
ruohoruotsi/iranlowo
0046b61105ffadfff21dd8b37754b9d95177fbf8
[ "MIT" ]
7
2019-07-01T01:59:07.000Z
2020-11-27T17:12:46.000Z
from .corpus import Corpus, DirectoryCorpus from .loaders import OweLoader, YorubaBlogCorpus, BBCCorpus, BibeliCorpus
58.5
73
0.854701
0
0
0
0
0
0
0
0
0
0
4203e2556562a439641ccfc38f8f880faffaf2ad
6,054
py
Python
seq2seq.py
frozen86/SeqLite
7f83e6a4716d756a45b2801085ac6628379fbea2
[ "Apache-2.0" ]
1
2018-05-10T01:40:55.000Z
2018-05-10T01:40:55.000Z
seq2seq.py
frozen86/SeqLite
7f83e6a4716d756a45b2801085ac6628379fbea2
[ "Apache-2.0" ]
null
null
null
seq2seq.py
frozen86/SeqLite
7f83e6a4716d756a45b2801085ac6628379fbea2
[ "Apache-2.0" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F import math import matplotlib.pyplot as plt import matplotlib.ticker as ticker import numpy as np from masked_cross_entropy import * from preprocess import * from parameter import * import time # # Training def train(input_batches,...
34.20339
163
0.675421
0
0
0
0
0
0
0
0
1,427
0.235712
4204040a123c3ac5e25851793e3ded084eda1953
41
py
Python
ANNarchy_future/__init__.py
vitay/ANNarchy_future
2c2a43c67f4201cf72175793aaa51189d208436b
[ "MIT" ]
2
2021-03-11T18:11:30.000Z
2021-05-12T09:15:17.000Z
ANNarchy_future/__init__.py
vitay/ANNarchy_future
2c2a43c67f4201cf72175793aaa51189d208436b
[ "MIT" ]
null
null
null
ANNarchy_future/__init__.py
vitay/ANNarchy_future
2c2a43c67f4201cf72175793aaa51189d208436b
[ "MIT" ]
null
null
null
from .api import * __version__ = "5.0.0"
13.666667
21
0.658537
0
0
0
0
0
0
0
0
7
0.170732
4204eade92e97699c25ced0425caa0cabd5da0e0
1,881
py
Python
pycqed/tests/analysis_v2/test_simple_analysis.py
nuttamas/PycQED_py3
1ee35c7428d36ed42ba4afb5d4bda98140b2283e
[ "MIT" ]
60
2016-08-03T10:00:18.000Z
2021-11-10T11:46:16.000Z
pycqed/tests/analysis_v2/test_simple_analysis.py
nuttamas/PycQED_py3
1ee35c7428d36ed42ba4afb5d4bda98140b2283e
[ "MIT" ]
512
2016-08-03T17:10:02.000Z
2022-03-31T14:03:43.000Z
pycqed/tests/analysis_v2/test_simple_analysis.py
nuttamas/PycQED_py3
1ee35c7428d36ed42ba4afb5d4bda98140b2283e
[ "MIT" ]
34
2016-10-19T12:00:52.000Z
2022-03-19T04:43:26.000Z
import unittest import pycqed as pq import os import matplotlib.pyplot as plt from pycqed.analysis_v2 import measurement_analysis as ma class Test_SimpleAnalysis(unittest.TestCase): @classmethod def tearDownClass(self): plt.close('all') @classmethod def setUpClass(self): self.datadir...
36.882353
73
0.637959
1,742
0.926103
0
0
376
0.199894
0
0
491
0.261031
42064154fe3a3a9a5966ee89da5b64cd37de9197
781
py
Python
CS2/1275_turtle_recursion/2499_koch_snowflake/alternate_snowflake.py
nealholt/python_programming_curricula
eda4432dab97178b4a5712b160f5b1da74c068cb
[ "MIT" ]
7
2020-10-14T03:23:12.000Z
2022-03-09T23:16:13.000Z
CS2/1275_turtle_recursion/2499_koch_snowflake/alternate_snowflake.py
nealholt/python_programming_curricula
eda4432dab97178b4a5712b160f5b1da74c068cb
[ "MIT" ]
null
null
null
CS2/1275_turtle_recursion/2499_koch_snowflake/alternate_snowflake.py
nealholt/python_programming_curricula
eda4432dab97178b4a5712b160f5b1da74c068cb
[ "MIT" ]
11
2021-02-21T20:50:56.000Z
2022-01-29T07:01:28.000Z
import turtle '''http://www.algorithm.co.il/blogs/computer-science/fractals-in-10-minutes-no-6-turtle-snowflake/ This would be a good introduction to recursion. I don't see how students would invent this on their own, but they could modify it and see what other fractals they could generate. ''' pen = turtle.Turtle() p...
25.193548
98
0.663252
0
0
0
0
0
0
0
0
323
0.413572
4206719b66d7095a812ba8babe145ead4c49882e
1,325
py
Python
test/test_edge.py
jbschwartz/spatial
04dc619ae024ebb4f516cd6483f835421c7d84b1
[ "MIT" ]
1
2022-01-02T22:03:09.000Z
2022-01-02T22:03:09.000Z
test/test_edge.py
jbschwartz/spatial
04dc619ae024ebb4f516cd6483f835421c7d84b1
[ "MIT" ]
null
null
null
test/test_edge.py
jbschwartz/spatial
04dc619ae024ebb4f516cd6483f835421c7d84b1
[ "MIT" ]
null
null
null
import unittest from spatial import Edge, Vector3 class TestEdge(unittest.TestCase): def setUp(self) -> None: self.start = Vector3(1, 2, 3) self.end = Vector3(-1, -2, -3) self.middle = Vector3(0, 0, 0) self.edge = Edge(self.start, self.end) def test__init__accepts_endpoints(s...
36.805556
81
0.695849
1,271
0.959245
0
0
0
0
0
0
8
0.006038
4206df5fe7ed10541de178c4f224f75754304f2c
324
py
Python
wdae/wdae/user_queries/urls.py
iossifovlab/gpf
e556243d29666179dbcb72859845b4d6c011af2b
[ "MIT" ]
null
null
null
wdae/wdae/user_queries/urls.py
iossifovlab/gpf
e556243d29666179dbcb72859845b4d6c011af2b
[ "MIT" ]
82
2019-07-22T11:44:23.000Z
2022-01-13T15:27:33.000Z
wdae/wdae/user_queries/urls.py
iossifovlab/gpf
e556243d29666179dbcb72859845b4d6c011af2b
[ "MIT" ]
null
null
null
from django.urls import re_path from user_queries.views import UserQuerySaveView, UserQueryCollectView urlpatterns = [ re_path(r"^/save/?$", UserQuerySaveView.as_view(), name="user-save-query"), re_path( r"^/collect/?$", UserQueryCollectView.as_view(), name="user-collect-queries", )...
27
79
0.675926
0
0
0
0
0
0
0
0
66
0.203704
4207202cb690f62fcf73ad7c61a82a12bebf477d
419
py
Python
src/login/migrations/0017_auto_20191006_1716.py
vandana0608/Pharmacy-Managament
f99bdec11c24027a432858daa19247a21cecc092
[ "bzip2-1.0.6" ]
null
null
null
src/login/migrations/0017_auto_20191006_1716.py
vandana0608/Pharmacy-Managament
f99bdec11c24027a432858daa19247a21cecc092
[ "bzip2-1.0.6" ]
null
null
null
src/login/migrations/0017_auto_20191006_1716.py
vandana0608/Pharmacy-Managament
f99bdec11c24027a432858daa19247a21cecc092
[ "bzip2-1.0.6" ]
null
null
null
# Generated by Django 2.0.7 on 2019-10-06 11:46 import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('login', '0016_auto_20191006_1715'), ] operations = [ migrations.AlterField( model_name='login', name...
20.95
70
0.620525
310
0.739857
0
0
0
0
0
0
94
0.224344
4208848cd73eaf4015f90f42e112e861d94326ec
1,846
py
Python
InfoGain.py
gsndr/AIDA
538caf3ddb5aec8ec8904dc313eb7e31759f5154
[ "MIT" ]
4
2021-05-10T11:35:51.000Z
2021-12-29T00:56:35.000Z
InfoGain.py
gsndr/AIDA
538caf3ddb5aec8ec8904dc313eb7e31759f5154
[ "MIT" ]
null
null
null
InfoGain.py
gsndr/AIDA
538caf3ddb5aec8ec8904dc313eb7e31759f5154
[ "MIT" ]
1
2021-12-25T13:55:29.000Z
2021-12-25T13:55:29.000Z
import pandas as pd from math import log class InfoGain(): def __init__(self, path): self._path=path def extractVariables(self): self._df = pd.read_csv(self._path + ".csv"); # put the original column names in a python list '''if 'Unnamed: 0' in self._df.columns: ...
29.301587
98
0.531419
1,809
0.976255
0
0
0
0
0
0
1,006
0.542903
4208c41522c79409c03ff3e274e65ad419a2c482
4,473
py
Python
bot/localization.py
Supportiii/telegram-report-bot
6a050caafb1c205c0fd58f91be9264f1190ea706
[ "MIT" ]
null
null
null
bot/localization.py
Supportiii/telegram-report-bot
6a050caafb1c205c0fd58f91be9264f1190ea706
[ "MIT" ]
null
null
null
bot/localization.py
Supportiii/telegram-report-bot
6a050caafb1c205c0fd58f91be9264f1190ea706
[ "MIT" ]
null
null
null
strings = { "en": { "error_no_reply": "This command must be sent as a reply to one's message!", "error_report_admin": "Whoa! Don't report admins 😈", "error_restrict_admin": "You cannot restrict an admin.", "report_date_format": "%d.%m.%Y at %H:%M", "report_message": '👆 Sen...
47.585106
116
0.591549
0
0
0
0
0
0
0
0
3,915
0.766595
4209d56bec0f4b46b06778591fc9cb1f2f7511a5
3,140
py
Python
swagger_server/models/linecode_r_matrix.py
garagonc/simulation-engine
c129f0bf601e0d56d924c9e5fa2cf94f7e31a356
[ "Apache-2.0" ]
3
2019-06-24T09:02:21.000Z
2020-01-30T10:37:46.000Z
swagger_server/models/linecode_r_matrix.py
linksmart/simulation-engine
c129f0bf601e0d56d924c9e5fa2cf94f7e31a356
[ "Apache-2.0" ]
null
null
null
swagger_server/models/linecode_r_matrix.py
linksmart/simulation-engine
c129f0bf601e0d56d924c9e5fa2cf94f7e31a356
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 from __future__ import absolute_import from datetime import date, datetime # noqa: F401 from typing import List, Dict # noqa: F401 from swagger_server.models.base_model_ import Model from swagger_server.models.impedance import Impedance # noqa: F401,E501 from swagger_server import util class Lin...
26.610169
112
0.62293
2,828
0.900637
0
0
1,742
0.554777
0
0
1,743
0.555096
420b2687d1f426ed1eefef8109dac3c6ae18bab7
261
py
Python
workshop/serializers.py
shivammaniharsahu/django_api
6ffb3d9f70f30f5fd3ae06ec00a6dd7c7783a797
[ "bzip2-1.0.6" ]
null
null
null
workshop/serializers.py
shivammaniharsahu/django_api
6ffb3d9f70f30f5fd3ae06ec00a6dd7c7783a797
[ "bzip2-1.0.6" ]
null
null
null
workshop/serializers.py
shivammaniharsahu/django_api
6ffb3d9f70f30f5fd3ae06ec00a6dd7c7783a797
[ "bzip2-1.0.6" ]
null
null
null
from rest_framework import serializers from .models import Register class RegisterSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = Register fields = ('id', 'name', 'email', 'contact', 'password', 'confirm_password')
29
83
0.724138
190
0.727969
0
0
0
0
0
0
54
0.206897
420ceb4ff961d4330b357c01567c2e654e43d336
5,303
py
Python
experiments/twitter_event_data_2019/evaluation/groundtruth_processor.py
HHansi/WhatsUp
87c3eb90570d2f997d8f1abc300a3553f8ef7ca9
[ "Apache-2.0" ]
null
null
null
experiments/twitter_event_data_2019/evaluation/groundtruth_processor.py
HHansi/WhatsUp
87c3eb90570d2f997d8f1abc300a3553f8ef7ca9
[ "Apache-2.0" ]
null
null
null
experiments/twitter_event_data_2019/evaluation/groundtruth_processor.py
HHansi/WhatsUp
87c3eb90570d2f997d8f1abc300a3553f8ef7ca9
[ "Apache-2.0" ]
null
null
null
# Created by Hansi at 3/16/2020 import os from algo.data_process.data_preprocessor import data_cleaning_flow from algo.utils.file_utils import delete_create_folder def extract_gt_tokens(text): """ Given GT string, method to extract GT labels. GT string should be formatted as Twitter-Event-Data-2019. ...
30.302857
120
0.603998
0
0
0
0
0
0
0
0
2,049
0.386385
420d148bc469105cd3d8585bbbb8f38f1d6ec875
2,058
py
Python
metaflow/plugins/env_escape/configurations/test_lib_impl/test_lib.py
RobBlumberg/metaflow
9f737e6026eee250c1593a2cb1d1c4b19a00adf4
[ "Apache-2.0" ]
5,821
2019-12-03T17:57:52.000Z
2022-03-31T22:55:12.000Z
metaflow/plugins/env_escape/configurations/test_lib_impl/test_lib.py
RobBlumberg/metaflow
9f737e6026eee250c1593a2cb1d1c4b19a00adf4
[ "Apache-2.0" ]
605
2019-12-03T23:09:32.000Z
2022-03-31T16:15:05.000Z
metaflow/plugins/env_escape/configurations/test_lib_impl/test_lib.py
RobBlumberg/metaflow
9f737e6026eee250c1593a2cb1d1c4b19a00adf4
[ "Apache-2.0" ]
539
2019-12-03T18:25:53.000Z
2022-03-29T18:22:33.000Z
import functools class MyBaseException(Exception): pass class SomeException(MyBaseException): pass class TestClass1(object): cls_object = 25 def __init__(self, value): self._value = value self._value2 = 123 def unsupported_method(self): pass def print_value(self...
20.376238
65
0.623907
1,949
0.947036
0
0
419
0.203596
0
0
183
0.088921
420d3d5356dc0a6fa2f8ece54ea58e9f77d14058
38,124
py
Python
venv/Lib/site-packages/aniso8601/tests/test_interval.py
GabrielSilva2y3d/api_atividade-sqlalchemy
4a06e37fcb733d4185daf1de6bce415b4de28444
[ "MIT" ]
null
null
null
venv/Lib/site-packages/aniso8601/tests/test_interval.py
GabrielSilva2y3d/api_atividade-sqlalchemy
4a06e37fcb733d4185daf1de6bce415b4de28444
[ "MIT" ]
null
null
null
venv/Lib/site-packages/aniso8601/tests/test_interval.py
GabrielSilva2y3d/api_atividade-sqlalchemy
4a06e37fcb733d4185daf1de6bce415b4de28444
[ "MIT" ]
1
2022-01-13T10:05:55.000Z
2022-01-13T10:05:55.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2019, Brandon Nielsen # All rights reserved. # # This software may be modified and distributed under the terms # of the BSD license. See the LICENSE file for details. import unittest import aniso8601 from aniso8601.exceptions import ISOFormatError from aniso8601.interval impo...
50.629482
115
0.387027
37,665
0.98796
0
0
0
0
0
0
8,591
0.225344
420d64c40f09249f80d51908d10b8e6dab472942
3,008
py
Python
cool/core/utils.py
007gzs/django-cool
3b4ed1a8ca020e6f798ca47e20169e5a854b4f24
[ "BSD-3-Clause" ]
11
2020-05-19T09:52:35.000Z
2022-02-25T10:39:56.000Z
cool/core/utils.py
007gzs/django-cool
3b4ed1a8ca020e6f798ca47e20169e5a854b4f24
[ "BSD-3-Clause" ]
null
null
null
cool/core/utils.py
007gzs/django-cool
3b4ed1a8ca020e6f798ca47e20169e5a854b4f24
[ "BSD-3-Clause" ]
1
2020-12-24T08:14:58.000Z
2020-12-24T08:14:58.000Z
# encoding: utf-8 import operator from functools import reduce from django.core.exceptions import FieldDoesNotExist from django.db.models import Q from django.db.models.constants import LOOKUP_SEP def split_camel_name(name, fall=False): """ 驼峰命名分割为单词 GenerateURLs => [Generate, URLs] generateURLsLite...
31.663158
110
0.648936
0
0
0
0
0
0
0
0
607
0.199671
420dab6ca09e09f7cbafe716ac539156b5dcaa62
773
py
Python
setup.py
atait/klayout-gadgets
a8d9655e547fc4531982bbe55e632009bad39096
[ "MIT" ]
13
2018-12-02T23:32:29.000Z
2022-02-11T19:28:49.000Z
setup.py
atait/klayout-gadgets
a8d9655e547fc4531982bbe55e632009bad39096
[ "MIT" ]
3
2019-01-15T23:59:59.000Z
2020-12-04T16:30:48.000Z
setup.py
atait/klayout-gadgets
a8d9655e547fc4531982bbe55e632009bad39096
[ "MIT" ]
1
2020-12-01T22:56:03.000Z
2020-12-01T22:56:03.000Z
from setuptools import setup def readme(): with open('README.md', 'r') as fx: return fx.read() setup(name='lygadgets', version='0.1.31', description='Tools to make klayout, the standalone, and python environments work better together', long_description=readme(), long_description_co...
29.730769
104
0.654592
0
0
0
0
0
0
0
0
336
0.43467
420db9bdde8897b05f3ac2a8bb469ed44754dbb4
1,748
py
Python
Python/Zelle/Chapter10_DefiningClasses/ProgrammingExercises/16_CannonballTarget/inputDialog.py
jeffvswanson/CodingPractice
9ea8e0dd504230cea0e8684b31ef22c3ed90d2fb
[ "MIT" ]
null
null
null
Python/Zelle/Chapter10_DefiningClasses/ProgrammingExercises/16_CannonballTarget/inputDialog.py
jeffvswanson/CodingPractice
9ea8e0dd504230cea0e8684b31ef22c3ed90d2fb
[ "MIT" ]
null
null
null
Python/Zelle/Chapter10_DefiningClasses/ProgrammingExercises/16_CannonballTarget/inputDialog.py
jeffvswanson/CodingPractice
9ea8e0dd504230cea0e8684b31ef22c3ed90d2fb
[ "MIT" ]
null
null
null
# inputDialog.py """ Provides a window to get input values from the user to animate a cannonball.""" from graphics import GraphWin, Entry, Text, Point from button import Button class InputDialog: """ A custom window for getting simulation values (angle, velocity, and height) from the user.""" def __ini...
30.137931
71
0.568078
1,568
0.897025
0
0
0
0
0
0
490
0.28032
420e4e16ca0ab83a3724fd3b5d5775cec3e14b0e
979
py
Python
gym_envs/envs/reacher_done.py
gautams3/reacher-done
6420f4ea3e0f6e47a3ebe25dbe170a9030b03b01
[ "MIT" ]
1
2021-11-13T13:51:37.000Z
2021-11-13T13:51:37.000Z
gym_envs/envs/reacher_done.py
gautams3/reacher-done
6420f4ea3e0f6e47a3ebe25dbe170a9030b03b01
[ "MIT" ]
null
null
null
gym_envs/envs/reacher_done.py
gautams3/reacher-done
6420f4ea3e0f6e47a3ebe25dbe170a9030b03b01
[ "MIT" ]
2
2021-04-08T12:48:29.000Z
2021-05-09T02:04:33.000Z
import gym from gym import error, spaces, utils from gym.utils import seeding from gym.envs.mujoco.reacher import ReacherEnv import numpy as np class ReacherDoneEnv(ReacherEnv): metadata = {'render.modes': ['human']} # def __init__(self): # ... def step(self, action): self.do_simulation(action, self.fra...
31.580645
76
0.668029
711
0.726251
0
0
0
0
0
0
259
0.264556
420ed2750c333b6a9c2bf33a7391b56504549e6c
4,639
py
Python
stackalytics/get_metric.py
yaoice/python_demo
024f42f9cfce757bdaddf24202d8547801f0e8f6
[ "Apache-2.0" ]
null
null
null
stackalytics/get_metric.py
yaoice/python_demo
024f42f9cfce757bdaddf24202d8547801f0e8f6
[ "Apache-2.0" ]
2
2021-02-08T20:17:39.000Z
2021-06-01T21:49:12.000Z
stackalytics/get_metric.py
yaoice/python_demo
024f42f9cfce757bdaddf24202d8547801f0e8f6
[ "Apache-2.0" ]
null
null
null
#/usr/bin/env python import httplib2 import json import sys from prettytable import PrettyTable from config import field class BaseStackalytics(object): _instance = None def __new__(cls, *args, **kwargs): if not cls._instance: cls._instance = super(BaseStackalytics, cls).__new__(cls, *arg...
43.764151
143
0.527053
881
0.189912
0
0
0
0
0
0
669
0.144212
421097c0f352c62da6301188c7377f912e0f1d54
1,465
py
Python
modules/worker.py
strangest-quark/iConsent
096a471a8f5c61dcb9cff5fb380ddb55848bf055
[ "MIT" ]
10
2020-08-08T13:59:10.000Z
2020-11-13T23:13:57.000Z
modules/worker.py
strangest-quark/iConsent
096a471a8f5c61dcb9cff5fb380ddb55848bf055
[ "MIT" ]
1
2021-09-08T02:26:48.000Z
2021-09-08T02:26:48.000Z
modules/worker.py
strangest-quark/iConsent
096a471a8f5c61dcb9cff5fb380ddb55848bf055
[ "MIT" ]
2
2021-07-29T07:40:59.000Z
2022-01-28T03:20:22.000Z
import logging from queue import Queue from threading import Thread from time import time logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s') logger = logging.getLogger(__name__) class Worker(Thread): def __init__(self, queue, out_que): Thread.__init__...
28.173077
102
0.619795
463
0.316041
0
0
0
0
0
0
429
0.292833
4212519f45b1cf9dfda4da64b4b3fae6c56b03b5
2,420
py
Python
src/saml2/extension/pefim.py
cnelson/pysaml2
a30e51c271e27e4411a0243b65adbf5d7a3abb07
[ "Apache-2.0" ]
5,079
2015-01-01T03:39:46.000Z
2022-03-31T07:38:22.000Z
desktop/core/ext-py/pysaml2-4.4.0/src/saml2/extension/pefim.py
zks888/hue
93a8c370713e70b216c428caa2f75185ef809deb
[ "Apache-2.0" ]
1,623
2015-01-01T08:06:24.000Z
2022-03-30T19:48:52.000Z
desktop/core/ext-py/pysaml2-4.4.0/src/saml2/extension/pefim.py
zks888/hue
93a8c370713e70b216c428caa2f75185ef809deb
[ "Apache-2.0" ]
2,033
2015-01-04T07:18:02.000Z
2022-03-28T19:55:47.000Z
#!/usr/bin/env python import saml2 from saml2 import SamlBase from saml2.xmldsig import KeyInfo NAMESPACE = 'urn:net:eustix:names:tc:PEFIM:0.0:assertion' class SPCertEncType_(SamlBase): """The urn:net:eustix:names:tc:PEFIM:0.0:assertion:SPCertEncType element """ c_tag = 'SPCertEncType' c_namespace = NA...
31.428571
80
0.654959
1,743
0.720248
0
0
0
0
0
0
417
0.172314
42144545d417abe762a3d9307033d86aace5b332
805
py
Python
ontask/migrations/0004_remove_old_migration_refs.py
pinheiroo27/ontask_b
23fee8caf4e1c5694a710a77f3004ca5d9effeac
[ "MIT" ]
33
2017-12-02T04:09:24.000Z
2021-11-07T08:41:57.000Z
ontask/migrations/0004_remove_old_migration_refs.py
pinheiroo27/ontask_b
23fee8caf4e1c5694a710a77f3004ca5d9effeac
[ "MIT" ]
189
2017-11-16T04:06:29.000Z
2022-03-11T23:35:59.000Z
ontask/migrations/0004_remove_old_migration_refs.py
pinheiroo27/ontask_b
23fee8caf4e1c5694a710a77f3004ca5d9effeac
[ "MIT" ]
30
2017-11-30T03:35:44.000Z
2022-01-31T03:08:08.000Z
# Generated by Django 2.2.4 on 2019-08-24 06:02 from django.db import connection as con, migrations from psycopg2 import sql def remove_old_migration_refs(apps, schema_editor): __sql_delete_migration_ref = 'DELETE FROM django_migrations WHERE app={0}' old_apps = [ 'action', 'core', 'dataops', 'logs'...
26.833333
78
0.650932
201
0.249689
0
0
0
0
0
0
213
0.264596
42149897d0b37e2db558007492da879e2a80968d
639
py
Python
scripts/tfloc_summary.py
lldelisle/bx-python
19ab41e0905221e3fcaaed4b74faf2d7cda0d15a
[ "MIT" ]
122
2015-07-01T12:00:22.000Z
2022-03-02T09:27:35.000Z
scripts/tfloc_summary.py
lldelisle/bx-python
19ab41e0905221e3fcaaed4b74faf2d7cda0d15a
[ "MIT" ]
64
2015-11-06T21:03:18.000Z
2022-03-24T00:55:27.000Z
scripts/tfloc_summary.py
lldelisle/bx-python
19ab41e0905221e3fcaaed4b74faf2d7cda0d15a
[ "MIT" ]
60
2015-10-05T19:19:36.000Z
2021-11-19T20:53:54.000Z
#!/usr/bin/env python """ Read TFLOC output from stdin and write out a summary in which the nth line contains the number of sites found in the nth alignment of the input. TODO: This is very special case, should it be here? """ import sys from collections import defaultdict counts = defaultdict(int) max_index = -1 ...
22.821429
74
0.674491
0
0
0
0
0
0
0
0
250
0.391236
4214b1ee9bcb816a48babcc6e1d8cfe461c7c2c0
3,649
py
Python
plugins/data/bAbI/digitsDataPluginBAbI/data.py
Linda-liugongzi/DIGITS-digits-py3
6df5eb6972574a628b9544934518ec8dfa9c7439
[ "BSD-3-Clause" ]
null
null
null
plugins/data/bAbI/digitsDataPluginBAbI/data.py
Linda-liugongzi/DIGITS-digits-py3
6df5eb6972574a628b9544934518ec8dfa9c7439
[ "BSD-3-Clause" ]
null
null
null
plugins/data/bAbI/digitsDataPluginBAbI/data.py
Linda-liugongzi/DIGITS-digits-py3
6df5eb6972574a628b9544934518ec8dfa9c7439
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. import os from digits.utils import subclass, override, constants from digits.extensions.data.interface import DataIngestionInterface from .forms import DatasetForm, InferenceForm from . import utils from flask_babel import lazy_gettext as _ DATASET_TE...
31.730435
105
0.636339
3,216
0.881337
0
0
3,226
0.884078
0
0
1,033
0.283091
4216517a1b9daa01aa443bee25e4880a6b96ed43
3,767
py
Python
13_TransparentOrigami/fold2.py
dandrianneDEL/PyAdventOfCode2021
ea91186383c0855c81c7243d527de0c4dd4c0afb
[ "MIT" ]
null
null
null
13_TransparentOrigami/fold2.py
dandrianneDEL/PyAdventOfCode2021
ea91186383c0855c81c7243d527de0c4dd4c0afb
[ "MIT" ]
null
null
null
13_TransparentOrigami/fold2.py
dandrianneDEL/PyAdventOfCode2021
ea91186383c0855c81c7243d527de0c4dd4c0afb
[ "MIT" ]
null
null
null
import filehelper fileResult = filehelper.readfile() class Matrix: cells: list[list[bool]] maxX: int maxY: int def __init__(self, sizeX:int, sizeY:int) -> None: self.cells = [] self.maxX = sizeX self.maxY = sizeY # print(f"INIT matrix {sizeX}x{sizeY}") for y in r...
34.87963
127
0.535439
3,169
0.841253
0
0
0
0
0
0
628
0.166711
421750365075d0ccd2892de6546549e569376c1b
208
py
Python
complete/01 - 10/Problem1/main.py
this-jacob/project-euler
8f9e700e2875e84d081eade44fd2107db0a0ae12
[ "MIT" ]
null
null
null
complete/01 - 10/Problem1/main.py
this-jacob/project-euler
8f9e700e2875e84d081eade44fd2107db0a0ae12
[ "MIT" ]
null
null
null
complete/01 - 10/Problem1/main.py
this-jacob/project-euler
8f9e700e2875e84d081eade44fd2107db0a0ae12
[ "MIT" ]
null
null
null
def main(): total = 0 for i in range(0, 1000): if i % 3 == 0: total += i elif i % 5 == 0: total += i print(total) if __name__ == '__main__': main()
13.866667
28
0.408654
0
0
0
0
0
0
0
0
10
0.048077
4218d80702b95a80fa35592557c09dc27cf8233c
206
py
Python
reward/batcher/transforms/base_transform.py
lgvaz/torchrl
cfff8acaf70d1fec72169162b95ab5ad3547d17a
[ "MIT" ]
5
2018-06-21T14:33:40.000Z
2018-08-18T02:26:03.000Z
reward/batcher/transforms/base_transform.py
lgvaz/reward
cfff8acaf70d1fec72169162b95ab5ad3547d17a
[ "MIT" ]
null
null
null
reward/batcher/transforms/base_transform.py
lgvaz/reward
cfff8acaf70d1fec72169162b95ab5ad3547d17a
[ "MIT" ]
2
2018-05-08T03:34:49.000Z
2018-06-22T15:04:17.000Z
class BaseTransform: def transform_s(self, s, training=True): return s def transform_batch(self, batch, training=True): return batch def write_logs(self, logger): pass
20.6
52
0.645631
205
0.995146
0
0
0
0
0
0
0
0
4219aa019cf5a624b152bb0ddf85c0a457ed2c73
2,416
py
Python
webapp/scan_comments.py
ctrl-meta-f/ngk
6d9122ee84cc7420f9b135556c7b03e9b20428e4
[ "BSD-2-Clause" ]
null
null
null
webapp/scan_comments.py
ctrl-meta-f/ngk
6d9122ee84cc7420f9b135556c7b03e9b20428e4
[ "BSD-2-Clause" ]
null
null
null
webapp/scan_comments.py
ctrl-meta-f/ngk
6d9122ee84cc7420f9b135556c7b03e9b20428e4
[ "BSD-2-Clause" ]
null
null
null
import logging import time import requests import lxml.etree import re import os from schema import ScopedSession, SyncState logging.basicConfig( filename=os.getenv("LOG_FILE", "../logs/scan_comments.log"), format="%(asctime)s %(levelname)s %(message)s", datefmt="%Y-%m-%d %H:%M:%S", level=logging.DEBU...
29.463415
134
0.631623
0
0
0
0
0
0
0
0
344
0.142384
421a32da4769d80ffba1268d31b7a676642e60fc
1,009
py
Python
s3prl/upstream/example/hubconf.py
hhhaaahhhaa/s3prl
a469787f05c42196c4d989555082f5fd9dcbe8a6
[ "Apache-2.0" ]
856
2021-01-15T15:40:32.000Z
2022-03-31T07:08:17.000Z
s3prl/upstream/example/hubconf.py
hhhaaahhhaa/s3prl
a469787f05c42196c4d989555082f5fd9dcbe8a6
[ "Apache-2.0" ]
210
2021-01-15T13:28:50.000Z
2022-03-30T06:13:51.000Z
s3prl/upstream/example/hubconf.py
hhhaaahhhaa/s3prl
a469787f05c42196c4d989555082f5fd9dcbe8a6
[ "Apache-2.0" ]
208
2021-01-15T03:03:12.000Z
2022-03-31T08:33:27.000Z
from .expert import UpstreamExpert as _UpstreamExpert def customized_upstream(*args, **kwargs): """ To enable your customized pretrained model, you only need to implement upstream/example/expert.py and leave this file as is. This file is used to register the UpstreamExpert in upstream/example/expert.p...
32.548387
74
0.716551
0
0
0
0
0
0
0
0
862
0.854311
421a86ab2fcc5ca9b6f576b1a9c163c17517de0f
463
py
Python
g-code-testing/g_code_parsing/g_code_functionality_defs/thermocycler/set_ramp_rate_g_code_functionality_def.py
Opentrons/protocol_framework
ebbd6b2fe984edd6ecfcbf1dbe040db7f7356b9f
[ "Apache-2.0" ]
null
null
null
g-code-testing/g_code_parsing/g_code_functionality_defs/thermocycler/set_ramp_rate_g_code_functionality_def.py
Opentrons/protocol_framework
ebbd6b2fe984edd6ecfcbf1dbe040db7f7356b9f
[ "Apache-2.0" ]
null
null
null
g-code-testing/g_code_parsing/g_code_functionality_defs/thermocycler/set_ramp_rate_g_code_functionality_def.py
Opentrons/protocol_framework
ebbd6b2fe984edd6ecfcbf1dbe040db7f7356b9f
[ "Apache-2.0" ]
null
null
null
from typing import Dict from g_code_parsing.g_code_functionality_defs.g_code_functionality_def_base import ( GCodeFunctionalityDefBase, ) class SetRampRateGCodeFunctionalityDef(GCodeFunctionalityDefBase): @classmethod def _generate_command_explanation(cls, g_code_args: Dict[str, str]) -> str: retu...
33.071429
84
0.740821
318
0.686825
0
0
247
0.533477
0
0
102
0.220302
421c7e1609af23f9ed8e7709fd3cc2ca7ae61d73
19,452
py
Python
src/mrio.py
ElcoK/MRIA_Argentina
45194eb738c725276c3667078ac8d229554b550e
[ "MIT" ]
null
null
null
src/mrio.py
ElcoK/MRIA_Argentina
45194eb738c725276c3667078ac8d229554b550e
[ "MIT" ]
null
null
null
src/mrio.py
ElcoK/MRIA_Argentina
45194eb738c725276c3667078ac8d229554b550e
[ "MIT" ]
2
2021-06-28T11:51:17.000Z
2022-01-10T06:49:01.000Z
import os,sys import pandas as pd import numpy as np import subprocess from tqdm import tqdm from ras_method import ras_method import warnings warnings.filterwarnings('ignore') def est_trade_value(x,output_new,sector): """ Function to estimate the trade value between two sectors """ if (sector is not ...
49.24557
154
0.635359
0
0
0
0
0
0
0
0
4,979
0.255963
421c88021499b88620b09442779453fef21cf565
1,212
py
Python
task_manager/users/forms.py
Ritesh-Aggarwal/Task-Manager-Django
b8f8df10b0b0a9cc9cd27346a0b5d4d5892d2f24
[ "MIT" ]
null
null
null
task_manager/users/forms.py
Ritesh-Aggarwal/Task-Manager-Django
b8f8df10b0b0a9cc9cd27346a0b5d4d5892d2f24
[ "MIT" ]
null
null
null
task_manager/users/forms.py
Ritesh-Aggarwal/Task-Manager-Django
b8f8df10b0b0a9cc9cd27346a0b5d4d5892d2f24
[ "MIT" ]
null
null
null
from django import forms from django.contrib.auth import get_user_model from django.contrib.auth.forms import ( AuthenticationForm, UserCreationForm, UsernameField, ) User = get_user_model() class UserLoginForm(AuthenticationForm): def __init__(self, *args, **kwargs): super(UserLoginForm, sel...
26.347826
77
0.605611
1,002
0.826733
0
0
0
0
0
0
175
0.144389
421cd1f840cd074e3eb92df46eaaf5c4a3768113
1,891
py
Python
boa3/model/builtin/interop/oracle/oracletype.py
hal0x2328/neo3-boa
6825a3533384cb01660773050719402a9703065b
[ "Apache-2.0" ]
25
2020-07-22T19:37:43.000Z
2022-03-08T03:23:55.000Z
boa3/model/builtin/interop/oracle/oracletype.py
hal0x2328/neo3-boa
6825a3533384cb01660773050719402a9703065b
[ "Apache-2.0" ]
419
2020-04-23T17:48:14.000Z
2022-03-31T13:17:45.000Z
boa3/model/builtin/interop/oracle/oracletype.py
hal0x2328/neo3-boa
6825a3533384cb01660773050719402a9703065b
[ "Apache-2.0" ]
15
2020-05-21T21:54:24.000Z
2021-11-18T06:17:24.000Z
from __future__ import annotations from typing import Any, Dict, Optional from boa3.model.method import Method from boa3.model.property import Property from boa3.model.type.classes.classarraytype import ClassArrayType from boa3.model.variable import Variable class OracleType(ClassArrayType): """ A class use...
27.014286
95
0.657324
1,602
0.847171
0
0
1,170
0.61872
0
0
106
0.056055
42228f1e28d8899ed8da922c4eb2bd3b92ca4e69
191
py
Python
photo-hub/api/pagination.py
RodionChachura/photo-hub
20ec008076a34cb09b289fda0557e2efc7e06232
[ "MIT" ]
null
null
null
photo-hub/api/pagination.py
RodionChachura/photo-hub
20ec008076a34cb09b289fda0557e2efc7e06232
[ "MIT" ]
null
null
null
photo-hub/api/pagination.py
RodionChachura/photo-hub
20ec008076a34cb09b289fda0557e2efc7e06232
[ "MIT" ]
null
null
null
from rest_framework.pagination import PageNumberPagination class StandardPagination(PageNumberPagination): page_size = 30 page_size_query_param = 'page_size' max_page_size = 1000
31.833333
58
0.811518
131
0.685864
0
0
0
0
0
0
11
0.057592
4222c98b7de332bf9b4c1cc8bba790b9eea99314
1,021
py
Python
wiiu.py
RN-JK/UBIART-Texture-Decoder
71e190c12b1b8813dcda1f26cd115d9f89cc7619
[ "MIT" ]
null
null
null
wiiu.py
RN-JK/UBIART-Texture-Decoder
71e190c12b1b8813dcda1f26cd115d9f89cc7619
[ "MIT" ]
null
null
null
wiiu.py
RN-JK/UBIART-Texture-Decoder
71e190c12b1b8813dcda1f26cd115d9f89cc7619
[ "MIT" ]
1
2021-11-29T05:57:55.000Z
2021-11-29T05:57:55.000Z
import os, glob try: os.mkdir("output") except: pass wiiudir="input/wiiu" try: os.makedirs(wiiudir) print('The directories have been made.') input('Insert your textures in input/wiiu and then run the tool again to convert it.') except: pass dir = 'input/temp' t...
18.563636
103
0.5524
0
0
0
0
0
0
0
0
275
0.269344
4223f6babdeae509fede80d613a39bd2530fc8ee
470
py
Python
jp.atcoder/abc046/arc062_a/8984820.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
1
2022-02-09T03:06:25.000Z
2022-02-09T03:06:25.000Z
jp.atcoder/abc046/arc062_a/8984820.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
1
2022-02-05T22:53:18.000Z
2022-02-09T01:29:30.000Z
jp.atcoder/abc046/arc062_a/8984820.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
null
null
null
import sys n = int(sys.stdin.readline().rstrip()) ab = map(int, sys.stdin.read().split()) ab = list(zip(ab, ab)) def main(): c_a = ab[0][0] c_b = ab[0][1] for a, b in ab[1:]: ratio = a / b while c_a / c_b != ratio: if c_a / c_b < ratio: c_a += 1 ...
18.076923
40
0.431915
0
0
0
0
0
0
0
0
10
0.021277
422402f1cd18573550063c08ebfde34d14018e34
5,187
py
Python
pycsw/pycsw/plugins/profiles/profile.py
Geosoft2/Geosoftware-II-AALLH
bdb61d9a1111b9082ec2b9f309998c5f2166975e
[ "MIT" ]
118
2015-01-07T00:24:09.000Z
2022-03-19T15:35:43.000Z
pycsw/pycsw/plugins/profiles/profile.py
Geosoft2/Geosoftware-II-AALLH
bdb61d9a1111b9082ec2b9f309998c5f2166975e
[ "MIT" ]
319
2015-01-06T23:51:46.000Z
2022-03-20T11:22:57.000Z
pycsw/pycsw/plugins/profiles/profile.py
Geosoft2/Geosoftware-II-AALLH
bdb61d9a1111b9082ec2b9f309998c5f2166975e
[ "MIT" ]
113
2015-01-07T00:42:23.000Z
2022-02-19T18:05:08.000Z
# -*- coding: utf-8 -*- # ================================================================= # # Authors: Tom Kralidis <[email protected]> # Angelos Tzotsos <[email protected]> # # Copyright (c) 2015 Tom Kralidis # Copyright (c) 2015 Angelos Tzotsos # # Permission is hereby granted, free of charge, to any p...
36.528169
78
0.630037
2,480
0.478118
0
0
0
0
0
0
2,669
0.514556
4224f59023f612daa74db320160910b42cc05439
3,897
py
Python
push-package.py
OpenTrustGroup/scripts
31ca2ca5bae055113c6f92a2eb75b0c7528902b3
[ "BSD-3-Clause" ]
null
null
null
push-package.py
OpenTrustGroup/scripts
31ca2ca5bae055113c6f92a2eb75b0c7528902b3
[ "BSD-3-Clause" ]
null
null
null
push-package.py
OpenTrustGroup/scripts
31ca2ca5bae055113c6f92a2eb75b0c7528902b3
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # Copyright 2017 The Fuchsia Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import argparse import errno import json import os import subprocess import sys import tempfile DEFAULT_DST_ROOT = '/system' DEFAULT_OU...
26.691781
79
0.647164
0
0
0
0
0
0
0
0
1,060
0.272004
42260da2bac2d4e5c90292ee2d38da85618b72ad
2,355
py
Python
tests/e2e/registry/test_registry_image_push_pull.py
OdedViner/ocs-ci
e8a3de82650e02cf8fa67284a67c36ced34a480b
[ "MIT" ]
null
null
null
tests/e2e/registry/test_registry_image_push_pull.py
OdedViner/ocs-ci
e8a3de82650e02cf8fa67284a67c36ced34a480b
[ "MIT" ]
null
null
null
tests/e2e/registry/test_registry_image_push_pull.py
OdedViner/ocs-ci
e8a3de82650e02cf8fa67284a67c36ced34a480b
[ "MIT" ]
null
null
null
import logging import pytest from ocs_ci.framework.testlib import workloads, E2ETest, ignore_leftovers from ocs_ci.ocs import ocp, registry, constants from ocs_ci.framework import config from ocs_ci.ocs.exceptions import UnexpectedBehaviour logger = logging.getLogger(__name__) class TestRegistryImagePullPush(E2ETest...
36.796875
100
0.6862
2,073
0.880255
0
0
1,937
0.822505
0
0
914
0.38811
42274dc240f54ea288091543468dd2eda53a4feb
55
py
Python
tOYOpy/settings.py
fkab/tOYO
b0a7be760a45edd795b8734ce2e5f1ccec35091b
[ "MIT" ]
null
null
null
tOYOpy/settings.py
fkab/tOYO
b0a7be760a45edd795b8734ce2e5f1ccec35091b
[ "MIT" ]
null
null
null
tOYOpy/settings.py
fkab/tOYO
b0a7be760a45edd795b8734ce2e5f1ccec35091b
[ "MIT" ]
null
null
null
elements = { 'em': '', 'blockquote': '<br/>' }
11
25
0.4
0
0
0
0
0
0
0
0
25
0.454545
4227bfd2b04f47e94ab893e1b523dca4551e38fc
312
py
Python
1.6.py
kevrodg/pynet
5142b1b75cda658a99348e3550da1c198e7d049e
[ "Apache-2.0" ]
null
null
null
1.6.py
kevrodg/pynet
5142b1b75cda658a99348e3550da1c198e7d049e
[ "Apache-2.0" ]
null
null
null
1.6.py
kevrodg/pynet
5142b1b75cda658a99348e3550da1c198e7d049e
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import json import yaml my_list = [0, 1, 2, 3, 'whatever', 'hello', {'attribs': [0, 1, 2, 3, 4], 'ip_addr': '10.10.10.239'}] with open("my_file.json", "w") as f: json.dump(my_list, f) with open("my_file.yaml", "w") as f: f.write(yaml.dump(my_list, default_flow_style=False))
20.8
101
0.61859
0
0
0
0
0
0
0
0
104
0.333333
42287378bd11599427298e72d96640a19c6fbb44
322
py
Python
jp.atcoder/abc069/arc080_a/11903517.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
1
2022-02-09T03:06:25.000Z
2022-02-09T03:06:25.000Z
jp.atcoder/abc069/arc080_a/11903517.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
1
2022-02-05T22:53:18.000Z
2022-02-09T01:29:30.000Z
jp.atcoder/abc069/arc080_a/11903517.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
null
null
null
import sys n, *a = map(int, sys.stdin.read().split()) def main(): c4 = c2 = 0 for x in a: if not x % 4: c4 += 1 elif not x % 2: c2 += 1 ans = "Yes" if c4 >= n // 2 or c4 * 2 + c2 >= n else "No" print(ans) if __name__ == "__main__": main()...
16.947368
62
0.406832
0
0
0
0
0
0
0
0
19
0.059006
422874e1c950eddb051f58c230d75405855070fc
2,277
py
Python
tests/test_url_enc_dec.py
FWidm/poe-profile
08190dfab88758081ce1ddcd30a43081e2d7863f
[ "MIT" ]
1
2018-12-02T19:48:09.000Z
2018-12-02T19:48:09.000Z
tests/test_url_enc_dec.py
FWidm/poe-profile
08190dfab88758081ce1ddcd30a43081e2d7863f
[ "MIT" ]
null
null
null
tests/test_url_enc_dec.py
FWidm/poe-profile
08190dfab88758081ce1ddcd30a43081e2d7863f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import logging import sys import unittest from src.util.tree_codec import encode_hashes, decode_url url = 'AAAABAMDAQQHBLMGSQj0Dc0OPA5cES0UIBRxFScWbxhWGF0YkRo4HM4c3CSqJy8o-itQLJwy0TWSNuk6UjpYOuE8LUGHRARFR0V-RZ1Ms025TeNQR' \ '1NSVcZZ81qRXz9mnmebaGVodGpDaqxq-mvbcg9yqXasfIN99YIHgseDX4PMg...
42.962264
123
0.62231
363
0.15942
0
0
0
0
0
0
402
0.176548
422975ef7721aeaa44f60c6499ab2952315acfbe
262
py
Python
_test/registry/reg04.py
javacommons/commonthread
dff8b39d7c86729e4711b669bcec8eab6f146659
[ "Unlicense" ]
null
null
null
_test/registry/reg04.py
javacommons/commonthread
dff8b39d7c86729e4711b669bcec8eab6f146659
[ "Unlicense" ]
null
null
null
_test/registry/reg04.py
javacommons/commonthread
dff8b39d7c86729e4711b669bcec8eab6f146659
[ "Unlicense" ]
null
null
null
# source http://itasuke.hatenablog.com/entry/2018/01/08/133510 import winreg newkey = winreg.CreateKeyEx(winreg.HKEY_CURRENT_USER, r'Software\__javacommons__\abc') newkey.Close() winreg.DeleteKeyEx(winreg.HKEY_CURRENT_USER, r'Software\__javacommons__\abc')
43.666667
87
0.80916
0
0
0
0
0
0
0
0
125
0.477099
422a7283e956bcdda7358ae083a9c572a8121dd9
8,289
py
Python
setuptools-37.0.0/pkg_resources/tests/test_working_set.py
coderlongren/PreliminaryPython
b5c7a87e41842c57aabb660de1514cba19c8bd78
[ "MIT" ]
1
2017-09-19T15:21:50.000Z
2017-09-19T15:21:50.000Z
setuptools-37.0.0/pkg_resources/tests/test_working_set.py
coderlongren/PreliminaryPython
b5c7a87e41842c57aabb660de1514cba19c8bd78
[ "MIT" ]
null
null
null
setuptools-37.0.0/pkg_resources/tests/test_working_set.py
coderlongren/PreliminaryPython
b5c7a87e41842c57aabb660de1514cba19c8bd78
[ "MIT" ]
4
2017-05-12T09:18:16.000Z
2020-08-27T03:26:16.000Z
import inspect import re import textwrap import pytest import pkg_resources from .test_resources import Metadata def strip_comments(s): return '\n'.join( l for l in s.split('\n') if l.strip() and not l.strip().startswith('#') ) def parse_distributions(s): ''' Parse a series of dist...
17.304802
87
0.55447
277
0.033418
1,037
0.125106
5,131
0.619013
0
0
4,937
0.595609
422abcc408966dc47c31fc1259795d32236b4832
629
py
Python
setup.py
Sigel1/yolo-tf2
a11c856e601c23220fc2afce7c93e9f8eb4fd339
[ "MIT" ]
null
null
null
setup.py
Sigel1/yolo-tf2
a11c856e601c23220fc2afce7c93e9f8eb4fd339
[ "MIT" ]
null
null
null
setup.py
Sigel1/yolo-tf2
a11c856e601c23220fc2afce7c93e9f8eb4fd339
[ "MIT" ]
null
null
null
from setuptools import find_packages, setup install_requires = [dep.strip() for dep in open('requirements.txt')] setup( name='yolo_tf2', version='1.5', packages=find_packages(), url='https://github.com/schissmantics/yolo-tf2', license='MIT', author='schismantics', author_email='schissmanti...
27.347826
73
0.659777
0
0
0
0
0
0
0
0
247
0.392687
422b18d573ebb1cb612e410eb429acc8c41c02ef
224
py
Python
btc_tracker_engine/helper_functions.py
metalerk/4btc
ee9ec1a6fcea1b489bd8afa9c3a25c025e022cb0
[ "MIT" ]
null
null
null
btc_tracker_engine/helper_functions.py
metalerk/4btc
ee9ec1a6fcea1b489bd8afa9c3a25c025e022cb0
[ "MIT" ]
null
null
null
btc_tracker_engine/helper_functions.py
metalerk/4btc
ee9ec1a6fcea1b489bd8afa9c3a25c025e022cb0
[ "MIT" ]
null
null
null
def rate_diff_percentage(previous_rate, current_rate, percentage=False): diff_percentage = (current_rate - previous_rate) / previous_rate if percentage: return diff_percentage * 100 return diff_percentage
44.8
72
0.772321
0
0
0
0
0
0
0
0
0
0
422b4572706867cc810fb195c7e12772e8a93c86
324
py
Python
nngeometry/object/__init__.py
amyami187/nngeometry
cb516da3f7a019e148f48ff3ef3bed0cdae0d184
[ "MIT" ]
103
2020-03-19T08:47:29.000Z
2022-03-29T00:54:38.000Z
nngeometry/object/__init__.py
amyami187/nngeometry
cb516da3f7a019e148f48ff3ef3bed0cdae0d184
[ "MIT" ]
29
2021-01-07T13:39:20.000Z
2022-03-29T14:52:21.000Z
nngeometry/object/__init__.py
amyami187/nngeometry
cb516da3f7a019e148f48ff3ef3bed0cdae0d184
[ "MIT" ]
11
2020-11-09T01:07:12.000Z
2022-03-29T00:54:41.000Z
from .pspace import (PMatDense, PMatBlockDiag, PMatDiag, PMatLowRank, PMatImplicit, PMatKFAC, PMatEKFAC, PMatQuasiDiag) from .vector import (PVector, FVector) from .fspace import (FMatDense,) from .map import (PushForwardDense, PushForwardImplicit, PullBackDen...
40.5
56
0.66358
0
0
0
0
0
0
0
0
0
0
422e18702f6c683f268a4b49395a514801fec437
834
py
Python
vkwave/bots/core/dispatching/dp/middleware/middleware.py
YorkDW/vkwave
86b0278f15f398217a8211007c44651b6145831b
[ "MIT" ]
null
null
null
vkwave/bots/core/dispatching/dp/middleware/middleware.py
YorkDW/vkwave
86b0278f15f398217a8211007c44651b6145831b
[ "MIT" ]
null
null
null
vkwave/bots/core/dispatching/dp/middleware/middleware.py
YorkDW/vkwave
86b0278f15f398217a8211007c44651b6145831b
[ "MIT" ]
null
null
null
from abc import ABC, abstractmethod from typing import List, NewType from vkwave.bots.core.dispatching.events.base import BaseEvent MiddlewareResult = NewType("MiddlewareResult", bool) class BaseMiddleware(ABC): @abstractmethod async def pre_process_event(self, event: BaseEvent) -> MiddlewareResult: ...
29.785714
84
0.715827
641
0.768585
0
0
104
0.1247
381
0.456835
18
0.021583
422e499271a923bf090aefdbe25c5651121859de
3,517
py
Python
plot_scripts/try_networkx.py
gabrielasuchopar/arch2vec
1fc47d2cc7d63832e0d6337b8482669366b4aef2
[ "Apache-2.0" ]
35
2020-10-22T03:58:23.000Z
2022-03-21T12:55:35.000Z
plot_scripts/try_networkx.py
gabrielasuchopar/arch2vec
1fc47d2cc7d63832e0d6337b8482669366b4aef2
[ "Apache-2.0" ]
1
2021-06-03T13:49:47.000Z
2021-06-06T02:02:11.000Z
plot_scripts/try_networkx.py
gabrielasuchopar/arch2vec
1fc47d2cc7d63832e0d6337b8482669366b4aef2
[ "Apache-2.0" ]
9
2020-10-22T14:13:53.000Z
2022-03-21T08:06:12.000Z
import networkx as nx import numpy as np import matplotlib.pyplot as plt def node_match(n1, n2): if n1['op'] == n2['op']: return True else: return False def edge_match(e1, e2): return True def gen_graph(adj, ops): G = nx.DiGraph() for k, op in enumerate(ops): G.add_node(k,...
30.582609
142
0.477396
0
0
0
0
0
0
0
0
304
0.086437
422eaaa92344214317cacbe394deaa82d7096b9d
6,552
py
Python
endpoints/v2/errors.py
giuseppe/quay
a1b7e4b51974edfe86f66788621011eef2667e6a
[ "Apache-2.0" ]
2,027
2019-11-12T18:05:48.000Z
2022-03-31T22:25:04.000Z
endpoints/v2/errors.py
giuseppe/quay
a1b7e4b51974edfe86f66788621011eef2667e6a
[ "Apache-2.0" ]
496
2019-11-12T18:13:37.000Z
2022-03-31T10:43:45.000Z
endpoints/v2/errors.py
giuseppe/quay
a1b7e4b51974edfe86f66788621011eef2667e6a
[ "Apache-2.0" ]
249
2019-11-12T18:02:27.000Z
2022-03-22T12:19:19.000Z
import bitmath class V2RegistryException(Exception): def __init__( self, error_code_str, message, detail, http_status_code=400, repository=None, scopes=None, is_read_only=False, ): super(V2RegistryException, self).__init__(message) ...
32.435644
100
0.654609
6,468
0.987179
0
0
0
0
0
0
1,425
0.217491
422f10e008ebbf5692ddbc20cb4464f21ab48808
3,956
py
Python
scoreboard.py
TheLurkingCat/scoreboard
9c292fc8573e7bf8539cb20a813c2147ddd0c923
[ "MIT" ]
null
null
null
scoreboard.py
TheLurkingCat/scoreboard
9c292fc8573e7bf8539cb20a813c2147ddd0c923
[ "MIT" ]
null
null
null
scoreboard.py
TheLurkingCat/scoreboard
9c292fc8573e7bf8539cb20a813c2147ddd0c923
[ "MIT" ]
null
null
null
''' LICENSE: MIT license This module can help us know about who can ask when we have troubles in some buggy codes while solving problems. ''' from asyncio import gather, get_event_loop from pandas import DataFrame, set_option from online_judge import Online_Judge loop = get_event_loop() set_option('display.max_col...
35.63964
167
0.548787
3,621
0.915319
0
0
0
0
126
0.03185
1,966
0.496967
422f98ebeb65b657f8b008da4345d8f0e09f42c7
10,406
py
Python
custom_transforms.py
zyxu1996/Efficient-Transformer
106347186d13e106e9129d25b72e2fd491c54452
[ "Apache-2.0" ]
22
2021-10-13T05:10:15.000Z
2022-03-17T12:01:40.000Z
custom_transforms.py
zyXu1996/Efficient-Transformer
efd87d734d5835eccb5b624c5e7ca3a5a08f318b
[ "Apache-2.0" ]
null
null
null
custom_transforms.py
zyXu1996/Efficient-Transformer
efd87d734d5835eccb5b624c5e7ca3a5a08f318b
[ "Apache-2.0" ]
4
2021-11-08T10:30:23.000Z
2022-02-16T05:07:25.000Z
import torch import random import numpy as np import cv2 import os import torch.nn as nn from torchvision import transforms class RandomHorizontalFlip(object): def __call__(self, sample): image = sample['image'] label = sample['label'] if random.random() < 0.5: image = cv2.flip(...
36.384615
106
0.540746
8,367
0.804055
0
0
0
0
0
0
1,016
0.097636
423075718e222b99f83bdb4ab73a14063da9d0ee
37,354
py
Python
ui/staff.py
AryaStarkSakura/Stylized-Neural-Painting
0502c9f12eb582fe2ebd0ffdc7008dc81cefa74c
[ "CC0-1.0" ]
null
null
null
ui/staff.py
AryaStarkSakura/Stylized-Neural-Painting
0502c9f12eb582fe2ebd0ffdc7008dc81cefa74c
[ "CC0-1.0" ]
null
null
null
ui/staff.py
AryaStarkSakura/Stylized-Neural-Painting
0502c9f12eb582fe2ebd0ffdc7008dc81cefa74c
[ "CC0-1.0" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'staff.ui' # # Created by: PyQt5 UI code generator 5.13.0 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWind...
46.750939
101
0.591235
37,819
0.993668
0
0
0
0
0
0
6,332
0.166369
42308174a4346509fdf47445522e3c2f26a6c431
2,171
py
Python
dataset.py
ceyzaguirre4/mac-network-pytorch
ad2deefc8a987ab92f4911d3d98631f22d0ae44a
[ "MIT" ]
4
2020-04-08T22:19:19.000Z
2020-10-28T23:22:12.000Z
dataset.py
ceyzaguirre4/mac-network-pytorch
ad2deefc8a987ab92f4911d3d98631f22d0ae44a
[ "MIT" ]
null
null
null
dataset.py
ceyzaguirre4/mac-network-pytorch
ad2deefc8a987ab92f4911d3d98631f22d0ae44a
[ "MIT" ]
3
2020-06-27T02:47:02.000Z
2021-10-08T13:19:05.000Z
import os import pickle import numpy as np from PIL import Image import torch from torch.utils.data import Dataset from torchvision import transforms import h5py from transforms import Scale class CLEVR(Dataset): def __init__(self, root, split='train', transform=None): features_path = os.path.join(root, ...
29.739726
83
0.609857
986
0.454169
0
0
0
0
0
0
237
0.109166
4230af0cdb6333a2256b37fbde92023b5213c5d6
1,445
py
Python
tests/distributions/test_log_normal.py
thomasaarholt/xgboost-distribution
8ee00f7f0dcaadcb345ebcb15534287081aa987b
[ "MIT" ]
17
2021-08-14T10:23:54.000Z
2022-01-08T11:54:48.000Z
tests/distributions/test_log_normal.py
thomasaarholt/xgboost-distribution
8ee00f7f0dcaadcb345ebcb15534287081aa987b
[ "MIT" ]
17
2021-06-22T02:23:53.000Z
2022-03-02T16:03:21.000Z
tests/distributions/test_log_normal.py
thomasaarholt/xgboost-distribution
8ee00f7f0dcaadcb345ebcb15534287081aa987b
[ "MIT" ]
6
2021-08-18T18:52:13.000Z
2021-11-19T08:36:50.000Z
import pytest import numpy as np import pandas as pd from xgboost_distribution.distributions import LogNormal @pytest.fixture def lognormal(): return LogNormal() def test_target_validation(lognormal): valid_target = np.array([0.5, 1, 4, 5, 10]) lognormal.check_target(valid_target) @pytest.mark.param...
24.083333
85
0.600692
0
0
0
0
960
0.66436
0
0
86
0.059516
4230f1879c1a68f9bf6052b16b5fb1dd036ba09b
14,169
py
Python
script/forecasting/forecaster.py
bialesdaniel/noisepage
44ca689bd818b1bd39b84a7fe5148ddaa65a61eb
[ "MIT" ]
null
null
null
script/forecasting/forecaster.py
bialesdaniel/noisepage
44ca689bd818b1bd39b84a7fe5148ddaa65a61eb
[ "MIT" ]
null
null
null
script/forecasting/forecaster.py
bialesdaniel/noisepage
44ca689bd818b1bd39b84a7fe5148ddaa65a61eb
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """ Main script for workload forecasting. Example usage: - Generate data (runs OLTP benchmark on the built database) and perform training, and save the trained model ./forecaster --gen_data --models=LSTM --model_save_path=model.pickle - Use the trained models (LSTM) to generate predictions. ...
36.145408
118
0.619239
7,744
0.546545
0
0
1,290
0.091044
0
0
5,572
0.393253
4231a5537ad061f7ccafef21420ba06d2605d9cf
66,059
py
Python
tests/test_master/test_jobtypes_api.py
guidow/pyfarm-master
d41c8f1eb5bfefb8400d400bcecadf197bcfb80a
[ "Apache-2.0" ]
null
null
null
tests/test_master/test_jobtypes_api.py
guidow/pyfarm-master
d41c8f1eb5bfefb8400d400bcecadf197bcfb80a
[ "Apache-2.0" ]
null
null
null
tests/test_master/test_jobtypes_api.py
guidow/pyfarm-master
d41c8f1eb5bfefb8400d400bcecadf197bcfb80a
[ "Apache-2.0" ]
null
null
null
# No shebang line, this module is meant to be imported # # Copyright 2013 Oliver Palmer # Copyright 2014 Ambient Entertainment GmbH & Co. KG # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # ...
37.6834
81
0.473592
64,731
0.979897
0
0
0
0
0
0
19,930
0.3017
4231fa59a3b40941c8f8953e4a8dd3df4f032a6f
742
py
Python
imagekit/hashers.py
radicalgraphics/django-imagekit
e36290b4eef1faaf6ad864d3493df1458ef96fbb
[ "BSD-3-Clause" ]
null
null
null
imagekit/hashers.py
radicalgraphics/django-imagekit
e36290b4eef1faaf6ad864d3493df1458ef96fbb
[ "BSD-3-Clause" ]
null
null
null
imagekit/hashers.py
radicalgraphics/django-imagekit
e36290b4eef1faaf6ad864d3493df1458ef96fbb
[ "BSD-3-Clause" ]
null
null
null
from copy import copy from hashlib import md5 from pickle import Pickler, MARK, DICT from types import DictionaryType from .lib import StringIO class CanonicalizingPickler(Pickler): dispatch = copy(Pickler.dispatch) def save_set(self, obj): rv = obj.__reduce_ex__(0) rv = (rv[0], (sorted(rv[1]...
23.1875
53
0.661725
465
0.626685
0
0
0
0
0
0
0
0
423268278bdfbc38d38322d8349807e008e76abd
1,262
py
Python
sun.py
funxiun/AstroAlgorithms4Python
98098956daba2706c993fa6370d8cdfa4013cb8d
[ "Unlicense" ]
7
2018-09-29T11:35:40.000Z
2022-01-11T14:06:44.000Z
sun.py
funxiun/AstroAlgorithms4Python
98098956daba2706c993fa6370d8cdfa4013cb8d
[ "Unlicense" ]
null
null
null
sun.py
funxiun/AstroAlgorithms4Python
98098956daba2706c993fa6370d8cdfa4013cb8d
[ "Unlicense" ]
8
2018-09-29T11:36:01.000Z
2021-10-17T15:25:55.000Z
'''Meeus: Astronomical Algorithms (2nd ed.), chapter 25''' import math from nutation_ecliptic import ecliptic from constants import AU def coordinates(jd): '''equatorial coordinates of Sun''' lon=math.radians(longitude(jd)) eps=math.radians(ecliptic(jd)) ra=math.degrees(math.atan2(math.c...
26.291667
126
0.62916
0
0
0
0
0
0
0
0
145
0.114897
4233e43b1aa8c3735bfa71a29e6ebbf01825729f
5,681
py
Python
test/paths.py
cychitivav/kobuki_navigation
9da1ad425b8804b49005720594e9837295eb9976
[ "MIT" ]
null
null
null
test/paths.py
cychitivav/kobuki_navigation
9da1ad425b8804b49005720594e9837295eb9976
[ "MIT" ]
null
null
null
test/paths.py
cychitivav/kobuki_navigation
9da1ad425b8804b49005720594e9837295eb9976
[ "MIT" ]
null
null
null
#!/usr/bin/python import numpy as np import cv2 from matplotlib import pyplot as plt import networkx as nx def rotate_image(image, angle): image_center = tuple(np.array(image.shape[0:2]) / 2) rot_mat = cv2.getRotationMatrix2D(image_center, angle, 1) vertical = cv2.warpAffine(image, rot_mat, image.shape[0...
31.38674
88
0.520155
0
0
0
0
0
0
0
0
594
0.104559
4233e6b88d45b6951dc540a0e3110566d67aa657
458
py
Python
intro-to-programming/python-for-everyone/3-variables-expressions-statements/exercise-4.py
udpsunil/computer-science
94e3dfc7d39ad139671ab1a3457a61a1fd48fe39
[ "MIT" ]
null
null
null
intro-to-programming/python-for-everyone/3-variables-expressions-statements/exercise-4.py
udpsunil/computer-science
94e3dfc7d39ad139671ab1a3457a61a1fd48fe39
[ "MIT" ]
null
null
null
intro-to-programming/python-for-everyone/3-variables-expressions-statements/exercise-4.py
udpsunil/computer-science
94e3dfc7d39ad139671ab1a3457a61a1fd48fe39
[ "MIT" ]
null
null
null
# Assume that we execute the following assignment statements # width = 17 # height = 12.0 width = 17 height = 12.0 value_1 = width // 2 value_2 = width / 2.0 value_3 = height / 3 value_4 = 1 + 2 * 5 print(f"value_1 is {value_1} and it's type is {type(value_1)}") print(f"value_2 is {value_2} and it's type is {type(va...
26.941176
63
0.68559
0
0
0
0
0
0
0
0
311
0.679039
42370720ae2a40bece1dbd04a95205d5f5073cbf
131
py
Python
apps/weapons/admin.py
tufbel/wFocus
ee0f02053b8a5bc9c40dd862306fc5df1a063b9d
[ "Apache-2.0" ]
null
null
null
apps/weapons/admin.py
tufbel/wFocus
ee0f02053b8a5bc9c40dd862306fc5df1a063b9d
[ "Apache-2.0" ]
11
2020-06-06T01:51:51.000Z
2022-02-10T14:31:21.000Z
apps/weapons/admin.py
tufbel/wFocus
ee0f02053b8a5bc9c40dd862306fc5df1a063b9d
[ "Apache-2.0" ]
null
null
null
from django.contrib import admin # Register your models here. from apps.weapons.models import Weapon admin.site.register(Weapon)
18.714286
38
0.80916
0
0
0
0
0
0
0
0
28
0.21374
4237a4d8945ebfffd7fd8c863df2a43bde57f4e3
975
py
Python
modules/kubrick/apps/awards/models.py
Lab-Quatro/aposcar
97631f2e3939566cc4e5b81e50c58ce03a5350a4
[ "MIT" ]
3
2021-07-05T14:18:27.000Z
2021-09-02T10:15:55.000Z
modules/kubrick/apps/awards/models.py
Lab-Quatro/aposcar
97631f2e3939566cc4e5b81e50c58ce03a5350a4
[ "MIT" ]
1
2021-10-31T21:40:39.000Z
2021-10-31T21:40:39.000Z
modules/kubrick/apps/awards/models.py
Lab-Quatro/aposcar
97631f2e3939566cc4e5b81e50c58ce03a5350a4
[ "MIT" ]
null
null
null
from django.db import models class Nominee(models.Model): name = models.TextField() picture_url = models.ImageField(upload_to="nominees/") description = models.TextField(max_length=350) class Meta: verbose_name_plural = "nominees" def __str__(self): return self.name class Categ...
25.657895
70
0.695385
937
0.961026
0
0
0
0
0
0
98
0.100513
42383a1d8efb06b1b9b9ac90bcfd5e6b24b3d414
6,113
py
Python
scholarly_citation_finder/apps/citation/search/PublicationDocumentExtractor.py
citationfinder/scholarly_citation_finder
3e6c340cfebc934a013759e27d8c145171110156
[ "MIT" ]
1
2017-01-23T18:02:42.000Z
2017-01-23T18:02:42.000Z
scholarly_citation_finder/apps/citation/search/PublicationDocumentExtractor.py
citationfinder/scholarly_citation_finder
3e6c340cfebc934a013759e27d8c145171110156
[ "MIT" ]
null
null
null
scholarly_citation_finder/apps/citation/search/PublicationDocumentExtractor.py
citationfinder/scholarly_citation_finder
3e6c340cfebc934a013759e27d8c145171110156
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- import logging from datetime import datetime from scholarly_citation_finder import config from scholarly_citation_finder.apps.parser.Parser import Parser from scholarly_citation_finder.apps.core.models import PublicationUrl from scholarly_citation_finder.tools.extractor.grobid...
45.962406
135
0.657615
5,169
0.845575
0
0
0
0
0
0
2,205
0.360707
423985c9471e18c947bb00b13f5fb82114424fab
2,884
py
Python
webapp/web.py
thunderz99/azure_image_caption
f7d3649051c948c9651b7d3f9df006d84449cc14
[ "MIT" ]
1
2019-04-19T13:22:15.000Z
2019-04-19T13:22:15.000Z
webapp/web.py
thunderz99/azure_image_caption
f7d3649051c948c9651b7d3f9df006d84449cc14
[ "MIT" ]
null
null
null
webapp/web.py
thunderz99/azure_image_caption
f7d3649051c948c9651b7d3f9df006d84449cc14
[ "MIT" ]
null
null
null
import sys import os import json import urllib from PIL import Image from flask import Flask, request, redirect, url_for from flask import send_from_directory, render_template from werkzeug.utils import secure_filename from datetime import datetime from caption_service import CaptionService from translation_service imp...
28
79
0.691054
0
0
0
0
1,749
0.597744
0
0
593
0.202666
423cfa9d306c6cce1a1273c94c45fb8dde9787d8
16,706
py
Python
map2loop/m2l_map_checker.py
Leguark/map2loop
365dde4490f50ad73612120a7d4bee61e54a9a18
[ "MIT" ]
null
null
null
map2loop/m2l_map_checker.py
Leguark/map2loop
365dde4490f50ad73612120a7d4bee61e54a9a18
[ "MIT" ]
null
null
null
map2loop/m2l_map_checker.py
Leguark/map2loop
365dde4490f50ad73612120a7d4bee61e54a9a18
[ "MIT" ]
null
null
null
import geopandas as gpd from shapely.geometry import LineString, Polygon,MultiLineString import os.path from map2loop import m2l_utils import warnings import numpy as np import pandas as pd #explodes polylines and modifies objectid for exploded parts def explode_polylines(indf,c_l,dst_crs): ...
44.079156
160
0.534359
0
0
0
0
0
0
0
0
4,152
0.248533
423dba72ede1b75a23e84d734d1a416227c1565d
2,116
py
Python
DeepBrainSeg/readers/nib.py
JasperHG90/DeepBrainSeg
92cf5f758f115e7ac51202966a1287fb58c09d78
[ "MIT" ]
130
2019-04-09T02:35:44.000Z
2022-02-26T15:53:19.000Z
DeepBrainSeg/readers/nib.py
koriavinash1/DeepMedX
02fcee6d7b21b16e7f1e28089f24be56ef6b9383
[ "MIT" ]
11
2019-09-18T03:55:29.000Z
2021-01-03T13:11:20.000Z
DeepBrainSeg/readers/nib.py
koriavinash1/DeepMedX
02fcee6d7b21b16e7f1e28089f24be56ef6b9383
[ "MIT" ]
38
2018-11-28T01:34:41.000Z
2022-01-17T03:53:47.000Z
#! /usr/bin/env python # -*- coding: utf-8 -*- # # author: Avinash Kori # contact: [email protected] # MIT License # Copyright (c) 2020 Avinash Kori # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in...
30.666667
80
0.676749
796
0.376181
0
0
0
0
0
0
1,449
0.684783
423ee3e6a6459504377643bd233fea0f011a4f80
259
py
Python
tensorflow/intro/main.py
donutloop/machine_learning_examples
46192a57e2dd194925ae76d6bfb169cd2af142dd
[ "MIT" ]
1
2018-10-08T18:24:40.000Z
2018-10-08T18:24:40.000Z
tensorflow/intro/main.py
donutloop/machine_learning_examples
46192a57e2dd194925ae76d6bfb169cd2af142dd
[ "MIT" ]
null
null
null
tensorflow/intro/main.py
donutloop/machine_learning_examples
46192a57e2dd194925ae76d6bfb169cd2af142dd
[ "MIT" ]
1
2018-10-09T06:50:48.000Z
2018-10-09T06:50:48.000Z
import os import tensorflow as tf os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' x1 = tf.constant(5) x2 = tf.constant(6) result = tf.multiply(x1, x2) print(result) sess = tf.Session() with tf.Session() as sess: output = sess.run(result) print(output)
15.235294
40
0.683398
0
0
0
0
0
0
0
0
25
0.096525
423f75233120c5c9e5189a28dbf159544fa15eba
845
py
Python
twitter-bots/auto_liker.py
debasish-dutta/Python-projects
e06710ba47b37d42d83bd1859c46023513ea1c80
[ "MIT" ]
null
null
null
twitter-bots/auto_liker.py
debasish-dutta/Python-projects
e06710ba47b37d42d83bd1859c46023513ea1c80
[ "MIT" ]
null
null
null
twitter-bots/auto_liker.py
debasish-dutta/Python-projects
e06710ba47b37d42d83bd1859c46023513ea1c80
[ "MIT" ]
null
null
null
import auth_key import tweepy import time auth = tweepy.OAuthHandler(auth_key.API_key, auth_key.API_secret_key) auth.set_access_token(auth_key.Access_token, auth_key.Access_token_secret) api = tweepy.API(auth, wait_on_rate_limit=True, wait_on_rate_limit_notify=True) user = api.me() indId = 2282863 india...
24.852941
80
0.647337
0
0
0
0
0
0
0
0
39
0.046154
423f9534e4fce6ed19f5f3059bb0ba6698e76415
745
py
Python
ds_discovery/engines/distributed_mesh/domain_products/controller/src/controller.py
project-hadron/discovery-transition-ds
08229ca3b7617b42ce2dd8e47ff93876c0843810
[ "BSD-3-Clause" ]
2
2020-09-21T17:24:16.000Z
2021-05-28T18:02:54.000Z
ds_discovery/engines/distributed_mesh/domain_products/controller/src/controller.py
project-hadron/discovery-transition-ds
08229ca3b7617b42ce2dd8e47ff93876c0843810
[ "BSD-3-Clause" ]
null
null
null
ds_discovery/engines/distributed_mesh/domain_products/controller/src/controller.py
project-hadron/discovery-transition-ds
08229ca3b7617b42ce2dd8e47ff93876c0843810
[ "BSD-3-Clause" ]
1
2021-07-23T13:52:04.000Z
2021-07-23T13:52:04.000Z
from ds_discovery import Controller import os import warnings warnings.simplefilter(action='ignore', category=FutureWarning) warnings.simplefilter(action='ignore', category=DeprecationWarning) __author__ = 'Darryl Oatridge' def domain_controller(): # Controller uri_pm_repo = os.environ.get('HADRON_PM_REPO',...
32.391304
100
0.777181
0
0
0
0
0
0
0
0
149
0.2
423fee1037a4130b27a1927c09025e289e851a6f
1,491
py
Python
utils_test.py
lostsquirrel/words
aaa4bb2b3a9c8c7c7300e29ec73f39cff4409b8d
[ "MIT" ]
null
null
null
utils_test.py
lostsquirrel/words
aaa4bb2b3a9c8c7c7300e29ec73f39cff4409b8d
[ "MIT" ]
null
null
null
utils_test.py
lostsquirrel/words
aaa4bb2b3a9c8c7c7300e29ec73f39cff4409b8d
[ "MIT" ]
null
null
null
import json import unittest from utils import CustomEncoder, Paging, ValidationError, generate_uuid, Validator class UtilsTest(unittest.TestCase): def test_uuid(self): print(generate_uuid()) self.assertEqual(len(generate_uuid()), 32) def test_valiate(self): form = dict( ...
26.625
82
0.564051
1,368
0.917505
0
0
0
0
0
0
34
0.022803
424044b56baa6c4ca720ef729a7deb71c15b2301
1,342
py
Python
src/pyclean/cli.py
uranusjr/pyclean-py
ba3f4674d02fde396391e0f16906bd2b9cf7cd2d
[ "ISC" ]
null
null
null
src/pyclean/cli.py
uranusjr/pyclean-py
ba3f4674d02fde396391e0f16906bd2b9cf7cd2d
[ "ISC" ]
null
null
null
src/pyclean/cli.py
uranusjr/pyclean-py
ba3f4674d02fde396391e0f16906bd2b9cf7cd2d
[ "ISC" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import argparse import logging import os import sys from . import entries, meta logger = logging.getLogger(__name__) def build_parser(): prog = os.path.basename(sys.argv[0]) if prog not in ("pyclean", "pyclean.py"): prog = "pyclean" parser = argpar...
21.301587
68
0.632638
0
0
0
0
0
0
0
0
278
0.207154
4240a3a135f3d439bdb928b669c203c2c5a8b79b
6,890
py
Python
app.py
ZhongxuanWang/simple_web_remainder-python
e61f9cf05d464fa55ae628fe415ea164f7574cde
[ "MIT" ]
null
null
null
app.py
ZhongxuanWang/simple_web_remainder-python
e61f9cf05d464fa55ae628fe415ea164f7574cde
[ "MIT" ]
null
null
null
app.py
ZhongxuanWang/simple_web_remainder-python
e61f9cf05d464fa55ae628fe415ea164f7574cde
[ "MIT" ]
null
null
null
from flask import Flask, render_template, url_for, redirect, request from flask_sqlalchemy import SQLAlchemy from datetime import datetime from dateutil.relativedelta import relativedelta from demail import demail __author__ = 'Zhongxuan Wang' __doc__ = 'Never Forget online remainder' app = Flask(__name__) app.config...
31.318182
118
0.633962
1,471
0.213498
0
0
2,524
0.366328
0
0
2,349
0.340929
424371e9002a0d30915e7782779c23b77cf1168c
522
py
Python
homeassistant/components/solaredge/__init__.py
DavidDeSloovere/core
909a20b36d4df6724c955c2ae28cb82fe6d50c2e
[ "Apache-2.0" ]
4
2020-08-10T20:02:24.000Z
2022-01-31T02:14:22.000Z
homeassistant/components/solaredge/__init__.py
DavidDeSloovere/core
909a20b36d4df6724c955c2ae28cb82fe6d50c2e
[ "Apache-2.0" ]
78
2020-07-23T07:13:08.000Z
2022-03-31T06:02:04.000Z
homeassistant/components/solaredge/__init__.py
DavidDeSloovere/core
909a20b36d4df6724c955c2ae28cb82fe6d50c2e
[ "Apache-2.0" ]
3
2022-01-17T20:10:54.000Z
2022-01-17T20:17:22.000Z
"""The solaredge integration.""" from __future__ import annotations from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant import homeassistant.helpers.config_validation as cv from .const import DOMAIN CONFIG_SCHEMA = cv.deprecated(DOMAIN) async def async_setup_entry(hass...
27.473684
77
0.781609
0
0
0
0
0
0
233
0.44636
70
0.1341
4243ae92dc1a6dc43f40406353ff665ec5905d97
3,241
py
Python
main.py
eteq/door_beeper
56c3ddcd9b24c66870aefa4dda0f3df3960049b1
[ "Apache-2.0" ]
null
null
null
main.py
eteq/door_beeper
56c3ddcd9b24c66870aefa4dda0f3df3960049b1
[ "Apache-2.0" ]
null
null
null
main.py
eteq/door_beeper
56c3ddcd9b24c66870aefa4dda0f3df3960049b1
[ "Apache-2.0" ]
null
null
null
import uos import utime import machine from machine import Pin, PWM import utils default_config = dict( sleep_time_ms = 250, freezer_delay_ms = 1000, fridge_delay_ms = 1000, write_battery_voltage = True, piezo_plus_pin_num = 12, piezo_min_pin_num = 33, freezer_switch_pin_num ...
34.849462
100
0.622339
0
0
0
0
0
0
0
0
481
0.148411
42440ed0ff98d8396cf65df66d98259bed94142f
6,034
py
Python
modules/backend.py
Uncle-Yuanl/model_zoo
455a2fd4ac5562a922f29e68de2f4e1fb2d3d2d8
[ "Apache-2.0" ]
null
null
null
modules/backend.py
Uncle-Yuanl/model_zoo
455a2fd4ac5562a922f29e68de2f4e1fb2d3d2d8
[ "Apache-2.0" ]
null
null
null
modules/backend.py
Uncle-Yuanl/model_zoo
455a2fd4ac5562a922f29e68de2f4e1fb2d3d2d8
[ "Apache-2.0" ]
null
null
null
import os, sys from distutils.util import strtobool import numpy as np import tensorflow as tf import tensorflow.keras.backend as K from tensorflow.python.util import nest, tf_inspect from tensorflow.python.eager import tape # from tensorflow.python.ops.custom_gradient import graph_mode_decorator # 是否使用重计...
27.678899
75
0.542592
0
0
0
0
0
0
0
0
2,511
0.382891
42441c80231ccaad24f01bdd333bcd71d34fa2e7
2,957
py
Python
apod_daily.py
gultugaydemir/apod_daily
994ccebdf2646c1a700110d891ea73261773bea2
[ "CC0-1.0" ]
null
null
null
apod_daily.py
gultugaydemir/apod_daily
994ccebdf2646c1a700110d891ea73261773bea2
[ "CC0-1.0" ]
null
null
null
apod_daily.py
gultugaydemir/apod_daily
994ccebdf2646c1a700110d891ea73261773bea2
[ "CC0-1.0" ]
null
null
null
import datetime import os import requests import tweepy from PIL import Image # Get your own keys from developer.twitter.com # You can find a detailed tutorial about authenticating accounts from github.com/gultugaydemir/Twitter_OAuth1.0a consumer_key = '' consumer_secret = '' access_token = '' access_token_secret = '...
40.506849
147
0.683801
0
0
0
0
0
0
0
0
1,408
0.476158
424460c099ec096eec540d08794ad2f9da57997e
6,414
py
Python
datasets/dad.py
LivingSkyTechnologies/Document_Layout_Segmentation
0db00a18fb39afa1efa8ae183bbd57309a6ebfcf
[ "MIT" ]
4
2021-01-28T23:06:43.000Z
2022-01-15T19:17:07.000Z
datasets/dad.py
LivingSkyTechnologies/Document_Layout_Segmentation
0db00a18fb39afa1efa8ae183bbd57309a6ebfcf
[ "MIT" ]
2
2021-01-25T21:54:05.000Z
2021-08-23T21:19:21.000Z
datasets/dad.py
LivingSkyTechnologies/Document_Layout_Segmentation
0db00a18fb39afa1efa8ae183bbd57309a6ebfcf
[ "MIT" ]
2
2021-01-28T13:39:33.000Z
2022-01-15T19:17:13.000Z
import pickle import os import tensorflow as tf from glob import glob import utils.DataLoaderUtils as dlu from utils.AnnotationUtils import write_dad_masks # Static Dataset Config Options TAG_NAMES = {'highlights', 'urls_to_supplementary', 'abbreviation', 'abstract', ...
42.76
140
0.588868
0
0
0
0
0
0
0
0
1,481
0.230901
4248c96a6cf8583046ad1cd239d37aa7ac5e5d96
740
py
Python
terrascript/resource/ddelnano/mikrotik.py
mjuenema/python-terrascript
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
[ "BSD-2-Clause" ]
507
2017-07-26T02:58:38.000Z
2022-01-21T12:35:13.000Z
terrascript/resource/ddelnano/mikrotik.py
mjuenema/python-terrascript
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
[ "BSD-2-Clause" ]
135
2017-07-20T12:01:59.000Z
2021-10-04T22:25:40.000Z
terrascript/resource/ddelnano/mikrotik.py
mjuenema/python-terrascript
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
[ "BSD-2-Clause" ]
81
2018-02-20T17:55:28.000Z
2022-01-31T07:08:40.000Z
# terrascript/resource/ddelnano/mikrotik.py # Automatically generated by tools/makecode.py (24-Sep-2021 15:21:43 UTC) import terrascript class mikrotik_bgp_instance(terrascript.Resource): pass class mikrotik_bgp_peer(terrascript.Resource): pass class mikrotik_dhcp_lease(terrascript.Resource): pass c...
17.209302
73
0.754054
388
0.524324
0
0
0
0
0
0
252
0.340541
424a2a5c3d067c0a48cf8560895baac37e4bf0ea
812
py
Python
test/threaddd.py
liaohongdong/IPProxy
90152f02708717c661b7c1532e4a131a55103950
[ "MIT" ]
null
null
null
test/threaddd.py
liaohongdong/IPProxy
90152f02708717c661b7c1532e4a131a55103950
[ "MIT" ]
1
2021-03-31T19:17:41.000Z
2021-03-31T19:17:41.000Z
test/threaddd.py
liaohongdong/IPProxy
90152f02708717c661b7c1532e4a131a55103950
[ "MIT" ]
null
null
null
import time import queue import threading def aaa(i): while True: item = q.get() if item is None: print("线程%s发现了一个None,可以休息了^-^" % i) break time.sleep(0.01) print('aaaaa -> ' + str(i) + " ---> " + str(item)) q.task_done() if __name__ == '__main__':...
20.820513
58
0.507389
0
0
0
0
0
0
0
0
187
0.217442
424a464b22116de9e6ed995f96ff3b93bc5bdfe1
665
py
Python
Codes/Liam/203_remove_linked_list_elements.py
liuxiaohui1221/algorithm
d80e64185ceb4798ac5389bfbd226dc1d406f6b5
[ "Apache-2.0" ]
256
2017-10-25T13:02:15.000Z
2022-02-25T13:47:59.000Z
Codes/Liam/203_remove_linked_list_elements.py
liuxiaohui1221/algorithm
d80e64185ceb4798ac5389bfbd226dc1d406f6b5
[ "Apache-2.0" ]
56
2017-10-27T01:34:20.000Z
2022-03-01T00:20:55.000Z
Codes/Liam/203_remove_linked_list_elements.py
liuxiaohui1221/algorithm
d80e64185ceb4798ac5389bfbd226dc1d406f6b5
[ "Apache-2.0" ]
83
2017-10-25T12:51:53.000Z
2022-02-15T08:27:03.000Z
# 执行用时 : 68 ms # 内存消耗 : 16.6 MB # 方案:哨兵结点 sentinel,插入在head结点之前 # Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # self.next = None class Solution: def removeElements(self, head: ListNode, val: int) -> ListNode: # 哨兵结点 sentinel,插入在head结点之前...
22.166667
67
0.538346
517
0.675817
0
0
0
0
0
0
346
0.452288
424d5b248c6b3fcd0ec5e3855e8a59d969b36415
1,296
py
Python
bailleurs/migrations/0001_initial.py
MTES-MCT/appel
3b840ccea600ef31cfea57721fe5e6edbdbc2c79
[ "MIT" ]
null
null
null
bailleurs/migrations/0001_initial.py
MTES-MCT/appel
3b840ccea600ef31cfea57721fe5e6edbdbc2c79
[ "MIT" ]
2
2021-12-15T05:10:43.000Z
2021-12-15T05:11:00.000Z
bailleurs/migrations/0001_initial.py
MTES-MCT/appel
3b840ccea600ef31cfea57721fe5e6edbdbc2c79
[ "MIT" ]
1
2021-12-28T13:06:06.000Z
2021-12-28T13:06:06.000Z
# Generated by Django 3.2.5 on 2021-07-06 14:18 import uuid from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [] operations = [ migrations.CreateModel( name="Bailleur", fields=[ ("id", models.Au...
35.027027
80
0.548611
1,193
0.919106
0
0
0
0
0
0
265
0.20416