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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9e11ec345d09faa7f53a23908d6b48c9db6b3cc8 | 2,933 | py | Python | count-extraction/extract-counts.py | qfma/ohnologdc | ab1f59de13be10b3fd3503c14a0d97dd37bcf937 | [
"MIT"
] | null | null | null | count-extraction/extract-counts.py | qfma/ohnologdc | ab1f59de13be10b3fd3503c14a0d97dd37bcf937 | [
"MIT"
] | null | null | null | count-extraction/extract-counts.py | qfma/ohnologdc | ab1f59de13be10b3fd3503c14a0d97dd37bcf937 | [
"MIT"
] | null | null | null | #!/usr/local/bin/python2.7
# -*- coding: utf-8 -*-
#
# run-mpileup-varscan.py
#==============================================================================
import argparse
import sys
import os
# Make utilities folder available
sys.path.append(os.path.abspath("../"))
from utilities.runner import multiprocess
fro... | 33.329545 | 105 | 0.550631 |
9e12425d817ca179b32630682e6f9de52ad2432a | 600 | py | Python | datastructures/hashmap/problems/count_substrings_anagrams_of_each_others.py | hariharanragothaman/pymaster | b3d033b4d5c75c69f587c94d9d12cd4a349a6a69 | [
"Apache-2.0"
] | 10 | 2020-09-21T22:23:09.000Z | 2022-01-25T16:58:44.000Z | datastructures/hashmap/problems/count_substrings_anagrams_of_each_others.py | hariharanragothaman/pymaster | b3d033b4d5c75c69f587c94d9d12cd4a349a6a69 | [
"Apache-2.0"
] | null | null | null | datastructures/hashmap/problems/count_substrings_anagrams_of_each_others.py | hariharanragothaman/pymaster | b3d033b4d5c75c69f587c94d9d12cd4a349a6a69 | [
"Apache-2.0"
] | null | null | null | """
This is similar to the count_pairs_same_difference.py
"""
from collections import Counter
def count_substrings_anagrams(s):
ctr = Counter()
for i in range(len(s)):
for j in range(i + 1, len(s) + 1):
sl = tuple(sorted(s[i:j]))
ctr[sl] = ctr.get(sl, 0) + 1
result = 0
... | 24 | 78 | 0.543333 |
9e1264debcae45aaae9e8f74e078436b2bf80a85 | 589 | py | Python | rlkit/torch/networks/sets.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | rlkit/torch/networks/sets.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | rlkit/torch/networks/sets.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | """
Set-based / permtuation invariant networks
"""
from rlkit.torch.networks import mlp
class AverageSetMlp(mlp.Mlp):
"""
Average across dimension 0.
"""
def forward(self, x):
x = super().forward(x)
return x.mean(dim=0, keepdim=True)
class AverageSetConcatMultiHeadedMlp(mlp.ConcatMu... | 21.814815 | 70 | 0.616299 |
9e127c546e2fbe16e28334d28817cff4fb52ec9b | 3,511 | py | Python | alipay/aop/api/domain/InstCashPoolAccountMappingVO.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/InstCashPoolAccountMappingVO.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/InstCashPoolAccountMappingVO.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 *
from alipay.aop.api.domain.InstAccountDTO import InstAccountDTO
from alipay.aop.api.domain.InstAccountDTO import InstAccountDTO
class InstCashPoolAccountMappingVO(object):
def __init__(self):
s... | 32.211009 | 89 | 0.627457 |
9e128a7aa4c2b441cc63767ebc9bd59f9cf507d0 | 3,029 | py | Python | data_process/canonicalize_prod.py | vsomnath/graphretro | 2a88730da980be59541780e790cdb0fbdc581828 | [
"MIT"
] | 5 | 2022-02-21T08:26:15.000Z | 2022-03-31T12:05:47.000Z | data_process/canonicalize_prod.py | vsomnath/graphretro | 2a88730da980be59541780e790cdb0fbdc581828 | [
"MIT"
] | null | null | null | data_process/canonicalize_prod.py | vsomnath/graphretro | 2a88730da980be59541780e790cdb0fbdc581828 | [
"MIT"
] | 2 | 2022-03-11T15:33:33.000Z | 2022-03-23T06:28:07.000Z | """
Canonicalize the product SMILES, and then use substructure matching to infer
the correspondence to the original atom-mapped order. This correspondence is then
used to renumber the reactant atoms.
"""
from rdkit import Chem
import os
import argparse
import pandas as pd
DATA_DIR = f"{os.environ['SEQ_GRAPH_RETRO']}/... | 33.285714 | 111 | 0.687025 |
9e128f95630112417f44acada82c8e385378c505 | 8,237 | py | Python | homeassistant/components/thermostat/__init__.py | SKarthick5121995/karthickmaduraai | d5498dfb83e9bb57fff16db854ae3e15c1e15425 | [
"MIT"
] | null | null | null | homeassistant/components/thermostat/__init__.py | SKarthick5121995/karthickmaduraai | d5498dfb83e9bb57fff16db854ae3e15c1e15425 | [
"MIT"
] | null | null | null | homeassistant/components/thermostat/__init__.py | SKarthick5121995/karthickmaduraai | d5498dfb83e9bb57fff16db854ae3e15c1e15425 | [
"MIT"
] | null | null | null | """
Provides functionality to interact with thermostats.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/thermostat/
"""
import logging
import os
from homeassistant.helpers.entity_component import EntityComponent
from homeassistant.config import load_y... | 28.800699 | 75 | 0.661284 |
9e12952f616603a05fe452a6a42b7153085f630f | 12,821 | py | Python | pajbot/managers/emote.py | aidenwallis/pajbot | eb180dd517e1f25cbc22dc65216b81aadccb597d | [
"MIT"
] | null | null | null | pajbot/managers/emote.py | aidenwallis/pajbot | eb180dd517e1f25cbc22dc65216b81aadccb597d | [
"MIT"
] | null | null | null | pajbot/managers/emote.py | aidenwallis/pajbot | eb180dd517e1f25cbc22dc65216b81aadccb597d | [
"MIT"
] | null | null | null | import logging
import random
from pajbot.managers.redis import RedisManager
from pajbot.managers.schedule import ScheduleManager
from pajbot.models.emote import Emote, EmoteInstance, EmoteInstanceCount
from pajbot.streamhelper import StreamHelper
from pajbot.utils import iterate_split_with_index
log = logging.getLog... | 34.465054 | 117 | 0.666173 |
9e129bafeaaa40995534ab2b1efa021d337c91b6 | 1,884 | py | Python | src/services/bricklayer/exceptions.py | solomonricky/epic-awesome-gamer | a6ecff90a716bb145931bb4042f9510e68698694 | [
"Apache-2.0"
] | null | null | null | src/services/bricklayer/exceptions.py | solomonricky/epic-awesome-gamer | a6ecff90a716bb145931bb4042f9510e68698694 | [
"Apache-2.0"
] | null | null | null | src/services/bricklayer/exceptions.py | solomonricky/epic-awesome-gamer | a6ecff90a716bb145931bb4042f9510e68698694 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Time : 2022/1/17 15:20
# Author : QIN2DIM
# Github : https://github.com/QIN2DIM
# Description:
from typing import Optional, Sequence
class AwesomeException(Exception):
def __init__(self, msg: Optional[str] = None, stacktrace: Optional[Sequence[str]] = None):
self.ms... | 21.906977 | 94 | 0.682059 |
9e12aeec4ef2e28259009ffe8ffe5292c9370365 | 4,651 | py | Python | src/cops_and_robots/map_tools/particle_layer.py | COHRINT/cops_and_robots | 1df99caa1e38bde1b5ce2d04389bc232a68938d6 | [
"Apache-2.0"
] | 3 | 2016-01-19T17:54:51.000Z | 2019-10-21T12:09:03.000Z | src/cops_and_robots/map_tools/particle_layer.py | COHRINT/cops_and_robots | 1df99caa1e38bde1b5ce2d04389bc232a68938d6 | [
"Apache-2.0"
] | null | null | null | src/cops_and_robots/map_tools/particle_layer.py | COHRINT/cops_and_robots | 1df99caa1e38bde1b5ce2d04389bc232a68938d6 | [
"Apache-2.0"
] | 5 | 2015-02-19T02:53:24.000Z | 2019-03-05T20:29:12.000Z | #!/usr/bin/env python
"""Provides a discrete particle representation of robot locations.
When using the *discrete* ``fusion_engine`` type, the particle
layer is used to represent the distribution of a cop's expecation of
robber locations. One particle layer exists per robot, with n particles
per particle layer, to est... | 31.006667 | 75 | 0.57106 |
9e12eb3b6436dd81d16171eb0c5b5e3c74791904 | 4,247 | py | Python | experiments/murtaza/multiworld/camera_ready/reacher/dsae.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/murtaza/multiworld/camera_ready/reacher/dsae.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/murtaza/multiworld/camera_ready/reacher/dsae.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | import rlkit.misc.hyperparameter as hyp
from multiworld.envs.mujoco.cameras import sawyer_xyz_reacher_camera
from multiworld.envs.mujoco.sawyer_xyz.sawyer_reach import SawyerReachXYEnv
from rlkit.launchers.launcher_util import run_experiment
from rlkit.torch.grill.launcher import grill_her_td3_full_experiment
from rlki... | 33.179688 | 111 | 0.537556 |
9e12fcf5231c2345856cd379a0c64db36b3c579e | 8,288 | py | Python | tests/servers/threebot/test_threebot.py | threefoldtech/js-sdk | 811f783ac34a60225175bab2d806802a87b9d5c7 | [
"Apache-2.0"
] | 13 | 2020-09-02T09:05:08.000Z | 2022-03-12T02:43:24.000Z | tests/servers/threebot/test_threebot.py | threefoldtech/js-sdk | 811f783ac34a60225175bab2d806802a87b9d5c7 | [
"Apache-2.0"
] | 1,998 | 2020-06-15T11:46:10.000Z | 2022-03-24T22:12:41.000Z | tests/servers/threebot/test_threebot.py | threefoldtech/js-sdk | 811f783ac34a60225175bab2d806802a87b9d5c7 | [
"Apache-2.0"
] | 8 | 2020-09-29T06:50:35.000Z | 2021-06-14T03:30:52.000Z | from os import environ
from random import randint
from gevent import sleep
from jumpscale.loader import j
from tests.base_tests import BaseTests
class Test3BotServer(BaseTests):
tname = environ.get("TNAME")
email = environ.get("EMAIL")
words = environ.get("WORDS")
explorer_url = "https://explorer.tes... | 40.038647 | 120 | 0.656491 |
9e13625c50650556441ae5a77b41c399600cc1e2 | 473 | py | Python | src/main/python/split_files_devtest.py | utcompling/textgrounder | 45d664b3a8ec1bdef54acadbde6eb4ce83c75e33 | [
"Apache-2.0"
] | 40 | 2015-01-06T07:38:15.000Z | 2021-02-16T19:14:39.000Z | src/main/python/split_files_devtest.py | utcompling/textgrounder | 45d664b3a8ec1bdef54acadbde6eb4ce83c75e33 | [
"Apache-2.0"
] | null | null | null | src/main/python/split_files_devtest.py | utcompling/textgrounder | 45d664b3a8ec1bdef54acadbde6eb4ce83c75e33 | [
"Apache-2.0"
] | 10 | 2015-01-06T01:19:10.000Z | 2021-11-11T14:33:22.000Z | import sys, shutil, os
def processDirectory(dirname):
fileList = os.listdir(dirname)
if(not dirname[-1] == "/"):
dirname += "/"
count = 0
for filename in fileList:
if(count % 3 == 2):
shutil.copy(dirname + filename, sys.argv[3])
print (dirname + filename) + " --> " + sys.argv[3]
else:
... | 26.277778 | 56 | 0.589852 |
9e13628b7c15d76a8cff650dd579c794a7e755d3 | 2,112 | py | Python | tests/prompt/test_gitstatus.py | sthagen/xonsh-xonsh | 5f418483015dfdac064c69a3891d7769971a0772 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | tests/prompt/test_gitstatus.py | sthagen/xonsh-xonsh | 5f418483015dfdac064c69a3891d7769971a0772 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | tests/prompt/test_gitstatus.py | sthagen/xonsh-xonsh | 5f418483015dfdac064c69a3891d7769971a0772 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | import pytest
from xonsh.prompt import gitstatus
from xonsh.prompt.base import _format_value
@pytest.fixture(autouse=True)
def git_no_stash(mocker):
return mocker.patch.object(gitstatus, "get_stash_count", return_value=0)
@pytest.fixture
def prompts(xession):
fields = xession.env["PROMPT_FIELDS"]
yield... | 28.540541 | 108 | 0.625947 |
9e136e4ac23aa8582d2546a1f9bf638e037215b6 | 409 | py | Python | tests/test_cli.py | kwierman/dl_data_validation_toolset | fb0486abd000ba28c6474f8979762c92fb4ee038 | [
"MIT"
] | 1 | 2017-08-24T00:46:47.000Z | 2017-08-24T00:46:47.000Z | tests/test_cli.py | kwierman/dl_data_validation_toolset | fb0486abd000ba28c6474f8979762c92fb4ee038 | [
"MIT"
] | 177 | 2017-04-10T23:03:27.000Z | 2022-03-28T22:07:54.000Z | tests/test_cli.py | HEP-DL/dl_data_validation_toolset | fb0486abd000ba28c6474f8979762c92fb4ee038 | [
"MIT"
] | null | null | null | from dl_data_validation_toolset.framework import base_unittest
from dl_data_validation_toolset.framework.base_test import BaseTest
class Test_CLI(base_unittest.BaseTestCase):
"""
Tests the functionality in cli.py
"""
def test_subclass_register(self):
"""
Tests that the CLI is able to successfully... | 25.5625 | 67 | 0.743276 |
9e137567dc3d4686a930ba0482301a708bd8080c | 1,244 | py | Python | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/pybadger_button_debouncing.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 47 | 2021-02-15T23:02:36.000Z | 2022-03-04T21:30:03.000Z | examples/pybadger_button_debouncing.py | liltux/Adafruit_CircuitPython_PyBadger | f91f49d48c75e9b142f5c757a9c18f92d4edb694 | [
"Unlicense",
"MIT-0",
"MIT"
] | 36 | 2019-07-11T16:59:49.000Z | 2022-02-20T17:25:16.000Z | examples/pybadger_button_debouncing.py | liltux/Adafruit_CircuitPython_PyBadger | f91f49d48c75e9b142f5c757a9c18f92d4edb694 | [
"Unlicense",
"MIT-0",
"MIT"
] | 25 | 2019-06-20T19:50:25.000Z | 2022-02-18T22:29:43.000Z | # SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT
from adafruit_debouncer import Debouncer
from adafruit_pybadger import pybadger
b_btn = Debouncer(lambda: pybadger.button.b == 0)
a_btn = Debouncer(lambda: pybadger.button.a == 0)
up_btn = Debouncer(lambda: pybadger.button.u... | 24.392157 | 62 | 0.651929 |
9e13b720e395d5dff61a11f60e3323601395025d | 705 | py | Python | BridgeOptimizer/datastructure/hypermesh/Force.py | manuel1618/bridgeOptimizer | 273bbf27b2c6273e4aaca55debbd9a10bebf7042 | [
"MIT"
] | 1 | 2022-01-20T16:30:04.000Z | 2022-01-20T16:30:04.000Z | BridgeOptimizer/datastructure/hypermesh/Force.py | manuel1618/bridgeOptimizer | 273bbf27b2c6273e4aaca55debbd9a10bebf7042 | [
"MIT"
] | 13 | 2022-01-07T14:07:15.000Z | 2022-01-29T19:42:48.000Z | BridgeOptimizer/datastructure/hypermesh/Force.py | manuel1618/bridgeOptimizer | 273bbf27b2c6273e4aaca55debbd9a10bebf7042 | [
"MIT"
] | null | null | null | from typing import List
from .LoadCollector import LoadCollector
class Force:
"""
Single Point Force
Parameters
----------
load_collector: LoadCollector
LoadCollector where the Force will be put into
nodeIds:List[int]
node ids for which the load shall apply
x: float
... | 22.03125 | 108 | 0.588652 |
9e13f2b89c7a17e67fabec43b41d6216aa936ee8 | 926 | py | Python | rl-toolkit/examples/test_cmds/gaifo/def.py | clvrai/goal_prox_il | 7c809b2ee575a69a14997068db06f3c1f3c8bd08 | [
"MIT"
] | 4 | 2021-11-17T20:19:34.000Z | 2022-03-31T04:21:26.000Z | rl-toolkit/examples/test_cmds/gaifo/def.py | clvrai/goal_prox_il | 7c809b2ee575a69a14997068db06f3c1f3c8bd08 | [
"MIT"
] | null | null | null | rl-toolkit/examples/test_cmds/gaifo/def.py | clvrai/goal_prox_il | 7c809b2ee575a69a14997068db06f3c1f3c8bd08 | [
"MIT"
] | null | null | null | import sys
sys.path.insert(0, './')
from rlf import run_policy
from tests.test_run_settings import TestRunSettings
from rlf.policies.actor_critic.dist_actor_critic import DistActorCritic
from rlf.rl.model import MLPBase
from rlf import GAIFO
from rlf.rl.model import ConcatLayer
import torch.nn as nn
def get_discrim(in... | 30.866667 | 97 | 0.697624 |
9e13f791becde2f8e781795f0ecc229972e7dcb5 | 156 | py | Python | scvelo/tools/pymc/__init__.py | AlexanderAivazidis/scvelo | b59e42aaa7206c59dab6f1ffcc6d373cc4a03ae6 | [
"BSD-3-Clause"
] | null | null | null | scvelo/tools/pymc/__init__.py | AlexanderAivazidis/scvelo | b59e42aaa7206c59dab6f1ffcc6d373cc4a03ae6 | [
"BSD-3-Clause"
] | null | null | null | scvelo/tools/pymc/__init__.py | AlexanderAivazidis/scvelo | b59e42aaa7206c59dab6f1ffcc6d373cc4a03ae6 | [
"BSD-3-Clause"
] | null | null | null | from .recover_dynamics_pymc3 import recover_dynamics_pymc3
from .DynamicalModel_V3 import DynamicalModel_V3
from .DynamicalModel_V4 import DynamicalModel_V4 | 52 | 58 | 0.910256 |
9e13f8009d001fd711f5744d677a296b884854d6 | 126 | py | Python | esp/cred_template.py | zhaomh1998/ESP-data-tunnel | 032596033677cdf625f2a80d1a3b6e4b1b393e10 | [
"MIT"
] | null | null | null | esp/cred_template.py | zhaomh1998/ESP-data-tunnel | 032596033677cdf625f2a80d1a3b6e4b1b393e10 | [
"MIT"
] | null | null | null | esp/cred_template.py | zhaomh1998/ESP-data-tunnel | 032596033677cdf625f2a80d1a3b6e4b1b393e10 | [
"MIT"
] | null | null | null | # Note: Edit the below field, and rename this file to "cred.py"
WIFI_SSID = 'WIFI SSID Here'
WIFI_PASS = 'Wi-Fi Password Here' | 42 | 63 | 0.730159 |
9e142f1a41337b20a31d35417ffe75f58a4e4ab4 | 1,465 | py | Python | week4_programs/rtr2_change_buffer_take2.py | morganoh/Python_with_Kirk | 11bffec8601e553ccebad5b431702627239f72a1 | [
"Apache-2.0"
] | null | null | null | week4_programs/rtr2_change_buffer_take2.py | morganoh/Python_with_Kirk | 11bffec8601e553ccebad5b431702627239f72a1 | [
"Apache-2.0"
] | null | null | null | week4_programs/rtr2_change_buffer_take2.py | morganoh/Python_with_Kirk | 11bffec8601e553ccebad5b431702627239f72a1 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
""" use paramiko to send cmd to RTR2 """
import paramiko
import time
from getpass import getpass
MAX_BUFFER = 65535
def prepare_buffer(rtr2):
if rtr2.recv_ready():
# print 'buffer is full'
return rtr2.recv(MAX_BUFFER)
def disable_paging(rtr2):
cmd = 'terminal ... | 21.544118 | 125 | 0.636177 |
9e1439cdc9488611f324958bc45f37cf6501d56b | 700 | py | Python | NLP programmes in Python/6. CFG - Toy Grammar/cfg.py | AlexandrosPlessias/NLP-Greek-Presentations | 4ae9d635a777f24bae5238b9f195bd17d00040ea | [
"MIT"
] | null | null | null | NLP programmes in Python/6. CFG - Toy Grammar/cfg.py | AlexandrosPlessias/NLP-Greek-Presentations | 4ae9d635a777f24bae5238b9f195bd17d00040ea | [
"MIT"
] | null | null | null | NLP programmes in Python/6. CFG - Toy Grammar/cfg.py | AlexandrosPlessias/NLP-Greek-Presentations | 4ae9d635a777f24bae5238b9f195bd17d00040ea | [
"MIT"
] | null | null | null | from nltk.parse.generate import generate
from nltk import CFG # toy CFG
toy_grammar = CFG.fromstring("""
S -> NP VP
VP -> V NP
V -> 'eats' | 'drinks'
NP -> Det N
Det -> 'a' | 'an' | 'the'
N -> 'president' | 'Obama' | 'apple'| 'coke'
""")
"""
S indicate the entire sentence
VP is verb phrase the
V is ... | 20 | 47 | 0.654286 |
9e1439dd2ba08fadd2954df37c0f3f29cfd98ce1 | 2,799 | py | Python | Tests/test_KGML_graphics_online.py | mikepm35/biopython | 9f2d4d8d70ec7223df35fdc3d9c4a3c018756327 | [
"BSD-3-Clause"
] | 1 | 2020-02-13T14:32:44.000Z | 2020-02-13T14:32:44.000Z | Tests/test_KGML_graphics_online.py | EsamTolba/biopython | 120616cf0d28cb8e581898afd6604e5a2065a137 | [
"BSD-3-Clause"
] | null | null | null | Tests/test_KGML_graphics_online.py | EsamTolba/biopython | 120616cf0d28cb8e581898afd6604e5a2065a137 | [
"BSD-3-Clause"
] | 1 | 2019-03-14T18:59:30.000Z | 2019-03-14T18:59:30.000Z | #!/usr/bin/env python
#
# Copyright 2014 by Leighton Pritchard. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Tests for online functionality of the KGML modules."""
# Buil... | 32.172414 | 74 | 0.692747 |
9e14962ba4e949142ffe9d8973ca2986683aa010 | 18,037 | py | Python | generate_rbj.py | Kortforsyningen/csv2rbj | b8e5ca3d5d861562ebd9e49c5bac68e1f80bf60e | [
"MIT"
] | 2 | 2017-10-18T20:10:42.000Z | 2022-03-03T13:19:24.000Z | generate_rbj.py | Kortforsyningen/csv2rbj | b8e5ca3d5d861562ebd9e49c5bac68e1f80bf60e | [
"MIT"
] | null | null | null | generate_rbj.py | Kortforsyningen/csv2rbj | b8e5ca3d5d861562ebd9e49c5bac68e1f80bf60e | [
"MIT"
] | 1 | 2022-03-30T11:36:12.000Z | 2022-03-30T11:36:12.000Z | # -*-coding: utf-8-*-
"""
Generator for .rbj files (Data Reviewer Batch Job) for some common rule types.
Reads a .csv file with column headings as input.
This scripts doesn't actually parse the xml that constitutes an .rbj file - instead it
is constructed from chunks of xml, which can be found in the templates... | 42.044289 | 163 | 0.601209 |
9e149c92474d2c5b19229ca894af91a19ee650dc | 89 | py | Python | tests/name_main.py | ZYAZP/python2 | 7dc3b62eff51e1decb4a408122e77630fdc1687d | [
"MIT"
] | 1,062 | 2015-11-18T01:04:33.000Z | 2022-03-29T07:13:30.000Z | tests/name_main.py | ArrowSides/onelinerizer | 7dc3b62eff51e1decb4a408122e77630fdc1687d | [
"MIT"
] | 26 | 2015-11-17T06:58:07.000Z | 2022-01-15T18:11:16.000Z | tests/name_main.py | ArrowSides/onelinerizer | 7dc3b62eff51e1decb4a408122e77630fdc1687d | [
"MIT"
] | 100 | 2015-11-17T09:01:22.000Z | 2021-09-12T13:58:28.000Z | ## Does __name__ == '__main__' check pass?
if __name__ == '__main__':
print "Pass!"
| 17.8 | 42 | 0.629213 |
9e149de0da021256765292fc063cbf291f1dc938 | 5,500 | py | Python | sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/aio/operations/_replicas_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/aio/operations/_replicas_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql_flexibleservers/aio/operations/_replicas_operations.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 ... | 45.081967 | 192 | 0.671455 |
9e14abc9bc473bf661c4fb71628ba4c111a83db0 | 3,010 | py | Python | apps/tf_deepspeech/deepspeech/native_client/kiss_fft130/test/mk_test.py | eubr-atmosphere/a-GPUBench | 2628db7e4910d36ab34d4307ffd3587c149c1f63 | [
"Apache-2.0"
] | 2 | 2019-04-26T08:27:43.000Z | 2020-12-17T16:02:41.000Z | apps/tf_deepspeech/deepspeech/native_client/kiss_fft130/test/mk_test.py | eubr-atmosphere/a-GPUBench | 2628db7e4910d36ab34d4307ffd3587c149c1f63 | [
"Apache-2.0"
] | 6 | 2020-01-28T23:04:45.000Z | 2022-02-10T00:36:21.000Z | apps/tf_deepspeech/deepspeech/native_client/kiss_fft130/test/mk_test.py | eubr-atmosphere/a-GPUBench | 2628db7e4910d36ab34d4307ffd3587c149c1f63 | [
"Apache-2.0"
] | 1 | 2022-01-18T10:32:53.000Z | 2022-01-18T10:32:53.000Z | #!/usr/bin/env python3
import FFT
import sys
import random
import re
j=complex(0,1)
def randvec(n,iscomplex):
if iscomplex:
return [
int(random.uniform(-32768,32767) ) + j*int(random.uniform(-32768,32767) )
for i in range(n) ]
else:
return [ int(... | 25.508475 | 125 | 0.530565 |
9e14b9a53e6c63876478d876030c476c5d77dbbb | 23,492 | py | Python | tensorflow/contrib/distributions/python/kernel_tests/bijectors/affine_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/contrib/distributions/python/kernel_tests/bijectors/affine_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/contrib/distributions/python/kernel_tests/bijectors/affine_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 31 | 2018-09-11T02:17:17.000Z | 2021-12-15T10:33:35.000Z | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 37.647436 | 80 | 0.572961 |
9e14c4146aa5c1aa1a19c1500309b8f6a5e642f6 | 674 | py | Python | iris_sdk/models/rate_center.py | NumberAI/python-bandwidth-iris | 0e05f79d68b244812afb97e00fd65b3f46d00aa3 | [
"MIT"
] | 2 | 2020-04-13T13:47:59.000Z | 2022-02-23T20:32:41.000Z | iris_sdk/models/rate_center.py | bandwidthcom/python-bandwidth-iris | dbcb30569631395041b92917252d913166f7d3c9 | [
"MIT"
] | 5 | 2020-09-18T20:59:24.000Z | 2021-08-25T16:51:42.000Z | iris_sdk/models/rate_center.py | bandwidthcom/python-bandwidth-iris | dbcb30569631395041b92917252d913166f7d3c9 | [
"MIT"
] | 5 | 2018-12-12T14:39:50.000Z | 2020-11-17T21:42:29.000Z | #!/usr/bin/env python
from __future__ import division, absolute_import, print_function
from future.builtins import super
from iris_sdk.models.base_resource import BaseResource
from iris_sdk.models.data.rate_center import RateCenterData
XML_NAME_COVERED_RATE_CENTER = "CoveredRateCenter"
XPATH_COVERED_RATE_CENTER = "/... | 28.083333 | 64 | 0.765579 |
9e14d56cc6cc03a31c20103ff3985419d923ec0f | 781 | py | Python | src/rpyc/core/consts.py | villawang/SNAP | 3c899151e5c1f9f76c65f8eee164453ed5eef3e8 | [
"BSD-3-Clause"
] | 25 | 2015-01-19T20:09:31.000Z | 2022-03-04T12:49:05.000Z | src/rpyc/core/consts.py | villawang/SNAP | 3c899151e5c1f9f76c65f8eee164453ed5eef3e8 | [
"BSD-3-Clause"
] | 2 | 2016-01-16T00:00:24.000Z | 2019-08-17T03:38:11.000Z | src/rpyc/core/consts.py | villawang/SNAP | 3c899151e5c1f9f76c65f8eee164453ed5eef3e8 | [
"BSD-3-Clause"
] | 15 | 2015-10-22T18:18:00.000Z | 2020-07-01T08:17:21.000Z | """
Constants used by the protocol
"""
# messages
MSG_REQUEST = 1
MSG_REPLY = 2
MSG_EXCEPTION = 3
# boxing
LABEL_VALUE = 1
LABEL_TUPLE = 2
LABEL_LOCAL_REF = 3
LABEL_REMOTE_REF = 4
# action handlers
HANDLE_PING = 1
HANDLE_CLOSE = 2
HANDLE_GETROOT = 3
HANDLE_GETATTR = 4
H... | 17.75 | 30 | 0.617157 |
9e14db8ae4bf564c36643a68f777f326053ea0ab | 2,137 | py | Python | starknet_py/net/models/transaction.py | ftupas/starknet.py | dbc882eafa96eafb1062f0e85ed1ebb5a9f09a26 | [
"MIT"
] | null | null | null | starknet_py/net/models/transaction.py | ftupas/starknet.py | dbc882eafa96eafb1062f0e85ed1ebb5a9f09a26 | [
"MIT"
] | null | null | null | starknet_py/net/models/transaction.py | ftupas/starknet.py | dbc882eafa96eafb1062f0e85ed1ebb5a9f09a26 | [
"MIT"
] | null | null | null | from typing import Union, Sequence
from starkware.starknet.public.abi import get_selector_from_name
from starkware.starknet.services.api.gateway.transaction import (
InvokeFunction as IF,
Deploy as D,
Transaction as T,
)
from starkware.starknet.services.api.gateway.transaction_hash import (
calculate_t... | 28.878378 | 81 | 0.748713 |
9e14e88b159219efe665253d2c5a9c197bd845fb | 717 | py | Python | q5.py | jsdnhk/recursion-exercise | 87c4320adcc6ef5545b7f56614ca0a2171d811ab | [
"MIT"
] | null | null | null | q5.py | jsdnhk/recursion-exercise | 87c4320adcc6ef5545b7f56614ca0a2171d811ab | [
"MIT"
] | null | null | null | q5.py | jsdnhk/recursion-exercise | 87c4320adcc6ef5545b7f56614ca0a2171d811ab | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Find the MI addition by recursion
# m(i) = 1/3 + 2/5 + 3/7 + ... + i/2i+1
from fractions import Fraction
import sys
def main():
print("Calculate the result of m(i) = 1/3 + 2/5 + 3/7 + ... + i/2i+1")
i = eval(input("Enter the i: "))
if not (type(i) == int and i > 0):
sys.st... | 28.68 | 74 | 0.582985 |
9e14f2c4cc33c4106b957bcb234a95758ec8a363 | 2,843 | py | Python | touchEvent.py | Hongyil1/NAO-Robot-Handwriting | f3e8b79bfa75672daa1b27172338d5d7862bd58d | [
"MIT"
] | 3 | 2018-10-19T10:29:36.000Z | 2021-06-09T12:46:00.000Z | touchEvent.py | Hongyil1/NAO-Robot-Handwriting | f3e8b79bfa75672daa1b27172338d5d7862bd58d | [
"MIT"
] | 1 | 2019-07-19T04:18:54.000Z | 2019-07-19T04:18:54.000Z | touchEvent.py | Hongyil1/NAO-Robot-Handwriting | f3e8b79bfa75672daa1b27172338d5d7862bd58d | [
"MIT"
] | 2 | 2021-02-24T07:14:05.000Z | 2021-11-09T17:44:53.000Z | """
touchEvent mode control the NAO's head sensor touch.
"""
from naoqi import ALProxy
from naoqi import ALModule
class ReactToTouchModule(ALModule):
"""
A simple module able to react to touch events
"""
def __init__(self, name):
ALModule.__init__(self, name)
# No ... | 31.241758 | 86 | 0.594794 |
9e150adff6554a3a65b0261ff51df4c0555c1958 | 2,718 | py | Python | chapter_8_server/unit_test.py | fancyerii/voicebook | def82da8577086d0361643a05fec2463006533a9 | [
"Apache-2.0"
] | 1 | 2020-03-05T01:19:17.000Z | 2020-03-05T01:19:17.000Z | chapter_8_server/unit_test.py | fancyerii/voicebook | def82da8577086d0361643a05fec2463006533a9 | [
"Apache-2.0"
] | null | null | null | chapter_8_server/unit_test.py | fancyerii/voicebook | def82da8577086d0361643a05fec2463006533a9 | [
"Apache-2.0"
] | null | null | null | '''
================================================
## VOICEBOOK REPOSITORY ##
================================================
repository name: voicebook
repository version: 1.0
repository link: https://github.com/jim-schwoebel/voicebook
author: Jim Schwoebel
author contact: js@neur... | 34.846154 | 121 | 0.607432 |
9e1516937ffab0900e2e21d6de62ede4c73457de | 10,660 | py | Python | monai/engines/workflow.py | myron/MONAI | 6e7b2d6ad9688b0418eee21efeea196da2ad054f | [
"Apache-2.0"
] | null | null | null | monai/engines/workflow.py | myron/MONAI | 6e7b2d6ad9688b0418eee21efeea196da2ad054f | [
"Apache-2.0"
] | null | null | null | monai/engines/workflow.py | myron/MONAI | 6e7b2d6ad9688b0418eee21efeea196da2ad054f | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 - 2021 MONAI Consortium
# 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 wri... | 47.377778 | 117 | 0.671951 |
9e152ed8018f29e122526e8cfccaca9d945b3406 | 3,102 | py | Python | sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_azure_db_for_postgre_sql_sync_task_properties_py3.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_azure_db_for_postgre_sql_sync_task_properties_py3.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/models/connect_to_target_azure_db_for_postgre_sql_sync_task_properties_py3.py | xiafu-msft/azure-sdk-for-python | 4d9560cfd519ee60667f3cc2f5295a58c18625db | [
"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 ... | 44.956522 | 118 | 0.663121 |
9e1530075f0a10b818510190d3b0cb6555599036 | 727 | py | Python | bandwidth/voice/bxml/verbs/__init__.py | roverdotcom/python-sdk | c6947fb3331b77f0064aeec2dcf0c4ff178de34c | [
"MIT"
] | 5 | 2020-11-04T14:29:37.000Z | 2022-02-23T20:33:07.000Z | bandwidth/voice/bxml/verbs/__init__.py | roverdotcom/python-sdk | c6947fb3331b77f0064aeec2dcf0c4ff178de34c | [
"MIT"
] | 3 | 2021-07-23T18:48:48.000Z | 2022-03-15T14:59:07.000Z | bandwidth/voice/bxml/verbs/__init__.py | roverdotcom/python-sdk | c6947fb3331b77f0064aeec2dcf0c4ff178de34c | [
"MIT"
] | 8 | 2020-04-14T09:22:53.000Z | 2022-03-11T10:46:06.000Z | from .hangup import Hangup
from .send_dtmf import SendDtmf
from .gather import Gather
from .pause import Pause
from .phone_number import PhoneNumber
from .redirect import Redirect
from .speak_sentence import SpeakSentence
from .transfer import Transfer
from .play_audio import PlayAudio
from .forward import Forward
from... | 31.608696 | 45 | 0.848693 |
9e15453454a4eff5b2c989633fecff825ff6dc86 | 10,358 | py | Python | cmds/run_MTL.py | magic2du/dlnn | 9a6fdd1e9e84826c402b564853673dd1c9cd12b9 | [
"Apache-2.0"
] | null | null | null | cmds/run_MTL.py | magic2du/dlnn | 9a6fdd1e9e84826c402b564853673dd1c9cd12b9 | [
"Apache-2.0"
] | null | null | null | cmds/run_MTL.py | magic2du/dlnn | 9a6fdd1e9e84826c402b564853673dd1c9cd12b9 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 Tianchuan Du University of Delaware
# 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
#
# THIS CODE IS PROVIDED *AS IS* BAS... | 59.188571 | 172 | 0.676578 |
9e154bf0f08b960e2cde27672183543a55562094 | 4,780 | py | Python | tests/_display/test_line_cap_interface.py | ynsnf/apysc | b10ffaf76ec6beb187477d0a744fca00e3efc3fb | [
"MIT"
] | 16 | 2021-04-16T02:01:29.000Z | 2022-01-01T08:53:49.000Z | tests/_display/test_line_cap_interface.py | ynsnf/apysc | b10ffaf76ec6beb187477d0a744fca00e3efc3fb | [
"MIT"
] | 613 | 2021-03-24T03:37:38.000Z | 2022-03-26T10:58:37.000Z | tests/_display/test_line_cap_interface.py | simon-ritchie/apyscript | c319f8ab2f1f5f7fad8d2a8b4fc06e7195476279 | [
"MIT"
] | 2 | 2021-06-20T07:32:58.000Z | 2021-12-26T08:22:11.000Z | import re
from random import randint
from typing import Match
from typing import Optional
from retrying import retry
import apysc as ap
from apysc._display.line_cap_interface import LineCapInterface
from apysc._expression import expression_data_util
from apysc._expression import var_names
from tests.testin... | 46.407767 | 78 | 0.708787 |
9e15674260a30c32bc04c5f876ef92ad435dd3b1 | 3,394 | py | Python | tests/integration/test_sources.py | Lactem/dffml | 211f0b62e8c032b0a3bd0df8d105c2df1c0eb552 | [
"MIT"
] | null | null | null | tests/integration/test_sources.py | Lactem/dffml | 211f0b62e8c032b0a3bd0df8d105c2df1c0eb552 | [
"MIT"
] | null | null | null | tests/integration/test_sources.py | Lactem/dffml | 211f0b62e8c032b0a3bd0df8d105c2df1c0eb552 | [
"MIT"
] | null | null | null | """
This file contains integration tests. We use the CLI to exercise functionality of
various DFFML classes and constructs.
"""
import re
import os
import io
import json
import inspect
import pathlib
import asyncio
import contextlib
import unittest.mock
from typing import Dict, Any
from dffml.repo import Repo
from dff... | 29.258621 | 98 | 0.538892 |
9e15790c366eb30142b7e3398722675779b7f52a | 465 | py | Python | talks-articles/languages-n-runtimes/python/pdb-debug.py | abhishekkr/tutorials_as_code | f355dc62a5025b710ac6d4a6ac2f9610265fad54 | [
"MIT"
] | 37 | 2015-02-01T23:16:39.000Z | 2021-12-22T16:50:48.000Z | talks-articles/languages-n-runtimes/python/pdb-debug.py | abhishekkr/tutorials_as_code | f355dc62a5025b710ac6d4a6ac2f9610265fad54 | [
"MIT"
] | 1 | 2017-03-02T04:55:48.000Z | 2018-01-14T10:51:11.000Z | talks-articles/languages-n-runtimes/python/pdb-debug.py | abhishekkr/tutorials_as_code | f355dc62a5025b710ac6d4a6ac2f9610265fad54 | [
"MIT"
] | 15 | 2015-03-02T08:09:01.000Z | 2021-06-10T03:25:41.000Z | #!/usr/bin/env python
""" it attaches itself to any exception occuring,
if pdb can start there it will """
import sys
def info(type, value, tb):
if hasattr(sys, 'ps1') or not sys.stderr.isatty():
# call default hook we no tty available
sys.__excepthook__(type, value, tb)
else:
imp... | 22.142857 | 54 | 0.632258 |
9e15e1d44b467ce6800dad0a70b59d14a44ed597 | 7,748 | py | Python | PythonProjects/99-CapstoneProject-202020-DavidAndVIbha-SOLUTION/libs/rosebot_arm_and_claw.py | much2mutch/csse120-public | 4f862a6deb7a5373fb5723fb2a23e4042e4d4157 | [
"MIT"
] | null | null | null | PythonProjects/99-CapstoneProject-202020-DavidAndVIbha-SOLUTION/libs/rosebot_arm_and_claw.py | much2mutch/csse120-public | 4f862a6deb7a5373fb5723fb2a23e4042e4d4157 | [
"MIT"
] | null | null | null | PythonProjects/99-CapstoneProject-202020-DavidAndVIbha-SOLUTION/libs/rosebot_arm_and_claw.py | much2mutch/csse120-public | 4f862a6deb7a5373fb5723fb2a23e4042e4d4157 | [
"MIT"
] | null | null | null | """
Capstone Team Project. Code to run on a ROBOT (NOT a laptop).
This code defines the ArmAndClaw class that controls
the physical arm and the physical claw that works in tandem with the arm.
Authors: Your professors (for the framework)
and PUT_YOUR_NAME_HERE.
Winter term, 2019-2020.
"""
# TODO: 1. In the... | 48.72956 | 80 | 0.536138 |
9e15ee8bf029697b6fcbb331f18c735e36849d71 | 1,224 | py | Python | website/urls.py | BelgianBiodiversityPlatform/catalogue-lepidoptera-belgium-webapp | c0ed7fde78f9af5afbd91c53ed3f543046e8dd41 | [
"BSD-2-Clause-FreeBSD"
] | 2 | 2020-11-17T18:02:44.000Z | 2021-02-02T04:00:21.000Z | website/urls.py | BelgianBiodiversityPlatform/catalogue-lepidoptera-belgium-webapp | c0ed7fde78f9af5afbd91c53ed3f543046e8dd41 | [
"BSD-2-Clause-FreeBSD"
] | 5 | 2020-06-05T19:00:59.000Z | 2022-01-13T00:52:30.000Z | website/urls.py | BelgianBiodiversityPlatform/catalogue-lepidoptera-belgium-webapp | c0ed7fde78f9af5afbd91c53ed3f543046e8dd41 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | """website URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based... | 33.081081 | 77 | 0.70915 |
9e1601046f5f39fd2244d18dbae4e1c3ed441678 | 1,243 | py | Python | LC/307.py | szhu3210/LeetCode_Solutions | 64747eb172c2ecb3c889830246f3282669516e10 | [
"MIT"
] | 2 | 2018-02-24T17:20:02.000Z | 2018-02-24T17:25:43.000Z | LC/307.py | szhu3210/LeetCode_Solutions | 64747eb172c2ecb3c889830246f3282669516e10 | [
"MIT"
] | null | null | null | LC/307.py | szhu3210/LeetCode_Solutions | 64747eb172c2ecb3c889830246f3282669516e10 | [
"MIT"
] | null | null | null | class NumArray(object):
def __init__(self, nums):
"""
initialize your data structure here.
:type nums: List[int]
"""
self.nums=nums
self.maxInd=len(nums)
self.BIT=[0 for _ in range(self.maxInd+1)]
for i,num in enumerate(nums):
k=i+1
... | 24.372549 | 63 | 0.473049 |
9e16023a011f6138a053590fb6d9161e67821140 | 4,640 | py | Python | st2actions/tests/unit/test_paramiko_remote_script_runner.py | magiceses/st2 | a048ba92a8a1a5d272f277bf8fab0951df903306 | [
"Apache-2.0"
] | null | null | null | st2actions/tests/unit/test_paramiko_remote_script_runner.py | magiceses/st2 | a048ba92a8a1a5d272f277bf8fab0951df903306 | [
"Apache-2.0"
] | 2 | 2020-03-04T08:33:36.000Z | 2020-03-04T08:34:14.000Z | st2actions/tests/unit/test_paramiko_remote_script_runner.py | magiceses/st2 | a048ba92a8a1a5d272f277bf8fab0951df903306 | [
"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
# (the "License"); you may not use ... | 44.615385 | 90 | 0.712069 |
9e16030e74b68cce8d4a6ecef8d247e1a1ccc89d | 1,290 | py | Python | function_timer.py | blairfrandeen/checkers | a1e9927894ec546415f967af6fec95ffd071bda5 | [
"MIT"
] | null | null | null | function_timer.py | blairfrandeen/checkers | a1e9927894ec546415f967af6fec95ffd071bda5 | [
"MIT"
] | 1 | 2021-06-08T21:04:40.000Z | 2021-06-08T21:04:40.000Z | function_timer.py | blairfrandeen/checkers | a1e9927894ec546415f967af6fec95ffd071bda5 | [
"MIT"
] | null | null | null | #function_timer.py
# Report the amount of time a function, subroutine,
# or loop took to run.
# Usage Example:
#
# import time
# import function_timer as ft
#
# def some_fcn(args):
# t_start = time.time()
# #
# # < FUNCITON CODE GOES HERE>
# #
# ft.log_function('some_fcn', t_start)
# return Some... | 30 | 87 | 0.620155 |
9e163a681ee9fedee81397ccaf70094a6d97d586 | 8,045 | py | Python | scrapers/onliner_scraper.py | Levich125/minsk_apartment_rent_test_bot | d708838d5e663f470bdb8c62c574154ca63efbf3 | [
"MIT"
] | null | null | null | scrapers/onliner_scraper.py | Levich125/minsk_apartment_rent_test_bot | d708838d5e663f470bdb8c62c574154ca63efbf3 | [
"MIT"
] | null | null | null | scrapers/onliner_scraper.py | Levich125/minsk_apartment_rent_test_bot | d708838d5e663f470bdb8c62c574154ca63efbf3 | [
"MIT"
] | null | null | null | import requests
from datetime import datetime
from dateutil import parser
from dateutil.tz import tzoffset
import json
from bs4 import BeautifulSoup
from collections import OrderedDict
import re
from typing import Dict, List
from time import sleep
class OnlinerScraper:
"""Get data on flats available for rent from... | 43.486486 | 126 | 0.579242 |
9e163f1d757027f3645f92d1e02e5eb6d4dbe1a1 | 3,154 | py | Python | test/integration/test_speech_to_text_v1.py | Omegastick/python-sdk | 568db5c5afabb3d99e2cb6be1afd69b08e2191d5 | [
"Apache-2.0"
] | 1 | 2019-03-31T23:25:46.000Z | 2019-03-31T23:25:46.000Z | test/integration/test_speech_to_text_v1.py | Omegastick/python-sdk | 568db5c5afabb3d99e2cb6be1afd69b08e2191d5 | [
"Apache-2.0"
] | null | null | null | test/integration/test_speech_to_text_v1.py | Omegastick/python-sdk | 568db5c5afabb3d99e2cb6be1afd69b08e2191d5 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
from unittest import TestCase
import os
import watson_developer_cloud
import pytest
@pytest.mark.skipif(
os.getenv('VCAP_SERVICES') is None, reason='requires VCAP_SERVICES')
class TestSpeechToTextV1(TestCase):
def setUp(self):
self.speech_to_text = watson_developer_cloud.SpeechToTextV1... | 39.924051 | 109 | 0.683259 |
9e1660265a462a04aadff0bc06fca04565f1a991 | 821 | py | Python | examples/pup/sensor_ultrasonic/math.py | TheVinhLuong102/pybricks-api | 1259d5d33acb41b383445a4b1776b38084efb481 | [
"MIT"
] | 51 | 2020-04-02T10:03:45.000Z | 2022-03-27T23:49:39.000Z | examples/pup/sensor_ultrasonic/math.py | LEGO-Robotics/Pybricks-API | 1259d5d33acb41b383445a4b1776b38084efb481 | [
"MIT"
] | 77 | 2020-03-22T17:32:14.000Z | 2022-03-28T18:02:43.000Z | examples/pup/sensor_ultrasonic/math.py | LEGO-Robotics/Pybricks-API | 1259d5d33acb41b383445a4b1776b38084efb481 | [
"MIT"
] | 25 | 2020-03-18T23:35:17.000Z | 2022-01-01T12:52:01.000Z | from pybricks.pupdevices import UltrasonicSensor
from pybricks.parameters import Port
from pybricks.tools import wait, StopWatch
from umath import pi, sin
# Initialize the sensor.
eyes = UltrasonicSensor(Port.A)
# Initialize a timer.
watch = StopWatch()
# We want one full light cycle to last three seconds.
PERIOD =... | 27.366667 | 80 | 0.714982 |
9e167f8f15e6183948b2d31ebaf71cd1ce8baa10 | 1,384 | py | Python | src/dcos_e2e_cli/dcos_vagrant/commands/inspect_cluster.py | cprovencher/dcos-e2e | c54b3d41f246efe3f90dcf225b0bffdc1f615daa | [
"Apache-2.0"
] | null | null | null | src/dcos_e2e_cli/dcos_vagrant/commands/inspect_cluster.py | cprovencher/dcos-e2e | c54b3d41f246efe3f90dcf225b0bffdc1f615daa | [
"Apache-2.0"
] | null | null | null | src/dcos_e2e_cli/dcos_vagrant/commands/inspect_cluster.py | cprovencher/dcos-e2e | c54b3d41f246efe3f90dcf225b0bffdc1f615daa | [
"Apache-2.0"
] | null | null | null | """
Tools for inspecting existing clusters.
"""
import json
from typing import Any # noqa: F401
from typing import Dict # noqa: F401
import click
from dcos_e2e_cli.common.options import (
existing_cluster_id_option,
verbosity_option,
)
from dcos_e2e_cli.common.utils import check_cluster_id_exists, set_logg... | 26.113208 | 75 | 0.674855 |
9e16a2d27215c308a7007d7c61118c2acd08f329 | 527 | py | Python | common/cuchemcommon/data/generative_wf.py | dorukozturk/cheminformatics | c0fa66dd4f4e6650d7286ae2be533c66b7a2b270 | [
"Apache-2.0"
] | null | null | null | common/cuchemcommon/data/generative_wf.py | dorukozturk/cheminformatics | c0fa66dd4f4e6650d7286ae2be533c66b7a2b270 | [
"Apache-2.0"
] | null | null | null | common/cuchemcommon/data/generative_wf.py | dorukozturk/cheminformatics | c0fa66dd4f4e6650d7286ae2be533c66b7a2b270 | [
"Apache-2.0"
] | null | null | null | import logging
from typing import List
from cuchemcommon.data.helper.chembldata import ChEmblData
from cuchemcommon.utils.singleton import Singleton
from . import GenerativeWfDao
logger = logging.getLogger(__name__)
class ChemblGenerativeWfDao(GenerativeWfDao, metaclass=Singleton):
def __init__(self, fp_type)... | 26.35 | 66 | 0.772296 |
9e16eccfef954a27da7e27efdcc334f501c93756 | 18,551 | py | Python | tests/test_preprocessing/test_transformations.py | csiro-hydroinformatics/AI4Water | cdb18bd4bf298f77b381f1829045a1e790146985 | [
"MIT"
] | 12 | 2020-10-13T08:23:17.000Z | 2021-01-22T04:36:21.000Z | tests/test_preprocessing/test_transformations.py | csiro-hydroinformatics/AI4Water | cdb18bd4bf298f77b381f1829045a1e790146985 | [
"MIT"
] | 1 | 2020-10-15T02:42:52.000Z | 2020-10-15T02:51:07.000Z | tests/test_preprocessing/test_transformations.py | csiro-hydroinformatics/AI4Water | cdb18bd4bf298f77b381f1829045a1e790146985 | [
"MIT"
] | 2 | 2020-11-23T04:45:38.000Z | 2020-11-26T10:12:34.000Z | import site # so that ai4water directory is in path
import unittest
import os
import sys
ai4_dir = os.path.dirname(os.path.dirname(os.path.abspath(sys.argv[0])))
site.addsitedir(ai4_dir)
import numpy as np
import pandas as pd
from ai4water.preprocessing.transformations import Transformations
from ai4water.preproce... | 34.674766 | 168 | 0.639211 |
9e170e44531f1930438e69efae1eb6beb2abde4d | 379 | py | Python | setup.py | lkschn/WQ_tools | 15c9a290794f00dc2b10b7b261a744bb11cdb9cb | [
"MIT"
] | null | null | null | setup.py | lkschn/WQ_tools | 15c9a290794f00dc2b10b7b261a744bb11cdb9cb | [
"MIT"
] | null | null | null | setup.py | lkschn/WQ_tools | 15c9a290794f00dc2b10b7b261a744bb11cdb9cb | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from setuptools import setup
setup(
name="WQ_tools",
version="0.1.0",
packages=['WQ_tools'],
install_requires=['matplotlib>=3.0'],
zip_safe=False,
author="Lisa Schneider",
author_email="lisa.schneider@deltares.nl",
description=(
"This package provides the... | 22.294118 | 64 | 0.627968 |
9e1735ad677829abdec64f507ddff77906e9f308 | 18,642 | py | Python | pennylaneai/qml-demos/tutorial_local_cost_functions.py | hpssjellis/tfQuantumJs | 5235c682b0d2de2eaab8d52b84e295c9f4abf4e5 | [
"MIT"
] | 1 | 2021-05-11T22:13:28.000Z | 2021-05-11T22:13:28.000Z | pennylaneai/qml-demos/tutorial_local_cost_functions.py | hpssjellis/tfQuantumJs | 5235c682b0d2de2eaab8d52b84e295c9f4abf4e5 | [
"MIT"
] | null | null | null | pennylaneai/qml-demos/tutorial_local_cost_functions.py | hpssjellis/tfQuantumJs | 5235c682b0d2de2eaab8d52b84e295c9f4abf4e5 | [
"MIT"
] | 1 | 2021-05-11T22:13:34.000Z | 2021-05-11T22:13:34.000Z | """
Alleviating barren plateaus with local cost functions
=====================================================
*Author: Thomas Storwick (tstorwick@gmail.com)*
.. meta::
:property="og:description": Local cost functions are cost formulations for variational quantum circuits that are more robust to barren plateaus.
... | 35.441065 | 153 | 0.651218 |
9e1739d61497c045e586ebbb640e7300eb7a2e78 | 14,431 | py | Python | hive/server/hive_api/community.py | hidraco/hivemind | 92649f676d498b990f56879ba73f589e2057ab91 | [
"MIT"
] | 78 | 2017-03-09T15:33:08.000Z | 2022-03-30T06:01:19.000Z | hive/server/hive_api/community.py | hidraco/hivemind | 92649f676d498b990f56879ba73f589e2057ab91 | [
"MIT"
] | 193 | 2017-04-25T19:39:20.000Z | 2021-06-29T01:53:53.000Z | hive/server/hive_api/community.py | hidraco/hivemind | 92649f676d498b990f56879ba73f589e2057ab91 | [
"MIT"
] | 68 | 2017-05-07T17:31:08.000Z | 2021-08-23T01:17:00.000Z | """Hive API: Community methods"""
import logging
from datetime import datetime
from dateutil.relativedelta import relativedelta
import ujson as json
from hive.conf import Conf
from hive.server.hive_api.common import (get_account_id, get_community_id, valid_limit)
from hive.server.common.helpers import return_error_inf... | 37.002564 | 97 | 0.609729 |
9e174afd99a427db07fdb422c8897be8f297db44 | 3,955 | py | Python | configs/kinetics400/i3d_kinetics400_3d_rgb_r50_c3d_inflate3x1x1_seg1_f32s2_ntu.py | edz-o/VideoActionCues | 032ae688f5984c0faf8a184fbd982cd3dfeb7a81 | [
"Apache-2.0"
] | null | null | null | configs/kinetics400/i3d_kinetics400_3d_rgb_r50_c3d_inflate3x1x1_seg1_f32s2_ntu.py | edz-o/VideoActionCues | 032ae688f5984c0faf8a184fbd982cd3dfeb7a81 | [
"Apache-2.0"
] | null | null | null | configs/kinetics400/i3d_kinetics400_3d_rgb_r50_c3d_inflate3x1x1_seg1_f32s2_ntu.py | edz-o/VideoActionCues | 032ae688f5984c0faf8a184fbd982cd3dfeb7a81 | [
"Apache-2.0"
] | 1 | 2020-07-22T18:11:54.000Z | 2020-07-22T18:11:54.000Z | # model settings
model = dict(
type='TSN3D',
backbone=dict(
type='ResNet_I3D',
pretrained='modelzoo://resnet50',
depth=50,
num_stages=4,
out_indices=[3],
frozen_stages=-1,
inflate_freq=((1,1,1), (1,0,1,0), (1,0,1,0,1,0), (0,1,0)),
inflate_style='3x... | 27.657343 | 91 | 0.618458 |
9e176719a079c2890324d4ca574e500640baba08 | 437 | py | Python | deepensemble/utils/__init__.py | pdoren/correntropy-and-ensembles-in-deep-learning | b8e39e0ea97395e9f4ef5e9b351551a89fedc885 | [
"MIT"
] | 1 | 2017-11-22T15:35:45.000Z | 2017-11-22T15:35:45.000Z | deepensemble/utils/__init__.py | pdoren/correntropy-and-ensembles-in-deep-learning | b8e39e0ea97395e9f4ef5e9b351551a89fedc885 | [
"MIT"
] | null | null | null | deepensemble/utils/__init__.py | pdoren/correntropy-and-ensembles-in-deep-learning | b8e39e0ea97395e9f4ef5e9b351551a89fedc885 | [
"MIT"
] | 1 | 2021-12-14T04:16:57.000Z | 2021-12-14T04:16:57.000Z | """ Package utils.
"""
from .serializable import *
from .logger import *
from .score_functions import *
from .cost_functions import *
from .regularizer_functions import *
from .update_functions import *
from .utils_classifiers import *
from .utils_data_bases import *
from .utils_test import *
from .utils_plot import *
... | 25.705882 | 36 | 0.782609 |
9e17736e40795385dde57492830678e286e65e7d | 3,993 | py | Python | ucscsdk/mometa/adaptor/AdaptorHostEthIfProfile.py | CiscoUcs/ucscsdk | b582df77e3cf8bc4c48347e3d67f8cffa62f78c4 | [
"Apache-2.0"
] | 9 | 2016-12-22T08:39:25.000Z | 2019-09-10T15:36:19.000Z | ucscsdk/mometa/adaptor/AdaptorHostEthIfProfile.py | CiscoUcs/ucscsdk | b582df77e3cf8bc4c48347e3d67f8cffa62f78c4 | [
"Apache-2.0"
] | 10 | 2017-01-31T06:59:56.000Z | 2021-11-09T09:14:37.000Z | ucscsdk/mometa/adaptor/AdaptorHostEthIfProfile.py | CiscoUcs/ucscsdk | b582df77e3cf8bc4c48347e3d67f8cffa62f78c4 | [
"Apache-2.0"
] | 13 | 2016-11-14T07:42:58.000Z | 2022-02-10T17:32:05.000Z | """This module contains the general information for AdaptorHostEthIfProfile ManagedObject."""
from ...ucscmo import ManagedObject
from ...ucsccoremeta import UcscVersion, MoPropertyMeta, MoMeta
from ...ucscmeta import VersionMeta
class AdaptorHostEthIfProfileConsts():
INT_ID_NONE = "none"
POLICY_OWNER_LOCAL ... | 63.380952 | 729 | 0.67994 |
9e179206efc43e2124285f0dd63479257a70878f | 1,865 | py | Python | alipay/aop/api/domain/AntProdpaasGrmcoreProgramQueryModel.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/AntProdpaasGrmcoreProgramQueryModel.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/AntProdpaasGrmcoreProgramQueryModel.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 AntProdpaasGrmcoreProgramQueryModel(object):
def __init__(self):
self._env = None
self._program_code = None
self._tenant_code = None
@property
def env(self):
... | 26.267606 | 75 | 0.582842 |
9e179c5898ecd7ea16f3a1607e67cdb6a4ecc926 | 911 | py | Python | data/transcoder_evaluation_gfg/python/LEXICOGRAPHICALLY_NEXT_STRING.py | mxl1n/CodeGen | e5101dd5c5e9c3720c70c80f78b18f13e118335a | [
"MIT"
] | 241 | 2021-07-20T08:35:20.000Z | 2022-03-31T02:39:08.000Z | data/transcoder_evaluation_gfg/python/LEXICOGRAPHICALLY_NEXT_STRING.py | mxl1n/CodeGen | e5101dd5c5e9c3720c70c80f78b18f13e118335a | [
"MIT"
] | 49 | 2021-07-22T23:18:42.000Z | 2022-03-24T09:15:26.000Z | data/transcoder_evaluation_gfg/python/LEXICOGRAPHICALLY_NEXT_STRING.py | mxl1n/CodeGen | e5101dd5c5e9c3720c70c80f78b18f13e118335a | [
"MIT"
] | 71 | 2021-07-21T05:17:52.000Z | 2022-03-29T23:49:28.000Z | # Copyright (c) 2019-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
def f_gold ( s ) :
if ( s == " " ) :
return "a"
i = len ( s ) - 1
while ( s [ i ] == 'z' and i >= 0 ) :
... | 23.358974 | 67 | 0.489572 |
9e17a0130937d9cafb8e632bd0053fb3b1dd0e6a | 11,932 | py | Python | tensorflow_probability/python/bijectors/real_nvp.py | a-arbabi/probability | dd62cf513e2ac4d93ad5ab8dfbefcdc6d70c53df | [
"Apache-2.0"
] | null | null | null | tensorflow_probability/python/bijectors/real_nvp.py | a-arbabi/probability | dd62cf513e2ac4d93ad5ab8dfbefcdc6d70c53df | [
"Apache-2.0"
] | null | null | null | tensorflow_probability/python/bijectors/real_nvp.py | a-arbabi/probability | dd62cf513e2ac4d93ad5ab8dfbefcdc6d70c53df | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The TensorFlow Probability Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 41.144828 | 81 | 0.683875 |
9e17bd93d14d43e2585002fde3479196696f23f1 | 5,960 | py | Python | pipeline/filterOutLanguages.py | jakelever/corona-ml | 8ceb22af50d7277ebf05f2fd21bbbf68c080ed76 | [
"MIT"
] | 7 | 2021-02-01T22:39:23.000Z | 2021-08-09T16:28:38.000Z | pipeline/filterOutLanguages.py | jakelever/corona-ml | 8ceb22af50d7277ebf05f2fd21bbbf68c080ed76 | [
"MIT"
] | 1 | 2021-05-17T13:14:40.000Z | 2021-05-20T10:26:09.000Z | pipeline/filterOutLanguages.py | jakelever/corona-ml | 8ceb22af50d7277ebf05f2fd21bbbf68c080ed76 | [
"MIT"
] | 1 | 2021-01-04T14:11:18.000Z | 2021-01-04T14:11:18.000Z | import argparse
from collections import Counter,defaultdict
import json
import os
import time
import sys
from nltk.corpus import stopwords
import re
from multiprocessing import Pool
filterREs = None
def prepare():
global filterREs
english = set(stopwords.words('english') + ['se','sera','et'])
supported_languages... | 35.266272 | 247 | 0.700839 |
9e17ce4627e17177613e504bae798ad4933f2b54 | 10,970 | py | Python | tests/eth2/beacon/state_machines/forks/test_serenity_epoch_processing.py | nrryuya/trinity | 7436d9c3fdef5fbeef5d7a1123c8ed2ecd16e033 | [
"MIT"
] | null | null | null | tests/eth2/beacon/state_machines/forks/test_serenity_epoch_processing.py | nrryuya/trinity | 7436d9c3fdef5fbeef5d7a1123c8ed2ecd16e033 | [
"MIT"
] | null | null | null | tests/eth2/beacon/state_machines/forks/test_serenity_epoch_processing.py | nrryuya/trinity | 7436d9c3fdef5fbeef5d7a1123c8ed2ecd16e033 | [
"MIT"
] | null | null | null | import pytest
from eth._utils.numeric import (
int_to_bytes32,
)
from eth.constants import (
ZERO_HASH32,
)
from eth2._utils.tuple import (
update_tuple_item,
)
from eth2.beacon._utils.hash import (
hash_eth2,
)
from eth2.beacon.helpers import (
get_active_validator_indices,
get_current_epoch_... | 34.936306 | 173 | 0.611851 |
9e17d2d0f7be08bd8da4534de4f0ff8affcfe5ed | 3,044 | py | Python | adaptivefiltering/lastools.py | readthedocs-assistant/adaptivefiltering | 4c2a2a116869f7a931befb9aa9a5b658aed3e497 | [
"MIT"
] | 2 | 2022-02-11T08:31:11.000Z | 2022-03-21T10:19:16.000Z | adaptivefiltering/lastools.py | readthedocs-assistant/adaptivefiltering | 4c2a2a116869f7a931befb9aa9a5b658aed3e497 | [
"MIT"
] | 187 | 2021-06-21T19:46:15.000Z | 2022-03-21T12:14:47.000Z | adaptivefiltering/lastools.py | readthedocs-assistant/adaptivefiltering | 4c2a2a116869f7a931befb9aa9a5b658aed3e497 | [
"MIT"
] | 3 | 2022-01-19T20:06:57.000Z | 2022-03-21T09:27:17.000Z | from adaptivefiltering.dataset import DataSet
from adaptivefiltering.filter import Filter
from adaptivefiltering.paths import get_temporary_filename, load_schema
from adaptivefiltering.utils import stringify_value
import os
import platform
import shutil
import subprocess
# The module wide storage for the lasground p... | 30.747475 | 82 | 0.665243 |
9e17eca0c5abce0b825acb2db30a12330708cc11 | 239 | py | Python | sysadmin/dot-files/jupyter/jupyter_notebook_config.py | feup-infolab/army-ant | 7b33120d5160f73d7a41a05e6336489c917fb75c | [
"BSD-3-Clause"
] | 5 | 2018-01-18T14:11:52.000Z | 2020-10-23T16:02:25.000Z | sysadmin/dot-files/jupyter/jupyter_notebook_config.py | feup-infolab/army-ant | 7b33120d5160f73d7a41a05e6336489c917fb75c | [
"BSD-3-Clause"
] | 10 | 2018-02-02T20:19:36.000Z | 2020-10-05T08:46:36.000Z | sysadmin/dot-files/jupyter/jupyter_notebook_config.py | feup-infolab/army-ant | 7b33120d5160f73d7a41a05e6336489c917fb75c | [
"BSD-3-Clause"
] | null | null | null | c.NotebookApp.base_url = '/jupyter'
c.NotebookApp.port = 8888
c.NotebookApp.open_browser = False
c.NotebookApp.port_retries = 50
c.NotebookApp.trust_xheaders = True
c.NotebookApp.allow_origin = '*'
c.NotebookApp.allow_remote_access = True
| 29.875 | 40 | 0.799163 |
9e17fa4015a7566899f6b97070c7302df5fd10d7 | 14,848 | py | Python | Tools/resultsdbpy/resultsdbpy/model/configuration_context.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 6 | 2021-07-05T16:09:39.000Z | 2022-03-06T22:44:42.000Z | Tools/resultsdbpy/resultsdbpy/model/configuration_context.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 7 | 2022-03-15T13:25:39.000Z | 2022-03-15T13:25:44.000Z | Tools/resultsdbpy/resultsdbpy/model/configuration_context.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | null | null | null | # Copyright (C) 2019 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | 49.658863 | 144 | 0.670865 |
9e17fece202a34676c39472a1c46eb073506f1c1 | 2,301 | py | Python | instana/instrumentation/wsgi.py | rlopes-ki/python-sensor | 07e827f9982b2a0c482e8eab82d1a420923efd5e | [
"MIT"
] | 61 | 2017-09-27T02:50:17.000Z | 2022-03-22T12:13:37.000Z | instana/instrumentation/wsgi.py | rlopes-ki/python-sensor | 07e827f9982b2a0c482e8eab82d1a420923efd5e | [
"MIT"
] | 82 | 2017-07-11T13:47:33.000Z | 2022-03-22T10:10:38.000Z | instana/instrumentation/wsgi.py | rlopes-ki/python-sensor | 07e827f9982b2a0c482e8eab82d1a420923efd5e | [
"MIT"
] | 27 | 2017-09-11T16:22:32.000Z | 2022-03-11T17:21:49.000Z | # (c) Copyright IBM Corp. 2021
# (c) Copyright Instana Inc. 2020
"""
Instana WSGI Middleware
"""
import opentracing as ot
import opentracing.ext.tags as tags
from ..singletons import agent, tracer
from ..util.secrets import strip_secrets_from_query
class InstanaWSGIMiddleware(object):
""" Instana WSGI middlewar... | 38.35 | 106 | 0.627553 |
9e184a876250f7eb45e73db366764ea39fa6f70d | 8,943 | py | Python | salt/modules/extfs.py | epoelke/salt | 80ae64e54f9f336d3cdb6e03e42f2a50469ec8f2 | [
"Apache-2.0"
] | 1 | 2016-12-20T20:11:21.000Z | 2016-12-20T20:11:21.000Z | salt/modules/extfs.py | epoelke/salt | 80ae64e54f9f336d3cdb6e03e42f2a50469ec8f2 | [
"Apache-2.0"
] | null | null | null | salt/modules/extfs.py | epoelke/salt | 80ae64e54f9f336d3cdb6e03e42f2a50469ec8f2 | [
"Apache-2.0"
] | null | null | null | '''
Module for managing ext2/3/4 file systems
'''
# 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 'extfs'
def mkfs(devi... | 32.169065 | 85 | 0.522196 |
9e185ec9acf344d2177fd170e3f3a296ab6f1431 | 40 | py | Python | python/domain/bir2012/__init__.py | ICTU/document-as-code | e65fddb94513e7c2f54f248b4ce69e9e10ce42f5 | [
"Apache-2.0"
] | 2 | 2021-01-09T17:00:51.000Z | 2021-02-19T09:35:26.000Z | python/domain/bir2012/__init__.py | ICTU/document-as-code | e65fddb94513e7c2f54f248b4ce69e9e10ce42f5 | [
"Apache-2.0"
] | null | null | null | python/domain/bir2012/__init__.py | ICTU/document-as-code | e65fddb94513e7c2f54f248b4ce69e9e10ce42f5 | [
"Apache-2.0"
] | 1 | 2020-02-24T15:50:05.000Z | 2020-02-24T15:50:05.000Z | from .content.bir import BIR as BIR2012
| 20 | 39 | 0.8 |
9e18678e6ea25a73a2c3a64b8d0b5899a6aa3302 | 23 | py | Python | btd6_memory_info/generated/NinjaKiwi/CustomAnimation/CubicBezier/cubic_bezier.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/NinjaKiwi/CustomAnimation/CubicBezier/cubic_bezier.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/NinjaKiwi/CustomAnimation/CubicBezier/cubic_bezier.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | class CubicBezier: pass | 23 | 23 | 0.869565 |
9e18a60304aefc8e104856071b5c72048931beac | 496 | py | Python | packages/galapagos/scripts/run_tunnel.py | 100kimch/ros_galapagos | 8f92cb93246c263b61199aef113e43cefc5f3939 | [
"MIT"
] | 2 | 2020-10-26T05:01:35.000Z | 2022-02-14T10:37:17.000Z | packages/galapagos/scripts/run_tunnel.py | 100kimch/ros_galapagos | 8f92cb93246c263b61199aef113e43cefc5f3939 | [
"MIT"
] | null | null | null | packages/galapagos/scripts/run_tunnel.py | 100kimch/ros_galapagos | 8f92cb93246c263b61199aef113e43cefc5f3939 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import rospy
from sensor_msgs.msg import CompressedImage, LaserScan
import processor
from constants import PATH_RASPICAM, PATH_USBCAM, PATH_LIDAR, SELECTED_STATE, IS_DEBUG_MODE
from turtlebot import TURTLE
IS_DEBUG_MODE = True
SELECTED_STATE = 'tunnel'
# TURTLE.disable()
TURTLE.enable_fish = F... | 31 | 91 | 0.830645 |
9e18d5eeee1a6b5a86988e5eacc4ccac09cfaa2b | 16,495 | py | Python | espnet/nets/pytorch_backend/e2e_asr_transducer.py | protoget/espnet | 06eefa20849e21e31b1bad3db22033171691a3f4 | [
"Apache-2.0"
] | 4 | 2020-10-28T00:34:21.000Z | 2021-08-02T05:43:59.000Z | espnet/nets/pytorch_backend/e2e_asr_transducer.py | JaejinCho/espnet_spkidtts | a52bdebb08558b63df23564d6e67dfcba8a41d78 | [
"Apache-2.0"
] | null | null | null | espnet/nets/pytorch_backend/e2e_asr_transducer.py | JaejinCho/espnet_spkidtts | a52bdebb08558b63df23564d6e67dfcba8a41d78 | [
"Apache-2.0"
] | 1 | 2021-12-25T06:39:16.000Z | 2021-12-25T06:39:16.000Z | #!/usr/bin/env python3
import argparse
import logging
import math
import editdistance
import chainer
import numpy as np
import six
import torch
from chainer import reporter
from espnet.nets.asr_interface import ASRInterface
from espnet.nets.pytorch_backend.rnn.attentions import att_for
from espnet.nets.pytorch_bac... | 39.180523 | 119 | 0.561564 |
9e190ff686eae39cb6361ab7b7886d470741ca6f | 11,877 | py | Python | angrmanagement/plugins/trace_viewer/qtrace_viewer.py | mephi42/angr-management | be2ae29279f75b8c057fbad5af0d80d468852059 | [
"BSD-2-Clause"
] | null | null | null | angrmanagement/plugins/trace_viewer/qtrace_viewer.py | mephi42/angr-management | be2ae29279f75b8c057fbad5af0d80d468852059 | [
"BSD-2-Clause"
] | null | null | null | angrmanagement/plugins/trace_viewer/qtrace_viewer.py | mephi42/angr-management | be2ae29279f75b8c057fbad5af0d80d468852059 | [
"BSD-2-Clause"
] | null | null | null | from PySide2.QtWidgets import QWidget, QHBoxLayout, QGraphicsScene, QGraphicsView, QGraphicsItemGroup
from PySide2.QtGui import QPen, QBrush, QLinearGradient, QColor, QPainter, QImage, QFont
from PySide2.QtCore import Qt, QPoint, QEvent
import logging
l = logging.getLogger(name=__name__)
class QTraceViewer(QWidget):
... | 39.722408 | 116 | 0.61396 |
9e19140d5eb864288e7ec43dc03a47ea4e6e17c3 | 19,355 | py | Python | augly/tests/text_tests/functional_unit_test.py | Adib234/AugLy | 35a6a5de07e64f465b8979e3257218551929e57a | [
"MIT"
] | null | null | null | augly/tests/text_tests/functional_unit_test.py | Adib234/AugLy | 35a6a5de07e64f465b8979e3257218551929e57a | [
"MIT"
] | null | null | null | augly/tests/text_tests/functional_unit_test.py | Adib234/AugLy | 35a6a5de07e64f465b8979e3257218551929e57a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# @lint-ignore-every UTF8
import random
import unittest
import augly.text as txtaugs
from augly.utils import FUN_FONTS_GREEK_PATH
class FunctionalTextUnitTest(unittest.TestCase):
def test_import(self) -> None:
try:
fro... | 40.239085 | 151 | 0.557789 |
9e193336da9b6afd452710351172991590d2d5f0 | 6,227 | py | Python | mGui/core/menus.py | theodox/mGui | d2cd8c48ae1d51c9587b0aaab5b1d296a0561625 | [
"MIT"
] | 105 | 2015-01-13T10:52:55.000Z | 2022-03-23T12:49:01.000Z | mGui/core/menus.py | techartorg/mGui | d2cd8c48ae1d51c9587b0aaab5b1d296a0561625 | [
"MIT"
] | 84 | 2015-01-15T14:56:08.000Z | 2019-04-15T17:03:51.000Z | mGui/core/menus.py | techartorg/mGui | d2cd8c48ae1d51c9587b0aaab5b1d296a0561625 | [
"MIT"
] | 22 | 2015-01-11T11:25:37.000Z | 2021-12-24T06:34:46.000Z | """
mGui.menus
Wrapper classes for Menus and MenuItems
"""
from mGui.core import Nested, Control, cmds, inspect
class Menu(Nested):
CMD = cmds.menu
_ATTRIBS = ['allowOptionBoxes', 'deleteAllItems', 'defineTemplate', 'docTag', 'enable', 'enableBackground',
'exists', 'familyImage', 'helpMenu',... | 36.415205 | 119 | 0.643809 |
9e193d71077db8140a3498c3d905138178edc4fc | 7,551 | py | Python | alipay/aop/api/domain/RoyaltyDetailInfo.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/RoyaltyDetailInfo.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/RoyaltyDetailInfo.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 *
from alipay.aop.api.domain.SubMerchant import SubMerchant
from alipay.aop.api.domain.SubMerchant import SubMerchant
class RoyaltyDetailInfo(object):
def __init__(self):
self._amount = None
... | 37.944724 | 99 | 0.661502 |
9e19494fc72567f84a597c0d2908cf36cf343903 | 337 | py | Python | test_data/unknown/consolidate.py | matgille/boudams | d253ff2ee124e13186b5782ebb3c2d9b4bedd942 | [
"MIT"
] | 5 | 2019-10-12T22:12:42.000Z | 2022-02-17T14:59:02.000Z | test_data/unknown/consolidate.py | matgille/boudams | d253ff2ee124e13186b5782ebb3c2d9b4bedd942 | [
"MIT"
] | 10 | 2019-06-08T09:31:19.000Z | 2021-05-16T09:27:14.000Z | test_data/unknown/consolidate.py | matgille/boudams | d253ff2ee124e13186b5782ebb3c2d9b4bedd942 | [
"MIT"
] | 2 | 2020-01-10T09:46:09.000Z | 2021-02-26T17:04:36.000Z | import glob
import os
here = os.path.join(os.path.dirname(__file__))
with open(os.path.join(here, "..", "..", "datasets", "fro", "unknown.tsv"), "w") as output:
for file in glob.glob(os.path.join(here, "gt", "*.txt")):
with open(file) as input:
for line in input.readlines():
ou... | 30.636364 | 91 | 0.587537 |
9e198a35d2e6b686829c5ae32aead7e3a1d75324 | 925 | py | Python | django_productline/wsgi.py | henzk/django-productline | 24ff156924c1a8c07b99cbb8a1de0a42b8d81f60 | [
"MIT"
] | 5 | 2015-06-16T17:36:33.000Z | 2017-10-17T19:22:59.000Z | django_productline/wsgi.py | henzk/django-productline | 24ff156924c1a8c07b99cbb8a1de0a42b8d81f60 | [
"MIT"
] | 8 | 2016-03-14T09:02:13.000Z | 2017-11-16T16:00:31.000Z | django_productline/wsgi.py | henzk/django-productline | 24ff156924c1a8c07b99cbb8a1de0a42b8d81f60 | [
"MIT"
] | 17 | 2015-08-04T18:45:18.000Z | 2017-11-16T14:52:46.000Z | from __future__ import unicode_literals
"""
WSGI config for featuredjango project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover... | 42.045455 | 79 | 0.819459 |
9e198b7135e16c589ceca6357fb5488c16a04489 | 2,397 | py | Python | venv/Lib/site-packages/pyrogram/raw/types/update_read_channel_outbox.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 2 | 2021-12-13T07:09:55.000Z | 2022-01-12T12:15:20.000Z | venv/Lib/site-packages/pyrogram/raw/types/update_read_channel_outbox.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/types/update_read_channel_outbox.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... | 31.96 | 103 | 0.620776 |
9e199d779783371434751a51f11c13f284b1b5a7 | 1,222 | py | Python | nova/cmd/cert.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | 5 | 2016-04-28T16:20:38.000Z | 2021-04-25T11:19:03.000Z | nova/cmd/cert.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | null | null | null | nova/cmd/cert.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | 5 | 2020-04-08T20:24:45.000Z | 2020-10-05T19:02:13.000Z | # 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 ... | 28.418605 | 78 | 0.742226 |
9e19b1f22e950072af08f25aa4cd738b1561f1be | 6,251 | py | Python | hdltools/abshdl/interface.py | brunosmmm/hdltools | a98ca8c4d168740fa229c939a7b1f31ea73eec24 | [
"MIT"
] | 2 | 2020-02-28T13:02:39.000Z | 2021-06-30T09:15:35.000Z | hdltools/abshdl/interface.py | brunosmmm/hdltools | a98ca8c4d168740fa229c939a7b1f31ea73eec24 | [
"MIT"
] | 1 | 2020-03-22T17:32:45.000Z | 2020-03-23T15:43:39.000Z | hdltools/abshdl/interface.py | brunosmmm/hdltools | a98ca8c4d168740fa229c939a7b1f31ea73eec24 | [
"MIT"
] | null | null | null | """Interfaces."""
from hdltools.abshdl import HDLObject
from hdltools.abshdl.port import HDLModulePort
from typing import Dict, Union
import re
import copy
EXPRESSION_REGEX = re.compile(r"[\+\-\*\/\(\)]+")
class HDLModuleInterfaceError(Exception):
"""Interface description error."""
class HDLModuleInterface(H... | 33.427807 | 80 | 0.513518 |
9e19b3dc472f58f3494b2a3a55fb8e812c4d13ee | 2,082 | py | Python | tl/unittests/test_clean.py | mtang724/table-linker | 67201fa3c35df244750892155239cafe4085e15a | [
"MIT"
] | 21 | 2020-05-22T07:12:37.000Z | 2022-03-22T20:21:02.000Z | tl/unittests/test_clean.py | mtang724/table-linker | 67201fa3c35df244750892155239cafe4085e15a | [
"MIT"
] | 24 | 2020-04-15T00:08:49.000Z | 2021-11-13T05:46:11.000Z | tl/unittests/test_clean.py | mtang724/table-linker | 67201fa3c35df244750892155239cafe4085e15a | [
"MIT"
] | 11 | 2020-07-12T14:50:27.000Z | 2022-02-17T07:39:06.000Z | import unittest
import pandas as pd
from pathlib import Path
from tl.preprocess import preprocess
from tl.file_formats_validator import FFV
parent_path = Path(__file__).parent
class TestClean(unittest.TestCase):
def __init__(self, *args, **kwargs):
super(TestClean, self).__init__(*args, **kwargs)
... | 46.266667 | 112 | 0.6878 |
9e19cf9294d6b475321b7fbbc5e5be602e775280 | 2,861 | py | Python | outputs/plot_data.py | joaovitorblabres/sumo-rl | ec9d178cd0289366ba0a8648da52972d31d1026e | [
"MIT"
] | null | null | null | outputs/plot_data.py | joaovitorblabres/sumo-rl | ec9d178cd0289366ba0a8648da52972d31d1026e | [
"MIT"
] | null | null | null | outputs/plot_data.py | joaovitorblabres/sumo-rl | ec9d178cd0289366ba0a8648da52972d31d1026e | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import json
import os
import argparse
import pandas as pd
import ast
class Plot_Graph:
def __init__(self):
# get the folder containing the data files
prs = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter,
... | 31.097826 | 143 | 0.562041 |
9e1a43da74a32686c5976ba7b7bf188e6a8bf693 | 13,545 | py | Python | SoftLayer/fixtures/SoftLayer_Account.py | briancline/softlayer-python | 679fb62ba2db095f0177f9d9488ff4a80c3b7387 | [
"MIT"
] | null | null | null | SoftLayer/fixtures/SoftLayer_Account.py | briancline/softlayer-python | 679fb62ba2db095f0177f9d9488ff4a80c3b7387 | [
"MIT"
] | null | null | null | SoftLayer/fixtures/SoftLayer_Account.py | briancline/softlayer-python | 679fb62ba2db095f0177f9d9488ff4a80c3b7387 | [
"MIT"
] | null | null | null | getPrivateBlockDeviceTemplateGroups = [{
'accountId': 1234,
'blockDevices': [],
'createDate': '2013-12-05T21:53:03-06:00',
'globalIdentifier': 'E6DBD73B-1651-4B28-BCBA-A11DF7C9D79E',
'id': 200,
'name': 'test_image',
'parentId': ''
}, {
'accountId': 1234,
'blockDevices': [],
'crea... | 27.253521 | 77 | 0.501883 |
9e1a4ea2ab755efb697f0208660bf1b2f946d8fa | 1,029 | py | Python | _CNDB/_OMP/__init__.py | CNDB/CNDB | 2e3a41111f604cf2f4f22a7c9370bb3f753e3e88 | [
"BSD-3-Clause"
] | null | null | null | _CNDB/_OMP/__init__.py | CNDB/CNDB | 2e3a41111f604cf2f4f22a7c9370bb3f753e3e88 | [
"BSD-3-Clause"
] | null | null | null | _CNDB/_OMP/__init__.py | CNDB/CNDB | 2e3a41111f604cf2f4f22a7c9370bb3f753e3e88 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (C) 2012-2014 Mag. Christian Tanzer All rights reserved
# Glasauergasse 32, A--1130 Wien, Austria. tanzer@swing.co.at
# #*** <License> ************************************************************#
# This module is licensed under the terms of the BSD 3-Clause License
# <http://www.c-t... | 29.4 | 85 | 0.600583 |
9e1a61dcb218293951c30a12063d219aecc3ef70 | 4,478 | py | Python | Python_files/create_path-link_incidence_matrix_Sioux.py | jingzbu/InverseVITraffic | c0d33d91bdd3c014147d58866c1a2b99fb8a9608 | [
"MIT"
] | null | null | null | Python_files/create_path-link_incidence_matrix_Sioux.py | jingzbu/InverseVITraffic | c0d33d91bdd3c014147d58866c1a2b99fb8a9608 | [
"MIT"
] | null | null | null | Python_files/create_path-link_incidence_matrix_Sioux.py | jingzbu/InverseVITraffic | c0d33d91bdd3c014147d58866c1a2b99fb8a9608 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
__author__ = "Jing Zhang"
__email__ = "jingzbu@gmail.com"
__status__ = "Development"
from util import *
import numpy as np
from math import exp
import json
link_label_dict = zload('../temp_files/link_label_dict_Sioux-Falls_network.pkz')
link_label_dict_ = zload('../temp_files/link_label_dic... | 29.267974 | 89 | 0.640018 |
9e1a7978809029d1986edffeee0d063f1294355d | 2,537 | py | Python | solr/query_solr.py | zoranmedic/LCR-design | b722e4e9d00e8aaae36dd51ddc8131477ee805fd | [
"MIT"
] | null | null | null | solr/query_solr.py | zoranmedic/LCR-design | b722e4e9d00e8aaae36dd51ddc8131477ee805fd | [
"MIT"
] | null | null | null | solr/query_solr.py | zoranmedic/LCR-design | b722e4e9d00e8aaae36dd51ddc8131477ee805fd | [
"MIT"
] | null | null | null |
import argparse
import json
import pysolr
import re
import sys
from utils import mrr, recall, ndcg
def main(args):
papers = json.load(open(args.papers_path))
contexts = json.load(open(args.contexts_path))
cids = set([i['context_id'] for i in json.load(open(args.pairs_path))])
exclude_cids = set(jso... | 31.7125 | 116 | 0.567205 |
9e1ac2be7e9a64ffc34e0acdeac35a8ad3346f12 | 670 | py | Python | wdwapp/initialize_db.py | fkieber/wdwapp | ff0ee37a5ec0c686e2e2beedbb80d7787385f3fd | [
"MIT"
] | null | null | null | wdwapp/initialize_db.py | fkieber/wdwapp | ff0ee37a5ec0c686e2e2beedbb80d7787385f3fd | [
"MIT"
] | null | null | null | wdwapp/initialize_db.py | fkieber/wdwapp | ff0ee37a5ec0c686e2e2beedbb80d7787385f3fd | [
"MIT"
] | null | null | null | import os
import sys
import transaction
from sqlalchemy import engine_from_config
from pyramid.paster import (
get_appsettings,
setup_logging,
)
from .models import (
DBSession,
Base,
)
def usage(argv):
cmd = os.path.basename(argv[0])
print('usage: %s <config_uri>\n'
'(example: "%... | 19.705882 | 57 | 0.671642 |
9e1ad04c3640a83917f2b728b99391d847c91280 | 1,315 | py | Python | alipay/aop/api/domain/DeviceSyncPayload.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/DeviceSyncPayload.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/DeviceSyncPayload.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 DeviceSyncPayload(object):
def __init__(self):
self._action = None
self._device_id = None
@property
def action(self):
return self._action
@action.setter
... | 23.482143 | 69 | 0.56654 |
9e1ad1822c197d1888d45ff1f8bbfffd29de0d28 | 432 | py | Python | prueba_tess.py | selfyu/License-Plates-Recognition | bbbe8ada6761828aafa8d135b462e4971b07c513 | [
"MIT"
] | null | null | null | prueba_tess.py | selfyu/License-Plates-Recognition | bbbe8ada6761828aafa8d135b462e4971b07c513 | [
"MIT"
] | null | null | null | prueba_tess.py | selfyu/License-Plates-Recognition | bbbe8ada6761828aafa8d135b462e4971b07c513 | [
"MIT"
] | 1 | 2020-09-02T16:06:35.000Z | 2020-09-02T16:06:35.000Z | from tesserocr import PyTessBaseAPI, PSM, OEM
import tesserocr
from PIL import Image
import cv2
import pytesseract
img_path = 'images/plate.jpg'
img_orig = Image.open(img_path)
print(pytesseract.image_to_string(img_path, config = "-l eng"))
print(tesserocr.image_to_text(img_orig))
# with PyTessBaseAPI(... | 25.411765 | 66 | 0.743056 |
9e1afb2bb199fdde60279aed58d190677548ea31 | 872 | py | Python | annomathtex/annomathtex/models/annotation.py | philsMINT/AnnotaTeX | cf893ccf31bd8ee78e15c4dd7a21d05c8c0663a7 | [
"Apache-2.0"
] | 3 | 2021-04-14T13:31:12.000Z | 2022-02-13T00:33:37.000Z | annomathtex/annomathtex/models/annotation.py | philsMINT/AnnotaTeX | cf893ccf31bd8ee78e15c4dd7a21d05c8c0663a7 | [
"Apache-2.0"
] | 10 | 2019-07-26T08:10:07.000Z | 2021-06-10T17:53:43.000Z | annomathtex/annomathtex/models/annotation.py | philsMINT/AnnoMathTeX | cf893ccf31bd8ee78e15c4dd7a21d05c8c0663a7 | [
"Apache-2.0"
] | 2 | 2020-02-21T10:35:31.000Z | 2020-05-27T06:13:35.000Z | # Not used at the moment, because annotations aren't stored in a DB.
# Instead they are written to a json file, and the evaluations are written to a csv file.
from django.db import models
class AnnotationForm(models.Model):
"""
The annotations that a user makes are stored as AnnotationForm objects.
"""
... | 29.066667 | 89 | 0.686927 |
9e1b0acfa09cadd095555e9375a9675aeab58aa3 | 4,687 | py | Python | aries-cloudagent-python/aries_cloudagent/vc/ld_proofs/validation_result.py | sed-szeged/IndyPerf | 68bb48c7c651cae113cf30696110825ff3267ccc | [
"CC0-1.0"
] | null | null | null | aries-cloudagent-python/aries_cloudagent/vc/ld_proofs/validation_result.py | sed-szeged/IndyPerf | 68bb48c7c651cae113cf30696110825ff3267ccc | [
"CC0-1.0"
] | null | null | null | aries-cloudagent-python/aries_cloudagent/vc/ld_proofs/validation_result.py | sed-szeged/IndyPerf | 68bb48c7c651cae113cf30696110825ff3267ccc | [
"CC0-1.0"
] | 1 | 2022-02-02T17:05:27.000Z | 2022-02-02T17:05:27.000Z | """Proof verification and validation result_4 classes."""
from typing import List
class PurposeResult:
"""Proof purpose result_4 class."""
def __init__(
self, *, valid: bool, error: Exception = None, controller: dict = None
) -> None:
"""Create new PurposeResult instance."""
self... | 31.884354 | 78 | 0.49776 |
9e1b15fa5702dd49ec2628ad893e8139364bb72b | 1,971 | py | Python | app.py | m3ngineer/kema-ai | e494b9380b285fdaa744a44aa2b21390c3eac417 | [
"MIT"
] | null | null | null | app.py | m3ngineer/kema-ai | e494b9380b285fdaa744a44aa2b21390c3eac417 | [
"MIT"
] | null | null | null | app.py | m3ngineer/kema-ai | e494b9380b285fdaa744a44aa2b21390c3eac417 | [
"MIT"
] | null | null | null | from flask import Flask, request, redirect
from twilio.twiml.messaging_response import MessagingResponse
from datetime import datetime
import requests
from schedule import parse_datetime
import db
app = Flask(__name__)
@app.route("/sms", methods=['GET', 'POST'])
def sms_reply():
# Print response
message_bo... | 29.863636 | 77 | 0.619482 |
9e1b16f579478c1febc5c122dcf6f38a40dff635 | 33,500 | py | Python | dracoon/shares.py | Quirinwierer/dracoon-python-api | 7fad8cdb95069fb80069e76c740547f3ad02b910 | [
"Apache-2.0"
] | 3 | 2020-10-05T14:34:46.000Z | 2020-11-27T07:44:57.000Z | dracoon/shares.py | Quirinwierer/dracoon-python-api | 7fad8cdb95069fb80069e76c740547f3ad02b910 | [
"Apache-2.0"
] | 1 | 2022-02-15T16:01:12.000Z | 2022-02-15T16:01:12.000Z | dracoon/shares.py | Quirinwierer/dracoon-python-api | 7fad8cdb95069fb80069e76c740547f3ad02b910 | [
"Apache-2.0"
] | 1 | 2021-03-04T08:16:07.000Z | 2021-03-04T08:16:07.000Z | """
Async DRACOON shares adapter based on httpx and pydantic
V1.0.0
(c) Octavio Simone, November 2021
Documentation: https://dracoon.team/api/swagger-ui/index.html?configUrl=/api/spec_v4/swagger-config#/shares
"""
from typing import List
import httpx
import logging
from pydantic import validate_arguments
from .cor... | 40.704739 | 188 | 0.655164 |
9e1b3b8259dba0a35618d69d89398327556eb355 | 1,114 | py | Python | tests/continuous_integration/test_main.py | Lufedi/reaper | bdf56b499e5b704c27b9f6c053d798c2a10fa4cf | [
"Apache-2.0"
] | 106 | 2015-07-21T16:18:26.000Z | 2022-03-31T06:45:34.000Z | tests/continuous_integration/test_main.py | Kowndinya2000/enhanced_repo_reaper | 744f794ba53bde5667b3b0f99b07273d0e32a495 | [
"Apache-2.0"
] | 21 | 2015-07-11T03:48:28.000Z | 2022-01-18T12:57:30.000Z | tests/continuous_integration/test_main.py | Kowndinya2000/enhanced_repo_reaper | 744f794ba53bde5667b3b0f99b07273d0e32a495 | [
"Apache-2.0"
] | 26 | 2015-07-22T22:38:21.000Z | 2022-03-14T10:11:56.000Z | import os
import unittest
from attributes.continuous_integration import main
from tests import REPOS_PATH
class MainTestCase(unittest.TestCase):
@unittest.skipIf(not os.path.exists(REPOS_PATH), 'setup.sh not run.')
def test_main(self):
# Test: Project with Travis CI
(result, value) = main.run... | 29.315789 | 73 | 0.604129 |
9e1b5a1575e05ffd2dc0a9f8af7f595c5b2b2e8a | 9,149 | py | Python | src/sentry/runner/settings.py | NetEaseGame/Sentry | b2804c3e4b7fea61294e12d9b608b5fbdeeac5a3 | [
"BSD-3-Clause"
] | 20 | 2016-10-01T04:29:24.000Z | 2020-10-09T07:23:34.000Z | src/sentry/runner/settings.py | NetEaseGame/Sentry | b2804c3e4b7fea61294e12d9b608b5fbdeeac5a3 | [
"BSD-3-Clause"
] | null | null | null | src/sentry/runner/settings.py | NetEaseGame/Sentry | b2804c3e4b7fea61294e12d9b608b5fbdeeac5a3 | [
"BSD-3-Clause"
] | 7 | 2016-10-27T05:12:45.000Z | 2021-05-01T14:29:53.000Z | """
sentry.runner.settings
~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2015 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import, print_function
import os
import click
DEFAULT_SETTINGS_MODULE = 'sentry.conf.server'
DEFAULT_SETTINGS_CONF... | 28.237654 | 122 | 0.674937 |
9e1b61512f44bab315675a024994a637eb692f6c | 3,285 | py | Python | samplers.py | Thien223/Multilanguage_Tacotron_2 | ee93c23117b317e5f7bda95aea45bf3095893c0a | [
"BSD-3-Clause"
] | 2 | 2021-05-06T12:34:11.000Z | 2021-05-10T02:26:27.000Z | samplers.py | Thien223/Multilanguage_Tacotron_2 | ee93c23117b317e5f7bda95aea45bf3095893c0a | [
"BSD-3-Clause"
] | null | null | null | samplers.py | Thien223/Multilanguage_Tacotron_2 | ee93c23117b317e5f7bda95aea45bf3095893c0a | [
"BSD-3-Clause"
] | 2 | 2020-11-27T00:55:15.000Z | 2021-09-20T17:08:11.000Z | # import torch
# from torch.utils.data.sampler import Sampler, SubsetRandomSampler
#
#
# class PerfectBatchSampler(Sampler):
# """Samples a mini-batch of indices for the grouped ConvolutionalEncoder.
#
# For L samples languages and batch size B produces a mini-batch with
# samples of a particular la... | 43.8 | 129 | 0.559513 |
9e1b814b26aad74161c8897e36d00affd3c134cf | 2,323 | py | Python | build/lib/src/core_types.py | devjeetr/pytrace | 2d45d7edea484076d6319a68bef3cff250de035c | [
"MIT"
] | null | null | null | build/lib/src/core_types.py | devjeetr/pytrace | 2d45d7edea484076d6319a68bef3cff250de035c | [
"MIT"
] | null | null | null | build/lib/src/core_types.py | devjeetr/pytrace | 2d45d7edea484076d6319a68bef3cff250de035c | [
"MIT"
] | null | null | null | from dataclasses import dataclass
from typing import Dict, List, Literal, Mapping, Optional, Tuple, NamedTuple
import pandas as pd
@dataclass(frozen=True, eq=True, order=True)
class Point:
line: int
col: int
def __repr__(self):
return f"(l={self.line},c={self.col})"
@dataclass(frozen=True, repr... | 21.118182 | 83 | 0.628067 |
9e1ba518b614406601fbdc5a3d753edb45f572c8 | 1,457 | py | Python | mps_database/runtime/threshold_alt5.py | slaclab/mps_database | 023ed9bb3b333e382cc612f816c3f4b295b66a4c | [
"BSD-3-Clause-LBNL"
] | null | null | null | mps_database/runtime/threshold_alt5.py | slaclab/mps_database | 023ed9bb3b333e382cc612f816c3f4b295b66a4c | [
"BSD-3-Clause-LBNL"
] | 1 | 2017-07-07T21:31:59.000Z | 2017-07-07T21:31:59.000Z | mps_database/runtime/threshold_alt5.py | slaclab/mps_database | 023ed9bb3b333e382cc612f816c3f4b295b66a4c | [
"BSD-3-Clause-LBNL"
] | 4 | 2017-07-07T20:10:54.000Z | 2020-12-13T00:03:37.000Z | from sqlalchemy import Column, Integer, String, ForeignKey, Float, Boolean
from sqlalchemy.orm import relationship, backref
from mps_database.runtime import RuntimeBase
class ThresholdAlt5(RuntimeBase):
"""
Threshold class (thresholds table)
Properties:
i[0..3]_[l|h]: threshold value
i[0..3]_[l|h]_activ... | 34.690476 | 81 | 0.714482 |
9e1ba808a0ffbbc26ada27a097633287c012710b | 2,231 | py | Python | sources/mapnik/setup.py | ds2268/large_image | edab179aabdca31e0852866e66b34adbab410f5b | [
"Apache-2.0"
] | null | null | null | sources/mapnik/setup.py | ds2268/large_image | edab179aabdca31e0852866e66b34adbab410f5b | [
"Apache-2.0"
] | null | null | null | sources/mapnik/setup.py | ds2268/large_image | edab179aabdca31e0852866e66b34adbab410f5b | [
"Apache-2.0"
] | null | null | null | import os
from setuptools import find_packages, setup
description = 'A Mapnik tilesource for large_image.'
long_description = description + '\n\nSee the large-image package for more details.'
def prerelease_local_scheme(version):
"""
Return local scheme version unless building on master in CircleCI.
Th... | 33.298507 | 85 | 0.650829 |
9e1ba949ee7c0f50bd3ef31ed445685d3b85863d | 118 | py | Python | iris_sdk/models/maps/tier_list.py | NumberAI/python-bandwidth-iris | 0e05f79d68b244812afb97e00fd65b3f46d00aa3 | [
"MIT"
] | 2 | 2020-04-13T13:47:59.000Z | 2022-02-23T20:32:41.000Z | iris_sdk/models/maps/tier_list.py | bandwidthcom/python-bandwidth-iris | dbcb30569631395041b92917252d913166f7d3c9 | [
"MIT"
] | 5 | 2020-09-18T20:59:24.000Z | 2021-08-25T16:51:42.000Z | iris_sdk/models/maps/tier_list.py | bandwidthcom/python-bandwidth-iris | dbcb30569631395041b92917252d913166f7d3c9 | [
"MIT"
] | 5 | 2018-12-12T14:39:50.000Z | 2020-11-17T21:42:29.000Z | #!/usr/bin/env python
from iris_sdk.models.maps.base_map import BaseMap
class TierListMap(BaseMap):
tier = None | 16.857143 | 49 | 0.754237 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.