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
b18fc2e4398b5fe692a468df028978c6863ce1e5
421
py
Python
assessement_image_basic.py
JeffLabonte/Computer_Vision_Course_Example
6da36419b424ef4b65e493f8467aa8a5ffddd30b
[ "MIT" ]
null
null
null
assessement_image_basic.py
JeffLabonte/Computer_Vision_Course_Example
6da36419b424ef4b65e493f8467aa8a5ffddd30b
[ "MIT" ]
null
null
null
assessement_image_basic.py
JeffLabonte/Computer_Vision_Course_Example
6da36419b424ef4b65e493f8467aa8a5ffddd30b
[ "MIT" ]
null
null
null
import cv2 import matplotlib.pyplot as plt img = cv2.imread("Computer-Vision-with-Python/DATA/dog_backpack.png") plt.imshow(img) img_rgb = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) plt.imshow(img_rgb) new_img = img_rgb.copy() new_img = cv2.flip(new_img, 0) plt.imshow(new_img) pt1 = (200, 380) pt2 = (600, 700) cv2.recta...
22.157895
71
0.743468
import cv2 import numpy as np import matplotlib.pyplot as plt img = cv2.imread("Computer-Vision-with-Python/DATA/dog_backpack.png") plt.imshow(img) img_rgb = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) plt.imshow(img_rgb) new_img = img_rgb.copy() new_img = cv2.flip(new_img, 0) plt.imshow(new_img) pt1 = (200, 380) pt2 = (...
0
0
0
0
0
0
0
-3
22
04a4848fd3a50deebad0f5129e982bbc9c0a69b8
150
py
Python
points/urls.py
rmishra7/cms
06898eabe708254eedfa410694f86396fcf69f53
[ "MIT" ]
null
null
null
points/urls.py
rmishra7/cms
06898eabe708254eedfa410694f86396fcf69f53
[ "MIT" ]
null
null
null
points/urls.py
rmishra7/cms
06898eabe708254eedfa410694f86396fcf69f53
[ "MIT" ]
null
null
null
from django.conf.urls import url from points import apis urlpatterns = [ url(r'^$', apis.PointsTableApi.as_view(), name="api_points_table") ]
15
70
0.713333
from django.conf.urls import url from points import apis urlpatterns = [ url(r'^$', apis.PointsTableApi.as_view(), name="api_points_table") ]
0
0
0
0
0
0
0
0
0
ee69d4394b07343fbd1a670c78a0e3edc5afb890
1,221
py
Python
osmaxx/excerptexport/urls.py
tyrasd/osmaxx
da4454083d17b2ef8b0623cad62e39992b6bd52a
[ "MIT" ]
27
2015-03-30T14:17:26.000Z
2022-02-19T17:30:44.000Z
osmaxx/excerptexport/urls.py
tyrasd/osmaxx
da4454083d17b2ef8b0623cad62e39992b6bd52a
[ "MIT" ]
483
2015-03-09T16:58:03.000Z
2022-03-14T09:29:06.000Z
osmaxx/excerptexport/urls.py
tyrasd/osmaxx
da4454083d17b2ef8b0623cad62e39992b6bd52a
[ "MIT" ]
6
2015-04-07T07:38:30.000Z
2020-04-01T12:45:53.000Z
from django.conf.urls import url from django.contrib.auth.views import login, logout from django.views.generic import TemplateView from osmaxx.excerptexport.views import (delete_excerpt, export_list, export_detail, manage_own_excerpts, order_new_excerpt, order_existing_excerpt) excerpt_export_urlpatterns = [ url...
34.885714
103
0.710893
from django.conf.urls import url from django.contrib.auth.views import login, logout from django.views.generic import TemplateView from osmaxx.excerptexport.views import ( delete_excerpt, export_list, export_detail, manage_own_excerpts, order_new_excerpt, order_existing_excerpt, ) excerpt_exp...
0
0
0
0
0
0
0
27
0
b6cb7e0878363791464914093ee1e35bdf2144d8
1,905
py
Python
tests/unit/test_config.py
paulopes/runningtrack
ce01730fd8e92f5411d45705e6a857eedd7374cd
[ "Apache-2.0" ]
2
2019-04-22T03:16:08.000Z
2019-04-22T22:09:30.000Z
tests/unit/test_config.py
paulopes/runningtrack
ce01730fd8e92f5411d45705e6a857eedd7374cd
[ "Apache-2.0" ]
4
2018-11-10T21:16:16.000Z
2018-11-10T23:18:59.000Z
tests/unit/test_config.py
paulopes/runningtrack
ce01730fd8e92f5411d45705e6a857eedd7374cd
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Unit tests for the running.config module """ from __future__ import print_function, division, unicode_literals import os import running.config as config def test_load_config_ini(): """ Load a test configuration file in .ini format, and check if the DEFAULT section propagate...
25.065789
74
0.493438
# -*- coding: utf-8 -*- """ Unit tests for the running.config module """ from __future__ import print_function, division, unicode_literals import os import running.config as config def test_load_config_ini(): """ Load a test configuration file in .ini format, and check if the DEFAULT section propagate...
0
0
0
0
0
0
0
0
0
3f58e8080b40914eaea3d6b88428011db919a95a
630
py
Python
tests/testapp/views.py
matthiask/feincms3-downloads
962bf2574feb1627a0cf794dd20e038377fb4c1e
[ "MIT" ]
2
2021-04-12T10:36:34.000Z
2021-10-03T12:17:57.000Z
tests/testapp/views.py
matthiask/feincms3-downloads
962bf2574feb1627a0cf794dd20e038377fb4c1e
[ "MIT" ]
null
null
null
tests/testapp/views.py
matthiask/feincms3-downloads
962bf2574feb1627a0cf794dd20e038377fb4c1e
[ "MIT" ]
1
2019-09-29T05:58:25.000Z
2019-09-29T05:58:25.000Z
from feincms3 import plugins from feincms3.renderer import TemplatePluginRenderer from .models import HTML, Download renderer = TemplatePluginRenderer() renderer.register_string_renderer(HTML, plugins.html.render_html) renderer.register_template_renderer(Download, "plugins/download.html")
31.5
87
0.774603
from django.shortcuts import get_object_or_404, render from feincms3 import plugins from feincms3.regions import Regions from feincms3.renderer import TemplatePluginRenderer from .models import HTML, Article, Download renderer = TemplatePluginRenderer() renderer.register_string_renderer(HTML, plugins.html.render_html...
0
0
0
0
0
213
0
57
67
396df33f8d1ede98400b2c34baa926f24ec900d4
578
py
Python
scantron/tests.py
suhelhammoud/scantron
fcf64d973342cd63acf5235ce621fed02aeae47d
[ "MIT" ]
null
null
null
scantron/tests.py
suhelhammoud/scantron
fcf64d973342cd63acf5235ce621fed02aeae47d
[ "MIT" ]
null
null
null
scantron/tests.py
suhelhammoud/scantron
fcf64d973342cd63acf5235ce621fed02aeae47d
[ "MIT" ]
null
null
null
# TODO modify code to do REAL testing
34
64
0.65917
from django.test import TestCase from .resources import StudentResource from .models import Student # TODO modify code to do REAL testing class StudetTest(TestCase): def setUp(self): Student.objects.create(name="Sami", std_id = "2011300") Student.objects.create(name="Ahmad", std_id = "2011500") ...
0
0
0
418
0
0
0
34
88
427fe59299333a0f870405e8974d8aeb4a098740
1,587
py
Python
deeplabcut/pose_estimation_tensorflow/dataset/pose_dataset.py
serre-lab/deeplabcut_mgh
aa37b104ba4967932528d4f79665648474f51112
[ "MIT" ]
null
null
null
deeplabcut/pose_estimation_tensorflow/dataset/pose_dataset.py
serre-lab/deeplabcut_mgh
aa37b104ba4967932528d4f79665648474f51112
[ "MIT" ]
1
2019-12-15T00:37:15.000Z
2019-12-15T00:37:15.000Z
deeplabcut/pose_estimation_tensorflow/dataset/pose_dataset.py
kalpitthakkar/deeplabcut_mgh_pose
8fa4a59f422ff0357552e290230838239edcfe1b
[ "MIT" ]
null
null
null
''' Adapted from DeeperCut by Eldar Insafutdinov https://github.com/eldar/pose-tensorflow ''' import numpy as np # Augmentation functions def CropImage(joints,im,Xlabel,Ylabel,cfg): ''' Randomly cropping image around xlabel,ylabel taking into account size of image. Introduced in DLC 2 ''' widthforward=int(cf...
31.117647
125
0.672968
''' Adapted from DeeperCut by Eldar Insafutdinov https://github.com/eldar/pose-tensorflow ''' from enum import Enum import numpy as np class Batch(Enum): inputs = 0 part_score_targets = 1 part_score_weights = 2 locref_targets = 3 locref_mask = 4 pairwise_targets = 5 pairwise_mask = 6 d...
0
0
0
177
0
287
0
0
113
62e477f0f1ec380d60c2fbcd1f119ae3c51edaf5
486
py
Python
setup.py
csmarfan/petpy
d5edaea43a6657e6a93a1f01f3dd27e9e8fbb0cf
[ "Apache-2.0" ]
null
null
null
setup.py
csmarfan/petpy
d5edaea43a6657e6a93a1f01f3dd27e9e8fbb0cf
[ "Apache-2.0" ]
2
2019-06-19T12:16:12.000Z
2019-06-19T12:38:02.000Z
setup.py
csmarfan/petpy
d5edaea43a6657e6a93a1f01f3dd27e9e8fbb0cf
[ "Apache-2.0" ]
1
2019-06-19T12:27:06.000Z
2019-06-19T12:27:06.000Z
from setuptools import setup setup(name='petpy', version='0.1', description='Petrophysics utilities', url='https://example.com/', author = 'Fan', author_email='yuanzhong.fan@shell.com', license = 'Apache 2', pakages=['petpy'], install_requires=['numpy'], ...
30.375
47
0.54321
from setuptools import setup setup(name='petpy', version='0.1', description='Petrophysics utilities', url='https://example.com/', author = 'Fan', author_email='yuanzhong.fan@shell.com', license = 'Apache 2', pakages=['petpy'], install_requires=['numpy'], ...
0
0
0
0
0
0
0
0
0
1f38fc45c9f57f950dc20432a34d9b30298bfa71
2,514
py
Python
dask_saturn/backoff.py
saturncloud/dask-saturn
9c9733f68fee26e60f544ab9653bc9056b7543e5
[ "BSD-3-Clause" ]
12
2020-05-19T17:18:06.000Z
2022-03-24T01:25:57.000Z
dask_saturn/backoff.py
saturncloud/dask-saturn
9c9733f68fee26e60f544ab9653bc9056b7543e5
[ "BSD-3-Clause" ]
32
2020-04-01T13:43:38.000Z
2021-12-21T18:42:13.000Z
dask_saturn/backoff.py
saturncloud/dask-saturn
9c9733f68fee26e60f544ab9653bc9056b7543e5
[ "BSD-3-Clause" ]
3
2020-04-28T13:52:22.000Z
2021-09-15T02:03:28.000Z
""" Lightweight implementation of exponential backoff, used for operations that require polling. This is simple enough that it isn't worth bringing in a new dependency for it. """
35.408451
90
0.663087
""" Lightweight implementation of exponential backoff, used for operations that require polling. This is simple enough that it isn't worth bringing in a new dependency for it. """ from time import sleep from datetime import datetime from math import ceil from random import randrange class ExpBackoff: """ ``S...
0
0
0
2,205
0
0
0
16
112
6b12411d483da832edf7bcaa1cfa3bafb65bbb40
9,403
py
Python
tekore/_auth/expiring/client.py
Allerter/tekore
20cf68280fb5b691126600a5b474ee841f7be199
[ "MIT" ]
135
2020-01-14T17:47:26.000Z
2022-03-25T18:30:04.000Z
tekore/_auth/expiring/client.py
Allerter/tekore
20cf68280fb5b691126600a5b474ee841f7be199
[ "MIT" ]
135
2020-01-13T22:56:35.000Z
2022-03-11T19:41:36.000Z
tekore/_auth/expiring/client.py
Allerter/tekore
20cf68280fb5b691126600a5b474ee841f7be199
[ "MIT" ]
21
2020-01-16T16:01:23.000Z
2022-02-17T12:46:32.000Z
from base64 import b64encode as _b64encode OAUTH_AUTHORIZE_URL = 'https://accounts.spotify.com/authorize' OAUTH_TOKEN_URL = 'https://accounts.spotify.com/api/token' def b64encode(msg: str) -> str: """Encode a unicode string in base-64.""" return _b64encode(msg.encode()).decode() def b64urlencode(msg: bytes...
30.332258
84
0.584175
from base64 import b64encode as _b64encode from typing import Tuple from hashlib import sha256 from secrets import token_urlsafe from urllib.parse import urlencode from .decor import parse_token, parse_refreshed_token from .token import Token from ..scope import Scope from ..._sender import Sender, Client, send_and_p...
0
3,016
0
5,555
0
0
0
115
201
0587045a70a089d0e2fb0c2508b2623eba5fd3c0
3,700
py
Python
automow_maps/scripts/field_publisher.py
Auburn-Automow/au_automow_common
920be6a740aa6d738e9954417b41490e353efd04
[ "BSD-3-Clause" ]
43
2016-03-05T17:06:29.000Z
2022-03-10T08:50:46.000Z
automow_maps/scripts/field_publisher.py
qintxwd/au_automow_common
920be6a740aa6d738e9954417b41490e353efd04
[ "BSD-3-Clause" ]
2
2017-07-10T12:43:49.000Z
2019-03-13T13:57:31.000Z
automow_maps/scripts/field_publisher.py
qintxwd/au_automow_common
920be6a740aa6d738e9954417b41490e353efd04
[ "BSD-3-Clause" ]
22
2016-03-23T06:10:52.000Z
2022-03-10T08:50:49.000Z
#!/usr/bin/env python """ This ROS node takes the field survey file and publishes a field polygon as a geometry_msgs/PolygonStamped for use in other nodes and for visualization in rviz. """ import roslib; roslib.load_manifest('automow_maps') if __name__ == '__main__': fpn = FieldPublisherNode()
37
85
0.605405
#!/usr/bin/env python """ This ROS node takes the field survey file and publishes a field polygon as a geometry_msgs/PolygonStamped for use in other nodes and for visualization in rviz. """ import roslib; roslib.load_manifest('automow_maps') import rospy from geometry_msgs.msg import PolygonStamped, Point32, Polygo...
0
0
0
3,288
0
0
0
32
68
5ddf20fef29c8012101e7fb1a4922bd6af50aece
26,502
py
Python
smlb/core/metrics.py
CitrineInformatics/smlb
28a3689bd36aa8d51031b4faf7e2331bbd8148a9
[ "Apache-2.0" ]
6
2020-07-27T21:08:55.000Z
2021-05-04T07:00:29.000Z
smlb/core/metrics.py
CitrineInformatics/smlb
28a3689bd36aa8d51031b4faf7e2331bbd8148a9
[ "Apache-2.0" ]
18
2020-09-01T00:47:04.000Z
2021-09-15T22:16:56.000Z
smlb/core/metrics.py
CitrineInformatics/smlb
28a3689bd36aa8d51031b4faf7e2331bbd8148a9
[ "Apache-2.0" ]
2
2020-08-24T21:50:16.000Z
2020-12-06T05:18:57.000Z
"""Evaluation metrics. Scientific Machine Learning Benchmark: A benchmark of regression models in chem- and materials informatics. (c) Matthias Rupp 2019, Citrine Informatics. Related terms: objective functions, loss functions, cost functions, reward functions, utility functions, fitness functions, score functions,...
35.716981
152
0.659497
"""Evaluation metrics. Scientific Machine Learning Benchmark: A benchmark of regression models in chem- and materials informatics. (c) Matthias Rupp 2019, Citrine Informatics. Related terms: objective functions, loss functions, cost functions, reward functions, utility functions, fitness functions, score functions,...
13
1,538
0
21,016
0
0
0
57
646
bd9fc6a2e9a1bd5460c3136bbc62956e2761bb63
1,604
py
Python
examples/script.py
FelixBoelle/aiida-ase-basic
25a89835b880e07e695a0fdef280be4319b23cb4
[ "MIT" ]
null
null
null
examples/script.py
FelixBoelle/aiida-ase-basic
25a89835b880e07e695a0fdef280be4319b23cb4
[ "MIT" ]
1
2019-11-06T18:10:56.000Z
2019-11-06T18:10:56.000Z
examples/script.py
FelixBoelle/aiida-ase-basic
25a89835b880e07e695a0fdef280be4319b23cb4
[ "MIT" ]
1
2019-11-07T08:44:47.000Z
2019-11-07T08:44:47.000Z
""" Test script that uses ASE to run an EMT calculation Script partly from the ASE intro tutorials https://wiki.fysik.dtu.dk/ase/tutorials/surface.html """ # --------------------- STEP 1: Prepare the atoms/structure object ------------ #from ase.build import fcc111 #h = 1.85 #d = 1.10 #atoms = fcc111('Cu', size=(4, ...
32.734694
79
0.597257
""" Test script that uses ASE to run an EMT calculation Script partly from the ASE intro tutorials https://wiki.fysik.dtu.dk/ase/tutorials/surface.html """ # --------------------- STEP 1: Prepare the atoms/structure object ------------ #from ase.build import fcc111 #h = 1.85 #d = 1.10 #atoms = fcc111('Cu', size=(4, ...
0
0
0
0
0
0
0
0
0
b692793606989fb6d0b83138ad1b450a2f06bf18
510
py
Python
app/board_app/migrations/0003_auto_20200708_1139.py
KimKiHyuk/BenefitObserver
74d59ee2d9dc81f8b8423e14a9ce950fa21f332b
[ "MIT" ]
null
null
null
app/board_app/migrations/0003_auto_20200708_1139.py
KimKiHyuk/BenefitObserver
74d59ee2d9dc81f8b8423e14a9ce950fa21f332b
[ "MIT" ]
8
2021-03-30T13:53:18.000Z
2022-03-02T14:54:13.000Z
app/board_app/migrations/0003_auto_20200708_1139.py
KimKiHyuk/BenefitObserver
74d59ee2d9dc81f8b8423e14a9ce950fa21f332b
[ "MIT" ]
null
null
null
# Generated by Django 3.0.7 on 2020-07-08 11:39
23.181818
81
0.584314
# Generated by Django 3.0.7 on 2020-07-08 11:39 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('board_app', '0002_auto_20200630_0938'), ] operations = [ migrations.AlterModelOptions( name='posts', options={'ordering': ['...
0
0
0
404
0
0
0
11
46
d1262dcb778ce01b695f8d85addafbc5daac572e
6,646
py
Python
plyer/platforms/win/cpu.py
EdwardCoventry/plyer
4002b21fe1a664e80b422547b8ae04d2a2d3037d
[ "MIT" ]
1,184
2015-01-02T23:24:46.000Z
2022-03-27T16:28:16.000Z
plyer/platforms/win/cpu.py
EdwardCoventry/plyer
4002b21fe1a664e80b422547b8ae04d2a2d3037d
[ "MIT" ]
469
2015-01-02T09:23:15.000Z
2022-03-17T10:35:58.000Z
plyer/platforms/win/cpu.py
EdwardCoventry/plyer
4002b21fe1a664e80b422547b8ae04d2a2d3037d
[ "MIT" ]
431
2015-01-05T23:00:43.000Z
2022-03-15T04:20:03.000Z
''' Module of Windows API for plyer.cpu. ''' from ctypes import (windll) KERNEL = windll.kernel32 ERROR_INSUFFICIENT_BUFFER = 0x0000007A def instance(): ''' Instance for facade proxy. ''' return WinCPU() # Resources: # GetLogicalProcessInformation # https://msdn.microsoft.com/en-us/librar...
26.268775
75
0.592838
''' Module of Windows API for plyer.cpu. ''' from ctypes import ( c_ulonglong, c_ulong, byref, Structure, POINTER, Union, windll, create_string_buffer, sizeof, cast, c_void_p, c_uint32 ) from ctypes.wintypes import ( BYTE, DWORD, WORD ) from plyer.facades import CPU KERNEL = windll.kernel32 ERROR_IN...
0
1,295
0
4,116
0
0
0
166
229
7259792742b0ad4d459082903d93acb6d50ac521
735
py
Python
gaussian.py
santosmv/probability-distributions
7e21069a6998897d996dec4e8bafc775b2fe0098
[ "MIT" ]
null
null
null
gaussian.py
santosmv/probability-distributions
7e21069a6998897d996dec4e8bafc775b2fe0098
[ "MIT" ]
null
null
null
gaussian.py
santosmv/probability-distributions
7e21069a6998897d996dec4e8bafc775b2fe0098
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt from distributions import gaussian mu_list = [0, -5, 3] sigma_list = [1, 2, 4] x = np.linspace(-15, 15, 500) for i in range(len(mu_list)): mu = mu_list[i] sigma = sigma_list[i] plt.plot(x, gaussian(x, mu, sigma), label=r'$\mu = %d$'%mu + r' $\sigma = ...
28.269231
151
0.668027
import numpy as np import matplotlib.pyplot as plt from distributions import gaussian mu_list = [0, -5, 3] sigma_list = [1, 2, 4] x = np.linspace(-15, 15, 500) for i in range(len(mu_list)): mu = mu_list[i] sigma = sigma_list[i] plt.plot(x, gaussian(x, mu, sigma), label=r'$\mu = %d$'%mu + r' $\sigma = ...
0
0
0
0
0
0
0
0
0
ebe2a5ddb21e51192a8434ce010c70d3fbda8c69
6,271
py
Python
tests/netcdf_engine/test_convert_multifragments.py
TileDB-Inc/TileDB-CF-Py
9aab0fe9ba7346a1846c7458a5d08b123dcf90a8
[ "MIT" ]
12
2021-06-07T16:51:32.000Z
2022-03-10T12:48:00.000Z
tests/netcdf_engine/test_convert_multifragments.py
TileDB-Inc/TileDB-CF-Py
9aab0fe9ba7346a1846c7458a5d08b123dcf90a8
[ "MIT" ]
72
2021-04-28T21:49:41.000Z
2022-02-24T13:58:11.000Z
tests/netcdf_engine/test_convert_multifragments.py
TileDB-Inc/TileDB-CF-Py
9aab0fe9ba7346a1846c7458a5d08b123dcf90a8
[ "MIT" ]
3
2021-08-11T16:33:37.000Z
2021-12-01T20:31:12.000Z
# Copyright 2021 TileDB Inc. # Licensed under the MIT License. import pytest netCDF4 = pytest.importorskip("netCDF4")
39.440252
86
0.614894
# Copyright 2021 TileDB Inc. # Licensed under the MIT License. import numpy as np import pytest import tiledb from tiledb.cf import Group, NetCDF4ConverterEngine netCDF4 = pytest.importorskip("netCDF4") class TestSimplyCopyChunks: """Test converting a simple NetCDF in chunks. NetCDF File: dimensions: ...
0
4,228
0
1,790
0
0
0
19
113
ada7701a7425979917dc464f79038b2b74c9fb6d
14,117
py
Python
mi/dataset/driver/ctdpf_ckl/wfp/test/test_driver.py
rhan1498/marine-integrations
ad94c865e0e4cc7c8fd337870410c74b57d5c826
[ "BSD-2-Clause" ]
null
null
null
mi/dataset/driver/ctdpf_ckl/wfp/test/test_driver.py
rhan1498/marine-integrations
ad94c865e0e4cc7c8fd337870410c74b57d5c826
[ "BSD-2-Clause" ]
null
null
null
mi/dataset/driver/ctdpf_ckl/wfp/test/test_driver.py
rhan1498/marine-integrations
ad94c865e0e4cc7c8fd337870410c74b57d5c826
[ "BSD-2-Clause" ]
null
null
null
""" @package mi.dataset.driver.ctdpf_ckl.wfp.test.test_driver @file marine-integrations/mi/dataset/driver/ctdpf_ckl/wfp/driver.py @author cgoodrich @brief Test cases for ctdpf_ckl_wfp driver USAGE: Make tests verbose and provide stdout * From the IDK $ bin/dsa/test_driver $ bin/dsa/test_driver -i [-t...
39.543417
122
0.6393
""" @package mi.dataset.driver.ctdpf_ckl.wfp.test.test_driver @file marine-integrations/mi/dataset/driver/ctdpf_ckl/wfp/driver.py @author cgoodrich @brief Test cases for ctdpf_ckl_wfp driver USAGE: Make tests verbose and provide stdout * From the IDK $ bin/dsa/test_driver $ bin/dsa/test_driver -i [-t...
0
11,186
0
0
0
0
0
312
290
2e3208da4f7b896f8fbaa40603f80a8420f457dd
804
py
Python
interpretability/explanation_methods/__init__.py
moboehle/CoDA-Nets
9f43f286d8a662078e21dc401a315e257da21c0d
[ "BSD-2-Clause", "0BSD" ]
25
2021-06-14T09:14:12.000Z
2022-03-31T14:27:09.000Z
interpretability/explanation_methods/__init__.py
moboehle/B-cos
5f9218f6773534c80367793d1cd767742869764a
[ "BSD-2-Clause", "0BSD" ]
1
2021-07-05T12:31:58.000Z
2021-07-05T12:31:58.000Z
interpretability/explanation_methods/__init__.py
moboehle/CoDA-Nets
9f43f286d8a662078e21dc401a315e257da21c0d
[ "BSD-2-Clause", "0BSD" ]
3
2021-07-10T09:37:54.000Z
2022-02-18T21:02:20.000Z
from interpretability.explanation_methods.explainers.rise import RISE from interpretability.explanation_methods.explainers.lime import Lime from interpretability.explanation_methods.explainers.occlusion import Occlusion from interpretability.explanation_methods.explainers.captum import GradCam, GB, IxG, Grad, DeepLIFT,...
33.5
108
0.771144
from interpretability.explanation_methods.explainers.rise import RISE from interpretability.explanation_methods.explainers.lime import Lime from interpretability.explanation_methods.explainers.occlusion import Occlusion from interpretability.explanation_methods.explainers.captum import GradCam, GB, IxG, Grad, DeepLIFT,...
0
0
0
0
0
135
0
65
45
4f9d0c16553dd37369561237a7161761ce921494
14,968
py
Python
repartition_experiments/algorithms/utils.py
big-data-lab-team/repartition_experiments
71cff469d2036f3e325ea3fc15b9f686c794f8d8
[ "MIT" ]
null
null
null
repartition_experiments/algorithms/utils.py
big-data-lab-team/repartition_experiments
71cff469d2036f3e325ea3fc15b9f686c794f8d8
[ "MIT" ]
1
2020-07-05T02:06:19.000Z
2020-09-25T16:20:39.000Z
repartition_experiments/algorithms/utils.py
GTimothee/repartition_experiments
71cff469d2036f3e325ea3fc15b9f686c794f8d8
[ "MIT" ]
null
null
null
import logging, math logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.DEBUG) logger = logging.getLogger(__name__) def get_volumes(R, B): """ Returns a dictionary mapping each buffer (numeric) index to a Volume object containing its coordinates in R. Arguments: ---------- ...
32.53913
205
0.620657
import operator, logging, math, psutil from enum import Enum from repartition_experiments.file_formats.hdf5 import HDF5_manager logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.DEBUG) logger = logging.getLogger(__name__) class Axes(Enum): i = 0 j = 1 k = 2 class Volume: def __...
0
0
0
1,511
0
1,601
0
63
242
7039fa9efaf3eed38d0a11013660a04b20f4c052
1,468
py
Python
PythonLeetcode/周赛/223/summary.py
Lcoderfit/Introduction-to-algotithms
aea2630be6ca2c60186593d6e66b0a59e56dc848
[ "MIT" ]
3
2018-08-25T16:14:16.000Z
2019-10-15T22:25:32.000Z
PythonLeetcode/周赛/223/summary.py
Lcoderfit/Introduction-to-algotithms
aea2630be6ca2c60186593d6e66b0a59e56dc848
[ "MIT" ]
null
null
null
PythonLeetcode/周赛/223/summary.py
Lcoderfit/Introduction-to-algotithms
aea2630be6ca2c60186593d6e66b0a59e56dc848
[ "MIT" ]
1
2019-10-08T09:03:48.000Z
2019-10-08T09:03:48.000Z
""" 1167. .py 1564. I.py 1.whilefor 2.warehouse 3 5 4 2 3 min() , boxeswarehouseboxes 870. .py 1 + : ,1,, 2 + 342. 4.py 389. .py 0st 405. .py hex_str = "0123456789abcdef" 17.10. .py 1.00 2.+1-1 05.06. .py Python3 751. IP CIDR.py start & -startstart110 0ip nn100 <...
31.234043
86
0.740463
""" 一、1167. 连接棒材的最低费用.py 遇到这种需要排序,然后取最小的两个或者最大的两个数进行操作得到一个结果,这个结果又要与剩下的元素进行同样操作的时候,可以采用堆的数据结构简化 二、1564. 把箱子放进仓库里 I.py 1.当有双指针时,其中一个指针必须遍历完所有元素,则可将while替换为for循环 2.这个跟分发饼干有些类似,关键在于将高低不同的warehouse转换为非递增的序列 例如 3 5 4 2 3, 后一块墙能通过多大的板子受到前一块板子的限制,也就是能通过当前墙面的最大板子为min(前一块墙高度,当前墙高度) 所以可以通过从左到右遍历,两个相邻的墙对比,如果后一块墙要高于前一快,则将后一块改成跟前一...
2,391
0
0
0
0
0
0
0
0
c18b39d5ec83f88bf9a4528ab2fc41ae5f48f7d3
1,685
py
Python
data/sex-difference.py
franpog859/darwinLogs
1d0a9bdd7c928ceee96b3121e408fc1ee1d80e05
[ "Apache-2.0" ]
7
2019-02-21T10:50:09.000Z
2019-10-16T06:22:27.000Z
data/sex-difference.py
franpog859/darwinLogs
1d0a9bdd7c928ceee96b3121e408fc1ee1d80e05
[ "Apache-2.0" ]
null
null
null
data/sex-difference.py
franpog859/darwinLogs
1d0a9bdd7c928ceee96b3121e408fc1ee1d80e05
[ "Apache-2.0" ]
2
2019-10-16T17:34:25.000Z
2020-01-18T20:40:02.000Z
import random import matplotlib.pyplot as plt import pandas as pd from math import fabs import numpy as np sex_differences = [] pair_differences = [] for i in range(2, 100): for j in range(i): men = j women = i - j homo_pair = 0 hetero_pair = 0 for m in range(men): ...
35.851064
255
0.681306
import random import matplotlib.pyplot as plt import pandas as pd from math import fabs import numpy as np sex_differences = [] pair_differences = [] for i in range(2, 100): for j in range(i): men = j women = i - j homo_pair = 0 hetero_pair = 0 for m in range(men): ...
0
0
0
0
0
0
0
0
0
514cd2c6cf41ca4554af2219f11300bbd63be9fd
378
py
Python
project_summarizer/__main__.py
jackdewinter/pyscan
05ea9bff0aaf4d53aa401c51526bb847accec56a
[ "MIT" ]
1
2021-01-14T17:39:18.000Z
2021-01-14T17:39:18.000Z
project_summarizer/__main__.py
jackdewinter/pyscan
05ea9bff0aaf4d53aa401c51526bb847accec56a
[ "MIT" ]
17
2020-08-15T23:27:28.000Z
2022-02-20T18:23:49.000Z
project_summarizer/__main__.py
jackdewinter/pyscan
05ea9bff0aaf4d53aa401c51526bb847accec56a
[ "MIT" ]
null
null
null
""" Module to provide for "-m project_summarizer" access to the module, as if it was run from the console. """ import project_summarizer def main(): """ Main entry point. Exposed in this manner so that the setup entry_points configuration has something to execute. """ project_summarizer.ProjectSu...
21
67
0.701058
""" Module to provide for "-m project_summarizer" access to the module, as if it was run from the console. """ import project_summarizer def main(): """ Main entry point. Exposed in this manner so that the setup entry_points configuration has something to execute. """ project_summarizer.ProjectSu...
0
0
0
0
0
0
0
0
0
ca88939b873d30889c8ab1eb22c81b8ae87e1875
18,742
py
Python
notebooks/example_utils.py
neonithinar/hexagdly
dcd15bfb7bdabb4f6280f0598f2cf0b923924a81
[ "MIT" ]
67
2018-02-10T13:54:16.000Z
2022-01-31T05:41:40.000Z
notebooks/example_utils.py
neonithinar/hexagdly
dcd15bfb7bdabb4f6280f0598f2cf0b923924a81
[ "MIT" ]
4
2018-02-21T16:28:38.000Z
2020-05-02T17:01:01.000Z
notebooks/example_utils.py
neonithinar/hexagdly
dcd15bfb7bdabb4f6280f0598f2cf0b923924a81
[ "MIT" ]
17
2018-05-25T12:30:19.000Z
2021-07-19T05:48:47.000Z
""" HexagDLy utilities for illustrative examples. """ import torch import torch.nn as nn import torch.optim as optim ###################################################################
35.699048
112
0.505336
""" HexagDLy utilities for illustrative examples. """ import numpy as np import numpy.linalg as LA from scipy.interpolate import griddata import torch import torch.utils.data import torch.nn as nn import torch.optim as optim from torch.autograd import Variable import torch.nn.functional as F import torch.optim.lr_sc...
0
0
0
17,662
0
471
0
55
359
ec341a894798ee4489508adfa9e19d8e1399afde
653
py
Python
Practice/Mo's Algo_1.py
rajansh87/Algorithms-Implementations
1f3dd1bc2decf10638fe0fdeeede47a650a9057b
[ "MIT" ]
1
2020-05-10T19:01:51.000Z
2020-05-10T19:01:51.000Z
Practice/Mo's Algo_1.py
rajansh87/Algorithms-Implementations
1f3dd1bc2decf10638fe0fdeeede47a650a9057b
[ "MIT" ]
9
2021-03-17T18:10:18.000Z
2021-03-29T19:35:06.000Z
Practice/Mo's Algo_1.py
rajansh87/Data-Structures-and-Algorithms-Implementations
0529079fbcd4d1a047210e9f2ff42c194c0818fe
[ "MIT" ]
null
null
null
# sum of elements in given range arr=list(map(int,input().split())) m=int(input("query size: ")) query=[] for i in range(m): l,r=map(int,input().split()) query.append([l,r]) query.sort(key=lambda x:x[1]) curL,curR,curS=0,0,0 for i in range(len(query)): l,r=query[i] while curL<l: #move to right ...
21.064516
39
0.529862
# sum of elements in given range arr=list(map(int,input().split())) m=int(input("query size: ")) query=[] for i in range(m): l,r=map(int,input().split()) query.append([l,r]) query.sort(key=lambda x:x[1]) curL,curR,curS=0,0,0 for i in range(len(query)): l,r=query[i] while curL<l: #move to right ...
0
0
0
0
0
0
0
0
0
cee5f59982d776bc1eb45cd99f5023af14e334bd
3,787
py
Python
wandbox/__nim__.py
srz-zumix/wandbox-api
009a5080f8b10068c203dce0b625dd9b38d9b046
[ "MIT" ]
6
2017-03-16T15:09:08.000Z
2022-01-11T02:19:36.000Z
wandbox/__nim__.py
srz-zumix/wandbox-api
009a5080f8b10068c203dce0b625dd9b38d9b046
[ "MIT" ]
30
2020-04-20T12:21:28.000Z
2022-01-23T13:58:57.000Z
wandbox/__nim__.py
srz-zumix/wandbox-api
009a5080f8b10068c203dce0b625dd9b38d9b046
[ "MIT" ]
2
2020-04-20T13:28:38.000Z
2020-05-30T11:26:02.000Z
if __name__ == '__main__': main()
34.743119
109
0.581991
import re import os from .cli import CLI from .runner import Runner from .__cxx__ import CxxRunner class NimRunner(Runner): IMPORT_REGEX = re.compile(r'^\s*import\s*(.*?)(\s*except\s*.*|)$') FROM_IMPORT_REGEX = re.compile(r'^\s*from\s*(\S*?)\s*import\s*(.*?)$') C_PROC_REGEX = re.compile(r'^\s*proc.*{.*\...
0
0
0
3,504
0
47
0
-11
203
5ffc09ccc88b108f92c7dd0b1f9a1a5c812f7d30
3,861
py
Python
src/bitpay/models/subscription/subscription.py
ppatidar2021/python-bitpay-client
b0bd6ef6f2ce2950fb42e6583113e225639a4340
[ "MIT" ]
3
2022-01-24T17:02:22.000Z
2022-03-10T00:57:20.000Z
src/bitpay/models/subscription/subscription.py
ppatidar2021/python-bitpay-client
b0bd6ef6f2ce2950fb42e6583113e225639a4340
[ "MIT" ]
1
2022-03-08T03:11:09.000Z
2022-03-09T12:51:13.000Z
src/bitpay/models/subscription/subscription.py
ppatidar2021/python-bitpay-client
b0bd6ef6f2ce2950fb42e6583113e225639a4340
[ "MIT" ]
3
2021-12-24T05:57:33.000Z
2022-03-14T09:17:40.000Z
""" Subscription: Subscriptions are repeat billing agreements with specific buyers. BitPay sends bill emails to buyers identified in active subscriptions according to the specified schedule. """
24.75
85
0.532246
""" Subscription: Subscriptions are repeat billing agreements with specific buyers. BitPay sends bill emails to buyers identified in active subscriptions according to the specified schedule. """ from .bill_data import BillData from ...utils.key_utils import change_camel_case_to_snake_case class Subscription: """ ...
0
0
0
3,547
0
0
0
51
67
6a95395d3565ef2d706e106a3ada8672c0593121
541
py
Python
python/ember/__init__.py
BangShiuh/ember
f0a70c7e01ae0dd7b5bd5ee70c8fc5d3f7207388
[ "MIT" ]
27
2016-11-22T08:29:48.000Z
2021-12-01T12:15:39.000Z
python/ember/__init__.py
minhbau/ember
f0a70c7e01ae0dd7b5bd5ee70c8fc5d3f7207388
[ "MIT" ]
11
2015-02-12T14:12:33.000Z
2021-04-15T15:53:03.000Z
python/ember/__init__.py
minhbau/ember
f0a70c7e01ae0dd7b5bd5ee70c8fc5d3f7207388
[ "MIT" ]
20
2016-05-15T04:51:36.000Z
2022-01-26T09:07:35.000Z
import os.path as _path import cantera from . import _ember __version__ = '1.4.0' # Add Ember's data file directory to Cantera's search path. Because the Python # module is statically linked to Cantera, this needs to be done separately for # each of the two copies of the Cantera library that have been loaded. _datap...
30.055556
78
0.778189
import os.path as _path import cantera from ._ember import * from . import _ember from .input import * from .output import * from . import utils __version__ = '1.4.0' # Add Ember's data file directory to Cantera's search path. Because the Python # module is statically linked to Cantera, this needs to be done separat...
0
0
0
0
0
0
0
-3
88
8caed7bdf72c8d9b1fb3c833bc36f023ba4a193a
2,728
py
Python
slider-agent/src/test/python/agent/TestShell.py
pramodthangali/incubator-slider
8434b8971af93fe316e4b4c9f6d4a2a917caedd0
[ "Apache-2.0" ]
1
2019-01-18T21:00:19.000Z
2019-01-18T21:00:19.000Z
slider-agent/src/test/python/agent/TestShell.py
pramodthangali/incubator-slider
8434b8971af93fe316e4b4c9f6d4a2a917caedd0
[ "Apache-2.0" ]
null
null
null
slider-agent/src/test/python/agent/TestShell.py
pramodthangali/incubator-slider
8434b8971af93fe316e4b4c9f6d4a2a917caedd0
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' 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 licenses this file to you under the Apache License, Ver...
35.894737
107
0.728739
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' 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 licenses this file to you under the Apache License, Ver...
0
0
0
1,693
0
0
0
2
222
fe878e67227214f872037684567ed0df2357ce71
832
py
Python
setup.py
rec/recs
24d545cfa12129dc6c413f0defad08bac6f5ff14
[ "MIT" ]
2
2019-05-26T15:09:37.000Z
2019-06-15T10:18:45.000Z
setup.py
rec/recs
24d545cfa12129dc6c413f0defad08bac6f5ff14
[ "MIT" ]
null
null
null
setup.py
rec/recs
24d545cfa12129dc6c413f0defad08bac6f5ff14
[ "MIT" ]
null
null
null
from setuptools import setup import recs _classifiers = [ 'Development Status :: 4 - Beta', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', ...
29.714286
65
0.627404
from setuptools import setup import recs _classifiers = [ 'Development Status :: 4 - Beta', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', ...
0
0
0
0
0
0
0
0
0
f34a5b2defe52a683dcc06d84294c96ea1da392b
481
py
Python
AuthTest/CustomMiddleModule.py
zhangjiang1203/AuthModuleModel
04a8ebcba131643595127c254098bc4cfd14dea8
[ "MIT" ]
null
null
null
AuthTest/CustomMiddleModule.py
zhangjiang1203/AuthModuleModel
04a8ebcba131643595127c254098bc4cfd14dea8
[ "MIT" ]
null
null
null
AuthTest/CustomMiddleModule.py
zhangjiang1203/AuthModuleModel
04a8ebcba131643595127c254098bc4cfd14dea8
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2019-06-18 14:00 # @Author : # @Site : # @File : CustomMiddleModule.py # @Software: PyCharm # #
24.05
52
0.683992
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2019-06-18 14:00 # @Author : 张江 # @Site : # @File : CustomMiddleModule.py # @Software: PyCharm #添加自己的中间件 from django.utils.deprecation import MiddlewareMixin # 可以在中间件中添加用户认证和登录设置等信息 class CustomMiddle(MiddlewareMixin): def process_request(self, r...
141
0
0
192
0
0
0
31
45
719a7ec92140a49dcb3ff7ab37cd2451db2334c9
439
py
Python
scripts/getLabelsForConceptUris.py
TobiasNx/fix-FunctionalReview-Testing
6169332db22224ec64b6c3fe4ea4b31fa6a4c5c8
[ "MIT" ]
null
null
null
scripts/getLabelsForConceptUris.py
TobiasNx/fix-FunctionalReview-Testing
6169332db22224ec64b6c3fe4ea4b31fa6a4c5c8
[ "MIT" ]
null
null
null
scripts/getLabelsForConceptUris.py
TobiasNx/fix-FunctionalReview-Testing
6169332db22224ec64b6c3fe4ea4b31fa6a4c5c8
[ "MIT" ]
null
null
null
import requests filepath = '../data/maps/edusharing-subject-mapping.tsv' input = open(filepath).readlines() for row in input: if "https" in row: uri = row.split('\t')[1].rstrip() label = requests.get(uri, headers={"accept":"application/json"}).json()['prefLabel']['de'].encode('utf-8').strip() ...
33.769231
122
0.605923
import requests import json filepath = '../data/maps/edusharing-subject-mapping.tsv' input = open(filepath).readlines() for row in input: if "https" in row: uri = row.split('\t')[1].rstrip() label = requests.get(uri, headers={"accept":"application/json"}).json()['prefLabel']['de'].encode('utf-8')...
0
0
0
0
0
0
0
-10
22
136545fce3e8cecf2001e7bdbd83ade947e69365
245
py
Python
7kyu/check_for_prime_numbers.py
nhsz/codewars
82703959e910254d6feff4162f78c6dbd7a1c3ed
[ "MIT" ]
1
2018-12-02T23:04:38.000Z
2018-12-02T23:04:38.000Z
7kyu/check_for_prime_numbers.py
nhsz/codewars
82703959e910254d6feff4162f78c6dbd7a1c3ed
[ "MIT" ]
null
null
null
7kyu/check_for_prime_numbers.py
nhsz/codewars
82703959e910254d6feff4162f78c6dbd7a1c3ed
[ "MIT" ]
null
null
null
# http://www.codewars.com/kata/53daa9e5af55c184db00025f/
22.272727
56
0.522449
# http://www.codewars.com/kata/53daa9e5af55c184db00025f/ def is_prime(n): if n <= 1: return False else: for div in xrange(2, n): if n % div == 0 and n != div: return False return True
0
0
0
0
0
165
0
0
23
a486d371c1af152079a6a939561c7002483891ad
149
py
Python
demo/test.py
aravindhk/Vides
65d9ea9764ddf5f6ef40e869bd31387d0e3e378f
[ "BSD-4-Clause" ]
2
2021-11-03T17:24:24.000Z
2021-12-02T06:06:50.000Z
demo/test.py
aravindhk/Vides
65d9ea9764ddf5f6ef40e869bd31387d0e3e378f
[ "BSD-4-Clause" ]
null
null
null
demo/test.py
aravindhk/Vides
65d9ea9764ddf5f6ef40e869bd31387d0e3e378f
[ "BSD-4-Clause" ]
null
null
null
from numpy import genfromtxt fi = genfromtxt("./datiout_idvds/idvds.out", delimiter = ' ') plot(fi[:,0],fi[:,1]) show()
24.833333
61
0.704698
from NanoTCAD_ViDES import * from numpy import genfromtxt fi = genfromtxt("./datiout_idvds/idvds.out", delimiter = ' ') plot(fi[:,0],fi[:,1]) show()
0
0
0
0
0
0
0
7
22
e765fb3f3635f387b5b8188b7acfcdc41c6bffec
894
py
Python
test/test_substitution.py
corneliusroemer/pyro-cov
54e89d128293f9ff9e995c442f72fa73f5f99b76
[ "Apache-2.0" ]
22
2021-09-14T04:33:11.000Z
2022-02-01T21:33:05.000Z
test/test_substitution.py
corneliusroemer/pyro-cov
54e89d128293f9ff9e995c442f72fa73f5f99b76
[ "Apache-2.0" ]
7
2021-11-02T13:48:35.000Z
2022-03-23T18:08:35.000Z
test/test_substitution.py
corneliusroemer/pyro-cov
54e89d128293f9ff9e995c442f72fa73f5f99b76
[ "Apache-2.0" ]
6
2021-09-18T01:06:51.000Z
2022-01-10T02:22:06.000Z
# Copyright Contributors to the Pyro-Cov project. # SPDX-License-Identifier: Apache-2.0 import pyro.poutine as poutine
29.8
77
0.694631
# Copyright Contributors to the Pyro-Cov project. # SPDX-License-Identifier: Apache-2.0 import pyro.poutine as poutine import pytest import torch from pyro.infer.autoguide import AutoDelta from pyrocov.substitution import GeneralizedTimeReversible, JukesCantor69 @pytest.mark.parametrize("Model", [JukesCantor69, Gen...
0
605
0
0
0
0
0
56
112
4542387fbb3b4014a1c19c862b65107f76ff164c
6,667
py
Python
range_repair.py
hancockks/cassandra_range_repair
14e21826cd43e0df15e8f7f9d3e8842f5339bda8
[ "MIT" ]
null
null
null
range_repair.py
hancockks/cassandra_range_repair
14e21826cd43e0df15e8f7f9d3e8842f5339bda8
[ "MIT" ]
null
null
null
range_repair.py
hancockks/cassandra_range_repair
14e21826cd43e0df15e8f7f9d3e8842f5339bda8
[ "MIT" ]
null
null
null
#!/usr/bin/env python #def lrange(num1, num2 = None, step = 1, format = format_murmur): # offset = 0 if format == format_md5 else 2**63 # max = 2**127-1 if format == format_md5 else 2**63-1 # wrap = 2**128 if format == format_md5 else 2**64 # # print "%d %d" % (num1+offset, num2+offset) # while (num1 + ...
29.763393
161
0.612719
#!/usr/bin/env python import operator import optparse import os import re import subprocess import sys import datetime def format_murmur(i): return "%020d" % i def format_md5(i): return "%039d" % i #def lrange(num1, num2 = None, step = 1, format = format_murmur): # offset = 0 if format == format_md5 else ...
0
0
0
0
589
4,373
0
-57
538
d1e472cf17de0fbe8a6a5b4389fb7607c0ac78a1
225
py
Python
room/admin.py
iver56/useat-api
f0f241c584cbb05990ee4afb5bb1b2fd6d5fdb44
[ "MIT" ]
null
null
null
room/admin.py
iver56/useat-api
f0f241c584cbb05990ee4afb5bb1b2fd6d5fdb44
[ "MIT" ]
null
null
null
room/admin.py
iver56/useat-api
f0f241c584cbb05990ee4afb5bb1b2fd6d5fdb44
[ "MIT" ]
null
null
null
from django.contrib.gis import admin from .models import Room admin.site.register(Room, RoomAdmin)
18.75
36
0.76
from django.contrib.gis import admin from .models import Room class RoomAdmin(admin.OSMGeoAdmin): default_lon = 1157108.48900 default_lat = 9205549.12020 default_zoom = 12 admin.site.register(Room, RoomAdmin)
0
0
0
100
0
0
0
0
23
afb6d94d3d73198348ac427a1fcadd42592842ca
1,843
py
Python
src/surface.py
BozeBro/Snake-Game-and-two-player
13989418ff92d9e5cc0e218b75cd8bd1ed1ca591
[ "MIT" ]
null
null
null
src/surface.py
BozeBro/Snake-Game-and-two-player
13989418ff92d9e5cc0e218b75cd8bd1ed1ca591
[ "MIT" ]
null
null
null
src/surface.py
BozeBro/Snake-Game-and-two-player
13989418ff92d9e5cc0e218b75cd8bd1ed1ca591
[ "MIT" ]
null
null
null
import pygame if __name__ == "__main__": # Test for creation of the screen pygame.init() surface = Surface(color=WHITE) surface.make_screen() pygame.display.flip() running = True while running: for event in pygame.event.get(): if event.type == pygame.QUIT: ...
29.725806
82
0.600651
import pygame from colors import * class Surface: """ Handles functions that interact with the screen including: drawing to the screen creating the screen """ def __init__( self, rows=17, columns=17, blocksize=20, caption="Snake Game", color=WHITE ): """ :param: ...
0
0
0
1,460
0
0
0
-1
45
a20e5233d64cfa59b698bedc530b40a510125ce8
3,311
py
Python
Course 2: Python Data Structures/Week 1 (Strings)/String-Comparisons.py
kunal5042/Python-for-Everybody
ed702f92c963a467ffb682f171ba0bbb1b571726
[ "MIT" ]
null
null
null
Course 2: Python Data Structures/Week 1 (Strings)/String-Comparisons.py
kunal5042/Python-for-Everybody
ed702f92c963a467ffb682f171ba0bbb1b571726
[ "MIT" ]
null
null
null
Course 2: Python Data Structures/Week 1 (Strings)/String-Comparisons.py
kunal5042/Python-for-Everybody
ed702f92c963a467ffb682f171ba0bbb1b571726
[ "MIT" ]
null
null
null
stringVar1 = "190905042" stringVar2 = "5042" stringVar3 = "Kunal" stringVar4 = "Wadhwa" stringVar5 = "abc" stringVar = ["Kunal", "Tanya", "Olivia", "5042", "123"] WeightOfArrayOfStrings(stringVar) MaximumAndMinimum_Value_Of_Strings(stringVar) stringVar = ["AAA", "BBB", "CCC", "DDD"] WeightOfArrayOfStrings(stringVa...
30.657407
133
0.652371
stringVar1 = "190905042" stringVar2 = "5042" stringVar3 = "Kunal" stringVar4 = "Wadhwa" stringVar5 = "abc" def WeightOfString(stringVar): total = 0 for character in stringVar: total += int(ord(character)) return total def WeightOfArrayOfStrings(stringArrayVar): count = -1 for string in str...
0
0
0
0
0
1,127
0
0
69
1980deaa8c57e0c5df32e9054d7ffab90bfae55b
83,912
py
Python
privex/helpers/net/socket.py
Privex/python-helpers
1c976ce5b0e2c5241ea0bdf330bd6701b5e31153
[ "X11" ]
12
2019-06-18T11:17:41.000Z
2021-09-13T23:00:21.000Z
privex/helpers/net/socket.py
Privex/python-helpers
1c976ce5b0e2c5241ea0bdf330bd6701b5e31153
[ "X11" ]
1
2019-10-13T07:34:44.000Z
2019-10-13T07:34:44.000Z
privex/helpers/net/socket.py
Privex/python-helpers
1c976ce5b0e2c5241ea0bdf330bd6701b5e31153
[ "X11" ]
4
2019-10-10T10:15:09.000Z
2021-05-16T01:55:48.000Z
""" Various wrapper functions/classes which use :mod:`socket` or are strongly tied to functions in this file which use :mod:`socket`. Part of :mod:`privex.helpers.net` - network related helper code. **Copyright**:: +===================================================+ | 2019 Privex In...
46.695604
140
0.603859
""" Various wrapper functions/classes which use :mod:`socket` or are strongly tied to functions in this file which use :mod:`socket`. Part of :mod:`privex.helpers.net` - network related helper code. **Copyright**:: +===================================================+ | © 2019 Privex I...
2
34,325
11,827
25,708
0
246
0
241
408
f0a3f804aa451fdb3b34d8b44bce2b427e244b53
324
py
Python
ch5/fibonacci.first.py
ldmcdaniel/learning_python
63717c397cd75e45a8aef909d4b601466cd6036a
[ "MIT" ]
30
2016-10-28T18:14:15.000Z
2021-08-29T15:20:56.000Z
ch5/fibonacci.first.py
ldmcdaniel/learning_python
63717c397cd75e45a8aef909d4b601466cd6036a
[ "MIT" ]
null
null
null
ch5/fibonacci.first.py
ldmcdaniel/learning_python
63717c397cd75e45a8aef909d4b601466cd6036a
[ "MIT" ]
31
2016-09-10T22:47:12.000Z
2022-03-13T04:50:35.000Z
def fibonacci(N): """Return all fibonacci numbers up to N. """ result = [0] next_n = 1 while next_n <= N: result.append(next_n) next_n = sum(result[-2:]) return result print(fibonacci(0)) # [0] print(fibonacci(1)) # [0, 1, 1] print(fibonacci(50)) # [0, 1, 1, 2, 3, 5, 8, 13, 21, ...
23.142857
57
0.549383
def fibonacci(N): """Return all fibonacci numbers up to N. """ result = [0] next_n = 1 while next_n <= N: result.append(next_n) next_n = sum(result[-2:]) return result print(fibonacci(0)) # [0] print(fibonacci(1)) # [0, 1, 1] print(fibonacci(50)) # [0, 1, 1, 2, 3, 5, 8, 13, 21, ...
0
0
0
0
0
0
0
0
0
09743b8d5ae4a032a89d80ec7947cf104ae4dd31
5,751
py
Python
robot_ws/src/cloudwatch_robot/launch/monitoring.launch.py
husarion/aws-robomaker-sample-application-cloudwatch
9a381009aca558e65c03077965a349fb93c59d99
[ "MIT-0" ]
null
null
null
robot_ws/src/cloudwatch_robot/launch/monitoring.launch.py
husarion/aws-robomaker-sample-application-cloudwatch
9a381009aca558e65c03077965a349fb93c59d99
[ "MIT-0" ]
null
null
null
robot_ws/src/cloudwatch_robot/launch/monitoring.launch.py
husarion/aws-robomaker-sample-application-cloudwatch
9a381009aca558e65c03077965a349fb93c59d99
[ "MIT-0" ]
1
2022-03-04T10:36:17.000Z
2022-03-04T10:36:17.000Z
if __name__ == '__main__': generate_launch_description()
47.139344
141
0.677621
import os import sys import yaml import launch import launch_ros.actions from launch.conditions import IfCondition from launch.substitutions import LaunchConfiguration from launch.substitutions import PythonExpression from ament_index_python.packages import get_package_share_directory def generate_launch_description...
0
0
0
0
0
5,377
0
88
222
67e5af01030aade7fd237d0de541c611aee0fcd3
1,165
py
Python
lambdata_jpalex/__init__.py
extrajp2014/lambdata
bbe126516533ebe334c2b9f3bdc8dfa0bd1755be
[ "MIT" ]
null
null
null
lambdata_jpalex/__init__.py
extrajp2014/lambdata
bbe126516533ebe334c2b9f3bdc8dfa0bd1755be
[ "MIT" ]
null
null
null
lambdata_jpalex/__init__.py
extrajp2014/lambdata
bbe126516533ebe334c2b9f3bdc8dfa0bd1755be
[ "MIT" ]
null
null
null
test = Statistic().stdev() print(test)
26.477273
66
0.571674
import numpy as np class Statistic: """ Contains statistic functions helper """ def __init__(self, numbers = [1,2], confidence=0.95): """ numbers = array of numbers confidence = confidence interval, default is 95% """ self.numbers = numbers self.confidenc...
0
0
0
1,082
0
0
0
-3
45
4fd062e0af2520762bf197fa4024a682543bf356
9,754
py
Python
backend/celery/api.py
OriHoch/wikimedia-crosswatch
05b009cfd9e17eb0e252d37c8a22a93cade5c6a4
[ "ISC" ]
null
null
null
backend/celery/api.py
OriHoch/wikimedia-crosswatch
05b009cfd9e17eb0e252d37c8a22a93cade5c6a4
[ "ISC" ]
null
null
null
backend/celery/api.py
OriHoch/wikimedia-crosswatch
05b009cfd9e17eb0e252d37c8a22a93cade5c6a4
[ "ISC" ]
null
null
null
# -*- coding: utf-8 -*- # ISC License # Copyright (C) 2015 Jan Lebert from __future__ import absolute_import from __future__ import unicode_literals from .. import config
34.224561
78
0.554849
# -*- coding: utf-8 -*- # ISC License # Copyright (C) 2015 Jan Lebert from __future__ import absolute_import from __future__ import unicode_literals from collections import namedtuple import requests from requests_oauthlib import OAuth1 from redis import StrictRedis import json from datetime import datetime, timedelta...
16
302
0
8,969
0
0
0
81
223
e38cacb5a536701b8b88de3d26c0ae5970c260cf
26,511
py
Python
summarize_from_feedback/query_response_model.py
lumaway/summarize-from-feedback
065ea4e1607a5822a3d78cc13a8cec63a2919c1b
[ "MIT" ]
365
2020-09-04T15:50:14.000Z
2022-03-31T04:54:32.000Z
summarize_from_feedback/query_response_model.py
ArturTtoptal/summarize-from-feedback
56b6bb613a1b58a8aa7a5e29266f65c7b980ee48
[ "CC-BY-4.0" ]
14
2020-09-06T14:52:29.000Z
2022-02-18T08:05:06.000Z
summarize_from_feedback/query_response_model.py
ArturTtoptal/summarize-from-feedback
56b6bb613a1b58a8aa7a5e29266f65c7b980ee48
[ "CC-BY-4.0" ]
60
2020-09-04T16:33:48.000Z
2022-01-28T19:01:42.000Z
import json import os import re import shutil import uuid from typing import Optional, Set, Dict import blobfile as bf import numpy as np import torch from summarize_from_feedback.model_layout import ModelLayout from summarize_from_feedback.models.transformer import Hyperparams from summarize_from_feedback.utils impor...
37.711238
165
0.629097
import json import os import re import shutil import uuid from dataclasses import dataclass, field from typing import Callable, Optional, Set, List, Dict import blobfile as bf import numpy as np import torch from mpi4py import MPI import summarize_from_feedback from summarize_from_feedback.model_layout import ModelLa...
0
1,353
0
10,581
0
6,086
0
384
569
fe6f53a11a4ce63e0af56938460e2f1d561c2562
384
py
Python
ReverseInteger.py
FreeBirdsCrew/Main_Branch
1e544b04b414e183db4e52d194732f6b0c9ec90e
[ "MIT" ]
null
null
null
ReverseInteger.py
FreeBirdsCrew/Main_Branch
1e544b04b414e183db4e52d194732f6b0c9ec90e
[ "MIT" ]
null
null
null
ReverseInteger.py
FreeBirdsCrew/Main_Branch
1e544b04b414e183db4e52d194732f6b0c9ec90e
[ "MIT" ]
null
null
null
print("123","10")
25.6
96
0.432292
def addStrings(self, num1: str, num2: str) -> str: m = max(len(num1),len(num2)) ret = '' c = 0 for i in range (-1,-(m+1),-1) : x = int(num1[i] if i >= -len(num1) else 0) + int(num2[i] if i >= -len(num2) else 0) + c d = x%10 c = x//10 ret += (str(d)) if c > 0 ...
0
0
0
0
0
340
0
0
23
9274a980711b4760f2ec48ff3702850203e8a7b7
11,035
py
Python
.dev_scripts/benchmark_regression/2-benchmark_test.py
YuxinZou/mmclassification
2037260ea6c98a3b115e97727e1151a1c2c32f7a
[ "Apache-2.0" ]
1
2022-03-15T07:36:04.000Z
2022-03-15T07:36:04.000Z
.dev_scripts/benchmark_regression/2-benchmark_test.py
YuxinZou/mmclassification
2037260ea6c98a3b115e97727e1151a1c2c32f7a
[ "Apache-2.0" ]
null
null
null
.dev_scripts/benchmark_regression/2-benchmark_test.py
YuxinZou/mmclassification
2037260ea6c98a3b115e97727e1151a1c2c32f7a
[ "Apache-2.0" ]
1
2022-03-25T08:40:07.000Z
2022-03-25T08:40:07.000Z
from pathlib import Path from rich.console import Console console = Console() MMCLS_ROOT = Path(__file__).absolute().parents[2] METRICS_MAP = { 'Top 1 Accuracy': 'accuracy_top-1', 'Top 5 Accuracy': 'accuracy_top-5' } if __name__ == '__main__': main()
32.647929
79
0.587676
import argparse import os import os.path as osp import pickle import re from collections import OrderedDict from datetime import datetime from pathlib import Path from modelindex.load_model_index import load from rich.console import Console from rich.syntax import Syntax from rich.table import Table console = Console...
0
0
0
0
0
10,357
0
23
382
1805f9763921ac17e4ac881bbcb1fd731b7b9306
27,477
py
Python
fserve.py
Sultaneous/fbomb
f933d46ecb60b365e4bb450cb0a5a3e9fcf8c33d
[ "MIT" ]
null
null
null
fserve.py
Sultaneous/fbomb
f933d46ecb60b365e4bb450cb0a5a3e9fcf8c33d
[ "MIT" ]
null
null
null
fserve.py
Sultaneous/fbomb
f933d46ecb60b365e4bb450cb0a5a3e9fcf8c33d
[ "MIT" ]
null
null
null
#!/usr/bin/python #"fserve" by Karim Sultan, September 2020 # fsend is a server (receiver) for the FBomb Protocol # It communicates with a client (fsend) to transfer a file. # This protocol makes it easy to drop f-bombs across machines. # # This design handles a single connection at a time but accepts # backlogs. It i...
36.201581
134
0.617571
#!/usr/bin/python #"fserve" by Karim Sultan, September 2020 # fsend is a server (receiver) for the FBomb Protocol # It communicates with a client (fsend) to transfer a file. # This protocol makes it easy to drop f-bombs across machines. # # This design handles a single connection at a time but accepts # backlogs. It i...
0
0
0
1,686
0
15,905
0
-6
727
775653550cc66599795db34a5459f32d60012a36
3,161
py
Python
scripts/insertfile.py
hakuya/higu
42effd9b1a5d55bfbbc20d857b070e7b703154b3
[ "BSD-2-Clause" ]
null
null
null
scripts/insertfile.py
hakuya/higu
42effd9b1a5d55bfbbc20d857b070e7b703154b3
[ "BSD-2-Clause" ]
2
2015-11-09T01:23:30.000Z
2017-02-06T06:36:41.000Z
scripts/insertfile.py
hakuya/higu
42effd9b1a5d55bfbbc20d857b070e7b703154b3
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/python import sys import logging log = logging.getLogger( __name__ ) logging.basicConfig() import hdbfs import higu.config MAX_TEXT_LEN = 2**18 if( __name__ == '__main__' ): import optparse parser = optparse.OptionParser( usage = 'Usage: %prog [options] files...' ) parser.add_option( '-c'...
29.542056
87
0.597912
#!/usr/bin/python import sys import os import logging log = logging.getLogger( __name__ ) logging.basicConfig() import hdbfs import higu.config MAX_TEXT_LEN = 2**18 def create_album( name, text, tags ): album = h.create_album() if( name is not None ): album.add_name( name ) if( text is not N...
0
0
0
0
0
230
0
-12
45
09d48716c35ce56a4cefc285681818b94df72bef
18,035
py
Python
tests/test_alias.py
cameron/datahog
815178ae576bc4b4e1994ca9fcdc0c1f854bfccf
[ "BSD-3-Clause" ]
4
2015-09-09T23:05:39.000Z
2016-10-20T15:24:58.000Z
tests/test_alias.py
cameron/datahog
815178ae576bc4b4e1994ca9fcdc0c1f854bfccf
[ "BSD-3-Clause" ]
null
null
null
tests/test_alias.py
cameron/datahog
815178ae576bc4b4e1994ca9fcdc0c1f854bfccf
[ "BSD-3-Clause" ]
null
null
null
# vim: fileencoding=utf8:et:sw=4:ts=8:sts=4 import os import sys import unittest sys.path.append(os.path.dirname(os.path.abspath(__file__))) if __name__ == '__main__': unittest.main()
24.175603
79
0.522318
# vim: fileencoding=utf8:et:sw=4:ts=8:sts=4 import hashlib import hmac import os import sys import unittest import datahog from datahog import error import psycopg2 sys.path.append(os.path.dirname(os.path.abspath(__file__))) import base from pgmock import * class AliasTests(base.TestCase): def setUp(self): ...
0
82
0
17,618
0
0
0
-37
180
c5b3ed774afd9eff5e1c28fcc842ea52c7084590
3,031
py
Python
LCAnumpy/lca.py
asudeeaydin/LCAversions
dd4c8abfabc45ac8af61647e48d8b115042af4fb
[ "MIT" ]
null
null
null
LCAnumpy/lca.py
asudeeaydin/LCAversions
dd4c8abfabc45ac8af61647e48d8b115042af4fb
[ "MIT" ]
null
null
null
LCAnumpy/lca.py
asudeeaydin/LCAversions
dd4c8abfabc45ac8af61647e48d8b115042af4fb
[ "MIT" ]
null
null
null
# # # Jesse Livezey 2014-04-19 # import numpy as np #Initialize settings for inference def infer(basis, stimuli, eta, lamb, nIter, adapt, coeffs=None, softThresh=0): """Infers sparse coefficients for dictionary elements when representing a stimulus using LCA algorithm. Args: basis: Dictionar...
39.881579
124
0.606071
# # # Jesse Livezey 2014-04-19 # import numpy as np #Initialize settings for inference def infer(basis, stimuli, eta, lamb, nIter, adapt, coeffs=None, softThresh=0): """Infers sparse coefficients for dictionary elements when representing a stimulus using LCA algorithm. Args: basis: Dictionar...
0
0
0
0
0
0
0
0
0
923e0b22ef247f6c85556ee41810da61a395384a
2,053
py
Python
wb/main/models/environment_model.py
apaniukov/workbench
2f2653ecfd0143d2d53e33ad84379f13443fdfaa
[ "Apache-2.0" ]
23
2022-03-17T12:24:09.000Z
2022-03-31T09:13:30.000Z
wb/main/models/environment_model.py
apaniukov/workbench
2f2653ecfd0143d2d53e33ad84379f13443fdfaa
[ "Apache-2.0" ]
18
2022-03-21T08:17:44.000Z
2022-03-30T12:42:30.000Z
wb/main/models/environment_model.py
apaniukov/workbench
2f2653ecfd0143d2d53e33ad84379f13443fdfaa
[ "Apache-2.0" ]
16
2022-03-17T12:24:14.000Z
2022-03-31T12:15:12.000Z
""" OpenVINO DL Workbench Class for ORM model described a Environment Copyright (c) 2021 Intel Corporation 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...
32.078125
99
0.717487
""" OpenVINO DL Workbench Class for ORM model described a Environment Copyright (c) 2021 Intel Corporation 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...
0
207
0
929
0
0
0
111
157
0e14fd906390d882a01ca62e4572286ae93a57c5
896
py
Python
test.py
nuukedo29/mifs
5a52cc456a95a3560a4d308d0d4cfde6231c531a
[ "Unlicense" ]
18
2020-02-25T23:36:20.000Z
2022-01-22T00:52:58.000Z
test.py
nuukedo29/mifs
5a52cc456a95a3560a4d308d0d4cfde6231c531a
[ "Unlicense" ]
5
2020-03-24T19:45:06.000Z
2021-09-03T14:39:22.000Z
test.py
nuukedo29/mifs
5a52cc456a95a3560a4d308d0d4cfde6231c531a
[ "Unlicense" ]
1
2020-05-29T23:34:25.000Z
2020-05-29T23:34:25.000Z
import os import glob import re if __name__ == "__main__": glob_remove("_test/*_mifs.*") for file in glob.glob("_test/*"): glob_remove("_test/*_mifs.*") output = run(f'py mifs.py "{file}"') filename, extension = os.path.splitext(os.path.basename(file)) output_file = glob.glob(f'_test/*_mifs.*')[0] size...
28
132
0.677455
import os import glob import subprocess import re def run(command): return subprocess.Popen( command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True, encoding="utf8" ).stdout.read() def glob_remove(pattern): for file in glob.glob(pattern): os.remove(file) if __name__ =...
0
0
0
0
0
208
0
-4
68
ef7de3adb0d7c1e4243288d966644861df8a7b96
7,040
py
Python
drf_firebase_token_auth/authentication.py
ronhe/drf-firebase-token-auth
c696569be5afd307a8d8ede75e1a64b099c568cf
[ "MIT" ]
9
2020-10-11T14:11:43.000Z
2022-03-24T19:25:33.000Z
drf_firebase_token_auth/authentication.py
Arka-cell/drf-firebase-token-auth
061c074598a8cfbe3cea1405f8607c6e1a7a7e55
[ "MIT" ]
2
2021-03-04T15:20:35.000Z
2022-03-02T15:18:16.000Z
drf_firebase_token_auth/authentication.py
Arka-cell/drf-firebase-token-auth
061c074598a8cfbe3cea1405f8607c6e1a7a7e55
[ "MIT" ]
3
2021-03-03T20:26:39.000Z
2021-12-28T05:50:02.000Z
"""Firebase token authentication classes""" from django.contrib import auth FIREBASE_APP_NAME = 'drf_firebase_token_auth' _User = auth.get_user_model()
33.684211
84
0.608239
"""Firebase token authentication classes""" from typing import * from django.contrib import auth from django.utils import timezone from rest_framework import authentication, exceptions import firebase_admin from firebase_admin import auth as firebase_auth from .settings import api_settings from . import models FIRE...
3
1,503
0
5,119
0
0
0
82
179
28461ea07e161a5864fe9b05a35a864f7f0eb1c7
1,146
py
Python
NeuNorm/loader.py
ornlneutronimaging/normalization
e38b3023145e8c7af69d0854cc2ad27921f1b436
[ "BSD-3-Clause" ]
2
2022-03-16T02:15:37.000Z
2022-03-16T15:41:39.000Z
NeuNorm/loader.py
ornlneutronimaging/normalization
e38b3023145e8c7af69d0854cc2ad27921f1b436
[ "BSD-3-Clause" ]
7
2018-07-31T12:31:04.000Z
2022-03-15T20:11:03.000Z
NeuNorm/loader.py
ornlneutronimaging/normalization
e38b3023145e8c7af69d0854cc2ad27921f1b436
[ "BSD-3-Clause" ]
null
null
null
from astropy.io import fits import numpy as np from PIL import Image def load_hdf(file_name): '''load HDF image Parameters ---------- full file name of HDF5 file ''' hdf = h5py.File(path,'r')['entry']['data']['data'].value tmp = [] for iScan in hdf: tmp.append(iScan) re...
22.470588
66
0.56719
from pathlib import Path from astropy.io import fits import numpy as np from PIL import Image def load_hdf(file_name): '''load HDF image Parameters ---------- full file name of HDF5 file ''' hdf = h5py.File(path,'r')['entry']['data']['data'].value tmp = [] for iScan in hdf: ...
0
0
0
0
0
0
0
3
22
cb9d29cd627e2e3a9d520cd64506b7db86d79a2d
5,086
py
Python
Minimizing-Financial-Loss/scripts/xgboost_search.py
PaulAdams4361/Quantifying-the-World
d923f482941c8fd4269ff474125d509f591fd2d6
[ "MIT" ]
null
null
null
Minimizing-Financial-Loss/scripts/xgboost_search.py
PaulAdams4361/Quantifying-the-World
d923f482941c8fd4269ff474125d509f591fd2d6
[ "MIT" ]
null
null
null
Minimizing-Financial-Loss/scripts/xgboost_search.py
PaulAdams4361/Quantifying-the-World
d923f482941c8fd4269ff474125d509f591fd2d6
[ "MIT" ]
2
2020-12-12T16:01:23.000Z
2021-01-05T04:54:09.000Z
import warnings import pandas as pd import numpy as np from xgboost import XGBClassifier from sklearn.model_selection import train_test_split from sklearn.preprocessing import LabelEncoder from sklearn.impute import KNNImputer from sklearn.feature_selection import RFECV from sklearn.model_selection import Randomized...
30.45509
111
0.67381
import warnings import pandas as pd import numpy as np from scipy import stats import matplotlib.pyplot as plt import seaborn as sns from xgboost import XGBClassifier from sklearn.model_selection import train_test_split from sklearn.preprocessing import LabelEncoder from sklearn.impute import KNNImputer, SimpleImpu...
0
0
0
0
0
0
0
120
89
0a0fa115e7f6e6e42463efd615e422c2f9db3236
2,789
py
Python
manipularDadosCovid/ManDadosCovid/sistema.py
SkiereszDiego/Learning-Python
883f561ca5fc2eb4d4c74c7337d52c13e193db9f
[ "MIT" ]
null
null
null
manipularDadosCovid/ManDadosCovid/sistema.py
SkiereszDiego/Learning-Python
883f561ca5fc2eb4d4c74c7337d52c13e193db9f
[ "MIT" ]
null
null
null
manipularDadosCovid/ManDadosCovid/sistema.py
SkiereszDiego/Learning-Python
883f561ca5fc2eb4d4c74c7337d52c13e193db9f
[ "MIT" ]
null
null
null
import interface import arquivo from time import sleep #Ler os Arquivos txt. arquivo.carregarArqEst() arquivo.carregarArqCid() #Funcoes #Menu while True: resposta = interface.menu(['Finalizar o Programa', 'Cadastrar Estados', 'Cadastrar Cidades', 'Relatrio de Estados', 'Relatrio de Cidades',...
32.057471
176
0.603084
import interface import arquivo import classes from time import sleep #Ler os Arquivos txt. arquivo.carregarArqEst() arquivo.carregarArqCid() #Funcoes def cadastroDeEstado(): interface.cabecalho('Novo Estado') est = classes.Estado(input('Estado: '),input('Sigla: ')) a = False #bandeira ...
48
0
0
0
0
1,782
0
-7
146
38182b04869d458fec66bdda280dda46870fee4c
8,288
py
Python
hw3/code/A3a.py
bobbydyr/CSE546-Machine-Learning
c3f7e487b60506acfa7886d7cc64dfa61550ee4b
[ "MIT" ]
null
null
null
hw3/code/A3a.py
bobbydyr/CSE546-Machine-Learning
c3f7e487b60506acfa7886d7cc64dfa61550ee4b
[ "MIT" ]
null
null
null
hw3/code/A3a.py
bobbydyr/CSE546-Machine-Learning
c3f7e487b60506acfa7886d7cc64dfa61550ee4b
[ "MIT" ]
null
null
null
# A3.b1 import numpy as np import matplotlib.pyplot as plt n = 30 # np.random.seed(1) x = np.random.uniform(0,1,n) x_mean = np.mean(x) x_sd = np.std(x) # x = (x-x_mean) # x after standardization y = 4*np.sin(np.pi*x)*np.cos(6*np.pi*(x**2)) + np.random.standard_normal(n) # y = (y - x_mean) / x_sd error_validation_li...
37.165919
119
0.671573
# A3.b1 import numpy as np import matplotlib.pyplot as plt n = 30 # np.random.seed(1) x = np.random.uniform(0,1,n) x_mean = np.mean(x) x_sd = np.std(x) # x = (x-x_mean) # x after standardization y = 4*np.sin(np.pi*x)*np.cos(6*np.pi*(x**2)) + np.random.standard_normal(n) # y = (y - x_mean) / x_sd def k_poly(x, z, d):...
0
0
0
0
0
93
0
0
45
c0ac61a4e74441ae23403208689b3a59c5bea08f
6,745
py
Python
CI/machinery/mksenv.py
siconos/siconos-deb
2739a23f23d797dbfecec79d409e914e13c45c67
[ "Apache-2.0" ]
null
null
null
CI/machinery/mksenv.py
siconos/siconos-deb
2739a23f23d797dbfecec79d409e914e13c45c67
[ "Apache-2.0" ]
null
null
null
CI/machinery/mksenv.py
siconos/siconos-deb
2739a23f23d797dbfecec79d409e914e13c45c67
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # # Make software environment from a yml database. # import getopt import yaml import sys def get_entry(spec=None, distrib=None, distrib_version=None, pkg=None, section=None): """ Get one entry with precedence distrib with version > distrib > match distrib > wild...
24.70696
78
0.540549
#!/usr/bin/env python # # Make software environment from a yml database. # import getopt import yaml import sys import shlex def usage(): print(""" {0} [--pkg=<pkg>] [--pkgs=<pkg1,pkg2>,...] [--script] \ [--docker] [--vagrant] [--split=...] [--distrib=...] \ /path/to/<example>.yml""".format(sys.argv[0])) ...
0
0
0
35
0
251
0
-9
137
83537dff1b05b68d9e65ac5753b5bce5987f3a53
2,821
py
Python
sdk/python/pulumi_controltower/config/outputs.py
VMGVentures/pulumi-provider-controltower
e6ff7ad77abb71ae6d88e1f59e80ea2fd66913ae
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_controltower/config/outputs.py
VMGVentures/pulumi-provider-controltower
e6ff7ad77abb71ae6d88e1f59e80ea2fd66913ae
[ "ECL-2.0", "Apache-2.0" ]
13
2022-02-28T18:54:28.000Z
2022-03-31T13:41:28.000Z
sdk/python/pulumi_awscontroltower/config/outputs.py
jaxxstorm/pulumi-awscontroltower
1e8af1c6b0add6bb0cbf54b321e4903b954562dc
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import pulumi from .. import _utilities __all__ = [ 'AssumeRole', ]
33.583333
87
0.633463
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
0
2,431
0
0
0
0
0
41
90
78a38fa2f190b597d2a9d9f2355b5ecb608c896f
6,287
py
Python
cdk/python/sample/more.py
bilardi/aws-tool-comparison
0baf265be2e4690f966047a10b5e9ca2107ed7b8
[ "MIT" ]
null
null
null
cdk/python/sample/more.py
bilardi/aws-tool-comparison
0baf265be2e4690f966047a10b5e9ca2107ed7b8
[ "MIT" ]
null
null
null
cdk/python/sample/more.py
bilardi/aws-tool-comparison
0baf265be2e4690f966047a10b5e9ca2107ed7b8
[ "MIT" ]
null
null
null
"""The class for managing more environment The class requires the follow properties: 'id' (str): the suffix name of resource created 'ec2_params' (dict): the dictionary of the EC2 custom parameters 'lambda_params' (dict): the dictionary of the Lambda custom parameters All properties are mandatory. See the...
41.091503
112
0.60299
"""The class for managing more environment The class requires the follow properties: 'id' (str): the suffix name of resource created 'ec2_params' (dict): the dictionary of the EC2 custom parameters 'lambda_params' (dict): the dictionary of the Lambda custom parameters All properties are mandatory. See the...
0
0
0
5,647
0
0
0
71
97
e4168a690bb9436fa0955ac0ac0951214d2f625a
7,188
py
Python
nbgrader/apps/listapp.py
ellisonbg/nbgrader
038d381d82925ae60a71596e29bbd867c85afe7f
[ "BSD-3-Clause-Clear" ]
null
null
null
nbgrader/apps/listapp.py
ellisonbg/nbgrader
038d381d82925ae60a71596e29bbd867c85afe7f
[ "BSD-3-Clause-Clear" ]
null
null
null
nbgrader/apps/listapp.py
ellisonbg/nbgrader
038d381d82925ae60a71596e29bbd867c85afe7f
[ "BSD-3-Clause-Clear" ]
null
null
null
from .baseapp import transfer_aliases, transfer_flags aliases = {} aliases.update(transfer_aliases) aliases.update({ }) flags = {} flags.update(transfer_flags) flags.update({ 'inbound': ( {'ListApp' : {'inbound': True}}, "List inbound files rather than outbound." ), 'cached': ( {...
32.378378
126
0.586394
import os import glob import shutil import re import json from traitlets import Bool from .baseapp import TransferApp, transfer_aliases, transfer_flags aliases = {} aliases.update(transfer_aliases) aliases.update({ }) flags = {} flags.update(transfer_flags) flags.update({ 'inbound': ( {'ListApp' : {'in...
0
0
0
6,431
0
0
0
-34
156
b7c49394c6adc665a2f9cfffd797b04259b5eb28
2,311
py
Python
bot.py
tusharmverma/bot_for_twitch
4bf41ff741d272570c717cf41652514e48ba4942
[ "MIT" ]
null
null
null
bot.py
tusharmverma/bot_for_twitch
4bf41ff741d272570c717cf41652514e48ba4942
[ "MIT" ]
null
null
null
bot.py
tusharmverma/bot_for_twitch
4bf41ff741d272570c717cf41652514e48ba4942
[ "MIT" ]
null
null
null
import yaml config = yaml.safe_load(open('config.yml', 'rb')) HOST = config['HOST'] PORT = config['PORT'] NICK = config['NICK'] PASS = config['PASS']
30.012987
81
0.566854
import socket import re import yaml from time import sleep config = yaml.safe_load(open('config.yml', 'rb')) HOST = config['HOST'] PORT = config['PORT'] NICK = config['NICK'] PASS = config['PASS'] class Bot(object): """""" def __init__(self, channel, n_msg_per_sec=100): super(Bot, self).__init__() ...
0
0
0
2,087
0
0
0
-19
90
ab05609a631f784c6cf8c377f350401d4e824216
585
py
Python
setup.py
Aratz/arteria-runfolder
1b77bc1995443fc8394d7dfe24f5b8d26240f8a2
[ "MIT" ]
5
2016-06-10T04:03:57.000Z
2018-10-10T14:31:45.000Z
setup.py
Aratz/arteria-runfolder
1b77bc1995443fc8394d7dfe24f5b8d26240f8a2
[ "MIT" ]
16
2015-08-27T12:55:14.000Z
2022-01-25T12:47:11.000Z
setup.py
Aratz/arteria-runfolder
1b77bc1995443fc8394d7dfe24f5b8d26240f8a2
[ "MIT" ]
12
2015-08-24T14:53:58.000Z
2022-01-21T16:09:56.000Z
from setuptools import setup, find_packages from runfolder import __version__ setup( name='runfolder', version=__version__, description="Microservice for managing runfolders", long_description=read_file('README.md'), keywords='bioinformatics', author='SNP&SEQ Technology Platform, Uppsala Univer...
27.857143
70
0.726496
from setuptools import setup, find_packages from runfolder import __version__ import os def read_file(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name='runfolder', version=__version__, description="Microservice for managing runfolders", long_description=read_f...
0
0
0
0
0
71
0
-12
45
c7a999c40576c5ff6e73081dfe8a7e715790c23f
84
py
Python
Python-Django-2016/Python/Clase3/exceptions.py
juandc/platzi-courses
27443bdb40a35100b9c839e2d598bc3cf4e43032
[ "MIT" ]
3
2017-09-14T23:14:21.000Z
2018-03-22T20:07:37.000Z
Python-Django-2016/Python/Clase3/exceptions.py
juandc/platzi-courses
27443bdb40a35100b9c839e2d598bc3cf4e43032
[ "MIT" ]
null
null
null
Python-Django-2016/Python/Clase3/exceptions.py
juandc/platzi-courses
27443bdb40a35100b9c839e2d598bc3cf4e43032
[ "MIT" ]
null
null
null
try: 6/0 except Exception as e: print "%s" % e raise e print "Despues"
10.5
22
0.571429
try: 6/0 except Exception as e: print "%s" % e raise e print "Despues"
0
0
0
0
0
0
0
0
0
06cd33af3283f896360712c3372c2c52913a5d19
786
py
Python
Serveur.py
Divulgacheur/ScanIP
99eb1113c3d51fb115e074f67aa690ba0a8bdf39
[ "MIT" ]
null
null
null
Serveur.py
Divulgacheur/ScanIP
99eb1113c3d51fb115e074f67aa690ba0a8bdf39
[ "MIT" ]
null
null
null
Serveur.py
Divulgacheur/ScanIP
99eb1113c3d51fb115e074f67aa690ba0a8bdf39
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*-
22.457143
137
0.71883
# -*- coding: utf-8 -*- import socket import platform import getpass import psutil def lanceServeur(Nport): hote = '' port = int(Nport) connexion_principale = socket.socket(socket.AF_INET, socket.SOCK_STREAM) connexion_principale.bind((hote, port)) connexion_principale.listen(5) def servv(): print("Le ser...
6
0
0
0
0
677
0
-29
112
72ca50e072d353c8adb6b6f504e93496b765e4e5
3,146
py
Python
tests/hamcrest_unit_test/core/allof_test.py
rbalint/PyHamcrest
713aa08e313dba997fd8e4b7e0d3d599a72bdd72
[ "BSD-3-Clause" ]
null
null
null
tests/hamcrest_unit_test/core/allof_test.py
rbalint/PyHamcrest
713aa08e313dba997fd8e4b7e0d3d599a72bdd72
[ "BSD-3-Clause" ]
null
null
null
tests/hamcrest_unit_test/core/allof_test.py
rbalint/PyHamcrest
713aa08e313dba997fd8e4b7e0d3d599a72bdd72
[ "BSD-3-Clause" ]
null
null
null
if __name__ == "__main__": import sys sys.path.insert(0, "..") sys.path.insert(0, "../..") import unittest __author__ = "Jon Reid" __copyright__ = "Copyright 2011 hamcrest.org" __license__ = "BSD, see License.txt" if __name__ == "__main__": unittest.main()
32.43299
96
0.595677
if __name__ == "__main__": import sys sys.path.insert(0, "..") sys.path.insert(0, "../..") import unittest from hamcrest.core.core.allof import * from hamcrest.core.core.isequal import equal_to from hamcrest_unit_test.matcher_test import MatcherTest __author__ = "Jon Reid" __copyright__ = "Copyright 201...
0
0
0
2,700
0
0
0
77
90
161c35ae115f73fe788f0aaea950e88e183e8b91
20,071
py
Python
tools/gn.py
kagouda/sdk
a9d212b94aa73472824f4218a567a8e004575112
[ "BSD-3-Clause" ]
null
null
null
tools/gn.py
kagouda/sdk
a9d212b94aa73472824f4218a567a8e004575112
[ "BSD-3-Clause" ]
null
null
null
tools/gn.py
kagouda/sdk
a9d212b94aa73472824f4218a567a8e004575112
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # Copyright 2016 The Dart project authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import sys import utils HOST_OS = utils.GuessOS() HOST_ARCH = utils.GuessArchitecture() SCRIPT_DIR = os.path.dirname(sys....
34.845486
83
0.584973
#!/usr/bin/env python # Copyright 2016 The Dart project authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import argparse import os import shutil import subprocess import sys import time import utils HOST_OS = utils.GuessOS() HOST_ARCH ...
0
0
0
0
0
13,723
0
-28
569
c901dac9a8cb1afaa1e65b45c374f87b1bba735c
2,845
py
Python
pages/process.py
ewuerfel66/medicare_app
3e515481b5882ce74762198faa42d8fc64813305
[ "MIT" ]
null
null
null
pages/process.py
ewuerfel66/medicare_app
3e515481b5882ce74762198faa42d8fc64813305
[ "MIT" ]
null
null
null
pages/process.py
ewuerfel66/medicare_app
3e515481b5882ce74762198faa42d8fc64813305
[ "MIT" ]
null
null
null
import dash_bootstrap_components as dbc import dash_core_components as dcc column1 = dbc.Col( [ dcc.Markdown( """ ## Process This web app uses a random forest regressor to estimate out-of-pocket medical costs based on [Medicare Payment Data](https:/...
64.659091
434
0.70123
import dash import dash_bootstrap_components as dbc import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output from app import app column1 = dbc.Col( [ dcc.Markdown( """ ## Process This web ap...
0
0
0
0
0
0
0
24
89
53f55b9d3820636cb1d465d6cf8047ed4193435c
3,294
py
Python
nor2qml/validation/validationTools.py
MrCubanfrog/nor2qml
ad20ac086c191e7a2e57a7da1b71df192743554c
[ "MIT" ]
null
null
null
nor2qml/validation/validationTools.py
MrCubanfrog/nor2qml
ad20ac086c191e7a2e57a7da1b71df192743554c
[ "MIT" ]
null
null
null
nor2qml/validation/validationTools.py
MrCubanfrog/nor2qml
ad20ac086c191e7a2e57a7da1b71df192743554c
[ "MIT" ]
null
null
null
nTypes = {0: "Nordic Event", 1: "Nordic Main Header", 2: "Nordic Macroseismic Header", 3: "Nordic Comment Header", 5: "Nordic Error Header", 6: "Nordic Waveform Header", 8: "Nordic Phase Data"}
28.643478
94
0.660595
import math import logging from datetime import date nTypes = {0: "Nordic Event", 1: "Nordic Main Header", 2: "Nordic Macroseismic Header", 3: "Nordic Comment Header", 5: "Nordic Error Header", 6: "Nordic Waveform Header", 8: "Nordic Phase Data"} class values(): maxInt = 9223372036854775807 def validat...
0
0
0
24
0
2,869
0
-13
205
db2e6b0e5e562c808cd68e220181d5607da5a025
209
py
Python
src/python/twitter/common/zookeeper/group/kazoo_cli.py
zhouyijiaren/commons
10df6fb63547baa9047782aa7ad4edf354914b10
[ "Apache-2.0" ]
1,143
2015-01-05T04:19:24.000Z
2019-12-11T12:02:23.000Z
src/python/twitter/common/zookeeper/group/kazoo_cli.py
zhouyijiaren/commons
10df6fb63547baa9047782aa7ad4edf354914b10
[ "Apache-2.0" ]
144
2015-01-06T05:05:07.000Z
2019-12-12T18:02:37.000Z
src/python/twitter/common/zookeeper/group/kazoo_cli.py
zhouyijiaren/commons
10df6fb63547baa9047782aa7ad4edf354914b10
[ "Apache-2.0" ]
426
2015-01-08T08:33:41.000Z
2019-12-09T13:15:40.000Z
from twitter.common import app app.main()
16.076923
65
0.784689
from twitter.common import app from kazoo.client import KazooClient from twitter.common.zookeeper.group.kazoo_group import KazooGroup def main(): import code code.interact(local=globals()) app.main()
0
0
0
0
0
37
0
59
68
a875657ad67d487ebed163d89301717c4340b8d3
948
py
Python
dev/Gems/CloudGemComputeFarm/v1/AWS/lambda-code/ServiceLambda/api/cancel.py
jeikabu/lumberyard
07228c605ce16cbf5aaa209a94a3cb9d6c1a4115
[ "AML" ]
1,738
2017-09-21T10:59:12.000Z
2022-03-31T21:05:46.000Z
dev/Gems/CloudGemComputeFarm/v1/AWS/lambda-code/ServiceLambda/api/cancel.py
jeikabu/lumberyard
07228c605ce16cbf5aaa209a94a3cb9d6c1a4115
[ "AML" ]
427
2017-09-29T22:54:36.000Z
2022-02-15T19:26:50.000Z
dev/Gems/CloudGemComputeFarm/v1/AWS/lambda-code/ServiceLambda/api/cancel.py
jeikabu/lumberyard
07228c605ce16cbf5aaa209a94a3cb9d6c1a4115
[ "AML" ]
671
2017-09-21T08:04:01.000Z
2022-03-29T14:30:07.000Z
from __future__ import print_function import boto3 import CloudCanvas from cgf_utils import aws_utils from cgf_utils import custom_resource_utils # import errors # # raise errors.ClientError(message) - results in HTTP 400 response with message # raise errors.ForbiddenRequestError(message) - results in 403 response ...
27.882353
94
0.794304
from __future__ import print_function import boto3 import json import CloudCanvas import service from cgf_utils import aws_utils from cgf_utils import custom_resource_utils # import errors # # raise errors.ClientError(message) - results in HTTP 400 response with message # raise errors.ForbiddenRequestError(message)...
0
179
0
0
0
0
0
-17
67
d2159342c7d35eb7023c5f218af35daef0f7dfda
241
py
Python
src/devices/esp32-test02/deploy.py
hwinther/lanot
f6700cacb3946535081624467b746fdfd38e021d
[ "Apache-2.0" ]
null
null
null
src/devices/esp32-test02/deploy.py
hwinther/lanot
f6700cacb3946535081624467b746fdfd38e021d
[ "Apache-2.0" ]
null
null
null
src/devices/esp32-test02/deploy.py
hwinther/lanot
f6700cacb3946535081624467b746fdfd38e021d
[ "Apache-2.0" ]
null
null
null
import prometheus.tftpd ''' prime the device with: nc64 -c 192.168.4.1 9195 connect ssid:password to run: set PYTHONPATH=p:\lanot\src\core ''' files = [ 'main.py', 'test02.py' ] prometheus.tftpd.tftp_client('10.20.2.116', *files)
14.176471
51
0.680498
import prometheus.tftpd ''' prime the device with: nc64 -c 192.168.4.1 9195 connect ssid:password to run: set PYTHONPATH=p:\lanot\src\core ''' files = [ 'main.py', 'test02.py' ] prometheus.tftpd.tftp_client('10.20.2.116', *files)
0
0
0
0
0
0
0
0
0
fb2886108f82965094c45267d699bc69164f0202
11,853
py
Python
visuafy.py
aryanbhajanka/visuafy
407db9b9219cd7849f9a756d5123de61bb85f415
[ "MIT" ]
1
2021-11-26T15:48:54.000Z
2021-11-26T15:48:54.000Z
visuafy.py
aryanbhajanka/visuafy
407db9b9219cd7849f9a756d5123de61bb85f415
[ "MIT" ]
null
null
null
visuafy.py
aryanbhajanka/visuafy
407db9b9219cd7849f9a756d5123de61bb85f415
[ "MIT" ]
null
null
null
#Visuafy a Spotify visualiser by Aryan Bhajanka from flask import Flask app = Flask(__name__, static_folder='static') app.secret_key = "7490017841visuafy7490017841" app.config['SESSION_COOKIE_NAME'] = 'spotify-user-read-currently-playing' scope = "user-read-currently-playing" if __name__ == '__main__': a...
41.589474
144
0.633173
#Visuafy a Spotify visualiser by Aryan Bhajanka from os import name from flask import Flask, request, url_for, session, redirect, render_template from flask.helpers import get_template_attribute import spotipy from spotipy.exceptions import SpotifyException from spotipy.oauth2 import SpotifyOAuth, SpotifyOauthE...
0
10,558
0
0
0
265
0
135
567
7faf24164edba88fb71f7c27d65e25b1c665e48b
388
py
Python
terracommon/events/migrations/0002_eventhandler_priority.py
Terralego/terra-back
32779117ee3613b9d2e476cf445f94dbdb0f114f
[ "MIT" ]
4
2019-05-07T12:34:35.000Z
2019-11-14T10:52:11.000Z
terracommon/events/migrations/0002_eventhandler_priority.py
Terralego/terra-back
32779117ee3613b9d2e476cf445f94dbdb0f114f
[ "MIT" ]
16
2019-08-14T11:09:39.000Z
2022-02-10T07:55:31.000Z
terracommon/events/migrations/0002_eventhandler_priority.py
Terralego/terra-back
32779117ee3613b9d2e476cf445f94dbdb0f114f
[ "MIT" ]
1
2019-04-17T09:03:02.000Z
2019-04-17T09:03:02.000Z
# Generated by Django 2.0.9 on 2018-10-31 09:05
20.421053
58
0.600515
# Generated by Django 2.0.9 on 2018-10-31 09:05 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('events', '0001_initial'), ] operations = [ migrations.AddField( model_name='eventhandler', name='priority', ...
0
0
0
274
0
0
0
19
46
31cb417beee09bbcf9e26529462b9495f2bb012a
3,170
py
Python
tenable/nessus/settings.py
tecnobabble/pyTenable
29e7ee65cdee70fbaaade295a9a5055c4d80b17f
[ "MIT" ]
1
2022-03-01T17:17:19.000Z
2022-03-01T17:17:19.000Z
tenable/nessus/settings.py
tecnobabble/pyTenable
29e7ee65cdee70fbaaade295a9a5055c4d80b17f
[ "MIT" ]
null
null
null
tenable/nessus/settings.py
tecnobabble/pyTenable
29e7ee65cdee70fbaaade295a9a5055c4d80b17f
[ "MIT" ]
1
2022-03-01T17:17:30.000Z
2022-03-01T17:17:30.000Z
''' Settings ======== Methods described in this section relate to the the Settings API. These methods can be accessed at ``Nessus.settings``. .. rst-class:: hide-signature .. autoclass:: SettingsAPI :members: '''
27.565217
79
0.539432
''' Settings ======== Methods described in this section relate to the the Settings API. These methods can be accessed at ``Nessus.settings``. .. rst-class:: hide-signature .. autoclass:: SettingsAPI :members: ''' from typing import List, Dict, Optional from typing_extensions import Literal from restfly.utils impo...
0
0
0
2,718
0
0
0
99
133
6ff30e1703915da6d05542e6733883640be99706
3,488
py
Python
frontend/lambda_function.py
lylus/tesla_cmds_aws_lambda_functions
b7778bb6f0172e96eba8e99916f123ba573114ee
[ "BSD-2-Clause" ]
7
2021-01-31T00:27:10.000Z
2022-03-10T07:49:06.000Z
frontend/lambda_function.py
lylus/tesla_cmds_aws_lambda_functions
b7778bb6f0172e96eba8e99916f123ba573114ee
[ "BSD-2-Clause" ]
1
2021-05-21T01:35:31.000Z
2021-05-22T14:34:23.000Z
frontend/lambda_function.py
lylus/tesla_cmds_aws_lambda_functions
b7778bb6f0172e96eba8e99916f123ba573114ee
[ "BSD-2-Clause" ]
4
2021-02-07T00:09:34.000Z
2022-03-28T14:36:25.000Z
#!/usr/bin/env python3
32.598131
138
0.640195
#!/usr/bin/env python3 import boto3,json,os,urllib3 def lambda_handler(event, context): ########################################### Global Variables ##################################################### BASE_URL = "https://owner-api.teslamotors.com/api/1/vehicles/" EVENT_BODY = json.loads(event["body"]) EVENT...
0
0
0
0
0
3,412
0
7
46
abc9d9fc06d605b36b30567b88698cc842fd9d4b
594
py
Python
example/echo_service.py
nightfade/protobuf-RPC
5c6084f6d5a6b9affc56cddab6413b4b662e973b
[ "MIT" ]
15
2015-04-02T08:48:18.000Z
2021-08-04T08:28:35.000Z
example/echo_service.py
nightfade/protobuf-RPC
5c6084f6d5a6b9affc56cddab6413b4b662e973b
[ "MIT" ]
2
2016-09-12T01:39:07.000Z
2021-07-22T09:31:43.000Z
example/echo_service.py
nightfade/protobuf-RPC
5c6084f6d5a6b9affc56cddab6413b4b662e973b
[ "MIT" ]
5
2018-02-09T01:41:59.000Z
2020-10-12T06:06:06.000Z
__author__ = 'nightfade'
33
73
0.718855
__author__ = 'nightfade' from example.echo_service_pb2 import IEchoService, IEchoClient_Stub import logger class EchoService(IEchoService): def echo(self, rpc_controller, echo_string, callback): """ called by RpcChannel.receive when a complete request reached. """ logger.get_logger('Echo...
0
0
0
462
0
0
0
38
68
cdf2f2fa1ca8c7e8fdb87369a49e10280581f20e
533
py
Python
core_admin/des/migrations/0033_auto_20210722_1449.py
linea-it/tno
f973381280504ceb1b606b5b3ccc79b6b8c2aa4f
[ "MIT" ]
null
null
null
core_admin/des/migrations/0033_auto_20210722_1449.py
linea-it/tno
f973381280504ceb1b606b5b3ccc79b6b8c2aa4f
[ "MIT" ]
112
2018-04-24T19:10:55.000Z
2022-02-26T16:55:02.000Z
core_admin/des/migrations/0033_auto_20210722_1449.py
linea-it/tno
f973381280504ceb1b606b5b3ccc79b6b8c2aa4f
[ "MIT" ]
null
null
null
# Generated by Django 2.2.13 on 2021-07-22 14:49
28.052632
193
0.589118
# Generated by Django 2.2.13 on 2021-07-22 14:49 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('des', '0032_auto_20210713_2127'), ] operations = [ migrations.AlterField( model_name='astrometryjob', name='status'...
0
0
0
418
0
0
0
19
46
605d26591aae91ae8eef7279efb53fd4073fdf69
1,994
py
Python
unreleased/azure-keyvault/azure/keyvault/models/key_create_parameters.py
CharaD7/azure-sdk-for-python
9fdf0aac0cec8a15a5bb2a0ea27dd331dbfa2f5c
[ "MIT" ]
1
2017-10-29T15:14:35.000Z
2017-10-29T15:14:35.000Z
unreleased/azure-keyvault/azure/keyvault/models/key_create_parameters.py
Berryliao84/Python-Azure
a96ed6e8bbf4290372980a2919b31110da90b164
[ "MIT" ]
null
null
null
unreleased/azure-keyvault/azure/keyvault/models/key_create_parameters.py
Berryliao84/Python-Azure
a96ed6e8bbf4290372980a2919b31110da90b164
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
37.622642
89
0.607322
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
0
0
0
1,457
0
0
0
17
46
5f9c3fde3437bdd5ca9486c84e0d914fc40c75bf
12,044
py
Python
surveyor/podman.py
paradise-fi/surveyor
227a678b4f64bc79d44f77a3799bfc00a04ec9fa
[ "MIT" ]
null
null
null
surveyor/podman.py
paradise-fi/surveyor
227a678b4f64bc79d44f77a3799bfc00a04ec9fa
[ "MIT" ]
null
null
null
surveyor/podman.py
paradise-fi/surveyor
227a678b4f64bc79d44f77a3799bfc00a04ec9fa
[ "MIT" ]
null
null
null
import os import time import subprocess import dateutil.parser import datetime from tempfile import TemporaryDirectory # See https://github.com/containers/podman/issues/10173 CGROUP_WORKAROUND = False RUNTIME = "crun" def invokePodmanCommandPoll(command, output): """ Invoke podman command and continuously out...
33.455556
151
0.603454
import os import json import time import subprocess import contextlib import dateutil.parser import datetime import logging from tempfile import TemporaryDirectory # See https://github.com/containers/podman/issues/10173 CGROUP_WORKAROUND = False RUNTIME = "crun" class Cgroup: def __init__(self, path=None): ...
0
2,192
0
2,626
0
1,285
0
-21
365
cc30f6cf29ac186a3c2f042722711e0d22c572f4
1,216
py
Python
script_2_inverse_optimization_step_different_costs.py
sallen7/IO_GNEP
e6f207113c857690a1d6d7b68673dba09a2dcf2a
[ "BSD-3-Clause" ]
2
2021-02-18T23:48:02.000Z
2021-10-11T09:04:09.000Z
script_2_inverse_optimization_step_different_costs.py
sallen7/IO_GNEP
e6f207113c857690a1d6d7b68673dba09a2dcf2a
[ "BSD-3-Clause" ]
null
null
null
script_2_inverse_optimization_step_different_costs.py
sallen7/IO_GNEP
e6f207113c857690a1d6d7b68673dba09a2dcf2a
[ "BSD-3-Clause" ]
null
null
null
########## Script 2: Different Costs ################### import pickle ############### Step 1: Importing the class object ###################### #https://www.datacamp.com/community/tutorials/pickle-python-tutorial file_to_be_read = open("class_object_1","rb") generalized_framework_object = pickle.load(file_to_be_read)...
33.777778
78
0.728618
########## Script 2: Different Costs ################### import sys from RK_IO_model import RK_IO_methods from Generalized_RK_Framework import generalized_RK_framework import pdb #for debugging import numpy as np import pyomo.environ as pyo from pyomo.opt import SolverFactory from pyomo.opt imp...
0
0
0
0
0
0
0
91
373
63ba86a5e46cd7da257f1283982d4260af4086a9
1,330
py
Python
bn_rpc.py
usc-isi-bass/bn_rpc
7f896327cc8b28e0dc181989440b173429df720e
[ "MIT" ]
null
null
null
bn_rpc.py
usc-isi-bass/bn_rpc
7f896327cc8b28e0dc181989440b173429df720e
[ "MIT" ]
null
null
null
bn_rpc.py
usc-isi-bass/bn_rpc
7f896327cc8b28e0dc181989440b173429df720e
[ "MIT" ]
null
null
null
import os import socket import sys if len(sys.argv) != 2: print("Usage: python bn_rpyc.py <script>") exit(1) script = sys.argv[1] if os.path.exists(script): script = os.path.abspath(script) else: print("Can't find: %s" % script) exit(1) py3 = sys.version_info[0] >= 3 if not py3: input = raw_i...
21.111111
55
0.554135
import json import os import socket import sys if len(sys.argv) != 2: print("Usage: python bn_rpyc.py <script>") exit(1) script = sys.argv[1] if os.path.exists(script): script = os.path.abspath(script) else: print("Can't find: %s" % script) exit(1) py3 = sys.version_info[0] >= 3 if not py3: i...
0
0
0
0
0
162
0
-10
68
657662e3cf82f5f63c82a7a653c0337660555931
1,098
py
Python
server.py
maneeshd/todo-list
e8576c121f1e60d58046812d76cd8cb944d8ad59
[ "MIT" ]
null
null
null
server.py
maneeshd/todo-list
e8576c121f1e60d58046812d76cd8cb944d8ad59
[ "MIT" ]
4
2021-03-10T03:50:38.000Z
2022-02-18T18:07:12.000Z
server.py
maneeshd/todo-list
e8576c121f1e60d58046812d76cd8cb944d8ad59
[ "MIT" ]
null
null
null
# ASGI server using starlette & uvicorn from starlette.applications import Starlette from starlette.middleware import Middleware from starlette.middleware.gzip import GZipMiddleware from starlette.staticfiles import StaticFiles from os import path, getenv from uvicorn import run as serve_app CUR_DIR = path.realpath(p...
28.153846
84
0.710383
# ASGI server using starlette & uvicorn from starlette.applications import Starlette from starlette.responses import FileResponse from starlette.middleware import Middleware from starlette.middleware.gzip import GZipMiddleware from starlette.staticfiles import StaticFiles from os import path, getenv from uvicorn import...
0
412
0
0
0
0
0
23
68
8510c56d0874d2ec6ff8f75f20dd9376177e88ae
6,879
py
Python
datagristle/file_io.py
sidhu177/DataGristle
d9dd383e146c13a2a9a8cd265330122a9c565609
[ "BSD-3-Clause" ]
null
null
null
datagristle/file_io.py
sidhu177/DataGristle
d9dd383e146c13a2a9a8cd265330122a9c565609
[ "BSD-3-Clause" ]
null
null
null
datagristle/file_io.py
sidhu177/DataGristle
d9dd383e146c13a2a9a8cd265330122a9c565609
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python """ Contains standard io reading & writing code See the file "LICENSE" for the full license governing this code. Copyright 2017 Ken Farmer """ import datagristle.csvhelper as csvhelper import datagristle.file_type as file_type
30.986486
110
0.565635
#!/usr/bin/env python """ Contains standard io reading & writing code See the file "LICENSE" for the full license governing this code. Copyright 2017 Ken Farmer """ import os import sys import csv import io import random import errno from os.path import isfile from pprint import pprint from typing import Union...
0
0
0
6,353
0
0
0
-7
266
b0b855e6c97c9f7a10c53d2de21ef3f09b751c17
12,710
py
Python
scholar_scraper.py
albornet/ntds_2019_team_32
c5cff5ca40e9894287f30e02f74da84952ff7d6b
[ "MIT" ]
null
null
null
scholar_scraper.py
albornet/ntds_2019_team_32
c5cff5ca40e9894287f30e02f74da84952ff7d6b
[ "MIT" ]
null
null
null
scholar_scraper.py
albornet/ntds_2019_team_32
c5cff5ca40e9894287f30e02f74da84952ff7d6b
[ "MIT" ]
null
null
null
from nordvpn_randomizer import getCountries # Used for some scientists in the list that have special characters in their names translator = {'': ('%C3%A1', '=aacute='), #, '\xc3\xa1'), '': ('%C3%A9', '=eacute='), #, '\xc3\xa9'), '': ('%C3%AD', '=iacute='), #, '\xc3\xad'), ...
51.877551
141
0.600079
import random import time import re from urllib.request import Request, urlopen from urllib.error import HTTPError from unidecode import unidecode from nordvpn_randomizer import logIn, chooseRandom, getCountries # Used for some scientists in the list that have special characters in their names translator = {'á': ('...
36
0
0
0
0
8,730
0
36
198
72ab7dc437598ea6023e67802d5de3132fc78b1c
1,195
py
Python
snapshot of face/sourcecode.py
The-SocialLion/FaceDetection_using_opencv
9cea434a0f4dc15f2333afec171a51f7e88a3e08
[ "Apache-2.0" ]
null
null
null
snapshot of face/sourcecode.py
The-SocialLion/FaceDetection_using_opencv
9cea434a0f4dc15f2333afec171a51f7e88a3e08
[ "Apache-2.0" ]
null
null
null
snapshot of face/sourcecode.py
The-SocialLion/FaceDetection_using_opencv
9cea434a0f4dc15f2333afec171a51f7e88a3e08
[ "Apache-2.0" ]
null
null
null
import cv2 import os # handling directories alg="haarcascade_frontalface_default.xml"# importing algorithm har=cv2.CascadeClassifier(alg)# reading & storing the algorithm in a variable cam=cv2.VideoCapture(0) dataset="dataset" name="sociallion" path=os.path.join(dataset,name) if not os.path.isdir(path): os.makedirs...
37.34375
111
0.699582
import cv2 import os # handling directories alg="haarcascade_frontalface_default.xml"# importing algorithm har=cv2.CascadeClassifier(alg)# reading & storing the algorithm in a variable cam=cv2.VideoCapture(0) dataset="dataset" name="sociallion" path=os.path.join(dataset,name) if not os.path.isdir(path): os.makedirs...
0
0
0
0
0
0
0
0
0
f7b326676f48a33a9787afac3c35bb90f7e33e0e
23,888
py
Python
aggregator_extraction.py
guillaume-thiry/OECD-Chatbot
3c8c280b8a2cb9b1bd8314265aee933ba8abac1a
[ "MIT" ]
1
2020-09-09T12:25:13.000Z
2020-09-09T12:25:13.000Z
aggregator_extraction.py
guillaume-thiry/OECD-Chatbot
3c8c280b8a2cb9b1bd8314265aee933ba8abac1a
[ "MIT" ]
null
null
null
aggregator_extraction.py
guillaume-thiry/OECD-Chatbot
3c8c280b8a2cb9b1bd8314265aee933ba8abac1a
[ "MIT" ]
1
2021-01-19T09:30:13.000Z
2021-01-19T09:30:13.000Z
# @ Copyright Inria, Ecole Polytechnique # Shared under the MIT license https://opensource.org/licenses/mit-license.php # This file contains all the functions that are used in the comparison/aggregation detection # The main part of the code is the function find_aggregators, that will be used elsewhere in the code # ...
43.670932
176
0.477604
# @ Copyright Inria, Ecole Polytechnique # Shared under the MIT license https://opensource.org/licenses/mit-license.php # This file contains all the functions that are used in the comparison/aggregation detection # The main part of the code is the function find_aggregators, that will be used elsewhere in the code # ...
0
0
0
0
0
20,961
0
98
179
89f87c332127a666f8104861a60a4daee9b3667f
592
py
Python
src/multinavigation/conf.py
adlh/django-multinavigation
040b8f2d5857f3d1321f81c166576f46e86f56cb
[ "MIT" ]
4
2016-08-01T11:08:05.000Z
2020-09-22T20:47:27.000Z
src/multinavigation/conf.py
adlh/django-multinavigation
040b8f2d5857f3d1321f81c166576f46e86f56cb
[ "MIT" ]
4
2019-11-20T19:53:03.000Z
2020-10-20T22:41:39.000Z
src/multinavigation/conf.py
adlh/django-multinavigation
040b8f2d5857f3d1321f81c166576f46e86f56cb
[ "MIT" ]
null
null
null
from collections import namedtuple Node = namedtuple('Node', 'url_name label parent context') """ Represents a node or item in a navigation url_name -- (string) The name of a named-urlpattern label -- (string) The label to be used in the item parent -- (string) the url_name of its parent or ''. Extra kwa...
42.285714
77
0.665541
from collections import namedtuple Node = namedtuple('Node', 'url_name label parent context') """ Represents a node or item in a navigation url_name -- (string) The name of a named-urlpattern label -- (string) The label to be used in the item parent -- (string) the url_name of its parent or ''. Extra kwa...
0
0
0
0
0
0
0
0
0
8ab2d19ea32cb1db292148c9e0dbd28cf5dac977
21,856
py
Python
microsa/cellspat.py
VGeorgii/Mesa
6ae075e141e12895e7b60b5d7fa955b1802516f4
[ "MIT" ]
null
null
null
microsa/cellspat.py
VGeorgii/Mesa
6ae075e141e12895e7b60b5d7fa955b1802516f4
[ "MIT" ]
null
null
null
microsa/cellspat.py
VGeorgii/Mesa
6ae075e141e12895e7b60b5d7fa955b1802516f4
[ "MIT" ]
null
null
null
try: except ImportError: print ('Import error!')
27.049505
281
0.553624
try: import numpy as np import pandas as pd from skimage import morphology from skimage.measure import regionprops from skimage.measure import label from scipy import ndimage from skimage.graph import route_through_array from scipy.ndimage import binary_closing, binary_hit_or_mis...
0
0
0
0
0
21,110
0
114
522
3badc8f6a19fe4797842b0da596e36fea30ea526
4,563
py
Python
tile.py
Cocodidou/projetFusee
9ce85fb3463b1039e4a2e414c055b680ba909fb8
[ "Unlicense" ]
null
null
null
tile.py
Cocodidou/projetFusee
9ce85fb3463b1039e4a2e414c055b680ba909fb8
[ "Unlicense" ]
null
null
null
tile.py
Cocodidou/projetFusee
9ce85fb3463b1039e4a2e414c055b680ba909fb8
[ "Unlicense" ]
null
null
null
# has complex polygon as tile shape, and lots of moving objects import engine import math WIDTH = 640 HEIGHT = 480 S = 25 # base unit size for ship B = 50 # base unit size for tiles GRIDCOLS = 1 + math.ceil(WIDTH / B) + 1 GRIDROWS = 1 + math.ceil(HEIGHT / B) + 1 SPEED = 3 HEADINGSTEP = 5 heading = 180 delt...
26.224138
72
0.674775
# has complex polygon as tile shape, and lots of moving objects import turtle import engine import math WIDTH = 640 HEIGHT = 480 S = 25 # base unit size for ship B = 50 # base unit size for tiles GRIDCOLS = 1 + math.ceil(WIDTH / B) + 1 GRIDROWS = 1 + math.ceil(HEIGHT / B) + 1 SPEED = 3 HEADINGSTEP = 5 hea...
0
0
0
1,306
0
2,293
0
-8
184
d2bfbf45d94b686eb9237a693c5e11ec6c6ff936
225
py
Python
setup.py
Pavantelugura/mlops_main
611bcb21ef3eaa3d00e758fb2414e589d46f1396
[ "MIT" ]
null
null
null
setup.py
Pavantelugura/mlops_main
611bcb21ef3eaa3d00e758fb2414e589d46f1396
[ "MIT" ]
null
null
null
setup.py
Pavantelugura/mlops_main
611bcb21ef3eaa3d00e758fb2414e589d46f1396
[ "MIT" ]
null
null
null
from setuptools import find_packages, setup setup( name='src', packages=find_packages(), version='0.1.0', description='To predict the values of wafer sensor', author='Pavantelugura', license='MIT', )
20.454545
56
0.675556
from setuptools import find_packages, setup setup( name='src', packages=find_packages(), version='0.1.0', description='To predict the values of wafer sensor', author='Pavantelugura', license='MIT', )
0
0
0
0
0
0
0
0
0
4563ae23f41e867d23fff79cfb460419275a4032
11,436
py
Python
wf_psf/utils.py
tobias-liaudat/wf-psf
0ff1a12d06c46bd8599061d227785393fb528d76
[ "MIT" ]
7
2022-03-10T10:49:01.000Z
2022-03-17T16:06:12.000Z
wf_psf/utils.py
tobias-liaudat/wf-psf
0ff1a12d06c46bd8599061d227785393fb528d76
[ "MIT" ]
null
null
null
wf_psf/utils.py
tobias-liaudat/wf-psf
0ff1a12d06c46bd8599061d227785393fb528d76
[ "MIT" ]
null
null
null
import numpy as np import tensorflow as tf import PIL import zernike as zk try: from cv2 import resize, INTER_AREA except: print('Problem importing opencv..') def generate_SED_elems(SED, sim_psf_toolkit, n_bins=20): r"""Generate the SED elements needed for using the TF_poly_PSF. sim_psf_toolkit: A...
32.862069
211
0.649091
import numpy as np import tensorflow as tf import tensorflow_addons as tfa import PIL import zernike as zk try: from cv2 import resize, INTER_AREA except: print('Problem importing opencv..') def scale_to_range(input_array, old_range, new_range): # Scale to [0,1] input_array = (input_array - old_range[...
0
240
0
5,308
0
524
0
10
160
7d0a3fd29bde06f254172fba68a5ca944366249f
623
py
Python
src/pyfel/main/constants.py
bellaz89/pyFEL
d96bc50096d32dac4ba957f0fc022bc377232680
[ "MIT" ]
1
2021-02-24T04:31:36.000Z
2021-02-24T04:31:36.000Z
src/pyfel/main/constants.py
bellaz89/pyFEL
d96bc50096d32dac4ba957f0fc022bc377232680
[ "MIT" ]
null
null
null
src/pyfel/main/constants.py
bellaz89/pyFEL
d96bc50096d32dac4ba957f0fc022bc377232680
[ "MIT" ]
null
null
null
''' Physical constants ''' from scipy.constants import c, e, epsilon_0, physical_constants C = c ELEM_CHARGE = e VACUUM_IMPEDANCE = 1.0/(c*epsilon_0) ELECTRON_MASS_EV = physical_constants['electron mass energy equivalent in MeV'][0]*1e6 if __name__ == "__main__": print("Speed of light (m...
34.611111
86
0.605136
''' Physical constants ''' from scipy.constants import c, e, epsilon_0, physical_constants C = c ELEM_CHARGE = e VACUUM_IMPEDANCE = 1.0/(c*epsilon_0) ELECTRON_MASS_EV = physical_constants['electron mass energy equivalent in MeV'][0]*1e6 if __name__ == "__main__": print("Speed of light (m...
0
0
0
0
0
0
0
0
0
de3439a6e6098b977a450500cb7f406a47950bae
1,950
py
Python
app/main_restplus.py
hazxone/face_recognition
e015288b49941b4c81600c76464673e946245a94
[ "MIT" ]
null
null
null
app/main_restplus.py
hazxone/face_recognition
e015288b49941b4c81600c76464673e946245a94
[ "MIT" ]
null
null
null
app/main_restplus.py
hazxone/face_recognition
e015288b49941b4c81600c76464673e946245a94
[ "MIT" ]
null
null
null
''' # GET /companies/ - list all companies # POST /companies/ - Create new company # DELETE /companies/{company_id} - Delete a company by company_id # GET /companies/{company_id} - Get list of ic in company # GET /companies/{company_id}/ic/ - Get list of ic in company # POST /companies/{company...
27.464789
93
0.671795
''' # GET /companies/ - list all companies # POST /companies/ - Create new company # DELETE /companies/{company_id} - Delete a company by company_id # GET /companies/{company_id} - Get list of ic in company # GET /companies/{company_id}/ic/ - Get list of ic in company # POST /companies/{company...
0
670
0
0
0
0
0
12
67
f8e4d9b8b5905b68e4ef183cf0bab9664f046fce
6,318
py
Python
src/deepke/attribution_extraction/standard/tools/preprocess.py
hphphp123321/DeepKE
94b39a20db0d848ccea81ea56fef4587ac31e2bc
[ "MIT" ]
676
2018-08-07T03:01:32.000Z
2021-07-31T02:08:06.000Z
src/deepke/attribution_extraction/standard/tools/preprocess.py
807953261/DeepKE
f7efd3fc87d3bf88783a41efc3c09dca7a986013
[ "MIT" ]
66
2019-06-09T12:14:31.000Z
2021-07-27T05:54:35.000Z
src/deepke/attribution_extraction/standard/tools/preprocess.py
807953261/DeepKE
f7efd3fc87d3bf88783a41efc3c09dca7a986013
[ "MIT" ]
183
2018-09-07T06:57:13.000Z
2021-08-01T08:50:15.000Z
import os import logging import sys sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "../"))) logger = logging.getLogger(__name__) __all__ = [ "_handle_pos_limit", "_add_pos_seq", "_convert_tokens_into_index", "_serialize_sentence", "_lm_serialize", "_add_attribute_data"...
39.735849
120
0.652105
import os import logging from collections import OrderedDict from typing import List, Dict from transformers import BertTokenizer from .serializer import Serializer from .vocab import Vocab import sys sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "../"))) from utils import save_pkl, load_csv ...
0
0
0
0
0
5,553
0
70
322
5edc2c6ddb5711b5e740c0c20e61715da9531459
2,055
py
Python
analysis/src/python/data_analysis/utils/df_utils.py
eartser/hyperstyle-analyze
58e2d361662e73e1e047919f57ab840055783b7a
[ "Apache-2.0" ]
1
2022-03-15T09:46:06.000Z
2022-03-15T09:46:06.000Z
analysis/src/python/data_analysis/utils/df_utils.py
eartser/hyperstyle-analyze
58e2d361662e73e1e047919f57ab840055783b7a
[ "Apache-2.0" ]
1
2022-02-14T13:53:38.000Z
2022-02-14T13:53:38.000Z
analysis/src/python/data_analysis/utils/df_utils.py
eartser/hyperstyle-analyze
58e2d361662e73e1e047919f57ab840055783b7a
[ "Apache-2.0" ]
3
2022-02-13T16:49:53.000Z
2022-02-17T13:53:07.000Z
from typing import Callable, Dict, List import pandas as pd from pandarallel import pandarallel def _apply_to_row(row: pd.Series, column: str, func: Callable) -> pd.Series: """ Apply `func` to data in `column` of dataframe's `raw`. """ copy_row = row.copy() copy_row[column] = func(copy_row[column]) ...
32.109375
119
0.684672
from typing import Callable, Dict, List import pandas as pd from pandarallel import pandarallel def _apply_to_row(row: pd.Series, column: str, func: Callable) -> pd.Series: """ Apply `func` to data in `column` of dataframe's `raw`. """ copy_row = row.copy() copy_row[column] = func(copy_row[column]) ...
0
0
0
0
0
0
0
0
0
a7c44c90af19ed84eb25c5b73c35daeb76b01bf2
988
py
Python
office_hours/utils.py
aiventimptner/farafmb.de
691ea0330b4b0f6e9984d75169132d5d66bb7368
[ "MIT" ]
1
2017-04-06T09:12:45.000Z
2017-04-06T09:12:45.000Z
office_hours/utils.py
aiventimptner/farafmb.de
691ea0330b4b0f6e9984d75169132d5d66bb7368
[ "MIT" ]
2
2017-09-07T22:09:50.000Z
2020-06-09T14:46:30.000Z
office_hours/utils.py
aiventimptner/farafmb.de
691ea0330b4b0f6e9984d75169132d5d66bb7368
[ "MIT" ]
null
null
null
import math from datetime import time from typing import List def time_to_seconds(time_: time) -> int: """Return total seconds from time object.""" minutes = time_.hour * 60 seconds = (time_.minute + minutes) * 60 return seconds def seconds_to_time(seconds: int) -> time: """Return time object f...
29.939394
98
0.676113
import math from datetime import time, timedelta, datetime, date from typing import List def time_to_seconds(time_: time) -> int: """Return total seconds from time object.""" minutes = time_.hour * 60 seconds = (time_.minute + minutes) * 60 return seconds def seconds_to_time(seconds: int) -> time: ...
0
0
0
0
0
0
0
27
0
0d74c33f8c31e07fb1098478dbf22098a1662735
1,044
py
Python
VideoObjectDetection.py
KAN-RYU/OpenCV-tutorial
76673e48a93a5cd452ec53110d9815ae339fc06d
[ "MIT" ]
1
2019-01-23T06:57:02.000Z
2019-01-23T06:57:02.000Z
VideoObjectDetection.py
KAN-RYU/OpenCV-tutorial
76673e48a93a5cd452ec53110d9815ae339fc06d
[ "MIT" ]
null
null
null
VideoObjectDetection.py
KAN-RYU/OpenCV-tutorial
76673e48a93a5cd452ec53110d9815ae339fc06d
[ "MIT" ]
null
null
null
import cv2 import numpy as np cap = cv2.VideoCapture("images/Circle.mp4") # http://layer0.authentise.com/segment-background-using-computer-vision.html fgbg = cv2.createBackgroundSubtractorMOG2(history=500, varThreshold=500, detectShadows=0) while(1): ret, frame = cap.read() fgmask = fgbg.apply(frame) ...
23.2
89
0.621648
import cv2 import numpy as np cap = cv2.VideoCapture("images/Circle.mp4") # 옵션 설명 http://layer0.authentise.com/segment-background-using-computer-vision.html fgbg = cv2.createBackgroundSubtractorMOG2(history=500, varThreshold=500, detectShadows=0) while(1): ret, frame = cap.read() fgmask = fgbg.apply(fram...
12
0
0
0
0
0
0
0
0
1a5ddb09f7621759c417ab1a115aaf6fc6222ace
3,987
py
Python
simple_ast.py
jjrscott/simple_ast
1a561f2aacae40d677707aa07a98d8fd395262d3
[ "MIT" ]
null
null
null
simple_ast.py
jjrscott/simple_ast
1a561f2aacae40d677707aa07a98d8fd395262d3
[ "MIT" ]
null
null
null
simple_ast.py
jjrscott/simple_ast
1a561f2aacae40d677707aa07a98d8fd395262d3
[ "MIT" ]
null
null
null
# `$ python3 simple_ast.py --help` for more information # MIT License # # Copyright (c) 2020 John Scott # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including with...
33.788136
144
0.64911
# `$ python3 simple_ast.py --help` for more information # MIT License # # Copyright (c) 2020 John Scott # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including with...
0
0
0
0
0
2,689
0
-40
135