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
02434b5ddafacfc9ac46e93b0bce94475b975a5d
385
py
Python
final_exam_prep/regex_fancy_barcodes.py
lowrybg/SoftuniPythonFund
ab80c424c35824bbfda5f43f1ba8ba5aa2f4efb5
[ "MIT" ]
null
null
null
final_exam_prep/regex_fancy_barcodes.py
lowrybg/SoftuniPythonFund
ab80c424c35824bbfda5f43f1ba8ba5aa2f4efb5
[ "MIT" ]
null
null
null
final_exam_prep/regex_fancy_barcodes.py
lowrybg/SoftuniPythonFund
ab80c424c35824bbfda5f43f1ba8ba5aa2f4efb5
[ "MIT" ]
null
null
null
import re number = int(input()) pattern_valid = r"@#+[A-Z][A-Za-z0-9]{4,}[A-Z]@#+" for _ in range(number): lines = input() if re.match(pattern_valid,lines): digits = re.findall(r"\d", lines) if digits: print(f'Product group: {"".join(digits)}') else: print...
17.5
54
0.532468
import re number = int(input()) pattern_valid = r"@#+[A-Z][A-Za-z0-9]{4,}[A-Z]@#+" for _ in range(number): lines = input() if re.match(pattern_valid,lines): digits = re.findall(r"\d", lines) if digits: print(f'Product group: {"".join(digits)}') else: print...
0
0
0
0
0
0
0
0
0
f0c671e4c78db63bdd4a28e24292fa97b490e155
553
py
Python
aoc2021/aoc/day07/part2.py
e-jameson/aoc
f26196d5564a9ac8027532c276af00aaf3718c6e
[ "MIT" ]
null
null
null
aoc2021/aoc/day07/part2.py
e-jameson/aoc
f26196d5564a9ac8027532c276af00aaf3718c6e
[ "MIT" ]
null
null
null
aoc2021/aoc/day07/part2.py
e-jameson/aoc
f26196d5564a9ac8027532c276af00aaf3718c6e
[ "MIT" ]
null
null
null
# Advent of Code - Day 7 - Part One
22.12
46
0.531646
# Advent of Code - Day 7 - Part One from collections import defaultdict from defaultlist import defaultlist def result(data): crabs = list(map(int, data[0].split(','))) m = max(crabs) lowest = None for i in range(m): total = 0 for crab in crabs: a, b = max(crab, i), min(c...
0
0
0
0
0
419
0
28
68
9a4de09700d67043bfdba658c293d50eca297364
176
py
Python
shiSock-0.3.0/test/cyphonize/setup.py
AnanyaRamanA/shiSock
51efb0eba17eb106b9480598d278536ddd7732c3
[ "MIT" ]
null
null
null
shiSock-0.3.0/test/cyphonize/setup.py
AnanyaRamanA/shiSock
51efb0eba17eb106b9480598d278536ddd7732c3
[ "MIT" ]
null
null
null
shiSock-0.3.0/test/cyphonize/setup.py
AnanyaRamanA/shiSock
51efb0eba17eb106b9480598d278536ddd7732c3
[ "MIT" ]
1
2021-10-31T13:47:42.000Z
2021-10-31T13:47:42.000Z
from distutils.core import setup, Extension from Cython.Build import cythonize extension = [Extension('server_c', ['server_c.pyx'])] setup(ext_modules = cythonize(extension))
29.333333
53
0.784091
from distutils.core import setup, Extension from Cython.Build import cythonize extension = [Extension('server_c', ['server_c.pyx'])] setup(ext_modules = cythonize(extension))
0
0
0
0
0
0
0
0
0
9ebd6720c74b31ac46b5955fbae2b8db319b8fad
174
py
Python
feature_engine/sanity_check/__init__.py
thibaultbl/feature_engine
08374227e7a88b67ee64b64f22e4f30390df9253
[ "BSD-3-Clause" ]
1
2021-09-08T08:54:56.000Z
2021-09-08T08:54:56.000Z
feature_engine/sanity_check/__init__.py
thibaultbl/feature_engine
08374227e7a88b67ee64b64f22e4f30390df9253
[ "BSD-3-Clause" ]
1
2021-09-10T08:54:51.000Z
2021-09-10T08:54:51.000Z
feature_engine/sanity_check/__init__.py
thibaultbl/feature_engine
08374227e7a88b67ee64b64f22e4f30390df9253
[ "BSD-3-Clause" ]
null
null
null
""" The module sanity_check includes classes to check that train and tests are similar. """ from .similar_columns import SimilarColumns __all__ = [ "SimilarColumns", ]
17.4
83
0.747126
""" The module sanity_check includes classes to check that train and tests are similar. """ from .similar_columns import SimilarColumns __all__ = [ "SimilarColumns", ]
0
0
0
0
0
0
0
0
0
5fb988f47e1f0cd0f06f0e8829863682840bf0e3
1,792
py
Python
tests/fake_urls.py
vvd170501/pyhton-gforms
684956e06f4c6d8224ea3eb2f66827d3ec9bec46
[ "MIT" ]
3
2021-05-28T11:17:30.000Z
2022-03-13T14:49:24.000Z
tests/fake_urls.py
vvd170501/pyhton-gforms
684956e06f4c6d8224ea3eb2f66827d3ec9bec46
[ "MIT" ]
3
2021-05-26T17:19:18.000Z
2022-03-01T09:46:14.000Z
tests/fake_urls.py
vvd170501/pyhton-gforms
684956e06f4c6d8224ea3eb2f66827d3ec9bec46
[ "MIT" ]
2
2021-11-14T17:09:50.000Z
2021-12-02T20:13:49.000Z
placeholders = [FormId, ResponseId] _yt_link = 'dQw4w9WgXcQ' yt_url = f'https://youtu.be/{_yt_link}'
22.123457
122
0.681362
from abc import abstractmethod, ABC class Placeholder(str, ABC): marker: str # should be unique for each class @property @abstractmethod def marker(self): raise NotImplementedError() def __new__(cls, value: str): return super().__new__(cls, cls.marker + value + cls.marker) cla...
0
66
0
1,465
0
0
0
14
137
cf3a42655a22f32bfd6ae7ebd1d73621ab63d542
93,703
py
Python
UIs/Layours_Manager.py
ramonbss/mr_visualizer
33b68eb04637db9599c85d5b8028f08139b6efeb
[ "MIT" ]
null
null
null
UIs/Layours_Manager.py
ramonbss/mr_visualizer
33b68eb04637db9599c85d5b8028f08139b6efeb
[ "MIT" ]
null
null
null
UIs/Layours_Manager.py
ramonbss/mr_visualizer
33b68eb04637db9599c85d5b8028f08139b6efeb
[ "MIT" ]
null
null
null
''' Created on Feb 24, 2019 @author: ramon ''' DEGREE = 57.2958 if __name__ == '__main__': a = Frame_Transform() print('casa')
45.70878
103
0.672849
''' Created on Feb 24, 2019 @author: ramon ''' from PyQt5 import QtCore, QtGui, QtWidgets import numpy as np from Components import Frame_Template DEGREE = 57.2958 class Frames_Template( QtWidgets.QFrame ): axe_scale = .5 rotation_order = [] # Orders where the operations has been done matplot_...
8
18,636
0
74,685
0
0
0
34
182
7c2d541dc1006e3916e5a9ed7c3f65a287118c70
1,215
py
Python
XSTAF/tools/report_generator/html/html_generator.py
xcgspring/XSTAF
68a5bec4312173f931b9024e851cefaf778e3bfd
[ "Apache-2.0" ]
2
2016-03-21T01:02:57.000Z
2018-03-16T02:25:04.000Z
XSTAF/tools/report_generator/html/html_generator.py
xcgspring/XSTAF
68a5bec4312173f931b9024e851cefaf778e3bfd
[ "Apache-2.0" ]
null
null
null
XSTAF/tools/report_generator/html/html_generator.py
xcgspring/XSTAF
68a5bec4312173f931b9024e851cefaf778e3bfd
[ "Apache-2.0" ]
null
null
null
import os from jinja2 import Environment, FileSystemLoader CURRENT_PATH = os.path.dirname(os.path.abspath(__file__)) TEMPLATE_ENVIRONMENT = Environment(loader=FileSystemLoader(os.path.join(CURRENT_PATH, 'templates'))) TEMPLATE = "report.html"
36.818182
100
0.696296
import os import shutil import codecs from jinja2 import Environment, FileSystemLoader CURRENT_PATH = os.path.dirname(os.path.abspath(__file__)) TEMPLATE_ENVIRONMENT = Environment(loader=FileSystemLoader(os.path.join(CURRENT_PATH, 'templates'))) TEMPLATE = "report.html" class HtmlGenerator(object): def __init__(s...
0
131
0
789
0
0
0
-16
67
49d098a1e974593b4a2ed08705fac9635486b75f
1,078
py
Python
2016/day12/puzzle1.py
tcmitchell/AdventOfCode
caaac1aa37c999d4804f9f4154bf7033a06e98af
[ "MIT" ]
null
null
null
2016/day12/puzzle1.py
tcmitchell/AdventOfCode
caaac1aa37c999d4804f9f4154bf7033a06e98af
[ "MIT" ]
null
null
null
2016/day12/puzzle1.py
tcmitchell/AdventOfCode
caaac1aa37c999d4804f9f4154bf7033a06e98af
[ "MIT" ]
null
null
null
#!/usr/bin/env python if __name__ == '__main__': main()
23.955556
57
0.51577
#!/usr/bin/env python import sys def load_program(filename): with open(filename, 'rb') as f: return [l.strip().split() for l in f.readlines()] def execute(prog, pc, registers): cmd = prog[pc] print 'Executing', cmd inst = cmd[0] if inst == 'cpy': x = cmd[1] if x in registe...
0
0
0
0
0
936
0
-11
92
f03d4648e4f4ff3f16e93fabcd2bb4f5ebdf5c8c
165
py
Python
API_Forms/gestionPedidos/Forms.py
BrianMarquez3/Python-Django
61f84a01b7f57254f9dcbbad86cc4c88c2acf4d7
[ "MIT" ]
2
2020-09-28T21:23:59.000Z
2021-11-10T15:01:15.000Z
API_Forms/gestionPedidos/Forms.py
BrianMarquez3/Python-Django
61f84a01b7f57254f9dcbbad86cc4c88c2acf4d7
[ "MIT" ]
21
2021-02-04T01:37:44.000Z
2022-03-12T01:00:55.000Z
API_Forms/gestionPedidos/Forms.py
BrianMarquez3/Python-Django
61f84a01b7f57254f9dcbbad86cc4c88c2acf4d7
[ "MIT" ]
null
null
null
# API FORMS
18.333333
37
0.739394
# API FORMS from django import forms class FormularioContacto(forms.Form): asunto=forms.CharField() email=forms.EmailField() mensaje=forms.CharField()
0
0
0
105
0
0
0
3
46
e9c4e2ec294ffca62aa1e8f5af84f1f4931ee585
56
py
Python
rotkehlchen/chain/ethereum/modules/oneinch/constants.py
rotkehlchenio/rotkehlchen
98f49cd3ed26c641fec03b78eff9fe1872385fbf
[ "BSD-3-Clause" ]
137
2018-03-05T11:53:29.000Z
2019-11-03T16:38:42.000Z
rotkehlchen/chain/ethereum/modules/oneinch/constants.py
rotkehlchenio/rotkehlchen
98f49cd3ed26c641fec03b78eff9fe1872385fbf
[ "BSD-3-Clause" ]
385
2018-03-08T12:43:41.000Z
2019-11-10T09:15:36.000Z
rotkehlchen/chain/ethereum/modules/oneinch/constants.py
rotkehlchenio/rotkehlchen
98f49cd3ed26c641fec03b78eff9fe1872385fbf
[ "BSD-3-Clause" ]
59
2018-03-08T10:08:27.000Z
2019-10-26T11:30:44.000Z
CPT_ONEINCH_V1 = '1inch-v1' CPT_ONEINCH_V2 = '1inch-v2'
18.666667
27
0.75
CPT_ONEINCH_V1 = '1inch-v1' CPT_ONEINCH_V2 = '1inch-v2'
0
0
0
0
0
0
0
0
0
0bb44d71f722ab8caae5c2f3d0df3dff12c54a74
15,767
py
Python
pysnmp-with-texts/ZXR10-MACPING-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
8
2019-05-09T17:04:00.000Z
2021-06-09T06:50:51.000Z
pysnmp-with-texts/ZXR10-MACPING-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
4
2019-05-31T16:42:59.000Z
2020-01-31T21:57:17.000Z
pysnmp-with-texts/ZXR10-MACPING-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module ZXR10-MACPING-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ZXR10-MACPING-MIB # Produced by pysmi-0.3.4 at Wed May 1 15:48:20 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Ma...
118.548872
2,143
0.800977
# # PySNMP MIB module ZXR10-MACPING-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ZXR10-MACPING-MIB # Produced by pysmi-0.3.4 at Wed May 1 15:48:20 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Ma...
0
0
0
168
0
0
0
0
45
6476f48f36007808b463967f30d46961e32dc681
1,562
gyp
Python
deps/binding.gyp
TheAkio/zlib-sync
9fcacb0e3a9701978dea67db3f398ab9461ff6e1
[ "MIT" ]
28
2017-10-23T07:56:58.000Z
2021-12-18T00:36:48.000Z
deps/binding.gyp
TheAkio/zlib-sync
9fcacb0e3a9701978dea67db3f398ab9461ff6e1
[ "MIT" ]
3
2018-07-27T13:06:52.000Z
2019-08-02T06:20:44.000Z
deps/binding.gyp
TheAkio/zlib-sync
9fcacb0e3a9701978dea67db3f398ab9461ff6e1
[ "MIT" ]
8
2019-04-14T02:03:14.000Z
2021-10-17T00:57:58.000Z
{ "targets": [ { "target_name": "zlib", "type": "static_library", "include_dirs": [ "config", "zlib", ], "direct_dependent_settings": { "include_dirs": [ "zlib", ],...
27.403509
57
0.307298
{ "targets": [ { "target_name": "zlib", "type": "static_library", "include_dirs": [ "config", "zlib", ], "direct_dependent_settings": { "include_dirs": [ "zlib", ],...
0
0
0
0
0
0
0
0
0
13bc09663f2ef0c2fe18e683cb3bbb160efa8127
13,323
py
Python
tf_models/mtl/RSSN.py
WeijiaLau/RSSN
a18b7ae39befa5c6927900d1fad9bda1229b20ee
[ "MIT" ]
2
2021-10-16T12:16:54.000Z
2021-10-18T06:31:32.000Z
tf_models/mtl/RSSN.py
WeijiaLau/RSSN
a18b7ae39befa5c6927900d1fad9bda1229b20ee
[ "MIT" ]
null
null
null
tf_models/mtl/RSSN.py
WeijiaLau/RSSN
a18b7ae39befa5c6927900d1fad9bda1229b20ee
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys curdir = os.path.dirname(os.path.abspath(__file__)) sys.path.insert(0, os.path.dirname(curdir)) prodir = os.path.dirname(curdir) sys.path.insert(0, prodir) import warnings warnings.filterwarnings('ignore', category=FutureWarning) os.environ['TF_CPP...
55.74477
120
0.609097
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys curdir = os.path.dirname(os.path.abspath(__file__)) sys.path.insert(0, os.path.dirname(curdir)) prodir = os.path.dirname(curdir) sys.path.insert(0, prodir) import warnings warnings.filterwarnings('ignore', category=FutureWarning) os.environ['TF_CPP...
0
0
0
12,818
0
0
0
46
89
97cb0840652b7d5ed33eddad82195baeb6935cbb
392
py
Python
wsgi.py
syz247179876/Flask-Sports
ed2d21c5a6172e7b6f3fc479bd5114fdb171896d
[ "Apache-2.0" ]
2
2020-12-02T14:20:44.000Z
2020-12-08T15:36:51.000Z
wsgi.py
syz247179876/Flask-Sports
ed2d21c5a6172e7b6f3fc479bd5114fdb171896d
[ "Apache-2.0" ]
1
2020-12-05T13:44:14.000Z
2020-12-05T13:44:14.000Z
wsgi.py
syz247179876/Flask-Sports
ed2d21c5a6172e7b6f3fc479bd5114fdb171896d
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # @Time : 2020/12/1 11:34 # @Author : # @File : wsgi.py # @Software: Pycharm # gunicorn from application import create_app app = create_app() celery = app.config.get('CELERY_INSTANCE') # celery -A wsgi:celery worker -l info if __name__ == '__main__': # flask app.run(host='127.0.0.1...
24.5
82
0.65051
# -*- coding: utf-8 -*- # @Time : 2020/12/1 下午11:34 # @Author : 司云中 # @File : wsgi.py # @Software: Pycharm # gunicorn 启动 from application import create_app app = create_app() celery = app.config.get('CELERY_INSTANCE') # celery -A wsgi:celery worker -l info if __name__ == '__main__': # 启动flask服务 app.run(host...
33
0
0
0
0
0
0
0
0
0c16b089bd64ec5ab6c9467bd1f99122c29db187
711
py
Python
tests/unit/test_sha1.py
pdellaert/bambou
f140fda6374a3151792a2dfbc6826749779c6c16
[ "BSD-3-Clause" ]
8
2015-08-21T00:06:41.000Z
2018-01-08T22:46:45.000Z
tests/unit/test_sha1.py
pdellaert/bambou
f140fda6374a3151792a2dfbc6826749779c6c16
[ "BSD-3-Clause" ]
27
2015-08-29T23:47:57.000Z
2021-06-08T02:31:23.000Z
tests/unit/test_sha1.py
pdellaert/bambou
f140fda6374a3151792a2dfbc6826749779c6c16
[ "BSD-3-Clause" ]
18
2015-08-29T23:37:55.000Z
2019-03-06T07:51:28.000Z
# -*- coding:utf-8 -*-
22.21875
80
0.64135
# -*- coding:utf-8 -*- from unittest import TestCase from bambou.utils import Sha1 class Sha1Tests(TestCase): @classmethod def setUpClass(self): """ Initialize context """ pass @classmethod def tearDownClass(self): """ Removes context """ pass def test_encrypt_w...
0
130
0
473
0
0
0
16
68
9e3f03ab60fb66826f5dae96ab49909106a93e19
2,262
py
Python
backend/game/game.py
Daanvdk/duunbox
7ea3397a48cf34faefb856b511526bffc88598be
[ "MIT" ]
null
null
null
backend/game/game.py
Daanvdk/duunbox
7ea3397a48cf34faefb856b511526bffc88598be
[ "MIT" ]
5
2021-03-30T12:57:03.000Z
2021-09-22T18:47:27.000Z
backend/game/game.py
daanvdk/duunbox
7ea3397a48cf34faefb856b511526bffc88598be
[ "MIT" ]
null
null
null
LOADED_GAMES = {}
28.632911
79
0.588859
import importlib from django.conf import settings from is_valid import is_dict_where, is_in LOADED_GAMES = {} def field_to_pred(field): if field['type'] == 'choice': return is_in(field['choices']) else: return ValueError(f'unknown field type {field["type"]!r}') class Game: def __new...
0
0
0
1,946
0
154
0
26
114
9655a5311654b85cd761c3225413b7fdedff8144
76,801
py
Python
reserve_america/spiders/payload/post.py
shaoke/automation
c4a18daccc3ceeab2cea24e79666a05d6e54b8d1
[ "MIT" ]
1
2018-04-12T23:49:22.000Z
2018-04-12T23:49:22.000Z
reserve_america/spiders/payload/post.py
shaoke/automation
c4a18daccc3ceeab2cea24e79666a05d6e54b8d1
[ "MIT" ]
null
null
null
reserve_america/spiders/payload/post.py
shaoke/automation
c4a18daccc3ceeab2cea24e79666a05d6e54b8d1
[ "MIT" ]
1
2019-04-09T15:46:51.000Z
2019-04-09T15:46:51.000Z
post_body_park_info_by_name = { "name": "Big Basin Redwoods SP" } park_post_body = { "googlePlaceSearchParameters": { "Latitude": "37.171596527103105", "Longitude": "-122.22204589843994", "Filter": "true", "AvailabilitySearchParams": { "StartDate": "8/30/2017", ...
316.053498
18,730
0.929155
post_body_park_info_by_name = { "name": "Big Basin Redwoods SP" } park_post_body = { "googlePlaceSearchParameters": { "Latitude": "37.171596527103105", "Longitude": "-122.22204589843994", "Filter": "true", "AvailabilitySearchParams": { "StartDate": "8/30/2017", ...
0
0
0
0
0
0
0
0
0
740bace25405089d5a48dceb17d8b645301428be
1,218
py
Python
src/neighborly/core/builtin/event_rules.py
ShiJbey/neighborly
5af1e3211f1ef0e25803790850e7cd3d3a49be69
[ "MIT" ]
null
null
null
src/neighborly/core/builtin/event_rules.py
ShiJbey/neighborly
5af1e3211f1ef0e25803790850e7cd3d3a49be69
[ "MIT" ]
null
null
null
src/neighborly/core/builtin/event_rules.py
ShiJbey/neighborly
5af1e3211f1ef0e25803790850e7cd3d3a49be69
[ "MIT" ]
null
null
null
from neighborly.core.life_event import LifeEventRule death_event_rule = LifeEventRule( "Death", pattern_fn=get_elder_characters, probability=0.8, ) depart_town_rule = LifeEventRule( "Depart", pattern_fn=get_adult_characters, probability=0.3, )
34.8
86
0.767652
from typing import cast from neighborly.core.ecs import World from neighborly.core.life_event import LifeEventRule from neighborly.core.builtin.statuses import ElderStatus, AdultStatus from neighborly.core.builtin.events import DeathEvent from neighborly.core.time import SimDateTime from neighborly.core.character impor...
0
0
0
0
616
0
0
151
178
22a3355f5dead8aadfae1e539b1e5970c2824229
5,931
py
Python
salt/ext/tornado/test/locale_test.py
yuriks/salt
d2a5bd8adddb98ec1718d79384aa13b4f37e8028
[ "Apache-2.0", "MIT" ]
1
2020-03-31T22:51:16.000Z
2020-03-31T22:51:16.000Z
salt/ext/tornado/test/locale_test.py
yuriks/salt
d2a5bd8adddb98ec1718d79384aa13b4f37e8028
[ "Apache-2.0", "MIT" ]
null
null
null
salt/ext/tornado/test/locale_test.py
yuriks/salt
d2a5bd8adddb98ec1718d79384aa13b4f37e8028
[ "Apache-2.0", "MIT" ]
1
2021-09-30T07:00:01.000Z
2021-09-30T07:00:01.000Z
# pylint: skip-file from __future__ import absolute_import, division, print_function
44.931818
123
0.636149
# pylint: skip-file from __future__ import absolute_import, division, print_function import datetime import os import shutil import tempfile import tornado.locale from salt.ext.tornado.escape import utf8, to_unicode from salt.ext.tornado.test.util import unittest, skipOnAppEngine from salt.ext.tornado.util import uni...
0
1,031
0
4,498
0
0
0
67
247
b5d465f4a7da599c9bc5c6bc02b279346a2a292d
824
py
Python
UCourse/exams/migrations/0002_auto_20200801_2134.py
Natsu1270/UCourse
e8c814d91e54f5f51e4a0fa2df177ebb59544dc2
[ "MIT" ]
1
2020-08-31T22:40:27.000Z
2020-08-31T22:40:27.000Z
UCourse/exams/migrations/0002_auto_20200801_2134.py
Natsu1270/UCourse
e8c814d91e54f5f51e4a0fa2df177ebb59544dc2
[ "MIT" ]
13
2020-08-05T16:17:09.000Z
2022-03-12T00:18:42.000Z
UCourse/exams/migrations/0002_auto_20200801_2134.py
Natsu1270/UCourse
e8c814d91e54f5f51e4a0fa2df177ebb59544dc2
[ "MIT" ]
null
null
null
# Generated by Django 3.0.3 on 2020-08-01 14:34
28.413793
184
0.569175
# Generated by Django 3.0.3 on 2020-08-01 14:34 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('exams', '0001_initial'), ] operations = [ migrations.AddField( model_name='exam', name='expired_date', f...
0
0
0
710
0
0
0
19
46
9426ce6d92436c099a85f3db2759888096c317a8
13,760
py
Python
test/test_database.py
pablopetra-eb/nameko-sqlalchemy
ee9673ab18b5a7e14fa848fafdaff7435d2eca38
[ "Apache-2.0" ]
45
2015-04-09T07:20:10.000Z
2019-01-29T07:19:56.000Z
test/test_database.py
pablopetra-eb/nameko-sqlalchemy
ee9673ab18b5a7e14fa848fafdaff7435d2eca38
[ "Apache-2.0" ]
25
2015-03-31T17:18:50.000Z
2019-01-22T20:39:55.000Z
test/test_database.py
pablopetra-eb/nameko-sqlalchemy
ee9673ab18b5a7e14fa848fafdaff7435d2eca38
[ "Apache-2.0" ]
23
2015-05-23T22:24:25.000Z
2019-01-25T12:15:32.000Z
from sqlalchemy.ext.declarative import declarative_base DeclBase = declarative_base(name='examplebase')
29.401709
76
0.653924
from weakref import WeakKeyDictionary import pytest from mock import Mock, patch from nameko.containers import ServiceContainer, WorkerContext from nameko.testing.services import dummy, entrypoint_hook from nameko_sqlalchemy.database import ( DB_URIS_KEY, Database, Session, ) from sqlalchemy import Column,...
0
5,127
0
6,308
0
1,401
0
203
599
d7435d4c33e3dee77d56d923959a124ce263258e
162,043
py
Python
pysnmp-with-texts/COLUBRIS-802DOT11-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
8
2019-05-09T17:04:00.000Z
2021-06-09T06:50:51.000Z
pysnmp-with-texts/COLUBRIS-802DOT11-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
4
2019-05-31T16:42:59.000Z
2020-01-31T21:57:17.000Z
pysnmp-with-texts/COLUBRIS-802DOT11-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module COLUBRIS-802DOT11-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/COLUBRIS-802DOT11-MIB # Produced by pysmi-0.3.4 at Wed May 1 12:25:40 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (def...
162.530592
12,623
0.792857
# # PySNMP MIB module COLUBRIS-802DOT11-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/COLUBRIS-802DOT11-MIB # Produced by pysmi-0.3.4 at Wed May 1 12:25:40 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (def...
0
0
0
284
0
0
0
0
22
698bc2021782769283e340a03d0c4e676926d06f
1,947
py
Python
utils/data_verification.py
VoprosiKira/l2
49f3624b4b2d25329a8e3aa166b03735cf759c37
[ "MIT" ]
10
2018-03-14T06:17:06.000Z
2022-03-10T05:33:34.000Z
utils/data_verification.py
VoprosiKira/l2
49f3624b4b2d25329a8e3aa166b03735cf759c37
[ "MIT" ]
512
2018-09-10T07:37:34.000Z
2022-03-30T02:23:43.000Z
utils/data_verification.py
D00dleman/l2
0870144537ee340cd8db053a608d731e186f02fb
[ "MIT" ]
24
2018-07-31T05:52:12.000Z
2022-02-08T00:39:41.000Z
from typing import Callable, Dict, Union import simplejson from django.http import Http404 from clients.models import Card def data_parse(data: Union[dict, str, bytes], keys_types: Dict[str, Union[Callable, str, None]], default_values: dict = None) -> list: """ . >>> request_data = {'s': 'string', 'i...
36.055556
134
0.582435
from typing import Callable, Dict, Union from django.db import models import simplejson from django.http import Http404 from clients.models import Card def as_model(model: models.Model): def internal(pk: Union[int, str]): return model.objects.filter(pk=pk).first() return internal def data_pars...
40
0
0
0
0
127
0
7
45
f736c2f98e04eecb89ffda818d0aed23fa7d8694
85
py
Python
api/immfly/environments/local_settings.py
pollitosabroson/fly
2f0846d26e4482f723a990bbd18b43220b3c4521
[ "Apache-2.0" ]
null
null
null
api/immfly/environments/local_settings.py
pollitosabroson/fly
2f0846d26e4482f723a990bbd18b43220b3c4521
[ "Apache-2.0" ]
null
null
null
api/immfly/environments/local_settings.py
pollitosabroson/fly
2f0846d26e4482f723a990bbd18b43220b3c4521
[ "Apache-2.0" ]
null
null
null
INSTALLED_APPS += [ # NOQA 'drf_yasg', ]
14.166667
37
0.635294
from immfly.settings import * # NOQA INSTALLED_APPS += [ # NOQA 'drf_yasg', ]
0
0
0
0
0
0
0
8
30
c57cd711a3aadfb46a4f7089c6f52d6fa665e59c
118
py
Python
carts/admin.py
BassamMismar/store-django
c614459c38c20d8caebf15fad9e054091c8e88ba
[ "MIT" ]
null
null
null
carts/admin.py
BassamMismar/store-django
c614459c38c20d8caebf15fad9e054091c8e88ba
[ "MIT" ]
7
2021-03-30T13:50:45.000Z
2022-01-13T03:04:12.000Z
carts/admin.py
bassamaljeed/store-django
c614459c38c20d8caebf15fad9e054091c8e88ba
[ "MIT" ]
null
null
null
from django.contrib import admin # Register your models here. from .models import Cart admin.site.register(Cart)
11.8
32
0.771186
from django.contrib import admin # Register your models here. from .models import Cart admin.site.register(Cart)
0
0
0
0
0
0
0
0
0
cd7ba69c49bb5e6a99ffcaf20f6c653b34a883c2
217
py
Python
pytomorrowio/__init__.py
raman325/pytomorrowio
2a698c3fd5686067bd8b97fd83cba6f8b125e00d
[ "MIT" ]
null
null
null
pytomorrowio/__init__.py
raman325/pytomorrowio
2a698c3fd5686067bd8b97fd83cba6f8b125e00d
[ "MIT" ]
null
null
null
pytomorrowio/__init__.py
raman325/pytomorrowio
2a698c3fd5686067bd8b97fd83cba6f8b125e00d
[ "MIT" ]
null
null
null
"""Top-level package for Python Tomorrow.io API.""" __author__ = """raman325""" __email__ = "7243222+raman325@users.noreply.github.com" __version__ = "0.1.0"
27.125
56
0.75576
"""Top-level package for Python Tomorrow.io API.""" from .pytomorrowio import TomorrowioV4, TomorrowioV4Sync __author__ = """raman325""" __email__ = "7243222+raman325@users.noreply.github.com" __version__ = "0.1.0"
0
0
0
0
0
0
0
35
23
d54e8e0c94914642114d068b7341adc0e266122e
319
py
Python
src/controllers/books.py
ageuribeiro/apirest_comflask
516b373a2c8aec12587b93865976ec37ec75f076
[ "MIT" ]
null
null
null
src/controllers/books.py
ageuribeiro/apirest_comflask
516b373a2c8aec12587b93865976ec37ec75f076
[ "MIT" ]
null
null
null
src/controllers/books.py
ageuribeiro/apirest_comflask
516b373a2c8aec12587b93865976ec37ec75f076
[ "MIT" ]
null
null
null
from flask import app from server.instance import server app, api = server.app, server.api books_db = [ {'id':0,'title':'War and Peacce'}, {'id':1,'title':'Clean Code'} ]
22.785714
40
0.673981
from flask import Flask, app from flask_restplus import Api, Resource from server.instance import server app, api = server.app, server.api books_db = [ {'id':0,'title':'War and Peacce'}, {'id':1,'title':'Clean Code'} ] @api.route('/books') class BookList(Resource): def get(self,): return books_db
0
69
0
0
0
0
0
26
45
35275936d610f0af6241487e73f0ca7f9ff70942
4,981
py
Python
tzdealer/tzdealer/doctype/website_connector/website_connector.py
Lewinta/tzdealer
3e6a8f39e16029b217ae84bed806cb79bbc89dbf
[ "MIT" ]
null
null
null
tzdealer/tzdealer/doctype/website_connector/website_connector.py
Lewinta/tzdealer
3e6a8f39e16029b217ae84bed806cb79bbc89dbf
[ "MIT" ]
null
null
null
tzdealer/tzdealer/doctype/website_connector/website_connector.py
Lewinta/tzdealer
3e6a8f39e16029b217ae84bed806cb79bbc89dbf
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2020, TZCODE SRL and contributors # For license information, please see license.txt from __future__ import unicode_literals
28.626437
115
0.650472
# -*- coding: utf-8 -*- # Copyright (c) 2020, TZCODE SRL and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document import requests import json import traceback from tzdealer.hook.item import cast_to_post, cast_im...
0
0
0
4,600
0
0
0
37
178
3a577303dee8bfea56a2f18d35a6d0c6f0f5033e
212
py
Python
1_Python/Desafios/031_Viagem_autocarro.py
guilhermebaos/Curso-em-Video-Python
0e67f6f59fa3216889bd2dde4a26b532c7c545fd
[ "MIT" ]
null
null
null
1_Python/Desafios/031_Viagem_autocarro.py
guilhermebaos/Curso-em-Video-Python
0e67f6f59fa3216889bd2dde4a26b532c7c545fd
[ "MIT" ]
null
null
null
1_Python/Desafios/031_Viagem_autocarro.py
guilhermebaos/Curso-em-Video-Python
0e67f6f59fa3216889bd2dde4a26b532c7c545fd
[ "MIT" ]
null
null
null
km = float(input('De quantos kilmetros ser a viagem? ')) if km <= 200: print('A viagem custar {:.2f} (0.1/km)'.format(km * 0.1)) else: print('A visgem custar {:.2f} (0.09/km)'.format(km * 0.09))
35.333333
67
0.589623
km = float(input('De quantos kilómetros será a viagem? ')) if km <= 200: print('A viagem custará {:.2f}€ (0.1€/km)'.format(km * 0.1)) else: print('A visgem custará {:.2f} € (0.09€/km)'.format(km * 0.09))
20
0
0
0
0
0
0
0
0
a8c0796e8f4a6603003f8fc3daa7fa7795816053
1,407
py
Python
lego/utils/push.py
mathiazom/lego
4c6c80fbe023b67bf68548ad806af4ff944da92c
[ "MIT" ]
null
null
null
lego/utils/push.py
mathiazom/lego
4c6c80fbe023b67bf68548ad806af4ff944da92c
[ "MIT" ]
null
null
null
lego/utils/push.py
mathiazom/lego
4c6c80fbe023b67bf68548ad806af4ff944da92c
[ "MIT" ]
null
null
null
from structlog import get_logger log = get_logger()
30.586957
97
0.660981
from django.template.loader import render_to_string from push_notifications.models import APNSDevice, GCMDevice from structlog import get_logger from lego.apps.feeds.models import NotificationFeed log = get_logger() class PushMessage: def __init__(self, user, template, context, target=None): self.user ...
0
0
0
1,164
0
0
0
98
91
888bf441766530698ec0d863a2d9a55d65eb6d80
2,051
py
Python
users/views.py
alcibiadesBustillo/platzigram
c3aaea271f7819b47827ef49d467d6d53747b7c8
[ "MIT" ]
null
null
null
users/views.py
alcibiadesBustillo/platzigram
c3aaea271f7819b47827ef49d467d6d53747b7c8
[ "MIT" ]
null
null
null
users/views.py
alcibiadesBustillo/platzigram
c3aaea271f7819b47827ef49d467d6d53747b7c8
[ "MIT" ]
null
null
null
"""Users views""" # Django from django.contrib.auth import authenticate, login from django.shortcuts import render, redirect # Exceptions from django.db.utils import IntegrityError # Models from django.contrib.auth.models import User from .models import Profile # Create your views here. def loging_view(request): ...
32.046875
107
0.662116
"""Users views""" # Django from django.contrib.auth import authenticate, login, logout from django.contrib.auth.decorators import login_required from django.shortcuts import render, redirect, HttpResponse # Exceptions from django.db.utils import IntegrityError # Models from django.contrib.auth.models import User from...
0
100
0
0
0
63
0
58
66
d43ea6762130ce89d5c77593e689c9ea426a9e50
2,184
py
Python
visual_core.py
pyroy/Pykemon
15f8eb0c6ed21333598a58cd140b71d0c8cf3ff1
[ "MIT" ]
null
null
null
visual_core.py
pyroy/Pykemon
15f8eb0c6ed21333598a58cd140b71d0c8cf3ff1
[ "MIT" ]
null
null
null
visual_core.py
pyroy/Pykemon
15f8eb0c6ed21333598a58cd140b71d0c8cf3ff1
[ "MIT" ]
null
null
null
"""The helper functions for the visuals are defined here. These functions provide textures or modify pygame Surfaces or Rects in ways which are convenient to use for multiple scenes.""" import pygame # This dict contains references to all textures which are loaded with get_texture(), # and functions as a cache. With t...
38.315789
98
0.694139
"""The helper functions for the visuals are defined here. These functions provide textures or modify pygame Surfaces or Rects in ways which are convenient to use for multiple scenes.""" import pygame # This dict contains references to all textures which are loaded with get_texture(), # and functions as a cache. With t...
2
0
0
0
0
893
0
0
46
7644f91b196f6019849e4ec6c238f98168df1f8e
137
py
Python
setup.py
frederikhermans/focus
6228ba5fc8b41c74f2e22d5c2de20040b206d70a
[ "BSD-3-Clause" ]
6
2016-04-18T09:40:16.000Z
2021-01-05T22:03:54.000Z
setup.py
horizon00/focus
6228ba5fc8b41c74f2e22d5c2de20040b206d70a
[ "BSD-3-Clause" ]
1
2017-12-10T14:13:50.000Z
2017-12-10T14:13:50.000Z
setup.py
horizon00/focus
6228ba5fc8b41c74f2e22d5c2de20040b206d70a
[ "BSD-3-Clause" ]
5
2018-01-04T14:59:50.000Z
2018-10-20T14:40:21.000Z
from setuptools import setup setup(name='focus', entry_points='''[console_scripts] focus=focus.cli:main''')
22.833333
46
0.605839
from setuptools import setup setup(name='focus', entry_points='''[console_scripts] focus=focus.cli:main''')
0
0
0
0
0
0
0
0
0
d9d21defb939f4f603706a8f28387f53243753a9
2,905
py
Python
encrypter.py
a-k-r-a-k-r/Simple_Message_Encrypter
da97caaa995d9c4faafc60c52d3ec0a6e8df721e
[ "MIT" ]
null
null
null
encrypter.py
a-k-r-a-k-r/Simple_Message_Encrypter
da97caaa995d9c4faafc60c52d3ec0a6e8df721e
[ "MIT" ]
null
null
null
encrypter.py
a-k-r-a-k-r/Simple_Message_Encrypter
da97caaa995d9c4faafc60c52d3ec0a6e8df721e
[ "MIT" ]
null
null
null
''' program: Simple Message Encrypter author : akr github : a-k-r-a-k-r ''' #import necessary modules import tkinter from tkinter import BOTH #Defining root window root=tkinter.Tk() root.title("Message Encrypter") root.iconbitmap("resources/icons/encrypter.ico") #mostly used characters expected_char="q...
31.923077
127
0.736661
''' program: Simple Message Encrypter author : akr github : a-k-r-a-k-r ''' #import necessary modules import tkinter import pyperclip from tkinter import DISABLED,messagebox,BOTH,END #Defining root window root=tkinter.Tk() root.title("Message Encrypter") root.iconbitmap("resources/icons/encrypter.ico") ...
0
0
0
0
0
982
0
19
90
ed398e16d3426a14b58fb56bab389ad5a15c9c39
3,566
py
Python
wrapper_al/al_1_sampling.py
ElvinOuyang/ActiveCoder
dad012da38b8a863a5f0710e637976b6668aa037
[ "MIT" ]
null
null
null
wrapper_al/al_1_sampling.py
ElvinOuyang/ActiveCoder
dad012da38b8a863a5f0710e637976b6668aa037
[ "MIT" ]
null
null
null
wrapper_al/al_1_sampling.py
ElvinOuyang/ActiveCoder
dad012da38b8a863a5f0710e637976b6668aa037
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np import pickle import sys sys.path.append('..') from pathlib import Path import logging import configparser import argparse import ui_utils arg_parser = argparse.ArgumentParser(description='Run sampling based on config file') arg_parser.add_argument('--config_path', metavar='con...
36.020202
95
0.73668
import pandas as pd import numpy as np import os import pickle import sys sys.path.append('..') from sklearn.manifold import TSNE from sklearn.cluster import KMeans import seaborn as sns import matplotlib.pyplot as plt from pathlib import Path import logging import configparser import argparse import ui_utils import...
0
0
0
0
0
0
0
18
133
96695474e074de196f6ba7c24f4f4d1164375066
6,598
py
Python
src/python/lib/PyDBI.py
NCAR/rda-globus
e27527d68c6f6c70dda56216f3bb1e12b974ad1a
[ "MIT" ]
1
2019-02-12T20:38:22.000Z
2019-02-12T20:38:22.000Z
src/python/lib/PyDBI.py
NCAR/rda-globus
e27527d68c6f6c70dda56216f3bb1e12b974ad1a
[ "MIT" ]
1
2019-03-28T20:37:31.000Z
2019-03-28T20:37:31.000Z
src/python/lib/PyDBI.py
NCAR/rda-globus
e27527d68c6f6c70dda56216f3bb1e12b974ad1a
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # ################################################################################## # # Title : PyDBI.py # Author : Thomas Cram, tcram@ucar.edu # Date : 02/06/2015 # Purpose : Python module for MySQL database functions # # Work File : $HOME/lib/python/PyDBI.py* # Test File : $HOME/...
29.455357
103
0.567445
#!/usr/bin/env python3 # ################################################################################## # # Title : PyDBI.py # Author : Thomas Cram, tcram@ucar.edu # Date : 02/06/2015 # Purpose : Python module for MySQL database functions # # Work File : $HOME/lib/python/PyDBI.py* # Test File : $HOME/...
0
0
0
0
0
3,007
0
39
203
be5c2fab479b38d09e3eb984b205f3afe0f504b4
2,064
py
Python
packager/app/test/test_env.py
ivanvgdev/shaka-packager
5bf8ad5ed5e6adeed63a264dd43ebb9d649f6621
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
4
2018-11-08T21:37:13.000Z
2019-03-18T18:56:51.000Z
packager/app/test/test_env.py
ivanvgdev/shaka-packager
5bf8ad5ed5e6adeed63a264dd43ebb9d649f6621
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2022-02-10T12:40:20.000Z
2022-02-10T12:40:20.000Z
packager/app/test/test_env.py
aminyazdanpanah/shaka-packager
ea2b192b92ce24c68e48d9f29f7aa176e40ef875
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
3
2018-10-26T20:40:52.000Z
2020-04-01T12:05:42.000Z
#!/usr/bin/python # # Copyright 2014 Google Inc. All Rights Reserved. # # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file or at # https://developers.google.com/open-source/licenses/bsd """Packager testing global objects and attributes. Please do not refer to this mod...
32.761905
78
0.771318
#!/usr/bin/python # # Copyright 2014 Google Inc. All Rights Reserved. # # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file or at # https://developers.google.com/open-source/licenses/bsd """Packager testing global objects and attributes. Please do not refer to this mod...
0
0
0
0
0
0
0
0
0
b9a8f567efca55bb6c43cbc4046e9053b17d9b5e
6,209
py
Python
templates/cpp/cpp.py
STMiki/project-maker
b8cca17aa7edf7f1b9b0036056c450552e5f370f
[ "MIT" ]
null
null
null
templates/cpp/cpp.py
STMiki/project-maker
b8cca17aa7edf7f1b9b0036056c450552e5f370f
[ "MIT" ]
null
null
null
templates/cpp/cpp.py
STMiki/project-maker
b8cca17aa7edf7f1b9b0036056c450552e5f370f
[ "MIT" ]
null
null
null
import pathlib ROOT = pathlib.Path(__file__).parent.resolve() CONFIG_FILE = "config.json" DEPENDANCY_PATH = "_deps" COMMON_PATH = "_common" MULTI_PATH = "_multi" def generate_cmake(path: str, name: str): """ cmake_minimum_required(VERSION 3.10) # Set up project project( <PNAME> VERSION 1.0 LANGUAGES ...
28.74537
109
0.560477
import os import json import shutil import pathlib ROOT = pathlib.Path(__file__).parent.resolve() CONFIG_FILE = "config.json" DEPENDANCY_PATH = "_deps" COMMON_PATH = "_common" MULTI_PATH = "_multi" class ConanFile(): """""" packages = [] options = [] generators = [] def read(self, path): ...
0
0
0
2,373
0
2,848
0
-30
249
75812343f61f6b1f52a2db5bf10893a331758a8b
6,909
py
Python
scripts/genbank_3D_taylorf2reducedspin.py
adam-coogan/diffbank
40629875c60fb8cb352402dfef87f9b387dd59fc
[ "MIT" ]
6
2022-01-18T11:48:26.000Z
2022-03-23T13:13:10.000Z
scripts/genbank_3D_taylorf2reducedspin.py
adam-coogan/diffbank
40629875c60fb8cb352402dfef87f9b387dd59fc
[ "MIT" ]
null
null
null
scripts/genbank_3D_taylorf2reducedspin.py
adam-coogan/diffbank
40629875c60fb8cb352402dfef87f9b387dd59fc
[ "MIT" ]
4
2022-01-18T13:53:33.000Z
2022-03-01T15:32:43.000Z
from math import pi from typing import Tuple import jax.numpy as jnp from jax import random from scipy.optimize import minimize_scalar from diffbank.constants import MSUN, C, G from diffbank.utils import Array, PRNGKeyArray from diffbank.waveforms.taylorf2reducedspin import get_th_boundary_interps """ Generate a Taylo...
30.302632
97
0.631206
import os from math import pi from typing import Tuple import click import jax import jax.numpy as jnp from jax import random from scipy.optimize import minimize_scalar from diffbank.bank import Bank from diffbank.constants import MSUN, C, G from diffbank.utils import Array, PRNGKeyArray from diffbank.waveforms.taylo...
0
2,872
0
0
0
632
0
-13
204
84b03fc307c4bd863b693aa0b2fc223bbdac531a
4,964
py
Python
src/api_wrapper/census_api/census_boundaries.py
MSDuncan82/api_wrapper
602d0ad901cc0c95a302404af609ca6f28d842ee
[ "MIT" ]
null
null
null
src/api_wrapper/census_api/census_boundaries.py
MSDuncan82/api_wrapper
602d0ad901cc0c95a302404af609ca6f28d842ee
[ "MIT" ]
null
null
null
src/api_wrapper/census_api/census_boundaries.py
MSDuncan82/api_wrapper
602d0ad901cc0c95a302404af609ca6f28d842ee
[ "MIT" ]
null
null
null
if __name__ == "__main__": census_boundaries = CensusBoundaries()
32.657895
95
0.588235
from api_wrapper.census_api.census_api import CensusAPI import geopandas as gpd import os import requests import io import zipfile class CensusBoundaries(CensusAPI): """ API wrapper for retrieving census boundary files Attributes ---------- year: int The year of census data to be accessed...
0
0
0
4,736
0
0
0
-1
155
ccc1db33a1eeb91579952c4131151b7f0e7a644b
2,692
py
Python
samples/objectDetection.py
windriver-codecamp/alpha_drone
2845784b93296f1ff8d259418208d24202f05c5d
[ "MIT" ]
null
null
null
samples/objectDetection.py
windriver-codecamp/alpha_drone
2845784b93296f1ff8d259418208d24202f05c5d
[ "MIT" ]
null
null
null
samples/objectDetection.py
windriver-codecamp/alpha_drone
2845784b93296f1ff8d259418208d24202f05c5d
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import argparse import os import cv2 cv2_base_dir = os.path.dirname(os.path.abspath(cv2.__file__)) KEY_ESC = 27 WIN_NAME = "Capture - Face detection" parser = argparse.ArgumentParser( description="Code for Cascade Classifier tutorial.") default_face = os.path.joi...
30.590909
76
0.61107
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import argparse import os import cv2 cv2_base_dir = os.path.dirname(os.path.abspath(cv2.__file__)) KEY_ESC = 27 WIN_NAME = "Capture - Face detection" def detectAndDisplay(frame): frame_gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) frame_gray = cv2.equalizeHis...
0
0
0
0
0
776
0
0
23
f6facd9b903ca6a7b76733866f3928c5597e8f8d
2,779
py
Python
dataset/hcp/test/read_hcp_dti.py
cassianobecker/dnn
bb2ea04f77733de9df10f795bb049ac3b9d30478
[ "MIT" ]
3
2020-02-21T21:35:07.000Z
2020-09-29T15:20:00.000Z
dataset/hcp/test/read_hcp_dti.py
cassianobecker/dnn
bb2ea04f77733de9df10f795bb049ac3b9d30478
[ "MIT" ]
27
2020-02-20T21:00:23.000Z
2020-05-22T15:23:25.000Z
dataset/hcp/test/read_hcp_dti.py
cassianobecker/dnn
bb2ea04f77733de9df10f795bb049ac3b9d30478
[ "MIT" ]
null
null
null
import os, glob import nibabel as nib import numpy as np from IPython.display import clear_output def update_progress(progress, my_str = ''): """ Progress bar """ bar_length = 20 if isinstance(progress, int): progress = float(progress) if not isinstance(progress, float): progress ...
32.694118
113
0.595898
import os, glob import nibabel as nib import numpy as np from IPython.display import clear_output def update_progress(progress, my_str = ''): """ Progress bar """ bar_length = 20 if isinstance(progress, int): progress = float(progress) if not isinstance(progress, float): progress ...
0
0
0
0
0
0
0
0
0
43731964068c110983a280a5b6e5d47d9487b9b6
2,742
py
Python
apps/machine/views.py
phdevs1/CyberCaffe
bee989a6d8d59205ee2645e986b4b0f16d00bf05
[ "Apache-2.0" ]
null
null
null
apps/machine/views.py
phdevs1/CyberCaffe
bee989a6d8d59205ee2645e986b4b0f16d00bf05
[ "Apache-2.0" ]
7
2021-03-19T08:39:34.000Z
2022-03-12T00:15:38.000Z
apps/machine/views.py
pioh123/CyberCaffe
bee989a6d8d59205ee2645e986b4b0f16d00bf05
[ "Apache-2.0" ]
null
null
null
# Create your views here.
33.851852
91
0.736324
from django.shortcuts import render, redirect from django.core.exceptions import ObjectDoesNotExist from rest_framework import generics from .models import Machine, Game from .form import MachineForm, GameForm from django.db.models import Q from django.core.paginator import Paginator from django.views.generic import Te...
0
0
0
1,546
0
368
0
324
474
cb2866336ffef5762c606129ba73c2b438c8a362
23
py
Python
recipe_scrapers/__version__.py
squat/recipe-scrapers
ff378b3ba4ae7ff4cbc113ca13991f887c1c70e7
[ "MIT" ]
null
null
null
recipe_scrapers/__version__.py
squat/recipe-scrapers
ff378b3ba4ae7ff4cbc113ca13991f887c1c70e7
[ "MIT" ]
1
2022-01-08T10:49:17.000Z
2022-01-08T10:49:30.000Z
recipe_scrapers/__version__.py
AlexRogalskiy/recipe-scrapers
ff378b3ba4ae7ff4cbc113ca13991f887c1c70e7
[ "MIT" ]
1
2022-01-08T10:49:09.000Z
2022-01-08T10:49:09.000Z
__version__ = "13.0.1"
11.5
22
0.652174
__version__ = "13.0.1"
0
0
0
0
0
0
0
0
0
027cd3890826a051d8bc274d012bdc9b701ed37c
27,143
py
Python
xfaster/batch_tools.py
SPIDER-CMB/xfaster
1b8e56d775f2c3a8693d1372ae461392c21da7ca
[ "MIT" ]
1
2021-03-25T14:15:44.000Z
2021-03-25T14:15:44.000Z
xfaster/batch_tools.py
annegambrel/xfaster
03d5a2971d3cc19ae360d78995e3575f3f678d6e
[ "MIT" ]
7
2021-04-20T23:34:38.000Z
2021-08-24T00:00:53.000Z
xfaster/batch_tools.py
SPIDER-CMB/xfaster
1b8e56d775f2c3a8693d1372ae461392c21da7ca
[ "MIT" ]
1
2021-05-18T16:43:54.000Z
2021-05-18T16:43:54.000Z
import os import stat import shutil import subprocess as sp import tempfile import re import datetime as dt from warnings import warn import numpy as np __all__ = ["get_job_logfile", "batch_sub", "batch_group", "JobArgumentParser"] def get_job_logfile(): """ Generate a path to use for the output log, based o...
35.023226
102
0.53126
import os import stat import shutil import subprocess as sp import tempfile import re import datetime as dt from warnings import warn import numpy as np import argparse as ap __all__ = ["get_job_logfile", "batch_sub", "batch_group", "JobArgumentParser"] def get_job_logfile(): """ Generate a path to use for t...
0
0
0
11,340
0
0
0
0
45
817631d4d6dd316039b564b020239bc2c061b50a
13,175
py
Python
openRL/AI.py
gautam-sharma1/openRL
14310a97a328fe5682a01ee85d83a6b5e1ae29ca
[ "MIT" ]
1
2021-04-27T22:26:10.000Z
2021-04-27T22:26:10.000Z
openRL/AI.py
gautam-sharma1/openRL
14310a97a328fe5682a01ee85d83a6b5e1ae29ca
[ "MIT" ]
null
null
null
openRL/AI.py
gautam-sharma1/openRL
14310a97a328fe5682a01ee85d83a6b5e1ae29ca
[ "MIT" ]
null
null
null
import torch.nn as nn import torch.optim as optim import torch.autograd as autograd # TODO: # TODO: # class ValueIteration(): # def __init__(self): # self.state_list = [0 for _ in range(360)] # self.transition_probability = [0.5,0.5] # # def act(self): # usage model = DQL()
33.35443
109
0.597495
import torch import torch.nn as nn import torch.optim as optim import torch.autograd as autograd import torch.nn.functional as F import random import os from abc import ABC, abstractmethod class Algorithm(ABC): """ Abstract class. """ def __init__(self): super().__init__() def __repr__(s...
0
374
0
12,131
0
0
0
-5
360
ddde910c9f672c2b42d61e71b3496e1f82d60060
1,288
py
Python
maxprofit_template.py
4msang/CSE101_SUNYK
98e2483a7d8faf95b0381f3941d73cd5eed8df4d
[ "MIT" ]
null
null
null
maxprofit_template.py
4msang/CSE101_SUNYK
98e2483a7d8faf95b0381f3941d73cd5eed8df4d
[ "MIT" ]
null
null
null
maxprofit_template.py
4msang/CSE101_SUNYK
98e2483a7d8faf95b0381f3941d73cd5eed8df4d
[ "MIT" ]
null
null
null
import random ######## Test Cases example = [23171, 21011, 21123, 21366, 21013, 21367] v_pattern = [40, 30, 20, 10, 20, 30, 40] simple_desc = [50, 40, 30, 20, 10] simple_asc = [10, 20, 30, 40, 50] empty = [] simple = [0, 200000] two_hills = [30, 20, 22, 24, 26, 28, 20, 10, 0, 2, 4, 7] max_profit_after_max_and_before...
24.769231
120
0.645963
import random def solution(A): # delete 'pass' and fill in your code pass ######## Test Cases example = [23171, 21011, 21123, 21366, 21013, 21367] v_pattern = [40, 30, 20, 10, 20, 30, 40] simple_desc = [50, 40, 30, 20, 10] simple_asc = [10, 20, 30, 40, 50] empty = [] simple = [0, 200000] two_hills = [30, 20...
0
0
0
0
0
46
0
0
23
13e06580359aed0584917d364ff9ce025354075d
7,164
py
Python
aries_cloudagent/protocols/present_proof/v2_0/models/pres_exchange.py
antsab20/aries-cloudagent-python
c8fa5894508d2ecd0d8be933f5ff8a50e5c582e8
[ "Apache-2.0" ]
1
2021-04-15T09:44:00.000Z
2021-04-15T09:44:00.000Z
aries_cloudagent/protocols/present_proof/v2_0/models/pres_exchange.py
Mateus-dang/aries-cloudagent-python
d64c3a0102b269fac9b39f30815829a64b74e9ce
[ "Apache-2.0" ]
null
null
null
aries_cloudagent/protocols/present_proof/v2_0/models/pres_exchange.py
Mateus-dang/aries-cloudagent-python
d64c3a0102b269fac9b39f30815829a64b74e9ce
[ "Apache-2.0" ]
null
null
null
"""Presentation exchange record.""" from os import environ unencrypted_tags = environ.get("EXCH_UNENCRYPTED_TAGS", "False").upper() == "TRUE"
31.84
86
0.591709
"""Presentation exchange record.""" from os import environ from typing import Any, Mapping from marshmallow import fields, validate from .....messaging.models.base_record import BaseExchangeRecord, BaseExchangeSchema from .....messaging.valid import UUIDFour from ..messages.pres import V20Pres from ..messages.pres_...
0
1,487
0
5,093
0
0
0
213
225
a2b5abbe9aad8518195929237eac0e0a4cebb4d2
2,324
py
Python
rapidsms/backends/base.py
AndreLesa/rapidsms
b7f7366574733388d5e59c99dcceacf59f59080e
[ "BSD-3-Clause" ]
2
2019-04-04T20:48:52.000Z
2019-11-13T09:09:07.000Z
rapidsms/backends/base.py
johanneswilm/rapidsms
d10f872496da7a5516aa6bcdf0552fc2ca0aca57
[ "BSD-3-Clause" ]
null
null
null
rapidsms/backends/base.py
johanneswilm/rapidsms
d10f872496da7a5516aa6bcdf0552fc2ca0aca57
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4
31.405405
78
0.648451
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 from rapidsms.utils.modules import import_class from rapidsms.log.mixin import LoggerMixin class BackendBase(object, LoggerMixin): """Base class for outbound backend functionality.""" @classmethod def find(cls, module_name): """ Helper f...
0
616
0
1,541
0
0
0
47
68
32404ac6d5041b1a58ed2e5e05bdbddf99646862
17,217
py
Python
adhdp_cnn.py
zysoong/ai-greedy-snake
99e7dde9f623decda1f905cc9c576a011c466b4e
[ "MIT" ]
1
2022-02-23T03:15:53.000Z
2022-02-23T03:15:53.000Z
adhdp_cnn.py
zysoong/ai-snake
99e7dde9f623decda1f905cc9c576a011c466b4e
[ "MIT" ]
6
2021-01-06T13:05:40.000Z
2021-01-14T19:59:26.000Z
adhdp_cnn.py
zysoong/ai-snake
99e7dde9f623decda1f905cc9c576a011c466b4e
[ "MIT" ]
null
null
null
import numpy as np #import curses import sys import warnings warnings.filterwarnings("ignore") np.set_printoptions(threshold=sys.maxsize) if __name__ == "__main__": d = Driver() d.run()
38.952489
165
0.555207
from greedysnake import GreedySnake, Direction, Signal import time import numpy as np #import curses from threading import Thread import subprocess import tensorflow as tf from tensorflow import keras from tensorflow.keras import backend as K from collections import OrderedDict import random import configparser from co...
0
0
0
16,639
0
0
0
47
332
adbc9e14b29fd06afb05eb7c8cefec2aeb790e3d
3,857
py
Python
gazoo_device/protos/locking_service_pb2.py
dedsec-9/gazoo-device
5ed2867c258da80e53b6aae07ec7a65efe473a28
[ "Apache-2.0" ]
14
2020-11-05T23:23:32.000Z
2022-03-01T18:59:29.000Z
gazoo_device/protos/locking_service_pb2.py
dedsec-9/gazoo-device
5ed2867c258da80e53b6aae07ec7a65efe473a28
[ "Apache-2.0" ]
null
null
null
gazoo_device/protos/locking_service_pb2.py
dedsec-9/gazoo-device
5ed2867c258da80e53b6aae07ec7a65efe473a28
[ "Apache-2.0" ]
5
2021-05-20T22:52:51.000Z
2022-02-21T08:46:21.000Z
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: locking_service.proto # pylint: skip-file """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _re...
27.35461
331
0.754213
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: locking_service.proto # pylint: skip-file """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _re...
0
0
0
0
0
0
0
0
0
f84a900efac31357ff6f2753ee02d88dd67b3d9d
2,161
py
Python
tests/mtconnect_adapter_test.py
mtconnect/ros_bridge
b578e8c3edca83ea0de8ed15aff0f7733dd23e04
[ "Apache-2.0" ]
5
2015-04-30T21:51:46.000Z
2019-03-18T06:24:38.000Z
tests/mtconnect_adapter_test.py
CubeSpawn/ros_bridge
b578e8c3edca83ea0de8ed15aff0f7733dd23e04
[ "Apache-2.0" ]
null
null
null
tests/mtconnect_adapter_test.py
CubeSpawn/ros_bridge
b578e8c3edca83ea0de8ed15aff0f7733dd23e04
[ "Apache-2.0" ]
4
2016-02-21T20:04:31.000Z
2021-01-04T13:48:41.000Z
"""Copyright 2012, System Insights, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed t...
26.036145
75
0.704304
"""Copyright 2012, System Insights, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed t...
0
0
0
0
0
1,299
0
12
248
238c4fd5d4d52c2b1a89610831464ed877d4782f
402
py
Python
examples/pandas_ex.py
sjtrny/mockmr
090bf0b6fa69e09dc4ecd43fb63fe475ad763233
[ "MIT" ]
1
2020-03-13T15:19:55.000Z
2020-03-13T15:19:55.000Z
examples/pandas_ex.py
sjtrny/mockr
090bf0b6fa69e09dc4ecd43fb63fe475ad763233
[ "MIT" ]
1
2018-05-10T14:54:45.000Z
2018-05-10T14:54:45.000Z
examples/pandas_ex.py
sjtrny/mockr
090bf0b6fa69e09dc4ecd43fb63fe475ad763233
[ "MIT" ]
1
2018-05-10T14:47:47.000Z
2018-05-10T14:47:47.000Z
# -*- coding: utf-8 -*- from mockr import run_pandas_job import pandas as pd dataframe = pd.read_csv('ages.csv') results = run_pandas_job(dataframe, map_fn, reduce_fn, n_chunks = 4) print(results)
21.157895
68
0.701493
# -*- coding: utf-8 -*- from mockr import run_pandas_job import pandas as pd def map_fn(chunk): subset_mean = chunk['Age'].mean() yield ("mean", subset_mean) def reduce_fn(key, values): list_values = list(values) yield (key, sum(list_values)/len(list_values)) dataframe = pd.read_csv('ages.csv') res...
0
0
0
0
155
0
0
0
46
c0ffc730fd9ad6135909f386f255293640ed980e
6,236
py
Python
gym-foo/mcml_env.py
hieunq95/keras-rl
d965ea951220b5ede5ea1e11fab7d7eb45a8c2c5
[ "MIT" ]
null
null
null
gym-foo/mcml_env.py
hieunq95/keras-rl
d965ea951220b5ede5ea1e11fab7d7eb45a8c2c5
[ "MIT" ]
null
null
null
gym-foo/mcml_env.py
hieunq95/keras-rl
d965ea951220b5ede5ea1e11fab7d7eb45a8c2c5
[ "MIT" ]
null
null
null
# Mobile cloud machine learning (MCML) environment # Author: Hieunq from parameters import Parameters # see parameters.py parameters = Parameters()
38.975
132
0.60279
# Mobile cloud machine learning (MCML) environment # Author: Hieunq import gym import numpy as np import xlsxwriter from xlutils.copy import copy from gym import spaces from gym.utils import seeding from parameters import Parameters # see parameters.py parameters = Parameters() class MCML(gym.Env): """ Mobil...
19
0
0
5,923
0
0
0
-1
156
a95a84f6daa428f0bf12463c79a2085477232d15
606
py
Python
0395 Linked List Delete Last Occurrence of Value.py
ansabgillani/binarysearchcomproblems
12fe8632f8cbb5058c91a55bae53afa813a3247e
[ "MIT" ]
1
2020-12-29T21:17:26.000Z
2020-12-29T21:17:26.000Z
0395 Linked List Delete Last Occurrence of Value.py
ansabgillani/binarysearchcomproblems
12fe8632f8cbb5058c91a55bae53afa813a3247e
[ "MIT" ]
null
null
null
0395 Linked List Delete Last Occurrence of Value.py
ansabgillani/binarysearchcomproblems
12fe8632f8cbb5058c91a55bae53afa813a3247e
[ "MIT" ]
4
2021-09-09T17:42:43.000Z
2022-03-18T04:54:03.000Z
# class LLNode: # def __init__(self, val, next=None): # self.val = val # self.next = next
23.307692
43
0.5033
# class LLNode: # def __init__(self, val, next=None): # self.val = val # self.next = next class Solution: def solve(self, node, target): if not node: return None head = node delete_prev = None delete = None prev = None while node: ...
0
0
0
474
0
0
0
0
22
156fc18b9a68ae412be65ea3a632f564c3276816
3,420
py
Python
kmexpert/test/test_input_converters.py
Kaminario/kmexpert
2b27f83e63a038786750250a77ab276dd903b4d8
[ "Apache-2.0" ]
null
null
null
kmexpert/test/test_input_converters.py
Kaminario/kmexpert
2b27f83e63a038786750250a77ab276dd903b4d8
[ "Apache-2.0" ]
null
null
null
kmexpert/test/test_input_converters.py
Kaminario/kmexpert
2b27f83e63a038786750250a77ab276dd903b4d8
[ "Apache-2.0" ]
1
2019-12-26T13:46:51.000Z
2019-12-26T13:46:51.000Z
# # (c) 2019 Kaminario Technologies, Ltd. # # This software is licensed solely under the terms of the Apache 2.0 license, # the text of which is available at http://www.apache.org/licenses/LICENSE-2.0. # All disclaimers and limitations of liability set forth in the Apache 2.0 license apply. # import unittest if __n...
41.707317
92
0.669298
# # (c) 2019 Kaminario Technologies, Ltd. # # This software is licensed solely under the terms of the Apache 2.0 license, # the text of which is available at http://www.apache.org/licenses/LICENSE-2.0. # All disclaimers and limitations of liability set forth in the Apache 2.0 license apply. # import unittest from kme...
0
0
0
2,863
0
0
0
150
46
8f03f957e5b3eeab81fe596be77690aff6a7b2a5
6,525
py
Python
hypebot/constants.py
Galactic-Infrastructure/HypeBot
5b2089a1f26518f17a80cdacc417e0ef3fda7b08
[ "MIT" ]
6
2020-01-29T03:31:11.000Z
2022-01-14T00:28:45.000Z
hypebot/constants.py
Galactic-Infrastructure/HypeBot
5b2089a1f26518f17a80cdacc417e0ef3fda7b08
[ "MIT" ]
null
null
null
hypebot/constants.py
Galactic-Infrastructure/HypeBot
5b2089a1f26518f17a80cdacc417e0ef3fda7b08
[ "MIT" ]
1
2020-01-31T16:08:25.000Z
2020-01-31T16:08:25.000Z
AVAILABLE_CODE_SHEETS = [ # in rough order of most to least common 'braille', 'morse', 'semaphore', 'pigpen', 'ipa', 'binary', 'ascii', 'amino', 'nato', 'nautical', 'resistor', 'elements', 'poker', 'greek', 'hebrew', 'japanese', 'scrabble', 'dv...
30.924171
141
0.587739
AVAILABLE_CODE_SHEETS = [ # in rough order of most to least common 'braille', 'morse', 'semaphore', 'pigpen', 'ipa', 'binary', 'ascii', 'amino', 'nato', 'nautical', 'resistor', 'elements', 'poker', 'greek', 'hebrew', 'japanese', 'scrabble', 'dv...
0
0
0
0
0
0
0
0
0
2984ba9f46d103d02ae8464652e0f1f155a4ed93
541
py
Python
riemann/tests/networks/test_networks.py
sturmianseq/riemann
9e6dbaaf1b339594c0c0d55b2db6e96d7e3f12c4
[ "Apache-2.0", "MIT" ]
118
2018-05-07T18:49:15.000Z
2022-01-15T17:32:43.000Z
riemann/tests/networks/test_networks.py
sturmianseq/riemann
9e6dbaaf1b339594c0c0d55b2db6e96d7e3f12c4
[ "Apache-2.0", "MIT" ]
46
2018-05-03T21:53:11.000Z
2020-03-18T22:55:11.000Z
riemann/tests/networks/test_networks.py
sturmianseq/riemann
9e6dbaaf1b339594c0c0d55b2db6e96d7e3f12c4
[ "Apache-2.0", "MIT" ]
19
2018-05-06T23:05:43.000Z
2021-11-24T14:27:45.000Z
import riemann.networks as networks
25.761905
67
0.632163
import unittest import riemann.networks as networks class TestNetworks(unittest.TestCase): def setUp(self): pass def test_get_network(self): for name in networks.SUPPORTED: n = networks.get_network(name) self.assertEqual(n, networks.SUPPORTED[name]) # Test Er...
0
0
0
465
0
0
0
-6
45
4e37b5e6a0dacaed5ee7fd146bc4ef37edb07efd
1,013
py
Python
dojo/product/urls.py
xebia/django-DefectDojo
7bc6695bd8fb93e23b0d8ed8326f5d01283eadaa
[ "BSD-3-Clause" ]
11
2018-02-25T09:51:58.000Z
2022-02-18T13:42:32.000Z
dojo/product/urls.py
xebia/django-DefectDojo
7bc6695bd8fb93e23b0d8ed8326f5d01283eadaa
[ "BSD-3-Clause" ]
102
2016-09-12T03:47:41.000Z
2022-01-20T07:34:18.000Z
dojo/product/urls.py
xebia/django-DefectDojo
7bc6695bd8fb93e23b0d8ed8326f5d01283eadaa
[ "BSD-3-Clause" ]
40
2015-11-23T12:58:29.000Z
2022-01-20T06:41:16.000Z
from django.conf.urls import url from dojo.product import views urlpatterns = [ # product url(r'^product$', views.product, name='product'), url(r'^product/(?P<pid>\d+)$', views.view_product, name='view_product'), url(r'^product/(?P<pid>\d+)/edit$', views.edit_product, name='edit_produ...
38.961538
72
0.64462
from django.conf.urls import url from dojo.product import views urlpatterns = [ # product url(r'^product$', views.product, name='product'), url(r'^product/(?P<pid>\d+)$', views.view_product, name='view_product'), url(r'^product/(?P<pid>\d+)/edit$', views.edit_product, name='edit_produ...
0
0
0
0
0
0
0
0
0
b8e18cb88ea4d6e1dc033092727391de5c42134a
10,071
py
Python
DeepLearningExamples/TensorFlow/Segmentation/VNet/utils/tf_export.py
puririshi98/benchmark
79f554f1e1cf36f62994c78e0e6e5b360f554022
[ "BSD-3-Clause" ]
4
2020-12-16T14:21:58.000Z
2022-02-02T15:08:03.000Z
DeepLearningExamples/TensorFlow/Segmentation/VNet/utils/tf_export.py
puririshi98/benchmark
79f554f1e1cf36f62994c78e0e6e5b360f554022
[ "BSD-3-Clause" ]
1
2020-12-26T20:37:51.000Z
2021-01-05T17:53:08.000Z
DeepLearningExamples/TensorFlow/Segmentation/VNet/utils/tf_export.py
puririshi98/benchmark
79f554f1e1cf36f62994c78e0e6e5b360f554022
[ "BSD-3-Clause" ]
2
2020-12-26T20:27:05.000Z
2021-09-24T12:52:19.000Z
# Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
35.090592
111
0.669844
# Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
0
6,169
0
0
0
0
0
40
158
9bbf6017961ce5088debf289ffdca6e411288304
3,708
py
Python
register/config.py
LandRegistry/register
52c7731a17a67e6aac351ee118cc18510cf6051c
[ "MIT" ]
null
null
null
register/config.py
LandRegistry/register
52c7731a17a67e6aac351ee118cc18510cf6051c
[ "MIT" ]
null
null
null
register/config.py
LandRegistry/register
52c7731a17a67e6aac351ee118cc18510cf6051c
[ "MIT" ]
1
2021-04-11T05:24:52.000Z
2021-04-11T05:24:52.000Z
import os from urllib.parse import quote_plus # RULES OF CONFIG: # 1. No region specific code. Regions are defined by setting the OS environment variables appropriately to build up the # desired behaviour. # 2. No use of defaults when getting OS environment variables. They must all be set to the required values prior ...
34.333333
119
0.670442
import os from urllib.parse import quote_plus # RULES OF CONFIG: # 1. No region specific code. Regions are defined by setting the OS environment variables appropriately to build up the # desired behaviour. # 2. No use of defaults when getting OS environment variables. They must all be set to the required values prior ...
0
0
0
0
0
0
0
0
0
0ed46202b8a5b798c16d0f05f89a9bd17d2ea6fc
8,435
py
Python
test/splitgraph/commands/test_mounting.py
AlexRogalskiy/splitgraph
891966b6acfdabc859c4a825fa738b492ca0e216
[ "Apache-2.0" ]
null
null
null
test/splitgraph/commands/test_mounting.py
AlexRogalskiy/splitgraph
891966b6acfdabc859c4a825fa738b492ca0e216
[ "Apache-2.0" ]
2
2022-01-25T00:42:49.000Z
2022-01-25T01:49:18.000Z
test/splitgraph/commands/test_mounting.py
AlexRogalskiy/splitgraph
891966b6acfdabc859c4a825fa738b492ca0e216
[ "Apache-2.0" ]
null
null
null
from splitgraph.core.repository import Repository PG_MNT = Repository.from_schema("test/pg_mount") MG_MNT = Repository.from_schema("test_mg_mount") MYSQL_MNT = Repository.from_schema("test/mysql_mount")
33.472222
99
0.569176
from datetime import datetime as dt from test.splitgraph.conftest import ( _mount_elasticsearch, _mount_mongo, _mount_mysql, _mount_postgres, ) import pytest from splitgraph.core.repository import Repository from splitgraph.core.types import TableColumn from splitgraph.engine import get_engine from sp...
0
7,612
0
0
0
0
0
223
385
5313cb799ea46acf5d9c08ee091b81704d43d12f
899
py
Python
adeft/locations.py
kkaris/adeft
d5b094873947f0c5614f87e5dac9c97d388f8ffd
[ "BSD-2-Clause" ]
18
2019-07-03T23:10:04.000Z
2022-03-31T15:21:02.000Z
adeft/locations.py
kkaris/adeft
d5b094873947f0c5614f87e5dac9c97d388f8ffd
[ "BSD-2-Clause" ]
9
2019-06-26T01:18:02.000Z
2022-02-06T18:05:31.000Z
adeft/locations.py
kkaris/adeft
d5b094873947f0c5614f87e5dac9c97d388f8ffd
[ "BSD-2-Clause" ]
8
2019-06-25T22:57:01.000Z
2021-03-29T11:17:44.000Z
""" Contains paths to locations on user's system where models and resources are to be stored. These all live in adeft's home folder which defaults to a directory "adeft" in a location determined by Python's `appdirs` package. An alternative location can be specified by setting the environment variable ADEFT_HOME in the...
39.086957
76
0.787542
""" Contains paths to locations on user's system where models and resources are to be stored. These all live in adeft's home folder which defaults to a directory "adeft" in a location determined by Python's `appdirs` package. An alternative location can be specified by setting the environment variable ADEFT_HOME in the...
0
0
0
0
0
0
0
0
0
baf91e461c113af419466c36fc7ce59d66d24a8c
1,001
py
Python
deprecated/command/sub8_missions/sub8_missions/test_actuators.py
ericgorday/SubjuGator
f45ac790f06eb97efc0b0810a7b43d0a6e2facee
[ "MIT" ]
27
2020-02-17T21:54:09.000Z
2022-03-18T17:49:23.000Z
deprecated/command/sub8_missions/sub8_missions/test_actuators.py
ericgorday/SubjuGator
f45ac790f06eb97efc0b0810a7b43d0a6e2facee
[ "MIT" ]
325
2019-09-11T14:13:56.000Z
2022-03-31T00:38:30.000Z
deprecated/command/sub8_missions/sub8_missions/test_actuators.py
ericgorday/SubjuGator
f45ac790f06eb97efc0b0810a7b43d0a6e2facee
[ "MIT" ]
24
2019-09-16T00:29:45.000Z
2022-03-06T10:56:38.000Z
failed = False
28.6
71
0.674326
from txros import util from mil_misc_tools import FprintFactory failed = False @util.cancellableInlineCallbacks def run(sub): fprint = FprintFactory(title='ACUTATOR TEST').fprint @util.cancellableInlineCallbacks def test(): yield sub.actuators.gripper_open() yield sub.actuators.gripper_c...
0
897
0
0
0
0
0
20
67
9224bc79af0b49aa0c47a4145e1619f193844b54
4,468
py
Python
zentral/core/stores/backends/http.py
janheise/zentral
cd809483573301e7d1aa5d3fc2da2c74a62405ab
[ "Apache-2.0" ]
634
2015-10-30T00:55:40.000Z
2022-03-31T02:59:00.000Z
zentral/core/stores/backends/http.py
janheise/zentral
cd809483573301e7d1aa5d3fc2da2c74a62405ab
[ "Apache-2.0" ]
145
2015-11-06T00:17:33.000Z
2022-03-16T13:30:31.000Z
zentral/core/stores/backends/http.py
janheise/zentral
cd809483573301e7d1aa5d3fc2da2c74a62405ab
[ "Apache-2.0" ]
103
2015-11-07T07:08:49.000Z
2022-03-18T17:34:36.000Z
import logging logger = logging.getLogger('zentral.core.stores.backends.http')
38.852174
119
0.620412
import logging import queue import random import threading import time from django.utils.functional import cached_property import requests from zentral.core.stores.backends.base import BaseEventStore logger = logging.getLogger('zentral.core.stores.backends.http') class HTTPStoreClient: max_retries = 3 def ...
0
54
0
4,076
0
0
0
31
223
137def49ecdf70625a501986b6972279819d0c1c
257
py
Python
src/python/test.py
gtcodes/generate_re_exam_seating
546e701c51c750a8b95fcd491c22502e3dd0fbd7
[ "BSD-3-Clause" ]
1
2018-04-12T14:54:47.000Z
2018-04-12T14:54:47.000Z
src/python/test.py
gtcodes/generate_re_exam_seating
546e701c51c750a8b95fcd491c22502e3dd0fbd7
[ "BSD-3-Clause" ]
2
2018-04-11T09:27:19.000Z
2018-06-12T12:42:16.000Z
src/python/test.py
gtcodes/generate_re_exam_seating
546e701c51c750a8b95fcd491c22502e3dd0fbd7
[ "BSD-3-Clause" ]
null
null
null
from listRoom import ListRoom from person import Person a = ListRoom("testRoom",6, 6) studentNames = ["Adam","Bertil"] * 18 students = [Person(x, "someTime", "") for x in studentNames] print(students[1].name) print(a.cols) print(a.createSeating(students))
25.7
60
0.727626
from listRoom import ListRoom from person import Person a = ListRoom("testRoom",6, 6) studentNames = ["Adam","Bertil"] * 18 students = [Person(x, "someTime", "") for x in studentNames] print(students[1].name) print(a.cols) print(a.createSeating(students))
0
0
0
0
0
0
0
0
0
e865519478c83f61b038725e6d656b0b3f83cb29
14,619
py
Python
src/infi/django_http_hooks/tests/demo_project/demo_project/test_signals.py
Infinidat/infi.django_http_hooks
b02a9cf27d9baff622c3e4a9c8a0d5b5df05becc
[ "BSD-3-Clause" ]
null
null
null
src/infi/django_http_hooks/tests/demo_project/demo_project/test_signals.py
Infinidat/infi.django_http_hooks
b02a9cf27d9baff622c3e4a9c8a0d5b5df05becc
[ "BSD-3-Clause" ]
null
null
null
src/infi/django_http_hooks/tests/demo_project/demo_project/test_signals.py
Infinidat/infi.django_http_hooks
b02a9cf27d9baff622c3e4a9c8a0d5b5df05becc
[ "BSD-3-Clause" ]
null
null
null
from django.dispatch.dispatcher import Signal as django_signal custom_signal = django_signal(providing_args=['instance'], use_caching=False)
43.123894
139
0.613038
import json from django.contrib.auth.models import User, Group, Permission from django.contrib.contenttypes.models import ContentType from django.db import IntegrityError from django.test import TestCase from infi.django_http_hooks.hooks.models import Hook, Callback from infi.django_http_hooks.http_requests import send...
0
4,925
0
8,949
0
0
0
338
265
26217a52d623fe8d12cc934ebf39610b3e428ea5
428
py
Python
ipdf/constants.py
dmitry-tk/ipdf
2ae980b29e7a2a753cc7b22d8351fd29a4dc02d6
[ "MIT" ]
5
2020-01-11T14:41:39.000Z
2020-01-23T17:34:29.000Z
ipdf/constants.py
dmitry-tk/ipdf
2ae980b29e7a2a753cc7b22d8351fd29a4dc02d6
[ "MIT" ]
null
null
null
ipdf/constants.py
dmitry-tk/ipdf
2ae980b29e7a2a753cc7b22d8351fd29a4dc02d6
[ "MIT" ]
null
null
null
import os from pathlib import Path PALETTE = { 'success': '#00c841', 'info': '#1976a3', 'error': '#d40000' } LINE = '-' * 100 ELEMENTS = [1, 0] DEFAULT_QUANTILE = 0.05 HOME_DIR = str(Path.home()) IPDF_DATADIR = os.getenv('IPDF_DATADIR') if not IPDF_DATADIR: IPDF_DATADIR = os.path.join(HOME_DIR, '...
17.12
93
0.686916
import os from pathlib import Path PALETTE = { 'success': '#00c841', 'info': '#1976a3', 'error': '#d40000' } LINE = '-' * 100 ELEMENTS = [1, 0] DEFAULT_QUANTILE = 0.05 HOME_DIR = str(Path.home()) IPDF_DATADIR = os.getenv('IPDF_DATADIR') if not IPDF_DATADIR: IPDF_DATADIR = os.path.join(HOME_DIR, '...
0
0
0
0
0
0
0
0
0
8ed3fbb882b5bcbf7371d97357fa8b085562a032
1,157
py
Python
data-structures/queue/queue.py
GeorgeCloud/data-structures-and-algorithms
0c2a95e91b4a318e345d4621dac21df6fcf9daff
[ "MIT" ]
null
null
null
data-structures/queue/queue.py
GeorgeCloud/data-structures-and-algorithms
0c2a95e91b4a318e345d4621dac21df6fcf9daff
[ "MIT" ]
3
2018-03-26T18:02:48.000Z
2018-05-01T06:40:26.000Z
data-structures/queue/queue.py
GeorgeCloud/data-structures-and-algorithms
0c2a95e91b4a318e345d4621dac21df6fcf9daff
[ "MIT" ]
null
null
null
# line = Queue(['tom', 'brown', 'kenzo', 'kim']) # print(line.head)
25.152174
66
0.536733
from node import Node class Queue: def __init__(self, iter=()): self.head = None self._size = 0 for el in iter: self.enqueue(el) def __str__(self): """Returns string with Queue informations(head, length)""" if self.head: return 'Stacks First valu...
0
0
0
1,040
0
0
0
0
45
383d3d86a1e1504bd6b01c5217b4c35ba1fe77ba
8,015
py
Python
trankit/iterators/ner_iterators.py
HarshCasper/trankit
1cbe1baf5017b5a6b88dc116f146afced01fa28e
[ "Apache-2.0" ]
1
2021-09-24T09:35:26.000Z
2021-09-24T09:35:26.000Z
trankit/iterators/ner_iterators.py
microvn/trankit
babd4ae3ff02c7308ca7573927e09ed2a7263d89
[ "Apache-2.0" ]
null
null
null
trankit/iterators/ner_iterators.py
microvn/trankit
babd4ae3ff02c7308ca7573927e09ed2a7263d89
[ "Apache-2.0" ]
null
null
null
# for sents instance_fields = [ 'words', 'word_num', 'piece_idxs', 'attention_masks', 'word_lens', 'entity_label_idxs' ] batch_fields = [ 'words', 'word_num', 'word_mask', 'piece_idxs', 'attention_masks', 'word_lens', 'entity_label_idxs' ] Instance = namedtuple('Instance', field...
37.629108
116
0.580287
from . import * # for sents instance_fields = [ 'words', 'word_num', 'piece_idxs', 'attention_masks', 'word_lens', 'entity_label_idxs' ] batch_fields = [ 'words', 'word_num', 'word_mask', 'piece_idxs', 'attention_masks', 'word_lens', 'entity_label_idxs' ] Instance = namedtuple(...
6
0
0
7,540
0
0
0
-6
73
3a3b09998c84ea811fe118b9548ae59430a8ae17
390
py
Python
src/default_game.py
shermansiu/codenames_ai
7d3898889115bd4a7e09b30aaf95cc4af8225aed
[ "MIT" ]
null
null
null
src/default_game.py
shermansiu/codenames_ai
7d3898889115bd4a7e09b30aaf95cc4af8225aed
[ "MIT" ]
null
null
null
src/default_game.py
shermansiu/codenames_ai
7d3898889115bd4a7e09b30aaf95cc4af8225aed
[ "MIT" ]
null
null
null
import codenames import paths wordlist = codenames.WordList( paths.WORDLIST_ENG_PATH, [paths.DIRECTIONAL_PATH], [paths.WIKI_100K_PATH, paths.GOOGLE_10K_ENG_PATH, paths.CUSTOM_WHITELIST], ) board = codenames.Board(wordlist) view = codenames.CliView(board) glove = codenames.Glove(*paths.GLOVE_6B_300D_PATH.p...
27.857143
78
0.792308
import codenames import paths wordlist = codenames.WordList( paths.WORDLIST_ENG_PATH, [paths.DIRECTIONAL_PATH], [paths.WIKI_100K_PATH, paths.GOOGLE_10K_ENG_PATH, paths.CUSTOM_WHITELIST], ) board = codenames.Board(wordlist) view = codenames.CliView(board) glove = codenames.Glove(*paths.GLOVE_6B_300D_PATH.p...
0
0
0
0
0
0
0
0
0
42fa36ca39a60761fccc947de20fa4df3c2b7922
1,495
py
Python
agent0/deepq/tune.py
zhoubin-me/agent0
1184827077e43dfa63e1f24a004fcc6c3e3d5130
[ "MIT" ]
null
null
null
agent0/deepq/tune.py
zhoubin-me/agent0
1184827077e43dfa63e1f24a004fcc6c3e3d5130
[ "MIT" ]
null
null
null
agent0/deepq/tune.py
zhoubin-me/agent0
1184827077e43dfa63e1f24a004fcc6c3e3d5130
[ "MIT" ]
null
null
null
import random import ray from ray import tune from ray.tune import CLIReporter from ray.tune.schedulers import PopulationBasedTraining from agent0.deepq.config import Config from agent0.deepq.trainer import Trainer from agent0.common.utils import parse_arguments if __name__ == '__main__': cfg = Config() kwar...
30.510204
108
0.618729
import random import ray from ray import tune from ray.tune import CLIReporter from ray.tune.schedulers import PopulationBasedTraining from agent0.deepq.config import Config from agent0.deepq.trainer import Trainer from agent0.common.utils import parse_arguments if __name__ == '__main__': cfg = Config() kwar...
0
0
0
0
0
0
0
0
0
0d59b69aeae5402a90c06a02f5f05b5dc5be36a2
119
py
Python
app/core/admin.py
keviv30/recipe-app-api
3c84981fb2a82db135aec07f6ada5dc876c57613
[ "MIT" ]
null
null
null
app/core/admin.py
keviv30/recipe-app-api
3c84981fb2a82db135aec07f6ada5dc876c57613
[ "MIT" ]
null
null
null
app/core/admin.py
keviv30/recipe-app-api
3c84981fb2a82db135aec07f6ada5dc876c57613
[ "MIT" ]
null
null
null
from django.contrib import admin from core import models # Register your models here. admin.site.register(models.Tag)
19.833333
32
0.806723
from django.contrib import admin from core import models # Register your models here. admin.site.register(models.Tag)
0
0
0
0
0
0
0
0
0
004554929c99fa509481a37e5de1141e0426118d
290
py
Python
tag/player.py
kendase3/every
83b543c54a2dd071f0a34f128c5baa20a7e58def
[ "BSD-2-Clause" ]
1
2017-06-12T18:36:20.000Z
2017-06-12T18:36:20.000Z
tag/player.py
kendase3/every
83b543c54a2dd071f0a34f128c5baa20a7e58def
[ "BSD-2-Clause" ]
null
null
null
tag/player.py
kendase3/every
83b543c54a2dd071f0a34f128c5baa20a7e58def
[ "BSD-2-Clause" ]
null
null
null
# remember that ord('@') trick
16.111111
43
0.617241
# remember that ord('@') trick class Player: def __init__(self, id, color, isIt, x, y): self.id = id self.color = color self.isIt = isIt self.x = x self.y = y def __repr__(self): return "hi!" #return "number=%d" % self.number def __str__(self): return repr(self)
0
0
0
235
0
0
0
0
23
c6893ee66c2b6f2560314da7b6e6eaa9b537ddff
288
py
Python
Estrutura de Repetição/Maior de cinco.py
abraaogleiber/Python-Estruturado
0900dc31da2d8939a416a0e1a80dc8ff18c859d5
[ "MIT" ]
null
null
null
Estrutura de Repetição/Maior de cinco.py
abraaogleiber/Python-Estruturado
0900dc31da2d8939a416a0e1a80dc8ff18c859d5
[ "MIT" ]
null
null
null
Estrutura de Repetição/Maior de cinco.py
abraaogleiber/Python-Estruturado
0900dc31da2d8939a416a0e1a80dc8ff18c859d5
[ "MIT" ]
null
null
null
""" Programa 052 rea de estudos. data 23.11.2020 (Indefinida) Hs @Autor: Abrao A. Silva """ maior = int() for perg in range(1, 6): numero = int(input(f'Digite o {perg} nmero.: ')) if numero > maior: maior = numero print(f'O maior valor repassado foi {maior}.')
18
54
0.625
""" Programa 052 Área de estudos. data 23.11.2020 (Indefinida) Hs @Autor: Abraão A. Silva """ maior = int() for perg in range(1, 6): numero = int(input(f'Digite o {perg}º número.: ')) if numero > maior: maior = numero print(f'O maior valor repassado foi {maior}.')
8
0
0
0
0
0
0
0
0
dcdd1f6b0eb47c6687d0d4047dd913137853d93b
76,177
py
Python
pelix/ipopo/decorators.py
svidoso/ipopo
1d4b81207e67890dfccc8f562336c7104f194c17
[ "Apache-2.0" ]
65
2015-04-21T10:41:18.000Z
2022-01-02T16:25:40.000Z
pelix/ipopo/decorators.py
svidoso/ipopo
1d4b81207e67890dfccc8f562336c7104f194c17
[ "Apache-2.0" ]
85
2015-01-20T14:23:52.000Z
2022-02-19T17:08:46.000Z
pelix/ipopo/decorators.py
svidoso/ipopo
1d4b81207e67890dfccc8f562336c7104f194c17
[ "Apache-2.0" ]
32
2015-03-13T07:43:05.000Z
2020-04-24T07:56:53.000Z
#!/usr/bin/env python # -- Content-Encoding: UTF-8 -- """ Defines the iPOPO decorators classes to manipulate component factory classes :author: Thomas Calmant :copyright: Copyright 2020, Thomas Calmant :license: Apache License 2.0 :version: 1.0.1 .. Copyright 2020 Thomas Calmant Licensed under the Apache Li...
33.396317
80
0.597004
#!/usr/bin/env python # -- Content-Encoding: UTF-8 -- """ Defines the iPOPO decorators classes to manipulate component factory classes :author: Thomas Calmant :copyright: Copyright 2020, Thomas Calmant :license: Apache License 2.0 :version: 1.0.1 .. Copyright 2020 Thomas Calmant Licensed under the Apache Li...
0
0
0
50,648
0
0
0
37
440
8af2f5e3c307a4034f53978a1cac2e5967dc47d7
5,520
py
Python
main.py
CondreaFlorin/Scene-Classifier
4e375b3bf726fc7e771435c282359608cd4ec8b9
[ "MIT" ]
null
null
null
main.py
CondreaFlorin/Scene-Classifier
4e375b3bf726fc7e771435c282359608cd4ec8b9
[ "MIT" ]
null
null
null
main.py
CondreaFlorin/Scene-Classifier
4e375b3bf726fc7e771435c282359608cd4ec8b9
[ "MIT" ]
null
null
null
import cv2 import os import numpy as np import matplotlib.pyplot as plt from keras.preprocessing.image import ImageDataGenerator nrClasses = 0 current_ind = 0 if __name__ == '__main__': path ="C:/Users/Condr/Downloads/trashy trash strah/indoorCVPR_09/Images" labels,fileList = loadMedatada(path)...
35.384615
125
0.616304
import cv2 import os from keras.models import Sequential from keras.layers import Dense, Conv2D, MaxPooling2D, Dropout, Flatten,BatchNormalization import time import numpy as np import matplotlib.pyplot as plt import random from keras.preprocessing.image import ImageDataGenerator nrClasses = 0 current_ind =...
0
0
0
0
0
2,563
0
64
192
23e0ca875cb97b53d121e42950c22357501ed261
7,025
py
Python
olympics/convert.py
kittyTyree/cs257
4e7dd789816baec7447dfafd46c8e330368e3d69
[ "MIT" ]
null
null
null
olympics/convert.py
kittyTyree/cs257
4e7dd789816baec7447dfafd46c8e330368e3d69
[ "MIT" ]
null
null
null
olympics/convert.py
kittyTyree/cs257
4e7dd789816baec7447dfafd46c8e330368e3d69
[ "MIT" ]
1
2021-12-12T21:00:14.000Z
2021-12-12T21:00:14.000Z
''' October 19th 2021. Kitty Tyree Olympics database design for cs257 in fall 2021 ''' import csv # MAP AN ATHLETE ID TO THE ATHLETE'S NAME # why are we only mapping athlete id to their name? because if they competed # in multiple games, their weight, and age and other body stats may have changed # I am n...
30.021368
114
0.708043
''' October 19th 2021. Kitty Tyree Olympics database design for cs257 in fall 2021 ''' import csv # MAP AN ATHLETE ID TO THE ATHLETE'S NAME # why are we only mapping athlete id to their name? because if they competed # in multiple games, their weight, and age and other body stats may have changed # I am n...
0
0
0
0
0
0
0
0
0
18a6fabfce015e4c91eed10cc052f8464c5fb5c4
18,954
py
Python
deepaffects/realtime/deepaffects_realtime_pb2.py
s16h/deepaffects-python
3be2bea30921964fc73eac81cb8fb05180203925
[ "MIT" ]
null
null
null
deepaffects/realtime/deepaffects_realtime_pb2.py
s16h/deepaffects-python
3be2bea30921964fc73eac81cb8fb05180203925
[ "MIT" ]
null
null
null
deepaffects/realtime/deepaffects_realtime_pb2.py
s16h/deepaffects-python
3be2bea30921964fc73eac81cb8fb05180203925
[ "MIT" ]
null
null
null
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: deepaffects-realtime.proto import sys from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_d...
47.743073
1,782
0.683972
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: deepaffects-realtime.proto import sys from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_d...
0
0
0
0
0
0
0
0
0
f168d162b763d9a71be0102877069fe46eea2811
27,051
py
Python
coaster/views/decorators.py
AferriDaniel/coaster
3ffbc9d33c981284593445299aaee0c3cc0cdb0b
[ "BSD-2-Clause" ]
48
2015-01-15T08:57:24.000Z
2022-01-26T04:04:34.000Z
coaster/views/decorators.py
AferriDaniel/coaster
3ffbc9d33c981284593445299aaee0c3cc0cdb0b
[ "BSD-2-Clause" ]
169
2015-01-16T13:17:38.000Z
2021-05-31T13:23:23.000Z
coaster/views/decorators.py
AferriDaniel/coaster
3ffbc9d33c981284593445299aaee0c3cc0cdb0b
[ "BSD-2-Clause" ]
17
2015-02-15T07:39:04.000Z
2021-10-05T11:20:22.000Z
""" View decorators --------------- Decorators for view handlers. All items in this module can be imported directly from :mod:`coaster.views`. """ from flask import (jsonify) from .misc import jsonp __all__ = [ 'RequestTypeError', 'RequestValueError', 'requestargs', 'requestform', 'requestquery'...
36.854223
88
0.562863
""" View decorators --------------- Decorators for view handlers. All items in this module can be imported directly from :mod:`coaster.views`. """ from functools import wraps from flask import ( Response, abort, current_app, g, jsonify, make_response, redirect, render_template, r...
0
10,390
0
253
0
1,866
0
264
338
f9f56aa924956adef0d4cf84eaeeca2876508b9a
661
py
Python
CodingInterviews/python/12_power_2.py
YorkFish/git_study
6e023244daaa22e12b24e632e76a13e5066f2947
[ "MIT" ]
null
null
null
CodingInterviews/python/12_power_2.py
YorkFish/git_study
6e023244daaa22e12b24e632e76a13e5066f2947
[ "MIT" ]
null
null
null
CodingInterviews/python/12_power_2.py
YorkFish/git_study
6e023244daaa22e12b24e632e76a13e5066f2947
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # coding:utf-8 if __name__ == "__main__": s = Solution() print(s.Power(2, 0)) print(s.Power(0, 2)) print(s.Power(3.5, 2)) print(s.Power(3.5, -2))
20.030303
47
0.443268
#!/usr/bin/env python3 # coding:utf-8 class Solution: def Power(self, base, exponent): """ @param: base: double @param: exponent: int """ if exponent == 0: return 1 elif base == 0: return 0 exp = abs(exponent) tmp = b...
0
0
0
446
0
0
0
0
23
6e6fef3c72fde208ef28095187e2540ab490389a
984
py
Python
src/srbpy/stdlib/base.py
billhu0228/SmartRoadBridgePy
4a5d34028a2612aef846b580733bf6f488110798
[ "MIT" ]
2
2020-08-05T10:46:45.000Z
2020-08-11T11:05:18.000Z
src/srbpy/stdlib/base.py
billhu0228/SmartRoadBridgePy
4a5d34028a2612aef846b580733bf6f488110798
[ "MIT" ]
null
null
null
src/srbpy/stdlib/base.py
billhu0228/SmartRoadBridgePy
4a5d34028a2612aef846b580733bf6f488110798
[ "MIT" ]
1
2020-08-26T07:50:22.000Z
2020-08-26T07:50:22.000Z
# -*- coding : utf-8-*-
18.923077
67
0.560976
# -*- coding : utf-8-*- import abc from enum import Enum class StructTypeEunm(Enum): Default = 0 Foundation = 1 Pier = 2 Beam = 3 MovementJoint = 4 Bearing = 5 class StructTemplate(metaclass=abc.ABCMeta): """ 构造物模板的基类 """ def __init__(self, **kwargs): super().__ini...
186
202
0
615
0
0
0
-11
90
9add6369099407d239dfd5f5a641e89ddfbd4547
100
py
Python
Unit 07 Lists and Functions/02 Battleship/Dont Sinc my Battleship/4-Check it Twice.py
lpython2006e/python-samples
b94ba67ce0d7798ecf796dadae206aa75da58301
[ "MIT" ]
null
null
null
Unit 07 Lists and Functions/02 Battleship/Dont Sinc my Battleship/4-Check it Twice.py
lpython2006e/python-samples
b94ba67ce0d7798ecf796dadae206aa75da58301
[ "MIT" ]
null
null
null
Unit 07 Lists and Functions/02 Battleship/Dont Sinc my Battleship/4-Check it Twice.py
lpython2006e/python-samples
b94ba67ce0d7798ecf796dadae206aa75da58301
[ "MIT" ]
null
null
null
board = [] for loop in range(0, 5): treta = ["O"] * 5 board.append(treta) print(board)
14.285714
24
0.54
board = [] for loop in range(0, 5): treta = ["O"] * 5 board.append(treta) print(board)
0
0
0
0
0
0
0
0
0
179245556a68823d8ddf5b05d7352eeb75fc6e01
6,398
py
Python
code.py
flavio-fernandes/Lemon_Keypad
616947cb7d6e08b89d319925147acb6eafb6f840
[ "MIT" ]
null
null
null
code.py
flavio-fernandes/Lemon_Keypad
616947cb7d6e08b89d319925147acb6eafb6f840
[ "MIT" ]
null
null
null
code.py
flavio-fernandes/Lemon_Keypad
616947cb7d6e08b89d319925147acb6eafb6f840
[ "MIT" ]
null
null
null
import time import board import keypad import usb_hid import neopixel from adafruit_led_animation.animation.pulse import Pulse from adafruit_led_animation.animation.solid import Solid from adafruit_led_animation.animation.blink import Blink from adafruit_led_animation.group import AnimationGroup from adafruit_led_anima...
32.979381
88
0.648015
import time import board import keypad import usb_hid import neopixel from adafruit_led_animation.animation.pulse import Pulse from adafruit_led_animation.animation.solid import Solid from adafruit_led_animation.animation.blink import Blink from adafruit_led_animation.group import AnimationGroup from adafruit_led_anima...
0
0
0
0
0
0
0
0
0
92ad20f6a43bb0cb69f669bba8dc4b398d0a4fe2
1,025
py
Python
catapult_build/temp_deployment_dir.py
tingshao/catapult
a8fe19e0c492472a8ed5710be9077e24cc517c5c
[ "BSD-3-Clause" ]
2,151
2020-04-18T07:31:17.000Z
2022-03-31T08:39:18.000Z
catapult_build/temp_deployment_dir.py
tingshao/catapult
a8fe19e0c492472a8ed5710be9077e24cc517c5c
[ "BSD-3-Clause" ]
395
2020-04-18T08:22:18.000Z
2021-12-08T13:04:49.000Z
catapult_build/temp_deployment_dir.py
tingshao/catapult
a8fe19e0c492472a8ed5710be9077e24cc517c5c
[ "BSD-3-Clause" ]
338
2020-04-18T08:03:10.000Z
2022-03-29T12:33:22.000Z
#!/usr/bin/python # Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os def _PopulateDeploymentDir(deployment_dir, paths, link_func): """Fills the deployment directory using the link_func specifie...
25.625
72
0.742439
#!/usr/bin/python # Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import contextlib import os import shutil import tempfile @contextlib.contextmanager def TempDeploymentDir(paths, use_symlinks=True): "...
0
390
0
0
0
89
0
-18
113
8f1ba727572a6d53d9beb79c7e80939f8d8a4ac8
553
py
Python
2-Medium/numsSameConsecDiff.py
Sma-Das/Leetcode
6f9b8f069e2ef198408abd6780fd0697a8bebada
[ "MIT" ]
null
null
null
2-Medium/numsSameConsecDiff.py
Sma-Das/Leetcode
6f9b8f069e2ef198408abd6780fd0697a8bebada
[ "MIT" ]
null
null
null
2-Medium/numsSameConsecDiff.py
Sma-Das/Leetcode
6f9b8f069e2ef198408abd6780fd0697a8bebada
[ "MIT" ]
null
null
null
if __name__ == '__main__': print(numsSameConsecDiff(8, 1))
26.333333
125
0.562387
from functools import cache def numsSameConsecDiff(n, k): @cache def builder(curr, rem, delta, string=""): if not 0 <= curr <= 9: return "" elif not rem: return string return builder(curr+delta, rem-1, delta, string + str(curr)) + builder(curr-delta, rem-1, -del...
0
258
0
0
0
178
0
6
45
d07886582f75e81b62fd49dd65935ab4cfc6c47a
9,540
py
Python
k_road/builder/carla_multi_road_builder.py
NREL/K_Road
ec8049cf1b81c58dd3b95f8298a362d863cd4a68
[ "BSD-3-Clause" ]
1
2021-04-19T23:28:26.000Z
2021-04-19T23:28:26.000Z
k_road/builder/carla_multi_road_builder.py
NREL/K_Road
ec8049cf1b81c58dd3b95f8298a362d863cd4a68
[ "BSD-3-Clause" ]
null
null
null
k_road/builder/carla_multi_road_builder.py
NREL/K_Road
ec8049cf1b81c58dd3b95f8298a362d863cd4a68
[ "BSD-3-Clause" ]
null
null
null
import rtree as rtree # ------------------------------------------------# ### NOTE again whether we are mapping to right hand coords here or not. # This ends up by negating all y coordinates # The trick is to be consistent w.r.t. when this conversion happens. # which so far we have not been succeeding. sorry ###
40.944206
116
0.541929
import itertools import json from math import inf import rtree as rtree from pymunk import Vec2d from k_road.builder.road_builder import RoadBuilder from k_road.constants import Constants from k_road.entity import entity_factory from k_road.entity.entity_type import EntityType # ------------------------------------...
0
54
0
8,887
0
0
0
80
200
109077b6bffa09bb60ecfe829200a784dfc2cf34
227
wsgi
Python
maildash.wsgi
drogomarks/maildash
1fd481443e65baa579d436f4e6ff6d702b2147a8
[ "MIT" ]
null
null
null
maildash.wsgi
drogomarks/maildash
1fd481443e65baa579d436f4e6ff6d702b2147a8
[ "MIT" ]
null
null
null
maildash.wsgi
drogomarks/maildash
1fd481443e65baa579d436f4e6ff6d702b2147a8
[ "MIT" ]
null
null
null
#!/usr/bin/python import sys import logging logging.basicConfig(stream=sys.stderr) sys.path.insert(0,"/var/www/vhosts/maildash.iccenter.org/") from maildash import app as application application.secret_key = 'development-key'
25.222222
59
0.797357
#!/usr/bin/python import sys import logging logging.basicConfig(stream=sys.stderr) sys.path.insert(0,"/var/www/vhosts/maildash.iccenter.org/") from maildash import app as application application.secret_key = 'development-key'
0
0
0
0
0
0
0
0
0
5cdbb9e0bfbf2f67bd0dd205cedcf0606a9c0678
10,160
py
Python
fabfile.py
pjdufour/geonode-fabric
b94b0209833438aba282d46f5026f081624fbc24
[ "BSD-3-Clause" ]
null
null
null
fabfile.py
pjdufour/geonode-fabric
b94b0209833438aba282d46f5026f081624fbc24
[ "BSD-3-Clause" ]
3
2015-07-08T02:57:18.000Z
2015-10-20T14:47:22.000Z
fabfile.py
pjdufour/geonode-fabric
b94b0209833438aba282d46f5026f081624fbc24
[ "BSD-3-Clause" ]
null
null
null
global targets targets = () PATH_ACTIVATE = "/var/lib/geonode/bin/activate" PATH_MANAGEPY_VN = "/var/lib/geonode" PATH_MANAGEPY_GS = "/var/lib/geonode/rogue_geonode" PATH_DNA_JSON = "/opt/chef-run/dna.json" PATH_LS_VN = "/var/lib/geonode/local_settings.py" PATH_LS_GS = "/var/lib/geonode/rogue_geonode/geoshape/local...
28.300836
182
0.648031
import os, glob from fabric.api import env, sudo, run, cd, local, put, prefix, roles, execute, task, get from fabric.api import settings as fab_settings from fabric.context_managers import settings, hide from fabric.contrib.files import sed from subprocess import Popen, PIPE import datetime from utils import _build_en...
0
2,822
0
0
0
5,474
0
272
981
66fe1e386cce0d1dbf63792418582c43e068cc5e
146
py
Python
Level 2.py
Pancakes-Studio/Pyrates-Solutions
c7fa25b0e291992865dd174af4de3280e49c8c50
[ "CC0-1.0" ]
null
null
null
Level 2.py
Pancakes-Studio/Pyrates-Solutions
c7fa25b0e291992865dd174af4de3280e49c8c50
[ "CC0-1.0" ]
null
null
null
Level 2.py
Pancakes-Studio/Pyrates-Solutions
c7fa25b0e291992865dd174af4de3280e49c8c50
[ "CC0-1.0" ]
null
null
null
for _ in range(6): sauter() avancer() avancer() gauche() for _ in range(2): avancer() for _ in range(9): coup() avancer() avancer() ouvrir()
11.230769
18
0.636986
for _ in range(6): sauter() avancer() avancer() gauche() for _ in range(2): avancer() for _ in range(9): coup() avancer() avancer() ouvrir()
0
0
0
0
0
0
0
0
0
33a96f8a946a9c1aa3abd710c6acbda08a44e602
2,190
py
Python
auto_pose/test/encoder_inference.py
ukucukas/AugmentedAutoencoder
d1eb0d90c910c007f30e57321e62ceaaf2f72305
[ "MIT" ]
1
2021-12-19T05:18:41.000Z
2021-12-19T05:18:41.000Z
auto_pose/test/encoder_inference.py
ukucukas/AugmentedAutoencoder
d1eb0d90c910c007f30e57321e62ceaaf2f72305
[ "MIT" ]
null
null
null
auto_pose/test/encoder_inference.py
ukucukas/AugmentedAutoencoder
d1eb0d90c910c007f30e57321e62ceaaf2f72305
[ "MIT" ]
1
2021-12-19T05:18:37.000Z
2021-12-19T05:18:37.000Z
import cv2 import tensorflow as tf import numpy as np import glob import os import time import argparse from auto_pose.ae import factory, utils parser = argparse.ArgumentParser() parser.add_argument("experiment_name") parser.add_argument("-f", "--file_str", required=True, help='folder or filename to image(s)') # p...
31.73913
160
0.703653
import cv2 import tensorflow as tf import numpy as np import glob import os import time import argparse import configparser from auto_pose.ae import factory, utils parser = argparse.ArgumentParser() parser.add_argument("experiment_name") parser.add_argument("-f", "--file_str", required=True, help='folder or filena...
0
0
0
0
0
0
0
-2
22
d158dd7e5ae7c246efaba2cc2e84dba884ebba62
2,392
py
Python
seeds/utils/parsing.py
briandconnelly/seeds
a114ac66e62a960e18127faf52cff9e48831e212
[ "Apache-2.0" ]
11
2016-02-05T15:06:53.000Z
2022-02-28T05:51:28.000Z
seeds/utils/parsing.py
briandconnelly/seeds
a114ac66e62a960e18127faf52cff9e48831e212
[ "Apache-2.0" ]
null
null
null
seeds/utils/parsing.py
briandconnelly/seeds
a114ac66e62a960e18127faf52cff9e48831e212
[ "Apache-2.0" ]
5
2017-11-12T13:44:44.000Z
2020-08-20T15:06:31.000Z
# -*- coding: utf-8 -*- """ Collection of functions that perform different types of parsing """ __author__ = "Brian Connelly <bdc@bconnelly.net>" __credits__ = "Brian Connelly" import re def parse_int_rangelist(s, sorted=False): """Parse a list of numeric ranges. These lists are a comma-separated list of e...
27.813953
104
0.553094
# -*- coding: utf-8 -*- """ Collection of functions that perform different types of parsing """ __author__ = "Brian Connelly <bdc@bconnelly.net>" __credits__ = "Brian Connelly" import re from seeds.SEEDSError import * def parse_int_rangelist(s, sorted=False): """Parse a list of numeric ranges. These lists are...
0
0
0
0
0
0
0
9
23
3afcc1fc725de58c95837dc2537242e145971b94
4,727
py
Python
scripts/smoke.py
andreimaximov/uthread
236d820d3730f9552afbd4cb574bbc7a941c3eb4
[ "MIT" ]
null
null
null
scripts/smoke.py
andreimaximov/uthread
236d820d3730f9552afbd4cb574bbc7a941c3eb4
[ "MIT" ]
1
2018-07-07T21:58:33.000Z
2018-07-07T21:58:34.000Z
scripts/smoke.py
andreimaximov/uthread
236d820d3730f9552afbd4cb574bbc7a941c3eb4
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import unittest if __name__ == '__main__': unittest.main()
30.496774
79
0.532261
#!/usr/bin/env python3 import contextlib import os import random import socket import string import subprocess import time import unittest def pathToExample(name): build = os.getenv('MESON_BUILD_ROOT', os.getcwd()) example = os.path.join(build, name) if not os.path.exists(example): raise RuntimeE...
0
313
0
3,610
0
495
0
-54
270
ec4fce808aa3296034a21f9188909ceac94864ad
1,102
py
Python
dataset/scripts/createTrainValTest.py
yeelan0319/DeepLab
b26ab7899d612d6489a985718388963d249dccf4
[ "MIT" ]
null
null
null
dataset/scripts/createTrainValTest.py
yeelan0319/DeepLab
b26ab7899d612d6489a985718388963d249dccf4
[ "MIT" ]
null
null
null
dataset/scripts/createTrainValTest.py
yeelan0319/DeepLab
b26ab7899d612d6489a985718388963d249dccf4
[ "MIT" ]
null
null
null
from __future__ import print_function if __name__ == '__main__': main()
32.411765
121
0.643376
from __future__ import print_function import argparse import glob import os def get_arguments(): parser = argparse.ArgumentParser() parser.add_argument('--input-dir', type=str, help='input directory where target images are stored.') parser.add_argument("--output-file", type=str, ...
0
0
0
0
0
938
0
-28
113
eec667a6667647a98b7284f1fd743d675ef16cc1
4,980
py
Python
phc/easy/util/__init__.py
taylordeatri/phc-sdk-py
8f3ec6ac44e50c7194f174fd0098de390886693d
[ "MIT" ]
null
null
null
phc/easy/util/__init__.py
taylordeatri/phc-sdk-py
8f3ec6ac44e50c7194f174fd0098de390886693d
[ "MIT" ]
null
null
null
phc/easy/util/__init__.py
taylordeatri/phc-sdk-py
8f3ec6ac44e50c7194f174fd0098de390886693d
[ "MIT" ]
null
null
null
from functools import reduce from typing import List, Union from toolz import groupby import pandas as pd from funcy import lmapcat try: from tqdm.autonotebook import tqdm except ImportError: _has_tqdm = False tqdm = None else: _has_tqdm = True def rename_keys(dictionary: dict, mapping: dict): "...
26.918919
86
0.619679
import math from functools import reduce, wraps from typing import Callable, List, Union, Optional from toolz import groupby import pandas as pd from funcy import lmapcat try: from tqdm.autonotebook import tqdm except ImportError: _has_tqdm = False tqdm = None else: _has_tqdm = True def rename_keys(...
0
218
0
153
0
1,558
0
17
245
1c45c58302360fe1ea1256f259b08d194601aee0
9,269
py
Python
spookbot.py
carsuki/discord-spookbot
a6bd5b7e80860d7db65f3eb634bab68b9d4c50f1
[ "BSD-3-Clause" ]
1
2021-10-01T13:44:05.000Z
2021-10-01T13:44:05.000Z
spookbot.py
carsuki/discord-spookbot
a6bd5b7e80860d7db65f3eb634bab68b9d4c50f1
[ "BSD-3-Clause" ]
null
null
null
spookbot.py
carsuki/discord-spookbot
a6bd5b7e80860d7db65f3eb634bab68b9d4c50f1
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 import discord import logging import json logger = logging.getLogger('spookbot') logger.setLevel(logging.INFO) handler = logging.FileHandler(filename='spookbot.log', mode='w', encoding='utf-8') handler.setFormatter(logging.Formatter('%(asctime)s:%(levelname)s:%(name)s: %(message)s')) logger.addH...
130.549296
7,276
0.784659
#!/usr/bin/env python3 import asyncio import discord import logging import json import random logger = logging.getLogger('spookbot') logger.setLevel(logging.INFO) handler = logging.FileHandler(filename='spookbot.log', mode='w', encoding='utf-8') handler.setFormatter(logging.Formatter('%(asctime)s:%(levelname)s:%(name...
0
8,455
0
0
0
48
0
-15
183
02b1119772f67788c055b7cac52c387a04c782f4
12,900
py
Python
RingNode.py
vascoalramos/drive-through-p2p
e79dee9e3fe625870d5128902be74fc87e8934f6
[ "MIT" ]
null
null
null
RingNode.py
vascoalramos/drive-through-p2p
e79dee9e3fe625870d5128902be74fc87e8934f6
[ "MIT" ]
null
null
null
RingNode.py
vascoalramos/drive-through-p2p
e79dee9e3fe625870d5128902be74fc87e8934f6
[ "MIT" ]
null
null
null
# coding: utf-8
40.566038
144
0.497597
# coding: utf-8 import time import pickle import socket import random import logging import argparse import configparser import threading from utils import contains_successor from queue import Queue class RingNode (threading.Thread): def __init__(self, loggerName, ID, port, name, timeout, TG, ring, ringSize, EG=...
0
0
0
12,676
0
0
0
-37
244
a5b1ef74d91c923b25e7ff968e9e75437b0c84fb
681
py
Python
scratch/shift_for_model.py
I2Cvb/prostate
d2eaa6fc6129912e59dd7f7ddd700fc365451b4f
[ "MIT" ]
5
2016-01-10T05:55:55.000Z
2019-10-15T06:21:13.000Z
scratch/shift_for_model.py
I2Cvb/prostate
d2eaa6fc6129912e59dd7f7ddd700fc365451b4f
[ "MIT" ]
7
2016-01-21T19:53:00.000Z
2016-05-13T10:57:07.000Z
scratch/shift_for_model.py
I2Cvb/prostate
d2eaa6fc6129912e59dd7f7ddd700fc365451b4f
[ "MIT" ]
3
2019-10-15T06:21:18.000Z
2022-03-20T15:05:18.000Z
import os import numpy as np from protoclass.preprocessing import StandardTimeNormalization path_root = '/data/prostate/pre-processing/lemaitre-2016-nov/norm-objects' shift_patient = [] # We have to open each npy file for root, dirs, files in os.walk(path_root): # Create the string for the file to read f...
25.222222
74
0.743025
import os import numpy as np from protoclass.preprocessing import StandardTimeNormalization path_root = '/data/prostate/pre-processing/lemaitre-2016-nov/norm-objects' shift_patient = [] # We have to open each npy file for root, dirs, files in os.walk(path_root): # Create the string for the file to read f...
0
0
0
0
0
0
0
0
0
6bf728458807b344e38e54f5c983e0db7fa1294d
625
py
Python
common/migrations/0002_news_item.py
dianaperez25/web-common
ffbb0415719e0d791f64377949a9a950bfef8d9a
[ "MIT" ]
1
2020-01-15T19:34:27.000Z
2020-01-15T19:34:27.000Z
common/migrations/0002_news_item.py
dianaperez25/web-common
ffbb0415719e0d791f64377949a9a950bfef8d9a
[ "MIT" ]
2
2020-09-09T21:24:07.000Z
2020-10-20T21:35:31.000Z
common/migrations/0002_news_item.py
dianaperez25/web-common
ffbb0415719e0d791f64377949a9a950bfef8d9a
[ "MIT" ]
1
2019-11-18T20:27:23.000Z
2019-11-18T20:27:23.000Z
# Generated by Django 2.0.3 on 2018-03-30 22:28
27.173913
114
0.592
# Generated by Django 2.0.3 on 2018-03-30 22:28 import ckeditor.fields from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('common', '0001_initial'), ] operations = [ migrations.CreateModel( name='news_item', fields=[...
0
0
0
488
0
0
0
20
68
4d55829346d47beb7191c7bf91631c6069a4eb11
206
py
Python
test/ifelse.py
radiilab/Rad-lang
39eb4762c5bfea8537f4f269a2e8457dd5409e3a
[ "BSD-3-Clause" ]
1
2019-07-18T23:30:38.000Z
2019-07-18T23:30:38.000Z
test/ifelse.py
radiilab/Rad-lang
39eb4762c5bfea8537f4f269a2e8457dd5409e3a
[ "BSD-3-Clause" ]
null
null
null
test/ifelse.py
radiilab/Rad-lang
39eb4762c5bfea8537f4f269a2e8457dd5409e3a
[ "BSD-3-Clause" ]
null
null
null
end print max(-1,-2) # = -1 print max(1,2) # = 2 print max(3,4) # = 4 print max(1.0, 1.5) # = 1.500000
15.846154
34
0.427184
def max(m,n): if m >= n: return m else: return n end end print max(-1,-2) # = -1 print max(1,2) # = 2 print max(3,4) # = 4 print max(1.0, 1.5) # = 1.500000
0
0
0
0
0
59
0
0
22