hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 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
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f7f62935cd7063a0317584de4ec7989faeb9b469
789
py
Python
LeetCode/LeetCode_Python-master/LeetCode_Python-master/Algorithm-Easy/387_First_Unique_Character_in_a_String.py
Sycamore-City-passerby/ML
605cfc70bdda2c99e5f1c16b25812b59c98a72ad
[ "MIT" ]
null
null
null
LeetCode/LeetCode_Python-master/LeetCode_Python-master/Algorithm-Easy/387_First_Unique_Character_in_a_String.py
Sycamore-City-passerby/ML
605cfc70bdda2c99e5f1c16b25812b59c98a72ad
[ "MIT" ]
null
null
null
LeetCode/LeetCode_Python-master/LeetCode_Python-master/Algorithm-Easy/387_First_Unique_Character_in_a_String.py
Sycamore-City-passerby/ML
605cfc70bdda2c99e5f1c16b25812b59c98a72ad
[ "MIT" ]
null
null
null
from collections import defaultdict class Solution(object): def firstUniqChar(self, s): """ :type s: str :rtype: int """ lookup = defaultdict(int) candidtates = set() for i, c in enumerate(s): if lookup[c]: candidtates.discard(loo...
20.230769
123
0.513308
from collections import defaultdict class Solution(object): def firstUniqChar(self, s): lookup = defaultdict(int) candidtates = set() for i, c in enumerate(s): if lookup[c]: candidtates.discard(lookup[c]) else: lookup[c] = i+1 ...
true
true
f7f629532570968af22825565eddc7c53202b3a9
398
py
Python
tests/test_charm.py
davigar15/sipp-operator
24aaee29adbd42bd4a4029e10925d48233bc0e36
[ "Apache-2.0" ]
null
null
null
tests/test_charm.py
davigar15/sipp-operator
24aaee29adbd42bd4a4029e10925d48233bc0e36
[ "Apache-2.0" ]
null
null
null
tests/test_charm.py
davigar15/sipp-operator
24aaee29adbd42bd4a4029e10925d48233bc0e36
[ "Apache-2.0" ]
1
2022-01-20T18:57:08.000Z
2022-01-20T18:57:08.000Z
# Copyright 2022 David Garcia # See LICENSE file for licensing details. # # Learn more about testing at: https://juju.is/docs/sdk/testing import unittest from charm import SippK8SCharm from ops.testing import Harness class TestCharm(unittest.TestCase): def setUp(self): self.harness = Harness(SippK8SChar...
23.411765
63
0.736181
import unittest from charm import SippK8SCharm from ops.testing import Harness class TestCharm(unittest.TestCase): def setUp(self): self.harness = Harness(SippK8SCharm) self.addCleanup(self.harness.cleanup) self.harness.begin()
true
true
f7f62987f10cd0b73a4981427ef11e3e18fa36a3
745
py
Python
hy/lex/__init__.py
Tony1928/hylang
8aeaace7cd719ab1d00b48808cbd53c67c944cb3
[ "MIT" ]
4
2017-08-09T01:31:56.000Z
2022-01-17T01:11:23.000Z
hy/lex/__init__.py
woodrush/hy
d9a5acbcc93114031c70fd7ea497e4e59c868e25
[ "MIT" ]
null
null
null
hy/lex/__init__.py
woodrush/hy
d9a5acbcc93114031c70fd7ea497e4e59c868e25
[ "MIT" ]
null
null
null
# Copyright 2017 the authors. # This file is part of Hy, which is free software licensed under the Expat # license. See the LICENSE. from rply.errors import LexingError from hy.lex.exceptions import LexException, PrematureEndOfInput # NOQA from hy.lex.lexer import lexer from hy.lex.parser import parser def tokeniz...
28.653846
74
0.661745
from rply.errors import LexingError from hy.lex.exceptions import LexException, PrematureEndOfInput from hy.lex.lexer import lexer from hy.lex.parser import parser def tokenize(buf): try: return parser.parse(lexer.lex(buf)) except LexingError as e: pos = e.getsourcepos() raise L...
true
true
f7f62a0b428db519c3a42dfdf6a77a1c9a158bcb
234
py
Python
src/Models/V2/__init__.py
cooperbrandon1/oddsjam-api
1d1170ba74fa1705cc786a96ab12a8cf5fa19dff
[ "MIT" ]
3
2021-11-02T14:07:31.000Z
2021-12-03T01:15:53.000Z
src/Models/V2/__init__.py
cooperbrandon1/oddsjam-api
1d1170ba74fa1705cc786a96ab12a8cf5fa19dff
[ "MIT" ]
null
null
null
src/Models/V2/__init__.py
cooperbrandon1/oddsjam-api
1d1170ba74fa1705cc786a96ab12a8cf5fa19dff
[ "MIT" ]
2
2022-02-17T09:31:04.000Z
2022-02-23T04:16:51.000Z
from .Game import Game from .League import League from .Market import Market from .Odds import Odds from .Future import Future from .FutureOdds import FutureOdds, FutureOdd from .Score import Score from .PeriodScore import PeriodScore
29.25
45
0.824786
from .Game import Game from .League import League from .Market import Market from .Odds import Odds from .Future import Future from .FutureOdds import FutureOdds, FutureOdd from .Score import Score from .PeriodScore import PeriodScore
true
true
f7f62a1c33b075c3294b8955319c415aa205f3e8
4,853
py
Python
allink_core/core/forms/fields.py
allink/allink-core
cf2727f26192d8dee89d76feb262bc4760f36f5e
[ "BSD-3-Clause" ]
5
2017-03-13T08:49:45.000Z
2022-03-05T20:05:56.000Z
allink_core/core/forms/fields.py
allink/allink-core
cf2727f26192d8dee89d76feb262bc4760f36f5e
[ "BSD-3-Clause" ]
28
2019-10-21T08:32:18.000Z
2022-02-10T13:16:38.000Z
allink_core/core/forms/fields.py
allink/allink-core
cf2727f26192d8dee89d76feb262bc4760f36f5e
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import json from django import forms from django.core.cache import cache from django.conf import settings from django.core.exceptions import ValidationError from django.utils.translation import gettext_lazy as _ from cms.apphook_pool import apphook_pool from cms.models import Page import sorte...
37.330769
112
0.57552
import json from django import forms from django.core.cache import cache from django.conf import settings from django.core.exceptions import ValidationError from django.utils.translation import gettext_lazy as _ from cms.apphook_pool import apphook_pool from cms.models import Page import sortedm2m.fields from allin...
true
true
f7f62b6f3cfdfdf3a46776b076654e055f88d2ed
14,173
py
Python
lisa/tests/test_variable.py
KsenijaS/lisa
f09291a088c81de40e57bc4e37e9348220a87417
[ "MIT" ]
1
2021-06-17T13:02:44.000Z
2021-06-17T13:02:44.000Z
lisa/tests/test_variable.py
KsenijaS/lisa
f09291a088c81de40e57bc4e37e9348220a87417
[ "MIT" ]
null
null
null
lisa/tests/test_variable.py
KsenijaS/lisa
f09291a088c81de40e57bc4e37e9348220a87417
[ "MIT" ]
null
null
null
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import os from pathlib import Path from typing import Any, Dict, cast from unittest.case import TestCase from lisa import secret, variable from lisa.util import LisaException, constants from lisa.util.logger import get_logger class VariableTes...
40.378917
88
0.527764
import os from pathlib import Path from typing import Any, Dict, cast from unittest.case import TestCase from lisa import secret, variable from lisa.util import LisaException, constants from lisa.util.logger import get_logger class VariableTestCase(TestCase): def setUp(self) -> None: secret.reset() ...
true
true
f7f62bc9586a81e01e58625161fd1714387048db
2,230
py
Python
bin/lineage-verify.py
ndparker/dotfiles
3da74d431e058af0e10e5cb8901bb5ab2af4948c
[ "Apache-2.0" ]
3
2017-04-27T09:38:27.000Z
2020-06-22T15:04:00.000Z
bin/lineage-verify.py
ndparker/dotfiles
3da74d431e058af0e10e5cb8901bb5ab2af4948c
[ "Apache-2.0" ]
1
2020-02-12T01:51:35.000Z
2020-02-12T01:51:35.000Z
bin/lineage-verify.py
ndparker/dotfiles
3da74d431e058af0e10e5cb8901bb5ab2af4948c
[ "Apache-2.0" ]
2
2015-05-08T14:51:25.000Z
2021-05-11T08:06:14.000Z
#!/usr/bin/env python3 # https://review.lineageos.org/#/c/LineageOS/scripts/+/208294/ #adopted from https://pastebin.com/raw/qYcvaWyX import base64 import os import sys from OpenSSL import crypto def get_certificates(self): from OpenSSL.crypto import X509 from OpenSSL._util import ffi as _ffi, lib as _lib ...
29.733333
121
0.64574
rt sys from OpenSSL import crypto def get_certificates(self): from OpenSSL.crypto import X509 from OpenSSL._util import ffi as _ffi, lib as _lib certs = _ffi.NULL if self.type_is_signed(): certs = self._pkcs7.d.sign.cert elif self.type_is_signedAndEnveloped(): certs = self._pkcs7....
true
true
f7f62c8192b7c98b32235632d0f03643f9edc073
2,556
py
Python
tests/test_default.py
i-PUSH/ansible-sdkman
935efeeb2c4da7aab501543f6ed112b11c2530f8
[ "Apache-2.0" ]
null
null
null
tests/test_default.py
i-PUSH/ansible-sdkman
935efeeb2c4da7aab501543f6ed112b11c2530f8
[ "Apache-2.0" ]
null
null
null
tests/test_default.py
i-PUSH/ansible-sdkman
935efeeb2c4da7aab501543f6ed112b11c2530f8
[ "Apache-2.0" ]
null
null
null
sdkman_user = 'jenkins' sdkman_group = 'jenkins' def script_wrap(host, cmds, as_interactive=True): # if running as interactive shell, .bashrc will be sourced wrapped_cmd = "/bin/bash {0} -c '{1}'".format( '-i' if as_interactive else '', '; '.join(cmds) ) if host.user.name == sdkman_us...
30.795181
73
0.676056
sdkman_user = 'jenkins' sdkman_group = 'jenkins' def script_wrap(host, cmds, as_interactive=True): wrapped_cmd = "/bin/bash {0} -c '{1}'".format( '-i' if as_interactive else '', '; '.join(cmds) ) if host.user.name == sdkman_user: return wrapped_cmd else: return "s...
true
true
f7f62d7e5c1948a37bb566df3c40a90878fd2b1f
2,432
py
Python
pychron/core/helpers/tests/floatfmt.py
ASUPychron/pychron
dfe551bdeb4ff8b8ba5cdea0edab336025e8cc76
[ "Apache-2.0" ]
31
2016-03-07T02:38:17.000Z
2022-02-14T18:23:43.000Z
pychron/core/helpers/tests/floatfmt.py
ASUPychron/pychron
dfe551bdeb4ff8b8ba5cdea0edab336025e8cc76
[ "Apache-2.0" ]
1,626
2015-01-07T04:52:35.000Z
2022-03-25T19:15:59.000Z
pychron/core/helpers/tests/floatfmt.py
UIllinoisHALPychron/pychron
f21b79f4592a9fb9dc9a4cb2e4e943a3885ededc
[ "Apache-2.0" ]
26
2015-05-23T00:10:06.000Z
2022-03-07T16:51:57.000Z
__author__ = "ross" import unittest from pychron.core.helpers.formatting import floatfmt, standard_sigfigsfmt DEBUG = True class SigFigStdFmtTestCase(unittest.TestCase): def test_ones(self): self.assertEqual(("123", "1"), standard_sigfigsfmt(123.456, 1)) def test_tens(self): self.assertEqu...
28.27907
80
0.614309
__author__ = "ross" import unittest from pychron.core.helpers.formatting import floatfmt, standard_sigfigsfmt DEBUG = True class SigFigStdFmtTestCase(unittest.TestCase): def test_ones(self): self.assertEqual(("123", "1"), standard_sigfigsfmt(123.456, 1)) def test_tens(self): self.assertEqu...
true
true
f7f62dce14d097ab2ce0c7c1bbc8c0dfa8904260
608
py
Python
build Android/python/settings.py
jadilson12/scripts
68beb0b61c68626e4e225e4128c47f7a95edd6b9
[ "MIT" ]
null
null
null
build Android/python/settings.py
jadilson12/scripts
68beb0b61c68626e4e225e4128c47f7a95edd6b9
[ "MIT" ]
null
null
null
build Android/python/settings.py
jadilson12/scripts
68beb0b61c68626e4e225e4128c47f7a95edd6b9
[ "MIT" ]
1
2021-03-03T16:20:06.000Z
2021-03-03T16:20:06.000Z
#!/usr/bin/env python3 import os # Specify token to telegram botoken = "433288264:AAEgtKVaTSmQ1YOoOhGDxJnD8mp_Tb8fDkg" botchat_id = '-1001376475021' # Mega sync dirmega = "etc/documentos/Mega/" # Google drive gduser1 = "jadilson" gduser2 = "si1720" caminho = " ~/etc/documentos/G-Drive/" opcao = " -label " # Build...
19
62
0.685855
import os botoken = "433288264:AAEgtKVaTSmQ1YOoOhGDxJnD8mp_Tb8fDkg" botchat_id = '-1001376475021' dirmega = "etc/documentos/Mega/" gduser1 = "jadilson" gduser2 = "si1720" caminho = " ~/etc/documentos/G-Drive/" opcao = " -label " rom_custom = "rr" device = "sanders" outdir = "/out/target/product/sanders" dirD...
true
true
f7f62e1c03eddc2a344ee2552865a58e93e24f1b
5,896
py
Python
sdks/python/http_client/v1/polyaxon_sdk/models/v1_list_runs_response.py
Ohtar10/polyaxon
1e41804e4ae6466b6928d06bc6ee6d2d9c7b8931
[ "Apache-2.0" ]
null
null
null
sdks/python/http_client/v1/polyaxon_sdk/models/v1_list_runs_response.py
Ohtar10/polyaxon
1e41804e4ae6466b6928d06bc6ee6d2d9c7b8931
[ "Apache-2.0" ]
null
null
null
sdks/python/http_client/v1/polyaxon_sdk/models/v1_list_runs_response.py
Ohtar10/polyaxon
1e41804e4ae6466b6928d06bc6ee6d2d9c7b8931
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # # Copyright 2018-2021 Polyaxon, 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 ...
27.296296
120
0.591248
import pprint import re import six from polyaxon_sdk.configuration import Configuration class V1ListRunsResponse(object): openapi_types = { 'count': 'int', 'results': 'list[V1Run]', 'previous': 'str', 'next': 'str' } attribute_map = { 'coun...
true
true
f7f62e4cc9a62c3e6797c1e7d42893fcf150ddd5
5,939
py
Python
tests/genome.py
SACGF/seedot
1f525b163b3e2f15fc8437c4f71acc15b804cccb
[ "MIT" ]
6
2022-02-03T06:38:11.000Z
2022-02-22T08:46:56.000Z
tests/genome.py
SACGF/seedot
1f525b163b3e2f15fc8437c4f71acc15b804cccb
[ "MIT" ]
8
2022-01-19T23:06:47.000Z
2022-02-02T06:43:09.000Z
tests/genome.py
SACGF/cdot
1f525b163b3e2f15fc8437c4f71acc15b804cccb
[ "MIT" ]
null
null
null
""" From https://github.com/counsyl/hgvs """ from __future__ import absolute_import from __future__ import unicode_literals import itertools import os from pyhgvs.variants import revcomp try: from pyfaidx import Genome as SequenceFileDB # Allow pyflakes to ignore redefinition in except clause. Sequence...
32.994444
79
0.593703
from __future__ import absolute_import from __future__ import unicode_literals import itertools import os from pyhgvs.variants import revcomp try: from pyfaidx import Genome as SequenceFileDB SequenceFileDB except ImportError: SequenceFileDB = None class MockGenomeError(Exception): pass cl...
true
true
f7f62e520af8f22cf3cd03d3b764decb1b37d3bb
89
py
Python
dcms/vote/admin.py
yifei-fu/dcms
568b727a58dd080f0dafc028d7723f865d9b7303
[ "MIT" ]
1
2021-04-03T20:07:11.000Z
2021-04-03T20:07:11.000Z
dcms/vote/admin.py
yifei-fu/dcms
568b727a58dd080f0dafc028d7723f865d9b7303
[ "MIT" ]
null
null
null
dcms/vote/admin.py
yifei-fu/dcms
568b727a58dd080f0dafc028d7723f865d9b7303
[ "MIT" ]
null
null
null
from django.contrib import admin from . import models admin.site.register(models.Vote)
14.833333
32
0.797753
from django.contrib import admin from . import models admin.site.register(models.Vote)
true
true
f7f62f389ba9ff35a3c831d2f931d995bbd83595
1,845
py
Python
blockchain/wallet.py
gwynethallwright/cs291d_project
7d9bbb32acec855e777b93b88153869393d458d3
[ "Apache-2.0" ]
null
null
null
blockchain/wallet.py
gwynethallwright/cs291d_project
7d9bbb32acec855e777b93b88153869393d458d3
[ "Apache-2.0" ]
null
null
null
blockchain/wallet.py
gwynethallwright/cs291d_project
7d9bbb32acec855e777b93b88153869393d458d3
[ "Apache-2.0" ]
null
null
null
import base64 import hashlib import json import datetime from zcash.cryptographic_basics import * class Wallet(): def __init__(self): self._sk, self._pk = K_sig(1) @property def address(self): """ generate address by pk """ h = hashlib.sha256(self._pk) ret...
22.5
88
0.572358
import base64 import hashlib import json import datetime from zcash.cryptographic_basics import * class Wallet(): def __init__(self): self._sk, self._pk = K_sig(1) @property def address(self): h = hashlib.sha256(self._pk) return base64.b64encode(h.digest()) @property def...
true
true
f7f62f848ee463745ad8e2ac5e48750d31454b22
87
py
Python
webviz_config/__main__.py
anders-kiaer/webviz-conf
3390ec36db7cda3ad3203ac7654e008125fa81ef
[ "MIT" ]
44
2019-04-07T18:46:00.000Z
2022-03-28T02:35:58.000Z
webviz_config/__main__.py
anders-kiaer/webviz-conf
3390ec36db7cda3ad3203ac7654e008125fa81ef
[ "MIT" ]
312
2019-03-29T11:49:53.000Z
2022-03-07T12:06:34.000Z
webviz_config/__main__.py
anders-kiaer/webviz-conf
3390ec36db7cda3ad3203ac7654e008125fa81ef
[ "MIT" ]
46
2019-03-29T07:23:16.000Z
2022-03-28T02:35:59.000Z
if __name__ == "__main__": from webviz_config.command_line import main main()
17.4
47
0.701149
if __name__ == "__main__": from webviz_config.command_line import main main()
true
true
f7f62ffbb8d0e1f932c9d430f1f1e63fce2ae43e
234
py
Python
w.py
Ashokkommi0001/Python-Patterns-Alphabets-Lower_case
f394fb9982cc379e8cb7046d6768e6b5387c52ca
[ "MIT" ]
null
null
null
w.py
Ashokkommi0001/Python-Patterns-Alphabets-Lower_case
f394fb9982cc379e8cb7046d6768e6b5387c52ca
[ "MIT" ]
null
null
null
w.py
Ashokkommi0001/Python-Patterns-Alphabets-Lower_case
f394fb9982cc379e8cb7046d6768e6b5387c52ca
[ "MIT" ]
null
null
null
def w(): for row in range(6): for col in range(7): if (col%3==0 and row<5) or (row==5 and col%3!=0): print("*",end=" ") else: print(end=" ") print()
26
62
0.363248
def w(): for row in range(6): for col in range(7): if (col%3==0 and row<5) or (row==5 and col%3!=0): print("*",end=" ") else: print(end=" ") print()
true
true
f7f63057195edcdd211aac227aa09ec5cecaa189
3,870
py
Python
qiskit/circuit/compositegate.py
xkwei1119/qiskit-terra
7a306872f00939f41ae29a5ec0e56eb7d9ac710d
[ "Apache-2.0" ]
null
null
null
qiskit/circuit/compositegate.py
xkwei1119/qiskit-terra
7a306872f00939f41ae29a5ec0e56eb7d9ac710d
[ "Apache-2.0" ]
null
null
null
qiskit/circuit/compositegate.py
xkwei1119/qiskit-terra
7a306872f00939f41ae29a5ec0e56eb7d9ac710d
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2017, IBM. # # This source code is licensed under the Apache License, Version 2.0 found in # the LICENSE.txt file in the root directory of this source tree. """ Composite gate, a container for a sequence of unitary gates. """ from qiskit.exceptions import QiskitError from .gate imp...
32.521008
77
0.613953
from qiskit.exceptions import QiskitError from .gate import Gate class CompositeGate(Gate): def __init__(self, name, param, qargs, circuit=None, inverse_name=None): super().__init__(name, param, qargs, circuit) self.data = [] self.inverse_flag = False self.inverse_name ...
true
true
f7f6319c583312419b4b300c50d01f1d13d266e6
3,717
py
Python
tests/test_align.py
ahgamut/cliquematch
3065b9edfa8ed3dc9986b7152913436ada26d195
[ "MIT" ]
4
2020-07-28T18:41:43.000Z
2021-12-23T10:00:41.000Z
tests/test_align.py
ahgamut/cliquematch
3065b9edfa8ed3dc9986b7152913436ada26d195
[ "MIT" ]
null
null
null
tests/test_align.py
ahgamut/cliquematch
3065b9edfa8ed3dc9986b7152913436ada26d195
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ cliquematch.test_align ~~~~~~~~~~~~~~~~~~~~~~ testcases for cliquematch.AlignGraph :copyright: (c) 2020 by Gautham Venkatasubramanian. :license: see LICENSE for more details. """ import pytest import numpy as np import cliquematch import random class TestAlignGraph(ob...
32.605263
88
0.552327
import pytest import numpy as np import cliquematch import random class TestAlignGraph(object): np.random.seed(824) mask = np.ones((200, 200), dtype=np.bool) S1 = np.float64(np.random.uniform(0, 100, (20, 2))) S2 = np.float64(np.random.uniform(0, 100, (20, 2))) def test_dfs(self): S1 = ...
true
true
f7f633c6895536837c44ae2ba7d94e4df9a161d7
1,813
py
Python
legacy/generator.py
eclissi91/brahma
5ef9f8e9d9d3871c21aa9832962ee9ee3800c9a9
[ "MIT" ]
null
null
null
legacy/generator.py
eclissi91/brahma
5ef9f8e9d9d3871c21aa9832962ee9ee3800c9a9
[ "MIT" ]
1
2020-10-28T13:00:20.000Z
2020-10-29T09:39:20.000Z
legacy/generator.py
eclissi91/brahma
5ef9f8e9d9d3871c21aa9832962ee9ee3800c9a9
[ "MIT" ]
1
2020-10-29T08:20:01.000Z
2020-10-29T08:20:01.000Z
# # Copyright (c) Ionplus AG and contributors. All rights reserved. # Licensed under the MIT license. See LICENSE file in the project root for details. # from legacy import calculation_sets, routines, targets, results class Generator(object): def __init__(self, db_session, source_schema, target_schema, ...
37.770833
98
0.678985
from legacy import calculation_sets, routines, targets, results class Generator(object): def __init__(self, db_session, source_schema, target_schema, machine_number, isotope_number): self.db_session = db_session self.source_schema = source_schema self.target_schema = target_sc...
true
true
f7f635093dfe168b7a5649bef156f0a357cdf76a
24,898
py
Python
core/storage/feedback/gae_models.py
jkoj25/oppia
c5607309a7c9d3da0ce8f16a817bb521a6eecb1a
[ "Apache-2.0" ]
1
2020-02-07T08:24:56.000Z
2020-02-07T08:24:56.000Z
core/storage/feedback/gae_models.py
Ketan-Suthar/oppia
0eed7bb069b55396d0908ba232d8ef4517231dc2
[ "Apache-2.0" ]
null
null
null
core/storage/feedback/gae_models.py
Ketan-Suthar/oppia
0eed7bb069b55396d0908ba232d8ef4517231dc2
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # # Copyright 2014 The Oppia 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 requi...
36.722714
80
0.655796
from __future__ import absolute_import from __future__ import unicode_literals from core.platform import models import feconf import python_utils import utils from google.appengine.ext import ndb (base_models,) = models.Registry.import_models([models.NAMES.base_model]) STATUS_CHOICES_OPEN = 'op...
true
true
f7f635f98804fc8bb782a30aa758659539ee43b3
1,351
py
Python
gazoo_device/tests/unit_tests/utils/dli_powerswitch_logs.py
isabella232/gazoo-device
0e1e276d72333e713b47152815708b9c74c45409
[ "Apache-2.0" ]
null
null
null
gazoo_device/tests/unit_tests/utils/dli_powerswitch_logs.py
isabella232/gazoo-device
0e1e276d72333e713b47152815708b9c74c45409
[ "Apache-2.0" ]
1
2021-06-24T19:20:50.000Z
2021-06-24T19:20:50.000Z
gazoo_device/tests/unit_tests/utils/dli_powerswitch_logs.py
isabella232/gazoo-device
0e1e276d72333e713b47152815708b9c74c45409
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
32.166667
74
0.629904
RETURN_CODE = "200\n" ERROR_RETURN_CODE = "409\n" DEFAULT_BEHAVIOR = { "http://123.45.67.89/restapi/config/=version/": { "text": '["1.7.15.0"]', "status_code": "207" }, "http://123.45.67.89/restapi/config/=serial/": { "text": '["LPC92407023570"]', "status_code...
true
true
f7f636080c6691fe10d19075095d8a0f917f77a8
492
py
Python
ru2/__init__.py
ex00/spacy-ru
7284d8127dca322fcc2aa9ce0267699cfc9baf38
[ "MIT" ]
null
null
null
ru2/__init__.py
ex00/spacy-ru
7284d8127dca322fcc2aa9ce0267699cfc9baf38
[ "MIT" ]
null
null
null
ru2/__init__.py
ex00/spacy-ru
7284d8127dca322fcc2aa9ce0267699cfc9baf38
[ "MIT" ]
null
null
null
# encoding: utf8 from __future__ import unicode_literals, print_function from spacy.lang.ru import RussianDefaults, Russian from ru2.lemmatizer import RussianLemmatizer from .syntax_iterators import SYNTAX_ITERATORS class Russian2Defaults(RussianDefaults): syntax_iterators = SYNTAX_ITERATORS @classmethod d...
24.6
55
0.780488
from __future__ import unicode_literals, print_function from spacy.lang.ru import RussianDefaults, Russian from ru2.lemmatizer import RussianLemmatizer from .syntax_iterators import SYNTAX_ITERATORS class Russian2Defaults(RussianDefaults): syntax_iterators = SYNTAX_ITERATORS @classmethod def create_lemmat...
true
true
f7f6363ecf55ddf6346e6831e75e8d317c1e14b6
17,581
py
Python
third_party/legacy_roslaunch/main.py
mvukov/rules_ros
0919c94fae4c84f40c9ec23164345f6db8aef853
[ "Apache-2.0" ]
14
2021-05-02T00:58:45.000Z
2022-01-11T07:01:27.000Z
third_party/legacy_roslaunch/main.py
mvukov/rules_ros
0919c94fae4c84f40c9ec23164345f6db8aef853
[ "Apache-2.0" ]
null
null
null
third_party/legacy_roslaunch/main.py
mvukov/rules_ros
0919c94fae4c84f40c9ec23164345f6db8aef853
[ "Apache-2.0" ]
1
2022-02-07T00:17:23.000Z
2022-02-07T00:17:23.000Z
# Software License Agreement (BSD License) # # Copyright (c) 2008, Willow Garage, 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...
38.896018
101
0.576304
import os import logging import socket import sys import traceback from optparse import OptionParser import rosgraph.roslogging import rospkg from rosmaster import DEFAULT_MASTER_PORT from rosmaster.master_api import NUM_WORKERS from third_party.legacy_roslaunch import arg_dump fr...
true
true
f7f6367d7103288d685134c99249c5e3b93fc5d5
25,146
py
Python
elit/components/parsers/second_order/tree_crf_dependency_parser.py
emorynlp/levi-graph-amr-parser
f71f1056c13181b8db31d6136451fb8d57114819
[ "Apache-2.0" ]
9
2021-07-12T22:05:47.000Z
2022-02-22T03:10:14.000Z
elit/components/parsers/second_order/tree_crf_dependency_parser.py
emorynlp/levi-graph-amr-parser
f71f1056c13181b8db31d6136451fb8d57114819
[ "Apache-2.0" ]
4
2021-08-31T08:28:37.000Z
2022-03-28T05:52:14.000Z
elit/components/parsers/second_order/tree_crf_dependency_parser.py
emorynlp/levi-graph-amr-parser
f71f1056c13181b8db31d6136451fb8d57114819
[ "Apache-2.0" ]
null
null
null
# -*- coding:utf-8 -*- # Author: hankcs # Date: 2020-05-08 20:51 import functools import os from typing import Union, Any, List import torch from alnlp.modules.util import lengths_to_mask from torch import nn from torch.optim import Adam from torch.optim.lr_scheduler import ExponentialLR from torch.utils.data import D...
46.394834
117
0.57194
import functools import os from typing import Union, Any, List import torch from alnlp.modules.util import lengths_to_mask from torch import nn from torch.optim import Adam from torch.optim.lr_scheduler import ExponentialLR from torch.utils.data import DataLoader from elit.common.constant import UNK, IDX from elit...
true
true
f7f6389bf1df232e2ae486f018bdf79a3b04b45a
876
py
Python
src/teleop.py
30sectomars/psas_testbot
06954927c1d11be2e49359515c0b8f57f6960fd5
[ "MIT" ]
1
2020-02-26T07:29:17.000Z
2020-02-26T07:29:17.000Z
src/teleop.py
30sectomars/psas_testbot
06954927c1d11be2e49359515c0b8f57f6960fd5
[ "MIT" ]
null
null
null
src/teleop.py
30sectomars/psas_testbot
06954927c1d11be2e49359515c0b8f57f6960fd5
[ "MIT" ]
1
2020-02-26T07:25:46.000Z
2020-02-26T07:25:46.000Z
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Fri Sep 21 10:42:00 2018 @author: nschweizer """ #################### import ########################## import rospy from sensor_msgs.msg import Joy from geometry_msgs.msg import Twist ############# node initialization rospy.init_node("teleop") #########...
24.333333
56
0.568493
""" Created on Fri Sep 21 10:42:00 2018 @author: nschweizer """
false
true
f7f6394911d819ac624f49149a53687def530ce8
6,126
py
Python
tests/test_markup.py
goujou/sphinx-repaired
f898f6907d51cad180250e53c3272806d48026a8
[ "BSD-2-Clause" ]
null
null
null
tests/test_markup.py
goujou/sphinx-repaired
f898f6907d51cad180250e53c3272806d48026a8
[ "BSD-2-Clause" ]
null
null
null
tests/test_markup.py
goujou/sphinx-repaired
f898f6907d51cad180250e53c3272806d48026a8
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ test_markup ~~~~~~~~~~~ Test various Sphinx-specific markup extensions. :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re import pickle from docutils import frontend, utils, nodes from docutils.parse...
35.410405
89
0.639079
import re import pickle from docutils import frontend, utils, nodes from docutils.parsers import rst from sphinx.util import texescape from sphinx.writers.html import HTMLWriter, SmartyPantsHTMLTranslator from sphinx.writers.latex import LaTeXWriter, LaTeXTranslator from util import TestApp, with_app, assert_node ...
true
true
f7f6397972cb79b6ae6b87c6d3a6346bc490b01d
4,584
py
Python
collect_variables/scripts/download_stats.py
UtrechtUniversity/SWORDS-UU
d9b45706566054541625ec363e41bdf97f58c6b1
[ "MIT" ]
1
2022-02-09T14:53:45.000Z
2022-02-09T14:53:45.000Z
collect_variables/scripts/download_stats.py
UtrechtUniversity/SWORDS-UU
d9b45706566054541625ec363e41bdf97f58c6b1
[ "MIT" ]
28
2021-11-30T14:37:17.000Z
2022-03-22T12:46:53.000Z
collect_variables/scripts/download_stats.py
UtrechtUniversity/SWORDS-UU
d9b45706566054541625ec363e41bdf97f58c6b1
[ "MIT" ]
1
2022-01-17T10:53:26.000Z
2022-01-17T10:53:26.000Z
"""Collect download statistics. """ import re import datetime import argparse import json import requests import pandas as pd PYPI_STATS = "https://pypistats.org/api/packages/{}/recent" CRAN_STATS = "https://cranlogs.r-pkg.org/downloads/total/last-month/{}" NPM_STATS = "https://api.npmjs.org/downloads/point/last-mont...
35.534884
95
0.428883
import re import datetime import argparse import json import requests import pandas as pd PYPI_STATS = "https://pypistats.org/api/packages/{}/recent" CRAN_STATS = "https://cranlogs.r-pkg.org/downloads/total/last-month/{}" NPM_STATS = "https://api.npmjs.org/downloads/point/last-month/{}" if __name__ == '__main__': ...
true
true
f7f639aa585352bb6e63620b74b4dedf1cf59f9b
935
py
Python
tests/unit_tests/test_pycaprio.py
reckart/pycaprio
1d030ecd97cb324e404c16520fe6250c49c3bb06
[ "MIT" ]
9
2019-08-27T11:21:07.000Z
2021-03-11T15:41:44.000Z
tests/unit_tests/test_pycaprio.py
reckart/pycaprio
1d030ecd97cb324e404c16520fe6250c49c3bb06
[ "MIT" ]
25
2019-09-03T11:05:18.000Z
2021-04-18T15:57:33.000Z
tests/unit_tests/test_pycaprio.py
reckart/pycaprio
1d030ecd97cb324e404c16520fe6250c49c3bb06
[ "MIT" ]
6
2019-10-02T16:51:10.000Z
2021-03-11T15:41:52.000Z
import os import pytest from pycaprio import Pycaprio from pycaprio.core.exceptions import ConfigurationNotProvided @pytest.mark.parametrize('host, auth', [(None, None), ('', (None, None)), ('host', (None, None)), ...
27.5
63
0.563636
import os import pytest from pycaprio import Pycaprio from pycaprio.core.exceptions import ConfigurationNotProvided @pytest.mark.parametrize('host, auth', [(None, None), ('', (None, None)), ('host', (None, None)), ...
true
true
f7f63b86f5e7d9b964be0dbc06a0c0f90b49044c
1,620
py
Python
aliyun-python-sdk-pts/aliyunsdkpts/request/v20190810/DescribeJMeterSampleSummaryRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
1,001
2015-07-24T01:32:41.000Z
2022-03-25T01:28:18.000Z
aliyun-python-sdk-pts/aliyunsdkpts/request/v20190810/DescribeJMeterSampleSummaryRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
363
2015-10-20T03:15:00.000Z
2022-03-08T12:26:19.000Z
aliyun-python-sdk-pts/aliyunsdkpts/request/v20190810/DescribeJMeterSampleSummaryRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
682
2015-09-22T07:19:02.000Z
2022-03-22T09:51:46.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
36.818182
88
0.766667
from aliyunsdkcore.request import RpcRequest from aliyunsdkpts.endpoint import endpoint_data class DescribeJMeterSampleSummaryRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'PTS', '2019-08-10', 'DescribeJMeterSampleSummary','1.0.0') self.set_method('POST') if hasattr(sel...
true
true
f7f63c5ee022f101610fa3926d08c37c9cdee5fa
242
py
Python
code-ch01/test_mul.py
kcalvinalvin/editedProgrammingBitcoin
9680a92cbacdd226cd143fac46d935d00109c902
[ "MIT" ]
null
null
null
code-ch01/test_mul.py
kcalvinalvin/editedProgrammingBitcoin
9680a92cbacdd226cd143fac46d935d00109c902
[ "MIT" ]
null
null
null
code-ch01/test_mul.py
kcalvinalvin/editedProgrammingBitcoin
9680a92cbacdd226cd143fac46d935d00109c902
[ "MIT" ]
null
null
null
from eccCh01 import FieldElement from unittest import TestCase class FieldElementTest(TestCase): def test_mul(self): a = FieldElement(24, 31) b = FieldElement(19, 31) self.assertEqual(a * b, FieldElement(22, 31))
26.888889
53
0.68595
from eccCh01 import FieldElement from unittest import TestCase class FieldElementTest(TestCase): def test_mul(self): a = FieldElement(24, 31) b = FieldElement(19, 31) self.assertEqual(a * b, FieldElement(22, 31))
true
true
f7f63d8238459fde2cb8ef62daabad6ceef2fa01
1,144
py
Python
jesse/modes/utils.py
discohead/jesse
5f025cc72adb33132b75a516f74f96b52ca12af3
[ "MIT" ]
null
null
null
jesse/modes/utils.py
discohead/jesse
5f025cc72adb33132b75a516f74f96b52ca12af3
[ "MIT" ]
null
null
null
jesse/modes/utils.py
discohead/jesse
5f025cc72adb33132b75a516f74f96b52ca12af3
[ "MIT" ]
1
2021-03-09T19:51:14.000Z
2021-03-09T19:51:14.000Z
from jesse.store import store import jesse.helpers as jh from jesse.services import logger from jesse.models.utils import store_daily_balance_into_db def save_daily_portfolio_balance() -> None: balances = [] # add exchange balances for key, e in store.exchanges.storage.items(): balances.append(e....
33.647059
76
0.604895
from jesse.store import store import jesse.helpers as jh from jesse.services import logger from jesse.models.utils import store_daily_balance_into_db def save_daily_portfolio_balance() -> None: balances = [] for key, e in store.exchanges.storage.items(): balances.append(e.assets[jh.app_currency(...
true
true
f7f63e71c60d5df224f57d4b06ba9efc98e2d4b2
784
py
Python
pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxr/running_config/configure.py
jbronikowski/genielibs
200a34e5fe4838a27b5a80d5973651b2e34ccafb
[ "Apache-2.0" ]
94
2018-04-30T20:29:15.000Z
2022-03-29T13:40:31.000Z
pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxr/running_config/configure.py
jbronikowski/genielibs
200a34e5fe4838a27b5a80d5973651b2e34ccafb
[ "Apache-2.0" ]
67
2018-12-06T21:08:09.000Z
2022-03-29T18:00:46.000Z
pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxr/running_config/configure.py
jbronikowski/genielibs
200a34e5fe4838a27b5a80d5973651b2e34ccafb
[ "Apache-2.0" ]
49
2018-06-29T18:59:03.000Z
2022-03-10T02:07:59.000Z
""" Configure type APIs for IOSXR """ from unicon.core.errors import SubCommandFailure def restore_running_config(device, path, file, timeout=60): """ Restore config from local file Args: device (`obj`): Device object path (`str`): directory file (`str`): file name ...
31.36
84
0.581633
from unicon.core.errors import SubCommandFailure def restore_running_config(device, path, file, timeout=60): try: device.execute( "copy {path}{file} running-config replace".format(path=path, file=file), timeout=timeout ) except SubCommandFailure as e: raise SubC...
true
true
f7f63eab1f784e4f3378a595867b5a463fc28cde
2,472
py
Python
util/util.py
krantiparida/beyond-image-to-depth
dcdef5122fa456a92bd58ead4eea0a777158c535
[ "MIT" ]
31
2021-03-16T04:56:00.000Z
2022-03-30T02:50:23.000Z
util/util.py
krantiparida/beyond-image-to-depth
dcdef5122fa456a92bd58ead4eea0a777158c535
[ "MIT" ]
8
2021-04-16T03:17:06.000Z
2022-03-17T02:58:00.000Z
util/util.py
krantiparida/beyond-image-to-depth
dcdef5122fa456a92bd58ead4eea0a777158c535
[ "MIT" ]
12
2021-03-18T07:49:30.000Z
2022-03-11T05:44:20.000Z
#!/usr/bin/env python import numpy as np import os def compute_errors(gt, pred): """Computation of error metrics between predicted and ground truth depths """ # select only the values that are greater than zero mask = gt > 0 pred = pred[mask] gt = gt[mask] thresh = np.maximum((gt / pred), ...
28.744186
98
0.538026
import numpy as np import os def compute_errors(gt, pred): mask = gt > 0 pred = pred[mask] gt = gt[mask] thresh = np.maximum((gt / pred), (pred / gt)) a1 = (thresh < 1.25 ).mean() a2 = (thresh < 1.25 ** 2).mean() a3 = (thresh < 1.25 ** 3).mean() rmse = (gt - pred) ** 2 r...
true
true
f7f63f4b268a3192204356d400699744a73c67bf
1,448
py
Python
Python/Concurrency/1116.py
DimitrisJim/leetcode_solutions
765ea578748f8c9b21243dec9dc8a16163e85c0c
[ "Unlicense" ]
2
2021-01-15T17:22:54.000Z
2021-05-16T19:58:02.000Z
Python/Concurrency/1116.py
DimitrisJim/leetcode_solutions
765ea578748f8c9b21243dec9dc8a16163e85c0c
[ "Unlicense" ]
null
null
null
Python/Concurrency/1116.py
DimitrisJim/leetcode_solutions
765ea578748f8c9b21243dec9dc8a16163e85c0c
[ "Unlicense" ]
null
null
null
import threading # 28 - 98.52, 15.6 - 36.67 class ZeroEvenOdd: def __init__(self, n): self.n = n self.turn = 0 self.cv = threading.Condition() self.odds = (i for i in range(1, n + 1) if i & 1) self.evens = (i for i in range(1, n + 1) if not i & 1) # print...
30.166667
65
0.44268
import threading class ZeroEvenOdd: def __init__(self, n): self.n = n self.turn = 0 self.cv = threading.Condition() self.odds = (i for i in range(1, n + 1) if i & 1) self.evens = (i for i in range(1, n + 1) if not i & 1) def zero(self, printNumber: ...
true
true
f7f63fb8316590d01d63b03b1843a30f2729cd53
3,637
py
Python
pox/tk.py
brenocg29/TP1RedesInteligentes
3b73b3567089f9eb2e475ec8402113bf8803bb59
[ "Apache-2.0" ]
11
2019-03-02T20:39:34.000Z
2021-09-02T19:47:38.000Z
pox/tk.py
brenocg29/TP1RedesInteligentes
3b73b3567089f9eb2e475ec8402113bf8803bb59
[ "Apache-2.0" ]
29
2019-01-17T15:44:48.000Z
2021-06-02T00:19:40.000Z
OFCONTROLLERS/pox/pox/tk.py
ViniGarcia/NIEP
5cdf779795b9248e1bbc12195479083475f3edab
[ "MIT" ]
11
2019-01-28T05:00:55.000Z
2021-11-12T03:08:32.000Z
# Copyright 2012 James McCauley # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
26.165468
74
0.641738
""" Lets you use Tk with POX. Highly experimental. """ from collections import deque from pox.core import core log = core.getLogger() class MessageBoxer (object): def __init__ (self, tk): import tkMessageBox, tkColorChooser, tkSimpleDialog, tkFileDialog fields = "ERROR INFO QUESTION WARNIN...
false
true
f7f6404a5ae69a3333dc477834598c759bab4131
7,899
py
Python
dynaconf/default_settings.py
luzihang123/dynaconf
61e29cd51d3ee6b33c89650ee228ba74b1cdf02e
[ "MIT" ]
null
null
null
dynaconf/default_settings.py
luzihang123/dynaconf
61e29cd51d3ee6b33c89650ee228ba74b1cdf02e
[ "MIT" ]
null
null
null
dynaconf/default_settings.py
luzihang123/dynaconf
61e29cd51d3ee6b33c89650ee228ba74b1cdf02e
[ "MIT" ]
null
null
null
import importlib import os import sys import warnings from dynaconf.utils import raw_logger from dynaconf.utils import RENAMED_VARS from dynaconf.utils import upperfy from dynaconf.utils import warn_deprecations from dynaconf.utils.files import find_file from dynaconf.utils.parse_conf import parse_conf_data try: ...
35.106667
78
0.741613
import importlib import os import sys import warnings from dynaconf.utils import raw_logger from dynaconf.utils import RENAMED_VARS from dynaconf.utils import upperfy from dynaconf.utils import warn_deprecations from dynaconf.utils.files import find_file from dynaconf.utils.parse_conf import parse_conf_data try: ...
true
true
f7f64265fd2a202daf0cd6a120015d70562e8ab7
29,414
py
Python
pyaff4/encryptedstream_test.py
aff4/python-aff4
94a3583475c07ad92147f70ff8a19e9e36f12aa9
[ "Apache-2.0" ]
34
2017-10-21T16:12:58.000Z
2022-02-18T00:37:08.000Z
pyaff4/encryptedstream_test.py
aff4/python-aff4
94a3583475c07ad92147f70ff8a19e9e36f12aa9
[ "Apache-2.0" ]
23
2017-11-06T17:01:04.000Z
2021-12-26T14:09:38.000Z
pyaff4/encryptedstream_test.py
aff4/python-aff4
94a3583475c07ad92147f70ff8a19e9e36f12aa9
[ "Apache-2.0" ]
17
2019-02-11T00:47:02.000Z
2022-03-14T02:52:04.000Z
# Copyright 2019 Schatz Forensic Pty Ltd All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy of # the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
46.98722
114
0.597539
from __future__ import unicode_literals import tempfile from future import standard_library standard_library.install_aliases() from builtins import range import os import io import unittest from pyaff4 import aff4_image from pyaff4 import data_store from pyaff4 import lexicon from pyaff4 import rdfval...
true
true
f7f64270b14d3999257c75b52d50d8be26c800c2
7,012
py
Python
kubernetes/client/models/v1beta1_mutating_webhook_configuration_list.py
iamneha/python
5b208a1a49a8d6f8bbab28bcc226b9ef793bcbd0
[ "Apache-2.0" ]
1
2019-02-17T15:28:39.000Z
2019-02-17T15:28:39.000Z
kubernetes/client/models/v1beta1_mutating_webhook_configuration_list.py
iamneha/python
5b208a1a49a8d6f8bbab28bcc226b9ef793bcbd0
[ "Apache-2.0" ]
null
null
null
kubernetes/client/models/v1beta1_mutating_webhook_configuration_list.py
iamneha/python
5b208a1a49a8d6f8bbab28bcc226b9ef793bcbd0
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.13.4 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re...
33.075472
281
0.634056
from pprint import pformat from six import iteritems import re class V1beta1MutatingWebhookConfigurationList(object): swagger_types = { 'api_version': 'str', 'items': 'list[V1beta1MutatingWebhookConfiguration]', 'kind': 'str', 'metadata': 'V1ListMeta' } attribute_map...
true
true
f7f642c03ab213c7104f9f7cb83ac1259e2babcb
10,053
py
Python
tests/unit/test_textutil.py
mikiec84/behave
f1f94ca3bd4a0d6b630b3e3ea7de395dfe3386b6
[ "BSD-2-Clause" ]
5
2019-01-15T18:49:16.000Z
2020-02-21T20:24:39.000Z
tests/unit/test_textutil.py
mikiec84/behave
f1f94ca3bd4a0d6b630b3e3ea7de395dfe3386b6
[ "BSD-2-Clause" ]
6
2019-04-26T19:34:34.000Z
2020-06-03T21:49:13.000Z
tests/unit/test_textutil.py
mikiec84/behave
f1f94ca3bd4a0d6b630b3e3ea7de395dfe3386b6
[ "BSD-2-Clause" ]
9
2019-04-23T19:43:41.000Z
2020-05-12T09:17:27.000Z
# -*- coding: UTF-8 -*- """ Unit tests for :mod:`behave.textutil`. """ from __future__ import absolute_import, print_function from behave.textutil import text, is_ascii_encoding, select_best_encoding import pytest import codecs import six # -----------------------------------------------------------------------------...
36.032258
92
0.612752
from __future__ import absolute_import, print_function from behave.textutil import text, is_ascii_encoding, select_best_encoding import pytest import codecs import six class ConvertableToUnicode(object): encoding = "utf-8" def __init__(self, text, encoding=None): self.text = text self.enc...
true
true
f7f6433b5397c3f6d4852e4fe84db2d55600e298
1,738
py
Python
cpdb/search/date_util.py
invinst/CPDBv2_backend
b4e96d620ff7a437500f525f7e911651e4a18ef9
[ "Apache-2.0" ]
25
2018-07-20T22:31:40.000Z
2021-07-15T16:58:41.000Z
cpdb/search/date_util.py
invinst/CPDBv2_backend
b4e96d620ff7a437500f525f7e911651e4a18ef9
[ "Apache-2.0" ]
13
2018-06-18T23:08:47.000Z
2022-02-10T07:38:25.000Z
cpdb/search/date_util.py
invinst/CPDBv2_backend
b4e96d620ff7a437500f525f7e911651e4a18ef9
[ "Apache-2.0" ]
6
2018-05-17T21:59:43.000Z
2020-11-17T00:30:26.000Z
import re from dateparser.search import search_dates from dateparser import parse MIN_DATE_STRING = 6 DIGITS_MODIFIER_PATTERN = r'\d{1,2}st|\d{1,2}nd|\d{1,2}rd|\d{1,2}th' DIGITS_PATTERN = r'\d{1,4}' MONTHS_PATTERN = 'january|february|march|april|may|june|july|august|september|october|november|december|' \ ...
32.792453
107
0.697353
import re from dateparser.search import search_dates from dateparser import parse MIN_DATE_STRING = 6 DIGITS_MODIFIER_PATTERN = r'\d{1,2}st|\d{1,2}nd|\d{1,2}rd|\d{1,2}th' DIGITS_PATTERN = r'\d{1,4}' MONTHS_PATTERN = 'january|february|march|april|may|june|july|august|september|october|november|december|' \ ...
true
true
f7f6435a685ce7599500c328cd1e055481aa5830
5,353
py
Python
ddpm_proteins/utils.py
lucidrains/ddpm-proteins
88bfacbd3cbdc4e38585fab420106f56e890c5f7
[ "MIT" ]
61
2021-06-14T16:41:54.000Z
2022-03-23T14:09:46.000Z
ddpm_proteins/utils.py
lucidrains/ddpm-proteins
88bfacbd3cbdc4e38585fab420106f56e890c5f7
[ "MIT" ]
null
null
null
ddpm_proteins/utils.py
lucidrains/ddpm-proteins
88bfacbd3cbdc4e38585fab420106f56e890c5f7
[ "MIT" ]
5
2021-06-15T11:51:47.000Z
2022-03-18T08:01:48.000Z
import os from PIL import Image import seaborn as sn import matplotlib.pyplot as plt import torch import torch.nn.functional as F from sidechainnet.utils.sequence import ProteinVocabulary from einops import rearrange # general functions def exists(val): return val is not None def default(val, d): return va...
29.092391
134
0.655707
import os from PIL import Image import seaborn as sn import matplotlib.pyplot as plt import torch import torch.nn.functional as F from sidechainnet.utils.sequence import ProteinVocabulary from einops import rearrange def exists(val): return val is not None def default(val, d): return val if exists(val) el...
true
true
f7f64365eca35641a88f31b9c546261f818f9f46
5,282
py
Python
concierge/concierge_queue.py
victusfate/concierge
9fa7e27a879f478b478f6deaf03255b48c1630e9
[ "MIT" ]
14
2021-12-16T06:56:08.000Z
2022-03-30T11:59:50.000Z
concierge/concierge_queue.py
victusfate/concierge
9fa7e27a879f478b478f6deaf03255b48c1630e9
[ "MIT" ]
null
null
null
concierge/concierge_queue.py
victusfate/concierge
9fa7e27a879f478b478f6deaf03255b48c1630e9
[ "MIT" ]
null
null
null
import os from rsyslog_cee import log from rsyslog_cee.logger import Logger,LoggerOptions from concierge import constants import time from concierge import data_io from concierge import constants from concierge.collaborative_filter import CollaborativeFilter from river import metrics import redis log.set_service_nam...
34.75
103
0.638584
import os from rsyslog_cee import log from rsyslog_cee.logger import Logger,LoggerOptions from concierge import constants import time from concierge import data_io from concierge import constants from concierge.collaborative_filter import CollaborativeFilter from river import metrics import redis log.set_service_nam...
true
true
f7f6443bca9ad4e9963793af4d2f635f9cd49ed0
5,792
py
Python
tests/syn_reports/commands/benefactor_permissions_report/test_benefactor_permissions_report.py
pcstout/syn-reports
9b2692fbc38e5596e62d8a415536483f2d05ee78
[ "Apache-2.0" ]
1
2020-02-27T02:15:38.000Z
2020-02-27T02:15:38.000Z
tests/syn_reports/commands/benefactor_permissions_report/test_benefactor_permissions_report.py
pcstout/syn-reports
9b2692fbc38e5596e62d8a415536483f2d05ee78
[ "Apache-2.0" ]
7
2020-03-24T18:21:31.000Z
2021-06-22T14:22:11.000Z
tests/syn_reports/commands/benefactor_permissions_report/test_benefactor_permissions_report.py
pcstout/syn-reports
9b2692fbc38e5596e62d8a415536483f2d05ee78
[ "Apache-2.0" ]
2
2020-03-02T21:30:50.000Z
2020-03-13T22:03:43.000Z
import pytest import os import csv from src.syn_reports.commands.benefactor_permissions_report import BenefactorPermissionsReport from src.syn_reports.core import SynapseProxy def assert_success_from_print(capsys, *entities): captured = capsys.readouterr() assert captured.err == '' for entity in entities:...
44.553846
104
0.700622
import pytest import os import csv from src.syn_reports.commands.benefactor_permissions_report import BenefactorPermissionsReport from src.syn_reports.core import SynapseProxy def assert_success_from_print(capsys, *entities): captured = capsys.readouterr() assert captured.err == '' for entity in entities:...
true
true
f7f6456f736c0a6b770c6efa05959c261b0fde92
3,420
py
Python
pandas/tests/indexes/test_numpy_compat.py
HQDragon/pandas
8713f2d1237a471a4f42f3fb547887bc022a5b94
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause" ]
2
2022-02-02T02:05:28.000Z
2022-02-02T02:09:37.000Z
pandas/tests/indexes/test_numpy_compat.py
HQDragon/pandas
8713f2d1237a471a4f42f3fb547887bc022a5b94
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause" ]
2
2021-02-16T06:43:48.000Z
2021-03-19T00:07:02.000Z
pandas/tests/indexes/test_numpy_compat.py
HQDragon/pandas
8713f2d1237a471a4f42f3fb547887bc022a5b94
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause" ]
1
2021-03-24T05:02:16.000Z
2021-03-24T05:02:16.000Z
import numpy as np import pytest from pandas.compat import np_version_under1p17, np_version_under1p18 from pandas import ( DatetimeIndex, Float64Index, Index, Int64Index, PeriodIndex, TimedeltaIndex, UInt64Index, ) import pandas._testing as tm from pandas.core.indexes.datetimelike import D...
29.73913
85
0.598538
import numpy as np import pytest from pandas.compat import np_version_under1p17, np_version_under1p18 from pandas import ( DatetimeIndex, Float64Index, Index, Int64Index, PeriodIndex, TimedeltaIndex, UInt64Index, ) import pandas._testing as tm from pandas.core.indexes.datetimelike import D...
true
true
f7f645899bf827d2117307c17dec9227dfb1184c
2,133
py
Python
examples/adspygoogle/dfp/v201101/get_custom_targeting_keys_by_statement.py
hockeyprincess/google-api-dfp-python
efa82a8d85cbdc90f030db9d168790c55bd8b12a
[ "Apache-2.0" ]
null
null
null
examples/adspygoogle/dfp/v201101/get_custom_targeting_keys_by_statement.py
hockeyprincess/google-api-dfp-python
efa82a8d85cbdc90f030db9d168790c55bd8b12a
[ "Apache-2.0" ]
null
null
null
examples/adspygoogle/dfp/v201101/get_custom_targeting_keys_by_statement.py
hockeyprincess/google-api-dfp-python
efa82a8d85cbdc90f030db9d168790c55bd8b12a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # # Copyright 2011 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
33.857143
80
0.699484
"""This example gets all predefined custom targeting keys. The statement retrieves up to the maximum page size limit of 500. To create custom targeting keys, run create_custom_targeting_keys_and_values.py.""" __author__ = 'api.sgrinberg@gmail.com (Stan Grinberg)' import os import sys sys.path.append...
false
true
f7f646aaf78bd0e7521568773a9e6c7232f7d2df
2,810
py
Python
ASR/scripts/toolkit/dataset_pickle.py
maxwellzh/ST-NAS
67d1b91cdc42a30a38fb540922b49c02a3b9c74e
[ "Apache-2.0" ]
null
null
null
ASR/scripts/toolkit/dataset_pickle.py
maxwellzh/ST-NAS
67d1b91cdc42a30a38fb540922b49c02a3b9c74e
[ "Apache-2.0" ]
null
null
null
ASR/scripts/toolkit/dataset_pickle.py
maxwellzh/ST-NAS
67d1b91cdc42a30a38fb540922b49c02a3b9c74e
[ "Apache-2.0" ]
null
null
null
''' Copyright 2020 SPMI-CAT Modified by Zheng Huahuan ''' from torch.utils.data import Dataset import kaldi_io import numpy as np import torch import sys import pickle sys.path.append('./ctc-crf') class SpeechDataset(Dataset): def __init__(self, pickle_path): with open(pickle_path, 'rb') as f: ...
32.674419
90
0.63879
from torch.utils.data import Dataset import kaldi_io import numpy as np import torch import sys import pickle sys.path.append('./ctc-crf') class SpeechDataset(Dataset): def __init__(self, pickle_path): with open(pickle_path, 'rb') as f: self.dataset = pic...
true
true
f7f646b36fdefa974c9d1523c6b8e22b485857c5
10,098
py
Python
kats/detectors/prophet_detector.py
DiegoHidalgoS/Kats
9ac0f341dd44ef8574cde584d1cd17f91e578acd
[ "MIT" ]
1
2021-11-30T09:15:55.000Z
2021-11-30T09:15:55.000Z
kats/detectors/prophet_detector.py
Fate-Tesstarosa/Kats_CN
48f95d141a6241f26f2fdac84418dba430407fb6
[ "MIT" ]
null
null
null
kats/detectors/prophet_detector.py
Fate-Tesstarosa/Kats_CN
48f95d141a6241f26f2fdac84418dba430407fb6
[ "MIT" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ This module contains code to implement the Prophet algorithm as a Detector Model. """ from enum import Enum from typing import Optional im...
32.892508
139
0.661616
from enum import Enum from typing import Optional import numpy as np import pandas as pd try: from fbprophet import Prophet from fbprophet.serialize import model_from_json, model_to_json _no_prophet = False except ImportError: _no_prophet = True from kats.consts import TimeSeriesData from kats....
true
true
f7f6473ff237a45180be5d91bae0932bb2777fe6
1,668
py
Python
superviselySDK/supervisely_lib/geometry/sliding_windows.py
nicehuster/mmdetection-supervisely-person-datasets
ff1b57e16a71378510571dbb9cebfdb712656927
[ "Apache-2.0" ]
40
2019-05-05T08:08:18.000Z
2021-10-17T00:07:58.000Z
superviselySDK/supervisely_lib/geometry/sliding_windows.py
nicehuster/mmdetection-supervisely-person-datasets
ff1b57e16a71378510571dbb9cebfdb712656927
[ "Apache-2.0" ]
8
2019-06-13T06:00:08.000Z
2021-07-24T05:25:33.000Z
superviselySDK/supervisely_lib/geometry/sliding_windows.py
nicehuster/mmdetection-supervisely-person-datasets
ff1b57e16a71378510571dbb9cebfdb712656927
[ "Apache-2.0" ]
6
2019-07-30T06:36:27.000Z
2021-06-03T11:57:36.000Z
# coding: utf-8 from supervisely_lib.geometry.rectangle import Rectangle from supervisely_lib.geometry.validation import is_2d_int_coords_valid class SlidingWindows: def __init__(self, window_shape, min_overlap): if not is_2d_int_coords_valid([window_shape]): raise ValueError('window_shape mu...
46.333333
89
0.664868
from supervisely_lib.geometry.rectangle import Rectangle from supervisely_lib.geometry.validation import is_2d_int_coords_valid class SlidingWindows: def __init__(self, window_shape, min_overlap): if not is_2d_int_coords_valid([window_shape]): raise ValueError('window_shape must contains 2 i...
true
true
f7f6486666aa586234e1ea13e89dcced4e872231
287
py
Python
desafios/Mundo 3/Ex097.py
duartecgustavo/Python---Estudos-
13a47f115dd24ef475addaed7b0c860a7b3817ca
[ "MIT" ]
6
2021-01-20T20:43:39.000Z
2021-08-13T15:44:10.000Z
desafios/Mundo 3/Ex097.py
duartecgustavo/PythonProgress
13a47f115dd24ef475addaed7b0c860a7b3817ca
[ "MIT" ]
null
null
null
desafios/Mundo 3/Ex097.py
duartecgustavo/PythonProgress
13a47f115dd24ef475addaed7b0c860a7b3817ca
[ "MIT" ]
1
2020-09-06T03:34:19.000Z
2020-09-06T03:34:19.000Z
# Desafio 97 - Aula 20: Receba um texto qualquer como parametrô e mostre a mensagem de forma adaptavel: def escreva(msg): tam = len(msg) + 4 print('-'*tam) print(f' {msg}') print('-'*tam) for count in range(0,3): escreva(msg = str(input('Escreva uma mensagem: ')))
28.7
103
0.634146
def escreva(msg): tam = len(msg) + 4 print('-'*tam) print(f' {msg}') print('-'*tam) for count in range(0,3): escreva(msg = str(input('Escreva uma mensagem: ')))
true
true
f7f649ef9bf0d870a17c15b6627bf75c4d3d9f7f
1,479
py
Python
tracking_load_faker/_utils.py
diogenes1oliveira/tracking-load-faker
336b426c11d0cd2100765e21b5d1dc355b3c92a0
[ "MIT" ]
null
null
null
tracking_load_faker/_utils.py
diogenes1oliveira/tracking-load-faker
336b426c11d0cd2100765e21b5d1dc355b3c92a0
[ "MIT" ]
2
2020-01-15T02:57:24.000Z
2020-01-23T18:05:41.000Z
tracking_load_faker/_utils.py
diogenes1oliveira/tracking-load-faker
336b426c11d0cd2100765e21b5d1dc355b3c92a0
[ "MIT" ]
null
null
null
''' Utility functions to deal with Faker data ''' from http.server import ThreadingHTTPServer, BaseHTTPRequestHandler import os import yaml HERE = os.path.abspath(os.path.dirname(__file__)) FAKER_DATA_DIR = os.path.join(HERE, 'faker-data') def get_faker_data(basename: str, search_path: str = None): f''' Ret...
30.8125
78
0.682894
from http.server import ThreadingHTTPServer, BaseHTTPRequestHandler import os import yaml HERE = os.path.abspath(os.path.dirname(__file__)) FAKER_DATA_DIR = os.path.join(HERE, 'faker-data') def get_faker_data(basename: str, search_path: str = None): f''' Returns the contents of the Faker data YAML file with...
true
true
f7f64a9ef6855594c45417ea21df126721336001
14,158
py
Python
app.py
MrHakimov/toy-store
89b944d86273fe41215f4667d4ac6e9ea4566322
[ "MIT" ]
null
null
null
app.py
MrHakimov/toy-store
89b944d86273fe41215f4667d4ac6e9ea4566322
[ "MIT" ]
null
null
null
app.py
MrHakimov/toy-store
89b944d86273fe41215f4667d4ac6e9ea4566322
[ "MIT" ]
null
null
null
import datetime, json, re, numpy as np, simplejson, time from collections import defaultdict from sqlalchemy.ext.hybrid import hybrid_property from sqlalchemy.ext.mutable import Mutable from flask import Flask, request, jsonify from flask_sqlalchemy import SQLAlchemy from flask_marshmallow import Marshmallow from decim...
36.117347
119
0.535316
import datetime, json, re, numpy as np, simplejson, time from collections import defaultdict from sqlalchemy.ext.hybrid import hybrid_property from sqlalchemy.ext.mutable import Mutable from flask import Flask, request, jsonify from flask_sqlalchemy import SQLAlchemy from flask_marshmallow import Marshmallow from decim...
true
true
f7f64ac055d04fc16d1b740a36b081e38d704255
9,709
py
Python
examples/seismic/acoustic/wavesolver.py
alisiahkoohi/devito
f535a44dff12de2837eb6e3217a65ffb2d371cb8
[ "MIT" ]
null
null
null
examples/seismic/acoustic/wavesolver.py
alisiahkoohi/devito
f535a44dff12de2837eb6e3217a65ffb2d371cb8
[ "MIT" ]
40
2019-02-26T22:59:16.000Z
2022-03-21T12:32:30.000Z
examples/seismic/acoustic/wavesolver.py
alisiahkoohi/devito
f535a44dff12de2837eb6e3217a65ffb2d371cb8
[ "MIT" ]
null
null
null
from devito import Function, TimeFunction from devito.tools import memoized_meth from examples.seismic.acoustic.operators import ( ForwardOperator, AdjointOperator, GradientOperator, BornOperator ) from examples.checkpointing.checkpoint import DevitoCheckpoint, CheckpointOperator from pyrevolve import Revolver cl...
39.307692
88
0.596354
from devito import Function, TimeFunction from devito.tools import memoized_meth from examples.seismic.acoustic.operators import ( ForwardOperator, AdjointOperator, GradientOperator, BornOperator ) from examples.checkpointing.checkpoint import DevitoCheckpoint, CheckpointOperator from pyrevolve import Revolver cl...
true
true
f7f64b7574f2bfe50ad370f15a431b68445c5759
3,532
py
Python
grslra/video.py
clemenshage/grslra
00f61b4ef08208d12e8e803d10f8ebbe16d8614a
[ "MIT" ]
null
null
null
grslra/video.py
clemenshage/grslra
00f61b4ef08208d12e8e803d10f8ebbe16d8614a
[ "MIT" ]
null
null
null
grslra/video.py
clemenshage/grslra
00f61b4ef08208d12e8e803d10f8ebbe16d8614a
[ "MIT" ]
null
null
null
import matplotlib import numpy as np from matplotlib import pyplot as plt try: import cv2 OPENCV = True except ImportError: OPENCV = False "Error: Unable to import cv2. If you want to enable video output please install OpenCV first." try: import pims except ImportError: PIMS = False "Error...
36.412371
130
0.579558
import matplotlib import numpy as np from matplotlib import pyplot as plt try: import cv2 OPENCV = True except ImportError: OPENCV = False "Error: Unable to import cv2. If you want to enable video output please install OpenCV first." try: import pims except ImportError: PIMS = False "Error...
false
true
f7f64b9a8ae5f88a396fa3563cee0e28ebdf4d97
3,466
py
Python
django_mailbox2/south_migrations/0009_remove_references_table.py
sunset-crew/django-mailbox
e9f6079c66e70e705f3c968e2e8c7b00c182ef40
[ "MIT" ]
null
null
null
django_mailbox2/south_migrations/0009_remove_references_table.py
sunset-crew/django-mailbox
e9f6079c66e70e705f3c968e2e8c7b00c182ef40
[ "MIT" ]
null
null
null
django_mailbox2/south_migrations/0009_remove_references_table.py
sunset-crew/django-mailbox
e9f6079c66e70e705f3c968e2e8c7b00c182ef40
[ "MIT" ]
null
null
null
import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Removing M2M table for field references on 'Message' db.delete_table("django_mailbox2_message_references") def backwards(self,...
35.010101
88
0.4397
import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): db.delete_table("django_mailbox2_message_references") def backwards(self, orm): db.create_table( "...
true
true
f7f64bd839a501394d3deb7b03b66f496543e6c1
2,692
py
Python
scripts/experimental/bmk2/inputprops.py
bigwater/Galois
03738c883301844cfb15a71647744a59184f43c0
[ "BSD-3-Clause" ]
230
2018-06-20T22:18:31.000Z
2022-03-27T13:09:59.000Z
scripts/experimental/bmk2/inputprops.py
bigwater/Galois
03738c883301844cfb15a71647744a59184f43c0
[ "BSD-3-Clause" ]
307
2018-06-23T12:45:31.000Z
2022-03-26T01:54:38.000Z
scripts/experimental/bmk2/inputprops.py
bigwater/Galois
03738c883301844cfb15a71647744a59184f43c0
[ "BSD-3-Clause" ]
110
2018-06-19T04:39:16.000Z
2022-03-29T01:55:47.000Z
#!/usr/bin/env python # # inputprops.py # # Manages an input properties file (*.inputprops) # # Copyright (c) 2015, 2016 The University of Texas at Austin # # Author: Sreepathi Pai <sreepai@ices.utexas.edu> # # Intended to be licensed under GPL3 import sys import inputdb import argparse import ConfigParser import os f...
26.92
79
0.617385
import sys import inputdb import argparse import ConfigParser import os from opdb import ObjectPropsCFG class InputPropsCfg(ObjectPropsCFG): def __init__(self, filename, inputdb): super(InputPropsCfg, self).__init__(filename, "bmktest2-props", ["2"]) self.inputdb = inputdb self....
true
true
f7f64d1496566363490630affe3c740a7e5e9b40
477
py
Python
build/husky/husky_msgs/catkin_generated/pkg.installspace.context.pc.py
team-auto-z/IGVC2019
047e3eea7a2bd70f2505844ccc72ae1a2aaa6f2d
[ "MIT" ]
1
2020-02-05T21:28:13.000Z
2020-02-05T21:28:13.000Z
build/husky/husky_msgs/catkin_generated/pkg.installspace.context.pc.py
team-auto-z/IGVC2019
047e3eea7a2bd70f2505844ccc72ae1a2aaa6f2d
[ "MIT" ]
1
2019-02-21T16:59:22.000Z
2019-02-21T16:59:22.000Z
build/husky/husky_msgs/catkin_generated/pkg.installspace.context.pc.py
team-auto-z/IGVC2019
047e3eea7a2bd70f2505844ccc72ae1a2aaa6f2d
[ "MIT" ]
3
2019-02-11T19:59:08.000Z
2020-02-27T19:27:38.000Z
# generated from catkin/cmake/template/pkg.context.pc.in CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/ajinkya/catkin_ws/install/include".split(';') if "/home/ajinkya/catkin_ws/install/include" != "" else [] PROJECT_CATKIN_DEPENDS = "std_msgs;message_runtime".replace(';', ' ') PKG_CONFIG_LIBRARIES...
53
145
0.746331
CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/ajinkya/catkin_ws/install/include".split(';') if "/home/ajinkya/catkin_ws/install/include" != "" else [] PROJECT_CATKIN_DEPENDS = "std_msgs;message_runtime".replace(';', ' ') PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else [] PROJECT...
true
true
f7f64d4dfc5ff7c3b860675ea761739a9f6d462b
2,574
py
Python
bank_models/account_management.py
firminoneto11/terceiro-projeto-curso-python
685a0e6fafdc07a28a4e7589ac40db0de61737c0
[ "MIT" ]
1
2021-04-07T00:28:41.000Z
2021-04-07T00:28:41.000Z
bank_models/account_management.py
firminoneto11/terceiro-projeto-curso-python
685a0e6fafdc07a28a4e7589ac40db0de61737c0
[ "MIT" ]
null
null
null
bank_models/account_management.py
firminoneto11/terceiro-projeto-curso-python
685a0e6fafdc07a28a4e7589ac40db0de61737c0
[ "MIT" ]
null
null
null
from csv import DictWriter from os import mkdir from os.path import exists class Counter: TRACKER = r".\bank_databases\tracker.txt" @staticmethod def generate_account_number(): Counter.__check_tracker_and_dir() f = Counter.TRACKER with open(f, mode='r') as file: curren...
27.382979
94
0.58819
from csv import DictWriter from os import mkdir from os.path import exists class Counter: TRACKER = r".\bank_databases\tracker.txt" @staticmethod def generate_account_number(): Counter.__check_tracker_and_dir() f = Counter.TRACKER with open(f, mode='r') as file: curren...
true
true
f7f64de3bedd323ffc43c8e50f62899c8e7a7ce1
6,612
py
Python
accenv/lib/python3.4/site-packages/allauth/socialaccount/south_migrations/0012_auto__chg_field_socialtoken_token_secret.py
adamshamsudeen/clubdin-dj
eb48c67dab3a4ae7c4032544eb4d64e0b1d7e15a
[ "MIT" ]
null
null
null
accenv/lib/python3.4/site-packages/allauth/socialaccount/south_migrations/0012_auto__chg_field_socialtoken_token_secret.py
adamshamsudeen/clubdin-dj
eb48c67dab3a4ae7c4032544eb4d64e0b1d7e15a
[ "MIT" ]
null
null
null
accenv/lib/python3.4/site-packages/allauth/socialaccount/south_migrations/0012_auto__chg_field_socialtoken_token_secret.py
adamshamsudeen/clubdin-dj
eb48c67dab3a4ae7c4032544eb4d64e0b1d7e15a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'SocialToken.token_sec...
68.164948
193
0.571688
from __future__ import unicode_literals from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): db.alter_column('socialaccount_socialtoken', 'token_s...
true
true
f7f64e296cb2ce5c0a1a188e89fdbf908a65ee6f
96,402
py
Python
tests/test_updater.py
trailofbits/tuf
e06e8e1afc25a6edcce2eb91b5e3c6e726d74bdf
[ "Apache-2.0", "MIT" ]
1
2021-11-27T00:02:16.000Z
2021-11-27T00:02:16.000Z
tests/test_updater.py
trailofbits/tuf
e06e8e1afc25a6edcce2eb91b5e3c6e726d74bdf
[ "Apache-2.0", "MIT" ]
1
2021-02-10T02:13:05.000Z
2021-02-10T02:13:05.000Z
tests/test_updater.py
trailofbits/tuf
e06e8e1afc25a6edcce2eb91b5e3c6e726d74bdf
[ "Apache-2.0", "MIT" ]
null
null
null
#!/usr/bin/env python # Copyright 2012 - 2017, New York University and the TUF contributors # SPDX-License-Identifier: MIT OR Apache-2.0 """ <Program Name> test_updater.py <Author> Konstantin Andrianov. <Started> October 15, 2012. March 11, 2014. Refactored to remove mocked modules and old repository t...
44.16033
118
0.724601
from __future__ import print_function from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import os import time import shutil import copy import tempfile import logging import random import subprocess import errno import sys import unittest import tu...
true
true
f7f650a9549aa0d3c5417917c4279b7e7ea9f30f
686
py
Python
rfvision/models/detectors/mask_rcnn.py
tycoer/rfvision-1
db6e28746d8251d1f394544c32b9e0af388d9964
[ "Apache-2.0" ]
6
2021-09-25T03:53:06.000Z
2022-02-19T03:25:11.000Z
rfvision/models/detectors/mask_rcnn.py
tycoer/rfvision-1
db6e28746d8251d1f394544c32b9e0af388d9964
[ "Apache-2.0" ]
1
2021-07-21T13:14:54.000Z
2021-07-21T13:14:54.000Z
rfvision/models/detectors/mask_rcnn.py
tycoer/rfvision-1
db6e28746d8251d1f394544c32b9e0af388d9964
[ "Apache-2.0" ]
2
2021-07-16T03:25:04.000Z
2021-11-22T06:04:01.000Z
from ..builder import DETECTORS from .two_stage import TwoStageDetector @DETECTORS.register_module() class MaskRCNN(TwoStageDetector): """Implementation of `Mask R-CNN <https://arxiv.org/abs/1703.06870>`_""" def __init__(self, backbone, rpn_head, roi_head, ...
27.44
76
0.540816
from ..builder import DETECTORS from .two_stage import TwoStageDetector @DETECTORS.register_module() class MaskRCNN(TwoStageDetector): def __init__(self, backbone, rpn_head, roi_head, train_cfg, test_cfg, neck=N...
true
true
f7f65290d605eb916d6603186ccfd628150dd96a
571
py
Python
apphv/core/migrations/0037_auto_20190625_1848.py
FerneyMoreno20/Portfolio
59eaa4f4f6762386fe84450f65f508be1414f857
[ "bzip2-1.0.6" ]
null
null
null
apphv/core/migrations/0037_auto_20190625_1848.py
FerneyMoreno20/Portfolio
59eaa4f4f6762386fe84450f65f508be1414f857
[ "bzip2-1.0.6" ]
6
2019-12-04T23:34:47.000Z
2021-06-09T18:01:16.000Z
apphv/core/migrations/0037_auto_20190625_1848.py
FerneyMoreno20/Portfolio
59eaa4f4f6762386fe84450f65f508be1414f857
[ "bzip2-1.0.6" ]
null
null
null
# Generated by Django 2.2.2 on 2019-06-25 18:48 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0036_auto_20190625_1845'), ] operations = [ migrations.AlterField( model_name='contact', name='tipom', ...
30.052632
238
0.618214
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0036_auto_20190625_1845'), ] operations = [ migrations.AlterField( model_name='contact', name='tipom', field=models.CharField(choices=[('Solici...
true
true
f7f652e1e8202f9a95ca39642ca53df45b3d72a7
3,613
py
Python
pyprover/atoms.py
Bia10/pyprover
34f79f657474c1234fc752fd2c9e13e566eb8786
[ "Apache-2.0" ]
1
2021-04-30T05:18:43.000Z
2021-04-30T05:18:43.000Z
pyprover/atoms.py
Bia10/pyprover
34f79f657474c1234fc752fd2c9e13e566eb8786
[ "Apache-2.0" ]
null
null
null
pyprover/atoms.py
Bia10/pyprover
34f79f657474c1234fc752fd2c9e13e566eb8786
[ "Apache-2.0" ]
1
2019-06-08T09:43:27.000Z
2019-06-08T09:43:27.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # __coconut_hash__ = 0x87d7eefa # Compiled with Coconut version 1.3.1 [Dead Parrot] # Coconut Header: ------------------------------------------------------------- from __future__ import print_function, absolute_import, unicode_literals, division import sys as _coconut_s...
32.845455
447
0.580958
from __future__ import print_function, absolute_import, unicode_literals, division import sys as _coconut_sys, os.path as _coconut_os_path _coconut_file_path = _coconut_os_path.dirname(_coconut_os_path.abspath(__file__)) _coconut_sys.path.insert(0, _coconut_file_path) from __coconut__ import _coconut, _coconut_...
true
true
f7f652e839e28e14ffafb001dc3dd3933250f32b
61,278
py
Python
models/gateway.py
drivefast/mmsgw
38f844b137747311bc734a622b587ae14fbd55fe
[ "MIT" ]
1
2021-08-18T17:01:39.000Z
2021-08-18T17:01:39.000Z
models/gateway.py
drivefast/mmsgw
38f844b137747311bc734a622b587ae14fbd55fe
[ "MIT" ]
null
null
null
models/gateway.py
drivefast/mmsgw
38f844b137747311bc734a622b587ae14fbd55fe
[ "MIT" ]
null
null
null
import os.path import shutil import time import datetime import iso8601 import uuid import base64 import json import rq import requests import xmltodict import traceback import xml.etree.cElementTree as ET import smtplib import email, email.utils import mimetypes from email.mime.base import MIMEBase from email.mime.m...
45.123711
157
0.55728
import os.path import shutil import time import datetime import iso8601 import uuid import base64 import json import rq import requests import xmltodict import traceback import xml.etree.cElementTree as ET import smtplib import email, email.utils import mimetypes from email.mime.base import MIMEBase from email.mime.m...
true
true
f7f65350e287172e414e95272dd5d95842e20d97
1,110
py
Python
podman/tests/unit/test_volume.py
kevinwylder/podman-py
fefc036d109b51e5cdf8754b8c0740188e74e938
[ "Apache-2.0" ]
106
2020-02-01T18:19:04.000Z
2022-03-25T04:34:30.000Z
podman/tests/unit/test_volume.py
randlega/podman-py
116f55d40a4cf08f4d3db401b7b66f0d19f554fa
[ "Apache-2.0" ]
152
2020-02-04T01:52:34.000Z
2022-03-29T14:57:05.000Z
podman/tests/unit/test_volume.py
randlega/podman-py
116f55d40a4cf08f4d3db401b7b66f0d19f554fa
[ "Apache-2.0" ]
61
2020-02-01T16:19:58.000Z
2022-03-25T17:58:34.000Z
import unittest import requests_mock from podman import PodmanClient, tests from podman.domain.volumes import Volume, VolumesManager FIRST_VOLUME = { "CreatedAt": "1985-04-12T23:20:50.52Z", "Driver": "default", "Labels": {"BackupRequired": True}, "Mountpoint": "/var/database", "Name": "dbase", ...
24.666667
94
0.654955
import unittest import requests_mock from podman import PodmanClient, tests from podman.domain.volumes import Volume, VolumesManager FIRST_VOLUME = { "CreatedAt": "1985-04-12T23:20:50.52Z", "Driver": "default", "Labels": {"BackupRequired": True}, "Mountpoint": "/var/database", "Name": "dbase", ...
true
true
f7f6537b54d46e7ae52b740c00f1ea1f76e1d9b3
7,541
py
Python
train_liif.py
JungHunOh/liif
c4445bf4b4adf25cae66d760fc590b80e627f0d7
[ "BSD-3-Clause" ]
860
2020-12-17T02:42:11.000Z
2022-03-30T02:37:14.000Z
train_liif.py
JungHunOh/liif
c4445bf4b4adf25cae66d760fc590b80e627f0d7
[ "BSD-3-Clause" ]
44
2020-12-18T09:54:46.000Z
2021-12-29T02:54:32.000Z
train_liif.py
JungHunOh/liif
c4445bf4b4adf25cae66d760fc590b80e627f0d7
[ "BSD-3-Clause" ]
100
2020-12-17T05:06:14.000Z
2022-03-24T08:14:16.000Z
""" Train for generating LIIF, from image to implicit representation. Config: train_dataset: dataset: $spec; wrapper: $spec; batch_size: val_dataset: dataset: $spec; wrapper: $spec; batch_size: (data_norm): inp: {sub: []; div: []} gt: {su...
32.645022
80
0.575653
import argparse import os import yaml import torch import torch.nn as nn from tqdm import tqdm from torch.utils.data import DataLoader from torch.optim.lr_scheduler import MultiStepLR import datasets import models import utils from test import eval_psnr def make_data_loader(spec, tag=''): if ...
true
true
f7f653bbc00c0994c27fe125f6197cadbb638abb
8,791
py
Python
isic/core/tests/test_search.py
ImageMarkup/isic
607b2b103d0d2a67adb61f8ea88f1461c85ec8f3
[ "Apache-2.0" ]
null
null
null
isic/core/tests/test_search.py
ImageMarkup/isic
607b2b103d0d2a67adb61f8ea88f1461c85ec8f3
[ "Apache-2.0" ]
18
2021-06-10T05:14:34.000Z
2022-03-22T02:15:59.000Z
isic/core/tests/test_search.py
ImageMarkup/isic
607b2b103d0d2a67adb61f8ea88f1461c85ec8f3
[ "Apache-2.0" ]
null
null
null
import itertools import pytest from isic.core.models.image import RESTRICTED_METADATA_FIELDS from isic.core.search import add_to_search_index, get_elasticsearch_client @pytest.fixture def private_searchable_image(image_factory, search_index): image = image_factory(public=False) add_to_search_index(image) ...
34.206226
99
0.734729
import itertools import pytest from isic.core.models.image import RESTRICTED_METADATA_FIELDS from isic.core.search import add_to_search_index, get_elasticsearch_client @pytest.fixture def private_searchable_image(image_factory, search_index): image = image_factory(public=False) add_to_search_index(image) ...
true
true
f7f65430bea2e5db02164294d2b8ebbde02fd6d4
2,738
py
Python
applications/structural_application/test_examples/balken.gid/balken.py
jiaqiwang969/Kratos-test
ed082abc163e7b627f110a1ae1da465f52f48348
[ "BSD-4-Clause" ]
null
null
null
applications/structural_application/test_examples/balken.gid/balken.py
jiaqiwang969/Kratos-test
ed082abc163e7b627f110a1ae1da465f52f48348
[ "BSD-4-Clause" ]
null
null
null
applications/structural_application/test_examples/balken.gid/balken.py
jiaqiwang969/Kratos-test
ed082abc163e7b627f110a1ae1da465f52f48348
[ "BSD-4-Clause" ]
null
null
null
################################################################## ##### ekate - Enhanced KRATOS for Advanced Tunnel Enineering ##### ##### copyright by CIMNE, Barcelona, Spain ##### ##### and Janosch Stascheit for TUNCONSTRUCT ##### ##### all rights reserved ...
48.035088
101
0.49233
false
true
f7f6551fea5c33094eb8a4ce5d3825d2cd8172a1
10,803
py
Python
integrations/client/test_delphi_epidata.py
jingjtang/delphi-epidata
4edb2e3051ff02bdea4e86370f1be0e303d8fa5e
[ "MIT" ]
null
null
null
integrations/client/test_delphi_epidata.py
jingjtang/delphi-epidata
4edb2e3051ff02bdea4e86370f1be0e303d8fa5e
[ "MIT" ]
null
null
null
integrations/client/test_delphi_epidata.py
jingjtang/delphi-epidata
4edb2e3051ff02bdea4e86370f1be0e303d8fa5e
[ "MIT" ]
null
null
null
"""Integration tests for delphi_epidata.py.""" # standard library import unittest # third party import mysql.connector # first party from delphi.epidata.client.delphi_epidata import Epidata from delphi.epidata.acquisition.covidcast.covidcast_meta_cache_updater import main as update_covidcast_meta_cache import delphi...
29.678571
113
0.516523
import unittest import mysql.connector from delphi.epidata.client.delphi_epidata import Epidata from delphi.epidata.acquisition.covidcast.covidcast_meta_cache_updater import main as update_covidcast_meta_cache import delphi.operations.secrets as secrets __test_target__ = 'delphi.epidata.client.delphi_epidata' ...
true
true
f7f65578e3d1e4c139539aba55ad5bf414f027da
135
py
Python
taggit_labels/apps.py
bowsplinter/django-taggit-labels
49d15c340189fd44ecf111b59d8ec13c5664dcce
[ "BSD-3-Clause" ]
null
null
null
taggit_labels/apps.py
bowsplinter/django-taggit-labels
49d15c340189fd44ecf111b59d8ec13c5664dcce
[ "BSD-3-Clause" ]
null
null
null
taggit_labels/apps.py
bowsplinter/django-taggit-labels
49d15c340189fd44ecf111b59d8ec13c5664dcce
[ "BSD-3-Clause" ]
null
null
null
from django.apps import AppConfig class TaggitLabelsConfig(AppConfig): name = 'taggit_labels' verbose_name = 'taggit labels'
19.285714
36
0.755556
from django.apps import AppConfig class TaggitLabelsConfig(AppConfig): name = 'taggit_labels' verbose_name = 'taggit labels'
true
true
f7f655b88acc14618fc4d21dbacb4fa6ce9f781f
1,148
py
Python
clients/kratos/python/test/test_error_container.py
simoneromano96/sdk
a6113d0daefbbb803790297e4b242d4c7cbbcb22
[ "Apache-2.0" ]
null
null
null
clients/kratos/python/test/test_error_container.py
simoneromano96/sdk
a6113d0daefbbb803790297e4b242d4c7cbbcb22
[ "Apache-2.0" ]
null
null
null
clients/kratos/python/test/test_error_container.py
simoneromano96/sdk
a6113d0daefbbb803790297e4b242d4c7cbbcb22
[ "Apache-2.0" ]
null
null
null
""" Ory Kratos API Documentation for all public and administrative Ory Kratos APIs. Public and administrative APIs are exposed on different ports. Public APIs can face the public internet without any protection while administrative APIs should never be exposed without prior authorization. To protect the admini...
31.027027
446
0.735192
import sys import unittest import ory_kratos_client from ory_kratos_client.model.error_container import ErrorContainer class TestErrorContainer(unittest.TestCase): def setUp(self): pass def tearDown(self): pass def testErrorContainer(self): s if __name__ == '__main...
true
true
f7f6563ac60bc0e38507c1eaf57d9636cbb6dc1f
336
py
Python
Flask/rishav/fade.py
Chaitya62/Chokidar
5c4999ff1f1461c4131a51f96f2a9d1661020621
[ "MIT" ]
null
null
null
Flask/rishav/fade.py
Chaitya62/Chokidar
5c4999ff1f1461c4131a51f96f2a9d1661020621
[ "MIT" ]
11
2020-01-28T22:48:41.000Z
2022-02-10T00:23:52.000Z
Flask/rishav/fade.py
Chaitya62/Chokidar
5c4999ff1f1461c4131a51f96f2a9d1661020621
[ "MIT" ]
null
null
null
from pydub import AudioSegment from pydub.playback import play song = AudioSegment.from_mp3("kalank.mp3") song = song[:60000] start = 1000 end = 10000 silent = song.silent(end-start) song = song.overlay(silent,position=start,gain_during_overlay=-20) # song.silent(10000) play(song) file_handle = song.export("output.mp3...
28
66
0.767857
from pydub import AudioSegment from pydub.playback import play song = AudioSegment.from_mp3("kalank.mp3") song = song[:60000] start = 1000 end = 10000 silent = song.silent(end-start) song = song.overlay(silent,position=start,gain_during_overlay=-20) play(song) file_handle = song.export("output.mp3", format="mp3")
true
true
f7f656560f8895b719d171625e836d4fd938fe78
2,275
py
Python
utils/listdirs.py
jhol/symbiflow-arch-defs
421f1ba483c49a796dd896b3d9e9f32c73f1e7a9
[ "ISC" ]
null
null
null
utils/listdirs.py
jhol/symbiflow-arch-defs
421f1ba483c49a796dd896b3d9e9f32c73f1e7a9
[ "ISC" ]
null
null
null
utils/listdirs.py
jhol/symbiflow-arch-defs
421f1ba483c49a796dd896b3d9e9f32c73f1e7a9
[ "ISC" ]
1
2020-03-30T03:03:33.000Z
2020-03-30T03:03:33.000Z
#!/usr/bin/env python3 """ Find all source files in the repo. Excludes the files in the top level .excludes file. """ import argparse import fnmatch import os.path import re import subprocess import sys from lib.argparse_extra import ActionStoreBool MYFILE = os.path.abspath(__file__) MYDIR = os.path.dirname(MYFILE...
23.697917
70
0.61011
import argparse import fnmatch import os.path import re import subprocess import sys from lib.argparse_extra import ActionStoreBool MYFILE = os.path.abspath(__file__) MYDIR = os.path.dirname(MYFILE) TOPDIR = os.path.abspath(os.path.join(MYDIR, "..")) parser = argparse.ArgumentParser( description=__doc__, ...
true
true
f7f6565b6c5928b876148f96acde28a4cdb08408
2,193
py
Python
hs_core/tests/api/views/test_change_quota_holder.py
ResearchSoftwareInstitute/MyHPOM
2d48fe5ac8d21173b1685eb33059bb391fe24414
[ "BSD-3-Clause" ]
1
2018-09-17T13:07:29.000Z
2018-09-17T13:07:29.000Z
hs_core/tests/api/views/test_change_quota_holder.py
ResearchSoftwareInstitute/MyHPOM
2d48fe5ac8d21173b1685eb33059bb391fe24414
[ "BSD-3-Clause" ]
100
2017-08-01T23:48:04.000Z
2018-04-03T13:17:27.000Z
hs_core/tests/api/views/test_change_quota_holder.py
ResearchSoftwareInstitute/MyHPOM
2d48fe5ac8d21173b1685eb33059bb391fe24414
[ "BSD-3-Clause" ]
1
2018-06-28T13:19:58.000Z
2018-06-28T13:19:58.000Z
from django.contrib.auth.models import Group from django.core.urlresolvers import reverse from rest_framework import status from hs_core import hydroshare from hs_core.views import change_quota_holder from hs_core.testing import MockIRODSTestCaseMixin, ViewTestCase from hs_access_control.models import Privile...
39.160714
96
0.661651
from django.contrib.auth.models import Group from django.core.urlresolvers import reverse from rest_framework import status from hs_core import hydroshare from hs_core.views import change_quota_holder from hs_core.testing import MockIRODSTestCaseMixin, ViewTestCase from hs_access_control.models import Privile...
true
true
f7f6574d2900ac528f311a0334c44be7be0bc814
309
py
Python
1-Bimestre/Prova/menu.py
BrunoDalI/Processamento-Digital-de-imagem
6402a86c0e8676ad0b940f80b87f9149845fcfcd
[ "MIT" ]
null
null
null
1-Bimestre/Prova/menu.py
BrunoDalI/Processamento-Digital-de-imagem
6402a86c0e8676ad0b940f80b87f9149845fcfcd
[ "MIT" ]
null
null
null
1-Bimestre/Prova/menu.py
BrunoDalI/Processamento-Digital-de-imagem
6402a86c0e8676ad0b940f80b87f9149845fcfcd
[ "MIT" ]
null
null
null
# Cores azul = (50, 100, 213) laranja = (205, 102, 10) verde = (0, 255, 0) preto = (0, 0, 0) verdeEscuro = (100, 255, 100) verdeClaro = (44, 255, 44) vermelho = (238, 0, 0) branco = (255,255,255) # Dimenssoes da tela do jogo largura = 640 altura = 480 dimensoes = (largura, altura)
14.714286
30
0.576052
azul = (50, 100, 213) laranja = (205, 102, 10) verde = (0, 255, 0) preto = (0, 0, 0) verdeEscuro = (100, 255, 100) verdeClaro = (44, 255, 44) vermelho = (238, 0, 0) branco = (255,255,255) largura = 640 altura = 480 dimensoes = (largura, altura)
true
true
f7f657f1e70766977b4b69cfb125257ed67971ad
3,709
py
Python
challenge/settings.py
julesc00/challenge
0f991d07c3fa959e254d1b97d4d393fde13844a9
[ "MIT" ]
null
null
null
challenge/settings.py
julesc00/challenge
0f991d07c3fa959e254d1b97d4d393fde13844a9
[ "MIT" ]
null
null
null
challenge/settings.py
julesc00/challenge
0f991d07c3fa959e254d1b97d4d393fde13844a9
[ "MIT" ]
null
null
null
""" Django settings for challenge project. Generated by 'django-admin startproject' using Django 3.1.5. For more information on this file, see https://docs.djangoproject.com/en/3.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.1/ref/settings/ """ import loca...
25.231293
91
0.700189
import locale from decouple import config from pathlib import Path config.encoding = locale.getpreferredencoding(False) BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = "2p%6eb8ge#b-(o*^zom@6qexcivs+!53z2*)usm19_rmo90@gl" DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_AP...
true
true
f7f6581426ac9898f8662879b74e86c34c6a6a0b
23,022
py
Python
plugins/bigquery/dbt/adapters/bigquery/impl.py
dholleran-lendico/dbt
170b1d80b5c01da5326be591a742b454c193525c
[ "Apache-2.0" ]
null
null
null
plugins/bigquery/dbt/adapters/bigquery/impl.py
dholleran-lendico/dbt
170b1d80b5c01da5326be591a742b454c193525c
[ "Apache-2.0" ]
null
null
null
plugins/bigquery/dbt/adapters/bigquery/impl.py
dholleran-lendico/dbt
170b1d80b5c01da5326be591a742b454c193525c
[ "Apache-2.0" ]
null
null
null
from dataclasses import dataclass from typing import Dict, List, Optional, Any, Set from hologram import JsonSchemaMixin, ValidationError import dbt.deprecations import dbt.exceptions import dbt.flags as flags import dbt.clients.gcloud import dbt.clients.agate_helper import dbt.links from dbt.adapters.base import Bas...
35.201835
79
0.617062
from dataclasses import dataclass from typing import Dict, List, Optional, Any, Set from hologram import JsonSchemaMixin, ValidationError import dbt.deprecations import dbt.exceptions import dbt.flags as flags import dbt.clients.gcloud import dbt.clients.agate_helper import dbt.links from dbt.adapters.base import Bas...
true
true
f7f6598db1cb88089fe2bb9143316d7938570d78
2,624
py
Python
LinearMotionBlur.py
vandbt/pyblur
5a31b6ced59a4cdef30eafebf0f7c27135d19d34
[ "MIT" ]
null
null
null
LinearMotionBlur.py
vandbt/pyblur
5a31b6ced59a4cdef30eafebf0f7c27135d19d34
[ "MIT" ]
null
null
null
LinearMotionBlur.py
vandbt/pyblur
5a31b6ced59a4cdef30eafebf0f7c27135d19d34
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import math import numpy as np from PIL import Image from scipy.signal import convolve2d from skimage.draw import line from LineDictionary import LineDictionary lineLengths =[3,5,7,9] lineTypes = ["full", "right", "left"] lineDict = LineDictionary() def LinearMotionBlur_random(...
37.485714
95
0.673399
import math import numpy as np from PIL import Image from scipy.signal import convolve2d from skimage.draw import line from LineDictionary import LineDictionary lineLengths =[3,5,7,9] lineTypes = ["full", "right", "left"] lineDict = LineDictionary() def LinearMotionBlur_random(img): lineLengthIdx...
true
true
f7f659d3b67e56986d232732a4ba49ab8a92bafa
12,914
py
Python
chia/wallet/wallet_block_store.py
mgraczyk/chia-blockchain-1
ba6a316efaa251b85f4e499664278beaf66315d8
[ "Apache-2.0" ]
514
2021-06-18T14:43:12.000Z
2022-02-09T04:31:49.000Z
chia/wallet/wallet_block_store.py
jcteng/ext9-blockchain
46506bc5778e14cbc373de39438b0c6f794a49c5
[ "Apache-2.0" ]
70
2021-06-22T02:08:19.000Z
2022-03-29T14:08:22.000Z
chia/wallet/wallet_block_store.py
jcteng/ext9-blockchain
46506bc5778e14cbc373de39438b0c6f794a49c5
[ "Apache-2.0" ]
30
2021-06-23T09:53:16.000Z
2022-03-15T08:43:48.000Z
from dataclasses import dataclass from typing import Dict, List, Optional, Tuple import aiosqlite from chia.consensus.block_record import BlockRecord from chia.types.blockchain_format.sized_bytes import bytes32 from chia.types.blockchain_format.sub_epoch_summary import SubEpochSummary from chia.types.coin_spend impor...
39.735385
116
0.64039
from dataclasses import dataclass from typing import Dict, List, Optional, Tuple import aiosqlite from chia.consensus.block_record import BlockRecord from chia.types.blockchain_format.sized_bytes import bytes32 from chia.types.blockchain_format.sub_epoch_summary import SubEpochSummary from chia.types.coin_spend impor...
true
true
f7f65a9aca92c2e3877a0edb5dfaa30abf41002a
4,425
py
Python
FlatBufferSchemaGenerator/python/FlatBufferState.py
cnheider/droid
1687cb50cadba867d9e8a7b670629008c948b38e
[ "Apache-2.0" ]
null
null
null
FlatBufferSchemaGenerator/python/FlatBufferState.py
cnheider/droid
1687cb50cadba867d9e8a7b670629008c948b38e
[ "Apache-2.0" ]
null
null
null
FlatBufferSchemaGenerator/python/FlatBufferState.py
cnheider/droid
1687cb50cadba867d9e8a7b670629008c948b38e
[ "Apache-2.0" ]
null
null
null
# automatically generated by the FlatBuffers compiler, do not modify # namespace: State import flatbuffers class FlatBufferState(object): __slots__ = ['_tab'] @classmethod def GetRootAsFlatBufferState(cls, buf, offset): n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) ...
41.35514
153
0.696045
import flatbuffers class FlatBufferState(object): __slots__ = ['_tab'] @classmethod def GetRootAsFlatBufferState(cls, buf, offset): n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) x = FlatBufferState() x.Init(buf, n + offset) return x def I...
true
true
f7f65b79ebcdca25d9d1fda7914fef3d181c1e9c
6,886
py
Python
bentoml/_internal/utils/dataframe_util.py
jmc529/BentoML
96c1ec9e486d98930e24bbbac5b2991a6d416f97
[ "Apache-2.0" ]
null
null
null
bentoml/_internal/utils/dataframe_util.py
jmc529/BentoML
96c1ec9e486d98930e24bbbac5b2991a6d416f97
[ "Apache-2.0" ]
null
null
null
bentoml/_internal/utils/dataframe_util.py
jmc529/BentoML
96c1ec9e486d98930e24bbbac5b2991a6d416f97
[ "Apache-2.0" ]
null
null
null
import io import itertools import json from typing import Iterable, Iterator, Mapping from bentoml.exceptions import BadInput from bentoml.utils import catch_exceptions from bentoml.utils.csv import csv_quote, csv_row, csv_split, csv_splitlines, csv_unquote from bentoml.utils.lazy_loader import LazyLoader pandas = La...
33.590244
88
0.605577
import io import itertools import json from typing import Iterable, Iterator, Mapping from bentoml.exceptions import BadInput from bentoml.utils import catch_exceptions from bentoml.utils.csv import csv_quote, csv_row, csv_split, csv_splitlines, csv_unquote from bentoml.utils.lazy_loader import LazyLoader pandas = La...
true
true
f7f65bdd13d013453989c781abe45671b85cc806
4,065
py
Python
module_utils/vrfs/aoscx_vrf_base.py
aruba/aoscx-ansible-role
abd872260cd531edf6f3754c1e7c691ac3e027fe
[ "Apache-2.0" ]
16
2019-08-16T22:53:36.000Z
2021-05-21T13:37:31.000Z
module_utils/vrfs/aoscx_vrf_base.py
aruba/aoscx-ansible-role
abd872260cd531edf6f3754c1e7c691ac3e027fe
[ "Apache-2.0" ]
7
2020-06-24T03:16:57.000Z
2021-10-21T21:10:11.000Z
module_utils/vrfs/aoscx_vrf_base.py
aruba/aoscx-ansible-role
abd872260cd531edf6f3754c1e7c691ac3e027fe
[ "Apache-2.0" ]
12
2019-08-16T22:53:37.000Z
2021-05-07T17:08:59.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # (C) Copyright 2020 Hewlett Packard Enterprise Development LP. # GNU General Public License v3.0+ # (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible.module_uti...
31.269231
81
0.517097
from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible.module_utils.vrfs.aoscx_vrf_entry import VRF_Entry class VRF_Base: def __init__(self, running_config): self.config = running_config if 'vrfs' in self.config['System'].keys(): ...
true
true
f7f65c03b8e70f9493d9e95f6e58065c93e24408
2,359
py
Python
src/dynamicScope.py
mogad0n/Limnoria
f31e5c4b9a77e30918d6b93f69d69f3b8f910e3c
[ "BSD-3-Clause" ]
476
2015-01-04T17:42:59.000Z
2021-08-13T07:40:54.000Z
src/dynamicScope.py
mogad0n/Limnoria
f31e5c4b9a77e30918d6b93f69d69f3b8f910e3c
[ "BSD-3-Clause" ]
491
2015-01-01T04:12:23.000Z
2021-08-12T19:24:47.000Z
src/dynamicScope.py
mogad0n/Limnoria
f31e5c4b9a77e30918d6b93f69d69f3b8f910e3c
[ "BSD-3-Clause" ]
203
2015-01-02T18:29:43.000Z
2021-08-15T12:52:22.000Z
### # Copyright (c) 2004-2005, Jeremiah Fincher # Copyright (c) 2010-2021, The Limnoria Contributors # 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 ret...
43.685185
103
0.722764
mport sys class DynamicScope(object): def _getLocals(self, name): f = sys._getframe().f_back.f_back while f: if name in f.f_locals: return f.f_locals f = f.f_back raise NameError(name) def __getattr__(self, name): ...
true
true
f7f65c292c1b6c2e7bda915654df0f038d3d69b4
1,511
py
Python
accelerator/sitetree_navigation/side_nav_definitions.py
masschallenge/django-accelerator
8af898b574be3b8335edc8961924d1c6fa8b5fd5
[ "MIT" ]
6
2017-06-14T19:34:01.000Z
2020-03-08T07:16:59.000Z
accelerator/sitetree_navigation/side_nav_definitions.py
masschallenge/django-accelerator
8af898b574be3b8335edc8961924d1c6fa8b5fd5
[ "MIT" ]
160
2017-06-20T17:12:13.000Z
2022-03-30T13:53:12.000Z
accelerator/sitetree_navigation/side_nav_definitions.py
masschallenge/django-accelerator
8af898b574be3b8335edc8961924d1c6fa8b5fd5
[ "MIT" ]
null
null
null
from accelerator_abstract.models import BaseUserRole AIR = BaseUserRole.AIR ALUM = BaseUserRole.ALUM FINALIST = BaseUserRole.FINALIST JUDGE = BaseUserRole.JUDGE MENTOR = BaseUserRole.MENTOR SIDE_NAV_ITEM_PROPS_LIST = [ { 'title': 'Home', 'alias': 'home', 'url': '/', }, { '...
23.609375
52
0.508273
from accelerator_abstract.models import BaseUserRole AIR = BaseUserRole.AIR ALUM = BaseUserRole.ALUM FINALIST = BaseUserRole.FINALIST JUDGE = BaseUserRole.JUDGE MENTOR = BaseUserRole.MENTOR SIDE_NAV_ITEM_PROPS_LIST = [ { 'title': 'Home', 'alias': 'home', 'url': '/', }, { '...
true
true
f7f65d17bc77419d782f4cded94ad59cc8318abb
4,913
py
Python
gaze_tracking/gaze_tracking.py
tim-fan/GazeTracking
202857f7a92fae64df3bb23739158565702bc120
[ "MIT" ]
1
2020-11-29T05:03:46.000Z
2020-11-29T05:03:46.000Z
gaze_tracking/gaze_tracking.py
tim-fan/GazeTracking
202857f7a92fae64df3bb23739158565702bc120
[ "MIT" ]
null
null
null
gaze_tracking/gaze_tracking.py
tim-fan/GazeTracking
202857f7a92fae64df3bb23739158565702bc120
[ "MIT" ]
1
2019-06-23T12:15:52.000Z
2019-06-23T12:15:52.000Z
from __future__ import division import os import cv2 import dlib from .eye import Eye from .calibration import Calibration class GazeTracking(object): """ This class tracks the user's gaze. It provides useful information like the position of the eyes and pupils and allows to know if the eyes are open ...
36.664179
111
0.61266
from __future__ import division import os import cv2 import dlib from .eye import Eye from .calibration import Calibration class GazeTracking(object): def __init__(self): self.frame = None self.eye_left = None self.eye_right = None self.calibration = Calibration() ...
true
true
f7f65d6b8cafc1fa2672ffe91ae5664745c5916d
656
py
Python
noise/hash/blake2b.py
mgp25/noise
8560849fa4a1d6e938adde27d26572f4da16e422
[ "MIT" ]
6
2019-05-02T09:40:53.000Z
2021-05-18T00:18:30.000Z
noise/hash/blake2b.py
mgp25/noise
8560849fa4a1d6e938adde27d26572f4da16e422
[ "MIT" ]
null
null
null
noise/hash/blake2b.py
mgp25/noise
8560849fa4a1d6e938adde27d26572f4da16e422
[ "MIT" ]
null
null
null
from noise.hash.hash import Hash from cryptography.hazmat.primitives import hashes from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives.hmac import HMAC class Blake2bHash(Hash): def __init__(self): super(Blake2bHash, self).__init__("BLAKE2b", 64, 128) def hash...
31.238095
85
0.710366
from noise.hash.hash import Hash from cryptography.hazmat.primitives import hashes from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives.hmac import HMAC class Blake2bHash(Hash): def __init__(self): super(Blake2bHash, self).__init__("BLAKE2b", 64, 128) def hash...
true
true
f7f65ea9a7cc5080ac34a485307f6d32f72ca100
1,702
py
Python
sonnet/src/conformance/pickle_test.py
ScriptBox99/deepmind-sonnet
5cbfdc356962d9b6198d5b63f0826a80acfdf35b
[ "Apache-2.0" ]
10,287
2017-04-07T12:33:37.000Z
2022-03-30T03:32:16.000Z
sonnet/src/conformance/pickle_test.py
ScriptBox99/deepmind-sonnet
5cbfdc356962d9b6198d5b63f0826a80acfdf35b
[ "Apache-2.0" ]
209
2017-04-07T15:57:11.000Z
2022-03-27T10:43:03.000Z
sonnet/src/conformance/pickle_test.py
ScriptBox99/deepmind-sonnet
5cbfdc356962d9b6198d5b63f0826a80acfdf35b
[ "Apache-2.0" ]
1,563
2017-04-07T13:15:06.000Z
2022-03-29T15:26:04.000Z
# Copyright 2019 The Sonnet Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
32.730769
78
0.705053
import pickle from absl.testing import parameterized from sonnet.src import test_utils from sonnet.src.conformance import goldens import tensorflow as tf import tree class PickleTest(test_utils.TestCase, parameterized.TestCase): @goldens.all_goldens def test_pickle(self, golden): m1 = gol...
true
true
f7f65ef9a10b89123f699573c3019a5c6b957119
856
py
Python
tests/event_broker/test_get_subscribers.py
filfreire/questions-three
1d1d621d5647407bf2d1b271e0b9c7c9f1afc5c8
[ "MIT" ]
5
2019-07-22T06:04:07.000Z
2021-07-23T06:01:51.000Z
tests/event_broker/test_get_subscribers.py
filfreire/questions-three
1d1d621d5647407bf2d1b271e0b9c7c9f1afc5c8
[ "MIT" ]
15
2020-07-28T17:33:40.000Z
2021-08-23T17:30:05.000Z
tests/event_broker/test_get_subscribers.py
filfreire/questions-three
1d1d621d5647407bf2d1b271e0b9c7c9f1afc5c8
[ "MIT" ]
4
2019-08-25T22:41:59.000Z
2020-10-21T14:28:15.000Z
import gc from unittest import TestCase, main, skip from expects import expect, equal from questions_three.event_broker import EventBroker def foo(**kwargs): pass def bar(**kwargs): pass def baz(**kwargs): pass class TestGetSubscribers(TestCase): def setUp(self): EventBroker.reset() ...
21.4
72
0.683411
import gc from unittest import TestCase, main, skip from expects import expect, equal from questions_three.event_broker import EventBroker def foo(**kwargs): pass def bar(**kwargs): pass def baz(**kwargs): pass class TestGetSubscribers(TestCase): def setUp(self): EventBroker.reset() ...
true
true
f7f65f4ba219c8d88f26a5f24466d8f59a013261
7,961
py
Python
stats_ais.py
Mandorath/analyze_ais
335a5185a588f99a8151ea77e2406e8cec43ffcb
[ "Apache-2.0" ]
null
null
null
stats_ais.py
Mandorath/analyze_ais
335a5185a588f99a8151ea77e2406e8cec43ffcb
[ "Apache-2.0" ]
null
null
null
stats_ais.py
Mandorath/analyze_ais
335a5185a588f99a8151ea77e2406e8cec43ffcb
[ "Apache-2.0" ]
1
2021-03-27T19:43:41.000Z
2021-03-27T19:43:41.000Z
import pandas as pd import numpy as np def calc_stats(df, col_ais, col_spd, col_zn, unique_col, date, df_out, ship_count): ''' Statistics calculation function. ''' # df = pd.read_csv(file, delimiter=",") # the percentage of "True" in AIS gaps df['spd_and_gap'] = pd.np.where(df[['flag_spd_chng'...
43.983425
121
0.573797
import pandas as pd import numpy as np def calc_stats(df, col_ais, col_spd, col_zn, unique_col, date, df_out, ship_count): df['spd_and_gap'] = pd.np.where(df[['flag_spd_chng', 'AIS_G']].eq(True).all(1, skipna=True), True, pd.np.where(d...
true
true
f7f65f68d0d252b75ad8d6590fbb04e52dac056b
1,427
py
Python
Character.py
Zekx/CS332Fighting_Game
4dbded68f8ebe955db29b12f8d3409db2710c019
[ "CECILL-B" ]
null
null
null
Character.py
Zekx/CS332Fighting_Game
4dbded68f8ebe955db29b12f8d3409db2710c019
[ "CECILL-B" ]
null
null
null
Character.py
Zekx/CS332Fighting_Game
4dbded68f8ebe955db29b12f8d3409db2710c019
[ "CECILL-B" ]
null
null
null
import pygame class Character(pygame.sprite.Sprite): def __init__(self): """ Covers the "abstract" class for a character. Primarily holds the health,and animations for characters. :return: """ super().__init__() self.name = None self.health = 0 sel...
23.783333
110
0.550806
import pygame class Character(pygame.sprite.Sprite): def __init__(self): super().__init__() self.name = None self.health = 0 self.f_dash_speed = 0 self.jump_height = 0 self.meter = 0 self.portrait = None self.image = None self.mask = None ...
true
true
f7f65fc42bf793382fd3b8b91e134a282481666d
30,976
py
Python
src/sage/functions/special.py
defeo/sage
d8822036a9843bd4d75845024072515ede56bcb9
[ "BSL-1.0" ]
null
null
null
src/sage/functions/special.py
defeo/sage
d8822036a9843bd4d75845024072515ede56bcb9
[ "BSL-1.0" ]
null
null
null
src/sage/functions/special.py
defeo/sage
d8822036a9843bd4d75845024072515ede56bcb9
[ "BSL-1.0" ]
null
null
null
r""" Miscellaneous Special Functions AUTHORS: - David Joyner (2006-13-06): initial version - David Joyner (2006-30-10): bug fixes to pari wrappers of Bessel functions, hypergeometric_U - William Stein (2008-02): Impose some sanity checks. - David Joyner (2008-04-23): addition of elliptic integrals - Eviatar Bac...
30.015504
93
0.529087
from sage.rings.integer import Integer from sage.rings.real_mpfr import RealField from sage.rings.complex_field import ComplexField from sage.misc.latex import latex from sage.rings.all import ZZ, RR, RDF, CDF from sage.functions.other import real, imag, log_gamma from sage.symbolic.constants import pi...
true
true
f7f65fc9f716a3757528f898eff3952c058f67fe
13,099
py
Python
Transforms/Transfer_Learning/TL_Experiment_Phase_2/tl_experiment_phase_2_worker.py
Heron-Repositories/Transfer-Learning-In-Animals
96a49f1ca27c62defaf3ea90f0dd6640034c8541
[ "MIT" ]
null
null
null
Transforms/Transfer_Learning/TL_Experiment_Phase_2/tl_experiment_phase_2_worker.py
Heron-Repositories/Transfer-Learning-In-Animals
96a49f1ca27c62defaf3ea90f0dd6640034c8541
[ "MIT" ]
null
null
null
Transforms/Transfer_Learning/TL_Experiment_Phase_2/tl_experiment_phase_2_worker.py
Heron-Repositories/Transfer-Learning-In-Animals
96a49f1ca27c62defaf3ea90f0dd6640034c8541
[ "MIT" ]
null
null
null
import sys from os import path current_dir = path.dirname(path.abspath(__file__)) while path.split(current_dir)[-1] != r'Heron': current_dir = path.dirname(current_dir) sys.path.insert(0, path.dirname(current_dir)) import copy import numpy as np from enum import Enum from Heron.communication.socket_f...
38.869436
128
0.662646
import sys from os import path current_dir = path.dirname(path.abspath(__file__)) while path.split(current_dir)[-1] != r'Heron': current_dir = path.dirname(current_dir) sys.path.insert(0, path.dirname(current_dir)) import copy import numpy as np from enum import Enum from Heron.communication.socket_f...
true
true
f7f66035251a6ca77c3872db9add8e48b10b0d9f
10,457
py
Python
pyleecan/Classes/SlotUD2.py
MVreemann/pyleecan
2b2943d8c37859fc7d480d25e78297bf086807f7
[ "Apache-2.0" ]
null
null
null
pyleecan/Classes/SlotUD2.py
MVreemann/pyleecan
2b2943d8c37859fc7d480d25e78297bf086807f7
[ "Apache-2.0" ]
null
null
null
pyleecan/Classes/SlotUD2.py
MVreemann/pyleecan
2b2943d8c37859fc7d480d25e78297bf086807f7
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # File generated according to Generator/ClassesRef/Slot/SlotUD2.csv # WARNING! All changes made in this file will be lost! """Method code available at https://github.com/Eomys/pyleecan/tree/master/pyleecan/Methods/Slot/SlotUD2 """ from os import linesep from sys import getsizeof from logging im...
35.68942
103
0.595008
from os import linesep from sys import getsizeof from logging import getLogger from ._check import check_var, raise_ from ..Functions.get_logger import get_logger from ..Functions.save import save from ..Functions.copy import copy from ..Functions.load import load_init_dict from ..Functions.Load.import_class import...
true
true
f7f660ce2c4f913358757a4ccdbc02dcf8267931
251
py
Python
modules/banner.py
joaroque/lue
a5f089f4a40a6ac98bc58148d2fb2755ee2a79a4
[ "MIT" ]
1
2021-02-18T12:47:11.000Z
2021-02-18T12:47:11.000Z
modules/banner.py
joaroque/lue
a5f089f4a40a6ac98bc58148d2fb2755ee2a79a4
[ "MIT" ]
null
null
null
modules/banner.py
joaroque/lue
a5f089f4a40a6ac98bc58148d2fb2755ee2a79a4
[ "MIT" ]
null
null
null
def banner(): logo = """ __ __ __ _______ | | | | | | | ____| | | | | | | | |__ | | | | | | | __| | `----.| `--' | | |____ |_______| \______/ |_______| By: github.com/joaroque """ print(logo)
17.928571
29
0.342629
def banner(): logo = """ __ __ __ _______ | | | | | | | ____| | | | | | | | |__ | | | | | | | __| | `----.| `--' | | |____ |_______| \______/ |_______| By: github.com/joaroque """ print(logo)
true
true
f7f660eea1578afaa44d6d097d21cf7e997829ac
4,974
py
Python
monasca_api/api/server.py
stackhpc/monasca-api
45aaa78fd5a416fcfd1a9521ef4c6c77d325b878
[ "Apache-2.0" ]
null
null
null
monasca_api/api/server.py
stackhpc/monasca-api
45aaa78fd5a416fcfd1a9521ef4c6c77d325b878
[ "Apache-2.0" ]
2
2019-10-23T15:09:02.000Z
2020-03-13T12:38:49.000Z
monasca_api/api/server.py
stackhpc/monasca-api
45aaa78fd5a416fcfd1a9521ef4c6c77d325b878
[ "Apache-2.0" ]
null
null
null
# Copyright 2014 IBM Corp # (C) Copyright 2015,2016 Hewlett Packard Enterprise Development LP # Copyright 2017 Fujitsu LIMITED # # 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.a...
36.844444
80
0.723965
import os import falcon from monasca_common.simport import simport from oslo_config import cfg from oslo_log import log import paste.deploy from monasca_api.api.core import request from monasca_api import config LOG = log.getLogger(__name__) CONF = config.CONF def launch(conf): config.parse_arg...
true
true
f7f66166f603b13a9306d3fb038cb145911168bd
23,530
py
Python
kats/models/metalearner/metalearner_modelselect.py
iamxiaodong/Kats
31df55acc22797ce06330586542fe6e5f315e574
[ "MIT" ]
3,580
2021-06-21T03:55:17.000Z
2022-03-31T20:21:38.000Z
kats/models/metalearner/metalearner_modelselect.py
iamxiaodong/Kats
31df55acc22797ce06330586542fe6e5f315e574
[ "MIT" ]
164
2021-06-22T03:00:32.000Z
2022-03-31T22:08:16.000Z
kats/models/metalearner/metalearner_modelselect.py
iamxiaodong/Kats
31df55acc22797ce06330586542fe6e5f315e574
[ "MIT" ]
350
2021-06-21T19:53:47.000Z
2022-03-30T08:07:03.000Z
# Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # pyre-unsafe """A module for meta-learner model selection. This module contains: - :class:`MetaLearnModelSelect` for meta-learner models ...
42.396396
216
0.623247
import ast import logging from collections import Counter, defaultdict from typing import Any, Dict, List, Optional, Tuple, Union import joblib import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns from kats.consts import TimeSeriesData from kats.tsfeatures.tsfeatures impo...
true
true
f7f662a748abd590e79f1e821572b895eee43074
1,072
py
Python
code/utils/functions/smooth.py
berkeley-stat159/project-alpha
330d025c4eda94d390a82e86deecb791086c9dbf
[ "BSD-3-Clause" ]
4
2015-10-30T23:08:32.000Z
2021-06-24T03:44:02.000Z
code/utils/functions/smooth.py
berkeley-stat159/project-alpha
330d025c4eda94d390a82e86deecb791086c9dbf
[ "BSD-3-Clause" ]
179
2015-10-25T15:59:56.000Z
2017-10-31T02:40:24.000Z
code/utils/functions/smooth.py
berkeley-stat159/project-alpha
330d025c4eda94d390a82e86deecb791086c9dbf
[ "BSD-3-Clause" ]
11
2015-10-20T19:15:10.000Z
2019-02-23T19:33:03.000Z
from __future__ import absolute_import, division, print_function import numpy as np import scipy.ndimage from scipy.ndimage.filters import gaussian_filter def smoothvoxels(data_4d, fwhm, time): """ Return a 'smoothed' version of data_4d. Parameters ---------- data_4d : numpy array of 4 dimensions...
28.972973
78
0.697761
from __future__ import absolute_import, division, print_function import numpy as np import scipy.ndimage from scipy.ndimage.filters import gaussian_filter def smoothvoxels(data_4d, fwhm, time): time_slice = data_4d[..., time] smooth_results = scipy.ndimage.filters.gaussian_filter(time_slice, fwhm) re...
true
true
f7f662c3f469047fdb39f022d21b90f152f1a0e9
533,887
py
Python
napalm_yang/models/openconfig/network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/subTLVs/subTLVs_/extended_admin_group/state/__init__.py
ckishimo/napalm-yang
8f2bd907bd3afcde3c2f8e985192de74748baf6c
[ "Apache-2.0" ]
64
2016-10-20T15:47:18.000Z
2021-11-11T11:57:32.000Z
napalm_yang/models/openconfig/network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/subTLVs/subTLVs_/extended_admin_group/state/__init__.py
ckishimo/napalm-yang
8f2bd907bd3afcde3c2f8e985192de74748baf6c
[ "Apache-2.0" ]
126
2016-10-05T10:36:14.000Z
2019-05-15T08:43:23.000Z
napalm_yang/models/openconfig/network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isis_neighbor_attribute/neighbors/neighbor/subTLVs/subTLVs_/extended_admin_group/state/__init__.py
ckishimo/napalm-yang
8f2bd907bd3afcde3c2f8e985192de74748baf6c
[ "Apache-2.0" ]
63
2016-11-07T15:23:08.000Z
2021-09-22T14:41:16.000Z
# -*- coding: utf-8 -*- from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListTy...
68.490956
42,480
0.48883
from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListType from pyangbind.lib.y...
true
true
f7f664445f8b0bc0e263764c29f0ea22a06b5a75
39,426
py
Python
lib/rucio/transfertool/fts3.py
balrampariyarath/rucio
8a68017af6b44485a9620566f1afc013838413c1
[ "Apache-2.0" ]
null
null
null
lib/rucio/transfertool/fts3.py
balrampariyarath/rucio
8a68017af6b44485a9620566f1afc013838413c1
[ "Apache-2.0" ]
null
null
null
lib/rucio/transfertool/fts3.py
balrampariyarath/rucio
8a68017af6b44485a9620566f1afc013838413c1
[ "Apache-2.0" ]
null
null
null
# Copyright European Organization for Nuclear Research (CERN) # # 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 # # Authors: # - Mario Lassnig, <mar...
47.216766
201
0.577056
import datetime import json import logging import requests import sys import time import urlparse import uuid import traceback from ConfigParser import NoOptionError from dogpile.cache import make_region from dogpile.cache.api import NoValue from rucio.common.config import config_get, config_get_bool from...
true
true
f7f66452c1d3fcf706022fce3b276c9010b85b7c
3,383
py
Python
lyft_rides/utils/request.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
10
2016-11-27T22:22:43.000Z
2022-01-11T08:25:15.000Z
lyft_rides/utils/request.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
7
2017-03-02T16:45:01.000Z
2021-02-15T18:57:25.000Z
lyft_rides/utils/request.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
5
2016-12-07T16:20:51.000Z
2021-07-16T22:10:52.000Z
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHET...
29.938053
79
0.650015
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from json import dumps from requests import Request try: from urllib.parse import quote from urllib.parse import urlencode from urllib.parse import u...
true
true
f7f66479e89cc7bafef5f8d3420836f9d897ffb5
10,129
py
Python
core/src/zeit/cms/content/xmlsupport.py
fschulze/vivi
3ae333d7e3c51c6ceaafe59172d949a6584df694
[ "BSD-3-Clause" ]
null
null
null
core/src/zeit/cms/content/xmlsupport.py
fschulze/vivi
3ae333d7e3c51c6ceaafe59172d949a6584df694
[ "BSD-3-Clause" ]
null
null
null
core/src/zeit/cms/content/xmlsupport.py
fschulze/vivi
3ae333d7e3c51c6ceaafe59172d949a6584df694
[ "BSD-3-Clause" ]
null
null
null
from six import StringIO import datetime import gocept.lxml.objectify import grokcore.component as grok import lxml.objectify import persistent import persistent.interfaces import pytz import six import zeit.cms.checkout.interfaces import zeit.cms.content.interfaces import zeit.cms.content.lxmlpickle # extended pickle...
36.046263
79
0.675782
from six import StringIO import datetime import gocept.lxml.objectify import grokcore.component as grok import lxml.objectify import persistent import persistent.interfaces import pytz import six import zeit.cms.checkout.interfaces import zeit.cms.content.interfaces import zeit.cms.content.lxmlpickle import zeit.cms....
true
true