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
f71b9fe025bede004ce7e9ec58b828318f04188f
15,536
py
Python
src/api/block.py
BluCodeGH/Amulet-Map-Editor
7d1d2243fc29095b3cffe8aa4979235444ba6738
[ "MIT" ]
1
2020-08-26T22:42:16.000Z
2020-08-26T22:42:16.000Z
src/api/block.py
BluCodeGH/Amulet-Map-Editor
7d1d2243fc29095b3cffe8aa4979235444ba6738
[ "MIT" ]
null
null
null
src/api/block.py
BluCodeGH/Amulet-Map-Editor
7d1d2243fc29095b3cffe8aa4979235444ba6738
[ "MIT" ]
null
null
null
from __future__ import annotations import copy from sys import getsizeof import re from typing import Dict, Iterable, List, Tuple, Union, overload from api.errors import InvalidBlockException from utils import Int class Block: """ Class to handle data about various blockstates and allow for extra blocks to ...
35.149321
159
0.613092
from __future__ import annotations import copy from sys import getsizeof import re from typing import Dict, Iterable, List, Tuple, Union, overload from api.errors import InvalidBlockException from utils import Int class Block: __slots__ = ( "_namespace", "_base_name", "_properties", ...
true
true
f71ba01410b6baed59ee6dcd47fff57fa191f5b4
22,545
py
Python
tests/test_setup.py
PiotrMachowski/core
b9d7d0cae2ccd2d88e90e49cc09e154a27ed809b
[ "Apache-2.0" ]
3
2020-11-27T06:26:27.000Z
2020-12-09T14:55:16.000Z
tests/test_setup.py
PiotrMachowski/core
b9d7d0cae2ccd2d88e90e49cc09e154a27ed809b
[ "Apache-2.0" ]
18
2021-11-24T06:26:13.000Z
2022-03-31T06:25:15.000Z
tests/test_setup.py
PiotrMachowski/core
b9d7d0cae2ccd2d88e90e49cc09e154a27ed809b
[ "Apache-2.0" ]
3
2021-11-14T13:29:33.000Z
2021-12-27T17:05:22.000Z
"""Test component/platform setup.""" # pylint: disable=protected-access import asyncio import datetime import threading from unittest.mock import AsyncMock, Mock, patch import pytest import voluptuous as vol from homeassistant import config_entries, setup from homeassistant.const import EVENT_COMPONENT_LOADED, EVENT_...
32.485591
87
0.668751
import asyncio import datetime import threading from unittest.mock import AsyncMock, Mock, patch import pytest import voluptuous as vol from homeassistant import config_entries, setup from homeassistant.const import EVENT_COMPONENT_LOADED, EVENT_HOMEASSISTANT_START from homeassistant.core import callback from homeas...
true
true
f71ba0d3b326ae8b8647aa96334c5b3c71a2f678
865
py
Python
epycom/univariate/__init__.py
ICRC-BME/epycom
5bfa3fb9020f04536b7a08382533c8abf56ca85f
[ "Apache-2.0" ]
null
null
null
epycom/univariate/__init__.py
ICRC-BME/epycom
5bfa3fb9020f04536b7a08382533c8abf56ca85f
[ "Apache-2.0" ]
1
2020-10-22T19:10:57.000Z
2020-10-22T21:09:02.000Z
epycom/univariate/__init__.py
ICRC-BME/epycom
5bfa3fb9020f04536b7a08382533c8abf56ca85f
[ "Apache-2.0" ]
1
2021-02-24T10:07:32.000Z
2021-02-24T10:07:32.000Z
from .signal_stats import compute_signal_stats, SignalStats from .hjorth_mobility import compute_hjorth_mobility, HjorthMobility from .hjorth_complexity import compute_hjorth_complexity, HjorthComplexity from .lyapunov_exponent import compute_lyapunov_exponent, LyapunovExponent from .power_spectral_entropy import compu...
61.785714
74
0.861272
from .signal_stats import compute_signal_stats, SignalStats from .hjorth_mobility import compute_hjorth_mobility, HjorthMobility from .hjorth_complexity import compute_hjorth_complexity, HjorthComplexity from .lyapunov_exponent import compute_lyapunov_exponent, LyapunovExponent from .power_spectral_entropy import compu...
true
true
f71ba1197905e6582410e47931bec23c9ece6799
8,846
py
Python
Code/CarbonEquiv_Talmy.py
gshowalt/VirusPopModel
8d41294fa06a44e8fa22ef390d6db14fba7818a1
[ "CC0-1.0" ]
null
null
null
Code/CarbonEquiv_Talmy.py
gshowalt/VirusPopModel
8d41294fa06a44e8fa22ef390d6db14fba7818a1
[ "CC0-1.0" ]
null
null
null
Code/CarbonEquiv_Talmy.py
gshowalt/VirusPopModel
8d41294fa06a44e8fa22ef390d6db14fba7818a1
[ "CC0-1.0" ]
null
null
null
# importing all modules import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt import matplotlib.colors as colors from matplotlib import cm import matplotlib.tri as tri from matplotlib.colors import LogNorm import matplotlib.patches as mpatches from matplotlib.ticker import LogFormatter from co...
31.592857
123
0.618698
import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt import matplotlib.colors as colors from matplotlib import cm import matplotlib.tri as tri from matplotlib.colors import LogNorm import matplotlib.patches as mpatches from matplotlib.ticker import LogFormatter from collections import Counte...
true
true
f71ba11fdfcf3709595b11c90277b8596127a219
3,479
py
Python
WonderPy/components/wwCommandHead.py
avrabe/WonderPy
60d81340bed1085c32803b32209fbbd4c291310a
[ "MIT" ]
1
2019-05-25T16:55:32.000Z
2019-05-25T16:55:32.000Z
WonderPy/components/wwCommandHead.py
avrabe/WonderPy
60d81340bed1085c32803b32209fbbd4c291310a
[ "MIT" ]
null
null
null
WonderPy/components/wwCommandHead.py
avrabe/WonderPy
60d81340bed1085c32803b32209fbbd4c291310a
[ "MIT" ]
null
null
null
from WonderPy.core.wwConstants import WWRobotConstants from WonderPy.util import wwMath from .wwCommandBase import WWCommandBase, do_not_call_within_connect_or_sensors _rc = WWRobotConstants.RobotComponent _rcv = WWRobotConstants.RobotComponentValues _rp = WWRobotConstants.RobotProperties class WWCommandHead(WWComma...
43.4875
106
0.742167
from WonderPy.core.wwConstants import WWRobotConstants from WonderPy.util import wwMath from .wwCommandBase import WWCommandBase, do_not_call_within_connect_or_sensors _rc = WWRobotConstants.RobotComponent _rcv = WWRobotConstants.RobotComponentValues _rp = WWRobotConstants.RobotProperties class WWCommandHead(WWComma...
true
true
f71ba187051fb0b138a6e1bd429718edeada1fc7
38,002
py
Python
src/azure-cli/azure/cli/command_modules/monitor/grammar/MetricAlertConditionParser.py
psignoret/azure-cli
1a4a043750315f9a7f2894b4287126089978b615
[ "MIT" ]
1
2019-12-12T19:55:26.000Z
2019-12-12T19:55:26.000Z
src/azure-cli/azure/cli/command_modules/monitor/grammar/MetricAlertConditionParser.py
psignoret/azure-cli
1a4a043750315f9a7f2894b4287126089978b615
[ "MIT" ]
2
2021-01-15T09:24:07.000Z
2021-01-15T09:30:10.000Z
src/azure-cli/azure/cli/command_modules/monitor/grammar/MetricAlertConditionParser.py
psignoret/azure-cli
1a4a043750315f9a7f2894b4287126089978b615
[ "MIT" ]
1
2019-11-25T19:33:05.000Z
2019-11-25T19:33:05.000Z
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
36.47025
406
0.599416
from __future__ import print_function from antlr4 import * from io import StringIO import sys def serializedATN(): with StringIO() as buf: buf.write(u"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3") buf.write(u"\26~\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7") buf.writ...
true
true
f71ba2edf1eecc10a8e2f66fde3fb97bc55e8af1
6,386
py
Python
examples/pwr_run/checkpointing/debug/ovhd_profile/job6.py
boringlee24/keras_old
1e1176c45c4952ba1b9b9e58e9cc4df027ab111d
[ "MIT" ]
null
null
null
examples/pwr_run/checkpointing/debug/ovhd_profile/job6.py
boringlee24/keras_old
1e1176c45c4952ba1b9b9e58e9cc4df027ab111d
[ "MIT" ]
null
null
null
examples/pwr_run/checkpointing/debug/ovhd_profile/job6.py
boringlee24/keras_old
1e1176c45c4952ba1b9b9e58e9cc4df027ab111d
[ "MIT" ]
null
null
null
""" #Trains a ResNet on the CIFAR10 dataset. """ from __future__ import print_function import keras from keras.layers import Dense, Conv2D, BatchNormalization, Activation from keras.layers import AveragePooling2D, Input, Flatten from keras.optimizers import Adam from keras.callbacks import ModelCheckpoint, LearningRa...
31
118
0.699812
from __future__ import print_function import keras from keras.layers import Dense, Conv2D, BatchNormalization, Activation from keras.layers import AveragePooling2D, Input, Flatten from keras.optimizers import Adam from keras.callbacks import ModelCheckpoint, LearningRateScheduler from keras.callbacks import ReduceLROn...
true
true
f71ba41051966044cb90f99889d007761687b585
1,003
py
Python
bldr/cmd/init.py
bldr-cmd/bldr-cmd
300750fbccc2987efd23f69b7b2d76d8563e2995
[ "Apache-2.0" ]
null
null
null
bldr/cmd/init.py
bldr-cmd/bldr-cmd
300750fbccc2987efd23f69b7b2d76d8563e2995
[ "Apache-2.0" ]
null
null
null
bldr/cmd/init.py
bldr-cmd/bldr-cmd
300750fbccc2987efd23f69b7b2d76d8563e2995
[ "Apache-2.0" ]
null
null
null
""" `init` Command """ import os import click import bldr import bldr.dep import bldr.gen.render from bldr.environment import Environment from bldr.gen.render import CopyTemplatesRender from bldr.cli import pass_environment, run_cmd dotbldr_path = os.path.join(os.path.abspath(os.path.dirname(bldr.__f...
29.5
88
0.694915
import os import click import bldr import bldr.dep import bldr.gen.render from bldr.environment import Environment from bldr.gen.render import CopyTemplatesRender from bldr.cli import pass_environment, run_cmd dotbldr_path = os.path.join(os.path.abspath(os.path.dirname(bldr.__file__)), "dotbldr") @clic...
true
true
f71ba50a7212de1e86d1518d29a3a1762b8ef020
1,709
py
Python
ooobuild/lo/datatransfer/x_transferable_ex.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
ooobuild/lo/datatransfer/x_transferable_ex.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
ooobuild/lo/datatransfer/x_transferable_ex.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # # Copyright 2022 :Barry-Thomas-Paul: Moss # # 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 applicab...
37.152174
143
0.752487
import typing from abc import abstractmethod from ..uno.x_interface import XInterface as XInterface_8f010a43 if typing.TYPE_CHECKING: from .data_flavor import DataFlavor as DataFlavor_ffd30deb class XTransferableEx(XInterface_8f010a43): __ooo_ns__: str = 'com.sun.star.datatransfer' __oo...
true
true
f71ba695de947ffa31af9c54c82d879f96136684
20,681
py
Python
sdk/cdn/azure-mgmt-cdn/tests/test_cli_mgmt_cdn.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
sdk/cdn/azure-mgmt-cdn/tests/test_cli_mgmt_cdn.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
sdk/cdn/azure-mgmt-cdn/tests/test_cli_mgmt_cdn.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. #----------------------------------------------------------------------...
36.218914
205
0.499782
import os import unittest import azure.mgmt.cdn from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer AZURE_LOCATION = 'eastus' class MgmtCdnTest(AzureMgmtTestCase): def setUp(self): super(MgmtCdnTest, self).setUp() self.mgmt_client = self.create_mgmt_client( ...
true
true
f71ba71e6fe75b165544ce78ca9d1518a8b10f31
142
py
Python
anoi/tests/test_anoitypes.py
jriehl/anoi
1a7b1759824cd4615731e8d053a4bb04d4f3fea3
[ "MIT" ]
null
null
null
anoi/tests/test_anoitypes.py
jriehl/anoi
1a7b1759824cd4615731e8d053a4bb04d4f3fea3
[ "MIT" ]
null
null
null
anoi/tests/test_anoitypes.py
jriehl/anoi
1a7b1759824cd4615731e8d053a4bb04d4f3fea3
[ "MIT" ]
null
null
null
import unittest from .. import anoitypes class TestANOITypes(unittest.TestCase): pass if __name__ == '__main__': unittest.main()
11.833333
39
0.711268
import unittest from .. import anoitypes class TestANOITypes(unittest.TestCase): pass if __name__ == '__main__': unittest.main()
true
true
f71ba7b251e9bf8b98ca35f68d542663d3b132e2
2,286
py
Python
src/main/resources/de/mpg/biochem/mars/fx/dashboard/xychart.py
imagejan/mars-fx
8e493c3c9e02aba20747598827b503c3172f949b
[ "BSD-2-Clause" ]
3
2020-03-10T18:02:09.000Z
2021-09-21T16:52:58.000Z
src/main/resources/de/mpg/biochem/mars/fx/dashboard/xychart.py
imagejan/mars-fx
8e493c3c9e02aba20747598827b503c3172f949b
[ "BSD-2-Clause" ]
51
2020-03-30T11:42:44.000Z
2022-03-16T07:09:16.000Z
src/main/resources/de/mpg/biochem/mars/fx/dashboard/xychart.py
imagejan/mars-fx
8e493c3c9e02aba20747598827b503c3172f949b
[ "BSD-2-Clause" ]
2
2021-04-20T11:51:38.000Z
2021-09-21T16:39:12.000Z
#@OUTPUT String xlabel #@OUTPUT String ylabel #@OUTPUT String title # OUTPUT Double xmin # OUTPUT Double xmax # OUTPUT Double ymin # OUTPUT Double ymax # xmin = -2.0 # xmax = 2.0 # ymin = -2.0 # ymax = 2.0 # Set global outputs xlabel = "X" ylabel = "Y" title = "XY Chart" import math from java.util import Random from...
24.319149
112
0.737533
xlabel = "X" ylabel = "Y" title = "XY Chart" import math from java.util import Random from java.lang import Double r = Random() series1_strokeColor = "rgb(" + str(r.nextInt(255)) + "," + str(r.nextInt(255)) + "," + str(r.nextInt(255)) + ")" series1_fillColor = series1_strokeColor series1_stroke...
true
true
f71ba974fcdaec851af4d51a7fedeed1954c2992
418
py
Python
homework/第 2 课/Aimee/1-Aimee.py
xrandx/-Dating-with-python-this-winter
d242faeda1598d50c3b371deeccfbbe3bbc8fb51
[ "Apache-2.0" ]
3
2021-01-03T10:10:25.000Z
2021-01-11T06:13:40.000Z
homework/第 2 课/Aimee/1-Aimee.py
xrandx/-Dating-with-python-this-winter
d242faeda1598d50c3b371deeccfbbe3bbc8fb51
[ "Apache-2.0" ]
null
null
null
homework/第 2 课/Aimee/1-Aimee.py
xrandx/-Dating-with-python-this-winter
d242faeda1598d50c3b371deeccfbbe3bbc8fb51
[ "Apache-2.0" ]
2
2021-01-08T10:12:17.000Z
2021-01-19T02:03:32.000Z
array=[2,5,8,9,3,6] a=[1,3,6] matrix=[a,[2,5,7]] array.append(1) print(matrix) print(array) new_list=array+matrix print(new_list) new_list.pop(-3) print(new_list) new_list[0]="T" print(new_list) # new_list.clear() # print(new_list) print(new_list.index(5)) table=tuple(["Monday","Tuesday"]) print(table[1]) string="1234...
17.416667
41
0.69378
array=[2,5,8,9,3,6] a=[1,3,6] matrix=[a,[2,5,7]] array.append(1) print(matrix) print(array) new_list=array+matrix print(new_list) new_list.pop(-3) print(new_list) new_list[0]="T" print(new_list) print(new_list.index(5)) table=tuple(["Monday","Tuesday"]) print(table[1]) string="123456789" print(string[1:-3]) f=open("...
true
true
f71ba98a374e556c7c9d0359e89bdb1f986ca8f0
43,300
py
Python
bin/api_connector_splunk/solnlib/packages/simpleyaml/emitter.py
CyberGRX/api-connector-splunk
7f1db1cecb7ae367c1882c3188dc9f8bcb6bc4c6
[ "MIT" ]
106
2018-03-09T13:03:05.000Z
2022-03-10T11:01:48.000Z
bin/api_connector_splunk/solnlib/packages/simpleyaml/emitter.py
CyberGRX/api-connector-splunk
7f1db1cecb7ae367c1882c3188dc9f8bcb6bc4c6
[ "MIT" ]
54
2016-08-11T14:22:30.000Z
2020-08-07T22:14:55.000Z
bin/api_connector_splunk/solnlib/packages/simpleyaml/emitter.py
CyberGRX/api-connector-splunk
7f1db1cecb7ae367c1882c3188dc9f8bcb6bc4c6
[ "MIT" ]
33
2018-04-23T20:18:11.000Z
2022-03-27T16:41:03.000Z
# Emitter expects events obeying the following grammar: # stream ::= STREAM-START document* STREAM-END # document ::= DOCUMENT-START node DOCUMENT-END # node ::= SCALAR | sequence | mapping # sequence ::= SEQUENCE-START node* SEQUENCE-END # mapping ::= MAPPING-START (node node)* MAPPING-END __all__ = ['Emitter', 'Emi...
37.949167
85
0.527737
__all__ = ['Emitter', 'EmitterError'] from .error import YAMLError from .events import * class EmitterError(YAMLError): pass class ScalarAnalysis(object): def __init__(self, scalar, empty, multiline, allow_flow_plain, allow_block_plain, allow_single_quoted, allow_double_quoted...
true
true
f71baa78a75aac20e49dcb9ac6b3ae5910b61a00
13,930
py
Python
vendor/istio.io/api/python/istio_api/mixer/v1/config/client/api_spec_pb2.py
PinZhang/istio
dce455456d77ca5af34ba5848f9704577349c6bd
[ "Apache-2.0" ]
40
2018-10-24T18:56:01.000Z
2021-12-30T22:05:33.000Z
vendor/istio.io/api/python/istio_api/mixer/v1/config/client/api_spec_pb2.py
PinZhang/istio
dce455456d77ca5af34ba5848f9704577349c6bd
[ "Apache-2.0" ]
17
2019-01-11T05:57:35.000Z
2019-08-29T05:33:38.000Z
vendor/istio.io/api/python/istio_api/mixer/v1/config/client/api_spec_pb2.py
PinZhang/istio
dce455456d77ca5af34ba5848f9704577349c6bd
[ "Apache-2.0" ]
14
2018-11-09T19:17:26.000Z
2021-12-16T16:36:24.000Z
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: mixer/v1/config/client/api_spec.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf imp...
43.26087
1,306
0.760876
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 from google...
true
true
f71baa8f160f4d36be63fb40e4502ee2b84f9a05
4,141
py
Python
pextant/solvers/SEXTANTsolver.py
norheim/pextant
f4235719279c0e6f178ae1e0f8b1ea3346533915
[ "MIT" ]
null
null
null
pextant/solvers/SEXTANTsolver.py
norheim/pextant
f4235719279c0e6f178ae1e0f8b1ea3346533915
[ "MIT" ]
1
2019-12-03T03:52:41.000Z
2019-12-04T14:50:36.000Z
pextant/solvers/SEXTANTsolver.py
norheim/pextant
f4235719279c0e6f178ae1e0f8b1ea3346533915
[ "MIT" ]
1
2019-12-03T02:37:57.000Z
2019-12-03T02:37:57.000Z
from pextant.lib.geoshapely import GeoPolygon, LONG_LAT import numpy as np import csv class SEXTANTSolver(object): def __init__(self, environmental_model, cost_function, viz): self.env_model = environmental_model self.cost_function = cost_function self.viz = viz self.searches = [] ...
34.508333
94
0.576914
from pextant.lib.geoshapely import GeoPolygon, LONG_LAT import numpy as np import csv class SEXTANTSolver(object): def __init__(self, environmental_model, cost_function, viz): self.env_model = environmental_model self.cost_function = cost_function self.viz = viz self.searches = [] ...
true
true
f71baa9da47252c881d3e4b3537037ac3e200836
3,658
py
Python
models/client.py
dssaenzml/federated_learning_nlp
b48fbeb3e78af5971885337203504c017ef1553b
[ "BSD-2-Clause" ]
2
2021-05-17T05:30:50.000Z
2021-05-18T16:20:10.000Z
models/client.py
dssaenzml/federated_learning_nlp
b48fbeb3e78af5971885337203504c017ef1553b
[ "BSD-2-Clause" ]
null
null
null
models/client.py
dssaenzml/federated_learning_nlp
b48fbeb3e78af5971885337203504c017ef1553b
[ "BSD-2-Clause" ]
1
2021-07-10T21:07:01.000Z
2021-07-10T21:07:01.000Z
import random import warnings class Client: def __init__(self, client_id, group=None, train_data={'x' : [],'y' : []}, eval_data={'x' : [],'y' : []}, model=None): self._model = model self.id = client_id self.group = group self.train_data = train_data self.eva...
34.509434
122
0.563423
import random import warnings class Client: def __init__(self, client_id, group=None, train_data={'x' : [],'y' : []}, eval_data={'x' : [],'y' : []}, model=None): self._model = model self.id = client_id self.group = group self.train_data = train_data self.eva...
true
true
f71bab718e68dcdd90ff7a41d77e7394ed89c45b
1,236
py
Python
tests/test_views.py
kingsdigitallab/django-geonames-place
2484abaee6896bafe2f86e93bffca634073a6d3b
[ "MIT" ]
3
2019-06-30T08:13:38.000Z
2020-06-09T22:30:17.000Z
tests/test_views.py
kingsdigitallab/django-geonames-place
2484abaee6896bafe2f86e93bffca634073a6d3b
[ "MIT" ]
null
null
null
tests/test_views.py
kingsdigitallab/django-geonames-place
2484abaee6896bafe2f86e93bffca634073a6d3b
[ "MIT" ]
null
null
null
""" test_django-geonames-place ------------ Tests for `django-geonames-place` views module. """ import unittest from django.conf import settings from django.test import Client, TestCase from django.urls import reverse from geonames_place.models import Place @unittest.skipUnless( settings.GEONAMES_KEY, 'No GEO...
30.146341
70
0.661812
import unittest from django.conf import settings from django.test import Client, TestCase from django.urls import reverse from geonames_place.models import Place @unittest.skipUnless( settings.GEONAMES_KEY, 'No GEONAMES_KEY environment variable set') class TestGeonamesPlaceViews(TestCase): def setUp(self)...
true
true
f71bac9cf6ccf566ff63cc6598f04ef5c0efd656
1,978
py
Python
tests/test_security_api_key_header_optional.py
jfunez/fastapi
7372f6ba11abb515a7f11814dba52a1d1c0925f0
[ "MIT" ]
2
2020-04-09T07:11:28.000Z
2020-12-12T14:04:35.000Z
tests/test_security_api_key_header_optional.py
jfunez/fastapi
7372f6ba11abb515a7f11814dba52a1d1c0925f0
[ "MIT" ]
1
2021-03-27T18:37:32.000Z
2021-05-25T15:08:24.000Z
tests/test_security_api_key_header_optional.py
jfunez/fastapi
7372f6ba11abb515a7f11814dba52a1d1c0925f0
[ "MIT" ]
1
2021-02-03T00:43:04.000Z
2021-02-03T00:43:04.000Z
from typing import Optional from fastapi import Depends, FastAPI, Security from fastapi.security import APIKeyHeader from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() api_key = APIKeyHeader(name="key", auto_error=False) class User(BaseModel): username: str def get_curre...
26.373333
80
0.592518
from typing import Optional from fastapi import Depends, FastAPI, Security from fastapi.security import APIKeyHeader from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() api_key = APIKeyHeader(name="key", auto_error=False) class User(BaseModel): username: str def get_curre...
true
true
f71bacf6ae00989a3846b6e65f0871f7161f845d
5,427
py
Python
docqa/elmo/ablate_elmo_sub_filter.py
Willyoung2017/doc-qa
7ee02218952b0b9db63bc82b3895f743cdbd8f22
[ "Apache-2.0" ]
null
null
null
docqa/elmo/ablate_elmo_sub_filter.py
Willyoung2017/doc-qa
7ee02218952b0b9db63bc82b3895f743cdbd8f22
[ "Apache-2.0" ]
null
null
null
docqa/elmo/ablate_elmo_sub_filter.py
Willyoung2017/doc-qa
7ee02218952b0b9db63bc82b3895f743cdbd8f22
[ "Apache-2.0" ]
null
null
null
import argparse from datetime import datetime from tensorflow.contrib.keras.python.keras.initializers import TruncatedNormal from docqa import trainer from docqa.data_processing.qa_training_data import ContextLenKey from docqa.dataset import ClusteredBatcher from docqa.encoder import DocumentAndQuestionEncoder, Singl...
49.336364
122
0.66206
import argparse from datetime import datetime from tensorflow.contrib.keras.python.keras.initializers import TruncatedNormal from docqa import trainer from docqa.data_processing.qa_training_data import ContextLenKey from docqa.dataset import ClusteredBatcher from docqa.encoder import DocumentAndQuestionEncoder, Singl...
true
true
f71badae1870e808949da29b629a3e7d4dc4fa3d
4,753
py
Python
i18n/i18n.py
AshleyFires/krux
80de3ee0df5e7147dd32c10967cac7c3e6aecd09
[ "MIT" ]
null
null
null
i18n/i18n.py
AshleyFires/krux
80de3ee0df5e7147dd32c10967cac7c3e6aecd09
[ "MIT" ]
null
null
null
i18n/i18n.py
AshleyFires/krux
80de3ee0df5e7147dd32c10967cac7c3e6aecd09
[ "MIT" ]
null
null
null
# The MIT License (MIT) # Copyright (c) 2021 Tom J. Sun # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, ...
43.605505
98
0.606775
import sys import json from os import listdir, walk from os.path import isfile, join import re import shutil SRC_DIR = '../src' TRANSLATION_FILES_DIR = 'translations' def find_translation_slugs(): slugs = {} for (dirpath, _, filenames) in walk(SRC_DIR): for filename in filenames: ...
true
true
f71badc6bf833dce168ea8abc5e6eedabacd9bc3
1,205
py
Python
pari/article/urls.py
theju/pari
318a4ffba08362e78253ded100a63f5b5c6eadf9
[ "BSD-3-Clause" ]
null
null
null
pari/article/urls.py
theju/pari
318a4ffba08362e78253ded100a63f5b5c6eadf9
[ "BSD-3-Clause" ]
null
null
null
pari/article/urls.py
theju/pari
318a4ffba08362e78253ded100a63f5b5c6eadf9
[ "BSD-3-Clause" ]
null
null
null
from django.conf.urls import patterns, url from .views import (LocationDetail, CategoriesList, CategoryDetail, ArticleDetail, ArticleList, KeywordDetail, AuthorDetail, ArchiveDetail, ArticleCarouselImageDetail) urlpatterns = patterns('pari.article.views', url(r'^categories/(?P<slug>.+)/$', Cat...
66.944444
128
0.674689
from django.conf.urls import patterns, url from .views import (LocationDetail, CategoriesList, CategoryDetail, ArticleDetail, ArticleList, KeywordDetail, AuthorDetail, ArchiveDetail, ArticleCarouselImageDetail) urlpatterns = patterns('pari.article.views', url(r'^categories/(?P<slug>.+)/$', Cat...
true
true
f71bae99af72eaffd84e9a35dfa07be932c56df2
4,017
py
Python
classes/Helpers.py
alexdevmotion/UnifiedEegLogger
735b2734fc9cd5dd9e6b7148b4310a4267624e63
[ "Apache-2.0" ]
1
2018-06-07T03:47:31.000Z
2018-06-07T03:47:31.000Z
classes/Helpers.py
alexdevmotion/unified-eeg-experiment-machine
735b2734fc9cd5dd9e6b7148b4310a4267624e63
[ "Apache-2.0" ]
null
null
null
classes/Helpers.py
alexdevmotion/unified-eeg-experiment-machine
735b2734fc9cd5dd9e6b7148b4310a4267624e63
[ "Apache-2.0" ]
null
null
null
from Tkinter import * from PIL import ImageTk, Image import tkMessageBox import sys import os def getNoImagesInDirectory(dir): return len(getImagesInDirectory(dir)) def getImagesInDirectory(dir): files = os.listdir(dir) images = [] for file in files: if file.lower().endswith((".jpg", ".png",...
30.664122
108
0.61638
from Tkinter import * from PIL import ImageTk, Image import tkMessageBox import sys import os def getNoImagesInDirectory(dir): return len(getImagesInDirectory(dir)) def getImagesInDirectory(dir): files = os.listdir(dir) images = [] for file in files: if file.lower().endswith((".jpg", ".png",...
true
true
f71baee95ce425491965abf613df86bac3425409
3,126
py
Python
acm/uri/1455-icpc-finals.py
neizod/problems
180aaf7d0ecfc3d0dd5f1d4345a7a4d83b1b884a
[ "MIT" ]
1
2015-10-17T11:15:42.000Z
2015-10-17T11:15:42.000Z
acm/uri/1455-icpc-finals.py
neizod/problems
180aaf7d0ecfc3d0dd5f1d4345a7a4d83b1b884a
[ "MIT" ]
null
null
null
acm/uri/1455-icpc-finals.py
neizod/problems
180aaf7d0ecfc3d0dd5f1d4345a7a4d83b1b884a
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import random from itertools import count from collections import namedtuple Point = namedtuple('Point', 'x y') Point.from_spec = lambda st: Point(*[float(si) for si in st.split()]) Circle = namedtuple('Circle', 'c r') Circle.__new__.__defaults__ = (Point(0, 0), 0) Circle.__contains__ = lambd...
28.944444
87
0.555662
import random from itertools import count from collections import namedtuple Point = namedtuple('Point', 'x y') Point.from_spec = lambda st: Point(*[float(si) for si in st.split()]) Circle = namedtuple('Circle', 'c r') Circle.__new__.__defaults__ = (Point(0, 0), 0) Circle.__contains__ = lambda s, p: s.r > 0 and sq...
true
true
f71baf805de10ecd0c891aeb9bfc3b748a4b7980
4,340
py
Python
openstack_dashboard/dashboards/project/instances/workflows/resize_instance.py
CplusShen/aurora-horizon
8df16b3b87097d5a19bae3752d4b341ac64bda75
[ "Apache-2.0" ]
1
2020-04-12T19:21:18.000Z
2020-04-12T19:21:18.000Z
openstack_dashboard/dashboards/project/instances/workflows/resize_instance.py
CplusShen/aurora-horizon
8df16b3b87097d5a19bae3752d4b341ac64bda75
[ "Apache-2.0" ]
12
2022-03-22T07:28:29.000Z
2022-03-22T07:29:55.000Z
openstack_dashboard/dashboards/project/instances/workflows/resize_instance.py
CplusShen/aurora-horizon
8df16b3b87097d5a19bae3752d4b341ac64bda75
[ "Apache-2.0" ]
2
2019-01-17T06:06:00.000Z
2019-08-07T02:21:07.000Z
# Copyright 2013 CentRin Data, 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...
38.75
79
0.65
import json from django.utils.translation import ugettext_lazy as _ from django.views.decorators.debug import sensitive_variables from horizon import exceptions from horizon import forms from horizon import workflows from openstack_dashboard import api from openstack_dashboard.dashboards.project.inst...
true
true
f71baf91c9ac2a1be7c1a45f7c74c72209692386
207
py
Python
tests/test_MBus_connect.py
droid4control/python-mbus
8e26c1847c06e57bc0e878ef3d6610dc9ba913b4
[ "BSD-3-Clause" ]
23
2015-05-19T15:57:40.000Z
2021-03-18T11:33:22.000Z
tests/test_MBus_connect.py
Sensenode/python-mbus
9b598ada5b3da17bb513cf78e5b4a8f2a3f9a1f1
[ "BSD-3-Clause" ]
14
2015-09-20T20:26:22.000Z
2020-05-13T16:39:15.000Z
tests/test_MBus_connect.py
neurobat/python-mbus
8e26c1847c06e57bc0e878ef3d6610dc9ba913b4
[ "BSD-3-Clause" ]
22
2015-07-27T08:50:44.000Z
2022-03-19T01:17:18.000Z
import sys sys.path.append('../python-mbus') import pytest from mbus import MBus @pytest.fixture def mbus_tcp(): return MBus.MBus(host="127.0.0.1") def test_connect(mbus_tcp): mbus_tcp.connect()
14.785714
38
0.714976
import sys sys.path.append('../python-mbus') import pytest from mbus import MBus @pytest.fixture def mbus_tcp(): return MBus.MBus(host="127.0.0.1") def test_connect(mbus_tcp): mbus_tcp.connect()
true
true
f71bafa9a01675524b1c846aa6c881e2336cfcb0
609
py
Python
utils.py
Duy-Vu/stock-network
3e84cfc581cd07001e86c20101c91c2f8910deb2
[ "MIT" ]
null
null
null
utils.py
Duy-Vu/stock-network
3e84cfc581cd07001e86c20101c91c2f8910deb2
[ "MIT" ]
null
null
null
utils.py
Duy-Vu/stock-network
3e84cfc581cd07001e86c20101c91c2f8910deb2
[ "MIT" ]
null
null
null
import numpy as np def clean_data(df, out_df_dir=""): df.dropna(axis=1, inplace=True) if out_df_dir: df.to_csv(out_df_dir) return df # Calculate log change of daily price def log_change(series): return np.log(series[1] / series[0]) # Calculate correaltion def calculate_...
20.3
48
0.62069
import numpy as np def clean_data(df, out_df_dir=""): df.dropna(axis=1, inplace=True) if out_df_dir: df.to_csv(out_df_dir) return df def log_change(series): return np.log(series[1] / series[0]) def calculate_cor(df, start, end): return df[start:end].rolling( ...
true
true
f71bb0f290045da4932989588f794fc5c7a82389
12,982
py
Python
dateparser/data/numeral_translation_data/nb.py
bazingarj/dateparser
48c4563fb7f6ce685fbd6d27e9e83257521d2203
[ "BSD-3-Clause" ]
8
2019-11-15T21:00:15.000Z
2021-12-21T22:09:42.000Z
dateparser/data/numeral_translation_data/nb.py
bazingarj/dateparser
48c4563fb7f6ce685fbd6d27e9e83257521d2203
[ "BSD-3-Clause" ]
9
2020-06-05T21:28:57.000Z
2022-02-12T12:30:39.000Z
dateparser/data/numeral_translation_data/nb.py
bazingarj/dateparser
48c4563fb7f6ce685fbd6d27e9e83257521d2203
[ "BSD-3-Clause" ]
21
2019-03-11T04:25:23.000Z
2022-02-03T08:54:33.000Z
# -*- coding: utf-8 -*- info = { "%%and-small": { "(0, 99)": "og =%%spellout-cardinal-reale=;", "(100, 'inf')": "=%%spellout-cardinal-reale=;" }, "%%and-small-f": { "(0, 99)": "og =%spellout-cardinal-feminine=;", "(100, 'inf')": "=%spellout-cardinal-feminine=;" }, "%%...
41.082278
109
0.470498
info = { "%%and-small": { "(0, 99)": "og =%%spellout-cardinal-reale=;", "(100, 'inf')": "=%%spellout-cardinal-reale=;" }, "%%and-small-f": { "(0, 99)": "og =%spellout-cardinal-feminine=;", "(100, 'inf')": "=%spellout-cardinal-feminine=;" }, "%%and-small-n": { ...
true
true
f71bb2656be1b32d52b27e3457db0d1c0fb78c7c
1,806
py
Python
networks/example_ParticleTransformer.py
jet-universe/particle_transformer
68a7fbcd7d39a64b753251064f120462400895a1
[ "MIT" ]
2
2022-03-30T12:07:17.000Z
2022-03-30T13:22:18.000Z
networks/example_ParticleTransformer.py
jet-universe/particle_transformer
68a7fbcd7d39a64b753251064f120462400895a1
[ "MIT" ]
null
null
null
networks/example_ParticleTransformer.py
jet-universe/particle_transformer
68a7fbcd7d39a64b753251064f120462400895a1
[ "MIT" ]
null
null
null
import os import torch from weaver.utils.logger import _logger from weaver.utils.import_tools import import_module ParticleTransformer = import_module( os.path.join(os.path.dirname(__file__), 'ParticleTransformer.py'), 'ParT').ParticleTransformer class ParticleTransformerWrapper(torch.nn.Module): def __init_...
30.1
127
0.640089
import os import torch from weaver.utils.logger import _logger from weaver.utils.import_tools import import_module ParticleTransformer = import_module( os.path.join(os.path.dirname(__file__), 'ParticleTransformer.py'), 'ParT').ParticleTransformer class ParticleTransformerWrapper(torch.nn.Module): def __init_...
true
true
f71bb3b612e73dc0ead31535809f8a66a642d316
35
py
Python
tests/translators/__init__.py
cancervariants/variant-normalization
e89a9f8366a659c82b2042aeb7effe339851bfb4
[ "MIT" ]
1
2022-01-19T18:17:49.000Z
2022-01-19T18:17:49.000Z
tests/translators/__init__.py
cancervariants/variation-normalization
9c8fbab1562591ae9445d82ddd15df29f1ea1f5a
[ "MIT" ]
99
2021-06-07T12:50:34.000Z
2022-03-23T13:38:29.000Z
tests/translators/__init__.py
cancervariants/variant-normalization
e89a9f8366a659c82b2042aeb7effe339851bfb4
[ "MIT" ]
null
null
null
"""The test translator package."""
17.5
34
0.685714
true
true
f71bb42f23d2dcf4e3a6c7c499095bafb5976cc2
4,781
py
Python
nicos_mlz/kws1/testscripts/counting.py
jkrueger1/nicos
5f4ce66c312dedd78995f9d91e8a6e3c891b262b
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
12
2019-11-06T15:40:36.000Z
2022-01-01T16:23:00.000Z
nicos_mlz/kws1/testscripts/counting.py
jkrueger1/nicos
5f4ce66c312dedd78995f9d91e8a6e3c891b262b
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
91
2020-08-18T09:20:26.000Z
2022-02-01T11:07:14.000Z
nicos_mlz/kws1/testscripts/counting.py
jkrueger1/nicos
5f4ce66c312dedd78995f9d91e8a6e3c891b262b
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
6
2020-01-11T10:52:30.000Z
2022-02-25T12:35:23.000Z
# pylint: skip-file ClearSamples() SetSample(1, 'Alu1', aperture=(1.2, 5.4, 7.0, 7.0), position={u'sam_trans_x': 208.0, u'sam_trans_y': 202.5}, timefactor=1.0, thickness=1.0, detoffset=-315.0, comment=u'') SetSample(2, 'Alu2', aperture=(1.2, 5.4, 7.0, 7.0), position={u'sam_trans_x': 235.0, u'sam_trans_y': 202.5}, ti...
116.609756
173
0.673081
ClearSamples() SetSample(1, 'Alu1', aperture=(1.2, 5.4, 7.0, 7.0), position={u'sam_trans_x': 208.0, u'sam_trans_y': 202.5}, timefactor=1.0, thickness=1.0, detoffset=-315.0, comment=u'') SetSample(2, 'Alu2', aperture=(1.2, 5.4, 7.0, 7.0), position={u'sam_trans_x': 235.0, u'sam_trans_y': 202.5}, timefactor=1.0, thick...
true
true
f71bb4a59b7a4873bb3899fb045f2a55091bf311
13,199
py
Python
sen/tui/ui.py
lachmanfrantisek/sen
a45e87bcdd60de1a246bd62dfdec32f60027bd37
[ "MIT" ]
956
2015-10-22T14:32:14.000Z
2022-03-21T02:27:28.000Z
sen/tui/ui.py
lachmanfrantisek/sen
a45e87bcdd60de1a246bd62dfdec32f60027bd37
[ "MIT" ]
146
2015-09-29T10:04:14.000Z
2022-02-22T08:28:08.000Z
sen/tui/ui.py
lachmanfrantisek/sen
a45e87bcdd60de1a246bd62dfdec32f60027bd37
[ "MIT" ]
77
2015-11-12T22:02:18.000Z
2022-01-24T10:14:46.000Z
""" This is a framework for terminal interfaces built on top of urwid.Frame. It must NOT contain any application specific code. """ import logging import threading from concurrent.futures.thread import ThreadPoolExecutor import urwid from sen.exceptions import NotifyError from sen.tui.commands.base import ( Fron...
35.197333
102
0.615577
import logging import threading from concurrent.futures.thread import ThreadPoolExecutor import urwid from sen.exceptions import NotifyError from sen.tui.commands.base import ( FrontendPriority, BackendPriority, SameThreadPriority, KeyNotMapped ) from sen.tui.constants import CLEAR_NOTIF_BAR_MESSAGE_IN from s...
true
true
f71bb74a3fd635e20003d3cfecbe5cb463ebe09a
3,783
py
Python
airbyte-integrations/connectors/source-marketo-singer/source_marketo_singer/source.py
abalustre/airbyte
e629613588620e8a4c48b155e0f414f41a005bd0
[ "MIT" ]
1
2021-11-04T07:55:40.000Z
2021-11-04T07:55:40.000Z
airbyte-integrations/connectors/source-marketo-singer/source_marketo_singer/source.py
Outoftheblue-ai/airbyte
98b18fd852ec70dafe02fb3ffe45b1ac30345cd0
[ "MIT" ]
1
2021-11-01T10:44:54.000Z
2021-11-01T10:47:42.000Z
airbyte-integrations/connectors/source-marketo-singer/source_marketo_singer/source.py
Outoftheblue-ai/airbyte
98b18fd852ec70dafe02fb3ffe45b1ac30345cd0
[ "MIT" ]
null
null
null
# # Copyright (c) 2021 Airbyte, Inc., all rights reserved. # import json from typing import Dict from airbyte_protocol import AirbyteConnectionStatus, Status, SyncMode from base_python import AirbyteLogger from base_singer import BaseSingerSource, SyncModeInfo class SourceMarketoSinger(BaseSingerSource): tap_c...
39.821053
114
0.651335
import json from typing import Dict from airbyte_protocol import AirbyteConnectionStatus, Status, SyncMode from base_python import AirbyteLogger from base_singer import BaseSingerSource, SyncModeInfo class SourceMarketoSinger(BaseSingerSource): tap_cmd = "tap-marketo" tap_name = "Marketo API" api_er...
true
true
f71bba63aef3cc3729067901106dcb6217bcab5d
24,141
py
Python
benchmarks/pipe.py
jessijzhao/fairscale
d6a8fc6dadc5d5ab4e3ee3f42f8cd570d70d30ec
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
benchmarks/pipe.py
jessijzhao/fairscale
d6a8fc6dadc5d5ab4e3ee3f42f8cd570d70d30ec
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
benchmarks/pipe.py
jessijzhao/fairscale
d6a8fc6dadc5d5ab4e3ee3f42f8cd570d70d30ec
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. import argparse import logging import math import os import time import warnings from benchmark_dataset import BenchmarkLMDataset, collate_sentences_lm import torch from torch.distributed import rpc import torch.multiprocessing as mp import torch...
34.685345
120
0.645499
import argparse import logging import math import os import time import warnings from benchmark_dataset import BenchmarkLMDataset, collate_sentences_lm import torch from torch.distributed import rpc import torch.multiprocessing as mp import torch.nn as nn from torch.nn.parallel import DistributedDataParallel as DDP ...
true
true
f71bbb4c268959f437ff99244e9ab109af82e1a0
1,774
py
Python
jina/drivers/querylang/slice.py
kaushikb11/jina
2856809cc5acb16b5a3e76e5c14af0c7b2346d09
[ "Apache-2.0" ]
null
null
null
jina/drivers/querylang/slice.py
kaushikb11/jina
2856809cc5acb16b5a3e76e5c14af0c7b2346d09
[ "Apache-2.0" ]
null
null
null
jina/drivers/querylang/slice.py
kaushikb11/jina
2856809cc5acb16b5a3e76e5c14af0c7b2346d09
[ "Apache-2.0" ]
null
null
null
__copyright__ = "Copyright (c) 2020 Jina AI Limited. All rights reserved." __license__ = "Apache-2.0" from typing import Iterable from .. import QuerySetReader, BaseRecursiveDriver if False: from ...proto import jina_pb2 class SliceQL(QuerySetReader, BaseRecursiveDriver): """Restrict the size of the ``docs...
32.254545
93
0.559752
__copyright__ = "Copyright (c) 2020 Jina AI Limited. All rights reserved." __license__ = "Apache-2.0" from typing import Iterable from .. import QuerySetReader, BaseRecursiveDriver if False: from ...proto import jina_pb2 class SliceQL(QuerySetReader, BaseRecursiveDriver): def __init__(self, start: int, en...
true
true
f71bbc336e9b9e428d917d26e1d743874331530d
9,514
py
Python
build/PureCloudPlatformClientV2/models/outbound_route_base_entity_listing.py
cjohnson-ctl/platform-client-sdk-python
38ce53bb8012b66e8a43cc8bd6ff00cf6cc99100
[ "MIT" ]
1
2021-10-08T20:46:45.000Z
2021-10-08T20:46:45.000Z
libs/PureCloudPlatformClientV2/models/outbound_route_base_entity_listing.py
rocketbot-cl/genesysCloud
dd9d9b5ebb90a82bab98c0d88b9585c22c91f333
[ "MIT" ]
null
null
null
libs/PureCloudPlatformClientV2/models/outbound_route_base_entity_listing.py
rocketbot-cl/genesysCloud
dd9d9b5ebb90a82bab98c0d88b9585c22c91f333
[ "MIT" ]
null
null
null
# coding: utf-8 """ Copyright 2016 SmartBear Software Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applica...
26.065753
85
0.590814
from pprint import pformat from six import iteritems import re import json from ..utils import sanitize_for_serialization class OutboundRouteBaseEntityListing(object): def __init__(self): self.swagger_types = { 'entities': 'list[OutboundRouteBase]', 'page_size': 'int', ...
true
true
f71bbce66ac31c7a95044b6cdf45b22688c6321e
10,895
py
Python
salt/transport/road/raet/behaving.py
thinkbox/salt
35c7c52a89eb98d7a1b6b2c59596d4fe19ab6db3
[ "Apache-2.0" ]
1
2019-06-27T13:03:07.000Z
2019-06-27T13:03:07.000Z
salt/transport/road/raet/behaving.py
thinkbox/salt
35c7c52a89eb98d7a1b6b2c59596d4fe19ab6db3
[ "Apache-2.0" ]
null
null
null
salt/transport/road/raet/behaving.py
thinkbox/salt
35c7c52a89eb98d7a1b6b2c59596d4fe19ab6db3
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' behaving.py raet ioflo behaviors See raeting.py for data format and packet field details. Layout in DataStore raet.udp.stack.stack value StackUdp raet.udp.stack.txmsgs value deque() raet.udp.stack.rxmsgs value deque() raet.udp.stack.local name host port sigkey prikey raet...
29.76776
80
0.536485
from collections import deque try: import simplejson as json except ImportError: import json from ioflo.base.odicting import odict from ioflo.base.globaling import * from ioflo.base import aiding from ioflo.base import storing from ioflo.base import deeding from ioflo.base.consoling import getConsole c...
true
true
f71bbd57b2470bbde34e554ff23f62fc28873ebf
2,314
py
Python
loss_functions/loss_oracle.py
konstmish/opt_methods
ae73d9bd89ae5c463e70328d73cbd190175df98c
[ "MIT" ]
13
2020-07-19T12:02:43.000Z
2022-03-02T14:34:03.000Z
loss_functions/loss_oracle.py
konstmish/opt_methods
ae73d9bd89ae5c463e70328d73cbd190175df98c
[ "MIT" ]
1
2020-12-25T02:05:00.000Z
2021-01-01T11:24:51.000Z
loss_functions/loss_oracle.py
konstmish/opt_methods
ae73d9bd89ae5c463e70328d73cbd190175df98c
[ "MIT" ]
2
2020-07-17T08:45:48.000Z
2021-12-10T03:24:57.000Z
import copy import numpy as np import warnings from .regularizer import Regularizer class Oracle(): """ Base class for all objectives. Can provide objective values, gradients and its Hessians as functions that take parameters as input. Takes as input the values of l1 and l2 regularization. ...
26.295455
92
0.583838
import copy import numpy as np import warnings from .regularizer import Regularizer class Oracle(): def __init__(self, l1=0, l2=0, l2_in_prox=False, regularizer=None, seed=42): if l1 < 0.0: raise ValueError("Invalid value for l1 regularization: {}".format(l1)) if l2 < 0.0: ...
true
true
f71bbe3d8e47628a35517152c6c8c4ac6e8bf38e
1,192
py
Python
setup.py
avictor0826/bigsuds
a4cfd622ab38a3b8fd65cccdcccc117691a7c091
[ "MIT" ]
33
2015-08-23T21:32:34.000Z
2019-07-03T16:14:26.000Z
setup.py
avictor0826/bigsuds
a4cfd622ab38a3b8fd65cccdcccc117691a7c091
[ "MIT" ]
9
2015-09-28T18:22:16.000Z
2022-03-26T00:22:51.000Z
setup.py
avictor0826/bigsuds
a4cfd622ab38a3b8fd65cccdcccc117691a7c091
[ "MIT" ]
22
2015-09-25T22:47:28.000Z
2022-03-28T12:54:59.000Z
from setuptools import setup import re def extract_version(filename): contents = open(filename).read() match = re.search('^__version__\s+=\s+[\'"](.*)[\'"]\s*$', contents, re.MULTILINE) if match is not None: return match.group(1) setup( name="bigsuds", version=extract_version('bigsuds.py'...
33.111111
86
0.618289
from setuptools import setup import re def extract_version(filename): contents = open(filename).read() match = re.search('^__version__\s+=\s+[\'"](.*)[\'"]\s*$', contents, re.MULTILINE) if match is not None: return match.group(1) setup( name="bigsuds", version=extract_version('bigsuds.py'...
true
true
f71bbea834d6298b1b749394c01ad48a8ce0536c
76,454
py
Python
tests/lax_numpy_test.py
zhongwen/jax
76d2a87915863d3a32732837cc7bf61b7b2f9e5b
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
tests/lax_numpy_test.py
zhongwen/jax
76d2a87915863d3a32732837cc7bf61b7b2f9e5b
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
tests/lax_numpy_test.py
zhongwen/jax
76d2a87915863d3a32732837cc7bf61b7b2f9e5b
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
46.589884
100
0.651895
from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import functools from functools import partial import itertools import operator import unittest from unittest import SkipTest from absl.testing import absltest from absl.testin...
true
true
f71bbf7a4a188527959ac45431aaf4fe7372b6f2
702
py
Python
google/ads/googleads/v6/services/services/keyword_plan_ad_group_service/__init__.py
wxxlouisa/google-ads-python
f24137966f6bfcb765a9b1fae79f2d23041825fe
[ "Apache-2.0" ]
null
null
null
google/ads/googleads/v6/services/services/keyword_plan_ad_group_service/__init__.py
wxxlouisa/google-ads-python
f24137966f6bfcb765a9b1fae79f2d23041825fe
[ "Apache-2.0" ]
null
null
null
google/ads/googleads/v6/services/services/keyword_plan_ad_group_service/__init__.py
wxxlouisa/google-ads-python
f24137966f6bfcb765a9b1fae79f2d23041825fe
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
33.428571
74
0.759259
from .client import KeywordPlanAdGroupServiceClient __all__ = ("KeywordPlanAdGroupServiceClient",)
true
true
f71bbf8502afa8422043b8e08ba0756892e46a96
3,593
py
Python
tutorial/settings.py
luotuo/spider-for-apple-store
b4b2bfb6227df8fce7f8e3ab635703e93bb89ed1
[ "MIT" ]
20
2017-12-17T08:07:12.000Z
2020-12-11T02:31:59.000Z
tutorial/settings.py
luotuo/spider-for-apple-store
b4b2bfb6227df8fce7f8e3ab635703e93bb89ed1
[ "MIT" ]
null
null
null
tutorial/settings.py
luotuo/spider-for-apple-store
b4b2bfb6227df8fce7f8e3ab635703e93bb89ed1
[ "MIT" ]
6
2017-12-17T08:07:14.000Z
2020-12-11T02:32:00.000Z
# -*- coding: utf-8 -*- # Scrapy settings for tutorial project # # For simplicity, this file contains only settings considered important or # commonly used. You can find more settings consulting the documentation: # # http://doc.scrapy.org/en/latest/topics/settings.html # http://scrapy.readthedocs.org/en/lates...
34.548077
123
0.775953
BOT_NAME = 'tutorial' SPIDER_MODULES = ['tutorial.spiders'] NEWSPIDER_MODULE = 'tutorial.spiders' USER_AGENT = 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36' ROBOTSTXT_OBEY = False Y = 3 ...
true
true
f71bbfffc3a193e2f3f52cdb443e6740cf88b7e3
6,052
py
Python
Ensemble Learning/AdaBoost.py
DiogoRibeiro7/Machine-Learning
d2c789851f8b4eaf74cdd0c18af072f60cd45cb3
[ "Apache-2.0" ]
null
null
null
Ensemble Learning/AdaBoost.py
DiogoRibeiro7/Machine-Learning
d2c789851f8b4eaf74cdd0c18af072f60cd45cb3
[ "Apache-2.0" ]
null
null
null
Ensemble Learning/AdaBoost.py
DiogoRibeiro7/Machine-Learning
d2c789851f8b4eaf74cdd0c18af072f60cd45cb3
[ "Apache-2.0" ]
null
null
null
""" @Filename: AdaptiveBoost.py @Author: Diogo Ribeiro @Create Date: 2019-05-03 @Update Date: 2019-05-03 @Description: Implement of Adaptive Boosting """ import numpy as np import preProcess import pickle import random import SVM import math class Adaboost: def __init__(self, norm_type="Nor...
34.982659
100
0.607403
import numpy as np import preProcess import pickle import random import SVM import math class Adaboost: def __init__(self, norm_type="Normalization", iterations=5, base_classifier="SVM"): self.iterations = iterations self.norm_type = norm_type self.base_classifier = SVM.SVMClassifier() ...
true
true
f71bc02fee45fb7edf6e131216efbc2de8692361
1,173
py
Python
examples/example2.py
hangvane/lpsolve_wrapper
cff5ffa827c10420bdc6b3ceb5d9a3852c91281d
[ "Apache-2.0" ]
4
2021-01-27T14:47:30.000Z
2021-05-06T03:16:11.000Z
examples/example2.py
hangvane/lpsolve_wrapper
cff5ffa827c10420bdc6b3ceb5d9a3852c91281d
[ "Apache-2.0" ]
null
null
null
examples/example2.py
hangvane/lpsolve_wrapper
cff5ffa827c10420bdc6b3ceb5d9a3852c91281d
[ "Apache-2.0" ]
1
2022-03-25T13:22:45.000Z
2022-03-25T13:22:45.000Z
# http://web.mit.edu/lpsolve/doc/Python.htm # P = (110)(1.30)x + (30)(2.00)y + (125)(1.56) = 143x + 60y + 195z # 120x + 210y + 150.75z <= 15000 # 110x + 30y + 125z <= 4000 # x + y + z <= 75 # x >= 0, y >= 0, z >= 0 import lpsolve_wrapper as lw model = lw.Model( notations={ 'x': lw.notation( lo...
19.881356
66
0.491901
import lpsolve_wrapper as lw model = lw.Model( notations={ 'x': lw.notation( lower_bound=0, ), 'y': lw.notation( lower_bound=0, ), 'z': lw.notation( lower_bound=0, ) }) model.add_constr( coefs=[ lw.coef('x', ...
true
true
f71bc084b54b7d6c91980ac0cca1fd8f504aca87
1,277
py
Python
ganzige/urls.py
kekehurry/ganzige.site
4fc2fce6c03b302e115feccae6e02bd9e1e8231d
[ "MIT" ]
null
null
null
ganzige/urls.py
kekehurry/ganzige.site
4fc2fce6c03b302e115feccae6e02bd9e1e8231d
[ "MIT" ]
null
null
null
ganzige/urls.py
kekehurry/ganzige.site
4fc2fce6c03b302e115feccae6e02bd9e1e8231d
[ "MIT" ]
null
null
null
"""ganzige URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-bas...
38.69697
77
0.697729
from django.conf.urls import include, url from django.contrib import admin from django.conf.urls.static import static from django.conf import settings urlpatterns = [ url(r'^$', include('home.urls', namespace='home')), url(r'webhook/', include('webhook.urls', namespace='webhook')), url(r'^admin/', include(...
true
true
f71bc16b49327031ea7d379964913ab43a1e9c34
3,176
py
Python
microchain/chain.py
ciknight/microchain
d740571fd84f18bc1b635b2fccb9f349180709fa
[ "MIT" ]
null
null
null
microchain/chain.py
ciknight/microchain
d740571fd84f18bc1b635b2fccb9f349180709fa
[ "MIT" ]
40
2018-07-30T21:14:20.000Z
2021-06-25T15:15:20.000Z
microchain/chain.py
ciknight/microchain
d740571fd84f18bc1b635b2fccb9f349180709fa
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import logging from typing import List from microchain.block import Block __all__ = ["Chain"] class Chain: _interval = 10 # second def __init__(self, blocks: List[Block] = None) -> None: self.blocks = blocks or [Chain.genesis()] def __len__(self): return self.l...
30.247619
107
0.588791
import logging from typing import List from microchain.block import Block __all__ = ["Chain"] class Chain: _interval = 10 def __init__(self, blocks: List[Block] = None) -> None: self.blocks = blocks or [Chain.genesis()] def __len__(self): return self.length def __repr__(self): ...
true
true
f71bc1a8abff19dc9122898c70187b1df427ad48
5,311
py
Python
duty/my_signals/templates/template.py
ximetov/IrCa-Duty
666c2d26c9cd7d314798cfb222ad91dfeee4a5b6
[ "MIT" ]
6
2020-05-18T21:53:27.000Z
2020-07-06T12:48:00.000Z
duty/my_signals/templates/template.py
ximetov/IrCa-Duty
666c2d26c9cd7d314798cfb222ad91dfeee4a5b6
[ "MIT" ]
null
null
null
duty/my_signals/templates/template.py
ximetov/IrCa-Duty
666c2d26c9cd7d314798cfb222ad91dfeee4a5b6
[ "MIT" ]
6
2020-05-13T16:16:15.000Z
2020-06-23T12:05:09.000Z
import re from typing import Tuple from duty.utils import att_parse, format_response from duty.objects import MySignalEvent, dp def delete_template(name: str, templates: list) -> Tuple[list, bool]: for template in templates: if template['name'].lower() == name: templates.remove(template) ...
32.384146
105
0.591226
import re from typing import Tuple from duty.utils import att_parse, format_response from duty.objects import MySignalEvent, dp def delete_template(name: str, templates: list) -> Tuple[list, bool]: for template in templates: if template['name'].lower() == name: templates.remove(template) ...
true
true
f71bc2338b924e040d6847a96eaeabd0904e440e
405
py
Python
env/Lib/site-packages/plotly/validators/scatter3d/marker/_sizeref.py
andresgreen-byte/Laboratorio-1--Inversion-de-Capital
8a4707301d19c3826c31026c4077930bcd6a8182
[ "MIT" ]
11,750
2015-10-12T07:03:39.000Z
2022-03-31T20:43:15.000Z
env/Lib/site-packages/plotly/validators/scatter3d/marker/_sizeref.py
andresgreen-byte/Laboratorio-1--Inversion-de-Capital
8a4707301d19c3826c31026c4077930bcd6a8182
[ "MIT" ]
2,951
2015-10-12T00:41:25.000Z
2022-03-31T22:19:26.000Z
env/Lib/site-packages/plotly/validators/scatter3d/marker/_sizeref.py
andresgreen-byte/Laboratorio-1--Inversion-de-Capital
8a4707301d19c3826c31026c4077930bcd6a8182
[ "MIT" ]
2,623
2015-10-15T14:40:27.000Z
2022-03-28T16:05:50.000Z
import _plotly_utils.basevalidators class SizerefValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="sizeref", parent_name="scatter3d.marker", **kwargs): super(SizerefValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
33.75
88
0.679012
import _plotly_utils.basevalidators class SizerefValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="sizeref", parent_name="scatter3d.marker", **kwargs): super(SizerefValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
true
true
f71bc27ffeefbaa07e53e1ac517b08578d7e83f3
35,940
py
Python
tools/run_tests/xds_k8s_test_driver/framework/infrastructure/traffic_director.py
lungati/grpc
cd9730d2d28626c57431253208f23507d466c825
[ "BSD-3-Clause" ]
5
2019-11-12T04:30:55.000Z
2021-08-11T23:04:12.000Z
tools/run_tests/xds_k8s_test_driver/framework/infrastructure/traffic_director.py
bwncp/grpc
779701ab76c552affa9f5c7815c2b598c996ea54
[ "Apache-2.0" ]
10
2015-03-03T06:51:51.000Z
2022-03-23T14:10:56.000Z
tools/run_tests/xds_k8s_test_driver/framework/infrastructure/traffic_director.py
bwncp/grpc
779701ab76c552affa9f5c7815c2b598c996ea54
[ "Apache-2.0" ]
1
2015-08-22T15:20:59.000Z
2015-08-22T15:20:59.000Z
# Copyright 2020 gRPC 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 writing...
40.748299
80
0.636171
import functools import logging import random from typing import Any, Dict, List, Optional, Set from framework import xds_flags from framework.infrastructure import gcp logger = logging.getLogger(__name__) _ComputeV1 = gcp.compute.ComputeV1 GcpResource = _ComputeV1.GcpResource HealthCheckProtocol = _C...
true
true
f71bc2a2616d37575b4b7913e3c9a01e51b63aa1
3,636
py
Python
client/chat/main.py
rrsilaya/spaceteam
eca853d82f14d1d5f5f892977dfb35d20da40d0b
[ "MIT" ]
null
null
null
client/chat/main.py
rrsilaya/spaceteam
eca853d82f14d1d5f5f892977dfb35d20da40d0b
[ "MIT" ]
null
null
null
client/chat/main.py
rrsilaya/spaceteam
eca853d82f14d1d5f5f892977dfb35d20da40d0b
[ "MIT" ]
null
null
null
import sys from threading import Thread from connection import TcpConnection from proto.tcp_packet_pb2 import TcpPacket class Chat(): def __init__(self): self.connection = TcpConnection() self.packet = TcpPacket() def createLobby(self, maxPlayers, *args): payload = self.packet.CreateLobbyPacket() ...
27.969231
82
0.686469
import sys from threading import Thread from connection import TcpConnection from proto.tcp_packet_pb2 import TcpPacket class Chat(): def __init__(self): self.connection = TcpConnection() self.packet = TcpPacket() def createLobby(self, maxPlayers, *args): payload = self.packet.CreateLobbyPacket() ...
true
true
f71bc4b4bf4d80efae10e1ebc5854fc9aae76ce2
605
py
Python
OrderManagement/migrations/0006_auto_20201114_0349.py
glen-s-abraham/OnlineDelivery
138356e17e52d0a4d4a1778f9c440006ce28ae5c
[ "MIT" ]
null
null
null
OrderManagement/migrations/0006_auto_20201114_0349.py
glen-s-abraham/OnlineDelivery
138356e17e52d0a4d4a1778f9c440006ce28ae5c
[ "MIT" ]
null
null
null
OrderManagement/migrations/0006_auto_20201114_0349.py
glen-s-abraham/OnlineDelivery
138356e17e52d0a4d4a1778f9c440006ce28ae5c
[ "MIT" ]
null
null
null
# Generated by Django 3.1.2 on 2020-11-14 03:49 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), ('OrderManagement', '0005_...
27.5
131
0.682645
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), ('OrderManagement', '0005_auto_20201107_0415'), ] operations = [...
true
true
f71bc4c5740b27cfc91942e00a13eeb0e9219ee7
8,569
py
Python
SNAPPacket.py
MydonSolutions/SNAPpyPackets
65565ad7edf98371bcfb2b6780a20680afb10347
[ "Apache-2.0" ]
null
null
null
SNAPPacket.py
MydonSolutions/SNAPpyPackets
65565ad7edf98371bcfb2b6780a20680afb10347
[ "Apache-2.0" ]
null
null
null
SNAPPacket.py
MydonSolutions/SNAPpyPackets
65565ad7edf98371bcfb2b6780a20680afb10347
[ "Apache-2.0" ]
null
null
null
mask4bits = ((1 << 4) -1) import numpy as np mask8bits = ((1 << 8) -1) mask16bits = ((1 << 16) -1) mask64bits = ((1 << 64) -1) class SNAPPacket(object): """ ATA SNAP Firmware Manual, Release 2.0.0 --------------------------------------- Section 2.3.2 "Output Data Formats: Voltage Packets", pg 5 ht...
38.95
119
0.555257
mask4bits = ((1 << 4) -1) import numpy as np mask8bits = ((1 << 8) -1) mask16bits = ((1 << 16) -1) mask64bits = ((1 << 64) -1) class SNAPPacket(object): def __init__(self, fwVersion: int = None, packetType: bool = None, channels: int = None, cha...
true
true
f71bc5652835fe64720685b82cd43fc0850879a0
1,794
py
Python
tools/ncbi_blast_plus/check_no_duplicates.py
globusgenomics/galaxy
7caf74d9700057587b3e3434c64e82c5b16540f1
[ "CC-BY-3.0" ]
1
2021-02-05T13:19:58.000Z
2021-02-05T13:19:58.000Z
tools/ncbi_blast_plus/check_no_duplicates.py
globusgenomics/galaxy
7caf74d9700057587b3e3434c64e82c5b16540f1
[ "CC-BY-3.0" ]
null
null
null
tools/ncbi_blast_plus/check_no_duplicates.py
globusgenomics/galaxy
7caf74d9700057587b3e3434c64e82c5b16540f1
[ "CC-BY-3.0" ]
null
null
null
#!/usr/bin/env python """Check for duplicate sequence identifiers in FASTA files. This is run as a pre-check before makeblastdb, in order to avoid a regression bug in BLAST+ 2.2.28 which fails to catch this. See: http://blastedbio.blogspot.co.uk/2012/10/my-ids-not-good-enough-for-ncbi-blast.html This script takes one...
30.931034
83
0.627648
import gzip import os import sys if "-v" in sys.argv or "--version" in sys.argv: print("v0.0.23") sys.exit(0) identifiers = set() files = 0 for filename in sys.argv[1:]: if not os.path.isfile(filename): sys.stderr.write("Missing FASTA file %r\n" % filename) sys.exit(2) files += 1 ...
true
true
f71bc619e7d4702a0d959637f7bce8d52e79debf
3,636
py
Python
LaserCommandConstants.py
jaredly/meerk40t
446427e29104cb89fd2ee17ad824fc801d44afe0
[ "MIT" ]
null
null
null
LaserCommandConstants.py
jaredly/meerk40t
446427e29104cb89fd2ee17ad824fc801d44afe0
[ "MIT" ]
null
null
null
LaserCommandConstants.py
jaredly/meerk40t
446427e29104cb89fd2ee17ad824fc801d44afe0
[ "MIT" ]
null
null
null
""" Laser Commands are a middle language of commands for spooling and interpreting. NOTE: Never use the integer value, only the command name. The integer values are permitted to change. COMMAND_PLOT: takes a plot object to generate simple plot commands. COMMAND_RASTER: takes a raster plot object which generate...
52.695652
117
0.764851
COMMAND_LASER_OFF = 1 COMMAND_LASER_ON = 2 COMMAND_LASER_DISABLE = 5 COMMAND_LASER_ENABLE = 6 COMMAND_MOVE = 10 COMMAND_CUT = 11 COMMAND_WAIT = 20 COMMAND_WAIT_FINISH = 21 COMMAND_MODE_RAPID = 50 COMMAND_MODE_PROGRAM = 51 COMMAND_MODE_FINISHED = 52 COMMAND_PLOT = 100 COMMAND_RASTER = 101 ...
true
true
f71bc67e5ca5a22411122ca46bcf374816eb0293
2,950
py
Python
alipay/aop/api/domain/AlipayFundAuthOperationCancelModel.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/domain/AlipayFundAuthOperationCancelModel.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/domain/AlipayFundAuthOperationCancelModel.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import simplejson as json from alipay.aop.api.constant.ParamConstants import * class AlipayFundAuthOperationCancelModel(object): def __init__(self): self._auth_no = None self._operation_id = None self._out_order_no = None self._out_re...
29.207921
79
0.594576
import simplejson as json from alipay.aop.api.constant.ParamConstants import * class AlipayFundAuthOperationCancelModel(object): def __init__(self): self._auth_no = None self._operation_id = None self._out_order_no = None self._out_request_no = None self._remark = None ...
true
true
f71bc6ac3785acf1ddb69695bfccc9bb6edc5daf
155
py
Python
pangram/pangram.py
pierrebeaucamp/Exercism-Python
910b764c6726e9f131fb3a394c70d9b5bb167be9
[ "Unlicense" ]
null
null
null
pangram/pangram.py
pierrebeaucamp/Exercism-Python
910b764c6726e9f131fb3a394c70d9b5bb167be9
[ "Unlicense" ]
null
null
null
pangram/pangram.py
pierrebeaucamp/Exercism-Python
910b764c6726e9f131fb3a394c70d9b5bb167be9
[ "Unlicense" ]
null
null
null
import string import regex def is_pangram(i): l = sorted(list(set(regex.sub(r'[^a-z]', "", i.lower())))) return l == list(string.ascii_lowercase)
22.142857
62
0.645161
import string import regex def is_pangram(i): l = sorted(list(set(regex.sub(r'[^a-z]', "", i.lower())))) return l == list(string.ascii_lowercase)
true
true
f71bc6f28b8786902b54ebafec07bd4a22b0c3b6
763
py
Python
my_blog/my_blog/apps/blogs/migrations/0002_articlecomment.py
TNTfeizai/my_Blog
71c3720a27fab49a0d25d21029bdeb5f68e4965b
[ "MIT" ]
null
null
null
my_blog/my_blog/apps/blogs/migrations/0002_articlecomment.py
TNTfeizai/my_Blog
71c3720a27fab49a0d25d21029bdeb5f68e4965b
[ "MIT" ]
7
2020-06-06T00:53:43.000Z
2022-03-12T00:19:03.000Z
my_blog/my_blog/apps/blogs/migrations/0002_articlecomment.py
TNTfeizai/my_Blog
71c3720a27fab49a0d25d21029bdeb5f68e4965b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.11 on 2020-03-13 02:46 from __future__ import unicode_literals from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('blogs', '0001_initial'), ] operations = [ mig...
29.346154
114
0.605505
from __future__ import unicode_literals from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('blogs', '0001_initial'), ] operations = [ migrations.CreateModel( name='ArticleComment', fiel...
true
true
f71bc746826b79bd70dea70d0dd90cfcbd116ff4
2,525
py
Python
confirm.py
Pckool/GCG
cee786d04ea30f3995e910bca82635f442b2a6a8
[ "MIT" ]
null
null
null
confirm.py
Pckool/GCG
cee786d04ea30f3995e910bca82635f442b2a6a8
[ "MIT" ]
null
null
null
confirm.py
Pckool/GCG
cee786d04ea30f3995e910bca82635f442b2a6a8
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'confirm.ui' # # Created by: PyQt5 UI code generator 5.9.1 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Dialog(object): def setupUi(self, Dialog): Dialog.setObjectN...
44.298246
122
0.717624
from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Dialog(object): def setupUi(self, Dialog): Dialog.setObjectName("Dialog") Dialog.resize(400, 120) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding) sizePolicy...
true
true
f71bc76ba618eb3ac748680ddd30d14592adde8c
3,556
py
Python
src/bindings/python/DocStrings/CDLTransform.py
jmertic/OpenColorIO
9b18fd69f981288a6a3640e283b8d9968a15423e
[ "BSD-3-Clause" ]
1
2019-11-18T21:49:25.000Z
2019-11-18T21:49:25.000Z
src/bindings/python/DocStrings/CDLTransform.py
KevinJW/OpenColorIO
412aa7ba273616867e607de646e4975791198812
[ "BSD-3-Clause" ]
1
2020-06-12T19:10:09.000Z
2020-06-12T19:10:09.000Z
src/bindings/python/DocStrings/CDLTransform.py
KevinJW/OpenColorIO
412aa7ba273616867e607de646e4975791198812
[ "BSD-3-Clause" ]
null
null
null
# SPDX-License-Identifier: BSD-3-Clause # Copyright Contributors to the OpenColorIO Project. class CDLTransform: """ CDLTransform """ def __init__(self): pass def equals(self, cdl): """ equals(cdl) :param cdl: a cdl transform :type cdl: :py:clas...
21.815951
101
0.497469
class CDLTransform: def __init__(self): pass def equals(self, cdl): pass def validate(self): pass def CreateFromFile(self, src, cccid): pass def getXML(self): pass def setXML(self, xmltext): pass def getSlope(se...
true
true
f71bc81b29ea3c83e679fc75c90333cfc9ee5e00
3,351
py
Python
django_jinja/base.py
akx/django-jinja
2f1c0a74990d6d564350079692a8307c8c6f5b9f
[ "BSD-3-Clause" ]
210
2015-05-21T16:54:05.000Z
2022-01-06T01:24:52.000Z
django_jinja/base.py
akx/django-jinja
2f1c0a74990d6d564350079692a8307c8c6f5b9f
[ "BSD-3-Clause" ]
139
2015-05-15T11:01:03.000Z
2022-03-29T21:13:04.000Z
django_jinja/base.py
akx/django-jinja
2f1c0a74990d6d564350079692a8307c8c6f5b9f
[ "BSD-3-Clause" ]
84
2015-05-15T09:35:22.000Z
2021-09-03T13:14:44.000Z
import re import os.path as path from importlib import import_module from django.template.context import BaseContext def dict_from_context(context): """ Converts context to native python dict. """ if isinstance(context, BaseContext): new_dict = {} for i in reversed(list(context)): ...
30.463636
74
0.675321
import re import os.path as path from importlib import import_module from django.template.context import BaseContext def dict_from_context(context): if isinstance(context, BaseContext): new_dict = {} for i in reversed(list(context)): new_dict.update(dict_from_context(i)) retu...
true
true
f71bc829a4dec68143103f059f2183f57ed5bcb0
903
py
Python
beacontools/structs/estimote.py
nasa-watchdog/beacontools-ucsb
37e60b14f73935501c8edc3277917a6a40bcfdba
[ "MIT" ]
null
null
null
beacontools/structs/estimote.py
nasa-watchdog/beacontools-ucsb
37e60b14f73935501c8edc3277917a6a40bcfdba
[ "MIT" ]
1
2018-12-08T01:43:02.000Z
2018-12-08T01:43:02.000Z
beacontools/structs/estimote.py
nasa-watchdog/beacontools-ucsb
37e60b14f73935501c8edc3277917a6a40bcfdba
[ "MIT" ]
null
null
null
"""All low level structures used for parsing Estimote packets.""" from construct import Struct, Byte, Switch, Int8sl, Array, Int8ul from ..const import ESTIMOTE_TELEMETRY_SUBFRAME_A, ESTIMOTE_TELEMETRY_SUBFRAME_B # pylint: disable=invalid-name EstimoteTelemetrySubFrameA = Struct( "acceleration" / Array(3, Int8sl...
30.1
80
0.723145
from construct import Struct, Byte, Switch, Int8sl, Array, Int8ul from ..const import ESTIMOTE_TELEMETRY_SUBFRAME_A, ESTIMOTE_TELEMETRY_SUBFRAME_B EstimoteTelemetrySubFrameA = Struct( "acceleration" / Array(3, Int8sl), "previous_motion" / Byte, "current_motion" / Byte, "combined_fields" / Array(5, B...
true
true
f71bc88e1e773fe6f8bdbbed540d8fa994959788
1,394
py
Python
setup.py
michaelimfeld/private-telegram-bot
f5a9cec3c430d46bab3f1e57faa4d62013f93fd1
[ "MIT" ]
37
2016-05-02T18:50:55.000Z
2021-09-21T17:53:44.000Z
setup.py
michaelimfeld/private-telegram-bot
f5a9cec3c430d46bab3f1e57faa4d62013f93fd1
[ "MIT" ]
12
2016-04-23T21:58:42.000Z
2020-03-25T18:31:29.000Z
setup.py
michaelimfeld/private-telegram-bot
f5a9cec3c430d46bab3f1e57faa4d62013f93fd1
[ "MIT" ]
8
2016-05-09T17:37:21.000Z
2021-09-21T17:53:45.000Z
# -*- coding: utf-8 -*- # pylint: disable=missing-docstring from setuptools import setup setup( name="ownbot", version="0.0.4", license="MIT", description="Python module to create private telegram bots.", author="Michael Imfeld", author_email="michaelimfeld@crooked.ch", maintainer="Michael...
30.977778
65
0.60043
from setuptools import setup setup( name="ownbot", version="0.0.4", license="MIT", description="Python module to create private telegram bots.", author="Michael Imfeld", author_email="michaelimfeld@crooked.ch", maintainer="Michael Imfeld", maintainer_email="michaelimfeld@crooked.ch",...
true
true
f71bc8aff2afd70932bd36b53d5ab0c39172c419
2,379
py
Python
hw1/run_expert.py
Sebastianvarv/rl-homework
b7526ac3c86cbaae6b796856c31fc4c671a32663
[ "MIT" ]
1
2018-12-06T18:16:58.000Z
2018-12-06T18:16:58.000Z
hw1/run_expert.py
Sebastianvarv/rl-homework
b7526ac3c86cbaae6b796856c31fc4c671a32663
[ "MIT" ]
null
null
null
hw1/run_expert.py
Sebastianvarv/rl-homework
b7526ac3c86cbaae6b796856c31fc4c671a32663
[ "MIT" ]
null
null
null
#!/usr/bin/env python """ Code to load an expert policy and generate roll-out data for behavioral cloning. Example usage: python run_expert.py experts/Humanoid-v1.pkl Humanoid-v1 --render \ --num_rollouts 20 Author of this script and included expert policies: Jonathan Ho (hoj@openai.com) """ import o...
30.5
83
0.580076
import os import pickle import tensorflow as tf import numpy as np import tf_util import gym import load_policy def main(): import argparse parser = argparse.ArgumentParser() parser.add_argument('expert_policy_file', type=str) parser.add_argument('envname', type=str) parser.add_argument('--rende...
true
true
f71bc95531a6537981172b3ab30077c9090d2668
669
py
Python
Latest/venv/Lib/site-packages/envisage/unknown_extension.py
adamcvj/SatelliteTracker
49a8f26804422fdad6f330a5548e9f283d84a55d
[ "Apache-2.0" ]
1
2022-01-09T20:04:31.000Z
2022-01-09T20:04:31.000Z
Latest/venv/Lib/site-packages/envisage/unknown_extension.py
adamcvj/SatelliteTracker
49a8f26804422fdad6f330a5548e9f283d84a55d
[ "Apache-2.0" ]
1
2022-02-15T12:01:57.000Z
2022-03-24T19:48:47.000Z
Latest/venv/Lib/site-packages/envisage/unknown_extension.py
adamcvj/SatelliteTracker
49a8f26804422fdad6f330a5548e9f283d84a55d
[ "Apache-2.0" ]
null
null
null
# (C) Copyright 2007-2019 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in LICENSE.txt and may be redistributed only # under the conditions described in the aforementioned license. The license # is also available online a...
39.352941
79
0.678625
class UnknownExtension(Exception):
true
true
f71bc9ee1184e124fd8b7941320776f895fa5014
88,529
py
Python
clearml/storage/helper.py
mmiller-max/clearml
fd2d6c6f5d46cad3e406e88eeb4d805455b5b3d8
[ "Apache-2.0" ]
null
null
null
clearml/storage/helper.py
mmiller-max/clearml
fd2d6c6f5d46cad3e406e88eeb4d805455b5b3d8
[ "Apache-2.0" ]
null
null
null
clearml/storage/helper.py
mmiller-max/clearml
fd2d6c6f5d46cad3e406e88eeb4d805455b5b3d8
[ "Apache-2.0" ]
null
null
null
from __future__ import with_statement import errno import getpass import itertools import json import os import shutil import sys import threading from abc import ABCMeta, abstractmethod from collections import namedtuple from concurrent.futures import ThreadPoolExecutor from copy import copy from datetime import date...
37.369776
120
0.599702
from __future__ import with_statement import errno import getpass import itertools import json import os import shutil import sys import threading from abc import ABCMeta, abstractmethod from collections import namedtuple from concurrent.futures import ThreadPoolExecutor from copy import copy from datetime import date...
true
true
f71bca0add55e9dbed05726a9b8f1b5d8f31a0fe
544
py
Python
loja.py
Felipe-Gs/Exerciccios-Python3
bdbd49e7daa48df336b83ef3a2e36e42ede297ab
[ "MIT" ]
3
2021-06-01T14:11:58.000Z
2022-03-20T02:30:13.000Z
loja.py
Felipe-Gs/Exercicios-Python3
bdbd49e7daa48df336b83ef3a2e36e42ede297ab
[ "MIT" ]
null
null
null
loja.py
Felipe-Gs/Exercicios-Python3
bdbd49e7daa48df336b83ef3a2e36e42ede297ab
[ "MIT" ]
null
null
null
'''quantidade = int(input('quantos produtos o senhor comprou?')) preco = quantidade * 1.99 print(preco)''' print("====TABELA DE PREÇOS====") for c in range(1, 51): print(c, "- R$", c * 1.99) quantidade = int(input('quantos produtos o senhor comprou?')) preco = quantidade * 1.99 print(preco, " é o preço que voce t...
32
66
0.665441
print("====TABELA DE PREÇOS====") for c in range(1, 51): print(c, "- R$", c * 1.99) quantidade = int(input('quantos produtos o senhor comprou?')) preco = quantidade * 1.99 print(preco, " é o preço que voce tem que pagar!") dinheiro = float(input('com quanto dinheiro vc pretende pagar?')) if dinheiro <= preco: ...
true
true
f71bca13cf7f1910de2246a9b822851a12529735
11,981
py
Python
downstream/tinypersons/mmdet/datasets/pipelines/formating.py
bwconrad/solo-learn
ec510d803a4428d7d8803b90fa1484c42cb9cb52
[ "MIT" ]
271
2021-06-19T08:41:11.000Z
2022-03-31T05:42:42.000Z
downstream/tinypersons/mmdet/datasets/pipelines/formating.py
bwconrad/solo-learn
ec510d803a4428d7d8803b90fa1484c42cb9cb52
[ "MIT" ]
48
2021-07-06T07:17:12.000Z
2022-03-14T11:38:36.000Z
downstream/tinypersons/mmdet/datasets/pipelines/formating.py
bwconrad/solo-learn
ec510d803a4428d7d8803b90fa1484c42cb9cb52
[ "MIT" ]
54
2021-07-07T08:40:49.000Z
2022-03-16T05:02:35.000Z
from collections.abc import Sequence import mmcv import numpy as np import torch from mmcv.parallel import DataContainer as DC from ..builder import PIPELINES def to_tensor(data): """Convert objects of various python types to :obj:`torch.Tensor`. Supported types are: :class:`numpy.ndarray`, :class:`torch.T...
32.824658
79
0.591687
from collections.abc import Sequence import mmcv import numpy as np import torch from mmcv.parallel import DataContainer as DC from ..builder import PIPELINES def to_tensor(data): if isinstance(data, torch.Tensor): return data elif isinstance(data, np.ndarray): return torch.from_numpy(data)...
true
true
f71bcae3ada7450e03517099c8f34cabe1579cb5
1,307
py
Python
trust_simple_three/tests.py
gerhardriener/cherry_picking_code
5dbcd32ad2e9929eac785eb06e7d44c60b1ffc18
[ "MIT" ]
null
null
null
trust_simple_three/tests.py
gerhardriener/cherry_picking_code
5dbcd32ad2e9929eac785eb06e7d44c60b1ffc18
[ "MIT" ]
null
null
null
trust_simple_three/tests.py
gerhardriener/cherry_picking_code
5dbcd32ad2e9929eac785eb06e7d44c60b1ffc18
[ "MIT" ]
null
null
null
from otree.api import Currency as c, currency_range, SubmissionMustFail from . import pages from ._builtin import Bot from .models import Constants class PlayerBot(Bot): cases = [ {'offer': 1, 'return_1': 1, 'return_2': 1, 'return_2_A': 1, 'return_2_B': 1, 'p1_payoff': 5, 'p2_payoff': 5...
34.394737
77
0.55394
from otree.api import Currency as c, currency_range, SubmissionMustFail from . import pages from ._builtin import Bot from .models import Constants class PlayerBot(Bot): cases = [ {'offer': 1, 'return_1': 1, 'return_2': 1, 'return_2_A': 1, 'return_2_B': 1, 'p1_payoff': 5, 'p2_payoff': 5...
true
true
f71bcbceeb060b7a31ed8e3353c036d8c37f27b4
621
py
Python
supriya/ugens/BRF.py
deeuu/supriya
14fcb5316eccb4dafbe498932ceff56e1abb9d27
[ "MIT" ]
null
null
null
supriya/ugens/BRF.py
deeuu/supriya
14fcb5316eccb4dafbe498932ceff56e1abb9d27
[ "MIT" ]
null
null
null
supriya/ugens/BRF.py
deeuu/supriya
14fcb5316eccb4dafbe498932ceff56e1abb9d27
[ "MIT" ]
null
null
null
import collections from supriya import CalculationRate from supriya.ugens.Filter import Filter class BRF(Filter): """ A 2nd order Butterworth band-reject filter. :: >>> source = supriya.ugens.In.ar(bus=0) >>> b_r_f =supriya.ugens.BRF.ar(source=source) >>> b_r_f BRF.ar() ...
21.413793
79
0.645733
import collections from supriya import CalculationRate from supriya.ugens.Filter import Filter class BRF(Filter): _ordered_input_names = collections.OrderedDict( [("source", None), ("frequency", 440.0), ("reciprocal_of_q", 1.0)] ) _valid_calculation_rates = (CalculationRate.AUDIO, Calculat...
true
true
f71bcc0ec5e7d7ea7b83b7093e62b94f604e0b6e
1,989
py
Python
visualizer.py
shaandesai1/transfer_diffeq
29ab4f3ff16a58bc7b1751428e540a3bb135778c
[ "MIT" ]
null
null
null
visualizer.py
shaandesai1/transfer_diffeq
29ab4f3ff16a58bc7b1751428e540a3bb135778c
[ "MIT" ]
null
null
null
visualizer.py
shaandesai1/transfer_diffeq
29ab4f3ff16a58bc7b1751428e540a3bb135778c
[ "MIT" ]
null
null
null
import numpy as np import torch import matplotlib.pyplot as plt from neurodiffeq import diff # the differentiation operation from neurodiffeq.conditions import IVP # the initial condition from neurodiffeq.networks import FCNN # fully-connect neural network from neurodiffeq.solvers import Solver1D from neurodiffeq.c...
40.591837
85
0.64002
import numpy as np import torch import matplotlib.pyplot as plt from neurodiffeq import diff from neurodiffeq.conditions import IVP from neurodiffeq.networks import FCNN from neurodiffeq.solvers import Solver1D from neurodiffeq.callbacks import WeightCallback from neurodiffeq.callbacks import WeightCallback1, So...
true
true
f71bcd5fb6a9e9c5a061b59f9eb248ca4c085954
5,479
py
Python
create_7segment_dataset.py
Kazuhito00/7seg-image-generator
2ab059814348800b289c033f839c7a255b72a1ac
[ "Apache-2.0" ]
null
null
null
create_7segment_dataset.py
Kazuhito00/7seg-image-generator
2ab059814348800b289c033f839c7a255b72a1ac
[ "Apache-2.0" ]
null
null
null
create_7segment_dataset.py
Kazuhito00/7seg-image-generator
2ab059814348800b289c033f839c7a255b72a1ac
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import random import argparse import cv2 as cv import numpy as np from tqdm import tqdm from create_7segment_image import create_7segment_image def get_args(): parser = argparse.ArgumentParser() parser.add_argument("--width", help='ima...
38.048611
80
0.592626
import os import random import argparse import cv2 as cv import numpy as np from tqdm import tqdm from create_7segment_image import create_7segment_image def get_args(): parser = argparse.ArgumentParser() parser.add_argument("--width", help='image width', type=int, default=96) parser.a...
true
true
f71bcdce19046a219d824e7ae538b1d15a34fb6e
27,412
py
Python
sklearn/preprocessing/tests/test_polynomial.py
talahajeer/scikit-learn
d66b42708a5912039740cd08f747229433e579b5
[ "BSD-3-Clause" ]
1
2021-12-28T09:33:38.000Z
2021-12-28T09:33:38.000Z
sklearn/preprocessing/tests/test_polynomial.py
talahajeer/scikit-learn
d66b42708a5912039740cd08f747229433e579b5
[ "BSD-3-Clause" ]
null
null
null
sklearn/preprocessing/tests/test_polynomial.py
talahajeer/scikit-learn
d66b42708a5912039740cd08f747229433e579b5
[ "BSD-3-Clause" ]
2
2017-01-16T17:53:31.000Z
2017-04-22T06:13:07.000Z
import numpy as np import pytest from scipy import sparse from scipy.sparse import random as sparse_random from sklearn.utils._testing import assert_array_almost_equal from numpy.testing import assert_allclose, assert_array_equal from scipy.interpolate import BSpline from sklearn.linear_model import LinearRegression f...
31.948718
88
0.583212
import numpy as np import pytest from scipy import sparse from scipy.sparse import random as sparse_random from sklearn.utils._testing import assert_array_almost_equal from numpy.testing import assert_allclose, assert_array_equal from scipy.interpolate import BSpline from sklearn.linear_model import LinearRegression f...
true
true
f71bce762094aac77e775115a4361cc778bec8f7
22,413
py
Python
tests/test_iso_parsing.py
mtauban/OWSLib
0b64e7a8f7eb9e1fca369716f9803821066bf0f3
[ "BSD-3-Clause" ]
null
null
null
tests/test_iso_parsing.py
mtauban/OWSLib
0b64e7a8f7eb9e1fca369716f9803821066bf0f3
[ "BSD-3-Clause" ]
null
null
null
tests/test_iso_parsing.py
mtauban/OWSLib
0b64e7a8f7eb9e1fca369716f9803821066bf0f3
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import io from owslib import util from owslib.etree import etree from owslib.iso import ( MD_Metadata, ) from owslib.namespaces import Namespaces def get_md_resource(file_path): """Read the file and parse into an XML tree. Parameters ---------- file_path : str Pa...
37.923858
126
0.664659
import io from owslib import util from owslib.etree import etree from owslib.iso import ( MD_Metadata, ) from owslib.namespaces import Namespaces def get_md_resource(file_path): namespaces = Namespaces().get_namespaces(keys=('gmd', 'gmi')) with io.open(file_path, mode='r', encoding='utf-8') as f: ...
true
true
f71bcee66968f36d4da1975fc465b3d5f8cf8ea5
1,789
py
Python
tegaki/core.py
RShirohara/handwriting_detection
f24aba8ac695fef064d090db78229ab482f342cd
[ "MIT" ]
null
null
null
tegaki/core.py
RShirohara/handwriting_detection
f24aba8ac695fef064d090db78229ab482f342cd
[ "MIT" ]
1
2021-02-24T00:31:12.000Z
2021-02-26T00:11:24.000Z
tegaki/core.py
RShirohara/handwriting_detection
f24aba8ac695fef064d090db78229ab482f342cd
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # author: @RShirohara # TODO: #8 from time import sleep from .detect import DetectArea from .googleapis import DetectText, GetTTS from .send import PlayMP3 from .util import VideoStream, QueueConnector class Tegaki: """HandWriting Detection core class. Attributes: capture (...
26.308824
77
0.57071
from time import sleep from .detect import DetectArea from .googleapis import DetectText, GetTTS from .send import PlayMP3 from .util import VideoStream, QueueConnector class Tegaki: def __init__(self, model_dir, src=0, width=None, height=None, maxsize=0): self.capture = VideoStream( src...
true
true
f71bceeb4b6085939b05dc07c82d4eea47511809
865
py
Python
OpenPGPAbs/gpgBackends/__init__.py
KOLANICH/OpenPGPAbs
1052422a74c3970990491972f81be8eb142d2dd7
[ "Unlicense" ]
null
null
null
OpenPGPAbs/gpgBackends/__init__.py
KOLANICH/OpenPGPAbs
1052422a74c3970990491972f81be8eb142d2dd7
[ "Unlicense" ]
null
null
null
OpenPGPAbs/gpgBackends/__init__.py
KOLANICH/OpenPGPAbs
1052422a74c3970990491972f81be8eb142d2dd7
[ "Unlicense" ]
null
null
null
_backendsNames = ("bouncyCastle", "pgpy") from pathlib import Path from os.path import expanduser from enum import IntFlag from abc import ABC, abstractmethod keyringPath = Path(expanduser("~/.gnupg/pubring.kbx")) class SecurityIssues(IntFlag): OK = 0 wrongSig = (1 << 0) expired = (1 << 1) disabled = (1 << 2) r...
26.212121
137
0.713295
_backendsNames = ("bouncyCastle", "pgpy") from pathlib import Path from os.path import expanduser from enum import IntFlag from abc import ABC, abstractmethod keyringPath = Path(expanduser("~/.gnupg/pubring.kbx")) class SecurityIssues(IntFlag): OK = 0 wrongSig = (1 << 0) expired = (1 << 1) disabled = (1 << 2) r...
true
true
f71bcf92d85264acc7dde6e6008f78b323781cda
417
py
Python
pinaxcon/hooks.py
n6151h/pyconau2017
092de5fd60d2b0dd207242cf2585e16ec6843392
[ "MIT" ]
7
2015-12-15T22:54:42.000Z
2018-12-29T03:31:51.000Z
pinaxcon/hooks.py
n6151h/pyconau2017
092de5fd60d2b0dd207242cf2585e16ec6843392
[ "MIT" ]
59
2017-08-09T02:19:42.000Z
2021-11-30T03:16:58.000Z
config/hooks.py
pyung/pycon-ng
fc7d1709e5da6f3013886d7a3099bd3d617b0df1
[ "MIT" ]
11
2016-01-03T18:04:58.000Z
2021-09-19T06:01:25.000Z
import markdown import pinax.boxes.hooks import pinax.pages.hooks def markup_renderer(content): return markdown.markdown(content) class PinaxBoxesHookSet(pinax.boxes.hooks.DefaultHookSet): def parse_content(self, content): return markup_renderer(content) class PinaxPagesHookSet(pinax.pages.hooks...
19.857143
58
0.772182
import markdown import pinax.boxes.hooks import pinax.pages.hooks def markup_renderer(content): return markdown.markdown(content) class PinaxBoxesHookSet(pinax.boxes.hooks.DefaultHookSet): def parse_content(self, content): return markup_renderer(content) class PinaxPagesHookSet(pinax.pages.hooks...
true
true
f71bd131825e1190622a69fa2bed7b9d67ded123
7,429
py
Python
selam/prepdata.py
tsoonjin/selam
fbbb355490271bf09056e05b23245be1b75ae24d
[ "MIT" ]
3
2020-10-14T06:05:26.000Z
2021-07-21T15:43:54.000Z
selam/prepdata.py
tsoonjin/selam
fbbb355490271bf09056e05b23245be1b75ae24d
[ "MIT" ]
null
null
null
selam/prepdata.py
tsoonjin/selam
fbbb355490271bf09056e05b23245be1b75ae24d
[ "MIT" ]
1
2020-05-08T12:59:35.000Z
2020-05-08T12:59:35.000Z
#!/bin/bash import os import sys import random import cv2 import numpy as np import xgboost as xgb from sklearn import preprocessing from sklearn.decomposition import PCA, NMF from sklearn.model_selection import train_test_split, GridSearchCV from sklearn.svm import SVC from sklearn.ensemble import RandomForestClassif...
34.714953
98
0.629964
import os import sys import random import cv2 import numpy as np import xgboost as xgb from sklearn import preprocessing from sklearn.decomposition import PCA, NMF from sklearn.model_selection import train_test_split, GridSearchCV from sklearn.svm import SVC from sklearn.ensemble import RandomForestClassifier from sk...
true
true
f71bd2ea8e759bf953972aa21026569e55e95cd0
3,360
py
Python
RLAgents/lib_common/WrapperSuperMario.py
michalnand/reinforcement_learning_agents
45f02c23b1135c87311dce5a52f6e643e4313fc3
[ "MIT" ]
2
2021-08-05T20:50:41.000Z
2021-12-25T11:00:38.000Z
RLAgents/lib_common/WrapperSuperMario.py
michalnand/reinforcement_learning_agents
45f02c23b1135c87311dce5a52f6e643e4313fc3
[ "MIT" ]
null
null
null
RLAgents/lib_common/WrapperSuperMario.py
michalnand/reinforcement_learning_agents
45f02c23b1135c87311dce5a52f6e643e4313fc3
[ "MIT" ]
null
null
null
import gym import numpy from PIL import Image from nes_py.wrappers import JoypadSpace from gym_super_mario_bros.actions import COMPLEX_MOVEMENT class NopOpsEnv(gym.Wrapper): def __init__(self, env=None, max_count=30): super(NopOpsEnv, self).__init__(env) self.max_count = max_count def reset(s...
27.540984
103
0.612798
import gym import numpy from PIL import Image from nes_py.wrappers import JoypadSpace from gym_super_mario_bros.actions import COMPLEX_MOVEMENT class NopOpsEnv(gym.Wrapper): def __init__(self, env=None, max_count=30): super(NopOpsEnv, self).__init__(env) self.max_count = max_count def reset(s...
true
true
f71bd2ef2fd1cafd83ccb890af0c057046ca9fa8
46,217
py
Python
facebook_business/adobjects/advideo.py
alternativshik/facebook-python-business-sdk
83be60d162ae34ffca186104597fdbb7d1fb7cf2
[ "CNRI-Python" ]
null
null
null
facebook_business/adobjects/advideo.py
alternativshik/facebook-python-business-sdk
83be60d162ae34ffca186104597fdbb7d1fb7cf2
[ "CNRI-Python" ]
null
null
null
facebook_business/adobjects/advideo.py
alternativshik/facebook-python-business-sdk
83be60d162ae34ffca186104597fdbb7d1fb7cf2
[ "CNRI-Python" ]
1
2021-04-09T22:44:52.000Z
2021-04-09T22:44:52.000Z
# Copyright 2014 Facebook, Inc. # You are hereby granted a non-exclusive, worldwide, royalty-free license to # use, copy, modify, and distribute this software in source code or binary # form for use in connection with the web services and APIs provided by # Facebook. # As with any software that integrates with the Fa...
39.400682
122
0.624857
from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject from facebook_business.adobjects.objectparser import ObjectParser from facebook_business.api import FacebookRequest from facebook_business.typechecker i...
true
true
f71bd3a0366aa96de99eb6814ff7287178cc8592
1,849
py
Python
solver.py
gtxn/wordle-solver
48e8317bd1930884fa65d5bd0559b0341af456b6
[ "MIT" ]
1
2022-02-25T06:11:26.000Z
2022-02-25T06:11:26.000Z
solver.py
gtxn/wordle-solver
48e8317bd1930884fa65d5bd0559b0341af456b6
[ "MIT" ]
null
null
null
solver.py
gtxn/wordle-solver
48e8317bd1930884fa65d5bd0559b0341af456b6
[ "MIT" ]
null
null
null
from multiprocessing.sharedctypes import Value from global_vars import * from utils import * def state_inp_to_str(state_inp): state_str = '' for ch in state_inp: state_str += str((['b', 'y', 'g'].index(ch))) return state_str def get_state_input(): valid = False while not valid: ...
22.277108
190
0.60411
from multiprocessing.sharedctypes import Value from global_vars import * from utils import * def state_inp_to_str(state_inp): state_str = '' for ch in state_inp: state_str += str((['b', 'y', 'g'].index(ch))) return state_str def get_state_input(): valid = False while not valid: ...
true
true
f71bd4c71e4fbf7580c2aedbde090cc21504f482
1,367
py
Python
mysite/urls.py
vansjyo/OSVI-RemoteControl
6d3dd6aa1cceac2254171d57b33975df08cda2a8
[ "MIT" ]
null
null
null
mysite/urls.py
vansjyo/OSVI-RemoteControl
6d3dd6aa1cceac2254171d57b33975df08cda2a8
[ "MIT" ]
null
null
null
mysite/urls.py
vansjyo/OSVI-RemoteControl
6d3dd6aa1cceac2254171d57b33975df08cda2a8
[ "MIT" ]
null
null
null
"""mysite URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based ...
37.972222
77
0.702999
from django.contrib import admin from django.urls import path, include, re_path from django.views.generic.base import TemplateView from django.conf import settings from django.views.static import serve from django.conf.urls.static import static urlpatterns = [ path('admin/', admin.site.urls), path('accounts/',...
true
true
f71bd4cab6d4e1f08fe404d5664c23ec2a6f827b
319
py
Python
openapi2ceres/main.py
laulin/openapi2ceres
16622d399b0baed0159f62bd44f405ab2565126c
[ "Apache-2.0" ]
null
null
null
openapi2ceres/main.py
laulin/openapi2ceres
16622d399b0baed0159f62bd44f405ab2565126c
[ "Apache-2.0" ]
null
null
null
openapi2ceres/main.py
laulin/openapi2ceres
16622d399b0baed0159f62bd44f405ab2565126c
[ "Apache-2.0" ]
null
null
null
from pprint import pprint from .args import get_args from .openapifile import OpenAPIFile from .ceresfile import CeresFile def main(): args = get_args() input_file = OpenAPIFile() input_file.load(args.input) output_producer = CeresFile(input_file, args.output_dir) output_producer.process()
22.785714
60
0.742947
from pprint import pprint from .args import get_args from .openapifile import OpenAPIFile from .ceresfile import CeresFile def main(): args = get_args() input_file = OpenAPIFile() input_file.load(args.input) output_producer = CeresFile(input_file, args.output_dir) output_producer.process()
true
true
f71bd4d65ed44d77bfd69c5414311187e9b51c70
1,447
py
Python
setup.py
fusion-energy/openmc_mesh_tally_to_vtk
b0a9077da79363dbf758d951ca68e5e5365d09ad
[ "MIT" ]
null
null
null
setup.py
fusion-energy/openmc_mesh_tally_to_vtk
b0a9077da79363dbf758d951ca68e5e5365d09ad
[ "MIT" ]
3
2021-11-19T23:32:23.000Z
2022-02-15T19:58:40.000Z
setup.py
fusion-energy/openmc_mesh_tally_to_vtk
b0a9077da79363dbf758d951ca68e5e5365d09ad
[ "MIT" ]
null
null
null
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="openmc_mesh_tally_to_vtk", version="develop", author="The Regular Mesh Plotter Development Team", author_email="mail@jshimwell.com", description="A Python package for converting OpenMC mes...
31.456522
119
0.612301
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="openmc_mesh_tally_to_vtk", version="develop", author="The Regular Mesh Plotter Development Team", author_email="mail@jshimwell.com", description="A Python package for converting OpenMC mes...
true
true
f71bd54ef148217f90cdec13b843fb943c0543ba
18,592
py
Python
saleor/order/models.py
vantrong291/saleor
d4820d53f7f9825510c7ea0c41cacbda6b612452
[ "CC-BY-4.0" ]
null
null
null
saleor/order/models.py
vantrong291/saleor
d4820d53f7f9825510c7ea0c41cacbda6b612452
[ "CC-BY-4.0" ]
null
null
null
saleor/order/models.py
vantrong291/saleor
d4820d53f7f9825510c7ea0c41cacbda6b612452
[ "CC-BY-4.0" ]
null
null
null
from decimal import Decimal from operator import attrgetter from uuid import uuid4 from django.conf import settings from django.contrib.postgres.fields import JSONField from django.core.validators import MinValueValidator from django.db import models from django.db.models import F, Max, Sum from django.urls import rev...
34.113761
186
0.677765
from decimal import Decimal from operator import attrgetter from uuid import uuid4 from django.conf import settings from django.contrib.postgres.fields import JSONField from django.core.validators import MinValueValidator from django.db import models from django.db.models import F, Max, Sum from django.urls import rev...
true
true
f71bd651d2401162ae8d5fd7fa574451af7b41e4
3,518
py
Python
check_updates.py
kunansy/CheckDependencyUpdates
56ef905b7baf568e38c66ce39ca71115438a758b
[ "MIT" ]
null
null
null
check_updates.py
kunansy/CheckDependencyUpdates
56ef905b7baf568e38c66ce39ca71115438a758b
[ "MIT" ]
null
null
null
check_updates.py
kunansy/CheckDependencyUpdates
56ef905b7baf568e38c66ce39ca71115438a758b
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import argparse import asyncio import re import sys from itertools import groupby from pathlib import Path from typing import Optional, NamedTuple, AsyncIterable import aiofiles import aiohttp PYPI_URL = "https://pypi.org/pypi/{package_name}/json" class Package(NamedTuple): name: str ...
26.451128
69
0.610006
import argparse import asyncio import re import sys from itertools import groupby from pathlib import Path from typing import Optional, NamedTuple, AsyncIterable import aiofiles import aiohttp PYPI_URL = "https://pypi.org/pypi/{package_name}/json" class Package(NamedTuple): name: str required_version: str...
true
true
f71bd6747f7fe25f8bd69690c6d90ecfa7797cb2
27,045
py
Python
amos/observe/traits.py
WithPrecedent/amos
35b2f5b8d493eac946b583dfcd9d0553e7565292
[ "Apache-2.0" ]
null
null
null
amos/observe/traits.py
WithPrecedent/amos
35b2f5b8d493eac946b583dfcd9d0553e7565292
[ "Apache-2.0" ]
null
null
null
amos/observe/traits.py
WithPrecedent/amos
35b2f5b8d493eac946b583dfcd9d0553e7565292
[ "Apache-2.0" ]
null
null
null
""" traits: tools for examining classes, instances, and other python objects Corey Rayburn Yung <coreyrayburnyung@gmail.com> Copyright 2021, Corey Rayburn Yung License: Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. ...
34.147727
80
0.614346
from __future__ import annotations from collections.abc import ( Container, Hashable, Iterable, Mapping, MutableSequence, Sequence, Set) import functools import inspect import types from typing import Any, Optional, Type, Union from ..repair import modify @functools.singledispatch def contains( item: object, ...
true
true
f71bd6d48a0ed9d4e130a00c843f740473f02ef1
14,332
py
Python
TaskList/Task.py
CaptainDesAstres/Blender-Render-Manager
39082e7833383bbe7dd414381f1b295e3b778439
[ "MIT" ]
5
2015-07-22T03:02:17.000Z
2018-10-11T10:07:42.000Z
TaskList/Task.py
CaptainDesAstres/Blender-Render-Manager
39082e7833383bbe7dd414381f1b295e3b778439
[ "MIT" ]
null
null
null
TaskList/Task.py
CaptainDesAstres/Blender-Render-Manager
39082e7833383bbe7dd414381f1b295e3b778439
[ "MIT" ]
1
2018-10-11T10:07:43.000Z
2018-10-11T10:07:43.000Z
#!/usr/bin/python3.4 # -*-coding:Utf-8 -* '''module to manage task settings''' import xml.etree.ElementTree as xmlMod import os, uuid, subprocess, shlex, time, datetime, threading from save import * from usefullFunctions import * from Preferences.PresetList.Preset.Preset import * from TaskList.FileInfo.FileInfo import ...
25.321555
140
0.629431
import xml.etree.ElementTree as xmlMod import os, uuid, subprocess, shlex, time, datetime, threading from save import * from usefullFunctions import * from Preferences.PresetList.Preset.Preset import * from TaskList.FileInfo.FileInfo import * from TaskList.TaskLog.TaskLog import * class Task: def __init__(self,...
true
true
f71bd874cf71759c3ef1a835fde21dc3e3e05f61
3,201
py
Python
Finetune/cosface_finetune.py
yuhaoooo/FaceAdv
73e27b7ca01243a9a3d115f5fabd1008b2afb34a
[ "MIT" ]
1
2022-03-04T09:18:04.000Z
2022-03-04T09:18:04.000Z
Finetune/cosface_finetune.py
yuhaoooo/FaceAdv
73e27b7ca01243a9a3d115f5fabd1008b2afb34a
[ "MIT" ]
null
null
null
Finetune/cosface_finetune.py
yuhaoooo/FaceAdv
73e27b7ca01243a9a3d115f5fabd1008b2afb34a
[ "MIT" ]
null
null
null
import os import torch import random import numpy as np import torch.optim as optim from torch.utils.data import DataLoader from torchvision import transforms, datasets from module.units.cosface_module import CosFace def accuracy(logits, y): _, preds = torch.max(logits, 1) return (preds == y).float().mean() ...
31.07767
114
0.590753
import os import torch import random import numpy as np import torch.optim as optim from torch.utils.data import DataLoader from torchvision import transforms, datasets from module.units.cosface_module import CosFace def accuracy(logits, y): _, preds = torch.max(logits, 1) return (preds == y).float().mean() ...
true
true
f71bd9829999b0a992bd60e9355172969776fbbe
881
py
Python
tests.py
gmr/ecs-pipeline-deploy
1e3e93a2497f4697c01de093c73a5cd78eebad63
[ "BSD-3-Clause" ]
2
2018-08-13T17:48:58.000Z
2018-10-29T20:10:11.000Z
tests.py
gmr/ecs-pipeline-deploy
1e3e93a2497f4697c01de093c73a5cd78eebad63
[ "BSD-3-Clause" ]
null
null
null
tests.py
gmr/ecs-pipeline-deploy
1e3e93a2497f4697c01de093c73a5cd78eebad63
[ "BSD-3-Clause" ]
1
2018-08-09T18:34:58.000Z
2018-08-09T18:34:58.000Z
# coding=utf-8 import unittest from ecs_pipeline_deploy import cli class TestImageParsing(unittest.TestCase): IMAGES = { 'alpine': (None, 'alpine', 'latest'), 'alpine:3.7': (None, 'alpine', '3.7'), 'docker.aweber.io/_/alpine:3.7': ('docker.aweber.io', '_/alpine', '3.7'), ...
32.62963
64
0.61521
import unittest from ecs_pipeline_deploy import cli class TestImageParsing(unittest.TestCase): IMAGES = { 'alpine': (None, 'alpine', 'latest'), 'alpine:3.7': (None, 'alpine', '3.7'), 'docker.aweber.io/_/alpine:3.7': ('docker.aweber.io', '_/alpine', '3.7'), 'docker.awe...
true
true
f71bd9cfe2794743457c4c581ce15146ca56acf0
3,438
py
Python
trac_captcha/release.py
FelixSchwarz/trac-captcha
90eb4d3b4dae297e23f09a99a91bcfabcd099dc6
[ "MIT" ]
1
2020-10-23T14:59:42.000Z
2020-10-23T14:59:42.000Z
trac_captcha/release.py
FelixSchwarz/trac-captcha
90eb4d3b4dae297e23f09a99a91bcfabcd099dc6
[ "MIT" ]
null
null
null
trac_captcha/release.py
FelixSchwarz/trac-captcha
90eb4d3b4dae297e23f09a99a91bcfabcd099dc6
[ "MIT" ]
null
null
null
# -*- coding: UTF-8 -*- name = 'TracCaptcha' version = '0.4dev' description = 'pluggable captcha infrastructure for Trac with reCAPTCHA included' long_description = ''' TracCaptcha is a Trac plugin to embed a captcha in the ticket page in addition to Trac's regular permission checks so that spammers are kept out. **...
38.629213
155
0.726294
name = 'TracCaptcha' version = '0.4dev' description = 'pluggable captcha infrastructure for Trac with reCAPTCHA included' long_description = ''' TracCaptcha is a Trac plugin to embed a captcha in the ticket page in addition to Trac's regular permission checks so that spammers are kept out. **"It just works":** Inst...
true
true
f71bdaca1e11f3f5800e7701806de0a2ef37a0d7
4,092
py
Python
setup.py
greedyuser/kur
ba6588ebfa5dec66d1e462c180618cc115fd38ef
[ "Apache-2.0" ]
867
2016-12-05T20:24:23.000Z
2022-02-18T09:07:14.000Z
setup.py
greedyuser/kur
ba6588ebfa5dec66d1e462c180618cc115fd38ef
[ "Apache-2.0" ]
90
2017-01-14T22:46:23.000Z
2021-02-09T13:32:27.000Z
setup.py
greedyuser/kur
ba6588ebfa5dec66d1e462c180618cc115fd38ef
[ "Apache-2.0" ]
135
2017-01-18T19:21:20.000Z
2022-01-24T16:57:59.000Z
""" Copyright 2016 Deepgram 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 distri...
25.575
80
0.585533
true
true
f71bdbabe6cef239bb72385c05db3589ac1298ec
1,226
py
Python
redash/cli/queries.py
zero1number/redash
caabc4afa4e60e273782a46d84099857821c6500
[ "BSD-2-Clause" ]
20,680
2015-11-16T15:38:37.000Z
2022-03-31T21:43:43.000Z
redash/cli/queries.py
zero1number/redash
caabc4afa4e60e273782a46d84099857821c6500
[ "BSD-2-Clause" ]
3,934
2015-11-16T14:46:49.000Z
2022-03-31T13:22:31.000Z
redash/cli/queries.py
zero1number/redash
caabc4afa4e60e273782a46d84099857821c6500
[ "BSD-2-Clause" ]
4,147
2015-11-17T15:57:23.000Z
2022-03-31T11:57:43.000Z
from click import argument from flask.cli import AppGroup from sqlalchemy.orm.exc import NoResultFound manager = AppGroup(help="Queries management commands.") @manager.command() @argument("query_id") @argument("tag") def add_tag(query_id, tag): from redash import models query_id = int(query_id) try: ...
18.861538
55
0.620718
from click import argument from flask.cli import AppGroup from sqlalchemy.orm.exc import NoResultFound manager = AppGroup(help="Queries management commands.") @manager.command() @argument("query_id") @argument("tag") def add_tag(query_id, tag): from redash import models query_id = int(query_id) try: ...
true
true
f71bdc17b0e03a9554e767de798e80d4152e68b0
4,093
py
Python
scripts/mk_copy_coords.py
diogomart/Meeko
8af7466fd45a5d5de00a2d188ee3d4531b8372a5
[ "Apache-2.0" ]
4
2021-08-04T07:25:48.000Z
2021-09-22T09:57:35.000Z
scripts/mk_copy_coords.py
diogomart/Meeko
8af7466fd45a5d5de00a2d188ee3d4531b8372a5
[ "Apache-2.0" ]
4
2021-08-16T19:05:19.000Z
2021-10-04T22:21:35.000Z
scripts/mk_copy_coords.py
diogomart/Meeko
8af7466fd45a5d5de00a2d188ee3d4531b8372a5
[ "Apache-2.0" ]
2
2021-09-18T12:10:12.000Z
2021-09-22T06:13:02.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # # import argparse import os import sys from rdkit import Chem from rdkit.six import StringIO from meeko import PDBQTMolecule def cmd_lineparser(): parser = argparse.ArgumentParser(description='Copy atom coordinates from PDBQT (or DLG) file \ ...
46.511364
117
0.636697
import argparse import os import sys from rdkit import Chem from rdkit.six import StringIO from meeko import PDBQTMolecule def cmd_lineparser(): parser = argparse.ArgumentParser(description='Copy atom coordinates from PDBQT (or DLG) file \ to original molec...
true
true
f71bdcb3835402e5205a96a5e1e0df7c469df44e
160
py
Python
bidfx/__init__.py
bidfx/bidfx-api-py
6b5e2c5efaa547b2d97a5556ef8d21d1de807f68
[ "Apache-2.0" ]
3
2020-04-29T09:19:56.000Z
2021-03-08T11:12:05.000Z
bidfx/__init__.py
bidfx/bidfx-api-py
6b5e2c5efaa547b2d97a5556ef8d21d1de807f68
[ "Apache-2.0" ]
3
2020-03-08T21:54:02.000Z
2021-02-02T22:33:51.000Z
bidfx/__init__.py
bidfx/bidfx-api-py
6b5e2c5efaa547b2d97a5556ef8d21d1de807f68
[ "Apache-2.0" ]
2
2020-06-13T10:52:18.000Z
2022-03-02T17:29:45.000Z
from .exceptions import * from .pricing import * from .session import * __all__ = session.__all__ + pricing.__all__ + exceptions.__all__ __version__ = "1.0.2"
22.857143
64
0.75
from .exceptions import * from .pricing import * from .session import * __all__ = session.__all__ + pricing.__all__ + exceptions.__all__ __version__ = "1.0.2"
true
true
f71bdcb6632ab0a396bd37cc7b250ad677eaebe8
12,992
py
Python
examples/PPO_super_mario_bros/env.py
hybug/RL_Lab
0748e143a0fb60b9912ca28fbebc25e8f97a2fe4
[ "Unlicense" ]
3
2020-12-31T02:20:15.000Z
2021-11-16T02:26:57.000Z
examples/PPO_super_mario_bros/env.py
hybug/RL_Lab
0748e143a0fb60b9912ca28fbebc25e8f97a2fe4
[ "Unlicense" ]
null
null
null
examples/PPO_super_mario_bros/env.py
hybug/RL_Lab
0748e143a0fb60b9912ca28fbebc25e8f97a2fe4
[ "Unlicense" ]
null
null
null
''' Author: hanyu Date: 2020-11-06 13:04:12 LastEditTime: 2021-01-09 09:07:08 LastEditors: hanyu Description: environment FilePath: /test_ppo/examples/PPO_super_mario_bros/env.py ''' import logging import numpy as np from collections import namedtuple # todo, to common def padding(input, seqlen, dtype): input = ...
34.831099
94
0.491379
import logging import numpy as np from collections import namedtuple def padding(input, seqlen, dtype): input = np.array(input, dtype=dtype) if len(input) >= seqlen: return input shape = input.shape pad = np.tile( np.zeros_like(input[0:1], dtype=dtype), [seqlen - shape[0]] + ...
true
true
f71bdd99c5f2350a22133188e60716a5121147ae
403
py
Python
SentyectorAPI/SentyectorAPI/wsgi.py
vaibhavarora102/Sentyector
c9023fe38e3517bd39b932a3282f5aebe5e84fbf
[ "MIT" ]
null
null
null
SentyectorAPI/SentyectorAPI/wsgi.py
vaibhavarora102/Sentyector
c9023fe38e3517bd39b932a3282f5aebe5e84fbf
[ "MIT" ]
null
null
null
SentyectorAPI/SentyectorAPI/wsgi.py
vaibhavarora102/Sentyector
c9023fe38e3517bd39b932a3282f5aebe5e84fbf
[ "MIT" ]
3
2021-04-10T06:33:07.000Z
2021-04-10T12:04:19.000Z
""" WSGI config for SentyectorAPI project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO...
23.705882
78
0.791563
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'SentyectorAPI.settings') application = get_wsgi_application()
true
true
f71bddb9bef15222e2b3b6e6039b80e283a19bf6
11,278
py
Python
src/model/dataProcessing/coco_utils.py
monkeypants/CartridgeOCR
a2cdaa72e3839a881118b85f5ff7b4515579004b
[ "MIT" ]
2
2021-07-12T02:37:46.000Z
2021-12-28T23:03:20.000Z
src/model/dataProcessing/coco_utils.py
monkeypants/CartridgeOCR
a2cdaa72e3839a881118b85f5ff7b4515579004b
[ "MIT" ]
28
2021-12-29T00:51:24.000Z
2022-03-24T08:03:59.000Z
src/model/dataProcessing/coco_utils.py
monkeypants/CartridgeOCR
a2cdaa72e3839a881118b85f5ff7b4515579004b
[ "MIT" ]
4
2021-09-24T16:13:43.000Z
2022-03-09T17:52:35.000Z
import copy import os import torch import torch.utils.data import torchvision from pycocotools import mask as coco_mask from pycocotools.coco import COCO import dataProcessing.transforms as T import logging class FilterAndRemapCocoCategories(object): def __init__(self, categories, remap=True): self.catego...
34.916409
107
0.605604
import copy import os import torch import torch.utils.data import torchvision from pycocotools import mask as coco_mask from pycocotools.coco import COCO import dataProcessing.transforms as T import logging class FilterAndRemapCocoCategories(object): def __init__(self, categories, remap=True): self.catego...
true
true
f71bdfb4494b0ea7e8661dce26911937bbed2de0
1,952
py
Python
facility_management/facility_management/doctype/fm_dashboard/fm_dashboard.py
odoochain/facility_management
545146db4e58e90311934a9d39c77def2d2a3e70
[ "MIT" ]
13
2020-06-23T23:44:16.000Z
2022-03-19T14:40:49.000Z
facility_management/facility_management/doctype/fm_dashboard/fm_dashboard.py
pazari/fmt
649618d47cd5cdefce93b5dc7efe5c25c299ad9c
[ "MIT" ]
2
2021-06-04T06:18:09.000Z
2021-06-06T08:41:36.000Z
facility_management/facility_management/doctype/fm_dashboard/fm_dashboard.py
pazari/fmt
649618d47cd5cdefce93b5dc7efe5c25c299ad9c
[ "MIT" ]
18
2020-02-18T10:57:13.000Z
2022-01-26T09:01:21.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2020, 9T9IT and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class FMDashboard(Document): def make_outstanding_balances(self): """ Make outstanding balances ...
29.134328
111
0.749488
from __future__ import unicode_literals import frappe from frappe.model.document import Document class FMDashboard(Document): def make_outstanding_balances(self): self.outstanding_balances = None outstanding_balances = _get_outstanding_balances(_get_properties(self.real_estate_property)) for outstanding_b...
true
true
f71be05c5a13840628f874af73f7d2dd87d4c2db
765
py
Python
ImagePoster/urls.py
AllyxMiko/ImagePoster
70b95a74b3ddb639e658f6b780dae5351947d6d6
[ "MIT" ]
null
null
null
ImagePoster/urls.py
AllyxMiko/ImagePoster
70b95a74b3ddb639e658f6b780dae5351947d6d6
[ "MIT" ]
null
null
null
ImagePoster/urls.py
AllyxMiko/ImagePoster
70b95a74b3ddb639e658f6b780dae5351947d6d6
[ "MIT" ]
null
null
null
"""ImagePoster URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-b...
34.772727
77
0.709804
from django.urls import path from django.urls.conf import include urlpatterns = [ path('images/', include('images.urls')), ]
true
true
f71be08bb68624aa77a36c61980a89daf8d0c77e
1,386
py
Python
setup.py
audiosamsung/brentvollebregt
077bbb8601b6c179d7b750a7e31ee141bd5b0644
[ "MIT" ]
1
2021-11-09T10:24:40.000Z
2021-11-09T10:24:40.000Z
setup.py
audiosamsung/brentvollebregt
077bbb8601b6c179d7b750a7e31ee141bd5b0644
[ "MIT" ]
null
null
null
setup.py
audiosamsung/brentvollebregt
077bbb8601b6c179d7b750a7e31ee141bd5b0644
[ "MIT" ]
null
null
null
from io import open from setuptools import setup from auto_py_to_exe import __version__ as version setup( name='auto-py-to-exe', version=version, url='https://github.com/brentvollebregt/auto-py-to-exe', license='MIT', author='Brent Vollebregt', author_email='brent@nitratine.net', descriptio...
35.538462
78
0.629149
from io import open from setuptools import setup from auto_py_to_exe import __version__ as version setup( name='auto-py-to-exe', version=version, url='https://github.com/brentvollebregt/auto-py-to-exe', license='MIT', author='Brent Vollebregt', author_email='brent@nitratine.net', descriptio...
true
true