hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f73c32b7864bcc1001bb8cd8e5c1ff898038afc5
133
py
Python
pythonCrawler/picture_down.py
eatmore/python_practice
c6a773c8d24182b23a86fd9b66b27b5ff948b258
[ "MIT" ]
null
null
null
pythonCrawler/picture_down.py
eatmore/python_practice
c6a773c8d24182b23a86fd9b66b27b5ff948b258
[ "MIT" ]
null
null
null
pythonCrawler/picture_down.py
eatmore/python_practice
c6a773c8d24182b23a86fd9b66b27b5ff948b258
[ "MIT" ]
1
2020-03-12T06:05:38.000Z
2020-03-12T06:05:38.000Z
import requests r = requests.get('https://www.baidu.com/img/bd_logo1.png') with open('bd_log.png', 'wb') as f: f.write(r.content)
33.25
58
0.691729
import requests r = requests.get('https://www.baidu.com/img/bd_logo1.png') with open('bd_log.png', 'wb') as f: f.write(r.content)
true
true
f73c32c1edb07c2b7951c6664be2501423156cce
118,194
py
Python
theano/scan_module/scan_op.py
jych/Theano
d7d722faa96aac95c19f460bf60e8e8654ff58df
[ "BSD-3-Clause" ]
1
2021-07-01T02:51:08.000Z
2021-07-01T02:51:08.000Z
theano/scan_module/scan_op.py
mayunpeng/Theano
c74da33de3768e231ffa0d92d9d11667a2a5aedb
[ "BSD-3-Clause" ]
null
null
null
theano/scan_module/scan_op.py
mayunpeng/Theano
c74da33de3768e231ffa0d92d9d11667a2a5aedb
[ "BSD-3-Clause" ]
null
null
null
""" This module provides the Scan Op See scan.py for details on scan Memory reuse in scan -------------------- To reduce the number of memory allocations and copies associated with calling the inner function and recovering the outputs at every iteration, Scan uses a memory pre-allocation mechanism for some of its o...
45.441753
96
0.537828
from __future__ import print_function __docformat__ = 'restructedtext en' __authors__ = ("Razvan Pascanu " "Frederic Bastien " "James Bergstra " "Pascal Lamblin ") __copyright__ = "(c) 2010, Universite de Montreal" __contact__ = "Razvan Pascanu <r.pascanu@gmail>" import it...
true
true
f73c335aafdc1bcb4a318cb6238c78b6dcef2136
2,278
py
Python
userbot/plugins/rename_IQ.py
ForSimo/Telethon
70b6169d367321af55e74589482699b0e90e3c0f
[ "Apache-2.0" ]
1
2021-02-06T20:17:15.000Z
2021-02-06T20:17:15.000Z
userbot/plugins/rename_IQ.py
ForSimo/Telethon
70b6169d367321af55e74589482699b0e90e3c0f
[ "Apache-2.0" ]
null
null
null
userbot/plugins/rename_IQ.py
ForSimo/Telethon
70b6169d367321af55e74589482699b0e90e3c0f
[ "Apache-2.0" ]
null
null
null
# KLANR ALI @IQTHON """Rename Telegram Files Syntax: .rnupload file.name""" import asyncio import time from datetime import datetime from hachoir.metadata import extractMetadata from hachoir.parser import createParser from base64 import b64decode import io import math import os from pySmartDL import Smar...
35.046154
105
0.640913
import asyncio import time from datetime import datetime from hachoir.metadata import extractMetadata from hachoir.parser import createParser from base64 import b64decode import io import math import os from pySmartDL import SmartDL from telethon.tl.types import DocumentAttributeVideo from uniborg.util im...
true
true
f73c33ae3edddb9b8d145f2231c391a687d06987
11,262
py
Python
tests/hs2/test_hs2.py
ImpalaToGo/ImpalaToGo
a1a79c0684d1319ee5c99aaf9b8a09c8392ba054
[ "Apache-2.0" ]
51
2015-01-02T04:10:26.000Z
2020-11-21T16:33:19.000Z
tests/hs2/test_hs2.py
ImpalaToGo/ImpalaToGo
a1a79c0684d1319ee5c99aaf9b8a09c8392ba054
[ "Apache-2.0" ]
58
2015-01-29T15:52:19.000Z
2016-04-19T08:19:02.000Z
tests/hs2/test_hs2.py
ImpalaToGo/ImpalaToGo
a1a79c0684d1319ee5c99aaf9b8a09c8392ba054
[ "Apache-2.0" ]
8
2015-03-16T11:03:41.000Z
2019-07-11T06:39:31.000Z
#!/usr/bin/env python # Copyright (c) 2012 Cloudera, 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 requir...
45.41129
90
0.78796
import pytest from tests.hs2.hs2_test_suite import HS2TestSuite, needs_session, operation_id_to_query_id from TCLIService import TCLIService from ImpalaService import ImpalaHiveServer2Service from ExecStats.ttypes import TExecState class TestHS2(HS2TestSuite): def test_open_session(self): open_s...
true
true
f73c3466942ebb0b1a546e66db563d87006af755
19,277
py
Python
opengrid_dev/library/houseprint/houseprint.py
opengridcc/opengrid_dev
cc6dc9d615197e4901a8d213fe81fc71bcd602c4
[ "Apache-2.0" ]
8
2018-03-29T08:36:10.000Z
2022-02-07T12:48:46.000Z
opengrid_dev/library/houseprint/houseprint.py
opengridcc/opengrid_dev
cc6dc9d615197e4901a8d213fe81fc71bcd602c4
[ "Apache-2.0" ]
2
2017-11-06T18:32:02.000Z
2017-11-06T20:23:39.000Z
opengrid_dev/library/houseprint/houseprint.py
opengridcc/opengrid_dev
cc6dc9d615197e4901a8d213fe81fc71bcd602c4
[ "Apache-2.0" ]
2
2017-11-10T12:30:27.000Z
2019-04-15T16:32:25.000Z
__author__ = 'Jan Pecinovsky' from opengrid_dev.config import Config config = Config() import os import sys import json import jsonpickle import datetime as dt import pandas as pd from requests.exceptions import HTTPError import warnings from tqdm import tqdm # compatibility with py3 if sys.version_info.major >= 3:...
31.091935
119
0.529076
__author__ = 'Jan Pecinovsky' from opengrid_dev.config import Config config = Config() import os import sys import json import jsonpickle import datetime as dt import pandas as pd from requests.exceptions import HTTPError import warnings from tqdm import tqdm if sys.version_info.major >= 3: import pickle else:...
true
true
f73c34a37bf6f58b2256288d0b7bf7c9c602865d
2,957
py
Python
tests/chainer_tests/functions_tests/pooling_tests/test_roi_pooling_2d.py
takeratta/chainer
02686e98cd6dc8f20979a1f3a79130f076cbfc6c
[ "MIT" ]
1
2020-05-28T10:07:25.000Z
2020-05-28T10:07:25.000Z
tests/chainer_tests/functions_tests/pooling_tests/test_roi_pooling_2d.py
takeratta/chainer
02686e98cd6dc8f20979a1f3a79130f076cbfc6c
[ "MIT" ]
null
null
null
tests/chainer_tests/functions_tests/pooling_tests/test_roi_pooling_2d.py
takeratta/chainer
02686e98cd6dc8f20979a1f3a79130f076cbfc6c
[ "MIT" ]
1
2022-02-20T10:32:59.000Z
2022-02-20T10:32:59.000Z
import unittest import numpy import chainer from chainer import cuda from chainer import functions from chainer import gradient_check from chainer import testing from chainer.testing import attr class TestROIPooling2D(unittest.TestCase): def setUp(self): N = 3 n_channels = 3 self.x = nu...
32.855556
72
0.602976
import unittest import numpy import chainer from chainer import cuda from chainer import functions from chainer import gradient_check from chainer import testing from chainer.testing import attr class TestROIPooling2D(unittest.TestCase): def setUp(self): N = 3 n_channels = 3 self.x = nu...
true
true
f73c35f7768a015a0e1bb5ff894cd20f4e7002bc
1,889
py
Python
tests/trinity/core/chains-utils/test_chain_config_object.py
theresume/py-evm
c7f982e9832ea91312f456cfdd5be7c867853d0b
[ "MIT" ]
2
2018-05-03T03:02:36.000Z
2018-05-03T03:02:39.000Z
tests/trinity/core/chains-utils/test_chain_config_object.py
theresume/py-evm
c7f982e9832ea91312f456cfdd5be7c867853d0b
[ "MIT" ]
4
2018-12-07T21:32:48.000Z
2019-02-22T15:25:01.000Z
tests/trinity/core/chains-utils/test_chain_config_object.py
theresume/py-evm
c7f982e9832ea91312f456cfdd5be7c867853d0b
[ "MIT" ]
null
null
null
import pytest from eth_utils import ( decode_hex, ) from eth_keys import keys from trinity.utils.chains import ( get_local_data_dir, get_database_dir, get_nodekey_path, ChainConfig, ) from trinity.utils.filesystem import ( is_same_path, ) def test_chain_config_computed_properties(): dat...
25.186667
78
0.749603
import pytest from eth_utils import ( decode_hex, ) from eth_keys import keys from trinity.utils.chains import ( get_local_data_dir, get_database_dir, get_nodekey_path, ChainConfig, ) from trinity.utils.filesystem import ( is_same_path, ) def test_chain_config_computed_properties(): dat...
true
true
f73c36a9e617dd10e21800879e5f188acdb69937
4,355
py
Python
src/POPULARITY_MODULE/popularity_predictor.py
cristinalunaj/WI-IAT20_PopularityModule
0a4894e2b889bf31ea1a8beab3025d5dd0b1ed47
[ "MIT" ]
null
null
null
src/POPULARITY_MODULE/popularity_predictor.py
cristinalunaj/WI-IAT20_PopularityModule
0a4894e2b889bf31ea1a8beab3025d5dd0b1ed47
[ "MIT" ]
null
null
null
src/POPULARITY_MODULE/popularity_predictor.py
cristinalunaj/WI-IAT20_PopularityModule
0a4894e2b889bf31ea1a8beab3025d5dd0b1ed47
[ "MIT" ]
null
null
null
import pandas as pd import subprocess, os import src.utils.loader as loader def create_test_arff(participant, test_df, aux_path): arff_text = "@relation summary_features \n\n" \ "@attribute n_faces numeric\n" \ "@attribute avg_confidence_faces numeric\n" \ "@attribut...
45.364583
170
0.653961
import pandas as pd import subprocess, os import src.utils.loader as loader def create_test_arff(participant, test_df, aux_path): arff_text = "@relation summary_features \n\n" \ "@attribute n_faces numeric\n" \ "@attribute avg_confidence_faces numeric\n" \ "@attribut...
true
true
f73c385a178dac7d3b5f43de0fbbe519e8d4bbb0
4,079
py
Python
qa/rpc-tests/test_script_address2.py
counos/bitcore-counoscoin
4951414317b302f358ddbaf10bbb98a966f90bff
[ "MIT" ]
null
null
null
qa/rpc-tests/test_script_address2.py
counos/bitcore-counoscoin
4951414317b302f358ddbaf10bbb98a966f90bff
[ "MIT" ]
null
null
null
qa/rpc-tests/test_script_address2.py
counos/bitcore-counoscoin
4951414317b302f358ddbaf10bbb98a966f90bff
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test new CounosCoin multisig prefix functionality. # from test_framework.test_framework import Bitco...
40.386139
93
0.649669
from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * import decimal class ScriptAddress2Test(BitcoinTestFramework): def __init__(self): super().__init__() self.num_nodes = 3 self.setup_clean_chain = False def setup_network(self): ...
true
true
f73c3b7095f0a7357b36a8790e6e733d9b2e6d20
2,012
py
Python
pyseed/exceptions.py
SEED-platform/py-seed
43839c3fed297a3e4b9a2d2a2082f32d32c821a3
[ "MIT" ]
1
2020-03-27T19:51:21.000Z
2020-03-27T19:51:21.000Z
pyseed/exceptions.py
GreenBuildingRegistry/py-seed
6052ae7e6b53121fcbcae0ff471f4eba4a5aa010
[ "MIT" ]
1
2020-11-03T19:00:24.000Z
2020-11-03T19:00:24.000Z
pyseed/exceptions.py
SEED-platform/py-seed
43839c3fed297a3e4b9a2d2a2082f32d32c821a3
[ "MIT" ]
1
2018-10-08T19:05:42.000Z
2018-10-08T19:05:42.000Z
#!/usr/bin/env python # encoding: utf-8 """ copyright (c) 2016-2017 Earth Advantage. All rights reserved ..codeauthor::Paul Munday <paul@paulmunday.net> """ # Setup # Constants # Data Structure Definitions # Private Functions # Public Classes and Functions class APIClientError(Exception): """Indicates erro...
28.742857
73
0.570577
class APIClientError(Exception): def __init__(self, error, service=None, url=None, caller=None, verb=None, status_code=None, **kwargs): self.error = error self.service = service self.url = url self.caller = caller self.verb = verb self...
true
true
f73c3bf90614176a2f73efde6e502f7300165fdf
3,333
py
Python
tests/openbb_terminal/cryptocurrency/due_diligence/test_messari_model.py
tehcoderer/GamestonkTerminal
54a1b6f545a0016c576e9e00eef5c003d229dacf
[ "MIT" ]
255
2022-03-29T16:43:51.000Z
2022-03-31T23:57:08.000Z
tests/openbb_terminal/cryptocurrency/due_diligence/test_messari_model.py
tehcoderer/GamestonkTerminal
54a1b6f545a0016c576e9e00eef5c003d229dacf
[ "MIT" ]
14
2022-03-29T14:20:33.000Z
2022-03-31T23:39:20.000Z
tests/openbb_terminal/cryptocurrency/due_diligence/test_messari_model.py
tehcoderer/GamestonkTerminal
54a1b6f545a0016c576e9e00eef5c003d229dacf
[ "MIT" ]
24
2022-03-29T15:28:56.000Z
2022-03-31T23:54:15.000Z
# IMPORTATION STANDARD # IMPORTATION THIRDPARTY import pytest # IMPORTATION INTERNAL from openbb_terminal.cryptocurrency.due_diligence import messari_model @pytest.fixture(scope="module") def vcr_config(): return { "filter_headers": [ ("User-Agent", None), ("x-messari-api-key", "...
21.503226
87
0.665767
import pytest from openbb_terminal.cryptocurrency.due_diligence import messari_model @pytest.fixture(scope="module") def vcr_config(): return { "filter_headers": [ ("User-Agent", None), ("x-messari-api-key", "mock_x-messari-api-key"), ], } @pytest.mark.vcr @pytes...
true
true
f73c3cbb56cbef0d49a702ea92e553a92208d8e7
5,586
py
Python
kube_apiserver_metrics/tests/test_kube_apiserver_metrics.py
jfmyers9/integrations-core
8793c784f1d5b2c9541b2dd4214dd91584793ced
[ "BSD-3-Clause" ]
null
null
null
kube_apiserver_metrics/tests/test_kube_apiserver_metrics.py
jfmyers9/integrations-core
8793c784f1d5b2c9541b2dd4214dd91584793ced
[ "BSD-3-Clause" ]
null
null
null
kube_apiserver_metrics/tests/test_kube_apiserver_metrics.py
jfmyers9/integrations-core
8793c784f1d5b2c9541b2dd4214dd91584793ced
[ "BSD-3-Clause" ]
null
null
null
# (C) Datadog, Inc. 2019-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) # stdlib import os import tempfile import mock import pytest from datadog_checks.kube_apiserver_metrics import KubeAPIServerMetricsCheck from .common import APISERVER_INSTANCE_BEARER_TOKEN customtag =...
35.807692
103
0.691192
import os import tempfile import mock import pytest from datadog_checks.kube_apiserver_metrics import KubeAPIServerMetricsCheck from .common import APISERVER_INSTANCE_BEARER_TOKEN customtag = "custom:tag" minimal_instance = {'prometheus_url': 'https://localhost:443/metrics'} minimal_instance_legacy = {'promet...
true
true
f73c3ce0785788528d09862a2af8008e078f20cf
8,385
py
Python
vbox/src/VBox/ValidationKit/testmanager/db/gen-sql-comments.py
Nurzamal/rest_api_docker
a9cc01dfc235467d490d9663755b33ef6990bdd8
[ "MIT" ]
null
null
null
vbox/src/VBox/ValidationKit/testmanager/db/gen-sql-comments.py
Nurzamal/rest_api_docker
a9cc01dfc235467d490d9663755b33ef6990bdd8
[ "MIT" ]
null
null
null
vbox/src/VBox/ValidationKit/testmanager/db/gen-sql-comments.py
Nurzamal/rest_api_docker
a9cc01dfc235467d490d9663755b33ef6990bdd8
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # $Id: gen-sql-comments.py 69781 2017-11-20 18:41:33Z vboxsync $ """ Converts doxygen style comments in SQL script to COMMENT ON statements. """ __copyright__ = \ """ Copyright (C) 2012-2017 Oracle Corporation This file is part of VirtualBox Open Source Edition (OSE), as...
36.938326
115
0.49195
__copyright__ = \ """ Copyright (C) 2012-2017 Oracle Corporation This file is part of VirtualBox Open Source Edition (OSE), as available from http://www.virtualbox.org. This file is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License (GPL) as published by the ...
true
true
f73c3de41c1c7293344a4d4987dade136b68848a
1,182
py
Python
tests/rules/test_ln_no_hard_link.py
aoeu/DWIM
a3d59e5824cfd7a5195916c1af28fe54dcbbb2c1
[ "MIT" ]
null
null
null
tests/rules/test_ln_no_hard_link.py
aoeu/DWIM
a3d59e5824cfd7a5195916c1af28fe54dcbbb2c1
[ "MIT" ]
null
null
null
tests/rules/test_ln_no_hard_link.py
aoeu/DWIM
a3d59e5824cfd7a5195916c1af28fe54dcbbb2c1
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import pytest from dwim.rules.ln_no_hard_link import match, get_new_command from tests.utils import Command error = "hard link not allowed for directory" @pytest.mark.parametrize('script, stderr', [ ("ln barDir barLink", "ln: ‘barDir’: {}"), ("sudo ln a b", "ln: ‘a’: {}"), ("sudo ...
31.105263
61
0.608291
import pytest from dwim.rules.ln_no_hard_link import match, get_new_command from tests.utils import Command error = "hard link not allowed for directory" @pytest.mark.parametrize('script, stderr', [ ("ln barDir barLink", "ln: ‘barDir’: {}"), ("sudo ln a b", "ln: ‘a’: {}"), ("sudo ln -nbi a b", "ln: ‘a’:...
true
true
f73c3e336e5aa1bf58b6cf10d536964efaa292d7
1,049
py
Python
COT/helpers/gcc.py
morneaup/cot
3d4dc7079a33aa0c09216ec339b44f84ab69ff4b
[ "MIT" ]
81
2015-01-18T22:31:42.000Z
2022-03-14T12:34:33.000Z
COT/helpers/gcc.py
morneaup/cot
3d4dc7079a33aa0c09216ec339b44f84ab69ff4b
[ "MIT" ]
67
2015-01-05T15:24:39.000Z
2021-08-16T12:44:58.000Z
COT/helpers/gcc.py
morneaup/cot
3d4dc7079a33aa0c09216ec339b44f84ab69ff4b
[ "MIT" ]
20
2015-07-09T14:20:25.000Z
2021-09-18T17:59:57.000Z
#!/usr/bin/env python # # gcc.py - Helper for 'gcc' # # October 2016, Glenn F. Matthews # Copyright (c) 2013-2016 the COT project developers. # See the COPYRIGHT.txt file at the top-level directory of this distribution # and at https://github.com/glennmatthews/cot/blob/master/COPYRIGHT.txt. # # This file is part of the...
31.787879
78
0.696854
from COT.helpers.helper import Helper class GCC(Helper): _provider_package = { 'apt-get': 'gcc', 'yum': 'gcc', } def __init__(self): super(GCC, self).__init__("gcc")
true
true
f73c3e4f635151c36610e72e22eb704ef08d3309
1,117
py
Python
tests/image_test.py
antmicro/raviewer
7529664d37e994d4c2f4c450a5577b79d73c4bb0
[ "Apache-2.0" ]
12
2021-11-18T09:38:34.000Z
2022-03-24T19:33:44.000Z
tests/image_test.py
antmicro/raviewer
7529664d37e994d4c2f4c450a5577b79d73c4bb0
[ "Apache-2.0" ]
1
2022-02-14T12:07:02.000Z
2022-03-21T19:29:11.000Z
tests/image_test.py
antmicro/raviewer
7529664d37e994d4c2f4c450a5577b79d73c4bb0
[ "Apache-2.0" ]
null
null
null
import unittest import numpy import os import raviewer.image.image as image import raviewer.image.color_format as cf from raviewer.src.core import load_image class TestImageClass(unittest.TestCase): def setUp(self): self.TEST_FILE_BGR = os.path.join(os.path.dirname(__file__), ...
32.852941
78
0.645479
import unittest import numpy import os import raviewer.image.image as image import raviewer.image.color_format as cf from raviewer.src.core import load_image class TestImageClass(unittest.TestCase): def setUp(self): self.TEST_FILE_BGR = os.path.join(os.path.dirname(__file__), ...
true
true
f73c3ee1ee5fb637a215a0122a24609067ea5baa
7,071
py
Python
kubernetes_asyncio/client/models/v1_http_get_action.py
opsani/kubernetes_asyncio
55283bf6f3690e5c0a0c589cd752221511e2be51
[ "Apache-2.0" ]
196
2018-05-23T16:55:41.000Z
2022-03-31T10:09:40.000Z
kubernetes_asyncio/client/models/v1_http_get_action.py
tomplus/kubernetes_asyncio
e8c8686ec11be3a5295ae9d5d8728299492a61f8
[ "Apache-2.0" ]
164
2018-05-20T20:39:03.000Z
2022-03-29T22:57:04.000Z
kubernetes_asyncio/client/models/v1_http_get_action.py
opsani/kubernetes_asyncio
55283bf6f3690e5c0a0c589cd752221511e2be51
[ "Apache-2.0" ]
41
2018-06-08T00:39:53.000Z
2022-01-12T18:19:06.000Z
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: v1.18.20 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six f...
29.961864
147
0.590723
import pprint import re import six from kubernetes_asyncio.client.configuration import Configuration class V1HTTPGetAction(object): openapi_types = { 'host': 'str', 'http_headers': 'list[V1HTTPHeader]', 'path': 'str', 'port': 'object', 'scheme': 'str' } at...
true
true
f73c3f063fe84f12c3a9974eb652426563513ffe
1,981
py
Python
deploy/fabfile.py
simnalamburt/elp
526506bbcdad1e10c26433b46cbcca07a804dc18
[ "Apache-2.0" ]
6
2016-02-15T23:25:38.000Z
2022-01-25T17:56:47.000Z
deploy/fabfile.py
simnalamburt/elp
526506bbcdad1e10c26433b46cbcca07a804dc18
[ "Apache-2.0" ]
10
2016-02-14T17:52:06.000Z
2021-11-26T13:26:14.000Z
deploy/fabfile.py
ereichert/aws-elb-abacus
e3cc3e46fcc298cfce1c7f5851d760e8eb9adb3f
[ "Apache-2.0" ]
2
2016-02-15T21:16:38.000Z
2021-11-27T15:58:24.000Z
from build import * from release import * from fabric.network import ssh from fabric.api import env, put, run, sudo, task from fabric.decorators import runs_once ssh.util.log_to_file("paramiko.log", 10) env.use_ssh_config = True WORKSPACE_DIR = os.path.join(DEPLOYMENT_WORKING_DIR, "templates/workspace/") print("WORKS...
25.075949
97
0.669359
from build import * from release import * from fabric.network import ssh from fabric.api import env, put, run, sudo, task from fabric.decorators import runs_once ssh.util.log_to_file("paramiko.log", 10) env.use_ssh_config = True WORKSPACE_DIR = os.path.join(DEPLOYMENT_WORKING_DIR, "templates/workspace/") print("WORKS...
false
true
f73c3f41dc2715059cfa74a7b1dc3abf0ca068bc
43,251
py
Python
src/betterproto/__init__.py
qria/python-betterproto
6c1c41e9ccf7d020641e87f82e6419c3393a3841
[ "MIT" ]
null
null
null
src/betterproto/__init__.py
qria/python-betterproto
6c1c41e9ccf7d020641e87f82e6419c3393a3841
[ "MIT" ]
null
null
null
src/betterproto/__init__.py
qria/python-betterproto
6c1c41e9ccf7d020641e87f82e6419c3393a3841
[ "MIT" ]
null
null
null
import dataclasses import enum import inspect import json import struct import sys import typing from abc import ABC from base64 import b64decode, b64encode from datetime import datetime, timedelta, timezone from dateutil.parser import isoparse from typing import ( Any, Callable, Dict, Generator, Li...
34.573141
88
0.573143
import dataclasses import enum import inspect import json import struct import sys import typing from abc import ABC from base64 import b64decode, b64encode from datetime import datetime, timedelta, timezone from dateutil.parser import isoparse from typing import ( Any, Callable, Dict, Generator, Li...
true
true
f73c3fd9cba6a19db395bd14e2eef3617158a82a
3,818
py
Python
tensorflow/contrib/data/python/ops/threadpool.py
Esail/tensorflow
2538e68a69e585696175bd972cae119e06bde294
[ "Apache-2.0" ]
1
2019-01-03T13:49:53.000Z
2019-01-03T13:49:53.000Z
tensorflow/contrib/data/python/ops/threadpool.py
Esail/tensorflow
2538e68a69e585696175bd972cae119e06bde294
[ "Apache-2.0" ]
null
null
null
tensorflow/contrib/data/python/ops/threadpool.py
Esail/tensorflow
2538e68a69e585696175bd972cae119e06bde294
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
36.361905
85
0.739916
from __future__ import absolute_import from __future__ import division from __future__ import print_function import threading from tensorflow.python.data.ops import dataset_ops from tensorflow.python.eager import context from tensorflow.python.ops import gen_experimental_dataset_ops as ged_ops from tens...
true
true
f73c408d930c29c3bf97f122e561b79a77eacecb
4,314
py
Python
pybamm/models/full_battery_models/lithium_ion/base_lithium_ion_model.py
kinnala/PyBaMM
3c4ef83d1ea06287a55ceac5f25e139e54599ea9
[ "BSD-3-Clause" ]
null
null
null
pybamm/models/full_battery_models/lithium_ion/base_lithium_ion_model.py
kinnala/PyBaMM
3c4ef83d1ea06287a55ceac5f25e139e54599ea9
[ "BSD-3-Clause" ]
null
null
null
pybamm/models/full_battery_models/lithium_ion/base_lithium_ion_model.py
kinnala/PyBaMM
3c4ef83d1ea06287a55ceac5f25e139e54599ea9
[ "BSD-3-Clause" ]
null
null
null
# # Lithium-ion base model class # import pybamm class BaseModel(pybamm.BaseBatteryModel): """ Overwrites default parameters from Base Model with default parameters for lithium-ion models **Extends:** :class:`pybamm.BaseBatteryModel` """ def __init__(self, options=None, name="Unnamed lithiu...
37.513043
85
0.608484
import pybamm class BaseModel(pybamm.BaseBatteryModel): def __init__(self, options=None, name="Unnamed lithium-ion model", build=False): super().__init__(options, name) self.param = pybamm.LithiumIonParameters(options) self.timescale = self.param.tau_discharge ...
true
true
f73c4167277e4249b6706079081eebb9f2f05b45
24,208
py
Python
catalog/packages/tests/test_nsdm_subscription.py
onap/archive-vfc-nfvo-catalog
24b92a2210c2063935d313f08e1da1e9cee45f3f
[ "Apache-2.0" ]
1
2019-09-25T05:38:42.000Z
2019-09-25T05:38:42.000Z
catalog/packages/tests/test_nsdm_subscription.py
onap/archive-vfc-nfvo-catalog
24b92a2210c2063935d313f08e1da1e9cee45f3f
[ "Apache-2.0" ]
null
null
null
catalog/packages/tests/test_nsdm_subscription.py
onap/archive-vfc-nfvo-catalog
24b92a2210c2063935d313f08e1da1e9cee45f3f
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2019 Verizon. All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
46.375479
78
0.529412
import json import mock import uuid from django.test import TestCase from rest_framework.test import APIClient from rest_framework import status from catalog.packages.biz.nsdm_subscription import NsdmSubscription from catalog.pub.database.models import NsdmSubscriptionModel class TestNsdmSubscription(T...
true
true
f73c419bb49574320f2e1e9f17f8ef09265b5ba1
926
py
Python
Section_7/word_count_repo/src/project_utils.py
PacktPublishing/Software-Engineering-with-Python-3.x
056e4c89e4f8d7fc4a4095ee0671d6944a86630e
[ "MIT" ]
1
2020-02-02T13:55:29.000Z
2020-02-02T13:55:29.000Z
Section_7/word_count_repo/src/project_utils.py
PacktPublishing/Software-Engineering-with-Python-3.x
056e4c89e4f8d7fc4a4095ee0671d6944a86630e
[ "MIT" ]
null
null
null
Section_7/word_count_repo/src/project_utils.py
PacktPublishing/Software-Engineering-with-Python-3.x
056e4c89e4f8d7fc4a4095ee0671d6944a86630e
[ "MIT" ]
2
2020-02-09T12:41:40.000Z
2020-09-21T02:16:06.000Z
import string from _collections import defaultdict import csv def get_word_count(input_filename): ''' Takes a text file as input and returns the word count as Python Dictionary ''' with open(input_filename) as f_input: lines = f_input.readlines() word_dict = defaultdict(int) ...
26.457143
75
0.651188
import string from _collections import defaultdict import csv def get_word_count(input_filename): with open(input_filename) as f_input: lines = f_input.readlines() word_dict = defaultdict(int) for line in lines: clean_line = remove_punctuation(line) for word in clea...
true
true
f73c41a5b5e6ba41d08a85451248f34cf5e593e5
3,766
py
Python
recipe_modules/tryserver/example.py
ubports/depot_tools
f5cec0495609c9413d3d55205509120cab98eef5
[ "BSD-3-Clause" ]
null
null
null
recipe_modules/tryserver/example.py
ubports/depot_tools
f5cec0495609c9413d3d55205509120cab98eef5
[ "BSD-3-Clause" ]
null
null
null
recipe_modules/tryserver/example.py
ubports/depot_tools
f5cec0495609c9413d3d55205509120cab98eef5
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. DEPS = [ 'recipe_engine/json', 'recipe_engine/raw_io', 'recipe_engine/path', 'recipe_engine/platform', 'recipe_engine/properties', 'recipe_engine...
32.747826
78
0.65401
DEPS = [ 'recipe_engine/json', 'recipe_engine/raw_io', 'recipe_engine/path', 'recipe_engine/platform', 'recipe_engine/properties', 'recipe_engine/python', 'recipe_engine/step', 'tryserver', ] def RunSteps(api): if api.properties.get('set_failure_hash_with_no_steps'): with api.tryserver.set_f...
true
true
f73c423051ea951f626d6d2254c63ce22d83c707
17,872
py
Python
deepgmap/train/deepshark_local_oop_1d.py
koonimaru/DeepGMAP
7daac354229fc25fba81649b741921345dc5db05
[ "Apache-2.0" ]
11
2018-06-27T11:45:47.000Z
2021-07-01T15:32:56.000Z
deepgmap/train/deepshark_local_oop_1d.py
koonimaru/DeepGMAP
7daac354229fc25fba81649b741921345dc5db05
[ "Apache-2.0" ]
3
2020-01-28T21:45:15.000Z
2020-04-20T02:40:48.000Z
deepgmap/train/deepshark_local_oop_1d.py
koonimaru/DeepGMAP
7daac354229fc25fba81649b741921345dc5db05
[ "Apache-2.0" ]
1
2018-10-19T19:43:27.000Z
2018-10-19T19:43:27.000Z
import tensorflow as tf import sys import numpy as np import time import glob from natsort import natsorted import getopt import importlib as il import matplotlib.pyplot as plt def next_batch(loop, input_dir, batch_size, data_length): f = glob.glob(str(input_dir)+"*") f_srt=natsorted(f) with np.load(str(f_...
40.803653
214
0.554275
import tensorflow as tf import sys import numpy as np import time import glob from natsort import natsorted import getopt import importlib as il import matplotlib.pyplot as plt def next_batch(loop, input_dir, batch_size, data_length): f = glob.glob(str(input_dir)+"*") f_srt=natsorted(f) with np.load(str(f_...
true
true
f73c42acdca3884de7cc71e59d9089499be74ca8
3,313
py
Python
deepchem/feat/basic.py
ueser/deepchem
bc6494054f6d0c3e147489ac880143c4c0e5b90f
[ "MIT" ]
null
null
null
deepchem/feat/basic.py
ueser/deepchem
bc6494054f6d0c3e147489ac880143c4c0e5b90f
[ "MIT" ]
null
null
null
deepchem/feat/basic.py
ueser/deepchem
bc6494054f6d0c3e147489ac880143c4c0e5b90f
[ "MIT" ]
1
2021-12-10T22:37:54.000Z
2021-12-10T22:37:54.000Z
""" Basic molecular features. """ from __future__ import print_function from __future__ import division from __future__ import unicode_literals __author__ = "Steven Kearnes" __copyright__ = "Copyright 2014, Stanford University" __license__ = "LGPL v2.1+" from rdkit.Chem import Descriptors from deepchem.feat import Fe...
34.510417
80
0.670993
from __future__ import print_function from __future__ import division from __future__ import unicode_literals __author__ = "Steven Kearnes" __copyright__ = "Copyright 2014, Stanford University" __license__ = "LGPL v2.1+" from rdkit.Chem import Descriptors from deepchem.feat import Featurizer class MolecularWeight(F...
true
true
f73c4307accf7e35cac4a34ced0f4b72cea8f2c7
4,172
py
Python
sotodlib/utils/pipeline_tools/noise.py
zonca/sotodlib
0c64e07ab429e7f0c0e95befeedbaca486d3a414
[ "MIT" ]
null
null
null
sotodlib/utils/pipeline_tools/noise.py
zonca/sotodlib
0c64e07ab429e7f0c0e95befeedbaca486d3a414
[ "MIT" ]
null
null
null
sotodlib/utils/pipeline_tools/noise.py
zonca/sotodlib
0c64e07ab429e7f0c0e95befeedbaca486d3a414
[ "MIT" ]
null
null
null
# Copyright (c) 2019-2020 Simons Observatory. # Full license can be found in the top level "LICENSE" file. import numpy as np from toast.timing import function_timer, Timer from toast.tod import AnalyticNoise from toast.utils import Logger import toast.qarray as qa from ...sim_hardware import get_example def add_s...
30.676471
87
0.569271
import numpy as np from toast.timing import function_timer, Timer from toast.tod import AnalyticNoise from toast.utils import Logger import toast.qarray as qa from ...sim_hardware import get_example def add_so_noise_args(parser): parser.add_argument( "--common-mode-noise", required=False, ...
true
true
f73c44f95c6fefb227bfb8b8a9c862f05b3c5248
1,410
py
Python
chapter-1/1-9/src/brute_force.py
yuetsin/beauty-of-programming
5fd66e0fe2a5cba72eaa814abc2304301d44bb37
[ "CC0-1.0" ]
null
null
null
chapter-1/1-9/src/brute_force.py
yuetsin/beauty-of-programming
5fd66e0fe2a5cba72eaa814abc2304301d44bb37
[ "CC0-1.0" ]
null
null
null
chapter-1/1-9/src/brute_force.py
yuetsin/beauty-of-programming
5fd66e0fe2a5cba72eaa814abc2304301d44bb37
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/env python from testcases import gen_random, gen_fake_random from time import time begin = time() RANDOM = True conf_cnt = 7 if RANDOM: test_cases = gen_random(10, conf_cnt) else: test_cases = gen_fake_random() def check_valid(colors: list) -> bool: # check if it's a valid palette fo...
20.434783
49
0.648227
from testcases import gen_random, gen_fake_random from time import time begin = time() RANDOM = True conf_cnt = 7 if RANDOM: test_cases = gen_random(10, conf_cnt) else: test_cases = gen_fake_random() def check_valid(colors: list) -> bool: for conflicts in test_cases: results = [colors...
true
true
f73c46746f02c128c9fd0f5755f4be1f1b9c3cef
763
py
Python
homeassistant/components/insteon_local/__init__.py
shanbs/home-assistant
818776d2b4f11e4f51992dc88bc0a6f9055833b2
[ "Apache-2.0" ]
2
2017-10-26T19:43:55.000Z
2017-12-30T23:29:00.000Z
homeassistant/components/insteon_local/__init__.py
shanbs/home-assistant
818776d2b4f11e4f51992dc88bc0a6f9055833b2
[ "Apache-2.0" ]
3
2021-09-08T03:29:36.000Z
2022-03-12T00:59:48.000Z
homeassistant/components/insteon_local/__init__.py
shanbs/home-assistant
818776d2b4f11e4f51992dc88bc0a6f9055833b2
[ "Apache-2.0" ]
1
2019-09-28T07:06:08.000Z
2019-09-28T07:06:08.000Z
"""Local support for Insteon.""" import logging _LOGGER = logging.getLogger(__name__) def setup(hass, config): """Set up the insteon_local component. This component is deprecated as of release 0.77 and should be removed in release 0.90. """ _LOGGER.warning('The insteon_local component has been r...
31.791667
78
0.70118
import logging _LOGGER = logging.getLogger(__name__) def setup(hass, config): _LOGGER.warning('The insteon_local component has been replaced by ' 'the insteon component') _LOGGER.warning('Please see https://home-assistant.io/components/insteon') hass.components.persistent_notificatio...
true
true
f73c46e4bca3b6fac91467735b1af42c3a57813d
3,722
py
Python
km_api/know_me/tests/serializers/test_apple_receipt_query_serializer.py
knowmetools/km-api
e4b72484c42e88a6c0087c9b1d5fef240e66cbb0
[ "Apache-2.0" ]
4
2017-08-03T00:46:31.000Z
2018-11-06T03:32:32.000Z
km_api/know_me/tests/serializers/test_apple_receipt_query_serializer.py
knowmetools/km-api
e4b72484c42e88a6c0087c9b1d5fef240e66cbb0
[ "Apache-2.0" ]
526
2017-06-27T18:13:59.000Z
2021-06-10T18:00:21.000Z
km_api/know_me/tests/serializers/test_apple_receipt_query_serializer.py
knowmetools/km-api
e4b72484c42e88a6c0087c9b1d5fef240e66cbb0
[ "Apache-2.0" ]
1
2017-07-10T19:46:27.000Z
2017-07-10T19:46:27.000Z
from unittest import mock import pytest from rest_framework.exceptions import ValidationError as DRFValidationError from know_me import models from know_me.serializers import subscription_serializers from know_me.subscriptions import ReceiptException, AppleTransaction def test_save(): """ The save method of...
33.232143
96
0.742074
from unittest import mock import pytest from rest_framework.exceptions import ValidationError as DRFValidationError from know_me import models from know_me.serializers import subscription_serializers from know_me.subscriptions import ReceiptException, AppleTransaction def test_save(): serializer = subscription_...
true
true
f73c470d00371596cf333d485c4d1984dc10e3ac
26,899
py
Python
test/integration/component/maint/test_multiple_ip_ranges.py
primechuck/cloudstack
4e4be25894621b82ad394449db9442323ab346c7
[ "Apache-2.0", "MIT" ]
null
null
null
test/integration/component/maint/test_multiple_ip_ranges.py
primechuck/cloudstack
4e4be25894621b82ad394449db9442323ab346c7
[ "Apache-2.0", "MIT" ]
6
2020-11-16T20:46:02.000Z
2022-02-01T01:06:41.000Z
test/integration/component/maint/test_multiple_ip_ranges.py
primechuck/cloudstack
4e4be25894621b82ad394449db9442323ab346c7
[ "Apache-2.0", "MIT" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
33.920555
102
0.545968
from marvin.cloudstackTestCase import cloudstackTestCase, unittest from marvin.lib.utils import cleanup_resources, get_process_status from marvin.lib.base import (Account, DiskOffering, VirtualMachine, Router, ...
true
true
f73c47ce2527893a50c5288ec493066c466b2223
1,200
py
Python
src/third_party/beaengine/tests/0f3880.py
CrackerCat/rp
5fe693c26d76b514efaedb4084f6e37d820db023
[ "MIT" ]
1
2022-01-17T17:40:29.000Z
2022-01-17T17:40:29.000Z
src/third_party/beaengine/tests/0f3880.py
CrackerCat/rp
5fe693c26d76b514efaedb4084f6e37d820db023
[ "MIT" ]
null
null
null
src/third_party/beaengine/tests/0f3880.py
CrackerCat/rp
5fe693c26d76b514efaedb4084f6e37d820db023
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This progra...
35.294118
73
0.694167
from headers.BeaEnginePython import * from nose.tools import * class TestSuite: def test(self): Buffer = bytes.fromhex('660f388020') myDisasm = Disasm(Buffer) myDisasm.read() assert_equal(myDisasm.infos.Instruction.Opcode, 0xf3880) asser...
true
true
f73c4a5b995c7873587158e9c39eb3e47a9f9ce5
1,031
py
Python
py/ops/itests/test_deps.py
clchiou/garage
446ff34f86cdbd114b09b643da44988cf5d027a3
[ "MIT" ]
3
2016-01-04T06:28:52.000Z
2020-09-20T13:18:40.000Z
py/ops/itests/test_deps.py
clchiou/garage
446ff34f86cdbd114b09b643da44988cf5d027a3
[ "MIT" ]
null
null
null
py/ops/itests/test_deps.py
clchiou/garage
446ff34f86cdbd114b09b643da44988cf5d027a3
[ "MIT" ]
null
null
null
import unittest from subprocess import call, check_call, check_output import os.path from .fixtures import Fixture @Fixture.inside_container class DepsTest(Fixture, unittest.TestCase): def test_install_deps(self): # Ensure rkt is not installed self.assertEqual(1, call(['which', 'rkt'])) ...
28.638889
79
0.619787
import unittest from subprocess import call, check_call, check_output import os.path from .fixtures import Fixture @Fixture.inside_container class DepsTest(Fixture, unittest.TestCase): def test_install_deps(self): self.assertEqual(1, call(['which', 'rkt'])) cmd = ('python3 -m...
true
true
f73c4a5bc62ae00d86298e54ff607b5443e2839d
860
py
Python
Python/843.py
JWang169/LintCodeJava
b75b06fa1551f5e4d8a559ef64e1ac29db79c083
[ "CNRI-Python" ]
1
2020-12-10T05:36:15.000Z
2020-12-10T05:36:15.000Z
Python/843.py
JWang169/LintCodeJava
b75b06fa1551f5e4d8a559ef64e1ac29db79c083
[ "CNRI-Python" ]
null
null
null
Python/843.py
JWang169/LintCodeJava
b75b06fa1551f5e4d8a559ef64e1ac29db79c083
[ "CNRI-Python" ]
3
2020-04-06T05:55:08.000Z
2021-08-29T14:26:54.000Z
# """ # This is Master's API interface. # You should not implement it, or speculate about its implementation # """ # class Master: # def guess(self, word: str) -> int: class Solution: def findSecretWord(self, wordlist: List[str], master: 'Master') -> None: word = wordlist[0] words = set(wordlis...
26.875
76
0.45814
# This is Master's API interface. # You should not implement it, or speculate about its implementation # """ # class Master: # def guess(self, word: str) -> int: class Solution: def findSecretWord(self, wordlist: List[str], master: 'Master') -> None: word = wordlist[0] words = set(wordlist) ...
true
true
f73c4a90a8994ddead5cbcd80546b1f8bbd111ed
1,948
py
Python
leaderboard/data.py
ntkleynhans/leaderboard
68e9e38c6f38320c448a6007f6fdfc2366bcc4f7
[ "Apache-2.0" ]
null
null
null
leaderboard/data.py
ntkleynhans/leaderboard
68e9e38c6f38320c448a6007f6fdfc2366bcc4f7
[ "Apache-2.0" ]
null
null
null
leaderboard/data.py
ntkleynhans/leaderboard
68e9e38c6f38320c448a6007f6fdfc2366bcc4f7
[ "Apache-2.0" ]
null
null
null
class Result(object): def __init__(self, result): self._result = result self._teams = [] self._scores = [] def parse(self): """ Parse a results file entry Result format is Team_Name Score, Team_Name Score Parameters: self.result ...
23.190476
66
0.521047
class Result(object): def __init__(self, result): self._result = result self._teams = [] self._scores = [] def parse(self): for team_pair in self._result.split(','): name, score = self.team_data(team_pair) self._teams.append(name) self._scores...
true
true
f73c4b174a315451121137166af480fc042ee668
2,549
py
Python
reconstruction/fbp_equiAngular/fbp_equiAngular.py
xcist/CatSim
4fdd0be26f9915a46a3c3327ed0617328f5ca8b4
[ "BSD-3-Clause" ]
9
2020-09-04T01:52:41.000Z
2021-09-20T16:05:28.000Z
reconstruction/fbp_equiAngular/fbp_equiAngular.py
xcist/CatSim
4fdd0be26f9915a46a3c3327ed0617328f5ca8b4
[ "BSD-3-Clause" ]
1
2021-09-15T13:59:57.000Z
2021-09-17T21:33:53.000Z
reconstruction/fbp_equiAngular/fbp_equiAngular.py
xcist/CatSim
4fdd0be26f9915a46a3c3327ed0617328f5ca8b4
[ "BSD-3-Clause" ]
5
2020-09-05T08:17:18.000Z
2021-03-09T02:49:58.000Z
import ctypes as ct import numpy as np import scipy.io as scio import matplotlib.pyplot as plt # Init ctypes types DOUBLE = ct.c_double PtrDOUBLE = ct.POINTER(DOUBLE) PtrPtrDOUBLE = ct.POINTER(PtrDOUBLE) class TestStruct(ct.Structure): _fields_ = [ ("ScanR", ct.c_double), ("DecFan...
2,549
2,549
0.620243
import ctypes as ct import numpy as np import scipy.io as scio import matplotlib.pyplot as plt
true
true
f73c4b495084f3f2646f62bc639ad78296671fb8
2,131
py
Python
tests/test_omp_sin3.py
antsfamily/pysparse
1de292f3e9c6d81950656b9405d4d87ef746d950
[ "MIT" ]
null
null
null
tests/test_omp_sin3.py
antsfamily/pysparse
1de292f3e9c6d81950656b9405d4d87ef746d950
[ "MIT" ]
null
null
null
tests/test_omp_sin3.py
antsfamily/pysparse
1de292f3e9c6d81950656b9405d4d87ef746d950
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Date : 2017-07-06 10:38:13 # @Author : Yan Liu & Zhi Liu (zhiliu.mind@gmail.com) # @Link : http://iridescent.ink # @Version : $1.0$ # import numpy as np import pysparse as pys import matplotlib.pyplot as plt Fs = 2000 Ts = 1 Ns = int(Ts * Fs) f1 = 100 f2 = 200 ...
20.68932
65
0.613327
import numpy as np import pysparse as pys import matplotlib.pyplot as plt Fs = 2000 Ts = 1 Ns = int(Ts * Fs) f1 = 100 f2 = 200 f3 = 700 t = np.linspace(0, Ts, Ns) xo = np.sin(2 * np.pi * f1 * t) + np.sin(2 * np.pi * f2 * t) + \ np.sin(2 * np.pi * f3 * t) x = np.abs(np.fft.fftshift(np.fft.fft(xo))) f = ...
true
true
f73c4b78a0f9899063a7f5859ee907dab1025349
13,700
py
Python
django/db/migrations/writer.py
xavfernandez/django
daaeb8415823444a9020460cf825efc3fae866a2
[ "BSD-3-Clause" ]
null
null
null
django/db/migrations/writer.py
xavfernandez/django
daaeb8415823444a9020460cf825efc3fae866a2
[ "BSD-3-Clause" ]
null
null
null
django/db/migrations/writer.py
xavfernandez/django
daaeb8415823444a9020460cf825efc3fae866a2
[ "BSD-3-Clause" ]
null
null
null
from __future__ import unicode_literals import datetime import inspect import decimal import collections from importlib import import_module import os import sys import types from django.apps import apps from django.db import models from django.db.migrations.loader import MigrationLoader from django.utils import date...
40.412979
223
0.579708
from __future__ import unicode_literals import datetime import inspect import decimal import collections from importlib import import_module import os import sys import types from django.apps import apps from django.db import models from django.db.migrations.loader import MigrationLoader from django.utils import date...
true
true
f73c4bcec43a854e563a4ce32b062a57fbd2205b
1,002
py
Python
data_files/PROGRAMS/MEDIUM/0012_Integer_to_Roman.py
sudhirrd007/LeetCode-scraper
de87ff17fff2c73e67392321df1107cce7cbf883
[ "MIT" ]
null
null
null
data_files/PROGRAMS/MEDIUM/0012_Integer_to_Roman.py
sudhirrd007/LeetCode-scraper
de87ff17fff2c73e67392321df1107cce7cbf883
[ "MIT" ]
null
null
null
data_files/PROGRAMS/MEDIUM/0012_Integer_to_Roman.py
sudhirrd007/LeetCode-scraper
de87ff17fff2c73e67392321df1107cce7cbf883
[ "MIT" ]
null
null
null
# ID : 12 # Title : Integer to Roman # Difficulty : MEDIUM # Acceptance_rate : 57.2% # Runtime : 40 ms # Memory : 12.8 MB # Tags : Math , String # Language : python3 # Problem_link : https://leetcode.com/problems/integer-to-roman # Premium : 0 # Notes : - ### def intToRoman(self, num: int) -> str: mapping...
23.857143
73
0.444112
def intToRoman(self, num: int) -> str: mapping = {1:"I", 5:"V", num = str(num) length = len(num) ans = "" for i in num: if(int(i)%5 == 0): if(int(i) !=0): ans += mapping[length*5] elif(int(i)%5 == 4):...
false
true
f73c4cacc4c2b63768bfbb372d0f64192a2c4692
6,495
py
Python
kstet_recv.py
SYANiDE-/VulnServer
1bb63fcabdc86abb1cbc2e4e38df70ce58b5e49e
[ "MIT" ]
null
null
null
kstet_recv.py
SYANiDE-/VulnServer
1bb63fcabdc86abb1cbc2e4e38df70ce58b5e49e
[ "MIT" ]
null
null
null
kstet_recv.py
SYANiDE-/VulnServer
1bb63fcabdc86abb1cbc2e4e38df70ce58b5e49e
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 import os, sys, time from socket import socket, AF_INET, SOCK_STREAM host=(("192.168.56.4",9999)) NOTES = """ ## located the name recv in WS2_32.dll ## POINTS TO: 71AB615A > 8BFF MOV EDI,EDI ## Set a breakpoint on the instruction it points to ## Sent the payload. Breakpoint hit....
40.849057
248
0.627868
import os, sys, time from socket import socket, AF_INET, SOCK_STREAM host=(("192.168.56.4",9999)) NOTES = """ ## located the name recv in WS2_32.dll ## POINTS TO: 71AB615A > 8BFF MOV EDI,EDI ## Set a breakpoint on the instruction it points to ## Sent the payload. Breakpoint hit. ## When WS2_32.recv i...
true
true
f73c4d3021f88dbbefe5ae61c0525aa66a3f5725
8,668
py
Python
nptelegrambot/chats.py
qdot/np-telegram-bot
b31c4309e00d8dbdda18cdbb831ebf39648d7b32
[ "BSD-3-Clause" ]
null
null
null
nptelegrambot/chats.py
qdot/np-telegram-bot
b31c4309e00d8dbdda18cdbb831ebf39648d7b32
[ "BSD-3-Clause" ]
2
2016-06-20T20:09:37.000Z
2016-06-20T20:34:26.000Z
nptelegrambot/chats.py
qdot/np-telegram-bot
b31c4309e00d8dbdda18cdbb831ebf39648d7b32
[ "BSD-3-Clause" ]
null
null
null
from .base import NPModuleBase class ChatRedisTransactions(object): def __init__(self, redis): "docstring" self.redis = redis def add_chat(self, chat_id, chat_title, chat_username): self.redis.hmset(chat_id, {"id": chat_id, "title": chat_title, ...
39.579909
125
0.61479
from .base import NPModuleBase class ChatRedisTransactions(object): def __init__(self, redis): self.redis = redis def add_chat(self, chat_id, chat_title, chat_username): self.redis.hmset(chat_id, {"id": chat_id, "title": chat_title, ...
true
true
f73c4dbf8380cf6a198a4d84e159fd89a6c16d69
16,149
py
Python
src/m3_more_nested_loops_in_sequences.py
franeyjr/19-MoreLoopsWithinLoops
6e272c2f0f2d5dc63c06023600d1f7def6c393ef
[ "MIT" ]
null
null
null
src/m3_more_nested_loops_in_sequences.py
franeyjr/19-MoreLoopsWithinLoops
6e272c2f0f2d5dc63c06023600d1f7def6c393ef
[ "MIT" ]
null
null
null
src/m3_more_nested_loops_in_sequences.py
franeyjr/19-MoreLoopsWithinLoops
6e272c2f0f2d5dc63c06023600d1f7def6c393ef
[ "MIT" ]
null
null
null
""" This project demonstrates NESTED LOOPS (i.e., loops within loops) in the context of SEQUENCES OF SUB-SEQUENCES. Authors: David Mutchler, Vibha Alangar, Matt Boutell, Dave Fisher, Mark Hays, Amanda Stouder, Aaron Wilkin, their colleagues, and Jack Franey. """ # DONE: 1. PUT YOUR NAME IN THE ABOVE...
37.908451
90
0.525543
def main(): run_test_largest_number() run_test_largest_negative_number() run_test_first_is_elsewhere_too() def run_test_largest_number(): print() print('-------------------------------------') print('Testing the LARGEST_NUMBER function:') print('-------------...
true
true
f73c4ddf4bbf332e6dbe27ee3b0f431a5ce22347
106
py
Python
entrogrammer/__init__.py
elbeejay/entrogrammer
8a927b9bee29c6ac2e1248adc0c7e56d2bb3c276
[ "MIT" ]
null
null
null
entrogrammer/__init__.py
elbeejay/entrogrammer
8a927b9bee29c6ac2e1248adc0c7e56d2bb3c276
[ "MIT" ]
1
2020-11-29T17:03:34.000Z
2020-11-29T17:03:34.000Z
entrogrammer/__init__.py
elbeejay/entrogrammer
8a927b9bee29c6ac2e1248adc0c7e56d2bb3c276
[ "MIT" ]
null
null
null
from . import classifier from . import core from . import plot from . import tools __version__ = "0.2.0"
15.142857
24
0.726415
from . import classifier from . import core from . import plot from . import tools __version__ = "0.2.0"
true
true
f73c4eb327f360a32af3682976e2b7cb491a61aa
1,534
py
Python
.buildkite/dagster-buildkite/dagster_buildkite/steps/docs.py
clippered/dagster
b064af1e2f948a1a71db4ef929a046cded1f97f4
[ "Apache-2.0" ]
4,606
2018-06-21T17:45:20.000Z
2022-03-31T23:39:42.000Z
.buildkite/dagster-buildkite/dagster_buildkite/steps/docs.py
clippered/dagster
b064af1e2f948a1a71db4ef929a046cded1f97f4
[ "Apache-2.0" ]
6,221
2018-06-12T04:36:01.000Z
2022-03-31T21:43:05.000Z
.buildkite/dagster-buildkite/dagster_buildkite/steps/docs.py
clippered/dagster
b064af1e2f948a1a71db4ef929a046cded1f97f4
[ "Apache-2.0" ]
619
2018-08-22T22:43:09.000Z
2022-03-31T22:48:06.000Z
from typing import List from ..defines import SupportedPython from ..step_builder import StepBuilder def docs_steps() -> List[dict]: return [ # If this test is failing because you may have either: # (1) Updated the code that is referenced by a literalinclude in the documentation # (2)...
38.35
93
0.606258
from typing import List from ..defines import SupportedPython from ..step_builder import StepBuilder def docs_steps() -> List[dict]: return [ StepBuilder("docs code snapshots") .run("pushd docs; make docs_dev_install; make snapshot", "git diff...
true
true
f73c4ef170d0d140b80bf99c8982a727302927fb
14,272
py
Python
src/3d_pose_vae_filter_kin.py
EsauPR/3d-pose-baseline
2f521fe3008ddee81b666550606f7405efd2f547
[ "MIT" ]
null
null
null
src/3d_pose_vae_filter_kin.py
EsauPR/3d-pose-baseline
2f521fe3008ddee81b666550606f7405efd2f547
[ "MIT" ]
null
null
null
src/3d_pose_vae_filter_kin.py
EsauPR/3d-pose-baseline
2f521fe3008ddee81b666550606f7405efd2f547
[ "MIT" ]
null
null
null
""" Train a VAE model used to filter and enhance 3d points """ import json from datetime import datetime import matplotlib import matplotlib.gridspec as gridspec import matplotlib.pyplot as plt import numpy as np import tensorflow as tf from tqdm import tqdm import cameras import data_utils import viz from top_vae_...
37.756614
102
0.605802
import json from datetime import datetime import matplotlib import matplotlib.gridspec as gridspec import matplotlib.pyplot as plt import numpy as np import tensorflow as tf from tqdm import tqdm import cameras import data_utils import viz from top_vae_3d_pose import data_handler, losses, models from top_vae_3d_pos...
true
true
f73c521e7d7fc1eba953a258dc33bb4db1a06886
322
py
Python
foundryapp/config/docs.py
umaepoch/foundryapp
75e20cb399b114d416d3bdd286edd8c5a4690c75
[ "MIT" ]
null
null
null
foundryapp/config/docs.py
umaepoch/foundryapp
75e20cb399b114d416d3bdd286edd8c5a4690c75
[ "MIT" ]
null
null
null
foundryapp/config/docs.py
umaepoch/foundryapp
75e20cb399b114d416d3bdd286edd8c5a4690c75
[ "MIT" ]
null
null
null
""" Configuration for docs """ # source_link = "https://github.com/[org_name]/foundryapp" # docs_base_url = "https://[org_name].github.io/foundryapp" # headline = "App that does everything" # sub_heading = "Yes, you got that right the first time, everything" def get_context(context): context.brand_html = "FoundryApp...
26.833333
68
0.729814
def get_context(context): context.brand_html = "FoundryApp"
true
true
f73c53166d10ae4448e1c7a06c7d15799e1c95a4
1,969
py
Python
test/test_normalizing_flows.py
qpwodlsqp/torchdyn
aa26dc0ea22acedfce6744f0bff10f551d175a2f
[ "Apache-2.0" ]
null
null
null
test/test_normalizing_flows.py
qpwodlsqp/torchdyn
aa26dc0ea22acedfce6744f0bff10f551d175a2f
[ "Apache-2.0" ]
null
null
null
test/test_normalizing_flows.py
qpwodlsqp/torchdyn
aa26dc0ea22acedfce6744f0bff10f551d175a2f
[ "Apache-2.0" ]
null
null
null
import torch import torch.nn as nn from torch.distributions import MultivariateNormal from torchdyn.models import NeuralODE from torchdyn import Augmenter from torchdyn.models.cnf import CNF, hutch_trace, autograd_trace def test_cnf_vanilla(): device = torch.device('cpu') net = nn.Sequential( nn.L...
37.150943
121
0.631285
import torch import torch.nn as nn from torch.distributions import MultivariateNormal from torchdyn.models import NeuralODE from torchdyn import Augmenter from torchdyn.models.cnf import CNF, hutch_trace, autograd_trace def test_cnf_vanilla(): device = torch.device('cpu') net = nn.Sequential( nn.L...
true
true
f73c5331449528e397708b27286fd68396b37a45
2,239
py
Python
tests/unit_tests/inference/dynesty_/test_solver.py
BAMresearch/probeye
ff018ef629f7d5ce4a263b6656b363f90ab6be02
[ "MIT" ]
null
null
null
tests/unit_tests/inference/dynesty_/test_solver.py
BAMresearch/probeye
ff018ef629f7d5ce4a263b6656b363f90ab6be02
[ "MIT" ]
42
2021-08-24T06:50:17.000Z
2022-03-25T09:05:41.000Z
tests/unit_tests/inference/dynesty_/test_solver.py
BAMresearch/probeye
ff018ef629f7d5ce4a263b6656b363f90ab6be02
[ "MIT" ]
2
2021-11-14T22:30:54.000Z
2022-02-28T13:39:00.000Z
# standard library import logging import unittest # third party imports import numpy as np # local imports from probeye.definition.forward_model import ForwardModelBase from probeye.definition.sensor import Sensor from probeye.definition.inference_problem import InferenceProblem from probeye.definition.noise_model im...
35.539683
88
0.623046
import logging import unittest import numpy as np from probeye.definition.forward_model import ForwardModelBase from probeye.definition.sensor import Sensor from probeye.definition.inference_problem import InferenceProblem from probeye.definition.noise_model import NormalNoiseModel from probeye.inference.dynesty_....
true
true
f73c53791017cdf460d634decdb7c3cba711c54f
33,192
py
Python
asr1k_neutron_l3/models/netconf_yang/ny_base.py
sapcc/asr1k-neutron-l3
2ee729156a456b8a7ab0ce7df36136c4e80962a5
[ "Apache-2.0" ]
4
2017-11-30T20:07:53.000Z
2021-01-28T03:34:17.000Z
asr1k_neutron_l3/models/netconf_yang/ny_base.py
sapcc/asr1k-neutron-l3
2ee729156a456b8a7ab0ce7df36136c4e80962a5
[ "Apache-2.0" ]
43
2018-02-20T21:16:43.000Z
2021-08-03T14:13:01.000Z
asr1k_neutron_l3/models/netconf_yang/ny_base.py
sapcc/asr1k-neutron-l3
2ee729156a456b8a7ab0ce7df36136c4e80962a5
[ "Apache-2.0" ]
1
2021-07-15T13:15:03.000Z
2021-07-15T13:15:03.000Z
# Copyright 2017 SAP SE # # 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 appl...
39.003525
119
0.517414
import time import eventlet import eventlet.debug import dictdiffer import six eventlet.debug.hub_exceptions(False) from oslo_log import log as logging from oslo_utils import uuidutils from asr1k_neutron_l3.common import asr1k_exceptions as exc from asr1k_neutron_l3.models import asr1k_pair from asr1k...
true
true
f73c53bd5d51dacd505f0d8fd1eba0dd1071f023
7,293
py
Python
soft_renderer/mesh.py
Rubikplayer/SoftRas
bfc6e7aba8531f4937f933122b3662b39b1114f1
[ "MIT" ]
null
null
null
soft_renderer/mesh.py
Rubikplayer/SoftRas
bfc6e7aba8531f4937f933122b3662b39b1114f1
[ "MIT" ]
null
null
null
soft_renderer/mesh.py
Rubikplayer/SoftRas
bfc6e7aba8531f4937f933122b3662b39b1114f1
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np import soft_renderer.functional as srf class Mesh(object): ''' A simple class for creating and manipulating trimesh objects ''' def __init__(self, vertices, faces, textures=None, texture_res=1, texture_type='surface...
38.792553
116
0.593994
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np import soft_renderer.functional as srf class Mesh(object): def __init__(self, vertices, faces, textures=None, texture_res=1, texture_type='surface'): self._vertices = vertices self._faces = faces if isi...
true
true
f73c553166d2334eb7d67ebc4b42826eb3948905
1,151
py
Python
execnet/__init__.py
RonnyPfannschmidt-migration-tests/execnet
2603fff9aa8e038e34e703e2d382ea19242ecd3e
[ "MIT" ]
58
2017-08-03T23:26:42.000Z
2022-01-28T03:41:25.000Z
venv/Lib/site-packages/execnet/__init__.py
Arthii01052/conduit
3427d76d0fa364cb5d19bdd6da4aeb0a22fe9660
[ "MIT" ]
65
2017-07-25T06:46:36.000Z
2022-03-08T20:55:00.000Z
venv/Lib/site-packages/execnet/__init__.py
Arthii01052/conduit
3427d76d0fa364cb5d19bdd6da4aeb0a22fe9660
[ "MIT" ]
35
2017-07-23T12:39:39.000Z
2022-03-14T06:00:52.000Z
# -*- coding: utf-8 -*- """ execnet ------- pure python lib for connecting to local and remote Python Interpreters. (c) 2012, Holger Krekel and others """ from ._version import version as __version__ from .deprecated import PopenGateway from .deprecated import SocketGateway from .deprecated import SshGateway from .ga...
22.134615
71
0.728931
from ._version import version as __version__ from .deprecated import PopenGateway from .deprecated import SocketGateway from .deprecated import SshGateway from .gateway_base import DataFormatError from .gateway_base import dump from .gateway_base import dumps from .gateway_base import load from .gateway_base import lo...
true
true
f73c5561bfacfa0f6cdb992af5b023c172ce8ee2
8,844
py
Python
sigstore/_internal/fulcio/_client.py
di/sigstore-python
9166a3ea5c2635a0924c6610f129c9f8d0002caf
[ "Apache-2.0" ]
null
null
null
sigstore/_internal/fulcio/_client.py
di/sigstore-python
9166a3ea5c2635a0924c6610f129c9f8d0002caf
[ "Apache-2.0" ]
null
null
null
sigstore/_internal/fulcio/_client.py
di/sigstore-python
9166a3ea5c2635a0924c6610f129c9f8d0002caf
[ "Apache-2.0" ]
null
null
null
# Copyright 2022 The Sigstore Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
31.47331
116
0.66237
import base64 import datetime import json import struct from abc import ABC from dataclasses import dataclass from enum import IntEnum from typing import List from urllib.parse import urljoin import pem import requests from cryptography.hazmat.primitives import serialization from cryptography.hazmat.pri...
true
true
f73c5687b82736bb78df4ee2df71db0daa2e791c
2,344
py
Python
zegami_sdk/workspace.py
mariya-gfx/zegami-python-sdk
513071f31b1f8b02397a2dfa4ab5786ade525f88
[ "Apache-2.0" ]
null
null
null
zegami_sdk/workspace.py
mariya-gfx/zegami-python-sdk
513071f31b1f8b02397a2dfa4ab5786ade525f88
[ "Apache-2.0" ]
null
null
null
zegami_sdk/workspace.py
mariya-gfx/zegami-python-sdk
513071f31b1f8b02397a2dfa4ab5786ade525f88
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Zegami Ltd. Apache 2.0 """ from .collection import Collection class Workspace(): def __init__(self, client, workspace_dict): self._client = client self._data = workspace_dict self._check_data() @property def id(): pass @id.get...
28.938272
91
0.554181
from .collection import Collection class Workspace(): def __init__(self, client, workspace_dict): self._client = client self._data = workspace_dict self._check_data() @property def id(): pass @id.getter def id(self): assert 'id' in self._dat...
true
true
f73c582c66dbef1a7d33d7286310070a9f53f465
274
py
Python
src/textbook/rosalind_ba5g.py
cowboysmall/rosalind
021e4392a8fc946b97bbf86bbb8227b28bb5e462
[ "MIT" ]
null
null
null
src/textbook/rosalind_ba5g.py
cowboysmall/rosalind
021e4392a8fc946b97bbf86bbb8227b28bb5e462
[ "MIT" ]
null
null
null
src/textbook/rosalind_ba5g.py
cowboysmall/rosalind
021e4392a8fc946b97bbf86bbb8227b28bb5e462
[ "MIT" ]
null
null
null
import os import sys sys.path.append(os.path.join(os.path.dirname(__file__), '../tools')) import files import distance def main(argv): lines = files.read_lines(argv[0]) print distance.edit(lines[0], lines[1]) if __name__ == "__main__": main(sys.argv[1:])
16.117647
68
0.678832
import os import sys sys.path.append(os.path.join(os.path.dirname(__file__), '../tools')) import files import distance def main(argv): lines = files.read_lines(argv[0]) print distance.edit(lines[0], lines[1]) if __name__ == "__main__": main(sys.argv[1:])
false
true
f73c586002a51a46cdacd80d7d97cddd5442975a
824
py
Python
setup.py
raharison-toky/Dawsonmuse
e3b3b0c08b984e676ca5a46a56fcdd827b7404cb
[ "BSD-3-Clause" ]
null
null
null
setup.py
raharison-toky/Dawsonmuse
e3b3b0c08b984e676ca5a46a56fcdd827b7404cb
[ "BSD-3-Clause" ]
null
null
null
setup.py
raharison-toky/Dawsonmuse
e3b3b0c08b984e676ca5a46a56fcdd827b7404cb
[ "BSD-3-Clause" ]
null
null
null
from unicodedata import name from setuptools import setup with open("README.md","r") as fh: long_description = fh.read() setup( name = 'dawsonmuse', version = '0.0.1', description= 'A module for running EEG experiments with Psychopy and a Muse device.', py_modules=["dawsonmuse"], author="Tokin...
29.428571
89
0.648058
from unicodedata import name from setuptools import setup with open("README.md","r") as fh: long_description = fh.read() setup( name = 'dawsonmuse', version = '0.0.1', description= 'A module for running EEG experiments with Psychopy and a Muse device.', py_modules=["dawsonmuse"], author="Tokin...
true
true
f73c590eed34ae41e5a287dbff47d7122aebece3
3,431
py
Python
custom_components/xiaomi_gateway3/switch.py
avbor/HomeAssistantConf
1f0fe16c8e3f3dcea7cc350f3fb9c233b6a22614
[ "Unlicense" ]
35
2021-02-25T06:30:42.000Z
2022-03-09T20:18:47.000Z
custom_components/xiaomi_gateway3/switch.py
avbor/HomeAssistantConf
1f0fe16c8e3f3dcea7cc350f3fb9c233b6a22614
[ "Unlicense" ]
33
2021-11-22T16:30:43.000Z
2022-03-29T18:00:13.000Z
custom_components/xiaomi_gateway3/switch.py
avbor/HomeAssistantConf
1f0fe16c8e3f3dcea7cc350f3fb9c233b6a22614
[ "Unlicense" ]
19
2021-02-20T05:29:58.000Z
2022-02-05T16:22:30.000Z
import logging from homeassistant.components import persistent_notification from homeassistant.helpers.entity import ToggleEntity from . import DOMAIN from .core.gateway3 import Gateway3 from .core.helpers import XiaomiEntity _LOGGER = logging.getLogger(__name__) async def async_setup_entry(hass, config_entry, asy...
29.834783
76
0.625765
import logging from homeassistant.components import persistent_notification from homeassistant.helpers.entity import ToggleEntity from . import DOMAIN from .core.gateway3 import Gateway3 from .core.helpers import XiaomiEntity _LOGGER = logging.getLogger(__name__) async def async_setup_entry(hass, config_entry, asy...
true
true
f73c59fc6af1cf0b89be62e6bc779019364f1b6e
6,925
py
Python
fhir/resources/STU3/devicemetric.py
mmabey/fhir.resources
cc73718e9762c04726cd7de240c8f2dd5313cbe1
[ "BSD-3-Clause" ]
null
null
null
fhir/resources/STU3/devicemetric.py
mmabey/fhir.resources
cc73718e9762c04726cd7de240c8f2dd5313cbe1
[ "BSD-3-Clause" ]
null
null
null
fhir/resources/STU3/devicemetric.py
mmabey/fhir.resources
cc73718e9762c04726cd7de240c8f2dd5313cbe1
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Profile: http://hl7.org/fhir/StructureDefinition/DeviceMetric Release: STU3 Version: 3.0.2 Revision: 11917 Last updated: 2019-10-24T11:53:00+11:00 """ import sys from . import backboneelement, domainresource class DeviceMetric(domainresource.DomainResource): """ Measurement, calcula...
31.477273
99
0.514946
import sys from . import backboneelement, domainresource class DeviceMetric(domainresource.DomainResource): resource_type = "DeviceMetric" def __init__(self, jsondict=None, strict=True): self.calibration = None self.category = None self.color = None self.identifier = ...
true
true
f73c5a03d5764913bd1f3641e6097bfa8b044cab
822
py
Python
scripts/data_utils.py
robertjankowski/social-media-influence-on-covid-pandemic
1b04aa4aa88d4788fdfa023eb21b1f00b16f0110
[ "MIT" ]
null
null
null
scripts/data_utils.py
robertjankowski/social-media-influence-on-covid-pandemic
1b04aa4aa88d4788fdfa023eb21b1f00b16f0110
[ "MIT" ]
null
null
null
scripts/data_utils.py
robertjankowski/social-media-influence-on-covid-pandemic
1b04aa4aa88d4788fdfa023eb21b1f00b16f0110
[ "MIT" ]
null
null
null
import pandas as pd def get_value(text): return text.split("_")[0] def load_results(path: str, params): all_parameters = {} file_name = path.split("/")[-1].split(".csv")[0] file_name = file_name.split("=")[1:] for i, f in enumerate(file_name): all_parameters[params[i]] = get_value(f) ...
28.344828
120
0.632603
import pandas as pd def get_value(text): return text.split("_")[0] def load_results(path: str, params): all_parameters = {} file_name = path.split("/")[-1].split(".csv")[0] file_name = file_name.split("=")[1:] for i, f in enumerate(file_name): all_parameters[params[i]] = get_value(f) ...
true
true
f73c5a351177e87f798389c016a818827521fcc2
1,593
py
Python
docker/test/integration/minifi/core/FileSystemObserver.py
galshi/nifi-minifi-cpp
60905d30e926b5dac469dcdd27b24ac645d47519
[ "Apache-2.0", "OpenSSL" ]
null
null
null
docker/test/integration/minifi/core/FileSystemObserver.py
galshi/nifi-minifi-cpp
60905d30e926b5dac469dcdd27b24ac645d47519
[ "Apache-2.0", "OpenSSL" ]
null
null
null
docker/test/integration/minifi/core/FileSystemObserver.py
galshi/nifi-minifi-cpp
60905d30e926b5dac469dcdd27b24ac645d47519
[ "Apache-2.0", "OpenSSL" ]
null
null
null
import logging import time from threading import Event from watchdog.observers import Observer from .OutputEventHandler import OutputEventHandler class FileSystemObserver(object): def __init__(self, test_output_dir): self.test_output_dir = test_output_dir # Start observing output dir s...
33.893617
99
0.681733
import logging import time from threading import Event from watchdog.observers import Observer from .OutputEventHandler import OutputEventHandler class FileSystemObserver(object): def __init__(self, test_output_dir): self.test_output_dir = test_output_dir self.done_event = Event() ...
true
true
f73c5c2af75357edbf54f442ef701b501aa8df38
7,620
py
Python
docs/conf.py
flikka/openfast
e4faf27b774982df274b87c0570e4b58c4a13fe3
[ "Apache-2.0" ]
1
2020-01-20T02:19:46.000Z
2020-01-20T02:19:46.000Z
docs/conf.py
flikka/openfast
e4faf27b774982df274b87c0570e4b58c4a13fe3
[ "Apache-2.0" ]
1
2018-08-14T19:01:21.000Z
2018-08-14T19:01:21.000Z
docs/conf.py
nikhar-abbas/openfast
ccf6634c8701221cbbb11459015a7668c228b98d
[ "Apache-2.0" ]
2
2020-10-12T01:04:59.000Z
2020-12-29T01:20:48.000Z
# -*- coding: utf-8 -*- # # OpenFAST documentation build configuration file, created by # sphinx-quickstart on Wed Jan 25 13:52:07 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # ...
29.307692
95
0.655906
import os import sys import subprocess import re readTheDocs = os.environ.get('READTHEDOCS', None) == 'True' builddir = sys.argv[-1] sourcedir = sys.argv[-2] useDoxygen = True def runDoxygen(sourcfile, doxyfileIn, doxyfileOut): dx = open(os.path.join(sourcedir, doxyfileIn), 'r') cfg = ...
true
true
f73c5c50de77efcb1f62245e3a82db72ff57d470
1,045
py
Python
test.py
solitone/tic-tac-toe
a6795c42700a333e829649116f41ef2cfbf43c3a
[ "Apache-2.0" ]
null
null
null
test.py
solitone/tic-tac-toe
a6795c42700a333e829649116f41ef2cfbf43c3a
[ "Apache-2.0" ]
null
null
null
test.py
solitone/tic-tac-toe
a6795c42700a333e829649116f41ef2cfbf43c3a
[ "Apache-2.0" ]
null
null
null
from tic_tac_toe.Board import Board, GameResult from tic_tac_toe.RandomPlayer import RandomPlayer from tic_tac_toe.MinMaxAgent import MinMaxAgent from tic_tac_toe.RndMinMaxAgent import RndMinMaxAgent from tic_tac_toe.HumanPlayer import HumanPlayer from tic_tac_toe.TQPlayer import TQPlayer from tic_tac_toe.VFPlayer impo...
41.8
87
0.799043
from tic_tac_toe.Board import Board, GameResult from tic_tac_toe.RandomPlayer import RandomPlayer from tic_tac_toe.MinMaxAgent import MinMaxAgent from tic_tac_toe.RndMinMaxAgent import RndMinMaxAgent from tic_tac_toe.HumanPlayer import HumanPlayer from tic_tac_toe.TQPlayer import TQPlayer from tic_tac_toe.VFPlayer impo...
true
true
f73c5d94bc1bd54c028caf3aa0ebc4393b372f05
21,151
py
Python
vtr_flow/scripts/benchtracker/plotter-offline.py
brycejh/vtr-verilog-to-routing
f61da5eb2d4e008728a01def827d55a0e9f285d0
[ "MIT" ]
682
2015-07-10T00:39:26.000Z
2022-03-30T05:24:53.000Z
vtr_flow/scripts/benchtracker/plotter-offline.py
brycejh/vtr-verilog-to-routing
f61da5eb2d4e008728a01def827d55a0e9f285d0
[ "MIT" ]
1,399
2015-07-24T22:09:09.000Z
2022-03-29T06:22:48.000Z
vtr_flow/scripts/benchtracker/plotter-offline.py
brycejh/vtr-verilog-to-routing
f61da5eb2d4e008728a01def827d55a0e9f285d0
[ "MIT" ]
311
2015-07-09T13:59:48.000Z
2022-03-28T00:15:20.000Z
""" this is to plot graphs based on the db output: db should be like this: task | run | arch | benchmark | settings(fc, wl, sb, ...) | measuremnts(delay, min_cw, area ...) take as input: the user filtered table prompt user input: the overlay axis, and the choice of geometric mean input data from the da...
45.291221
1,054
0.575907
""" this is to plot graphs based on the db output: db should be like this: task | run | arch | benchmark | settings(fc, wl, sb, ...) | measuremnts(delay, min_cw, area ...) take as input: the user filtered table prompt user input: the overlay axis, and the choice of geometric mean input data from the da...
false
true
f73c5e41ad8d71f32449834a7ee2cf7ebfbe5b0c
58,482
py
Python
tools/building.py
radekdoulik/emscripten
9bb622f6438c31e85890e2571499e0a3093e7f48
[ "MIT" ]
null
null
null
tools/building.py
radekdoulik/emscripten
9bb622f6438c31e85890e2571499e0a3093e7f48
[ "MIT" ]
null
null
null
tools/building.py
radekdoulik/emscripten
9bb622f6438c31e85890e2571499e0a3093e7f48
[ "MIT" ]
null
null
null
# Copyright 2020 The Emscripten Authors. All rights reserved. # Emscripten is available under two separate licenses, the MIT license and the # University of Illinois/NCSA Open Source License. Both these licenses can be # found in the LICENSE file. import json import logging import os import re import shlex import sh...
39.675712
320
0.690845
import json import logging import os import re import shlex import shutil import subprocess import sys import tempfile from subprocess import PIPE from . import diagnostics from . import response_file from . import shared from . import webassembly from . import config from .toolchain_profiler import ToolchainProf...
true
true
f73c6047b94bbb337a4a4687e553ee24c17309d6
12,051
py
Python
transcrypt/development/shipment/shipment_test.py
CarstenGrohmann/Transcrypt
a4c7e044b352d6200e5ea3ec6000248a243dfd91
[ "Apache-2.0" ]
1
2017-08-11T01:51:51.000Z
2017-08-11T01:51:51.000Z
transcrypt/development/shipment/shipment_test.py
CarstenGrohmann/Transcrypt
a4c7e044b352d6200e5ea3ec6000248a243dfd91
[ "Apache-2.0" ]
null
null
null
transcrypt/development/shipment/shipment_test.py
CarstenGrohmann/Transcrypt
a4c7e044b352d6200e5ea3ec6000248a243dfd91
[ "Apache-2.0" ]
1
2021-02-07T00:22:12.000Z
2021-02-07T00:22:12.000Z
import os import os.path import sys import datetime import webbrowser import argparse import time import traceback import selenium import selenium.webdriver.chrome.options import pathlib # ======== Command args singleton class CommandArgs: def __init__ (self): self.argParser = argparse.ArgumentParser () ...
40.439597
152
0.604846
import os import os.path import sys import datetime import webbrowser import argparse import time import traceback import selenium import selenium.webdriver.chrome.options import pathlib class CommandArgs: def __init__ (self): self.argParser = argparse.ArgumentParser () self.argParser.add_ar...
true
true
f73c62120cea10949b8e1d84d60b6e62f5947291
3,425
py
Python
src/ggrc/migrations/utils/fix_acl.py
MikalaiMikalalai/ggrc-core
f0f83b3638574bb64de474f3b70ed27436ca812a
[ "ECL-2.0", "Apache-2.0" ]
1
2019-01-12T23:46:00.000Z
2019-01-12T23:46:00.000Z
src/ggrc/migrations/utils/fix_acl.py
MikalaiMikalalai/ggrc-core
f0f83b3638574bb64de474f3b70ed27436ca812a
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/ggrc/migrations/utils/fix_acl.py
MikalaiMikalalai/ggrc-core
f0f83b3638574bb64de474f3b70ed27436ca812a
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# Copyright (C) 2020 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """Functions to fix data related to ACL""" import sqlalchemy as sa # pylint: disable=too-many-arguments def create_missing_acl(connection, migration_user_id, role_id, table_name, o...
32.009346
78
0.681752
import sqlalchemy as sa def create_missing_acl(connection, migration_user_id, role_id, table_name, object_type, revision_action): sql = """ INSERT INTO access_control_list ( ac_role_id, object_id, object_type, created_at, modified_by_id, ...
true
true
f73c62330712aa3393752342e447a3eaba185e4a
207
py
Python
src/gcp_fastapi_poetry/types.py
k2bd/gcp-fastapi-poetry
cf0f4db1fa3ac2abc35cc7563a19a6f527e7abdf
[ "MIT" ]
2
2022-01-08T15:38:42.000Z
2022-01-28T20:42:13.000Z
src/gcp_fastapi_poetry/types.py
k2bd/gcp-fastapi-poetry
cf0f4db1fa3ac2abc35cc7563a19a6f527e7abdf
[ "MIT" ]
3
2022-01-08T14:24:15.000Z
2022-01-08T17:52:09.000Z
src/gcp_fastapi_poetry/types.py
k2bd/gcp-fastapi-poetry
cf0f4db1fa3ac2abc35cc7563a19a6f527e7abdf
[ "MIT" ]
null
null
null
from fastapi_camelcase import CamelModel class ExampleResponse(CamelModel): """ A person, place, or thing to say hello to """ #: Some value of the example response response_value: str
18.818182
45
0.695652
from fastapi_camelcase import CamelModel class ExampleResponse(CamelModel): response_value: str
true
true
f73c6236ff880ec85b61e187f5e2c2fd6f708956
2,536
py
Python
aliyun-python-sdk-emr/aliyunsdkemr/request/v20160408/ContextQueryLogRequest.py
sdk-team/aliyun-openapi-python-sdk
384730d707e6720d1676ccb8f552e6a7b330ec86
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-emr/aliyunsdkemr/request/v20160408/ContextQueryLogRequest.py
sdk-team/aliyun-openapi-python-sdk
384730d707e6720d1676ccb8f552e6a7b330ec86
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-emr/aliyunsdkemr/request/v20160408/ContextQueryLogRequest.py
sdk-team/aliyun-openapi-python-sdk
384730d707e6720d1676ccb8f552e6a7b330ec86
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
30.190476
68
0.74724
from aliyunsdkcore.request import RpcRequest class ContextQueryLogRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'Emr', '2016-04-08', 'ContextQueryLog') def get_PackId(self): return self.get_query_params().get('PackId') def set_PackId(self,PackId): self.add_query...
true
true
f73c639a89fdbf68215d5a0345d237d6c3d9b14d
7,533
py
Python
tests/system/esmvaltool_testlib.py
cffbots/ESMValTool
a9b6592a02f2085634a214ff5f36a736fa18ff47
[ "Apache-2.0" ]
148
2017-02-07T13:16:03.000Z
2022-03-26T02:21:56.000Z
tests/system/esmvaltool_testlib.py
cffbots/ESMValTool
a9b6592a02f2085634a214ff5f36a736fa18ff47
[ "Apache-2.0" ]
2,026
2017-02-03T12:57:13.000Z
2022-03-31T15:11:51.000Z
tests/system/esmvaltool_testlib.py
cffbots/ESMValTool
a9b6592a02f2085634a214ff5f36a736fa18ff47
[ "Apache-2.0" ]
113
2017-01-27T13:10:19.000Z
2022-02-03T13:42:11.000Z
"""Provide a class for testing esmvaltool.""" import glob import os import shutil import sys from unittest import SkipTest import numpy as np import yaml # from easytest import EasyTest import esmvaltool def _load_config(filename=None): """Load test configuration""" if filename is None: # look in d...
33.039474
79
0.608257
import glob import os import shutil import sys from unittest import SkipTest import numpy as np import yaml import esmvaltool def _load_config(filename=None): if filename is None: config_file = 'config-test.yml' default_locations = [ '.', '~/.esmvaltool', ...
true
true
f73c650605b57aca4116cb567499a484e2218797
1,066
py
Python
x11/massSpringParam1.py
Shirshakk-P/ControlSystems
2a6b147aa583cf5329ce9c84b0d84d72aba2bda4
[ "MIT" ]
1
2021-01-26T14:52:06.000Z
2021-01-26T14:52:06.000Z
x11/massSpringParam1.py
Shirshakk-P/ControlSystems
2a6b147aa583cf5329ce9c84b0d84d72aba2bda4
[ "MIT" ]
null
null
null
x11/massSpringParam1.py
Shirshakk-P/ControlSystems
2a6b147aa583cf5329ce9c84b0d84d72aba2bda4
[ "MIT" ]
null
null
null
#Mass Spring Damper system Parameter File import numpy as np import control as cnt import sys sys.path.append('..') #add parent directory import massSpringParam as P Ts = P.Ts beta = P.beta tau_max = P.tau_max m = P.m k = P.k b = P.b #tuning parameters #tr=1.6 #previous homework was done on the basi...
24.227273
113
0.602251
import numpy as np import control as cnt import sys sys.path.append('..') import massSpringParam as P Ts = P.Ts beta = P.beta tau_max = P.tau_max m = P.m k = P.k b = P.b ray([[0.0], [1.0/P.m]]) C = np.array([[1.0, 0.0]]) wn = 2.2/tr des_char_poly = [1, 2*zeta*wn, wn**2] des_poles ...
true
true
f73c65fbd1d8b07590bab28824b770d33b261d3b
6,410
py
Python
python/tvm/autotvm/feature.py
XiaoSong9905/tvm
48940f697e15d5b50fa1f032003e6c700ae1e423
[ "Apache-2.0" ]
4,640
2017-08-17T19:22:15.000Z
2019-11-04T15:29:46.000Z
python/tvm/autotvm/feature.py
XiaoSong9905/tvm
48940f697e15d5b50fa1f032003e6c700ae1e423
[ "Apache-2.0" ]
3,022
2020-11-24T14:02:31.000Z
2022-03-31T23:55:31.000Z
python/tvm/autotvm/feature.py
XiaoSong9905/tvm
48940f697e15d5b50fa1f032003e6c700ae1e423
[ "Apache-2.0" ]
1,352
2017-08-17T19:30:38.000Z
2019-11-04T16:09:29.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...
29.675926
99
0.651482
import struct import numpy as np import tvm._ffi from tvm.target import Target from tvm.driver import build_module def ana_lower(sch, args, binds=None, simple_mode=True): sch = sch.normalize() context = tvm.transform.PassContext(config={"tir.debug_keep_trivial_loop": True}) with co...
true
true
f73c660e82f2cca179f278c0aeedbb615587689d
6,230
py
Python
examples/remarketing/upload_conversion_adjustment.py
Insutanto/google-ads-python
f63e318ca39f2ecc6546fba69994456815727578
[ "Apache-2.0" ]
null
null
null
examples/remarketing/upload_conversion_adjustment.py
Insutanto/google-ads-python
f63e318ca39f2ecc6546fba69994456815727578
[ "Apache-2.0" ]
null
null
null
examples/remarketing/upload_conversion_adjustment.py
Insutanto/google-ads-python
f63e318ca39f2ecc6546fba69994456815727578
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
48.294574
82
0.6626
import argparse import sys from google.ads.google_ads.client import GoogleAdsClient from google.ads.google_ads.errors import GoogleAdsException def main(client, customer_id, conversion_action_id, gclid, adjustment_type, conversion_date_time, adjustment_date_time, restatement_value): ...
true
true
f73c661beee6fb71cf52b9938a4e6bc9bc759ef4
5,921
py
Python
visualization/eolearn/visualization/eoexecutor_visualization.py
gobaRules/eo-learn
25174e5e0759e35b616712423f01b03527a4b227
[ "MIT" ]
null
null
null
visualization/eolearn/visualization/eoexecutor_visualization.py
gobaRules/eo-learn
25174e5e0759e35b616712423f01b03527a4b227
[ "MIT" ]
null
null
null
visualization/eolearn/visualization/eoexecutor_visualization.py
gobaRules/eo-learn
25174e5e0759e35b616712423f01b03527a4b227
[ "MIT" ]
null
null
null
""" Module with utilities for vizualizing EOExecutor """ import os import inspect import warnings import base64 import copy try: import matplotlib.pyplot as plt except ImportError: import matplotlib matplotlib.use('agg') import matplotlib.pyplot as plt import graphviz import pygments import pygments....
35.244048
115
0.618139
import os import inspect import warnings import base64 import copy try: import matplotlib.pyplot as plt except ImportError: import matplotlib matplotlib.use('agg') import matplotlib.pyplot as plt import graphviz import pygments import pygments.lexers from pygments.formatters.html import HtmlFormatter...
true
true
f73c667dad1d042c5d1aa4117b7b71fd494fa09c
17,125
py
Python
src/etcd/client.py
thedrow/python-etcd
b4ff9cea95d0dbb1a8f83d9ff140fd9d9d977f8e
[ "MIT" ]
null
null
null
src/etcd/client.py
thedrow/python-etcd
b4ff9cea95d0dbb1a8f83d9ff140fd9d9d977f8e
[ "MIT" ]
null
null
null
src/etcd/client.py
thedrow/python-etcd
b4ff9cea95d0dbb1a8f83d9ff140fd9d9d977f8e
[ "MIT" ]
null
null
null
""" .. module:: python-etcd :synopsis: A python etcd client. .. moduleauthor:: Jose Plana <jplana@gmail.com> """ import urllib3 import json import ssl import etcd class Client(object): """ Client for etcd, the distributed log service using raft. """ _MGET = 'GET' _MPUT = 'PUT' _MPOST ...
28.494176
130
0.529927
import urllib3 import json import ssl import etcd class Client(object): _MGET = 'GET' _MPUT = 'PUT' _MPOST = 'POST' _MDELETE = 'DELETE' _comparison_conditions = set(('prevValue', 'prevIndex', 'prevExist')) _read_options = set(('recursive', 'wait', 'waitIndex', 'sorted', 'consistent')) _...
true
true
f73c67238c4af361622b2d8a0be5d1176f4d0c2d
931
py
Python
setup.py
sahandilshan/airML
599e6b14e517ec86cd4435f760c19587e3db5627
[ "Apache-2.0" ]
null
null
null
setup.py
sahandilshan/airML
599e6b14e517ec86cd4435f760c19587e3db5627
[ "Apache-2.0" ]
null
null
null
setup.py
sahandilshan/airML
599e6b14e517ec86cd4435f760c19587e3db5627
[ "Apache-2.0" ]
null
null
null
from setuptools import setup with open("README.md", "r") as fh: long_description = fh.read() setup( name="airML", version="0.0.2", author="Lahiru Oshara Hinguruduwa", author_email='oshara.16@cse.mrt.ac.lk', url='https://github.com/AKSW/airML', description="application will allow users to "...
27.382353
61
0.615467
from setuptools import setup with open("README.md", "r") as fh: long_description = fh.read() setup( name="airML", version="0.0.2", author="Lahiru Oshara Hinguruduwa", author_email='oshara.16@cse.mrt.ac.lk', url='https://github.com/AKSW/airML', description="application will allow users to "...
true
true
f73c6743b69657d4f3150a79436acfb8c6d12009
4,749
py
Python
handler.py
kgorskowski/codedeploy_asg_helper
1a78ba23c7beadce62bfb41ddee7c784d8f1e771
[ "MIT" ]
null
null
null
handler.py
kgorskowski/codedeploy_asg_helper
1a78ba23c7beadce62bfb41ddee7c784d8f1e771
[ "MIT" ]
null
null
null
handler.py
kgorskowski/codedeploy_asg_helper
1a78ba23c7beadce62bfb41ddee7c784d8f1e771
[ "MIT" ]
null
null
null
import json import boto3 import json autoscaling = boto3.client('autoscaling') processes_to_suspend = ["AZRebalance", "AlarmNotification", "ScheduledActions", "ReplaceUnhealthy"] def update_autoscaling_group(autoscaling_group, asg_min_size): print("Trying to reset %s to minimal size of %i instances" % (autoscal...
35.440299
99
0.625184
import json import boto3 import json autoscaling = boto3.client('autoscaling') processes_to_suspend = ["AZRebalance", "AlarmNotification", "ScheduledActions", "ReplaceUnhealthy"] def update_autoscaling_group(autoscaling_group, asg_min_size): print("Trying to reset %s to minimal size of %i instances" % (autoscal...
true
true
f73c6748a5451ba11183cc6044e91ed109913445
3,224
py
Python
tests/loops/test_all.py
FeryET/pytorch-lightning
b1f8b111b5085373599758a4e155a482259cdbf0
[ "Apache-2.0" ]
2
2022-01-24T12:40:51.000Z
2022-01-25T02:26:32.000Z
tests/loops/test_all.py
FeryET/pytorch-lightning
b1f8b111b5085373599758a4e155a482259cdbf0
[ "Apache-2.0" ]
1
2022-02-09T17:24:56.000Z
2022-02-09T17:24:56.000Z
tests/loops/test_all.py
FeryET/pytorch-lightning
b1f8b111b5085373599758a4e155a482259cdbf0
[ "Apache-2.0" ]
2
2022-02-11T08:26:13.000Z
2022-03-21T03:48:34.000Z
# Copyright The PyTorch Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
34.666667
99
0.71371
from pytorch_lightning import Callback, Trainer from tests.helpers import BoringModel from tests.helpers.runif import RunIf class BatchHookObserverCallback(Callback): def on_train_batch_start(self, trainer, pl_module, batch, *args): assert batch.device == pl_module.device def on_train_ba...
true
true
f73c67ac2b203e54db613e5bf7b915eb9fdeadc9
2,010
py
Python
codraft/app.py
CODRA-Software/CodraFT
d3a6e7abbf001b8d0d288b23f7ff81fcaa3b3659
[ "CECILL-B", "BSD-3-Clause" ]
null
null
null
codraft/app.py
CODRA-Software/CodraFT
d3a6e7abbf001b8d0d288b23f7ff81fcaa3b3659
[ "CECILL-B", "BSD-3-Clause" ]
null
null
null
codraft/app.py
CODRA-Software/CodraFT
d3a6e7abbf001b8d0d288b23f7ff81fcaa3b3659
[ "CECILL-B", "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # Licensed under the terms of the BSD 3-Clause or the CeCILL-B License # (see codraft/__init__.py for details) """ CodraFT launcher module """ from guidata.configtools import get_image_file_path from qtpy import QtCore as QC from qtpy import QtGui as QG from qtpy import QtWidgets as QW from...
30.454545
85
0.696517
from guidata.configtools import get_image_file_path from qtpy import QtCore as QC from qtpy import QtGui as QG from qtpy import QtWidgets as QW from codraft.config import Conf from codraft.core.gui.main import CodraFTMainWindow from codraft.env import execenv from codraft.utils.qthelpers import qt_app_context ...
true
true
f73c686bb4e7904a42fab14323192aceaafe7a03
195,703
py
Python
azure-devops/azext_devops/devops_sdk/v5_0/git/git_client_base.py
doggy8088/azure-devops-cli-extension
2f6b1a6ffbc49ae454df640a8bb00dac991d6514
[ "MIT" ]
326
2019-04-10T12:38:23.000Z
2022-03-31T23:07:49.000Z
azure-devops/azext_devops/devops_sdk/v5_0/git/git_client_base.py
doggy8088/azure-devops-cli-extension
2f6b1a6ffbc49ae454df640a8bb00dac991d6514
[ "MIT" ]
562
2019-04-10T07:36:12.000Z
2022-03-28T07:37:54.000Z
azure-devops/azext_devops/devops_sdk/v5_0/git/git_client_base.py
doggy8088/azure-devops-cli-extension
2f6b1a6ffbc49ae454df640a8bb00dac991d6514
[ "MIT" ]
166
2019-04-10T07:59:40.000Z
2022-03-16T14:17:13.000Z
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------...
62.465049
540
0.648053
 from msrest import Serializer, Deserializer from ...client import Client from . import models class GitClientBase(Client): """Git :param str base_url: Service URL :param Authentication creds: Authenticated credentials. """ def __init__(self, base_url=None, creds=None): super(GitC...
false
true
f73c69d35aff17f4c59a28633808cc8132b49e7a
5,392
py
Python
shorturl/index.py
chinalu/ShortURL
00e9c7581539430ad033a8dfa62f42f9fd161f52
[ "MIT" ]
null
null
null
shorturl/index.py
chinalu/ShortURL
00e9c7581539430ad033a8dfa62f42f9fd161f52
[ "MIT" ]
null
null
null
shorturl/index.py
chinalu/ShortURL
00e9c7581539430ad033a8dfa62f42f9fd161f52
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import json import re import web import sys sys.path.append("/home/www/ShortURL/shorturl") from libs.qrcode import QRCode, ErrorCorrectLevel import settings import models debug = web.config.debug = settings.DEBUG render = web.template.render(settings.TEMPLATE_DIR, ...
32.095238
79
0.512611
import json import re import web import sys sys.path.append("/home/www/ShortURL/shorturl") from libs.qrcode import QRCode, ErrorCorrectLevel import settings import models debug = web.config.debug = settings.DEBUG render = web.template.render(settings.TEMPLATE_DIR, base=settings.BASE_TEM...
true
true
f73c6a81a55c99f9db7d59a04b5a3718fa96108d
67
py
Python
test/conc.py
sah-py/vkMod
84995a3c0a1d54d7bbc802208ee0d6a756a98a7f
[ "MIT" ]
null
null
null
test/conc.py
sah-py/vkMod
84995a3c0a1d54d7bbc802208ee0d6a756a98a7f
[ "MIT" ]
null
null
null
test/conc.py
sah-py/vkMod
84995a3c0a1d54d7bbc802208ee0d6a756a98a7f
[ "MIT" ]
null
null
null
z = {0:1, 1:2} for key, value in z.items(): print(key, value)
22.333333
29
0.552239
z = {0:1, 1:2} for key, value in z.items(): print(key, value)
true
true
f73c6ad1f5b296ebe35e87eb7b18d33bd93efc01
77,810
py
Python
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/operations/_managed_clusters_operations.py
ankitarorabit/azure-sdk-for-python
dd90281cbad9400f8080754a5ef2f56791a5a88f
[ "MIT" ]
3
2020-06-23T02:25:27.000Z
2021-09-07T18:48:11.000Z
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/operations/_managed_clusters_operations.py
ankitarorabit/azure-sdk-for-python
dd90281cbad9400f8080754a5ef2f56791a5a88f
[ "MIT" ]
510
2019-07-17T16:11:19.000Z
2021-08-02T08:38:32.000Z
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_09_01/operations/_managed_clusters_operations.py
ankitarorabit/azure-sdk-for-python
dd90281cbad9400f8080754a5ef2f56791a5a88f
[ "MIT" ]
5
2019-09-04T12:51:37.000Z
2020-09-16T07:28:40.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
51.05643
253
0.666071
from typing import TYPE_CHECKING import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport impor...
true
true
f73c6d4973b007fb37f719d2f748aef742b7d6bd
6,231
py
Python
code/video_analysis.py
SixSq/tensorflow-lite-object-detector-container
fff3e52dbf16eab93653271ce51839845eae6e73
[ "Apache-2.0" ]
2
2021-07-30T15:10:37.000Z
2021-09-25T15:51:55.000Z
code/video_analysis.py
SixSq/tensorflow-lite-object-detector-container
fff3e52dbf16eab93653271ce51839845eae6e73
[ "Apache-2.0" ]
null
null
null
code/video_analysis.py
SixSq/tensorflow-lite-object-detector-container
fff3e52dbf16eab93653271ce51839845eae6e73
[ "Apache-2.0" ]
1
2021-09-25T15:55:35.000Z
2021-09-25T15:55:35.000Z
#!/usr/bin/env python3 # coding:utf-8 import os import cv2 import time import utils import threading import collections import requests from detect_objects import ObjectDetector #from profilehooks import profile # pip install profilehooks class Fps(object): def __init__(self, buffer_size=15): self.las...
31.790816
122
0.609533
import os import cv2 import time import utils import threading import collections import requests from detect_objects import ObjectDetector def __init__(self, buffer_size=15): self.last_frames_ts = collections.deque(maxlen=buffer_size) self.lock = threading.Lock() def __call__(self): ...
true
true
f73c6d5c679a3d159915561228b8a11dcf3f8abe
49,146
py
Python
contacts_and_people/migrations/0001_initial.py
techdragon/Arkestra
8dad01982339f9d702f5ed6d58179b3a90aff193
[ "BSD-2-Clause" ]
1
2019-06-27T13:05:16.000Z
2019-06-27T13:05:16.000Z
contacts_and_people/migrations/0001_initial.py
techdragon/Arkestra
8dad01982339f9d702f5ed6d58179b3a90aff193
[ "BSD-2-Clause" ]
null
null
null
contacts_and_people/migrations/0001_initial.py
techdragon/Arkestra
8dad01982339f9d702f5ed6d58179b3a90aff193
[ "BSD-2-Clause" ]
null
null
null
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Site' db.create_table('contacts_and_people_site', ( ('id', self.gf('django.db....
89.846435
262
0.60892
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.create_table('contacts_and_people_site', ( ('id', self.gf('django.db.models.fields.AutoField')(primary_key=...
true
true
f73c6d7d0f9b5d19dbc647d9a5e7641f9176d530
3,365
py
Python
continuous_Dice_coefficient.py
rubyshamir/cDC
c4ebef2ff96e65e197c6c995fb896f72d50de747
[ "MIT" ]
2
2021-03-24T13:40:52.000Z
2021-11-16T12:28:58.000Z
continuous_Dice_coefficient.py
rubyshamir/cDC
c4ebef2ff96e65e197c6c995fb896f72d50de747
[ "MIT" ]
null
null
null
continuous_Dice_coefficient.py
rubyshamir/cDC
c4ebef2ff96e65e197c6c995fb896f72d50de747
[ "MIT" ]
null
null
null
import numpy as np ''' Implementation of the continuous Dice Coefficient (https://www.biorxiv.org/content/10.1101/306977v1.full.pdf) "Continuous Dice Coefficient: a Method for Evaluating Probabilistic Segmentations" Reuben R Shamir,Yuval Duchin, Jinyoung Kim, Guillermo Sapiro, and Noam Harel Input: A - ground...
39.127907
121
0.702526
import numpy as np def continous_Dice_coefficient(A_binary, B_probability_map): AB = A_binary * B_probability_map c = np.sum(AB)/max(np.size(AB[AB>0]), 1) cDC = 2*(np.sum(AB))/(c*np.sum(A_binary) + np.sum(B_probability_map)) return cDC def Dice_coefficient(A_binary, B_binary): AB ...
true
true
f73c6e6cea3b1fc5eb5b7a12f1e046830c604785
37,837
py
Python
aggregator.py
Mattlk13/dd-agent
167d0c0ed8d7b66a531dd0c21097f0fa2fba8960
[ "BSD-3-Clause" ]
1,172
2015-01-04T21:56:16.000Z
2022-03-13T00:01:44.000Z
aggregator.py
Mattlk13/dd-agent
167d0c0ed8d7b66a531dd0c21097f0fa2fba8960
[ "BSD-3-Clause" ]
2,086
2015-01-02T16:33:21.000Z
2022-03-15T10:01:47.000Z
aggregator.py
Mattlk13/dd-agent
167d0c0ed8d7b66a531dd0c21097f0fa2fba8960
[ "BSD-3-Clause" ]
972
2015-01-02T05:03:46.000Z
2022-03-23T04:36:19.000Z
# (C) Datadog, Inc. 2010-2016 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) # stdlib import logging from time import time # project from checks.metric_types import MetricTypes log = logging.getLogger(__name__) # This is used to ensure that metrics with a timestamp older than # RECENT_...
37.648756
156
0.583318
import logging from time import time from checks.metric_types import MetricTypes log = logging.getLogger(__name__) RECENT_POINT_THRESHOLD_DEFAULT = 3600 class Infinity(Exception): pass class UnknownValue(Exception): pass class Metric(object): def sample(self, value, sample_rate, ti...
true
true
f73c7091314ed182cced7aed7727e8fa7b87a2d1
696
py
Python
imdbpy-master/tests/test_http_movie_taglines.py
camillesanchez/history-movie-index2
20f053700121f147b315645eed45c58f5014d2c0
[ "MIT" ]
null
null
null
imdbpy-master/tests/test_http_movie_taglines.py
camillesanchez/history-movie-index2
20f053700121f147b315645eed45c58f5014d2c0
[ "MIT" ]
7
2021-02-02T22:59:25.000Z
2022-03-12T00:46:05.000Z
imdbpy-master/tests/test_http_movie_taglines.py
camillesanchez/history-movie-index2
20f053700121f147b315645eed45c58f5014d2c0
[ "MIT" ]
null
null
null
def test_movie_taglines_if_single_should_be_a_list_of_phrases(ia): movie = ia.get_movie('0109151', info=['taglines']) # Matrix (V) taglines = movie.get('taglines', []) assert taglines == ["If humans don't want me... why'd they create me?"] def test_movie_taglines_if_multiple_should_be_a_list_of_phrases(i...
40.941176
75
0.708333
def test_movie_taglines_if_single_should_be_a_list_of_phrases(ia): movie = ia.get_movie('0109151', info=['taglines']) taglines = movie.get('taglines', []) assert taglines == ["If humans don't want me... why'd they create me?"] def test_movie_taglines_if_multiple_should_be_a_list_of_phrases(ia): movi...
true
true
f73c725d0cdd3666e8953a2d622f89e473ce65e4
1,166
py
Python
ms_deisotope/spectrum_graph.py
mstim/ms_deisotope
29f4f466e92e66b65a2d21eca714aa627caa21db
[ "Apache-2.0" ]
18
2017-09-01T12:26:12.000Z
2022-02-23T02:31:29.000Z
ms_deisotope/spectrum_graph.py
mstim/ms_deisotope
29f4f466e92e66b65a2d21eca714aa627caa21db
[ "Apache-2.0" ]
19
2017-03-12T20:40:36.000Z
2022-03-31T22:50:47.000Z
ms_deisotope/spectrum_graph.py
mstim/ms_deisotope
29f4f466e92e66b65a2d21eca714aa627caa21db
[ "Apache-2.0" ]
14
2016-05-06T02:25:30.000Z
2022-03-31T14:40:06.000Z
from ms_deisotope._c.spectrum_graph import ( PathFinder, MassWrapper, PeakGroupNode, PeakNode, NodeBase, Path, SpectrumGraph) amino_acids = [ MassWrapper('G', 57.02146372057), MassWrapper('A', 71.03711378471), MassWrapper('S', 87.03202840427), MassWrapper('P', 97.05276384884...
30.684211
74
0.680103
from ms_deisotope._c.spectrum_graph import ( PathFinder, MassWrapper, PeakGroupNode, PeakNode, NodeBase, Path, SpectrumGraph) amino_acids = [ MassWrapper('G', 57.02146372057), MassWrapper('A', 71.03711378471), MassWrapper('S', 87.03202840427), MassWrapper('P', 97.05276384884...
true
true
f73c7298dbef0d0c5846b5b2e1146796c27e6b14
519
py
Python
Src/StdLib/Lib/site-packages/win32comext/shell/demos/shellexecuteex.py
cwensley/ironpython2
f854444e1e08afc8850cb7c1a739a7dd2d10d32a
[ "Apache-2.0" ]
1,078
2016-07-19T02:48:30.000Z
2022-03-30T21:22:34.000Z
Src/StdLib/Lib/site-packages/win32comext/shell/demos/shellexecuteex.py
cwensley/ironpython2
f854444e1e08afc8850cb7c1a739a7dd2d10d32a
[ "Apache-2.0" ]
576
2017-05-21T12:36:48.000Z
2022-03-30T13:47:03.000Z
Src/StdLib/Lib/site-packages/win32comext/shell/demos/shellexecuteex.py
cwensley/ironpython2
f854444e1e08afc8850cb7c1a739a7dd2d10d32a
[ "Apache-2.0" ]
269
2017-05-21T04:44:47.000Z
2022-03-31T16:18:13.000Z
from win32com.shell import shell, shellcon import win32con def ExplorePIDL(): pidl = shell.SHGetSpecialFolderLocation(0, shellcon.CSIDL_DESKTOP) print "The desktop is at", shell.SHGetPathFromIDList(pidl) shell.ShellExecuteEx(fMask=shellcon.SEE_MASK_NOCLOSEPROCESS, nShow=win32con.SW...
32.4375
70
0.618497
from win32com.shell import shell, shellcon import win32con def ExplorePIDL(): pidl = shell.SHGetSpecialFolderLocation(0, shellcon.CSIDL_DESKTOP) print "The desktop is at", shell.SHGetPathFromIDList(pidl) shell.ShellExecuteEx(fMask=shellcon.SEE_MASK_NOCLOSEPROCESS, nShow=win32con.SW...
false
true
f73c73363c2d28a7a8085fccd409bb81966e8d51
892
py
Python
i3pystatus/updates/aptget.py
juliushaertl/i3pystatus
e2a0097316734b253af841b6cd6dbf01cc3e647c
[ "MIT" ]
null
null
null
i3pystatus/updates/aptget.py
juliushaertl/i3pystatus
e2a0097316734b253af841b6cd6dbf01cc3e647c
[ "MIT" ]
null
null
null
i3pystatus/updates/aptget.py
juliushaertl/i3pystatus
e2a0097316734b253af841b6cd6dbf01cc3e647c
[ "MIT" ]
null
null
null
import os from i3pystatus.core.command import run_through_shell from i3pystatus.updates import Backend class AptGet(Backend): """ Gets update count for Debian based distributions. This mimics the Arch Linux `checkupdates` script but with apt-get and written in python. """ @property def ...
27.030303
72
0.633408
import os from i3pystatus.core.command import run_through_shell from i3pystatus.updates import Backend class AptGet(Backend): @property def updates(self): cache_dir = "/tmp/update-cache-" + os.getenv("USER") if not os.path.exists(cache_dir): os.mkdir(cache_dir) command =...
true
true
f73c73d078a843fc4a35ff98f38b2d3b2a31285a
8,305
py
Python
a2ml/tasks_queue/tasks_api.py
gitter-badger/a2ml
1d9ef6657645b61c64090284ed8fadb1a68b932c
[ "Apache-2.0" ]
null
null
null
a2ml/tasks_queue/tasks_api.py
gitter-badger/a2ml
1d9ef6657645b61c64090284ed8fadb1a68b932c
[ "Apache-2.0" ]
null
null
null
a2ml/tasks_queue/tasks_api.py
gitter-badger/a2ml
1d9ef6657645b61c64090284ed8fadb1a68b932c
[ "Apache-2.0" ]
null
null
null
from .celery_app import celeryApp import logging import copy import os import json import jsonpickle from a2ml.api.utils.context import Context from a2ml.api.a2ml import A2ML from a2ml.api.a2ml_dataset import A2MLDataset from a2ml.api.a2ml_experiment import A2MLExperiment from a2ml.api.a2ml_model import A2MLModel from...
29.981949
94
0.681638
from .celery_app import celeryApp import logging import copy import os import json import jsonpickle from a2ml.api.utils.context import Context from a2ml.api.a2ml import A2ML from a2ml.api.a2ml_dataset import A2MLDataset from a2ml.api.a2ml_experiment import A2MLExperiment from a2ml.api.a2ml_model import A2MLModel from...
true
true
f73c75189ffae3013e9c04bbd3dce41c2d10c33e
263
py
Python
deliver/ia369/iareadurl.py
mariecpereira/Extracao-de-Caracteristicas-Corpo-Caloso
f094c706db815f91cf61d1d501c2a9030b9b54d3
[ "MIT" ]
7
2015-02-18T17:21:20.000Z
2016-10-04T19:14:16.000Z
deliver/ia369/iareadurl.py
mariecpereira/Extracao-de-Caracteristicas-Corpo-Caloso
f094c706db815f91cf61d1d501c2a9030b9b54d3
[ "MIT" ]
null
null
null
deliver/ia369/iareadurl.py
mariecpereira/Extracao-de-Caracteristicas-Corpo-Caloso
f094c706db815f91cf61d1d501c2a9030b9b54d3
[ "MIT" ]
20
2017-06-26T17:40:28.000Z
2021-09-15T13:47:19.000Z
# -*- encoding: utf-8 -*- # Module iareadurl def iareadurl(url): from StringIO import StringIO import urllib import PIL import adpil file = StringIO(urllib.urlopen(url).read()) img = PIL.Image.open(file) return adpil.pil2array(img)
18.785714
47
0.661597
def iareadurl(url): from StringIO import StringIO import urllib import PIL import adpil file = StringIO(urllib.urlopen(url).read()) img = PIL.Image.open(file) return adpil.pil2array(img)
true
true
f73c7584ac37c9c7667191eb3a7b8d3eab5bc8eb
6,528
py
Python
predict.py
DilipJainDj/Flower-Image-Classifier
ab7c47d176b12bae51ee33e427f3d95c57d07416
[ "MIT" ]
1
2020-05-23T11:09:09.000Z
2020-05-23T11:09:09.000Z
predict.py
DilipJainDj/Flower-Image-Classifier
ab7c47d176b12bae51ee33e427f3d95c57d07416
[ "MIT" ]
null
null
null
predict.py
DilipJainDj/Flower-Image-Classifier
ab7c47d176b12bae51ee33e427f3d95c57d07416
[ "MIT" ]
null
null
null
""" @author: Dilip Jain @title: Image Classifier training file """ import argparse import json import PIL import torch import numpy as np from math import ceil from train import check_gpu from torchvision import models # ------------------------------------------------------------------------------- # # Function Def...
34
161
0.613358
import argparse import json import PIL import torch import numpy as np from math import ceil from train import check_gpu from torchvision import models def arg_parser(): parser = argparse.ArgumentParser(description="Neural Network Settings") parser.add_argument('--image', type=str, help='Point t...
true
true
f73c75f5a3a22f57f8ba11dd5183981fb50a6ac7
995
py
Python
problems/CR/auto/problem380_CR.py
sunandita/ICAPS_Summer_School_RAE_2020
a496b62185bcfdd2c76eb7986ae99cfa85708d28
[ "BSD-3-Clause" ]
5
2020-10-15T14:40:03.000Z
2021-08-20T17:45:41.000Z
problems/CR/auto/problem380_CR.py
sunandita/ICAPS_Summer_School_RAE_2020
a496b62185bcfdd2c76eb7986ae99cfa85708d28
[ "BSD-3-Clause" ]
null
null
null
problems/CR/auto/problem380_CR.py
sunandita/ICAPS_Summer_School_RAE_2020
a496b62185bcfdd2c76eb7986ae99cfa85708d28
[ "BSD-3-Clause" ]
2
2020-10-15T07:06:14.000Z
2020-10-15T17:33:01.000Z
__author__ = 'patras' from domain_chargeableRobot import * from timer import DURATION from state import state DURATION.TIME = { 'put': 2, 'take': 2, 'perceive': 2, 'charge': 2, 'move': 2, 'moveToEmergency': 2, 'moveCharger': 2, 'addressEmergency': 2, 'wait': 2, } DURATION.COUNTER =...
19.509804
56
0.523618
__author__ = 'patras' from domain_chargeableRobot import * from timer import DURATION from state import state DURATION.TIME = { 'put': 2, 'take': 2, 'perceive': 2, 'charge': 2, 'move': 2, 'moveToEmergency': 2, 'moveCharger': 2, 'addressEmergency': 2, 'wait': 2, } DURATION.COUNTER =...
true
true
f73c77c4bf18eec76e0cb3c91065da3c33bb40a0
4,231
py
Python
library/inky/eeprom.py
fsargent/inky
54684464b2f35bfd52208cdfb922c09685644181
[ "MIT" ]
1
2021-07-21T16:38:38.000Z
2021-07-21T16:38:38.000Z
library/inky/eeprom.py
fsargent/inky
54684464b2f35bfd52208cdfb922c09685644181
[ "MIT" ]
null
null
null
library/inky/eeprom.py
fsargent/inky
54684464b2f35bfd52208cdfb922c09685644181
[ "MIT" ]
1
2021-12-11T18:37:13.000Z
2021-12-11T18:37:13.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Inky display-type EEPROM tools.""" import datetime import struct EEP_ADDRESS = 0x50 EEP_WP = 12 DISPLAY_VARIANT = [ None, 'Red pHAT (High-Temp)', 'Yellow wHAT', 'Black wHAT', 'Black pHAT', 'Yellow pHAT', 'Red wHAT', 'Red wHAT (High-T...
29.17931
115
0.601513
import datetime import struct EEP_ADDRESS = 0x50 EEP_WP = 12 DISPLAY_VARIANT = [ None, 'Red pHAT (High-Temp)', 'Yellow wHAT', 'Black wHAT', 'Black pHAT', 'Yellow pHAT', 'Red wHAT', 'Red wHAT (High-Temp)', 'Red wHAT', None, 'Black pHAT (SSD1608)', 'Red pHAT (SSD1608...
true
true
f73c78beccf0f6e7740d9c8958e84123b0179fe5
596
py
Python
pattern/tests/tc6.py
ocirne/puzzle-solver
17b4bbb1be267d60977b7baae1b0ec8265ad7576
[ "Unlicense" ]
null
null
null
pattern/tests/tc6.py
ocirne/puzzle-solver
17b4bbb1be267d60977b7baae1b0ec8265ad7576
[ "Unlicense" ]
null
null
null
pattern/tests/tc6.py
ocirne/puzzle-solver
17b4bbb1be267d60977b7baae1b0ec8265ad7576
[ "Unlicense" ]
null
null
null
class TestCase(object): M = 10 rows = [ (3,2), (1,1,3), (1,4), (2,), (3,), (1,3), (4,), (8,), (8,), (6,), ] cols = [ (3,), (3,3), (1,1,3), (2,3), (3,), (3,), (1,3...
13.860465
23
0.199664
class TestCase(object): M = 10 rows = [ (3,2), (1,1,3), (1,4), (2,), (3,), (1,3), (4,), (8,), (8,), (6,), ] cols = [ (3,), (3,3), (1,1,3), (2,3), (3,), (3,), (1,3...
true
true
f73c7b2a1eb0c6ac220d81bcf41e82aee1c33b8f
936
py
Python
human_evaluation/computer.py
Guaguago/PPLM
c03b184803c3d57851016c788b41f54153547cc4
[ "Apache-2.0" ]
null
null
null
human_evaluation/computer.py
Guaguago/PPLM
c03b184803c3d57851016c788b41f54153547cc4
[ "Apache-2.0" ]
null
null
null
human_evaluation/computer.py
Guaguago/PPLM
c03b184803c3d57851016c788b41f54153547cc4
[ "Apache-2.0" ]
null
null
null
from run_pplm import run_pplm_example if __name__ == '__main__': prefix = ['The orange', 'The spider man', 'my father'] for p in prefix: with open('demos/computer', 'a') as file: file.write( '===================================================================================...
34.666667
173
0.372863
from run_pplm import run_pplm_example if __name__ == '__main__': prefix = ['The orange', 'The spider man', 'my father'] for p in prefix: with open('demos/computer', 'a') as file: file.write( '===================================================================================...
true
true
f73c7b56b51b4c3ca1667432fe6a75ca5922402c
552
py
Python
attendance/migrations/0002_auto_20200419_1255.py
AhteshamSid/College_school_management_system
a8504708ea2f347d18d4ac59198f29d05c0374d2
[ "MIT" ]
null
null
null
attendance/migrations/0002_auto_20200419_1255.py
AhteshamSid/College_school_management_system
a8504708ea2f347d18d4ac59198f29d05c0374d2
[ "MIT" ]
null
null
null
attendance/migrations/0002_auto_20200419_1255.py
AhteshamSid/College_school_management_system
a8504708ea2f347d18d4ac59198f29d05c0374d2
[ "MIT" ]
null
null
null
# Generated by Django 3.0.3 on 2020-04-19 12:55 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('student', '0012_auto_20200419_1255'), ('attendance', '0001_initial'), ] operations = [ ...
26.285714
112
0.623188
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('student', '0012_auto_20200419_1255'), ('attendance', '0001_initial'), ] operations = [ migrations.AlterField( model_name...
true
true
f73c7b644d4faef4d0a37680525e5d728c4ad3d3
4,651
py
Python
tests/v2/test_delete_business.py
miritih/WeConnect
c839f8504f8f2c922b0828c1ada2863fbaa15ee1
[ "MIT" ]
null
null
null
tests/v2/test_delete_business.py
miritih/WeConnect
c839f8504f8f2c922b0828c1ada2863fbaa15ee1
[ "MIT" ]
4
2018-02-28T15:17:26.000Z
2018-05-20T06:59:31.000Z
tests/v2/test_delete_business.py
miritih/WeConnect
c839f8504f8f2c922b0828c1ada2863fbaa15ee1
[ "MIT" ]
1
2018-03-08T17:50:30.000Z
2018-03-08T17:50:30.000Z
import unittest import json from app import create_app from app.models.v2 import Business class DeleteBusinessTestCase(unittest.TestCase): """This class represents the api test case""" def setUp(self): """ Will be called before every test """ self.app = create_app('testing') ...
32.985816
73
0.517523
import unittest import json from app import create_app from app.models.v2 import Business class DeleteBusinessTestCase(unittest.TestCase): def setUp(self): self.app = create_app('testing') self.app.app_context().push() self.client = self.app.test_client self.user = { "...
true
true
f73c7bbc273be583cd008a58512d9af43393a5b6
4,790
py
Python
scenesim/display/geometry.py
pbattaglia/scenesim
2633c63bc5cb97ea99017b2e25fc9b4f66d72605
[ "MIT" ]
9
2015-03-10T16:00:51.000Z
2020-10-14T17:18:25.000Z
scenesim/display/geometry.py
jhamrick/scenesim
6ff41c1428a32c078104332431906f4faa0990db
[ "MIT" ]
1
2015-02-13T01:39:46.000Z
2015-04-28T02:54:50.000Z
scenesim/display/geometry.py
jhamrick/scenesim
6ff41c1428a32c078104332431906f4faa0990db
[ "MIT" ]
null
null
null
""" ``scenesim.display.geometry`` ============================= Functions for manipulating graphics geometry. """ import numpy as np def zbuffer_to_z(zb, near, far): """Inputs Z-buffer image and returns each pixel's distance from the camera along the Z-axis. Args: zb (numpy.ndarray, 2D): Z-buffe...
29.030303
85
0.607724
import numpy as np def zbuffer_to_z(zb, near, far): z = far * near / (far - zb * (far - near)) return z def img_to_d(xi, yi, zb, near, far): z = zbuffer_to_z(zb, near, far) phi = np.arctan2(np.sqrt(xi ** 2 + yi ** 2), near) d = z / np.cos(phi) return d def img_to_xyz(xi, yi, zb, near, far)...
true
true
f73c7bd9924bbcc84301f73cd0e72ec6d43c1c68
2,811
py
Python
face_web/face_service/service.py
Face-Recognition-Learning-Group/face_service
c23a8519cbf0f0f6297d7b43a5db8077438c58dd
[ "Apache-2.0" ]
6
2021-05-19T06:48:35.000Z
2021-11-09T11:52:11.000Z
face_web/face_service/service.py
VSOURCE-Platform/VSOURCE_FACE_PLATFORM
c23a8519cbf0f0f6297d7b43a5db8077438c58dd
[ "Apache-2.0" ]
1
2021-05-09T08:29:39.000Z
2021-05-09T08:29:39.000Z
face_web/face_service/service.py
VSOURCE-Platform/VSOURCE_FACE_PLATFORM
c23a8519cbf0f0f6297d7b43a5db8077438c58dd
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # @Author : Ecohnoch(xcy) # @File : service.py # @Function : TODO import copy import flask_login from app import app, db import configs def get_data_from_page_limit(page, limit): all_requests = db[configs.app_database_request_table].find() results = db[configs.app_database_table...
41.955224
112
0.588047
import copy import flask_login from app import app, db import configs def get_data_from_page_limit(page, limit): all_requests = db[configs.app_database_request_table].find() results = db[configs.app_database_table].find() ans_data = [] for each_request in all_requests: _message = {} ...
true
true