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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1cf47376810390951f85e8345e97694c7ad8e6cc | 3,071 | py | Python | ranger_cli/utils.py | degagne/ranger-cli | 35dda457af75f34c10664ccd161ec4fd256e67c0 | [
"MIT"
] | null | null | null | ranger_cli/utils.py | degagne/ranger-cli | 35dda457af75f34c10664ccd161ec4fd256e67c0 | [
"MIT"
] | null | null | null | ranger_cli/utils.py | degagne/ranger-cli | 35dda457af75f34c10664ccd161ec4fd256e67c0 | [
"MIT"
] | null | null | null | import os
import click
import six
import json
import confuse
import pathlib
from rich.console import Console
from rich.table import Table
CONTEXT_SETTINGS = {"help_option_names": ["-h", "--help"]}
CONFIG_APP = "ranger"
PROPERTY_LIST = [
"name",
"parent",
"mandatory",
"recursiveSupported",
"exclu... | 27.176991 | 86 | 0.591013 |
1cf48f5057fbd4c86458a58c4053234b6d4a77b9 | 303 | py | Python | python/django/basic/pages/urls.py | y2ghost/work | b7f5b02db9dc0df6157bc799ddb4a1ac9d574cf3 | [
"MIT"
] | null | null | null | python/django/basic/pages/urls.py | y2ghost/work | b7f5b02db9dc0df6157bc799ddb4a1ac9d574cf3 | [
"MIT"
] | null | null | null | python/django/basic/pages/urls.py | y2ghost/work | b7f5b02db9dc0df6157bc799ddb4a1ac9d574cf3 | [
"MIT"
] | null | null | null | from django.urls import path
from .views import homePageView
from .views import HomePageView
from .views import AboutPageView
urlpatterns = [
path('', HomePageView.as_view(), name='home'),
path('home2', homePageView, name='home2'),
path('about/', AboutPageView.as_view(), name='about'),
]
| 25.25 | 58 | 0.712871 |
1cf4985e67733d0dd991593a7ac20c4e0c2b75fc | 39,228 | py | Python | pytest-embedded/pytest_embedded/plugin.py | hmalpani/pytest-embedded | da0d5a67d086bcf93d39b30412bf8843c7bbf1a6 | [
"MIT"
] | null | null | null | pytest-embedded/pytest_embedded/plugin.py | hmalpani/pytest-embedded | da0d5a67d086bcf93d39b30412bf8843c7bbf1a6 | [
"MIT"
] | null | null | null | pytest-embedded/pytest_embedded/plugin.py | hmalpani/pytest-embedded | da0d5a67d086bcf93d39b30412bf8843c7bbf1a6 | [
"MIT"
] | null | null | null | import datetime
import functools
import importlib
import logging
import os
import sys
import tempfile
from collections import defaultdict, namedtuple
from operator import itemgetter
from typing import (
TYPE_CHECKING,
Any,
BinaryIO,
Callable,
Dict,
Generator,
Iterable,
List,
Optional... | 33.817241 | 119 | 0.622871 |
1cf4fe5230295ad5e61f26127db034192f0b36ea | 4,554 | py | Python | igibson/metrics/agent.py | suresh-guttikonda/iGibson | a69e623058180146466cd52d4bb3c00d1facdacf | [
"MIT"
] | null | null | null | igibson/metrics/agent.py | suresh-guttikonda/iGibson | a69e623058180146466cd52d4bb3c00d1facdacf | [
"MIT"
] | null | null | null | igibson/metrics/agent.py | suresh-guttikonda/iGibson | a69e623058180146466cd52d4bb3c00d1facdacf | [
"MIT"
] | null | null | null | import copy
import numpy as np
import pybullet as p
from igibson.metrics.metric_base import MetricBase
class AgentMetric(MetricBase):
def __init__(self):
self.initialized = False
self.state_cache = {}
self.next_state_cache = {}
self.agent_pos = {part: [] for part in ["left_hand... | 39.258621 | 118 | 0.57466 |
1cf504555301d538f207d9bc5f84977addb893f2 | 317 | py | Python | esl/economics/markets/iso10383.py | fagan2888/ESL | 24ffa903e8c5b9e725eed9861623d4b6a4a205a2 | [
"Apache-2.0"
] | 1 | 2020-04-17T18:18:08.000Z | 2020-04-17T18:18:08.000Z | esl/economics/markets/iso10383.py | fagan2888/ESL | 24ffa903e8c5b9e725eed9861623d4b6a4a205a2 | [
"Apache-2.0"
] | null | null | null | esl/economics/markets/iso10383.py | fagan2888/ESL | 24ffa903e8c5b9e725eed9861623d4b6a4a205a2 | [
"Apache-2.0"
] | null | null | null |
class ISO10383(object):
__slots__ = ["code"]
code:str
def __init__(self, code:str) -> None:
assert len(code) == 4
for i in range(4):
assert (ord('A') <= ord(code[i]) <= ord('Z')) or (ord('0') <= ord(code[i]) <= ord('9'))
super().__init__()
self.code = code
| 22.642857 | 99 | 0.492114 |
1cf508199cbd0764682bf5bdcd24b98f81e53734 | 1,151 | py | Python | tonks/vision/helpers.py | vanderveld/tonks | e87afbd9614b276b443b4a7527fd1fda01a8be4c | [
"BSD-3-Clause"
] | null | null | null | tonks/vision/helpers.py | vanderveld/tonks | e87afbd9614b276b443b4a7527fd1fda01a8be4c | [
"BSD-3-Clause"
] | null | null | null | tonks/vision/helpers.py | vanderveld/tonks | e87afbd9614b276b443b4a7527fd1fda01a8be4c | [
"BSD-3-Clause"
] | null | null | null | from creevey.ops.image import centercrop
import numpy as np
from PIL import Image
import torch.nn as nn
def center_crop_pil_image(img):
"""
Helper function to crop the center out of images.
Utilizes the centercrop function from `creevey`
Parameters
----------
img: array
PIL image arr... | 24.489362 | 85 | 0.638575 |
1cf50ed970543c42d072616d73a4750897bd1265 | 534 | py | Python | groupyr/tests/test_common.py | arokem/groupyr | 4af04e53799b7cbd9b99955798cf58cfe054f8a5 | [
"BSD-3-Clause"
] | 9 | 2020-10-04T02:53:43.000Z | 2022-02-27T18:44:02.000Z | groupyr/tests/test_common.py | arokem/groupyr | 4af04e53799b7cbd9b99955798cf58cfe054f8a5 | [
"BSD-3-Clause"
] | 68 | 2020-10-04T11:53:32.000Z | 2022-02-22T05:17:50.000Z | groupyr/tests/test_common.py | arokem/groupyr | 4af04e53799b7cbd9b99955798cf58cfe054f8a5 | [
"BSD-3-Clause"
] | 4 | 2020-10-03T22:20:56.000Z | 2022-02-17T02:38:34.000Z | import pytest
from sklearn.utils.estimator_checks import check_estimator
from groupyr._base import SGLBaseEstimator
from groupyr import LogisticSGL, LogisticSGLCV, SGL, SGLCV
@pytest.mark.parametrize("Estimator", [SGLBaseEstimator, SGL, LogisticSGL])
def test_all_estimators(Estimator):
return check_estimator(Es... | 31.411765 | 78 | 0.803371 |
1cf510beac2e7233b99857dbec80d939f6e09c14 | 9,812 | py | Python | ibllib/qc/critical_reasons.py | int-brain-lab/ibllib | 93be6b98848758e05cdc9398caaf19e6a68f7386 | [
"MIT"
] | 38 | 2018-08-07T21:55:29.000Z | 2022-03-21T14:49:03.000Z | ibllib/qc/critical_reasons.py | int-brain-lab/ibllib | 93be6b98848758e05cdc9398caaf19e6a68f7386 | [
"MIT"
] | 207 | 2018-07-25T15:10:48.000Z | 2022-03-08T13:23:08.000Z | ibllib/qc/critical_reasons.py | int-brain-lab/ibllib | 93be6b98848758e05cdc9398caaf19e6a68f7386 | [
"MIT"
] | 35 | 2018-09-04T14:49:56.000Z | 2022-01-06T21:17:51.000Z | """
Prompt experimenter for reason for marking session/insertion as CRITICAL
Choices are listed in the global variables. Multiple reasons can be selected.
Places info in Alyx session note in a format that is machine retrievable (text->json)
"""
# Author: Gaelle
import json
from one.api import ONE
# Global var
# Reaso... | 37.307985 | 97 | 0.65002 |
1cf536e9689b6e0888ebac5f641da9fa636acee9 | 1,333 | py | Python | tensorbay/dataset/tests/test_frame.py | Hoteryoung/tensorbay-python-sdk | 53c34dd529c20ec69b34ddd348b5c8e74f4094d0 | [
"MIT"
] | 2 | 2021-08-23T08:30:15.000Z | 2021-08-30T03:18:41.000Z | tensorbay/dataset/tests/test_frame.py | yyy624297803/tensorbay-python-sdk | 58cca7e16264c7ce7e3059a9dd974886b3abd917 | [
"MIT"
] | null | null | null | tensorbay/dataset/tests/test_frame.py | yyy624297803/tensorbay-python-sdk | 58cca7e16264c7ce7e3059a9dd974886b3abd917 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#
# Copyright 2021 Graviti. Licensed under MIT License.
#
import ulid
from .. import Frame, RemoteData
_FRAME_ID = ulid.from_str("01F29QVWASMNGNA2FZBMZCDEG1")
_FRAME_DATA = {
"frameId": _FRAME_ID.str,
"frame": [
{
"sensorName": "sensor1",
"remotePath": ... | 26.66 | 98 | 0.565641 |
1cf557f593f4519282254b477a728a3adc35a154 | 1,040 | py | Python | demos/checker.py | adan/commitcheck | c7171cd860f8f0781a9db919230deafd3e3367dd | [
"MIT"
] | 2 | 2015-03-05T23:31:43.000Z | 2015-03-07T02:46:59.000Z | demos/checker.py | adan/commitcheck | c7171cd860f8f0781a9db919230deafd3e3367dd | [
"MIT"
] | null | null | null | demos/checker.py | adan/commitcheck | c7171cd860f8f0781a9db919230deafd3e3367dd | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) 2015 Xiaofan Li
# License: MIT
'''Checker which requires argparse.'''
from __future__ import absolute_import, division, print_function, with_statement
import os
import sys
from commitcheck.argutils import git_create_parser, git_get_type
from commitcheck.checkers import Pattern
... | 26 | 80 | 0.694231 |
1cf56146fbdee1ca0810824b00465d1bf24a59a6 | 967 | py | Python | sdks/python/test/test_GitHubMarketplacePlan.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | null | null | null | sdks/python/test/test_GitHubMarketplacePlan.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 6 | 2019-10-23T06:38:53.000Z | 2022-01-22T07:57:58.000Z | sdks/python/test/test_GitHubMarketplacePlan.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 2 | 2019-10-23T06:31:05.000Z | 2021-08-21T17:32:47.000Z | # coding: utf-8
"""
App Center Client
Microsoft Visual Studio App Center API # noqa: E501
OpenAPI spec version: preview
Contact: benedetto.abbenanti@gmail.com
Project Repository: https://github.com/b3nab/appcenter-sdks
"""
from __future__ import absolute_import
import unittest
import appcente... | 24.175 | 101 | 0.731127 |
1cf56bb502ec08bc6ab77d7512dd6d53c9a1f062 | 519 | py | Python | moorkh/attacks/noise.py | akshay-gupta123/moorkh | 5094f0971ff6ed6252c401f29a37100e971c963b | [
"MIT"
] | null | null | null | moorkh/attacks/noise.py | akshay-gupta123/moorkh | 5094f0971ff6ed6252c401f29a37100e971c963b | [
"MIT"
] | null | null | null | moorkh/attacks/noise.py | akshay-gupta123/moorkh | 5094f0971ff6ed6252c401f29a37100e971c963b | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
from .base import Attack
class Noise(Attack):
def __init__(self, model, sigma=0.1):
super(GN, self).__init__(model,"GN")
self.sigma = sigma
self._attack_mode = 'only_default'
def forward(self, images, labels=None):
images = images.clone(... | 28.833333 | 73 | 0.65896 |
1cf56e95bd5be279d1b107443245a7353e5298bc | 2,850 | py | Python | obstacles.py | JCoffeeYP/async_space_game | fc2e6966a6ae465a089d3e118799beca4fbc6a19 | [
"MIT"
] | null | null | null | obstacles.py | JCoffeeYP/async_space_game | fc2e6966a6ae465a089d3e118799beca4fbc6a19 | [
"MIT"
] | null | null | null | obstacles.py | JCoffeeYP/async_space_game | fc2e6966a6ae465a089d3e118799beca4fbc6a19 | [
"MIT"
] | null | null | null | import asyncio
from curses_tools import draw_frame
class Obstacle:
def __init__(self, row, column, rows_size=1, columns_size=1, uid=None):
self.row = row
self.column = column
self.rows_size = rows_size
self.columns_size = columns_size
self.uid = uid
def get_bounding_... | 30.978261 | 100 | 0.657895 |
1cf585a48b6f9d41ed9e603abce220fef4edf661 | 4,086 | py | Python | azure/multiapi/storage/v2018_03_28/queue/sharedaccesssignature.py | xolve/azure-multiapi-storage-python | 47509479427c879f18c554e451e838453d47c2bd | [
"MIT"
] | 3 | 2019-02-21T20:46:26.000Z | 2021-06-22T15:35:52.000Z | azure/multiapi/storage/v2018_03_28/queue/sharedaccesssignature.py | xolve/azure-multiapi-storage-python | 47509479427c879f18c554e451e838453d47c2bd | [
"MIT"
] | 11 | 2017-10-05T18:20:40.000Z | 2020-10-10T09:20:19.000Z | azure/multiapi/storage/v2018_03_28/queue/sharedaccesssignature.py | xolve/azure-multiapi-storage-python | 47509479427c879f18c554e451e838453d47c2bd | [
"MIT"
] | 15 | 2017-10-02T18:48:20.000Z | 2022-03-03T14:03:49.000Z | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
from ..co... | 49.829268 | 110 | 0.649535 |
1cf595cb1c770af81a4be316c06134f3762b13d6 | 1,771 | py | Python | data/vocab.py | wasiahmad/PolicyIE | 57046c431b64f6e85edd70990c18c02e5ba83c35 | [
"MIT"
] | 7 | 2021-05-29T16:00:39.000Z | 2022-03-13T16:00:04.000Z | data/vocab.py | wasiahmad/PolicyIE | 57046c431b64f6e85edd70990c18c02e5ba83c35 | [
"MIT"
] | 2 | 2021-01-09T05:53:07.000Z | 2021-11-18T11:39:35.000Z | data/vocab.py | wasiahmad/PolicyIE | 57046c431b64f6e85edd70990c18c02e5ba83c35 | [
"MIT"
] | 3 | 2021-02-04T02:15:24.000Z | 2021-11-17T01:26:41.000Z | import io
import os
import argparse
from collections import Counter
def load_vectors(fname):
fin = io.open(fname, 'r', encoding='utf-8', newline='\n', errors='ignore')
n, d = map(int, fin.readline().split())
data = {}
for line in fin:
tokens = line.rstrip().split(' ')
data[tokens[0]] =... | 27.671875 | 106 | 0.575381 |
1cf5b4f913b1d3db5c5906d322f7c82ab9728c60 | 5,654 | py | Python | frameworks/opennmt_py/entrypoint.py | ClementChouteau/nmt-wizard-docker | b2bf2178b48ee1decd4a7216eee358b8e0953ce8 | [
"MIT"
] | null | null | null | frameworks/opennmt_py/entrypoint.py | ClementChouteau/nmt-wizard-docker | b2bf2178b48ee1decd4a7216eee358b8e0953ce8 | [
"MIT"
] | null | null | null | frameworks/opennmt_py/entrypoint.py | ClementChouteau/nmt-wizard-docker | b2bf2178b48ee1decd4a7216eee358b8e0953ce8 | [
"MIT"
] | null | null | null | import os
import copy
import six
import json
import requests
from nmtwizard.framework import Framework
from nmtwizard.logger import get_logger
from nmtwizard import utils, serving
logger = get_logger(__name__)
_MODEL_NAME = "model.pt"
_RELEASED_MODEL_NAME = "model_released.pt"
class OpenNMTPYFramework(Framework):
... | 36.477419 | 94 | 0.578175 |
1cf5c00a1cca42860c9ad1cd92bded9ece47ef50 | 1,152 | py | Python | python/array/0989_add_to_array_form_of_integer.py | linshaoyong/leetcode | ea052fad68a2fe0cbfa5469398508ec2b776654f | [
"MIT"
] | 6 | 2019-07-15T13:23:57.000Z | 2020-01-22T03:12:01.000Z | python/array/0989_add_to_array_form_of_integer.py | linshaoyong/leetcode | ea052fad68a2fe0cbfa5469398508ec2b776654f | [
"MIT"
] | null | null | null | python/array/0989_add_to_array_form_of_integer.py | linshaoyong/leetcode | ea052fad68a2fe0cbfa5469398508ec2b776654f | [
"MIT"
] | 1 | 2019-07-24T02:15:31.000Z | 2019-07-24T02:15:31.000Z | class Solution(object):
def addToArrayForm(self, A, K):
"""
:type A: List[int]
:type K: int
:rtype: List[int]
"""
carry = 0
res = []
for i in range(len(A) - 1, -1, -1):
a = A[i] + K % 10 + carry
K = K // 10
if a >= 1... | 28.097561 | 65 | 0.388021 |
1cf5cb9d85383412760a1a9bca63c233755e9510 | 12,773 | py | Python | libs/applibs/kivymd/button.py | mkbeh/CRyptoLab | 424c938c16c9264e99eff71e4c1a27ca65314d42 | [
"MIT"
] | null | null | null | libs/applibs/kivymd/button.py | mkbeh/CRyptoLab | 424c938c16c9264e99eff71e4c1a27ca65314d42 | [
"MIT"
] | 1 | 2021-06-01T22:30:24.000Z | 2021-06-01T22:30:24.000Z | libs/applibs/kivymd/button.py | mkbeh/CRyptoLab | 424c938c16c9264e99eff71e4c1a27ca65314d42 | [
"MIT"
] | 1 | 2021-05-11T23:06:20.000Z | 2021-05-11T23:06:20.000Z | # -*- coding: utf-8 -*-
'''
Buttons
=======
`Material Design spec, Buttons page <https://www.google.com/design/spec/components/buttons.html>`_
`Material Design spec, Buttons: Floating Action Button page <https://www.google.com/design/spec/components/buttons-floating-action-button.html>`_
TO-DO: DOCUMENT MODULE
'''
f... | 34.061333 | 145 | 0.648321 |
1cf5ced276ad87184ac25a80d046557e66bf3eef | 338 | py | Python | kubi_ecs_logger/models/fields/ecs.py | kumina/kubi_ecs_logger | 64d9519e0759a24253a4edc53e0c024675033d1c | [
"BSD-3-Clause"
] | 6 | 2019-12-15T12:47:06.000Z | 2022-01-11T08:54:58.000Z | kubi_ecs_logger/models/fields/ecs.py | kumina/kubi_ecs_logger | 64d9519e0759a24253a4edc53e0c024675033d1c | [
"BSD-3-Clause"
] | null | null | null | kubi_ecs_logger/models/fields/ecs.py | kumina/kubi_ecs_logger | 64d9519e0759a24253a4edc53e0c024675033d1c | [
"BSD-3-Clause"
] | null | null | null | from marshmallow import fields
from .field_set import FieldSet, FieldSetSchema
class ECS(FieldSet):
def __init__(self,
version: str = None,
*args, **kwargs):
super().__init__(*args, **kwargs)
self.version = version
class ECSSchema(FieldSetSchema):
version ... | 19.882353 | 47 | 0.62426 |
1cf60199bd02395bcd6fcf8ee5a64b72e06fc0f6 | 1,625 | py | Python | python/fundamentals/linked_lists/double_linked_list.py | othonreyes/code_problems | 6e65b26120b0b9d6e5ac7342a4d964696b7bd5bf | [
"MIT"
] | null | null | null | python/fundamentals/linked_lists/double_linked_list.py | othonreyes/code_problems | 6e65b26120b0b9d6e5ac7342a4d964696b7bd5bf | [
"MIT"
] | null | null | null | python/fundamentals/linked_lists/double_linked_list.py | othonreyes/code_problems | 6e65b26120b0b9d6e5ac7342a4d964696b7bd5bf | [
"MIT"
] | null | null | null | class Node:
def __init__(self, data):
self.n = None
self.p = None
self.data = data
def __str__(self):
p = '[' if self.p is None else '):'
nex = ']' if self.n is None else ':('
return p + str(self.data) + nex
class DoubleLinkedList:
def __init__(self):
self.head = None
self.tail =... | 19.578313 | 49 | 0.545231 |
1cf643bbd2c828faf6516912f3fbcc762eef7151 | 3,149 | py | Python | alipay/aop/api/domain/TemplateInfo.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/TemplateInfo.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/TemplateInfo.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.FillContent import FillContent
from alipay.aop.api.domain.SignField import SignField
class TemplateInfo(object):
def __init__(self):
self._fill_contents = None
... | 30.872549 | 79 | 0.580502 |
1cf66eb8ca9831eddbd64a2e834f3aae289d129a | 2,520 | py | Python | src/pathfinding_service/exceptions.py | fredo/raiden-services | d724adfc7896f55e2d1d9d00b0dbd501b85eabe1 | [
"MIT"
] | null | null | null | src/pathfinding_service/exceptions.py | fredo/raiden-services | d724adfc7896f55e2d1d9d00b0dbd501b85eabe1 | [
"MIT"
] | 62 | 2020-12-25T07:08:06.000Z | 2022-03-28T00:22:18.000Z | src/pathfinding_service/exceptions.py | fredo/raiden-services | d724adfc7896f55e2d1d9d00b0dbd501b85eabe1 | [
"MIT"
] | null | null | null | from raiden_libs.exceptions import ApiException
class InvalidGlobalMessage(Exception):
"""A global message received via matrix is invalid and must be discarded"""
class InvalidCapacityUpdate(InvalidGlobalMessage):
pass
class InvalidFeeUpdate(InvalidGlobalMessage):
pass
class UndefinedFee(Exception):... | 22.702703 | 99 | 0.727381 |
1cf6794d80e06d368702a07cc9a8d80ccfb08890 | 1,484 | py | Python | socialchoice/voting/pairwise.py | ashwinreddy/voting | 4a9ef46901ddad23e814d5744944463f6fd9ae83 | [
"MIT"
] | null | null | null | socialchoice/voting/pairwise.py | ashwinreddy/voting | 4a9ef46901ddad23e814d5744944463f6fd9ae83 | [
"MIT"
] | null | null | null | socialchoice/voting/pairwise.py | ashwinreddy/voting | 4a9ef46901ddad23e814d5744944463f6fd9ae83 | [
"MIT"
] | null | null | null | from .method import Method
import numpy as np
class PairwiseComparison(Method):
def __init__(self, preference_schedule):
super(PairwiseComparison, self).__init__(preference_schedule)
def _compare_candidates(self, i, j):
"""Compares candidates i and j as if no other candidates existed
... | 43.647059 | 126 | 0.670485 |
1cf6cafcf52cebf8422bd7596602a119ad62818c | 2,573 | py | Python | tests/test_Video.py | gitter-badger/play-chess-with-a-webcam | 16cd9d30d1c0e118f98532ebd19c4b4c1621c837 | [
"Apache-2.0"
] | null | null | null | tests/test_Video.py | gitter-badger/play-chess-with-a-webcam | 16cd9d30d1c0e118f98532ebd19c4b4c1621c837 | [
"Apache-2.0"
] | null | null | null | tests/test_Video.py | gitter-badger/play-chess-with-a-webcam | 16cd9d30d1c0e118f98532ebd19c4b4c1621c837 | [
"Apache-2.0"
] | null | null | null | # part of https://github.com/WolfgangFahl/play-chess-with-a-webcam
from pcwawc.Video import Video
import sys
# test reading an example video
def test_ReadVideo():
video = Video()
video.open('testMedia/emptyBoard001.avi')
video.play()
print ("played %d frames" % (video.frames))
assert video.frames ... | 27.084211 | 88 | 0.637388 |
1cf6d5d24062eea34b4f0b7508636c190f47cafd | 11,534 | py | Python | ckan/model/license.py | larrycameron80/ckan | fbab8f51b36a293206fdd998d71ece27d2565951 | [
"Apache-2.0"
] | 1 | 2022-02-14T20:25:34.000Z | 2022-02-14T20:25:34.000Z | ckan/model/license.py | larrycameron80/ckan | fbab8f51b36a293206fdd998d71ece27d2565951 | [
"Apache-2.0"
] | 4 | 2020-03-24T17:53:23.000Z | 2021-03-31T19:19:03.000Z | ckan/model/license.py | larrycameron80/ckan | fbab8f51b36a293206fdd998d71ece27d2565951 | [
"Apache-2.0"
] | 3 | 2020-01-02T10:32:37.000Z | 2021-12-22T07:20:21.000Z | # encoding: utf-8
import datetime
import re
import requests
from ckan.common import config
from ckan.common import asbool
from six import text_type, string_types
from six.moves import map
from ckan.common import _, json
import ckan.lib.maintain as maintain
log = __import__('logging').getLogger(__name__)
class Li... | 31.257453 | 82 | 0.608289 |
1cf70acac84fa6b0a93e32ad8d0e24018ab238d9 | 1,275 | py | Python | util/layer_viso.py | sailist/ASRFrame | 2fd022c3c00af1d5178dee4b367b2269241bc73c | [
"Apache-2.0"
] | 223 | 2019-07-13T06:31:18.000Z | 2022-03-11T08:23:01.000Z | util/layer_viso.py | mayite/ASRFrame | 484cf1ee5beec4c39439de683c5b4c1f1ea3a94a | [
"Apache-2.0"
] | 7 | 2019-12-27T08:48:42.000Z | 2021-09-01T09:45:13.000Z | util/layer_viso.py | mayite/ASRFrame | 484cf1ee5beec4c39439de683c5b4c1f1ea3a94a | [
"Apache-2.0"
] | 71 | 2019-07-14T13:14:13.000Z | 2022-03-18T06:58:54.000Z | '''
作者:挥挥洒洒
来源:CSDN
原文:https://blog.csdn.net/u010420283/article/details/80303231
版权声明:本文为博主原创文章,转载请附上博文链接!
'''
# 暂时没有使用
from keras.models import load_model
from keras import backend as K
import matplotlib.pyplot as plt
def main():
model = load_model('data/checkpoints/inception.026-1.07.hdf5') # replaced by y... | 26.5625 | 97 | 0.611765 |
1cf7250383aa17c838842ca3b51febcdeeff7d37 | 442 | py | Python | fixerio/exceptions.py | ai-abhinav/CCArbitrage | 6af8c2e6722f2398fabf3a6e483b1a0fcb8a3a53 | [
"MIT"
] | 1 | 2021-03-07T23:07:52.000Z | 2021-03-07T23:07:52.000Z | fixerio/exceptions.py | ai-abhinav/CCArbitrage | 6af8c2e6722f2398fabf3a6e483b1a0fcb8a3a53 | [
"MIT"
] | null | null | null | fixerio/exceptions.py | ai-abhinav/CCArbitrage | 6af8c2e6722f2398fabf3a6e483b1a0fcb8a3a53 | [
"MIT"
] | null | null | null | class FixerioException(Exception):
""" General Fixerio exception """
def __init__(self,*args,**kwargs):
Exception.__init__(self,*args,**kwargs)
class FixerioCurrencyUnavailable(FixerioException):
""" Wrong or unavailable currency """
pass
class FixerioInvalidCurrency(FixerioException):
"""... | 27.625 | 51 | 0.708145 |
1cf726555f2f51d27139830389410574832d7456 | 718 | py | Python | jahjahworks/storage.py | nerdfiles/jahjah_works | 5d7f26dc8001b5dcb0c20b85e6ed247c4c7a00da | [
"WTFPL"
] | null | null | null | jahjahworks/storage.py | nerdfiles/jahjah_works | 5d7f26dc8001b5dcb0c20b85e6ed247c4c7a00da | [
"WTFPL"
] | null | null | null | jahjahworks/storage.py | nerdfiles/jahjah_works | 5d7f26dc8001b5dcb0c20b85e6ed247c4c7a00da | [
"WTFPL"
] | null | null | null | import urlparse
from s3_folder_storage.s3 import DefaultStorage, StaticStorage
from django.conf import settings
def domain(url):
return urlparse.urlparse(url).hostname
class MediaFilesStorage(DefaultStorage):
def __init__(self, *args, **kwargs):
kwargs['bucket'] = settings.AWS_STORAGE_BUCKET_NAME
... | 29.916667 | 65 | 0.731198 |
1cf7650dbcd51cb9580c7536b4beb1b1b4605bce | 1,146 | py | Python | setup.py | drobotun/virustotalapi3 | 7d9e278dc58fa9702ddf8c62de09c852a7316148 | [
"MIT"
] | 8 | 2020-01-10T00:19:06.000Z | 2022-01-12T18:13:27.000Z | setup.py | drobotun/virustotalapi3 | 7d9e278dc58fa9702ddf8c62de09c852a7316148 | [
"MIT"
] | 2 | 2020-02-07T22:01:55.000Z | 2020-02-11T19:52:48.000Z | setup.py | drobotun/virustotalapi3 | 7d9e278dc58fa9702ddf8c62de09c852a7316148 | [
"MIT"
] | 3 | 2020-01-10T00:19:18.000Z | 2020-12-08T17:13:41.000Z | from setuptools import setup, find_packages
import vtapi3
with open('README.rst', 'r', encoding='utf-8') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst', 'r', encoding='utf-8') as history_file:
history = history_file.read()
setup(
name='vtapi3',
version = vtapi3.__version__,
de... | 32.742857 | 66 | 0.650087 |
1cf7858e62872cf0220da8e269d8ebd7ef02dd22 | 5,912 | py | Python | rbundle.py | strickyak/aphid | 12469858facdc9d7f110bf6c895e58eae9fb728f | [
"MIT"
] | 2 | 2015-05-25T10:47:30.000Z | 2017-12-12T18:15:00.000Z | rbundle.py | strickyak/aphid | 12469858facdc9d7f110bf6c895e58eae9fb728f | [
"MIT"
] | null | null | null | rbundle.py | strickyak/aphid | 12469858facdc9d7f110bf6c895e58eae9fb728f | [
"MIT"
] | null | null | null | from go import bytes, io, os, time
from go import "path/filepath" as F
import A, bundle, flag, hanger, keyring, pubsub, rpc2
KEYNAME = byt('default')
KEY = byt('ABCDEFGHabcdefgh')
TheHanger = hanger.Hanger()
class idRemoteBase:
def __init__(cli, id):
.cli = cli
.id = id
.seq = 0
def Advance():
.... | 27.119266 | 87 | 0.6091 |
1cf79a51bec090a40e331da0e258b6d645d4bec0 | 841 | py | Python | tasks.py | brmscheiner/gumby | 83031a01ba8adcdf0ed4c68e22e79e9409eb394b | [
"Apache-2.0"
] | null | null | null | tasks.py | brmscheiner/gumby | 83031a01ba8adcdf0ed4c68e22e79e9409eb394b | [
"Apache-2.0"
] | null | null | null | tasks.py | brmscheiner/gumby | 83031a01ba8adcdf0ed4c68e22e79e9409eb394b | [
"Apache-2.0"
] | null | null | null | import sys
from elasticsearch import Elasticsearch
from elasticsearch.serializer import JSONSerializer
from invoke import task
from gumby import (
load_individuals_index_with_random_data,
Individual,
)
@task
def init(c):
"""Initialize the elasticsearch instance"""
client = Elasticsearch()
if In... | 22.72973 | 71 | 0.725327 |
1cf7a43e6b6470d56a79f694a1d8b588b4cb17aa | 2,703 | py | Python | gala-spider/spider/models/anomaly_item.py | seandong37tt4qu/jeszhengq | 32b3737ab45e89e8c5b71cdce871cefd2c938fa8 | [
"MulanPSL-1.0"
] | null | null | null | gala-spider/spider/models/anomaly_item.py | seandong37tt4qu/jeszhengq | 32b3737ab45e89e8c5b71cdce871cefd2c938fa8 | [
"MulanPSL-1.0"
] | null | null | null | gala-spider/spider/models/anomaly_item.py | seandong37tt4qu/jeszhengq | 32b3737ab45e89e8c5b71cdce871cefd2c938fa8 | [
"MulanPSL-1.0"
] | null | null | null | # coding: utf-8
from __future__ import absolute_import
from datetime import date, datetime # noqa: F401
from typing import List, Dict # noqa: F401
from spider.models.base_model_ import Model
from spider import util
class AnomalyItem(Model):
"""NOTE: This class is auto generated by the swagger code generator ... | 27.865979 | 85 | 0.623381 |
1cf7c24b1cd13965854763976554e7aa1afd4ef9 | 5,900 | py | Python | earthsim/links.py | dharhas/EarthSim | c3fb68232b1889a3736606b0f2dd2b07510e981b | [
"BSD-3-Clause"
] | null | null | null | earthsim/links.py | dharhas/EarthSim | c3fb68232b1889a3736606b0f2dd2b07510e981b | [
"BSD-3-Clause"
] | null | null | null | earthsim/links.py | dharhas/EarthSim | c3fb68232b1889a3736606b0f2dd2b07510e981b | [
"BSD-3-Clause"
] | null | null | null | import param
from holoviews.element import Path, Table, Points
from holoviews.plotting.links import Link
from holoviews.plotting.bokeh.callbacks import LinkCallback
from holoviews.core.util import dimension_sanitizer
class PointTableLink(Link):
"""
Defines a Link between a Points type and a Table which will
... | 29.949239 | 87 | 0.614576 |
1cf7c88af0ec251a7ce62472e868a469a7164193 | 6,010 | py | Python | src/vggish_slim.py | douglastome/msc2018continual-learning | b5b92dc7ac36362a51cd812a1abab68424ed009e | [
"Apache-2.0"
] | null | null | null | src/vggish_slim.py | douglastome/msc2018continual-learning | b5b92dc7ac36362a51cd812a1abab68424ed009e | [
"Apache-2.0"
] | null | null | null | src/vggish_slim.py | douglastome/msc2018continual-learning | b5b92dc7ac36362a51cd812a1abab68424ed009e | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 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 applicab... | 45.18797 | 90 | 0.716805 |
1cf7f7f55436f30ea5e3001358ef39b717cba19e | 2,394 | py | Python | killdozer/killdozer.py | blakfeld/killdozer | fe255846a0bf91a66040839a2c37dbe339cceecc | [
"MIT"
] | null | null | null | killdozer/killdozer.py | blakfeld/killdozer | fe255846a0bf91a66040839a2c37dbe339cceecc | [
"MIT"
] | 1 | 2021-03-25T21:45:46.000Z | 2021-03-25T21:45:46.000Z | killdozer/killdozer.py | blakfeld/killdozer | fe255846a0bf91a66040839a2c37dbe339cceecc | [
"MIT"
] | null | null | null | """
killdozer.py:
Control the KillDozer.
"""
from __future__ import absolute_import, print_function
import logging
import time
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
class KilldozerControl(object):
PIN_MAP = {
'LEFT_FORWARD': 2,
'LEFT_BACKWARD': 3,
'RIGHT_FORWARD': 17,
... | 22.8 | 74 | 0.511278 |
1cf7fad84ec9ff742118fa3d932bbecb5dbbf9a6 | 323 | py | Python | keyence2020/a/main.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | 2 | 2022-01-22T07:56:58.000Z | 2022-01-24T00:29:37.000Z | keyence2020/a/main.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | keyence2020/a/main.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | import sys
sys.setrecursionlimit(10 ** 6)
stdin = sys.stdin
def main():
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()
H = ni()
W = ni()
N = ni()
print(min((-(-N // H)), -(-N // W)))
if __name__ == "__main__":
main... | 16.15 | 57 | 0.526316 |
1cf8262decc4c80d6d76a90447aac2554e27d5b7 | 15,868 | py | Python | mvqag/experiments/abnormality/2020.py | VirkSaab/Medical-VQA | 6d77963cc81940fc680a18d931e0d88a3264f5fa | [
"MIT"
] | null | null | null | mvqag/experiments/abnormality/2020.py | VirkSaab/Medical-VQA | 6d77963cc81940fc680a18d931e0d88a3264f5fa | [
"MIT"
] | null | null | null | mvqag/experiments/abnormality/2020.py | VirkSaab/Medical-VQA | 6d77963cc81940fc680a18d931e0d88a3264f5fa | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torchvision.transforms as T
import pandas as pd
from typing import Dict, List
from torchcontrib.optim import SWA
from pathlib import Path
from mvqag import CNF_PATH
from mvqag.utils import load_yaml, load_json, get_recent_githash, load_qa_file
from mvqag.data import (
VQADa... | 34.874725 | 78 | 0.564784 |
1cf84235ad9f8dfc3f5b73b244e28e37120578ea | 3,269 | py | Python | game.py | sander-adam/four-in-a-row-competition | 6a35d0375ce079ba94662d9fc9d2d54669a5725c | [
"MIT"
] | null | null | null | game.py | sander-adam/four-in-a-row-competition | 6a35d0375ce079ba94662d9fc9d2d54669a5725c | [
"MIT"
] | null | null | null | game.py | sander-adam/four-in-a-row-competition | 6a35d0375ce079ba94662d9fc9d2d54669a5725c | [
"MIT"
] | null | null | null | '''
We are playing the classic 'four in a row' game. Two players (1/2, blue/red) play against each other. Player 1/blue start.
Chips can only be placed on the bottom of each column. First player to get four in a row (horizontally, vertically or
diagonal) wins.
Interface:
Rules:
'''
import pandas as pd
import numpy ... | 28.181034 | 122 | 0.538697 |
1cf8458f073f3e4752ca05c3f58711b1117c7cfc | 2,859 | py | Python | google-cloud-sdk/lib/surface/iam/service_accounts/create.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2017-11-29T18:52:27.000Z | 2017-11-29T18:52:27.000Z | google-cloud-sdk/.install/.backup/lib/surface/iam/service_accounts/create.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | null | null | null | google-cloud-sdk/.install/.backup/lib/surface/iam/service_accounts/create.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2020-07-25T12:09:01.000Z | 2020-07-25T12:09:01.000Z | # Copyright 2015 Google Inc. 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 applicable law or ag... | 39.164384 | 80 | 0.682406 |
1cf84889b307ef5db861b827d512130ac2370428 | 13,221 | py | Python | SAS_Py_Patches_PatternRecognition/threaded_downsample.py | sassoftware/enlighten-apply | 7ad42e11b3d59b7ccbcee5fdd6ef2571f69a5821 | [
"Apache-2.0"
] | 146 | 2015-08-07T21:37:41.000Z | 2021-11-25T04:54:53.000Z | SAS_Py_Patches_PatternRecognition/threaded_downsample.py | Leon1988520/enlighten-apply | 344f18052a80e47d47aa7f94911df300ef95dcca | [
"Apache-2.0"
] | null | null | null | SAS_Py_Patches_PatternRecognition/threaded_downsample.py | Leon1988520/enlighten-apply | 344f18052a80e47d47aa7f94911df300ef95dcca | [
"Apache-2.0"
] | 119 | 2015-07-23T15:23:07.000Z | 2021-07-10T16:07:24.000Z | # -*- coding: utf-8 -*-
"""
Copyright (c) 2016 by SAS Institute
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... | 34.609948 | 126 | 0.610695 |
1cf852e88b1d49549e3d9f47de869c18dee08572 | 13 | py | Python | facepp-python-sdk-master/win32-dist/cmdtool.py | voidhug/Melbourne | b25b594b677101edda16d12084ad07972eb29593 | [
"Apache-2.0"
] | null | null | null | facepp-python-sdk-master/win32-dist/cmdtool.py | voidhug/Melbourne | b25b594b677101edda16d12084ad07972eb29593 | [
"Apache-2.0"
] | null | null | null | facepp-python-sdk-master/win32-dist/cmdtool.py | voidhug/Melbourne | b25b594b677101edda16d12084ad07972eb29593 | [
"Apache-2.0"
] | null | null | null | ../cmdtool.py | 13 | 13 | 0.692308 |
1cf85880f8a15749ee591a2133e3db0d4c3f3108 | 1,418 | py | Python | showcase/convert_word2vec_to_npz.py | cl-tohoku/showcase | c3b1e16cb6c9ae0945abadd7c734260e32216983 | [
"MIT"
] | 7 | 2018-07-02T08:06:56.000Z | 2019-08-14T10:17:28.000Z | showcase/convert_word2vec_to_npz.py | cl-tohoku/showcase | c3b1e16cb6c9ae0945abadd7c734260e32216983 | [
"MIT"
] | null | null | null | showcase/convert_word2vec_to_npz.py | cl-tohoku/showcase | c3b1e16cb6c9ae0945abadd7c734260e32216983 | [
"MIT"
] | 2 | 2018-07-24T05:17:35.000Z | 2019-06-06T10:24:25.000Z | # -*- coding: utf-8 -*-
"""
入力: word2vecから獲得した単語ベクトルファイル(.txt) & 品詞細分類を含めた全語彙ファイル(1行1vocab)
出力: 単語ベクトルファイルをnpyファイルにしたもの.全語彙ファイルに登場しないものについては適当に初期化.
"""
import argparse
import os
from itertools import islice
from pathlib import Path
import numpy as np
def main(args):
# load vocabulary file
word_to_index = {l.... | 32.976744 | 108 | 0.650212 |
1cf875433b56284cce4b34edd6d99ad019ee6178 | 6,919 | py | Python | src/momento/momento_signer.py | momentohq/client-sdk-python | 74dfdc609c208f8d409e5fc5eedc274616507d40 | [
"Apache-2.0"
] | null | null | null | src/momento/momento_signer.py | momentohq/client-sdk-python | 74dfdc609c208f8d409e5fc5eedc274616507d40 | [
"Apache-2.0"
] | 10 | 2022-02-10T21:58:53.000Z | 2022-03-29T00:58:03.000Z | src/momento/momento_signer.py | momentohq/client-sdk-python | 74dfdc609c208f8d409e5fc5eedc274616507d40 | [
"Apache-2.0"
] | 1 | 2022-02-10T21:02:40.000Z | 2022-02-10T21:02:40.000Z | import json
from enum import Enum
from typing import Optional, Dict
from jwt.api_jwk import PyJWK
from urllib.parse import quote
import jwt
from .errors import InvalidArgumentError
class CacheOperation(Enum):
GET = 1
SET = 2
class SigningRequest:
def __init__(
self,
cache_name: str,
... | 38.016484 | 136 | 0.616274 |
1cf894e5300fec28dc67c4566807fe885253577c | 940 | py | Python | sdks/python/test/test_AppRepoPostRequest.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | null | null | null | sdks/python/test/test_AppRepoPostRequest.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 6 | 2019-10-23T06:38:53.000Z | 2022-01-22T07:57:58.000Z | sdks/python/test/test_AppRepoPostRequest.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 2 | 2019-10-23T06:31:05.000Z | 2021-08-21T17:32:47.000Z | # coding: utf-8
"""
App Center Client
Microsoft Visual Studio App Center API # noqa: E501
OpenAPI spec version: preview
Contact: benedetto.abbenanti@gmail.com
Project Repository: https://github.com/b3nab/appcenter-sdks
"""
from __future__ import absolute_import
import unittest
import appcente... | 23.5 | 95 | 0.723404 |
1cf907327278b9b5cf2dfa9ebb243668abaf3594 | 4,790 | py | Python | plugins/trigger_analyze/trigger_analyze_plugin.py | kevin0120/airflow | fa263cbf0ac002bdb26239ce36d5dc2a1b6251fd | [
"Apache-2.0"
] | null | null | null | plugins/trigger_analyze/trigger_analyze_plugin.py | kevin0120/airflow | fa263cbf0ac002bdb26239ce36d5dc2a1b6251fd | [
"Apache-2.0"
] | null | null | null | plugins/trigger_analyze/trigger_analyze_plugin.py | kevin0120/airflow | fa263cbf0ac002bdb26239ce36d5dc2a1b6251fd | [
"Apache-2.0"
] | null | null | null | import os
import asyncio
from abc import ABC
from airflow.hooks.base_hook import BaseHook
from airflow.models import BaseOperator
from plugins.utils.utils import get_curve_params, get_curve, get_result
from typing import Dict
from airflow.api.common.experimental import trigger_dag as trigger
from distutils.util import ... | 32.585034 | 90 | 0.664092 |
1cf926b50e4719cec117f3656037b5ce352caeb0 | 2,070 | py | Python | src/services/instance_manager/instance_manager_client.py | melkyah/gcp_lab_keeper | 98c2ac32269e25710f9f2c1938c17d3a86127189 | [
"Apache-2.0"
] | null | null | null | src/services/instance_manager/instance_manager_client.py | melkyah/gcp_lab_keeper | 98c2ac32269e25710f9f2c1938c17d3a86127189 | [
"Apache-2.0"
] | null | null | null | src/services/instance_manager/instance_manager_client.py | melkyah/gcp_lab_keeper | 98c2ac32269e25710f9f2c1938c17d3a86127189 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 GCP Lab Keeper 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 or agreed to ... | 33.934426 | 82 | 0.728986 |
1cf941b62d208497139ac66fa3baf3179d6bbeb0 | 4,297 | py | Python | Examples/Event Analysis/Sharp Fall In Stock Price At End of Month Event/Sharp_fall_in_stock_price_end_of_month_event_study_code.py | grahesh/Stock-Market-Event-Analysis | 57dc06e087c29b9c134df8886c97377b3d99f05b | [
"BSD-3-Clause"
] | 1 | 2015-12-04T14:40:33.000Z | 2015-12-04T14:40:33.000Z | Examples/Event Analysis/Sharp Fall In Stock Price At End of Month Event/Sharp_fall_in_stock_price_end_of_month_event_study_code.py | grahesh/Stock-Market-Event-Analysis | 57dc06e087c29b9c134df8886c97377b3d99f05b | [
"BSD-3-Clause"
] | null | null | null | Examples/Event Analysis/Sharp Fall In Stock Price At End of Month Event/Sharp_fall_in_stock_price_end_of_month_event_study_code.py | grahesh/Stock-Market-Event-Analysis | 57dc06e087c29b9c134df8886c97377b3d99f05b | [
"BSD-3-Clause"
] | null | null | null | '''
(c) 2011, 2012 Georgia Tech Research Corporation
This source code is released under the New BSD license. Please see
http://wiki.quantsoftware.org/index.php?title=QSTK_License
for license details.
Created on Jan, 13, 2013
@author: Grahesh
@summary: Price Dropping Event Study
'''
import pandas
from qstkutil imp... | 33.834646 | 206 | 0.666744 |
1cf99fa1a8fa1ae70b108b3398d37ed60c2c412a | 18,086 | py | Python | src/skmultiflow/neural_networks/NNMultiPickBestMClass.py | nuwangunasekara/scikit-multiflow | 5cd4f54e2a08976e4b22e67fb60582037047717e | [
"BSD-3-Clause"
] | null | null | null | src/skmultiflow/neural_networks/NNMultiPickBestMClass.py | nuwangunasekara/scikit-multiflow | 5cd4f54e2a08976e4b22e67fb60582037047717e | [
"BSD-3-Clause"
] | null | null | null | src/skmultiflow/neural_networks/NNMultiPickBestMClass.py | nuwangunasekara/scikit-multiflow | 5cd4f54e2a08976e4b22e67fb60582037047717e | [
"BSD-3-Clause"
] | null | null | null | import threading
import numpy as np
from skmultiflow.core import BaseSKMObject, ClassifierMixin
from skmultiflow.utils.utils import *
from skmultiflow.neural_networks.utils import *
from skmultiflow.drift_detection.base_drift_detector import BaseDriftDetector
from skmultiflow.drift_detection import ADWIN
import torch... | 42.158508 | 131 | 0.590623 |
1cf9c2ae7314bef299d3b47ef0e91428d4089354 | 11,537 | py | Python | src/robots/events/events.py | severin-lemaignan/pyrobots | d5dd3bd54375e85802de7225556ad519b8b4e89d | [
"0BSD"
] | 11 | 2017-03-06T17:19:59.000Z | 2021-11-04T07:45:33.000Z | src/robots/events/events.py | severin-lemaignan/pyrobots | d5dd3bd54375e85802de7225556ad519b8b4e89d | [
"0BSD"
] | 2 | 2018-08-18T12:43:47.000Z | 2019-04-23T13:03:26.000Z | src/robots/events/events.py | severin-lemaignan/pyrobots | d5dd3bd54375e85802de7225556ad519b8b4e89d | [
"0BSD"
] | 3 | 2018-04-24T10:25:53.000Z | 2021-08-25T04:34:35.000Z | # coding=utf-8
"""
pyRobots' events implementation
"""
import logging; logger = logging.getLogger("robots.events")
import time
import weakref
import threading # for current_thread()
from robots.concurrency import SignalingThread, ACTIVE_SLEEP_RESOLUTION
from robots.introspection import introspection
class Events:
... | 34.541916 | 128 | 0.564011 |
1cf9c976fa5e0d040e6d94a56338af2407307e15 | 378 | py | Python | i2cylib/__init__.py | i2cy/i2cylib | f7f5c8ec320669bc17d065f0ec2aa74917954bac | [
"MIT"
] | 1 | 2021-04-17T06:45:31.000Z | 2021-04-17T06:45:31.000Z | i2cylib/__init__.py | i2cy/i2cylib | f7f5c8ec320669bc17d065f0ec2aa74917954bac | [
"MIT"
] | null | null | null | i2cylib/__init__.py | i2cy/i2cylib | f7f5c8ec320669bc17d065f0ec2aa74917954bac | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# -*- coding: utf-8 -*-
# Author: i2cy(i2cy@outlook.com)
# Filename: __init__.py
# Created on: 2021/3/6
name = "i2cylib"
description = "This is a universal package contains a lot of useful functions and tools written by I2cy."
import i2cylib.crypto
import i2cylib.database
import i2cylib.... | 25.2 | 106 | 0.730159 |
1cf9ce4964dd6f1820cbe1c33875873a2a7aed70 | 235 | py | Python | dotnetclr/datadog_checks/dotnetclr/__init__.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 4 | 2021-06-21T19:21:49.000Z | 2021-06-23T21:21:55.000Z | dotnetclr/datadog_checks/dotnetclr/__init__.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 1 | 2018-08-15T05:50:17.000Z | 2018-08-15T05:50:17.000Z | dotnetclr/datadog_checks/dotnetclr/__init__.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 1 | 2018-08-15T05:45:42.000Z | 2018-08-15T05:45:42.000Z | # (C) Datadog, Inc. 2018
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from .__about__ import __version__
from .dotnetclr import DotnetclrCheck
__all__ = [
'__version__',
'DotnetclrCheck'
]
| 21.363636 | 59 | 0.73617 |
1cf9d578812643ca930771f5f06b88a2e273355b | 1,295 | py | Python | 2020-08-28 - aula02 - desenvolvimento hello world/nps.py | gustavospiess/bcc_2020_2_prjsft2 | 419f3f49df30838784807dcaf8a1e6f95875d625 | [
"MIT"
] | null | null | null | 2020-08-28 - aula02 - desenvolvimento hello world/nps.py | gustavospiess/bcc_2020_2_prjsft2 | 419f3f49df30838784807dcaf8a1e6f95875d625 | [
"MIT"
] | null | null | null | 2020-08-28 - aula02 - desenvolvimento hello world/nps.py | gustavospiess/bcc_2020_2_prjsft2 | 419f3f49df30838784807dcaf8a1e6f95875d625 | [
"MIT"
] | null | null | null | import npyscreen
class TestApp(npyscreen.NPSApp):
def main(self):
# These lines create the form and populate it with widgets.
# A fairly complex screen in only 8 or so lines of code - a line for each control.
F = npyscreen.Form(name = 'Welcome to Npyscreen',)
t = F.add(npyscreen.Ti... | 46.25 | 97 | 0.611583 |
1cf9dc980819023e446cb7f1fc7de54f45d2b4e8 | 8,249 | py | Python | darknet_rt/capture_video/q_vid.py | vhshen/AAMS | b21d55ac3ac64fed5e83d0e5a54dc12231f921c6 | [
"MIT"
] | null | null | null | darknet_rt/capture_video/q_vid.py | vhshen/AAMS | b21d55ac3ac64fed5e83d0e5a54dc12231f921c6 | [
"MIT"
] | null | null | null | darknet_rt/capture_video/q_vid.py | vhshen/AAMS | b21d55ac3ac64fed5e83d0e5a54dc12231f921c6 | [
"MIT"
] | 2 | 2020-03-03T22:26:29.000Z | 2020-12-27T07:52:46.000Z | import cv2 as cv
import argparse
import numpy as np
import time
from threading import Thread
from queue import LifoQueue
import imutils
# Initialize the parameters
nmsThreshold = 0.4 #Non-maximum suppression threshold
inpWidth = 416 #Width of network's input image
inpHeight = 416 #Height of network's inpu... | 35.556034 | 116 | 0.639714 |
1cf9dceff7883d55876206cf22514c8fffd0ec84 | 16,015 | py | Python | pandaharvester/harvesterbody/worker_adjuster.py | tsulaiav/harvester | ca3f78348019dd616738f2da7d50e81700a8e6b9 | [
"Apache-2.0"
] | 7 | 2019-08-30T07:35:48.000Z | 2022-02-13T14:46:53.000Z | pandaharvester/harvesterbody/worker_adjuster.py | tsulaiav/harvester | ca3f78348019dd616738f2da7d50e81700a8e6b9 | [
"Apache-2.0"
] | 29 | 2019-09-20T14:04:37.000Z | 2021-09-13T12:53:05.000Z | pandaharvester/harvesterbody/worker_adjuster.py | tsulaiav/harvester | ca3f78348019dd616738f2da7d50e81700a8e6b9 | [
"Apache-2.0"
] | 15 | 2019-07-30T11:48:29.000Z | 2022-03-29T21:49:05.000Z | import copy
from future.utils import iteritems
from pandaharvester.harvesterconfig import harvester_config
from pandaharvester.harvestercore import core_utils
from pandaharvester.harvestercore.db_proxy_pool import DBProxyPool as DBProxy
from pandaharvester.harvestercore.plugin_factory import PluginFactory
from pandaha... | 62.073643 | 156 | 0.508086 |
1cf9fae056573d65ec1217c7e72019fa4722dfaa | 3,600 | py | Python | vaccine_feed_ingest/ingestors/arcgis.py | Vaccinebot/vaccine-feed-ingest | d1a330e215b1c4ad167e4c52b81d5d3e1d1d9faf | [
"MIT"
] | null | null | null | vaccine_feed_ingest/ingestors/arcgis.py | Vaccinebot/vaccine-feed-ingest | d1a330e215b1c4ad167e4c52b81d5d3e1d1d9faf | [
"MIT"
] | null | null | null | vaccine_feed_ingest/ingestors/arcgis.py | Vaccinebot/vaccine-feed-ingest | d1a330e215b1c4ad167e4c52b81d5d3e1d1d9faf | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import json
import logging
from os.path import join
from typing import Optional, Sequence
import urllib3
from arcgis import GIS
http = urllib3.PoolManager()
# Configure logger
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s %(levelname)s:%(name)s:%(message)s",
datefmt... | 26.666667 | 82 | 0.616389 |
1cfa16ec4af2bf40ba251248516d649def0460f8 | 3,892 | py | Python | subt/tools/logschecker.py | robotika/osgar | 6f4f584d5553ab62c08a1c7bb493fefdc9033173 | [
"MIT"
] | 12 | 2017-02-16T10:22:59.000Z | 2022-03-20T05:48:06.000Z | subt/tools/logschecker.py | robotika/osgar | 6f4f584d5553ab62c08a1c7bb493fefdc9033173 | [
"MIT"
] | 618 | 2016-08-30T04:46:12.000Z | 2022-03-25T16:03:10.000Z | subt/tools/logschecker.py | robotika/osgar | 6f4f584d5553ab62c08a1c7bb493fefdc9033173 | [
"MIT"
] | 11 | 2016-08-27T20:02:55.000Z | 2022-03-07T08:53:53.000Z | """
Quick check of kloubak logfiles.
"""
import os
import numpy as np
from osgar.logger import LogReader, lookup_stream_id
from osgar.lib.serialize import deserialize
# Relevant streams, expected min frequency and expected max gap between msg.
g_relevant_streams = { # used just for kloubak robot
"klouba... | 37.066667 | 145 | 0.59147 |
1cfa1e0bc12fb4943cfefdf88dfd76c1e8d12a9a | 2,653 | py | Python | devbot/commands/xkcd.py | DevOps-Utrecht/DevOps-Bot | b2557a8103cdaa2aab99b139df934e581e3ce4a8 | [
"MIT"
] | 6 | 2018-05-24T21:48:43.000Z | 2018-12-13T07:51:00.000Z | devbot/commands/xkcd.py | DevOps-Utrecht/DevOps-Bot | b2557a8103cdaa2aab99b139df934e581e3ce4a8 | [
"MIT"
] | 10 | 2018-05-25T05:18:16.000Z | 2019-03-18T07:25:46.000Z | devbot/commands/xkcd.py | DevOps-Utrecht/DevOps-Bot | b2557a8103cdaa2aab99b139df934e581e3ce4a8 | [
"MIT"
] | 1 | 2018-05-25T08:20:22.000Z | 2018-05-25T08:20:22.000Z | """ xkcd comic command. """
import random
import discord
from sqlalchemy import or_
import devbot.database as db
from devbot.registry import Command
from devbot.tools import api_requests
def embed(title, image_url) -> discord.Embed:
""" Build an Embed with the given image URL. """
result = discord.Embed()
... | 33.582278 | 83 | 0.520166 |
1cfa67ca9eb44f50380daaa3ac6816b4ad64c0c4 | 6,045 | py | Python | tests/rbac/common/role/reject_member_test.py | knagware9/sawtooth-next-directory | be80852e08d2b27e105d964c727509f2a974002d | [
"Apache-2.0"
] | null | null | null | tests/rbac/common/role/reject_member_test.py | knagware9/sawtooth-next-directory | be80852e08d2b27e105d964c727509f2a974002d | [
"Apache-2.0"
] | null | null | null | tests/rbac/common/role/reject_member_test.py | knagware9/sawtooth-next-directory | be80852e08d2b27e105d964c727509f2a974002d | [
"Apache-2.0"
] | 1 | 2018-12-07T10:55:08.000Z | 2018-12-07T10:55:08.000Z | # Copyright 2018 Contributors to Hyperledger Sawtooth
#
# 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 ... | 39.253247 | 86 | 0.676096 |
1cfa7b371a5224730b711cf5c3e97e7891da031e | 2,097 | py | Python | stdplugins/dogbin.py | dqanshi/alluka | f1ac5b227f4e12a4363c6e06b8acc0fd5aac6f1c | [
"Apache-2.0"
] | 1 | 2020-08-02T11:14:29.000Z | 2020-08-02T11:14:29.000Z | stdplugins/dogbin.py | dqanshi/alluka | f1ac5b227f4e12a4363c6e06b8acc0fd5aac6f1c | [
"Apache-2.0"
] | null | null | null | stdplugins/dogbin.py | dqanshi/alluka | f1ac5b227f4e12a4363c6e06b8acc0fd5aac6f1c | [
"Apache-2.0"
] | 1 | 2020-05-31T07:19:52.000Z | 2020-05-31T07:19:52.000Z | import asyncio
from datetime import datetime
import os
import requests
from uniborg.util import admin_cmd
import logging
from telethon import events
logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
level=logging.WARN)
def progress(current, total):
logger.info(... | 36.789474 | 131 | 0.613257 |
1cfa815fd0f283f6984499bd9628fe60103a78a4 | 10,701 | py | Python | prob_mbrl/models/core.py | mcgillmrl/prob_mbrl | 0bfb70b31675310539f241f62bba8427d940d551 | [
"MIT"
] | 108 | 2018-10-24T07:59:14.000Z | 2021-11-28T05:29:35.000Z | prob_mbrl/models/core.py | juancamilog/prob_mbrl | 391a0eb9f9762504d0e84a98d6911a3c619c560b | [
"MIT"
] | 8 | 2019-08-14T00:20:13.000Z | 2019-10-18T01:45:29.000Z | prob_mbrl/models/core.py | mcgillmrl/prob_mbrl | 0bfb70b31675310539f241f62bba8427d940d551 | [
"MIT"
] | 14 | 2019-06-27T10:10:08.000Z | 2020-08-31T03:16:22.000Z | import copy
import inspect
import multiprocessing
import numpy as np
import torch
from .modules import BDropout, BSequential, SpectralNorm
from collections import OrderedDict, Iterable
from functools import partial
from ..utils.angles import to_complex
from prob_mbrl.models import activations
from ..utils.core import ... | 35.200658 | 79 | 0.592468 |
1cfa9650c24e9010b4b0a1058ea62236c4650ce5 | 839 | py | Python | indra/tests/test_biogrid.py | djinnome/indra | 382b7f236e0b1422c96a268ef873530b5e92d48f | [
"BSD-2-Clause"
] | null | null | null | indra/tests/test_biogrid.py | djinnome/indra | 382b7f236e0b1422c96a268ef873530b5e92d48f | [
"BSD-2-Clause"
] | null | null | null | indra/tests/test_biogrid.py | djinnome/indra | 382b7f236e0b1422c96a268ef873530b5e92d48f | [
"BSD-2-Clause"
] | null | null | null | import os
from indra.statements import Complex
from indra.sources.biogrid import BiogridProcessor
this_dir = os.path.dirname(__file__)
test_file = os.path.join(this_dir, 'biogrid_tests_data/biogrid_test.txt')
def test_biogrid_tsv():
# Download biogrid file form the web and process it
bp = BiogridProcessor(te... | 29.964286 | 73 | 0.715137 |
1cfae1ffcfeab39525db6d035e01c6de14f419ec | 20 | py | Python | g2ppy/__init__.py | ishine/g2ps | 49083b0ca8a49d094dcbb2c57a0869e05ab320f2 | [
"MIT"
] | 72 | 2018-09-04T07:48:54.000Z | 2022-03-09T16:07:16.000Z | g2ppy/__init__.py | shenyileirob/g2ps | 49083b0ca8a49d094dcbb2c57a0869e05ab320f2 | [
"MIT"
] | null | null | null | g2ppy/__init__.py | shenyileirob/g2ps | 49083b0ca8a49d094dcbb2c57a0869e05ab320f2 | [
"MIT"
] | 14 | 2019-09-06T22:59:18.000Z | 2022-03-09T14:02:50.000Z | import _train.train
| 10 | 19 | 0.85 |
1cfaeebfb18f85ee6e5769a290679f448aeabde2 | 3,953 | py | Python | atom/nucleus/python/nucleus_api/models/budget_aggregation_account.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | atom/nucleus/python/nucleus_api/models/budget_aggregation_account.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | atom/nucleus/python/nucleus_api/models/budget_aggregation_account.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Hydrogen Nucleus API
The Hydrogen Nucleus API # noqa: E501
OpenAPI spec version: 1.9.5
Contact: info@hydrogenplatform.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from nucleus_api.configuration i... | 31.125984 | 113 | 0.61447 |
1cfb22629796979005f2ab59489eae575556833a | 7,975 | py | Python | src/SREA_single_experiment.py | Castel44/SREA | cbc20cca32377659ed68276e21c393bd913d4eb3 | [
"CC0-1.0"
] | 5 | 2021-08-16T09:18:18.000Z | 2022-02-05T02:32:30.000Z | src/SREA_single_experiment.py | Castel44/SREA | cbc20cca32377659ed68276e21c393bd913d4eb3 | [
"CC0-1.0"
] | 1 | 2021-12-15T10:37:52.000Z | 2021-12-16T04:10:17.000Z | src/SREA_single_experiment.py | Castel44/SREA | cbc20cca32377659ed68276e21c393bd913d4eb3 | [
"CC0-1.0"
] | null | null | null | import argparse
import logging
import os
import shutil
import sys
import warnings
import matplotlib.pyplot as plt
import numpy as np
import torch
from sklearn.model_selection import train_test_split
from src.utils.SREA_utils import main_wrapper
from src.utils.global_var import OUTPATH
from src.utils.log_utils import ... | 44.060773 | 120 | 0.611411 |
1cfb7f8299acc65733e4975a0294b7deb9f29f3a | 830 | py | Python | pyplan/pyplan/usercompanies/models.py | jorgedouglas71/pyplan-ide | 5ad0e4a2592b5f2716ff680018f717c65de140f5 | [
"MIT"
] | 17 | 2019-12-04T19:22:19.000Z | 2021-07-28T11:17:05.000Z | pyplan/pyplan/usercompanies/models.py | jorgedouglas71/pyplan-ide | 5ad0e4a2592b5f2716ff680018f717c65de140f5 | [
"MIT"
] | 9 | 2019-12-13T15:34:43.000Z | 2022-02-10T11:43:00.000Z | pyplan/pyplan/usercompanies/models.py | jorgedouglas71/pyplan-ide | 5ad0e4a2592b5f2716ff680018f717c65de140f5 | [
"MIT"
] | 5 | 2019-12-04T15:57:06.000Z | 2021-08-20T19:59:26.000Z | from django.db import models
from pyplan.pyplan.companies.models import Company
from pyplan.pyplan.department.models import Department
from pyplan.pyplan.preference.models import Preference
from pyplan.pyplan.users.models import User
class UserCompany(models.Model):
user = models.ForeignKey(User, on_delete=models.... | 39.52381 | 93 | 0.766265 |
1cfbbc8ee150e1eb5196f680d4c594346f6c3c59 | 117,404 | py | Python | tests/www/test_views.py | joshowen/airflow | d0cf232919839d0e338dcc38a5c7a1841077eaae | [
"Apache-2.0"
] | null | null | null | tests/www/test_views.py | joshowen/airflow | d0cf232919839d0e338dcc38a5c7a1841077eaae | [
"Apache-2.0"
] | null | null | null | tests/www/test_views.py | joshowen/airflow | d0cf232919839d0e338dcc38a5c7a1841077eaae | [
"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... | 41.558938 | 108 | 0.626657 |
1cfbd121eaea7b173cb11194382c427bb6e517be | 3,479 | py | Python | forte/processors/ir/elastic_search_index_processor.py | swapnull7/forte | 737a72afd440d40c3826c3a7c5e4e44235c0f701 | [
"Apache-2.0"
] | 2 | 2021-01-01T12:07:27.000Z | 2021-09-10T03:57:18.000Z | forte/processors/ir/elastic_search_index_processor.py | swapnull7/forte | 737a72afd440d40c3826c3a7c5e4e44235c0f701 | [
"Apache-2.0"
] | null | null | null | forte/processors/ir/elastic_search_index_processor.py | swapnull7/forte | 737a72afd440d40c3826c3a7c5e4e44235c0f701 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 The Forte 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 applicable ... | 34.107843 | 77 | 0.598448 |
1cfbf18da624fc170431833205b8365e9c1a73ad | 9,802 | py | Python | src/coalescenceml/stack_store/local_stack_store.py | CornellDataScience/CoalescenceML | 6dd849b272c77011719952b47d5b55684d90733a | [
"Apache-2.0"
] | 1 | 2022-03-22T17:48:55.000Z | 2022-03-22T17:48:55.000Z | src/coalescenceml/stack_store/local_stack_store.py | CornellDataScience/CoalescenceML | 6dd849b272c77011719952b47d5b55684d90733a | [
"Apache-2.0"
] | 2 | 2022-02-18T18:48:12.000Z | 2022-02-19T18:14:38.000Z | src/coalescenceml/stack_store/local_stack_store.py | CornellDataScience/CoalescenceML | 6dd849b272c77011719952b47d5b55684d90733a | [
"Apache-2.0"
] | 1 | 2022-02-10T02:52:22.000Z | 2022-02-10T02:52:22.000Z | import base64
import json
import os
import re
from pathlib import Path
from typing import Any, Dict, List, Optional, Tuple
from coalescenceml.enums import DirectoryStoreFlavor, StackComponentFlavor
from coalescenceml.io import fileio, utils
from coalescenceml.logger import get_logger
from coalescenceml.stack.exception... | 34.758865 | 80 | 0.619465 |
1cfc09819620c13012d0d27e6a86627f8650674d | 6,022 | py | Python | digideep/environment/common/vec_env/shmem_vec_env.py | sharif1093/digideep | e42f10a58cec6cab70ac2be5ce3af6102caefd81 | [
"BSD-2-Clause"
] | 11 | 2019-03-09T23:54:02.000Z | 2020-09-05T20:47:55.000Z | log_sessions/cartpole_8_5_05_1/modules/digideep/environment/common/vec_env/shmem_vec_env.py | godnpeter/DMC_Clustering_PICA | 1b3e14dd4034f3941af1caa06c1d4b6f9d606408 | [
"BSD-2-Clause"
] | 1 | 2021-09-30T01:15:57.000Z | 2021-09-30T01:15:57.000Z | digideep/environment/common/vec_env/shmem_vec_env.py | sharif1093/digideep | e42f10a58cec6cab70ac2be5ce3af6102caefd81 | [
"BSD-2-Clause"
] | null | null | null | """
The MIT License
Copyright (c) 2017 OpenAI (http://openai.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify... | 37.403727 | 128 | 0.632016 |
1cfc14680ae03be609885f7bb2e34c82eff89f0b | 19,811 | py | Python | zerver/lib/test_classes.py | dehnert/zulip | f5935e81c7cf2f11ff4ccfcd31d2a1061b8d7ff5 | [
"Apache-2.0"
] | null | null | null | zerver/lib/test_classes.py | dehnert/zulip | f5935e81c7cf2f11ff4ccfcd31d2a1061b8d7ff5 | [
"Apache-2.0"
] | null | null | null | zerver/lib/test_classes.py | dehnert/zulip | f5935e81c7cf2f11ff4ccfcd31d2a1061b8d7ff5 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
from __future__ import print_function
from contextlib import contextmanager
from typing import (cast, Any, Callable, Dict, Generator, Iterable, List, Mapping, Optional,
Sized, Tuple, Union)
from django.core.urlresolvers import resolve
from django.conf import settings
from dja... | 41.18711 | 140 | 0.644894 |
1cfc1958b2ae1481b404bdf92b9019469480facb | 42,061 | py | Python | electrum/keystore.py | particl/electrum | f1b8c13636c9ffcf6fd37a03340d4eff2d7f0354 | [
"MIT"
] | null | null | null | electrum/keystore.py | particl/electrum | f1b8c13636c9ffcf6fd37a03340d4eff2d7f0354 | [
"MIT"
] | null | null | null | electrum/keystore.py | particl/electrum | f1b8c13636c9ffcf6fd37a03340d4eff2d7f0354 | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
# -*- mode: python -*-
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2016 The Electrum developers
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without... | 37.454141 | 113 | 0.655286 |
1cfc3da5f674528310c2afe5401e9704c5609c85 | 6,837 | py | Python | Barbican/Server/barbican-stable-mitaka/barbican/barbican/tests/model/repositories/test_repositories_consumers.py | cloud-security-research/sgx-kms | 2f07bf36721dafe0e4a000ca3f41529dc8d2004a | [
"Apache-2.0"
] | 36 | 2017-11-08T23:36:35.000Z | 2022-03-20T16:01:55.000Z | Barbican/Server/barbican-stable-mitaka/barbican/barbican/tests/model/repositories/test_repositories_consumers.py | Calctopia-OpenSource/sgx-kms | 2f07bf36721dafe0e4a000ca3f41529dc8d2004a | [
"Apache-2.0"
] | 2 | 2017-11-17T03:19:17.000Z | 2018-07-04T03:37:36.000Z | Barbican/Server/barbican-stable-mitaka/barbican/barbican/tests/model/repositories/test_repositories_consumers.py | Calctopia-OpenSource/sgx-kms | 2f07bf36721dafe0e4a000ca3f41529dc8d2004a | [
"Apache-2.0"
] | 12 | 2017-11-13T03:20:40.000Z | 2021-07-16T03:26:41.000Z | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under th... | 36.174603 | 78 | 0.653796 |
1cfc4cee47701a5eb10d68e624307a135b9db615 | 2,496 | py | Python | validation-scripts/ice_validator/tests/test_heat_template_parameters_contain_required_fields.py | onap/vnfsdk-ice | 5fd4855accef1da2d19dec70c839fdd4080cbcb7 | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | validation-scripts/ice_validator/tests/test_heat_template_parameters_contain_required_fields.py | onap/vnfsdk-ice | 5fd4855accef1da2d19dec70c839fdd4080cbcb7 | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | validation-scripts/ice_validator/tests/test_heat_template_parameters_contain_required_fields.py | onap/vnfsdk-ice | 5fd4855accef1da2d19dec70c839fdd4080cbcb7 | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | # -*- coding: utf8 -*-
# ============LICENSE_START=======================================================
# org.onap.vvp/validation-scripts
# ===================================================================
# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
# ========================================... | 37.253731 | 82 | 0.65024 |
1cfc94c7df16967dd3a638e067f5c0d3a40e09c8 | 2,136 | py | Python | core/client.py | cachedout/eventdriventalk | 194061e8cdf9c72afa5f5d7d6c015e35026710bd | [
"Apache-2.0"
] | 7 | 2016-10-08T03:48:47.000Z | 2019-06-06T10:37:00.000Z | core/client.py | cachedout/eventdriventalk | 194061e8cdf9c72afa5f5d7d6c015e35026710bd | [
"Apache-2.0"
] | null | null | null | core/client.py | cachedout/eventdriventalk | 194061e8cdf9c72afa5f5d7d6c015e35026710bd | [
"Apache-2.0"
] | 1 | 2018-10-12T17:39:56.000Z | 2018-10-12T17:39:56.000Z | # -*- encoding: utf-8 -*-
import os
import zmq
import yaml
import core.framer
import core.loader
import zmq.eventloop
import zmq.eventloop.zmqstream
import multiprocessing
'''
Create a basic Actor that can take requests
from a Publisher and spawn processes to perform
the actions
'''
CONFIG_LOCATION = '/home/mp/devel/... | 28.105263 | 94 | 0.603933 |
1cfcb88e398ed188a4e48b7bba03c1526a299013 | 2,464 | py | Python | 2021_python/04/ga.py | pantadeusz/meh | 16d2826330c9bfdb4c7a315f2f69ec33b464541d | [
"MIT"
] | null | null | null | 2021_python/04/ga.py | pantadeusz/meh | 16d2826330c9bfdb4c7a315f2f69ec33b464541d | [
"MIT"
] | 1 | 2019-10-18T07:14:26.000Z | 2019-10-18T18:54:26.000Z | 2021_python/04/ga.py | pantadeusz/meh | 16d2826330c9bfdb4c7a315f2f69ec33b464541d | [
"MIT"
] | 2 | 2019-10-24T08:50:00.000Z | 2020-03-29T06:10:20.000Z | from hashlib import new
import random
import copy
import operator
import multiprocessing
def oneMax(chromosome):
result = 0.0
for c in chromosome:
result = result + c
return result
def crossoverOnePoint(chromosomes):
[chromosome1, chromosome2] = chromosomes
r = random.randint(0,len(chromo... | 28.988235 | 92 | 0.631899 |
1cfcbb20964ca7a957fa663ed26b846cf44f33d5 | 2,554 | py | Python | lambda_function.py | calebmcook/amazon-textract-analyze-expense-processing-pipeline | 32b52301ebba54b01f7d84583322958ec1bbb2af | [
"MIT-0"
] | 4 | 2021-09-21T12:58:28.000Z | 2022-01-14T17:42:15.000Z | lambda_function.py | calebmcook/amazon-textract-analyze-expense-processing-pipeline | 32b52301ebba54b01f7d84583322958ec1bbb2af | [
"MIT-0"
] | null | null | null | lambda_function.py | calebmcook/amazon-textract-analyze-expense-processing-pipeline | 32b52301ebba54b01f7d84583322958ec1bbb2af | [
"MIT-0"
] | 4 | 2021-08-04T06:01:29.000Z | 2022-02-26T17:00:32.000Z | """
Author: Manish Chugh
Lambda function for Amazon Textract AnalyzeExpense to help analyze expenses.This
function listens to s3 event notifications of every image upload to source s3
bucket and generates textract analyze expense output in easily digestable .txt
or any other output of your choice
"""
import os
impo... | 38.119403 | 216 | 0.699295 |
1cfcbbbdbb863ba8e9ca9ac5447e08f6a7e40b14 | 2,194 | py | Python | src/vassal_deployer/deploy.py | evansde77/vassal_deployer | 4aaadd35b81c454a6264540f5fb795bfc1daa991 | [
"Apache-2.0"
] | null | null | null | src/vassal_deployer/deploy.py | evansde77/vassal_deployer | 4aaadd35b81c454a6264540f5fb795bfc1daa991 | [
"Apache-2.0"
] | null | null | null | src/vassal_deployer/deploy.py | evansde77/vassal_deployer | 4aaadd35b81c454a6264540f5fb795bfc1daa991 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
deploy
"""
import os
from .vassal_config import VassalConfig
from .nginx_config import NginxSite
from . import logger
def list_vassals_configs(directory):
"""
find all *.ini files in the given directory path
:param directory: file system path containing *.ini files
:return... | 26.756098 | 74 | 0.669553 |
1cfcc1c43e13a54e18d9052bfeb41375f2e2feec | 2,459 | py | Python | src/main/py/com/example/kafka/k_producer.py | brijeshdhaker/spark-python-examples | bb3504d21c073448c336c228f74449de68853b8d | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2021-07-18T16:23:56.000Z | 2021-07-18T16:23:56.000Z | src/main/py/com/example/kafka/k_producer.py | brijeshdhaker/spark-python-examples | bb3504d21c073448c336c228f74449de68853b8d | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/main/py/com/example/kafka/k_producer.py | brijeshdhaker/spark-python-examples | bb3504d21c073448c336c228f74449de68853b8d | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# Copyright 2020 Confluent Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 32.786667 | 86 | 0.624237 |
1cfcd888a63a80895c311329b2d3e29f6d97f9a0 | 574 | py | Python | setup.py | vnep-approx/evaluation-ifip-networking-2020 | 9fa891f0a0cd527accd2b4bb872a577e46f05053 | [
"MIT"
] | null | null | null | setup.py | vnep-approx/evaluation-ifip-networking-2020 | 9fa891f0a0cd527accd2b4bb872a577e46f05053 | [
"MIT"
] | null | null | null | setup.py | vnep-approx/evaluation-ifip-networking-2020 | 9fa891f0a0cd527accd2b4bb872a577e46f05053 | [
"MIT"
] | null | null | null | from setuptools import setup
install_requires = [
# "gurobipy", # install this manually
# "alib", # install this manually
# "vnep_approx" , # install this manually
"matplotlib>=2.2,<2.3",
"numpy",
"click==6.7",
"pyyaml",
"jsonpickle",
]
setup(
name="evaluation-ifip-network... | 24.956522 | 88 | 0.632404 |
1cfcffed892c78de2b3ceb60759ca8da943e707f | 13,547 | py | Python | hyperts/utils/data_ops.py | oaksharks/HyperTS | cecb38f3ce3c8b0ff9ead82670447457f6de6c56 | [
"Apache-2.0"
] | null | null | null | hyperts/utils/data_ops.py | oaksharks/HyperTS | cecb38f3ce3c8b0ff9ead82670447457f6de6c56 | [
"Apache-2.0"
] | 1 | 2021-12-08T02:08:58.000Z | 2021-12-08T02:08:58.000Z | hyperts/utils/data_ops.py | newbei/HyperTS | cecb38f3ce3c8b0ff9ead82670447457f6de6c56 | [
"Apache-2.0"
] | 1 | 2021-12-07T01:32:44.000Z | 2021-12-07T01:32:44.000Z | import numpy as np
import pandas as pd
import datetime
import chinese_calendar
from sklearn.preprocessing import OrdinalEncoder
class offsets_pool:
neighbor = [-1, 1]
second = [-1, 1, -60 * 4, -60 * 3, -60 * 2, -60 * 1, 60 * 1, 60 * 2, 60 * 3, 60 * 4]
minute = [-1, 1, -60 * 4, -60 * 3, -60 * 2, -60 * 1, ... | 38.268362 | 107 | 0.607441 |
1cfd039621031725a40d3ef7fc7e48775197cbe8 | 47 | py | Python | tests/__init__.py | trappitsch/pyqtconfig | 511da833671a0275edcdfdb5fd36a34658856313 | [
"BSD-3-Clause"
] | 47 | 2015-01-03T13:15:16.000Z | 2020-02-02T07:49:12.000Z | tests/__init__.py | trappitsch/pyqtconfig | 511da833671a0275edcdfdb5fd36a34658856313 | [
"BSD-3-Clause"
] | 20 | 2021-05-03T18:02:23.000Z | 2022-03-12T12:01:04.000Z | tests/__init__.py | trappitsch/pyqtconfig | 511da833671a0275edcdfdb5fd36a34658856313 | [
"BSD-3-Clause"
] | 22 | 2015-05-27T20:40:05.000Z | 2019-11-05T01:49:32.000Z | """
Copyright © 2015 by Stefan Lehmann
""" | 11.75 | 38 | 0.595745 |
1cfd085cdf153d21c44df46fdd1596dae64ca711 | 1,292 | py | Python | intel_iot/util/gpio.py | K900/intel_iot | f8ce2038b2355fcbcdc3ccebc1670fc39a62eb19 | [
"MIT"
] | 2 | 2015-08-23T14:00:40.000Z | 2015-12-16T07:14:41.000Z | intel_iot/util/gpio.py | K900/intel_iot | f8ce2038b2355fcbcdc3ccebc1670fc39a62eb19 | [
"MIT"
] | null | null | null | intel_iot/util/gpio.py | K900/intel_iot | f8ce2038b2355fcbcdc3ccebc1670fc39a62eb19 | [
"MIT"
] | null | null | null | import logging
import os.path
from intel_iot.util.file import write_ignore_busy, write_file, read_file
DIRECTION_IN = "in"
DIRECTION_OUT = "out"
log = logging.getLogger("intel_iot.util.gpio")
def _make_path(pin, option):
return os.path.join("/sys/class/gpio/gpio{}/".format(pin), option)
def export(pin):
... | 22.666667 | 80 | 0.687307 |
1cfd09de42d5daa89c02dc2b28b5966853b9f8b5 | 6,275 | py | Python | configs/human_pose_estimation.py | LaudateCorpus1/edgeai-benchmark | bc7f3c52862133f5fe8409248c21887b3f930a68 | [
"BSD-3-Clause"
] | 7 | 2021-07-31T16:41:57.000Z | 2022-03-30T23:29:12.000Z | configs/human_pose_estimation.py | LaudateCorpus1/edgeai-benchmark | bc7f3c52862133f5fe8409248c21887b3f930a68 | [
"BSD-3-Clause"
] | 3 | 2022-02-09T17:39:02.000Z | 2022-03-30T07:07:06.000Z | configs/human_pose_estimation.py | LaudateCorpus1/edgeai-benchmark | bc7f3c52862133f5fe8409248c21887b3f930a68 | [
"BSD-3-Clause"
] | 3 | 2021-11-15T01:44:32.000Z | 2022-01-20T05:19:27.000Z | # Copyright (c) 2018-2021, Texas Instruments
# All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# list of condition... | 59.198113 | 131 | 0.694024 |
1cfd3a92aeaed0cd8b865164ae17129014b52d7f | 2,728 | py | Python | WelcomePage.py | ludhrani/Online-Bookstore | 8dcae3011e2672d278dc495eeabcc1d627b8ca92 | [
"MIT"
] | null | null | null | WelcomePage.py | ludhrani/Online-Bookstore | 8dcae3011e2672d278dc495eeabcc1d627b8ca92 | [
"MIT"
] | null | null | null | WelcomePage.py | ludhrani/Online-Bookstore | 8dcae3011e2672d278dc495eeabcc1d627b8ca92 | [
"MIT"
] | null | null | null | from Tkinter import *
from mysql.connector import MySQLConnection
from LogInPage import *
from SignInPage import *
USER = 'user'
PASSWORD = '****'
HOST = 'localhost'
DATABASE = 'bookStoreDB'
class WelcomePage(object):
'''
This is the initial class instantiated when the application starts.
I... | 34.1 | 80 | 0.609971 |
1cfd3b9a5c2ba8187fa50d257a5ab8bb9ae5ddd0 | 6,225 | py | Python | tests/test_hpxbeam.py | lucilecoutouly/nenupy | 8bfcab9558087f0696080d750293d9b8edc30665 | [
"MIT"
] | 4 | 2018-10-02T16:32:32.000Z | 2022-03-08T10:55:36.000Z | tests/test_hpxbeam.py | lucilecoutouly/nenupy | 8bfcab9558087f0696080d750293d9b8edc30665 | [
"MIT"
] | 54 | 2018-10-16T14:48:29.000Z | 2022-02-24T11:02:59.000Z | tests/test_hpxbeam.py | lucilecoutouly/nenupy | 8bfcab9558087f0696080d750293d9b8edc30665 | [
"MIT"
] | 2 | 2020-10-12T14:29:17.000Z | 2021-11-24T13:11:16.000Z | #! /usr/bin/python3
# -*- coding: utf-8 -*-
__author__ = 'Alan Loh'
__copyright__ = 'Copyright 2020, nenupy'
__credits__ = ['Alan Loh']
__maintainer__ = 'Alan'
__email__ = 'alan.loh@obspm.fr'
__status__ = 'Production'
import pytest
import numpy as np
import astropy.units as u
from astropy.time import Time
from unit... | 33.648649 | 71 | 0.455743 |
1cfd4131b861ec35d65d8d32590e18559ce58778 | 803 | py | Python | zerver/migrations/0032_verify_all_medium_avatar_images.py | dehnert/zulip | f5935e81c7cf2f11ff4ccfcd31d2a1061b8d7ff5 | [
"Apache-2.0"
] | null | null | null | zerver/migrations/0032_verify_all_medium_avatar_images.py | dehnert/zulip | f5935e81c7cf2f11ff4ccfcd31d2a1061b8d7ff5 | [
"Apache-2.0"
] | 1 | 2019-11-02T09:06:05.000Z | 2019-11-02T09:06:05.000Z | zerver/migrations/0032_verify_all_medium_avatar_images.py | erinis-eligro/zulip-outcasts | 51153a6ce219370aee79bfe462f6e4fb956993d9 | [
"Apache-2.0"
] | 1 | 2021-06-10T15:12:52.000Z | 2021-06-10T15:12:52.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor
from django.db.migrations.state import StateApps
from zerver.lib.upload import upload_backend
def verify_medium_avatar_image(apps, schema_ed... | 29.740741 | 78 | 0.765878 |
1cfd750a90e7749b2e87f2126b3bdae8628158c4 | 30,094 | py | Python | tensorflow_similarity/indexer.py | phillips96/similarity | 3794f288f17f47f1f90b5368e5c0eeac1e81e10d | [
"Apache-2.0"
] | 706 | 2021-09-04T02:11:05.000Z | 2022-03-31T13:29:14.000Z | tensorflow_similarity/indexer.py | phillips96/similarity | 3794f288f17f47f1f90b5368e5c0eeac1e81e10d | [
"Apache-2.0"
] | 119 | 2021-09-01T22:32:40.000Z | 2022-03-30T22:39:27.000Z | tensorflow_similarity/indexer.py | phillips96/similarity | 3794f288f17f47f1f90b5368e5c0eeac1e81e10d | [
"Apache-2.0"
] | 57 | 2021-09-04T02:11:14.000Z | 2022-03-31T13:29:15.000Z | # Copyright 2021 The TensorFlow 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 or agreed to ... | 36.970516 | 110 | 0.609457 |
1cfd9d936da5d6ff8953b0062179be6f6564b398 | 7,703 | py | Python | apps/tf_deepspeech/deepspeech/bin/import_swb.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/bin/import_swb.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/bin/import_swb.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
from __future__ import absolute_import, division, print_function
# Make sure we can import stuff from util/
# This script needs to be run from the root of the DeepSpeech repository
import sys
import os
sys.path.insert(1, os.path.join(sys.path[0], '..'))
import fnmatch
import pandas
import subpr... | 40.119792 | 132 | 0.655069 |
1cfdb47b003978a579614e925a957a8415fe1ce6 | 544 | py | Python | src/backend/app/crud/models/role.py | douglasdaly/web-app-skeleton | af7580822b18e714d7c0b54f6fdcd11bf57f16e0 | [
"MIT"
] | 1 | 2021-07-20T14:20:10.000Z | 2021-07-20T14:20:10.000Z | src/backend/app/crud/models/role.py | douglasdaly/web-app-skeleton | af7580822b18e714d7c0b54f6fdcd11bf57f16e0 | [
"MIT"
] | 4 | 2021-03-31T20:03:55.000Z | 2022-02-27T09:19:29.000Z | src/backend/app/crud/models/role.py | douglasdaly/web-app-skeleton | af7580822b18e714d7c0b54f6fdcd11bf57f16e0 | [
"MIT"
] | 1 | 2021-05-02T09:27:16.000Z | 2021-05-02T09:27:16.000Z | # -*- coding: utf-8 -*-
"""
Interface for User storage model.
"""
import typing as tp
from app.crud.models.base import Model, ModelBase
RoleType = tp.TypeVar('RoleType', bound='RoleBase')
class Role(Model, tp.Protocol):
"""
Interface for User objects.
"""
name: str
description: tp.Optional[str]
... | 18.758621 | 65 | 0.623162 |
1cfdbe0c214588a4dd6737825e09dc24b8a439a4 | 20,831 | py | Python | rod_motion_planning/rod_DiscoPygal/rod_DiscoPygal/gui/gui.py | galmw/AlgorithmicRobotics | 1a616a911e74fa965f34075bc2fc683876e1a6be | [
"MIT"
] | null | null | null | rod_motion_planning/rod_DiscoPygal/rod_DiscoPygal/gui/gui.py | galmw/AlgorithmicRobotics | 1a616a911e74fa965f34075bc2fc683876e1a6be | [
"MIT"
] | null | null | null | rod_motion_planning/rod_DiscoPygal/rod_DiscoPygal/gui/gui.py | galmw/AlgorithmicRobotics | 1a616a911e74fa965f34075bc2fc683876e1a6be | [
"MIT"
] | null | null | null | from PyQt5 import QtCore, QtGui, QtWidgets
#from PyQt5.QtOpenGL import QGLWidget, QGLFormat, QGL
from PyQt5.QtWidgets import (QApplication, QGraphicsView,
QGraphicsPixmapItem, QGraphicsScene, QGraphicsPolygonItem,
QGraphicsEllipseItem, QGraphicsLineItem, QGraphi... | 32.346273 | 119 | 0.609908 |
1cfddb5accfff95186ac0807bf8430b5b02fc283 | 8,564 | py | Python | joulescope/span.py | tadodotcom/pyjoulescope | ab9645a2774cf5d5355dee4c1e60a566419b0e00 | [
"Apache-2.0"
] | 29 | 2018-12-19T22:42:09.000Z | 2022-01-31T12:26:52.000Z | joulescope/span.py | tadodotcom/pyjoulescope | ab9645a2774cf5d5355dee4c1e60a566419b0e00 | [
"Apache-2.0"
] | 23 | 2019-07-21T23:44:46.000Z | 2022-03-11T13:29:11.000Z | joulescope/span.py | tadodotcom/pyjoulescope | ab9645a2774cf5d5355dee4c1e60a566419b0e00 | [
"Apache-2.0"
] | 9 | 2019-07-22T00:07:53.000Z | 2021-11-26T11:46:19.000Z | # Copyright 2018 Jetperch LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | 36.135021 | 93 | 0.578818 |
1cfe0aa6c1b305761e6b929f68eb0a2fe88536b6 | 22,065 | py | Python | backend/src/baserow/contrib/database/api/rows/views.py | ericderace/baserow | 7b35e81f75166d914d07ef4ad0c30c625b6bb396 | [
"MIT"
] | null | null | null | backend/src/baserow/contrib/database/api/rows/views.py | ericderace/baserow | 7b35e81f75166d914d07ef4ad0c30c625b6bb396 | [
"MIT"
] | 6 | 2021-04-08T22:03:06.000Z | 2022-01-13T03:38:17.000Z | backend/src/baserow/contrib/database/api/rows/views.py | ericderace/baserow | 7b35e81f75166d914d07ef4ad0c30c625b6bb396 | [
"MIT"
] | null | null | null | from django.db import transaction
from django.conf import settings
from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework.permissions import IsAuthenticated
from drf_spectacular.utils import extend_schema
from drf_spectacular.openapi import OpenApiParameter, OpenApiT... | 44.9389 | 88 | 0.629005 |
1cfe6eba09b6c5f14062a41391eb18508e5c144d | 396 | py | Python | hs_file_types/migrations/0006_reftimeseriesfilemetadata_abstract.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 178 | 2015-01-08T23:03:36.000Z | 2022-03-03T13:56:45.000Z | hs_file_types/migrations/0006_reftimeseriesfilemetadata_abstract.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 4,125 | 2015-01-01T14:26:15.000Z | 2022-03-31T16:38:55.000Z | hs_file_types/migrations/0006_reftimeseriesfilemetadata_abstract.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 53 | 2015-03-15T17:56:51.000Z | 2022-03-17T00:32:16.000Z | # -*- coding: utf-8 -*-
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('hs_file_types', '0006_auto_20170812_1621'),
]
operations = [
migrations.AddField(
model_name='reftimeseriesfilemetadata',
name='abstract',
... | 19.8 | 58 | 0.598485 |
1cfe6ed6d9e5110f3c3b63131905c052e8d865c0 | 1,893 | py | Python | datalook.py | tesfayeBris/sc-python | 2d39cf1bb397564fcbf08166caf464bde2a869ff | [
"MIT"
] | null | null | null | datalook.py | tesfayeBris/sc-python | 2d39cf1bb397564fcbf08166caf464bde2a869ff | [
"MIT"
] | null | null | null | datalook.py | tesfayeBris/sc-python | 2d39cf1bb397564fcbf08166caf464bde2a869ff | [
"MIT"
] | null | null | null |
# coding: utf-8
import sys
import numpy
import matplotlib.pyplot
def analyse(filename, outfile=None):
"""
This function load the data file with proper data type and delimiter.
Then, it plots data in subplots of average, maximum and minimum.
"""
data = numpy.loadtxt(fname=filename,... | 26.291667 | 77 | 0.636556 |
1cfe75cf3778a5714bb9a45a95de3d68688708f8 | 201 | py | Python | dddm/samplers/__init__.py | JoranAngevaare/dddm | 3461e37984bac4d850beafecc9d1881b84fb226c | [
"MIT"
] | null | null | null | dddm/samplers/__init__.py | JoranAngevaare/dddm | 3461e37984bac4d850beafecc9d1881b84fb226c | [
"MIT"
] | 85 | 2021-09-20T12:08:53.000Z | 2022-03-30T12:48:06.000Z | dddm/samplers/__init__.py | JoranAngevaare/dddm | 3461e37984bac4d850beafecc9d1881b84fb226c | [
"MIT"
] | null | null | null | from . import emcee
from .emcee import *
from . import nestle
from .nestle import *
from . import pymultinest
from .pymultinest import *
from .multi_detectors import *
from . import multi_detectors
| 16.75 | 30 | 0.766169 |
1cfe7b904fbb6ced46190b82e60cc936a45e5448 | 905 | py | Python | atom/nucleus/python/test/test_page_model_comment.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | atom/nucleus/python/test/test_page_model_comment.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | atom/nucleus/python/test/test_page_model_comment.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Hydrogen Nucleus API
The Hydrogen Nucleus API # noqa: E501
OpenAPI spec version: 1.9.5
Contact: info@hydrogenplatform.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import nucleus_api
from nu... | 22.073171 | 88 | 0.709392 |
1cfea16e41b65a6e7d4a3340b65ac5b306e53b20 | 5,882 | py | Python | src/interpreter/interpreter.py | margauxschmied/RAM_language_interpreter | 608d42f76d3a2bb28906cb7664b9f852f9aee805 | [
"MIT"
] | 3 | 2022-01-26T21:19:06.000Z | 2022-02-02T23:55:54.000Z | src/interpreter/interpreter.py | margauxschmied/RAM_language_interpreter | 608d42f76d3a2bb28906cb7664b9f852f9aee805 | [
"MIT"
] | null | null | null | src/interpreter/interpreter.py | margauxschmied/RAM_language_interpreter | 608d42f76d3a2bb28906cb7664b9f852f9aee805 | [
"MIT"
] | null | null | null | from typing import Dict, List
try:
from src.interpreter.instruction import *
from src.interpreter.cantor_int import *
from src.interpreter.interpreter import *
from src.interpreter.existing_macros import *
except:
from src.interpreter.instruction import *
from interpreter.cantor_int import *
... | 30.635417 | 104 | 0.529922 |
1cfec8a19380c7a477b3e930c8408a83bc878d00 | 2,293 | py | Python | gevent_fastcgi/const.py | momyc/gevent-fastcgi | 4fef82c5a73a24b288d0d6c47bb63ff47921e8dc | [
"MIT"
] | 11 | 2015-02-25T14:24:40.000Z | 2019-12-06T02:30:23.000Z | gevent_fastcgi/const.py | momyc/gevent-fastcgi | 4fef82c5a73a24b288d0d6c47bb63ff47921e8dc | [
"MIT"
] | 3 | 2015-12-05T14:20:52.000Z | 2019-12-21T01:00:01.000Z | gevent_fastcgi/const.py | momyc/gevent-fastcgi | 4fef82c5a73a24b288d0d6c47bb63ff47921e8dc | [
"MIT"
] | 7 | 2015-08-25T16:37:46.000Z | 2021-06-02T12:51:58.000Z | # Copyright (c) 2011-2013, Alexander Kulakov
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publ... | 31.410959 | 79 | 0.777584 |
1cfede70b7fd5bb390c7e70a3d46939059a06d13 | 7,209 | py | Python | pystemd/systemd1/unit.py | yoavtzelnick/pystemd | 7f9492bad49808b1b9b665dce619603e6ee70b42 | [
"BSD-3-Clause"
] | null | null | null | pystemd/systemd1/unit.py | yoavtzelnick/pystemd | 7f9492bad49808b1b9b665dce619603e6ee70b42 | [
"BSD-3-Clause"
] | null | null | null | pystemd/systemd1/unit.py | yoavtzelnick/pystemd | 7f9492bad49808b1b9b665dce619603e6ee70b42 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
#
# Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
... | 29.789256 | 87 | 0.603967 |
1cfefe3f1be00d2fa9aaff6c466995bf4c643015 | 1,534 | py | Python | tests/test_vectorized.py | CalebBell/ht | 3b95f9cfff30c8c0272443d523a484977eedbf0d | [
"MIT"
] | 118 | 2016-01-04T07:46:23.000Z | 2022-03-29T14:12:59.000Z | tests/test_vectorized.py | CalebBell/ht | 3b95f9cfff30c8c0272443d523a484977eedbf0d | [
"MIT"
] | 4 | 2017-06-27T08:01:02.000Z | 2020-10-06T14:18:46.000Z | tests/test_vectorized.py | CalebBell/ht | 3b95f9cfff30c8c0272443d523a484977eedbf0d | [
"MIT"
] | 22 | 2016-04-20T06:17:35.000Z | 2022-03-07T01:40:25.000Z | # -*- coding: utf-8 -*-
'''Chemical Engineering Design Library (ChEDL). Utilities for process modeling.
Copyright (C) 2017 Caleb Bell <Caleb.Andrew.Bell@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
... | 45.117647 | 79 | 0.779009 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.