hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f71285b6d9e626c77251dc851a57f5ebca500158
5,655
py
Python
tensorflow/contrib/seq2seq/python/kernel_tests/seq2seq_test.py
connectthefuture/tensorflow
93812423fcd5878aa2c1d0b68dc0496980c8519d
[ "Apache-2.0" ]
1
2018-11-15T08:44:10.000Z
2018-11-15T08:44:10.000Z
tensorflow/contrib/seq2seq/python/kernel_tests/seq2seq_test.py
connectthefuture/tensorflow
93812423fcd5878aa2c1d0b68dc0496980c8519d
[ "Apache-2.0" ]
null
null
null
tensorflow/contrib/seq2seq/python/kernel_tests/seq2seq_test.py
connectthefuture/tensorflow
93812423fcd5878aa2c1d0b68dc0496980c8519d
[ "Apache-2.0" ]
1
2020-07-20T18:02:33.000Z
2020-07-20T18:02:33.000Z
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
43.5
80
0.63466
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf from tensorflow.contrib import layers class Seq2SeqTest(tf.test.TestCase): def test_rnn_decoder(self): pass def test_dynamic_rnn_decoder_time_major(self): with self.t...
true
true
f71287f46dba59d87c273c637ad74b641b6d77d0
1,575
py
Python
example.py
sondreod/edb
f0a0175bd543be8246f83560fcda61492bee7021
[ "MIT" ]
null
null
null
example.py
sondreod/edb
f0a0175bd543be8246f83560fcda61492bee7021
[ "MIT" ]
null
null
null
example.py
sondreod/edb
f0a0175bd543be8246f83560fcda61492bee7021
[ "MIT" ]
null
null
null
from edb import Resource import json # Create resources on in the database. Does nothing if they already exists. # For convinience; create() returns the Resource object. my_list: list = Resource("my_list").create(list()) my_dictionary: dict = Resource("my_dictionary").create(dict()) # Dictionary my_dictionary["a_new...
27.155172
107
0.657778
from edb import Resource import json my_list: list = Resource("my_list").create(list()) my_dictionary: dict = Resource("my_dictionary").create(dict()) my_dictionary["a_new_key"] = "my_value" print( my_dictionary["a_new_key"], len(my_dictionary), ) my_dictionary.delete() for i in "abcdefghij": my_l...
true
true
f7128847d25e4fa17a06fad02f0e172863a3b8c8
3,187
py
Python
src/huntsman/pocs/utils/sshfs.py
wtgee/huntsman-pocs
c47976b1e52c5676a8237f6ee889555ede26d0e0
[ "MIT" ]
null
null
null
src/huntsman/pocs/utils/sshfs.py
wtgee/huntsman-pocs
c47976b1e52c5676a8237f6ee889555ede26d0e0
[ "MIT" ]
null
null
null
src/huntsman/pocs/utils/sshfs.py
wtgee/huntsman-pocs
c47976b1e52c5676a8237f6ee889555ede26d0e0
[ "MIT" ]
null
null
null
import os import subprocess from huntsman.pocs.utils import DummyLogger from huntsman.pocs.utils.config import query_config_server, load_device_config def mount(mountpoint, remote, server_alive_interval=20, logger=None, server_alive_count_max=3, strict_host_key_checking=False): ''' Mount remote on l...
29.785047
80
0.63006
import os import subprocess from huntsman.pocs.utils import DummyLogger from huntsman.pocs.utils.config import query_config_server, load_device_config def mount(mountpoint, remote, server_alive_interval=20, logger=None, server_alive_count_max=3, strict_host_key_checking=False): if logger is None: ...
true
true
f712891718b139044d06b6002914eccdeaf8fa59
10,125
py
Python
musicfig/nfc_tag.py
XerxesDGreat/musicfig
9f884bf3eb5d14d3796cbe4ed584c24dc408c964
[ "MIT" ]
null
null
null
musicfig/nfc_tag.py
XerxesDGreat/musicfig
9f884bf3eb5d14d3796cbe4ed584c24dc408c964
[ "MIT" ]
null
null
null
musicfig/nfc_tag.py
XerxesDGreat/musicfig
9f884bf3eb5d14d3796cbe4ed584c24dc408c964
[ "MIT" ]
null
null
null
import json import logging import os import time import yaml from .socketio import socketio from .models import db, NFCTagModel from flask import current_app from musicfig import colors from sqlalchemy import func logger = logging.getLogger(__name__) # all uses of current_app in here are for config; try just passin...
34.090909
105
0.641185
import json import logging import os import time import yaml from .socketio import socketio from .models import db, NFCTagModel from flask import current_app from musicfig import colors from sqlalchemy import func logger = logging.getLogger(__name__) class NFCTagOperationError(BaseException): pass class NFCTa...
true
true
f71289a4f5dcd28b2213ab3469a5fe63c743533c
284
py
Python
trydjango/conftest.py
vincentsjtu/learn
c570782b4bbd093dcb9f0ea113ed8524cb15caf7
[ "MIT" ]
null
null
null
trydjango/conftest.py
vincentsjtu/learn
c570782b4bbd093dcb9f0ea113ed8524cb15caf7
[ "MIT" ]
2
2022-03-01T11:22:58.000Z
2022-03-30T11:29:29.000Z
trydjango/conftest.py
vincentsjtu/learn
c570782b4bbd093dcb9f0ea113ed8524cb15caf7
[ "MIT" ]
null
null
null
import pytest from trydjango.users.models import User from trydjango.users.tests.factories import UserFactory @pytest.fixture(autouse=True) def media_storage(settings, tmpdir): settings.MEDIA_ROOT = tmpdir.strpath @pytest.fixture def user() -> User: return UserFactory()
18.933333
55
0.778169
import pytest from trydjango.users.models import User from trydjango.users.tests.factories import UserFactory @pytest.fixture(autouse=True) def media_storage(settings, tmpdir): settings.MEDIA_ROOT = tmpdir.strpath @pytest.fixture def user() -> User: return UserFactory()
true
true
f7128a4725d2b482a6995ee7a74d1f94970bf5ba
10,596
py
Python
src/tools/grit/grit/format/data_pack.py
goochen/naiveproxy
1d0682ee5bae6e648cd43c65f49b4eefd224f206
[ "BSD-3-Clause" ]
1
2020-06-02T02:28:34.000Z
2020-06-02T02:28:34.000Z
src/tools/grit/grit/format/data_pack.py
wclmgcd/naiveproxy
e32a3afb76fd21207c322f2d5e794c4f5505fb59
[ "BSD-3-Clause" ]
null
null
null
src/tools/grit/grit/format/data_pack.py
wclmgcd/naiveproxy
e32a3afb76fd21207c322f2d5e794c4f5505fb59
[ "BSD-3-Clause" ]
2
2021-01-05T23:43:46.000Z
2021-01-07T23:36:34.000Z
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Support for formatting a data pack file used for platform agnostic resource files. """ from __future__ import print_function i...
32.906832
80
0.681578
from __future__ import print_function import collections import os import struct import sys if __name__ == '__main__': sys.path.append(os.path.join(os.path.dirname(__file__), '../..')) import six from grit import util from grit.node import include from grit.node import message from grit.node import structure P...
true
true
f7128a57d220eca29d4bc378f485bcdfb09ae8ad
5,430
py
Python
ingestion/5.ingest_results_file.py
iamrahulsen/formula-1-data-analysis
1d0cba704fe41d1eec0d21873e956621b418732b
[ "MIT" ]
null
null
null
ingestion/5.ingest_results_file.py
iamrahulsen/formula-1-data-analysis
1d0cba704fe41d1eec0d21873e956621b418732b
[ "MIT" ]
null
null
null
ingestion/5.ingest_results_file.py
iamrahulsen/formula-1-data-analysis
1d0cba704fe41d1eec0d21873e956621b418732b
[ "MIT" ]
null
null
null
# Databricks notebook source # MAGIC %md # MAGIC ### Ingest results.json file # COMMAND ---------- dbutils.widgets.text("p_data_source", "") v_data_source = dbutils.widgets.get("p_data_source") # COMMAND ---------- dbutils.widgets.text("p_file_date", "2021-03-28") v_file_date = dbutils.widgets.get("p_file_date") #...
32.51497
116
0.568508
dbutils.widgets.text("p_data_source", "") v_data_source = dbutils.widgets.get("p_data_source") dbutils.widgets.text("p_file_date", "2021-03-28") v_file_date = dbutils.widgets.get("p_file_date") from pyspark.sql.types import StructType, StructField, IntegerType, StringType, FloatType results_schema = Struc...
true
true
f7128b4df1785c9186651cb71d487554c38f5b2c
996
py
Python
pyvisdk/do/snapshot_fault.py
Infinidat/pyvisdk
f2f4e5f50da16f659ccc1d84b6a00f397fa997f8
[ "MIT" ]
null
null
null
pyvisdk/do/snapshot_fault.py
Infinidat/pyvisdk
f2f4e5f50da16f659ccc1d84b6a00f397fa997f8
[ "MIT" ]
null
null
null
pyvisdk/do/snapshot_fault.py
Infinidat/pyvisdk
f2f4e5f50da16f659ccc1d84b6a00f397fa997f8
[ "MIT" ]
null
null
null
import logging from pyvisdk.exceptions import InvalidArgumentError ######################################## # Automatically generated, do not edit. ######################################## log = logging.getLogger(__name__) def SnapshotFault(vim, *args, **kwargs): '''Base type for Snapshot-related errors.''' ...
30.181818
124
0.59739
import logging from pyvisdk.exceptions import InvalidArgumentError log = logging.getLogger(__name__) def SnapshotFault(vim, *args, **kwargs): obj = vim.client.factory.create('{urn:vim25}SnapshotFault') if (len(args) + len(kwargs)) < 4: raise IndexError('Expected at least 5 arguments got: %d' %...
true
true
f7128c58a7b7c6c597789c40f992c703f05c9108
1,158
py
Python
tests/integration/states/test_rabbitmq_vhost.py
jubrad/salt
7960334fb726cfde45e6409da79a65535c626685
[ "Apache-2.0" ]
1
2021-08-14T13:48:38.000Z
2021-08-14T13:48:38.000Z
tests/integration/states/test_rabbitmq_vhost.py
jubrad/salt
7960334fb726cfde45e6409da79a65535c626685
[ "Apache-2.0" ]
3
2015-03-31T14:44:05.000Z
2015-06-18T19:02:24.000Z
tests/integration/states/test_rabbitmq_vhost.py
jubrad/salt
7960334fb726cfde45e6409da79a65535c626685
[ "Apache-2.0" ]
4
2020-11-04T06:28:05.000Z
2022-02-09T10:54:49.000Z
# -*- coding: utf-8 -*- ''' Tests for the rabbitmq state ''' # Import python libs from __future__ import absolute_import # Import Salt Testing libs from tests.support.case import ModuleCase from tests.support.helpers import skip_if_not_root from tests.support.mixins import SaltReturnAssertsMixin @skip_if_not_root c...
26.318182
77
0.660622
from __future__ import absolute_import from tests.support.case import ModuleCase from tests.support.helpers import skip_if_not_root from tests.support.mixins import SaltReturnAssertsMixin @skip_if_not_root class RabbitVHostTestCase(ModuleCase, SaltReturnAssertsMixin): def setUp(self): super(RabbitVHostT...
true
true
f7128d78527e49aae62ae4e23731ddafe2c11c48
741
py
Python
setup.py
trampfox/prometheus-barman-exporter
ca6fb1de037c32f79511c9ec6a5d4304311c8c52
[ "MIT" ]
null
null
null
setup.py
trampfox/prometheus-barman-exporter
ca6fb1de037c32f79511c9ec6a5d4304311c8c52
[ "MIT" ]
null
null
null
setup.py
trampfox/prometheus-barman-exporter
ca6fb1de037c32f79511c9ec6a5d4304311c8c52
[ "MIT" ]
null
null
null
from setuptools import setup setup(name='barman_exporter', version='1.0.7', description='Barman exporter for Prometheus', long_description='Barman exporter for Prometheus. Full description at https://github.com/ahes/prometheus-barman-exporter', url='https://github.com/ahes/prometheus-barman-exp...
35.285714
128
0.668016
from setuptools import setup setup(name='barman_exporter', version='1.0.7', description='Barman exporter for Prometheus', long_description='Barman exporter for Prometheus. Full description at https://github.com/ahes/prometheus-barman-exporter', url='https://github.com/ahes/prometheus-barman-exp...
true
true
f7128d9739646ed3fc66855d53a859ebdca120ab
15,273
py
Python
gausspy/gp.py
nic-kill/gausspy
1f6673bc2dbd24c8a07cb33a7f3035f95c68bd43
[ "MIT" ]
1
2020-08-26T10:39:52.000Z
2020-08-26T10:39:52.000Z
gausspy/gp.py
nic-kill/gausspy
1f6673bc2dbd24c8a07cb33a7f3035f95c68bd43
[ "MIT" ]
1
2020-05-19T22:49:10.000Z
2020-05-19T22:49:10.000Z
gausspy/gp.py
nic-kill/gausspy
1f6673bc2dbd24c8a07cb33a7f3035f95c68bd43
[ "MIT" ]
1
2021-01-18T03:00:54.000Z
2021-01-18T03:00:54.000Z
import os import pickle # from matplotlib import pyplot as plt import numpy as np from . import AGD_decomposer from . import gradient_descent from . import ioHDF5 class GaussianDecomposer(object): def __init__(self, filename=None, phase="one"): if filename: temp = pickle.load(open(filename, ...
34.554299
88
0.487462
import os import pickle import numpy as np from . import AGD_decomposer from . import gradient_descent from . import ioHDF5 class GaussianDecomposer(object): def __init__(self, filename=None, phase="one"): if filename: temp = pickle.load(open(filename, "rb")) self.p = temp.p ...
true
true
f7128da725b2aee08ac1866f2616040eb6a6d3eb
2,406
py
Python
azure-mgmt-batch/azure/mgmt/batch/models/__init__.py
SUSE/azure-sdk-for-python
324f99d26dd6f4ee9793b9bf1d4d5f928e4b6c2f
[ "MIT" ]
2
2020-07-29T14:22:17.000Z
2020-11-06T18:47:40.000Z
azure-mgmt-batch/azure/mgmt/batch/models/__init__.py
SUSE/azure-sdk-for-python
324f99d26dd6f4ee9793b9bf1d4d5f928e4b6c2f
[ "MIT" ]
1
2016-08-01T07:37:04.000Z
2016-08-01T07:37:04.000Z
azure-mgmt-batch/azure/mgmt/batch/models/__init__.py
SUSE/azure-sdk-for-python
324f99d26dd6f4ee9793b9bf1d4d5f928e4b6c2f
[ "MIT" ]
1
2020-12-12T21:04:41.000Z
2020-12-12T21:04:41.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
37.015385
89
0.767249
from .auto_storage_base_properties import AutoStorageBaseProperties from .key_vault_reference import KeyVaultReference from .batch_account_create_parameters import BatchAccountCreateParameters from .auto_storage_properties import AutoStorageProperties from .batch_account import BatchAccount from .batch_account_update_...
true
true
f71291ca3f6b1b80fea1c9765849ad309754cab9
6,824
py
Python
utilities/d2u.py
zhester/hzpy
d41c002493a4f5b4667870fca0a2849307d51b34
[ "BSD-2-Clause" ]
3
2016-08-31T21:54:06.000Z
2018-05-29T13:37:02.000Z
utilities/d2u.py
zhester/hzpy
d41c002493a4f5b4667870fca0a2849307d51b34
[ "BSD-2-Clause" ]
null
null
null
utilities/d2u.py
zhester/hzpy
d41c002493a4f5b4667870fca0a2849307d51b34
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python """ dos2unix Batch Utility Script ============================= First, use this for most things: find . -name *.txt | xargs dos2unix Second, this is a little smarter (might be faster), and I can control the globbing a little better. TODO ---- - implement some accounting (scanned, detect...
26.34749
78
0.530188
""" dos2unix Batch Utility Script ============================= First, use this for most things: find . -name *.txt | xargs dos2unix Second, this is a little smarter (might be faster), and I can control the globbing a little better. TODO ---- - implement some accounting (scanned, detected, fixed, directories...
false
true
f71293bbe36c003e93c72179ece14f6e0c47e8d2
989
py
Python
textakel/api.py
alexbennik/textakel
d3d279ff72402cbfe38cbb1175b8a95917c3ae73
[ "MIT" ]
2
2019-01-20T16:15:54.000Z
2019-01-20T18:41:10.000Z
textakel/api.py
alexbennik/textakel
d3d279ff72402cbfe38cbb1175b8a95917c3ae73
[ "MIT" ]
null
null
null
textakel/api.py
alexbennik/textakel
d3d279ff72402cbfe38cbb1175b8a95917c3ae73
[ "MIT" ]
null
null
null
from . import textakel FUNCTIONS = { "alphabetical": textakel.alphabetical, "capitalize": textakel.capitalize, "casefold": textakel.casefold, "count_multiples": textakel.count_multiples, "lower": textakel.lower, "remove-consonant": textakel.remove_consonant, "remove-digit": textakel.remove_...
26.72973
54
0.707786
from . import textakel FUNCTIONS = { "alphabetical": textakel.alphabetical, "capitalize": textakel.capitalize, "casefold": textakel.casefold, "count_multiples": textakel.count_multiples, "lower": textakel.lower, "remove-consonant": textakel.remove_consonant, "remove-digit": textakel.remove_...
true
true
f712942979d6c3d3796f04355ddfa6d66017d98e
30,810
py
Python
pyscripts/test_server.py
davidglvn/switcher_webapi
c31d9e0557116a3af9ca2c7135deadda75c8abe8
[ "MIT" ]
null
null
null
pyscripts/test_server.py
davidglvn/switcher_webapi
c31d9e0557116a3af9ca2c7135deadda75c8abe8
[ "MIT" ]
null
null
null
pyscripts/test_server.py
davidglvn/switcher_webapi
c31d9e0557116a3af9ca2c7135deadda75c8abe8
[ "MIT" ]
null
null
null
"""Unit tests for the Switcher WebAPI. .. codeauthor:: Tomer Figenblat <tomer.figenblat@gmail.com> """ from aiohttp import ClientSession from aioswitcher.api.messages import ResponseMessageType from aioswitcher.consts import STATE_ON, WEEKDAY_TUP from asynctest import MagicMock, patch from bs4 import BeautifulSoup ...
37.210145
95
0.532554
from aiohttp import ClientSession from aioswitcher.api.messages import ResponseMessageType from aioswitcher.consts import STATE_ON, WEEKDAY_TUP from asynctest import MagicMock, patch from bs4 import BeautifulSoup import consts import mappings from helpers import get_local_ip_address, get_next_weekday BASE_URL_FORMAT...
true
true
f71295cea7c1397dec9a355da84354c250326778
685
py
Python
manage.py
Naveendata-ux/ufaber
93b0b357f2bf6befcbab8248e2df0f911630dc9e
[ "MIT" ]
null
null
null
manage.py
Naveendata-ux/ufaber
93b0b357f2bf6befcbab8248e2df0f911630dc9e
[ "MIT" ]
null
null
null
manage.py
Naveendata-ux/ufaber
93b0b357f2bf6befcbab8248e2df0f911630dc9e
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys #!/usr/bin/env python def main(): """Run administrative tasks.""" os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core_app.settings') try: from django.core.management import execute_from_comman...
29.782609
73
0.680292
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core_app.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installed and " ...
true
true
f712966868b064290d2b80698c1a6861cdeaa581
1,579
py
Python
xlsxwriter/test/comparison/test_chart_data_labels19.py
dthadi3/XlsxWriter
f1801e82240aa9c746ce14948ef95990b83162cf
[ "BSD-2-Clause-FreeBSD" ]
1
2020-07-01T07:24:37.000Z
2020-07-01T07:24:37.000Z
xlsxwriter/test/comparison/test_chart_data_labels19.py
dthadi3/XlsxWriter
f1801e82240aa9c746ce14948ef95990b83162cf
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
xlsxwriter/test/comparison/test_chart_data_labels19.py
dthadi3/XlsxWriter
f1801e82240aa9c746ce14948ef95990b83162cf
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2020, John McNamara, jmcnamara@cpan.org # from ..excel_comparison_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTest): """...
25.063492
79
0.525016
from ..excel_comparison_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTest): def setUp(self): self.set_filename('chart_data_labels19.xlsx') def test_create_file(self): workbook = Workbook(self.got_filename) worksheet = ...
true
true
f71296bf579ecacadd53bec5a4c917eeeb546132
3,862
py
Python
lusidtools/lpt/txn_config.py
entityoneuk/lusid-python-tools
ee13d92673d01cfc9f7c427ed053e7a1e8d64973
[ "MIT" ]
1
2020-04-27T12:27:23.000Z
2020-04-27T12:27:23.000Z
lusidtools/lpt/txn_config.py
entityoneuk/lusid-python-tools
ee13d92673d01cfc9f7c427ed053e7a1e8d64973
[ "MIT" ]
null
null
null
lusidtools/lpt/txn_config.py
entityoneuk/lusid-python-tools
ee13d92673d01cfc9f7c427ed053e7a1e8d64973
[ "MIT" ]
null
null
null
from lusidtools.lpt import lpt from lusidtools.lpt import lse from lusidtools.lpt import stdargs from lusidtools.lpt import txn_config_yaml as tcy TOOLNAME = "txn_cfg" TOOLTIP = "Get/Set the transaction configuration" def parse(extend=None, args=None): return ( stdargs.Parser( "Get/Set transa...
29.937984
90
0.592957
from lusidtools.lpt import lpt from lusidtools.lpt import lse from lusidtools.lpt import stdargs from lusidtools.lpt import txn_config_yaml as tcy TOOLNAME = "txn_cfg" TOOLTIP = "Get/Set the transaction configuration" def parse(extend=None, args=None): return ( stdargs.Parser( "Get/Set transa...
true
true
f712976dcaab7cb36a0c67140323a28c0f8cb86f
3,858
py
Python
3_create_database/scripts/createDB2.py
ReyhaneAskari/SLA_violation_classification
258a3c415cebcd04601e4d794d42d664471df668
[ "MIT" ]
2
2019-03-25T18:07:10.000Z
2022-03-06T08:49:49.000Z
3_create_database/scripts/createDB2.py
ReyhaneAskari/SLA_violation_classification
258a3c415cebcd04601e4d794d42d664471df668
[ "MIT" ]
null
null
null
3_create_database/scripts/createDB2.py
ReyhaneAskari/SLA_violation_classification
258a3c415cebcd04601e4d794d42d664471df668
[ "MIT" ]
2
2018-10-10T01:18:10.000Z
2018-10-10T03:05:53.000Z
# -*- coding: utf-8 -*- # In this script we find all the history behind an evicted task that has not been finished/killed/failed/lost. # We find how many times it has been submitted and what were the events related to this task. # The violatedtasks dictionary is the one that is we are looking for. It has only one ent...
53.583333
215
0.722136
from os import chdir, listdir from pandas import read_csv from os import path from random import randint, sample, seed from collections import OrderedDict from pandas import DataFrame import numpy as np import matplotlib.pyplot as plt import csv import codecs chdir('/home/askrey/Dropbox/Project_step_by_step/2_find...
true
true
f71297b69e5a1e0fd0c1b3cdc8e1e77c841a309a
14,067
py
Python
test/benchmarks/retriever.py
dg4271/haystack
e930d8a717dfca0c7d502f331d7076b51b5f6898
[ "Apache-2.0" ]
1
2021-02-08T14:28:02.000Z
2021-02-08T14:28:02.000Z
test/benchmarks/retriever.py
dg4271/haystack
e930d8a717dfca0c7d502f331d7076b51b5f6898
[ "Apache-2.0" ]
null
null
null
test/benchmarks/retriever.py
dg4271/haystack
e930d8a717dfca0c7d502f331d7076b51b5f6898
[ "Apache-2.0" ]
null
null
null
import pandas as pd from pathlib import Path from time import perf_counter from utils import get_document_store, get_retriever, index_to_doc_store, load_config from haystack.preprocessor.utils import eval_data_from_json from haystack.document_store.faiss import FAISSDocumentStore from haystack import Document import p...
43.959375
194
0.584986
import pandas as pd from pathlib import Path from time import perf_counter from utils import get_document_store, get_retriever, index_to_doc_store, load_config from haystack.preprocessor.utils import eval_data_from_json from haystack.document_store.faiss import FAISSDocumentStore from haystack import Document import p...
true
true
f71298107aa43bcfe71b59a640b46f7795cf0a4c
17,031
py
Python
spyder/plugins/base.py
akshay-akkipro/spyder
9efd8aeb1a115fbf61e32f82bbcb073594c51491
[ "MIT" ]
null
null
null
spyder/plugins/base.py
akshay-akkipro/spyder
9efd8aeb1a115fbf61e32f82bbcb073594c51491
[ "MIT" ]
null
null
null
spyder/plugins/base.py
akshay-akkipro/spyder
9efd8aeb1a115fbf61e32f82bbcb073594c51491
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright © Spyder Project Contributors # Licensed under the terms of the MIT License # (see spyder/__init__.py for details) """ Base plugin class """ # Standard library imports import inspect import os import sys # Third party imports import qdarkstyle from qtpy.QtCore import Qt, Slot fr...
36.468951
80
0.629734
import inspect import os import sys import qdarkstyle from qtpy.QtCore import Qt, Slot from qtpy.QtGui import QCursor, QKeySequence from qtpy.QtWidgets import (QAction, QApplication, QDockWidget, QMainWindow, QMenu, QMessageBox, QShortcut, QToolButton) from spyder.config.base import _ fr...
true
true
f7129844b011302e6ca509fe9a3d156f8d597c73
2,790
py
Python
src/api/impl/filters.py
fekblom/critic
a6b60c9053e13d4c878d50531860d7389568626d
[ "Apache-2.0" ]
null
null
null
src/api/impl/filters.py
fekblom/critic
a6b60c9053e13d4c878d50531860d7389568626d
[ "Apache-2.0" ]
null
null
null
src/api/impl/filters.py
fekblom/critic
a6b60c9053e13d4c878d50531860d7389568626d
[ "Apache-2.0" ]
null
null
null
# -*- mode: python; encoding: utf-8 -*- # # Copyright 2014 the Critic contributors, Opera Software ASA # # 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/LI...
36.233766
80
0.666667
import api class RepositoryFilter(object): def __init__(self, subject_id, filter_type, path, filter_id, repository_id, delegate_string, repository=None): self.__subject_id = subject_id self.__subject = None self.type = filter_type self.path = path self.id =...
true
true
f712987253d445bca87ff8f58246aad6d0a02786
800
py
Python
Code/Collecting Statistics/plotStats.py
KunalSin9h/Playlist_Analysis
e8f7313f7c6dfcd3b3cabdfde89c8cdcc1f72f06
[ "MIT" ]
3
2021-09-23T12:08:40.000Z
2021-09-25T08:38:29.000Z
Code/Collecting Statistics/plotStats.py
KunalSin9h/Playlist_Analysis
e8f7313f7c6dfcd3b3cabdfde89c8cdcc1f72f06
[ "MIT" ]
1
2021-09-18T06:13:27.000Z
2021-09-22T04:55:24.000Z
Code/Collecting Statistics/plotStats.py
KunalSin9h/Playlist_Analysis
e8f7313f7c6dfcd3b3cabdfde89c8cdcc1f72f06
[ "MIT" ]
null
null
null
""" plotStats() method to collect statistics for the track data. Author: Kunal Singh Email: pykunalsingh@gmail.com """ def plotStats(fileName): # read in a playlist with open(fileName, 'rb') as fp: plist = plistlib.load(fp) # get the tracks from the playlist tracks = plist['Tracks'] ...
25.806452
70
0.61625
def plotStats(fileName): with open(fileName, 'rb') as fp: plist = plistlib.load(fp) tracks = plist['Tracks'] ratings = [] durations = [] for trackId, track in tracks.items(): try: ratings.append(track['Album Rating']) durations.append(tr...
true
true
f7129882b87443260990212571f697c0b0264fb4
5,710
py
Python
tenant_schemas/models.py
revnueinc/django-tenant-schemas
071ad4c2afdff9aa6201e06f12cbaad0a0f50b6f
[ "MIT" ]
null
null
null
tenant_schemas/models.py
revnueinc/django-tenant-schemas
071ad4c2afdff9aa6201e06f12cbaad0a0f50b6f
[ "MIT" ]
null
null
null
tenant_schemas/models.py
revnueinc/django-tenant-schemas
071ad4c2afdff9aa6201e06f12cbaad0a0f50b6f
[ "MIT" ]
null
null
null
from django.core.management import call_command from django.db import connection, connections, models from tenant_schemas.postgresql_backend.base import _check_schema_name from tenant_schemas.signals import post_schema_sync from tenant_schemas.utils import (get_public_schema_name, schema_exists, ...
36.83871
103
0.605779
from django.core.management import call_command from django.db import connection, connections, models from tenant_schemas.postgresql_backend.base import _check_schema_name from tenant_schemas.signals import post_schema_sync from tenant_schemas.utils import (get_public_schema_name, schema_exists, ...
true
true
f71299c15c0002620fa2e67ca35dc844f7f235fb
3,283
py
Python
docs/source/conf.py
IndoFashion/IndoFashion
23670a8d154de0889b6e92dc8186617be5da1b51
[ "MIT" ]
16
2021-05-18T15:37:26.000Z
2022-02-20T10:22:29.000Z
docs/source/conf.py
IndoFashion/IndoFashion
23670a8d154de0889b6e92dc8186617be5da1b51
[ "MIT" ]
null
null
null
docs/source/conf.py
IndoFashion/IndoFashion
23670a8d154de0889b6e92dc8186617be5da1b51
[ "MIT" ]
null
null
null
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
35.301075
114
0.691745
import os import sys sys.path.insert(0, os.path.abspath('../../')) project = 'IndoFashion: Apparel Classification for Indian Ethnic Clothes' copyright = '2021, Pranjal Singh Rajput, Shivangi Aneja' author = 'Pranjal Singh Rajput, Shivangi Aneja' release = '1.0' extensions = [ "recommonmark", "sphinx.ext...
true
true
f7129a3ebdde31ba41c695ac90612665cf92d610
738
py
Python
test_sanitize_sheet.py
RobertSchaffer1/lsdc
010a26f98bec690f8c2cf47b02764c69ce26c2c5
[ "BSD-3-Clause" ]
null
null
null
test_sanitize_sheet.py
RobertSchaffer1/lsdc
010a26f98bec690f8c2cf47b02764c69ce26c2c5
[ "BSD-3-Clause" ]
147
2020-04-10T20:31:49.000Z
2022-03-22T17:29:52.000Z
test_sanitize_sheet.py
JunAishima/lsdc
2a68be66642b14a0440182954bcb513c82874ca1
[ "BSD-3-Clause" ]
10
2020-09-25T20:34:55.000Z
2021-10-06T19:11:18.000Z
import sanitize_sheet import pytest def test_check_info(): info = ['abcdef'] assert(sanitize_sheet.check_sampleNames(info)) info = ['abcdefghijklmnopqrstuvwxy1234'] with pytest.raises(Exception): sanitize_sheet.check_info(info) def test_check_for_sequence(): assert(sanitize_sheet.check_for_...
35.142857
63
0.743902
import sanitize_sheet import pytest def test_check_info(): info = ['abcdef'] assert(sanitize_sheet.check_sampleNames(info)) info = ['abcdefghijklmnopqrstuvwxy1234'] with pytest.raises(Exception): sanitize_sheet.check_info(info) def test_check_for_sequence(): assert(sanitize_sheet.check_for_...
true
true
f7129b2f8abe37ddfb6aefd03c05d64d68c8beec
6,828
py
Python
agents/craftassist/tests/test_get_memory.py
CowherdChris/droidlet
8d965c1ebc38eceb6f8083c52b1146c1bc17d5e1
[ "MIT" ]
null
null
null
agents/craftassist/tests/test_get_memory.py
CowherdChris/droidlet
8d965c1ebc38eceb6f8083c52b1146c1bc17d5e1
[ "MIT" ]
null
null
null
agents/craftassist/tests/test_get_memory.py
CowherdChris/droidlet
8d965c1ebc38eceb6f8083c52b1146c1bc17d5e1
[ "MIT" ]
null
null
null
""" Copyright (c) Facebook, Inc. and its affiliates. """ import unittest import droidlet.base_util import droidlet.lowlevel.minecraft.shape_helpers import droidlet.lowlevel.minecraft.shapes import droidlet.lowlevel.minecraft.shapes as shapes from agents.craftassist.tests.base_craftassist_test_case import BaseCraftassi...
39.241379
126
0.652607
import unittest import droidlet.base_util import droidlet.lowlevel.minecraft.shape_helpers import droidlet.lowlevel.minecraft.shapes import droidlet.lowlevel.minecraft.shapes as shapes from agents.craftassist.tests.base_craftassist_test_case import BaseCraftassistTestCase from droidlet.interpreter.tests.all_test_comma...
true
true
f7129b860e06047aab5a8491e0d82575f7e3f352
1,672
py
Python
obniz/obniz/libs/embeds/ble/ble_remote_attribute_abstract.py
izm51/obniz-python-sdk
40a738b5fe2c0a415cdc09f46d28c143982bfb07
[ "MIT" ]
11
2019-03-22T12:02:11.000Z
2021-01-21T04:57:18.000Z
obniz/obniz/libs/embeds/ble/ble_remote_attribute_abstract.py
izm51/obniz-python-sdk
40a738b5fe2c0a415cdc09f46d28c143982bfb07
[ "MIT" ]
5
2019-03-02T08:28:25.000Z
2021-02-02T22:06:37.000Z
obniz/obniz/libs/embeds/ble/ble_remote_attribute_abstract.py
izm51/obniz-python-sdk
40a738b5fe2c0a415cdc09f46d28c143982bfb07
[ "MIT" ]
3
2019-07-20T06:55:09.000Z
2019-12-04T05:05:00.000Z
from .ble_attribute_abstract import BleAttributeAbstract class BleRemoteAttributeAbstract(BleAttributeAbstract): def __init__(self, params): super().__init__(params) self.isRemote = False self.discoverdOnRemote = False @property def ws_child_uuid_name(self): children_name...
28.338983
78
0.586124
from .ble_attribute_abstract import BleAttributeAbstract class BleRemoteAttributeAbstract(BleAttributeAbstract): def __init__(self, params): super().__init__(params) self.isRemote = False self.discoverdOnRemote = False @property def ws_child_uuid_name(self): children_name...
true
true
f7129bd24be66aa648ef38512dc743d6346936b2
37,055
py
Python
python/ccxt/ripio.py
atoll6/ccxt
3c5fd65a32073bfbe1a7e0f5a02d7d3f93850780
[ "MIT" ]
1
2018-08-20T09:38:13.000Z
2018-08-20T09:38:13.000Z
python/ccxt/ripio.py
atoll6/ccxt
3c5fd65a32073bfbe1a7e0f5a02d7d3f93850780
[ "MIT" ]
null
null
null
python/ccxt/ripio.py
atoll6/ccxt
3c5fd65a32073bfbe1a7e0f5a02d7d3f93850780
[ "MIT" ]
1
2019-01-02T01:32:45.000Z
2019-01-02T01:32:45.000Z
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.base.exchange import Exchange from ccxt.base.errors import ExchangeError from ccxt.base.errors import AuthenticationError from cc...
40.990044
291
0.45311
from ccxt.base.exchange import Exchange from ccxt.base.errors import ExchangeError from ccxt.base.errors import AuthenticationError from ccxt.base.errors import ArgumentsRequired from ccxt.base.errors import BadRequest from ccxt.base.errors import BadSymbol from ccxt.base.errors import InsufficientFunds from ccxt.bas...
true
true
f7129c3148778c91bb4f0917e15ac8ed57197be1
2,613
py
Python
windows/reverse_https-tor2web_client.py
modalexii/shells
50dd7fd54fddbdc107a835ed5367643220b90caa
[ "Unlicense" ]
1
2021-06-30T16:31:43.000Z
2021-06-30T16:31:43.000Z
windows/reverse_https-tor2web_client.py
modalexii/shells
50dd7fd54fddbdc107a835ed5367643220b90caa
[ "Unlicense" ]
null
null
null
windows/reverse_https-tor2web_client.py
modalexii/shells
50dd7fd54fddbdc107a835ed5367643220b90caa
[ "Unlicense" ]
null
null
null
# python 3 # requires reverse_https-tor2web_listener.py running as a tor hidden service on connect back host # encoding is not quite right - multi-line returns (e.g., that of `dir`) format poorly from urllib.request import urlopen,Request from urllib.parse import urlencode from urllib.error import URLError from subpr...
35.310811
123
0.552239
from urllib.request import urlopen,Request from urllib.parse import urlencode from urllib.error import URLError from subprocess import Popen,PIPE from random import randint from time import sleep url = 'https://xmgem22g7efpwwqd.tor2web.org/' headers = { 'Accept' : 'text/html,application/xhtml+xml,application/xm...
true
true
f7129c58fb2a54666e07a59391f3506ac7c8bbca
6,181
py
Python
vit_pytorch/do_conv_pytorch.py
khawar512/OPVT
690e540e7f54e43751d28a046009993e3e325291
[ "MIT" ]
null
null
null
vit_pytorch/do_conv_pytorch.py
khawar512/OPVT
690e540e7f54e43751d28a046009993e3e325291
[ "MIT" ]
null
null
null
vit_pytorch/do_conv_pytorch.py
khawar512/OPVT
690e540e7f54e43751d28a046009993e3e325291
[ "MIT" ]
null
null
null
# coding=utf-8 import math import torch import numpy as np from torch.nn import init from itertools import repeat from torch.nn import functional as F import collections.abc as container_abcs from typing import Optional from torch.nn.parameter import Parameter from torch.nn.modules.module import Module class DOConv2...
42.335616
106
0.565442
import math import torch import numpy as np from torch.nn import init from itertools import repeat from torch.nn import functional as F import collections.abc as container_abcs from typing import Optional from torch.nn.parameter import Parameter from torch.nn.modules.module import Module class DOConv2d(Module): ...
true
true
f7129d556a3dc7e01ec6ef328b5d0d78466fb7a8
255
py
Python
fun/funblog/urls.py
larryw3i/osp
d9526a179876053a6b93e5a110d2de730376f511
[ "MIT" ]
1
2022-01-01T11:14:58.000Z
2022-01-01T11:14:58.000Z
fun/funblog/urls.py
larryw3i/osp
d9526a179876053a6b93e5a110d2de730376f511
[ "MIT" ]
null
null
null
fun/funblog/urls.py
larryw3i/osp
d9526a179876053a6b93e5a110d2de730376f511
[ "MIT" ]
null
null
null
from django.urls import path from . import views from .apps import app_name app_name = app_name urlpatterns = [ path('', views.FblogListView.as_view(), name='list'), path('create/', views.FblogCreateView.as_view(), name='create'), ]
17
57
0.67451
from django.urls import path from . import views from .apps import app_name app_name = app_name urlpatterns = [ path('', views.FblogListView.as_view(), name='list'), path('create/', views.FblogCreateView.as_view(), name='create'), ]
true
true
f7129da6f6696ec47e7cf7e35e0693e10cd92ff7
839
py
Python
mmseg/models/backbones/__init__.py
dkswxd/Swin-Transformer-Semantic-Segmentation
6af19736e5492a01d8952d4ee86a6d59b21c2ae1
[ "Apache-2.0" ]
null
null
null
mmseg/models/backbones/__init__.py
dkswxd/Swin-Transformer-Semantic-Segmentation
6af19736e5492a01d8952d4ee86a6d59b21c2ae1
[ "Apache-2.0" ]
null
null
null
mmseg/models/backbones/__init__.py
dkswxd/Swin-Transformer-Semantic-Segmentation
6af19736e5492a01d8952d4ee86a6d59b21c2ae1
[ "Apache-2.0" ]
null
null
null
from .cgnet import CGNet from .fast_scnn import FastSCNN from .hrnet import HRNet from .mobilenet_v2 import MobileNetV2 from .mobilenet_v3 import MobileNetV3 from .resnest import ResNeSt from .resnet import ResNet, ResNetV1c, ResNetV1d from .resnet import ResNet_sp, ResNetV1c_sp, ResNetV1d_sp from .resnext import ResNe...
39.952381
115
0.797378
from .cgnet import CGNet from .fast_scnn import FastSCNN from .hrnet import HRNet from .mobilenet_v2 import MobileNetV2 from .mobilenet_v3 import MobileNetV3 from .resnest import ResNeSt from .resnet import ResNet, ResNetV1c, ResNetV1d from .resnet import ResNet_sp, ResNetV1c_sp, ResNetV1d_sp from .resnext import ResNe...
true
true
f7129e241d8924c62a5659046681e45f8451cd15
672
py
Python
django_machinelearning/users/tests/test_urls.py
daaawx/django_machinelearning
1b943f0edcacb62e00a8a1f526345c5a30c8ff40
[ "MIT" ]
null
null
null
django_machinelearning/users/tests/test_urls.py
daaawx/django_machinelearning
1b943f0edcacb62e00a8a1f526345c5a30c8ff40
[ "MIT" ]
null
null
null
django_machinelearning/users/tests/test_urls.py
daaawx/django_machinelearning
1b943f0edcacb62e00a8a1f526345c5a30c8ff40
[ "MIT" ]
null
null
null
import pytest from django.urls import resolve, reverse from django_machinelearning.users.models import User pytestmark = pytest.mark.django_db def test_detail(user: User): assert ( reverse("users:detail", kwargs={"username": user.username}) == f"/users/{user.username}/" ) assert resolve(...
26.88
74
0.683036
import pytest from django.urls import resolve, reverse from django_machinelearning.users.models import User pytestmark = pytest.mark.django_db def test_detail(user: User): assert ( reverse("users:detail", kwargs={"username": user.username}) == f"/users/{user.username}/" ) assert resolve(...
true
true
f7129e82a3f744d3c7c04deff0406291ea8a41b9
797
py
Python
python/difference-of-squares/difference_of_squares.py
sqrt/exercism-assignments
cc169dfa6d7ef4e19e75a94083996295a23ec2ea
[ "WTFPL" ]
null
null
null
python/difference-of-squares/difference_of_squares.py
sqrt/exercism-assignments
cc169dfa6d7ef4e19e75a94083996295a23ec2ea
[ "WTFPL" ]
null
null
null
python/difference-of-squares/difference_of_squares.py
sqrt/exercism-assignments
cc169dfa6d7ef4e19e75a94083996295a23ec2ea
[ "WTFPL" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Submission file for the python difference_of_squares exercise. # # v2: Using "x*x" instead of the slower "x**2" and remove left over # "pass" statement in difference() # v1: Using sum(), abs(), range() and "**2" def difference(length): """ Return the (abso...
24.90625
71
0.6399
def difference(length): return abs(square_of_sum(length) - sum_of_squares(length)) def square_of_sum(length): s = sum(range(1, length+1)) return s*s def sum_of_squares(length): return sum([x*x for x in range(1, length+1)])
true
true
f7129ef32d8280772b7c57af57d89657556c863d
1,940
py
Python
config/settings/test.py
zwernberg/merlin
f5877768a7e5fa9337a610111cf84f9a2cd61d0f
[ "MIT" ]
null
null
null
config/settings/test.py
zwernberg/merlin
f5877768a7e5fa9337a610111cf84f9a2cd61d0f
[ "MIT" ]
null
null
null
config/settings/test.py
zwernberg/merlin
f5877768a7e5fa9337a610111cf84f9a2cd61d0f
[ "MIT" ]
null
null
null
""" Test settings for merlin project. - Used to run tests fast on the continuous integration server and locally """ from .base import * # noqa # DEBUG # ------------------------------------------------------------------------------ # Turn debug off so tests run faster DEBUG = False TEMPLATES[0]['OPTIONS']['debug']...
31.290323
80
0.510825
from .base import * DEBUG = False TEMPLATES[0]['OPTIONS']['debug'] = False SECRET_KEY = env('DJANGO_SECRET_KEY', default='CHANGEME!!!') EMAIL_HOST = 'localhost' EMAIL_PORT = 1025 EMAIL_BACKEND = 'django.core.mail.backends.locmem.EmailBackend' CACHES = { 'default': { 'BACKEND': 'django.core.cache.bac...
true
true
f7129ef49a6d0480f2e4d228b5d4a7fc7998a4ae
4,824
py
Python
docs/conf.py
jorgetagle/dagger
dafcfb9df904e512f050aefdacf6581c571bac23
[ "MIT" ]
5
2020-09-09T11:44:49.000Z
2021-12-31T14:07:00.000Z
docs/conf.py
jorgetagle/dagger
dafcfb9df904e512f050aefdacf6581c571bac23
[ "MIT" ]
null
null
null
docs/conf.py
jorgetagle/dagger
dafcfb9df904e512f050aefdacf6581c571bac23
[ "MIT" ]
3
2021-08-31T10:14:42.000Z
2022-02-28T17:03:39.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # # dagger documentation build configuration file, created by # sphinx-quickstart on Fri Jun 9 13:47:02 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # auto...
30.726115
83
0.682007
import os import sys import dagger sys.path.insert(0, os.path.abspath("..")) extensions = ["sphinx.ext.autodoc", "sphinx.ext.viewcode", "numpydoc"] templates_path = ["_templates"] source_suffix = ".rst" master_doc = "index" project = u"dagger" copyright = u"2019, David Siklosi" author = u"David Siklosi" # f...
true
true
f7129f32b05767fa6339062043c1722ab0281b70
2,101
py
Python
utilities/converter.py
merretbuurman/rapydo-utils
54cdbf2f39f262f50057656e04d47f19c5b56b11
[ "MIT" ]
3
2017-06-01T17:18:29.000Z
2019-04-16T21:46:04.000Z
utilities/converter.py
merretbuurman/rapydo-utils
54cdbf2f39f262f50057656e04d47f19c5b56b11
[ "MIT" ]
20
2017-07-13T07:59:13.000Z
2019-10-02T12:49:09.000Z
utilities/converter.py
merretbuurman/rapydo-utils
54cdbf2f39f262f50057656e04d47f19c5b56b11
[ "MIT" ]
3
2018-05-30T13:46:24.000Z
2019-08-22T13:51:03.000Z
# -*- coding: utf-8 -*- """ Convert README file from Markdown to text """ from markdown import markdown import html2text # from `aaronsw` :( MARKER = 'MARKER()()MARKER' def fix_quotes(mdcontent): count = 0 quote_state = False quote_char = '`' quote_string = '' new_string = '' quotes = [] ...
23.606742
59
0.509757
from markdown import markdown import html2text MARKER = 'MARKER()()MARKER' def fix_quotes(mdcontent): count = 0 quote_state = False quote_char = '`' quote_string = '' new_string = '' quotes = [] for char in mdcontent: is_quote = char == quote_char if quote_state and...
true
true
f712a0ddec8793c72926a668483f7ae4a7dfe8b5
547
py
Python
src/docmail/util.py
ancoris/docmail-api-wrapper
1dbc4d1136f3052eaf17795e84fdd668378280ec
[ "MIT" ]
null
null
null
src/docmail/util.py
ancoris/docmail-api-wrapper
1dbc4d1136f3052eaf17795e84fdd668378280ec
[ "MIT" ]
null
null
null
src/docmail/util.py
ancoris/docmail-api-wrapper
1dbc4d1136f3052eaf17795e84fdd668378280ec
[ "MIT" ]
1
2022-01-21T13:30:41.000Z
2022-01-21T13:30:41.000Z
def split_caps(key): """ splits a string using capital letters as separator eg split_caps('ExampleString') returns ['Example', 'String'] """ b = False lst = [] x = 0 for i, ch in enumerate(key): if i > 0 and ch.isupper(): temp = key[x:i] if b and not temp...
27.35
68
0.464351
def split_caps(key): b = False lst = [] x = 0 for i, ch in enumerate(key): if i > 0 and ch.isupper(): temp = key[x:i] if b and not temp.isupper(): lst.append(key[x:i-1]) x = i-1 b = True elif b: lst.append(ke...
true
true
f712a1a2b3a750dd240b98abee6a77a5cfdb9617
4,069
py
Python
unprocessing/process.py
gunpowder78/google-research
d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5
[ "Apache-2.0" ]
1
2022-03-13T21:48:52.000Z
2022-03-13T21:48:52.000Z
unprocessing/process.py
gunpowder78/google-research
d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5
[ "Apache-2.0" ]
null
null
null
unprocessing/process.py
gunpowder78/google-research
d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5
[ "Apache-2.0" ]
1
2022-03-30T07:20:29.000Z
2022-03-30T07:20:29.000Z
# coding=utf-8 # Copyright 2022 The Google Research 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 applicab...
36.330357
78
0.730155
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow.compat.v1 as tf def apply_gains(bayer_images, red_gains, blue_gains): bayer_images.shape.assert_is_compatible_with((None, None, None, 4)) green_gains = tf.ones_like(red_gains) gains ...
true
true
f712a20c212747075d47f65a3a5bb1ea52a1d787
662
py
Python
backend/endpoints/app/services/cognito_service.py
EficodeEntDemo/pluto
3eb04821ef8053ea9437319b45f37bb5725bc413
[ "Apache-2.0" ]
null
null
null
backend/endpoints/app/services/cognito_service.py
EficodeEntDemo/pluto
3eb04821ef8053ea9437319b45f37bb5725bc413
[ "Apache-2.0" ]
86
2021-09-13T10:29:04.000Z
2022-03-08T07:07:31.000Z
backend/endpoints/app/services/cognito_service.py
EficodeEntDemo/pluto
3eb04821ef8053ea9437319b45f37bb5725bc413
[ "Apache-2.0" ]
2
2021-09-13T10:16:25.000Z
2021-11-15T10:16:05.000Z
from uuid import UUID import dao.user_dao as dao from api import db from utils.common import PlutoException class InvalidUserException(PlutoException): pass def create_user(username: str, user_attributes): uuid = UUID(user_attributes.get('sub', None)) existing_user = dao.find_user(uuid) if existing...
24.518519
63
0.712991
from uuid import UUID import dao.user_dao as dao from api import db from utils.common import PlutoException class InvalidUserException(PlutoException): pass def create_user(username: str, user_attributes): uuid = UUID(user_attributes.get('sub', None)) existing_user = dao.find_user(uuid) if existing...
true
true
f712a2164d9a8a0792cd514e59b1d8f4dae5fa1d
406
py
Python
src/masonite/commands/TestCommand.py
Abeautifulsnow/masonite
f0ebb5ca05f5d88f21264e1cd0934435bd0a8791
[ "MIT" ]
1
2022-02-24T06:21:18.000Z
2022-02-24T06:21:18.000Z
src/masonite/commands/TestCommand.py
Abeautifulsnow/masonite
f0ebb5ca05f5d88f21264e1cd0934435bd0a8791
[ "MIT" ]
1
2020-10-26T12:33:05.000Z
2020-10-26T12:33:05.000Z
src/masonite/commands/TestCommand.py
Abeautifulsnow/masonite
f0ebb5ca05f5d88f21264e1cd0934435bd0a8791
[ "MIT" ]
null
null
null
"""Creates New Test Command.""" from ..commands import BaseScaffoldCommand class TestCommand(BaseScaffoldCommand): """ Creates a new test case. test {name : Name of the test you would like to create} """ scaffold_name = "Test" postfix = "" prefix = "Test" template = "/masonit...
21.368421
58
0.650246
from ..commands import BaseScaffoldCommand class TestCommand(BaseScaffoldCommand): scaffold_name = "Test" postfix = "" prefix = "Test" template = "/masonite/snippets/scaffold/test" base_directory = "tests/test_" file_to_lower = True
true
true
f712a26ece2b6fbfd8172e424679fcf4ca7bca3f
731
py
Python
data_extractor/db/WB_tables/WB_counselling.py
sushovande/covid19-india-data
18fd2b6d03fb5dedbcb9e6e7b654c6188bc31b4c
[ "MIT" ]
20
2021-08-15T19:00:57.000Z
2022-03-28T21:23:28.000Z
data_extractor/db/WB_tables/WB_counselling.py
sushovande/covid19-india-data
18fd2b6d03fb5dedbcb9e6e7b654c6188bc31b4c
[ "MIT" ]
78
2021-08-17T22:34:39.000Z
2022-01-06T02:49:30.000Z
data_extractor/db/WB_tables/WB_counselling.py
sushovande/covid19-india-data
18fd2b6d03fb5dedbcb9e6e7b654c6188bc31b4c
[ "MIT" ]
8
2021-08-30T19:35:27.000Z
2022-02-08T14:07:10.000Z
import sqlite3 from .db import DB class CounsellingInfoTable(DB): def __init__(self): self.table_name = 'WB_counselling' self.table_desc = 'West Bengal ambulance and tele-counselling information' self.cols = self.getcolumns() def getcolumns(self): cols = { 'date':...
29.24
82
0.586867
import sqlite3 from .db import DB class CounsellingInfoTable(DB): def __init__(self): self.table_name = 'WB_counselling' self.table_desc = 'West Bengal ambulance and tele-counselling information' self.cols = self.getcolumns() def getcolumns(self): cols = { 'date':...
true
true
f712a2921324b2556577a623faa9c1f55038842c
1,388
py
Python
preprocessing_tools.py
manuelmusngi/machine_learning_algorithms_for_development
f344634f84d8f3a60fbb93892bdaed877855b710
[ "MIT" ]
1
2021-05-17T15:28:03.000Z
2021-05-17T15:28:03.000Z
preprocessing_tools.py
manuelmusngi/machine_learning_development_algorithms
f344634f84d8f3a60fbb93892bdaed877855b710
[ "MIT" ]
null
null
null
preprocessing_tools.py
manuelmusngi/machine_learning_development_algorithms
f344634f84d8f3a60fbb93892bdaed877855b710
[ "MIT" ]
null
null
null
# Data Preprocessing Tools for Data Cleaning # Import libraries import numpy as np import matplotlib.pyplot as plt import pandas as pd # Importing the dataset dataset = pd.read_ ('') X = dataset.iloc[:, :-1].values y = dataset.iloc[:, -1].values print(X) print(y) # Taking care of missing data from sklearn.impute imp...
26.692308
97
0.757925
import numpy as np import matplotlib.pyplot as plt import pandas as pd dataset = pd.read_ ('') X = dataset.iloc[:, :-1].values y = dataset.iloc[:, -1].values print(X) print(y) from sklearn.impute import SimpleImputer imputer = SimpleImputer(missing_values=np.nan, strategy='mean') imputer.fit(X[:, 1:3]) X[:, 1:3] = i...
true
true
f712a40530761a0fb16d3bd471df51313d4d2483
226
py
Python
src/resource_retriever/setup.py
iamrajee/roskinetic_catkin_ws
e0da6a37cdb00de446f3018230908bd64f2af1bd
[ "MIT" ]
17
2020-03-13T00:10:28.000Z
2021-09-06T17:13:17.000Z
src/resource_retriever/setup.py
iamrajee/ros_catkin_ws
9ba11e14ceb7b20f886d8c90892b7f09b07e88d1
[ "MIT" ]
1
2020-03-12T08:10:07.000Z
2020-03-12T08:10:07.000Z
src/resource_retriever/setup.py
iamrajee/ros_catkin_ws
9ba11e14ceb7b20f886d8c90892b7f09b07e88d1
[ "MIT" ]
2
2020-03-13T09:05:32.000Z
2021-08-13T08:28:14.000Z
from distutils.core import setup from catkin_pkg.python_setup import generate_distutils_setup d = generate_distutils_setup() d['packages'] = ['resource_retriever'] d['scripts'] = [] d['package_dir'] = {'': 'src'} setup(**d)
22.6
60
0.730088
from distutils.core import setup from catkin_pkg.python_setup import generate_distutils_setup d = generate_distutils_setup() d['packages'] = ['resource_retriever'] d['scripts'] = [] d['package_dir'] = {'': 'src'} setup(**d)
true
true
f712a6060bc4033aff0fcd82eca9bfa5eead9e40
8,488
py
Python
thirdparty/ruamel/yaml/error.py
goodboyl/-
d4d64c2f12b992499e3218db9b5269ec6dc88479
[ "MIT" ]
11
2018-12-05T09:40:03.000Z
2020-02-02T08:05:14.000Z
lambda/ruamel/yaml/error.py
KablamoOSS/cfn-analyse
388cd6b7619b95989b6d2b564c8cc78f4786fd2f
[ "MIT" ]
3
2020-03-22T10:29:38.000Z
2021-06-01T21:37:24.000Z
lambda/ruamel/yaml/error.py
KablamoOSS/cfn-analyse
388cd6b7619b95989b6d2b564c8cc78f4786fd2f
[ "MIT" ]
8
2019-09-15T04:13:22.000Z
2019-09-16T01:11:37.000Z
# coding: utf-8 from __future__ import absolute_import import warnings import textwrap from ruamel.yaml.compat import utf8 if False: # MYPY from typing import Any, Dict, Optional, List, Text # NOQA __all__ = [ 'FileMark', 'StringMark', 'CommentMark', 'YAMLError', 'MarkedYAMLError', 'ReusedAnchorWarn...
32.396947
87
0.59696
from __future__ import absolute_import import warnings import textwrap from ruamel.yaml.compat import utf8 if False: from typing import Any, Dict, Optional, List, Text __all__ = [ 'FileMark', 'StringMark', 'CommentMark', 'YAMLError', 'MarkedYAMLError', 'ReusedAnchorWarning', 'UnsafeLoaderWarning', '...
true
true
f712a68f891a19e8a7f594b31813242e5223354e
113
py
Python
docker/tezos-private-node-connectivity-checker/wsgi.py
pacificbaking/tezos-on-gke
7c9ae74c6e54f783c1e6ac0ed6124e6f2c6b9648
[ "Apache-2.0" ]
2
2019-11-18T18:32:11.000Z
2020-06-10T07:41:53.000Z
docker/tezos-private-node-connectivity-checker/wsgi.py
goodpen/gke-v.1.0
7dc3a8404d47016e3219f8483feb9b3595da4adc
[ "Apache-2.0" ]
null
null
null
docker/tezos-private-node-connectivity-checker/wsgi.py
goodpen/gke-v.1.0
7dc3a8404d47016e3219f8483feb9b3595da4adc
[ "Apache-2.0" ]
null
null
null
from tezos_private_node_connectivity_checker import application if __name__ == "__main__": application.run()
22.6
63
0.814159
from tezos_private_node_connectivity_checker import application if __name__ == "__main__": application.run()
true
true
f712a7061f48489b31e6a95cd478aac83035d78d
1,745
py
Python
fluffy/component/markdown.py
fawaf/fluffy
53b3f989c95289ae3a30c15a0edcc7e52ab8d4c6
[ "MIT" ]
135
2015-02-04T14:37:37.000Z
2022-02-07T07:16:11.000Z
fluffy/component/markdown.py
fawaf/fluffy
53b3f989c95289ae3a30c15a0edcc7e52ab8d4c6
[ "MIT" ]
82
2015-03-25T13:51:17.000Z
2022-02-10T07:17:31.000Z
fluffy/component/markdown.py
fawaf/fluffy
53b3f989c95289ae3a30c15a0edcc7e52ab8d4c6
[ "MIT" ]
21
2015-02-04T14:37:44.000Z
2021-09-13T00:39:34.000Z
import re import mistune from fluffy.app import app from fluffy.component.highlighting import guess_lexer from fluffy.component.highlighting import PygmentsHighlighter class HtmlCommentsInlineLexerMixin: """Strip HTML comments inside lines.""" def enable_html_comments(self): self.rules.html_comment...
20.529412
66
0.684814
import re import mistune from fluffy.app import app from fluffy.component.highlighting import guess_lexer from fluffy.component.highlighting import PygmentsHighlighter class HtmlCommentsInlineLexerMixin: def enable_html_comments(self): self.rules.html_comment = re.compile( '^<!--(.*?)-->', ...
true
true
f712a70f1e3b69cec5603557eb9929d58dfb9c73
929
py
Python
pythonProject/05al136CSV_Comma_Separated_Values/aula_csv.py
D-Wolter/PycharmProjects
c8d6144efa30261bff72a3e0414a0d80f6730f9b
[ "MIT" ]
null
null
null
pythonProject/05al136CSV_Comma_Separated_Values/aula_csv.py
D-Wolter/PycharmProjects
c8d6144efa30261bff72a3e0414a0d80f6730f9b
[ "MIT" ]
null
null
null
pythonProject/05al136CSV_Comma_Separated_Values/aula_csv.py
D-Wolter/PycharmProjects
c8d6144efa30261bff72a3e0414a0d80f6730f9b
[ "MIT" ]
null
null
null
""" Comma Separated Values - CSV (Valores separados por vírgula) É um formato de dados muito usado em tabelas (Excel, Google Sheets), bases de dados, clientes de e-mail, etc... """ import csv with open('clientes.csv', 'r') as arquivo: dados = [x for x in csv.DictReader(arquivo)] with open('cliente2.csv', 'w') as ...
24.447368
77
0.52422
import csv with open('clientes.csv', 'r') as arquivo: dados = [x for x in csv.DictReader(arquivo)] with open('cliente2.csv', 'w') as arquivo: escreve = csv.writer( arquivo, delimiter=',', quotechar='"',#deli,itar o fim com aspas quoting=csv.QUOTE_ALL#aspas em todos dados ) ...
true
true
f712a8705ad2ed75e3a830467d81bc75ea91dc2b
28,860
py
Python
sdk/python/pulumi_azure/dashboard/dashboard.py
henriktao/pulumi-azure
f1cbcf100b42b916da36d8fe28be3a159abaf022
[ "ECL-2.0", "Apache-2.0" ]
109
2018-06-18T00:19:44.000Z
2022-02-20T05:32:57.000Z
sdk/python/pulumi_azure/dashboard/dashboard.py
henriktao/pulumi-azure
f1cbcf100b42b916da36d8fe28be3a159abaf022
[ "ECL-2.0", "Apache-2.0" ]
663
2018-06-18T21:08:46.000Z
2022-03-31T20:10:11.000Z
sdk/python/pulumi_azure/dashboard/dashboard.py
henriktao/pulumi-azure
f1cbcf100b42b916da36d8fe28be3a159abaf022
[ "ECL-2.0", "Apache-2.0" ]
41
2018-07-19T22:37:38.000Z
2022-03-14T10:56:26.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
45.520505
389
0.500624
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = ['DashboardArgs', 'Dashboard'] @pulumi.input_type class DashboardArgs: def __init__(__self__, *, resource_group_name: pulumi.Input[str], ...
true
true
f712a9305559a6bf1de57ed56349a7451e8158e5
281
py
Python
mytui/__init__.py
kopchik/mytui
64bf800ab046b90b2f08eb1639b6a45cb301d22c
[ "Beerware" ]
null
null
null
mytui/__init__.py
kopchik/mytui
64bf800ab046b90b2f08eb1639b6a45cb301d22c
[ "Beerware" ]
null
null
null
mytui/__init__.py
kopchik/mytui
64bf800ab046b90b2f08eb1639b6a45cb301d22c
[ "Beerware" ]
null
null
null
#!/usr/bin/env python3 from .input import myinput from .utils import loop, mywrapper from .widgets import Border, CMDInput, Text, VList __all__ = [ 'loop', 'myinput', 'mywrapper', # widgets 'Border', 'CMDInput', 'Text', 'VList', ] name = 'mytui'
14.789474
50
0.6121
from .input import myinput from .utils import loop, mywrapper from .widgets import Border, CMDInput, Text, VList __all__ = [ 'loop', 'myinput', 'mywrapper', 'Border', 'CMDInput', 'Text', 'VList', ] name = 'mytui'
true
true
f712a9cfafd0fb910582dc26560ccd7967c2d2e7
4,291
py
Python
lang/Python/letter-frequency-2.py
ethansaxenian/RosettaDecode
8ea1a42a5f792280b50193ad47545d14ee371fb7
[ "MIT" ]
null
null
null
lang/Python/letter-frequency-2.py
ethansaxenian/RosettaDecode
8ea1a42a5f792280b50193ad47545d14ee371fb7
[ "MIT" ]
null
null
null
lang/Python/letter-frequency-2.py
ethansaxenian/RosettaDecode
8ea1a42a5f792280b50193ad47545d14ee371fb7
[ "MIT" ]
null
null
null
'''Character counting as a fold''' from functools import reduce from itertools import repeat from os.path import expanduser # charCounts :: String -> Dict Char Int def charCounts(s): '''A dictionary of (character, frequency) mappings ''' def tally(dct, c): dct[c] = 1 + dct[c] if c in dct e...
25.694611
72
0.487998
from functools import reduce from itertools import repeat from os.path import expanduser def charCounts(s): def tally(dct, c): dct[c] = 1 + dct[c] if c in dct else 1 return dct return reduce(tally, list(s), {}) def main(): print(( tabulated( 'Descending order of fre...
true
true
f712aa6873b96aa65d91b54a397a275d8990c037
16,798
py
Python
grr/server/checks/filters_test.py
panhania/grr
fe16a7311a528e31fe0e315a880e98273b8df960
[ "Apache-2.0" ]
null
null
null
grr/server/checks/filters_test.py
panhania/grr
fe16a7311a528e31fe0e315a880e98273b8df960
[ "Apache-2.0" ]
1
2018-05-08T21:15:51.000Z
2018-05-08T21:15:51.000Z
grr/server/checks/filters_test.py
panhania/grr
fe16a7311a528e31fe0e315a880e98273b8df960
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """Tests for grr.server.checks.filters.""" import collections from grr.lib import flags from grr.lib.rdfvalues import anomaly from grr.lib.rdfvalues import client as rdf_client from grr.lib.rdfvalues import paths as rdf_paths from grr.lib.rdfvalues import protodict as rdf_protodict from grr.server...
36.757112
80
0.670139
"""Tests for grr.server.checks.filters.""" import collections from grr.lib import flags from grr.lib.rdfvalues import anomaly from grr.lib.rdfvalues import client as rdf_client from grr.lib.rdfvalues import paths as rdf_paths from grr.lib.rdfvalues import protodict as rdf_protodict from grr.server.checks import checks ...
false
true
f712aab16111060d6067d6186f3180630e3ed370
1,115
py
Python
src/python/verst/pants/docker/target.py
ActionIQ-OSS/pants-plugins
a6fc4323ff637d9639c255fd211678e98a238686
[ "MIT" ]
null
null
null
src/python/verst/pants/docker/target.py
ActionIQ-OSS/pants-plugins
a6fc4323ff637d9639c255fd211678e98a238686
[ "MIT" ]
1
2020-01-07T18:32:54.000Z
2020-01-09T02:23:49.000Z
src/python/verst/pants/docker/target.py
ActionIQ-OSS/pants-plugins
a6fc4323ff637d9639c255fd211678e98a238686
[ "MIT" ]
null
null
null
from __future__ import absolute_import from pants.base.build_environment import get_scm from pants.base.payload import Payload from pants.base.payload_field import PrimitiveField from pants.build_graph.target import Target class DockerTargetBase(Target): def __init__(self, address=None, payload=None, image_name=Non...
30.972222
92
0.759641
from __future__ import absolute_import from pants.base.build_environment import get_scm from pants.base.payload import Payload from pants.base.payload_field import PrimitiveField from pants.build_graph.target import Target class DockerTargetBase(Target): def __init__(self, address=None, payload=None, image_name=Non...
true
true
f712ab8d5f736fc36d1cf461b9c526d15abb102e
13,744
py
Python
score_mask.py
qianrusun1015/Disentangled-Person-Image-Generation
e4703860bb1b351050ce50f339985ff0811f1d64
[ "MIT" ]
165
2018-03-28T10:50:36.000Z
2022-01-09T10:56:58.000Z
score_mask.py
qianrusun1015/Disentangled-Person-Image-Generation
e4703860bb1b351050ce50f339985ff0811f1d64
[ "MIT" ]
13
2018-04-11T08:04:44.000Z
2020-11-20T12:50:33.000Z
score_mask.py
saswat0/Disentangled-Person-Image-Generation
e4703860bb1b351050ce50f339985ff0811f1d64
[ "MIT" ]
38
2018-05-16T08:50:11.000Z
2021-05-14T02:56:52.000Z
from __future__ import print_function import os, pdb, sys, glob # we need to set GPUno first, otherwise may out of memory stage = int(sys.argv[1]) gpuNO = sys.argv[2] model_dir = sys.argv[3] test_dir = sys.argv[4] os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID" os.environ["CUDA_VISIBLE_DEVICES"]=str(gpuNO) import StringI...
47.230241
133
0.653594
from __future__ import print_function import os, pdb, sys, glob stage = int(sys.argv[1]) gpuNO = sys.argv[2] model_dir = sys.argv[3] test_dir = sys.argv[4] os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID" os.environ["CUDA_VISIBLE_DEVICES"]=str(gpuNO) import StringIO import scipy.misc import numpy as np from skimage.measur...
true
true
f712aba2e0d62e2c851b93bcacf674e7a477f7b8
2,035
py
Python
framework/CacheServiceV1/tools/convertDB.py
samini/cache
2bcd0a5f4e9bd24b916b0ce13fb3fdf5715c409e
[ "Apache-2.0" ]
2
2018-11-02T06:33:03.000Z
2021-06-09T13:50:39.000Z
framework/CacheServiceV1/tools/convertDB.py
samini/cache
2bcd0a5f4e9bd24b916b0ce13fb3fdf5715c409e
[ "Apache-2.0" ]
null
null
null
framework/CacheServiceV1/tools/convertDB.py
samini/cache
2bcd0a5f4e9bd24b916b0ce13fb3fdf5715c409e
[ "Apache-2.0" ]
null
null
null
"""" Copyright 2010 Shahriyar Amini 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 ...
24.518072
79
0.699754
"""" Copyright 2010 Shahriyar Amini 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 ...
false
true
f712ad63baf4bf1e75256a1b67bb4ecb28364e03
23,115
py
Python
src/test/python/test_time_code_smpte.py
xchange11/ttconv-1
6e67172af126fa0e90690044848f300c0173715c
[ "BSD-2-Clause" ]
66
2020-09-25T11:38:28.000Z
2022-03-23T15:15:34.000Z
src/test/python/test_time_code_smpte.py
xchange11/ttconv-1
6e67172af126fa0e90690044848f300c0173715c
[ "BSD-2-Clause" ]
217
2020-09-22T22:45:22.000Z
2022-03-31T23:02:15.000Z
src/test/python/test_time_code_smpte.py
xchange11/ttconv-1
6e67172af126fa0e90690044848f300c0173715c
[ "BSD-2-Clause" ]
5
2020-09-25T09:24:17.000Z
2021-08-08T20:52:26.000Z
#!/usr/bin/env python # -*- coding: UTF-8 -*- # Copyright (c) 2020, Sandflow Consulting LLC # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, ...
52.414966
93
0.740169
from fractions import Fraction import unittest from ttconv.time_code import SmpteTimeCode, FPS_29_97, FPS_30 class SmpteTimeCodesTest(unittest.TestCase): def test_parse_non_drop_frame_time_code(self): time_code = SmpteTimeCode.parse("01:02:03:04", FPS_30) self.assertEqual(1, time_code.get_hours()) ...
true
true
f712ae172319c6ce02b8ace28d378d0b85c8c629
947
py
Python
pychron/hardware/lakeshore/model331.py
ael-noblegas/pychron
6ebbbb1f66a614972b62b7a9be4c784ae61b5d62
[ "Apache-2.0" ]
null
null
null
pychron/hardware/lakeshore/model331.py
ael-noblegas/pychron
6ebbbb1f66a614972b62b7a9be4c784ae61b5d62
[ "Apache-2.0" ]
80
2018-07-17T20:10:20.000Z
2021-08-17T15:38:24.000Z
pychron/hardware/lakeshore/model331.py
UManPychron/pychron
b84c9fd70072f9cbda30abe2c471e64fe3dd75d8
[ "Apache-2.0" ]
null
null
null
# =============================================================================== # Copyright 2019 ross # # 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/LICE...
41.173913
81
0.600845
from pychron.hardware.lakeshore.base_controller import BaseLakeShoreController class Model331TemperatureController(BaseLakeShoreController): pass
true
true
f712ae9ab37215bdcf4ad16343dbce17b423b50d
5,365
py
Python
stomp/test/testutils.py
rnixx/stomp.py
3ccf9a02d8a9824964c3bcc23135a3dee1616bab
[ "Apache-2.0" ]
null
null
null
stomp/test/testutils.py
rnixx/stomp.py
3ccf9a02d8a9824964c3bcc23135a3dee1616bab
[ "Apache-2.0" ]
null
null
null
stomp/test/testutils.py
rnixx/stomp.py
3ccf9a02d8a9824964c3bcc23135a3dee1616bab
[ "Apache-2.0" ]
null
null
null
try: from configparser import RawConfigParser except ImportError: from ConfigParser import RawConfigParser import logging import os import re import socket import threading from stomp.backward import * log = logging.getLogger('testutils.py') config = RawConfigParser() config.read(os.path.join(os.path.dirnam...
26.428571
100
0.592171
try: from configparser import RawConfigParser except ImportError: from ConfigParser import RawConfigParser import logging import os import re import socket import threading from stomp.backward import * log = logging.getLogger('testutils.py') config = RawConfigParser() config.read(os.path.join(os.path.dirnam...
true
true
f712aef0eed3952d679831b8fcb6c3fbe8de8efd
7,575
py
Python
tests/unit/document/test_converters.py
fogx/docarray
2cb60f893ebcfd29708132e44202ccb20e639c6b
[ "Apache-2.0" ]
null
null
null
tests/unit/document/test_converters.py
fogx/docarray
2cb60f893ebcfd29708132e44202ccb20e639c6b
[ "Apache-2.0" ]
null
null
null
tests/unit/document/test_converters.py
fogx/docarray
2cb60f893ebcfd29708132e44202ccb20e639c6b
[ "Apache-2.0" ]
null
null
null
import os import numpy as np import pytest from docarray import Document from docarray.document.generators import from_files from docarray.helper import __windows__ cur_dir = os.path.dirname(os.path.abspath(__file__)) def test_video_convert_pipe(pytestconfig, tmpdir): num_d = 0 fname = str(tmpdir / f'tmp{n...
31.431535
86
0.669307
import os import numpy as np import pytest from docarray import Document from docarray.document.generators import from_files from docarray.helper import __windows__ cur_dir = os.path.dirname(os.path.abspath(__file__)) def test_video_convert_pipe(pytestconfig, tmpdir): num_d = 0 fname = str(tmpdir / f'tmp{n...
true
true
f712af45743ae50ca3e6db2d49ea7106ac6712f0
10,497
py
Python
simple_rl/tasks/grid_world/GridWorldMDPClass.py
roma-patel/simple_rl
721a748dae3296293b66f86cf2eda8c91885c298
[ "Apache-2.0" ]
2
2020-02-13T22:37:31.000Z
2021-02-03T02:35:42.000Z
simple_rl/tasks/grid_world/GridWorldMDPClass.py
roma-patel/simple_rl
721a748dae3296293b66f86cf2eda8c91885c298
[ "Apache-2.0" ]
null
null
null
simple_rl/tasks/grid_world/GridWorldMDPClass.py
roma-patel/simple_rl
721a748dae3296293b66f86cf2eda8c91885c298
[ "Apache-2.0" ]
null
null
null
''' GridWorldMDPClass.py: Contains the GridWorldMDP class. ''' # Python imports. from __future__ import print_function import random import sys import os import numpy as np # Other imports. from simple_rl.mdp.MDPClass import MDP from simple_rl.tasks.grid_world.GridWorldStateClass import GridWorldState # Fix input to...
32.700935
172
0.579308
from __future__ import print_function import random import sys import os import numpy as np from simple_rl.mdp.MDPClass import MDP from simple_rl.tasks.grid_world.GridWorldStateClass import GridWorldState try: input = raw_input except NameError: pass class GridWorldMDP(MDP): ACTIONS = ["up", "down", ...
true
true
f712afd696645a5fea2227a02d122ef499a6d8d0
1,906
py
Python
xstatic/pkg/bootswatch/__init__.py
openstack/xstatic-bootswatch
15e974be96fcb16d64fbf6ab58aab20e27d218a0
[ "MIT" ]
15
2015-10-18T02:57:32.000Z
2019-01-28T22:13:46.000Z
xstatic/pkg/bootswatch/__init__.py
openstack/xstatic-bootswatch
15e974be96fcb16d64fbf6ab58aab20e27d218a0
[ "MIT" ]
null
null
null
xstatic/pkg/bootswatch/__init__.py
openstack/xstatic-bootswatch
15e974be96fcb16d64fbf6ab58aab20e27d218a0
[ "MIT" ]
null
null
null
""" XStatic resource package See package 'XStatic' for documentation and basic tools. """ # official name, upper/lowercase allowed, no spaces DISPLAY_NAME = 'bootswatch' # name used for PyPi PACKAGE_NAME = 'XStatic-%s' % DISPLAY_NAME NAME = __name__.split('.')[-1] # package name (e.g. 'foo' or 'foo_bar') ...
32.862069
77
0.695173
DISPLAY_NAME = 'bootswatch' PACKAGE_NAME = 'XStatic-%s' % DISPLAY_NAME NAME = __name__.split('.')[-1] VERSION = '3.3.7' BUILD = '0' PACKAGE_VERSION = VERSION + '.' + BUILD DESCRIPTION = "%s %s (XStatic packaging standard)...
true
true
f712b0a6b53e52a6c69a8f45a420fa4cd8ac7db6
77
py
Python
benten/version.py
stain/benten
40440d36025e0b27b8dfa6752aa76b15e7abc0d1
[ "Apache-2.0" ]
null
null
null
benten/version.py
stain/benten
40440d36025e0b27b8dfa6752aa76b15e7abc0d1
[ "Apache-2.0" ]
null
null
null
benten/version.py
stain/benten
40440d36025e0b27b8dfa6752aa76b15e7abc0d1
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2019 Seven Bridges. See LICENSE __version__ = "2019.11.27"
19.25
48
0.714286
__version__ = "2019.11.27"
true
true
f712b0d2d8c82934202d48ea04303286c916859b
2,393
py
Python
msgraph/cli/command_modules/identitydirmgt/azext_identitydirmgt/__init__.py
microsoftgraph/msgraph-cli-archived
489f70bf4ede1ce67b84bfb31e66da3e4db76062
[ "MIT" ]
null
null
null
msgraph/cli/command_modules/identitydirmgt/azext_identitydirmgt/__init__.py
microsoftgraph/msgraph-cli-archived
489f70bf4ede1ce67b84bfb31e66da3e4db76062
[ "MIT" ]
22
2022-03-29T22:54:37.000Z
2022-03-29T22:55:27.000Z
msgraph/cli/command_modules/identitydirmgt/azext_identitydirmgt/__init__.py
microsoftgraph/msgraph-cli-archived
489f70bf4ede1ce67b84bfb31e66da3e4db76062
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incor...
39.883333
108
0.668617
from azure.cli.core import AzCommandsLoader from azext_identitydirmgt.generated._help import helps try: from azext_identitydirmgt.manual._help import helps except ImportError as e: if e.name.endswith('manual._help'): pass else: raise e class IdentityDirectoryManagementCommandsLoader(AzC...
true
true
f712b27408fcf1dd3d269663f2f93434f99f831f
10,400
py
Python
rDEP.py
mevalle/r-DEP-Classifier
c18625fe6b69ec9cc4edead7bb7f647ebf71956a
[ "MIT" ]
null
null
null
rDEP.py
mevalle/r-DEP-Classifier
c18625fe6b69ec9cc4edead7bb7f647ebf71956a
[ "MIT" ]
null
null
null
rDEP.py
mevalle/r-DEP-Classifier
c18625fe6b69ec9cc4edead7bb7f647ebf71956a
[ "MIT" ]
1
2022-01-03T18:20:26.000Z
2022-01-03T18:20:26.000Z
import numpy as np import cvxpy as cp import dccp import matplotlib.pyplot as plt from matplotlib.patches import Polygon from sklearn.base import BaseEstimator, ClassifierMixin, TransformerMixin from sklearn.utils.multiclass import unique_labels from sklearn.metrics import pairwise_distances from sklearn.utils.validati...
40
122
0.527115
import numpy as np import cvxpy as cp import dccp import matplotlib.pyplot as plt from matplotlib.patches import Polygon from sklearn.base import BaseEstimator, ClassifierMixin, TransformerMixin from sklearn.utils.multiclass import unique_labels from sklearn.metrics import pairwise_distances from sklearn.utils.validati...
true
true
f712b4a17bf0ad367fbcb0e79e4c97706920b7ff
4,783
py
Python
nevada/API/Ad.py
taegyumin/python_nevada
6aea0e0d23a08f5db5edabef0bb3c312aec8a534
[ "MIT" ]
15
2020-01-23T13:34:47.000Z
2022-01-30T05:42:47.000Z
nevada/API/Ad.py
taegyumin/python_nevada
6aea0e0d23a08f5db5edabef0bb3c312aec8a534
[ "MIT" ]
null
null
null
nevada/API/Ad.py
taegyumin/python_nevada
6aea0e0d23a08f5db5edabef0bb3c312aec8a534
[ "MIT" ]
3
2020-01-25T08:39:55.000Z
2021-01-20T13:23:39.000Z
from nevada.Common.Connector import * from typing import List import jsonpickle import json class AdFieldObject: def __init__(self, json_def=None): if type(json_def) is str: json_def = json.loads(json_def) s = json_def self.pc_display = None if 'pc' not in s else self.pc_display...
42.327434
155
0.653356
from nevada.Common.Connector import * from typing import List import jsonpickle import json class AdFieldObject: def __init__(self, json_def=None): if type(json_def) is str: json_def = json.loads(json_def) s = json_def self.pc_display = None if 'pc' not in s else self.pc_display...
true
true
f712b4d66a182d812b55a99879d4e662bcf958f9
3,959
py
Python
detectron/ops/distribute_cascade_proposals.py
zzdxfei/detectron_cascade_code
59706f1687ee067d1df5da60e7a4a442fb2d59f8
[ "Apache-2.0" ]
1
2019-09-30T08:11:14.000Z
2019-09-30T08:11:14.000Z
detectron/ops/distribute_cascade_proposals.py
zzdxfei/detectron_cascade_code
59706f1687ee067d1df5da60e7a4a442fb2d59f8
[ "Apache-2.0" ]
null
null
null
detectron/ops/distribute_cascade_proposals.py
zzdxfei/detectron_cascade_code
59706f1687ee067d1df5da60e7a4a442fb2d59f8
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2017-present, Facebook, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
41.239583
82
0.672645
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import numpy as np from detectron.core.config import cfg from detectron.datasets import json_dataset import detectron.modeling.FPN as fpn import detectron.roi_data.casc...
true
true
f712b544527298d324e7a124d9b82af5b2c8aa10
721
py
Python
dqn.py
iamchosenlee/MolDQN-pytorch
66bd1e067e439e49abc77d21089d3baf065317d4
[ "MIT" ]
56
2019-11-02T07:49:12.000Z
2022-03-28T07:26:00.000Z
dqn.py
andrewdchen/MolDQN-pytorch
bda8a74eb9e5d2f3232a6a27b6a32928a3797f6d
[ "MIT" ]
14
2019-11-07T22:16:51.000Z
2022-02-10T01:04:12.000Z
dqn.py
andrewdchen/MolDQN-pytorch
bda8a74eb9e5d2f3232a6a27b6a32928a3797f6d
[ "MIT" ]
24
2020-02-20T07:39:47.000Z
2022-03-03T03:17:08.000Z
import torch import torch.nn as nn import torch.nn.functional as F class MolDQN(nn.Module): def __init__(self, input_length, output_length): super(MolDQN, self).__init__() self.linear_1 = nn.Linear(input_length, 1024) self.linear_2 = nn.Linear(1024, 512) self.linear_3 = nn.Linear(...
27.730769
53
0.628294
import torch import torch.nn as nn import torch.nn.functional as F class MolDQN(nn.Module): def __init__(self, input_length, output_length): super(MolDQN, self).__init__() self.linear_1 = nn.Linear(input_length, 1024) self.linear_2 = nn.Linear(1024, 512) self.linear_3 = nn.Linear(...
true
true
f712b62e96caa9a7fc451990156a151cbbf478e9
2,736
py
Python
zvt/recorders/joinquant/meta/china_stock_status_recorder.py
markqiu/zvt
1bcfb71279f2652c3600f0f8e45d941f98ceaa10
[ "MIT" ]
6
2020-09-03T10:02:00.000Z
2021-02-04T02:51:47.000Z
zvt/recorders/joinquant/meta/china_stock_status_recorder.py
markqiu/zvt
1bcfb71279f2652c3600f0f8e45d941f98ceaa10
[ "MIT" ]
null
null
null
zvt/recorders/joinquant/meta/china_stock_status_recorder.py
markqiu/zvt
1bcfb71279f2652c3600f0f8e45d941f98ceaa10
[ "MIT" ]
2
2020-07-08T04:15:40.000Z
2021-06-08T08:51:31.000Z
# -*- coding: utf-8 -*- import pandas as pd from jqdatasdk import auth, logout, finance, query from zvt.recorders.joinquant.common import to_jq_entity_id from zvt import zvt_env from zvt.api import TIME_FORMAT_DAY, get_str_schema from zvt.contract.api import df_to_db from zvt.contract.recorder import TimeSeriesDataRec...
40.235294
113
0.665936
import pandas as pd from jqdatasdk import auth, logout, finance, query from zvt.recorders.joinquant.common import to_jq_entity_id from zvt import zvt_env from zvt.api import TIME_FORMAT_DAY, get_str_schema from zvt.contract.api import df_to_db from zvt.contract.recorder import TimeSeriesDataRecorder from zvt.domain im...
true
true
f712b69b04f651598d36317588b2480a9dd44614
12,938
py
Python
common/xmesh.py
genics/retopoflow
65826bf9a0f194b5fbd5852db8472c13a0e7cf37
[ "OML" ]
1,600
2015-03-19T12:26:15.000Z
2022-03-30T21:07:37.000Z
common/xmesh.py
zhenxinfrozen/retopoflow
eca27540ee28543de357220ef2c00afef32e0686
[ "OML" ]
1,026
2015-03-18T22:17:42.000Z
2022-03-28T17:47:04.000Z
common/xmesh.py
zhenxinfrozen/retopoflow
eca27540ee28543de357220ef2c00afef32e0686
[ "OML" ]
241
2015-03-19T13:44:36.000Z
2022-03-30T21:07:39.000Z
import time import math import bpy import bmesh import bgl from typing import List, Callable from mathutils import Vector, Matrix, Color, kdtree from mathutils.bvhtree import BVHTree from mathutils.geometry import intersect_point_line, intersect_line_plane from bpy_extras import view3d_utils from .maths import Poin...
39.932099
110
0.552017
import time import math import bpy import bmesh import bgl from typing import List, Callable from mathutils import Vector, Matrix, Color, kdtree from mathutils.bvhtree import BVHTree from mathutils.geometry import intersect_point_line, intersect_line_plane from bpy_extras import view3d_utils from .maths import Poin...
true
true
f712b6befed0af5264d515d3417e21dd8a68ab53
511
py
Python
response/requestHandler.py
AloisJanicek/org-roam-server-light
70056b7b2ef42f1befc00281f55e6ec7fb3181ab
[ "MIT" ]
25
2020-07-14T07:50:38.000Z
2021-08-05T22:17:37.000Z
response/requestHandler.py
AloisJanicek/org-roam-server-light
70056b7b2ef42f1befc00281f55e6ec7fb3181ab
[ "MIT" ]
4
2020-10-20T19:50:41.000Z
2021-08-04T23:33:36.000Z
response/requestHandler.py
AloisJanicek/org-roam-server-light
70056b7b2ef42f1befc00281f55e6ec7fb3181ab
[ "MIT" ]
2
2021-02-09T20:08:24.000Z
2021-07-25T00:17:48.000Z
class MockFile: def read(self): return False class RequestHandler: def __init__(self): self.contentType = "" self.contents = MockFile() def getContents(self): return self.contents.read() def read(self): return self.contents def setStatus(self, status): ...
18.25
35
0.608611
class MockFile: def read(self): return False class RequestHandler: def __init__(self): self.contentType = "" self.contents = MockFile() def getContents(self): return self.contents.read() def read(self): return self.contents def setStatus(self, status): ...
true
true
f712b81494cac60fe42a2c796de78c3d05fbca6a
8,722
py
Python
sdk/python/pulumi_azure_nextgen/devtestlab/v20180915/notification_channel.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
31
2020-09-21T09:41:01.000Z
2021-02-26T13:21:59.000Z
sdk/python/pulumi_azure_nextgen/devtestlab/v20180915/notification_channel.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
231
2020-09-21T09:38:45.000Z
2021-03-01T11:16:03.000Z
sdk/python/pulumi_azure_nextgen/devtestlab/v20180915/notification_channel.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
4
2020-09-29T14:14:59.000Z
2021-02-10T20:38:16.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
40.948357
274
0.640105
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs from ._enums import * from ._inputs import * __all__ = ['NotificationChannel'] class NotificationChannel(pulumi.CustomResource): def __init__(_...
true
true
f712b81b6658f62be66bc6305df217d81251efe3
502
py
Python
filter_patient_sample.py
ryanzsun/Kaggle-Pneumothorax
a73c4fa75f8df43a403a31fec8c27bd1b5c57ce1
[ "MIT" ]
null
null
null
filter_patient_sample.py
ryanzsun/Kaggle-Pneumothorax
a73c4fa75f8df43a403a31fec8c27bd1b5c57ce1
[ "MIT" ]
null
null
null
filter_patient_sample.py
ryanzsun/Kaggle-Pneumothorax
a73c4fa75f8df43a403a31fec8c27bd1b5c57ce1
[ "MIT" ]
null
null
null
import glob import numpy as numpy import cv2 import os import random label_list = glob.glob("./iafoss_data/256_filter/label/*.png") file_list = glob.glob("./iafoss_data/256_filter/train/*.png") assert len(label_list) == len(file_list), "error" for i in range(len(label_list)): label = cv2.imread(label_list[i], 0) ...
27.888889
62
0.679283
import glob import numpy as numpy import cv2 import os import random label_list = glob.glob("./iafoss_data/256_filter/label/*.png") file_list = glob.glob("./iafoss_data/256_filter/train/*.png") assert len(label_list) == len(file_list), "error" for i in range(len(label_list)): label = cv2.imread(label_list[i], 0) ...
true
true
f712b8548100ae058a52308d4b886c377b045ab5
6,000
py
Python
backend-service/bot_server/api/views.py
sravankumarmatta/Classroom-Bot
2081600c553c003ada4c0dadd2d4715e11c073d2
[ "MIT" ]
1
2020-10-06T06:23:04.000Z
2020-10-06T06:23:04.000Z
backend-service/bot_server/api/views.py
sravankumarmatta/Classroom-Bot
2081600c553c003ada4c0dadd2d4715e11c073d2
[ "MIT" ]
38
2020-10-01T00:13:35.000Z
2020-10-27T03:33:09.000Z
backend-service/bot_server/api/views.py
sravankumarmatta/Classroom-Bot
2081600c553c003ada4c0dadd2d4715e11c073d2
[ "MIT" ]
8
2020-10-20T07:00:11.000Z
2021-09-28T00:23:45.000Z
from rest_framework import generics from rest_framework.response import Response from .request_dispatcher import dispatch_course_create_request from .request_dispatcher import dispatch_course_get_request from .request_dispatcher import (dispatch_student_create_request, dispatch_student_get_request, ...
36.585366
110
0.674167
from rest_framework import generics from rest_framework.response import Response from .request_dispatcher import dispatch_course_create_request from .request_dispatcher import dispatch_course_get_request from .request_dispatcher import (dispatch_student_create_request, dispatch_student_get_request, ...
true
true
f712b9e7039d1d5884d6d5dbef58abe27105fb2e
34,555
py
Python
src/azure-cli/azure/cli/command_modules/backup/_params.py
savaradh/azure-cli
8a6ff869b052baae009e5f49e619859809c73c22
[ "MIT" ]
3,287
2016-07-26T17:34:33.000Z
2022-03-31T09:52:13.000Z
src/azure-cli/azure/cli/command_modules/backup/_params.py
savaradh/azure-cli
8a6ff869b052baae009e5f49e619859809c73c22
[ "MIT" ]
19,206
2016-07-26T07:04:42.000Z
2022-03-31T23:57:09.000Z
src/azure-cli/azure/cli/command_modules/backup/_params.py
savaradh/azure-cli
8a6ff869b052baae009e5f49e619859809c73c22
[ "MIT" ]
2,575
2016-07-26T06:44:40.000Z
2022-03-31T22:56:06.000Z
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
82.865707
349
0.740703
from argcomplete.completers import FilesCompleter from knack.arguments import CLIArgumentType import azure.cli.core.commands.arm from azure.cli.core.commands.parameters import \ (get_resource_name_completion_list, file_type, get_three_state_flag, get_enum_type, tags_type) from azure.cli.core.commands.vali...
true
true
f712b9eff8cdf9fe5e61b38a1b8a476cf5492b5d
18,195
py
Python
hyfed-compensator/hyfed_compensator/project/hyfed_compensator_project.py
TUM-AIMED/hyfed
48c7ee0dda92ebb70cc985dc4c0eedb7403dc823
[ "Apache-2.0" ]
11
2021-04-13T12:11:16.000Z
2022-03-21T11:45:07.000Z
hyfed-compensator/hyfed_compensator/project/hyfed_compensator_project.py
TUM-AIMED/splink
06e0ea66a8bf88ecaf09ebc0ff20cdd850d81b7f
[ "Apache-2.0" ]
null
null
null
hyfed-compensator/hyfed_compensator/project/hyfed_compensator_project.py
TUM-AIMED/splink
06e0ea66a8bf88ecaf09ebc0ff20cdd850d81b7f
[ "Apache-2.0" ]
4
2021-04-04T12:17:03.000Z
2021-05-25T11:11:20.000Z
""" The main class to obtain the compensation parameters from the clients, aggregate them, and share the aggregation results with the server Copyright 2021 Reza NasiriGerdeh. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in co...
46.534527
144
0.684584
from hyfed_compensator.util.hyfed_parameters import Parameter, AuthenticationParameter, SyncParameter, ConnectionParameter, MonitoringParameter from hyfed_compensator.util.status import OperationStatus from hyfed_compensator.util.endpoint import EndPoint from hyfed_compensator.util.utils import aggregate from hyfed_co...
true
true
f712ba5116a116231033a3f75fe3b9121bf50dc9
5,358
py
Python
second/core/non_max_suppression/nms_cpu.py
muzi2045/second_TANET.pytorch
3e10c93075a76684871fe0f188819c7b282671fd
[ "MIT" ]
6
2020-02-15T09:11:53.000Z
2021-11-12T09:03:41.000Z
second/core/non_max_suppression/nms_cpu.py
muzi2045/second_TANET.pytorch
3e10c93075a76684871fe0f188819c7b282671fd
[ "MIT" ]
2
2020-04-15T02:40:44.000Z
2020-11-28T02:14:32.000Z
second/core/non_max_suppression/nms_cpu.py
muzi2045/second_TANET.pytorch
3e10c93075a76684871fe0f188819c7b282671fd
[ "MIT" ]
3
2020-02-11T20:12:50.000Z
2021-05-28T07:31:02.000Z
import math from pathlib import Path import numba import numpy as np from spconv.spconv_utils import ( non_max_suppression_cpu, rotate_non_max_suppression_cpu) from second.core import box_np_ops from second.core.non_max_suppression.nms_gpu import rotate_iou_gpu def nms_cc(dets, thresh): scores = de...
34.567742
100
0.454834
import math from pathlib import Path import numba import numpy as np from spconv.spconv_utils import ( non_max_suppression_cpu, rotate_non_max_suppression_cpu) from second.core import box_np_ops from second.core.non_max_suppression.nms_gpu import rotate_iou_gpu def nms_cc(dets, thresh): scores = de...
true
true
f712bab1b22eda10ed82e8dc8b7eb5a1ec42ebb9
5,935
py
Python
generate_glfw_single_header.py
r-lyeh/glfw-single-header
85678fef245c23c2996ee9dd9950cb8c6c432627
[ "CC0-1.0" ]
40
2020-03-27T10:12:22.000Z
2021-11-14T20:27:07.000Z
generate_glfw_single_header.py
r-lyeh/glfw-single-header
85678fef245c23c2996ee9dd9950cb8c6c432627
[ "CC0-1.0" ]
3
2021-04-26T22:47:40.000Z
2021-04-27T12:54:57.000Z
generate_glfw_single_header.py
r-lyeh/glfw-single-header
85678fef245c23c2996ee9dd9950cb8c6c432627
[ "CC0-1.0" ]
6
2020-05-30T00:48:04.000Z
2022-03-19T18:17:50.000Z
import os win32_defines = ["#define _GLFW_WIN32 1", "#ifdef _MSC_VER\n#define _CRT_SECURE_NO_WARNINGS\n#endif", "#define LSH_GLFW_USE_HYBRID_HPG", "#ifdef LSH_GLFW_USE_HYBRID_HPG\n#define _GLFW_USE_HYBRID_HPG 1\n#endif", "#define _UNICODE", ...
49.458333
194
0.700253
import os win32_defines = ["#define _GLFW_WIN32 1", "#ifdef _MSC_VER\n#define _CRT_SECURE_NO_WARNINGS\n#endif", "#define LSH_GLFW_USE_HYBRID_HPG", "#ifdef LSH_GLFW_USE_HYBRID_HPG\n#define _GLFW_USE_HYBRID_HPG 1\n#endif", "#define _UNICODE", ...
true
true
f712bbdfb07969d94cafbdeedbf1a602821b1b60
2,189
py
Python
tum/management/commands/check_tum_user_state.py
fiduswriter/fiduswriter-tum
6a4fc3b3eb1832038c7e3abf57e18d99ca93a61b
[ "MIT" ]
null
null
null
tum/management/commands/check_tum_user_state.py
fiduswriter/fiduswriter-tum
6a4fc3b3eb1832038c7e3abf57e18d99ca93a61b
[ "MIT" ]
null
null
null
tum/management/commands/check_tum_user_state.py
fiduswriter/fiduswriter-tum
6a4fc3b3eb1832038c7e3abf57e18d99ca93a61b
[ "MIT" ]
null
null
null
import ldap3 from allauth.socialaccount.models import SocialAccount from django.conf import settings from base.management import BaseCommand def init_ldap(): server = ldap3.Server("ldap://ads.mwn.de") connection = ldap3.Connection( server, "CN=%s,OU=Users,ou=TU,ou=IAM,dc=ads,dc=mwn,dc=de" % ...
29.186667
79
0.547282
import ldap3 from allauth.socialaccount.models import SocialAccount from django.conf import settings from base.management import BaseCommand def init_ldap(): server = ldap3.Server("ldap://ads.mwn.de") connection = ldap3.Connection( server, "CN=%s,OU=Users,ou=TU,ou=IAM,dc=ads,dc=mwn,dc=de" % ...
true
true
f712bc59adbf62de0b37ed44ee51e3e1a37e10d6
1,787
py
Python
samples/snippets/import_data_sample.py
telpirion/python-aiplatform
5155dee5edd86fb700a91dfca01bddd4d6393410
[ "Apache-2.0" ]
null
null
null
samples/snippets/import_data_sample.py
telpirion/python-aiplatform
5155dee5edd86fb700a91dfca01bddd4d6393410
[ "Apache-2.0" ]
null
null
null
samples/snippets/import_data_sample.py
telpirion/python-aiplatform
5155dee5edd86fb700a91dfca01bddd4d6393410
[ "Apache-2.0" ]
null
null
null
# 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
38.021277
89
0.734751
from google.cloud import aiplatform def import_data_sample( project: str, dataset_id: str, gcs_source_uri: str, import_schema_uri: str, location: str = "us-central1", api_endpoint: str = "us-central1-aiplatform.googleapis.com", timeout: int = 1800, ): client_options = {"api_endpoint":...
true
true
f712bced455821fd1700a7c59b0def0bf9256618
27,694
py
Python
codenerix/forms.py
centrologic/django-codenerix
136d3cab1a19d2dfac810f902e3fcb5ea94e13ba
[ "Apache-2.0" ]
28
2017-02-25T01:39:34.000Z
2018-01-22T21:48:10.000Z
codenerix/forms.py
centrologic/django-codenerix
136d3cab1a19d2dfac810f902e3fcb5ea94e13ba
[ "Apache-2.0" ]
2
2017-03-10T12:31:33.000Z
2017-07-14T07:03:07.000Z
codenerix/forms.py
centrologic/django-codenerix
136d3cab1a19d2dfac810f902e3fcb5ea94e13ba
[ "Apache-2.0" ]
6
2017-03-10T12:00:02.000Z
2017-11-22T20:15:42.000Z
# -*- coding: utf-8 -*- # # django-codenerix # # Codenerix GNU # # Project URL : http://www.codenerix.com # # 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/LI...
47.340171
208
0.424966
from codenerix.djng.angular_model import NgModelFormMixin from codenerix.djng import NgFormValidationMixin, NgForm, NgModelForm from django.utils.translation import gettext as _ from django.forms.widgets import Select, CheckboxInput from django.forms import NullBooleanField from codenerix.helpers import model_inspec...
true
true
f712bd8c378d2f7349f4e9693db7ea1f7ea8cb0b
3,067
py
Python
train.py
MuhammadSYahyaS/cs-flow
bef320ae7b2063f1dce41fb2f2225228cd43a589
[ "MIT" ]
null
null
null
train.py
MuhammadSYahyaS/cs-flow
bef320ae7b2063f1dce41fb2f2225228cd43a589
[ "MIT" ]
null
null
null
train.py
MuhammadSYahyaS/cs-flow
bef320ae7b2063f1dce41fb2f2225228cd43a589
[ "MIT" ]
null
null
null
import numpy as np import torch from sklearn.metrics import roc_auc_score from tqdm import tqdm import config as c from model import get_cs_flow_model, save_model, FeatureExtractor, nf_forward from utils import * def train(train_loader, test_loader): model = get_cs_flow_model() optimizer = torch.optim.Adam(mo...
34.460674
105
0.581024
import numpy as np import torch from sklearn.metrics import roc_auc_score from tqdm import tqdm import config as c from model import get_cs_flow_model, save_model, FeatureExtractor, nf_forward from utils import * def train(train_loader, test_loader): model = get_cs_flow_model() optimizer = torch.optim.Adam(mo...
true
true
f712bdc707406e595ea03d635b0396e9fc88957b
2,320
py
Python
actions/run_analyzer_on_data_type.py
cognifloyd/stackstorm-thehive
e0e90fc0ecff792cf49fc6dd70c28c08dcb06cf0
[ "Apache-2.0" ]
4
2020-01-12T10:28:36.000Z
2020-07-15T09:51:14.000Z
actions/run_analyzer_on_data_type.py
cognifloyd/stackstorm-thehive
e0e90fc0ecff792cf49fc6dd70c28c08dcb06cf0
[ "Apache-2.0" ]
1
2019-06-07T09:48:24.000Z
2019-06-07T18:38:30.000Z
actions/run_analyzer_on_data_type.py
cognifloyd/stackstorm-thehive
e0e90fc0ecff792cf49fc6dd70c28c08dcb06cf0
[ "Apache-2.0" ]
3
2019-06-03T22:33:01.000Z
2021-01-28T17:47:38.000Z
import random from thehive4pyextended import TheHiveApiExtended from thehive4py.query import Eq from st2common.runners.base_action import Action __all__ = [ 'RunAnalyzerOnDataTypeAction' ] class RunAnalyzerOnDataTypeAction(Action): def run(self, case_id, data_type, analyzer_name, linked_task_name=None): ...
45.490196
100
0.569397
import random from thehive4pyextended import TheHiveApiExtended from thehive4py.query import Eq from st2common.runners.base_action import Action __all__ = [ 'RunAnalyzerOnDataTypeAction' ] class RunAnalyzerOnDataTypeAction(Action): def run(self, case_id, data_type, analyzer_name, linked_task_name=None): ...
true
true
f712bf45843444e6e2dca26f1c115406b50e89aa
6,433
py
Python
openstackclient/identity/v2_0/ec2creds.py
cloudification-io/python-openstackclient
e07324e30fbb24e89fd63d1c5a5fe485f693a45c
[ "Apache-2.0" ]
262
2015-01-29T20:10:49.000Z
2022-03-23T01:59:23.000Z
openstackclient/identity/v2_0/ec2creds.py
cloudification-io/python-openstackclient
e07324e30fbb24e89fd63d1c5a5fe485f693a45c
[ "Apache-2.0" ]
5
2015-01-21T02:37:35.000Z
2021-11-23T02:26:00.000Z
openstackclient/identity/v2_0/ec2creds.py
cloudification-io/python-openstackclient
e07324e30fbb24e89fd63d1c5a5fe485f693a45c
[ "Apache-2.0" ]
194
2015-01-08T07:39:27.000Z
2022-03-30T13:51:23.000Z
# Copyright 2012 OpenStack Foundation # Copyright 2013 Nebula 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...
30.779904
77
0.571584
import logging from osc_lib.command import command from osc_lib import exceptions from osc_lib import utils from openstackclient.i18n import _ LOG = logging.getLogger(__name__) class CreateEC2Creds(command.ShowOne): _description = _("Create EC2 credentials") def get_parser(self, prog_name): par...
true
true
f712bf9469956573dddd496959796e6038b050d1
1,467
py
Python
theano/gof/callcache.py
canyon289/Theano-PyMC
1a9b04bfe480b758ddfa54ba49c88bee3bec419c
[ "BSD-3-Clause" ]
1
2020-12-30T19:12:52.000Z
2020-12-30T19:12:52.000Z
theano/gof/callcache.py
canyon289/Theano-PyMC
1a9b04bfe480b758ddfa54ba49c88bee3bec419c
[ "BSD-3-Clause" ]
null
null
null
theano/gof/callcache.py
canyon289/Theano-PyMC
1a9b04bfe480b758ddfa54ba49c88bee3bec419c
[ "BSD-3-Clause" ]
null
null
null
import logging import pickle _logger = logging.getLogger("theano.gof.callcache") class CallCache: def __init__(self, filename=None): self.filename = filename try: if filename is None: raise OSError("bad filename") # just goes to except with open(filename)...
26.672727
68
0.522154
import logging import pickle _logger = logging.getLogger("theano.gof.callcache") class CallCache: def __init__(self, filename=None): self.filename = filename try: if filename is None: raise OSError("bad filename") with open(filename) as f: ...
true
true
f712bfc145e58d16e9ea7170ae1c37ae86aa8fa6
23,936
py
Python
locust/test/test_fasthttp.py
tyge68/locust
ec95c0da1692677b13ef2884eb389a7700ca5c2d
[ "MIT" ]
null
null
null
locust/test/test_fasthttp.py
tyge68/locust
ec95c0da1692677b13ef2884eb389a7700ca5c2d
[ "MIT" ]
11
2021-11-10T22:15:18.000Z
2022-03-28T22:20:23.000Z
locust/test/test_fasthttp.py
tyge68/locust
ec95c0da1692677b13ef2884eb389a7700ca5c2d
[ "MIT" ]
null
null
null
import socket import gevent import time from tempfile import NamedTemporaryFile from locust.user import task, TaskSet from locust.contrib.fasthttp import FastHttpSession from locust import FastHttpUser from locust.exception import CatchResponseError, InterruptTaskSet, ResponseError from locust.main import is_user_clas...
38.983713
135
0.634651
import socket import gevent import time from tempfile import NamedTemporaryFile from locust.user import task, TaskSet from locust.contrib.fasthttp import FastHttpSession from locust import FastHttpUser from locust.exception import CatchResponseError, InterruptTaskSet, ResponseError from locust.main import is_user_clas...
true
true
f712c0f130d61c97af3dc7a434e84545ae38a8c9
19,278
py
Python
src/sage/schemes/affine/affine_homset.py
kliem/sage-test-27122
cc60cfebc4576fed8b01f0fc487271bdee3cefed
[ "BSL-1.0" ]
null
null
null
src/sage/schemes/affine/affine_homset.py
kliem/sage-test-27122
cc60cfebc4576fed8b01f0fc487271bdee3cefed
[ "BSL-1.0" ]
2
2021-04-02T20:43:29.000Z
2021-04-05T23:38:58.000Z
src/sage/schemes/affine/affine_homset.py
kliem/sage-test-27122
cc60cfebc4576fed8b01f0fc487271bdee3cefed
[ "BSL-1.0" ]
1
2020-07-23T10:29:56.000Z
2020-07-23T10:29:56.000Z
r""" Set of homomorphisms between two affine schemes For schemes `X` and `Y`, this module implements the set of morphisms `Hom(X,Y)`. This is done by :class:`SchemeHomset_generic`. As a special case, the Hom-sets can also represent the points of a scheme. Recall that the `K`-rational points of a scheme `X` over `k` c...
40.929936
160
0.528789
from sage.misc.verbose import verbose from sage.rings.all import ZZ, CC, RR from sage.rings.rational_field import is_RationalField from sage.categories.fields import Fields from sage.categories.number_fields import NumberFields from sage.rings.finite_rings.finite_field_constructor import is_FiniteField from sage.rin...
true
true
f712c10d8d7af0220cacc4727cb1c31ff5659b0e
1,745
py
Python
android/texturearray/build.py
MNannig/Vulkan-Examples
9d76cea05fadf3a6eefae3094c500f84020f706b
[ "MIT" ]
2
2019-08-06T04:33:35.000Z
2019-10-06T20:03:58.000Z
android/texturearray/build.py
LiangYue1981816/GraphicsSamples-Vulkan
d15daabc582d4f8b198fdd6ec5651ec4298182a1
[ "MIT" ]
null
null
null
android/texturearray/build.py
LiangYue1981816/GraphicsSamples-Vulkan
d15daabc582d4f8b198fdd6ec5651ec4298182a1
[ "MIT" ]
1
2022-03-23T20:26:33.000Z
2022-03-23T20:26:33.000Z
import os import shutil import subprocess import sys import glob APK_NAME = "vulkanTexturearray" SHADER_DIR = "texturearray" ASSETS_TEXTURES = ["texturearray_bc3_unorm.ktx", "texturearray_astc_8x8_unorm.ktx", "texturearray_etc2_unorm.ktx"] if subprocess.call("ndk-build", shell=True) == 0: print("Build successf...
35.612245
114
0.598281
import os import shutil import subprocess import sys import glob APK_NAME = "vulkanTexturearray" SHADER_DIR = "texturearray" ASSETS_TEXTURES = ["texturearray_bc3_unorm.ktx", "texturearray_astc_8x8_unorm.ktx", "texturearray_etc2_unorm.ktx"] if subprocess.call("ndk-build", shell=True) == 0: print("Build successf...
true
true
f712c19b620ceb80244b56353cb3dfd175d606a5
97
py
Python
ecpack/sign_executable.py
ttauri-project/ecpack-and-sign
35d678e9be0b6860ffe10ab45aa7e1663823bece
[ "BSL-1.0" ]
null
null
null
ecpack/sign_executable.py
ttauri-project/ecpack-and-sign
35d678e9be0b6860ffe10ab45aa7e1663823bece
[ "BSL-1.0" ]
1
2021-04-03T12:37:39.000Z
2021-07-19T14:04:37.000Z
ecpack/sign_executable.py
ttauri-project/ecpack-and-sign
35d678e9be0b6860ffe10ab45aa7e1663823bece
[ "BSL-1.0" ]
null
null
null
def sign_executable(executable_filename): print("Signing '{}'".format(executable_filename))
24.25
53
0.762887
def sign_executable(executable_filename): print("Signing '{}'".format(executable_filename))
true
true
f712c1a41b42482851fb80222a0dcdfe102b8f34
722
py
Python
firmware/database/print_albums.py
hairymnstr/oggbox
6628aab0a7282a490fe611a49dad5456a3789205
[ "BSD-2-Clause" ]
7
2015-10-06T03:48:52.000Z
2021-06-30T08:22:27.000Z
firmware/database/print_albums.py
hairymnstr/oggbox
6628aab0a7282a490fe611a49dad5456a3789205
[ "BSD-2-Clause" ]
null
null
null
firmware/database/print_albums.py
hairymnstr/oggbox
6628aab0a7282a490fe611a49dad5456a3789205
[ "BSD-2-Clause" ]
null
null
null
import struct fr = open("albums.db", "rb") fr.seek(0,2) # seek end flen = fr.tell() fr.seek(0) # seek set l = struct.unpack("I", fr.read(4)) l = l[0] print "Found %d records" % l print "File size should be:" print " count 512" print " tracks %d" % (l * 512) #struct.calcsize(track_struct_format)) print " ...
18.05
71
0.541551
import struct fr = open("albums.db", "rb") fr.seek(0,2) flen = fr.tell() fr.seek(0) l = struct.unpack("I", fr.read(4)) l = l[0] print "Found %d records" % l print "File size should be:" print " count 512" print " tracks %d" % (l * 512) print " index %d" % (4 * (l - 1)) print " ----" print "...
false
true
f712c2adfddaf56ec3d3737e197b892ac92d20f7
3,151
py
Python
nscl/datasets/clevr/program_translator.py
K-A-R-T/DCL-Release
44c6e1234af63daa1ae32302eef5981651a5a0aa
[ "MIT" ]
343
2019-04-29T03:24:27.000Z
2022-03-31T19:25:08.000Z
nscl/datasets/clevr/program_translator.py
K-A-R-T/DCL-Release
44c6e1234af63daa1ae32302eef5981651a5a0aa
[ "MIT" ]
15
2019-06-07T02:23:46.000Z
2021-06-14T15:51:10.000Z
nscl/datasets/clevr/program_translator.py
K-A-R-T/DCL-Release
44c6e1234af63daa1ae32302eef5981651a5a0aa
[ "MIT" ]
92
2019-04-29T07:32:56.000Z
2022-02-01T22:35:57.000Z
#! /usr/bin/env python3 # -*- coding: utf-8 -*- # File : program_translator.py # Author : Jiayuan Mao # Email : maojiayuan@gmail.com # Date : 09/30/2018 # # This file is part of NSCL-PyTorch. # Distributed under terms of the MIT license. """ Tools for translating programs into different formats. """ from copy im...
32.822917
79
0.562044
from copy import deepcopy __all__ = ['clevr_to_nsclseq'] def get_clevr_pblock_op(block): if 'type' in block: return block['type'] assert 'function' in block return block['function'] def get_clevr_op_attribute(op): return op.split('_')[1] def clevr_to_nsclseq(clevr_program): nscl_pro...
true
true
f712c2de8610fc698e6971d284e3726b6fdbfaad
5,516
py
Python
panda/storage.py
higs4281/panda
133baa47882a289773a30c9656e2ea4efe569387
[ "MIT" ]
72
2015-02-12T22:28:11.000Z
2022-01-20T08:35:31.000Z
panda/storage.py
higs4281/panda
133baa47882a289773a30c9656e2ea4efe569387
[ "MIT" ]
24
2015-01-12T21:52:35.000Z
2021-12-13T19:39:46.000Z
panda/storage.py
higs4281/panda
133baa47882a289773a30c9656e2ea4efe569387
[ "MIT" ]
31
2015-01-09T19:20:19.000Z
2021-10-20T01:21:23.000Z
#!/usr/bin/env python from io import BufferedWriter, FileIO import os from ajaxuploader.backends.base import AbstractUploadBackend from django.conf import settings from panda.api import DataUploadResource, RelatedUploadResource, UserResource from panda.models import Dataset, DataUpload, RelatedUpload, UserProxy cla...
33.430303
99
0.608774
from io import BufferedWriter, FileIO import os from ajaxuploader.backends.base import AbstractUploadBackend from django.conf import settings from panda.api import DataUploadResource, RelatedUploadResource, UserResource from panda.models import Dataset, DataUpload, RelatedUpload, UserProxy class PANDAAbstractUpload...
false
true
f712c2fe19f802a1dccacdaa854fc2e21763724d
887
py
Python
cli/psym/common/data_enum.py
danielrh135568/symphony-1
54c92a0f8775d1a837ab7c7bd6a08ccd906d28a4
[ "BSD-3-Clause" ]
null
null
null
cli/psym/common/data_enum.py
danielrh135568/symphony-1
54c92a0f8775d1a837ab7c7bd6a08ccd906d28a4
[ "BSD-3-Clause" ]
null
null
null
cli/psym/common/data_enum.py
danielrh135568/symphony-1
54c92a0f8775d1a837ab7c7bd6a08ccd906d28a4
[ "BSD-3-Clause" ]
1
2022-02-24T21:47:51.000Z
2022-02-24T21:47:51.000Z
#!/usr/bin/env python3 # Copyright (c) 2004-present Facebook All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. from enum import Enum class Entity(Enum): Location = "Location" LocationType = "LocationType" Equipment = "Equipment" ...
28.612903
59
0.698985
from enum import Enum class Entity(Enum): Location = "Location" LocationType = "LocationType" Equipment = "Equipment" EquipmentType = "EquipmentType" EquipmentPort = "EquipmentPort" EquipmentPortType = "EquipmentPortType" Link = "Link" Service = "Service" ServiceType = "ServiceTyp...
true
true
f712c3ad506e4c11ffa607b5ea9a631e6e454a5b
713
py
Python
leetCode/top150/136_Single_Number.py
tanmaymittal/cpPractice
fb3cf45ebc7509019a0c9310480aae6ce0d783c4
[ "MIT" ]
null
null
null
leetCode/top150/136_Single_Number.py
tanmaymittal/cpPractice
fb3cf45ebc7509019a0c9310480aae6ce0d783c4
[ "MIT" ]
null
null
null
leetCode/top150/136_Single_Number.py
tanmaymittal/cpPractice
fb3cf45ebc7509019a0c9310480aae6ce0d783c4
[ "MIT" ]
null
null
null
""" Given a non-empty array of integers nums, every element appears twice except for one. Find that single one. You must implement a solution with a linear runtime complexity and use only constant extra space. Example 1: Input: nums = [2,2,1] Output: 1 Example 2: Input: nums = [4,1,2,1,2] Output: 4 Example 3: Inpu...
19.27027
107
0.622721
class Solution: def singleNumber(self, nums: List[int]) -> int: res = 0 for i in range(len(nums)): res ^= nums[i] return res
true
true
f712c3cfeaa4e88f91e8037d386518647b008cf1
18,437
py
Python
userbot/modules/imgmemes.py
Yansaii/Bdrl-Ubot
60dbbcc8270061379e848c2bce09e756c6ae143a
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
userbot/modules/imgmemes.py
Yansaii/Bdrl-Ubot
60dbbcc8270061379e848c2bce09e756c6ae143a
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
userbot/modules/imgmemes.py
Yansaii/Bdrl-Ubot
60dbbcc8270061379e848c2bce09e756c6ae143a
[ "Naumen", "Condor-1.1", "MS-PL" ]
7
2022-02-03T11:06:48.000Z
2022-03-09T00:53:53.000Z
""" Some Modules Imported by @Nitesh_231 :) & Again @heyworld roks *_* """ import asyncio import os import re import requests from html_telegraph_poster.upload_images import upload_image from PIL import Image, ImageDraw, ImageFont from telegraph import exceptions, upload_file from validators.url import url from wget ...
34.333333
102
0.615393
import asyncio import os import re import requests from html_telegraph_poster.upload_images import upload_image from PIL import Image, ImageDraw, ImageFont from telegraph import exceptions, upload_file from validators.url import url from wget import download from userbot import CMD_HANDLER as cmd from userbot import ...
true
true
f712c403cc1ef4c3014bcc7a492a5f26c1a3db63
1,405
py
Python
cli/bioims/test/test-artifact.py
aws-samples/bioimage-search
7acdeb8e24c31ff7302563df60f9b65a522dd834
[ "Apache-2.0" ]
4
2021-02-12T21:11:07.000Z
2021-09-23T18:14:46.000Z
cli/bioims/test/test-artifact.py
aws-samples/bioimage-search
7acdeb8e24c31ff7302563df60f9b65a522dd834
[ "Apache-2.0" ]
null
null
null
cli/bioims/test/test-artifact.py
aws-samples/bioimage-search
7acdeb8e24c31ff7302563df60f9b65a522dd834
[ "Apache-2.0" ]
null
null
null
import sys import json from random import seed from random import randint import boto3 sys.path.insert(0, "../src") import bioims artifactClient = bioims.client('artifact') # print(artifactClient.getLambdaArn()) # seed(1) # mids=[] # for i in range(10): # artifact = { # "contextId" : 'plate-'+str(i), #...
25.089286
88
0.589324
import sys import json from random import seed from random import randint import boto3 sys.path.insert(0, "../src") import bioims artifactClient = bioims.client('artifact') r = artifactClient.getArtifacts('1xDNMw2ZFhpSGDTppgyeMU', 'origin') print(r)
true
true
f712c4c052879b6cad62ac4d9f0d539965a7ad75
2,765
py
Python
core/models.py
pman06/recipe-project
3f9c9c47cbbce49363e0770a4f333232fb2f59a7
[ "MIT" ]
null
null
null
core/models.py
pman06/recipe-project
3f9c9c47cbbce49363e0770a4f333232fb2f59a7
[ "MIT" ]
null
null
null
core/models.py
pman06/recipe-project
3f9c9c47cbbce49363e0770a4f333232fb2f59a7
[ "MIT" ]
null
null
null
import uuid import os from django.db import models from django.contrib.auth.models import (AbstractBaseUser, BaseUserManager, PermissionsMixin) from django.conf import settings def recipe_image_file_path(instance, filename): """Generate file path for new recipe image""" ...
28.505155
76
0.65859
import uuid import os from django.db import models from django.contrib.auth.models import (AbstractBaseUser, BaseUserManager, PermissionsMixin) from django.conf import settings def recipe_image_file_path(instance, filename): ext = filename.split('.')[-1] filename = f'{u...
true
true
f712c544e050df01162f500e61015be918a7fb2f
3,448
py
Python
src/drug2ways/graph_processing.py
drug2ways/drug2ways
c27f4d94ae8cf32b52186395f90d399889b84214
[ "Apache-2.0" ]
21
2020-05-27T21:23:09.000Z
2022-02-09T13:42:29.000Z
src/drug2ways/graph_processing.py
drug2ways/drug2ways
c27f4d94ae8cf32b52186395f90d399889b84214
[ "Apache-2.0" ]
8
2020-05-29T20:46:21.000Z
2021-10-13T13:35:59.000Z
src/drug2ways/graph_processing.py
drug2ways/drug2ways
c27f4d94ae8cf32b52186395f90d399889b84214
[ "Apache-2.0" ]
6
2020-07-15T14:09:48.000Z
2022-03-30T12:27:53.000Z
# -*- coding: utf-8 -*- """Methods to generalize any graph for its path analysis.""" import logging from typing import Dict, Tuple, Any, List from networkx import DiGraph, isolates __all__ = [ 'generate_reduced_graph', ] logger = logging.getLogger(__name__) def remove_isolated_nodes(graph: DiGraph): """R...
26.728682
106
0.592227
import logging from typing import Dict, Tuple, Any, List from networkx import DiGraph, isolates __all__ = [ 'generate_reduced_graph', ] logger = logging.getLogger(__name__) def remove_isolated_nodes(graph: DiGraph): nodes = list(isolates(graph)) graph.remove_nodes_from(nodes) def _dict_to_graph(dat...
true
true
f712c7b1dd0e8299cf7defbd45de8ec54353d02e
273
py
Python
michigan-python/Input + Convertion.py
stambuk-cl/Python-repo
eacc4610b53c55886e897d5191585bb5b8440eb4
[ "MIT" ]
null
null
null
michigan-python/Input + Convertion.py
stambuk-cl/Python-repo
eacc4610b53c55886e897d5191585bb5b8440eb4
[ "MIT" ]
null
null
null
michigan-python/Input + Convertion.py
stambuk-cl/Python-repo
eacc4610b53c55886e897d5191585bb5b8440eb4
[ "MIT" ]
null
null
null
#Se crean los inputs rate = input("Enter Rate:") hrs = input("Enter Hours:") #Se toman los valores y se convierten en float ambos por que string y float no se pueden multiplicar directamente pay = float(rate) * float(hrs) #Se imprime el resultado de pay print("Pay:",pay)
30.333333
113
0.736264
rate = input("Enter Rate:") hrs = input("Enter Hours:") pay = float(rate) * float(hrs) print("Pay:",pay)
true
true
f712c802e34f008430d987035c36a72ff149c984
6,193
py
Python
avanthive/tests/dbapi_test_case.py
amount/PyHive
be525f1ab500916bd1b04de6aed6e1505db4f3d8
[ "Apache-2.0" ]
null
null
null
avanthive/tests/dbapi_test_case.py
amount/PyHive
be525f1ab500916bd1b04de6aed6e1505db4f3d8
[ "Apache-2.0" ]
null
null
null
avanthive/tests/dbapi_test_case.py
amount/PyHive
be525f1ab500916bd1b04de6aed6e1505db4f3d8
[ "Apache-2.0" ]
null
null
null
# encoding: utf-8 """Shared DB-API test cases""" from __future__ import absolute_import from __future__ import unicode_literals from builtins import object from builtins import range from future.utils import with_metaclass from avanthive import exc import abc import contextlib import functools def with_cursor(fn): ...
34.21547
98
0.62942
from __future__ import absolute_import from __future__ import unicode_literals from builtins import object from builtins import range from future.utils import with_metaclass from avanthive import exc import abc import contextlib import functools def with_cursor(fn): @functools.wraps(fn) def wrapped_fn(self, ...
true
true