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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
79317e2ae183d8248037f34d284b6611ac9779fe | 2,285 | py | Python | tests/test_blog/test_post_filter.py | florimondmanca/personal-api | 6300f965d3f51d1bf5f10cf1eb15d673bd627631 | [
"MIT"
] | 4 | 2018-08-17T08:06:06.000Z | 2020-02-20T15:15:56.000Z | tests/test_blog/test_post_filter.py | florimondmanca/personal-api | 6300f965d3f51d1bf5f10cf1eb15d673bd627631 | [
"MIT"
] | 2 | 2018-10-08T15:59:58.000Z | 2018-10-20T16:50:13.000Z | tests/test_blog/test_post_filter.py | florimondmanca/personal-api | 6300f965d3f51d1bf5f10cf1eb15d673bd627631 | [
"MIT"
] | 1 | 2019-09-14T23:15:10.000Z | 2019-09-14T23:15:10.000Z | """Test list of blog posts."""
from datetime import timedelta
from time import sleep
from typing import List
from django.utils import timezone
from rest_framework.test import APITestCase
from tests.decorators import authenticated
from blog.factories import PostFactory
@authenticated
class PostFilterListTest(APITes... | 34.104478 | 82 | 0.659081 |
79318a5ac2f76fd193a665fa421345831c74c465 | 4,980 | py | Python | alipay/aop/api/domain/AlipayFundJointaccountOperationApproveModel.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/domain/AlipayFundJointaccountOperationApproveModel.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/domain/AlipayFundJointaccountOperationApproveModel.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.constant.ParamConstants import *
class AlipayFundJointaccountOperationApproveModel(object):
def __init__(self):
self._account_id = None
self._agreement_no = None
self._amount = None
self._approve_scene ... | 30.931677 | 77 | 0.593173 |
79318bcad92701febcc4663b1dd1a4c6b445f13d | 4,829 | py | Python | test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/operations/_operation_group_two_operations.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/operations/_operation_group_two_operations.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/multiapi/Expected/AcceptanceTests/MultiapiWithSubmodule/multiapiwithsubmodule/submodule/v2/operations/_operation_group_two_operations.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 ... | 38.023622 | 133 | 0.6813 |
7931b4fd36e174546388ba7177a638cf6b91ab66 | 287 | py | Python | programacion_dinamica/camino_aleatorio/borracho.py | cristian-rincon/escuela-datascience | a9c805ccd30d66bfb4d17f652e9ce2f20a8978fb | [
"MIT"
] | null | null | null | programacion_dinamica/camino_aleatorio/borracho.py | cristian-rincon/escuela-datascience | a9c805ccd30d66bfb4d17f652e9ce2f20a8978fb | [
"MIT"
] | 32 | 2021-02-12T02:48:30.000Z | 2022-03-13T01:56:19.000Z | programacion_dinamica/camino_aleatorio/borracho.py | cristian-rincon/escuela-datascience | a9c805ccd30d66bfb4d17f652e9ce2f20a8978fb | [
"MIT"
] | null | null | null | import random
class Borracho:
def __init__(self, nombre):
self.nombre = nombre
class BorrachoTradicional(Borracho):
def __init__(self, nombre):
super().__init__(nombre)
def camina(self):
return random.choice([(0, 1), (0, -1), (1, 0), (-1, 0)])
| 16.882353 | 64 | 0.602787 |
7931cb63f45be1758d5283a534054866a455aaf2 | 1,069 | py | Python | openstack/ceilometer_plugin/setup.py | deti/boss | bc0cfe3067bf1cbf26789f7443a36e7cdd2ac869 | [
"Apache-2.0"
] | 7 | 2018-05-20T08:56:08.000Z | 2022-03-11T15:50:54.000Z | openstack/ceilometer_plugin/setup.py | deti/boss | bc0cfe3067bf1cbf26789f7443a36e7cdd2ac869 | [
"Apache-2.0"
] | 2 | 2021-06-08T21:12:51.000Z | 2022-01-13T01:25:27.000Z | openstack/ceilometer_plugin/setup.py | deti/boss | bc0cfe3067bf1cbf26789f7443a36e7cdd2ac869 | [
"Apache-2.0"
] | 5 | 2016-10-09T14:52:09.000Z | 2020-12-25T01:04:35.000Z | import os
from setuptools import setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
NAME = "ceilometer_metering_plugin"
setup(
name=NAME,
version="0.0.1",
url="asdco.ru",
author="ASD Technologies",
author_email="boss@asdco.ru",
description="BOSS me... | 28.131579 | 81 | 0.623948 |
7931db91559b2e508b407dc1f3cea0f9e2741b1a | 1,015 | py | Python | bookhelper/cmds/__init__.py | theithec/bookhelper | b1006b3bcca6ea6eb9039a33d25cbd24bba6f947 | [
"MIT"
] | 1 | 2016-09-06T15:24:52.000Z | 2016-09-06T15:24:52.000Z | bookhelper/cmds/__init__.py | theithec/bookhelper | b1006b3bcca6ea6eb9039a33d25cbd24bba6f947 | [
"MIT"
] | 2 | 2016-09-06T15:23:34.000Z | 2016-09-08T11:12:25.000Z | bookhelper/cmds/__init__.py | theithec/bookhelper | b1006b3bcca6ea6eb9039a33d25cbd24bba6f947 | [
"MIT"
] | null | null | null | import mwclient
from bookhelper import ExistingBook
class Action(object):
'''BaseAction'''
def __init__(self, conf):
self.result = None
self.conf = conf
self.errors = []
self.init()
if not self.errors:
self.run()
class SiteAction(Action):
'''An Action ... | 22.555556 | 63 | 0.57931 |
7931ed01490be791ec6fcf41def7ca861b712b23 | 1,908 | py | Python | alipay/aop/api/domain/InvoiceOperateParam.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/domain/InvoiceOperateParam.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/domain/InvoiceOperateParam.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.constant.ParamConstants import *
class InvoiceOperateParam(object):
def __init__(self):
self._invoice_id = None
self._operator = None
self._operator_type = None
@property
def invoice_id(self):
... | 26.873239 | 77 | 0.592243 |
7931f53c23bd0cdb0701878f146c77456dd072a8 | 1,401 | py | Python | tests/test_junit.py | melexis/warnings-plugin | 6f821f5c82c2cdf37988d28e651646e1452faf43 | [
"Apache-2.0"
] | 7 | 2017-04-21T12:05:23.000Z | 2019-12-12T13:37:07.000Z | tests/test_junit.py | melexis/warnings-plugin | 6f821f5c82c2cdf37988d28e651646e1452faf43 | [
"Apache-2.0"
] | 100 | 2017-04-24T10:50:33.000Z | 2022-02-18T10:39:42.000Z | tests/test_junit.py | melexis/warnings-plugin | 6f821f5c82c2cdf37988d28e651646e1452faf43 | [
"Apache-2.0"
] | 2 | 2017-05-23T11:50:59.000Z | 2019-11-06T09:26:33.000Z | from io import StringIO
from unittest import TestCase
from unittest.mock import patch
from mlx.warnings import WarningsPlugin
class TestJUnitFailures(TestCase):
def setUp(self):
self.warnings = WarningsPlugin(verbose=True)
self.warnings.activate_checker_name('junit')
def test_no_warning(sel... | 37.864865 | 73 | 0.680228 |
7931fb345bf3fa2b9360feda688d404c7adc7279 | 3,085 | py | Python | doctr/datasets/funsd.py | Mindee/doctr | b9d8feb1b4a2206e4944ef2dea109acc19585074 | [
"Apache-2.0"
] | 628 | 2021-02-13T21:49:37.000Z | 2022-03-31T19:48:57.000Z | doctr/datasets/funsd.py | Mindee/doctr | b9d8feb1b4a2206e4944ef2dea109acc19585074 | [
"Apache-2.0"
] | 694 | 2021-02-08T15:23:38.000Z | 2022-03-31T07:24:59.000Z | doctr/datasets/funsd.py | Mindee/doctr | b9d8feb1b4a2206e4944ef2dea109acc19585074 | [
"Apache-2.0"
] | 90 | 2021-04-28T05:39:02.000Z | 2022-03-31T06:48:36.000Z | # Copyright (C) 2021, Mindee.
# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.
import json
import os
from pathlib import Path
from typing import Any, Dict, List, Tuple
import numpy as np
from .datasets i... | 33.172043 | 110 | 0.572771 |
793265ecdb45fa7e42792959c5f1db1c58df2499 | 391 | py | Python | xontrib/pdb.py | sthagen/xonsh-xonsh | 5f418483015dfdac064c69a3891d7769971a0772 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | xontrib/pdb.py | sthagen/xonsh-xonsh | 5f418483015dfdac064c69a3891d7769971a0772 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | xontrib/pdb.py | sthagen/xonsh-xonsh | 5f418483015dfdac064c69a3891d7769971a0772 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | """Simple built-in debugger. Runs pdb on reception of SIGUSR1 signal."""
import signal
from xonsh.built_ins import XonshSession
def handle_sigusr1(sig, frame):
print("\nSIGUSR1 signal received. Starting interactive debugger...", flush=True)
import pdb
pdb.Pdb().set_trace(frame)
def _load_xontrib_(xsh:... | 24.4375 | 84 | 0.744246 |
7932874704369aa0c41c43f25b56bd37ba7a6e37 | 556 | py | Python | kubernetes/contrib/components/netbox/components/netbox-app/resources/config/startup_scripts/10_groups.py | gurubamal/oom | 536a5f670fa8e18a3a5b9fb25b9fc850002c22a2 | [
"Apache-2.0"
] | 31 | 2018-01-24T14:30:53.000Z | 2022-03-06T05:36:52.000Z | kubernetes/contrib/components/netbox/components/netbox-app/resources/config/startup_scripts/10_groups.py | gurubamal/oom | 536a5f670fa8e18a3a5b9fb25b9fc850002c22a2 | [
"Apache-2.0"
] | 3 | 2018-02-12T16:57:49.000Z | 2019-05-16T17:06:01.000Z | kubernetes/contrib/components/netbox/components/netbox-app/resources/config/startup_scripts/10_groups.py | gurubamal/oom | 536a5f670fa8e18a3a5b9fb25b9fc850002c22a2 | [
"Apache-2.0"
] | 38 | 2018-02-10T16:25:19.000Z | 2022-03-24T16:30:03.000Z | from django.contrib.auth.models import Group, User
from ruamel.yaml import YAML
with open('/opt/netbox/initializers/groups.yml', 'r') as stream:
yaml=YAML(typ='safe')
groups = yaml.load(stream)
if groups is not None:
for groupname, group_details in groups.items():
group, created = Group.objects.get_or... | 27.8 | 66 | 0.678058 |
793287519b0aa64ebbaa583def8299fb91569075 | 351 | py | Python | bflib/tables/gemsandjewelry/__init__.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | 3 | 2017-10-28T11:28:38.000Z | 2018-09-12T09:47:00.000Z | bflib/tables/gemsandjewelry/__init__.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | null | null | null | bflib/tables/gemsandjewelry/__init__.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | null | null | null | from bflib.tables.gemsandjewelry.qualitytable import GemsAndJewelryQualityTable
from bflib.tables.gemsandjewelry.qualitytype import QualityType
from bflib.tables.gemsandjewelry.gemtype import GemTypeTable
from bflib.tables.gemsandjewelry.jewelrytype import JewelryTypeTable
from bflib.tables.gemsandjewelry.valueadjustme... | 58.5 | 79 | 0.900285 |
79328aa05e00b772c0f9a3d232a89fc24be42f6d | 19,496 | py | Python | avalon/tools/models.py | simonebarbieri/avalon-core | cfd4191e364b47de7364096f45d9d9d9a901692a | [
"MIT"
] | null | null | null | avalon/tools/models.py | simonebarbieri/avalon-core | cfd4191e364b47de7364096f45d9d9d9a901692a | [
"MIT"
] | null | null | null | avalon/tools/models.py | simonebarbieri/avalon-core | cfd4191e364b47de7364096f45d9d9d9a901692a | [
"MIT"
] | null | null | null | import re
import time
import logging
import collections
from ..vendor.Qt import QtCore, QtGui
from ..vendor import Qt, qtawesome
from .. import style
from . import lib
log = logging.getLogger(__name__)
class TreeModel(QtCore.QAbstractItemModel):
Columns = list()
ItemRole = QtCore.Qt.UserRole + 1
item_c... | 30.510172 | 79 | 0.556063 |
7932c53389f53f22d5f40d46ad110d1c40c6b59a | 2,495 | py | Python | salt/modules/locate.py | epoelke/salt | 80ae64e54f9f336d3cdb6e03e42f2a50469ec8f2 | [
"Apache-2.0"
] | 1 | 2016-12-20T20:11:21.000Z | 2016-12-20T20:11:21.000Z | salt/modules/locate.py | epoelke/salt | 80ae64e54f9f336d3cdb6e03e42f2a50469ec8f2 | [
"Apache-2.0"
] | null | null | null | salt/modules/locate.py | epoelke/salt | 80ae64e54f9f336d3cdb6e03e42f2a50469ec8f2 | [
"Apache-2.0"
] | null | null | null | '''
Module for using the locate utilities
'''
# Import python libs
import logging
# Import salt libs
import salt.utils
log = logging.getLogger(__name__)
def __virtual__():
'''
Only work on POSIX-like systems
'''
if salt.utils.is_windows():
return False
return 'locate'
def version():
... | 20.45082 | 79 | 0.549499 |
7932cc1a5c66c8d4fc9a28eb9506df6ede77d38c | 14,491 | py | Python | taxamo/test/test_transactions_api.py | taxamo/taxamo-python | 190bdda68963860c131d2b1e9d31cd88de10d694 | [
"Apache-2.0"
] | 4 | 2016-03-14T03:59:08.000Z | 2020-06-21T07:58:38.000Z | taxamo/test/test_transactions_api.py | taxamo/taxamo-python | 190bdda68963860c131d2b1e9d31cd88de10d694 | [
"Apache-2.0"
] | 2 | 2016-03-07T13:41:23.000Z | 2017-07-11T13:39:44.000Z | taxamo/test/test_transactions_api.py | taxamo/taxamo-python | 190bdda68963860c131d2b1e9d31cd88de10d694 | [
"Apache-2.0"
] | 8 | 2016-01-13T14:32:19.000Z | 2021-08-16T11:14:06.000Z | """
Copyright 2014-2021 by Taxamo
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 ... | 47.825083 | 112 | 0.552964 |
7932d1cdeae5158e8abf2c90ddd4450c22823e1f | 2,361 | py | Python | attitude/display/error_comparison.py | davenquinn/Attitude | f7cd15212ca7a2f9a0e367cf9769e382eeaea91e | [
"MIT"
] | 8 | 2015-03-24T09:08:32.000Z | 2021-05-17T03:32:01.000Z | attitude/display/error_comparison.py | davenquinn/Attitude | f7cd15212ca7a2f9a0e367cf9769e382eeaea91e | [
"MIT"
] | 3 | 2018-03-16T07:38:26.000Z | 2022-02-15T06:07:54.000Z | attitude/display/error_comparison.py | davenquinn/Attitude | f7cd15212ca7a2f9a0e367cf9769e382eeaea91e | [
"MIT"
] | null | null | null | import numpy as N
from matplotlib.pyplot import subplots
from scipy.stats import chi2
from ..orientation import Orientation
from ..error.axes import sampling_axes, noise_axes
from ..geom.util import vector
from .plot.cov_types import hyperbola, bootstrap_noise, augment, ci
from .hyperbola import HyperbolicErrors
def ... | 29.148148 | 83 | 0.635324 |
7932dc657307ee1fc6ae9621fbbeccc9db0681a7 | 444 | py | Python | isomorphicString.py | anishmo99/DailyInterviewPro | d8724e8feec558ab1882d22c9ca63b850b767753 | [
"MIT"
] | 1 | 2020-08-09T07:07:53.000Z | 2020-08-09T07:07:53.000Z | isomorphicString.py | anishmo99/DailyInterviewPro | d8724e8feec558ab1882d22c9ca63b850b767753 | [
"MIT"
] | null | null | null | isomorphicString.py | anishmo99/DailyInterviewPro | d8724e8feec558ab1882d22c9ca63b850b767753 | [
"MIT"
] | 1 | 2020-06-06T20:56:33.000Z | 2020-06-06T20:56:33.000Z | class Solution:
def isIsomorphic(self, s: str, t: str) -> bool:
ump1, ump2 = dict(), dict()
for i in range(len(s)):
if s[i] in ump1 and ump1[s[i]] != t[i]:
return False
ump1[s[i]] = t[i]
for i in range(len(t)):
if t[i]... | 29.6 | 51 | 0.405405 |
7932e1994af8fcbb3233ca19734e76cf2e97cf8e | 1,494 | py | Python | features/steps/colors_steps.py | cloose/ray-tracer-challenge | 5e9dd56fb67c5cba47172986a963fc22a8cbcaa2 | [
"MIT"
] | null | null | null | features/steps/colors_steps.py | cloose/ray-tracer-challenge | 5e9dd56fb67c5cba47172986a963fc22a8cbcaa2 | [
"MIT"
] | null | null | null | features/steps/colors_steps.py | cloose/ray-tracer-challenge | 5e9dd56fb67c5cba47172986a963fc22a8cbcaa2 | [
"MIT"
] | null | null | null | from asserts import assert_tuple
from core import color, add, subtract, multiply, hadamard
@given(u'c <- color({r:g}, {g:g}, {b:g})')
def step_impl(context, r, g, b):
context.c = color(r, g, b)
@given(u'c1 <- color({r:g}, {g:g}, {b:g})')
def step_impl(context, r, g, b):
context.c1 = color(r, g, b)
@given(... | 23.34375 | 73 | 0.601071 |
793310a1184e0e7e358c01835d8208beb5f84974 | 26,121 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/operations/_dedicated_host_groups_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/operations/_dedicated_host_groups_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/operations/_dedicated_host_groups_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.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 ... | 41.135433 | 180 | 0.674208 |
79332e73f5964e52bda3e8ecf72bf4f766906486 | 2,637 | py | Python | test/test_projects_api.py | pollination/python-sdk | 599e8dbfc6e547c5e18aa903b27c70d7ffef84e5 | [
"RSA-MD"
] | 2 | 2020-01-30T23:28:59.000Z | 2020-05-06T16:43:47.000Z | test/test_projects_api.py | pollination/python-sdk | 599e8dbfc6e547c5e18aa903b27c70d7ffef84e5 | [
"RSA-MD"
] | 1 | 2020-10-02T18:00:25.000Z | 2020-10-02T18:00:25.000Z | test/test_projects_api.py | pollination/python-sdk | 599e8dbfc6e547c5e18aa903b27c70d7ffef84e5 | [
"RSA-MD"
] | null | null | null | # coding: utf-8
"""
pollination-server
Pollination Server OpenAPI Definition # noqa: E501
The version of the OpenAPI document: 0.16.0
Contact: info@pollination.cloud
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import unittest
import pollination_sdk... | 22.159664 | 79 | 0.629882 |
7933642396ae84cb62de4499d10731deee3a0ccc | 493 | py | Python | phr/establecimiento/migrations/0009_auto_20170424_1125.py | richardqa/django-ex | e5b8585f28a97477150ac5daf5e55c74b70d87da | [
"CC0-1.0"
] | null | null | null | phr/establecimiento/migrations/0009_auto_20170424_1125.py | richardqa/django-ex | e5b8585f28a97477150ac5daf5e55c74b70d87da | [
"CC0-1.0"
] | null | null | null | phr/establecimiento/migrations/0009_auto_20170424_1125.py | richardqa/django-ex | e5b8585f28a97477150ac5daf5e55c74b70d87da | [
"CC0-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2017-04-24 11:25
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('establecimiento', '0008_auto_20170424_1124'),
]
operations = [
migrations.A... | 23.47619 | 72 | 0.643002 |
79338668803370abfd6ad60f22c6f5642d68c6db | 3,804 | py | Python | grouper/ctl/main.py | TimYagan/merou | 3d3cd5e17eab5ffe259f7b41a925af6f47ec8988 | [
"Apache-2.0"
] | null | null | null | grouper/ctl/main.py | TimYagan/merou | 3d3cd5e17eab5ffe259f7b41a925af6f47ec8988 | [
"Apache-2.0"
] | null | null | null | grouper/ctl/main.py | TimYagan/merou | 3d3cd5e17eab5ffe259f7b41a925af6f47ec8988 | [
"Apache-2.0"
] | null | null | null | import argparse
import logging
import sys
from typing import TYPE_CHECKING
from grouper import __version__
from grouper.ctl import group, oneoff, shell
from grouper.ctl.factory import CtlCommandFactory
from grouper.ctl.settings import CtlSettings
from grouper.initialization import create_sql_usecase_factory
from group... | 38.816327 | 99 | 0.731073 |
7933adb1b1d9eee0ecc4b1b4cc25462bd5c92050 | 8,376 | py | Python | pyfatfs/EightDotThree.py | abrasive/pyfatfs | a35586bfa2b1d3f8d4638142407db68f9318b86d | [
"MIT"
] | null | null | null | pyfatfs/EightDotThree.py | abrasive/pyfatfs | a35586bfa2b1d3f8d4638142407db68f9318b86d | [
"MIT"
] | null | null | null | pyfatfs/EightDotThree.py | abrasive/pyfatfs | a35586bfa2b1d3f8d4638142407db68f9318b86d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""8DOT3 file name helper class & functions."""
import errno
import os
from pyfatfs import FAT_OEM_ENCODING, _init_check
from pyfatfs._exceptions import PyFATException, NotAFatEntryException
class EightDotThree:
"""8DOT3 filename representation."""
#: Length of the byte representat... | 34.469136 | 78 | 0.552412 |
7933b7013b48b7cb85011512517fe689fa386446 | 3,092 | py | Python | jenkinsapi_tests/systests/test_jenkins.py | ifwe/jenkinsapi | 31a7fbb07efcd48e226f7dcf643fd2a2625416c0 | [
"MIT"
] | null | null | null | jenkinsapi_tests/systests/test_jenkins.py | ifwe/jenkinsapi | 31a7fbb07efcd48e226f7dcf643fd2a2625416c0 | [
"MIT"
] | null | null | null | jenkinsapi_tests/systests/test_jenkins.py | ifwe/jenkinsapi | 31a7fbb07efcd48e226f7dcf643fd2a2625416c0 | [
"MIT"
] | null | null | null | '''
System tests for `jenkinsapi.jenkins` module.
'''
import unittest
from jenkinsapi.job import Job
from jenkinsapi.invocation import Invocation
from jenkinsapi_tests.systests.base import BaseSystemTest
from jenkinsapi_tests.systests.job_configs import EMPTY_JOB
from jenkinsapi_tests.test_utils.random_strings import r... | 34.355556 | 91 | 0.689198 |
7933c33d4312f4c2017923343112b975481d1eb2 | 2,719 | py | Python | nicos_mlz/kws3/devices/selector.py | mlz-ictrl/nicos | a6de0bc194ba42e3dc04a033713b41b5499ba8e1 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 12 | 2019-11-06T15:40:36.000Z | 2022-01-01T16:23:00.000Z | nicos_mlz/kws3/devices/selector.py | ess-dmsc/nicos | 755d61d403ff7123f804c45fc80c7ff4d762993b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 91 | 2020-08-18T09:20:26.000Z | 2022-02-01T11:07:14.000Z | nicos_mlz/kws3/devices/selector.py | mlz-ictrl/nicos | a6de0bc194ba42e3dc04a033713b41b5499ba8e1 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 6 | 2020-01-11T10:52:30.000Z | 2022-02-25T12:35:23.000Z | # -*- coding: utf-8 -*-
# *****************************************************************************
# NICOS, the Networked Instrument Control System of the MLZ
# Copyright (c) 2009-2021 by the NICOS contributors (see AUTHORS)
#
# This program is free software; you can redistribute it and/or modify it under
# the t... | 37.246575 | 79 | 0.62854 |
7933c7e6049eb1d49156d41ccb4cf92f3a3b99b5 | 1,515 | py | Python | tests/prokaryote/test_model_gen_core.py | KarrLab/model_generator | b2735391545bcd5f21faaa1ceaa1949e53497378 | [
"MIT"
] | 6 | 2018-12-24T16:20:11.000Z | 2022-01-26T23:38:25.000Z | tests/prokaryote/test_model_gen_core.py | KarrLab/model_generator | b2735391545bcd5f21faaa1ceaa1949e53497378 | [
"MIT"
] | 15 | 2018-08-08T20:34:40.000Z | 2021-10-31T20:08:40.000Z | tests/prokaryote/test_model_gen_core.py | KarrLab/model_generator | b2735391545bcd5f21faaa1ceaa1949e53497378 | [
"MIT"
] | 2 | 2019-04-05T16:11:57.000Z | 2020-04-29T14:14:30.000Z | """ Tests of model generation
:Author: Jonathan Karr <karr@mssm.edu>
:Date: 2018-06-11
:Copyright: 2018, Karr Lab
:License: MIT
"""
from test.support import EnvironmentVarGuard
from wc_kb_gen import random
from wc_model_gen import prokaryote
import obj_tables
import unittest
import wc_kb
import wc_lang
import tempfile... | 31.5625 | 86 | 0.683168 |
7933e7da3e5ba2330e7ffcc92e43b018068914ef | 10,074 | py | Python | psa_builder.py | jeromecoutant/mbed-os-tf-m-regression-tests | 08ecb01750ad1c9a3442771cb8697d68e43e6d80 | [
"CECILL-B"
] | null | null | null | psa_builder.py | jeromecoutant/mbed-os-tf-m-regression-tests | 08ecb01750ad1c9a3442771cb8697d68e43e6d80 | [
"CECILL-B"
] | null | null | null | psa_builder.py | jeromecoutant/mbed-os-tf-m-regression-tests | 08ecb01750ad1c9a3442771cb8697d68e43e6d80 | [
"CECILL-B"
] | null | null | null | #!/usr/bin/env python3
"""
Copyright (c) 2020-2021 ARM Limited. All rights reserved.
SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licen... | 28.86533 | 97 | 0.593012 |
7933e7f6fe2f04f530c478b0cb965c8623e86a54 | 37,920 | py | Python | Allura/allura/model/artifact.py | shalithasuranga/allura | 4f7fba13415954d07f602a051ec697329dd3706b | [
"Apache-2.0"
] | null | null | null | Allura/allura/model/artifact.py | shalithasuranga/allura | 4f7fba13415954d07f602a051ec697329dd3706b | [
"Apache-2.0"
] | null | null | null | Allura/allura/model/artifact.py | shalithasuranga/allura | 4f7fba13415954d07f602a051ec697329dd3706b | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (t... | 34.949309 | 117 | 0.608122 |
7934257405ce21881df40ea7d68ecea018b47b6c | 262 | py | Python | terrascript/shell/r.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/shell/r.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/shell/r.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/shell/r.py
# Automatically generated by tools/makecode.py ()
import warnings
warnings.warn(
"using the 'legacy layout' is deprecated", DeprecationWarning, stacklevel=2
)
import terrascript
class shell_script(terrascript.Resource):
pass
| 18.714286 | 79 | 0.770992 |
7934286e1e22b85e21510e1413874e2d34b93d9b | 13,071 | py | Python | main.py | NWPU-903PR/MTDDI | ee4b7f9641aa55681757136f86bae540b046f40b | [
"MIT"
] | 3 | 2021-03-24T07:31:13.000Z | 2021-11-15T11:43:01.000Z | main.py | NWPU-903PR/MTDDI | ee4b7f9641aa55681757136f86bae540b046f40b | [
"MIT"
] | 1 | 2021-11-25T12:37:23.000Z | 2021-11-25T12:37:23.000Z | main.py | NWPU-903PR/MTDDI | ee4b7f9641aa55681757136f86bae540b046f40b | [
"MIT"
] | 3 | 2021-04-20T04:31:42.000Z | 2021-12-06T21:25:35.000Z | from __future__ import division
from __future__ import print_function
from operator import itemgetter
from itertools import combinations
import time
import os
import pandas as pd
import random
import copy
import scipy.io as sio
import tensorflow as tf
import numpy as np
import networkx as nx
import scipy.sparse as sp
f... | 35.615804 | 113 | 0.671563 |
79343ba0509805821c7927c9820fa211e0b01289 | 796 | py | Python | spydrnet/composers/__init__.py | chgentso/spydrnet | 2cfc33ae367771cd2f3a15f240ebd0ec76841b5f | [
"BSD-3-Clause"
] | 34 | 2020-03-12T15:40:49.000Z | 2022-02-28T07:13:47.000Z | spydrnet/composers/__init__.py | chgentso/spydrnet | 2cfc33ae367771cd2f3a15f240ebd0ec76841b5f | [
"BSD-3-Clause"
] | 104 | 2020-01-06T20:32:19.000Z | 2022-01-02T00:20:14.000Z | spydrnet/composers/__init__.py | chgentso/spydrnet | 2cfc33ae367771cd2f3a15f240ebd0ec76841b5f | [
"BSD-3-Clause"
] | 10 | 2020-09-02T20:24:00.000Z | 2022-02-24T16:10:07.000Z | import os
def compose(netlist, filename, definition_list=[], write_blackbox=True):
"""To compose a file into a netlist format"""
extension = os.path.splitext(filename)[1]
extension_lower = extension.lower()
if extension_lower in {".edf", ".edif"}:
from spydrnet.composers.edif.composer import C... | 39.8 | 76 | 0.683417 |
79344bf06682d3716b30a295461102310c82e5ac | 6,083 | py | Python | tests/python/pants_test/goal/test_run_tracker.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/goal/test_run_tracker.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/goal/test_run_tracker.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
import BaseHTTPServer
import json
import threading
import urlparse
from pants.goal.run_t... | 36.208333 | 98 | 0.581128 |
79347054e0b8a1e283c185914d7ef066ef6a736e | 10,209 | py | Python | tests/test_ipcheck.py | Turgon37/IpCheck | d9fecd14c0c3539d15f0fd34b23799c3ebbcb50e | [
"MIT"
] | 3 | 2018-12-28T10:57:00.000Z | 2020-01-28T13:23:13.000Z | tests/test_ipcheck.py | Turgon37/IpCheck | d9fecd14c0c3539d15f0fd34b23799c3ebbcb50e | [
"MIT"
] | 2 | 2018-05-10T17:57:36.000Z | 2019-09-07T09:20:07.000Z | tests/test_ipcheck.py | Turgon37/IpCheck | d9fecd14c0c3539d15f0fd34b23799c3ebbcb50e | [
"MIT"
] | null | null | null | # -*- coding: utf8 -*-
import http.client
import logging
import shlex
import shutil
import socket
import ssl
import subprocess
from unittest.mock import patch, Mock
from .mocks.connexionmock import createHTTPConnectionMock, createHTTPSConnectionMock
import ipcheck
# URL settings
def test_without_url():
"""Must... | 37.395604 | 105 | 0.67225 |
79348426bdb4d2c92beba5e7b2fb31a97527199e | 1,697 | py | Python | Data-Structures/Trees/BFS.py | akhopkar01/Data-structures-and-Algorithms | bf8681179d3443d62f8a26332ce06106fb2dfdf6 | [
"MIT"
] | 1 | 2020-09-10T15:48:16.000Z | 2020-09-10T15:48:16.000Z | Data-Structures/Trees/BFS.py | akhopkar01/Data-structures-and-Algorithms | bf8681179d3443d62f8a26332ce06106fb2dfdf6 | [
"MIT"
] | null | null | null | Data-Structures/Trees/BFS.py | akhopkar01/Data-structures-and-Algorithms | bf8681179d3443d62f8a26332ce06106fb2dfdf6 | [
"MIT"
] | null | null | null | from Trees import *
def bfs_tree(tree):
root = tree.get_root()
visit_order = []
q = Queue()
q.enq(root)
while q:
node = q.deq()
if node is None:
break
visit_order.append(node)
if node.has_left_child():
q.enq(node.get_left_child())
... | 22.038961 | 66 | 0.543901 |
7934ae2e429dcf65de978234344efae508cab76b | 2,413 | py | Python | python_modules/dagster/dagster/core/utils.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster/dagster/core/utils.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster/dagster/core/utils.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | import random
import string
import uuid
import warnings
from collections import OrderedDict
from typing import Union
import toposort as toposort_
from dagster import check
from dagster.utils import frozendict
from dagster.version import __version__
BACKFILL_TAG_LENGTH = 8
PYTHON_LOGGING_LEVELS_MAPPING = frozendict(... | 29.790123 | 99 | 0.693742 |
7934aec76c99fea6516554645cdaf4896d4e3149 | 135,419 | py | Python | pycaret/nlp.py | daikikatsuragawa/pycaret | a2436a1485b325e7f99f57f99f8049177f26a8c9 | [
"MIT"
] | null | null | null | pycaret/nlp.py | daikikatsuragawa/pycaret | a2436a1485b325e7f99f57f99f8049177f26a8c9 | [
"MIT"
] | null | null | null | pycaret/nlp.py | daikikatsuragawa/pycaret | a2436a1485b325e7f99f57f99f8049177f26a8c9 | [
"MIT"
] | null | null | null | # Module: Natural Language Processing
# Author: Moez Ali <moez.ali@queensu.ca>
# License: MIT
# Release: PyCaret 2.2.0
# Last modified : 25/10/2020
from typing import Optional, Dict, Any, Dict
from pycaret.loggers import DashboardLogger
from pycaret.loggers.mlflow_logger import MlflowLogger
from pycaret.loggers.wandb_... | 28.437421 | 202 | 0.539045 |
7934deb3c07bd375a400735a95a884a6aae16649 | 4,351 | py | Python | bitmex_liquidation/api.py | philipperemy/bitmex-liquidations | 1569f7bf0fb7cf89f79d23261d7204fe350b25f1 | [
"MIT"
] | 30 | 2019-11-10T04:52:08.000Z | 2022-01-27T22:41:46.000Z | bitmex_liquidation/api.py | kccheung/bitmex-liquidations | 1569f7bf0fb7cf89f79d23261d7204fe350b25f1 | [
"MIT"
] | 3 | 2020-01-17T23:53:15.000Z | 2021-01-17T17:29:28.000Z | bitmex_liquidation/api.py | kccheung/bitmex-liquidations | 1569f7bf0fb7cf89f79d23261d7204fe350b25f1 | [
"MIT"
] | 8 | 2019-11-10T09:12:19.000Z | 2022-02-02T14:42:14.000Z | import json
import logging
import threading
from datetime import datetime
from queue import Queue
from time import sleep
import websocket
logger = logging.getLogger(__name__)
class LiquidationPrinter:
# Just to have a colorful console.
class BColor:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
... | 33.21374 | 102 | 0.545162 |
7934df9d7242729576f9def8fe0b5b369d84387d | 173 | py | Python | vnpy_pro/app/data_recorder/__init__.py | caizhanjin/vnpy | c0886dbd8eba7f506634b1700dfd09b0b098ef26 | [
"MIT"
] | 5 | 2020-09-13T05:07:38.000Z | 2020-12-26T15:10:00.000Z | vnpy_pro/app/data_recorder/__init__.py | caizhanjin/vnpy | c0886dbd8eba7f506634b1700dfd09b0b098ef26 | [
"MIT"
] | null | null | null | vnpy_pro/app/data_recorder/__init__.py | caizhanjin/vnpy | c0886dbd8eba7f506634b1700dfd09b0b098ef26 | [
"MIT"
] | 2 | 2020-06-03T06:40:31.000Z | 2020-06-12T14:55:17.000Z | from vnpy.app.data_recorder import DataRecorderApp
from .engine import RecorderEnginePro
class DataRecorderAppPro(DataRecorderApp):
engine_class = RecorderEnginePro
| 19.222222 | 50 | 0.83815 |
7934e4b340a52fb8007b98401053516306c86d16 | 2,392 | py | Python | metadata/ChannelsDynamicWave/hooks/pre-stage.py | csdms/wmt-metadata | 39207acc376f1cd21b2ae1d5581a1e2c317a6441 | [
"MIT"
] | null | null | null | metadata/ChannelsDynamicWave/hooks/pre-stage.py | csdms/wmt-metadata | 39207acc376f1cd21b2ae1d5581a1e2c317a6441 | [
"MIT"
] | 10 | 2016-09-27T21:13:22.000Z | 2018-10-31T19:42:32.000Z | metadata/ChannelsDynamicWave/hooks/pre-stage.py | csdms/wmt-metadata | 39207acc376f1cd21b2ae1d5581a1e2c317a6441 | [
"MIT"
] | null | null | null | import os
import shutil
from wmt.config import site
from wmt.models.submissions import prepend_to_path
from wmt.utils.hook import find_simulation_input_file
from topoflow_utils.hook import (assign_parameters,
scalar_to_rtg_file, choices_map, units_map)
file_list = ['DEM_file']
def ... | 35.176471 | 79 | 0.640468 |
79351f2dc75eb8b01a9f407a48e178b8b902df20 | 2,832 | py | Python | tests/dataflow/test_stats.py | deepdoctection/deepdoctection | 7e0d7396e5ef8bf8109904e09c5d4ee56cb5a036 | [
"Apache-2.0"
] | 39 | 2021-12-14T11:05:25.000Z | 2022-03-31T18:50:58.000Z | tests/dataflow/test_stats.py | deepdoctection/deepdoctection | 7e0d7396e5ef8bf8109904e09c5d4ee56cb5a036 | [
"Apache-2.0"
] | 17 | 2022-01-04T14:32:26.000Z | 2022-03-29T14:01:36.000Z | tests/dataflow/test_stats.py | deepdoctection/deepdoctection | 7e0d7396e5ef8bf8109904e09c5d4ee56cb5a036 | [
"Apache-2.0"
] | 4 | 2022-01-11T16:40:17.000Z | 2022-03-30T02:09:55.000Z | # -*- coding: utf-8 -*-
# File: test_stats.py
# Copyright 2021 Dr. Janis Meyer. 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/LI... | 28.606061 | 113 | 0.678672 |
793544c619c0283ce4cb4b66a22bafa41a7000a1 | 1,047 | py | Python | src/Tacotron2/utils.py | ajinkyakulkarni14/ERISHA | 2135ed05845ca097f616dc4548fb1a33c6fe9ad2 | [
"BSD-3-Clause"
] | 42 | 2020-11-15T13:46:24.000Z | 2021-08-16T11:04:17.000Z | src/Tacotron2/utils.py | ajinkyakulkarni14/ERISHA | 2135ed05845ca097f616dc4548fb1a33c6fe9ad2 | [
"BSD-3-Clause"
] | 3 | 2021-02-24T03:08:31.000Z | 2021-11-05T04:15:53.000Z | src/Tacotron2/utils.py | ajinkyakulkarni14/ERISHA | 2135ed05845ca097f616dc4548fb1a33c6fe9ad2 | [
"BSD-3-Clause"
] | 18 | 2020-11-16T11:07:11.000Z | 2022-02-11T01:25:24.000Z | # from https://github.com/NVIDIA/tacotron2
# modified load_wav_to_torch, resampling to match the target_sampling_rate
import numpy as np
from scipy.io.wavfile import read
import torch
import librosa
def get_mask_from_lengths(lengths):
max_len = torch.max(lengths).item()
ids = torch.arange(0, max_len, out=tor... | 29.083333 | 82 | 0.725883 |
793555a42cd727d617c1b753175d31ce79133abc | 6,636 | py | Python | lib/cretonne/meta/test_gen_legalizer.py | pepyakin/cretonne | 95afd15445acd87665d9bcd55ddef974a0cb8f39 | [
"Apache-2.0"
] | null | null | null | lib/cretonne/meta/test_gen_legalizer.py | pepyakin/cretonne | 95afd15445acd87665d9bcd55ddef974a0cb8f39 | [
"Apache-2.0"
] | null | null | null | lib/cretonne/meta/test_gen_legalizer.py | pepyakin/cretonne | 95afd15445acd87665d9bcd55ddef974a0cb8f39 | [
"Apache-2.0"
] | null | null | null | import doctest
import gen_legalizer
from unittest import TestCase
from srcgen import Formatter
from gen_legalizer import get_runtime_typechecks, emit_runtime_typecheck
from base.instructions import vselect, vsplit, isplit, iconcat, vconcat, \
iconst, b1, icmp, copy, sextend, uextend, ireduce, fdemote, fpromote # no... | 33.685279 | 79 | 0.557715 |
7935783b56dab1f69a1fdae95345bb35cf4c31d3 | 373 | py | Python | kubelet/conftest.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 4 | 2021-06-21T19:21:49.000Z | 2021-06-23T21:21:55.000Z | kubelet/conftest.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 1 | 2018-08-15T05:50:17.000Z | 2018-08-15T05:50:17.000Z | kubelet/conftest.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 1 | 2019-03-06T14:30:52.000Z | 2019-03-06T14:30:52.000Z | import sys
def get_conn_info():
return {'url': 'http://127.0.0.1:10255'}
def get_tags(entity, high_card):
tag_store = {}
return tag_store.get(entity, [])
kubeutil = type(sys)('kubeutil')
kubeutil.get_connection_info = get_conn_info
sys.modules['kubeutil'] = kubeutil
tagger = type(sys)('tagger')
tagge... | 18.65 | 44 | 0.697051 |
79358d78cc5b8af60a2ed766c56fc550ec62f91f | 77,767 | py | Python | raiden/tests/integration/api/test_restapi.py | ExchangeUnion/raiden | 2217bcb698fcfce3499dc1f41ad919ed82e8e45f | [
"MIT"
] | null | null | null | raiden/tests/integration/api/test_restapi.py | ExchangeUnion/raiden | 2217bcb698fcfce3499dc1f41ad919ed82e8e45f | [
"MIT"
] | 12 | 2019-08-09T19:12:17.000Z | 2019-12-05T15:49:29.000Z | raiden/tests/integration/api/test_restapi.py | ExchangeUnion/raiden | 2217bcb698fcfce3499dc1f41ad919ed82e8e45f | [
"MIT"
] | null | null | null | import datetime
import json
from hashlib import sha256
from http import HTTPStatus
import gevent
import grequests
import pytest
from eth_utils import (
is_checksum_address,
to_bytes,
to_canonical_address,
to_checksum_address,
to_hex,
)
from flask import url_for
from raiden.api.v1.encoding import A... | 36.979078 | 99 | 0.70782 |
79359fcbd1d263feac91db9820bfb060a47331db | 2,844 | py | Python | superset/migrations/versions/21e88bc06c02_annotation_migration.py | franksam007/incubator-superset | a0f572eb3ea4b89cb435a8af20436f8e1d34814e | [
"Apache-2.0"
] | 108 | 2018-01-22T11:09:59.000Z | 2021-01-15T10:53:04.000Z | superset/migrations/versions/21e88bc06c02_annotation_migration.py | franksam007/incubator-superset | a0f572eb3ea4b89cb435a8af20436f8e1d34814e | [
"Apache-2.0"
] | 112 | 2018-01-25T22:57:21.000Z | 2019-08-22T20:08:48.000Z | superset/migrations/versions/21e88bc06c02_annotation_migration.py | zhwXF/Superset | 14c3488c79f8f3cdbd1123e8f7a92f8746c2db09 | [
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | 24 | 2018-01-19T22:54:39.000Z | 2020-11-12T13:04:25.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 31.6 | 78 | 0.632208 |
7935e0123b61f70f3aab92813b62b8695273b005 | 22 | py | Python | coarse_graining/__init__.py | chrisjonesBSU/mbuild-examples | 6863dc7d59a2eef66f6836d81cc4c7d9b7ab5ac3 | [
"MIT"
] | 4 | 2020-01-16T16:54:34.000Z | 2020-11-08T23:43:00.000Z | coarse_graining/__init__.py | chrisjonesBSU/mbuild-examples | 6863dc7d59a2eef66f6836d81cc4c7d9b7ab5ac3 | [
"MIT"
] | 3 | 2019-10-17T13:55:49.000Z | 2020-01-24T22:55:11.000Z | coarse_graining/__init__.py | chrisjonesBSU/mbuild-examples | 6863dc7d59a2eef66f6836d81cc4c7d9b7ab5ac3 | [
"MIT"
] | 5 | 2019-10-17T13:22:55.000Z | 2021-05-18T01:47:39.000Z | __author__ = 'sallai'
| 11 | 21 | 0.727273 |
7935e9006cd57ff6695c5b1e4bc13224cd6f4e67 | 4,267 | py | Python | src/python/pants/pantsd/watchman_launcher.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | src/python/pants/pantsd/watchman_launcher.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | src/python/pants/pantsd/watchman_launcher.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
import logging
from pants.binaries.binary_util import BinaryToolFetcher, BinaryUtil
from... | 41.427184 | 99 | 0.732833 |
7935f215391a8b683282a4a73430cfa9f723ed81 | 5,609 | py | Python | oracle/modules/lottery.py | Toofifty/Oracle2 | aea7db04d1f470cf04cf6b9b291b1fd47e4b6b4d | [
"MIT"
] | 1 | 2015-07-15T15:24:54.000Z | 2015-07-15T15:24:54.000Z | oracle/modules/lottery.py | Toofifty/Oracle2 | aea7db04d1f470cf04cf6b9b291b1fd47e4b6b4d | [
"MIT"
] | null | null | null | oracle/modules/lottery.py | Toofifty/Oracle2 | aea7db04d1f470cf04cf6b9b291b1fd47e4b6b4d | [
"MIT"
] | null | null | null | from threading import Thread
import time, traceback, random
from format import BOLD, RESET, CYAN, GREEN
lotto = None
def _init(b):
print '\t%s loaded' % __name__
def lottery(l, b, i):
"""!parent-command
!c new
!d Create a new lottery (cost: 10 points)
!a [duration] [min-bet] [max-bet]
... | 28.912371 | 89 | 0.477982 |
79363d5485b70831a8151ef2d952c384ac7c22bf | 1,005 | py | Python | py/64. Minimum Path Sum.py | longwangjhu/LeetCode | a5c33e8d67e67aedcd439953d96ac7f443e2817b | [
"MIT"
] | 3 | 2021-08-07T07:01:34.000Z | 2021-08-07T07:03:02.000Z | py/64. Minimum Path Sum.py | longwangjhu/LeetCode | a5c33e8d67e67aedcd439953d96ac7f443e2817b | [
"MIT"
] | null | null | null | py/64. Minimum Path Sum.py | longwangjhu/LeetCode | a5c33e8d67e67aedcd439953d96ac7f443e2817b | [
"MIT"
] | null | null | null | # https://leetcode.com/problems/minimum-path-sum/
# Given a m x n grid filled with non-negative numbers, find a path from top left
# to bottom right, which minimizes the sum of all numbers along its path.
# Note: You can only move either down or right at any point in time.
###########################################... | 31.40625 | 80 | 0.478607 |
793670206caf306ee1229cb3aa833aeda11aaef5 | 698 | py | Python | src/server/MhmServer/models/sub_sample.py | jbrr/mosquito_heat_map | 2cce46a5e26526bd04a83486a62733ab343376ba | [
"MIT"
] | null | null | null | src/server/MhmServer/models/sub_sample.py | jbrr/mosquito_heat_map | 2cce46a5e26526bd04a83486a62733ab343376ba | [
"MIT"
] | 2 | 2020-07-07T20:31:40.000Z | 2022-02-10T19:17:35.000Z | src/server/MhmServer/models/sub_sample.py | jbrr/mosquito_heat_map | 2cce46a5e26526bd04a83486a62733ab343376ba | [
"MIT"
] | null | null | null | from MhmServer.database import (Column, DateTime, ForeignKey, func, Integer, Model)
import datetime
class SubSample(Model):
__tablename__ = 'sub_sample'
id = Column(Integer, primary_key=True)
sample_id = Column(Integer, ForeignKey('sample.id'), nullable=False)
identified_by = Column(Integer, ForeignK... | 38.777778 | 83 | 0.719198 |
7936728f042e1a9ed980163a5ef94a4994aa4d17 | 11,387 | py | Python | collections/ansible_collections/community/general/plugins/modules/monitoring/monit.py | lisenet/homelab-ansible | e77007ba5b45e4c1b8fdf3cff7699f231191b193 | [
"BSD-3-Clause"
] | 1 | 2020-12-23T13:27:39.000Z | 2020-12-23T13:27:39.000Z | .ansible/collections/ansible_collections/community/general/plugins/modules/monitoring/monit.py | chronicc/proving-ground | 3e392122a05fb8383a3700954baebb0df330e9e3 | [
"MIT"
] | null | null | null | .ansible/collections/ansible_collections/community/general/plugins/modules/monitoring/monit.py | chronicc/proving-ground | 3e392122a05fb8383a3700954baebb0df330e9e3 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2013, Darryl Stoflet <stoflet@gmail.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = '''
---
module: monit
short_desc... | 33.889881 | 129 | 0.648722 |
7936a68969c0440b114e1ae332d225f5170b8025 | 3,496 | py | Python | oscar/lib/python2.7/site-packages/django/contrib/sessions/middleware.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django/contrib/sessions/middleware.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django/contrib/sessions/middleware.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | import time
from importlib import import_module
from django.conf import settings
from django.contrib.sessions.backends.base import UpdateError
from django.core.exceptions import SuspiciousOperation
from django.utils.cache import patch_vary_headers
from django.utils.deprecation import MiddlewareMixin
from djang... | 47.243243 | 84 | 0.563501 |
7936c78aa150f18ed2bc413f7d1d2860d9cfb9a6 | 6,927 | py | Python | benchmarking.py | ScilifelabDataCentre/Annual-report-2021 | 6a5d9ca0320ee6cba39245e81e2bd61f1a6822e1 | [
"MIT"
] | null | null | null | benchmarking.py | ScilifelabDataCentre/Annual-report-2021 | 6a5d9ca0320ee6cba39245e81e2bd61f1a6822e1 | [
"MIT"
] | null | null | null | benchmarking.py | ScilifelabDataCentre/Annual-report-2021 | 6a5d9ca0320ee6cba39245e81e2bd61f1a6822e1 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
from collections import Counter
import plotly.express as px
import plotly.graph_objects as go
import os
# The benchmark values come separately from KTH
benchmark = pd.read_excel(
"Data/SciLifeLab_swe_benchmark.xlsx",
sheet_name="SciLifeLab_swe_benchmark",
header=0,
... | 26.848837 | 99 | 0.662625 |
7936e4b2af817a89a0889d328f7e539ff991c233 | 2,794 | py | Python | bonneville/modules/win_groupadd.py | lowsodium/bonneville | 02a016380b56345594f20ee007c62e7e92821a8b | [
"Apache-2.0"
] | null | null | null | bonneville/modules/win_groupadd.py | lowsodium/bonneville | 02a016380b56345594f20ee007c62e7e92821a8b | [
"Apache-2.0"
] | null | null | null | bonneville/modules/win_groupadd.py | lowsodium/bonneville | 02a016380b56345594f20ee007c62e7e92821a8b | [
"Apache-2.0"
] | 3 | 2020-05-10T02:08:44.000Z | 2020-11-06T11:01:57.000Z | # -*- coding: utf-8 -*-
'''
Manage groups on Windows
'''
# Import bonneville libs
import bonneville.utils
def __virtual__():
'''
Set the group module if the kernel is Windows
'''
return 'group' if bonneville.utils.is_windows() else False
def add(name, gid=None, system=False):
'''
Add the sp... | 22.174603 | 91 | 0.536507 |
793715f8f35e0509f6429e98c713e8515adaba2f | 14,262 | py | Python | Src/latentSpaceExplore_Hessian.py | sanjeevmk/GLASS | 91c0954eab87d25d4866fea5c338f79fbca4f79e | [
"MIT"
] | 2 | 2022-03-22T17:36:14.000Z | 2022-03-27T05:03:39.000Z | Src/latentSpaceExplore_Hessian.py | sanjeevmk/glass | 91c0954eab87d25d4866fea5c338f79fbca4f79e | [
"MIT"
] | null | null | null | Src/latentSpaceExplore_Hessian.py | sanjeevmk/glass | 91c0954eab87d25d4866fea5c338f79fbca4f79e | [
"MIT"
] | null | null | null | import torch
torch.manual_seed(10)
torch.cuda.manual_seed_all(10)
import os
import numpy as np
from sklearn.metrics.pairwise import cosine_similarity as cs
import Energies
import Leapfrog
import Hessian
from Utils import writer,Off,Obj,Pts,rect_remesh
import header
from torch.autograd import Variable
import math
fro... | 50.935714 | 229 | 0.65671 |
793752817b37ed79a72553904e41e87f72380650 | 4,391 | py | Python | fluxhelper/tools.py | bossauh/jarvisapi | 74eecca71d0dd38ab41d81d3683392eb24e5e253 | [
"MIT"
] | null | null | null | fluxhelper/tools.py | bossauh/jarvisapi | 74eecca71d0dd38ab41d81d3683392eb24e5e253 | [
"MIT"
] | null | null | null | fluxhelper/tools.py | bossauh/jarvisapi | 74eecca71d0dd38ab41d81d3683392eb24e5e253 | [
"MIT"
] | null | null | null |
"""
Main/General category
"""
import importlib
import random
import string
import sys
import datetime
class ObjDebug(object):
"""
Apply this to a class and you will be able to edit the methods of that class and have it update in real time.
Source: https://stackoverflow.com/a/15839513/12590728
"""
... | 27.44375 | 113 | 0.566158 |
79375eb0fcdc1e202fb96f0d8bef7c0b54186fcb | 1,823 | py | Python | maskrcnn_benchmark/modeling/roi_heads/td_box_head_v3/td_box_head_v3.py | pwllr/IDA-3D | f5c8acbcf90a7c351499249a24754ad311da375e | [
"MIT"
] | 78 | 2020-03-02T12:00:57.000Z | 2022-02-21T09:48:08.000Z | maskrcnn_benchmark/modeling/roi_heads/td_box_head_v3/td_box_head_v3.py | pwllr/IDA-3D | f5c8acbcf90a7c351499249a24754ad311da375e | [
"MIT"
] | 19 | 2020-03-02T12:07:18.000Z | 2022-03-30T08:04:06.000Z | maskrcnn_benchmark/modeling/roi_heads/td_box_head_v3/td_box_head_v3.py | pwllr/IDA-3D | f5c8acbcf90a7c351499249a24754ad311da375e | [
"MIT"
] | 14 | 2020-06-14T03:29:47.000Z | 2021-07-21T06:30:08.000Z | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
import torch
from torch import nn
from .roi_box_feature_extractors import make_roi_box_feature_extractor
from .roi_box_predictors import make_roi_box_predictor
from .inference import make_roi_box_post_processor
from .loss import make_roi_box_loss_... | 36.46 | 89 | 0.707076 |
79375f32f8bd5e17b90e932c574dc8dbced09bb6 | 3,969 | py | Python | examples/legacy/bulk_room_permission.py | Quirinwierer/dracoon-python-api | 7fad8cdb95069fb80069e76c740547f3ad02b910 | [
"Apache-2.0"
] | 3 | 2020-10-05T14:34:46.000Z | 2020-11-27T07:44:57.000Z | examples/legacy/bulk_room_permission.py | Quirinwierer/dracoon-python-api | 7fad8cdb95069fb80069e76c740547f3ad02b910 | [
"Apache-2.0"
] | 1 | 2022-02-15T16:01:12.000Z | 2022-02-15T16:01:12.000Z | examples/legacy/bulk_room_permission.py | Quirinwierer/dracoon-python-api | 7fad8cdb95069fb80069e76c740547f3ad02b910 | [
"Apache-2.0"
] | 1 | 2021-03-04T08:16:07.000Z | 2021-03-04T08:16:07.000Z | # ---------------------------------------------------------------------------#
# DRACOON API Python examples
# Perform bulk edit permissions on data rooms one can manage
# Requires dracoon package
# Author: Octavio Simone, 03.08.2021
# ---------------------------------------------------------------------------#
from ... | 33.352941 | 122 | 0.642227 |
79377fa76807e68ed0bb4e073cb5d2f522f99090 | 2,264 | py | Python | venv/Lib/site-packages/pyrogram/raw/base/global_privacy_settings.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 5 | 2021-09-11T22:01:15.000Z | 2022-03-16T21:33:42.000Z | backend/pyrogram/raw/base/global_privacy_settings.py | iamatlasss/social-media-analyzer | 429d1d2bbd8bfce80c50c5f8edda58f87ace668d | [
"Apache-2.0"
] | null | null | null | backend/pyrogram/raw/base/global_privacy_settings.py | iamatlasss/social-media-analyzer | 429d1d2bbd8bfce80c50c5f8edda58f87ace668d | [
"Apache-2.0"
] | 3 | 2022-01-18T11:06:22.000Z | 2022-02-26T13:39:28.000Z | # 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... | 38.372881 | 111 | 0.65371 |
79378aee360b30a6d77afd375d328b75d2fc488c | 1,213 | py | Python | pcg_random/sample/codebook.py | o11c/pcg-python | 686140ef81decb18da7012eabb584029209e0b81 | [
"Apache-2.0",
"MIT"
] | 1 | 2020-08-12T19:05:02.000Z | 2020-08-12T19:05:02.000Z | pcg_random/sample/codebook.py | heemayl/pcg-python | 686140ef81decb18da7012eabb584029209e0b81 | [
"Apache-2.0",
"MIT"
] | null | null | null | pcg_random/sample/codebook.py | heemayl/pcg-python | 686140ef81decb18da7012eabb584029209e0b81 | [
"Apache-2.0",
"MIT"
] | null | null | null | # PCG Random Number Generation for C++ (ported to Python)
#
# Copyright 2014-2017 Melissa O'Neill <oneill@pcg-random.org>,
# and the PCG Project contributors.
# Copyright 2017 Ben Longbons <brlongbons@gmail.com>
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
#
# Licensed under the Apache License, ... | 28.880952 | 75 | 0.686727 |
793795d4bb22a9ea7decf3f911867d84da982f3a | 627 | py | Python | instructors/projects-2015/compress/compress.py | mgadagin/PythonClass | 70b370362d75720b3fb0e1d6cc8158f9445e9708 | [
"MIT"
] | 46 | 2017-09-27T20:19:36.000Z | 2020-12-08T10:07:19.000Z | instructors/projects-2015/compress/compress.py | mgadagin/PythonClass | 70b370362d75720b3fb0e1d6cc8158f9445e9708 | [
"MIT"
] | 6 | 2018-01-09T08:07:37.000Z | 2020-09-07T12:25:13.000Z | instructors/projects-2015/compress/compress.py | mgadagin/PythonClass | 70b370362d75720b3fb0e1d6cc8158f9445e9708 | [
"MIT"
] | 18 | 2017-10-10T02:06:51.000Z | 2019-12-01T10:18:13.000Z | """
Our plan of attack:
1. Make a file with some test data to work with.
2. Import that file into python as a string. String type gives us an index, which we need.
3. Think about substring matching and how to find candidates to try to compress.
4. Implement a substring matching procedure, and store the output.
5. Rev... | 25.08 | 90 | 0.727273 |
7937a698a6687388d58cd615e486e9145fa64d1e | 6,283 | py | Python | lib/charms/finos_legend_db_k8s/v0/legend_database.py | aznashwan/legend-sdlc-server-operator | 5924a6c0f293a90dc4176c28508af93f9a7dea74 | [
"Apache-2.0"
] | 1 | 2021-09-07T07:31:05.000Z | 2021-09-07T07:31:05.000Z | lib/charms/finos_legend_db_k8s/v0/legend_database.py | aznashwan/legend-sdlc-server-operator | 5924a6c0f293a90dc4176c28508af93f9a7dea74 | [
"Apache-2.0"
] | null | null | null | lib/charms/finos_legend_db_k8s/v0/legend_database.py | aznashwan/legend-sdlc-server-operator | 5924a6c0f293a90dc4176c28508af93f9a7dea74 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Canonical
# See LICENSE file for licensing details.
"""Module defining Legend DB consumer class and helpers."""
import json
import logging
from ops import framework
# The unique Charmhub library identifier, never change it
LIBID = "02ed64badd5941c5acfdae546b0f79a2"
# Increment this major API versi... | 35.100559 | 94 | 0.639026 |
7937c77a73364abe60539add2fc95a82dfae8d7c | 7,362 | py | Python | experiments/ashvin/corl2019/offpolicy/dcvae1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/corl2019/offpolicy/dcvae1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/corl2019/offpolicy/dcvae1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | import rlkit.misc.hyperparameter as hyp
from experiments.murtaza.multiworld.skew_fit.reacher.generate_uniform_dataset import generate_uniform_dataset_reacher
from multiworld.envs.mujoco.cameras import sawyer_init_camera_zoomed_in, sawyer_pusher_camera_upright_v2
from rlkit.launchers.launcher_util import run_experiment
... | 38.145078 | 181 | 0.590736 |
7937f16861daddaf33cae1e8823578daebda824b | 2,234 | py | Python | util/createDist.py | KanjiuAkuma/JBetSystem | b3ec6e3e21b2f18659bf80b5eeee054aaf321662 | [
"MIT"
] | 1 | 2020-06-21T18:12:29.000Z | 2020-06-21T18:12:29.000Z | util/createDist.py | KanjiuAkuma/JBetSystem | b3ec6e3e21b2f18659bf80b5eeee054aaf321662 | [
"MIT"
] | 6 | 2020-01-12T18:42:54.000Z | 2020-03-05T03:59:39.000Z | util/createDist.py | KanjiuAkuma/JBetSystem | b3ec6e3e21b2f18659bf80b5eeee054aaf321662 | [
"MIT"
] | null | null | null | """
Created by Joscha Vack on 1/5/2020.
"""
from zipfile import ZipFile
from os import path, remove, listdir, mkdir
from shutil import copy
def file_paths(root, base=''):
"""
Recursively lists all files in a directory
"""
paths = []
for e in listdir(root):
p = path.join(root, e)
... | 33.848485 | 126 | 0.610116 |
79381707f23c42f844969d111fa26ae3ed766400 | 598 | py | Python | crowdsorter/api/root.py | jacebrowning/crowdsorter | 1c847f1f0284fc810ec1f2dd501acb4dbfa16bbb | [
"MIT"
] | 2 | 2020-05-09T23:46:23.000Z | 2021-03-23T18:40:26.000Z | crowdsorter/api/root.py | jacebrowning/crowdsorter | 1c847f1f0284fc810ec1f2dd501acb4dbfa16bbb | [
"MIT"
] | 1 | 2020-10-18T17:15:49.000Z | 2020-11-11T18:25:05.000Z | crowdsorter/api/root.py | jacebrowning/crowdsorter | 1c847f1f0284fc810ec1f2dd501acb4dbfa16bbb | [
"MIT"
] | 1 | 2021-03-23T18:41:16.000Z | 2021-03-23T18:41:16.000Z | import logging
from flask import Blueprint, url_for, redirect
from flask_api import status
blueprint = Blueprint('root_api', __name__)
log = logging.getLogger(__name__)
@blueprint.route("/api")
def index():
content = dict(
_links=dict(
self=url_for('.index', _external=True),
col... | 22.148148 | 73 | 0.675585 |
7938266ab3c2d70a25d5e396a8c74d656dc8e355 | 10,105 | py | Python | jina/peapods/runtimes/jinad/client.py | Rohitpandit021/jina | f3db4d5e480375d8dc3bceda814ac1963dee76d7 | [
"Apache-2.0"
] | 2 | 2021-06-30T06:56:30.000Z | 2022-03-11T01:27:19.000Z | jina/peapods/runtimes/jinad/client.py | Rohitpandit021/jina | f3db4d5e480375d8dc3bceda814ac1963dee76d7 | [
"Apache-2.0"
] | null | null | null | jina/peapods/runtimes/jinad/client.py | Rohitpandit021/jina | f3db4d5e480375d8dc3bceda814ac1963dee76d7 | [
"Apache-2.0"
] | null | null | null | import argparse
import asyncio
import copy
import json
from argparse import Namespace
from contextlib import ExitStack
from typing import Optional, Sequence, Dict
import os
from .... import __default_host__, __resources_path__
from ....enums import replace_enum_to_str
from ....importer import ImportExtensions
from ..... | 36.745455 | 107 | 0.572588 |
79383fe9e49781d200744bcb1685f6ae66375dc1 | 2,374 | py | Python | nicos_mlz/sans1/devices/funccount.py | mlz-ictrl/nicos | a6de0bc194ba42e3dc04a033713b41b5499ba8e1 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 12 | 2019-11-06T15:40:36.000Z | 2022-01-01T16:23:00.000Z | nicos_mlz/sans1/devices/funccount.py | ess-dmsc/nicos | 755d61d403ff7123f804c45fc80c7ff4d762993b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 91 | 2020-08-18T09:20:26.000Z | 2022-02-01T11:07:14.000Z | nicos_mlz/sans1/devices/funccount.py | mlz-ictrl/nicos | a6de0bc194ba42e3dc04a033713b41b5499ba8e1 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 6 | 2020-01-11T10:52:30.000Z | 2022-02-25T12:35:23.000Z | # -*- coding: utf-8 -*-
# *****************************************************************************
# NICOS, the Networked Instrument Control System of the MLZ
# Copyright (c) 2009-2021 by the NICOS contributors (see AUTHORS)
#
# This program is free software; you can redistribute it and/or modify it under
# the t... | 29.308642 | 81 | 0.641533 |
79386a370680670deb9d39e49136ed9c5b5c07d8 | 28,159 | py | Python | modules/world.py | sadmicrowave/despoina | a9791feaa0c035fb4134282b750a11be57132e07 | [
"MIT"
] | 1 | 2017-11-17T15:42:35.000Z | 2017-11-17T15:42:35.000Z | modules/world.py | sadmicrowave/despoina | a9791feaa0c035fb4134282b750a11be57132e07 | [
"MIT"
] | 7 | 2018-09-25T21:27:57.000Z | 2018-09-25T21:40:50.000Z | modules/world.py | sadmicrowave/despoina | a9791feaa0c035fb4134282b750a11be57132e07 | [
"MIT"
] | 1 | 2019-10-13T23:23:16.000Z | 2019-10-13T23:23:16.000Z | #!/usr/local/bin/python3
# The parsing method goes through each line of the file and splits the line into cells.
# Using a double for loop is a common way of working with grids. The x and y variables
# keep track of the coordinates. The last line is the most interesting, but it`s fine if
# you don`t fully understa... | 52.831144 | 288 | 0.687524 |
79386b6bd350809c6b5a826298c2cab9edc535a0 | 3,257 | py | Python | sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/aio/_configuration.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/aio/_configuration.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/aio/_configuration.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 ... | 47.897059 | 130 | 0.701566 |
79387f63ff0e82d4bb14eeaa3ca01fff9440f91e | 35,834 | py | Python | ivy/neural_net_stateful/layers.py | ashok-arjun/ivy | 274c03f667cda10e09b75e90e7a3a46b358e0358 | [
"Apache-2.0"
] | 161 | 2021-01-20T22:11:13.000Z | 2022-01-09T09:46:33.000Z | ivy/neural_net_stateful/layers.py | ashok-arjun/ivy | 274c03f667cda10e09b75e90e7a3a46b358e0358 | [
"Apache-2.0"
] | 4 | 2021-11-10T17:04:36.000Z | 2021-11-26T06:40:43.000Z | ivy/neural_net_stateful/layers.py | ashok-arjun/ivy | 274c03f667cda10e09b75e90e7a3a46b358e0358 | [
"Apache-2.0"
] | 8 | 2021-02-17T20:56:33.000Z | 2022-01-09T16:45:40.000Z | """
Collection of Ivy neural network layers as stateful classes.
"""
# local
import ivy
from ivy.neural_net_stateful.module import Module
from ivy.neural_net_stateful.initializers import Zeros, GlorotUniform
# Linear #
# -------#
class Linear(Module):
def __init__(self, input_channels, output_channels, weight_... | 48.820163 | 130 | 0.66289 |
79389528c1ac8650cd6d4187faf15aedfefa548a | 611 | py | Python | scripts_test/dff_ck2.py | xyabc/bag_digital_ec | 71b982fc0fbe275fc3901db2e25ab7ca62fb319f | [
"BSD-3-Clause"
] | null | null | null | scripts_test/dff_ck2.py | xyabc/bag_digital_ec | 71b982fc0fbe275fc3901db2e25ab7ca62fb319f | [
"BSD-3-Clause"
] | null | null | null | scripts_test/dff_ck2.py | xyabc/bag_digital_ec | 71b982fc0fbe275fc3901db2e25ab7ca62fb319f | [
"BSD-3-Clause"
] | 2 | 2019-06-30T07:03:02.000Z | 2020-01-07T04:55:21.000Z | # -*- coding: utf-8 -*-
import yaml
from bag.core import BagProject
from digital_ec.layout.stdcells.core import StdCellWrapper
if __name__ == '__main__':
with open('specs_test/digital_ec/stdcells/dff_ck2.yaml', 'r') as f:
block_specs = yaml.load(f)
local_dict = locals()
if 'bprj' not in local_... | 24.44 | 80 | 0.677578 |
79389b605f3a2102c712c4fd6715cc3fdd77e29b | 1,374 | py | Python | examples/split/checker.py | kevinsogo/compgen | c765fdb3008d41f409836a45ad5a506db6a99e74 | [
"MIT"
] | 6 | 2019-11-30T17:03:13.000Z | 2021-09-30T05:08:31.000Z | examples/split/checker.py | kevinsogo/compgen | c765fdb3008d41f409836a45ad5a506db6a99e74 | [
"MIT"
] | 1 | 2020-01-20T12:13:03.000Z | 2020-01-20T12:13:03.000Z | examples/split/checker.py | kevinsogo/compgen | c765fdb3008d41f409836a45ad5a506db6a99e74 | [
"MIT"
] | null | null | null | from kg.checkers import * ### @import
@chk.get_one_input
def get_one_input(file, **kwargs):
n = int(next(file))
a = list(map(int, next(file).strip().split()))
ensure(len(a) == n, "Invalid length in input", exc=Fail)
return a
@chk.get_output_for_input
@chk.get_judge_data_for_input
def get_output_for_in... | 33.512195 | 78 | 0.629549 |
793963deb6179ae0c3f116424805e3711542e583 | 83,589 | py | Python | lib/rucio/core/transfer.py | bjwhite-fnal/rucio | 4ea8289cf2bc78b7c116afd607e637e2983ffb9e | [
"Apache-2.0"
] | null | null | null | lib/rucio/core/transfer.py | bjwhite-fnal/rucio | 4ea8289cf2bc78b7c116afd607e637e2983ffb9e | [
"Apache-2.0"
] | null | null | null | lib/rucio/core/transfer.py | bjwhite-fnal/rucio | 4ea8289cf2bc78b7c116afd607e637e2983ffb9e | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2013-2021 CERN
#
# 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 a... | 47.012936 | 223 | 0.618945 |
79397af29908437f4973b12d634f9089a9f37466 | 751 | py | Python | drafts/path_finder.py | LPRowe/perfect-snake-challenge | 634bb53620f9313eb878717402a3956996edb4bf | [
"MIT"
] | null | null | null | drafts/path_finder.py | LPRowe/perfect-snake-challenge | 634bb53620f9313eb878717402a3956996edb4bf | [
"MIT"
] | null | null | null | drafts/path_finder.py | LPRowe/perfect-snake-challenge | 634bb53620f9313eb878717402a3956996edb4bf | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue Feb 9 14:04:56 2021
@author: rowe1
"""
def a_star(start, target, tail, grid, graph, obstacles):
"""
Uses a_star heuristic to find a path from start to target and back to tail.
If such a path exists, return the path from start to target.
If such a path d... | 34.136364 | 94 | 0.685752 |
7939b7a88924ac7e9bd2454c8dfac36b3ccd5e13 | 317,726 | py | Python | pyradio/radio.py | jirikrepl/pyradio | 6fae44aafc24acab3e33cf6b2918709a2c4548cb | [
"MIT"
] | null | null | null | pyradio/radio.py | jirikrepl/pyradio | 6fae44aafc24acab3e33cf6b2918709a2c4548cb | [
"MIT"
] | null | null | null | pyradio/radio.py | jirikrepl/pyradio | 6fae44aafc24acab3e33cf6b2918709a2c4548cb | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# PyRadio: Curses based Internet Radio Player
# http://www.coderholic.com/pyradio
# Ben Dowling - 2009 - 2010
# Kirill Klenov - 2012
# Peter Stevenson (2E0PGS) - 2018
# Spiros Georgaras - 2018, 2021
import curses
import curses.ascii
import threading
import logging
import os
import random
impor... | 46.187818 | 195 | 0.527678 |
7939ebcec5029b176b4689d9e70af6168d87d7cf | 8,537 | py | Python | tools/test.py | flyingTan/QuantMmdetection | 6126cd7725dcd0c4d3ad68f016908c500a0adbb9 | [
"Apache-2.0"
] | 2 | 2021-08-28T06:43:03.000Z | 2022-01-17T00:04:23.000Z | tools/test.py | flyingTan/QuantMmdetection | 6126cd7725dcd0c4d3ad68f016908c500a0adbb9 | [
"Apache-2.0"
] | null | null | null | tools/test.py | flyingTan/QuantMmdetection | 6126cd7725dcd0c4d3ad68f016908c500a0adbb9 | [
"Apache-2.0"
] | null | null | null | import argparse
import os
import warnings
import mmcv
import torch
from mmcv import Config, DictAction
from mmcv.cnn import fuse_conv_bn
from mmcv.parallel import MMDataParallel, MMDistributedDataParallel
from mmcv.runner import (get_dist_info, init_dist, load_checkpoint,
wrap_fp16_model)
fro... | 39.341014 | 79 | 0.635118 |
7939f0ef782d05803919418e6d3e79d77446e983 | 2,130 | py | Python | wargame/designpatterns/pythonic_abstractfactory_kingdom.py | jeantardelli/wargameRepo | 1e11ae40281f7eafa65ea6e40e045304b20e3824 | [
"MIT"
] | 1 | 2020-12-01T20:30:27.000Z | 2020-12-01T20:30:27.000Z | wargame/designpatterns/pythonic_abstractfactory_kingdom.py | jeantardelli/wargameRepo | 1e11ae40281f7eafa65ea6e40e045304b20e3824 | [
"MIT"
] | null | null | null | wargame/designpatterns/pythonic_abstractfactory_kingdom.py | jeantardelli/wargameRepo | 1e11ae40281f7eafa65ea6e40e045304b20e3824 | [
"MIT"
] | null | null | null | """pythonic_abstractfactory_kingdom
This module represents a kindom object.
"""
from pythonic_abstractfactory_accessoryfactory import AccessoryFactory
class Kingdom:
"""Class that uses a 'factory' to create the desired accesory.
:cvar factory: This is a class variable that represents AccessoryFactory
... | 38.727273 | 83 | 0.684038 |
7939f3e40bac1a7f4f1bd6753ac19e6c9a64dea5 | 9,372 | py | Python | libpython/ben/string_manipulation.py | longnow/panlex-tools | 1b10fa140af96078c7c909cd10f3f3c05f641671 | [
"MIT"
] | 8 | 2015-11-02T22:55:24.000Z | 2018-05-27T22:11:40.000Z | libpython/ben/string_manipulation.py | longnow/panlex-tools | 1b10fa140af96078c7c909cd10f3f3c05f641671 | [
"MIT"
] | 3 | 2021-03-31T19:12:43.000Z | 2021-12-13T20:03:51.000Z | libpython/ben/string_manipulation.py | longnow/panlex-tools | 1b10fa140af96078c7c909cd10f3f3c05f641671 | [
"MIT"
] | 2 | 2016-07-11T18:00:18.000Z | 2019-04-23T14:41:52.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import regex as re
try:
import requests
except ImportError:
pass
import subprocess
import atexit
import os
from time import sleep
from collections import OrderedDict
spacy_parser = None
frogclient = None
supported_langs = ['eng', 'nld']
def initialize_spacy_pars... | 36.897638 | 160 | 0.632309 |
793a08693f63a03a964e0c94688fc95855d3fc2e | 396 | py | Python | src/main/asgi.py | danpercic86/e-notary | ba15a9a80e2091593fb088feacfaf9574c816d6e | [
"Apache-2.0"
] | 6 | 2020-12-25T20:46:51.000Z | 2022-01-27T20:52:13.000Z | src/main/asgi.py | danpercic86/e-notary | ba15a9a80e2091593fb088feacfaf9574c816d6e | [
"Apache-2.0"
] | 59 | 2021-03-01T03:49:56.000Z | 2022-03-15T07:30:26.000Z | src/main/asgi.py | danpercic86/e-notary | ba15a9a80e2091593fb088feacfaf9574c816d6e | [
"Apache-2.0"
] | null | null | null | """
ASGI config for main 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.1/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault("DJANGO_SETTINGS... | 23.294118 | 78 | 0.785354 |
793a2d7a5067cbe6c9ded97291e6e5b8f7d37f8e | 26,922 | py | Python | SphinxReport/Dispatcher.py | Tim-HU/sphinx-report | 3a0dc225e594c4b2083dff7a93b6d77054256416 | [
"BSD-2-Clause"
] | 1 | 2020-04-10T12:48:40.000Z | 2020-04-10T12:48:40.000Z | SphinxReport/Dispatcher.py | Tim-HU/sphinx-report | 3a0dc225e594c4b2083dff7a93b6d77054256416 | [
"BSD-2-Clause"
] | null | null | null | SphinxReport/Dispatcher.py | Tim-HU/sphinx-report | 3a0dc225e594c4b2083dff7a93b6d77054256416 | [
"BSD-2-Clause"
] | null | null | null | import os, sys, re, shelve, traceback, pickle, types, itertools
from SphinxReport.ResultBlock import ResultBlock, ResultBlocks
from SphinxReport import DataTree
from SphinxReport.Component import *
from SphinxReport import Utils
from SphinxReport import Cache
from SphinxReport import Tracker
# move User renderer to S... | 37.600559 | 138 | 0.536624 |
793a4df46b0113a28885a406348f7ab6df5cb35e | 20,257 | py | Python | extract_haplotype_read_counts.py | gmcvicker/CHT | e4bee5dc62f03eb1b153dc8e23ee649d34bf5a03 | [
"Apache-2.0"
] | null | null | null | extract_haplotype_read_counts.py | gmcvicker/CHT | e4bee5dc62f03eb1b153dc8e23ee649d34bf5a03 | [
"Apache-2.0"
] | null | null | null | extract_haplotype_read_counts.py | gmcvicker/CHT | e4bee5dc62f03eb1b153dc8e23ee649d34bf5a03 | [
"Apache-2.0"
] | null | null | null | #!/bin/env python
#
# Copyright 2013 Graham McVicker and Bryce van de Geijn
#
# 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 requi... | 34.805842 | 93 | 0.569729 |
793a61ef5ed4ba69f62ea9d373a6ac83a0ed98d4 | 915 | py | Python | python/moderation_image_aksk_demo.py | huaweicloudsdk/ais-sdk | 623dd366dc3b26ef2eb949a8284f5b0a55e5b0e6 | [
"Apache-2.0"
] | 48 | 2018-03-13T06:21:46.000Z | 2021-06-23T02:32:14.000Z | python/moderation_image_aksk_demo.py | huaweicloudsdk/ais-sdk | 623dd366dc3b26ef2eb949a8284f5b0a55e5b0e6 | [
"Apache-2.0"
] | 29 | 2019-03-27T08:52:38.000Z | 2021-12-14T21:15:11.000Z | python/moderation_image_aksk_demo.py | huaweicloudsdk/ais-sdk | 623dd366dc3b26ef2eb949a8284f5b0a55e5b0e6 | [
"Apache-2.0"
] | 38 | 2018-03-22T01:06:51.000Z | 2020-12-30T12:42:42.000Z | # -*- coding:utf-8 -*-
from ais_sdk.utils import encode_to_base64
from ais_sdk.moderation_image import moderation_image_aksk
from ais_sdk.utils import init_global_env
if __name__ == '__main__':
# Services currently support North China-Beijing 1 (cn-north-1), Asia Pacific-Hong Kong (ap-southeast-1)
init_global_... | 33.888889 | 140 | 0.69071 |
793a6399ca2e555fd83350bb0c4c5906accec570 | 4,048 | py | Python | archive/nexus-api-v2/Database/CMS/Imports.py | cloud-hybrid/delta | 402b00ed5aaa32ccef628361e9635879b7ace44f | [
"BSD-3-Clause"
] | null | null | null | archive/nexus-api-v2/Database/CMS/Imports.py | cloud-hybrid/delta | 402b00ed5aaa32ccef628361e9635879b7ace44f | [
"BSD-3-Clause"
] | null | null | null | archive/nexus-api-v2/Database/CMS/Imports.py | cloud-hybrid/delta | 402b00ed5aaa32ccef628361e9635879b7ace44f | [
"BSD-3-Clause"
] | 1 | 2022-01-03T05:33:15.000Z | 2022-01-03T05:33:15.000Z | #!/usr/bin/env python3
# -*- Coding: UTF-8 -*- #
# -*- System: Linux -*- #
# -*- Usage: *.py -*- #
# Owner: Jacob B. Sanders
# Source: code.cloud-technology.io
# License: BSD 2-Clause License
"""
[...]
"""
# =============================================================================
# Standard Library
#... | 23.131429 | 113 | 0.493577 |
793acf069b8591edb2cd67fa26837f6a9b742871 | 5,992 | py | Python | pyrefchecker/block_scope_provider.py | brexhq/pyrefchecker | 3afd8c33c27e9c81c3b0aed780072176645ae98f | [
"0BSD"
] | null | null | null | pyrefchecker/block_scope_provider.py | brexhq/pyrefchecker | 3afd8c33c27e9c81c3b0aed780072176645ae98f | [
"0BSD"
] | null | null | null | pyrefchecker/block_scope_provider.py | brexhq/pyrefchecker | 3afd8c33c27e9c81c3b0aed780072176645ae98f | [
"0BSD"
] | 1 | 2021-05-25T16:42:03.000Z | 2021-05-25T16:42:03.000Z | from contextlib import contextmanager
from typing import Iterator, List, Optional, Set
import libcst as cst
import libcst.metadata as meta
import libcst.metadata.scope_provider as sp
from libcst.helpers import get_full_name_for_node
from .ast_utils import is_conditional_typing_import, is_terminal
class BlockScopePr... | 33.288889 | 104 | 0.611983 |
793b23562c7dbae21ea6c25eed58223e77da3999 | 1,993 | py | Python | handyman/__init__.py | gfleetwood/handyman | c3d4a8d7fe87536bb8c9b8f8ba0fce7b1f7feade | [
"MIT"
] | 3 | 2019-04-04T18:05:13.000Z | 2020-12-13T14:55:32.000Z | handyman/__init__.py | gfleetwood/handyman | c3d4a8d7fe87536bb8c9b8f8ba0fce7b1f7feade | [
"MIT"
] | null | null | null | handyman/__init__.py | gfleetwood/handyman | c3d4a8d7fe87536bb8c9b8f8ba0fce7b1f7feade | [
"MIT"
] | 1 | 2021-11-20T08:26:03.000Z | 2021-11-20T08:26:03.000Z | from .computer_vision import *
from .deploy import *
from .general import *
from .read_write import *
from .model import *
from .transform import *
from .visualize import *
from .experimental import *
from .productivity import *
import dropbox
import tweepy
import boto3
import asana
import subprocess
import importli... | 24.304878 | 107 | 0.83442 |
793b2571f11fb8cc2f79f5b90a68df81bf62fad9 | 289 | py | Python | recursion/codingbat/countAbc.py | santoshmano/pybricks | bcb3ab80417e8e896280062494ce6c046329b7e8 | [
"MIT"
] | null | null | null | recursion/codingbat/countAbc.py | santoshmano/pybricks | bcb3ab80417e8e896280062494ce6c046329b7e8 | [
"MIT"
] | null | null | null | recursion/codingbat/countAbc.py | santoshmano/pybricks | bcb3ab80417e8e896280062494ce6c046329b7e8 | [
"MIT"
] | null | null | null |
def countAbc(str):
if len(str) == 0:
return 0
if str[:3] == 'abc':
count = 1
else:
count = 0
if str[:3] == 'aba':
count += 1
if str[:4] == 'abcd':
count += 1
return count + countAbc(str[1:])
print(countAbc("abcababcd")) | 15.210526 | 36 | 0.453287 |
793b3f216e39b96b6e8804d878d094ea9011aa89 | 1,105 | py | Python | examples/withAttribute.py | klahnakoski/mo-parsing | 885bf3fd61430d5fa15164168b975b18988fcf9e | [
"MIT"
] | 1 | 2021-10-30T21:18:29.000Z | 2021-10-30T21:18:29.000Z | examples/withAttribute.py | klahnakoski/mo-parsing | 885bf3fd61430d5fa15164168b975b18988fcf9e | [
"MIT"
] | 22 | 2020-04-15T14:49:30.000Z | 2021-12-22T02:49:52.000Z | examples/withAttribute.py | klahnakoski/mo-parsing | 885bf3fd61430d5fa15164168b975b18988fcf9e | [
"MIT"
] | null | null | null | #
# with_attribute.py
# Copyright, 2007 - Paul McGuire
#
# Simple example of using with_attribute parse action helper
# to define
#
from mo_future import zip_longest
from mo_testing.fuzzytestcase import assertAlmostEqual
from mo_parsing import *
from mo_parsing.helpers import makeHTMLTags, real, with_attribute
da... | 28.333333 | 107 | 0.692308 |
793b74526c9d87cae7f493574eaff01cdeb9c8f4 | 4,034 | py | Python | sktime/forecasting/trend.py | brettkoonce/sktime | 6336247bad0dac8692aa4b911c267f401dea4163 | [
"BSD-3-Clause"
] | 1 | 2020-12-28T15:24:13.000Z | 2020-12-28T15:24:13.000Z | sktime/forecasting/trend.py | brettkoonce/sktime | 6336247bad0dac8692aa4b911c267f401dea4163 | [
"BSD-3-Clause"
] | 2 | 2020-04-20T12:26:42.000Z | 2020-04-22T17:09:14.000Z | sktime/forecasting/trend.py | brettkoonce/sktime | 6336247bad0dac8692aa4b911c267f401dea4163 | [
"BSD-3-Clause"
] | 1 | 2020-12-28T15:24:15.000Z | 2020-12-28T15:24:15.000Z | #!/usr/bin/env python3 -u
# coding: utf-8
# copyright: sktime developers, BSD-3-Clause License (see LICENSE file)
__author__ = ["Markus Löning"]
__all__ = [
"PolynomialTrendForecaster"
]
import pandas as pd
from sklearn.linear_model import LinearRegression
from sklearn.pipeline import make_pipeline
from sklearn.p... | 35.385965 | 79 | 0.647992 |
793c12673eeaf2c4a9b1913e907d7d0d3d34d584 | 1,237 | py | Python | infinisdk/core/config.py | kobutton/infinisdk | 4ae5c66a2d7926636a52cb0a1452f9a2809b2ec2 | [
"BSD-3-Clause"
] | null | null | null | infinisdk/core/config.py | kobutton/infinisdk | 4ae5c66a2d7926636a52cb0a1452f9a2809b2ec2 | [
"BSD-3-Clause"
] | null | null | null | infinisdk/core/config.py | kobutton/infinisdk | 4ae5c66a2d7926636a52cb0a1452f9a2809b2ec2 | [
"BSD-3-Clause"
] | null | null | null | import os
from .._compat import ConfigParser
import confetti
config = confetti.Config(dict(
check_version_compatibility=True,
ini_file_path="~/.infinidat/infinisdk.ini",
api={
'log': {
'pretty_json': False,
}
},
defaults=dict(
system_api_port=80,
re... | 22.089286 | 80 | 0.607114 |
793c382f495a4ff7a0d9dd2da46e91c9f5f096a2 | 1,055 | py | Python | documents_output/matplotlib/decoration/single_letter_colors.py | simoncarrignon/tools | fb10a9793a8054c4cc93810da8ca4c7d001b76bd | [
"MIT"
] | 15 | 2016-05-03T13:36:41.000Z | 2021-06-12T06:13:42.000Z | documents_output/matplotlib/decoration/single_letter_colors.py | simoncarrignon/tools | fb10a9793a8054c4cc93810da8ca4c7d001b76bd | [
"MIT"
] | 1 | 2018-04-10T07:25:45.000Z | 2018-04-10T07:25:45.000Z | documents_output/matplotlib/decoration/single_letter_colors.py | simoncarrignon/tools | fb10a9793a8054c4cc93810da8ca4c7d001b76bd | [
"MIT"
] | 17 | 2016-05-13T23:40:51.000Z | 2022-03-17T17:10:07.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import matplotlib.pyplot as plt
import matplotlib
def plot_single_letter_colors(out_file=None):
"""plot single letter colors"""
fig, ax = plt.subplots()
fig.suptitle('Built-in colors in Matplotlib')
#colors = matplotlib.colors.ColorConverter.colors.keys() # [u'c', u'... | 29.305556 | 137 | 0.603791 |
793c7c14713c5c0883eb866205b8ce360844f0f8 | 1,734 | py | Python | FEBDAQMULTx2/data_analysis/root2pandas/root2pandas.py | kaikai581/t2k-mppc-daq | 6b4f7bf04d885e952d9fd653df8f9ca1dd31089e | [
"MIT"
] | null | null | null | FEBDAQMULTx2/data_analysis/root2pandas/root2pandas.py | kaikai581/t2k-mppc-daq | 6b4f7bf04d885e952d9fd653df8f9ca1dd31089e | [
"MIT"
] | null | null | null | FEBDAQMULTx2/data_analysis/root2pandas/root2pandas.py | kaikai581/t2k-mppc-daq | 6b4f7bf04d885e952d9fd653df8f9ca1dd31089e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import argparse
import matplotlib.pyplot as plt
import numpy as np
import os, sys
import uproot
def main():
# command line arguments
parser = argparse.ArgumentParser()
parser.add_argument('-i', '--input_filename', type=str,
default='../data/root/mppc_20200817_2febs.root', ... | 32.716981 | 107 | 0.60496 |
793c8032020b200799a3552bed91b424250aa162 | 20,254 | py | Python | hummingbird2.py | wingerath/pandemonium_talon | 0649c584e8e136f2ec967e18054d74e51e3bbb52 | [
"MIT"
] | 3 | 2021-06-29T04:15:59.000Z | 2022-03-24T11:52:41.000Z | hummingbird2.py | wingerath/pandemonium_talon | 0649c584e8e136f2ec967e18054d74e51e3bbb52 | [
"MIT"
] | null | null | null | hummingbird2.py | wingerath/pandemonium_talon | 0649c584e8e136f2ec967e18054d74e51e3bbb52 | [
"MIT"
] | 2 | 2021-08-31T17:47:41.000Z | 2021-09-26T09:06:00.000Z | from talon import actions, cron, Context, Module, ctrl
from typing import Callable, Tuple, TypedDict, Any
from dataclasses import dataclass, asdict
from talon.screen import Screen, main_screen
import time
from enum import Enum
class HummingEvent(Enum):
DISCRETE = 0 # Discrete noise - Used when a noise ends within ... | 39.176015 | 138 | 0.629703 |
793c86f00915ee76dcdc191c3daca26899861110 | 1,103 | py | Python | slavdict/dictionary/migrations/0049_auto_20190509_2106.py | slavdict/slavdict | 893886b80de413cb2bb6c0af5adba9c55aa6a7af | [
"CC0-1.0"
] | 1 | 2022-01-17T17:26:25.000Z | 2022-01-17T17:26:25.000Z | slavdict/dictionary/migrations/0049_auto_20190509_2106.py | slavdict/slavdict | 893886b80de413cb2bb6c0af5adba9c55aa6a7af | [
"CC0-1.0"
] | 8 | 2020-02-12T13:26:05.000Z | 2022-02-10T19:28:07.000Z | slavdict/dictionary/migrations/0049_auto_20190509_2106.py | slavdict/slavdict | 893886b80de413cb2bb6c0af5adba9c55aa6a7af | [
"CC0-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.20 on 2019-05-09 21:06
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('dictionary', '0048_translation_is_synodal'),
]
operations = [
migrations.AlterField(
model_name='entr... | 52.52381 | 726 | 0.621034 |
793cd776aaa54a19a3ca5514e2b06fa9714d6a12 | 1,661 | py | Python | core/log_determinant_hessian_ray.py | shenzebang/DMTRPO | 3beb528c5b5aebe35dfa873788c5be3f5977f53f | [
"MIT"
] | 1 | 2019-11-17T11:05:26.000Z | 2019-11-17T11:05:26.000Z | core/log_determinant_hessian_ray.py | shenzebang/DMTRPO | 3beb528c5b5aebe35dfa873788c5be3f5977f53f | [
"MIT"
] | null | null | null | core/log_determinant_hessian_ray.py | shenzebang/DMTRPO | 3beb528c5b5aebe35dfa873788c5be3f5977f53f | [
"MIT"
] | null | null | null | import numpy as np
import torch
from torch.distributions.kl import kl_divergence
from core.models import detach_distribution
from torch.nn.utils.convert_parameters import parameters_to_vector, vector_to_parameters
from hessian import hessian
import ray
def _compute_kl(policy_net, states):
pi = policy_net(states)
... | 33.22 | 138 | 0.703191 |
793cea544a3366e12da37273b80b1cb9d54a729b | 5,445 | py | Python | sktime/transformers/series_as_features/tests/test_compose.py | brettkoonce/sktime | 6336247bad0dac8692aa4b911c267f401dea4163 | [
"BSD-3-Clause"
] | 2 | 2020-10-05T12:17:41.000Z | 2020-10-19T08:57:50.000Z | sktime/transformers/series_as_features/tests/test_compose.py | brettkoonce/sktime | 6336247bad0dac8692aa4b911c267f401dea4163 | [
"BSD-3-Clause"
] | 2 | 2020-04-20T12:26:42.000Z | 2020-04-22T17:09:14.000Z | sktime/transformers/series_as_features/tests/test_compose.py | brettkoonce/sktime | 6336247bad0dac8692aa4b911c267f401dea4163 | [
"BSD-3-Clause"
] | 1 | 2022-02-14T18:19:01.000Z | 2022-02-14T18:19:01.000Z | import numpy as np
import pandas as pd
from sklearn.ensemble import RandomForestClassifier
from sklearn.preprocessing import FunctionTransformer
from sklearn.preprocessing import StandardScaler
from sktime.datasets import load_basic_motions
from sktime.datasets import load_gunpoint
from sklearn.pipeline import Pipeline... | 37.294521 | 78 | 0.673095 |
793cf74980e4a0dec4021f41f5a792f7e20e2a6d | 5,101 | py | Python | feincms/utils/__init__.py | songshansitulv/feincms | 47dfad9a50dcc3498814b70494a09006ef9d8780 | [
"BSD-3-Clause"
] | 17 | 2015-03-11T09:57:21.000Z | 2019-09-03T11:11:45.000Z | feincms/utils/__init__.py | songshansitulv/feincms | 47dfad9a50dcc3498814b70494a09006ef9d8780 | [
"BSD-3-Clause"
] | null | null | null | feincms/utils/__init__.py | songshansitulv/feincms | 47dfad9a50dcc3498814b70494a09006ef9d8780 | [
"BSD-3-Clause"
] | 3 | 2015-07-07T06:33:11.000Z | 2020-01-29T15:45:49.000Z | # ------------------------------------------------------------------------
# coding=utf-8
# ------------------------------------------------------------------------
from __future__ import absolute_import, division, unicode_literals
import re
import six
from importlib import import_module
from django.apps import app... | 32.28481 | 85 | 0.558518 |
793d6835876fddc1473b5c79a5bd0acf635a0e46 | 10,152 | py | Python | ersa_reporting/business.py | LoganCook/reporting-unified | 9d2c7e083c5c400e9120bb8552348e41406a1bc1 | [
"Apache-2.0"
] | null | null | null | ersa_reporting/business.py | LoganCook/reporting-unified | 9d2c7e083c5c400e9120bb8552348e41406a1bc1 | [
"Apache-2.0"
] | null | null | null | ersa_reporting/business.py | LoganCook/reporting-unified | 9d2c7e083c5c400e9120bb8552348e41406a1bc1 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
"""Application and persistence management."""
# pylint: disable=no-member, import-error, no-init, too-few-public-methods
# pylint: disable=cyclic-import, no-name-in-module, invalid-name
from ersa_reporting import app, db, configure, get_or_create, commit, to_dict
from ersa_reporting import request,... | 32.434505 | 79 | 0.641548 |
793d95cafceb64d248d74d687e269f9a29182f4c | 15,401 | py | Python | packages/fetchai/skills/erc1155_deploy/dialogues.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | 28 | 2021-10-31T18:54:14.000Z | 2022-03-17T13:10:43.000Z | packages/fetchai/skills/erc1155_deploy/dialogues.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | 66 | 2021-10-31T11:55:48.000Z | 2022-03-31T06:26:23.000Z | packages/fetchai/skills/erc1155_deploy/dialogues.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2021 Valory AG
# Copyright 2018-2019 Fetch.AI Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# ... | 34.765237 | 91 | 0.665476 |
793d9e469d02b76650de552e9f4f621a7aa14990 | 22,952 | py | Python | apps/sushi/models.py | remocrevo/celus | 682b13168eb475d7f970502113e756e40a899877 | [
"MIT"
] | null | null | null | apps/sushi/models.py | remocrevo/celus | 682b13168eb475d7f970502113e756e40a899877 | [
"MIT"
] | null | null | null | apps/sushi/models.py | remocrevo/celus | 682b13168eb475d7f970502113e756e40a899877 | [
"MIT"
] | null | null | null | import os
import logging
import traceback
from copy import deepcopy
from hashlib import blake2b
from datetime import timedelta, datetime
from itertools import takewhile
from typing import Optional
import json
import requests
import reversion
from django.contrib.postgres.fields import JSONField
from django.core.files.b... | 41.206463 | 99 | 0.616112 |
793dbd0c49f3637916dba170e40f7dec30ea5f02 | 1,244 | py | Python | custom_components/seatconnect/const.py | jordibsk10/homeassistant-seatconnect | fb44f654230ba87e41dfdac19736dc2c1dcf00a7 | [
"Apache-2.0"
] | 21 | 2021-02-06T16:42:48.000Z | 2022-02-02T23:23:34.000Z | custom_components/seatconnect/const.py | jordibsk10/homeassistant-seatconnect | fb44f654230ba87e41dfdac19736dc2c1dcf00a7 | [
"Apache-2.0"
] | 24 | 2021-06-14T12:46:55.000Z | 2022-03-01T10:07:09.000Z | custom_components/seatconnect/const.py | jordibsk10/homeassistant-seatconnect | fb44f654230ba87e41dfdac19736dc2c1dcf00a7 | [
"Apache-2.0"
] | 8 | 2021-06-03T09:35:37.000Z | 2022-02-14T12:51:19.000Z | from datetime import timedelta
DOMAIN = "seatconnect"
DATA_KEY = DOMAIN
# Configuration definitions
DEFAULT_DEBUG = False
CONF_MUTABLE = "mutable"
CONF_SPIN = "spin"
CONF_SCANDINAVIAN_MILES = "scandinavian_miles"
CONF_IMPERIAL_UNITS = "imperial_units"
CONF_NO_CONVERSION = "no_conversion"
CONF_CONVERT = "convert"
CONF... | 25.916667 | 53 | 0.774116 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.