hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8ab6b7c8d71f0cda06a229e8ccc03d12604ac015 | 11,871 | py | Python | pybind/slxos/v16r_1_00b/rbridge_id/threshold_monitor/security/policy/area/alert/below/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | null | null | null | pybind/slxos/v16r_1_00b/rbridge_id/threshold_monitor/security/policy/area/alert/below/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | null | null | null | pybind/slxos/v16r_1_00b/rbridge_id/threshold_monitor/security/policy/area/alert/below/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | 1 | 2021-11-05T22:15:42.000Z | 2021-11-05T22:15:42.000Z |
from operator import attrgetter
import pyangbind.lib.xpathhelper as xpathhelper
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType
from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType
from pyangbind.lib.base import PybindBase
from d... | 75.132911 | 737 | 0.699351 |
b6850b7a6dc846495c5f3d3cfa18563765e5fe7f | 835 | py | Python | env/lib/python3.8/site-packages/plotly/validators/indicator/_title.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 11,750 | 2015-10-12T07:03:39.000Z | 2022-03-31T20:43:15.000Z | env/lib/python3.8/site-packages/plotly/validators/indicator/_title.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 2,951 | 2015-10-12T00:41:25.000Z | 2022-03-31T22:19:26.000Z | env/lib/python3.8/site-packages/plotly/validators/indicator/_title.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 2,623 | 2015-10-15T14:40:27.000Z | 2022-03-28T16:05:50.000Z | import _plotly_utils.basevalidators
class TitleValidator(_plotly_utils.basevalidators.TitleValidator):
def __init__(self, plotly_name="title", parent_name="indicator", **kwargs):
super(TitleValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
dat... | 33.4 | 79 | 0.564072 |
ebdb1b16311b68661316bd07d89b2bc3e6fb97ab | 17,048 | py | Python | scripts/parallel.py | fplaza/CAMISIM | 4f2ab5e94773a355210568be946e732df7437cb6 | [
"Apache-2.0"
] | null | null | null | scripts/parallel.py | fplaza/CAMISIM | 4f2ab5e94773a355210568be946e732df7437cb6 | [
"Apache-2.0"
] | null | null | null | scripts/parallel.py | fplaza/CAMISIM | 4f2ab5e94773a355210568be946e732df7437cb6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
Copyright (C) 2014 Ivan Gregor
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
... | 33.559055 | 118 | 0.612916 |
7fc8fd0d61e0c8cd7eaf0226f6444297d301c2fd | 1,125 | py | Python | KLSelection.py | KTloong/MyCookbook_Python | 80c428fe9fb42c5e8328c666bc027adda61e100a | [
"MIT"
] | null | null | null | KLSelection.py | KTloong/MyCookbook_Python | 80c428fe9fb42c5e8328c666bc027adda61e100a | [
"MIT"
] | 1 | 2018-07-15T05:57:43.000Z | 2018-07-15T05:57:43.000Z | KLSelection.py | KTloong/MyCookbook_Python | 80c428fe9fb42c5e8328c666bc027adda61e100a | [
"MIT"
] | 3 | 2018-07-15T05:51:31.000Z | 2018-07-15T08:21:03.000Z | import os
from tkinter import filedialog
class KLSelection:
#pop up a window to select a folder
def Sfolder(self):
dirname = filedialog.askdirectory(initialdir=os.getcwd(),title='Please select a folder')
return dirname #type of dirname is str
#pop up a window to select a file
#return a ... | 32.142857 | 99 | 0.667556 |
387b57dfe1901f1a52ddd5fa2bae31509c738539 | 917 | bzl | Python | third_party/nasm/workspace.bzl | uve/tensorflow | e08079463bf43e5963acc41da1f57e95603f8080 | [
"Apache-2.0"
] | null | null | null | third_party/nasm/workspace.bzl | uve/tensorflow | e08079463bf43e5963acc41da1f57e95603f8080 | [
"Apache-2.0"
] | null | null | null | third_party/nasm/workspace.bzl | uve/tensorflow | e08079463bf43e5963acc41da1f57e95603f8080 | [
"Apache-2.0"
] | null | null | null | """loads the nasm library, used by TF."""
load("//third_party:repo.bzl", "third_party_http_archive")
def repo():
third_party_http_archive(
name = "nasm",
urls = [
"https://storage.googleapis.com/mirror.tensorflow.org/www.nasm.us/pub/nasm/releasebuilds/2.13.03/nasm-2.13.03.tar.b... | 50.944444 | 238 | 0.688113 |
33ed4b4eb6e60554e4b9307e1507bb21a37d62f8 | 4,786 | py | Python | nova/objects/instance_fault.py | viveknandavanam/nova | 556377b6915936467436c9d5bb33bc0e22244e1e | [
"Apache-2.0"
] | 1 | 2015-11-30T19:44:00.000Z | 2015-11-30T19:44:00.000Z | nova/objects/instance_fault.py | viveknandavanam/nova | 556377b6915936467436c9d5bb33bc0e22244e1e | [
"Apache-2.0"
] | 11 | 2017-06-19T01:28:55.000Z | 2017-06-23T02:01:47.000Z | nova/objects/instance_fault.py | viveknandavanam/nova | 556377b6915936467436c9d5bb33bc0e22244e1e | [
"Apache-2.0"
] | 7 | 2015-01-20T10:30:08.000Z | 2020-02-05T10:29:05.000Z | # Copyright 2013 IBM Corp.
#
# 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 agree... | 39.229508 | 79 | 0.629127 |
78181c6e41647c09649d9191662e862ccc9bc77e | 514 | py | Python | docs/core/benchmarks/timer.py | ioggstream/twisted | 34f9b1e3f097685839000c656332c66ee85be5d8 | [
"Unlicense",
"MIT"
] | 3 | 2020-04-02T06:23:44.000Z | 2020-08-13T20:32:31.000Z | docs/core/benchmarks/timer.py | ioggstream/twisted | 34f9b1e3f097685839000c656332c66ee85be5d8 | [
"Unlicense",
"MIT"
] | 1 | 2022-03-04T17:40:22.000Z | 2022-03-04T17:40:22.000Z | docs/core/benchmarks/timer.py | ioggstream/twisted | 34f9b1e3f097685839000c656332c66ee85be5d8 | [
"Unlicense",
"MIT"
] | 1 | 2020-04-02T06:26:10.000Z | 2020-04-02T06:26:10.000Z | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Helper stuff for benchmarks.
"""
import gc
gc.disable()
print 'Disabled GC'
def timeit(func, iter = 1000, *args, **kwargs):
"""
timeit(func, iter = 1000 *args, **kwargs) -> elapsed time
calls func iter times with args and kw... | 20.56 | 68 | 0.634241 |
e30314ce5c4ff22a445a6cdbad4515348391a05d | 3,596 | py | Python | pidtree_bcc/utils.py | Yelp/pidtree-bcc | ea54752b873687a159091d509df3a4f9dcc4a994 | [
"BSD-3-Clause"
] | 20 | 2019-11-11T20:03:31.000Z | 2022-01-26T05:53:34.000Z | pidtree_bcc/utils.py | Yelp/pidtree-bcc | ea54752b873687a159091d509df3a4f9dcc4a994 | [
"BSD-3-Clause"
] | 29 | 2019-10-21T21:38:33.000Z | 2022-03-09T14:44:41.000Z | pidtree_bcc/utils.py | Yelp/pidtree-bcc | ea54752b873687a159091d509df3a4f9dcc4a994 | [
"BSD-3-Clause"
] | 4 | 2019-10-18T22:30:28.000Z | 2021-09-10T02:36:04.000Z | import functools
import importlib
import inspect
import logging
import os
import socket
import struct
import sys
from typing import Callable
from typing import List
from typing import TextIO
from typing import Type
from typing import Union
import psutil
def crawl_process_tree(pid: int) -> List[dict]:
""" Takes a... | 27.450382 | 90 | 0.619855 |
410755537c75587be76d71185a1b07e41b283385 | 1,023 | py | Python | .venv/Scripts/imgmaker-script.py | jefferdo/gpt-3-client | 7acbc5f518fe3fcb55d0bdcbf93fc87b103b1148 | [
"MIT"
] | null | null | null | .venv/Scripts/imgmaker-script.py | jefferdo/gpt-3-client | 7acbc5f518fe3fcb55d0bdcbf93fc87b103b1148 | [
"MIT"
] | null | null | null | .venv/Scripts/imgmaker-script.py | jefferdo/gpt-3-client | 7acbc5f518fe3fcb55d0bdcbf93fc87b103b1148 | [
"MIT"
] | null | null | null | #!"d:\users\jeewaka fernando\documents\github\gpt-3-client\.venv\scripts\python.exe"
# EASY-INSTALL-ENTRY-SCRIPT: 'imgmaker==0.2','console_scripts','imgmaker'
import re
import sys
# for compatibility with easy_install; see #2198
__requires__ = 'imgmaker==0.2'
try:
from importlib.metadata import distribution
excep... | 30.088235 | 84 | 0.706745 |
08f98231fdadff83e46eef63d804abda684028cb | 4,354 | py | Python | experiment/build/gcb_build.py | chenju2k6/fuzzbench-1 | be6d1f2590337e81ede7057ba2028d8b658f9a14 | [
"Apache-2.0"
] | null | null | null | experiment/build/gcb_build.py | chenju2k6/fuzzbench-1 | be6d1f2590337e81ede7057ba2028d8b658f9a14 | [
"Apache-2.0"
] | null | null | null | experiment/build/gcb_build.py | chenju2k6/fuzzbench-1 | be6d1f2590337e81ede7057ba2028d8b658f9a14 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 35.983471 | 80 | 0.673174 |
90de1d9fce7117ac822405a1a70d50672b31f0c8 | 25,668 | py | Python | src/_pytest/capture.py | lewisbelcher/pytest | c928550e96ade8993170ad33b52bcae8768d154a | [
"MIT"
] | null | null | null | src/_pytest/capture.py | lewisbelcher/pytest | c928550e96ade8993170ad33b52bcae8768d154a | [
"MIT"
] | null | null | null | src/_pytest/capture.py | lewisbelcher/pytest | c928550e96ade8993170ad33b52bcae8768d154a | [
"MIT"
] | null | null | null | """
per-test stdout/stderr capturing mechanism.
"""
import collections
import contextlib
import io
import os
import sys
from io import UnsupportedOperation
from tempfile import TemporaryFile
from typing import Generator
from typing import Optional
import pytest
from _pytest.compat import CaptureAndPassthroughIO
from ... | 31.53317 | 117 | 0.624669 |
1a01f00893527289d306e954ceeccdd1de96e786 | 7,040 | py | Python | kubernetes/client/models/extensions_v1beta1_pod_security_policy.py | pllsxyc/python | 442ebc019056c2dc246be94f85cf61f1e1d26a88 | [
"Apache-2.0"
] | 1 | 2019-10-07T13:54:36.000Z | 2019-10-07T13:54:36.000Z | kubernetes/client/models/extensions_v1beta1_pod_security_policy.py | pllsxyc/python | 442ebc019056c2dc246be94f85cf61f1e1d26a88 | [
"Apache-2.0"
] | 8 | 2020-12-21T03:18:50.000Z | 2022-03-02T03:06:30.000Z | kubernetes/client/models/extensions_v1beta1_pod_security_policy.py | pllsxyc/python | 442ebc019056c2dc246be94f85cf61f1e1d26a88 | [
"Apache-2.0"
] | 1 | 2021-03-16T16:05:33.000Z | 2021-03-16T16:05:33.000Z | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: release-1.16
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import si... | 34.679803 | 312 | 0.644176 |
a22aa61b544b3ee77aba3680dd8549372cc4ded3 | 96 | py | Python | fpi/main.py | mentix02/3do | fc505a012e273af82f1503d62b2c293f6559f1a2 | [
"MIT"
] | null | null | null | fpi/main.py | mentix02/3do | fc505a012e273af82f1503d62b2c293f6559f1a2 | [
"MIT"
] | null | null | null | fpi/main.py | mentix02/3do | fc505a012e273af82f1503d62b2c293f6559f1a2 | [
"MIT"
] | null | null | null | import uvicorn
if __name__ == '__main__':
uvicorn.run('app:app', reload=True, debug=True)
| 16 | 51 | 0.6875 |
20601783ce40e0354b43bf9a8c49cc0b83bc7892 | 8,491 | py | Python | test/package/test_save_load.py | Hacky-DH/pytorch | 80dc4be615854570aa39a7e36495897d8a040ecc | [
"Intel"
] | 5 | 2021-08-17T17:44:20.000Z | 2021-08-21T05:03:42.000Z | test/package/test_save_load.py | Hacky-DH/pytorch | 80dc4be615854570aa39a7e36495897d8a040ecc | [
"Intel"
] | 1 | 2021-06-25T22:00:31.000Z | 2021-06-25T22:00:31.000Z | test/package/test_save_load.py | Hacky-DH/pytorch | 80dc4be615854570aa39a7e36495897d8a040ecc | [
"Intel"
] | 1 | 2021-10-05T07:05:26.000Z | 2021-10-05T07:05:26.000Z | import pickle
from io import BytesIO
from textwrap import dedent
from unittest import skipIf
from torch.package import PackageExporter, PackageImporter, sys_importer
from torch.testing._internal.common_utils import run_tests, IS_FBCODE, IS_SANDCASTLE
try:
from .common import PackageTestCase
except ImportError:
... | 35.232365 | 98 | 0.639854 |
a8d84983e03933fce2874ff92f2e00e097811130 | 2,666 | py | Python | tests/functional/fkey/primary/test_insert_pk_05.py | FirebirdSQL/firebird-qa | 96af2def7f905a06f178e2a80a2c8be4a4b44782 | [
"MIT"
] | 1 | 2022-02-05T11:37:13.000Z | 2022-02-05T11:37:13.000Z | tests/functional/fkey/primary/test_insert_pk_05.py | FirebirdSQL/firebird-qa | 96af2def7f905a06f178e2a80a2c8be4a4b44782 | [
"MIT"
] | 1 | 2021-09-03T11:47:00.000Z | 2021-09-03T12:42:10.000Z | tests/functional/fkey/primary/test_insert_pk_05.py | FirebirdSQL/firebird-qa | 96af2def7f905a06f178e2a80a2c8be4a4b44782 | [
"MIT"
] | 1 | 2021-06-30T14:14:16.000Z | 2021-06-30T14:14:16.000Z | #coding:utf-8
#
# id: functional.fkey.primary.insert_pk_05
# title: Check correct work fix with foreign key
# decription: Check foreign key work.
# Master transaction modifies primary key and committed
# Detail transaction inserts record in detail_table.
# Ex... | 29.296703 | 104 | 0.645536 |
bf9951cd928035c785301e49ea0aa2baf342df5d | 1,897 | py | Python | models/proto.py | TalSchuster/FewRel | af68f52b13977ca29808c38a54995363f76cdcad | [
"MIT"
] | null | null | null | models/proto.py | TalSchuster/FewRel | af68f52b13977ca29808c38a54995363f76cdcad | [
"MIT"
] | null | null | null | models/proto.py | TalSchuster/FewRel | af68f52b13977ca29808c38a54995363f76cdcad | [
"MIT"
] | null | null | null | import sys
import FewRel.fewshot_re_kit as fewshot_re_kit
import torch
from torch import autograd, optim, nn
from torch.autograd import Variable
from torch.nn import functional as F
class Proto(fewshot_re_kit.framework.FewShotREModel):
def __init__(self, sentence_encoder, dot=False):
fewshot_re_kit.fr... | 35.792453 | 97 | 0.615182 |
1e530612b4ac118fc6f484c3c14cf4848afccba9 | 852 | py | Python | repos/system_upgrade/el7toel8/actors/addupgradebootentry/actor.py | fellipeh/leapp-repository | 874e480fa84476fee37da4f184b47f2472748929 | [
"Apache-2.0"
] | null | null | null | repos/system_upgrade/el7toel8/actors/addupgradebootentry/actor.py | fellipeh/leapp-repository | 874e480fa84476fee37da4f184b47f2472748929 | [
"Apache-2.0"
] | 1 | 2020-04-03T07:41:43.000Z | 2020-04-03T07:41:43.000Z | repos/system_upgrade/el7toel8/actors/addupgradebootentry/actor.py | pirat89/leapp-repository | aac51ab67ee22413a7ab1da6cec33e54b9357afd | [
"Apache-2.0"
] | null | null | null | from leapp.actors import Actor
from leapp.libraries.actor.addupgradebootentry import add_boot_entry, fix_grub_config_error
from leapp.models import BootContent, GrubConfigError
from leapp.tags import InterimPreparationPhaseTag, IPUWorkflowTag
class AddUpgradeBootEntry(Actor):
"""
Add new boot entry for Leapp ... | 34.08 | 106 | 0.75939 |
bfc65b84b46b4048c09c35f9e00b226acc9854db | 332 | py | Python | users/urls.py | hyeseong-dev/wecode_2nd_project | a0bb90818837fcab4607823140251cee35a4d6e5 | [
"Unlicense"
] | null | null | null | users/urls.py | hyeseong-dev/wecode_2nd_project | a0bb90818837fcab4607823140251cee35a4d6e5 | [
"Unlicense"
] | null | null | null | users/urls.py | hyeseong-dev/wecode_2nd_project | a0bb90818837fcab4607823140251cee35a4d6e5 | [
"Unlicense"
] | null | null | null | from django.urls import path
from users.views import SendSmSView, VerificationView, MobileSignUp, MobileSignIn
urlpatterns = [
path('/sendsms', SendSmSView.as_view()),
path('/verification', VerificationView.as_view()),
path('/mobile_signup', MobileSignUp.as_view()),
path('/mobile_signin', MobileSignIn.... | 36.888889 | 81 | 0.740964 |
6851647060b612d04854c68a15434ccc60f8df50 | 670 | py | Python | iiif_validator/tests/size_error_random.py | IIIF/image-api | 890b120d19a7db1cde8a64da0ae6a986ae13e342 | [
"Apache-2.0"
] | 20 | 2015-03-25T21:30:15.000Z | 2016-06-17T07:45:07.000Z | iiif_validator/tests/size_error_random.py | IIIF/image-validator | 890b120d19a7db1cde8a64da0ae6a986ae13e342 | [
"Apache-2.0"
] | 50 | 2016-12-09T16:54:30.000Z | 2022-03-11T23:16:57.000Z | iiif_validator/tests/size_error_random.py | IIIF/image-validator | 890b120d19a7db1cde8a64da0ae6a986ae13e342 | [
"Apache-2.0"
] | 13 | 2016-10-27T23:38:14.000Z | 2021-03-15T04:38:26.000Z | from .test import BaseTest, ValidatorError
class Test_Size_Error_Random(BaseTest):
label = 'Random size gives 400'
level = 1
category = 3
versions = [u'1.0', u'1.1', u'2.0', u'3.0']
validationInfo = None
def run(self, result):
try:
url = result.make_url({'size': self.valida... | 37.222222 | 124 | 0.614925 |
97a32bfb8ad4998ccebd4fa5eafb969727fba67d | 2,980 | py | Python | pytest_clearread.py | adrianer/pytest-clearread | 9e0ffcf064bc752ced0056da9e5162590a4888ea | [
"BSD-3-Clause"
] | null | null | null | pytest_clearread.py | adrianer/pytest-clearread | 9e0ffcf064bc752ced0056da9e5162590a4888ea | [
"BSD-3-Clause"
] | null | null | null | pytest_clearread.py | adrianer/pytest-clearread | 9e0ffcf064bc752ced0056da9e5162590a4888ea | [
"BSD-3-Clause"
] | null | null | null | import pytest
from _pytest.terminal import TerminalReporter
def pytest_addoption(parser):
group = parser.getgroup("terminal reporting", "reporting", after="general")
group._addoption(
'--clear', action="store_true", dest="clear", default=False,
help=(
"make pytest reporting output ... | 35.47619 | 82 | 0.62651 |
84edca900cb44546b0f3fd3f7889f0760c6f4938 | 46 | py | Python | strainer/widgets/tree/__init__.py | jmbreuer/strainer | cf8d5fbb0782ca9d9148107c28cdcd66ac2d6927 | [
"Unlicense"
] | 2 | 2020-04-10T22:20:14.000Z | 2020-05-14T21:35:12.000Z | strainer/widgets/tree/__init__.py | jmbreuer/strainer | cf8d5fbb0782ca9d9148107c28cdcd66ac2d6927 | [
"Unlicense"
] | 31 | 2020-05-21T14:03:53.000Z | 2022-03-11T12:04:50.000Z | strainer/widgets/tree/__init__.py | jmbreuer/strainer | cf8d5fbb0782ca9d9148107c28cdcd66ac2d6927 | [
"Unlicense"
] | 1 | 2022-03-09T18:19:55.000Z | 2022-03-09T18:19:55.000Z | from .widget import Tree
__all__ = ('Tree',)
| 11.5 | 24 | 0.673913 |
6ad30d3c324870a0b88a37e68ea8317d3efd38a7 | 1,019 | py | Python | apistar/server/handlers.py | TheCulliganMan/apistarserver | faaf9f6fddc97e9bd97a2ea785d041bbaac91ad5 | [
"BSD-3-Clause"
] | 1 | 2018-09-27T14:50:47.000Z | 2018-09-27T14:50:47.000Z | apistar/server/handlers.py | TheCulliganMan/apistar | faaf9f6fddc97e9bd97a2ea785d041bbaac91ad5 | [
"BSD-3-Clause"
] | null | null | null | apistar/server/handlers.py | TheCulliganMan/apistar | faaf9f6fddc97e9bd97a2ea785d041bbaac91ad5 | [
"BSD-3-Clause"
] | null | null | null | from apistar import App, http
from apistar.codecs import OpenAPICodec
from apistar.server.asgi import ASGIReceive, ASGIScope, ASGISend
from apistar.server.wsgi import WSGIEnviron, WSGIStartResponse
def serve_schema(app: App):
codec = OpenAPICodec()
content = codec.encode(app.document)
headers = {"Content-... | 28.305556 | 69 | 0.726202 |
7d1aab75f767995dd91f0f988c0c6806074e42cd | 1,930 | py | Python | var/spack/repos/builtin/packages/py-radical-pilot/package.py | jeanbez/spack | f4e51ce8f366c85bf5aa0eafe078677b42dae1ba | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/py-radical-pilot/package.py | jeanbez/spack | f4e51ce8f366c85bf5aa0eafe078677b42dae1ba | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 8 | 2021-11-09T20:28:40.000Z | 2022-03-15T03:26:33.000Z | var/spack/repos/builtin/packages/py-radical-pilot/package.py | jeanbez/spack | f4e51ce8f366c85bf5aa0eafe078677b42dae1ba | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2019-02-08T20:37:20.000Z | 2019-03-31T15:19:26.000Z | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class PyRadicalPilot(PythonPackage):
"""RADICAL-Pilot is a Pilot system specialized in e... | 49.487179 | 97 | 0.706218 |
94927eb998e43a5f1ad4fb129a4bdb3f44a377ca | 660 | py | Python | fabfile.py | gsvaldes/toronjil | b5e7f063f377449dc375165367aed3025b6bb21f | [
"MIT"
] | null | null | null | fabfile.py | gsvaldes/toronjil | b5e7f063f377449dc375165367aed3025b6bb21f | [
"MIT"
] | null | null | null | fabfile.py | gsvaldes/toronjil | b5e7f063f377449dc375165367aed3025b6bb21f | [
"MIT"
] | null | null | null | from __future__ import with_statement
from fabric.api import local, settings, abort, run, cd, put
from fabric.contrib.console import confirm
code_dir = '/home/django/toronjil'
def update_remote():
with cd(code_dir):
run('git pull origin master')
def create_remote_test_file():
with cd(code_dir):
... | 22.758621 | 59 | 0.669697 |
404ce2416f3de51c2fb347fdc5aee2b80d8414aa | 2,275 | py | Python | airflow/providers/amazon/aws/operators/step_function_get_execution_output.py | troywinter/airflow | ba66ba0d97941c55d9f00f66329a9d3c7ad673e7 | [
"Apache-2.0"
] | 1 | 2019-05-07T06:46:55.000Z | 2019-05-07T06:46:55.000Z | airflow/providers/amazon/aws/operators/step_function_get_execution_output.py | troywinter/airflow | ba66ba0d97941c55d9f00f66329a9d3c7ad673e7 | [
"Apache-2.0"
] | 7 | 2021-06-28T20:24:56.000Z | 2022-02-26T02:01:36.000Z | airflow/providers/amazon/aws/operators/step_function_get_execution_output.py | troywinter/airflow | ba66ba0d97941c55d9f00f66329a9d3c7ad673e7 | [
"Apache-2.0"
] | 1 | 2019-06-15T08:38:53.000Z | 2019-06-15T08:38:53.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 38.559322 | 107 | 0.747253 |
588f08356337c10eebaf999675d45872c6176455 | 1,878 | py | Python | tests/test_matchers.py | duailibe/asymmetric-matchers | 854040e2d062360e432ec6fa6ee6bf9b9b4c897c | [
"Apache-2.0"
] | 2 | 2021-12-09T23:51:04.000Z | 2021-12-10T14:27:10.000Z | tests/test_matchers.py | duailibe/asymmetric-matchers | 854040e2d062360e432ec6fa6ee6bf9b9b4c897c | [
"Apache-2.0"
] | 2 | 2021-12-10T00:33:28.000Z | 2022-01-23T16:22:18.000Z | tests/test_matchers.py | duailibe/asymmetric-matchers | 854040e2d062360e432ec6fa6ee6bf9b9b4c897c | [
"Apache-2.0"
] | null | null | null | import collections
import re
from asymmetric_matchers import (
anything,
any as any_,
string_matching,
list_containing,
dict_containing,
)
def test_anything():
assert 0 == anything()
assert "" == anything()
assert [] == anything()
assert {} == anything()
assert None != anythin... | 29.809524 | 85 | 0.612354 |
6a3c7e80026cadc74be9632abc965b29eb1a8056 | 466 | py | Python | 2015/day_17/containers_part2.py | ceronman/AdventOfCode2015 | 87b6d93df960045b5eff1ded107ac4e2719ee6e6 | [
"MIT"
] | 4 | 2019-12-03T02:03:23.000Z | 2019-12-20T11:36:00.000Z | 2015/day_17/containers_part2.py | ceronman/AdventOfCode2015 | 87b6d93df960045b5eff1ded107ac4e2719ee6e6 | [
"MIT"
] | null | null | null | 2015/day_17/containers_part2.py | ceronman/AdventOfCode2015 | 87b6d93df960045b5eff1ded107ac4e2719ee6e6 | [
"MIT"
] | null | null | null | def combinations(target, sizes, used):
accumulated = sum(used)
if accumulated < target:
for i, s in enumerate(sizes):
yield from combinations(target, sizes[i+1:], used + [s])
elif accumulated == target:
yield used
sizes = [int(x) for x in open('input.txt')]
all_combinations = li... | 35.846154 | 68 | 0.656652 |
817ef80a97eb42f2eb9b9bab171575d092b4c49b | 7,241 | py | Python | pubsub/google/cloud/pubsub_v1/subscriber/client.py | deryrahman/google-cloud-python | b55058c4b2328fde32f29bfd8ea04708fcc578e0 | [
"Apache-2.0"
] | null | null | null | pubsub/google/cloud/pubsub_v1/subscriber/client.py | deryrahman/google-cloud-python | b55058c4b2328fde32f29bfd8ea04708fcc578e0 | [
"Apache-2.0"
] | null | null | null | pubsub/google/cloud/pubsub_v1/subscriber/client.py | deryrahman/google-cloud-python | b55058c4b2328fde32f29bfd8ea04708fcc578e0 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017, Google LLC 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 a... | 40.005525 | 79 | 0.660268 |
3abb2a229447e51ddfd43d2972e420e0676fd476 | 1,044 | py | Python | best_api.py | adrianobrum/takecareofmyplant_bot | 30828df1c769c840bcba9d272020995eebe4b1ec | [
"MIT"
] | null | null | null | best_api.py | adrianobrum/takecareofmyplant_bot | 30828df1c769c840bcba9d272020995eebe4b1ec | [
"MIT"
] | null | null | null | best_api.py | adrianobrum/takecareofmyplant_bot | 30828df1c769c840bcba9d272020995eebe4b1ec | [
"MIT"
] | null | null | null | import urllib2
import time
import logfile
import os
import sys
from config import *
import xml.etree.ElementTree as ET
def api():
logfile.logger('debug', 'Geting the data from API...')
url = "http://www.stands4.com/services/v2/quotes.php?uid={0}&tokenid={1}&searchtype=RANDOM"
url = url.format(MYUID, MYTO... | 26.1 | 95 | 0.62069 |
b7f65b4510bbd3e900ebf04d6bee573c482db0db | 224 | py | Python | dns_check/datadog_checks/dns_check/__init__.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 4 | 2021-06-21T19:21:49.000Z | 2021-06-23T21:21:55.000Z | dns_check/datadog_checks/dns_check/__init__.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 1 | 2018-08-15T05:50:17.000Z | 2018-08-15T05:50:17.000Z | dns_check/datadog_checks/dns_check/__init__.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 1 | 2021-06-21T19:21:51.000Z | 2021-06-21T19:21:51.000Z | # (C) Datadog, Inc. 2018
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from .__about__ import __version__
from .dns_check import DNSCheck
__all__ = [
'__version__',
'DNSCheck'
]
| 18.666667 | 59 | 0.71875 |
7effeb3ba00ecad5201f2e19b714046b1533d33e | 40,215 | py | Python | sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_file_client.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | 8 | 2021-01-13T23:44:08.000Z | 2021-03-17T10:13:36.000Z | sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_file_client.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | 2 | 2020-03-03T23:11:13.000Z | 2020-03-30T18:50:55.000Z | sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_file_client.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | null | null | null | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
from io im... | 53.335544 | 119 | 0.647793 |
946459d6576c44f5f5d7703eb602d68af146a0f2 | 2,861 | py | Python | postprocess/postprocess_text.py | alberto-poncelas/tesseract_postprocess | 5b44e360a3575c640d68d38d8f7acaf48b5aee2e | [
"MIT"
] | 6 | 2020-04-28T07:30:55.000Z | 2021-07-07T02:47:19.000Z | postprocess/postprocess_text.py | alberto-poncelas/tesseract_postprocess | 5b44e360a3575c640d68d38d8f7acaf48b5aee2e | [
"MIT"
] | null | null | null | postprocess/postprocess_text.py | alberto-poncelas/tesseract_postprocess | 5b44e360a3575c640d68d38d8f7acaf48b5aee2e | [
"MIT"
] | null | null | null |
import sys
import string
import nltk
import ConfigParser
import io
config = ConfigParser.ConfigParser()
config.readfp(open(r'../config'))
language_model_path = config.get('DEFAULT', 'LM')
input_data = sys.argv[1]
replacement_dict_path = sys.argv[2]
with io.open(input_data,"r", encoding="utf-8") as finp:
... | 20.435714 | 73 | 0.749738 |
f1d6d33396ac0fd163b23cf07e1e987c4cade913 | 1,071 | py | Python | stubs.min/Autodesk/Revit/DB/Electrical_parts/PanelConfiguration.py | ricardyn/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | 1 | 2021-02-02T13:39:16.000Z | 2021-02-02T13:39:16.000Z | stubs.min/Autodesk/Revit/DB/Electrical_parts/PanelConfiguration.py | hdm-dt-fb/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | null | null | null | stubs.min/Autodesk/Revit/DB/Electrical_parts/PanelConfiguration.py | hdm-dt-fb/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | null | null | null | class PanelConfiguration(Enum,IComparable,IFormattable,IConvertible):
"""
This enum declares the configuration for given panel schedule type.
enum PanelConfiguration,values: OneColumn (0),TwoColumnsCircuitsAcross (1),TwoColumnsCircuitsDown (2)
"""
def __eq__(self,*args):
""" x.__eq__(y) <==> x==yx.__e... | 30.6 | 215 | 0.691877 |
1eed11a533674cf0fcb436122d44286595322e7c | 1,139 | py | Python | chapter3/question1.py | AmatsukiUrato/study_python | e06afbc92a6f112ff9d3159bea4abcca6b17d280 | [
"MIT"
] | null | null | null | chapter3/question1.py | AmatsukiUrato/study_python | e06afbc92a6f112ff9d3159bea4abcca6b17d280 | [
"MIT"
] | null | null | null | chapter3/question1.py | AmatsukiUrato/study_python | e06afbc92a6f112ff9d3159bea4abcca6b17d280 | [
"MIT"
] | 1 | 2019-04-11T04:08:03.000Z | 2019-04-11T04:08:03.000Z | def go_sukiya(wallet):
menu = {
"牛丼ミニ": 290,
"牛丼並盛": 350,
"牛丼中盛": 480
}
print("いらっしゃいませ!")
print("何をご注文なさいますか?")
product = choice(menu)
print("承知いたしました")
if can_pay(wallet, menu[product]):
wallet = wallet - menu[product]
print("お釣りは" + str(wallet) ... | 19.982456 | 45 | 0.524144 |
a31de5417037e1c6b1be098094a6c94c36dd6007 | 1,180 | py | Python | sfdc.py | mkesicki/sfdc-batch-dataloader | aa34d108c613cfa9bc11b758a767139c20a1308d | [
"MIT"
] | null | null | null | sfdc.py | mkesicki/sfdc-batch-dataloader | aa34d108c613cfa9bc11b758a767139c20a1308d | [
"MIT"
] | null | null | null | sfdc.py | mkesicki/sfdc-batch-dataloader | aa34d108c613cfa9bc11b758a767139c20a1308d | [
"MIT"
] | null | null | null | #!/usr/bin/python3 -u
import requests
import pprint
headers = {}
instance = ""
api_version = "v47.0"
def login(args):
url = "https://" + args.login_url.replace("https://", "")
print("Login to salesforce: " + url)
params = {
"client_id": args.client_id,
"client_secret": args.client_sec... | 20.701754 | 90 | 0.611017 |
f5f786ffa8468ca3a8fd0eb5d797b473c17335f4 | 467 | py | Python | home/migrations/0013_auto_20200802_1712.py | Muia23/Share | 32f3fa5d75ee147920eb5255de2fb07e960f0b0a | [
"Unlicense"
] | null | null | null | home/migrations/0013_auto_20200802_1712.py | Muia23/Share | 32f3fa5d75ee147920eb5255de2fb07e960f0b0a | [
"Unlicense"
] | 8 | 2021-04-08T19:40:41.000Z | 2022-03-12T00:46:05.000Z | home/migrations/0013_auto_20200802_1712.py | Muia23/Share | 32f3fa5d75ee147920eb5255de2fb07e960f0b0a | [
"Unlicense"
] | null | null | null | # Generated by Django 3.0.8 on 2020-08-02 14:12
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('home', '0012_auto_20200802_1710'),
]
operations = [
migrations.AlterField(
model_name='post',
... | 23.35 | 101 | 0.635974 |
49ddabb28232e2824a0ee360b2cf0cf53e76ca94 | 4,305 | py | Python | modules/pymol2/__init__.py | telamonian/pymol | 8192e75bf3d4c1072d6bd399b7dacd065bf78a06 | [
"CNRI-Python"
] | 1 | 2017-10-05T15:25:56.000Z | 2017-10-05T15:25:56.000Z | modules/pymol2/__init__.py | telamonian/pymol | 8192e75bf3d4c1072d6bd399b7dacd065bf78a06 | [
"CNRI-Python"
] | null | null | null | modules/pymol2/__init__.py | telamonian/pymol | 8192e75bf3d4c1072d6bd399b7dacd065bf78a06 | [
"CNRI-Python"
] | null | null | null | #A* -------------------------------------------------------------------
#B* This file contains source code for the PyMOL computer program
#C* copyright 1998-2007 by Warren Lyford Delano of DeLano Scientific.
#D* -------------------------------------------------------------------
#E* It is unlawful to modify or remove t... | 30.316901 | 76 | 0.54216 |
b47c7b63d900629404d67f045640c684b5286f80 | 39,422 | py | Python | Server.py | mdkinney/edk2-email-archive-webhook | 379ff29ac40f05f09dbf9fac35e8072e09a26a07 | [
"BSD-2-Clause-Patent"
] | 2 | 2021-01-15T18:37:25.000Z | 2022-01-12T03:22:57.000Z | Server.py | mdkinney/edk2-email-archive-webhook | 379ff29ac40f05f09dbf9fac35e8072e09a26a07 | [
"BSD-2-Clause-Patent"
] | null | null | null | Server.py | mdkinney/edk2-email-archive-webhook | 379ff29ac40f05f09dbf9fac35e8072e09a26a07 | [
"BSD-2-Clause-Patent"
] | null | null | null | ## @file
# Assign reviewers to commits in a GitHub pull request based on assignments
# documented in Maintainers.txt and generate email archive of all review
# activities.
#
# Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
'''
TianoCore GitHub... | 42.207709 | 179 | 0.564735 |
2e1b3a03db82d659335a28f85104b595bca2a2f2 | 331 | py | Python | algorithms-on-graph/week5_mst/1_connecting_points/connecting_points.py | yiping-wang/data-structures-and-algorithms-coursera | fc0ba34399c27b358ce52a323a52ab2eb095f156 | [
"MIT"
] | 7 | 2017-04-01T17:18:35.000Z | 2022-01-12T05:23:23.000Z | algorithms-on-graph/week5_mst/1_connecting_points/connecting_points.py | yiping-wang/data-structures-and-algorithms-coursera | fc0ba34399c27b358ce52a323a52ab2eb095f156 | [
"MIT"
] | 6 | 2020-05-24T13:36:50.000Z | 2022-02-15T06:44:20.000Z | algorithms-on-graph/week5_mst/1_connecting_points/connecting_points.py | yiping-wang/data-structures-and-algorithms-coursera | fc0ba34399c27b358ce52a323a52ab2eb095f156 | [
"MIT"
] | 2 | 2018-09-20T01:07:39.000Z | 2019-02-22T14:55:38.000Z | #Uses python3
import sys
import math
def minimum_distance(x, y):
result = 0.
#write your code here
return result
if __name__ == '__main__':
input = sys.stdin.read()
data = list(map(int, input.split()))
n = data[0]
x = data[1::2]
y = data[2::2]
print("{0:.9f}".format(minimum_distan... | 18.388889 | 51 | 0.598187 |
0ffd131cf8343dfa577d9cdc91864271c9ce86b9 | 283 | py | Python | itez/beneficiary/migrations/0032_merge_20211220_1405.py | Olipa776/itez | d6bba80c74d5ce385ae8a304e56546d927d24624 | [
"MIT"
] | 1 | 2021-12-12T11:46:47.000Z | 2021-12-12T11:46:47.000Z | itez/beneficiary/migrations/0032_merge_20211220_1405.py | Olipa776/itez | d6bba80c74d5ce385ae8a304e56546d927d24624 | [
"MIT"
] | 11 | 2021-11-03T10:46:00.000Z | 2021-12-20T11:35:00.000Z | itez/beneficiary/migrations/0032_merge_20211220_1405.py | Olipa776/itez | d6bba80c74d5ce385ae8a304e56546d927d24624 | [
"MIT"
] | 7 | 2021-11-01T15:03:02.000Z | 2021-11-06T13:06:10.000Z | # Generated by Django 3.1.13 on 2021-12-20 14:05
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('beneficiary', '0031_merge_20211220_0030'),
('beneficiary', '0030_auto_20211215_1130'),
]
operations = [
]
| 18.866667 | 52 | 0.660777 |
fca3871cfc6a6b80e9216c7fa169f01a78cdb86c | 6,922 | py | Python | qa/rpc-tests/llmq-chainlocks.py | IcomTechRevolution/icomtech-coin | bb770b827ac9e65f3e535d72c9b7812d9b4e785a | [
"MIT"
] | 1 | 2019-10-28T03:45:14.000Z | 2019-10-28T03:45:14.000Z | qa/rpc-tests/llmq-chainlocks.py | icomtech/coin | e522302a3d16aac5666893d52114027fae6c330b | [
"MIT"
] | 1 | 2020-05-12T16:08:44.000Z | 2020-05-12T16:08:44.000Z | qa/rpc-tests/llmq-chainlocks.py | icomtech/coin | e522302a3d16aac5666893d52114027fae6c330b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2015-2018 The Dash Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.mininode import *
from test_framework.test_framework import IcomTechTestFramework
from t... | 41.449102 | 123 | 0.645912 |
375e72a3c340e920a21bd6b0b4d02ca1b2f59c3d | 990 | py | Python | ceph_deploy/lib/vendor/remoto/log.py | scibian/ceph-deploy | abc2626b8a797bbd1b313c38e1a79dbee8edd408 | [
"MIT"
] | null | null | null | ceph_deploy/lib/vendor/remoto/log.py | scibian/ceph-deploy | abc2626b8a797bbd1b313c38e1a79dbee8edd408 | [
"MIT"
] | null | null | null | ceph_deploy/lib/vendor/remoto/log.py | scibian/ceph-deploy | abc2626b8a797bbd1b313c38e1a79dbee8edd408 | [
"MIT"
] | null | null | null |
def reporting(conn, result, timeout=None):
timeout = timeout or conn.global_timeout # -1 a.k.a. wait for ever
log_map = {
'debug': conn.logger.debug,
'error': conn.logger.error,
'warning': conn.logger.warning
}
while True:
try:
received = result.receive(tim... | 34.137931 | 89 | 0.555556 |
fdd0b16b15c71a6de1fb623296ceefd885fce3ef | 73,466 | py | Python | src/transformers/models/roberta/modeling_roberta.py | techthiyanes/adapter-transformers | 04aeaf63c4c54856d416925258393d9e06866b46 | [
"Apache-2.0"
] | null | null | null | src/transformers/models/roberta/modeling_roberta.py | techthiyanes/adapter-transformers | 04aeaf63c4c54856d416925258393d9e06866b46 | [
"Apache-2.0"
] | null | null | null | src/transformers/models/roberta/modeling_roberta.py | techthiyanes/adapter-transformers | 04aeaf63c4c54856d416925258393d9e06866b46 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. 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 cop... | 45.659416 | 198 | 0.677592 |
0056b1dcadca5cdddaebfcaf911c53a91bdad8b8 | 2,575 | py | Python | python/experiments/eval_train_test.py | Etienne-Meunier/davis | 8f8d9b6d93ea0454b9754ba8f8bbfdc7f0e57ab6 | [
"BSD-3-Clause"
] | 135 | 2016-04-17T06:59:38.000Z | 2022-01-27T03:46:04.000Z | python/experiments/eval_train_test.py | Etienne-Meunier/davis | 8f8d9b6d93ea0454b9754ba8f8bbfdc7f0e57ab6 | [
"BSD-3-Clause"
] | 13 | 2016-08-06T15:13:33.000Z | 2020-11-13T09:32:52.000Z | python/experiments/eval_train_test.py | Etienne-Meunier/davis | 8f8d9b6d93ea0454b9754ba8f8bbfdc7f0e57ab6 | [
"BSD-3-Clause"
] | 52 | 2016-05-14T14:13:24.000Z | 2021-01-08T16:30:22.000Z | #!/usr/bin/env python
# ----------------------------------------------------------------------------
# S Benchmark Dataset and Evaluation Methodology for Video Object Segmentation
#-----------------------------------------------------------------------------
# Copyright (c) 2016 Federico Perazzi
# Licensed under the B... | 26.010101 | 78 | 0.636117 |
38a608c0569c842f362154e8ecde65fffa31daa9 | 29,293 | py | Python | eslearn/stylesheets/PyQt5_stylesheets/pyqt5_style_DarkOrange_rc.py | lichao312214129/easylearn | e77b51b26e0c75b3a4d59dd5a71cf1b63ac4347d | [
"MIT"
] | 19 | 2020-02-29T06:00:18.000Z | 2022-01-24T01:30:14.000Z | stylesheets/PyQt5_stylesheets/pyqt5_style_DarkOrange_rc.py | easylearn-fmri/easylearn | 102ff264a7672b246244a489e0fbde8e3897c52f | [
"MIT"
] | 7 | 2020-04-02T03:05:21.000Z | 2020-11-11T11:45:05.000Z | stylesheets/PyQt5_stylesheets/pyqt5_style_DarkOrange_rc.py | easylearn-fmri/easylearn | 102ff264a7672b246244a489e0fbde8e3897c52f | [
"MIT"
] | 11 | 2020-03-03T03:02:15.000Z | 2020-11-11T14:09:55.000Z | # -*- coding: utf-8 -*-
# Resource object code
#
# Created by: The Resource Compiler for PyQt5 (Qt v5.12.9)
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore
qt_resource_data = b"\
\x00\x00\x08\x77\
\x00\
\x00\x2e\xc8\x78\x9c\xdd\x5a\x6d\x6f\xdb\x36\x10\xfe\x1e\x20\xff\
\x81\x45\xbe\x... | 58.703407 | 129 | 0.726214 |
11e490a14d1481903ebea580206283464b776d4f | 1,734 | py | Python | rummage/lib/gui/dialogs/error_text_dialog.py | facelessuser/Rummage | 74f0ce1b078eef40c3ba683dbc4638112f3b9bb7 | [
"MIT"
] | 55 | 2015-02-15T08:17:55.000Z | 2022-03-11T11:55:39.000Z | rummage/lib/gui/dialogs/error_text_dialog.py | facelessuser/Rummage | 74f0ce1b078eef40c3ba683dbc4638112f3b9bb7 | [
"MIT"
] | 264 | 2015-01-29T20:27:40.000Z | 2022-03-03T04:08:48.000Z | rummage/lib/gui/dialogs/error_text_dialog.py | facelessuser/Rummage | 74f0ce1b078eef40c3ba683dbc4638112f3b9bb7 | [
"MIT"
] | 12 | 2017-08-30T22:54:20.000Z | 2022-03-21T01:05:50.000Z | """
Error Text Dialog.
Licensed under MIT
Copyright (c) 2013 - 2015 Isaac Muse <isaacmuse@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 in the Software without restriction, including without limitat... | 35.387755 | 113 | 0.72895 |
5d46332fe2befdc35c2eb293bd6e52f26a734691 | 1,050 | py | Python | download_dataset.py | PytaichukBohdan/law-generator | 8bf998c5c3138a540f68b3bf2d68907bd48a9699 | [
"MIT"
] | null | null | null | download_dataset.py | PytaichukBohdan/law-generator | 8bf998c5c3138a540f68b3bf2d68907bd48a9699 | [
"MIT"
] | null | null | null | download_dataset.py | PytaichukBohdan/law-generator | 8bf998c5c3138a540f68b3bf2d68907bd48a9699 | [
"MIT"
] | null | null | null | import os
import sys
import requests
from tqdm import tqdm
subdir = 'data'
if not os.path.exists(subdir):
os.makedirs(subdir)
subdir = subdir.replace('\\','/') # needed for Windows
for ds in [
'webtext',
'small-117M', 'small-117M-k40',
'medium-345M', 'medium-345M-k40',
'large-762M', 'large-762M-... | 36.206897 | 107 | 0.6 |
67b88d6ecff416e6dc687822e4800ad75b4aa8c4 | 708 | py | Python | src/reset_counter.py | MatuMikey/gfg-reddit-bot | 0690bb92a2bb3f6f78b5e7ee9ac90208a652ca34 | [
"MIT"
] | null | null | null | src/reset_counter.py | MatuMikey/gfg-reddit-bot | 0690bb92a2bb3f6f78b5e7ee9ac90208a652ca34 | [
"MIT"
] | null | null | null | src/reset_counter.py | MatuMikey/gfg-reddit-bot | 0690bb92a2bb3f6f78b5e7ee9ac90208a652ca34 | [
"MIT"
] | null | null | null | import common.api as api
from common.models.fixture import Fixture
from common.models.result import Result
from common.models.league import League
from common.models.stat import Stat
from common.models.user import User
from common.config import config
import logging
logger = logging.getLogger()
logger.setLevel(logging... | 25.285714 | 54 | 0.761299 |
b7cdbca9a4520d8c42d79710431a3f28a8eceb81 | 85,050 | py | Python | scripts/dts/edtlib.py | xiongyihui/zephyr | 0ca84c0eb378fc2f126cdbb51d7195220746f36d | [
"Apache-2.0"
] | null | null | null | scripts/dts/edtlib.py | xiongyihui/zephyr | 0ca84c0eb378fc2f126cdbb51d7195220746f36d | [
"Apache-2.0"
] | 3 | 2021-08-11T18:14:01.000Z | 2021-08-11T22:41:10.000Z | scripts/dts/edtlib.py | xiongyihui/zephyr | 0ca84c0eb378fc2f126cdbb51d7195220746f36d | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019 Nordic Semiconductor ASA
# Copyright (c) 2019 Linaro Limited
# SPDX-License-Identifier: BSD-3-Clause
# Tip: You can view just the documentation with 'pydoc3 edtlib'
"""
Library for working with devicetrees at a higher level compared to dtlib. Like
dtlib, this library presents a tree of devicetree... | 36.346154 | 103 | 0.593216 |
60b069c93be56b6237f05c129061341d2a2dd8d2 | 4,356 | py | Python | pcg_gazebo/parsers/types/custom.py | argenos/pcg_gazebo | 643a2669b60419ce34d700d5c75fcca7273fd137 | [
"ECL-2.0",
"Apache-2.0"
] | 40 | 2020-02-04T18:16:49.000Z | 2022-02-22T11:36:34.000Z | pcg_gazebo/parsers/types/custom.py | argenos/pcg_gazebo | 643a2669b60419ce34d700d5c75fcca7273fd137 | [
"ECL-2.0",
"Apache-2.0"
] | 75 | 2020-01-23T13:40:50.000Z | 2022-02-09T07:26:01.000Z | pcg_gazebo/parsers/types/custom.py | argenos/pcg_gazebo | 643a2669b60419ce34d700d5c75fcca7273fd137 | [
"ECL-2.0",
"Apache-2.0"
] | 18 | 2020-09-10T06:35:41.000Z | 2022-02-20T19:08:17.000Z | # Copyright (c) 2019 - The Procedural Generation for Gazebo authors
# For information on the respective copyright owner see the NOTICE file
#
# 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
#
#... | 36.915254 | 76 | 0.605601 |
68bdf01996f3bba2f10b0e63e9f397d5a946c651 | 570 | py | Python | python/decorator/amount_with_properties.py | y2ghost/study | c5278611b0a732fe19e3d805c0c079e530b1d3b2 | [
"MIT"
] | null | null | null | python/decorator/amount_with_properties.py | y2ghost/study | c5278611b0a732fe19e3d805c0c079e530b1d3b2 | [
"MIT"
] | null | null | null | python/decorator/amount_with_properties.py | y2ghost/study | c5278611b0a732fe19e3d805c0c079e530b1d3b2 | [
"MIT"
] | null | null | null | class Amount:
def __init__(self):
# 私有属性
self._amount = None
def get_amount(self):
return self._amount
def set_amount(self, value):
if isinstance(value, int) or isinstance(value, float):
self._amount = value
else:
print(f'值必须是int或float')
... | 21.923077 | 62 | 0.598246 |
62b147580e59bc279ea79bedfb8fb0b6742faecc | 12,097 | py | Python | examples/experiments/freezeout/batch.py | bestetc/batchflow | d2a843640383fbe860654236881483f755227e06 | [
"Apache-2.0"
] | 101 | 2017-06-05T07:33:54.000Z | 2018-10-28T04:55:23.000Z | examples/experiments/freezeout/batch.py | bestetc/batchflow | d2a843640383fbe860654236881483f755227e06 | [
"Apache-2.0"
] | 243 | 2018-11-29T02:03:55.000Z | 2022-02-21T08:28:29.000Z | examples/experiments/freezeout/batch.py | bestetc/batchflow | d2a843640383fbe860654236881483f755227e06 | [
"Apache-2.0"
] | 35 | 2019-01-29T14:26:14.000Z | 2021-12-30T01:39:02.000Z | """ File with class batch with resnet network """
import numpy as np
import tensorflow as tf
from tensorflow.contrib.layers import xavier_initializer_conv2d as xavier
from batchflow import action, model, Batch # pylint: disable=no-name-in-module
def conv_block(input_tensor, kernel, filters, name, strides=(2, 2)):
... | 43.203571 | 119 | 0.592874 |
7482ad770d17f5d76af28b6be399539b42e00895 | 294 | py | Python | ukpsummarizer-be/cplex/python/docplex/docplex/mp/sktrans/__init__.py | avineshpvs/vldb2018-sherlock | 5e116f42f44c50bcb289be3c4b4b76e29b238c18 | [
"Apache-2.0"
] | 2 | 2019-01-13T08:41:00.000Z | 2021-03-27T22:55:10.000Z | ukpsummarizer-be/cplex/python/docplex/docplex/mp/sktrans/__init__.py | AIPHES/vldb2018-sherlock | 3746efa35c4c1769cc4aaeb15aeb9453564e1226 | [
"Apache-2.0"
] | null | null | null | ukpsummarizer-be/cplex/python/docplex/docplex/mp/sktrans/__init__.py | AIPHES/vldb2018-sherlock | 3746efa35c4c1769cc4aaeb15aeb9453564e1226 | [
"Apache-2.0"
] | 4 | 2018-11-06T16:12:55.000Z | 2019-08-21T13:22:32.000Z | # --------------------------------------------------------------------------
# Source file provided under Apache License, Version 2.0, January 2004,
# http://www.apache.org/licenses/
# (c) Copyright IBM Corp. 2017
# -------------------------------------------------------------------------- | 58.8 | 77 | 0.343537 |
6d62173d80c07076f85258ceb8bd0e36a053c8b9 | 7,620 | py | Python | apps/vote_summary.py | max-lutz/open-data-french-national-assembly | 518c81618513a79a88200d392faa53d88c787c94 | [
"MIT"
] | null | null | null | apps/vote_summary.py | max-lutz/open-data-french-national-assembly | 518c81618513a79a88200d392faa53d88c787c94 | [
"MIT"
] | null | null | null | apps/vote_summary.py | max-lutz/open-data-french-national-assembly | 518c81618513a79a88200d392faa53d88c787c94 | [
"MIT"
] | 1 | 2022-02-16T04:02:23.000Z | 2022-02-16T04:02:23.000Z | import streamlit as st
import pandas as pd
import matplotlib
import matplotlib.pyplot as plt
import seaborn as sns
import os
from matplotlib.backends.backend_agg import RendererAgg
#Loading the data
@st.cache
def get_data_votes():
df = pd.read_csv(os.path.join(os.getcwd(), 'data', 'df_vote_descr.csv'))
df['yea... | 42.569832 | 198 | 0.639501 |
0b53eb2bfaa80d98e4b189f3be9447f4a1d055f1 | 1,232 | py | Python | src/deliveroo_project/Deilveroo.py | jayjayspinks/DeliverooProject2 | a7a5d2b03c6af4344308f924577ac3e7d0274126 | [
"MIT"
] | null | null | null | src/deliveroo_project/Deilveroo.py | jayjayspinks/DeliverooProject2 | a7a5d2b03c6af4344308f924577ac3e7d0274126 | [
"MIT"
] | null | null | null | src/deliveroo_project/Deilveroo.py | jayjayspinks/DeliverooProject2 | a7a5d2b03c6af4344308f924577ac3e7d0274126 | [
"MIT"
] | null | null | null | import tkinter as tk
from tkinter import *
class Game(tk.Frame):
def __init__(self, master):
tk.Frame.__init__(self, master)
headline_text = tk.Label(self, text="Meals Without Deliveroo!!", font=("Ariel",160), fg="red")
headline_text.pack()
self.label_var = tk.IntVar()
lab... | 34.222222 | 131 | 0.627435 |
558f88cd519e1cd45eb1f2e4ca92f4221ac031e3 | 1,285 | py | Python | src/api_v1/viewsets/system.py | iplweb/django-bpp | 85f183a99d8d5027ae4772efac1e4a9f21675849 | [
"BSD-3-Clause"
] | 1 | 2017-04-27T19:50:02.000Z | 2017-04-27T19:50:02.000Z | src/api_v1/viewsets/system.py | mpasternak/django-bpp | 434338821d5ad1aaee598f6327151aba0af66f5e | [
"BSD-3-Clause"
] | 41 | 2019-11-07T00:07:02.000Z | 2022-02-27T22:09:39.000Z | src/api_v1/viewsets/system.py | iplweb/bpp | f027415cc3faf1ca79082bf7bacd4be35b1a6fdf | [
"BSD-3-Clause"
] | null | null | null | from rest_framework import viewsets
from api_v1.serializers.system import (
Charakter_FormalnySerializer,
Typ_KBNSerializer,
JezykSerializer,
Dyscyplina_NaukowaSerializer,
KonferencjaSerializer,
Seria_WydawniczaSerializer,
)
from bpp.models import (
Charakter_Formalny,
Typ_KBN,
Jezy... | 26.22449 | 63 | 0.796109 |
b28f7ecf27bc96f1e292831431fe03d1e16a3554 | 11,744 | py | Python | pywraps/py_nalt.py | joeleong/idapython | d99a89369741ce272ba792d6f087d0739a2f8ac7 | [
"BSD-3-Clause"
] | null | null | null | pywraps/py_nalt.py | joeleong/idapython | d99a89369741ce272ba792d6f087d0739a2f8ac7 | [
"BSD-3-Clause"
] | null | null | null | pywraps/py_nalt.py | joeleong/idapython | d99a89369741ce272ba792d6f087d0739a2f8ac7 | [
"BSD-3-Clause"
] | null | null | null | #<pycode(py_nalt)>
import _ida_idaapi
SWI_SPARSE = 0x1
"""sparse switch ( value table present ) otherwise lowcase present"""
SWI_V32 = 0x2
"""32-bit values in table"""
SWI_J32 = 0x4
"""32-bit jump offsets"""
SWI_VSPLIT = 0x8
"""value table is split (only for 32-bit values)"""
SWI_DEFAULT ... | 36.47205 | 91 | 0.731012 |
8a884c1199d0d5aaf00c11bebcc0ccd3757378b9 | 23,464 | py | Python | lxbuildenv.py | xobs/spibone | 4666e36a6bd63980be7a3555dca32373e29fdf6c | [
"Apache-2.0"
] | 11 | 2019-08-30T13:17:56.000Z | 2022-03-16T17:39:37.000Z | lxbuildenv.py | xobs/spibone | 4666e36a6bd63980be7a3555dca32373e29fdf6c | [
"Apache-2.0"
] | 4 | 2019-11-13T22:38:17.000Z | 2019-11-13T23:20:48.000Z | lxbuildenv.py | xobs/spibone | 4666e36a6bd63980be7a3555dca32373e29fdf6c | [
"Apache-2.0"
] | 1 | 2021-10-01T01:45:57.000Z | 2021-10-01T01:45:57.000Z | #!/usr/bin/env python3
# This script enables easy, cross-platform building without the need
# to install third-party Python modules.
LXBUILDENV_VERSION = '2019.8.19.1'
import sys
import os
import subprocess
import argparse
DEPS_DIR = "deps"
DEFAULT_DEPS = {
'migen': 'https://github.com/m-labs/migen.git'... | 38.277325 | 159 | 0.622954 |
7d9d9e3b97ff5f1809e7f55be3c5665bf1ca28e0 | 1,869 | py | Python | tools/harness-automation/cases_R140/ed_6_1_6.py | AdityaHPatwardhan/openthread | a201e9d5d0273bb51fa20efc8758be20a725018e | [
"BSD-3-Clause"
] | 2,962 | 2016-05-11T15:06:06.000Z | 2022-03-27T20:06:16.000Z | tools/harness-automation/cases_R140/ed_6_1_6.py | AdityaHPatwardhan/openthread | a201e9d5d0273bb51fa20efc8758be20a725018e | [
"BSD-3-Clause"
] | 5,899 | 2016-05-11T19:21:49.000Z | 2022-03-31T18:17:20.000Z | tools/harness-automation/cases_R140/ed_6_1_6.py | AdityaHPatwardhan/openthread | a201e9d5d0273bb51fa20efc8758be20a725018e | [
"BSD-3-Clause"
] | 1,113 | 2016-05-11T15:37:42.000Z | 2022-03-31T09:37:04.000Z | #!/usr/bin/env python
#
# Copyright (c) 2016, The OpenThread Authors.
# 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
# notic... | 40.630435 | 77 | 0.769395 |
ad2480c80d071a86a442b037bb0843f01bee1126 | 97 | py | Python | bench/bench_long_empty_string.py | janaknat/markupsafe | 770b029aac97da76d306a45a6f33998393a0835a | [
"BSD-3-Clause"
] | 415 | 2016-03-29T13:11:21.000Z | 2022-03-30T16:25:27.000Z | bench/bench_long_empty_string.py | janaknat/markupsafe | 770b029aac97da76d306a45a6f33998393a0835a | [
"BSD-3-Clause"
] | 116 | 2016-03-31T15:09:01.000Z | 2022-03-18T01:46:10.000Z | bench/bench_long_empty_string.py | janaknat/markupsafe | 770b029aac97da76d306a45a6f33998393a0835a | [
"BSD-3-Clause"
] | 124 | 2016-03-29T15:55:23.000Z | 2022-03-24T23:16:04.000Z | from markupsafe import escape
def run():
string = "Hello World!" * 1000
escape(string)
| 13.857143 | 34 | 0.659794 |
82cf720edafd07719a19f852b78640086064242a | 6,180 | py | Python | p1_navigation/dqn_agent.py | aamonten/deep-reinforcement-learning | 201969ea1cc829e57a1ccb79123279e6e4c44ca7 | [
"MIT"
] | 1 | 2021-11-21T19:09:10.000Z | 2021-11-21T19:09:10.000Z | p1_navigation/dqn_agent.py | aamonten/deep-reinforcement-learning | 201969ea1cc829e57a1ccb79123279e6e4c44ca7 | [
"MIT"
] | null | null | null | p1_navigation/dqn_agent.py | aamonten/deep-reinforcement-learning | 201969ea1cc829e57a1ccb79123279e6e4c44ca7 | [
"MIT"
] | null | null | null | import numpy as np
import random
from collections import namedtuple, deque
from model import QNetwork
import torch
import torch.nn.functional as F
import torch.optim as optim
BUFFER_SIZE = int(1e5) # replay buffer size
BATCH_SIZE = 64 # minibatch size
GAMMA = 0.99 # discount factor
TAU = 1e-3 ... | 39.363057 | 127 | 0.620227 |
602d20dc9145d9f0d1361da1ac3d1ff086e48546 | 1,670 | py | Python | checkerboard.py | balajirama/checkerboard | 7882d604e90ab93914a4c8af798e5c4d95894251 | [
"MIT"
] | null | null | null | checkerboard.py | balajirama/checkerboard | 7882d604e90ab93914a4c8af798e5c4d95894251 | [
"MIT"
] | null | null | null | checkerboard.py | balajirama/checkerboard | 7882d604e90ab93914a4c8af798e5c4d95894251 | [
"MIT"
] | null | null | null | from flask import Flask, render_template, request, redirect, session
from colour import Color
app = Flask(__name__)
app.secret_key = 'darksecret'
@app.route("/")
def checker_8_by_8():
return render_template("checker.html", num_rows=8, num_cols=8, colors=["salmon", "black"])
@app.route("/<x>")
def checker_x_by_8... | 27.377049 | 107 | 0.634731 |
4604248dbc9e7b356cd820735a1f0eb4a36817fe | 10,258 | py | Python | hsdata/utils.py | youfou/hsdata | 49866116eaeb78516829da59df59a2c0b1141c08 | [
"Apache-2.0"
] | 115 | 2016-10-20T10:03:48.000Z | 2022-01-17T04:18:06.000Z | hsdata/utils.py | youfou/hs_data | 49866116eaeb78516829da59df59a2c0b1141c08 | [
"Apache-2.0"
] | 3 | 2016-10-25T14:07:57.000Z | 2020-03-26T10:35:53.000Z | hsdata/utils.py | youfou/hs_data | 49866116eaeb78516829da59df59a2c0b1141c08 | [
"Apache-2.0"
] | 27 | 2016-10-26T05:31:54.000Z | 2022-03-17T10:31:52.000Z | #!/usr/bin/env python3
# coding: utf-8
"""
一些实用的小功能
"""
import csv
import logging
import os
from collections import Counter
from datetime import datetime, timedelta
from .core import (
MODE_STANDARD,
Decks,
days_ago,
Career, CAREERS, Cards)
from .hearthstats import HearthStatsDecks
from .hsbox import... | 28.181319 | 87 | 0.56629 |
667c019dc0058486f74704eeb9eb88e840a157dc | 40,260 | py | Python | tests/cfngin/providers/aws/test_default.py | animaxcg/runway | dfe38107126b61a7f297874f235f68a045a5ca09 | [
"Apache-2.0"
] | null | null | null | tests/cfngin/providers/aws/test_default.py | animaxcg/runway | dfe38107126b61a7f297874f235f68a045a5ca09 | [
"Apache-2.0"
] | null | null | null | tests/cfngin/providers/aws/test_default.py | animaxcg/runway | dfe38107126b61a7f297874f235f68a045a5ca09 | [
"Apache-2.0"
] | null | null | null | """Tests for runway.cfngin.providers.aws.default."""
# pylint: disable=too-many-lines
import copy
import os.path
import random
import string
import threading
import unittest
from datetime import datetime
import boto3
from botocore.exceptions import ClientError, UnStubbedResponseError
from botocore.stub import Stubber
... | 37.909605 | 79 | 0.573249 |
3085559a0626fb866660d4f39f77bd9ee1a99e6f | 4,001 | py | Python | semantic_release/ci_checks.py | TheTwitchy/python-semantic-release | 6048843ea1642c67fcfbbd6fd402f0f3ebdabdb2 | [
"MIT"
] | null | null | null | semantic_release/ci_checks.py | TheTwitchy/python-semantic-release | 6048843ea1642c67fcfbbd6fd402f0f3ebdabdb2 | [
"MIT"
] | null | null | null | semantic_release/ci_checks.py | TheTwitchy/python-semantic-release | 6048843ea1642c67fcfbbd6fd402f0f3ebdabdb2 | [
"MIT"
] | null | null | null | """CI Checks
"""
import os
from typing import Callable
from semantic_release.errors import CiVerificationError
def checker(func: Callable) -> Callable:
"""
A decorator that will convert AssertionErrors into
CiVerificationError.
:param func: A function that will raise AssertionError
:return: The ... | 28.784173 | 88 | 0.683329 |
e29861b76e765132df1542aa3b1385e9bf77ca6f | 6,800 | py | Python | python/hmaps_postgres2es.py | jvanulde/opendrr-api | ab45369363d33f361ec7a2bc0ddbea7f293545aa | [
"MIT"
] | null | null | null | python/hmaps_postgres2es.py | jvanulde/opendrr-api | ab45369363d33f361ec7a2bc0ddbea7f293545aa | [
"MIT"
] | 6 | 2021-06-03T16:30:22.000Z | 2022-03-27T15:31:17.000Z | python/hmaps_postgres2es.py | jvanulde/opendrr-api | ab45369363d33f361ec7a2bc0ddbea7f293545aa | [
"MIT"
] | null | null | null | # =================================================================
#
# Authors: Drew Rotheram <drew.rotheram@gmail.com>
#
# =================================================================
import json
import os
import sys
import psycopg2
import configparser
import logging
import argparse
import decimal
from elastic... | 34.517766 | 78 | 0.446765 |
78c789bc439b97e169369d5c3ef8e8a44f77c192 | 1,798 | py | Python | keybase_piazza_bot/keybase.py | andrew-fuchs/keybase-piazza-bot | 7559120896c602ea398b7bb43640e8c273c03fe5 | [
"MIT"
] | null | null | null | keybase_piazza_bot/keybase.py | andrew-fuchs/keybase-piazza-bot | 7559120896c602ea398b7bb43640e8c273c03fe5 | [
"MIT"
] | null | null | null | keybase_piazza_bot/keybase.py | andrew-fuchs/keybase-piazza-bot | 7559120896c602ea398b7bb43640e8c273c03fe5 | [
"MIT"
] | null | null | null | from pykeybasebot import Bot, KbEvent
from pykeybasebot.types import chat1
async def chat_reply(bot: Bot, channel: chat1.ChatChannel,
message_id: chat1.MessageID, message: str
) -> chat1.SendRes:
await bot.ensure_initialized()
# TODO do we need to handle `chat1.ConvIDStr` in `channel`?
... | 32.107143 | 91 | 0.573415 |
eedb27a6bbc1c2a1fbad4890111e7f45aa23c2bb | 9,650 | py | Python | brian2/tests/features/speed.py | awillats/brian2 | e1107ed0cc4a7d6c69c1e2634b675ba09edfd9fc | [
"BSD-2-Clause"
] | 1 | 2021-06-10T15:28:51.000Z | 2021-06-10T15:28:51.000Z | brian2/tests/features/speed.py | awillats/brian2 | e1107ed0cc4a7d6c69c1e2634b675ba09edfd9fc | [
"BSD-2-Clause"
] | null | null | null | brian2/tests/features/speed.py | awillats/brian2 | e1107ed0cc4a7d6c69c1e2634b675ba09edfd9fc | [
"BSD-2-Clause"
] | null | null | null | '''
Check the speed of different Brian 2 configurations
'''
from brian2 import *
from brian2.tests.features import SpeedTest
__all__ = ['LinearNeuronsOnly',
'HHNeuronsOnly',
'CUBAFixedConnectivity',
'COBAHHFixedConnectivity',
'VerySparseMediumRateSynapsesOnly',
'... | 29.968944 | 102 | 0.503731 |
389de58652834e7d67dd37cfade26eb8869cde8c | 15,954 | py | Python | Colorizing-with-GANs-master/src/models.py | adityajain28/Colorizing-with-GANs | 7657da967ee29e53a8344b554b3d817bea215e69 | [
"Apache-2.0"
] | null | null | null | Colorizing-with-GANs-master/src/models.py | adityajain28/Colorizing-with-GANs | 7657da967ee29e53a8344b554b3d817bea215e69 | [
"Apache-2.0"
] | null | null | null | Colorizing-with-GANs-master/src/models.py | adityajain28/Colorizing-with-GANs | 7657da967ee29e53a8344b554b3d817bea215e69 | [
"Apache-2.0"
] | null | null | null | from __future__ import print_function
import os
import time
import numpy as np
import tensorflow as tf
from tensorflow import keras
from abc import abstractmethod
from .networks import Generator, Discriminator
from .dataset import Places365Dataset, Cifar10Dataset
from .ops import pixelwise_accuracy, preprocess, postp... | 43.950413 | 158 | 0.586499 |
8d18e54ec36fbc8cbfabd72d0aa2c4531df69717 | 5,227 | py | Python | src/data_setup.py | sukumargv/hurricane | 98e792f94f6924e0b3fcfb8aef32a6638a551cd2 | [
"MIT"
] | null | null | null | src/data_setup.py | sukumargv/hurricane | 98e792f94f6924e0b3fcfb8aef32a6638a551cd2 | [
"MIT"
] | 2 | 2016-09-26T16:45:53.000Z | 2016-09-26T17:11:35.000Z | src/data_setup.py | sukumargv/hurricane | 98e792f94f6924e0b3fcfb8aef32a6638a551cd2 | [
"MIT"
] | null | null | null | import numpy as np
# For loading the data into Dataframes
import pandas as pd
# For string literal
import ast
# import packages related to gdal
from osgeo import gdal
import pyproj
# For time Zone Conversions
import pytz
# for plots
import matplotlib.pyplot as plt
with open('../data_collection/track_data/r2_Que... | 34.388158 | 209 | 0.6608 |
e5b238f11c698b7ab8f6fc664daf095bf1d7164b | 1,568 | py | Python | app/latches.py | bobosoft/intrepyd | 13f0912b31f86f9bcc50f52ef4ad870e33f0cf65 | [
"BSD-3-Clause"
] | 2 | 2021-04-25T17:38:03.000Z | 2022-03-20T20:48:50.000Z | app/latches.py | bobosoft/intrepyd | 13f0912b31f86f9bcc50f52ef4ad870e33f0cf65 | [
"BSD-3-Clause"
] | 1 | 2016-11-30T22:25:00.000Z | 2017-01-16T22:43:39.000Z | app/latches.py | bobosoft/intrepyd | 13f0912b31f86f9bcc50f52ef4ad870e33f0cf65 | [
"BSD-3-Clause"
] | null | null | null | """
Implementation of REST API for latch creation
"""
from flask import Blueprint, request
from .utils import typename_to_type
from .contexts import contexts
lr = Blueprint('latches', __name__)
@lr.route('', methods=['GET'])
def list_latches():
"""
Lists the available latches
"""
context = request.arg... | 30.153846 | 71 | 0.639031 |
2da61cb367b97ce8b6d3bbbce3ec8c5bb46ca4d8 | 992 | py | Python | isi_sdk_8_2_1/test/test_compatibilities_class_active.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_8_2_1/test/test_compatibilities_class_active.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_8_2_1/test/test_compatibilities_class_active.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 8
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import isi_sdk_8_2_1
from i... | 24.195122 | 110 | 0.731855 |
871e4e2eb0be1ca002d7ca224cc085f0e0502f70 | 2,040 | py | Python | aliyun-python-sdk-live/aliyunsdklive/request/v20161101/AddLiveStreamTranscodeRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-live/aliyunsdklive/request/v20161101/AddLiveStreamTranscodeRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-live/aliyunsdklive/request/v20161101/AddLiveStreamTranscodeRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"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 u... | 33.442623 | 82 | 0.758333 |
3cd4b3f07265683633cdb6bc1e8f6be4215c5aee | 255 | py | Python | docs/examples/compute/internetsolutions/instantiate_driver.py | rgharris/libcloud | 90971e17bfd7b6bb97b2489986472c531cc8e140 | [
"Apache-2.0"
] | null | null | null | docs/examples/compute/internetsolutions/instantiate_driver.py | rgharris/libcloud | 90971e17bfd7b6bb97b2489986472c531cc8e140 | [
"Apache-2.0"
] | 1 | 2021-12-06T12:29:13.000Z | 2021-12-06T12:29:13.000Z | docs/examples/compute/internetsolutions/instantiate_driver.py | rgharris/libcloud | 90971e17bfd7b6bb97b2489986472c531cc8e140 | [
"Apache-2.0"
] | 1 | 2019-08-05T10:12:02.000Z | 2019-08-05T10:12:02.000Z | from pprint import pprint
from libcloud.compute.types import Provider
from libcloud.compute.providers import get_driver
cls = get_driver(Provider.INTERNETSOLUTIONS)
driver = cls("my username", "my password", region="is-af")
pprint(driver.list_nodes())
| 25.5 | 58 | 0.796078 |
dd590419697592b5ea0aa11d7ec66dc35becbb63 | 105 | py | Python | PyWC3/__init__.py | Blimba/PyWC3 | 16d519bbb98e7593b8d14d14d9b81b6d6932ef0c | [
"MIT"
] | 14 | 2020-02-16T14:25:02.000Z | 2021-12-07T13:57:34.000Z | PyWC3/__init__.py | sylvainSUPINTERNET/PyWC3 | 16d519bbb98e7593b8d14d14d9b81b6d6932ef0c | [
"MIT"
] | 3 | 2020-04-20T02:31:31.000Z | 2022-02-25T17:06:12.000Z | PyWC3/__init__.py | sylvainSUPINTERNET/PyWC3 | 16d519bbb98e7593b8d14d14d9b81b6d6932ef0c | [
"MIT"
] | 2 | 2021-03-17T13:15:32.000Z | 2021-09-26T09:24:21.000Z | from .PyWC3.map import Map
from .PyWC3.jass import Jass
from .PyWC3.obj import ObjFile, DataFile, DooFile | 35 | 49 | 0.8 |
0e9457f9915d83fd71054beb322f6bfb59f2319e | 4,627 | py | Python | api/__init__.py | lyy321/BAR_API | 82bcd83c72b6873d6cc9778214d1b41318200411 | [
"MIT"
] | null | null | null | api/__init__.py | lyy321/BAR_API | 82bcd83c72b6873d6cc9778214d1b41318200411 | [
"MIT"
] | null | null | null | api/__init__.py | lyy321/BAR_API | 82bcd83c72b6873d6cc9778214d1b41318200411 | [
"MIT"
] | null | null | null | from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_restx import Api
from flask_cors import CORS
from flask_caching import Cache
from flask_limiter import Limiter
from flask_limiter.util import get_remote_address
from sqlalchemy import MetaData
import os
def create_app():
"""Initialize the ... | 34.789474 | 87 | 0.711692 |
9a810e32121034b6d588902f15d8068d6210319b | 213 | py | Python | aio_pika/patterns/__init__.py | aviramha/aio-pika | c480d2e62ac3f3e31a0714114e368bb6fd6eeb34 | [
"Apache-2.0"
] | null | null | null | aio_pika/patterns/__init__.py | aviramha/aio-pika | c480d2e62ac3f3e31a0714114e368bb6fd6eeb34 | [
"Apache-2.0"
] | null | null | null | aio_pika/patterns/__init__.py | aviramha/aio-pika | c480d2e62ac3f3e31a0714114e368bb6fd6eeb34 | [
"Apache-2.0"
] | null | null | null | from .master import Master, Worker, NackMessage, RejectMessage, JsonMaster
from .rpc import RPC, JsonRPC
__all__ = (
'Master', 'NackMessage', 'RejectMessage',
'RPC', 'Worker', 'JsonMaster', 'JsonRPC',
)
| 23.666667 | 74 | 0.694836 |
4b280fb8590d009795cfb8b0746a89edb18e751f | 1,497 | py | Python | adventofcode/2021/1/test/test_process_depth.py | bneradt/toy | 982e80ec98f4e951f7275e5f22cb0197f8f86c08 | [
"Apache-2.0"
] | null | null | null | adventofcode/2021/1/test/test_process_depth.py | bneradt/toy | 982e80ec98f4e951f7275e5f22cb0197f8f86c08 | [
"Apache-2.0"
] | null | null | null | adventofcode/2021/1/test/test_process_depth.py | bneradt/toy | 982e80ec98f4e951f7275e5f22cb0197f8f86c08 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
from process_depth import count_increases, IntFileIterator
from tempfile import NamedTemporaryFile
import unittest
class TestCountIncreasesWindowSize1(unittest.TestCase):
"""
Test count_increases with a window size of 1 (the default).
"""
def test_all_increases(self):
l ... | 29.352941 | 63 | 0.640615 |
89304c1cae1226fe56067fa18038e2c32da5aceb | 32,162 | py | Python | test/functional/fundrawtransaction.py | tubacle/tubacle | b699ee9667e0997fab5c0327173f959b26177ba6 | [
"MIT"
] | null | null | null | test/functional/fundrawtransaction.py | tubacle/tubacle | b699ee9667e0997fab5c0327173f959b26177ba6 | [
"MIT"
] | null | null | null | test/functional/fundrawtransaction.py | tubacle/tubacle | b699ee9667e0997fab5c0327173f959b26177ba6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the fundrawtransaction RPC."""
from test_framework.test_framework import BitcoinTestFramework
fro... | 44.60749 | 223 | 0.569865 |
2c5d1cd03e9897ab66e80adaccba702e97f80b59 | 1,184 | py | Python | setup.py | brunobeltran/nuc_chain | ef03d7285e35788ea86b467303dfd78e52525114 | [
"MIT"
] | null | null | null | setup.py | brunobeltran/nuc_chain | ef03d7285e35788ea86b467303dfd78e52525114 | [
"MIT"
] | null | null | null | setup.py | brunobeltran/nuc_chain | ef03d7285e35788ea86b467303dfd78e52525114 | [
"MIT"
] | 1 | 2019-07-16T16:41:36.000Z | 2019-07-16T16:41:36.000Z | import setuptools
import nuc_chain
long_description = nuc_chain.__doc__
setuptools.setup(
name="nuc_chain",
version=nuc_chain.__version__,
author="Bruno Belran",
author_email="brunobeltran0@gmail.com",
description="Modeling chromatin as a chain of nucleosomes",
long_description=long_descriptio... | 35.878788 | 74 | 0.652872 |
b371f56c23b68bba34d5c6c6b9cf0b43dda6fcdf | 8,181 | py | Python | src/extensions/BIOS COMMANDS/SetPasswordCommand.py | tomy781107/python-redfish-utility | 1639871df55233ba8553bbf250e5caaa23ebd247 | [
"Apache-2.0"
] | null | null | null | src/extensions/BIOS COMMANDS/SetPasswordCommand.py | tomy781107/python-redfish-utility | 1639871df55233ba8553bbf250e5caaa23ebd247 | [
"Apache-2.0"
] | 1 | 2021-09-17T21:23:50.000Z | 2021-11-24T01:47:24.000Z | src/extensions/BIOS COMMANDS/SetPasswordCommand.py | tomy781107/python-redfish-utility | 1639871df55233ba8553bbf250e5caaa23ebd247 | [
"Apache-2.0"
] | 1 | 2021-10-18T08:36:53.000Z | 2021-10-18T08:36:53.000Z | ###
# Copyright 2016-2021 Hewlett Packard Enterprise, 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
#
# Un... | 39.713592 | 118 | 0.538687 |
9c4fbe8a0e49f5ca98c21de9b202c245aa00306d | 115 | py | Python | apps/news/admin.py | kohhi/exist | c688a228ac9fee56ff29990a6d75b2a09f8457ca | [
"MIT"
] | 159 | 2019-03-15T10:46:19.000Z | 2022-03-12T09:19:31.000Z | apps/news/admin.py | kohhi/exist | c688a228ac9fee56ff29990a6d75b2a09f8457ca | [
"MIT"
] | 6 | 2019-03-16T12:51:24.000Z | 2020-07-09T02:25:42.000Z | apps/news/admin.py | kohhi/exist | c688a228ac9fee56ff29990a6d75b2a09f8457ca | [
"MIT"
] | 36 | 2019-03-16T10:37:14.000Z | 2021-11-14T21:04:18.000Z | from django.contrib import admin
# Register your models here.
from .models import News
admin.site.register(News)
| 16.428571 | 32 | 0.791304 |
7ca0cfd0c9c38b26dc98545c16b0ff93ce8d6370 | 582 | bzl | Python | third_party/darts_clone/workspace.bzl | jeongukjae/nori-clone | e0f8afb842499be4d55f1fc47292fbecdbca2a86 | [
"Apache-2.0"
] | 38 | 2022-01-07T05:19:28.000Z | 2022-03-27T13:44:53.000Z | third_party/darts_clone/workspace.bzl | jeongukjae/nori-clone | e0f8afb842499be4d55f1fc47292fbecdbca2a86 | [
"Apache-2.0"
] | 19 | 2022-01-11T14:25:03.000Z | 2022-02-18T14:24:19.000Z | third_party/darts_clone/workspace.bzl | jeongukjae/nori-clone | e0f8afb842499be4d55f1fc47292fbecdbca2a86 | [
"Apache-2.0"
] | 3 | 2022-02-14T13:51:20.000Z | 2022-03-28T06:55:38.000Z | load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("//third_party:repo.bzl", "clean_dep", "clean_deps")
def configure_darts_clone():
http_archive(
name = "darts_clone",
build_file = clean_dep("//third_party/darts_clone:BUILD.bzl"),
sha256 = "c97f55d05c98da6fcaf7f9ecc6... | 44.769231 | 107 | 0.726804 |
6a566073eda12f49a456b7099709ff281750e0a6 | 846 | py | Python | setup.py | jakejack13/gachapy | 78c0ca5cd14a618a433009f9220049bcfc507516 | [
"MIT"
] | 5 | 2021-03-09T04:04:33.000Z | 2021-05-27T03:28:15.000Z | setup.py | jakejack13/gachapy | 78c0ca5cd14a618a433009f9220049bcfc507516 | [
"MIT"
] | null | null | null | setup.py | jakejack13/gachapy | 78c0ca5cd14a618a433009f9220049bcfc507516 | [
"MIT"
] | 3 | 2021-04-02T02:31:18.000Z | 2021-04-20T03:03:04.000Z | import setuptools
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setuptools.setup(
name="gachapy",
version="1.0.0",
author="Jacob Kerr",
author_email="jck268@cornell.edu",
description="A gacha engine built in Python for developing gacha games",
long_descr... | 31.333333 | 76 | 0.658392 |
176519885e88d46b1a66e155e5a33a661059455b | 7,648 | py | Python | wot/graphics/plot_fates.py | Jabbath/wot | 90b40f03ed1c5feb4018096b9e2c1294cf66f535 | [
"BSD-3-Clause"
] | null | null | null | wot/graphics/plot_fates.py | Jabbath/wot | 90b40f03ed1c5feb4018096b9e2c1294cf66f535 | [
"BSD-3-Clause"
] | null | null | null | wot/graphics/plot_fates.py | Jabbath/wot | 90b40f03ed1c5feb4018096b9e2c1294cf66f535 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
import pandas as pd
from matplotlib import patches
from matplotlib import pyplot as plt
from mpl_toolkits.mplot3d.art3d import Poly3DCollection
import math
import wot.graphics
class Fate_Plotter():
def __init__(self, fate_ds):
"""
Parameters
----------
fate_... | 38.049751 | 119 | 0.565507 |
c6d40e861d662a648636cfea43df0215df59cb53 | 4,932 | py | Python | saleor/graphql/app/tests/mutations/test_app_install.py | fairhopeweb/saleor | 9ac6c22652d46ba65a5b894da5f1ba5bec48c019 | [
"CC-BY-4.0"
] | 15,337 | 2015-01-12T02:11:52.000Z | 2021-10-05T19:19:29.000Z | saleor/graphql/app/tests/mutations/test_app_install.py | fairhopeweb/saleor | 9ac6c22652d46ba65a5b894da5f1ba5bec48c019 | [
"CC-BY-4.0"
] | 7,486 | 2015-02-11T10:52:13.000Z | 2021-10-06T09:37:15.000Z | saleor/graphql/app/tests/mutations/test_app_install.py | aminziadna/saleor | 2e78fb5bcf8b83a6278af02551a104cfa555a1fb | [
"CC-BY-4.0"
] | 5,864 | 2015-01-16T14:52:54.000Z | 2021-10-05T23:01:15.000Z | from unittest.mock import Mock
import graphene
from .....app.models import AppInstallation
from .....core import JobStatus
from ....core.enums import AppErrorCode, PermissionEnum
from ....tests.utils import get_graphql_content
INSTALL_APP_MUTATION = """
mutation AppInstall(
$app_name: String, $manifest_u... | 33.780822 | 87 | 0.687956 |
9f466a25cd20bded9b0dcebd8afcf228cd48edac | 718 | py | Python | onadata/libs/permissions.py | amks1/kobocat | 0f36c75cc55345716558e8bece2ef48567896997 | [
"BSD-2-Clause"
] | 87 | 2015-02-10T23:36:28.000Z | 2022-01-31T00:51:10.000Z | onadata/libs/permissions.py | amks1/kobocat | 0f36c75cc55345716558e8bece2ef48567896997 | [
"BSD-2-Clause"
] | 443 | 2015-04-28T18:50:25.000Z | 2022-03-31T03:29:43.000Z | onadata/libs/permissions.py | amks1/kobocat | 0f36c75cc55345716558e8bece2ef48567896997 | [
"BSD-2-Clause"
] | 122 | 2015-01-13T16:27:44.000Z | 2022-01-24T09:35:56.000Z | # coding: utf-8
from guardian.shortcuts import get_users_with_perms
def get_object_users_with_permissions(obj, exclude=None, serializable=False):
"""Returns users, roles and permissions for a object.
When called with with `serializable=True`, return usernames (strings)
instead of User objects, which canno... | 31.217391 | 77 | 0.679666 |
7c599f4e2533a2a68eaa819487a7bf1416e78801 | 30,376 | py | Python | synphot/models.py | spacetelescope/pysynphot_DONOTUSE | 2a382d7bdf29cc4a1e6b69e59d5c1d0f82dabffc | [
"BSD-3-Clause"
] | 20 | 2016-09-08T22:01:21.000Z | 2022-01-18T03:56:53.000Z | synphot/models.py | spacetelescope/pysynphot_DONOTUSE | 2a382d7bdf29cc4a1e6b69e59d5c1d0f82dabffc | [
"BSD-3-Clause"
] | 212 | 2016-04-13T21:30:38.000Z | 2021-12-30T21:31:25.000Z | synphot/models.py | spacetelescope/pysynphot_DONOTUSE | 2a382d7bdf29cc4a1e6b69e59d5c1d0f82dabffc | [
"BSD-3-Clause"
] | 14 | 2016-06-12T17:49:57.000Z | 2022-01-18T03:57:02.000Z | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""Spectrum models not in `astropy.modeling`."""
# STDLIB
import math
import warnings
from copy import deepcopy
from functools import partial
# THIRD-PARTY
import numpy as np
# ASTROPY
from astropy import constants as const
from astropy import units as ... | 30.713852 | 152 | 0.595931 |
57b6cefac16501044d746dd27f7eff7cfe7ef6a1 | 3,829 | py | Python | robustcode/parsers/parser.py | david-maine/robust-code | 971b7336813bb856fafab368320be47a16919e4c | [
"Apache-2.0"
] | 8 | 2020-08-16T23:26:37.000Z | 2021-11-03T06:52:56.000Z | robustcode/parsers/parser.py | david-maine/robust-code | 971b7336813bb856fafab368320be47a16919e4c | [
"Apache-2.0"
] | 2 | 2020-08-16T23:11:46.000Z | 2021-03-30T02:12:23.000Z | robustcode/parsers/parser.py | eth-sri/robust-code | 971b7336813bb856fafab368320be47a16919e4c | [
"Apache-2.0"
] | 2 | 2021-03-31T04:17:50.000Z | 2021-10-21T20:49:27.000Z | #!/usr/bin/env python
import argparse
import collections
import json
import os
import random
import subprocess
import sys
import requests
from robustcode.analysis.graph import AstTree
def FindSubBinary(binary):
for path in sys.path:
abs_binary_path = os.path.join(os.path.abspath(path), binary)
i... | 25.871622 | 86 | 0.653173 |
19bab1a39fca4116e1e13f27ef5bd12e7243f4f6 | 1,669 | py | Python | twitapp/twitter.py | bmulas1535/twit-app | 8d438ed162ee6c0c8b2cccb0fdbc2455a6b7f5ab | [
"MIT"
] | null | null | null | twitapp/twitter.py | bmulas1535/twit-app | 8d438ed162ee6c0c8b2cccb0fdbc2455a6b7f5ab | [
"MIT"
] | 3 | 2021-06-08T20:43:12.000Z | 2022-01-13T01:54:50.000Z | twitapp/twitter.py | bmulas1535/twit-app | 8d438ed162ee6c0c8b2cccb0fdbc2455a6b7f5ab | [
"MIT"
] | null | null | null | """Retrieve tweets, embedding, save into database"""
import basilica
import tweepy
from decouple import config
from twitapp.models import db, Tweets, Tuser
TWITTER_AUTH = tweepy.OAuthHandler(config('TWITTER_CONSUMER_KEY'),
config('TWITTER_CONSUMER_SECRET'))
TWITTER_AUTH.set_access_... | 36.282609 | 73 | 0.589575 |
1a54025f327306a6502bf22bdc5696fd382003b7 | 1,729 | py | Python | functions/adjust_cases_functions.py | biomac-lab/covid19_forecast | 6613064f8a6d8023ecbdaddbc2e7525b6ad0796f | [
"Apache-2.0"
] | null | null | null | functions/adjust_cases_functions.py | biomac-lab/covid19_forecast | 6613064f8a6d8023ecbdaddbc2e7525b6ad0796f | [
"Apache-2.0"
] | null | null | null | functions/adjust_cases_functions.py | biomac-lab/covid19_forecast | 6613064f8a6d8023ecbdaddbc2e7525b6ad0796f | [
"Apache-2.0"
] | null | null | null | import pandas as pd
import numpy as np
# Define functions for model
def confirmed_to_onset(confirmed, p_delay, col_name='num_cases', min_onset_date=None):
min_onset_date = pd.to_datetime(min_onset_date)
# Reverse cases so that we convolve into the past
convolved = np.convolve(np.squeeze(confirmed.iloc[::-1... | 35.285714 | 86 | 0.688259 |
9718090de23d6b4ff645e48b2e25552827e7e4f5 | 1,773 | py | Python | linux_metrics/test_mem_stat.py | bobf/linux-metrics | 73e5e68580d4c4018323a2e595a03fff7c8cea35 | [
"MIT"
] | 48 | 2015-02-06T11:51:59.000Z | 2021-04-14T10:00:52.000Z | linux_metrics/test_mem_stat.py | bobf/linux-metrics | 73e5e68580d4c4018323a2e595a03fff7c8cea35 | [
"MIT"
] | 2 | 2015-08-25T16:56:17.000Z | 2019-01-25T16:10:53.000Z | linux_metrics/test_mem_stat.py | bobf/linux-metrics | 73e5e68580d4c4018323a2e595a03fff7c8cea35 | [
"MIT"
] | 20 | 2015-05-01T04:04:20.000Z | 2021-12-26T07:53:16.000Z | #!/usr/bin/env python
#
# Copyright (c) 2010-2013 Corey Goldberg (http://goldb.org)
#
# This file is part of linux-metrics
#
# License :: OSI Approved :: MIT License:
# http://www.opensource.org/licenses/mit-license
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of... | 30.050847 | 84 | 0.681331 |
69c91890572456192e6dc8d3576551a20c36534c | 100 | py | Python | app/api/app/login_signup.py | kingyoungfan/v-mall-api | 86ff05608162f6127d8af59c556ef5586bad8f68 | [
"MIT"
] | null | null | null | app/api/app/login_signup.py | kingyoungfan/v-mall-api | 86ff05608162f6127d8af59c556ef5586bad8f68 | [
"MIT"
] | null | null | null | app/api/app/login_signup.py | kingyoungfan/v-mall-api | 86ff05608162f6127d8af59c556ef5586bad8f68 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# @author: yangyang
# @date 5/4/21 15:30
"""
登录注册接口,只有这个文件下的接口不需要登录验证
"""
| 11.111111 | 24 | 0.59 |
469ea60f51d89c38d596a47a5c98d28812beb465 | 101 | py | Python | db_adapter/base/__init__.py | CUrW-SL/curw_db_adapter | 9d9ef24f42080910e0bd251bc7f001b0a4b0ab31 | [
"MIT"
] | 2 | 2019-04-26T07:50:33.000Z | 2019-09-28T20:15:33.000Z | db_adapter/base/__init__.py | CUrW-SL/curw_db_adapter | 9d9ef24f42080910e0bd251bc7f001b0a4b0ab31 | [
"MIT"
] | 1 | 2019-04-03T09:30:38.000Z | 2019-04-20T18:11:59.000Z | db_adapter/base/__init__.py | shadhini/curw_db_adapter | 4db8e1ea8794ffbd0dce29ac954a13315e83d843 | [
"MIT"
] | null | null | null | from .pymysql_base import get_Pool, destroy_Pool, destroy_Pool, get_connection_for_iterable_cursor
| 25.25 | 98 | 0.871287 |
9ce2725327456b6ccf6f2c80794fc8d0cb5f8928 | 800 | py | Python | steenzout/__init__.py | mikebohdan/python-object | 9a757427b5950cda2883b1305a7866437360935a | [
"Apache-2.0"
] | 1 | 2015-04-18T01:35:54.000Z | 2015-04-18T01:35:54.000Z | steenzout/__init__.py | mikebohdan/python-object | 9a757427b5950cda2883b1305a7866437360935a | [
"Apache-2.0"
] | 21 | 2015-12-24T04:40:30.000Z | 2019-10-05T22:21:05.000Z | steenzout/__init__.py | mikebohdan/python-object | 9a757427b5950cda2883b1305a7866437360935a | [
"Apache-2.0"
] | 3 | 2016-08-15T15:46:14.000Z | 2017-09-12T23:54:39.000Z | # -*- coding: utf-8 -*-
#
# Copyright 2016 Pedro Salgado
#
# 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 l... | 33.333333 | 74 | 0.74875 |
3007575572f347f07e88d520b286ae5d4b0e8911 | 2,987 | py | Python | dbt_gen/py3env/lib/python3.5/site-packages/boto3/__init__.py | norton120/dbt_gen | 712fc8698a77c3372f5a403a5ae50711d0cb3c7d | [
"MIT"
] | null | null | null | dbt_gen/py3env/lib/python3.5/site-packages/boto3/__init__.py | norton120/dbt_gen | 712fc8698a77c3372f5a403a5ae50711d0cb3c7d | [
"MIT"
] | null | null | null | dbt_gen/py3env/lib/python3.5/site-packages/boto3/__init__.py | norton120/dbt_gen | 712fc8698a77c3372f5a403a5ae50711d0cb3c7d | [
"MIT"
] | null | null | null | # Copyright 2014 Amazon.com, Inc. or its affiliates. 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. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompa... | 29 | 81 | 0.705055 |
bfee66e86d8cfbfa37e012361f574917f81842d1 | 620 | py | Python | Demo/sgi/audio_stdwin/vumeter.py | AtjonTV/Python-1.4 | 2a80562c5a163490f444181cb75ca1b3089759ec | [
"Unlicense",
"TCL",
"DOC",
"AAL",
"X11"
] | null | null | null | Demo/sgi/audio_stdwin/vumeter.py | AtjonTV/Python-1.4 | 2a80562c5a163490f444181cb75ca1b3089759ec | [
"Unlicense",
"TCL",
"DOC",
"AAL",
"X11"
] | null | null | null | Demo/sgi/audio_stdwin/vumeter.py | AtjonTV/Python-1.4 | 2a80562c5a163490f444181cb75ca1b3089759ec | [
"Unlicense",
"TCL",
"DOC",
"AAL",
"X11"
] | null | null | null | #! /usr/local/python
import audio
import stdwin
from VUMeter import VUMeter
from WindowParent import WindowParent
import MainLoop
NBUFS=20
BUFSIZE = NBUFS*48
SCALE=128
class MyVUMeter(VUMeter):
def init_reactivity(self):
self.parent.need_mouse(self)
def mouse_down(self, detail):
if self.enabled:
self.stop(... | 17.222222 | 50 | 0.719355 |
732469eb4e760dfdb14730412b65c8d2635ab6e0 | 18,960 | py | Python | frappe/model/db_schema.py | snehapatil1/frappe | dd2c33e34ad120e6305a2fa230a72d23a7a03e98 | [
"MIT"
] | null | null | null | frappe/model/db_schema.py | snehapatil1/frappe | dd2c33e34ad120e6305a2fa230a72d23a7a03e98 | [
"MIT"
] | 9 | 2020-03-24T18:09:18.000Z | 2022-03-12T00:12:04.000Z | frappe/model/db_schema.py | snehapatil1/frappe | dd2c33e34ad120e6305a2fa230a72d23a7a03e98 | [
"MIT"
] | 3 | 2018-01-16T17:59:55.000Z | 2019-09-24T16:02:10.000Z | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
"""
Syncs a database table to the `DocType` (metadata)
.. note:: This module is only used internally
"""
import re
import os
import frappe
from frappe import _
from frappe.utils... | 29.905363 | 142 | 0.664768 |
1a01be00c9592661de79b0c2130c3f998679576a | 332 | py | Python | 2020/day1/part1.py | FranciscoAT/advent-of-code | 69f20696e4c59ff6dfa010b22dd3593ea3d12208 | [
"MIT"
] | null | null | null | 2020/day1/part1.py | FranciscoAT/advent-of-code | 69f20696e4c59ff6dfa010b22dd3593ea3d12208 | [
"MIT"
] | null | null | null | 2020/day1/part1.py | FranciscoAT/advent-of-code | 69f20696e4c59ff6dfa010b22dd3593ea3d12208 | [
"MIT"
] | null | null | null | from pathlib import Path
def main() -> None:
values = [int(value.rstrip()) for value in Path("day-1.in").open().readlines()]
for value in values:
required_value = 2020 - value
if required_value in values:
print(value * required_value)
break
if __name__ == "__main__":... | 20.75 | 83 | 0.599398 |
e8bb02426f3a563e1721c5c70de7ae8c6056bdb2 | 20,675 | py | Python | autotest/test_gwt_dsp02.py | scharlton2/modflow6 | 83ac72ee3b6f580aaffef6352cf15c1697d3ce66 | [
"CC0-1.0"
] | 3 | 2019-07-10T21:16:57.000Z | 2021-10-08T00:56:20.000Z | autotest/test_gwt_dsp02.py | scharlton2/modflow6 | 83ac72ee3b6f580aaffef6352cf15c1697d3ce66 | [
"CC0-1.0"
] | null | null | null | autotest/test_gwt_dsp02.py | scharlton2/modflow6 | 83ac72ee3b6f580aaffef6352cf15c1697d3ce66 | [
"CC0-1.0"
] | 3 | 2019-11-28T16:26:50.000Z | 2020-02-05T11:08:37.000Z | """
MODFLOW 6 Autotest
Test the dispersion schemes in the gwt dispersion package for a one-dimensional
model grid of triangular cells. The cells are created by starting with a
regular grid of squares and then cutting every cell into a triangle, except
the first and last.
"""
import os
import pytest
import sys
import... | 26.781088 | 79 | 0.438114 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.