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
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f73588a79f039b8db733da153b11843e379f5638
38,694
py
Python
test/functional/test_framework/messages.py
POPChainFoundation/Popchain
4106c0eab2fe437ae8d12e9f8697e1b6a5bebeaa
[ "MIT" ]
1
2019-05-13T01:58:35.000Z
2019-05-13T01:58:35.000Z
test/functional/test_framework/messages.py
POPCHAINFoundation/POPCHAIN
4106c0eab2fe437ae8d12e9f8697e1b6a5bebeaa
[ "MIT" ]
null
null
null
test/functional/test_framework/messages.py
POPCHAINFoundation/POPCHAIN
4106c0eab2fe437ae8d12e9f8697e1b6a5bebeaa
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2010 ArtForz -- public domain half-a-node # Copyright (c) 2012 Jeff Garzik # Copyright (c) 2010-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Bitcoin test...
29.447489
262
0.596527
from codecs import encode import copy import hashlib from io import BytesIO import random import socket import struct import time from test_framework.siphash import siphash256 from test_framework.util import hex_str_to_bytes, bytes_to_hex_str MIN_VERSION_SUPPORTED = 60001 MY_VERSION = 70914 MY_SUBVERSION = b"/python...
true
true
f7358b894c9e2d136a400ac7dfc5cf2f4426b4be
32,488
py
Python
benchmarks/analysisScripts/VivadoGraphUtil.py
magic3007/AMF-Placer
b6fbc10c37c3259c2b4f99ce0bb03c9d96bc29bd
[ "Apache-2.0" ]
37
2021-09-25T04:31:27.000Z
2022-03-24T13:46:52.000Z
benchmarks/analysisScripts/VivadoGraphUtil.py
magic3007/AMF-Placer
b6fbc10c37c3259c2b4f99ce0bb03c9d96bc29bd
[ "Apache-2.0" ]
5
2021-11-01T13:27:46.000Z
2022-03-10T07:52:51.000Z
benchmarks/analysisScripts/VivadoGraphUtil.py
magic3007/AMF-Placer
b6fbc10c37c3259c2b4f99ce0bb03c9d96bc29bd
[ "Apache-2.0" ]
7
2021-09-26T07:34:09.000Z
2022-02-15T08:06:20.000Z
import networkx as nx class VivadoCell(object): def __init__(self, id, name, refType, pins, netStr, drivepinStr): self.id = id self.name = name self.refType = refType self.pins = pins self.netStr = netStr self.drivepinStr = drivepinStr self.drivepins_fromOth...
39.523114
151
0.566886
import networkx as nx class VivadoCell(object): def __init__(self, id, name, refType, pins, netStr, drivepinStr): self.id = id self.name = name self.refType = refType self.pins = pins self.netStr = netStr self.drivepinStr = drivepinStr self.drivepins_fromOth...
true
true
f7358caf50482925da5a23ef389374bc85f3fa4f
623
py
Python
streetteam/apps/twilio_integration/tests/factories.py
alysivji/street-team
fe891d738b449956d56fe5e53535b98fa04d9a3a
[ "MIT" ]
2
2020-01-22T17:49:10.000Z
2021-06-18T19:35:23.000Z
streetteam/apps/twilio_integration/tests/factories.py
alysivji/street-team
fe891d738b449956d56fe5e53535b98fa04d9a3a
[ "MIT" ]
41
2019-11-08T18:28:16.000Z
2022-03-12T00:28:51.000Z
streetteam/apps/twilio_integration/tests/factories.py
alysivji/street-team
fe891d738b449956d56fe5e53535b98fa04d9a3a
[ "MIT" ]
null
null
null
from faker_e164.providers import E164Provider import factory from apps.twilio_integration.models import PhoneNumber, ReceivedMessage from apps.users.tests.factories import UserFactory faker = factory.Faker._get_faker() faker.add_provider(E164Provider) class PhoneNumberFactory(factory.DjangoModelFactory): class ...
25.958333
71
0.788122
from faker_e164.providers import E164Provider import factory from apps.twilio_integration.models import PhoneNumber, ReceivedMessage from apps.users.tests.factories import UserFactory faker = factory.Faker._get_faker() faker.add_provider(E164Provider) class PhoneNumberFactory(factory.DjangoModelFactory): class ...
true
true
f7358de2b3a85d446fdedfc665ba390ed788f26b
9,066
py
Python
themes/qutebrowser/themes/minimal/base16-black-metal-burzum.config.py
base16-fork/base16-fork
79856b7e6195dde0874a9e6d191101ac6c5c74f5
[ "MIT" ]
95
2018-05-28T18:06:48.000Z
2022-03-14T21:36:05.000Z
themes/qutebrowser/themes/minimal/base16-black-metal-burzum.config.py
base16-fork/base16-fork
79856b7e6195dde0874a9e6d191101ac6c5c74f5
[ "MIT" ]
18
2018-08-26T00:57:20.000Z
2022-02-19T08:29:29.000Z
themes/qutebrowser/themes/minimal/base16-black-metal-burzum.config.py
base16-fork/base16-fork
79856b7e6195dde0874a9e6d191101ac6c5c74f5
[ "MIT" ]
20
2018-06-21T12:41:47.000Z
2022-03-04T22:06:20.000Z
# base16-qutebrowser (https://github.com/theova/base16-qutebrowser) # Base16 qutebrowser template by theova and Daniel Mulford # Black Metal (Burzum) scheme by metalelf0 (https://github.com/metalelf0) base00 = "#000000" base01 = "#121212" base02 = "#222222" base03 = "#333333" base04 = "#999999" base05 = "#c1c1c1" base...
30.119601
95
0.771785
base00 = "#000000" base01 = "#121212" base02 = "#222222" base03 = "#333333" base04 = "#999999" base05 = "#c1c1c1" base06 = "#999999" base07 = "#c1c1c1" base08 = "#5f8787" base09 = "#aaaaaa" base0A = "#99bbaa" base0B = "#ddeecc" base0C = "#aaaaaa" base0D = "#888888" base0E = "#999999" base0F = "#444444" c.colors.comp...
true
true
f7358e33875f1666cf2ed6367496e9ffeb2ca861
243
py
Python
bootcamp/__init__.py
jmelloy/bootcamp
3710324efd4dbc54bb37df13ee589ef8a71c6401
[ "MIT" ]
null
null
null
bootcamp/__init__.py
jmelloy/bootcamp
3710324efd4dbc54bb37df13ee589ef8a71c6401
[ "MIT" ]
null
null
null
bootcamp/__init__.py
jmelloy/bootcamp
3710324efd4dbc54bb37df13ee589ef8a71c6401
[ "MIT" ]
null
null
null
__version__ = "2.1.1" __version_info__ = tuple( [ int(num) if num.isdigit() else num for num in __version__.replace("-", ".", 1).split(".") ] ) import os PHOTOLOGUE_APP_DIR = os.path.dirname(os.path.abspath(__file__))
22.090909
63
0.625514
__version__ = "2.1.1" __version_info__ = tuple( [ int(num) if num.isdigit() else num for num in __version__.replace("-", ".", 1).split(".") ] ) import os PHOTOLOGUE_APP_DIR = os.path.dirname(os.path.abspath(__file__))
true
true
f7358e70170d77fd5aaed0097cbc37b6df6184c7
2,647
py
Python
tests/core/test_configuration.py
sirjamesmeddel-gitty/intuition
cd517e6b3b315a743eb4d0d0dc294e264ab913ce
[ "Apache-2.0" ]
81
2015-01-13T15:16:43.000Z
2021-11-12T20:51:56.000Z
tests/core/test_configuration.py
sirjamesmeddel-gitty/intuition
cd517e6b3b315a743eb4d0d0dc294e264ab913ce
[ "Apache-2.0" ]
1
2015-07-30T06:17:55.000Z
2015-07-30T08:09:14.000Z
tests/core/test_configuration.py
sirjamesmeddel-gitty/intuition
cd517e6b3b315a743eb4d0d0dc294e264ab913ce
[ "Apache-2.0" ]
30
2015-03-26T11:55:46.000Z
2021-07-22T22:16:39.000Z
''' Tests for intuition.core.configuration ''' import unittest from nose.tools import raises import dna.test_utils as test_utils import pandas as pd import intuition.core.configuration as configuration from dna.errors import DynamicImportFailed from intuition.errors import InvalidConfiguration class ConfigurationUti...
33.506329
76
0.661504
import unittest from nose.tools import raises import dna.test_utils as test_utils import pandas as pd import intuition.core.configuration as configuration from dna.errors import DynamicImportFailed from intuition.errors import InvalidConfiguration class ConfigurationUtilsTestCase(unittest.TestCase): def test_lo...
true
true
f7358ed7f0d201bb0afca8493fb1a699d5fdbefa
1,892
py
Python
pyheatmap/inc/cf.py
feixuexue731/pyheatmap
5dcd774113e3fe65c5e891c8c686f991310f4835
[ "MIT" ]
90
2015-02-25T09:09:45.000Z
2022-03-22T06:12:41.000Z
pyheatmap/inc/cf.py
feixuexue731/pyheatmap
5dcd774113e3fe65c5e891c8c686f991310f4835
[ "MIT" ]
8
2016-01-17T12:30:45.000Z
2021-02-20T02:19:42.000Z
pyheatmap/inc/cf.py
feixuexue731/pyheatmap
5dcd774113e3fe65c5e891c8c686f991310f4835
[ "MIT" ]
45
2015-09-07T03:13:38.000Z
2021-09-08T09:32:04.000Z
# -*- coding: utf-8 -*- # # author: oldj # blog: http://oldj.net # email: oldj.wu@gmail.com # def get_max_size(data): max_w = 0 max_h = 0 for hit in data: w = hit[0] h = hit[1] if w > max_w: max_w = w if h > max_h: max_h = h return max_w + 1, m...
18.732673
72
0.415433
def get_max_size(data): max_w = 0 max_h = 0 for hit in data: w = hit[0] h = hit[1] if w > max_w: max_w = w if h > max_h: max_h = h return max_w + 1, max_h + 1 def mk_circle(r, w): __tmp = {} def c8(ix, iy, v=1): ...
true
true
f7358f102d8b55267e43a51cd253bac4d62bfe84
11,512
py
Python
aiodocker/images.py
truenas/aiodocker
8edefe73832d62d70fa11a4846594bc74ae12244
[ "Apache-2.0" ]
330
2017-04-12T19:36:03.000Z
2022-03-29T09:24:53.000Z
aiodocker/images.py
truenas/aiodocker
8edefe73832d62d70fa11a4846594bc74ae12244
[ "Apache-2.0" ]
623
2017-04-13T02:49:16.000Z
2022-03-29T12:21:48.000Z
aiodocker/images.py
truenas/aiodocker
8edefe73832d62d70fa11a4846594bc74ae12244
[ "Apache-2.0" ]
76
2017-04-22T08:00:18.000Z
2021-11-23T04:34:06.000Z
import io import json import warnings from typing import ( Any, AsyncIterator, BinaryIO, Dict, List, Mapping, MutableMapping, Optional, Union, overload, ) from typing_extensions import Literal from .jsonstream import json_stream_list, json_stream_stream from .utils import clean...
28.997481
88
0.54491
import io import json import warnings from typing import ( Any, AsyncIterator, BinaryIO, Dict, List, Mapping, MutableMapping, Optional, Union, overload, ) from typing_extensions import Literal from .jsonstream import json_stream_list, json_stream_stream from .utils import clean...
true
true
f7358f1fc61f6b30105dd15fc7f8b44549bc1982
258
py
Python
blob_upload/file_helpers.py
benchling/integration-examples
450dc8b712cca9d037f65fd97b2f41ba2010cdc9
[ "MIT" ]
22
2019-08-01T13:30:34.000Z
2021-07-05T18:39:48.000Z
blob_upload/file_helpers.py
benchling/integration-examples
450dc8b712cca9d037f65fd97b2f41ba2010cdc9
[ "MIT" ]
6
2020-12-11T20:23:18.000Z
2021-07-14T14:46:09.000Z
blob_upload/file_helpers.py
benchling/integration-examples
450dc8b712cca9d037f65fd97b2f41ba2010cdc9
[ "MIT" ]
10
2019-10-24T20:13:04.000Z
2022-03-07T23:48:53.000Z
import base64 import hashlib def encode_base64(input: bytes, charset: str = "utf-8") -> str: file_bytes = base64.encodebytes(input) return str(file_bytes, charset) def calculate_md5(input: bytes) -> str: return hashlib.md5(input).hexdigest()
21.5
63
0.717054
import base64 import hashlib def encode_base64(input: bytes, charset: str = "utf-8") -> str: file_bytes = base64.encodebytes(input) return str(file_bytes, charset) def calculate_md5(input: bytes) -> str: return hashlib.md5(input).hexdigest()
true
true
f7359067e433351f05d256c61799cc63ae1d5082
838
py
Python
src/hydratk/translation/lib/network/rpc/client/en/messages.py
hydratk/hydratk-lib-network
79b698998bac9a04b5a345e5d3212c87b5564af3
[ "BSD-3-Clause" ]
null
null
null
src/hydratk/translation/lib/network/rpc/client/en/messages.py
hydratk/hydratk-lib-network
79b698998bac9a04b5a345e5d3212c87b5564af3
[ "BSD-3-Clause" ]
null
null
null
src/hydratk/translation/lib/network/rpc/client/en/messages.py
hydratk/hydratk-lib-network
79b698998bac9a04b5a345e5d3212c87b5564af3
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """This code is a part of Hydra Toolkit .. module:: hydratk.translation.lib.network.rpc.client.en.messages :platform: Unix :synopsis: English language translation for RPC client messages .. moduleauthor:: Petr Rašek <bowman@hydratk.org> """ language = { 'name': 'English', 'ISO-...
27.933333
83
0.663484
language = { 'name': 'English', 'ISO-639-1': 'en' } from hydratk.core import const HIGHLIGHT_START = chr(27) + chr(91) + "1m" HIGHLIGHT_US = chr(27) + chr(91) + "4m" HIGHLIGHT_END = chr(27) + chr(91) + "0m" msg = { 'htk_rpc_init_proxy': ["Initializing proxy remote object on URL: '{0}'"], 'htk_rpc_p...
true
true
f735914711797365715ac1d0348526c100afbf54
3,760
py
Python
models/PS_FCN_run.py
rkripa/PS-FCN
eb8ddbd60964830c06432a734a2cf6dce34f70f0
[ "MIT" ]
null
null
null
models/PS_FCN_run.py
rkripa/PS-FCN
eb8ddbd60964830c06432a734a2cf6dce34f70f0
[ "MIT" ]
null
null
null
models/PS_FCN_run.py
rkripa/PS-FCN
eb8ddbd60964830c06432a734a2cf6dce34f70f0
[ "MIT" ]
null
null
null
import torch import torch.nn as nn from torch.nn.init import kaiming_normal_ from models import model_utils class FeatExtractor(nn.Module): def __init__(self, batchNorm=False, c_in=3, other={}): super(FeatExtractor, self).__init__() self.other = other self.conv1 = model_utils.conv(batchNorm...
40
98
0.573404
import torch import torch.nn as nn from torch.nn.init import kaiming_normal_ from models import model_utils class FeatExtractor(nn.Module): def __init__(self, batchNorm=False, c_in=3, other={}): super(FeatExtractor, self).__init__() self.other = other self.conv1 = model_utils.conv(batchNorm...
true
true
f7359199ff6a7aec6e7054079162b69f2e952aac
5,964
py
Python
schema_salad/codegen.py
common-workflow-language/schema_salad
4f7023a177e0fc575812ef5e6b997b575617d826
[ "Apache-2.0" ]
58
2015-09-08T03:06:59.000Z
2022-01-26T21:04:54.000Z
schema_salad/codegen.py
common-workflow-language/schema_salad
4f7023a177e0fc575812ef5e6b997b575617d826
[ "Apache-2.0" ]
396
2015-08-25T20:22:49.000Z
2022-03-25T07:32:04.000Z
schema_salad/codegen.py
common-workflow-language/schema_salad
4f7023a177e0fc575812ef5e6b997b575617d826
[ "Apache-2.0" ]
59
2015-12-02T16:22:00.000Z
2022-02-13T19:16:24.000Z
"""Generate langauge specific loaders for a particular SALAD schema.""" import sys from io import TextIOWrapper from typing import ( Any, Dict, List, MutableMapping, MutableSequence, Optional, TextIO, Union, ) from . import schema from .codegen_base import CodeGenBase from .exceptions i...
34.275862
87
0.499497
import sys from io import TextIOWrapper from typing import ( Any, Dict, List, MutableMapping, MutableSequence, Optional, TextIO, Union, ) from . import schema from .codegen_base import CodeGenBase from .exceptions import SchemaSaladException from .java_codegen import JavaCodeGen from .p...
true
true
f73593201aaa44d50a228f9e03517ab39c039014
487
py
Python
mepo.d/utilities/shellcmd.py
GEOS-ESM/mepo
41c20c286e7a9a11995f48fb5f3036e469d935e6
[ "NASA-1.3", "ECL-2.0", "Apache-2.0" ]
null
null
null
mepo.d/utilities/shellcmd.py
GEOS-ESM/mepo
41c20c286e7a9a11995f48fb5f3036e469d935e6
[ "NASA-1.3", "ECL-2.0", "Apache-2.0" ]
61
2020-01-08T20:01:16.000Z
2022-03-24T19:44:38.000Z
mepo.d/utilities/shellcmd.py
GEOS-ESM/mepo
41c20c286e7a9a11995f48fb5f3036e469d935e6
[ "NASA-1.3", "ECL-2.0", "Apache-2.0" ]
2
2020-02-28T14:29:12.000Z
2020-07-08T15:56:55.000Z
import subprocess as sp def run(cmd, output=None, stdout=None, status=None): result = sp.run( cmd, stdout = sp.PIPE, stderr = sp.PIPE, universal_newlines = True # result byte sequence -> string ) if status: return result.returncode elif result.returncode != 0: ...
23.190476
66
0.609856
import subprocess as sp def run(cmd, output=None, stdout=None, status=None): result = sp.run( cmd, stdout = sp.PIPE, stderr = sp.PIPE, universal_newlines = True ) if status: return result.returncode elif result.returncode != 0: print(result.stderr) ...
true
true
f735937b46eaaf17127373cb48ab6ef736904d0a
752
py
Python
ExploreDjango/mytestsite/mytestsite/urls.py
Devenc234/RecommenderSystem
dc64bdc132489c681aa672eb1baa1754c3ba5446
[ "MIT" ]
null
null
null
ExploreDjango/mytestsite/mytestsite/urls.py
Devenc234/RecommenderSystem
dc64bdc132489c681aa672eb1baa1754c3ba5446
[ "MIT" ]
null
null
null
ExploreDjango/mytestsite/mytestsite/urls.py
Devenc234/RecommenderSystem
dc64bdc132489c681aa672eb1baa1754c3ba5446
[ "MIT" ]
null
null
null
"""mytestsite URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-ba...
34.181818
77
0.710106
from django.contrib import admin from django.urls import path urlpatterns = [ path('admin/', admin.site.urls), ]
true
true
f7359403d676c6fc69eb4c7737770aa0243ffaac
27,648
py
Python
testflows/_core/contrib/pygments/lexers/basic.py
testflows/TestFlows-Core
0aa17247dffd2f7199465031ab16cc4f12c9cfb0
[ "Apache-2.0" ]
3
2020-06-25T19:23:19.000Z
2021-10-20T19:29:56.000Z
testflows/_core/contrib/pygments/lexers/basic.py
testflows/TestFlows-Core
0aa17247dffd2f7199465031ab16cc4f12c9cfb0
[ "Apache-2.0" ]
null
null
null
testflows/_core/contrib/pygments/lexers/basic.py
testflows/TestFlows-Core
0aa17247dffd2f7199465031ab16cc4f12c9cfb0
[ "Apache-2.0" ]
1
2020-02-24T12:31:45.000Z
2020-02-24T12:31:45.000Z
# -*- coding: utf-8 -*- """ pygments.lexers.basic ~~~~~~~~~~~~~~~~~~~~~ Lexers for BASIC like languages (other than VB.net). :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from testflows._core.contrib.pygments.lexer import...
41.890909
110
0.458731
import re from testflows._core.contrib.pygments.lexer import RegexLexer, bygroups, default, words, include from testflows._core.contrib.pygments.token import Comment, Error, Keyword, Name, Number, \ Punctuation, Operator, String, Text, Whitespace from testflows._core.contrib.pygments.lexers import _vbscript_built...
true
true
f7359464763e4b55530c6e96bb22acbd33f087a1
375
py
Python
onnx_tf/handlers/frontend/reduce_sum.py
jsigee87/onnx-tensorflow
90a58bed24a18f5260ebe9f22bf4997f9d591f62
[ "Apache-2.0" ]
18
2020-02-03T07:14:40.000Z
2021-12-20T18:45:43.000Z
onnx_tf/handlers/frontend/reduce_sum.py
jsigee87/onnx-tensorflow
90a58bed24a18f5260ebe9f22bf4997f9d591f62
[ "Apache-2.0" ]
11
2020-01-28T23:16:25.000Z
2022-02-10T01:04:56.000Z
onnx_tf/handlers/frontend/reduce_sum.py
jsigee87/onnx-tensorflow
90a58bed24a18f5260ebe9f22bf4997f9d591f62
[ "Apache-2.0" ]
2
2020-08-20T08:15:09.000Z
2021-02-23T07:30:40.000Z
from onnx_tf.handlers.frontend_handler import FrontendHandler from onnx_tf.handlers.handler import onnx_op from onnx_tf.handlers.handler import tf_op from .math_mixin import ReductionMixin @onnx_op("ReduceSum") @tf_op("Sum") class ReduceSum(ReductionMixin, FrontendHandler): @classmethod def version_1(cls, node, ...
26.785714
61
0.8
from onnx_tf.handlers.frontend_handler import FrontendHandler from onnx_tf.handlers.handler import onnx_op from onnx_tf.handlers.handler import tf_op from .math_mixin import ReductionMixin @onnx_op("ReduceSum") @tf_op("Sum") class ReduceSum(ReductionMixin, FrontendHandler): @classmethod def version_1(cls, node, ...
true
true
f735949721e939de43ac48ed4c1dba57e72e9aed
3,674
py
Python
tests/test_words_grammar.py
piller-imre/exprail-python
1b73a0993d399ef44ada232647845a253b821ecc
[ "MIT" ]
null
null
null
tests/test_words_grammar.py
piller-imre/exprail-python
1b73a0993d399ef44ada232647845a253b821ecc
[ "MIT" ]
null
null
null
tests/test_words_grammar.py
piller-imre/exprail-python
1b73a0993d399ef44ada232647845a253b821ecc
[ "MIT" ]
null
null
null
import unittest from exprail.classifier import Classifier from exprail.grammar import Grammar from exprail.parser import Parser from exprail.source import SourceString class WsClassifier(Classifier): """Classify alphabetic characters and whitespaces""" @staticmethod def is_in_class(token_class, token): ...
34.336449
86
0.629831
import unittest from exprail.classifier import Classifier from exprail.grammar import Grammar from exprail.parser import Parser from exprail.source import SourceString class WsClassifier(Classifier): @staticmethod def is_in_class(token_class, token): if token.type == 'empty': return Fals...
true
true
f73594c6ed5d49a981b35e06fa1e6b1b78ca49b5
15,405
py
Python
SurfaceTopography/Uniform/Filtering.py
ComputationalMechanics/SurfaceTopography
6751be427c89d526ef4857300409596c79119029
[ "MIT" ]
5
2020-06-03T20:01:36.000Z
2021-03-03T09:25:03.000Z
SurfaceTopography/Uniform/Filtering.py
ComputationalMechanics/SurfaceTopography
6751be427c89d526ef4857300409596c79119029
[ "MIT" ]
44
2020-06-02T12:25:15.000Z
2021-03-17T15:18:51.000Z
SurfaceTopography/Uniform/Filtering.py
ComputationalMechanics/SurfaceTopography
6751be427c89d526ef4857300409596c79119029
[ "MIT" ]
1
2021-03-08T13:15:18.000Z
2021-03-08T13:15:18.000Z
# # Copyright 2020-2021 Lars Pastewka # 2020-2021 Antoine Sanner # # ### MIT license # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitat...
35.909091
94
0.6037
import numpy as np from scipy.signal import get_window from ..FFTTricks import get_window_2D from ..HeightContainer import UniformTopographyInterface from ..UniformLineScanAndTopography import DecoratedUniformTopography class WindowedUniformTopography(DecoratedUniformTopography): name = 'windowed_topography' ...
true
true
f73596d35f54a80081eb51834b2498b60a9102ed
8,322
py
Python
Python/libraries/recognizers-date-time/recognizers_date_time/date_time/french/holiday_parser_config.py
ahmedabuamra/Recognizers-Text
31193d89d3532839742992a2755c1d8539c68116
[ "MIT" ]
10
2019-05-11T18:07:14.000Z
2021-08-20T03:02:47.000Z
Python/libraries/recognizers-date-time/recognizers_date_time/date_time/french/holiday_parser_config.py
ahmedabuamra/Recognizers-Text
31193d89d3532839742992a2755c1d8539c68116
[ "MIT" ]
1
2020-07-10T08:25:36.000Z
2020-07-10T08:25:36.000Z
Python/libraries/recognizers-date-time/recognizers_date_time/date_time/french/holiday_parser_config.py
ahmedabuamra/Recognizers-Text
31193d89d3532839742992a2755c1d8539c68116
[ "MIT" ]
18
2019-08-19T12:11:00.000Z
2021-10-12T09:36:27.000Z
from typing import List, Dict, Callable from datetime import datetime from recognizers_text.utilities import RegExpUtility from ..utilities import DateUtils from ..base_holiday import BaseHolidayParserConfiguration from ...resources.french_date_time import FrenchDateTime class FrenchHolidayParserConfiguration(BaseHo...
36.340611
98
0.674718
from typing import List, Dict, Callable from datetime import datetime from recognizers_text.utilities import RegExpUtility from ..utilities import DateUtils from ..base_holiday import BaseHolidayParserConfiguration from ...resources.french_date_time import FrenchDateTime class FrenchHolidayParserConfiguration(BaseHo...
true
true
f73596d88c15690f02fa3a19c1a461cf4a7e91c2
2,282
py
Python
ros/src/twist_controller/twist_controller.py
aresgtr/CarND-Capstone
604e448972221e4770dbada9070c90717f2992ee
[ "MIT" ]
null
null
null
ros/src/twist_controller/twist_controller.py
aresgtr/CarND-Capstone
604e448972221e4770dbada9070c90717f2992ee
[ "MIT" ]
null
null
null
ros/src/twist_controller/twist_controller.py
aresgtr/CarND-Capstone
604e448972221e4770dbada9070c90717f2992ee
[ "MIT" ]
null
null
null
from pid import PID from lowpass import LowPassFilter from yaw_controller import YawController import rospy GAS_DENSITY = 2.858 ONE_MPH = 0.44704 class Controller(object): def __init__(self, vehicle_mass, fuel_capacity, brake_deadband, decel_limit, accel_limit, wheel_radius, wheel_base, steer_ra...
33.558824
109
0.643295
from pid import PID from lowpass import LowPassFilter from yaw_controller import YawController import rospy GAS_DENSITY = 2.858 ONE_MPH = 0.44704 class Controller(object): def __init__(self, vehicle_mass, fuel_capacity, brake_deadband, decel_limit, accel_limit, wheel_radius, wheel_base, steer_ra...
true
true
f73597b85ba8ca40d9733200858fd68397b530e6
3,280
py
Python
final_plots/read_aws.py
georgetown-analytics/DC-Bikeshare
9f5a6a3256cff15a29f0dca6e9a9d8098ab2df28
[ "MIT" ]
11
2018-07-01T16:43:05.000Z
2020-07-17T19:08:16.000Z
final_plots/read_aws.py
noahnewberger/Bikeshare-DC
42676654d103cdaddfb76db76d1eece533251261
[ "MIT" ]
5
2021-02-08T20:21:12.000Z
2021-12-13T19:47:04.000Z
final_plots/read_aws.py
noahnewberger/Bikeshare-DC
42676654d103cdaddfb76db76d1eece533251261
[ "MIT" ]
5
2018-10-05T19:54:20.000Z
2020-10-27T11:54:09.000Z
import psycopg2 import psycopg2.extras import pandas as pd import os import time from pathlib import Path from dotenv import load_dotenv def read_only_connect_aws(): env_path = 'env_readonly.env' load_dotenv(dotenv_path=env_path) host = "bikeshare-restored.cs9te7lm3pt2.us-east-1.rds.amazonaws.com" por...
32.475248
79
0.603659
import psycopg2 import psycopg2.extras import pandas as pd import os import time from pathlib import Path from dotenv import load_dotenv def read_only_connect_aws(): env_path = 'env_readonly.env' load_dotenv(dotenv_path=env_path) host = "bikeshare-restored.cs9te7lm3pt2.us-east-1.rds.amazonaws.com" por...
true
true
f7359a48b1c8cf914b8fb141b4b2ed6ebf6ee390
4,053
py
Python
tests/unit/cli/errors_test.py
Teino1978-Corp/compose
05a5aae552be9de2ef99c30cc79bd7b0d8bfa62b
[ "Apache-2.0" ]
1
2021-05-04T17:15:12.000Z
2021-05-04T17:15:12.000Z
tests/unit/cli/errors_test.py
HamidOsouli/compose
52d2fcc27479ffe3301c332fb971296ab686255a
[ "Apache-2.0" ]
null
null
null
tests/unit/cli/errors_test.py
HamidOsouli/compose
52d2fcc27479ffe3301c332fb971296ab686255a
[ "Apache-2.0" ]
null
null
null
import pytest from docker.errors import APIError from requests.exceptions import ConnectionError from compose.cli import errors from compose.cli.errors import handle_connection_errors from compose.const import IS_WINDOWS_PLATFORM from tests import mock @pytest.yield_fixture def mock_logging(): with mock.patch('c...
42.21875
104
0.695781
import pytest from docker.errors import APIError from requests.exceptions import ConnectionError from compose.cli import errors from compose.cli.errors import handle_connection_errors from compose.const import IS_WINDOWS_PLATFORM from tests import mock @pytest.yield_fixture def mock_logging(): with mock.patch('c...
true
true
f7359b0dca3a0c1fc4f8174997e46c89022028eb
572
py
Python
base.py
tomas-barros/speed-test
a95da7a24147f1845bb400c4e9db80a60e1b2df7
[ "MIT" ]
null
null
null
base.py
tomas-barros/speed-test
a95da7a24147f1845bb400c4e9db80a60e1b2df7
[ "MIT" ]
null
null
null
base.py
tomas-barros/speed-test
a95da7a24147f1845bb400c4e9db80a60e1b2df7
[ "MIT" ]
null
null
null
from speedtest import Speedtest # debugmode debugmode = 0 st = Speedtest() # debug if debugmode: print(f'Download: {st.download()}') print(f'Upload: {st.upload()}') st.get_best_server([]) print(f'Ping: {st.results.ping}') # functons def get_upload_speed(): print('UPLOAD SPEED: Wait a few seconds...
21.185185
50
0.657343
from speedtest import Speedtest debugmode = 0 st = Speedtest() if debugmode: print(f'Download: {st.download()}') print(f'Upload: {st.upload()}') st.get_best_server([]) print(f'Ping: {st.results.ping}') def get_upload_speed(): print('UPLOAD SPEED: Wait a few seconds...') return int(st.upload(...
true
true
f7359e65f7dea51a3e8a2bef0ce59b92e89fc7c6
508
py
Python
pacote de dawload/projeto progamas em Python/Aula 19 Dicionarios parte 1.py
wagnersistemalima/Mundo-3-Python-Curso-em-Video
f78aef33e10a236f71850e05fdb9ae8ddbe155c3
[ "MIT" ]
1
2020-12-11T23:22:19.000Z
2020-12-11T23:22:19.000Z
pacote de dawload/projeto progamas em Python/Aula 19 Dicionarios parte 1.py
wagnersistemalima/Mundo-3-Python-Curso-em-Video
f78aef33e10a236f71850e05fdb9ae8ddbe155c3
[ "MIT" ]
null
null
null
pacote de dawload/projeto progamas em Python/Aula 19 Dicionarios parte 1.py
wagnersistemalima/Mundo-3-Python-Curso-em-Video
f78aef33e10a236f71850e05fdb9ae8ddbe155c3
[ "MIT" ]
null
null
null
# Aula 19 Dicionarios. É assim que tratamos os dicionarios pessoas = {'nome': 'Gustavo', 'sexo': 'M', 'idade': 22} print(pessoas['nome']) print(pessoas['idade']) print(pessoas['sexo']) print(f'{pessoas["nome"]} tem {pessoas["idade"]} anos') # Utilizar aspas duplas para a localização [" "] print(pessoas.keys()) ...
42.333333
105
0.608268
pessoas = {'nome': 'Gustavo', 'sexo': 'M', 'idade': 22} print(pessoas['nome']) print(pessoas['idade']) print(pessoas['sexo']) print(f'{pessoas["nome"]} tem {pessoas["idade"]} anos') print(pessoas.keys()) print(pessoas.values()) print(pessoas.items())
true
true
f7359e904faa026a802269f620739354e64f4bbc
62
py
Python
app/tests.py
nibinn/Rnd
e306b3da3af5e9da66d11436bc7abf3a77f50573
[ "MIT" ]
1
2022-03-30T15:28:33.000Z
2022-03-30T15:28:33.000Z
authentication/tests.py
piyushjain-pj/pneumonia_and_covid_prediction_tool
b5f503b1672b1093c4bd6f9e053d6024e4f73f9d
[ "MIT" ]
14
2020-06-05T18:37:13.000Z
2022-03-11T23:26:12.000Z
authentication/tests.py
piyushjain-pj/pneumonia_and_covid_prediction_tool
b5f503b1672b1093c4bd6f9e053d6024e4f73f9d
[ "MIT" ]
null
null
null
from django.test import TestCase # Create your tests here.
10.333333
32
0.758065
from django.test import TestCase
true
true
f735a0bd714d0c11768957bfb5be71284da6fc0b
4,802
py
Python
tests/test_features.py
aka863/python-geojson
9cda95ab0e226e01391325fede635983e6b7b207
[ "BSD-3-Clause" ]
null
null
null
tests/test_features.py
aka863/python-geojson
9cda95ab0e226e01391325fede635983e6b7b207
[ "BSD-3-Clause" ]
null
null
null
tests/test_features.py
aka863/python-geojson
9cda95ab0e226e01391325fede635983e6b7b207
[ "BSD-3-Clause" ]
null
null
null
try: from StringIO import StringIO except ImportError: from io import StringIO import unittest import geojson class FeaturesTest(unittest.TestCase): def test_protocol(self): """ A dictionary can satisfy the protocol """ f = { 'type': 'Feature', 'id'...
40.016667
76
0.466264
try: from StringIO import StringIO except ImportError: from io import StringIO import unittest import geojson class FeaturesTest(unittest.TestCase): def test_protocol(self): f = { 'type': 'Feature', 'id': '1', 'geometry': {'type': 'Point', 'coordinates': [53, -...
true
true
f735a0ee2e5e07217279bd25dd0d6ed4955441c8
872
py
Python
core/serializers/review.py
NTUSA/fudez-app
91c8d85238fb642488ef5616be441e4417f21d0a
[ "MIT" ]
2
2017-04-13T08:52:19.000Z
2018-05-07T12:14:34.000Z
core/serializers/review.py
NTUSA/fudez-app
91c8d85238fb642488ef5616be441e4417f21d0a
[ "MIT" ]
null
null
null
core/serializers/review.py
NTUSA/fudez-app
91c8d85238fb642488ef5616be441e4417f21d0a
[ "MIT" ]
1
2018-07-28T16:09:59.000Z
2018-07-28T16:09:59.000Z
from django.contrib.auth import get_user_model from rest_framework import serializers class Parent(object): def __init__(self, func): self.func = func def set_context(self, serializer_field): self.value = serializer_field.queryset.get( pk=self.func(serializer_field.context)) ...
29.066667
97
0.741972
from django.contrib.auth import get_user_model from rest_framework import serializers class Parent(object): def __init__(self, func): self.func = func def set_context(self, serializer_field): self.value = serializer_field.queryset.get( pk=self.func(serializer_field.context)) ...
true
true
f735a1f81d5ca9884293312b3c8981cc9b7d982b
3,437
py
Python
src/pix2pix/data/unaligned_dataset.py
Stannislav/pytorch-CycleGAN-and-pix2pix
c6a4927f5d2c49c278694ae7e9ac148b83a3f2d5
[ "BSD-3-Clause" ]
null
null
null
src/pix2pix/data/unaligned_dataset.py
Stannislav/pytorch-CycleGAN-and-pix2pix
c6a4927f5d2c49c278694ae7e9ac148b83a3f2d5
[ "BSD-3-Clause" ]
null
null
null
src/pix2pix/data/unaligned_dataset.py
Stannislav/pytorch-CycleGAN-and-pix2pix
c6a4927f5d2c49c278694ae7e9ac148b83a3f2d5
[ "BSD-3-Clause" ]
null
null
null
import os import random from PIL import Image from .base_dataset import BaseDataset, get_transform from .image_folder import make_dataset class UnalignedDataset(BaseDataset): """ This dataset class can load unaligned/unpaired datasets. It requires two directories to host training images from domain A '...
39.056818
104
0.620017
import os import random from PIL import Image from .base_dataset import BaseDataset, get_transform from .image_folder import make_dataset class UnalignedDataset(BaseDataset): def __init__(self, opt): BaseDataset.__init__(self, opt) self.dir_A = os.path.join( opt.dataroot, opt.phase ...
true
true
f735a217197b558e078812728fdb87b8c77d9e70
2,790
py
Python
airflow/npmjs_dags3/npmjs_static_61.py
Yanivmd/maloss
af85ac202668da88d0b4a885386a1e56703e37c8
[ "MIT" ]
1
2022-01-29T16:13:06.000Z
2022-01-29T16:13:06.000Z
airflow/npmjs_dags3/npmjs_static_61.py
Yanivmd/maloss
af85ac202668da88d0b4a885386a1e56703e37c8
[ "MIT" ]
null
null
null
airflow/npmjs_dags3/npmjs_static_61.py
Yanivmd/maloss
af85ac202668da88d0b4a885386a1e56703e37c8
[ "MIT" ]
1
2022-01-29T16:13:07.000Z
2022-01-29T16:13:07.000Z
import re import pickle import logging import networkx from airflow import DAG from airflow.operators.bash_operator import BashOperator from datetime import datetime, timedelta default_args = { 'owner': 'airflow', 'depends_on_past': False, 'start_date': datetime(2019, 1, 1), 'email': ['airflow@exampl...
34.875
175
0.699283
import re import pickle import logging import networkx from airflow import DAG from airflow.operators.bash_operator import BashOperator from datetime import datetime, timedelta default_args = { 'owner': 'airflow', 'depends_on_past': False, 'start_date': datetime(2019, 1, 1), 'email': ['airflow@exampl...
true
true
f735a259c097fe08e9820d06e460b7e690f1af8c
3,993
py
Python
Sandbox/qemu-sgx-master/scripts/tracetool/backend/__init__.py
Maxul/sgx_vmx_protocol
b18dcdd6cbbf10c7d609649295676f0163dd9a5e
[ "MIT" ]
8
2020-03-16T06:34:49.000Z
2021-12-06T01:50:54.000Z
Sandbox/qemu-sgx-master/scripts/tracetool/backend/__init__.py
Maxul/sgx_vmx_protocol
b18dcdd6cbbf10c7d609649295676f0163dd9a5e
[ "MIT" ]
3
2021-09-06T09:14:42.000Z
2022-03-27T08:09:54.000Z
Sandbox/qemu-sgx-master/scripts/tracetool/backend/__init__.py
Maxul/sgx_vmx_protocol
b18dcdd6cbbf10c7d609649295676f0163dd9a5e
[ "MIT" ]
1
2022-03-18T07:17:40.000Z
2022-03-18T07:17:40.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Backend management. Creating new backends --------------------- A new backend named 'foo-bar' corresponds to Python module 'tracetool/backend/foo_bar.py'. A backend module should provide a docstring, whose first non-empty line will be considered its short descripti...
32.201613
79
0.547959
__author__ = "Lluís Vilanova <vilanova@ac.upc.edu>" __copyright__ = "Copyright 2012-2014, Lluís Vilanova <vilanova@ac.upc.edu>" __license__ = "GPL version 2 or (at your option) any later version" __maintainer__ = "Stefan Hajnoczi" __email__ = "stefanha@linux.vnet.ibm.com" import os import tracetool ...
true
true
f735a2675ac8071006c4b3c0c51d104d738b5589
3,992
py
Python
pygmt/tests/test_datasets_earth_relief.py
daroari/pygmt
e022851d62814a9255ed2bb63ae092b666b832b9
[ "BSD-3-Clause" ]
326
2019-02-13T09:33:39.000Z
2022-03-25T17:24:05.000Z
pygmt/tests/test_datasets_earth_relief.py
daroari/pygmt
e022851d62814a9255ed2bb63ae092b666b832b9
[ "BSD-3-Clause" ]
1,153
2019-01-22T19:14:32.000Z
2022-03-31T22:07:03.000Z
pygmt/tests/test_datasets_earth_relief.py
daroari/pygmt
e022851d62814a9255ed2bb63ae092b666b832b9
[ "BSD-3-Clause" ]
160
2019-02-10T15:24:19.000Z
2022-03-31T09:07:41.000Z
""" Test basic functionality for loading Earth relief datasets. """ import numpy as np import numpy.testing as npt import pytest from pygmt.datasets import load_earth_relief from pygmt.exceptions import GMTInvalidInput def test_earth_relief_fails(): """ Make sure earth relief fails for invalid resolutions. ...
31.936
80
0.665832
import numpy as np import numpy.testing as npt import pytest from pygmt.datasets import load_earth_relief from pygmt.exceptions import GMTInvalidInput def test_earth_relief_fails(): resolutions = "1m 1d bla 60d 001m 03".split() resolutions.append(60) for resolution in resolutions: with pytest.rais...
true
true
f735a3ebcec803e50af52d4d74ca775eb29ee26a
11,273
py
Python
smartRemotes/imports/bt-ble/gapAdvertise.py
HeadHodge/My-SmartHome-Projects
a5db1bf5d54f2840154e7cfb1044b3fb4ec9f77d
[ "MIT" ]
1
2022-02-20T04:28:49.000Z
2022-02-20T04:28:49.000Z
smartRemotes/imports/bt-ble/gapAdvertise.py
HeadHodge/smartRemotes-v0.2
9a3c671dc3c000a911b55ebe2f09e6278a874285
[ "MIT" ]
null
null
null
smartRemotes/imports/bt-ble/gapAdvertise.py
HeadHodge/smartRemotes-v0.2
9a3c671dc3c000a911b55ebe2f09e6278a874285
[ "MIT" ]
null
null
null
#!/usr/bin/python # SPDX-License-Identifier: LGPL-2.1-or-later from __future__ import print_function import argparse import dbus import dbus.exceptions import dbus.mainloop.glib import dbus.service import time import threading try: from gi.repository import GObject # python3 except ImportError: import gobje...
30.550136
79
0.665661
from __future__ import print_function import argparse import dbus import dbus.exceptions import dbus.mainloop.glib import dbus.service import time import threading try: from gi.repository import GObject except ImportError: import gobject as GObject mainloop = None BLUEZ_SERVICE_NAME = 'org.bluez' LE_ADVE...
true
true
f735a4d7d2546a807d88f3af2e34e631513c4dc3
1,102
py
Python
Trabalhando com Data e Hora/manipulando_data_hora.py
GlennSR/Curso-Python-Udemy
f97ae77deeed0c66607b3e1346a5fc20730e04a5
[ "MIT" ]
null
null
null
Trabalhando com Data e Hora/manipulando_data_hora.py
GlennSR/Curso-Python-Udemy
f97ae77deeed0c66607b3e1346a5fc20730e04a5
[ "MIT" ]
null
null
null
Trabalhando com Data e Hora/manipulando_data_hora.py
GlennSR/Curso-Python-Udemy
f97ae77deeed0c66607b3e1346a5fc20730e04a5
[ "MIT" ]
null
null
null
''' Manipulando Data e Hora Python tem um módulo built-in para se trabalhar com data e hora chamado datetime ''' import datetime print(dir(datetime)) # Retorna a data e hora corrente print(datetime.datetime.now()) # datetime.datetime(YYYY, MM, DD, Hour, Minute, Second, microsecond) print(repr(datetime.datetime.now...
25.045455
90
0.741379
import datetime print(dir(datetime)) print(datetime.datetime.now()) print(repr(datetime.datetime.now())) inicio = datetime.datetime.now() print(inicio) inicio = inicio.replace(hour=16, minute=0, second=0, microsecond=0) print(inicio) print() nascimento = input('Digite a sua data de nascimento (DD/MM/AAAA): ').sp...
true
true
f735a6cbc7a8b59b969dc938e7b1436ece8b6720
2,387
py
Python
Lab-5-SimulatedAnnealing/puzzle_utils.py
Abhishek-dev2/Artificial-Intelligence-Lab
c66778eefcabc6b21fa1f19f641987ac8a7a455a
[ "MIT" ]
2
2020-12-16T07:43:03.000Z
2021-11-06T12:45:18.000Z
Lab-5-SimulatedAnnealing/puzzle_utils.py
as2d3/Artificial-Intelligence-Lab
c66778eefcabc6b21fa1f19f641987ac8a7a455a
[ "MIT" ]
null
null
null
Lab-5-SimulatedAnnealing/puzzle_utils.py
as2d3/Artificial-Intelligence-Lab
c66778eefcabc6b21fa1f19f641987ac8a7a455a
[ "MIT" ]
3
2020-12-16T07:44:31.000Z
2021-09-14T17:44:09.000Z
import os import math def print_simulated_annealing(start, goal, parent_list, optimal_path_cost, string_to_matrix_mapping, number_states_explored): if optimal_path_cost > 0: print("Goal found successfully.") else: print("Goal NOT found") print("Start state: ") print_configuration(star...
33.152778
125
0.645999
import os import math def print_simulated_annealing(start, goal, parent_list, optimal_path_cost, string_to_matrix_mapping, number_states_explored): if optimal_path_cost > 0: print("Goal found successfully.") else: print("Goal NOT found") print("Start state: ") print_configuration(star...
true
true
f735a947169f85c3ec07ebdedc271ad1cfae990a
4,418
py
Python
ckan/cli/user.py
doc22940/ckan
fb0174b77a5ac1c614717643d9b1b2a0c82ee088
[ "Apache-2.0" ]
1
2020-02-08T16:16:51.000Z
2020-02-08T16:16:51.000Z
ckan/cli/user.py
doc22940/ckan
fb0174b77a5ac1c614717643d9b1b2a0c82ee088
[ "Apache-2.0" ]
null
null
null
ckan/cli/user.py
doc22940/ckan
fb0174b77a5ac1c614717643d9b1b2a0c82ee088
[ "Apache-2.0" ]
null
null
null
# encoding: utf-8 import logging import sys from pprint import pprint import six import click from six import text_type import ckan.logic as logic import ckan.plugins as plugin from ckan.cli import error_shout log = logging.getLogger(__name__) @click.group(name=u'user', short_help=u'Manage user commands') @click....
30.054422
78
0.630602
import logging import sys from pprint import pprint import six import click from six import text_type import ckan.logic as logic import ckan.plugins as plugin from ckan.cli import error_shout log = logging.getLogger(__name__) @click.group(name=u'user', short_help=u'Manage user commands') @click.help_option(u'-h',...
true
true
f735a9e0967ace13566be5b598fd75aff4b94dba
167
py
Python
src/setup.py
nineinchnick/pystok-fdw
47b94054e3d3f3c27ae0a43aac34f4af3c9e0216
[ "MIT" ]
null
null
null
src/setup.py
nineinchnick/pystok-fdw
47b94054e3d3f3c27ae0a43aac34f4af3c9e0216
[ "MIT" ]
null
null
null
src/setup.py
nineinchnick/pystok-fdw
47b94054e3d3f3c27ae0a43aac34f4af3c9e0216
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from setuptools import setup setup( name='pystok-fdw', version='0.0.1', author=u'Jan Waś', license='MIT', packages=['pystok-fdw'] )
15.181818
28
0.616766
from setuptools import setup setup( name='pystok-fdw', version='0.0.1', author=u'Jan Waś', license='MIT', packages=['pystok-fdw'] )
true
true
f735aa6deaafb3dd4088c283930aece8d645525f
1,870
py
Python
tests/test_likeness.py
herbeeg/famitracker-instrument-generator
c07f0cc97124195aeafbdfb248fb30d6e4e6c3f6
[ "MIT" ]
null
null
null
tests/test_likeness.py
herbeeg/famitracker-instrument-generator
c07f0cc97124195aeafbdfb248fb30d6e4e6c3f6
[ "MIT" ]
null
null
null
tests/test_likeness.py
herbeeg/famitracker-instrument-generator
c07f0cc97124195aeafbdfb248fb30d6e4e6c3f6
[ "MIT" ]
null
null
null
import pytest import wave.data.likeness as likeness class TestLikenessFDS: def testRoundedLikenessFDS(self): likeness_instance = likeness.WaveLikeness( base=[i for i in range(64)], comparison=[0 for i in range(64)], ceiling=64 ) assert 31.46 == likeness_...
30.655738
62
0.606417
import pytest import wave.data.likeness as likeness class TestLikenessFDS: def testRoundedLikenessFDS(self): likeness_instance = likeness.WaveLikeness( base=[i for i in range(64)], comparison=[0 for i in range(64)], ceiling=64 ) assert 31.46 == likeness_...
true
true
f735ab9b4b3d13ffd1e045001731cea5346ade5e
475
py
Python
tests/datasets/test_tafeng.py
shiodat/Sequential-Recommendation-Datasets
198c43962e5f15a9d99d0b17c156a9603d91a1c2
[ "Apache-2.0" ]
74
2020-08-19T15:57:03.000Z
2022-03-20T08:41:40.000Z
tests/datasets/test_tafeng.py
shiodat/Sequential-Recommendation-Datasets
198c43962e5f15a9d99d0b17c156a9603d91a1c2
[ "Apache-2.0" ]
null
null
null
tests/datasets/test_tafeng.py
shiodat/Sequential-Recommendation-Datasets
198c43962e5f15a9d99d0b17c156a9603d91a1c2
[ "Apache-2.0" ]
18
2020-08-05T07:52:32.000Z
2022-03-17T16:53:48.000Z
import os from srdatasets.datasets import TaFeng from srdatasets.utils import __warehouse__ def test_download_and_trandform(): rawdir = __warehouse__.joinpath("TaFeng", "raw") os.makedirs(rawdir, exist_ok=True) tafeng = TaFeng(rawdir) tafeng.download() assert all(rawdir.joinpath(cf).exists() for ...
29.6875
76
0.717895
import os from srdatasets.datasets import TaFeng from srdatasets.utils import __warehouse__ def test_download_and_trandform(): rawdir = __warehouse__.joinpath("TaFeng", "raw") os.makedirs(rawdir, exist_ok=True) tafeng = TaFeng(rawdir) tafeng.download() assert all(rawdir.joinpath(cf).exists() for ...
true
true
f735ad0a59f3f1c340dc45bb136c4f80e6a41251
807
py
Python
medium/python3/c0185_368_largest-divisible-subset/00_leetcode_0185.py
drunkwater/leetcode
8cc4a07763e71efbaedb523015f0c1eff2927f60
[ "Ruby" ]
null
null
null
medium/python3/c0185_368_largest-divisible-subset/00_leetcode_0185.py
drunkwater/leetcode
8cc4a07763e71efbaedb523015f0c1eff2927f60
[ "Ruby" ]
null
null
null
medium/python3/c0185_368_largest-divisible-subset/00_leetcode_0185.py
drunkwater/leetcode
8cc4a07763e71efbaedb523015f0c1eff2927f60
[ "Ruby" ]
3
2018-02-09T02:46:48.000Z
2021-02-20T08:32:03.000Z
# DRUNKWATER TEMPLATE(add description and prototypes) # Question Title and Description on leetcode.com # Function Declaration and Function Prototypes on leetcode.com #368. Largest Divisible Subset #Given a set of distinct positive integers, find the largest subset such that every pair (Si, Sj) of elements in this subse...
33.625
163
0.696406
# :type nums: List[int] # :rtype: List[int] # """
true
true
f735ade660f32bb64e0d8d758d07b55ab389ad04
7,154
py
Python
src/2_robot_picam_test_NCS2_mobilenet.py
lesliewright1977/RPi3_NCS2
8aad7a4869980798dcb800dcf1a35ee26ba93c61
[ "Apache-2.0" ]
44
2019-01-09T12:15:08.000Z
2022-01-30T05:16:29.000Z
src/2_robot_picam_test_NCS2_mobilenet.py
lesliewright1977/RPi3_NCS2
8aad7a4869980798dcb800dcf1a35ee26ba93c61
[ "Apache-2.0" ]
3
2019-01-25T18:32:11.000Z
2020-09-11T21:05:38.000Z
src/2_robot_picam_test_NCS2_mobilenet.py
lesliewright1977/RPi3_NCS2
8aad7a4869980798dcb800dcf1a35ee26ba93c61
[ "Apache-2.0" ]
16
2019-01-25T10:50:16.000Z
2021-08-11T12:39:24.000Z
import cv2 import time import numpy import random from multiprocessing import Process from multiprocessing import Queue from picamera.array import PiRGBArray from picamera import PiCamera #hacked from: #https://software.intel.com/articles/OpenVINO-Install-RaspberryPI #https://opencv2-python-tutroals.readthedocs.io/en/...
24.087542
128
0.704082
import cv2 import time import numpy import random from multiprocessing import Process from multiprocessing import Queue from picamera.array import PiRGBArray from picamera import PiCamera import RPi.GPIO as GPIO GPIO.setmode(GPIO.BCM) GPIO.setup(18,GPIO.OUT) GPIO.setup(23,GPIO.OUT) GPIO.setup(24,GPIO.OUT) GPIO.setup...
true
true
f735aed00824c375e7c9692215548a31c8120db7
2,399
py
Python
samples/client/petstore/python/client/models/User.py
cranberyxl/swagger-codegen
bae40ded74853583e18ac643876eb5beba04a874
[ "Apache-2.0" ]
null
null
null
samples/client/petstore/python/client/models/User.py
cranberyxl/swagger-codegen
bae40ded74853583e18ac643876eb5beba04a874
[ "Apache-2.0" ]
1
2021-01-21T01:34:10.000Z
2021-01-21T01:34:10.000Z
samples/client/petstore/python/client/models/User.py
cranberyxl/swagger-codegen
bae40ded74853583e18ac643876eb5beba04a874
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """ Copyright 2015 Reverb Technologies, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless require...
23.519608
97
0.457691
class User(object): def __init__(self): self.swaggerTypes = { 'id': 'long', 'username': 'str', 'firstName': 'str', 'lastName': 'str', ...
true
true
f735afbf3acae6f5812aed3ea540a8ad6adf1015
6,656
py
Python
source_server/video_stream/main4.py
caganselim/thermal-camera-assisted-baby-monitor
7d1d948eb4c029777d1359ad9c53b5918e9753dd
[ "MIT" ]
null
null
null
source_server/video_stream/main4.py
caganselim/thermal-camera-assisted-baby-monitor
7d1d948eb4c029777d1359ad9c53b5918e9753dd
[ "MIT" ]
null
null
null
source_server/video_stream/main4.py
caganselim/thermal-camera-assisted-baby-monitor
7d1d948eb4c029777d1359ad9c53b5918e9753dd
[ "MIT" ]
1
2019-08-15T00:24:08.000Z
2019-08-15T00:24:08.000Z
# -*- coding: utf-8 -*- """ Created on Sun Feb 10 16:45:42 2019 @author: ASUS PC """ from flask import Flask, render_template, Response import time from threading import Lock, Thread import queue import socket from threading import Thread # emulated camera from camera3 import Camera # Ras...
27.618257
180
0.550631
from flask import Flask, render_template, Response import time from threading import Lock, Thread import queue import socket from threading import Thread from camera3 import Camera server_socket = None connection_file = None connection = None frame_queue = queue.Queue(maxsize=5) stream_entere...
true
true
f735b007affed977c83d7016dcea7c249f5339c5
2,706
py
Python
pytorch_ssim.py
minhmanho/rrdncnn
f09ef7d92e31bfd43a548bb476970cfe38d32508
[ "X11" ]
22
2019-10-07T07:54:46.000Z
2022-03-22T14:22:52.000Z
pytorch_ssim.py
minhmanho/rrdncnn
f09ef7d92e31bfd43a548bb476970cfe38d32508
[ "X11" ]
2
2020-09-27T06:45:19.000Z
2022-03-18T07:48:54.000Z
pytorch_ssim.py
minhmanho/rrdncnn
f09ef7d92e31bfd43a548bb476970cfe38d32508
[ "X11" ]
3
2021-01-18T03:46:14.000Z
2021-09-07T09:24:58.000Z
import torch import torch.nn.functional as F from torch.autograd import Variable import numpy as np from math import exp def gaussian(window_size, sigma): gauss = torch.Tensor([exp(-(x - window_size//2)**2/float(2*sigma**2)) for x in range(window_size)]) return gauss/gauss.sum() def create_window(wi...
37.068493
105
0.629712
import torch import torch.nn.functional as F from torch.autograd import Variable import numpy as np from math import exp def gaussian(window_size, sigma): gauss = torch.Tensor([exp(-(x - window_size//2)**2/float(2*sigma**2)) for x in range(window_size)]) return gauss/gauss.sum() def create_window(wi...
true
true
f735b19427ad7d8a33dc3bf0e10c2bd58c3010b7
2,766
py
Python
tags/errors.py
Myst1c-a/phen-cogs
672f9022ddbbd9a84b0a05357347e99e64a776fc
[ "MIT" ]
null
null
null
tags/errors.py
Myst1c-a/phen-cogs
672f9022ddbbd9a84b0a05357347e99e64a776fc
[ "MIT" ]
null
null
null
tags/errors.py
Myst1c-a/phen-cogs
672f9022ddbbd9a84b0a05357347e99e64a776fc
[ "MIT" ]
null
null
null
""" MIT License Copyright (c) 2020-present phenom4n4n Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, pub...
32.541176
92
0.754519
from typing import Optional from redbot.core.commands import UserFeedbackCheckFailure from redbot.core.utils.chat_formatting import humanize_number as hn __all__ = ( "TagError", "MissingTagPermissions", "RequireCheckFailure", "WhitelistCheckFailure", "BlacklistCheckFailure", "TagFeedbackError...
true
true
f735b1c40eb715c9d12e3f92d00bc2e92e50fa58
4,754
py
Python
src/converter/gen_boundary_data.py
Kento75/mozc
0abed62d6f9cd9c6ce2142407a1f80e02a3230f1
[ "BSD-3-Clause" ]
1,144
2015-04-23T16:18:45.000Z
2022-03-29T19:37:33.000Z
src/converter/gen_boundary_data.py
kirameister/mozc
18b2b32b4d3fe585d38134606773239781b6be82
[ "BSD-3-Clause" ]
291
2015-05-04T07:53:37.000Z
2022-03-22T00:09:05.000Z
src/converter/gen_boundary_data.py
kirameister/mozc
18b2b32b4d3fe585d38134606773239781b6be82
[ "BSD-3-Clause" ]
301
2015-05-03T00:07:18.000Z
2022-03-21T10:48:29.000Z
# -*- coding: utf-8 -*- # Copyright 2010-2021, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this...
30.670968
78
0.649769
from __future__ import absolute_import from __future__ import print_function import codecs import optparse import re import struct import sys from six.moves import range def PatternToRegexp(pattern): return '^' + pattern.replace('*', '[^,]+') def LoadPatterns(file): prefix = [] suffix = [] for line in c...
true
true
f735b38333c649bea49b0c547e0ecbe745f5c70d
1,590
py
Python
gym_minigrid/envs/blockedunlockpickup.py
kanaadp/gym-minigrid
b8e95a3b5ac86f791c529d12561f73e19b9b5192
[ "Apache-2.0" ]
null
null
null
gym_minigrid/envs/blockedunlockpickup.py
kanaadp/gym-minigrid
b8e95a3b5ac86f791c529d12561f73e19b9b5192
[ "Apache-2.0" ]
null
null
null
gym_minigrid/envs/blockedunlockpickup.py
kanaadp/gym-minigrid
b8e95a3b5ac86f791c529d12561f73e19b9b5192
[ "Apache-2.0" ]
null
null
null
from gym_minigrid.minigrid import * from gym_minigrid.roomgrid import RoomGrid from gym_minigrid.register import register class BlockedUnlockPickup(RoomGrid): """ Unlock a door blocked by a ball, then pick up a box in another room """ def __init__(self, seed=None): room_size = 6 s...
29.444444
109
0.604403
from gym_minigrid.minigrid import * from gym_minigrid.roomgrid import RoomGrid from gym_minigrid.register import register class BlockedUnlockPickup(RoomGrid): def __init__(self, seed=None): room_size = 6 super().__init__( num_rows=1, num_cols=2, room_size=room_...
true
true
f735b3f97d1d978d00f3e1fa7e560ec79438faf4
35,417
py
Python
python/ccxt/hitbtc.py
longniao/ccxt
3af5494bd16865f9e141f902adbd1deba7a3135e
[ "MIT" ]
1
2021-03-01T17:45:33.000Z
2021-03-01T17:45:33.000Z
python/ccxt/hitbtc.py
longniao/ccxt
3af5494bd16865f9e141f902adbd1deba7a3135e
[ "MIT" ]
4
2020-09-06T22:46:57.000Z
2021-05-10T08:35:02.000Z
python/ccxt/hitbtc.py
longniao/ccxt
3af5494bd16865f9e141f902adbd1deba7a3135e
[ "MIT" ]
1
2019-11-08T12:36:13.000Z
2019-11-08T12:36:13.000Z
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.base.exchange import Exchange import hashlib from ccxt.base.errors import ExchangeError from ccxt.base.errors import Insufficient...
37.008359
127
0.365926
from ccxt.base.exchange import Exchange import hashlib from ccxt.base.errors import ExchangeError from ccxt.base.errors import InsufficientFunds from ccxt.base.errors import InvalidOrder from ccxt.base.errors import OrderNotFound class hitbtc (Exchange): def describe(self): return self.deep_extend(supe...
true
true
f735b3fb7909a46e6e9bc51be0a8832ba8df5746
554
py
Python
esrt/engine/base_input_feed.py
PTYin/ESRT
4d3e5c523cef7bd15ea8ce10e5cf8b7e05ad2d5c
[ "BSD-2-Clause" ]
null
null
null
esrt/engine/base_input_feed.py
PTYin/ESRT
4d3e5c523cef7bd15ea8ce10e5cf8b7e05ad2d5c
[ "BSD-2-Clause" ]
null
null
null
esrt/engine/base_input_feed.py
PTYin/ESRT
4d3e5c523cef7bd15ea8ce10e5cf8b7e05ad2d5c
[ "BSD-2-Clause" ]
null
null
null
import abc import typing class BaseInputFeed(abc.ABC): """ """ def __init__(self, model, batch_size): self.model = model self.batch_size = batch_size @abc.abstractmethod def get_train_batch(self): """Defien a batch feed dictionary the model needs for training, each sub cl...
25.181818
93
0.655235
import abc import typing class BaseInputFeed(abc.ABC): def __init__(self, model, batch_size): self.model = model self.batch_size = batch_size @abc.abstractmethod def get_train_batch(self): @abc.abstractmethod def get_test_batch(self):
true
true
f735b4d20caffd320fd7db03fafe6d0948d2456f
4,370
py
Python
conf.py
bcattoor/topohelper-docs
63af3b365e5e3b7eac59d4c9bc574283c1d2177f
[ "Unlicense" ]
null
null
null
conf.py
bcattoor/topohelper-docs
63af3b365e5e3b7eac59d4c9bc574283c1d2177f
[ "Unlicense" ]
null
null
null
conf.py
bcattoor/topohelper-docs
63af3b365e5e3b7eac59d4c9bc574283c1d2177f
[ "Unlicense" ]
1
2020-11-13T20:42:11.000Z
2020-11-13T20:42:11.000Z
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
29.931507
116
0.653089
project = "TopoHelper" copyright = "2020, Bjorn Cattoor" author = "Bjorn Cattoor" company = "Infrabel" release = "1.0" extensions = [ "sphinx.ext.autodoc", "sphinx.ext.extlinks", "sphinx.ext.intersphinx", "sphinx.ext.mathjax", "sphinx.ext.todo", "sphinx.ext.viewcode", "myst_parser",...
true
true
f735b560281cfda6bec6bd167865c4a4301011a2
7,811
py
Python
model/archival_gnns.py
kay-wong/DiscoBERT
814c741e2a049de3afc489835e0df3ccf9fb4fe9
[ "MIT" ]
154
2020-04-22T07:14:36.000Z
2022-03-20T06:16:39.000Z
model/archival_gnns.py
kay-wong/DiscoBERT
814c741e2a049de3afc489835e0df3ccf9fb4fe9
[ "MIT" ]
13
2020-05-15T03:12:19.000Z
2021-08-10T16:08:09.000Z
model/archival_gnns.py
kay-wong/DiscoBERT
814c741e2a049de3afc489835e0df3ccf9fb4fe9
[ "MIT" ]
28
2020-04-23T12:54:56.000Z
2022-02-09T11:48:12.000Z
# Graph Conv and Relational Graph Conv import itertools import torch from typing import List, Union import dgl import torch.nn as nn import torch.nn.functional as F from allennlp.common import FromParams from allennlp.common import Registrable from allennlp.modules.encoder_base import _EncoderBase from allennlp.module...
38.860697
106
0.630137
import itertools import torch from typing import List, Union import dgl import torch.nn as nn import torch.nn.functional as F from allennlp.common import FromParams from allennlp.common import Registrable from allennlp.modules.encoder_base import _EncoderBase from allennlp.modules.feedforward import FeedForward from a...
true
true
f735b5aac888d7a0bb6d2eff2c7545d190c58ac9
377
py
Python
Python/Syntax/Else.py
piovezan/SOpt
a5ec90796b7bdf98f0675457fc4bb99c8695bc40
[ "MIT" ]
148
2017-08-03T01:49:27.000Z
2022-03-26T10:39:30.000Z
Python/Syntax/Else.py
piovezan/SOpt
a5ec90796b7bdf98f0675457fc4bb99c8695bc40
[ "MIT" ]
3
2017-11-23T19:52:05.000Z
2020-04-01T00:44:40.000Z
Python/Syntax/Else.py
piovezan/SOpt
a5ec90796b7bdf98f0675457fc4bb99c8695bc40
[ "MIT" ]
59
2017-08-03T01:49:19.000Z
2022-03-31T23:24:38.000Z
if carro == 'Peugeot': c = 50 elif carro == 'C3': c = 60 elif carro == 'Cruze': c = 70 elif carro == 'CRV': c = 75 else: print('O carro digitado não está cadastrado no nosso sistema. Verifique se está digitado corretamente ou comunique a empresa.') return #ou pode usar sys.exit() se quiser acaba...
26.928571
131
0.65252
if carro == 'Peugeot': c = 50 elif carro == 'C3': c = 60 elif carro == 'Cruze': c = 70 elif carro == 'CRV': c = 75 else: print('O carro digitado não está cadastrado no nosso sistema. Verifique se está digitado corretamente ou comunique a empresa.') return
true
true
f735b6a365a72a09f1f4baa82e51348f1b5803fc
1,929
py
Python
openprescribing/dmd/gen_models/gen_models.py
annapowellsmith/openpresc
cfa9fb07d6fc2ee304159c04fcc132cefcf78745
[ "MIT" ]
91
2015-10-14T09:10:32.000Z
2022-03-10T22:09:21.000Z
openprescribing/dmd/gen_models/gen_models.py
annapowellsmith/openpresc
cfa9fb07d6fc2ee304159c04fcc132cefcf78745
[ "MIT" ]
1,828
2015-12-04T14:52:27.000Z
2022-03-31T08:51:14.000Z
openprescribing/dmd/gen_models/gen_models.py
HDRUK/openprescribing
510e8c07e841cd42284c109774d1730b6463f376
[ "MIT" ]
27
2015-12-03T18:26:56.000Z
2021-01-09T21:58:53.000Z
# flake8: noqa import csv def model_name(table_name): if table_name in ["vtm", "vpi", "vmp", "vmpp", "amp", "ampp", "gtin"]: return table_name.upper() else: return "".join(tok.title() for tok in table_name.split("_")) def quote(s): assert '"' not in s return '"' + s + '"' with open...
25.72
76
0.553136
import csv def model_name(table_name): if table_name in ["vtm", "vpi", "vmp", "vmpp", "amp", "ampp", "gtin"]: return table_name.upper() else: return "".join(tok.title() for tok in table_name.split("_")) def quote(s): assert '"' not in s return '"' + s + '"' with open("schema.csv") ...
true
true
f735b84c5f4f7ab12673110257de977b99be7f9f
1,280
py
Python
programmers/lv2_review/lv_2_19.py
mrbartrns/swacademy_structure
778f0546030385237c383d81ec37d5bd9ed1272d
[ "MIT" ]
null
null
null
programmers/lv2_review/lv_2_19.py
mrbartrns/swacademy_structure
778f0546030385237c383d81ec37d5bd9ed1272d
[ "MIT" ]
null
null
null
programmers/lv2_review/lv_2_19.py
mrbartrns/swacademy_structure
778f0546030385237c383d81ec37d5bd9ed1272d
[ "MIT" ]
null
null
null
# 위장 """ def solution(clothes): def dfs_left(s, idx): if idx == half: left.append(s) return dfs_left(s, idx + 1) dfs_left(s * values[idx], idx + 1) def dfs_right(s, idx): if idx == len(values): right.append(s) return dfs_...
20.645161
50
0.508594
def solution(clothes): categories = {} for _, c in clothes: if c not in categories: categories[c] = 2 else: categories[c] += 1 cnt = 1 values = list(categories.values()) for i in range(len(values)): cnt *= values[i] cnt -= 1 return cnt c...
true
true
f735b8c878d53733e89af5109438eaed85f247f8
3,668
py
Python
pyFAI/utils/logging_utils.py
yugangzhang/pyFAI
e0453b279dac1f165f637e2a2ed1d4ddf57d31ba
[ "MIT" ]
1
2021-04-28T20:09:13.000Z
2021-04-28T20:09:13.000Z
pyFAI/utils/logging_utils.py
yugangzhang/pyFAI
e0453b279dac1f165f637e2a2ed1d4ddf57d31ba
[ "MIT" ]
null
null
null
pyFAI/utils/logging_utils.py
yugangzhang/pyFAI
e0453b279dac1f165f637e2a2ed1d4ddf57d31ba
[ "MIT" ]
null
null
null
# !/usr/bin/env python # -*- coding: utf-8 -*- # # Project: Azimuthal integration # https://github.com/silx-kit/pyFAI # # Copyright (C) 2019 European Synchrotron Radiation Facility, Grenoble, France # # Principal author: Jérôme Kieffer (Jerome.Kieffer@ESRF.eu) # # Permission is hereby granted...
33.651376
84
0.724918
from __future__ import division, print_function __author__ = "Valentin Valls" __contact__ = "valentin.valls@esrf.eu" __license__ = "MIT" __copyright__ = "European Synchrotron Radiation Facility, Grenoble, France" __date__ = "25/02/2019" import logging import contextlib class PrePostEmitStreamHandler(logging.Hand...
true
true
f735b8da17d0e01f03e8d45e3b111c70242b92d1
89
py
Python
drivers/apps.py
loribonna/EsameLDPython
02f671d0813e4e3cfed5a977018ab295b8675d60
[ "MIT" ]
1
2021-03-11T04:48:21.000Z
2021-03-11T04:48:21.000Z
drivers/apps.py
loribonna/EsameLDPython
02f671d0813e4e3cfed5a977018ab295b8675d60
[ "MIT" ]
18
2019-08-29T12:42:11.000Z
2022-02-12T13:04:58.000Z
drivers/apps.py
loribonna/EsameLDPython
02f671d0813e4e3cfed5a977018ab295b8675d60
[ "MIT" ]
null
null
null
from django.apps import AppConfig class DriversConfig(AppConfig): name = 'drivers'
14.833333
33
0.752809
from django.apps import AppConfig class DriversConfig(AppConfig): name = 'drivers'
true
true
f735b9971416c7293b52ba2809611609a9c22da8
133
py
Python
app/task/__init__.py
Darasimi-Ajewole/PdfConv
c19d84c549a0ff7183e0338fbe6fcdf1ff2420a9
[ "MIT" ]
3
2019-09-01T18:55:50.000Z
2022-01-12T22:38:44.000Z
app/task/__init__.py
Darasimi-Ajewole/PdfConv
c19d84c549a0ff7183e0338fbe6fcdf1ff2420a9
[ "MIT" ]
9
2020-02-12T00:21:55.000Z
2021-09-03T22:52:24.000Z
app/task/__init__.py
Darasimi-Ajewole/PdfConv
c19d84c549a0ff7183e0338fbe6fcdf1ff2420a9
[ "MIT" ]
null
null
null
from flask_restx import Namespace task_api = Namespace( 'task', description='Internal APIs for background task processing')
22.166667
63
0.759398
from flask_restx import Namespace task_api = Namespace( 'task', description='Internal APIs for background task processing')
true
true
f735b9e82a29b0bb1f4c955b4280cff1a8e38ecd
1,386
py
Python
neutron/extensions/subnetallocation.py
BobzhouCH/neutron-nfv-acc
05ab9d2079f2b652a4df771c1d6d9ce3b822aaa0
[ "Apache-2.0" ]
1
2016-03-25T21:13:13.000Z
2016-03-25T21:13:13.000Z
neutron/extensions/subnetallocation.py
BobzhouCH/neutron-nfv-acc
05ab9d2079f2b652a4df771c1d6d9ce3b822aaa0
[ "Apache-2.0" ]
1
2021-03-21T11:39:22.000Z
2021-03-21T11:39:22.000Z
neutron/extensions/subnetallocation.py
BobzhouCH/neutron-nfv-acc
05ab9d2079f2b652a4df771c1d6d9ce3b822aaa0
[ "Apache-2.0" ]
1
2021-03-21T11:37:18.000Z
2021-03-21T11:37:18.000Z
# Copyright (c) 2015 Hewlett-Packard Development Company, L.P. # 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/LICEN...
30.130435
78
0.704906
from neutron.api import extensions from neutron.common import constants class Subnetallocation(extensions.ExtensionDescriptor): @classmethod def get_name(cls): return "Subnet Allocation" @classmethod def get_alias(cls): return constants.SUBNET_ALLOCATION_EXT_ALIAS @classmethod ...
true
true
f735b9ec063ea54e221a7beeb79cbfe540054145
640
py
Python
project/adapter/models.py
vicinityh2020/vicinity-vas-energy-monitoring
1ffb51868abcc1b5b52ef27a056ba278cd0f7f65
[ "MIT" ]
null
null
null
project/adapter/models.py
vicinityh2020/vicinity-vas-energy-monitoring
1ffb51868abcc1b5b52ef27a056ba278cd0f7f65
[ "MIT" ]
3
2020-06-05T19:06:48.000Z
2021-06-10T20:58:13.000Z
project/adapter/models.py
vicinityh2020/vicinity-vas-energy-monitoring
1ffb51868abcc1b5b52ef27a056ba278cd0f7f65
[ "MIT" ]
null
null
null
from django.db import models class Appliance(models.Model): name = models.CharField(max_length=100, null=False) oid = models.UUIDField(unique=True) pid = models.CharField(max_length=50) appliance_type = models.CharField(max_length=30) def __str__(self): return self.name class Sensor(mod...
27.826087
87
0.692188
from django.db import models class Appliance(models.Model): name = models.CharField(max_length=100, null=False) oid = models.UUIDField(unique=True) pid = models.CharField(max_length=50) appliance_type = models.CharField(max_length=30) def __str__(self): return self.name class Sensor(mod...
true
true
f735bb1bf8e966d1381c9f54b56aa8880934fa90
735
py
Python
tests/test_battery.py
bexxmodd/vizex
c7be2bc7fcc98c43457248fb13748c43fc49392d
[ "MIT" ]
195
2020-09-05T17:33:18.000Z
2022-03-20T11:42:22.000Z
tests/test_battery.py
bexxmodd/vizex
c7be2bc7fcc98c43457248fb13748c43fc49392d
[ "MIT" ]
23
2020-09-14T12:10:14.000Z
2022-03-25T07:49:08.000Z
tests/test_battery.py
bexxmodd/vizex
c7be2bc7fcc98c43457248fb13748c43fc49392d
[ "MIT" ]
16
2020-09-15T18:03:51.000Z
2022-02-02T17:02:25.000Z
# add path to the main package and test battery.py if __name__ == '__main__': from __access import ADD_PATH ADD_PATH() import unittest import psutil from battery import Battery class TestBattery(unittest.TestCase): """ Test battry module """ def test_Battery_constructor(self): if not (has_b...
24.5
76
0.64898
if __name__ == '__main__': from __access import ADD_PATH ADD_PATH() import unittest import psutil from battery import Battery class TestBattery(unittest.TestCase): def test_Battery_constructor(self): if not (has_battery := psutil.sensors_battery()): with self.assertRaises(Exception)...
true
true
f735bb779c324b1d4bece56bb0a8b5f13cd9cd30
2,311
py
Python
epytope/Data/pssms/smmpmbec/mat/A_01_01_9.py
christopher-mohr/epytope
8ac9fe52c0b263bdb03235a5a6dffcb72012a4fd
[ "BSD-3-Clause" ]
7
2021-02-01T18:11:28.000Z
2022-01-31T19:14:07.000Z
epytope/Data/pssms/smmpmbec/mat/A_01_01_9.py
christopher-mohr/epytope
8ac9fe52c0b263bdb03235a5a6dffcb72012a4fd
[ "BSD-3-Clause" ]
22
2021-01-02T15:25:23.000Z
2022-03-14T11:32:53.000Z
epytope/Data/pssms/smmpmbec/mat/A_01_01_9.py
christopher-mohr/epytope
8ac9fe52c0b263bdb03235a5a6dffcb72012a4fd
[ "BSD-3-Clause" ]
4
2021-05-28T08:50:38.000Z
2022-03-14T11:45:32.000Z
A_01_01_9 = {0: {'A': 0.202, 'C': -0.151, 'E': 0.177, 'D': 0.207, 'G': 0.239, 'F': -0.334, 'I': 0.083, 'H': -0.029, 'K': 0.205, 'M': -0.211, 'L': -0.218, 'N': -0.065, 'Q': 0.071, 'P': 0.066, 'S': 0.162, 'R': 0.23, 'T': 0.071, 'W': -0.317, 'V': -0.036, 'Y': -0.353}, 1: {'A': -0.302, 'C': 0.137, 'E': 0.387, 'D': 0.126, '...
2,311
2,311
0.394202
A_01_01_9 = {0: {'A': 0.202, 'C': -0.151, 'E': 0.177, 'D': 0.207, 'G': 0.239, 'F': -0.334, 'I': 0.083, 'H': -0.029, 'K': 0.205, 'M': -0.211, 'L': -0.218, 'N': -0.065, 'Q': 0.071, 'P': 0.066, 'S': 0.162, 'R': 0.23, 'T': 0.071, 'W': -0.317, 'V': -0.036, 'Y': -0.353}, 1: {'A': -0.302, 'C': 0.137, 'E': 0.387, 'D': 0.126, '...
true
true
f735bc19fe5b97a9a42d0e2c6be1f0fdfde91374
2,204
py
Python
clue-nrf52/apds9960-testing/v2/clue-testing/config_regs_apds.py
fivesixzero/circuitpython-experiments
d1ddb79357aa7c8ed06c783403dafa59b3e4fe58
[ "MIT" ]
3
2021-11-12T01:37:54.000Z
2021-12-19T23:43:44.000Z
clue-nrf52/apds9960-testing/v2/clue-testing/config_regs_apds.py
fivesixzero/circuitpython-experiments
d1ddb79357aa7c8ed06c783403dafa59b3e4fe58
[ "MIT" ]
null
null
null
clue-nrf52/apds9960-testing/v2/clue-testing/config_regs_apds.py
fivesixzero/circuitpython-experiments
d1ddb79357aa7c8ed06c783403dafa59b3e4fe58
[ "MIT" ]
null
null
null
from adafruit_bus_device.i2c_device import I2CDevice from adafruit_apds9960.apds9960 import APDS9960 try: # Only used for typing from typing import Dict except ImportError: pass class ConfigRegsAPDS: def __init__(self, *, apds: APDS9960=None, i2c_bus=None): if not apds: if not i2c...
32.411765
114
0.602995
from adafruit_bus_device.i2c_device import I2CDevice from adafruit_apds9960.apds9960 import APDS9960 try: from typing import Dict except ImportError: pass class ConfigRegsAPDS: def __init__(self, *, apds: APDS9960=None, i2c_bus=None): if not apds: if not i2c_bus: i...
true
true
f735bc49387622b0b3605fd0ea721fdc2eb10832
9,127
py
Python
src/main.py
thuongton999/flappy-peter-teo
0b4c91670a98bef5128400f98cbf1e06a10e0b02
[ "MIT" ]
4
2021-09-12T07:22:16.000Z
2022-02-14T10:03:46.000Z
src/main.py
thuongton999/flappy-peter-teo
0b4c91670a98bef5128400f98cbf1e06a10e0b02
[ "MIT" ]
null
null
null
src/main.py
thuongton999/flappy-peter-teo
0b4c91670a98bef5128400f98cbf1e06a10e0b02
[ "MIT" ]
null
null
null
# Flappy Bird made by Thuongton999 # Ez-ist mode from settings import * from objects import * def birdCollision(bird, column): return ( bird.positionX < column.positionX + column.WIDTH and bird.positionX + bird.WIDTH > column.positionX and bird.positionY < column.positionY + colu...
39.855895
137
0.617728
from settings import * from objects import * def birdCollision(bird, column): return ( bird.positionX < column.positionX + column.WIDTH and bird.positionX + bird.WIDTH > column.positionX and bird.positionY < column.positionY + column.HEIGHT and bird.positionY + bird.HEIGH...
true
true
f735bd31e6bc4abf4872889f80575cdf0932bcac
2,043
py
Python
src/AngleMeasurement/RP1DClustering.py
paigeco/VirtualGoniometer
536e7e77fbb036ad8d777b42e751a0f3e80b8242
[ "CC0-1.0" ]
1
2021-02-22T02:53:26.000Z
2021-02-22T02:53:26.000Z
src/AngleMeasurement/RP1DClustering.py
paigeco/VirtualGoniometer
536e7e77fbb036ad8d777b42e751a0f3e80b8242
[ "CC0-1.0" ]
5
2021-03-26T15:15:34.000Z
2021-06-11T20:16:00.000Z
src/AngleMeasurement/RP1DClustering.py
paigeco/VirtualGoniometer
536e7e77fbb036ad8d777b42e751a0f3e80b8242
[ "CC0-1.0" ]
null
null
null
import numpy as np from .PCASmallestEig import pca_smallest_eig, pca_smallest_eig_powermethod from .Withness import withness from .CalculateAngle import get_angle #RP1D clustering from #Han, Sangchun, and Mireille Boutin. "The hidden structure of image datasets." 2015 IEEE International Conference on Image Processing ...
25.860759
153
0.541361
import numpy as np from .PCASmallestEig import pca_smallest_eig, pca_smallest_eig_powermethod from .Withness import withness from .CalculateAngle import get_angle def ClusteringMeanRP1D(P,N,T,A=0,UsePCA=True,UsePower=False): n = N.shape[0] d = N.shape[1] v = np.random.rand(T,d) if UsePowe...
true
true
f735bd7fdd31df3cdede5e7ae4babf9182954552
17,836
py
Python
mriqc/interfaces/anatomical.py
nipreps/mriqc
e021008da0a2ef1c48e882baf932139a673349f9
[ "Apache-2.0" ]
15
2021-09-25T17:37:17.000Z
2022-03-31T05:29:38.000Z
mriqc/interfaces/anatomical.py
oesteban/mriqc
e021008da0a2ef1c48e882baf932139a673349f9
[ "Apache-2.0" ]
87
2021-09-24T09:48:41.000Z
2022-03-28T11:00:28.000Z
mriqc/interfaces/anatomical.py
nipreps/mriqc
e021008da0a2ef1c48e882baf932139a673349f9
[ "Apache-2.0" ]
9
2021-09-29T17:03:57.000Z
2022-03-28T11:57:25.000Z
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: # # Copyright 2021 The NiPreps Developers <nipreps@gmail.com> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may...
33.338318
88
0.617403
import os.path as op from builtins import zip import nibabel as nb import numpy as np import scipy.ndimage as nd from mriqc.qc.anatomical import ( art_qi1, art_qi2, cjv, cnr, efc, fber, rpve, snr, snr_dietrich, summary_stats, volume_fraction, wm2max, ) from mriqc.utils.m...
true
true
f735be27f6eb25d8ee16a99aaab2b9b696fe22b1
1,800
py
Python
api/charts.py
carrier-io/backend_performance
a6f9ff682dabe8103733b51e23a01c2553e3aacc
[ "Apache-2.0" ]
null
null
null
api/charts.py
carrier-io/backend_performance
a6f9ff682dabe8103733b51e23a01c2553e3aacc
[ "Apache-2.0" ]
null
null
null
api/charts.py
carrier-io/backend_performance
a6f9ff682dabe8103733b51e23a01c2553e3aacc
[ "Apache-2.0" ]
1
2021-06-16T12:14:42.000Z
2021-06-16T12:14:42.000Z
from ...shared.utils.restApi import RestResource from ...shared.utils.api_utils import build_req_parser from ..utils.charts_utils import (requests_summary, requests_hits, avg_responses, summary_table, get_issues, get_data_from_influx) class ReportChartsAPI(RestResource): get_rule...
40
108
0.614444
from ...shared.utils.restApi import RestResource from ...shared.utils.api_utils import build_req_parser from ..utils.charts_utils import (requests_summary, requests_hits, avg_responses, summary_table, get_issues, get_data_from_influx) class ReportChartsAPI(RestResource): get_rule...
true
true
f735beed301629b3bd7382dd9c3ee57eb053f65d
5,491
py
Python
unit_tests/add_land_charge/test_charge_description.py
LandRegistry/maintain-frontend
d92446a9972ebbcd9a43a7a7444a528aa2f30bf7
[ "MIT" ]
1
2019-10-03T13:58:29.000Z
2019-10-03T13:58:29.000Z
unit_tests/add_land_charge/test_charge_description.py
LandRegistry/maintain-frontend
d92446a9972ebbcd9a43a7a7444a528aa2f30bf7
[ "MIT" ]
null
null
null
unit_tests/add_land_charge/test_charge_description.py
LandRegistry/maintain-frontend
d92446a9972ebbcd9a43a7a7444a528aa2f30bf7
[ "MIT" ]
1
2021-04-11T05:24:57.000Z
2021-04-11T05:24:57.000Z
from maintain_frontend import main from flask_testing import TestCase from unit_tests.utilities import Utilities from maintain_frontend.dependencies.session_api.session import Session from maintain_frontend.models import LocalLandChargeItem from maintain_frontend.constants.permissions import Permissions from flask impo...
44.642276
109
0.729557
from maintain_frontend import main from flask_testing import TestCase from unit_tests.utilities import Utilities from maintain_frontend.dependencies.session_api.session import Session from maintain_frontend.models import LocalLandChargeItem from maintain_frontend.constants.permissions import Permissions from flask impo...
true
true
f735bef05d8b537cc5a95a3cbaf0b56e519999db
5,006
py
Python
api/util.py
GrumpyMeow/ownphotos-backend
98d8e9136e9188009afe08657f943dba3df80ccb
[ "MIT" ]
null
null
null
api/util.py
GrumpyMeow/ownphotos-backend
98d8e9136e9188009afe08657f943dba3df80ccb
[ "MIT" ]
null
null
null
api/util.py
GrumpyMeow/ownphotos-backend
98d8e9136e9188009afe08657f943dba3df80ccb
[ "MIT" ]
null
null
null
import base64 import pickle import itertools from scipy import linalg from sklearn.decomposition import PCA import numpy as np from sklearn import cluster from sklearn import mixture from scipy.spatial import distance from sklearn.preprocessing import StandardScaler import requests from config import mapzen_api_key...
35.006993
125
0.620655
import base64 import pickle import itertools from scipy import linalg from sklearn.decomposition import PCA import numpy as np from sklearn import cluster from sklearn import mixture from scipy.spatial import distance from sklearn.preprocessing import StandardScaler import requests from config import mapzen_api_key...
true
true
f735bfb68d5e14f28769863f789bd090ff80a21a
49,230
py
Python
ceed/tests/test_app/test_stage.py
matham/Ceed
b81a14a6b8211e5f4582418ddea34c951ab2667e
[ "MIT" ]
null
null
null
ceed/tests/test_app/test_stage.py
matham/Ceed
b81a14a6b8211e5f4582418ddea34c951ab2667e
[ "MIT" ]
null
null
null
ceed/tests/test_app/test_stage.py
matham/Ceed
b81a14a6b8211e5f4582418ddea34c951ab2667e
[ "MIT" ]
null
null
null
import os import sys import math from contextlib import contextmanager from math import isclose import numpy as np import pytest import ceed from .examples.stages import create_test_stages, make_stage, StageWrapper, \ stage_classes, assert_stages_same from typing import Type, List, Union from ceed.tests.ceed_app i...
38.70283
80
0.653971
import os import sys import math from contextlib import contextmanager from math import isclose import numpy as np import pytest import ceed from .examples.stages import create_test_stages, make_stage, StageWrapper, \ stage_classes, assert_stages_same from typing import Type, List, Union from ceed.tests.ceed_app i...
true
true
f735c01bc52db529a6823dbff4e72eb236525344
1,495
py
Python
python/examples/detection/ttfnet_darknet53_1x_coco/test_client.py
BeyondYourself/Serving
5114f5ce513d8d37890ef3678cef08fb2ca861af
[ "Apache-2.0" ]
null
null
null
python/examples/detection/ttfnet_darknet53_1x_coco/test_client.py
BeyondYourself/Serving
5114f5ce513d8d37890ef3678cef08fb2ca861af
[ "Apache-2.0" ]
null
null
null
python/examples/detection/ttfnet_darknet53_1x_coco/test_client.py
BeyondYourself/Serving
5114f5ce513d8d37890ef3678cef08fb2ca861af
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
32.5
86
0.718395
import sys import numpy as np from paddle_serving_client import Client from paddle_serving_app.reader import * import cv2 preprocess = DetectionSequential([ DetectionFile2Image(), DetectionResize( (512, 512), False, interpolation=cv2.INTER_LINEAR), DetectionNormalize([123.675, 116.28, 1...
true
true
f735c02fc48a16ad8263f2a86d856d6bf5e86980
58
py
Python
zad4_2.py
kamilhabrych/python-semestr5-lista4
8370b187130cd9cfef51d36459a9f3b49cefa949
[ "MIT" ]
null
null
null
zad4_2.py
kamilhabrych/python-semestr5-lista4
8370b187130cd9cfef51d36459a9f3b49cefa949
[ "MIT" ]
null
null
null
zad4_2.py
kamilhabrych/python-semestr5-lista4
8370b187130cd9cfef51d36459a9f3b49cefa949
[ "MIT" ]
null
null
null
napis = str(input("Podaj napis:")) print(napis.count('a'))
29
34
0.672414
napis = str(input("Podaj napis:")) print(napis.count('a'))
true
true
f735c16494901b088e2dd2495a483bc7fb16638c
2,202
py
Python
src/mail.py
ishritam/Company-info-auto-mail-sender
27427f8e126386f1a202dda2addba70f74c322a1
[ "MIT" ]
null
null
null
src/mail.py
ishritam/Company-info-auto-mail-sender
27427f8e126386f1a202dda2addba70f74c322a1
[ "MIT" ]
null
null
null
src/mail.py
ishritam/Company-info-auto-mail-sender
27427f8e126386f1a202dda2addba70f74c322a1
[ "MIT" ]
null
null
null
import smtplib from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from email.mime.base import MIMEBase from email import encoders from datetime import datetime import logging import json with open('config.json', 'r') as config: params = json.load(config)["params"] # par...
40.036364
170
0.683924
import smtplib from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from email.mime.base import MIMEBase from email import encoders from datetime import datetime import logging import json with open('config.json', 'r') as config: params = json.load(config)["params"] l...
true
true
f735c18a5eec3c534465aea56ee3b6ce5c668fe6
475
py
Python
lib/extensions/__init__.py
renebentes/JoomlaProjects
30c07041b90fc51e4de3fb544b378854f71db2f1
[ "MIT" ]
1
2015-04-19T10:36:18.000Z
2015-04-19T10:36:18.000Z
lib/extensions/__init__.py
renebentes/JoomlaProjects
30c07041b90fc51e4de3fb544b378854f71db2f1
[ "MIT" ]
null
null
null
lib/extensions/__init__.py
renebentes/JoomlaProjects
30c07041b90fc51e4de3fb544b378854f71db2f1
[ "MIT" ]
1
2015-01-14T02:10:55.000Z
2015-01-14T02:10:55.000Z
# coding: utf-8 import sublime st_version = int(sublime.version()) if st_version > 3000: from JoomlaPack.lib.extensions.component import Component from JoomlaPack.lib.extensions.package import Package from JoomlaPack.lib.extensions.plugin import Plugin else: from lib.extensions.component import Compone...
25
61
0.747368
import sublime st_version = int(sublime.version()) if st_version > 3000: from JoomlaPack.lib.extensions.component import Component from JoomlaPack.lib.extensions.package import Package from JoomlaPack.lib.extensions.plugin import Plugin else: from lib.extensions.component import Component from lib....
true
true
f735c3ab5d7a3453ace6640fe7bb19ef260fc045
145
py
Python
kiri_search/__init__.py
kiri-ai/kiri-search
78a0f78b11b73cca8934054498d5713773d3e93a
[ "Apache-2.0" ]
null
null
null
kiri_search/__init__.py
kiri-ai/kiri-search
78a0f78b11b73cca8934054498d5713773d3e93a
[ "Apache-2.0" ]
null
null
null
kiri_search/__init__.py
kiri-ai/kiri-search
78a0f78b11b73cca8934054498d5713773d3e93a
[ "Apache-2.0" ]
null
null
null
from .core import Kiri from .search import ElasticDocStore, Document, ChunkedDocument, ElasticDocument, ElasticChunkedDocument, InMemoryDocStore
48.333333
121
0.862069
from .core import Kiri from .search import ElasticDocStore, Document, ChunkedDocument, ElasticDocument, ElasticChunkedDocument, InMemoryDocStore
true
true
f735c414bba1419088affd6eca51ac71316e0dd2
2,542
py
Python
tests/python/gaia-ui-tests/gaiatest/apps/email/regions/new_email.py
dcoloma/gaia
e542540cfa64c31ac8bb71b1a9cf16879fc9d58e
[ "Apache-2.0" ]
1
2017-09-09T12:55:56.000Z
2017-09-09T12:55:56.000Z
tests/python/gaia-ui-tests/gaiatest/apps/email/regions/new_email.py
dcoloma/gaia
e542540cfa64c31ac8bb71b1a9cf16879fc9d58e
[ "Apache-2.0" ]
null
null
null
tests/python/gaia-ui-tests/gaiatest/apps/email/regions/new_email.py
dcoloma/gaia
e542540cfa64c31ac8bb71b1a9cf16879fc9d58e
[ "Apache-2.0" ]
null
null
null
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from marionette.by import By from gaiatest.apps.base import Base class NewEmail(Base): # Write new email _vie...
41.672131
95
0.696302
from marionette.by import By from gaiatest.apps.base import Base class NewEmail(Base): _view_locator = (By.CSS_SELECTOR, '#cardContainer .card-compose') _to_locator = (By.CSS_SELECTOR, '#cardContainer .card.center .cmp-to-text.cmp-addr-text') _cc_locator = (By.CSS_SELECTOR, '#cardContainer .card.cen...
true
true
f735c423a5ff8820d689878cd70ec7e4bd7e308f
386
py
Python
saltdash/wsgi.py
lincolnloop/saltdash
4b0268cf9ce0320272f0182f33b046d4ab7766a2
[ "MIT" ]
19
2018-01-30T00:10:14.000Z
2021-11-11T10:26:56.000Z
saltdash/wsgi.py
lincolnloop/saltdash
4b0268cf9ce0320272f0182f33b046d4ab7766a2
[ "MIT" ]
118
2018-01-26T18:27:47.000Z
2022-02-10T07:31:20.000Z
saltdash/wsgi.py
lincolnloop/saltdash
4b0268cf9ce0320272f0182f33b046d4ab7766a2
[ "MIT" ]
2
2021-07-13T00:32:02.000Z
2021-11-11T10:27:03.000Z
import sys from django.conf import settings from django.core.wsgi import get_wsgi_application application = get_wsgi_application() # Warm-up wsgi app on import warmup = application( { "REQUEST_METHOD": "GET", "SERVER_NAME": "127.0.0.1", "SERVER_PORT": 80, "PATH_INFO": "/-/alive/",...
20.315789
49
0.621762
import sys from django.conf import settings from django.core.wsgi import get_wsgi_application application = get_wsgi_application() warmup = application( { "REQUEST_METHOD": "GET", "SERVER_NAME": "127.0.0.1", "SERVER_PORT": 80, "PATH_INFO": "/-/alive/", "wsgi.input": sys.st...
true
true
f735c693706d55cb0fb635532de5320536fb224e
2,281
py
Python
test/unit/tool_util/toolbox/test_watcher.py
beatrizserrano/galaxy
e149d9d32e1bca6c07c38b1a9cdabfee60323610
[ "CC-BY-3.0" ]
null
null
null
test/unit/tool_util/toolbox/test_watcher.py
beatrizserrano/galaxy
e149d9d32e1bca6c07c38b1a9cdabfee60323610
[ "CC-BY-3.0" ]
6
2021-11-11T20:57:49.000Z
2021-12-10T15:30:33.000Z
test/unit/tool_util/toolbox/test_watcher.py
beatrizserrano/galaxy
e149d9d32e1bca6c07c38b1a9cdabfee60323610
[ "CC-BY-3.0" ]
null
null
null
import tempfile import time from contextlib import contextmanager from os import path from shutil import rmtree import pytest from galaxy.tool_util.toolbox import watcher from galaxy.util import bunch @pytest.mark.skipif(not watcher.can_watch, reason="watchdog not available") def test_watcher(): with __test_dir...
26.218391
87
0.65673
import tempfile import time from contextlib import contextmanager from os import path from shutil import rmtree import pytest from galaxy.tool_util.toolbox import watcher from galaxy.util import bunch @pytest.mark.skipif(not watcher.can_watch, reason="watchdog not available") def test_watcher(): with __test_dir...
true
true
f735c714304c3b5527411ae0ba5ef0803ae3852d
196
py
Python
sbsearch/__init__.py
mkelley/sbsearch
7569e473cf0b8f5df3cfc7332ae4287a780d28d2
[ "BSD-3-Clause" ]
null
null
null
sbsearch/__init__.py
mkelley/sbsearch
7569e473cf0b8f5df3cfc7332ae4287a780d28d2
[ "BSD-3-Clause" ]
null
null
null
sbsearch/__init__.py
mkelley/sbsearch
7569e473cf0b8f5df3cfc7332ae4287a780d28d2
[ "BSD-3-Clause" ]
null
null
null
# Licensed with the 3-clause BSD license. See LICENSE for details. try: from .version import version as __version__ except ImportError: __version__ = "" from .sbsearch import * # noqa
21.777778
67
0.72449
try: from .version import version as __version__ except ImportError: __version__ = "" from .sbsearch import *
true
true
f735c73fa8542b9c0faec59fb6dc99f1bca85d50
304
py
Python
doc/conf.py
tombaker/mklists_old
cf3ca814cf2cfc785a8cdbddd33162b9ee658570
[ "MIT" ]
1
2021-07-02T03:41:57.000Z
2021-07-02T03:41:57.000Z
doc/conf.py
tombaker/mklists_old
cf3ca814cf2cfc785a8cdbddd33162b9ee658570
[ "MIT" ]
null
null
null
doc/conf.py
tombaker/mklists_old
cf3ca814cf2cfc785a8cdbddd33162b9ee658570
[ "MIT" ]
null
null
null
project = "mklists" copyright = "2020, Tom Baker" author = "Tom Baker" release = "0.2" extensions = [] templates_path = ["_templates"] exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] html_theme = "default" github_project_url = "https://github.com/tombaker/mklists" html_static_path = ["_static"]
27.636364
58
0.713816
project = "mklists" copyright = "2020, Tom Baker" author = "Tom Baker" release = "0.2" extensions = [] templates_path = ["_templates"] exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] html_theme = "default" github_project_url = "https://github.com/tombaker/mklists" html_static_path = ["_static"]
true
true
f735c80dafefca62fbe4588f2fa52f2ceed09235
57,744
py
Python
databricks/koalas/base.py
igorlucci/koalas
8803344d620261981003175bd1edc3c4120b84e2
[ "Apache-2.0" ]
1
2021-07-16T20:32:32.000Z
2021-07-16T20:32:32.000Z
databricks/koalas/base.py
igorlucci/koalas
8803344d620261981003175bd1edc3c4120b84e2
[ "Apache-2.0" ]
null
null
null
databricks/koalas/base.py
igorlucci/koalas
8803344d620261981003175bd1edc3c4120b84e2
[ "Apache-2.0" ]
null
null
null
# # Copyright (C) 2019 Databricks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
35.1883
100
0.551988
from abc import ABCMeta, abstractmethod import datetime from functools import wraps, partial from typing import Any, Callable, Tuple, Union, cast, TYPE_CHECKING import warnings import numpy as np import pandas as pd from pandas.api.types import is_list_like from pyspark import sql as spark from pyspark.sql import fu...
true
true
f735c8f12c8094d4f4ec79448a80403fe86acc03
10,531
py
Python
main.py
abhi526691/Covid-Guard
9c050ef44201c01f512169ffb146ad0da5278ec1
[ "MIT" ]
5
2020-08-26T18:39:29.000Z
2020-11-16T13:05:11.000Z
main.py
abhi526691/Covid-Guard
9c050ef44201c01f512169ffb146ad0da5278ec1
[ "MIT" ]
null
null
null
main.py
abhi526691/Covid-Guard
9c050ef44201c01f512169ffb146ad0da5278ec1
[ "MIT" ]
2
2020-10-07T15:12:51.000Z
2020-10-22T08:49:13.000Z
# import the necessary packages from tensorflow.keras.preprocessing.image import img_to_array from tensorflow.keras.applications.mobilenet_v2 import preprocess_input from tensorflow.keras.models import load_model from imutils.video import VideoStream,FileVideoStream import imutils import numpy as np import time ...
32.603715
88
0.628145
from tensorflow.keras.preprocessing.image import img_to_array from tensorflow.keras.applications.mobilenet_v2 import preprocess_input from tensorflow.keras.models import load_model from imutils.video import VideoStream,FileVideoStream import imutils import numpy as np import time import os import cv2 import ma...
true
true
f735c99cac1d4b91c2534863c9a3f45ff76fd782
2,618
py
Python
day16-part1/main.py
KSonny4/advent-of-code-2021
ca4cf2e94799174468950019a562ed9063001599
[ "MIT" ]
4
2021-12-02T21:17:43.000Z
2021-12-05T22:15:28.000Z
day16-part1/main.py
KSonny4/advent-of-code-2021
ca4cf2e94799174468950019a562ed9063001599
[ "MIT" ]
null
null
null
day16-part1/main.py
KSonny4/advent-of-code-2021
ca4cf2e94799174468950019a562ed9063001599
[ "MIT" ]
null
null
null
from dataclasses import dataclass from enum import Enum from typing import List, Tuple, Union, Any VERSIONS_SUM = 0 class TypeID(Enum): LITERAL_VALUE = 4 @dataclass class LiteralValue: packet_version: int packet_type_id: int parts: List[str] decimal: int @dataclass class OperatorPacket: ...
21.459016
87
0.607716
from dataclasses import dataclass from enum import Enum from typing import List, Tuple, Union, Any VERSIONS_SUM = 0 class TypeID(Enum): LITERAL_VALUE = 4 @dataclass class LiteralValue: packet_version: int packet_type_id: int parts: List[str] decimal: int @dataclass class OperatorPacket: ...
true
true
f735ca903d6e0f2818ec50f7707d4002984535b4
3,119
py
Python
strings/string_search/z_algorithm/python/Z_algorithm.py
avi-pal/al-go-rithms
5167a20f1db7b366ff19f2962c1746a02e4f5067
[ "CC0-1.0" ]
1,253
2017-06-06T07:19:25.000Z
2022-03-30T17:07:58.000Z
strings/string_search/z_algorithm/python/Z_algorithm.py
rishabh99-rc/al-go-rithms
4df20d7ef7598fda4bc89101f9a99aac94cdd794
[ "CC0-1.0" ]
554
2017-09-29T18:56:01.000Z
2022-02-21T15:48:13.000Z
strings/string_search/z_algorithm/python/Z_algorithm.py
rishabh99-rc/al-go-rithms
4df20d7ef7598fda4bc89101f9a99aac94cdd794
[ "CC0-1.0" ]
2,226
2017-09-29T19:59:59.000Z
2022-03-25T08:59:55.000Z
#!/bin/python3 import sys, string from random import * from timeit import default_timer as timer def randstr(N,alphabet=string.ascii_lowercase): l=len(alphabet) return "".join( alphabet[randint(0,l-1)] for _ in range(N)) def timefunc(func, *args, **kwargs): """Time a function. args: iterati...
20.385621
110
0.436358
import sys, string from random import * from timeit import default_timer as timer def randstr(N,alphabet=string.ascii_lowercase): l=len(alphabet) return "".join( alphabet[randint(0,l-1)] for _ in range(N)) def timefunc(func, *args, **kwargs): try: iterations = kwargs.pop('iterations') except...
true
true
f735caac43d63be3a59c8ea26a0d53fa7897631d
131,132
py
Python
pyNastran/op2/tables/geom/ept.py
fmamitrotta/pyNastran
6f9592cf3a2ccb8c509918acb735282d6eef75aa
[ "BSD-3-Clause" ]
293
2015-03-22T20:22:01.000Z
2022-03-14T20:28:24.000Z
pyNastran/op2/tables/geom/ept.py
sean-engelstad/pyNastran
90f957887a4f68f8e58b07c15e1ac69c66b9c6f4
[ "BSD-3-Clause" ]
512
2015-03-14T18:39:27.000Z
2022-03-31T16:15:43.000Z
pyNastran/op2/tables/geom/ept.py
sean-engelstad/pyNastran
90f957887a4f68f8e58b07c15e1ac69c66b9c6f4
[ "BSD-3-Clause" ]
136
2015-03-19T03:26:06.000Z
2022-03-25T22:14:54.000Z
""" defines readers for BDF objects in the OP2 EPT/EPTS table """ #pylint: disable=C0103,R0914 from __future__ import annotations from struct import unpack, Struct from functools import partial from typing import Tuple, List, TYPE_CHECKING import numpy as np #from pyNastran import is_release from pyNastran.bdf.cards....
41.615995
952
0.503676
from __future__ import annotations from struct import unpack, Struct from functools import partial from typing import Tuple, List, TYPE_CHECKING import numpy as np from pyNastran.bdf.cards.properties.mass import PMASS, NSM, NSML from pyNastran.bdf.cards.properties.bars import PBAR, PBARL, PBEND, PBEAM3 from pyNastran...
true
true
f735cbd60586e7a60325ea6879b020b987b34a4b
810
py
Python
cloneEveryHourFor48Hours.py
keotl/TA-tools
1ad5466e2470e8009ad4825c6fd21f37f567e8dd
[ "MIT" ]
null
null
null
cloneEveryHourFor48Hours.py
keotl/TA-tools
1ad5466e2470e8009ad4825c6fd21f37f567e8dd
[ "MIT" ]
null
null
null
cloneEveryHourFor48Hours.py
keotl/TA-tools
1ad5466e2470e8009ad4825c6fd21f37f567e8dd
[ "MIT" ]
1
2019-09-03T17:47:51.000Z
2019-09-03T17:47:51.000Z
#!/usr/bin/python3 import subprocess; import datetime; import time; import threading; import argparse; parser = argparse.ArgumentParser(description="sleep 3600 pour remise"); parser.add_argument("--destination", help='base dir destination'); parser.add_argument("--branch", help="branch to be checked out"); args = pa...
27
110
0.698765
import subprocess; import datetime; import time; import threading; import argparse; parser = argparse.ArgumentParser(description="sleep 3600 pour remise"); parser.add_argument("--destination", help='base dir destination'); parser.add_argument("--branch", help="branch to be checked out"); args = parser.parse_args(); ...
true
true
f735cc7446deb1248e077f55440f4483396ccf9c
4,181
py
Python
bot/exts/info/source.py
zeph-yrus9/bot
5fe110b9a49144480ebca34dec65de91753994ec
[ "MIT", "BSD-3-Clause" ]
22
2018-02-03T12:39:12.000Z
2018-10-03T22:19:23.000Z
bot/exts/info/source.py
zeph-yrus9/bot
5fe110b9a49144480ebca34dec65de91753994ec
[ "MIT", "BSD-3-Clause" ]
52
2018-02-09T14:00:39.000Z
2018-06-06T17:29:32.000Z
bot/exts/info/source.py
zeph-yrus9/bot
5fe110b9a49144480ebca34dec65de91753994ec
[ "MIT", "BSD-3-Clause" ]
15
2018-02-09T13:37:17.000Z
2018-05-10T13:17:58.000Z
import inspect from pathlib import Path from typing import Optional, Tuple, Union from discord import Embed from discord.ext import commands from bot.bot import Bot from bot.constants import URLs from bot.converters import SourceConverter from bot.exts.info.tags import TagIdentifier SourceType = Union[commands.HelpC...
40.201923
116
0.654867
import inspect from pathlib import Path from typing import Optional, Tuple, Union from discord import Embed from discord.ext import commands from bot.bot import Bot from bot.constants import URLs from bot.converters import SourceConverter from bot.exts.info.tags import TagIdentifier SourceType = Union[commands.HelpC...
true
true
f735ce75cb3189d592ca1a91116e1da6432e4695
326
py
Python
manage.py
rmboot/approvalsystem
b084ecb5fa4b401a052f3cf2a307af1d55f3c8fc
[ "MIT" ]
3
2019-04-16T04:11:11.000Z
2021-09-19T02:38:49.000Z
manage.py
rmboot/approvalsystem
b084ecb5fa4b401a052f3cf2a307af1d55f3c8fc
[ "MIT" ]
4
2019-06-04T11:14:22.000Z
2021-09-08T01:11:26.000Z
manage.py
rmboot/approvalsystem
b084ecb5fa4b401a052f3cf2a307af1d55f3c8fc
[ "MIT" ]
4
2019-10-10T15:04:31.000Z
2021-06-19T17:03:06.000Z
from flask_migrate import Migrate, MigrateCommand from flask_script import Manager from approval_system import create_app from approval_system.extensions import db app = create_app() manager = Manager(app) migrate = Migrate(app, db) manager.add_command('db', MigrateCommand) if __name__ == '__main__': manager....
19.176471
49
0.785276
from flask_migrate import Migrate, MigrateCommand from flask_script import Manager from approval_system import create_app from approval_system.extensions import db app = create_app() manager = Manager(app) migrate = Migrate(app, db) manager.add_command('db', MigrateCommand) if __name__ == '__main__': manager....
true
true
f735cf81e2ea3e8120be5104973afe9ad14ad25d
57,266
py
Python
Experiments/src/Task Control - Python/UR5Class.py
FelipeH92/Task-Space-Control-Vision
77d9f709d7cb0afb50ef9baf6ba39304aca445e5
[ "CC-BY-4.0" ]
null
null
null
Experiments/src/Task Control - Python/UR5Class.py
FelipeH92/Task-Space-Control-Vision
77d9f709d7cb0afb50ef9baf6ba39304aca445e5
[ "CC-BY-4.0" ]
null
null
null
Experiments/src/Task Control - Python/UR5Class.py
FelipeH92/Task-Space-Control-Vision
77d9f709d7cb0afb50ef9baf6ba39304aca445e5
[ "CC-BY-4.0" ]
1
2021-11-08T23:50:33.000Z
2021-11-08T23:50:33.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- ## @package UR5 # Documentação para o pacote de classes UR5. # # Documentação do código produzido para controle do manipulador UR5 e geração e controle de suas posições. # Cada código aqui documentado possui uma breve descrição de sua função, suas entradas e saídas. i...
46.256866
222
0.524412
import numpy as np from numpy.linalg import inv from numpy.linalg import norm from numpy.linalg import pinv from scipy.signal import butter,lfilter from scipy.signal import freqz import struct import time import csv import Transformations as tf import os class UR5Class: _standard_DH = np.mat([[0,-...
true
true
f735d0e633001aab0366d4b6659ef304fb957519
845
py
Python
odml/gui/__main__.py
carloscanova/python-odml
dff793bff86187b67be139c0f32c7cd036ba8db4
[ "BSD-4-Clause" ]
null
null
null
odml/gui/__main__.py
carloscanova/python-odml
dff793bff86187b67be139c0f32c7cd036ba8db4
[ "BSD-4-Clause" ]
null
null
null
odml/gui/__main__.py
carloscanova/python-odml
dff793bff86187b67be139c0f32c7cd036ba8db4
[ "BSD-4-Clause" ]
null
null
null
#!/usr/bin/env python import gtk import Editor def main(filenames=[]): """ start the editor, with a new empty document or load all *filenames* as tabs returns the tab object """ Editor.register_stock_icons() editor = Editor.EditorWindow() tabs = map(editor.load_document, filenames) ...
22.236842
61
0.623669
import gtk import Editor def main(filenames=[]): Editor.register_stock_icons() editor = Editor.EditorWindow() tabs = map(editor.load_document, filenames) if len(filenames) == 0: editor.welcome() return tabs def run(): try: from ctypes import cdll libc = cdll.LoadLibrar...
true
true
f735d103558b450b8555fe74915f3f20a5ba2d42
4,680
py
Python
tests/test_reporters.py
indigoviolet/region_profiler
119a3624ee063d86e8e66de9fa97cccd7964f943
[ "MIT" ]
null
null
null
tests/test_reporters.py
indigoviolet/region_profiler
119a3624ee063d86e8e66de9fa97cccd7964f943
[ "MIT" ]
null
null
null
tests/test_reporters.py
indigoviolet/region_profiler
119a3624ee063d86e8e66de9fa97cccd7964f943
[ "MIT" ]
null
null
null
import sys from typing import List import pytest from region_profiler import RegionProfiler from region_profiler import reporter_columns as cols from region_profiler.reporters import ( ConsoleReporter, CsvReporter, SilentReporter, Slice, get_profiler_slice, ) from region_profiler.utils import SeqSt...
30.588235
84
0.569231
import sys from typing import List import pytest from region_profiler import RegionProfiler from region_profiler import reporter_columns as cols from region_profiler.reporters import ( ConsoleReporter, CsvReporter, SilentReporter, Slice, get_profiler_slice, ) from region_profiler.utils import SeqSt...
true
true
f735d114acfbbc7d006b9ce0ce107c90ffa2fae2
324
py
Python
simulator/kruxsim/mocks/flash.py
odudex/krux
db421a3f107c0263221e5f1e877e9c38925bb17c
[ "MIT" ]
null
null
null
simulator/kruxsim/mocks/flash.py
odudex/krux
db421a3f107c0263221e5f1e877e9c38925bb17c
[ "MIT" ]
13
2022-03-21T05:35:03.000Z
2022-03-31T14:31:46.000Z
simulator/kruxsim/mocks/flash.py
odudex/krux
db421a3f107c0263221e5f1e877e9c38925bb17c
[ "MIT" ]
null
null
null
import sys from unittest import mock flash = bytearray(8 * 1024 * 1024) def read_data(addr, amount): return flash[addr : addr + amount] def write_data(addr, data): flash[addr : addr + len(data)] = data if "flash" not in sys.modules: sys.modules["flash"] = mock.MagicMock(read=read_data, write=write_da...
19.058824
75
0.691358
import sys from unittest import mock flash = bytearray(8 * 1024 * 1024) def read_data(addr, amount): return flash[addr : addr + amount] def write_data(addr, data): flash[addr : addr + len(data)] = data if "flash" not in sys.modules: sys.modules["flash"] = mock.MagicMock(read=read_data, write=write_da...
true
true
f735d1900984061043b641ab5d3f5887318d3656
6,714
py
Python
src/mainwin.py
coljac/magicbrowse
a5b4d8c3c3ef9994918ec024b726d2b3d6eba695
[ "MIT" ]
null
null
null
src/mainwin.py
coljac/magicbrowse
a5b4d8c3c3ef9994918ec024b726d2b3d6eba695
[ "MIT" ]
null
null
null
src/mainwin.py
coljac/magicbrowse
a5b4d8c3c3ef9994918ec024b726d2b3d6eba695
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'mainwindow.ui' # # Created by: PyQt5 UI code generator 5.11.3 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MtgBrowse(object): def setupUi(self, MtgBrowse): MtgBrow...
55.95
115
0.737563
from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MtgBrowse(object): def setupUi(self, MtgBrowse): MtgBrowse.setObjectName("MtgBrowse") MtgBrowse.resize(1120, 1073) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizon...
true
true
f735d1b207af86fc20b10c7aab955f604760663c
118
py
Python
learn_mongodb/p1_crud/p3_update/__init__.py
MacHu-GWU/learn_mongodb-project
e5f5a96603e71ca762bdb56951fa7e5ce143d810
[ "MIT" ]
null
null
null
learn_mongodb/p1_crud/p3_update/__init__.py
MacHu-GWU/learn_mongodb-project
e5f5a96603e71ca762bdb56951fa7e5ce143d810
[ "MIT" ]
null
null
null
learn_mongodb/p1_crud/p3_update/__init__.py
MacHu-GWU/learn_mongodb-project
e5f5a96603e71ca762bdb56951fa7e5ce143d810
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ ref: https://docs.mongodb.com/manual/reference/operator/update/ """
19.666667
63
0.644068
true
true
f735d33c955450b393a844082555926f2cfe08a0
1,222
py
Python
pcat2py/class/23ae8758-5cc5-11e4-af55-00155d01fe08.py
phnomcobra/PCAT2PY
937c3b365cdc5ac69b78f59070be0a21bdb53db0
[ "MIT" ]
null
null
null
pcat2py/class/23ae8758-5cc5-11e4-af55-00155d01fe08.py
phnomcobra/PCAT2PY
937c3b365cdc5ac69b78f59070be0a21bdb53db0
[ "MIT" ]
null
null
null
pcat2py/class/23ae8758-5cc5-11e4-af55-00155d01fe08.py
phnomcobra/PCAT2PY
937c3b365cdc5ac69b78f59070be0a21bdb53db0
[ "MIT" ]
null
null
null
#!/usr/bin/python ################################################################################ # 23ae8758-5cc5-11e4-af55-00155d01fe08 # # Justin Dierking # justindierking@hardbitsolutions.com # phnomcobra@gmail.com # # 10/24/2014 Original Construction ################################################################...
29.095238
80
0.486088
class Finding: def __init__(self): self.output = [] self.is_compliant = False self.uuid = "23ae8758-5cc5-11e4-af55-00155d01fe08" def check(self, cli): self.is_compliant = False stdout = cli.system("ls -l /etc/gshadow") ...
true
true
f735d366d42e472d897ac4bf09f3aebbea4834d2
1,822
py
Python
app/blueprint_auth/views.py
medsci-tech/mime_analysis_flask_2017
4a927219f31db433f4af6a7af3085e05c08b5c3e
[ "MIT" ]
null
null
null
app/blueprint_auth/views.py
medsci-tech/mime_analysis_flask_2017
4a927219f31db433f4af6a7af3085e05c08b5c3e
[ "MIT" ]
null
null
null
app/blueprint_auth/views.py
medsci-tech/mime_analysis_flask_2017
4a927219f31db433f4af6a7af3085e05c08b5c3e
[ "MIT" ]
null
null
null
import datetime import json from flask import url_for from flask import redirect from flask import render_template from flask_login import login_user from flask_login import logout_user from . import blueprint_auth from .forms import RegisterForm from .forms import LoginForm from .utils_cms import generate_code from ....
27.606061
74
0.694292
import datetime import json from flask import url_for from flask import redirect from flask import render_template from flask_login import login_user from flask_login import logout_user from . import blueprint_auth from .forms import RegisterForm from .forms import LoginForm from .utils_cms import generate_code from ....
true
true
f735d3b5b015bc679c6b0fc8a3dfed895d1870f9
9,542
py
Python
BaseTools/Source/Python/GenFds/Fd.py
CEOALT1/RefindPlusUDK
116b957ad735f96fbb6d80a0ba582046960ba164
[ "BSD-2-Clause" ]
2
2018-09-05T02:46:11.000Z
2020-04-14T08:38:31.000Z
BaseTools/Source/Python/GenFds/Fd.py
CEOALT1/RefindPlusUDK
116b957ad735f96fbb6d80a0ba582046960ba164
[ "BSD-2-Clause" ]
5
2020-12-25T05:24:37.000Z
2021-01-11T01:01:01.000Z
BaseTools/Source/Python/GenFds/Fd.py
CEOALT1/RefindPlusUDK
116b957ad735f96fbb6d80a0ba582046960ba164
[ "BSD-2-Clause" ]
16
2020-07-31T17:57:27.000Z
2021-03-10T14:32:36.000Z
## @file # process FD generation # # Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR> # # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license ...
45.655502
222
0.581639
import Region import Fv import Common.LongFilePathOs as os import StringIO import sys from struct import * from GenFdsGlobalVariable import GenFdsGlobalVariable from CommonDataClass.FdfClass import FDClassObject from Common import EdkLogger from Common.BuildToolError import * from Common.Misc import SaveFil...
true
true
f735d4a1ab3e9f74bfda0300638e91a89fa8e131
11,805
py
Python
samples/mnist_vae.py
piojanu/tf_utils
169bd3334dd11954cf8f411f2c918f76cd609fab
[ "MIT" ]
1
2019-04-05T11:41:02.000Z
2019-04-05T11:41:02.000Z
samples/mnist_vae.py
piojanu/tf_utils
169bd3334dd11954cf8f411f2c918f76cd609fab
[ "MIT" ]
null
null
null
samples/mnist_vae.py
piojanu/tf_utils
169bd3334dd11954cf8f411f2c918f76cd609fab
[ "MIT" ]
null
null
null
import argparse import io import os.path import matplotlib.pyplot as plt import numpy as np import tensorflow as tf import tensorflow_probability as tfp from tqdm import tqdm from tf_utils import AttrDict, attrdict_from_yaml, lazy_property_with_scope, share_variables tfd = tfp.distributions tfl = tf.layers class M...
38.452769
103
0.607624
import argparse import io import os.path import matplotlib.pyplot as plt import numpy as np import tensorflow as tf import tensorflow_probability as tfp from tqdm import tqdm from tf_utils import AttrDict, attrdict_from_yaml, lazy_property_with_scope, share_variables tfd = tfp.distributions tfl = tf.layers class M...
true
true
f735d53be2e6d930f20c1daa49019a1b2e41a6e4
1,898
py
Python
General/state_machine.py
TomE8/drones
c92865556dd3df2d5f5b73589cd48e413bff3a3a
[ "MIT" ]
14
2018-10-29T00:52:18.000Z
2022-03-23T20:07:11.000Z
General/state_machine.py
TomE8/drones
c92865556dd3df2d5f5b73589cd48e413bff3a3a
[ "MIT" ]
4
2020-07-12T05:19:05.000Z
2020-09-20T12:40:47.000Z
General/state_machine.py
TomE8/drones
c92865556dd3df2d5f5b73589cd48e413bff3a3a
[ "MIT" ]
2
2019-03-08T01:36:47.000Z
2019-09-12T04:07:19.000Z
#!/usr/bin/env python3 from .general_common import States from Control.control_common import ButtonIndex def getState(state, my_joystick): # ============================================================== if state == States.IDLE: if my_joystick.get_button_val(ButtonIndex.SIDE_BUTTON) == 1: r...
45.190476
70
0.559536
from .general_common import States from Control.control_common import ButtonIndex def getState(state, my_joystick): if state == States.IDLE: if my_joystick.get_button_val(ButtonIndex.SIDE_BUTTON) == 1: return States.STAND_BY elif my_joystick.get_button_val(ButtonIndex.EXIT) == 1: ...
true
true
f735d6da81a04d6a2b61934e81a4273b20c11569
3,568
py
Python
FasterRCNN/layers/roi_align.py
pkyIntelligence/FasterRCNN
230953938efdba8f8c127fcc0bb746fcce8d9463
[ "MIT" ]
null
null
null
FasterRCNN/layers/roi_align.py
pkyIntelligence/FasterRCNN
230953938efdba8f8c127fcc0bb746fcce8d9463
[ "MIT" ]
null
null
null
FasterRCNN/layers/roi_align.py
pkyIntelligence/FasterRCNN
230953938efdba8f8c127fcc0bb746fcce8d9463
[ "MIT" ]
null
null
null
import torch import math from torch import nn from ..utils.utils import point_interpolate class ROIAlign(nn.Module): def __init__(self, output_size, spatial_scale, sampling_ratio): """ Args: output_size (tuple): h, w spatial_scale (float): scale the input boxes by this num...
36.783505
118
0.596693
import torch import math from torch import nn from ..utils.utils import point_interpolate class ROIAlign(nn.Module): def __init__(self, output_size, spatial_scale, sampling_ratio): super(ROIAlign, self).__init__() self.output_size = output_size self.spatial_scale = spatial_scale s...
true
true
f735d7fc324285a6ec875c9f0d297b2c8400e2b9
3,995
py
Python
tests/test_web_cli.py
ikamensh/aiohttp
d836d9b6b6050f9827e39997163a4b194a3a1314
[ "Apache-2.0" ]
null
null
null
tests/test_web_cli.py
ikamensh/aiohttp
d836d9b6b6050f9827e39997163a4b194a3a1314
[ "Apache-2.0" ]
null
null
null
tests/test_web_cli.py
ikamensh/aiohttp
d836d9b6b6050f9827e39997163a4b194a3a1314
[ "Apache-2.0" ]
null
null
null
import pytest from aiohttp import web def test_entry_func_empty(mocker) -> None: error = mocker.patch("aiohttp.web.ArgumentParser.error", side_effect=SystemExit) argv = [""] with pytest.raises(SystemExit): web.main(argv) error.assert_called_with("'entry-func' not in 'module:function' syntax...
30.730769
88
0.701377
import pytest from aiohttp import web def test_entry_func_empty(mocker) -> None: error = mocker.patch("aiohttp.web.ArgumentParser.error", side_effect=SystemExit) argv = [""] with pytest.raises(SystemExit): web.main(argv) error.assert_called_with("'entry-func' not in 'module:function' syntax...
true
true
f735d87a764933885e76c30d33d976d189285b6d
16,617
py
Python
mindhome_alpha/erpnext/accounts/report/general_ledger/general_ledger.py
Mindhome/field_service
3aea428815147903eb9af1d0c1b4b9fc7faed057
[ "MIT" ]
1
2021-04-29T14:55:29.000Z
2021-04-29T14:55:29.000Z
mindhome_alpha/erpnext/accounts/report/general_ledger/general_ledger.py
Mindhome/field_service
3aea428815147903eb9af1d0c1b4b9fc7faed057
[ "MIT" ]
null
null
null
mindhome_alpha/erpnext/accounts/report/general_ledger/general_ledger.py
Mindhome/field_service
3aea428815147903eb9af1d0c1b4b9fc7faed057
[ "MIT" ]
1
2021-04-29T14:39:01.000Z
2021-04-29T14:39:01.000Z
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe, erpnext from erpnext import get_company_currency, get_default_company from erpnext.accounts.report.utils import get_currency, convert_to_...
30.658672
257
0.719624
from __future__ import unicode_literals import frappe, erpnext from erpnext import get_company_currency, get_default_company from erpnext.accounts.report.utils import get_currency, convert_to_presentation_currency from frappe.utils import getdate, cstr, flt, fmt_money from frappe import _, _dict from erpnext.accounts....
true
true