hexsha
stringlengths
40
40
size
int64
6
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
130
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
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
4
247
max_issues_repo_name
stringlengths
4
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
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
4
247
max_forks_repo_name
stringlengths
4
130
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
1
1.04M
avg_line_length
float64
1.53
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
6
1.04M
filtered:remove_non_ascii
int64
0
538k
filtered:remove_decorators
int64
0
917k
filtered:remove_async
int64
0
722k
filtered:remove_classes
int64
-45
1M
filtered:remove_generators
int64
0
814k
filtered:remove_function_no_docstring
int64
-102
850k
filtered:remove_class_no_docstring
int64
-3
5.46k
filtered:remove_unused_imports
int64
-1,350
52.4k
filtered:remove_delete_markers
int64
0
59.6k
74fd755885dd74c844dbf3e449d6205415bbf166
3,143
py
Python
trollius_redis/cursors.py
benjolitz/trollius-redis
d2ece744df3c247a47ee51e14f7129f95ef85a4f
[ "BSD-2-Clause" ]
4
2015-06-10T13:11:46.000Z
2016-03-15T16:56:34.000Z
trollius_redis/cursors.py
benjolitz/trollius-redis
d2ece744df3c247a47ee51e14f7129f95ef85a4f
[ "BSD-2-Clause" ]
1
2015-06-10T12:50:44.000Z
2015-06-10T20:16:27.000Z
trollius_redis/cursors.py
benjolitz/trollius-redis
d2ece744df3c247a47ee51e14f7129f95ef85a4f
[ "BSD-2-Clause" ]
2
2017-06-12T09:13:26.000Z
2018-03-05T01:07:55.000Z
__all__ = ( 'Cursor', 'DictCursor', 'SetCursor', 'ZCursor', )
25.552846
69
0.573974
import trollius as asyncio from trollius import From, Return from collections import deque __all__ = ( 'Cursor', 'DictCursor', 'SetCursor', 'ZCursor', ) class Cursor(object): """ Cursor for walking through the results of a :func:`scan <trollius_redis.RedisProtocol.scan>` query. """ ...
0
1,761
0
1,116
0
0
0
25
158
660a606baa96bc1b9a1117bc1449e1c8f26622d1
2,659
py
Python
python/gkit/_player.py
qcuong98/KT-AI-Hackathon
f63f318a88ca856017ebb7bc1186b29c54a9c0ec
[ "MIT" ]
29
2018-08-06T15:03:45.000Z
2022-03-23T05:45:28.000Z
python/gkit/_player.py
qcuong98/KT-AI-Hackathon
f63f318a88ca856017ebb7bc1186b29c54a9c0ec
[ "MIT" ]
9
2018-06-28T00:08:16.000Z
2021-06-18T04:19:40.000Z
python/gkit/_player.py
qcuong98/KT-AI-Hackathon
f63f318a88ca856017ebb7bc1186b29c54a9c0ec
[ "MIT" ]
26
2018-08-22T06:48:16.000Z
2021-11-25T07:18:49.000Z
import logging logger = logging.getLogger('player') def sample_width_to_string(sample_width): """Convert sample width (bytes) to ALSA format string.""" return {1: 's8', 2: 's16', 4: 's32'}.get(sample_width, None) if __name__ == '__main__': player = WavePlayer() #player.play_wav("sample_sound.wav")...
30.563218
74
0.604739
import logging import subprocess import wave logger = logging.getLogger('player') def sample_width_to_string(sample_width): """Convert sample width (bytes) to ALSA format string.""" return {1: 's8', 2: 's16', 4: 's32'}.get(sample_width, None) class WavePlayer(object): """Plays short audio clips from a bu...
0
0
0
2,218
0
0
0
-14
67
d3e55fb7d1146afce7b66dd86589c764374f1590
713
py
Python
py/py_0533_minimum_values_of_the_carmichael_function.py
lcsm29/project-euler
fab794ece5aa7a11fc7c2177f26250f40a5b1447
[ "MIT" ]
null
null
null
py/py_0533_minimum_values_of_the_carmichael_function.py
lcsm29/project-euler
fab794ece5aa7a11fc7c2177f26250f40a5b1447
[ "MIT" ]
null
null
null
py/py_0533_minimum_values_of_the_carmichael_function.py
lcsm29/project-euler
fab794ece5aa7a11fc7c2177f26250f40a5b1447
[ "MIT" ]
null
null
null
# Solution of; # Project Euler Problem 533: Minimum values of the Carmichael function # https://projecteuler.net/problem=533 # # The Carmichael function (n) is defined as the smallest positive integer m # such that am = 1 modulo n for all integers a coprime with n. For example # (8) = 2 and (240) = 4. Define L(n) as...
29.708333
79
0.678822
# Solution of; # Project Euler Problem 533: Minimum values of the Carmichael function # https://projecteuler.net/problem=533 # # The Carmichael function λ(n) is defined as the smallest positive integer m # such that am = 1 modulo n for all integers a coprime with n. For example # λ(8) = 2 and λ(240) = 4. Define L(n)...
14
0
0
0
0
1
0
0
23
0b48972de5daecb008d76a1058f7a1477f9deb3c
1,795
py
Python
radicals.py
billboyles/python-math
7da0ef6b047236661132cacf84dd7f486ce46166
[ "MIT" ]
null
null
null
radicals.py
billboyles/python-math
7da0ef6b047236661132cacf84dd7f486ce46166
[ "MIT" ]
null
null
null
radicals.py
billboyles/python-math
7da0ef6b047236661132cacf84dd7f486ce46166
[ "MIT" ]
null
null
null
#required modules if __name__ == "__main__": main()
19.095745
56
0.631198
#required modules import math, factors from functools import reduce from collections import Counter def simplify(n): #housekeeping is_neg = False remove = "" #handle non-ints try: n = int(n) except: return "Please enter an integer" #handle large numbers if n > 1000000000000: ...
0
0
0
0
0
1,598
0
16
119
b513bb692627562419d2f09979ccb5e2871b92b7
448
py
Python
pruebas.py
larj3852/Lidar_TT
ddc6b72adcdda5688d1ca165177667c8390f763a
[ "Unlicense" ]
null
null
null
pruebas.py
larj3852/Lidar_TT
ddc6b72adcdda5688d1ca165177667c8390f763a
[ "Unlicense" ]
null
null
null
pruebas.py
larj3852/Lidar_TT
ddc6b72adcdda5688d1ca165177667c8390f763a
[ "Unlicense" ]
null
null
null
""" Este archivo nada mas es para hacer pruebas uniarias joven """ import LibraryTT.Lidar3D as Lidar from time import sleep from numpy import shape scan = Lidar.Scaner3D() a = scan.Scanear(Angulo_Init=50,Angulo_Fin=150,paso=5,plotear=True) print(shape(a)) sleep(2) # a = scan.Scanear(Angulo_Init=130,Angulo_Fin=30,paso=-...
28
70
0.754464
""" Este archivo nada mas es para hacer pruebas uniarias joven """ import LibraryTT.Lidar3D as Lidar from time import sleep from numpy import shape scan = Lidar.Scaner3D() a = scan.Scanear(Angulo_Init=50,Angulo_Fin=150,paso=5,plotear=True) print(shape(a)) sleep(2) # a = scan.Scanear(Angulo_Init=130,Angulo_Fin=30,paso=-...
0
0
0
0
0
0
0
0
0
0c016e0b46327f82f915b256d96e5669250eb407
489
py
Python
examples/plot_second_y_axis.py
ruhugu/brokenaxes
1cfb301c854b3336aeb4dd9a2c329310534dfb21
[ "MIT" ]
362
2017-05-01T10:20:56.000Z
2022-03-29T21:39:09.000Z
examples/plot_second_y_axis.py
ruhugu/brokenaxes
1cfb301c854b3336aeb4dd9a2c329310534dfb21
[ "MIT" ]
73
2017-04-20T18:54:39.000Z
2021-12-02T08:04:21.000Z
examples/plot_second_y_axis.py
ruhugu/brokenaxes
1cfb301c854b3336aeb4dd9a2c329310534dfb21
[ "MIT" ]
52
2017-05-04T13:03:25.000Z
2022-03-29T21:39:20.000Z
""" Second Y Axis ============= You can use the following technique to give your brokenaxes plot a second axis on the right. Analogous code works for creating a secondary x axis. """ from brokenaxes import brokenaxes functions = (lambda x: x*0.453592, lambda x: x/0.453592) bax = brokenaxes( xlims=((1, 3), (9,...
18.807692
92
0.664622
""" Second Y Axis ============= You can use the following technique to give your brokenaxes plot a second axis on the right. Analogous code works for creating a secondary x axis. """ from brokenaxes import brokenaxes functions = (lambda x: x*0.453592, lambda x: x/0.453592) bax = brokenaxes( xlims=((1, 3), (9,...
0
0
0
0
0
0
0
0
0
6061e8f015d1ae6158cf654dac1aa97d71c3e7a8
2,598
py
Python
tests/system/test_error_details.py
tmc/gapic-generator-python
cafcbfb127eac021ab63ad98c51954a4ad8f1b7e
[ "Apache-2.0" ]
86
2018-09-28T11:46:15.000Z
2022-03-27T19:25:09.000Z
tests/system/test_error_details.py
tmc/gapic-generator-python
cafcbfb127eac021ab63ad98c51954a4ad8f1b7e
[ "Apache-2.0" ]
1,054
2018-04-19T18:35:05.000Z
2022-03-30T14:12:38.000Z
tests/system/test_error_details.py
tmc/gapic-generator-python
cafcbfb127eac021ab63ad98c51954a4ad8f1b7e
[ "Apache-2.0" ]
47
2018-04-26T22:08:56.000Z
2022-03-22T22:18:00.000Z
# Copyright 2021 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
32.886076
74
0.718245
# Copyright 2021 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
0
0
0
0
0
1,733
0
61
225
c4bc6b5d899c448529a93109f0a0375d524c78f2
128
py
Python
pavdhutils/errors.py
vierth/pavut
0c9c5032e80c7a7184fea72d9a4f4e46fb47c83d
[ "Apache-2.0" ]
null
null
null
pavdhutils/errors.py
vierth/pavut
0c9c5032e80c7a7184fea72d9a4f4e46fb47c83d
[ "Apache-2.0" ]
null
null
null
pavdhutils/errors.py
vierth/pavut
0c9c5032e80c7a7184fea72d9a4f4e46fb47c83d
[ "Apache-2.0" ]
null
null
null
"""All custom exceptions are defined here"""
21.333333
44
0.695313
"""All custom exceptions are defined here""" class CustomException(Exception): """General purpose exception""" pass
0
0
0
57
0
0
0
0
23
748b5a51df5365b033f6b5ba7efc3af21762f2be
12,738
py
Python
catkin_ws/devel/lib/python2.7/dist-packages/main/msg/_GeneralSystemStateMsg.py
JMur2/MarquetteRMC2021
3f139b3278927e82c988306b4b75449f0f111027
[ "Apache-2.0" ]
1
2022-02-25T22:14:27.000Z
2022-02-25T22:14:27.000Z
catkin_ws/devel/lib/python2.7/dist-packages/main/msg/_GeneralSystemStateMsg.py
JMur2/MarquetteRMC2021
3f139b3278927e82c988306b4b75449f0f111027
[ "Apache-2.0" ]
null
null
null
catkin_ws/devel/lib/python2.7/dist-packages/main/msg/_GeneralSystemStateMsg.py
JMur2/MarquetteRMC2021
3f139b3278927e82c988306b4b75449f0f111027
[ "Apache-2.0" ]
null
null
null
# This Python file uses the following encoding: utf-8 """autogenerated by genpy from main/GeneralSystemStateMsg.msg. Do not edit.""" import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy _struct_I = genpy.struct_I _struct_6B = None
45.655914
407
0.723347
# This Python file uses the following encoding: utf-8 """autogenerated by genpy from main/GeneralSystemStateMsg.msg. Do not edit.""" import codecs import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct class GeneralSystemStateMsg(genpy.Message): _md5sum = "fda37ee099981af2c44...
0
0
0
12,228
0
154
0
-16
111
39e50d979e215cad24dd872b17861aaa591f4cba
206
py
Python
moai/monads/generation/grid/__init__.py
tzole1155/moai
d1afb3aaf8ddcd7a1c98b84d6365afb846ae3180
[ "Apache-2.0" ]
10
2021-04-02T11:21:33.000Z
2022-01-18T18:32:32.000Z
moai/monads/generation/grid/__init__.py
tzole1155/moai
d1afb3aaf8ddcd7a1c98b84d6365afb846ae3180
[ "Apache-2.0" ]
1
2022-03-22T20:10:55.000Z
2022-03-24T13:11:02.000Z
moai/monads/generation/grid/__init__.py
tzole1155/moai
d1afb3aaf8ddcd7a1c98b84d6365afb846ae3180
[ "Apache-2.0" ]
3
2021-05-16T20:47:40.000Z
2021-12-01T21:15:36.000Z
from moai.monads.generation.grid.spatial import (Grid, MultiScaleGrid) from moai.monads.generation.grid.spherical import Spherical __all__ = [ "Grid", "MultiScaleGrid", "Spherical", ]
18.727273
59
0.703883
from moai.monads.generation.grid.spatial import ( Grid, MultiScaleGrid ) from moai.monads.generation.grid.spherical import Spherical __all__ = [ "Grid", "MultiScaleGrid", "Spherical", ]
0
0
0
0
0
0
0
10
0
7fbf9c869d1ee7f82f8d88ad0222f2ec62edbbfe
1,026
py
Python
insights_amqp/util.py
RedHatInsights/insights-amqp
f64873cf72e6e3540051ba678ed391b01ef4653b
[ "Apache-2.0" ]
null
null
null
insights_amqp/util.py
RedHatInsights/insights-amqp
f64873cf72e6e3540051ba678ed391b01ef4653b
[ "Apache-2.0" ]
1
2018-03-28T12:00:09.000Z
2018-03-28T12:00:09.000Z
insights_amqp/util.py
RedHatInsights/insights-amqp
f64873cf72e6e3540051ba678ed391b01ef4653b
[ "Apache-2.0" ]
null
null
null
import threading thread_context = threading.local()
28.5
83
0.70078
import os import sys import logging import traceback import json from logstash_formatter import LogstashFormatterV1 import threading thread_context = threading.local() class OurFormatter(LogstashFormatterV1): def format(self, record): if hasattr(thread_context, "request_id"): setattr(record,...
0
0
0
415
0
394
0
-16
178
e0e5844edb0811b20d6baef402b4c01c8d48f4cc
232
py
Python
apps/notes/urls.py
damianmigo/django-universe
463fcee58d5d510c92643092f5ac19098d0c09bb
[ "Unlicense", "MIT" ]
null
null
null
apps/notes/urls.py
damianmigo/django-universe
463fcee58d5d510c92643092f5ac19098d0c09bb
[ "Unlicense", "MIT" ]
null
null
null
apps/notes/urls.py
damianmigo/django-universe
463fcee58d5d510c92643092f5ac19098d0c09bb
[ "Unlicense", "MIT" ]
null
null
null
from django.conf.urls import url from .views import NoteList, NoteDetailView urlpatterns = [ url(r'^$', NoteList.as_view(), name='index'), url(r'^note/[-\w]+/(?P<slug>[-\w]+)$', NoteDetailView.as_view(), name="detail"), ]
25.777778
84
0.642241
from django.conf.urls import url from .views import NoteList, NoteDetailView urlpatterns = [ url(r'^$', NoteList.as_view(), name='index'), url(r'^note/[-\w]+/(?P<slug>[-\w]+)$', NoteDetailView.as_view(), name="detail"), ]
0
0
0
0
0
0
0
0
0
d32cb523030bbc6ca1d69091ec82006e954b12d7
4,474
py
Python
runners_info.py
mormichaeli/gitlab-python-data-collector
03dd7cff4d7b2cbf024463b30a1e20ffdc9c135c
[ "MIT" ]
null
null
null
runners_info.py
mormichaeli/gitlab-python-data-collector
03dd7cff4d7b2cbf024463b30a1e20ffdc9c135c
[ "MIT" ]
null
null
null
runners_info.py
mormichaeli/gitlab-python-data-collector
03dd7cff4d7b2cbf024463b30a1e20ffdc9c135c
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import gitlab from datetime import datetime import pandas as pd from psycopg2 import connect from sqlalchemy import create_engine #---------------------------------------------------------------- # use python version 3.8.9 to support gitlab python module #-----------------------------------------...
44.29703
280
0.730219
#!/usr/bin/env python3 import sys from typing import Counter import gitlab from datetime import datetime, timedelta import pandas as pd from psycopg2 import connect from sqlalchemy import create_engine #---------------------------------------------------------------- # use python version 3.8.9 to support gitlab python ...
0
0
0
0
0
1,285
0
5
89
d4b136809b5300a068892de4aed19e295fe22add
591
py
Python
setup.py
mattcaldwell/django-dirtyfields
18bf11e78612e2eebc1d9ca4b8541b07dd494026
[ "BSD-3-Clause" ]
1
2015-11-05T18:03:23.000Z
2015-11-05T18:03:23.000Z
setup.py
mattcaldwell/django-dirtyfields
18bf11e78612e2eebc1d9ca4b8541b07dd494026
[ "BSD-3-Clause" ]
null
null
null
setup.py
mattcaldwell/django-dirtyfields
18bf11e78612e2eebc1d9ca4b8541b07dd494026
[ "BSD-3-Clause" ]
null
null
null
from setuptools import setup, find_packages setup( name="caldwell-dirtyfields", version=__import__('dirtyfields').get_version().replace(' ', '-'), url='http://github.com/smn/django-dirtyfields', license='BSD', description="Tracking dirty fields on a Django model instance", long_description=op...
29.55
70
0.692047
from setuptools import setup, find_packages def listify(filename): return filter(None, open(filename, 'r').read().split('\n')) setup( name="caldwell-dirtyfields", version=__import__('dirtyfields').get_version().replace(' ', '-'), url='http://github.com/smn/django-dirtyfields', license='BSD', ...
0
0
0
0
0
65
0
0
23
ccb308de37073317086158cad5b82e2739442e58
626
py
Python
142.py
gdmanandamohon/leetcode
a691a4e37ee1fdad69c710e3710c5faf8b0a7d76
[ "MIT" ]
null
null
null
142.py
gdmanandamohon/leetcode
a691a4e37ee1fdad69c710e3710c5faf8b0a7d76
[ "MIT" ]
null
null
null
142.py
gdmanandamohon/leetcode
a691a4e37ee1fdad69c710e3710c5faf8b0a7d76
[ "MIT" ]
null
null
null
''' @author: l4zyc0d3r People who are happy makes other happy. I am gonna finish it slowly but definitely.cdt ''' # Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # self.next = None
26.083333
86
0.514377
''' @author: l4zyc0d3r People who are happy makes other happy. I am gonna finish it slowly but definitely.cdt ''' # Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # self.next = None class Solution: def detectCycle(self, head: ListNode) -> ListNode:...
0
0
0
354
0
0
0
0
23
612f9131265e6f0e5b041e0705d9660a9d8fab32
7,899
py
Python
swyft/utils/plot.py
adam-coogan/swyft
c54bdd9f77ddf02fda857e26640df012cbe545fc
[ "MIT" ]
null
null
null
swyft/utils/plot.py
adam-coogan/swyft
c54bdd9f77ddf02fda857e26640df012cbe545fc
[ "MIT" ]
null
null
null
swyft/utils/plot.py
adam-coogan/swyft
c54bdd9f77ddf02fda857e26640df012cbe545fc
[ "MIT" ]
null
null
null
if __name__ == "__main__": pass
29.147601
86
0.529434
import numpy as np import pandas as pd import pylab as plt import seaborn as sns from swyft.utils.mutils import filter_marginals_by_dim from swyft.utils.utils import grid_interpolate_samples def split_corner_axes(axes): diag = np.diag(axes) lower = axes[np.tril(axes, -1).nonzero()] upper = axes[np.triu(a...
0
0
0
0
0
7,477
0
59
317
496c1d664b0f8e8394f001bba256e688fdeefe81
708
py
Python
hello_v2.py
merbok/RaspberryPi-FullStack
f0daa96a613614db81841bbfdf9802b6a4f4ece6
[ "MIT" ]
72
2015-10-08T14:29:36.000Z
2022-02-13T03:52:02.000Z
hello_v2.py
merbok/RaspberryPi-FullStack
f0daa96a613614db81841bbfdf9802b6a4f4ece6
[ "MIT" ]
4
2017-06-21T00:42:54.000Z
2019-02-07T09:17:01.000Z
hello_v2.py
merbok/RaspberryPi-FullStack
f0daa96a613614db81841bbfdf9802b6a4f4ece6
[ "MIT" ]
73
2015-10-01T04:32:31.000Z
2021-11-04T08:45:48.000Z
''' FILE NAME hello_v2.py 1. WHAT IT DOES Serves a web page by applying a template to the user's web browser. 2. REQUIRES * Any Raspberry Pi 3. ORIGINAL WORK Raspberry Full stack 2015, Peter Dalmaris 4. HARDWARE None 5. SOFTWARE Command line terminal Simple text editor Libraries: from flask import Flask from fl...
13.111111
67
0.714689
''' FILE NAME hello_v2.py 1. WHAT IT DOES Serves a web page by applying a template to the user's web browser. 2. REQUIRES * Any Raspberry Pi 3. ORIGINAL WORK Raspberry Full stack 2015, Peter Dalmaris 4. HARDWARE None 5. SOFTWARE Command line terminal Simple text editor Libraries: from flask import Flask from fl...
0
72
0
0
0
0
0
12
44
93b366ff1ac85bf8282a09b980358150480e106c
492
py
Python
extract_accent_and_phoneme.py
y-chan/amitaro-ita-corpus
16b3a4473c9c4bf68d1eb30b980ccb1828668e40
[ "Unlicense" ]
null
null
null
extract_accent_and_phoneme.py
y-chan/amitaro-ita-corpus
16b3a4473c9c4bf68d1eb30b980ccb1828668e40
[ "Unlicense" ]
null
null
null
extract_accent_and_phoneme.py
y-chan/amitaro-ita-corpus
16b3a4473c9c4bf68d1eb30b980ccb1828668e40
[ "Unlicense" ]
null
null
null
with open("accent_and_phoneme.csv") as f: labels = f.read().split("\n") phonemes = [] accents = [] is_accent = False for label in labels: if is_accent: label = label.replace(", ", ",").replace(" ", " ").replace(" ", " ") accents.append(label) else: phonemes.append(label) is...
22.363636
79
0.581301
with open("accent_and_phoneme.csv") as f: labels = f.read().split("\n") phonemes = [] accents = [] is_accent = False for label in labels: if is_accent: label = label.replace(", ", ",").replace(" ", " ").replace(" ", " ") accents.append(label) else: phonemes.append(label) is...
0
0
0
0
0
0
0
0
0
14110a2cd5ed7dad8c6e72d401d1196ad44719d3
15,224
py
Python
legacy/main_runtime.py
Percept-Health-Solve/seir-model
51c299c744f6a2b985e98039130854aaeb7ca213
[ "MIT" ]
3
2020-05-10T18:25:57.000Z
2020-07-08T15:52:32.000Z
legacy/main_runtime.py
Percept-Health-Solve/seir-model
51c299c744f6a2b985e98039130854aaeb7ca213
[ "MIT" ]
23
2020-05-10T19:17:46.000Z
2020-10-26T10:09:20.000Z
legacy/main_runtime.py
Percept-Health-Solve/seir-model
51c299c744f6a2b985e98039130854aaeb7ca213
[ "MIT" ]
5
2020-05-08T16:51:51.000Z
2020-08-19T06:52:13.000Z
import numpy as np import pandas as pd import time from seir.wrapper import MultiPopWrapper # read calibration data actual_hospitalisations = pd.read_excel('data/calibration.xlsx', sheet_name='Hospitalisations') actual_hospitalisations['Date'] = [pd.to_datetime(x, ).date() for x in actual_hospitalisations['Date']] ...
63.966387
230
0.538623
import numpy as np import pandas as pd import matplotlib.pyplot as plt import time import datetime from seir.wrapper import MultiPopWrapper from seir.utils import plot_solution # read calibration data actual_hospitalisations = pd.read_excel('data/calibration.xlsx', sheet_name='Hospitalisations') actual_hospitalisa...
0
0
0
0
0
0
0
19
67
2a63a437be4b3515c5e5c3165df15e104f5ac8f7
32,725
py
Python
src/oasis/views_cadmin.py
jamesdoherty/oasisqe
d44fe11cff46b8a29fc1325c586e3ac14f06958e
[ "Apache-2.0" ]
null
null
null
src/oasis/views_cadmin.py
jamesdoherty/oasisqe
d44fe11cff46b8a29fc1325c586e3ac14f06958e
[ "Apache-2.0" ]
null
null
null
src/oasis/views_cadmin.py
jamesdoherty/oasisqe
d44fe11cff46b8a29fc1325c586e3ac14f06958e
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # This code is under the GNU Affero General Public License # http://www.gnu.org/licenses/agpl-3.0.html """ Course admin related pages """ import os # ask Google about: AttributeError: _strptime MYPATH = os.path.dirname(__file__)
32.692308
133
0.623866
# -*- coding: utf-8 -*- # This code is under the GNU Affero General Public License # http://www.gnu.org/licenses/agpl-3.0.html """ Course admin related pages """ import os from datetime import datetime import _strptime # import should prevent thread import blocking issues # ask Google about: A...
0
31,103
0
0
0
0
0
341
970
7cd41f7f10458c177df43f2f2f0a27b4b6db42f3
610
py
Python
src/core/utils/boolean.py
cyberstruggle/chalumeau
a912c0c1390f4b5b6cce061febeeb96303642b74
[ "Apache-2.0" ]
99
2020-07-26T16:25:24.000Z
2022-02-01T17:49:26.000Z
src/core/utils/boolean.py
cyberstruggle/chalumeau
a912c0c1390f4b5b6cce061febeeb96303642b74
[ "Apache-2.0" ]
1
2020-09-07T05:11:54.000Z
2020-09-12T18:12:42.000Z
src/core/utils/boolean.py
cyberstruggle/chalumeau
a912c0c1390f4b5b6cce061febeeb96303642b74
[ "Apache-2.0" ]
20
2020-07-26T17:34:59.000Z
2021-08-20T06:12:19.000Z
# -*- encoding: utf-8 -*- from __future__ import unicode_literals
17.941176
55
0.644262
# -*- encoding: utf-8 -*- from __future__ import unicode_literals from django.utils.translation import ugettext_lazy as _ from django.conf import settings from decimal import Decimal import json def is_json(string): try: json.loads(string) except: return False return True def is_int(string...
0
0
0
0
0
324
0
41
178
173e3b25d948736b419ebde197716590cb02023e
3,494
py
Python
Python/pymd/md/core/system.py
ryanlopezzzz/ABPTutorial
923fa89f1959cd71b28ecf4628ecfbfce6a6206c
[ "MIT" ]
8
2020-05-05T00:41:50.000Z
2021-11-04T20:54:43.000Z
Python/pymd/md/core/system.py
ryanlopezzzz/ABPTutorial
923fa89f1959cd71b28ecf4628ecfbfce6a6206c
[ "MIT" ]
null
null
null
Python/pymd/md/core/system.py
ryanlopezzzz/ABPTutorial
923fa89f1959cd71b28ecf4628ecfbfce6a6206c
[ "MIT" ]
5
2020-05-04T16:37:13.000Z
2021-08-18T07:53:58.000Z
# Copyright 2020 Rastko Sknepnek, University of Dundee, r.skepnek@dundee.ac.uk # # 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 the Software without restriction, including without limitation # the rights ...
36.395833
114
0.626789
# Copyright 2020 Rastko Sknepnek, University of Dundee, r.skepnek@dundee.ac.uk # # 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 the Software without restriction, including without limitation # the rights ...
0
0
0
2,115
0
0
0
29
178
6ff2dae33b3a1c67b1481dd9603c6402f14b9916
372
py
Python
bookcode/upload_file.py
YEZHIAN1996/pythonstudy
a8774ef97266e8ab0289484ef190d2ee55f1d37c
[ "Apache-2.0" ]
1
2022-02-22T01:54:56.000Z
2022-02-22T01:54:56.000Z
bookcode/upload_file.py
YEZHIAN1996/pythonstudy
a8774ef97266e8ab0289484ef190d2ee55f1d37c
[ "Apache-2.0" ]
null
null
null
bookcode/upload_file.py
YEZHIAN1996/pythonstudy
a8774ef97266e8ab0289484ef190d2ee55f1d37c
[ "Apache-2.0" ]
null
null
null
disable_warnings() http = PoolManager() url = 'http://localhost:5000' while True: filename = input('():') if not filename: break with open(filename, 'rb') as f: filedata = f.read() response = http.request('POST', url, fields={'file':(filename, filedata)}) print(response.data.decode...
24.8
78
0.645161
from urllib3 import * disable_warnings() http = PoolManager() url = 'http://localhost:5000' while True: filename = input('请输入需要上传文件的名字(必须在当前目录):') if not filename: break with open(filename, 'rb') as f: filedata = f.read() response = http.request('POST', url, fields={'file':(filename, f...
57
0
0
0
0
0
0
0
22
a112165d8f0619530a5d37c0e1532ce86262e4ca
2,903
py
Python
milc/ansi.py
zedchance/milc
d2c9df522b1f3ef511649451979e7be2a7fdca4b
[ "X11" ]
null
null
null
milc/ansi.py
zedchance/milc
d2c9df522b1f3ef511649451979e7be2a7fdca4b
[ "X11" ]
null
null
null
milc/ansi.py
zedchance/milc
d2c9df522b1f3ef511649451979e7be2a7fdca4b
[ "X11" ]
null
null
null
"""ANSI color support for MILC. """ import sys import re import colorama UNICODE_SUPPORT = sys.stdout.encoding.lower().startswith('utf') # Regex was gratefully borrowed from kfir on stackoverflow: # https://stackoverflow.com/a/45448194 ansi_regex = r'\x1b(' \ r'(\[\??\d+[hl])|' \ r'([=<>a-kz...
29.622449
121
0.626249
"""ANSI color support for MILC. """ import sys import re import logging import colorama from .emoji import EMOJI_LOGLEVELS UNICODE_SUPPORT = sys.stdout.encoding.lower().startswith('utf') # Regex was gratefully borrowed from kfir on stackoverflow: # https://stackoverflow.com/a/45448194 ansi_regex = r'\x1b(' \ ...
0
0
0
1,308
0
0
0
6
206
1e35d73eef7ba72f8620fff7b72f2584bac91e13
3,588
py
Python
seamm_dashboard/routes/api/flowcharts.py
molssi-seamm/seamm_dashboard
6abc86903d93dca64578c0a048db67510bf1bc70
[ "BSD-3-Clause" ]
5
2020-04-17T16:34:13.000Z
2021-12-09T17:24:01.000Z
seamm_dashboard/routes/api/flowcharts.py
molssi-seamm/seamm_dashboard
6abc86903d93dca64578c0a048db67510bf1bc70
[ "BSD-3-Clause" ]
55
2020-02-26T20:47:52.000Z
2022-03-12T14:22:10.000Z
seamm_dashboard/routes/api/flowcharts.py
molssi-seamm/seamm_dashboard
6abc86903d93dca64578c0a048db67510bf1bc70
[ "BSD-3-Clause" ]
4
2019-10-15T18:34:14.000Z
2022-01-04T20:50:43.000Z
""" API calls for flowcharts """ __all__ = ["get_flowcharts", "get_flowchart", "get_cytoscape"]
25.628571
65
0.591137
""" API calls for flowcharts """ from seamm_datastore.database.models import Flowchart from seamm_datastore.database.schema import FlowchartSchema from flask import Response from flask_jwt_extended import jwt_required from seamm_dashboard import authorize import json __all__ = ["get_flowcharts", "get_flowchart", "g...
0
3,181
0
0
0
0
0
103
204
a844016efff13471be08d5547bba90b0e0b8f4a6
16,953
py
Python
calc_reset_statistics.py
paulocv/metapop-behavioral
d98d85be6c8bb430c35233710c7d0a0b76d3380a
[ "MIT" ]
null
null
null
calc_reset_statistics.py
paulocv/metapop-behavioral
d98d85be6c8bb430c35233710c7d0a0b76d3380a
[ "MIT" ]
null
null
null
calc_reset_statistics.py
paulocv/metapop-behavioral
d98d85be6c8bb430c35233710c7d0a0b76d3380a
[ "MIT" ]
null
null
null
"""""" import time import matplotlib.pyplot as plt import numpy as np import pandas as pd from nodewise_features_metapop import calc_node_metric, load_and_process_sim_data from toolbox.plot_tools import stdfigsize def load_execution_bunches(sim_prefix, num_exec): """ Loads the executions of a single simulation....
35.690526
119
0.660237
"""""" import sys import time import matplotlib.pyplot as plt import matplotlib as mpl import numpy as np import os import pandas as pd from calc_execwise_features import calc_simulation_metrics as load_and_calc_simulation_metrics # Borrowed function from nodewise_features_metapop import calc_node_metric, load_and_p...
0
0
0
0
0
7,608
0
110
201
832be8e4e9a922da7e51e41296c3a113f49687a8
2,916
py
Python
pan_genome/code/1. choose_ortholog_in_sce.py
SysBioChalmers/Multi_scale_evolution
b5f28ead733872519bc0758df034a076224c4253
[ "MIT" ]
1
2020-05-27T13:43:55.000Z
2020-05-27T13:43:55.000Z
pan_genome/code/1. choose_ortholog_in_sce.py
SysBioChalmers/Multi_scale_evolution
b5f28ead733872519bc0758df034a076224c4253
[ "MIT" ]
null
null
null
pan_genome/code/1. choose_ortholog_in_sce.py
SysBioChalmers/Multi_scale_evolution
b5f28ead733872519bc0758df034a076224c4253
[ "MIT" ]
1
2021-03-24T18:29:29.000Z
2021-03-24T18:29:29.000Z
# -------------------------------------------------------------------------------------- # This script is used to collect the protein and code sequence data # -------------------------------------------------------------------------------------- import os ##for directory import sys def changeComputer(computer_name): ...
30.061856
88
0.639232
# -------------------------------------------------------------------------------------- # This script is used to collect the protein and code sequence data # -------------------------------------------------------------------------------------- import os ##for directory import sys def changeComputer(computer_name): ...
0
0
0
0
0
0
0
0
0
9944aefaf93158d1f85fdb59d2c872662cf279cd
12,303
py
Python
venv/Lib/site-packages/win32comext/adsi/adsicon.py
ajayiagbebaku/NFL-Model
afcc67a85ca7138c58c3334d45988ada2da158ed
[ "MIT" ]
150
2021-11-02T05:31:51.000Z
2022-03-24T06:22:22.000Z
venv/Lib/site-packages/win32comext/adsi/adsicon.py
ajayiagbebaku/NFL-Model
afcc67a85ca7138c58c3334d45988ada2da158ed
[ "MIT" ]
4
2021-12-01T11:55:58.000Z
2022-02-24T16:14:37.000Z
venv/Lib/site-packages/win32comext/adsi/adsicon.py
ajayiagbebaku/NFL-Model
afcc67a85ca7138c58c3334d45988ada2da158ed
[ "MIT" ]
33
2021-11-03T00:29:41.000Z
2022-03-15T13:15:56.000Z
ADS_ATTR_CLEAR = 1 ADS_ATTR_UPDATE = 2 ADS_ATTR_APPEND = 3 ADS_ATTR_DELETE = 4 ADS_EXT_MINEXTDISPID = 1 ADS_EXT_MAXEXTDISPID = 16777215 ADS_EXT_INITCREDENTIALS = 1 ADS_EXT_INITIALIZE_COMPLETE = 2 ADS_SEARCHPREF_ASYNCHRONOUS = 0 ADS_SEARCHPREF_DEREF_ALIASES = 1 ADS_SEARCHPREF_SIZE_LIMIT = 2 ADS_SEARCHPREF_TIME_LIMIT = ...
36.079179
66
0.873446
ADS_ATTR_CLEAR = 1 ADS_ATTR_UPDATE = 2 ADS_ATTR_APPEND = 3 ADS_ATTR_DELETE = 4 ADS_EXT_MINEXTDISPID = 1 ADS_EXT_MAXEXTDISPID = 16777215 ADS_EXT_INITCREDENTIALS = 1 ADS_EXT_INITIALIZE_COMPLETE = 2 ADS_SEARCHPREF_ASYNCHRONOUS = 0 ADS_SEARCHPREF_DEREF_ALIASES = 1 ADS_SEARCHPREF_SIZE_LIMIT = 2 ADS_SEARCHPREF_TIME_LIMIT = ...
0
0
0
0
0
21
0
0
22
cf048b46a697430106e4640a4a98c993276a6758
1,563
py
Python
seq2sentiseq/options.py
aflah02/Fine-grained-Sentiment-Transfer
7e14622cd794cd5c9554c57bf7680b58dc053d11
[ "MIT" ]
51
2019-06-30T06:35:40.000Z
2022-03-31T00:33:55.000Z
seq2sentiseq/options.py
aflah02/Fine-grained-Sentiment-Transfer
7e14622cd794cd5c9554c57bf7680b58dc053d11
[ "MIT" ]
7
2019-08-16T05:54:01.000Z
2022-01-30T19:52:52.000Z
seq2sentiseq/options.py
aflah02/Fine-grained-Sentiment-Transfer
7e14622cd794cd5c9554c57bf7680b58dc053d11
[ "MIT" ]
5
2019-10-18T06:52:28.000Z
2021-12-03T14:18:08.000Z
# -*- coding: utf-8 -*- """ @version: python2.7 @author: luofuli @time: 2018/8/6 20:56 """
47.363636
115
0.710813
# -*- coding: utf-8 -*- """ @version: python2.7 @author: luofuli @time: 2018/8/6 20:56 """ import argparse from common_options import * def add_s2ss_arguments(parser): parser.add_argument("--mode", default="train", help="train, inference, final_inference") parser.add_argument("--n_epoch", default=3,...
0
0
0
0
0
1,368
0
1
90
bcdd6cdc3319d89059f1337456bc878a892346bf
6,837
py
Python
sdk/python/pulumi_azure_nextgen/apimanagement/v20200601preview/cache.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/apimanagement/v20200601preview/cache.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/apimanagement/v20200601preview/cache.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import pulumi from ... import _utilities, _tables __all__ = ['Cache']
43.547771
399
0.64736
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __a...
0
1,868
0
4,607
0
0
0
31
90
0f1988c3800692bc6e7899dc32a1aea16cd7fbff
4,185
py
Python
cluster-diagnosis/__main__.py
eloycoto/cluster-diagnosis
cb0339ebf4af0a316e92ecd776c4d3471cd03c19
[ "Apache-2.0" ]
null
null
null
cluster-diagnosis/__main__.py
eloycoto/cluster-diagnosis
cb0339ebf4af0a316e92ecd776c4d3471cd03c19
[ "Apache-2.0" ]
null
null
null
cluster-diagnosis/__main__.py
eloycoto/cluster-diagnosis
cb0339ebf4af0a316e92ecd776c4d3471cd03c19
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright 2017 Authors of Cilium # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
38.394495
77
0.61362
#!/usr/bin/env python # Copyright 2017 Authors of Cilium # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
0
0
0
0
0
0
0
0
0
2e86e6988c7e0b249405d67a6ebf5ce47ed259b3
2,834
py
Python
complaints/charts.py
dmitricus/The-complaints-of-citizens
c28989c12351605c210e09d07861985abc998b42
[ "MIT" ]
null
null
null
complaints/charts.py
dmitricus/The-complaints-of-citizens
c28989c12351605c210e09d07861985abc998b42
[ "MIT" ]
null
null
null
complaints/charts.py
dmitricus/The-complaints-of-citizens
c28989c12351605c210e09d07861985abc998b42
[ "MIT" ]
null
null
null
from django.contrib.auth import get_user_model import datetime now = datetime.datetime.now() User = get_user_model()
38.821918
118
0.669372
from django.contrib.auth import get_user_model from complaints.models import Complaint from django.http import JsonResponse from django.shortcuts import render from django.views.generic import View import datetime from calendar import monthrange from rest_framework.views import APIView from rest_framework.response imp...
192
0
0
2,141
0
114
0
115
247
80806c551cbb9dfde1d566abb508ce704a9a9b0a
2,026
py
Python
Checkio/flatten_a_list.py
JKChang2015/Checkio
5e3c05dd199f3daaa1665fa3db4a3a3749c34781
[ "Apache-2.0" ]
null
null
null
Checkio/flatten_a_list.py
JKChang2015/Checkio
5e3c05dd199f3daaa1665fa3db4a3a3749c34781
[ "Apache-2.0" ]
null
null
null
Checkio/flatten_a_list.py
JKChang2015/Checkio
5e3c05dd199f3daaa1665fa3db4a3a3749c34781
[ "Apache-2.0" ]
null
null
null
# flatten_a_list # Created by JKChang # 2019-08-05, 14:54 # Tag: # Description: # Nicola likes to categorize all sorts of things. He categorized a series of numbers and as the result of his efforts, # a simple sequence of numbers became a deeply-nested list. Sophia and Stephan don't really understand his organization #...
38.226415
159
0.641658
# flatten_a_list # Created by JKChang # 2019-08-05, 14:54 # Tag: # Description: # Nicola likes to categorize all sorts of things. He categorized a series of numbers and as the result of his efforts, # a simple sequence of numbers became a deeply-nested list. Sophia and Stephan don't really understand his organization #...
0
0
0
0
0
121
0
-3
46
b4081ab58b5eaa197fc8c7381207b2a208402158
7,286
py
Python
nefi2/model/algorithms/grabcut_dilation_erosion_otsu.py
hronellenfitsch/nefi
04a611322e158ebc357f15c7d3296b670801451e
[ "BSD-2-Clause" ]
23
2016-03-31T08:48:05.000Z
2021-07-26T07:36:08.000Z
nefi2/model/algorithms/grabcut_dilation_erosion_otsu.py
hronellenfitsch/nefi
04a611322e158ebc357f15c7d3296b670801451e
[ "BSD-2-Clause" ]
54
2016-03-31T08:29:47.000Z
2021-10-13T22:38:07.000Z
nefi2/model/algorithms/grabcut_dilation_erosion_otsu.py
hronellenfitsch/nefi
04a611322e158ebc357f15c7d3296b670801451e
[ "BSD-2-Clause" ]
15
2016-03-31T10:04:51.000Z
2021-10-11T02:52:48.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __authors__ = {"Sebastian Schattner": "s9sescat@stud.uni-saarland.de"} # Segmentation routines THRESHOLD_FG_COLOR = 255 THRESHOLD_BG_COLOR = 0 # markers for grabcut, watershed denoting sure-fg, sure-bg and # let-the-algorithm-figure-it-out FG_MARKER = 255 BG_MARKER = 1...
41.873563
86
0.630662
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from nefi2.model.algorithms._alg import * import cv2 import numpy as np __authors__ = {"Sebastian Schattner": "s9sescat@stud.uni-saarland.de"} # Segmentation routines THRESHOLD_FG_COLOR = 255 THRESHOLD_BG_COLOR = 0 # markers for grabcut, watershed denoting sure-fg, sur...
0
0
0
6,808
0
0
0
6
89
1b5f7e78829784d638396efaa84c8f5550969dd6
158
py
Python
zazi/apps/mpesa/apps.py
felixcheruiyot/zazi-core-banking
0a2dac42235adcac3cf8c114961e407f54844223
[ "Apache-2.0" ]
null
null
null
zazi/apps/mpesa/apps.py
felixcheruiyot/zazi-core-banking
0a2dac42235adcac3cf8c114961e407f54844223
[ "Apache-2.0" ]
1
2021-08-20T06:41:57.000Z
2021-08-20T06:41:57.000Z
zazi/apps/mpesa/apps.py
felixcheruiyot/zazi-core-banking
0a2dac42235adcac3cf8c114961e407f54844223
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals
17.555556
40
0.689873
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.apps import AppConfig class MpesaConfig(AppConfig): name = 'mpesa'
0
0
0
28
0
0
0
12
50
40c0e62123b6ba68ee723dea39ccecb17c182c63
973
py
Python
src/04/4a.py
gustafl/advent-of-code-2020
7b0dfac77ff50e7a46f9ece8e1d76332345866c4
[ "MIT" ]
null
null
null
src/04/4a.py
gustafl/advent-of-code-2020
7b0dfac77ff50e7a46f9ece8e1d76332345866c4
[ "MIT" ]
null
null
null
src/04/4a.py
gustafl/advent-of-code-2020
7b0dfac77ff50e7a46f9ece8e1d76332345866c4
[ "MIT" ]
null
null
null
import re import sys records = [] record = '' with open('input.txt', mode='rt', encoding='utf-8') as f: for line in f: if line.strip(): # If line is not empty line = re.sub(r'\s+', ' ', line) # Normalize whitespace on line record += line # Add line to record else: # If ...
25.605263
76
0.578623
import re import sys records = [] record = '' with open('input.txt', mode='rt', encoding='utf-8') as f: for line in f: if line.strip(): # If line is not empty line = re.sub(r'\s+', ' ', line) # Normalize whitespace on line record += line # Add line to record else: # If ...
0
0
0
0
0
221
0
0
23
7e32dc1b9babb830d13a501d48d195f41b6e037b
2,054
py
Python
math-logic-course/proover/main.py
ChShersh/university-courses
b78ab71d9b62e31de34efa4a93ac6fbe684c4ac0
[ "MIT" ]
null
null
null
math-logic-course/proover/main.py
ChShersh/university-courses
b78ab71d9b62e31de34efa4a93ac6fbe684c4ac0
[ "MIT" ]
null
null
null
math-logic-course/proover/main.py
ChShersh/university-courses
b78ab71d9b62e31de34efa4a93ac6fbe684c4ac0
[ "MIT" ]
null
null
null
#!/usr/bin/python # coding = utf-8 import sys import parser axioms = [ "A->(B->A)", "(A->B)->(A->B->C)->(A->C)", "A->B->A&B", "A&B->A", "A&B->B", "A->A|B", "B->A|B", "(A->C)->(B->C)->(A|B->C)", "(A->B)->(A->!B)->!A", "!!A->A" ] past_string_set = set() axiom_node = [] for index...
25.04878
99
0.558909
#!/usr/bin/python # coding = utf-8 import sys import parser from tree_class import Tree axioms = [ "A->(B->A)", "(A->B)->(A->B->C)->(A->C)", "A->B->A&B", "A&B->A", "A&B->B", "A->A|B", "B->A|B", "(A->C)->(B->C)->(A|B->C)", "(A->B)->(A->!B)->!A", "!!A->A" ] past_string_set = set...
112
0
0
0
0
1,049
0
6
68
af85490398a5c3d8aaf8ad2490c0afd82b3894f7
2,780
py
Python
chesscorpy/user.py
kurtjd/correspondence-chess
127c4b1f4983f08c824970c04841071e7533fad9
[ "MIT" ]
2
2021-09-02T18:14:17.000Z
2021-12-19T17:32:49.000Z
chesscorpy/user.py
kurtjd/correspondence-chess
127c4b1f4983f08c824970c04841071e7533fad9
[ "MIT" ]
null
null
null
chesscorpy/user.py
kurtjd/correspondence-chess
127c4b1f4983f08c824970c04841071e7533fad9
[ "MIT" ]
null
null
null
from flask import session from werkzeug.security import generate_password_hash from . import database USERNAME_MAX_LEN = 15 EMAIL_MAX_LEN = 320 PASSWORD_MAX_LEN = 100 DEFAULT_RATING = 1000 MIN_RATING = 1 MAX_RATING = 3000 PUBLIC_USER_ID = 0 DRAW_USER_ID = 0 USER_SESSION = 'user_id' def get_data_by_id(userid, field...
25.272727
78
0.660072
from flask import session from werkzeug.security import generate_password_hash from . import database USERNAME_MAX_LEN = 15 EMAIL_MAX_LEN = 320 PASSWORD_MAX_LEN = 100 DEFAULT_RATING = 1000 MIN_RATING = 1 MAX_RATING = 3000 PUBLIC_USER_ID = 0 DRAW_USER_ID = 0 USER_SESSION = 'user_id' def get_data_by_id(userid, field...
0
0
0
0
0
0
0
0
0
bce241bd0e9a1978a64fa3361712f34b36dc383e
12,363
py
Python
timeparse/regularization.py
tornadoyi/timeparse
1e44dbc6acdb07d6c023806d55034642c7ec0de9
[ "Apache-2.0" ]
null
null
null
timeparse/regularization.py
tornadoyi/timeparse
1e44dbc6acdb07d6c023806d55034642c7ec0de9
[ "Apache-2.0" ]
null
null
null
timeparse/regularization.py
tornadoyi/timeparse
1e44dbc6acdb07d6c023806d55034642c7ec0de9
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- regularization = RegularizationManager()
30.601485
117
0.55933
# -*- coding: utf-8 -*- import sys import re import math import copy import numpy as np import time_define as td from time_struct import * import time_func_ext as tf class ChunkRegularization(): # convert unit to int def unit_integralization(self, vector): int_vector = [None] * len(vector) ...
0
66
0
11,854
0
0
0
-34
385
4e764bca5a092fc77590e00c7633f401325259c7
898
py
Python
rllib/env/wrappers/uncertainty_wrappers.py
77loopin/ray
9322f6aab53f4ca5baf5a3573e1ffde12feae519
[ "Apache-2.0" ]
21,382
2016-09-26T23:12:52.000Z
2022-03-31T21:47:45.000Z
rllib/env/wrappers/uncertainty_wrappers.py
77loopin/ray
9322f6aab53f4ca5baf5a3573e1ffde12feae519
[ "Apache-2.0" ]
19,689
2016-09-17T08:21:25.000Z
2022-03-31T23:59:30.000Z
rllib/env/wrappers/uncertainty_wrappers.py
gramhagen/ray
c18caa4db36d466718bdbcb2229aa0b2dc03da1f
[ "Apache-2.0" ]
4,114
2016-09-23T18:54:01.000Z
2022-03-31T15:07:32.000Z
########## # Contribution by the Center on Long-Term Risk: # https://github.com/longtermrisk/marltoolbox ##########
35.92
73
0.589087
########## # Contribution by the Center on Long-Term Risk: # https://github.com/longtermrisk/marltoolbox ########## import numpy as np def add_RewardUncertaintyEnvClassWrapper(EnvClass, reward_uncertainty_std, reward_uncertainty_mean=0....
0
0
0
503
0
236
0
-3
45
2de92a7900e588784da1040c355f50e86095909e
5,040
py
Python
mender/cli/user.py
kireevco/mender-backend-cli
7bd5db7dcc82625aa461c0fc9dccbc829c08be15
[ "MIT" ]
5
2016-10-12T11:29:10.000Z
2020-05-11T17:04:15.000Z
mender/cli/user.py
kireevco/mender-backend-cli
7bd5db7dcc82625aa461c0fc9dccbc829c08be15
[ "MIT" ]
3
2018-03-26T08:53:55.000Z
2021-03-08T13:30:57.000Z
mender/cli/user.py
kireevco/mender-backend-cli
7bd5db7dcc82625aa461c0fc9dccbc829c08be15
[ "MIT" ]
6
2018-03-23T00:21:01.000Z
2021-03-16T11:48:33.000Z
# The MIT License (MIT) # # Copyright (c) 2016 Maciej Borzecki # # 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 the Software without restriction, including without limitation the rights # to use, copy, m...
35.744681
80
0.648413
# The MIT License (MIT) # # Copyright (c) 2016 Maciej Borzecki # # 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 the Software without restriction, including without limitation the rights # to use, copy, m...
0
0
0
0
0
3,568
0
95
251
1aaeaee9d04d03d0db94043e52dd848de31ae936
901
py
Python
tests/unit/utils/test_rethinkdb_helper.py
chadlung/pywebhooks
4b5f41be7c3c498a31cb0225cbde8e63c48ce999
[ "Apache-2.0" ]
94
2015-04-03T12:10:54.000Z
2021-08-30T13:50:48.000Z
tests/unit/utils/test_rethinkdb_helper.py
chadlung/pywebhooks
4b5f41be7c3c498a31cb0225cbde8e63c48ce999
[ "Apache-2.0" ]
10
2016-06-07T17:34:39.000Z
2019-11-23T00:00:09.000Z
tests/unit/utils/test_rethinkdb_helper.py
chadlung/pywebhooks
4b5f41be7c3c498a31cb0225cbde8e63c48ce999
[ "Apache-2.0" ]
10
2015-04-14T18:03:08.000Z
2021-08-30T13:50:49.000Z
# Standard lib imports # Third party imports # Project level imports
26.5
70
0.611543
# Standard lib imports import unittest from unittest.mock import patch # Third party imports import rethinkdb as rethink # Project level imports from pywebhooks import DEFAULT_DB_NAME from pywebhooks.utils.rethinkdb_helper import get_connection def suite(): test_suite = unittest.TestSuite() test_suite.addTe...
0
0
0
502
0
104
0
66
156
8e7f09bc79ba7324fc35eea38bb402880d0bb9e5
36
py
Python
zero/routes/tests/__init__.py
arXiv/arxiv-zero
c06f209c92f61e6a1b0d88f0d6d4ad0f89bf6e16
[ "MIT" ]
4
2019-05-26T22:57:40.000Z
2021-11-05T12:33:16.000Z
zero/routes/tests/__init__.py
arXiv/arxiv-zero
c06f209c92f61e6a1b0d88f0d6d4ad0f89bf6e16
[ "MIT" ]
19
2017-11-30T20:20:49.000Z
2018-08-24T17:27:09.000Z
zero/routes/tests/__init__.py
cul-it/arxiv-zero
c06f209c92f61e6a1b0d88f0d6d4ad0f89bf6e16
[ "MIT" ]
5
2019-01-10T22:02:11.000Z
2021-11-05T12:33:05.000Z
"""Tests for :mod:`zero.routes`."""
18
35
0.583333
"""Tests for :mod:`zero.routes`."""
0
0
0
0
0
0
0
0
0
9f027d88e486524b9cc0baa97c2535208b4d297c
1,202
py
Python
examples/convergence_comparison.py
aldanor/skggm
d2e29d692d1654285653ab07fd24534628fcb076
[ "MIT" ]
199
2016-10-21T14:36:02.000Z
2022-03-29T20:59:08.000Z
examples/convergence_comparison.py
aldanor/skggm
d2e29d692d1654285653ab07fd24534628fcb076
[ "MIT" ]
66
2016-10-17T01:47:28.000Z
2022-03-06T11:02:56.000Z
examples/convergence_comparison.py
aldanor/skggm
d2e29d692d1654285653ab07fd24534628fcb076
[ "MIT" ]
36
2016-10-15T23:42:10.000Z
2022-03-06T00:03:13.000Z
""" Convergence Failure of Glasso ============================= Demonstration of cases where graph_lasso fails to converge and quic succeeds. "The graphical lasso: New Insights and alternatives", by Mazumder & Hastie 2012. https://web.stanford.edu/~hastie/Papers/glassoinsights.pdf """ import sys sys.path.append("....
27.318182
80
0.609817
""" Convergence Failure of Glasso ============================= Demonstration of cases where graph_lasso fails to converge and quic succeeds. "The graphical lasso: New Insights and alternatives", by Mazumder & Hastie 2012. https://web.stanford.edu/~hastie/Papers/glassoinsights.pdf """ import sys sys.path.append("....
0
0
0
0
0
0
0
0
0
a9d65ef0dd0544310b0cd4dcadf102089f495990
2,645
py
Python
tests/test_qtcompat/test_compatibility_members.py
digitaldomain/QtPyConvert
2a2d2b9121004c27598f9e1031cf6ebf41c0895a
[ "Apache-2.0" ]
61
2018-04-17T18:09:32.000Z
2022-03-04T03:33:50.000Z
tests/test_qtcompat/test_compatibility_members.py
digitaldomain/QtPyConvert
2a2d2b9121004c27598f9e1031cf6ebf41c0895a
[ "Apache-2.0" ]
7
2018-04-17T23:29:29.000Z
2020-03-08T08:19:37.000Z
tests/test_qtcompat/test_compatibility_members.py
digitaldomain/QtPyConvert
2a2d2b9121004c27598f9e1031cf6ebf41c0895a
[ "Apache-2.0" ]
5
2018-04-18T07:36:21.000Z
2019-07-01T01:41:55.000Z
if __name__ == "__main__": import traceback _tests = filter( lambda key: True if key.startswith("test_") else False, globals().keys() ) failed = [] for test in _tests: try: print("Running %s" % test) globals()[test]() print(" %s...
23.616071
95
0.625709
from qt_py_convert.run import run from qt_py_convert.general import highlight_diffs def check(source, dest): aliases, mappings, dumps = run(source, True, True) try: assert dumps == dest except AssertionError as err: raise AssertionError("\n\"%s\"\n!=\n\"%s\"\n" % highlight_diff...
0
0
0
0
0
1,574
0
40
182
a7f89982b24c8d21663ce93fd04cdf31da61491c
29,104
py
Python
fabfile.py
xuantan/viewfinder
992209086d01be0ef6506f325cf89b84d374f969
[ "Apache-2.0" ]
645
2015-01-03T02:03:59.000Z
2021-12-03T08:43:16.000Z
fabfile.py
hoowang/viewfinder
9caf4e75faa8070d85f605c91d4cfb52c4674588
[ "Apache-2.0" ]
null
null
null
fabfile.py
hoowang/viewfinder
9caf4e75faa8070d85f605c91d4cfb52c4674588
[ "Apache-2.0" ]
222
2015-01-07T05:00:52.000Z
2021-12-06T09:54:26.000Z
"""Viewfinder production scripts Cookbook: * Launch new instances: specify NodeType,Name,Zone $ fab create_instance:STAGING,STAGING_003,us-east-1c * Resume installation of failed instance creation (eg: stuck in state 'pending' or not ssh-able): $ fab create_instance:STAGING,STAGING_003,us-east-1c,i-9a0cdbe9 * Sto...
37.895833
171
0.684408
"""Viewfinder production scripts Cookbook: * Launch new instances: specify NodeType,Name,Zone $ fab create_instance:STAGING,STAGING_003,us-east-1c * Resume installation of failed instance creation (eg: stuck in state 'pending' or not ssh-able): $ fab create_instance:STAGING,STAGING_003,us-east-1c,i-9a0cdbe9 * Sto...
0
19,770
0
0
0
2,888
0
99
844
3d07fa1181e41e57b32595645690f64f71166a3f
1,187
py
Python
unnumbered_sections.py
patmanteau/panflutist
74e56fe6b6873015cfba766bb61277d6d81bbece
[ "BSD-3-Clause" ]
null
null
null
unnumbered_sections.py
patmanteau/panflutist
74e56fe6b6873015cfba766bb61277d6d81bbece
[ "BSD-3-Clause" ]
null
null
null
unnumbered_sections.py
patmanteau/panflutist
74e56fe6b6873015cfba766bb61277d6d81bbece
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python r""" Use KOMAscript's \addsec command for unnumbered sections. Usage: - Add the class unnumbered to headings. A single hyphen in an attribute context is equivalent. Also see pandoc's manual: https://pandoc.org/MANUAL.html#heading-identifiers """ from jinja2tex import latex_env SECTION = l...
26.977273
71
0.606571
#!/usr/bin/env python r""" Use KOMAscript's \addsec command for unnumbered sections. Usage: - Add the class unnumbered to headings. A single hyphen in an attribute context is equivalent. Also see pandoc's manual: https://pandoc.org/MANUAL.html#heading-identifiers """ from jinja2tex import latex_env import panfl...
0
0
0
0
0
655
0
0
68
ed54c0b83b811b432807c6cccf3f6930d16a233e
985
py
Python
registries/rubygems/runner.py
Yanivmd/maloss
af85ac202668da88d0b4a885386a1e56703e37c8
[ "MIT" ]
1
2022-01-29T16:13:06.000Z
2022-01-29T16:13:06.000Z
registries/rubygems/runner.py
Yanivmd/maloss
af85ac202668da88d0b4a885386a1e56703e37c8
[ "MIT" ]
null
null
null
registries/rubygems/runner.py
Yanivmd/maloss
af85ac202668da88d0b4a885386a1e56703e37c8
[ "MIT" ]
1
2022-01-29T16:13:07.000Z
2022-01-29T16:13:07.000Z
#!/usr/bin/env python3 # Simple Script to replace cron for Docker import sys if __name__ == "__main__": sys.exit(main())
25.25641
82
0.608122
#!/usr/bin/env python3 # Simple Script to replace cron for Docker import argparse import sys from subprocess import CalledProcessError, run from time import sleep, time def main() -> int: parser = argparse.ArgumentParser() parser.add_argument("interval", help="Time in seconds between runs", type=int) ar...
0
0
0
0
0
740
0
26
90
1c00e4c377ced2123928b402d7109afdbd38c9bc
42,689
py
Python
utilities/notebook.py
QCaudron/SmallPopTSIR
51524ebf99076ebcb325d0f34d3891f7a9f90523
[ "MIT" ]
2
2016-04-05T10:32:52.000Z
2020-11-13T06:26:26.000Z
utilities/notebook.py
QCaudron/SmallPopTSIR
51524ebf99076ebcb325d0f34d3891f7a9f90523
[ "MIT" ]
null
null
null
utilities/notebook.py
QCaudron/SmallPopTSIR
51524ebf99076ebcb325d0f34d3891f7a9f90523
[ "MIT" ]
3
2015-10-18T23:59:41.000Z
2018-07-08T04:49:31.000Z
# -*- coding: utf-8 -*- # <nbformat>3.0</nbformat> # <headingcell level=1> # Measles in Small Populations # <markdowncell> # Based on *Finkenstadt and Grenfell (2002), Applied Statistics*, the paper introducing the TSIR model. The model relates $S_t$, the number of susceptibles at time $t$, to the number of infecte...
33.988057
802
0.640469
# -*- coding: utf-8 -*- # <nbformat>3.0</nbformat> # <headingcell level=1> # Measles in Small Populations # <markdowncell> # Based on *Finkenstadt and Grenfell (2002), Applied Statistics*, the paper introducing the TSIR model. The model relates $S_t$, the number of susceptibles at time $t$, to the number of infecte...
0
0
0
0
0
615
0
0
48
fb5eea86a746925440911830c3d41121077c7f7a
472
py
Python
vimfiles/bundle/vim-python/submodules/pylint/tests/functional/s/star/star_needs_assignment_target_py35.py
ciskoinch8/vimrc
5bf77a7e7bc70fac5173ab2e9ea05d7dda3e52b8
[ "MIT" ]
463
2015-01-15T08:17:42.000Z
2022-03-28T15:10:20.000Z
vimfiles/bundle/vim-python/submodules/pylint/tests/functional/s/star/star_needs_assignment_target_py35.py
ciskoinch8/vimrc
5bf77a7e7bc70fac5173ab2e9ea05d7dda3e52b8
[ "MIT" ]
52
2015-01-06T02:43:59.000Z
2022-03-14T11:15:21.000Z
vimfiles/bundle/vim-python/submodules/pylint/tests/functional/s/star/star_needs_assignment_target_py35.py
ciskoinch8/vimrc
5bf77a7e7bc70fac5173ab2e9ea05d7dda3e52b8
[ "MIT" ]
249
2015-01-07T22:49:49.000Z
2022-03-18T02:32:06.000Z
""" Test PEP 0448 -- Additional Unpacking Generalizations https://www.python.org/dev/peps/pep-0448/ """ # pylint: disable=superfluous-parens, unnecessary-comprehension UNPACK_TUPLE = (*range(4), 4) UNPACK_LIST = [*range(4), 4] UNPACK_SET = {*range(4), 4} UNPACK_DICT = {'a': 1, **{'b': '2'}} UNPACK_DICT2 = {**UNPACK_D...
29.5
81
0.641949
""" Test PEP 0448 -- Additional Unpacking Generalizations https://www.python.org/dev/peps/pep-0448/ """ # pylint: disable=superfluous-parens, unnecessary-comprehension UNPACK_TUPLE = (*range(4), 4) UNPACK_LIST = [*range(4), 4] UNPACK_SET = {*range(4), 4} UNPACK_DICT = {'a': 1, **{'b': '2'}} UNPACK_DICT2 = {**UNPACK_D...
0
0
0
0
0
0
0
0
0
81ca975db7515de19bb3f68fb49a93bf73381712
612
py
Python
setup.py
xyzza/pyiocontrol
c401d4c022c461c2d1ed875803dc2cce9afce0f8
[ "MIT" ]
null
null
null
setup.py
xyzza/pyiocontrol
c401d4c022c461c2d1ed875803dc2cce9afce0f8
[ "MIT" ]
null
null
null
setup.py
xyzza/pyiocontrol
c401d4c022c461c2d1ed875803dc2cce9afce0f8
[ "MIT" ]
null
null
null
from distutils.core import setup from distutils.extension import Extension setup(name='pyiocontrol', version='0.0.2', description='iarduino.ru module for Raspberry Pi', long_description=readme(), classifiers=[ 'Programming Language :: Python :: 3', ], url='http://github.com/tremaru/pyio...
25.5
54
0.647059
from distutils.core import setup from distutils.extension import Extension def readme(): with open('README.md') as readme: return readme.read() setup(name='pyiocontrol', version='0.0.2', description='iarduino.ru module for Raspberry Pi', long_description=readme(), classifiers=[ 'Pr...
0
0
0
0
0
59
0
0
23
7473c4332d2caa6236a74728662fa835fd047220
16,761
py
Python
tumblrtest.py
braveulysses/tumblr-api
126d147e833480a2a14129c7a2c85c523d1e95fc
[ "MIT" ]
2
2016-01-30T17:14:19.000Z
2016-05-09T00:42:21.000Z
tumblrtest.py
braveulysses/tumblr-api
126d147e833480a2a14129c7a2c85c523d1e95fc
[ "MIT" ]
null
null
null
tumblrtest.py
braveulysses/tumblr-api
126d147e833480a2a14129c7a2c85c523d1e95fc
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Tumblr API client unit test cases""" __author__ = "SNF Labs" __TODO__ = """TODO List - link-via detection - photo-caption not present - all strings are Unicode strings """ import unittest import urlparse def isUrl(str): """Attempts to determine if the given string is really an HTTP URL. ...
37.496644
132
0.633733
#!/usr/bin/env python """Tumblr API client unit test cases""" __author__ = "SNF Labs" __TODO__ = """TODO List - link-via detection - photo-caption not present - all strings are Unicode strings """ import os import unittest import tumblr import urlparse class WTFError(Exception): pass def isUrl(str): """Attempts...
0
0
0
15,414
0
355
0
-20
375
6c2a4091c02da6382520c010c52d28734b054c99
794
py
Python
tests/unit/graph/Graph_Commands/Test_Vis_Js.py
pbx-gs/OSBot-jira
7677afee1f80398ddcccd6b45423bf6adc20b970
[ "Apache-2.0" ]
1
2019-08-06T15:40:45.000Z
2019-08-06T15:40:45.000Z
tests/unit/graph/Graph_Commands/Test_Vis_Js.py
pbx-gs/OSBot-jira
7677afee1f80398ddcccd6b45423bf6adc20b970
[ "Apache-2.0" ]
1
2021-09-03T09:55:39.000Z
2021-09-03T09:55:39.000Z
tests/unit/graph/Graph_Commands/Test_Vis_Js.py
filetrust/OSBot-jira
d753fff59cf938cf94a51bf8bc7981691524b686
[ "Apache-2.0" ]
2
2021-04-02T05:58:29.000Z
2021-09-03T09:43:29.000Z
# from unittest import TestCase # # from osbot_aws.apis.Lambda import Lambda # # # # class Test_Nodes(TestCase): # # def setUp(self): # self.vis_js = Vis_JS() # # def test___update_lambda_function(self): # Lambda('osbot_jira.lambdas.graph').update() # # def test_saved_graph(self): # ...
26.466667
67
0.615869
# from unittest import TestCase # # from osbot_aws.apis.Lambda import Lambda # # # # class Test_Nodes(TestCase): # # def setUp(self): # self.vis_js = Vis_JS() # # def test___update_lambda_function(self): # Lambda('osbot_jira.lambdas.graph').update() # # def test_saved_graph(self): # ...
0
0
0
0
0
0
0
0
0
6f112ba687b96b57e2332cf264dccf48db025a56
2,508
py
Python
scripts/sqlinj.py
saugatasil/Godzilla
be639161239f9f0f90c201ad1098589e37c64d34
[ "MIT" ]
28
2019-09-13T13:35:00.000Z
2021-11-02T00:30:16.000Z
scripts/sqlinj.py
AhmedMohamedDev/Godzilla
be639161239f9f0f90c201ad1098589e37c64d34
[ "MIT" ]
null
null
null
scripts/sqlinj.py
AhmedMohamedDev/Godzilla
be639161239f9f0f90c201ad1098589e37c64d34
[ "MIT" ]
15
2019-09-09T13:04:46.000Z
2022-01-28T05:27:45.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- import colorama colorama.init() header = {'User-Agent':'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1'} # merge payload with target host
42.508475
98
0.311404
#!/usr/bin/python # -*- coding: utf-8 -*- import requests import sys import colorama from colorama import Fore, Back, Style colorama.init() header = {'User-Agent':'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1'} # merge payload with target host def merge(s,c) : global a global b a = ...
1,395
0
0
0
0
1,720
0
0
112
874bd55138e147ad5001c18c73474ece8776c8d9
2,087
py
Python
benchmarks/tttr_read.py
Fluorescence-Tools/tttrlib
891db80ddc5e6a1098faa62bd336df11b060e041
[ "BSD-3-Clause" ]
9
2019-11-27T13:00:54.000Z
2022-03-31T15:37:29.000Z
benchmarks/tttr_read.py
Fluorescence-Tools/tttrlib
891db80ddc5e6a1098faa62bd336df11b060e041
[ "BSD-3-Clause" ]
6
2019-10-31T23:59:56.000Z
2022-03-31T15:33:06.000Z
benchmarks/tttr_read.py
Fluorescence-Tools/tttrlib
891db80ddc5e6a1098faa62bd336df11b060e041
[ "BSD-3-Clause" ]
1
2019-07-28T20:21:43.000Z
2019-07-28T20:21:43.000Z
#!/usr/bin/python import timeit ############# # Test the TTTR reading function ############# import os import tttrlib test_files = [ ('.../tttr-data/bh/bh_spc132.spc', 'SPC-130'), ('.../tttr-data/bh/bh_spc132.spc', 'SPC-130'), ('.../tttr-data/bh/bh_spc630_256.spc', 'SPC-600_256'), ('.../tttr-data/HD...
31.621212
80
0.65932
#!/usr/bin/python import timeit ############# # Test the TTTR reading function ############# import phconvert import os import tttrlib import numpy as np import pylab as p test_files = [ ('.../tttr-data/bh/bh_spc132.spc', 'SPC-130'), ('.../tttr-data/bh/bh_spc132.spc', 'SPC-130'), ('.../tttr-data/bh/bh_...
0
0
0
0
0
0
0
-12
67
5d3d8cc866f3a4bb529cda052ebad07d5fda174f
682
py
Python
tensorlayer/__init__.py
lllcho/tensorlayer
87591b4945a6a67dfb4ea797a575efae997fd9d2
[ "Apache-2.0" ]
null
null
null
tensorlayer/__init__.py
lllcho/tensorlayer
87591b4945a6a67dfb4ea797a575efae997fd9d2
[ "Apache-2.0" ]
null
null
null
tensorlayer/__init__.py
lllcho/tensorlayer
87591b4945a6a67dfb4ea797a575efae997fd9d2
[ "Apache-2.0" ]
null
null
null
"""Deep learning and Reinforcement learning library for Researchers and Engineers""" from __future__ import absolute_import try: install_instr = "Please make sure you install a recent enough version of TensorFlow." except ImportError: raise ImportError("__init__.py : Could not import TensorFlow." + install_ins...
22.733333
89
0.759531
"""Deep learning and Reinforcement learning library for Researchers and Engineers""" from __future__ import absolute_import try: install_instr = "Please make sure you install a recent enough version of TensorFlow." import tensorflow except ImportError: raise ImportError("__init__.py : Could not import Tens...
0
0
0
0
0
0
0
-16
224
0364d48db5279a4f5a05db2a89470808332c8964
303
py
Python
quizzes/urls.py
NeedsSoySauce/testme
dfc11737779809c1df475e9224e753ca7117c981
[ "MIT" ]
1
2020-11-22T22:38:02.000Z
2020-11-22T22:38:02.000Z
quizzes/urls.py
NeedsSoySauce/testme
dfc11737779809c1df475e9224e753ca7117c981
[ "MIT" ]
3
2021-06-04T23:59:02.000Z
2021-09-22T19:39:14.000Z
quizzes/urls.py
NeedsSoySauce/testme
dfc11737779809c1df475e9224e753ca7117c981
[ "MIT" ]
null
null
null
from rest_framework import routers from . import views app_name = 'quizzes' router = routers.SimpleRouter() router.register(r'tags', views.TagViewSet) router.register(r'questions', views.QuestionViewSet) router.register(r'answers', views.AnswerViewSet) router.register(r'quizzes', views.QuizViewSet)
25.25
52
0.79868
from rest_framework import routers from . import views app_name = 'quizzes' router = routers.SimpleRouter() router.register(r'tags', views.TagViewSet) router.register(r'questions', views.QuestionViewSet) router.register(r'answers', views.AnswerViewSet) router.register(r'quizzes', views.QuizViewSet)
0
0
0
0
0
0
0
0
0
3d9c84fb9bfc24bd6b064c5a97af8891c2505cad
5,441
py
Python
src/main.py
im0qianqian/Reversi-based-RL
ef3723ffa26210bf04f19ffb72e5b9a43e54c448
[ "MIT" ]
61
2019-06-19T04:31:46.000Z
2022-02-12T03:36:57.000Z
src/main.py
im0qianqian/Reversi-based-RL
ef3723ffa26210bf04f19ffb72e5b9a43e54c448
[ "MIT" ]
3
2019-06-29T14:49:01.000Z
2020-01-06T03:34:25.000Z
src/main.py
im0qianqian/Reversi-based-RL
ef3723ffa26210bf04f19ffb72e5b9a43e54c448
[ "MIT" ]
12
2019-06-19T04:31:49.000Z
2022-03-30T05:46:00.000Z
import argparse def create_parser(): """ parser train mode run mode train mode config.py run mode --vs """ parser = argparse.ArgumentParser( description="Design and Implementation of Othello Based on Reinforcement Learning. by im0qianqian") subparser = parser.add_subparsers(...
45.341667
120
0.592354
import argparse from src.config import * from src.games.reversi.reversi_game import ReversiGame as Game from src.coach import Coach import pprint from src.games.reversi.reversi_player import ReversiRandomPlayer, ReversiRLPlayer, ReversiGreedyPlayer, \ ReversiBotzonePlayer, ReversiHumanPlayer from src.referee import...
564
0
0
0
0
1,535
0
181
155
e3422d38edd0ad89604b0ca21419da020638a739
2,943
py
Python
030-read-structure-of-pdf/pdf/lib.py
tao-pr/52-challenges
21c1723b8bb64c0a52afcca8f429b97e9948e86a
[ "MIT" ]
null
null
null
030-read-structure-of-pdf/pdf/lib.py
tao-pr/52-challenges
21c1723b8bb64c0a52afcca8f429b97e9948e86a
[ "MIT" ]
14
2020-03-31T07:19:08.000Z
2022-02-01T15:48:44.000Z
030-read-structure-of-pdf/pdf/lib.py
tao-pr/52-challenges
21c1723b8bb64c0a52afcca8f429b97e9948e86a
[ "MIT" ]
2
2020-05-31T14:48:29.000Z
2022-01-28T04:13:31.000Z
import os import scipy from collections import namedtuple import fitz BLOCK_IMAGE = 1 BLOCK_TEXT = 0 Block = namedtuple("Block", ['filename','tl','br','w','h','content', 'type', 'density']) SBlock = namedtuple("SBlock", ['filename','page','content','priority']) def read_pdf2(path: str): """ Read PDF pages with ...
27.764151
124
0.659531
import os import scipy import scipy.stats import numpy as np from collections import namedtuple from functools import partial from io import StringIO import fitz from lxml import etree BLOCK_IMAGE = 1 BLOCK_TEXT = 0 Block = namedtuple("Block", ['filename','tl','br','w','h','content', 'type', 'density']) SBlock = nam...
0
0
0
0
0
1,468
0
5
225
a4ae9c64043b4b023bc7c877833a96de414516d1
2,574
py
Python
scripts/tab_wp_scratch.py
almonds0166/BCN
2841d5a43acc93c9e3b9c46febbdca5a9f4825c3
[ "MIT" ]
null
null
null
scripts/tab_wp_scratch.py
almonds0166/BCN
2841d5a43acc93c9e3b9c46febbdca5a9f4825c3
[ "MIT" ]
null
null
null
scripts/tab_wp_scratch.py
almonds0166/BCN
2841d5a43acc93c9e3b9c46febbdca5a9f4825c3
[ "MIT" ]
null
null
null
import sys sys.path.append("../") from pathlib import Path WP_FROM_SCRATCH_LOC = Path(input("Enter the location of all your *WP from scratch* results\n> ")) EPS = (1, 5, 10, 20) if __name__ == "__main__": _ = main()
22.778761
97
0.50777
import sys sys.path.append("../") from pathlib import Path import re import numpy as np from bcn import Results WP_FROM_SCRATCH_LOC = Path(input("Enter the location of all your *WP from scratch* results\n> ")) EPS = (1, 5, 10, 20) def mean(ell, default=None): return sum(ell) / len(ell) if ell else default de...
0
0
0
0
0
2,250
0
-13
114
197c7c21236b0e002dd47f97c288778e5d1096ff
2,335
py
Python
Python/basicNetClient.py
MotoTito/CTF_Helpers
1156a9bc41bcbb457f5bd782df446c06ed4152ca
[ "MIT" ]
null
null
null
Python/basicNetClient.py
MotoTito/CTF_Helpers
1156a9bc41bcbb457f5bd782df446c06ed4152ca
[ "MIT" ]
null
null
null
Python/basicNetClient.py
MotoTito/CTF_Helpers
1156a9bc41bcbb457f5bd782df446c06ed4152ca
[ "MIT" ]
null
null
null
#!/usr/local/bin/python3 import socket import re def GenerateResponse(serverMessage, sock): """ Processes the message from the server and generates a response. Parameters: serverMessage (byte[]): Message from server in byte[] sock (socket): Socket being used for communication Returns: str: Th...
30.723684
97
0.636831
#!/usr/local/bin/python3 import socket import re from swapFormats import * def GenerateResponse(serverMessage, sock): """ Processes the message from the server and generates a response. Parameters: serverMessage (byte[]): Message from server in byte[] sock (socket): Socket being used for communication...
0
0
0
0
0
0
0
4
22
76a859d3e7b19d02d08968be1af82b735c1f195a
1,083
py
Python
intro/part07-17_string_helper/src/string_helper.py
Hannah-Abi/python-pro-21
2ce32c4bf118054329d19afdf83c50561be1ada8
[ "MIT" ]
null
null
null
intro/part07-17_string_helper/src/string_helper.py
Hannah-Abi/python-pro-21
2ce32c4bf118054329d19afdf83c50561be1ada8
[ "MIT" ]
null
null
null
intro/part07-17_string_helper/src/string_helper.py
Hannah-Abi/python-pro-21
2ce32c4bf118054329d19afdf83c50561be1ada8
[ "MIT" ]
null
null
null
# Write your solution here if __name__=="__main__": my_string = "Well hello there!" test_string = "This is a test, lets see how it goes!!!11!" print(change_case(my_string)) print(split_in_half(my_string)) print(remove_special_characters(test_string))
30.942857
62
0.630656
# Write your solution here def change_case(orig_string: str) -> str: new_string = "" part = list(orig_string) for letter in part: if letter.islower(): letter = letter.upper() else: letter = letter.lower() new_string += letter return new_string def split_i...
0
0
0
0
0
745
0
0
68
4e7ff63dde4c304baa8abdd6c3b4984313ecbc93
772
py
Python
scripts/scrapesatellites.py
healeycodes/pi
7288186c8529b2192eda0da8e1699c59702cb230
[ "MIT" ]
26
2021-05-09T17:11:16.000Z
2021-12-05T20:49:49.000Z
scripts/scrapesatellites.py
healeycodes/pi
7288186c8529b2192eda0da8e1699c59702cb230
[ "MIT" ]
null
null
null
scripts/scrapesatellites.py
healeycodes/pi
7288186c8529b2192eda0da8e1699c59702cb230
[ "MIT" ]
1
2021-06-25T12:51:03.000Z
2021-06-25T12:51:03.000Z
import os import json import wikipedia import pandas as pd """ Scrape satellite data from Wikipedia to match PRNs to a satellite description. """ url = wikipedia.page("List of GPS satellites").url df = pd.read_html(url, header=0)[0] names = df["Satellite"].to_list() prns = df["PRN"].to_list() statuses = df["Status"]...
23.393939
78
0.643782
import os import json import wikipedia import pandas as pd """ Scrape satellite data from Wikipedia to match PRNs to a satellite description. """ url = wikipedia.page("List of GPS satellites").url df = pd.read_html(url, header=0)[0] names = df["Satellite"].to_list() prns = df["PRN"].to_list() statuses = df["Status"]...
0
0
0
0
0
0
0
0
0
187bb446cce0f1e8f6e27722947fde4701c9b338
118
py
Python
static/teaching/python_jan2015/data/c1code.py
fcarreiro/fcarreiro.github.com
4ccf7d38ea33da7be1dd99bcb75a18a7061c2346
[ "MIT" ]
null
null
null
static/teaching/python_jan2015/data/c1code.py
fcarreiro/fcarreiro.github.com
4ccf7d38ea33da7be1dd99bcb75a18a7061c2346
[ "MIT" ]
null
null
null
static/teaching/python_jan2015/data/c1code.py
fcarreiro/fcarreiro.github.com
4ccf7d38ea33da7be1dd99bcb75a18a7061c2346
[ "MIT" ]
1
2020-01-11T18:04:07.000Z
2020-01-11T18:04:07.000Z
# greetings! print "Hello World!" # assign some variables a = 2 b = 4 c = 3 # print the average print (a + b + c)/3
10.727273
23
0.618644
# greetings! print "Hello World!" # assign some variables a = 2 b = 4 c = 3 # print the average print (a + b + c)/3
0
0
0
0
0
0
0
0
0
5d11b42fe3e02236769276b4e0fd961613a7182b
29,643
py
Python
JassRNN.py
simi48/Ef-If_Jassen
6076839492bff591cf9b457e949999e9167903e6
[ "Apache-2.0" ]
4
2019-03-17T19:55:43.000Z
2019-04-30T15:22:36.000Z
JassRNN.py
simi48/Ef-If_Jassen
6076839492bff591cf9b457e949999e9167903e6
[ "Apache-2.0" ]
null
null
null
JassRNN.py
simi48/Ef-If_Jassen
6076839492bff591cf9b457e949999e9167903e6
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Project: Deep Jass File: Jassen.py Purpose: Recurring Neural Network to learn how to play cards. Created on: 17.03.2019 16:02:49 Author: Simon Thr; Marc Matter Copyright 2019 Marc Matter, Michael Siebenmann, Ramon Heeb, Simon Thr. All rights reserved. ...
34.751465
208
0.601862
# -*- coding: utf-8 -*- """ Project: Deep Jass File: Jassen.py Purpose: Recurring Neural Network to learn how to play cards. Created on: 17.03.2019 16:02:49 Author: Simon Thür; Marc Matter Copyright © 2019 Marc Matter, Michael Siebenmann, Ramon Heeb, Simon Thür. All rights reserve...
189
0
0
0
0
421
0
-10
91
76d53bc168ac05a7ec8a4b99b67d3c818b3924ea
1,212
py
Python
datacloud/login/logout_post.py
pphelan69/rest_python
e4258979877a1040a86b63da2010dd44f4b5ddca
[ "MIT" ]
null
null
null
datacloud/login/logout_post.py
pphelan69/rest_python
e4258979877a1040a86b63da2010dd44f4b5ddca
[ "MIT" ]
null
null
null
datacloud/login/logout_post.py
pphelan69/rest_python
e4258979877a1040a86b63da2010dd44f4b5ddca
[ "MIT" ]
null
null
null
""" This module tests the POST api: https://dxapistage.actiandatacloud.com/v2/logout It Deletes an existing session and logout a user. Here is how you would call the api and use associated methods: x = LogoutAPI("dxapistage.actiandatacloud.com", "Bearer: ZTA4MmRlMDYtY2ViMS00YTk3LTg4YTgtNGMxZTc0MGJ...
28.186047
92
0.673267
""" This module tests the POST api: https://dxapistage.actiandatacloud.com/v2/logout It Deletes an existing session and logout a user. Here is how you would call the api and use associated methods: x = LogoutAPI("dxapistage.actiandatacloud.com", "Bearer: ZTA4MmRlMDYtY2ViMS00YTk3LTg4YTgtNGMxZTc0MGJ...
0
0
0
771
0
0
0
-16
68
9798ff9f9f54ba5b324db37d311c8e1fbc0e3370
9,512
py
Python
forum_web/handlers/user.py
PXZ-cecilie/job-web-demo
e064f6a668aab8d2066a9587744933924e2b938e
[ "MIT" ]
null
null
null
forum_web/handlers/user.py
PXZ-cecilie/job-web-demo
e064f6a668aab8d2066a9587744933924e2b938e
[ "MIT" ]
null
null
null
forum_web/handlers/user.py
PXZ-cecilie/job-web-demo
e064f6a668aab8d2066a9587744933924e2b938e
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from flask import Blueprint user = Blueprint('user', __name__, url_prefix='/user') ''' @user.route('/resume', methods=['GET', 'POST']) @login_required def resume(): if not current_user.is_user(): return redirect(url_for("front.index")) form = UserProfil...
43.040724
897
0.615013
#!/usr/bin/env python # -*- coding: utf-8 -*- from flask import Blueprint, render_template, flash, redirect, url_for, request, current_app from flask_login import current_user, login_required from ..forms import UserDetailForm, RegisterUserForm, ArticleForm, AddTagForm from ..models import Article,db,Favorites,Vote fr...
0
8,432
0
0
0
0
0
170
340
97f25efa5fc207f13bb14736b50407bc9f92d6b5
968
py
Python
DES_17_2020/quizB.py
refeed/PAlgoritmaTRPLA
e0c79c1d57bee0869e2344651718e8cf053c035f
[ "MIT" ]
null
null
null
DES_17_2020/quizB.py
refeed/PAlgoritmaTRPLA
e0c79c1d57bee0869e2344651718e8cf053c035f
[ "MIT" ]
null
null
null
DES_17_2020/quizB.py
refeed/PAlgoritmaTRPLA
e0c79c1d57bee0869e2344651718e8cf053c035f
[ "MIT" ]
null
null
null
''' DESKRIPSI SOAL Susi dan Santi merupakan kakak beradik yang sangat kompak. Tebaklah, siapa yang menjadi kakak dengan melihat tanggal lahir mereka. PETUNJUK MASUKAN Input terdiri atas 2 baris dengan masing-masing baris 3 input (tanggal, bulan, tahun) Baris pertama untuk Susi, baris kedua untuk Santi PETUNJUK KEL...
17.925926
79
0.730372
''' DESKRIPSI SOAL Susi dan Santi merupakan kakak beradik yang sangat kompak. Tebaklah, siapa yang menjadi kakak dengan melihat tanggal lahir mereka. PETUNJUK MASUKAN Input terdiri atas 2 baris dengan masing-masing baris 3 input (tanggal, bulan, tahun) Baris pertama untuk Susi, baris kedua untuk Santi PETUNJUK KEL...
0
0
0
0
0
0
0
0
0
5e9c67439383a65442ec8e862ac5fd1a4c2f336f
3,698
py
Python
auv_mission_planner/scripts/upload_plan.py
svbhat/smarc_planning
f2a69129f525aefc56ce29e5deb87a1f087c3c06
[ "BSD-3-Clause" ]
1
2021-12-13T03:06:52.000Z
2021-12-13T03:06:52.000Z
auv_mission_planner/scripts/upload_plan.py
svbhat/smarc_planning
f2a69129f525aefc56ce29e5deb87a1f087c3c06
[ "BSD-3-Clause" ]
null
null
null
auv_mission_planner/scripts/upload_plan.py
svbhat/smarc_planning
f2a69129f525aefc56ce29e5deb87a1f087c3c06
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # Copyright 2018 Nils Bore (nbore@kth.se) # # Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this list of conditions and th...
46.810127
757
0.710925
#!/usr/bin/env python # Copyright 2018 Nils Bore (nbore@kth.se) # # Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this list of conditions and th...
0
0
0
0
0
0
0
0
0
4a48debe4a0d7962ad7b750e75270e7445b96d64
12,772
py
Python
src/data/source_data.py
webclinic017/market_machine_learning
79f3e774d08ceb6c313db8b7d8439e1f14d1ca27
[ "Apache-2.0" ]
1
2022-03-25T08:45:38.000Z
2022-03-25T08:45:38.000Z
src/data/source_data.py
webclinic017/market_machine_learning
79f3e774d08ceb6c313db8b7d8439e1f14d1ca27
[ "Apache-2.0" ]
null
null
null
src/data/source_data.py
webclinic017/market_machine_learning
79f3e774d08ceb6c313db8b7d8439e1f14d1ca27
[ "Apache-2.0" ]
null
null
null
import warnings import os import pandas as pd from datetime import datetime # import pickle warnings.filterwarnings("ignore") pd.options.display.max_columns = None pd.options.display.max_rows = None pd.set_option("display.width", None) pd.set_option("display.max_colwidth", -1) pd.options.display.float_format = "{:,}...
35.477778
88
0.603116
import warnings import os from pathlib import Path import pandas as pd from datetime import datetime import streamlit as st from src.data import yahoo_fin_stock_info as si # import pickle import pickle5 as pickle warnings.filterwarnings("ignore") pd.options.display.max_columns = None pd.options.display.max_rows = No...
0
0
0
12,068
0
0
0
33
111
2deb5b1906dde11e3117d6e8e02e4249aad4c938
11,984
py
Python
gruut/__init__.py
mcyph/gruut
44295fdd44b6007e5715177cd45b9741c990db35
[ "MIT" ]
null
null
null
gruut/__init__.py
mcyph/gruut
44295fdd44b6007e5715177cd45b9741c990db35
[ "MIT" ]
null
null
null
gruut/__init__.py
mcyph/gruut
44295fdd44b6007e5715177cd45b9741c990db35
[ "MIT" ]
null
null
null
"""Language class for gruut""" import logging from pathlib import Path # ----------------------------------------------------------------------------- _LOGGER = logging.getLogger("gruut") _DIR = Path(__file__).parent __version__ = (_DIR / "VERSION").read_text().strip() # -------------------------------------------...
33.47486
87
0.571595
"""Language class for gruut""" import logging import os import typing from pathlib import Path import pydash import yaml from gruut_ipa import IPA, Phonemes from .phonemize import Phonemizer from .toksen import PostTokenizeFunc, Token, TokenizeFunc, Tokenizer from .utils import env_constructor # -------------------...
6
7,780
0
3,595
0
0
0
48
202
651d79335996f5000c300fb9aa8cf68d9f8b3cb4
1,613
py
Python
TBJGameSDK/simulator/get_simulator_thirdparty.py
alibaba/t-game-sdk
4b6f6c86b3b81bd12674f3235a69621d87cfad32
[ "MIT" ]
5
2021-11-04T07:45:15.000Z
2021-11-23T06:21:15.000Z
TBJGameSDK/simulator/get_simulator_thirdparty.py
alibaba/t-game-sdk
4b6f6c86b3b81bd12674f3235a69621d87cfad32
[ "MIT" ]
1
2021-11-25T09:28:50.000Z
2021-11-25T09:28:50.000Z
TBJGameSDK/simulator/get_simulator_thirdparty.py
alibaba/t-game-sdk
4b6f6c86b3b81bd12674f3235a69621d87cfad32
[ "MIT" ]
1
2021-11-25T09:26:22.000Z
2021-11-25T09:26:22.000Z
#!/usr/bin/python # Copyright (C) 2021-2014 Alibaba Group Holding Limited import os import shutil try : import requests except: os.system("pip3 install requests") # curl -o file url is very unstable!!!! replace it script_root = os.path.abspath(os.path.dirname(__file__)) if __name__ == '__main__': install_dir =...
26.016129
109
0.717297
#!/usr/bin/python # Copyright (C) 2021-2014 Alibaba Group Holding Limited import os import shutil try : import requests except: os.system("pip3 install requests") import requests # curl -o file url is very unstable!!!! replace it def download(url, file): # pass URL as first argument response = requests.head(url...
0
0
0
0
0
864
0
-6
45
67a75f5b47fe2656ecb6ddaaf9e84289db234078
1,403
py
Python
Marlin-2.0.x/buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py
tajchert/Ender-5-Marlin-
9a90eb58b8282ec28fb28922d4163ca8d0f7cccd
[ "MIT" ]
5
2020-05-17T21:16:41.000Z
2021-06-11T04:46:31.000Z
Marlin-2.0.x/buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py
tajchert/Ender-5-Marlin-
9a90eb58b8282ec28fb28922d4163ca8d0f7cccd
[ "MIT" ]
1
2020-05-07T07:34:13.000Z
2020-09-12T09:09:44.000Z
buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py
dwhitlockii/Marlin_corexy_SKR-Pro1.1_bltouch
1f8aa64218067a134250b8c1017826e8abf87296
[ "MIT" ]
null
null
null
from os.path import join from os.path import expandvars Import("env", "projenv") # Relocate firmware from 0x08000000 to 0x08002000 #env['CPPDEFINES'].remove(("VECT_TAB_ADDR", 134217728)) #env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08010000")) # Custom HEX from ELF env.AddPostAction( join("$BUILD_DIR","${PROGNAME}...
31.886364
152
0.699929
from os.path import join from os.path import expandvars Import("env", "projenv") # Relocate firmware from 0x08000000 to 0x08002000 #env['CPPDEFINES'].remove(("VECT_TAB_ADDR", 134217728)) #env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08010000")) # Custom HEX from ELF env.AddPostAction( join("$BUILD_DIR","${PROGNAME}...
0
0
0
0
0
0
0
0
0
cc2aad8dd3884994610e58b92ecc0ee938a4405a
1,307
py
Python
schedule/tasks.py
Tomatosoup97/schedule
2e7d9b0f49c3d96aed58812cf29866f11ab0fdba
[ "0BSD" ]
null
null
null
schedule/tasks.py
Tomatosoup97/schedule
2e7d9b0f49c3d96aed58812cf29866f11ab0fdba
[ "0BSD" ]
null
null
null
schedule/tasks.py
Tomatosoup97/schedule
2e7d9b0f49c3d96aed58812cf29866f11ab0fdba
[ "0BSD" ]
null
null
null
DOMAIN_NAME = '' VENV_NAME = 'schedule'
23.763636
65
0.708493
from invoke import task DOMAIN_NAME = '' VENV_NAME = 'schedule' @task def migrate(context): print('-- Migrate database --') context.run('python manage.py migrate') @task def collectstatic(context): print('-- Collect static --') context.run('python manage.py collectstatic') @task def restart(context, domain=DOMA...
0
1,059
0
0
0
0
0
2
206
83d54664ae2e2b78d5e3df8910420d1295aefca1
15,267
py
Python
clnch_configmenu.py
Tonhoko/clnch
43c679038020b7321e861333825b9716300161e2
[ "bzip2-1.0.6" ]
30
2015-02-22T13:30:48.000Z
2021-11-05T04:04:42.000Z
clnch_configmenu.py
Tonhoko/clnch
43c679038020b7321e861333825b9716300161e2
[ "bzip2-1.0.6" ]
17
2017-08-10T17:42:03.000Z
2021-01-24T17:06:51.000Z
clnch_configmenu.py
Tonhoko/clnch
43c679038020b7321e861333825b9716300161e2
[ "bzip2-1.0.6" ]
8
2016-06-15T09:20:55.000Z
2022-01-16T10:26:08.000Z
#--------------------------------------------------------------------
30.656627
126
0.57752
import os import sys import pyauto import ckit from ckit.ckit_const import * import clnch_listwindow import clnch_msgbox import clnch_misc import clnch_ini import clnch_resource import clnch_statusbar #-------------------------------------------------------------------- def _configTheme( main_win...
1,308
0
0
2,782
0
11,281
0
-41
734
cf599e3d8a06edb7ee1a3471ef951a5252cad61c
3,141
py
Python
tests/suggestions.py
rwspielman/rule-engine
1d84d5599fe5ab34bc8d6fc00bbe00f847352428
[ "BSD-3-Clause" ]
149
2018-04-04T12:47:38.000Z
2022-03-25T07:25:55.000Z
tests/suggestions.py
rwspielman/rule-engine
1d84d5599fe5ab34bc8d6fc00bbe00f847352428
[ "BSD-3-Clause" ]
26
2020-01-06T17:29:26.000Z
2022-03-25T07:01:49.000Z
tests/suggestions.py
rwspielman/rule-engine
1d84d5599fe5ab34bc8d6fc00bbe00f847352428
[ "BSD-3-Clause" ]
24
2020-02-15T22:58:30.000Z
2022-03-22T02:15:26.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # tests/suggestions.py # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list ...
38.304878
100
0.743075
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # tests/suggestions.py # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list ...
0
0
0
971
0
0
0
-22
90
17b7c71bbd587c37a7fc4e325a5fff6c44b13bac
1,072
py
Python
spectrum/retries.py
elifesciences/elife-spectrum
05ed1dac44f4fd9271b30808e8381ab033c8ecc4
[ "MIT" ]
null
null
null
spectrum/retries.py
elifesciences/elife-spectrum
05ed1dac44f4fd9271b30808e8381ab033c8ecc4
[ "MIT" ]
91
2016-12-12T10:00:00.000Z
2021-10-18T02:51:39.000Z
spectrum/retries.py
elifesciences/elife-spectrum
05ed1dac44f4fd9271b30808e8381ab033c8ecc4
[ "MIT" ]
1
2017-04-13T22:26:46.000Z
2017-04-13T22:26:46.000Z
"""utility library for polling URLs. contains no tests that are run.""" from spectrum import logger LOGGER = logger.logger(__name__) # intended behavior at the moment: if the page is too slow to load, # timeouts will cut it (a CDN may serve a stale version if it has it)
30.628571
109
0.703358
"""utility library for polling URLs. contains no tests that are run.""" import backoff import requests from spectrum import logger LOGGER = logger.logger(__name__) def retry_request(response): retry_these = [ # lsh@2021-07-27: added 404 as there appears to be a case in the interaction of iiif and journ...
0
158
0
0
0
537
0
-13
113
d9c769d047a3ac3a722c2cb63d6616f5db0cabe8
2,477
py
Python
discover/datasets.py
spectre-team/divik-worker
d52e242f4c581c62ef0c77ed30f1f8016b0f7b0b
[ "Apache-2.0" ]
null
null
null
discover/datasets.py
spectre-team/divik-worker
d52e242f4c581c62ef0c77ed30f1f8016b0f7b0b
[ "Apache-2.0" ]
8
2018-03-11T21:02:08.000Z
2018-04-28T16:59:27.000Z
discover/datasets.py
spectre-team/DiviK-worker
d52e242f4c581c62ef0c77ed30f1f8016b0f7b0b
[ "Apache-2.0" ]
null
null
null
"""Datasets discovery methods Copyright 2018 Spectre Team Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agree...
32.168831
83
0.728704
"""Datasets discovery methods Copyright 2018 Spectre Team Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agree...
0
0
0
0
0
0
0
0
0
4c39a6d7f5bfb9d2195519472c18fe9a05e558ef
5,242
py
Python
cycle_2018/migrations/0004_schedulea.py
RobBickel/nyt-fec
802df867c3b31fff8e922be00bab6f40a5db2d00
[ "Apache-2.0" ]
17
2018-03-27T15:09:58.000Z
2020-05-13T11:32:43.000Z
cycle_2018/migrations/0004_schedulea.py
RobBickel/nyt-fec
802df867c3b31fff8e922be00bab6f40a5db2d00
[ "Apache-2.0" ]
59
2018-03-21T17:08:15.000Z
2021-12-13T19:47:37.000Z
cycle_2018/migrations/0004_schedulea.py
RobBickel/nyt-fec
802df867c3b31fff8e922be00bab6f40a5db2d00
[ "Apache-2.0" ]
11
2018-09-11T23:18:32.000Z
2021-12-15T08:43:58.000Z
# Generated by Django 2.0.1 on 2018-02-16 21:03
71.808219
114
0.640214
# Generated by Django 2.0.1 on 2018-02-16 21:03 from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('cycle_2018', '0003_committee'), ] operations = [ migrations.CreateModel( name='ScheduleA', ...
0
0
0
5,099
0
0
0
26
68
bbf9ce3261c01434fe43e24618aa40201e6e1f4d
189
py
Python
openapi_ui_bundles/rapidoc/__init__.py
dapper91/python-rapidoc-ui-bundle
816cb481440d8b576f114ac2556a540747de85c2
[ "Apache-2.0" ]
null
null
null
openapi_ui_bundles/rapidoc/__init__.py
dapper91/python-rapidoc-ui-bundle
816cb481440d8b576f114ac2556a540747de85c2
[ "Apache-2.0" ]
null
null
null
openapi_ui_bundles/rapidoc/__init__.py
dapper91/python-rapidoc-ui-bundle
816cb481440d8b576f114ac2556a540747de85c2
[ "Apache-2.0" ]
null
null
null
""" RapiDoc static files. See https://github.com/mrin9/RapiDoc. """ import pathlib __all__ = ['static_path'] this_path = pathlib.Path(__file__).parent static_path = this_path / 'vendor'
17.181818
59
0.730159
""" RapiDoc static files. See https://github.com/mrin9/RapiDoc. """ import pathlib __all__ = ['static_path'] this_path = pathlib.Path(__file__).parent static_path = this_path / 'vendor'
0
0
0
0
0
0
0
0
0
70882b96aa5745252534969f701d4780e09d11c9
3,322
py
Python
Medium/468.py
Hellofafar/Leetcode
7a459e9742958e63be8886874904e5ab2489411a
[ "CNRI-Python" ]
6
2017-09-25T18:05:50.000Z
2019-03-27T00:23:15.000Z
Medium/468.py
Hellofafar/Leetcode
7a459e9742958e63be8886874904e5ab2489411a
[ "CNRI-Python" ]
1
2017-10-29T12:04:41.000Z
2018-08-16T18:00:37.000Z
Medium/468.py
Hellofafar/Leetcode
7a459e9742958e63be8886874904e5ab2489411a
[ "CNRI-Python" ]
null
null
null
# ------------------------------ # 468. Validate IP Address # # Description: # Write a function to check whether an input string is a valid IPv4 address or IPv6 address or neither. # IPv4 addresses are canonically represented in dot-decimal notation, which consists of four decimal numbers, each ranging from 0 to 255, ...
39.547619
473
0.566827
# ------------------------------ # 468. Validate IP Address # # Description: # Write a function to check whether an input string is a valid IPv4 address or IPv6 address or neither. # IPv4 addresses are canonically represented in dot-decimal notation, which consists of four decimal numbers, each ranging from 0 to 255, ...
0
0
0
1,316
0
0
0
0
23
49890d15ed88247560d19ba3c95c03cfe158a7b0
820
py
Python
backend/alembic/versions/6eb9f72db4f0_update_2021_08_27_13_05_29.py
air-services/boilerplate
8c69927c299882048f9aaaaa58483eea2a6a1cd0
[ "MIT" ]
null
null
null
backend/alembic/versions/6eb9f72db4f0_update_2021_08_27_13_05_29.py
air-services/boilerplate
8c69927c299882048f9aaaaa58483eea2a6a1cd0
[ "MIT" ]
null
null
null
backend/alembic/versions/6eb9f72db4f0_update_2021_08_27_13_05_29.py
air-services/boilerplate
8c69927c299882048f9aaaaa58483eea2a6a1cd0
[ "MIT" ]
null
null
null
"""Update 2021_08_27_13_05_29 Revision ID: 6eb9f72db4f0 Revises: 9c7ed601db2a Create Date: 2021-08-27 13:05:29.530440 """ # revision identifiers, used by Alembic. revision = "6eb9f72db4f0" down_revision = "9c7ed601db2a" branch_labels = None depends_on = None
24.848485
73
0.681707
"""Update 2021_08_27_13_05_29 Revision ID: 6eb9f72db4f0 Revises: 9c7ed601db2a Create Date: 2021-08-27 13:05:29.530440 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = "6eb9f72db4f0" down_revision = "9c7ed601db2a" branch_labels = None depends_on = None def upgr...
0
0
0
0
0
462
0
3
91
515dc0a4c14b3ee6d5be915abfaee99fcc484c38
17,890
py
Python
pandana3/core/var.py
HEPonHPC/pandana3-prototype
d7656e93a16a3c992c3d21e65915fed2935dd8fc
[ "Apache-2.0" ]
null
null
null
pandana3/core/var.py
HEPonHPC/pandana3-prototype
d7656e93a16a3c992c3d21e65915fed2935dd8fc
[ "Apache-2.0" ]
null
null
null
pandana3/core/var.py
HEPonHPC/pandana3-prototype
d7656e93a16a3c992c3d21e65915fed2935dd8fc
[ "Apache-2.0" ]
null
null
null
"""Module Var provides the abstract class Var, and the concrete subclasses: ConstantVar: a Var representing a constant SimpleVar: a Var read directly from an HDF5 file table GroupedVar: a Var representing a grouping operation on a base Var MutatedVar: a Var representing a length-preserving transformation on a b...
35.995976
90
0.64114
"""Module Var provides the abstract class Var, and the concrete subclasses: ConstantVar: a Var representing a constant SimpleVar: a Var read directly from an HDF5 file table GroupedVar: a Var representing a grouping operation on a base Var MutatedVar: a Var representing a length-preserving transformation on a b...
0
3,379
0
13,207
0
0
0
39
249
d418469c28b217ad4953e0ada0f8107ad3d23d40
39,384
py
Python
tests/integration/stateless_job_test/test_update.py
talaniz/peloton
7e5514ce509518e002d1dfe1a98c6ebb9f88ad1e
[ "Apache-2.0" ]
null
null
null
tests/integration/stateless_job_test/test_update.py
talaniz/peloton
7e5514ce509518e002d1dfe1a98c6ebb9f88ad1e
[ "Apache-2.0" ]
null
null
null
tests/integration/stateless_job_test/test_update.py
talaniz/peloton
7e5514ce509518e002d1dfe1a98c6ebb9f88ad1e
[ "Apache-2.0" ]
null
null
null
import pytest import logging pytestmark = [ pytest.mark.default, pytest.mark.stateless, pytest.mark.update, pytest.mark.random_order(disabled=True), ] log = logging.getLogger(__name__) UPDATE_STATELESS_JOB_SPEC = "test_update_stateless_job_spec.yaml" UPDATE_STATELESS_JOB_ADD_INSTANCES_SPEC = ( "t...
36.980282
89
0.763813
import pytest import grpc import time import logging from peloton_client.pbgen.peloton.api.v0.task import task_pb2 from peloton_client.pbgen.peloton.api.v1alpha.job.stateless import ( stateless_pb2, ) from peloton_client.pbgen.peloton.api.v1alpha.job.stateless.stateless_pb2 import ( JobSpec, ) from peloton_cli...
0
0
0
0
0
33,181
0
544
1,275
6f80d97697cc747da7f40a47e9d9b0e06b819da8
2,000
py
Python
tools/converter.py
spanner888/simple_stepper_motor_analyzer
73d35f9c63dcb9c89413e923bccefe935afe8e0f
[ "CC0-1.0" ]
4
2021-07-23T08:00:37.000Z
2022-03-15T16:51:41.000Z
tools/converter.py
15612281831/simple_stepper_motor_analyzer
a9f3c568d53a65be742888b426250f0460ce5589
[ "CC0-1.0" ]
8
2021-06-01T06:06:28.000Z
2022-03-17T20:50:31.000Z
tools/converter.py
15612281831/simple_stepper_motor_analyzer
a9f3c568d53a65be742888b426250f0460ce5589
[ "CC0-1.0" ]
3
2021-06-21T15:23:21.000Z
2021-11-03T20:47:19.000Z
# Converts screenshot dump from the stepper analyzer to a png. # Crude and for developement purposes only. from PIL import Image from datetime import datetime # Read lines from input file file1 = open( 'c:/projects/simple_stepper_motor_analyzer/repo/tools/screenshot.txt', 'r') lines = file1.readlines() image = ...
25.316456
113
0.5985
# Converts screenshot dump from the stepper analyzer to a png. # Crude and for developement purposes only. import sys from PIL import Image, ImageDraw import os from datetime import datetime # Read lines from input file file1 = open( 'c:/projects/simple_stepper_motor_analyzer/repo/tools/screenshot.txt', 'r') lin...
0
0
0
0
0
729
0
-12
91
460f939ee2e06fef30ae63c0fc82bb496e2c43a1
11,318
py
Python
pipeline/preprocessing.py
egrace479/NFL-BDB-2022
1bc0b55ebc3b8e17b3f1a156a179d5561d0963e3
[ "MIT" ]
null
null
null
pipeline/preprocessing.py
egrace479/NFL-BDB-2022
1bc0b55ebc3b8e17b3f1a156a179d5561d0963e3
[ "MIT" ]
null
null
null
pipeline/preprocessing.py
egrace479/NFL-BDB-2022
1bc0b55ebc3b8e17b3f1a156a179d5561d0963e3
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np from sklearn.preprocessing import StandardScaler, LabelEncoder from querying.tracking_query import get_play def preprocess_tracking(track18, track19, track20, play_df, play_type): ''' This function creates the tracking dataframes by play-type by year. Parameters: ...
35.930159
130
0.665842
import pandas as pd import numpy as np from sklearn.preprocessing import StandardScaler, LabelEncoder from querying.tracking_query import get_play def ft_in(x): if '-' in x: meas=x.split('-') #this will be a list ['ft','in'] inches = int(meas[0])*12 + int(meas[1]) return inches ...
0
0
0
0
0
665
0
0
92
9080b7021f49eaca8967dd68d385e8de2cb1f3fb
8,745
py
Python
MidiOutWrapper.py
htnicolas/musicon
341a401773c80d44a8a2d29ef3cde6b22135eec8
[ "MIT" ]
null
null
null
MidiOutWrapper.py
htnicolas/musicon
341a401773c80d44a8a2d29ef3cde6b22135eec8
[ "MIT" ]
null
null
null
MidiOutWrapper.py
htnicolas/musicon
341a401773c80d44a8a2d29ef3cde6b22135eec8
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # midioutwrapper.py # """Wrap MidiOut to add convenience methods for sending common MIDI events.""" import binascii def parse_sysex_string(s): """Convert a sysex message string in hexadecimal notation into bytes. Example: >>> parse_sysex_string("F0 7E...
37.371795
97
0.613722
#!/usr/bin/env python # -*- coding: utf-8 -*- # # midioutwrapper.py # """Wrap MidiOut to add convenience methods for sending common MIDI events.""" import binascii from rtmidi.midiconstants import (ALL_NOTES_OFF, ALL_SOUND_OFF, BALANCE, BANK_SELECT_LSB, BANK_SELECT_MSB, BREATH_CONTRO...
0
0
0
7,045
0
0
0
703
46
6a18ee0f6f0800bad025dbfa0b32c4718873203a
5,419
py
Python
vil2tusimples.py
pandamax/parse_vil100
cae0cb70604555fdd80ce2cc332c24b3082c8976
[ "MIT" ]
2
2021-11-26T03:21:19.000Z
2022-01-12T05:34:42.000Z
vil2tusimples.py
pandamax/parse_vil100
cae0cb70604555fdd80ce2cc332c24b3082c8976
[ "MIT" ]
null
null
null
vil2tusimples.py
pandamax/parse_vil100
cae0cb70604555fdd80ce2cc332c24b3082c8976
[ "MIT" ]
null
null
null
''' convert to Tusimple json/txt format. ''' import cv2 import json import numpy as np import os ''' datasets name:vil-100 paper link: https://arxiv.org/abs/2108.08482 reference: https://github.com/yujun0-0/MMA-Net/tree/main/dataset datasets structure: VIL-100 |----Annotations |----data ...
28.371728
113
0.494925
''' convert to Tusimple json/txt format. ''' import cv2 import json import numpy as np import os ''' datasets name:vil-100 paper link: https://arxiv.org/abs/2108.08482 reference: https://github.com/yujun0-0/MMA-Net/tree/main/dataset datasets structure: VIL-100 |----Annotations |----data ...
0
0
0
0
0
1,474
0
0
56
975c0dc24f8879e7ffd8d8123bfbe984032c042c
678
py
Python
scraper-prototype.py
shortlikeafox/csgo-data-project
28985d9e6f97335627734721334b6ec414d69d96
[ "MIT" ]
null
null
null
scraper-prototype.py
shortlikeafox/csgo-data-project
28985d9e6f97335627734721334b6ec414d69d96
[ "MIT" ]
null
null
null
scraper-prototype.py
shortlikeafox/csgo-data-project
28985d9e6f97335627734721334b6ec414d69d96
[ "MIT" ]
null
null
null
from urllib.request import Request, urlopen from bs4 import BeautifulSoup site = 'https://www.hltv.org/results?team=4773' hdr = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36'} req = Request(site,headers=hdr) html = urlopen(req) b...
30.818182
144
0.674041
from urllib.request import Request, urlopen from bs4 import BeautifulSoup import re site = 'https://www.hltv.org/results?team=4773' hdr = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36'} req = Request(site,headers=hdr) html = urlo...
0
0
0
0
0
0
0
-12
22
59054904727bc257bf1691d8b5fc19aafde79212
655
py
Python
ROS2_Examples/1-to-1/Object_Oriented/master.py
roboscienceorg/robolib
32a8d5e3ae4dd693cdf6c094050c9d19861a1331
[ "ECL-2.0" ]
1
2019-02-27T01:12:44.000Z
2019-02-27T01:12:44.000Z
ROS2_Examples/1-to-1/Object_Oriented/master.py
roboscienceorg/robolib
32a8d5e3ae4dd693cdf6c094050c9d19861a1331
[ "ECL-2.0" ]
31
2018-09-28T19:29:48.000Z
2019-02-24T15:03:52.000Z
ROS2_Examples/1-to-1/Object_Oriented/master.py
roboscienceorg/robolib
32a8d5e3ae4dd693cdf6c094050c9d19861a1331
[ "ECL-2.0" ]
null
null
null
import rclpy from subscriber import SubscriberExample from publisher import PublisherExample from rclpy.executors import SingleThreadedExecutor # Initialize rclpy rclpy.init(args=None) # This establishes an executor which will run all the nodes # In this case they will all be run on one thread exec = SingleThreadedEx...
22.586207
73
0.796947
import rclpy from subscriber import SubscriberExample from publisher import PublisherExample from rclpy.executors import SingleThreadedExecutor, MultiThreadedExecutor # Initialize rclpy rclpy.init(args=None) # This establishes an executor which will run all the nodes # In this case they will all be run on one thread ...
0
0
0
0
0
0
0
23
0
eed9c16ed4e15f38430277f5d9a1d0cb8b03a5dc
9,064
py
Python
avatar_models/vqa/lxmert/finetune.py
rafiberlin/sose21-pm-language-and-vision-g1
c7f9e8912abc25191fb823a1f3ee2e0a374a1bc6
[ "MIT" ]
null
null
null
avatar_models/vqa/lxmert/finetune.py
rafiberlin/sose21-pm-language-and-vision-g1
c7f9e8912abc25191fb823a1f3ee2e0a374a1bc6
[ "MIT" ]
46
2021-04-30T15:28:40.000Z
2021-08-21T15:26:34.000Z
avatar_models/vqa/lxmert/finetune.py
rafiberlin/sose21-pm-language-and-vision-g1
c7f9e8912abc25191fb823a1f3ee2e0a374a1bc6
[ "MIT" ]
1
2021-08-07T19:41:12.000Z
2021-08-07T19:41:12.000Z
import os import json import pandas as pd from config.util import get_config if __name__ == "__main__": # Get configuration config = get_config() BATCH_SIZE = config['vqa']['lxmert']['fine_tuning']["batch_size"] EPOCH = config['vqa']['lxmert']['fine_tuning']["epoch"] MODEL_TYPE = config['v...
44.214634
141
0.644307
import pickle import os import json from tqdm import tqdm import pandas as pd import numpy as np import torch from torch.utils.data import Dataset, DataLoader from transformers import LxmertForQuestionAnswering, LxmertTokenizer from transformers import AdamW # is this needed for training? from config.util import get_co...
0
0
0
2,873
0
3,772
0
93
280
cfd8d1bb071efb2daaf59b5e2b22ea5948ed2fc4
529
py
Python
subjects/tests/test_admin.py
stanmain/stasians_help
155b17c3323e71e38739402186e0d9501ab9d831
[ "MIT" ]
null
null
null
subjects/tests/test_admin.py
stanmain/stasians_help
155b17c3323e71e38739402186e0d9501ab9d831
[ "MIT" ]
null
null
null
subjects/tests/test_admin.py
stanmain/stasians_help
155b17c3323e71e38739402186e0d9501ab9d831
[ "MIT" ]
null
null
null
# Copyright 2018 Stanislav Hnatiuk. All rights reserved. """The test admin from the subjects app."""
24.045455
58
0.710775
# Copyright © 2018 Stanislav Hnatiuk. All rights reserved. """The test admin from the subjects app.""" from django.test import TestCase from generic.tests import AdminTestMixin from ..models import Subject, Category class CategoryAdminTest(AdminTestMixin, TestCase): """Tests for Category admin.""" fixtures ...
2
0
0
263
0
0
0
47
113
99ea0ea6ba32b918103e5a37c943736229fc2c79
1,352
py
Python
bulbs/videos/models.py
TAPP-TV/django-bulbs
eafe2237702d63d70f668adf45af20245b1b28e9
[ "MIT" ]
null
null
null
bulbs/videos/models.py
TAPP-TV/django-bulbs
eafe2237702d63d70f668adf45af20245b1b28e9
[ "MIT" ]
null
null
null
bulbs/videos/models.py
TAPP-TV/django-bulbs
eafe2237702d63d70f668adf45af20245b1b28e9
[ "MIT" ]
null
null
null
DEFAULT_VIDEO_OUTPUT = { "public": True, "width": 640, "height": 320 } VIDEO_PREFERENCES = { "video/mp4" : 0.75, "video/webm": 1.25 }
27.04
107
0.641272
from django.db import models from json_field import JSONField DEFAULT_VIDEO_OUTPUT = { "public": True, "width": 640, "height": 320 } VIDEO_PREFERENCES = { "video/mp4" : 0.75, "video/webm": 1.25 } class Video(models.Model): """This is a very lightweight model that basically wraps an extern...
0
0
0
1,107
0
0
0
18
68
c6cd2971d56b336489e3a085f5dfd45d0cf89aee
16
py
Python
mcenter_cli/parallelm/mcenter_cli/__init__.py
mlpiper/mlpiper
0fd2b6773f970c831038db47bf4920ada21a5f51
[ "Apache-2.0" ]
7
2019-04-08T02:31:55.000Z
2021-11-15T14:40:49.000Z
mcenter_cli/parallelm/mcenter_cli/__init__.py
mlpiper/mlpiper
0fd2b6773f970c831038db47bf4920ada21a5f51
[ "Apache-2.0" ]
31
2019-02-22T22:23:26.000Z
2021-08-02T17:17:06.000Z
mcenter_cli/parallelm/mcenter_cli/__init__.py
mlpiper/mlpiper
0fd2b6773f970c831038db47bf4920ada21a5f51
[ "Apache-2.0" ]
8
2019-03-15T23:46:08.000Z
2020-02-06T09:16:02.000Z
version="1.5.1"
8
15
0.625
version="1.5.1"
0
0
0
0
0
0
0
0
0
40b71be032d714b16eaa42202df3c0a0ecf810f5
5,455
py
Python
pizza/process.py
purrcat259/n-n-hashcode
98a1c443e6112903bc29a858bc18476a6635d460
[ "MIT" ]
null
null
null
pizza/process.py
purrcat259/n-n-hashcode
98a1c443e6112903bc29a858bc18476a6635d460
[ "MIT" ]
null
null
null
pizza/process.py
purrcat259/n-n-hashcode
98a1c443e6112903bc29a858bc18476a6635d460
[ "MIT" ]
null
null
null
from pizza.input import ExampleInput, MediumInput if __name__ == '__main__': example_input = ExampleInput() medium_input = MediumInput() # example_input.read_file() medium_input.read_file() # p = Process(example_input) p = Process(medium_input) p.run()
40.407407
116
0.594684
from copy import deepcopy from pizza.input import ExampleInput, MediumInput from pizza.models.slice import Slice class Process: def __init__(self, input_data): self.max_cells = input_data.maximum_cells self.min_ing = input_data.minimum_ingredient self.pizza_rows = input_data.rows ...
0
0
0
5,083
0
0
0
19
67
065dfecf159ecbc74621aba25d60de6af19f8965
5,840
py
Python
UtilityAgents/MonitorAgent/monitor/monitor.py
DonHammerstrom/volttron-pnnl-applications
042c7b2776cc662d2d2622319ad3aec7bc53541b
[ "BSD-3-Clause" ]
8
2016-11-03T05:00:58.000Z
2020-10-18T14:49:36.000Z
UtilityAgents/MonitorAgent/monitor/monitor.py
DonHammerstrom/volttron-pnnl-applications
042c7b2776cc662d2d2622319ad3aec7bc53541b
[ "BSD-3-Clause" ]
29
2016-06-15T17:45:48.000Z
2020-08-01T02:41:32.000Z
UtilityAgents/MonitorAgent/monitor/monitor.py
DonHammerstrom/volttron-pnnl-applications
042c7b2776cc662d2d2622319ad3aec7bc53541b
[ "BSD-3-Clause" ]
39
2016-06-08T01:57:49.000Z
2020-05-27T14:33:44.000Z
import logging import sys from volttron.platform.agent import utils from volttron.platform.agent.utils import (setup_logging) __version__ = "1.0.0" setup_logging() _log = logging.getLogger(__name__) def main(argv=sys.argv): """Main method called by the aip.""" try: utils.vip_main(Monitor) exce...
40
131
0.648973
import logging import datetime import sys from volttron.platform.agent import utils from volttron.platform.messaging import topics, headers as headers_mod from volttron.platform.agent.math_utils import mean from volttron.platform.agent.utils import (setup_logging, format_timestamp, get_aware_utc_now, parse_timestamp_st...
0
619
0
4,284
0
0
0
196
178
0d4fd8d1f549d6cf2940ee0b7e707781bfe2a0b8
964
py
Python
module1-introduction-to-sql/buddymove_holidayiq.py
jwross24/DS-Unit-3-Sprint-2-SQL-and-Databases
16f481d30051cc01742dc500750e5f9796bdbffd
[ "MIT" ]
null
null
null
module1-introduction-to-sql/buddymove_holidayiq.py
jwross24/DS-Unit-3-Sprint-2-SQL-and-Databases
16f481d30051cc01742dc500750e5f9796bdbffd
[ "MIT" ]
null
null
null
module1-introduction-to-sql/buddymove_holidayiq.py
jwross24/DS-Unit-3-Sprint-2-SQL-and-Databases
16f481d30051cc01742dc500750e5f9796bdbffd
[ "MIT" ]
null
null
null
import sqlite3 queries = [] # Count how many rows you have - it should be 249! query1 = '''SELECT COUNT("User Id") FROM review;''' queries.append(query1) # How many users who reviewed at least 100 Nature in the category also # reviewed at least 100 in the Shopping category? query2 = '''SELECT COUNT("User Id") FROM r...
25.368421
70
0.696058
import sqlite3 queries = [] # Count how many rows you have - it should be 249! query1 = '''SELECT COUNT("User Id") FROM review;''' queries.append(query1) # How many users who reviewed at least 100 Nature in the category also # reviewed at least 100 in the Shopping category? query2 = '''SELECT COUNT("User Id") FROM r...
0
0
0
0
0
0
0
0
0
58c04d9d0a3010173393171f8d321cf3911a2cfc
2,760
py
Python
blogs/lightning/ltgpred/trainer/boxdef.py
mikiec84/training-data-analyst
225bdbb3f606e009cae2617994a95b270cb056af
[ "Apache-2.0" ]
null
null
null
blogs/lightning/ltgpred/trainer/boxdef.py
mikiec84/training-data-analyst
225bdbb3f606e009cae2617994a95b270cb056af
[ "Apache-2.0" ]
1
2021-03-25T23:56:32.000Z
2021-03-25T23:56:32.000Z
blogs/lightning/ltgpred/trainer/boxdef.py
gaybro8777/training-data-analyst
225bdbb3f606e009cae2617994a95b270cb056af
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """Create dataset for predicting lightning using Dataflow. Copyright Google Inc. 2018 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0...
35.384615
78
0.597826
#!/usr/bin/env python """Create dataset for predicting lightning using Dataflow. Copyright Google Inc. 2018 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0...
0
0
0
1,945
0
0
0
-39
221
7af69ce59ac57a88277f0b12800f9fdea8e0a70d
1,588
py
Python
azure_lightning_flask/application.py
dhdemerson/azure-lightning-flask
1b9fc3dad3f2c75219f45e7e6cce387a1cc6e157
[ "MIT" ]
null
null
null
azure_lightning_flask/application.py
dhdemerson/azure-lightning-flask
1b9fc3dad3f2c75219f45e7e6cce387a1cc6e157
[ "MIT" ]
1
2018-03-12T15:20:03.000Z
2018-03-12T15:20:03.000Z
azure_lightning_flask/application.py
dhdemerson/azure-lightning-flask
1b9fc3dad3f2c75219f45e7e6cce387a1cc6e157
[ "MIT" ]
null
null
null
"""Application factory and configuration for azure_lightning_flask applications""" from logging import getLogger, StreamHandler from warnings import warn from flask import Flask from azure_lightning_flask.application_blueprint import application_blueprint def create_app(config=Configuration): """Return azure_ligh...
36.090909
99
0.769521
"""Application factory and configuration for azure_lightning_flask applications""" from logging import getLogger, StreamHandler from warnings import warn from flask import Flask from flask_env import MetaFlaskEnv from azure_lightning_flask.application_blueprint import application_blueprint class Configuration(object)...
0
0
0
364
0
0
0
13
45
7fa267a9679dc5397dbbdde9762a7e90ba25f268
4,587
py
Python
demo_stages.py
Damseh/VascularGraph
9843c2ce1ef1e3d707061c4b14032bd060d7295a
[ "MIT" ]
9
2020-05-23T01:22:40.000Z
2022-03-01T07:01:49.000Z
demo_stages.py
Damseh/VascularGraph
9843c2ce1ef1e3d707061c4b14032bd060d7295a
[ "MIT" ]
4
2020-02-17T08:47:15.000Z
2022-03-01T07:01:33.000Z
demo_stages.py
Damseh/VascularGraph
9843c2ce1ef1e3d707061c4b14032bd060d7295a
[ "MIT" ]
2
2020-03-08T10:41:44.000Z
2021-05-02T14:13:03.000Z
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Wed Feb 6 21:10:46 2019 @author: rdamseh """ import os import sys # add VascGraph package to python path try: sys.path.append(os.getcwd()) except: pass import VascGraph as vg from VascGraph.Skeletonize import GenerateGraph, ContractGraph, RefineGra...
32.302817
110
0.557009
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Wed Feb 6 21:10:46 2019 @author: rdamseh """ import os import sys # add VascGraph package to python path try: sys.path.append(os.getcwd()) except: pass import VascGraph as vg from VascGraph.Skeletonize import GenerateGraph, ContractGraph, RefineGra...
0
0
0
0
0
0
0
56
44