hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | 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 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | 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 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
749c6ddadf516b6159357fe8a3022d810088b258 | 128 | py | Python | tests/sparse/test_type.py | anirudhacharya/Theano-PyMC | 55f54243cf88397b032ebc7121d1090ee91aea7d | [
"BSD-3-Clause"
] | null | null | null | tests/sparse/test_type.py | anirudhacharya/Theano-PyMC | 55f54243cf88397b032ebc7121d1090ee91aea7d | [
"BSD-3-Clause"
] | null | null | null | tests/sparse/test_type.py | anirudhacharya/Theano-PyMC | 55f54243cf88397b032ebc7121d1090ee91aea7d | [
"BSD-3-Clause"
] | null | null | null | from aesara.sparse.type import SparseType
def test_clone():
st = SparseType("csr", "float64")
assert st == st.clone()
| 18.285714 | 41 | 0.671875 |
749c77111d204a7c801e369dae0e14fe2102b728 | 10,383 | py | Python | tests/capabilities.py | mizhexiaoxiao/django-istio-opentracing | 635889ff2b1a587fbd2d9f380c69b36f6fca09f8 | [
"MIT"
] | 3 | 2020-11-06T14:59:54.000Z | 2021-05-30T03:13:20.000Z | tests/capabilities.py | mizhexiaoxiao/django-istio-opentracing | 635889ff2b1a587fbd2d9f380c69b36f6fca09f8 | [
"MIT"
] | 1 | 2021-05-30T23:30:19.000Z | 2021-06-03T09:38:10.000Z | tests/capabilities.py | mizhexiaoxiao/django-istio-opentracing | 635889ff2b1a587fbd2d9f380c69b36f6fca09f8 | [
"MIT"
] | 1 | 2021-09-29T09:09:40.000Z | 2021-09-29T09:09:40.000Z | #!/usr/bin/env python -O
""" Script to test database capabilities and the DB-API interface
for functionality and memory leaks.
Adapted from a script by M-A Lemburg.
"""
from time import time
import array
import unittest
from configdb import connection_factory
from django_istio_opentracing import client_hooks
... | 30.271137 | 90 | 0.543003 |
749cc321b8adfb6b9e3afb4b8481bef924b11174 | 4,618 | py | Python | src/main/python/smv/panel.py | shuangshuangwang/SMV | 021faece3f0fefca6051df8415789b14bc9a60ed | [
"Apache-2.0"
] | null | null | null | src/main/python/smv/panel.py | shuangshuangwang/SMV | 021faece3f0fefca6051df8415789b14bc9a60ed | [
"Apache-2.0"
] | null | null | null | src/main/python/smv/panel.py | shuangshuangwang/SMV | 021faece3f0fefca6051df8415789b14bc9a60ed | [
"Apache-2.0"
] | null | null | null | #
# This file is licensed under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distr... | 27.325444 | 108 | 0.545041 |
749ccc79b8c70b3a4d162cdee33c824920132841 | 819 | py | Python | tests/test_reserved.py | nelfin/pylint-protobuf | dbdfaecfbf248ccc75f6cdef4b29e4fb6a21e70e | [
"MIT"
] | 25 | 2018-09-21T13:21:25.000Z | 2021-12-30T06:00:57.000Z | tests/test_reserved.py | nelfin/pylint-protobuf | dbdfaecfbf248ccc75f6cdef4b29e4fb6a21e70e | [
"MIT"
] | 48 | 2019-01-26T10:10:43.000Z | 2021-07-27T02:23:19.000Z | tests/test_reserved.py | nelfin/pylint-protobuf | dbdfaecfbf248ccc75f6cdef4b29e4fb6a21e70e | [
"MIT"
] | 12 | 2018-09-27T09:19:58.000Z | 2021-02-12T17:17:07.000Z | import pylint_protobuf
from conftest import CheckerTestCase
class TestReservedFields(CheckerTestCase):
CHECKER_CLASS = pylint_protobuf.ProtobufDescriptorChecker
def test_reserved_fields_should_appear_undefined(self, proto_builder):
pb2 = proto_builder("""
message ReservedMessage {
... | 34.125 | 88 | 0.623932 |
749ceb78c71d35736b1d38080efe52ef2d40679b | 23,875 | py | Python | perfkitbenchmarker/linux_benchmarks/fio_benchmark.py | marcomicera/PerfKitBenchmarker | c41920921391735880985794783ad55ed187d8ad | [
"Apache-2.0"
] | null | null | null | perfkitbenchmarker/linux_benchmarks/fio_benchmark.py | marcomicera/PerfKitBenchmarker | c41920921391735880985794783ad55ed187d8ad | [
"Apache-2.0"
] | null | null | null | perfkitbenchmarker/linux_benchmarks/fio_benchmark.py | marcomicera/PerfKitBenchmarker | c41920921391735880985794783ad55ed187d8ad | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 PerfKitBenchmarker 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 appli... | 36.674347 | 95 | 0.667853 |
749d0959b0429db475f56002df21f390c8bca4f5 | 5,968 | py | Python | src/onevision/nn/model/logger/tensorboard_logger.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | 2 | 2022-03-28T09:46:38.000Z | 2022-03-28T14:12:32.000Z | src/onevision/nn/model/logger/tensorboard_logger.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | null | null | null | src/onevision/nn/model/logger/tensorboard_logger.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
"""
from __future__ import annotations
import os
import socket
import time
from functools import wraps
from typing import Any
from typing import Optional
import pytorch_lightning as pl
from pytorch_lightning.loggers import TensorBoardLogger
from pytorch_lightning.lo... | 33.155556 | 97 | 0.656836 |
749d13c439a05b8a5117b5f5e4d30911dc05b5a4 | 97 | py | Python | dycco/tests/input/bad_shebang_and_coding.py | rojalator/dycco | 84ace8727aef84bb3d886cdaa3d3aef1089f1935 | [
"MIT"
] | null | null | null | dycco/tests/input/bad_shebang_and_coding.py | rojalator/dycco | 84ace8727aef84bb3d886cdaa3d3aef1089f1935 | [
"MIT"
] | 1 | 2022-03-22T07:35:15.000Z | 2022-03-22T09:15:44.000Z | dycco/tests/input/bad_shebang_and_coding.py | rojalator/dycco | 84ace8727aef84bb3d886cdaa3d3aef1089f1935 | [
"MIT"
] | null | null | null | # Shebang must come first
#!/usr/bin/env/python2.6
# -*- coding: utf8 -*-
print('Hello, World!')
| 19.4 | 25 | 0.639175 |
749d1684c2659907fec7c4f5ebe6982c0be60770 | 832 | py | Python | alipay/aop/api/response/AlipayOverseasTuitionSchoolcreditConfirmResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/response/AlipayOverseasTuitionSchoolcreditConfirmResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/response/AlipayOverseasTuitionSchoolcreditConfirmResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class AlipayOverseasTuitionSchoolcreditConfirmResponse(AlipayResponse):
def __init__(self):
super(AlipayOverseasTuitionSchoolcreditConfirmResponse, self).__init__()
self._p... | 32 | 121 | 0.754808 |
749d44b1eb9dd72baa525ddd423a66bcfb441460 | 6,302 | gyp | Python | ui/file_manager/video_player/js/compiled_resources.gyp | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2 | 2019-01-28T08:09:58.000Z | 2021-11-15T15:32:10.000Z | ui/file_manager/video_player/js/compiled_resources.gyp | maidiHaitai/haitaibrowser | a232a56bcfb177913a14210e7733e0ea83a6b18d | [
"BSD-3-Clause"
] | null | null | null | ui/file_manager/video_player/js/compiled_resources.gyp | maidiHaitai/haitaibrowser | a232a56bcfb177913a14210e7733e0ea83a6b18d | [
"BSD-3-Clause"
] | 6 | 2020-09-23T08:56:12.000Z | 2021-11-18T03:40:49.000Z | # Copyright 2014 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.
{
'targets': [
{
'target_name': 'background',
'variables': {
'depends': [
'../../../../third_party/jstemplate/compiled_res... | 50.015873 | 136 | 0.577753 |
749d579e70a52d0b4de55161cecefed8eced1786 | 3,468 | py | Python | Code_for_Classification/ABR_CNN/data_handle/data_gen_v0.0.1_spec_800_31.py | puyaraimondii/biometric-classification-of-frequency-following-responses | f5b5dca516592be451a3133acb8fa178519bc991 | [
"MIT"
] | 1 | 2021-04-20T14:47:40.000Z | 2021-04-20T14:47:40.000Z | Code_for_Classification/ABR_CNN/data_handle/data_gen_v0.0.1_spec_800_31.py | puyaraimondii/biometric-classification-of-frequency-following-responses | f5b5dca516592be451a3133acb8fa178519bc991 | [
"MIT"
] | null | null | null | Code_for_Classification/ABR_CNN/data_handle/data_gen_v0.0.1_spec_800_31.py | puyaraimondii/biometric-classification-of-frequency-following-responses | f5b5dca516592be451a3133acb8fa178519bc991 | [
"MIT"
] | null | null | null | # encoding utf-8
# Created: on March 11, 2019
# @Author: Bruce
"""tfrecords generate
########################
All txt file names should be in this format:
# txt files name:
# EFR_85_r_01_1.wav:
# 85 represent soudn level
# r represent retest(r)/ test(t)
# 01 represent class label
# ... | 29.641026 | 142 | 0.66263 |
749d732e5f745eaa64d30d29547d6e6b6e4bf070 | 2,340 | py | Python | profiles_api/models.py | CodieDevs/profiles-rest-api | 6c286a13d5c007db5094484e2d80e27f1a35e898 | [
"MIT"
] | null | null | null | profiles_api/models.py | CodieDevs/profiles-rest-api | 6c286a13d5c007db5094484e2d80e27f1a35e898 | [
"MIT"
] | null | null | null | profiles_api/models.py | CodieDevs/profiles-rest-api | 6c286a13d5c007db5094484e2d80e27f1a35e898 | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import AbstractBaseUser
from django.contrib.auth.models import PermissionsMixin
from django.contrib.auth.models import BaseUserManager
from django.conf import settings
class UserProfileManager(BaseUserManager):
""" Manager for User Profiles"""
def ... | 29.25 | 92 | 0.687179 |
749d8c7907687126b1c4f87d0764bc83ae625910 | 2,585 | py | Python | openDAM/dataio/generate_block_orders.py | bcornelusse/openDAM | ad74541d5b5955b6ebb7212aecc6942ff5f71575 | [
"BSD-2-Clause"
] | 15 | 2018-09-18T23:28:41.000Z | 2022-01-11T12:44:10.000Z | openDAM/dataio/generate_block_orders.py | bcornelusse/openDAM | ad74541d5b5955b6ebb7212aecc6942ff5f71575 | [
"BSD-2-Clause"
] | 2 | 2018-07-06T13:18:59.000Z | 2018-07-11T08:53:29.000Z | openDAM/dataio/generate_block_orders.py | bcornelusse/openDAM | ad74541d5b5955b6ebb7212aecc6942ff5f71575 | [
"BSD-2-Clause"
] | 3 | 2020-06-02T04:16:54.000Z | 2021-02-22T10:52:06.000Z | import sqlite3
from argparse import ArgumentParser
import numpy as np
from openDAM.dataio.create_dam_db_from_csv import insert_in_table, create_tables
PUN_ZONES = {"SICI": 17, "SVIZ": 6}
MIN_RATIO = 0.1
PERIODS = range(9, 21)
N_BLOCKS_PER_ZONE = 25
QUANTITY_RANGE = [1, 75]
MEAN_PRICE = 50
STDEV_PRICE = 10
def popu... | 34.013158 | 123 | 0.646035 |
749daeadf14bff6ee6bdf3d6c92bf7f9d1a9da88 | 219 | py | Python | verteco/verteco/doctype/contracts/test_contracts.py | Craftint/verteco | 66632d4750967d7325e29142575b0dcb38f29143 | [
"MIT"
] | null | null | null | verteco/verteco/doctype/contracts/test_contracts.py | Craftint/verteco | 66632d4750967d7325e29142575b0dcb38f29143 | [
"MIT"
] | null | null | null | verteco/verteco/doctype/contracts/test_contracts.py | Craftint/verteco | 66632d4750967d7325e29142575b0dcb38f29143 | [
"MIT"
] | 1 | 2021-05-10T09:00:31.000Z | 2021-05-10T09:00:31.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2021, Craft Interactive and Contributors
# See license.txt
from __future__ import unicode_literals
# import frappe
import unittest
class TestContracts(unittest.TestCase):
pass
| 19.909091 | 56 | 0.767123 |
749e185050ff9de8f184301e76255e0146286a7e | 492 | py | Python | tidypip/args/packages_arg.py | cloew/tidypip | c8635c75c6a9d0dbc0022eecbe68ea79509f71a1 | [
"MIT"
] | null | null | null | tidypip/args/packages_arg.py | cloew/tidypip | c8635c75c6a9d0dbc0022eecbe68ea79509f71a1 | [
"MIT"
] | null | null | null | tidypip/args/packages_arg.py | cloew/tidypip | c8635c75c6a9d0dbc0022eecbe68ea79509f71a1 | [
"MIT"
] | null | null | null | from ..packages import PackageFactory
from kao_command.args import Arg
class PackagesArg(Arg):
""" Represents an argument that specifies packages """
def __init__(self, *, help):
""" Initialize the Arg """
Arg.__init__(self, 'packages', action='store', nargs='+', help=help)
... | 35.142857 | 77 | 0.628049 |
749e1a759e70d819a7be79801da2108333322bd4 | 3,901 | py | Python | chargebee/models/export.py | cloudtruth/chargebee-python | d72c45f0ff32170fd7d03fcfbc7c4f2b3a379324 | [
"MIT"
] | 28 | 2015-09-16T01:52:44.000Z | 2022-01-13T21:38:55.000Z | chargebee/models/export.py | cloudtruth/chargebee-python | d72c45f0ff32170fd7d03fcfbc7c4f2b3a379324 | [
"MIT"
] | 45 | 2015-01-22T15:41:23.000Z | 2022-03-31T11:12:49.000Z | chargebee/models/export.py | cloudtruth/chargebee-python | d72c45f0ff32170fd7d03fcfbc7c4f2b3a379324 | [
"MIT"
] | 23 | 2017-01-10T15:41:48.000Z | 2022-03-21T14:16:54.000Z | import json
from chargebee.model import Model
from chargebee import request
from chargebee import APIError
class Export(Model):
class Download(Model):
fields = ["download_url", "valid_till"]
pass
fields = ["id", "operation_type", "mime_type", "status", "created_at", "download"]
def wait_for_ex... | 40.216495 | 108 | 0.683415 |
749e2595cdf8d2e4394bb6309b6adf52346b16ab | 4,379 | py | Python | tests/models/test_ModelsSimCLR.py | Tekrific/lightly | 75a1d56b4cee77f68e0f3166e3a412711d0dbb2d | [
"MIT"
] | 1,515 | 2020-10-05T13:04:17.000Z | 2022-03-31T16:14:55.000Z | tests/models/test_ModelsSimCLR.py | Tekrific/lightly | 75a1d56b4cee77f68e0f3166e3a412711d0dbb2d | [
"MIT"
] | 628 | 2020-10-14T11:38:51.000Z | 2022-03-31T14:40:54.000Z | tests/models/test_ModelsSimCLR.py | Tekrific/lightly | 75a1d56b4cee77f68e0f3166e3a412711d0dbb2d | [
"MIT"
] | 108 | 2020-10-17T08:31:06.000Z | 2022-03-20T16:44:22.000Z | import unittest
import torch
import torch.nn as nn
import torchvision
import lightly
from lightly.models import ResNetGenerator
from lightly.models import SimCLR
def get_backbone(resnet, num_ftrs=64):
last_conv_channels = list(resnet.children())[-1].in_features
backbone = nn.Sequential(
lightly.mode... | 37.110169 | 81 | 0.585065 |
749e2db50472a2290407fc80fb96c2257a234cc7 | 4,368 | py | Python | src/py65/disassembler.py | BigEd/py65 | 57d5e7191362006c1d6fa20662da3e4854f1b7c2 | [
"BSD-3-Clause"
] | 1 | 2021-04-04T09:55:04.000Z | 2021-04-04T09:55:04.000Z | src/py65/disassembler.py | BigEd/py65 | 57d5e7191362006c1d6fa20662da3e4854f1b7c2 | [
"BSD-3-Clause"
] | null | null | null | src/py65/disassembler.py | BigEd/py65 | 57d5e7191362006c1d6fa20662da3e4854f1b7c2 | [
"BSD-3-Clause"
] | null | null | null | from py65.utils.addressing import AddressParser
class Disassembler:
def __init__(self, mpu, address_parser=None):
if address_parser is None:
address_parser = AddressParser()
self._mpu = mpu
self._address_parser = address_parser
self.addrWidth = mpu.addrWidth
se... | 35.512195 | 74 | 0.529304 |
749e43a027015ea61ac58aa790aece696e38104f | 1,986 | py | Python | setup.py | PabloCastellano/openwisp-utils | 7d48e266078e989e836f09afb60c53f06c6ef998 | [
"BSD-3-Clause"
] | 2 | 2019-01-29T08:21:38.000Z | 2020-01-10T13:54:52.000Z | setup.py | PabloCastellano/openwisp-utils | 7d48e266078e989e836f09afb60c53f06c6ef998 | [
"BSD-3-Clause"
] | null | null | null | setup.py | PabloCastellano/openwisp-utils | 7d48e266078e989e836f09afb60c53f06c6ef998 | [
"BSD-3-Clause"
] | 1 | 2020-01-10T14:28:50.000Z | 2020-01-10T14:28:50.000Z | #!/usr/bin/env python
import os
import sys
from openwisp_utils import get_version
from setuptools import find_packages, setup
if sys.argv[-1] == 'publish':
# delete any *.pyc, *.pyo and __pycache__
os.system('find . | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf')
os.system("python setup.py sdist b... | 33.661017 | 77 | 0.62286 |
749e643caafbd1144007d4aff9554d94bb33d890 | 350 | py | Python | tests/utils/test_utils_select_all_bosses.py | battleforcastile/battleforcastile | 65223fcb56ecc550f1a7c7b70beadff22c866d85 | [
"MIT"
] | null | null | null | tests/utils/test_utils_select_all_bosses.py | battleforcastile/battleforcastile | 65223fcb56ecc550f1a7c7b70beadff22c866d85 | [
"MIT"
] | 1 | 2021-08-21T10:16:03.000Z | 2021-08-21T10:16:03.000Z | tests/utils/test_utils_select_all_bosses.py | battleforcastile/battleforcastile | 65223fcb56ecc550f1a7c7b70beadff22c866d85 | [
"MIT"
] | null | null | null | import os
from battleforcastile.utils.select_all_files import select_all_files
CURRENT_PATH = os.path.dirname(os.path.abspath(__file__))
def test_if_all_bosses_can_be_selected():
path = os.path.join(CURRENT_PATH, 'fixtures', 'bosses')
bosses = select_all_files(path)
assert len(bosses) == 1
assert bo... | 26.923077 | 68 | 0.734286 |
749e64b0eaea6a0d265a2f4d6bde21af95d1525e | 433 | py | Python | violas_client/lbrtypes/account_config/constants/coins.py | violas-core/violas-client | e8798f7d081ac218b78b81fd7eb2f8da92631a16 | [
"MIT"
] | null | null | null | violas_client/lbrtypes/account_config/constants/coins.py | violas-core/violas-client | e8798f7d081ac218b78b81fd7eb2f8da92631a16 | [
"MIT"
] | null | null | null | violas_client/lbrtypes/account_config/constants/coins.py | violas-core/violas-client | e8798f7d081ac218b78b81fd7eb2f8da92631a16 | [
"MIT"
] | 1 | 2022-01-05T06:49:42.000Z | 2022-01-05T06:49:42.000Z | from violas_client.lbrtypes.account_config.constants import from_currency_code_string, CORE_CODE_ADDRESS
from violas_client.move_core_types.language_storage import StructTag, TypeTag
COIN1_NAME = "Coin1"
COIN2_NAME = "Coin2"
def coin1_type() ->TypeTag:
return TypeTag("Struct", StructTag(
CORE_CODE_ADDRESS... | 33.307692 | 104 | 0.764434 |
749e69f4432e21907fce69c7afff70370427e642 | 70,154 | py | Python | bff/plot/plot.py | axelfahy/FancyPythonThings | 5df204973f94dab5e7081c59d25554165db955c9 | [
"MIT"
] | 1 | 2022-03-28T09:39:08.000Z | 2022-03-28T09:39:08.000Z | bff/plot/plot.py | axelfahy/FancyPythonThings | 5df204973f94dab5e7081c59d25554165db955c9 | [
"MIT"
] | 19 | 2019-06-20T14:47:09.000Z | 2020-06-12T13:03:50.000Z | bff/plot/plot.py | axelfahy/FancyPythonThings | 5df204973f94dab5e7081c59d25554165db955c9 | [
"MIT"
] | 2 | 2019-06-21T09:13:11.000Z | 2020-04-28T19:34:48.000Z | # -*- coding: utf-8 -*-
"""Plot functions of the bff library.
This module contains fancy plot functions.
"""
# pylint: disable=C0302
import itertools
import logging
from collections import Counter
from typing import Any, List, Optional, Sequence, Tuple, Union
import matplotlib as mpl
import matplotlib.cm as cm
import ... | 39.104794 | 98 | 0.572312 |
749e9bf0948c0e859c0cb7f49b15cbdebf27b7a1 | 11,770 | py | Python | savu/plugins/loaders/full_field_loaders/nxtomo_loader.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | null | null | null | savu/plugins/loaders/full_field_loaders/nxtomo_loader.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | null | null | null | savu/plugins/loaders/full_field_loaders/nxtomo_loader.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 Diamond Light Source Ltd.
#
# 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 t... | 39.364548 | 105 | 0.593288 |
749e9e3574f2e0fdca9b472afe4f613b421347d5 | 2,018 | py | Python | tests/local/warehouse/samples/test_tests_sql_metric_failed_rows.py | fbertsch/soda-sql | 112fd2efad64795b03dc55143fbf6a8385c93c8c | [
"Apache-2.0"
] | null | null | null | tests/local/warehouse/samples/test_tests_sql_metric_failed_rows.py | fbertsch/soda-sql | 112fd2efad64795b03dc55143fbf6a8385c93c8c | [
"Apache-2.0"
] | null | null | null | tests/local/warehouse/samples/test_tests_sql_metric_failed_rows.py | fbertsch/soda-sql | 112fd2efad64795b03dc55143fbf6a8385c93c8c | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Soda
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
#... | 38.807692 | 107 | 0.647671 |
749eb1f322aa4580f866d4f2cfbd9236814d4d84 | 340 | py | Python | examples/addons/internet-in-mirror.py | fedosgad/mitmproxy | 7eacc41f3b1079e000cf6b6c19c0f337d6e01177 | [
"MIT"
] | null | null | null | examples/addons/internet-in-mirror.py | fedosgad/mitmproxy | 7eacc41f3b1079e000cf6b6c19c0f337d6e01177 | [
"MIT"
] | null | null | null | examples/addons/internet-in-mirror.py | fedosgad/mitmproxy | 7eacc41f3b1079e000cf6b6c19c0f337d6e01177 | [
"MIT"
] | null | null | null | """
Mirror all web pages.
Useful if you are living down under.
"""
from mitmproxy import http
def response(flow: http.HTTPFlow) -> None:
if flow.response and flow.response.content:
flow.response.content = flow.response.content.replace(
b"</head>", b"<style>body {transform: scaleX(-1);}</style... | 24.285714 | 78 | 0.65 |
749ec342e7c3073b6cd3ed7b9aa14ffdf01582a0 | 943 | py | Python | solutions/construct-binary-tree-from-preorder-and-inorder-traversal.py | edab/-LC_StudyPlan_Python | e065f0ced68d23800d7b5001102c2e930ee35e23 | [
"MIT"
] | null | null | null | solutions/construct-binary-tree-from-preorder-and-inorder-traversal.py | edab/-LC_StudyPlan_Python | e065f0ced68d23800d7b5001102c2e930ee35e23 | [
"MIT"
] | 1 | 2022-02-22T15:42:54.000Z | 2022-02-25T00:10:04.000Z | solutions/construct-binary-tree-from-preorder-and-inorder-traversal.py | edab/-LC_StudyPlan_Python | e065f0ced68d23800d7b5001102c2e930ee35e23 | [
"MIT"
] | null | null | null | # Leetcode 105. Construct Binary Tree from Preorder and Inorder Traversal
#
# Link: https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/
# Difficulty: Medium
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self... | 31.433333 | 96 | 0.664899 |
749ee65219ec0eb3d0f40433c9670d0f89c681bc | 3,656 | py | Python | pdbdb/io/PDBIO.py | sndg-arg/covid19-web | fe809c87563a00bbec53c3646338d571fdde6a69 | [
"MIT"
] | null | null | null | pdbdb/io/PDBIO.py | sndg-arg/covid19-web | fe809c87563a00bbec53c3646338d571fdde6a69 | [
"MIT"
] | 2 | 2021-03-10T17:08:59.000Z | 2021-09-29T17:40:48.000Z | pdbdb/io/PDBIO.py | sndg-arg/covid19-web | fe809c87563a00bbec53c3646338d571fdde6a69 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
import warnings
from Bio import BiopythonWarning, BiopythonParserWarning, BiopythonDeprecationWarning, BiopythonExperimentalWarning
warnings.simplefilter('ignore', RuntimeWarning)
warnings.simplefilter('ignore', BiopythonWarning)
warnings.simpl... | 36.56 | 115 | 0.641411 |
749eece55d157fd847af39939a0cc8e846ac8db5 | 600 | py | Python | automol/inchi/_assess.py | sjklipp/automol | ba87f4443ebe2ceb5929d4269c4be93fd28f68ca | [
"Apache-2.0"
] | null | null | null | automol/inchi/_assess.py | sjklipp/automol | ba87f4443ebe2ceb5929d4269c4be93fd28f68ca | [
"Apache-2.0"
] | null | null | null | automol/inchi/_assess.py | sjklipp/automol | ba87f4443ebe2ceb5929d4269c4be93fd28f68ca | [
"Apache-2.0"
] | 7 | 2019-12-18T20:11:06.000Z | 2020-10-14T08:54:16.000Z | """ Checks that have to be done at the high-level of inchi directory
since they require other automol imports
"""
import numbers
import automol.graph
import automol.inchi
def is_valid_inchi_multiplicity(ich, mul):
""" is this multiplicity compatible with this inchi string?
:param ich: inchi
:type ic... | 26.086957 | 68 | 0.718333 |
749ef007e9109d60a90815cc1a77445fba7244d8 | 4,233 | py | Python | rotkehlchen/tests/test_trades.py | bobkilla/rotkehlchen | f611351e39cb1ebcc16f1344b4f7adaa441cc763 | [
"BSD-3-Clause"
] | 1 | 2019-08-04T08:30:14.000Z | 2019-08-04T08:30:14.000Z | rotkehlchen/tests/test_trades.py | bobkilla/rotkehlchen | f611351e39cb1ebcc16f1344b4f7adaa441cc763 | [
"BSD-3-Clause"
] | null | null | null | rotkehlchen/tests/test_trades.py | bobkilla/rotkehlchen | f611351e39cb1ebcc16f1344b4f7adaa441cc763 | [
"BSD-3-Clause"
] | null | null | null | import pytest
from rotkehlchen.assets.asset import Asset
from rotkehlchen.constants.assets import A_BTC, A_ETH
from rotkehlchen.errors import UnknownAsset
from rotkehlchen.fval import FVal
from rotkehlchen.order_formatting import (
Trade,
deserialize_trade,
trade_get_assets,
trades_from_dictlist,
)
fro... | 28.795918 | 66 | 0.657217 |
749f4ed988a71ef759416d78c87f5a0ffb3d381b | 2,031 | py | Python | xos/tosca/tests/observerSliceTest.py | xmaruto/mcord | 3678a3d10c3703c2b73f396c293faebf0c82a4f4 | [
"Apache-2.0"
] | null | null | null | xos/tosca/tests/observerSliceTest.py | xmaruto/mcord | 3678a3d10c3703c2b73f396c293faebf0c82a4f4 | [
"Apache-2.0"
] | 5 | 2020-06-05T17:47:15.000Z | 2021-09-23T23:21:27.000Z | xos/tosca/tests/observerSliceTest.py | pan2za/xos | c2a4da2ccaa12360b2718be303b247866aefdfe6 | [
"Apache-2.0"
] | null | null | null | from observertest import BaseObserverToscaTest
from core.models import Site, Deployment, Slice, ControllerSlice
# Note that as a side effect, these tests will also create a Site
class ObserverSliceTest(BaseObserverToscaTest):
tests = ["create_slice"]
# hide_observer_output = False # uncomment to display lots... | 41.44898 | 141 | 0.67356 |
749f6da6ccda97bc83c54b8feaebeabe12a8c458 | 8,674 | py | Python | app/main.py | DaSKITA/tilter | 4de2550b962ca04285ccfbe7e924bb0c5f7a74a6 | [
"MIT"
] | 3 | 2021-07-09T05:53:00.000Z | 2021-11-19T09:19:18.000Z | app/main.py | DaSKITA/tilter | 4de2550b962ca04285ccfbe7e924bb0c5f7a74a6 | [
"MIT"
] | 13 | 2021-07-14T12:31:28.000Z | 2022-01-21T16:45:25.000Z | app/main.py | DaSKITA/tilter | 4de2550b962ca04285ccfbe7e924bb0c5f7a74a6 | [
"MIT"
] | 1 | 2021-07-08T18:31:56.000Z | 2021-07-08T18:31:56.000Z | from mongoengine.errors import DoesNotExist
from api.restx import ns
from config import Config
from database.db import db
from database.models import Task, User, Annotation
from flask import Blueprint, flash, Flask, Markup, render_template, redirect, request, url_for
from flask_babel import _, Babel, Domain
from fl... | 36.754237 | 121 | 0.677427 |
749f75ddc3ee6d6520c580a24c5fbc0ea336a3ca | 822 | py | Python | src/units/_evaluation.py | ferrocactus/cellar | d1733d4643b3a4c960529806d4904ab3b3c54666 | [
"MIT"
] | 7 | 2020-11-16T16:50:37.000Z | 2021-09-08T16:56:32.000Z | src/units/_evaluation.py | ferrocactus/cellar | d1733d4643b3a4c960529806d4904ab3b3c54666 | [
"MIT"
] | null | null | null | src/units/_evaluation.py | ferrocactus/cellar | d1733d4643b3a4c960529806d4904ab3b3c54666 | [
"MIT"
] | 3 | 2020-07-03T04:14:55.000Z | 2021-03-14T21:51:22.000Z | from sklearn.metrics import (calinski_harabasz_score, davies_bouldin_score,
silhouette_score)
from ._unit import Unit
class Eval_Silhouette(Unit):
def __init__(self, **kwargs):
self.kwargs = kwargs
def get(self, x, labels):
return silhouette_score(x, labels, **se... | 26.516129 | 75 | 0.6618 |
749fad2f96d79cba448050109900ae86d061cf73 | 14,918 | py | Python | SCRAPE/Lib/site-packages/twisted/conch/interfaces.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 4,612 | 2015-01-01T12:57:23.000Z | 2022-03-30T01:08:23.000Z | SCRAPE/Lib/site-packages/twisted/conch/interfaces.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 1,243 | 2015-01-23T17:23:59.000Z | 2022-03-28T13:46:17.000Z | SCRAPE/Lib/site-packages/twisted/conch/interfaces.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 1,236 | 2015-01-13T14:41:26.000Z | 2022-03-17T07:12:36.000Z | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
This module contains interfaces defined for the L{twisted.conch} package.
"""
from zope.interface import Attribute, Interface
class IConchUser(Interface):
"""
A user who has been authenticated to Cred through Conch. This is
the... | 32.786813 | 80 | 0.632592 |
749fdafe5ced5f0f9f60baaf5795a688752dbf06 | 473 | py | Python | spatialpandas/__init__.py | isabella232/spatialpandas | 0a4e08ecf2c9e2f69c65c627cc353d88b6cd2807 | [
"BSD-2-Clause"
] | null | null | null | spatialpandas/__init__.py | isabella232/spatialpandas | 0a4e08ecf2c9e2f69c65c627cc353d88b6cd2807 | [
"BSD-2-Clause"
] | 1 | 2021-04-17T15:22:28.000Z | 2021-04-17T15:22:28.000Z | spatialpandas/__init__.py | isabella232/spatialpandas | 0a4e08ecf2c9e2f69c65c627cc353d88b6cd2807 | [
"BSD-2-Clause"
] | 1 | 2021-04-17T15:22:00.000Z | 2021-04-17T15:22:00.000Z | from . import geometry, spatialindex, tools
from .geoseries import GeoSeries
from .geodataframe import GeoDataFrame
from .tools.sjoin import sjoin
import param as _param
try:
import dask.dataframe
# Import to trigger registration of types with Dask
import spatialpandas.dask
except ImportError:
# Dask d... | 26.277778 | 75 | 0.767442 |
749ff65c8a9a5594798ed409501aec1c7ed0a595 | 1,737 | py | Python | tests/st/ops/test_fused_is_finite.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 286 | 2020-06-23T06:40:44.000Z | 2022-03-30T01:27:49.000Z | tests/st/ops/test_fused_is_finite.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 10 | 2020-07-31T03:26:59.000Z | 2021-12-27T15:00:54.000Z | tests/st/ops/test_fused_is_finite.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 30 | 2020-07-17T01:04:14.000Z | 2021-12-27T14:05:19.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# 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... | 34.74 | 87 | 0.656304 |
749ff997e113b91c34c7513d6e5afb609aa123da | 1,587 | py | Python | src/main/resources/remedy/createEntry.py | frootima/Remedy_plugin | 7c67f0c410b19386515e1dea4c8d1c4864fd2299 | [
"MIT"
] | 2 | 2018-12-13T06:40:52.000Z | 2020-01-27T19:44:52.000Z | src/main/resources/remedy/createEntry.py | frootima/Remedy_plugin | 7c67f0c410b19386515e1dea4c8d1c4864fd2299 | [
"MIT"
] | 5 | 2019-04-25T18:43:33.000Z | 2020-10-01T14:49:29.000Z | src/main/resources/remedy/createEntry.py | frootima/Remedy_plugin | 7c67f0c410b19386515e1dea4c8d1c4864fd2299 | [
"MIT"
] | 6 | 2019-05-13T16:51:42.000Z | 2020-03-05T23:54:20.000Z | #
# Copyright 2019 XEBIALABS
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, subli... | 48.090909 | 462 | 0.778828 |
74a085e0771b98cf18e4270684a7a21a2ace7d55 | 7,827 | py | Python | onmt/modules/global_attention.py | leejihwan23/NMT-GPU | 96464effc6f328cc94d553df996b19a9ffe64c60 | [
"Apache-2.0"
] | 5,864 | 2017-02-24T19:17:07.000Z | 2022-03-31T20:49:22.000Z | onmt/modules/global_attention.py | leejihwan23/NMT-GPU | 96464effc6f328cc94d553df996b19a9ffe64c60 | [
"Apache-2.0"
] | 1,727 | 2017-02-27T09:09:56.000Z | 2022-03-29T17:08:29.000Z | onmt/modules/global_attention.py | leejihwan23/NMT-GPU | 96464effc6f328cc94d553df996b19a9ffe64c60 | [
"Apache-2.0"
] | 2,570 | 2017-02-24T19:20:36.000Z | 2022-03-31T06:24:22.000Z | """Global attention modules (Luong / Bahdanau)"""
import torch
import torch.nn as nn
import torch.nn.functional as F
from onmt.modules.sparse_activations import sparsemax
from onmt.utils.misc import aeq, sequence_mask
# This class is mainly used by decoder.py for RNNs but also
# by the CNN / transformer decoder when ... | 34.328947 | 79 | 0.576083 |
74a09baae579077e49a24738198d1258fe86a1bc | 1,842 | py | Python | test/test_car_scraping_1.py | Simeon94/ebay_car_scraper_pypi | f66658ba785e2a100778cb453d99630844356856 | [
"MIT"
] | null | null | null | test/test_car_scraping_1.py | Simeon94/ebay_car_scraper_pypi | f66658ba785e2a100778cb453d99630844356856 | [
"MIT"
] | null | null | null | test/test_car_scraping_1.py | Simeon94/ebay_car_scraper_pypi | f66658ba785e2a100778cb453d99630844356856 | [
"MIT"
] | null | null | null | # __package__ = None
from selenium import webdriver
import sys
import os.path
#sys.path.append(os.path.join(os.path.dirname(__file__), r'C:\Users\Simeon\PycharmProjects\ebay_car_scraper_pypi'))
import car_scraper
import unittest
from car_scraper.car_scraping_1 import Carscraper
import random
#Customized options for Ch... | 39.191489 | 115 | 0.719327 |
74a0b07180bb07c21f4a950cb9c09fd719c09379 | 1,347 | py | Python | scan/blocks.py | arnold-maderthaner/Superior-Cache-ANalyzer | a6daa518734b69f2932beb69c0dd270f4bf0ebd6 | [
"Apache-2.0"
] | 14 | 2018-06-29T14:38:57.000Z | 2022-02-08T03:02:53.000Z | scan/blocks.py | arnold-maderthaner/Superior-Cache-ANalyzer | a6daa518734b69f2932beb69c0dd270f4bf0ebd6 | [
"Apache-2.0"
] | 20 | 2018-06-01T19:53:03.000Z | 2019-09-19T15:53:04.000Z | scan/blocks.py | arnold-maderthaner/Superior-Cache-ANalyzer | a6daa518734b69f2932beb69c0dd270f4bf0ebd6 | [
"Apache-2.0"
] | 6 | 2018-07-23T04:30:04.000Z | 2021-06-16T08:25:07.000Z | # Copyright 2018 Comcast Cable Communications Management, 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... | 32.071429 | 82 | 0.709725 |
74a0ba8861de7c5f1c6834fd020c072f964f84b3 | 4,642 | py | Python | tests/utils/discrete_distribution/test_BivariateDiscreteDistribution.py | JureBericic/dices | e59a63162780e70d26132b65f65e54b608a3b848 | [
"MIT"
] | null | null | null | tests/utils/discrete_distribution/test_BivariateDiscreteDistribution.py | JureBericic/dices | e59a63162780e70d26132b65f65e54b608a3b848 | [
"MIT"
] | null | null | null | tests/utils/discrete_distribution/test_BivariateDiscreteDistribution.py | JureBericic/dices | e59a63162780e70d26132b65f65e54b608a3b848 | [
"MIT"
] | null | null | null | import pytest
from dices.utils.discrete_distribution import BivariateDiscreteDistribution
def test_initialized_correctly_without_weights():
# Arrange
population_X = [1, 2]
population_Y = [10, 20, 30]
# Act
dist = BivariateDiscreteDistribution(population_X, population_Y)
# Assert
assert ... | 27.796407 | 119 | 0.646919 |
74a0c38987f243ba265a060680db68e3e7366066 | 1,260 | py | Python | pydeepgenomics/preprocess/examples/setup_ex_env.py | digitalepidemiologylab/pydeepgenomics | 331f6506e068d6a35faee44b9d0371f2f1f2cafb | [
"MIT"
] | 1 | 2017-01-18T08:03:51.000Z | 2017-01-18T08:03:51.000Z | pydeepgenomics/preprocess/examples/setup_ex_env.py | salathegroup/pydeepgenomics | 331f6506e068d6a35faee44b9d0371f2f1f2cafb | [
"MIT"
] | null | null | null | pydeepgenomics/preprocess/examples/setup_ex_env.py | salathegroup/pydeepgenomics | 331f6506e068d6a35faee44b9d0371f2f1f2cafb | [
"MIT"
] | 1 | 2021-01-07T13:13:09.000Z | 2021-01-07T13:13:09.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import shutil
cmd_subfolder = os.path.dirname(os.path.abspath(__file__))
while not cmd_subfolder .endswith('pydeepgenomics'):
cmd_subfolder = os.path.dirname(cmd_subfolder)
cmd_subfolder = os.path.dirname(cmd_subfolder)
try:
from p... | 30.731707 | 81 | 0.665873 |
74a12dd339bd1a797869c2c94a82d5d3c66f93b0 | 778 | py | Python | scripts/tests/save_data.py | AS7-AAU/agv_as18 | 6fdda5deea78ae2b1260c7b9de1027b333b64f17 | [
"BSD-3-Clause"
] | 1 | 2019-06-17T00:39:10.000Z | 2019-06-17T00:39:10.000Z | scripts/tests/save_data.py | AS7-AAU/agv_as18 | 6fdda5deea78ae2b1260c7b9de1027b333b64f17 | [
"BSD-3-Clause"
] | null | null | null | scripts/tests/save_data.py | AS7-AAU/agv_as18 | 6fdda5deea78ae2b1260c7b9de1027b333b64f17 | [
"BSD-3-Clause"
] | null | null | null | import serial
import csv
from time import sleep
# ser.write('0&-48'.encode()) # format is: desired speed on motor A & desired speed on motor B
# ser.close() # close it if you are done seding data, otherwise keep connection open
with open(r'encoders.csv', 'a',newline='') as csvfile:
ser = serial.Serial("COM3",2500... | 43.222222 | 95 | 0.631105 |
74a13617613a61a7bc30fbc6c786696af25292eb | 2,556 | py | Python | templateflow/conf/__init__.py | yarikoptic/python-client | ca302ad88cac860fd7848581937954f1a46c6a41 | [
"Apache-2.0"
] | null | null | null | templateflow/conf/__init__.py | yarikoptic/python-client | ca302ad88cac860fd7848581937954f1a46c6a41 | [
"Apache-2.0"
] | null | null | null | templateflow/conf/__init__.py | yarikoptic/python-client | ca302ad88cac860fd7848581937954f1a46c6a41 | [
"Apache-2.0"
] | null | null | null | """Configuration and settings."""
from os import getenv
from warnings import warn
from pathlib import Path
TF_DEFAULT_HOME = Path.home() / ".cache" / "templateflow"
TF_HOME = Path(getenv("TEMPLATEFLOW_HOME", str(TF_DEFAULT_HOME)))
TF_GITHUB_SOURCE = "https://github.com/templateflow/templateflow.git"
TF_S3_ROOT = "http... | 26.350515 | 82 | 0.645149 |
74a14537a45b4f0847f327a201e5273e2628576d | 26,910 | py | Python | tofnet/training/strategies.py | victorjoos/tof2net | 068f5f08a241dbfb950251bea52fd9379466bf2f | [
"MIT"
] | null | null | null | tofnet/training/strategies.py | victorjoos/tof2net | 068f5f08a241dbfb950251bea52fd9379466bf2f | [
"MIT"
] | 8 | 2021-02-02T23:07:37.000Z | 2022-03-12T00:51:26.000Z | tofnet/training/strategies.py | victorjoos/tof2net | 068f5f08a241dbfb950251bea52fd9379466bf2f | [
"MIT"
] | 2 | 2020-10-01T08:23:24.000Z | 2020-11-09T22:01:47.000Z | import inspect
import torch
import json
import toml
import collections
import types
import numpy as np
from collections import OrderedDict, defaultdict
from pathlib import Path
from shutil import rmtree, copy2
import os
from subprocess import check_output, DEVNULL
import tempfile
import pandas as pd
import shutil
from ... | 38.831169 | 117 | 0.567038 |
74a16458c2f2be181887c28ce1826f3de0983fbd | 14,353 | py | Python | trac/notification/model.py | mikiec84/trac | d51a7119b9fcb9061d7fe135c7d648fa671555dd | [
"BSD-3-Clause"
] | null | null | null | trac/notification/model.py | mikiec84/trac | d51a7119b9fcb9061d7fe135c7d648fa671555dd | [
"BSD-3-Clause"
] | null | null | null | trac/notification/model.py | mikiec84/trac | d51a7119b9fcb9061d7fe135c7d648fa671555dd | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2014-2020 Edgewall Software
# Copyright (C) 2010 Robert Corsaro
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at https://trac.edgewall.org/wiki... | 39.002717 | 79 | 0.522609 |
74a1cdfff920584eecaddd63e8dcb76f396ec66f | 2,045 | py | Python | code/processing/seq/20210507_lacI_negctrl_library_mapping/processing_seq.py | RPGroup-PBoC/rnaseq_barcode | f90bdd7388d08b8dd1eeaaaedd75040580af5f10 | [
"MIT"
] | null | null | null | code/processing/seq/20210507_lacI_negctrl_library_mapping/processing_seq.py | RPGroup-PBoC/rnaseq_barcode | f90bdd7388d08b8dd1eeaaaedd75040580af5f10 | [
"MIT"
] | 1 | 2020-11-02T19:07:52.000Z | 2020-11-02T19:07:52.000Z | code/processing/seq/20210507_lacI_negctrl_library_mapping/processing_seq.py | RPGroup-PBoC/rnaseq_barcode | f90bdd7388d08b8dd1eeaaaedd75040580af5f10 | [
"MIT"
] | null | null | null | #%%
import os
import glob
import pandas as pd
import git
#%%
# Date for sequencing run of the library to map
DATE = 20210507
# Description to be attached to folder names
DESCRIPTION = '_lacI_negctrl_library_mapping/'
# Find project parental folder
repo = git.Repo('./', search_parent_directories=True)
homedir = repo.w... | 28.402778 | 71 | 0.664548 |
74a1d093c8a5b0209c78d05b7853b83e9f2a5ad3 | 5,371 | py | Python | tests/openassetio/pluginSystem/test_pluginsystemmanagerfactory.py | carmenpinto/OpenAssetIO | 62e6f30f658684e4ea73bf4aa3b0156399989c89 | [
"Apache-2.0"
] | null | null | null | tests/openassetio/pluginSystem/test_pluginsystemmanagerfactory.py | carmenpinto/OpenAssetIO | 62e6f30f658684e4ea73bf4aa3b0156399989c89 | [
"Apache-2.0"
] | null | null | null | tests/openassetio/pluginSystem/test_pluginsystemmanagerfactory.py | carmenpinto/OpenAssetIO | 62e6f30f658684e4ea73bf4aa3b0156399989c89 | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2013-2021 The Foundry Visionmongers Ltd
#
# 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 app... | 34.876623 | 90 | 0.749209 |
74a2292cee495f2571c45307cd1f190707119869 | 6,797 | py | Python | src/djshop/apps/sale/models.py | diegojromerolopez/djshop | 3fe623532228006e96269bd0f21c7b7d380c3a1a | [
"MIT"
] | null | null | null | src/djshop/apps/sale/models.py | diegojromerolopez/djshop | 3fe623532228006e96269bd0f21c7b7d380c3a1a | [
"MIT"
] | 1 | 2017-05-08T17:05:00.000Z | 2018-04-04T11:55:30.000Z | src/djshop/apps/sale/models.py | diegojromerolopez/djshop | 3fe623532228006e96269bd0f21c7b7d380c3a1a | [
"MIT"
] | 2 | 2017-04-25T10:32:57.000Z | 2020-05-04T16:12:08.000Z | from __future__ import unicode_literals
from django.db import models, transaction
from django.utils import timezone
from djshop.apps.offers.models import GroupOffer, BundleOffer
import random
class Sale(models.Model):
STATUS_CHOICES = (
("pending", "Pending"),
("canceled", "Canceled"),
("... | 45.61745 | 150 | 0.678388 |
74a235fc3e22dc39166e67c303aca283cbf16656 | 810 | py | Python | programming tasks/labyrinth/secondTryLAB.py | BoyanHH/training-projects | a7dc23e118fb78beec23992338e099f983c43e67 | [
"Apache-2.0"
] | null | null | null | programming tasks/labyrinth/secondTryLAB.py | BoyanHH/training-projects | a7dc23e118fb78beec23992338e099f983c43e67 | [
"Apache-2.0"
] | null | null | null | programming tasks/labyrinth/secondTryLAB.py | BoyanHH/training-projects | a7dc23e118fb78beec23992338e099f983c43e67 | [
"Apache-2.0"
] | null | null | null | matrix = [
[' ', ' ', ' ', ' ', ' ', ' ', ' '],
[' ', ' ', ' ', ' ', ' ', ' ', ' '],
[' ', ' ', ' ', ' ', ' ', ' ', ' '],
[' ', '*', '*', ' ', ' ', ' ', ' '],
[' ', ' ', ' ', ' ', ' ', ' ', 'e']
]
import dada ##vtori cikul
import treti
import four
import peti
numOfTries=0
def search(x, y):
global numOfTries
... | 21.315789 | 149 | 0.448148 |
74a2378ba27e21fdeee7fe4b27e5c1b10a80d658 | 3,871 | py | Python | framework/tasks/storage_tasks.py | CIMAC-CIDC/cidc-taskmanager | f6fcadb06a300c905f88de8879198d6485e6fc6a | [
"MIT"
] | null | null | null | framework/tasks/storage_tasks.py | CIMAC-CIDC/cidc-taskmanager | f6fcadb06a300c905f88de8879198d6485e6fc6a | [
"MIT"
] | 14 | 2019-03-01T02:35:36.000Z | 2019-05-28T18:31:24.000Z | framework/tasks/storage_tasks.py | CIMAC-CIDC/cidc-taskmanager | f6fcadb06a300c905f88de8879198d6485e6fc6a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Celery tasks for handling some basic interaction with uploaded files.
"""
__author__ = "Lloyd McCarthy"
__license__ = "MIT"
import datetime
import logging
import subprocess
from typing import List
from cidc_utils.loghandler.stack_driver_handler import log_formatted
from cidc_utils.requests i... | 33.37069 | 89 | 0.64092 |
74a24cd4198f8843df500734687cf653889f0f58 | 181 | py | Python | app/resources/root/resources/__init__.py | admiralobvious/falcon-boilerplate | eb076ff9e1d6fb1e537b18f86d2228afbf123e19 | [
"MIT"
] | 34 | 2016-10-26T17:19:23.000Z | 2020-04-30T09:12:34.000Z | app/resources/root/resources/__init__.py | admiralobvious/falcon-boilerplate | eb076ff9e1d6fb1e537b18f86d2228afbf123e19 | [
"MIT"
] | 2 | 2019-04-09T11:50:38.000Z | 2019-07-05T03:31:57.000Z | app/resources/root/resources/__init__.py | admiralobvious/falcon-boilerplate | eb076ff9e1d6fb1e537b18f86d2228afbf123e19 | [
"MIT"
] | 12 | 2017-01-14T09:40:24.000Z | 2020-04-16T07:40:56.000Z | import falcon
from .hello import HelloName
from .root import Root
def get_routes(app: falcon.App):
app.add_route("/", Root())
app.add_route("/hello/{name}", HelloName())
| 18.1 | 47 | 0.690608 |
74a2558f8460fdc90381917dbc45ac72e50d3fc9 | 6,370 | py | Python | aries-cloudagent-python/aries_cloudagent/utils/http.py | sed-szeged/IndyPerf | 68bb48c7c651cae113cf30696110825ff3267ccc | [
"CC0-1.0"
] | null | null | null | aries-cloudagent-python/aries_cloudagent/utils/http.py | sed-szeged/IndyPerf | 68bb48c7c651cae113cf30696110825ff3267ccc | [
"CC0-1.0"
] | null | null | null | aries-cloudagent-python/aries_cloudagent/utils/http.py | sed-szeged/IndyPerf | 68bb48c7c651cae113cf30696110825ff3267ccc | [
"CC0-1.0"
] | 1 | 2022-02-02T17:05:27.000Z | 2022-02-02T17:05:27.000Z | """HTTP utility methods."""
import asyncio
from aiohttp import BaseConnector, ClientError, ClientResponse, ClientSession
from aiohttp.web import HTTPConflict
from ..core.error import BaseError
from .repeat import RepeatSequence
class FetchError(BaseError):
"""Error raised when an HTTP fetch fails."""
class ... | 36.4 | 86 | 0.59843 |
74a2625f9b2095f5169a8c3e870a041fd555ab7e | 3,789 | py | Python | response/choice.py | DrugowitschLab/motion-structure-identification | 908f084b36c7387daf0cbfe75f16bab70cf96db9 | [
"MIT"
] | null | null | null | response/choice.py | DrugowitschLab/motion-structure-identification | 908f084b36c7387daf0cbfe75f16bab70cf96db9 | [
"MIT"
] | null | null | null | response/choice.py | DrugowitschLab/motion-structure-identification | 908f084b36c7387daf0cbfe75f16bab70cf96db9 | [
"MIT"
] | null | null | null | from task import Task
from utils.time import Timer
from utils.device_input import Devices
from response.visual import draw_structure
from matplotlib.patches import FancyBboxPatch
import pylab as pl
class Choice(Task):
def __init__(self, ax, structures, confidence, padding=0.02, visual=True):
super().__ini... | 39.46875 | 140 | 0.579045 |
74a28be13fefbd98771e6bf181e17e4b6f5cb4a3 | 101 | py | Python | lewis_emulators/keithley_2700/interfaces/__init__.py | ISISComputingGroup/EPICS-DeviceEmulator | 026c2a14a16bb204ea7527e3765daa182cafa814 | [
"BSD-3-Clause"
] | 2 | 2020-10-20T16:49:13.000Z | 2021-02-19T10:41:44.000Z | lewis_emulators/keithley_2700/interfaces/__init__.py | ISISComputingGroup/EPICS-DeviceEmulator | 026c2a14a16bb204ea7527e3765daa182cafa814 | [
"BSD-3-Clause"
] | 9 | 2019-03-22T15:35:15.000Z | 2021-07-28T11:05:43.000Z | lewis_emulators/keithley_2700/interfaces/__init__.py | ISISComputingGroup/EPICS-DeviceEmulator | 026c2a14a16bb204ea7527e3765daa182cafa814 | [
"BSD-3-Clause"
] | 1 | 2020-10-21T17:02:44.000Z | 2020-10-21T17:02:44.000Z | from .stream_interface import Keithley2700StreamInterface
__all__ = ['Keithley2700StreamInterface']
| 25.25 | 57 | 0.861386 |
74a2b4bf837a8a2055d131b6c9782366f9913fc7 | 8,148 | py | Python | algorithms/core/mlp_policy.py | h2r/RobotLearningBaselines | 7d6a104e2afba233fd1ec82dff4e46d9f44ef596 | [
"MIT"
] | 3 | 2020-12-17T06:58:12.000Z | 2021-11-17T01:59:54.000Z | algorithms/core/mlp_policy.py | h2r/RobotLearningBaselines | 7d6a104e2afba233fd1ec82dff4e46d9f44ef596 | [
"MIT"
] | 1 | 2021-03-01T00:23:25.000Z | 2021-03-01T00:23:25.000Z | algorithms/core/mlp_policy.py | h2r/RobotLearningBaselines | 7d6a104e2afba233fd1ec82dff4e46d9f44ef596 | [
"MIT"
] | null | null | null | import torch.nn as nn
import torch
import os
import sys
# We need this below line for Python to actually find the utils directory
# Otherwise, the module is not in the Python path!
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '../..')))
from utils.math import *
from algorithms.core.model_uti... | 37.897674 | 144 | 0.552405 |
74a2bdf9bf0b0a4fe968224461a5a6ad614601e1 | 7,078 | py | Python | autoio-interfaces/mess_io/writer/_glob.py | lpratalimaffei/autoio | 57be6e4882af1841153c19e7353e2531e64ce47f | [
"Apache-2.0"
] | null | null | null | autoio-interfaces/mess_io/writer/_glob.py | lpratalimaffei/autoio | 57be6e4882af1841153c19e7353e2531e64ce47f | [
"Apache-2.0"
] | 1 | 2022-02-15T19:35:14.000Z | 2022-02-15T19:35:14.000Z | autoio-interfaces/mess_io/writer/_glob.py | lpratalimaffei/autoio | 57be6e4882af1841153c19e7353e2531e64ce47f | [
"Apache-2.0"
] | 13 | 2020-06-24T05:21:11.000Z | 2021-05-05T19:58:30.000Z | """
Writes the full sections of a MESS input file
"""
import os
from ioformat import build_mako_str
from ioformat import indent
from ioformat import remove_trail_whitespace
from phydat import phycon
from mess_io.writer._mol_inf import core_rigidrotor
from mess_io.writer._spc import molecule
from mess_io.writer._rxncha... | 32.768519 | 79 | 0.657954 |
74a2db6f58452c467a4109be141f8fd5a73a123a | 529 | py | Python | tape_mounts/whpss/src/repack.py | zdvresearch/fast15-paper-addons | 8001f658ba819202186bf84892f4718eefd021fe | [
"MIT"
] | null | null | null | tape_mounts/whpss/src/repack.py | zdvresearch/fast15-paper-addons | 8001f658ba819202186bf84892f4718eefd021fe | [
"MIT"
] | null | null | null | tape_mounts/whpss/src/repack.py | zdvresearch/fast15-paper-addons | 8001f658ba819202186bf84892f4718eefd021fe | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""repack.py: unpacks all *.Z files and rewrites them as *.gz"""
__author__ = "Matthias Grawinkel (grawinkel@uni-mainz.de)"
__status__ = "Production"
import os
import glob
files = glob.glob('*.Z')
for source in files:
target = "%s.gz" % (os.path.basename(source)[:-2])
print source, ta... | 26.45 | 115 | 0.667297 |
74a2de3c890dfa2491a6787beac1a100186c764e | 2,554 | py | Python | sdk/webpubsub/azure-messaging-webpubsubservice/samples/get_client_access_token.py | nittaya1990/azure-sdk-for-python | 13f2d0f0864d15d774c1bca4acc9694f048c496c | [
"MIT"
] | 2 | 2021-09-07T18:30:33.000Z | 2021-11-23T02:50:57.000Z | sdk/webpubsub/azure-messaging-webpubsubservice/samples/get_client_access_token.py | nittaya1990/azure-sdk-for-python | 13f2d0f0864d15d774c1bca4acc9694f048c496c | [
"MIT"
] | 4 | 2021-10-06T16:39:52.000Z | 2021-11-18T18:33:37.000Z | sdk/webpubsub/azure-messaging-webpubsubservice/samples/get_client_access_token.py | nittaya1990/azure-sdk-for-python | 13f2d0f0864d15d774c1bca4acc9694f048c496c | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the ... | 44.034483 | 142 | 0.74628 |
74a2e3f0d5a0f2eb72dfbf3f1e5c4e420d1ff097 | 12,682 | py | Python | twilio/rest/taskrouter/v1/workspace/task_channel.py | theDrinkMD/twibbage | c0aba60bd2df50f0a5688db4a01048ea1efd1a45 | [
"MIT"
] | 1 | 2021-02-24T04:59:03.000Z | 2021-02-24T04:59:03.000Z | twilio/rest/taskrouter/v1/workspace/task_channel.py | theDrinkMD/twibbage | c0aba60bd2df50f0a5688db4a01048ea1efd1a45 | [
"MIT"
] | null | null | null | twilio/rest/taskrouter/v1/workspace/task_channel.py | theDrinkMD/twibbage | c0aba60bd2df50f0a5688db4a01048ea1efd1a45 | [
"MIT"
] | 1 | 2018-12-09T00:53:21.000Z | 2018-12-09T00:53:21.000Z | # coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_context import InstanceContext
from twilio.base.instance_resource import InstanceResource
from twilio.base.... | 31.864322 | 93 | 0.614414 |
74a2f81be4ddc675da47c59f3c5495e9be6f5822 | 7,144 | py | Python | invenio_communities/members/services/service.py | max-moser/invenio-communities | cfdd6a8b36bf6856db4fd55123c832700eb32376 | [
"MIT"
] | null | null | null | invenio_communities/members/services/service.py | max-moser/invenio-communities | cfdd6a8b36bf6856db4fd55123c832700eb32376 | [
"MIT"
] | null | null | null | invenio_communities/members/services/service.py | max-moser/invenio-communities | cfdd6a8b36bf6856db4fd55123c832700eb32376 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2022 Northwestern University.
#
# Invenio-Communities is free software; you can redistribute it and/or modify
# it under the terms of the MIT License; see LICENSE file for more details.
"""Members Service."""
from elasticsearch_dsl.query import Q
from invenio_records_resource... | 31.06087 | 79 | 0.611842 |
74a2fa523fc10438cb81f87d80e84f66ce7694cc | 5,888 | py | Python | src/epos/epos_motor.py | Dorniak/NEVA_Control | d946ff27f4c1196ac2808d8fe4a1227406a8b3c2 | [
"MIT"
] | null | null | null | src/epos/epos_motor.py | Dorniak/NEVA_Control | d946ff27f4c1196ac2808d8fe4a1227406a8b3c2 | [
"MIT"
] | null | null | null | src/epos/epos_motor.py | Dorniak/NEVA_Control | d946ff27f4c1196ac2808d8fe4a1227406a8b3c2 | [
"MIT"
] | null | null | null | from src.can_utils.common import make_can_frame
from enum import IntEnum
import struct
from typing import Tuple
from time import time
# QC_FACTOR = 402000 / 360
#from src.devices.base import VehicleState
QC_FACTOR = 1 # 625000 / 360
DIGITAL_OUTPUT_3 = False
DIGITAL_OUTPUT_4 = False
class EPOSCommand(IntEnum):
... | 33.265537 | 147 | 0.66695 |
74a3027bb732886ef63e687cd7f66aa547f961c3 | 606 | py | Python | gala-spider/spider/collector/data_collector.py | seandong37tt4qu/jeszhengq | 32b3737ab45e89e8c5b71cdce871cefd2c938fa8 | [
"MulanPSL-1.0"
] | null | null | null | gala-spider/spider/collector/data_collector.py | seandong37tt4qu/jeszhengq | 32b3737ab45e89e8c5b71cdce871cefd2c938fa8 | [
"MulanPSL-1.0"
] | null | null | null | gala-spider/spider/collector/data_collector.py | seandong37tt4qu/jeszhengq | 32b3737ab45e89e8c5b71cdce871cefd2c938fa8 | [
"MulanPSL-1.0"
] | null | null | null | from typing import List
from typing import Any
from dataclasses import dataclass
from dataclasses import field
@dataclass
class Label:
name: str
value: Any
@dataclass
class DataRecord:
metric_id: str
timestamp: float
metric_value: Any
labels: List[Label] = field(default_factory=list)
class... | 20.2 | 102 | 0.69637 |
74a33a0575b4c3dc3b558571211ace2d345828b9 | 2,011 | py | Python | gaphor/diagram/usecases/actor.py | MarianelaSena/gaphor | f1ccc2e2ae98d7fad54f6dd9271e8e10fbb2e324 | [
"Apache-2.0"
] | null | null | null | gaphor/diagram/usecases/actor.py | MarianelaSena/gaphor | f1ccc2e2ae98d7fad54f6dd9271e8e10fbb2e324 | [
"Apache-2.0"
] | null | null | null | gaphor/diagram/usecases/actor.py | MarianelaSena/gaphor | f1ccc2e2ae98d7fad54f6dd9271e8e10fbb2e324 | [
"Apache-2.0"
] | null | null | null | """
Actor item classes.
"""
from math import pi
from gaphor import UML
from gaphor.UML.modelfactory import stereotypes_str
from gaphor.diagram.presentation import ElementPresentation, Classified
from gaphor.diagram.shapes import Box, IconBox, EditableText, Text
from gaphor.diagram.text import FontWeight
from gaphor.d... | 26.116883 | 85 | 0.583292 |
74a345d397768cd7178374b892a6f09dcfcd6c85 | 804 | py | Python | setup.py | onerbs/xu | 253f0a9fb695d35188f8270fc109777464e5ca21 | [
"MIT"
] | null | null | null | setup.py | onerbs/xu | 253f0a9fb695d35188f8270fc109777464e5ca21 | [
"MIT"
] | null | null | null | setup.py | onerbs/xu | 253f0a9fb695d35188f8270fc109777464e5ca21 | [
"MIT"
] | null | null | null | from pathlib import Path
from setuptools import setup
project = 'xu'
parent = Path(__file__).parent.resolve()
readme = (parent / 'README.md').read_text()
setup(
name=project,
version='0.2.0',
description=readme.splitlines()[2],
long_description=readme,
long_description_content_type='text/markdown',
url='https:... | 25.935484 | 65 | 0.701493 |
74a40ae3f2d4f12bd81a849478a07ee040c3feb1 | 84,512 | py | Python | test/vanilla/low-level/Expected/AcceptanceTests/BodyDictionaryLowLevel/bodydictionarylowlevel/rest/dictionary/_request_builders_py3.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/vanilla/low-level/Expected/AcceptanceTests/BodyDictionaryLowLevel/bodydictionarylowlevel/rest/dictionary/_request_builders_py3.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/vanilla/low-level/Expected/AcceptanceTests/BodyDictionaryLowLevel/bodydictionarylowlevel/rest/dictionary/_request_builders_py3.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 1 | 2022-03-28T08:58:03.000Z | 2022-03-28T08:58:03.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 ... | 37.594306 | 116 | 0.647707 |
74a4171599d51a799c3c190a81b299443c676a0f | 567 | py | Python | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2015_01_01/operations/__init__.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2015_01_01/operations/__init__.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2015_01_01/operations/__init__.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # 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 ... | 40.5 | 94 | 0.571429 |
74a453c98a0ca2d08091aba684d055db19a46ef9 | 2,678 | py | Python | src/difficulty.py | andy-hanson/monis-xtreme | 5d483e93adaf4425364919344f9a092c16b79577 | [
"Unlicense"
] | null | null | null | src/difficulty.py | andy-hanson/monis-xtreme | 5d483e93adaf4425364919344f9a092c16b79577 | [
"Unlicense"
] | null | null | null | src/difficulty.py | andy-hanson/monis-xtreme | 5d483e93adaf4425364919344f9a092c16b79577 | [
"Unlicense"
] | null | null | null | import os
import helpers
def calcLevel(score):
if score < 10:
return 0
elif score < 25:
return 1
elif score < 45:
return 2
elif score < 70:
return 3
elif score < 100:
return 4
elif score < 135:
return 5
elif score < 175:
return 6
elif score < 220:
return 7
else:
retu... | 28.795699 | 93 | 0.668036 |
74a47fe040fea73ffbdd4681311d2d57c343709d | 803 | py | Python | botpumpkin/aws/error.py | Anthrasite/BotPumpkin | 99267a9cb3d263f5cd302ee548c49c59fafcce3f | [
"MIT"
] | null | null | null | botpumpkin/aws/error.py | Anthrasite/BotPumpkin | 99267a9cb3d263f5cd302ee548c49c59fafcce3f | [
"MIT"
] | 24 | 2021-03-08T00:28:13.000Z | 2021-04-09T22:26:26.000Z | botpumpkin/aws/error.py | Anthrasite/BotPumpkin | 99267a9cb3d263f5cd302ee548c49c59fafcce3f | [
"MIT"
] | null | null | null | """A collection of functions to assist with parsing client errors returned from the boto3 library."""
# Third party imports
import botocore
# *** client_error_is_instance **********************************************
def client_error_is_instance(exception: botocore.exceptions.ClientError, exception_type: str) -> bo... | 42.263158 | 140 | 0.697385 |
74a4a4ca5c956b76834b85615d1ec4afe9cb6de5 | 2,227 | py | Python | keystoneclient/tests/v3/test_groups.py | jamielennox/python-keystoneclient | a1bc48c0fc475db6bca761a9023c35adab740dab | [
"Apache-1.1"
] | 1 | 2020-12-18T01:07:30.000Z | 2020-12-18T01:07:30.000Z | keystoneclient/tests/v3/test_groups.py | jamielennox/python-keystoneclient | a1bc48c0fc475db6bca761a9023c35adab740dab | [
"Apache-1.1"
] | null | null | null | keystoneclient/tests/v3/test_groups.py | jamielennox/python-keystoneclient | a1bc48c0fc475db6bca761a9023c35adab740dab | [
"Apache-1.1"
] | null | null | null | # Copyright 2012 OpenStack Foundation
#
# 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... | 34.796875 | 75 | 0.664571 |
74a4b609cbd07e7dfd15a960bb342cacfe14d3fb | 2,034 | py | Python | setup.py | Jumpscale/ays9 | 63bd414ff06372ba885c55eec528f427e63bcbe1 | [
"Apache-2.0"
] | 4 | 2017-06-07T08:10:06.000Z | 2017-11-10T02:20:38.000Z | setup.py | Jumpscale/ays9 | 63bd414ff06372ba885c55eec528f427e63bcbe1 | [
"Apache-2.0"
] | 242 | 2017-05-18T10:51:48.000Z | 2019-09-18T15:09:47.000Z | setup.py | Jumpscale/ays9 | 63bd414ff06372ba885c55eec528f427e63bcbe1 | [
"Apache-2.0"
] | 5 | 2017-06-16T15:43:25.000Z | 2017-09-29T12:48:06.000Z | from setuptools import setup, find_packages
from setuptools.command.install import install as _install
from setuptools.command.develop import develop as _develop
import os
def _post_install(libname, libpath):
from js9 import j
# add this plugin to the config
c = j.core.state.configGet('plugins', defval={... | 25.746835 | 67 | 0.629302 |
74a4b7004407b53e7da4655045b42776e40f8b32 | 1,097 | py | Python | flask_simpleoauth/form.py | maxcountryman/flask-simpleoauth | ce8fca531866f6ff8f38415fff9b43b7fa9e5a32 | [
"BSD-3-Clause"
] | 1 | 2015-03-10T19:50:46.000Z | 2015-03-10T19:50:46.000Z | flask_simpleoauth/form.py | maxcountryman/flask-simpleoauth | ce8fca531866f6ff8f38415fff9b43b7fa9e5a32 | [
"BSD-3-Clause"
] | null | null | null | flask_simpleoauth/form.py | maxcountryman/flask-simpleoauth | ce8fca531866f6ff8f38415fff9b43b7fa9e5a32 | [
"BSD-3-Clause"
] | null | null | null | from wtforms import Form, TextField, PasswordField, validators
class ConsumerForm(Form):
name = TextField('App Name', [validators.Required(),
validators.Length(min=6, max=32)])
callback_uri = TextField('Callback', [validators.Optional()])
class LoginForm(Form):
login =... | 35.387097 | 78 | 0.539654 |
74a4ef1939d7882795c08a30c555570bd096a18b | 1,440 | py | Python | setup.py | RalphLipe/somfyrts | b1036fc7bd385c097ef1353d59201e8a23ac0e72 | [
"MIT"
] | 6 | 2017-10-14T02:53:50.000Z | 2020-12-10T16:53:32.000Z | setup.py | RalphLipe/somfyrts | b1036fc7bd385c097ef1353d59201e8a23ac0e72 | [
"MIT"
] | 1 | 2017-10-14T02:52:39.000Z | 2017-10-14T02:52:39.000Z | setup.py | RalphLipe/somfyrts | b1036fc7bd385c097ef1353d59201e8a23ac0e72 | [
"MIT"
] | null | null | null | from distutils.core import setup
# noinspection SpellCheckingInspection
setup(
name='somfyrts',
version='1.0',
packages=['somfyrts'],
url='https://github.com/ralphlipe/',
license='BSD',
author='Ralph Lipe',
author_email='ralph@lipe.ws',
description='Somfy Universal RTS Interface for mot... | 40 | 79 | 0.539583 |
74a4f256c7a68df94c12f20250caa82537313ed3 | 8,071 | py | Python | examples/Pipelines/TrackML_Example/LightningModules/Embedding/Models/inference.py | VarunSreenivasan16/train-track | a3fd9093b39660e3ed6c18a6a496c7eddb22a37f | [
"MIT"
] | null | null | null | examples/Pipelines/TrackML_Example/LightningModules/Embedding/Models/inference.py | VarunSreenivasan16/train-track | a3fd9093b39660e3ed6c18a6a496c7eddb22a37f | [
"MIT"
] | null | null | null | examples/Pipelines/TrackML_Example/LightningModules/Embedding/Models/inference.py | VarunSreenivasan16/train-track | a3fd9093b39660e3ed6c18a6a496c7eddb22a37f | [
"MIT"
] | null | null | null | import sys
import os
import copy
import logging
import tracemalloc
import gc
from memory_profiler import profile
from pytorch_lightning.callbacks import Callback
import torch.nn.functional as F
import sklearn.metrics
import matplotlib.pyplot as plt
import torch
import numpy as np
from ..utils import fe... | 36.355856 | 141 | 0.578119 |
74a5021b8efb460d9359734352bc51dbdc1cc843 | 27,158 | py | Python | gaussian_wrangler/check_gauss.py | team-mayes/nrel_tools | 551f92f2c5448e7888bb2fb11bd04243b26da4a9 | [
"MIT"
] | 1 | 2021-05-26T15:29:45.000Z | 2021-05-26T15:29:45.000Z | gaussian_wrangler/check_gauss.py | team-mayes/nrel_tools | 551f92f2c5448e7888bb2fb11bd04243b26da4a9 | [
"MIT"
] | 2 | 2020-08-12T17:05:01.000Z | 2021-05-30T00:32:29.000Z | gaussian_wrangler/check_gauss.py | team-mayes/nrel_tools | 551f92f2c5448e7888bb2fb11bd04243b26da4a9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Finds Gaussian files in a folder. If complete (Normal termination), moves them to a subdirectory.
If appears to have failed, add to a text file for investigation.
"""
import os
import re
import sys
import argparse
import matplotlib.pyplot as plt
import numpy as np
import warnings
from scipy.o... | 46.986159 | 120 | 0.610575 |
74a51a767dfe899d6416327c933decc190a7f193 | 3,991 | py | Python | alipay/aop/api/request/ZhimaMerchantContractCommonQueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/request/ZhimaMerchantContractCommonQueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/request/ZhimaMerchantContractCommonQueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.ZhimaMerchantContractCommonQueryModel import ZhimaMerchantContractCommonQueryModel
class ZhimaMerchantContractCommonQueryRequest(obj... | 27.524138 | 148 | 0.646455 |
74a52a7bd875f703244f2ba3c930d8d83a9d09ea | 13,416 | py | Python | net/layer/rcnn.py | shawnau/DataScienceBowl2018 | 3c6f0f26dd86b71aad55fca52314e6432d0b3a82 | [
"MIT"
] | null | null | null | net/layer/rcnn.py | shawnau/DataScienceBowl2018 | 3c6f0f26dd86b71aad55fca52314e6432d0b3a82 | [
"MIT"
] | null | null | null | net/layer/rcnn.py | shawnau/DataScienceBowl2018 | 3c6f0f26dd86b71aad55fca52314e6432d0b3a82 | [
"MIT"
] | null | null | null | import copy
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
import numpy as np
# faster-rcnn box encode/decode, nms, softmax
from net.lib.box.process import is_small_box, clip_boxes, filter_boxes, bbox_encode, bbox_decode
from net.lib.box.overlap.cython_overlap.cy... | 38.331429 | 113 | 0.626193 |
74a54bd5a78b117e36b46e77e89f9e8a050b6b3e | 1,852 | py | Python | cognito_groups.py | jhutchings1/transfer-coronavirus-data-service | fbaa48f87e4413f68b680a9a4e2ae43a8ee13b01 | [
"MIT"
] | 1 | 2020-04-02T15:00:11.000Z | 2020-04-02T15:00:11.000Z | cognito_groups.py | jhutchings1/transfer-coronavirus-data-service | fbaa48f87e4413f68b680a9a4e2ae43a8ee13b01 | [
"MIT"
] | 33 | 2021-04-26T03:03:19.000Z | 2022-03-21T03:05:27.000Z | cognito_groups.py | jhutchings1/transfer-coronavirus-data-service | fbaa48f87e4413f68b680a9a4e2ae43a8ee13b01 | [
"MIT"
] | 3 | 2020-05-05T13:47:03.000Z | 2021-04-10T20:15:50.000Z | #!/usr/bin/env python
def get_group_list():
group_map = get_group_map()
groups = group_map.values()
return groups
def get_group_map():
groups = {
"standard-download": {
"preference": 10,
"value": "standard-download",
"display": "Standard download user",
... | 25.369863 | 69 | 0.570734 |
74a5599dd31db5ee7e1a1f59fe6f70655d98f1c8 | 1,207 | py | Python | example/crypto_example.py | anshul96go/toolbox | f60ba0b885eb0eb4786f6e56260073f923a7f844 | [
"MIT"
] | null | null | null | example/crypto_example.py | anshul96go/toolbox | f60ba0b885eb0eb4786f6e56260073f923a7f844 | [
"MIT"
] | null | null | null | example/crypto_example.py | anshul96go/toolbox | f60ba0b885eb0eb4786f6e56260073f923a7f844 | [
"MIT"
] | null | null | null | import qnt.data as qndata
import qnt.stats as qnstats
import qnt.xr_talib as qnxrtalib
import xarray as xr
import pandas as pd
from qnt.stepper import test_strategy
import xarray.ufuncs as xrf
import datetime as dt
data = qndata.load_cryptocurrency_data(tail=dt.timedelta(days=252), max_date='2020-01-01T10', dims=("t... | 26.822222 | 126 | 0.695112 |
74a57767be26c671d995de1ed32fd1cfe5ef972a | 2,678 | py | Python | scripts/artifacts/cachelocation.py | JamieSharpe/ALEAPP | acb06736d772d75c9dc0fd58b9f2a1726e795fb4 | [
"MIT"
] | null | null | null | scripts/artifacts/cachelocation.py | JamieSharpe/ALEAPP | acb06736d772d75c9dc0fd58b9f2a1726e795fb4 | [
"MIT"
] | null | null | null | scripts/artifacts/cachelocation.py | JamieSharpe/ALEAPP | acb06736d772d75c9dc0fd58b9f2a1726e795fb4 | [
"MIT"
] | null | null | null | import datetime
import struct
import os
from scripts.ilapfuncs import timeline
from scripts.plugin_base import ArtefactPlugin
from scripts.ilapfuncs import logfunc, tsv
from scripts import artifact_report
class CacheLocationPlugin(ArtefactPlugin):
"""
"""
def __init__(self):
super().__init__()
... | 39.382353 | 213 | 0.620239 |
74a5b5dc8baaba6375fca358c1b114f575f5eef7 | 2,150 | py | Python | venv/Lib/site-packages/pyrogram/raw/functions/auth/recover_password.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 2 | 2021-12-13T07:09:55.000Z | 2022-01-12T12:15:20.000Z | venv/Lib/site-packages/pyrogram/raw/functions/auth/recover_password.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/functions/auth/recover_password.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... | 29.861111 | 103 | 0.618605 |
74a61b335b569ffe96f7c9743e3d2eff07f0bb50 | 15,324 | py | Python | utils/env_collection.py | rayding24/First-Principles-Transformers | 075b87e5dad81f66e081afb45dd3a4c3b7926bfe | [
"MIT"
] | null | null | null | utils/env_collection.py | rayding24/First-Principles-Transformers | 075b87e5dad81f66e081afb45dd3a4c3b7926bfe | [
"MIT"
] | null | null | null | utils/env_collection.py | rayding24/First-Principles-Transformers | 075b87e5dad81f66e081afb45dd3a4c3b7926bfe | [
"MIT"
] | null | null | null | # This script outputs relevant system environment info
# Run it with `python collect_env.py`.
import locale
import re
import subprocess
import sys
import os
from collections import namedtuple
'''
FROM torch.utils, refer to:
https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py
'''
try:
... | 35.227586 | 127 | 0.655573 |
74a633519bdf31c578909ba8c0a09cc8ecfaf8ba | 872 | py | Python | Misc/graph-dfs-undirected.py | saisankargochhayat/algo_quest | a24f9a22c019ab31d56bd5a7ca5ba790d54ce5dc | [
"Apache-2.0"
] | 3 | 2017-02-15T20:55:04.000Z | 2018-09-26T18:48:24.000Z | Misc/graph-dfs-undirected.py | saisankargochhayat/algo_quest | a24f9a22c019ab31d56bd5a7ca5ba790d54ce5dc | [
"Apache-2.0"
] | 4 | 2017-10-07T18:59:20.000Z | 2019-10-08T05:43:25.000Z | Misc/graph-dfs-undirected.py | saisankargochhayat/algo_quest | a24f9a22c019ab31d56bd5a7ca5ba790d54ce5dc | [
"Apache-2.0"
] | 1 | 2017-10-08T06:52:21.000Z | 2017-10-08T06:52:21.000Z | #no of edges
n=int(input())
e=int(input())
edge_u=list()
edge_v=list()
for i in range(e):
x,y=map(int,input().split())
edge_u.append(x)
edge_v.append(y)
# create empty adjacency lists - one for each node -
# with a Python list comprehension
adjList = [[] for k in range(n)]
for i in range(len(edge_u)):
... | 19.818182 | 52 | 0.590596 |
74a639438642d352fe79bd9381dbf4f1d1c83d1a | 1,301 | py | Python | appengine/machine_provider/metrics.py | stefb965/luci-py | e0a8a5640c4104e5c90781d833168aa8a8d1f24d | [
"Apache-2.0"
] | 1 | 2017-10-30T15:08:10.000Z | 2017-10-30T15:08:10.000Z | appengine/machine_provider/metrics.py | stefb965/luci-py | e0a8a5640c4104e5c90781d833168aa8a8d1f24d | [
"Apache-2.0"
] | null | null | null | appengine/machine_provider/metrics.py | stefb965/luci-py | e0a8a5640c4104e5c90781d833168aa8a8d1f24d | [
"Apache-2.0"
] | 1 | 2020-07-05T19:54:40.000Z | 2020-07-05T19:54:40.000Z | # Copyright 2015 The LUCI Authors. All rights reserved.
# Use of this source code is governed under the Apache License, Version 2.0
# that can be found in the LICENSE file.
"""Metrics to track with ts_mon and event_mon."""
import gae_ts_mon
lease_requests_deduped = gae_ts_mon.CounterMetric(
'machine_provider/le... | 25.509804 | 75 | 0.756341 |
74a63b88473dcce92207cee4d862dd6f5fef2f86 | 15,555 | py | Python | cumulusci/tasks/salesforce/sourcetracking.py | hamedizadpanah-ibm/CumulusCI | eb93723e2da1ca66a7639b3197e6fab02d1bd24a | [
"BSD-3-Clause"
] | 1 | 2020-08-08T03:55:21.000Z | 2020-08-08T03:55:21.000Z | cumulusci/tasks/salesforce/sourcetracking.py | Julian88Tex/CumulusCI | 82d5fab71b61fbab53c1b5fc6001452fa3f97da8 | [
"BSD-3-Clause"
] | null | null | null | cumulusci/tasks/salesforce/sourcetracking.py | Julian88Tex/CumulusCI | 82d5fab71b61fbab53c1b5fc6001452fa3f97da8 | [
"BSD-3-Clause"
] | null | null | null | from collections import defaultdict
import contextlib
import functools
import json
import os
import re
import time
from cumulusci.core.sfdx import sfdx
from cumulusci.core.utils import process_bool_arg
from cumulusci.core.utils import process_list_arg
from cumulusci.tasks.salesforce import BaseRetrieveMetadata
from cu... | 37.212919 | 184 | 0.599936 |
74a647608a3ee02cba042e72a7b833721f0c87e6 | 389 | py | Python | ciocel/asgi.py | Nitroklaus31/Clustering-in-Object-Centric-Process-Mining | 7ca6bd4bf9845b3e68ebcc94a441cfb2f318b2e0 | [
"MIT"
] | 4 | 2021-12-02T15:48:09.000Z | 2022-01-17T17:21:13.000Z | ciocel/asgi.py | Nitroklaus31/Clustering-in-Object-Centric-Process-Mining | 7ca6bd4bf9845b3e68ebcc94a441cfb2f318b2e0 | [
"MIT"
] | null | null | null | ciocel/asgi.py | Nitroklaus31/Clustering-in-Object-Centric-Process-Mining | 7ca6bd4bf9845b3e68ebcc94a441cfb2f318b2e0 | [
"MIT"
] | 10 | 2021-12-07T17:41:04.000Z | 2022-01-21T15:55:36.000Z | """
ASGI config for ciocel project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTIN... | 22.882353 | 78 | 0.784062 |
74a6499ecfddf5a7611d5f4d64a6b6802113bdc2 | 203 | py | Python | tests/test_input_poisson_neumann.py | clazaro/sfepy | 78757a6989d6aaf85a3fb27957b9179c5e2aa2c7 | [
"BSD-3-Clause"
] | 510 | 2015-01-19T16:22:25.000Z | 2022-03-30T19:02:51.000Z | tests/test_input_poisson_neumann.py | clazaro/sfepy | 78757a6989d6aaf85a3fb27957b9179c5e2aa2c7 | [
"BSD-3-Clause"
] | 402 | 2015-01-22T10:57:50.000Z | 2022-03-30T15:19:23.000Z | tests/test_input_poisson_neumann.py | clazaro/sfepy | 78757a6989d6aaf85a3fb27957b9179c5e2aa2c7 | [
"BSD-3-Clause"
] | 156 | 2015-01-05T14:23:38.000Z | 2022-03-22T13:08:30.000Z | from __future__ import absolute_import
input_name = '../examples/diffusion/poisson_neumann.py'
output_name = 'test_poisson_neumann.vtk'
from tests_basic import TestInput
class Test(TestInput):
pass
| 25.375 | 55 | 0.812808 |
74a6567102f8bef1a4a8b87595ac99a2c3a05425 | 2,325 | py | Python | src/doc/gui_manual/PythonScripts/resection.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/doc/gui_manual/PythonScripts/resection.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/doc/gui_manual/PythonScripts/resection.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | import sys
header_levels = []
# =======
# Chapter
# =======
header_levels.append("=")
# Section
# =======
header_levels.append("=")
# Sub-section
# -----------
header_levels.append("-")
# sub-sub-section
# ~~~~~~~~~~~~~~~
header_levels.append("~")
# paragraph
# """""""""
header_levels.append("\"")
blank_line ="\n"
i... | 29.0625 | 115 | 0.669247 |
74a6838da36b7e31e104600232999838ac7c9cb1 | 4,256 | py | Python | tests/data/build-index5-json.py | cswartzvi/conda | b2e0ed6b6119b7623d8f64c47d4d04f56e9cf137 | [
"BSD-3-Clause"
] | null | null | null | tests/data/build-index5-json.py | cswartzvi/conda | b2e0ed6b6119b7623d8f64c47d4d04f56e9cf137 | [
"BSD-3-Clause"
] | 3 | 2022-03-03T02:36:53.000Z | 2022-03-03T02:42:50.000Z | tests/data/build-index5-json.py | cswartzvi/conda | b2e0ed6b6119b7623d8f64c47d4d04f56e9cf137 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (C) 2012 Anaconda, Inc
# SPDX-License-Identifier: BSD-3-Clause
import json
from os.path import abspath, dirname, join
from pprint import pprint
from conda.core.subdir_data import fetch_repodata_remote_request
DATA_DIR = abspath(join(dirname(__file__), "repodata"))
def save_data_s... | 25.793939 | 101 | 0.516682 |
74a68a02df02d9bef4c0ef5d97511ece0af92411 | 579 | py | Python | pycantonese/tests/test_tipa.py | j-chim/pycantonese | 1d58f44e1cb097faa69de6b617e1d28903b84b98 | [
"MIT"
] | null | null | null | pycantonese/tests/test_tipa.py | j-chim/pycantonese | 1d58f44e1cb097faa69de6b617e1d28903b84b98 | [
"MIT"
] | null | null | null | pycantonese/tests/test_tipa.py | j-chim/pycantonese | 1d58f44e1cb097faa69de6b617e1d28903b84b98 | [
"MIT"
] | null | null | null | from pycantonese.jyutping.parse_jyutping import ONSETS, TONES
from pycantonese.jyutping.tipa import ONSETS_TIPA, TONES_TIPA, jyutping_to_tipa
# TODO def test_correct_nucleus_set():
# TODO def test_correct_coda_set():
def test_correct_onset_set():
assert set(ONSETS_TIPA.keys()) == ONSETS
def test_correct_tone_... | 24.125 | 79 | 0.699482 |
74a6b6d9ca1b032d571bf777b68c4025679638a5 | 16,175 | py | Python | FEBDAQMULTx2/data_analysis/utilities/autocorrelation_gain.py | kaikai581/t2k-mppc-daq | 6b4f7bf04d885e952d9fd653df8f9ca1dd31089e | [
"MIT"
] | null | null | null | FEBDAQMULTx2/data_analysis/utilities/autocorrelation_gain.py | kaikai581/t2k-mppc-daq | 6b4f7bf04d885e952d9fd653df8f9ca1dd31089e | [
"MIT"
] | null | null | null | FEBDAQMULTx2/data_analysis/utilities/autocorrelation_gain.py | kaikai581/t2k-mppc-daq | 6b4f7bf04d885e952d9fd653df8f9ca1dd31089e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from sklearn.linear_model import LinearRegression
from sklearn.metrics import r2_score
from scipy.signal import find_peaks
from scipy import optimize
import common_tools
import matplotlib.pyplot as plt
import numpy as np
import os
import pandas as pd
import uproot
class MPPCLine:
def __init_... | 41.688144 | 316 | 0.58034 |
74a6db29d059d3d2d98e7f4913b21bb7743e23f8 | 1,383 | py | Python | thehonestgenepipeline/riskprediction.py | TheHonestGene/thehonestgene-pipeline | cc18a49583a312ae020584a8bca0abaa6823178e | [
"MIT"
] | null | null | null | thehonestgenepipeline/riskprediction.py | TheHonestGene/thehonestgene-pipeline | cc18a49583a312ae020584a8bca0abaa6823178e | [
"MIT"
] | 1 | 2016-08-24T08:20:34.000Z | 2016-08-24T08:20:34.000Z | thehonestgenepipeline/riskprediction.py | TheHonestGene/thehonestgene-pipeline | cc18a49583a312ae020584a8bca0abaa6823178e | [
"MIT"
] | null | null | null | from celery.utils.log import get_task_logger
from celery.signals import after_setup_task_logger
from thehonestgenepipeline.celery import celery
from riskpredictor.core import predictor as pred
from os import path
from . import GENOTYPE_FOLDER,DATA_FOLDER
from . import get_platform_from_genotype
from .progress_logger ... | 38.416667 | 110 | 0.751988 |
74a70fc66e98524c9960f00e33a44a6beba5af90 | 6,285 | py | Python | experiments/vitchyr/goal_distribution/representation_learning/exps_20_07_24/exp6_relative_distance_set.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2020-10-23T14:40:09.000Z | 2020-10-23T14:40:09.000Z | experiments/vitchyr/goal_distribution/representation_learning/exps_20_07_24/exp6_relative_distance_set.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/vitchyr/goal_distribution/representation_learning/exps_20_07_24/exp6_relative_distance_set.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2021-05-27T20:38:45.000Z | 2021-05-27T20:38:45.000Z | import rlkit.misc.hyperparameter as hyp
from multiworld.envs.pygame import PickAndPlaceEnv
from rlkit.launchers.launcher_util import run_experiment
from rlkit.torch.sets.rl_launcher import disco_experiment
if __name__ == "__main__":
variant = dict(
env_class=PickAndPlaceEnv,
env_kwargs=dict(
... | 31.582915 | 75 | 0.523946 |
74a714e7a03414fd829c89f4c9d02f77f9716646 | 7,477 | py | Python | Testing/publications/magazines/glossy/parts.py | freder/PageBotExamples | eb4ced53a673b9376e8357afa9ea0795b022b13c | [
"Ruby",
"MIT"
] | 5 | 2020-06-20T22:01:23.000Z | 2021-08-06T04:39:50.000Z | Testing/publications/magazines/glossy/parts.py | freder/PageBotExamples | eb4ced53a673b9376e8357afa9ea0795b022b13c | [
"Ruby",
"MIT"
] | 5 | 2020-05-17T09:32:27.000Z | 2021-03-15T19:45:52.000Z | Testing/publications/magazines/glossy/parts.py | freder/PageBotExamples | eb4ced53a673b9376e8357afa9ea0795b022b13c | [
"Ruby",
"MIT"
] | 2 | 2021-02-25T19:07:45.000Z | 2022-01-09T21:14:06.000Z | # -----------------------------------------------------------------------------
# Copyright (c) 2016+ Buro Petr van Blokland + Claudia Mens
# www.pagebot.io
#
# P A G E B O T
#
# Licensed under MIT conditions
#
# Supporting DrawBot, www.drawbot.com
# Supporting Flat, xxyxyz.org/flat
# ----------... | 31.952991 | 129 | 0.564264 |
74a726d9cee25cbc5344010b94b669b3216f7fcb | 2,822 | py | Python | pangadfs/misc.py | sansbacon/pangadfs | 0a93ea0872f4dbb57be159653d202e01dce7047c | [
"MIT"
] | 7 | 2020-10-22T08:33:31.000Z | 2021-12-28T05:07:31.000Z | pangadfs/misc.py | sansbacon/pangadfs | 0a93ea0872f4dbb57be159653d202e01dce7047c | [
"MIT"
] | 12 | 2020-10-23T19:06:30.000Z | 2021-05-20T16:29:51.000Z | pangadfs/misc.py | sansbacon/pangadfs | 0a93ea0872f4dbb57be159653d202e01dce7047c | [
"MIT"
] | null | null | null | # pangadfs/pangadfs/misc.py
# -*- coding: utf-8 -*-
# Copyright (C) 2020 Eric Truett
# Licensed under the MIT License
from typing import Dict, Iterable, Tuple
import numpy as np
def diversity(population: np.ndarray) -> np.ndarray:
"""Calculates diversity of lineups
Args:
population (np.ndarray):... | 34.414634 | 114 | 0.653437 |
74a72b66e7438cf48d70a6caaa13f5cb7622ea79 | 11,322 | py | Python | sleap/nn/data/resizing.py | preeti98/sleap | 203c3a03c0c54f8dab242611d9a8d24595e98081 | [
"BSD-3-Clause-Clear"
] | null | null | null | sleap/nn/data/resizing.py | preeti98/sleap | 203c3a03c0c54f8dab242611d9a8d24595e98081 | [
"BSD-3-Clause-Clear"
] | null | null | null | sleap/nn/data/resizing.py | preeti98/sleap | 203c3a03c0c54f8dab242611d9a8d24595e98081 | [
"BSD-3-Clause-Clear"
] | null | null | null | """Transformers for image resizing and padding."""
import tensorflow as tf
import attr
from typing import List, Text, Optional, Tuple
from sleap.nn.config import PreprocessingConfig
from sleap.nn.data.utils import expand_to_rank
def find_padding_for_stride(
image_height: int, image_width: int, max_stride: int
) ... | 38.641638 | 88 | 0.636813 |
74a771390aa13919e4bf9859a106e23b4c682a6c | 1,019 | py | Python | embeddings/fast_train.py | wasiahmad/PolicyIE | 57046c431b64f6e85edd70990c18c02e5ba83c35 | [
"MIT"
] | 7 | 2021-05-29T16:00:39.000Z | 2022-03-13T16:00:04.000Z | embeddings/fast_train.py | wasiahmad/PolicyIE | 57046c431b64f6e85edd70990c18c02e5ba83c35 | [
"MIT"
] | 2 | 2021-01-09T05:53:07.000Z | 2021-11-18T11:39:35.000Z | embeddings/fast_train.py | wasiahmad/PolicyIE | 57046c431b64f6e85edd70990c18c02e5ba83c35 | [
"MIT"
] | 3 | 2021-02-04T02:15:24.000Z | 2021-11-17T01:26:41.000Z | import fasttext
import argparse
from gensim.models.fasttext import load_facebook_model
def train(args):
outfile = "polisis_fast_embeddings_{}.bin".format(args.emb_size)
# -dim 300 -wordNgrams 3 -ws 2 -epoch 200 -verbose 3
model = fasttext.train_unsupervised(
args.input_file,
model='skipg... | 26.128205 | 95 | 0.684985 |
74a783348770c8347e24112d70f35d97b0c6e68d | 769 | py | Python | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_waveform/sine.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 47 | 2021-02-15T23:02:36.000Z | 2022-03-04T21:30:03.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_waveform/sine.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 7 | 2021-02-19T20:00:08.000Z | 2022-01-14T10:51:12.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_waveform/sine.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 14 | 2021-02-20T17:40:56.000Z | 2022-01-01T19:53:38.000Z | # SPDX-FileCopyrightText: 2017 Scott Shawcroft for Adafruit Industries
#
# SPDX-License-Identifier: MIT
"""
`adafruit_waveform.sine`
====================================================
This library generates sine waveforms that can be used to generate
sine audio signals.
* Author(s): Scott Shawcroft
"""
import arr... | 26.517241 | 85 | 0.647594 |
74a783b06a575e12b7a843a14ab6debc95d39f85 | 5,046 | py | Python | openstackclient/identity/v3/policy.py | redhat-openstack/python-openstackclient | 7dc2e1dc08b0692a3accb343c62451fb3d83f4cd | [
"Apache-2.0"
] | null | null | null | openstackclient/identity/v3/policy.py | redhat-openstack/python-openstackclient | 7dc2e1dc08b0692a3accb343c62451fb3d83f4cd | [
"Apache-2.0"
] | null | null | null | openstackclient/identity/v3/policy.py | redhat-openstack/python-openstackclient | 7dc2e1dc08b0692a3accb343c62451fb3d83f4cd | [
"Apache-2.0"
] | null | null | null | # Copyright 2012-2013 OpenStack Foundation
#
# 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 la... | 30.768293 | 77 | 0.602061 |
74a789411275247c8a441edb15e9ceeda1fd8dd9 | 578 | py | Python | lepidoptera/migrations/0031_initial_values_pub_ref.py | BelgianBiodiversityPlatform/catalogue-lepidoptera-belgium-webapp | c0ed7fde78f9af5afbd91c53ed3f543046e8dd41 | [
"BSD-2-Clause-FreeBSD"
] | 2 | 2020-11-17T18:02:44.000Z | 2021-02-02T04:00:21.000Z | lepidoptera/migrations/0031_initial_values_pub_ref.py | BelgianBiodiversityPlatform/catalogue-lepidoptera-belgium-webapp | c0ed7fde78f9af5afbd91c53ed3f543046e8dd41 | [
"BSD-2-Clause-FreeBSD"
] | 5 | 2020-06-05T19:00:59.000Z | 2022-01-13T00:52:30.000Z | lepidoptera/migrations/0031_initial_values_pub_ref.py | BelgianBiodiversityPlatform/catalogue-lepidoptera-belgium-webapp | c0ed7fde78f9af5afbd91c53ed3f543046e8dd41 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | # Generated by Django 2.0.13 on 2019-09-13 13:27
from django.db import migrations
def noop(apps, schema_editor):
pass
def make_reference_populated(apps, schema_editor):
Publication = apps.get_model('lepidoptera', 'Publication')
for p in Publication.objects.all():
p.markdown_reference = f"[[PUB... | 22.230769 | 62 | 0.678201 |
74a78960d4a9d218409f8caf3408b189b1fa1041 | 94 | py | Python | cryptoxlib/clients/binance/types.py | PetrZufan/cryptoxlib-aio | 8fbb817ee7a7a88693804e24877863370d1d53c7 | [
"MIT"
] | 90 | 2020-04-09T18:34:49.000Z | 2022-03-09T14:29:32.000Z | cryptoxlib/clients/binance/types.py | PetrZufan/cryptoxlib-aio | 8fbb817ee7a7a88693804e24877863370d1d53c7 | [
"MIT"
] | 44 | 2020-04-03T17:02:20.000Z | 2022-01-29T14:51:51.000Z | cryptoxlib/clients/binance/types.py | PetrZufan/cryptoxlib-aio | 8fbb817ee7a7a88693804e24877863370d1d53c7 | [
"MIT"
] | 28 | 2020-04-25T21:34:53.000Z | 2022-03-31T07:20:07.000Z | from typing import Union
from cryptoxlib.Pair import Pair
PairSymbolType = Union[Pair, str]
| 15.666667 | 33 | 0.797872 |
74a7b9a991d4b1fd79583281ecea364419c91554 | 927 | py | Python | setup.py | odemasi/ParlAI | eb8e468b21b5241522e068fe641758d6df23b564 | [
"MIT"
] | 24 | 2019-09-16T00:10:54.000Z | 2021-09-08T19:31:51.000Z | setup.py | odemasi/ParlAI | eb8e468b21b5241522e068fe641758d6df23b564 | [
"MIT"
] | null | null | null | setup.py | odemasi/ParlAI | eb8e468b21b5241522e068fe641758d6df23b564 | [
"MIT"
] | 7 | 2019-09-16T02:37:31.000Z | 2021-09-01T06:06:17.000Z | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from setuptools import setup, find_packages
import sys
if sys.version_info < (3,):
sys.exit('Sorry, Python 3 is re... | 25.75 | 67 | 0.673139 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.