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
ea40b4605a20ca5cbcd265e241e9ddb25c49e70f
2,993
py
Python
djsani/medical_history/waivers/forms.py
carthage-college/django-djsani
e344fd636695682a0765fc5d5c2137fe3e6b35d1
[ "BSD-3-Clause" ]
1
2017-04-22T11:08:41.000Z
2017-04-22T11:08:41.000Z
djsani/medical_history/waivers/forms.py
carthage-college/django-djsani
e344fd636695682a0765fc5d5c2137fe3e6b35d1
[ "BSD-3-Clause" ]
10
2020-06-11T14:22:47.000Z
2021-07-08T14:05:27.000Z
djsani/medical_history/waivers/forms.py
carthage-college/django-djsani
e344fd636695682a0765fc5d5c2137fe3e6b35d1
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """Forms for medical history.""" from django.conf import settings SICKLE_CELL_RESULTS = ( ('Positive', 'Positive'), ('Negative', 'Negative'), ) DRUG_TEST_RESULTS = ( ('No positive drug test', 'No positive drug test'), ('Positive drug test', 'Positive drug test'), ) ALLOWED_IMA...
26.723214
80
0.646174
# -*- coding: utf-8 -*- """Forms for medical history.""" from django import forms from django.conf import settings from django.core.validators import FileExtensionValidator from djtools.fields import BINARY_CHOICES SICKLE_CELL_RESULTS = ( ('Positive', 'Positive'), ('Negative', 'Negative'), ) DRUG_TEST_RESUL...
3
0
0
2,352
0
0
0
59
205
7f5d878260aa516cb3a62e17639bd79949a427a3
847
py
Python
packtml/regression/tests/test_simple_logistic.py
cicorias/supv-ml-py
f7e030206efe5bb2c49433ae18e115ca0fcfc5cb
[ "MIT" ]
14
2018-08-22T22:12:40.000Z
2021-10-04T16:28:14.000Z
packtml/regression/tests/test_simple_logistic.py
cicorias/supv-ml-py
f7e030206efe5bb2c49433ae18e115ca0fcfc5cb
[ "MIT" ]
null
null
null
packtml/regression/tests/test_simple_logistic.py
cicorias/supv-ml-py
f7e030206efe5bb2c49433ae18e115ca0fcfc5cb
[ "MIT" ]
14
2018-05-31T20:42:12.000Z
2021-09-15T08:00:14.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import from sklearn.datasets import make_classification X, y = make_classification(n_samples=100, n_features=2, random_state=42, n_redundant=0, n_repeated=0, n_classes=2, class_sep=1.0)
30.25
72
0.700118
# -*- coding: utf-8 -*- from __future__ import absolute_import from packtml.regression import SimpleLogisticRegression from sklearn.datasets import make_classification from sklearn.metrics import accuracy_score import numpy as np X, y = make_classification(n_samples=100, n_features=2, random_state=42, ...
0
0
0
0
0
405
0
52
91
eddfa0534c2bfe0f1262d3b344218c7437aaf008
544
py
Python
source/pkgsrc/lang/python27/patches/patch-Lib_plistlib.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-11-20T22:46:39.000Z
2021-11-20T22:46:39.000Z
source/pkgsrc/lang/python27/patches/patch-Lib_plistlib.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
source/pkgsrc/lang/python27/patches/patch-Lib_plistlib.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
$NetBSD: patch-Lib_plistlib.py,v 1.1 2018/06/17 19:21:21 adam Exp $ Add ability to parse unsigned integers as externalized by NetBSD proplib(3). --- Lib/plistlib.py.orig 2014-12-10 15:59:39.000000000 +0000 +++ Lib/plistlib.py - self.addObject(int(self.getData())) + self.addObject(int(self.getData(), 0))...
34
76
0.663603
$NetBSD: patch-Lib_plistlib.py,v 1.1 2018/06/17 19:21:21 adam Exp $ Add ability to parse unsigned integers as externalized by NetBSD proplib(3). --- Lib/plistlib.py.orig 2014-12-10 15:59:39.000000000 +0000 +++ Lib/plistlib.py @@ -463,7 +463,7 @@ class PlistParser: def end_false(self): self.addObject(Fal...
0
0
0
82
0
45
0
0
96
1d5633b8a3a1630ba3e9a1a960d928819c0756e0
791
py
Python
Second-handtradingplatform/TradingPlatform/account/urls.py
shangyajun6943/Second-hand
b8c423eeb559aed67856fb8a9f7130793d028118
[ "Apache-2.0" ]
null
null
null
Second-handtradingplatform/TradingPlatform/account/urls.py
shangyajun6943/Second-hand
b8c423eeb559aed67856fb8a9f7130793d028118
[ "Apache-2.0" ]
null
null
null
Second-handtradingplatform/TradingPlatform/account/urls.py
shangyajun6943/Second-hand
b8c423eeb559aed67856fb8a9f7130793d028118
[ "Apache-2.0" ]
null
null
null
from django.urls import path from . import views app_name='account' urlpatterns = [ path('login', views.login,name='login'), path('login/*/', views.login,name='login2'), path('register', views.register,name='register'), path('conact', views.conact,name='conact'), path('do_register',views.do_regist...
39.55
79
0.724399
from django.urls import path from . import views app_name='account' urlpatterns = [ path('login', views.login,name='login'), path('login/*/', views.login,name='login2'), path('register', views.register,name='register'), path('conact', views.conact,name='conact'), path('do_register',views.do_regist...
0
0
0
0
0
0
0
0
0
b45d3c2f5b636e494def73e345cb81de739ec7a2
771
py
Python
2016/day06.py
XtinaSchelin/adventofcode
41aa36c8226310ab35a61703cba6b8bbbffe8281
[ "MIT" ]
null
null
null
2016/day06.py
XtinaSchelin/adventofcode
41aa36c8226310ab35a61703cba6b8bbbffe8281
[ "MIT" ]
null
null
null
2016/day06.py
XtinaSchelin/adventofcode
41aa36c8226310ab35a61703cba6b8bbbffe8281
[ "MIT" ]
null
null
null
example = """eedadn drvtee eandsr raavrd atevrs tsrnev sdttsa rasrtv nssdts ntnada svetve tesnvt vntsnd vrdear dvrsen enarar""" answer = { "a": "easter", "b": "advent" } do_day(test=False, day="a") do_day(test=False, day="b")
16.404255
57
0.634241
example = """eedadn drvtee eandsr raavrd atevrs tsrnev sdttsa rasrtv nssdts ntnada svetve tesnvt vntsnd vrdear dvrsen enarar""" answer = { "a": "easter", "b": "advent" } def do_day(test=False, day="a"): if test: inputs = example.split("\n") else: inputs = open("d6.txt", "r").read().split("\n") width = len(in...
0
0
0
0
0
518
0
0
23
b87b9d7e222109a95d5d07a30c8292dd7c469831
619,205
py
Python
pysnmp/INFORMANT-HW.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
11
2021-02-02T16:27:16.000Z
2021-08-31T06:22:49.000Z
pysnmp/INFORMANT-HW.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
75
2021-02-24T17:30:31.000Z
2021-12-08T00:01:18.000Z
pysnmp/INFORMANT-HW.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 INFORMANT-HW (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/INFORMANT-HW # Produced by pysmi-0.3.4 at Mon Apr 29 19:42:12 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019,...
147.429762
10,010
0.736344
# # PySNMP MIB module INFORMANT-HW (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/INFORMANT-HW # Produced by pysmi-0.3.4 at Mon Apr 29 19:42:12 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019,...
0
0
0
0
0
0
0
0
0
7f4663c3ca07092e3d88372ce08c7494eb32b7a6
3,058
py
Python
geometry_utils/polygons.py
NOAA-ORR-ERD/geometry_utils
0417a8c459fb17f101945f53d048191dc22e97c0
[ "BSD-3-Clause" ]
null
null
null
geometry_utils/polygons.py
NOAA-ORR-ERD/geometry_utils
0417a8c459fb17f101945f53d048191dc22e97c0
[ "BSD-3-Clause" ]
null
null
null
geometry_utils/polygons.py
NOAA-ORR-ERD/geometry_utils
0417a8c459fb17f101945f53d048191dc22e97c0
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python """ Single module to hold the high-level API """ import numpy as np from .cy_point_in_polygon import points_in_poly, signed_area def polygon_inside(polygon_verts, trial_points): ''' Return a Boolean array the size of the trial point array True if point is inside INPUTS ------...
24.66129
87
0.637672
#!/usr/bin/env python """ Single module to hold the high-level API """ import numpy as np from .cy_point_in_polygon import points_in_poly, points_in_polys, signed_area def polygon_inside(polygon_verts, trial_points): ''' Return a Boolean array the size of the trial point array True if point is inside ...
0
0
0
0
0
0
0
17
0
d851892ba47a6c83cd440bb200126b2b7ce165a7
59
py
Python
tests/roots/test-latex-equations/conf.py
samdoran/sphinx
4c91c038b220d07bbdfe0c1680af42fe897f342c
[ "BSD-2-Clause" ]
4,973
2015-01-03T15:44:00.000Z
2022-03-31T03:11:51.000Z
tests/roots/test-latex-equations/conf.py
samdoran/sphinx
4c91c038b220d07bbdfe0c1680af42fe897f342c
[ "BSD-2-Clause" ]
7,850
2015-01-02T08:09:25.000Z
2022-03-31T18:57:40.000Z
tests/roots/test-latex-equations/conf.py
samdoran/sphinx
4c91c038b220d07bbdfe0c1680af42fe897f342c
[ "BSD-2-Clause" ]
2,179
2015-01-03T15:26:53.000Z
2022-03-31T12:22:44.000Z
root_doc = 'equations' extensions = ['sphinx.ext.imgmath']
19.666667
35
0.728814
root_doc = 'equations' extensions = ['sphinx.ext.imgmath']
0
0
0
0
0
0
0
0
0
e1ed0943c01f3e869578d25a54fde319e2b5f1c2
414
py
Python
idb/ipc/set_location.py
sergey-plevako-badoo/FBSimulatorControl
117af8508ba7405bdbacd29ec95a0523b3926ad3
[ "MIT" ]
1
2019-06-12T16:46:25.000Z
2019-06-12T16:46:25.000Z
idb/ipc/set_location.py
BalestraPatrick/idb
9deac2af129e7595c303c121944034c556202454
[ "MIT" ]
null
null
null
idb/ipc/set_location.py
BalestraPatrick/idb
9deac2af129e7595c303c121944034c556202454
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
31.846154
85
0.768116
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. from idb.grpc.types import CompanionClient from idb.grpc.idb_pb2 import Location, SetLocationRequest async def client(client: CompanionClient, latitude: float, longitude: float) -> None: await client.stub.set_location...
0
0
192
0
0
0
0
57
68
f088ad78a27a68201c4659c90d3a22c20eeace18
3,904
py
Python
libvips-8.11/test/test-suite/test_connection.py
MFerrol/Create_Web
76c8590ffffc6834a13f8efaf5ca7a5829cb1c32
[ "MIT" ]
2
2020-11-19T04:09:33.000Z
2020-11-24T04:51:19.000Z
libvips-8.11/test/test-suite/test_connection.py
MFerrol/Create_Web
76c8590ffffc6834a13f8efaf5ca7a5829cb1c32
[ "MIT" ]
null
null
null
libvips-8.11/test/test-suite/test_connection.py
MFerrol/Create_Web
76c8590ffffc6834a13f8efaf5ca7a5829cb1c32
[ "MIT" ]
1
2021-01-16T10:36:37.000Z
2021-01-16T10:36:37.000Z
# vim: set fileencoding=utf-8 : import pytest if __name__ == '__main__': pytest.main()
30.263566
78
0.645236
# vim: set fileencoding=utf-8 : import sys import os import shutil import tempfile import pytest import pyvips from helpers import \ JPEG_FILE, PNG_FILE, TIF_FILE, \ temp_filename, assert_almost_equal_objects, have, skip_if_no class TestConnection: tempdir = None @classmethod def setup_class(cl...
0
2,723
0
874
0
0
0
57
157
9035c950a611c8178e20aa0443d1ac85be9f85f1
975
py
Python
tests/test_predict.py
yubin-park/bonsai-dt
2a51c766135aca7d8b2d8411b174c417d5257a10
[ "Apache-2.0" ]
32
2018-07-20T17:20:58.000Z
2021-12-18T02:32:34.000Z
tests/test_predict.py
yubin-park/bonsai-dt
2a51c766135aca7d8b2d8411b174c417d5257a10
[ "Apache-2.0" ]
4
2018-08-05T02:08:31.000Z
2021-12-29T13:49:59.000Z
tests/test_predict.py
yubin-park/bonsai-dt
2a51c766135aca7d8b2d8411b174c417d5257a10
[ "Apache-2.0" ]
6
2018-10-15T16:17:08.000Z
2022-03-11T13:40:00.000Z
import unittest if __name__=="__main__": unittest.main()
27.083333
68
0.652308
from bonsai.base.regtree import RegTree from sklearn.datasets import make_friedman1 from sklearn.model_selection import train_test_split import numpy as np import unittest from misc import apply_tree class PredictTestCase(unittest.TestCase): def test_predict(self): n_samples = 1000 max_depth = 4 ...
0
0
0
703
0
0
0
74
133
1695e1a487c6dc41e43b37a202b43542fb71c194
607
py
Python
Chapter08/Numba/mat_mul_numba.py
ibiscum/Python-Parallel-Programming-Cookbook-Second-Edition
8fd583019778b4d797d4f948d091b5564e23f732
[ "MIT" ]
null
null
null
Chapter08/Numba/mat_mul_numba.py
ibiscum/Python-Parallel-Programming-Cookbook-Second-Edition
8fd583019778b4d797d4f948d091b5564e23f732
[ "MIT" ]
null
null
null
Chapter08/Numba/mat_mul_numba.py
ibiscum/Python-Parallel-Programming-Cookbook-Second-Edition
8fd583019778b4d797d4f948d091b5564e23f732
[ "MIT" ]
null
null
null
import numpy as np dim = 10 A = np.random.randint(dim, size=(dim, dim)) B = np.random.randint(dim, size=(dim, dim)) C = matmul(A, B) print("INPUT MATRIX A") print(":\n%s" % A) print("INPUT MATRIX B") print(":\n%s" % B) print("RESULT MATRIX C = A*B") print(":\n%s" % C)
21.678571
58
0.500824
from numba import guvectorize import numpy as np @guvectorize(['void(int64[:,:], int64[:,:], int64[:,:])'], '(m,n),(n,p)->(m,p)') def matmul(A, B, C): m, n = A.shape n, p = B.shape for i in range(m): for j in range(p): C[i, j] = 0 for k in range(n): ...
0
281
0
0
0
0
0
8
45
e427ea78ee0e6ff1afd4d96cff4f165ff41942e5
3,298
py
Python
src/utils/custom_models/helpers.py
MadryLab/smoothed-vit
a4327542e519e010764821716b64b944d458d1c1
[ "MIT" ]
16
2021-10-14T18:39:46.000Z
2022-03-30T13:47:07.000Z
src/utils/custom_models/helpers.py
anonymousneurips21/paper4705
3a984c20d02f6317dceec49468f99303d3af265b
[ "MIT" ]
1
2021-12-01T01:05:36.000Z
2021-12-01T05:31:44.000Z
src/utils/custom_models/helpers.py
anonymousneurips21/paper4705
3a984c20d02f6317dceec49468f99303d3af265b
[ "MIT" ]
1
2022-02-04T18:16:46.000Z
2022-02-04T18:16:46.000Z
import logging import torch.utils.model_zoo as model_zoo _logger = logging.getLogger(__name__)
45.805556
108
0.651607
import logging import math import torch.utils.model_zoo as model_zoo _logger = logging.getLogger(__name__) def load_pretrained(model, cfg=None, num_classes=1000, in_chans=3, filter_fn=None, strict=True): if cfg is None: cfg = getattr(model, 'default_cfg') if cfg is None or 'url' not in cfg or not cf...
0
0
0
0
0
3,165
0
-10
45
5bdefb3dc05db12194db8100ce9aecc60b323e25
3,840
py
Python
behavioral/observer/observer.py
kimgea/design_patterns
def656f50c4f26e25f8a0d2920041c2f002dc2d0
[ "MIT" ]
null
null
null
behavioral/observer/observer.py
kimgea/design_patterns
def656f50c4f26e25f8a0d2920041c2f002dc2d0
[ "MIT" ]
null
null
null
behavioral/observer/observer.py
kimgea/design_patterns
def656f50c4f26e25f8a0d2920041c2f002dc2d0
[ "MIT" ]
null
null
null
#TODO: rename obj to something more descriptive #TODO: make test cases to test everything #######################################################################################################
29.090909
137
0.567969
from collections import defaultdict #TODO: rename obj to something more descriptive #TODO: make test cases to test everything class Observable: def __init__(self, observers=defaultdict(set), shared=False): if not observers and not shared: self._observers = defaultdict(set) else: ...
0
0
0
3,505
0
0
0
14
115
161df7fb40f3e0fac4552514bffeab3707054a69
701
py
Python
Modules/Logging/reactions.py
DevFlock/Discord-Bot
912430f82daa5d906f558b4c3394af07b95f7705
[ "Apache-2.0" ]
null
null
null
Modules/Logging/reactions.py
DevFlock/Discord-Bot
912430f82daa5d906f558b4c3394af07b95f7705
[ "Apache-2.0" ]
null
null
null
Modules/Logging/reactions.py
DevFlock/Discord-Bot
912430f82daa5d906f558b4c3394af07b95f7705
[ "Apache-2.0" ]
null
null
null
from console import Console console = Console(True)
30.478261
113
0.687589
import discord from discord.ext import commands from console import Console console = Console(True) class reaction_add(commands.Cog): def __init__(self, client): self.client = client @commands.Cog.listener() async def on_reaction_add(self, reaction, user): if not user.bot: co...
0
389
0
128
0
38
0
4
90
88c499fae475f8ce4183b9360bb5d02b4b41efc5
198
py
Python
Codewars_Python/evens_and_odds.py
nlantau/Codewars_2020_2021
055fbf8785ddd52b9f8e8c2b59294ead01852467
[ "MIT" ]
null
null
null
Codewars_Python/evens_and_odds.py
nlantau/Codewars_2020_2021
055fbf8785ddd52b9f8e8c2b59294ead01852467
[ "MIT" ]
null
null
null
Codewars_Python/evens_and_odds.py
nlantau/Codewars_2020_2021
055fbf8785ddd52b9f8e8c2b59294ead01852467
[ "MIT" ]
null
null
null
# nlantau, 2020-11-09 print(evens_and_odds(1)) print(evens_and_odds(2)) print(evens_and_odds(3)) print(evens_and_odds(13))
16.5
47
0.681818
# nlantau, 2020-11-09 def evens_and_odds(n): return f"{n:b}" if n % 2 == 0 else f"{n:x}" print(evens_and_odds(1)) print(evens_and_odds(2)) print(evens_and_odds(3)) print(evens_and_odds(13))
0
0
0
0
0
49
0
0
23
65ba6a8ca1f55c46bf837b2041f28e7bb884ba9e
10,007
py
Python
models.py
killamocingbird/viralmodel
38f0a64af9082f53c02117697e41ded896b58684
[ "MIT" ]
null
null
null
models.py
killamocingbird/viralmodel
38f0a64af9082f53c02117697e41ded896b58684
[ "MIT" ]
null
null
null
models.py
killamocingbird/viralmodel
38f0a64af9082f53c02117697e41ded896b58684
[ "MIT" ]
null
null
null
# Interface for models # Helper function to get classes from string
41.18107
133
0.503847
import distributions import math import numpy as np import os import projections import random import sys # Interface for models class Model_Backbone: def __init__(self, cfg, pfs): self.cfg = cfg self.pfs = pfs self.data = dict() # ToImplement def forward(self): ...
0
0
0
9,659
0
58
0
-48
231
7cf6655e00b12a9970e00e80d05996a30dfd700c
2,771
py
Python
rlgym/version.py
aidant19/rocket-league-gym
e6eebcdc9ba93ae3f94532b306b551d7cdc7c9e7
[ "Apache-2.0" ]
null
null
null
rlgym/version.py
aidant19/rocket-league-gym
e6eebcdc9ba93ae3f94532b306b551d7cdc7c9e7
[ "Apache-2.0" ]
null
null
null
rlgym/version.py
aidant19/rocket-league-gym
e6eebcdc9ba93ae3f94532b306b551d7cdc7c9e7
[ "Apache-2.0" ]
null
null
null
# From https://github.com/RLBot/RLBot/blob/master/src/main/python/rlbot/version.py # Store the version here so: # 1) we don't load dependencies by storing it in __init__.py # 2) we can import it in setup.py for the same reason # 3) we can import it into your module module # https://stackoverflow.com/questions/458550/st...
34.6375
124
0.673042
# From https://github.com/RLBot/RLBot/blob/master/src/main/python/rlbot/version.py # Store the version here so: # 1) we don't load dependencies by storing it in __init__.py # 2) we can import it in setup.py for the same reason # 3) we can import it into your module module # https://stackoverflow.com/questions/458550/st...
0
0
0
0
0
206
0
0
46
599d114d7d25d20fc362d7ca7c011a114fe461c3
1,327
py
Python
pit.py
aebrahimian/alpha-zero-hex
466ca3b08713f179390d1595e28f7a473994df54
[ "MIT" ]
1
2019-05-22T05:28:01.000Z
2019-05-22T05:28:01.000Z
pit.py
aebrahimian/alpha-zero-hex
466ca3b08713f179390d1595e28f7a473994df54
[ "MIT" ]
null
null
null
pit.py
aebrahimian/alpha-zero-hex
466ca3b08713f179390d1595e28f7a473994df54
[ "MIT" ]
null
null
null
import Arena from MCTS import MCTS from hex.HexGame import HexGame, display from hex.pytorch.NNet import NNetWrapper as NNet import numpy as np """ use this script to play any two agents against each other, or play manually with any agent. """ g = HexGame(6) # all players rp = RandomPlayer(g).play hp = HumanHexPlay...
32.365854
117
0.730972
import Arena from MCTS import MCTS from hex.HexGame import HexGame, display from hex.HexPlayers import * from hex.pytorch.NNet import NNetWrapper as NNet import numpy as np from utils import * """ use this script to play any two agents against each other, or play manually with any agent. """ g = HexGame(6) # all pl...
0
0
0
0
0
0
0
5
44
8d5a6246eee0f3d586de1d54cafc2e8cfd589550
955
py
Python
kaishi/core/filters/duplicate_files.py
kungfuai/kaishi
e20360170ccac2111cab61fcd71b81be3c2a7468
[ "MIT" ]
10
2020-04-01T16:46:25.000Z
2021-02-09T15:56:42.000Z
kaishi/core/filters/duplicate_files.py
kungfuai/kaishi
e20360170ccac2111cab61fcd71b81be3c2a7468
[ "MIT" ]
14
2020-03-23T13:32:35.000Z
2021-12-07T19:30:23.000Z
kaishi/core/filters/duplicate_files.py
kungfuai/kaishi
e20360170ccac2111cab61fcd71b81be3c2a7468
[ "MIT" ]
2
2020-08-14T07:23:06.000Z
2021-12-06T18:20:42.000Z
"""Class definition for filtering duplicate files."""
35.37037
85
0.712042
"""Class definition for filtering duplicate files.""" from kaishi.core.misc import find_duplicate_inds from kaishi.core.misc import trim_list_by_inds from kaishi.core.misc import CollapseChildren from kaishi.core.pipeline_component import PipelineComponent class FilterDuplicateFiles(PipelineComponent): """Filter ...
0
0
0
674
0
0
0
115
111
19b54a642f34c45ec7eb66153bc74a3be9cae35c
7,546
py
Python
base.py
DDMAL/diagonal-neume-slicing
092cf8b72b32eb724db83741793057b4bfd8a855
[ "MIT" ]
1
2019-05-14T19:25:15.000Z
2019-05-14T19:25:15.000Z
base.py
DDMAL/diagonal-neume-slicing
092cf8b72b32eb724db83741793057b4bfd8a855
[ "MIT" ]
3
2018-12-17T17:00:28.000Z
2021-05-12T14:29:51.000Z
base.py
DDMAL/diagonal-neume-slicing
092cf8b72b32eb724db83741793057b4bfd8a855
[ "MIT" ]
null
null
null
from gamera.core import init_gamera init_gamera()
36.105263
202
0.547045
from rodan.jobs.base import RodanTask from gamera.core import init_gamera, Image, load_image from gamera import gamera_xml from ProjectionSplitting import ProjectionSplitter from DirtyLayerRepair import DirtyLayerRepairman init_gamera() class DiagonalNeumeSlicing(RodanTask): name = 'Diagonal Neume Slicing' ...
0
0
0
7,258
0
0
0
99
135
108445657c54477752b7e86578da16bddbb3bba9
3,080
py
Python
handroll/composers/generic.py
iter8ve/handroll
55a97080b82ac5dcec1e974379b22fbaacf18c99
[ "BSD-2-Clause" ]
17
2015-02-28T07:36:13.000Z
2022-01-22T13:49:22.000Z
handroll/composers/generic.py
iter8ve/handroll
55a97080b82ac5dcec1e974379b22fbaacf18c99
[ "BSD-2-Clause" ]
61
2015-02-24T01:12:56.000Z
2017-10-21T18:53:26.000Z
handroll/composers/generic.py
iter8ve/handroll
55a97080b82ac5dcec1e974379b22fbaacf18c99
[ "BSD-2-Clause" ]
3
2019-02-04T16:33:08.000Z
2021-04-20T08:58:56.000Z
# Copyright (c) 2017, Matt Layman
35.813953
79
0.657468
# Copyright (c) 2017, Matt Layman import os from handroll import logger from handroll.composers import Composer from handroll.composers.mixins import FrontmatterComposerMixin from handroll.i18n import _ class GenericHTMLComposer(FrontmatterComposerMixin, Composer): """A template class that performs basic handli...
0
42
0
2,809
0
0
0
59
135
240cda84528599dd6a40122be2a9dc0b0eb9a728
1,411
py
Python
examples/user_examples.py
optimum-web/oneandone-cloudserver-sdk-python
d748865cda4c1d91617d9a3f0d156eb1be500799
[ "Apache-2.0" ]
1
2018-08-28T07:00:54.000Z
2018-08-28T07:00:54.000Z
examples/user_examples.py
optimum-web/oneandone-cloudserver-sdk-python
d748865cda4c1d91617d9a3f0d156eb1be500799
[ "Apache-2.0" ]
8
2017-10-02T11:08:11.000Z
2019-03-28T08:11:49.000Z
examples/user_examples.py
optimum-web/oneandone-cloudserver-sdk-python
d748865cda4c1d91617d9a3f0d156eb1be500799
[ "Apache-2.0" ]
3
2016-05-20T19:03:49.000Z
2018-09-06T13:41:43.000Z
import os from oneandone.client import OneAndOneService token = os.getenv('ONEANDONE_TOKEN') client = OneAndOneService(token) # List all users users = client.list_users() # Retrieve a user user = client.get_user(user_id='') # Retrieve a user's API privileges api_info = client.api_info(user_id='') # Retrieve a use...
25.196429
80
0.678951
import os from oneandone.client import OneAndOneService token = os.getenv('ONEANDONE_TOKEN') client = OneAndOneService(token) # List all users users = client.list_users() # Retrieve a user user = client.get_user(user_id='') # Retrieve a user's API privileges api_info = client.api_info(user_id='') # Retrieve a use...
0
0
0
0
0
0
0
0
0
8ce55caa990d80cc5d90898318feba56a889cc7f
2,505
py
Python
reference/sketchbook/lz/lzw.py
JaDogg/__py_playground
416f88db10e03f5380bcb5cfcad0bca50ffa657c
[ "MIT" ]
1
2015-10-28T00:00:16.000Z
2015-10-28T00:00:16.000Z
reference/sketchbook/lz/lzw.py
JaDogg/__py_playground
416f88db10e03f5380bcb5cfcad0bca50ffa657c
[ "MIT" ]
null
null
null
reference/sketchbook/lz/lzw.py
JaDogg/__py_playground
416f88db10e03f5380bcb5cfcad0bca50ffa657c
[ "MIT" ]
null
null
null
""" An implementation of http://en.wikipedia.org/wiki/Lempel%E2%80%93Ziv%E2%80%93Welch (without any entropy coder or codebook size limit) """ ## message = 'TOBEORNOTTOBEORTOBEORNOT' ## encoded = list(encode(message)) ## output = ''.join(decode(encoded)) ## message == output #. True ## list(show_lzw(message)) #. ['T', ...
29.470588
91
0.607186
""" An implementation of http://en.wikipedia.org/wiki/Lempel%E2%80%93Ziv%E2%80%93Welch (without any entropy coder or codebook size limit) """ ## message = 'TOBEORNOTTOBEORTOBEORNOT' ## encoded = list(encode(message)) ## output = ''.join(decode(encoded)) ## message == output #. True ## list(show_lzw(message)) #. ['T', ...
0
0
0
0
1,015
303
0
0
161
902d89870189fcb1803ab5b2772058e388b43d94
327
py
Python
hooks/pre_gen_project.py
ovnicraft/cookiecutter-openerp
b581f753ca1c0cd6255ff5a8fd827d0142b0a5a5
[ "MIT" ]
2
2015-03-17T10:57:55.000Z
2017-12-18T14:06:41.000Z
hooks/pre_gen_project.py
ovnicraft/cookiecutter-openerp
b581f753ca1c0cd6255ff5a8fd827d0142b0a5a5
[ "MIT" ]
null
null
null
hooks/pre_gen_project.py
ovnicraft/cookiecutter-openerp
b581f753ca1c0cd6255ff5a8fd827d0142b0a5a5
[ "MIT" ]
null
null
null
import os import shutil if "{{ cookiecutter.has_models }}" == "no": shutil.rmtree("models") if "{{ cookiecutter.has_wizards }}" == "yes": os.mkdir("wizards") if "{{ cookiecutter.has_reports }}" == "yes": os.mkdir("reports") if "{{ cookiecutter.has_controller}}" == "yes": os.mkdir("controllers")
19.235294
47
0.626911
import os import re import shutil if "{{ cookiecutter.has_models }}" == "no": shutil.rmtree("models") if "{{ cookiecutter.has_wizards }}" == "yes": os.mkdir("wizards") if "{{ cookiecutter.has_reports }}" == "yes": os.mkdir("reports") if "{{ cookiecutter.has_controller}}" == "yes": os.mkdir("control...
0
0
0
0
0
0
0
-12
22
292bf6f15c058d80ce78cb293146b598763a0380
12,647
py
Python
makepy/commands.py
ubunatic/pimpy
4fd129e624edf63a3e1ec55d52ff2385f3be7946
[ "MIT" ]
4
2018-08-06T07:28:30.000Z
2021-02-03T05:48:11.000Z
makepy/commands.py
ubunatic/pimpy
4fd129e624edf63a3e1ec55d52ff2385f3be7946
[ "MIT" ]
null
null
null
makepy/commands.py
ubunatic/pimpy
4fd129e624edf63a3e1ec55d52ff2385f3be7946
[ "MIT" ]
null
null
null
from __future__ import print_function, absolute_import import logging from os.path import dirname # load files and templates try: from makepy._datafiles import dirs as datadirs, files as datafiles except: datafiles = {}; datadirs = set() try: from makepy._makefiles import dirs as makedirs, files as makefiles exc...
37.197059
100
0.579584
from __future__ import print_function, absolute_import from builtins import str import sys, os, re, json, logging, errno from datetime import datetime from glob import glob from os.path import join, isfile, dirname, abspath, basename from makepy import argparse from makepy.config import read_setup_args, package_dir, r...
0
0
0
0
0
10,899
0
243
1,027
0e9b32abfc2e043475cedc75ae055f107d7a37ca
26
py
Python
hello.py
sagar2s/Hacktoberfest2020
9fe4e59c9075b177e6798512c7aa73f68d5668b4
[ "Apache-2.0" ]
null
null
null
hello.py
sagar2s/Hacktoberfest2020
9fe4e59c9075b177e6798512c7aa73f68d5668b4
[ "Apache-2.0" ]
null
null
null
hello.py
sagar2s/Hacktoberfest2020
9fe4e59c9075b177e6798512c7aa73f68d5668b4
[ "Apache-2.0" ]
null
null
null
print("Hello I am Sagar")
13
25
0.692308
print("Hello I am Sagar")
0
0
0
0
0
0
0
0
0
9b1b2767a0febe1147830644878e7494c6ea43f1
1,598
py
Python
preprocess/SentiWordNet.py
KnightZhang625/Project_SentimentAnalysis
e68193b8811a12217f9ae117aafe7f363c9f7caa
[ "Apache-2.0" ]
null
null
null
preprocess/SentiWordNet.py
KnightZhang625/Project_SentimentAnalysis
e68193b8811a12217f9ae117aafe7f363c9f7caa
[ "Apache-2.0" ]
null
null
null
preprocess/SentiWordNet.py
KnightZhang625/Project_SentimentAnalysis
e68193b8811a12217f9ae117aafe7f363c9f7caa
[ "Apache-2.0" ]
null
null
null
# coding:utf-8 """The file is just for test.""" import nltk from nltk.corpus import wordnet as wn from nltk.corpus import sentiwordnet as swn from nltk.stem import PorterStemmer from nltk.stem import WordNetLemmatizer lemmatizer = WordNetLemmatizer() ps = PorterStemmer() def penn_to_wn(tag): """ Convert betw...
28.035088
112
0.679599
# coding:utf-8 """The file is just for test.""" import nltk from nltk.corpus import wordnet as wn from nltk.corpus import sentiwordnet as swn from nltk.stem import PorterStemmer from nltk.stem import WordNetLemmatizer lemmatizer = WordNetLemmatizer() ps = PorterStemmer() def penn_to_wn(tag): """ Convert betw...
0
0
0
0
0
0
0
0
0
ea9ec16a51131c3f734fad6594fcbb245bbe19a1
877
py
Python
setup.py
paulo-werneck/airflow-notify-sns
8923d6acb7542fc134e4e5119fccdfb6222dc446
[ "MIT" ]
5
2021-03-05T20:46:46.000Z
2022-02-23T17:23:18.000Z
setup.py
paulo-werneck/airflow-notify-sns
8923d6acb7542fc134e4e5119fccdfb6222dc446
[ "MIT" ]
null
null
null
setup.py
paulo-werneck/airflow-notify-sns
8923d6acb7542fc134e4e5119fccdfb6222dc446
[ "MIT" ]
1
2021-07-14T02:58:04.000Z
2021-07-14T02:58:04.000Z
import io from os import path from setuptools import setup, find_packages MYDIR = path.abspath(path.dirname(__file__)) cmdclass = {} ext_modules = [] setup( name='airflow-notify-sns', version='0.0.2', author="Marcelo Santino", author_email="marcelo@santino.dev", description="Publish Airflow not...
29.233333
72
0.68073
import io from os import path from setuptools import setup, find_packages MYDIR = path.abspath(path.dirname(__file__)) cmdclass = {} ext_modules = [] setup( name='airflow-notify-sns', version='0.0.2', author="Marcelo Santino", author_email="marcelo@santino.dev", description="Publish Airflow not...
0
0
0
0
0
0
0
0
0
b14235fd91f2de80ddba25b2b48a54d972be64b4
37
py
Python
test/login.py
gq-song/test007
69b2a995e0192c886128ff7f05594ab4119c7375
[ "MIT" ]
null
null
null
test/login.py
gq-song/test007
69b2a995e0192c886128ff7f05594ab4119c7375
[ "MIT" ]
null
null
null
test/login.py
gq-song/test007
69b2a995e0192c886128ff7f05594ab4119c7375
[ "MIT" ]
null
null
null
num = 10 num2 =20 num3 =300 num4 =40
7.4
9
0.648649
num = 10 num2 =20 num3 =300 num4 =40
0
0
0
0
0
0
0
0
0
ca09d8932c3db970f5ab8fc70711f85e9139a9a0
785
py
Python
Modules/Module5/SampleCode/9_infinite_loops.py
hackettccp/CSCI111
129b2120dbedb54e7964b9d915e2457962cf55e2
[ "MIT" ]
2
2019-10-23T03:25:37.000Z
2021-02-23T04:09:03.000Z
Modules/Module5/SampleCode/9_infinite_loops.py
hackettccp/CSCI111
129b2120dbedb54e7964b9d915e2457962cf55e2
[ "MIT" ]
null
null
null
Modules/Module5/SampleCode/9_infinite_loops.py
hackettccp/CSCI111
129b2120dbedb54e7964b9d915e2457962cf55e2
[ "MIT" ]
null
null
null
""" This program demonstrates an infinite loop. This program will need to be force closed as it will never end. """ keep_going = "y" #Variable to control the loop. #Warning! Infinite loop! This program will never end. while keep_going == "y": sales = float(in...
37.380952
119
0.611465
""" This program demonstrates an infinite loop. This program will need to be force closed as it will never end. """ keep_going = "y" #Variable to control the loop. #Warning! Infinite loop! This program will never end. while keep_going == "y": sales = float(in...
0
0
0
0
0
0
0
0
0
bf2c6e862a6db5373691e299e6ce5e966f8722d8
1,684
py
Python
game/urls.py
iestynlee/Group-Software-Project
407466b2cd6d332167904b8a628f64a769014b33
[ "MIT" ]
2
2022-02-28T15:50:43.000Z
2022-03-02T17:38:18.000Z
game/urls.py
iestynlee/Group-Software-Project
407466b2cd6d332167904b8a628f64a769014b33
[ "MIT" ]
null
null
null
game/urls.py
iestynlee/Group-Software-Project
407466b2cd6d332167904b8a628f64a769014b33
[ "MIT" ]
3
2022-03-01T12:37:25.000Z
2022-03-24T00:53:50.000Z
from django.urls import path from . import views from django.contrib.auth import views as auth_views from django.contrib.staticfiles.urls import staticfiles_urlpatterns app_name='game' urlpatterns = [ #Home path('', views.home, name="home"), #Lobby path('lobbies/', views.lobbies, name="lobbies"), p...
44.315789
161
0.752969
from django.urls import path, include from . import views from django.contrib.auth import views as auth_views from django.contrib.staticfiles.urls import staticfiles_urlpatterns app_name='game' urlpatterns = [ #Home path('', views.home, name="home"), #Lobby path('lobbies/', views.lobbies, name="lobbi...
0
0
0
0
0
0
0
9
0
9a853999efff9cee4e89a3cc226b86bb0add20a0
975
py
Python
python/pygtk/python_gtk3_pygobject/container_box_vertical.py
jeremiedecock/snippets
4bd4e7f459eee610d5cf19f845299ca942ff4b64
[ "MIT" ]
23
2015-06-08T13:01:00.000Z
2021-12-30T08:20:04.000Z
python/pygtk/python_gtk3_pygobject/container_box_vertical.py
jeremiedecock/snippets
4bd4e7f459eee610d5cf19f845299ca942ff4b64
[ "MIT" ]
1
2020-10-22T02:36:10.000Z
2020-10-22T02:36:10.000Z
python/pygtk/python_gtk3_pygobject/container_box_vertical.py
jeremiedecock/snippets
4bd4e7f459eee610d5cf19f845299ca942ff4b64
[ "MIT" ]
7
2017-10-31T09:48:14.000Z
2022-01-04T15:59:45.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2015 Jrmie DECOCK (http://www.jdhp.org) """ This is the simplest Python GTK+3 snippet. See: http://python-gtk-3-tutorial.readthedocs.org/en/latest/layout.html """ if __name__ == '__main__': main()
29.545455
118
0.653333
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2015 Jérémie DECOCK (http://www.jdhp.org) """ This is the simplest Python GTK+3 snippet. See: http://python-gtk-3-tutorial.readthedocs.org/en/latest/layout.html """ from gi.repository import Gtk as gtk def main(): window = gtk.Window() vertica...
4
0
0
0
0
643
0
15
46
fdb25ace37b7d268698883213869a3b6293a3ed7
209
py
Python
lite/jupyterlite-pidgy/py_src/jupyterlite_pidgy/_version.py
deathbeds/pidgy
0162157a4c35f2053b4fc774a4c67cfc0d2c7df5
[ "BSD-3-Clause" ]
25
2020-03-02T15:34:12.000Z
2022-01-22T11:10:32.000Z
lite/jupyterlite-pidgy/py_src/jupyterlite_pidgy/_version.py
deathbeds/pidgy
0162157a4c35f2053b4fc774a4c67cfc0d2c7df5
[ "BSD-3-Clause" ]
26
2020-02-21T14:39:11.000Z
2021-12-14T02:28:51.000Z
lite/jupyterlite-pidgy/py_src/jupyterlite_pidgy/_version.py
deathbeds/rites
0162157a4c35f2053b4fc774a4c67cfc0d2c7df5
[ "BSD-3-Clause" ]
4
2020-02-19T00:13:22.000Z
2021-12-01T23:13:07.000Z
import json from pathlib import Path __all__ = ["__version__", "__js__"] __js__ = json.load( (Path(__file__).parent.resolve() / "labextension/package.json").read_bytes() ) __version__ = __js__["version"]
23.222222
80
0.722488
import json from pathlib import Path __all__ = ["__version__", "__js__"] __js__ = json.load( (Path(__file__).parent.resolve() / "labextension/package.json").read_bytes() ) __version__ = __js__["version"]
0
0
0
0
0
0
0
0
0
1682c4c66064dc8bc79dcf51f150e33acf9b24cb
3,589
py
Python
ooobuild/lo/sheet/data_pilot_field_group_by.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
ooobuild/lo/sheet/data_pilot_field_group_by.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
ooobuild/lo/sheet/data_pilot_field_group_by.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # # Copyright 2022 :Barry-Thomas-Paul: Moss # # 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 applicab...
43.768293
244
0.711062
# coding: utf-8 # # Copyright 2022 :Barry-Thomas-Paul: Moss # # 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 applicab...
0
0
0
2,792
0
0
0
0
23
d4234d5ad14e3ee2b8f36f9a017c1291d66f6bdd
1,149
py
Python
chinese_permanent_calendar/perpetual_calendar.py
demeen68/chinese_permanent_calendar
4c0e48baaf40ba7f8368943e4d10d0cce4e14e43
[ "MIT" ]
3
2021-08-13T04:02:24.000Z
2022-02-19T07:43:42.000Z
chinese_permanent_calendar/perpetual_calendar.py
demeen68/chinese_permanent_calendar
4c0e48baaf40ba7f8368943e4d10d0cce4e14e43
[ "MIT" ]
null
null
null
chinese_permanent_calendar/perpetual_calendar.py
demeen68/chinese_permanent_calendar
4c0e48baaf40ba7f8368943e4d10d0cce4e14e43
[ "MIT" ]
2
2021-12-31T08:05:43.000Z
2022-02-19T07:43:56.000Z
# -*- coding: utf-8 -*-
41.035714
118
0.612707
# -*- coding: utf-8 -*- import pandas as pd class PerpetualCalendar(object): def __init__(self): import os.path file_path = os.path.abspath(os.path.dirname(__file__)) # self.calendar: pd.DataFrame = pd.read_pickle(file_path + '/cp_calendar.pkl') # This is a data file self.calendar...
21
0
0
1,074
0
0
0
-2
45
ef44df7b49331dc09eccb90464c70cb81c89b14d
949
py
Python
code/python/MarketIntelligence/v1/fds/sdk/MarketIntelligence/models/__init__.py
factset/enterprise-sdk
3fd4d1360756c515c9737a0c9a992c7451d7de7e
[ "Apache-2.0" ]
6
2022-02-07T16:34:18.000Z
2022-03-30T08:04:57.000Z
code/python/MarketIntelligence/v1/fds/sdk/MarketIntelligence/models/__init__.py
factset/enterprise-sdk
3fd4d1360756c515c9737a0c9a992c7451d7de7e
[ "Apache-2.0" ]
2
2022-02-07T05:25:57.000Z
2022-03-07T14:18:04.000Z
code/python/MarketIntelligence/v1/fds/sdk/MarketIntelligence/models/__init__.py
factset/enterprise-sdk
3fd4d1360756c515c9737a0c9a992c7451d7de7e
[ "Apache-2.0" ]
null
null
null
# flake8: noqa # import all models into this package # if you have many models here with many references from one model to another this may # raise a RecursionError # to avoid this, import only the models that you directly need like: # from from fds.sdk.MarketIntelligence.model.pet import Pet # or import this package,...
49.947368
86
0.847208
# flake8: noqa # import all models into this package # if you have many models here with many references from one model to another this may # raise a RecursionError # to avoid this, import only the models that you directly need like: # from from fds.sdk.MarketIntelligence.model.pet import Pet # or import this package,...
0
0
0
0
0
0
0
407
155
b1795b0025443f4846db24deca6027a3f4a3d80e
2,037
py
Python
58_ML_06_03_what_is_gabor_filter.py
Data-Laboratory/WorkExamples
27e58207e664da7813673e6792c0c30c0a5bf74c
[ "MIT" ]
1
2021-12-15T22:27:27.000Z
2021-12-15T22:27:27.000Z
58_ML_06_03_what_is_gabor_filter.py
Data-Laboratory/WorkExamples
27e58207e664da7813673e6792c0c30c0a5bf74c
[ "MIT" ]
null
null
null
58_ML_06_03_what_is_gabor_filter.py
Data-Laboratory/WorkExamples
27e58207e664da7813673e6792c0c30c0a5bf74c
[ "MIT" ]
null
null
null
""" #Ref: Sreenivas Sarwar Anik What are features? s """ ############################################## #Gabor filter, multiple filters in one. Generate fiter bank. """ For image processing and computer vision, Gabor filters are generally used in texture analysis, edge detection, feature extraction, etc. Gabor f...
31.828125
94
0.730977
""" #Ref: Sreenivas Sarwar Anik What are features? s """ ############################################## #Gabor filter, multiple filters in one. Generate fiter bank. """ For image processing and computer vision, Gabor filters are generally used in texture analysis, edge detection, feature extraction, etc. Gabor f...
6
0
0
0
0
0
0
0
0
f3c9e8d2d36667631a4a275e26bf61f10b652a35
3,222
py
Python
src/testutils.py
joaosoares/xray_teeth_detection
2385038e1fa609988eb2dfef11c0fff04815b23f
[ "MIT" ]
3
2018-08-16T11:52:53.000Z
2021-05-18T13:12:44.000Z
src/testutils.py
joaosoares/xray_teeth_detection
2385038e1fa609988eb2dfef11c0fff04815b23f
[ "MIT" ]
null
null
null
src/testutils.py
joaosoares/xray_teeth_detection
2385038e1fa609988eb2dfef11c0fff04815b23f
[ "MIT" ]
null
null
null
"""Assorted utilities for tests""" from typing import Tuple, List import numpy as np from active_shape_model import ActiveShapeModel from image_shape import ImageShape from imgutils import load_images, apply_sobel from incisors import Incisors from data_preprocessing import Preprocessor TEST_IMAGES = { "center...
33.216495
86
0.656425
"""Assorted utilities for tests""" import unittest from typing import Tuple, List import cv2 import numpy as np import numpy.testing as npt from active_shape_model import ActiveShapeModel from image_shape import ImageShape from imgutils import load_images, apply_median_blur, apply_sobel from incisors import Incisors ...
0
0
0
286
0
1,099
0
10
181
8bbe1ceec1cbf6f7a93b4bc83fe8b9015a1d6f82
3,444
py
Python
experiments/dtm.py
SebastianBruijns/pgmult
b727e31f58474c53d6cbf3abf6823db3b2bb4797
[ "MIT" ]
58
2015-06-22T15:07:17.000Z
2022-03-08T20:27:22.000Z
experiments/dtm.py
afcarl/pgmult
60631edda247486532b3269d0954b91bad7b8159
[ "MIT" ]
13
2015-06-22T15:00:53.000Z
2017-10-05T23:58:41.000Z
experiments/dtm.py
afcarl/pgmult
60631edda247486532b3269d0954b91bad7b8159
[ "MIT" ]
25
2015-07-07T16:31:42.000Z
2021-12-28T11:25:34.000Z
import pickle as pickle from collections import namedtuple from ctm import split_test_train ############# # loading # ############# ############# # fitting # ############# Results = namedtuple( 'Results', ['loglikes', 'predictive_lls', 'samples', 'timestamps']) ############# # running # ############...
27.774194
94
0.633566
import numpy as np import time import re import os import operator import pickle as pickle import dateutil from urllib.request import urlopen from collections import namedtuple from pybasicbayes.util.text import progprint, progprint_xrange from pgmult.utils import mkdir from ctm import get_sparse_repr, split_test_tr...
0
0
0
0
0
1,970
0
62
315
6f6292ee7214698ea0cbf76fc3db39a2717f320b
369
py
Python
server/rest/migrations/0002_room_root.py
nking1232/html5-msoy
6e026f1989b15310ad67c050beb69a168c3bdd5f
[ "MIT" ]
null
null
null
server/rest/migrations/0002_room_root.py
nking1232/html5-msoy
6e026f1989b15310ad67c050beb69a168c3bdd5f
[ "MIT" ]
null
null
null
server/rest/migrations/0002_room_root.py
nking1232/html5-msoy
6e026f1989b15310ad67c050beb69a168c3bdd5f
[ "MIT" ]
2
2020-12-18T19:19:38.000Z
2020-12-18T19:53:56.000Z
# Generated by Django 3.1.3 on 2020-12-01 19:08
19.421053
53
0.579946
# Generated by Django 3.1.3 on 2020-12-01 19:08 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('rest', '0001_initial'), ] operations = [ migrations.AddField( model_name='room', name='root', field=mode...
0
0
0
255
0
0
0
19
46
48e6eff338b268a8d4651fe7edcdfa2ef3210901
1,317
py
Python
runtests.py
abdulwahed-mansour/django-ajax-datatable
d992814d6c71d0578d3d1fd24ce994f13ea364a6
[ "MIT" ]
1
2021-01-18T11:26:17.000Z
2021-01-18T11:26:17.000Z
runtests.py
abdulwahed-mansour/django-ajax-datatable
d992814d6c71d0578d3d1fd24ce994f13ea364a6
[ "MIT" ]
null
null
null
runtests.py
abdulwahed-mansour/django-ajax-datatable
d992814d6c71d0578d3d1fd24ce994f13ea364a6
[ "MIT" ]
1
2021-02-04T16:20:02.000Z
2021-02-04T16:20:02.000Z
#!/usr/bin/env python import os import sys # See "Using the Django test runner to test reusable applications": # https://docs.djangoproject.com/en/3.1/topics/testing/advanced/#using-the-django-test-runner-to-test-reusable-applications import django from django.conf import settings from django.test.utils import get_ru...
27.4375
123
0.709188
#!/usr/bin/env python import os import sys # See "Using the Django test runner to test reusable applications": # https://docs.djangoproject.com/en/3.1/topics/testing/advanced/#using-the-django-test-runner-to-test-reusable-applications import django from django.conf import settings from django.test.utils import get_ru...
0
0
0
0
0
0
0
0
0
a99246d96f25335211afb9a462efaa43868a7cbe
13,316
py
Python
Python/n_puzzle_astar.py
saurabhcommand/Hello-world
647bad9da901a52d455f05ecc37c6823c22dc77e
[ "MIT" ]
1,428
2018-10-03T15:15:17.000Z
2019-03-31T18:38:36.000Z
Python/n_puzzle_astar.py
saurabhcommand/Hello-world
647bad9da901a52d455f05ecc37c6823c22dc77e
[ "MIT" ]
1,162
2018-10-03T15:05:49.000Z
2018-10-18T14:17:52.000Z
Python/n_puzzle_astar.py
saurabhcommand/Hello-world
647bad9da901a52d455f05ecc37c6823c22dc77e
[ "MIT" ]
3,909
2018-10-03T15:07:19.000Z
2019-03-31T18:39:08.000Z
from collections import defaultdict import time import numpy as np import os def get_final_board(n): """ :param n: size of the board (n x n) :return: 2-D array of Final required board representation """ solution = [] k = 1 for i in range(n): solution.append([]) for j in r...
31.11215
108
0.577576
from collections import defaultdict import time import numpy as np import os from math import ceil class MinHeap: """ Implementation of Min Heap data structure """ def __init__(self, arr=None): self.heap = [] self.heap_size = 0 if arr is not None: self.create_min_he...
0
0
0
6,896
0
0
0
0
68
fd74713bbfd8b4b2ece73674fdd3caaeb4764056
729
py
Python
tests/test_math.py
TheWeiHu/dsa_python
a5c3f5a983c88d9a49d431d24674057cc6beca51
[ "MIT" ]
null
null
null
tests/test_math.py
TheWeiHu/dsa_python
a5c3f5a983c88d9a49d431d24674057cc6beca51
[ "MIT" ]
null
null
null
tests/test_math.py
TheWeiHu/dsa_python
a5c3f5a983c88d9a49d431d24674057cc6beca51
[ "MIT" ]
null
null
null
"""test fibonacci alogrithms""" from src.math import class_memoization_fibonacci from src.math import explicit_fibonacci from src.math import function_memoization_fibonacci from src.math import iterative_fibonacci from src.math import recursive_fibonacci def test_fibonacci(): """test fibonacci algorithms""" t...
30.375
63
0.702332
"""test fibonacci alogrithms""" from src.math import class_memoization_fibonacci from src.math import explicit_fibonacci from src.math import function_memoization_fibonacci from src.math import iterative_fibonacci from src.math import recursive_fibonacci def test_fibonacci(): """test fibonacci algorithms""" t...
0
0
0
0
0
0
0
0
0
ecef6524da82399598b05bb46cff52a1a61d056e
4,634
py
Python
ares/main.py
lleon95/NanoSciTracker-Python
f682c1f3b9b9f76a6de8ea816df910715539edf1
[ "Apache-2.0" ]
null
null
null
ares/main.py
lleon95/NanoSciTracker-Python
f682c1f3b9b9f76a6de8ea816df910715539edf1
[ "Apache-2.0" ]
null
null
null
ares/main.py
lleon95/NanoSciTracker-Python
f682c1f3b9b9f76a6de8ea816df910715539edf1
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # NanoSciTracker - 2020 # Author: Luis G. Leon Vega <luis@luisleon.me> # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF li...
31.52381
88
0.679111
#!/usr/bin/env python3 # NanoSciTracker - 2020 # Author: Luis G. Leon Vega <luis@luisleon.me> # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF li...
0
0
0
0
0
1,970
0
49
178
60dac1879b51e43b8d207b19810a23904b744d7d
987
py
Python
main.py
Ethan-source/01-Introduction
dd94a73c6cd51177e9fb82d90eddb5df5777acff
[ "MIT" ]
null
null
null
main.py
Ethan-source/01-Introduction
dd94a73c6cd51177e9fb82d90eddb5df5777acff
[ "MIT" ]
null
null
null
main.py
Ethan-source/01-Introduction
dd94a73c6cd51177e9fb82d90eddb5df5777acff
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import utils utils.check_version((3,7)) utils.clear() print('Hello, my name is Ethan Yee, I am a sophomore Digital & Interactive Media major from Chicago, IL.') print('My favorite video game is Super Smash Bros Ultimate for the Nintendo switch. The task of the game seems so simple, knock your...
54.833333
303
0.77305
#!/usr/bin/env python3 import utils utils.check_version((3,7)) utils.clear() print('Hello, my name is Ethan Yee, I am a sophomore Digital & Interactive Media major from Chicago, IL.') print('My favorite video game is Super Smash Bros Ultimate for the Nintendo switch. The task of the game seems so simple, knock your...
0
0
0
0
0
0
0
0
0
e45d3322b58e477e1fe3eaca22721c8faf4b0a4c
1,479
py
Python
pycpptool/get_tu.py
ousttrue/pycpptool
f2830deb00cec1e40ff2454d328a9d8fcf2f6319
[ "MIT" ]
1
2019-04-12T11:45:39.000Z
2019-04-12T11:45:39.000Z
pycpptool/get_tu.py
ousttrue/pycpptool
f2830deb00cec1e40ff2454d328a9d8fcf2f6319
[ "MIT" ]
null
null
null
pycpptool/get_tu.py
ousttrue/pycpptool
f2830deb00cec1e40ff2454d328a9d8fcf2f6319
[ "MIT" ]
null
null
null
import pathlib from typing import List, Optional from clang import cindex # helper {{{ DEFAULT_CLANG_DLL = pathlib.Path("C:/Program Files/LLVM/bin/libclang.dll") SET_DLL = False def get_tu(path: pathlib.Path, include_path_list: List[pathlib.Path] = None, use_macro: bool = False, ...
27.90566
80
0.602434
import pathlib from typing import List, Optional from clang import cindex # helper {{{ DEFAULT_CLANG_DLL = pathlib.Path("C:/Program Files/LLVM/bin/libclang.dll") SET_DLL = False def get_tu(path: pathlib.Path, include_path_list: List[pathlib.Path] = None, use_macro: bool = False, ...
0
0
0
0
0
0
0
0
0
8f9ab3691f5fef8e16b6b36aaa11c2983a7e7f33
7,260
py
Python
ingenico/connect/sdk/domain/hostedcheckout/definitions/mobile_payment_method_specific_input_hosted_checkout.py
festicket/connect-sdk-python3
c399c6443789dd978f319c89e1ebd387c812a77b
[ "MIT" ]
12
2016-09-26T21:46:31.000Z
2020-12-23T18:44:54.000Z
ingenico/connect/sdk/domain/hostedcheckout/definitions/mobile_payment_method_specific_input_hosted_checkout.py
festicket/connect-sdk-python3
c399c6443789dd978f319c89e1ebd387c812a77b
[ "MIT" ]
3
2020-05-02T16:53:02.000Z
2020-06-02T12:49:51.000Z
ingenico/connect/sdk/domain/hostedcheckout/definitions/mobile_payment_method_specific_input_hosted_checkout.py
festicket/connect-sdk-python3
c399c6443789dd978f319c89e1ebd387c812a77b
[ "MIT" ]
11
2017-07-16T00:55:28.000Z
2021-09-24T17:00:49.000Z
# -*- coding: utf-8 -*- # # This class was auto-generated from the API references found at # https://epayments-api.developer-ingenico.com/s2sapi/v1/ #
50.068966
240
0.736915
# -*- coding: utf-8 -*- # # This class was auto-generated from the API references found at # https://epayments-api.developer-ingenico.com/s2sapi/v1/ # from ingenico.connect.sdk.domain.definitions.abstract_payment_method_specific_input import AbstractPaymentMethodSpecificInput from ingenico.connect.sdk.domain.hostedchec...
0
3,487
0
3,122
0
0
0
410
89
06071992576136b87ee0e6850d0bc283356d19f3
214
py
Python
Exercicios7/exercicio3.py
vinihf/Prog1_ADS_2019
97d2e0cddf72c00a73d0bc3070bb9731e66e19e2
[ "CC-BY-4.0" ]
1
2019-04-18T13:43:15.000Z
2019-04-18T13:43:15.000Z
Exercicios7/exercicio3.py
vinihf/Prog1_ADS_2019
97d2e0cddf72c00a73d0bc3070bb9731e66e19e2
[ "CC-BY-4.0" ]
null
null
null
Exercicios7/exercicio3.py
vinihf/Prog1_ADS_2019
97d2e0cddf72c00a73d0bc3070bb9731e66e19e2
[ "CC-BY-4.0" ]
null
null
null
nome = input("Informe o seu nome:") print(quantosAs(nome))
19.454545
35
0.584112
def quantosAs(nome): contador = 0 nome = nome.lower() for letra in nome: if letra == 'a': contador+=1 return contador nome = input("Informe o seu nome:") print(quantosAs(nome))
0
0
0
0
0
132
0
0
22
a01ca5a759b3bb8a0eeea2cc022c1c5667c5c739
1,520
py
Python
test/z_manual_load.py
DXCyber409/AndroidNativeEmulator
11a0360a947114375757724eecd9bd9dbca43a56
[ "Apache-2.0" ]
3
2020-05-21T09:15:11.000Z
2022-01-12T13:52:20.000Z
test/z_manual_load.py
DXCyber409/AndroidNativeEmulator
11a0360a947114375757724eecd9bd9dbca43a56
[ "Apache-2.0" ]
null
null
null
test/z_manual_load.py
DXCyber409/AndroidNativeEmulator
11a0360a947114375757724eecd9bd9dbca43a56
[ "Apache-2.0" ]
null
null
null
# import binascii from UnicornTraceDebugger import udbg a1 = b'123' mu = Uc(UC_ARCH_ARM, UC_MODE_THUMB) #image image_base = 0x0 image_size = 0x10000 * 8 mu.mem_map(image_base, image_size) binary = open('jnilibs/libnative-lib.so','rb').read() mu.mem_write(image_base, binary) ### # stack stack_base = 0xa0000 stack_...
24.516129
88
0.727632
# 手动纯算法调用 import binascii from unicorn import * from unicorn.arm_const import * from UnicornTraceDebugger import udbg def hook_code(uc, address, size, userdata): print (">>> Tracing instruction at 0x%x, instruction size = 0x%x" % (address, size)) def hook_memory(uc, access, address, size,value, userdata): ...
48
0
0
0
0
260
0
10
91
2cc31a3b979058ca054c71ea7e175d34b73714f7
1,830
py
Python
tests/test_tasks.py
SFDigitalServices/building-permits
86ca54fa6e055231cbc0944d43996f6fc17daa6b
[ "MIT" ]
null
null
null
tests/test_tasks.py
SFDigitalServices/building-permits
86ca54fa6e055231cbc0944d43996f6fc17daa6b
[ "MIT" ]
null
null
null
tests/test_tasks.py
SFDigitalServices/building-permits
86ca54fa6e055231cbc0944d43996f6fc17daa6b
[ "MIT" ]
null
null
null
""" tests for celery tasks """ import tests.mocks as mocks
37.346939
97
0.765027
""" tests for celery tasks """ from unittest.mock import patch, Mock import requests import tests.mocks as mocks from tasks import scheduler @patch('tasks.requests.post') @patch('service.resources.applications.requests.get') def test_scheduler(mock_query_get, mock_bluebeam_post, mock_env_access_key): # pylint: dis...
0
1,620
0
0
0
0
0
16
135
72593a9479b33c2b056a28819c46fff68822b7a5
1,697
py
Python
beacon/endpoints/rest/handlers.py
elixir-luxembourg/BH2020-beacon-2.x
fc68c70e06e3d928bcca7e5d99cd740154314be4
[ "Apache-2.0" ]
1
2021-11-09T08:38:06.000Z
2021-11-09T08:38:06.000Z
beacon/endpoints/rest/handlers.py
elixir-luxembourg/BH2020-beacon-2.x
fc68c70e06e3d928bcca7e5d99cd740154314be4
[ "Apache-2.0" ]
null
null
null
beacon/endpoints/rest/handlers.py
elixir-luxembourg/BH2020-beacon-2.x
fc68c70e06e3d928bcca7e5d99cd740154314be4
[ "Apache-2.0" ]
null
null
null
from ...utils import db from .response.response_schema import (build_variant_response, build_biosample_or_individual_response) from . import BiosamplesParameters, GVariantsParameters, IndividualsParameters, generic_handler biosamples_proxy = BiosamplesParameters() gvariants_proxy = GVariantsParameters() individuals_pr...
80.809524
153
0.850324
from ...utils import db from .response.response_schema import (build_variant_response, build_biosample_or_individual_response) from . import BiosamplesParameters, GVariantsParameters, IndividualsParameters, generic_handler biosamples_proxy = BiosamplesParameters() gvariants_proxy...
0
0
0
0
0
0
0
39
0
775e56620bd1f1c0edda004c4fba5aef71cde6a2
8,911
py
Python
official/projects/edgetpu/vision/modeling/mobilenet_edgetpu_v1_model_test.py
KiryanovKD/models
e17080247e3c9b3301680f61b8f4815c22509e7e
[ "Apache-2.0" ]
4
2019-11-02T14:47:46.000Z
2022-01-14T10:43:02.000Z
official/projects/edgetpu/vision/modeling/mobilenet_edgetpu_v1_model_test.py
KiryanovKD/models
e17080247e3c9b3301680f61b8f4815c22509e7e
[ "Apache-2.0" ]
6
2021-10-05T18:53:55.000Z
2022-03-29T21:37:00.000Z
official/projects/edgetpu/vision/modeling/mobilenet_edgetpu_v1_model_test.py
KiryanovKD/models
e17080247e3c9b3301680f61b8f4815c22509e7e
[ "Apache-2.0" ]
2
2021-11-30T21:50:03.000Z
2022-03-27T01:27:31.000Z
# Copyright 2021 The TensorFlow Authors. 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 applica...
33.753788
87
0.686567
# Copyright 2021 The TensorFlow Authors. 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 applica...
0
0
0
7,120
0
0
0
213
157
f063de2f719cb7375f829a10db95f778f9dc793b
3,259
py
Python
api/app/views.py
jmsv/hackthemidlands18
5d832047af62fdeefbcfc7c07f408fb782c42954
[ "MIT" ]
null
null
null
api/app/views.py
jmsv/hackthemidlands18
5d832047af62fdeefbcfc7c07f408fb782c42954
[ "MIT" ]
null
null
null
api/app/views.py
jmsv/hackthemidlands18
5d832047af62fdeefbcfc7c07f408fb782c42954
[ "MIT" ]
null
null
null
from flask_cors import CORS from . import app CORS(app) # Activate the siege weapon... # No turning back now. # Two factor # Get a token to use. You get one by sending the priming code as a post # request
24.689394
71
0.543418
from flask import Flask, request import json from flask_cors import CORS from app import utils, job from . import app, redis_store import threading CORS(app) # Activate the siege weapon... # No turning back now. @app.route('/api/enable', methods=['POST']) def enable(): body = request.get_json() # Validate t...
0
2,831
0
0
0
0
0
14
203
5e41ee0a08e0b39183f62951fddef3dce95e3cb5
3,544
py
Python
thomas/core/learn/structure/greedy.py
mellesies/thomas-core
fb565334321c207d7870ed5c29eee8f8a8aac382
[ "MIT" ]
null
null
null
thomas/core/learn/structure/greedy.py
mellesies/thomas-core
fb565334321c207d7870ed5c29eee8f8a8aac382
[ "MIT" ]
4
2020-03-03T16:36:45.000Z
2021-06-15T18:08:06.000Z
thomas/core/learn/structure/greedy.py
mellesies/py-bn
fb565334321c207d7870ed5c29eee8f8a8aac382
[ "MIT" ]
1
2020-12-08T09:25:53.000Z
2020-12-08T09:25:53.000Z
"""Functions for learning the structure of a bayesian network from an input dataset""" import numpy as np from collections import namedtuple from itertools import combinations from ...factors import Factor from ...factors import CPT def greedy_network_learning(df, degree_network=2): """Learns the network using ...
36.916667
110
0.691309
"""Functions for learning the structure of a bayesian network from an input dataset""" import numpy as np from collections import namedtuple from itertools import combinations from sklearn.metrics import mutual_info_score from ...factors import Factor from ...factors import CPT def greedy_network_learning(df, degre...
0
0
0
0
0
385
0
24
45
00dfb1a8b1a923311a9cd4e0617dc05fd973bb4c
6,316
py
Python
patient/api.py
project-sabai/Sabai-Backend
fbc25d6ec774900d2602f6f8cf57544d873f401a
[ "MIT" ]
null
null
null
patient/api.py
project-sabai/Sabai-Backend
fbc25d6ec774900d2602f6f8cf57544d873f401a
[ "MIT" ]
9
2020-06-05T22:10:47.000Z
2021-06-10T18:38:13.000Z
patient/api.py
project-sabai/Sabai-Backend
fbc25d6ec774900d2602f6f8cf57544d873f401a
[ "MIT" ]
1
2019-09-01T04:41:58.000Z
2019-09-01T04:41:58.000Z
""" Handles all operations regarding the retrieval, update of patient models. """
39.72327
117
0.672419
from django.core import serializers from django.core.exceptions import ObjectDoesNotExist from django.db import DataError from django.http import JsonResponse, HttpResponse from django.utils.datastructures import MultiValueDictKeyError from django.views.decorators.csrf import csrf_exempt from clinicmodels.models impor...
0
5,554
0
0
0
0
0
291
382
67389140476492c565a25340edb6a01b9f0fe1ba
5,619
py
Python
kardioml/segmentation/teijeiro/knowledge/abstraction_patterns/rhythm/patterns.py
Seb-Good/physionet-challenge-2020
c6f1648a148335babc0a26d8a589120616327548
[ "BSD-2-Clause" ]
13
2020-12-18T08:09:34.000Z
2022-03-15T04:51:46.000Z
kardioml/segmentation/teijeiro/knowledge/abstraction_patterns/rhythm/patterns.py
Seb-Good/physionet-challenge-2020
c6f1648a148335babc0a26d8a589120616327548
[ "BSD-2-Clause" ]
null
null
null
kardioml/segmentation/teijeiro/knowledge/abstraction_patterns/rhythm/patterns.py
Seb-Good/physionet-challenge-2020
c6f1648a148335babc0a26d8a589120616327548
[ "BSD-2-Clause" ]
14
2020-09-16T21:07:38.000Z
2022-03-23T14:01:24.000Z
# -*- coding: utf-8 -*- # pylint: disable-msg= E1002, E1101 """ Created on Wed Nov 21 09:04:17 2012 This file contains the definition of a set of very simple abstraction patterns in order to perform rhythm interpretation on an ECG signal. @author: T. Teijeiro """ import kardioml.segmentation.teijeiro.knowledge.obser...
36.251613
109
0.741413
# -*- coding: utf-8 -*- # pylint: disable-msg= E1002, E1101 """ Created on Wed Nov 21 09:04:17 2012 This file contains the definition of a set of very simple abstraction patterns in order to perform rhythm interpretation on an ECG signal. @author: T. Teijeiro """ import kardioml.segmentation.teijeiro.knowledge.obser...
0
0
0
0
0
0
0
50
0
d27d00ab2872f328b24b92f479a99a76388beada
1,869
py
Python
tests/Task/Image/UpdateImageMetadataTest.py
ramgopal99/centipede
0b1dc1f17b025f6b37c9a3cf5753a46cbbcd36ba
[ "MIT" ]
3
2018-05-28T20:56:19.000Z
2018-06-02T15:58:10.000Z
tests/Task/Image/UpdateImageMetadataTest.py
ramgopal99/centipede
0b1dc1f17b025f6b37c9a3cf5753a46cbbcd36ba
[ "MIT" ]
2
2018-07-01T07:45:38.000Z
2018-07-11T03:15:35.000Z
tests/Task/Image/UpdateImageMetadataTest.py
ramgopal99/centipede
0b1dc1f17b025f6b37c9a3cf5753a46cbbcd36ba
[ "MIT" ]
3
2018-07-10T14:51:13.000Z
2022-03-17T00:39:58.000Z
import unittest if __name__ == "__main__": unittest.main()
38.142857
107
0.712681
import unittest import os from ...BaseTestCase import BaseTestCase from centipede.Task import Task from centipede.Crawler.Fs import FsPath from centipede.Task.Fs.Checksum import ChecksumMatchError from centipede.Task.Image import UpdateImageMetadata class UpdateImageMetadataTest(BaseTestCase): """Test UpdateImageM...
0
121
0
1,426
0
0
0
102
155
deed963ac8c66cd48b75392f0d2281d3ae659e4d
1,263
py
Python
turtle_race.py
favanso/Python_Projects
b5be3d067f89abe27b15fb8b359ae8e96f45c52e
[ "MIT" ]
null
null
null
turtle_race.py
favanso/Python_Projects
b5be3d067f89abe27b15fb8b359ae8e96f45c52e
[ "MIT" ]
null
null
null
turtle_race.py
favanso/Python_Projects
b5be3d067f89abe27b15fb8b359ae8e96f45c52e
[ "MIT" ]
null
null
null
#Turtle Race Game import turtle import random dice = [1,2,3,4,5,6] turtle.title("Turtle Race") turtle.setup(width=800, height=600) #Setup turtles playerone = turtle.Turtle() playerone.color('blue') playerone.shape('turtle') playerone.penup() playerone.goto(-200,100) #setup second turtle playert...
20.370968
59
0.642122
#Turtle Race Game import turtle import random dice = [1,2,3,4,5,6] turtle.title("Turtle Race") turtle.setup(width=800, height=600) #Setup turtles playerone = turtle.Turtle() playerone.color('blue') playerone.shape('turtle') playerone.penup() playerone.goto(-200,100) #setup second turtle playert...
0
0
0
0
0
0
0
0
0
6c76608d9232365e17a93893ef6372a3aee89803
2,818
py
Python
patho/api/inference/infer_keras.py
vankhoa21991/patho_toolbox
11489e958500505d501bcd11ea5c944d7629ea0f
[ "MIT" ]
null
null
null
patho/api/inference/infer_keras.py
vankhoa21991/patho_toolbox
11489e958500505d501bcd11ea5c944d7629ea0f
[ "MIT" ]
null
null
null
patho/api/inference/infer_keras.py
vankhoa21991/patho_toolbox
11489e958500505d501bcd11ea5c944d7629ea0f
[ "MIT" ]
null
null
null
import pandas as pd from patho.cfg.config import path_cfg, img_proc_cfg if __name__ == '__main__': tileProcCfg = img_proc_cfg() path_cfg = path_cfg() subm = inference(path_cfg.RESULTS_DIR + '/hubmap-model-1.h5', path_cfg.DATA_DIR) submission = pd.DataFrame.from_dict(subm, orient='index') submissi...
36.128205
104
0.636622
from tqdm import tqdm import tensorflow as tf import numpy as np import cv2 import glob import gc import rasterio import pathlib import pandas as pd from rasterio.windows import Window from tensorflow.keras.layers import * from tensorflow.keras.applications import * from tensorflow.keras.callbacks import * from tensorf...
0
0
0
0
0
1,782
0
225
398
1cdf3da6ab43183c857416c8b9b55c1a8ecdde68
268
py
Python
about/views.py
TechCentreUK/langs-bar
d6564922857c1ea333ef2ee1b271f1bff3d2ed4f
[ "W3C" ]
null
null
null
about/views.py
TechCentreUK/langs-bar
d6564922857c1ea333ef2ee1b271f1bff3d2ed4f
[ "W3C" ]
null
null
null
about/views.py
TechCentreUK/langs-bar
d6564922857c1ea333ef2ee1b271f1bff3d2ed4f
[ "W3C" ]
null
null
null
from django.shortcuts import render def about(request): """ A View to return the about.html """ return render(request, 'about/about.html') def privacy(request): """ A View to return the privacy.html """ return render(request, 'about/privacy.html')
22.333333
48
0.682836
from django.shortcuts import render def about(request): """ A View to return the about.html """ return render(request, 'about/about.html') def privacy(request): """ A View to return the privacy.html """ return render(request, 'about/privacy.html')
0
0
0
0
0
0
0
0
0
445f8ff110084de9054f2d5526aaf400bf6e3608
3,999
py
Python
lleaves/compiler/ast/scanner.py
chenglin/lleaves
54e07cd39279a7f0407e3cc8adb5862b3bc41bda
[ "MIT" ]
116
2021-06-25T14:33:26.000Z
2022-03-30T07:32:29.000Z
lleaves/compiler/ast/scanner.py
chenglin/lleaves
54e07cd39279a7f0407e3cc8adb5862b3bc41bda
[ "MIT" ]
13
2021-07-28T07:12:40.000Z
2022-03-30T05:59:10.000Z
lleaves/compiler/ast/scanner.py
chenglin/lleaves
54e07cd39279a7f0407e3cc8adb5862b3bc41bda
[ "MIT" ]
5
2021-06-28T16:44:49.000Z
2022-03-23T02:40:21.000Z
""" The Scanner is responsible for iterating over the model.txt and transforming it into a more usable representation. It doesn't implement any transformations (expect for type casting). """ INPUT_SCAN_KEYS = { "max_feature_idx": ScannedValue(int), "num_class": ScannedValue(int), "num_tree_per_iterati...
31.488189
91
0.635159
""" The Scanner is responsible for iterating over the model.txt and transforming it into a more usable representation. It doesn't implement any transformations (expect for type casting). """ def scan_model_file(file_path, general_info_only=False): res = {"trees": []} def read_blocks(file_path): with ...
0
0
0
151
1,150
374
0
0
92
148d72b1176a80e6a05dcbbc08f449832c192801
5,336
py
Python
modules/IterativeHistogram.py
rlorigro/mungus
2ff8d94f58b9f280399157912a999d5f31a459fd
[ "MIT" ]
null
null
null
modules/IterativeHistogram.py
rlorigro/mungus
2ff8d94f58b9f280399157912a999d5f31a459fd
[ "MIT" ]
null
null
null
modules/IterativeHistogram.py
rlorigro/mungus
2ff8d94f58b9f280399157912a999d5f31a459fd
[ "MIT" ]
null
null
null
if __name__ == "__main__": # test the iterative histogram iterative_histogram = IterativeHistogram(start=0, stop=10, n_bins=10) iterative_histogram.update(0) # 1 iterative_histogram.update(-1) # None iterative_histogram.update(10) # 10 iterative_histogram.update(9....
38.666667
127
0.642241
import math import numpy class IterativeHistogram: def __init__(self, start, stop, n_bins, unbounded_upper_bin=False, unbounded_lower_bin=False, include_upper_edge=True): self.start = start self.stop = stop self.n_bins = n_bins self.histogram = numpy.zeros(n_bins) ...
0
0
0
1,688
0
0
0
-19
71
ba34d4e7cbbe52b890a1393934f8f08ad89e5614
3,555
py
Python
tests/test_utilities.py
tidalwave-it/solidblue3-p-src
7cd93af3f45c74469cbca4b93fb03728fd2c2338
[ "Apache-2.0" ]
null
null
null
tests/test_utilities.py
tidalwave-it/solidblue3-p-src
7cd93af3f45c74469cbca4b93fb03728fd2c2338
[ "Apache-2.0" ]
null
null
null
tests/test_utilities.py
tidalwave-it/solidblue3-p-src
7cd93af3f45c74469cbca4b93fb03728fd2c2338
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # SolidBlue III - Open source data manager. # # __author__ = "Fabrizio Giudici" # __copyright__ = "Copyright 2020 by Fabrizio Giudici" # __credits__ = ["Fabrizio Giudici"] # __license__ = "Apache v2" # __version__ = "1.0-ALPHA-4-SNAPSHOT" # __maintainer__ = "Fabri...
43.888889
130
0.667229
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # SolidBlue III - Open source data manager. # # __author__ = "Fabrizio Giudici" # __copyright__ = "Copyright © 2020 by Fabrizio Giudici" # __credits__ = ["Fabrizio Giudici"] # __license__ = "Apache v2" # __version__ = "1.0-ALPHA-4-SNAPSHOT" # __maintainer__ = "Fabr...
2
0
0
2,964
0
0
0
22
68
a0bece183a48b95ce2d9386c045f24ee94381694
6,886
py
Python
ffig/generators/__init__.py
FFIG/ffig
b45060d5835292a74661678872427e3eb5a89d0c
[ "MIT" ]
31
2017-02-03T20:12:11.000Z
2021-04-14T17:39:56.000Z
ffig/generators/__init__.py
FFIG/ffig
b45060d5835292a74661678872427e3eb5a89d0c
[ "MIT" ]
246
2017-02-03T17:51:24.000Z
2019-02-14T10:30:19.000Z
ffig/generators/__init__.py
FFIG/ffig
b45060d5835292a74661678872427e3eb5a89d0c
[ "MIT" ]
9
2017-03-05T20:28:37.000Z
2019-08-28T19:48:22.000Z
import logging import os import os.path import re log = logging.getLogger(__name__) def render_api_and_obj_classes(module_name, api_classes, template): '''Render a template.''' return str(template.render({"module": {"name": module_name}, "classes": api_classes, ...
33.427184
86
0.652483
import collections import logging import os import os.path import re import sys log = logging.getLogger(__name__) def dso_extension(): extensions = { 'darwin': 'dylib', 'win32': 'dll', 'cygwin': 'dll', 'linux2': 'so', 'linux': 'so', } return extensions[sys.platform...
0
0
0
2,091
0
183
0
-14
90
eb04de70336177724680f36514246b99b3243191
2,221
py
Python
pyctm/mesh_writer.py
mateusazis/pyctm
7851d3279ea2ce790e24ea996cf8ce3637823ee7
[ "MIT" ]
null
null
null
pyctm/mesh_writer.py
mateusazis/pyctm
7851d3279ea2ce790e24ea996cf8ce3637823ee7
[ "MIT" ]
null
null
null
pyctm/mesh_writer.py
mateusazis/pyctm
7851d3279ea2ce790e24ea996cf8ce3637823ee7
[ "MIT" ]
null
null
null
FILE_FORMAT_VERSION = 5
31.728571
77
0.688879
import struct FILE_FORMAT_VERSION = 5 class CompressionMethod(object): RAW = 0x00574152 MG1 = 0x0031474d MG2 = 0x0032474d class MeshWriter(object): def __init__(self, compression_method=CompressionMethod.RAW): self.compression_method = compression_method def write(self, mesh, out): self.write_hea...
0
0
0
2,136
0
0
0
-8
68
74bc9de7bf24f6b8a89551ef6a80f09b8b125301
3,381
py
Python
functions exerscise/10. Array Manipulator.py
nrgxtra/fundamentals
d9f35eb040c0e1009aad2f7305c035fda207a147
[ "MIT" ]
null
null
null
functions exerscise/10. Array Manipulator.py
nrgxtra/fundamentals
d9f35eb040c0e1009aad2f7305c035fda207a147
[ "MIT" ]
null
null
null
functions exerscise/10. Array Manipulator.py
nrgxtra/fundamentals
d9f35eb040c0e1009aad2f7305c035fda207a147
[ "MIT" ]
null
null
null
numbers = list(map(int, (input()).split(" "))) command = input() while command != 'end': tokens = command.split(" ") if tokens[0] == 'exchange': idx = int(tokens[1]) exchange(idx) elif tokens[0] == 'max': max_even_odd(tokens[1]) elif tokens[0] == 'min': ...
27.942149
60
0.483881
numbers = list(map(int, (input()).split(" "))) def exchange(idx): global numbers if idx < 0 or idx >= len(numbers): print("Invalid index") return numbers = numbers[idx + 1:] + numbers[:idx + 1] def max_even_odd(command): global numbers if command == 'even': ...
0
0
0
0
0
2,652
0
0
125
1440580982caaed7cc65243464b91a21249884e8
71
py
Python
dbml_sqlite/__init__.py
avqpereira/DBML_SQLite
b1a29677e8eb348d1a1a86e293b97045d7d3a85a
[ "MIT" ]
null
null
null
dbml_sqlite/__init__.py
avqpereira/DBML_SQLite
b1a29677e8eb348d1a1a86e293b97045d7d3a85a
[ "MIT" ]
null
null
null
dbml_sqlite/__init__.py
avqpereira/DBML_SQLite
b1a29677e8eb348d1a1a86e293b97045d7d3a85a
[ "MIT" ]
null
null
null
__version__ = '0.2.5'
11.833333
25
0.690141
from .core import * from .terminal import cli __version__ = '0.2.5'
0
0
0
0
0
0
0
2
45
540a0b863ddeee851f53f3ebdd09adc0ff556b2d
6,139
py
Python
components/Fingerprint/fingerPrint.py
minhan74/MIS-Locker
ab7e90000d566e818b4f44bd27165ed45a8f653f
[ "Apache-2.0", "MIT" ]
2
2020-07-29T13:38:54.000Z
2021-07-24T13:54:48.000Z
main/fingerPrint.py
minhan74/MIS-Locker
ab7e90000d566e818b4f44bd27165ed45a8f653f
[ "Apache-2.0", "MIT" ]
4
2020-02-27T09:53:34.000Z
2020-02-27T09:54:35.000Z
main/fingerPrint.py
minhan74/MIS-Locker
ab7e90000d566e818b4f44bd27165ed45a8f653f
[ "Apache-2.0", "MIT" ]
null
null
null
"""------------------------------------------------------------*- fingerPrint module for Raspberry Pi Tested on: Raspberry Pi 3 B+ (c) Minh-An Dao 2019 (C) Bastian Raschke 2015 version 1.00 - 09/10/2019 -------------------------------------------------------------- * * ------------------------------------...
32.141361
180
0.603193
"""------------------------------------------------------------*- fingerPrint module for Raspberry Pi Tested on: Raspberry Pi 3 B+ (c) Minh-An Dao 2019 (C) Bastian Raschke 2015 version 1.00 - 09/10/2019 -------------------------------------------------------------- * * ------------------------------------...
0
0
0
0
0
4,830
0
22
388
918c49ec89845a96012c81eb22d7e6a610c07e84
2,083
py
Python
dice.py
BCTBB/Dice-Roll
f7a70a60478d16d6da7c1c486d402eb8fdaa5f73
[ "MIT" ]
null
null
null
dice.py
BCTBB/Dice-Roll
f7a70a60478d16d6da7c1c486d402eb8fdaa5f73
[ "MIT" ]
null
null
null
dice.py
BCTBB/Dice-Roll
f7a70a60478d16d6da7c1c486d402eb8fdaa5f73
[ "MIT" ]
null
null
null
input_game = input("What Game are you playing?\n") if input_game.lower() == "monopoly": function(input_game,"2d6") while True: user_input = input("Roll Again? (Yes or No)\n") if user_input.lower() == "no": break function(input_game, "2d6") elif input_game.lower() == "dnd": ...
28.930556
94
0.552568
import random class DiceDecorator(): def __init__(self, function): self.function = function def __call__(self, *args, **kwargs): self.function(*args, **kwargs) def setGame(self): game = self return game def criticalRoll(self): print("NATURAL 20") def roll...
0
412
0
1,013
0
0
0
-8
68
23b301dfec4b77f226e8a3a9cbf95cb4999a1121
536
py
Python
semantics/concept.py
andlima/fraseador
97d48e07cd3c574d92e080fcc81fd0bcad56015f
[ "BSD-3-Clause" ]
1
2018-04-14T16:55:10.000Z
2018-04-14T16:55:10.000Z
semantics/concept.py
andlima/fraseador
97d48e07cd3c574d92e080fcc81fd0bcad56015f
[ "BSD-3-Clause" ]
null
null
null
semantics/concept.py
andlima/fraseador
97d48e07cd3c574d92e080fcc81fd0bcad56015f
[ "BSD-3-Clause" ]
null
null
null
def from_line(elem): '''Obtains a concept from a line.''' data = elem.split(',') index = data[0] parents = None if len(data) == 2: parents = data[1].split('/') return Concept(index, parents)
22.333333
53
0.567164
class Concept: '''Defines a concept and its parents concepts.''' def __init__(self, index, parents=None): ''' Attributes: - self.index: identifies a concept; - self.parents: this concept's parents. ''' self.index = index self.parents = parents def from...
0
0
0
288
0
0
0
0
22
34e8f4157282f86d583abf7ce6ed6d80dfb15f3e
5,901
py
Python
mrs_plugin/tests/unit/test_schemas.py
mike-lischke/mysql-shell-plugins
d7d15591dd8e70f7f5ef8ea579e0797eff30fa0a
[ "Apache-2.0", "CC0-1.0" ]
11
2022-03-02T11:04:16.000Z
2022-03-29T05:28:23.000Z
mrs_plugin/tests/unit/test_schemas.py
mike-lischke/mysql-shell-plugins
d7d15591dd8e70f7f5ef8ea579e0797eff30fa0a
[ "Apache-2.0", "CC0-1.0" ]
1
2022-03-25T15:12:16.000Z
2022-03-31T18:59:22.000Z
mrs_plugin/tests/unit/test_schemas.py
mike-lischke/mysql-shell-plugins
d7d15591dd8e70f7f5ef8ea579e0797eff30fa0a
[ "Apache-2.0", "CC0-1.0" ]
3
2022-03-24T11:32:12.000Z
2022-03-25T20:40:14.000Z
# Copyright (c) 2021, 2022, Oracle and/or its affiliates. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License, version 2.0, # as published by the Free Software Foundation. # # This program is also distributed with certain software (including # ...
32.070652
92
0.622267
# Copyright (c) 2021, 2022, Oracle and/or its affiliates. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License, version 2.0, # as published by the Free Software Foundation. # # This program is also distributed with certain software (including # ...
0
4,639
0
0
0
0
0
-4
137
54eda34ac58953776be75bb1a71c432e3bd6be74
1,160
py
Python
examples/maps.py
RedForester/rf_api_client
c69306be6184740d12c0aea25daae7b795a595f9
[ "MIT" ]
1
2021-05-28T08:25:09.000Z
2021-05-28T08:25:09.000Z
examples/maps.py
RedForester/rf_api_client
c69306be6184740d12c0aea25daae7b795a595f9
[ "MIT" ]
1
2020-12-16T03:42:02.000Z
2021-04-22T15:54:56.000Z
examples/maps.py
RedForester/rf_api_client
c69306be6184740d12c0aea25daae7b795a595f9
[ "MIT" ]
1
2020-06-08T14:34:31.000Z
2020-06-08T14:34:31.000Z
import asyncio import os USERNAME = os.getenv('USERNAME') PASSWORD = os.getenv('PASSWORD') MAP_ID = os.getenv('MAP_ID') if __name__ == '__main__': loop = asyncio.get_event_loop() loop.run_until_complete(load_map()) loop.run_until_complete(create_map()) loop.run_until_complete(asyncio.sleep(0)) ...
26.363636
69
0.684483
import asyncio import os from rf_api_client import RfApiClient from rf_api_client.models.maps_api_models import MapLayout, NewMapDto from rf_api_client.rf_api_client import UserAuth USERNAME = os.getenv('USERNAME') PASSWORD = os.getenv('PASSWORD') MAP_ID = os.getenv('MAP_ID') async def load_map(): async with R...
0
0
621
0
0
0
0
91
113
716621d821ab31e3e79fbcbc92dd5e9d75d5b58b
10,386
py
Python
performance/driver/core/config.py
mesosphere/dcos-perf-test-driver
8fba87cb6c6f64690c0b5bef5c7d9f2aa0fba06b
[ "Apache-2.0" ]
2
2018-02-27T18:21:21.000Z
2018-03-16T12:12:12.000Z
performance/driver/core/config.py
mesosphere/dcos-perf-test-driver
8fba87cb6c6f64690c0b5bef5c7d9f2aa0fba06b
[ "Apache-2.0" ]
1
2018-06-25T07:14:41.000Z
2018-06-25T07:14:41.000Z
performance/driver/core/config.py
mesosphere/dcos-perf-test-driver
8fba87cb6c6f64690c0b5bef5c7d9f2aa0fba06b
[ "Apache-2.0" ]
1
2020-06-25T10:37:21.000Z
2020-06-25T10:37:21.000Z
import yaml import os # TODO: Make @ expand to `performance.driver.core.classes` # TODO: Make MetricConfig use ComponentConfig def mergeConfig(source, destination): """ Merges `source` object into `destination`. """ for key, value in source.items(): if not key in destination: destination[key] = val...
27.994609
82
0.657423
import importlib import logging import yaml import os from .eventbus import EventBus from .template import TemplateDict from performance.driver.core.utils import parseTimeExpr # TODO: Make @ expand to `performance.driver.core.classes` # TODO: Make MetricConfig use ComponentConfig def mergeConfig(source, destinatio...
0
0
0
8,481
0
0
0
44
250
f92a5b4c8650039bae5fb5a730a70ce2b26fca04
2,292
py
Python
src/experiments/LSTM_experiment.py
AU-DIS/LSTM_langid
ca58c1386ad04d17f4fc436755c24163aba4b169
[ "MIT" ]
10
2021-03-12T07:36:17.000Z
2022-02-28T12:22:46.000Z
src/experiments/LSTM_experiment.py
AU-DIS/LSTM_langid
ca58c1386ad04d17f4fc436755c24163aba4b169
[ "MIT" ]
null
null
null
src/experiments/LSTM_experiment.py
AU-DIS/LSTM_langid
ca58c1386ad04d17f4fc436755c24163aba4b169
[ "MIT" ]
7
2021-03-17T19:23:06.000Z
2022-02-25T22:44:41.000Z
from sacred import Experiment from experiments.Experiment_utils import create_logger from experiments.data_loading import data_loading_ingredient LSTM_exp = Experiment('LSTM_experiment', ingredients=[data_loading_ingredient]) # Attach the logger to the experiment LSTM_exp.logger = create_logger()
38.847458
164
0.727749
from typing import Optional import torch from sacred import Experiment from experiments.Experiment_utils import idx_maps, add_tensor_board_writers, run_training, create_logger from experiments.data_loading import data_loading_ingredient from src.LSTMLID import LSTMLIDModel LSTM_exp = Experiment('LSTM_experiment', in...
0
1,791
0
0
0
0
0
62
136
fa159f27db9205f185a6716cc752e09e1814f9c3
1,175
py
Python
expert_python/src/thread_queue_test.py
MaiXiaochai/Droplet
6d7fed9ca76678768a3752fa8df86a021acc3509
[ "MIT" ]
null
null
null
expert_python/src/thread_queue_test.py
MaiXiaochai/Droplet
6d7fed9ca76678768a3752fa8df86a021acc3509
[ "MIT" ]
null
null
null
expert_python/src/thread_queue_test.py
MaiXiaochai/Droplet
6d7fed9ca76678768a3752fa8df86a021acc3509
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # @File : thread_queue_test.py # @Time : 2019/2/15 1:11 # @Author : MaiXiaochai # @Site : https://github.com/MaiXiaochai if __name__ == '__main__': main_var()
21.759259
90
0.639149
#!/usr/bin/python # -*- coding: utf-8 -*- # @File : thread_queue_test.py # @Time : 2019/2/15 1:11 # @Author : MaiXiaochai # @Site : https://github.com/MaiXiaochai import time import threading from queue import Queue def get_detail_html(queue): # 文章详情页 while True: # get取数据,是一种阻塞的方法,即,若queu...
204
0
0
0
0
762
0
-13
136
72fd1ac9e1958e8fa4933804cd1b1fbbefa839e6
468
py
Python
examples/documentos_consulta.py
robertons/junopy
1acc64ab99d8ea49bb0dac979cd34da43541f243
[ "MIT" ]
3
2021-07-12T15:05:13.000Z
2022-01-31T03:35:43.000Z
examples/documentos_consulta.py
robertons/junopy
1acc64ab99d8ea49bb0dac979cd34da43541f243
[ "MIT" ]
2
2022-01-29T20:14:51.000Z
2022-02-07T16:16:24.000Z
examples/documentos_consulta.py
robertons/junopy
1acc64ab99d8ea49bb0dac979cd34da43541f243
[ "MIT" ]
1
2022-02-01T18:36:10.000Z
2022-02-01T18:36:10.000Z
#-*- coding: utf-8 -*- import sys if __name__ == "__main__": main(sys.argv)
29.25
157
0.775641
#-*- coding: utf-8 -*- import sys import junopy def main(arg): junopy.Juno('4E1574938F3DD69306BC336E348276ACC9CBE72B4E8396B2520436663C66C08E', '9OuOfYM2QZRhmUug', 'gw<Nl6bc2Ib,VX&)c2U{mX1?d_zEg0^d', sandbox=True) documentos_esperados = junopy.Document(id='dac_E6FECDB17EAC5992', resourceToken='8A596ED1DEB738...
0
0
0
0
0
348
0
-8
45
e2ab5c06de13c602068b74c19c86020c59834eae
6,113
py
Python
app.py
m4rker11/Project1_Fintech
0fa180dbd4b182bd3ebe925399806b5db998760f
[ "MIT" ]
null
null
null
app.py
m4rker11/Project1_Fintech
0fa180dbd4b182bd3ebe925399806b5db998760f
[ "MIT" ]
null
null
null
app.py
m4rker11/Project1_Fintech
0fa180dbd4b182bd3ebe925399806b5db998760f
[ "MIT" ]
2
2022-02-10T02:05:44.000Z
2022-02-18T22:47:35.000Z
import fire import utils.gauge as gauge from utils.MCForecastTools import MCSimulation as MCSimulation import utils.alpacaConnect as alpacaConnect if __name__ == "__main__": fire.Fire(run)
45.281481
127
0.642565
from matplotlib.pyplot import spy import pandas as pd import questionary import matplotlib.pyplot as plt import fire import utils.gauge as gauge from utils.MCForecastTools import MCSimulation as MCSimulation import utils.alpacaConnect as alpacaConnect import utils.beta_sharpe_functions as stats def run(): ...
0
0
0
0
0
5,735
0
39
135
4ac9a06d2167a466bc3a27591a59656f0d3d93c9
1,541
py
Python
cjdata/migrations/create_categories_from_markdown.py
sunlightlabs/hall-of-justice
8c2ce47f792e0182c84d13dca808564a6ac376b4
[ "BSD-3-Clause" ]
7
2015-05-08T03:48:54.000Z
2016-02-04T01:01:51.000Z
cjdata/migrations/create_categories_from_markdown.py
themarshallproject/hall-of-justice
8c2ce47f792e0182c84d13dca808564a6ac376b4
[ "BSD-3-Clause" ]
44
2015-03-20T17:16:58.000Z
2016-04-27T20:17:29.000Z
cjdata/migrations/create_categories_from_markdown.py
sunlightlabs/hall-of-justice
8c2ce47f792e0182c84d13dca808564a6ac376b4
[ "BSD-3-Clause" ]
5
2015-06-22T13:49:08.000Z
2016-01-30T23:19:16.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals
34.244444
117
0.64244
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from django.utils.text import slugify def categories_from_markdown(apps, schema_editor): Category = apps.get_model("cjdata", "Category") db_alias = schema_editor.connection.alias top_level_li = '- ' suble...
0
0
0
228
0
1,105
0
27
114
6465a74218ace9195d9ce564459043b6462093eb
13,841
py
Python
src/utilities/MonteCarlo/Dispersions.py
ian-cooke/basilisk_mag
a8b1e37c31c1287549d6fd4d71fcaa35b6fc3f14
[ "0BSD" ]
null
null
null
src/utilities/MonteCarlo/Dispersions.py
ian-cooke/basilisk_mag
a8b1e37c31c1287549d6fd4d71fcaa35b6fc3f14
[ "0BSD" ]
1
2019-03-13T20:52:22.000Z
2019-03-13T20:52:22.000Z
src/utilities/MonteCarlo/Dispersions.py
ian-cooke/basilisk_mag
a8b1e37c31c1287549d6fd4d71fcaa35b6fc3f14
[ "0BSD" ]
null
null
null
''' ''' ''' ISC License Copyright (c) 2016, Autonomous Vehicle Systems Lab, University of Colorado at Boulder Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all c...
37.307278
115
0.613395
''' ''' ''' ISC License Copyright (c) 2016, Autonomous Vehicle Systems Lab, University of Colorado at Boulder Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all c...
0
1,019
0
11,586
0
0
0
11
387
ad225a91fda7f19944629bddec79028224b8679d
4,599
py
Python
Collision/Collision_BarChart.py
ChairOfStructuralMechanicsTUM/Mechanics_Apps
b064a42d4df3fa9bde62a5cff9cb27ca61b0127c
[ "MIT" ]
11
2017-05-06T17:05:29.000Z
2020-11-12T09:26:47.000Z
Collision/Collision_BarChart.py
ChairOfStructuralMechanicsTUM/Mechanics_Apps
b064a42d4df3fa9bde62a5cff9cb27ca61b0127c
[ "MIT" ]
49
2017-04-20T11:26:11.000Z
2020-05-29T13:18:06.000Z
Collision/Collision_BarChart.py
ChairOfStructuralMechanicsTUM/Mechanics_Apps
b064a42d4df3fa9bde62a5cff9cb27ca61b0127c
[ "MIT" ]
4
2017-02-14T12:55:34.000Z
2022-01-12T15:07:07.000Z
#ColourOptions = ["red","blue","green","black","yellow","purple"]
35.929688
110
0.546858
from bokeh.plotting import figure from bokeh.models import ColumnDataSource, Range1d, FuncTickFormatter, FixedTicker from math import pi, floor #ColourOptions = ["red","blue","green","black","yellow","purple"] class Collision_BarChart(object): def __init__(self, xVals, yVals, colours = None, width=None): ...
0
0
0
4,364
0
0
0
78
89
df0f94ca69a8a385c0768dcc35920f208f66991a
2,642
py
Python
clonest1ck-python3/3dec.py
joelfak/advent_of_code_2019
d5031078c53c181835b4bf86458b360542f0122e
[ "Apache-2.0" ]
9
2019-12-01T14:52:40.000Z
2020-12-16T14:24:19.000Z
clonest1ck-python3/3dec.py
joelfak/advent_of_code_2019
d5031078c53c181835b4bf86458b360542f0122e
[ "Apache-2.0" ]
null
null
null
clonest1ck-python3/3dec.py
joelfak/advent_of_code_2019
d5031078c53c181835b4bf86458b360542f0122e
[ "Apache-2.0" ]
51
2019-11-26T14:49:05.000Z
2021-12-01T20:53:41.000Z
file_content = open("3dec-input", 'r') #file_content = ["R75,D30,R83,U83,L12,D49,R71,U7,L72", "U62,R66,U55,R34,D71,R55,D58,R83"] #file_content = ["R98,U47,R26,D63,R33,U87,L62,D20,R33,U53,R51", "U98,R91,D20,R16,D67,R40,U7,R15,U6,R7"] #file_content = ["R8,U5,L5,D3", "U7,R6,D4,L4"] paths = [] for line in file_content: ...
23.589286
103
0.572294
def parse(step): direction = step[0] distance = int(step[1:]) delta = (0,0) if direction == "D": delta = (0,-distance) elif direction == "U": delta = (0, distance) elif direction == "L": delta = (-distance, 0) elif direction == "R": delta = (distance, 0) ...
0
0
0
0
0
2,004
0
0
184
a2fe41fc14e29841c949296a4168fcce762dec97
1,775
py
Python
setup.py
baojianzhou/sparse-learn
ed01f2c3d518c0c48652bc4fe4dc552ba3d5a427
[ "MIT" ]
null
null
null
setup.py
baojianzhou/sparse-learn
ed01f2c3d518c0c48652bc4fe4dc552ba3d5a427
[ "MIT" ]
null
null
null
setup.py
baojianzhou/sparse-learn
ed01f2c3d518c0c48652bc4fe4dc552ba3d5a427
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ This is a wrapper of head and tail projection. To generate sparse_module.so file, please use the following command (suppose you have Linux/MacOS/MacBook): python setup.py build_ext --inplace """ import os import numpy from setuptools import setup from setuptools import find_packages fro...
34.134615
78
0.651268
# -*- coding: utf-8 -*- """ This is a wrapper of head and tail projection. To generate sparse_module.so file, please use the following command (suppose you have Linux/MacOS/MacBook): python setup.py build_ext --inplace """ import os import numpy from setuptools import setup from setuptools import find_packages fro...
0
0
0
0
0
0
0
0
0
03fad4a2150e4137547fe60f73588d537020e568
852
py
Python
data/migrations/0007_auto_20181118_2258.py
ve7cxz/ferrystatus
ac52eaf7d8c562bd67e256ced9f4c8a04b232d8f
[ "MIT" ]
1
2019-02-26T15:27:42.000Z
2019-02-26T15:27:42.000Z
data/migrations/0007_auto_20181118_2258.py
ve7cxz/ferrystatus
ac52eaf7d8c562bd67e256ced9f4c8a04b232d8f
[ "MIT" ]
null
null
null
data/migrations/0007_auto_20181118_2258.py
ve7cxz/ferrystatus
ac52eaf7d8c562bd67e256ced9f4c8a04b232d8f
[ "MIT" ]
null
null
null
# Generated by Django 2.1.3 on 2018-11-18 22:58
28.4
202
0.580986
# Generated by Django 2.1.3 on 2018-11-18 22:58 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('data', '0006_auto_20181118_0849'), ] operations = [ migrations.CreateModel( name='StoppedEvent'...
0
0
0
705
0
0
0
30
68
c2dc50b1cd89e4d481d3ac5b003799a4bd24d149
4,329
py
Python
example/example/settings.py
Microdisseny/django-field-filemanager
4c985cc9906fa740af36f123d69798630ff51813
[ "MIT" ]
null
null
null
example/example/settings.py
Microdisseny/django-field-filemanager
4c985cc9906fa740af36f123d69798630ff51813
[ "MIT" ]
9
2018-10-05T05:47:58.000Z
2019-09-30T21:56:52.000Z
example/example/settings.py
Microdisseny/django-field-filemanager
4c985cc9906fa740af36f123d69798630ff51813
[ "MIT" ]
null
null
null
""" Django settings for example project. Generated by 'django-admin startproject' using Django 2.1.2. For more information on this file, see https://docs.djangoproject.com/en/2.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.1/ref/settings/ """ import os A...
27.226415
101
0.693232
""" Django settings for example project. Generated by 'django-admin startproject' using Django 2.1.2. For more information on this file, see https://docs.djangoproject.com/en/2.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.1/ref/settings/ """ import os A...
0
0
0
0
0
0
0
0
0
1a74aeee0337351fbd9390dd6cc7b71b2e98beb3
3,385
py
Python
mindspore/python/mindspore/train/callback/_history.py
zhz44/mindspore
6044d34074c8505dd4b02c0a05419cbc32a43f86
[ "Apache-2.0" ]
null
null
null
mindspore/python/mindspore/train/callback/_history.py
zhz44/mindspore
6044d34074c8505dd4b02c0a05419cbc32a43f86
[ "Apache-2.0" ]
null
null
null
mindspore/python/mindspore/train/callback/_history.py
zhz44/mindspore
6044d34074c8505dd4b02c0a05419cbc32a43f86
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Huawei Technologies Co., Ltd # # 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 to...
40.297619
112
0.637518
# Copyright 2021 Huawei Technologies Co., Ltd # # 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 to...
0
0
0
2,570
0
0
0
28
90
68aaea2672ff3fcb45c14f84b1bb337e703b0d8d
687
py
Python
pypy/module/posix/test/test_nt.py
olliemath/pypy
8b873bd0b8bf76075aba3d915c260789f26f5788
[ "Apache-2.0", "OpenSSL" ]
1
2021-06-02T23:02:09.000Z
2021-06-02T23:02:09.000Z
pypy/module/posix/test/test_nt.py
olliemath/pypy
8b873bd0b8bf76075aba3d915c260789f26f5788
[ "Apache-2.0", "OpenSSL" ]
1
2021-03-30T18:08:41.000Z
2021-03-30T18:08:41.000Z
pypy/module/posix/test/test_nt.py
olliemath/pypy
8b873bd0b8bf76075aba3d915c260789f26f5788
[ "Apache-2.0", "OpenSSL" ]
1
2022-03-30T11:42:37.000Z
2022-03-30T11:42:37.000Z
import sys import py if not sys.platform.startswith('win'): py.test.skip("requires Windows")
24.535714
72
0.678311
import os import sys import py if not sys.platform.startswith('win'): py.test.skip("requires Windows") from pypy.module.posix import interp_nt as nt def test__getfileinformation(): with open(__file__) as fp: stat = os.fstat(fp.fileno()) info = nt._getfileinformation(fp.fileno()) serial,...
0
0
0
0
0
483
0
12
91
ed0e27fce61f138eb87a95a873cf0e4750c6ac1b
4,321
py
Python
forecaster/models/layers.py
ZiyangTian/TrajectoryForecaster
63ab3d7b97ec5dfbb1250af114038a6ad5a7faa9
[ "MIT" ]
null
null
null
forecaster/models/layers.py
ZiyangTian/TrajectoryForecaster
63ab3d7b97ec5dfbb1250af114038a6ad5a7faa9
[ "MIT" ]
null
null
null
forecaster/models/layers.py
ZiyangTian/TrajectoryForecaster
63ab3d7b97ec5dfbb1250af114038a6ad5a7faa9
[ "MIT" ]
null
null
null
""" `tf.keras.layers.Layer` subclasses. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals
38.580357
100
0.664198
""" `tf.keras.layers.Layer` subclasses. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import functools import tensorflow as tf from forecaster.ops.diff import diff_1_pad from forecaster.ops.diff import diff_pad ...
0
0
0
3,833
0
0
0
37
251
620848f7c59cca1cbc7bccf648b9f0742cbf39fe
22,118
py
Python
services/ows_refactored/vegetation/styles_ndvi_clim.py
FlexiGroBots-H2020/datacube-config
8d6c61cf7c9a68552176aeb4aabc7ac6c3fc5a91
[ "Apache-2.0" ]
null
null
null
services/ows_refactored/vegetation/styles_ndvi_clim.py
FlexiGroBots-H2020/datacube-config
8d6c61cf7c9a68552176aeb4aabc7ac6c3fc5a91
[ "Apache-2.0" ]
null
null
null
services/ows_refactored/vegetation/styles_ndvi_clim.py
FlexiGroBots-H2020/datacube-config
8d6c61cf7c9a68552176aeb4aabc7ac6c3fc5a91
[ "Apache-2.0" ]
null
null
null
from ows_refactored.common.ows_legend_cfg import (legend_mean_ndvi_ticks, legend_stddev_ndvi_ticks) # colour ramps------------------------------------- mean_cr = [ {"value": -0.0, "color": "#000000", "alpha": 0.0}, {"value": 0.0, "color": "#d73027"}, {"value": 0.1, "color": "#f46d43"}, {"value": 0.2, "...
28.502577
76
0.555701
from ows_refactored.common.ows_legend_cfg import ( legend_mean_ndvi_ticks, legend_stddev_ndvi_ticks, ) # colour ramps------------------------------------- mean_cr = [ {"value": -0.0, "color": "#000000", "alpha": 0.0}, {"value": 0.0, "color": "#d73027"}, {"value": 0.1, "color": "#f46d43"}, {"val...
0
0
0
0
0
0
0
11
0
641ba4644d47fec93eae2e6c4972496fd38e9851
2,394
py
Python
SCTF/2017 Finals/iem/IEM.py
PurpEth/solved-hacking-problem
6f289d1647eb9c091caa580c7aae673e3ba02952
[ "Unlicense" ]
1
2021-08-24T22:16:41.000Z
2021-08-24T22:16:41.000Z
SCTF/2017 Finals/iem/IEM.py
PurpEth/solved-hacking-problem
6f289d1647eb9c091caa580c7aae673e3ba02952
[ "Unlicense" ]
null
null
null
SCTF/2017 Finals/iem/IEM.py
PurpEth/solved-hacking-problem
6f289d1647eb9c091caa580c7aae673e3ba02952
[ "Unlicense" ]
null
null
null
import sys import os if __name__ == '__main__': if len(sys.argv) >= 3: addr, port = sys.argv[1], int(sys.argv[2]) else: addr, port = '0.0.0.0', 80 KEY = os.urandom(6).encode('hex') keys = [int(KEY, 16) & 0xffffff, int(KEY, 16) >> 24] CIPHER = IteratedEvenMansour(keys) serv...
28.164706
69
0.549708
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler from SocketServer import ThreadingMixIn from SCTF import check_user, check_user_auth, FLAG import random import sys import os class IteratedEvenMansour(): def __init__(self, keys): self.keys = keys self.rndMap = self.genRndMap('I love C...
0
0
0
1,760
0
0
0
79
157
d79ae444349e6fb00620225ff2425a443fd305dd
4,757
py
Python
src/main/inpaint_videos.py
MichiganCOG/devil
296115cd5f4952c7dc65bbcaaf2d1d5c55ef5d35
[ "MIT" ]
8
2021-05-13T02:37:16.000Z
2021-09-22T09:28:52.000Z
src/main/inpaint_videos.py
MichiganCOG/devil
296115cd5f4952c7dc65bbcaaf2d1d5c55ef5d35
[ "MIT" ]
3
2021-07-30T11:55:56.000Z
2022-03-24T04:33:46.000Z
src/main/inpaint_videos.py
MichiganCOG/devil
296115cd5f4952c7dc65bbcaaf2d1d5c55ef5d35
[ "MIT" ]
1
2021-06-10T08:43:12.000Z
2021-06-10T08:43:12.000Z
import argparse import os import shutil from subprocess import check_call from PIL import Image from ..common_util.misc import makedirs def _unpad_copy_frames(interim_output_root, final_output_root, padder, raw_resolution): """Unpad and copy intermediate results from the inpainting method to the final output f...
48.050505
118
0.701282
import argparse import os import shutil from subprocess import check_call from tempfile import TemporaryDirectory from PIL import Image from ..common_util.misc import makedirs from ..video_inpainting import create_padded_masked_video_dataset from ..video_inpainting.util import PILImagePadder def main(frames_dataset...
0
0
0
0
0
1,833
0
91
89
446b1478ed039ec47e7afe0a3a8e31d34f5d25ac
147
py
Python
module08-mongodb.programming.using.pymongo/exercise01.py
deepcloudlabs/dcl162-2020-sep-09
dc05aa6e644610fe0cdb8f9de1074763fc77a3bb
[ "MIT" ]
null
null
null
module08-mongodb.programming.using.pymongo/exercise01.py
deepcloudlabs/dcl162-2020-sep-09
dc05aa6e644610fe0cdb8f9de1074763fc77a3bb
[ "MIT" ]
null
null
null
module08-mongodb.programming.using.pymongo/exercise01.py
deepcloudlabs/dcl162-2020-sep-09
dc05aa6e644610fe0cdb8f9de1074763fc77a3bb
[ "MIT" ]
1
2020-10-04T10:58:31.000Z
2020-10-04T10:58:31.000Z
from pymongo import MongoClient client = MongoClient("mongodb://localhost:27017") for db_name in client.list_database_names(): print(db_name)
24.5
49
0.782313
from pymongo import MongoClient client = MongoClient("mongodb://localhost:27017") for db_name in client.list_database_names(): print(db_name)
0
0
0
0
0
0
0
0
0
722009c45ecdd1ff91fccdc1118ff3309b190062
105
py
Python
pymunk-5.4.2/pymunk/_chipmunk_cffi.py
mturja-vf-ic-bd/self-driving-car_Robotics-Project
f84781bb19c2371783e306e9b17b7f3cc2267c3c
[ "MIT" ]
null
null
null
pymunk-5.4.2/pymunk/_chipmunk_cffi.py
mturja-vf-ic-bd/self-driving-car_Robotics-Project
f84781bb19c2371783e306e9b17b7f3cc2267c3c
[ "MIT" ]
null
null
null
pymunk-5.4.2/pymunk/_chipmunk_cffi.py
mturja-vf-ic-bd/self-driving-car_Robotics-Project
f84781bb19c2371783e306e9b17b7f3cc2267c3c
[ "MIT" ]
null
null
null
from __future__ import absolute_import
26.25
58
0.790476
from __future__ import absolute_import from pymunk._chipmunk_cffi_abi import ffi, lib, lib_path
0
0
0
0
0
0
0
35
26
bbbe0f0646ca9e5ab125007e2dbd6fff16fb53be
259
py
Python
ABC/168/A.py
yu9824/AtCoder
50a209059c005efadc1c912e443ec41365381c16
[ "MIT" ]
null
null
null
ABC/168/A.py
yu9824/AtCoder
50a209059c005efadc1c912e443ec41365381c16
[ "MIT" ]
null
null
null
ABC/168/A.py
yu9824/AtCoder
50a209059c005efadc1c912e443ec41365381c16
[ "MIT" ]
null
null
null
# list(map(int, input().split())) # int(input()) if __name__ == '__main__': N = int(input()) main(N)
15.235294
33
0.447876
# list(map(int, input().split())) # int(input()) def main(N): a = N % 10 if a in [2, 4, 5, 7, 9]: print('hon') elif a == 3: print('bon') else: print('pon') if __name__ == '__main__': N = int(input()) main(N)
0
0
0
0
0
125
0
0
23
647bd590850dd94d78732d1a50c17ef1cc1d1102
533
py
Python
lab13/controlbeep.py
chrijack/csap-rpi
afc8bc8b826285682855d044d54a87b7ab8ab2e3
[ "Unlicense" ]
null
null
null
lab13/controlbeep.py
chrijack/csap-rpi
afc8bc8b826285682855d044d54a87b7ab8ab2e3
[ "Unlicense" ]
null
null
null
lab13/controlbeep.py
chrijack/csap-rpi
afc8bc8b826285682855d044d54a87b7ab8ab2e3
[ "Unlicense" ]
null
null
null
"""/usr/bin/python $ Filename :controlbeep.py $ Description :If KEY_4 is pressed,this script will be executed $ Author :alan $ Website :www.osoyoo.com $ Update :2017/07/07 $ $ """ import RPi.GPIO as GPIO PIN = 23 GPIO.setmode(GPIO.BCM) GPIO.setwarnings(F...
19.740741
70
0.598499
"""/usr/bin/python $ Filename :controlbeep.py $ Description :If KEY_4 is pressed,this script will be executed $ Author :alan $ Website :www.osoyoo.com $ Update :2017/07/07 $ $ """ import RPi.GPIO as GPIO PIN = 23 GPIO.setmode(GPIO.BCM) GPIO.setwarnings(F...
0
0
0
0
0
0
0
0
0
a86f96505462e383f6c2341faddf2a1e85c4c268
9,562
py
Python
fwks/tasks.py
Zantyr/fwks
4dee4d406fcab4eb375afe6c9a08206fb58af061
[ "MIT" ]
null
null
null
fwks/tasks.py
Zantyr/fwks
4dee4d406fcab4eb375afe6c9a08206fb58af061
[ "MIT" ]
null
null
null
fwks/tasks.py
Zantyr/fwks
4dee4d406fcab4eb375afe6c9a08206fb58af061
[ "MIT" ]
null
null
null
""" fwks.tasks ========== Module responsible for scheduling the computations. Each type of task may be configured and then run in sequence. Useful for creation of batches of jobs. """ __all__ = ["Task", "make_training_task", "make_ab_feature_test", "make_feature_learnability"] import fwks.model as model import fwks.d...
32.634812
113
0.535139
""" fwks.tasks ========== Module responsible for scheduling the computations. Each type of task may be configured and then run in sequence. Useful for creation of batches of jobs. """ __all__ = ["Task", "make_training_task", "make_ab_feature_test", "make_feature_learnability"] import keras import numpy as np import ...
0
5,218
0
2,763
0
0
0
1
198
e1b21927b899e3c70cbab7b30d6f6390e76b3a7e
1,980
py
Python
main.py
shubhamrauniyar/angela
a2f7b9a822f7194f2518f1668df7c417516c28ae
[ "MIT" ]
21
2018-10-29T06:04:43.000Z
2021-02-11T17:13:49.000Z
main.py
shubhamrauniyar/angela
a2f7b9a822f7194f2518f1668df7c417516c28ae
[ "MIT" ]
null
null
null
main.py
shubhamrauniyar/angela
a2f7b9a822f7194f2518f1668df7c417516c28ae
[ "MIT" ]
7
2018-11-08T16:09:14.000Z
2021-08-01T18:15:53.000Z
#!/usr/bin/env python import importlib import argparse import sys import signal # parse command line arguments parser = argparse.ArgumentParser() parser.add_argument("--cfg", help="path to hyperparameter config file", type=str) parser.add_argument("--render", help="render agent", action="store_true") parser.add_argum...
38.823529
90
0.713131
#!/usr/bin/env python import importlib import argparse import sys import signal from subprocess import call # parse command line arguments parser = argparse.ArgumentParser() parser.add_argument("--cfg", help="path to hyperparameter config file", type=str) parser.add_argument("--render", help="render agent", action="s...
0
0
0
0
0
197
0
44
122
2892e5890e99adcc1660a6ac845123dea7c3532e
315
py
Python
createdb.py
MjKay1/Reading-and-writing-Databases
dc9cef0c246ce296e62368854dd4bb7b017a6256
[ "Unlicense" ]
null
null
null
createdb.py
MjKay1/Reading-and-writing-Databases
dc9cef0c246ce296e62368854dd4bb7b017a6256
[ "Unlicense" ]
null
null
null
createdb.py
MjKay1/Reading-and-writing-Databases
dc9cef0c246ce296e62368854dd4bb7b017a6256
[ "Unlicense" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Thu Feb 22 10:23:18 2018 @author: gy17mjk """ import sqlite3 conn = sqlite3.connect('resultsdb.sqlite') c = conn.cursor() c.execute("CREATE TABLE Results (address text, burglaries integer)") c.execute("INSERT INTO Results VALUES ('Queen Vic',2)") conn.commit() conn.close()
21
68
0.698413
# -*- coding: utf-8 -*- """ Created on Thu Feb 22 10:23:18 2018 @author: gy17mjk """ import sqlite3 conn = sqlite3.connect('resultsdb.sqlite') c = conn.cursor() c.execute("CREATE TABLE Results (address text, burglaries integer)") c.execute("INSERT INTO Results VALUES ('Queen Vic',2)") conn.commit() conn.close()
0
0
0
0
0
0
0
0
0
d49a7482d3353fba50c8ecc225a4567c6a6bc170
4,145
py
Python
temboo/core/Library/DuckDuckGo/Query.py
jordanemedlock/psychtruths
52e09033ade9608bd5143129f8a1bfac22d634dd
[ "Apache-2.0" ]
7
2016-03-07T02:07:21.000Z
2022-01-21T02:22:41.000Z
temboo/core/Library/DuckDuckGo/Query.py
jordanemedlock/psychtruths
52e09033ade9608bd5143129f8a1bfac22d634dd
[ "Apache-2.0" ]
null
null
null
temboo/core/Library/DuckDuckGo/Query.py
jordanemedlock/psychtruths
52e09033ade9608bd5143129f8a1bfac22d634dd
[ "Apache-2.0" ]
8
2016-06-14T06:01:11.000Z
2020-04-22T09:21:44.000Z
# -*- coding: utf-8 -*- ############################################################################### # # Query # Access DuckDuckGo web search functionality. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this ...
38.37963
177
0.666104
# -*- coding: utf-8 -*- ############################################################################### # # Query # Access DuckDuckGo web search functionality. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this ...
0
0
0
2,982
0
0
0
104
204
21f0c65dcc3c0489a3a6b0e84d739d306f07efe8
2,773
py
Python
testsuite/tests/apicast/parameters/apicast_path_routing/conftest.py
dlaso99/3scale-tests
b31a3b3596af6d632b393e383c0417ea56bd95ca
[ "Apache-2.0" ]
5
2021-11-04T14:09:24.000Z
2021-12-23T13:48:36.000Z
testsuite/tests/apicast/parameters/apicast_path_routing/conftest.py
dlaso99/3scale-tests
b31a3b3596af6d632b393e383c0417ea56bd95ca
[ "Apache-2.0" ]
41
2021-11-03T14:27:21.000Z
2022-03-29T14:46:16.000Z
testsuite/tests/apicast/parameters/apicast_path_routing/conftest.py
dlaso99/3scale-tests
b31a3b3596af6d632b393e383c0417ea56bd95ca
[ "Apache-2.0" ]
12
2021-11-03T17:28:31.000Z
2021-11-30T12:28:25.000Z
"""Path routing-based tests fixtures.""" def delete_all_mapping_rules(proxy): """Deletes all mapping rules in a given proxy.""" mapping_rules = proxy.mapping_rules.list() for mapping_rule in mapping_rules: proxy.mapping_rules.delete(mapping_rule["id"]) # pylint: disable=too-many-arguments ...
28.587629
101
0.728814
"""Path routing-based tests fixtures.""" import pytest from testsuite import rawobj from testsuite.gateways.apicast.selfmanaged import SelfManagedApicast from testsuite.utils import blame def delete_all_mapping_rules(proxy): """Deletes all mapping rules in a given proxy.""" mapping_rules = proxy.mapping_rule...
0
2,073
0
0
0
0
0
59
318