hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
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
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
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
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
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
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
1c22edaff3d9d8e239f601f9f1ee0d535161da6f
21,227
py
Python
virtual/lib/python3.8/site-packages/django/http/response.py
ShirQUillE-SandE/the-neighborhood-101
fda09cb0481d1cd902f5e13b7ed61ed96772121d
[ "MIT" ]
7
2021-07-10T14:32:29.000Z
2021-07-10T16:14:09.000Z
virtual/lib/python3.8/site-packages/django/http/response.py
ShirQUillE-SandE/the-neighborhood-101
fda09cb0481d1cd902f5e13b7ed61ed96772121d
[ "MIT" ]
21
2021-02-04T01:37:44.000Z
2022-03-12T01:00:55.000Z
virtual/lib/python3.8/site-packages/django/http/response.py
ShirQUillE-SandE/the-neighborhood-101
fda09cb0481d1cd902f5e13b7ed61ed96772121d
[ "MIT" ]
27
2021-11-10T08:44:10.000Z
2022-03-30T08:19:46.000Z
import datetime import json import mimetypes import os import re import sys import time from collections.abc import Mapping from email.header import Header from http.client import responses from urllib.parse import quote, urlparse from django.conf import settings from django.core import signals, signing from django.co...
35.08595
97
0.624488
import datetime import json import mimetypes import os import re import sys import time from collections.abc import Mapping from email.header import Header from http.client import responses from urllib.parse import quote, urlparse from django.conf import settings from django.core import signals, signing from django.co...
true
true
1c22ee6a60493fbb55be1998426f66da9b90045e
10,651
py
Python
bnpy/allocmodel/relational/FiniteMMSB.py
zhaottcrystal/bnpy
0195a0228e9e698799e52a6dfa1d051e82b43fd0
[ "BSD-3-Clause" ]
1
2019-05-14T19:56:53.000Z
2019-05-14T19:56:53.000Z
bnpy/allocmodel/relational/FiniteMMSB.py
zhaottcrystal/bnpy
0195a0228e9e698799e52a6dfa1d051e82b43fd0
[ "BSD-3-Clause" ]
null
null
null
bnpy/allocmodel/relational/FiniteMMSB.py
zhaottcrystal/bnpy
0195a0228e9e698799e52a6dfa1d051e82b43fd0
[ "BSD-3-Clause" ]
1
2020-09-01T13:21:18.000Z
2020-09-01T13:21:18.000Z
''' FiniteMMSB.py ''' import numpy as np from scipy.sparse import csc_matrix from allocmodel import AllocModel from suffstats import SuffStatBag from util import gammaln, digamma, EPS from util.NumericUtil import calcRlogR from allocmodel.topics.HDPTopicUtil import c_Dir class FiniteMMSB(AllocModel): """ Mixed...
32.081325
78
0.560511
import numpy as np from scipy.sparse import csc_matrix from allocmodel import AllocModel from suffstats import SuffStatBag from util import gammaln, digamma, EPS from util.NumericUtil import calcRlogR from allocmodel.topics.HDPTopicUtil import c_Dir class FiniteMMSB(AllocModel): def __init__(self, inferType, ...
true
true
1c22ee9f241c0d84b18339d268494743d4ca5bc2
4,879
py
Python
pyghmi/ipmi/private/localsession.py
Maria618-hash/pyghmi
aa009ebfd3768c07af70941edc3df42a499d3c96
[ "Apache-2.0" ]
3
2017-01-24T03:24:39.000Z
2021-06-28T09:30:21.000Z
pyghmi/ipmi/private/localsession.py
Maria618-hash/pyghmi
aa009ebfd3768c07af70941edc3df42a499d3c96
[ "Apache-2.0" ]
null
null
null
pyghmi/ipmi/private/localsession.py
Maria618-hash/pyghmi
aa009ebfd3768c07af70941edc3df42a499d3c96
[ "Apache-2.0" ]
1
2020-11-09T08:36:29.000Z
2020-11-09T08:36:29.000Z
# Copyright 2017 Lenovo # # 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, softw...
33.190476
79
0.598688
import ctypes import fcntl from select import select import time import pyghmi.ipmi.private.util as iutil class IpmiMsg(ctypes.Structure): _fields_ = [('netfn', ctypes.c_ubyte), ('cmd', ctypes.c_ubyte), ('data_len', ctypes.c_short), ('data', ctypes.PO...
true
true
1c22ef530c680be01bd5d420a87ffd662879552c
5,612
py
Python
tf-parliament.py
sftim/tf-parliament
63b46aac90e9edaaed9957ef32dd692edc79bce9
[ "MIT" ]
74
2020-01-08T13:02:20.000Z
2022-03-11T22:09:36.000Z
tf-parliament.py
sftim/tf-parliament
63b46aac90e9edaaed9957ef32dd692edc79bce9
[ "MIT" ]
9
2020-01-08T23:52:12.000Z
2021-05-13T16:37:52.000Z
tf-parliament.py
sftim/tf-parliament
63b46aac90e9edaaed9957ef32dd692edc79bce9
[ "MIT" ]
7
2020-02-13T02:41:50.000Z
2022-01-30T09:56:16.000Z
#!/usr/bin/env python import argparse import glob import hcl2 import lark import os import re import json import parliament import sys statement_template = """{{ "Effect": "{effect}", "Action": {actions} {resources_block} }}""" policy_template = """{{ "Version": "2012-10-17", "Id": "123", "Sta...
35.295597
125
0.616001
import argparse import glob import hcl2 import lark import os import re import json import parliament import sys statement_template = """{{ "Effect": "{effect}", "Action": {actions} {resources_block} }}""" policy_template = """{{ "Version": "2012-10-17", "Id": "123", "Statement": {iam_stateme...
true
true
1c22efadf8e4777c8792def27e169711e1335563
3,331
py
Python
PRAI/PRAI/settings.py
vishwabasak41/praicopy2
45fca251608d1621e75bfcc963bf5ff29d695336
[ "MIT" ]
null
null
null
PRAI/PRAI/settings.py
vishwabasak41/praicopy2
45fca251608d1621e75bfcc963bf5ff29d695336
[ "MIT" ]
null
null
null
PRAI/PRAI/settings.py
vishwabasak41/praicopy2
45fca251608d1621e75bfcc963bf5ff29d695336
[ "MIT" ]
null
null
null
""" Django settings for PRAI project. Generated by 'django-admin startproject' using Django 1.11.2. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ import os #...
25.045113
91
0.686881
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = '%ke*-ydnqen2ctg&(mt!r9g709q-@0rhrs39uu!!(@p%-^wqa)' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.content...
true
true
1c22f0403445adde7e331956785478a61c9a112e
3,889
py
Python
ctx/config.py
PeakerBee/aioms
51c7cd16394132a2999a4f1896d7ab8dc4d2f5b7
[ "Apache-2.0" ]
1
2021-08-06T03:57:09.000Z
2021-08-06T03:57:09.000Z
ctx/config.py
PeakerBee/aioms
51c7cd16394132a2999a4f1896d7ab8dc4d2f5b7
[ "Apache-2.0" ]
10
2021-08-20T10:17:02.000Z
2021-08-20T10:27:53.000Z
ctx/config.py
PeakerBee/aioms
51c7cd16394132a2999a4f1896d7ab8dc4d2f5b7
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 """ GateWay Web Server Config """ import sys from typing import Dict from env.definition import ENV_DEV, ENV_TEST, ENV_PROD, ENV_BETA from exception.definition import CommonException from exception.error_code import CommonErrorCode CURRENT_ENV = ENV_TEST ENV_YAML_DIC = {ENV_DEV: 'app-dev.yaml', ...
29.462121
102
0.643867
import sys from typing import Dict from env.definition import ENV_DEV, ENV_TEST, ENV_PROD, ENV_BETA from exception.definition import CommonException from exception.error_code import CommonErrorCode CURRENT_ENV = ENV_TEST ENV_YAML_DIC = {ENV_DEV: 'app-dev.yaml', ENV_TEST: 'app-test.yaml', ...
true
true
1c22f1e326c52c9216802df7775bdd8a8a23ae9b
433
py
Python
1-mouth01/day06/exe05.py
gary-gggggg/gary
d8ba30ea4bc2b662a2d6a87d247f813e5680d63e
[ "Apache-2.0" ]
4
2021-02-01T10:28:11.000Z
2021-02-01T10:34:40.000Z
1-mouth01/day06/exe05.py
gary-gggggg/gary
d8ba30ea4bc2b662a2d6a87d247f813e5680d63e
[ "Apache-2.0" ]
null
null
null
1-mouth01/day06/exe05.py
gary-gggggg/gary
d8ba30ea4bc2b662a2d6a87d247f813e5680d63e
[ "Apache-2.0" ]
null
null
null
"""删除香港现有人数信息 删除新疆新增人数信息 删除上海的新增和现有""" hkinfo={"region":"hk","new":15,"now have":39,"total":4801,\ "cured":4320,"死亡":88} shinfo={"region":"hk","new":6,"now have":61,"total":903,\ "cured":835,"死亡":7} xjinfo={"region":"hk","new":0,"now have":49,"total":902,\ "cured":850,"死亡":3} del hki...
27.0625
59
0.595843
hkinfo={"region":"hk","new":15,"now have":39,"total":4801,\ "cured":4320,"死亡":88} shinfo={"region":"hk","new":6,"now have":61,"total":903,\ "cured":835,"死亡":7} xjinfo={"region":"hk","new":0,"now have":49,"total":902,\ "cured":850,"死亡":3} del hkinfo["now have"] del xjinfo["new"] del s...
true
true
1c22f2e112538357a11ab920f6b83afe748737ed
1,402
py
Python
src/user/serializers.py
vishaltanwar96/iTrack
1d57e2d57a61a309632673b7bde8fc559eea09c0
[ "MIT" ]
3
2020-11-20T15:44:14.000Z
2020-11-21T12:18:15.000Z
src/user/serializers.py
vishaltanwar96/iTrack
1d57e2d57a61a309632673b7bde8fc559eea09c0
[ "MIT" ]
null
null
null
src/user/serializers.py
vishaltanwar96/iTrack
1d57e2d57a61a309632673b7bde8fc559eea09c0
[ "MIT" ]
null
null
null
from django.core import exceptions from django.contrib.auth import password_validation from rest_framework import serializers from .models import User class PasswordResetChangeSerializer(serializers.Serializer): """.""" password = serializers.CharField(write_only=True) confirm_password = serializers.Cha...
25.962963
81
0.631954
from django.core import exceptions from django.contrib.auth import password_validation from rest_framework import serializers from .models import User class PasswordResetChangeSerializer(serializers.Serializer): password = serializers.CharField(write_only=True) confirm_password = serializers.CharField(write...
true
true
1c22f30c1f1c3d42bd0ef8a532a5cf0e9ef36d93
31,771
py
Python
qcfractal/tests/test_storage.py
yudongqiu/QCFractal
43b5b4807dfe19f78177288f204aab1066de2dea
[ "BSD-3-Clause" ]
null
null
null
qcfractal/tests/test_storage.py
yudongqiu/QCFractal
43b5b4807dfe19f78177288f204aab1066de2dea
[ "BSD-3-Clause" ]
null
null
null
qcfractal/tests/test_storage.py
yudongqiu/QCFractal
43b5b4807dfe19f78177288f204aab1066de2dea
[ "BSD-3-Clause" ]
null
null
null
""" Tests the database wrappers All tests should be atomic, that is create and cleanup their data """ from datetime import datetime from time import time import pytest import qcfractal.interface as ptl from qcfractal.interface.models.task_models import TaskStatusEnum from qcfractal.services.services import TorsionD...
30.229305
114
0.619968
from datetime import datetime from time import time import pytest import qcfractal.interface as ptl from qcfractal.interface.models.task_models import TaskStatusEnum from qcfractal.services.services import TorsionDriveService from qcfractal.testing import sqlalchemy_socket_fixture as storage_socket bad_id1 = "00000...
true
true
1c22f3427fd2bf211a9dbb0b8afd265e8ff30af8
625
py
Python
day_3/solution_part1.py
mvukic/advent-of-code
fd601026e3e3621b0b536f214ea56ae251353790
[ "Xnet", "X11" ]
null
null
null
day_3/solution_part1.py
mvukic/advent-of-code
fd601026e3e3621b0b536f214ea56ae251353790
[ "Xnet", "X11" ]
null
null
null
day_3/solution_part1.py
mvukic/advent-of-code
fd601026e3e3621b0b536f214ea56ae251353790
[ "Xnet", "X11" ]
null
null
null
visited_houses={} with open("input.txt") as input: directions=input.readlines()[0].rstrip() loc=(0,0) #EAST or WEST and NORTH or SOUTH visited_houses[loc]=1 for direction in directions: if direction=="<": loc=(loc[0]-1,loc[1]) elif direction==">": loc=(loc[0]+1,l...
29.761905
68
0.5456
visited_houses={} with open("input.txt") as input: directions=input.readlines()[0].rstrip() loc=(0,0) visited_houses[loc]=1 for direction in directions: if direction=="<": loc=(loc[0]-1,loc[1]) elif direction==">": loc=(loc[0]+1,loc[1]) elif direction=="...
true
true
1c22f34ae09b9958b96687f13b3189d2f4fc4697
3,019
bzl
Python
tools/build_rules/config/system.bzl
yuikns/argcv
f98a284accddebc5620f4ac36b548461e69aeeec
[ "MIT" ]
17
2015-12-23T03:46:12.000Z
2019-07-02T23:32:58.000Z
tools/build_rules/config/system.bzl
argcv/argcv
f98a284accddebc5620f4ac36b548461e69aeeec
[ "MIT" ]
2
2018-09-21T18:28:58.000Z
2019-03-05T20:27:48.000Z
tools/build_rules/config/system.bzl
argcv/argcv
f98a284accddebc5620f4ac36b548461e69aeeec
[ "MIT" ]
10
2015-05-14T10:04:14.000Z
2020-03-01T01:57:39.000Z
"""C System Library dependencies. This package exports a repository rule and macro. cc_system_package_configure: This repository_rule combines behavior of both local_cc_library_configure and pkg_config_package rules. It first attempts to find the specified environment variable. If present, it tries to use a l...
32.815217
88
0.664127
load(":wrapped_ctx.bzl", "wrapctx") load(":local.bzl", "setup_local_cc_library") load(":pkg_config.bzl", "setup_pkg_config_package") def try_local_library(repo_ctx): if repo_ctx.attr.envvar and repo_ctx.attr.envvar in repo_ctx.os.environ: error = setup_local_cc_library(repo_ctx).error if not error...
true
true
1c22f37af84155cec7dbc1743a57bb19b301ab1a
5,555
py
Python
torch/legacy/nn/Normalize.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
torch/legacy/nn/Normalize.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
torch/legacy/nn/Normalize.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
1
2020-07-24T17:53:25.000Z
2020-07-24T17:53:25.000Z
import torch from .Module import Module from .utils import clear class Normalize(Module): def __init__(self, p, eps=1e-10): super(Normalize, self).__init__() assert p > 0 self.p = p self.eps = eps self._output = None self.norm = None self.buffer = None ...
35.83871
117
0.562196
import torch from .Module import Module from .utils import clear class Normalize(Module): def __init__(self, p, eps=1e-10): super(Normalize, self).__init__() assert p > 0 self.p = p self.eps = eps self._output = None self.norm = None self.buffer = None ...
true
true
1c22f4d064957cf06f768e77427107f16ec4b6fb
31,316
py
Python
metadata-ingestion/src/datahub/ingestion/source/sql/sql_common.py
open-botech/datahub
110efa68b9629dd929e4754b8dcbe21c69728275
[ "Apache-2.0" ]
2
2021-09-10T06:11:53.000Z
2021-12-13T05:45:51.000Z
metadata-ingestion/src/datahub/ingestion/source/sql/sql_common.py
open-botech/datahub
110efa68b9629dd929e4754b8dcbe21c69728275
[ "Apache-2.0" ]
1
2021-12-19T16:16:48.000Z
2021-12-19T16:16:48.000Z
metadata-ingestion/src/datahub/ingestion/source/sql/sql_common.py
open-botech/datahub
110efa68b9629dd929e4754b8dcbe21c69728275
[ "Apache-2.0" ]
2
2021-12-06T04:17:26.000Z
2021-12-06T06:08:13.000Z
import logging from abc import abstractmethod from dataclasses import dataclass, field from typing import ( TYPE_CHECKING, Any, Dict, Iterable, List, Optional, Set, Tuple, Type, Union, cast, ) from urllib.parse import quote_plus import pydantic from sqlalchemy import create_...
36.669789
124
0.62789
import logging from abc import abstractmethod from dataclasses import dataclass, field from typing import ( TYPE_CHECKING, Any, Dict, Iterable, List, Optional, Set, Tuple, Type, Union, cast, ) from urllib.parse import quote_plus import pydantic from sqlalchemy import create_...
true
true
1c22f5901e5dea4e50048f390d98d27c95650421
509
py
Python
tests/grammars/SuperGenerator.py
38b394ce01/grammarinator
601ce9260450ab2234438c041905e1e904eeeba5
[ "BSD-3-Clause" ]
228
2017-05-15T14:31:10.000Z
2022-03-30T13:03:51.000Z
tests/grammars/SuperGenerator.py
38b394ce01/grammarinator
601ce9260450ab2234438c041905e1e904eeeba5
[ "BSD-3-Clause" ]
45
2017-06-24T14:13:18.000Z
2022-03-29T14:07:26.000Z
tests/grammars/SuperGenerator.py
38b394ce01/grammarinator
601ce9260450ab2234438c041905e1e904eeeba5
[ "BSD-3-Clause" ]
57
2017-05-15T14:36:18.000Z
2022-03-24T22:36:16.000Z
# Copyright (c) 2019-2020 Renata Hodovan, Akos Kiss. # # Licensed under the BSD 3-Clause License # <LICENSE.rst or https://opensource.org/licenses/BSD-3-Clause>. # This file may not be copied, modified, or distributed except # according to those terms. # This custom superclass is used by SuperClass.g4 and SuperClassOp...
29.941176
73
0.75442
from grammarinator.runtime import * class SuperGenerator(Generator): def inheritedRule(self, parent=None): return UnlexerRule(src='I was inherited.', parent=parent)
true
true
1c22f76153c031c55fd620d087c5855d49f54dc9
646
py
Python
pages/application.py
Memirex/qacoursemoddle_tests
7c1454f1bf1622419eb89c64d36b25d2a35baf92
[ "Apache-2.0" ]
null
null
null
pages/application.py
Memirex/qacoursemoddle_tests
7c1454f1bf1622419eb89c64d36b25d2a35baf92
[ "Apache-2.0" ]
null
null
null
pages/application.py
Memirex/qacoursemoddle_tests
7c1454f1bf1622419eb89c64d36b25d2a35baf92
[ "Apache-2.0" ]
null
null
null
from pages.administration_page import AdminPage from pages.course_page import CreateCoursePage from pages.login_page import LoginPage from pages.profile_page import ProfilePage class Application: def __init__(self, driver, url): self.driver = driver self.url = url self.login = LoginPage(se...
26.916667
54
0.685759
from pages.administration_page import AdminPage from pages.course_page import CreateCoursePage from pages.login_page import LoginPage from pages.profile_page import ProfilePage class Application: def __init__(self, driver, url): self.driver = driver self.url = url self.login = LoginPage(se...
true
true
1c22f82cf927d32dc560c2d1ef1f23bc66dc6be3
122
py
Python
docs/conf.py
lu-w/criticality-metrics
5fa8a0d558fd487a40a988bf89a936a08d6b61cf
[ "MIT" ]
9
2021-05-28T07:22:56.000Z
2022-03-15T13:12:48.000Z
docs/conf.py
lu-w/criticality-metrics
5fa8a0d558fd487a40a988bf89a936a08d6b61cf
[ "MIT" ]
1
2021-07-13T14:58:40.000Z
2021-07-21T06:21:31.000Z
docs/conf.py
lu-w/criticality-metrics
5fa8a0d558fd487a40a988bf89a936a08d6b61cf
[ "MIT" ]
2
2021-05-25T09:58:46.000Z
2021-11-26T09:13:48.000Z
project = "Criticality Metrics" author = "Lukas Westhofen et al." html_theme = "furo" html_title = "Criticality Metrics"
20.333333
34
0.745902
project = "Criticality Metrics" author = "Lukas Westhofen et al." html_theme = "furo" html_title = "Criticality Metrics"
true
true
1c22f834052f4c2b8886af96f7d4676d5c5f245b
3,025
py
Python
pytype/tests/test_operators2.py
ShaneHarvey/pytype
a4d56ef763eb4a29b5db03a2013c3373f9f46146
[ "Apache-2.0" ]
null
null
null
pytype/tests/test_operators2.py
ShaneHarvey/pytype
a4d56ef763eb4a29b5db03a2013c3373f9f46146
[ "Apache-2.0" ]
null
null
null
pytype/tests/test_operators2.py
ShaneHarvey/pytype
a4d56ef763eb4a29b5db03a2013c3373f9f46146
[ "Apache-2.0" ]
null
null
null
"""Test operators, using __any_object__.""" from pytype.tests import test_base class OperatorsWithAnyTests(test_base.TargetIndependentTest): """Operator tests.""" @test_base.skip("Needs __radd__ on all builtins") def test_add1(self): """Test that __add__, __radd__ are working.""" ty = self.Infer(""" ...
26.535088
105
0.590744
from pytype.tests import test_base class OperatorsWithAnyTests(test_base.TargetIndependentTest): @test_base.skip("Needs __radd__ on all builtins") def test_add1(self): ty = self.Infer(""" def t_testAdd1(x): return x + 2.0 """) self.assertTypesMatchPytd(ty, """ def t_testAdd1(x: i...
true
true
1c22f9748390345b4c73e11b8b36f5cafc6c532d
2,780
py
Python
pipe_code/scripts/clipping_profile.py
ShaopengLiu1/RNA_seq_analysis_pipe
8a193be3b2046b25a23d6d4123b7fbf424adc97d
[ "MIT" ]
3
2019-08-30T17:24:58.000Z
2021-03-21T13:33:30.000Z
pipe_code/scripts/clipping_profile.py
ShaopengLiu1/RNA_seq_analysis_pipe
8a193be3b2046b25a23d6d4123b7fbf424adc97d
[ "MIT" ]
1
2018-03-01T01:07:30.000Z
2018-03-01T01:07:30.000Z
pipe_code/scripts/clipping_profile.py
ShaopengLiu1/RNA_seq_analysis_pipe
8a193be3b2046b25a23d6d4123b7fbf424adc97d
[ "MIT" ]
9
2018-08-16T01:14:58.000Z
2021-08-16T17:46:27.000Z
#!/usr/bin/env python ''' This program is used estimate clipping profile of RNA-seq reads from BAM or SAM file Note that to use this funciton, CIGAR strings within SAM/BAM file should have 'S' operation (This means your reads mapper should support clipped mapping). ''' #import built-in modules import os,sys if sys.ve...
34.75
207
0.72554
import os,sys if sys.version_info[0] != 2 or sys.version_info[1] != 7: print >>sys.stderr, "\nYou are using python" + str(sys.version_info[0]) + '.' + str(sys.version_info[1]) + " RSeQC needs python2.7!\n" sys.exit() import re import string from optparse import OptionParser import warnings import string import co...
true
true
1c22fafb03ffd71cacc86280a4b04ff388a8756d
23,970
py
Python
train.py
1asso/TOM-Net
ba13bd3f1bac0fa50c6043290691d7be5c29f777
[ "MIT" ]
1
2020-06-25T22:45:46.000Z
2020-06-25T22:45:46.000Z
train.py
1asso/TOM-Net
ba13bd3f1bac0fa50c6043290691d7be5c29f777
[ "MIT" ]
null
null
null
train.py
1asso/TOM-Net
ba13bd3f1bac0fa50c6043290691d7be5c29f777
[ "MIT" ]
null
null
null
import torch import utility import logging import os import torch.nn as nn from torch import Tensor from typing import Type, Any, Callable, Union, List, Optional from torch.utils.data import DataLoader from models import CoarseNet, RefineNet from argparse import Namespace from checkpoint import CheckPoint import torch....
43.581818
132
0.543888
import torch import utility import logging import os import torch.nn as nn from torch import Tensor from typing import Type, Any, Callable, Union, List, Optional from torch.utils.data import DataLoader from models import CoarseNet, RefineNet from argparse import Namespace from checkpoint import CheckPoint import torch....
true
true
1c22fb241a88ad7eeea05e429f1569148a56e546
4,289
py
Python
Python/DCMotors.py
AshWReaper/AlphaBot2-PiZero
5ec730678287847bb02b56de3f536a7be6120c16
[ "Unlicense" ]
1
2020-05-02T00:53:44.000Z
2020-05-02T00:53:44.000Z
Python/DCMotors.py
AshWReaper/AlphaBot2-PiZero
5ec730678287847bb02b56de3f536a7be6120c16
[ "Unlicense" ]
null
null
null
Python/DCMotors.py
AshWReaper/AlphaBot2-PiZero
5ec730678287847bb02b56de3f536a7be6120c16
[ "Unlicense" ]
null
null
null
# # CREDIT: This code was taken from the Waveshare AlphaBot2 example code (AlphaBot2.py) # URL: ?? # import RPi.GPIO as GPIO # import the Raspberry Pi GPIO library import time # import time library class DCMotors(object): def __init__(self,ain1=12,ain2=13,ena=6,bin1=20,bin2=21,enb=26): self.AIN1 = ain...
27.49359
87
0.59128
import RPi.GPIO as GPIO import time class DCMotors(object): def __init__(self,ain1=12,ain2=13,ena=6,bin1=20,bin2=21,enb=26): self.AIN1 = ain1 self.AIN2 = ain2 self.BIN1 = bin1 self.BIN2 = bin2 self.ENA = ena self.ENB = enb self.PA = 50 self.PB = 50 GPIO.setmode(GPIO.BCM) ...
false
true
1c22fb3a94aba97008abceada2766e655e3049cf
9,157
py
Python
docs/conf.py
laguro-developers/tfx-utils
af85352ea0046ba60b429b37680da6878e7ee0e5
[ "MIT" ]
1
2021-01-09T16:38:44.000Z
2021-01-09T16:38:44.000Z
docs/conf.py
laguro-developers/tfx-utils
af85352ea0046ba60b429b37680da6878e7ee0e5
[ "MIT" ]
null
null
null
docs/conf.py
laguro-developers/tfx-utils
af85352ea0046ba60b429b37680da6878e7ee0e5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. import os impo...
33.542125
85
0.702959
import os import sys import inspect import shutil __location__ = os.path.join(os.getcwd(), os.path.dirname( inspect.getfile(inspect.currentframe()))) sys.path.insert(0, os.path.join(__location__, '../src')) # setup.py install" in the RTD Advanced Settings. # Additionally it helps us to avoid ru...
true
true
1c22fb5c03ec90f70770bdb61587f6312e1b702f
8,249
py
Python
data.py
l11x0m7/insuranceQA_zh
0ccad4416be5683145de944db309922c78bfa209
[ "Apache-2.0" ]
68
2017-08-22T13:04:06.000Z
2022-01-27T11:10:01.000Z
data.py
l11x0m7/insuranceQA_zh
0ccad4416be5683145de944db309922c78bfa209
[ "Apache-2.0" ]
4
2017-09-25T13:53:13.000Z
2019-03-15T11:53:19.000Z
data.py
l11x0m7/insuranceQA_zh
0ccad4416be5683145de944db309922c78bfa209
[ "Apache-2.0" ]
29
2017-08-26T13:23:48.000Z
2022-03-28T04:56:27.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- #=============================================================================== # # Copyright (c) 2017 Hai Liang Wang<hailiang.hl.wang@gmail.com> All Rights Reserved # # # File: /Users/hain/ai/InsuranceQA-Machine-Learning/deep_qa_1/network.py # Author: Hai Liang Wang # Dat...
31.726923
147
0.597285
from __future__ import print_function from __future__ import division __copyright__ = "Copyright (c) 2017 Hai Liang Wang. All Rights Reserved" __author__ = "Hai Liang Wang" __modify__ = "Xuming Lin" __date__ = "2017-08-08:18:32:05" import os import sys curdir = os.path.dirname(os.path.abspath...
true
true
1c22fb634f485433d61d37581d4c6af4826cec22
714
py
Python
getSong.py
kyoushi/dj_jack
47704d2c590adc22e7f8d030dfcb7831c96fc399
[ "BSD-3-Clause" ]
null
null
null
getSong.py
kyoushi/dj_jack
47704d2c590adc22e7f8d030dfcb7831c96fc399
[ "BSD-3-Clause" ]
null
null
null
getSong.py
kyoushi/dj_jack
47704d2c590adc22e7f8d030dfcb7831c96fc399
[ "BSD-3-Clause" ]
null
null
null
from gmusicapi import Mobileclient def ask_for_song(song): api = Mobileclient() # mm.perform_oauth('C:\\Users\\mitsu\\Documents\\Python\\projects\\gmusicapi-develop\\oauth.cred') api.oauth_login(Mobileclient.FROM_MAC_ADDRESS, 'oauth.cred') api.login songs = api.searc...
25.5
103
0.620448
from gmusicapi import Mobileclient def ask_for_song(song): api = Mobileclient() api.oauth_login(Mobileclient.FROM_MAC_ADDRESS, 'oauth.cred') api.login songs = api.search(song, 2) title = songs['song_hits'][0]['track']['title'] artist = songs['song_...
true
true
1c22fb73898ff6208c6cf06ae1b636e3ec5e0dfd
448
py
Python
Examples/analysis_default_regression.py
oshapoval/WarpX
84d687da21ee93db67fdc43efec8a9cc80d0e6f9
[ "BSD-3-Clause-LBNL" ]
null
null
null
Examples/analysis_default_regression.py
oshapoval/WarpX
84d687da21ee93db67fdc43efec8a9cc80d0e6f9
[ "BSD-3-Clause-LBNL" ]
null
null
null
Examples/analysis_default_regression.py
oshapoval/WarpX
84d687da21ee93db67fdc43efec8a9cc80d0e6f9
[ "BSD-3-Clause-LBNL" ]
null
null
null
#! /usr/bin/env python import os import sys import re sys.path.insert(1, '../../../../warpx/Regression/Checksum/') import checksumAPI # this will be the name of the plot file fn = sys.argv[1] # Get name of the test test_name = os.path.split(os.getcwd())[1] # Run checksum regression test if re.search( 'single_precis...
22.4
60
0.716518
import os import sys import re sys.path.insert(1, '../../../../warpx/Regression/Checksum/') import checksumAPI fn = sys.argv[1] test_name = os.path.split(os.getcwd())[1] if re.search( 'single_precision', fn ): checksumAPI.evaluate_checksum(test_name, fn, rtol=2.e-6) else: checksumAPI.evaluate_checksum(t...
true
true
1c22fb8e6b7882a97f0d08c0dc1552022758f3a3
3,644
py
Python
vsgia_model/models/gazenet.py
nkuhzx/VSG-IA
075b58c2bf89562cc197e721f050396589861c6a
[ "Apache-2.0" ]
null
null
null
vsgia_model/models/gazenet.py
nkuhzx/VSG-IA
075b58c2bf89562cc197e721f050396589861c6a
[ "Apache-2.0" ]
null
null
null
vsgia_model/models/gazenet.py
nkuhzx/VSG-IA
075b58c2bf89562cc197e721f050396589861c6a
[ "Apache-2.0" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np from vsgia_model.models.scenepathway import SceneNet from vsgia_model.models.headpathway import HeadNet from vsgia_model.models.vsgat import GraphDealModule from vsgia_model.models.decoder import HeatmapDecoder,InoutDecoder from vs...
33.127273
128
0.692371
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np from vsgia_model.models.scenepathway import SceneNet from vsgia_model.models.headpathway import HeadNet from vsgia_model.models.vsgat import GraphDealModule from vsgia_model.models.decoder import HeatmapDecoder,InoutDecoder from vs...
true
true
1c22fcb29edd5126442449d06d37cf9d115a6f6e
4,221
py
Python
tad/timelord/timelord_api.py
Tad-Network/tad-blockchain
2e80d4197b05f167de67e80241176ffc6ac4ca69
[ "Apache-2.0" ]
13
2021-07-20T15:21:54.000Z
2022-02-09T04:32:56.000Z
tad/timelord/timelord_api.py
Tad-Network/tad-blockchain
2e80d4197b05f167de67e80241176ffc6ac4ca69
[ "Apache-2.0" ]
8
2021-07-21T17:22:59.000Z
2021-09-18T23:01:59.000Z
tad/timelord/timelord_api.py
Tad-Network/tad-blockchain
2e80d4197b05f167de67e80241176ffc6ac4ca69
[ "Apache-2.0" ]
1
2021-07-20T18:14:02.000Z
2021-07-20T18:14:02.000Z
import logging import time from typing import Callable, Optional from tad.protocols import timelord_protocol from tad.timelord.timelord import Chain, IterationType, Timelord, iters_from_block from tad.util.api_decorators import api_request from tad.util.ints import uint64 log = logging.getLogger(__name__) class Tim...
47.426966
119
0.643213
import logging import time from typing import Callable, Optional from tad.protocols import timelord_protocol from tad.timelord.timelord import Chain, IterationType, Timelord, iters_from_block from tad.util.api_decorators import api_request from tad.util.ints import uint64 log = logging.getLogger(__name__) class Tim...
true
true
1c22fda4f729546697f75f7fb5526a7f318c01ae
830
py
Python
cars/models.py
tomasz-rzesikowski/cars_API
2f057e5947b60c0e37c48f9d3ed1988dbf3e3933
[ "Beerware" ]
null
null
null
cars/models.py
tomasz-rzesikowski/cars_API
2f057e5947b60c0e37c48f9d3ed1988dbf3e3933
[ "Beerware" ]
null
null
null
cars/models.py
tomasz-rzesikowski/cars_API
2f057e5947b60c0e37c48f9d3ed1988dbf3e3933
[ "Beerware" ]
null
null
null
from django.core.validators import MinValueValidator, MaxValueValidator from django.db import models class Manufacturer(models.Model): make = models.CharField(max_length=150, null=False, default=None) def __str__(self): return self.make class Car(models.Model): manufacturer = models.ForeignKey(...
31.923077
101
0.73012
from django.core.validators import MinValueValidator, MaxValueValidator from django.db import models class Manufacturer(models.Model): make = models.CharField(max_length=150, null=False, default=None) def __str__(self): return self.make class Car(models.Model): manufacturer = models.ForeignKey(...
true
true
1c22fda866489af1762cd7d3db67c3423a98168f
731
py
Python
setup.py
suhlig/grafana-backup-tool
3e1e280756efedd2530d5240dc2ec6d3f37d65c9
[ "MIT" ]
null
null
null
setup.py
suhlig/grafana-backup-tool
3e1e280756efedd2530d5240dc2ec6d3f37d65c9
[ "MIT" ]
null
null
null
setup.py
suhlig/grafana-backup-tool
3e1e280756efedd2530d5240dc2ec6d3f37d65c9
[ "MIT" ]
null
null
null
from grafana_backup.constants import (PKG_NAME, PKG_VERSION) from setuptools import setup, find_packages # Global variables name = PKG_NAME version = PKG_VERSION requires = [ 'requests', 'docopt' ] setup( name=name, version=version, description='A Python-based application to backup Grafana setting...
25.206897
95
0.671683
from grafana_backup.constants import (PKG_NAME, PKG_VERSION) from setuptools import setup, find_packages name = PKG_NAME version = PKG_VERSION requires = [ 'requests', 'docopt' ] setup( name=name, version=version, description='A Python-based application to backup Grafana settings using the Grafan...
true
true
1c22ffa93f1d5090257ee3c464697bb082c37dd8
403,717
py
Python
torch/testing/_internal/common_methods_invocations.py
masguit42/pytorch
d1cbee7b2b1da94ff1a0fa880bd0173de27fb89f
[ "Intel" ]
null
null
null
torch/testing/_internal/common_methods_invocations.py
masguit42/pytorch
d1cbee7b2b1da94ff1a0fa880bd0173de27fb89f
[ "Intel" ]
null
null
null
torch/testing/_internal/common_methods_invocations.py
masguit42/pytorch
d1cbee7b2b1da94ff1a0fa880bd0173de27fb89f
[ "Intel" ]
null
null
null
from functools import wraps, partial from itertools import product, chain import itertools import collections import copy import operator import random import numbers import torch import numpy as np from torch._six import inf import collections.abc from typing import List, Sequence, Tuple, Union from torch.testing i...
46.149634
131
0.598377
from functools import wraps, partial from itertools import product, chain import itertools import collections import copy import operator import random import numbers import torch import numpy as np from torch._six import inf import collections.abc from typing import List, Sequence, Tuple, Union from torch.testing i...
true
true
1c22ffd509a67b942e530b0539ae7cc5437d7d7c
37,994
py
Python
custom_components/mitemp_bt/sensor.py
viotemp1/sensor.mitemp_bt
20ea6c32b9f06267b0ebcfb0a068d47217d27f59
[ "MIT" ]
1
2021-08-08T14:43:24.000Z
2021-08-08T14:43:24.000Z
custom_components/mitemp_bt/sensor.py
viotemp1/sensor.mitemp_bt
20ea6c32b9f06267b0ebcfb0a068d47217d27f59
[ "MIT" ]
null
null
null
custom_components/mitemp_bt/sensor.py
viotemp1/sensor.mitemp_bt
20ea6c32b9f06267b0ebcfb0a068d47217d27f59
[ "MIT" ]
1
2022-01-01T10:45:42.000Z
2022-01-01T10:45:42.000Z
"""Xiaomi passive BLE monitor integration.""" import asyncio from datetime import timedelta import logging import statistics as sts import struct from threading import Thread from time import sleep import aioblescan as aiobs from Cryptodome.Cipher import AES import voluptuous as vol from homeassistant.const import ( ...
36.603083
94
0.56272
import asyncio from datetime import timedelta import logging import statistics as sts import struct from threading import Thread from time import sleep import aioblescan as aiobs from Cryptodome.Cipher import AES import voluptuous as vol from homeassistant.const import ( DEVICE_CLASS_BATTERY, DEVICE_CLASS_HUM...
true
true
1c22fff5464516388af485003fb6b62554625351
2,088
py
Python
airflow/example_dags/example_bash_operator.py
emilioego/airflow
3457c7847cd24413ff5b622e65c27d8370f94502
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
79
2021-10-15T07:32:27.000Z
2022-03-28T04:10:19.000Z
airflow/example_dags/example_bash_operator.py
emilioego/airflow
3457c7847cd24413ff5b622e65c27d8370f94502
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
153
2021-10-15T05:23:46.000Z
2022-02-23T06:07:10.000Z
airflow/example_dags/example_bash_operator.py
emilioego/airflow
3457c7847cd24413ff5b622e65c27d8370f94502
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
23
2021-10-15T02:36:37.000Z
2022-03-17T02:59:27.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...
27.473684
70
0.719828
from datetime import timedelta from airflow import DAG from airflow.operators.bash import BashOperator from airflow.operators.dummy import DummyOperator from airflow.utils.dates import days_ago args = { 'owner': 'airflow', } dag = DAG( dag_id='example_bash_operator', default_args=args,...
true
true
1c2304d51d66e4099c7fe659cf2be768ce39ee97
2,975
py
Python
scripts/pyqtgraph-develop/pyqtgraph/flowchart/FlowchartCtrlTemplate_pyqt5.py
kuldeepaman/tf-pose
8050912c52a7b4f3c8a2656f267d47ba21d093f6
[ "Apache-2.0" ]
null
null
null
scripts/pyqtgraph-develop/pyqtgraph/flowchart/FlowchartCtrlTemplate_pyqt5.py
kuldeepaman/tf-pose
8050912c52a7b4f3c8a2656f267d47ba21d093f6
[ "Apache-2.0" ]
null
null
null
scripts/pyqtgraph-develop/pyqtgraph/flowchart/FlowchartCtrlTemplate_pyqt5.py
kuldeepaman/tf-pose
8050912c52a7b4f3c8a2656f267d47ba21d093f6
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file './pyqtgraph/flowchart/FlowchartCtrlTemplate.ui' # # Created: Wed Mar 26 15:09:28 2014 # by: PyQt5 UI code generator 5.0.1 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets c...
43.75
102
0.664538
from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Form(object): def setupUi(self, Form): Form.setObjectName("Form") Form.resize(217, 499) self.gridLayout = QtWidgets.QGridLayout(Form) self.gridLayout.setContentsMargins(0, 0, 0, 0) self.gridLayout.setVert...
true
true
1c2306da2c0cdc61eb8aa3188359d07ffc1dfdc6
598
py
Python
decorator_4.py
Kalpavrikshika/python_modules
9f338ab006dd5653fd7f65ff253bc50e0fd61fc6
[ "Apache-2.0" ]
1
2018-07-02T03:37:03.000Z
2018-07-02T03:37:03.000Z
decorator_4.py
Kalpavrikshika/python_modules
9f338ab006dd5653fd7f65ff253bc50e0fd61fc6
[ "Apache-2.0" ]
null
null
null
decorator_4.py
Kalpavrikshika/python_modules
9f338ab006dd5653fd7f65ff253bc50e0fd61fc6
[ "Apache-2.0" ]
null
null
null
from functools import wraps def a_new_decorator(a_func): @wraps(a_func) def wrapTheFunction(): print('I am doing boring work beofre executing a_func()') a_func() print('I am doing some boring work after executing a_func()') return wrapTheFunction @a_new_decorator def a_function_re...
31.473684
82
0.774247
from functools import wraps def a_new_decorator(a_func): @wraps(a_func) def wrapTheFunction(): print('I am doing boring work beofre executing a_func()') a_func() print('I am doing some boring work after executing a_func()') return wrapTheFunction @a_new_decorator def a_function_re...
true
true
1c230791a959c93702e5277226b537668e9d6a50
313
py
Python
project euler/q33.py
milkmeat/thomas
fbc72af34267488d931a4885d4e19fce22fea582
[ "MIT" ]
null
null
null
project euler/q33.py
milkmeat/thomas
fbc72af34267488d931a4885d4e19fce22fea582
[ "MIT" ]
null
null
null
project euler/q33.py
milkmeat/thomas
fbc72af34267488d931a4885d4e19fce22fea582
[ "MIT" ]
null
null
null
def c(m,z): z10=z/10 z1=z%10 m10=m/10 m1=m%10 if m1==0: return False if z1==m10: if float(z)/float(m)==float(z10)/float(m1): return True return False for x in range(10,100): for y in range(10,100): if c(x,y): print x,y
20.866667
52
0.463259
def c(m,z): z10=z/10 z1=z%10 m10=m/10 m1=m%10 if m1==0: return False if z1==m10: if float(z)/float(m)==float(z10)/float(m1): return True return False for x in range(10,100): for y in range(10,100): if c(x,y): print x,y
false
true
1c2307ba71f0d427fee501cac03bee51b6c136f4
1,982
py
Python
tools/template-report.py
slel/oscovida
ad35b5c39f940f98e49d013858f47f405e951be3
[ "BSD-3-Clause" ]
null
null
null
tools/template-report.py
slel/oscovida
ad35b5c39f940f98e49d013858f47f405e951be3
[ "BSD-3-Clause" ]
null
null
null
tools/template-report.py
slel/oscovida
ad35b5c39f940f98e49d013858f47f405e951be3
[ "BSD-3-Clause" ]
null
null
null
# %% """ # {TITLE} * Homepage of project: https://oscovida.github.io * Plots are explained at http://oscovida.github.io/plots.html * [Execute this Jupyter Notebook using myBinder]({BINDER_URL}) """ # %% import datetime import time start = datetime.datetime.now() print(f"Notebook executed on: {{start.strftime('%d/%m/...
25.410256
104
0.715439
""" # {TITLE} * Homepage of project: https://oscovida.github.io * Plots are explained at http://oscovida.github.io/plots.html * [Execute this Jupyter Notebook using myBinder]({BINDER_URL}) """ import datetime import time start = datetime.datetime.now() print(f"Notebook executed on: {{start.strftime('%d/%m/%Y %H:%M...
false
true
1c2308e267dbb6dea9cd6f09fba36282fd3594d3
14,101
py
Python
stories/migrations/0001_initial.py
HAMDANIFatyma/Cases
04d4d83256e52af6c67ba476337d9d62466e9b62
[ "bzip2-1.0.6" ]
null
null
null
stories/migrations/0001_initial.py
HAMDANIFatyma/Cases
04d4d83256e52af6c67ba476337d9d62466e9b62
[ "bzip2-1.0.6" ]
null
null
null
stories/migrations/0001_initial.py
HAMDANIFatyma/Cases
04d4d83256e52af6c67ba476337d9d62466e9b62
[ "bzip2-1.0.6" ]
null
null
null
# Generated by Django 2.2.7 on 2019-12-13 09:31 from django.conf import settings import django.contrib.auth.models import django.contrib.auth.validators from django.db import migrations, models import django.db.models.deletion import django.utils.timezone import djrichtextfield.models class Migration(migrations.Migr...
73.442708
329
0.637614
from django.conf import settings import django.contrib.auth.models import django.contrib.auth.validators from django.db import migrations, models import django.db.models.deletion import django.utils.timezone import djrichtextfield.models class Migration(migrations.Migration): initial = True dependencies =...
true
true
1c2309dcb8ca6be75b7df86da398964b120a39ef
578
py
Python
app/main/errors.py
Jing-Yan/flasky_blog
af113deee6be9857cbb022ffebc3add641bc9651
[ "MIT" ]
null
null
null
app/main/errors.py
Jing-Yan/flasky_blog
af113deee6be9857cbb022ffebc3add641bc9651
[ "MIT" ]
null
null
null
app/main/errors.py
Jing-Yan/flasky_blog
af113deee6be9857cbb022ffebc3add641bc9651
[ "MIT" ]
null
null
null
from flask import render_template, request, jsonify from . import main @main.app_errorhandler(403) def forbidden(e): return render_template('403.html'), 403 @main.app_errorhandler(404) def page_not_found(e): if request.accept_mimetypes.accept_json and \ not request.accept_mimetypes.accept_html: ...
25.130435
53
0.719723
from flask import render_template, request, jsonify from . import main @main.app_errorhandler(403) def forbidden(e): return render_template('403.html'), 403 @main.app_errorhandler(404) def page_not_found(e): if request.accept_mimetypes.accept_json and \ not request.accept_mimetypes.accept_html: ...
true
true
1c230a8fd017e017604ea87540c7cff7533090d8
2,641
py
Python
pettingzoo/utils/env_logger.py
dkkim93/PettingZoo
45e9c8f202b80fbc509232a44a771fa7156b5937
[ "MIT" ]
4
2021-12-17T08:00:28.000Z
2022-02-12T12:25:24.000Z
pettingzoo/utils/env_logger.py
KonstantinKlepikov/PettingZoo
34c4d38e8fbc1cd6ecbebe58176e6d39ba1645de
[ "MIT" ]
null
null
null
pettingzoo/utils/env_logger.py
KonstantinKlepikov/PettingZoo
34c4d38e8fbc1cd6ecbebe58176e6d39ba1645de
[ "MIT" ]
1
2021-01-25T22:57:41.000Z
2021-01-25T22:57:41.000Z
import logging class EnvLogger(): mqueue = [] _output = True @staticmethod def get_logger(): logger = logging.getLogger(__name__) return logger @staticmethod def _generic_warning(msg): logger = EnvLogger.get_logger() if not logger.hasHandlers(): ha...
32.207317
202
0.680803
import logging class EnvLogger(): mqueue = [] _output = True @staticmethod def get_logger(): logger = logging.getLogger(__name__) return logger @staticmethod def _generic_warning(msg): logger = EnvLogger.get_logger() if not logger.hasHandlers(): ha...
true
true
1c230c7531faa25e2a902e9e51ec6d7ac008f04a
120,110
py
Python
tensorflow/lite/python/lite.py
uabeysinghe/tensorflow
c3ecdfa4f186d43c061a508d5f891e082ceb6640
[ "Apache-2.0" ]
null
null
null
tensorflow/lite/python/lite.py
uabeysinghe/tensorflow
c3ecdfa4f186d43c061a508d5f891e082ceb6640
[ "Apache-2.0" ]
null
null
null
tensorflow/lite/python/lite.py
uabeysinghe/tensorflow
c3ecdfa4f186d43c061a508d5f891e082ceb6640
[ "Apache-2.0" ]
null
null
null
# Lint as: python2, python3 # 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 # ...
42.055322
126
0.711931
import enum import functools import pprint import shutil import tempfile import time import warnings from absl import logging import six from six import PY2 from google.protobuf import text_format as _text_format from google.protobuf.message import DecodeError from tensorflow.core.framework import gra...
true
true
1c230d63902d7e47e0fe4921e33d29c1e9b86d64
3,399
py
Python
iriusrisk-python-client-lib/iriusrisk_python_client_lib/models/udt.py
iriusrisk/iriusrisk-python-client-lib
4912706cd1e5c0bc555dbc7da02fb64cbeab3b18
[ "Apache-2.0" ]
null
null
null
iriusrisk-python-client-lib/iriusrisk_python_client_lib/models/udt.py
iriusrisk/iriusrisk-python-client-lib
4912706cd1e5c0bc555dbc7da02fb64cbeab3b18
[ "Apache-2.0" ]
null
null
null
iriusrisk-python-client-lib/iriusrisk_python_client_lib/models/udt.py
iriusrisk/iriusrisk-python-client-lib
4912706cd1e5c0bc555dbc7da02fb64cbeab3b18
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ IriusRisk API Products API # noqa: E501 OpenAPI spec version: 1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class Udt(object): """NOTE: This class is auto generated by the swagger code generat...
23.93662
80
0.518388
import pprint import re import six class Udt(object): swagger_types = { 'ref': 'str', 'value': 'str' } attribute_map = { 'ref': 'ref', 'value': 'value' } def __init__(self, ref=None, value=None): self._ref = None self._value = None ...
true
true
1c230e214f59ba6d3d8f62e7848fbf9f8d5ca386
19,911
py
Python
dm_control/mjcf/attribute_test.py
h8907283/dm_control
fe4449606742a7b8bec81930790b98244cddc538
[ "Apache-2.0" ]
null
null
null
dm_control/mjcf/attribute_test.py
h8907283/dm_control
fe4449606742a7b8bec81930790b98244cddc538
[ "Apache-2.0" ]
null
null
null
dm_control/mjcf/attribute_test.py
h8907283/dm_control
fe4449606742a7b8bec81930790b98244cddc538
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The dm_control 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 i...
42.184322
80
0.728894
import contextlib import hashlib import os from absl.testing import absltest from absl.testing import parameterized from dm_control.mjcf import attribute from dm_control.mjcf import constants from dm_control.mjcf import element from dm_control.mjcf import namescope from dm_control.mjcf import schema fr...
true
true
1c230ee82369cd1da20e1f674a08477b2560bed4
3,430
py
Python
test/mitmproxy/addons/test_modifybody.py
shubhangi013/mitmproxy
ffe58ae34cd2a32e02634adb1198ea7a5708391d
[ "MIT" ]
1
2022-02-09T09:22:48.000Z
2022-02-09T09:22:48.000Z
test/mitmproxy/addons/test_modifybody.py
shubhangi013/mitmproxy
ffe58ae34cd2a32e02634adb1198ea7a5708391d
[ "MIT" ]
null
null
null
test/mitmproxy/addons/test_modifybody.py
shubhangi013/mitmproxy
ffe58ae34cd2a32e02634adb1198ea7a5708391d
[ "MIT" ]
null
null
null
import pytest from mitmproxy.addons import modifybody from mitmproxy.test import taddons from mitmproxy.test import tflow from mitmproxy.test.tutils import tresp class TestModifyBody: def test_configure(self): mb = modifybody.ModifyBody() with taddons.context(mb) as tctx: tctx.configu...
31.181818
76
0.492711
import pytest from mitmproxy.addons import modifybody from mitmproxy.test import taddons from mitmproxy.test import tflow from mitmproxy.test.tutils import tresp class TestModifyBody: def test_configure(self): mb = modifybody.ModifyBody() with taddons.context(mb) as tctx: tctx.configu...
true
true
1c230fb62a683fb920ad0c4a4fa2728672d73259
6,729
py
Python
analysis/Distance.py
msychung/FUSE-2020
222225b9e18519e999e56b376895fcd407d5cfba
[ "MIT" ]
null
null
null
analysis/Distance.py
msychung/FUSE-2020
222225b9e18519e999e56b376895fcd407d5cfba
[ "MIT" ]
null
null
null
analysis/Distance.py
msychung/FUSE-2020
222225b9e18519e999e56b376895fcd407d5cfba
[ "MIT" ]
null
null
null
import BioLogic import pandas as pd import numpy as np import glob import os.path import matplotlib.pyplot as plt import matplotlib.ticker as ticker from numpy import matlib ''' Uses the "Distance" method to find nucleation overpotential i.e. finds the point furthest away from a line drawn between the first and las...
44.562914
247
0.692971
import BioLogic import pandas as pd import numpy as np import glob import os.path import matplotlib.pyplot as plt import matplotlib.ticker as ticker from numpy import matlib NewAcH = "C:\\Users\\Melissa\\OneDrive - Lancaster University\\Jobs & Internships\\FUSE 2020\\Data Analysis\\Analysis\\Analysis New\\AcH\\"...
true
true
1c23109bd3189f01b9fcab3571cd4998f558a196
714
py
Python
stalkr/sentiment.py
helderm/stalkr
4d98ef673f0c34992a3b05065f9c6f9dd8fad461
[ "0BSD" ]
null
null
null
stalkr/sentiment.py
helderm/stalkr
4d98ef673f0c34992a3b05065f9c6f9dd8fad461
[ "0BSD" ]
null
null
null
stalkr/sentiment.py
helderm/stalkr
4d98ef673f0c34992a3b05065f9c6f9dd8fad461
[ "0BSD" ]
null
null
null
from textblob import TextBlob import re def normalize(text): tokens = text.split() new_string = "" for t in tokens: if not (t.startswith('#') or t.startswith('@') or t.startswith('&') or t.startswith('http')): new_string += t + " " return new_string def get_sentiment(text): t...
19.833333
101
0.592437
from textblob import TextBlob import re def normalize(text): tokens = text.split() new_string = "" for t in tokens: if not (t.startswith('#') or t.startswith('@') or t.startswith('&') or t.startswith('http')): new_string += t + " " return new_string def get_sentiment(text): t...
true
true
1c23111deda04b76b71508928643a973ca8bd214
5,040
py
Python
corehq/apps/userreports/reports/data_source.py
rochakchauhan/commcare-hq
aa7ab3c2d0c51fe10f2b51b08101bb4b5a376236
[ "BSD-3-Clause" ]
null
null
null
corehq/apps/userreports/reports/data_source.py
rochakchauhan/commcare-hq
aa7ab3c2d0c51fe10f2b51b08101bb4b5a376236
[ "BSD-3-Clause" ]
null
null
null
corehq/apps/userreports/reports/data_source.py
rochakchauhan/commcare-hq
aa7ab3c2d0c51fe10f2b51b08101bb4b5a376236
[ "BSD-3-Clause" ]
null
null
null
from corehq.apps.userreports.const import ( DATA_SOURCE_TYPE_STANDARD, UCR_SQL_BACKEND, ) from corehq.apps.userreports.custom.data_source import ( ConfigurableReportCustomDataSource, ) from corehq.apps.userreports.models import ( DataSourceConfiguration, get_datasource_config, ) from corehq.apps.use...
32.516129
104
0.674802
from corehq.apps.userreports.const import ( DATA_SOURCE_TYPE_STANDARD, UCR_SQL_BACKEND, ) from corehq.apps.userreports.custom.data_source import ( ConfigurableReportCustomDataSource, ) from corehq.apps.userreports.models import ( DataSourceConfiguration, get_datasource_config, ) from corehq.apps.use...
true
true
1c23115ad1d7c2331cbd9d7d9bcd528c23f27cbe
1,810
py
Python
setup.py
Ross1503/hpack
e56d0e3fc528a22f989f32fc9f4ab498f0757334
[ "MIT" ]
null
null
null
setup.py
Ross1503/hpack
e56d0e3fc528a22f989f32fc9f4ab498f0757334
[ "MIT" ]
null
null
null
setup.py
Ross1503/hpack
e56d0e3fc528a22f989f32fc9f4ab498f0757334
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import codecs import os import re import sys try: from setuptools import setup except ImportError: from distutils.core import setup # Get the version version_regex = r'__version__ = ["\']([^"\']*)["\']' with open('hpack/__init__.py', 'r') as f: text = f.read()...
30.677966
133
0.622652
import codecs import os import re import sys try: from setuptools import setup except ImportError: from distutils.core import setup version_regex = r'__version__ = ["\']([^"\']*)["\']' with open('hpack/__init__.py', 'r') as f: text = f.read() match = re.search(version_regex, text) if match: ...
true
true
1c2311cb7ee5d0ebfa3a972082bcc63656377a29
27,114
py
Python
src/pymp4/parser.py
beardypig/pymp4
0e5e505630dbb952b0c3860455f3280aa9d30d5c
[ "Apache-2.0" ]
49
2016-12-06T12:27:58.000Z
2022-03-20T04:15:23.000Z
src/pymp4/parser.py
beardypig/pymp4
0e5e505630dbb952b0c3860455f3280aa9d30d5c
[ "Apache-2.0" ]
9
2017-09-12T11:45:34.000Z
2021-12-23T05:07:27.000Z
src/pymp4/parser.py
beardypig/pymp4
0e5e505630dbb952b0c3860455f3280aa9d30d5c
[ "Apache-2.0" ]
21
2017-12-07T08:51:51.000Z
2021-12-12T19:41:51.000Z
#!/usr/bin/env python """ Copyright 2016 beardypig Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable la...
32.049645
128
0.620934
import logging from uuid import UUID from construct import * import construct.core from construct.lib import * log = logging.getLogger(__name__) UNITY_MATRIX = [0x10000, 0, 0, 0, 0x10000, 0, 0, 0, 0x40000000] class PrefixedIncludingSize(Subconstruct): __slots__ = ["name", "lengthfield", "subcon"] def __i...
true
true
1c23121470d7d40091304a551a09a73999d20c91
1,688
py
Python
test.py
8055aa/Python3Code
ac832241b87c02a3b3e1b216dbcd3cfbd0293b7c
[ "Apache-2.0" ]
null
null
null
test.py
8055aa/Python3Code
ac832241b87c02a3b3e1b216dbcd3cfbd0293b7c
[ "Apache-2.0" ]
null
null
null
test.py
8055aa/Python3Code
ac832241b87c02a3b3e1b216dbcd3cfbd0293b7c
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Filename: test.py # using: support.py from selenium import webdriver from time import sleep from firebase import firebase import matplotlib.pyplot as plt from pylab import * import requests, os from bs4 import BeautifulSoup from urllib.request import...
26.375
80
0.543839
from selenium import webdriver from time import sleep from firebase import firebase import matplotlib.pyplot as plt from pylab import * import requests, os from bs4 import BeautifulSoup from urllib.request import urlopen rcParams['font.sans-serif'] = ['SimHei'] url = "https://aa550872690.fire...
true
true
1c23132e23bf595c6cf613f0366a121796bd9555
11,956
py
Python
pycsw/core/util.py
koordinates/pycsw
e1400724880f0f718a04a0f5f4fa7468761f8a41
[ "MIT" ]
null
null
null
pycsw/core/util.py
koordinates/pycsw
e1400724880f0f718a04a0f5f4fa7468761f8a41
[ "MIT" ]
null
null
null
pycsw/core/util.py
koordinates/pycsw
e1400724880f0f718a04a0f5f4fa7468761f8a41
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # ================================================================= # # Authors: Tom Kralidis <tomkralidis@gmail.com> # Angelos Tzotsos <tzotsos@gmail.com> # Ricardo Garcia Silva <ricardo.garcia.silva@gmail.com> # # Copyright (c) 2015 Tom Kralidis # Copyright (c) 2015 Angelos T...
30.422392
109
0.615507
import os import re import datetime import logging import time from urllib.request import Request, urlopen from urllib.parse import urlparse from shapely.wkt import loads from owslib.util import http_post from pycsw.core.etree import etree, PARSER LOGGER = logging.getLogger(__name__...
true
true
1c23134bdb39d30212628517ef55abfa93bd930d
2,547
py
Python
tests/cmdline/commands/test_plugin.py
azadoks/aiida-core
b806b7fef8fc79090deccfe2019b77cb922e0581
[ "MIT", "BSD-3-Clause" ]
180
2019-07-12T07:45:26.000Z
2022-03-22T13:16:57.000Z
tests/cmdline/commands/test_plugin.py
azadoks/aiida-core
b806b7fef8fc79090deccfe2019b77cb922e0581
[ "MIT", "BSD-3-Clause" ]
2,466
2016-12-24T01:03:52.000Z
2019-07-04T13:41:08.000Z
tests/cmdline/commands/test_plugin.py
azadoks/aiida-core
b806b7fef8fc79090deccfe2019b77cb922e0581
[ "MIT", "BSD-3-Clause" ]
88
2019-07-06T01:42:39.000Z
2022-03-18T14:20:09.000Z
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
43.169492
98
0.6702
true
true
1c2313a8bca16a28aa617cc0b1945fffad3ff299
3,209
py
Python
openGraphMatching/utils.py
chang2000/openGraphMatching
0ca7a6c762ef18a42ab5a021ba76ce16e8c607e4
[ "MIT" ]
null
null
null
openGraphMatching/utils.py
chang2000/openGraphMatching
0ca7a6c762ef18a42ab5a021ba76ce16e8c607e4
[ "MIT" ]
null
null
null
openGraphMatching/utils.py
chang2000/openGraphMatching
0ca7a6c762ef18a42ab5a021ba76ce16e8c607e4
[ "MIT" ]
null
null
null
# import torch # from deepsnap.batch import Batch # from deepsnap.dataset import GraphDataset import networkx as nx import matplotlib.pyplot as plt # from . import feature_preprocess device_cache = None def get_device(): global device_cache if device_cache is None: device_cache = torch.device("cuda") ...
30.273585
86
0.610471
import networkx as nx import matplotlib.pyplot as plt device_cache = None def get_device(): global device_cache if device_cache is None: device_cache = torch.device("cuda") if torch.cuda.is_available() \ else torch.device("cpu") return device_cache def batch_nx_graphs(gra...
true
true
1c23143d624c758c0c0864fe0c885cc55773dfc0
20,004
py
Python
openrec/recommenders/recommender.py
BoData-Bot/openrec
3d655d21b762b40d50e53cea96d7802fd49c74ad
[ "Apache-2.0" ]
399
2018-01-04T15:24:02.000Z
2022-03-31T09:39:05.000Z
openrec/recommenders/recommender.py
BoData-Bot/openrec
3d655d21b762b40d50e53cea96d7802fd49c74ad
[ "Apache-2.0" ]
26
2018-01-14T04:01:28.000Z
2022-02-09T23:36:32.000Z
openrec/recommenders/recommender.py
BoData-Bot/openrec
3d655d21b762b40d50e53cea96d7802fd49c74ad
[ "Apache-2.0" ]
97
2017-12-22T07:07:35.000Z
2022-01-24T19:04:02.000Z
import tensorflow as tf import numpy as np class Recommender(object): """ The Recommender is the OpenRec abstraction [1]_ for recommendation algorithms. Parameters ---------- batch_size: int Training batch size. The structure of a training instance varies across recommenders. max_...
30.822804
120
0.591582
import tensorflow as tf import numpy as np class Recommender(object): def __init__(self, batch_size, max_user, max_item, extra_interactions_funcs=[], extra_fusions_funcs=[], test_batch_size=None, l2_reg=None, opt='SGD', lr=None, init_dict=None, sess_config=None): ...
true
true
1c23144c24e44ce0817eba599ec66199e32e65a5
1,903
py
Python
tools/qmratool/admin.py
mrustl/qmra
bdf4536ee660d1dd8bb0eca0662b62f05546cbac
[ "MIT" ]
null
null
null
tools/qmratool/admin.py
mrustl/qmra
bdf4536ee660d1dd8bb0eca0662b62f05546cbac
[ "MIT" ]
2
2021-06-02T18:05:15.000Z
2021-06-03T06:17:59.000Z
tools/qmratool/admin.py
mrustl/qmra-1
875cf04930291269eedc8f22876b519db35993ec
[ "MIT" ]
2
2021-04-06T19:15:51.000Z
2021-06-02T17:13:34.000Z
from django.contrib import admin from .models import Treatment, QA, Text, RiskAssessment, User, LogRemoval, Exposure, Reference, SourceWater, Pathogen, PathogenGroup, Health, Inflow, Guideline, DoseResponse # Register your models here. from import_export.admin import ImportExportModelAdmin # Register your models here....
27.57971
173
0.77877
from django.contrib import admin from .models import Treatment, QA, Text, RiskAssessment, User, LogRemoval, Exposure, Reference, SourceWater, Pathogen, PathogenGroup, Health, Inflow, Guideline, DoseResponse from import_export.admin import ImportExportModelAdmin @admin.register(SourceWater) class SourceWaterAdmin(Im...
true
true
1c231684031ec2f1f30a20f1607bc4f466c44f11
2,228
py
Python
demos/ant.core/08-rawmessage4.py
asantacreu/python-ant
894e9281d0a5811b8acec1ad9ac2efbc9fb4b0f3
[ "MIT" ]
105
2015-01-04T01:40:47.000Z
2022-01-27T14:33:32.000Z
demos/ant.core/08-rawmessage4.py
asantacreu/python-ant
894e9281d0a5811b8acec1ad9ac2efbc9fb4b0f3
[ "MIT" ]
18
2015-09-23T22:45:00.000Z
2018-01-06T06:30:23.000Z
demos/ant.core/08-rawmessage4.py
asantacreu/python-ant
894e9281d0a5811b8acec1ad9ac2efbc9fb4b0f3
[ "MIT" ]
114
2015-01-21T17:05:51.000Z
2022-03-17T00:35:35.000Z
""" Initialize a basic broadcast slave channel for listening to an ANT+ HRM monitor, using raw messages. """ import sys import time from ant.core import driver from ant.core import event from ant.core.constants import * from ant.core.message import * from config import * NETKEY = '\xB9\xA5\x21\xFB\xBD\x72\xC3\x45'...
23.956989
68
0.728905
""" Initialize a basic broadcast slave channel for listening to an ANT+ HRM monitor, using raw messages. """ import sys import time from ant.core import driver from ant.core import event from ant.core.constants import * from ant.core.message import * from config import * NETKEY = '\xB9\xA5\x21\xFB\xBD\x72\xC3\x45'...
false
true
1c2316f8d140b17b9354e0460e844b50c794ac84
6,528
py
Python
tests/test_arms_and_configuration_paths.py
WeiWeic6222848/PyRep
231a1ac6b0a179cff53c1d403d379260b9f05f2f
[ "MIT" ]
505
2019-06-26T17:02:44.000Z
2022-03-31T04:03:23.000Z
tests/test_arms_and_configuration_paths.py
WeiWeic6222848/PyRep
231a1ac6b0a179cff53c1d403d379260b9f05f2f
[ "MIT" ]
255
2019-06-27T07:04:17.000Z
2022-03-29T18:25:48.000Z
tests/test_arms_and_configuration_paths.py
WeiWeic6222848/PyRep
231a1ac6b0a179cff53c1d403d379260b9f05f2f
[ "MIT" ]
171
2019-06-27T05:33:50.000Z
2022-03-30T03:34:24.000Z
import unittest from tests.core import TestCore from pyrep import PyRep from pyrep.objects.cartesian_path import CartesianPath from pyrep.objects.dummy import Dummy import numpy as np from os import path from pyrep.errors import ConfigurationPathError from pyrep.robots.arms.panda import Panda from pyrep.robots.arms.mi...
34.909091
80
0.651348
import unittest from tests.core import TestCore from pyrep import PyRep from pyrep.objects.cartesian_path import CartesianPath from pyrep.objects.dummy import Dummy import numpy as np from os import path from pyrep.errors import ConfigurationPathError from pyrep.robots.arms.panda import Panda from pyrep.robots.arms.mi...
true
true
1c23171d659b9434203ce4384b27f82f5ebee810
6,266
py
Python
virtual_env/lib/python3.5/site-packages/google_compute_engine/instance_setup/instance_config.py
straydag/To_Due_Backend
ac91f5ebabe8e4f2b6db7faa5ccbd30ebdb4e3f6
[ "MIT" ]
2
2019-06-25T18:25:49.000Z
2019-06-27T04:48:53.000Z
virtual_env/lib/python3.5/site-packages/google_compute_engine/instance_setup/instance_config.py
straydag/To_Due_Backend
ac91f5ebabe8e4f2b6db7faa5ccbd30ebdb4e3f6
[ "MIT" ]
6
2020-09-08T00:13:19.000Z
2022-02-27T01:04:42.000Z
virtual_env/lib/python3.5/site-packages/google_compute_engine/instance_setup/instance_config.py
straydag/To_Due_Backend
ac91f5ebabe8e4f2b6db7faa5ccbd30ebdb4e3f6
[ "MIT" ]
null
null
null
#!/usr/bin/python # Copyright 2016 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 appli...
39.1625
80
0.663262
import logging import os from google_compute_engine import config_manager from google_compute_engine import constants from google_compute_engine.compat import parser from google_compute_engine.compat import stringio class InstanceConfig(config_manager.ConfigManager): instance_config = constants.SY...
true
true
1c23174882882adb0aef1cca9ede2cce902a0445
3,495
py
Python
cleave_test.py
smithhmark/psychic-tribble
b8b83856a66d2f5ad6d40b5b33c1979c69ccc320
[ "MIT" ]
null
null
null
cleave_test.py
smithhmark/psychic-tribble
b8b83856a66d2f5ad6d40b5b33c1979c69ccc320
[ "MIT" ]
null
null
null
cleave_test.py
smithhmark/psychic-tribble
b8b83856a66d2f5ad6d40b5b33c1979c69ccc320
[ "MIT" ]
null
null
null
import pytest import io import json import cleave @pytest.fixture() def load_out(): return [ {"payload": "things"}, {"payload": "stuff"}, {"payload": "stuff and things"}, ] @pytest.fixture() def single_small(): return """{ "id": "1234", "name": { "...
24.612676
72
0.578255
import pytest import io import json import cleave @pytest.fixture() def load_out(): return [ {"payload": "things"}, {"payload": "stuff"}, {"payload": "stuff and things"}, ] @pytest.fixture() def single_small(): return """{ "id": "1234", "name": { "...
true
true
1c231963cb7232cc5a10b8b628f33ee1df6c93e7
21,078
py
Python
src/main.py
Kevin0624/HarDNeXt
32cd7959af260fd7ede9514547907e187fb647a8
[ "MIT" ]
7
2021-11-10T05:49:59.000Z
2022-02-17T07:42:01.000Z
src/main.py
Kevin0624/HarDNeXt
32cd7959af260fd7ede9514547907e187fb647a8
[ "MIT" ]
null
null
null
src/main.py
Kevin0624/HarDNeXt
32cd7959af260fd7ede9514547907e187fb647a8
[ "MIT" ]
1
2022-02-09T08:22:22.000Z
2022-02-09T08:22:22.000Z
import argparse import os import random import shutil import time import warnings import sys import numpy as np import torch import torch.nn as nn import torch.nn.parallel import torch.backends.cudnn as cudnn import torch.distributed as dist import torch.optim import torch.multiprocessing as mp import torch.utils.data...
34.32899
144
0.600009
import argparse import os import random import shutil import time import warnings import sys import numpy as np import torch import torch.nn as nn import torch.nn.parallel import torch.backends.cudnn as cudnn import torch.distributed as dist import torch.optim import torch.multiprocessing as mp import torch.utils.data...
true
true
1c2319a4dae0c1ce06cf11827c563a9860232de8
12,071
py
Python
msgraph/cli/command_modules/groups/azext_groups/vendored_sdks/groups/operations/_groups_onenote_pages_parent_section_pages_operations.py
microsoftgraph/msgraph-cli-archived
489f70bf4ede1ce67b84bfb31e66da3e4db76062
[ "MIT" ]
null
null
null
msgraph/cli/command_modules/groups/azext_groups/vendored_sdks/groups/operations/_groups_onenote_pages_parent_section_pages_operations.py
microsoftgraph/msgraph-cli-archived
489f70bf4ede1ce67b84bfb31e66da3e4db76062
[ "MIT" ]
22
2022-03-29T22:54:37.000Z
2022-03-29T22:55:27.000Z
msgraph/cli/command_modules/groups/azext_groups/vendored_sdks/groups/operations/_groups_onenote_pages_parent_section_pages_operations.py
microsoftgraph/msgraph-cli-archived
489f70bf4ede1ce67b84bfb31e66da3e4db76062
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
48.673387
211
0.689007
from typing import TYPE_CHECKING import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.m...
true
true
1c2319f180ebe60e00810323e0ccab267e94e0bf
1,273
py
Python
oauth2_provider/admin.py
sebdiem/django-oauth-toolkit
c797eb55b2a5b0a50d00a910644f86acd8779548
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
oauth2_provider/admin.py
sebdiem/django-oauth-toolkit
c797eb55b2a5b0a50d00a910644f86acd8779548
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
oauth2_provider/admin.py
sebdiem/django-oauth-toolkit
c797eb55b2a5b0a50d00a910644f86acd8779548
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
from django.contrib import admin from .abstract_models import ( get_access_token_model, get_application_model, get_grant_model, get_refresh_token_model ) class ApplicationAdmin(admin.ModelAdmin): list_display = ("name", "user", "client_type", "authorization_grant_type") list_filter = ("client_type", ...
29.604651
83
0.739984
from django.contrib import admin from .abstract_models import ( get_access_token_model, get_application_model, get_grant_model, get_refresh_token_model ) class ApplicationAdmin(admin.ModelAdmin): list_display = ("name", "user", "client_type", "authorization_grant_type") list_filter = ("client_type", ...
true
true
1c231c5edb8494df1322a89158152a16ab8f44aa
5,764
py
Python
docs/mcpi/algorytmy/mcpi-lpi.py
sokol02/python101
e06ad83f9eee285023b9c8e79ab1c00ad8bd67e5
[ "MIT" ]
null
null
null
docs/mcpi/algorytmy/mcpi-lpi.py
sokol02/python101
e06ad83f9eee285023b9c8e79ab1c00ad8bd67e5
[ "MIT" ]
null
null
null
docs/mcpi/algorytmy/mcpi-lpi.py
sokol02/python101
e06ad83f9eee285023b9c8e79ab1c00ad8bd67e5
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- import os import random from time import sleep import mcpi.minecraft as minecraft # import modułu minecraft import mcpi.block as block # import modułu block import local.minecraftstuff as mcstuff os.environ["USERNAME"] = "Steve" # nazwa użytkownika os.environ["COMPUTERNAME...
31.845304
76
0.545975
import os import random from time import sleep import mcpi.minecraft as minecraft import mcpi.block as block import local.minecraftstuff as mcstuff os.environ["USERNAME"] = "Steve" os.environ["COMPUTERNAME"] = "mykomp" mc = minecraft.Minecraft.create("192.168.1.10") def plac(x, y, z, roz=10, gracz=Fals...
false
true
1c231c7740863413e388f0749e1fa9ae3aa9899a
881
py
Python
src/level2/쿼드압축_without_numpy.py
iml1111/programmers_coding_study
07e89220c59c3b40dd92edc39d1b573d018efae4
[ "MIT" ]
1
2021-01-03T13:01:33.000Z
2021-01-03T13:01:33.000Z
src/level2/쿼드압축_without_numpy.py
iml1111/programmers_coding_study
07e89220c59c3b40dd92edc39d1b573d018efae4
[ "MIT" ]
null
null
null
src/level2/쿼드압축_without_numpy.py
iml1111/programmers_coding_study
07e89220c59c3b40dd92edc39d1b573d018efae4
[ "MIT" ]
null
null
null
def list_cut(arr, i, j, n2): map = [0, n2, n2 * 2] result = [] for i in range(map[i], map[i+1]): result.append(arr[i][map[j]:map[j+1]]) return result def compress(arr, n): arr_sum = sum([sum(i) for i in arr]) nn, n2= n * n, n // 2 if arr_sum == nn: return 0, 1 elif arr_s...
28.419355
168
0.480136
def list_cut(arr, i, j, n2): map = [0, n2, n2 * 2] result = [] for i in range(map[i], map[i+1]): result.append(arr[i][map[j]:map[j+1]]) return result def compress(arr, n): arr_sum = sum([sum(i) for i in arr]) nn, n2= n * n, n // 2 if arr_sum == nn: return 0, 1 elif arr_s...
true
true
1c231cc24879cfdbd3652109d4d1e17432a268d6
2,114
py
Python
Birnn_Transformer/ncc/models/retrieval/simple/self_attn.py
code-backdoor/code-backdoor
1eeb3d79aa8a54c8f08e8d0156b569de5edd974e
[ "MIT" ]
null
null
null
Birnn_Transformer/ncc/models/retrieval/simple/self_attn.py
code-backdoor/code-backdoor
1eeb3d79aa8a54c8f08e8d0156b569de5edd974e
[ "MIT" ]
null
null
null
Birnn_Transformer/ncc/models/retrieval/simple/self_attn.py
code-backdoor/code-backdoor
1eeb3d79aa8a54c8f08e8d0156b569de5edd974e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from ncc.models import register_model from ncc.models.ncc_model import NccRetrievalModel from ncc.modules.retrieval.self_attn_encoder import SelfAttnEncoder @register_model('simple_self_attn') class SimpleSelfAttn(NccRetrievalModel): def __init__(self, args, src_encoders, tgt_encoders): ...
51.560976
113
0.680227
from ncc.models import register_model from ncc.models.ncc_model import NccRetrievalModel from ncc.modules.retrieval.self_attn_encoder import SelfAttnEncoder @register_model('simple_self_attn') class SimpleSelfAttn(NccRetrievalModel): def __init__(self, args, src_encoders, tgt_encoders): super().__init__...
true
true
1c2320fe44508e7842fd42bfdb99944a7cb6aaa8
2,602
py
Python
BaseTools/Source/Python/Ecc/Exception.py
KaoTuz/edk2-stable202108
49d9306e7bf64b2f07d8473be1f2faea49d0a012
[ "Python-2.0", "Zlib", "BSD-2-Clause", "MIT", "BSD-2-Clause-Patent", "BSD-3-Clause" ]
9
2021-07-26T17:02:51.000Z
2021-12-30T10:49:46.000Z
BaseTools/Source/Python/Ecc/Exception.py
ESdove/edk2_exploring
34ff32b45f43d233d9696e7c8e3de68ea3000a7b
[ "Python-2.0", "Zlib", "BSD-2-Clause", "MIT", "BSD-2-Clause-Patent", "BSD-3-Clause" ]
null
null
null
BaseTools/Source/Python/Ecc/Exception.py
ESdove/edk2_exploring
34ff32b45f43d233d9696e7c8e3de68ea3000a7b
[ "Python-2.0", "Zlib", "BSD-2-Clause", "MIT", "BSD-2-Clause-Patent", "BSD-3-Clause" ]
null
null
null
## @file # This file is used to parse exception items found by ECC tool # # Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR> # SPDX-License-Identifier: BSD-2-Clause-Patent # ## # Import Modules # from __future__ import print_function from __future__ import absolute_import from Ecc.Xml.XmlRoutines...
30.97619
101
0.64412
from __future__ import print_function from __future__ import absolute_import from Ecc.Xml.XmlRoutines import * import Common.LongFilePathOs as os class ExceptionXml(object): def __init__(self): self.KeyWord = '' self.ErrorID = '' self.FilePath = '' def FromXml(self, Item, Key): ...
true
true
1c23227816c3d6836701844a8cb5bb87a1b62177
3,347
py
Python
get_data_from_XML.py
tsunekoromochi/ssd
0a081b957e90a8edd85c1ba7d96556ce929f9628
[ "MIT" ]
null
null
null
get_data_from_XML.py
tsunekoromochi/ssd
0a081b957e90a8edd85c1ba7d96556ce929f9628
[ "MIT" ]
null
null
null
get_data_from_XML.py
tsunekoromochi/ssd
0a081b957e90a8edd85c1ba7d96556ce929f9628
[ "MIT" ]
null
null
null
import numpy as np import os from xml.etree import ElementTree class XML_preprocessor(object): def __init__(self, data_path): self.path_prefix = data_path self.num_classes = 2 self.data = dict() self._preprocess_XML() def _preprocess_XML(self): filenames = os.listdir(s...
36.78022
71
0.538393
import numpy as np import os from xml.etree import ElementTree class XML_preprocessor(object): def __init__(self, data_path): self.path_prefix = data_path self.num_classes = 2 self.data = dict() self._preprocess_XML() def _preprocess_XML(self): filenames = os.listdir(s...
true
true
1c2323d66a5439fd2b48bded50b8258bd0fb9809
19,770
py
Python
migrations/versions/2018_10_04_code_is_id_for_classification.py
AlexKouzy/ethnicity-facts-and-figures-publisher
18ab2495a8633f585e18e607c7f75daa564a053d
[ "MIT" ]
1
2021-10-06T13:48:36.000Z
2021-10-06T13:48:36.000Z
migrations/versions/2018_10_04_code_is_id_for_classification.py
AlexKouzy/ethnicity-facts-and-figures-publisher
18ab2495a8633f585e18e607c7f75daa564a053d
[ "MIT" ]
116
2018-11-02T17:20:47.000Z
2022-02-09T11:06:22.000Z
migrations/versions/2018_10_04_code_is_id_for_classification.py
racedisparityaudit/rd_cms
a12f0e3f5461cc41eed0077ed02e11efafc5dd76
[ "MIT" ]
2
2018-11-09T16:47:35.000Z
2020-04-09T13:06:48.000Z
""" Make the current "code" column the primary key and id column for "classification" Revision ID: 2018_10_04_code_is_id Revises: 2018_10_03_drop_family Create Date: 2018-10-04 14:32:00.000000 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql drop_all_dashboard_helper_view...
40.679012
161
0.686394
from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql drop_all_dashboard_helper_views = """ DROP INDEX IF EXISTS uix_pages_by_geography; DROP INDEX IF EXISTS uix_latest_published_pages; DROP INDEX IF EXISTS uix_ethnic_groups_by_dimension; DROP INDEX IF EXISTS uix_cat...
true
true
1c23245082855db08dbb09bdeb11fa0671cd3354
1,209
py
Python
apps/beeswax/gen-py/hive_metastore/constants.py
ajay25/hue
5733a1605c1a6055a052012d6ee1c24a48658300
[ "Apache-2.0" ]
1
2020-05-17T06:40:33.000Z
2020-05-17T06:40:33.000Z
apps/beeswax/gen-py/hive_metastore/constants.py
ajay25/hue
5733a1605c1a6055a052012d6ee1c24a48658300
[ "Apache-2.0" ]
3
2020-04-06T07:09:33.000Z
2021-05-10T17:02:07.000Z
apps/beeswax/gen-py/hive_metastore/constants.py
ajay25/hue
5733a1605c1a6055a052012d6ee1c24a48658300
[ "Apache-2.0" ]
1
2020-04-02T04:50:26.000Z
2020-04-02T04:50:26.000Z
from __future__ import absolute_import # # Autogenerated by Thrift Compiler (0.9.3) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py:new_style # from thrift.Thrift import TType, TMessageType, TException, TApplicationException from .ttypes import * DDL_TIME = "transient_last...
33.583333
80
0.827957
from __future__ import absolute_import from thrift.Thrift import TType, TMessageType, TException, TApplicationException from .ttypes import * DDL_TIME = "transient_lastDdlTime" HIVE_FILTER_FIELD_OWNER = "hive_filter_field_owner__" HIVE_FILTER_FIELD_PARAMS = "hive_filter_field_params__" HIVE_FILTER_FIELD_LAST_A...
true
true
1c2324b42880ce64ab92eaa08dcdf1082fdbd5e6
29,062
py
Python
aemet/models.py
kalanda/python-aemet
49e181220b46fc9fe4b42e8596bb484c105e360a
[ "MIT" ]
null
null
null
aemet/models.py
kalanda/python-aemet
49e181220b46fc9fe4b42e8596bb484c105e360a
[ "MIT" ]
null
null
null
aemet/models.py
kalanda/python-aemet
49e181220b46fc9fe4b42e8596bb484c105e360a
[ "MIT" ]
null
null
null
import os import requests import csv import json import urllib3 from datetime import datetime from aemet.constants import * # Disable Insecure Request Warnings urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) class Prediccion: def __init__(self, provincia, version, id, origen, elaborado, predi...
36.3275
121
0.578384
import os import requests import csv import json import urllib3 from datetime import datetime from aemet.constants import * urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) class Prediccion: def __init__(self, provincia, version, id, origen, elaborado, prediccion, nombre): self.provin...
true
true
1c2326f9c631a4d5536ef7f11f1332a54ac35af4
6,812
py
Python
ckan/cli/db.py
salsadigitalauorg/ckan
7586d78682c30f205027522214f33ee2bf413055
[ "BSD-3-Clause" ]
null
null
null
ckan/cli/db.py
salsadigitalauorg/ckan
7586d78682c30f205027522214f33ee2bf413055
[ "BSD-3-Clause" ]
null
null
null
ckan/cli/db.py
salsadigitalauorg/ckan
7586d78682c30f205027522214f33ee2bf413055
[ "BSD-3-Clause" ]
null
null
null
# encoding: utf-8 from __future__ import annotations import inspect import logging import os import contextlib from typing import Optional import click from itertools import groupby import ckan.migration as migration_repo import ckan.plugins as p import ckan.model as model from ckan.common import config from . impor...
30.275556
79
0.627275
from __future__ import annotations import inspect import logging import os import contextlib from typing import Optional import click from itertools import groupby import ckan.migration as migration_repo import ckan.plugins as p import ckan.model as model from ckan.common import config from . import error_shout lo...
true
true
1c23273e33b30ca5ff37cf24fa6d6dbf4bee30e2
2,414
py
Python
pa4_starter/src/decompose.py
Terminator-Creators/CS434_Assignment4
736228191af71fdf0e8e6c892cd517cbd3d1bac5
[ "MIT" ]
null
null
null
pa4_starter/src/decompose.py
Terminator-Creators/CS434_Assignment4
736228191af71fdf0e8e6c892cd517cbd3d1bac5
[ "MIT" ]
null
null
null
pa4_starter/src/decompose.py
Terminator-Creators/CS434_Assignment4
736228191af71fdf0e8e6c892cd517cbd3d1bac5
[ "MIT" ]
null
null
null
import numpy as np import copy class PCA(): """ PCA. A class to reduce dimensions """ def __init__(self, retain_ratio): """ :param retain_ratio: percentage of the variance we maitain (see slide for definition) """ self.retain_ratio = retain_ratio @staticmethod ...
26.822222
102
0.524441
import numpy as np import copy class PCA(): def __init__(self, retain_ratio): self.retain_ratio = retain_ratio @staticmethod def mean(x): return x.mean(axis=0) @staticmethod def cov(x): return np.cov(x.T) @staticmethod def eig(c): eigval, eigvec = np.li...
true
true
1c232767a0604a5d4fb0457fce18de1fb04bb6e9
4,708
py
Python
script/organizer.py
walkingice/img_organizer
9b5a11e3e6d1c2b03c629995b55bbce2b07a96d4
[ "Apache-2.0" ]
null
null
null
script/organizer.py
walkingice/img_organizer
9b5a11e3e6d1c2b03c629995b55bbce2b07a96d4
[ "Apache-2.0" ]
null
null
null
script/organizer.py
walkingice/img_organizer
9b5a11e3e6d1c2b03c629995b55bbce2b07a96d4
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 """ The MIT License (MIT) Copyright (c) 2021 Julian Chu 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...
30.771242
96
0.617247
import argparse import os.path import sys import re from PIL import Image, ExifTags class FileItem: def __init__(self, filename, dest_dir): self.filename = filename self.dest_dir = dest_dir def __repr__(self): return "name: {n:s}, dest_dir: {t:s}".format( n=self.filenam...
true
true
1c23293a25a78cbbc9dc554b6d768ffcea1fe4ea
3,158
py
Python
dlung_v1/test.py
JiazeWang/lung_nodule_detector
920e7caa95e2dfd2d95bf39113aacd65f7726a9b
[ "MIT" ]
null
null
null
dlung_v1/test.py
JiazeWang/lung_nodule_detector
920e7caa95e2dfd2d95bf39113aacd65f7726a9b
[ "MIT" ]
null
null
null
dlung_v1/test.py
JiazeWang/lung_nodule_detector
920e7caa95e2dfd2d95bf39113aacd65f7726a9b
[ "MIT" ]
null
null
null
import sys import UI_util import numpy as np import cv2 import time import math import torch import res18_split_focal as detect_model from torch.nn import DataParallel from torch.backends import cudnn import SimpleITK as sitk from utils import * from split_combine import SplitComb #TODO: nodule view rescale feature add...
36.298851
131
0.618429
import sys import UI_util import numpy as np import cv2 import time import math import torch import res18_split_focal as detect_model from torch.nn import DataParallel from torch.backends import cudnn import SimpleITK as sitk from utils import * from split_combine import SplitComb from config import config class savef...
true
true
1c2329ac2fa30896ff466f9302817407d5a58b19
14,166
py
Python
pymisp/tools/openioc.py
0xiso/PyMISP
20a340414422714dcf31389957343c663550ed1a
[ "BSD-2-Clause" ]
5
2018-07-27T05:48:31.000Z
2021-01-22T02:37:57.000Z
lib/python3.6/site-packages/pymisp/tools/openioc.py
renzejongman/mail2misp
3baf8eede1eca2b960b2dddb1f906c40a2d22bed
[ "MIT" ]
null
null
null
lib/python3.6/site-packages/pymisp/tools/openioc.py
renzejongman/mail2misp
3baf8eede1eca2b960b2dddb1f906c40a2d22bed
[ "MIT" ]
1
2020-05-21T12:58:32.000Z
2020-05-21T12:58:32.000Z
# -*- coding: utf-8 -*- import os from .. import MISPEvent try: from bs4 import BeautifulSoup has_bs4 = True except ImportError: has_bs4 = False iocMispMapping = { 'CookieHistoryItem/HostName': {'type': 'hostname', 'comment': 'CookieHistory.'}, 'DriverItem/DriverName': {'category': 'Artifacts d...
50.412811
165
0.650642
import os from .. import MISPEvent try: from bs4 import BeautifulSoup has_bs4 = True except ImportError: has_bs4 = False iocMispMapping = { 'CookieHistoryItem/HostName': {'type': 'hostname', 'comment': 'CookieHistory.'}, 'DriverItem/DriverName': {'category': 'Artifacts dropped', 'type': 'other...
true
true
1c232a506ee7d5864ae3b3ad41adc08fb95eb788
6,192
py
Python
predict.py
newlikehalo/pytroch-ctpn-Retina
5c80fa1c91fa55cd6e45490a51385cab3b3343b6
[ "MIT" ]
null
null
null
predict.py
newlikehalo/pytroch-ctpn-Retina
5c80fa1c91fa55cd6e45490a51385cab3b3343b6
[ "MIT" ]
null
null
null
predict.py
newlikehalo/pytroch-ctpn-Retina
5c80fa1c91fa55cd6e45490a51385cab3b3343b6
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- # ''' # Created on 18-12-11 上午10:03 # # @Author: Greg Gao(laygin) # ''' import os os.environ['CUDA_VISIBLE_DEVICES'] = '' import cv2 import numpy as np import glob import torch import torch.nn.functional as F from ctpn_model import CTPN_Model from ctpn_utils import gen_anchor, bbox_transfor_inv,...
29.070423
111
0.576389
# Created on 18-12-11 上午10:03 # # @Author: Greg Gao(laygin) # ''' import os os.environ['CUDA_VISIBLE_DEVICES'] = '' import cv2 import numpy as np import glob import torch import torch.nn.functional as F from ctpn_model import CTPN_Model from ctpn_utils import gen_anchor, bbox_transfor_inv, nms, clip_box, filter_bbox...
true
true
1c232a5e05b4bf6562a592927cee89c8a3b439f1
424
py
Python
everest_nosql/tests/test_url.py
cenix/everest_nosql
58dcbd3619fd0c74f4b5a37afbde0d1466cf4f0a
[ "MIT" ]
null
null
null
everest_nosql/tests/test_url.py
cenix/everest_nosql
58dcbd3619fd0c74f4b5a37afbde0d1466cf4f0a
[ "MIT" ]
null
null
null
everest_nosql/tests/test_url.py
cenix/everest_nosql
58dcbd3619fd0c74f4b5a37afbde0d1466cf4f0a
[ "MIT" ]
null
null
null
""" This file is part of the everest project. See LICENSE.txt for licensing, CONTRIBUTORS.txt for contributor information. Created on Nov 27, 2013. """ import pytest from everest.tests.test_url import BaseTestUrl __docformat__ = 'reStructuredText en' __all__ = ['TestUrlNoSql', ] @pytest.mark.usefixture...
21.2
76
0.754717
import pytest from everest.tests.test_url import BaseTestUrl __docformat__ = 'reStructuredText en' __all__ = ['TestUrlNoSql', ] @pytest.mark.usefixtures('nosql') class TestUrlNoSql(BaseTestUrl): config_file_name = 'everest_nosql.tests:configure.zcml'
true
true
1c232ac271daa991a9881a2b281f6fc6888b993c
39,540
py
Python
welib/FEM/fem_beam.py
moonieann/welib
0e430ad3ca034d0d2d60bdb7bbe06c947ce08f52
[ "MIT" ]
24
2019-07-24T23:37:10.000Z
2022-03-30T20:40:40.000Z
welib/FEM/fem_beam.py
moonieann/welib
0e430ad3ca034d0d2d60bdb7bbe06c947ce08f52
[ "MIT" ]
null
null
null
welib/FEM/fem_beam.py
moonieann/welib
0e430ad3ca034d0d2d60bdb7bbe06c947ce08f52
[ "MIT" ]
11
2019-03-14T13:47:04.000Z
2022-03-31T15:47:27.000Z
""" Classes and tools to easily set up a FEM model made of beam elements References: [2] Richard Schwertassek, Oskar Wallrapp "Dynamik Flexibler Mehrkoerpersysteme : Methoden Der Mechanik """ import pandas as pd import numpy as np import scipy from welib.FEM.utils import skew from welib.system.eva im...
37.837321
163
0.550354
import pandas as pd import numpy as np import scipy from welib.FEM.utils import skew from welib.system.eva import eig def cbeam(xNodes, m, EIx=None, EIy=None, EIz=None, EA=None, A=None, Kt=None, E=None, G=None, phi=None, element='frame3d', nel=None, BC='clamped-free', M_root=None, M_tip=None, K_ro...
true
true
1c232b00a05c8c3e0d51a5393e47a72351b10923
9,816
py
Python
piece.py
ChreSyr/iratus
bf4cfa514f5f8c59781af0c9c69bf65dea3bb873
[ "MIT" ]
null
null
null
piece.py
ChreSyr/iratus
bf4cfa514f5f8c59781af0c9c69bf65dea3bb873
[ "MIT" ]
null
null
null
piece.py
ChreSyr/iratus
bf4cfa514f5f8c59781af0c9c69bf65dea3bb873
[ "MIT" ]
null
null
null
import baopig as bp file_dict = {0:"a", 1:"b", 2:"c", 3:"d", 4:"e", 5:"f", 6:"g", 7:"h"} class Piece: LETTER = None moves = () def __init__(self, board, color, square): self.board = board self.color = color self.enemy_color = "w" if color == "b" else "b" self.square =...
32.183607
115
0.523431
import baopig as bp file_dict = {0:"a", 1:"b", 2:"c", 3:"d", 4:"e", 5:"f", 6:"g", 7:"h"} class Piece: LETTER = None moves = () def __init__(self, board, color, square): self.board = board self.color = color self.enemy_color = "w" if color == "b" else "b" self.square =...
true
true
1c232c012a94821affb97a48748481f37d3a43d2
686
py
Python
build_week/users/migrations/0004_auto_20190802_1327.py
cs19-build-week-1/backend
94cedf2595d2008eff31e1e72f92a93d5383911c
[ "MIT" ]
null
null
null
build_week/users/migrations/0004_auto_20190802_1327.py
cs19-build-week-1/backend
94cedf2595d2008eff31e1e72f92a93d5383911c
[ "MIT" ]
11
2019-07-29T21:00:59.000Z
2022-02-10T09:33:26.000Z
build_week/users/migrations/0004_auto_20190802_1327.py
pymaze/backend
cab7db52b8406fdc446d3fca44a73a6a7f052a13
[ "MIT" ]
null
null
null
# Generated by Django 2.2.4 on 2019-08-02 13:27 import django.contrib.postgres.fields from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('users', '0003_auto_20190801_1923'), ] operations = [ migrations.AddField( model_name='user...
27.44
140
0.623907
import django.contrib.postgres.fields from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('users', '0003_auto_20190801_1923'), ] operations = [ migrations.AddField( model_name='user', name='players', fiel...
true
true
1c232c127d70cd48f77d258d156cec73af9407f3
8,976
py
Python
zulip_bots/zulip_bots/bots/idonethis/idonethis.py
iishiishii/python-zulip-api
8500a3238739a080e1809e204c54685437631457
[ "Apache-2.0" ]
null
null
null
zulip_bots/zulip_bots/bots/idonethis/idonethis.py
iishiishii/python-zulip-api
8500a3238739a080e1809e204c54685437631457
[ "Apache-2.0" ]
null
null
null
zulip_bots/zulip_bots/bots/idonethis/idonethis.py
iishiishii/python-zulip-api
8500a3238739a080e1809e204c54685437631457
[ "Apache-2.0" ]
null
null
null
import requests import logging import re from typing import Any, Dict, Optional, List API_BASE_URL = "https://beta.idonethis.com/api/v2" api_key = "" default_team = "" class AuthenticationException(Exception): pass class TeamNotFoundException(Exception): def __init__(self, team: str) -> None: self....
40.986301
130
0.628008
import requests import logging import re from typing import Any, Dict, Optional, List API_BASE_URL = "https://beta.idonethis.com/api/v2" api_key = "" default_team = "" class AuthenticationException(Exception): pass class TeamNotFoundException(Exception): def __init__(self, team: str) -> None: self....
true
true
1c232c5d341077e44cc9adfb891deb1a3d02f7ae
3,491
py
Python
nipyapi/nifi/models/controller_entity.py
jyoti-arora1991/nipyapi
ad0b2bdfd0e65049df7cb45042402201ec924e1e
[ "Apache-2.0" ]
null
null
null
nipyapi/nifi/models/controller_entity.py
jyoti-arora1991/nipyapi
ad0b2bdfd0e65049df7cb45042402201ec924e1e
[ "Apache-2.0" ]
null
null
null
nipyapi/nifi/models/controller_entity.py
jyoti-arora1991/nipyapi
ad0b2bdfd0e65049df7cb45042402201ec924e1e
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ NiFi Rest Api The Rest Api provides programmatic access to command and control a NiFi instance in real time. Start and stop processors, monitor queues, query provenance data, and more. Each endpoint below includes a description, ...
28.153226
479
0.550272
from pprint import pformat from six import iteritems import re class ControllerEntity(object): swagger_types = { 'controller': 'ControllerDTO' } attribute_map = { 'controller': 'controller' } def __init__(self, controller=None): self._controller = None if ...
true
true
1c232cd7e144a6511adeb71aec0a5b7aecb27844
39,408
py
Python
src/transformers/models/distilbert/modeling_distilbert.py
MichalPitr/transformers
8b26688e2e4b68a64f4710b3627439089947cb08
[ "Apache-2.0" ]
101
2021-12-22T00:03:51.000Z
2022-03-30T07:39:09.000Z
src/transformers/models/distilbert/modeling_distilbert.py
MichalPitr/transformers
8b26688e2e4b68a64f4710b3627439089947cb08
[ "Apache-2.0" ]
13
2020-10-13T11:41:11.000Z
2022-02-16T14:13:31.000Z
src/transformers/models/distilbert/modeling_distilbert.py
MichalPitr/transformers
8b26688e2e4b68a64f4710b3627439089947cb08
[ "Apache-2.0" ]
13
2020-10-04T05:06:00.000Z
2022-02-09T01:14:59.000Z
# coding=utf-8 # Copyright 2019-present, the HuggingFace Inc. team, The Google AI Language Team and Facebook, 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.or...
41.308176
121
0.657151
import copy import math import numpy as np import torch from torch import nn from torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, MSELoss from ...activations import gelu from ...file_utils import ( add_code_sample_docstrings, add_start_docstrings, add_start_docstrings_to_model_forward...
true
true
1c232cecd4a90cc3b2bb909a0f6265cbd05aed9d
5,867
py
Python
tods/tests/test_StatisticalMedianAbsoluteDeviation.py
ZhuangweiKang/tods
fe3f55f8ccb306dd292c668e0f1154f1afdfa556
[ "Apache-2.0" ]
1
2020-11-29T05:50:02.000Z
2020-11-29T05:50:02.000Z
tods/tests/test_StatisticalMedianAbsoluteDeviation.py
ZhuangweiKang/tods
fe3f55f8ccb306dd292c668e0f1154f1afdfa556
[ "Apache-2.0" ]
null
null
null
tods/tests/test_StatisticalMedianAbsoluteDeviation.py
ZhuangweiKang/tods
fe3f55f8ccb306dd292c668e0f1154f1afdfa556
[ "Apache-2.0" ]
1
2021-03-26T03:03:28.000Z
2021-03-26T03:03:28.000Z
import unittest from d3m import container, utils from d3m.metadata import base as metadata_base from tods.feature_analysis import StatisticalMedianAbsoluteDeviation class StatisticalMedianAbsoluteDeviationTestCase(unittest.TestCase): def test_basic(self): self.maxDiff=None main = container.DataFr...
53.336364
148
0.506903
import unittest from d3m import container, utils from d3m.metadata import base as metadata_base from tods.feature_analysis import StatisticalMedianAbsoluteDeviation class StatisticalMedianAbsoluteDeviationTestCase(unittest.TestCase): def test_basic(self): self.maxDiff=None main = container.DataFr...
true
true
1c232d55c65ad1afefb8844321a4f894da941807
4,485
py
Python
earth_enterprise/src/server/wsgi/wms/ogc/common/utils.py
ezeeyahoo/earthenterprise
b6cac9e6228946f2f17d1edb75e118aeb3e8e8c9
[ "Apache-2.0" ]
2,661
2017-03-20T22:12:50.000Z
2022-03-30T09:43:19.000Z
earth_enterprise/src/server/wsgi/wms/ogc/common/utils.py
ezeeyahoo/earthenterprise
b6cac9e6228946f2f17d1edb75e118aeb3e8e8c9
[ "Apache-2.0" ]
1,531
2017-03-24T17:20:32.000Z
2022-03-16T18:11:14.000Z
earth_enterprise/src/server/wsgi/wms/ogc/common/utils.py
ezeeyahoo/earthenterprise
b6cac9e6228946f2f17d1edb75e118aeb3e8e8c9
[ "Apache-2.0" ]
990
2017-03-24T11:54:28.000Z
2022-03-22T11:51:47.000Z
#!/usr/bin/env python2.7 # # Copyright 2017 Google Inc. # Copyright 2019-2020 Open GEE Contributors # # 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/LIC...
26.856287
80
0.682051
"""Misc. utilities. ...like logging, Assert, and a case-insensitive dictionary accessor. """ import cgi import logging import sys import traceback import urllib logger = logging.getLogger("wms_maps") def GetValue(dictionary, key_no_case): """Gets a value from a case-insensitive key. Args: ...
false
true
1c232dff65347aa3831da3052aac40f3106739a0
1,096
py
Python
googleScraper/spiders/searchSpider.py
gigatesseract/GimageScrape
d3448fb588da6ce6503315c50b3d3bdb791423b0
[ "MIT" ]
null
null
null
googleScraper/spiders/searchSpider.py
gigatesseract/GimageScrape
d3448fb588da6ce6503315c50b3d3bdb791423b0
[ "MIT" ]
null
null
null
googleScraper/spiders/searchSpider.py
gigatesseract/GimageScrape
d3448fb588da6ce6503315c50b3d3bdb791423b0
[ "MIT" ]
null
null
null
import scrapy from googleScraper.items import GooglescraperItem from scrapy.http.request import Request class searchSpider(scrapy.Spider): name = "search" def start_requests(self): query = "" url = "https://www.google.com/search?tbm=isch&source=hp&biw=1853&bih=951&ei=TE07XJGUBpukyAOK077gCw&q=...
35.354839
223
0.544708
import scrapy from googleScraper.items import GooglescraperItem from scrapy.http.request import Request class searchSpider(scrapy.Spider): name = "search" def start_requests(self): query = "" url = "https://www.google.com/search?tbm=isch&source=hp&biw=1853&bih=951&ei=TE07XJGUBpukyAOK077gCw&q=...
true
true
1c232f14e601ef0443d271a877cd7c57e783bf24
297
py
Python
azure_functions_worker/utils/common.py
vrdmr/azure-functions-python-worker
7c9bcc4cc647f4b80a606a1e039d7cf9f3db9624
[ "MIT" ]
null
null
null
azure_functions_worker/utils/common.py
vrdmr/azure-functions-python-worker
7c9bcc4cc647f4b80a606a1e039d7cf9f3db9624
[ "MIT" ]
null
null
null
azure_functions_worker/utils/common.py
vrdmr/azure-functions-python-worker
7c9bcc4cc647f4b80a606a1e039d7cf9f3db9624
[ "MIT" ]
null
null
null
import os def is_true_like(setting: str): if setting is None: return False return setting.lower().strip() in ['1', 'true', 't', 'yes', 'y'] def is_envvar_true(env_key: str): if os.getenv(env_key) is None: return False return is_true_like(os.environ[env_key])
18.5625
68
0.636364
import os def is_true_like(setting: str): if setting is None: return False return setting.lower().strip() in ['1', 'true', 't', 'yes', 'y'] def is_envvar_true(env_key: str): if os.getenv(env_key) is None: return False return is_true_like(os.environ[env_key])
true
true
1c232f4218f1df3afeda5570b997906efaaeee25
3,651
py
Python
plaso/cli/helpers/interface.py
nflexfo/plaso
5da7aa51c39b593773687fdf20a93ba35fc492b4
[ "Apache-2.0" ]
1
2020-10-29T18:23:25.000Z
2020-10-29T18:23:25.000Z
plaso/cli/helpers/interface.py
nflexfo/plaso
5da7aa51c39b593773687fdf20a93ba35fc492b4
[ "Apache-2.0" ]
null
null
null
plaso/cli/helpers/interface.py
nflexfo/plaso
5da7aa51c39b593773687fdf20a93ba35fc492b4
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """The arguments helper interface.""" from __future__ import unicode_literals import locale import sys from plaso.lib import errors class ArgumentsHelper(object): """CLI arguments helper.""" NAME = 'baseline' # Category further divides the registered helpers down after function, # ...
30.425
80
0.692413
from __future__ import unicode_literals import locale import sys from plaso.lib import errors class ArgumentsHelper(object): NAME = 'baseline' CATEGORY = '' DESCRIPTION = '' _PREFERRED_ENCODING = 'UTF-8' @classmethod def _ParseNumericOption(cls, options, argument_name, default_value=None): ...
true
true
1c232f832f6abaf2efb92113c337cd6af6db2453
650
py
Python
setup.py
pablo-campillo/brand_car_scraper
c5d48cdfb8c44f7332df538b0b2a07e8f0ecebb7
[ "Apache-2.0" ]
null
null
null
setup.py
pablo-campillo/brand_car_scraper
c5d48cdfb8c44f7332df538b0b2a07e8f0ecebb7
[ "Apache-2.0" ]
18
2020-10-16T16:59:56.000Z
2020-11-09T12:58:02.000Z
setup.py
pablo-campillo/brand_car_scraper
c5d48cdfb8c44f7332df538b0b2a07e8f0ecebb7
[ "Apache-2.0" ]
null
null
null
from setuptools import setup, find_packages def get_requirements(): with open('requirements.txt') as fp: return [line[:-1] for line in fp] return [] setup( name='brand_car_scraper', version='1.0.0', author='Pedro Uceda and Pablo Campillo', author_email='', packages=find_packages(...
24.074074
75
0.656923
from setuptools import setup, find_packages def get_requirements(): with open('requirements.txt') as fp: return [line[:-1] for line in fp] return [] setup( name='brand_car_scraper', version='1.0.0', author='Pedro Uceda and Pablo Campillo', author_email='', packages=find_packages(...
true
true
1c232fb34585ed06b5dea0bc67f1a02bc621dd49
6,329
py
Python
urlauth/tests.py
egguy/django-urlauth
1f94a11983e183df15444dd7b405aaa667dfeebd
[ "BSD-3-Clause" ]
null
null
null
urlauth/tests.py
egguy/django-urlauth
1f94a11983e183df15444dd7b405aaa667dfeebd
[ "BSD-3-Clause" ]
null
null
null
urlauth/tests.py
egguy/django-urlauth
1f94a11983e183df15444dd7b405aaa667dfeebd
[ "BSD-3-Clause" ]
null
null
null
from builtins import range from datetime import datetime, timedelta import cgi from django.conf.urls import url from django.test import TestCase from django.http import HttpResponse from django.conf import settings from urlauth.settings import URLAUTH_AUTHKEY_NAME try: from django.contrib.auth import get_user_mod...
36.583815
88
0.608627
from builtins import range from datetime import datetime, timedelta import cgi from django.conf.urls import url from django.test import TestCase from django.http import HttpResponse from django.conf import settings from urlauth.settings import URLAUTH_AUTHKEY_NAME try: from django.contrib.auth import get_user_mod...
true
true
1c233032e42d5d2ce5d041059ca01f2589de34c5
2,286
py
Python
consoleme/lib/duo.py
ajaykumar426344/meazure
bc96c5fe5976e77b5a1fd3cf2a568e8ce03ed4ae
[ "Apache-2.0" ]
2,835
2020-12-09T19:07:24.000Z
2022-03-31T06:38:44.000Z
consoleme/lib/duo.py
ajaykumar426344/meazure
bc96c5fe5976e77b5a1fd3cf2a568e8ce03ed4ae
[ "Apache-2.0" ]
179
2020-12-10T01:51:25.000Z
2022-03-31T02:06:06.000Z
consoleme/lib/duo.py
ajaykumar426344/meazure
bc96c5fe5976e77b5a1fd3cf2a568e8ce03ed4ae
[ "Apache-2.0" ]
219
2020-12-09T21:30:56.000Z
2022-03-31T05:57:36.000Z
import sys import boto3 import ujson as json from asgiref.sync import sync_to_async from botocore.exceptions import ClientError from consoleme.config import config from consoleme.lib.plugins import get_plugin_by_name stats = get_plugin_by_name(config.get("plugins.metrics", "default_metrics"))() log = config.get_logg...
34.636364
78
0.660542
import sys import boto3 import ujson as json from asgiref.sync import sync_to_async from botocore.exceptions import ClientError from consoleme.config import config from consoleme.lib.plugins import get_plugin_by_name stats = get_plugin_by_name(config.get("plugins.metrics", "default_metrics"))() log = config.get_logg...
true
true
1c233072c5a05a1a34c13a3e5ce0a9d99bfbe598
2,696
py
Python
pgAdmin/browser/server_groups/servers/databases/languages/tests/test_language_dependency.py
WeilerWebServices/PostgreSQL
ae594ed077bebbad1be3c1d95c38b7c2c2683e8c
[ "PostgreSQL" ]
null
null
null
pgAdmin/browser/server_groups/servers/databases/languages/tests/test_language_dependency.py
WeilerWebServices/PostgreSQL
ae594ed077bebbad1be3c1d95c38b7c2c2683e8c
[ "PostgreSQL" ]
null
null
null
pgAdmin/browser/server_groups/servers/databases/languages/tests/test_language_dependency.py
WeilerWebServices/PostgreSQL
ae594ed077bebbad1be3c1d95c38b7c2c2683e8c
[ "PostgreSQL" ]
null
null
null
########################################################################## # # pgAdmin 4 - PostgreSQL Tools # # Copyright (C) 2013 - 2020, The pgAdmin Development Team # This software is released under the PostgreSQL Licence # ########################################################################## from __future__ i...
40.848485
76
0.594214
true
true
1c2331936d94a34e268f39eb65d9e3ce7919574c
9,689
py
Python
gpsr_command_understanding/parser.py
nickswalker/gpsr-command-understanding
37a8d6aacf4237a90dfdf9f536036586f3824137
[ "MIT" ]
8
2019-07-08T08:27:46.000Z
2021-08-31T16:03:29.000Z
gpsr_command_understanding/parser.py
nickswalker/gpsr-command-understanding
37a8d6aacf4237a90dfdf9f536036586f3824137
[ "MIT" ]
1
2019-06-07T18:24:16.000Z
2019-06-07T18:24:16.000Z
gpsr_command_understanding/parser.py
nickswalker/gpsr-command-understanding
37a8d6aacf4237a90dfdf9f536036586f3824137
[ "MIT" ]
6
2020-02-13T01:20:26.000Z
2021-08-31T16:03:30.000Z
import operator from copy import deepcopy, copy from itertools import count import editdistance import lark from lark import Transformer, Lark, Tree from gpsr_command_understanding.generator.generator import Generator from gpsr_command_understanding.generator.grammar import DiscardVoid, DiscardMeta from gpsr_command...
38.601594
118
0.609764
import operator from copy import deepcopy, copy from itertools import count import editdistance import lark from lark import Transformer, Lark, Tree from gpsr_command_understanding.generator.generator import Generator from gpsr_command_understanding.generator.grammar import DiscardVoid, DiscardMeta from gpsr_command...
true
true
1c233199a4eaf69a0cdd84e2a34fed8a3af2df11
3,040
py
Python
utils/data.py
arjunbhagoji/network-data-sharing
05a4965758e3a0de312fed27becba3eabf0cb8f0
[ "MIT" ]
null
null
null
utils/data.py
arjunbhagoji/network-data-sharing
05a4965758e3a0de312fed27becba3eabf0cb8f0
[ "MIT" ]
null
null
null
utils/data.py
arjunbhagoji/network-data-sharing
05a4965758e3a0de312fed27becba3eabf0cb8f0
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd def data_cleanup(X,y): inf_indices=np.where(X==np.inf) nan_indices=np.where(X!=X) mask = np.ones(len(X), dtype=bool) mask[np.union1d(inf_indices[0],nan_indices[0])] = False X_mod=X[mask,:] y_mod=y[mask] return X_mod,y_mod def read_data(input_type,inpu...
33.043478
85
0.611513
import numpy as np import pandas as pd def data_cleanup(X,y): inf_indices=np.where(X==np.inf) nan_indices=np.where(X!=X) mask = np.ones(len(X), dtype=bool) mask[np.union1d(inf_indices[0],nan_indices[0])] = False X_mod=X[mask,:] y_mod=y[mask] return X_mod,y_mod def read_data(input_type,inpu...
true
true
1c2331cf2fa7832a9efe97a739fe0c371c250c46
16,414
py
Python
disbi/join.py
DISBi/django-disbi
b63d9cb87daa3396d7bbca20268e89bf91cb0395
[ "MIT" ]
3
2016-10-29T16:26:00.000Z
2018-07-22T23:34:50.000Z
disbi/join.py
DISBi/django-disbi
b63d9cb87daa3396d7bbca20268e89bf91cb0395
[ "MIT" ]
null
null
null
disbi/join.py
DISBi/django-disbi
b63d9cb87daa3396d7bbca20268e89bf91cb0395
[ "MIT" ]
null
null
null
""" Contains the class Relations that stores relations between models and joins them together appropriately. """ # standard library from collections import deque from itertools import product # Django from django.apps import apps from django.conf import settings from django.db import connection, models # DISBi from d...
37.304545
148
0.561411
from collections import deque from itertools import product from django.apps import apps from django.conf import settings from django.db import connection, models from disbi.db_utils import (exec_query, get_field_query_name, get_fk_query_name, get_m2m_field, ...
true
true
1c2332c2fd7d4f00b8584c68ead13d61f5637ede
11,412
py
Python
Tests/test_samtools_tool.py
bioinf-mcb/biopython
1a1f4a7ee4e0efba517d3d607c56c27e72e399cc
[ "BSD-3-Clause" ]
1
2020-01-21T02:04:08.000Z
2020-01-21T02:04:08.000Z
Tests/test_samtools_tool.py
bioinf-mcb/biopython
1a1f4a7ee4e0efba517d3d607c56c27e72e399cc
[ "BSD-3-Clause" ]
null
null
null
Tests/test_samtools_tool.py
bioinf-mcb/biopython
1a1f4a7ee4e0efba517d3d607c56c27e72e399cc
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2014 by Saket Choudhary. Based on test_Clustalw_tool.py by Peter # Cock . # # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. # Last Checked with samtools [0.1.18 (r982:295)] """Tests for...
44.061776
108
0.612513
from Bio import MissingExternalDependencyError import sys import os import unittest from Bio.Application import ApplicationError from Bio.Sequencing.Applications import SamtoolsViewCommandline from Bio.Sequencing.Applications import SamtoolsCalmdCommandline from Bio.Sequencing.Applications import SamtoolsCat...
true
true
1c2332cb71b89c6efb6b5703bd97dd848d5e231f
10,974
py
Python
pipenv/patched/notpip/_vendor/urllib3/contrib/appengine.py
illgitthat/pipenv
02fc63964052720a6804165d68f6075841627e09
[ "MIT" ]
3
2020-02-16T07:04:50.000Z
2020-02-21T12:45:30.000Z
pipenv/patched/notpip/_vendor/urllib3/contrib/appengine.py
whisperbb/pipenv
bfbe1304f63372a0eb7c1531590b51195db453ea
[ "MIT" ]
23
2020-06-12T08:20:51.000Z
2021-06-25T15:38:50.000Z
pipenv/patched/notpip/_vendor/urllib3/contrib/appengine.py
whisperbb/pipenv
bfbe1304f63372a0eb7c1531590b51195db453ea
[ "MIT" ]
1
2020-12-04T17:49:26.000Z
2020-12-04T17:49:26.000Z
""" This module provides a pool manager that uses Google App Engine's `URLFetch Service <https://cloud.google.com/appengine/docs/python/urlfetch>`_. Example usage:: from pipenv.patched.notpip._vendor.urllib3 import PoolManager from pipenv.patched.notpip._vendor.urllib3.contrib.appengine import AppEngineManage...
37.841379
110
0.650355
from __future__ import absolute_import import io import logging import warnings from ..packages.six.moves.urllib.parse import urljoin from ..exceptions import ( HTTPError, HTTPWarning, MaxRetryError, ProtocolError, TimeoutError, SSLError ) from ..request import RequestMethods from ..response ...
true
true
1c2332cda54dc2d9e1ed665e482aa94bd6f385d4
696
py
Python
setup.py
matthieucan/gitcaca
bee443ddc81b24e1f43ffd75eda9dba4a3f584c1
[ "WTFPL" ]
1
2019-06-18T21:05:31.000Z
2019-06-18T21:05:31.000Z
setup.py
matthieucan/gitcaca
bee443ddc81b24e1f43ffd75eda9dba4a3f584c1
[ "WTFPL" ]
null
null
null
setup.py
matthieucan/gitcaca
bee443ddc81b24e1f43ffd75eda9dba4a3f584c1
[ "WTFPL" ]
null
null
null
#!/usr/bin/env python from setuptools import setup, find_packages description = 'git, libcaca and gravatar smooth integration' with open('README.md') as f: long_description = f.read() setup( name='gitcaca', version='0.1', packages=find_packages(), install_requires=['requests'], scripts=['gitc...
29
65
0.696839
from setuptools import setup, find_packages description = 'git, libcaca and gravatar smooth integration' with open('README.md') as f: long_description = f.read() setup( name='gitcaca', version='0.1', packages=find_packages(), install_requires=['requests'], scripts=['gitcaca/gitcaca-fetch', '...
true
true
1c2333051a3a973ed1539cfbbaa7073897ffcb5b
1,002
py
Python
kubernetes_asyncio/test/test_v1_iscsi_volume_source.py
aK0nshin/kubernetes_asyncio
aef9edcc1f8671a5b1bba9f4684bde890176b19c
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/test/test_v1_iscsi_volume_source.py
aK0nshin/kubernetes_asyncio
aef9edcc1f8671a5b1bba9f4684bde890176b19c
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/test/test_v1_iscsi_volume_source.py
aK0nshin/kubernetes_asyncio
aef9edcc1f8671a5b1bba9f4684bde890176b19c
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 OpenAPI spec version: v1.14.7 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import unittest import kube...
25.05
124
0.735529
from __future__ import absolute_import import unittest import kubernetes_asyncio.client from kubernetes_asyncio.client.models.v1_iscsi_volume_source import V1ISCSIVolumeSource from kubernetes_asyncio.client.rest import ApiException class TestV1ISCSIVolumeSource(unittest.TestCase): def setUp(self): ...
true
true
1c2333c6a75cbc17c59c3d85d16e9d9237efdc8e
487
bzl
Python
tensorflow/lite/special_rules.bzl
lambdabaa/tensorflow
b7e7addbd06c3ba414565f1cd50d734a45f6e12d
[ "Apache-2.0" ]
26
2019-11-10T15:33:34.000Z
2022-03-24T19:56:57.000Z
tensorflow/lite/special_rules.bzl
lambdabaa/tensorflow
b7e7addbd06c3ba414565f1cd50d734a45f6e12d
[ "Apache-2.0" ]
1
2019-08-15T02:49:21.000Z
2019-09-04T10:10:59.000Z
tensorflow/lite/special_rules.bzl
lambdabaa/tensorflow
b7e7addbd06c3ba414565f1cd50d734a45f6e12d
[ "Apache-2.0" ]
6
2020-03-29T11:10:53.000Z
2021-06-14T05:39:14.000Z
"""External versions of build rules that differ outside of Google.""" def tflite_portable_test_suite(**kwargs): """This is a no-op outside of Google.""" _ignore = [kwargs] pass def tflite_ios_per_kernel_test(**kwargs): """This is a no-op outside of Google.""" _ignore = [kwargs] pass def ios_v...
24.35
69
0.663244
def tflite_portable_test_suite(**kwargs): _ignore = [kwargs] pass def tflite_ios_per_kernel_test(**kwargs): _ignore = [kwargs] pass def ios_visibility_whitelist(): pass def tflite_extra_gles_deps(): return []
true
true
1c2333cca872dc3af16714889ca383bee85bc6c2
1,901
py
Python
consensus/apps/school/migrations/0002_auto_20190303_1124.py
sam212kh/Application-consensus-1
0e8e65cc57867048beaf61f622bf695e3cedff99
[ "MIT" ]
null
null
null
consensus/apps/school/migrations/0002_auto_20190303_1124.py
sam212kh/Application-consensus-1
0e8e65cc57867048beaf61f622bf695e3cedff99
[ "MIT" ]
null
null
null
consensus/apps/school/migrations/0002_auto_20190303_1124.py
sam212kh/Application-consensus-1
0e8e65cc57867048beaf61f622bf695e3cedff99
[ "MIT" ]
null
null
null
# Generated by Django 2.0.8 on 2019-03-03 11:24 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('school', '0001_initial')...
33.946429
140
0.612309
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('school', '0001_initial'), ] operations = [ migrations....
true
true
1c23342de92f5fd1223af11725dc3fe1e19b5526
325
py
Python
nostradamus/gunicorn-conf.py
exactpro/nostradamus
80df847a012374ad2b702cc9f9c9cb46c1153ee7
[ "Apache-2.0" ]
25
2019-12-18T05:32:41.000Z
2022-03-23T12:16:49.000Z
nostradamus/gunicorn-conf.py
Exactpro/nostradamus
80df847a012374ad2b702cc9f9c9cb46c1153ee7
[ "Apache-2.0" ]
12
2018-12-24T14:56:50.000Z
2019-11-29T16:53:49.000Z
nostradamus/gunicorn-conf.py
exactpro/nostradamus
80df847a012374ad2b702cc9f9c9cb46c1153ee7
[ "Apache-2.0" ]
7
2019-12-18T05:32:43.000Z
2021-08-18T05:27:04.000Z
import multiprocessing # gunicorn workers configuration workers = multiprocessing.cpu_count() * 2 + 1 max_requests = 2 timeout = 86400 preload_app = True keepalive = 200 enable_stdio_inheritance = True bind = "0.0.0.0:8000" worker_class = "uvicorn.workers.UvicornH11Worker" accesslog = "-" errorlog = "-" loglevel = "de...
21.666667
49
0.756923
import multiprocessing workers = multiprocessing.cpu_count() * 2 + 1 max_requests = 2 timeout = 86400 preload_app = True keepalive = 200 enable_stdio_inheritance = True bind = "0.0.0.0:8000" worker_class = "uvicorn.workers.UvicornH11Worker" accesslog = "-" errorlog = "-" loglevel = "debug"
true
true