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
1c07e547f36495698ce3ba45f369669607bffbda
2,097
py
Python
benchmarking/platforms/platforms.py
caffe2/caffe2-benchmarking
b6dd7b41798465b787135aaed5328eb6cfbdad22
[ "Apache-2.0" ]
20
2017-12-01T03:37:45.000Z
2018-05-08T15:54:34.000Z
benchmarking/platforms/platforms.py
caffe2/caffe2-benchmarking
b6dd7b41798465b787135aaed5328eb6cfbdad22
[ "Apache-2.0" ]
1
2018-04-25T16:57:59.000Z
2018-04-25T16:57:59.000Z
benchmarking/platforms/platforms.py
caffe2/caffe2-benchmarking
b6dd7b41798465b787135aaed5328eb6cfbdad22
[ "Apache-2.0" ]
7
2017-12-05T00:00:09.000Z
2018-04-25T00:49:30.000Z
#!/usr/bin/env python ############################################################################## # Copyright 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. ################################...
32.765625
82
0.642823
from __future__ import absolute_import, division, print_function, unicode_literals import os from utils.custom_logger import getLogger from .android.android_driver import AndroidDriver from .host.host_platform import HostPlatform from .ios.ios_driver import IOSDriver from .windows.windows_platform import WindowsPl...
true
true
1c07e69311caf31b4c387ffc070e55175228f841
1,123
py
Python
django_photo_gallery/django_photo_gallery/urls.py
810410738/django-photo-gallery-master
ccc88b54c4fc9fb9cad818c4ac1d1fb61fe6f926
[ "Apache-2.0" ]
1
2019-05-17T14:38:25.000Z
2019-05-17T14:38:25.000Z
django_photo_gallery/django_photo_gallery/urls.py
810410738/django-photo-gallery-master
ccc88b54c4fc9fb9cad818c4ac1d1fb61fe6f926
[ "Apache-2.0" ]
null
null
null
django_photo_gallery/django_photo_gallery/urls.py
810410738/django-photo-gallery-master
ccc88b54c4fc9fb9cad818c4ac1d1fb61fe6f926
[ "Apache-2.0" ]
null
null
null
from django.conf.urls import url from django.contrib.auth import views from django.views.generic.base import RedirectView from django.conf import settings from django.conf.urls.static import static import app.forms import app.views from django.conf.urls import include from django.contrib import admin admin.autodisco...
30.351351
109
0.708816
from django.conf.urls import url from django.contrib.auth import views from django.views.generic.base import RedirectView from django.conf import settings from django.conf.urls.static import static import app.forms import app.views from django.conf.urls import include from django.contrib import admin admin.autodisco...
true
true
1c07e6d988d2b9a5dd96fe7081d3f44981a648e3
1,356
py
Python
test/test_facets_response_container.py
httpsgithu/python-client
f85a530367cdabe458a11919ad35609b9bc0606b
[ "Apache-2.0" ]
11
2016-05-30T17:16:45.000Z
2021-06-11T19:32:59.000Z
test/test_facets_response_container.py
httpsgithu/python-client
f85a530367cdabe458a11919ad35609b9bc0606b
[ "Apache-2.0" ]
25
2016-05-02T23:05:19.000Z
2020-11-18T22:43:20.000Z
test/test_facets_response_container.py
httpsgithu/python-client
f85a530367cdabe458a11919ad35609b9bc0606b
[ "Apache-2.0" ]
30
2016-04-29T17:17:11.000Z
2022-02-11T04:58:37.000Z
# coding: utf-8 """ Wavefront REST API <p>The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.</p><p>When you make REST API calls outside the Wavefront REST ...
33.073171
409
0.75
from __future__ import absolute_import import unittest import wavefront_api_client from wavefront_api_client.models.facets_response_container import FacetsResponseContainer from wavefront_api_client.rest import ApiException class TestFacetsResponseContainer(unittest.TestCase): def setUp(self): pass...
true
true
1c07e719407fcda373a642abe4461b09f4086e6c
4,041
py
Python
CRNitschke/get_sextract_thresholds.py
deapplegate/wtgpipeline
9693e8562022cc97bf5a96427e22965e1a5e8497
[ "MIT" ]
1
2019-03-15T04:01:19.000Z
2019-03-15T04:01:19.000Z
CRNitschke/get_sextract_thresholds.py
deapplegate/wtgpipeline
9693e8562022cc97bf5a96427e22965e1a5e8497
[ "MIT" ]
5
2017-12-11T00:11:39.000Z
2021-07-09T17:05:16.000Z
CRNitschke/get_sextract_thresholds.py
deapplegate/wtgpipeline
9693e8562022cc97bf5a96427e22965e1a5e8497
[ "MIT" ]
2
2017-08-15T21:19:11.000Z
2017-10-12T00:36:35.000Z
#! /usr/bin/env python #adam-does# runs SeeingClearly to get the seeing and rms of the image, then uses those to get sextractor thresholds for CR detection #adam-use# use with CRNitschke pipeline #adam-call_example# call it like ./get_sextract_thresholds.py /path/flname.fits output_file.txt #IO stuff: import sys ; sys...
36.736364
213
0.732739
import sys ; sys.path.append('/u/ki/awright/InstallingSoftware/pythons') saveout = sys.stdout saveerr = sys.stderr sys.stdout = sys.stderr import hashlib import os import SeeingClearly from copy import deepcopy def seeing_to_ft_dt(x): y1_dt,m_dt,x1_dt= 5900, -16551.7, 0.48 min_dt= 3500 max_dt= 6000 yy_dts=y1_dt+...
false
true
1c07e8656237a5d9adfd419aa57bc5b22edde88a
1,235
py
Python
api/urls.py
SaitoBP/PetCard-API
48be97d019890f7022b48c4f4b00cec32c83b5ad
[ "MIT" ]
null
null
null
api/urls.py
SaitoBP/PetCard-API
48be97d019890f7022b48c4f4b00cec32c83b5ad
[ "MIT" ]
null
null
null
api/urls.py
SaitoBP/PetCard-API
48be97d019890f7022b48c4f4b00cec32c83b5ad
[ "MIT" ]
null
null
null
from django.conf import settings from django.conf.urls.static import static from django.contrib import admin from django.urls import path, include from django.views.generic.base import RedirectView from rest_framework import routers from api.pet.viewsets import ( SpecieViewSet, BreedViewSet, PetViewSet ) ...
29.404762
97
0.774899
from django.conf import settings from django.conf.urls.static import static from django.contrib import admin from django.urls import path, include from django.views.generic.base import RedirectView from rest_framework import routers from api.pet.viewsets import ( SpecieViewSet, BreedViewSet, PetViewSet ) ...
true
true
1c07e93eaefa3a74ce04374120e27d6154bd8f52
13,029
py
Python
supervisor/utils/gdbus.py
vighnesh-kadam/supervisor
15f62837c8d78ec0928a1a77b6508ff20618e126
[ "Apache-2.0" ]
null
null
null
supervisor/utils/gdbus.py
vighnesh-kadam/supervisor
15f62837c8d78ec0928a1a77b6508ff20618e126
[ "Apache-2.0" ]
310
2020-03-12T16:02:13.000Z
2022-03-31T06:01:49.000Z
supervisor/utils/gdbus.py
foreign-sub/home-assistant-supervisor
15f62837c8d78ec0928a1a77b6508ff20618e126
[ "Apache-2.0" ]
null
null
null
"""DBus implementation with glib.""" from __future__ import annotations import asyncio import json import logging import re import shlex from signal import SIGINT from typing import Any import xml.etree.ElementTree as ET import sentry_sdk from . import clean_env from ..exceptions import ( DBusFatalError, DBu...
33.929688
107
0.579016
from __future__ import annotations import asyncio import json import logging import re import shlex from signal import SIGINT from typing import Any import xml.etree.ElementTree as ET import sentry_sdk from . import clean_env from ..exceptions import ( DBusFatalError, DBusInterfaceError, DBusInterfaceMet...
true
true
1c07e95d1606607c69ce91da2d95f44081f66300
5,499
py
Python
SR-LLRL/simple_rl/mdp/MDPDistributionClass.py
Kchu/LifelongRL
95510036116caa37a803700b776c0b47938cd843
[ "Apache-2.0" ]
10
2021-11-22T12:29:30.000Z
2022-03-28T10:23:16.000Z
SR-LLRL/simple_rl/mdp/MDPDistributionClass.py
Kchu/LifelongRL
95510036116caa37a803700b776c0b47938cd843
[ "Apache-2.0" ]
null
null
null
SR-LLRL/simple_rl/mdp/MDPDistributionClass.py
Kchu/LifelongRL
95510036116caa37a803700b776c0b47938cd843
[ "Apache-2.0" ]
2
2022-03-19T07:42:56.000Z
2022-03-28T10:36:33.000Z
''' MDPDistributionClass.py: Contains the MDP Distribution Class. ''' # Python imports. from __future__ import print_function import numpy as np from collections import defaultdict class MDPDistribution(object): ''' Class for distributions over MDPs. ''' def __init__(self, mdp_prob_dict, horizon=0): ...
30.381215
165
0.58447
from __future__ import print_function import numpy as np from collections import defaultdict class MDPDistribution(object): def __init__(self, mdp_prob_dict, horizon=0): if type(mdp_prob_dict) == list or len(mdp_prob_dict.values()) == 0: mdp_prob = 1.0 / len(mdp_prob_dict.keys()) ...
true
true
1c07ea527769954e840be4ec13dd47159dc0d138
58,353
py
Python
keras/engine/data_adapter.py
ashutosh1919/keras
0c9462af6d8c456579c09bd705fd60594ee33611
[ "Apache-2.0" ]
1
2021-08-14T17:41:34.000Z
2021-08-14T17:41:34.000Z
keras/engine/data_adapter.py
sarvex/keras
2d551d31915906120f3f6a3ed3c4de94ba4bb288
[ "Apache-2.0" ]
null
null
null
keras/engine/data_adapter.py
sarvex/keras
2d551d31915906120f3f6a3ed3c4de94ba4bb288
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 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...
34.651425
115
0.679879
import tensorflow.compat.v2 as tf import abc import contextlib import functools import itertools import math import random import numpy as np from tensorflow.python.eager import context from keras import backend from keras.engine import training_utils from keras.utils import data_utils from keras.utils import datase...
true
true
1c07ebc8b095f543d55ba815022322afa85db4b2
5,447
py
Python
source/univariate/test/BetaPrime.py
adeeconometrics/s_distributions
a29b1db324d7ee7f63498c8ed1888ab6ead849d8
[ "MIT" ]
null
null
null
source/univariate/test/BetaPrime.py
adeeconometrics/s_distributions
a29b1db324d7ee7f63498c8ed1888ab6ead849d8
[ "MIT" ]
null
null
null
source/univariate/test/BetaPrime.py
adeeconometrics/s_distributions
a29b1db324d7ee7f63498c8ed1888ab6ead849d8
[ "MIT" ]
null
null
null
try: from scipy.special import beta as _beta, betainc as _betainc import numpy as _np from typing import Union, Dict, List from math import sqrt as _sqrt from univariate._base import SemiInfinite except Exception as e: print(f"some modules are missing {e}") class BetaPrime(SemiInfini...
33.012121
166
0.536993
try: from scipy.special import beta as _beta, betainc as _betainc import numpy as _np from typing import Union, Dict, List from math import sqrt as _sqrt from univariate._base import SemiInfinite except Exception as e: print(f"some modules are missing {e}") class BetaPrime(SemiInfini...
true
true
1c07ec19b99787faf5e6408c4d057e02c87d186d
1,669
py
Python
examples/full_example/screens/selectionlist.py
subhranil2605/akivymd
a773900cf07297a14e2227bbf12cd4bcf1a3b279
[ "MIT" ]
58
2020-10-31T11:59:26.000Z
2022-03-31T08:44:54.000Z
examples/full_example/screens/selectionlist.py
subhranil2605/akivymd
a773900cf07297a14e2227bbf12cd4bcf1a3b279
[ "MIT" ]
10
2020-11-06T09:20:47.000Z
2021-12-30T14:13:58.000Z
examples/full_example/screens/selectionlist.py
subhranil2605/akivymd
a773900cf07297a14e2227bbf12cd4bcf1a3b279
[ "MIT" ]
23
2020-11-01T08:17:19.000Z
2022-03-22T04:37:14.000Z
from kivy.lang.builder import Builder from kivymd.toast import toast from kivymd.uix.screen import MDScreen from kivymd_extensions.akivymd.uix.selectionlist import AKSelectListAvatarItem Builder.load_string( """ <Selectionlist> MDBoxLayout: orientation: "vertical" MyToolbar: id: ...
24.188406
78
0.558418
from kivy.lang.builder import Builder from kivymd.toast import toast from kivymd.uix.screen import MDScreen from kivymd_extensions.akivymd.uix.selectionlist import AKSelectListAvatarItem Builder.load_string( """ <Selectionlist> MDBoxLayout: orientation: "vertical" MyToolbar: id: ...
true
true
1c07ecbf8d96cbca3341cae70013a66c16457e6a
1,398
py
Python
datadog_checks_base/tests/models/test_types.py
idarlington/integrations-core
0d323ef4c3af18acec2b681f5389326257b45c1e
[ "BSD-3-Clause" ]
null
null
null
datadog_checks_base/tests/models/test_types.py
idarlington/integrations-core
0d323ef4c3af18acec2b681f5389326257b45c1e
[ "BSD-3-Clause" ]
2
2021-04-26T13:37:48.000Z
2021-04-26T13:37:49.000Z
datadog_checks_base/tests/models/test_types.py
idarlington/integrations-core
0d323ef4c3af18acec2b681f5389326257b45c1e
[ "BSD-3-Clause" ]
null
null
null
# (C) Datadog, Inc. 2021-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) from ..utils import requires_py3 pytestmark = [requires_py3] def test_make_immutable_check_config(): # TODO: move imports up top when we drop Python 2 from immutables import Map from datado...
31.066667
82
0.603004
from ..utils import requires_py3 pytestmark = [requires_py3] def test_make_immutable_check_config(): from immutables import Map from datadog_checks.base.utils.models.types import make_immutable_check_config obj = make_immutable_check_config( { 'string': 'foo', 'integ...
true
true
1c07ed577b027b4aabe1ad91f8b3c746c9570908
3,555
py
Python
auxiliary.py
Bahrd/AppliedPythonology
65d7bd665eba823c3319c3efdc5a5047ddfa534d
[ "MIT" ]
4
2019-10-11T07:39:49.000Z
2022-03-01T23:18:57.000Z
auxiliary.py
Bahrd/AppliedPythonology
65d7bd665eba823c3319c3efdc5a5047ddfa534d
[ "MIT" ]
null
null
null
auxiliary.py
Bahrd/AppliedPythonology
65d7bd665eba823c3319c3efdc5a5047ddfa534d
[ "MIT" ]
null
null
null
## Auxiliary routines for image processing algorithms import numpy as np; from numpy.linalg import inv import matplotlib.pyplot as plt; from matplotlib.colors import LinearSegmentedColormap as lscm #Image presentation def displayImages(images, titles = '', cmp = 'gray', show = True): if type(images) is tuple or ty...
37.819149
94
0.544866
import numpy as np; from numpy.linalg import inv import matplotlib.pyplot as plt; from matplotlib.colors import LinearSegmentedColormap as lscm def displayImages(images, titles = '', cmp = 'gray', show = True): if type(images) is tuple or type(images) is list: number = len(images) fig = plt.figure...
true
true
1c07ee0b4927ea2c1253b50c7c3852521871d73f
2,763
py
Python
vk-wallparser/wallparser.py
Nejel/torch-rnn
5280527fd8d2819995b44902c63552883108bb5d
[ "MIT" ]
2
2019-04-27T12:44:48.000Z
2021-01-10T00:11:58.000Z
vk-wallparser/wallparser.py
Nejel/torch-rnn
5280527fd8d2819995b44902c63552883108bb5d
[ "MIT" ]
null
null
null
vk-wallparser/wallparser.py
Nejel/torch-rnn
5280527fd8d2819995b44902c63552883108bb5d
[ "MIT" ]
1
2019-11-12T05:12:02.000Z
2019-11-12T05:12:02.000Z
import requests, time, os def ParseUnicode(text): #магия, не трогать global count global testfile text = list(text) text2 = "" for i in range(len(text)): temp = text[i] try: print(temp, file=testfile) except UnicodeEncodeError: text[i] = " " for elem in text: text2 += elem if count > 30: testfi...
31.397727
143
0.630112
import requests, time, os def ParseUnicode(text): global count global testfile text = list(text) text2 = "" for i in range(len(text)): temp = text[i] try: print(temp, file=testfile) except UnicodeEncodeError: text[i] = " " for elem in text: text2 += elem if count > 30: testfile.close() testfi...
true
true
1c07eee3ba77f950dd12a2008eeb5e40a500009d
37,714
py
Python
os_net_config/tests/test_objects.py
opnfv/apex-os-net-config
1c50db100a7b7ff797a5ab7e1a6f7567adeb658e
[ "Apache-2.0" ]
null
null
null
os_net_config/tests/test_objects.py
opnfv/apex-os-net-config
1c50db100a7b7ff797a5ab7e1a6f7567adeb658e
[ "Apache-2.0" ]
null
null
null
os_net_config/tests/test_objects.py
opnfv/apex-os-net-config
1c50db100a7b7ff797a5ab7e1a6f7567adeb658e
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2014 Red Hat, 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 l...
31.719092
79
0.613592
import json import six from os_net_config import objects from os_net_config.tests import base from os_net_config import utils class TestRoute(base.TestCase): def test_from_json(self): data = '{"next_hop": "172.19.0.1", "ip_netmask": "172.19.0.0/24", ' \ '"route_options": "metric 10"}' ...
true
true
1c07ef5c92012d58363ef017eb9258c53d0d43da
7,718
py
Python
venv/lib/python3.6/site-packages/ansible_collections/arista/eos/tests/unit/modules/network/eos/test_eos_l2_interfaces.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
1
2020-01-22T13:11:23.000Z
2020-01-22T13:11:23.000Z
venv/lib/python3.6/site-packages/ansible_collections/arista/eos/tests/unit/modules/network/eos/test_eos_l2_interfaces.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
12
2020-02-21T07:24:52.000Z
2020-04-14T09:54:32.000Z
venv/lib/python3.6/site-packages/ansible_collections/arista/eos/tests/unit/modules/network/eos/test_eos_l2_interfaces.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
null
null
null
# # (c) 2019, Ansible by Red Hat, inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # from __future__ import absolute_import, division, print_function __metaclass__ = type from ansible_collections.arista.eos.tests.unit.compat.mock import patch from ansible_collections.a...
34.609865
146
0.529541
from __future__ import absolute_import, division, print_function __metaclass__ = type from ansible_collections.arista.eos.tests.unit.compat.mock import patch from ansible_collections.arista.eos.plugins.modules import eos_l2_interfaces from ansible_collections.arista.eos.tests.unit.modules.utils import ( set_modu...
true
true
1c07ef909cc12715d7b805195c79e039f4e59f13
850
py
Python
code/algos/agent/humanbot.py
Go-Trojans/trojan-go
bf1160120e79fbb1cdd37fa08f17160fb133aa40
[ "Artistic-1.0-cl8" ]
null
null
null
code/algos/agent/humanbot.py
Go-Trojans/trojan-go
bf1160120e79fbb1cdd37fa08f17160fb133aa40
[ "Artistic-1.0-cl8" ]
null
null
null
code/algos/agent/humanbot.py
Go-Trojans/trojan-go
bf1160120e79fbb1cdd37fa08f17160fb133aa40
[ "Artistic-1.0-cl8" ]
1
2021-08-28T20:31:01.000Z
2021-08-28T20:31:01.000Z
import random from algos.godomain import Move from algos.gohelper import Point, is_point_an_eye from algos.utils import point_from_alphaNumnericMove __all__ = ['HumanBot'] class HumanBot(): # try push #print("Human selecting move ...") def select_move(self, game_state): print("HumanBot {} selecti...
28.333333
79
0.603529
import random from algos.godomain import Move from algos.gohelper import Point, is_point_an_eye from algos.utils import point_from_alphaNumnericMove __all__ = ['HumanBot'] class HumanBot(): def select_move(self, game_state): print("HumanBot {} selecting move ...".format(game_state.next_player)) ...
true
true
1c07ef9250b321c31f06b5098b6889bc6eb4b834
2,456
py
Python
converters/download_rgsummary.py
bbockelm/topology
16404a6751b81597ab2117f0e983ac063085ff34
[ "Apache-2.0" ]
null
null
null
converters/download_rgsummary.py
bbockelm/topology
16404a6751b81597ab2117f0e983ac063085ff34
[ "Apache-2.0" ]
null
null
null
converters/download_rgsummary.py
bbockelm/topology
16404a6751b81597ab2117f0e983ac063085ff34
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 from subprocess import Popen, PIPE from argparse import ArgumentParser import os import sys import urllib.parse import urllib.request YES, NO, ONLY = "yes", "no", "only" params = { "all_resources": "on", "summary_attrs_showservice": "1", # "summary_attrs_showrsvstatus": "1", # ...
30.7
121
0.684446
from subprocess import Popen, PIPE from argparse import ArgumentParser import os import sys import urllib.parse import urllib.request YES, NO, ONLY = "yes", "no", "only" params = { "all_resources": "on", "summary_attrs_showservice": "1", "summary_attrs_showvoownership": "1", "summary_a...
true
true
1c07efc46d9873ab0a6652854e3df58a05f9874b
35,159
py
Python
gspread/models.py
AivanF/gspread
f5d21f8003c8d9f0abcac86e2b066df33ba3da27
[ "MIT" ]
null
null
null
gspread/models.py
AivanF/gspread
f5d21f8003c8d9f0abcac86e2b066df33ba3da27
[ "MIT" ]
null
null
null
gspread/models.py
AivanF/gspread
f5d21f8003c8d9f0abcac86e2b066df33ba3da27
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ gspread.models ~~~~~~~~~~~~~~ This module contains common spreadsheets' models. """ from .exceptions import WorksheetNotFound, CellNotFound from .utils import ( a1_to_rowcol, rowcol_to_a1, cast_to_a1_notation, numericise_all, finditem, fill_gaps, cell_list_to...
31.646265
168
0.554254
from .exceptions import WorksheetNotFound, CellNotFound from .utils import ( a1_to_rowcol, rowcol_to_a1, cast_to_a1_notation, numericise_all, finditem, fill_gaps, cell_list_to_rect, quote ) from .urls import ( SPREADSHEET_URL, SPREADSHEET_VALUES_URL, SPREADSHEET_BATCH_UPD...
true
true
1c07efe3187b18e629e2852776ac107bcb521a16
538
py
Python
tests/masonry/builders/fixtures/extended/setup.py
jevinskie/poetry-core
03a0164c6558595803be344d6851c970a2249a7e
[ "MIT" ]
16
2020-03-13T15:54:20.000Z
2020-06-04T08:10:03.000Z
tests/masonry/builders/fixtures/extended/setup.py
jevinskie/poetry-core
03a0164c6558595803be344d6851c970a2249a7e
[ "MIT" ]
19
2020-03-16T17:18:38.000Z
2020-06-17T22:14:56.000Z
tests/masonry/builders/fixtures/extended/setup.py
jevinskie/poetry-core
03a0164c6558595803be344d6851c970a2249a7e
[ "MIT" ]
15
2020-03-22T23:00:38.000Z
2020-06-11T17:01:33.000Z
from setuptools import setup packages = ["extended"] package_data = {"": ["*"]} setup_kwargs = { "name": "extended", "version": "0.1", "description": "Some description.", "long_description": "Module 1\n========\n", "author": "Sébastien Eustace", "author_email": "sebastien@eustace.io", "ma...
21.52
47
0.622677
from setuptools import setup packages = ["extended"] package_data = {"": ["*"]} setup_kwargs = { "name": "extended", "version": "0.1", "description": "Some description.", "long_description": "Module 1\n========\n", "author": "Sébastien Eustace", "author_email": "sebastien@eustace.io", "ma...
true
true
1c07f0dec2762b0628fe0c0ef908272437937448
35,941
py
Python
oceanspy/plot.py
rabernat/oceanspy
9bd58f8529cb0fa865393c057ad7498e4f99681d
[ "MIT" ]
null
null
null
oceanspy/plot.py
rabernat/oceanspy
9bd58f8529cb0fa865393c057ad7498e4f99681d
[ "MIT" ]
null
null
null
oceanspy/plot.py
rabernat/oceanspy
9bd58f8529cb0fa865393c057ad7498e4f99681d
[ "MIT" ]
3
2019-08-22T18:23:07.000Z
2021-08-19T19:26:33.000Z
""" Plot using OceanDataset objects. """ # TODO: add test that check squeezing! import xarray as _xr import oceanspy as _ospy import numpy as _np import warnings as _warnings import copy as _copy import functools as _functools from . import compute as _compute try: import matplotlib as _matplotlib...
36.711951
177
0.582872
import xarray as _xr import oceanspy as _ospy import numpy as _np import warnings as _warnings import copy as _copy import functools as _functools from . import compute as _compute try: import matplotlib as _matplotlib _matplotlib.use('agg') import matplotlib.pyplot as _plt except ImportEr...
true
true
1c07f17b03093a8e810f42a7d0d4797e6e1f9d13
54,174
py
Python
hydrus/ClientOptions.py
matjojo/hydrus
8f87206ea6ef242bc38235d7053bb33b5a785e68
[ "WTFPL" ]
null
null
null
hydrus/ClientOptions.py
matjojo/hydrus
8f87206ea6ef242bc38235d7053bb33b5a785e68
[ "WTFPL" ]
null
null
null
hydrus/ClientOptions.py
matjojo/hydrus
8f87206ea6ef242bc38235d7053bb33b5a785e68
[ "WTFPL" ]
null
null
null
from . import ClientConstants as CC from . import ClientDefaults from . import ClientDownloading from . import ClientDuplicates from . import ClientImporting from . import HydrusConstants as HC from . import HydrusGlobals as HG from . import HydrusData from . import HydrusPaths from . import HydrusSerialisable from . i...
42.389671
315
0.590449
from . import ClientConstants as CC from . import ClientDefaults from . import ClientDownloading from . import ClientDuplicates from . import ClientImporting from . import HydrusConstants as HC from . import HydrusGlobals as HG from . import HydrusData from . import HydrusPaths from . import HydrusSerialisable from . i...
true
true
1c07f2d9b71815f26903db5549e01a08c75e9a25
4,476
py
Python
yocto/poky/bitbake/lib/bb/process.py
libreswitch/libreswitch
1bb99e4bbc55aff46048453e28a1466b08d338aa
[ "Apache-2.0" ]
16
2017-01-17T15:20:43.000Z
2021-03-19T05:45:14.000Z
yocto/poky/bitbake/lib/bb/process.py
libreswitch/libreswitch
1bb99e4bbc55aff46048453e28a1466b08d338aa
[ "Apache-2.0" ]
415
2016-12-20T17:20:45.000Z
2018-09-23T07:59:23.000Z
yocto/poky/bitbake/lib/bb/process.py
libreswitch/libreswitch
1bb99e4bbc55aff46048453e28a1466b08d338aa
[ "Apache-2.0" ]
10
2016-12-20T13:24:50.000Z
2021-03-19T05:46:43.000Z
import logging import signal import subprocess import errno import select logger = logging.getLogger('BitBake.Process') def subprocess_setup(): # Python installs a SIGPIPE handler by default. This is usually not what # non-Python subprocesses expect. signal.signal(signal.SIGPIPE, signal.SIG_DFL) class Cm...
28.509554
83
0.565237
import logging import signal import subprocess import errno import select logger = logging.getLogger('BitBake.Process') def subprocess_setup(): signal.signal(signal.SIGPIPE, signal.SIG_DFL) class CmdError(RuntimeError): def __init__(self, command, msg=None): self.command = command sel...
true
true
1c07f3466a18e11c64617a268d5d86ee5ff1be9b
2,557
py
Python
newrelic_plugin_agent/plugins/haproxy.py
jeffbyrnes/newrelic-plugin-agent
6c93267e11bba75eedb9516673c34ad5b7fd8efa
[ "BSD-3-Clause" ]
null
null
null
newrelic_plugin_agent/plugins/haproxy.py
jeffbyrnes/newrelic-plugin-agent
6c93267e11bba75eedb9516673c34ad5b7fd8efa
[ "BSD-3-Clause" ]
null
null
null
newrelic_plugin_agent/plugins/haproxy.py
jeffbyrnes/newrelic-plugin-agent
6c93267e11bba75eedb9516673c34ad5b7fd8efa
[ "BSD-3-Clause" ]
null
null
null
""" HAProxy Support """ import logging from newrelic_plugin_agent.plugins import base LOGGER = logging.getLogger(__name__) class HAProxy(base.CSVStatsPlugin): DEFAULT_PATH = 'haproxy?stats;csv' GUID = 'com.meetme.newrelic_haproxy_agent' UNIT = {'Bytes': {'In': 'bytes', 'Out': 'bytes'}} def sum_da...
38.742424
82
0.496676
import logging from newrelic_plugin_agent.plugins import base LOGGER = logging.getLogger(__name__) class HAProxy(base.CSVStatsPlugin): DEFAULT_PATH = 'haproxy?stats;csv' GUID = 'com.meetme.newrelic_haproxy_agent' UNIT = {'Bytes': {'In': 'bytes', 'Out': 'bytes'}} def sum_data(self, stats): ...
true
true
1c07f352f301bc46fb3e5ebcf32732d00edc5739
3,762
py
Python
tests/mocks/student/migrations/0001_initial.py
TheMOOCAgency/figures
4f991ed32626c25b4d67300c9b8019a36c5db297
[ "MIT" ]
1
2020-07-27T19:50:53.000Z
2020-07-27T19:50:53.000Z
tests/mocks/student/migrations/0001_initial.py
TheMOOCAgency/figures
4f991ed32626c25b4d67300c9b8019a36c5db297
[ "MIT" ]
3
2020-06-05T21:19:02.000Z
2022-02-10T18:09:04.000Z
tests/mocks/student/migrations/0001_initial.py
TheMOOCAgency/figures
4f991ed32626c25b4d67300c9b8019a36c5db297
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2019-03-23 19:54 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django_countries.fields import openedx.core.djangoapps.xmodule_django.models class Migrat...
54.521739
442
0.628123
from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django_countries.fields import openedx.core.djangoapps.xmodule_django.models class Migration(migrations.Migration): initial = True dependencies = [ ...
true
true
1c07f37514e482aa0e8c8e42a51140fa1a454663
798
py
Python
examples/portable_models/portable_load.py
IncyLiu/autokeras
e9dbf66b005e2ffaabe29bc366bb4e72fa79add8
[ "MIT" ]
1
2019-04-16T00:28:02.000Z
2019-04-16T00:28:02.000Z
examples/portable_models/portable_load.py
IncyLiu/autokeras
e9dbf66b005e2ffaabe29bc366bb4e72fa79add8
[ "MIT" ]
6
2020-01-28T23:06:50.000Z
2022-02-10T01:19:01.000Z
examples/portable_models/portable_load.py
IncyLiu/autokeras
e9dbf66b005e2ffaabe29bc366bb4e72fa79add8
[ "MIT" ]
2
2019-04-24T05:52:50.000Z
2022-02-19T13:30:21.000Z
import os from keras.datasets import mnist from autokeras import ImageClassifier from autokeras.utils import pickle_from_file # Customer temp dir by your own TEMP_DIR = '/tmp/autokeras_U8KEOQ' model_file_name = os.path.join(TEMP_DIR, 'test_autokeras_model.pkl') if __name__ == '__main__': (x_train, y_train), (x_...
34.695652
82
0.745614
import os from keras.datasets import mnist from autokeras import ImageClassifier from autokeras.utils import pickle_from_file TEMP_DIR = '/tmp/autokeras_U8KEOQ' model_file_name = os.path.join(TEMP_DIR, 'test_autokeras_model.pkl') if __name__ == '__main__': (x_train, y_train), (x_test, y_test) = mnist.load_data(...
true
true
1c07f58b717f6b4673eb4b6fde207e7b1ce419f3
17,324
py
Python
openmc/filter_expansion.py
RyotaroOKabe/openmc
9926294324cb80dd7ff0e4f1a9b361addfcfa8fc
[ "MIT" ]
123
2015-01-09T18:21:00.000Z
2018-07-21T03:05:48.000Z
openmc/filter_expansion.py
RyotaroOKabe/openmc
9926294324cb80dd7ff0e4f1a9b361addfcfa8fc
[ "MIT" ]
673
2015-01-02T20:37:12.000Z
2018-08-02T15:28:47.000Z
openmc/filter_expansion.py
RyotaroOKabe/openmc
9926294324cb80dd7ff0e4f1a9b361addfcfa8fc
[ "MIT" ]
102
2015-01-03T18:18:46.000Z
2018-07-26T14:34:13.000Z
from numbers import Integral, Real from xml.etree import ElementTree as ET import openmc.checkvalue as cv from . import Filter class ExpansionFilter(Filter): """Abstract filter class for functional expansions.""" def __init__(self, order, filter_id=None): self.order = order self.id = filter_...
31.046595
78
0.578792
from numbers import Integral, Real from xml.etree import ElementTree as ET import openmc.checkvalue as cv from . import Filter class ExpansionFilter(Filter): def __init__(self, order, filter_id=None): self.order = order self.id = filter_id def __eq__(self, other): if type(self) is n...
true
true
1c07f68ab4e9801896194e272a2d5615046d378f
95
py
Python
main.py
nmodhipalli/alphabetlearner
8c9b5605e86f05921d4dcf603345723c8e8d698e
[ "MIT" ]
null
null
null
main.py
nmodhipalli/alphabetlearner
8c9b5605e86f05921d4dcf603345723c8e8d698e
[ "MIT" ]
null
null
null
main.py
nmodhipalli/alphabetlearner
8c9b5605e86f05921d4dcf603345723c8e8d698e
[ "MIT" ]
null
null
null
from flask import render_template def main(request): return render_template('main.html')
15.833333
39
0.768421
from flask import render_template def main(request): return render_template('main.html')
true
true
1c07f6e48d9544746d84a0d730febe139fe8056f
552
py
Python
setup.py
jtauber/sgf
5951d66a382960475245c4129e71242ed29c3f2a
[ "MIT" ]
33
2016-03-22T07:02:49.000Z
2020-08-09T04:55:44.000Z
setup.py
jtauber/sgf
5951d66a382960475245c4129e71242ed29c3f2a
[ "MIT" ]
11
2016-03-17T15:12:33.000Z
2019-03-11T16:20:33.000Z
setup.py
jtauber/sgf
5951d66a382960475245c4129e71242ed29c3f2a
[ "MIT" ]
14
2016-11-16T06:06:51.000Z
2021-12-01T16:38:47.000Z
from setuptools import setup setup( name="sgf", version="0.5", description="Python library for reading and writing Smart Game Format", license="MIT", url="http://github.com/jtauber/sgf", author="James Tauber", author_email="jtauber@jtauber.com", py_modules=["sgf"], classifiers=[ ...
27.6
75
0.606884
from setuptools import setup setup( name="sgf", version="0.5", description="Python library for reading and writing Smart Game Format", license="MIT", url="http://github.com/jtauber/sgf", author="James Tauber", author_email="jtauber@jtauber.com", py_modules=["sgf"], classifiers=[ ...
true
true
1c07f700c623695e5993e05efc8b757b48c03755
412
py
Python
PYTHON/LCM.py
kunalmpandey/open-source-contribution
7ad65c40720cab0b0b80d466af9dc276cf235686
[ "MIT" ]
2
2022-03-10T17:37:24.000Z
2022-03-10T17:40:05.000Z
PYTHON/LCM.py
kunalmpandey/open-source-contribution
7ad65c40720cab0b0b80d466af9dc276cf235686
[ "MIT" ]
null
null
null
PYTHON/LCM.py
kunalmpandey/open-source-contribution
7ad65c40720cab0b0b80d466af9dc276cf235686
[ "MIT" ]
1
2021-12-29T16:13:52.000Z
2021-12-29T16:13:52.000Z
# Python Program to find the L.C.M. of two input number # program by Manu M.R def compute_lcm(x, y): # choose the greater number if x > y: greater = x else: greater = y while(True): if((greater % x == 0) and (greater % y == 0)): lcm = greater break greate...
17.166667
55
0.548544
def compute_lcm(x, y): if x > y: greater = x else: greater = y while(True): if((greater % x == 0) and (greater % y == 0)): lcm = greater break greater += 1 return lcm num1 = 54 num2 = 24 print("The L.C.M. is", compute_lcm(num1, num2))
true
true
1c07f8101a16b1278032b6d2041c92c52d6b75a1
4,199
py
Python
shared/generate_data.py
brailovskiy/rest-api-test
01b099b748d4fd8dc6c380492e71c5d34bb15fdb
[ "MIT" ]
null
null
null
shared/generate_data.py
brailovskiy/rest-api-test
01b099b748d4fd8dc6c380492e71c5d34bb15fdb
[ "MIT" ]
null
null
null
shared/generate_data.py
brailovskiy/rest-api-test
01b099b748d4fd8dc6c380492e71c5d34bb15fdb
[ "MIT" ]
null
null
null
from datetime import datetime from faker import Faker import logging LOGGER = logging.getLogger(__name__) class DepartureDate: """ Методы генерации даты и времени """ def __init__(self): self.this_year = datetime.now().year self.old_year = str(self.this_year - 1) self.future_year = str...
31.571429
107
0.614194
from datetime import datetime from faker import Faker import logging LOGGER = logging.getLogger(__name__) class DepartureDate: def __init__(self): self.this_year = datetime.now().year self.old_year = str(self.this_year - 1) self.future_year = str(self.this_year + 1) self.old_date_t...
true
true
1c07f85f50ea7a91642b6e8e2e00916daee1d17a
4,316
py
Python
lingvo/tasks/lm/tokenizer.py
allenwang28/lingvo
26d3d6672d3f46d8f281c2aa9f57166ef6296738
[ "Apache-2.0" ]
2,611
2018-10-16T20:14:10.000Z
2022-03-31T14:48:41.000Z
lingvo/tasks/lm/tokenizer.py
allenwang28/lingvo
26d3d6672d3f46d8f281c2aa9f57166ef6296738
[ "Apache-2.0" ]
249
2018-10-27T06:02:29.000Z
2022-03-30T18:00:39.000Z
lingvo/tasks/lm/tokenizer.py
allenwang28/lingvo
26d3d6672d3f46d8f281c2aa9f57166ef6296738
[ "Apache-2.0" ]
436
2018-10-25T05:31:45.000Z
2022-03-31T07:26:03.000Z
# Lint as: python3 # Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
33.984252
80
0.650602
from lingvo import compat as tf from lingvo.core import py_utils from lingvo.core import tokenizers import tensorflow_text as tf_text class BertTokenizer(tokenizers.BaseTokenizer): @classmethod def Params(cls): p = super().Params() p.Define('vocab_path', None, 'Path to the vocab file.') p.Define( ...
true
true
1c07f8c4fe7e184021db2ea7b4cabcaaae61f31d
3,601
py
Python
cola_examples/scripts/find_red.py
robotcreating2020-1/cola_with_crane_x7_ros
bf9f9df35925703a0b625fd3dda3b88e80d1f48a
[ "BSD-3-Clause" ]
null
null
null
cola_examples/scripts/find_red.py
robotcreating2020-1/cola_with_crane_x7_ros
bf9f9df35925703a0b625fd3dda3b88e80d1f48a
[ "BSD-3-Clause" ]
null
null
null
cola_examples/scripts/find_red.py
robotcreating2020-1/cola_with_crane_x7_ros
bf9f9df35925703a0b625fd3dda3b88e80d1f48a
[ "BSD-3-Clause" ]
1
2021-12-18T07:25:53.000Z
2021-12-18T07:25:53.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import rospy import cv2 import numpy as np from std_msgs.msg import String from std_msgs.msg import Int32 from sensor_msgs.msg import Image from cv_bridge import CvBridge, CvBridgeError class image_converter: def __init__(self): self.image_pub = rospy.Pub...
33.971698
98
0.556512
import sys import rospy import cv2 import numpy as np from std_msgs.msg import String from std_msgs.msg import Int32 from sensor_msgs.msg import Image from cv_bridge import CvBridge, CvBridgeError class image_converter: def __init__(self): self.image_pub = rospy.Publisher("image_topic", Image, queue_size=1) ...
true
true
1c07f9b46456d2349027dfa14d774cb0219800ef
25
py
Python
perftracker/__init__.py
kaato137/perftracker
467427ea424f8ee6eca05b8822624f4331eb32d5
[ "Apache-2.0" ]
null
null
null
perftracker/__init__.py
kaato137/perftracker
467427ea424f8ee6eca05b8822624f4331eb32d5
[ "Apache-2.0" ]
null
null
null
perftracker/__init__.py
kaato137/perftracker
467427ea424f8ee6eca05b8822624f4331eb32d5
[ "Apache-2.0" ]
null
null
null
__pt_version__ = '0.2.2'
12.5
24
0.68
__pt_version__ = '0.2.2'
true
true
1c07fd12b15a121f46f3d0bc8b95e29be4ab7b41
1,089
py
Python
pyleecan/Methods/Slot/HoleM53/comp_magnetization_dict.py
Eomys/Pyleecan
4d7f0cbabf0311006963e7a2f435db2ecd901118
[ "Apache-2.0" ]
4
2017-11-27T10:14:34.000Z
2018-09-20T11:30:32.000Z
pyleecan/Methods/Slot/HoleM53/comp_magnetization_dict.py
Eomys/Pyleecan
4d7f0cbabf0311006963e7a2f435db2ecd901118
[ "Apache-2.0" ]
null
null
null
pyleecan/Methods/Slot/HoleM53/comp_magnetization_dict.py
Eomys/Pyleecan
4d7f0cbabf0311006963e7a2f435db2ecd901118
[ "Apache-2.0" ]
null
null
null
from numpy import pi from ....Classes.Segment import Segment def comp_magnetization_dict(self, is_north=True): """Compute the dictionary of the magnetization direction of the magnets (key=magnet_X, value=angle[rad]) Mangetization angle with Hole centered on Ox axis Parameters ---------- self : Ho...
27.225
108
0.652893
from numpy import pi from ....Classes.Segment import Segment def comp_magnetization_dict(self, is_north=True): point_dict = self._comp_point_coordinate() mag_dict = dict() S0 = Segment(point_dict["Z4"], point_dict["Z3"]) mag_dict["magnet_0"] = S0.comp_normal() S1 = Segment(point_dict["Z3s"],...
true
true
1c07fd27255b6f9f6dd7bb3fd27111cd4eec21eb
2,493
py
Python
readthedocs/core/templatetags/core_tags.py
ank-forked/readthedocs.org
e4110e8db5d25b7e6c699dd2df1a580b04ee8d16
[ "MIT" ]
1
2021-04-27T05:55:34.000Z
2021-04-27T05:55:34.000Z
readthedocs/core/templatetags/core_tags.py
ank-forked/readthedocs.org
e4110e8db5d25b7e6c699dd2df1a580b04ee8d16
[ "MIT" ]
4
2021-02-08T21:06:49.000Z
2021-12-13T20:51:17.000Z
readthedocs/core/templatetags/core_tags.py
ank-forked/readthedocs.org
e4110e8db5d25b7e6c699dd2df1a580b04ee8d16
[ "MIT" ]
3
2016-08-04T12:53:13.000Z
2016-11-02T14:17:55.000Z
import urllib import hashlib from django import template from django.conf import settings from django.utils.safestring import mark_safe from django.utils.encoding import force_bytes, force_text from readthedocs.projects.models import Project from readthedocs.core.resolver import resolve register = template.Library()...
27.097826
91
0.651023
import urllib import hashlib from django import template from django.conf import settings from django.utils.safestring import mark_safe from django.utils.encoding import force_bytes, force_text from readthedocs.projects.models import Project from readthedocs.core.resolver import resolve register = template.Library()...
true
true
1c07fdffc875d3893967e53ce51bda0efffdf923
150
py
Python
lambdas/pcse_feedback/main.py
NHSDigital/list-reconciliation
37b1ebe99a64275e23b0e7fb6a89415b92d14306
[ "MIT" ]
4
2021-06-25T08:28:54.000Z
2021-12-16T11:03:42.000Z
lambdas/pcse_feedback/main.py
NHSDigital/list-reconciliation
37b1ebe99a64275e23b0e7fb6a89415b92d14306
[ "MIT" ]
184
2021-06-24T15:27:08.000Z
2022-03-17T12:44:28.000Z
lambdas/pcse_feedback/main.py
NHSDigital/list-reconciliation
37b1ebe99a64275e23b0e7fb6a89415b92d14306
[ "MIT" ]
3
2021-11-05T10:21:44.000Z
2022-03-04T14:29:24.000Z
from pcse_feedback.lambda_handler import PcseFeedback app = PcseFeedback() def lambda_handler(event, context): return app.main(event, context)
18.75
53
0.786667
from pcse_feedback.lambda_handler import PcseFeedback app = PcseFeedback() def lambda_handler(event, context): return app.main(event, context)
true
true
1c07fe0c08afff2d9850348326c43ba84d85c850
2,382
py
Python
misc/Utilities.py
artiste-qb-net/QFog-Pyodide
9ce6ad7ef6a7f7a71bbcd4fe6a6a35a5f02e8744
[ "BSD-3-Clause" ]
87
2015-12-17T22:19:21.000Z
2022-03-08T10:27:54.000Z
misc/Utilities.py
artiste-qb-net/QFog-Pyodide
9ce6ad7ef6a7f7a71bbcd4fe6a6a35a5f02e8744
[ "BSD-3-Clause" ]
18
2016-02-18T15:08:36.000Z
2021-03-10T00:52:36.000Z
misc/Utilities.py
artiste-qb-net/QFog-Pyodide
9ce6ad7ef6a7f7a71bbcd4fe6a6a35a5f02e8744
[ "BSD-3-Clause" ]
34
2015-11-29T09:08:46.000Z
2022-02-16T22:54:24.000Z
# Most of the code in this file comes from PBNT by Elliot Cohen. See # separate file in this project with PBNT license. import numpy as np import itertools as it import cmath from fractions import Fraction def cartesian_product(shape_list): """ Given a list of ints [k1, k2,...], it generates the elements of ...
18.183206
71
0.570949
import numpy as np import itertools as it import cmath from fractions import Fraction def cartesian_product(shape_list): x = (range(shape_list[k]) for k in range(len(shape_list))) return it.product(*x) def fix(in_str, bad_chs, sub): for c in bad_chs: in_str = in_str.replace(c, sub) return i...
true
true
1c07fe0ec2f67d5aacedac237694e98c453b51b5
6,833
py
Python
deeprobust/image/defense/pgdtraining.py
lorenzobasile/DeepRobust
3f56dcc45f1fed788423d32cc179c26513416e2e
[ "MIT" ]
1
2020-06-12T07:45:06.000Z
2020-06-12T07:45:06.000Z
deeprobust/image/defense/pgdtraining.py
lorenzobasile/DeepRobust
3f56dcc45f1fed788423d32cc179c26513416e2e
[ "MIT" ]
null
null
null
deeprobust/image/defense/pgdtraining.py
lorenzobasile/DeepRobust
3f56dcc45f1fed788423d32cc179c26513416e2e
[ "MIT" ]
null
null
null
""" Reference: Mądry, A., Makelov, A., Schmidt, L., Tsipras, D., & Vladu, A. (2017). Towards Deep Learning Models Resistant to Adversarial Attacks. stat, 1050, 9. """ import os import torch import torch.nn as nn import torch.optim as optim from torchvision import datasets, transforms import torch.nn.functional as F i...
35.963158
149
0.573247
import os import torch import torch.nn as nn import torch.optim as optim from torchvision import datasets, transforms import torch.nn.functional as F import numpy as np from PIL import Image from deeprobust.image.attack.pgd import PGD from deeprobust.image.netmodels.CNN import Net from deeprobust.image.defense.base_d...
true
true
1c07feb5b78810d762dbaad72c92b976456e48b5
1,428
py
Python
var/spack/repos/builtin/packages/r-affycompatible/package.py
robertsawko/spack
135cf4835f5b646c4aaa0e2eb5552c80fc3a5ce8
[ "ECL-2.0", "Apache-2.0", "MIT" ]
1
2019-11-28T10:14:14.000Z
2019-11-28T10:14:14.000Z
var/spack/repos/builtin/packages/r-affycompatible/package.py
robertsawko/spack
135cf4835f5b646c4aaa0e2eb5552c80fc3a5ce8
[ "ECL-2.0", "Apache-2.0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/r-affycompatible/package.py
robertsawko/spack
135cf4835f5b646c4aaa0e2eb5552c80fc3a5ce8
[ "ECL-2.0", "Apache-2.0", "MIT" ]
1
2017-01-21T17:19:32.000Z
2017-01-21T17:19:32.000Z
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RAffycompatible(RPackage): """Affymetrix GeneChip software compatibility. This pac...
44.625
78
0.726891
from spack import * class RAffycompatible(RPackage): homepage = "https://bioconductor.org/packages/AffyCompatible" git = "https://git.bioconductor.org/packages/AffyCompatible.git" version('1.44.0', commit='98a27fbe880551fd32a5febb6c7bde0807eac476') version('1.42.0', commit='699303cc20f292591e2...
true
true
1c080035d86e9b4de65dc96f05ad91e2aa6e9010
1,683
py
Python
2021/12/1+2.py
alexpovel/aoc
e497dd585181ac636f7319e8d3310a956aff1df0
[ "MIT" ]
null
null
null
2021/12/1+2.py
alexpovel/aoc
e497dd585181ac636f7319e8d3310a956aff1df0
[ "MIT" ]
null
null
null
2021/12/1+2.py
alexpovel/aoc
e497dd585181ac636f7319e8d3310a956aff1df0
[ "MIT" ]
null
null
null
from collections import defaultdict from typing import Callable with open("input.txt") as f: graph = defaultdict(set) for line in f: connections = line.strip().split("-") for vertex in connections: for other_vertex in connections: if vertex == other_vertex: ...
33.66
87
0.634581
from collections import defaultdict from typing import Callable with open("input.txt") as f: graph = defaultdict(set) for line in f: connections = line.strip().split("-") for vertex in connections: for other_vertex in connections: if vertex == other_vertex: ...
true
true
1c08008194f9e0c788fa6cda06cc6c8cf4135049
498
py
Python
contacts/models.py
ciprian0104/Real-Estate-Django
f499f3b9756857f0c260afde1dce3a50e1edb8b5
[ "MIT" ]
null
null
null
contacts/models.py
ciprian0104/Real-Estate-Django
f499f3b9756857f0c260afde1dce3a50e1edb8b5
[ "MIT" ]
null
null
null
contacts/models.py
ciprian0104/Real-Estate-Django
f499f3b9756857f0c260afde1dce3a50e1edb8b5
[ "MIT" ]
null
null
null
from django.db import models from datetime import datetime class Contact(models.Model): listing = models.CharField(max_length=200) listing_id = models.IntegerField() name = models.CharField(max_length=200) email = models.CharField(max_length=100) phone = models.CharField(max_length=100) message = models.Te...
33.2
71
0.773092
from django.db import models from datetime import datetime class Contact(models.Model): listing = models.CharField(max_length=200) listing_id = models.IntegerField() name = models.CharField(max_length=200) email = models.CharField(max_length=100) phone = models.CharField(max_length=100) message = models.Te...
true
true
1c08019efe73fd7f9b153c78cb06f12129ed1085
5,723
py
Python
datasets/winogrande/winogrande.py
dkajtoch/datasets
12ef7f0d541a5aca5b29ebc2dddf5e1214f0e3e9
[ "Apache-2.0" ]
9
2021-04-26T14:43:52.000Z
2021-11-08T09:47:24.000Z
datasets/winogrande/winogrande.py
jramapuram/huggingface_datasets
62c7ac0783a00bdc1192b6a75439a65d522b6cbc
[ "Apache-2.0" ]
null
null
null
datasets/winogrande/winogrande.py
jramapuram/huggingface_datasets
62c7ac0783a00bdc1192b6a75439a65d522b6cbc
[ "Apache-2.0" ]
3
2021-01-03T22:08:20.000Z
2021-08-12T20:09:39.000Z
"""TODO(winogrande): Add a description here.""" from __future__ import absolute_import, division, print_function import json import os import datasets # TODO(winogrande): BibTeX citation _CITATION = """\ @InProceedings{ai2:winogrande, title = {WinoGrande: An Adversarial Winograd Schema Challenge at Scale}, authors...
38.931973
119
0.568233
from __future__ import absolute_import, division, print_function import json import os import datasets _CITATION = """\ @InProceedings{ai2:winogrande, title = {WinoGrande: An Adversarial Winograd Schema Challenge at Scale}, authors={Keisuke, Sakaguchi and Ronan, Le Bras and Chandra, Bhagavatula and Yejin, Choi }, ...
true
true
1c080213de66646fd64df044f4a9b39e497f761b
661
py
Python
clients/python/test/test_group.py
adipolak/lakeFS
798e7b7d42f20dba2261c7ecbdc56a5c9131a28c
[ "Apache-2.0" ]
1
2022-02-02T08:52:15.000Z
2022-02-02T08:52:15.000Z
clients/python/test/test_group.py
adipolak/lakeFS
798e7b7d42f20dba2261c7ecbdc56a5c9131a28c
[ "Apache-2.0" ]
null
null
null
clients/python/test/test_group.py
adipolak/lakeFS
798e7b7d42f20dba2261c7ecbdc56a5c9131a28c
[ "Apache-2.0" ]
null
null
null
""" lakeFS API lakeFS HTTP API # noqa: E501 The version of the OpenAPI document: 0.1.0 Contact: services@treeverse.io Generated by: https://openapi-generator.tech """ import sys import unittest import lakefs_client from lakefs_client.model.group import Group class TestGroup(unittest.TestCase...
17.864865
79
0.642965
import sys import unittest import lakefs_client from lakefs_client.model.group import Group class TestGroup(unittest.TestCase): def setUp(self): pass def tearDown(self): pass def testGroup(self): pass if __name__ == '__main__': unittest.main()
true
true
1c080246a3170e4fe745b19be5a5635570374141
5,758
py
Python
src/diamond/testing.py
wareczek/diamond-next
5822ee527f81291f88e6fda10c4d7e9a4c99debe
[ "MIT" ]
6
2019-02-20T06:34:31.000Z
2020-05-06T16:08:02.000Z
src/diamond/testing.py
wareczek/diamond-next
5822ee527f81291f88e6fda10c4d7e9a4c99debe
[ "MIT" ]
7
2019-02-19T23:13:52.000Z
2019-02-23T08:45:31.000Z
src/diamond/testing.py
wareczek/diamond-next
5822ee527f81291f88e6fda10c4d7e9a4c99debe
[ "MIT" ]
2
2020-07-29T07:49:27.000Z
2021-02-22T23:33:46.000Z
from __future__ import print_function import os import inspect import configobj import unittest try: import cPickle as pickle except ImportError: import pickle as pickle try: from cStringIO import StringIO except ImportError: from StringIO import StringIO try: from setproctitle import setproctitl...
33.476744
76
0.577978
from __future__ import print_function import os import inspect import configobj import unittest try: import cPickle as pickle except ImportError: import pickle as pickle try: from cStringIO import StringIO except ImportError: from StringIO import StringIO try: from setproctitle import setproctitl...
true
true
1c0802ab3a7143cfe37832df76d66ea2a9ec537e
28,666
py
Python
sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_snapshot_policies_operations.py
ankitarorabit/azure-sdk-for-python
dd90281cbad9400f8080754a5ef2f56791a5a88f
[ "MIT" ]
3
2020-06-23T02:25:27.000Z
2021-09-07T18:48:11.000Z
sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_snapshot_policies_operations.py
ankitarorabit/azure-sdk-for-python
dd90281cbad9400f8080754a5ef2f56791a5a88f
[ "MIT" ]
510
2019-07-17T16:11:19.000Z
2021-08-02T08:38:32.000Z
sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_snapshot_policies_operations.py
ankitarorabit/azure-sdk-for-python
dd90281cbad9400f8080754a5ef2f56791a5a88f
[ "MIT" ]
5
2019-09-04T12:51:37.000Z
2020-09-16T07:28:40.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
50.557319
223
0.670376
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pi...
true
true
1c0802ff8b5091a0e78c22cac5cd8aee947895b9
47,384
py
Python
ui/WalletFrames.py
gurnec/BitcoinArmory
35320e791ccd3f9faa837b49b9d3e9ddc578e2ae
[ "MIT" ]
1
2021-01-02T14:40:48.000Z
2021-01-02T14:40:48.000Z
ui/WalletFrames.py
gurnec/BitcoinArmory
35320e791ccd3f9faa837b49b9d3e9ddc578e2ae
[ "MIT" ]
null
null
null
ui/WalletFrames.py
gurnec/BitcoinArmory
35320e791ccd3f9faa837b49b9d3e9ddc578e2ae
[ "MIT" ]
1
2021-01-02T14:38:06.000Z
2021-01-02T14:38:06.000Z
################################################################################ # # # Copyright (C) 2011-2015, Armory Technologies, Inc. # # Distributed under the GNU Affero General Public License (AGPL v3) ...
45.256925
104
0.635784
from PyQt4.Qt import * from PyQt4.QtGui import * from armoryengine.BDM import TheBDM, BDM_BLOCKCHAIN_READY from qtdefines import * WALLET_DATA_ENTRY_FIELD_WIDTH = 60 class LockboxSelectFrame(ArmoryFrame): def __init__(self, parent, main, layoutDir=VERTICAL, spendFromLBID=None): super(LockboxSelectFrame, s...
true
true
1c0804f096fbaa78e0714ded17d47a41ad1f0f04
960
py
Python
app/main.py
saketkattu/AI-tags
76830946c4331132579def88c129dba5be7a07b2
[ "Apache-2.0" ]
1
2021-02-16T07:19:28.000Z
2021-02-16T07:19:28.000Z
app/main.py
saketkattu/AI-tags
76830946c4331132579def88c129dba5be7a07b2
[ "Apache-2.0" ]
null
null
null
app/main.py
saketkattu/AI-tags
76830946c4331132579def88c129dba5be7a07b2
[ "Apache-2.0" ]
null
null
null
import json import os import requests from ml_scripts.config import logger # Headers headers = { "accept": "application/json", "Content-Type": "application/json", } def health_check(): response = requests.get( f"http://0.0.0.0:{os.environ.get('PORT', 5000)}/", headers=headers, ) ...
22.325581
90
0.605208
import json import os import requests from ml_scripts.config import logger headers = { "accept": "application/json", "Content-Type": "application/json", } def health_check(): response = requests.get( f"http://0.0.0.0:{os.environ.get('PORT', 5000)}/", headers=headers, ) results ...
true
true
1c080519167f45435efae0a659485defc503e2a6
1,900
py
Python
src/Tarcog/test.py
bakonyidani/Windows-CalcEngine
afa4c4a9f88199c6206af8bc994a073931fc8b91
[ "BSD-3-Clause-LBNL" ]
null
null
null
src/Tarcog/test.py
bakonyidani/Windows-CalcEngine
afa4c4a9f88199c6206af8bc994a073931fc8b91
[ "BSD-3-Clause-LBNL" ]
null
null
null
src/Tarcog/test.py
bakonyidani/Windows-CalcEngine
afa4c4a9f88199c6206af8bc994a073931fc8b91
[ "BSD-3-Clause-LBNL" ]
null
null
null
import BPPTarcogLib #------------------------------------------------------------------------------- print('Single Glass:') GlazingSystem = BPPTarcogLib.GlazingSystem() GlazingSystem.setPressure(101325)#atmospheric pressure [Pa], default is 101325 GlazingSystem.setSize(1,1)#width[m],height[m] GlazingSystem.setO...
50
123
0.651579
import BPPTarcogLib print('Single Glass:') GlazingSystem = BPPTarcogLib.GlazingSystem() GlazingSystem.setPressure(101325)GlazingSystem.setSize(1,1)GlazingSystem.setOutdoorEnvironment(273.15,5.5,0,273.15)GlazingSystem.setIndoorEnvironment(293.15)GlazingSystem.setNumberOfLayers(1) GlazingSystem.setSolidLayer(1,0.00...
true
true
1c0805320b1cfc2614421d5cb3dfd5f5a14422cf
2,097
py
Python
dosagelib/plugins/projectfuture.py
Efreak/dosage
48ddbf72d5f6b29ae0e450ee0d40c78d38dc371c
[ "MIT" ]
null
null
null
dosagelib/plugins/projectfuture.py
Efreak/dosage
48ddbf72d5f6b29ae0e450ee0d40c78d38dc371c
[ "MIT" ]
null
null
null
dosagelib/plugins/projectfuture.py
Efreak/dosage
48ddbf72d5f6b29ae0e450ee0d40c78d38dc371c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (C) 2004-2008 Tristan Seligmann and Jonathan Jacobs # Copyright (C) 2012-2014 Bastian Kleineidam # Copyright (C) 2015-2016 Tobias Gruetzmacher from __future__ import absolute_import, division, print_function from .common import _ParserScraper class ProjectFuture(_ParserScraper): ...
41.94
72
0.567477
from __future__ import absolute_import, division, print_function from .common import _ParserScraper class ProjectFuture(_ParserScraper): imageSearch = '//td[@class="tamid"]/img' prevSearch = '//a[./img[@alt="Previous"]]' def __init__(self, name, comic, first, last=None): super(ProjectFuture, se...
true
true
1c08058b671cdc135c22cc4d1942bb94b9d445fc
2,633
py
Python
assigment1.py
msklarek/Coursera-Learn-to-Program-The-Fundamentals
83f5ffaae10fbd022a2dcb27218f4a1cb0c81263
[ "MIT" ]
null
null
null
assigment1.py
msklarek/Coursera-Learn-to-Program-The-Fundamentals
83f5ffaae10fbd022a2dcb27218f4a1cb0c81263
[ "MIT" ]
null
null
null
assigment1.py
msklarek/Coursera-Learn-to-Program-The-Fundamentals
83f5ffaae10fbd022a2dcb27218f4a1cb0c81263
[ "MIT" ]
null
null
null
def seconds_difference(time_1, time_2): """ (number, number) -> number Return the number of seconds later that a time in seconds time_2 is than a time in seconds time_1. >>> seconds_difference(1800.0, 3600.0) 1800.0 >>> seconds_difference(3600.0, 1800.0) -1800.0 >>> seconds_dif...
18.673759
75
0.582226
def seconds_difference(time_1, time_2): return time_2 - time_1 def hours_difference(time_1, time_2): def to_float_hours(hours, minutes, seconds): def to_24_hour_clock(hours): return hours % 24 def time_to_utc(utc_offset, time): def time_from_utc(utc_offset, time):
true
true
1c080629e54df4317a41bc9216f04b41dbd082eb
147
py
Python
tests/pd_logging/features/test_features.py
sedelmeyer/pandas-logging
3af7069f448f0ff733f91203e6b71052e935d7e2
[ "MIT" ]
null
null
null
tests/pd_logging/features/test_features.py
sedelmeyer/pandas-logging
3af7069f448f0ff733f91203e6b71052e935d7e2
[ "MIT" ]
null
null
null
tests/pd_logging/features/test_features.py
sedelmeyer/pandas-logging
3af7069f448f0ff733f91203e6b71052e935d7e2
[ "MIT" ]
null
null
null
from pd_logging.features import placeholder def test_placeholder(): """Ensure placeholder function runs without failure""" placeholder()
21
58
0.761905
from pd_logging.features import placeholder def test_placeholder(): placeholder()
true
true
1c08068db1f4da953ae23e2cc58ce35d83ebbd56
405
py
Python
day_has_a_name/wsgi.py
yokoc1322/day_has_a_name
6d4bb47d07e3cade2c89995f3a744244ce95158f
[ "MIT" ]
null
null
null
day_has_a_name/wsgi.py
yokoc1322/day_has_a_name
6d4bb47d07e3cade2c89995f3a744244ce95158f
[ "MIT" ]
4
2021-03-19T01:28:08.000Z
2021-06-04T22:52:46.000Z
day_has_a_name/wsgi.py
yokoc1322/day_has_a_name
6d4bb47d07e3cade2c89995f3a744244ce95158f
[ "MIT" ]
null
null
null
""" WSGI config for day_has_a_name project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANG...
23.823529
78
0.792593
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'day_has_a_name.settings') application = get_wsgi_application()
true
true
1c0807581ad35bd6f24be8a5cc90d2b2a9cdadb6
1,720
py
Python
tests/default/test_configuration.py
maxpoirier/ansible-rabbitmq
01abad663d769c4482b9785a4e3754d11c84a8eb
[ "MIT" ]
23
2017-09-23T18:58:40.000Z
2022-03-19T13:37:16.000Z
tests/default/test_configuration.py
maxpoirier/ansible-rabbitmq
01abad663d769c4482b9785a4e3754d11c84a8eb
[ "MIT" ]
25
2017-08-25T02:24:37.000Z
2022-01-14T13:40:59.000Z
tests/default/test_configuration.py
maxpoirier/ansible-rabbitmq
01abad663d769c4482b9785a4e3754d11c84a8eb
[ "MIT" ]
21
2018-09-06T17:10:16.000Z
2022-03-24T20:42:09.000Z
import os import testinfra.utils.ansible_runner testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') def test_rabbitmq_config_file_permissions_must_be_644(host): ansible_vars = host.ansible.get_variables() rabbitmq_conf_file = "/etc/rabbi...
31.851852
65
0.748837
import os import testinfra.utils.ansible_runner testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') def test_rabbitmq_config_file_permissions_must_be_644(host): ansible_vars = host.ansible.get_variables() rabbitmq_conf_file = "/etc/rabbi...
true
true
1c0808e463adb24b1b6200b73e471d2026c155b4
2,939
py
Python
pruebas.py
QuinteroA-UNIR/Calculadora-TDD
671b15c8da79d601053e5174e3f5d3ea31402776
[ "MIT" ]
null
null
null
pruebas.py
QuinteroA-UNIR/Calculadora-TDD
671b15c8da79d601053e5174e3f5d3ea31402776
[ "MIT" ]
null
null
null
pruebas.py
QuinteroA-UNIR/Calculadora-TDD
671b15c8da79d601053e5174e3f5d3ea31402776
[ "MIT" ]
null
null
null
import unittest from Calculator import Calculator class CalculatorTest(unittest.TestCase): calculator = Calculator() def test_suma_enteros(self): self.assertEqual(4, self.calculator.add(2,2)) def test_suma_invalido_negativo(self): self.assertRaises(ArithmeticError, self.calculator.add...
34.174419
75
0.687649
import unittest from Calculator import Calculator class CalculatorTest(unittest.TestCase): calculator = Calculator() def test_suma_enteros(self): self.assertEqual(4, self.calculator.add(2,2)) def test_suma_invalido_negativo(self): self.assertRaises(ArithmeticError, self.calculator.add...
true
true
1c0809284e95d1a5b79c69b7537c694e5ba8dbc5
54,454
py
Python
arviz/tests/base_tests/test_data.py
sudojarvis/arviz
73531be4f23df7d764b2e3bec8c5ef5cb882590d
[ "Apache-2.0" ]
1,159
2018-04-03T08:50:54.000Z
2022-03-31T18:03:52.000Z
arviz/tests/base_tests/test_data.py
sudojarvis/arviz
73531be4f23df7d764b2e3bec8c5ef5cb882590d
[ "Apache-2.0" ]
1,656
2018-03-23T14:15:05.000Z
2022-03-31T14:00:28.000Z
arviz/tests/base_tests/test_data.py
sudojarvis/arviz
73531be4f23df7d764b2e3bec8c5ef5cb882590d
[ "Apache-2.0" ]
316
2018-04-03T14:25:52.000Z
2022-03-25T10:41:29.000Z
# pylint: disable=no-member, invalid-name, redefined-outer-name # pylint: disable=too-many-lines import os from collections import namedtuple from copy import deepcopy from html import escape from typing import Dict from urllib.parse import urlunsplit import numpy as np import pytest import xarray as xr from xarray.c...
39.17554
100
0.60653
import os from collections import namedtuple from copy import deepcopy from html import escape from typing import Dict from urllib.parse import urlunsplit import numpy as np import pytest import xarray as xr from xarray.core.options import OPTIONS from xarray.testing import assert_identical from ... import ( Inf...
true
true
1c080b459a895c4c5925660f777832760ee6398f
27,981
py
Python
cli_helper.py
udeyrishi/DigiCAD
c99d3bff236fc7193c5f1059e315153d8c3928d9
[ "CC-BY-3.0" ]
null
null
null
cli_helper.py
udeyrishi/DigiCAD
c99d3bff236fc7193c5f1059e315153d8c3928d9
[ "CC-BY-3.0" ]
null
null
null
cli_helper.py
udeyrishi/DigiCAD
c99d3bff236fc7193c5f1059e315153d8c3928d9
[ "CC-BY-3.0" ]
null
null
null
""" This is the helper file for cli.py. See cli.py or Readme.txt for details. Developed by: Udey Rishi, 2014 """ from boolfunc import * import sys, copy, os class bcolors: """ The class for generating colour text in the Linux terminal. Source: http://stackoverflow.com/questions/287871/print-in-termi...
31.581264
110
0.521461
from boolfunc import * import sys, copy, os class bcolors: HEADER = '\033[95m' OKBLUE = '\033[94m' OKGREEN = '\033[92m' WARNING = '\033[93m' FAIL = '\033[91m' ENDC = '\033[0m' def disable(self): self.HEADER = '' self.OKBLUE = '' self.OKGREEN = '' self.WARNI...
true
true
1c080c0a41e7d29426dc725bafd25c32351d1f8f
1,878
py
Python
alipay/aop/api/domain/AlipayOpenAuthTokenAppModel.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/domain/AlipayOpenAuthTokenAppModel.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/domain/AlipayOpenAuthTokenAppModel.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import simplejson as json from alipay.aop.api.constant.ParamConstants import * class AlipayOpenAuthTokenAppModel(object): def __init__(self): self._code = None self._grant_type = None self._refresh_token = None @property def code(sel...
26.450704
77
0.584665
import simplejson as json from alipay.aop.api.constant.ParamConstants import * class AlipayOpenAuthTokenAppModel(object): def __init__(self): self._code = None self._grant_type = None self._refresh_token = None @property def code(self): return self._code @code.sette...
true
true
1c080cdace14928d3be4172dfbebfa10e48a96ff
161,711
py
Python
simulation/python_standard_lib/test/test_inspect.py
john-grando/pyExpandObjects
c08b1d1bc45684bc71c0f49b4d2f22c707cd4aa4
[ "BSD-3-Clause" ]
null
null
null
simulation/python_standard_lib/test/test_inspect.py
john-grando/pyExpandObjects
c08b1d1bc45684bc71c0f49b4d2f22c707cd4aa4
[ "BSD-3-Clause" ]
1
2021-02-03T01:56:56.000Z
2021-02-03T01:56:56.000Z
simulation/python_standard_lib/test/test_inspect.py
john-grando/pyExpandObjects
c08b1d1bc45684bc71c0f49b4d2f22c707cd4aa4
[ "BSD-3-Clause" ]
1
2022-01-11T18:31:05.000Z
2022-01-11T18:31:05.000Z
import builtins import collections import datetime import functools import importlib import inspect import io import linecache import os from os.path import normcase import _pickle import pickle import shutil import sys import types import textwrap import unicodedata import unittest import unittest.mo...
39.849926
101
0.549715
import builtins import collections import datetime import functools import importlib import inspect import io import linecache import os from os.path import normcase import _pickle import pickle import shutil import sys import types import textwrap import unicodedata import unittest import unittest.mo...
true
true
1c080d290a024baf10569aa2528fc3d845294914
2,780
py
Python
qr.py
daed5/bobby_boy
4abe85eb62b45ed7a0b2c1e30afc546a96ba3ca7
[ "MIT" ]
67
2017-05-03T01:51:31.000Z
2021-08-08T20:28:40.000Z
qr.py
daed5/bobby_boy
4abe85eb62b45ed7a0b2c1e30afc546a96ba3ca7
[ "MIT" ]
2
2017-07-04T21:44:34.000Z
2018-02-14T17:56:18.000Z
qr.py
daed5/bobby_boy
4abe85eb62b45ed7a0b2c1e30afc546a96ba3ca7
[ "MIT" ]
16
2017-07-08T11:59:57.000Z
2021-08-07T13:59:39.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- import sys import time import zbar import config import pygame from pygame import camera from PIL import Image from qrtools import QR def get_qr_content(with_gui=False, manual_detect=False): screen = None detected = False camera.init() if not camera.list_came...
26.47619
83
0.556115
import sys import time import zbar import config import pygame from pygame import camera from PIL import Image from qrtools import QR def get_qr_content(with_gui=False, manual_detect=False): screen = None detected = False camera.init() if not camera.list_cameras(): print("No camera detected!"...
true
true
1c080dc759aba3984336e75f6186828fadc1627a
818
py
Python
ktextaug/transformative/synonym_replacement.py
Junejae/ktextaug
c42a6781bae17511a183896198793229aeced09d
[ "MIT" ]
null
null
null
ktextaug/transformative/synonym_replacement.py
Junejae/ktextaug
c42a6781bae17511a183896198793229aeced09d
[ "MIT" ]
null
null
null
ktextaug/transformative/synonym_replacement.py
Junejae/ktextaug
c42a6781bae17511a183896198793229aeced09d
[ "MIT" ]
null
null
null
from .utils import isStopword, isWord, get_synonym import string def synonym_replace(text_or_words, tokenizer, rng, n_syns, **kwargs): # check if there is a punctuation mark if isinstance(text_or_words, str): words = tokenizer.tokenize(text_or_words) result = words[:] nonStop = [w for w in resu...
37.181818
104
0.667482
from .utils import isStopword, isWord, get_synonym import string def synonym_replace(text_or_words, tokenizer, rng, n_syns, **kwargs): if isinstance(text_or_words, str): words = tokenizer.tokenize(text_or_words) result = words[:] nonStop = [w for w in result if (not isStopword(w)) and (w not in...
true
true
1c0810166859cca1ad4dedbb1a438e79f0de83ce
1,705
py
Python
notebooks/example_genome_metrics_to_hdf.py
vatj/integer_polyomino
ffa7f53bb17e43c53ea387bfc3cf8a6c917037c4
[ "MIT" ]
null
null
null
notebooks/example_genome_metrics_to_hdf.py
vatj/integer_polyomino
ffa7f53bb17e43c53ea387bfc3cf8a6c917037c4
[ "MIT" ]
11
2019-11-28T16:56:06.000Z
2021-12-13T20:09:22.000Z
notebooks/example_genome_metrics_to_hdf.py
vatj/gpmap_integer_polyomino
ffa7f53bb17e43c53ea387bfc3cf8a6c917037c4
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # In[1]: import sys, os os.nice(0) # In[2]: import pandas as pd import numpy as np import glob # In[3]: import integer_polyomino.assembly as ipa sys.path.append(os.path.join(os.getcwd(), "..", "src", "integer_polyomino", "scripts")) import hdf # In[4]: data_dir = os....
20.542169
100
0.747214
import sys, os os.nice(0) import pandas as pd import numpy as np import glob import integer_polyomino.assembly as ipa sys.path.append(os.path.join(os.getcwd(), "..", "src", "integer_polyomino", "scripts")) import hdf data_dir = os.path.join(os.getcwd(), "..", "data", "V" + ipa.__version__) if not os.path...
true
true
1c0810466259391d894629b388826015455d23e6
51,720
py
Python
tests/engine/test_task_runner.py
jamestwebber/prefect
410c4ac37d2595ab61007742883687f5e284821d
[ "Apache-2.0" ]
null
null
null
tests/engine/test_task_runner.py
jamestwebber/prefect
410c4ac37d2595ab61007742883687f5e284821d
[ "Apache-2.0" ]
null
null
null
tests/engine/test_task_runner.py
jamestwebber/prefect
410c4ac37d2595ab61007742883687f5e284821d
[ "Apache-2.0" ]
null
null
null
import collections from datetime import datetime, timedelta from time import sleep from unittest.mock import MagicMock import pendulum import pytest import prefect from prefect.client import Secret from prefect.core.edge import Edge from prefect.core.task import Task from prefect.engine import cache_validators, signa...
35.04065
106
0.653248
import collections from datetime import datetime, timedelta from time import sleep from unittest.mock import MagicMock import pendulum import pytest import prefect from prefect.client import Secret from prefect.core.edge import Edge from prefect.core.task import Task from prefect.engine import cache_validators, signa...
true
true
1c081147d4f64fcb3f61e88ee5f89fde915ad5b7
3,228
py
Python
configs/_base_/models/hv_pillargrid_secfpn_kitti_carla.py
zwbai/mmdetection3d
286e93f521bd233bfdd96793d6f423cbd3e19da9
[ "Apache-2.0" ]
null
null
null
configs/_base_/models/hv_pillargrid_secfpn_kitti_carla.py
zwbai/mmdetection3d
286e93f521bd233bfdd96793d6f423cbd3e19da9
[ "Apache-2.0" ]
null
null
null
configs/_base_/models/hv_pillargrid_secfpn_kitti_carla.py
zwbai/mmdetection3d
286e93f521bd233bfdd96793d6f423cbd3e19da9
[ "Apache-2.0" ]
null
null
null
voxel_size = [0.16, 0.16, 4] model = dict( type='PillarGridShare', voxel_layer=dict( max_num_points=32, # max_points_per_voxel point_cloud_range=[0, -39.68, -3, 69.12, 39.68, 1], voxel_size=voxel_size, max_voxels=(16000, 40000) # (training, testing) max_voxels ), voxel...
33.278351
77
0.525713
voxel_size = [0.16, 0.16, 4] model = dict( type='PillarGridShare', voxel_layer=dict( max_num_points=32, point_cloud_range=[0, -39.68, -3, 69.12, 39.68, 1], voxel_size=voxel_size, max_voxels=(16000, 40000) ), voxel_encoder=dict( type='PillarFeatureNet', ...
true
true
1c0813bffc86728c818bd78d7c32f4f96ee53a06
4,150
py
Python
fairlearn/metrics/_annotated_metric_function.py
bramreinders97/fairlearn
3335c33117993843252b4adeaeac3ac18683b2ca
[ "MIT" ]
null
null
null
fairlearn/metrics/_annotated_metric_function.py
bramreinders97/fairlearn
3335c33117993843252b4adeaeac3ac18683b2ca
[ "MIT" ]
null
null
null
fairlearn/metrics/_annotated_metric_function.py
bramreinders97/fairlearn
3335c33117993843252b4adeaeac3ac18683b2ca
[ "MIT" ]
null
null
null
# Copyright (c) Fairlearn contributors. # Licensed under the MIT License. from typing import Callable, Dict, List, Optional import warnings import logging import numpy as np import pandas as pd logger = logging.getLogger(__name__) _DEFAULT_NAME = "metric" _METRIC_FUNCTION_NONE = "Found 'None' instead of metric fun...
38.073394
88
0.674217
from typing import Callable, Dict, List, Optional import warnings import logging import numpy as np import pandas as pd logger = logging.getLogger(__name__) _DEFAULT_NAME = "metric" _METRIC_FUNCTION_NONE = "Found 'None' instead of metric function" _METRIC_FUNCTION_NOT_CALLABLE = "Object passed as metric function n...
true
true
1c0814bcbe2de1ccf9c37959f888e88f2c7bb50c
5,294
py
Python
configs/02_gf/config.py
javiermcebrian/glcapsnet
07b1093c922461024d8049161e646bd1847eccbb
[ "Apache-2.0" ]
34
2019-11-19T10:12:23.000Z
2020-12-10T10:01:23.000Z
configs/02_gf/config.py
javiermcebrian/glcapsnet
07b1093c922461024d8049161e646bd1847eccbb
[ "Apache-2.0" ]
2
2020-10-24T09:22:40.000Z
2020-11-15T12:40:15.000Z
configs/02_gf/config.py
javiermcebrian/glcapsnet
07b1093c922461024d8049161e646bd1847eccbb
[ "Apache-2.0" ]
2
2019-11-19T11:43:15.000Z
2020-12-08T17:25:02.000Z
import numpy as np import pandas as pd import sys import os sys.path.append(os.path.abspath('../')) from utils.functions import kld, margin_loss, spread_loss, mean_squared_error, sum_squared_errors, information_gain_wrapper, normalized_scanpath_saliency, cc, similarity, auc_judd, auc_borji_wrapper, sAUC_wrapper, sNSS_...
43.752066
226
0.666981
import numpy as np import pandas as pd import sys import os sys.path.append(os.path.abspath('../')) from utils.functions import kld, margin_loss, spread_loss, mean_squared_error, sum_squared_errors, information_gain_wrapper, normalized_scanpath_saliency, cc, similarity, auc_judd, auc_borji_wrapper, sAUC_wrapper, sNSS_...
true
true
1c0816c1053a67600d6816dc34527c61f4fa5bfa
1,320
py
Python
Leetcode/src/Linked List/nth_node_from_end_of_linkedlist.py
QuDong/Algorithm4
c15c27653d860a1cd90a42cf97f7586ced12b48f
[ "MIT" ]
6
2017-07-07T08:10:42.000Z
2019-12-25T21:42:40.000Z
Leetcode/src/Linked List/nth_node_from_end_of_linkedlist.py
QuDong/Algorithm4
c15c27653d860a1cd90a42cf97f7586ced12b48f
[ "MIT" ]
null
null
null
Leetcode/src/Linked List/nth_node_from_end_of_linkedlist.py
QuDong/Algorithm4
c15c27653d860a1cd90a42cf97f7586ced12b48f
[ "MIT" ]
1
2021-08-22T06:43:47.000Z
2021-08-22T06:43:47.000Z
# -*- coding: utf-8 -*- """ Created on Fri Nov 25 10:25:13 2016 @author: dong.qu """ class Node(): def __init__(self, data): self.data = data self.next = None root = Node(1) #6th root.next = Node(3) #5th root.next.next = Node(4) #4th root.next.next.next = Node(6) #3rd root.next.next.next...
21.290323
72
0.594697
class Node(): def __init__(self, data): self.data = data self.next = None root = Node(1) root.next = Node(3) root.next.next = Node(4) root.next.next.next = Node(6) root.next.next.next.next = Node(7) root.next.next.next.next.next = Node(10) def nth_from_back_std(root, n): if not root...
true
true
1c081837848b362751297d1e88151f4869780f20
6,803
py
Python
RequestsGeneration/requestAnalysis.py
eman-ramadan/deepcache_netai2018
b13474dc677f4b13095498baa7b8be05f9c2b3d0
[ "BSD-3-Clause" ]
2
2020-10-18T19:56:14.000Z
2021-01-08T09:28:49.000Z
RequestsGeneration/requestAnalysis.py
eman-ramadan/deepcache_netai2018
b13474dc677f4b13095498baa7b8be05f9c2b3d0
[ "BSD-3-Clause" ]
null
null
null
RequestsGeneration/requestAnalysis.py
eman-ramadan/deepcache_netai2018
b13474dc677f4b13095498baa7b8be05f9c2b3d0
[ "BSD-3-Clause" ]
1
2020-11-05T12:20:32.000Z
2020-11-05T12:20:32.000Z
""" DeepCache DeepCache is distributed under the following BSD 3-Clause License: Copyright(c) 2019 University of Minensota - Twin Cities Authors: Arvind Narayanan, Saurabh Verma, Eman Ramadan, Pariya Babaie, and Zhi-Li Zhang All rights reserved. Redi...
43.890323
120
0.728649
from __future__ import print_function import pandas as pd import numpy as np import os FORCE_GENERATE_BINS = False FORCE_GENERATE_PROPERTIES = False REQDIR = '../Datasets/' REQUESTFILENAME = 'mediSynDataset_x2_O3488.csv' REQUESTPATH = REQDIR + REQUESTFILENAME BINFILENAME = REQDIR + REQUESTFILENAME[:-4] + '_bins.cs...
true
true
1c0818d97b141ce9520e773d1a97ec53f7fc2fee
394
py
Python
PyQt5-master/PyQt5-master/Chapter02/py211class.py
chaiwenda/Qt-mind
81b2b8f3bdec887368bfd18753c0a3518c5e577a
[ "Apache-2.0" ]
null
null
null
PyQt5-master/PyQt5-master/Chapter02/py211class.py
chaiwenda/Qt-mind
81b2b8f3bdec887368bfd18753c0a3518c5e577a
[ "Apache-2.0" ]
null
null
null
PyQt5-master/PyQt5-master/Chapter02/py211class.py
chaiwenda/Qt-mind
81b2b8f3bdec887368bfd18753c0a3518c5e577a
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- class MyClass: count = 0 name = 'DefaultName' def __init__(self, name): self.name = name print('类的变量是%s\n对象的变量是:%s' % ( MyClass.name, self.name) ) def setCount(self, count ): self.count = count def getCount(self): return self.count if __name__ == "__main__": c...
19.7
60
0.616751
class MyClass: count = 0 name = 'DefaultName' def __init__(self, name): self.name = name print('类的变量是%s\n对象的变量是:%s' % ( MyClass.name, self.name) ) def setCount(self, count ): self.count = count def getCount(self): return self.count if __name__ == "__main__": cls = MyClass('lisi') cl...
true
true
1c081936cb8dac946d8c54398edd6665d9796b18
5,847
py
Python
tests/components/huisbaasje/test_init.py
DavidDeSloovere/core
909a20b36d4df6724c955c2ae28cb82fe6d50c2e
[ "Apache-2.0" ]
4
2020-08-10T20:02:24.000Z
2022-01-31T02:14:22.000Z
tests/components/huisbaasje/test_init.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
78
2020-07-23T07:13:08.000Z
2022-03-31T06:02:04.000Z
tests/components/huisbaasje/test_init.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
3
2022-01-17T20:10:54.000Z
2022-01-17T20:17:22.000Z
"""Test cases for the initialisation of the Huisbaasje integration.""" from unittest.mock import patch from huisbaasje import HuisbaasjeException from homeassistant.components import huisbaasje from homeassistant.config_entries import ( ENTRY_STATE_LOADED, ENTRY_STATE_NOT_LOADED, ENTRY_STATE_SETUP_ERROR, ...
37.006329
88
0.674534
from unittest.mock import patch from huisbaasje import HuisbaasjeException from homeassistant.components import huisbaasje from homeassistant.config_entries import ( ENTRY_STATE_LOADED, ENTRY_STATE_NOT_LOADED, ENTRY_STATE_SETUP_ERROR, ) from homeassistant.const import CONF_ID, CONF_PASSWORD, CONF_USERNAME...
true
true
1c08199710c7143c4aa3e40e8f2f3e6452e81e4b
8,808
py
Python
python/ray/dag/class_node.py
jianoaix/ray
1701b923bc83905f8961c06a6a173e3eba46a936
[ "Apache-2.0" ]
null
null
null
python/ray/dag/class_node.py
jianoaix/ray
1701b923bc83905f8961c06a6a173e3eba46a936
[ "Apache-2.0" ]
null
null
null
python/ray/dag/class_node.py
jianoaix/ray
1701b923bc83905f8961c06a6a173e3eba46a936
[ "Apache-2.0" ]
null
null
null
import ray from ray.dag.dag_node import DAGNode from ray.dag.input_node import InputNode from ray.dag.format_utils import get_dag_node_str from ray.dag.constants import ( PARENT_CLASS_NODE_KEY, PREV_CLASS_METHOD_CALL_KEY, DAGNODE_TYPE_KEY, ) from typing import Any, Dict, List, Optional, Tuple class Class...
33.747126
84
0.611035
import ray from ray.dag.dag_node import DAGNode from ray.dag.input_node import InputNode from ray.dag.format_utils import get_dag_node_str from ray.dag.constants import ( PARENT_CLASS_NODE_KEY, PREV_CLASS_METHOD_CALL_KEY, DAGNODE_TYPE_KEY, ) from typing import Any, Dict, List, Optional, Tuple class Class...
true
true
1c0819e7c3c1c75ce8d87c0212560f95f4b82e80
1,000
py
Python
page_objects/Habr.py
prog-bob/Homework_7
06b4b52fa0efa4e2301f1456751a1d4966ba2a48
[ "MIT" ]
null
null
null
page_objects/Habr.py
prog-bob/Homework_7
06b4b52fa0efa4e2301f1456751a1d4966ba2a48
[ "MIT" ]
null
null
null
page_objects/Habr.py
prog-bob/Homework_7
06b4b52fa0efa4e2301f1456751a1d4966ba2a48
[ "MIT" ]
null
null
null
from page_objects.BasePage import BasePage from selenium.webdriver.common.by import By class Habr(BasePage): URL = "https://habr.com" SEARCH_BTN = (By.CSS_SELECTOR, "#search-form-btn") SEARCH_FILED = (By.CSS_SELECTOR, "#search-form-field") READ_MORE = (By.PARTIAL_LINK_TEXT, "Read more") FILTER_BY_...
31.25
91
0.69
from page_objects.BasePage import BasePage from selenium.webdriver.common.by import By class Habr(BasePage): URL = "https://habr.com" SEARCH_BTN = (By.CSS_SELECTOR, "#search-form-btn") SEARCH_FILED = (By.CSS_SELECTOR, "#search-form-field") READ_MORE = (By.PARTIAL_LINK_TEXT, "Read more") FILTER_BY_...
true
true
1c081aa0ead88d007acc2844a8ff53807043e99a
152
py
Python
schemes/exceptions.py
jonasstraub/essensfindung
8d949cb991e12457cbd33adddf569ccfa40aa6d9
[ "MIT" ]
null
null
null
schemes/exceptions.py
jonasstraub/essensfindung
8d949cb991e12457cbd33adddf569ccfa40aa6d9
[ "MIT" ]
null
null
null
schemes/exceptions.py
jonasstraub/essensfindung
8d949cb991e12457cbd33adddf569ccfa40aa6d9
[ "MIT" ]
null
null
null
"""Contains all own created Exceptions""" class GoogleApiException(Exception): """Exception if some Error from the Google API request are made"""
25.333333
70
0.743421
class GoogleApiException(Exception):
true
true
1c081bf283a7f49efc08f5a7a4fff1ee7a456f8e
4,190
py
Python
benchmark/startQiskit_noisy2803.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startQiskit_noisy2803.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startQiskit_noisy2803.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=4 # total number=41 import cirq import qiskit from qiskit.providers.aer import QasmSimulator from qiskit.test.mock import FakeVigo from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import ...
34.344262
140
0.652267
import cirq import qiskit from qiskit.providers.aer import QasmSimulator from qiskit.test.mock import FakeVigo from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import FakeVigo from math import log2 impo...
true
true
1c081c7d859bba0ec7a31a55dfade709ec98c18a
4,141
py
Python
benchmark/startQiskit2566.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startQiskit2566.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startQiskit2566.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=4 # total number=40 import cirq import qiskit from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import FakeVigo from math import log2 import numpy as np import networkx as nx def bitwise_...
34.798319
140
0.651775
import cirq import qiskit from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import FakeVigo from math import log2 import numpy as np import networkx as nx def bitwise_xor(s: str, t: str) -> str: len...
true
true
1c081d5497196f63d46d2cb1d4a04d053413b747
4,052
py
Python
vcfstr2111.py
mingulov/vcfstr2111
cb0ff0aabe93ab1b990dfc5d5de37301bfd7c5e5
[ "BSD-3-Clause" ]
null
null
null
vcfstr2111.py
mingulov/vcfstr2111
cb0ff0aabe93ab1b990dfc5d5de37301bfd7c5e5
[ "BSD-3-Clause" ]
null
null
null
vcfstr2111.py
mingulov/vcfstr2111
cb0ff0aabe93ab1b990dfc5d5de37301bfd7c5e5
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/python3 # Copyright (c) 2019, Denis Mingulov # # 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 notice, # ...
34.05042
147
0.607108
import sys import getopt import gzip import builtins def show_help(): print ('vcfstr2111.py --regions <STR info .bed file> --str-vcf <VCF with STRs>') def read_bed(filename): out = {} with open(filename, 'rt') as f: for line in f: info = line.strip().split("\t") baselen =...
true
true
1c081e381739a11985d97d5f2be63a01f9682465
5,443
py
Python
old_main.py
Erica233/mlflow-project-best-practices
3208af250fb91f44c635031db694b92a16d31729
[ "CC0-1.0" ]
null
null
null
old_main.py
Erica233/mlflow-project-best-practices
3208af250fb91f44c635031db694b92a16d31729
[ "CC0-1.0" ]
null
null
null
old_main.py
Erica233/mlflow-project-best-practices
3208af250fb91f44c635031db694b92a16d31729
[ "CC0-1.0" ]
null
null
null
# pylint: disable=no-name-in-module # pylint: disable=no-self-argument from fastapi import FastAPI import uvicorn import mlflow import pandas as pd from pydantic import BaseModel from fastapi.responses import JSONResponse from fastapi.encoders import jsonable_encoder class Story(BaseModel): text: str #real news ...
86.396825
3,315
0.796068
from fastapi import FastAPI import uvicorn import mlflow import pandas as pd from pydantic import BaseModel from fastapi.responses import JSONResponse from fastapi.encoders import jsonable_encoder class Story(BaseModel): text: str def predict(text): print(f"Accepted payload: {text}") my_data = { ...
true
true
1c081e592ee307b254e13acaf153c17983595350
17,148
py
Python
upconvert/core/layout.py
lehaianh1986/schematic-file-converter
ed67274511a5b0e1b378e4e0fd3943ec8a189f43
[ "Apache-2.0" ]
29
2016-05-19T02:04:51.000Z
2021-09-16T06:25:59.000Z
upconvert/core/layout.py
84ace/schematic-file-converter
a5975a521d842396605c05a9f197bfe088906bb4
[ "Apache-2.0" ]
null
null
null
upconvert/core/layout.py
84ace/schematic-file-converter
a5975a521d842396605c05a9f197bfe088906bb4
[ "Apache-2.0" ]
24
2016-05-19T02:05:00.000Z
2022-01-14T18:20:01.000Z
#!/usr/bin/env python2 """ The layout class """ # upconvert - A universal hardware design file format converter using # Format: upverter.com/resources/open-json-format/ # Development: github.com/upverter/schematic-file-converter # # Copyright 2011 Upverter, Inc. # # Licensed under the Apache License, Version 2....
38.362416
135
0.596629
import copy import freetype import logging import re from upconvert.core.shape import Circle, Label, Line, Point, Rectangle, RoundedRectangle log = logging.getLogger('core.layout') class Layout: def __init__(self): self.layers = list() class Layer: def __init__(self, name='', polarity='dark'):...
true
true
1c081fc86edb28784047c2e439ee0c8792f7da33
729
py
Python
EtlPipeline/locations.py
office-for-students/beta-data-pipelines
36b90c7720e0be0f807d93a31cf7346522b6e1f0
[ "MIT" ]
2
2019-06-04T14:15:16.000Z
2019-08-04T15:26:16.000Z
EtlPipeline/locations.py
office-for-students/beta-data-pipelines
36b90c7720e0be0f807d93a31cf7346522b6e1f0
[ "MIT" ]
3
2019-06-24T12:21:10.000Z
2019-07-22T11:15:27.000Z
EtlPipeline/locations.py
office-for-students/beta-data-pipelines
36b90c7720e0be0f807d93a31cf7346522b6e1f0
[ "MIT" ]
1
2019-09-26T19:29:15.000Z
2019-09-26T19:29:15.000Z
import xmltodict import defusedxml.ElementTree as ET class Locations: """Provides lookup of raw location data based on UKPRN and LOCID""" def __init__(self, root): """Build the locations lookup table Locations are unique on UKPRN and LOCID """ self.lookup_dict = {} f...
28.038462
75
0.607682
import xmltodict import defusedxml.ElementTree as ET class Locations: def __init__(self, root): self.lookup_dict = {} for location in root.iter("LOCATION"): raw_location_data = xmltodict.parse(ET.tostring(location))[ "LOCATION" ] lockey = ( ...
true
true
1c0821b5f0c1fbc75845d64f7eddca9dc8eb89ff
355
py
Python
mesa/__init__.py
senden9/mesa
252050806a8921ec6ba9d1ef57b171e36cb30b23
[ "Apache-2.0" ]
1
2021-04-29T00:21:37.000Z
2021-04-29T00:21:37.000Z
mesa/__init__.py
senden9/mesa
252050806a8921ec6ba9d1ef57b171e36cb30b23
[ "Apache-2.0" ]
null
null
null
mesa/__init__.py
senden9/mesa
252050806a8921ec6ba9d1ef57b171e36cb30b23
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Mesa Agent-Based Modeling Framework Core Objects: Model, and Agent. """ import datetime from mesa.model import Model from mesa.agent import Agent __all__ = ["Model", "Agent"] __title__ = "mesa" __version__ = "0.8.7" __license__ = "Apache 2.0" __copyright__ = "Copyright %s Project Mesa ...
17.75
77
0.701408
import datetime from mesa.model import Model from mesa.agent import Agent __all__ = ["Model", "Agent"] __title__ = "mesa" __version__ = "0.8.7" __license__ = "Apache 2.0" __copyright__ = "Copyright %s Project Mesa Team" % datetime.date.today().year
true
true
1c082505c026c7cace375c96a910c5d2b0d092a5
393
py
Python
slides/email/email.py
arnovr/epaper-dashboard
eddcf6d189df139375eacd07f90fe97a839fc451
[ "MIT" ]
null
null
null
slides/email/email.py
arnovr/epaper-dashboard
eddcf6d189df139375eacd07f90fe97a839fc451
[ "MIT" ]
null
null
null
slides/email/email.py
arnovr/epaper-dashboard
eddcf6d189df139375eacd07f90fe97a839fc451
[ "MIT" ]
null
null
null
from slides.email.email_drawing import EmailDrawing from slides.services.imap_service import ImapService from slides.slide_runner import SlideRunner class Email(SlideRunner): def __init__(self, imapService: ImapService): self.imapService = imapService def name(self): return "email" def ...
26.2
62
0.748092
from slides.email.email_drawing import EmailDrawing from slides.services.imap_service import ImapService from slides.slide_runner import SlideRunner class Email(SlideRunner): def __init__(self, imapService: ImapService): self.imapService = imapService def name(self): return "email" def ...
true
true
1c08261a935c64766af51345ce3f0add24792b52
489
py
Python
setup.py
ShahzadNaser/moe_files
ae736a6957de94049aa5ac001c1b30155a580b90
[ "MIT" ]
null
null
null
setup.py
ShahzadNaser/moe_files
ae736a6957de94049aa5ac001c1b30155a580b90
[ "MIT" ]
null
null
null
setup.py
ShahzadNaser/moe_files
ae736a6957de94049aa5ac001c1b30155a580b90
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages with open('requirements.txt') as f: install_requires = f.read().strip().split('\n') # get version from __version__ variable in moe_files/__init__.py from moe_files import __version__ as version setup( name='moe_files', version=version, description='moe_files', author=...
24.45
64
0.787321
from setuptools import setup, find_packages with open('requirements.txt') as f: install_requires = f.read().strip().split('\n') from moe_files import __version__ as version setup( name='moe_files', version=version, description='moe_files', author='shahzadnaser', author_email='shahzadnaser1122@gmail.com', pack...
true
true
1c08264ac5244fea2715fd05e4beb9e2839ddcab
2,048
py
Python
model-optimizer/extensions/ops/parameter.py
evgeniya-egupova/openvino
4b8d6c59e3444ecdc549bfdf357d19d625479b89
[ "Apache-2.0" ]
null
null
null
model-optimizer/extensions/ops/parameter.py
evgeniya-egupova/openvino
4b8d6c59e3444ecdc549bfdf357d19d625479b89
[ "Apache-2.0" ]
8
2021-12-02T20:59:44.000Z
2022-02-21T13:17:56.000Z
model-optimizer/extensions/ops/parameter.py
rkazants/openvino
a9a583eb42d43322b39b95b164b5b22c4f341111
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2018-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import numpy as np from mo.front.common.partial_infer.utils import unmask_shape from mo.graph.graph import Graph, Node from mo.middle.passes.convert_data_type import np_data_type_to_destination_type from mo.ops.op import Op, PermuteAttr...
33.032258
112
0.629883
import numpy as np from mo.front.common.partial_infer.utils import unmask_shape from mo.graph.graph import Graph, Node from mo.middle.passes.convert_data_type import np_data_type_to_destination_type from mo.ops.op import Op, PermuteAttrs class Parameter(Op): op = 'Parameter' def __init__(self, graph: Graph...
true
true
1c08265d385c4a47e29ea0a729dd176cdb37d36d
21,814
py
Python
game.py
Vaderico/LSTM-Camera-Game
3ccc05f2f6ea5c06eb36f4e5a755dca51d913bcc
[ "MIT" ]
null
null
null
game.py
Vaderico/LSTM-Camera-Game
3ccc05f2f6ea5c06eb36f4e5a755dca51d913bcc
[ "MIT" ]
null
null
null
game.py
Vaderico/LSTM-Camera-Game
3ccc05f2f6ea5c06eb36f4e5a755dca51d913bcc
[ "MIT" ]
null
null
null
import contextlib with contextlib.redirect_stdout(None): import pygame from pygame.locals import * import os import shutil import json import random import datetime import time import csv from player import HumanPlayer, LSTMPlayer # Game that displays a crop of an image, and allows a player to move # around it b...
39.589837
97
0.642248
import contextlib with contextlib.redirect_stdout(None): import pygame from pygame.locals import * import os import shutil import json import random import datetime import time import csv from player import HumanPlayer, LSTMPlayer class Game: def __init__(self, player, images_dir, res, frame_rate): ...
true
true
1c0826aea98927d8273bd3d5e9bcb7295dede2ae
4,567
py
Python
hummingbird/ml/operator_converters/_gbdt_commons.py
TuanNguyen27/hummingbird
20e37faf7c010295f630ad1d8cf104cf16081baa
[ "MIT" ]
null
null
null
hummingbird/ml/operator_converters/_gbdt_commons.py
TuanNguyen27/hummingbird
20e37faf7c010295f630ad1d8cf104cf16081baa
[ "MIT" ]
null
null
null
hummingbird/ml/operator_converters/_gbdt_commons.py
TuanNguyen27/hummingbird
20e37faf7c010295f630ad1d8cf104cf16081baa
[ "MIT" ]
null
null
null
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- """ Colle...
44.77451
126
0.724327
import torch import numpy as np from . import constants from ._tree_commons import get_tree_params_and_type, get_parameters_for_tree_trav_common, get_parameters_for_gemm_common from ._tree_implementations import GEMMGBDTImpl, TreeTraversalGBDTImpl, PerfectTreeTraversalGBDTImpl, TreeImpl def convert_gbdt_classifier...
true
true
1c0826fa45bbdca339362924a3236b8b2f13b50e
149
py
Python
glow/api/__init__.py
arquolo/ort
6f2d32d739ed6a0dab81bb91018c005e47ef7e77
[ "MIT" ]
null
null
null
glow/api/__init__.py
arquolo/ort
6f2d32d739ed6a0dab81bb91018c005e47ef7e77
[ "MIT" ]
null
null
null
glow/api/__init__.py
arquolo/ort
6f2d32d739ed6a0dab81bb91018c005e47ef7e77
[ "MIT" ]
null
null
null
from .config import env from .exporting import export, get_wild_imports, import_tree __all__ = ['env', 'export', 'get_wild_imports', 'import_tree']
29.8
62
0.765101
from .config import env from .exporting import export, get_wild_imports, import_tree __all__ = ['env', 'export', 'get_wild_imports', 'import_tree']
true
true
1c08271591225f4a2ebbb097af9a27b005171ef8
2,413
py
Python
python/setup.py
vemel/python-phonenumbers
595c322bf12106a3b95e3f202e948a7c6b6c15b8
[ "Apache-2.0" ]
1
2021-02-16T10:02:00.000Z
2021-02-16T10:02:00.000Z
python/setup.py
vemel/python-phonenumbers
595c322bf12106a3b95e3f202e948a7c6b6c15b8
[ "Apache-2.0" ]
null
null
null
python/setup.py
vemel/python-phonenumbers
595c322bf12106a3b95e3f202e948a7c6b6c15b8
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Original libphonenumber Java code: # Copyright (C) 2009-2011 The Libphonenumber Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/li...
40.898305
154
0.627435
import distutils.core import sys try: import setuptools except ImportError: pass major, minor = sys.version_info[:2] python_25 = (major > 2 or (major == 2 and minor >= 5)) if not python_25: raise RuntimeError("Python 2.5 or newer is required") python_3x = (major >= 3) if python_3x: package_name = 'mr...
true
true
1c0827e1d39c0b3c48462f52e78d373107d2862e
1,511
py
Python
piton/commands/outdated.py
negati-ve/piton3
04c74af3742ba1bb00965887ce00840dd9298339
[ "MIT" ]
19
2016-04-08T04:00:07.000Z
2021-11-12T19:36:56.000Z
piton/commands/outdated.py
LookLikeAPro/PPM
19015b76184befe1e2daa63189a13b039787868d
[ "MIT" ]
9
2017-01-03T13:39:47.000Z
2022-01-15T20:38:20.000Z
piton/commands/outdated.py
LookLikeAPro/PPM
19015b76184befe1e2daa63189a13b039787868d
[ "MIT" ]
6
2017-04-01T03:38:45.000Z
2021-05-06T11:25:31.000Z
from ..utils.command import BaseCommand from ..utils.tabulate import tabulate from ..utils.info import get_packages, Sources class Colors: PURPLE = '\033[95m' OKBLUE = '\033[94m' OKGREEN = '\033[92m' WARNING = '\033[93m' FAIL = '\033[91m' UNDERLINE = '\033[4m' ENDC = '\033[0m' class Command(BaseCommand): name...
32.148936
123
0.718729
from ..utils.command import BaseCommand from ..utils.tabulate import tabulate from ..utils.info import get_packages, Sources class Colors: PURPLE = '\033[95m' OKBLUE = '\033[94m' OKGREEN = '\033[92m' WARNING = '\033[93m' FAIL = '\033[91m' UNDERLINE = '\033[4m' ENDC = '\033[0m' class Command(BaseCommand): name...
true
true
1c082844168adc8e218f8ff7e90687b58bd09590
5,285
py
Python
P2.py
chelackal/gentic_clustering
ecbecded0a79ac56c6d03b66d3a5bec403fcdafa
[ "MIT" ]
1
2021-09-14T18:16:49.000Z
2021-09-14T18:16:49.000Z
P2.py
chelackal/gentic_clustering
ecbecded0a79ac56c6d03b66d3a5bec403fcdafa
[ "MIT" ]
null
null
null
P2.py
chelackal/gentic_clustering
ecbecded0a79ac56c6d03b66d3a5bec403fcdafa
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Tue Nov 10 21:30:05 2020 @author: Alish Chelackal """ """This module contains P2 of the project,the function AlignByDP is the main function """ import itertools def checkInputType(in_list): """Makes sure input is indeed a list of tuples of two strings: a lab...
31.837349
156
0.550804
import itertools def checkInputType(in_list): if type(in_list) != list: raise RuntimeError('malformed') for i in in_list: try: s_1,s_2 = i if type(s_1) != str or type(s_2) != str: raise RuntimeError('malformed') except ValueError: ...
true
true
1c082876923183cda4f8c8516096a8d397358316
350
py
Python
Cracking-the-Coding-Interview/time-complexity-big-O.py
ekant1999/HackerRank
084d4550b4eaf130837ab26a4efdbcaf8b667cdc
[ "MIT" ]
9
2017-03-19T16:27:31.000Z
2022-02-17T11:42:21.000Z
Cracking-the-Coding-Interview/time-complexity-big-O.py
ekant1999/HackerRank
084d4550b4eaf130837ab26a4efdbcaf8b667cdc
[ "MIT" ]
null
null
null
Cracking-the-Coding-Interview/time-complexity-big-O.py
ekant1999/HackerRank
084d4550b4eaf130837ab26a4efdbcaf8b667cdc
[ "MIT" ]
6
2019-02-18T11:26:24.000Z
2022-03-21T14:13:15.000Z
import math def is_prime(n): if n == 1: return False for i in range(2, int(math.sqrt(n))+1): if n%i == 0: return False return True p = int(raw_input().strip()) for _ in xrange(p): n = int(raw_input().strip()) if is_prime(n): print "Prime" else...
19.444444
44
0.5
import math def is_prime(n): if n == 1: return False for i in range(2, int(math.sqrt(n))+1): if n%i == 0: return False return True p = int(raw_input().strip()) for _ in xrange(p): n = int(raw_input().strip()) if is_prime(n): print "Prime" else...
false
true
1c0829a44ff1a94e4ecedbd850e60f2de1a7c296
6,742
py
Python
comments/forms.py
nimalegebihahaha/my_blog
5cf718e11a708d3268c340cbd1b35a25fb03240b
[ "BSD-3-Clause" ]
5
2016-01-15T08:09:48.000Z
2018-07-07T13:20:33.000Z
comments/forms.py
nimalegebihahaha/my_blog
5cf718e11a708d3268c340cbd1b35a25fb03240b
[ "BSD-3-Clause" ]
null
null
null
comments/forms.py
nimalegebihahaha/my_blog
5cf718e11a708d3268c340cbd1b35a25fb03240b
[ "BSD-3-Clause" ]
4
2015-06-09T08:44:35.000Z
2019-07-31T00:13:11.000Z
import re import time import datetime from django import forms from django.forms.util import ErrorDict from django.conf import settings from django.http import Http404 from django.contrib.contenttypes.models import ContentType from django.utils.encoding import force_unicode from django.utils.hashcompat import sha_cons...
41.617284
108
0.626372
import re import time import datetime from django import forms from django.forms.util import ErrorDict from django.conf import settings from django.http import Http404 from django.contrib.contenttypes.models import ContentType from django.utils.encoding import force_unicode from django.utils.hashcompat import sha_cons...
true
true
1c082a6ebede889d7b89c1b23fa6e3551dc0d9d5
1,245
py
Python
__init__.py
cortext/antonio
0780ea2f2849c0f5f8a269106033ff5bf3767e08
[ "MIT" ]
null
null
null
__init__.py
cortext/antonio
0780ea2f2849c0f5f8a269106033ff5bf3767e08
[ "MIT" ]
null
null
null
__init__.py
cortext/antonio
0780ea2f2849c0f5f8a269106033ff5bf3767e08
[ "MIT" ]
null
null
null
__doc__ = "Interface avec CM V2" __version__ = "3.0.1" from bottle import static_file import bottle from beaker.middleware import SessionMiddleware import os import json from bson.json_util import dumps from convert import Connector, MongoClient # # App configuration # # HOST = "localhost" PORT = 8000 app = bottle...
23.055556
73
0.71245
__doc__ = "Interface avec CM V2" __version__ = "3.0.1" from bottle import static_file import bottle from beaker.middleware import SessionMiddleware import os import json from bson.json_util import dumps from convert import Connector, MongoClient HOST = "localhost" PORT = 8000 app = bottle.app() session_opts = { ...
true
true
1c082ae7abe30a854a77b609df5fb29c51a10c73
5,296
py
Python
dialogs/operations/createorder_dialog.py
sushmita-mishra/e-comm-chatobot-luis
ede7c98e75bcac1ff1c55396dc24392d33ce0ee5
[ "MIT" ]
null
null
null
dialogs/operations/createorder_dialog.py
sushmita-mishra/e-comm-chatobot-luis
ede7c98e75bcac1ff1c55396dc24392d33ce0ee5
[ "MIT" ]
null
null
null
dialogs/operations/createorder_dialog.py
sushmita-mishra/e-comm-chatobot-luis
ede7c98e75bcac1ff1c55396dc24392d33ce0ee5
[ "MIT" ]
null
null
null
from botbuilder.dialogs import ( ComponentDialog, WaterfallDialog, WaterfallStepContext, DialogTurnResult, ) from botbuilder.dialogs.prompts import TextPrompt, PromptOptions, ChoicePrompt, ConfirmPrompt from botbuilder.core import MessageFactory from botbuilder.schema import InputHints from ....
33.518987
96
0.616125
from botbuilder.dialogs import ( ComponentDialog, WaterfallDialog, WaterfallStepContext, DialogTurnResult, ) from botbuilder.dialogs.prompts import TextPrompt, PromptOptions, ChoicePrompt, ConfirmPrompt from botbuilder.core import MessageFactory from botbuilder.schema import InputHints from ....
true
true
1c082b06634fd8dbe5d1059ab82b102ca74bd43d
5,533
py
Python
rec_to_nwb/test/processing/mda/time/valid/test_flMdaValidTimeManager.py
jihyunbak/rec_to_nwb
6e65f8bf0a4faa4d986483ec2442ba19d70c92a9
[ "Apache-2.0" ]
8
2020-05-29T13:48:35.000Z
2021-11-19T04:24:48.000Z
rec_to_nwb/test/processing/mda/time/valid/test_flMdaValidTimeManager.py
jihyunbak/rec_to_nwb
6e65f8bf0a4faa4d986483ec2442ba19d70c92a9
[ "Apache-2.0" ]
12
2020-11-13T01:36:32.000Z
2022-01-23T20:35:55.000Z
rec_to_nwb/test/processing/mda/time/valid/test_flMdaValidTimeManager.py
jihyunbak/rec_to_nwb
6e65f8bf0a4faa4d986483ec2442ba19d70c92a9
[ "Apache-2.0" ]
3
2020-10-20T06:52:45.000Z
2021-07-06T23:00:53.000Z
from unittest import TestCase from unittest.mock import MagicMock import numpy as np from pynwb import NWBFile from testfixtures import should_raise from rec_to_nwb.processing.exceptions.missing_data_exception import MissingDataException from rec_to_nwb.processing.nwb.components.mda.time.valid.fl_mda_valid_time_manag...
43.226563
111
0.699259
from unittest import TestCase from unittest.mock import MagicMock import numpy as np from pynwb import NWBFile from testfixtures import should_raise from rec_to_nwb.processing.exceptions.missing_data_exception import MissingDataException from rec_to_nwb.processing.nwb.components.mda.time.valid.fl_mda_valid_time_manag...
true
true
1c082cdc76238c082755042ee54b5afc7675116f
1,600
py
Python
test/test_driver_pyquante.py
Travis-S/aqua-chemistry
87d1e924dcb9e9cdbaf7c86a8004495bc71af2fa
[ "Apache-2.0" ]
1
2021-03-04T11:46:34.000Z
2021-03-04T11:46:34.000Z
test/test_driver_pyquante.py
Travis-S/aqua-chemistry
87d1e924dcb9e9cdbaf7c86a8004495bc71af2fa
[ "Apache-2.0" ]
null
null
null
test/test_driver_pyquante.py
Travis-S/aqua-chemistry
87d1e924dcb9e9cdbaf7c86a8004495bc71af2fa
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2018 IBM. # # 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 agre...
33.333333
79
0.646875
import unittest from collections import OrderedDict from test.common import QiskitAquaChemistryTestCase from qiskit_aqua_chemistry.drivers import ConfigurationManager from test.test_driver import TestDriver class TestDriverPyQuante(QiskitAquaChemistryTestCase, TestDriver): def setUp(self): cfg_mgr = C...
true
true
1c082cdf0c456188fb9abe06c3d1ae13caf9c40f
361
py
Python
openregistry/assets/compound/tests/main.py
bdmbdsm/openregistry.assets.compound
18a0b799d52275dbe03dfd7823d08ab51544efb2
[ "Apache-2.0" ]
null
null
null
openregistry/assets/compound/tests/main.py
bdmbdsm/openregistry.assets.compound
18a0b799d52275dbe03dfd7823d08ab51544efb2
[ "Apache-2.0" ]
17
2017-09-11T10:38:57.000Z
2019-01-31T10:10:26.000Z
openregistry/assets/compound/tests/main.py
bdmbdsm/openregistry.assets.compound
18a0b799d52275dbe03dfd7823d08ab51544efb2
[ "Apache-2.0" ]
7
2017-09-08T09:53:51.000Z
2018-09-14T10:57:36.000Z
# -*- coding: utf-8 -*- import unittest from openregistry.assets.compound.tests import asset, document, transferring def suite(): tests = unittest.TestSuite() tests.addTest(asset.suite()) tests.addTest(document.suite()) tests.addTest(transferring.suite()) return tests if __name__ == '__main__'...
20.055556
76
0.700831
import unittest from openregistry.assets.compound.tests import asset, document, transferring def suite(): tests = unittest.TestSuite() tests.addTest(asset.suite()) tests.addTest(document.suite()) tests.addTest(transferring.suite()) return tests if __name__ == '__main__': unittest.main(defa...
true
true
1c082d8c96236a08030a7e198c2009b5664d4934
4,122
py
Python
kubernetes/models/v1beta1/StatefulSetSpec.py
riconnon/kubernetes-py
42a4537876985ed105ee44b6529763ba5d57c179
[ "Apache-2.0" ]
null
null
null
kubernetes/models/v1beta1/StatefulSetSpec.py
riconnon/kubernetes-py
42a4537876985ed105ee44b6529763ba5d57c179
[ "Apache-2.0" ]
null
null
null
kubernetes/models/v1beta1/StatefulSetSpec.py
riconnon/kubernetes-py
42a4537876985ed105ee44b6529763ba5d57c179
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This file is subject to the terms and conditions defined in # file 'LICENSE.md', which is part of this source code package. # from kubernetes.models.v1.PersistentVolumeClaim import PersistentVolumeClaim from kubernetes.models.v1.PodTemplateSpec import PodTemplateSpec ...
35.230769
112
0.568899
from kubernetes.models.v1.PersistentVolumeClaim import PersistentVolumeClaim from kubernetes.models.v1.PodTemplateSpec import PodTemplateSpec from kubernetes.models.v1beta1.LabelSelector import LabelSelector from kubernetes.utils import is_valid_list, is_valid_string class StatefulSetSpec(object): def __init__...
true
true
1c08319ff2b02300d5e23a4e9ad978919546a105
6,676
py
Python
season/core/tables.py
dmartin35/pronosfoot
861ae091fbb65684d00ae8c5ff3726eeaa306ed7
[ "MIT" ]
4
2017-07-09T21:18:18.000Z
2022-02-16T13:05:10.000Z
season/core/tables.py
dmartin35/pronosfoot
861ae091fbb65684d00ae8c5ff3726eeaa306ed7
[ "MIT" ]
2
2020-01-16T14:21:42.000Z
2021-03-02T18:34:15.000Z
season/core/tables.py
dmartin35/pronosfoot
861ae091fbb65684d00ae8c5ff3726eeaa306ed7
[ "MIT" ]
null
null
null
""" TABLES MANAGEMENT """ from season.queries import league_table from season.queries import league_table_with_teamid from season.queries import league_table_until from season.queries import user_table_with_bonus from season.queries import user_table_until_week from season.queries import user_table_for_week from season...
37.296089
108
0.686639
from season.queries import league_table from season.queries import league_table_with_teamid from season.queries import league_table_until from season.queries import user_table_with_bonus from season.queries import user_table_until_week from season.queries import user_table_for_week from season.queries import league_tab...
true
true
1c0831b370b5fe7ef67633f1c75ac2711c3bc866
4,844
py
Python
demo/final-demo/model-matrix-generation/data-matrix-generation.py
the-browser/recommending-interesting-writing
9ff4771d3f437d33c26d2f306e393b5a90a04878
[ "MIT" ]
5
2020-09-17T17:56:21.000Z
2021-11-03T02:40:27.000Z
demo/final-demo/model-matrix-generation/data-matrix-generation.py
the-browser/recommending-interesting-writing
9ff4771d3f437d33c26d2f306e393b5a90a04878
[ "MIT" ]
null
null
null
demo/final-demo/model-matrix-generation/data-matrix-generation.py
the-browser/recommending-interesting-writing
9ff4771d3f437d33c26d2f306e393b5a90a04878
[ "MIT" ]
1
2020-11-01T11:37:38.000Z
2020-11-01T11:37:38.000Z
# import necessary libraries import numpy as np from scipy.sparse import csr_matrix import sys sys.path.append( "/users/rohan/news-classification/ranking-featured-writing/rankfromsets" ) import os import argparse from data_processing.articles import Articles from models.models import InnerProduct import data_proce...
27.68
88
0.684971
import numpy as np from scipy.sparse import csr_matrix import sys sys.path.append( "/users/rohan/news-classification/ranking-featured-writing/rankfromsets" ) import os import argparse from data_processing.articles import Articles from models.models import InnerProduct import data_processing.dictionaries as diction...
true
true
1c0831e87faeaafa5c59d67ec93df38e1d6601ef
6,625
py
Python
test_intcode_computer.py
gps035/aoc-2019
19bc843720680cc3988a5d07647688787cae81d0
[ "Unlicense" ]
null
null
null
test_intcode_computer.py
gps035/aoc-2019
19bc843720680cc3988a5d07647688787cae81d0
[ "Unlicense" ]
null
null
null
test_intcode_computer.py
gps035/aoc-2019
19bc843720680cc3988a5d07647688787cae81d0
[ "Unlicense" ]
1
2019-12-04T09:09:03.000Z
2019-12-04T09:09:03.000Z
import unittest from intcode_computer import run_program class TestIntCodeComputer(unittest.TestCase): def test_program_modification_1(self): program = [1, 9, 10, 3, 2, 3, 11, 0, 99, 30, 40, 50] for _ in run_program(program): pass self.assertEqual(program[0], 3500) def te...
35.810811
120
0.592302
import unittest from intcode_computer import run_program class TestIntCodeComputer(unittest.TestCase): def test_program_modification_1(self): program = [1, 9, 10, 3, 2, 3, 11, 0, 99, 30, 40, 50] for _ in run_program(program): pass self.assertEqual(program[0], 3500) def te...
true
true
1c08321c09742fd8afa6467524c0689445bc316b
7,365
py
Python
src/spaceone/inventory/connector/aws_elasticache_connector/schema/service_type.py
spaceone-dev/plugin-aws-cloudservices
d685cf91edfbc2e570964fb95e5d4c1676f566f8
[ "Apache-2.0" ]
4
2020-06-22T01:48:07.000Z
2020-08-24T00:51:09.000Z
src/spaceone/inventory/connector/aws_elasticache_connector/schema/service_type.py
spaceone-dev/plugin-aws-cloudservices
d685cf91edfbc2e570964fb95e5d4c1676f566f8
[ "Apache-2.0" ]
null
null
null
src/spaceone/inventory/connector/aws_elasticache_connector/schema/service_type.py
spaceone-dev/plugin-aws-cloudservices
d685cf91edfbc2e570964fb95e5d4c1676f566f8
[ "Apache-2.0" ]
6
2020-06-22T09:19:40.000Z
2020-09-17T06:35:37.000Z
from spaceone.inventory.libs.schema.dynamic_field import TextDyField, SearchField, EnumDyField, ListDyField from spaceone.inventory.libs.schema.resource import CloudServiceTypeResource, CloudServiceTypeResponse, CloudServiceTypeMeta cst_memcached = CloudServiceTypeResource() cst_memcached.name = 'Memcached' cst_memcac...
44.908537
148
0.65852
from spaceone.inventory.libs.schema.dynamic_field import TextDyField, SearchField, EnumDyField, ListDyField from spaceone.inventory.libs.schema.resource import CloudServiceTypeResource, CloudServiceTypeResponse, CloudServiceTypeMeta cst_memcached = CloudServiceTypeResource() cst_memcached.name = 'Memcached' cst_memcac...
true
true