hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
1c437841a3b01daa9a2600a43c0462b0bfe4c09c
10,803
py
Python
qiskit/extensions/standard/equivalence_library.py
diego-plan9/qiskit-terra
a4120d70bd631ad2add228fdb1f86706bc5f2339
[ "Apache-2.0" ]
1
2018-05-29T03:58:03.000Z
2018-05-29T03:58:03.000Z
qiskit/extensions/standard/equivalence_library.py
diego-plan9/qiskit-terra
a4120d70bd631ad2add228fdb1f86706bc5f2339
[ "Apache-2.0" ]
3
2018-11-13T17:33:37.000Z
2018-12-03T09:35:00.000Z
qiskit/extensions/standard/equivalence_library.py
diego-plan9/qiskit-terra
a4120d70bd631ad2add228fdb1f86706bc5f2339
[ "Apache-2.0" ]
2
2017-12-03T15:48:14.000Z
2018-03-11T13:08:03.000Z
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2017. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modif...
24.496599
89
0.544386
from qiskit.qasm import pi from qiskit.circuit import EquivalenceLibrary, Parameter, QuantumCircuit, QuantumRegister from . import ( HGate, CHGate, MSGate, RGate, RCCXGate, RCCCXGate, RXGate, CRXGate, RXXGate, RYGate, CRYGate, RZGate, CRZGate, RZZGate, S...
true
true
1c43796bccaf30510d15fc9c0745a62bf63bf637
248
py
Python
src/tfi/doc/example_code.py
ajbouh/tfi
6e89e8c8f1ca3b285c788cc6b802fc44f9001290
[ "MIT" ]
160
2017-09-13T00:32:05.000Z
2018-05-21T18:17:32.000Z
src/tfi/doc/example_code.py
tesserai/tfi
6e89e8c8f1ca3b285c788cc6b802fc44f9001290
[ "MIT" ]
6
2017-09-14T17:54:21.000Z
2018-01-27T19:31:18.000Z
src/tfi/doc/example_code.py
ajbouh/tfi
6e89e8c8f1ca3b285c788cc6b802fc44f9001290
[ "MIT" ]
11
2017-09-13T00:37:08.000Z
2018-03-05T08:03:34.000Z
class ExampleCode(object): def __init__(self, name, label, lines): self.name = name self.label = label self.lines = lines class ExampleCodeSet(object): def __init__(self, examples): self.examples = examples
24.8
43
0.641129
class ExampleCode(object): def __init__(self, name, label, lines): self.name = name self.label = label self.lines = lines class ExampleCodeSet(object): def __init__(self, examples): self.examples = examples
true
true
1c43798e4f90c184b28ff96bd2cdb011086d62f3
8,511
py
Python
packages/python/plotly/plotly/graph_objs/scattergeo/marker/colorbar/_tickfont.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
packages/python/plotly/plotly/graph_objs/scattergeo/marker/colorbar/_tickfont.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
packages/python/plotly/plotly/graph_objs/scattergeo/marker/colorbar/_tickfont.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "scattergeo.marker.colorbar" _path_str = "scattergeo.marker.colorbar.tickfont" _valid_props...
37.328947
82
0.568793
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): _parent_path_str = "scattergeo.marker.colorbar" _path_str = "scattergeo.marker.colorbar.tickfont" _valid_props = {"color", "family", "size"} ...
true
true
1c4379b36a66a2a9b70d4fc271af6a45e07df62d
519
py
Python
verification/config.py
vinthedark/snet-marketplace-service
66ed9d093b00f09d3e28ef4d86c4e4c125037d06
[ "MIT" ]
null
null
null
verification/config.py
vinthedark/snet-marketplace-service
66ed9d093b00f09d3e28ef4d86c4e4c125037d06
[ "MIT" ]
null
null
null
verification/config.py
vinthedark/snet-marketplace-service
66ed9d093b00f09d3e28ef4d86c4e4c125037d06
[ "MIT" ]
null
null
null
NETWORK_ID = 0 NETWORKS = { 0: { "name": "test", "http_provider": "https://ropsten.infura.io", "ws_provider": "wss://ropsten.infura.io/ws", "db": { "DB_HOST": "localhost", "DB_USER": "unittest_root", "DB_PASSWORD": "unittest_pwd", "DB_N...
20.76
53
0.527938
NETWORK_ID = 0 NETWORKS = { 0: { "name": "test", "http_provider": "https://ropsten.infura.io", "ws_provider": "wss://ropsten.infura.io/ws", "db": { "DB_HOST": "localhost", "DB_USER": "unittest_root", "DB_PASSWORD": "unittest_pwd", "DB_N...
true
true
1c437a608b0328b405a63a31a1f68dc38ea065f4
1,462
py
Python
HW5/181041025/code/Question1.py
perihanmirkelam/CSE505_Algorithms
07f58c27e7869697c5fdadc6fa2fffbdd8f18c69
[ "Apache-2.0" ]
null
null
null
HW5/181041025/code/Question1.py
perihanmirkelam/CSE505_Algorithms
07f58c27e7869697c5fdadc6fa2fffbdd8f18c69
[ "Apache-2.0" ]
null
null
null
HW5/181041025/code/Question1.py
perihanmirkelam/CSE505_Algorithms
07f58c27e7869697c5fdadc6fa2fffbdd8f18c69
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # In[29]: def mergeSort(jobs): if len(jobs)>1: mid = len(jobs)//2 lefthalf = jobs[:mid] righthalf = jobs[mid:] mergeSort(lefthalf) mergeSort(righthalf) i=0 j=0 k=0 while i < len(lefthalf) and j < len(r...
20.885714
116
0.509576
def mergeSort(jobs): if len(jobs)>1: mid = len(jobs)//2 lefthalf = jobs[:mid] righthalf = jobs[mid:] mergeSort(lefthalf) mergeSort(righthalf) i=0 j=0 k=0 while i < len(lefthalf) and j < len(righthalf): if lefthalf[i][weight]/le...
true
true
1c437ba6984eef38fe6b7adf59af9db10fb5a08d
1,643
py
Python
testprograms/MainLarge.py
jchmrt/ev3dev2simulator
3a8968162d1658a82860a613caf9986c5428b124
[ "MIT" ]
2
2020-07-14T01:31:14.000Z
2021-02-22T19:14:12.000Z
testprograms/MainLarge.py
jchmrt/ev3dev2simulator
3a8968162d1658a82860a613caf9986c5428b124
[ "MIT" ]
19
2020-02-16T08:11:23.000Z
2020-12-10T10:06:36.000Z
testprograms/MainLarge.py
jchmrt/ev3dev2simulator
3a8968162d1658a82860a613caf9986c5428b124
[ "MIT" ]
10
2020-03-02T08:37:29.000Z
2022-03-06T03:49:07.000Z
#!/usr/bin/env python3 from time import sleep from ev3dev2._platform.ev3 import INPUT_1, INPUT_4, INPUT_2, OUTPUT_B from ev3dev2.led import Leds from ev3dev2.motor import MoveTank, OUTPUT_A, OUTPUT_D, SpeedPercent, MoveDifferential, MediumMotor from ev3dev2.sensor.lego import ColorSensor from ev3dev2.sensor.lego impor...
23.140845
99
0.734632
from time import sleep from ev3dev2._platform.ev3 import INPUT_1, INPUT_4, INPUT_2, OUTPUT_B from ev3dev2.led import Leds from ev3dev2.motor import MoveTank, OUTPUT_A, OUTPUT_D, SpeedPercent, MoveDifferential, MediumMotor from ev3dev2.sensor.lego import ColorSensor from ev3dev2.sensor.lego import TouchSensor from ev3d...
true
true
1c437be4b3a4e05e897a8c92ea9e144eef263140
3,122
py
Python
NiaPy/benchmarks/happyCat.py
lucijabrezocnik/NiaPy
1582d1af835c022c77224ea0234178a399efc106
[ "MIT" ]
null
null
null
NiaPy/benchmarks/happyCat.py
lucijabrezocnik/NiaPy
1582d1af835c022c77224ea0234178a399efc106
[ "MIT" ]
null
null
null
NiaPy/benchmarks/happyCat.py
lucijabrezocnik/NiaPy
1582d1af835c022c77224ea0234178a399efc106
[ "MIT" ]
1
2018-06-13T08:10:23.000Z
2018-06-13T08:10:23.000Z
# encoding=utf8 """Impementation of Happy Cat funtion.""" import math from NiaPy.benchmarks.benchmark import Benchmark __all__ = ['HappyCat'] class HappyCat(Benchmark): r"""Implementation of Happy cat function. Date: 2018 Author: Lucija Brezočnik License: MIT Function: **Happy cat function*...
31.22
143
0.516976
import math from NiaPy.benchmarks.benchmark import Benchmark __all__ = ['HappyCat'] class HappyCat(Benchmark): Name = ['HappyCat'] def __init__(self, Lower=-100.0, Upper=100.0): Benchmark.__init__(self, Lower, Upper) @staticmethod def latex_code(): return r'''$f(\mathbf{x}) = {\le...
true
true
1c437de91b99c2c41a0ee03cc7cec5424707557b
2,308
py
Python
skiptracer.py
EdwardDantes/skiptracer
7ed09b5a72e4a325d8d9fb76dd487ba4cbec00fb
[ "Apache-2.0" ]
912
2018-06-01T16:11:49.000Z
2022-03-31T11:16:07.000Z
skiptracer.py
EdwardDantes/skiptracer
7ed09b5a72e4a325d8d9fb76dd487ba4cbec00fb
[ "Apache-2.0" ]
56
2018-06-02T22:35:14.000Z
2021-12-13T19:48:17.000Z
skiptracer.py
EdwardDantes/skiptracer
7ed09b5a72e4a325d8d9fb76dd487ba4cbec00fb
[ "Apache-2.0" ]
210
2018-05-31T01:59:48.000Z
2022-03-12T04:54:46.000Z
# -*- coding: utf-8 -*- #!/usr/bin/env python from __future__ import print_function from plugins.menus import menus from plugins.banner import Logo import sys import signal try: import __builtin__ as bi except BaseException: import builtins as bi import ast from plugins.colors import BodyColors as bc def sig...
29.21519
91
0.403813
from __future__ import print_function from plugins.menus import menus from plugins.banner import Logo import sys import signal try: import __builtin__ as bi except BaseException: import builtins as bi import ast from plugins.colors import BodyColors as bc def signal_handler(signal, frame): print("") ...
true
true
1c437eb70c6b093c670682aeef35f268915bba86
1,093
py
Python
python/cuml/common/timing_utils.py
garanews/cuml
318f521a1d2681f4622a44921d27b5f592fe4407
[ "Apache-2.0" ]
2,743
2018-10-11T17:28:58.000Z
2022-03-31T19:20:50.000Z
python/cuml/common/timing_utils.py
garanews/cuml
318f521a1d2681f4622a44921d27b5f592fe4407
[ "Apache-2.0" ]
4,280
2018-10-11T22:29:57.000Z
2022-03-31T22:02:44.000Z
python/cuml/common/timing_utils.py
garanews/cuml
318f521a1d2681f4622a44921d27b5f592fe4407
[ "Apache-2.0" ]
454
2018-10-11T17:40:56.000Z
2022-03-25T17:07:09.000Z
# # Copyright (c) 2020, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
24.288889
74
0.656908
import time from contextlib import contextmanager @contextmanager def timed(name): t0 = time.time() yield t1 = time.time() print("..%-24s: %8.4f" % (name, t1 - t0))
true
true
1c437ee24f843523d90bf668b10ab64b5712089c
6,624
py
Python
tools/third_party/h2/h2/config.py
meyerweb/wpt
f04261533819893c71289614c03434c06856c13e
[ "BSD-3-Clause" ]
14,668
2015-01-01T01:57:10.000Z
2022-03-31T23:33:32.000Z
tools/third_party/h2/h2/config.py
meyerweb/wpt
f04261533819893c71289614c03434c06856c13e
[ "BSD-3-Clause" ]
7,642
2018-05-28T09:38:03.000Z
2022-03-31T20:55:48.000Z
tools/third_party/h2/h2/config.py
meyerweb/wpt
f04261533819893c71289614c03434c06856c13e
[ "BSD-3-Clause" ]
5,941
2015-01-02T11:32:21.000Z
2022-03-31T16:35:46.000Z
# -*- coding: utf-8 -*- """ h2/config ~~~~~~~~~ Objects for controlling the configuration of the HTTP/2 stack. """ class _BooleanConfigOption(object): """ Descriptor for handling a boolean config option. This will block attempts to set boolean config options to non-bools. """ def __init__(self, ...
38.736842
79
0.677083
class _BooleanConfigOption(object): def __init__(self, name): self.name = name self.attr_name = '_%s' % self.name def __get__(self, instance, owner): return getattr(instance, self.attr_name) def __set__(self, instance, value): if not isinstance(value, bool): r...
true
true
1c437fe59fd92943c7f968764ae61bfd0c5db224
119
py
Python
mybrowser/session/__init__.py
joeledwardson/betfair-browser
b641f134e60307250a0e51bafa849422ecf5264b
[ "MIT" ]
3
2021-11-23T19:03:02.000Z
2021-11-24T08:44:23.000Z
mybrowser/session/__init__.py
joeledwardson/betfair-browser
b641f134e60307250a0e51bafa849422ecf5264b
[ "MIT" ]
2
2021-11-23T18:47:31.000Z
2021-12-08T15:36:11.000Z
mybrowser/session/__init__.py
joeledwardson/betfair-browser
b641f134e60307250a0e51bafa849422ecf5264b
[ "MIT" ]
null
null
null
from .session import Session, LoadedMarket from .notifications import NotificationType, Notification, post_notification
59.5
76
0.87395
from .session import Session, LoadedMarket from .notifications import NotificationType, Notification, post_notification
true
true
1c4380ab2ee431b04f09eea7954a8d0ac2abc23c
4,264
py
Python
tests/h/nipsa/worker_test.py
project-star/h
fd1decafdce981b681ef3bd59e001b1284498dae
[ "MIT" ]
1
2017-06-16T14:01:28.000Z
2017-06-16T14:01:28.000Z
tests/h/nipsa/worker_test.py
project-star/h
fd1decafdce981b681ef3bd59e001b1284498dae
[ "MIT" ]
null
null
null
tests/h/nipsa/worker_test.py
project-star/h
fd1decafdce981b681ef3bd59e001b1284498dae
[ "MIT" ]
1
2020-02-16T08:04:56.000Z
2020-02-16T08:04:56.000Z
# -*- coding: utf-8 -*- import mock from h.nipsa import worker def test_add_nipsa_action(): action = worker.add_nipsa_action("foo", {"_id": "test_id"}) assert action == { "_op_type": "update", "_index": "foo", "_type": "annotation", "_id": "test_id", "doc": {"nipsa": ...
36.758621
84
0.594512
import mock from h.nipsa import worker def test_add_nipsa_action(): action = worker.add_nipsa_action("foo", {"_id": "test_id"}) assert action == { "_op_type": "update", "_index": "foo", "_type": "annotation", "_id": "test_id", "doc": {"nipsa": True} } def test_r...
true
true
1c4380b7b5eed26f0ed5dae4702e6fb59ca6da6e
27,145
py
Python
general_util/utils.py
alibaba/Retrieval-based-Pre-training-for-Machine-Reading-Comprehension
b27dc55446a29a53af7fffdad8628ccb545420da
[ "Apache-2.0" ]
7
2021-06-16T01:40:23.000Z
2021-12-04T02:40:35.000Z
general_util/utils.py
SparkJiao/Retrieval-based-Pre-training-for-Machine-Reading-Comprehension
9ccad31bd0bf2216004cf729d1d511fc3e0b77c9
[ "Apache-2.0" ]
1
2021-08-16T09:10:05.000Z
2021-08-25T08:44:44.000Z
general_util/utils.py
SparkJiao/Retrieval-based-Pre-training-for-Machine-Reading-Comprehension
9ccad31bd0bf2216004cf729d1d511fc3e0b77c9
[ "Apache-2.0" ]
3
2021-09-13T02:03:37.000Z
2021-10-11T18:48:21.000Z
import collections import json import math import random import re import string import torch from collections import Counter from torch.nn.functional import softmax from typing import List, Callable, Tuple, Any, Optional try: from pytorch_pretrained_bert.tokenization import BasicTokenizer except Impo...
38.178622
121
0.605121
import collections import json import math import random import re import string import torch from collections import Counter from torch.nn.functional import softmax from typing import List, Callable, Tuple, Any, Optional try: from pytorch_pretrained_bert.tokenization import BasicTokenizer except Impo...
true
true
1c4382d435c7991b40ab8ee733f83b4502d0fea7
826
py
Python
src/pyams_zmi/zmi/breadcrumb.py
Py-AMS/pyams-zmi
0073d12062728efad3dc2b5cb40b0f75eacaaa1d
[ "ZPL-2.1" ]
null
null
null
src/pyams_zmi/zmi/breadcrumb.py
Py-AMS/pyams-zmi
0073d12062728efad3dc2b5cb40b0f75eacaaa1d
[ "ZPL-2.1" ]
null
null
null
src/pyams_zmi/zmi/breadcrumb.py
Py-AMS/pyams-zmi
0073d12062728efad3dc2b5cb40b0f75eacaaa1d
[ "ZPL-2.1" ]
null
null
null
# # Copyright (c) 2015-2021 Thierry Florac <tflorac AT ulthar.net> # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRAN...
30.592593
75
0.773608
from pyams_skin.viewlet.breadcrumb import BreadcrumbsAdapter from pyams_template.template import override_template from pyams_zmi.interfaces import IAdminLayer __docformat__ = 'restructuredtext' override_template(BreadcrumbsAdapter, template='templates/breadcrumbs.pt', layer=IAdminLayer)
true
true
1c4382e3404c092cad820cea3891d6a1328a1167
7,167
py
Python
py/test/pytests/retrieve_config.py
arccode/factory
a1b0fccd68987d8cd9c89710adc3c04b868347ec
[ "BSD-3-Clause" ]
3
2022-01-06T16:52:52.000Z
2022-03-07T11:30:47.000Z
py/test/pytests/retrieve_config.py
arccode/factory
a1b0fccd68987d8cd9c89710adc3c04b868347ec
[ "BSD-3-Clause" ]
null
null
null
py/test/pytests/retrieve_config.py
arccode/factory
a1b0fccd68987d8cd9c89710adc3c04b868347ec
[ "BSD-3-Clause" ]
1
2021-10-24T01:47:22.000Z
2021-10-24T01:47:22.000Z
# Copyright 2017 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Retrieve JSON config file from either an USB stick or a factory server. Description ----------- This pytest retrieves the config file from a specified...
32.876147
80
0.686759
import logging import os import threading import time import unittest from cros.factory.test import session from cros.factory.test import server_proxy from cros.factory.test.utils import media_utils from cros.factory.utils.arg_utils import Arg from cros.factory.utils import config_utils from cros.factory.utils impo...
true
true
1c4382f85f3e76b494e4c372dd40b1ac3840e519
6,850
py
Python
runner_predict_proba.py
dmitryrubtsov/Predictions-of-calls-in-Moscow-Megafon
260bb49e859694d6a7c0dfb8cb13cd39d05ed597
[ "MIT" ]
null
null
null
runner_predict_proba.py
dmitryrubtsov/Predictions-of-calls-in-Moscow-Megafon
260bb49e859694d6a7c0dfb8cb13cd39d05ed597
[ "MIT" ]
null
null
null
runner_predict_proba.py
dmitryrubtsov/Predictions-of-calls-in-Moscow-Megafon
260bb49e859694d6a7c0dfb8cb13cd39d05ed597
[ "MIT" ]
null
null
null
import os import pickle import time import pandas as pd from sklearn.base import BaseEstimator, TransformerMixin class ColumnSelector(BaseEstimator, TransformerMixin): def __init__(self, columns): self.columns = columns def fit(self, X, y=None): return self def transform(self, X): ...
37.845304
120
0.554745
import os import pickle import time import pandas as pd from sklearn.base import BaseEstimator, TransformerMixin class ColumnSelector(BaseEstimator, TransformerMixin): def __init__(self, columns): self.columns = columns def fit(self, X, y=None): return self def transform(self, X): ...
true
true
1c438431f1b367fc3e91a7be45c76305d48a8771
12,873
py
Python
userbot/modules/pmpermit.py
matesa/userbot
a071f58245ebdfbeec3ce93c53e75ca4d1f64b53
[ "Naumen", "Condor-1.1", "MS-PL" ]
2
2020-01-18T18:55:28.000Z
2021-05-08T19:15:32.000Z
userbot/modules/pmpermit.py
matesa/userbot
a071f58245ebdfbeec3ce93c53e75ca4d1f64b53
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
userbot/modules/pmpermit.py
matesa/userbot
a071f58245ebdfbeec3ce93c53e75ca4d1f64b53
[ "Naumen", "Condor-1.1", "MS-PL" ]
19
2019-06-07T07:13:41.000Z
2021-07-09T17:34:57.000Z
# Copyright (C) 2019 The Raphielscape Company LLC. # # Licensed under the Raphielscape Public License, Version 1.b (the "License"); # you may not use this file except in compliance with the License. # """ Userbot module for keeping control who PM you. """ from telethon.tl.functions.contacts import BlockRequest, Unblo...
41.392283
129
0.550843
from telethon.tl.functions.contacts import BlockRequest, UnblockRequest from telethon.tl.functions.messages import ReportSpamRequest from telethon.tl.functions.users import GetFullUserRequest from telethon.tl.types import User from sqlalchemy.exc import IntegrityError from userbot import (COUNT_PM, CMD_HELP, BOTLOG,...
true
true
1c4384413ad1249c86287e57bc04b52f1efeeba4
716
py
Python
apps/healthcare/covid/onprem/pipelines/covid-visualization/visualization.py
Karthik-Git-Sudo786/cisco-kubeflow-starter-pack
49013953c0cf0de508bb05f1837809d84e6ea2d2
[ "Apache-2.0" ]
60
2020-03-20T08:05:32.000Z
2021-12-17T14:07:53.000Z
apps/healthcare/covid/onprem/pipelines/covid-visualization/visualization.py
Karthik-Git-Sudo786/cisco-kubeflow-starter-pack
49013953c0cf0de508bb05f1837809d84e6ea2d2
[ "Apache-2.0" ]
84
2020-03-18T07:06:20.000Z
2021-03-02T13:29:20.000Z
apps/healthcare/covid/onprem/pipelines/covid-visualization/visualization.py
Karthik-Git-Sudo786/cisco-kubeflow-starter-pack
49013953c0cf0de508bb05f1837809d84e6ea2d2
[ "Apache-2.0" ]
90
2020-03-17T11:54:05.000Z
2021-06-03T09:18:58.000Z
# Python script to visualise the predicted number of cases in India import matplotlib.pyplot as plt from pandas import read_csv train_df = read_csv(source + '/train_df.csv') predict_df = read_csv(source + '/predict_df.csv') country = "India" target = "ConfirmedCases" region_train_df = train_df[(train_df["Country_Re...
25.571429
71
0.698324
import matplotlib.pyplot as plt from pandas import read_csv train_df = read_csv(source + '/train_df.csv') predict_df = read_csv(source + '/predict_df.csv') country = "India" target = "ConfirmedCases" region_train_df = train_df[(train_df["Country_Region"]==country)] region_predict_df = predict_df[(predict_df["Countr...
true
true
1c4385826a2413c60ee4f12a8e6fc18bc2a4bfb0
5,308
py
Python
scripts/MakeSingleHeader.py
carand/CLI11
438eabe5f8d91a3f12ce6c53afd1236b990798ae
[ "BSD-3-Clause" ]
1
2020-09-18T21:24:26.000Z
2020-09-18T21:24:26.000Z
scripts/MakeSingleHeader.py
carand/CLI11
438eabe5f8d91a3f12ce6c53afd1236b990798ae
[ "BSD-3-Clause" ]
2
2020-10-31T02:25:09.000Z
2021-03-07T01:48:46.000Z
scripts/MakeSingleHeader.py
carand/CLI11
438eabe5f8d91a3f12ce6c53afd1236b990798ae
[ "BSD-3-Clause" ]
1
2021-10-21T16:58:01.000Z
2021-10-21T16:58:01.000Z
#!/usr/bin/env python from __future__ import print_function, unicode_literals import os import re from argparse import ArgumentParser from operator import add from copy import copy from functools import reduce from subprocess import Popen, PIPE includes_local = re.compile(r"""^#include "(.*)"$""", re.MULTILINE) incl...
30.159091
131
0.620196
from __future__ import print_function, unicode_literals import os import re from argparse import ArgumentParser from operator import add from copy import copy from functools import reduce from subprocess import Popen, PIPE includes_local = re.compile(r"""^#include "(.*)"$""", re.MULTILINE) includes_system = re.compi...
true
true
1c4385b696021fae2a33d7691ec3ff865c96ff2a
3,156
py
Python
apps/habitss/tests.py
KolevDarko/lifehq
88d92f5fe76f2fb6511f2a892e096d95a69985d8
[ "MIT" ]
null
null
null
apps/habitss/tests.py
KolevDarko/lifehq
88d92f5fe76f2fb6511f2a892e096d95a69985d8
[ "MIT" ]
null
null
null
apps/habitss/tests.py
KolevDarko/lifehq
88d92f5fe76f2fb6511f2a892e096d95a69985d8
[ "MIT" ]
null
null
null
from datetime import datetime from account.models import Account from dateutil.parser import parser, parse from django.test import TestCase from django_common.auth_backends import User from apps.base.models import Profile from apps.habitss.models import HabitAction, Habit from apps.habitss.views import HabitStruct ...
36.275862
85
0.679658
from datetime import datetime from account.models import Account from dateutil.parser import parser, parse from django.test import TestCase from django_common.auth_backends import User from apps.base.models import Profile from apps.habitss.models import HabitAction, Habit from apps.habitss.views import HabitStruct ...
true
true
1c43867a03288dc0c1f3a51949b75193edc66308
3,558
py
Python
thorpy/elements/pressable.py
YannThorimbert/ThorPy-1.0
2855491e7d5016e9cbefb71784d169bb57cf8c73
[ "MIT" ]
null
null
null
thorpy/elements/pressable.py
YannThorimbert/ThorPy-1.0
2855491e7d5016e9cbefb71784d169bb57cf8c73
[ "MIT" ]
null
null
null
thorpy/elements/pressable.py
YannThorimbert/ThorPy-1.0
2855491e7d5016e9cbefb71784d169bb57cf8c73
[ "MIT" ]
null
null
null
from copy import copy from pygame.event import Event, post from thorpy.elements.element import Element from thorpy.miscgui.state import State from thorpy.miscgui.reaction import Reaction from thorpy.miscgui.initializer import init_params from thorpy.miscgui import constants, parameters, style, painterstyle class Pre...
37.851064
82
0.642496
from copy import copy from pygame.event import Event, post from thorpy.elements.element import Element from thorpy.miscgui.state import State from thorpy.miscgui.reaction import Reaction from thorpy.miscgui.initializer import init_params from thorpy.miscgui import constants, parameters, style, painterstyle class Pre...
true
true
1c43882de9d66e798e357004b8fcaf92f64aca83
1,357
py
Python
psych_metric/datasets/crowd_layer/convert_txt_to_csv_ner.py
prijatelj/bayesian_eval_ground_truth-free
c0e569c78d63beb79f5e1e727c322293c3584323
[ "MIT" ]
1
2021-12-26T05:55:46.000Z
2021-12-26T05:55:46.000Z
psych_metric/datasets/crowd_layer/convert_txt_to_csv_ner.py
prijatelj/bayesian_eval_ground_truth-free
c0e569c78d63beb79f5e1e727c322293c3584323
[ "MIT" ]
null
null
null
psych_metric/datasets/crowd_layer/convert_txt_to_csv_ner.py
prijatelj/bayesian_eval_ground_truth-free
c0e569c78d63beb79f5e1e727c322293c3584323
[ "MIT" ]
null
null
null
"""Converts given data txt file into a more parsable formatted csv. """ import argparse import numpy as np import pandas as pd def parse_args(): parser = argparse.ArgumentParser(description='Convert the given ner-mturk txt file into an easier to parse csv file.') parser.add_argument('input_file', help='Enter...
29.5
122
0.642594
import argparse import numpy as np import pandas as pd def parse_args(): parser = argparse.ArgumentParser(description='Convert the given ner-mturk txt file into an easier to parse csv file.') parser.add_argument('input_file', help='Enter the file path to the csv of author names') parser.add_argument('ou...
true
true
1c438865c8ad14c6278e6e11a08d3a7128f77ab8
3,441
py
Python
sample.py
tsudalab/rxngenerator
6f459828c03485926adb390e5bfbd4a6d91de30b
[ "MIT" ]
8
2022-01-04T09:36:32.000Z
2022-03-03T22:35:53.000Z
sample.py
tsudalab/rxngenerator
6f459828c03485926adb390e5bfbd4a6d91de30b
[ "MIT" ]
null
null
null
sample.py
tsudalab/rxngenerator
6f459828c03485926adb390e5bfbd4a6d91de30b
[ "MIT" ]
1
2021-12-17T19:17:44.000Z
2021-12-17T19:17:44.000Z
import sys sys.path.append('./rxnft_vae') import torch import torch.nn as nn import torch.optim as optim import torch.optim.lr_scheduler as lr_scheduler from torch.utils.data import DataLoader from torch.autograd import Variable import math, random, sys from optparse import OptionParser from collections import deque ...
33.086538
163
0.779134
import sys sys.path.append('./rxnft_vae') import torch import torch.nn as nn import torch.optim as optim import torch.optim.lr_scheduler as lr_scheduler from torch.utils.data import DataLoader from torch.autograd import Variable import math, random, sys from optparse import OptionParser from collections import deque ...
true
true
1c43887a8bfb3ccc2eae3cbec1b04d408745a2bf
4,850
py
Python
cloudmersive_validate_api_client/models/validate_identifier_response.py
doc22940/cloudmersive.apiclient.python
8646291f45ebd7c6572a296e30f693693a6782c4
[ "Apache-2.0" ]
3
2018-06-23T21:37:21.000Z
2020-04-20T23:07:36.000Z
cloudmersive_validate_api_client/models/validate_identifier_response.py
doc22940/cloudmersive.apiclient.python
8646291f45ebd7c6572a296e30f693693a6782c4
[ "Apache-2.0" ]
1
2019-02-04T17:03:35.000Z
2019-03-02T20:16:52.000Z
cloudmersive_validate_api_client/models/validate_identifier_response.py
doc22940/cloudmersive.apiclient.python
8646291f45ebd7c6572a296e30f693693a6782c4
[ "Apache-2.0" ]
2
2019-03-21T15:54:15.000Z
2020-05-27T17:30:43.000Z
# coding: utf-8 """ validateapi The validation APIs help you validate data. Check if an E-mail address is real. Check if a domain is real. Check up on an IP address, and even where it is located. All this and much more is available in the validation API. # noqa: E501 OpenAPI spec version: v1 Ge...
33.219178
274
0.610722
import pprint import re import six class ValidateIdentifierResponse(object): swagger_types = { 'valid_identifier': 'bool', 'error': 'str' } attribute_map = { 'valid_identifier': 'ValidIdentifier', 'error': 'Error' } def __init__(self, valid_identifier=None, ...
true
true
1c4388d2d89af63f50ad952bd629f48f9511c161
8,306
py
Python
beacon_controller/controllers/concepts_controller.py
NCATS-Tangerine/rhea-beacon
ccf6e790dc4c26eb4853b1bcb78382b84fbfe238
[ "MIT" ]
null
null
null
beacon_controller/controllers/concepts_controller.py
NCATS-Tangerine/rhea-beacon
ccf6e790dc4c26eb4853b1bcb78382b84fbfe238
[ "MIT" ]
10
2018-08-18T03:13:08.000Z
2019-02-05T20:04:15.000Z
beacon_controller/controllers/concepts_controller.py
NCATS-Tangerine/rhea-beacon
ccf6e790dc4c26eb4853b1bcb78382b84fbfe238
[ "MIT" ]
null
null
null
from swagger_server.models.beacon_concept import BeaconConcept # noqa: E501 from swagger_server.models.beacon_concept_with_details import BeaconConceptWithDetails # noqa: E501 from swagger_server.models.beacon_concept_detail import BeaconConceptDetail from swagger_server.models.exact_match_response import ExactMatchR...
43.260417
871
0.639658
from swagger_server.models.beacon_concept import BeaconConcept from swagger_server.models.beacon_concept_with_details import BeaconConceptWithDetails from swagger_server.models.beacon_concept_detail import BeaconConceptDetail from swagger_server.models.exact_match_response import ExactMatchResponse from beacon_cont...
true
true
1c4389e92f7dcdefa6efc1d49c0fa7f9f02146b9
1,542
py
Python
team_9/cocos/test/test_shattered_tiles_3d.py
Donnyvdm/dojo19
3cf043a84e3ad6d3c4d59cd9c50b160e1ff03400
[ "BSD-3-Clause" ]
1
2019-09-15T18:59:49.000Z
2019-09-15T18:59:49.000Z
team_9/cocos/test/test_shattered_tiles_3d.py
Donnyvdm/dojo19
3cf043a84e3ad6d3c4d59cd9c50b160e1ff03400
[ "BSD-3-Clause" ]
null
null
null
team_9/cocos/test/test_shattered_tiles_3d.py
Donnyvdm/dojo19
3cf043a84e3ad6d3c4d59cd9c50b160e1ff03400
[ "BSD-3-Clause" ]
null
null
null
from __future__ import division, print_function, unicode_literals # This code is so you can run the samples without installing the package import sys import os sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) # testinfo = "t 0.1, s, t 2, s, t 5.1, s, q" tags = "ShatteredTiles3D" import pyglet import...
28.036364
74
0.702983
from __future__ import division, print_function, unicode_literals import sys import os sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) testinfo = "t 0.1, s, t 2, s, t 5.1, s, q" tags = "ShatteredTiles3D" import pyglet import cocos from cocos.director import director from cocos.actions import * from...
true
true
1c438aa0f087f05df0285155d7d372207cc59f58
913
py
Python
src/python/miplearn/__init__.py
bknueven/MIPLearn
43225681cb87ba5bcd699f409aa9b10225f9da2d
[ "BSD-3-Clause" ]
1
2020-06-16T15:38:48.000Z
2020-06-16T15:38:48.000Z
src/python/miplearn/__init__.py
bknueven/MIPLearn
43225681cb87ba5bcd699f409aa9b10225f9da2d
[ "BSD-3-Clause" ]
null
null
null
src/python/miplearn/__init__.py
bknueven/MIPLearn
43225681cb87ba5bcd699f409aa9b10225f9da2d
[ "BSD-3-Clause" ]
null
null
null
# MIPLearn: Extensible Framework for Learning-Enhanced Mixed-Integer Optimization # Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved. # Released under the modified BSD license. See COPYING.md for more details. from .extractors import (SolutionExtractor, InstanceFeaturesExtract...
45.65
82
0.696605
from .extractors import (SolutionExtractor, InstanceFeaturesExtractor, ObjectiveValueExtractor, VariableFeaturesExtractor, ) from .components.component import Component from .components.objective import ObjectiveValueCom...
true
true
1c438ab0698c65a5de0b059062da1bf1ff546e58
7,391
py
Python
lib/ls_dataset/d3m_dataset.py
stevencdang/AutoML-DS-Components
b0490262d3db5307c37f82c92e25cd938dd3a242
[ "Apache-2.0" ]
null
null
null
lib/ls_dataset/d3m_dataset.py
stevencdang/AutoML-DS-Components
b0490262d3db5307c37f82c92e25cd938dd3a242
[ "Apache-2.0" ]
8
2020-09-04T17:39:26.000Z
2022-03-02T03:28:38.000Z
lib/ls_dataset/d3m_dataset.py
stevencdang/AutoML-DS-Components
b0490262d3db5307c37f82c92e25cd938dd3a242
[ "Apache-2.0" ]
null
null
null
# Author: Steven C. Dang # Class encapsulating operations on a remote d3m dataset import logging import os.path as path import os from io import IOBase import json import csv import pandas as pd from ls_dataset.ls_dataset import LSDataset from ls_dataset.dsr_table import DSRTable from ls_dataset.dsr_factory import ...
34.699531
109
0.56677
import logging import os.path as path import os from io import IOBase import json import csv import pandas as pd from ls_dataset.ls_dataset import LSDataset from ls_dataset.dsr_table import DSRTable from ls_dataset.dsr_factory import DatasetResourceFactory logger = logging.getLogger(__name__) class D3MDataset(LSD...
true
true
1c438abc7906ec59abae2c735dd5b01a8b172294
2,358
py
Python
effects/game-of-life/rle2png.py
Kristopher38/demoscene
a9909597ed142ad92e0fd2968f8976c8f5db1657
[ "Artistic-2.0" ]
null
null
null
effects/game-of-life/rle2png.py
Kristopher38/demoscene
a9909597ed142ad92e0fd2968f8976c8f5db1657
[ "Artistic-2.0" ]
null
null
null
effects/game-of-life/rle2png.py
Kristopher38/demoscene
a9909597ed142ad92e0fd2968f8976c8f5db1657
[ "Artistic-2.0" ]
null
null
null
#!/usr/bin/env python3 from sys import argv from PIL import Image import re import argparse header_pattern = re.compile( r'x\s*=\s*(\d+)\s*,\s*y\s*=\s*(\d+)(?:\s*,\s*rule\s*=\s*(\w+\/\w+)\s*)*' ) rle_pattern = re.compile(r'(\d*)(o|b|\$)') rotate_transforms = { 90: Image.ROTATE_90, 180: Image.ROTATE_180, ...
29.848101
76
0.502969
from sys import argv from PIL import Image import re import argparse header_pattern = re.compile( r'x\s*=\s*(\d+)\s*,\s*y\s*=\s*(\d+)(?:\s*,\s*rule\s*=\s*(\w+\/\w+)\s*)*' ) rle_pattern = re.compile(r'(\d*)(o|b|\$)') rotate_transforms = { 90: Image.ROTATE_90, 180: Image.ROTATE_180, 270: Image.ROTATE_2...
true
true
1c438ba5c7df53e8035695eedf765a3fdd0e338e
2,243
py
Python
rapm_prior/download_stats_nba_data.py
airalcorn2/NBA_Tutorials
85179300864d2c97a727a7b2a5ee46d250bdac20
[ "MIT" ]
123
2019-01-02T20:51:19.000Z
2022-03-16T23:37:17.000Z
rapm_prior/download_stats_nba_data.py
nicholasrios/NBA_Tutorials
85179300864d2c97a727a7b2a5ee46d250bdac20
[ "MIT" ]
8
2019-07-31T14:32:46.000Z
2022-02-14T00:16:15.000Z
rapm_prior/download_stats_nba_data.py
nicholasrios/NBA_Tutorials
85179300864d2c97a727a7b2a5ee46d250bdac20
[ "MIT" ]
38
2019-05-15T23:26:16.000Z
2022-01-03T05:35:13.000Z
import json import pandas as pd import urllib3 pd.set_option('display.max_columns', 500) pd.set_option('display.width', 1000) header_data = { 'Host': 'stats.nba.com', 'Connection': 'keep-alive', 'Cache-Control': 'max-age=0', 'Upgrade-Insecure-Requests': '1', 'User-Agent': 'Mozilla/5.0 (Macintosh;...
48.76087
502
0.664735
import json import pandas as pd import urllib3 pd.set_option('display.max_columns', 500) pd.set_option('display.width', 1000) header_data = { 'Host': 'stats.nba.com', 'Connection': 'keep-alive', 'Cache-Control': 'max-age=0', 'Upgrade-Insecure-Requests': '1', 'User-Agent': 'Mozilla/5.0 (Macintosh;...
true
true
1c438c1bf0fc289020d2aef076f6dd54765a738f
1,016
py
Python
apprest/management/commands/insert_user.py
dsanchez-cells/calipsoplus-backend
7eaa6904ec59d88052644b31041b92ee20e54354
[ "MIT" ]
4
2018-12-04T15:08:27.000Z
2019-04-11T09:49:41.000Z
apprest/management/commands/insert_user.py
dsanchez-cells/calipsoplus-backend
7eaa6904ec59d88052644b31041b92ee20e54354
[ "MIT" ]
63
2018-11-22T13:07:56.000Z
2021-06-10T20:55:58.000Z
apprest/management/commands/insert_user.py
dsanchez-cells/calipsoplus-backend
7eaa6904ec59d88052644b31041b92ee20e54354
[ "MIT" ]
10
2018-11-23T08:17:28.000Z
2022-01-15T23:41:59.000Z
from django.contrib.auth.models import User from django.core.management.base import BaseCommand, CommandError from apprest.services.experiment import CalipsoExperimentsServices class Command(BaseCommand): help = 'Insert new user' experiments_services = CalipsoExperimentsServices() def add_arguments(self,...
36.285714
103
0.675197
from django.contrib.auth.models import User from django.core.management.base import BaseCommand, CommandError from apprest.services.experiment import CalipsoExperimentsServices class Command(BaseCommand): help = 'Insert new user' experiments_services = CalipsoExperimentsServices() def add_arguments(self,...
true
true
1c438c84d51ba5ee38e7953290216d463f2c40f8
744
py
Python
ginpar/utils/strings.py
davidomarf/ginpar
cee1676ba2280d09f43a52f5145b28388b8e1152
[ "MIT" ]
12
2019-10-19T15:35:54.000Z
2021-01-18T00:15:10.000Z
ginpar/utils/strings.py
davidomarf/ginpar
cee1676ba2280d09f43a52f5145b28388b8e1152
[ "MIT" ]
19
2019-10-06T22:10:23.000Z
2019-11-08T17:53:16.000Z
ginpar/utils/strings.py
davidomarf/ginpar
cee1676ba2280d09f43a52f5145b28388b8e1152
[ "MIT" ]
null
null
null
"""String filters to convert between cases. The list of filters in here are added to the Jinja2 environment, so they may come handy when designing a custom theme. """ def unkebab(s): """Replace dashes with spaces. Parameters ---------- s : str String that may contain "-" characters. """ ...
19.076923
76
0.577957
def unkebab(s): return " ".join(s.split("-")) def space_to_kebab(s): return "-".join(s.split(" ")) def camel_to_space(s): return " ".join(s.split("_"))
true
true
1c438e8445a5ef1fa4671cd7454ca72b222337f0
7,551
bzl
Python
haskell/private/actions/package.bzl
ghuntley/rules_haskell
adc3503387fbb54173dc4b4f21ae0aefe33759a4
[ "Apache-2.0" ]
null
null
null
haskell/private/actions/package.bzl
ghuntley/rules_haskell
adc3503387fbb54173dc4b4f21ae0aefe33759a4
[ "Apache-2.0" ]
null
null
null
haskell/private/actions/package.bzl
ghuntley/rules_haskell
adc3503387fbb54173dc4b4f21ae0aefe33759a4
[ "Apache-2.0" ]
null
null
null
"""Action for creating packages and registering them with ghc-pkg""" load("@bazel_skylib//lib:paths.bzl", "paths") load(":private/path_utils.bzl", "target_unique_name") load(":private/pkg_id.bzl", "pkg_id") load(":private/set.bzl", "set") load(":private/path_utils.bzl", "get_lib_name") def _get_extra_libraries(dep_in...
35.78673
95
0.610118
load("@bazel_skylib//lib:paths.bzl", "paths") load(":private/path_utils.bzl", "target_unique_name") load(":private/pkg_id.bzl", "pkg_id") load(":private/set.bzl", "set") load(":private/path_utils.bzl", "get_lib_name") def _get_extra_libraries(dep_info): cc_libs = dep_info.cc_dependencies.dynamic_linking.libraries...
true
true
1c438f9a008ee3db85c82e845472932de6e679c6
2,660
py
Python
bin/distribution_test.py
astrolabsoftware/fink-source
9003e933e1d8c3f03b70c2b277638de97be102ec
[ "Apache-2.0" ]
17
2019-03-08T12:37:06.000Z
2022-02-01T18:02:07.000Z
bin/distribution_test.py
astrolabsoftware/fink-source
9003e933e1d8c3f03b70c2b277638de97be102ec
[ "Apache-2.0" ]
559
2019-03-07T14:55:27.000Z
2022-03-11T20:13:12.000Z
bin/distribution_test.py
tallamjr/fink-broker
97753ff695b78ea52d084cac787dec6c52c4e4cc
[ "Apache-2.0" ]
12
2019-03-08T13:04:38.000Z
2022-01-23T22:22:50.000Z
#!/usr/bin/env python # Copyright 2019-2021 AstroLab Software # Author: Abhishek Chauhan # # 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 # #...
31.666667
77
0.721805
import argparse import time from fink_broker.parser import getargs from fink_broker.sparkUtils import init_sparksession from fink_broker.distributionUtils import decode_kafka_df from fink_broker.loggingUtils import get_fink_logger, inspect_application def main(): parser = argparse.ArgumentParser(description=__...
true
true
1c4391152fe7b0959e118d2e075b3b8ec564cb67
808
py
Python
examples/tellurium-files/phrasedml/case_06.py
kirichoi/tellurium
77cf6e794600587741ebe209644a78051e0db1d5
[ "Apache-2.0" ]
73
2016-06-13T12:44:28.000Z
2021-12-31T14:44:39.000Z
examples/tellurium-files/phrasedml/case_06.py
kirichoi/tellurium
77cf6e794600587741ebe209644a78051e0db1d5
[ "Apache-2.0" ]
461
2015-03-26T00:05:16.000Z
2022-03-16T17:24:35.000Z
examples/tellurium-files/phrasedml/case_06.py
kirichoi/tellurium
77cf6e794600587741ebe209644a78051e0db1d5
[ "Apache-2.0" ]
30
2016-01-18T16:50:54.000Z
2021-07-06T09:29:53.000Z
""" Coupled ranges. Two ranges with one of the ranges being master range, the other following in lock. """ import os from tellurium.sedml.utils import run_case a_str = ''' model case_06() J0: S1 -> S2; k1*S1-k2*S2 S1 = 10.0; S2 = 0.0; k1 = 0.5; k2=0.4 end ''' p_str = ''' mod1 = model "case_06" sim1 = simulat...
28.857143
82
0.680693
import os from tellurium.sedml.utils import run_case a_str = ''' model case_06() J0: S1 -> S2; k1*S1-k2*S2 S1 = 10.0; S2 = 0.0; k1 = 0.5; k2=0.4 end ''' p_str = ''' mod1 = model "case_06" sim1 = simulate uniform(0, 10, 100) task1 = run sim1 on mod1 repeat1 = repeat task1 for S1 in [1, 3, 5], S2 in unifor...
true
true
1c43915857abc3fd17112f0c842caca40adcc78b
4,345
py
Python
truvo/test/test_nuvo.py
mjr9804/truvo
e3f52833e534e8ace7eb82f2091045df269eeb72
[ "MIT" ]
null
null
null
truvo/test/test_nuvo.py
mjr9804/truvo
e3f52833e534e8ace7eb82f2091045df269eeb72
[ "MIT" ]
null
null
null
truvo/test/test_nuvo.py
mjr9804/truvo
e3f52833e534e8ace7eb82f2091045df269eeb72
[ "MIT" ]
null
null
null
""" Tests for nuvo.py """ #pylint: disable=arguments-differ,missing-class-docstring,missing-function-docstring #pylint: disable=protected-access import json from unittest import TestCase from unittest.mock import patch from truvo import nuvo class TestNuvo(TestCase): @patch('socket.create_connection') @patch...
43.019802
99
0.636364
import json from unittest import TestCase from unittest.mock import patch from truvo import nuvo class TestNuvo(TestCase): @patch('socket.create_connection') @patch('socket.gethostbyname') def setUp(self, mock_gethost, mock_create): self.mock_gethost = mock_gethost self.mock_gethost.retur...
true
true
1c4392f528ec2231722f92fe93550d8115cbc3e8
9,158
py
Python
test/data_processing/test_nodes.py
coruscating/qiskit-experiments
dac1febf13be870d3bac16af22aa341a088e0766
[ "Apache-2.0" ]
null
null
null
test/data_processing/test_nodes.py
coruscating/qiskit-experiments
dac1febf13be870d3bac16af22aa341a088e0766
[ "Apache-2.0" ]
1
2021-06-01T01:43:52.000Z
2021-06-01T01:43:52.000Z
test/data_processing/test_nodes.py
coruscating/qiskit-experiments
dac1febf13be870d3bac16af22aa341a088e0766
[ "Apache-2.0" ]
2
2021-05-17T10:13:20.000Z
2021-06-01T01:34:34.000Z
# This code is part of Qiskit. # # (C) Copyright IBM 2021. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
38.64135
100
0.604826
import numpy as np from qiskit.test import QiskitTestCase from qiskit_experiments.data_processing.nodes import ( SVD, AverageData, MinMaxNormalize, Probability, ) from qiskit_experiments.data_processing.data_processor import DataProcessor from . import BaseDataProcessorTest class TestAveraging(Ba...
true
true
1c43934f21526c9f0103a9f4b781ad01d3e6c720
5,364
py
Python
AVL_tree_PROG.py
arafayr/AVL_tree_PROG
9528aa61fab3e10d6b12579cf438811c93e99ace
[ "MIT" ]
null
null
null
AVL_tree_PROG.py
arafayr/AVL_tree_PROG
9528aa61fab3e10d6b12579cf438811c93e99ace
[ "MIT" ]
null
null
null
AVL_tree_PROG.py
arafayr/AVL_tree_PROG
9528aa61fab3e10d6b12579cf438811c93e99ace
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # In[ ]: class Node: def __init__(self,data,parent): self.data = data self.rightchild = None self.leftchild = None self.parent = parent self.height = 0 class AVLTree: def __init__(self): self.root = None ...
29.635359
99
0.496644
class Node: def __init__(self,data,parent): self.data = data self.rightchild = None self.leftchild = None self.parent = parent self.height = 0 class AVLTree: def __init__(self): self.root = None def insert(self,data): if self.root ...
true
true
1c4394dcae4611c54410c55300ddc06a3894fabe
16,003
py
Python
tests/scanner/test_win32_scanner.py
zea2/DeviceManager
5f224c7680692cd9329b5b1421b00a814e3c2bfe
[ "MIT" ]
null
null
null
tests/scanner/test_win32_scanner.py
zea2/DeviceManager
5f224c7680692cd9329b5b1421b00a814e3c2bfe
[ "MIT" ]
15
2020-03-06T13:53:56.000Z
2020-04-01T09:14:34.000Z
tests/scanner/test_win32_scanner.py
zea2/DeviceManager
5f224c7680692cd9329b5b1421b00a814e3c2bfe
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """Script for testing the module device_manager.scanner._win32. This script tests the following entities: - class Win32USBDeviceScanner - class Win32LANDeviceScanner Authors: Lukas Lankes, Forschungszentrum Jülich GmbH - ZEA-2, l.lankes@fz-juelich.de """ import os im...
49.544892
100
0.620509
import os import subprocess import sys import unittest import unittest.mock from device_manager.device import USBDevice, LANDevice from device_manager.scanner import USBDeviceScanner, LANDeviceScanner @unittest.skipUnless(sys.platform == "win32", "Requires Windows") class TestWin32ScannerImport(unittest.TestCase): ...
true
true
1c4394fff12d771e0ea171ef042d49040a6866df
2,724
py
Python
setup.py
fangd123/TextBrewer
866f4363d9bd964f00aa60b0db5e9252a7905448
[ "Apache-2.0" ]
null
null
null
setup.py
fangd123/TextBrewer
866f4363d9bd964f00aa60b0db5e9252a7905448
[ "Apache-2.0" ]
null
null
null
setup.py
fangd123/TextBrewer
866f4363d9bd964f00aa60b0db5e9252a7905448
[ "Apache-2.0" ]
null
null
null
""" Simple check list from AllenNLP repo: https://github.com/allenai/allennlp/blob/master/setup.py To create the package for pypi. 1. Change the version in __init__.py, setup.py as well as docs/source/conf.py. 2. Commit these changes with the message: "Release: VERSION" 3. Add a tag in git to mark the release: "git tag...
41.907692
101
0.698972
import shutil from pathlib import Path from setuptools import find_packages, setup setup( name="textbrewer", version="0.2.1", author="ziqingyang", author_email="zqyang5@iflytek.com", description="PyTorch-based knowledge distillation toolkit for natural language processing", long_description=...
true
true
1c43953717c27a54f36e47fe96bee4424e86d55d
7,825
py
Python
django/core/handlers/wsgi.py
raydeal/django
e96320c91724830034033a9cb8afd9cf8c11e2fd
[ "BSD-3-Clause", "0BSD" ]
null
null
null
django/core/handlers/wsgi.py
raydeal/django
e96320c91724830034033a9cb8afd9cf8c11e2fd
[ "BSD-3-Clause", "0BSD" ]
null
null
null
django/core/handlers/wsgi.py
raydeal/django
e96320c91724830034033a9cb8afd9cf8c11e2fd
[ "BSD-3-Clause", "0BSD" ]
null
null
null
from io import BytesIO from django.conf import settings from django.core import signals from django.core.handlers import base from django.http import HttpRequest, QueryDict, parse_cookie from django.urls import set_script_prefix from django.utils.encoding import repercent_broken_unicode from django.utils.functional im...
35.894495
87
0.648051
from io import BytesIO from django.conf import settings from django.core import signals from django.core.handlers import base from django.http import HttpRequest, QueryDict, parse_cookie from django.urls import set_script_prefix from django.utils.encoding import repercent_broken_unicode from django.utils.functional im...
true
true
1c4395fdce03fca9baeba81e5f548c41f4601762
446
py
Python
lib/download.py
colajam93/aurpackager
624b9be3dcb0d1ef388a0bd2c3019390881d51cd
[ "MIT" ]
null
null
null
lib/download.py
colajam93/aurpackager
624b9be3dcb0d1ef388a0bd2c3019390881d51cd
[ "MIT" ]
null
null
null
lib/download.py
colajam93/aurpackager
624b9be3dcb0d1ef388a0bd2c3019390881d51cd
[ "MIT" ]
null
null
null
from contextlib import closing from urllib.request import urlopen, OpenerDirector def save_to_file(url: str, file_path: str, opener: OpenerDirector = None): def process(request_): with open(file_path, 'wb') as f: f.write(request_.read()) if opener: with closing(opener.open(url)) a...
27.875
74
0.647982
from contextlib import closing from urllib.request import urlopen, OpenerDirector def save_to_file(url: str, file_path: str, opener: OpenerDirector = None): def process(request_): with open(file_path, 'wb') as f: f.write(request_.read()) if opener: with closing(opener.open(url)) a...
true
true
1c4396f29e3704807e1fce11fdaed48c810a35a5
7,393
py
Python
okta/resource_clients/domain_client.py
ander501/okta-sdk-python
0927dc6a2f6d5ebf7cd1ea806d81065094c92471
[ "Apache-2.0" ]
null
null
null
okta/resource_clients/domain_client.py
ander501/okta-sdk-python
0927dc6a2f6d5ebf7cd1ea806d81065094c92471
[ "Apache-2.0" ]
null
null
null
okta/resource_clients/domain_client.py
ander501/okta-sdk-python
0927dc6a2f6d5ebf7cd1ea806d81065094c92471
[ "Apache-2.0" ]
null
null
null
""" Copyright 2020 - Present Okta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, softwa...
26.123675
90
0.548357
from okta.models.domain_list_response\ import DomainListResponse from okta.models.domain\ import Domain from okta.utils import format_url from okta.api_client import APIClient class DomainClient(APIClient): def __init__(self): self._base_url = "" async def list_domains( self, ...
true
true
1c43975c6be9b0a91b85f63283c7f97b975a1cb8
10,146
py
Python
threedi_api_client/openapi/models/potential_breach.py
nens/threedi-api-client
43b0eb1bd47310b1783f87f6ad8bfbfe0fb4d90a
[ "BSD-3-Clause" ]
null
null
null
threedi_api_client/openapi/models/potential_breach.py
nens/threedi-api-client
43b0eb1bd47310b1783f87f6ad8bfbfe0fb4d90a
[ "BSD-3-Clause" ]
16
2021-05-31T09:52:04.000Z
2022-03-14T16:07:19.000Z
threedi_api_client/openapi/models/potential_breach.py
nens/threedi-api-client
43b0eb1bd47310b1783f87f6ad8bfbfe0fb4d90a
[ "BSD-3-Clause" ]
null
null
null
# coding: utf-8 """ 3Di API 3Di simulation API (latest stable version: v3) Framework release: 2.9.0 3Di core release: 2.2.2 deployed on: 11:01AM (UTC) on January 11, 2022 # noqa: E501 The version of the OpenAPI document: v3 Contact: info@nelen-schuurmans.nl Generated by: https://openapi-ge...
33.596026
191
0.623398
import logging import pprint import re import six from threedi_api_client.openapi.configuration import Configuration logger = logging.getLogger(__name__) class PotentialBreach(object): openapi_types = { 'url': 'str', 'connected_pnt_id': 'int', 'levee_material': 'str', 'line_...
true
true
1c439907cfb244998cd93f3c730564f431b4e5ee
600
py
Python
coffeenijuan/management/migrations/0003_supply_addeded_by.py
Cyvid7-Darus10/CMSC-128-Group-Repo
cdbbe84f4af398a6c1d5c2749173d4cf585487a9
[ "MIT" ]
null
null
null
coffeenijuan/management/migrations/0003_supply_addeded_by.py
Cyvid7-Darus10/CMSC-128-Group-Repo
cdbbe84f4af398a6c1d5c2749173d4cf585487a9
[ "MIT" ]
null
null
null
coffeenijuan/management/migrations/0003_supply_addeded_by.py
Cyvid7-Darus10/CMSC-128-Group-Repo
cdbbe84f4af398a6c1d5c2749173d4cf585487a9
[ "MIT" ]
null
null
null
# Generated by Django 4.0.2 on 2022-06-07 15:04 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('management', '0002_trans...
27.272727
133
0.678333
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('management', '0002_transaction'), ] operations = [ migr...
true
true
1c439b1e301860046f645abdbc1f4668b65d7558
1,419
py
Python
dataproc/google/cloud/dataproc_v1beta2/proto/shared_pb2.py
nielm/google-cloud-python
fd126fdea34206109eb00d675374ff7dc4dcc5ef
[ "Apache-2.0" ]
1
2019-01-23T21:54:51.000Z
2019-01-23T21:54:51.000Z
dataproc/google/cloud/dataproc_v1beta2/proto/shared_pb2.py
nielm/google-cloud-python
fd126fdea34206109eb00d675374ff7dc4dcc5ef
[ "Apache-2.0" ]
1
2018-04-06T19:51:23.000Z
2018-04-06T19:51:23.000Z
dataproc/google/cloud/dataproc_v1beta2/proto/shared_pb2.py
nielm/google-cloud-python
fd126fdea34206109eb00d675374ff7dc4dcc5ef
[ "Apache-2.0" ]
1
2020-11-15T11:44:36.000Z
2020-11-15T11:44:36.000Z
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/dataproc_v1beta2/proto/shared.proto import sys _b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from g...
36.384615
275
0.799859
import sys _b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym...
true
true
1c439bd57caf9056e4da24f63fd5fa1fd020399d
258
py
Python
core/urls.py
kamyabdesign/DRF_Django
7930ef9ad259c092e16e7ae1885054cef1608415
[ "Apache-2.0" ]
null
null
null
core/urls.py
kamyabdesign/DRF_Django
7930ef9ad259c092e16e7ae1885054cef1608415
[ "Apache-2.0" ]
null
null
null
core/urls.py
kamyabdesign/DRF_Django
7930ef9ad259c092e16e7ae1885054cef1608415
[ "Apache-2.0" ]
null
null
null
from django.contrib import admin from django.urls import path, include urlpatterns = [ path('admin/', admin.site.urls), path('api-auth/', include('rest_framework.urls')), path('', include('blog.urls')), path('api/', include('api.urls')), ]
23.454545
54
0.651163
from django.contrib import admin from django.urls import path, include urlpatterns = [ path('admin/', admin.site.urls), path('api-auth/', include('rest_framework.urls')), path('', include('blog.urls')), path('api/', include('api.urls')), ]
true
true
1c439c449f1626aa0ccf923efed17e25fa0b2efb
2,913
py
Python
partner/partner.py
aparkerlue/ledger-partner
b7d59f23ed5853312cdf9aa97f8941f00478d41b
[ "Apache-2.0" ]
null
null
null
partner/partner.py
aparkerlue/ledger-partner
b7d59f23ed5853312cdf9aa97f8941f00478d41b
[ "Apache-2.0" ]
null
null
null
partner/partner.py
aparkerlue/ledger-partner
b7d59f23ed5853312cdf9aa97f8941f00478d41b
[ "Apache-2.0" ]
null
null
null
# -*- mode: python; coding: utf-8; -*- """Functions for partnership accounting with Ledger.""" from math import floor from ledger import Amount def isclose(a, b, rel_tol=1e-09, abs_tol=0.0): """Return True if the values a and b are close to each other.""" return abs(a - b) <= max(rel_tol * max(abs(a), abs(b)...
33.872093
86
0.650532
from math import floor from ledger import Amount def isclose(a, b, rel_tol=1e-09, abs_tol=0.0): return abs(a - b) <= max(rel_tol * max(abs(a), abs(b)), abs_tol) def parse_partner_string(s): L = [x.strip().split(" ") for x in s.split(",")] if all(len(x) <= 1 for x in L): return {t[0]: 100 /...
true
true
1c439c92d19627a8c9292e2c3337445b1ea5786f
91
py
Python
enthought/traits/traits_listener.py
enthought/etsproxy
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
[ "BSD-3-Clause" ]
3
2016-12-09T06:05:18.000Z
2018-03-01T13:00:29.000Z
enthought/traits/traits_listener.py
enthought/etsproxy
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
[ "BSD-3-Clause" ]
1
2020-12-02T00:51:32.000Z
2020-12-02T08:48:55.000Z
enthought/traits/traits_listener.py
enthought/etsproxy
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
[ "BSD-3-Clause" ]
null
null
null
# proxy module from __future__ import absolute_import from traits.traits_listener import *
22.75
38
0.846154
from __future__ import absolute_import from traits.traits_listener import *
true
true
1c439cda4f6402826d3d0ec46d23201b633cd875
649
py
Python
setup.py
caracalai/caracal
c93373fb88091175c32dc0e4a91eb7a78b693367
[ "MIT" ]
25
2021-12-10T14:07:04.000Z
2022-02-21T14:45:31.000Z
setup.py
caracalai/caracal
c93373fb88091175c32dc0e4a91eb7a78b693367
[ "MIT" ]
null
null
null
setup.py
caracalai/caracal
c93373fb88091175c32dc0e4a91eb7a78b693367
[ "MIT" ]
null
null
null
import setuptools with open("README.md", "r") as f: long_description = f.read() setuptools.setup( name="caracal", version="0.0.1", long_description=long_description, author="BroutonLab team", classifiers=[ "Programming Language :: Python :: 3", "License :: OSI Approved :: MIT L...
24.037037
51
0.597843
import setuptools with open("README.md", "r") as f: long_description = f.read() setuptools.setup( name="caracal", version="0.0.1", long_description=long_description, author="BroutonLab team", classifiers=[ "Programming Language :: Python :: 3", "License :: OSI Approved :: MIT L...
true
true
1c439db077a19cdd96ad6a2a146970e85ccbd10b
1,189
py
Python
custom_components/tesla_custom/binary_sensor.py
carleeno/tesla
81c342d5c2564eed3659cc5a0711b4c209dd6773
[ "Apache-2.0" ]
108
2021-04-29T11:38:05.000Z
2022-03-25T10:35:28.000Z
custom_components/tesla_custom/binary_sensor.py
carleeno/tesla
81c342d5c2564eed3659cc5a0711b4c209dd6773
[ "Apache-2.0" ]
120
2021-04-29T07:49:59.000Z
2022-03-31T04:45:15.000Z
custom_components/tesla_custom/binary_sensor.py
custom-components/tesla
004f265ec0c6e25ce2d04cdeea9964cf1d1cac4e
[ "Apache-2.0" ]
33
2021-05-01T16:03:07.000Z
2022-03-12T21:54:40.000Z
"""Support for Tesla binary sensor.""" from homeassistant.components.binary_sensor import DEVICE_CLASSES, BinarySensorEntity from . import DOMAIN as TESLA_DOMAIN from .tesla_device import TeslaDevice async def async_setup_entry(hass, config_entry, async_add_entities): """Set up the Tesla binary_sensors by confi...
29
85
0.640034
from homeassistant.components.binary_sensor import DEVICE_CLASSES, BinarySensorEntity from . import DOMAIN as TESLA_DOMAIN from .tesla_device import TeslaDevice async def async_setup_entry(hass, config_entry, async_add_entities): async_add_entities( [ TeslaBinarySensor( devic...
true
true
1c439e6349e5d084a088b8833c4b88c1aeebd6da
189
py
Python
scanpy/tests/test_sim.py
mkmkryu/scanpy2
f3db32a142dc31c1b628380db1c969a6d0b9dc3a
[ "BSD-3-Clause" ]
1,171
2017-01-17T14:01:02.000Z
2022-03-31T23:02:57.000Z
scanpy/tests/test_sim.py
mkmkryu/scanpy2
f3db32a142dc31c1b628380db1c969a6d0b9dc3a
[ "BSD-3-Clause" ]
1,946
2017-01-22T10:19:04.000Z
2022-03-31T17:13:03.000Z
scanpy/tests/test_sim.py
mkmkryu/scanpy2
f3db32a142dc31c1b628380db1c969a6d0b9dc3a
[ "BSD-3-Clause" ]
499
2017-01-21T11:39:29.000Z
2022-03-23T13:57:35.000Z
import scanpy as sc import numpy as np def test_sim_toggleswitch(): adata = sc.tl.sim('toggleswitch') np.allclose(adata.X, sc.datasets.toggleswitch().X, np.finfo(np.float32).eps)
23.625
80
0.724868
import scanpy as sc import numpy as np def test_sim_toggleswitch(): adata = sc.tl.sim('toggleswitch') np.allclose(adata.X, sc.datasets.toggleswitch().X, np.finfo(np.float32).eps)
true
true
1c439ef1c9899ada0ed1adae7eefbd496b13ddb8
334
py
Python
cart/urls.py
Code-Institute-Submissions/kordianbird-GamerGarageMS4
5c771674e76c6b81c761a2282df62bff61667def
[ "OML" ]
null
null
null
cart/urls.py
Code-Institute-Submissions/kordianbird-GamerGarageMS4
5c771674e76c6b81c761a2282df62bff61667def
[ "OML" ]
null
null
null
cart/urls.py
Code-Institute-Submissions/kordianbird-GamerGarageMS4
5c771674e76c6b81c761a2282df62bff61667def
[ "OML" ]
null
null
null
from django.urls import path from . import views urlpatterns = [ path('', views.view_cart, name='view_cart'), path('add/<item_id>/', views.add_to_cart, name='add_to_cart'), path('remove/<item_id>/', views.remove_from_cart, name='remove_from_cart'), path('adjust/<item_id>/', views.adjust_cart, name='adj...
33.4
79
0.694611
from django.urls import path from . import views urlpatterns = [ path('', views.view_cart, name='view_cart'), path('add/<item_id>/', views.add_to_cart, name='add_to_cart'), path('remove/<item_id>/', views.remove_from_cart, name='remove_from_cart'), path('adjust/<item_id>/', views.adjust_cart, name='adj...
true
true
1c43a009e316cddd46cc3993314f9f414db25862
2,094
py
Python
modules/settingsConf.py
mattiasoldani/anaKrys
9f6e4bcb72463c68fdccd6b65ec6bcf539346774
[ "MIT" ]
null
null
null
modules/settingsConf.py
mattiasoldani/anaKrys
9f6e4bcb72463c68fdccd6b65ec6bcf539346774
[ "MIT" ]
7
2021-01-12T15:19:36.000Z
2022-03-26T10:44:25.000Z
modules/settingsConf.py
mattiasoldani/anaKrys
9f6e4bcb72463c68fdccd6b65ec6bcf539346774
[ "MIT" ]
null
null
null
from settings import * ############################################################################### ############################################################################### def settingsSelect(boolTest, whichInput): if not boolTest: # physics files -- either ROOT or ASCII or NPZ print("look...
42.734694
100
0.475645
from settings import * def settingsSelect(boolTest, whichInput): if not boolTest: print("looking for files with label %s in ./settings/" % whichInput) return "settings.%s_runList" % whichInput, "settings.%s_settings" % whichInput else: print("test mode: will operate with test s...
true
true
1c43a0552c4e97cf972971d47db51a0b2becb608
439
py
Python
env/Lib/site-packages/plotly/validators/streamtube/hoverlabel/_namelengthsrc.py
andresgreen-byte/Laboratorio-1--Inversion-de-Capital
8a4707301d19c3826c31026c4077930bcd6a8182
[ "MIT" ]
11,750
2015-10-12T07:03:39.000Z
2022-03-31T20:43:15.000Z
venv/Lib/site-packages/plotly/validators/streamtube/hoverlabel/_namelengthsrc.py
wakisalvador/constructed-misdirection
74779e9ec640a11bc08d5d1967c85ac4fa44ea5e
[ "Unlicense" ]
2,951
2015-10-12T00:41:25.000Z
2022-03-31T22:19:26.000Z
venv/Lib/site-packages/plotly/validators/streamtube/hoverlabel/_namelengthsrc.py
wakisalvador/constructed-misdirection
74779e9ec640a11bc08d5d1967c85ac4fa44ea5e
[ "Unlicense" ]
2,623
2015-10-15T14:40:27.000Z
2022-03-28T16:05:50.000Z
import _plotly_utils.basevalidators class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="streamtube.hoverlabel", **kwargs ): super(NamelengthsrcValidator, self).__init__( plotly_name=plotly_name, ...
31.357143
88
0.671982
import _plotly_utils.basevalidators class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="streamtube.hoverlabel", **kwargs ): super(NamelengthsrcValidator, self).__init__( plotly_name=plotly_name, ...
true
true
1c43a0a7b2ff45d86431f6a45ca3ab07b55cbfdb
310
py
Python
src/image_downloader.py
aditipolkam/spotify-downloader
2b6f8027170771dda7713bf034f5c099187a9bed
[ "MIT" ]
null
null
null
src/image_downloader.py
aditipolkam/spotify-downloader
2b6f8027170771dda7713bf034f5c099187a9bed
[ "MIT" ]
null
null
null
src/image_downloader.py
aditipolkam/spotify-downloader
2b6f8027170771dda7713bf034f5c099187a9bed
[ "MIT" ]
1
2022-01-23T10:40:17.000Z
2022-01-23T10:40:17.000Z
import urllib.request import os import pathlib from pathlib import Path def download_image(url, filepath, name): filename = str(name + ".jpg") img_path = Path(pathlib.Path(filepath, filename)) urllib.request.urlretrieve(url,img_path) #print("cover download successful") return img_path
20.666667
53
0.732258
import urllib.request import os import pathlib from pathlib import Path def download_image(url, filepath, name): filename = str(name + ".jpg") img_path = Path(pathlib.Path(filepath, filename)) urllib.request.urlretrieve(url,img_path) return img_path
true
true
1c43a2957e0ba3c3212221040eb1df78fccdd245
32,336
py
Python
tests/test_client/tests.py
victorliun/django
7def55c3f6716fcfa40a3bd5d0fbb2090588d81e
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
tests/test_client/tests.py
victorliun/django
7def55c3f6716fcfa40a3bd5d0fbb2090588d81e
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
tests/test_client/tests.py
victorliun/django
7def55c3f6716fcfa40a3bd5d0fbb2090588d81e
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Testing using the Test Client The test client is a class that can act like a simple browser for testing purposes. It allows the user to compose GET and POST requests, and obtain the response that the server gave to those requests. The server Response objects are annotated with the details ...
41.139949
111
0.670708
from __future__ import unicode_literals from django.contrib.auth.models import User from django.core import mail from django.http import HttpResponse from django.test import ( Client, RequestFactory, SimpleTestCase, TestCase, override_settings, ) from django.urls import reverse_lazy from .views import get_view, p...
true
true
1c43a3e89071329a74cdf1180bec926813985501
14,688
py
Python
Scripts/rum.py
bdsinger/PsyNeuLink
71d8a0bb1691ff85061d4ad3de866d9930a69a73
[ "Apache-2.0" ]
null
null
null
Scripts/rum.py
bdsinger/PsyNeuLink
71d8a0bb1691ff85061d4ad3de866d9930a69a73
[ "Apache-2.0" ]
null
null
null
Scripts/rum.py
bdsinger/PsyNeuLink
71d8a0bb1691ff85061d4ad3de866d9930a69a73
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # In[14]: import numpy as np import matplotlib.pyplot as plt # get_ipython().run_line_magic('matplotlib', 'inline') import psyneulink as pnl # In[15]: import psyneulink.core.components.functions.transferfunctions nouns=['oak','pine','rose','daisy','canary','robin','salmon','sunfish'] relations=['...
33.688073
470
0.540782
import numpy as np import matplotlib.pyplot as plt import psyneulink as pnl import psyneulink.core.components.functions.transferfunctions nouns=['oak','pine','rose','daisy','canary','robin','salmon','sunfish'] relations=['is','has','can'] is_list=['living','living thing','plant','animal','tree','flower','bird','...
true
true
1c43a4beccd3e3b8b93f9f00909ebd701fcc7ae1
1,898
py
Python
PiBlynk-py/14-terminals.py
BLavery/PyBlynk
96e0d5c42fa1f5eed91d41890856f065ed8b607a
[ "MIT" ]
12
2017-09-08T12:26:48.000Z
2020-09-18T03:30:36.000Z
PiBlynk-py/14-terminals.py
BLavery/PyBlynk
96e0d5c42fa1f5eed91d41890856f065ed8b607a
[ "MIT" ]
1
2018-01-21T19:07:49.000Z
2021-03-04T17:28:57.000Z
PiBlynk-py/14-terminals.py
BLavery/PyBlynk
96e0d5c42fa1f5eed91d41890856f065ed8b607a
[ "MIT" ]
7
2018-02-13T21:54:46.000Z
2020-09-18T03:30:39.000Z
import os from PiBlynk import Blynk from mytoken import * blynk = Blynk(token) #------------------------------------------ import time def timeNow(): return time.asctime()[11:19] #------------------------------------ # terminal from APP into python interpreter _last_cmd = "" def pyterminal_h(value, pin, st): ...
25.648649
82
0.557956
import os from PiBlynk import Blynk from mytoken import * blynk = Blynk(token) import time def timeNow(): return time.asctime()[11:19] _last_cmd = "" def pyterminal_h(value, pin, st): global _last_cmd cmd = value[0] if cmd == ".": cmd = _last_cmd blynk.virtual_w...
true
true
1c43a4ff50f9df182226287026667f6a1751ef12
6,391
py
Python
codes/data/__init__.py
DamianoGiani/EGVSRprova
2cae74436f2bf864f061d63eadae079a328ed9ed
[ "MIT" ]
null
null
null
codes/data/__init__.py
DamianoGiani/EGVSRprova
2cae74436f2bf864f061d63eadae079a328ed9ed
[ "MIT" ]
null
null
null
codes/data/__init__.py
DamianoGiani/EGVSRprova
2cae74436f2bf864f061d63eadae079a328ed9ed
[ "MIT" ]
null
null
null
import torch import torch.nn.functional as F from torch.utils.data import DataLoader from .paired_lmdb_dataset import PairedLMDBDataset from .unpaired_lmdb_dataset import UnpairedLMDBDataset from .paired_folder_dataset import PairedFolderDataset from .mypaired_folder_dataset import MyPairedFolderDataset def create_da...
35.904494
81
0.581756
import torch import torch.nn.functional as F from torch.utils.data import DataLoader from .paired_lmdb_dataset import PairedLMDBDataset from .unpaired_lmdb_dataset import UnpairedLMDBDataset from .paired_folder_dataset import PairedFolderDataset from .mypaired_folder_dataset import MyPairedFolderDataset def create_da...
true
true
1c43a5d43acef9b7daa27745b07cce0f336cf9ba
200
py
Python
src/server/app/endpoints/thankyou/controllers.py
MatthiasRiener/DigiPen
9b4aff4a1c431e06d73733dc3dd3f3f3d4631704
[ "MIT" ]
null
null
null
src/server/app/endpoints/thankyou/controllers.py
MatthiasRiener/DigiPen
9b4aff4a1c431e06d73733dc3dd3f3f3d4631704
[ "MIT" ]
null
null
null
src/server/app/endpoints/thankyou/controllers.py
MatthiasRiener/DigiPen
9b4aff4a1c431e06d73733dc3dd3f3f3d4631704
[ "MIT" ]
null
null
null
from flask import Flask, render_template, Blueprint thankyou = Blueprint("thankyou", __name__) @thankyou.route('/', methods=["GET"]) def index(): return render_template('/thankyou/index.html')
22.222222
51
0.73
from flask import Flask, render_template, Blueprint thankyou = Blueprint("thankyou", __name__) @thankyou.route('/', methods=["GET"]) def index(): return render_template('/thankyou/index.html')
true
true
1c43a6a7f69248cf21e59f6dbe57ecc16dc04e09
1,335
py
Python
WebBrickLibs/MiscLib/tests/TestCombinators.py
AndyThirtover/wb_gateway
69f9c870369085f4440033201e2fb263a463a523
[ "BSD-3-Clause" ]
null
null
null
WebBrickLibs/MiscLib/tests/TestCombinators.py
AndyThirtover/wb_gateway
69f9c870369085f4440033201e2fb263a463a523
[ "BSD-3-Clause" ]
null
null
null
WebBrickLibs/MiscLib/tests/TestCombinators.py
AndyThirtover/wb_gateway
69f9c870369085f4440033201e2fb263a463a523
[ "BSD-3-Clause" ]
null
null
null
# Copyright L.P.Klyne 2013 # Licenced under 3 clause BSD licence # $Id: TestCombinators.py 2612 2008-08-11 20:08:49Z graham.klyne $ # # Unit testing for WebBrick library combinators # See http://pyunit.sourceforge.net/pyunit.html # import sys import unittest sys.path.append("../..") from MiscLib.Combinators import...
24.272727
68
0.632959
import sys import unittest sys.path.append("../..") from MiscLib.Combinators import * class TestCombinators(unittest.TestCase): def setUp(self): return def tearDown(self): return def testApply(self): def ap(f,v): return f(v) def inc(n): return n+1 ...
true
true
1c43a6c922911852492067e97959f186a004ec8b
641
py
Python
setup.py
Deekshith1994/Recipes
5dfc98b249f6caf90571c037eb35560417b6818e
[ "Apache-2.0" ]
591
2016-04-27T15:34:28.000Z
2019-02-28T21:28:15.000Z
setup.py
Deekshith1994/Recipes
5dfc98b249f6caf90571c037eb35560417b6818e
[ "Apache-2.0" ]
11
2016-05-24T17:09:16.000Z
2018-10-17T10:02:10.000Z
setup.py
Deekshith1994/Recipes
5dfc98b249f6caf90571c037eb35560417b6818e
[ "Apache-2.0" ]
120
2016-04-27T20:50:42.000Z
2019-02-25T03:48:31.000Z
#!/usr/bin/env python import sys from setuptools import setup, find_packages import ingredient_phrase_tagger requires, extra = ['Unidecode==0.04.14', 'pandas==0.17.1'], {} if sys.version_info >= (3,): extra['use_2to3'] = True setup( name='ingredient_phrase_tagger', version='0.0.0.dev0', description...
25.64
98
0.711388
import sys from setuptools import setup, find_packages import ingredient_phrase_tagger requires, extra = ['Unidecode==0.04.14', 'pandas==0.17.1'], {} if sys.version_info >= (3,): extra['use_2to3'] = True setup( name='ingredient_phrase_tagger', version='0.0.0.dev0', description='Extract structured d...
true
true
1c43a9a5a12f07ef89a7cb5e84279cee5f3d98be
8,831
py
Python
pyscf/grad/casscf.py
highlight0112/pyscf
4afbd42bad3e72db5bb94d8cacf1d5de76537bdd
[ "Apache-2.0" ]
null
null
null
pyscf/grad/casscf.py
highlight0112/pyscf
4afbd42bad3e72db5bb94d8cacf1d5de76537bdd
[ "Apache-2.0" ]
null
null
null
pyscf/grad/casscf.py
highlight0112/pyscf
4afbd42bad3e72db5bb94d8cacf1d5de76537bdd
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright 2014-2018 The PySCF Developers. 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 # # U...
34.767717
89
0.611143
import time from functools import reduce import numpy from pyscf import lib from pyscf import ao2mo from pyscf.lib import logger from pyscf.grad import rhf as rhf_grad from pyscf.grad.mp2 import _shell_prange def kernel(mc, mo_coeff=None, ci=None, atmlst=None, mf_grad=None, verbose=None): if mo_coeff...
true
true
1c43a9d34a103b5ab69d0cfba4759484f8792ead
3,080
py
Python
deprecated/Friedman.py
Klettgau/CSC-332
cf0563d1230cac124ed2146ab2e211a15f216c23
[ "MIT" ]
null
null
null
deprecated/Friedman.py
Klettgau/CSC-332
cf0563d1230cac124ed2146ab2e211a15f216c23
[ "MIT" ]
null
null
null
deprecated/Friedman.py
Klettgau/CSC-332
cf0563d1230cac124ed2146ab2e211a15f216c23
[ "MIT" ]
null
null
null
import argparse import ciphers.Affine as aff import deprecated.CustomParser as CustomParser import ciphers.Engima as Engima import ciphers.Jefferson as jeff import ciphers.Julius as jul import ciphers.Vigenere as vig # this is was the original cli for the project. #Deprecated def main(): grandfather = CustomPa...
44
102
0.647727
import argparse import ciphers.Affine as aff import deprecated.CustomParser as CustomParser import ciphers.Engima as Engima import ciphers.Jefferson as jeff import ciphers.Julius as jul import ciphers.Vigenere as vig def main(): grandfather = CustomParser.Parsely() parser = argparse.ArgumentParser(descripti...
true
true
1c43a9e8e3e044bdac8baa2d76c080754533826a
575
py
Python
month1/day12/demo08.py
Amiao-miao/all-codes
ec50036d42d40086cac5fddf6baf4de18ac91e55
[ "Apache-2.0" ]
1
2021-02-02T02:17:37.000Z
2021-02-02T02:17:37.000Z
month1/day12/demo08.py
Amiao-miao/all-codes
ec50036d42d40086cac5fddf6baf4de18ac91e55
[ "Apache-2.0" ]
null
null
null
month1/day12/demo08.py
Amiao-miao/all-codes
ec50036d42d40086cac5fddf6baf4de18ac91e55
[ "Apache-2.0" ]
null
null
null
""" 需求:老张开车去东北 变化:飞机/轮船/骑车.... 思想: 封装:将需求分解为多个类 人类 汽车 飞机 轮船 自行车 ... 继承: 多态: """ class Person: def __init__(self, name=""): self.name = name def drive(self, pos, vehicle): print("去", pos) vehicle.transport() class Vehicle: def t...
16.428571
38
0.514783
class Person: def __init__(self, name=""): self.name = name def drive(self, pos, vehicle): print("去", pos) vehicle.transport() class Vehicle: def transport(self): pass class Car(Vehicle): def transport(self): print("行驶") class Airplane(Vehicle): def tr...
true
true
1c43a9f90f338a12da6807ed168ec5a7c59bd252
12,522
py
Python
dev_tool/__main__.py
ShenTengTu/mpy-dev-tool
b70c789ed743eb5089ec5b2b6f90e107bced152d
[ "MIT" ]
null
null
null
dev_tool/__main__.py
ShenTengTu/mpy-dev-tool
b70c789ed743eb5089ec5b2b6f90e107bced152d
[ "MIT" ]
null
null
null
dev_tool/__main__.py
ShenTengTu/mpy-dev-tool
b70c789ed743eb5089ec5b2b6f90e107bced152d
[ "MIT" ]
null
null
null
from argparse import _SubParsersAction, Namespace import shutil from os import linesep from . import ( realpath_join, os_cwd, os_walk_hash, path_exists, path_basename, HERE, DIST_DIR, SUBMODULES_DIR, EXT_LIB_DIR, PYPROJECT_TOML, ) from .toml_op import write_toml, read_toml from ....
32.866142
93
0.639435
from argparse import _SubParsersAction, Namespace import shutil from os import linesep from . import ( realpath_join, os_cwd, os_walk_hash, path_exists, path_basename, HERE, DIST_DIR, SUBMODULES_DIR, EXT_LIB_DIR, PYPROJECT_TOML, ) from .toml_op import write_toml, read_toml from ....
true
true
1c43aa654c855e80acf368da55cae7fcc0829d48
4,181
py
Python
Tests/compat/sbs_newtype.py
dsonbill/IronPython3-NETCore
8c76bdbec1754233f04b41ecd28e9bae2c862fd0
[ "Apache-2.0" ]
2
2019-09-21T22:22:30.000Z
2020-05-09T12:45:51.000Z
Tests/compat/sbs_newtype.py
dsonbill/IronPython3-NETCore
8c76bdbec1754233f04b41ecd28e9bae2c862fd0
[ "Apache-2.0" ]
null
null
null
Tests/compat/sbs_newtype.py
dsonbill/IronPython3-NETCore
8c76bdbec1754233f04b41ecd28e9bae2c862fd0
[ "Apache-2.0" ]
null
null
null
##################################################################################### # # Copyright (c) Microsoft Corporation. All rights reserved. # # This source code is subject to terms and conditions of the Apache License, Version 2.0. A # copy of the license can be found in the License.html file at the root of t...
31.916031
97
0.526429
from common import * class o1: pass class o2: pass class o3(o2): pass class n1(object): pass class n2(object): __slots__ = ['a', 'b'] class n3(object): __slots__ = ['a', 'b', 'c'] class n4(n1): pass class n5(n1): __slots__ = ['e', 'f'] class n6(n2): pass class n7(n2): __slots__ = ['g', '...
true
true
1c43ab87ff3684e20b68bd114c2a295f62a3a3f9
17,256
py
Python
scripts/run_e2e_tests.py
tjinjoy/oppia
ed5ccbd95e42078457d40dde1dda02f1ae6a4354
[ "Apache-2.0" ]
null
null
null
scripts/run_e2e_tests.py
tjinjoy/oppia
ed5ccbd95e42078457d40dde1dda02f1ae6a4354
[ "Apache-2.0" ]
null
null
null
scripts/run_e2e_tests.py
tjinjoy/oppia
ed5ccbd95e42078457d40dde1dda02f1ae6a4354
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
36.252101
128
0.708391
from __future__ import absolute_import from __future__ import unicode_literals import argparse import atexit import contextlib import os import re import subprocess import sys import time import python_utils from scripts import build from scripts import common from scripts import install_chrome_on_travis from scr...
true
true
1c43ac745ef32675e0e5e8a38ff7ea9b049dc90b
1,380
py
Python
Leetcode/133.clone-graph.py
EdwaRen/Competitve-Programming
e8bffeb457936d28c75ecfefb5a1f316c15a9b6c
[ "MIT" ]
1
2021-05-03T21:48:25.000Z
2021-05-03T21:48:25.000Z
Leetcode/133.clone-graph.py
EdwaRen/Competitve_Programming
e8bffeb457936d28c75ecfefb5a1f316c15a9b6c
[ "MIT" ]
null
null
null
Leetcode/133.clone-graph.py
EdwaRen/Competitve_Programming
e8bffeb457936d28c75ecfefb5a1f316c15a9b6c
[ "MIT" ]
null
null
null
""" # Definition for a Node. """ class Node(object): def __init__(self, val, neighbors): self.val = val self.neighbors = neighbors class Solution(object): def cloneGraph(self, node): """ :type node: Node :rtype: Node """ # Dict mapping new -> old ...
19.714286
61
0.51087
class Node(object): def __init__(self, val, neighbors): self.val = val self.neighbors = neighbors class Solution(object): def cloneGraph(self, node): self.dp = {} stack = [node] def recurse(orig_node): if orig_node in self.dp: retur...
true
true
1c43aca44aa17aca4a5165de11dd1d2b40cbee2e
199
py
Python
concorde/shaman/__main__.py
frutiger/concorde
9f5a763bdaf2b8e48636193db39b7fde8209156c
[ "Unlicense" ]
2
2016-03-09T03:54:19.000Z
2016-04-14T09:37:01.000Z
concorde/shaman/__main__.py
frutiger/concorde
9f5a763bdaf2b8e48636193db39b7fde8209156c
[ "Unlicense" ]
1
2016-02-28T23:43:14.000Z
2016-02-28T23:43:14.000Z
concorde/shaman/__main__.py
frutiger/concorde
9f5a763bdaf2b8e48636193db39b7fde8209156c
[ "Unlicense" ]
1
2016-02-28T23:25:19.000Z
2016-02-28T23:25:19.000Z
# shaman.__main__ import os import sys from .profile import Profile def main(): if len(sys.argv) > 1: os.chdir(sys.argv[1]) Profile().run() if __name__ == '__main__': main()
12.4375
29
0.613065
import os import sys from .profile import Profile def main(): if len(sys.argv) > 1: os.chdir(sys.argv[1]) Profile().run() if __name__ == '__main__': main()
true
true
1c43ad00ec84d35d26a4cd91af1b711ebf5f6585
379
py
Python
graphene_django_cud/tests/migrations/0006_dog_bark_count.py
rymanso/graphene-django-cud
43bdc972700012304ddc0c3fb022a1ec7fbb7c31
[ "MIT" ]
66
2019-09-10T09:35:15.000Z
2022-03-09T15:29:49.000Z
graphene_django_cud/tests/migrations/0006_dog_bark_count.py
rymanso/graphene-django-cud
43bdc972700012304ddc0c3fb022a1ec7fbb7c31
[ "MIT" ]
61
2019-09-24T08:43:18.000Z
2022-03-31T05:51:41.000Z
graphene_django_cud/tests/migrations/0006_dog_bark_count.py
rymanso/graphene-django-cud
43bdc972700012304ddc0c3fb022a1ec7fbb7c31
[ "MIT" ]
27
2019-11-13T12:18:56.000Z
2022-02-16T20:49:12.000Z
# Generated by Django 2.2.6 on 2021-01-02 02:31 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('tests', '0005_dogregistration'), ] operations = [ migrations.AddField( model_name='dog', name='bark_count', ...
19.947368
49
0.591029
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('tests', '0005_dogregistration'), ] operations = [ migrations.AddField( model_name='dog', name='bark_count', field=models.IntegerField(default=0), ...
true
true
1c43adc8107f6755957a1f0868d44f529924a4cc
1,202
py
Python
recurring_content_detector/video_functions.py
lcd1232/recurring-content-detector
31e502e16b0d9870a6e3e4eb3bfe93d058cd01b0
[ "MIT" ]
46
2019-06-12T10:43:47.000Z
2022-03-15T12:17:13.000Z
recurring_content_detector/video_functions.py
lcd1232/recurring-content-detector
31e502e16b0d9870a6e3e4eb3bfe93d058cd01b0
[ "MIT" ]
19
2020-01-20T09:26:39.000Z
2021-12-10T13:16:08.000Z
recurring_content_detector/video_functions.py
lcd1232/recurring-content-detector
31e502e16b0d9870a6e3e4eb3bfe93d058cd01b0
[ "MIT" ]
14
2020-01-05T21:04:28.000Z
2022-02-21T08:51:04.000Z
import cv2 import ffmpeg import mimetypes def file_is_video(video_fn): """ Checks if the given file path actually is a video file """ file_type = mimetypes.guess_type(video_fn)[0] return file_type is not None and file_type.startswith("video") def get_framerate(video_fn): """ Return the vi...
30.820513
92
0.642263
import cv2 import ffmpeg import mimetypes def file_is_video(video_fn): file_type = mimetypes.guess_type(video_fn)[0] return file_type is not None and file_type.startswith("video") def get_framerate(video_fn): video = cv2.VideoCapture(video_fn) return video.get(cv2.CAP_PROP_FPS) def resize(input, out...
true
true
1c43adc9316e975e0e744796c75493658c598e86
2,021
py
Python
tests/example_data/data_loading/pandas/pands_data_loading_conf.py
delorenzosoftware/superset
5403f1ec163a52623f34f459d89f20e4e190371d
[ "Apache-2.0" ]
2
2021-12-21T15:57:16.000Z
2022-01-31T02:22:02.000Z
tests/example_data/data_loading/pandas/pands_data_loading_conf.py
changeiot/superset
299b5dc64448d04abe6b35ee85fbd2b938c781bc
[ "Apache-2.0" ]
19
2022-01-29T03:16:22.000Z
2022-03-25T23:50:16.000Z
tests/example_data/data_loading/pandas/pands_data_loading_conf.py
changeiot/superset
299b5dc64448d04abe6b35ee85fbd2b938c781bc
[ "Apache-2.0" ]
2
2021-12-21T13:41:18.000Z
2021-12-26T22:16:43.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may...
31.092308
81
0.688768
from __future__ import annotations from typing import Any, Dict default_pandas_data_loader_config = { "if_exists": "replace", "chunksize": 500, "index": False, "method": "multi", "strftime": "%Y-%m-%d %H:%M:%S", "support_datetime_type": False, } class PandasLoaderConfigurations: if_exist...
true
true
1c43aee86a6f74f2a929505d9eafea8c529c9914
14,477
py
Python
monty/functools.py
JosephMontoya-TRI/monty
facef1776c7d05c941191a32a0b93f986a9761dd
[ "MIT" ]
null
null
null
monty/functools.py
JosephMontoya-TRI/monty
facef1776c7d05c941191a32a0b93f986a9761dd
[ "MIT" ]
null
null
null
monty/functools.py
JosephMontoya-TRI/monty
facef1776c7d05c941191a32a0b93f986a9761dd
[ "MIT" ]
null
null
null
""" functools, especially backported from Python 3. """ from __future__ import absolute_import __author__ = 'Shyue Ping Ong' __copyright__ = 'Copyright 2013, The Materials Virtual Lab' __version__ = '0.1' __maintainer__ = 'Shyue Ping Ong' __email__ = 'ongsp@ucsd.edu' __date__ = '8/29/14' from collections import nam...
33.745921
80
0.570629
from __future__ import absolute_import __author__ = 'Shyue Ping Ong' __copyright__ = 'Copyright 2013, The Materials Virtual Lab' __version__ = '0.1' __maintainer__ = 'Shyue Ping Ong' __email__ = 'ongsp@ucsd.edu' __date__ = '8/29/14' from collections import namedtuple from functools import update_wrapper, wraps, par...
true
true
1c43aefb40b6a4733937ffe25a9ac6453faae8b7
20,502
py
Python
vnpy/database/mongodb/mongodb_database.py
NovelResearchInvestment/vnpy
27e1b053a478e26416d7ce2867fa99e8cb7ee659
[ "MIT" ]
null
null
null
vnpy/database/mongodb/mongodb_database.py
NovelResearchInvestment/vnpy
27e1b053a478e26416d7ce2867fa99e8cb7ee659
[ "MIT" ]
null
null
null
vnpy/database/mongodb/mongodb_database.py
NovelResearchInvestment/vnpy
27e1b053a478e26416d7ce2867fa99e8cb7ee659
[ "MIT" ]
null
null
null
"""""" from datetime import datetime from typing import List from mongoengine import ( Document, DateTimeField, FloatField, StringField, IntField, connect, QuerySet ) from mongoengine.errors import DoesNotExist from vnpy.trader.constant import Exchange, Interval from vnpy.trader.object imp...
28.835443
97
0.544776
from datetime import datetime from typing import List from mongoengine import ( Document, DateTimeField, FloatField, StringField, IntField, connect, QuerySet ) from mongoengine.errors import DoesNotExist from vnpy.trader.constant import Exchange, Interval from vnpy.trader.object import Bar...
true
true
1c43af03e0a527463944610ebbf54b54b44af576
1,101
py
Python
setup.py
lrgr/explosig-data
9fd11e5252e3fb112dc7a3e55cb7b40d8b8d5efb
[ "MIT" ]
1
2020-01-30T17:55:03.000Z
2020-01-30T17:55:03.000Z
setup.py
keller-mark/explosig-data
9fd11e5252e3fb112dc7a3e55cb7b40d8b8d5efb
[ "MIT" ]
1
2020-02-20T15:03:54.000Z
2020-02-20T23:44:14.000Z
setup.py
keller-mark/explosig-data
9fd11e5252e3fb112dc7a3e55cb7b40d8b8d5efb
[ "MIT" ]
1
2020-01-12T14:17:20.000Z
2020-01-12T14:17:20.000Z
import os import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="explosig-data", version="0.0.5", author="Leiserson Research Group", description="Process mutation data into standard formats originally developed for the ExploSig family of tools", ...
28.973684
116
0.60218
import os import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="explosig-data", version="0.0.5", author="Leiserson Research Group", description="Process mutation data into standard formats originally developed for the ExploSig family of tools", ...
true
true
1c43af043c358960ef291435ccf748377f5039a2
914
py
Python
tf_autoaugment/transforms/color.py
sebastian-sz/tf-autoaugment
6807f5095df1b842a8a17265dc2361165f5d1658
[ "MIT" ]
null
null
null
tf_autoaugment/transforms/color.py
sebastian-sz/tf-autoaugment
6807f5095df1b842a8a17265dc2361165f5d1658
[ "MIT" ]
null
null
null
tf_autoaugment/transforms/color.py
sebastian-sz/tf-autoaugment
6807f5095df1b842a8a17265dc2361165f5d1658
[ "MIT" ]
null
null
null
"""Code for Color transform.""" import tensorflow as tf from tf_autoaugment.image_utils import blend_batch from tf_autoaugment.transforms.base_transform import BaseTransform class Color(BaseTransform): """Implements Color Transform.""" def __call__(self, images: tf.Tensor, level: tf.Tensor) -> tf.Tensor: ...
36.56
81
0.695842
import tensorflow as tf from tf_autoaugment.image_utils import blend_batch from tf_autoaugment.transforms.base_transform import BaseTransform class Color(BaseTransform): def __call__(self, images: tf.Tensor, level: tf.Tensor) -> tf.Tensor: factor = self._parse_level(level) return self.color(imag...
true
true
1c43af4eb0282ba7f121ee3ea1d70ccdbd2d1c04
346
py
Python
Exercise_10_4.py
kushrami/Python-Crash-Course-book-Excersice
7093181940a90d9f4bab5775ef56f57963450393
[ "Apache-2.0" ]
null
null
null
Exercise_10_4.py
kushrami/Python-Crash-Course-book-Excersice
7093181940a90d9f4bab5775ef56f57963450393
[ "Apache-2.0" ]
null
null
null
Exercise_10_4.py
kushrami/Python-Crash-Course-book-Excersice
7093181940a90d9f4bab5775ef56f57963450393
[ "Apache-2.0" ]
null
null
null
#Guest Book: while True: User_name = input("Please enter your name or enter 'q' to exit:") if User_name == 'q': break else: with open('guest_book.txt','a') as file_object: file_object.write(User_name) file_object.write('\n') print("You can check your name in ...
28.833333
69
0.595376
while True: User_name = input("Please enter your name or enter 'q' to exit:") if User_name == 'q': break else: with open('guest_book.txt','a') as file_object: file_object.write(User_name) file_object.write('\n') print("You can check your name in file guest_bo...
true
true
1c43af6b0a0ef55b8648c8fefafcc6067e451792
379
py
Python
app/v1/__init__.py
FormatMemory/django_api_backend
690439ad612598c86c22a837bc0f2e5bea74f2d2
[ "MIT" ]
null
null
null
app/v1/__init__.py
FormatMemory/django_api_backend
690439ad612598c86c22a837bc0f2e5bea74f2d2
[ "MIT" ]
8
2021-03-18T23:26:33.000Z
2022-03-11T23:44:22.000Z
app/v1/__init__.py
FormatMemory/django_api_backend
690439ad612598c86c22a837bc0f2e5bea74f2d2
[ "MIT" ]
null
null
null
import os ENVIRONMENT = os.environ.get('ENVIRONMENT', 'local') if ENVIRONMENT == 'production': import pymysql pymysql.install_as_MySQLdb() # else: # import subprocess # os.chdir("../") # bashCommand = "bash scripts/load_sample_data.sh" # process = subprocess.Popen(bashCommand.split(), stdout=s...
29.153846
77
0.691293
import os ENVIRONMENT = os.environ.get('ENVIRONMENT', 'local') if ENVIRONMENT == 'production': import pymysql pymysql.install_as_MySQLdb()
true
true
1c43b2b5f81f62dcbcaa6b27b888a15112bf38b1
1,587
py
Python
tessled/effects/animations/exploringbox.py
hodgestar/tesseract-control-software
41f47a4b901a0069f1745c90abe28f0778704b0e
[ "MIT" ]
2
2019-07-13T14:15:30.000Z
2020-01-04T10:44:47.000Z
tessled/effects/animations/exploringbox.py
hodgestar/tesseract-control-software
41f47a4b901a0069f1745c90abe28f0778704b0e
[ "MIT" ]
null
null
null
tessled/effects/animations/exploringbox.py
hodgestar/tesseract-control-software
41f47a4b901a0069f1745c90abe28f0778704b0e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Exploring Box animation. Inquisitive pair of cubes of LEDs. """ import random from ..engine import Animation from ..sprites import Cube class SpiralPath: def __init__(self, margin, offset=0.0): steps_x = 8 - margin[0] steps_y = 8 - margin[1] self._max_z...
26.016393
72
0.562067
import random from ..engine import Animation from ..sprites import Cube class SpiralPath: def __init__(self, margin, offset=0.0): steps_x = 8 - margin[0] steps_y = 8 - margin[1] self._max_z = 8 - margin[2] self._xy = [] self._xy += zip([0] * steps_y, range(0, steps_y))...
true
true
1c43b420d215966a9d094b82adc894d33e04ba72
8,997
py
Python
sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/_web_site_management_client.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/_web_site_management_client.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/_web_site_management_client.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
1,916
2015-01-19T05:05:41.000Z
2022-03-31T19:36:44.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
58.422078
132
0.7667
from typing import Any, Optional, TYPE_CHECKING from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential from ._confi...
true
true
1c43b4def4cac1a4ef50874622f19a0f859adacf
2,826
py
Python
q2_qemistree/tests/test_process_fingerprint.py
fedarko/q2-qemistree
611ab6d38fed8f59dda35984e49fa73d7431bc50
[ "BSD-2-Clause" ]
1
2020-01-22T02:09:11.000Z
2020-01-22T02:09:11.000Z
q2_qemistree/tests/test_process_fingerprint.py
fedarko/q2-qemistree
611ab6d38fed8f59dda35984e49fa73d7431bc50
[ "BSD-2-Clause" ]
null
null
null
q2_qemistree/tests/test_process_fingerprint.py
fedarko/q2-qemistree
611ab6d38fed8f59dda35984e49fa73d7431bc50
[ "BSD-2-Clause" ]
1
2021-11-02T02:53:25.000Z
2021-11-02T02:53:25.000Z
# ---------------------------------------------------------------------------- # Copyright (c) 2016-2018, QIIME 2 development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
39.25
79
0.617127
from unittest import TestCase, main from biom import load_table import pandas as pd import os import pkg_resources import qiime2 from q2_qemistree import CSIDirFmt from q2_qemistree._process_fingerprint import (collate_fingerprint, get_feature_smiles) data = pkg_resourc...
true
true
1c43b5518f82afd11244e10c06cfe4ffc4dec58b
1,730
py
Python
web_server/users/views.py
ColeBoytinck/cmput404-group-project
133e118fe8453b13f0d5afdf7b8d625eba9e4086
[ "MIT" ]
null
null
null
web_server/users/views.py
ColeBoytinck/cmput404-group-project
133e118fe8453b13f0d5afdf7b8d625eba9e4086
[ "MIT" ]
null
null
null
web_server/users/views.py
ColeBoytinck/cmput404-group-project
133e118fe8453b13f0d5afdf7b8d625eba9e4086
[ "MIT" ]
null
null
null
from django.shortcuts import render, redirect from django.http import HttpResponse, HttpResponseNotAllowed, HttpResponseRedirect from django.contrib.auth import login from django.contrib import messages from django.contrib.auth.decorators import login_required from .forms import UserRegisterForm from django.contrib.aut...
32.641509
82
0.660694
from django.shortcuts import render, redirect from django.http import HttpResponse, HttpResponseNotAllowed, HttpResponseRedirect from django.contrib.auth import login from django.contrib import messages from django.contrib.auth.decorators import login_required from .forms import UserRegisterForm from django.contrib.aut...
true
true
1c43b5a1abad2c7406e4069e04015d92cba013a2
1,523
py
Python
flax/linen/__init__.py
psc-g/flax
3ebc3e9751c3d28a78e715ba8a738e56ec1298fb
[ "Apache-2.0" ]
null
null
null
flax/linen/__init__.py
psc-g/flax
3ebc3e9751c3d28a78e715ba8a738e56ec1298fb
[ "Apache-2.0" ]
null
null
null
flax/linen/__init__.py
psc-g/flax
3ebc3e9751c3d28a78e715ba8a738e56ec1298fb
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 The Flax Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
43.514286
84
0.73933
from .activation import (celu, elu, gelu, glu, leaky_relu, log_sigmoid, log_softmax, relu, sigmoid, soft_sign, softmax, softplus, swish, silu, tanh) from .attention import (MultiHeadDotProductAttention, SelfAttention, dot_product_attention, ma...
true
true
1c43b639de52cca5596c31b8a080b350134776da
1,265
py
Python
pyxt/cmd/tests/test_python.py
millerdev/pyxt
64034dd17b47a81ebfd0160102919e1f84299a6d
[ "MIT" ]
3
2021-01-10T18:32:15.000Z
2021-01-12T08:13:29.000Z
pyxt/cmd/tests/test_python.py
millerdev/pyxt
64034dd17b47a81ebfd0160102919e1f84299a6d
[ "MIT" ]
null
null
null
pyxt/cmd/tests/test_python.py
millerdev/pyxt
64034dd17b47a81ebfd0160102919e1f84299a6d
[ "MIT" ]
null
null
null
from testil import eq, Regex from ...process import ProcessError from ...tests.util import async_test, do_command, FakeEditor, gentest def test_doc(): @gentest @async_test async def test(code, output, command="python"): editor = FakeEditor(text=code) result = await do_command(command, edi...
21.440678
69
0.484585
from testil import eq, Regex from ...process import ProcessError from ...tests.util import async_test, do_command, FakeEditor, gentest def test_doc(): @gentest @async_test async def test(code, output, command="python"): editor = FakeEditor(text=code) result = await do_command(command, edi...
true
true
1c43b66e895ab1fc296ada51275d11e5502c75e8
2,859
py
Python
artemis/neural_models/text_emotional_clf.py
StanfordGeometryLab/artemis
2f540173bfd2da3a505715a260834533c3097ac7
[ "MIT" ]
254
2021-01-20T08:24:53.000Z
2022-03-30T11:57:23.000Z
artemis/neural_models/text_emotional_clf.py
StanfordGeometryLab/artemis
2f540173bfd2da3a505715a260834533c3097ac7
[ "MIT" ]
11
2021-03-26T21:49:22.000Z
2022-02-27T10:53:52.000Z
artemis/neural_models/text_emotional_clf.py
lyrs/artemis
e4938ef79b504e810e4d3634eab23781b06a926e
[ "MIT" ]
21
2021-01-21T10:31:44.000Z
2022-03-24T15:54:05.000Z
""" Given an utterance (an optionally an image) guess a distribution over the emotion labels. The MIT License (MIT) Originally created in 2020, for Python 3.x Copyright (c) 2021 Panos Achlioptas (ai.stanford.edu/~optas) & Stanford Geometric Computing Lab """ import torch import torch.nn.functional as F from torch imp...
30.414894
95
0.644281
import torch import torch.nn.functional as F from torch import nn from tqdm.notebook import tqdm as tqdm_notebook from ..utils.stats import AverageMeter class TextEmotionClassifier(nn.Module): def __init__(self, text_encoder, clf_head, img_encoder=None): super(TextEmotionClassifier, self).__init__() ...
true
true
1c43b6cc0328e741416a790b6fc9f09366c36e66
6,270
py
Python
s64da_benchmark_toolkit/streams.py
a-masterov/s64da-benchmark-toolkit
b1af60c6a1c7d4c62ae9fb5ce04e2c7b59002b0b
[ "MIT" ]
15
2020-03-27T09:40:12.000Z
2022-03-25T19:55:53.000Z
s64da_benchmark_toolkit/streams.py
a-masterov/s64da-benchmark-toolkit
b1af60c6a1c7d4c62ae9fb5ce04e2c7b59002b0b
[ "MIT" ]
43
2020-03-25T10:03:11.000Z
2021-06-02T01:15:17.000Z
s64da_benchmark_toolkit/streams.py
a-masterov/s64da-benchmark-toolkit
b1af60c6a1c7d4c62ae9fb5ce04e2c7b59002b0b
[ "MIT" ]
6
2020-10-08T11:32:40.000Z
2021-11-17T21:20:44.000Z
# -*- coding: utf-8 -*- import logging import os import csv import re import time from collections import namedtuple from datetime import datetime from multiprocessing import Manager, Pool from natsort import natsorted from pandas.io.formats.style import Styler import pandas import yaml from .db import DB from .rep...
33.891892
104
0.586762
import logging import os import csv import re import time from collections import namedtuple from datetime import datetime from multiprocessing import Manager, Pool from natsort import natsorted from pandas.io.formats.style import Styler import pandas import yaml from .db import DB from .reporting import Reporting,...
true
true
1c43b72ee207df26d65dcf522df11744b18aa4c7
2,513
py
Python
lib/python/treadmill/rest/api/ipa.py
bretttegart/treadmill
812109e31c503a6eddaee2d3f2e1faf2833b6aaf
[ "Apache-2.0" ]
2
2017-10-31T18:48:20.000Z
2018-03-04T20:35:20.000Z
lib/python/treadmill/rest/api/ipa.py
bretttegart/treadmill
812109e31c503a6eddaee2d3f2e1faf2833b6aaf
[ "Apache-2.0" ]
null
null
null
lib/python/treadmill/rest/api/ipa.py
bretttegart/treadmill
812109e31c503a6eddaee2d3f2e1faf2833b6aaf
[ "Apache-2.0" ]
null
null
null
"""Treadmill IPA REST api. """ import flask import flask_restplus as restplus from flask_restplus import fields # Disable E0611: No 'name' in module from treadmill import webutils # pylint: disable=E0611 def handle_api_error(func): def wrapper(*args): try: return func(*args) except ...
25.907216
74
0.566255
import flask import flask_restplus as restplus from flask_restplus import fields from treadmill import webutils def handle_api_error(func): def wrapper(*args): try: return func(*args) except Exception as e: return flask.abort(400, {'message': e.message}) return wrapp...
true
true
1c43b75a0f460e40be0b6a22f54c96dad9885e8b
1,340
py
Python
src/mappening/api/models/user.py
ucladevx/Bmaps-Backend
8dcbb4ca98d183499e03429b944ec0c7865065a6
[ "MIT" ]
3
2019-11-22T15:36:16.000Z
2020-03-13T09:52:45.000Z
src/mappening/api/models/user.py
ucladevx/Mappening-Backend
8dcbb4ca98d183499e03429b944ec0c7865065a6
[ "MIT" ]
59
2017-11-03T00:55:20.000Z
2019-05-09T02:07:50.000Z
src/mappening/api/models/user.py
ucladevx/Mappening-Backend
8dcbb4ca98d183499e03429b944ec0c7865065a6
[ "MIT" ]
2
2018-09-15T08:51:12.000Z
2019-02-03T04:32:09.000Z
from mappening.auth.facebook import facebook_oauth from mappening.auth.google import google_oauth from flask import session from flask_login import UserMixin # UserMixin provides default implementations for methods user objs should have class User(UserMixin): def __init__(self, user_id, active=True, admin=False):...
30.454545
78
0.730597
from mappening.auth.facebook import facebook_oauth from mappening.auth.google import google_oauth from flask import session from flask_login import UserMixin class User(UserMixin): def __init__(self, user_id, active=True, admin=False): self.user_id = user_id self.active = active self.admin...
true
true
1c43b7619606c51986086aabf83c8f3c2b0ac47e
1,583
py
Python
kolla/tests/base.py
XieXianbin/kolla
2548c67ad906ad74edd0517a14cda5ddba0fe2a3
[ "Apache-2.0" ]
1
2017-03-30T08:09:22.000Z
2017-03-30T08:09:22.000Z
kolla/tests/base.py
XieXianbin/kolla
2548c67ad906ad74edd0517a14cda5ddba0fe2a3
[ "Apache-2.0" ]
9
2019-02-28T09:15:43.000Z
2021-03-16T14:34:31.000Z
kolla/tests/base.py
XieXianbin/kolla
2548c67ad906ad74edd0517a14cda5ddba0fe2a3
[ "Apache-2.0" ]
3
2016-06-16T17:11:06.000Z
2021-01-24T11:51:21.000Z
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under th...
35.177778
74
0.715098
import os import fixtures import mock from oslo_config import cfg from oslotest import base as oslotest_base from kolla.common import config as common_config TESTS_ROOT = os.path.dirname(os.path.abspath(__file__)) class TestCase(oslotest_base.BaseTestCase): config_file = None def setUp(self): su...
true
true
1c43b77505fa88b9dd35639fc897dd305727a598
439
py
Python
tests/view/glprograms/test_highlightprogram.py
gsanhueza/BlastSight
4b5c48e7ea5f67b737429f05d5213e9ff1fd399d
[ "MIT" ]
null
null
null
tests/view/glprograms/test_highlightprogram.py
gsanhueza/BlastSight
4b5c48e7ea5f67b737429f05d5213e9ff1fd399d
[ "MIT" ]
1
2022-03-13T17:35:35.000Z
2022-03-13T17:35:35.000Z
tests/view/glprograms/test_highlightprogram.py
gsanhueza/BlastSight
4b5c48e7ea5f67b737429f05d5213e9ff1fd399d
[ "MIT" ]
null
null
null
#!/usr/bin/env python from blastsight.view.drawables.meshgl import MeshGL from blastsight.view.glprograms.highlightprogram import HighlightProgram from tests.view.glprograms.test_meshprogram import TestMeshProgram class TestHighlightProgram(TestMeshProgram): @property def base_program(self): return H...
27.4375
72
0.783599
from blastsight.view.drawables.meshgl import MeshGL from blastsight.view.glprograms.highlightprogram import HighlightProgram from tests.view.glprograms.test_meshprogram import TestMeshProgram class TestHighlightProgram(TestMeshProgram): @property def base_program(self): return HighlightProgram() ...
true
true
1c43b863155dae4837b09f4ac2b454f75e20c5ae
393
py
Python
environment/lib/python3.7/site-packages/visions/application/summaries/series/numerical_basic_summary.py
sid-the-coder/Easy-Data-Analysis-With-Pandas
5ae2a867e5a548e34f28aec89e49c361071b872c
[ "MIT" ]
76
2020-07-06T14:44:05.000Z
2022-02-14T15:30:21.000Z
environment/lib/python3.7/site-packages/visions/application/summaries/series/numerical_basic_summary.py
sid-the-coder/Easy-Data-Analysis-With-Pandas
5ae2a867e5a548e34f28aec89e49c361071b872c
[ "MIT" ]
11
2020-08-09T02:30:14.000Z
2022-03-12T00:50:14.000Z
environment/lib/python3.7/site-packages/visions/application/summaries/series/numerical_basic_summary.py
sid-the-coder/Easy-Data-Analysis-With-Pandas
5ae2a867e5a548e34f28aec89e49c361071b872c
[ "MIT" ]
11
2020-07-12T16:18:07.000Z
2022-02-05T16:48:35.000Z
import pandas as pd def numerical_basic_summary(series: pd.Series) -> dict: """Summary with basic aggregates Args: series: series to summarize Returns: A summary of aggregates of `mean`, `std`, `var`, `min`, `max` and `sum`. """ aggregates = ["mean", "std", "var", "min", "max", ...
23.117647
80
0.608142
import pandas as pd def numerical_basic_summary(series: pd.Series) -> dict: aggregates = ["mean", "std", "var", "min", "max", "sum"] summary = series.agg(aggregates).to_dict() return summary
true
true
1c43b88f742b955290b3e10e86719a3de9715e92
3,878
py
Python
setup.py
titu1994/lambda_networks_pt
326006a5ad3dcadc6bfb12da10b5f9530f2305c5
[ "MIT" ]
14
2021-02-22T00:37:48.000Z
2022-03-03T02:19:45.000Z
setup.py
titu1994/lambda_networks_pt
326006a5ad3dcadc6bfb12da10b5f9530f2305c5
[ "MIT" ]
null
null
null
setup.py
titu1994/lambda_networks_pt
326006a5ad3dcadc6bfb12da10b5f9530f2305c5
[ "MIT" ]
2
2021-08-05T01:56:02.000Z
2022-01-04T10:49:15.000Z
import io import os import re import sys from shutil import rmtree from setuptools import find_packages, setup, Command # Package arguments PACKAGE_NAME = "lambda_networks_pt" DIRECTORY_NAME = "lambda_networks" SHORT_DESCRIPION = "Pytorch implementation of Lambda Networks (https://arxiv.org/abs/2102.08602)" URL = "htt...
27.503546
97
0.643373
import io import os import re import sys from shutil import rmtree from setuptools import find_packages, setup, Command PACKAGE_NAME = "lambda_networks_pt" DIRECTORY_NAME = "lambda_networks" SHORT_DESCRIPION = "Pytorch implementation of Lambda Networks (https://arxiv.org/abs/2102.08602)" URL = "https://github.com/titu...
true
true
1c43b8cab6d9a2416dab97205ef74dfc1b20fc61
975
py
Python
test/Backend/Iree/Sample/simple_invoke.py
raikonenfnu/mlir-npcomp
29e1b2fe89848d58c9bc07e7df7ce651850a5244
[ "Apache-2.0" ]
null
null
null
test/Backend/Iree/Sample/simple_invoke.py
raikonenfnu/mlir-npcomp
29e1b2fe89848d58c9bc07e7df7ce651850a5244
[ "Apache-2.0" ]
null
null
null
test/Backend/Iree/Sample/simple_invoke.py
raikonenfnu/mlir-npcomp
29e1b2fe89848d58c9bc07e7df7ce651850a5244
[ "Apache-2.0" ]
null
null
null
# RUN: %PYTHON %s # TODO: Numpy compiler has bitrotted. # XFAIL: * from npcomp.compiler.numpy.backend import iree from npcomp.compiler.numpy.frontend import * from npcomp.compiler.numpy import test_config from npcomp.compiler.numpy.target import * from npcomp.compiler.utils import logging # TODO: This should all exis...
23.214286
60
0.751795
from npcomp.compiler.numpy.backend import iree from npcomp.compiler.numpy.frontend import * from npcomp.compiler.numpy import test_config from npcomp.compiler.numpy.target import * from npcomp.compiler.utils import logging from _npcomp import mlir logging.enable() def compile_function(f): fe = ImportFrontend(co...
true
true
1c43baab07473eaec142ec9e6c4ab210843578ac
654
py
Python
tests/opcodes/cases/test_assert_cmpge_27.py
juztin/pytezos-1
7e608ff599d934bdcf129e47db43dbdb8fef9027
[ "MIT" ]
1
2021-05-20T16:52:08.000Z
2021-05-20T16:52:08.000Z
tests/opcodes/cases/test_assert_cmpge_27.py
juztin/pytezos-1
7e608ff599d934bdcf129e47db43dbdb8fef9027
[ "MIT" ]
1
2020-12-30T16:44:56.000Z
2020-12-30T16:44:56.000Z
tests/opcodes/cases/test_assert_cmpge_27.py
tqtezos/pytezos
a4ac0b022d35d4c9f3062609d8ce09d584b5faa8
[ "MIT" ]
1
2022-03-20T19:01:00.000Z
2022-03-20T19:01:00.000Z
from unittest import TestCase from tests import abspath from pytezos.repl.interpreter import Interpreter from pytezos.michelson.converter import michelson_to_micheline from pytezos.repl.parser import parse_expression class OpcodeTestassert_cmpge_27(TestCase): def setUp(self): self.maxDiff = None ...
29.727273
89
0.7263
from unittest import TestCase from tests import abspath from pytezos.repl.interpreter import Interpreter from pytezos.michelson.converter import michelson_to_micheline from pytezos.repl.parser import parse_expression class OpcodeTestassert_cmpge_27(TestCase): def setUp(self): self.maxDiff = None ...
true
true
1c43baccd072765a676117f3125d7e2c4ceb4fb3
3,361
py
Python
entsoe_client/Queries/Congestion/Congestion.py
DarioHett/entsoe-client
bb424fa54966d3be49daa1edb9e0fd40ed00ac15
[ "MIT" ]
1
2021-10-03T18:11:57.000Z
2021-10-03T18:11:57.000Z
entsoe_client/Queries/Congestion/Congestion.py
DarioHett/entsoe-client
bb424fa54966d3be49daa1edb9e0fd40ed00ac15
[ "MIT" ]
1
2021-11-08T16:54:10.000Z
2021-11-08T16:54:10.000Z
entsoe_client/Queries/Congestion/Congestion.py
DarioHett/entsoe-client
bb424fa54966d3be49daa1edb9e0fd40ed00ac15
[ "MIT" ]
1
2021-12-04T21:24:53.000Z
2021-12-04T21:24:53.000Z
from typing import Union import pandas as pd from entsoe_client.ParameterTypes import * from entsoe_client.Queries import Query class Congestion(Query): """4.3 Congestion domain.""" def __init__( self, documentType: DocumentType = None, businessType: BusinessType = None, in_...
28.243697
82
0.628384
from typing import Union import pandas as pd from entsoe_client.ParameterTypes import * from entsoe_client.Queries import Query class Congestion(Query): def __init__( self, documentType: DocumentType = None, businessType: BusinessType = None, in_Domain: Area = None, out_...
true
true
1c43bb10e64934bf4ab7ac1a74d3b67d14c2f676
1,060
py
Python
recon/linker.py
kabirkhan/recon
19a7c3c644c4e5833fb326958ee090343a45352a
[ "MIT" ]
4
2020-11-27T10:31:14.000Z
2021-05-21T11:03:08.000Z
recon/linker.py
kabirkhan/recon
19a7c3c644c4e5833fb326958ee090343a45352a
[ "MIT" ]
null
null
null
recon/linker.py
kabirkhan/recon
19a7c3c644c4e5833fb326958ee090343a45352a
[ "MIT" ]
1
2020-11-27T10:29:14.000Z
2020-11-27T10:29:14.000Z
from abc import ABC, abstractmethod from typing import Iterable, Iterator from recon.types import Example from spacy.kb import KnowledgeBase class BaseEntityLinker(ABC): @abstractmethod def __call__(self, examples: Iterable[Example]) -> Iterator[Example]: raise NotImplementedError class EntityLinke...
29.444444
73
0.633962
from abc import ABC, abstractmethod from typing import Iterable, Iterator from recon.types import Example from spacy.kb import KnowledgeBase class BaseEntityLinker(ABC): @abstractmethod def __call__(self, examples: Iterable[Example]) -> Iterator[Example]: raise NotImplementedError class EntityLinke...
true
true
1c43bc71e3358de509f11b212de4a7edb29ba5c0
1,032
py
Python
sdk/python/pulumi_azure_native/healthcareapis/v20190916/__init__.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/healthcareapis/v20190916/__init__.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/healthcareapis/v20190916/__init__.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** # Export this package's modules as members: from ._enums import * from .get_service import * from .service import * from ._inputs import * from . impor...
30.352941
105
0.679264
# Export this package's modules as members: from ._enums import * from .get_service import * from .service import * from ._inputs import * from . import outputs def _register_module(): import pulumi from ... import _utilities class Module(pulumi.runtime.ResourceModule): _version = _utilities.get...
true
true
1c43bc9888ddbc540bdce99066fbea77b993c8a9
436
py
Python
ProjectEuler/p036.py
TISparta/competitive-programming-solutions
31987d4e67bb874bf15653565c6418b5605a20a8
[ "MIT" ]
1
2018-01-30T13:21:30.000Z
2018-01-30T13:21:30.000Z
ProjectEuler/p036.py
TISparta/competitive-programming-solutions
31987d4e67bb874bf15653565c6418b5605a20a8
[ "MIT" ]
null
null
null
ProjectEuler/p036.py
TISparta/competitive-programming-solutions
31987d4e67bb874bf15653565c6418b5605a20a8
[ "MIT" ]
1
2018-08-29T13:26:50.000Z
2018-08-29T13:26:50.000Z
# Execution time : 0.768209 seconds # Solution Explanation # And naive brute-force approach is enough. import time width = 40 def solution(): return sum(it for it in range(1000000) if str(it)[:]==str(it)[::-1] and bin(it)[2:]==bin(it)[:1:-1]) if __name__=="__main__": start_ = time.time() print(' Answe...
24.222222
104
0.614679
import time width = 40 def solution(): return sum(it for it in range(1000000) if str(it)[:]==str(it)[::-1] and bin(it)[2:]==bin(it)[:1:-1]) if __name__=="__main__": start_ = time.time() print(' Answer -> %s '.center(width,'-') % ( solution() )) print(' %f seconds '.center(width,'-') % ( time.time(...
true
true