hexsha
stringlengths
40
40
size
int64
7
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
125
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
247
max_issues_repo_name
stringlengths
4
125
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
247
max_forks_repo_name
stringlengths
4
125
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.77
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
7
1.04M
filtered:remove_function_no_docstring
int64
-102
942k
filtered:remove_class_no_docstring
int64
-354
977k
filtered:remove_delete_markers
int64
0
60.1k
cb1fdaf8493491e512900e0559b4a73b749a5bbd
802
py
Python
openstack_dashboard/dashboards/sdscontroller/administration/nodes/models.py
iostackproject/SDS-dashboard
efa3d7968c738bfb10bc19776f24f2937d5802d8
[ "Apache-2.0" ]
1
2021-01-20T00:14:15.000Z
2021-01-20T00:14:15.000Z
openstack_dashboard/dashboards/sdscontroller/administration/nodes/models.py
iostackproject/SDS-dashboard
efa3d7968c738bfb10bc19776f24f2937d5802d8
[ "Apache-2.0" ]
null
null
null
openstack_dashboard/dashboards/sdscontroller/administration/nodes/models.py
iostackproject/SDS-dashboard
efa3d7968c738bfb10bc19776f24f2937d5802d8
[ "Apache-2.0" ]
null
null
null
import calendar import time STATUS_THRESHOLD = 15 class ProxyNode: """ ProxyNode class defines a Swift Proxy node. The identifier is the name of the node. """ class StorageNode: """ StorageNode class defines a Swift storage node. The identifier is the name of the node. """
29.703704
101
0.647132
import calendar import time STATUS_THRESHOLD = 15 class ProxyNode: """ ProxyNode class defines a Swift Proxy node. The identifier is the name of the node. """ def __init__(self, name, ip, last_ping): self.id = name self.ip = ip self.last_ping = last_ping self.node_s...
440
0
52
fbfd8831ec1f387d2a9f1a3631a3447d74d67fbe
4,467
py
Python
minotaur/utilities/ContentWriter.py
mlunnay/minotaur
e27b456b57e18ba0e7a4dd0a3b665f14ca79a2d8
[ "MIT" ]
1
2020-05-04T01:46:58.000Z
2020-05-04T01:46:58.000Z
minotaur/utilities/ContentWriter.py
mlunnay/minotaur
e27b456b57e18ba0e7a4dd0a3b665f14ca79a2d8
[ "MIT" ]
null
null
null
minotaur/utilities/ContentWriter.py
mlunnay/minotaur
e27b456b57e18ba0e7a4dd0a3b665f14ca79a2d8
[ "MIT" ]
null
null
null
import clr from System import * from System.IO import * if __name__ == "__main__": f = File.Create("test.MEB") writer = ContentWriter(f) writer.WriteInt(42) writer.Flush() f.Close()
33.335821
111
0.623461
import clr from System import * from System.IO import * class ContentWriter(object): def __init__(self, outputStream, compressOutput = False, identifierString = "MEB"): self.identifierString = identifierString self.compressContent = compressOutput self.finalOutput = BinaryWriter(outputStre...
3,368
7
876
9406667b0ada76b1b8f03bbef3586d583b0e7568
45,375
py
Python
iiotedge.py
hansgschossmann/iot-edge-opc
c4cc051e1e278c627377cb13f34fb7aaa08691b5
[ "MIT" ]
null
null
null
iiotedge.py
hansgschossmann/iot-edge-opc
c4cc051e1e278c627377cb13f34fb7aaa08691b5
[ "MIT" ]
null
null
null
iiotedge.py
hansgschossmann/iot-edge-opc
c4cc051e1e278c627377cb13f34fb7aaa08691b5
[ "MIT" ]
null
null
null
import sys _python3 = False if (sys.version_info > (3, 0)): _python3 = True import os import platform import json import subprocess import shlex import argparse import time import shutil import socket import yaml import logging from azure.mgmt.resource import ResourceManagementClient from azure.common.client_factor...
53.382353
237
0.667989
import sys _python3 = False if (sys.version_info > (3, 0)): _python3 = True import os import platform import json import subprocess import shlex import argparse import time import shutil import socket import yaml import logging from azure.mgmt.resource import ResourceManagementClient from azure.common.client_factor...
21,938
0
137
b169bc61e43aa59f78f85ee25252495c61ab1381
4,645
py
Python
sdlf-utils/pipeline-examples/dataset-dependency/stageA/lambda/stage-a-dependent-status/src/lambda_function.py
pravinva/aws-serverless-data-lake-framework
6dc422733a5d4add94040b3f3475a70470d5d510
[ "MIT-0" ]
267
2020-10-26T16:21:49.000Z
2022-03-27T21:37:17.000Z
sdlf-utils/pipeline-examples/dataset-dependency/stageA/lambda/stage-a-dependent-status/src/lambda_function.py
pravinva/aws-serverless-data-lake-framework
6dc422733a5d4add94040b3f3475a70470d5d510
[ "MIT-0" ]
28
2020-10-28T08:17:14.000Z
2022-01-21T18:47:23.000Z
sdlf-utils/pipeline-examples/dataset-dependency/stageA/lambda/stage-a-dependent-status/src/lambda_function.py
pravinva/aws-serverless-data-lake-framework
6dc422733a5d4add94040b3f3475a70470d5d510
[ "MIT-0" ]
101
2020-10-27T15:36:20.000Z
2022-03-23T19:54:52.000Z
import datetime import os import re import shutil import boto3 from boto3.dynamodb.conditions import Key from datalake_library import octagon from datalake_library.commons import init_logger from datalake_library.configuration.resource_configs import DynamoConfiguration from datalake_library.interfaces.dynamo_interfa...
36.289063
119
0.627987
import datetime import os import re import shutil import boto3 from boto3.dynamodb.conditions import Key from datalake_library import octagon from datalake_library.commons import init_logger from datalake_library.configuration.resource_configs import DynamoConfiguration from datalake_library.interfaces.dynamo_interfa...
1,087
0
69
7202c117a689b6be6485eb4f90cd136cebeb4c38
700
py
Python
UVa-problems/465.py
LeKSuS-04/Competitive-Programming
fbc86a8c6febeef72587a8f94135e92197e1f99e
[ "WTFPL" ]
null
null
null
UVa-problems/465.py
LeKSuS-04/Competitive-Programming
fbc86a8c6febeef72587a8f94135e92197e1f99e
[ "WTFPL" ]
null
null
null
UVa-problems/465.py
LeKSuS-04/Competitive-Programming
fbc86a8c6febeef72587a8f94135e92197e1f99e
[ "WTFPL" ]
null
null
null
''' UVa 465 - Overflow ''' # https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=406 # Date: 2021-08-14 17:38:54 # Run time: 0.010 # Verdict: AC from sys import stdin limit = 2 ** 31 - 1 for line in stdin: a, action, b = line.strip().split() print(a, action, b) a,...
21.875
97
0.554286
''' UVa 465 - Overflow ''' # https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=406 # Date: 2021-08-14 17:38:54 # Run time: 0.010 # Verdict: AC from sys import stdin limit = 2 ** 31 - 1 for line in stdin: a, action, b = line.strip().split() print(a, action, b) a,...
0
0
0
0c395cab5188e74881e4d3e613572b70353de036
5,587
py
Python
tests/test_cms_toolbars.py
jonasundderwolf/django-cms-helpers
d28e3516fa7e17cb51f87c40ba1d66f692106975
[ "MIT" ]
null
null
null
tests/test_cms_toolbars.py
jonasundderwolf/django-cms-helpers
d28e3516fa7e17cb51f87c40ba1d66f692106975
[ "MIT" ]
5
2019-03-19T12:18:13.000Z
2020-09-29T19:08:24.000Z
tests/test_cms_toolbars.py
jonasundderwolf/django-cms-helpers
d28e3516fa7e17cb51f87c40ba1d66f692106975
[ "MIT" ]
2
2020-09-18T09:47:02.000Z
2020-09-29T13:22:58.000Z
from unittest import mock import pytest from cms.api import create_page, create_title from cms.toolbar.items import ModalItem, SubMenu from tests.resources.cmsapp.models import ExtensionModel @mock.patch('cms_helpers.cms_toolbars.TitleExtensionToolbar.get_item_position') @pytest.mark.django_db
40.485507
79
0.636836
from unittest import mock import pytest from cms.api import create_page, create_title from cms.toolbar.items import ModalItem, SubMenu from tests.resources.cmsapp.models import ExtensionModel def test_titleextensiontoolbar_inserted(admin_client): page = create_page('Test Page', 'INHERIT', 'en-us') response...
5,026
192
67
86125a0b6a2575b67c68c5a792d8a8aab2cd3096
12,001
py
Python
data/io/PIGLET/data_statistics.py
toolmen-lab/R3Det_piglet-detection
9e256570e157ee184eb9a4dc11ebafdc1b56f121
[ "MIT" ]
null
null
null
data/io/PIGLET/data_statistics.py
toolmen-lab/R3Det_piglet-detection
9e256570e157ee184eb9a4dc11ebafdc1b56f121
[ "MIT" ]
null
null
null
data/io/PIGLET/data_statistics.py
toolmen-lab/R3Det_piglet-detection
9e256570e157ee184eb9a4dc11ebafdc1b56f121
[ "MIT" ]
null
null
null
import json import numpy as np import itertools from tabulate import tabulate import math import matplotlib.pyplot as plt #import pandas as pd import cv2 import sys sys.path.append("../../../libs") from box_utils import generate_anchors from configs import cfgs if __name__ == "__main__": dataset = 'tr...
43.64
130
0.588951
import json import numpy as np import itertools from tabulate import tabulate import math import matplotlib.pyplot as plt #import pandas as pd import cv2 import sys sys.path.append("../../../libs") from box_utils import generate_anchors from configs import cfgs def calculate_instance_histogram(dataset): with open(...
11,201
0
200
4bb7c5fd441e34b83a65ffc0a3f7886077f1c164
2,201
py
Python
tests/test_transformation.py
utiasASRL/pylgmath
b392f9960c2b12758bd05a639966f161240282cb
[ "BSD-3-Clause" ]
3
2021-11-11T17:54:35.000Z
2021-12-09T01:44:16.000Z
tests/test_transformation.py
utiasASRL/pylgmath
b392f9960c2b12758bd05a639966f161240282cb
[ "BSD-3-Clause" ]
null
null
null
tests/test_transformation.py
utiasASRL/pylgmath
b392f9960c2b12758bd05a639966f161240282cb
[ "BSD-3-Clause" ]
null
null
null
import numpy as np import numpy.linalg as npla from pylgmath import se3op, Transformation TEST_SIZE = 10000
34.936508
79
0.738301
import numpy as np import numpy.linalg as npla from pylgmath import se3op, Transformation TEST_SIZE = 10000 def test_constructor(): # generate random transform from the most basic constructor for testing xi_ab_rand = np.random.uniform(-np.pi / 2, np.pi / 2, size=(TEST_SIZE, 6, 1)) T_ba_rand = se3op.vec2tran(x...
2,019
0
69
21a3b3b04547ce37b4587ea04edda977f9f04967
371
py
Python
models/amenity.py
devephy/AirBnB_clone_v2
b9f0ba65d76f730c0b2ef98b10764424af426570
[ "Apache-2.0" ]
null
null
null
models/amenity.py
devephy/AirBnB_clone_v2
b9f0ba65d76f730c0b2ef98b10764424af426570
[ "Apache-2.0" ]
null
null
null
models/amenity.py
devephy/AirBnB_clone_v2
b9f0ba65d76f730c0b2ef98b10764424af426570
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 """ State Module for HBNB project """ from models.base_model import BaseModel, Base from models import storage_type from sqlalchemy import Column, String class Amenity(BaseModel, Base): '''amenity class''' __tablename__ = 'amenities' if storage_type == 'db': name = Column(String...
24.733333
50
0.679245
#!/usr/bin/python3 """ State Module for HBNB project """ from models.base_model import BaseModel, Base from models import storage_type from sqlalchemy import Column, String class Amenity(BaseModel, Base): '''amenity class''' __tablename__ = 'amenities' if storage_type == 'db': name = Column(String...
0
0
0
6779f08310ecfb594397a5556c79c574b5dbfa7e
464
py
Python
setup.py
iashwash/statuspage-py
55390e790a93232e3c33b2ae1c56648e26e72ea0
[ "Apache-2.0" ]
1
2019-01-03T21:05:36.000Z
2019-01-03T21:05:36.000Z
setup.py
iashwash/statuspage-py
55390e790a93232e3c33b2ae1c56648e26e72ea0
[ "Apache-2.0" ]
null
null
null
setup.py
iashwash/statuspage-py
55390e790a93232e3c33b2ae1c56648e26e72ea0
[ "Apache-2.0" ]
null
null
null
from statuspage import __version__ from setuptools import setup, find_packages setup( name='statuspage', version=__version__, description='Python library for Statuspage.io APIs', author='Kunal Lillaney', author_email='lillaney@jhu.edu', url='https://github.io/kunallillaney/statuspage-py', l...
24.421053
56
0.69181
from statuspage import __version__ from setuptools import setup, find_packages setup( name='statuspage', version=__version__, description='Python library for Statuspage.io APIs', author='Kunal Lillaney', author_email='lillaney@jhu.edu', url='https://github.io/kunallillaney/statuspage-py', l...
0
0
0
2b6e4feb528e794151fe0780d3fd084635cc36c5
879
py
Python
ubivar/test/test_integration.py
oriskami/oriskami-python
2b0d81f713a9149977907183c67eec136d49ee8c
[ "MIT" ]
4
2017-05-28T19:37:31.000Z
2017-06-13T11:34:26.000Z
ubivar/test/test_integration.py
ubivar/ubivar-python
2b0d81f713a9149977907183c67eec136d49ee8c
[ "MIT" ]
null
null
null
ubivar/test/test_integration.py
ubivar/ubivar-python
2b0d81f713a9149977907183c67eec136d49ee8c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import os import sys import unittest2 import ubivar from mock import patch from ubivar.test.helper import (UbivarTestCase, NOW) if __name__ == '__main__': unittest2.main()
23.131579
57
0.704209
# -*- coding: utf-8 -*- import os import sys import unittest2 import ubivar from mock import patch from ubivar.test.helper import (UbivarTestCase, NOW) class FunctionalTests(UbivarTestCase): request_client = ubivar.http_client.Urllib2Client def setUp(self): super(FunctionalTests, self).setUp() ...
422
206
46
01f5f713c9f5b6622ee771d1a280ade07ea7739f
886
py
Python
care/facility/migrations/0177_auto_20200916_1448.py
gigincg/care
07be6a7982b5c46a854e3435a52662f32800c8ae
[ "MIT" ]
189
2020-03-17T17:18:58.000Z
2022-02-22T09:49:45.000Z
care/facility/migrations/0177_auto_20200916_1448.py
gigincg/care
07be6a7982b5c46a854e3435a52662f32800c8ae
[ "MIT" ]
598
2020-03-19T21:22:09.000Z
2022-03-30T05:08:37.000Z
care/facility/migrations/0177_auto_20200916_1448.py
gigincg/care
07be6a7982b5c46a854e3435a52662f32800c8ae
[ "MIT" ]
159
2020-03-19T18:45:56.000Z
2022-03-17T13:23:12.000Z
# Generated by Django 2.2.11 on 2020-09-16 09:18 import django.core.validators from django.db import migrations, models
35.44
292
0.646727
# Generated by Django 2.2.11 on 2020-09-16 09:18 import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('facility', '0176_auto_20200916_1443'), ] operations = [ migrations.AddField( model_name='shifting...
0
741
23
dfe9de1f9ccfa8f57dc69fcaabfc66ea2875865f
640
py
Python
webapp/api/helpers/middlewares.py
sangwonl/stage34
03b0b25ba843a781d059c33b4df9824636876853
[ "MIT" ]
9
2016-08-01T05:13:59.000Z
2020-05-12T04:35:13.000Z
webapp/api/helpers/middlewares.py
sangwonl/stage34
03b0b25ba843a781d059c33b4df9824636876853
[ "MIT" ]
38
2016-08-14T01:07:14.000Z
2021-06-10T21:05:25.000Z
webapp/api/helpers/middlewares.py
sangwonl/stage34
03b0b25ba843a781d059c33b4df9824636876853
[ "MIT" ]
3
2016-11-24T00:05:56.000Z
2018-11-28T04:34:25.000Z
from django.contrib import auth from django.contrib.auth.middleware import get_user from django.utils.functional import SimpleLazyObject
42.666667
77
0.6875
from django.contrib import auth from django.contrib.auth.middleware import get_user from django.utils.functional import SimpleLazyObject class JWTAuthenticationMiddleware(object): def process_request(self, request): if not hasattr(request, 'user') or not request.user.is_authenticated: auth_bea...
432
21
49
3c60d36951e95b1086addb67c64aa03ebf5cf268
3,973
py
Python
data/models/player.py
noaPVC/Ninjobi
2aa685a8933990760c19d9d0b2b838b8c1c5e14d
[ "MIT" ]
null
null
null
data/models/player.py
noaPVC/Ninjobi
2aa685a8933990760c19d9d0b2b838b8c1c5e14d
[ "MIT" ]
null
null
null
data/models/player.py
noaPVC/Ninjobi
2aa685a8933990760c19d9d0b2b838b8c1c5e14d
[ "MIT" ]
null
null
null
import pygame from data.constants import * from data.core import animation_asset_loader # check for any collisions
37.130841
92
0.575132
import pygame from data.constants import * from data.core import animation_asset_loader class Player(pygame.sprite.Sprite): def __init__(self, pos): super().__init__() self.animation_sprites = animation_asset_loader('data/assets/characters/ninja') self.animation_frame_index = 0 ...
3,604
14
231
d07bc00d9745b69eaaf99279456d8c46b4cc45df
559
py
Python
src/tf/metrics/metrics.py
cgalaz01/mnms2_challenge
f61679a699819f0f9f8339d1c4046098a4d55aa1
[ "Apache-2.0" ]
null
null
null
src/tf/metrics/metrics.py
cgalaz01/mnms2_challenge
f61679a699819f0f9f8339d1c4046098a4d55aa1
[ "Apache-2.0" ]
null
null
null
src/tf/metrics/metrics.py
cgalaz01/mnms2_challenge
f61679a699819f0f9f8339d1c4046098a4d55aa1
[ "Apache-2.0" ]
null
null
null
import tensorflow as tf from tensorflow.keras import backend as K @tf.autograph.experimental.do_not_convert
25.409091
89
0.669052
import tensorflow as tf from tensorflow.keras import backend as K @tf.autograph.experimental.do_not_convert def soft_dice(y_true, y_pred): epsilon = 1e-6 y_true = tf.cast(y_true, dtype=tf.float32) y_pred = tf.cast(y_pred, dtype=tf.float32) # Expected y_pred to be 'logits' y_pred = tf.sig...
422
0
22
a9e45c93c57afe519d4227c00887dce9200f4d06
133
py
Python
dynamic_watershed/__init__.py
PeterJackNaylor/dynamic_watershed
37ac2dcc85dbcbefdd092ee3912a9888ae1269af
[ "MIT" ]
11
2018-09-03T11:39:33.000Z
2022-02-01T09:03:35.000Z
dynamic_watershed/__init__.py
PeterJackNaylor/dynamic_watershed
37ac2dcc85dbcbefdd092ee3912a9888ae1269af
[ "MIT" ]
null
null
null
dynamic_watershed/__init__.py
PeterJackNaylor/dynamic_watershed
37ac2dcc85dbcbefdd092ee3912a9888ae1269af
[ "MIT" ]
null
null
null
""" dynamic_watershed/__init__.py """ # __all__ = [] from .dynamic_watershed import post_process from .version import __version__
16.625
43
0.759398
""" dynamic_watershed/__init__.py """ # __all__ = [] from .dynamic_watershed import post_process from .version import __version__
0
0
0
705e5afc9b357faa79c77b95cc4c2b90b2ead2c4
215
py
Python
env/lib/python3.5/site-packages/pylint/test/functional/not_async_context_manager_py37.py
Udolf15/recommedMeMovies
be5ae74acd98e3f93beaaa5bb55623974fb24247
[ "MIT" ]
33
2019-08-04T01:48:11.000Z
2022-03-20T13:53:42.000Z
env/lib/python3.5/site-packages/pylint/test/functional/not_async_context_manager_py37.py
Udolf15/recommedMeMovies
be5ae74acd98e3f93beaaa5bb55623974fb24247
[ "MIT" ]
16
2020-02-12T00:28:11.000Z
2022-03-11T23:48:19.000Z
env/lib/python3.5/site-packages/pylint/test/functional/not_async_context_manager_py37.py
Udolf15/recommedMeMovies
be5ae74acd98e3f93beaaa5bb55623974fb24247
[ "MIT" ]
12
2019-08-12T07:59:38.000Z
2022-03-24T08:09:40.000Z
# pylint: disable=missing-docstring from contextlib import asynccontextmanager @asynccontextmanager async with context_manager(42) as ans: assert ans == 42
16.538462
42
0.776744
# pylint: disable=missing-docstring from contextlib import asynccontextmanager @asynccontextmanager async def context_manager(value): yield value async with context_manager(42) as ans: assert ans == 42
28
0
22
0acc7992c6a4ebe8570e0359ddb4646be53431d5
2,445
py
Python
RottenTomatoes/rt/rt/pipelines.py
hovhannest/TMScrappers
b9218bead4450931359b6827f3caf9278fed17b2
[ "MIT" ]
null
null
null
RottenTomatoes/rt/rt/pipelines.py
hovhannest/TMScrappers
b9218bead4450931359b6827f3caf9278fed17b2
[ "MIT" ]
null
null
null
RottenTomatoes/rt/rt/pipelines.py
hovhannest/TMScrappers
b9218bead4450931359b6827f3caf9278fed17b2
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html import csv from scrapy import signals from scrapy.exporters import CsvItemExporter import inspect from rt.items import * from rt...
34.928571
93
0.639264
# -*- coding: utf-8 -*- # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html import csv from scrapy import signals from scrapy.exporters import CsvItemExporter import inspect from rt.items import * from rt...
1,911
155
23
62ecc636d39a75a2ad17adc663a12642b740033b
1,419
py
Python
tictactoe_project/tests/board_test.py
agryman/sean
11baf69c6eb9308266126bf9c8b1c67c6fd33afc
[ "MIT" ]
1
2020-03-28T18:17:52.000Z
2020-03-28T18:17:52.000Z
tictactoe_project/tests/board_test.py
agryman/sean
11baf69c6eb9308266126bf9c8b1c67c6fd33afc
[ "MIT" ]
1
2022-01-21T21:33:00.000Z
2022-01-21T21:33:00.000Z
tictactoe_project/tests/board_test.py
agryman/sean
11baf69c6eb9308266126bf9c8b1c67c6fd33afc
[ "MIT" ]
null
null
null
"""This module tests the board module.""" import pytest from tictactoe.player import Player from tictactoe.row import Row from tictactoe.board import Board, cell_indices
30.191489
63
0.617336
"""This module tests the board module.""" import pytest from tictactoe.player import Player from tictactoe.row import Row from tictactoe.board import Board, cell_indices class TestCellIndices: def test_fail(self): with pytest.raises(ValueError): cell_indices(0) with pytest.raises(ValueE...
994
0
255
7b2b4d0056e6419748a5af643eb0d2d7b535b0ad
351
py
Python
sandbox/app/order/models.py
fourdigits/django-oscar-mollie
1d182bf1bcfc6378511b4315c5b2dcb8f42e94a8
[ "BSD-2-Clause" ]
null
null
null
sandbox/app/order/models.py
fourdigits/django-oscar-mollie
1d182bf1bcfc6378511b4315c5b2dcb8f42e94a8
[ "BSD-2-Clause" ]
null
null
null
sandbox/app/order/models.py
fourdigits/django-oscar-mollie
1d182bf1bcfc6378511b4315c5b2dcb8f42e94a8
[ "BSD-2-Clause" ]
1
2020-10-27T10:12:01.000Z
2020-10-27T10:12:01.000Z
from django.conf import settings from oscar.apps.order.abstract_models import AbstractOrder from oscar.apps.order.models import *
23.4
61
0.769231
from django.conf import settings from oscar.apps.order.abstract_models import AbstractOrder class Order(AbstractOrder): def is_open_payment(self): return self.status == settings.ORDER_PENDING_STATUS def is_cancelled_order(self): return self.status == settings.ORDER_CANCELLED_STATUS from os...
135
6
76
e809129ade419fef97e899f2906ecc9e7c295aa6
12,480
py
Python
src/kafka_rest_client/client.py
bozzzzo/kafka-rest-client
ce3a46f18e57b4a920ebce7d8ad421741be669f4
[ "Apache-2.0" ]
null
null
null
src/kafka_rest_client/client.py
bozzzzo/kafka-rest-client
ce3a46f18e57b4a920ebce7d8ad421741be669f4
[ "Apache-2.0" ]
null
null
null
src/kafka_rest_client/client.py
bozzzzo/kafka-rest-client
ce3a46f18e57b4a920ebce7d8ad421741be669f4
[ "Apache-2.0" ]
1
2021-08-30T13:56:53.000Z
2021-08-30T13:56:53.000Z
import requests import urllib import uuid import importlib_metadata import json import base64 import logging from collections import namedtuple, defaultdict, ChainMap from typing import List __all__ = [ 'KafkaRestClient', 'KafkaRestClientException', 'TopicPartition', 'KafkaMessage' ] log = logging.getLogger(...
37.253731
93
0.565865
import requests import urllib import uuid import importlib_metadata import json import base64 import logging from collections import namedtuple, defaultdict, ChainMap from typing import List __all__ = [ 'KafkaRestClient', 'KafkaRestClientException', 'TopicPartition', 'KafkaMessage' ] log = logging.getLogger(...
8,718
21
858
8e67b18377011ff3c5dd8ac86b01d0e2311f94b5
2,129
py
Python
social/tests/test_board_details.py
Mangeneh/akkaskhooneh-backend
2a81e73fbe0d55d5821ba1670a997bd8851c4af6
[ "MIT" ]
7
2018-09-17T18:34:49.000Z
2019-09-15T11:39:15.000Z
social/tests/test_board_details.py
Mangeneh/akkaskhooneh-backend
2a81e73fbe0d55d5821ba1670a997bd8851c4af6
[ "MIT" ]
9
2019-10-21T17:12:21.000Z
2022-03-11T23:28:14.000Z
social/tests/test_board_details.py
Mangeneh/akkaskhooneh-backend
2a81e73fbe0d55d5821ba1670a997bd8851c4af6
[ "MIT" ]
1
2019-11-29T16:12:12.000Z
2019-11-29T16:12:12.000Z
from django.test import TestCase from authentication.models import User from social.models import Posts, Followers, Board from rest_framework import status
44.354167
83
0.690465
from django.test import TestCase from authentication.models import User from social.models import Posts, Followers, Board from rest_framework import status class FeedTest(TestCase): def create(self, email, username, password): user = User.objects.create(email=email, username=username, password='') ...
1,758
4
211
56af300e8f4226b5d4e58e02ea559825aed78b3b
4,417
py
Python
simulator/delay.py
mmosko/ccnx-beginendfragment-sim
092d080f92ef0dbbc93d2e8cd66236cd66e8cf47
[ "BSD-2-Clause" ]
null
null
null
simulator/delay.py
mmosko/ccnx-beginendfragment-sim
092d080f92ef0dbbc93d2e8cd66236cd66e8cf47
[ "BSD-2-Clause" ]
null
null
null
simulator/delay.py
mmosko/ccnx-beginendfragment-sim
092d080f92ef0dbbc93d2e8cd66236cd66e8cf47
[ "BSD-2-Clause" ]
1
2019-04-01T18:36:29.000Z
2019-04-01T18:36:29.000Z
# # Copyright (c) 2016, Xerox Corporation (Xerox) and Palo Alto Research Center, Inc (PARC) # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the abo...
38.408696
90
0.721304
# # Copyright (c) 2016, Xerox Corporation (Xerox) and Palo Alto Research Center, Inc (PARC) # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the abo...
228
221
104
f481185e7f3c8609bd32c0aec80a2bc7662bd4d1
264
py
Python
app/models/watcher.py
fabdarice/moby-dick-backend
ade0cc1d06cd69e02c3954a94be8e9befa18f46e
[ "MIT" ]
null
null
null
app/models/watcher.py
fabdarice/moby-dick-backend
ade0cc1d06cd69e02c3954a94be8e9befa18f46e
[ "MIT" ]
null
null
null
app/models/watcher.py
fabdarice/moby-dick-backend
ade0cc1d06cd69e02c3954a94be8e9befa18f46e
[ "MIT" ]
null
null
null
from sqlalchemy import Boolean, Column, String from app.models.base import BaseModel
22
51
0.734848
from sqlalchemy import Boolean, Column, String from app.models.base import BaseModel class WatcherModel(BaseModel): __tablename__ = 'watchers' address = Column(String(128), primary_key=True) active = Column(Boolean) alias = Column(String(128))
0
154
23
b213981a7fe2cee320079878f5d531a7068db054
1,427
py
Python
core/internationalization.py
aaaimx/covid19-assistant-api
48293d97991aa69fe9b01a5871be86e9c5e38057
[ "MIT" ]
1
2020-03-28T06:40:36.000Z
2020-03-28T06:40:36.000Z
core/internationalization.py
aaaimx/covid19-assistant-api
48293d97991aa69fe9b01a5871be86e9c5e38057
[ "MIT" ]
14
2020-03-24T20:59:53.000Z
2021-12-13T20:36:13.000Z
core/internationalization.py
aaaimx/covid19-assistant-api
48293d97991aa69fe9b01a5871be86e9c5e38057
[ "MIT" ]
null
null
null
# Internationalization # https://docs.djangoproject.com/en/3.0/topics/i18n/ LANGUAGE_CODE = 'en-us' TIME_ZONE = 'UTC' USE_I18N = True USE_L10N = True USE_TZ = True # Configuración de formatos de fechas DATETIME_INPUT_FORMATS = ( '%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59' '%Y-%m-%d %H:%M:%S.%f', # '20...
34.804878
59
0.389629
# Internationalization # https://docs.djangoproject.com/en/3.0/topics/i18n/ LANGUAGE_CODE = 'en-us' TIME_ZONE = 'UTC' USE_I18N = True USE_L10N = True USE_TZ = True # Configuración de formatos de fechas DATETIME_INPUT_FORMATS = ( '%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59' '%Y-%m-%d %H:%M:%S.%f', # '20...
0
0
0
703e82659ac9ad52df6beb31fc77492e3f62d5db
3,633
py
Python
split-bib.py
2e0byo/bib
9d6cd7fcf214894caa4831d948ac868b696b0a02
[ "CC0-1.0" ]
null
null
null
split-bib.py
2e0byo/bib
9d6cd7fcf214894caa4831d948ac868b696b0a02
[ "CC0-1.0" ]
null
null
null
split-bib.py
2e0byo/bib
9d6cd7fcf214894caa4831d948ac868b696b0a02
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/python from argparse import ArgumentParser from pathlib import Path import subprocess from getkey import getkey from pymdownx import keys # from https://gist.github.com/martin-ueding/4007035 class Colorcodes(object): """ Provides ANSI terminal color codes which are gathered via the ``tput`` uti...
27.522727
82
0.561795
#!/usr/bin/python from argparse import ArgumentParser from pathlib import Path import subprocess from getkey import getkey from pymdownx import keys # from https://gist.github.com/martin-ueding/4007035 class Colorcodes(object): """ Provides ANSI terminal color codes which are gathered via the ``tput`` uti...
2,723
0
96
20a3c05f8f7dbd0b7468631dec757204a38c622f
4,728
py
Python
distributed/comm/addressing.py
met-office-lab/distributed
46e31cadd55456bbd0b85a01f040d1eb33ee587f
[ "BSD-3-Clause" ]
null
null
null
distributed/comm/addressing.py
met-office-lab/distributed
46e31cadd55456bbd0b85a01f040d1eb33ee587f
[ "BSD-3-Clause" ]
1
2021-04-30T20:41:53.000Z
2021-04-30T20:41:53.000Z
distributed/comm/addressing.py
met-office-lab/distributed
46e31cadd55456bbd0b85a01f040d1eb33ee587f
[ "BSD-3-Clause" ]
1
2018-07-06T03:48:08.000Z
2018-07-06T03:48:08.000Z
from __future__ import print_function, division, absolute_import import six from ..config import config from . import registry DEFAULT_SCHEME = config.get('default-scheme', 'tcp') def parse_address(addr, strict=False): """ Split address into its scheme and scheme-dependent location string. >>> parse_...
27.649123
78
0.619924
from __future__ import print_function, division, absolute_import import six from ..config import config from . import registry DEFAULT_SCHEME = config.get('default-scheme', 'tcp') def parse_address(addr, strict=False): """ Split address into its scheme and scheme-dependent location string. >>> parse_...
185
0
54
f26711de310e0a56e03746ce2226ae8ef1929490
27,085
py
Python
pypeit/deprecated/flux_old.py
ykwang1/PypeIt
a96cff699f1284905ce7ef19d06a9027cd333c63
[ "BSD-3-Clause" ]
107
2018-08-06T07:07:20.000Z
2022-02-28T14:33:42.000Z
pypeit/deprecated/flux_old.py
ykwang1/PypeIt
a96cff699f1284905ce7ef19d06a9027cd333c63
[ "BSD-3-Clause" ]
889
2018-07-26T12:14:33.000Z
2022-03-18T22:49:42.000Z
pypeit/deprecated/flux_old.py
ykwang1/PypeIt
a96cff699f1284905ce7ef19d06a9027cd333c63
[ "BSD-3-Clause" ]
74
2018-09-25T17:03:07.000Z
2022-03-10T23:59:24.000Z
## the following massive function is deprecated def generate_sensfunc_old(wave, counts, counts_ivar, airmass, exptime, spectrograph, telluric=False, star_type=None, star_mag=None, ra=None, dec=None, std_file = None, BALM_MASK_WID=5., norder=4, nresln=None,debug=False): """ Function to generat...
45.444631
140
0.622226
## the following massive function is deprecated def generate_sensfunc_old(wave, counts, counts_ivar, airmass, exptime, spectrograph, telluric=False, star_type=None, star_mag=None, ra=None, dec=None, std_file = None, BALM_MASK_WID=5., norder=4, nresln=None,debug=False): """ Function to generat...
1,441
0
23
225bf9f25bf98ea2daf3a88251d26bd761a4c7de
3,536
py
Python
virtuso.py
Thanatoz-1/virtuoso
777b8a526d08751ac93ae236356c035641652824
[ "Apache-2.0" ]
null
null
null
virtuso.py
Thanatoz-1/virtuoso
777b8a526d08751ac93ae236356c035641652824
[ "Apache-2.0" ]
2
2019-12-08T13:18:44.000Z
2019-12-13T12:12:39.000Z
virtuso.py
Thanatoz-1/virtuoso
777b8a526d08751ac93ae236356c035641652824
[ "Apache-2.0" ]
null
null
null
from argparse import ArgumentParser import os import re from collections import defaultdict import random import spacy nlp = spacy.load('en_core_web_sm') target = DataFetcher() def ArgParser(): ''' This is the function to parse your arguments into a more understable form and provide relavant help w...
30.747826
88
0.598982
from argparse import ArgumentParser import os import re from collections import defaultdict import random import spacy nlp = spacy.load('en_core_web_sm') class DataFetcher: def __init__(self): BASE = 'Data/' self.tables = os.listdir(BASE) self._data = defaultdict(lambda: []) for f...
1,271
-3
122
0d79f028460ea1be0d7b0b3b212ae770f0507107
94
py
Python
catcher_modules/__init__.py
Daniel-Han-Yang/catcher_modules
2eff08d2c19719539f761a7cae0a48b69a3231db
[ "Apache-2.0" ]
5
2019-01-09T14:15:25.000Z
2020-09-11T12:18:43.000Z
catcher_modules/__init__.py
Daniel-Han-Yang/catcher_modules
2eff08d2c19719539f761a7cae0a48b69a3231db
[ "Apache-2.0" ]
44
2019-06-30T09:19:42.000Z
2021-12-30T16:09:09.000Z
catcher_modules/__init__.py
Daniel-Han-Yang/catcher_modules
2eff08d2c19719539f761a7cae0a48b69a3231db
[ "Apache-2.0" ]
5
2019-09-01T09:49:05.000Z
2021-09-12T06:00:54.000Z
APPNAME = 'catcher-modules' APPAUTHOR = 'Valerii Tikhonov, Ekaterina Belova' APPVSN = '6.0.0'
23.5
48
0.734043
APPNAME = 'catcher-modules' APPAUTHOR = 'Valerii Tikhonov, Ekaterina Belova' APPVSN = '6.0.0'
0
0
0
588a6b0bc1e1871fc4e4ef910ec05c9b253e71b8
968
py
Python
src/bxgateway/utils/interval_minimum.py
doubleukay/bxgateway
ac01fc9475c039cf4255576dd4ecd6bff6c48f69
[ "MIT" ]
21
2019-11-06T17:37:41.000Z
2022-03-28T07:18:33.000Z
src/bxgateway/utils/interval_minimum.py
doubleukay/bxgateway
ac01fc9475c039cf4255576dd4ecd6bff6c48f69
[ "MIT" ]
4
2019-11-06T22:08:00.000Z
2021-12-08T06:20:51.000Z
src/bxgateway/utils/interval_minimum.py
doubleukay/bxgateway
ac01fc9475c039cf4255576dd4ecd6bff6c48f69
[ "MIT" ]
10
2020-08-05T15:58:16.000Z
2022-02-07T23:51:10.000Z
from typing import Optional from bxcommon.utils.alarm_queue import AlarmQueue from bxutils import logging logger = logging.get_logger(__name__)
30.25
79
0.72624
from typing import Optional from bxcommon.utils.alarm_queue import AlarmQueue from bxutils import logging logger = logging.get_logger(__name__) class IntervalMinimum: def __init__(self, interval_len_s: int, alarm_queue: AlarmQueue): self.current_minimum: int = 0 self._interval_len_s = interval...
716
1
104
c428d11f614a84c41c037c142536fd24d6772c42
145
py
Python
AcademicDealerBackend/project_level_tests.py
Acciente717/AcademicDealerBackend
8024725f88997fa430fa92e1caa28161ffbb06f6
[ "MIT" ]
5
2019-03-10T06:57:15.000Z
2019-03-17T03:04:40.000Z
AcademicDealerBackend/project_level_tests.py
Acciente717/AcademicDealerBackend
8024725f88997fa430fa92e1caa28161ffbb06f6
[ "MIT" ]
11
2019-05-14T15:13:48.000Z
2019-05-31T15:31:33.000Z
AcademicDealerBackend/project_level_tests.py
Acciente717/AcademicDealerBackend
8024725f88997fa430fa92e1caa28161ffbb06f6
[ "MIT" ]
null
null
null
import sys sys.path.append("./AcademicDealerBackend/users") from tests.py import CoreFunctionalTest CoreFunctionalTest().test_core_functions()
20.714286
48
0.827586
import sys sys.path.append("./AcademicDealerBackend/users") from tests.py import CoreFunctionalTest CoreFunctionalTest().test_core_functions()
0
0
0
0d0a3891596f7bbd389105cdc17d75da9f6f2560
108
py
Python
tasks/EPAM/python_course/foundation-python/l7/m7-18-other-tools.py
AleksNeStu/projects
1a4c68dfbdcb77228f0f3617e58fd18fcb1f5dbb
[ "Apache-2.0" ]
2
2022-01-19T18:01:35.000Z
2022-02-06T06:54:38.000Z
tasks/EPAM/python_course/foundation-python/l7/m7-18-other-tools.py
AleksNeStu/projects
1a4c68dfbdcb77228f0f3617e58fd18fcb1f5dbb
[ "Apache-2.0" ]
null
null
null
tasks/EPAM/python_course/foundation-python/l7/m7-18-other-tools.py
AleksNeStu/projects
1a4c68dfbdcb77228f0f3617e58fd18fcb1f5dbb
[ "Apache-2.0" ]
null
null
null
# RunSnakeRun # https://pypi.python.org/pypi/RunSnakeRun # http://www.vrplumber.com/programming/runsnakerun/
36
51
0.787037
# RunSnakeRun # https://pypi.python.org/pypi/RunSnakeRun # http://www.vrplumber.com/programming/runsnakerun/
0
0
0
d7e2763dfb95ef81aa2a40092387dd5fb62e4526
2,854
py
Python
dashboards/soap_explorer/soap_cluster.py
jmmshn/mp_dash_boards
19f893fb50d88368068e9e6b9518bd2041db41e9
[ "MIT" ]
null
null
null
dashboards/soap_explorer/soap_cluster.py
jmmshn/mp_dash_boards
19f893fb50d88368068e9e6b9518bd2041db41e9
[ "MIT" ]
null
null
null
dashboards/soap_explorer/soap_cluster.py
jmmshn/mp_dash_boards
19f893fb50d88368068e9e6b9518bd2041db41e9
[ "MIT" ]
null
null
null
# %% from typing import List from monty.serialization import loadfn import dash import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output from dash_mp_components import Simple3DScene from pymatgen import Site import crystal_toolkit # noqa: F401 from pymatgen.ana...
28.828283
105
0.653819
# %% from typing import List from monty.serialization import loadfn import dash import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output from dash_mp_components import Simple3DScene from pymatgen import Site import crystal_toolkit # noqa: F401 from pymatgen.ana...
644
0
67
0a404d9cd9a4229d8ab11fccf16b502660913ff8
954
py
Python
conftest.py
kriti-d/snyker
33d256a93428de6eb27cb30b480ce3978551bada
[ "Apache-2.0" ]
1
2021-06-30T02:41:41.000Z
2021-06-30T02:41:41.000Z
conftest.py
kriti-d/snyker
33d256a93428de6eb27cb30b480ce3978551bada
[ "Apache-2.0" ]
1
2020-12-04T12:18:48.000Z
2020-12-04T12:18:48.000Z
conftest.py
kriti-d/snyker
33d256a93428de6eb27cb30b480ce3978551bada
[ "Apache-2.0" ]
3
2021-01-28T14:47:14.000Z
2021-10-17T17:08:10.000Z
""" Configuration for pytest fixtures """ import boto3 # type: ignore import pytest # type: ignore from chalice import Chalice # type: ignore from moto import mock_ssm # type: ignore @pytest.fixture def app() -> Chalice: """Return the application for testing""" from app import app as chalice_app # pylin...
26.5
81
0.719078
""" Configuration for pytest fixtures """ import boto3 # type: ignore import pytest # type: ignore from chalice import Chalice # type: ignore from moto import mock_ssm # type: ignore @pytest.fixture def app() -> Chalice: """Return the application for testing""" from app import app as chalice_app # pylin...
0
0
0
f905cd9d13b659e019e1b8c2279b949410a81e30
33
py
Python
foreshadow/tests/test_optimizers/test_param_distribution.py
adithyabsk/foreshadow
ca2e927c396ae0d61923b287d6e32e142f3ba96f
[ "Apache-2.0" ]
25
2018-07-26T17:30:31.000Z
2021-02-23T22:54:01.000Z
foreshadow/tests/test_optimizers/test_param_distribution.py
adithyabsk/foreshadow
ca2e927c396ae0d61923b287d6e32e142f3ba96f
[ "Apache-2.0" ]
150
2018-11-02T18:09:12.000Z
2020-05-15T01:01:35.000Z
foreshadow/tests/test_optimizers/test_param_distribution.py
adithyabsk/foreshadow
ca2e927c396ae0d61923b287d6e32e142f3ba96f
[ "Apache-2.0" ]
1
2019-02-20T22:24:00.000Z
2019-02-20T22:24:00.000Z
"""Test param_distribution.py"""
16.5
32
0.727273
"""Test param_distribution.py"""
0
0
0
a8591c2532e37813020aa5a34fa1d7e47e702528
6,934
py
Python
a10sdk/core/slb/slb_template_diameter.py
deepfield/a10sdk-python
bfaa58099f51f085d5e91652d1d1a3fd5c529d5d
[ "Apache-2.0" ]
16
2015-05-20T07:26:30.000Z
2021-01-23T11:56:57.000Z
a10sdk/core/slb/slb_template_diameter.py
deepfield/a10sdk-python
bfaa58099f51f085d5e91652d1d1a3fd5c529d5d
[ "Apache-2.0" ]
6
2015-03-24T22:07:11.000Z
2017-03-28T21:31:18.000Z
a10sdk/core/slb/slb_template_diameter.py
deepfield/a10sdk-python
bfaa58099f51f085d5e91652d1d1a3fd5c529d5d
[ "Apache-2.0" ]
23
2015-03-29T15:43:01.000Z
2021-06-02T17:12:01.000Z
from a10sdk.common.A10BaseClass import A10BaseClass class AvpList(A10BaseClass): """This class does not support CRUD Operations please use parent. :param int32: {"description": "32 bits integer", "format": "number", "not-list": ["int64", "string"], "maximum": 2147483647, "minimum": 0, "type": "number"} ...
58.268908
882
0.625036
from a10sdk.common.A10BaseClass import A10BaseClass class AvpList(A10BaseClass): """This class does not support CRUD Operations please use parent. :param int32: {"description": "32 bits integer", "format": "number", "not-list": ["int64", "string"], "maximum": 2147483647, "minimum": 0, "type": "number"} ...
1,299
0
78
4072a3fa19318b9de75a69e7c0ce5bed60bfb034
18,031
py
Python
dexbot/storage.py
bitProfessor/DEXBot
5d692fbf1acffeec46a82a12474b8a123e4c6370
[ "MIT" ]
1
2021-04-22T09:18:55.000Z
2021-04-22T09:18:55.000Z
dexbot/storage.py
bitProfessor/DEXBot
5d692fbf1acffeec46a82a12474b8a123e4c6370
[ "MIT" ]
null
null
null
dexbot/storage.py
bitProfessor/DEXBot
5d692fbf1acffeec46a82a12474b8a123e4c6370
[ "MIT" ]
2
2021-02-13T10:58:33.000Z
2022-03-04T14:01:58.000Z
import os import os.path import sys import json import threading import queue import uuid import alembic import alembic.config from appdirs import user_data_dir from . import helper from dexbot import APP_NAME, AUTHOR from sqlalchemy import create_engine, Column, String, Integer, Float, Boolean from sqlalchemy.ext.d...
35.216797
120
0.638179
import os import os.path import sys import json import threading import queue import uuid import alembic import alembic.config from appdirs import user_data_dir from . import helper from dexbot import APP_NAME, AUTHOR from sqlalchemy import create_engine, Column, String, Integer, Float, Boolean from sqlalchemy.ext.d...
9,251
775
1,334
af540bd821c2bc1496e49d1e9f07b11f45c0e73e
16,643
py
Python
fixtures/bridge_domain_fixture.py
lmadhusudhanan/contrail-test
bd39ff19da06a20bd79af8c25e3cde07375577cf
[ "Apache-2.0" ]
null
null
null
fixtures/bridge_domain_fixture.py
lmadhusudhanan/contrail-test
bd39ff19da06a20bd79af8c25e3cde07375577cf
[ "Apache-2.0" ]
1
2021-06-01T22:19:48.000Z
2021-06-01T22:19:48.000Z
fixtures/bridge_domain_fixture.py
lmadhusudhanan/contrail-test
bd39ff19da06a20bd79af8c25e3cde07375577cf
[ "Apache-2.0" ]
null
null
null
from tcutils.util import * from vnc_api.vnc_api import * import vnc_api_test class BDFixture(vnc_api_test.VncLibFixture): ''' Bridge Domain Fixture ''' def create_bd(self): ''' Creates a bridge domain ''' self.bd_obj = BridgeDomain(name=self.bd_name, ...
39.252358
98
0.577841
from tcutils.util import * from vnc_api.vnc_api import * import vnc_api_test class BDFixture(vnc_api_test.VncLibFixture): ''' Bridge Domain Fixture ''' def __init__(self, parent_obj, bd_name=None, bd_uuid=None, **kwargs): super(BDFixture, self).__init__(self, **kwargs) self.parent_obj ...
4,065
0
270
d9dbe1564fc700c61b7507bb9b58065a2f63e0e5
14,490
py
Python
povary/apps/master_class/migrations/0009_auto__add_field_masterclass_visits_num__add_field_categorymc_visits_nu.py
TorinAsakura/cooking
cf0c78f613fa9ce0fcd4ec7a397ab880d9dd631a
[ "BSD-3-Clause" ]
null
null
null
povary/apps/master_class/migrations/0009_auto__add_field_masterclass_visits_num__add_field_categorymc_visits_nu.py
TorinAsakura/cooking
cf0c78f613fa9ce0fcd4ec7a397ab880d9dd631a
[ "BSD-3-Clause" ]
null
null
null
povary/apps/master_class/migrations/0009_auto__add_field_masterclass_visits_num__add_field_categorymc_visits_nu.py
TorinAsakura/cooking
cf0c78f613fa9ce0fcd4ec7a397ab880d9dd631a
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models
71.732673
182
0.560663
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'MasterClass.visits_num' db.add_column('master_class_masterclass', 'visits_num', ...
1,098
13,239
23
f16671322873b3ab7c7a3a7ce2fce8aa55512aba
1,995
py
Python
150-Challenges/Challenges 88 - 95/Challenge 94.py
DGrifferty/Python
d725301664db2cbcfd5c4f5974745b4d81c8e28a
[ "Apache-2.0" ]
null
null
null
150-Challenges/Challenges 88 - 95/Challenge 94.py
DGrifferty/Python
d725301664db2cbcfd5c4f5974745b4d81c8e28a
[ "Apache-2.0" ]
null
null
null
150-Challenges/Challenges 88 - 95/Challenge 94.py
DGrifferty/Python
d725301664db2cbcfd5c4f5974745b4d81c8e28a
[ "Apache-2.0" ]
null
null
null
# 094 # Display an array of five numbers. Ask the user to select one # of the numbers. Once they have selected a number, display the # position of that item in the array. If they enter something that # is not in the array, ask them to try again until they select # a relevant item. import array as ar import numpy as np...
23.197674
70
0.601504
# 094 # Display an array of five numbers. Ask the user to select one # of the numbers. Once they have selected a number, display the # position of that item in the array. If they enter something that # is not in the array, ask them to try again until they select # a relevant item. import array as ar import numpy as np...
0
0
0
8a1288e18e7a9b82a827aad422ef1aa964f3fc0c
334
py
Python
PycharmProjects/pythonteste/ex017.py
caioalexleme/Curso_Python
6394f60689531c7431765538f1b699aabbf4acb2
[ "MIT" ]
3
2021-07-09T20:41:47.000Z
2021-11-17T10:25:01.000Z
PycharmProjects/pythonteste/ex017.py
caioalexleme/Curso_Python
6394f60689531c7431765538f1b699aabbf4acb2
[ "MIT" ]
null
null
null
PycharmProjects/pythonteste/ex017.py
caioalexleme/Curso_Python
6394f60689531c7431765538f1b699aabbf4acb2
[ "MIT" ]
1
2021-09-09T20:24:07.000Z
2021-09-09T20:24:07.000Z
import math co = float(input('Comprimento do cateto oposto: ')) ca = float(input('Comprimento do cateto adjacente: ')) hi = math.hypot(co, ca) print('A hipotenusa vai medir {:.2f}'.format(hi)) '''hi = (co ** 2 + ca ** 2) **(1/2) print('A hipotenusa vai medir {:.2f}'.format(hi))''' '''Usando matematicamente sem precisa...
41.75
104
0.658683
import math co = float(input('Comprimento do cateto oposto: ')) ca = float(input('Comprimento do cateto adjacente: ')) hi = math.hypot(co, ca) print('A hipotenusa vai medir {:.2f}'.format(hi)) '''hi = (co ** 2 + ca ** 2) **(1/2) print('A hipotenusa vai medir {:.2f}'.format(hi))''' '''Usando matematicamente sem precisa...
0
0
0
cceeb312e1e0b4d346b44ac72c5a6f4d2bafbd85
9,439
py
Python
monasca_notification/plugins/jira_notifier.py
openstack/monasca-notification
975f46d226e479180c6499fe34073225aeadefdb
[ "Apache-2.0" ]
25
2015-10-18T02:54:54.000Z
2020-04-16T12:05:27.000Z
monasca_notification/plugins/jira_notifier.py
openstack/monasca-notification
975f46d226e479180c6499fe34073225aeadefdb
[ "Apache-2.0" ]
1
2020-12-05T06:18:12.000Z
2020-12-05T06:18:14.000Z
monasca_notification/plugins/jira_notifier.py
openstack/monasca-notification
975f46d226e479180c6499fe34073225aeadefdb
[ "Apache-2.0" ]
14
2016-01-11T08:58:56.000Z
2021-11-19T09:11:19.000Z
# (C) Copyright 2016 Hewlett Packard Enterprise Development Company LP # Copyright 2017 Fujitsu LIMITED # # 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/L...
38.369919
97
0.637568
# (C) Copyright 2016 Hewlett Packard Enterprise Development Company LP # Copyright 2017 Fujitsu LIMITED # # 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/L...
2,163
5,043
69
f445224ff812a87f09a566ea2f913fa27571701a
3,889
py
Python
vectorhub/encoders/text/torch_transformers/legal_bert.py
NanaAkwasiAbayieBoateng/vectorhub
265933521cf0a3113a47182a30b0037bf163584b
[ "Apache-2.0" ]
1
2020-11-04T16:02:39.000Z
2020-11-04T16:02:39.000Z
vectorhub/encoders/text/torch_transformers/legal_bert.py
NanaAkwasiAbayieBoateng/vectorhub
265933521cf0a3113a47182a30b0037bf163584b
[ "Apache-2.0" ]
null
null
null
vectorhub/encoders/text/torch_transformers/legal_bert.py
NanaAkwasiAbayieBoateng/vectorhub
265933521cf0a3113a47182a30b0037bf163584b
[ "Apache-2.0" ]
null
null
null
from typing import List, Union from ..base import BaseText2Vec from ....base import catch_vector_errors from ....doc_utils import ModelDefinition from ....import_utils import * from ....models_dict import MODEL_REQUIREMENTS from datetime import date if is_all_dependency_installed(MODEL_REQUIREMENTS['encoders-text-torch...
54.774648
1,034
0.717151
from typing import List, Union from ..base import BaseText2Vec from ....base import catch_vector_errors from ....doc_utils import ModelDefinition from ....import_utils import * from ....models_dict import MODEL_REQUIREMENTS from datetime import date if is_all_dependency_installed(MODEL_REQUIREMENTS['encoders-text-torch...
587
1,161
23
6bfaa00fe949d7084b0d4ac71e333e1f7a72d58c
3,365
py
Python
tests/storage/test_keys.py
skalarproduktraum/synapse
c831748f4d243d74e9a3fd2042bc2b35cc30f961
[ "Apache-2.0" ]
null
null
null
tests/storage/test_keys.py
skalarproduktraum/synapse
c831748f4d243d74e9a3fd2042bc2b35cc30f961
[ "Apache-2.0" ]
null
null
null
tests/storage/test_keys.py
skalarproduktraum/synapse
c831748f4d243d74e9a3fd2042bc2b35cc30f961
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2017 Vector Creations 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 applica...
36.576087
82
0.652006
# -*- coding: utf-8 -*- # Copyright 2017 Vector Creations 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 applica...
818
1,583
23
c42eb39561010eb8403eb0346e47bae8171fc4d3
2,987
py
Python
AlpacaNewsRetriever/NewsRetriever.py
caixunshiren/alpaca-news-api
5bdfb8883148754f2f9eeba8aee34a4607d4584e
[ "MIT" ]
null
null
null
AlpacaNewsRetriever/NewsRetriever.py
caixunshiren/alpaca-news-api
5bdfb8883148754f2f9eeba8aee34a4607d4584e
[ "MIT" ]
null
null
null
AlpacaNewsRetriever/NewsRetriever.py
caixunshiren/alpaca-news-api
5bdfb8883148754f2f9eeba8aee34a4607d4584e
[ "MIT" ]
1
2022-03-02T03:53:47.000Z
2022-03-02T03:53:47.000Z
import requests import pandas as pd import time class AlpacaNewsRetriever: """ Class for getting historical news from Alpaca __init__(): API_ID: your Alpaca ID API_KEY: your Alpaca secret key get_news(): symbol: Ticker of the stock. e.g. AAPL start: start timestamp in ...
40.917808
115
0.603281
import requests import pandas as pd import time class AlpacaNewsRetriever: """ Class for getting historical news from Alpaca __init__(): API_ID: your Alpaca ID API_KEY: your Alpaca secret key get_news(): symbol: Ticker of the stock. e.g. AAPL start: start timestamp in ...
2,005
0
106
897644b4e3ff887ea94b2e372e01f943dd13acdc
12,861
py
Python
image/__init__.py
conducto/conducto
b480780905f5a25e8c803b60ca7cdf6976ce5ef6
[ "Apache-2.0" ]
25
2020-05-07T22:51:11.000Z
2021-11-17T16:14:42.000Z
image/__init__.py
conducto/conducto
b480780905f5a25e8c803b60ca7cdf6976ce5ef6
[ "Apache-2.0" ]
3
2020-04-21T06:38:02.000Z
2020-05-31T01:57:19.000Z
image/__init__.py
conducto/conducto
b480780905f5a25e8c803b60ca7cdf6976ce5ef6
[ "Apache-2.0" ]
2
2020-05-14T01:47:32.000Z
2020-06-03T21:58:12.000Z
import contextlib import concurrent.futures import os import sys import traceback import typing import itertools from conducto.shared import ( async_utils, client_utils, types as t, log, ) import conducto from . import dockerfile as dockerfile_mod, names from conducto.shared import constants, imagepa...
34.94837
109
0.651816
import contextlib import concurrent.futures import os import sys import traceback import typing import itertools from conducto.shared import ( async_utils, client_utils, types as t, log, ) import conducto from . import dockerfile as dockerfile_mod, names from conducto.shared import constants, imagepa...
5,694
29
427
21f53f03707cdfeaf7be966e79c22e21d805b3f7
710
py
Python
src/python/doufo/qlambda.py
Hong-Xiang/doufo
3d375fef30670597768a6eef809b75b4b1b5a3fd
[ "Apache-2.0" ]
3
2018-08-05T07:16:34.000Z
2018-08-10T05:28:24.000Z
src/python/doufo/qlambda.py
tech-pi/doufo
3d375fef30670597768a6eef809b75b4b1b5a3fd
[ "Apache-2.0" ]
10
2018-09-16T15:44:19.000Z
2018-10-06T10:39:59.000Z
src/python/doufo/qlambda.py
tech-pi/doufo
3d375fef30670597768a6eef809b75b4b1b5a3fd
[ "Apache-2.0" ]
1
2018-08-04T08:13:50.000Z
2018-08-04T08:13:50.000Z
""" Quick lambda creator, useful for use in fmap, filter, etc. e.g. List([1,2]).fmap(x + 1) """ from doufo import WrappedFunction, identity, Functor, FunctorArithmeticMixin import operator __all__ = ['QuickLambda', 'x'] class QuickLambda(WrappedFunction, FunctorArithmeticMixin): """ QuickLambda constructor....
22.903226
76
0.669014
""" Quick lambda creator, useful for use in fmap, filter, etc. e.g. List([1,2]).fmap(x + 1) """ from doufo import WrappedFunction, identity, Functor, FunctorArithmeticMixin import operator __all__ = ['QuickLambda', 'x'] class QuickLambda(WrappedFunction, FunctorArithmeticMixin): """ QuickLambda constructor....
245
0
108
956e8f44b682bac08ca006ab5acb457d983ced03
7,849
py
Python
workbench/server/plugin_manager.py
Ayub-Khan/workbench
710232756dd717f734253315e3d0b33c9628dafb
[ "MIT" ]
61
2015-01-04T01:23:49.000Z
2021-06-22T14:41:10.000Z
workbench/server/plugin_manager.py
Ayub-Khan/workbench
710232756dd717f734253315e3d0b33c9628dafb
[ "MIT" ]
3
2015-01-02T23:26:59.000Z
2015-01-03T19:28:36.000Z
workbench/server/plugin_manager.py
Ayub-Khan/workbench
710232756dd717f734253315e3d0b33c9628dafb
[ "MIT" ]
17
2015-08-25T23:57:22.000Z
2020-05-30T02:36:05.000Z
"""A simple plugin manager. Rolling my own for three reasons: 1) Environmental scan did not give me quite what I wanted. 2) The super simple examples didn't support automatic/dynamic loading. 3) I kinda wanted to understand the process :) """ import os, sys from datetime import datetime import dir_watcher imp...
35.515837
108
0.600459
"""A simple plugin manager. Rolling my own for three reasons: 1) Environmental scan did not give me quite what I wanted. 2) The super simple examples didn't support automatic/dynamic loading. 3) I kinda wanted to understand the process :) """ import os, sys from datetime import datetime import dir_watcher imp...
0
0
0
df4e3fd85ec89f3c2dc03118a5361d9f7272ed99
2,313
py
Python
__init__.py
krisgesling/swag-badge-skill
7640264880d8ae14f9c49c3ba40c6e388e58dcaf
[ "Apache-2.0" ]
1
2021-01-24T01:42:15.000Z
2021-01-24T01:42:15.000Z
__init__.py
krisgesling/swag-badge-skill
7640264880d8ae14f9c49c3ba40c6e388e58dcaf
[ "Apache-2.0" ]
null
null
null
__init__.py
krisgesling/swag-badge-skill
7640264880d8ae14f9c49c3ba40c6e388e58dcaf
[ "Apache-2.0" ]
null
null
null
import os from subprocess import call from mycroft import MycroftSkill from .badge import MQTT_Client from .util import wrap_text class SwagBadge(MycroftSkill): """Provide interaction between Mycroft and a Swag Badge. For more details on the Swag Badge from LinuxConfAu 2021 see: http://www.openhardwareco...
30.038961
88
0.613489
import os from subprocess import call from mycroft import MycroftSkill from .badge import MQTT_Client from .util import wrap_text class SwagBadge(MycroftSkill): """Provide interaction between Mycroft and a Swag Badge. For more details on the Swag Badge from LinuxConfAu 2021 see: http://www.openhardwareco...
666
0
131
fc73e92f597f35947bedf2470fc9fcc7c500e873
5,492
py
Python
DeviceAPI/MagnumThermostat.py
ajfar-bem/wisebldg
0cb8ef7c5984cbb5cc86e40780fdf4e14e5bda05
[ "Unlicense" ]
null
null
null
DeviceAPI/MagnumThermostat.py
ajfar-bem/wisebldg
0cb8ef7c5984cbb5cc86e40780fdf4e14e5bda05
[ "Unlicense" ]
null
null
null
DeviceAPI/MagnumThermostat.py
ajfar-bem/wisebldg
0cb8ef7c5984cbb5cc86e40780fdf4e14e5bda05
[ "Unlicense" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import division ''' Copyright © 2014 by Virginia Polytechnic Institute and State University All rights reserved Virginia Polytechnic Institute and State University (Virginia Tech) owns the copyright for the BEMOSS software and its associated documentation (“Software”) and retain...
54.92
206
0.734523
# -*- coding: utf-8 -*- from __future__ import division ''' Copyright © 2014 by Virginia Polytechnic Institute and State University All rights reserved Virginia Polytechnic Institute and State University (Virginia Tech) owns the copyright for the BEMOSS software and its associated documentation (“Software”) and retain...
1,521
1,103
23
8f0e40e1e9ad26888f88397edb734ee26570185f
1,337
py
Python
profiles/migrations/0004_auto_20180322_2323.py
joatuapp/joatu-django
5626d03ba89c55650ff5bff2e706ca0883ae3b9c
[ "MIT" ]
10
2018-05-13T18:01:57.000Z
2018-12-23T17:11:14.000Z
profiles/migrations/0004_auto_20180322_2323.py
moileretour/joatu
9d18cb58b4280235688e269be6fd2d34b77ccead
[ "MIT" ]
88
2018-05-04T15:33:46.000Z
2022-03-08T21:09:21.000Z
profiles/migrations/0004_auto_20180322_2323.py
joatuapp/joatu-django
5626d03ba89c55650ff5bff2e706ca0883ae3b9c
[ "MIT" ]
7
2018-05-08T16:05:06.000Z
2018-09-13T05:49:05.000Z
# Generated by Django 2.0.3 on 2018-03-23 03:23 from django.db import migrations, models import django.db.models.deletion
29.065217
118
0.579656
# Generated by Django 2.0.3 on 2018-03-23 03:23 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('profiles', '0003_auto_20180322_2257'), ] operations = [ migrations.RemoveField( model_name='pro...
0
1,190
23
1e89d3726c6c30924f01c404b413fb86e1e9b799
1,370
py
Python
chapter7/stylegan2_pytorch/mapping_network.py
tms-byte/gan_sample
1ff723cf37af902b400dbb68777a52e6e3dfcc89
[ "MIT" ]
57
2021-02-11T12:25:30.000Z
2022-03-16T11:47:21.000Z
chapter7/stylegan2_pytorch/mapping_network.py
tms-byte/gan_sample
1ff723cf37af902b400dbb68777a52e6e3dfcc89
[ "MIT" ]
8
2021-02-22T01:38:36.000Z
2021-06-29T15:55:04.000Z
chapter7/stylegan2_pytorch/mapping_network.py
tms-byte/gan_sample
1ff723cf37af902b400dbb68777a52e6e3dfcc89
[ "MIT" ]
11
2021-02-11T14:49:08.000Z
2022-01-26T04:18:11.000Z
import numpy as np import torch.nn as nn import torch from dense_layer import DenseLayer from fused_bias_activation import FusedBiasActivation from base_layer import BaseLayer from tensorboard_logger import TensorboardLogger
35.128205
112
0.669343
import numpy as np import torch.nn as nn import torch from dense_layer import DenseLayer from fused_bias_activation import FusedBiasActivation from base_layer import BaseLayer from tensorboard_logger import TensorboardLogger class MappingNetwork(BaseLayer): def __init__(self, dlaten_size, opt): super(Mapp...
1,030
11
103
9ffd4b2fe2dd2b154da114d62a59314623da1cc0
1,063
py
Python
src/genie/libs/parser/iosxr/tests/ShowMplsLdpDiscovery/cli/equal/golden_output_2_expected.py
balmasea/genieparser
d1e71a96dfb081e0a8591707b9d4872decd5d9d3
[ "Apache-2.0" ]
204
2018-06-27T00:55:27.000Z
2022-03-06T21:12:18.000Z
src/genie/libs/parser/iosxr/tests/ShowMplsLdpDiscovery/cli/equal/golden_output_2_expected.py
balmasea/genieparser
d1e71a96dfb081e0a8591707b9d4872decd5d9d3
[ "Apache-2.0" ]
468
2018-06-19T00:33:18.000Z
2022-03-31T23:23:35.000Z
src/genie/libs/parser/iosxr/tests/ShowMplsLdpDiscovery/cli/equal/golden_output_2_expected.py
balmasea/genieparser
d1e71a96dfb081e0a8591707b9d4872decd5d9d3
[ "Apache-2.0" ]
309
2019-01-16T20:21:07.000Z
2022-03-30T12:56:41.000Z
expected_output = { 'vrf': { 'default': { 'local_ldp_identifier': { '10.52.31.247:0': { 'discovery_sources': { 'interfaces': { 'TenGigE0/0/0/5.2097': { 'ldp_id': { ...
35.433333
82
0.238946
expected_output = { 'vrf': { 'default': { 'local_ldp_identifier': { '10.52.31.247:0': { 'discovery_sources': { 'interfaces': { 'TenGigE0/0/0/5.2097': { 'ldp_id': { ...
0
0
0
793d35dc4008ac42c5b5a7d8858e3efef0efcc65
2,887
py
Python
cad_tickers/sedar/tsx.py
FriendlyUser/cad_tickers
2f99a4494498419d8decf41fb0fbc77722dbc712
[ "MIT" ]
2
2022-03-16T02:19:25.000Z
2022-03-16T02:22:39.000Z
cad_tickers/sedar/tsx.py
FriendlyUser/cad_tickers
2f99a4494498419d8decf41fb0fbc77722dbc712
[ "MIT" ]
57
2020-07-30T15:43:43.000Z
2022-03-28T02:04:13.000Z
cad_tickers/sedar/tsx.py
FriendlyUser/cad_tickers
2f99a4494498419d8decf41fb0fbc77722dbc712
[ "MIT" ]
null
null
null
import requests import json from datetime import datetime from cad_tickers.exchanges.tsx.gql_data import GQL from typing import Union def get_ticker_filings( symbol: str, fromDate: str = datetime.today().replace(day=1).strftime("%Y-%m-%d"), toDate: str = datetime.today().strftime("%Y-%m-%d"), limit: i...
28.584158
74
0.5646
import requests import json from datetime import datetime from cad_tickers.exchanges.tsx.gql_data import GQL from typing import Union def get_ticker_filings( symbol: str, fromDate: str = datetime.today().replace(day=1).strftime("%Y-%m-%d"), toDate: str = datetime.today().strftime("%Y-%m-%d"), limit: i...
0
0
0
6344581f2661ecf2f2d823aec09b3d2b924df53c
365
py
Python
ampel/contrib/gamma/channels.py
RuslanKonno/Ampel-contrib-gamma
c552823f754554d784db157eea8ffd612ea2d0df
[ "BSD-3-Clause" ]
null
null
null
ampel/contrib/gamma/channels.py
RuslanKonno/Ampel-contrib-gamma
c552823f754554d784db157eea8ffd612ea2d0df
[ "BSD-3-Clause" ]
null
null
null
ampel/contrib/gamma/channels.py
RuslanKonno/Ampel-contrib-gamma
c552823f754554d784db157eea8ffd612ea2d0df
[ "BSD-3-Clause" ]
null
null
null
from os.path import dirname, join import json
24.333333
64
0.728767
from os.path import dirname, join import json def load_channels(): with open(join(dirname(__file__), "channels.json")) as f: return json.load(f) def load_t2_run_configs(): with open(join(dirname(__file__), "t2_run_configs.json")) as f: return json.load(f) def load_t3_jobs(): with open(join(dirname(__file__), ...
250
0
69
c5876f0f0b87f80844430381e47a218150e0e357
1,012
py
Python
mentor_helper/questions/models.py
idisblueflash/mentor-helper
93265a654a0752a21cf87f5569baae02ed03d31e
[ "MIT" ]
null
null
null
mentor_helper/questions/models.py
idisblueflash/mentor-helper
93265a654a0752a21cf87f5569baae02ed03d31e
[ "MIT" ]
null
null
null
mentor_helper/questions/models.py
idisblueflash/mentor-helper
93265a654a0752a21cf87f5569baae02ed03d31e
[ "MIT" ]
null
null
null
from django.db import models # Create your models here.
28.914286
70
0.725296
from django.db import models # Create your models here. class SkillPoint(models.Model): name = models.CharField(max_length=200) def __str__(self): return self.name class Category(models.Model): name = models.CharField(max_length=200) def __str__(self): return self.name class Questio...
115
749
91
783b2e782983edf1245746b1a07c08b6bc41a100
5,415
py
Python
rogue/challenge/challenge.py
cypher-me/HAS-Qualifier-Challenges
bb795303716155dad4a930880a58fecb5d9b50c5
[ "MIT" ]
75
2020-07-20T20:54:00.000Z
2022-03-09T09:18:37.000Z
rogue/challenge/challenge.py
cypher-me/HAS-Qualifier-Challenges
bb795303716155dad4a930880a58fecb5d9b50c5
[ "MIT" ]
3
2020-09-13T00:46:49.000Z
2021-07-06T16:18:22.000Z
rogue/challenge/challenge.py
cypher-me/HAS-Qualifier-Challenges
bb795303716155dad4a930880a58fecb5d9b50c5
[ "MIT" ]
14
2020-07-22T16:34:51.000Z
2021-09-13T12:19:59.000Z
import os, sys import numpy as np import time import math from scipy.spatial.transform import Rotation as R from skyfield.api import load,Topos from skyfield.earthlib import terra, reverse_terra from timeout import timeout, TimeoutError timeout_time = int(os.getenv("TIMEOUT",60)) speed_of_light_km_ns = 0.000299792 a...
27.211055
83
0.570452
import os, sys import numpy as np import time import math from scipy.spatial.transform import Rotation as R from skyfield.api import load,Topos from skyfield.earthlib import terra, reverse_terra from timeout import timeout, TimeoutError timeout_time = int(os.getenv("TIMEOUT",60)) speed_of_light_km_ns = 0.000299792 a...
3,001
0
205
e304abf6a01e3079ded5e6bdfcc34f40a13a42b7
403
py
Python
config.py
uk-gov-mirror/LandRegistry.search-api-alpha
da9760e6563299518ba4fccb3c958e64a4f1c763
[ "MIT" ]
null
null
null
config.py
uk-gov-mirror/LandRegistry.search-api-alpha
da9760e6563299518ba4fccb3c958e64a4f1c763
[ "MIT" ]
1
2021-06-01T22:00:40.000Z
2021-06-01T22:00:40.000Z
config.py
uk-gov-mirror/LandRegistry.search-api-alpha
da9760e6563299518ba4fccb3c958e64a4f1c763
[ "MIT" ]
1
2021-04-11T05:22:35.000Z
2021-04-11T05:22:35.000Z
import os
26.866667
65
0.761787
import os class Config(object): DEBUG = False ELASTICSEARCH_HOST = os.environ['ELASTICSEARCH_HOST'] ELASTICSEARCH_PORT = os.environ['ELASTICSEARCH_PORT'] ELASTICSEARCH_USESSL = os.environ['ELASTICSEARCH_USESSL'] ELASTICSEARCH_USERPASS = os.environ['ELASTICSEARCH_USERPASS'] class DevelopmentConfig(...
0
324
69
38fb95037a513aa50d7261f6b8818c317e7f9a8d
7,217
py
Python
j5/backends/hardware/sr/v4/power_board.py
udhayacommits/j5
2b516af67ccf5aa31e20489d479c48075e737f4d
[ "MIT" ]
null
null
null
j5/backends/hardware/sr/v4/power_board.py
udhayacommits/j5
2b516af67ccf5aa31e20489d479c48075e737f4d
[ "MIT" ]
null
null
null
j5/backends/hardware/sr/v4/power_board.py
udhayacommits/j5
2b516af67ccf5aa31e20489d479c48075e737f4d
[ "MIT" ]
null
null
null
"""Hardware Backend for the SR V4 power board.""" import struct from datetime import timedelta from time import sleep from typing import Callable, Dict, Mapping, Set, cast import usb from j5.backends.hardware.env import NotSupportedByHardwareError from j5.backends.hardware.j5.raw_usb import ( RawUSBHardwareBacke...
38.185185
90
0.640987
"""Hardware Backend for the SR V4 power board.""" import struct from datetime import timedelta from time import sleep from typing import Callable, Dict, Mapping, Set, cast import usb from j5.backends.hardware.env import NotSupportedByHardwareError from j5.backends.hardware.j5.raw_usb import ( RawUSBHardwareBacke...
366
0
26
bf27a951fe891c22d59e5ab0f3da52fcd0d0ceca
2,163
py
Python
intreehooks.py
hroncok/intreehooks
675b0a9039abe61839c267edcc440ee13331aad3
[ "MIT" ]
5
2018-08-30T19:04:25.000Z
2020-05-01T18:51:37.000Z
intreehooks.py
hroncok/intreehooks
675b0a9039abe61839c267edcc440ee13331aad3
[ "MIT" ]
2
2019-12-14T11:33:51.000Z
2020-06-04T15:40:48.000Z
intreehooks.py
hroncok/intreehooks
675b0a9039abe61839c267edcc440ee13331aad3
[ "MIT" ]
1
2018-08-30T19:04:29.000Z
2018-08-30T19:04:29.000Z
"""Load a PEP 517 backend from inside the source tree. """ from contextlib import contextmanager import importlib import os import pytoml import sys __version__ = '1.0' @contextmanager loader = HooksLoader(os.path.realpath(os.getcwd()))
32.283582
75
0.678225
"""Load a PEP 517 backend from inside the source tree. """ from contextlib import contextmanager import importlib import os import pytoml import sys __version__ = '1.0' @contextmanager def prepended_to_syspath(directory): sys.path.insert(0, directory) try: yield finally: sys.path.pop(0) c...
1,617
261
45
3aa0f9b4ac917875eedf179635675351921cfa88
844
py
Python
examples/nlp/bert_glue_pytorch/constants.py
gh-determined-ai/determined
9a1ab33a3a356b69681b3351629fef4ab98ddb56
[ "Apache-2.0" ]
1,729
2020-04-27T17:36:40.000Z
2022-03-31T05:48:39.000Z
examples/nlp/bert_glue_pytorch/constants.py
ChrisW09/determined
5c37bfe9cfcc69174ba29a3f1a115c3e9e3632e0
[ "Apache-2.0" ]
1,940
2020-04-27T17:34:14.000Z
2022-03-31T23:02:28.000Z
examples/nlp/bert_glue_pytorch/constants.py
ChrisW09/determined
5c37bfe9cfcc69174ba29a3f1a115c3e9e3632e0
[ "Apache-2.0" ]
214
2020-04-27T19:57:28.000Z
2022-03-29T08:17:16.000Z
from transformers import ( BertConfig, BertForSequenceClassification, BertTokenizer, DistilBertConfig, DistilBertForSequenceClassification, DistilBertTokenizer, RobertaConfig, RobertaForSequenceClassification, RobertaTokenizer, XLMConfig, XLMForSequenceClassification, XLM...
31.259259
95
0.774882
from transformers import ( BertConfig, BertForSequenceClassification, BertTokenizer, DistilBertConfig, DistilBertForSequenceClassification, DistilBertTokenizer, RobertaConfig, RobertaForSequenceClassification, RobertaTokenizer, XLMConfig, XLMForSequenceClassification, XLM...
0
0
0
a8e4d20c8ab80f5b7903457929ef9c281fbe49b2
95
py
Python
flashback/caching/__init__.py
PaulRenvoise/flashback
f9a16f4b0cb12a2180206c7b95d9eb8fb256381d
[ "MIT" ]
3
2021-06-08T11:40:59.000Z
2022-03-31T16:22:56.000Z
flashback/caching/__init__.py
PaulRenvoise/flashback
f9a16f4b0cb12a2180206c7b95d9eb8fb256381d
[ "MIT" ]
28
2020-04-28T22:36:14.000Z
2021-06-06T20:32:00.000Z
flashback/caching/__init__.py
PaulRenvoise/flashback
f9a16f4b0cb12a2180206c7b95d9eb8fb256381d
[ "MIT" ]
null
null
null
from .cache import Cache from .cached import cached __all__ = ( "Cache", "cached", )
10.555556
26
0.631579
from .cache import Cache from .cached import cached __all__ = ( "Cache", "cached", )
0
0
0
aa43158a1a5030a9fbe2caa413e11432a7cc303b
1,708
py
Python
c/lic_eliminar.py
yo-alan/personal
2f711a9f5dd5a16fbb3ab2a6f9b89069894ce40c
[ "MIT" ]
null
null
null
c/lic_eliminar.py
yo-alan/personal
2f711a9f5dd5a16fbb3ab2a6f9b89069894ce40c
[ "MIT" ]
10
2015-01-12T12:57:09.000Z
2015-03-30T13:39:23.000Z
c/lic_eliminar.py
yo-alan/personal
2f711a9f5dd5a16fbb3ab2a6f9b89069894ce40c
[ "MIT" ]
null
null
null
# coding=utf-8 from PyQt4.QtGui import * from PyQt4.QtCore import * from c.error import Error from v.ui_lic_eliminar import Ui_Lic_Eliminar
21.897436
103
0.697307
# coding=utf-8 from PyQt4.QtGui import * from PyQt4.QtCore import * from c.error import Error from v.ui_lic_eliminar import Ui_Lic_Eliminar class Lic_Eliminar(QMessageBox): l = None error = None def __init__(self, principal): QDialog.__init__(self, principal) self.ui = Ui_Lic_Eliminar() self.ui.setupUi(s...
1,354
190
23
7dd9bcfe92839d70d4b8933849b2c5516e4aa2a5
882
py
Python
source/_static/code/linear_models/tsh_hg.py
tuttugu-ryo/lecture-source-py
9ce84044c2cc421775ea63a004556d7ae3b4e504
[ "BSD-3-Clause" ]
null
null
null
source/_static/code/linear_models/tsh_hg.py
tuttugu-ryo/lecture-source-py
9ce84044c2cc421775ea63a004556d7ae3b4e504
[ "BSD-3-Clause" ]
null
null
null
source/_static/code/linear_models/tsh_hg.py
tuttugu-ryo/lecture-source-py
9ce84044c2cc421775ea63a004556d7ae3b4e504
[ "BSD-3-Clause" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt from scipy.stats import norm from quantecon import LinearStateSpace phi_1, phi_2, phi_3, phi_4 = 0.5, -0.2, 0, 0.5 sigma = 0.1 A = [[phi_1, phi_2, phi_3, phi_4], [1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0]] C = [[sigma]...
23.837838
75
0.608844
import numpy as np import matplotlib.pyplot as plt from scipy.stats import norm from quantecon import LinearStateSpace phi_1, phi_2, phi_3, phi_4 = 0.5, -0.2, 0, 0.5 sigma = 0.1 A = [[phi_1, phi_2, phi_3, phi_4], [1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0]] C = [[sigma]...
0
0
0
a6664b1d0580e21b207addf21d9ef99693e8773a
2,910
py
Python
calc_main.py
PaprikaX33/stupidly-simple-calculator
d35085baf7ce78d0fc111e3d8a7e8232c270998b
[ "MIT" ]
null
null
null
calc_main.py
PaprikaX33/stupidly-simple-calculator
d35085baf7ce78d0fc111e3d8a7e8232c270998b
[ "MIT" ]
7
2019-10-09T04:13:54.000Z
2019-10-14T03:10:11.000Z
calc_main.py
PaprikaX33/stupidly-simple-calculator
d35085baf7ce78d0fc111e3d8a7e8232c270998b
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 import math import parser as pr while True: print("\n CALCULATOR MENU") print("1 for addition :") print("2 for subtraction :") print('3 for multiplication :') print("4 for raise to power:") print("5 for Division:") print("6 for floor division:") print("7 for facto...
25.752212
82
0.519244
#!/usr/bin/env python2 import math import parser as pr def add(a, b): return a + b def red(a, b): return a - b def mul(a, b): return a * b def div(a, b): return a / b def power(a, b): return a ** b def statement_wrapper(): doper = { '+' : add ,'-' : red ,'*' : mul ...
1,740
0
362
dbdd6aecbadab47e637b3959e99f9f1394312c3b
12,312
py
Python
dask/dataframe/indexing.py
deHasara/dask
fb544144611b25a6f23d90637038a93f93153f8f
[ "BSD-3-Clause" ]
null
null
null
dask/dataframe/indexing.py
deHasara/dask
fb544144611b25a6f23d90637038a93f93153f8f
[ "BSD-3-Clause" ]
2
2020-03-30T22:18:11.000Z
2020-04-02T04:13:36.000Z
dask/dataframe/indexing.py
deHasara/dask
fb544144611b25a6f23d90637038a93f93153f8f
[ "BSD-3-Clause" ]
1
2020-04-29T19:28:41.000Z
2020-04-29T19:28:41.000Z
from datetime import datetime from collections import defaultdict import bisect import numpy as np import pandas as pd from .core import new_dd_object, Series from ..array.core import Array from .utils import is_index_like, meta_nonempty from . import methods from ..base import tokenize from ..highlevelgraph import H...
33.275676
87
0.584146
from datetime import datetime from collections import defaultdict import bisect import numpy as np import pandas as pd from .core import new_dd_object, Series from ..array.core import Array from .utils import is_index_like, meta_nonempty from . import methods from ..base import tokenize from ..highlevelgraph import H...
6,657
426
288
a3198459c2694fb22edc0499faba3e03bb95e920
2,312
py
Python
src/common/networks/component/pggan.py
pfnet-research/chainer-stylegan
9bb2f5ac9d68958e594d03662ca791f403a13574
[ "MIT" ]
84
2019-02-28T12:57:37.000Z
2021-12-05T16:54:36.000Z
model/common/networks/component/pggan.py
alexander7161/FaceGen
c1697a8bfc3c551a3dc2bc45078e8e4e5ae41368
[ "MIT" ]
31
2019-12-11T12:29:46.000Z
2022-03-12T00:20:52.000Z
model/common/networks/component/pggan.py
alexander7161/FaceGen
c1697a8bfc3c551a3dc2bc45078e8e4e5ae41368
[ "MIT" ]
23
2019-03-01T17:59:19.000Z
2021-08-12T18:08:36.000Z
import numpy as np import chainer import chainer.functions as F import chainer.links as L
38.533333
106
0.636246
import numpy as np import chainer import chainer.functions as F import chainer.links as L def feature_vector_normalization(x, eps=1e-8): # x: (B, C, H, W) alpha = 1.0 / F.sqrt(F.mean(x * x, axis=1, keepdims=True) + eps) return F.broadcast_to(alpha, x.data.shape) * x class EqualizedConv2d(chainer.Chain):...
1,867
50
288
7c0783775708e164a7de2a7db1e9ec1cd5c7040a
182
py
Python
source/__init__.py
Very1Fake/monitor
bb47352cffebd8b99bafac0a342324b042b3d826
[ "Apache-2.0", "MIT" ]
null
null
null
source/__init__.py
Very1Fake/monitor
bb47352cffebd8b99bafac0a342324b042b3d826
[ "Apache-2.0", "MIT" ]
null
null
null
source/__init__.py
Very1Fake/monitor
bb47352cffebd8b99bafac0a342324b042b3d826
[ "Apache-2.0", "MIT" ]
null
null
null
from packaging.version import Version __credits__ = ["very1fake"] __license__ = "MIT/Apache-2.0" __version__ = "1.0.6" __maintainer__ = "very1fake" version = Version(__version__)
18.2
37
0.752747
from packaging.version import Version __credits__ = ["very1fake"] __license__ = "MIT/Apache-2.0" __version__ = "1.0.6" __maintainer__ = "very1fake" version = Version(__version__)
0
0
0
62e63d0c6b135c8198eca554bf7e6a2e7baac64d
433
py
Python
ACM ICPC/String/Top_K_Frequent_Words/top_k_frequent_words.py
shreejitverma/GeeksforGeeks
d7bcb166369fffa9a031a258e925b6aff8d44e6c
[ "MIT" ]
2
2022-02-18T05:14:28.000Z
2022-03-08T07:00:08.000Z
ACM ICPC/String/Top_K_Frequent_Words/top_k_frequent_words.py
shivaniverma1/Competitive-Programming-1
d7bcb166369fffa9a031a258e925b6aff8d44e6c
[ "MIT" ]
6
2022-01-13T04:31:04.000Z
2022-03-12T01:06:16.000Z
ACM ICPC/String/Top_K_Frequent_Words/top_k_frequent_words.py
shivaniverma1/Competitive-Programming-1
d7bcb166369fffa9a031a258e925b6aff8d44e6c
[ "MIT" ]
2
2022-02-14T19:53:53.000Z
2022-02-18T05:14:30.000Z
# Returns k number of words sorted on their occurrence if __name__ == '__main__': inpt = input('Enter space seperated words: ').split() k = int( input( 'Enter the amount of words to retreive based on their occurance: ') ) print(top_k_frequent_words(inpt, k))
30.928571
79
0.65127
# Returns k number of words sorted on their occurrence def top_k_frequent_words(words, k: int): return sorted( sorted(set(words)), key=lambda x: words.count(x), reverse=True)[:k] if __name__ == '__main__': inpt = input('Enter space seperated words: ').split() k = int( input( 'E...
114
0
22
d54be79502f4c11601fd7fb259a73d045fb9a1a2
415
py
Python
church/migrations/0018_facebooklink_file_upload.py
khanhpn/florida
5e83d0561b9f41ff79383a6a2f0a84d6c8459ef0
[ "Apache-2.0" ]
1
2021-01-22T02:52:33.000Z
2021-01-22T02:52:33.000Z
church/migrations/0018_facebooklink_file_upload.py
khanhpn/florida
5e83d0561b9f41ff79383a6a2f0a84d6c8459ef0
[ "Apache-2.0" ]
null
null
null
church/migrations/0018_facebooklink_file_upload.py
khanhpn/florida
5e83d0561b9f41ff79383a6a2f0a84d6c8459ef0
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.2.5 on 2021-09-03 12:56 from django.db import migrations, models
21.842105
77
0.59759
# Generated by Django 3.2.5 on 2021-09-03 12:56 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('church', '0017_linkedchurch'), ] operations = [ migrations.AddField( model_name='facebooklink', name='file_upload', ...
0
301
23
36a2775a2ac44b7d929353e95a007696147eb907
1,270
py
Python
crypto_address_validator/__init__.py
null-po1nter/crypto-address-validator
a65239ff86613c1cca744849c3c6910bb4eacf64
[ "Unlicense" ]
6
2022-01-11T15:25:57.000Z
2022-02-16T08:05:07.000Z
crypto_address_validator/__init__.py
null-po1nter/crypto-address-validator
a65239ff86613c1cca744849c3c6910bb4eacf64
[ "Unlicense" ]
null
null
null
crypto_address_validator/__init__.py
null-po1nter/crypto-address-validator
a65239ff86613c1cca744849c3c6910bb4eacf64
[ "Unlicense" ]
2
2022-01-11T15:26:05.000Z
2022-03-22T08:05:59.000Z
from crypto_address_validator.validators import default_validator from crypto_address_validator.validators import atom_validator from crypto_address_validator.validators import bnb_validator from crypto_address_validator.validators import aion_validator from crypto_address_validator.validators import eos_validator from...
30.238095
65
0.735433
from crypto_address_validator.validators import default_validator from crypto_address_validator.validators import atom_validator from crypto_address_validator.validators import bnb_validator from crypto_address_validator.validators import aion_validator from crypto_address_validator.validators import eos_validator from...
0
0
0
59f7061bacac1bfdf2d744f13106a5a5eadbd85e
6,312
py
Python
src/create_topic_graph.py
medialab/webclim_propagation_graphs_facebook
d2c6345a5045a29c903b7bd355c6c13ba01d0e71
[ "MIT" ]
1
2020-05-12T14:18:00.000Z
2020-05-12T14:18:00.000Z
src/create_topic_graph.py
medialab/webclim_analyses
d2c6345a5045a29c903b7bd355c6c13ba01d0e71
[ "MIT" ]
null
null
null
src/create_topic_graph.py
medialab/webclim_analyses
d2c6345a5045a29c903b7bd355c6c13ba01d0e71
[ "MIT" ]
null
null
null
"""Based on which facebook groups have shared the fake news published by specific domain names, this script will generate a bipartite graph with the facebook groups and the domain names""" import pandas as pd import numpy as np import matplotlib as mpl import networkx as nx from networkx.algorithms import bipartite i...
42.938776
104
0.64512
"""Based on which facebook groups have shared the fake news published by specific domain names, this script will generate a bipartite graph with the facebook groups and the domain names""" import pandas as pd import numpy as np import matplotlib as mpl import networkx as nx from networkx.algorithms import bipartite i...
0
0
0
36dbb5b4b4d979e45050f4692afffb84a7eed0f8
9,251
py
Python
mac/google-cloud-sdk/lib/googlecloudsdk/api_lib/firebase/test/tool_results.py
bopopescu/cndw
ee432efef88a4351b355f3d6d5350defc7f4246b
[ "Apache-2.0" ]
null
null
null
mac/google-cloud-sdk/lib/googlecloudsdk/api_lib/firebase/test/tool_results.py
bopopescu/cndw
ee432efef88a4351b355f3d6d5350defc7f4246b
[ "Apache-2.0" ]
4
2020-07-21T12:51:46.000Z
2022-01-22T10:29:25.000Z
mac/google-cloud-sdk/lib/googlecloudsdk/api_lib/firebase/test/tool_results.py
bopopescu/cndw
ee432efef88a4351b355f3d6d5350defc7f4246b
[ "Apache-2.0" ]
1
2020-07-25T18:17:57.000Z
2020-07-25T18:17:57.000Z
# -*- coding: utf-8 -*- # # Copyright 2017 Google LLC. 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 requir...
45.126829
80
0.720246
# -*- coding: utf-8 -*- # # Copyright 2017 Google LLC. 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 requir...
0
0
0
f22fa272296f5002435df89407092a61d69e7af3
1,705
py
Python
ServerScript/recievestore.py
wmizzi/tn2capstone
e9855ba6b49e2d05293df74846c64fa0c220a25d
[ "BSD-2-Clause" ]
null
null
null
ServerScript/recievestore.py
wmizzi/tn2capstone
e9855ba6b49e2d05293df74846c64fa0c220a25d
[ "BSD-2-Clause" ]
null
null
null
ServerScript/recievestore.py
wmizzi/tn2capstone
e9855ba6b49e2d05293df74846c64fa0c220a25d
[ "BSD-2-Clause" ]
null
null
null
# created by Angus Clark 9/2/17 updated 27/2/17 # ToDo impliment traceroute function into this # Perhaps get rid of unnecessary itemediate temp file import socket import os import json import my_traceroute s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) host = '130.56.253.43' #print host port = 5201 # Change ...
30.446429
86
0.609971
# created by Angus Clark 9/2/17 updated 27/2/17 # ToDo impliment traceroute function into this # Perhaps get rid of unnecessary itemediate temp file import socket import os import json import my_traceroute s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) host = '130.56.253.43' #print host port = 5201 # Change ...
0
0
0
fd71201325e98fc8968b2ddb64f28721ed2a9d76
817
py
Python
PPAS_agent/knn/knn_model.py
pedMatias/matias_hfo
6d88e1043a1455f5c1f6cc11b9380869772f4176
[ "MIT" ]
1
2021-06-03T20:03:50.000Z
2021-06-03T20:03:50.000Z
multi_agents/knn/knn_model.py
pedMatias/matias_hfo
6d88e1043a1455f5c1f6cc11b9380869772f4176
[ "MIT" ]
null
null
null
multi_agents/knn/knn_model.py
pedMatias/matias_hfo
6d88e1043a1455f5c1f6cc11b9380869772f4176
[ "MIT" ]
1
2021-03-14T01:22:33.000Z
2021-03-14T01:22:33.000Z
import numpy as np import faiss
28.172414
74
0.592411
import numpy as np import faiss class KNeighbors: def __init__(self, k=1, nlist=1000, nprobe=1): self.index = None self.y = None self.k = 1 self.nlist = nlist self.nprobe = nprobe def fit(self, X, y): quantizer = faiss.IndexFlatL2(X.shape[1]) # the other index...
685
-4
103
402bd0ecd3ad3683810f6e43fdd05ede3dff3a02
9,732
py
Python
src/piebus/api.py
hiway/piebus
898e084c6065824fdb1dce8fedc1f8fac8499703
[ "BSD-2-Clause" ]
null
null
null
src/piebus/api.py
hiway/piebus
898e084c6065824fdb1dce8fedc1f8fac8499703
[ "BSD-2-Clause" ]
5
2021-03-19T01:09:42.000Z
2022-01-13T01:17:44.000Z
src/piebus/api.py
hiway/piebus
898e084c6065824fdb1dce8fedc1f8fac8499703
[ "BSD-2-Clause" ]
null
null
null
import asyncio import base64 import datetime import hashlib import json import os import smopy import traceback from json import JSONDecodeError from uuid import uuid4 import bcrypt import peewee from PIL import Image, ImageDraw from peewee import ( Model, CharField, TextField, IntegerField, Foreig...
31.597403
110
0.585491
import asyncio import base64 import datetime import hashlib import json import os import smopy import traceback from json import JSONDecodeError from uuid import uuid4 import bcrypt import peewee from PIL import Image, ImageDraw from peewee import ( Model, CharField, TextField, IntegerField, Foreig...
7,051
1,774
184
6f3c693c479a27919155bf7fe3a2aa2e751a7747
2,731
py
Python
tests/test_attention_gqn.py
rnagumo/gqnlib
96bd8499f90c00b29817f71e6380bc622ce78479
[ "MIT" ]
1
2020-08-13T01:54:52.000Z
2020-08-13T01:54:52.000Z
tests/test_attention_gqn.py
rnagumo/gqnlib
96bd8499f90c00b29817f71e6380bc622ce78479
[ "MIT" ]
null
null
null
tests/test_attention_gqn.py
rnagumo/gqnlib
96bd8499f90c00b29817f71e6380bc622ce78479
[ "MIT" ]
1
2021-01-03T16:02:55.000Z
2021-01-03T16:02:55.000Z
import unittest import torch import gqnlib if __name__ == "__main__": unittest.main()
33.716049
72
0.58074
import unittest import torch import gqnlib class TestAttentionGQN(unittest.TestCase): def setUp(self): self.model = gqnlib.AttentionGQN() def test_inference(self): x_c = torch.randn(4, 15, 3, 64, 64) v_c = torch.randn(4, 15, 7) x_q = torch.randn(4, 2, 3, 64, 64) v_...
2,429
21
185
bbece0a7cdc6417247ddc363307eef71f86b1fdd
562
py
Python
subdomains.py
kiuru/pyTLScanner
ba4b3b35675ad7854366bf6765678229c74fa77b
[ "MIT" ]
null
null
null
subdomains.py
kiuru/pyTLScanner
ba4b3b35675ad7854366bf6765678229c74fa77b
[ "MIT" ]
null
null
null
subdomains.py
kiuru/pyTLScanner
ba4b3b35675ad7854366bf6765678229c74fa77b
[ "MIT" ]
null
null
null
#!/usr/bin/env python from get_listed_companies import get_listed_companies_from_cache import tldextract if __name__ == '__main__': run_scan('helsinki', True)
26.761905
64
0.709964
#!/usr/bin/env python from get_listed_companies import get_listed_companies_from_cache import tldextract def run_scan(market, debug): companies = get_listed_companies_from_cache(market, debug) domain_list = [] for company in companies: ext_domain = tldextract.extract(company.website) doma...
370
0
23
8512a29537636ae25ad14c6bc16ec03b4ce86019
10,146
py
Python
feapder/network/user_pool/gold_user_pool.py
ibryang/feapder
14b1c1e9bd0953ea8af102d6d220fed4b79d0a5c
[ "MIT" ]
876
2021-02-09T11:08:04.000Z
2022-03-31T21:14:11.000Z
feapder/network/user_pool/gold_user_pool.py
ibryang/feapder
14b1c1e9bd0953ea8af102d6d220fed4b79d0a5c
[ "MIT" ]
94
2021-02-20T07:59:28.000Z
2022-03-28T09:54:53.000Z
feapder/network/user_pool/gold_user_pool.py
ibryang/feapder
14b1c1e9bd0953ea8af102d6d220fed4b79d0a5c
[ "MIT" ]
172
2021-02-22T08:24:44.000Z
2022-03-29T08:15:27.000Z
# -*- coding: utf-8 -*- """ Created on 2018/12/27 11:32 AM --------- @summary: 账号昂贵、限制查询次数及使用时间的用户UserPool --------- @author: Boris @email: boris_liu@foxmail.com """ import os import random import time from enum import Enum, unique from typing import Optional, List from feapder import setting from feapder.db.redisdb...
34.746575
101
0.479401
# -*- coding: utf-8 -*- """ Created on 2018/12/27 11:32 AM --------- @summary: 账号昂贵、限制查询次数及使用时间的用户UserPool --------- @author: Boris @email: boris_liu@foxmail.com """ import os import random import time from enum import Enum, unique from typing import Optional, List from feapder import setting from feapder.db.redisdb...
5,197
245
373
91d239c28c854fd8c9982789a6d5ce7d11f7e345
1,509
py
Python
tests/unit/test_core/test_events.py
MarvinTorres/kytos
2c72f45a76cf61f0e2e62f6703bf794db617e8a9
[ "MIT" ]
43
2017-03-27T14:30:20.000Z
2022-02-04T12:42:10.000Z
tests/unit/test_core/test_events.py
MarvinTorres/kytos
2c72f45a76cf61f0e2e62f6703bf794db617e8a9
[ "MIT" ]
612
2017-03-09T19:22:16.000Z
2021-05-31T21:48:52.000Z
tests/unit/test_core/test_events.py
MarvinTorres/kytos
2c72f45a76cf61f0e2e62f6703bf794db617e8a9
[ "MIT" ]
54
2017-03-03T19:11:26.000Z
2022-02-16T15:31:49.000Z
"""Test kytos.core.events module.""" from unittest import TestCase from kytos.core.events import KytosEvent class TestKytosEvent(TestCase): """KytosEvent tests.""" def setUp(self): """Instantiate a KytosEvent.""" self.event = KytosEvent('kytos/core.any') def test__str__(self): "...
31.4375
78
0.60106
"""Test kytos.core.events module.""" from unittest import TestCase from kytos.core.events import KytosEvent class TestKytosEvent(TestCase): """KytosEvent tests.""" def setUp(self): """Instantiate a KytosEvent.""" self.event = KytosEvent('kytos/core.any') def test__str__(self): "...
0
0
0
383b5d4a3508e1677c06bc8c513a3d82750bc6c2
793
py
Python
project7-------Pig Latin Translator.py
Omkar-Atugade/Python-Projects
a6e82aced415bff78ff0a2d14a8a4213ca7d09be
[ "MIT" ]
null
null
null
project7-------Pig Latin Translator.py
Omkar-Atugade/Python-Projects
a6e82aced415bff78ff0a2d14a8a4213ca7d09be
[ "MIT" ]
null
null
null
project7-------Pig Latin Translator.py
Omkar-Atugade/Python-Projects
a6e82aced415bff78ff0a2d14a8a4213ca7d09be
[ "MIT" ]
null
null
null
#Get sentence from user sentence = input('Enter the sentence you want to translate : ').strip().lower() #Spliting sentence into words words = sentence.split() #Converting words to pig latin latin_words = [] for word in words : if word[0] in "aeiou" : latin_word = word + 'yay' latin_wo...
23.323529
80
0.580076
#Get sentence from user sentence = input('Enter the sentence you want to translate : ').strip().lower() #Spliting sentence into words words = sentence.split() #Converting words to pig latin latin_words = [] for word in words : if word[0] in "aeiou" : latin_word = word + 'yay' latin_wo...
0
0
0
4a9e0c3844fe2098fee7bb70d4bee89a6d62f2d9
2,352
py
Python
cloud/endagaweb/tests/test_users.py
pcarivbts/CommunityCellularManager
aaeca413f7e6326d16c9e4587a83aa93dd5a0666
[ "BSD-3-Clause" ]
1
2018-04-27T17:55:53.000Z
2018-04-27T17:55:53.000Z
cloud/endagaweb/tests/test_users.py
pcarivbts/CommunityCellularManager
aaeca413f7e6326d16c9e4587a83aa93dd5a0666
[ "BSD-3-Clause" ]
14
2017-12-12T08:49:41.000Z
2018-08-23T20:57:01.000Z
cloud/endagaweb/tests/test_users.py
pcarivbts/CommunityCellularManager
aaeca413f7e6326d16c9e4587a83aa93dd5a0666
[ "BSD-3-Clause" ]
1
2018-07-04T00:53:38.000Z
2018-07-04T00:53:38.000Z
"""Tests for models.Users. Copyright (c) 2016-present, Facebook, Inc. 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. An additional grant of patent rights can be found in the PATENTS file in the same directory. """ fro...
28.337349
75
0.642432
"""Tests for models.Users. Copyright (c) 2016-present, Facebook, Inc. 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. An additional grant of patent rights can be found in the PATENTS file in the same directory. """ fro...
1,135
226
23
d78996f2c44c9ac476a065b14b21e830ef580e30
304
py
Python
Python/OS Module/importing.py
themohitpapneja/Code_Dump
ec72144e66d12cba2ce719c37292517588490b42
[ "Apache-2.0" ]
null
null
null
Python/OS Module/importing.py
themohitpapneja/Code_Dump
ec72144e66d12cba2ce719c37292517588490b42
[ "Apache-2.0" ]
null
null
null
Python/OS Module/importing.py
themohitpapneja/Code_Dump
ec72144e66d12cba2ce719c37292517588490b42
[ "Apache-2.0" ]
null
null
null
""" import os print(os.getcwd()) """ #OR# from time import * from os import * print(getcwd()) print(name) ## OS name print(path.abspath('.')) print(listdir('.')) mkdir("india") ## making directory sleep(2) rename("india","india2") ## renaming directory sleep(2) rmdir("india2") ## removing directory
17.882353
46
0.664474
""" import os print(os.getcwd()) """ #OR# from time import * from os import * print(getcwd()) print(name) ## OS name print(path.abspath('.')) print(listdir('.')) mkdir("india") ## making directory sleep(2) rename("india","india2") ## renaming directory sleep(2) rmdir("india2") ## removing directory
0
0
0
d2929f6e3b5f0622d33214a597d49836b5363ae9
655
py
Python
scripts/resume_parse.py
vishaljangid1729/Tej-WhatsApp
d346c3ef51a7f9502b027aaec3429ccfbda1b7ca
[ "MIT" ]
null
null
null
scripts/resume_parse.py
vishaljangid1729/Tej-WhatsApp
d346c3ef51a7f9502b027aaec3429ccfbda1b7ca
[ "MIT" ]
null
null
null
scripts/resume_parse.py
vishaljangid1729/Tej-WhatsApp
d346c3ef51a7f9502b027aaec3429ccfbda1b7ca
[ "MIT" ]
null
null
null
import time from pyresparser import ResumeParser import os from scripts.whatsapp import WhatsApp # spacy.load('en_core_web_sm')
20.46875
74
0.696183
import time from pyresparser import ResumeParser import os from scripts.whatsapp import WhatsApp # spacy.load('en_core_web_sm') def Hello (): main_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) resume_path = f'{main_dir}/Resume/vishal_jangid.pdf' data = ResumeParser(resume_path).get_...
498
0
23
86b37d705857d108cdba720a1c9b283be9d61e61
9,593
py
Python
jesse/modes/optimize_mode/__init__.py
jcsaaddupuy/jesse
58c64c57dfb6aa31d2547415b97bba3e5de53548
[ "MIT" ]
1
2022-01-12T22:43:23.000Z
2022-01-12T22:43:23.000Z
jesse/modes/optimize_mode/__init__.py
jcsaaddupuy/jesse
58c64c57dfb6aa31d2547415b97bba3e5de53548
[ "MIT" ]
10
2021-12-08T10:32:12.000Z
2022-03-29T10:30:10.000Z
jesse/modes/optimize_mode/__init__.py
b1nhm1nh/jesse-cli
b463bdc491cedd8042f1a9215e039efa4f701325
[ "MIT" ]
null
null
null
import os from math import log10 from multiprocessing import cpu_count from typing import Dict, Any, Tuple, Union import arrow import click from numpy import ndarray import jesse.helpers as jh import jesse.services.required_candles as required_candles from jesse import exceptions from jesse.config import config from ...
42.259912
194
0.629834
import os from math import log10 from multiprocessing import cpu_count from typing import Dict, Any, Tuple, Union import arrow import click from numpy import ndarray import jesse.helpers as jh import jesse.services.required_candles as required_candles from jesse import exceptions from jesse.config import config from ...
8,841
5
122
903ba598aae64934e655f86467a96927dfbb73c5
1,676
py
Python
test/test_header.py
bugov/http-basic-auth
a6cfad797beb05d022febe0b7dca8b972491a487
[ "BSD-3-Clause" ]
3
2018-02-20T20:04:43.000Z
2019-03-12T03:24:30.000Z
test/test_header.py
bugov/http-basic-auth
a6cfad797beb05d022febe0b7dca8b972491a487
[ "BSD-3-Clause" ]
null
null
null
test/test_header.py
bugov/http-basic-auth
a6cfad797beb05d022febe0b7dca8b972491a487
[ "BSD-3-Clause" ]
null
null
null
import pytest from http_basic_auth import parse_header, generate_header, BasicAuthException @pytest.mark.parametrize("token,expect", [ ('Basic dGVzdDpzZWNyZXQ=', ('test', 'secret')), ('BASIC dGVzdDpzZWNyZXQx', ('test', 'secret1')), ('BaSiC dGVzdDpzZWM6cmV0MQ==', ('test', 'sec:ret1')), ('Basic \t b...
31.622642
77
0.671241
import pytest from http_basic_auth import parse_header, generate_header, BasicAuthException @pytest.mark.parametrize("token,expect", [ ('Basic dGVzdDpzZWNyZXQ=', ('test', 'secret')), ('BASIC dGVzdDpzZWNyZXQx', ('test', 'secret1')), ('BaSiC dGVzdDpzZWM6cmV0MQ==', ('test', 'sec:ret1')), ('Basic \t b...
426
0
110
2e0fb78fa4ac896060bf8099388628c620cb68d7
22
py
Python
dipper/utils/__init__.py
monarch-ci/dipper
abcd4843ec051a47cef3b592fadc1cd7d1616b45
[ "BSD-3-Clause" ]
52
2015-01-28T21:22:19.000Z
2022-03-15T09:21:07.000Z
dipper/utils/__init__.py
monarch-ci/dipper
abcd4843ec051a47cef3b592fadc1cd7d1616b45
[ "BSD-3-Clause" ]
742
2015-01-06T00:21:30.000Z
2021-08-02T20:57:17.000Z
dipper/utils/__init__.py
monarch-ci/dipper
abcd4843ec051a47cef3b592fadc1cd7d1616b45
[ "BSD-3-Clause" ]
24
2015-07-28T17:06:30.000Z
2021-08-18T21:28:53.000Z
__author__ = 'nicole'
11
21
0.727273
__author__ = 'nicole'
0
0
0
aabd88d6d9266e9e9a00b2139c397b70f4290f58
2,320
py
Python
dante.py
dantefurrybot/dantev4
7282e9466209e794b1e91234a0eb7aa83fd6e413
[ "CC-BY-4.0" ]
1
2020-08-17T15:59:40.000Z
2020-08-17T15:59:40.000Z
dante.py
dantefurrybot/dantev4
7282e9466209e794b1e91234a0eb7aa83fd6e413
[ "CC-BY-4.0" ]
null
null
null
dante.py
dantefurrybot/dantev4
7282e9466209e794b1e91234a0eb7aa83fd6e413
[ "CC-BY-4.0" ]
2
2020-08-08T19:02:27.000Z
2020-08-11T00:40:35.000Z
import discord import importlib from discord.ext import commands channels = [725776681159098408, 728691486115233804, 738967638964830341, 725566843766571112, 732288159060328529, 739199815627440232, 730887667491012720, 729753696199508088] client = MyClient() client.run('YourTokenHere')
42.181818
188
0.607759
import discord import importlib from discord.ext import commands channels = [725776681159098408, 728691486115233804, 738967638964830341, 725566843766571112, 732288159060328529, 739199815627440232, 730887667491012720, 729753696199508088] class MyClient(discord.Client): async def on_ready(self): print('Log...
1,946
10
76
31259c906ff2965d051dbbd5b31dab0049ea6a49
14,800
py
Python
L3NEW_TG_B10_graph.py
Drywock/L3N_TDG_Projet
a584307efb47f6e8ea0d23d177112aa0ca540104
[ "MIT" ]
null
null
null
L3NEW_TG_B10_graph.py
Drywock/L3N_TDG_Projet
a584307efb47f6e8ea0d23d177112aa0ca540104
[ "MIT" ]
null
null
null
L3NEW_TG_B10_graph.py
Drywock/L3N_TDG_Projet
a584307efb47f6e8ea0d23d177112aa0ca540104
[ "MIT" ]
null
null
null
""" file : graph.py author(s) : Thomas LINTANF, Laurent CALYDON Version : 6.0 Definition de la classe Graph qui permet de stocker un graph orienté et de lui appliquer différents algorithmes. """ import csv import logging as log class Graph: """ classe Graph : représente un graphe ori...
35.835351
101
0.548243
""" file : graph.py author(s) : Thomas LINTANF, Laurent CALYDON Version : 6.0 Definition de la classe Graph qui permet de stocker un graph orienté et de lui appliquer différents algorithmes. """ import csv import logging as log class Graph: """ classe Graph : représente un graphe ori...
0
0
0
84234b9119a4722806e3ea59c33ea0d1f267519b
565
py
Python
_basics/nano blink.py
albertoSoto/raspberry-tic-projects
692762dade2397ba4bedb77b4733a1d5d9829450
[ "MIT" ]
null
null
null
_basics/nano blink.py
albertoSoto/raspberry-tic-projects
692762dade2397ba4bedb77b4733a1d5d9829450
[ "MIT" ]
null
null
null
_basics/nano blink.py
albertoSoto/raspberry-tic-projects
692762dade2397ba4bedb77b4733a1d5d9829450
[ "MIT" ]
null
null
null
#EJEMPLO DE BLINKING CON RASPBERRY PI #Escrito por Gl4r3 import RPi.GPIO as GPIO #importamos la libreria y cambiamos su nombre por "GPIO" import time #necesario para los delays #establecemos el sistema de numeracion que queramos, en mi caso BCM GPIO.setmode(GPIO.BCM) #configuramos el pin GPIO17 como una salida GPIO...
26.904762
80
0.743363
#EJEMPLO DE BLINKING CON RASPBERRY PI #Escrito por Gl4r3 import RPi.GPIO as GPIO #importamos la libreria y cambiamos su nombre por "GPIO" import time #necesario para los delays #establecemos el sistema de numeracion que queramos, en mi caso BCM GPIO.setmode(GPIO.BCM) #configuramos el pin GPIO17 como una salida GPIO...
0
0
0
0a5a9577bfb54220f64cd0996cbec96b469bb62e
11,726
py
Python
hubspot/cms/blogs/blog_posts/models/styles.py
fakepop/hubspot-api-python
f04103a09f93f5c26c99991b25fa76801074f3d3
[ "Apache-2.0" ]
null
null
null
hubspot/cms/blogs/blog_posts/models/styles.py
fakepop/hubspot-api-python
f04103a09f93f5c26c99991b25fa76801074f3d3
[ "Apache-2.0" ]
null
null
null
hubspot/cms/blogs/blog_posts/models/styles.py
fakepop/hubspot-api-python
f04103a09f93f5c26c99991b25fa76801074f3d3
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Blog Post endpoints \"Use these endpoints for interacting with Blog Posts, Blog Authors, and Blog Tags\" # noqa: E501 The version of the OpenAPI document: v3 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from hubspot.cms.blo...
32.481994
105
0.613082
# coding: utf-8 """ Blog Post endpoints \"Use these endpoints for interacting with Blog Posts, Blog Authors, and Blog Tags\" # noqa: E501 The version of the OpenAPI document: v3 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from hubspot.cms.blo...
0
0
0
9f3deda47c7c529d5518249b5f4b244e3e3d95c1
572
py
Python
image_finder.py
AlexKent3141/PicASCII
464415d9eb43553720336ae1e5f66a46d9f3eef5
[ "MIT" ]
null
null
null
image_finder.py
AlexKent3141/PicASCII
464415d9eb43553720336ae1e5f66a46d9f3eef5
[ "MIT" ]
null
null
null
image_finder.py
AlexKent3141/PicASCII
464415d9eb43553720336ae1e5f66a46d9f3eef5
[ "MIT" ]
null
null
null
import urllib2 # Base class for image finders. # This method must be implemented in the derived class. # Download the file at the specified URL and save it. if __name__ == "__main__": f = find_image(["mountain", "alps"]) download_image(f, "mount.jpg")
31.777778
71
0.674825
import urllib2 # Base class for image finders. class ImageFinder(object): # This method must be implemented in the derived class. def find(self, search_terms): raise NotImplementedError("ImageFinder::find not implemented!") # Download the file at the specified URL and save it. def download(sel...
222
5
74
8954f8f15acd02243dd17db5d5e2bbba5c12f1d4
118
py
Python
calculator/util/__init__.py
kamilcieslik/test_house_price_lib
98a9c9ada05b7cac1e9b835cc15031619cfa8e13
[ "MIT" ]
null
null
null
calculator/util/__init__.py
kamilcieslik/test_house_price_lib
98a9c9ada05b7cac1e9b835cc15031619cfa8e13
[ "MIT" ]
null
null
null
calculator/util/__init__.py
kamilcieslik/test_house_price_lib
98a9c9ada05b7cac1e9b835cc15031619cfa8e13
[ "MIT" ]
null
null
null
from .address import Address from .calculator_result import CalculatorResult from .reference_city import ReferenceCity
39.333333
47
0.881356
from .address import Address from .calculator_result import CalculatorResult from .reference_city import ReferenceCity
0
0
0
6adc04cb703a03f9e3146952968df89ed80db336
1,665
py
Python
nanodet/util/misc.py
Sean-hku/nanodet
f62a3a1e311fb446afabb3512a5ebedc81105778
[ "Apache-2.0" ]
8
2021-05-01T14:11:19.000Z
2022-01-11T01:08:35.000Z
nanodet/util/misc.py
Sean-hku/nanodet
f62a3a1e311fb446afabb3512a5ebedc81105778
[ "Apache-2.0" ]
1
2022-02-17T14:20:11.000Z
2022-02-17T14:20:11.000Z
nanodet/util/misc.py
Sean-hku/nanodet
f62a3a1e311fb446afabb3512a5ebedc81105778
[ "Apache-2.0" ]
null
null
null
# Modification 2020 RangiLyu # Copyright 2018-2019 Open-MMLab. # 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 applicabl...
32.647059
75
0.678679
# Modification 2020 RangiLyu # Copyright 2018-2019 Open-MMLab. # 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 applicabl...
157
0
23
e2cd8925067691083a53320bbc702cff13ae910f
11,031
py
Python
tests/test_mcts_player.py
donkirkby/zero-play
15e3afa950037cfd1f373ee4943cd8b42d4c82c9
[ "MIT" ]
7
2020-04-30T15:44:56.000Z
2021-04-07T18:37:21.000Z
tests/test_mcts_player.py
donkirkby/zero-play
15e3afa950037cfd1f373ee4943cd8b42d4c82c9
[ "MIT" ]
84
2019-05-07T04:37:10.000Z
2022-03-04T18:17:57.000Z
tests/test_mcts_player.py
donkirkby/zero-play
15e3afa950037cfd1f373ee4943cd8b42d4c82c9
[ "MIT" ]
1
2021-04-07T18:37:25.000Z
2021-04-07T18:37:25.000Z
import typing from collections import Counter import numpy as np from pytest import approx from zero_play.connect4.game import Connect4State from zero_play.game_state import GameState from zero_play.heuristic import Heuristic from zero_play.mcts_player import SearchNode, MctsPlayer, SearchManager from zero_play.playo...
24.900677
98
0.658327
import typing from collections import Counter import numpy as np from pytest import approx from zero_play.connect4.game import Connect4State from zero_play.game_state import GameState from zero_play.heuristic import Heuristic from zero_play.mcts_player import SearchNode, MctsPlayer, SearchManager from zero_play.playo...
8,336
17
547
c20fdadff12c2cc3041ee50f60f7664f620c36ab
1,436
py
Python
test/test_base.py
Xabab/moddb
22e912e4e93c663727e8f3459eaccadbcc3df1f8
[ "MIT" ]
7
2019-01-05T19:36:37.000Z
2021-09-20T20:28:01.000Z
test/test_base.py
Xabab/moddb
22e912e4e93c663727e8f3459eaccadbcc3df1f8
[ "MIT" ]
4
2020-01-18T14:28:51.000Z
2021-09-20T00:45:46.000Z
test/test_base.py
Xabab/moddb
22e912e4e93c663727e8f3459eaccadbcc3df1f8
[ "MIT" ]
1
2021-09-20T22:36:32.000Z
2021-09-20T22:36:32.000Z
import unittest import moddb from test.test_config import username, password
25.642857
94
0.643454
import unittest import moddb from test.test_config import username, password class TestFrontPage(unittest.TestCase): def setUp(self): self.fp = moddb.front_page() def get_articles(self): for article in self.fp.articles: article.parse() def get_games(self): for game in...
858
61
439
b3dc77bb14f38cb12956556bf85829eb1755a3ee
1,218
py
Python
11/star1.py
nfitzen/advent-of-code-2020
774b7db35aaf31b0e72a569b3441343d50f4d079
[ "CC0-1.0", "MIT" ]
null
null
null
11/star1.py
nfitzen/advent-of-code-2020
774b7db35aaf31b0e72a569b3441343d50f4d079
[ "CC0-1.0", "MIT" ]
null
null
null
11/star1.py
nfitzen/advent-of-code-2020
774b7db35aaf31b0e72a569b3441343d50f4d079
[ "CC0-1.0", "MIT" ]
null
null
null
#!/usr/bin/env python3 # SPDX-FileCopyrightText: 2020 Nathaniel Fitzenrider <https://github.com/nfitzen> # # SPDX-License-Identifier: CC0-1.0 import itertools from typing import List from copy import deepcopy with open('input.txt') as f: data = list(list(s.strip()) for s in f.readlines()) def update(state: List[...
29.707317
81
0.526273
#!/usr/bin/env python3 # SPDX-FileCopyrightText: 2020 Nathaniel Fitzenrider <https://github.com/nfitzen> # # SPDX-License-Identifier: CC0-1.0 import itertools from typing import List from copy import deepcopy with open('input.txt') as f: data = list(list(s.strip()) for s in f.readlines()) def update(state: List[...
0
0
0
dd174a854aefb599200038952f83310dd642ca25
4,985
py
Python
src/models/MultVAE/MultVAE_training_helper.py
EricHe98/sad_final_project
4b2b57e44f939840eede6f134493c5f8d809b1a7
[ "MIT" ]
3
2020-10-22T05:04:30.000Z
2021-02-03T01:24:55.000Z
src/models/MultVAE/MultVAE_training_helper.py
EricHe98/sad_final_project
4b2b57e44f939840eede6f134493c5f8d809b1a7
[ "MIT" ]
null
null
null
src/models/MultVAE/MultVAE_training_helper.py
EricHe98/sad_final_project
4b2b57e44f939840eede6f134493c5f8d809b1a7
[ "MIT" ]
null
null
null
from MultVAE_Dataset import * from MultVAE_model import * from torch import nn from torch.utils.data import DataLoader from datetime import datetime import argparse from scipy import sparse import numpy as np import mlflow.pytorch
34.143836
140
0.623671
from MultVAE_Dataset import * from MultVAE_model import * from torch import nn from torch.utils.data import DataLoader from datetime import datetime import argparse from scipy import sparse import numpy as np import mlflow.pytorch def make_dataloader(data_path = None, hotel_path = None, batch_size = 256): hotel_da...
4,661
0
92
0c57458a5e82bfdc85a8d11ffd2f10db47dcbdb0
451
py
Python
lona/unique_ids.py
korantu/lona
5039fa59f37cc32b9c789753af2ed8a8670ab611
[ "MIT" ]
230
2021-08-15T20:46:24.000Z
2022-03-30T10:17:43.000Z
lona/unique_ids.py
korantu/lona
5039fa59f37cc32b9c789753af2ed8a8670ab611
[ "MIT" ]
176
2021-08-18T08:19:37.000Z
2022-03-29T16:45:06.000Z
lona/unique_ids.py
korantu/lona
5039fa59f37cc32b9c789753af2ed8a8670ab611
[ "MIT" ]
13
2021-08-20T10:35:04.000Z
2022-01-17T15:49:40.000Z
from threading import Lock _name_spaces = { '': UniqueIDGenerator(), 'nodes': UniqueIDGenerator(), 'view_runtimes': UniqueIDGenerator(), }
18.04
41
0.625277
from threading import Lock class UniqueIDGenerator: def __init__(self): self._lock = Lock() self._value = 0 def __call__(self): with self._lock: self._value += 1 return str(self._value) _name_spaces = { '': UniqueIDGenerator(), 'nodes': UniqueIDGener...
194
3
99