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
f716ae18f7020711ec64646291e557f4c140c538
51
py
Python
temp.py
Ziggareto/hackerrank_python
02875e9677d74f397d75577b8f3b38b584f31506
[ "MIT" ]
null
null
null
temp.py
Ziggareto/hackerrank_python
02875e9677d74f397d75577b8f3b38b584f31506
[ "MIT" ]
null
null
null
temp.py
Ziggareto/hackerrank_python
02875e9677d74f397d75577b8f3b38b584f31506
[ "MIT" ]
null
null
null
if __name__ == '__main__': print('hi there!!')
25.5
27
0.588235
if __name__ == '__main__': print('hi there!!')
true
true
f716ae2b03112cbb59f032b586e1bf0f10e6bd85
11,973
py
Python
cbt/views.py
belloshehu/multiple-choice-questions
abfb7ac8cc24bc3f9ee34e9505bc6c6944786ac0
[ "MIT" ]
null
null
null
cbt/views.py
belloshehu/multiple-choice-questions
abfb7ac8cc24bc3f9ee34e9505bc6c6944786ac0
[ "MIT" ]
2
2020-09-03T21:48:33.000Z
2020-09-22T08:51:14.000Z
cbt/views.py
belloshehu/multiple-choice-questions
abfb7ac8cc24bc3f9ee34e9505bc6c6944786ac0
[ "MIT" ]
null
null
null
from django.shortcuts import ( render, redirect, reverse, get_object_or_404, get_list_or_404, ) from django.db.models import Q from django.urls import reverse_lazy from django.contrib.auth import authenti...
35.633929
106
0.664662
from django.shortcuts import ( render, redirect, reverse, get_object_or_404, get_list_or_404, ) from django.db.models import Q from django.urls import reverse_lazy from django.contrib.auth import authenti...
true
true
f716af9d8b3eb607fff52cdc80c5efef400bad64
664
py
Python
exp/alto/tools/create_terminals_bi.py
Hollo1996/4lang
d167110f619e652a5cce723d211946baeae077ea
[ "MIT" ]
20
2016-03-01T07:34:17.000Z
2021-09-06T11:08:11.000Z
exp/alto/tools/create_terminals_bi.py
Hollo1996/4lang
d167110f619e652a5cce723d211946baeae077ea
[ "MIT" ]
103
2015-02-03T13:34:55.000Z
2020-07-13T11:21:22.000Z
exp/alto/tools/create_terminals_bi.py
Hollo1996/4lang
d167110f619e652a5cce723d211946baeae077ea
[ "MIT" ]
14
2015-02-03T09:00:17.000Z
2021-12-15T11:26:30.000Z
#!/usr/bin/env python import sys from hunmisc.corpustools.tsv_tools import sentence_iterator from common import sanitize_word TEMPLATE = ('{0} -> {1}_{0}\n[graph] "({1}<root> / {1})"\n' + '[fourlang] "({1}<root> / {1})"\n') def main(): seen = set() with open(sys.argv[1]) as stream: for...
24.592593
67
0.536145
import sys from hunmisc.corpustools.tsv_tools import sentence_iterator from common import sanitize_word TEMPLATE = ('{0} -> {1}_{0}\n[graph] "({1}<root> / {1})"\n' + '[fourlang] "({1}<root> / {1})"\n') def main(): seen = set() with open(sys.argv[1]) as stream: for sentence in sentence...
true
true
f716afd528fd4bac2c2ee7f4d45b47e27b40ca16
1,143
py
Python
HDPython/tests/test_axi_fifo.py
HardwareDesignWithPython/HDPython
aade03aaa092b1684fa12bffd17674cf1c45f5ac
[ "MIT" ]
null
null
null
HDPython/tests/test_axi_fifo.py
HardwareDesignWithPython/HDPython
aade03aaa092b1684fa12bffd17674cf1c45f5ac
[ "MIT" ]
null
null
null
HDPython/tests/test_axi_fifo.py
HardwareDesignWithPython/HDPython
aade03aaa092b1684fa12bffd17674cf1c45f5ac
[ "MIT" ]
1
2021-10-20T20:08:16.000Z
2021-10-20T20:08:16.000Z
from HDPython import * from HDPython.examples import * from .helpers import Folders_isSame, vhdl_conversion, do_simulation,printf from HDPython.test_handler import add_test class test_bench_axi_fifo(v_entity): def __init__(self): super().__init__() self.architecture() def architecture(self...
23.326531
74
0.707787
from HDPython import * from HDPython.examples import * from .helpers import Folders_isSame, vhdl_conversion, do_simulation,printf from HDPython.test_handler import add_test class test_bench_axi_fifo(v_entity): def __init__(self): super().__init__() self.architecture() def architecture(self...
true
true
f716b0186a220c17477a6aa6ebacf35273a20db8
1,161
py
Python
test/geocoders/geonames.py
navidata/geopy
2c8e441cfb1a813fb2ab34fd41386204ad18f872
[ "MIT" ]
null
null
null
test/geocoders/geonames.py
navidata/geopy
2c8e441cfb1a813fb2ab34fd41386204ad18f872
[ "MIT" ]
null
null
null
test/geocoders/geonames.py
navidata/geopy
2c8e441cfb1a813fb2ab34fd41386204ad18f872
[ "MIT" ]
null
null
null
# -*- coding: UTF-8 -*- import unittest from geopy.compat import u from geopy.geocoders import GeoNames from test.geocoders.util import GeocoderTestBase, env @unittest.skipUnless( # pylint: disable=R0904,C0111 bool(env.get('GEONAMES_USERNAME')), "No GEONAMES_USERNAME env variable set" ) class GeoNamesTestCa...
29.025
77
0.634798
import unittest from geopy.compat import u from geopy.geocoders import GeoNames from test.geocoders.util import GeocoderTestBase, env @unittest.skipUnless( bool(env.get('GEONAMES_USERNAME')), "No GEONAMES_USERNAME env variable set" ) class GeoNamesTestCase(GeocoderTestBase): @classmethod def setU...
true
true
f716b2f64bf5f1efd19c1fea7576ec774a9a9154
532
py
Python
School/Average mark.py
Bamgm14/My-Random-Work
b9678a3a84dd8ff00efd638890cff76eb6967c1b
[ "MIT" ]
null
null
null
School/Average mark.py
Bamgm14/My-Random-Work
b9678a3a84dd8ff00efd638890cff76eb6967c1b
[ "MIT" ]
null
null
null
School/Average mark.py
Bamgm14/My-Random-Work
b9678a3a84dd8ff00efd638890cff76eb6967c1b
[ "MIT" ]
null
null
null
#To accepts marks in 5 subjects and displays the total and average mark #Above 90% Grade A* #90 - 80 % Grade A #70 – 80 % Grade B #60 – 70 % Grade C #Less than 60 Grade D a=float(input("Enter Mark(1):")) b=float(input("Enter Mark(2):")) c=float(input("Enter Mark(3):")) d=float(input("Enter Mark(4):"...
22.166667
71
0.577068
a=float(input("Enter Mark(1):")) b=float(input("Enter Mark(2):")) c=float(input("Enter Mark(3):")) d=float(input("Enter Mark(4):")) e=float(input("Enter Mark(5):")) f=(a+b+c+d+e)/5 if f>=90: print ("A+") elif f<90 and f>=80: print ("A") elif f<80 and f>=70: print ("B") elif f<70 and f>=60: print ...
true
true
f716b6b7fe18e32ba821b081861b3329d11d7a78
1,125
py
Python
csvObject/csvWriter.py
sbaker-dev/csvObject
e31668c9b71284c7e7f6516e61c9617ad7abb7b1
[ "MIT" ]
null
null
null
csvObject/csvWriter.py
sbaker-dev/csvObject
e31668c9b71284c7e7f6516e61c9617ad7abb7b1
[ "MIT" ]
null
null
null
csvObject/csvWriter.py
sbaker-dev/csvObject
e31668c9b71284c7e7f6516e61c9617ad7abb7b1
[ "MIT" ]
null
null
null
import csv def write_csv(write_out_path, name, headers, rows_to_write): """ Purpose ------- This writes out a csv file of row data with an optional header. If you don't want a header, pass None to headers Parameters ---------- :param name: The file name :type name: str :param wri...
28.846154
116
0.657778
import csv def write_csv(write_out_path, name, headers, rows_to_write): if type(rows_to_write[0]) != list: rows_to_write = [[row] for row in rows_to_write] with open(f"{write_out_path}/{name}.csv", "w", newline="", encoding="utf-8") as csv_reader: csv_writer = csv.writer(csv_reader) ...
true
true
f716b763cbd4d44af6bf17e00908e21772e85af9
851
py
Python
service/test_service.py
theBraindonor/la-parking-tickets
9537900c54c0fb4a5ca27d2828621b9b8a5ede73
[ "CC-BY-4.0" ]
null
null
null
service/test_service.py
theBraindonor/la-parking-tickets
9537900c54c0fb4a5ca27d2828621b9b8a5ede73
[ "CC-BY-4.0" ]
9
2020-03-24T16:55:25.000Z
2022-02-17T21:56:35.000Z
service/test_service.py
theBraindonor/la-parking-tickets
9537900c54c0fb4a5ca27d2828621b9b8a5ede73
[ "CC-BY-4.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Test the ticket model being serviced on localhost:8080 """ __author__ = "John Hoff" __email__ = "john.hoff@braindonor.net" __copyright__ = "Copyright 2019, John Hoff" __license__ = "Creative Commons Attribution-ShareAlike 4.0 International License" __version__ = "...
26.59375
111
0.692127
__author__ = "John Hoff" __email__ = "john.hoff@braindonor.net" __copyright__ = "Copyright 2019, John Hoff" __license__ = "Creative Commons Attribution-ShareAlike 4.0 International License" __version__ = "1.0.0" import json import requests from utility import use_project_path from model import load_sample_data_fr...
true
true
f716b8d03170ced406cf21f6d4db40052bbb480d
2,560
py
Python
notebooks/shared/nbconvert/exporters/script.py
leonbett/debuggingbook
ae1fa940c306160429232fbc93a7a7f14b44efb7
[ "MIT" ]
728
2018-09-21T03:51:04.000Z
2022-03-28T09:35:04.000Z
notebooks/shared/nbconvert/exporters/script.py
leonbett/debuggingbook
ae1fa940c306160429232fbc93a7a7f14b44efb7
[ "MIT" ]
103
2018-09-02T12:26:32.000Z
2022-02-09T07:19:08.000Z
notebooks/shared/nbconvert/exporters/script.py
leonbett/debuggingbook
ae1fa940c306160429232fbc93a7a7f14b44efb7
[ "MIT" ]
157
2018-09-02T08:00:50.000Z
2022-03-27T22:04:50.000Z
"""Generic script exporter class for any kernel language""" # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. import entrypoints from .templateexporter import TemplateExporter from traitlets import Dict, default from .base import get_exporter class ScriptExporter(...
40.634921
82
0.664844
import entrypoints from .templateexporter import TemplateExporter from traitlets import Dict, default from .base import get_exporter class ScriptExporter(TemplateExporter): _exporters = Dict() _lang_exporters = Dict() @default('template_file') def _template_file_default(self): r...
true
true
f716ba644f454c2eb8166dff1191bf0ce61c89b2
598
py
Python
derg/forms.py
mihail4216/myter
4ed1e8abc3f57595858347b21c86a9a10b3ff4a4
[ "MIT" ]
null
null
null
derg/forms.py
mihail4216/myter
4ed1e8abc3f57595858347b21c86a9a10b3ff4a4
[ "MIT" ]
null
null
null
derg/forms.py
mihail4216/myter
4ed1e8abc3f57595858347b21c86a9a10b3ff4a4
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- from django import forms # class username(forms.Form): # usernames = forms.CharField(max_length=100) class LoginForm(forms.Form): """ Лучше пользоваться формой и объявлять ее тут, тут можно менять сам тип поля, тест, число, визивик повесить на поле В самом html этого не сможем сде...
35.176471
122
0.727425
from django import forms class LoginForm(forms.Form): username = forms.CharField(label=u'Имя пользователя') password = forms.CharField(label=u'Пароль', widget=forms.PasswordInput()) class LogoutForm(forms.Form): logout = forms.BooleanField
true
true
f716ba93e72c41d843f4c01e2abc5c7f8996c487
148
py
Python
petstagram/common/urls.py
DimAntDim/SoftUni_Petstagram_Workshop
b4d6da5fa0d19de4b434046d0b7c73a40c8343b5
[ "MIT" ]
1
2021-06-14T19:50:52.000Z
2021-06-14T19:50:52.000Z
petstagram/common/urls.py
ArifRasim/Petstagram
dc754ecc2ee7184563b26d2ba3f795c2fc767b93
[ "MIT" ]
1
2021-08-09T16:31:13.000Z
2021-08-09T16:31:13.000Z
petstagram/common/urls.py
ArifRasim/Petstagram
dc754ecc2ee7184563b26d2ba3f795c2fc767b93
[ "MIT" ]
1
2022-03-15T13:50:30.000Z
2022-03-15T13:50:30.000Z
from django.urls import path from petstagram.common.views import LandingPage urlpatterns = [ path('', LandingPage.as_view(), name='index'), ]
18.5
50
0.72973
from django.urls import path from petstagram.common.views import LandingPage urlpatterns = [ path('', LandingPage.as_view(), name='index'), ]
true
true
f716bbce2341f6be93b2694916cecbdef85fba95
1,261
py
Python
demo/filepicker_demo/migrations/0002_auto_20150323_1549.py
aaronang/filepicker-django
9de61e9184ae93db9b260764cc2f45a38cb48400
[ "MIT" ]
15
2015-03-25T14:00:16.000Z
2021-04-15T17:47:02.000Z
demo/filepicker_demo/migrations/0002_auto_20150323_1549.py
aaronang/filepicker-django
9de61e9184ae93db9b260764cc2f45a38cb48400
[ "MIT" ]
3
2015-07-14T08:33:37.000Z
2018-12-15T12:58:52.000Z
demo/filepicker_demo/migrations/0002_auto_20150323_1549.py
Ink/django-filepicker
9de61e9184ae93db9b260764cc2f45a38cb48400
[ "MIT" ]
5
2015-07-14T13:30:38.000Z
2018-09-30T19:56:29.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django_filepicker.models class Migration(migrations.Migration): dependencies = [ ('filepicker_demo', '0001_initial'), ] operations = [ migrations.CreateModel( name...
30.756098
114
0.552736
from __future__ import unicode_literals from django.db import models, migrations import django_filepicker.models class Migration(migrations.Migration): dependencies = [ ('filepicker_demo', '0001_initial'), ] operations = [ migrations.CreateModel( name='BasicFilesModel', ...
true
true
f716bc49f322c1fc8a1504767c31a6b027dcd198
583
py
Python
utils/pbtxt.py
Sarmyt/masters_python_code
800d22624e9a9c4ae023f1c5ef40bd0efee5366b
[ "MIT" ]
null
null
null
utils/pbtxt.py
Sarmyt/masters_python_code
800d22624e9a9c4ae023f1c5ef40bd0efee5366b
[ "MIT" ]
null
null
null
utils/pbtxt.py
Sarmyt/masters_python_code
800d22624e9a9c4ae023f1c5ef40bd0efee5366b
[ "MIT" ]
1
2021-06-08T18:02:53.000Z
2021-06-08T18:02:53.000Z
from object_detection.protos.string_int_label_map_pb2 import StringIntLabelMap, StringIntLabelMapItem from google.protobuf import text_format def convert_classes(classes, start=1): msg = StringIntLabelMap() for id, name in enumerate(classes, start=start): msg.item.append(StringIntLabelMapItem(i...
30.684211
102
0.698113
from object_detection.protos.string_int_label_map_pb2 import StringIntLabelMap, StringIntLabelMapItem from google.protobuf import text_format def convert_classes(classes, start=1): msg = StringIntLabelMap() for id, name in enumerate(classes, start=start): msg.item.append(StringIntLabelMapItem(i...
true
true
f716bc57ce244e895a0fbf1e2a341ecb30e07e9c
199
py
Python
profiles/apps.py
javokhirbek1999/pet-finder-rest-api
67e926ad7b9aa4cb03a35f69e5a52b48dc776c62
[ "PostgreSQL", "Unlicense" ]
1
2021-08-22T22:44:41.000Z
2021-08-22T22:44:41.000Z
profiles/apps.py
javokhirbek1999/pet-finder-rest-api
67e926ad7b9aa4cb03a35f69e5a52b48dc776c62
[ "PostgreSQL", "Unlicense" ]
null
null
null
profiles/apps.py
javokhirbek1999/pet-finder-rest-api
67e926ad7b9aa4cb03a35f69e5a52b48dc776c62
[ "PostgreSQL", "Unlicense" ]
null
null
null
from django.apps import AppConfig class ProfilesConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'profiles' def ready(self): from . import signals
22.111111
56
0.713568
from django.apps import AppConfig class ProfilesConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'profiles' def ready(self): from . import signals
true
true
f716bc7d927d8f7d83db1221db13eba13a2be4a7
958
py
Python
assets/Point3D.py
sanils2002/PYTHON-CODES
607fadc2cba4b185a5529bd101faefa08f4c3469
[ "MIT" ]
null
null
null
assets/Point3D.py
sanils2002/PYTHON-CODES
607fadc2cba4b185a5529bd101faefa08f4c3469
[ "MIT" ]
null
null
null
assets/Point3D.py
sanils2002/PYTHON-CODES
607fadc2cba4b185a5529bd101faefa08f4c3469
[ "MIT" ]
null
null
null
#Define a Point3D class that inherits from object #Inside the Point3D class, define an __init__() function that accepts self, x, y, and z, and assigns these numbers to the member variables self.x, self.y, self.z #Define a __repr__() method that returns "(%d, %d, %d)" % (self.x, self.y, self.z). This tells Pytho...
34.214286
166
0.64405
import os from time import sleep def screen_clear(): if os.name == 'posix': _ = os.system('clear') else: _ = os.system('cls') sleep(1) screen_clear() class Point3D(object): def __init__(self, x, y, z): self.x = x self.y = y self.z = z def __repr__...
true
true
f716bd1d23d98952f326deff4604828c2677d9b6
2,934
py
Python
src/crawl_data/crawl_data/spiders/XinjiangSpider.py
SmartDataLab/Policy_crawler
fb9fcb7ab701dfb98606afe9f7260f2f2e857506
[ "MIT" ]
3
2020-05-06T06:11:46.000Z
2020-05-24T15:07:22.000Z
src/crawl_data/crawl_data/spiders/XinjiangSpider.py
SmartDataLab/Policy_crawler
fb9fcb7ab701dfb98606afe9f7260f2f2e857506
[ "MIT" ]
2
2020-04-02T14:14:28.000Z
2020-04-27T12:45:48.000Z
src/crawl_data/crawl_data/spiders/XinjiangSpider.py
SmartDataLab/Policy_crawler
fb9fcb7ab701dfb98606afe9f7260f2f2e857506
[ "MIT" ]
2
2020-04-04T09:32:07.000Z
2020-07-07T09:54:23.000Z
import scrapy import pickle import os import ast from urllib import parse from scrapy.selector import Selector class XinjiangSpider(scrapy.Spider): name = "Xinjiang" if not os.path.exists('../../data/HTML_pk/%s' % name): os.makedirs('../../data/HTML_pk/%s' % name) if not os.path.exists('../../data/...
38.605263
92
0.519087
import scrapy import pickle import os import ast from urllib import parse from scrapy.selector import Selector class XinjiangSpider(scrapy.Spider): name = "Xinjiang" if not os.path.exists('../../data/HTML_pk/%s' % name): os.makedirs('../../data/HTML_pk/%s' % name) if not os.path.exists('../../data/...
true
true
f716bfb88f86b0dedbf9b46d2a9ed40caaf4e047
405
py
Python
tests/benchmarkstt/test_modules.py
ioannisNoukakis/benchmarkstt
41074c9b89632e8d9ff8e0ee72187211052bfb04
[ "MIT" ]
1
2019-02-01T10:37:12.000Z
2019-02-01T10:37:12.000Z
tests/benchmarkstt/test_modules.py
ioannisNoukakis/benchmarkstt
41074c9b89632e8d9ff8e0ee72187211052bfb04
[ "MIT" ]
null
null
null
tests/benchmarkstt/test_modules.py
ioannisNoukakis/benchmarkstt
41074c9b89632e8d9ff8e0ee72187211052bfb04
[ "MIT" ]
null
null
null
from benchmarkstt.modules import Modules from benchmarkstt.normalization import cli def test_module(): modules = Modules('cli') assert modules['normalization'] is cli assert modules.normalization is cli for k, v in modules: assert modules[k] is v assert getattr(modules, k) is v ke...
25.3125
42
0.696296
from benchmarkstt.modules import Modules from benchmarkstt.normalization import cli def test_module(): modules = Modules('cli') assert modules['normalization'] is cli assert modules.normalization is cli for k, v in modules: assert modules[k] is v assert getattr(modules, k) is v ke...
true
true
f716c03e06bd0f761318cae39eb26bd38855049d
3,328
py
Python
src/sst/elements/merlin/interfaces/pymerlin-interface.py
vjleung/sst-elements
b2d4a41f1cd152ac96c9eca54000980a26a757d3
[ "BSD-3-Clause" ]
2
2019-06-10T15:32:03.000Z
2019-06-11T14:17:32.000Z
src/sst/elements/merlin/interfaces/pymerlin-interface.py
plavin/sst-elements
a84c63fa024782383272fb32ca24eb668f25b1c7
[ "BSD-3-Clause" ]
null
null
null
src/sst/elements/merlin/interfaces/pymerlin-interface.py
plavin/sst-elements
a84c63fa024782383272fb32ca24eb668f25b1c7
[ "BSD-3-Clause" ]
1
2019-09-24T13:41:56.000Z
2019-09-24T13:41:56.000Z
#!/usr/bin/env python # # Copyright 2009-2020 NTESS. Under the terms # of Contract DE-NA0003525 with NTESS, the U.S. # Government retains certain rights in this software. # # Copyright (c) 2009-2020, NTESS # All rights reserved. # # Portions are copyright of other developers: # See the file CONTRIBUTORS.TXT in the top ...
41.08642
123
0.735577
import sst from sst.merlin.base import * class LinkControl(NetworkInterface): def __init__(self): NetworkInterface.__init__(self) self._declareParams("params",["link_bw","input_buf_size","output_buf_size","vn_remap"]) self._subscribeToPlatformParamSet("network_interface") ...
true
true
f716c359878a902aee90be96fdffab16acbcdd2b
110,391
py
Python
articles/inversion.py
Solara570/demo-solara
3ce6df1fd68089c427bbd46fb0857e8b76428ca6
[ "MIT" ]
79
2017-09-25T04:42:05.000Z
2022-03-24T06:10:56.000Z
articles/inversion.py
Solara570/demo-solara
3ce6df1fd68089c427bbd46fb0857e8b76428ca6
[ "MIT" ]
1
2018-04-13T14:12:00.000Z
2018-04-13T14:12:00.000Z
articles/inversion.py
Solara570/demo-solara
3ce6df1fd68089c427bbd46fb0857e8b76428ca6
[ "MIT" ]
13
2017-09-29T03:20:20.000Z
2022-03-07T13:18:16.000Z
#coding=utf-8 ################################################################################################ # A 3-part series on circle inversion, Descartes' theorem along with its variants, and more! # # # # Part 1: A...
40.915864
132
0.599125
= sp - n * unit_vec new_ep = ep + n * unit_vec Line.__init__(self, new_sp, new_ep, **kwargs) class DotLabel(VMobject): CONFIG = { "position" : UP, "label_buff" : 0.25, } def __init__(self, label_text, dot, **kwargs): VMobject.__init__(self, **kwargs) self...
true
true
f716c4d714c5addfce5044ca823eb0d4556612cc
518
py
Python
test/autest/gold_tests/smoke/smoke.test.py
SolidWallOfCode/txn-box
d92269be8bb8989bdaa96048757a01a0d3f6ba6d
[ "Apache-2.0" ]
7
2019-10-11T23:53:01.000Z
2021-09-15T01:56:50.000Z
test/autest/gold_tests/smoke/smoke.test.py
SolidWallOfCode/txn-box
d92269be8bb8989bdaa96048757a01a0d3f6ba6d
[ "Apache-2.0" ]
13
2019-08-07T16:03:51.000Z
2022-03-24T19:01:33.000Z
test/autest/gold_tests/smoke/smoke.test.py
SolidWallOfCode/txn-box
d92269be8bb8989bdaa96048757a01a0d3f6ba6d
[ "Apache-2.0" ]
5
2019-07-24T15:59:02.000Z
2021-06-23T10:02:47.000Z
# @file # # Copyright 2020, Verizon Media # SPDX-License-Identifier: Apache-2.0 # ''' Basic smoke tests. ''' Test.Summary = ''' Test basic functions and directives. ''' Test.TxnBoxTestAndRun("Smoke Test", "smoke.replay.yaml", config_path='Auto', config_key="meta.txn_box.global" ,remap=[('http://example...
28.777778
125
0.57722
Test.Summary = ''' Test basic functions and directives. ''' Test.TxnBoxTestAndRun("Smoke Test", "smoke.replay.yaml", config_path='Auto', config_key="meta.txn_box.global" ,remap=[('http://example.one/3', 'http://example.one/3', ('--key=meta.txn_box.remap-1', 'smoke.replay.yaml')) ...
true
true
f716c4e4e1ba4e92ac11bebaf53ac8c7e09eae5b
209
py
Python
treat/__init__.py
tjlaboss/tasty_treat
5a137b49c6648eda6500025de8bab9c8dcc78d45
[ "MIT" ]
3
2019-03-04T22:52:07.000Z
2022-01-23T12:28:58.000Z
treat/__init__.py
tjlaboss/tasty_treat
5a137b49c6648eda6500025de8bab9c8dcc78d45
[ "MIT" ]
3
2021-07-23T17:30:35.000Z
2021-09-17T16:25:57.000Z
treat/__init__.py
tjlaboss/tasty_treat
5a137b49c6648eda6500025de8bab9c8dcc78d45
[ "MIT" ]
null
null
null
from . import constants from . import argparse from . import elements from . import materials from . import mesh from . import moc from .treat_lattice import TreatLattice from .core_builder import CoreBuilder
23.222222
39
0.808612
from . import constants from . import argparse from . import elements from . import materials from . import mesh from . import moc from .treat_lattice import TreatLattice from .core_builder import CoreBuilder
true
true
f716c526012bd7a8136418de119de0fdce82deb1
2,884
py
Python
mswh/comm/tests/test_sql.py
hannesb0/MSWH
ce214f26369106c124052638e93cc38fbd58cc91
[ "BSD-3-Clause-LBNL" ]
5
2019-05-23T00:54:33.000Z
2021-06-01T18:06:49.000Z
mswh/comm/tests/test_sql.py
hannesb0/MSWH
ce214f26369106c124052638e93cc38fbd58cc91
[ "BSD-3-Clause-LBNL" ]
36
2019-05-22T23:02:35.000Z
2021-04-04T21:24:17.000Z
mswh/comm/tests/test_sql.py
hannesb0/MSWH
ce214f26369106c124052638e93cc38fbd58cc91
[ "BSD-3-Clause-LBNL" ]
14
2019-08-25T01:27:40.000Z
2021-11-17T19:25:02.000Z
import logging import os import unittest from mswh.comm.sql import Sql import pandas as pd logging.basicConfig(level=logging.DEBUG) # has setUpClass method, thus run the test on the entire class class SqlTests(unittest.TestCase): """Tests the db-python read-write capabilities.""" @classmeth...
29.428571
80
0.587379
import logging import os import unittest from mswh.comm.sql import Sql import pandas as pd logging.basicConfig(level=logging.DEBUG) class SqlTests(unittest.TestCase): @classmethod def setUpClass(cls): test_db_name = "test.db" test_db_fulpath = os.path.join(os.path.dirname(...
true
true
f716c53c15f21f36710f5ff9f2db87e1f34e3965
2,442
py
Python
2022-TR-Crystallography/Simulations-2.py
JMSkelton/Linkage-Isomer-JMAK-Kinetics
6ad7626ea9447855121a9b8ef6eb10efb93db300
[ "MIT" ]
null
null
null
2022-TR-Crystallography/Simulations-2.py
JMSkelton/Linkage-Isomer-JMAK-Kinetics
6ad7626ea9447855121a9b8ef6eb10efb93db300
[ "MIT" ]
null
null
null
2022-TR-Crystallography/Simulations-2.py
JMSkelton/Linkage-Isomer-JMAK-Kinetics
6ad7626ea9447855121a9b8ef6eb10efb93db300
[ "MIT" ]
null
null
null
# Simulations-2.py import glob import math import yaml from KineticAnalysis.NumericalSimulator import NumericalSimulator PPEqThreshold = 1.0e-4 if __name__ == "__main__": # Read fits to time-resolved datasets. tr_data_sets = { } for f in glob.glob(r"TimeResolved-*.yaml"): with open...
28.729412
100
0.514742
import glob import math import yaml from KineticAnalysis.NumericalSimulator import NumericalSimulator PPEqThreshold = 1.0e-4 if __name__ == "__main__": tr_data_sets = { } for f in glob.glob(r"TimeResolved-*.yaml"): with open(f, 'rb') as input_file: input_yaml = yaml.l...
true
true
f716c5621fcdf0c3aada36d496dec8b1fe35c8cc
9,045
py
Python
GUI-II/web_scrap.py
DulceWRLD/College
9b94868514f461c97121d72ea0855f72ca95e798
[ "MIT" ]
2
2021-08-21T01:25:50.000Z
2021-12-10T06:51:46.000Z
GUI-II/web_scrap.py
DulceWRLD/College
9b94868514f461c97121d72ea0855f72ca95e798
[ "MIT" ]
null
null
null
GUI-II/web_scrap.py
DulceWRLD/College
9b94868514f461c97121d72ea0855f72ca95e798
[ "MIT" ]
6
2021-03-14T22:21:23.000Z
2022-03-29T15:30:58.000Z
########################################################################################### # Created by Jason Downing # # Some code originally found at this Stackoverflow Post: # # https://stackoverflow.com/questions/1896...
31.297578
109
0.629519
true
true
f716c5911528e44ebe67f4a2d8cb1ca1d4e1243b
4,273
py
Python
codalab/rest/chats.py
millerjohnp/codalab-worksheets
d6fc37864e7a8966380fc9d73865b10e434d6678
[ "Apache-2.0" ]
null
null
null
codalab/rest/chats.py
millerjohnp/codalab-worksheets
d6fc37864e7a8966380fc9d73865b10e434d6678
[ "Apache-2.0" ]
null
null
null
codalab/rest/chats.py
millerjohnp/codalab-worksheets
d6fc37864e7a8966380fc9d73865b10e434d6678
[ "Apache-2.0" ]
1
2020-03-13T08:16:17.000Z
2020-03-13T08:16:17.000Z
""" Chatbox API """ import os from bottle import get, local, post, request import yaml from codalab.objects.chat_box_qa import ChatBoxQA from codalab.server.authenticated_plugin import AuthenticatedPlugin @get('/chats', apply=AuthenticatedPlugin()) def get_chat_box(): """ Return a list of chats that the cur...
34.739837
132
0.656681
import os from bottle import get, local, post, request import yaml from codalab.objects.chat_box_qa import ChatBoxQA from codalab.server.authenticated_plugin import AuthenticatedPlugin @get('/chats', apply=AuthenticatedPlugin()) def get_chat_box(): query = {'user_id': request.user.user_id} return { ...
true
true
f716c5deb4bfae59b106289a4f4dd8d17a07d48e
12,462
py
Python
testing/test_ldclient_evaluation.py
gangeli/python-server-sdk
3095315fd53c3bf723b0f16b0c18acadef4dfb3e
[ "Apache-2.0" ]
null
null
null
testing/test_ldclient_evaluation.py
gangeli/python-server-sdk
3095315fd53c3bf723b0f16b0c18acadef4dfb3e
[ "Apache-2.0" ]
null
null
null
testing/test_ldclient_evaluation.py
gangeli/python-server-sdk
3095315fd53c3bf723b0f16b0c18acadef4dfb3e
[ "Apache-2.0" ]
null
null
null
import pytest import json import time from ldclient.client import LDClient, Config from ldclient.feature_store import InMemoryFeatureStore from ldclient.flag import EvaluationDetail from ldclient.interfaces import FeatureStore from ldclient.versioned_data_kind import FEATURES from testing.stub_util import MockEventProc...
34.520776
116
0.620847
import pytest import json import time from ldclient.client import LDClient, Config from ldclient.feature_store import InMemoryFeatureStore from ldclient.flag import EvaluationDetail from ldclient.interfaces import FeatureStore from ldclient.versioned_data_kind import FEATURES from testing.stub_util import MockEventProc...
true
true
f716c6d4dbe952ad73298aca3af754a81ad523a5
1,666
py
Python
step6_orchestration/telegram_publisher/publisher.py
osmya/pydatanlp
4162221224d2ad67078949691b0cfc4222731acd
[ "Apache-2.0" ]
19
2019-07-01T13:31:45.000Z
2021-08-02T10:46:59.000Z
step6_orchestration/telegram_publisher/publisher.py
osmya/pydatanlp
4162221224d2ad67078949691b0cfc4222731acd
[ "Apache-2.0" ]
1
2019-07-11T15:15:18.000Z
2019-07-20T16:41:36.000Z
step6_orchestration/telegram_publisher/publisher.py
osmya/pydatanlp
4162221224d2ad67078949691b0cfc4222731acd
[ "Apache-2.0" ]
15
2019-07-11T21:26:06.000Z
2021-08-04T09:04:59.000Z
from aiogram import Bot, Dispatcher, executor, types from aiogram.utils.exceptions import CantParseEntities from dotenv import load_dotenv, find_dotenv from signal import signal, SIGINT from tqdm import tqdm from os import getenv import sys import fire import uvloop import redis load_dotenv(find_dotenv('.telegram')) u...
27.311475
76
0.697479
from aiogram import Bot, Dispatcher, executor, types from aiogram.utils.exceptions import CantParseEntities from dotenv import load_dotenv, find_dotenv from signal import signal, SIGINT from tqdm import tqdm from os import getenv import sys import fire import uvloop import redis load_dotenv(find_dotenv('.telegram')) u...
true
true
f716ca32bfbce92f904eda519d192105b6956caa
3,447
py
Python
cmdbox/scaffold_templates/migrations/0002_auto_20160404_2007.py
vitorfs/cmdbox
97806c02caf5947ec855286212e61db714e3fb02
[ "MIT" ]
1
2019-09-07T11:49:11.000Z
2019-09-07T11:49:11.000Z
cmdbox/scaffold_templates/migrations/0002_auto_20160404_2007.py
vitorfs/cmdbox
97806c02caf5947ec855286212e61db714e3fb02
[ "MIT" ]
null
null
null
cmdbox/scaffold_templates/migrations/0002_auto_20160404_2007.py
vitorfs/cmdbox
97806c02caf5947ec855286212e61db714e3fb02
[ "MIT" ]
2
2018-09-04T08:33:17.000Z
2020-09-18T20:26:46.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2016-04-04 20:07 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('scaffold_templates', '0001_...
42.036585
158
0.59385
from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('scaffold_templates', '0001_initial'), ] operations = [ migrations.CreateModel( ...
true
true
f716cbce48a8f8203417dcba6fc313bd1d90bcd9
5,760
py
Python
test/visualization/test_visualization.py
chrhck/pyABC
731cfdec26bef3898bf6e244daa5c8f83f3fe19d
[ "BSD-3-Clause" ]
null
null
null
test/visualization/test_visualization.py
chrhck/pyABC
731cfdec26bef3898bf6e244daa5c8f83f3fe19d
[ "BSD-3-Clause" ]
null
null
null
test/visualization/test_visualization.py
chrhck/pyABC
731cfdec26bef3898bf6e244daa5c8f83f3fe19d
[ "BSD-3-Clause" ]
null
null
null
import pyabc import tempfile import pytest import os import numpy as np import pandas as pd import matplotlib.pyplot as plt # create and run some model def model(p): return {'ss0': p['p0'] + 0.1 * np.random.uniform(), 'ss1': p['p1'] + 0.1 * np.random.uniform()} p_true = {'p0': 3, 'p1': 4} observat...
32.542373
79
0.64375
import pyabc import tempfile import pytest import os import numpy as np import pandas as pd import matplotlib.pyplot as plt def model(p): return {'ss0': p['p0'] + 0.1 * np.random.uniform(), 'ss1': p['p1'] + 0.1 * np.random.uniform()} p_true = {'p0': 3, 'p1': 4} observation = {'ss0': p_true['p0'],...
true
true
f716cd537ee2ce3b739c2b138de0ba36abc67390
8,949
py
Python
tools/vsnp/vsnp_statistics.py
supernord/tools-iuc
9a0c41967765d120a8fc519c0c7f09cbe3a6efbe
[ "MIT" ]
1
2019-07-05T13:19:51.000Z
2019-07-05T13:19:51.000Z
tools/vsnp/vsnp_statistics.py
mtekman/tools-iuc
95f1ae4ed1cdd56114df76d215f9e1ed549aa4c5
[ "MIT" ]
8
2019-05-27T20:54:44.000Z
2021-10-04T09:33:30.000Z
tools/vsnp/vsnp_statistics.py
mtekman/tools-iuc
95f1ae4ed1cdd56114df76d215f9e1ed549aa4c5
[ "MIT" ]
null
null
null
#!/usr/bin/env python import argparse import csv import gzip import os from functools import partial import numpy import pandas from Bio import SeqIO def nice_size(size): # Returns a readably formatted string with the size words = ['bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB'] prefix = '' try: ...
46.128866
169
0.658956
import argparse import csv import gzip import os from functools import partial import numpy import pandas from Bio import SeqIO def nice_size(size): words = ['bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB'] prefix = '' try: size = float(size) if size < 0: size = abs(size) ...
true
true
f716cd5d7134a3961ffe080fd5955660a50ac9e2
4,759
py
Python
augmented_seq2seq/datasets/friends/data.py
jsedoc/nn_chatbot
7b4406687bad2efa14658cb5aa137065cd325073
[ "MIT" ]
2
2017-07-22T15:34:02.000Z
2017-12-07T07:28:56.000Z
augmented_seq2seq/datasets/friends/data.py
jsedoc/nn_chatbot
7b4406687bad2efa14658cb5aa137065cd325073
[ "MIT" ]
null
null
null
augmented_seq2seq/datasets/friends/data.py
jsedoc/nn_chatbot
7b4406687bad2efa14658cb5aa137065cd325073
[ "MIT" ]
3
2017-06-09T10:30:22.000Z
2020-02-25T02:29:58.000Z
FILENAME = 'sequences_full.csv' VOCAB_SIZE = None UNK = 'UNK' POS_TAGS = { 'CC' : '<CC>', 'CD' : '<CD>', 'DT' : '<DT>', 'EX' : '<EX>', 'FW' : '<FW>', 'IN' : '<IN>', 'JJ' : '<JJ>', 'JJR' : '<JJR>', 'JJS' : '<JJS>', 'LS' : '<LS>', 'MD' : '<MD>', 'NN' : '<NN>', 'NNS' : '<NNS>', 'NNP' : '<NNP>', 'NNPS' : '<NNPS>', 'PDT' :...
25.86413
595
0.548645
FILENAME = 'sequences_full.csv' VOCAB_SIZE = None UNK = 'UNK' POS_TAGS = { 'CC' : '<CC>', 'CD' : '<CD>', 'DT' : '<DT>', 'EX' : '<EX>', 'FW' : '<FW>', 'IN' : '<IN>', 'JJ' : '<JJ>', 'JJR' : '<JJR>', 'JJS' : '<JJS>', 'LS' : '<LS>', 'MD' : '<MD>', 'NN' : '<NN>', 'NNS' : '<NNS>', 'NNP' : '<NNP>', 'NNPS' : '<NNPS>', 'PDT' :...
true
true
f716cd6b0558dfb762b9277089b16cb9576044b2
1,613
py
Python
venv/lib/python3.6/site-packages/xero_python/payrollau/models/timesheets.py
6enno/FarmXero
881b1e6648e927631b276e66a4c5287e4de2cbc1
[ "MIT" ]
null
null
null
venv/lib/python3.6/site-packages/xero_python/payrollau/models/timesheets.py
6enno/FarmXero
881b1e6648e927631b276e66a4c5287e4de2cbc1
[ "MIT" ]
null
null
null
venv/lib/python3.6/site-packages/xero_python/payrollau/models/timesheets.py
6enno/FarmXero
881b1e6648e927631b276e66a4c5287e4de2cbc1
[ "MIT" ]
null
null
null
# coding: utf-8 """ Xero Payroll AU This is the Xero Payroll API for orgs in Australia region. # noqa: E501 Contact: api@xero.com Generated by: https://openapi-generator.tech """ import re # noqa: F401 from xero_python.models import BaseModel class Timesheets(BaseModel): """NOTE: This clas...
24.815385
76
0.619343
import re from xero_python.models import BaseModel class Timesheets(BaseModel): openapi_types = {"timesheets": "list[Timesheet]"} attribute_map = {"timesheets": "Timesheets"} def __init__(self, timesheets=None): self._timesheets = None self.discriminator = None if tim...
true
true
f716ce82d68d18fd209d91f8e1db052c5725c571
6,938
py
Python
assignment2/cs231n/optim.py
Abhijeet8901/CS231n
c8e715028b453899d5069cdb34faf3fc2959c270
[ "MIT" ]
null
null
null
assignment2/cs231n/optim.py
Abhijeet8901/CS231n
c8e715028b453899d5069cdb34faf3fc2959c270
[ "MIT" ]
null
null
null
assignment2/cs231n/optim.py
Abhijeet8901/CS231n
c8e715028b453899d5069cdb34faf3fc2959c270
[ "MIT" ]
null
null
null
import numpy as np """ This file implements various first-order update rules that are commonly used for training neural networks. Each update rule accepts current weights and the gradient of the loss with respect to those weights and produces the next set of weights. Each update rule has the same interface: def updat...
38.544444
79
0.537763
import numpy as np def sgd(w, dw, config=None): if config is None: config = {} config.setdefault("learning_rate", 1e-2) w -= config["learning_rate"] * dw return w, config def sgd_momentum(w, dw, config=None): if config is None: config = {} config.setdefault("learning_rate",...
true
true
f716cea90be05811860d24af0a9d540d7d2e2e6c
4,451
py
Python
code/distributeHI.py
modichirag/21cmhod
0807a7b0b880f4ba5bc7161b843d500ddcece5a7
[ "MIT" ]
null
null
null
code/distributeHI.py
modichirag/21cmhod
0807a7b0b880f4ba5bc7161b843d500ddcece5a7
[ "MIT" ]
null
null
null
code/distributeHI.py
modichirag/21cmhod
0807a7b0b880f4ba5bc7161b843d500ddcece5a7
[ "MIT" ]
null
null
null
import numpy as np import re, os from pmesh.pm import ParticleMesh from nbodykit.lab import BigFileCatalog, BigFileMesh, MultipleSpeciesCatalog, FFTPower from nbodykit import setup_logging from mpi4py import MPI import HImodels # enable logging, we have some clue what's going on. setup_logging('info') #...
34.238462
106
0.625927
import numpy as np import re, os from pmesh.pm import ParticleMesh from nbodykit.lab import BigFileCatalog, BigFileMesh, MultipleSpeciesCatalog, FFTPower from nbodykit import setup_logging from mpi4py import MPI import HImodels setup_logging('info') #Get model as parameter import argparse parser = argp...
true
true
f716cec14ad98ba7140fbdbb91cb9e7cbc9274b0
11,751
py
Python
couplet_composer/project.py
anttikivi/couplet-composer
0f6aaf894b35ea60d8047c0072ec146d4e1d2a6f
[ "MIT" ]
null
null
null
couplet_composer/project.py
anttikivi/couplet-composer
0f6aaf894b35ea60d8047c0072ec146d4e1d2a6f
[ "MIT" ]
16
2020-10-29T17:31:47.000Z
2022-03-07T17:01:52.000Z
couplet_composer/project.py
anttikivi/couplet-composer
0f6aaf894b35ea60d8047c0072ec146d4e1d2a6f
[ "MIT" ]
null
null
null
# Copyright (c) 2020 Antti Kivi # Licensed under the MIT License """A module that contains the class that represents the project that the build script acts on. """ import importlib import json import logging import os from typing import Any, List from .support.system import System from .support import environment ...
33.864553
79
0.537997
import importlib import json import logging import os from typing import Any, List from .support.system import System from .support import environment from .binary_dependency import BinaryDependency from .dependency import Dependency class Project: SHARED_VERSION_KEY = "shared_version" SHARED_USAGE_...
true
true
f716cf2c2f40b9fb26a797c10a0e167af41d51ea
1,354
py
Python
petpetgif/petpet.py
Gst0ne/pet-pet-gif
e219a859558df99424625e3dc51b287e5c7674ff
[ "MIT" ]
1
2021-11-06T13:14:01.000Z
2021-11-06T13:14:01.000Z
petpetgif/petpet.py
Gst0ne/pet-pet-gif
e219a859558df99424625e3dc51b287e5c7674ff
[ "MIT" ]
null
null
null
petpetgif/petpet.py
Gst0ne/pet-pet-gif
e219a859558df99424625e3dc51b287e5c7674ff
[ "MIT" ]
1
2021-11-12T08:50:24.000Z
2021-11-12T08:50:24.000Z
from PIL import Image from petpetgif.saveGif import save_transparent_gif from pkg_resources import resource_stream frames = 10 resolution = (128, 128) delay = 20 def make(source, dest): """ :param source: A filename (string), pathlib.Path object or a file object. (This parameter corresponds ...
38.685714
162
0.639586
from PIL import Image from petpetgif.saveGif import save_transparent_gif from pkg_resources import resource_stream frames = 10 resolution = (128, 128) delay = 20 def make(source, dest): images = [] base = Image.open(source).convert('RGBA').resize(resolution) for i in range(frames): squeeze = i if...
true
true
f716cf6f63fdd848b405bbb16c421fdd80bde9ff
1,873
py
Python
remora/tests/test_tracker.py
Hugoch/remora-python
1bb19200135bb84ee5e6e28fe25057ed096c8e31
[ "MIT" ]
null
null
null
remora/tests/test_tracker.py
Hugoch/remora-python
1bb19200135bb84ee5e6e28fe25057ed096c8e31
[ "MIT" ]
null
null
null
remora/tests/test_tracker.py
Hugoch/remora-python
1bb19200135bb84ee5e6e28fe25057ed096c8e31
[ "MIT" ]
null
null
null
import unittest from remora.tracker import Tracker from remora.collectors import AsyncCollector import requests_mock import json class TestTracker(unittest.TestCase): def test_send_payload(self): url = 'http://127.0.0.1:31311' with requests_mock.mock() as m: req = m.put(url) ...
39.020833
100
0.571276
import unittest from remora.tracker import Tracker from remora.collectors import AsyncCollector import requests_mock import json class TestTracker(unittest.TestCase): def test_send_payload(self): url = 'http://127.0.0.1:31311' with requests_mock.mock() as m: req = m.put(url) ...
true
true
f716d0756983d74be295f8050487b4e269c28f44
3,562
py
Python
src/client/user_bonus.py
ZackPashkin/toloka-kit
8f650e5d8cdded1949ca633cf78f9b851ce839bb
[ "Apache-2.0" ]
153
2021-02-06T13:41:11.000Z
2022-03-19T17:51:01.000Z
src/client/user_bonus.py
ZackPashkin/toloka-kit
8f650e5d8cdded1949ca633cf78f9b851ce839bb
[ "Apache-2.0" ]
29
2021-01-15T12:54:37.000Z
2022-02-07T07:45:32.000Z
src/client/user_bonus.py
ZackPashkin/toloka-kit
8f650e5d8cdded1949ca633cf78f9b851ce839bb
[ "Apache-2.0" ]
17
2021-01-29T15:20:04.000Z
2022-01-30T07:21:03.000Z
__all__ = [ 'UserBonus', 'UserBonusCreateRequestParameters' ] from attr.validators import optional, instance_of import datetime from decimal import Decimal from typing import Any from .primitives.base import BaseTolokaObject from .primitives.parameter import Parameters from ..util._codegen import attribute c...
36.721649
130
0.630264
__all__ = [ 'UserBonus', 'UserBonusCreateRequestParameters' ] from attr.validators import optional, instance_of import datetime from decimal import Decimal from typing import Any from .primitives.base import BaseTolokaObject from .primitives.parameter import Parameters from ..util._codegen import attribute c...
true
true
f716d0a144b04a18cf4e4f949f0d63ac16f60306
120,881
py
Python
src/sage/misc/sage_input.py
switzel/sage
7eb8510dacf61b691664cd8f1d2e75e5d473e5a0
[ "BSL-1.0" ]
null
null
null
src/sage/misc/sage_input.py
switzel/sage
7eb8510dacf61b691664cd8f1d2e75e5d473e5a0
[ "BSL-1.0" ]
null
null
null
src/sage/misc/sage_input.py
switzel/sage
7eb8510dacf61b691664cd8f1d2e75e5d473e5a0
[ "BSL-1.0" ]
1
2020-07-24T12:20:37.000Z
2020-07-24T12:20:37.000Z
r""" Sage Input Formatting This module provides the function :func:`sage_input` that takes an arbitrary sage value and produces a sequence of commands that, if typed at the ``sage:`` prompt, will recreate the value. If this is not implemented for a particular value, then an exception is raised instead. This might be u...
33.624757
151
0.56051
But since we store x, that can't happen; self._id_cache[id(x)] = (x, sie) sie._sie_preferred_varname = name def import_name(self, module, name, alt_name=None): return SIE_import_name(self, module, name, alt_name) def assign(self, e, val): e = self(e) val = s...
true
true
f716d301aba4afe90bc5d5c6ec197a440bdc19f2
3,047
py
Python
contrib/testgen/base58.py
Trackerming/bitcoin-sv
fb50a64e3ea0334a86b2c80daf5147c5bc2693c4
[ "MIT" ]
35
2019-02-23T06:21:13.000Z
2021-11-15T11:35:13.000Z
contrib/testgen/base58.py
Chihuataneo/bitcoin-sv
d9b12a23dbf0d2afc5f488fa077d762b302ba873
[ "MIT" ]
60
2019-02-25T18:17:03.000Z
2021-07-13T00:14:00.000Z
contrib/testgen/base58.py
Chihuataneo/bitcoin-sv
d9b12a23dbf0d2afc5f488fa077d762b302ba873
[ "MIT" ]
24
2019-02-20T05:37:02.000Z
2021-10-29T18:42:10.000Z
# Copyright (c) 2012-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Bitcoin base58 encoding and decoding. Based on https://bitcointalk.org/index.php?topic=1026.0 (public domain) ''' import has...
24.772358
97
0.624549
import hashlib class SHA256: new = hashlib.sha256 if str != bytes: def ord(c): return c def chr(n): return bytes((n,)) __b58chars = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' __b58base = len(__b58chars) b58chars = __b58chars def b58encode(v): long_valu...
true
true
f716d420b906d891f1c046d6c7abb726027eaa2b
4,749
py
Python
ml-services/od-yolov3-tf2/yolov3_tf2/utils.py
jveverka/data-lab
c2a43fd2c34520a9d490f29feff3035bdc70c0d6
[ "Apache-2.0" ]
null
null
null
ml-services/od-yolov3-tf2/yolov3_tf2/utils.py
jveverka/data-lab
c2a43fd2c34520a9d490f29feff3035bdc70c0d6
[ "Apache-2.0" ]
6
2019-12-07T09:53:26.000Z
2020-05-21T19:52:27.000Z
ml-services/od-yolov3-tf2/yolov3_tf2/utils.py
jveverka/data-lab
c2a43fd2c34520a9d490f29feff3035bdc70c0d6
[ "Apache-2.0" ]
null
null
null
from absl import logging import numpy as np import tensorflow as tf import cv2 YOLOV3_LAYER_LIST = [ 'yolo_darknet', 'yolo_conv_0', 'yolo_output_0', 'yolo_conv_1', 'yolo_output_1', 'yolo_conv_2', 'yolo_output_2', ] YOLOV3_TINY_LAYER_LIST = [ 'yolo_darknet', 'yolo_conv_0', 'yolo...
35.177778
83
0.561592
from absl import logging import numpy as np import tensorflow as tf import cv2 YOLOV3_LAYER_LIST = [ 'yolo_darknet', 'yolo_conv_0', 'yolo_output_0', 'yolo_conv_1', 'yolo_output_1', 'yolo_conv_2', 'yolo_output_2', ] YOLOV3_TINY_LAYER_LIST = [ 'yolo_darknet', 'yolo_conv_0', 'yolo...
true
true
f716d445c1bcac531c48494bd19770afcbb198fa
1,377
py
Python
dags/tuto.py
setuk/docker-airflow
8741ac32094893e1cd56b8bd411d240f60453eb7
[ "Apache-2.0" ]
null
null
null
dags/tuto.py
setuk/docker-airflow
8741ac32094893e1cd56b8bd411d240f60453eb7
[ "Apache-2.0" ]
null
null
null
dags/tuto.py
setuk/docker-airflow
8741ac32094893e1cd56b8bd411d240f60453eb7
[ "Apache-2.0" ]
null
null
null
""" Code that goes along with the Airflow located at: http://airflow.readthedocs.org/en/latest/tutorial.html """ from airflow import DAG from airflow.operators.bash_operator import BashOperator from datetime import datetime, timedelta default_args = { "owner": "airflow", "depends_on_past": False, "start_d...
27.54
82
0.67175
from airflow import DAG from airflow.operators.bash_operator import BashOperator from datetime import datetime, timedelta default_args = { "owner": "airflow", "depends_on_past": False, "start_date": datetime(2020, 11, 19), "email": ["airflow@airflow.com"], "email_on_failure": False, "email_on_...
true
true
f716d497d29ec78b5afc1dd07eb0f92340ba179b
8,724
py
Python
benchmark/cloud/aws/kylin.py
ChenYi015/Raven
e732e03f8dd118ed805a143fc6916f0e5fc53c2c
[ "Apache-2.0" ]
1
2022-03-03T05:54:25.000Z
2022-03-03T05:54:25.000Z
benchmark/cloud/aws/kylin.py
ChenYi015/Raven
e732e03f8dd118ed805a143fc6916f0e5fc53c2c
[ "Apache-2.0" ]
null
null
null
benchmark/cloud/aws/kylin.py
ChenYi015/Raven
e732e03f8dd118ed805a143fc6916f0e5fc53c2c
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Raven 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 law or ...
36.810127
118
0.634457
import json import logging import os import threading import time from typing import List from benchmark.cloud.aws.aws import Ec2Instance, AmazonWebService from benchmark.tools import get_random_id logger = logging.getLogger() class KylinMode: ALL = 'all' JOB = 'job' QUERY = 'query' class...
true
true
f716d4d8c9c6fc2d044b19e6dd1de0835c5c8e87
285
py
Python
Blog/sitemaps.py
myselfajp/MyFirstPage
c22b2fbe6ddca6f0af199f51ec7f12894458a91b
[ "MIT" ]
null
null
null
Blog/sitemaps.py
myselfajp/MyFirstPage
c22b2fbe6ddca6f0af199f51ec7f12894458a91b
[ "MIT" ]
null
null
null
Blog/sitemaps.py
myselfajp/MyFirstPage
c22b2fbe6ddca6f0af199f51ec7f12894458a91b
[ "MIT" ]
null
null
null
from django.contrib.sitemaps import Sitemap from Blog.models import Post class BlogSitemap(Sitemap): changefreq = "weekly" priority = 0.5 def items(self): return Post.objects.filter(status=True) def lastmod(self, obj): return obj.published_date
20.357143
47
0.687719
from django.contrib.sitemaps import Sitemap from Blog.models import Post class BlogSitemap(Sitemap): changefreq = "weekly" priority = 0.5 def items(self): return Post.objects.filter(status=True) def lastmod(self, obj): return obj.published_date
true
true
f716d5594aa167180b878069286e9c1308907fdf
9,503
py
Python
tests/infra/jsonrpc.py
rschust/CCF
2ad5f162cd73c645070f26461d8d053b45f63c3e
[ "Apache-2.0" ]
null
null
null
tests/infra/jsonrpc.py
rschust/CCF
2ad5f162cd73c645070f26461d8d053b45f63c3e
[ "Apache-2.0" ]
null
null
null
tests/infra/jsonrpc.py
rschust/CCF
2ad5f162cd73c645070f26461d8d053b45f63c3e
[ "Apache-2.0" ]
null
null
null
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the Apache 2.0 License. import socket import ssl import msgpack import struct import select import contextlib import json import logging import time import os from enum import IntEnum from cryptography import x509 from cryptography.hazmat.back...
27.78655
86
0.573398
import socket import ssl import msgpack import struct import select import contextlib import json import logging import time import os from enum import IntEnum from cryptography import x509 from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import asymmetric from loguru impo...
true
true
f716d560b71358551851abec5503a1ab0331080f
8,345
py
Python
tests/providers/test_automotive.py
MarcelRobeer/faker
016ef66c6852ed7d5f198b54dc620bd784ce58c2
[ "MIT" ]
null
null
null
tests/providers/test_automotive.py
MarcelRobeer/faker
016ef66c6852ed7d5f198b54dc620bd784ce58c2
[ "MIT" ]
null
null
null
tests/providers/test_automotive.py
MarcelRobeer/faker
016ef66c6852ed7d5f198b54dc620bd784ce58c2
[ "MIT" ]
null
null
null
import re from typing import Pattern from faker.providers.automotive.de_DE import Provider as DeDeAutomotiveProvider from faker.providers.automotive.es_ES import Provider as EsEsAutomotiveProvider from faker.providers.automotive.ro_RO import Provider as RoRoAutomotiveProvider from faker.providers.automotive.ru_RU imp...
37.59009
115
0.670461
import re from typing import Pattern from faker.providers.automotive.de_DE import Provider as DeDeAutomotiveProvider from faker.providers.automotive.es_ES import Provider as EsEsAutomotiveProvider from faker.providers.automotive.ro_RO import Provider as RoRoAutomotiveProvider from faker.providers.automotive.ru_RU imp...
true
true
f716d625081f9ebcae5efd23c12ecb9272c56c04
887
py
Python
qubo_nn/plots/gen_tsne_gen4.py
instance01/qubo-nn
6f8058565f4b6ab4a8300501fc2f67cdaeed482f
[ "MIT" ]
9
2021-09-17T09:40:59.000Z
2022-03-29T13:41:25.000Z
qubo_nn/plots/gen_tsne_gen4.py
instance01/qubo-nn
6f8058565f4b6ab4a8300501fc2f67cdaeed482f
[ "MIT" ]
null
null
null
qubo_nn/plots/gen_tsne_gen4.py
instance01/qubo-nn
6f8058565f4b6ab4a8300501fc2f67cdaeed482f
[ "MIT" ]
4
2022-03-06T19:26:19.000Z
2022-03-29T13:41:37.000Z
import pickle import numpy as np from MulticoreTSNE import MulticoreTSNE as TSNE from qubo_nn.data import LMDBDataLoader from qubo_nn.config import Config cfg_id = '27_gen4' cfg = Config('../').get_cfg(cfg_id) cfg["use_big"] = False lmdb_loader = LMDBDataLoader(cfg, reverse=False, base_path='../') X = [] y = [] for ...
23.972973
68
0.622322
import pickle import numpy as np from MulticoreTSNE import MulticoreTSNE as TSNE from qubo_nn.data import LMDBDataLoader from qubo_nn.config import Config cfg_id = '27_gen4' cfg = Config('../').get_cfg(cfg_id) cfg["use_big"] = False lmdb_loader = LMDBDataLoader(cfg, reverse=False, base_path='../') X = [] y = [] for ...
true
true
f716d781ce1344228dd00f5ca854221451fb21f6
1,862
py
Python
tests/extras/test_tooltips.py
Akuli/tkinder
c360fbfe086ca09cdd856a8636de05b24e1b7093
[ "MIT" ]
23
2019-01-15T00:07:30.000Z
2022-01-18T06:19:18.000Z
tests/extras/test_tooltips.py
Akuli/tkinder
c360fbfe086ca09cdd856a8636de05b24e1b7093
[ "MIT" ]
12
2019-01-13T19:51:52.000Z
2021-05-17T17:55:51.000Z
tests/extras/test_tooltips.py
Akuli/pythotk
c360fbfe086ca09cdd856a8636de05b24e1b7093
[ "MIT" ]
7
2019-01-13T19:48:26.000Z
2021-04-21T13:30:21.000Z
import time import types import pytest import teek from teek.extras import tooltips def run_event_loop(for_how_long): # this is dumb start = time.time() while time.time() < start + for_how_long: teek.update() @pytest.mark.slow def test_set_tooltip(): window = teek.Window() assert not ha...
31.559322
77
0.749194
import time import types import pytest import teek from teek.extras import tooltips def run_event_loop(for_how_long): start = time.time() while time.time() < start + for_how_long: teek.update() @pytest.mark.slow def test_set_tooltip(): window = teek.Window() assert not hasattr(window, ...
true
true
f716d8668d7f3e71327a13ddba27d41f18e2ef20
49
py
Python
ecommerce/shipping.py
broach44/beginning-python
54fb51ce666e263e7a76c37bb39cb6df636886ca
[ "MIT" ]
null
null
null
ecommerce/shipping.py
broach44/beginning-python
54fb51ce666e263e7a76c37bb39cb6df636886ca
[ "MIT" ]
null
null
null
ecommerce/shipping.py
broach44/beginning-python
54fb51ce666e263e7a76c37bb39cb6df636886ca
[ "MIT" ]
null
null
null
def calc_shipping(): print("calc shipping")
12.25
26
0.673469
def calc_shipping(): print("calc shipping")
true
true
f716d9590903bcc9299b90cc70855136916fd55d
1,613
py
Python
old_versions/TCA_2_2/TCA_V_2_2_1/code/TCASpacePartitioning.py
OSADP/TCA
25bc1c1db00393cc6b8c6764610bf381494dfcb9
[ "Apache-2.0" ]
1
2021-05-22T00:06:09.000Z
2021-05-22T00:06:09.000Z
old_versions/TCA_2_2/TCA_V_2_2_1/code/TCASpacePartitioning.py
OSADP/TCA
25bc1c1db00393cc6b8c6764610bf381494dfcb9
[ "Apache-2.0" ]
null
null
null
old_versions/TCA_2_2/TCA_V_2_2_1/code/TCASpacePartitioning.py
OSADP/TCA
25bc1c1db00393cc6b8c6764610bf381494dfcb9
[ "Apache-2.0" ]
null
null
null
#standard import unittest import math # from collections import OrderedDict from random import uniform #external import pandas as pd from scipy.spatial import KDTree def Find_RSE_range(df, RSEs, minrange): sub_df = df[['vehicle_ID', 'location_x', 'location_y']] tree = KDTree(sub_df[['location_x', 'locati...
26.442623
105
0.594544
import unittest import math from random import uniform import pandas as pd from scipy.spatial import KDTree def Find_RSE_range(df, RSEs, minrange): sub_df = df[['vehicle_ID', 'location_x', 'location_y']] tree = KDTree(sub_df[['location_x', 'location_y']].values) rse_points = list(RSEs.RSEListLocat...
true
true
f716da328dd870f9e5d396ba489f4d3b821fa89f
720
py
Python
bin/make_halo_cnf_data.py
muntazirabidi/boss-sbi
fae016eb10b64153391499276d238ccdf660df88
[ "MIT" ]
1
2022-03-15T18:13:02.000Z
2022-03-15T18:13:02.000Z
bin/make_halo_cnf_data.py
muntazirabidi/boss-sbi
fae016eb10b64153391499276d238ccdf660df88
[ "MIT" ]
11
2020-12-16T18:26:31.000Z
2021-04-02T14:58:37.000Z
bin/make_halo_cnf_data.py
muntazirabidi/boss-sbi
fae016eb10b64153391499276d238ccdf660df88
[ "MIT" ]
2
2021-03-29T17:33:54.000Z
2021-04-01T16:07:07.000Z
import os import numpy as np from simbig import halos as Halos np.random.seed(918234) theta_x_pairs = [] for i in range(1000): # read in halo catalog halos = Halos.Quijote_LHC_HR(i, z=0.5) # impose random halo mass limit as a proxy for baryonic effect Mlim = np.random.uniform(12.5, 13.0) the...
28.8
103
0.6875
import os import numpy as np from simbig import halos as Halos np.random.seed(918234) theta_x_pairs = [] for i in range(1000): halos = Halos.Quijote_LHC_HR(i, z=0.5) Mlim = np.random.uniform(12.5, 13.0) theta_cosmo = Halos.Quijote_LHC_cosmo(i) Nhalos = np.sum(np.array(halos['Mass'...
true
true
f716da8fd6c32ba467ca558698e188b418c2559d
10,502
py
Python
scripts/build-ios.py
ArtronicsGame/mobile-sdk
492afb38fbf372d2e76534b8f92e433b7cfb69b5
[ "BSD-3-Clause" ]
null
null
null
scripts/build-ios.py
ArtronicsGame/mobile-sdk
492afb38fbf372d2e76534b8f92e433b7cfb69b5
[ "BSD-3-Clause" ]
null
null
null
scripts/build-ios.py
ArtronicsGame/mobile-sdk
492afb38fbf372d2e76534b8f92e433b7cfb69b5
[ "BSD-3-Clause" ]
null
null
null
import os import sys import re import shutil import argparse import string from build.sdk_build_utils import * IOS_ARCHS = ['i386', 'x86_64', 'armv7', 'arm64'] def updateUmbrellaHeader(filename, args): with open(filename, 'r') as f: lines = f.readlines() for i in range(0, len(lines)): match = re.searc...
45.463203
245
0.668444
import os import sys import re import shutil import argparse import string from build.sdk_build_utils import * IOS_ARCHS = ['i386', 'x86_64', 'armv7', 'arm64'] def updateUmbrellaHeader(filename, args): with open(filename, 'r') as f: lines = f.readlines() for i in range(0, len(lines)): match = re.searc...
true
true
f716db30ad2b5a1b0baa72fd74c8fbb701037f01
1,189
py
Python
tools/accuracy_checker/openvino/tools/accuracy_checker/postprocessor/normalize_salient_map.py
TolyaTalamanov/open_model_zoo
1697e60712df4ca72635a2080a197b9d3bc24129
[ "Apache-2.0" ]
2,201
2018-10-15T14:37:19.000Z
2020-07-16T02:05:51.000Z
tools/accuracy_checker/openvino/tools/accuracy_checker/postprocessor/normalize_salient_map.py
Pandinosaurus/open_model_zoo
2543996541346418919c5cddfb71e33e2cdef080
[ "Apache-2.0" ]
759
2018-10-18T07:43:55.000Z
2020-07-16T01:23:12.000Z
tools/accuracy_checker/openvino/tools/accuracy_checker/postprocessor/normalize_salient_map.py
Pandinosaurus/open_model_zoo
2543996541346418919c5cddfb71e33e2cdef080
[ "Apache-2.0" ]
808
2018-10-16T14:03:49.000Z
2020-07-15T11:41:45.000Z
""" Copyright (c) 2018-2022 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in wri...
34.970588
72
0.702271
import cv2 import numpy as np from .postprocessor import Postprocessor class SalientMapNormalizer(Postprocessor): __provider__ = 'normalize_salience_map' def process_image(self, annotation, prediction): for ann in annotation: gt_mask = ann.mask if len(gt_mask.shape) == 3 and g...
true
true
f716dbad5d5deabbd30519182541764ab0c17a2f
10,478
py
Python
cynetworkx/algorithms/isomorphism/temporalisomorphvf2.py
Viech/cynetworkx
01a37859c67b752392e9e783c949084964eef2cf
[ "BSD-3-Clause" ]
12
2019-07-23T08:07:53.000Z
2022-03-09T06:13:16.000Z
cynetworkx/algorithms/isomorphism/temporalisomorphvf2.py
Viech/cynetworkx
01a37859c67b752392e9e783c949084964eef2cf
[ "BSD-3-Clause" ]
7
2019-08-30T07:00:00.000Z
2021-12-30T08:02:56.000Z
cynetworkx/algorithms/isomorphism/temporalisomorphvf2.py
Viech/cynetworkx
01a37859c67b752392e9e783c949084964eef2cf
[ "BSD-3-Clause" ]
5
2020-10-10T03:40:32.000Z
2021-11-23T12:28:53.000Z
# -*- coding: utf-8 -*- """ ***************************** Time-respecting VF2 Algorithm ***************************** An extension of the VF2 algorithm for time-respecting graph ismorphism testing in temporal graphs. A temporal graph is one in which edges contain a datetime attribute, denoting when interaction occurr...
38.664207
124
0.655564
from __future__ import absolute_import import cynetworkx as nx from datetime import datetime, timedelta from .isomorphvf2 import GraphMatcher, DiGraphMatcher __all__ = ['TimeRespectingGraphMatcher', 'TimeRespectingDiGraphMatcher'] class TimeRespectingGraphMatcher(GraphMatcher): def __init__(self, G...
true
true
f716dcbb37cfe64fdd5bab29b9a4cfa9b3b000b2
33,058
py
Python
pyccel/ast/operators.py
jalalium/pyccel
4f3d9a359e42c16440e9c841059257d292a8361b
[ "MIT" ]
null
null
null
pyccel/ast/operators.py
jalalium/pyccel
4f3d9a359e42c16440e9c841059257d292a8361b
[ "MIT" ]
null
null
null
pyccel/ast/operators.py
jalalium/pyccel
4f3d9a359e42c16440e9c841059257d292a8361b
[ "MIT" ]
null
null
null
#------------------------------------------------------------------------------------------# # This file is part of Pyccel which is released under MIT License. See the LICENSE file or # # go to https://github.com/pyccel/pyccel/blob/master/LICENSE for full license details. # #----------------------------------------...
30.134913
134
0.563918
rom ..errors.errors import Errors, PyccelSemanticError from .basic import PyccelAstNode from .datatypes import (NativeBool, NativeInteger, NativeReal, NativeComplex, NativeString, default_precision, NativeNumeri...
true
true
f716dcc5929dc395b511c231b73a25ba28485635
607
py
Python
apps/shortener_app/migrations/0009_auto_20190123_1903.py
escrichov/shortener
f8a72edb0b40c20021541f5178f257590b478e02
[ "MIT" ]
6
2018-12-16T12:35:18.000Z
2020-06-07T13:06:17.000Z
apps/shortener_app/migrations/0009_auto_20190123_1903.py
escrichov/shortener
f8a72edb0b40c20021541f5178f257590b478e02
[ "MIT" ]
16
2019-06-10T19:10:01.000Z
2022-02-12T04:22:55.000Z
apps/shortener_app/migrations/0009_auto_20190123_1903.py
escrichov/shortener
f8a72edb0b40c20021541f5178f257590b478e02
[ "MIT" ]
1
2019-01-18T00:06:13.000Z
2019-01-18T00:06:13.000Z
# Generated by Django 2.1.5 on 2019-01-23 19:03 import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('shortener_app', '0008_auto_20181205_2300'), ] operations = [ migrations.AddField( model_name='shorturl', ...
24.28
73
0.614498
import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('shortener_app', '0008_auto_20181205_2300'), ] operations = [ migrations.AddField( model_name='shorturl', name='url_active', field=model...
true
true
f716dcdbe7007bf7839728fd2b9195c4311f4c1c
2,821
py
Python
src/elaspic_rest_api/app.py
elaspic/elaspic-rest-api
b1ed2dae1870b5d0c678d196e39c8c806959e640
[ "MIT" ]
null
null
null
src/elaspic_rest_api/app.py
elaspic/elaspic-rest-api
b1ed2dae1870b5d0c678d196e39c8c806959e640
[ "MIT" ]
null
null
null
src/elaspic_rest_api/app.py
elaspic/elaspic-rest-api
b1ed2dae1870b5d0c678d196e39c8c806959e640
[ "MIT" ]
null
null
null
import asyncio import logging from typing import Any, Dict import sentry_sdk from fastapi import BackgroundTasks, FastAPI from sentry_sdk.integrations.asgi import SentryAsgiMiddleware import elaspic_rest_api from elaspic_rest_api import config from elaspic_rest_api import jobsubmitter as js from elaspic_rest_api.type...
27.930693
89
0.686636
import asyncio import logging from typing import Any, Dict import sentry_sdk from fastapi import BackgroundTasks, FastAPI from sentry_sdk.integrations.asgi import SentryAsgiMiddleware import elaspic_rest_api from elaspic_rest_api import config from elaspic_rest_api import jobsubmitter as js from elaspic_rest_api.type...
true
true
f716dd589103e434f5c06b8eb30e4fe38d5df1b6
1,790
py
Python
rpncalc/binaryoperator.py
newmanrs/rpncalc
8663e5221efd78c12889b6db4eda20821b27d52a
[ "MIT" ]
null
null
null
rpncalc/binaryoperator.py
newmanrs/rpncalc
8663e5221efd78c12889b6db4eda20821b27d52a
[ "MIT" ]
11
2021-11-10T04:28:51.000Z
2022-02-25T05:19:22.000Z
rpncalc/binaryoperator.py
newmanrs/rpncalc
8663e5221efd78c12889b6db4eda20821b27d52a
[ "MIT" ]
null
null
null
import numpy import math from rpncalc.classes import ActionEnum class BinaryOperator(ActionEnum): addition = '+' subtraction = '-' multiplication = '*' division = '/' integer_division = '//' power = '^' atan2 = 'atan2', \ "Returns quadrant correct polar coordinate theta = atan2(y,...
25.211268
70
0.430726
import numpy import math from rpncalc.classes import ActionEnum class BinaryOperator(ActionEnum): addition = '+' subtraction = '-' multiplication = '*' division = '/' integer_division = '//' power = '^' atan2 = 'atan2', \ "Returns quadrant correct polar coordinate theta = atan2(y,...
true
true
f716de749187532c276040a0b1e00777b44337ce
592
py
Python
api_logic_server_cli/project_prototype/util.py
valhuber/ApiLogicServer
a4acd8d886a18d4d500e0fffffcaa2f1c0765040
[ "BSD-3-Clause" ]
71
2021-01-23T17:34:33.000Z
2022-03-29T13:11:29.000Z
api_logic_server_cli/project_prototype/util.py
valhuber/ApiLogicServer
a4acd8d886a18d4d500e0fffffcaa2f1c0765040
[ "BSD-3-Clause" ]
38
2021-01-24T21:56:30.000Z
2022-03-08T18:49:00.000Z
api_logic_server_cli/project_prototype/util.py
valhuber/ApiLogicServer
a4acd8d886a18d4d500e0fffffcaa2f1c0765040
[ "BSD-3-Clause" ]
14
2021-01-23T16:20:44.000Z
2022-03-24T10:48:28.000Z
import sqlite3 from os import path import sys import logging app_logger = logging.getLogger("api_logic_server_app") def log(msg: any) -> None: app_logger.info(msg) # print("TIL==> " + msg) def connection() -> sqlite3.Connection: ROOT: str = path.dirname(path.realpath(__file__)) log(ROOT) _connec...
22.769231
67
0.675676
import sqlite3 from os import path import sys import logging app_logger = logging.getLogger("api_logic_server_app") def log(msg: any) -> None: app_logger.info(msg) def connection() -> sqlite3.Connection: ROOT: str = path.dirname(path.realpath(__file__)) log(ROOT) _connection = sqlite3.connect(p...
true
true
f716ded79220bf0850640a2412069bb981807960
3,633
py
Python
meegkit/utils/trca.py
ludovicdmt/python-meegkit
4aa4ba49354b996be20eda41660a550d1bd31f9a
[ "BSD-3-Clause" ]
null
null
null
meegkit/utils/trca.py
ludovicdmt/python-meegkit
4aa4ba49354b996be20eda41660a550d1bd31f9a
[ "BSD-3-Clause" ]
null
null
null
meegkit/utils/trca.py
ludovicdmt/python-meegkit
4aa4ba49354b996be20eda41660a550d1bd31f9a
[ "BSD-3-Clause" ]
null
null
null
"""TRCA utils.""" import numpy as np from scipy.signal import filtfilt, cheb1ord, cheby1 from scipy import stats def round_half_up(num, decimals=0): """Round half up round the last decimal of the number. The rules are: from 0 to 4 rounds down from 5 to 9 rounds up Parameters ---------- ...
26.136691
78
0.570603
import numpy as np from scipy.signal import filtfilt, cheb1ord, cheby1 from scipy import stats def round_half_up(num, decimals=0): multiplier = 10 ** decimals return int(np.floor(num * multiplier + 0.5) / multiplier) def normfit(data, ci=0.95): arr = 1.0 * np.array(data) num = len(arr) avg, std...
true
true
f716df4ee14d7c3327f654e758f30bd597015ed0
4,458
py
Python
book_code_selected_keras_examples/cifar/cifar10_cnn.py
IntuitionMachine/DeepLearningGuide
7270b13ee5783a23482738cdf9d355c10d25360d
[ "MIT" ]
1
2019-05-02T02:53:34.000Z
2019-05-02T02:53:34.000Z
book_code_selected_keras_examples/cifar/cifar10_cnn.py
IntuitionMachine/DeepLearningGuide
7270b13ee5783a23482738cdf9d355c10d25360d
[ "MIT" ]
null
null
null
book_code_selected_keras_examples/cifar/cifar10_cnn.py
IntuitionMachine/DeepLearningGuide
7270b13ee5783a23482738cdf9d355c10d25360d
[ "MIT" ]
null
null
null
'''Train a simple deep CNN on the CIFAR10 small images dataset. It gets to 75% validation accuracy in 25 epochs, and 79% after 50 epochs. (it's still underfitting at that point, though). ''' from __future__ import print_function from time import time import keras from keras.datasets import cifar10 from keras.preproce...
33.772727
97
0.711306
from __future__ import print_function from time import time import keras from keras.datasets import cifar10 from keras.preprocessing.image import ImageDataGenerator from keras.models import Sequential, load_model from keras.layers import Dense, Dropout, Activation, Flatten from keras.layers import Conv2D, MaxPooling2D...
true
true
f716dfa33ddc3edf22a30911544807cfce14bd8a
247,289
py
Python
tensorflow/python/framework/ops.py
jraman/tensorflow
41c6bf7c6215bea9bfb9bf0a9b63f2084e6f3058
[ "Apache-2.0" ]
1
2020-10-01T16:52:51.000Z
2020-10-01T16:52:51.000Z
tensorflow/python/framework/ops.py
rakeshacharya-d/tensorflow
9028828d3b8a2a622f7203a317002cc749531695
[ "Apache-2.0" ]
1
2022-02-10T01:08:48.000Z
2022-02-10T01:08:48.000Z
tensorflow/python/framework/ops.py
rakeshacharya-d/tensorflow
9028828d3b8a2a622f7203a317002cc749531695
[ "Apache-2.0" ]
null
null
null
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
36.68432
115
0.692594
from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import re import sys import threading import types import numpy as np import six from six.moves import map from six.moves import xrange from tensorflow.core.framework imp...
true
true
f716e0b7ca7df97d982aaf86ed718db537ad482b
49,994
py
Python
research/compression/distillation/resnet.py
ragavvenkatesan/models
420a88c7af20dae8d79dbc1b4351fef41be361c8
[ "Apache-2.0" ]
null
null
null
research/compression/distillation/resnet.py
ragavvenkatesan/models
420a88c7af20dae8d79dbc1b4351fef41be361c8
[ "Apache-2.0" ]
null
null
null
research/compression/distillation/resnet.py
ragavvenkatesan/models
420a88c7af20dae8d79dbc1b4351fef41be361c8
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
44.399645
139
0.67008
from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import os import tensorflow as tf _BATCH_NORM_DECAY = 0.997 _BATCH_NORM_EPSILON = 1e-5 er_mentee = tf.train.MomentumOptimizer( learning_rate=learning_rate_mentee, ...
true
true
f716e0e1798b4361d576daa1b6e3bf179cfdaf7c
5,362
py
Python
tests/scripts/thread-cert/Cert_9_2_12_Announce.py
TanJay/openthread
ffd28ebd4d874fbc71f556ced86efc306e6a2d4b
[ "BSD-3-Clause" ]
1
2018-12-31T08:12:49.000Z
2018-12-31T08:12:49.000Z
tests/scripts/thread-cert/Cert_9_2_12_Announce.py
syin2/openthread
a9f42768ec221380f42bfd311bc68e784b2163a6
[ "BSD-3-Clause" ]
null
null
null
tests/scripts/thread-cert/Cert_9_2_12_Announce.py
syin2/openthread
a9f42768ec221380f42bfd311bc68e784b2163a6
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # # Copyright (c) 2016, The OpenThread Authors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright # ...
40.621212
114
0.70179
import time import unittest import node LEADER1 = 1 ROUTER1 = 2 LEADER2 = 3 ROUTER2 = 4 MED = 5 DATASET1_TIMESTAMP = 20 DATASET1_CHANNEL = 11 DATASET1_PANID = 0xface DATASET2_TIMESTAMP = 10 DATASET2_CHANNEL = 12 DATASET2_PANID = 0xafce class Cert_9_2_12_Announce(unittest.TestCase): ...
true
true
f716e10b6e71953481b66f47f8b43c293e3fae0b
321
py
Python
wrench/labelmodel/__init__.py
rpryzant/wrench
3668c359aeff18724e927a207a85da17f2ead823
[ "Apache-2.0" ]
1
2021-11-24T04:01:08.000Z
2021-11-24T04:01:08.000Z
wrench/labelmodel/__init__.py
yinkaiw/wrench
f20135eb9b1d51b5bad92b3a910efd92235df356
[ "Apache-2.0" ]
null
null
null
wrench/labelmodel/__init__.py
yinkaiw/wrench
f20135eb9b1d51b5bad92b3a910efd92235df356
[ "Apache-2.0" ]
null
null
null
from .dawid_skene import DawidSkene from .flyingsquid import FlyingSquid from .generative_model import GenerativeModel from .gold import GoldCondProb from .majority_voting import MajorityVoting, MajorityWeightedVoting from .metal import MeTaL from .naive_bayes import NaiveBayesModel from .snorkel import Snorkel ...
35.666667
68
0.844237
from .dawid_skene import DawidSkene from .flyingsquid import FlyingSquid from .generative_model import GenerativeModel from .gold import GoldCondProb from .majority_voting import MajorityVoting, MajorityWeightedVoting from .metal import MeTaL from .naive_bayes import NaiveBayesModel from .snorkel import Snorkel ...
true
true
f716e2ca2dbea9c8c4a6ac6e99b6f76798d9cf6c
3,733
py
Python
python/bot_discord.py
angelopassaro/Hacktoberfest-1
21f90f5d49efba9b1a27f4d9b923f5017ab43f0e
[ "Apache-2.0" ]
1
2020-10-06T01:20:07.000Z
2020-10-06T01:20:07.000Z
python/bot_discord.py
angelopassaro/Hacktoberfest-1
21f90f5d49efba9b1a27f4d9b923f5017ab43f0e
[ "Apache-2.0" ]
null
null
null
python/bot_discord.py
angelopassaro/Hacktoberfest-1
21f90f5d49efba9b1a27f4d9b923f5017ab43f0e
[ "Apache-2.0" ]
null
null
null
"create by poomipat01" import asyncio import discord import youtube_dl import os from discord.ext import commands def read_token(): with open("token.ini",'r') as f: lines = f.readline() return lines.strip() # Suppress noise about console usage from errors youtube_dl.utils.bug_reports_message = l...
30.104839
107
0.639432
import asyncio import discord import youtube_dl import os from discord.ext import commands def read_token(): with open("token.ini",'r') as f: lines = f.readline() return lines.strip() youtube_dl.utils.bug_reports_message = lambda: '' TOKEN = os.environ['TOKEN'] ytdl_format_options = { 'for...
true
true
f716e5b3df3c3c98ce55161f28ad6090b87813a0
602
py
Python
quickstart/python/sms/example-2/send_notifications.6.x.py
Tshisuaka/api-snippets
52b50037d4af0f3b96adf76197964725a1501e96
[ "MIT" ]
234
2016-01-27T03:04:38.000Z
2022-02-25T20:13:43.000Z
quickstart/python/sms/example-2/send_notifications.6.x.py
Tshisuaka/api-snippets
52b50037d4af0f3b96adf76197964725a1501e96
[ "MIT" ]
351
2016-04-06T16:55:33.000Z
2022-03-10T18:42:36.000Z
quickstart/python/sms/example-2/send_notifications.6.x.py
Tshisuaka/api-snippets
52b50037d4af0f3b96adf76197964725a1501e96
[ "MIT" ]
494
2016-03-30T15:28:20.000Z
2022-03-28T19:39:36.000Z
# /usr/bin/env python # Download the twilio-python library from twilio.com/docs/libraries/python import os from twilio.rest import Client # Find these values at https://twilio.com/user/account # To set up environmental variables, see http://twil.io/secure account_sid = os.environ['TWILIO_ACCOUNT_SID'] auth_token = "YY...
33.444444
74
0.727575
import os from twilio.rest import Client account_sid = os.environ['TWILIO_ACCOUNT_SID'] auth_token = "YYYYYYYYYYYYYYYYYY" client = Client(account_sid, auth_token) message = client.api.account.messages.create( to="+12316851234", from_="+15555555555", body="Hello there!", media_url=['https://demo.tw...
true
true
f716e7003ce379bfc28bec594685939ffeb73fea
1,069
py
Python
award/migrations/0003_rating.py
EmmanuelMuchiri/Awards
d786689a6f5f32532d005ef6a50eed4600ba5ecc
[ "MIT" ]
null
null
null
award/migrations/0003_rating.py
EmmanuelMuchiri/Awards
d786689a6f5f32532d005ef6a50eed4600ba5ecc
[ "MIT" ]
5
2020-06-05T22:45:28.000Z
2021-09-08T01:16:58.000Z
award/migrations/0003_rating.py
EmmanuelMuchiri/Awards
d786689a6f5f32532d005ef6a50eed4600ba5ecc
[ "MIT" ]
3
2019-09-09T08:16:01.000Z
2019-11-25T11:37:58.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.24 on 2019-09-07 12:47 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('award', '0002_project'), ] operations = [ ...
36.862069
114
0.615529
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('award', '0002_project'), ] operations = [ migrations.CreateModel( name='Rating', fields=[...
true
true
f716e8fadfc4a02237cc5c211b47dc9372ec31ac
4,293
py
Python
salamanca/cli.py
coroa/salamanca
29da72cc40dd511c81bfdcb71ac956a24de1148b
[ "Apache-2.0" ]
null
null
null
salamanca/cli.py
coroa/salamanca
29da72cc40dd511c81bfdcb71ac956a24de1148b
[ "Apache-2.0" ]
null
null
null
salamanca/cli.py
coroa/salamanca
29da72cc40dd511c81bfdcb71ac956a24de1148b
[ "Apache-2.0" ]
null
null
null
import argparse import logging from salamanca import data from salamanca import currency COMMANDS = {} # # Download wb data # def download_wb_cli(parser): log = 'Print log output during download.' parser.add_argument('--log', help=log, action="store_true") overwrite = 'Overwrite local files if they exi...
25.553571
81
0.623107
import argparse import logging from salamanca import data from salamanca import currency COMMANDS = {} def download_wb_cli(parser): log = 'Print log output during download.' parser.add_argument('--log', help=log, action="store_true") overwrite = 'Overwrite local files if they exist.' parser.add_...
true
true
f716ea6ba7a5521a99b2eb2280b6736549b4ed5d
1,648
py
Python
src/tests/unit/common/test_css.py
td00/pretalx
aff450de9420fca167e04345fa24ee7140fae819
[ "Apache-2.0" ]
null
null
null
src/tests/unit/common/test_css.py
td00/pretalx
aff450de9420fca167e04345fa24ee7140fae819
[ "Apache-2.0" ]
null
null
null
src/tests/unit/common/test_css.py
td00/pretalx
aff450de9420fca167e04345fa24ee7140fae819
[ "Apache-2.0" ]
null
null
null
import pytest from django.core.exceptions import ValidationError from pretalx.common.css import validate_css from pretalx.event.models import Event @pytest.fixture def valid_css(): return ''' body { background-color: #000; display: none; } .some-descriptor { border-style: dotted dashed solid double; BORD...
22.888889
66
0.711772
import pytest from django.core.exceptions import ValidationError from pretalx.common.css import validate_css from pretalx.event.models import Event @pytest.fixture def valid_css(): return ''' body { background-color: #000; display: none; } .some-descriptor { border-style: dotted dashed solid double; BORD...
true
true
f716ec2ee533f960f1e83f092c89ca170e08c6c2
679
py
Python
bin/django-admin.py
hkolstee/bachelor-project
5d26632c2d920327248efdabf2acc53781264dc2
[ "MIT" ]
null
null
null
bin/django-admin.py
hkolstee/bachelor-project
5d26632c2d920327248efdabf2acc53781264dc2
[ "MIT" ]
null
null
null
bin/django-admin.py
hkolstee/bachelor-project
5d26632c2d920327248efdabf2acc53781264dc2
[ "MIT" ]
null
null
null
#!/home/hkolstee/bproject/virtenv/bin/python # When the django-admin.py deprecation ends, remove this script. import warnings from django.core import management try: from django.utils.deprecation import RemovedInDjango40Warning except ImportError: raise ImportError( 'django-admin.py was deprecated in ...
30.863636
80
0.726068
import warnings from django.core import management try: from django.utils.deprecation import RemovedInDjango40Warning except ImportError: raise ImportError( 'django-admin.py was deprecated in Django 3.1 and removed in Django ' '4.0. Please manually remove this script from your virtual enviro...
true
true
f716ece959d936bd66bf82233eb4b71aa5c73834
2,091
py
Python
quant/utils/dingding.py
tianhm/TheNextQuant
a0d062fe8160088118b128d757d01b396c129680
[ "MIT" ]
1
2020-03-24T02:19:20.000Z
2020-03-24T02:19:20.000Z
quant/utils/dingding.py
tianhm/TheNextQuant
a0d062fe8160088118b128d757d01b396c129680
[ "MIT" ]
null
null
null
quant/utils/dingding.py
tianhm/TheNextQuant
a0d062fe8160088118b128d757d01b396c129680
[ "MIT" ]
5
2019-08-12T09:40:27.000Z
2022-01-26T07:36:24.000Z
# -*- coding:utf-8 -*- """ 钉钉机器人接口 Author: HuangTao Date: 2018/08/04 Update: 2018/12/24 1. 增加markdown格式消息推送; """ from quant.utils import logger from quant.utils.http_client import AsyncHttpRequests class DingTalk: """ 钉钉机器人接口 """ BASE_URL = 'https://oapi.dingtalk.com/robot/send?access_token=' @...
30.304348
94
0.568149
from quant.utils import logger from quant.utils.http_client import AsyncHttpRequests class DingTalk: BASE_URL = 'https://oapi.dingtalk.com/robot/send?access_token=' @classmethod async def send_text_msg(cls, access_token, content, phones=None, is_at_all=False): body = { 'msgtype': '...
true
true
f716ed7302b9f41211156c88b591db55e8d6fd9c
5,726
py
Python
threedi_api_client/openapi/models/inline_response20068.py
nens/threedi-api-client
43b0eb1bd47310b1783f87f6ad8bfbfe0fb4d90a
[ "BSD-3-Clause" ]
null
null
null
threedi_api_client/openapi/models/inline_response20068.py
nens/threedi-api-client
43b0eb1bd47310b1783f87f6ad8bfbfe0fb4d90a
[ "BSD-3-Clause" ]
16
2021-05-31T09:52:04.000Z
2022-03-14T16:07:19.000Z
threedi_api_client/openapi/models/inline_response20068.py
nens/threedi-api-client
43b0eb1bd47310b1783f87f6ad8bfbfe0fb4d90a
[ "BSD-3-Clause" ]
null
null
null
# coding: utf-8 """ 3Di API 3Di simulation API (latest stable version: v3) Framework release: 2.9.0 3Di core release: 2.2.2 deployed on: 11:01AM (UTC) on January 11, 2022 # noqa: E501 The version of the OpenAPI document: v3 Contact: info@nelen-schuurmans.nl Generated by: https://openapi-ge...
28.346535
166
0.59029
import logging import pprint import re import six from threedi_api_client.openapi.configuration import Configuration logger = logging.getLogger(__name__) class InlineResponse20068(object): openapi_types = { 'count': 'int', 'next': 'str', 'previous': 'str', 'results': 'list...
true
true
f716eee3eb58697b715967ba75f76f3d236c3384
3,353
py
Python
minigrid_basics/examples/rw_four_directions.py
dumpmemory/google-research
bc87d010ab9086b6e92c3f075410fa6e1f27251b
[ "Apache-2.0" ]
null
null
null
minigrid_basics/examples/rw_four_directions.py
dumpmemory/google-research
bc87d010ab9086b6e92c3f075410fa6e1f27251b
[ "Apache-2.0" ]
null
null
null
minigrid_basics/examples/rw_four_directions.py
dumpmemory/google-research
bc87d010ab9086b6e92c3f075410fa6e1f27251b
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2022 The Google Research 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
31.632075
92
0.737548
import os from absl import app from absl import flags import gin import gym import gym_minigrid from gym_minigrid.wrappers import RGBImgObsWrapper import matplotlib.pylab as plt import tensorflow as tf from minigrid_basics.custom_wrappers import tabular_wrapper from minigrid_basics.envs import mon...
true
true
f716ef059d911c1ddacddb527c6766ef71f00589
3,623
py
Python
scripts/run_mots_depth_inference.py
VladimirYugay/diw
d1a760f1911e9d09fbe038abffc3aa76d384f86a
[ "MIT" ]
1
2021-09-14T21:24:56.000Z
2021-09-14T21:24:56.000Z
scripts/run_mots_depth_inference.py
VladimirYugay/diw
d1a760f1911e9d09fbe038abffc3aa76d384f86a
[ "MIT" ]
null
null
null
scripts/run_mots_depth_inference.py
VladimirYugay/diw
d1a760f1911e9d09fbe038abffc3aa76d384f86a
[ "MIT" ]
null
null
null
""" Script for running depth inference assuming MOTS dataset structure """ import logging import os import sys from pathlib import Path, PurePath import click import matplotlib.pyplot as plt import numpy as np import tensorflow.compat.v1 as tf from IPython.core import ultratb from PIL import Image import diw from diw...
32.348214
86
0.606956
import logging import os import sys from pathlib import Path, PurePath import click import matplotlib.pyplot as plt import numpy as np import tensorflow.compat.v1 as tf from IPython.core import ultratb from PIL import Image import diw from diw.model import Model, get_vars_to_save_and_restore sys.excepthook = ultratb...
true
true
f716f00b794214b6366e86f868a33212f28fca85
2,250
py
Python
custom_components/nintendo_wishlist/__init__.py
custom-components/sensor.nintendo_wishlis
6709a5c1b6e323494e7449fa1ac24e61100fc302
[ "Apache-2.0" ]
13
2020-05-07T21:31:51.000Z
2022-02-09T01:53:53.000Z
custom_components/nintendo_wishlist/__init__.py
custom-components/sensor.nintendo_wishlis
6709a5c1b6e323494e7449fa1ac24e61100fc302
[ "Apache-2.0" ]
19
2019-07-24T08:10:06.000Z
2022-02-05T04:09:34.000Z
custom_components/nintendo_wishlist/__init__.py
custom-components/sensor.nintendo_wishlis
6709a5c1b6e323494e7449fa1ac24e61100fc302
[ "Apache-2.0" ]
5
2019-12-13T17:48:52.000Z
2020-07-06T07:45:31.000Z
"""Nintendo Wishlist integration.""" import logging import voluptuous as vol from homeassistant import core from homeassistant.const import CONF_SCAN_INTERVAL from homeassistant.helpers.aiohttp_client import async_get_clientsession import homeassistant.helpers.config_validation as cv from homeassistant.helpers.discov...
33.58209
88
0.699556
import logging import voluptuous as vol from homeassistant import core from homeassistant.const import CONF_SCAN_INTERVAL from homeassistant.helpers.aiohttp_client import async_get_clientsession import homeassistant.helpers.config_validation as cv from homeassistant.helpers.discovery import async_load_platform from h...
true
true
f716f19491be0a8291d501ec3e6e2ae018304842
5,052
py
Python
code/lib/warn/search/malicious_behaviours/telephony_identifiers.py
JaspervanRooijen/covid-apps-observer
59f6049a493c80797d83fd24e4a4789a14f3110e
[ "MIT" ]
null
null
null
code/lib/warn/search/malicious_behaviours/telephony_identifiers.py
JaspervanRooijen/covid-apps-observer
59f6049a493c80797d83fd24e4a4789a14f3110e
[ "MIT" ]
null
null
null
code/lib/warn/search/malicious_behaviours/telephony_identifiers.py
JaspervanRooijen/covid-apps-observer
59f6049a493c80797d83fd24e4a4789a14f3110e
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # This file is part of Androwarn. # # Copyright (C) 2012, 2019, Thomas Debize <tdebize at mail.com> # All rights reserved. # # Androwarn is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by #...
54.322581
195
0.66825
import logging from lib.warn.util.util import * log = logging.getLogger('log') def detect_telephony_gsm_GsmCellLocation(x): method_listing = [ ("getLac()", "This application reads the Location Area Code value"), ("getCid()", "This application reads the C...
true
true
f716f2899ec4b9277a6cd89d3948a14978b46dc3
4,763
py
Python
izi_shipping/packers.py
izi-ecommerce/izi-shipping
863dc84ad73a2e1413b3ef8043af3ac87fa5cdb9
[ "BSD-3-Clause" ]
null
null
null
izi_shipping/packers.py
izi-ecommerce/izi-shipping
863dc84ad73a2e1413b3ef8043af3ac87fa5cdb9
[ "BSD-3-Clause" ]
null
null
null
izi_shipping/packers.py
izi-ecommerce/izi-shipping
863dc84ad73a2e1413b3ef8043af3ac87fa5cdb9
[ "BSD-3-Clause" ]
null
null
null
from decimal import Decimal as D from django.conf import settings from django.core.exceptions import ObjectDoesNotExist from django.utils.translation import ugettext_lazy as _ from izi.core import loading Scale = loading.get_class('shipping.scales', 'Scale') weight_precision = getattr( settings, 'IZI_SHIPPING_W...
35.81203
107
0.617888
from decimal import Decimal as D from django.conf import settings from django.core.exceptions import ObjectDoesNotExist from django.utils.translation import ugettext_lazy as _ from izi.core import loading Scale = loading.get_class('shipping.scales', 'Scale') weight_precision = getattr( settings, 'IZI_SHIPPING_W...
true
true
f716f32b4db4b79169801db929ce86099f51f34b
564
py
Python
hw4/part3/table_printer.py
jonescarissa/csc221
1052b4cf9f3aab86c063c1b3845895a590bc2083
[ "CC0-1.0" ]
null
null
null
hw4/part3/table_printer.py
jonescarissa/csc221
1052b4cf9f3aab86c063c1b3845895a590bc2083
[ "CC0-1.0" ]
null
null
null
hw4/part3/table_printer.py
jonescarissa/csc221
1052b4cf9f3aab86c063c1b3845895a590bc2083
[ "CC0-1.0" ]
1
2021-09-02T03:55:17.000Z
2021-09-02T03:55:17.000Z
''' Table Printer practice project Author: Carissa Jones ''' tableData = [['I', 'out', 'chair.'], ['just', 'of', 'Im'], ['fell', 'my', 'fine.']] def printTable(tableData): '''Given list of strings, tableData, displays in a well-organized table with each column right-justified'...
23.5
69
0.56383
tableData = [['I', 'out', 'chair.'], ['just', 'of', 'Im'], ['fell', 'my', 'fine.']] def printTable(tableData): colWidths = [0] * len(tableData) for x in range(len(tableData[0])): for y in range(len(colWidths)): print(tableData[y][x].rjust(colWidths[y]), end= '...
true
true
f716f342dfdde7c09452213431f486564cd316b0
20,293
py
Python
blender/arm/lightmapper/utility/encoding.py
onelsonic/armory
55cfead0844923d419d75bf4bd677ebed714b4b5
[ "Zlib" ]
2,583
2016-07-27T08:25:47.000Z
2022-03-31T10:42:17.000Z
blender/arm/lightmapper/utility/encoding.py
onelsonic/armory
55cfead0844923d419d75bf4bd677ebed714b4b5
[ "Zlib" ]
2,122
2016-07-31T14:20:04.000Z
2022-03-31T20:44:14.000Z
blender/arm/lightmapper/utility/encoding.py
onelsonic/armory
55cfead0844923d419d75bf4bd677ebed714b4b5
[ "Zlib" ]
451
2016-08-12T05:52:58.000Z
2022-03-31T01:33:07.000Z
import bpy, math, os, gpu, bgl import numpy as np from . import utility from fractions import Fraction from gpu_extras.batch import batch_for_shader def encodeLogLuvGPU(image, outDir, quality): input_image = bpy.data.images[image.name] image_name = input_image.name offscreen = gpu.types.GPUOffScreen(input...
31.51087
123
0.588824
import bpy, math, os, gpu, bgl import numpy as np from . import utility from fractions import Fraction from gpu_extras.batch import batch_for_shader def encodeLogLuvGPU(image, outDir, quality): input_image = bpy.data.images[image.name] image_name = input_image.name offscreen = gpu.types.GPUOffScreen(input...
true
true
f716f3a29096b6b3d1684fa66a9f8119736e670b
468
py
Python
contentcuration/contentcuration/migrations/0015_auto_20160914_1640.py
Tlazypanda/studio
cd1c2f169c705027cdd808cbbcae907d0a9b21d2
[ "MIT" ]
1
2019-03-30T18:14:25.000Z
2019-03-30T18:14:25.000Z
contentcuration/contentcuration/migrations/0015_auto_20160914_1640.py
Tlazypanda/studio
cd1c2f169c705027cdd808cbbcae907d0a9b21d2
[ "MIT" ]
4
2016-05-06T17:19:30.000Z
2019-03-15T01:51:24.000Z
contentcuration/contentcuration/migrations/0015_auto_20160914_1640.py
Tlazypanda/studio
cd1c2f169c705027cdd808cbbcae907d0a9b21d2
[ "MIT" ]
4
2016-10-18T22:49:08.000Z
2019-09-17T11:20:51.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-09-14 23:40 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('contentcuration', '0014_channel_language'), ] operations = [ migrations.Alte...
22.285714
58
0.623932
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('contentcuration', '0014_channel_language'), ] operations = [ migrations.AlterField( model_name='channel', name='thumbnail'...
true
true
f716f3b18a7254d8f31a8cfae36f39274adaf28e
815
py
Python
src/code/sort_clique_data_by_size.py
Buddyboy201/clique_analysis
9e7fd9acb2aba8cf3ced0b0ddb3d11ebc74734fb
[ "MIT" ]
null
null
null
src/code/sort_clique_data_by_size.py
Buddyboy201/clique_analysis
9e7fd9acb2aba8cf3ced0b0ddb3d11ebc74734fb
[ "MIT" ]
null
null
null
src/code/sort_clique_data_by_size.py
Buddyboy201/clique_analysis
9e7fd9acb2aba8cf3ced0b0ddb3d11ebc74734fb
[ "MIT" ]
null
null
null
import json #top 50 all cliques in category #top 50 size n till n=2 in category def update_ref(data, ref): for clique_str, count in data: clique = eval(clique_str) if ref.get(len(clique)) is None: ref[len(clique)] = [] ref[len(clique)].append((clique, count)) return ref wi...
32.6
73
0.628221
import json def update_ref(data, ref): for clique_str, count in data: clique = eval(clique_str) if ref.get(len(clique)) is None: ref[len(clique)] = [] ref[len(clique)].append((clique, count)) return ref with open("clique_data.json", "r") as data_file: data = json.loa...
true
true
f716f3fadbdd20212933b188540902a9450b91e8
6,260
py
Python
pimsviewer/dimension.py
soft-matter/pimsviewer
9263ece121a58a0504c6e4d319ec6e18d1bb460a
[ "BSD-3-Clause" ]
9
2018-06-26T06:49:34.000Z
2022-03-01T19:54:56.000Z
pimsviewer/dimension.py
soft-matter/pimsviewer
9263ece121a58a0504c6e4d319ec6e18d1bb460a
[ "BSD-3-Clause" ]
14
2017-03-02T17:34:08.000Z
2020-06-23T15:09:23.000Z
pimsviewer/dimension.py
soft-matter/pimsviewer
9263ece121a58a0504c6e4d319ec6e18d1bb460a
[ "BSD-3-Clause" ]
6
2017-03-02T18:36:20.000Z
2020-11-22T23:27:14.000Z
import os import numpy as np from PyQt5 import uic from PyQt5.QtCore import QDir, Qt, QTimer, pyqtSignal from PyQt5.QtGui import QImage, QPainter, QPalette, QPixmap from PyQt5.QtWidgets import (QHBoxLayout, QSlider, QWidget, QAction, QApplication, QFileDialog, QLabel, QMainWindow, QMenu, QMessageBox, QScrollArea, QSize...
27.099567
257
0.616613
import os import numpy as np from PyQt5 import uic from PyQt5.QtCore import QDir, Qt, QTimer, pyqtSignal from PyQt5.QtGui import QImage, QPainter, QPalette, QPixmap from PyQt5.QtWidgets import (QHBoxLayout, QSlider, QWidget, QAction, QApplication, QFileDialog, QLabel, QMainWindow, QMenu, QMessageBox, QScrollArea, QSize...
true
true
f716f40ff8616b758469bb436739279671f60ee1
327
py
Python
deform_conv/utils.py
lone17/deform-conv
3502cedbeae61c961d7e988382c55b9d45fd1873
[ "MIT" ]
221
2017-03-30T12:31:02.000Z
2022-03-24T08:39:26.000Z
deform_conv/utils.py
ml-lab/deform-conv
126ebcc283a4325c474332fa170f57d52a59e34d
[ "MIT" ]
1
2019-03-09T11:01:39.000Z
2019-03-09T11:01:39.000Z
deform_conv/utils.py
ml-lab/deform-conv
126ebcc283a4325c474332fa170f57d52a59e34d
[ "MIT" ]
78
2017-03-30T21:46:59.000Z
2022-03-19T19:52:19.000Z
from __future__ import absolute_import, division from tensorflow.python import debug as tf_debug import keras.backend as K def keras_set_tf_debug(): sess = K.get_session() sess = tf_debug.LocalCLIDebugWrapperSession(sess) sess.add_tensor_filter("has_inf_or_nan", tf_debug.has_inf_or_nan) K.set_session...
27.25
69
0.788991
from __future__ import absolute_import, division from tensorflow.python import debug as tf_debug import keras.backend as K def keras_set_tf_debug(): sess = K.get_session() sess = tf_debug.LocalCLIDebugWrapperSession(sess) sess.add_tensor_filter("has_inf_or_nan", tf_debug.has_inf_or_nan) K.set_session...
true
true
f716f5a922081969766e4529bf89d92758cc2879
11,057
py
Python
runway/aws_sso_botocore/credentials.py
avosper-intellaegis/runway
757d4e7db269ec16479b044ac82a69f25fa2a450
[ "Apache-2.0" ]
null
null
null
runway/aws_sso_botocore/credentials.py
avosper-intellaegis/runway
757d4e7db269ec16479b044ac82a69f25fa2a450
[ "Apache-2.0" ]
null
null
null
runway/aws_sso_botocore/credentials.py
avosper-intellaegis/runway
757d4e7db269ec16479b044ac82a69f25fa2a450
[ "Apache-2.0" ]
null
null
null
"""Botocore with support for AWS SSO credential assets.""" # Copyright 2012-2014 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http:...
35.213376
88
0.665823
import datetime import json import logging import os from hashlib import sha1 from botocore import UNSIGNED from botocore.config import Config from botocore.credentials import ( AssumeRoleProvider, BotoProvider, CachedCredentialFetcher, CanonicalNameCredentialSourcer, ContainerProvider,...
true
true
f716f787333a832b615b0a6c98f4f3cf3223b40f
148
py
Python
_config.py
atourkow/at-InAppScoring
6603a0b7bce7d456620d760f5a06e5b0f0dc2a90
[ "Apache-2.0" ]
null
null
null
_config.py
atourkow/at-InAppScoring
6603a0b7bce7d456620d760f5a06e5b0f0dc2a90
[ "Apache-2.0" ]
null
null
null
_config.py
atourkow/at-InAppScoring
6603a0b7bce7d456620d760f5a06e5b0f0dc2a90
[ "Apache-2.0" ]
null
null
null
class Config(object): def __init__(self): self.servers = [ "127.0.0.1" ] self.keyspace = 'at_inappscoring'
18.5
41
0.513514
class Config(object): def __init__(self): self.servers = [ "127.0.0.1" ] self.keyspace = 'at_inappscoring'
true
true
f716f8c015aff41ef3b8ac361688f47dbb0587ed
860
py
Python
app/models.py
imireallan/Bucketlist
2dc496cf866d6b21594f9bd7efd12af43ee77cba
[ "MIT" ]
null
null
null
app/models.py
imireallan/Bucketlist
2dc496cf866d6b21594f9bd7efd12af43ee77cba
[ "MIT" ]
null
null
null
app/models.py
imireallan/Bucketlist
2dc496cf866d6b21594f9bd7efd12af43ee77cba
[ "MIT" ]
null
null
null
# app/models.py from app import db class Bucketlist(db.Model): """This class represents the bucketlist table.""" __tablename__ = 'bucketlists' id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(255)) date_created = db.Column(db.DateTime, default=db.func.current_timestamp()) ...
25.294118
78
0.636047
from app import db class Bucketlist(db.Model): __tablename__ = 'bucketlists' id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(255)) date_created = db.Column(db.DateTime, default=db.func.current_timestamp()) date_modified = db.Column( db.DateTime, default=db.func.c...
true
true
f716fa1463f1193d4ff8966502c6b97695669997
5,056
py
Python
tf2_ndg_benckmarks/metrics/embedding.py
katsugeneration/tf2-ndg-benchmarks
ba2d07ef997fac87b3991a54c0a234f7c5425b0f
[ "MIT" ]
1
2020-11-17T07:03:47.000Z
2020-11-17T07:03:47.000Z
tf2_ndg_benckmarks/metrics/embedding.py
katsugeneration/tf2-ndg-benchmarks
ba2d07ef997fac87b3991a54c0a234f7c5425b0f
[ "MIT" ]
null
null
null
tf2_ndg_benckmarks/metrics/embedding.py
katsugeneration/tf2-ndg-benchmarks
ba2d07ef997fac87b3991a54c0a234f7c5425b0f
[ "MIT" ]
null
null
null
""" Copyright: Copyright 2019 by Katsuya SHIMABUKURO. License: MIT, see LICENSE for details. """ import pathlib import gzip import requests import tqdm import numpy as np from gensim.models import KeyedVectors FILE_ID = '0B7XkCwpI5KDYNlNUTTlSS21pQmM' SOURCE_URL = 'https://drive.google.com/uc?export=download&i...
31.798742
116
0.617089
import pathlib import gzip import requests import tqdm import numpy as np from gensim.models import KeyedVectors FILE_ID = '0B7XkCwpI5KDYNlNUTTlSS21pQmM' SOURCE_URL = 'https://drive.google.com/uc?export=download&id={file_id}' SOURCE_URL_WITH_CONFIRM = 'https://drive.google.com/uc?export=download&confirm={code}&id={fi...
true
true
f716fbfc8df971e7d631e0b0b90237bc351ca7f6
11,145
py
Python
dolo/algos/simulations.py
EconForge/dolo
9bb75b8f6ea87578393fe748003092ffb745e8d6
[ "BSD-2-Clause" ]
50
2015-03-16T01:07:00.000Z
2020-02-07T22:18:43.000Z
dolo/algos/simulations.py
EconForge/dolo
9bb75b8f6ea87578393fe748003092ffb745e8d6
[ "BSD-2-Clause" ]
130
2015-01-01T19:33:21.000Z
2020-04-27T15:57:22.000Z
dolo/algos/simulations.py
EconForge/dolo
9bb75b8f6ea87578393fe748003092ffb745e8d6
[ "BSD-2-Clause" ]
56
2015-10-14T12:27:26.000Z
2020-04-21T14:56:02.000Z
import numpy import pandas import xarray as xr import numpy as np from dolo.compiler.model import Model from dolo.numeric.optimize.ncpsolve import ncpsolve from dolo.numeric.optimize.newton import newton as newton_solver from dolo.numeric.optimize.newton import SerialDifferentiableFunction ## TODO: extend for mc proc...
28.286802
126
0.557649
import numpy import pandas import xarray as xr import numpy as np from dolo.compiler.model import Model from dolo.numeric.optimize.ncpsolve import ncpsolve from dolo.numeric.optimize.newton import newton as newton_solver from dolo.numeric.optimize.newton import SerialDifferentiableFunction rname, T=40, impulse: float...
true
true
f716fcb9c6975762b9257b5426a806187ac75ac5
6,270
py
Python
python_modules/dagster-airflow/dagster_airflow_tests/conftest.py
vishvananda/dagster
f6aa44714246bc770fe05a9c986fe8b7d848956b
[ "Apache-2.0" ]
null
null
null
python_modules/dagster-airflow/dagster_airflow_tests/conftest.py
vishvananda/dagster
f6aa44714246bc770fe05a9c986fe8b7d848956b
[ "Apache-2.0" ]
null
null
null
python_modules/dagster-airflow/dagster_airflow_tests/conftest.py
vishvananda/dagster
f6aa44714246bc770fe05a9c986fe8b7d848956b
[ "Apache-2.0" ]
null
null
null
# pylint doesn't understand the way that pytest constructs fixture dependnecies # pylint: disable=redefined-outer-name import datetime import os import shutil import subprocess import sys import tempfile import uuid import airflow.plugins_manager import docker import pytest from dagster import check from dagster.core...
29.299065
100
0.693461
# pylint: disable=redefined-outer-name import datetime import os import shutil import subprocess import sys import tempfile import uuid import airflow.plugins_manager import docker import pytest from dagster import check from dagster.core.execution import create_execution_plan from dagster.utils import load_yaml_fro...
true
true
f716fd7bd67ce55c0a030c87f0370590bbe380cb
223
py
Python
tablas_multiplicar.py
robertogonzalezp/X-Serv-Python-Multiplica
d262184c12217ebdfd3bc8f4a3fccc99496fcaa2
[ "Apache-2.0" ]
null
null
null
tablas_multiplicar.py
robertogonzalezp/X-Serv-Python-Multiplica
d262184c12217ebdfd3bc8f4a3fccc99496fcaa2
[ "Apache-2.0" ]
null
null
null
tablas_multiplicar.py
robertogonzalezp/X-Serv-Python-Multiplica
d262184c12217ebdfd3bc8f4a3fccc99496fcaa2
[ "Apache-2.0" ]
null
null
null
for numero1 in range(1, 11): print('\n', "Tabla del " + str(numero1)) print("--------------") for numero2 in range(1, 11): print(str(numero1) + " por " + str(numero2) + " es " + str(numero1 * numero2))
31.857143
86
0.520179
for numero1 in range(1, 11): print('\n', "Tabla del " + str(numero1)) print("--------------") for numero2 in range(1, 11): print(str(numero1) + " por " + str(numero2) + " es " + str(numero1 * numero2))
true
true
f716fda140000ae4d4422e93bc1747b5025d820d
933
py
Python
aioredis_opentracing/instrument.py
Creativelair/AIORedis-Opentracing
eebf81785052faddaec8c00da74c862bbeeafdf9
[ "BSD-3-Clause" ]
null
null
null
aioredis_opentracing/instrument.py
Creativelair/AIORedis-Opentracing
eebf81785052faddaec8c00da74c862bbeeafdf9
[ "BSD-3-Clause" ]
1
2020-10-09T20:23:40.000Z
2020-10-09T20:23:40.000Z
aioredis_opentracing/instrument.py
Creativelair/AIORedis-Opentracing
eebf81785052faddaec8c00da74c862bbeeafdf9
[ "BSD-3-Clause" ]
null
null
null
import opentracing from signalfx_tracing import utils from wrapt import wrap_function_wrapper from aioredis_opentracing import tracing config = utils.Config( tracer=None, ) def instrument(tracer=None): aioredis = utils.get_module('aioredis') if utils.is_instrumented(aioredis): return tracin...
25.916667
78
0.738478
import opentracing from signalfx_tracing import utils from wrapt import wrap_function_wrapper from aioredis_opentracing import tracing config = utils.Config( tracer=None, ) def instrument(tracer=None): aioredis = utils.get_module('aioredis') if utils.is_instrumented(aioredis): return tracin...
true
true
f716fdec7574c7c1759ea315c98291d9a23d5771
2,751
py
Python
tests/di/core/test_instance.py
dlski/python-di
04dcdf58f3cf820e2d2ba5086e4e89822ae1f409
[ "MIT" ]
8
2021-02-05T16:17:31.000Z
2022-03-03T00:01:33.000Z
tests/di/core/test_instance.py
dlski/python-di
04dcdf58f3cf820e2d2ba5086e4e89822ae1f409
[ "MIT" ]
null
null
null
tests/di/core/test_instance.py
dlski/python-di
04dcdf58f3cf820e2d2ba5086e4e89822ae1f409
[ "MIT" ]
null
null
null
import pytest from di.core.compose import ApplicationComposer, ComposedApplication from di.core.element import Element from di.core.injection import InjectionSolver from di.core.instance import ( ApplicationInstanceElementNotFound, RecursiveApplicationInstance, RecursiveApplicationInstanceBuilder, Recu...
30.230769
88
0.751
import pytest from di.core.compose import ApplicationComposer, ComposedApplication from di.core.element import Element from di.core.injection import InjectionSolver from di.core.instance import ( ApplicationInstanceElementNotFound, RecursiveApplicationInstance, RecursiveApplicationInstanceBuilder, Recu...
true
true
f716fe49497e0fa092b298e9bf377c75b13a12bf
1,247
py
Python
servers/python/coweb/auth/public.py
opencoweb/coweb
7b3a87ee9eda735a859447d404ee16edde1c5671
[ "AFL-2.1" ]
83
2015-01-05T19:02:57.000Z
2021-11-19T02:48:09.000Z
servers/python/coweb/auth/public.py
xuelingxiao/coweb
7b3a87ee9eda735a859447d404ee16edde1c5671
[ "AFL-2.1" ]
3
2015-12-16T13:49:33.000Z
2019-06-17T13:38:50.000Z
servers/python/coweb/auth/public.py
xuelingxiao/coweb
7b3a87ee9eda735a859447d404ee16edde1c5671
[ "AFL-2.1" ]
14
2015-04-29T22:36:53.000Z
2021-11-18T03:24:29.000Z
''' Copyright (c) The Dojo Foundation 2011. All Rights Reserved. Copyright (c) IBM Corporation 2008, 2011. All Rights Reserved. ''' from .base import AuthBase class PublicAuth(AuthBase): cookieName = 'coweb.auth.public.username' _userId = 0 def requires_login(self): '''Does not require login. Usern...
34.638889
80
0.642342
from .base import AuthBase class PublicAuth(AuthBase): cookieName = 'coweb.auth.public.username' _userId = 0 def requires_login(self): return False def requires_cookies(self): return True def get_current_user(self, handler): username = handler.get_secure_cookie(sel...
true
true
f716fedc6fe525ef992c71afd6110e49481a4bad
566
py
Python
Python/Tests/TestData/DebuggerProject/EvalPseudoType.py
nanshuiyu/pytools
9f9271fe8cf564b4f94e9456d400f4306ea77c23
[ "Apache-2.0" ]
null
null
null
Python/Tests/TestData/DebuggerProject/EvalPseudoType.py
nanshuiyu/pytools
9f9271fe8cf564b4f94e9456d400f4306ea77c23
[ "Apache-2.0" ]
null
null
null
Python/Tests/TestData/DebuggerProject/EvalPseudoType.py
nanshuiyu/pytools
9f9271fe8cf564b4f94e9456d400f4306ea77c23
[ "Apache-2.0" ]
null
null
null
from ctypes import * class PyObject(Structure): _fields_ = [('ob_refcnt', c_size_t), ('ob_type', py_object)] class PseudoTypeType(object): def __getattribute__(self, name): if name == '__repr__': raise Exception() elif name == '__name__': retu...
25.727273
60
0.625442
from ctypes import * class PyObject(Structure): _fields_ = [('ob_refcnt', c_size_t), ('ob_type', py_object)] class PseudoTypeType(object): def __getattribute__(self, name): if name == '__repr__': raise Exception() elif name == '__name__': retu...
true
true
f716ff229a4800b23522336aaaedc9e85c29ccb7
1,115
py
Python
userbot/modules/__init__.py
caerus19/Userator
ff4e6d2461d096d2e9d4c8eda9fdf09d47319a61
[ "MIT" ]
null
null
null
userbot/modules/__init__.py
caerus19/Userator
ff4e6d2461d096d2e9d4c8eda9fdf09d47319a61
[ "MIT" ]
null
null
null
userbot/modules/__init__.py
caerus19/Userator
ff4e6d2461d096d2e9d4c8eda9fdf09d47319a61
[ "MIT" ]
1
2021-11-12T18:00:49.000Z
2021-11-12T18:00:49.000Z
# U S Σ R Δ T O R / Ümüd """ U S Σ R Δ T O R """ from userbot import LOGS from telethon.tl.types import DocumentAttributeFilename def __list_all_modules(): from os.path import dirname, basename, isfile import glob mod_paths = glob.glob(dirname(__file__) + "/*.py") all_modules = [ basename(f)...
24.777778
101
0.675336
from userbot import LOGS from telethon.tl.types import DocumentAttributeFilename def __list_all_modules(): from os.path import dirname, basename, isfile import glob mod_paths = glob.glob(dirname(__file__) + "/*.py") all_modules = [ basename(f)[:-3] for f in mod_paths if isfile(f) an...
true
true
f716ff4ad1f5c83780f6a28d11c0f4b0f33e91fd
513
py
Python
happyml/graphs/viz.py
guiferviz/happyml-py
4252d0cff27461e38da404553772dafbc74f3eaa
[ "BSD-Source-Code" ]
1
2016-08-15T13:27:48.000Z
2016-08-15T13:27:48.000Z
happyml/graphs/viz.py
guiferviz/happyml-py
4252d0cff27461e38da404553772dafbc74f3eaa
[ "BSD-Source-Code" ]
null
null
null
happyml/graphs/viz.py
guiferviz/happyml-py
4252d0cff27461e38da404553772dafbc74f3eaa
[ "BSD-Source-Code" ]
null
null
null
# FIXME: not required dependency. from graphviz import Digraph def graph2dot(x, **kwargs): dot = Digraph(body=["rankdir=LR;"], **kwargs) path = x.get_computation_path() for i in path: if i.is_input: dot.node(str(i.id), i.name, color="green") elif i.is_parameter: ...
22.304348
54
0.549708
from graphviz import Digraph def graph2dot(x, **kwargs): dot = Digraph(body=["rankdir=LR;"], **kwargs) path = x.get_computation_path() for i in path: if i.is_input: dot.node(str(i.id), i.name, color="green") elif i.is_parameter: dot.node(str(i.id), i.name, color...
true
true
f716ff4c138f17dceedf81771978e6db1119f04a
1,758
py
Python
setup.py
hoogerheide/reductus
fcc78c06900cff89faceadb7b4eed7b87914c0af
[ "Unlicense" ]
1
2021-06-11T19:24:49.000Z
2021-06-11T19:24:49.000Z
setup.py
hoogerheide/reductus
fcc78c06900cff89faceadb7b4eed7b87914c0af
[ "Unlicense" ]
null
null
null
setup.py
hoogerheide/reductus
fcc78c06900cff89faceadb7b4eed7b87914c0af
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python import sys import os from setuptools import setup, find_packages if len(sys.argv) == 1: sys.argv.append('install') if sys.argv[1] == 'test': from subprocess import call sys.exit(call([sys.executable, '-m', 'pytest'] + sys.argv[2:])) # Create the resource file dataflow/git_revision ...
29.79661
76
0.631968
import sys import os from setuptools import setup, find_packages if len(sys.argv) == 1: sys.argv.append('install') if sys.argv[1] == 'test': from subprocess import call sys.exit(call([sys.executable, '-m', 'pytest'] + sys.argv[2:])) if os.system('"{sys.executable}" dataflow/rev.py'.format(sys=sys)) !=...
true
true
f716ff87b1f5b661462123694cbcb3fe6c7ec595
1,524
py
Python
Lesson09/x.py
PacktPublishing/Python-Fundamentals
f24569826b1b7f97e3d54630a34ae61110ca12da
[ "MIT" ]
1
2021-04-23T14:01:56.000Z
2021-04-23T14:01:56.000Z
Lesson09/x.py
PacktPublishing/Python-Fundamentals
f24569826b1b7f97e3d54630a34ae61110ca12da
[ "MIT" ]
null
null
null
Lesson09/x.py
PacktPublishing/Python-Fundamentals
f24569826b1b7f97e3d54630a34ae61110ca12da
[ "MIT" ]
4
2021-06-29T05:57:44.000Z
2021-09-02T10:14:55.000Z
def remove_punctuation(st, case='l'): """ takes in a string and returns a list of words with no punctuation""" punctuation = '!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}“”‘’~' all_words = st.split() cap_words = [] for c in punctuation: st = st.replace(c, '') if case == 'u': for word in all...
28.222222
76
0.602362
def remove_punctuation(st, case='l'): punctuation = '!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}“”‘’~' all_words = st.split() cap_words = [] for c in punctuation: st = st.replace(c, '') if case == 'u': for word in all_words: if word.istitle(): cap_words.append(word)...
true
true
f716fffcedc3cbaba6d963cd4a7e2061ef83cc34
4,109
py
Python
mdeepctr/models/xdeepfm.py
TS-SE-GROUP/icme2019
7eefdb7de6a7ff3bec1721fafb822d80d80dbba3
[ "MIT" ]
78
2019-02-21T12:44:11.000Z
2022-03-30T11:42:33.000Z
mdeepctr/models/xdeepfm.py
rightnowandholdon/icme2019
fe9b31db7bf19b08d5e5d41a259f0a297eb21766
[ "MIT" ]
6
2019-04-11T13:14:46.000Z
2021-05-19T14:36:07.000Z
mdeepctr/models/xdeepfm.py
rightnowandholdon/icme2019
fe9b31db7bf19b08d5e5d41a259f0a297eb21766
[ "MIT" ]
22
2019-02-21T02:51:54.000Z
2021-12-10T02:04:28.000Z
# -*- coding:utf-8 -*- """ Author: Weichen Shen,wcshen1994@163.com Reference: [1] Lian J, Zhou X, Zhang F, et al. xDeepFM: Combining Explicit and Implicit Feature Interactions for Recommender Systems[J]. arXiv preprint arXiv:1803.05170, 2018.(https://arxiv.org/pdf/1803.05170.pdf) """ import tensorflow as tf fr...
54.065789
325
0.690436
import tensorflow as tf from ..input_embedding import preprocess_input_embedding from ..layers.core import PredictionLayer, MLP from ..layers.interaction import CIN from ..utils import check_feature_config_dict from ..layers.utils import concat_fun def xDeepFM(feature_dim_dict, embedding_size=8, hidden_size=(256, 25...
true
true