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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f7351c8dea221062879ca07266ee91556e630dd2 | 26 | py | Python | __init__.py | nipunnmalhotra/nipunn_IQR | 24a08cf00a41cd938a7c9a31c781efc8ce9359ed | [
"MIT"
] | null | null | null | __init__.py | nipunnmalhotra/nipunn_IQR | 24a08cf00a41cd938a7c9a31c781efc8ce9359ed | [
"MIT"
] | null | null | null | __init__.py | nipunnmalhotra/nipunn_IQR | 24a08cf00a41cd938a7c9a31c781efc8ce9359ed | [
"MIT"
] | null | null | null | import nipunn_IQR.outliers | 26 | 26 | 0.923077 | import nipunn_IQR.outliers | true | true |
f7351cf30e51503e4f8f41dd8d9d62a6f16bb53b | 190 | py | Python | test.py | amysudarat/KaggleProject | 319b6644cb7c45674c0b2fc69ab23c317b64d644 | [
"MIT"
] | null | null | null | test.py | amysudarat/KaggleProject | 319b6644cb7c45674c0b2fc69ab23c317b64d644 | [
"MIT"
] | null | null | null | test.py | amysudarat/KaggleProject | 319b6644cb7c45674c0b2fc69ab23c317b64d644 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
print("Hello Mikel")
print("test")
print("working on amy branch")
print(" Hello this is mikel. SO i created a branche and i want to be sure i did the right thing") | 23.75 | 97 | 0.678947 |
print("Hello Mikel")
print("test")
print("working on amy branch")
print(" Hello this is mikel. SO i created a branche and i want to be sure i did the right thing") | true | true |
f7351ed173149466d0046eb2e9cd4948e1478441 | 3,936 | py | Python | src/rewriter/gen_reading_correction_data.py | dancerj/mozc | a5a4927c1f709d2ff0c681585c746f73a434e4c9 | [
"BSD-3-Clause"
] | null | null | null | src/rewriter/gen_reading_correction_data.py | dancerj/mozc | a5a4927c1f709d2ff0c681585c746f73a434e4c9 | [
"BSD-3-Clause"
] | 1 | 2021-06-30T14:59:51.000Z | 2021-06-30T15:31:56.000Z | src/rewriter/gen_reading_correction_data.py | dancerj/mozc | a5a4927c1f709d2ff0c681585c746f73a434e4c9 | [
"BSD-3-Clause"
] | 1 | 2022-03-25T09:01:39.000Z | 2022-03-25T09:01:39.000Z | # -*- coding: utf-8 -*-
# Copyright 2010-2020, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this... | 41.431579 | 80 | 0.741362 |
__author__ = "komatsu"
import codecs
import optparse
from build_tools import code_generator_util
from build_tools import serialized_string_array_builder
def ParseOptions():
parser = optparse.OptionParser()
parser.add_option('--input', dest='input', help='Input TSV file path.')
p... | true | true |
f7351ed7ac47d418a33066370b5990a5269a73b7 | 7,904 | py | Python | install/gcp/upgrade_tools/db_migrator.py | mitsuo0114/forseti-security | a21dc6b7a7420a60f02c1a4bdfbab9e101291dd2 | [
"Apache-2.0"
] | null | null | null | install/gcp/upgrade_tools/db_migrator.py | mitsuo0114/forseti-security | a21dc6b7a7420a60f02c1a4bdfbab9e101291dd2 | [
"Apache-2.0"
] | null | null | null | install/gcp/upgrade_tools/db_migrator.py | mitsuo0114/forseti-security | a21dc6b7a7420a60f02c1a4bdfbab9e101291dd2 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 The Forseti Security 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 a... | 35.443946 | 77 | 0.660552 |
from __future__ import print_function
import sys
import migrate.changeset
from sqlalchemy.exc import OperationalError
import google.cloud.forseti.services.scanner.dao as scanner_dao
import google.cloud.forseti.services.inventory.storage as inventory_dao
import google.cloud.forseti.services.dao as ... | true | true |
f735201175d7dcb58bf35d7c25432ef8c050f9e7 | 3,825 | py | Python | core_pe/photo.py | astrofrog/dupeguru | d0a3f081dab21ea3d2fc69830c9e71a18078c150 | [
"BSD-3-Clause"
] | 1 | 2017-01-03T05:50:39.000Z | 2017-01-03T05:50:39.000Z | core_pe/photo.py | astrofrog/dupeguru | d0a3f081dab21ea3d2fc69830c9e71a18078c150 | [
"BSD-3-Clause"
] | null | null | null | core_pe/photo.py | astrofrog/dupeguru | d0a3f081dab21ea3d2fc69830c9e71a18078c150 | [
"BSD-3-Clause"
] | null | null | null | # Created By: Virgil Dupras
# Created On: 2011-05-29
# Copyright 2013 Hardcoded Software (http://www.hardcoded.net)
#
# This software is licensed under the "BSD" License as described in the "LICENSE" file,
# which should be included with this package. The terms are also available at
# http://www.hardcoded.net/licens... | 37.5 | 88 | 0.613072 |
import logging
from hscommon.util import get_file_ext, format_size
from core.app import format_timestamp, format_perc, format_dupe_count
from core import fs
from . import exif
def format_dimensions(dimensions):
return '%d x %d' % (dimensions[0], dimensions[1])
def get_delta_dimensions(value, ref_value):
... | true | true |
f735204ab267854d8c7a3281bc5ce292b2f1e8d0 | 836 | py | Python | compiled/python/imports_circular_b.py | smarek/ci_targets | c5edee7b0901fd8e7f75f85245ea4209b38e0cb3 | [
"MIT"
] | 4 | 2017-04-08T12:55:11.000Z | 2020-12-05T21:09:31.000Z | compiled/python/imports_circular_b.py | smarek/ci_targets | c5edee7b0901fd8e7f75f85245ea4209b38e0cb3 | [
"MIT"
] | 7 | 2018-04-23T01:30:33.000Z | 2020-10-30T23:56:14.000Z | compiled/python/imports_circular_b.py | smarek/ci_targets | c5edee7b0901fd8e7f75f85245ea4209b38e0cb3 | [
"MIT"
] | 6 | 2017-04-08T11:41:14.000Z | 2020-10-30T22:47:31.000Z | # This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild
from pkg_resources import parse_version
import kaitaistruct
from kaitaistruct import KaitaiStruct, KaitaiStream, BytesIO
if parse_version(kaitaistruct.__version__) < parse_version('0.9'):
raise Exception("Incompati... | 32.153846 | 132 | 0.722488 |
from pkg_resources import parse_version
import kaitaistruct
from kaitaistruct import KaitaiStruct, KaitaiStream, BytesIO
if parse_version(kaitaistruct.__version__) < parse_version('0.9'):
raise Exception("Incompatible Kaitai Struct Python API: 0.9 or later is required, but you have %s" % (kaitaistruct.__version... | true | true |
f735215a5b29bb7037ea5253477ebe9aadee4cd9 | 879 | py | Python | server/migrations/versions/3bed7b8d8720_shares_relation.py | momikey/liblio | c7ad4fd8d72369358863b90e34f3ed89ddef753c | [
"MIT"
] | null | null | null | server/migrations/versions/3bed7b8d8720_shares_relation.py | momikey/liblio | c7ad4fd8d72369358863b90e34f3ed89ddef753c | [
"MIT"
] | null | null | null | server/migrations/versions/3bed7b8d8720_shares_relation.py | momikey/liblio | c7ad4fd8d72369358863b90e34f3ed89ddef753c | [
"MIT"
] | null | null | null | """Shares relation
Revision ID: 3bed7b8d8720
Revises: b86d7b60fbef
Create Date: 2019-09-30 10:21:56.725664
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '3bed7b8d8720'
down_revision = 'b86d7b60fbef'
branch_labels = None
depends_on = None
def upgrade():
... | 25.114286 | 65 | 0.675768 | from alembic import op
import sqlalchemy as sa
revision = '3bed7b8d8720'
down_revision = 'b86d7b60fbef'
branch_labels = None
depends_on = None
def upgrade():
'], ['posts.id'], ),
sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
sa.PrimaryKeyConstraint('user_id', 'post_id')
)
| true | true |
f735219bdf8e165d01f8912a1bab3856ce66114f | 23,430 | py | Python | fast_scroller/h5data.py | miketrumpis/lfp_scroller | ce4dbf85bb4d31f2eacfb5d68a5049499637722c | [
"BSD-3-Clause"
] | null | null | null | fast_scroller/h5data.py | miketrumpis/lfp_scroller | ce4dbf85bb4d31f2eacfb5d68a5049499637722c | [
"BSD-3-Clause"
] | 6 | 2021-10-08T17:27:46.000Z | 2021-12-14T16:29:44.000Z | fast_scroller/h5data.py | miketrumpis/lfp_scroller | ce4dbf85bb4d31f2eacfb5d68a5049499637722c | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
from scipy.linalg import LinAlgError
from scipy.signal import lfilter, lfilter_zi, hilbert
from scipy.interpolate import interp1d
import h5py
from tqdm import tqdm
from ecogdata.util import input_as_2d
from ecogdata.util import nextpow2
def h5mean(array, axis, rowmask=(), start=0, stop=None):
"... | 37.368421 | 117 | 0.590568 | import numpy as np
from scipy.linalg import LinAlgError
from scipy.signal import lfilter, lfilter_zi, hilbert
from scipy.interpolate import interp1d
import h5py
from tqdm import tqdm
from ecogdata.util import input_as_2d
from ecogdata.util import nextpow2
def h5mean(array, axis, rowmask=(), start=0, stop=None):
... | true | true |
f73522a2af911d1515d12f72fa0d2667a186b3b9 | 1,251 | py | Python | cyberhead/modules/brokers/coinbase/Coinbase.py | fakecoinbase/TheCyberHeadslashCyberHead | aac5bdaeab75d7ed42cb9aa3e316b3af55d68817 | [
"Unlicense"
] | 4 | 2019-10-25T05:37:32.000Z | 2019-10-25T07:20:44.000Z | cyberhead/modules/brokers/coinbase/Coinbase.py | Seburath/CyberHead | b1c5d8c157ff5bb976778ff5f7901d82e41d7d3e | [
"Unlicense"
] | 9 | 2021-03-11T02:56:42.000Z | 2022-03-12T00:43:13.000Z | cyberhead/modules/brokers/coinbase/Coinbase.py | Seburath/CyberHead | b1c5d8c157ff5bb976778ff5f7901d82e41d7d3e | [
"Unlicense"
] | 1 | 2020-11-23T09:37:25.000Z | 2020-11-23T09:37:25.000Z | import cbpro
import pandas as pd
from base64 import b64encode
class Coinbase:
def __init__(self, API_KEY, API_SECRET, API_PASS, ENV_URL="https://api-public.sandbox.pro.coinbase.com"):
self.API_KEY = API_KEY
self.API_SECRET = API_SECRET
self.API_PASS = API_PASS
self.ENV_URL = ENV_URL
self.client = cbpro.Auth... | 27.8 | 109 | 0.741807 | import cbpro
import pandas as pd
from base64 import b64encode
class Coinbase:
def __init__(self, API_KEY, API_SECRET, API_PASS, ENV_URL="https://api-public.sandbox.pro.coinbase.com"):
self.API_KEY = API_KEY
self.API_SECRET = API_SECRET
self.API_PASS = API_PASS
self.ENV_URL = ENV_URL
self.client = cbpro.Auth... | true | true |
f73523b2b99ace61784f26d0fe49a2259344d2d3 | 636 | py | Python | setup.py | ilfrich/frappy-py-mongo-content-store | aec7d72f2b1759ade7881abb69358b49cdc8aa02 | [
"Apache-2.0"
] | null | null | null | setup.py | ilfrich/frappy-py-mongo-content-store | aec7d72f2b1759ade7881abb69358b49cdc8aa02 | [
"Apache-2.0"
] | null | null | null | setup.py | ilfrich/frappy-py-mongo-content-store | aec7d72f2b1759ade7881abb69358b49cdc8aa02 | [
"Apache-2.0"
] | null | null | null | from setuptools import setup
with open("README.md", "r") as fh:
long_description = fh.read()
setup(name="frappymongocontent",
version="1.0.0",
description="Store Implementation for Content in MongoDB",
long_description=long_description,
long_description_content_type="text/markdown",
... | 26.5 | 69 | 0.622642 | from setuptools import setup
with open("README.md", "r") as fh:
long_description = fh.read()
setup(name="frappymongocontent",
version="1.0.0",
description="Store Implementation for Content in MongoDB",
long_description=long_description,
long_description_content_type="text/markdown",
... | true | true |
f73523dae23b1abc06f1abc0e7276a52c1a0a20e | 4,681 | py | Python | Track1.2/configs/recognition/csn/csn_loveu2_train.py | VisualAnalysisOfHumans/LOVEU_TRACK1_TOP3_SUBMISSION | 6f4d1c7e6883d6b0664fcd04265f437247afab54 | [
"MIT"
] | 1 | 2021-06-25T06:43:29.000Z | 2021-06-25T06:43:29.000Z | Track1.2/configs/recognition/csn/csn_loveu2_train.py | VisualAnalysisOfHumans/LOVEU_TRACK1_TOP3_SUBMISSION | 6f4d1c7e6883d6b0664fcd04265f437247afab54 | [
"MIT"
] | 1 | 2022-01-11T02:35:57.000Z | 2022-01-11T02:35:57.000Z | Track1.2/configs/recognition/csn/csn_loveu2_train.py | VisualAnalysisOfHumans/LOVEU_TRACK1_TOP3_SUBMISSION | 6f4d1c7e6883d6b0664fcd04265f437247afab54 | [
"MIT"
] | 1 | 2022-01-12T01:55:52.000Z | 2022-01-12T01:55:52.000Z | # model settings
model = dict(
type='Recognizer3D',
backbone=dict(
type='ResNet3dCSN',
pretrained2d=False,
pretrained= # noqa: E251
'/home/notebook/data/personal/mmaction2_task1/data/ircsn_from_scratch_r152_ig65m_20200807-771c4135.pth', # noqa: E501
depth=152,
w... | 35.732824 | 126 | 0.674001 |
model = dict(
type='Recognizer3D',
backbone=dict(
type='ResNet3dCSN',
pretrained2d=False,
pretrained=
'/home/notebook/data/personal/mmaction2_task1/data/ircsn_from_scratch_r152_ig65m_20200807-771c4135.pth',
depth=152,
with_pool2=False,
bottleneck_mode... | true | true |
f7352415b74aec839494235d20723e8458558e4f | 1,367 | py | Python | sdk/python/pulumi_kubernetes/rbac/v1/ClusterRoleList.py | rosskevin/pulumi-kubernetes | e4fa04b13a20929c879aca1bbe58fb5a95d16f7c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_kubernetes/rbac/v1/ClusterRoleList.py | rosskevin/pulumi-kubernetes | e4fa04b13a20929c879aca1bbe58fb5a95d16f7c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_kubernetes/rbac/v1/ClusterRoleList.py | rosskevin/pulumi-kubernetes | e4fa04b13a20929c879aca1bbe58fb5a95d16f7c | [
"Apache-2.0"
] | null | null | null | import pulumi
import pulumi.runtime
from ... import tables
class ClusterRoleList(pulumi.CustomResource):
"""
ClusterRoleList is a collection of ClusterRoles
"""
def __init__(self, __name__, __opts__=None, items=None, metadata=None):
if not __name__:
raise TypeError('Missing resourc... | 35.973684 | 89 | 0.66496 | import pulumi
import pulumi.runtime
from ... import tables
class ClusterRoleList(pulumi.CustomResource):
def __init__(self, __name__, __opts__=None, items=None, metadata=None):
if not __name__:
raise TypeError('Missing resource name argument (for URN creation)')
if not isinstance(__nam... | true | true |
f7352607be115758a5676f711cf159ffb55b1c11 | 18,174 | py | Python | 3rd_check/surgery/penalty.py | jdlaubrie/shell-elem | f87cb9ca9179533d3a645a494e7ef4d39666ddc6 | [
"MIT"
] | null | null | null | 3rd_check/surgery/penalty.py | jdlaubrie/shell-elem | f87cb9ca9179533d3a645a494e7ef4d39666ddc6 | [
"MIT"
] | null | null | null | 3rd_check/surgery/penalty.py | jdlaubrie/shell-elem | f87cb9ca9179533d3a645a494e7ef4d39666ddc6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
NbrOfNodes = 35
keygnra = ' TIME: GANDRA STEP: 80.000 FRAME: 1.000'
keystent = ' TIME: STENT STEP: 1.000 FRAME: 1.000'
keygnrb = ' TIME: GANDRB STEP: 100.000 FRAME: 1.000'
# File for gain... | 50.483333 | 119 | 0.614009 |
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
NbrOfNodes = 35
keygnra = ' TIME: GANDRA STEP: 80.000 FRAME: 1.000'
keystent = ' TIME: STENT STEP: 1.000 FRAME: 1.000'
keygnrb = ' TIME: GANDRB STEP: 100.000 FRAME: 1.000'
file_g01 = open('surgery_p7.rsn', 'r')
ga... | true | true |
f735262f54850ed34027a73490ed6d900391ebd5 | 4,659 | py | Python | conans/client/generators/qmake.py | ytimenkov/conan | 89eb275b9696b308aaaa1fbfaa0f8cdab284a764 | [
"MIT"
] | 3 | 2016-11-11T01:09:44.000Z | 2017-07-19T13:30:17.000Z | conans/client/generators/qmake.py | ytimenkov/conan | 89eb275b9696b308aaaa1fbfaa0f8cdab284a764 | [
"MIT"
] | 6 | 2017-06-14T11:40:15.000Z | 2020-05-23T01:43:28.000Z | conans/client/generators/qmake.py | ytimenkov/conan | 89eb275b9696b308aaaa1fbfaa0f8cdab284a764 | [
"MIT"
] | 2 | 2017-11-29T14:05:22.000Z | 2018-09-19T12:43:33.000Z | from conans.model import Generator
from conans.paths import BUILD_INFO_QMAKE
class DepsCppQmake(object):
def __init__(self, cpp_info):
def multiline(field):
return " \\\n ".join('"%s"' % p.replace("\\", "/") for p in field)
self.include_paths = multiline(cpp_info.include_paths)
... | 43.542056 | 92 | 0.608714 | from conans.model import Generator
from conans.paths import BUILD_INFO_QMAKE
class DepsCppQmake(object):
def __init__(self, cpp_info):
def multiline(field):
return " \\\n ".join('"%s"' % p.replace("\\", "/") for p in field)
self.include_paths = multiline(cpp_info.include_paths)
... | true | true |
f7352703ed42ee6015d5ca30e57234884d399073 | 1,652 | py | Python | test/testAnonymizationExecutor.py | AutoDash/AutoDash | 3924795a04159f80ea3b65b2172747babd15f35f | [
"Apache-2.0"
] | 3 | 2020-02-12T01:24:46.000Z | 2020-02-13T00:50:46.000Z | test/testAnonymizationExecutor.py | AutoDash/AutoDash | 3924795a04159f80ea3b65b2172747babd15f35f | [
"Apache-2.0"
] | 32 | 2020-02-20T10:20:56.000Z | 2022-02-10T01:42:46.000Z | test/testAnonymizationExecutor.py | AutoDash/AutoDash | 3924795a04159f80ea3b65b2172747babd15f35f | [
"Apache-2.0"
] | 1 | 2020-02-22T02:47:19.000Z | 2020-02-22T02:47:19.000Z | #!/usr/bin/env python3
import unittest
import os
import shutil
from src.data.VideoItem import VideoItem
from src.data.MetaDataItem import MetaDataItem
from src.executor.FaceBlurrer import FaceBlurrer
from numpy.testing import assert_array_equal, assert_raises
class TestAnonymizationExecutor(unittest.TestCase):
TE... | 33.04 | 103 | 0.70339 |
import unittest
import os
import shutil
from src.data.VideoItem import VideoItem
from src.data.MetaDataItem import MetaDataItem
from src.executor.FaceBlurrer import FaceBlurrer
from numpy.testing import assert_array_equal, assert_raises
class TestAnonymizationExecutor(unittest.TestCase):
TEST_DIR = os.path.join(... | true | true |
f7352712da6d0702be5a451230eec61bfb5112aa | 238 | py | Python | backend/backend/orders/admin.py | PrzemyslawSalek/9eats | b748ba2166a065c8d04e043069a1ddf5641322ca | [
"MIT"
] | null | null | null | backend/backend/orders/admin.py | PrzemyslawSalek/9eats | b748ba2166a065c8d04e043069a1ddf5641322ca | [
"MIT"
] | null | null | null | backend/backend/orders/admin.py | PrzemyslawSalek/9eats | b748ba2166a065c8d04e043069a1ddf5641322ca | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Order
class TodoAdmin(admin.ModelAdmin):
list_display = ('dishes', 'paid', 'completed', 'timestamp', 'user')
# Register your models here.
admin.site.register(Order, TodoAdmin)
| 19.833333 | 71 | 0.735294 | from django.contrib import admin
from .models import Order
class TodoAdmin(admin.ModelAdmin):
list_display = ('dishes', 'paid', 'completed', 'timestamp', 'user')
admin.site.register(Order, TodoAdmin)
| true | true |
f7352926b65d269a72935135f220dd69066912a0 | 9,509 | py | Python | src/appengine/server.py | bonomali/clusterfuzz | 39e0583148b1810cbbe18f48d7a4ee63489f4c84 | [
"Apache-2.0"
] | 2 | 2019-03-10T14:40:17.000Z | 2021-11-17T10:51:31.000Z | src/appengine/server.py | M31MOTH/clusterfuzz | a614d2e09238f11ae578337e10dfeaba38dcae76 | [
"Apache-2.0"
] | 12 | 2020-11-13T18:58:31.000Z | 2022-03-21T22:19:55.000Z | src/appengine/server.py | gaybro8777/clusterfuzz | fb053896ee5b5f1468479e75223c07b4281a72d3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 41.70614 | 80 | 0.7495 |
import urllib
import webapp2
from webapp2_extras import routes
from base import utils
from config import local_config
from handlers import base_handler
from handlers import bots
from handlers import commit_range
from handlers import configuration
from handlers import corpora
from handlers import coverage_... | true | true |
f7352a156a29540ef2be6caeb5071e55659eee34 | 6,950 | py | Python | glyco/glucose/util.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 2 | 2021-04-13T21:22:18.000Z | 2021-09-07T02:11:57.000Z | glyco/glucose/util.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 21 | 2020-09-06T02:41:05.000Z | 2022-03-02T04:40:01.000Z | glyco/glucose/util.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2015 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.
import contextlib
import os
import platform
import re
import tempfile
import shutil
import subprocess
import sys
import urllib
import urlparse
# Copied fro... | 30.61674 | 80 | 0.682734 |
import contextlib
import os
import platform
import re
import tempfile
import shutil
import subprocess
import sys
import urllib
import urlparse
WHEEL_FILE_RE = re.compile(
r"""^(?P<namever>(?P<name>.+?)-(?P<ver>\d.*?))
((-(?P<build>\d.*?))?-(?P<pyver>.+?)-(?P<abi>.+?)-(?P<plat>.+?)
\.whl)$""",
re.VERBOSE
... | false | true |
f7352bfdb50c0cc0b1af31b8dcc6b5ece3b6e577 | 2,581 | py | Python | supervisord/tests/test_supervisord_integration.py | vbarbaresi/integrations-core | ab26ab1cd6c28a97c1ad1177093a93659658c7aa | [
"BSD-3-Clause"
] | 663 | 2016-08-23T05:23:45.000Z | 2022-03-29T00:37:23.000Z | supervisord/tests/test_supervisord_integration.py | vbarbaresi/integrations-core | ab26ab1cd6c28a97c1ad1177093a93659658c7aa | [
"BSD-3-Clause"
] | 6,642 | 2016-06-09T16:29:20.000Z | 2022-03-31T22:24:09.000Z | supervisord/tests/test_supervisord_integration.py | vbarbaresi/integrations-core | ab26ab1cd6c28a97c1ad1177093a93659658c7aa | [
"BSD-3-Clause"
] | 1,222 | 2017-01-27T15:51:38.000Z | 2022-03-31T18:17:51.000Z | # (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from time import sleep
import pytest
from .common import PROCESSES, PROCESSES_BY_STATE_BY_ITERATION, STATUSES, SUPERVISOR_VERSION
# Mark all tests in this file as integration tests
pytestmark = [pytest... | 35.356164 | 118 | 0.69353 |
from time import sleep
import pytest
from .common import PROCESSES, PROCESSES_BY_STATE_BY_ITERATION, STATUSES, SUPERVISOR_VERSION
pytestmark = [pytest.mark.integration, pytest.mark.usefixtures("dd_environment")]
def test_check(aggregator, check, instance):
instance_tags = ["supervisord_server:travis"]
... | true | true |
f7352c714da27beb77f9d60af9f18596852f5dc3 | 4,781 | py | Python | tensor2tensor/models/video/sv2p_params.py | kpe/tensor2tensor | 453c473030c354a3d9a4c27b12bcec8942334bf4 | [
"Apache-2.0"
] | 34 | 2018-12-19T01:00:57.000Z | 2021-03-26T09:36:37.000Z | tensor2tensor/models/video/sv2p_params.py | kpe/tensor2tensor | 453c473030c354a3d9a4c27b12bcec8942334bf4 | [
"Apache-2.0"
] | 11 | 2018-12-25T03:37:59.000Z | 2021-08-25T14:43:58.000Z | tensor2tensor/models/video/sv2p_params.py | kpe/tensor2tensor | 453c473030c354a3d9a4c27b12bcec8942334bf4 | [
"Apache-2.0"
] | 9 | 2018-12-27T08:00:44.000Z | 2020-06-08T03:05:14.000Z | # coding=utf-8
# Copyright 2019 The Tensor2Tensor Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 31.453947 | 80 | 0.776825 |
from __future__ import division
from __future__ import print_function
from tensor2tensor.layers import modalities
from tensor2tensor.models.video import basic_stochastic
from tensor2tensor.utils import registry
@registry.register_hparams
def next_frame_sv2p():
hparams = basic_stochastic.next_frame_... | true | true |
f7352ca98740e2ca42cce07e2ff806ab32c5e176 | 7,486 | py | Python | scripts/wine/wine_explain.py | NRuf77/proset | 101d491e05c2423faddca31029232982f46d8831 | [
"MIT"
] | null | null | null | scripts/wine/wine_explain.py | NRuf77/proset | 101d491e05c2423faddca31029232982f46d8831 | [
"MIT"
] | null | null | null | scripts/wine/wine_explain.py | NRuf77/proset | 101d491e05c2423faddca31029232982f46d8831 | [
"MIT"
] | null | null | null | """Explain proset classifier trained on wine classification data.
Copyright by Nikolaus Ruf
Released under the MIT license - see LICENSE file for details
"""
from copy import deepcopy
import gzip
import os
import pickle
import matplotlib.pyplot as plt
import numpy as np
import shap
import proset.util... | 34.027273 | 113 | 0.706118 |
from copy import deepcopy
import gzip
import os
import pickle
import matplotlib.pyplot as plt
import numpy as np
import shap
import proset.utility as utility
print("* Apply user settings")
input_path = "scripts/results"
output_path = "scripts/reports"
input_files = [
"wine_2d_05_model.gz",
... | true | true |
f7352cb393e14e541884e6c60236d4f8a7073061 | 123 | py | Python | fsleyes/__main__.py | pauldmccarthy/fsleyes | 453a6b91ec7763c39195814d635257e3766acf83 | [
"Apache-2.0"
] | 12 | 2018-05-05T01:36:25.000Z | 2021-09-23T20:44:08.000Z | fsleyes/__main__.py | pauldmccarthy/fsleyes | 453a6b91ec7763c39195814d635257e3766acf83 | [
"Apache-2.0"
] | 97 | 2018-05-05T02:17:23.000Z | 2022-03-29T14:58:42.000Z | fsleyes/__main__.py | pauldmccarthy/fsleyes | 453a6b91ec7763c39195814d635257e3766acf83 | [
"Apache-2.0"
] | 6 | 2017-12-09T09:02:00.000Z | 2021-03-05T18:55:13.000Z | #!/usr/bin/env python
if __name__ == '__main__':
import sys
import fsleyes.main as main
sys.exit(main.main())
| 17.571429 | 31 | 0.650407 |
if __name__ == '__main__':
import sys
import fsleyes.main as main
sys.exit(main.main())
| true | true |
f7352d278824bf95db50a16c3dea7eab65426af5 | 1,051 | py | Python | main/views.py | tamirmatok/Beyond-07-team-1 | 3bd7de8916574b28b9f96fc99526de7c4e27eaa2 | [
"MIT"
] | 1 | 2022-03-03T12:03:17.000Z | 2022-03-03T12:03:17.000Z | main/views.py | tamirmatok/Beyond-07-team-1 | 3bd7de8916574b28b9f96fc99526de7c4e27eaa2 | [
"MIT"
] | 38 | 2022-03-07T14:14:48.000Z | 2022-03-31T18:37:52.000Z | main/views.py | tamirmatok/Beyond-07-team-1 | 3bd7de8916574b28b9f96fc99526de7c4e27eaa2 | [
"MIT"
] | 5 | 2022-02-28T18:55:09.000Z | 2022-03-06T08:04:40.000Z | from django.shortcuts import render
from django.contrib.auth.decorators import login_required
from django.shortcuts import redirect
from django.contrib.auth import logout
from dogowner.models import DogOwner
from daycare.models import DayCare
from dogowner.views import dog_owner_home
from daycare.views import daycare_... | 23.886364 | 60 | 0.766889 | from django.shortcuts import render
from django.contrib.auth.decorators import login_required
from django.shortcuts import redirect
from django.contrib.auth import logout
from dogowner.models import DogOwner
from daycare.models import DayCare
from dogowner.views import dog_owner_home
from daycare.views import daycare_... | true | true |
f7352d51b446a770f9a814b7005c5afb8d25c8c5 | 662 | py | Python | src/sentry/incidents/receivers.py | learninto/sentry | 4f9f564841498b3af49c1677d6b61f3e47b01923 | [
"BSD-3-Clause"
] | null | null | null | src/sentry/incidents/receivers.py | learninto/sentry | 4f9f564841498b3af49c1677d6b61f3e47b01923 | [
"BSD-3-Clause"
] | null | null | null | src/sentry/incidents/receivers.py | learninto/sentry | 4f9f564841498b3af49c1677d6b61f3e47b01923 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
from sentry.incidents.models import IncidentSuspectCommit
from sentry.signals import release_commits_updated
@release_commits_updated.connect(weak=False)
def handle_release_commits_updated(removed_commit_ids, added_commit_ids, **kwargs):
from sentry.incidents.tasks import c... | 36.777778 | 97 | 0.796073 | from __future__ import absolute_import
from sentry.incidents.models import IncidentSuspectCommit
from sentry.signals import release_commits_updated
@release_commits_updated.connect(weak=False)
def handle_release_commits_updated(removed_commit_ids, added_commit_ids, **kwargs):
from sentry.incidents.tasks import c... | true | true |
f7352e39399f7e40e21e71af52bbc0cedb18c9f5 | 513 | py | Python | pt/pt.py | Mic92/tracedumpd | a84eac58106f1f1d7a82f5dee2a327861e763e4e | [
"MIT"
] | 1 | 2021-03-22T18:04:53.000Z | 2021-03-22T18:04:53.000Z | pt/pt.py | Mic92/tracedump | a84eac58106f1f1d7a82f5dee2a327861e763e4e | [
"MIT"
] | null | null | null | pt/pt.py | Mic92/tracedump | a84eac58106f1f1d7a82f5dee2a327861e763e4e | [
"MIT"
] | null | null | null | import glob
from pathlib import Path
from cffi import FFI
with open(Path(__file__).resolve().parent.joinpath("ffi.h")) as f:
header = f.read()
ffibuilder = FFI()
ffibuilder.cdef(header)
ffibuilder.set_source(
"tracedump._pt",
None,
sources=glob.glob("*.cpp"),
extra_comp... | 23.318182 | 82 | 0.621832 | import glob
from pathlib import Path
from cffi import FFI
with open(Path(__file__).resolve().parent.joinpath("ffi.h")) as f:
header = f.read()
ffibuilder = FFI()
ffibuilder.cdef(header)
ffibuilder.set_source(
"tracedump._pt",
None,
sources=glob.glob("*.cpp"),
extra_comp... | true | true |
f7352e5c3be18f665058f5b27e82e15014db3389 | 2,589 | py | Python | tests/integration/models/test_plot.py | daledali/bokeh | c4f0debe7bd230d7e1aa8500716e8e997c04f528 | [
"BSD-3-Clause"
] | 1 | 2020-01-19T03:17:18.000Z | 2020-01-19T03:17:18.000Z | tests/integration/models/test_plot.py | daledali/bokeh | c4f0debe7bd230d7e1aa8500716e8e997c04f528 | [
"BSD-3-Clause"
] | 1 | 2021-05-12T10:14:45.000Z | 2021-05-12T10:14:45.000Z | tests/integration/models/test_plot.py | daledali/bokeh | c4f0debe7bd230d7e1aa8500716e8e997c04f528 | [
"BSD-3-Clause"
] | 1 | 2020-01-21T12:03:58.000Z | 2020-01-21T12:03:58.000Z | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2017, Anaconda, Inc. All rights reserved.
#
# Powered by the Bokeh Development Team.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#---------------------------------------------------... | 35.465753 | 115 | 0.471611 |
import pytest ; pytest
import time
from bokeh.layouts import column
from bokeh.models import Button, Plot, Range1d
pytest_plugins = (
"bokeh._testing.plugins.project",
)
@pytest.mark.integration
@pytest.mark.selenium
class Test_Plot(object):
def test_inner_dims_trigger_on_dynamic_add(s... | true | true |
f7352e5ed2807ab869f2492e923a8d360d62077b | 1,923 | py | Python | src/pygaps/api.py | pauliacomi/pyGAPS | c4d45b710e171c937471686437e382e05aec4ed5 | [
"MIT"
] | 35 | 2018-01-24T14:59:08.000Z | 2022-03-10T02:47:58.000Z | src/pygaps/api.py | pauliacomi/pyGAPS | c4d45b710e171c937471686437e382e05aec4ed5 | [
"MIT"
] | 29 | 2018-01-06T12:08:08.000Z | 2022-03-11T20:26:53.000Z | src/pygaps/api.py | pauliacomi/pyGAPS | c4d45b710e171c937471686437e382e05aec4ed5 | [
"MIT"
] | 20 | 2019-06-12T19:20:29.000Z | 2022-03-02T09:57:02.000Z | # pylint: disable=W0614,W0611,W0622
# flake8: noqa
# isort:skip_file
# Parsing
from .parsing.csv import isotherm_from_csv
from .parsing.csv import isotherm_to_csv
from .parsing.bel_dat import isotherm_from_bel
from .parsing.excel import isotherm_from_xl
from .parsing.excel import isotherm_to_xl
from .parsing.isodb imp... | 40.0625 | 71 | 0.870515 |
from .parsing.csv import isotherm_from_csv
from .parsing.csv import isotherm_to_csv
from .parsing.bel_dat import isotherm_from_bel
from .parsing.excel import isotherm_from_xl
from .parsing.excel import isotherm_to_xl
from .parsing.isodb import isotherm_from_isodb
from .parsing.json import isotherm_from_json
from .... | true | true |
f7352ebe72ee0f35ca69d07b451a58729d256f7a | 341 | py | Python | tests/test_api.py | mactov/dbclient | 563d077967fbc383e6c7c4cc6c92ec07b750db56 | [
"MIT"
] | null | null | null | tests/test_api.py | mactov/dbclient | 563d077967fbc383e6c7c4cc6c92ec07b750db56 | [
"MIT"
] | null | null | null | tests/test_api.py | mactov/dbclient | 563d077967fbc383e6c7c4cc6c92ec07b750db56 | [
"MIT"
] | null | null | null | import sys
import json
from urllib.request import urlopen
# sys.path.append('../')
# from api import *
SERVER_URL = 'http://localhost:5000/'
def test_get_servers():
url = SERVER_URL + 'servers'
response = urlopen(url).read()
assert response.decode("utf-8") == json.dumps([{"server": "localhost"}, {"serve... | 26.230769 | 104 | 0.665689 | import sys
import json
from urllib.request import urlopen
SERVER_URL = 'http://localhost:5000/'
def test_get_servers():
url = SERVER_URL + 'servers'
response = urlopen(url).read()
assert response.decode("utf-8") == json.dumps([{"server": "localhost"}, {"server": "db.ultech.fr"}]) | true | true |
f7353011ba3d02275f936e272ca49b67bdebd94d | 1,567 | py | Python | src/deeply/datasets/colonoscopy/cvc_clinic_db.py | achillesrasquinha/deeply | fd1ce32da130591fc92df8df89e07f1497b2b902 | [
"MIT"
] | 2 | 2021-10-05T16:37:30.000Z | 2021-10-11T21:31:43.000Z | src/deeply/datasets/colonoscopy/cvc_clinic_db.py | achillesrasquinha/deeply | fd1ce32da130591fc92df8df89e07f1497b2b902 | [
"MIT"
] | null | null | null | src/deeply/datasets/colonoscopy/cvc_clinic_db.py | achillesrasquinha/deeply | fd1ce32da130591fc92df8df89e07f1497b2b902 | [
"MIT"
] | 1 | 2021-07-16T02:23:37.000Z | 2021-07-16T02:23:37.000Z | from deeply.datasets.util import image_mask
from tensorflow_datasets.core import (
Version,
GeneratorBasedBuilder
)
_DATASET_HOMEPAGE = "https://polyp.grand-challenge.org/CVCClinicDB/"
_DATASET_KAGGLE = "achillesrasquinha/cvcclinicdb"
_DATASET_DESCRIPTION = """
CVC-ClinicDB is a database of frames ext... | 41.236842 | 290 | 0.698787 | from deeply.datasets.util import image_mask
from tensorflow_datasets.core import (
Version,
GeneratorBasedBuilder
)
_DATASET_HOMEPAGE = "https://polyp.grand-challenge.org/CVCClinicDB/"
_DATASET_KAGGLE = "achillesrasquinha/cvcclinicdb"
_DATASET_DESCRIPTION = """
CVC-ClinicDB is a database of frames ext... | true | true |
f7353179c26a30dba2f3619c510d8718c113c632 | 1,818 | py | Python | openstates/openstates-master/openstates/vt/events.py | Jgorsick/Advocacy_Angular | 8906af3ba729b2303880f319d52bce0d6595764c | [
"CC-BY-4.0"
] | null | null | null | openstates/openstates-master/openstates/vt/events.py | Jgorsick/Advocacy_Angular | 8906af3ba729b2303880f319d52bce0d6595764c | [
"CC-BY-4.0"
] | null | null | null | openstates/openstates-master/openstates/vt/events.py | Jgorsick/Advocacy_Angular | 8906af3ba729b2303880f319d52bce0d6595764c | [
"CC-BY-4.0"
] | null | null | null | import datetime
import json
from billy.scrape.events import Event, EventScraper
class VTEventScraper(EventScraper):
jurisdiction = 'vt'
def scrape(self, session, chambers):
year_slug = session[5: ]
url = 'http://legislature.vermont.gov/committee/loadAllMeetings/{}'.\
format(y... | 34.961538 | 90 | 0.451595 | import datetime
import json
from billy.scrape.events import Event, EventScraper
class VTEventScraper(EventScraper):
jurisdiction = 'vt'
def scrape(self, session, chambers):
year_slug = session[5: ]
url = 'http://legislature.vermont.gov/committee/loadAllMeetings/{}'.\
format(y... | true | true |
f735342134d7488b304766946a5de2b5f09621a4 | 3,373 | py | Python | inscrawler/browser.py | ckyeungac/instagram-crawler | 0e6a96665074b18a67a311592b9a6acc88419a02 | [
"MIT"
] | null | null | null | inscrawler/browser.py | ckyeungac/instagram-crawler | 0e6a96665074b18a67a311592b9a6acc88419a02 | [
"MIT"
] | null | null | null | inscrawler/browser.py | ckyeungac/instagram-crawler | 0e6a96665074b18a67a311592b9a6acc88419a02 | [
"MIT"
] | null | null | null | import os
from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
from selenium.common.exceptions import TimeoutException
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as ... | 32.432692 | 88 | 0.653721 | import os
from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
from selenium.common.exceptions import TimeoutException
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as ... | true | true |
f73534a1c859d9f63f8135ec14770d5c8d99854e | 26,217 | py | Python | python_modules/dagster/dagster_tests/core_tests/definitions_tests/test_composition.py | rpatil524/dagster | 6f918d94cbd543ab752ab484a65e3a40fd441716 | [
"Apache-2.0"
] | 4,606 | 2018-06-21T17:45:20.000Z | 2022-03-31T23:39:42.000Z | python_modules/dagster/dagster_tests/core_tests/definitions_tests/test_composition.py | rpatil524/dagster | 6f918d94cbd543ab752ab484a65e3a40fd441716 | [
"Apache-2.0"
] | 6,221 | 2018-06-12T04:36:01.000Z | 2022-03-31T21:43:05.000Z | python_modules/dagster/dagster_tests/core_tests/definitions_tests/test_composition.py | rpatil524/dagster | 6f918d94cbd543ab752ab484a65e3a40fd441716 | [
"Apache-2.0"
] | 619 | 2018-08-22T22:43:09.000Z | 2022-03-31T22:48:06.000Z | import pytest
from dagster import (
DependencyDefinition,
InputDefinition,
Int,
Nothing,
Output,
OutputDefinition,
PipelineDefinition,
SolidDefinition,
composite_solid,
execute_pipeline,
lambda_solid,
pipeline,
solid,
)
from dagster.core.definitions.decorators.hook im... | 26.269539 | 109 | 0.634283 | import pytest
from dagster import (
DependencyDefinition,
InputDefinition,
Int,
Nothing,
Output,
OutputDefinition,
PipelineDefinition,
SolidDefinition,
composite_solid,
execute_pipeline,
lambda_solid,
pipeline,
solid,
)
from dagster.core.definitions.decorators.hook im... | true | true |
f73534df9f2ba66521a9f589baa13f113875fad2 | 5,388 | py | Python | python/GafferSceneUI/StandardAttributesUI.py | ivanimanishi/gaffer | 7cfd79d2f20c25ed1d680730de9d6a2ee356dd4c | [
"BSD-3-Clause"
] | 1 | 2019-08-02T16:49:59.000Z | 2019-08-02T16:49:59.000Z | python/GafferSceneUI/StandardAttributesUI.py | rkoschmitzky/gaffer | ec6262ae1292767bdeb9520d1447d65a4a511884 | [
"BSD-3-Clause"
] | 2 | 2017-08-23T21:35:45.000Z | 2018-01-29T08:59:33.000Z | python/GafferSceneUI/StandardAttributesUI.py | rkoschmitzky/gaffer | ec6262ae1292767bdeb9520d1447d65a4a511884 | [
"BSD-3-Clause"
] | null | null | null | ##########################################################################
#
# Copyright (c) 2013, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistrib... | 27.773196 | 94 | 0.677988 | true | true | |
f73536fcb4da1724c15b621e8988c68c0fcb521b | 584 | py | Python | tests/mongodb/iaas_classic_queries/__init__.py | ericmharris/gc3-query | 0bf5226130aafbb1974aeb96d93ee1996833e87d | [
"MIT"
] | null | null | null | tests/mongodb/iaas_classic_queries/__init__.py | ericmharris/gc3-query | 0bf5226130aafbb1974aeb96d93ee1996833e87d | [
"MIT"
] | null | null | null | tests/mongodb/iaas_classic_queries/__init__.py | ericmharris/gc3-query | 0bf5226130aafbb1974aeb96d93ee1996833e87d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
gc3-query.__init__.py [9/13/2018 4:01 PM]
~~~~~~~~~~~~~~~~
<DESCR SHORT>
<DESCR>
"""
################################################################################
## Standard Library Imports
import sys, os
###########################################################################... | 24.333333 | 80 | 0.390411 | true | true | |
f73538c9403eee04afb92dcc25ce6047daa55b6c | 401 | py | Python | juniorPython/wsgi.py | CatOnDrugs/junior-test | 7809d4726b7b39d5c0a69addc56aaf1e81d26bd7 | [
"MIT"
] | null | null | null | juniorPython/wsgi.py | CatOnDrugs/junior-test | 7809d4726b7b39d5c0a69addc56aaf1e81d26bd7 | [
"MIT"
] | null | null | null | juniorPython/wsgi.py | CatOnDrugs/junior-test | 7809d4726b7b39d5c0a69addc56aaf1e81d26bd7 | [
"MIT"
] | null | null | null | """
WSGI config for juniorPython project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_... | 23.588235 | 78 | 0.790524 |
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'juniorPython.settings')
application = get_wsgi_application()
| true | true |
f73538f392b87985cef5c7a55ef0b6d5f0b2f365 | 3,837 | py | Python | slackbot.py | nathants/py-slackbot | bc119e64ad1ca2fd74e128379f40e968f74f1f68 | [
"MIT"
] | 1 | 2018-06-05T20:22:37.000Z | 2018-06-05T20:22:37.000Z | slackbot.py | nathants/slackbot | bc119e64ad1ca2fd74e128379f40e968f74f1f68 | [
"MIT"
] | null | null | null | slackbot.py | nathants/slackbot | bc119e64ad1ca2fd74e128379f40e968f74f1f68 | [
"MIT"
] | null | null | null | import json
import inspect
import requests
import os
import boto3
from urllib import parse
ASYNC = 'async'
token = None
slash_handlers = []
event_handlers = []
def slash(command, conditional=lambda text: True):
def fn(f):
slash_handlers.append([conditional, command, f, None])
return f
return f... | 39.153061 | 124 | 0.565807 | import json
import inspect
import requests
import os
import boto3
from urllib import parse
ASYNC = 'async'
token = None
slash_handlers = []
event_handlers = []
def slash(command, conditional=lambda text: True):
def fn(f):
slash_handlers.append([conditional, command, f, None])
return f
return f... | true | true |
f7353949672667f55d93782fdb8c769b8e8a0a9f | 1,825 | py | Python | 1058 Minimize Rounding Error to Meet Target.py | krishna13052001/LeetCode | cd6ec626bea61f0bd9e8493622074f9e69a7a1c3 | [
"MIT"
] | 872 | 2015-06-15T12:02:41.000Z | 2022-03-30T08:44:35.000Z | 1058 Minimize Rounding Error to Meet Target.py | nadeemshaikh-github/LeetCode | 3fb14aeea62a960442e47dfde9f964c7ffce32be | [
"MIT"
] | 8 | 2015-06-21T15:11:59.000Z | 2022-02-01T11:22:34.000Z | 1058 Minimize Rounding Error to Meet Target.py | nadeemshaikh-github/LeetCode | 3fb14aeea62a960442e47dfde9f964c7ffce32be | [
"MIT"
] | 328 | 2015-06-28T03:10:35.000Z | 2022-03-29T11:05:28.000Z | #!/usr/bin/python3
"""
Given an array of prices [p1,p2...,pn] and a target, round each price pi to
Roundi(pi) so that the rounded array [Round1(p1),Round2(p2)...,Roundn(pn)] sums
to the given target. Each operation Roundi(pi) could be either Floor(pi) or
Ceil(pi).
Return the string "-1" if the rounded array is impossi... | 26.449275 | 80 | 0.595068 |
from typing import List
import math
class Solution:
def minimizeError(self, prices: List[str], target: int) -> str:
A = list(map(float, prices))
f_sum = sum(map(math.floor, A))
c_sum = sum(map(math.ceil, A))
if not f_sum <= target <= c_sum:
return "-1"
errors ... | true | true |
f735397fbd14352f66bbaf093f10830ab1a84343 | 568 | py | Python | it/structures/python2/default_naming-default/upper_camel.py | reproto/reproto | 92f0a4b258095bc2f8a394d0bd44209e3a599c4f | [
"Apache-2.0",
"MIT"
] | 108 | 2017-07-19T02:07:52.000Z | 2022-02-27T04:46:43.000Z | it/structures/python2/default_naming-default/upper_camel.py | reproto/reproto | 92f0a4b258095bc2f8a394d0bd44209e3a599c4f | [
"Apache-2.0",
"MIT"
] | 42 | 2017-11-21T14:21:40.000Z | 2022-02-26T02:40:38.000Z | it/structures/python2/default_naming-default/upper_camel.py | reproto/reproto | 92f0a4b258095bc2f8a394d0bd44209e3a599c4f | [
"Apache-2.0",
"MIT"
] | 9 | 2017-05-26T00:36:23.000Z | 2020-07-26T10:58:20.000Z | class Value:
def __init__(self, _foo_bar):
self._foo_bar = _foo_bar
@property
def foo_bar(self):
return self._foo_bar
@staticmethod
def decode(data):
f_foo_bar = data["FooBar"]
if not isinstance(f_foo_bar, unicode):
raise Exception("not a string")
return Value(f_foo_bar)
def e... | 18.322581 | 55 | 0.65669 | class Value:
def __init__(self, _foo_bar):
self._foo_bar = _foo_bar
@property
def foo_bar(self):
return self._foo_bar
@staticmethod
def decode(data):
f_foo_bar = data["FooBar"]
if not isinstance(f_foo_bar, unicode):
raise Exception("not a string")
return Value(f_foo_bar)
def e... | true | true |
f7353987a2cc31674fe6a25a13e88a388043f92b | 361 | py | Python | eng_zap_challenge_python/__init__.py | glairtonsantos/eng-zap-challenge-python | abb6c8399f46360759d0256e4b02e35b010e28cb | [
"MIT"
] | null | null | null | eng_zap_challenge_python/__init__.py | glairtonsantos/eng-zap-challenge-python | abb6c8399f46360759d0256e4b02e35b010e28cb | [
"MIT"
] | null | null | null | eng_zap_challenge_python/__init__.py | glairtonsantos/eng-zap-challenge-python | abb6c8399f46360759d0256e4b02e35b010e28cb | [
"MIT"
] | null | null | null | from flask import Blueprint
from flask_api import FlaskAPI
URL_SOURCE = "http://grupozap-code-challenge.s3-website-us-east-1.amazonaws.com/sources/source-2.json"
blueprint = Blueprint("eng_zap_challenge_python", __name__)
def create_app(config="dev"):
app = FlaskAPI(__name__)
app.register_blueprint(bluepri... | 21.235294 | 102 | 0.767313 | from flask import Blueprint
from flask_api import FlaskAPI
URL_SOURCE = "http://grupozap-code-challenge.s3-website-us-east-1.amazonaws.com/sources/source-2.json"
blueprint = Blueprint("eng_zap_challenge_python", __name__)
def create_app(config="dev"):
app = FlaskAPI(__name__)
app.register_blueprint(bluepri... | true | true |
f7353a11b7f361e2146209f56e09a13f1d5f5fd1 | 11,293 | py | Python | signature/train_and_sample.py | joelnmdyer/SignatuRE | 085a9d727e504bd25bbebdebaa58867211a52c8d | [
"MIT"
] | null | null | null | signature/train_and_sample.py | joelnmdyer/SignatuRE | 085a9d727e504bd25bbebdebaa58867211a52c8d | [
"MIT"
] | null | null | null | signature/train_and_sample.py | joelnmdyer/SignatuRE | 085a9d727e504bd25bbebdebaa58867211a52c8d | [
"MIT"
] | null | null | null | import argparse
import logging
import numpy as np
import os
import sbi.utils as utils
from sbi.inference.base import infer
from sbi import analysis as analysis
from sbi.inference import SMCABC, SNRE_A, simulate_for_sbi, prepare_for_sbi
from sklearn.linear_model import LinearRegression
import statsmodels.api as sm
impor... | 32.828488 | 100 | 0.678031 | import argparse
import logging
import numpy as np
import os
import sbi.utils as utils
from sbi.inference.base import infer
from sbi import analysis as analysis
from sbi.inference import SMCABC, SNRE_A, simulate_for_sbi, prepare_for_sbi
from sklearn.linear_model import LinearRegression
import statsmodels.api as sm
impor... | true | true |
f7353a4eac24e4d700095336f302749cabe5524d | 38,530 | py | Python | raiden/api/python.py | offerm/raiden | 7a79026af70830bbbed44d73035f9a274e41c6a3 | [
"MIT"
] | null | null | null | raiden/api/python.py | offerm/raiden | 7a79026af70830bbbed44d73035f9a274e41c6a3 | [
"MIT"
] | 1 | 2018-06-18T13:06:00.000Z | 2018-06-18T13:06:00.000Z | raiden/api/python.py | offerm/raiden | 7a79026af70830bbbed44d73035f9a274e41c6a3 | [
"MIT"
] | 1 | 2017-06-09T19:27:11.000Z | 2017-06-09T19:27:11.000Z | import gevent
import structlog
from eth_utils import is_binary_address, is_hex, to_bytes, to_checksum_address
from gevent import Greenlet
import raiden.blockchain.events as blockchain_events
from raiden import waiting
from raiden.constants import (
GENESIS_BLOCK_NUMBER,
RED_EYES_PER_TOKEN_NETWORK_LIMIT,
SE... | 39.156504 | 99 | 0.666883 | import gevent
import structlog
from eth_utils import is_binary_address, is_hex, to_bytes, to_checksum_address
from gevent import Greenlet
import raiden.blockchain.events as blockchain_events
from raiden import waiting
from raiden.constants import (
GENESIS_BLOCK_NUMBER,
RED_EYES_PER_TOKEN_NETWORK_LIMIT,
SE... | true | true |
f7353cbc9ecc587e0e536617fab6c6017f0846af | 284,994 | py | Python | src/sage/combinat/partition.py | UCD4IDS/sage | 43474c96d533fd396fe29fe0782d44dc7f5164f7 | [
"BSL-1.0"
] | null | null | null | src/sage/combinat/partition.py | UCD4IDS/sage | 43474c96d533fd396fe29fe0782d44dc7f5164f7 | [
"BSL-1.0"
] | null | null | null | src/sage/combinat/partition.py | UCD4IDS/sage | 43474c96d533fd396fe29fe0782d44dc7f5164f7 | [
"BSL-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
r"""
Integer partitions
A partition `p` of a nonnegative integer `n` is a
non-increasing list of positive integers (the *parts* of the
partition) with total sum `n`.
A partition can be depicted by a diagram made of rows of cells,
where the number of cells in the `i^{th}` row starting from
the ... | 32.166366 | 355 | 0.506474 |
from copy import copy
from itertools import accumulate
from sage.libs.pari.all import pari
from sage.libs.flint.arith import number_of_partitions as flint_number_of_partitions
from sage.arith.misc import multinomial
from sage.structure.global_options import GlobalOptions
from sage.structure.parent import Pare... | true | true |
f7353d57ed779b909a1a402da5c8468d9d06e232 | 10,621 | py | Python | pySDC/playgrounds/fft/AllenCahn_contracting_circle_FFT.py | tlunet/pySDC | 6ab2390d017aad7e503df5c978bc3d217ac8b375 | [
"BSD-2-Clause"
] | null | null | null | pySDC/playgrounds/fft/AllenCahn_contracting_circle_FFT.py | tlunet/pySDC | 6ab2390d017aad7e503df5c978bc3d217ac8b375 | [
"BSD-2-Clause"
] | 1 | 2021-08-12T08:34:19.000Z | 2021-08-12T08:34:19.000Z | pySDC/playgrounds/fft/AllenCahn_contracting_circle_FFT.py | MichaelFlec/pySDC | 209e0015a46f861e3658691b7f8724cb1b36c97e | [
"BSD-2-Clause"
] | null | null | null | import os
import dill
import matplotlib.ticker as ticker
import numpy as np
import pySDC.helpers.plot_helper as plt_helper
from pySDC.helpers.stats_helper import filter_stats, sort_stats
from pySDC.implementations.collocation_classes.gauss_radau_right import CollGaussRadau_Right
from pySDC.implementations.controller_... | 35.521739 | 116 | 0.668487 | import os
import dill
import matplotlib.ticker as ticker
import numpy as np
import pySDC.helpers.plot_helper as plt_helper
from pySDC.helpers.stats_helper import filter_stats, sort_stats
from pySDC.implementations.collocation_classes.gauss_radau_right import CollGaussRadau_Right
from pySDC.implementations.controller_... | true | true |
f7353ea7e493eeeb862ebf58a5aff1da7c7bd374 | 221 | py | Python | tests/test_count_customer_states.py | swimmio/sqlalchemy_swimm | d24accb7792743cf586bd7062531d108e7063eba | [
"MIT"
] | null | null | null | tests/test_count_customer_states.py | swimmio/sqlalchemy_swimm | d24accb7792743cf586bd7062531d108e7063eba | [
"MIT"
] | null | null | null | tests/test_count_customer_states.py | swimmio/sqlalchemy_swimm | d24accb7792743cf586bd7062531d108e7063eba | [
"MIT"
] | null | null | null | from src import count_customer_states
EXPECTED_RESULT = 11
def test_count_customer_countries() -> None:
tested_result = count_customer_states.count_usa_customer_states()
assert tested_result == EXPECTED_RESULT
| 24.555556 | 69 | 0.81448 | from src import count_customer_states
EXPECTED_RESULT = 11
def test_count_customer_countries() -> None:
tested_result = count_customer_states.count_usa_customer_states()
assert tested_result == EXPECTED_RESULT
| true | true |
f7353f1950961d00565d9273f846e64aea7c3397 | 2,123 | py | Python | mean_teacher/losses.py | Shuai-Xie/LP-DeepSSL | 9389c6cb0b83c7ca509ce284c4d86b600ca44a9b | [
"MIT"
] | null | null | null | mean_teacher/losses.py | Shuai-Xie/LP-DeepSSL | 9389c6cb0b83c7ca509ce284c4d86b600ca44a9b | [
"MIT"
] | null | null | null | mean_teacher/losses.py | Shuai-Xie/LP-DeepSSL | 9389c6cb0b83c7ca509ce284c4d86b600ca44a9b | [
"MIT"
] | null | null | null | # Copyright (c) 2018, Curious AI Ltd. All rights reserved.
#
# This work is licensed under the Creative Commons Attribution-NonCommercial
# 4.0 International License. To view a copy of this license, visit
# http://creativecommons.org/licenses/by-nc/4.0/ or send a letter to
# Creative Commons, PO Box 1866, Mountain View... | 37.910714 | 88 | 0.724447 |
import torch
from torch.nn import functional as F
from torch.autograd import Variable
import pdb
import numpy as np
def softmax_mse_loss(input_logits, target_logits):
assert input_logits.size() == target_logits.size()
input_softmax = F.softmax(input_logits, dim=1)
target_softmax = F.softmax(target_... | true | true |
f73540fbb20d57168fcef3aa827ceeb19cea2e10 | 274 | py | Python | tests/artificial/transf_Quantization/trend_ConstantTrend/cycle_0/ar_12/test_artificial_1024_Quantization_ConstantTrend_0_12_100.py | shaido987/pyaf | b9afd089557bed6b90b246d3712c481ae26a1957 | [
"BSD-3-Clause"
] | 377 | 2016-10-13T20:52:44.000Z | 2022-03-29T18:04:14.000Z | tests/artificial/transf_Quantization/trend_ConstantTrend/cycle_0/ar_12/test_artificial_1024_Quantization_ConstantTrend_0_12_100.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 160 | 2016-10-13T16:11:53.000Z | 2022-03-28T04:21:34.000Z | tests/artificial/transf_Quantization/trend_ConstantTrend/cycle_0/ar_12/test_artificial_1024_Quantization_ConstantTrend_0_12_100.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 63 | 2017-03-09T14:51:18.000Z | 2022-03-27T20:52:57.000Z | import pyaf.Bench.TS_datasets as tsds
import tests.artificial.process_artificial_dataset as art
art.process_dataset(N = 1024 , FREQ = 'D', seed = 0, trendtype = "ConstantTrend", cycle_length = 0, transform = "Quantization", sigma = 0.0, exog_count = 100, ar_order = 12); | 39.142857 | 174 | 0.740876 | import pyaf.Bench.TS_datasets as tsds
import tests.artificial.process_artificial_dataset as art
art.process_dataset(N = 1024 , FREQ = 'D', seed = 0, trendtype = "ConstantTrend", cycle_length = 0, transform = "Quantization", sigma = 0.0, exog_count = 100, ar_order = 12); | true | true |
f7354106e2d6bdd10705f670903f39a818fd47a7 | 21,065 | py | Python | dcov/violationsreporters/violations_reporter.py | xiak/dcov | 27d31e90602dc7fff9ddd32b8f42837505467d4b | [
"Apache-2.0"
] | null | null | null | dcov/violationsreporters/violations_reporter.py | xiak/dcov | 27d31e90602dc7fff9ddd32b8f42837505467d4b | [
"Apache-2.0"
] | null | null | null | dcov/violationsreporters/violations_reporter.py | xiak/dcov | 27d31e90602dc7fff9ddd32b8f42837505467d4b | [
"Apache-2.0"
] | null | null | null | """
Classes for querying the information in a test coverage report.
"""
from email import message
import itertools
import os
import os.path
import re
from collections import defaultdict
from dcov import util
from dcov.command_runner import run_command_for_code
from dcov.git_path import GitPathTool
from dcov.violation... | 36.008547 | 121 | 0.545122 |
from email import message
import itertools
import os
import os.path
import re
from collections import defaultdict
from dcov import util
from dcov.command_runner import run_command_for_code
from dcov.git_path import GitPathTool
from dcov.violationsreporters.base import (
BaseViolationReporter,
QualityDriver,
... | true | true |
f73541760bd6157c3712cb267058bb14357a3c2c | 16,112 | py | Python | angr/analyses/cfg/indirect_jump_resolvers/jumptable.py | macdaliot/angr | bda03546af86e072aa7c92f6e3e520d0f5418590 | [
"BSD-2-Clause"
] | 1 | 2021-07-07T11:18:34.000Z | 2021-07-07T11:18:34.000Z | angr/analyses/cfg/indirect_jump_resolvers/jumptable.py | macdaliot/angr | bda03546af86e072aa7c92f6e3e520d0f5418590 | [
"BSD-2-Clause"
] | null | null | null | angr/analyses/cfg/indirect_jump_resolvers/jumptable.py | macdaliot/angr | bda03546af86e072aa7c92f6e3e520d0f5418590 | [
"BSD-2-Clause"
] | null | null | null |
import logging
from collections import defaultdict
import pyvex
from ....errors import AngrError, SimError
from ....blade import Blade
from ....annocfg import AnnotatedCFG
from .... import sim_options as o
from .... import BP, BP_BEFORE
from ....surveyors import Slicecutor
from .resolver import IndirectJumpResolver
... | 40.893401 | 123 | 0.580127 |
import logging
from collections import defaultdict
import pyvex
from ....errors import AngrError, SimError
from ....blade import Blade
from ....annocfg import AnnotatedCFG
from .... import sim_options as o
from .... import BP, BP_BEFORE
from ....surveyors import Slicecutor
from .resolver import IndirectJumpResolver
... | false | true |
f73541ae61d95278a0ad1bb2699e87d355c14c54 | 6,499 | py | Python | ros/src/tl_detector/tl_detector.py | balrajmarimuthu/CarND-Capstone | bc3e52c5e940e3da51efad219ab89fb3580fb717 | [
"MIT"
] | null | null | null | ros/src/tl_detector/tl_detector.py | balrajmarimuthu/CarND-Capstone | bc3e52c5e940e3da51efad219ab89fb3580fb717 | [
"MIT"
] | null | null | null | ros/src/tl_detector/tl_detector.py | balrajmarimuthu/CarND-Capstone | bc3e52c5e940e3da51efad219ab89fb3580fb717 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import rospy
from std_msgs.msg import Int32
from geometry_msgs.msg import PoseStamped, Pose
from styx_msgs.msg import TrafficLightArray, TrafficLight
from styx_msgs.msg import Lane
from sensor_msgs.msg import Image
from cv_bridge import CvBridge
from light_classification.tl_classifier import TLCla... | 35.513661 | 111 | 0.637329 |
import rospy
from std_msgs.msg import Int32
from geometry_msgs.msg import PoseStamped, Pose
from styx_msgs.msg import TrafficLightArray, TrafficLight
from styx_msgs.msg import Lane
from sensor_msgs.msg import Image
from cv_bridge import CvBridge
from light_classification.tl_classifier import TLClassifier
import tf
imp... | true | true |
f73542726d21cf0df047613ca0890b579620009b | 2,325 | py | Python | compute_distance_and_align/align_strings.py | alyonavyshnevska/dynamic_programming_levenshtein_distance | e8ecd72ebbee7b3e59977a1a684b5e3ecd9bb930 | [
"MIT"
] | null | null | null | compute_distance_and_align/align_strings.py | alyonavyshnevska/dynamic_programming_levenshtein_distance | e8ecd72ebbee7b3e59977a1a684b5e3ecd9bb930 | [
"MIT"
] | null | null | null | compute_distance_and_align/align_strings.py | alyonavyshnevska/dynamic_programming_levenshtein_distance | e8ecd72ebbee7b3e59977a1a684b5e3ecd9bb930 | [
"MIT"
] | null | null | null | import compute_distance_and_align.compute_levenshtein_distance as compute_dist
def align_strings(seq1, seq2):
'''
Calculates minimum edit distance between str1 and str2
and saves backpointers to retrieve the allignments
:param srt seq1: from this s®tring
:param srt seq2: into this string
:ret... | 29.43038 | 97 | 0.554409 | import compute_distance_and_align.compute_levenshtein_distance as compute_dist
def align_strings(seq1, seq2):
distance = 0
alignment = ""
if len(seq1) == 0 and len(seq2) == 0:
return distance, (alignment, alignment)
elif len(seq1) == 0:
distance = len(seq2)
alignment = seq2.up... | true | true |
f7354626844df5082680fdf972d139d4511fe5ec | 2,046 | py | Python | graphgallery/gallery/nodeclas/tensorflow/densegcn.py | TobiasSchmidtDE/GraphGallery | e627e4f454e0ce3813171305a524f5190a6e6f45 | [
"MIT"
] | null | null | null | graphgallery/gallery/nodeclas/tensorflow/densegcn.py | TobiasSchmidtDE/GraphGallery | e627e4f454e0ce3813171305a524f5190a6e6f45 | [
"MIT"
] | null | null | null | graphgallery/gallery/nodeclas/tensorflow/densegcn.py | TobiasSchmidtDE/GraphGallery | e627e4f454e0ce3813171305a524f5190a6e6f45 | [
"MIT"
] | null | null | null | from graphgallery.sequence import FullBatchSequence
from graphgallery import functional as gf
from graphgallery.gallery.nodeclas import TensorFlow
from graphgallery.gallery import Trainer
from graphgallery.nn.models import get_model
@TensorFlow.register()
class DenseGCN(Trainer):
"""
Implementation of Den... | 34.677966 | 111 | 0.567449 | from graphgallery.sequence import FullBatchSequence
from graphgallery import functional as gf
from graphgallery.gallery.nodeclas import TensorFlow
from graphgallery.gallery import Trainer
from graphgallery.nn.models import get_model
@TensorFlow.register()
class DenseGCN(Trainer):
def data_step(self,
... | true | true |
f7354732fe2c9f7afd7eb1aed50431d427735d45 | 10,818 | py | Python | gimmemotifs/prediction.py | JGASmits/gimmemotifs | 16d82004d62c22d67c2a2e01493b07ad4a62ef1e | [
"MIT"
] | null | null | null | gimmemotifs/prediction.py | JGASmits/gimmemotifs | 16d82004d62c22d67c2a2e01493b07ad4a62ef1e | [
"MIT"
] | null | null | null | gimmemotifs/prediction.py | JGASmits/gimmemotifs | 16d82004d62c22d67c2a2e01493b07ad4a62ef1e | [
"MIT"
] | null | null | null | # Copyright (c) 2009-2019 Simon van Heeringen <simon.vanheeringen@gmail.com>
#
# This module is free software. You can redistribute it and/or modify it under
# the terms of the MIT License, see the file COPYING included with this
# distribution.
"""Parallel prediction of sequence motifs """
# Python imports
import sys... | 28.171875 | 89 | 0.547513 |
import sys
import logging
try:
import _thread as thread
except ImportError:
import thread
from time import sleep
import inspect
from multiprocessing import Pool
from gimmemotifs import tools as tool_classes
from gimmemotifs.config import MotifConfig, parse_denovo_params
from gimmemotifs.fasta import F... | true | true |
f735474b231ea9c8e5dc166f22a06f796ec61d52 | 15,525 | py | Python | xayagametest/testcase.py | spaceexpanse/libxgame | f604e81d152d8c697846a3a01278e5305a4d6d3e | [
"MIT"
] | null | null | null | xayagametest/testcase.py | spaceexpanse/libxgame | f604e81d152d8c697846a3a01278e5305a4d6d3e | [
"MIT"
] | null | null | null | xayagametest/testcase.py | spaceexpanse/libxgame | f604e81d152d8c697846a3a01278e5305a4d6d3e | [
"MIT"
] | null | null | null | # Copyright (C) 2018-2021 The Xaya developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""
Basic framework for integration tests of Xaya games.
"""
from . import game
from . import premine
from . import xaya
import argpar... | 31.813525 | 80 | 0.645926 |
from . import game
from . import premine
from . import xaya
import argparse
from contextlib import contextmanager
import json
import logging
import os.path
import random
import re
import shlex
import shutil
import sys
import time
from jsonrpclib import ProtocolError
XAYAD_BINARY_DEFAULT = "/usr/local/bin/xayad... | true | true |
f735494d76e89eea633a6cb6df06dbff18c83820 | 410 | py | Python | trinity/nodes/events.py | C4Coin/py-fhm-evm | 0892d5f40b6a346eb4e60b2dd2f712f9226e6888 | [
"MIT"
] | 2 | 2020-01-30T21:51:00.000Z | 2020-07-22T14:51:05.000Z | trinity/nodes/events.py | C4Coin/py-fhm-evm | 0892d5f40b6a346eb4e60b2dd2f712f9226e6888 | [
"MIT"
] | null | null | null | trinity/nodes/events.py | C4Coin/py-fhm-evm | 0892d5f40b6a346eb4e60b2dd2f712f9226e6888 | [
"MIT"
] | 2 | 2019-09-05T01:31:56.000Z | 2019-09-17T09:09:16.000Z | from typing import (
Type,
)
from lahja import (
BaseEvent,
BaseRequestResponseEvent,
)
class NetworkIdResponse(BaseEvent):
def __init__(self, network_id: int) -> None:
self.network_id = network_id
class NetworkIdRequest(BaseRequestResponseEvent[NetworkIdResponse]):
@staticmethod
... | 18.636364 | 68 | 0.726829 | from typing import (
Type,
)
from lahja import (
BaseEvent,
BaseRequestResponseEvent,
)
class NetworkIdResponse(BaseEvent):
def __init__(self, network_id: int) -> None:
self.network_id = network_id
class NetworkIdRequest(BaseRequestResponseEvent[NetworkIdResponse]):
@staticmethod
... | true | true |
f735499a53c6056424be38df56808e21b45eaacb | 558 | py | Python | project/delibere/migrations/0028_auto_20170615_2245.py | guglielmo/mosic2-db-delibere | a7c92adf42ad53023af47776c32baa2ee525f5e9 | [
"BSD-3-Clause"
] | null | null | null | project/delibere/migrations/0028_auto_20170615_2245.py | guglielmo/mosic2-db-delibere | a7c92adf42ad53023af47776c32baa2ee525f5e9 | [
"BSD-3-Clause"
] | null | null | null | project/delibere/migrations/0028_auto_20170615_2245.py | guglielmo/mosic2-db-delibere | a7c92adf42ad53023af47776c32baa2ee525f5e9 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2017-06-15 22:45
from __future__ import unicode_literals
from django.db import migrations
from delibere.models import Settore
# this migration rebuilds the tree object
# into the mptt representation, after migrating
# from a flat table
def rebuild_objects(apps,... | 22.32 | 48 | 0.722222 |
from __future__ import unicode_literals
from django.db import migrations
from delibere.models import Settore
def rebuild_objects(apps, schema_editor):
Settore.objects.rebuild()
class Migration(migrations.Migration):
dependencies = [
('delibere', '0027_auto_20170615_2238'),
]
operatio... | true | true |
f73549cbedd9934db449c55fc52dc5f5d985dc0d | 5,388 | py | Python | coffee_machine/main.py | PratyushPriyam/Python_Projects | d97785464921ce24d2665360ec023b51dd26318b | [
"MIT"
] | null | null | null | coffee_machine/main.py | PratyushPriyam/Python_Projects | d97785464921ce24d2665360ec023b51dd26318b | [
"MIT"
] | null | null | null | coffee_machine/main.py | PratyushPriyam/Python_Projects | d97785464921ce24d2665360ec023b51dd26318b | [
"MIT"
] | null | null | null | from Utilities import MENU, resources
from art import logo
print(logo)
shop_open_and_ingredients_available = True
pay = 0
Water = resources["water"]
Milk = resources["milk"]
Coffee = resources["coffee"]
espresso_water = MENU["espresso"]["ingredients"]["water"]
espresso_coffee = MENU["espresso"]["ingredie... | 43.804878 | 99 | 0.617483 | from Utilities import MENU, resources
from art import logo
print(logo)
shop_open_and_ingredients_available = True
pay = 0
Water = resources["water"]
Milk = resources["milk"]
Coffee = resources["coffee"]
espresso_water = MENU["espresso"]["ingredients"]["water"]
espresso_coffee = MENU["espresso"]["ingredie... | true | true |
f73549dbc37500831c326b4af09cfc79c275f5f1 | 6,494 | py | Python | src/transformers/adapters/models/distilbert.py | uunal/adapter-transformers | 73a95a75f803e8fd243fc3d55ff3a9d557891377 | [
"Apache-2.0"
] | 723 | 2020-07-16T13:02:25.000Z | 2022-03-31T21:03:55.000Z | src/transformers/adapters/models/distilbert.py | uunal/adapter-transformers | 73a95a75f803e8fd243fc3d55ff3a9d557891377 | [
"Apache-2.0"
] | 170 | 2020-07-16T14:39:11.000Z | 2022-03-31T13:02:11.000Z | src/transformers/adapters/models/distilbert.py | uunal/adapter-transformers | 73a95a75f803e8fd243fc3d55ff3a9d557891377 | [
"Apache-2.0"
] | 131 | 2020-07-16T14:38:16.000Z | 2022-03-29T19:43:18.000Z | from typing import Union
import torch
from torch import nn
from ..composition import AdapterCompositionBlock, parse_composition
from ..model_mixin import InvertibleAdaptersMixin, ModelAdaptersMixin
from .bert import BertEncoderAdaptersMixin, BertModelHeadsMixin, BertOutputAdaptersMixin, BertSelfOutputAdaptersMixin
... | 41.363057 | 117 | 0.721743 | from typing import Union
import torch
from torch import nn
from ..composition import AdapterCompositionBlock, parse_composition
from ..model_mixin import InvertibleAdaptersMixin, ModelAdaptersMixin
from .bert import BertEncoderAdaptersMixin, BertModelHeadsMixin, BertOutputAdaptersMixin, BertSelfOutputAdaptersMixin
... | true | true |
f7354a089df3bea548928bfa626d5ec386918849 | 12,938 | py | Python | pandas/tests/arrays/boolean/test_construction.py | gsyqax/pandas | cb35d8a938c9222d903482d2f66c62fece5a7aae | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause"
] | 4 | 2015-06-09T07:27:52.000Z | 2021-08-06T13:50:05.000Z | pandas/tests/arrays/boolean/test_construction.py | gsyqax/pandas | cb35d8a938c9222d903482d2f66c62fece5a7aae | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause"
] | 7 | 2015-08-30T23:51:00.000Z | 2018-12-29T19:52:35.000Z | pandas/tests/arrays/boolean/test_construction.py | gsyqax/pandas | cb35d8a938c9222d903482d2f66c62fece5a7aae | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause"
] | 5 | 2017-10-04T22:24:49.000Z | 2021-08-06T13:50:13.000Z | import numpy as np
import pytest
import pandas as pd
import pandas._testing as tm
from pandas.arrays import BooleanArray
from pandas.core.arrays.boolean import coerce_to_array
@pytest.fixture
def data():
return pd.array(
[True, False] * 4 + [np.nan] + [True, False] * 44 + [np.nan] + [True, False],
... | 37.285303 | 88 | 0.675375 | import numpy as np
import pytest
import pandas as pd
import pandas._testing as tm
from pandas.arrays import BooleanArray
from pandas.core.arrays.boolean import coerce_to_array
@pytest.fixture
def data():
return pd.array(
[True, False] * 4 + [np.nan] + [True, False] * 44 + [np.nan] + [True, False],
... | true | true |
f7354b7e2b2d0bf1ae24dc3ba868c4e621da0c74 | 26,742 | py | Python | second/pytorch/train.py | VitoRazor/Lidar_RGB_detector | 5308ba24a90d6e8d73940be4b40d31eccb4df94b | [
"MIT"
] | 15 | 2019-08-13T15:28:41.000Z | 2020-03-11T12:36:35.000Z | second/pytorch/train.py | VitoRazor/Lidar_RGB_detector | 5308ba24a90d6e8d73940be4b40d31eccb4df94b | [
"MIT"
] | null | null | null | second/pytorch/train.py | VitoRazor/Lidar_RGB_detector | 5308ba24a90d6e8d73940be4b40d31eccb4df94b | [
"MIT"
] | 1 | 2019-11-15T10:30:01.000Z | 2019-11-15T10:30:01.000Z | import copy
import json
import os
from pathlib import Path
import pickle
import shutil
import time
import re
import fire
import numpy as np
import torch
from google.protobuf import text_format
import second.data.kitti_common as kitti
import torchplus
from second.builder import target_assigner_builder, voxel_builder
f... | 39.617778 | 117 | 0.588139 | import copy
import json
import os
from pathlib import Path
import pickle
import shutil
import time
import re
import fire
import numpy as np
import torch
from google.protobuf import text_format
import second.data.kitti_common as kitti
import torchplus
from second.builder import target_assigner_builder, voxel_builder
f... | true | true |
f7354be59a3c929871a00a722d94d52ec6fe73a8 | 4,652 | py | Python | python-Riemann-online.py | KyunghoWon-GIST/PyRiemann-with-OpenViBE | 2a070fdadb040ce6edad81aef497d054ddd70130 | [
"MIT"
] | null | null | null | python-Riemann-online.py | KyunghoWon-GIST/PyRiemann-with-OpenViBE | 2a070fdadb040ce6edad81aef497d054ddd70130 | [
"MIT"
] | null | null | null | python-Riemann-online.py | KyunghoWon-GIST/PyRiemann-with-OpenViBE | 2a070fdadb040ce6edad81aef497d054ddd70130 | [
"MIT"
] | 1 | 2022-03-24T23:32:52.000Z | 2022-03-24T23:32:52.000Z | import pickle
import numpy as np
import pyriemann
import sklearn
import scipy
import matplotlib as mpl
mpl.use('Qt5Agg') # for using pyplot (pip install pyqt5)
import matplotlib.pyplot as plt
from scipy import signal
from scipy.signal import butter, filtfilt, sosfiltfilt
# Pyriemann with OV Python scripting... | 37.516129 | 120 | 0.681212 | import pickle
import numpy as np
import pyriemann
import sklearn
import scipy
import matplotlib as mpl
mpl.use('Qt5Agg')
import matplotlib.pyplot as plt
from scipy import signal
from scipy.signal import butter, filtfilt, sosfiltfilt
def butter_bandpass_filter(data, lowcut, highcut, fs, order):
... | true | true |
f7354bf17177900c99c3c4dd85040eab66621832 | 9,815 | py | Python | pysim/old/samplerate_retry.py | pavpanchekha/bitrate-lab | f9f804ad08bb544a90d5191d3db3f78398e1f51a | [
"MIT"
] | 5 | 2015-03-22T20:45:05.000Z | 2022-02-13T15:41:41.000Z | pysim/old/samplerate_retry.py | pavpanchekha/bitrate-lab | f9f804ad08bb544a90d5191d3db3f78398e1f51a | [
"MIT"
] | null | null | null | pysim/old/samplerate_retry.py | pavpanchekha/bitrate-lab | f9f804ad08bb544a90d5191d3db3f78398e1f51a | [
"MIT"
] | 4 | 2017-10-16T21:45:47.000Z | 2019-11-19T12:41:33.000Z | # Colleen Josephson, 2013
# This file attempts to implement the SampleRate bit rate selection algorithm
# as outlined in the JBicket MS Thesis.
from __future__ import division
from random import choice
from rates import ieee80211_to_idx
import rates
npkts = 0 #number of packets sent over link
nsuccess = 0 #number ... | 35.433213 | 99 | 0.613449 |
from __future__ import division
from random import choice
from rates import ieee80211_to_idx
import rates
npkts = 0
nsuccess = 0
NBYTES = 1500
currRate = 54
NRETRIES = 1
backoff = {0:0, 1:155, 2:315, 3:635, 4:1275, 5:2555, 6:5115, 7:5115, 8:5115, 9:5115,
10:5115, 11:5115, 12:5115, 13:5115, 14:5... | true | true |
f7354c4162cade049150bfb036fd03ae3438790a | 540 | py | Python | collate_search_data.py | thoppe/orthographic-pedant | 7c703976c526c7b6e32ce8589bf4fbc7f74ed305 | [
"MIT"
] | 155 | 2015-09-21T03:59:12.000Z | 2020-12-29T07:30:19.000Z | collate_search_data.py | thoppe/orthographic-pedant | 7c703976c526c7b6e32ce8589bf4fbc7f74ed305 | [
"MIT"
] | 27 | 2015-09-16T19:55:03.000Z | 2021-06-17T03:13:35.000Z | collate_search_data.py | thoppe/orthographic-pedant | 7c703976c526c7b6e32ce8589bf4fbc7f74ed305 | [
"MIT"
] | 13 | 2015-09-16T14:49:20.000Z | 2020-02-06T13:26:34.000Z | import os, glob, json, codecs
F_SEARCH = sorted(glob.glob("search_data/*"))
def load_word_file(f):
with codecs.open(f,'r','utf-8') as FIN:
js = json.loads(FIN.read())
return js
for f in F_SEARCH:
js = load_word_file(f)
try:
js["items"] = [item["full_name"] for item in js["items"]]
... | 21.6 | 65 | 0.575926 | import os, glob, json, codecs
F_SEARCH = sorted(glob.glob("search_data/*"))
def load_word_file(f):
with codecs.open(f,'r','utf-8') as FIN:
js = json.loads(FIN.read())
return js
for f in F_SEARCH:
js = load_word_file(f)
try:
js["items"] = [item["full_name"] for item in js["items"]]
... | false | true |
f7354c67c9dc8c68e73f2c80fed876c54bc5a839 | 38,009 | py | Python | yolk/cli.py | tastuteche/yolk-py3 | 8944b4f0c78ef91451c796e93f482c9dbd23e316 | [
"BSD-3-Clause"
] | 77 | 2015-01-02T19:59:08.000Z | 2022-02-14T06:59:59.000Z | yolk/cli.py | tastuteche/yolk-py3 | 8944b4f0c78ef91451c796e93f482c9dbd23e316 | [
"BSD-3-Clause"
] | 19 | 2015-01-02T20:01:44.000Z | 2020-07-06T22:54:04.000Z | yolk/cli.py | tastuteche/yolk-py3 | 8944b4f0c78ef91451c796e93f482c9dbd23e316 | [
"BSD-3-Clause"
] | 19 | 2015-01-11T11:08:11.000Z | 2022-01-01T13:13:45.000Z | # pylint: disable-msg=W0613,W0612,W0212,W0511,R0912,C0322,W0704
# W0511 = XXX (my own todo's)
"""
cli.py
======
Desc: Command-line tool for listing Python packages installed by setuptools,
package metadata, package dependencies, and querying The Cheese Shop
(PyPI) for Python package release information s... | 34.397285 | 388 | 0.551001 |
__docformat__ = 'restructuredtext'
import inspect
import re
import pprint
import os
import sys
import optparse
import pkg_resources
import webbrowser
import logging
import platform
if platform.python_version().startswith('2'):
from xmlrpclib import Fault as XMLRPCFault
from urllib import urlretrieve
f... | true | true |
f7354ccee8fb926395d5c25e4ca5bc5ed92f36ed | 3,258 | py | Python | sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2019_09_01_preview/aio/_configuration.py | aiven/azure-sdk-for-python | 8764dc07423beca46ed0b51212d81289d9e52c60 | [
"MIT"
] | null | null | null | sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2019_09_01_preview/aio/_configuration.py | aiven/azure-sdk-for-python | 8764dc07423beca46ed0b51212d81289d9e52c60 | [
"MIT"
] | 1 | 2021-02-23T23:11:26.000Z | 2021-02-23T23:11:26.000Z | sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2019_09_01_preview/aio/_configuration.py | aiven/azure-sdk-for-python | 8764dc07423beca46ed0b51212d81289d9e52c60 | [
"MIT"
] | 1 | 2021-05-19T02:55:10.000Z | 2021-05-19T02:55:10.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 48.626866 | 134 | 0.702271 |
from typing import Any, TYPE_CHECKING
from azure.core.configuration import Configuration
from azure.core.pipeline import policies
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
if TYPE_CHECKING:
from azure.core.credentials_async import AsyncTokenCredential
VERSION = "unknown"
class Appli... | true | true |
f7354d371638fad528d5e25ee8ab26f860c103b1 | 57 | py | Python | mini-scripts/Python_-_Output_Variables_1.txt.py | Web-Dev-Collaborative/PYTHON_PRAC | 856f902fb43dcccae168d34ee6aacc02427a7ac6 | [
"MIT"
] | 5 | 2021-06-02T23:44:25.000Z | 2021-12-27T16:21:57.000Z | mini-scripts/Python_-_Output_Variables_1.txt.py | Web-Dev-Collaborative/PYTHON_PRAC | 856f902fb43dcccae168d34ee6aacc02427a7ac6 | [
"MIT"
] | 22 | 2021-05-31T01:33:25.000Z | 2021-10-18T18:32:39.000Z | mini-scripts/Python_-_Output_Variables_1.txt.py | Web-Dev-Collaborative/PYTHON_PRAC | 856f902fb43dcccae168d34ee6aacc02427a7ac6 | [
"MIT"
] | 3 | 2021-06-19T03:37:47.000Z | 2021-08-31T00:49:51.000Z | x = "awesome"
print("Python is " + x)
# Author: Bryan G
| 14.25 | 23 | 0.596491 | x = "awesome"
print("Python is " + x)
| true | true |
f7354da7414334f4bb43360cb78f171a1a3a8177 | 6,266 | py | Python | oscar/apps/search/views.py | makielab/django-oscar | 0a325cd0f04a4278201872b2e163868b72b6fabe | [
"BSD-3-Clause"
] | 1 | 2015-11-07T12:37:50.000Z | 2015-11-07T12:37:50.000Z | oscar/apps/search/views.py | makielab/django-oscar | 0a325cd0f04a4278201872b2e163868b72b6fabe | [
"BSD-3-Clause"
] | null | null | null | oscar/apps/search/views.py | makielab/django-oscar | 0a325cd0f04a4278201872b2e163868b72b6fabe | [
"BSD-3-Clause"
] | null | null | null | import json
from django.http import HttpResponse, HttpResponseRedirect
from django.views.generic.base import View
from django.conf import settings
from django.db.models import get_model
from haystack.query import SearchQuerySet
from haystack import views
from purl import URL
Product = get_model('catalogue', 'Product'... | 36.219653 | 107 | 0.543568 | import json
from django.http import HttpResponse, HttpResponseRedirect
from django.views.generic.base import View
from django.conf import settings
from django.db.models import get_model
from haystack.query import SearchQuerySet
from haystack import views
from purl import URL
Product = get_model('catalogue', 'Product'... | true | true |
f7354e64a3afa8d1f4a6c949a6e4f8dca77e083b | 3,182 | py | Python | tensorflow/python/data/experimental/service/server_lib_test.py | yage99/tensorflow | c7fa71b32a3635eb25596ae80d007b41007769c4 | [
"Apache-2.0"
] | 4 | 2020-06-28T08:25:36.000Z | 2021-08-12T12:41:34.000Z | tensorflow/python/data/experimental/service/server_lib_test.py | yage99/tensorflow | c7fa71b32a3635eb25596ae80d007b41007769c4 | [
"Apache-2.0"
] | 10 | 2021-08-03T08:42:38.000Z | 2022-01-03T03:29:12.000Z | tensorflow/python/data/experimental/service/server_lib_test.py | yage99/tensorflow | c7fa71b32a3635eb25596ae80d007b41007769c4 | [
"Apache-2.0"
] | 28 | 2020-02-10T07:03:06.000Z | 2022-01-12T11:19:20.000Z | # Copyright 2020 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 33.851064 | 96 | 0.730044 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from tensorflow.python.data.experimental.service import server_lib
from tensorflow.python.platform import test
class ServerLibTest(test.TestCase):
def testStartDispatcher(self):
dispatc... | true | true |
f7354fb589d6141cc7a419690010c3a08bd3d9c7 | 2,344 | py | Python | routes/repos.py | apuayush/gdginfo | ec5fa3d39f44ce5bb94a3e71d1893093624da3dc | [
"MIT"
] | 4 | 2017-03-30T17:31:08.000Z | 2020-01-15T18:53:04.000Z | routes/repos.py | apuayush/gdginfo | ec5fa3d39f44ce5bb94a3e71d1893093624da3dc | [
"MIT"
] | 16 | 2017-03-28T22:46:38.000Z | 2020-01-26T19:39:57.000Z | routes/repos.py | apuayush/gdginfo | ec5fa3d39f44ce5bb94a3e71d1893093624da3dc | [
"MIT"
] | 2 | 2017-04-10T12:38:10.000Z | 2019-05-10T02:52:25.000Z | import simplejson as json
from tornado.gen import coroutine
from tornado.web import RequestHandler
from tornado_cors import CorsMixin
from utility import utility
"""
@api {get} /repos data related to repos
@apiName data related to repos
@apiGroup all
@apiParam org organization name
@apiPermission logged-in
@apiParam... | 26.636364 | 138 | 0.595137 | import simplejson as json
from tornado.gen import coroutine
from tornado.web import RequestHandler
from tornado_cors import CorsMixin
from utility import utility
class Repos(CorsMixin, RequestHandler):
CORS_ORIGIN = "*"
CORS_HEADERS = 'Content-Type, Authorization'
CORS_METHODS = 'GET'
CORS_MAX_AGE ... | true | true |
f7354fcf962cbde596ca7cc862b065cdde1659ef | 47,255 | py | Python | src/olympia/addons/serializers.py | mozilla/addons-server | 42abcfa61032555c6d9ad76a0298134bc7f3b5c1 | [
"BSD-3-Clause"
] | 843 | 2016-02-09T13:00:37.000Z | 2022-03-20T19:17:06.000Z | src/olympia/addons/serializers.py | mozilla/addons-server | 42abcfa61032555c6d9ad76a0298134bc7f3b5c1 | [
"BSD-3-Clause"
] | 10,187 | 2016-02-05T23:51:05.000Z | 2022-03-31T15:24:44.000Z | src/olympia/addons/serializers.py | mozilla/addons-server | 42abcfa61032555c6d9ad76a0298134bc7f3b5c1 | [
"BSD-3-Clause"
] | 551 | 2016-02-08T20:32:16.000Z | 2022-03-15T16:49:24.000Z | import re
from urllib.parse import urlsplit, urlunsplit
from django.http.request import QueryDict
from django.urls import reverse
from rest_framework import exceptions, serializers
import olympia.core.logger
from olympia import activity, amo
from olympia.accounts.serializers import (
BaseUserSerializer,
User... | 37.033699 | 88 | 0.623257 | import re
from urllib.parse import urlsplit, urlunsplit
from django.http.request import QueryDict
from django.urls import reverse
from rest_framework import exceptions, serializers
import olympia.core.logger
from olympia import activity, amo
from olympia.accounts.serializers import (
BaseUserSerializer,
User... | true | true |
f7355003748af6a4791de9bf10e65f9d69998bf6 | 4,944 | py | Python | drive.py | evanloshin/CarND-Behavioral-Cloning-P3 | 22ec89cdea5257a10512f07b07fc4c074bc7c649 | [
"MIT"
] | null | null | null | drive.py | evanloshin/CarND-Behavioral-Cloning-P3 | 22ec89cdea5257a10512f07b07fc4c074bc7c649 | [
"MIT"
] | null | null | null | drive.py | evanloshin/CarND-Behavioral-Cloning-P3 | 22ec89cdea5257a10512f07b07fc4c074bc7c649 | [
"MIT"
] | null | null | null | import argparse
import base64
from datetime import datetime
import os
import shutil
import numpy as np
import socketio
import eventlet
import eventlet.wsgi
from PIL import Image
from flask import Flask
from io import BytesIO
from keras.models import load_model
import h5py
from keras import __version__ as keras_versio... | 31.896774 | 137 | 0.64462 | import argparse
import base64
from datetime import datetime
import os
import shutil
import numpy as np
import socketio
import eventlet
import eventlet.wsgi
from PIL import Image
from flask import Flask
from io import BytesIO
from keras.models import load_model
import h5py
from keras import __version__ as keras_versio... | true | true |
f73550951879199e9ad244e693a953a5cf72bf17 | 24,024 | py | Python | test/test_treestore.py | helix-collective/s3ts | f60e71f576562badc41828952562e5936f85bfcf | [
"BSD-3-Clause"
] | 2 | 2019-05-21T00:08:13.000Z | 2020-01-29T10:42:48.000Z | test/test_treestore.py | helix-collective/s3ts | f60e71f576562badc41828952562e5936f85bfcf | [
"BSD-3-Clause"
] | 1 | 2016-11-23T23:06:59.000Z | 2016-11-23T23:30:51.000Z | test/test_treestore.py | helix-collective/s3ts | f60e71f576562badc41828952562e5936f85bfcf | [
"BSD-3-Clause"
] | 4 | 2016-10-24T01:14:59.000Z | 2020-07-23T02:37:48.000Z | import os, tempfile, unittest, shutil, subprocess, datetime, time
from s3ts.filestore import LocalFileStore
from s3ts.s3filestore import S3FileStore
from s3ts.config import TreeStoreConfig, readInstallProperties, S3TS_PROPERTIES
from s3ts.treestore import TreeStore
from s3ts.utils import datetimeFromIso
from s3ts.pack... | 44.654275 | 160 | 0.620421 | import os, tempfile, unittest, shutil, subprocess, datetime, time
from s3ts.filestore import LocalFileStore
from s3ts.s3filestore import S3FileStore
from s3ts.config import TreeStoreConfig, readInstallProperties, S3TS_PROPERTIES
from s3ts.treestore import TreeStore
from s3ts.utils import datetimeFromIso
from s3ts.pack... | true | true |
f735517ae4b0c43d2d979272bde82614ddb99068 | 7,319 | py | Python | python-sockets-tutorial/libserver.py | mohammad26845/materials | 12f8baa413d8ab51d38f7756ed9b9d98076783b9 | [
"MIT"
] | 3,682 | 2018-05-07T19:45:24.000Z | 2022-03-31T15:19:10.000Z | python-sockets-tutorial/libserver.py | sribarrow/materials | c17c4a4d6f8487e59eac1df8c88ca92b73d6d2a5 | [
"MIT"
] | 148 | 2018-05-15T21:18:49.000Z | 2022-03-21T11:25:39.000Z | python-sockets-tutorial/libserver.py | sribarrow/materials | c17c4a4d6f8487e59eac1df8c88ca92b73d6d2a5 | [
"MIT"
] | 5,535 | 2018-05-25T23:36:08.000Z | 2022-03-31T16:55:52.000Z | import sys
import selectors
import json
import io
import struct
request_search = {
"morpheus": "Follow the white rabbit. \U0001f430",
"ring": "In the caves beneath the Misty Mountains. \U0001f48d",
"\U0001f436": "\U0001f43e Playing ball! \U0001f3d0",
}
class Message:
def __init__(self, selector, sock... | 33.728111 | 79 | 0.564558 | import sys
import selectors
import json
import io
import struct
request_search = {
"morpheus": "Follow the white rabbit. \U0001f430",
"ring": "In the caves beneath the Misty Mountains. \U0001f48d",
"\U0001f436": "\U0001f43e Playing ball! \U0001f3d0",
}
class Message:
def __init__(self, selector, sock... | true | true |
f73551e5a07ae0b82068651eb3d0b261c227f5a0 | 9,545 | py | Python | rltime/eval.py | frederikschubert/rltime | d1722ffd4cf7b4599655b8d9c64abc243919afc9 | [
"Apache-2.0"
] | null | null | null | rltime/eval.py | frederikschubert/rltime | d1722ffd4cf7b4599655b8d9c64abc243919afc9 | [
"Apache-2.0"
] | null | null | null | rltime/eval.py | frederikschubert/rltime | d1722ffd4cf7b4599655b8d9c64abc243919afc9 | [
"Apache-2.0"
] | null | null | null | """ Entry point for evaluating/rendering a trained policy. """
import argparse
import json
import os
import numpy as np
import time
import datetime
from rltime.general.config import load_config
from rltime.general.utils import deep_dictionary_update
from rltime.general.type_registry import get_registered_type
from rl... | 39.937238 | 94 | 0.638135 |
import argparse
import json
import os
import numpy as np
import time
import datetime
from rltime.general.config import load_config
from rltime.general.utils import deep_dictionary_update
from rltime.general.type_registry import get_registered_type
from rltime.env_wrappers.common import make_env_creator, EpisodeRecord... | true | true |
f735520963a9477834365eb74c51fd51ac149bce | 1,477 | py | Python | main/input_file_creator/write_cell_card/cell_card_main.py | KanruXie/Virtual_Linac | 7d321fcc744a6bec639bab495f5a2a71af4cbe4d | [
"Apache-2.0"
] | null | null | null | main/input_file_creator/write_cell_card/cell_card_main.py | KanruXie/Virtual_Linac | 7d321fcc744a6bec639bab495f5a2a71af4cbe4d | [
"Apache-2.0"
] | null | null | null | main/input_file_creator/write_cell_card/cell_card_main.py | KanruXie/Virtual_Linac | 7d321fcc744a6bec639bab495f5a2a71af4cbe4d | [
"Apache-2.0"
] | 1 | 2021-12-19T15:59:50.000Z | 2021-12-19T15:59:50.000Z | # -*- coding: utf-8 -*-
"""
Cell Card main module
"""
__author__ = 'Kanru Xie'
import globalvar as glv
from input_file_creator.write_cell_card import (objective_cell, air_cell, baseplate_cell, jaws_cell, mlc_cell)
def cell_card():
c_card = ''
mlc_state = glv.get_value('mlc state')
if mlc_state == 'no mlc... | 36.02439 | 110 | 0.404198 |
__author__ = 'Kanru Xie'
import globalvar as glv
from input_file_creator.write_cell_card import (objective_cell, air_cell, baseplate_cell, jaws_cell, mlc_cell)
def cell_card():
c_card = ''
mlc_state = glv.get_value('mlc state')
if mlc_state == 'no mlc':
c_card = str('c Cell card' + '\n' +
... | true | true |
f735524e98e0851021f262a7afc9284687dbc462 | 7,177 | py | Python | test.py | qiuchili/PyQLM | ccd5f64f86cf88f618e30808d598f3785f5e6483 | [
"MIT"
] | null | null | null | test.py | qiuchili/PyQLM | ccd5f64f86cf88f618e30808d598f3785f5e6483 | [
"MIT"
] | null | null | null | test.py | qiuchili/PyQLM | ccd5f64f86cf88f618e30808d598f3785f5e6483 | [
"MIT"
] | null | null | null | # -*- coding:utf-8 -*-
from __future__ import division
import numpy as np
import os
import cPickle as Pickle
import pynlpir
from math import log
from numpy import linalg as LA
iter_r = 0.685
iter_a = 0.9
tmax = 1
def F(rhoM, proDict): # 目标函数
# print rhoM
res = 0
for pm in proDict:
print proDict[pm]
P... | 20.103641 | 82 | 0.618364 |
from __future__ import division
import numpy as np
import os
import cPickle as Pickle
import pynlpir
from math import log
from numpy import linalg as LA
iter_r = 0.685
iter_a = 0.9
tmax = 1
def F(rhoM, proDict):
res = 0
for pm in proDict:
print proDict[pm]
P = np.trace(np.dot(proDict[pm][1], rhoM))... | false | true |
f73552eba68c512312aa18e4f1d14dbaea90b0e9 | 208 | py | Python | phf/__init__.py | framaz/AsyncSiteParser | 51ed0f2611f2f309734ccfbfc496cb13759c9ea1 | [
"MIT"
] | 2 | 2020-07-14T13:07:01.000Z | 2020-07-14T14:51:14.000Z | phf/__init__.py | framaz/phf | 51ed0f2611f2f309734ccfbfc496cb13759c9ea1 | [
"MIT"
] | null | null | null | phf/__init__.py | framaz/phf | 51ed0f2611f2f309734ccfbfc496cb13759c9ea1 | [
"MIT"
] | null | null | null | from . import abstracthook
from . import commandinput
from . import provider
from . import utils
from .phfsystem import PHFSystem
__all__ = ["abstracthook", "commandinput", "provider", "utils", "PHFSystem"]
| 26 | 76 | 0.759615 | from . import abstracthook
from . import commandinput
from . import provider
from . import utils
from .phfsystem import PHFSystem
__all__ = ["abstracthook", "commandinput", "provider", "utils", "PHFSystem"]
| true | true |
f7355393f2d9138047ff104c57ca1997780b65b4 | 25 | py | Python | examples/bytearray/ex3.py | mcorne/python-by-example | 15339c0909c84b51075587a6a66391100971c033 | [
"MIT"
] | null | null | null | examples/bytearray/ex3.py | mcorne/python-by-example | 15339c0909c84b51075587a6a66391100971c033 | [
"MIT"
] | null | null | null | examples/bytearray/ex3.py | mcorne/python-by-example | 15339c0909c84b51075587a6a66391100971c033 | [
"MIT"
] | null | null | null | print(bytearray(b'Hi!'))
| 12.5 | 24 | 0.68 | print(bytearray(b'Hi!'))
| true | true |
f73553f7d28d117cc9c9a46d69f9483b75ac3ce2 | 18,153 | py | Python | rlkit/core/base_algorithm.py | apexrl/EBIL-torch | 8d257d5efa36f7c608085e34a7cdd3e996962d3f | [
"MIT"
] | 5 | 2021-05-28T02:38:33.000Z | 2022-03-03T01:17:09.000Z | rlkit/core/base_algorithm.py | apexrl/EBIL-torch | 8d257d5efa36f7c608085e34a7cdd3e996962d3f | [
"MIT"
] | 1 | 2021-11-05T14:25:17.000Z | 2021-11-10T11:59:24.000Z | rlkit/core/base_algorithm.py | apexrl/EBIL-torch | 8d257d5efa36f7c608085e34a7cdd3e996962d3f | [
"MIT"
] | 1 | 2021-11-15T07:41:33.000Z | 2021-11-15T07:41:33.000Z | import abc
import pickle
import time
from collections import OrderedDict
from copy import deepcopy
import gtimer as gt
import numpy as np
from rlkit.core import logger, eval_util
from rlkit.data_management.env_replay_buffer import EnvReplayBuffer
from rlkit.data_management.path_builder import PathBuilder
from rlkit.p... | 34.250943 | 91 | 0.562056 | import abc
import pickle
import time
from collections import OrderedDict
from copy import deepcopy
import gtimer as gt
import numpy as np
from rlkit.core import logger, eval_util
from rlkit.data_management.env_replay_buffer import EnvReplayBuffer
from rlkit.data_management.path_builder import PathBuilder
from rlkit.p... | true | true |
f73554f08dc3a48f057339dda2f1974e69be8475 | 350 | py | Python | neurokernel/__init__.py | yiyin/neurodriver | 34e6874a1cf35633cda1191920cbaeac5d25dc9b | [
"BSD-3-Clause"
] | 235 | 2015-01-27T01:12:54.000Z | 2022-03-17T23:09:35.000Z | neurokernel/__init__.py | mreitm/neurokernel | 8195a500ba1127f719e963465af9f43d6019b884 | [
"BSD-3-Clause"
] | 29 | 2015-01-12T18:00:45.000Z | 2020-08-04T22:33:15.000Z | neuroarch_component/__init__.py | fruitflybrain/neuroarch_component | bc2198fee1d58d52c3399a6bef9e1fbbd3e33932 | [
"BSD-3-Clause"
] | 67 | 2015-01-18T22:20:49.000Z | 2021-12-13T03:33:49.000Z | try:
__import__('pkg_resources').declare_namespace(__name__)
except ImportError:
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
# Ignore all exceptions so that this doesn't cause package installation
# to fail if pkg_resources can't find neurokernel:
try:
from version import... | 26.923077 | 71 | 0.774286 | try:
__import__('pkg_resources').declare_namespace(__name__)
except ImportError:
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
# to fail if pkg_resources can't find neurokernel:
try:
from version import __version__
except:
pass
| true | true |
f73554ff04f2ab45b89c0e233030e12064f0038d | 55 | py | Python | unsupervised/__init__.py | Riroaki/LemonML- | 3bb344c135e4dd7dab63a4fd2184ac0aaacc367d | [
"MIT"
] | 34 | 2019-06-23T03:45:41.000Z | 2021-11-30T12:28:41.000Z | unsupervised/__init__.py | Riroaki/LemonML- | 3bb344c135e4dd7dab63a4fd2184ac0aaacc367d | [
"MIT"
] | null | null | null | unsupervised/__init__.py | Riroaki/LemonML- | 3bb344c135e4dd7dab63a4fd2184ac0aaacc367d | [
"MIT"
] | 5 | 2019-06-14T09:41:24.000Z | 2019-10-23T11:21:22.000Z | from .clustering import *
from .decomposition import *
| 18.333333 | 28 | 0.781818 | from .clustering import *
from .decomposition import *
| true | true |
f73555f6b77e720c512282513fa4bcda7ce39a7e | 418 | py | Python | mytoyota/utils/token.py | laurentd75/mytoyota--DurgNomis-drol | 269cf13807c31b741e4d6a2fa0d7e09306c98f55 | [
"MIT"
] | 34 | 2021-03-20T16:38:08.000Z | 2022-02-17T12:47:07.000Z | mytoyota/utils/token.py | DurgNomis-drol/MyT | ad6b93461f42754045eb605b07b7c16cac93803d | [
"MIT"
] | 64 | 2021-03-14T12:12:39.000Z | 2022-03-29T18:44:32.000Z | mytoyota/utils/token.py | joro75/mytoyota | 405f7d84b3737846124aac6e7692aa6da52838a1 | [
"MIT"
] | 7 | 2021-03-15T07:27:38.000Z | 2022-01-21T17:23:08.000Z | """Token validation utilities"""
from mytoyota.const import TOKEN_LENGTH
from mytoyota.exceptions import ToyotaInvalidToken
def is_valid_token(token: str) -> bool:
"""Checks if token is the correct length"""
if token and len(token) == TOKEN_LENGTH and token.endswith("..*"):
return True
raise Toyo... | 29.857143 | 75 | 0.698565 | from mytoyota.const import TOKEN_LENGTH
from mytoyota.exceptions import ToyotaInvalidToken
def is_valid_token(token: str) -> bool:
if token and len(token) == TOKEN_LENGTH and token.endswith("..*"):
return True
raise ToyotaInvalidToken(
f"Token must end with '..*' and be {TOKEN_LENGTH} charact... | true | true |
f735566079a6315e52b1d2a3c0a9ec263dbb5b35 | 551 | py | Python | docs/compliant_logging/hello-world.py | Anbang-Hu/shrike | 78189984c85696a9a9feaadb72aa471cf2409796 | [
"MIT"
] | 27 | 2021-05-27T00:01:24.000Z | 2022-01-30T19:55:24.000Z | docs/compliant_logging/hello-world.py | Anbang-Hu/shrike | 78189984c85696a9a9feaadb72aa471cf2409796 | [
"MIT"
] | 284 | 2021-05-12T22:26:41.000Z | 2022-02-23T21:18:34.000Z | docs/compliant_logging/hello-world.py | Anbang-Hu/shrike | 78189984c85696a9a9feaadb72aa471cf2409796 | [
"MIT"
] | 5 | 2021-06-02T04:51:47.000Z | 2021-12-20T17:07:41.000Z | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
"""
Simplest example of how to use the prefix_stack_trace decorator.
"""
from shrike.compliant_logging.exceptions import prefix_stack_trace
# Output will be:
# SystemLog: Traceback (most recent call last):
# SystemLog: File ".\hello-world.py... | 22.958333 | 66 | 0.711434 |
from shrike.compliant_logging.exceptions import prefix_stack_trace
@prefix_stack_trace()
def main():
print("Hello, world!")
print(1 / 0)
if __name__ == "__main__":
main()
| true | true |
f735566a03cd3ffb92dd1352843541464707906d | 6,966 | py | Python | gputools/convolve/minmax_filter.py | VolkerH/gputools | b8732c3cf82b96c6960497e6d82ce6b2bac463aa | [
"BSD-3-Clause"
] | null | null | null | gputools/convolve/minmax_filter.py | VolkerH/gputools | b8732c3cf82b96c6960497e6d82ce6b2bac463aa | [
"BSD-3-Clause"
] | null | null | null | gputools/convolve/minmax_filter.py | VolkerH/gputools | b8732c3cf82b96c6960497e6d82ce6b2bac463aa | [
"BSD-3-Clause"
] | null | null | null | from __future__ import print_function, unicode_literals, absolute_import, division
import logging
logger = logging.getLogger(__name__)
import os
import numpy as np
from gputools import OCLArray, OCLProgram, get_device
from gputools.core.ocltypes import assert_bufs_type
from gputools.utils.tile_iterator import tile_i... | 32.4 | 101 | 0.626759 | from __future__ import print_function, unicode_literals, absolute_import, division
import logging
logger = logging.getLogger(__name__)
import os
import numpy as np
from gputools import OCLArray, OCLProgram, get_device
from gputools.core.ocltypes import assert_bufs_type
from gputools.utils.tile_iterator import tile_i... | true | true |
f7355702a040e2141c8ec1af9495e40c0492ec04 | 2,215 | py | Python | setup.py | LRydin/NeuroKit | 3e2ee72900c3fc85a0b338ad9a3adea0f4f4c169 | [
"MIT"
] | null | null | null | setup.py | LRydin/NeuroKit | 3e2ee72900c3fc85a0b338ad9a3adea0f4f4c169 | [
"MIT"
] | null | null | null | setup.py | LRydin/NeuroKit | 3e2ee72900c3fc85a0b338ad9a3adea0f4f4c169 | [
"MIT"
] | 2 | 2021-12-25T15:39:49.000Z | 2021-12-25T15:44:16.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""The setup script."""
import re
from setuptools import find_packages, setup
# Utilities
with open("README.rst") as readme_file:
readme = readme_file.read()
with open("NEWS.rst") as history_file:
history = history_file.read()
history = history.replace("\n-----... | 27.345679 | 121 | 0.63702 |
import re
from setuptools import find_packages, setup
with open("README.rst") as readme_file:
readme = readme_file.read()
with open("NEWS.rst") as history_file:
history = history_file.read()
history = history.replace("\n-------------------", "\n^^^^^^^^^^^^^^^^^^^").replace("\n=====", "\n-----")
def f... | true | true |
f7355ca167a264463a1c888c0f4bc0a609cdf2c1 | 1,641 | py | Python | setup.py | idekerlab/cdoslom | d44fb852f44ba11d8316d88da8654148aab3fca2 | [
"BSD-3-Clause"
] | null | null | null | setup.py | idekerlab/cdoslom | d44fb852f44ba11d8316d88da8654148aab3fca2 | [
"BSD-3-Clause"
] | null | null | null | setup.py | idekerlab/cdoslom | d44fb852f44ba11d8316d88da8654148aab3fca2 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import re
from setuptools import setup
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
with open(os.path.join('cdoslom', '__init__.py')) as ver_file:
for ... | 26.467742 | 74 | 0.620963 |
import os
import re
from setuptools import setup
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
with open(os.path.join('cdoslom', '__init__.py')) as ver_file:
for line in ver_file:
if line.startswith... | true | true |
f7355cb863fb2a7c8542214af3c2f9443699e337 | 7,953 | py | Python | api.py | gurgeh/silly-chess | 6c2ff766e10184a9b475681bb9945d9bc8f9aa89 | [
"Apache-2.0"
] | 1 | 2016-12-23T01:48:07.000Z | 2016-12-23T01:48:07.000Z | api.py | gurgeh/silly-chess | 6c2ff766e10184a9b475681bb9945d9bc8f9aa89 | [
"Apache-2.0"
] | null | null | null | api.py | gurgeh/silly-chess | 6c2ff766e10184a9b475681bb9945d9bc8f9aa89 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
import json
import datetime
import hashlib
import webapp2
from google.appengine.api import users, memcache
from google.appengine.ext import ndb
import sil_model
import split_pgn
CHUNK_SIZE = 10
"""
Make sample opening PGN
parse_stm verkar inte klara kommentarer (med åäö?)
--- LATER ---
Memorize gam... | 28.711191 | 79 | 0.591223 |
import json
import datetime
import hashlib
import webapp2
from google.appengine.api import users, memcache
from google.appengine.ext import ndb
import sil_model
import split_pgn
CHUNK_SIZE = 10
def add_success(fact):
memdb = memcache.Client()
i = memdb.incr('nranswer_%s' % fact.userid, initial_value=0)
... | true | true |
f7355d4aa91a1f92c0e39afc1bb9f214e6876718 | 1,813 | py | Python | reporover/get_convention.py | CommittedTeam/RepoRover | 41326c8f2a886288efda48db435b4c2537ae3678 | [
"MIT"
] | 1 | 2022-03-18T02:34:13.000Z | 2022-03-18T02:34:13.000Z | reporover/get_convention.py | CommittedTeam/RepoRover | 41326c8f2a886288efda48db435b4c2537ae3678 | [
"MIT"
] | null | null | null | reporover/get_convention.py | CommittedTeam/RepoRover | 41326c8f2a886288efda48db435b4c2537ae3678 | [
"MIT"
] | null | null | null | """ Detect the conventional style.
guidelines:
angular: https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit
atom: https://github.com/atom/atom/blob/master/CONTRIBUTING.md#git-commit-messages
ember: https://github.com/emberjs/ember.js/blob/master/CONTRIBUTING.md#pull-requests
esli... | 36.26 | 202 | 0.638169 |
import re
def match(commit_msg):
commit_types = {
"angular": "build|ci|docs|feat|fix|perf|refactor|test|chore|style",
"eslint": "Fix|Update|New|Breaking|Docs|Build|Upgrade|Chore",
}
conventions = {
"angular": r'^({})(?:\((.*)\))?: (.*)$'.format(commit_types["a... | true | true |
f7355ee820770c79f616be1ed4b4f8d8723d4752 | 6,588 | py | Python | RecoBTag/PerformanceDB/python/measure/Pool_btagMuJetsWp0612.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | RecoBTag/PerformanceDB/python/measure/Pool_btagMuJetsWp0612.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | RecoBTag/PerformanceDB/python/measure/Pool_btagMuJetsWp0612.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | import FWCore.ParameterSet.Config as cms
from CondCore.DBCommon.CondDBCommon_cfi import *
PoolDBESSourcebtagMuJetsWp0612 = cms.ESSource("PoolDBESSource",
CondDBCommon,
toGet = cms.VPSet(
#
# working points
#
cms.PSet(
record = cms.string(... | 39.449102 | 83 | 0.711597 | import FWCore.ParameterSet.Config as cms
from CondCore.DBCommon.CondDBCommon_cfi import *
PoolDBESSourcebtagMuJetsWp0612 = cms.ESSource("PoolDBESSource",
CondDBCommon,
toGet = cms.VPSet(
cms.PSet(
record = cms.string('PerformancePayloa... | true | true |
f7355f7e109de934e2f174b301f857c4a6bc1865 | 32,743 | py | Python | tests/support/case.py | Noah-Huppert/salt | 998c382f5f2c3b4cbf7d96aa6913ada6993909b3 | [
"Apache-2.0"
] | 19 | 2016-01-29T14:37:52.000Z | 2022-03-30T18:08:01.000Z | tests/support/case.py | Noah-Huppert/salt | 998c382f5f2c3b4cbf7d96aa6913ada6993909b3 | [
"Apache-2.0"
] | 223 | 2016-03-02T16:39:41.000Z | 2022-03-03T12:26:35.000Z | tests/support/case.py | Noah-Huppert/salt | 998c382f5f2c3b4cbf7d96aa6913ada6993909b3 | [
"Apache-2.0"
] | 64 | 2016-02-04T19:45:26.000Z | 2021-12-15T02:02:31.000Z | """
:codeauthor: Pedro Algarvio (pedro@algarvio.me)
====================================
Custom Salt TestCase Implementations
====================================
Custom reusable :class:`TestCase<python2:unittest.TestCase>`
implementations.
"""
import errno
import io
import json
import loggi... | 32.354743 | 95 | 0.534557 |
import errno
import io
import json
import logging
import os
import re
import subprocess
import sys
import tempfile
import textwrap
import time
from datetime import datetime, timedelta
import pytest
import salt.utils.files
from saltfactories.utils.processes import terminate_process
from tests.support.cli_scripts impor... | true | true |
f73560bca59a5c29d4d70597653059aebe24d0d6 | 53,504 | py | Python | lbry/wallet/database.py | DispatchCommit/lbry-sdk | 761fcfe0caede6f2a003e47b9dd5809ac59e0adb | [
"MIT"
] | null | null | null | lbry/wallet/database.py | DispatchCommit/lbry-sdk | 761fcfe0caede6f2a003e47b9dd5809ac59e0adb | [
"MIT"
] | null | null | null | lbry/wallet/database.py | DispatchCommit/lbry-sdk | 761fcfe0caede6f2a003e47b9dd5809ac59e0adb | [
"MIT"
] | null | null | null | import os
import logging
import asyncio
import sqlite3
import platform
from binascii import hexlify
from collections import defaultdict
from dataclasses import dataclass
from contextvars import ContextVar
from typing import Tuple, List, Union, Callable, Any, Awaitable, Iterable, Dict, Optional
from datetime import date... | 41.062164 | 120 | 0.594778 | import os
import logging
import asyncio
import sqlite3
import platform
from binascii import hexlify
from collections import defaultdict
from dataclasses import dataclass
from contextvars import ContextVar
from typing import Tuple, List, Union, Callable, Any, Awaitable, Iterable, Dict, Optional
from datetime import date... | true | true |
f73560d7b5130038cedff239dd82760a17b30eb9 | 5,843 | py | Python | scripts/mgear/shifter_classic_components/foot_bk_01/guide.py | stormstudios/shifter_classic_components | 738411b7a2600884b8e32db752997ab07176fad1 | [
"MIT"
] | 1 | 2019-04-30T08:13:18.000Z | 2019-04-30T08:13:18.000Z | scripts/mgear/shifter_classic_components/foot_bk_01/guide.py | stormstudios/shifter_classic_components | 738411b7a2600884b8e32db752997ab07176fad1 | [
"MIT"
] | 80 | 2018-06-15T03:42:37.000Z | 2021-05-05T23:54:52.000Z | scripts/mgear/shifter_classic_components/foot_bk_01/guide.py | stormstudios/shifter_classic_components | 738411b7a2600884b8e32db752997ab07176fad1 | [
"MIT"
] | 12 | 2019-04-08T16:37:31.000Z | 2021-09-06T17:48:24.000Z | # MGEAR is under the terms of the MIT License
# Copyright (c) 2016 Jeremie Passerin, Miquel Campos
"""Guide Foot banking 01 module"""
from functools import partial
import pymel.core as pm
from mgear.shifter.component import guide
from mgear.core import transform, pyqt
from mgear.vendor.Qt import QtWidgets, QtCore
f... | 34.370588 | 79 | 0.645559 |
from functools import partial
import pymel.core as pm
from mgear.shifter.component import guide
from mgear.core import transform, pyqt
from mgear.vendor.Qt import QtWidgets, QtCore
from maya.app.general.mayaMixin import MayaQWidgetDockableMixin
from maya.app.general.mayaMixin import MayaQDockWidget
import settin... | true | true |
f735615c2319bdff0ca979793672f7234acf31cf | 23,431 | py | Python | robolearn/torch/policies/tanh_gaussian_promp_multi_policy.py | domingoesteban/robolearn | 0d20125425c352b80ef2eeed1c0b11ab6497b11a | [
"BSD-3-Clause"
] | 1 | 2020-01-13T09:44:22.000Z | 2020-01-13T09:44:22.000Z | robolearn/torch/policies/tanh_gaussian_promp_multi_policy.py | domingoesteban/robolearn | 0d20125425c352b80ef2eeed1c0b11ab6497b11a | [
"BSD-3-Clause"
] | null | null | null | robolearn/torch/policies/tanh_gaussian_promp_multi_policy.py | domingoesteban/robolearn | 0d20125425c352b80ef2eeed1c0b11ab6497b11a | [
"BSD-3-Clause"
] | 1 | 2021-12-22T00:41:20.000Z | 2021-12-22T00:41:20.000Z | import math
import torch
from torch import nn as nn
from torch.distributions import Normal
from robolearn.torch.core import PyTorchModule
from robolearn.torch.utils.pytorch_util import np_ify
from torch.nn.modules.normalization import LayerNorm
import robolearn.torch.utils.pytorch_util as ptu
from robolearn.models.poli... | 35.555387 | 84 | 0.52358 | import math
import torch
from torch import nn as nn
from torch.distributions import Normal
from robolearn.torch.core import PyTorchModule
from robolearn.torch.utils.pytorch_util import np_ify
from torch.nn.modules.normalization import LayerNorm
import robolearn.torch.utils.pytorch_util as ptu
from robolearn.models.poli... | true | true |
f7356189410830fee91f4d3a459c6fac261b2145 | 115,902 | py | Python | src/azure-cli/azure/cli/command_modules/storage/_params.py | chunyu3/azure-cli | 481df7ec3f42067bdf078692cb32e9a27baa6821 | [
"MIT"
] | null | null | null | src/azure-cli/azure/cli/command_modules/storage/_params.py | chunyu3/azure-cli | 481df7ec3f42067bdf078692cb32e9a27baa6821 | [
"MIT"
] | null | null | null | src/azure-cli/azure/cli/command_modules/storage/_params.py | chunyu3/azure-cli | 481df7ec3f42067bdf078692cb32e9a27baa6821 | [
"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.
# --------------------------------------------------------------------... | 69.402395 | 166 | 0.655606 |
from azure.cli.core.profiles import ResourceType
from azure.cli.core.commands.validators import get_default_location_from_resource_group
from azure.cli.core.commands.parameters import (tags_type, file_type, get_location_type, get_enum_type,
get_three_state_flag)
from... | true | true |
f735623bbcbe181b6aabbdb2e8750fd1eb7dab3c | 1,433 | py | Python | main.py | wmcgee3/imguber | 58e21267e9cddbbcd4df5a8055fc9d4895c2823a | [
"MIT"
] | null | null | null | main.py | wmcgee3/imguber | 58e21267e9cddbbcd4df5a8055fc9d4895c2823a | [
"MIT"
] | null | null | null | main.py | wmcgee3/imguber | 58e21267e9cddbbcd4df5a8055fc9d4895c2823a | [
"MIT"
] | null | null | null | from fastapi import FastAPI, Path
from typing import Optional
from pydantic import BaseModel
app = FastAPI()
class Item(BaseModel):
name: str
price: float
brand: Optional[str] = None
class UpdateItem(BaseModel):
name: Optional[str] = None
price: Optional[float] = None
brand: Optional[str] = N... | 23.883333 | 98 | 0.655269 | from fastapi import FastAPI, Path
from typing import Optional
from pydantic import BaseModel
app = FastAPI()
class Item(BaseModel):
name: str
price: float
brand: Optional[str] = None
class UpdateItem(BaseModel):
name: Optional[str] = None
price: Optional[float] = None
brand: Optional[str] = N... | true | true |
f735625bd5e10ebc5dcbfb0804a6ef4459c6c0a4 | 2,508 | py | Python | test/functional/mempool_limit.py | pniwre/titcoin | 4f37e544a7320f945900c5f9ae2b0835b017a6d4 | [
"MIT"
] | 7 | 2019-01-16T23:53:26.000Z | 2020-11-07T15:06:42.000Z | test/functional/mempool_limit.py | pniwre/titcoin | 4f37e544a7320f945900c5f9ae2b0835b017a6d4 | [
"MIT"
] | 1 | 2021-04-14T18:44:41.000Z | 2021-04-28T03:25:41.000Z | test/functional/mempool_limit.py | pniwre/titcoin | 4f37e544a7320f945900c5f9ae2b0835b017a6d4 | [
"MIT"
] | 9 | 2018-11-24T00:33:36.000Z | 2021-09-05T13:06:35.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test mempool limiting together/eviction with the wallet."""
from test_framework.test_framework import ... | 45.6 | 118 | 0.672249 |
from test_framework.test_framework import TitcoinTestFramework
from test_framework.util import *
class MempoolLimitTest(TitcoinTestFramework):
def set_test_params(self):
self.setup_clean_chain = True
self.num_nodes = 1
self.extra_args = [["-maxmempool=5", "-spendzeroconfchange=0"]]
... | true | true |
f735626cfc6177de873e236c69c8bfc77e514feb | 1,709 | py | Python | kitsune/users/tests/test_utils.py | 10allday-Software/kitsune | 3e032fcee8af6adeb468b5331feeb1f16c5a6584 | [
"BSD-3-Clause"
] | 929 | 2015-01-04T08:08:51.000Z | 2022-03-31T06:20:44.000Z | kitsune/users/tests/test_utils.py | hafixo/kitsune | d7756872e16590eea1c6adaeb5bc78f83414d753 | [
"BSD-3-Clause"
] | 1,751 | 2015-01-02T00:04:37.000Z | 2022-03-31T10:24:30.000Z | kitsune/users/tests/test_utils.py | Whoerr/kitsune | 2428573b4920a824c3e712b8a4870f8c1ada8f64 | [
"BSD-3-Clause"
] | 605 | 2015-01-01T14:08:36.000Z | 2022-03-28T15:39:45.000Z | from django.contrib.auth.models import User
from nose.tools import eq_
from kitsune.sumo.tests import TestCase
from kitsune.users.utils import suggest_username
class UtilsTestCase(TestCase):
def test_suggest_username(self):
eq_("someuser", suggest_username("someuser@test.com"))
User.objects.crea... | 34.877551 | 62 | 0.672323 | from django.contrib.auth.models import User
from nose.tools import eq_
from kitsune.sumo.tests import TestCase
from kitsune.users.utils import suggest_username
class UtilsTestCase(TestCase):
def test_suggest_username(self):
eq_("someuser", suggest_username("someuser@test.com"))
User.objects.crea... | true | true |
f735639ff9c38d11b781e79a8c7ff13ce1b000dd | 1,984 | py | Python | coded_distributed_computing.py | kcexn/singular-value-decomposition | 63e2a23f9f0db9aa361e338b8065d59b80f7649e | [
"BSD-Source-Code"
] | null | null | null | coded_distributed_computing.py | kcexn/singular-value-decomposition | 63e2a23f9f0db9aa361e338b8065d59b80f7649e | [
"BSD-Source-Code"
] | null | null | null | coded_distributed_computing.py | kcexn/singular-value-decomposition | 63e2a23f9f0db9aa361e338b8065d59b80f7649e | [
"BSD-Source-Code"
] | 1 | 2021-03-22T12:15:53.000Z | 2021-03-22T12:15:53.000Z | ''' coded_distributed_computing
This module contains functions related to a study of the coded distributed computing model.
'''
import numpy as np
def encode_matrix(A: np.matrix, G: np.matrix) -> np.matrix:
''' encode_matrix
Parameters:
---
A: np.matrix, input matrix to code.
G: np.matrix, generat... | 38.901961 | 91 | 0.717742 | import numpy as np
def encode_matrix(A: np.matrix, G: np.matrix) -> np.matrix:
return np.matmul(A,G)
| true | true |
f735644a6b5de633eca03c7d4bbc6e3805aae0f8 | 4,380 | py | Python | contrib/seeds/generate-seeds.py | cicxcoin/cicoin | b48b11574ae38ae063670a755b9d50ef6960e1e8 | [
"MIT"
] | 3 | 2020-06-19T11:21:43.000Z | 2021-02-16T16:29:13.000Z | contrib/seeds/generate-seeds.py | Madurajaya/cicoin | b48b11574ae38ae063670a755b9d50ef6960e1e8 | [
"MIT"
] | 1 | 2020-04-29T20:15:13.000Z | 2020-04-29T20:15:13.000Z | contrib/seeds/generate-seeds.py | Madurajaya/cicoin | b48b11574ae38ae063670a755b9d50ef6960e1e8 | [
"MIT"
] | 4 | 2020-01-25T06:31:23.000Z | 2022-02-28T05:36:12.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2017 Wladimir J. van der Laan
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Script to generate list of seed nodes for chainparams.cpp.
This script expects two text files in the dir... | 31.510791 | 99 | 0.583562 |
from base64 import b32decode
from binascii import a2b_hex
import sys
import os
import re
pchIPv4 = bytearray([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff])
pchOnionCat = bytearray([0xFD,0x87,0xD8,0x7E,0xEB,0x43])
def name_to_ipv6(addr):
if len(addr)>6 and addr.endswith('.onion'):
vchAddr = b32decode(a... | true | true |
f73564c89e4f82e73a70d4c133d1f686f85559c4 | 3,011 | py | Python | app/app.py | TBxy/bokeh_start_app | 755494f6bc60e92ce17022bbd7f707a39132cbd0 | [
"MIT"
] | 1 | 2017-04-27T09:15:48.000Z | 2017-04-27T09:15:48.000Z | app/app.py | TBxy/bokeh_start_app | 755494f6bc60e92ce17022bbd7f707a39132cbd0 | [
"MIT"
] | null | null | null | app/app.py | TBxy/bokeh_start_app | 755494f6bc60e92ce17022bbd7f707a39132cbd0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""The app module, containing the app factory function."""
from flask import Flask, render_template
import commands, public, user, plots, admin
from .assets import assets
from .extensions import bcrypt, cache, csrf_protect, db, debug_toolbar, login_manager, migrate, api, flask_admin
from .setti... | 32.376344 | 112 | 0.721023 |
from flask import Flask, render_template
import commands, public, user, plots, admin
from .assets import assets
from .extensions import bcrypt, cache, csrf_protect, db, debug_toolbar, login_manager, migrate, api, flask_admin
from .settings import ProdConfig
from flask_admin.menu import MenuLink
from api.v1 import *
... | true | true |
f73566ab8b420130bb2088c29d7a73aa381c8024 | 342 | py | Python | setup.py | juasiepo/able | ce6dc9db0237a66d0063cac95ed233d491d86684 | [
"MIT"
] | null | null | null | setup.py | juasiepo/able | ce6dc9db0237a66d0063cac95ed233d491d86684 | [
"MIT"
] | null | null | null | setup.py | juasiepo/able | ce6dc9db0237a66d0063cac95ed233d491d86684 | [
"MIT"
] | null | null | null | from setuptools import setup, convert_path
main_ns = {}
ver_path = convert_path('able/version.py')
with open(ver_path) as ver_file:
exec(ver_file.read(), main_ns)
setup(
name='able',
version=main_ns['__version__'],
packages=['able', 'able.android'],
description='Bluetooth Low Energy for Android',... | 21.375 | 51 | 0.690058 | from setuptools import setup, convert_path
main_ns = {}
ver_path = convert_path('able/version.py')
with open(ver_path) as ver_file:
exec(ver_file.read(), main_ns)
setup(
name='able',
version=main_ns['__version__'],
packages=['able', 'able.android'],
description='Bluetooth Low Energy for Android',... | true | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.