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
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
1c0a4379e37fcecc97d92551334d9781cedeefae
6,892
py
Python
leek/task_publisher.py
abo123456789/RedisQueue
cf9a58bb6db30de8b4433e710ef9ac733334905b
[ "MIT" ]
43
2019-03-09T16:00:03.000Z
2021-01-19T00:56:31.000Z
leek/task_publisher.py
abo123456789/RedisQueue
cf9a58bb6db30de8b4433e710ef9ac733334905b
[ "MIT" ]
1
2020-06-17T06:25:28.000Z
2020-06-17T15:09:02.000Z
leek/task_publisher.py
abo123456789/RedisQueue
cf9a58bb6db30de8b4433e710ef9ac733334905b
[ "MIT" ]
10
2019-03-27T05:14:28.000Z
2021-01-07T08:12:42.000Z
# -*- coding:utf-8 -*- # @Author cc import json import traceback from collections import Callable from py_log import get_logger from leek.utils import sort_dict, str_sha256, gen_uuid, get_now_seconds from leek import default_config from leek.memery_queue import MemoryQueue from leek.middleware_eum import MiddlewareEum...
39.83815
115
0.58314
import json import traceback from collections import Callable from py_log import get_logger from leek.utils import sort_dict, str_sha256, gen_uuid, get_now_seconds from leek import default_config from leek.memery_queue import MemoryQueue from leek.middleware_eum import MiddlewareEum from leek.sqllite_queue import Sqll...
true
true
1c0a440e6e1fd110f33f8c4c820c9c984d3da30e
6,216
py
Python
ml-agents/mlagents/trainers/trainer/trainer.py
hridoylego/ml-agents
94a00f7a09c67281c9c8592f5dc823c96cb0b75d
[ "Apache-2.0" ]
1
2021-02-09T09:42:13.000Z
2021-02-09T09:42:13.000Z
ml-agents/mlagents/trainers/trainer/trainer.py
jonghui/ml-agents
94a00f7a09c67281c9c8592f5dc823c96cb0b75d
[ "Apache-2.0" ]
null
null
null
ml-agents/mlagents/trainers/trainer/trainer.py
jonghui/ml-agents
94a00f7a09c67281c9c8592f5dc823c96cb0b75d
[ "Apache-2.0" ]
1
2020-06-27T14:55:41.000Z
2020-06-27T14:55:41.000Z
# # Unity ML-Agents Toolkit from typing import List, Deque import abc from collections import deque from mlagents_envs.logging_util import get_logger from mlagents_envs.timers import timed from mlagents.model_serialization import export_policy_model, SerializationSettings from mlagents.trainers.policy.tf_policy impor...
33.419355
98
0.665058
from typing import List, Deque import abc from collections import deque from mlagents_envs.logging_util import get_logger from mlagents_envs.timers import timed from mlagents.model_serialization import export_policy_model, SerializationSettings from mlagents.trainers.policy.tf_policy import TFPolicy from mlagents.tra...
true
true
1c0a4442e6ff5540986a1591208c795a63c28705
491
py
Python
Algorithms_easy/0268. Missing Number.py
VinceW0/Leetcode_Python_solutions
09e9720afce21632372431606ebec4129eb79734
[ "Xnet", "X11" ]
4
2020-08-11T20:45:15.000Z
2021-03-12T00:33:34.000Z
Algorithms_easy/0268. Missing Number.py
VinceW0/Leetcode_Python_solutions
09e9720afce21632372431606ebec4129eb79734
[ "Xnet", "X11" ]
null
null
null
Algorithms_easy/0268. Missing Number.py
VinceW0/Leetcode_Python_solutions
09e9720afce21632372431606ebec4129eb79734
[ "Xnet", "X11" ]
null
null
null
""" 268. Missing Number Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array. Example 1: Input: [3,0,1] Output: 2 Example 2: Input: [9,6,4,2,3,5,7,0,1] Output: 8 Note: Your algorithm should run in linear runtime complexity. Could you implement it using onl...
32.733333
122
0.686354
class Solution: def missingNumber(self, nums: List[int]) -> int: return (len(nums)*(len(nums)+1))//2 - sum(nums)
true
true
1c0a448165d882d32a48469a77d066ba60cc23e3
482
py
Python
newsletter/migrations/0002_auto_20150723_1822.py
losolio/website
5b983e9dfaf604212aab87c51d8904ffc29527a3
[ "MIT" ]
10
2015-12-18T16:41:33.000Z
2018-11-11T08:36:46.000Z
newsletter/migrations/0002_auto_20150723_1822.py
losolio/website
5b983e9dfaf604212aab87c51d8904ffc29527a3
[ "MIT" ]
96
2015-07-14T22:45:56.000Z
2017-07-25T19:59:48.000Z
newsletter/migrations/0002_auto_20150723_1822.py
losolio/website
5b983e9dfaf604212aab87c51d8904ffc29527a3
[ "MIT" ]
9
2015-07-28T14:38:43.000Z
2019-01-04T17:38:42.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals import django.utils.timezone from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('newsletter', '0001_initial'), ] operations = [ migrations.AlterField( model_name='n...
22.952381
97
0.643154
from __future__ import unicode_literals import django.utils.timezone from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('newsletter', '0001_initial'), ] operations = [ migrations.AlterField( model_name='newsletterpage', ...
true
true
1c0a45032243fc30a271725260168591cf072e4c
201
py
Python
s3-example-static-and-media/mysite/urls.py
chriswedgwood/simple-s3-setup
7c7dcafe9fee9803abfb9a9f4efb28f53b215f42
[ "MIT" ]
54
2017-08-04T03:29:05.000Z
2022-03-27T08:57:50.000Z
s3-example-static-and-media/mysite/urls.py
chriswedgwood/simple-s3-setup
7c7dcafe9fee9803abfb9a9f4efb28f53b215f42
[ "MIT" ]
3
2018-03-01T17:17:03.000Z
2019-11-21T11:27:36.000Z
s3-example-static-and-media/mysite/urls.py
chriswedgwood/simple-s3-setup
7c7dcafe9fee9803abfb9a9f4efb28f53b215f42
[ "MIT" ]
38
2017-08-03T23:54:54.000Z
2022-03-27T08:57:51.000Z
from django.conf.urls import url from django.contrib.auth import views as auth_views from mysite.core import views urlpatterns = [ url(r'^$', views.DocumentCreateView.as_view(), name='home'), ]
20.1
64
0.741294
from django.conf.urls import url from django.contrib.auth import views as auth_views from mysite.core import views urlpatterns = [ url(r'^$', views.DocumentCreateView.as_view(), name='home'), ]
true
true
1c0a4529688c82504a67300b8c022f28e30b5dea
2,102
py
Python
gehomesdk/erd/values/laundry/laundry_cycle.py
bendavis/gehome
017aeca860f231f60bc70fc747067388ad577b18
[ "MIT" ]
null
null
null
gehomesdk/erd/values/laundry/laundry_cycle.py
bendavis/gehome
017aeca860f231f60bc70fc747067388ad577b18
[ "MIT" ]
null
null
null
gehomesdk/erd/values/laundry/laundry_cycle.py
bendavis/gehome
017aeca860f231f60bc70fc747067388ad577b18
[ "MIT" ]
null
null
null
import enum #@enum.unique class LaundryCycle(enum.Enum): CYCLE_ULTRAFRESH_VENT = "UltraFresh Vent" CYCLE_NORMAL = "Normal" CYCLE_DASH = "---" CYCLE_BASKET_CLEAN = "Basket Clean" CYCLE_DRAIN_AND_SPIN = "Drain & Spin" CYCLE_QUICK_RINSE = "Quick Rinse" CYCLE_BULKY_ITEMS = "Bulky Items" CYC...
34.459016
70
0.694577
import enum class LaundryCycle(enum.Enum): CYCLE_ULTRAFRESH_VENT = "UltraFresh Vent" CYCLE_NORMAL = "Normal" CYCLE_DASH = "---" CYCLE_BASKET_CLEAN = "Basket Clean" CYCLE_DRAIN_AND_SPIN = "Drain & Spin" CYCLE_QUICK_RINSE = "Quick Rinse" CYCLE_BULKY_ITEMS = "Bulky Items" CYCLE_SANITIZE = ...
true
true
1c0a457716c23011699edc5a840f8ceafa6d3d16
2,972
py
Python
django_mongoengine/mongo_admin/util.py
TriggeredMessaging/django-mongoengine
fb615e9c631ef59cfb951f2a8450de5c1068c533
[ "BSD-3-Clause" ]
671
2015-01-02T15:13:53.000Z
2022-03-18T22:09:54.000Z
django_mongoengine/mongo_admin/util.py
TriggeredMessaging/django-mongoengine
fb615e9c631ef59cfb951f2a8450de5c1068c533
[ "BSD-3-Clause" ]
116
2015-01-09T21:49:30.000Z
2022-02-02T07:28:49.000Z
django_mongoengine/mongo_admin/util.py
TriggeredMessaging/django-mongoengine
fb615e9c631ef59cfb951f2a8450de5c1068c533
[ "BSD-3-Clause" ]
268
2015-01-02T18:41:27.000Z
2022-03-27T15:21:03.000Z
from django.utils.encoding import smart_text, smart_str from django.forms.utils import pretty_name from django.core.exceptions import FieldDoesNotExist from django.utils import formats from mongoengine import fields from django_mongoengine.utils import force_text class RelationWrapper(object): """ Wraps a d...
34.55814
89
0.644011
from django.utils.encoding import smart_text, smart_str from django.forms.utils import pretty_name from django.core.exceptions import FieldDoesNotExist from django.utils import formats from mongoengine import fields from django_mongoengine.utils import force_text class RelationWrapper(object): def __init__(self...
true
true
1c0a45c402b206c876fb74b4beda798c0d22cd77
3,558
py
Python
graphene_django_cud/mutations/delete.py
adavoudi/graphene-django-cud
2ff730db7e96e9456bc507d0ec302b7b86308173
[ "MIT" ]
null
null
null
graphene_django_cud/mutations/delete.py
adavoudi/graphene-django-cud
2ff730db7e96e9456bc507d0ec302b7b86308173
[ "MIT" ]
null
null
null
graphene_django_cud/mutations/delete.py
adavoudi/graphene-django-cud
2ff730db7e96e9456bc507d0ec302b7b86308173
[ "MIT" ]
1
2020-06-01T15:25:20.000Z
2020-06-01T15:25:20.000Z
from collections import OrderedDict from typing import Iterable import graphene from django.core.exceptions import ObjectDoesNotExist from graphene.types.mutation import MutationOptions from graphene.types.utils import yank_fields_from_attrs from graphene.utils.str_converters import to_snake_case from graphene_django....
30.672414
87
0.667791
from collections import OrderedDict from typing import Iterable import graphene from django.core.exceptions import ObjectDoesNotExist from graphene.types.mutation import MutationOptions from graphene.types.utils import yank_fields_from_attrs from graphene.utils.str_converters import to_snake_case from graphene_django....
true
true
1c0a461a7e18df1731001b12bf8345839d01d3af
5,493
py
Python
convert-yolo-to-xml.py
C190342/labelImg
9969d749755a3a01f54d3cd92e4fee0db490af7a
[ "MIT" ]
null
null
null
convert-yolo-to-xml.py
C190342/labelImg
9969d749755a3a01f54d3cd92e4fee0db490af7a
[ "MIT" ]
null
null
null
convert-yolo-to-xml.py
C190342/labelImg
9969d749755a3a01f54d3cd92e4fee0db490af7a
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # In[13]: import os import re from PIL import Image folder_holding_yolo_files = input("Enter the path to the yolo files (folder): ").replace("'", "").strip() yolo_class_list_file = input("Enter the path to the file that has the yolo classes (typically classes.txt) \nOpen your Y...
39.517986
356
0.608229
import os import re from PIL import Image folder_holding_yolo_files = input("Enter the path to the yolo files (folder): ").replace("'", "").strip() yolo_class_list_file = input("Enter the path to the file that has the yolo classes (typically classes.txt) \nOpen your YOLO file, if started with 15 such as 15 0.063802...
true
true
1c0a4663623cbb1535b182d98711c88a48e34b9b
180
py
Python
tests/steps/home.py
brunoplopes/web-screpper-bigdata
63b84154ae450acd9a568ae55caafad15f9acc60
[ "MIT" ]
null
null
null
tests/steps/home.py
brunoplopes/web-screpper-bigdata
63b84154ae450acd9a568ae55caafad15f9acc60
[ "MIT" ]
null
null
null
tests/steps/home.py
brunoplopes/web-screpper-bigdata
63b84154ae450acd9a568ae55caafad15f9acc60
[ "MIT" ]
null
null
null
from behave import given, when, then from pages.home import home @then(u'Capture vacancies city "{city}"') def capture_vacancies(context, city): home.capture_vacancies(city)
22.5
41
0.761111
from behave import given, when, then from pages.home import home @then(u'Capture vacancies city "{city}"') def capture_vacancies(context, city): home.capture_vacancies(city)
true
true
1c0a46ff3fb49baf9a126b47b87aeb3665962913
6,306
py
Python
src/pyAnalytics/gui_raman_maps/raman_univariate_analysis_window.py
AlexanderSouthan/pyAnalytics
18038b2cda75a99280d3cdd68d61e601eefa0fe0
[ "MIT" ]
null
null
null
src/pyAnalytics/gui_raman_maps/raman_univariate_analysis_window.py
AlexanderSouthan/pyAnalytics
18038b2cda75a99280d3cdd68d61e601eefa0fe0
[ "MIT" ]
null
null
null
src/pyAnalytics/gui_raman_maps/raman_univariate_analysis_window.py
AlexanderSouthan/pyAnalytics
18038b2cda75a99280d3cdd68d61e601eefa0fe0
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import copy from PyQt5.QtWidgets import (QMainWindow,QComboBox,QWidget,QGridLayout, QDesktopWidget,QLabel,QVBoxLayout,QLineEdit, QPushButton,QHBoxLayout,QTextEdit,QFileDialog) class raman_univariate_analysis_window(QMainWindow): def...
42.608108
94
0.684903
import copy from PyQt5.QtWidgets import (QMainWindow,QComboBox,QWidget,QGridLayout, QDesktopWidget,QLabel,QVBoxLayout,QLineEdit, QPushButton,QHBoxLayout,QTextEdit,QFileDialog) class raman_univariate_analysis_window(QMainWindow): def __init__(self, raman_da...
true
true
1c0a4757e2e7fbab75db11e7927ed39f1cb54ad4
391
py
Python
minimal/wsgi.py
XF-FW/issue-drf-stubs-response
af32141618c2440472a051dcf57e6b780037e387
[ "MIT" ]
null
null
null
minimal/wsgi.py
XF-FW/issue-drf-stubs-response
af32141618c2440472a051dcf57e6b780037e387
[ "MIT" ]
null
null
null
minimal/wsgi.py
XF-FW/issue-drf-stubs-response
af32141618c2440472a051dcf57e6b780037e387
[ "MIT" ]
null
null
null
""" WSGI config for minimal project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/4.0/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTI...
23
78
0.785166
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'minimal.settings') application = get_wsgi_application()
true
true
1c0a4862396859069e6d6eeb16cb45319cd03be1
1,057
py
Python
tests/conftest.py
aplazame/aplazame-sadk
b1481a840c92b4578c57c1d2908c2d8f111f3709
[ "BSD-3-Clause" ]
null
null
null
tests/conftest.py
aplazame/aplazame-sadk
b1481a840c92b4578c57c1d2908c2d8f111f3709
[ "BSD-3-Clause" ]
10
2022-01-04T16:02:18.000Z
2022-03-29T13:47:29.000Z
tests/conftest.py
aplazame/aplazame-sadk
b1481a840c92b4578c57c1d2908c2d8f111f3709
[ "BSD-3-Clause" ]
2
2016-03-08T11:57:18.000Z
2016-07-04T19:53:04.000Z
import pytest @pytest.fixture(scope='class') def conf_class(request): request.cls.host = request.config.option.host request.cls.private_token = request.config.option.private_token request.cls.public_token = request.config.option.public_token request.cls.api_version = request.config.option.api_version ...
25.780488
67
0.641438
import pytest @pytest.fixture(scope='class') def conf_class(request): request.cls.host = request.config.option.host request.cls.private_token = request.config.option.private_token request.cls.public_token = request.config.option.public_token request.cls.api_version = request.config.option.api_version ...
true
true
1c0a48cc071b08726d76e7b7b6f3f8763297caa8
9,472
py
Python
pyncm/__main__.py
kitUIN/pyncm
761ead0eb553d0ceb8a3e87ace12e9806d11b773
[ "Apache-2.0" ]
1
2022-01-27T01:47:42.000Z
2022-01-27T01:47:42.000Z
pyncm/__main__.py
kitUIN/pyncm
761ead0eb553d0ceb8a3e87ace12e9806d11b773
[ "Apache-2.0" ]
null
null
null
pyncm/__main__.py
kitUIN/pyncm
761ead0eb553d0ceb8a3e87ace12e9806d11b773
[ "Apache-2.0" ]
1
2022-01-27T01:47:45.000Z
2022-01-27T01:47:45.000Z
'''CLI 使用前端''' import logging import coloredlogs import colorama import traceback import json import os import shutil import sys import argparse from pathlib import Path from . import GetCurrentSession,Crypto,LoadSessionFromString,DumpCurrentSessionAsString from .utils.helper import NcmHelper coloredlogs.install() ...
37.587302
167
0.638725
import logging import coloredlogs import colorama import traceback import json import os import shutil import sys import argparse from pathlib import Path from . import GetCurrentSession,Crypto,LoadSessionFromString,DumpCurrentSessionAsString from .utils.helper import NcmHelper coloredlogs.install() arg_whitelist ...
true
true
1c0a49535e49079808208d6bb2ff3cdc8ca96e3f
2,843
py
Python
python/labbox/api/_session.py
flatironinstitute/labbox
d8b331d55a5cca543567c3b2e92bcdc02b46e799
[ "Apache-2.0" ]
1
2021-09-23T01:10:39.000Z
2021-09-23T01:10:39.000Z
python/labbox/api/_session.py
flatironinstitute/labbox
d8b331d55a5cca543567c3b2e92bcdc02b46e799
[ "Apache-2.0" ]
null
null
null
python/labbox/api/_session.py
flatironinstitute/labbox
d8b331d55a5cca543567c3b2e92bcdc02b46e799
[ "Apache-2.0" ]
1
2021-09-23T01:10:39.000Z
2021-09-23T01:10:39.000Z
import time import multiprocessing class Session: def __init__(self, *, labbox_config, default_feed_name: str): self._labbox_config = labbox_config pipe_to_parent, pipe_to_child = multiprocessing.Pipe() self._worker_process = multiprocessing.Process(target=_run_worker_session, args=(pipe_...
38.418919
140
0.593739
import time import multiprocessing class Session: def __init__(self, *, labbox_config, default_feed_name: str): self._labbox_config = labbox_config pipe_to_parent, pipe_to_child = multiprocessing.Pipe() self._worker_process = multiprocessing.Process(target=_run_worker_session, args=(pipe_...
true
true
1c0a4976e0998f75d163c2645d5f81ef34076ccf
1,978
py
Python
tests/functions_tests/test_clipped_relu.py
woodshop/complex-chainer
18c2ef988319d26123915ec846fc08d8837258ff
[ "MIT" ]
null
null
null
tests/functions_tests/test_clipped_relu.py
woodshop/complex-chainer
18c2ef988319d26123915ec846fc08d8837258ff
[ "MIT" ]
null
null
null
tests/functions_tests/test_clipped_relu.py
woodshop/complex-chainer
18c2ef988319d26123915ec846fc08d8837258ff
[ "MIT" ]
null
null
null
import unittest import numpy import chainer from chainer import cuda from chainer import functions from chainer import gradient_check from chainer import testing from chainer.testing import attr if cuda.available: cuda.init() class TestClippedReLU(unittest.TestCase): def setUp(self): self.x = nump...
27.09589
75
0.637007
import unittest import numpy import chainer from chainer import cuda from chainer import functions from chainer import gradient_check from chainer import testing from chainer.testing import attr if cuda.available: cuda.init() class TestClippedReLU(unittest.TestCase): def setUp(self): self.x = nump...
true
true
1c0a497f74caa180f7fe135d6786d731ea7f59bd
1,909
py
Python
src/twitter_api.py
viraatdas/Twitter-Notifications
9bc3d97e71aeacdafba3a884c6536ade4d7566db
[ "MIT" ]
null
null
null
src/twitter_api.py
viraatdas/Twitter-Notifications
9bc3d97e71aeacdafba3a884c6536ade4d7566db
[ "MIT" ]
7
2021-01-14T06:23:43.000Z
2021-03-18T05:54:03.000Z
src/twitter_api.py
viraatdas/Twitter-Notifications
9bc3d97e71aeacdafba3a884c6536ade4d7566db
[ "MIT" ]
null
null
null
import twitter class twitter_api: def __init__(self, API_KEY, API_KEY_SECRET, ACCESS_TOKEN, ACCESS_TOKEN_SECRET): self.API_KEY = API_KEY self.API_KEY_SECRET = API_KEY_SECRET self.ACCESS_TOKEN = ACCESS_TOKEN self.ACCESS_TOKEN_SECRET = ACCESS_TOKEN_SECRET self.twitter_accoun...
33.491228
88
0.646936
import twitter class twitter_api: def __init__(self, API_KEY, API_KEY_SECRET, ACCESS_TOKEN, ACCESS_TOKEN_SECRET): self.API_KEY = API_KEY self.API_KEY_SECRET = API_KEY_SECRET self.ACCESS_TOKEN = ACCESS_TOKEN self.ACCESS_TOKEN_SECRET = ACCESS_TOKEN_SECRET self.twitter_accoun...
true
true
1c0a49cab591ce8f0a03acd269a484aa63d865c7
640
py
Python
unsubscribe/compat.py
theskumar/django-unsubscribe
5787de69eba984a10ea72f2c217c80606a63672e
[ "BSD-3-Clause" ]
13
2015-01-12T14:33:45.000Z
2021-02-19T07:17:34.000Z
unsubscribe/compat.py
theskumar/django-unsubscribe
5787de69eba984a10ea72f2c217c80606a63672e
[ "BSD-3-Clause" ]
3
2016-10-16T14:02:54.000Z
2017-12-12T21:17:32.000Z
unsubscribe/compat.py
theskumar/django-unsubscribe
5787de69eba984a10ea72f2c217c80606a63672e
[ "BSD-3-Clause" ]
12
2015-04-06T12:53:53.000Z
2020-08-05T22:17:03.000Z
""" The `compat` module provides support for backwards compatibility with older versions of django/python, and compatibility wrappers around optional packages. """ # flake8: noqa from __future__ import unicode_literals import django # location of patterns, url, include changes in 1.4 onwards try: from django.con...
27.826087
79
0.78125
from __future__ import unicode_literals import django try: from django.conf.urls import patterns, url, include except ImportError: from django.conf.urls.defaults import patterns, url, include try: from django.contrib.auth import get_user_model except ImportError: from django.contrib.auth.models impo...
true
true
1c0a4a206d14a06355c9cffb55e05bdefa0f788e
1,847
py
Python
src/get_paths.py
MaiXiaochai/Tools
ac041a5114594071937c73691757c8a46775e5c9
[ "Apache-2.0" ]
6
2019-05-23T06:16:58.000Z
2022-03-20T12:03:34.000Z
src/get_paths.py
MaiXiaochai/Tools
ac041a5114594071937c73691757c8a46775e5c9
[ "Apache-2.0" ]
null
null
null
src/get_paths.py
MaiXiaochai/Tools
ac041a5114594071937c73691757c8a46775e5c9
[ "Apache-2.0" ]
10
2019-03-05T02:53:12.000Z
2022-03-20T12:03:35.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # File: : get_paths.py # @Date : 2019-07-17 16:19:38 # @Author : MaiXiaochai # Email : maixiaochai@outlook.com # GitHub : https://github.com/MaiXiaochai # @GitPage : https://maixiaochai.github.io from os import listdir from os.path import isdir, splitext def...
25.652778
80
0.543584
from os import listdir from os.path import isdir, splitext def list_paths(dir_path: str, depth: int = 0, suffix=None, key_str: str = None): current_dir_level = 0 dir_path = dir_path if dir_path.endswith("/") else dir_path + "/" if suffix: if not suffix.startswith('.'): suffix ...
true
true
1c0a4a28f9321ca66b88dc437333cc1e867afa2f
8,613
py
Python
cloudmersive_convert_api_client/models/delete_docx_table_row_range_request.py
Cloudmersive/Cloudmersive.APIClient.Python.Convert
dba2fe7257229ebdacd266531b3724552c651009
[ "Apache-2.0" ]
3
2018-07-25T23:04:34.000Z
2021-08-10T16:43:10.000Z
cloudmersive_convert_api_client/models/delete_docx_table_row_range_request.py
Cloudmersive/Cloudmersive.APIClient.Python.Convert
dba2fe7257229ebdacd266531b3724552c651009
[ "Apache-2.0" ]
3
2020-11-23T10:46:48.000Z
2021-12-30T14:09:34.000Z
cloudmersive_convert_api_client/models/delete_docx_table_row_range_request.py
Cloudmersive/Cloudmersive.APIClient.Python.Convert
dba2fe7257229ebdacd266531b3724552c651009
[ "Apache-2.0" ]
2
2020-01-07T09:48:01.000Z
2020-11-23T10:47:00.000Z
# coding: utf-8 """ convertapi Convert API lets you effortlessly convert file formats and types. # noqa: E501 OpenAPI spec version: v1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class DeleteDocxTableRowRangeRequest(...
37.125
255
0.645884
import pprint import re import six class DeleteDocxTableRowRangeRequest(object): swagger_types = { 'input_file_bytes': 'str', 'input_file_url': 'str', 'table_path': 'str', 'table_row_row_index_start': 'int', 'table_row_row_index_end': 'int' } attribute_map = ...
true
true
1c0a4b309a3433004579ea0ba4e1fe18c07342d1
3,337
py
Python
qt-creator-opensource-src-4.6.1/tests/system/suite_editors/tst_select_all/test.py
kevinlq/Qt-Creator-Opensource-Study
b8cadff1f33f25a5d4ef33ed93f661b788b1ba0f
[ "MIT" ]
5
2018-12-22T14:49:13.000Z
2022-01-13T07:21:46.000Z
qt-creator-opensource-src-4.6.1/tests/system/suite_editors/tst_select_all/test.py
kevinlq/Qt-Creator-Opensource-Study
b8cadff1f33f25a5d4ef33ed93f661b788b1ba0f
[ "MIT" ]
null
null
null
qt-creator-opensource-src-4.6.1/tests/system/suite_editors/tst_select_all/test.py
kevinlq/Qt-Creator-Opensource-Study
b8cadff1f33f25a5d4ef33ed93f661b788b1ba0f
[ "MIT" ]
8
2018-07-17T03:55:48.000Z
2021-12-22T06:37:53.000Z
############################################################################ # # Copyright (C) 2016 The Qt Company Ltd. # Contact: https://www.qt.io/licensing/ # # This file is part of Qt Creator. # # Commercial License Usage # Licensees holding valid commercial Qt licenses may use this file in # accordance with the co...
45.094595
102
0.604435
source("../../shared/qtcreator.py") def main(): files = map(lambda record: os.path.join(srcPath, testData.field(record, "filename")), testData.dataset("files.tsv")) files = filter(lambda x: not x.endswith(".bin"), files) for currentFile in files: if not neededFilePresent(currentFi...
true
true
1c0a4bf7109e25aa1eb0dfae7e903b77142f670b
4,994
py
Python
dataset.py
JiaMingLin/tsn-pytorch
d9173033900eb3fbda5aaf9478727e0673bc84b7
[ "BSD-2-Clause" ]
null
null
null
dataset.py
JiaMingLin/tsn-pytorch
d9173033900eb3fbda5aaf9478727e0673bc84b7
[ "BSD-2-Clause" ]
null
null
null
dataset.py
JiaMingLin/tsn-pytorch
d9173033900eb3fbda5aaf9478727e0673bc84b7
[ "BSD-2-Clause" ]
null
null
null
import torch.utils.data as data from PIL import Image import os import os.path import numpy as np from numpy.random import randint class VideoRecord(object): def __init__(self, row): self._data = row @property def path(self): return self._data[0] @property def num_frames(self): ...
37.833333
136
0.612735
import torch.utils.data as data from PIL import Image import os import os.path import numpy as np from numpy.random import randint class VideoRecord(object): def __init__(self, row): self._data = row @property def path(self): return self._data[0] @property def num_frames(self): ...
true
true
1c0a4bfdd04cd7bcedde9684efc651e0d3b4117f
13,675
py
Python
src/olympia/reviewers/tests/test_forms.py
osamamagdy/addons-server
f7326c94d1d40c71eca991242288edf799146182
[ "BSD-3-Clause" ]
2
2021-07-19T03:26:43.000Z
2021-07-24T03:12:52.000Z
src/olympia/reviewers/tests/test_forms.py
osamamagdy/addons-server
f7326c94d1d40c71eca991242288edf799146182
[ "BSD-3-Clause" ]
760
2021-05-17T07:59:30.000Z
2022-03-31T11:14:15.000Z
src/olympia/reviewers/tests/test_forms.py
osamamagdy/addons-server
f7326c94d1d40c71eca991242288edf799146182
[ "BSD-3-Clause" ]
1
2021-07-19T03:26:52.000Z
2021-07-19T03:26:52.000Z
from django.utils.encoding import force_str from pyquery import PyQuery as pq from olympia import amo from olympia.addons.models import Addon, AddonReviewerFlags from olympia.amo.tests import TestCase, addon_factory, file_factory, version_factory from olympia.constants.reviewers import REVIEWER_DELAYED_REJECTION_PERI...
43.412698
86
0.649945
from django.utils.encoding import force_str from pyquery import PyQuery as pq from olympia import amo from olympia.addons.models import Addon, AddonReviewerFlags from olympia.amo.tests import TestCase, addon_factory, file_factory, version_factory from olympia.constants.reviewers import REVIEWER_DELAYED_REJECTION_PERI...
true
true
1c0a4c84cf357be0b7c5a06ae5c19e19d05bc2e8
1,047
py
Python
move_imgs_from_root_to_sub.py
pramodpots/pybots
c33bb2db48d791caa9cbbad17045df3753a041a5
[ "MIT" ]
null
null
null
move_imgs_from_root_to_sub.py
pramodpots/pybots
c33bb2db48d791caa9cbbad17045df3753a041a5
[ "MIT" ]
null
null
null
move_imgs_from_root_to_sub.py
pramodpots/pybots
c33bb2db48d791caa9cbbad17045df3753a041a5
[ "MIT" ]
null
null
null
import os from shutil import copy, move, Error ext = ( ".jpg", ".jpeg", ".jfif", ".pjpeg", ".pjp" ".png", ".avif", ".gif", ".PNG", ".JPG", ".JPEG", ) # dir_src = r"/path/to/folder/with/subfolders" dir_src = r"/Users/pxi/Documents/Family_and_other" dir_dst = r"/Users/pxi/Document...
27.552632
59
0.567335
import os from shutil import copy, move, Error ext = ( ".jpg", ".jpeg", ".jfif", ".pjpeg", ".pjp" ".png", ".avif", ".gif", ".PNG", ".JPG", ".JPEG", ) dir_src = r"/Users/pxi/Documents/Family_and_other" dir_dst = r"/Users/pxi/Documents/Family_and_other_combined" dup_counter = 0 f...
true
true
1c0a4ceb0a833266e1138a4f7d814bcc978c0522
3,469
py
Python
profiles_project/settings.py
cbinal/profiles-rest-api
819afce2a357a9d85c7ef6fc9e1a7c2cf6d1cbe3
[ "MIT" ]
null
null
null
profiles_project/settings.py
cbinal/profiles-rest-api
819afce2a357a9d85c7ef6fc9e1a7c2cf6d1cbe3
[ "MIT" ]
null
null
null
profiles_project/settings.py
cbinal/profiles-rest-api
819afce2a357a9d85c7ef6fc9e1a7c2cf6d1cbe3
[ "MIT" ]
null
null
null
""" Django settings for profiles_project project. Generated by 'django-admin startproject' using Django 3.2.12. For more information on this file, see https://docs.djangoproject.com/en/3.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.2/ref/settings/ """ fr...
25.88806
91
0.698472
from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = 'django-insecure-+7%c@-)urz)bs(ni)pf@)8@ne-*a41oq!e+9@5!m7x5zjp5*+2' DEBUG = True ALLOWED_HOSTS = ['192.168.1.16', 'localhost', '127.0.0.1'] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'djan...
true
true
1c0a4d5a6161ad137670e9453ca0e9752fb1d8ff
14,227
py
Python
ref/views/edit.py
ahmedaffes/MAGE
79d880aea50360816b0897440ef6f58875f3eb8d
[ "Apache-2.0" ]
null
null
null
ref/views/edit.py
ahmedaffes/MAGE
79d880aea50360816b0897440ef6f58875f3eb8d
[ "Apache-2.0" ]
null
null
null
ref/views/edit.py
ahmedaffes/MAGE
79d880aea50360816b0897440ef6f58875f3eb8d
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 ## Python imports from functools import wraps from _functools import partial ## Django imports from django import forms from django.forms.formsets import formset_factory from django.forms.models import ModelChoiceIterator, ModelForm, modelformset_factory from django.forms.widgets import Chec...
46.191558
162
0.632389
from functools import wraps from _functools import partial from django import forms from django.forms.formsets import formset_factory from django.forms.models import ModelChoiceIterator, ModelForm, modelformset_factory from django.forms.widgets import CheckboxSelectMultiple, CheckboxInput from django.shortcut...
true
true
1c0a4e54017fd737490a691bbdb84aad3cb28c85
4,361
py
Python
selfdrive/boardd/pandad.py
hikee9123/openpilogt_0814
aba817833355bbf7db6d4c149aca52efcdea2c23
[ "MIT" ]
null
null
null
selfdrive/boardd/pandad.py
hikee9123/openpilogt_0814
aba817833355bbf7db6d4c149aca52efcdea2c23
[ "MIT" ]
null
null
null
selfdrive/boardd/pandad.py
hikee9123/openpilogt_0814
aba817833355bbf7db6d4c149aca52efcdea2c23
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # simple boardd wrapper that updates the panda first import os import usb1 import time import subprocess from typing import NoReturn from functools import cmp_to_key from panda import DEFAULT_FW_FN, DEFAULT_H7_FW_FN, MCU_TYPE_H7, Panda, PandaDFU from common.basedir import BASEDIR from common.par...
30.075862
155
0.701903
import os import usb1 import time import subprocess from typing import NoReturn from functools import cmp_to_key from panda import DEFAULT_FW_FN, DEFAULT_H7_FW_FN, MCU_TYPE_H7, Panda, PandaDFU from common.basedir import BASEDIR from common.params import Params from selfdrive.swaglog import cloudlog def get_expected_...
true
true
1c0a4ef2125787ef814516e3bcf849e6fb75e2ee
1,124
py
Python
swyft/types.py
undark-lab/swyft
50aa524e2f3a2b3d1354543178ff72bc7f055a35
[ "MIT" ]
104
2020-11-26T09:46:03.000Z
2022-03-18T06:22:03.000Z
swyft/types.py
cweniger/swyft
2c0ed514622a37e8ec4e406b99a8327ecafb7ab4
[ "MIT" ]
83
2021-03-02T15:54:26.000Z
2022-03-10T08:09:05.000Z
swyft/types.py
undark-lab/swyft
50aa524e2f3a2b3d1354543178ff72bc7f055a35
[ "MIT" ]
10
2021-02-04T14:27:36.000Z
2022-03-31T17:39:34.000Z
from numbers import Real from pathlib import Path from typing import Callable, Dict, Hashable, Mapping, Sequence, Tuple, Union import numpy as np import torch from pandas import DataFrame # If you add a type, don't forget to update autodoc_type_aliases in /docs/source/config.py # General defintions PathType = Union[...
31.222222
90
0.72153
from numbers import Real from pathlib import Path from typing import Callable, Dict, Hashable, Mapping, Sequence, Tuple, Union import numpy as np import torch from pandas import DataFrame # General defintions PathType = Union[str, Path] Device = Union[torch.device, str] Tensor = torch.Tensor Array = Union[np.ndarray...
true
true
1c0a50a6641a7ce7940edb07aeda7e101f55cf60
3,360
py
Python
trieste/models/gpflux/interface.py
satrialoka/trieste
b58eb924a49ad86e27fa2e082defe2d37afcc14a
[ "Apache-2.0" ]
null
null
null
trieste/models/gpflux/interface.py
satrialoka/trieste
b58eb924a49ad86e27fa2e082defe2d37afcc14a
[ "Apache-2.0" ]
null
null
null
trieste/models/gpflux/interface.py
satrialoka/trieste
b58eb924a49ad86e27fa2e082defe2d37afcc14a
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 The Trieste Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
40.97561
98
0.726786
from __future__ import annotations from abc import ABC, abstractmethod import tensorflow as tf from gpflow.base import Module from ...types import TensorType from ..interfaces import ProbabilisticModel class GPfluxPredictor(ProbabilisticModel, tf.Module, ABC): @property @abstractmethod def model_gpfl...
true
true
1c0a51edfaf4bcce43eae71a36664c2cccc0b9c9
15,485
py
Python
aim_mt_2d/architectures/resnet.py
sisl/neat
42758d910f453686366eddfd1aed440e34c94828
[ "MIT" ]
183
2021-08-18T13:22:37.000Z
2022-03-31T08:40:48.000Z
aim_mt_2d/architectures/resnet.py
sisl/neat
42758d910f453686366eddfd1aed440e34c94828
[ "MIT" ]
10
2021-09-24T15:30:06.000Z
2022-03-25T11:19:23.000Z
aim_mt_2d/architectures/resnet.py
sisl/neat
42758d910f453686366eddfd1aed440e34c94828
[ "MIT" ]
21
2021-09-11T13:32:54.000Z
2022-03-23T16:55:53.000Z
import torch from torch import Tensor import torch.nn as nn from torchvision.models.utils import load_state_dict_from_url from typing import Type, Any, Callable, Union, List, Optional __all__ = ['ResNet', 'resnet18', 'resnet34', 'resnet50', 'resnet101', 'resnet152', 'resnext50_32x4d', 'resnext101_32x8d', ...
39.807198
111
0.626413
import torch from torch import Tensor import torch.nn as nn from torchvision.models.utils import load_state_dict_from_url from typing import Type, Any, Callable, Union, List, Optional __all__ = ['ResNet', 'resnet18', 'resnet34', 'resnet50', 'resnet101', 'resnet152', 'resnext50_32x4d', 'resnext101_32x8d', ...
true
true
1c0a523e0791704d83690eb8a5992d5272b4de3f
1,572
py
Python
lib/scheduler.py
goldkash-org/sentinel
18fc058bd4a82ccded325262ac023d5fae40d8e0
[ "MIT" ]
null
null
null
lib/scheduler.py
goldkash-org/sentinel
18fc058bd4a82ccded325262ac023d5fae40d8e0
[ "MIT" ]
null
null
null
lib/scheduler.py
goldkash-org/sentinel
18fc058bd4a82ccded325262ac023d5fae40d8e0
[ "MIT" ]
null
null
null
import sys import os sys.path.append(os.path.normpath(os.path.join(os.path.dirname(__file__), '../lib'))) import init import misc from models import Transient from misc import printdbg import time import random class Scheduler(object): transient_key_scheduled = 'NEXT_SENTINEL_CHECK_AT' random_int...
30.823529
85
0.66285
import sys import os sys.path.append(os.path.normpath(os.path.join(os.path.dirname(__file__), '../lib'))) import init import misc from models import Transient from misc import printdbg import time import random class Scheduler(object): transient_key_scheduled = 'NEXT_SENTINEL_CHECK_AT' random_int...
true
true
1c0a52460957109ceda9f1b09681b3f152cbfc93
6,432
py
Python
lfs/manage/discounts/views.py
naro/django-lfs
312404370e497d00aa0f7221dc55a70a20490fb5
[ "BSD-3-Clause" ]
null
null
null
lfs/manage/discounts/views.py
naro/django-lfs
312404370e497d00aa0f7221dc55a70a20490fb5
[ "BSD-3-Clause" ]
null
null
null
lfs/manage/discounts/views.py
naro/django-lfs
312404370e497d00aa0f7221dc55a70a20490fb5
[ "BSD-3-Clause" ]
null
null
null
# django imports from django.contrib.auth.decorators import permission_required from django.core.exceptions import ObjectDoesNotExist from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect from django.http import HttpResponse from django.shortcuts import render_to_response from django...
33.5
87
0.70569
from django.contrib.auth.decorators import permission_required from django.core.exceptions import ObjectDoesNotExist from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect from django.http import HttpResponse from django.shortcuts import render_to_response from django.template.loader ...
true
true
1c0a5288f7ef28a8449bb4aac7421fa8cd33d6c6
1,764
py
Python
tensorflow/contrib/data/__init__.py
ralic/tensorflow
1209491913def44650d6457c60a6e41d56de3306
[ "Apache-2.0" ]
1
2017-09-05T02:22:07.000Z
2017-09-05T02:22:07.000Z
tensorflow/contrib/data/__init__.py
ralic/tensorflow
1209491913def44650d6457c60a6e41d56de3306
[ "Apache-2.0" ]
null
null
null
tensorflow/contrib/data/__init__.py
ralic/tensorflow
1209491913def44650d6457c60a6e41d56de3306
[ "Apache-2.0" ]
1
2021-01-25T14:18:12.000Z
2021-01-25T14:18:12.000Z
# 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...
39.2
83
0.785714
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.contrib.data.python.ops.dataset_ops import Dataset from tensorflow.contrib.data.python.ops.dataset_ops import FixedLengthRecordDataset from tensorflow.contrib.data.python.ops.dataset_ops import...
true
true
1c0a5292392096cd0c679331e6aeaa6ecf98574c
14,087
py
Python
kms/api-client/snippets.py
TheCulliganMan/python-docs-samples
e6ad76ca502d83529f481d1f74602495b8d4b6ee
[ "Apache-2.0" ]
null
null
null
kms/api-client/snippets.py
TheCulliganMan/python-docs-samples
e6ad76ca502d83529f481d1f74602495b8d4b6ee
[ "Apache-2.0" ]
null
null
null
kms/api-client/snippets.py
TheCulliganMan/python-docs-samples
e6ad76ca502d83529f481d1f74602495b8d4b6ee
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright 2017 Google, Inc # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
37.86828
79
0.698871
import argparse import base64 import io import googleapiclient.discovery def create_keyring(project_id, location, keyring): kms_client = googleapiclient.discovery.build('cloudkms', 'v1beta1') parent = 'projects/{}/locations/{}'.format(project_id, location) request = kms_client.projects()...
true
true
1c0a53461ac4c8009caf52b0b0384a03247463ca
8,874
py
Python
tensorflow_probability/python/bijectors/sinh_arcsinh_test.py
jakee417/probability-1
ae7117f37ac441bc7a888167ea23e5e620c5bcde
[ "Apache-2.0" ]
3,670
2018-02-14T03:29:40.000Z
2022-03-30T01:19:52.000Z
tensorflow_probability/python/bijectors/sinh_arcsinh_test.py
jakee417/probability-1
ae7117f37ac441bc7a888167ea23e5e620c5bcde
[ "Apache-2.0" ]
1,395
2018-02-24T02:28:49.000Z
2022-03-31T16:12:06.000Z
tensorflow_probability/python/bijectors/sinh_arcsinh_test.py
jakee417/probability-1
ae7117f37ac441bc7a888167ea23e5e620c5bcde
[ "Apache-2.0" ]
1,135
2018-02-14T01:51:10.000Z
2022-03-28T02:24:11.000Z
# Copyright 2018 The TensorFlow Probability 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 applicable law o...
43.5
123
0.675118
from absl.testing import parameterized import numpy as np import tensorflow.compat.v2 as tf from tensorflow_probability.python import bijectors as tfb from tensorflow_probability.python.bijectors import bijector_test_util from tensorflow_probability.python.internal import test_util @test_util.test_all_tf_execution_...
true
true
1c0a5349f175228dc72e033d7c97fa904a53beac
1,750
py
Python
menus/urls.py
arcanemachine/menu-maker
c675dff5f04cde9924095d953bd7d7ad554d659d
[ "CC-BY-4.0" ]
2
2022-02-14T15:21:02.000Z
2022-02-15T06:20:48.000Z
menus/urls.py
arcanemachine/Menu-Maker
c675dff5f04cde9924095d953bd7d7ad554d659d
[ "CC-BY-4.0" ]
1
2022-03-13T06:02:48.000Z
2022-03-28T12:58:47.000Z
menus/urls.py
arcanemachine/django-menu-maker
665b815c7255b756725d08bf3f66f144407b83d8
[ "CC-BY-4.0" ]
null
null
null
from django.urls import path from . import views app_name = 'menus' urlpatterns = [ path('', views.menus_root, name='menus_root'), path('new-menu/', views.MenuCreateView.as_view(), name='menu_create'), path('<slug:menu_slug>/', views.MenuDetailView.as_view(), ...
35.714286
79
0.635429
from django.urls import path from . import views app_name = 'menus' urlpatterns = [ path('', views.menus_root, name='menus_root'), path('new-menu/', views.MenuCreateView.as_view(), name='menu_create'), path('<slug:menu_slug>/', views.MenuDetailView.as_view(), ...
true
true
1c0a536945cc0b0ffb9cf682278abc557c87be7b
2,239
py
Python
tests/test_interval.py
JelleAalbers/plunc
e70806b17c56dfb7ffa882faf6d61f1959d1ccca
[ "MIT" ]
null
null
null
tests/test_interval.py
JelleAalbers/plunc
e70806b17c56dfb7ffa882faf6d61f1959d1ccca
[ "MIT" ]
null
null
null
tests/test_interval.py
JelleAalbers/plunc
e70806b17c56dfb7ffa882faf6d61f1959d1ccca
[ "MIT" ]
null
null
null
import unittest import numpy as np import logging import sys from plunc.intervals.basic import CentralCI from plunc.statistics import NumberOfEvents from plunc.exceptions import InsufficientPrecisionError # 90% confidence level on Poisson rate if n=20 or n=120 events observed. # Values taken from calculator at http:...
37.316667
100
0.679768
import unittest import numpy as np import logging import sys from plunc.intervals.basic import CentralCI from plunc.statistics import NumberOfEvents from plunc.exceptions import InsufficientPrecisionError POISSON_90_CI_20 = (13.2547, 29.0620) POISSON_90_CI_120 = (102.5677, 139.6439) class TestIntervalChoice(unitte...
true
true
1c0a56455bcf95e49f05971266a5eff11a2bd69f
3,237
py
Python
func.py
rmdmattingly/QCI-Robinhood-Bot
838e077a4338d8b63fc155d7b49b1bbbe389e489
[ "MIT" ]
null
null
null
func.py
rmdmattingly/QCI-Robinhood-Bot
838e077a4338d8b63fc155d7b49b1bbbe389e489
[ "MIT" ]
null
null
null
func.py
rmdmattingly/QCI-Robinhood-Bot
838e077a4338d8b63fc155d7b49b1bbbe389e489
[ "MIT" ]
null
null
null
import acct import json import math import requests import robin_stocks as r from pprint import pprint login = r.login(acct.username, acct.password) def getPositions(): return r.build_holdings() def getUserProfile(): return r.build_user_profile() def getPrice(symbol): return float(r.stocks.get_latest_pr...
35.966667
133
0.589435
import acct import json import math import requests import robin_stocks as r from pprint import pprint login = r.login(acct.username, acct.password) def getPositions(): return r.build_holdings() def getUserProfile(): return r.build_user_profile() def getPrice(symbol): return float(r.stocks.get_latest_pr...
true
true
1c0a58311d307cdad86423f24024047fcdbf9189
2,908
py
Python
example.py
Keyrat06/Gaussian_Processes_Sampling
50eac1163da001bf708470580750f55ca9709a98
[ "MIT" ]
null
null
null
example.py
Keyrat06/Gaussian_Processes_Sampling
50eac1163da001bf708470580750f55ca9709a98
[ "MIT" ]
null
null
null
example.py
Keyrat06/Gaussian_Processes_Sampling
50eac1163da001bf708470580750f55ca9709a98
[ "MIT" ]
null
null
null
import threading import matplotlib.pyplot as plt import pickle import time import numpy as np import cv2 import GaussianProcess import util from scipy import interpolate plt.ion() N = util.N M = util.M K = 2 # MAP = np.ones((N,M,K))/float(K) MAP = lambda x, y: np.ones(K)/float(K) # np.random.seed(0) def Image_Classi...
29.373737
107
0.632393
import threading import matplotlib.pyplot as plt import pickle import time import numpy as np import cv2 import GaussianProcess import util from scipy import interpolate plt.ion() N = util.N M = util.M K = 2 MAP = lambda x, y: np.ones(K)/float(K) def Image_Classification_Thread(n = float('inf'), t=0.1): print("Y...
true
true
1c0a5913f8b15743c89ffb2c28e23df583a44abf
378
py
Python
interface/school.py
zhangjiang1203/ChooseCourse
7669dc0cb81b834ef9003142c7b48c5489c0162c
[ "MIT" ]
null
null
null
interface/school.py
zhangjiang1203/ChooseCourse
7669dc0cb81b834ef9003142c7b48c5489c0162c
[ "MIT" ]
null
null
null
interface/school.py
zhangjiang1203/ChooseCourse
7669dc0cb81b834ef9003142c7b48c5489c0162c
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2018/12/11 5:29 PM # @Author : zhangjiang # @Site : # @File : school.py # @Software: PyCharm class School: def __init__(self,name,province,city,course=[],grade=[]): self.name = name self.province = province self.city = city...
21
61
0.571429
class School: def __init__(self,name,province,city,course=[],grade=[]): self.name = name self.province = province self.city = city self.course = course self.grade = grade
true
true
1c0a59710633038c1f9abab7e3a5c7d57296aa86
1,259
py
Python
test/test_page_dto_domain_dto.py
unofficial-memsource/memsource-cli-client
a6639506b74e95476da87f4375953448b76ea90c
[ "Apache-2.0" ]
16
2019-09-25T00:20:38.000Z
2021-05-04T05:56:10.000Z
test/test_page_dto_domain_dto.py
zerodayz/memsource-cli-client
c2574f1467539a49e6637c874e88d75c7ef789b3
[ "Apache-2.0" ]
26
2019-09-30T14:00:03.000Z
2021-05-12T11:15:18.000Z
test/test_page_dto_domain_dto.py
zerodayz/memsource-cli-client
c2574f1467539a49e6637c874e88d75c7ef789b3
[ "Apache-2.0" ]
1
2021-05-24T16:19:14.000Z
2021-05-24T16:19:14.000Z
# coding: utf-8 """ Memsource REST API Welcome to Memsource's API documentation. To view our legacy APIs please [visit our documentation](https://wiki.memsource.com/wiki/Memsource_API) and for more information about our new APIs, [visit our blog](https://www.memsource.com/blog/2017/10/24/introducing-rest-apis...
30.707317
421
0.730739
from __future__ import absolute_import import unittest import memsource_cli from memsource_cli.models.page_dto_domain_dto import PageDtoDomainDto from memsource_cli.rest import ApiException class TestPageDtoDomainDto(unittest.TestCase): def setUp(self): pass def tearDown(self): pass ...
true
true
1c0a59b326cd5b7d40c6ee9518b9cbe78325d4c7
2,347
py
Python
test/metrics_test.py
aashnamsft/elastic
5372d6acaf07d130ab0f0ccaf52958a7fde88902
[ "BSD-3-Clause" ]
1
2021-09-07T02:31:39.000Z
2021-09-07T02:31:39.000Z
test/metrics_test.py
aashnamsft/elastic
5372d6acaf07d130ab0f0ccaf52958a7fde88902
[ "BSD-3-Clause" ]
null
null
null
test/metrics_test.py
aashnamsft/elastic
5372d6acaf07d130ab0f0ccaf52958a7fde88902
[ "BSD-3-Clause" ]
1
2021-09-14T09:12:47.000Z
2021-09-14T09:12:47.000Z
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. import unittest import torchelastic.metrics as metrics class MockMetricHandler(metrics...
31.716216
71
0.66127
import unittest import torchelastic.metrics as metrics class MockMetricHandler(metrics.MetricHandler): def __init__(self, metric_map): self.metric_map = metric_map def emit(self, metric_data): self.metric_map[ f"{metric_data.group_name}.{metric_data.name}" ] = metric_da...
true
true
1c0a5a56875b48859cd08c86fe341f5c43d0a674
507
py
Python
TuShare/view/sme_classified.py
lwh2015/TuShare
f244e05e5cf208e18e6237d3b81f71f0d3c1394a
[ "MIT" ]
1
2018-09-26T08:34:02.000Z
2018-09-26T08:34:02.000Z
TuShare/view/sme_classified.py
lwh2015/TuShare
f244e05e5cf208e18e6237d3b81f71f0d3c1394a
[ "MIT" ]
null
null
null
TuShare/view/sme_classified.py
lwh2015/TuShare
f244e05e5cf208e18e6237d3b81f71f0d3c1394a
[ "MIT" ]
null
null
null
# -*- coding: UTF-8 -*- import json from django.http import HttpResponse import tushare as ts from .publiceClass import DateEncoder def sme_classified(request): try: data = ts.get_sme_classified() res = {'columns':[ '股票代码', '股票名称', ],'data':json.loads(json.dumps(...
24.142857
76
0.641026
import json from django.http import HttpResponse import tushare as ts from .publiceClass import DateEncoder def sme_classified(request): try: data = ts.get_sme_classified() res = {'columns':[ '股票代码', '股票名称', ],'data':json.loads(json.dumps(data.values,cls=DateEnco...
true
true
1c0a5a70f7e06108ed2b1870556ed5f22f4a2fa0
118
py
Python
ex010.py
JuuzouMarques/CursoEmVideo-Python
8fdeae09f69d4047b6532a4759af115beedb8545
[ "MIT" ]
null
null
null
ex010.py
JuuzouMarques/CursoEmVideo-Python
8fdeae09f69d4047b6532a4759af115beedb8545
[ "MIT" ]
null
null
null
ex010.py
JuuzouMarques/CursoEmVideo-Python
8fdeae09f69d4047b6532a4759af115beedb8545
[ "MIT" ]
null
null
null
reais = float(input('Digite sua quantia em reais: ')) print('Esse valor equivale a {:.2f} dólares'.format(reais/5.0))
39.333333
63
0.70339
reais = float(input('Digite sua quantia em reais: ')) print('Esse valor equivale a {:.2f} dólares'.format(reais/5.0))
true
true
1c0a5b236860564748de2503796d42e7f4895e88
1,476
py
Python
azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/notification_settings_fragment.py
v-Ajnava/azure-sdk-for-python
a1f6f80eb5869c5b710e8bfb66146546697e2a6f
[ "MIT" ]
4
2016-06-17T23:25:29.000Z
2022-03-30T22:37:45.000Z
azure/mgmt/devtestlabs/models/notification_settings_fragment.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
2
2016-09-30T21:40:24.000Z
2017-11-10T18:16:18.000Z
azure/mgmt/devtestlabs/models/notification_settings_fragment.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
3
2016-05-03T20:49:46.000Z
2017-10-05T21:05:27.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
37.846154
78
0.628049
from msrest.serialization import Model class NotificationSettingsFragment(Model): _attribute_map = { 'status': {'key': 'status', 'type': 'str'}, 'time_in_minutes': {'key': 'timeInMinutes', 'type': 'int'}, 'webhook_url': {'key': 'webhookUrl', 'type': 'str'}, } def __init__(self, ...
true
true
1c0a5b75537ce69801ae2f59cf277a67f8e7c789
55
py
Python
gym_gamblers/envs/__init__.py
prasadchelsea33/gym-gamblers
99f30ef70609b499eb2877c01d77b5723d7bbcd1
[ "MIT" ]
null
null
null
gym_gamblers/envs/__init__.py
prasadchelsea33/gym-gamblers
99f30ef70609b499eb2877c01d77b5723d7bbcd1
[ "MIT" ]
null
null
null
gym_gamblers/envs/__init__.py
prasadchelsea33/gym-gamblers
99f30ef70609b499eb2877c01d77b5723d7bbcd1
[ "MIT" ]
null
null
null
from gym_gamblers.envs.gamblers_env import GamblersEnv
27.5
54
0.890909
from gym_gamblers.envs.gamblers_env import GamblersEnv
true
true
1c0a5b9de1dd0590bc606d11c96e17b32bb9ca85
12,622
py
Python
sdk/python/pulumi_azure_native/network/v20200801/vpn_gateway.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/network/v20200801/vpn_gateway.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/network/v20200801/vpn_gateway.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
53.483051
2,975
0.682697
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs from ._enums import * from ._inputs import * __all__ = ['VpnGateway'] class VpnGateway(pulumi.CustomResource): def __init__(__self__, ...
true
true
1c0a5bce8d98000b6d6a46e1b21e35737c2eb2fd
848
py
Python
poll/migrations/0001_initial.py
MaykelLlanes/poll_test
77fe8b6b3e543b931dfb11ed3fb9ca53bb40b0c5
[ "MIT" ]
null
null
null
poll/migrations/0001_initial.py
MaykelLlanes/poll_test
77fe8b6b3e543b931dfb11ed3fb9ca53bb40b0c5
[ "MIT" ]
null
null
null
poll/migrations/0001_initial.py
MaykelLlanes/poll_test
77fe8b6b3e543b931dfb11ed3fb9ca53bb40b0c5
[ "MIT" ]
null
null
null
# Generated by Django 3.1.4 on 2022-01-16 21:47 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Person', fields=[ ('id', models.AutoField(a...
31.407407
114
0.569575
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Person', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=Fa...
true
true
1c0a5bd1c382fff39526a2cc7a1179d2b5e3f0d2
9,514
py
Python
wz/ui_modules/tab_template_fields_0.py
gradgrind/WZ
672d93a3c9d7806194d16d6d5b9175e4046bd068
[ "Apache-2.0" ]
null
null
null
wz/ui_modules/tab_template_fields_0.py
gradgrind/WZ
672d93a3c9d7806194d16d6d5b9175e4046bd068
[ "Apache-2.0" ]
null
null
null
wz/ui_modules/tab_template_fields_0.py
gradgrind/WZ
672d93a3c9d7806194d16d6d5b9175e4046bd068
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ ui/tab_template_fields.py Last updated: 2021-04-07 Show template fields, set values and process template. This module is intended primarily for testing purposes. =+LICENCE============================= Copyright 2021 Michael Towers Licensed under the Apache License, Version 2.0 (the "...
34.223022
77
0.617196
_HEIGHT_LINE = 6 COLUMNS = (40, 60) ROWS = ( 12, ) _EDIT_FIELDS = "Vorlage ausfüllen" _CLASS = "Klasse:" _TEST_FIELDS = "Felder testen" _GEN_ODT = "ODT erstellen" _GEN_PDF = "PDF erstellen" _CHOOSE_TEMPLATE = "Vorlage wählen" _FILEOPEN = "Datei öffnen" _FILESAVE = "Datei speichern" _TEMPLATE_FILE = "LibreOffice ...
true
true
1c0a5c3f3b9e18695ba76346547dfa8de3183d43
11,730
py
Python
cle/backends/elf/metaelf.py
SirEOF/cle
72726797420ea038934b4e1074853863192a54f3
[ "BSD-2-Clause" ]
2
2019-06-01T23:41:15.000Z
2020-01-21T22:08:50.000Z
cle/backends/elf/metaelf.py
SirEOF/cle
72726797420ea038934b4e1074853863192a54f3
[ "BSD-2-Clause" ]
null
null
null
cle/backends/elf/metaelf.py
SirEOF/cle
72726797420ea038934b4e1074853863192a54f3
[ "BSD-2-Clause" ]
null
null
null
import pyvex import elftools import os from .. import Backend from ...address_translator import AT from ...utils import stream_or_path from elftools.elf.descriptions import describe_ei_osabi __all__ = ('MetaELF',) class MetaELF(Backend): """ A base class that implements functions used by all backends that ca...
40.588235
118
0.554561
import pyvex import elftools import os from .. import Backend from ...address_translator import AT from ...utils import stream_or_path from elftools.elf.descriptions import describe_ei_osabi __all__ = ('MetaELF',) class MetaELF(Backend): def __init__(self, *args, **kwargs): super(MetaELF, self).__init__(...
true
true
1c0a5cf812ee06d0c49a934e31b17debf235130d
3,519
py
Python
tests/integration_tests/functional/test_cmd_line_start.py
alexggh/firecracker
7fb2e4658a6763760161909f6526aed2f02a6c9b
[ "Apache-2.0" ]
null
null
null
tests/integration_tests/functional/test_cmd_line_start.py
alexggh/firecracker
7fb2e4658a6763760161909f6526aed2f02a6c9b
[ "Apache-2.0" ]
null
null
null
tests/integration_tests/functional/test_cmd_line_start.py
alexggh/firecracker
7fb2e4658a6763760161909f6526aed2f02a6c9b
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """Tests microvm start with configuration file as command line parameter.""" import os from subprocess import run, PIPE import pytest import host_tools.logging as log_tools def _configure_vm_from_json(te...
37.83871
76
0.723501
import os from subprocess import run, PIPE import pytest import host_tools.logging as log_tools def _configure_vm_from_json(test_microvm, vm_config_file): test_microvm.create_jailed_resource(test_microvm.kernel_file, create_jail=True) test_microvm.create_jailed_resou...
true
true
1c0a5d0fff88b9387001d5c4eb6671c3bacfd751
2,179
py
Python
tests/models/symbol/setting_control_test.py
NetApp/santricity-webapi-pythonsdk
1d3df4a00561192f4cdcdd1890f4d27547ed2de2
[ "BSD-3-Clause-Clear" ]
5
2016-08-23T17:52:22.000Z
2019-05-16T08:45:30.000Z
tests/models/symbol/setting_control_test.py
NetApp/santricity-webapi-pythonsdk
1d3df4a00561192f4cdcdd1890f4d27547ed2de2
[ "BSD-3-Clause-Clear" ]
2
2016-11-10T05:30:21.000Z
2019-04-05T15:03:37.000Z
tests/models/symbol/setting_control_test.py
NetApp/santricity-webapi-pythonsdk
1d3df4a00561192f4cdcdd1890f4d27547ed2de2
[ "BSD-3-Clause-Clear" ]
7
2016-08-25T16:11:44.000Z
2021-02-22T05:31:25.000Z
#!/usr/bin/env python # coding: utf-8 """ The Clear BSD License Copyright (c) – 2016, NetApp, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions...
57.342105
845
0.773291
import unittest from netapp.santricity.models.symbol.setting_control import SettingControl class SettingControlTest(unittest.TestCase): def test_setting_control(self): setting_control_obj = SettingControl() self.assertNotEqual(setting_control_obj, None)
true
true
1c0a5d4419a322ad7d7169312e02f6df2914e82d
6,917
py
Python
scripts/djvutext.py
Rfam/rfam-pywikibot
29597ca896fddcc9910a7d962e4412eae662c0fb
[ "MIT" ]
null
null
null
scripts/djvutext.py
Rfam/rfam-pywikibot
29597ca896fddcc9910a7d962e4412eae662c0fb
[ "MIT" ]
null
null
null
scripts/djvutext.py
Rfam/rfam-pywikibot
29597ca896fddcc9910a7d962e4412eae662c0fb
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- """ This bot uploads text from djvu files onto pages in the "Page" namespace. It is intended to be used for Wikisource. The following parameters are supported: -index:... name of the index page (without the Index: prefix) -djvu:... path to the djvu file, it ...
32.172093
79
0.589273
from __future__ import absolute_import, division, unicode_literals import os.path import pywikibot from pywikibot import i18n from pywikibot.bot import SingleSiteBot from pywikibot.proofreadpage import ProofreadPage from pywikibot.tools.djvu import DjVuFile class DjVuTextBot(SingleSiteBot): def __init__(sel...
true
true
1c0a5df059896a296bef1bffeceeb651f6aea183
7,771
py
Python
fsic/util.py
Renelvon/fsic
24878074bb465f05bd0e0b1e9cff947dd73b391b
[ "MIT" ]
null
null
null
fsic/util.py
Renelvon/fsic
24878074bb465f05bd0e0b1e9cff947dd73b391b
[ "MIT" ]
null
null
null
fsic/util.py
Renelvon/fsic
24878074bb465f05bd0e0b1e9cff947dd73b391b
[ "MIT" ]
null
null
null
"""Convenient methods for general machine learning""" import numpy as np class NumpySeedContext: """ A context manager to reset the random seed by numpy.random.seed(..). Set the seed back at the end of the block. """ def __init__(self, seed): self.seed = seed self.cur_state = Non...
26.253378
142
0.609574
import numpy as np class NumpySeedContext: def __init__(self, seed): self.seed = seed self.cur_state = None def __enter__(self): rstate = np.random.get_state() self.cur_state = rstate np.random.seed(self.seed) return self def __exit__(self, *args): ...
true
true
1c0a5f3434d3697f9c1c60c6315f78287eb6f7ed
22,776
py
Python
pycti/entities/opencti_indicator.py
Sqooba/client-python
66a3ec44a28d2a0f04b38bf14efd2fe1b27fda54
[ "Apache-2.0" ]
1
2019-06-19T09:01:54.000Z
2019-06-19T09:01:54.000Z
pycti/entities/opencti_indicator.py
Sqooba/client-python
66a3ec44a28d2a0f04b38bf14efd2fe1b27fda54
[ "Apache-2.0" ]
null
null
null
pycti/entities/opencti_indicator.py
Sqooba/client-python
66a3ec44a28d2a0f04b38bf14efd2fe1b27fda54
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 import json import uuid from stix2.canonicalization.Canonicalize import canonicalize class Indicator: """Main Indicator class for OpenCTI :param opencti: instance of :py:class:`~pycti.api.opencti_api_client.OpenCTIApiClient` """ def __init__(self, opencti): self.opencti = o...
37.646281
165
0.462856
import json import uuid from stix2.canonicalization.Canonicalize import canonicalize class Indicator: def __init__(self, opencti): self.opencti = opencti self.properties = """ id standard_id entity_type parent_types spec_version ...
true
true
1c0a6213263772ba31bbf764cdde5bafcb4e824e
2,447
py
Python
gyun/cli/iaas_client/actions/s2/create_s2_group.py
gyun-gome/gyun-cli
275b6664335e2ef21a01a48f8c06d6a89dd63467
[ "Apache-2.0" ]
null
null
null
gyun/cli/iaas_client/actions/s2/create_s2_group.py
gyun-gome/gyun-cli
275b6664335e2ef21a01a48f8c06d6a89dd63467
[ "Apache-2.0" ]
null
null
null
gyun/cli/iaas_client/actions/s2/create_s2_group.py
gyun-gome/gyun-cli
275b6664335e2ef21a01a48f8c06d6a89dd63467
[ "Apache-2.0" ]
null
null
null
# encoding: utf-8 # ========================================================================= # ©2017-2018 北京国美云服科技有限公司 # ------------------------------------------------------------------------- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this work except in compliance with the ...
41.474576
77
0.543931
from gyun.cli.iaas_client.actions.base import BaseAction class CreateS2GroupAction(BaseAction): action = 'CreateS2Group' command = 'create-s2-group' usage = '%(prog)s -T <group_type> [-n <group_name> ...] [-f <conf_file>]' @classmethod def add_ext_arguments(cls, parser): parser.add_argume...
true
true
1c0a62f4d3f408c2cd6f81c89bf2f78447f0542c
1,603
py
Python
opendeep/data/tests/test_dataset_file.py
vitruvianscience/OpenDeep
e96efc449101094354b615cf15afe6d03644fc36
[ "Apache-2.0" ]
252
2015-03-13T21:55:22.000Z
2021-09-06T21:37:38.000Z
opendeep/data/tests/test_dataset_file.py
afcarl/OpenDeep
e96efc449101094354b615cf15afe6d03644fc36
[ "Apache-2.0" ]
16
2015-03-14T06:47:04.000Z
2016-09-23T19:13:35.000Z
opendeep/data/tests/test_dataset_file.py
afcarl/OpenDeep
e96efc449101094354b615cf15afe6d03644fc36
[ "Apache-2.0" ]
68
2015-03-14T00:05:53.000Z
2020-06-04T13:36:13.000Z
# standard libraries import unittest import logging import os import shutil # third party import numpy # internal references from opendeep.data.dataset_file import FileDataset from opendeep.utils.file_ops import mkdir_p class TestFileDataset(unittest.TestCase): def setUp(self): # get a logger for this se...
32.06
114
0.622583
import unittest import logging import os import shutil import numpy from opendeep.data.dataset_file import FileDataset from opendeep.utils.file_ops import mkdir_p class TestFileDataset(unittest.TestCase): def setUp(self): self.log = logging.getLogger(__name__) self.dir = "filedataset_test...
true
true
1c0a63a00b9cf0e0fe8115f95009fa276862aac9
5,618
py
Python
ansible/module_utils/dellos10.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
1
2022-01-25T22:52:58.000Z
2022-01-25T22:52:58.000Z
ansible/module_utils/dellos10.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
ansible/module_utils/dellos10.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
# # (c) 2015 Peter Sprygada, <psprygada@ansible.com> # (c) 2017 Red Hat, Inc # # Copyright (c) 2016 Dell Inc. # # This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamica...
38.744828
120
0.696689
import re from ansible.module_utils._text import to_text from ansible.module_utils.basic import env_fallback, return_values from ansible.module_utils.network_common import to_list, ComplexList from ansible.module_utils.connection import exec_command from ansible.module_utils.netcfg import NetworkConfig, ConfigLine _D...
true
true
1c0a63d7be4f4a3abf10ee4ac08399f98b5efab4
13,796
py
Python
isomut2py/format.py
pipekorsi/IsoMut2
f45f125f79e6ebef218be349aaf5897301e121d1
[ "MIT" ]
null
null
null
isomut2py/format.py
pipekorsi/IsoMut2
f45f125f79e6ebef218be349aaf5897301e121d1
[ "MIT" ]
null
null
null
isomut2py/format.py
pipekorsi/IsoMut2
f45f125f79e6ebef218be349aaf5897301e121d1
[ "MIT" ]
1
2021-03-14T03:02:13.000Z
2021-03-14T03:02:13.000Z
try: from isomut2py import ploidyestimation import pandas as __pd import numpy as __np import os as __os import subprocess as __subprocess except ImportError: print('ImportError in isomut2py.format, generating bed files will not work.') def get_bed_format_for_sample(chromosomes, chrom_length,...
57.723849
321
0.574369
try: from isomut2py import ploidyestimation import pandas as __pd import numpy as __np import os as __os import subprocess as __subprocess except ImportError: print('ImportError in isomut2py.format, generating bed files will not work.') def get_bed_format_for_sample(chromosomes, chrom_length,...
true
true
1c0a65193b670996faf3143aba3a522b8718b254
12,676
py
Python
OHRE/load_cluster_louvain.py
thunlp/OHRE
5d4aeb37ec8fb90364b555cd63438d5620780433
[ "MIT" ]
16
2021-04-12T10:04:30.000Z
2022-03-17T08:18:33.000Z
OHRE/load_cluster_louvain.py
thunlp/OHRE
5d4aeb37ec8fb90364b555cd63438d5620780433
[ "MIT" ]
2
2021-06-01T20:53:05.000Z
2021-09-01T02:35:39.000Z
OHRE/load_cluster_louvain.py
thunlp/OHRE
5d4aeb37ec8fb90364b555cd63438d5620780433
[ "MIT" ]
null
null
null
""" Louvain no isolation first then inserting. """ import numpy as np import json import sys import os import argparse import pickle sys.path.append(os.path.abspath('../lib/')) from dataloader.dataloader import dataloader from model.siamodel import RSN from module.semiclusters import prepare_cluster_list, \ Top_D...
52.59751
166
0.694225
import numpy as np import json import sys import os import argparse import pickle sys.path.append(os.path.abspath('../lib/')) from dataloader.dataloader import dataloader from model.siamodel import RSN from module.semiclusters import prepare_cluster_list, \ Top_Down_Louvain_with_test_cluster_done_avg_link_list, T...
true
true
1c0a694df5f03392ab13d19b8acdd66e1822488e
995
py
Python
var/spack/repos/builtin/packages/cgl/package.py
robertodr/spack
9b809e01b47d48f01b3d257912fe1b752943cd3d
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
9
2018-04-18T07:51:40.000Z
2021-09-10T03:56:57.000Z
var/spack/repos/builtin/packages/cgl/package.py
robertodr/spack
9b809e01b47d48f01b3d257912fe1b752943cd3d
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
907
2018-04-18T11:17:57.000Z
2022-03-31T13:20:25.000Z
var/spack/repos/builtin/packages/cgl/package.py
robertodr/spack
9b809e01b47d48f01b3d257912fe1b752943cd3d
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
29
2018-11-05T16:14:23.000Z
2022-02-03T16:07:09.000Z
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Cgl(AutotoolsPackage): """The COIN-OR Cut Generation Library (Cgl) is a collection of cut ...
36.851852
96
0.731658
from spack import * class Cgl(AutotoolsPackage): homepage = "https://projects.coin-or.org/Cgl" url = "https://github.com/coin-or/Cgl/archive/releases/0.60.3.tar.gz" depends_on('coinutils') depends_on('osi') depends_on('clp') version('0.60.3', sha256='cfeeedd68feab7c0ce377eb9c7b6171512...
true
true
1c0a6a5ff192d61e1b6f8187cda5a1419a5bb8b2
551
py
Python
graphs.py
utkarshohm/mutual-fund-models
04cdf720fd31330adeb84d532fa9e3877333ed21
[ "MIT" ]
62
2017-05-14T05:39:19.000Z
2022-03-01T18:17:47.000Z
models/graphs.py
arwy1213/mf-platform-bse
4a20cd9e2c58586fddcfb68957604553be73797a
[ "MIT" ]
10
2017-12-25T15:54:23.000Z
2022-02-05T04:40:16.000Z
models/graphs.py
arwy1213/mf-platform-bse
4a20cd9e2c58586fddcfb68957604553be73797a
[ "MIT" ]
43
2017-05-14T06:32:36.000Z
2022-03-19T23:58:32.000Z
from django.db import models from mongoengine import * class FundTimeSeries(Document): ''' Stores time series of nav data of funds ''' scheme_id = IntField() scheme_name = StringField() nav_data = ListField() start_date = DateTimeField() end_date = DateTimeField() class IndexTimeSeries(Document): ''' St...
19
78
0.729583
from django.db import models from mongoengine import * class FundTimeSeries(Document): scheme_id = IntField() scheme_name = StringField() nav_data = ListField() start_date = DateTimeField() end_date = DateTimeField() class IndexTimeSeries(Document): index_id = IntField() index_name = StringField() data =...
true
true
1c0a6b7bf41a5e50556cfd22e6fc91ee5ff016a8
2,183
py
Python
ptsemseg/models/unet.py
czha5168/pytorch-semseg
10e7b2d199bb6245fde3d1557632d8ee1ebac663
[ "MIT" ]
28
2019-04-30T05:05:33.000Z
2021-07-15T08:04:28.000Z
ptsemseg/models/unet.py
linxi159/Pytorch-Semseg
5cd845f1c911ab6ee4cbc6a3ce90f01229326fab
[ "MIT" ]
3
2019-10-18T07:50:22.000Z
2021-02-17T16:10:41.000Z
ptsemseg/models/unet.py
linxi159/Pytorch-Semseg
5cd845f1c911ab6ee4cbc6a3ce90f01229326fab
[ "MIT" ]
7
2019-07-29T02:48:15.000Z
2020-11-23T13:22:49.000Z
import torch.nn as nn from ptsemseg.models.utils import * class unet(nn.Module): def __init__( self, feature_scale=4, n_classes=21, is_deconv=True, in_channels=3, is_batchnorm=True, ): super(unet, self).__init__() self.is_deconv = is_deconv ...
31.185714
79
0.628035
import torch.nn as nn from ptsemseg.models.utils import * class unet(nn.Module): def __init__( self, feature_scale=4, n_classes=21, is_deconv=True, in_channels=3, is_batchnorm=True, ): super(unet, self).__init__() self.is_deconv = is_deconv ...
true
true
1c0a6cfa7e41d696af2b6848431ea9c24ed85349
1,495
py
Python
last few python scripts/rotor no rotor analysis.py
pm2111/Heart-Defibrillation-Project
48ea3570c360aac7c3ff46354891998f4f364fab
[ "MIT" ]
null
null
null
last few python scripts/rotor no rotor analysis.py
pm2111/Heart-Defibrillation-Project
48ea3570c360aac7c3ff46354891998f4f364fab
[ "MIT" ]
null
null
null
last few python scripts/rotor no rotor analysis.py
pm2111/Heart-Defibrillation-Project
48ea3570c360aac7c3ff46354891998f4f364fab
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt import os from scipy import signal path = "/Users/petermarinov/msci project/all code/ecg rotor no rotor/rotor data more than 800 excited cells/" filenames = [] for f in os.listdir(path): if not f.startswith('.'): if f.endswith("txt"): filenam...
26.696429
109
0.583946
import numpy as np import matplotlib.pyplot as plt import os from scipy import signal path = "/Users/petermarinov/msci project/all code/ecg rotor no rotor/rotor data more than 800 excited cells/" filenames = [] for f in os.listdir(path): if not f.startswith('.'): if f.endswith("txt"): filenam...
false
true
1c0a6dca691ee9daa9bbfd8dd49c01a9206b8b56
1,905
py
Python
zeeguu/api/api/smartwatch.py
mircealungu/Zeeguu-API-2
1e8ea7f5dd0b883ed2d714b9324162b1a8edd170
[ "MIT" ]
8
2018-02-06T15:47:55.000Z
2021-05-26T15:24:49.000Z
zeeguu/api/api/smartwatch.py
mircealungu/Zeeguu-API-2
1e8ea7f5dd0b883ed2d714b9324162b1a8edd170
[ "MIT" ]
57
2018-02-02T19:54:38.000Z
2021-07-15T15:45:15.000Z
zeeguu/api/api/smartwatch.py
mircealungu/Zeeguu-API-2
1e8ea7f5dd0b883ed2d714b9324162b1a8edd170
[ "MIT" ]
13
2017-10-12T09:05:19.000Z
2020-02-19T09:38:01.000Z
import json from datetime import datetime import flask from flask import request import zeeguu.core from . import api, db_session from .utils.json_result import json_result from .utils.route_wrappers import cross_domain, with_session from zeeguu.core.model import WatchInteractionEvent, WatchEventType @api.route("/up...
26.458333
71
0.63937
import json from datetime import datetime import flask from flask import request import zeeguu.core from . import api, db_session from .utils.json_result import json_result from .utils.route_wrappers import cross_domain, with_session from zeeguu.core.model import WatchInteractionEvent, WatchEventType @api.route("/up...
true
true
1c0a6ee95a5c3d20203c277a14841f970b8c97ed
11,483
py
Python
lib/rucio/tests/test_rse_expression_parser.py
elichad/rucio
0705e4124e18c853c4661f85e00238cb0c6bd750
[ "Apache-2.0" ]
null
null
null
lib/rucio/tests/test_rse_expression_parser.py
elichad/rucio
0705e4124e18c853c4661f85e00238cb0c6bd750
[ "Apache-2.0" ]
null
null
null
lib/rucio/tests/test_rse_expression_parser.py
elichad/rucio
0705e4124e18c853c4661f85e00238cb0c6bd750
[ "Apache-2.0" ]
null
null
null
# Copyright European Organization for Nuclear Research (CERN) # # 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 # # Authors: # - Martin Barisits, <m...
51.493274
226
0.696682
from random import choice from string import ascii_uppercase, digits, ascii_lowercase from nose.tools import assert_equal, raises, assert_raises from rucio.core import rse from rucio.core import rse_expression_parser from rucio.client.rseclient import RSEClient from rucio.common.exception import InvalidRSEExpression...
true
true
1c0a6f4115820e08e92cd513e29f8f449d3b6315
153,546
py
Python
dearpypixl/appitems/basic.py
Atlamillias/pixl-engine
c4217a3a65e01e49d05bf7f07946d65484f6e1da
[ "MIT" ]
6
2021-08-28T03:22:19.000Z
2021-10-14T22:04:04.000Z
dearpypixl/appitems/basic.py
Atlamillias/pixl-engine
c4217a3a65e01e49d05bf7f07946d65484f6e1da
[ "MIT" ]
1
2021-07-29T16:51:28.000Z
2021-08-03T00:24:11.000Z
dearpypixl/appitems/basic.py
Atlamillias/pixl-engine
c4217a3a65e01e49d05bf7f07946d65484f6e1da
[ "MIT" ]
null
null
null
from typing import ( Callable, Any, Union, Dict, Tuple, Set, List, ) from dearpygui import dearpygui from dearpypixl.components import * ################################################## ####### NOTE: This file is auto-generated. ####### ################################################## ...
89.583431
315
0.428608
from typing import ( Callable, Any, Union, Dict, Tuple, Set, List, ) from dearpygui import dearpygui from dearpypixl.components import * __all__ = [ "RadioButton", "Listbox", "Checkbox", "Button", "Selectable", "Combo", "InputText", "SliderFloat", "DragF...
true
true
1c0a7015ffa786d095e4a3179feecd81d0598ef7
17,492
py
Python
vortexasdk/endpoints/voyages_top_hits.py
V0RT3X4/python-sdk
4cffae83b90a58a56f1a534057fa1ca1c8671e05
[ "Apache-2.0" ]
9
2019-11-13T17:14:55.000Z
2019-11-18T16:06:13.000Z
vortexasdk/endpoints/voyages_top_hits.py
V0RT3X4/python-sdk
4cffae83b90a58a56f1a534057fa1ca1c8671e05
[ "Apache-2.0" ]
84
2019-11-14T16:57:12.000Z
2020-01-06T04:00:21.000Z
vortexasdk/endpoints/voyages_top_hits.py
V0RT3X4/python-sdk
4cffae83b90a58a56f1a534057fa1ca1c8671e05
[ "Apache-2.0" ]
null
null
null
""" Try me out in your browser: [![Binder](https://img.shields.io/badge/try%20me%20out-launch%20notebook-579ACA.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFkAAABZCAMAAABi1XidAAAB8lBMVEX///9XmsrmZYH1olJXmsr1olJXmsrmZYH1olJXmsr1olJXmsrmZYH1olL1olJXmsr1olJXmsrmZYH1olL1olJXmsrmZYH1olJXmsr1olL1olJXmsrmZYH1olL1...
55.35443
2,576
0.697519
from datetime import datetime from typing import List, Union from vortexasdk.api import ID from vortexasdk.api.shared_types import Tag, to_ISODate from vortexasdk.endpoints.aggregation_breakdown_result import AggregationBreakdownResult from vortexasdk.endpoints.endpoints import VOYAGES_TOP_HITS from vortexasdk.operat...
true
true
1c0a70aaac64abffa9c911a9f08095f39eb64d82
2,528
py
Python
input_picker/obj.py
Cologler/input-picker-python
30dc2b4f189d2dc764c706d64a51903a521eeeb1
[ "MIT" ]
null
null
null
input_picker/obj.py
Cologler/input-picker-python
30dc2b4f189d2dc764c706d64a51903a521eeeb1
[ "MIT" ]
null
null
null
input_picker/obj.py
Cologler/input-picker-python
30dc2b4f189d2dc764c706d64a51903a521eeeb1
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2017~2999 - cologler <skyoflw@gmail.com> # ---------- # # ---------- import os import io from .common import Option, ExceptionOption, Picker, Stop, Help def pick_method(obj: object, *, allow_none: bool=True, raise_on_help: bool=True, ...
29.741176
76
0.517009
import os import io from .common import Option, ExceptionOption, Picker, Stop, Help def pick_method(obj: object, *, allow_none: bool=True, raise_on_help: bool=True, include_doc: bool=True) -> callable: if obj is None: raise ValueError('obj cannot be None') is_class = isinstanc...
true
true
1c0a72ca06eec3157b094fc3370dc62fcd17b105
1,144
py
Python
model-optimizer/extensions/front/caffe/lrn_ext.py
anton-potapov/openvino
84119afe9a8c965e0a0cd920fff53aee67b05108
[ "Apache-2.0" ]
2
2020-11-18T14:14:06.000Z
2020-11-28T04:55:57.000Z
model-optimizer/extensions/front/caffe/lrn_ext.py
anton-potapov/openvino
84119afe9a8c965e0a0cd920fff53aee67b05108
[ "Apache-2.0" ]
30
2020-11-13T11:44:07.000Z
2022-02-21T13:03:16.000Z
model-optimizer/extensions/front/caffe/lrn_ext.py
mmakridi/openvino
769bb7709597c14debdaa356dd60c5a78bdfa97e
[ "Apache-2.0" ]
3
2021-03-09T08:27:29.000Z
2021-04-07T04:58:54.000Z
""" Copyright (C) 2018-2020 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 i...
30.918919
73
0.684441
from mo.front.extractor import FrontExtractorOp from mo.ops.lrn import AttributedLRN class LRNExtractor(FrontExtractorOp): op = 'LRN' enabled = True @classmethod def extract(cls, node): param = node.pb.lrn_param region = 'same' if param.norm_region == 1 else 'across' Attribut...
true
true
1c0a73031b19879cdb52d55dc7a333b85f98db3d
3,520
py
Python
src/azure-cli-core/setup.py
ziwa-msft/azure-cli
ab38e95f07a98d189649505188e493de326617cc
[ "MIT" ]
1
2020-12-14T15:30:11.000Z
2020-12-14T15:30:11.000Z
src/azure-cli-core/setup.py
ziwa-msft/azure-cli
ab38e95f07a98d189649505188e493de326617cc
[ "MIT" ]
1
2021-06-02T00:24:55.000Z
2021-06-02T00:24:55.000Z
src/azure-cli-core/setup.py
ziwa-msft/azure-cli
ab38e95f07a98d189649505188e493de326617cc
[ "MIT" ]
1
2020-12-14T15:30:14.000Z
2020-12-14T15:30:14.000Z
#!/usr/bin/env python # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # ---------------------------------------------...
30.344828
94
0.591193
from __future__ import print_function from codecs import open from setuptools import setup try: from azure_bdist_wheel import cmdclass except ImportError: from distutils import log as logger logger.warn("Wheel is not available, disabling bdist_wheel hook") cmdclass = {} VERSION = "2.0.73" try: ...
true
true
1c0a7388eb1bf5619bf79439e97b6fe1e9c648ed
2,182
py
Python
tests/dot11/test_FrameControlPSPoll.py
addenial/impacket
8a545b0b81ac65069e547b6ddb08fce289ed9f87
[ "Apache-1.1" ]
61
2020-07-23T14:07:59.000Z
2021-11-24T14:15:57.000Z
tests/dot11/test_FrameControlPSPoll.py
addenial/impacket
8a545b0b81ac65069e547b6ddb08fce289ed9f87
[ "Apache-1.1" ]
5
2019-10-21T19:59:01.000Z
2020-05-27T21:42:04.000Z
tests/dot11/test_FrameControlPSPoll.py
addenial/impacket
8a545b0b81ac65069e547b6ddb08fce289ed9f87
[ "Apache-1.1" ]
13
2020-07-24T03:14:14.000Z
2022-01-06T14:18:24.000Z
#!/usr/bin/env python # sorry, this is very ugly, but I'm in python 2.5 import sys sys.path.insert(0,"../..") from impacket.dot11 import Dot11,Dot11Types,Dot11ControlFramePSPoll import unittest class TestDot11FrameControlPSPoll(unittest.TestCase): def setUp(self): # 802.11 Control Frame PSPoll se...
34.09375
107
0.654445
import sys sys.path.insert(0,"../..") from impacket.dot11 import Dot11,Dot11Types,Dot11ControlFramePSPoll import unittest class TestDot11FrameControlPSPoll(unittest.TestCase): def setUp(self): # 802.11 Control Frame PSPoll self.frame_orig=b'\xa6\x73\xf1\xaf\x48\x06\xee\x23\x2b\xc9\xfe\xbe\xe5\x05...
true
true
1c0a73ac630c5b2ec3a22a10765696d59ce78458
2,027
py
Python
tests/common/test_run/distr_bernoulli_logprob_run.py
laekov/akg
5316b8cb2340bbf71bdc724dc9d81513a67b3104
[ "Apache-2.0" ]
1
2020-08-31T02:43:43.000Z
2020-08-31T02:43:43.000Z
tests/common/test_run/distr_bernoulli_logprob_run.py
laekov/akg
5316b8cb2340bbf71bdc724dc9d81513a67b3104
[ "Apache-2.0" ]
null
null
null
tests/common/test_run/distr_bernoulli_logprob_run.py
laekov/akg
5316b8cb2340bbf71bdc724dc9d81513a67b3104
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
41.367347
107
0.721263
import numpy as np from tensorio import compare_tensor from akg.utils import kernel_exec as utils from test_op.prob_program.distribution import bernoulli as akg_bernoulli from scipy.stats import bernoulli, uniform from numpy.random import seed import sys def log_prob_op(x, probs): return akg_bernoulli.bernoulli(pro...
true
true
1c0a73e6b8fdd860efe53cb1bf6b54c722f7ce76
7,495
py
Python
test_anystrenum.py
MrMrRobat/AnyStrEnum
2766d61e7edfdefff1680317c780e689ff3c488d
[ "MIT" ]
4
2019-06-26T16:01:18.000Z
2021-05-07T03:43:10.000Z
test_anystrenum.py
MrMrRobat/AnyStrEnum
2766d61e7edfdefff1680317c780e689ff3c488d
[ "MIT" ]
null
null
null
test_anystrenum.py
MrMrRobat/AnyStrEnum
2766d61e7edfdefff1680317c780e689ff3c488d
[ "MIT" ]
null
null
null
from enum import auto, IntEnum, Enum import pytest from anystrenum import StrEnum, BaseAnyStrEnum, BytesEnum, AnyStrEnumMeta, auto_str, StrItem, BytesItem from anystrenum.inflected import CamelizeByteEnum, CamelizeStrEnum class Weekday(StrEnum): monday: str tuesday: str wednesday: str thursday: str ...
30.591837
119
0.707538
from enum import auto, IntEnum, Enum import pytest from anystrenum import StrEnum, BaseAnyStrEnum, BytesEnum, AnyStrEnumMeta, auto_str, StrItem, BytesItem from anystrenum.inflected import CamelizeByteEnum, CamelizeStrEnum class Weekday(StrEnum): monday: str tuesday: str wednesday: str thursday: str ...
true
true
1c0a74c803eced8810f06e8588895124ebfb2b74
15,290
py
Python
va_explorer/va_data_management/tests/test_views.py
VA-Explorer/va_explorer
e43cfbff0ce5209c12134b7ac4ce439db6fc87a2
[ "Apache-2.0" ]
null
null
null
va_explorer/va_data_management/tests/test_views.py
VA-Explorer/va_explorer
e43cfbff0ce5209c12134b7ac4ce439db6fc87a2
[ "Apache-2.0" ]
125
2020-10-07T12:00:15.000Z
2022-03-31T21:29:21.000Z
va_explorer/va_data_management/tests/test_views.py
VA-Explorer/va_explorer
e43cfbff0ce5209c12134b7ac4ce439db6fc87a2
[ "Apache-2.0" ]
2
2020-10-29T16:08:42.000Z
2020-12-08T19:03:41.000Z
import pytest from django.test import Client from django.contrib.auth.models import Permission from va_explorer.users.models import User from va_explorer.va_data_management.models import VerbalAutopsy from va_explorer.tests.factories import GroupFactory, VerbalAutopsyFactory, UserFactory, LocationFactory, \ FieldWo...
48.694268
157
0.745716
import pytest from django.test import Client from django.contrib.auth.models import Permission from va_explorer.users.models import User from va_explorer.va_data_management.models import VerbalAutopsy from va_explorer.tests.factories import GroupFactory, VerbalAutopsyFactory, UserFactory, LocationFactory, \ FieldWo...
true
true
1c0a75a44ab6137d4b2e89e49301ea05ea903900
3,383
py
Python
verde/tests/test_coordinates.py
djhoese/verde
ad14acf94717ee5c6672559f40576f65989753a5
[ "BSD-3-Clause" ]
null
null
null
verde/tests/test_coordinates.py
djhoese/verde
ad14acf94717ee5c6672559f40576f65989753a5
[ "BSD-3-Clause" ]
null
null
null
verde/tests/test_coordinates.py
djhoese/verde
ad14acf94717ee5c6672559f40576f65989753a5
[ "BSD-3-Clause" ]
null
null
null
""" Test the coordinate generation functions """ import pytest import numpy.testing as npt from ..coordinates import ( check_region, spacing_to_shape, profile_coordinates, grid_coordinates, ) def test_spacing_to_shape(): "Check that correct spacing and region are returned" region = (-10, 0, 0...
34.171717
86
0.67987
import pytest import numpy.testing as npt from ..coordinates import ( check_region, spacing_to_shape, profile_coordinates, grid_coordinates, ) def test_spacing_to_shape(): region = (-10, 0, 0, 5) shape, new_region = spacing_to_shape(region, spacing=2.5, adjust="spacing") npt.assert_allcl...
true
true
1c0a75b069fb12d02652d760b5c96db00dc28b3e
1,520
py
Python
sphinx/parsers.py
merwok-forks/sphinx
b7cada236f765003a73ab5dca48f975d54c0c298
[ "BSD-2-Clause" ]
null
null
null
sphinx/parsers.py
merwok-forks/sphinx
b7cada236f765003a73ab5dca48f975d54c0c298
[ "BSD-2-Clause" ]
null
null
null
sphinx/parsers.py
merwok-forks/sphinx
b7cada236f765003a73ab5dca48f975d54c0c298
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ sphinx.parsers ~~~~~~~~~~~~~~ A Base class for additional parsers. :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import docutils.parsers if False: # For type annotation from sphinx.application impo...
30.4
93
0.657895
import docutils.parsers if False: from sphinx.application import Sphinx class Parser(docutils.parsers.Parser): def set_application(self, app): self.app = app self.config = app.config self.env = app.env self.warn = app.warn self.info = app.info
true
true
1c0a76c34db684c42c4c7bfa137d3dde87a744fc
4,089
py
Python
test/functional/p2p_feefilter.py
rebitcoin/rebitcoin
87a39edad2362c3f196a98d4703f6f23cde9c13e
[ "MIT" ]
1
2019-12-05T08:16:41.000Z
2019-12-05T08:16:41.000Z
test/functional/p2p_feefilter.py
rebitcoin/rebitcoin
87a39edad2362c3f196a98d4703f6f23cde9c13e
[ "MIT" ]
null
null
null
test/functional/p2p_feefilter.py
rebitcoin/rebitcoin
87a39edad2362c3f196a98d4703f6f23cde9c13e
[ "MIT" ]
1
2020-11-04T06:59:41.000Z
2020-11-04T06:59:41.000Z
#!/usr/bin/env python3 # Copyright (c) 2016-2019 The ReBitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test processing of feefilter messages.""" from decimal import Decimal import time from test_framewo...
38.942857
96
0.667889
from decimal import Decimal import time from test_framework.messages import msg_feefilter from test_framework.mininode import mininode_lock, P2PInterface from test_framework.test_framework import ReBitcoinTestFramework def hashToHex(hash): return format(hash, '064x') def allInvsMatch(invsExpected, testnode): ...
true
true
1c0a76d7497af8a6fb4c05a7967bececf70169f2
1,653
py
Python
bets/management/commands/checkbets.py
Thames1990/BadBatBets
8dffb69561668b8991bf4103919e4b254d4ca56a
[ "MIT" ]
null
null
null
bets/management/commands/checkbets.py
Thames1990/BadBatBets
8dffb69561668b8991bf4103919e4b254d4ca56a
[ "MIT" ]
null
null
null
bets/management/commands/checkbets.py
Thames1990/BadBatBets
8dffb69561668b8991bf4103919e4b254d4ca56a
[ "MIT" ]
null
null
null
import logging from django.core.management.base import BaseCommand from django.utils import timezone from ...models import ChoiceBet, DateBet from ...util import resolve_bet from bets.exceptions import NoPlacedBets class Command(BaseCommand): help = 'Checks all bets, marks them as resolved if required and distr...
44.675676
118
0.557774
import logging from django.core.management.base import BaseCommand from django.utils import timezone from ...models import ChoiceBet, DateBet from ...util import resolve_bet from bets.exceptions import NoPlacedBets class Command(BaseCommand): help = 'Checks all bets, marks them as resolved if required and distr...
true
true
1c0a7710c23a2bdeb9689168132877e7f6b1ccc6
3,058
py
Python
socr/text/dataset/iam_oneline_handwriting_database.py
belosthomas/socr
d78d9468061129922d5a592bb5687918e90efc5e
[ "MIT" ]
5
2018-07-31T20:26:22.000Z
2019-05-07T16:36:23.000Z
socr/text/dataset/iam_oneline_handwriting_database.py
belosthomas/socr
d78d9468061129922d5a592bb5687918e90efc5e
[ "MIT" ]
1
2019-05-07T18:21:59.000Z
2020-09-18T10:45:39.000Z
socr/text/dataset/iam_oneline_handwriting_database.py
belosthomas/socr
d78d9468061129922d5a592bb5687918e90efc5e
[ "MIT" ]
null
null
null
import os import torch from PIL import Image from torch.utils.data.dataset import Dataset from socr.utils.image import image_pillow_to_numpy class IAMOneLineHandwritingDatabase(Dataset): def __init__(self, helper, path, height=48, labels="", transform=True, loss=None): self.height = height self...
31.854167
127
0.545782
import os import torch from PIL import Image from torch.utils.data.dataset import Dataset from socr.utils.image import image_pillow_to_numpy class IAMOneLineHandwritingDatabase(Dataset): def __init__(self, helper, path, height=48, labels="", transform=True, loss=None): self.height = height self...
true
true
1c0a778a2dec71e2a335695632acdc9baeb7e089
1,745
py
Python
setup.py
schettino72/sqla_yaml_fixtures
2aba7d7c11855019e66267cea937f6deadc2194d
[ "MIT" ]
14
2017-06-14T14:41:25.000Z
2021-02-20T09:01:37.000Z
setup.py
schettino72/sqla_yaml_fixtures
2aba7d7c11855019e66267cea937f6deadc2194d
[ "MIT" ]
20
2017-06-17T19:12:47.000Z
2021-03-29T03:56:58.000Z
setup.py
schettino72/sqla_yaml_fixtures
2aba7d7c11855019e66267cea937f6deadc2194d
[ "MIT" ]
7
2017-06-17T19:02:54.000Z
2021-03-22T10:01:10.000Z
from __future__ import print_function from setuptools import setup import sys # Assume pip is new enough pip_message = None try: import pip pip_version = tuple([int(x) for x in pip.__version__.split('.')[:3]]) if pip_version < (9, 0, 1) : pip_message = 'Your pip version is out of date, please insta...
29.083333
91
0.612607
from __future__ import print_function from setuptools import setup import sys pip_message = None try: import pip pip_version = tuple([int(x) for x in pip.__version__.split('.')[:3]]) if pip_version < (9, 0, 1) : pip_message = 'Your pip version is out of date, please install pip >= 9.0.1. '\ ...
true
true
1c0a779b254c2c88bf34b3e97f75cd972b6f472c
300
py
Python
fabric_bolt/task_runners/channels/routing.py
jooni22/fabric-bolt
129d83036f84018b62624794d2cbf9cca80ab210
[ "MIT" ]
219
2015-08-16T15:36:50.000Z
2021-11-15T09:38:54.000Z
fabric_bolt/task_runners/channels/routing.py
jooni22/fabric-bolt
129d83036f84018b62624794d2cbf9cca80ab210
[ "MIT" ]
76
2015-08-12T14:49:09.000Z
2022-03-11T23:20:33.000Z
fabric_bolt/task_runners/channels/routing.py
jooni22/fabric-bolt
129d83036f84018b62624794d2cbf9cca80ab210
[ "MIT" ]
67
2015-08-18T11:04:41.000Z
2021-01-10T13:46:42.000Z
from channels.routing import route from . import consumers channel_routing = [ route("websocket.connect", consumers.ws_connect), # route("websocket.receive", consumers.ws_receive), route("websocket.disconnect", consumers.ws_disconnect), route("start_task", consumers.start_task), ]
27.272727
59
0.746667
from channels.routing import route from . import consumers channel_routing = [ route("websocket.connect", consumers.ws_connect), route("websocket.disconnect", consumers.ws_disconnect), route("start_task", consumers.start_task), ]
true
true
1c0a783c1005ed66735b4122c83ac13045d4fc20
3,462
py
Python
codes/Project2/crop_image.py
chriszhenghaochen/USYD_ELEC5306
905452048a7a1bf6d2f07c187becb58862529c00
[ "BSD-4-Clause-UC" ]
2
2020-08-10T07:58:26.000Z
2020-08-10T07:58:28.000Z
codes/Project2/crop_image.py
chriszhenghaochen/USYD_ELEC5306
905452048a7a1bf6d2f07c187becb58862529c00
[ "BSD-4-Clause-UC" ]
null
null
null
codes/Project2/crop_image.py
chriszhenghaochen/USYD_ELEC5306
905452048a7a1bf6d2f07c187becb58862529c00
[ "BSD-4-Clause-UC" ]
null
null
null
from torch.utils.data import Dataset import os import PIL.Image as Image import numpy as np import cv2 def get_full_name_list(list_name, stage_flag): full_image_list = [] with open(list_name) as f: image_list = f.readlines() if stage_flag == 'train': str_print = 'len(train_image_list):' ...
45.552632
103
0.662045
from torch.utils.data import Dataset import os import PIL.Image as Image import numpy as np import cv2 def get_full_name_list(list_name, stage_flag): full_image_list = [] with open(list_name) as f: image_list = f.readlines() if stage_flag == 'train': str_print = 'len(train_image_list):' ...
true
true
1c0a78648d3413468ca450fac7d9f14dedc36051
2,217
py
Python
Spectroscopy/archetype/allinonespec.py
guangtunbenzhu/BGT-Cosmology
2dbedfb6ead3ecd2f43a2716cfd388a5a65979ee
[ "MIT" ]
1
2018-06-17T14:42:52.000Z
2018-06-17T14:42:52.000Z
Spectroscopy/archetype/allinonespec.py
guangtunbenzhu/BGT-Cosmology
2dbedfb6ead3ecd2f43a2716cfd388a5a65979ee
[ "MIT" ]
null
null
null
Spectroscopy/archetype/allinonespec.py
guangtunbenzhu/BGT-Cosmology
2dbedfb6ead3ecd2f43a2716cfd388a5a65979ee
[ "MIT" ]
null
null
null
""" """ from __future__ import print_function, division import numpy as np import fitsio import datapath from os.path import isfile, join from specutils import get_loglam # allinone utils def allinone_wave_filename(): path = datapath.allinone_path() filename = 'AIO_CommonWave.fits' return join(path, ...
28.423077
111
0.619756
from __future__ import print_function, division import numpy as np import fitsio import datapath from os.path import isfile, join from specutils import get_loglam def allinone_wave_filename(): path = datapath.allinone_path() filename = 'AIO_CommonWave.fits' return join(path, filename) def allinone_wa...
true
true
1c0a78c0d366362ac5657059afb2011d9f2f7628
7,096
py
Python
next_builder_sdk/model/monitor_config/app_health_config_pb2.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
5
2019-07-31T04:11:05.000Z
2021-01-07T03:23:20.000Z
next_builder_sdk/model/monitor_config/app_health_config_pb2.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
null
null
null
next_builder_sdk/model/monitor_config/app_health_config_pb2.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: app_health_config.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.pr...
50.685714
799
0.77438
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db = _s...
true
true
1c0a792eff87ee378297c15ba02fd5a833d43191
1,691
py
Python
neighbor/models.py
JamesMusyoka/Neighborhood-IP2
6f4f63f5a2374fdf1b386bc332c895e012f34513
[ "Unlicense" ]
null
null
null
neighbor/models.py
JamesMusyoka/Neighborhood-IP2
6f4f63f5a2374fdf1b386bc332c895e012f34513
[ "Unlicense" ]
null
null
null
neighbor/models.py
JamesMusyoka/Neighborhood-IP2
6f4f63f5a2374fdf1b386bc332c895e012f34513
[ "Unlicense" ]
null
null
null
from django.db import models from django.contrib.auth.models import User import datetime as dt class Neighborhood(models.Model): neighborhood_name = models.CharField(max_length=50) neighborhood_location = models.CharField(max_length=50, null=True) occupants = models.IntegerField(null=True) user = model...
26.015385
74
0.7055
from django.db import models from django.contrib.auth.models import User import datetime as dt class Neighborhood(models.Model): neighborhood_name = models.CharField(max_length=50) neighborhood_location = models.CharField(max_length=50, null=True) occupants = models.IntegerField(null=True) user = model...
true
true
1c0a79b72304d6bee148cccd1fa43d8f81b4dade
22,041
py
Python
scripts/build/build/targets.py
kim-apple/connectedhomeip
c3b1810a6889357f5b645cb87c018ac107f1c9c4
[ "Apache-2.0" ]
null
null
null
scripts/build/build/targets.py
kim-apple/connectedhomeip
c3b1810a6889357f5b645cb87c018ac107f1c9c4
[ "Apache-2.0" ]
null
null
null
scripts/build/build/targets.py
kim-apple/connectedhomeip
c3b1810a6889357f5b645cb87c018ac107f1c9c4
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2021 Project CHIP 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 applicable law or agreed to in ...
42.143403
205
0.703507
import os from typing import Any, List from itertools import combinations from builders.ameba import AmebaApp, AmebaBoard, AmebaBuilder from builders.android import AndroidBoard, AndroidApp, AndroidBuilder from builders.cc13x2x7_26x2x7 import cc13x2x7_26x2x7App, cc13x2x7_26x2x7Builder from builders.cyw30739 import C...
true
true
1c0a79f2d64cb513909cac1cf7210e8069e80a49
4,726
py
Python
tests/test_precision.py
CompML/PRTS
66db2ac5f83ac9182ce29dcd7afc0f678a678eed
[ "Apache-2.0" ]
27
2020-12-27T15:27:29.000Z
2022-03-24T05:28:39.000Z
tests/test_precision.py
CompML/PRTS
66db2ac5f83ac9182ce29dcd7afc0f678a678eed
[ "Apache-2.0" ]
32
2020-12-27T14:52:27.000Z
2021-03-29T21:06:50.000Z
tests/test_precision.py
CompML/PRTS
66db2ac5f83ac9182ce29dcd7afc0f678a678eed
[ "Apache-2.0" ]
1
2020-12-29T14:37:32.000Z
2020-12-29T14:37:32.000Z
import unittest import numpy as np from prts.base.time_series_metrics import BaseTimeSeriesMetrics from prts.time_series_metrics.precision import TimeSeriesPrecision from prts import ts_precision class TestPrecision(unittest.TestCase): def test_PrecisionClass_inherited_BaseTimeSeriesMetrics(self): """ Ch...
29.911392
75
0.592467
import unittest import numpy as np from prts.base.time_series_metrics import BaseTimeSeriesMetrics from prts.time_series_metrics.precision import TimeSeriesPrecision from prts import ts_precision class TestPrecision(unittest.TestCase): def test_PrecisionClass_inherited_BaseTimeSeriesMetrics(self): obj = ...
true
true
1c0a7a94cc57088ce9d9570374d38fe5291dd076
1,645
py
Python
banditpylib/learners/mab_learner/ucb_test.py
Alanthink/banditpylib
ba6dc84d87ae9e9aec48cd622ec9988dccdd18c6
[ "MIT" ]
20
2020-02-05T23:53:18.000Z
2021-07-16T21:06:16.000Z
banditpylib/learners/mab_learner/ucb_test.py
sheelfshah/banditpylib
d455424ed74be1850ee3969b7b31f08d49339005
[ "MIT" ]
18
2020-02-06T00:23:26.000Z
2021-07-06T16:37:10.000Z
banditpylib/learners/mab_learner/ucb_test.py
sheelfshah/banditpylib
d455424ed74be1850ee3969b7b31f08d49339005
[ "MIT" ]
8
2020-02-06T00:05:10.000Z
2021-09-18T17:24:29.000Z
from unittest.mock import MagicMock import google.protobuf.text_format as text_format import numpy as np from banditpylib.data_pb2 import Context, Actions, Feedback from .ucb import UCB class TestUCB: """Test UCB policy""" def test_simple_run(self): arm_num = 5 horizon = 10 learner = UCB(arm_num=ar...
24.924242
67
0.527052
from unittest.mock import MagicMock import google.protobuf.text_format as text_format import numpy as np from banditpylib.data_pb2 import Context, Actions, Feedback from .ucb import UCB class TestUCB: def test_simple_run(self): arm_num = 5 horizon = 10 learner = UCB(arm_num=arm_num) learner.reset...
true
true
1c0a7b683a00099280879475a1e462a3eb9d2da7
146
py
Python
tests/__init__.py
MahrRah/iotedgedev
174aa64ec4f610609486e4d6381cdc04694fd7d5
[ "MIT" ]
null
null
null
tests/__init__.py
MahrRah/iotedgedev
174aa64ec4f610609486e4d6381cdc04694fd7d5
[ "MIT" ]
null
null
null
tests/__init__.py
MahrRah/iotedgedev
174aa64ec4f610609486e4d6381cdc04694fd7d5
[ "MIT" ]
null
null
null
"""Test package for Azure IoT Edge Dev Tool .""" __author__ = 'Microsoft Corporation' __email__ = 'opencode@microsoft.com' __version__ = '3.2.0'
24.333333
48
0.726027
__author__ = 'Microsoft Corporation' __email__ = 'opencode@microsoft.com' __version__ = '3.2.0'
true
true
1c0a7db68768a602fc2cfe4cb20271fe55da9c72
7,062
py
Python
buuctf/166-axb_2019_heap/exp.py
RoderickChan/ctf_tasks
a021c6d86cade26448d099933f3caa856ed28360
[ "MIT" ]
null
null
null
buuctf/166-axb_2019_heap/exp.py
RoderickChan/ctf_tasks
a021c6d86cade26448d099933f3caa856ed28360
[ "MIT" ]
null
null
null
buuctf/166-axb_2019_heap/exp.py
RoderickChan/ctf_tasks
a021c6d86cade26448d099933f3caa856ed28360
[ "MIT" ]
null
null
null
from pwn import * from LibcSearcher import LibcSearcher import click import sys import os import time FILENAME = '#' # 要执行的文件名 DEBUG = 1 # 是否为调试模式 TMUX = 0 # 是否开启TMUX GDB_BREAKPOINT = None # 当tmux开启的时候,断点的设置 IP = None # 远程连接的IP PORT = None # 远程连接的端口 LOCAL_LOG = 1 # 本地LOG是否开启 PWN_LOG_LEVEL = 'debug' # pwntools的log级别设置 ...
32.846512
178
0.642028
from pwn import * from LibcSearcher import LibcSearcher import click import sys import os import time FILENAME = '#' # 要执行的文件名 DEBUG = 1 TMUX = 0 GDB_BREAKPOINT = None IP = None PORT = None LOCAL_LOG = 1 PWN_LOG_LEVEL = 'debug' STOP_FUNCTION = 1 CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help']) @click.com...
true
true
1c0a7ea61bf60283d2cd3ef4be588a3e1720b228
37,241
py
Python
sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/operations/_disaster_recovery_configs_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/operations/_disaster_recovery_configs_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/operations/_disaster_recovery_configs_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
1,916
2015-01-19T05:05:41.000Z
2022-03-31T19:36:44.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
51.085048
262
0.670793
from typing import TYPE_CHECKING import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpR...
true
true
1c0a7f002bfb72d130b920a0aa701bfa2a3d9d33
168
py
Python
tests/staticfiles_tests/apps/staticfiles_config.py
Yoann-Vie/esgi-hearthstone
115d03426c7e8e80d89883b78ac72114c29bed12
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
tests/staticfiles_tests/apps/staticfiles_config.py
Yoann-Vie/esgi-hearthstone
115d03426c7e8e80d89883b78ac72114c29bed12
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
tests/staticfiles_tests/apps/staticfiles_config.py
Yoann-Vie/esgi-hearthstone
115d03426c7e8e80d89883b78ac72114c29bed12
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
from django.contrib.staticfiles.apps import StaticFilesConfig class IgnorePatternsAppConfig(StaticFilesConfig): ignore_patterns = ['*.css', '*/vendor/*.js']
28
62
0.75
from django.contrib.staticfiles.apps import StaticFilesConfig class IgnorePatternsAppConfig(StaticFilesConfig): ignore_patterns = ['*.css', '*/vendor/*.js']
true
true
1c0a7f8a4342bb70e9cab17707b4c0d7bdf21465
13,593
py
Python
other_setting/tmp-frcn2/model/train_val.py
chriszhenghaochen/CCnet
34df9a7bc82802a8eeb5d8e8e11a0409052b1dde
[ "MIT" ]
6
2017-11-20T16:50:03.000Z
2018-06-17T14:51:50.000Z
other_setting/tmp-frcn2/model/train_val.py
chriszhenghaochen/CCnet
34df9a7bc82802a8eeb5d8e8e11a0409052b1dde
[ "MIT" ]
1
2018-11-07T02:37:18.000Z
2018-11-07T11:57:04.000Z
other_setting/tmp-frcn2/model/train_val.py
chriszhenghaochen/CCnet_Tensorflow
34df9a7bc82802a8eeb5d8e8e11a0409052b1dde
[ "MIT" ]
null
null
null
# -------------------------------------------------------- # Tensorflow Faster R-CNN # Licensed under The MIT License [see LICENSE for details] # Written by Xinlei Chen and Zheqi He # -------------------------------------------------------- from __future__ import absolute_import from __future__ import division from __f...
39.629738
193
0.659972
from __future__ import absolute_import from __future__ import division from __future__ import print_function from model.config import cfg import roi_data_layer.roidb as rdl_roidb from roi_data_layer.layer import RoIDataLayer from utils.timer import Timer try: import cPickle as pickle except ImportError: import pic...
true
true
1c0a7f949de56a16ba50dda4214f3d3926221f07
154,265
py
Python
rpython/jit/metainterp/optimizeopt/test/test_optimizebasic.py
microvm/pypy-mu
6b03fbe93052d0eb3a4c67152c987c16837b3484
[ "Apache-2.0", "OpenSSL" ]
null
null
null
rpython/jit/metainterp/optimizeopt/test/test_optimizebasic.py
microvm/pypy-mu
6b03fbe93052d0eb3a4c67152c987c16837b3484
[ "Apache-2.0", "OpenSSL" ]
null
null
null
rpython/jit/metainterp/optimizeopt/test/test_optimizebasic.py
microvm/pypy-mu
6b03fbe93052d0eb3a4c67152c987c16837b3484
[ "Apache-2.0", "OpenSSL" ]
null
null
null
import py, sys from rpython.rlib.objectmodel import instantiate from rpython.rlib.rarithmetic import intmask from rpython.jit.metainterp.optimizeopt.test.test_util import ( LLtypeMixin, BaseTest, FakeMetaInterpStaticData, convert_old_style_to_targets) from rpython.jit.metainterp.history import TargetToken, JitCellT...
27.840642
82
0.512994
import py, sys from rpython.rlib.objectmodel import instantiate from rpython.rlib.rarithmetic import intmask from rpython.jit.metainterp.optimizeopt.test.test_util import ( LLtypeMixin, BaseTest, FakeMetaInterpStaticData, convert_old_style_to_targets) from rpython.jit.metainterp.history import TargetToken, JitCellT...
true
true
1c0a7fb17095a22f781e485ac50e6ff582aef167
1,388
py
Python
script/cut_frames.py
Reza666-cloud/Sea_and_Stars
f365f7e2e46a6efda5388a103ca7f9c5ecad711a
[ "MIT" ]
1
2022-01-07T06:25:24.000Z
2022-01-07T06:25:24.000Z
script/cut_frames.py
Reza666-cloud/Sea_and_Stars
f365f7e2e46a6efda5388a103ca7f9c5ecad711a
[ "MIT" ]
null
null
null
script/cut_frames.py
Reza666-cloud/Sea_and_Stars
f365f7e2e46a6efda5388a103ca7f9c5ecad711a
[ "MIT" ]
null
null
null
import cv2 import os import glob video_name = ["150", "200", "250", "300"] sum = 0 for i in range(8): cut_frame_dir = "../../Datasets/drone_view_cut_frame" if not os.path.exists(cut_frame_dir): os.mkdir(cut_frame_dir) img_path = ".." + os.sep + ".." + os.sep + "Datasets" + os.sep + "drone-view" ...
37.513514
83
0.597983
import cv2 import os import glob video_name = ["150", "200", "250", "300"] sum = 0 for i in range(8): cut_frame_dir = "../../Datasets/drone_view_cut_frame" if not os.path.exists(cut_frame_dir): os.mkdir(cut_frame_dir) img_path = ".." + os.sep + ".." + os.sep + "Datasets" + os.sep + "drone-view" ...
true
true
1c0a8007f71d84b4578aedcb93e232fc9ded1c88
380
py
Python
app/email.py
ubuntustan/Pitch
70e2949441283fc2aff5cfd48c8e2c75c2b81fa3
[ "MIT" ]
null
null
null
app/email.py
ubuntustan/Pitch
70e2949441283fc2aff5cfd48c8e2c75c2b81fa3
[ "MIT" ]
null
null
null
app/email.py
ubuntustan/Pitch
70e2949441283fc2aff5cfd48c8e2c75c2b81fa3
[ "MIT" ]
null
null
null
from flask_mail import Message from flask import render_template from . import mail def mail_message(subject, template, to, **kwargs): sender_email='danstanmshivs@gmail.com' email=Message(subject, sender=sender_email, recipients=[to]) email.body=render_template(template+'.txt',**kwargs) email.html=ren...
34.545455
64
0.755263
from flask_mail import Message from flask import render_template from . import mail def mail_message(subject, template, to, **kwargs): sender_email='danstanmshivs@gmail.com' email=Message(subject, sender=sender_email, recipients=[to]) email.body=render_template(template+'.txt',**kwargs) email.html=ren...
true
true
1c0a814a63603c4afb604b03fb7839dee880b3fd
157
py
Python
tests/model_control/detailed/transf_Logit/model_control_one_enabled_Logit_MovingAverage_Seasonal_Minute_AR.py
shaido987/pyaf
b9afd089557bed6b90b246d3712c481ae26a1957
[ "BSD-3-Clause" ]
377
2016-10-13T20:52:44.000Z
2022-03-29T18:04:14.000Z
tests/model_control/detailed/transf_Logit/model_control_one_enabled_Logit_MovingAverage_Seasonal_Minute_AR.py
ysdede/pyaf
b5541b8249d5a1cfdc01f27fdfd99b6580ed680b
[ "BSD-3-Clause" ]
160
2016-10-13T16:11:53.000Z
2022-03-28T04:21:34.000Z
tests/model_control/detailed/transf_Logit/model_control_one_enabled_Logit_MovingAverage_Seasonal_Minute_AR.py
ysdede/pyaf
b5541b8249d5a1cfdc01f27fdfd99b6580ed680b
[ "BSD-3-Clause" ]
63
2017-03-09T14:51:18.000Z
2022-03-27T20:52:57.000Z
import tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['Logit'] , ['MovingAverage'] , ['Seasonal_Minute'] , ['AR'] );
39.25
84
0.751592
import tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['Logit'] , ['MovingAverage'] , ['Seasonal_Minute'] , ['AR'] );
true
true
1c0a81632a0982145c14d03a11f753eb28e410d1
6,203
py
Python
cfgov/agreements/tests/test_legacy.py
thephillipsequation/cfgov-refresh
1412dd4215fce5597c0ec704b0d480cf00aeb82c
[ "CC0-1.0" ]
null
null
null
cfgov/agreements/tests/test_legacy.py
thephillipsequation/cfgov-refresh
1412dd4215fce5597c0ec704b0d480cf00aeb82c
[ "CC0-1.0" ]
null
null
null
cfgov/agreements/tests/test_legacy.py
thephillipsequation/cfgov-refresh
1412dd4215fce5597c0ec704b0d480cf00aeb82c
[ "CC0-1.0" ]
null
null
null
import random from django.core.paginator import Page from django.core.urlresolvers import reverse from django.http import HttpResponse from django.test import TestCase from mock import patch from agreements import models def agreement_factory(**kwargs): """ Create an agreement with some defaults. """ ...
32.994681
78
0.607287
import random from django.core.paginator import Page from django.core.urlresolvers import reverse from django.http import HttpResponse from django.test import TestCase from mock import patch from agreements import models def agreement_factory(**kwargs): if 'issuer' not in kwargs: kwargs['issuer'] = mod...
true
true
1c0a82baacb16b279d6c5828c8d072a078702a24
5,881
py
Python
wouldyouci_back/utils/update_train_data.py
jisunl23/wouldyouci
1a896008487a979139596aa8aa8d108b740d95ef
[ "MIT" ]
1
2020-06-18T08:40:47.000Z
2020-06-18T08:40:47.000Z
wouldyouci_back/utils/update_train_data.py
jisunl23/wouldyouci
1a896008487a979139596aa8aa8d108b740d95ef
[ "MIT" ]
14
2021-03-19T08:55:06.000Z
2022-03-12T00:37:51.000Z
wouldyouci_back/utils/update_train_data.py
jisunl23/wouldyouci
1a896008487a979139596aa8aa8d108b740d95ef
[ "MIT" ]
1
2021-05-27T08:52:01.000Z
2021-05-27T08:52:01.000Z
import os import surprise import pymysql import pandas as pd from decouple import config def get_genre_info(): BASE_DIR = os.path.dirname(os.path.abspath(__file__)) conn = pymysql.connect(host=config('HOST'), port=3306, user=config('USER'), password=config('PASSWORD'), db=config('DB...
32.491713
108
0.637477
import os import surprise import pymysql import pandas as pd from decouple import config def get_genre_info(): BASE_DIR = os.path.dirname(os.path.abspath(__file__)) conn = pymysql.connect(host=config('HOST'), port=3306, user=config('USER'), password=config('PASSWORD'), db=config('DB...
true
true