hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f711fc5487ebe8b0c8426b048067c0fc0280edf1
4,907
py
Python
discovery-infra/tests/conftest.py
sacharya/assisted-test-infra
323c581dbe18e86c6b12e06ad9aa31886e825583
[ "Apache-2.0" ]
null
null
null
discovery-infra/tests/conftest.py
sacharya/assisted-test-infra
323c581dbe18e86c6b12e06ad9aa31886e825583
[ "Apache-2.0" ]
129
2020-12-18T17:02:02.000Z
2022-03-28T05:04:04.000Z
discovery-infra/tests/conftest.py
sacharya/assisted-test-infra
323c581dbe18e86c6b12e06ad9aa31886e825583
[ "Apache-2.0" ]
null
null
null
import logging import os import uuid from distutils import util from pathlib import Path import pytest import test_infra.utils as infra_utils from test_infra import assisted_service_api, consts, utils qe_env = False def is_qe_env(): return os.environ.get('NODE_ENV') == 'QE_VM' def _get_cluster_name(): clu...
43.424779
119
0.65539
import logging import os import uuid from distutils import util from pathlib import Path import pytest import test_infra.utils as infra_utils from test_infra import assisted_service_api, consts, utils qe_env = False def is_qe_env(): return os.environ.get('NODE_ENV') == 'QE_VM' def _get_cluster_name(): clu...
true
true
f711fcf24a1131f5221f39465f5db599c67a4540
898
py
Python
mss/factory.py
andreasbuhr/python-mss
f3c83cfc549a315c2f58cff7474896f161a02f95
[ "MIT" ]
null
null
null
mss/factory.py
andreasbuhr/python-mss
f3c83cfc549a315c2f58cff7474896f161a02f95
[ "MIT" ]
null
null
null
mss/factory.py
andreasbuhr/python-mss
f3c83cfc549a315c2f58cff7474896f161a02f95
[ "MIT" ]
null
null
null
# coding: utf-8 """ This is part of the MSS Python's module. Source: https://github.com/BoboTiG/python-mss """ import platform from .exception import ScreenShotError def mss(**kwargs): # type: (**str) -> MSS """ Factory returning a proper MSS class instance. It detects the plateform we are running ...
24.27027
74
0.639198
import platform from .exception import ScreenShotError def mss(**kwargs): operating_system = platform.system().lower() if operating_system == "darwin": from .darwin import MSS elif operating_system == "linux": from .linux import MSS elif operating_system == "windows": fr...
true
true
f711fcf6216b3021ea840cd648956c7cc331a474
2,459
py
Python
DeepMSPeptide/DeepMSPeptide.py
vsegurar/DeepMSPeptide
ab73f125b2297a7be01da3fa19a1c0b35c29d493
[ "MIT" ]
11
2019-09-15T00:45:23.000Z
2021-02-09T08:08:19.000Z
DeepMSPeptide/DeepMSPeptide.py
vsegurar/DeepMSPeptide
ab73f125b2297a7be01da3fa19a1c0b35c29d493
[ "MIT" ]
null
null
null
DeepMSPeptide/DeepMSPeptide.py
vsegurar/DeepMSPeptide
ab73f125b2297a7be01da3fa19a1c0b35c29d493
[ "MIT" ]
1
2021-09-23T07:14:19.000Z
2021-09-23T07:14:19.000Z
import warnings warnings.simplefilter(action='ignore', category=FutureWarning) import argparse import numpy as np import tensorflow as tf from tensorflow import keras parser = argparse.ArgumentParser(description='''Predicts the detectability of input peptides using a single dimension ...
38.421875
117
0.635624
import warnings warnings.simplefilter(action='ignore', category=FutureWarning) import argparse import numpy as np import tensorflow as tf from tensorflow import keras parser = argparse.ArgumentParser(description='''Predicts the detectability of input peptides using a single dimension ...
true
true
f711fd3d180f331cb4e5ff53fb1a41e7411924d6
5,182
py
Python
PythonControllerTemplates/src/py-ctrl.py
markhliu99/CAI
b97f0831ee8ea6e2352fe4f25032fdd1019c1ba8
[ "BSD-3-Clause" ]
4
2019-10-19T13:40:12.000Z
2021-12-18T01:49:05.000Z
PythonControllerTemplates/src/py-ctrl.py
markhliu99/CAI
b97f0831ee8ea6e2352fe4f25032fdd1019c1ba8
[ "BSD-3-Clause" ]
null
null
null
PythonControllerTemplates/src/py-ctrl.py
markhliu99/CAI
b97f0831ee8ea6e2352fe4f25032fdd1019c1ba8
[ "BSD-3-Clause" ]
5
2019-10-23T23:53:41.000Z
2021-12-18T01:49:17.000Z
""" py-ctrl script 1. generate problem PD file 1.1 save PD file in /inputfiles 2. solve convex hull 2.1 save hull information in /output 2.2 show figure for 10 sec 2.3 save figure in /output """ import os import subprocess import argparse import matplotlib.pyplot as plt parser = argparse.ArgumentPars...
41.790323
190
0.60961
import os import subprocess import argparse import matplotlib.pyplot as plt parser = argparse.ArgumentParser(description = 'Plot tradeoff') parser.add_argument('-P', '--Problem', type = int, choices = [1, 2, 3], default = 1, help=" 1: Coded Caching\n 2: Private Information Retrieval\n 3: Symmetric Private Informat...
true
true
f711fd6c5a3a2b839125a02f5930e6864bf0fa20
59,601
py
Python
aioredis/connection.py
sourcery-ai-bot/aioredis-py
77e730e95e1bfe2eb8be7212c2b6cb5dbec1ebf7
[ "MIT" ]
null
null
null
aioredis/connection.py
sourcery-ai-bot/aioredis-py
77e730e95e1bfe2eb8be7212c2b6cb5dbec1ebf7
[ "MIT" ]
null
null
null
aioredis/connection.py
sourcery-ai-bot/aioredis-py
77e730e95e1bfe2eb8be7212c2b6cb5dbec1ebf7
[ "MIT" ]
null
null
null
import asyncio import errno import inspect import io import os import socket import ssl import threading import warnings from distutils.version import StrictVersion from itertools import chain from typing import ( Any, Iterable, List, Mapping, Optional, Set, Tuple, Type, TypeVar, ...
37.019255
97
0.607221
import asyncio import errno import inspect import io import os import socket import ssl import threading import warnings from distutils.version import StrictVersion from itertools import chain from typing import ( Any, Iterable, List, Mapping, Optional, Set, Tuple, Type, TypeVar, ...
true
true
f711fe53644c91368a8f0bba79e57b36aa7d127c
10,791
py
Python
bplustree.py
sarneetk/learned-indexes
73dfab18a5c7db70d56bf77ab9f6dc5bae90b490
[ "MIT" ]
null
null
null
bplustree.py
sarneetk/learned-indexes
73dfab18a5c7db70d56bf77ab9f6dc5bae90b490
[ "MIT" ]
null
null
null
bplustree.py
sarneetk/learned-indexes
73dfab18a5c7db70d56bf77ab9f6dc5bae90b490
[ "MIT" ]
null
null
null
# BPlusTree with Python https://github.com/Nero5023/bplustree/tree/main/bplus_tree import pandas as pd import bisect import math def flatten(l): return [y for x in l for y in x] class Leaf: def __init__(self, previous_leaf, next_leaf, parent, b_factor): self.previous = previous_leaf ...
31.008621
124
0.52099
import pandas as pd import bisect import math def flatten(l): return [y for x in l for y in x] class Leaf: def __init__(self, previous_leaf, next_leaf, parent, b_factor): self.previous = previous_leaf self.next = next_leaf self.parent = parent self.b_factor = b_...
true
true
f711fe719909af491deee7434478abc1a13a274b
7,224
py
Python
hw2skeleton/cluster.py
tcavazos2/hw2-Clustering
60b536729ba03dcb28384be99e1575c3c3c0fe7e
[ "Apache-2.0" ]
null
null
null
hw2skeleton/cluster.py
tcavazos2/hw2-Clustering
60b536729ba03dcb28384be99e1575c3c3c0fe7e
[ "Apache-2.0" ]
null
null
null
hw2skeleton/cluster.py
tcavazos2/hw2-Clustering
60b536729ba03dcb28384be99e1575c3c3c0fe7e
[ "Apache-2.0" ]
null
null
null
from .utils import Atom, Residue, ActiveSite import matplotlib.pyplot as plt import numpy as np from .helpers import * from Bio import pairwise2 import rmsd from sklearn.decomposition import PCA import networkx as nx from networkx.drawing.nx_agraph import graphviz_layout def compute_similarity(site_a, site_b): """...
40.813559
148
0.665975
from .utils import Atom, Residue, ActiveSite import matplotlib.pyplot as plt import numpy as np from .helpers import * from Bio import pairwise2 import rmsd from sklearn.decomposition import PCA import networkx as nx from networkx.drawing.nx_agraph import graphviz_layout def compute_similarity(site_a, site_b): ...
true
true
f711fec6f6193ba7d622240d9e0be1a83ed8443c
12,543
py
Python
docs/conf.py
olifre/htcondor
e1299614fbdcad113a206270f3940e2e8777c2bd
[ "Apache-2.0" ]
1
2022-03-10T22:42:16.000Z
2022-03-10T22:42:16.000Z
docs/conf.py
olifre/htcondor
e1299614fbdcad113a206270f3940e2e8777c2bd
[ "Apache-2.0" ]
null
null
null
docs/conf.py
olifre/htcondor
e1299614fbdcad113a206270f3940e2e8777c2bd
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Read the Docs Template documentation build configuration file, created by # sphinx-quickstart on Tue Aug 26 14:19:49 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenera...
58.339535
132
0.700231
import sys import os sys.path.insert(0, os.path.abspath('extensions')) sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), 'src', 'condor_tests')) extensions = [ 'ticket', 'macro', 'macro-def', 'jira', ] templates_path = ['_templates'] source_suffix = '.rst' ...
true
true
f711ff1009ea4367d9de4b30a34e3fcc658b3312
326
py
Python
aocd/transforms.py
azuline/advent-of-code-data
7000ed3221d9be62b2f3c68cc2b8a03f05244d66
[ "MIT" ]
255
2016-12-04T01:34:05.000Z
2022-03-18T09:05:49.000Z
aocd/transforms.py
azuline/advent-of-code-data
7000ed3221d9be62b2f3c68cc2b8a03f05244d66
[ "MIT" ]
46
2016-12-04T07:24:52.000Z
2022-01-03T09:52:25.000Z
aocd/transforms.py
azuline/advent-of-code-data
7000ed3221d9be62b2f3c68cc2b8a03f05244d66
[ "MIT" ]
34
2017-12-19T05:18:10.000Z
2022-01-17T16:09:31.000Z
""" Transforms of aocd raw input text to something more useful for speed-solving. Every function here needs to accept one positional argument and return the 'massaged' data. """ __all__ = ["lines", "numbers"] def lines(data): return data.splitlines() def numbers(data): return [int(n) for n in data.splitlin...
20.375
77
0.717791
__all__ = ["lines", "numbers"] def lines(data): return data.splitlines() def numbers(data): return [int(n) for n in data.splitlines()]
true
true
f712001ed18d55eab80bd7527d17934879fa4c2d
781
py
Python
myproject/bookstore/urls.py
itchg/bookstore-django
46137911333ca78caaf29de7b97f53f1f59b704b
[ "Apache-2.0" ]
1
2021-08-01T18:48:08.000Z
2021-08-01T18:48:08.000Z
myproject/bookstore/urls.py
itchg/bookstore-django
46137911333ca78caaf29de7b97f53f1f59b704b
[ "Apache-2.0" ]
null
null
null
myproject/bookstore/urls.py
itchg/bookstore-django
46137911333ca78caaf29de7b97f53f1f59b704b
[ "Apache-2.0" ]
null
null
null
from django.conf.urls import url from . import views from . import views_book from . import views_sysinfo urlpatterns = [ #########################图书信息##################### # url(r'test', views.test), url(r'books', views_book.query), url(r'book/edit', views_book.edit), #支持url参数的写法一 #url(r'^book...
32.541667
65
0.591549
from django.conf.urls import url from . import views from . import views_book from . import views_sysinfo urlpatterns = [ url(r'books', views_book.query), url(r'book/edit', views_book.edit), url(r'^book/(?P<bookId>\d+)$', views_book.queryOneBook), url(r'book/del/(?P<bookId>\d+)$', v...
true
true
f712018d8b18bc2cffc824714bdc51a1eeb27d49
1,199
py
Python
osc2rtmidi/device.py
SpotlightKid/osc2rtmidi
2e1d0f4f382569c28ae246636d6aad5c9dd73602
[ "MIT" ]
1
2017-02-20T01:07:33.000Z
2017-02-20T01:07:33.000Z
osc2rtmidi/device.py
SpotlightKid/osc2rtmidi
2e1d0f4f382569c28ae246636d6aad5c9dd73602
[ "MIT" ]
null
null
null
osc2rtmidi/device.py
SpotlightKid/osc2rtmidi
2e1d0f4f382569c28ae246636d6aad5c9dd73602
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # osc2rtmidi/device.py # """MIDI device abstraction classes.""" import logging import time from rtmidi.midiutil import open_midioutput __all__ = ("RtMidiDevice",) log = logging.getLogger(__name__) class RtMidiDevice(object): """Provides a common API for different MIDI driver implemen...
24.469388
94
0.613845
import logging import time from rtmidi.midiutil import open_midioutput __all__ = ("RtMidiDevice",) log = logging.getLogger(__name__) class RtMidiDevice(object): def __init__(self, name="RtMidiDevice", port=None, portname=None): self.name = name self.port = port self.portname = portnam...
true
true
f71201a04a4c9f9d3be7ae1be9604cc75b020eca
13,048
py
Python
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/system/executive_unittest.py
viewdy/phantomjs
eddb0db1d253fd0c546060a4555554c8ee08c13c
[ "BSD-3-Clause" ]
1
2015-05-27T13:52:20.000Z
2015-05-27T13:52:20.000Z
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/system/executive_unittest.py
mrampersad/phantomjs
dca6f77a36699eb4e1c46f7600cca618f01b0ac3
[ "BSD-3-Clause" ]
null
null
null
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/system/executive_unittest.py
mrampersad/phantomjs
dca6f77a36699eb4e1c46f7600cca618f01b0ac3
[ "BSD-3-Clause" ]
1
2017-03-19T13:03:23.000Z
2017-03-19T13:03:23.000Z
# Copyright (C) 2010 Google Inc. All rights reserved. # Copyright (C) 2009 Daniel Bates (dbates@intudata.com). 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 co...
48.147601
151
0.691447
import os import errno import signal import subprocess import sys import time script_dir = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))) if script_dir not in sys.path: sys.path.append(script_dir) third_party_py = os.path.join(script_dir, "webkitpy", "thirdparty", "a...
true
true
f71201f72a312a351ec2f85b95dabe5b34052003
4,098
py
Python
flat_api/models/collection_type.py
FlatIO/api-client-python
898d1da77989b3e9075f0311b6a4d342a72e95ef
[ "Apache-2.0" ]
8
2017-04-09T15:54:12.000Z
2021-07-14T13:38:43.000Z
flat_api/models/collection_type.py
FlatIO/api-client-python
898d1da77989b3e9075f0311b6a4d342a72e95ef
[ "Apache-2.0" ]
4
2018-07-20T13:22:40.000Z
2022-03-23T20:03:21.000Z
flat_api/models/collection_type.py
FlatIO/api-client-python
898d1da77989b3e9075f0311b6a4d342a72e95ef
[ "Apache-2.0" ]
2
2018-05-29T08:29:59.000Z
2018-07-23T07:16:13.000Z
# coding: utf-8 """ Flat API The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and Mus...
43.136842
1,686
0.639824
import pprint import re import six class CollectionType(object): ROOT = "root" REGULAR = "regular" SHAREDWITHME = "sharedWithMe" SHAREDWITHGROUP = "sharedWithGroup" TRASH = "trash" openapi_types = { } attribute_map = { } def __init__(self): self.discriminator ...
true
true
f71202ed428fb366e4306d68883b04e523acbaa5
291
py
Python
django_countries/templatetags/countries.py
domdinicola/django-countries
d0af739093d18dae5dadb9a8ab66d679c38b00a5
[ "MIT" ]
null
null
null
django_countries/templatetags/countries.py
domdinicola/django-countries
d0af739093d18dae5dadb9a8ab66d679c38b00a5
[ "MIT" ]
null
null
null
django_countries/templatetags/countries.py
domdinicola/django-countries
d0af739093d18dae5dadb9a8ab66d679c38b00a5
[ "MIT" ]
null
null
null
import django from django import template from django_countries.fields import Country, countries register = template.Library() simple_tag = register.simple_tag @simple_tag def get_country(code): return Country(code=code) @simple_tag def get_countries(): return list(countries)
16.166667
54
0.786942
import django from django import template from django_countries.fields import Country, countries register = template.Library() simple_tag = register.simple_tag @simple_tag def get_country(code): return Country(code=code) @simple_tag def get_countries(): return list(countries)
true
true
f71205089882a98b87e44e83b01cc12f722555ca
6,872
py
Python
examples/example_parametric_reactors/make_all_parametric_reactors.py
RemDelaporteMathurin/paramak
10552f1b89820dd0f7a08e4a126834877e3106b4
[ "MIT" ]
null
null
null
examples/example_parametric_reactors/make_all_parametric_reactors.py
RemDelaporteMathurin/paramak
10552f1b89820dd0f7a08e4a126834877e3106b4
[ "MIT" ]
null
null
null
examples/example_parametric_reactors/make_all_parametric_reactors.py
RemDelaporteMathurin/paramak
10552f1b89820dd0f7a08e4a126834877e3106b4
[ "MIT" ]
null
null
null
""" This python script demonstrates the creation of all parametric reactors available in the paramak tool """ import paramak def main(): all_reactors = [] my_reactor = paramak.BallReactor( inner_bore_radial_thickness=50, inboard_tf_leg_radial_thickness=50, center_column_shield_radia...
35.42268
81
0.718277
import paramak def main(): all_reactors = [] my_reactor = paramak.BallReactor( inner_bore_radial_thickness=50, inboard_tf_leg_radial_thickness=50, center_column_shield_radial_thickness=50, divertor_radial_thickness=100, inner_plasma_gap_radial_thickness=50, p...
true
true
f71206bd4cb142eacf2fe72eacfffd390f66940f
1,972
py
Python
gradplanner/controller/low_level_controller.py
ferenctorok/potential_field_planner
7a9f7ae70a91523cc6d42029f869f9020cc1ea35
[ "MIT" ]
null
null
null
gradplanner/controller/low_level_controller.py
ferenctorok/potential_field_planner
7a9f7ae70a91523cc6d42029f869f9020cc1ea35
[ "MIT" ]
null
null
null
gradplanner/controller/low_level_controller.py
ferenctorok/potential_field_planner
7a9f7ae70a91523cc6d42029f869f9020cc1ea35
[ "MIT" ]
null
null
null
import numpy as np class LowLevelController: """Low level controller of a point mass robot with dynamics: x_{k+1} = x_k + v_k * Ts * cos(psi_k) y_{k+1} = y_k + v_k * Ts * sin(psi_k) v_{k+1} = v_k + Ts * a_k psi_{k+1} = psi_k + Ts * omega_k omega_{k+1} = omega_k + Ts * epsilon_k Where a_k...
31.806452
83
0.626268
import numpy as np class LowLevelController: def __init__(self, params): self._init_from_params(params) def get_inputs(self, state, cmd_vel): v_des = cmd_vel[0] omega_des = cmd_vel[1] v_k = state[2] omega_k = state[4] a_k = (v_...
true
true
f71208187b5332bbf381e72ac6c7b7c3ee0814f9
20,688
py
Python
electrum/simple_config.py
asuka431/electrum-bari
18ab1950cfc8990133544a4059743db84b87abee
[ "MIT" ]
4
2017-07-10T00:10:05.000Z
2020-05-22T12:16:38.000Z
electrum/simple_config.py
asuka431/electrum-bari
18ab1950cfc8990133544a4059743db84b87abee
[ "MIT" ]
7
2018-02-08T03:52:12.000Z
2021-11-15T17:49:57.000Z
electrum/simple_config.py
CHIPO-Project/electrum-chipo
5c78c87feec2eaf04991c55eb1790861bfbe3a6b
[ "MIT" ]
11
2017-07-13T02:53:08.000Z
2022-02-05T13:48:32.000Z
import json import threading import time import os import stat from decimal import Decimal from typing import Union, Optional from numbers import Real from copy import deepcopy from . import util from .util import (user_dir, make_dir, NoDynamicFeeEstimates, format_fee_satoshis, quantize_feerate) fr...
35.064407
136
0.604553
import json import threading import time import os import stat from decimal import Decimal from typing import Union, Optional from numbers import Real from copy import deepcopy from . import util from .util import (user_dir, make_dir, NoDynamicFeeEstimates, format_fee_satoshis, quantize_feerate) fr...
true
true
f7120866c7111c705b82885b456c2303d7f061d4
6,181
py
Python
tests/contrib/hooks/test_azure_container_instance_hook.py
kenbier/airflow
f520d02cc1f41f9861f479f984bb52bda3860d30
[ "Apache-2.0" ]
null
null
null
tests/contrib/hooks/test_azure_container_instance_hook.py
kenbier/airflow
f520d02cc1f41f9861f479f984bb52bda3860d30
[ "Apache-2.0" ]
3
2020-03-08T15:43:38.000Z
2021-09-29T17:26:10.000Z
tests/contrib/hooks/test_azure_container_instance_hook.py
upjohnc/airflow-upjohn-k8s
caadbc1618d73e054de99138b0892cea3a9327c4
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
49.448
102
0.652322
import json import unittest from unittest.mock import patch from collections import namedtuple from airflow import configuration from airflow.models import Connection from airflow.contrib.hooks.azure_container_instance_hook import AzureContainerInstanceHook from airflow.utils import db from azure.mgmt.containerinsta...
true
true
f7120877f32a25ac6a33692ca0f963fe88e71589
1,667
py
Python
component/widget/folder_select.py
lecrabe/bfast_gpu
86be7f50143785beab6e8108311e16b9c38beeb5
[ "MIT" ]
null
null
null
component/widget/folder_select.py
lecrabe/bfast_gpu
86be7f50143785beab6e8108311e16b9c38beeb5
[ "MIT" ]
null
null
null
component/widget/folder_select.py
lecrabe/bfast_gpu
86be7f50143785beab6e8108311e16b9c38beeb5
[ "MIT" ]
null
null
null
from pathlib import Path from sepal_ui import sepalwidgets as sw from component import parameter as cp from component.message import cm class FolderSelect(sw.FileInput): def __init__(self): super().__init__([''], label=cm.widget.folder.label, folder=cp.down_dir) def _on_file_s...
29.245614
109
0.532094
from pathlib import Path from sepal_ui import sepalwidgets as sw from component import parameter as cp from component.message import cm class FolderSelect(sw.FileInput): def __init__(self): super().__init__([''], label=cm.widget.folder.label, folder=cp.down_dir) def _on_file_s...
true
true
f71208a973ced44f4cf9a639b5b764f8aa588edc
2,612
py
Python
src/mida_acv/utilities.py
DPaletti/mida_acv
9b492adaf75ce24c94dfa6993c5757e1bb96c700
[ "MIT" ]
null
null
null
src/mida_acv/utilities.py
DPaletti/mida_acv
9b492adaf75ce24c94dfa6993c5757e1bb96c700
[ "MIT" ]
null
null
null
src/mida_acv/utilities.py
DPaletti/mida_acv
9b492adaf75ce24c94dfa6993c5757e1bb96c700
[ "MIT" ]
null
null
null
from pathlib import Path from typing import Tuple, List, Dict import pandas as pd import numpy as np from tsfresh.utilities.dataframe_functions import roll_time_series def get_path(df: pd.DataFrame) -> np.array: out = [] for index, row in df.iterrows(): out.append((row["Latitude"], row["Longitude"]))...
36.788732
88
0.6183
from pathlib import Path from typing import Tuple, List, Dict import pandas as pd import numpy as np from tsfresh.utilities.dataframe_functions import roll_time_series def get_path(df: pd.DataFrame) -> np.array: out = [] for index, row in df.iterrows(): out.append((row["Latitude"], row["Longitude"]))...
true
true
f71208bd001e8bc1031210e80bf355bf986dd7d9
1,488
py
Python
irekua_rest_api/permissions/sampling_events.py
IslasGECI/irekua-rest-api
35cf5153ed7f54d12ebad2ac07d472585f04e3e7
[ "BSD-4-Clause" ]
null
null
null
irekua_rest_api/permissions/sampling_events.py
IslasGECI/irekua-rest-api
35cf5153ed7f54d12ebad2ac07d472585f04e3e7
[ "BSD-4-Clause" ]
11
2020-03-28T18:51:50.000Z
2022-01-13T01:47:40.000Z
irekua_rest_api/permissions/sampling_events.py
IslasGECI/irekua-rest-api
35cf5153ed7f54d12ebad2ac07d472585f04e3e7
[ "BSD-4-Clause" ]
1
2021-05-06T19:38:14.000Z
2021-05-06T19:38:14.000Z
from rest_framework.permissions import BasePermission class IsCreator(BasePermission): def has_object_permission(self, request, view, obj): user = request.user creator = obj.created_by return user == creator class HasChangePermissions(BasePermission): def has_object_permission(self, ...
31
56
0.706989
from rest_framework.permissions import BasePermission class IsCreator(BasePermission): def has_object_permission(self, request, view, obj): user = request.user creator = obj.created_by return user == creator class HasChangePermissions(BasePermission): def has_object_permission(self, ...
true
true
f7120a6ba7fb9a76d9c012b1b2b2b4711cfb483e
1,765
py
Python
google-cloud-sdk/lib/surface/dns/managed_zones/list.py
KaranToor/MA450
c98b58aeb0994e011df960163541e9379ae7ea06
[ "Apache-2.0" ]
1
2017-11-29T18:52:27.000Z
2017-11-29T18:52:27.000Z
google-cloud-sdk/.install/.backup/lib/surface/dns/managed_zones/list.py
KaranToor/MA450
c98b58aeb0994e011df960163541e9379ae7ea06
[ "Apache-2.0" ]
null
null
null
google-cloud-sdk/.install/.backup/lib/surface/dns/managed_zones/list.py
KaranToor/MA450
c98b58aeb0994e011df960163541e9379ae7ea06
[ "Apache-2.0" ]
1
2020-07-25T12:09:01.000Z
2020-07-25T12:09:01.000Z
# Copyright 2014 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
29.416667
74
0.735411
from apitools.base.py import list_pager from googlecloudsdk.calliope import base from googlecloudsdk.core import apis from googlecloudsdk.core import properties from googlecloudsdk.core import resources class List(base.ListCommand): def Collection(self): return 'dns.managedZones' def GetUriFunc(self): ...
true
true
f7120aef004990ac9a81e6289bf19e150e650878
14,094
py
Python
netcal/scaling/LogisticCalibration.py
by-liu/calibration-framework
f1995512fea511572171974913fe5b569cac0cd0
[ "Apache-2.0" ]
148
2019-10-29T03:23:04.000Z
2022-03-30T12:36:20.000Z
netcal/scaling/LogisticCalibration.py
EFS-OpenSource/calibration-framework
7b306e4bbe6361d411b209759b7ba3d016bd0d17
[ "Apache-2.0" ]
19
2020-02-05T06:00:07.000Z
2022-03-17T06:37:19.000Z
netcal/scaling/LogisticCalibration.py
EFS-OpenSource/calibration-framework
7b306e4bbe6361d411b209759b7ba3d016bd0d17
[ "Apache-2.0" ]
25
2019-11-30T23:03:01.000Z
2022-02-16T20:40:29.000Z
# Copyright (C) 2019-2021 Ruhr West University of Applied Sciences, Bottrop, Germany # AND Elektronische Fahrwerksysteme GmbH, Gaimersheim Germany # # This Source Code Form is subject to the terms of the Apache License 2.0 # If a copy of the APL2 was not distributed with this # file, You can obtain one at https://www.a...
45.464516
232
0.639776
from collections import OrderedDict from typing import Union import numpy as np import torch import torch.distributions.constraints as constraints import pyro import pyro.distributions as dist from netcal.scaling import AbstractLogisticRegression class LogisticCalibration(AbstractLogisticRegression): def __in...
true
true
f7120b8565429dee273eab78444111fa9bd87754
3,231
py
Python
notebooks/chunks.py
manzt/bioimage-latency-benchmark
134a368f90cdf38532723f621e1766f31e2d3214
[ "BSD-2-Clause" ]
4
2021-03-01T22:05:50.000Z
2021-07-19T01:37:21.000Z
notebooks/chunks.py
manzt/bioimage-latency-benchmark
134a368f90cdf38532723f621e1766f31e2d3214
[ "BSD-2-Clause" ]
30
2021-01-18T15:43:42.000Z
2021-07-11T14:24:12.000Z
notebooks/chunks.py
manzt/bioimage-latency-benchmark
134a368f90cdf38532723f621e1766f31e2d3214
[ "BSD-2-Clause" ]
7
2021-01-18T09:24:23.000Z
2021-05-18T20:48:32.000Z
#!/usr/bin/env python import argparse import math import matplotlib.pyplot as plt def file_count(shape, chunkXY, chunkZ=1, chunkT=1, chunkC=1): t, c, z, y, x = shape return ( math.ceil(x / chunkXY) * math.ceil(y / chunkXY) * math.ceil(z / chunkZ) * math.ceil(t / chunkT) ...
28.095652
80
0.51532
import argparse import math import matplotlib.pyplot as plt def file_count(shape, chunkXY, chunkZ=1, chunkT=1, chunkC=1): t, c, z, y, x = shape return ( math.ceil(x / chunkXY) * math.ceil(y / chunkXY) * math.ceil(z / chunkZ) * math.ceil(t / chunkT) * math.ceil(c / chun...
true
true
f7120bbb841991f9b70d4b969c7be333b79a8e63
23,343
py
Python
tensorflow_examples/lite/model_maker/core/task/model_spec/audio_spec.py
H43RO/examples
54acd5f38d6368a29208b231e5028f16d18c954b
[ "Apache-2.0" ]
null
null
null
tensorflow_examples/lite/model_maker/core/task/model_spec/audio_spec.py
H43RO/examples
54acd5f38d6368a29208b231e5028f16d18c954b
[ "Apache-2.0" ]
null
null
null
tensorflow_examples/lite/model_maker/core/task/model_spec/audio_spec.py
H43RO/examples
54acd5f38d6368a29208b231e5028f16d18c954b
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
36.876777
117
0.699524
from __future__ import absolute_import from __future__ import division from __future__ import print_function import abc import collections import csv import io import os import tempfile import tensorflow as tf from tensorflow_examples.lite.model_maker.core.api.api_util import mm_export from tensorflow_examples.lite....
true
true
f7120c997e6b8020fd9732eb216da7769538d645
356
py
Python
UDPCatcher/UDPCatcher.py
phreakmonkey/esp8266-temperature
77e42c7abc39ffdcfda3f3b5a2131ca878b5ceb7
[ "MIT" ]
null
null
null
UDPCatcher/UDPCatcher.py
phreakmonkey/esp8266-temperature
77e42c7abc39ffdcfda3f3b5a2131ca878b5ceb7
[ "MIT" ]
null
null
null
UDPCatcher/UDPCatcher.py
phreakmonkey/esp8266-temperature
77e42c7abc39ffdcfda3f3b5a2131ca878b5ceb7
[ "MIT" ]
null
null
null
#!/usr/bin/python import datetime import socket LISTENPORT=3141 sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) sock.bind(('0.0.0.0', LISTENPORT)) while True: data, addr = sock.recvfrom(1024) print '%s: %s' % (datetime.datetime.now(), data) with open('temperature.log', 'a') as f: f.write('%s,%s\n'...
22.25
56
0.674157
import datetime import socket LISTENPORT=3141 sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) sock.bind(('0.0.0.0', LISTENPORT)) while True: data, addr = sock.recvfrom(1024) print '%s: %s' % (datetime.datetime.now(), data) with open('temperature.log', 'a') as f: f.write('%s,%s\n' % (datetime.datet...
false
true
f7120cc07fe43c93d23fe41b50c91384282ecec4
1,298
py
Python
backend/workspaces/Access/accessTypes.py
makakken/roseguarden
9a867f3d5e979b990bf474dcba81e5e9d0814c6a
[ "MIT" ]
null
null
null
backend/workspaces/Access/accessTypes.py
makakken/roseguarden
9a867f3d5e979b990bf474dcba81e5e9d0814c6a
[ "MIT" ]
null
null
null
backend/workspaces/Access/accessTypes.py
makakken/roseguarden
9a867f3d5e979b990bf474dcba81e5e9d0814c6a
[ "MIT" ]
null
null
null
""" The roseguarden project Copyright (C) 2018-2020 Marcus Drobisch, This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This pr...
28.844444
78
0.760401
__authors__ = ["Marcus Drobisch"] __contact__ = "roseguarden@fabba.space" __credits__ = [] __license__ = "GPLv3" from enum import Enum class SpaceAccessType(Enum): NO_ACCESS = "No access" UNLIMITED = "Unlimited" USER_BUDGET = "User Budget (days)" GROUP_BUDGET = "Group Budget (days)" AUTO_CHARGED...
true
true
f7120d1cc6ba38d8c9fb697e96174603e0208856
1,884
py
Python
ner-frog.py
PabloMosUU/data-processing
02cb40bd9828e664454b94197d308779b75c78f5
[ "Apache-2.0" ]
null
null
null
ner-frog.py
PabloMosUU/data-processing
02cb40bd9828e664454b94197d308779b75c78f5
[ "Apache-2.0" ]
10
2021-04-29T16:52:37.000Z
2021-04-29T17:59:34.000Z
ner-frog.py
eriktks/data-processing
9368ee3cd22817c5819b373cdf0f1fc869d376e7
[ "Apache-2.0" ]
1
2021-03-01T13:19:25.000Z
2021-03-01T13:19:25.000Z
#!/usr/bin/env python3 -W all """ ner-frog.py: perform named entity recognition for Dutch usage: ner-frog.py < text notes: * adapted from: https://www.tutorialspoint.com/python/python_networking.htm * requires frog running and listening on localhost port 8080 * output lines with format: token SP...
28.984615
82
0.705945
from pynlpl.clients.frogclient import FrogClient import sys COMMAND = sys.argv.pop(0) HOST = "localhost" PORT = 8080 NOFROGCONTACTMSG = "no Frog found on port "+str(PORT)+"! is it running?" NOFROGOUTPUTMSG = "no data received from Frog! is it running?" NERID = 4 POSID = 3 TOKENID = 0 def error(string): sys.exit(...
true
true
f7120d4d378c2029b2b15f7ace751796fdfd1d8b
2,192
py
Python
main.py
Ultcrt/ClassifyPhotoByDate
fe0bd66a5d4b67b5b2bdeb6a4fdb949ed18bb0c8
[ "MIT" ]
null
null
null
main.py
Ultcrt/ClassifyPhotoByDate
fe0bd66a5d4b67b5b2bdeb6a4fdb949ed18bb0c8
[ "MIT" ]
null
null
null
main.py
Ultcrt/ClassifyPhotoByDate
fe0bd66a5d4b67b5b2bdeb6a4fdb949ed18bb0c8
[ "MIT" ]
null
null
null
import shutil import time import exifread import os if __name__ == '__main__': photo_directory = input("Please input image directory: ") filenames = os.listdir(photo_directory) print(filenames, "\nDirectory contains files above, are you sure to process? (Y/N)") answer = input("") while answer != "...
48.711111
127
0.539234
import shutil import time import exifread import os if __name__ == '__main__': photo_directory = input("Please input image directory: ") filenames = os.listdir(photo_directory) print(filenames, "\nDirectory contains files above, are you sure to process? (Y/N)") answer = input("") while answer != "...
true
true
f7120db0ad7e024065400616a724ec4766012512
26,403
py
Python
dataFetcher.py
Jmion/SwisscomMIP
d29b0de222be44f85a84bc7dc3f4521741fdeda1
[ "MIT" ]
1
2021-10-06T06:57:55.000Z
2021-10-06T06:57:55.000Z
dataFetcher.py
Jmion/SwisscomMIP
d29b0de222be44f85a84bc7dc3f4521741fdeda1
[ "MIT" ]
null
null
null
dataFetcher.py
Jmion/SwisscomMIP
d29b0de222be44f85a84bc7dc3f4521741fdeda1
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # # Loading data import pandas as pd import plotly.express as px from tqdm import tqdm import functools import numpy as np from difflib import SequenceMatcher from oauthlib.oauth2 import BackendApplicationClient from requests_oauthlib import OAuth2Session from datetime import d...
40.37156
318
0.553308
import pandas as pd import plotly.express as px from tqdm import tqdm import functools import numpy as np from difflib import SequenceMatcher from oauthlib.oauth2 import BackendApplicationClient from requests_oauthlib import OAuth2Session from datetime import datetime, timedelta import pprint import requests import...
true
true
f7120db1922e9b61f9904aa753ea81f669efd904
22,173
py
Python
security/training_ann_3.py
acmlia/ann_training
8cb39123203445cf79c4bd65350fa4063705a518
[ "MIT" ]
null
null
null
security/training_ann_3.py
acmlia/ann_training
8cb39123203445cf79c4bd65350fa4063705a518
[ "MIT" ]
null
null
null
security/training_ann_3.py
acmlia/ann_training
8cb39123203445cf79c4bd65350fa4063705a518
[ "MIT" ]
null
null
null
from __future__ import absolute_import, division, print_function import os import time import pandas as pd import numpy as np import seaborn as sns from collections import Counter import matplotlib.pyplot as plt from sklearn.externals import joblib from sklearn.preprocessing import Normalizer from sklearn.model_select...
40.60989
159
0.504127
from __future__ import absolute_import, division, print_function import os import time import pandas as pd import numpy as np import seaborn as sns from collections import Counter import matplotlib.pyplot as plt from sklearn.externals import joblib from sklearn.preprocessing import Normalizer from sklearn.model_select...
true
true
f7120e1d3966f8abe1123b7a024e265d670bbd2c
1,554
py
Python
basic_ml/src/neural_networks/examples/logistic_regression/cat_classifier.py
jmetzz/ml-laboratory
26b1e87bd0d80efa4f15280f7f32ad46d59efc1f
[ "MIT" ]
1
2021-09-10T16:55:35.000Z
2021-09-10T16:55:35.000Z
basic_ml/src/neural_networks/examples/logistic_regression/cat_classifier.py
jmetzz/ml-laboratory
26b1e87bd0d80efa4f15280f7f32ad46d59efc1f
[ "MIT" ]
14
2022-03-12T01:06:08.000Z
2022-03-30T14:30:22.000Z
basic_ml/src/neural_networks/examples/logistic_regression/cat_classifier.py
jmetzz/ml-laboratory
26b1e87bd0d80efa4f15280f7f32ad46d59efc1f
[ "MIT" ]
null
null
null
from utils import data_helper if __name__ == "__main__": dataset_path = r"../data/raw/cat" ( train_set_x_orig, train_set_y, test_set_x_orig, test_set_y, classes, ) = data_helper.load_from_h5(dataset_path, "catvnoncat") m_train = train_set_x_orig.shape[0] m_...
42
110
0.720721
from utils import data_helper if __name__ == "__main__": dataset_path = r"../data/raw/cat" ( train_set_x_orig, train_set_y, test_set_x_orig, test_set_y, classes, ) = data_helper.load_from_h5(dataset_path, "catvnoncat") m_train = train_set_x_orig.shape[0] m_...
true
true
f7120e61db1f85f3b89bb63e4ef263b4f04433bb
569
py
Python
manage.py
josylad/RoomScout
a3d067dd67dfdd43702ea2e89064213dbd469157
[ "MIT" ]
null
null
null
manage.py
josylad/RoomScout
a3d067dd67dfdd43702ea2e89064213dbd469157
[ "MIT" ]
null
null
null
manage.py
josylad/RoomScout
a3d067dd67dfdd43702ea2e89064213dbd469157
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Roomscout.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't...
25.863636
70
0.755712
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Roomscout.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installed and " "available on your PYTHONPATH e...
true
true
f7120f42fc0dee7ab35a24c33c49f6875322bb70
996
py
Python
kubernetes/test/test_v1_cluster_role_binding.py
sgwilliams-ebsco/python
35e6406536c96d4769ff7e2a02bf0fdcb902a509
[ "Apache-2.0" ]
1
2021-06-10T23:44:11.000Z
2021-06-10T23:44:11.000Z
kubernetes/test/test_v1_cluster_role_binding.py
sgwilliams-ebsco/python
35e6406536c96d4769ff7e2a02bf0fdcb902a509
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_v1_cluster_role_binding.py
sgwilliams-ebsco/python
35e6406536c96d4769ff7e2a02bf0fdcb902a509
[ "Apache-2.0" ]
1
2018-11-06T16:33:43.000Z
2018-11-06T16:33:43.000Z
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.12.2 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys i...
22.133333
105
0.718876
from __future__ import absolute_import import os import sys import unittest import kubernetes.client from kubernetes.client.rest import ApiException from kubernetes.client.models.v1_cluster_role_binding import V1ClusterRoleBinding class TestV1ClusterRoleBinding(unittest.TestCase): def setUp(self): p...
true
true
f712109e9932ee0c9ff1a2337fc4fec2b28a7d9e
1,257
py
Python
bento/distutils/commands/egg_info.py
abadger/Bento
3f1ddefd8d21decbc018d097d3ec5da4dc9364df
[ "BSD-3-Clause" ]
1
2015-10-25T13:08:36.000Z
2015-10-25T13:08:36.000Z
bento/distutils/commands/egg_info.py
abadger/Bento
3f1ddefd8d21decbc018d097d3ec5da4dc9364df
[ "BSD-3-Clause" ]
null
null
null
bento/distutils/commands/egg_info.py
abadger/Bento
3f1ddefd8d21decbc018d097d3ec5da4dc9364df
[ "BSD-3-Clause" ]
null
null
null
import os import os.path as op from bento.distutils.utils \ import \ _is_setuptools_activated if _is_setuptools_activated(): from setuptools.command.egg_info \ import \ egg_info as old_egg_info else: raise ValueError("You cannot use egg_info without setuptools enabled first") f...
26.744681
80
0.615752
import os import os.path as op from bento.distutils.utils \ import \ _is_setuptools_activated if _is_setuptools_activated(): from setuptools.command.egg_info \ import \ egg_info as old_egg_info else: raise ValueError("You cannot use egg_info without setuptools enabled first") f...
false
true
f71210edcf06454a986bc0a68541537ffa080b52
8,827
py
Python
corehq/ex-submodules/casexml/apps/case/tests/util.py
dimagilg/commcare-hq
ea1786238eae556bb7f1cbd8d2460171af1b619c
[ "BSD-3-Clause" ]
1
2020-07-14T13:00:23.000Z
2020-07-14T13:00:23.000Z
corehq/ex-submodules/casexml/apps/case/tests/util.py
dimagilg/commcare-hq
ea1786238eae556bb7f1cbd8d2460171af1b619c
[ "BSD-3-Clause" ]
94
2020-12-11T06:57:31.000Z
2022-03-15T10:24:06.000Z
corehq/ex-submodules/casexml/apps/case/tests/util.py
dimagilg/commcare-hq
ea1786238eae556bb7f1cbd8d2460171af1b619c
[ "BSD-3-Clause" ]
null
null
null
import os import uuid from contextlib import contextmanager from datetime import datetime from xml.etree import cElementTree as ElementTree from casexml.apps.phone.restore_caching import RestorePayloadPathCache from corehq.apps.receiverwrapper.util import submit_form_locally from corehq.form_processor.tests.utils impor...
36.475207
113
0.672029
import os import uuid from contextlib import contextmanager from datetime import datetime from xml.etree import cElementTree as ElementTree from casexml.apps.phone.restore_caching import RestorePayloadPathCache from corehq.apps.receiverwrapper.util import submit_form_locally from corehq.form_processor.tests.utils impor...
true
true
f712114abc4040a367c7e4b69ada13b59f045957
7,429
py
Python
accelbyte_py_sdk/api/iam/models/clientmodel_client_creation_response.py
AccelByte/accelbyte-python-sdk
dcd311fad111c59da828278975340fb92e0f26f7
[ "MIT" ]
null
null
null
accelbyte_py_sdk/api/iam/models/clientmodel_client_creation_response.py
AccelByte/accelbyte-python-sdk
dcd311fad111c59da828278975340fb92e0f26f7
[ "MIT" ]
1
2021-10-13T03:46:58.000Z
2021-10-13T03:46:58.000Z
accelbyte_py_sdk/api/iam/models/clientmodel_client_creation_response.py
AccelByte/accelbyte-python-sdk
dcd311fad111c59da828278975340fb92e0f26f7
[ "MIT" ]
null
null
null
# Copyright (c) 2021 AccelByte Inc. All Rights Reserved. # This is licensed software from AccelByte Inc, for limitations # and restrictions contact your company contract manager. # # Code generated. DO NOT EDIT! # template file: justice_py_sdk_codegen/__main__.py # justice-iam-service (5.10.1) # pylint: disable=dup...
37.71066
220
0.632925
from __future__ import annotations from typing import Any, Dict, List, Optional, Tuple, Union from ....core import Model from ..models.accountcommon_permission import AccountcommonPermission class ClientmodelClientCreationResponse(Model): client_id: str ...
true
true
f71212a207d4b48e50907c370bddc5b810d7d1ff
722
py
Python
models.py
GDGKuwait/gae-knet-python
3271ace131ed02da9b560e5222df95b23b00dd1c
[ "MIT" ]
6
2015-07-04T07:14:54.000Z
2021-05-13T01:32:27.000Z
models.py
GDGKuwait/gae-knet-python
3271ace131ed02da9b560e5222df95b23b00dd1c
[ "MIT" ]
null
null
null
models.py
GDGKuwait/gae-knet-python
3271ace131ed02da9b560e5222df95b23b00dd1c
[ "MIT" ]
4
2017-09-27T12:19:30.000Z
2019-09-19T06:42:25.000Z
from google.appengine.ext import ndb class Transaction(ndb.Model): """A simple model to store the properties of an order""" total_amount = ndb.FloatProperty(indexed=False) transaction_id = ndb.StringProperty(indexed=False) transaction_ref = ndb.StringProperty(indexed=False) post_date = ndb.StringPr...
45.125
60
0.756233
from google.appengine.ext import ndb class Transaction(ndb.Model): total_amount = ndb.FloatProperty(indexed=False) transaction_id = ndb.StringProperty(indexed=False) transaction_ref = ndb.StringProperty(indexed=False) post_date = ndb.StringProperty(indexed=False) payment_id = ndb.StringProperty(ind...
true
true
f71212c6a843bae2d45fd86612bdc4c434b56b3d
6,130
py
Python
src/ralph_scrooge/plugins/cost/base.py
xliiv/ralph_pricing
88a295b6f0af66ae03c145205ada99f17ab51dd0
[ "Apache-2.0" ]
null
null
null
src/ralph_scrooge/plugins/cost/base.py
xliiv/ralph_pricing
88a295b6f0af66ae03c145205ada99f17ab51dd0
[ "Apache-2.0" ]
null
null
null
src/ralph_scrooge/plugins/cost/base.py
xliiv/ralph_pricing
88a295b6f0af66ae03c145205ada99f17ab51dd0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import abc import logging from decimal import Decimal as D from django.db.models import Sum from ralph_scrooge.utils.common import memoize from...
32.780749
79
0.645188
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import abc import logging from decimal import Decimal as D from django.db.models import Sum from ralph_scrooge.utils.common import memoize from ralph_scrooge.models im...
true
true
f7121368bf139c3337b1cdf55121b385b818176a
5,851
py
Python
tests/analysis/test_lib.py
berggren/plaso
2658c80c5076f97a9a27272e73997bde8c39e875
[ "Apache-2.0" ]
27
2019-04-05T12:01:49.000Z
2022-02-08T02:26:25.000Z
tests/analysis/test_lib.py
berggren/plaso
2658c80c5076f97a9a27272e73997bde8c39e875
[ "Apache-2.0" ]
null
null
null
tests/analysis/test_lib.py
berggren/plaso
2658c80c5076f97a9a27272e73997bde8c39e875
[ "Apache-2.0" ]
8
2019-11-28T08:06:34.000Z
2020-08-29T13:53:30.000Z
# -*- coding: utf-8 -*- """Analysis plugin related functions and classes for testing.""" from __future__ import unicode_literals from plaso.analysis import mediator as analysis_mediator from plaso.containers import artifacts from plaso.containers import sessions from plaso.engine import knowledge_base from plaso.pars...
32.687151
78
0.725346
from __future__ import unicode_literals from plaso.analysis import mediator as analysis_mediator from plaso.containers import artifacts from plaso.containers import sessions from plaso.engine import knowledge_base from plaso.parsers import interface as parsers_interface from plaso.parsers import mediator as parsers_m...
true
true
f7121458772fafde6ecd3ae916914e89348cc6a7
3,064
py
Python
admit/xmlio/BDPReader.py
astroumd/admit
bbf3d79bb6e1a6f7523553ed8ede0d358d106f2c
[ "MIT" ]
4
2017-03-01T17:26:28.000Z
2022-03-03T19:23:06.000Z
admit/xmlio/BDPReader.py
teuben/admit
1cae54d1937c9af3f719102838df716e7e6d655c
[ "MIT" ]
48
2016-10-04T01:25:33.000Z
2021-09-08T14:51:10.000Z
admit/xmlio/BDPReader.py
teuben/admit
1cae54d1937c9af3f719102838df716e7e6d655c
[ "MIT" ]
2
2016-11-10T14:10:22.000Z
2017-03-30T18:58:05.000Z
""" .. _BDPReader-api: BDPReader --- Converts BDP in XML format to in-memory BDP object. ----------------------------------------------------------------- This module defines the BDPReader class. """ #system imports from xml import sax import os # ADMIT imports import admit.util.bdp_types as bt import ...
36.915663
101
0.60346
from xml import sax import os import admit.util.bdp_types as bt import admit.util.utils as utils from admit.xmlio.AdmitParser import AdmitParser from admit.xmlio.ErrorHandler import ErrorHandler class BDPReader(object): def __init__(self, file=None): self.file = file def read(self, file=None): ...
true
true
f71216171fed91d435973fb1e1c21f8ed44eba12
9,773
py
Python
src/py/flwr_experimental/baseline/tf_fashion_mnist/gen_plots.py
vballoli/flower
e8c58c09a8fd4d29186b2f590b0cbb44bb022e9a
[ "Apache-2.0" ]
2
2021-06-07T21:44:28.000Z
2022-03-27T18:56:13.000Z
src/py/flwr_experimental/baseline/tf_fashion_mnist/gen_plots.py
vballoli/flower
e8c58c09a8fd4d29186b2f590b0cbb44bb022e9a
[ "Apache-2.0" ]
null
null
null
src/py/flwr_experimental/baseline/tf_fashion_mnist/gen_plots.py
vballoli/flower
e8c58c09a8fd4d29186b2f590b0cbb44bb022e9a
[ "Apache-2.0" ]
1
2020-08-23T18:08:54.000Z
2020-08-23T18:08:54.000Z
# Copyright 2020 Adap GmbH. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
29.705167
86
0.551929
from typing import List, Tuple import numpy as np from flwr_experimental.baseline.plot import bar_chart, line_chart RESULTS = { "fedavg-t10": [ (0, 0.03759999945759773), (1, 0.03759999945759773), (2, 0.03759999945759773), (3, 0.03759999945759773), (4, 0.03759999945759773...
true
true
f712175e09ffbf2aff24abfee6b610e7644d41e0
349
py
Python
setup.py
helgehatt/nilu-api-client
e57de3b06cb3dddd6810940843659ba9c934f263
[ "MIT" ]
null
null
null
setup.py
helgehatt/nilu-api-client
e57de3b06cb3dddd6810940843659ba9c934f263
[ "MIT" ]
null
null
null
setup.py
helgehatt/nilu-api-client
e57de3b06cb3dddd6810940843659ba9c934f263
[ "MIT" ]
null
null
null
from setuptools import setup, PEP420PackageFinder setup( name="nilu-api-client", version="1.0.0", author="helgehatt", description="NILU API client", url="https://github.com/helgehatt/nilu-api-client", packages=PEP420PackageFinder.find(), package_data={"": ["**/files/*"]}, install_requir...
26.846154
55
0.664756
from setuptools import setup, PEP420PackageFinder setup( name="nilu-api-client", version="1.0.0", author="helgehatt", description="NILU API client", url="https://github.com/helgehatt/nilu-api-client", packages=PEP420PackageFinder.find(), package_data={"": ["**/files/*"]}, install_requir...
true
true
f7121a3b0466a81c16ef8f14c32d909d32f4dc51
2,052
py
Python
vspk/v4_0/fetchers/nuvms_fetcher.py
cldelcourt/vspk-python
cdea810cd220e6ddc131407735941b9a26b2edda
[ "BSD-3-Clause" ]
null
null
null
vspk/v4_0/fetchers/nuvms_fetcher.py
cldelcourt/vspk-python
cdea810cd220e6ddc131407735941b9a26b2edda
[ "BSD-3-Clause" ]
null
null
null
vspk/v4_0/fetchers/nuvms_fetcher.py
cldelcourt/vspk-python
cdea810cd220e6ddc131407735941b9a26b2edda
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright (c) 2015, Alcatel-Lucent Inc # 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 above copyright # no...
39.461538
86
0.719786
from bambou import NURESTFetcher class NUVMsFetcher(NURESTFetcher): @classmethod def managed_class(cls): from .. import NUVM return NUVM
true
true
f7121a82a1a3962a6962a68c8b36dce2b4d9e88d
38,457
py
Python
venv/lib/python3.8/site-packages/sqlalchemy/dialects/postgresql/psycopg2.py
mamu234/Blog-post
93a46cba0390fed2d50fcb8b23ec176be0c9a286
[ "Apache-2.0" ]
null
null
null
venv/lib/python3.8/site-packages/sqlalchemy/dialects/postgresql/psycopg2.py
mamu234/Blog-post
93a46cba0390fed2d50fcb8b23ec176be0c9a286
[ "Apache-2.0" ]
null
null
null
venv/lib/python3.8/site-packages/sqlalchemy/dialects/postgresql/psycopg2.py
mamu234/Blog-post
93a46cba0390fed2d50fcb8b23ec176be0c9a286
[ "Apache-2.0" ]
null
null
null
# postgresql/psycopg2.py # Copyright (C) 2005-2022 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: https://www.opensource.org/licenses/mit-license.php r""" .. dialect:: postgresql+psycopg2 :name: psycopg2 :dbapi: psycopg...
36.521368
97
0.671841
from __future__ import absolute_import import decimal import logging import re from uuid import UUID as _python_UUID from .array import ARRAY as PGARRAY from .base import _ColonCast from .base import _DECIMAL_TYPES from .base import _FLOAT_TYPES from .base import _INT_TYPES from .base import ENUM from .base import PG...
true
true
f7121abf1a18968e7746de23a2ee5a13ca3649df
3,627
py
Python
desktop/core/src/desktop/api_public_urls.py
cegganesh84/hue
87d40042e5599975cfac9931b981a92d13060c09
[ "Apache-2.0" ]
null
null
null
desktop/core/src/desktop/api_public_urls.py
cegganesh84/hue
87d40042e5599975cfac9931b981a92d13060c09
[ "Apache-2.0" ]
null
null
null
desktop/core/src/desktop/api_public_urls.py
cegganesh84/hue
87d40042e5599975cfac9931b981a92d13060c09
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
44.777778
116
0.728426
import sys from desktop import api_public from desktop.lib.botserver import api as botserver_api if sys.version_info[0] > 2: from django.urls import re_path else: from django.conf.urls import url as re_path urlpatterns = [ re_path(r'^query/create_notebook/?$', api_public.create_notebook, name='api_create_not...
true
true
f7121adafc174a142d840487e73f1da2113b3820
5,691
py
Python
src/robot/utils/text.py
cristii006/robotframework
9a291f4124854a0b549ed477348c334af6bc9c9a
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/robot/utils/text.py
cristii006/robotframework
9a291f4124854a0b549ed477348c334af6bc9c9a
[ "ECL-2.0", "Apache-2.0" ]
30
2021-01-07T12:44:27.000Z
2022-03-02T15:12:16.000Z
src/robot/utils/text.py
jiejohn/robotframework
24db5d1dcbb68afe68931a5ec47f78a9b37e70ce
[ "ECL-2.0", "Apache-2.0" ]
1
2018-04-23T10:03:05.000Z
2018-04-23T10:03:05.000Z
# Copyright 2008-2015 Nokia Networks # Copyright 2016- Robot Framework Foundation # # 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 ...
29.335052
81
0.652785
from itertools import takewhile import inspect import os.path import re from .charwidth import get_char_width from .misc import seq2str2 from .platform import JYTHON, PY_VERSION from .robottypes import is_string, is_unicode from .unic import unic MAX_ERROR_LINES = 40 _MAX_ASSIGN_LENGTH = 200 _MAX_ERROR_LINE_LENGTH ...
true
true
f7121ade542907e108d910c21210367f7571019f
23,097
py
Python
snacktime/snacktime.py
kablekompany/aikaterna-cogs
992a52001918213ef0be076a0f739bbad61d3400
[ "Apache-2.0" ]
98
2017-09-12T01:52:17.000Z
2022-03-17T16:43:01.000Z
snacktime/snacktime.py
kablekompany/aikaterna-cogs
992a52001918213ef0be076a0f739bbad61d3400
[ "Apache-2.0" ]
147
2016-12-01T04:39:05.000Z
2022-02-13T02:20:14.000Z
snacktime/snacktime.py
kablekompany/aikaterna-cogs
992a52001918213ef0be076a0f739bbad61d3400
[ "Apache-2.0" ]
160
2016-12-01T20:19:44.000Z
2022-03-30T10:32:41.000Z
import asyncio import discord import logging from random import randint from random import choice as randchoice from redbot.core import bank, checks, commands, Config from redbot.core.errors import BalanceTooHigh from redbot.core.utils.chat_formatting import box, humanize_list, pagify from .phrases import FRIENDS, SN...
47.233129
144
0.546954
import asyncio import discord import logging from random import randint from random import choice as randchoice from redbot.core import bank, checks, commands, Config from redbot.core.errors import BalanceTooHigh from redbot.core.utils.chat_formatting import box, humanize_list, pagify from .phrases import FRIENDS, SN...
true
true
f7121bbd694c961f1720be598aab40bc56871c48
11,781
py
Python
src/ggrc/automapper/__init__.py
kripsy/Project
5ff892513ea74621ea5031a7d5bc7a6a614debc8
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/ggrc/automapper/__init__.py
kripsy/Project
5ff892513ea74621ea5031a7d5bc7a6a614debc8
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/ggrc/automapper/__init__.py
kripsy/Project
5ff892513ea74621ea5031a7d5bc7a6a614debc8
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> from datetime import datetime from logging import getLogger import collections from sqlalchemy.sql.expression import tuple_ from ggrc import db from ggrc import models from ggrc.automapper.rules import rul...
34.548387
79
0.668025
from datetime import datetime from logging import getLogger import collections from sqlalchemy.sql.expression import tuple_ from ggrc import db from ggrc import models from ggrc.automapper.rules import rules from ggrc.login import get_current_user from ggrc.models.audit import Audit from ggrc.models.relationship imp...
true
true
f7121bf34f0e62d7db03a16a374592a47631f59a
3,390
py
Python
cpp_api_binding/generator/autocxxpy/textholder.py
vnpy/vnpy_lab
370ec82d65584eac28a00ec34b839ad790bee414
[ "MIT" ]
12
2019-02-16T20:03:23.000Z
2022-01-28T02:37:56.000Z
cpp_api_binding/generator/autocxxpy/textholder.py
vnpy/vnpy_lab
370ec82d65584eac28a00ec34b839ad790bee414
[ "MIT" ]
1
2019-03-08T04:57:11.000Z
2019-03-12T01:21:56.000Z
cpp_api_binding/generator/autocxxpy/textholder.py
vnpy/vnpy_lab
370ec82d65584eac28a00ec34b839ad790bee414
[ "MIT" ]
9
2019-02-24T03:35:05.000Z
2021-12-21T08:55:59.000Z
# encoding: utf-8 from typing import Optional, Union class Indent: class IdentStart: def __init__(self, text): self.text = text class IdentEnd: def __init__(self, text): self.text = text class IdentEndLater: def __init__(self, text): self.text ...
27.786885
78
0.546608
from typing import Optional, Union class Indent: class IdentStart: def __init__(self, text): self.text = text class IdentEnd: def __init__(self, text): self.text = text class IdentEndLater: def __init__(self, text): self.text = text def __...
true
true
f7121e2864688c5f866234797e5caf13d6732dfc
5,414
py
Python
stix_shifter_modules/stix_bundle/stix_transmission/connector.py
priti-patil/stix-shifter
26954598fb79dde4506987388592ec391ff8a10b
[ "Apache-2.0" ]
33
2018-05-25T17:07:28.000Z
2019-09-30T10:08:53.000Z
stix_shifter_modules/stix_bundle/stix_transmission/connector.py
priti-patil/stix-shifter
26954598fb79dde4506987388592ec391ff8a10b
[ "Apache-2.0" ]
54
2018-06-01T18:17:24.000Z
2019-09-30T18:36:15.000Z
stix_shifter_modules/stix_bundle/stix_transmission/connector.py
subbyte/stix-shifter
36d71c172a5fc5b97d872e623753b0dd1bf4fe6c
[ "Apache-2.0" ]
37
2018-07-24T13:29:46.000Z
2019-09-29T19:06:27.000Z
from stix_shifter_utils.modules.base.stix_transmission.base_sync_connector import BaseSyncConnector from stix_shifter_utils.stix_transmission.utils.RestApiClient import RestApiClient from stix2matcher.matcher import Pattern from stix2matcher.matcher import MatchListener from stix2validator import validate_instance impo...
43.66129
139
0.62283
from stix_shifter_utils.modules.base.stix_transmission.base_sync_connector import BaseSyncConnector from stix_shifter_utils.stix_transmission.utils.RestApiClient import RestApiClient from stix2matcher.matcher import Pattern from stix2matcher.matcher import MatchListener from stix2validator import validate_instance impo...
true
true
f7121ea230136c174548f4eb9d48d9a24503e780
523
py
Python
src/detection/HogDetector.py
ShivangMathur1/Face-Recognition-System
3a7eb1af8830d6c36218652ed30edd8a49b7bb4d
[ "MIT" ]
null
null
null
src/detection/HogDetector.py
ShivangMathur1/Face-Recognition-System
3a7eb1af8830d6c36218652ed30edd8a49b7bb4d
[ "MIT" ]
3
2022-01-15T06:46:26.000Z
2022-02-23T11:14:03.000Z
src/detection/HogDetector.py
ShivangMathur1/Face-Recognition-System
3a7eb1af8830d6c36218652ed30edd8a49b7bb4d
[ "MIT" ]
3
2022-01-11T08:33:15.000Z
2022-02-21T09:26:26.000Z
import dlib class HogDetector: def __init__(self): self.detector = dlib.get_frontal_face_detector() def detect(self, frame): bboxes = [] # landmarks = [] dets = self.detector(frame, 1) for k, d in enumerate(dets): bboxes.append( (d.left(), d...
27.526316
79
0.518164
import dlib class HogDetector: def __init__(self): self.detector = dlib.get_frontal_face_detector() def detect(self, frame): bboxes = [] dets = self.detector(frame, 1) for k, d in enumerate(dets): bboxes.append( (d.left(), d.top(), d.right()...
true
true
f7121eeb007618e671e35240f3ad0076d0dfe049
1,431
py
Python
src/freemovr_engine/cvnumpy.py
strawlab/flyvr
335892cae740e53e82e07b526e1ba53fbd34b0ce
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
3
2015-01-29T14:09:25.000Z
2016-04-24T04:25:49.000Z
src/freemovr_engine/cvnumpy.py
strawlab/flyvr
335892cae740e53e82e07b526e1ba53fbd34b0ce
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
src/freemovr_engine/cvnumpy.py
strawlab/flyvr
335892cae740e53e82e07b526e1ba53fbd34b0ce
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
import numpy as np import cv2 def rodrigues2matrix_cv(params): rvec = np.array(params,dtype=np.float64) rvec.shape = (1,3) Rmat, jacobian = cv2.Rodrigues(rvec) return Rmat def rodrigues2matrix(params): # Written after the docs at # http://opencv.itseez.com/modules/calib3d/doc/camera_calibratio...
25.553571
106
0.549965
import numpy as np import cv2 def rodrigues2matrix_cv(params): rvec = np.array(params,dtype=np.float64) rvec.shape = (1,3) Rmat, jacobian = cv2.Rodrigues(rvec) return Rmat def rodrigues2matrix(params): try: rvec = np.array(params,dtype=np.float) rvec.shape = (1,3) exce...
true
true
f7121fa54a5b188afc1ff9e830eec697373cbb64
35,492
py
Python
pandas/tests/test_common.py
kjordahl/pandas
e660c058a662426afc4d8855aabf4677f01b4a4c
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
1
2016-07-14T20:35:55.000Z
2016-07-14T20:35:55.000Z
pandas/tests/test_common.py
jonathanrocher/pandas
e660c058a662426afc4d8855aabf4677f01b4a4c
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
pandas/tests/test_common.py
jonathanrocher/pandas
e660c058a662426afc4d8855aabf4677f01b4a4c
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import collections from datetime import datetime import re import nose from nose.tools import assert_equal import numpy as np from pandas.tslib import iNaT, NaT from pandas import Series, DataFrame, date_range, DatetimeIndex, Timestamp, Float64Index from pandas import compat from pandas.compat ...
34.35818
88
0.590837
import collections from datetime import datetime import re import nose from nose.tools import assert_equal import numpy as np from pandas.tslib import iNaT, NaT from pandas import Series, DataFrame, date_range, DatetimeIndex, Timestamp, Float64Index from pandas import compat from pandas.compat import range, long, lran...
true
true
f7121ff60d7bd5cec836daa22c31f02f3a70d7aa
25,603
py
Python
parser/python/nnef/shapes.py
kiritigowda/NNEF-Tools
c3391f9269417ef83f4ffa798c703067a8404000
[ "Apache-2.0" ]
1
2019-08-28T11:58:52.000Z
2019-08-28T11:58:52.000Z
parser/python/nnef/shapes.py
Acidburn0zzz/NNEF-Tools
f9bcb3e043474d47f6a8a552abcc6d1069476072
[ "Apache-2.0" ]
null
null
null
parser/python/nnef/shapes.py
Acidburn0zzz/NNEF-Tools
f9bcb3e043474d47f6a8a552abcc6d1069476072
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2017 The Khronos Group Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
39.942278
131
0.642972
import nnef def _ensure_rank(array, rank, value=1): return array if len(array) == rank else array + [value] * rank def _volume(shape): volume = 1 for s in shape: volume *= s return volume def _broadcast_compatible(x,y): return all(xi == yi or xi == 1 or yi == 1 for xi, yi in zip(x, y)...
true
true
f71220024a182f29299ae5aabf352be29be31aac
1,134
py
Python
molo/core/apps.py
praekeltfoundation/molo-basic
0c8a5fdbaf0eb62efc7164a26326801a27116dfe
[ "BSD-2-Clause" ]
null
null
null
molo/core/apps.py
praekeltfoundation/molo-basic
0c8a5fdbaf0eb62efc7164a26326801a27116dfe
[ "BSD-2-Clause" ]
3
2021-01-28T21:04:23.000Z
2022-03-25T19:05:41.000Z
molo/core/apps.py
praekeltfoundation/molo-basic
0c8a5fdbaf0eb62efc7164a26326801a27116dfe
[ "BSD-2-Clause" ]
1
2020-09-09T08:01:02.000Z
2020-09-09T08:01:02.000Z
from django.apps import AppConfig from django.db.utils import OperationalError, ProgrammingError from django.conf import settings from django.utils.timezone import activate import logging class MoloAppConfig(AppConfig): name = 'molo.core' def ready(self): from molo.core.models import Site, CmsSettin...
30.648649
79
0.632275
from django.apps import AppConfig from django.db.utils import OperationalError, ProgrammingError from django.conf import settings from django.utils.timezone import activate import logging class MoloAppConfig(AppConfig): name = 'molo.core' def ready(self): from molo.core.models import Site, CmsSettin...
true
true
f712207ccbcc060becc6c6998ba9af031749691d
3,035
py
Python
tests/st/ops/ascend/vector/test_relu6_grad_001.py
KnowingNothing/akg-test
114d8626b824b9a31af50a482afc07ab7121862b
[ "Apache-2.0" ]
null
null
null
tests/st/ops/ascend/vector/test_relu6_grad_001.py
KnowingNothing/akg-test
114d8626b824b9a31af50a482afc07ab7121862b
[ "Apache-2.0" ]
null
null
null
tests/st/ops/ascend/vector/test_relu6_grad_001.py
KnowingNothing/akg-test
114d8626b824b9a31af50a482afc07ab7121862b
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
33.722222
88
0.596705
import os import pytest from tests.common.base import TestBase from tests.common.test_run.relu6_grad_run import relu6_grad_run class TestCase(TestBase): def setup(self): case_name = "test_akg_relu6_grad_001" case_path = os.getcwd() self.params_init(case_name, case_path) ...
true
true
f7122086a14075c39b4d8eb01aebec8fdf6ab321
304
py
Python
gnn/__init__.py
rmongeca/gnn-qm9
8c945570e47046a2e9c9f33a5827cb42a5db04ed
[ "MIT" ]
1
2020-11-05T03:28:24.000Z
2020-11-05T03:28:24.000Z
gnn/__init__.py
rmongeca/gnn
8c945570e47046a2e9c9f33a5827cb42a5db04ed
[ "MIT" ]
1
2020-11-06T02:14:59.000Z
2020-11-08T13:58:35.000Z
gnn/__init__.py
rmongeca/gnn-qm9
8c945570e47046a2e9c9f33a5827cb42a5db04ed
[ "MIT" ]
null
null
null
from . import initial, input, message_passing, mlp, readout, update from .gnn import GNN from .input import GNNInput, get_dataset_from_files __all__ = [ "GNN", "GNNInput", "get_dataset_from_files", "initial", "input", "message_passing", "mlp", "readout", "update", ]
19
67
0.648026
from . import initial, input, message_passing, mlp, readout, update from .gnn import GNN from .input import GNNInput, get_dataset_from_files __all__ = [ "GNN", "GNNInput", "get_dataset_from_files", "initial", "input", "message_passing", "mlp", "readout", "update", ]
true
true
f71221031df32f5aa5a845e0b72787ec29de30b1
2,076
py
Python
app/HTTPClient.py
sgabriel190/weather-desktop-app
fb9a384495a315eebab183f9f12a5dafefa67e51
[ "Apache-2.0" ]
null
null
null
app/HTTPClient.py
sgabriel190/weather-desktop-app
fb9a384495a315eebab183f9f12a5dafefa67e51
[ "Apache-2.0" ]
null
null
null
app/HTTPClient.py
sgabriel190/weather-desktop-app
fb9a384495a315eebab183f9f12a5dafefa67e51
[ "Apache-2.0" ]
null
null
null
import json import os from http import HTTPStatus from typing import Any import requests class HTTPClient: __instance = None def __new__(cls): """ This method creates the only instance of the class(singleton pattern) :param cls: The class :return: The method retur...
31.454545
86
0.538536
import json import os from http import HTTPStatus from typing import Any import requests class HTTPClient: __instance = None def __new__(cls): if cls.__instance is None: cls.__instance = object.__new__(cls) return cls.__instance def __init__(self): self.api_url = "ht...
true
true
f71221ffc685ffe2becb5fc49aa8ece83b303e46
2,178
py
Python
src/simplify_docx/types/fragment.py
brunomnsilva/Simplify-Docx
002fd548e322701c98b2cfe2a6e7354eac9410e6
[ "MIT" ]
88
2019-05-10T19:30:30.000Z
2022-03-17T01:12:45.000Z
src/simplify_docx/types/fragment.py
brunomnsilva/Simplify-Docx
002fd548e322701c98b2cfe2a6e7354eac9410e6
[ "MIT" ]
14
2019-11-04T19:53:11.000Z
2022-03-25T17:04:29.000Z
src/simplify_docx/types/fragment.py
brunomnsilva/Simplify-Docx
002fd548e322701c98b2cfe2a6e7354eac9410e6
[ "MIT" ]
22
2019-11-04T19:48:43.000Z
2021-10-18T03:04:07.000Z
""" Abstract classes for typing purposes only """ # pylint: disable=no-self-use,pointless-statement,missing-docstring,invalid-name, too-few-public-methods from __future__ import annotations from typing import Optional, Dict, Sequence class xmlFragment: """an abstract class representing the xml fragments returned b...
20.742857
104
0.695592
from __future__ import annotations from typing import Optional, Dict, Sequence class xmlFragment: tag: str prefix: Optional[str] attrib: Dict[str, str] nsmap: Dict[str, str] text: Optional[str] tail: Optional[str] def getchildren(self) -> Sequence[xmlFragment]: ... def getparent...
true
true
f7122214f740f04f24cd196784e1a8ac6fc4a929
1,368
py
Python
tools/mo/openvino/tools/mo/ops/Reverse.py
ieliz/openvino
6f60a7d8f098c7cf3195ba96d964a11bf1babe55
[ "Apache-2.0" ]
null
null
null
tools/mo/openvino/tools/mo/ops/Reverse.py
ieliz/openvino
6f60a7d8f098c7cf3195ba96d964a11bf1babe55
[ "Apache-2.0" ]
18
2022-01-21T08:42:58.000Z
2022-03-28T13:21:31.000Z
tools/mo/openvino/tools/mo/ops/Reverse.py
ematroso/openvino
403339f8f470c90dee6f6d94ed58644b2787f66b
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2018-2022 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import numpy as np from openvino.tools.mo.front.common.partial_infer.utils import int64_array from openvino.tools.mo.graph.graph import Graph from openvino.tools.mo.ops.op import Op class Reverse(Op): op = 'Reverse' def __ini...
30.4
76
0.606725
import numpy as np from openvino.tools.mo.front.common.partial_infer.utils import int64_array from openvino.tools.mo.graph.graph import Graph from openvino.tools.mo.ops.op import Op class Reverse(Op): op = 'Reverse' def __init__(self, graph: Graph, attrs: dict): mandatory_props = { 'typ...
true
true
f712228bb9b19c7e175b165a9217c86665caeafe
3,915
py
Python
openprocurement/auctions/geb/views/procedure_document.py
andrey484/openprocurement.auctions.geb
05c9ea3db1b1d290521b1430286ff2e5064819cd
[ "Apache-2.0" ]
null
null
null
openprocurement/auctions/geb/views/procedure_document.py
andrey484/openprocurement.auctions.geb
05c9ea3db1b1d290521b1430286ff2e5064819cd
[ "Apache-2.0" ]
null
null
null
openprocurement/auctions/geb/views/procedure_document.py
andrey484/openprocurement.auctions.geb
05c9ea3db1b1d290521b1430286ff2e5064819cd
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from openprocurement.auctions.core.utils import ( json_view, context_unpack, opresource ) from openprocurement.auctions.core.validation import ( validate_file_update, validate_file_upload, validate_patch_document_data ) from openprocurement.auctions.core.views.mixins impo...
38.762376
130
0.654406
from openprocurement.auctions.core.utils import ( json_view, context_unpack, opresource ) from openprocurement.auctions.core.validation import ( validate_file_update, validate_file_upload, validate_patch_document_data ) from openprocurement.auctions.core.views.mixins import AuctionDocumentResour...
true
true
f712236a186eadbda44cac0b3fce518ec5ae9c37
19,526
py
Python
src/core/python/core/io/aperiodic_ean.py
railtoolkit/OpenLinTim
27eba8b6038946ce162e9f7bbc0bd23045029d51
[ "MIT" ]
null
null
null
src/core/python/core/io/aperiodic_ean.py
railtoolkit/OpenLinTim
27eba8b6038946ce162e9f7bbc0bd23045029d51
[ "MIT" ]
null
null
null
src/core/python/core/io/aperiodic_ean.py
railtoolkit/OpenLinTim
27eba8b6038946ce162e9f7bbc0bd23045029d51
[ "MIT" ]
null
null
null
from typing import List from core.exceptions.data_exceptions import (DataIndexNotFoundException, DataIllegalEventTypeException, DataIllegalActivityTypeException) from core.exceptions.input_exceptions import (InputFormatException,...
49.308081
118
0.595053
from typing import List from core.exceptions.data_exceptions import (DataIndexNotFoundException, DataIllegalEventTypeException, DataIllegalActivityTypeException) from core.exceptions.input_exceptions import (InputFormatException,...
true
true
f712242dc2ed24624befb3c47d11e69e7fe26af5
540
py
Python
neo/SmartContract/tests/BreakpointTest.py
conscott/neo-python
ea794abbf941638fbe957d511614f3d66a7c2ef1
[ "MIT" ]
387
2017-07-17T18:25:54.000Z
2021-11-18T06:19:47.000Z
neo/SmartContract/tests/BreakpointTest.py
conscott/neo-python
ea794abbf941638fbe957d511614f3d66a7c2ef1
[ "MIT" ]
967
2017-08-19T15:48:03.000Z
2021-06-01T21:42:39.000Z
neo/SmartContract/tests/BreakpointTest.py
conscott/neo-python
ea794abbf941638fbe957d511614f3d66a7c2ef1
[ "MIT" ]
286
2017-07-17T03:44:36.000Z
2021-11-18T06:19:32.000Z
from boa.builtins import breakpoint def Main(operation): result = False if operation == 1: m = 3 breakpoint() result = True elif operation == 2: breakpoint() result = False elif operation == 3: b = 'hello' breakpoint() j = 32 ...
13.5
35
0.505556
from boa.builtins import breakpoint def Main(operation): result = False if operation == 1: m = 3 breakpoint() result = True elif operation == 2: breakpoint() result = False elif operation == 3: b = 'hello' breakpoint() j = 32 ...
true
true
f7122449e93c21a65c201655848c5670aea7129c
2,840
py
Python
examples/baremetal/nlp/sst2/bert_mini/bert_mini_export.py
intel/neural-compressor
16a4a12045fcb468da4d33769aff2c1a5e2ba6ba
[ "Apache-2.0" ]
172
2021-09-14T18:34:17.000Z
2022-03-30T06:49:53.000Z
examples/baremetal/nlp/sst2/bert_mini/bert_mini_export.py
intel/lp-opt-tool
130eefa3586b38df6c0ff78cc8807ae273f6a63f
[ "Apache-2.0" ]
40
2021-09-14T02:26:12.000Z
2022-03-29T08:34:04.000Z
examples/baremetal/nlp/sst2/bert_mini/bert_mini_export.py
intel/neural-compressor
16a4a12045fcb468da4d33769aff2c1a5e2ba6ba
[ "Apache-2.0" ]
33
2021-09-15T07:27:25.000Z
2022-03-25T08:30:57.000Z
import argparse import torch from transformers import BertForSequenceClassification def export_onnx_model(args, model, onnx_model_path): with torch.no_grad(): inputs = {'input_ids': torch.ones(1,args.max_len, dtype=torch.int32), 'attention_mask': torch.ones(1,args.max_len, dtype=t...
44.375
100
0.536268
import argparse import torch from transformers import BertForSequenceClassification def export_onnx_model(args, model, onnx_model_path): with torch.no_grad(): inputs = {'input_ids': torch.ones(1,args.max_len, dtype=torch.int32), 'attention_mask': torch.ones(1,args.max_len, dtype=t...
true
true
f712244c8d02e199d14ea551a8e72f2a47c8a743
27,774
py
Python
tensorflow/python/estimator/canned/dnn_linear_combined.py
knightvishal/tensorflow
5d3dd19b7146d954fc1b4e9e44e9881e75d363c1
[ "Apache-2.0" ]
4
2021-06-15T17:26:07.000Z
2021-11-17T10:58:08.000Z
tensorflow/python/estimator/canned/dnn_linear_combined.py
knightvishal/tensorflow
5d3dd19b7146d954fc1b4e9e44e9881e75d363c1
[ "Apache-2.0" ]
4
2020-09-26T00:55:50.000Z
2022-02-10T01:53:06.000Z
tensorflow/python/estimator/canned/dnn_linear_combined.py
knightvishal/tensorflow
5d3dd19b7146d954fc1b4e9e44e9881e75d363c1
[ "Apache-2.0" ]
4
2018-02-18T03:39:01.000Z
2018-10-18T11:49:17.000Z
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
43.876777
112
0.701699
from __future__ import absolute_import from __future__ import division from __future__ import print_function import math import six from tensorflow.python.estimator import estimator from tensorflow.python.estimator.canned import dnn from tensorflow.python.estimator.canned import head as head_lib from tensorflow.pyt...
true
true
f71224679be7c31461c344cd601c55a4a3e0016a
8,091
py
Python
igf_data/igfdb/useradaptor.py
imperial-genomics-facility/data-management-python
7b867d8d4562a49173d0b823bdc4bf374a3688f0
[ "Apache-2.0" ]
7
2018-05-08T07:28:08.000Z
2022-02-21T14:56:49.000Z
igf_data/igfdb/useradaptor.py
imperial-genomics-facility/data-management-python
7b867d8d4562a49173d0b823bdc4bf374a3688f0
[ "Apache-2.0" ]
15
2021-08-19T12:32:20.000Z
2022-02-09T19:52:51.000Z
igf_data/igfdb/useradaptor.py
imperial-genomics-facility/data-management-python
7b867d8d4562a49173d0b823bdc4bf374a3688f0
[ "Apache-2.0" ]
2
2017-05-12T15:20:10.000Z
2020-05-07T16:25:11.000Z
import pandas as pd import json, hashlib, os, codecs, base64 from igf_data.igfdb.baseadaptor import BaseAdaptor from igf_data.igfdb.igfTables import User class UserAdaptor(BaseAdaptor): ''' An adaptor class for table User ''' def _email_check(self, email): ''' An internal function to check i...
37.985915
145
0.587814
import pandas as pd import json, hashlib, os, codecs, base64 from igf_data.igfdb.baseadaptor import BaseAdaptor from igf_data.igfdb.igfTables import User class UserAdaptor(BaseAdaptor): def _email_check(self, email): if '@' not in email: raise ValueError('Email id {0} is not correctly formatted'.fo...
true
true
f712257c4639960803ab6ffaa0ddd5ffaf8f487b
1,266
py
Python
swutils/phone.py
Egorka96/sw-python-utils
4b7e82f72e9a46aa9f5723ce254b5cf8164af286
[ "MIT" ]
null
null
null
swutils/phone.py
Egorka96/sw-python-utils
4b7e82f72e9a46aa9f5723ce254b5cf8164af286
[ "MIT" ]
3
2017-05-30T14:06:07.000Z
2021-04-20T11:12:44.000Z
swutils/phone.py
Egorka96/sw-python-utils
4b7e82f72e9a46aa9f5723ce254b5cf8164af286
[ "MIT" ]
3
2017-05-30T14:03:42.000Z
2021-04-20T11:08:23.000Z
# coding: utf-8 import re class CanonicalPhoneGenerationException(Exception): pass def gen_canonical_phone(original_phone, first_number='7', check_code=True): # удалим все не цифровые символы phone = re.sub('\D', '', original_phone) if not (10 <= len(phone) <= 11): raise CanonicalPhoneGener...
26.93617
117
0.687994
import re class CanonicalPhoneGenerationException(Exception): pass def gen_canonical_phone(original_phone, first_number='7', check_code=True): phone = re.sub('\D', '', original_phone) if not (10 <= len(phone) <= 11): raise CanonicalPhoneGenerationException('Номер должен состоять из 10 или 1...
true
true
f712262bad36154aabfc8212df1361ba37d0fc4b
219,516
py
Python
modules/templates/RMSAmericas/config.py
whanderley/eden
08ced3be3d52352c54cbd412ed86128fbb68b1d2
[ "MIT" ]
null
null
null
modules/templates/RMSAmericas/config.py
whanderley/eden
08ced3be3d52352c54cbd412ed86128fbb68b1d2
[ "MIT" ]
null
null
null
modules/templates/RMSAmericas/config.py
whanderley/eden
08ced3be3d52352c54cbd412ed86128fbb68b1d2
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import datetime from collections import OrderedDict from gluon import current from gluon.storage import Storage from s3 import S3Method from .controllers import deploy_index RED_CROSS = "Red Cross / Red Crescent" def config(settings): """ Template settings for IFRC's Resource M...
42.198385
192
0.450614
import datetime from collections import OrderedDict from gluon import current from gluon.storage import Storage from s3 import S3Method from .controllers import deploy_index RED_CROSS = "Red Cross / Red Crescent" def config(settings): T = current.T settings.base.system_name = T("Resource Man...
true
true
f71226f2fde896191c5eea9d00e2b3163d822db7
1,355
py
Python
03_picnic/picnic.py
mahmoudabderahman/tiny_python_projects
d88b77a718d8905c1a217e6bee4ebe7a86d6a50d
[ "MIT" ]
null
null
null
03_picnic/picnic.py
mahmoudabderahman/tiny_python_projects
d88b77a718d8905c1a217e6bee4ebe7a86d6a50d
[ "MIT" ]
null
null
null
03_picnic/picnic.py
mahmoudabderahman/tiny_python_projects
d88b77a718d8905c1a217e6bee4ebe7a86d6a50d
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """ Author : mahmoudabdelrahman <mahmoudabdelrahman@localhost> Date : 2022-01-28 Purpose: Rock the Casbah """ import argparse # -------------------------------------------------- def get_args(): """Get command-line arguments""" parser = argparse.ArgumentParser( description='...
22.966102
63
0.473063
import argparse def get_args(): parser = argparse.ArgumentParser( description='Rock the Casbah', formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument('item', metavar='str', nargs='+', help='Item(s...
true
true
f712275070a0f676783eaa91a4e4abd6c4315a6b
1,776
py
Python
src/data/split_medline.py
zhang-informatics/SemRep_DS
9cd35fc22e632fd65a16808a02e377dad0eb5aae
[ "CECILL-B" ]
1
2021-07-07T19:31:12.000Z
2021-07-07T19:31:12.000Z
src/data/split_medline.py
zhang-informatics/SemRep_DS
9cd35fc22e632fd65a16808a02e377dad0eb5aae
[ "CECILL-B" ]
null
null
null
src/data/split_medline.py
zhang-informatics/SemRep_DS
9cd35fc22e632fd65a16808a02e377dad0eb5aae
[ "CECILL-B" ]
null
null
null
import os import argparse """ Splits a single file of MEDLINE formatted abstracts into M files of N abstracts. """ def parse_args(): parser = argparse.ArgumentParser() parser.add_argument("infile", type=str, help="MEDLINE file to split") parser.add_argument("outdir", type=str, ...
30.62069
62
0.509009
import os import argparse def parse_args(): parser = argparse.ArgumentParser() parser.add_argument("infile", type=str, help="MEDLINE file to split") parser.add_argument("outdir", type=str, help="Where to save the file splits.") parser.add_argument("-N"...
true
true
f7122795949ae011164009a4f891f706a2f769c0
5,010
py
Python
sdk/search/azure-search-documents/tests/test_search_index_client.py
GoWang/azure-sdk-for-python
f241e3734a50953c2a37c10d2d84eb4c013b3ba0
[ "MIT" ]
2
2021-03-24T06:26:11.000Z
2021-04-18T15:55:59.000Z
sdk/search/azure-search-documents/tests/test_search_index_client.py
GoWang/azure-sdk-for-python
f241e3734a50953c2a37c10d2d84eb4c013b3ba0
[ "MIT" ]
null
null
null
sdk/search/azure-search-documents/tests/test_search_index_client.py
GoWang/azure-sdk-for-python
f241e3734a50953c2a37c10d2d84eb4c013b3ba0
[ "MIT" ]
1
2021-12-18T20:01:22.000Z
2021-12-18T20:01:22.000Z
# ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ import pytest try: from unittest import mock except ImportError: import mock from azure.core.credentials import AzureKeyCredential from azure.search.documents...
39.140625
120
0.679042
import pytest try: from unittest import mock except ImportError: import mock from azure.core.credentials import AzureKeyCredential from azure.search.documents import SearchClient, ApiVersion from azure.search.documents.indexes import SearchIndexClient, SearchIndexerClient from azure.search.documents.indexes....
true
true
f71229a55f2f84f8440f7c60c54aea370310d1b2
3,618
py
Python
Blender_Script_Executor.py
SBCV/PythonBlenderUtility
4f91c5a356fede103bcb8c2a9ba1d4d0b01aadc3
[ "MIT" ]
1
2022-01-30T05:58:06.000Z
2022-01-30T05:58:06.000Z
Blender_Script_Executor.py
SBCV/PythonBlenderUtility
4f91c5a356fede103bcb8c2a9ba1d4d0b01aadc3
[ "MIT" ]
null
null
null
Blender_Script_Executor.py
SBCV/PythonBlenderUtility
4f91c5a356fede103bcb8c2a9ba1d4d0b01aadc3
[ "MIT" ]
null
null
null
# executes the module loader in blender import os import subprocess from shutil import copyfile from Utility.OS_Extension import get_first_valid_path from Utility.Config import Config from Utility.Logging_Extension import logger # ====== Warning when starting blender ====== # "connect failed: No such file or director...
38.903226
118
0.669983
import os import subprocess from shutil import copyfile from Utility.OS_Extension import get_first_valid_path from Utility.Config import Config from Utility.Logging_Extension import logger def execute_blender_script(blender_script_ifp, background_mode=True, ...
true
true
f7122a1ed70aa8e685c258cec1e1d0af3c466064
28,754
py
Python
saleor/graphql/payment/tests/test_payment.py
asadrajput2/saleor
26048fa4ceb30813075716ec04f5ebde1bff14c6
[ "CC-BY-4.0" ]
1
2021-04-22T12:36:32.000Z
2021-04-22T12:36:32.000Z
saleor/graphql/payment/tests/test_payment.py
asadrajput2/saleor
26048fa4ceb30813075716ec04f5ebde1bff14c6
[ "CC-BY-4.0" ]
2
2021-03-20T10:39:06.000Z
2021-03-26T01:11:13.000Z
saleor/graphql/payment/tests/test_payment.py
asadrajput2/saleor
26048fa4ceb30813075716ec04f5ebde1bff14c6
[ "CC-BY-4.0" ]
null
null
null
from decimal import Decimal from unittest.mock import patch import graphene import pytest from ....checkout import calculations from ....payment.error_codes import PaymentErrorCode from ....payment.gateways.dummy_credit_card import ( TOKEN_EXPIRED, TOKEN_VALIDATION_MAPPING, ) from ....payment.interface import...
34.895631
88
0.6902
from decimal import Decimal from unittest.mock import patch import graphene import pytest from ....checkout import calculations from ....payment.error_codes import PaymentErrorCode from ....payment.gateways.dummy_credit_card import ( TOKEN_EXPIRED, TOKEN_VALIDATION_MAPPING, ) from ....payment.interface import...
true
true
f7122af1da4049435740909f4567f190ac8dcb24
10,215
py
Python
sympy/parsing/tests/test_latex.py
jsmolic/sympy
4c8422b989a46baf7ad3b1d26c0e9dbb72e07aee
[ "BSD-3-Clause" ]
1
2021-12-15T11:34:16.000Z
2021-12-15T11:34:16.000Z
sympy/parsing/tests/test_latex.py
jsmolic/sympy
4c8422b989a46baf7ad3b1d26c0e9dbb72e07aee
[ "BSD-3-Clause" ]
null
null
null
sympy/parsing/tests/test_latex.py
jsmolic/sympy
4c8422b989a46baf7ad3b1d26c0e9dbb72e07aee
[ "BSD-3-Clause" ]
null
null
null
from sympy.testing.pytest import raises, XFAIL from sympy.external import import_module from sympy import ( Symbol, Mul, Add, Abs, sin, asin, cos, Pow, csc, sec, Limit, oo, Derivative, Integral, factorial, sqrt, root, conjugate, StrictLessThan, LessThan, StrictGreaterThan, GreaterThan, Sum, Product, E,...
30.954545
72
0.498091
from sympy.testing.pytest import raises, XFAIL from sympy.external import import_module from sympy import ( Symbol, Mul, Add, Abs, sin, asin, cos, Pow, csc, sec, Limit, oo, Derivative, Integral, factorial, sqrt, root, conjugate, StrictLessThan, LessThan, StrictGreaterThan, GreaterThan, Sum, Product, E,...
true
true
f7122d19a73bc9a19aac2db7f7c2c83f2af682f7
30,091
py
Python
luna/gateware/usb/usb3/link/receiver.py
Shari2/luna
f54de01c9dc13aeca5d20734a9c103227cb9603f
[ "BSD-3-Clause" ]
null
null
null
luna/gateware/usb/usb3/link/receiver.py
Shari2/luna
f54de01c9dc13aeca5d20734a9c103227cb9603f
[ "BSD-3-Clause" ]
4
2020-11-11T17:32:33.000Z
2020-11-30T13:08:05.000Z
luna/gateware/usb/usb3/link/receiver.py
Shari2/luna
f54de01c9dc13aeca5d20734a9c103227cb9603f
[ "BSD-3-Clause" ]
null
null
null
# # This file is part of LUNA. # # Copyright (c) 2020 Great Scott Gadgets <info@greatscottgadgets.com> # SPDX-License-Identifier: BSD-3-Clause """ Header Packet Rx-handling gateware. """ import unittest from nmigen import * from nmigen.hdl.ast import Fell from usb_protocol.types...
39.961487
115
0.568177
import unittest from nmigen import * from nmigen.hdl.ast import Fell from usb_protocol.types.superspeed import LinkCommand from .header import HeaderPacket, HeaderQueue from .crc import compute_usb_crc5, HeaderPacketCRC from .comma...
true
true
f71230a89cea605ff1ea6f3e276ae0520f8367f6
11,762
py
Python
storage/google/cloud/storage/batch.py
hugovk/google-cloud-python
b387134827dbc3be0e1b431201e0875798002fda
[ "Apache-2.0" ]
1
2019-03-26T21:44:51.000Z
2019-03-26T21:44:51.000Z
storage/google/cloud/storage/batch.py
hugovk/google-cloud-python
b387134827dbc3be0e1b431201e0875798002fda
[ "Apache-2.0" ]
1
2019-03-29T22:03:48.000Z
2019-04-02T22:24:45.000Z
storage/google/cloud/storage/batch.py
hugovk/google-cloud-python
b387134827dbc3be0e1b431201e0875798002fda
[ "Apache-2.0" ]
1
2019-03-29T18:26:16.000Z
2019-03-29T18:26:16.000Z
# Copyright 2014 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
34.092754
87
0.637392
from email.encoders import encode_noop from email.generator import Generator from email.mime.application import MIMEApplication from email.mime.multipart import MIMEMultipart from email.parser import Parser import io import json import requests import six from google.cloud import _helpers from google.cloud import exc...
true
true
f71231cf6f8a3acb225c2dcfe6da3c7c86478f6d
551
py
Python
app.py
KleinChiu/REST-in-RPIO
f2672075323ad4b927a6f4061bf77506d587908d
[ "MIT" ]
null
null
null
app.py
KleinChiu/REST-in-RPIO
f2672075323ad4b927a6f4061bf77506d587908d
[ "MIT" ]
null
null
null
app.py
KleinChiu/REST-in-RPIO
f2672075323ad4b927a6f4061bf77506d587908d
[ "MIT" ]
null
null
null
import flask from devices import devices from models import JsonEncoder from pins import pins from settings import settings app = flask.Flask(__name__) app.json_encoder = JsonEncoder app.register_blueprint(devices, url_prefix="/devices") app.register_blueprint(settings, url_prefix="/settings") app.register_blueprint(...
22.04
56
0.738657
import flask from devices import devices from models import JsonEncoder from pins import pins from settings import settings app = flask.Flask(__name__) app.json_encoder = JsonEncoder app.register_blueprint(devices, url_prefix="/devices") app.register_blueprint(settings, url_prefix="/settings") app.register_blueprint(...
true
true
f71233e1333aa3dc33f9c8b750d85db2570f4cea
19,827
py
Python
sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_form_recognizer_client.py
howardjones/azure-sdk-for-python
8bb488e3ca7045a3b3ba8d27b17cb001283efebe
[ "MIT" ]
null
null
null
sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_form_recognizer_client.py
howardjones/azure-sdk-for-python
8bb488e3ca7045a3b3ba8d27b17cb001283efebe
[ "MIT" ]
null
null
null
sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_form_recognizer_client.py
howardjones/azure-sdk-for-python
8bb488e3ca7045a3b3ba8d27b17cb001283efebe
[ "MIT" ]
null
null
null
# coding=utf-8 # ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ # pylint: disable=protected-access from typing import ( Any, IO, Union, List, TYPE_CHECKING ) from azure.core.tracing.decorator impo...
50.068182
109
0.679276
from typing import ( Any, IO, Union, List, TYPE_CHECKING ) from azure.core.tracing.decorator import distributed_trace from azure.core.polling import LROPoller from azure.core.polling.base_polling import LROBasePolling from ._generated._form_recognizer_client import FormRecognizerClient as FormReco...
true
true
f71233f540bc233f2013f19aa1a2f7fdae46e105
220
py
Python
lstmcpipe/tests/test_install.py
garciagenrique/LST_scripts
2a1e60ab3ba01ac3cc7b178ccb9d675b7383a5b0
[ "MIT" ]
null
null
null
lstmcpipe/tests/test_install.py
garciagenrique/LST_scripts
2a1e60ab3ba01ac3cc7b178ccb9d675b7383a5b0
[ "MIT" ]
null
null
null
lstmcpipe/tests/test_install.py
garciagenrique/LST_scripts
2a1e60ab3ba01ac3cc7b178ccb9d675b7383a5b0
[ "MIT" ]
null
null
null
import re import lst_scripts def test_version(): with open("lstirf/__init__.py") as f: __version__ = re.search('^__version__ = "(.*)"$', f.read()).group(1) assert lst_scripts.__version__ == __version__
24.444444
76
0.668182
import re import lst_scripts def test_version(): with open("lstirf/__init__.py") as f: __version__ = re.search('^__version__ = "(.*)"$', f.read()).group(1) assert lst_scripts.__version__ == __version__
true
true
f71234ab49a6563630d0ef412e551b2135db2eab
894
py
Python
backend/src/base/authentication.py
Ornstein89/EVRAZ-AI-Challenge-Mountain-fighters
b8b6765fab82a355231a8560356ccbe404ce1251
[ "MIT" ]
null
null
null
backend/src/base/authentication.py
Ornstein89/EVRAZ-AI-Challenge-Mountain-fighters
b8b6765fab82a355231a8560356ccbe404ce1251
[ "MIT" ]
null
null
null
backend/src/base/authentication.py
Ornstein89/EVRAZ-AI-Challenge-Mountain-fighters
b8b6765fab82a355231a8560356ccbe404ce1251
[ "MIT" ]
null
null
null
from rest_framework.authentication import SessionAuthentication as RESTSessionAuthentication class SessionAuthentication(RESTSessionAuthentication): """ This class is needed, because REST Framework's default SessionAuthentication does never return 401's, because they cannot fill the WWW-Authenticate heade...
55.875
118
0.787472
from rest_framework.authentication import SessionAuthentication as RESTSessionAuthentication class SessionAuthentication(RESTSessionAuthentication): def authenticate_header(self, request): return 'Session'
true
true
f7123504e5f1b05e3eb7f13487087188bb995417
14,556
py
Python
qiskit/pulse/library/continuous.py
TheGupta2012/qiskit-terra
5ea6e9557655b144228c29d7099375f5d2c91120
[ "Apache-2.0" ]
1,599
2018-07-10T10:59:12.000Z
2022-03-31T23:56:25.000Z
qiskit/pulse/library/continuous.py
TheGupta2012/qiskit-terra
5ea6e9557655b144228c29d7099375f5d2c91120
[ "Apache-2.0" ]
5,244
2018-07-10T06:20:13.000Z
2022-03-31T22:18:48.000Z
qiskit/pulse/library/continuous.py
TheGupta2012/qiskit-terra
5ea6e9557655b144228c29d7099375f5d2c91120
[ "Apache-2.0" ]
1,409
2018-07-10T02:16:12.000Z
2022-03-31T09:01:32.000Z
# This code is part of Qiskit. # # (C) Copyright IBM 2017, 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
33.772622
100
0.640286
import functools from typing import Union, Tuple, Optional import numpy as np from qiskit.pulse.exceptions import PulseError def constant(times: np.ndarray, amp: complex) -> np.ndarray: return np.full(len(times), amp, dtype=np.complex_) def zero(times: np.ndarray) -> np.ndarray: return constant(times, 0...
true
true
f71235557a65c26f538c563025c7861867fe57dd
2,067
py
Python
vcdgrep.py
elecbrick/usb-sim
0b0bed31666579e8dea3c220da00c11e31039895
[ "BSD-2-Clause" ]
null
null
null
vcdgrep.py
elecbrick/usb-sim
0b0bed31666579e8dea3c220da00c11e31039895
[ "BSD-2-Clause" ]
null
null
null
vcdgrep.py
elecbrick/usb-sim
0b0bed31666579e8dea3c220da00c11e31039895
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python3 ''' Copyright © 2020 Doug Eaton USBDecode is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. usb_decode is distributed...
31.318182
79
0.545718
from enum import Enum import fileinput import re wanted=["usb_d_n", "usb_d_p", "usb_tx_en", "usb_pullup"] signals=[] line=None if __name__ == "__main__": tb="tb" with fileinput.input() as vcd: for line in vcd: if line[0:6]=='$scope': break print(line, ...
true
true
f71236bb00f583a8f88b13e6d00918f6c8d111c6
6,040
py
Python
colossalai/context/moe_context.py
JunjieChen-2020/ColossalAI
0e121a256ac4f628f5d26a16dc553cd0024ca2d5
[ "Apache-2.0" ]
null
null
null
colossalai/context/moe_context.py
JunjieChen-2020/ColossalAI
0e121a256ac4f628f5d26a16dc553cd0024ca2d5
[ "Apache-2.0" ]
null
null
null
colossalai/context/moe_context.py
JunjieChen-2020/ColossalAI
0e121a256ac4f628f5d26a16dc553cd0024ca2d5
[ "Apache-2.0" ]
null
null
null
import torch import torch.distributed as dist from .parallel_mode import ParallelMode from typing import Tuple def _check_sanity(): from colossalai.core import global_context as gpc if gpc.tensor_parallel_size > 1 or gpc.pipeline_parallel_size > 1: raise NotImplementedError("Moe is not compat...
37.055215
102
0.630795
import torch import torch.distributed as dist from .parallel_mode import ParallelMode from typing import Tuple def _check_sanity(): from colossalai.core import global_context as gpc if gpc.tensor_parallel_size > 1 or gpc.pipeline_parallel_size > 1: raise NotImplementedError("Moe is not compat...
true
true
f71236f1e03f18d03585a51592c7026849f881f6
2,054
py
Python
test_model.py
FurySwordXD/VehicleAI-CNN
7ac4db5a32434a228d3d32ccf3ca83cbf5113051
[ "MIT" ]
2
2019-04-09T05:40:11.000Z
2019-12-05T07:12:02.000Z
test_model.py
FurySwordXD/VehicleAI-CNN
7ac4db5a32434a228d3d32ccf3ca83cbf5113051
[ "MIT" ]
null
null
null
test_model.py
FurySwordXD/VehicleAI-CNN
7ac4db5a32434a228d3d32ccf3ca83cbf5113051
[ "MIT" ]
null
null
null
import numpy as np import cv2 import time from grabscreen import grab_screen import os from alexnet import alexnet from keys import key_check, PressKey, ReleaseKey, W, A, S, D t_time = 0.09 def forward(): PressKey(W) ReleaseKey(A) ReleaseKey(D) ReleaseKey(S) def left(): PressKey(A) PressKey(W...
21.395833
92
0.580818
import numpy as np import cv2 import time from grabscreen import grab_screen import os from alexnet import alexnet from keys import key_check, PressKey, ReleaseKey, W, A, S, D t_time = 0.09 def forward(): PressKey(W) ReleaseKey(A) ReleaseKey(D) ReleaseKey(S) def left(): PressKey(A) PressKey(W...
true
true
f712372a12372a94b88914abf3de5f76202ee7fc
7,372
py
Python
ppdet/modeling/necks/blazeface_fpn.py
wzwb/PaddleDetection
8c6f05f5ea2933dad79e03855939514613949336
[ "Apache-2.0" ]
2
2021-08-24T11:32:59.000Z
2022-01-07T02:26:13.000Z
ppdet/modeling/necks/blazeface_fpn.py
DEPRIMES/PaddleDetection
99c7e3a75a955b4a4cb038679c8f88e170bb3b44
[ "Apache-2.0" ]
null
null
null
ppdet/modeling/necks/blazeface_fpn.py
DEPRIMES/PaddleDetection
99c7e3a75a955b4a4cb038679c8f88e170bb3b44
[ "Apache-2.0" ]
3
2021-09-30T02:50:21.000Z
2021-11-16T12:38:15.000Z
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
31.91342
79
0.539474
import numpy as np import math import paddle import paddle.nn.functional as F from paddle import ParamAttr import paddle.nn as nn from paddle.nn.initializer import KaimingNormal from ppdet.core.workspace import register, serializable from ppdet.modeling.layers import ConvNormLayer from ..shape_spec import ShapeSpec _...
true
true
f712372c535bdd51773b69555e9bde147a05679f
1,811
py
Python
src/speaking_eye/activity_stat.py
alena-bartosh/speaking-eye
86e692cf5d3182f77b28e5264da74657d1972303
[ "MIT" ]
6
2020-04-30T17:35:09.000Z
2021-11-18T09:41:50.000Z
src/speaking_eye/activity_stat.py
alena-bartosh/speaking-eye
86e692cf5d3182f77b28e5264da74657d1972303
[ "MIT" ]
6
2020-05-16T17:52:45.000Z
2021-08-16T11:47:11.000Z
src/speaking_eye/activity_stat.py
alena-bartosh/speaking-eye
86e692cf5d3182f77b28e5264da74657d1972303
[ "MIT" ]
null
null
null
from datetime import timedelta from .activity import Activity from .activity_helper import ActivityHelper class ActivityStat: """Store and update the amount of time spent in a certain activity""" def __init__(self, work_time: timedelta = timedelta(), off_time: timedelta = timedelta()) -> No...
32.339286
73
0.662065
from datetime import timedelta from .activity import Activity from .activity_helper import ActivityHelper class ActivityStat: def __init__(self, work_time: timedelta = timedelta(), off_time: timedelta = timedelta()) -> None: self.work_time = work_time self.off_time = off_time ...
true
true
f71237f42d07e55e22a11b163735c5d5490e64dd
8,115
py
Python
fabfile.py
Acidburn0zzz/readthedocs.org
8bdc55b47e59c9080589f479d7df42a16904276d
[ "MIT" ]
2
2015-08-08T11:32:34.000Z
2017-11-12T18:17:05.000Z
fabfile.py
ZipTax/readthedocs.org
18d5e578a3c0b490566f9adf159fca98dd1cfed8
[ "MIT" ]
null
null
null
fabfile.py
ZipTax/readthedocs.org
18d5e578a3c0b490566f9adf159fca98dd1cfed8
[ "MIT" ]
1
2015-06-06T17:25:27.000Z
2015-06-06T17:25:27.000Z
from fabric.api import cd, env, lcd, local, hosts, prompt, run from fabric.decorators import runs_once import os import time env.runtime = 'production' env.hosts = ['newchimera.readthedocs.com', 'newbuild.readthedocs.com', 'newasgard.readthedocs.com'] env.user = 'docs' env.code_dir = '/home/...
31.091954
150
0.652249
from fabric.api import cd, env, lcd, local, hosts, prompt, run from fabric.decorators import runs_once import os import time env.runtime = 'production' env.hosts = ['newchimera.readthedocs.com', 'newbuild.readthedocs.com', 'newasgard.readthedocs.com'] env.user = 'docs' env.code_dir = '/home/...
false
true
f71238df271af14f188a05283e10c514d310a2e7
6,974
py
Python
netcompare/netcompare.py
criteo/netcompare
4e0ef33601f144e6e6b9513476793983ec904baa
[ "Apache-2.0" ]
34
2015-06-25T08:15:00.000Z
2022-02-08T17:18:00.000Z
netcompare/netcompare.py
mirzawaqasahmed/netcompare
4e0ef33601f144e6e6b9513476793983ec904baa
[ "Apache-2.0" ]
16
2015-10-20T11:55:59.000Z
2021-11-01T14:32:11.000Z
netcompare/netcompare.py
mirzawaqasahmed/netcompare
4e0ef33601f144e6e6b9513476793983ec904baa
[ "Apache-2.0" ]
16
2015-06-24T23:08:28.000Z
2022-02-21T11:30:38.000Z
#!/usr/bin/env python # Copyright 2015 Criteo. All rights reserved. # # The contents of this file are 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....
36.899471
79
0.537281
import re import argparse import yaml from ciscoconfparse import CiscoConfParse def cli_parser(argv=None): parser = argparse.ArgumentParser( description='Generating configuration commands by finding differences' ' between two Cisco IOS style configuration files') parser.add_argu...
false
true
f712394f3537b9cd704f5d4760f2d6f80f38640d
129
py
Python
Blob_Lib/assimp-5.2.3/assimp/contrib/draco/.cmake-format.py
antholuo/Blob_Traffic
5d6acf88044e9abc63c0ff356714179eaa4b75bf
[ "MIT" ]
null
null
null
Blob_Lib/assimp-5.2.3/assimp/contrib/draco/.cmake-format.py
antholuo/Blob_Traffic
5d6acf88044e9abc63c0ff356714179eaa4b75bf
[ "MIT" ]
null
null
null
Blob_Lib/assimp-5.2.3/assimp/contrib/draco/.cmake-format.py
antholuo/Blob_Traffic
5d6acf88044e9abc63c0ff356714179eaa4b75bf
[ "MIT" ]
null
null
null
version https://git-lfs.github.com/spec/v1 oid sha256:6c0828479c4167ae77b4de1f98c39749190ceaf383b6046097cfd212b12804de size 3101
32.25
75
0.883721
version https://git-lfs.github.com/spec/v1 oid sha256:6c0828479c4167ae77b4de1f98c39749190ceaf383b6046097cfd212b12804de size 3101
false
true
f7123a804695dfbb517d04763c7e90ced7d38585
2,454
py
Python
fishtank/main.py
benjhagan/BenPythonProjects
eb83854c66b7feb800e4620103ffea9ae6340a42
[ "MIT" ]
null
null
null
fishtank/main.py
benjhagan/BenPythonProjects
eb83854c66b7feb800e4620103ffea9ae6340a42
[ "MIT" ]
null
null
null
fishtank/main.py
benjhagan/BenPythonProjects
eb83854c66b7feb800e4620103ffea9ae6340a42
[ "MIT" ]
null
null
null
# Complete project details at https://RandomNerdTutorials.com import socket import network import machine, onewire, ds18x20, time sta_if = network.WLAN(network.STA_IF) print(sta_if.ifconfig()) ds_pin = machine.Pin(4) ds_sensor = ds18x20.DS18X20(onewire.OneWire(ds_pin)) def read_ds_sensor(): roms = ds_sensor.scan...
33.162162
196
0.655664
import socket import network import machine, onewire, ds18x20, time sta_if = network.WLAN(network.STA_IF) print(sta_if.ifconfig()) ds_pin = machine.Pin(4) ds_sensor = ds18x20.DS18X20(onewire.OneWire(ds_pin)) def read_ds_sensor(): roms = ds_sensor.scan() print('Found DS devices: ', roms) print('Temperatures: ...
true
true
f7123b729a8d4b6b3a867794f92595c2bea998d0
1,531
py
Python
molsysmt/structure/get_sasa.py
dprada/molsysmt
83f150bfe3cfa7603566a0ed4aed79d9b0c97f5d
[ "MIT" ]
null
null
null
molsysmt/structure/get_sasa.py
dprada/molsysmt
83f150bfe3cfa7603566a0ed4aed79d9b0c97f5d
[ "MIT" ]
null
null
null
molsysmt/structure/get_sasa.py
dprada/molsysmt
83f150bfe3cfa7603566a0ed4aed79d9b0c97f5d
[ "MIT" ]
null
null
null
from molsysmt import puw from molsysmt.basic import convert, select, get from molsysmt._private_tools._digestion import digest_engine, digest_target import numpy as np def get_sasa (molecular_system, target='atom', selection='all', frame_indices='all', syntaxis='MolSysMT', engine='MDTraj'): engine = dig...
31.895833
118
0.669497
from molsysmt import puw from molsysmt.basic import convert, select, get from molsysmt._private_tools._digestion import digest_engine, digest_target import numpy as np def get_sasa (molecular_system, target='atom', selection='all', frame_indices='all', syntaxis='MolSysMT', engine='MDTraj'): engine = dig...
true
true
f7123b84161a467d4a78d3930ebe5276a029e940
14,181
py
Python
followthegreen/graph.py
Gunduran/followthegreen
82046c3768cd8ac78bfaaddee684fd3af0892d47
[ "MIT" ]
null
null
null
followthegreen/graph.py
Gunduran/followthegreen
82046c3768cd8ac78bfaaddee684fd3af0892d47
[ "MIT" ]
null
null
null
followthegreen/graph.py
Gunduran/followthegreen
82046c3768cd8ac78bfaaddee684fd3af0892d47
[ "MIT" ]
null
null
null
# Graph (vertices and edges) manipulation class. # Vertex and Edge definition customized for our need. # Dijkstra stolen at https://www.bogotobogo.com/python/python_graph_data_structures.php # import logging import math import json from functools import reduce from .geo import Point, Line, Polygon, distance, nearestPoi...
37.917112
135
0.588604
import logging import math import json from functools import reduce from .geo import Point, Line, Polygon, distance, nearestPointToLines, destination, pointInPolygon from .globals import TAXIWAY_DIR_TWOWAY, DEPARTURE, ARRIVAL class Vertex(Point): def __init__(self, node, point, usage, name=""): Point.__...
true
true
f7123b8ed430d52057ad5cea13a0252f75705905
70,983
py
Python
ckan/lib/helpers.py
nigelbabu/ckan
bfab554772b7530fe18ceca8681c1db55386e547
[ "Apache-2.0" ]
null
null
null
ckan/lib/helpers.py
nigelbabu/ckan
bfab554772b7530fe18ceca8681c1db55386e547
[ "Apache-2.0" ]
null
null
null
ckan/lib/helpers.py
nigelbabu/ckan
bfab554772b7530fe18ceca8681c1db55386e547
[ "Apache-2.0" ]
null
null
null
# coding=UTF-8 '''Helper functions Consists of functions to typically be used within templates, but also available to Controllers. This module is available to templates as 'h'. ''' import email.utils import datetime import logging import re import os import urllib import urlparse import pprint import copy import urlp...
33.545841
111
0.63997
'''Helper functions Consists of functions to typically be used within templates, but also available to Controllers. This module is available to templates as 'h'. ''' import email.utils import datetime import logging import re import os import urllib import urlparse import pprint import copy import urlparse from urlli...
false
true
f7123c59862b805d179be7129d84097459dfe215
102
py
Python
exemplos/test.1.py
cirino/python
6c45b5305aebeeeebb7ffef335700e41cc0b6b3b
[ "MIT" ]
1
2018-05-06T01:25:28.000Z
2018-05-06T01:25:28.000Z
exemplos/test.1.py
cirino/python
6c45b5305aebeeeebb7ffef335700e41cc0b6b3b
[ "MIT" ]
1
2019-02-10T18:46:37.000Z
2019-02-12T21:17:50.000Z
exemplos/test.1.py
cirino/python
6c45b5305aebeeeebb7ffef335700e41cc0b6b3b
[ "MIT" ]
null
null
null
# content of test_sample.py def func(x): return x * 2 def test_answer(): assert func(5) == 10
17
27
0.637255
def func(x): return x * 2 def test_answer(): assert func(5) == 10
true
true
f7123d2ce0eb152294a6fd013e3a19d807bf5b58
2,337
py
Python
nih_prediction/data.py
agrinh/nih_prediction
e94ae81935452e7928cda6b101ef58163525d81c
[ "MIT" ]
2
2020-04-04T04:00:32.000Z
2021-03-02T04:10:46.000Z
nih_prediction/data.py
Peltarion/nih_prediction
e94ae81935452e7928cda6b101ef58163525d81c
[ "MIT" ]
null
null
null
nih_prediction/data.py
Peltarion/nih_prediction
e94ae81935452e7928cda6b101ef58163525d81c
[ "MIT" ]
null
null
null
"""Produce metadata and datasets of NIH Chest Xray images """ import os import numpy as np import pandas as pd import tensorflow as tf def get_metadata(path): """Produce metadata with relevant columns from NIH Chest Xray images Args: path: Path to NIH dataset Returns: metadata Dataframe...
30.350649
79
0.66196
import os import numpy as np import pandas as pd import tensorflow as tf def get_metadata(path): raw_meta = pd.read_csv(os.path.join(path, 'Data_Entry_2017.csv')) meta = raw_meta[['Image Index', 'Finding Labels']].copy() meta.columns = ['image', 'label'] meta.image = os.path.join(path, 'images/') + m...
true
true
f7123d411e06ecdc8ba6d8816d2b09d7ee9d4174
8,492
py
Python
yolov5/detect.py
Matrix-King-Studio/MaskDetection
5fed65833a8c08380299d606f66e14df814b022f
[ "MIT" ]
null
null
null
yolov5/detect.py
Matrix-King-Studio/MaskDetection
5fed65833a8c08380299d606f66e14df814b022f
[ "MIT" ]
null
null
null
yolov5/detect.py
Matrix-King-Studio/MaskDetection
5fed65833a8c08380299d606f66e14df814b022f
[ "MIT" ]
null
null
null
import argparse import time from pathlib import Path import cv2 import torch import torch.backends.cudnn as cudnn from numpy import random from models.experimental import attempt_load from utils.datasets import LoadStreams, LoadImages from utils.general import check_img_size, check_requirements, non_max_su...
46.917127
120
0.584432
import argparse import time from pathlib import Path import cv2 import torch import torch.backends.cudnn as cudnn from numpy import random from models.experimental import attempt_load from utils.datasets import LoadStreams, LoadImages from utils.general import check_img_size, check_requirements, non_max_su...
true
true
f7123dbbd715141e85e9a8e2294e229cb8ec780a
3,396
py
Python
apps/users/urls.py
MaLei666/oms
2447ec656ae5b61b9edc93c28a42f487476b5978
[ "MIT" ]
null
null
null
apps/users/urls.py
MaLei666/oms
2447ec656ae5b61b9edc93c28a42f487476b5978
[ "MIT" ]
6
2020-03-23T09:21:13.000Z
2022-03-11T23:49:57.000Z
apps/users/urls.py
MaLei666/oms
2447ec656ae5b61b9edc93c28a42f487476b5978
[ "MIT" ]
1
2019-10-15T03:06:46.000Z
2019-10-15T03:06:46.000Z
""" User app """ from django.urls import path,include from .views import * __all__=['urlpatterns','app_name'] app_name = 'users' urlpatterns = [ # 首页 path('', IndexView.as_view(), name='index'), # 登录 path('login/', LoginView.as_view(), name='login'), # 登出 path('logout', LogoutView.as_view()...
28.537815
110
0.654888
from django.urls import path,include from .views import * __all__=['urlpatterns','app_name'] app_name = 'users' urlpatterns = [ path('', IndexView.as_view(), name='index'), path('login/', LoginView.as_view(), name='login'), path('logout', LogoutView.as_view(), name='logout'), path(...
true
true
f7123e1717463d041806ea6c1f2fb3540327f441
142
py
Python
src/ex1/data_perturb/__init__.py
unica-isde/isde
a9603d8b8d1a347447cec483108132aa1e8457eb
[ "Apache-2.0" ]
7
2021-01-20T09:11:53.000Z
2022-03-15T12:19:06.000Z
src/ex1/data_perturb/__init__.py
unica-isde/isde
a9603d8b8d1a347447cec483108132aa1e8457eb
[ "Apache-2.0" ]
null
null
null
src/ex1/data_perturb/__init__.py
unica-isde/isde
a9603d8b8d1a347447cec483108132aa1e8457eb
[ "Apache-2.0" ]
10
2020-11-01T09:47:02.000Z
2021-11-02T12:59:50.000Z
from .data_perturb import DataPerturb from .data_perturb_uniform import DataPerturbUniform from .data_perturb_normal import DataPerturbNormal
35.5
52
0.894366
from .data_perturb import DataPerturb from .data_perturb_uniform import DataPerturbUniform from .data_perturb_normal import DataPerturbNormal
true
true
f7123e9d4d94c93cf8a5ee5ef28126625413571b
1,823
py
Python
lss/devices/launchpad_base.py
turbaszek/nss
1bd88e80def7ed2d5dacc7828dfa5ee8d70b27cb
[ "Apache-2.0" ]
4
2021-08-02T15:09:16.000Z
2022-02-23T09:43:46.000Z
lss/devices/launchpad_base.py
turbaszek/nss
1bd88e80def7ed2d5dacc7828dfa5ee8d70b27cb
[ "Apache-2.0" ]
6
2021-08-02T11:08:51.000Z
2021-08-08T08:56:57.000Z
lss/devices/launchpad_base.py
turbaszek/nss
1bd88e80def7ed2d5dacc7828dfa5ee8d70b27cb
[ "Apache-2.0" ]
1
2021-08-06T14:50:25.000Z
2021-08-06T14:50:25.000Z
from typing import Dict, List import mido from lss.pad import Pad from lss.utils import open_input, open_output class BaseLaunchpad: row_count: int column_count: int name: str pads: Dict[int, "Pad"] = {} def __init__(self): self._outport = open_output(self.name + " In", autoreset=True)...
30.898305
85
0.615469
from typing import Dict, List import mido from lss.pad import Pad from lss.utils import open_input, open_output class BaseLaunchpad: row_count: int column_count: int name: str pads: Dict[int, "Pad"] = {} def __init__(self): self._outport = open_output(self.name + " In", autoreset=True)...
true
true