hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
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
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f74e2a6887f06d7a47f504efd9514a2b0716bc0a
7,501
py
Python
routines/es/_routines/_vtst.py
cmulvihill/mechdriver
296cc3b4c154889c11470c7b82315b0382334b98
[ "Apache-2.0" ]
null
null
null
routines/es/_routines/_vtst.py
cmulvihill/mechdriver
296cc3b4c154889c11470c7b82315b0382334b98
[ "Apache-2.0" ]
null
null
null
routines/es/_routines/_vtst.py
cmulvihill/mechdriver
296cc3b4c154889c11470c7b82315b0382334b98
[ "Apache-2.0" ]
null
null
null
""" Run and Read the scans from VTST calculations """ import automol import autofile from routines.es._routines import sp from routines.es._routines import _wfn as wfn from routines.es._routines import _scan as scan from lib import filesys from lib.submission import qchem_params from lib.reaction import grid as rxngri...
35.889952
79
0.626183
import automol import autofile from routines.es._routines import sp from routines.es._routines import _wfn as wfn from routines.es._routines import _scan as scan from lib import filesys from lib.submission import qchem_params from lib.reaction import grid as rxngrid def radrad_scan(ts_zma, ts_info, hs_info, ...
true
true
f74e2b481266739896310173961edc9fd3a92e49
1,462
py
Python
app/lib/base/password_complexity.py
ctxis/crackerjack
f354cda0e1c6688527018361f24abf2114a77939
[ "MIT" ]
237
2020-03-26T12:39:24.000Z
2022-03-28T04:46:22.000Z
app/lib/base/password_complexity.py
FDlucifer/crackerjack
f828aeb7bef6788a179b2c617f9121e317a0eea1
[ "MIT" ]
18
2020-03-31T14:59:00.000Z
2022-03-19T08:37:07.000Z
app/lib/base/password_complexity.py
FDlucifer/crackerjack
f828aeb7bef6788a179b2c617f9121e317a0eea1
[ "MIT" ]
61
2020-03-29T13:53:54.000Z
2022-03-22T12:36:14.000Z
class PasswordComplexityManager: def __init__(self, min_length, min_lower, min_upper, min_digits, min_special): self.min_length = int(min_length) self.min_lower = int(min_lower) self.min_upper = int(min_upper) self.min_digits = int(min_digits) self.min_special = int(min...
33.227273
83
0.551984
class PasswordComplexityManager: def __init__(self, min_length, min_lower, min_upper, min_digits, min_special): self.min_length = int(min_length) self.min_lower = int(min_lower) self.min_upper = int(min_upper) self.min_digits = int(min_digits) self.min_special = int(min...
true
true
f74e2bb348159c1f51feda915a4b9ce7e35a63cb
24,544
py
Python
tccli/services/solar/solar_client.py
zqfan/tencentcloud-cli
b6ad9fced2a2b340087e4e5522121d405f68b615
[ "Apache-2.0" ]
null
null
null
tccli/services/solar/solar_client.py
zqfan/tencentcloud-cli
b6ad9fced2a2b340087e4e5522121d405f68b615
[ "Apache-2.0" ]
null
null
null
tccli/services/solar/solar_client.py
zqfan/tencentcloud-cli
b6ad9fced2a2b340087e4e5522121d405f68b615
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import os import json import tccli.options_define as OptionsDefine import tccli.format_output as FormatOutput from tccli import __version__ from tccli.utils import Utils from tccli.exceptions import ConfigurationError from tencentcloud.common import credential from tencentcloud.common.profile.ht...
42.099485
105
0.722009
import os import json import tccli.options_define as OptionsDefine import tccli.format_output as FormatOutput from tccli import __version__ from tccli.utils import Utils from tccli.exceptions import ConfigurationError from tencentcloud.common import credential from tencentcloud.common.profile.http_profile import HttpP...
true
true
f74e2c055fb4c6aec978eec83a92c73e86632317
675
py
Python
src/core/toga/widgets/image.py
Donyme/toga
2647c7dc5db248025847e3a60b115ff51d4a0d4a
[ "BSD-3-Clause" ]
null
null
null
src/core/toga/widgets/image.py
Donyme/toga
2647c7dc5db248025847e3a60b115ff51d4a0d4a
[ "BSD-3-Clause" ]
null
null
null
src/core/toga/widgets/image.py
Donyme/toga
2647c7dc5db248025847e3a60b115ff51d4a0d4a
[ "BSD-3-Clause" ]
null
null
null
from toga.platform import get_platform_factory class Image(object): """ Args: path (str): Path to the image. factory (:obj:`module`): A python module that is capable to return a implementation of this class with the same name. (optional & normally not needed) """ def __ini...
27
93
0.637037
from toga.platform import get_platform_factory class Image(object): def __init__(self, path, factory=None): self.factory = factory if factory else get_platform_factory() self._impl = self.factory.Image(interface=self) self.path = path @property def path(self): return self....
true
true
f74e2c30a54a58011da62691c2eb6209ea130c5f
32,652
py
Python
chatterbot/languages.py
nadimpayak/ChatBot
cce2377cb445000a5b2e3bc39b955276ae217740
[ "BSD-3-Clause" ]
6
2020-03-24T01:27:06.000Z
2021-05-12T02:24:55.000Z
venv/lib/python3.6/site-packages/chatterbot/languages.py
assaufianggie/VerraBot
cbe46ccb219c2972871e760268b427e1f8e79f93
[ "MIT" ]
null
null
null
venv/lib/python3.6/site-packages/chatterbot/languages.py
assaufianggie/VerraBot
cbe46ccb219c2972871e760268b427e1f8e79f93
[ "MIT" ]
2
2020-05-25T07:24:31.000Z
2021-09-17T09:14:25.000Z
class AAR: ISO_639_1 = '' ISO_639 = 'aar' ENGLISH_NAME = 'Afar' class ABK: ISO_639_1 = '' ISO_639 = 'abk' ENGLISH_NAME = 'Abkhazian' class ACE: ISO_639_1 = '' ISO_639 = 'ace' ENGLISH_NAME = 'Achinese' class ACH: ISO_639_1 = '' ISO_639 = 'ach' ENGLISH_NAME = 'Acoli' ...
13.542928
46
0.569153
class AAR: ISO_639_1 = '' ISO_639 = 'aar' ENGLISH_NAME = 'Afar' class ABK: ISO_639_1 = '' ISO_639 = 'abk' ENGLISH_NAME = 'Abkhazian' class ACE: ISO_639_1 = '' ISO_639 = 'ace' ENGLISH_NAME = 'Achinese' class ACH: ISO_639_1 = '' ISO_639 = 'ach' ENGLISH_NAME = 'Acoli' ...
true
true
f74e2c7d77b86c47c3dfc5969859cb1017662173
1,021
py
Python
data/contacts.py
ngalkina86/python_training-1
4908bcf553eca840bd7fa09711cd8f20d8ad4ea1
[ "Apache-2.0" ]
null
null
null
data/contacts.py
ngalkina86/python_training-1
4908bcf553eca840bd7fa09711cd8f20d8ad4ea1
[ "Apache-2.0" ]
null
null
null
data/contacts.py
ngalkina86/python_training-1
4908bcf553eca840bd7fa09711cd8f20d8ad4ea1
[ "Apache-2.0" ]
null
null
null
from model.contact import Contact testdata = [ Contact(firstname ="firstname", middlename ="middlename", lastname ="lastname", nickname ="nickname", title ="title", company ="company",address ="address", home ="home", mobile ="mobile", work ="work",fax ="fax", email = "email...
85.083333
125
0.589618
from model.contact import Contact testdata = [ Contact(firstname ="firstname", middlename ="middlename", lastname ="lastname", nickname ="nickname", title ="title", company ="company",address ="address", home ="home", mobile ="mobile", work ="work",fax ="fax", email = "email...
true
true
f74e2c8ed7556985e1ea42c54321609f976f36d5
7,345
py
Python
pipeline/improv.py
Dakad/HackSabamApp
03fb248f6c067febdc5d131d9cdc8fa82c80c40d
[ "MIT" ]
null
null
null
pipeline/improv.py
Dakad/HackSabamApp
03fb248f6c067febdc5d131d9cdc8fa82c80c40d
[ "MIT" ]
null
null
null
pipeline/improv.py
Dakad/HackSabamApp
03fb248f6c067febdc5d131d9cdc8fa82c80c40d
[ "MIT" ]
null
null
null
from skimage.filters import threshold_local import numpy as np import cv2 import imutils # https://github.com/yardstick17/image_text_reader/blob/master/image_preprocessing/remove_noise.py def _order_points_(pts): # initialzie a list of coordinates that will be ordered # such that the first entry in the list ...
33.692661
101
0.643567
from skimage.filters import threshold_local import numpy as np import cv2 import imutils def _order_points_(pts): rect = np.zeros((4, 2), dtype="float32") s = pts.sum(axis=1) rect[0] = pts[np.argmin(s)] rect[2] = pts[np.argmax(s)] diff = np.diff(pts...
true
true
f74e2d01bfb7fd5d65dc4a0ec37c2506d6b427ff
20,587
py
Python
datasette/facets.py
sipereira/datasette
b78522423e99a96922c9ad33289c83eeccb931ca
[ "Apache-2.0" ]
5,978
2017-11-13T21:59:52.000Z
2022-03-31T12:10:42.000Z
datasette/facets.py
sipereira/datasette
b78522423e99a96922c9ad33289c83eeccb931ca
[ "Apache-2.0" ]
1,482
2017-11-13T21:19:43.000Z
2022-03-31T07:45:26.000Z
datasette/facets.py
sipereira/datasette
b78522423e99a96922c9ad33289c83eeccb931ca
[ "Apache-2.0" ]
439
2017-11-13T22:03:30.000Z
2022-03-30T08:00:39.000Z
import json import urllib from datasette import hookimpl from datasette.database import QueryInterrupted from datasette.utils import ( escape_sqlite, path_with_added_args, path_with_removed_args, detect_json1, sqlite3, ) def load_facet_configs(request, table_metadata): # Given a request and th...
39.590385
88
0.471511
import json import urllib from datasette import hookimpl from datasette.database import QueryInterrupted from datasette.utils import ( escape_sqlite, path_with_added_args, path_with_removed_args, detect_json1, sqlite3, ) def load_facet_configs(request, table_metadata): ...
true
true
f74e2d813c7cf708beddaf6fe05950c536798b94
587
py
Python
web-frameworks/django/celeryWithDjango/publish/models.py
suroegin-learning/learn-python
be5bda86add0dcd6f2fd3db737bb7d0d3ec5f853
[ "MIT" ]
null
null
null
web-frameworks/django/celeryWithDjango/publish/models.py
suroegin-learning/learn-python
be5bda86add0dcd6f2fd3db737bb7d0d3ec5f853
[ "MIT" ]
null
null
null
web-frameworks/django/celeryWithDjango/publish/models.py
suroegin-learning/learn-python
be5bda86add0dcd6f2fd3db737bb7d0d3ec5f853
[ "MIT" ]
null
null
null
from django.db import models from django.utils import timezone from django.contrib.auth import get_user_model # Create your models here. class Post(models.Model): author = models.ForeignKey(get_user_model(), on_delete=models.CASCADE) created = models.DateTimeField('Created Date', default=timezone.now) ti...
34.529412
74
0.72402
from django.db import models from django.utils import timezone from django.contrib.auth import get_user_model class Post(models.Model): author = models.ForeignKey(get_user_model(), on_delete=models.CASCADE) created = models.DateTimeField('Created Date', default=timezone.now) title = models.CharField('Ti...
true
true
f74e2e305445c9d4ce3df2117c655cf8608d6ac4
2,261
py
Python
CLASSIC PUZZLE - MEDIUM/222-rubiks-cube-movements.py
martincourtois/CodinGame
4df9c8af5cb9c513880dd086da9bf3f201bd56ed
[ "Unlicense" ]
null
null
null
CLASSIC PUZZLE - MEDIUM/222-rubiks-cube-movements.py
martincourtois/CodinGame
4df9c8af5cb9c513880dd086da9bf3f201bd56ed
[ "Unlicense" ]
null
null
null
CLASSIC PUZZLE - MEDIUM/222-rubiks-cube-movements.py
martincourtois/CodinGame
4df9c8af5cb9c513880dd086da9bf3f201bd56ed
[ "Unlicense" ]
null
null
null
import sys import math import re import numpy as np FRONT = [ ( (2, 2), (2, 3), (3, 3), (3, 2), (2, 2) ), ( (1, 2), (2, 4), (4, 3), (3, 1), (1, 2) ), ( (1, 3), (3, 4), (4, 2), (2, 1), (1, 3) ) ] BACK = [ ( (2, 6), (2, 7), (3, 7), (3, 6), (2, 6) ), ( (2, 5), (0, 2), (3, 0), (5, 3), (2, 5) ), ( (0, 3),...
25.693182
65
0.418841
import sys import math import re import numpy as np FRONT = [ ( (2, 2), (2, 3), (3, 3), (3, 2), (2, 2) ), ( (1, 2), (2, 4), (4, 3), (3, 1), (1, 2) ), ( (1, 3), (3, 4), (4, 2), (2, 1), (1, 3) ) ] BACK = [ ( (2, 6), (2, 7), (3, 7), (3, 6), (2, 6) ), ( (2, 5), (0, 2), (3, 0), (5, 3), (2, 5) ), ( (0, 3),...
true
true
f74e2f5c2661ae0b7a0d6833059f2bec833d500a
1,494
py
Python
workflow/scripts/builder/gtf2protein_coding_genes.py
mtandon09/RNA-seek
1e812f7411f0047ed6e848584c64041da5f77fef
[ "MIT" ]
1
2022-03-19T14:22:22.000Z
2022-03-19T14:22:22.000Z
workflow/scripts/builder/gtf2protein_coding_genes.py
OpenOmics/RNA-seek
f953ae412a89a722a2d7b97827f08d6cc9570776
[ "MIT" ]
null
null
null
workflow/scripts/builder/gtf2protein_coding_genes.py
OpenOmics/RNA-seek
f953ae412a89a722a2d7b97827f08d6cc9570776
[ "MIT" ]
null
null
null
from __future__ import print_function import sys # USAGE # sys.argv[1] = genes.gtf # Example # $ python gtf2protein_coding_genes.py genes.gtf > protein_coding_genes.lst def get_value(mykey, lookup): try: myvalue = lookup[mykey] except KeyError: myvalue = '' return myvalue.strip('"').strip("'") def seperate...
23.34375
84
0.688086
from __future__ import print_function import sys def get_value(mykey, lookup): try: myvalue = lookup[mykey] except KeyError: myvalue = '' return myvalue.strip('"').strip("'") def seperated(pairslist): for kv in pairslist: k = kv.split(' ')[0] v = " ".join(kv.split(' ')[1:]).rstrip(';') yield k,v...
true
true
f74e306a726609571740d815d8d3bd83ea31e94d
1,127
py
Python
setup.py
the-moog/trac-includemacro
03216971736b366917711a955b16e2a034c93fed
[ "BSD-3-Clause" ]
null
null
null
setup.py
the-moog/trac-includemacro
03216971736b366917711a955b16e2a034c93fed
[ "BSD-3-Clause" ]
null
null
null
setup.py
the-moog/trac-includemacro
03216971736b366917711a955b16e2a034c93fed
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2007-2008 Noah Kantrowitz <noah@coderanger.net> # Copyright (C) 2012 Ryan J Ollos <ryan.j.ollos@gmail.com> # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution....
28.897436
95
0.670807
import os.path from setuptools import setup setup( name='TracIncludeMacro', version='4.0.0', packages=['includemacro'], author='Noah Kantrowitz', author_email='noah@coderanger.net', maintainer='Ryan J Ollos', maintainer_email='ryan.j.ollos@gmail.com', description='Include th...
true
true
f74e31c8153afe5250c8deec735a6fa37bb5394e
5,681
py
Python
tests/cli/config/test_set.py
ashemedai/hatch
9ec00d5e027c992efbc16dd777b1f6926368b6bf
[ "MIT" ]
null
null
null
tests/cli/config/test_set.py
ashemedai/hatch
9ec00d5e027c992efbc16dd777b1f6926368b6bf
[ "MIT" ]
null
null
null
tests/cli/config/test_set.py
ashemedai/hatch
9ec00d5e027c992efbc16dd777b1f6926368b6bf
[ "MIT" ]
null
null
null
def test_standard(hatch, config_file, helpers): result = hatch('config', 'set', 'project', 'foo') assert result.exit_code == 0, result.output assert result.output == helpers.dedent( """ New setting: project = "foo" """ ) config_file.load() assert config_file.mod...
25.59009
91
0.591269
def test_standard(hatch, config_file, helpers): result = hatch('config', 'set', 'project', 'foo') assert result.exit_code == 0, result.output assert result.output == helpers.dedent( """ New setting: project = "foo" """ ) config_file.load() assert config_file.mod...
true
true
f74e3222c8e946c690d9d66b3030c979cfd0b397
3,090
py
Python
Python3Lab/project/v3/main.py
YeoGiyong/HelloPython3
81e56b6748da8f8dd818af943f5d98ef384f109e
[ "Apache-2.0" ]
null
null
null
Python3Lab/project/v3/main.py
YeoGiyong/HelloPython3
81e56b6748da8f8dd818af943f5d98ef384f109e
[ "Apache-2.0" ]
null
null
null
Python3Lab/project/v3/main.py
YeoGiyong/HelloPython3
81e56b6748da8f8dd818af943f5d98ef384f109e
[ "Apache-2.0" ]
null
null
null
import sys from . import sjvo, sjsrv class SungJukV3Main: #성적 처리 서비스 객체 생성 sjsrv = sjsrv.SungJukService() #메뉴표시 def displayMenu(self): str_list = [] str_list.append(' -= 성적 처리 프로그램 v3 =-\n') str_list.append('----------------------------\n') str_list.append(' 1: 새로운 성적데...
29.150943
62
0.526214
import sys from . import sjvo, sjsrv class SungJukV3Main: sjsrv = sjsrv.SungJukService() def displayMenu(self): str_list = [] str_list.append(' -= 성적 처리 프로그램 v3 =-\n') str_list.append('----------------------------\n') str_list.append(' 1: 새로운 성적데이터 추가 \n') st...
true
true
f74e32c30eec178b928efc81471d1a8efb822ff3
2,772
py
Python
surveysite/survey/views.py
cicorias/njit-is601-project
f383d52525a8d3358038cbccd8039bac0b64d723
[ "Apache-2.0" ]
null
null
null
surveysite/survey/views.py
cicorias/njit-is601-project
f383d52525a8d3358038cbccd8039bac0b64d723
[ "Apache-2.0" ]
3
2020-07-26T15:26:24.000Z
2021-09-22T19:31:13.000Z
surveysite/survey/views.py
cicorias/njit-is601-project
f383d52525a8d3358038cbccd8039bac0b64d723
[ "Apache-2.0" ]
null
null
null
from typing import Tuple, Any, Dict import uuid from django.http import (HttpResponse, HttpRequest, Http404, HttpResponseRedirect, JsonResponse) from django.views.generic import ListView, View, TemplateView from django....
31.5
85
0.619408
from typing import Tuple, Any, Dict import uuid from django.http import (HttpResponse, HttpRequest, Http404, HttpResponseRedirect, JsonResponse) from django.views.generic import ListView, View, TemplateView from django....
true
true
f74e340bb863ab04b403c5cdda9ca57c592b0438
210
py
Python
notification/urls.py
lmorchard/django-notification
728df05ce6e8921862a42bb647adae27a6fa9e22
[ "MIT" ]
null
null
null
notification/urls.py
lmorchard/django-notification
728df05ce6e8921862a42bb647adae27a6fa9e22
[ "MIT" ]
null
null
null
notification/urls.py
lmorchard/django-notification
728df05ce6e8921862a42bb647adae27a6fa9e22
[ "MIT" ]
null
null
null
from django.conf.urls.defaults import patterns, url from notification.views import notice_settings urlpatterns = patterns("", url(r"^settings/$", notice_settings, name="notification_notice_settings"), )
23.333333
78
0.77619
from django.conf.urls.defaults import patterns, url from notification.views import notice_settings urlpatterns = patterns("", url(r"^settings/$", notice_settings, name="notification_notice_settings"), )
true
true
f74e352d863c1abc31b03d3439db50415ba85d61
5,867
py
Python
src/plot.py
ConorDevilly/bar_speed
7a48a21b7dc9794b99a0f65c59a12f7f65d385e6
[ "MIT" ]
null
null
null
src/plot.py
ConorDevilly/bar_speed
7a48a21b7dc9794b99a0f65c59a12f7f65d385e6
[ "MIT" ]
null
null
null
src/plot.py
ConorDevilly/bar_speed
7a48a21b7dc9794b99a0f65c59a12f7f65d385e6
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import argparse import numpy as np class BarGraph(): """ Loads data from a log file Has ability to display three graphs: Speed, Acceleration and Power """ def load_data(self, path_to_data): """Parse necessary data from a file""" with open(path_to_da...
35.77439
113
0.638827
import matplotlib.pyplot as plt import argparse import numpy as np class BarGraph(): def load_data(self, path_to_data): with open(path_to_data, 'r') as log: lines = log.readlines() self.distance_data = self._load_distance_data(lines) self.cm_multiplier = self._load_cm_...
true
true
f74e3574d2fe5c321480db90441cbe998019b4ee
1,797
py
Python
dataset-snippets/summarize_a_survey_by_question_concept_id.py
rfrancis1/workbench-snippets
0c49b55b65d808cbf94b429e340cedaf62b2eeda
[ "BSD-3-Clause" ]
3
2019-05-14T21:10:35.000Z
2021-02-25T04:53:41.000Z
dataset-snippets/summarize_a_survey_by_question_concept_id.py
rfrancis1/workbench-snippets
0c49b55b65d808cbf94b429e340cedaf62b2eeda
[ "BSD-3-Clause" ]
42
2019-05-13T20:27:45.000Z
2022-01-05T19:42:19.000Z
dataset-snippets/summarize_a_survey_by_question_concept_id.py
rfrancis1/workbench-snippets
0c49b55b65d808cbf94b429e340cedaf62b2eeda
[ "BSD-3-Clause" ]
4
2019-05-13T13:23:58.000Z
2021-06-23T16:21:37.000Z
# Use snippet 'summarize_a_survey_module' to output a table and a graph of # participant counts by response for one question_concept_id # The snippet assumes that a dataframe containing survey questions and answers already exists # The snippet also assumes that setup has been run # Update the next 3 lines survey_df =...
46.076923
128
0.613244
survey_df = YOUR_DATASET_NAME_survey_df question_concept_id = 1585940 denominator = None
true
true
f74e359cfb83844239e6a1d3a21164cea412b971
253
py
Python
Notebook/utils/tools/unfile.py
XinetAI/CVX
c4cbcf9062a156819b33d0da1584a03026555a82
[ "MIT" ]
17
2019-01-28T01:46:00.000Z
2021-11-18T16:16:55.000Z
Notebook/utils/tools/unfile.py
XinetAI/CVX
c4cbcf9062a156819b33d0da1584a03026555a82
[ "MIT" ]
null
null
null
Notebook/utils/tools/unfile.py
XinetAI/CVX
c4cbcf9062a156819b33d0da1584a03026555a82
[ "MIT" ]
6
2019-12-18T09:31:09.000Z
2022-03-09T09:04:30.000Z
import tarfile import os def untar(tar_name, root): ''' 解压 tar.gz 文件并返回路径 root:解压的根目录 ''' with tarfile.open(tar_name) as tar: tar.extractall(root) tar_root = tar.getnames()[0] return os.path.join(root, tar_root)
19.461538
39
0.624506
import tarfile import os def untar(tar_name, root): with tarfile.open(tar_name) as tar: tar.extractall(root) tar_root = tar.getnames()[0] return os.path.join(root, tar_root)
true
true
f74e36238e579442e28eb6340318668a6f53a997
6,610
py
Python
factory-ai-vision/EdgeSolution/modules/OVMSAdaptorModule/app/ovms_batchImageProcessor.py
michellechena/azure-intelligent-edge-patterns
b1260b962b208880532391e7ef2148d240f489f8
[ "MIT" ]
null
null
null
factory-ai-vision/EdgeSolution/modules/OVMSAdaptorModule/app/ovms_batchImageProcessor.py
michellechena/azure-intelligent-edge-patterns
b1260b962b208880532391e7ef2148d240f489f8
[ "MIT" ]
null
null
null
factory-ai-vision/EdgeSolution/modules/OVMSAdaptorModule/app/ovms_batchImageProcessor.py
michellechena/azure-intelligent-edge-patterns
b1260b962b208880532391e7ef2148d240f489f8
[ "MIT" ]
null
null
null
import logging from PIL import Image, ImageDraw import io import numpy as np from tensorflow import make_tensor_proto, make_ndarray import cv2 import inferencing_pb2 import media_pb2 import extension_pb2 import os import ovms import time from cascade.voe_to_ovms import load_voe_config_from_json, voe_config_to_ovms_con...
37.988506
146
0.515582
import logging from PIL import Image, ImageDraw import io import numpy as np from tensorflow import make_tensor_proto, make_ndarray import cv2 import inferencing_pb2 import media_pb2 import extension_pb2 import os import ovms import time from cascade.voe_to_ovms import load_voe_config_from_json, voe_config_to_ovms_con...
true
true
f74e3625bc392738d6c161f600dbdc4f60a0f932
23,313
py
Python
tf_agents/bandits/agents/greedy_reward_prediction_agent_test.py
anair13/agents
ef7fb0aba6fb3c00cad20abdc6d181cbbb3f77df
[ "Apache-2.0" ]
3,175
2017-09-08T18:28:32.000Z
2022-03-31T01:32:22.000Z
tf_agents/bandits/agents/greedy_reward_prediction_agent_test.py
MFosset/agents
756f7bdf493986c25eb585438134f1dbb8045b1b
[ "Apache-2.0" ]
703
2017-09-18T05:51:57.000Z
2022-03-31T17:37:50.000Z
tf_agents/bandits/agents/greedy_reward_prediction_agent_test.py
MFosset/agents
756f7bdf493986c25eb585438134f1dbb8045b1b
[ "Apache-2.0" ]
844
2017-09-08T23:28:57.000Z
2022-03-30T09:29:32.000Z
# coding=utf-8 # Copyright 2020 The TF-Agents Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
41.482206
83
0.687127
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import tensorflow as tf from tf_agents.bandits.agents import greedy_reward_prediction_agent as greedy_agent from tf_agents.bandits.drivers import driver_utils from tf_agents...
true
true
f74e36fe664f05eff385e7dee94abbcf61134cdb
450
py
Python
setup.py
hayescr/flexce
d3f52adb9e729c530c43e3a57bf4c2be26d78374
[ "MIT" ]
9
2016-05-02T19:43:00.000Z
2018-01-09T08:25:28.000Z
setup.py
hayescr/flexce
d3f52adb9e729c530c43e3a57bf4c2be26d78374
[ "MIT" ]
4
2016-06-03T12:03:08.000Z
2018-05-30T20:19:42.000Z
setup.py
hayescr/flexce
d3f52adb9e729c530c43e3a57bf4c2be26d78374
[ "MIT" ]
6
2019-02-27T04:13:11.000Z
2022-02-11T14:03:52.000Z
from distutils.core import setup NAME = 'flexCE' # do not use x.x.x-dev. things complain. instead use x.x.xdev VERSION = '1.0.1dev' RELEASE = 'dev' not in VERSION setup(name=NAME, version=VERSION, description='Flexible Galactic Chemical Evolution Model', author='Brett Andrews', author_email=...
28.125
63
0.675556
from distutils.core import setup NAME = 'flexCE' VERSION = '1.0.1dev' RELEASE = 'dev' not in VERSION setup(name=NAME, version=VERSION, description='Flexible Galactic Chemical Evolution Model', author='Brett Andrews', author_email='brett.h.andrews@gmail.com', url='https://github.com/bret...
true
true
f74e3771f1bd9b90f5aa0ef2d13ae033183f31d7
17,219
py
Python
great_expectations/core/evaluation_parameters.py
jaibirsingh/great_expectations
ec7679debbf17495fab490f1b3ddfa9f4f0ae8d7
[ "Apache-2.0" ]
null
null
null
great_expectations/core/evaluation_parameters.py
jaibirsingh/great_expectations
ec7679debbf17495fab490f1b3ddfa9f4f0ae8d7
[ "Apache-2.0" ]
null
null
null
great_expectations/core/evaluation_parameters.py
jaibirsingh/great_expectations
ec7679debbf17495fab490f1b3ddfa9f4f0ae8d7
[ "Apache-2.0" ]
null
null
null
import copy import datetime import logging import math import operator import traceback from collections import namedtuple from typing import Any, Dict, Optional from pyparsing import ( CaselessKeyword, Combine, Forward, Group, Literal, ParseException, Regex, Suppress, Word, alp...
39.312785
120
0.59353
import copy import datetime import logging import math import operator import traceback from collections import namedtuple from typing import Any, Dict, Optional from pyparsing import ( CaselessKeyword, Combine, Forward, Group, Literal, ParseException, Regex, Suppress, Word, alp...
true
true
f74e38c6504d925b8a3767327fcaacbb6f846c13
2,027
py
Python
DANN_WGAN_EDSR/utils/options.py
TiagoCortinhal/SR_GAN
9ccceaa25e87e404d20825dbb552fa6a2ef3af47
[ "MIT" ]
4
2019-05-21T02:56:31.000Z
2019-07-04T13:34:29.000Z
DANN_WGAN_EDSR/utils/options.py
TiagoCortinhal/ADASR
9ccceaa25e87e404d20825dbb552fa6a2ef3af47
[ "MIT" ]
null
null
null
DANN_WGAN_EDSR/utils/options.py
TiagoCortinhal/ADASR
9ccceaa25e87e404d20825dbb552fa6a2ef3af47
[ "MIT" ]
null
null
null
import argparse parser = argparse.ArgumentParser() parser.add_argument('--n_workers', type=int, default=10, help='number of data loading workers') parser.add_argument('--batch-size', type=int, default=100, help='input batch size') parse...
28.957143
76
0.541687
import argparse parser = argparse.ArgumentParser() parser.add_argument('--n_workers', type=int, default=10, help='number of data loading workers') parser.add_argument('--batch-size', type=int, default=100, help='input batch size') parse...
true
true
f74e390128dc882464457b05137d7803983dd347
91,771
py
Python
indra/assemblers/pysb/assembler.py
zebulon2/indra
7727ddcab52ad8012eb6592635bfa114e904bd48
[ "BSD-2-Clause" ]
136
2016-02-11T22:06:37.000Z
2022-03-31T17:26:20.000Z
indra/assemblers/pysb/assembler.py
zebulon2/indra
7727ddcab52ad8012eb6592635bfa114e904bd48
[ "BSD-2-Clause" ]
748
2016-02-03T16:27:56.000Z
2022-03-09T14:27:54.000Z
indra/assemblers/pysb/assembler.py
zebulon2/indra
7727ddcab52ad8012eb6592635bfa114e904bd48
[ "BSD-2-Clause" ]
56
2015-08-28T14:03:44.000Z
2022-02-04T06:15:55.000Z
import re import math import json import logging import itertools from pysb import Model, Monomer, Parameter, Expression, Observable, Rule, \ Annotation, ComponentDuplicateNameError, ComplexPattern, \ ReactionPattern, ANY, WILD, InvalidInitialConditionError from pysb.core import SelfExporter from pysb.pattern ...
41.338288
79
0.625383
import re import math import json import logging import itertools from pysb import Model, Monomer, Parameter, Expression, Observable, Rule, \ Annotation, ComponentDuplicateNameError, ComplexPattern, \ ReactionPattern, ANY, WILD, InvalidInitialConditionError from pysb.core import SelfExporter from pysb.pattern ...
true
true
f74e39666c9e79f9fae136aa0d0e302c90c8ab41
5,664
py
Python
isi_sdk_9_0_0/isi_sdk_9_0_0/models/cluster_node_status_capacity_item.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
24
2018-06-22T14:13:23.000Z
2022-03-23T01:21:26.000Z
isi_sdk_9_0_0/isi_sdk_9_0_0/models/cluster_node_status_capacity_item.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
46
2018-04-30T13:28:22.000Z
2022-03-21T21:11:07.000Z
isi_sdk_9_0_0/isi_sdk_9_0_0/models/cluster_node_status_capacity_item.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
29
2018-06-19T00:14:04.000Z
2022-02-08T17:51:19.000Z
# coding: utf-8 """ Isilon SDK Isilon SDK - Language bindings for the OneFS API # noqa: E501 OpenAPI spec version: 10 Contact: sdk@isilon.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class ClusterNodeStatusCapacity...
30.95082
132
0.581568
import pprint import re import six class ClusterNodeStatusCapacityItem(object): swagger_types = { 'bytes': 'int', 'count': 'int', 'type': 'str' } attribute_map = { 'bytes': 'bytes', 'count': 'count', 'type': 'type' } def __init__(self, byte...
true
true
f74e39f9d2997db4eaca84a74df1e76c804fdb50
2,401
py
Python
my_blog/urls.py
jonneyhu/lynchow
2172d521ed53375f5c260535ba31ad0ff1873c0d
[ "MIT" ]
1
2020-06-18T02:40:25.000Z
2020-06-18T02:40:25.000Z
my_blog/urls.py
jonneyhu/lynchow
2172d521ed53375f5c260535ba31ad0ff1873c0d
[ "MIT" ]
null
null
null
my_blog/urls.py
jonneyhu/lynchow
2172d521ed53375f5c260535ba31ad0ff1873c0d
[ "MIT" ]
null
null
null
"""my_blog URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-ba...
42.875
113
0.734277
from django.conf.urls import url, include from django.conf.urls.static import static from django.conf import settings from django.contrib import admin from django.views.generic import TemplateView from django.contrib.sitemaps.views import sitemap from blog.sitemaps import ArticleSitemap, CategorySitemap, TagSitemap fr...
true
true
f74e3a4e0591a4674b67462e5f37ea6a2bd21d3f
7,019
py
Python
pypy/module/_csv/interp_csv.py
wdv4758h/mu-client-pypy
d2fcc01f0b4fe3ffa232762124e3e6d38ed3a0cf
[ "Apache-2.0", "OpenSSL" ]
34
2015-07-09T04:53:27.000Z
2021-07-19T05:22:27.000Z
pypy/module/_csv/interp_csv.py
wdv4758h/mu-client-pypy
d2fcc01f0b4fe3ffa232762124e3e6d38ed3a0cf
[ "Apache-2.0", "OpenSSL" ]
6
2015-05-30T17:20:45.000Z
2017-06-12T14:29:23.000Z
pypy/module/_csv/interp_csv.py
wdv4758h/mu-client-pypy
d2fcc01f0b4fe3ffa232762124e3e6d38ed3a0cf
[ "Apache-2.0", "OpenSSL" ]
11
2015-09-07T14:26:08.000Z
2020-04-10T07:20:41.000Z
from pypy.interpreter.baseobjspace import W_Root from pypy.interpreter.error import OperationError, oefmt from pypy.interpreter.typedef import TypeDef, interp_attrproperty from pypy.interpreter.typedef import GetSetProperty from pypy.interpreter.gateway import interp2app QUOTE_MINIMAL, QUOTE_ALL, QUOTE_NONNUMERIC, QU...
38.994444
88
0.634848
from pypy.interpreter.baseobjspace import W_Root from pypy.interpreter.error import OperationError, oefmt from pypy.interpreter.typedef import TypeDef, interp_attrproperty from pypy.interpreter.typedef import GetSetProperty from pypy.interpreter.gateway import interp2app QUOTE_MINIMAL, QUOTE_ALL, QUOTE_NONNUMERIC, QU...
true
true
f74e3ae65d1523ef7c5b7686020908fce6995ebc
821
py
Python
custom_components/waste_collection_schedule/package/source/example.py
trstns/hacs_waste_collection_schedule
f8f297b43c8e87510e17a558347a88a95f790d7b
[ "MIT" ]
null
null
null
custom_components/waste_collection_schedule/package/source/example.py
trstns/hacs_waste_collection_schedule
f8f297b43c8e87510e17a558347a88a95f790d7b
[ "MIT" ]
null
null
null
custom_components/waste_collection_schedule/package/source/example.py
trstns/hacs_waste_collection_schedule
f8f297b43c8e87510e17a558347a88a95f790d7b
[ "MIT" ]
null
null
null
import datetime from typing import Dict from ..helpers import CollectionAppointment DESCRIPTION = "Example scraper" URL = "" TEST_CASES: Dict[str, Dict[str, str]] = {} class Source: def __init__(self, days=20, per_day=2, types=5): self._days = days self._per_day = per_day self._types = t...
24.147059
63
0.527406
import datetime from typing import Dict from ..helpers import CollectionAppointment DESCRIPTION = "Example scraper" URL = "" TEST_CASES: Dict[str, Dict[str, str]] = {} class Source: def __init__(self, days=20, per_day=2, types=5): self._days = days self._per_day = per_day self._types = t...
true
true
f74e3aff928e3004201c240cd1e7775e1a0f9766
82,758
py
Python
ocrd_tesserocr/recognize.py
OCR-D/ocrd_tesserocr
ac274656bfb7021ccd752bccd947e53403b4a909
[ "MIT" ]
37
2018-04-16T20:18:25.000Z
2022-03-06T09:06:12.000Z
ocrd_tesserocr/recognize.py
OCR-D/ocrd_tesserocr
ac274656bfb7021ccd752bccd947e53403b4a909
[ "MIT" ]
162
2018-04-18T12:17:53.000Z
2022-03-09T11:07:36.000Z
ocrd_tesserocr/recognize.py
OCR-D/ocrd_tesserocr
ac274656bfb7021ccd752bccd947e53403b4a909
[ "MIT" ]
12
2018-04-11T11:56:22.000Z
2021-02-12T15:12:13.000Z
from __future__ import absolute_import import os.path import math from PIL import Image, ImageStat import numpy as np from shapely.geometry import Polygon, asPolygon from shapely.ops import unary_union from tesserocr import ( RIL, PSM, PT, OEM, Orientation, WritingDirection, TextlineOrder, tesserac...
53.016015
208
0.576838
from __future__ import absolute_import import os.path import math from PIL import Image, ImageStat import numpy as np from shapely.geometry import Polygon, asPolygon from shapely.ops import unary_union from tesserocr import ( RIL, PSM, PT, OEM, Orientation, WritingDirection, TextlineOrder, tesserac...
true
true
f74e3b6dd74cfec24a35efa0a5e5eccb8e1b060f
196
py
Python
livro-trilhas-python/laco.py
actiago/estudos.py
c0aeca05dfc80b6f22e977f26bae3af9af3cbe1a
[ "MIT" ]
2
2020-10-06T12:15:39.000Z
2020-10-06T12:39:03.000Z
livro-trilhas-python/laco.py
actiago/estudos.py
c0aeca05dfc80b6f22e977f26bae3af9af3cbe1a
[ "MIT" ]
null
null
null
livro-trilhas-python/laco.py
actiago/estudos.py
c0aeca05dfc80b6f22e977f26bae3af9af3cbe1a
[ "MIT" ]
null
null
null
a = int(input("Digite um número: ")) if(a < 10): print("O valor de a é menor que 10") elif(a == 10): print("O valor de a é igual a 10") else: print("O valor de a é maior que 10")
21.777778
44
0.571429
a = int(input("Digite um número: ")) if(a < 10): print("O valor de a é menor que 10") elif(a == 10): print("O valor de a é igual a 10") else: print("O valor de a é maior que 10")
true
true
f74e3c3740e1260be82e8380f40e7256faf80ebc
299
py
Python
script/test.py
colinsongf/opinion_reader_bert
ec036fb27161ba454b865e387ed601fe10f57b28
[ "Apache-2.0" ]
null
null
null
script/test.py
colinsongf/opinion_reader_bert
ec036fb27161ba454b865e387ed601fe10f57b28
[ "Apache-2.0" ]
null
null
null
script/test.py
colinsongf/opinion_reader_bert
ec036fb27161ba454b865e387ed601fe10f57b28
[ "Apache-2.0" ]
null
null
null
import tensorflow as tf print(tf.__version__) with tf.device('/device:GPU:0'): a = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[2, 3], name='a') b = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[3, 2], name='b') sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))
33.222222
73
0.622074
import tensorflow as tf print(tf.__version__) with tf.device('/device:GPU:0'): a = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[2, 3], name='a') b = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[3, 2], name='b') sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))
true
true
f74e3c8b126c93bd990ce161db18835f24a0c64f
1,957
py
Python
Fig4C.py
mansueto-institute/Urban-Growth-Emergent-Statistics
429f24f7c6c4fdd229b9c9f818197f56910b466d
[ "MIT" ]
1
2022-03-24T03:08:42.000Z
2022-03-24T03:08:42.000Z
Fig4C.py
mansueto-institute/Urban-Growth-Emergent-Statistics
429f24f7c6c4fdd229b9c9f818197f56910b466d
[ "MIT" ]
null
null
null
Fig4C.py
mansueto-institute/Urban-Growth-Emergent-Statistics
429f24f7c6c4fdd229b9c9f818197f56910b466d
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import numpy as np import matplotlib.mlab as mlab import scipy.stats as stats bbar=0.2 abar=0.1 K1=2. # This is like Hook's constant or the curvature of the potential that keeps the noise localized #K0=5. K0=(4.*K1)**0.5 # This is the damping K2=0. # This is like a mass correction. ...
19
103
0.626469
import matplotlib.pyplot as plt import numpy as np import matplotlib.mlab as mlab import scipy.stats as stats bbar=0.2 abar=0.1 K1=2. #K0=5. K0=(4.*K1)**0.5 # This is the damping K2=0. # This is like a mass correction. mu=0. var = 0.0001 sigma= var**0.5 v_error=[] v_PV=[] END=100 #initializations Dt=.2 p_error...
true
true
f74e3ca1802181eb51e28241cd708be18dda9632
4,055
py
Python
homeassistant/components/rachio/binary_sensor.py
petewill/home-assistant
5859dba4344f05fb8774aa1207e47ac28f627a67
[ "Apache-2.0" ]
3
2020-01-21T18:09:09.000Z
2022-01-17T08:06:03.000Z
homeassistant/components/rachio/binary_sensor.py
petewill/home-assistant
5859dba4344f05fb8774aa1207e47ac28f627a67
[ "Apache-2.0" ]
39
2016-12-16T12:40:34.000Z
2017-02-13T17:53:42.000Z
homeassistant/components/rachio/binary_sensor.py
petewill/home-assistant
5859dba4344f05fb8774aa1207e47ac28f627a67
[ "Apache-2.0" ]
6
2020-04-10T06:21:11.000Z
2021-07-01T08:53:38.000Z
"""Integration with the Rachio Iro sprinkler system controller.""" from abc import abstractmethod import logging from homeassistant.components.binary_sensor import BinarySensorDevice from homeassistant.helpers.dispatcher import dispatcher_connect from . import ( DOMAIN as DOMAIN_RACHIO, KEY_DEVICE_ID, KEY...
31.679688
88
0.653761
from abc import abstractmethod import logging from homeassistant.components.binary_sensor import BinarySensorDevice from homeassistant.helpers.dispatcher import dispatcher_connect from . import ( DOMAIN as DOMAIN_RACHIO, KEY_DEVICE_ID, KEY_STATUS, KEY_SUBTYPE, SIGNAL_RACHIO_CONTROLLER_UPDATE, ...
true
true
f74e3d42a81f7e0ae4fd18bac20ba5da733ecf2d
234
py
Python
web/server.py
yvanwangl/pythonLesson
5b3892465a321b9f749ffda623f5871656bde608
[ "MIT" ]
null
null
null
web/server.py
yvanwangl/pythonLesson
5b3892465a321b9f749ffda623f5871656bde608
[ "MIT" ]
null
null
null
web/server.py
yvanwangl/pythonLesson
5b3892465a321b9f749ffda623f5871656bde608
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from wsgiref.simple_server import make_server from hello import application http_server = make_server('', 8080, application) print('Server on port 8080...') http_server.serve_forever()
23.4
48
0.747863
from wsgiref.simple_server import make_server from hello import application http_server = make_server('', 8080, application) print('Server on port 8080...') http_server.serve_forever()
true
true
f74e3d831fbdb284a86e5b5d3abb3ddc063ebcbb
2,919
py
Python
azure-mgmt-network/azure/mgmt/network/v2018_11_01/models/backend_address_pool.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2021-09-07T18:36:04.000Z
2021-09-07T18:36:04.000Z
azure-mgmt-network/azure/mgmt/network/v2018_11_01/models/backend_address_pool.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
2
2019-10-02T23:37:38.000Z
2020-10-02T01:17:31.000Z
azure-mgmt-network/azure/mgmt/network/v2018_11_01/models/backend_address_pool.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "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 ...
42.304348
128
0.654676
from .sub_resource import SubResource class BackendAddressPool(SubResource): _validation = { 'backend_ip_configurations': {'readonly': True}, 'load_balancing_rules': {'readonly': True}, 'outbound_rule': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id...
true
true
f74e3e951df7d5135ceb0e05fab862538a9570d8
5,413
py
Python
rule_30/rule_30.py
warwickdatascience/podcast-animations
b2b477ab6f2fe220715a95bb850c89501ed3d08b
[ "MIT" ]
null
null
null
rule_30/rule_30.py
warwickdatascience/podcast-animations
b2b477ab6f2fe220715a95bb850c89501ed3d08b
[ "MIT" ]
1
2020-06-06T11:14:29.000Z
2020-06-06T11:14:29.000Z
rule_30/rule_30.py
warwickdatascience/podcast-animations
b2b477ab6f2fe220715a95bb850c89501ed3d08b
[ "MIT" ]
null
null
null
"""Generate an animation of the cellular automaton Rule 30.""" import json import os import pathlib import shutil import subprocess import tempfile import colour import cv2 import imageio import numpy as np import scipy.signal as sg import tqdm # Global parameters CONFIG_PATH = 'config/full.json' FFMPEG_PATH = '/usr...
32.413174
78
0.56974
import json import os import pathlib import shutil import subprocess import tempfile import colour import cv2 import imageio import numpy as np import scipy.signal as sg import tqdm CONFIG_PATH = 'config/full.json' FFMPEG_PATH = '/usr/bin/ffmpeg' with open(CONFIG_PATH) as f: config = json.load(f) VIDEO_WI...
true
true
f74e3f79d9032c8e99379ec9e0f557b803ec660a
28,606
py
Python
bokeh/document/events.py
dkapitan/bokeh
d518cecd1d9919db49e3c0033e8c1b89db9965bf
[ "BSD-3-Clause" ]
1
2020-03-12T07:02:04.000Z
2020-03-12T07:02:04.000Z
bokeh/document/events.py
dkapitan/bokeh
d518cecd1d9919db49e3c0033e8c1b89db9965bf
[ "BSD-3-Clause" ]
1
2021-05-11T04:37:17.000Z
2021-05-11T04:37:17.000Z
bokeh/document/events.py
dkapitan/bokeh
d518cecd1d9919db49e3c0033e8c1b89db9965bf
[ "BSD-3-Clause" ]
1
2020-03-06T07:38:50.000Z
2020-03-06T07:38:50.000Z
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2020, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
33.973872
121
0.561456
import logging log = logging.getLogger(__name__) from ..util.dependencies import import_optional pd = import_optional('pandas') __all__ = ( 'ColumnDataChangedEvent', 'ColumnsStreamedEvent', 'ColumnsPatchedEvent', 'DocumentChangedEvent', 'DocumentPatchedEvent', 'ModelChange...
true
true
f74e40bb5b3e854e4af37dee8a405af867555f4b
6,389
py
Python
pose_camera_rpi.py
GrauleM/project-posenet
4f9cb6bcf227e1203211823b2af99c463557a1b3
[ "Apache-2.0" ]
null
null
null
pose_camera_rpi.py
GrauleM/project-posenet
4f9cb6bcf227e1203211823b2af99c463557a1b3
[ "Apache-2.0" ]
null
null
null
pose_camera_rpi.py
GrauleM/project-posenet
4f9cb6bcf227e1203211823b2af99c463557a1b3
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
38.029762
98
0.669432
import argparse import collections from functools import partial import re import time import numpy as np from PIL import Image import svgwrite import gstreamer_rpi as gstreamer from pose_engine import PoseEngine from pose_engine import KeypointType EDGES = ( (KeypointType.NOSE, KeypointType.LEFT_E...
true
true
f74e413462485792cfeac1ed30e015ec7d596664
2,273
py
Python
arjuna-samples/arjex/test/pkg/webui_adv/check_webuiadv_09_element_waiters.py
ChandraMouliDisturbs/arjuna
4965622fbb01a5e5b6459110c413accc5c483424
[ "Apache-2.0" ]
null
null
null
arjuna-samples/arjex/test/pkg/webui_adv/check_webuiadv_09_element_waiters.py
ChandraMouliDisturbs/arjuna
4965622fbb01a5e5b6459110c413accc5c483424
[ "Apache-2.0" ]
null
null
null
arjuna-samples/arjex/test/pkg/webui_adv/check_webuiadv_09_element_waiters.py
ChandraMouliDisturbs/arjuna
4965622fbb01a5e5b6459110c413accc5c483424
[ "Apache-2.0" ]
null
null
null
# This file is a part of Arjuna # Copyright 2015-2020 Rahul Verma # Website: www.RahulVerma.net # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0...
33.925373
93
0.721953
from arjuna import * @test def check_wait_until_absent_nested(request, logged_in_wordpress): logged_in_wordpress.element(id="adminmenu").wait_until_absent(id="something") try: logged_in_wordpress.element(id="adminmenu").wait_until_absent(tag="div") except GuiWidgetP...
true
true
f74e4147f8144c737f97f0be1783911d96354916
897
py
Python
to_do_backend/to_do_backend/urls.py
paul3bin/To-Do-App
0e09c5d095448bcd3cfa467b2cef27df2ec30148
[ "MIT" ]
null
null
null
to_do_backend/to_do_backend/urls.py
paul3bin/To-Do-App
0e09c5d095448bcd3cfa467b2cef27df2ec30148
[ "MIT" ]
null
null
null
to_do_backend/to_do_backend/urls.py
paul3bin/To-Do-App
0e09c5d095448bcd3cfa467b2cef27df2ec30148
[ "MIT" ]
null
null
null
"""to_do_backend URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class...
37.375
77
0.724638
from django.contrib import admin from django.urls import path from django.conf.urls import include from rest_framework.authtoken.views import obtain_auth_token urlpatterns = [ path('admin/', admin.site.urls), path('api/', include('to_do_api.urls')), ]
true
true
f74e41f99c50c003c5c9d818a814e337988baeda
5,504
py
Python
src/Menus/Edit_menu.py
myhumankit/ESP32_IDE_accessible
5262a5dd106f3f52a374a6c1ef68ff53d8847001
[ "MIT" ]
1
2020-07-27T19:32:56.000Z
2020-07-27T19:32:56.000Z
src/Menus/Edit_menu.py
myhumankit/Blind_IDE
5262a5dd106f3f52a374a6c1ef68ff53d8847001
[ "MIT" ]
null
null
null
src/Menus/Edit_menu.py
myhumankit/Blind_IDE
5262a5dd106f3f52a374a6c1ef68ff53d8847001
[ "MIT" ]
null
null
null
""" Module wich contains the EditMenu class and some functions linked to this menu """ import wx import sys import os from api.api_pyflakes import main as CheckPySyntax from Utils.voice_synthese import my_speak class EditMenu(wx.Menu): """Inits a instance of a wx.Menu to create a Theme menu and his butt...
30.577778
87
0.539426
import wx import sys import os from api.api_pyflakes import main as CheckPySyntax from Utils.voice_synthese import my_speak class EditMenu(wx.Menu): def __init__(self, frame): wx.Menu.__init__(self, "Edit") self.frame = frame self.item_list = [] self.Append(wx.ID_COPY, "&Copy\t...
true
true
f74e42266f80728725ddf096c9a46a217d967294
1,950
py
Python
rfflearn/explainer/permutation.py
tiskw/random-fourier-features
4a12185e44d1f9aba594f8a7569042e73675d6cd
[ "MIT" ]
24
2021-02-14T12:05:27.000Z
2022-03-12T07:29:25.000Z
rfflearn/explainer/permutation.py
tiskw/RandomFourierFeatures
4a12185e44d1f9aba594f8a7569042e73675d6cd
[ "MIT" ]
1
2021-07-19T09:53:15.000Z
2021-10-03T03:04:30.000Z
rfflearn/explainer/permutation.py
tiskw/random-fourier-features
4a12185e44d1f9aba594f8a7569042e73675d6cd
[ "MIT" ]
6
2021-03-07T12:08:34.000Z
2022-03-26T09:47:36.000Z
#!/usr/bin/env python3 # # Wrapper functions for the permutation feature importance. # ##################################################### SOURCE START ##################################################### import numpy as np import matplotlib.pyplot as mpl import sklearn.inspection ### Calculate permutation impor...
39
120
0.675897
true
true
f74e4287c01a51060cf687db264b8e8ef4e28055
3,974
py
Python
src/bintools/run/utils.py
Simonll/bintools
009c9616545f3fc51b897da9bc53f35fb23c99eb
[ "MIT" ]
null
null
null
src/bintools/run/utils.py
Simonll/bintools
009c9616545f3fc51b897da9bc53f35fb23c99eb
[ "MIT" ]
null
null
null
src/bintools/run/utils.py
Simonll/bintools
009c9616545f3fc51b897da9bc53f35fb23c99eb
[ "MIT" ]
null
null
null
import os import shlex import subprocess import sys from textwrap import dedent from typing import Any from typing import Optional from typing import Tuple def joint_kwargs(**kwargs) -> str: return " ".join([k + " " + v for k, v in kwargs.items()]) def sub( cmd: str, cwd: Optional[str] = None, stdout: bool ...
30.806202
109
0.623805
import os import shlex import subprocess import sys from textwrap import dedent from typing import Any from typing import Optional from typing import Tuple def joint_kwargs(**kwargs) -> str: return " ".join([k + " " + v for k, v in kwargs.items()]) def sub( cmd: str, cwd: Optional[str] = None, stdout: bool ...
true
true
f74e437f9e5973cfaef9f114536318cc5cbc3222
971
py
Python
fibber/metrics/distance/self_bleu_metric.py
stungkit/fibber
115bc594d69cfd5d48c63450c5f3a2c08f463ba3
[ "MIT" ]
null
null
null
fibber/metrics/distance/self_bleu_metric.py
stungkit/fibber
115bc594d69cfd5d48c63450c5f3a2c08f463ba3
[ "MIT" ]
null
null
null
fibber/metrics/distance/self_bleu_metric.py
stungkit/fibber
115bc594d69cfd5d48c63450c5f3a2c08f463ba3
[ "MIT" ]
null
null
null
"""This metric computes the embedding similarity using SBERT model.""" from nltk import word_tokenize from nltk.translate import bleu_score from fibber import log from fibber.metrics.metric_base import MetricBase logger = log.setup_custom_logger(__name__) class SelfBleuMetric(MetricBase): """This metric compu...
30.34375
91
0.69104
from nltk import word_tokenize from nltk.translate import bleu_score from fibber import log from fibber.metrics.metric_base import MetricBase logger = log.setup_custom_logger(__name__) class SelfBleuMetric(MetricBase): def __init__(self, **kargs): super(SelfBleuMetric, self).__init__(**kargs) de...
true
true
f74e45d31160ed021813cc4b786b87dcea991015
3,513
py
Python
tests/nlu/example_component.py
praneethgb/rasa
5bf227f165d0b041a367d2c0bbf712ebb6a54792
[ "Apache-2.0" ]
8
2020-09-16T17:22:13.000Z
2022-02-01T00:11:30.000Z
tests/nlu/example_component.py
praneethgb/rasa
5bf227f165d0b041a367d2c0bbf712ebb6a54792
[ "Apache-2.0" ]
216
2020-09-20T13:05:58.000Z
2022-03-28T12:10:24.000Z
tests/nlu/example_component.py
praneethgb/rasa
5bf227f165d0b041a367d2c0bbf712ebb6a54792
[ "Apache-2.0" ]
1
2021-07-19T12:59:26.000Z
2021-07-19T12:59:26.000Z
import typing from typing import Any, Optional, Text, Dict, List, Type from rasa.nlu.components import Component from rasa.nlu.config import RasaNLUModelConfig from rasa.shared.nlu.training_data.training_data import TrainingData from rasa.shared.nlu.training_data.message import Message if typing.TYPE_CHECKING: fr...
36.59375
85
0.6846
import typing from typing import Any, Optional, Text, Dict, List, Type from rasa.nlu.components import Component from rasa.nlu.config import RasaNLUModelConfig from rasa.shared.nlu.training_data.training_data import TrainingData from rasa.shared.nlu.training_data.message import Message if typing.TYPE_CHECKING: fr...
true
true
f74e45d421222781a4164c6436759f2d21e494b7
936
pyde
Python
mode/examples/Topics/Create Shapes/PolygonPShapeOOP2/PolygonPShapeOOP2.pyde
timgates42/processing.py
78a237922c2a928b83f4ad579dbf8d32c0099890
[ "Apache-2.0" ]
1,224
2015-01-01T22:09:23.000Z
2022-03-29T19:43:56.000Z
mode/examples/Topics/Create Shapes/PolygonPShapeOOP2/PolygonPShapeOOP2.pyde
timgates42/processing.py
78a237922c2a928b83f4ad579dbf8d32c0099890
[ "Apache-2.0" ]
253
2015-01-14T03:45:51.000Z
2022-02-08T01:18:19.000Z
mode/examples/Topics/Create Shapes/PolygonPShapeOOP2/PolygonPShapeOOP2.pyde
timgates42/processing.py
78a237922c2a928b83f4ad579dbf8d32c0099890
[ "Apache-2.0" ]
225
2015-01-13T18:38:33.000Z
2022-03-30T20:27:39.000Z
""" PolygonPShapeOOP. Wrapping a PShape inside a custom class and demonstrating how we can have a multiple objects each using the same PShape. """ from polygon import Polygon # A list of objects polygons = [] def setup(): size(640, 360, P2D) smooth() # Make a PShape. star = createShape() star.b...
20.347826
57
0.623932
from polygon import Polygon polygons = [] def setup(): size(640, 360, P2D) smooth() star = createShape() star.beginShape() star.noStroke() star.fill(0, 127) star.vertex(0, -50) star.vertex(14, -20) star.vertex(47, -15) star.vertex(23, 7) star.vertex(29, 40) star.v...
true
true
f74e47ac3750dbdabc63ccedaf8beeea49dfe233
1,008
py
Python
proposals/mixins.py
mindruion/test
d27ef1caf8f76aead934bc83be7729f79a4be503
[ "MIT" ]
null
null
null
proposals/mixins.py
mindruion/test
d27ef1caf8f76aead934bc83be7729f79a4be503
[ "MIT" ]
null
null
null
proposals/mixins.py
mindruion/test
d27ef1caf8f76aead934bc83be7729f79a4be503
[ "MIT" ]
null
null
null
from braces.views import UserFormKwargsMixin from .models import Proposal from .forms import ProposalForm from django.urls import reverse from django.utils.translation import ugettext_lazy as _ class ProposalMixin(UserFormKwargsMixin): model = Proposal form_class = ProposalForm success_message = _('Studi...
32.516129
88
0.696429
from braces.views import UserFormKwargsMixin from .models import Proposal from .forms import ProposalForm from django.urls import reverse from django.utils.translation import ugettext_lazy as _ class ProposalMixin(UserFormKwargsMixin): model = Proposal form_class = ProposalForm success_message = _('Studi...
true
true
f74e47f4a7115c2c613150309807e58e251b5e01
2,531
py
Python
setup.py
WangYongzhao/OpenNMT-tf
b1c51e8a3560aa96c3359c5dfa3312d9771c3a32
[ "MIT" ]
null
null
null
setup.py
WangYongzhao/OpenNMT-tf
b1c51e8a3560aa96c3359c5dfa3312d9771c3a32
[ "MIT" ]
null
null
null
setup.py
WangYongzhao/OpenNMT-tf
b1c51e8a3560aa96c3359c5dfa3312d9771c3a32
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages tests_require = [ "parameterized", "nose2" ] setup( name="OpenNMT-tf", version="1.22.2", license="MIT", description="Neural machine translation and sequence learning using TensorFlow", author="OpenNMT", author_email="guillaume.klein@systrangr...
36.681159
84
0.60964
from setuptools import setup, find_packages tests_require = [ "parameterized", "nose2" ] setup( name="OpenNMT-tf", version="1.22.2", license="MIT", description="Neural machine translation and sequence learning using TensorFlow", author="OpenNMT", author_email="guillaume.klein@systrangr...
true
true
f74e4add2156217006aaffa7dae89f91121e8f04
50,388
py
Python
lingvo/core/quant_utils.py
lukasbindreiter/lingvo
d6f2e6901fadc8440a9e6222ac54b68a8b6faf02
[ "Apache-2.0" ]
1
2021-05-10T10:47:28.000Z
2021-05-10T10:47:28.000Z
lingvo/core/quant_utils.py
lukasbindreiter/lingvo
d6f2e6901fadc8440a9e6222ac54b68a8b6faf02
[ "Apache-2.0" ]
null
null
null
lingvo/core/quant_utils.py
lukasbindreiter/lingvo
d6f2e6901fadc8440a9e6222ac54b68a8b6faf02
[ "Apache-2.0" ]
null
null
null
# Lint as: python3 # Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
34.991667
80
0.675875
import enum import lingvo.compat as tf from lingvo.core import base_layer from lingvo.core import hyperparams from lingvo.core import py_utils from lingvo.core import summary_utils import numpy as np class QuantizableLayer(base_layer.BaseLayer): @classmethod def Params(cls): p = super().Param...
true
true
f74e4d1bd89e243e3b4c3a92e6d389f2a7f3b160
647
py
Python
bin/tidy_json.py
cleiver/codeandtalk.com
132cadddcfc97924969af68130baea2c3abd18cb
[ "Apache-2.0" ]
60
2016-11-24T13:38:03.000Z
2022-03-23T06:57:13.000Z
bin/tidy_json.py
cleiver/codeandtalk.com
132cadddcfc97924969af68130baea2c3abd18cb
[ "Apache-2.0" ]
384
2016-11-24T13:50:58.000Z
2022-03-30T14:57:35.000Z
bin/tidy_json.py
cleiver/codeandtalk.com
132cadddcfc97924969af68130baea2c3abd18cb
[ "Apache-2.0" ]
167
2016-11-24T10:20:25.000Z
2022-03-25T10:23:38.000Z
#!/usr/bin/env python3 import json import glob # format the json files def tidy(filename): with open(filename) as fh: data = json.load(fh) with open(filename, 'w') as fh: json.dump(data, fh, sort_keys=True, indent=4, separators=(',', ': '), ensure_ascii=False) for filename in glob.glob("data/...
22.310345
97
0.661515
import json import glob def tidy(filename): with open(filename) as fh: data = json.load(fh) with open(filename, 'w') as fh: json.dump(data, fh, sort_keys=True, indent=4, separators=(',', ': '), ensure_ascii=False) for filename in glob.glob("data/*.json"): tidy(filename) for filename in...
true
true
f74e4d30d9dfd6fb1af0d9bdf8c703b172fb6fa1
791
py
Python
SprintNour/SprintChallenge/acme_test.py
nouretienne/DS-Unit-3-Sprint-1-Software-Engineering
558be4fb459622448d6773824cbb825076bc9786
[ "MIT" ]
null
null
null
SprintNour/SprintChallenge/acme_test.py
nouretienne/DS-Unit-3-Sprint-1-Software-Engineering
558be4fb459622448d6773824cbb825076bc9786
[ "MIT" ]
null
null
null
SprintNour/SprintChallenge/acme_test.py
nouretienne/DS-Unit-3-Sprint-1-Software-Engineering
558be4fb459622448d6773824cbb825076bc9786
[ "MIT" ]
null
null
null
import unittest from acme import Product from acme_report import generate_products, adj, name class AcmeProductTests(unittest.TestCase): """Making sure Acme products are the tops!""" def test_default_product_price(self): """Test default product price being 10.""" prod = Product('Test Product')...
31.64
87
0.681416
import unittest from acme import Product from acme_report import generate_products, adj, name class AcmeProductTests(unittest.TestCase): def test_default_product_price(self): prod = Product('Test Product') self.assertEqual(prod.price, 10) def test_default_product_flammability(self): p...
true
true
f74e4dbe259e2d5c38258b49a5414f2bbec64389
1,051
py
Python
tools/chrome_remote_control/chrome_remote_control/util.py
junmin-zhu/chromium-rivertrail
eb1a57aca71fe68d96e48af8998dcfbe45171ee1
[ "BSD-3-Clause" ]
5
2018-03-10T13:08:42.000Z
2021-07-26T15:02:11.000Z
tools/chrome_remote_control/chrome_remote_control/util.py
sanyaade-mobiledev/chromium.src
d496dfeebb0f282468827654c2b3769b3378c087
[ "BSD-3-Clause" ]
1
2015-07-21T08:02:01.000Z
2015-07-21T08:02:01.000Z
tools/chrome_remote_control/chrome_remote_control/util.py
jianglong0156/chromium.src
d496dfeebb0f282468827654c2b3769b3378c087
[ "BSD-3-Clause" ]
6
2016-11-14T10:13:35.000Z
2021-01-23T15:29:53.000Z
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import inspect import time class TimeoutException(Exception): pass def WaitFor(condition, timeout, poll_interval=0.1, pass_tim...
31.848485
72
0.656518
import inspect import time class TimeoutException(Exception): pass def WaitFor(condition, timeout, poll_interval=0.1, pass_time_left_to_func=False): assert isinstance(condition, type(lambda: None)) start_time = time.time() while True: if pass_time_left_to_func: res = con...
true
true
f74e4de74bac14e6a01875722a7960c0647721ad
3,157
py
Python
nipy/neurospin/register/tests/test_iconic_matcher.py
yarikoptic/NiPy-OLD
8759b598ac72d3b9df7414642c7a662ad9c55ece
[ "BSD-3-Clause" ]
1
2015-08-22T16:14:45.000Z
2015-08-22T16:14:45.000Z
nipy/neurospin/register/tests/test_iconic_matcher.py
yarikoptic/NiPy-OLD
8759b598ac72d3b9df7414642c7a662ad9c55ece
[ "BSD-3-Clause" ]
null
null
null
nipy/neurospin/register/tests/test_iconic_matcher.py
yarikoptic/NiPy-OLD
8759b598ac72d3b9df7414642c7a662ad9c55ece
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python from nipy.testing import assert_equal, assert_almost_equal, assert_raises import numpy as np from nipy.neurospin.register.iconic_matcher import IconicMatcher class Image(object): """ Empty object to easily create image objects independently from any I/O package. """ def __init...
30.95098
106
0.673741
from nipy.testing import assert_equal, assert_almost_equal, assert_raises import numpy as np from nipy.neurospin.register.iconic_matcher import IconicMatcher class Image(object): def __init__(self, array, toworld=None, voxsize=[1, 1, 1]): self.array = array self.voxsize = np.asarray(voxsize) ...
true
true
f74e4e0148c96a7dc7719efca3ce333f408818de
8,459
py
Python
enaml/widgets/constraints_widget.py
pberkes/enaml
cbcbee929e3117dfe56c0b06dc2385acc832b0e8
[ "BSD-3-Clause-Clear" ]
null
null
null
enaml/widgets/constraints_widget.py
pberkes/enaml
cbcbee929e3117dfe56c0b06dc2385acc832b0e8
[ "BSD-3-Clause-Clear" ]
null
null
null
enaml/widgets/constraints_widget.py
pberkes/enaml
cbcbee929e3117dfe56c0b06dc2385acc832b0e8
[ "BSD-3-Clause-Clear" ]
null
null
null
#------------------------------------------------------------------------------ # Copyright (c) 2013, Nucleic Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #-------------------------------------------------...
36.938865
79
0.641092
from atom.api import ( DefaultValue, Enum, Typed, List, Constant, ForwardTyped, observe ) from casuarius import ConstraintVariable from enaml.core.declarative import d_ from enaml.layout.ab_constrainable import ABConstrainable from .widget import Widget, ProxyWidget PolicyEnum = Enum('ignore', 'weak',...
true
true
f74e4fb729c94104b2a30b43aa41b1e48fab2f7d
771
py
Python
cea/interfaces/dashboard/api/utils.py
architecture-building-systems/cea-toolbox
bfec7ecb4b242449ab8796a1e8ce68c05c35f1d6
[ "MIT" ]
null
null
null
cea/interfaces/dashboard/api/utils.py
architecture-building-systems/cea-toolbox
bfec7ecb4b242449ab8796a1e8ce68c05c35f1d6
[ "MIT" ]
null
null
null
cea/interfaces/dashboard/api/utils.py
architecture-building-systems/cea-toolbox
bfec7ecb4b242449ab8796a1e8ce68c05c35f1d6
[ "MIT" ]
null
null
null
from flask import current_app import cea.config import cea.inputlocator def deconstruct_parameters(p: cea.config.Parameter): params = {'name': p.name, 'type': p.typename, 'help': p.help} try: params["value"] = p.get() except cea.ConfigError as e: print(e) params["value"] = "" ...
29.653846
65
0.648508
from flask import current_app import cea.config import cea.inputlocator def deconstruct_parameters(p: cea.config.Parameter): params = {'name': p.name, 'type': p.typename, 'help': p.help} try: params["value"] = p.get() except cea.ConfigError as e: print(e) params["value"] = "" ...
true
true
f74e50eb4c26ec7e7e698613133d8b120eed6eaf
26,227
py
Python
scripts/tests/unit/test_schema_loader.py
dstepanic17/ecs
c84e5a7d277cce68fb9102580a6fef92be5ad432
[ "Apache-2.0" ]
null
null
null
scripts/tests/unit/test_schema_loader.py
dstepanic17/ecs
c84e5a7d277cce68fb9102580a6fef92be5ad432
[ "Apache-2.0" ]
null
null
null
scripts/tests/unit/test_schema_loader.py
dstepanic17/ecs
c84e5a7d277cce68fb9102580a6fef92be5ad432
[ "Apache-2.0" ]
null
null
null
# Licensed to Elasticsearch B.V. under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. Elasticsearch B.V. licenses this file to you under # the Apache License, Version 2.0 (the "License"); you may # not use this f...
34.87633
120
0.358638
import mock import os import pprint import sys import unittest sys.path.append(os.path.join(os.path.dirname(__file__), '../..')) from schema import loader class TestSchemaLoader(unittest.TestCase): def setUp(self): self.maxDiff = None @mock.patch('schema.loader.warn') def test...
true
true
f74e51f8dd0446c74b623504dee8c8c39f6a8dc5
13,322
py
Python
ekorpkit/io/archive.py
entelecheia/eKorpKit
9521ae4c4749419fa2b088d1b9e518e5927b7cb8
[ "CC-BY-4.0" ]
4
2022-02-26T10:54:16.000Z
2022-02-26T11:01:56.000Z
ekorpkit/io/archive.py
entelecheia/eKorpKit
9521ae4c4749419fa2b088d1b9e518e5927b7cb8
[ "CC-BY-4.0" ]
1
2022-03-25T06:37:12.000Z
2022-03-25T06:45:53.000Z
ekorpkit/io/archive.py
entelecheia/eKorpKit
9521ae4c4749419fa2b088d1b9e518e5927b7cb8
[ "CC-BY-4.0" ]
null
null
null
import os import zstandard import orjson as json import time import tarfile import codecs from functools import reduce import jsonlines import io from zipfile import ZipFile import gzip from math import ceil import mmap import multiprocessing as mp from pathlib import Path VALID_EXTENSIONS = [ "openwebtext.tar.xz"...
29.803132
106
0.535805
import os import zstandard import orjson as json import time import tarfile import codecs from functools import reduce import jsonlines import io from zipfile import ZipFile import gzip from math import ceil import mmap import multiprocessing as mp from pathlib import Path VALID_EXTENSIONS = [ "openwebtext.tar.xz"...
true
true
f74e536b351a116f92a8e455b5929f222624ae0f
201
py
Python
examples/attributes/Person.py
irmen/Pyro3
5bd531088d9a11ec83556a0429f18df6cb5cd437
[ "MIT" ]
3
2018-01-13T20:50:41.000Z
2020-02-24T13:35:08.000Z
examples/attributes/Person.py
irmen/Pyro3
5bd531088d9a11ec83556a0429f18df6cb5cd437
[ "MIT" ]
null
null
null
examples/attributes/Person.py
irmen/Pyro3
5bd531088d9a11ec83556a0429f18df6cb5cd437
[ "MIT" ]
6
2015-03-21T20:34:05.000Z
2021-06-08T04:04:33.000Z
####### Special object class Person(object): def __init__(self, name, age): self.name=name self.age=age def getName(self): return 'My name is '+self.name def getAge(self): return self.age
16.75
32
0.676617
return 'My name is '+self.name def getAge(self): return self.age
true
true
f74e53907c7b1cd5c5d81e4fde1e9824a67a8ab2
10,092
py
Python
src/reporter/reporter.py
fisuda/ngsi-timeseries-api
541df6b62afd06131c905e1bcec60e5d000cc54d
[ "MIT" ]
null
null
null
src/reporter/reporter.py
fisuda/ngsi-timeseries-api
541df6b62afd06131c905e1bcec60e5d000cc54d
[ "MIT" ]
null
null
null
src/reporter/reporter.py
fisuda/ngsi-timeseries-api
541df6b62afd06131c905e1bcec60e5d000cc54d
[ "MIT" ]
null
null
null
""" The reporter is the service responsible for handling NGSI notifications, validating them, and feeding the corresponding updates to the translator. The reporter needs to know the form of the entity (i.e, name and types of its attributes). There are two approaches: 1 - Clients tell reporter which entities they c...
33.417219
102
0.656163
from flask import has_request_context, request from geocoding import geocoding from geocoding.factory import get_geo_cache, is_geo_coding_available from requests import RequestException from translators.sql_translator import SQLTranslator from translators.factory import translator_for from utils.common import iter_ent...
true
true
f74e5391f3563910f991b32e3328fda35ed0a6e0
1,124
py
Python
app/search.py
AInursery/george
6285f52750aca14b8ea85d82349ee0907eb04867
[ "Apache-1.1" ]
1
2015-05-26T19:58:10.000Z
2015-05-26T19:58:10.000Z
app/search.py
AInursery/george
6285f52750aca14b8ea85d82349ee0907eb04867
[ "Apache-1.1" ]
null
null
null
app/search.py
AInursery/george
6285f52750aca14b8ea85d82349ee0907eb04867
[ "Apache-1.1" ]
null
null
null
from elasticsearch import Elasticsearch from pprint import pprint as pp es = Elasticsearch() INDEX = "meme-index" TYPE = "meme" def submit(id, doc): res = es.index(index=INDEX, doc_type=TYPE, id=id, body=doc) if res['created']: return True def search(query): es.indices.refresh(index=INDEX) ...
22.48
70
0.542705
from elasticsearch import Elasticsearch from pprint import pprint as pp es = Elasticsearch() INDEX = "meme-index" TYPE = "meme" def submit(id, doc): res = es.index(index=INDEX, doc_type=TYPE, id=id, body=doc) if res['created']: return True def search(query): es.indices.refresh(index=INDEX) ...
true
true
f74e540cf79aed82b798f402a955f469b9039add
1,932
py
Python
aliyun-python-sdk-iot/aliyunsdkiot/request/v20180120/DeleteDeviceRequest.py
liuzheng/aliyun-openapi-python-sdk
1ba6743f3d6f2cef57ec9e3be1754b04293c3150
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-iot/aliyunsdkiot/request/v20180120/DeleteDeviceRequest.py
liuzheng/aliyun-openapi-python-sdk
1ba6743f3d6f2cef57ec9e3be1754b04293c3150
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-iot/aliyunsdkiot/request/v20180120/DeleteDeviceRequest.py
liuzheng/aliyun-openapi-python-sdk
1ba6743f3d6f2cef57ec9e3be1754b04293c3150
[ "Apache-2.0" ]
null
null
null
# 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, Version 2.0 (the # "License"); you may not u...
34.5
74
0.763458
from aliyunsdkcore.request import RpcRequest from aliyunsdkiot.endpoint import endpoint_data class DeleteDeviceRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'Iot', '2018-01-20', 'DeleteDevice') self.set_method('POST') if hasattr(self, "endpoint_map"): setattr(self, "...
true
true
f74e54467cd318f70cb75b4a5b4498828ae14e14
11,913
py
Python
yolo_v4.py
RitwickGhosh/DeepSORT-YOLOv4-TensorRT-OpenVINO
104e0433c56cebb7db503e23aaec9e7f1d7fdd3a
[ "MIT" ]
null
null
null
yolo_v4.py
RitwickGhosh/DeepSORT-YOLOv4-TensorRT-OpenVINO
104e0433c56cebb7db503e23aaec9e7f1d7fdd3a
[ "MIT" ]
null
null
null
yolo_v4.py
RitwickGhosh/DeepSORT-YOLOv4-TensorRT-OpenVINO
104e0433c56cebb7db503e23aaec9e7f1d7fdd3a
[ "MIT" ]
null
null
null
import numpy as np import tensorflow as tf slim = tf.contrib.slim _BATCH_NORM_DECAY = 0.9 _BATCH_NORM_EPSILON = 1e-05 _LEAKY_RELU = 0.1 _ANCHORS = [(12, 16), (19, 36), (40, 28), (36, 75), (76, 55), (72, 146), (142, 110), (192, 243), (459, 401)] @tf.contrib.framework.add_arg_scope def _fixed_p...
37.93949
110
0.627382
import numpy as np import tensorflow as tf slim = tf.contrib.slim _BATCH_NORM_DECAY = 0.9 _BATCH_NORM_EPSILON = 1e-05 _LEAKY_RELU = 0.1 _ANCHORS = [(12, 16), (19, 36), (40, 28), (36, 75), (76, 55), (72, 146), (142, 110), (192, 243), (459, 401)] @tf.contrib.framework.add_arg_scope def _fixed_p...
true
true
f74e54b6615bab2166cb9b4829f9b1aa026c8a42
6,169
py
Python
coredis/response/_callbacks/streams.py
alisaifee/coredis
e72f5d7c665b53e6a1d41e1a7fb9e400858a8b19
[ "MIT" ]
9
2022-01-07T07:42:08.000Z
2022-03-21T15:54:09.000Z
coredis/response/_callbacks/streams.py
alisaifee/coredis
e72f5d7c665b53e6a1d41e1a7fb9e400858a8b19
[ "MIT" ]
30
2022-01-15T23:33:36.000Z
2022-03-30T22:39:53.000Z
coredis/response/_callbacks/streams.py
alisaifee/coredis
e72f5d7c665b53e6a1d41e1a7fb9e400858a8b19
[ "MIT" ]
3
2022-01-13T06:11:13.000Z
2022-02-21T11:19:33.000Z
from __future__ import annotations from typing import Any from coredis._utils import EncodingInsensitiveDict from coredis.response._callbacks import ResponseCallback from coredis.response._utils import flat_pairs_to_dict, flat_pairs_to_ordered_dict from coredis.response.types import ( StreamEntry, StreamInfo,...
31
88
0.562004
from __future__ import annotations from typing import Any from coredis._utils import EncodingInsensitiveDict from coredis.response._callbacks import ResponseCallback from coredis.response._utils import flat_pairs_to_dict, flat_pairs_to_ordered_dict from coredis.response.types import ( StreamEntry, StreamInfo,...
true
true
f74e552246ac5d4490312f2c9daa9f681c80b3cc
6,397
py
Python
src/utils.py
zeddee/info_retrieve
b54f80e1124183221e509c88413a2afc6ff4fae6
[ "Apache-2.0" ]
null
null
null
src/utils.py
zeddee/info_retrieve
b54f80e1124183221e509c88413a2afc6ff4fae6
[ "Apache-2.0" ]
null
null
null
src/utils.py
zeddee/info_retrieve
b54f80e1124183221e509c88413a2afc6ff4fae6
[ "Apache-2.0" ]
null
null
null
import pandas as pd import numpy as np from sklearn.metrics.pairwise import cosine_similarity def question_cleaner(df_query): kb=([int(xx) for xx in (df_query[3].iloc[0]).split(' ')]) gt = [int(xx) for xx in (df_query[2].iloc[0]).split(' ')] ct=0 negg=0 withans=[] for ii in range(len(df_query))...
44.423611
227
0.654682
import pandas as pd import numpy as np from sklearn.metrics.pairwise import cosine_similarity def question_cleaner(df_query): kb=([int(xx) for xx in (df_query[3].iloc[0]).split(' ')]) gt = [int(xx) for xx in (df_query[2].iloc[0]).split(' ')] ct=0 negg=0 withans=[] for ii in range(len(df_query))...
true
true
f74e562ae0d91712beb84c119101e3a84d2411e2
592
py
Python
generate_uvm_regs.py
EngRaff92/RDL_REG_GEN
1da36a247552217d009b41b035ddda742ad2aa3e
[ "MIT" ]
2
2022-01-11T19:22:16.000Z
2022-01-11T20:19:55.000Z
generate_uvm_regs.py
EngRaff92/RDL_REG_GEN
1da36a247552217d009b41b035ddda742ad2aa3e
[ "MIT" ]
null
null
null
generate_uvm_regs.py
EngRaff92/RDL_REG_GEN
1da36a247552217d009b41b035ddda742ad2aa3e
[ "MIT" ]
null
null
null
#!/opt/homebrew/bin/python3.9 import sys from systemrdl import RDLCompiler, RDLCompileError from peakrdl.uvm import UVMExporter def export_uvm(obj): exporter = UVMExporter() exporter.export(root, "./output_all/reg_pkg.sv") if __name__ == "__main__": import sys # Compile and elaborate files provided f...
25.73913
64
0.684122
import sys from systemrdl import RDLCompiler, RDLCompileError from peakrdl.uvm import UVMExporter def export_uvm(obj): exporter = UVMExporter() exporter.export(root, "./output_all/reg_pkg.sv") if __name__ == "__main__": import sys input_files = sys.argv[1:] rdlc = RDLCompiler() try: ...
true
true
f74e569bc48174f7e765e4c9e16bfbf19509fb49
50,162
py
Python
core/domain/feedback_services_test.py
vddesai1871/oppia
d48ab80d62b7bc1684a798688b89f094a2f1b3d5
[ "Apache-2.0" ]
1
2019-01-31T18:48:50.000Z
2019-01-31T18:48:50.000Z
core/domain/feedback_services_test.py
debck/oppia
7126b42bf105724cb82dd2d4df377e7a35c3ca18
[ "Apache-2.0" ]
null
null
null
core/domain/feedback_services_test.py
debck/oppia
7126b42bf105724cb82dd2d4df377e7a35c3ca18
[ "Apache-2.0" ]
null
null
null
# Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
43.057511
80
0.629819
import json from core.domain import email_services from core.domain import event_services from core.domain import feedback_domain from core.domain import feedback_jobs_continuous from core.domain import feedback_services from core.domain import subscription_services from core.domain import user_services ...
true
true
f74e575da60ac8797ab0d807853be4861e22453f
11,917
py
Python
samples/ray_casting.py
mauri-medina/asciimatics
2bf39ac7bde5f9bfcd4559476a72220949438629
[ "Apache-2.0" ]
null
null
null
samples/ray_casting.py
mauri-medina/asciimatics
2bf39ac7bde5f9bfcd4559476a72220949438629
[ "Apache-2.0" ]
1
2022-03-12T01:08:05.000Z
2022-03-12T01:08:05.000Z
samples/ray_casting.py
cnheider/asciimatics
adcd94abc091ecde4c8742fd8dcced3121a3be5b
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys from math import sin, cos, pi, copysign, floor from asciimatics.effects import Effect from asciimatics.event import KeyboardEvent from asciimatics.exceptions import ResizeScreenError, StopApplication from asciimatics.screen import Screen from asciimatics.scene ...
36.443425
103
0.556935
import sys from math import sin, cos, pi, copysign, floor from asciimatics.effects import Effect from asciimatics.event import KeyboardEvent from asciimatics.exceptions import ResizeScreenError, StopApplication from asciimatics.screen import Screen from asciimatics.scene import Scene from asciimatics.widgets import ...
true
true
f74e58037d59f91e4df3b512c087e56d043bea03
173
py
Python
src/driver/selenium.py
matanbroner/MyUCSCAPy
362b702a4216e9add4de1f65f36a8408c2c1f351
[ "MIT" ]
null
null
null
src/driver/selenium.py
matanbroner/MyUCSCAPy
362b702a4216e9add4de1f65f36a8408c2c1f351
[ "MIT" ]
null
null
null
src/driver/selenium.py
matanbroner/MyUCSCAPy
362b702a4216e9add4de1f65f36a8408c2c1f351
[ "MIT" ]
null
null
null
from selenium import webdriver import chromedriver_binary def generate_driver(config=None): driver = webdriver.Chrome() driver.implicitly_wait(15) return driver
24.714286
33
0.786127
from selenium import webdriver import chromedriver_binary def generate_driver(config=None): driver = webdriver.Chrome() driver.implicitly_wait(15) return driver
true
true
f74e58cbc943beb151b30ea404f5f8fa4de70d3b
1,500
py
Python
setup.py
artemudovyk/django-updown
0353cf8ec5c50b4ffd869a56f51ede65b6368ef8
[ "BSD-2-Clause" ]
41
2015-01-07T07:43:33.000Z
2020-09-23T04:35:09.000Z
setup.py
artemudovyk/django-updown
0353cf8ec5c50b4ffd869a56f51ede65b6368ef8
[ "BSD-2-Clause" ]
20
2015-01-28T21:02:56.000Z
2018-08-14T13:39:31.000Z
setup.py
artemudovyk/django-updown
0353cf8ec5c50b4ffd869a56f51ede65b6368ef8
[ "BSD-2-Clause" ]
19
2015-01-06T12:50:05.000Z
2022-01-21T17:01:56.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import re from setuptools import setup, find_packages def get_version(package): """ Return package version as listed in `__version__` in `init.py`. """ init_py = open(os.path.join(package, '__init__.py')).read() return re.search("__version__ ...
30.612245
75
0.599333
import os import re from setuptools import setup, find_packages def get_version(package): init_py = open(os.path.join(package, '__init__.py')).read() return re.search("__version__ = ['\"]([^'\"]+)['\"]", init_py).group(1) version = get_version('updown') setup( name='django-updown', version=versi...
true
true
f74e5b74c46faf978204656b1fdfb200cf474752
5,363
py
Python
gobigger/agents/bot_agent.py
Sense-X/GoBigger
fc670973c328c2f898589974e072a9f22517de70
[ "Apache-2.0" ]
null
null
null
gobigger/agents/bot_agent.py
Sense-X/GoBigger
fc670973c328c2f898589974e072a9f22517de70
[ "Apache-2.0" ]
null
null
null
gobigger/agents/bot_agent.py
Sense-X/GoBigger
fc670973c328c2f898589974e072a9f22517de70
[ "Apache-2.0" ]
null
null
null
import os import random import logging import copy import queue from pygame.math import Vector2 from .base_agent import BaseAgent class BotAgent(BaseAgent): ''' Overview: A simple script bot ''' def __init__(self, name=None): self.name = name self.actions_queue = queue.Queue()...
41.898438
145
0.604512
import os import random import logging import copy import queue from pygame.math import Vector2 from .base_agent import BaseAgent class BotAgent(BaseAgent): def __init__(self, name=None): self.name = name self.actions_queue = queue.Queue() self.last_clone_num = 1 self.last_total_s...
true
true
f74e5c0633cc58b622190661c0457d82ae128d29
4,358
py
Python
opfunu/cec/cec2005/F19.py
mcrimi/opfunu
9c8a074c5dca604acc3ddc7fbf15ef30f57d1756
[ "Apache-2.0" ]
1
2021-05-25T14:46:21.000Z
2021-05-25T14:46:21.000Z
opfunu/cec/cec2005/F19.py
HaaLeo/opfunu
1ff3ecf4b7818a0edd5d92ce5475839fa9477da1
[ "Apache-2.0" ]
null
null
null
opfunu/cec/cec2005/F19.py
HaaLeo/opfunu
1ff3ecf4b7818a0edd5d92ce5475839fa9477da1
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # ------------------------------------------------------------------------------------------------------% # Created by "Thieu Nguyen" at 19:26, 20/04/2020 % # ...
44.927835
133
0.490363
from opfunu.cec.cec2005.root import Root from numpy import sum, dot, sqrt, array, cos, pi, exp, e, ones, max class Model(Root): def __init__(self, f_name="Rotated Hybrid Composition Function 2 with narrow basin global optimum", f_shift_data_file="data_hybrid_func2", f_ex...
true
true
f74e5d1ddd9e64b0c64187d7fd86a1f5d4996bd2
195
py
Python
starter/flyTello.py
liemho1/CpE-EE-Senior-Project
07fc02d43cb23498281cebf33f610ef55a6d1af5
[ "MIT" ]
null
null
null
starter/flyTello.py
liemho1/CpE-EE-Senior-Project
07fc02d43cb23498281cebf33f610ef55a6d1af5
[ "MIT" ]
null
null
null
starter/flyTello.py
liemho1/CpE-EE-Senior-Project
07fc02d43cb23498281cebf33f610ef55a6d1af5
[ "MIT" ]
null
null
null
from easytello import tello my_drone = tello.Tello() #my_drone.streamon() my_drone.takeoff() for i in range(4): #my_drone.forward(1) my_drone.cw(90) my_drone.land() # my_drone.streamoff()
13.928571
27
0.728205
from easytello import tello my_drone = tello.Tello() my_drone.takeoff() for i in range(4): my_drone.cw(90) my_drone.land()
true
true
f74e5da64ee1d1e4688813dfe571d84ad1150d90
547
py
Python
setup.py
sammish/Reports
86b2a477a806e48eb5225159bc9c1028487ff135
[ "MIT" ]
null
null
null
setup.py
sammish/Reports
86b2a477a806e48eb5225159bc9c1028487ff135
[ "MIT" ]
null
null
null
setup.py
sammish/Reports
86b2a477a806e48eb5225159bc9c1028487ff135
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from setuptools import setup, find_packages with open('requirements.txt') as f: install_requires = f.read().strip().split('\n') # get version from __version__ variable in reports/__init__.py from reports import __version__ as version setup( name='reports', version=version, description='Cu...
26.047619
62
0.769653
from setuptools import setup, find_packages with open('requirements.txt') as f: install_requires = f.read().strip().split('\n') from reports import __version__ as version setup( name='reports', version=version, description='Customized Report for All purpose', author='sammish.thundiyil@gmail.com', author_emai...
true
true
f74e5dab495102f4f366cc894df8b9200e06f626
185
py
Python
services/converter.py
ArtiomOn/pull_bot
1f9db9e38beb1be4ac3a16e36775c73b412ceab4
[ "MIT" ]
null
null
null
services/converter.py
ArtiomOn/pull_bot
1f9db9e38beb1be4ac3a16e36775c73b412ceab4
[ "MIT" ]
null
null
null
services/converter.py
ArtiomOn/pull_bot
1f9db9e38beb1be4ac3a16e36775c73b412ceab4
[ "MIT" ]
null
null
null
from pydub import AudioSegment def convert_ogg_to_wav(ogg_path: str, wav_path: str) -> None: audio = AudioSegment.from_ogg(file=ogg_path) audio.export(wav_path, format='wav')
26.428571
61
0.751351
from pydub import AudioSegment def convert_ogg_to_wav(ogg_path: str, wav_path: str) -> None: audio = AudioSegment.from_ogg(file=ogg_path) audio.export(wav_path, format='wav')
true
true
f74e5ecbc8e475fcb002db543c5182ecb782d138
83
py
Python
Boolean/Boolean18.py
liyuanyuan11/Python
d94cc7ab39e56c6e24bfc741a30da77590d1d220
[ "MIT" ]
null
null
null
Boolean/Boolean18.py
liyuanyuan11/Python
d94cc7ab39e56c6e24bfc741a30da77590d1d220
[ "MIT" ]
null
null
null
Boolean/Boolean18.py
liyuanyuan11/Python
d94cc7ab39e56c6e24bfc741a30da77590d1d220
[ "MIT" ]
null
null
null
isAfterSchool=True isFinishHomework=False print(isAfterSchool and isFinishHomework)
27.666667
41
0.903614
isAfterSchool=True isFinishHomework=False print(isAfterSchool and isFinishHomework)
true
true
f74e5f6e36adb6ca165a77343a07c7a6ac27c61a
558
py
Python
mwlib/snippets.py
pediapress/mwlib
1074fbc429e65180de09671dbc369ed1eeb2345d
[ "Unlicense" ]
53
2015-02-17T16:20:06.000Z
2022-03-18T09:22:00.000Z
mwlib/snippets.py
pediapress/mwlib
1074fbc429e65180de09671dbc369ed1eeb2345d
[ "Unlicense" ]
23
2015-01-30T16:26:20.000Z
2022-03-11T23:26:03.000Z
mwlib/snippets.py
pediapress/mwlib
1074fbc429e65180de09671dbc369ed1eeb2345d
[ "Unlicense" ]
19
2015-01-21T13:55:46.000Z
2019-02-23T23:14:31.000Z
#! /usr/bin/env python """provide some mediawiki markup example snippets""" import os class snippet(object): def __init__(self, txt, id): self.txt = txt self.id = id def __repr__(self): return "<%s %r %r...>" % (self.__class__.__name__, self.id, self.txt[:10]) def get_all(): f...
22.32
82
0.594982
import os class snippet(object): def __init__(self, txt, id): self.txt = txt self.id = id def __repr__(self): return "<%s %r %r...>" % (self.__class__.__name__, self.id, self.txt[:10]) def get_all(): fp = os.path.join(os.path.dirname(__file__), 'snippets.txt') examples =...
true
true
f74e5f8f74616921ddfa3c986e30955bccb0887a
5,457
py
Python
code/lstm_mixed_loso.py
bagustris/deep_mlp_ser
079bc6414287dbfb23a52e1e1869b91584eb037e
[ "BSD-3-Clause" ]
7
2020-04-21T07:27:31.000Z
2022-01-18T10:24:37.000Z
code/lstm_mixed_loso.py
bagustris/deep_mlp_ser
079bc6414287dbfb23a52e1e1869b91584eb037e
[ "BSD-3-Clause" ]
2
2020-10-09T03:04:35.000Z
2022-01-18T11:37:52.000Z
code/lstm_mixed_loso.py
bagustris/deep_mlp_ser
079bc6414287dbfb23a52e1e1869b91584eb037e
[ "BSD-3-Clause" ]
2
2020-06-19T23:37:00.000Z
2021-12-19T22:07:44.000Z
# CSL Paper: Dimensional speech emotion recognition from acoustic and text # Changelog: # 2019-09-01: initial version # 2019-10-06: optimizer MTL parameters with linear search (in progress) # 2012-12-25: modified fot ser_iemocap_loso_hfs.py # feature is either std+mean or std+mean+silence (uncomment line 44...
36.871622
123
0.702767
import numpy as np import pickle import pandas as pd import keras.backend as K from keras.models import Model from keras.layers import Input, Dense, CuDNNLSTM, Flatten, \ Embedding, Dropout, BatchNormalization, \ RNN, concatenate, Activation from keras.callback...
true
true
f74e601a8cafe6088876d3419b2ccb2596a50286
193
py
Python
draco/analysis/__init__.py
Arnab-half-blood-prince/draco
f86387a63ecd739ad194dbd5195a44f4a35a521d
[ "MIT" ]
5
2016-12-12T06:37:50.000Z
2020-04-22T15:21:40.000Z
draco/analysis/__init__.py
Arnab-half-blood-prince/draco
f86387a63ecd739ad194dbd5195a44f4a35a521d
[ "MIT" ]
102
2017-04-28T13:43:01.000Z
2022-03-11T22:31:14.000Z
draco/analysis/__init__.py
Arnab-half-blood-prince/draco
f86387a63ecd739ad194dbd5195a44f4a35a521d
[ "MIT" ]
7
2017-01-27T16:55:28.000Z
2022-02-21T16:16:17.000Z
""" .. autosummary:: :toctree: beamform delay fgfilter flagging mapmaker powerspectrum sensitivity sidereal sourcestack svdfilter transform """
11.352941
17
0.601036
true
true
f74e60c92f213ea2b621b3a4bebfb4b49577419a
958
py
Python
app/forms.py
juliuskrah/flask-blog
4c1dd04b4b93fff127d23cffb7a5fd9d9e711f00
[ "Apache-2.0" ]
3
2019-06-12T19:42:46.000Z
2021-06-23T23:18:22.000Z
app/forms.py
juliuskrah/flask-blog
4c1dd04b4b93fff127d23cffb7a5fd9d9e711f00
[ "Apache-2.0" ]
null
null
null
app/forms.py
juliuskrah/flask-blog
4c1dd04b4b93fff127d23cffb7a5fd9d9e711f00
[ "Apache-2.0" ]
1
2020-07-31T15:58:16.000Z
2020-07-31T15:58:16.000Z
from flask_wtf import Form from wtforms import StringField, BooleanField, TextAreaField, validators from app.models import User class LoginForm(Form): remember_me = BooleanField('remember_me', default=False) class EditForm(Form): nickname = StringField('nickname', [validators.DataRequired()]) about_me =...
34.214286
102
0.683716
from flask_wtf import Form from wtforms import StringField, BooleanField, TextAreaField, validators from app.models import User class LoginForm(Form): remember_me = BooleanField('remember_me', default=False) class EditForm(Form): nickname = StringField('nickname', [validators.DataRequired()]) about_me =...
true
true
f74e61fa5159828ae43d260a013f432caf6757aa
250
py
Python
cpffield/cpffield.py
silviolleite/cfp-field
77d1ba554638b1ae31fb165cc0ba3d597ed2f048
[ "MIT" ]
null
null
null
cpffield/cpffield.py
silviolleite/cfp-field
77d1ba554638b1ae31fb165cc0ba3d597ed2f048
[ "MIT" ]
2
2020-02-11T23:05:06.000Z
2020-06-05T18:46:38.000Z
cpffield/cpffield.py
silviolleite/cfp-field
77d1ba554638b1ae31fb165cc0ba3d597ed2f048
[ "MIT" ]
null
null
null
from django.db import models from cpffield.validators import validate_cpf class CPFField(models.CharField): default_validators = [validate_cpf] def __init__(self, *args, **kwargs): super(CPFField, self).__init__(*args, **kwargs)
20.833333
55
0.728
from django.db import models from cpffield.validators import validate_cpf class CPFField(models.CharField): default_validators = [validate_cpf] def __init__(self, *args, **kwargs): super(CPFField, self).__init__(*args, **kwargs)
true
true
f74e62bba478a312bc944ab85bf578c1d4490c32
3,606
py
Python
bindings/python/ensmallen/datasets/string/neisseriaelongatasubspglycolyticaatcc29315.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
5
2021-02-17T00:44:45.000Z
2021-08-09T16:41:47.000Z
bindings/python/ensmallen/datasets/string/neisseriaelongatasubspglycolyticaatcc29315.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
18
2021-01-07T16:47:39.000Z
2021-08-12T21:51:32.000Z
bindings/python/ensmallen/datasets/string/neisseriaelongatasubspglycolyticaatcc29315.py
AnacletoLAB/ensmallen
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
3
2021-01-14T02:20:59.000Z
2021-08-04T19:09:52.000Z
""" This file offers the methods to automatically retrieve the graph Neisseria elongata subsp. glycolytica ATCC 29315. The graph is automatically retrieved from the STRING repository. References --------------------- Please cite the following if you use the data: ```bib @article{szklarczyk2019string, title={ST...
34.342857
223
0.685524
from typing import Dict from ..automatic_graph_retrieval import AutomaticallyRetrievedGraph from ...ensmallen import Graph def NeisseriaElongataSubspGlycolyticaAtcc29315( directed: bool = False, preprocess: bool = True, load_nodes: bool = True, verbose: int = 2, cache: bool = True, cache_pa...
true
true
f74e62fc8a17d8a43dbb0288f8f895e59978ae95
1,341
py
Python
playground/config.py
imankulov/ethereum-playground
79fa9157c5b747b7929a0021891ea493b87c19ec
[ "MIT" ]
null
null
null
playground/config.py
imankulov/ethereum-playground
79fa9157c5b747b7929a0021891ea493b87c19ec
[ "MIT" ]
null
null
null
playground/config.py
imankulov/ethereum-playground
79fa9157c5b747b7929a0021891ea493b87c19ec
[ "MIT" ]
null
null
null
""" Flask configuration. The module doesn't depend on the project. The configuration file is initialized with python-dotenv, and we don't read environment variables in the rest of the project. What config.py can import? -------------------------- The module doesn't import anything from the project. Who can import...
27.367347
82
0.722595
import os import pathlib import dotenv dotenv.load_dotenv() def adjust_database_uri(variable: str) -> str: if variable.startswith("postgres://"): variable = variable.replace("postgres://", "postgresql://") return variable.replace("{PROJECT_ROOT}", PROJECT_ROOT.as_posix()) PRO...
true
true
f74e637b161f82a99d57c721048bd9dbfa619547
20,348
py
Python
tests/test_utils.py
bond005/impartial_text_cls
d7503c55388625b988098b307350b1f899e48e3c
[ "Apache-2.0" ]
14
2019-06-30T06:15:06.000Z
2021-11-02T15:55:17.000Z
tests/test_utils.py
bond005/impartial_text_cls
d7503c55388625b988098b307350b1f899e48e3c
[ "Apache-2.0" ]
8
2019-11-08T08:17:39.000Z
2022-02-09T23:30:55.000Z
tests/test_utils.py
bond005/impartial_text_cls
d7503c55388625b988098b307350b1f899e48e3c
[ "Apache-2.0" ]
3
2019-06-30T06:15:42.000Z
2021-02-16T11:12:47.000Z
# Copyright 2019 Ivan Bondarenko # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
43.385928
120
0.611903
import os import re import sys import unittest import numpy as np try: from impartial_text_cls.utils import read_dstc2_data, read_snips2017_data, str_to_layers, read_csv from impartial_text_cls.utils import parse_hidden_layers_description except: sys.path.append(os.path.join(os.path.dirname(...
true
true
f74e6453c7546b3a84ac70855dcc663c1b075743
26
py
Python
pog.py
toranjamecanica/pessoal
fa5af0e871d4b28d502d48d1b64981dc025f22a5
[ "MIT" ]
null
null
null
pog.py
toranjamecanica/pessoal
fa5af0e871d4b28d502d48d1b64981dc025f22a5
[ "MIT" ]
null
null
null
pog.py
toranjamecanica/pessoal
fa5af0e871d4b28d502d48d1b64981dc025f22a5
[ "MIT" ]
null
null
null
m = 'ola mundo' print(m)
8.666667
16
0.576923
m = 'ola mundo' print(m)
true
true
f74e652b7dde8153ebf301cd813759826c18db84
12,495
py
Python
elliottlib/cli/find_bugs_cli.py
thegreyd/elliott
4772e2eda36af1b2e3bdaeced4347fcf9ecfdbc2
[ "Apache-2.0" ]
null
null
null
elliottlib/cli/find_bugs_cli.py
thegreyd/elliott
4772e2eda36af1b2e3bdaeced4347fcf9ecfdbc2
[ "Apache-2.0" ]
null
null
null
elliottlib/cli/find_bugs_cli.py
thegreyd/elliott
4772e2eda36af1b2e3bdaeced4347fcf9ecfdbc2
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import, print_function, unicode_literals import elliottlib from elliottlib import constants, logutil, Runtime, bzutil, openshiftclient, errata LOGGER = logutil.getLogger(__name__) from elliottlib.cli import cli_opts from elliottlib.cli.common import cli, use_default_advisory_option, fin...
52.0625
243
0.6497
from __future__ import absolute_import, print_function, unicode_literals import elliottlib from elliottlib import constants, logutil, Runtime, bzutil, openshiftclient, errata LOGGER = logutil.getLogger(__name__) from elliottlib.cli import cli_opts from elliottlib.cli.common import cli, use_default_advisory_option, fin...
true
true
f74e65a9a7255a9aca60a51f3bc6f3cebeeb8c9a
34
py
Python
sock_cond/__init__.py
matham/sock_cond
24a1eaf5d1cb8cbae8e7581df54d03cedc82ec8c
[ "MIT" ]
null
null
null
sock_cond/__init__.py
matham/sock_cond
24a1eaf5d1cb8cbae8e7581df54d03cedc82ec8c
[ "MIT" ]
null
null
null
sock_cond/__init__.py
matham/sock_cond
24a1eaf5d1cb8cbae8e7581df54d03cedc82ec8c
[ "MIT" ]
null
null
null
''' ''' __version__ = '0.1-dev'
5.666667
23
0.470588
__version__ = '0.1-dev'
true
true
f74e66a4345b855aed3b7edd396915cf9209d501
2,282
py
Python
ucsmsdk/mometa/proc/ProcDoer.py
thinkitdata/ucsmsdk
da6599e1dbc1207a30eabe548a7e5791af5f476b
[ "Apache-2.0" ]
null
null
null
ucsmsdk/mometa/proc/ProcDoer.py
thinkitdata/ucsmsdk
da6599e1dbc1207a30eabe548a7e5791af5f476b
[ "Apache-2.0" ]
null
null
null
ucsmsdk/mometa/proc/ProcDoer.py
thinkitdata/ucsmsdk
da6599e1dbc1207a30eabe548a7e5791af5f476b
[ "Apache-2.0" ]
null
null
null
"""This module contains the general information for ProcDoer ManagedObject.""" from ...ucsmo import ManagedObject from ...ucscoremeta import MoPropertyMeta, MoMeta from ...ucsmeta import VersionMeta class ProcDoerConsts: pass class ProcDoer(ManagedObject): """This is ProcDoer class.""" consts = ProcDo...
46.571429
248
0.630149
from ...ucsmo import ManagedObject from ...ucscoremeta import MoPropertyMeta, MoMeta from ...ucsmeta import VersionMeta class ProcDoerConsts: pass class ProcDoer(ManagedObject): consts = ProcDoerConsts() naming_props = set([u'name']) mo_meta = MoMeta("ProcDoer", "procDoer", "doer[name]", VersionM...
true
true
f74e6956ca7769438c64aeed0922069d78d973d8
5,736
py
Python
insights/client/support.py
sagaraivale/insights-core
852a9669c998acf995e316bd407aeb4dbc6c485e
[ "Apache-2.0" ]
1
2018-03-26T12:59:24.000Z
2018-03-26T12:59:24.000Z
insights/client/support.py
sagaraivale/insights-core
852a9669c998acf995e316bd407aeb4dbc6c485e
[ "Apache-2.0" ]
null
null
null
insights/client/support.py
sagaraivale/insights-core
852a9669c998acf995e316bd407aeb4dbc6c485e
[ "Apache-2.0" ]
null
null
null
''' Module responsible for running the --support option for collecting debug information ''' import logging import shlex import re import os import requests import tempfile import time import subprocess from insights import get_nvr from subprocess import Popen, PIPE, STDOUT from constants import InsightsConstants as c...
37.246753
92
0.58682
import logging import shlex import re import os import requests import tempfile import time import subprocess from insights import get_nvr from subprocess import Popen, PIPE, STDOUT from constants import InsightsConstants as constants from connection import InsightsConnection from config import CONFIG as config APP_N...
true
true
f74e6a93a2b4a56b4affc7cdbe11026e86cd4a65
30,775
py
Python
src/qa4sm_reader/plotter.py
TUW-GEO/qa4sm-reader
148b034e883a64b88bdae84ad1f859a1ff483e73
[ "MIT" ]
null
null
null
src/qa4sm_reader/plotter.py
TUW-GEO/qa4sm-reader
148b034e883a64b88bdae84ad1f859a1ff483e73
[ "MIT" ]
7
2020-12-28T13:27:52.000Z
2021-02-09T15:58:37.000Z
src/qa4sm_reader/plotter.py
TUW-GEO/qa4sm-reader
148b034e883a64b88bdae84ad1f859a1ff483e73
[ "MIT" ]
5
2019-08-07T13:18:52.000Z
2021-01-20T15:25:27.000Z
# -*- coding: utf-8 -*- import warnings from pathlib import Path import seaborn as sns import pandas as pd from typing import Union import numpy as np import matplotlib.pyplot as plt from qa4sm_reader.img import QA4SMImg import qa4sm_reader.globals as globals from qa4sm_reader import plotting_methods as plm from warn...
33.055854
117
0.53186
import warnings from pathlib import Path import seaborn as sns import pandas as pd from typing import Union import numpy as np import matplotlib.pyplot as plt from qa4sm_reader.img import QA4SMImg import qa4sm_reader.globals as globals from qa4sm_reader import plotting_methods as plm from warnings import warn clas...
true
true
f74e6d2697754f19bf7da97d5060f35859284d2c
4,307
py
Python
tests/management/commands/test_sqlcreate.py
Mesteriis/django-extensions
b09cf0be83e0a095939d423554d6b0c7699c99cb
[ "MIT" ]
null
null
null
tests/management/commands/test_sqlcreate.py
Mesteriis/django-extensions
b09cf0be83e0a095939d423554d6b0c7699c99cb
[ "MIT" ]
1
2020-08-06T06:50:40.000Z
2020-08-06T06:50:40.000Z
tests/management/commands/test_sqlcreate.py
Mesteriis/django-extensions
b09cf0be83e0a095939d423554d6b0c7699c99cb
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from io import StringIO from django.core.management import CommandError, call_command from django.test import TestCase from django.test.utils import override_settings from unittest.mock import patch MYSQL_DATABASE_SETTINGS = { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'dbatabase'...
36.5
121
0.716276
from io import StringIO from django.core.management import CommandError, call_command from django.test import TestCase from django.test.utils import override_settings from unittest.mock import patch MYSQL_DATABASE_SETTINGS = { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'dbatabase', 'USER': 'foo', ...
true
true
f74e6d90ad90a94850b2dbd4aea40c7222793820
8,662
py
Python
python/dlbs/result_processor.py
joehandzik/dlcookbook-dlbs
7c5ca5a6dfa4e2f7b8b4d81c60bd8be343dabd30
[ "Apache-2.0" ]
123
2017-11-28T20:21:24.000Z
2022-03-22T11:21:04.000Z
python/dlbs/result_processor.py
joehandzik/dlcookbook-dlbs
7c5ca5a6dfa4e2f7b8b4d81c60bd8be343dabd30
[ "Apache-2.0" ]
17
2018-01-05T00:05:13.000Z
2020-09-18T05:12:45.000Z
python/dlbs/result_processor.py
joehandzik/dlcookbook-dlbs
7c5ca5a6dfa4e2f7b8b4d81c60bd8be343dabd30
[ "Apache-2.0" ]
48
2018-01-04T20:52:51.000Z
2022-03-06T00:47:17.000Z
# (c) Copyright [2017] Hewlett Packard Enterprise Development LP # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
38.669643
99
0.676749
from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import json from collections import defaultdict from dlbs.utils import Six from dlbs.utils import DictUtils from dlbs.processor import Processor def load_json_file(file_name): ...
true
true
f74e6da07c41db1cf0086e4d84562ae558d240c3
1,047
py
Python
demo/components/scalar_test.py
rainyfly/VisualDL
aa1bd8e6a993d4a355f07c7c5461a1853ca790c9
[ "Apache-2.0" ]
4,861
2017-12-21T01:54:59.000Z
2022-03-31T07:56:56.000Z
demo/components/scalar_test.py
boy-nan/VisualDL
acd7bc43f0db3ed0e8d7b077ac1cfbb41eb97e20
[ "Apache-2.0" ]
485
2017-12-21T02:04:55.000Z
2022-03-31T05:56:50.000Z
demo/components/scalar_test.py
boy-nan/VisualDL
acd7bc43f0db3ed0e8d7b077ac1cfbb41eb97e20
[ "Apache-2.0" ]
655
2017-12-21T08:34:54.000Z
2022-03-28T03:50:12.000Z
# Copyright (c) 2020 VisualDL Authors. All Rights Reserve. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
40.269231
79
0.665712
from visualdl import LogWriter if __name__ == '__main__': value = [i/1000.0 for i in range(1000)] with LogWriter(logdir="./log/scalar_test/train") as writer: for step in range(1000): writer.add_scalar(tag="acc", step=step, value=value[step]) writer.add_scalar(ta...
true
true
f74e6e111dc5cf036a9b72aaa6634cb362c37e6b
212,722
py
Python
tests/unit/test_blob.py
ddelgrosso1/python-storage
4abb40310eca7ec45afc4bc5e4dfafbe083e74d2
[ "Apache-2.0" ]
2
2021-10-02T01:54:01.000Z
2021-11-17T10:35:03.000Z
tests/unit/test_blob.py
Ark-kun/python-storage
bd72f5d7017c6e196e0cc5f7c537c848c83f889d
[ "Apache-2.0" ]
null
null
null
tests/unit/test_blob.py
Ark-kun/python-storage
bd72f5d7017c6e196e0cc5f7c537c848c83f889d
[ "Apache-2.0" ]
null
null
null
# Copyright 2014 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
37.189161
115
0.641795
import base64 import datetime import hashlib import io import json import os import tempfile import unittest import mock import pytest import six from six.moves import http_client from six.moves.urllib.parse import urlencode from google.cloud.storage.retry import DEFAULT_RETRY from google.cloud.storage....
true
true
f74e6f4bf238185e9c67a18c4d0fc5e67ed55f09
7,952
py
Python
sentry_sdk/integrations/aiohttp.py
annu-ps31/sentry-python
3966b4a9744bfcb8c53dcca1b615bbadf4935aec
[ "BSD-2-Clause" ]
1,213
2018-06-19T00:51:01.000Z
2022-03-31T06:37:16.000Z
sentry_sdk/integrations/aiohttp.py
annu-ps31/sentry-python
3966b4a9744bfcb8c53dcca1b615bbadf4935aec
[ "BSD-2-Clause" ]
1,020
2018-07-16T12:50:36.000Z
2022-03-31T20:42:49.000Z
sentry_sdk/integrations/aiohttp.py
annu-ps31/sentry-python
3966b4a9744bfcb8c53dcca1b615bbadf4935aec
[ "BSD-2-Clause" ]
340
2018-07-16T12:47:27.000Z
2022-03-22T10:13:21.000Z
import sys import weakref from sentry_sdk._compat import reraise from sentry_sdk.hub import Hub from sentry_sdk.integrations import Integration, DidNotEnable from sentry_sdk.integrations.logging import ignore_logger from sentry_sdk.integrations._wsgi_common import ( _filter_headers, request_body_within_bounds,...
34.128755
88
0.607772
import sys import weakref from sentry_sdk._compat import reraise from sentry_sdk.hub import Hub from sentry_sdk.integrations import Integration, DidNotEnable from sentry_sdk.integrations.logging import ignore_logger from sentry_sdk.integrations._wsgi_common import ( _filter_headers, request_body_within_bounds,...
true
true
f74e7068125f18a42bbdbdac6a8cb0238b15fc4c
145
py
Python
Python Programs/LcmGcd.py
tanvi003/Basic_programs
6639334cc40866b04e3e25c7e38136e4abc995d3
[ "MIT" ]
null
null
null
Python Programs/LcmGcd.py
tanvi003/Basic_programs
6639334cc40866b04e3e25c7e38136e4abc995d3
[ "MIT" ]
null
null
null
Python Programs/LcmGcd.py
tanvi003/Basic_programs
6639334cc40866b04e3e25c7e38136e4abc995d3
[ "MIT" ]
1
2019-10-26T18:52:30.000Z
2019-10-26T18:52:30.000Z
from math import gcd for x in range(int(input())): (a,b)=[int(m) for m in input().split()] k=gcd(a,b) lcm =(a*b//k) print(k,lcm)
20.714286
43
0.544828
from math import gcd for x in range(int(input())): (a,b)=[int(m) for m in input().split()] k=gcd(a,b) lcm =(a*b//k) print(k,lcm)
true
true
f74e709768c35adeecd7a0188985a78d6d434a2a
7,893
py
Python
RobotLibrary/Library/RobotLibrary.py
aaron-goff/automated-channel-testing
1590b3dba0e2a30b3eaa3d63fb103eec6f841dad
[ "Apache-2.0" ]
null
null
null
RobotLibrary/Library/RobotLibrary.py
aaron-goff/automated-channel-testing
1590b3dba0e2a30b3eaa3d63fb103eec6f841dad
[ "Apache-2.0" ]
null
null
null
RobotLibrary/Library/RobotLibrary.py
aaron-goff/automated-channel-testing
1590b3dba0e2a30b3eaa3d63fb103eec6f841dad
[ "Apache-2.0" ]
null
null
null
######################################################################## # Copyright 2019 Roku, Inc. # #Licensed under the Apache License, Version 2.0 (the "License"); #you may not use this file except in compliance with the License. #You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE...
33.587234
94
0.614722
(self): response = self._client.get_player_info() self._checkResponse(response) res = json.loads(response.text) value = res['value'] value['Position'] = int(self._getMsFromString(value['Position'])) value['Duration'] = int(self._getMsFromString(value['Duration'])) ...
true
true
f74e70c85a6559f91b2604427bb0512e28b8f091
5,638
py
Python
nodejs/yolov5/hubconf.py
gaeunpark924/Comprehensive-Design-2
3a4ca01c5f3daa58a90516654bcd3cc4e8725506
[ "Apache-2.0" ]
10
2021-05-23T11:39:24.000Z
2022-03-14T18:20:10.000Z
nodejs/yolov5/hubconf.py
gaeunpark924/Comprehensive-Design-2
3a4ca01c5f3daa58a90516654bcd3cc4e8725506
[ "Apache-2.0" ]
null
null
null
nodejs/yolov5/hubconf.py
gaeunpark924/Comprehensive-Design-2
3a4ca01c5f3daa58a90516654bcd3cc4e8725506
[ "Apache-2.0" ]
1
2022-03-03T15:10:49.000Z
2022-03-03T15:10:49.000Z
"""YOLOv5 PyTorch Hub models https://pytorch.org/hub/ultralytics_yolov5/ Usage: import torch model = torch.hub.load('ultralytics/yolov5', 'yolov5s') """ import torch def _create(name, pretrained=True, channels=3, classes=80, autoshape=True, verbose=True, device=None): """Creates a specified YOLOv5 model...
44.746032
120
0.684285
import torch def _create(name, pretrained=True, channels=3, classes=80, autoshape=True, verbose=True, device=None): from pathlib import Path from models.yolo import Model, attempt_load from utils.general import check_requirements, set_logging from utils.google_utils import attempt_download from ...
true
true
f74e71e4855f086f7b879c8f77f347776013f197
628
py
Python
tests/test_simple_storage.py
jayantpatil/brownie-simple-storage
f501e94e88576a9a267ea451c046cedcb7100871
[ "MIT" ]
null
null
null
tests/test_simple_storage.py
jayantpatil/brownie-simple-storage
f501e94e88576a9a267ea451c046cedcb7100871
[ "MIT" ]
null
null
null
tests/test_simple_storage.py
jayantpatil/brownie-simple-storage
f501e94e88576a9a267ea451c046cedcb7100871
[ "MIT" ]
null
null
null
from brownie import SimpleStorage, accounts def test_deploy(): # Arrange account = accounts[0] # Act simple_storage = SimpleStorage.deploy({"from": account}) starting_value = simple_storage.retrieve() expected = 0 # Assert assert starting_value == expected def testupdating_storage(...
21.655172
70
0.686306
from brownie import SimpleStorage, accounts def test_deploy(): account = accounts[0] simple_storage = SimpleStorage.deploy({"from": account}) starting_value = simple_storage.retrieve() expected = 0 assert starting_value == expected def testupdating_storage(): account = ...
true
true
f74e721c9e381737188ca41c059a69b6f8d80b02
5,004
py
Python
BatchEnv.py
aws-samples/aws-batch-cicd-test-pipeline
ea347ba2a4137c7797ffdfeb0915fee83f4ae970
[ "MIT-0" ]
null
null
null
BatchEnv.py
aws-samples/aws-batch-cicd-test-pipeline
ea347ba2a4137c7797ffdfeb0915fee83f4ae970
[ "MIT-0" ]
null
null
null
BatchEnv.py
aws-samples/aws-batch-cicd-test-pipeline
ea347ba2a4137c7797ffdfeb0915fee83f4ae970
[ "MIT-0" ]
null
null
null
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: MIT-0 # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # software and associated documentation files (the "Software"), to deal in the Software # without restriction, including without ...
42.05042
105
0.588729
from aws_cdk import ( core, aws_batch, aws_ec2, aws_events, aws_events_targets, aws_ssm, aws_ecr, aws_ecs ) class BatchEnvironment(core.Stack): def __init__(self, scope: core.Construct, id: str, namespace, ** kwargs) -> None: super().__init__(scope, id, **kw...
true
true