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
1c0ef7fb9b39c67ee88388d3eed8af31768e4685
248
py
Python
examples/plaintext_client.py
datalogics/flask-oauthprovider
10aedbf27c1f3bee845a958057588de2ccf4bf85
[ "BSD-3-Clause" ]
1
2015-12-05T22:04:01.000Z
2015-12-05T22:04:01.000Z
examples/plaintext_client.py
ryepdx/flask-oauthprovider
cf7e7779071b45cb5c2f8610349d550548410f31
[ "BSD-3-Clause" ]
1
2021-08-04T12:55:20.000Z
2021-08-04T12:55:20.000Z
examples/plaintext_client.py
ryepdx/flask-oauthprovider
cf7e7779071b45cb5c2f8610349d550548410f31
[ "BSD-3-Clause" ]
1
2021-08-04T12:54:06.000Z
2021-08-04T12:54:06.000Z
from client import app app.config["OAUTH_CREDENTIALS"] = { u"client_secret": u"WgzyivpCPl7WuaxuSBoCCPv5UP9iBV", u"signature_method": u"PLAINTEXT" } app.config["CLIENT_KEY"] = u"06NvHxcvImyIBiXPFsQA6GWJXjC8UU" app.run(debug=True, port=5001)
31
60
0.766129
from client import app app.config["OAUTH_CREDENTIALS"] = { u"client_secret": u"WgzyivpCPl7WuaxuSBoCCPv5UP9iBV", u"signature_method": u"PLAINTEXT" } app.config["CLIENT_KEY"] = u"06NvHxcvImyIBiXPFsQA6GWJXjC8UU" app.run(debug=True, port=5001)
true
true
1c0ef87a26f6c85bb16b79b6ced5637164ba85d9
1,141
py
Python
xlsxwriter/test/comparison/test_page_breaks02.py
timgates42/XlsxWriter
129044ed821de67895b4562c6b71f90eba5be6b4
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
xlsxwriter/test/comparison/test_page_breaks02.py
timgates42/XlsxWriter
129044ed821de67895b4562c6b71f90eba5be6b4
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
xlsxwriter/test/comparison/test_page_breaks02.py
timgates42/XlsxWriter
129044ed821de67895b4562c6b71f90eba5be6b4
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2020, John McNamara, jmcnamara@cpan.org # from ..excel_comparsion_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTest): """...
27.829268
91
0.594216
from ..excel_comparsion_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTest): def setUp(self): self.set_filename('page_breaks02.xlsx') self.ignore_files = ['xl/printerSettings/printerSettings1.bin', 'xl/wo...
true
true
1c0ef8808a8cf94e873c35150e8f2636de24526f
4,996
py
Python
salt/modules/dnsmasq.py
preoctopus/salt
aceaaa0e2f2f2ff29a694393bd82bba0d88fa44d
[ "Apache-2.0" ]
1
2020-10-20T03:35:34.000Z
2020-10-20T03:35:34.000Z
salt/modules/dnsmasq.py
preoctopus/salt
aceaaa0e2f2f2ff29a694393bd82bba0d88fa44d
[ "Apache-2.0" ]
1
2020-10-21T21:38:49.000Z
2020-10-21T21:38:49.000Z
salt/modules/dnsmasq.py
preoctopus/salt
aceaaa0e2f2f2ff29a694393bd82bba0d88fa44d
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' Module for managing dnsmasq ''' from __future__ import absolute_import # Import salt libs import salt.utils # Import python libs import os import logging log = logging.getLogger(__name__) def __virtual__(): ''' Only work on POSIX-like systems. ''' if salt.utils.is_window...
31.031056
103
0.558046
from __future__ import absolute_import import salt.utils import os import logging log = logging.getLogger(__name__) def __virtual__(): if salt.utils.is_windows(): return (False, 'dnsmasq execution module cannot be loaded: only works on non-Windows systems.') return True def version(): cmd = '...
true
true
1c0ef8db89d67d3aad8834feddd6245d50e699df
9,988
py
Python
DQMOffline/EGamma/python/electronDataDiscovery.py
nistefan/cmssw
ea13af97f7f2117a4f590a5e654e06ecd9825a5b
[ "Apache-2.0" ]
null
null
null
DQMOffline/EGamma/python/electronDataDiscovery.py
nistefan/cmssw
ea13af97f7f2117a4f590a5e654e06ecd9825a5b
[ "Apache-2.0" ]
null
null
null
DQMOffline/EGamma/python/electronDataDiscovery.py
nistefan/cmssw
ea13af97f7f2117a4f590a5e654e06ecd9825a5b
[ "Apache-2.0" ]
null
null
null
#=================================================================== # So to get the list of input files. One must call : # search(), to get the list of primary files # search2(), to get the list of eventual secondary files # # The selection of files is configured thanks to shell # environment variables: # # ...
36.452555
131
0.587405
import os, sys, re, das_client if 'DD_SOURCE' not in os.environ: os.environ['DD_SOURCE'] = 'das' if 'DD_RELEASE' not in os.environ: os.environ['DD_RELEASE'] = '' if 'DD_SAMPLE' not in os.environ: os.environ['DD_SAMPLE'] = '' if 'DD_COND' not in os.environ: os.environ['DD_COND'] = '' if 'DD_TIER' not in os.en...
false
true
1c0ef94f179354bf7b5a0babda0b9b52294120db
7,964
py
Python
docs/conf.py
hjwp/pytest_django
e6fbb0351fee80aa4b562687434c96601c4c2e25
[ "BSD-3-Clause" ]
1
2019-05-17T07:37:33.000Z
2019-05-17T07:37:33.000Z
docs/conf.py
hjwp/pytest_django
e6fbb0351fee80aa4b562687434c96601c4c2e25
[ "BSD-3-Clause" ]
null
null
null
docs/conf.py
hjwp/pytest_django
e6fbb0351fee80aa4b562687434c96601c4c2e25
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # pytest-django documentation build configuration file, created by # sphinx-quickstart on Tue May 1 10:12:50 2012. # # 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. #...
32.373984
80
0.716349
import sys, os extensions = ['sphinx.ext.doctest'] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'pytest-django' copyright = u'2012, Andreas Pelme' # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version...
true
true
1c0efa0fc1b85979cc682b9c7c77ce7d3f139e5d
5,414
py
Python
pirates/leveleditor/worldData/CaveAIsland.py
Willy5s/Pirates-Online-Rewritten
7434cf98d9b7c837d57c181e5dabd02ddf98acb7
[ "BSD-3-Clause" ]
81
2018-04-08T18:14:24.000Z
2022-01-11T07:22:15.000Z
pirates/leveleditor/worldData/CaveAIsland.py
Willy5s/Pirates-Online-Rewritten
7434cf98d9b7c837d57c181e5dabd02ddf98acb7
[ "BSD-3-Clause" ]
4
2018-09-13T20:41:22.000Z
2022-01-08T06:57:00.000Z
pirates/leveleditor/worldData/CaveAIsland.py
Willy5s/Pirates-Online-Rewritten
7434cf98d9b7c837d57c181e5dabd02ddf98acb7
[ "BSD-3-Clause" ]
26
2018-05-26T12:49:27.000Z
2021-09-11T09:11:59.000Z
from pandac.PandaModules import Point3, VBase3 objectStruct = {'Locator Links': [['1172185231.81sdnaik', '1172184979.25sdnaik', 'Bi-directional'], ['1172185231.81sdnaik0', '1172185213.67sdnaik', 'Bi-directional']],'Objects': {'1172100047.36sdnaik': {'Type': 'Island','Name': 'CaveAIsland','Objects': {'1172184979.25sdnai...
2,707
5,367
0.666236
from pandac.PandaModules import Point3, VBase3 objectStruct = {'Locator Links': [['1172185231.81sdnaik', '1172184979.25sdnaik', 'Bi-directional'], ['1172185231.81sdnaik0', '1172185213.67sdnaik', 'Bi-directional']],'Objects': {'1172100047.36sdnaik': {'Type': 'Island','Name': 'CaveAIsland','Objects': {'1172184979.25sdnai...
true
true
1c0efaaf49613ce6b68ed186f3eb28724c860c23
2,563
py
Python
Deep Learning using Tensorflow Keras/Churn-Model-using-ANN/ANN - Churn Modelling.py
Storiesbyharshit/Deep-Learning
2464e3354c8c2c99237d76b47264d509cc1a7cef
[ "MIT" ]
16
2020-07-07T11:16:21.000Z
2022-03-18T08:53:49.000Z
Deep Learning using Tensorflow Keras/Churn-Model-using-ANN/ANN - Churn Modelling.py
Storiesbyharshit/Deep-Learning
2464e3354c8c2c99237d76b47264d509cc1a7cef
[ "MIT" ]
9
2020-11-13T19:02:31.000Z
2022-02-10T02:27:10.000Z
Deep Learning using Tensorflow Keras/Churn-Model-using-ANN/ANN - Churn Modelling.py
Storiesbyharshit/Deep-Learning
2464e3354c8c2c99237d76b47264d509cc1a7cef
[ "MIT" ]
10
2020-07-07T09:39:01.000Z
2021-04-30T04:22:30.000Z
# Importing the libraries import numpy as np import matplotlib.pyplot as plt import pandas as pd import warnings warnings.filterwarnings('ignore') warnings.filterwarnings("ignore", category=DeprecationWarning) # Importing the datasetm dataset = pd.read_csv(r'C:\Users\IDEAPAD 320\Desktop\dataset...
16.861842
100
0.702692
import numpy as np import matplotlib.pyplot as plt import pandas as pd import warnings warnings.filterwarnings('ignore') warnings.filterwarnings("ignore", category=DeprecationWarning) dataset = pd.read_csv(r'C:\Users\IDEAPAD 320\Desktop\datasets\Churn_Modelling.csv') X = dataset.iloc[:, 3:13].val...
true
true
1c0efafd14d4e2acfd156c9a4719bda776586c9a
44,275
py
Python
qa/rpc-tests/p2p-compactblocks.py
Bitcoin-OLD/Bitcoin-OLD
16627f390aa418a99103843f9d94c48931fad826
[ "MIT" ]
null
null
null
qa/rpc-tests/p2p-compactblocks.py
Bitcoin-OLD/Bitcoin-OLD
16627f390aa418a99103843f9d94c48931fad826
[ "MIT" ]
null
null
null
qa/rpc-tests/p2p-compactblocks.py
Bitcoin-OLD/Bitcoin-OLD
16627f390aa418a99103843f9d94c48931fad826
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2016 The Bitcoinold Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.mininode import * from test_framework.test_framework import BitcoinoldTestFramework fro...
45.550412
124
0.666403
from test_framework.mininode import * from test_framework.test_framework import BitcoinoldTestFramework from test_framework.util import * from test_framework.blocktools import create_block, create_coinbase, add_witness_commitment from test_framework.siphash import siphash256 from test_framework.script import CScript, ...
true
true
1c0efbb5cc8e5315b1f479d5fae5fada261aa1eb
3,998
py
Python
modules/organisation_evaluation.py
jquku/Matrix-Chatbot
762b0ee3af0779284b144f5642f0c0877ed5ffcb
[ "MIT" ]
1
2021-10-02T08:21:34.000Z
2021-10-02T08:21:34.000Z
modules/organisation_evaluation.py
jquku/Matrix-Chatbot
762b0ee3af0779284b144f5642f0c0877ed5ffcb
[ "MIT" ]
null
null
null
modules/organisation_evaluation.py
jquku/Matrix-Chatbot
762b0ee3af0779284b144f5642f0c0877ed5ffcb
[ "MIT" ]
null
null
null
import sys sys.path.append("./../") from services.database_service import add_organisation_entry, get_domain_description_id from nlp import language_processing ''' analyze simple text documents and store rules into data basis of db text document consists of topic + response ''' def add_organisation_document(): ...
42.989247
117
0.655078
import sys sys.path.append("./../") from services.database_service import add_organisation_entry, get_domain_description_id from nlp import language_processing def add_organisation_document(): module = "<module name>" module = module.lower() document_name = "../knowledge_domains/organisation.txt" ...
true
true
1c0efbcce947f1b71d31fcef247f22c094c7db95
7,378
py
Python
aif360/datasets/standard_dataset.py
mariaborbones/AIF360
05b3d155aa89a1b173ac3f1ec42110a899710cf8
[ "Apache-2.0" ]
null
null
null
aif360/datasets/standard_dataset.py
mariaborbones/AIF360
05b3d155aa89a1b173ac3f1ec42110a899710cf8
[ "Apache-2.0" ]
null
null
null
aif360/datasets/standard_dataset.py
mariaborbones/AIF360
05b3d155aa89a1b173ac3f1ec42110a899710cf8
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from logging import warn import numpy as np import pandas as pd from aif360.datasets import BinaryLabelDataset class StandardDataset(BinaryLabelDataset): """Base ...
47.294872
88
0.640417
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from logging import warn import numpy as np import pandas as pd from aif360.datasets import BinaryLabelDataset class StandardDataset(BinaryLabelDataset): def __i...
true
true
1c0efc73915ff33432707082d14f1991f2e12072
4,080
py
Python
qiime2/core/testing/method.py
lizgehret/qiime2
3906f67c70a1321e99e7fc59e79550c2432a8cee
[ "BSD-3-Clause" ]
null
null
null
qiime2/core/testing/method.py
lizgehret/qiime2
3906f67c70a1321e99e7fc59e79550c2432a8cee
[ "BSD-3-Clause" ]
null
null
null
qiime2/core/testing/method.py
lizgehret/qiime2
3906f67c70a1321e99e7fc59e79550c2432a8cee
[ "BSD-3-Clause" ]
null
null
null
# ---------------------------------------------------------------------------- # Copyright (c) 2016-2022, QIIME 2 development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
30
78
0.609804
import qiime2 def concatenate_ints(ints1: list, ints2: list, ints3: list, int1: int, int2: int) -> list: return ints1 + ints2 + ints3 + [int1] + [int2] def split_ints(ints: list) -> (list, list): middle = int(len(ints) / 2) left = ints[:middle] right = ints[middle:] return ...
true
true
1c0efd3c2a5f82f3c5591aab2b14695d94b27a68
926
py
Python
Week 7/id_510/bit/Leetcode_191_510.py
larryRishi/algorithm004-05
e60d0b1176acd32a9184b215e36d4122ba0b6263
[ "Apache-2.0" ]
1
2019-10-12T06:48:45.000Z
2019-10-12T06:48:45.000Z
Week 7/id_510/bit/Leetcode_191_510.py
larryRishi/algorithm004-05
e60d0b1176acd32a9184b215e36d4122ba0b6263
[ "Apache-2.0" ]
1
2019-12-01T10:02:03.000Z
2019-12-01T10:02:03.000Z
Week 7/id_510/bit/Leetcode_191_510.py
larryRishi/algorithm004-05
e60d0b1176acd32a9184b215e36d4122ba0b6263
[ "Apache-2.0" ]
null
null
null
""" 编写一个函数,输入是一个无符号整数,返回其二进制表达式中数字位数为 ‘1’ 的个数(也被称为汉明重量)。   示例 1: 输入:00000000000000000000000000001011 输出:3 解释:输入的二进制串 00000000000000000000000000001011 中,共有三位为 '1'。 示例 2: 输入:00000000000000000000000010000000 输出:1 解释:输入的二进制串 00000000000000000000000010000000 中,共有一位为 '1'。 示例 3: 输入:11111111111111111111111111111101 输出:31 ...
19.702128
101
0.718143
from typing import List class Solution: def hammingWeight(self, n: int) -> int: ans, MASK = 0, 1 for i in range(32): if n & MASK: ans += 1 MASK <<= 1 return ans print(Solution().hammingWeight(3))
true
true
1c0efd899b19ac6b4c58d36ae13cbb85e0fdcc87
10,282
py
Python
ner_s2s/ner_estimator/algorithms/model.py
shfshf/ner_s2s
a04311310bddf396b551969fd1e63fdb3fc2ca0b
[ "Apache-2.0" ]
2
2020-08-26T06:52:46.000Z
2021-04-26T12:09:58.000Z
ner_s2s/ner_estimator/algorithms/model.py
shfshf/ner_s2s
a04311310bddf396b551969fd1e63fdb3fc2ca0b
[ "Apache-2.0" ]
6
2020-09-26T00:33:08.000Z
2022-02-10T00:34:52.000Z
ner_s2s/ner_estimator/algorithms/model.py
shfshf/ner_s2s
a04311310bddf396b551969fd1e63fdb3fc2ca0b
[ "Apache-2.0" ]
2
2020-04-20T14:44:26.000Z
2020-08-26T06:52:45.000Z
from pathlib import Path import tensorflow as tf import numpy as np from ner_s2s.metrics import precision, recall, f1, correct_rate class Model(object): @classmethod def default_params(cls): return {} @classmethod def get_model_name(cls): return cls.__name__ @classmethod def...
35.212329
123
0.606886
from pathlib import Path import tensorflow as tf import numpy as np from ner_s2s.metrics import precision, recall, f1, correct_rate class Model(object): @classmethod def default_params(cls): return {} @classmethod def get_model_name(cls): return cls.__name__ @classmethod def...
true
true
1c0efe8777dfb85d4346e1f0b2f75afcab6995d2
199,111
py
Python
leetcode/medium/Gas_Station.py
shhuan/algorithms
2830c7e2ada8dfd3dcdda7c06846116d4f944a27
[ "MIT" ]
null
null
null
leetcode/medium/Gas_Station.py
shhuan/algorithms
2830c7e2ada8dfd3dcdda7c06846116d4f944a27
[ "MIT" ]
null
null
null
leetcode/medium/Gas_Station.py
shhuan/algorithms
2830c7e2ada8dfd3dcdda7c06846116d4f944a27
[ "MIT" ]
1
2022-03-09T04:52:55.000Z
2022-03-09T04:52:55.000Z
# -*- coding: utf-8 -*- """ created by huash06 at 2015-04-14 10:18 There are N gas stations along a circular route, where the amount of gas at station i is gas[i]. You have a car with an unlimited gas tank and it costs cost[i] of gas to travel from station i to its next station (i+1). You begin the journey with an e...
1,442.833333
97,822
0.789791
__author__ = 'huash06' import sys import os class Solution: def canCompleteCircuit(self, gas, cost): if not gas: return False r = 0 for si in range(len(gas)): r = gas[si] complete = True for st in range(len(gas)): ...
true
true
1c0eff00d552431158f068aa2a8955f705aede1e
2,700
py
Python
test/torchaudio_unittest/transforms/kaldi_compatibility_impl.py
jhurt/audio
16de2b5b791bacfa8fb65b6fec3062d2e71fd725
[ "BSD-2-Clause" ]
null
null
null
test/torchaudio_unittest/transforms/kaldi_compatibility_impl.py
jhurt/audio
16de2b5b791bacfa8fb65b6fec3062d2e71fd725
[ "BSD-2-Clause" ]
null
null
null
test/torchaudio_unittest/transforms/kaldi_compatibility_impl.py
jhurt/audio
16de2b5b791bacfa8fb65b6fec3062d2e71fd725
[ "BSD-2-Clause" ]
null
null
null
"""Test suites for checking numerical compatibility against Kaldi""" import torchaudio.compliance.kaldi from parameterized import parameterized from torchaudio_unittest.common_utils import ( TestBaseMixin, TempDirMixin, load_params, skipIfNoExec, get_asset_path, load_wav, ) from torchaudio_unit...
48.214286
99
0.707407
import torchaudio.compliance.kaldi from parameterized import parameterized from torchaudio_unittest.common_utils import ( TestBaseMixin, TempDirMixin, load_params, skipIfNoExec, get_asset_path, load_wav, ) from torchaudio_unittest.common_utils.kaldi_utils import ( convert_args, run_kald...
true
true
1c0effbb82847fe6525611a1d14e888b05d00b57
1,072
py
Python
calculator/calculations.py
vyahello/terminal-calculator
4eab9065e70235bff6a6e67b7019c15d1a6dfe29
[ "MIT" ]
null
null
null
calculator/calculations.py
vyahello/terminal-calculator
4eab9065e70235bff6a6e67b7019c15d1a6dfe29
[ "MIT" ]
null
null
null
calculator/calculations.py
vyahello/terminal-calculator
4eab9065e70235bff6a6e67b7019c15d1a6dfe29
[ "MIT" ]
null
null
null
from abc import ABC, abstractmethod from argparse import Namespace from typing import Callable, List from calculator.calculators import BasicCalculator, Calculator class Calculation(ABC): """Represent abstraction of calculation.""" @abstractmethod def start(self) -> None: pass class BasicCalcul...
34.580645
109
0.698694
from abc import ABC, abstractmethod from argparse import Namespace from typing import Callable, List from calculator.calculators import BasicCalculator, Calculator class Calculation(ABC): @abstractmethod def start(self) -> None: pass class BasicCalculation(Calculation): def __init__(self, oper...
true
true
1c0f00ce9e681ed6bafdf3a767936a5ad0e13af9
531
py
Python
variable_and_data_type/boolean_demo/some_values_are_false.py
pysga1996/python-basic-programming
5fe817986fbef2649b4b03955f07b59d2a2035d8
[ "MIT" ]
null
null
null
variable_and_data_type/boolean_demo/some_values_are_false.py
pysga1996/python-basic-programming
5fe817986fbef2649b4b03955f07b59d2a2035d8
[ "MIT" ]
null
null
null
variable_and_data_type/boolean_demo/some_values_are_false.py
pysga1996/python-basic-programming
5fe817986fbef2649b4b03955f07b59d2a2035d8
[ "MIT" ]
null
null
null
# In fact, there are not many values that evaluates to False, except empty values, such as (), [], {}, "", # the number 0, and the value None. And of course the value False evaluates to False. bool(False) bool(None) bool(0) bool("") bool(()) bool([]) bool({}) # One more value, or object in this case, evaluates to Fal...
25.285714
112
0.687382
bool(False) bool(None) bool(0) bool("") bool(()) bool([]) bool({}) class MyClass: def __len__(self): return 0 myObj = MyClass() print(bool(myObj))
true
true
1c0f024a66419b695029830789d701a52bafdbdf
17,461
py
Python
sis_provisioner/migrations/0001_initial.py
uw-it-aca/canvas-sis-provisioner
28f54ce101704a8feaaea1e514618aba5a330a25
[ "Apache-2.0" ]
null
null
null
sis_provisioner/migrations/0001_initial.py
uw-it-aca/canvas-sis-provisioner
28f54ce101704a8feaaea1e514618aba5a330a25
[ "Apache-2.0" ]
451
2016-10-25T22:08:19.000Z
2022-03-23T20:27:52.000Z
sis_provisioner/migrations/0001_initial.py
uw-it-aca/canvas-sis-provisioner
28f54ce101704a8feaaea1e514618aba5a330a25
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Course', fields=[ ...
47.319783
270
0.537254
from __future__ import unicode_literals from django.db import models, migrations import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Course', fields=[ ('id', models.AutoFi...
true
true
1c0f02c1f77206f630d7b08b7026144d44dea1ed
849
py
Python
venv/lib/python3.7/site-packages/allauth/socialaccount/providers/instagram/tests.py
vikram0207/django-rest
eafec575999dce6859dc7b99177cff339b2bcbdd
[ "MIT" ]
12
2019-08-02T07:58:16.000Z
2022-01-31T23:45:08.000Z
venv/lib/python3.7/site-packages/allauth/socialaccount/providers/instagram/tests.py
vikram0207/django-rest
eafec575999dce6859dc7b99177cff339b2bcbdd
[ "MIT" ]
23
2019-01-19T08:54:48.000Z
2022-03-11T23:39:37.000Z
venv/lib/python3.7/site-packages/allauth/socialaccount/providers/instagram/tests.py
vikram0207/django-rest
eafec575999dce6859dc7b99177cff339b2bcbdd
[ "MIT" ]
17
2020-03-03T08:42:17.000Z
2020-10-03T16:08:49.000Z
from allauth.socialaccount.tests import OAuth2TestsMixin from allauth.tests import MockedResponse, TestCase from .provider import InstagramProvider class InstagramTests(OAuth2TestsMixin, TestCase): provider_id = InstagramProvider.id def get_mocked_response(self): return MockedResponse(200, """ ...
27.387097
91
0.532391
from allauth.socialaccount.tests import OAuth2TestsMixin from allauth.tests import MockedResponse, TestCase from .provider import InstagramProvider class InstagramTests(OAuth2TestsMixin, TestCase): provider_id = InstagramProvider.id def get_mocked_response(self): return MockedResponse(200, """ ...
true
true
1c0f03022bb731200515c8dd519e3e902b99b5a6
5,364
py
Python
src/iOS/toga_iOS/widgets/scrollcontainer.py
luizoti/toga
3c49e685f325f1aba2ce048b253402d7e4519f97
[ "BSD-3-Clause" ]
1,261
2019-03-31T16:28:47.000Z
2022-03-31T09:01:23.000Z
src/iOS/toga_iOS/widgets/scrollcontainer.py
luizoti/toga
3c49e685f325f1aba2ce048b253402d7e4519f97
[ "BSD-3-Clause" ]
597
2019-04-02T20:02:42.000Z
2022-03-30T10:28:47.000Z
src/iOS/toga_iOS/widgets/scrollcontainer.py
luizoti/toga
3c49e685f325f1aba2ce048b253402d7e4519f97
[ "BSD-3-Clause" ]
318
2019-03-31T18:32:00.000Z
2022-03-30T18:07:13.000Z
from rubicon.objc import CGSizeMake from toga_iOS.libs import ( NSLayoutAttributeBottom, NSLayoutAttributeLeading, NSLayoutAttributeTop, NSLayoutAttributeTrailing, NSLayoutConstraint, NSLayoutRelationEqual, UIColor, UIScrollView ) from toga_iOS.widgets.base import Widget from toga_iOS.w...
33.735849
108
0.628635
from rubicon.objc import CGSizeMake from toga_iOS.libs import ( NSLayoutAttributeBottom, NSLayoutAttributeLeading, NSLayoutAttributeTop, NSLayoutAttributeTrailing, NSLayoutConstraint, NSLayoutRelationEqual, UIColor, UIScrollView ) from toga_iOS.widgets.base import Widget from toga_iOS.w...
true
true
1c0f031b979c5e1251057b1cd3fc6f591062c633
691
py
Python
molsysmt/item/mdtraj_Trajectory/to_parmed_Structure.py
uibcdf/MolModMTs
4f6b6f671a9fa3e73008d1e9c48686d5f20a6573
[ "MIT" ]
null
null
null
molsysmt/item/mdtraj_Trajectory/to_parmed_Structure.py
uibcdf/MolModMTs
4f6b6f671a9fa3e73008d1e9c48686d5f20a6573
[ "MIT" ]
null
null
null
molsysmt/item/mdtraj_Trajectory/to_parmed_Structure.py
uibcdf/MolModMTs
4f6b6f671a9fa3e73008d1e9c48686d5f20a6573
[ "MIT" ]
null
null
null
from molsysmt._private.digestion import digest_item, digest_atom_indices, digest_structure_indices def to_parmed_Structure(item, atom_indices='all', structure_indices='all', check=True): if check: digest_item(item, 'mdtraj.Trajectory') atom_indices = digest_atom_indices(atom_indices) stru...
36.368421
98
0.794501
from molsysmt._private.digestion import digest_item, digest_atom_indices, digest_structure_indices def to_parmed_Structure(item, atom_indices='all', structure_indices='all', check=True): if check: digest_item(item, 'mdtraj.Trajectory') atom_indices = digest_atom_indices(atom_indices) stru...
true
true
1c0f03f4f75b0480e777c2c470906df7c8cdb48f
685
py
Python
test/lint/lint-submodule.py
qogecoin/qogecoin
fce42076f1a2746525374f50f35939392f37ca84
[ "MIT" ]
9
2021-10-30T01:01:50.000Z
2022-02-10T02:20:44.000Z
test/lint/lint-submodule.py
qogecoin/qogecoin
fce42076f1a2746525374f50f35939392f37ca84
[ "MIT" ]
4
2021-10-17T19:59:16.000Z
2021-11-04T19:11:25.000Z
test/lint/lint-submodule.py
qogecoin/qogecoin
fce42076f1a2746525374f50f35939392f37ca84
[ "MIT" ]
7
2021-11-01T09:09:41.000Z
2022-03-23T02:47:30.000Z
#!/usr/bin/env python3 # # Copyright (c) 2022 The Bitcoin and Qogecoin Core Authors # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """ This script checks for git modules """ import subprocess import sys def main(): submodul...
28.541667
106
0.652555
import subprocess import sys def main(): submodules_list = subprocess.check_output(['git', 'submodule', 'status', '--recursive'], universal_newlines = True, encoding = 'utf8').rstrip('\n') if submodules_list: print("These submodules were found, delete t...
true
true
1c0f049a23636ea427096a2913f73aedb83546bc
274
py
Python
pydelmod/__init__.py
CADWRDeltaModeling/pydelmod
31700b6853467dfb1af418267426e5014369080f
[ "MIT" ]
null
null
null
pydelmod/__init__.py
CADWRDeltaModeling/pydelmod
31700b6853467dfb1af418267426e5014369080f
[ "MIT" ]
4
2020-01-25T00:19:45.000Z
2021-04-06T22:46:34.000Z
pydelmod/__init__.py
CADWRDeltaModeling/pydelmod
31700b6853467dfb1af418267426e5014369080f
[ "MIT" ]
2
2019-11-06T20:29:35.000Z
2020-01-03T19:44:55.000Z
# -*- coding: utf-8 -*- """Top-level package for Delta Modeling Python Package.""" __author__ = """Kijin Nam""" __email__ = 'knam@water.ca.gov' __all__ = ['nbplot', 'utilities'] from ._version import get_versions __version__ = get_versions()['version'] del get_versions
21.076923
58
0.70073
__author__ = """Kijin Nam""" __email__ = 'knam@water.ca.gov' __all__ = ['nbplot', 'utilities'] from ._version import get_versions __version__ = get_versions()['version'] del get_versions
true
true
1c0f04c8a598548289236fdbf612661de90b9d53
6,057
py
Python
05.co-rotating-vortex.py
carlosal1015/python-fortran
4cbedff47f9b45a5bb7cb53f9159469539935b66
[ "MIT" ]
null
null
null
05.co-rotating-vortex.py
carlosal1015/python-fortran
4cbedff47f9b45a5bb7cb53f9159469539935b66
[ "MIT" ]
null
null
null
05.co-rotating-vortex.py
carlosal1015/python-fortran
4cbedff47f9b45a5bb7cb53f9159469539935b66
[ "MIT" ]
null
null
null
# --- # jupyter: # jupytext: # formats: py:light,docs//ipynb # text_representation: # extension: .py # format_name: light # format_version: '1.5' # jupytext_version: 1.3.4 # kernelspec: # display_name: Python 3 # language: python # name: python3 # --- import numpy as np ...
23.660156
79
0.497936
import numpy as np import matplotlib import matplotlib.pyplot as plt from matplotlib import animation plt.rcParams['figure.figsize'] = (10,6) import sys if sys.platform == "darwin": %env CC=gcc-9 subroutine biot ( n, xp, yp, op, up, vp ) implicit none integer, intent(in) :: n real(8), intent(in) :: x...
false
true
1c0f04fe6196c4f29de2849481c9aa15f3b7dca8
18,675
py
Python
tests/app/v3_position_accountaddress_coupon_GET_test.py
BoostryJP/ibet-Wallet-API
da7323a298bdb746e93da8a9b57a5da1dd6f14ac
[ "Apache-2.0" ]
6
2021-06-16T02:06:21.000Z
2021-09-20T09:50:56.000Z
tests/app/v3_position_accountaddress_coupon_GET_test.py
BoostryJP/ibet-Wallet-API
da7323a298bdb746e93da8a9b57a5da1dd6f14ac
[ "Apache-2.0" ]
68
2021-04-06T03:44:54.000Z
2022-03-29T02:00:02.000Z
tests/app/v3_position_accountaddress_coupon_GET_test.py
BoostryJP/ibet-Wallet-API
da7323a298bdb746e93da8a9b57a5da1dd6f14ac
[ "Apache-2.0" ]
null
null
null
""" Copyright BOOSTRY Co., Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distr...
40.16129
110
0.594645
from unittest import mock from web3 import Web3 from web3.middleware import geth_poa_middleware from app import config from app.contracts import Contract from app.model.db import ( Listing, IDXTransfer ) from tests.account_config import eth_account from tests.contract_modules import ( issue_coupon_token, ...
true
true
1c0f05ad0b574b2eee47e13167c1d06b9b3d31dd
911
py
Python
tests/test_latex_admin.py
spitfire-hash/latex-admin
b4c14647024c82b5747a09df201fff0ef3bcaf76
[ "Apache-2.0" ]
1
2020-11-17T16:58:34.000Z
2020-11-17T16:58:34.000Z
tests/test_latex_admin.py
spitfire-hash/latex-admin
b4c14647024c82b5747a09df201fff0ef3bcaf76
[ "Apache-2.0" ]
1
2020-11-17T14:07:20.000Z
2020-11-18T13:08:12.000Z
tests/test_latex_admin.py
spitfire-hash/latex-admin
b4c14647024c82b5747a09df201fff0ef3bcaf76
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """Tests for `latex_admin` package.""" import unittest from click.testing import CliRunner # from latex_admin import latex_admin from latex_admin import cli class TestLatexAdmin(unittest.TestCase): """Tests for `latex_admin` package.""" def setUp(self): """Set up test fixtur...
26.794118
80
0.655324
import unittest from click.testing import CliRunner from latex_admin import cli class TestLatexAdmin(unittest.TestCase): def setUp(self): def tearDown(self): def test_000_something(self): def test_command_line_interface(self): runner = CliRunner() result = runner.invoke(cli.mai...
true
true
1c0f06e57e239a63b4e2319d19b6d107eb0990a0
3,552
py
Python
warehouse/legacy/api/xmlrpc/cache/fncache.py
matt-land/warehouse
0acb5d94528099ed5356253457cf8dc0b4e50aad
[ "Apache-2.0" ]
1
2021-08-14T13:47:31.000Z
2021-08-14T13:47:31.000Z
warehouse/legacy/api/xmlrpc/cache/fncache.py
matt-land/warehouse
0acb5d94528099ed5356253457cf8dc0b4e50aad
[ "Apache-2.0" ]
1
2019-09-09T15:04:44.000Z
2019-09-09T15:04:44.000Z
warehouse/legacy/api/xmlrpc/cache/fncache.py
matt-land/warehouse
0acb5d94528099ed5356253457cf8dc0b4e50aad
[ "Apache-2.0" ]
1
2019-09-09T15:02:40.000Z
2019-09-09T15:02:40.000Z
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Li...
37
79
0.631757
import json import redis from warehouse.legacy.api.xmlrpc.cache.interfaces import CacheError DEFAULT_EXPIRES = 86400 class StubMetricReporter(object): def increment(self, metric_name): return class RedisLru(object): def __init__(self, conn, name="lru", expires=None, metric_reporter=None): ...
true
true
1c0f072dd32d38f048cfa48d38b45264951d095e
4,925
py
Python
tensorflow/python/grappler/tf_optimizer_test.py
mohammadzainabbas/tensorflow
352142267a1a151b04c6198de83b40b7e979d1d8
[ "Apache-2.0" ]
54
2018-05-29T19:52:44.000Z
2021-11-30T10:41:12.000Z
tensorflow/python/grappler/tf_optimizer_test.py
hiflyin/tensorflow
8e86dcd1c59bb3f1dc978fcb5398dd3f2f51d9ad
[ "Apache-2.0" ]
20
2017-12-06T18:20:54.000Z
2021-11-10T09:54:23.000Z
tensorflow/python/grappler/tf_optimizer_test.py
hiflyin/tensorflow
8e86dcd1c59bb3f1dc978fcb5398dd3f2f51d9ad
[ "Apache-2.0" ]
31
2018-09-11T02:17:17.000Z
2021-12-15T10:33:35.000Z
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
39.4
80
0.714112
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.core.protobuf import rewriter_config_pb2 from tensorflow.python.framework import constant_op from tensorflow.python.framework import dtypes from tensorflow.python.framework import meta_graph fro...
true
true
1c0f07e1aa963c1b389e6fcaaf3de1869015c9e1
1,150
py
Python
server/ledsHelper.py
adrianoBP/LedsManager
5b1379d61c6d60ee0a2908b72619d738966c4c56
[ "MIT" ]
null
null
null
server/ledsHelper.py
adrianoBP/LedsManager
5b1379d61c6d60ee0a2908b72619d738966c4c56
[ "MIT" ]
null
null
null
server/ledsHelper.py
adrianoBP/LedsManager
5b1379d61c6d60ee0a2908b72619d738966c4c56
[ "MIT" ]
null
null
null
import pyaudio, wave, audioop, argparse, time from threading import Thread from rpi_ws281x import * redHue = greenHue = blueHue = 32 threshold = 50 CHUNK = 32 FORMAT = pyaudio.paInt16 CHANNELS = 1 RATE = 44100 # LED strip configuration: LED_COUNT = 280 # Number of LED pixels. LED_PIN = 18 # GPIO...
29.487179
108
0.689565
import pyaudio, wave, audioop, argparse, time from threading import Thread from rpi_ws281x import * redHue = greenHue = blueHue = 32 threshold = 50 CHUNK = 32 FORMAT = pyaudio.paInt16 CHANNELS = 1 RATE = 44100 LED_COUNT = 280 LED_PIN = 18 LED_FREQ_HZ = 800000 LED_DMA = 10 LED_BRI...
true
true
1c0f08150785063892c78f76669c2198c7818575
276
py
Python
Ciclo1Python/Semana1/Ejercicio1.py
dsernag/misionTicUSAPython
2c06b9f1ea8ecfcfe39dd9d945b7dea66321951b
[ "CC0-1.0" ]
null
null
null
Ciclo1Python/Semana1/Ejercicio1.py
dsernag/misionTicUSAPython
2c06b9f1ea8ecfcfe39dd9d945b7dea66321951b
[ "CC0-1.0" ]
null
null
null
Ciclo1Python/Semana1/Ejercicio1.py
dsernag/misionTicUSAPython
2c06b9f1ea8ecfcfe39dd9d945b7dea66321951b
[ "CC0-1.0" ]
null
null
null
# Ejercicio 1 Número Mágico # Número mágico: nmagico = 12345679 #Escoja el número print("Escoja un número de 1 a 9") numero_usuario = int(input()) #Transformaciones numero_usuario *= 9 nmagico *= numero_usuario #Imprimir el resultado print("El número mágico es:", nmagico)
18.4
38
0.753623
nmagico = 12345679 print("Escoja un número de 1 a 9") numero_usuario = int(input()) numero_usuario *= 9 nmagico *= numero_usuario print("El número mágico es:", nmagico)
true
true
1c0f08a56172c68417d723e7eb8ee31a48942b05
3,711
py
Python
web/app/ITLabStore/settings.py
happyincent/ITLabStore
4fe223635420d0f3016f13b1413dfc2a66dc1345
[ "MIT" ]
null
null
null
web/app/ITLabStore/settings.py
happyincent/ITLabStore
4fe223635420d0f3016f13b1413dfc2a66dc1345
[ "MIT" ]
null
null
null
web/app/ITLabStore/settings.py
happyincent/ITLabStore
4fe223635420d0f3016f13b1413dfc2a66dc1345
[ "MIT" ]
null
null
null
""" Django settings for ITLabStore project. Generated by 'django-admin startproject' using Django 2.2.3. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ """ import os...
25.244898
91
0.6955
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) DEBUG = False ALLOWED_HOSTS = [ '*' ] # Application definition INSTALLED_APPS = [ # 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.mess...
true
true
1c0f08ac6a9a667db66ad3d1dcf5dbbfba5bd507
23,367
py
Python
mogua/consensus/block_body_validation.py
vanthoi/mogua-blockchain
1e46ee2ee4fc98b87aede276608b3bd95971f05a
[ "Apache-2.0" ]
16
2021-08-01T14:29:14.000Z
2022-02-09T04:32:05.000Z
mogua/consensus/block_body_validation.py
vanthoi/mogua-blockchain
1e46ee2ee4fc98b87aede276608b3bd95971f05a
[ "Apache-2.0" ]
18
2021-08-03T22:07:27.000Z
2022-02-03T11:08:42.000Z
mogua/consensus/block_body_validation.py
vanthoi/mogua-blockchain
1e46ee2ee4fc98b87aede276608b3bd95971f05a
[ "Apache-2.0" ]
5
2021-09-13T10:23:35.000Z
2022-03-15T08:43:19.000Z
import collections import logging from typing import Dict, List, Optional, Set, Tuple, Union, Callable from blspy import AugSchemeMPL, G1Element from chiabip158 import PyBIP158 from clvm.casts import int_from_bytes from mogua.consensus.block_record import BlockRecord from mogua.consensus.block_rewards import calculat...
48.179381
120
0.655797
import collections import logging from typing import Dict, List, Optional, Set, Tuple, Union, Callable from blspy import AugSchemeMPL, G1Element from chiabip158 import PyBIP158 from clvm.casts import int_from_bytes from mogua.consensus.block_record import BlockRecord from mogua.consensus.block_rewards import calculat...
true
true
1c0f0ae6c5996bf5c8fa787526a0ef191a6f8e67
1,187
py
Python
python/2016/day18.py
SylvainDe/aoc
b8a4609327831685ef94c9960350ff7bb5ace1a5
[ "MIT" ]
null
null
null
python/2016/day18.py
SylvainDe/aoc
b8a4609327831685ef94c9960350ff7bb5ace1a5
[ "MIT" ]
null
null
null
python/2016/day18.py
SylvainDe/aoc
b8a4609327831685ef94c9960350ff7bb5ace1a5
[ "MIT" ]
null
null
null
# vi: set shiftwidth=4 tabstop=4 expandtab: import datetime def get_tiles_from_file(file_path="../../resources/year2016_day18_input.txt"): with open(file_path) as f: for l in f: return l.strip() traps = set([("^", "^", "."), (".", "^", "^"), ("^", ".", "."), (".", ".", "^"),]) def get_next...
22.826923
88
0.577928
import datetime def get_tiles_from_file(file_path="../../resources/year2016_day18_input.txt"): with open(file_path) as f: for l in f: return l.strip() traps = set([("^", "^", "."), (".", "^", "^"), ("^", ".", "."), (".", ".", "^"),]) def get_next_line(tiles): return "".join( "^...
true
true
1c0f0b1d4088e36f60c07956347aee0cd68151f9
2,033
py
Python
n_utils/tests/aws_infra_util_test.py
NitorCreations/nitor-deploy-tools
93dd86d5e6586520f72dd38319f55849bf4a5bc5
[ "Apache-2.0" ]
10
2017-02-12T17:04:56.000Z
2018-11-10T16:46:57.000Z
n_utils/tests/aws_infra_util_test.py
NitorCreations/nitor-deploy-tools
93dd86d5e6586520f72dd38319f55849bf4a5bc5
[ "Apache-2.0" ]
22
2017-04-06T11:41:01.000Z
2019-09-18T05:45:03.000Z
n_utils/tests/aws_infra_util_test.py
NitorCreations/nitor-deploy-tools
93dd86d5e6586520f72dd38319f55849bf4a5bc5
[ "Apache-2.0" ]
1
2020-08-26T07:32:02.000Z
2020-08-26T07:32:02.000Z
from n_utils.aws_infra_util import yaml_to_dict def test_merge_import(mocker): result = yaml_to_dict('n_utils/tests/templates/test.yaml') assert result['Parameters']['paramTest']['Default'] == 'test2' assert result['Parameters']['paramTest3']['Default'] == 'test2' assert result['Parameters']['paramTest...
56.472222
75
0.659616
from n_utils.aws_infra_util import yaml_to_dict def test_merge_import(mocker): result = yaml_to_dict('n_utils/tests/templates/test.yaml') assert result['Parameters']['paramTest']['Default'] == 'test2' assert result['Parameters']['paramTest3']['Default'] == 'test2' assert result['Parameters']['paramTest...
true
true
1c0f0b69752f6a17726508818b07f8d792474a32
7,858
py
Python
tests/test_simple_programs.py
sarchar/CSBCAsm
a4cd7ce4396237f95a00574a5f0046ecb6947659
[ "MIT" ]
null
null
null
tests/test_simple_programs.py
sarchar/CSBCAsm
a4cd7ce4396237f95a00574a5f0046ecb6947659
[ "MIT" ]
null
null
null
tests/test_simple_programs.py
sarchar/CSBCAsm
a4cd7ce4396237f95a00574a5f0046ecb6947659
[ "MIT" ]
null
null
null
from CSBCAsm import Assembler from CSBCAsm import Lexer from CSBCAsm import Parser from CSBCAsm import ParserAST from CSBCAsm.tools import parse_string, assemble_string def test_nop(): program_string = ''' .segment "code", 0x0000, 0x10000, 0 .code .org start _init: nop .db 0x4C, 0x00, 0x00 ; JM...
27.190311
187
0.582846
from CSBCAsm import Assembler from CSBCAsm import Lexer from CSBCAsm import Parser from CSBCAsm import ParserAST from CSBCAsm.tools import parse_string, assemble_string def test_nop(): program_string = ''' .segment "code", 0x0000, 0x10000, 0 .code .org start _init: nop .db 0x4C, 0x00, 0x00 ; JM...
true
true
1c0f0b7ac70e226db4143d593b445c9c315f32aa
1,459
py
Python
eee3097s_project/Command Line Scripts/Tests/TestUser.py
StevenThomi/eee3097s_project
c2b64f974afe3a620c4c72e348eb85c9b4187cb0
[ "MIT" ]
null
null
null
eee3097s_project/Command Line Scripts/Tests/TestUser.py
StevenThomi/eee3097s_project
c2b64f974afe3a620c4c72e348eb85c9b4187cb0
[ "MIT" ]
1
2020-08-19T15:39:04.000Z
2020-08-19T15:39:04.000Z
eee3097s_project/Command Line Scripts/Tests/TestUser.py
StevenThomi/eee3097s_project
c2b64f974afe3a620c4c72e348eb85c9b4187cb0
[ "MIT" ]
null
null
null
from FireMarshall import FireMarshall def main(): fireMarshall = FireMarshall(2) print("The following fire marshall has been registered: ") fireMarshall.printMarshall() print("\nLet's change some of their attributes;") print("First of all, let's change their name. ") newName = input("Input a...
31.042553
125
0.668266
from FireMarshall import FireMarshall def main(): fireMarshall = FireMarshall(2) print("The following fire marshall has been registered: ") fireMarshall.printMarshall() print("\nLet's change some of their attributes;") print("First of all, let's change their name. ") newName = input("Input a...
true
true
1c0f0ca2de1ac0dcf92e2c083b5cead29d2c0021
2,136
py
Python
beginning-game-development/Chapter 11/tankdemo.py
CrtomirJuren/pygame-projects
f710f36050bfe3ece866bbda7d570caa1e037d7a
[ "MIT" ]
43
2015-09-20T02:05:48.000Z
2022-03-01T22:00:43.000Z
beginning-game-development/Chapter 11/tankdemo.py
CrtomirJuren/pygame-projects
f710f36050bfe3ece866bbda7d570caa1e037d7a
[ "MIT" ]
null
null
null
beginning-game-development/Chapter 11/tankdemo.py
CrtomirJuren/pygame-projects
f710f36050bfe3ece866bbda7d570caa1e037d7a
[ "MIT" ]
40
2015-05-19T06:51:13.000Z
2022-03-27T18:11:16.000Z
from math import radians from OpenGL.GL import * from OpenGL.GLU import * import pygame from pygame.locals import * # Import the Model3D class import model3d SCREEN_SIZE = (800, 600) def resize(width, height): glViewport(0, 0, width, height) glMatrixMode(GL_PROJECTION) glLoadIdentity() gluPerspect...
22.723404
77
0.632491
from math import radians from OpenGL.GL import * from OpenGL.GLU import * import pygame from pygame.locals import * import model3d SCREEN_SIZE = (800, 600) def resize(width, height): glViewport(0, 0, width, height) glMatrixMode(GL_PROJECTION) glLoadIdentity() gluPerspective(60.0, float(width)/heig...
true
true
1c0f0cf664eee90541a5624c03b814d1ff875fac
3,803
py
Python
tests/test_stomp.py
jrbourbeau/stumpy
e9150aeb08a47dbaaa2ba86e00dea46c5baff2a2
[ "BSD-3-Clause" ]
null
null
null
tests/test_stomp.py
jrbourbeau/stumpy
e9150aeb08a47dbaaa2ba86e00dea46c5baff2a2
[ "BSD-3-Clause" ]
null
null
null
tests/test_stomp.py
jrbourbeau/stumpy
e9150aeb08a47dbaaa2ba86e00dea46c5baff2a2
[ "BSD-3-Clause" ]
null
null
null
import numpy as np import numpy.testing as npt from stumpy import stomp, core import pytest import naive test_data = [ ( np.array([9, 8100, -60, 7], dtype=np.float64), np.array([584, -11, 23, 79, 1001, 0, -19], dtype=np.float64), ), ( np.random.uniform(-1000, 1000, [8]).astype(np.f...
31.691667
81
0.682356
import numpy as np import numpy.testing as npt from stumpy import stomp, core import pytest import naive test_data = [ ( np.array([9, 8100, -60, 7], dtype=np.float64), np.array([584, -11, 23, 79, 1001, 0, -19], dtype=np.float64), ), ( np.random.uniform(-1000, 1000, [8]).astype(np.f...
true
true
1c0f0d6983d0c0ab26be18f9177947f960bd084e
818
py
Python
lambda/auto-rbr-generate/index.py
aws-samples/aws-ddos-fire-extinguisher
ab07428786277e7861e3cf5c5844b2e1a8c92716
[ "MIT-0" ]
null
null
null
lambda/auto-rbr-generate/index.py
aws-samples/aws-ddos-fire-extinguisher
ab07428786277e7861e3cf5c5844b2e1a8c92716
[ "MIT-0" ]
null
null
null
lambda/auto-rbr-generate/index.py
aws-samples/aws-ddos-fire-extinguisher
ab07428786277e7861e3cf5c5844b2e1a8c92716
[ "MIT-0" ]
null
null
null
import boto3 import time import json import os from query_actions import * from cloudformation_actions import * from send_notiification import * accountId = os.environ['AccountId'] actions = ['changeset','email'] cloudformation_client = boto3.client('cloudformation') athena_client = boto3.client('athena') s3_client = ...
31.461538
59
0.740831
import boto3 import time import json import os from query_actions import * from cloudformation_actions import * from send_notiification import * accountId = os.environ['AccountId'] actions = ['changeset','email'] cloudformation_client = boto3.client('cloudformation') athena_client = boto3.client('athena') s3_client = ...
true
true
1c0f0dbb178debee1d114993a680ad4dfae9c549
2,633
py
Python
ortools/graph/samples/simple_min_cost_flow_program.py
matbesancon/or-tools
b37d9c786b69128f3505f15beca09e89bf078a89
[ "Apache-2.0" ]
8,273
2015-02-24T22:10:50.000Z
2022-03-31T21:19:27.000Z
ortools/graph/samples/simple_min_cost_flow_program.py
matbesancon/or-tools
b37d9c786b69128f3505f15beca09e89bf078a89
[ "Apache-2.0" ]
2,530
2015-03-05T04:27:21.000Z
2022-03-31T06:13:02.000Z
ortools/graph/samples/simple_min_cost_flow_program.py
matbesancon/or-tools
b37d9c786b69128f3505f15beca09e89bf078a89
[ "Apache-2.0" ]
2,057
2015-03-04T15:02:02.000Z
2022-03-30T02:29:27.000Z
#!/usr/bin/env python3 # Copyright 2010-2021 Google LLC # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
35.581081
78
0.636156
from ortools.graph import pywrapgraph def main(): start_nodes = [0, 0, 1, 1, 1, 2, 2, 3, 4] end_nodes = [1, 2, 2, 3, 4, 3, 4, 4, 2] capacities = [15, 8, 20, 4, 10, 15, 4, 20, 5] unit_costs = [4, 4, 2, 2, 6, 1, 3, 2, 3] supplies = [20, 0, 0, -5, -15] min_cost_f...
true
true
1c0f0decb54e9dcb6e96dc9fe4d2f03e3707159c
5,455
py
Python
TheLastBowl.py
Drop-G/PyBowling
7a86c51e0c62a6427e7ef614b6723d8ab466a689
[ "MIT" ]
null
null
null
TheLastBowl.py
Drop-G/PyBowling
7a86c51e0c62a6427e7ef614b6723d8ab466a689
[ "MIT" ]
null
null
null
TheLastBowl.py
Drop-G/PyBowling
7a86c51e0c62a6427e7ef614b6723d8ab466a689
[ "MIT" ]
null
null
null
# Program bowling # Declare constants NUMBER_OF_FRAMES = 10 NUMBER_OF_PINS = 10 # Declare Variable types (EVERY variable used) frame_1_ball_1 = int() frame_1_ball_2 = int() frame_2_ball_1 = int() frame_2_ball_2 = int() frame_3_ball_1 = int() frame_3_ball_2 = int() frame_4_ball_1 = int() frame_4_ball_2 = int() frame_5...
23.311966
75
0.60385
NUMBER_OF_FRAMES = 10 NUMBER_OF_PINS = 10 frame_1_ball_1 = int() frame_1_ball_2 = int() frame_2_ball_1 = int() frame_2_ball_2 = int() frame_3_ball_1 = int() frame_3_ball_2 = int() frame_4_ball_1 = int() frame_4_ball_2 = int() frame_5_ball_1 = int() frame_5_ball_2 = int() frame_6_ball_1 = int() frame_6_ball_2 = int() ...
true
true
1c0f10476e649d133d093c5fa5fa42e6e471f52f
20,896
py
Python
tests/common/test_logcollector.py
ezeeyahoo/WALinuxAgent
7bb93ee0d75b91c6e9bc6d69003b4fdce9697ec2
[ "Apache-2.0" ]
null
null
null
tests/common/test_logcollector.py
ezeeyahoo/WALinuxAgent
7bb93ee0d75b91c6e9bc6d69003b4fdce9697ec2
[ "Apache-2.0" ]
null
null
null
tests/common/test_logcollector.py
ezeeyahoo/WALinuxAgent
7bb93ee0d75b91c6e9bc6d69003b4fdce9697ec2
[ "Apache-2.0" ]
1
2020-08-18T20:15:17.000Z
2020-08-18T20:15:17.000Z
# Microsoft Azure Linux Agent # # Copyright 2020 Microsoft Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
48.258661
120
0.67678
import os import shutil import zipfile import tempfile from azurelinuxagent.common.utils.fileutil import rm_dirs, mkdir, rm_files, write_file from azurelinuxagent.common.logcollector import LogCollector from tests.tools import AgentTestCase, is_python_version_26, patch, skip_if_predicate_true SMALL_FILE_SIZE = 1 * ...
true
true
1c0f110ce0bff251d0c71be9601f099e5e9a57c5
123
py
Python
source/menus/__init__.py
Tobi-De/SCJ-2021-classic-clownfish
0d36f96a1e7734653b4a160c08ce05f4e5ef4b9b
[ "MIT" ]
1
2021-07-10T08:24:50.000Z
2021-07-10T08:24:50.000Z
source/menus/__init__.py
Tobi-De/SCJ-2021-classic-clownfish
0d36f96a1e7734653b4a160c08ce05f4e5ef4b9b
[ "MIT" ]
8
2021-07-12T18:46:31.000Z
2021-07-17T16:09:08.000Z
source/menus/__init__.py
Tobi-De/SCJ-2021-classic-clownfish
0d36f96a1e7734653b4a160c08ce05f4e5ef4b9b
[ "MIT" ]
5
2021-07-09T16:14:56.000Z
2021-07-17T06:58:31.000Z
# flake8: noqa from .choose_file import ChooseFile from .highscore_menu import HighScoreMenu from .start import StartMenu
20.5
41
0.829268
from .choose_file import ChooseFile from .highscore_menu import HighScoreMenu from .start import StartMenu
true
true
1c0f117fce4ee332cbc5850cecaaad69b1516826
2,298
py
Python
data/test/python/1c0f117fce4ee332cbc5850cecaaad69b1516826__init__.py
harshp8l/deep-learning-lang-detection
2a54293181c1c2b1a2b840ddee4d4d80177efb33
[ "MIT" ]
84
2017-10-25T15:49:21.000Z
2021-11-28T21:25:54.000Z
data/test/python/1c0f117fce4ee332cbc5850cecaaad69b1516826__init__.py
vassalos/deep-learning-lang-detection
cbb00b3e81bed3a64553f9c6aa6138b2511e544e
[ "MIT" ]
5
2018-03-29T11:50:46.000Z
2021-04-26T13:33:18.000Z
data/test/python/1c0f117fce4ee332cbc5850cecaaad69b1516826__init__.py
vassalos/deep-learning-lang-detection
cbb00b3e81bed3a64553f9c6aa6138b2511e544e
[ "MIT" ]
24
2017-11-22T08:31:00.000Z
2022-03-27T01:22:31.000Z
''' **/Xfero/ Module:** +-----------------------------------+------------------------------------------+ | Type | Brief Description | +===================================+==========================================+ | Func: create_XFERO_DB.create_db | Database creat...
67.588235
80
0.228895
true
true
1c0f12ff25c5462bc4762eec0c238d209f51bdbd
1,475
py
Python
sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_04_01/models/ip_rule_py3.py
pjquirk/azure-sdk-for-python
cbf02ec4f177b96eae1dbbba87c34c2c93880150
[ "MIT" ]
1
2021-09-07T18:36:04.000Z
2021-09-07T18:36:04.000Z
sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_04_01/models/ip_rule_py3.py
pjquirk/azure-sdk-for-python
cbf02ec4f177b96eae1dbbba87c34c2c93880150
[ "MIT" ]
2
2019-10-02T23:37:38.000Z
2020-10-02T01:17:31.000Z
azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_04_01/models/ip_rule_py3.py
xiafu-msft/azure-sdk-for-python
4d9560cfd519ee60667f3cc2f5295a58c18625db
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
35.119048
86
0.613559
from msrest.serialization import Model class IPRule(Model): _validation = { 'ip_address_or_range': {'required': True}, } _attribute_map = { 'action': {'key': 'action', 'type': 'str'}, 'ip_address_or_range': {'key': 'value', 'type': 'str'}, } def __init__(self, *, ip_add...
true
true
1c0f145be3582b7e485600148313f1b692ed3a1c
1,193
py
Python
pi/FileHelper/SaveFileHelper.py
sammyhaq/gaitmate
2f172ef81473eea1fe8aacd544c24eac0b1f64cd
[ "Apache-2.0" ]
null
null
null
pi/FileHelper/SaveFileHelper.py
sammyhaq/gaitmate
2f172ef81473eea1fe8aacd544c24eac0b1f64cd
[ "Apache-2.0" ]
null
null
null
pi/FileHelper/SaveFileHelper.py
sammyhaq/gaitmate
2f172ef81473eea1fe8aacd544c24eac0b1f64cd
[ "Apache-2.0" ]
null
null
null
""" SaveFileHelper.py Code by Sammy Haq https://github.com/sammyhaq Class for saving x,y,z data from a .csv-like file. The functionality of this program is shown in saveFileTester.py """ class SaveFileHelper(): # Constructor def __init__(self, filename): self.filename = filename self.file =...
26.511111
79
0.626991
class SaveFileHelper(): def __init__(self, filename): self.filename = filename self.file = open(filename, "w") self.buffer = [] def writeToFile(self, line): self.file.write(line) def writeData(self, x, y, z): self.writeToFile("%.3f,%.3f,%.3f\n" % (flo...
true
true
1c0f14817ee82118e11bf8e66d8649d31d99af7d
106,642
py
Python
GSAS-II-WONDER/GSASIIlattice.py
WONDER-project/GSAS-II-WONDER-OSX
f90ab85f89f282d1b9686a1cbbf5adc5c48ceac9
[ "MIT" ]
null
null
null
GSAS-II-WONDER/GSASIIlattice.py
WONDER-project/GSAS-II-WONDER-OSX
f90ab85f89f282d1b9686a1cbbf5adc5c48ceac9
[ "MIT" ]
null
null
null
GSAS-II-WONDER/GSASIIlattice.py
WONDER-project/GSAS-II-WONDER-OSX
f90ab85f89f282d1b9686a1cbbf5adc5c48ceac9
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- ''' *GSASIIlattice: Unit cells* --------------------------- Perform lattice-related computations Note that *G* is the reciprocal lattice tensor, and *g* is its inverse, :math:`G = g^{-1}`, where .. math:: g = \\left( \\begin{matrix} a^2 & a b\\cos\gamma & a c\\cos\\beta \\\\ a b\...
43.105093
218
0.523949
from __future__ import division, print_function import math import copy import sys import random as ran import numpy as np import numpy.linalg as nl import GSASIIpath import GSASIImath as G2mth import GSASIIspc as G2spc import GSASIIElem as G2elem GSASIIpath.SetVersionNumber("$Revision: 3888 $") sind = lambda x: np.sin...
true
true
1c0f1638f8850c1c17a5593c4a625a41ecb79e18
5,196
py
Python
pytermgui/helpers.py
meson800/pytermgui
ef497c2f75b709b081d57a1971c1b6b98300b05b
[ "MIT" ]
null
null
null
pytermgui/helpers.py
meson800/pytermgui
ef497c2f75b709b081d57a1971c1b6b98300b05b
[ "MIT" ]
null
null
null
pytermgui/helpers.py
meson800/pytermgui
ef497c2f75b709b081d57a1971c1b6b98300b05b
[ "MIT" ]
null
null
null
""" Helper methods and functions for pytermgui. """ from typing import Iterator from .parser import markup, TokenType, RE_ANSI, RE_MARKUP, StyledText from .ansi_interface import reset __all__ = ["strip_ansi", "strip_markup", "real_length", "get_sequences", "break_line"] def strip_ansi(text: str) -> str: """Remo...
26.375635
89
0.558122
from typing import Iterator from .parser import markup, TokenType, RE_ANSI, RE_MARKUP, StyledText from .ansi_interface import reset __all__ = ["strip_ansi", "strip_markup", "real_length", "get_sequences", "break_line"] def strip_ansi(text: str) -> str: if isinstance(text, StyledText): return text.plain...
true
true
1c0f16bec0dd2de4d7af2299c1b7a3011029fd6f
445
py
Python
ex065.py
thiagobachiega/python
493b6bdee9c94e1ae8d4db06c8e5295a96f8922c
[ "MIT" ]
null
null
null
ex065.py
thiagobachiega/python
493b6bdee9c94e1ae8d4db06c8e5295a96f8922c
[ "MIT" ]
null
null
null
ex065.py
thiagobachiega/python
493b6bdee9c94e1ae8d4db06c8e5295a96f8922c
[ "MIT" ]
null
null
null
num = soma = cont = maior = menor = 0 esc = '' while esc != 'n': num = int(input('Informe um valor: ')) esc = str(input('Deseja continuar? [S/N]')).lower() soma = soma + num cont = cont + 1 menor = num if num > maior: maior = num if num < menor: menor = num media = soma / c...
24.722222
62
0.573034
num = soma = cont = maior = menor = 0 esc = '' while esc != 'n': num = int(input('Informe um valor: ')) esc = str(input('Deseja continuar? [S/N]')).lower() soma = soma + num cont = cont + 1 menor = num if num > maior: maior = num if num < menor: menor = num media = soma / c...
true
true
1c0f17f291188023e05a2258d1abf575ba41ff27
83
py
Python
utils/common.py
Bob-Xtc/sims_django
b1e61cf05fd1184f049a9e2a832f85d27cd4f687
[ "MIT" ]
null
null
null
utils/common.py
Bob-Xtc/sims_django
b1e61cf05fd1184f049a9e2a832f85d27cd4f687
[ "MIT" ]
null
null
null
utils/common.py
Bob-Xtc/sims_django
b1e61cf05fd1184f049a9e2a832f85d27cd4f687
[ "MIT" ]
null
null
null
import uuid def create_uuid(): return ''.join(str(uuid.uuid4()).split('-'))
11.857143
48
0.614458
import uuid def create_uuid(): return ''.join(str(uuid.uuid4()).split('-'))
true
true
1c0f18fc26410157da13fe73331e2ee8e8532288
629
py
Python
0024.Swap Nodes in Pairs/test.py
zhlinh/leetcode
6dfa0a4df9ec07b2c746a13c8257780880ea04af
[ "Apache-2.0" ]
null
null
null
0024.Swap Nodes in Pairs/test.py
zhlinh/leetcode
6dfa0a4df9ec07b2c746a13c8257780880ea04af
[ "Apache-2.0" ]
null
null
null
0024.Swap Nodes in Pairs/test.py
zhlinh/leetcode
6dfa0a4df9ec07b2c746a13c8257780880ea04af
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from solution import Solution from solution import ListNode def mkListNode(nums): """ :type: nums: List :rtype: ListNode """ head = lnp = ListNode(0) for i in range(len(nums)): lnp.next = ListNode(nums[i]) lnp = lnp.next return ...
18.5
36
0.578696
from solution import Solution from solution import ListNode def mkListNode(nums): head = lnp = ListNode(0) for i in range(len(nums)): lnp.next = ListNode(nums[i]) lnp = lnp.next return head.next def lsListNode(head): lnp = head rList = [] while lnp: rList.append(lnp.va...
true
true
1c0f19e03903783cd5d5a47e7e117bffa3868cb0
2,065
py
Python
examples/files/img_classification.py
pfriesch/neural-pipeline
2df4f7467a721b1fbd93f4439086c6dcee5dac2c
[ "MIT" ]
null
null
null
examples/files/img_classification.py
pfriesch/neural-pipeline
2df4f7467a721b1fbd93f4439086c6dcee5dac2c
[ "MIT" ]
null
null
null
examples/files/img_classification.py
pfriesch/neural-pipeline
2df4f7467a721b1fbd93f4439086c6dcee5dac2c
[ "MIT" ]
null
null
null
from neural_pipeline.builtin.monitors.tensorboard import TensorboardMonitor from neural_pipeline import DataProducer, AbstractDataset, TrainConfig, TrainStage,\ ValidationStage, Trainer, FileStructManager import torch from torch import nn import torch.nn.functional as F from torchvision import datasets, transforms...
36.22807
116
0.666344
from neural_pipeline.builtin.monitors.tensorboard import TensorboardMonitor from neural_pipeline import DataProducer, AbstractDataset, TrainConfig, TrainStage,\ ValidationStage, Trainer, FileStructManager import torch from torch import nn import torch.nn.functional as F from torchvision import datasets, transforms...
true
true
1c0f1ba5bd073ad54574cec7d9b6336220e37b3b
1,049
py
Python
setup.py
AndreasSahlberg/electrification-scenario-discovery
a7fd9bb407e6030a22e4e970ea6e3c110ae6d205
[ "MIT" ]
null
null
null
setup.py
AndreasSahlberg/electrification-scenario-discovery
a7fd9bb407e6030a22e4e970ea6e3c110ae6d205
[ "MIT" ]
null
null
null
setup.py
AndreasSahlberg/electrification-scenario-discovery
a7fd9bb407e6030a22e4e970ea6e3c110ae6d205
[ "MIT" ]
null
null
null
from os import path import setuptools # read the contents of your README file this_directory = path.abspath(path.dirname(__file__)) with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f: long_description = f.read() setuptools.setup( name='onsset', author='Andreas Sahlberg, Alexandros ...
26.897436
107
0.63775
from os import path import setuptools this_directory = path.abspath(path.dirname(__file__)) with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f: long_description = f.read() setuptools.setup( name='onsset', author='Andreas Sahlberg, Alexandros Korkovelos, Dimitrios Mentis, Christophe...
true
true
1c0f1bd3e8eda3442034899e0aec0f8a7ed6ec09
2,229
py
Python
{{cookiecutter.project_name}}/apps/api/{{cookiecutter.api_2_for_name}}/controllers/member.py
sarimurrab/cookiecutter-space
4ba9da5c0c16c902dc737951bc84c21671a24091
[ "MIT" ]
3
2021-08-31T18:53:45.000Z
2022-03-11T06:06:25.000Z
{{cookiecutter.project_name}}/apps/api/{{cookiecutter.api_2_for_name}}/controllers/member.py
sarimurrab/cookiecutter-space
4ba9da5c0c16c902dc737951bc84c21671a24091
[ "MIT" ]
null
null
null
{{cookiecutter.project_name}}/apps/api/{{cookiecutter.api_2_for_name}}/controllers/member.py
sarimurrab/cookiecutter-space
4ba9da5c0c16c902dc737951bc84c21671a24091
[ "MIT" ]
null
null
null
from flask_restplus import Resource from injector import inject from apps.api.{{cookiecutter.api_2_for_name}}.adapters.presenters.{{cookiecutter.api_2_for_name}}_presenter import GetUser{{cookiecutter.api_2_for_name}}Presenter from apps.api.{{cookiecutter.api_2_for_name}}.adapters.response.{{cookiecutter.api_2_for_nam...
42.056604
198
0.734859
from flask_restplus import Resource from injector import inject from apps.api.{{cookiecutter.api_2_for_name}}.adapters.presenters.{{cookiecutter.api_2_for_name}}_presenter import GetUser{{cookiecutter.api_2_for_name}}Presenter from apps.api.{{cookiecutter.api_2_for_name}}.adapters.response.{{cookiecutter.api_2_for_nam...
false
true
1c0f1c18306c02a6f70e6e2655db86395fc4371e
219
py
Python
python-the-hard-way/01-a-good-first-program.py
Valka7a/python-playground
f08d4374f2cec2e8b1afec3753854b1ec10ff480
[ "MIT" ]
null
null
null
python-the-hard-way/01-a-good-first-program.py
Valka7a/python-playground
f08d4374f2cec2e8b1afec3753854b1ec10ff480
[ "MIT" ]
null
null
null
python-the-hard-way/01-a-good-first-program.py
Valka7a/python-playground
f08d4374f2cec2e8b1afec3753854b1ec10ff480
[ "MIT" ]
null
null
null
# Exercise 1: A Good First Program print "Hello World!" print "Hello Again!" print "I like typing this." print "This is fun." print "Yay! Printing." print "I'd much rather you 'not'." print 'I "said do not touch this.'
24.333333
34
0.69863
print "Hello World!" print "Hello Again!" print "I like typing this." print "This is fun." print "Yay! Printing." print "I'd much rather you 'not'." print 'I "said do not touch this.'
false
true
1c0f1c2ee60c2b26ef4a7da522ba400b403f1c0c
226
py
Python
spleen/profils/__init__.py
puiseux/spleen
1182cf0c49f05d997b7eaf822524b3c85ace0cef
[ "WTFPL" ]
null
null
null
spleen/profils/__init__.py
puiseux/spleen
1182cf0c49f05d997b7eaf822524b3c85ace0cef
[ "WTFPL" ]
null
null
null
spleen/profils/__init__.py
puiseux/spleen
1182cf0c49f05d997b7eaf822524b3c85ace0cef
[ "WTFPL" ]
null
null
null
#!/usr/local/bin/python2.7 # encoding: utf-8 from profil import Profil from profilnormalise import ProfilNormalise from naca import naca4, naca5 from parametresprofil import ProfilPrefs, ProfsParam, ProfsParam1, ProfsParamNew
32.285714
80
0.831858
from profil import Profil from profilnormalise import ProfilNormalise from naca import naca4, naca5 from parametresprofil import ProfilPrefs, ProfsParam, ProfsParam1, ProfsParamNew
true
true
1c0f1e2c978aeb03e2e0ac8389405501aa729e16
2,363
py
Python
flipper/kernel/flatstructure.py
saraedum/flipper
31ee1c58e6ffb485a1e2dcab46821eddb3841963
[ "MIT" ]
null
null
null
flipper/kernel/flatstructure.py
saraedum/flipper
31ee1c58e6ffb485a1e2dcab46821eddb3841963
[ "MIT" ]
null
null
null
flipper/kernel/flatstructure.py
saraedum/flipper
31ee1c58e6ffb485a1e2dcab46821eddb3841963
[ "MIT" ]
null
null
null
''' A module for representing a triangulation with a preferred flat structure. Provides two classes: Vector2 and FlatStructure. An Vector2 is a vector in RR^2 A FlatStructure is a triangulation with an assignment of vectors to each edge. ''' import flipper class Vector2(object): ''' This represents a po...
38.737705
148
0.65383
import flipper class Vector2(object): __slots__ = ['x', 'y'] def __init__(self, x, y): self.x, self.y = x, y def __str__(self): return "(%s, %s)" % (self.x, self.y) def __repr__(self): return str(self) def __reduce__(self): return (self.__clas...
true
true
1c0f1f6eb415b1c05c1052c1f52743a19c49f017
15,403
py
Python
python/paddle/fluid/io.py
ghevinn/Paddle
544159c3de2f74a38a5795c635a2f1bda170379f
[ "ECL-2.0", "Apache-2.0" ]
4
2019-04-28T13:29:41.000Z
2022-01-09T16:54:20.000Z
python/paddle/fluid/io.py
ghevinn/Paddle
544159c3de2f74a38a5795c635a2f1bda170379f
[ "ECL-2.0", "Apache-2.0" ]
3
2018-04-11T10:25:51.000Z
2018-04-12T01:17:22.000Z
python/paddle/fluid/io.py
ghevinn/Paddle
544159c3de2f74a38a5795c635a2f1bda170379f
[ "ECL-2.0", "Apache-2.0" ]
1
2019-05-17T02:22:57.000Z
2019-05-17T02:22:57.000Z
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
33.339827
93
0.646368
import os from paddle.fluid.evaluator import Evaluator from paddle.fluid.framework import Program, Parameter, default_main_program, Variable from . import core __all__ = [ 'save_vars', 'save_params', 'save_persistables', 'load_vars', 'load_params', 'load_persistables', 'save_inference_mod...
true
true
1c0f2078512cd6364df2cf4b95136b5de7057ecd
7,331
py
Python
cirq/ionq/job_test.py
exAClior/Cirq
0701327bc66c988428f302dd1e4bed1eef1535a6
[ "Apache-2.0" ]
null
null
null
cirq/ionq/job_test.py
exAClior/Cirq
0701327bc66c988428f302dd1e4bed1eef1535a6
[ "Apache-2.0" ]
null
null
null
cirq/ionq/job_test.py
exAClior/Cirq
0701327bc66c988428f302dd1e4bed1eef1535a6
[ "Apache-2.0" ]
1
2020-12-24T07:13:40.000Z
2020-12-24T07:13:40.000Z
# Copyright 2020 The Cirq Developers # # 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 agreed to in ...
29.800813
81
0.597599
from unittest import mock import pytest import cirq.ionq as ionq def test_job_fields(): job_dict = { 'id': 'my_id', 'target': 'qpu', 'name': 'bacon', 'qubits': '5', 'status': 'completed', 'metadata': {'shots': 1000}, } job = ionq.Job(None, job_dict) a...
true
true
1c0f20ea80d2bbbe84a819d2fab60550f0bc3eb3
536
py
Python
algorithms/policy/MLP.py
intelligent-control-lab/Autoenv
8d7697421ca14e317ea7de24b6acb694ecae5148
[ "MIT" ]
4
2019-09-25T21:11:20.000Z
2020-07-30T03:46:26.000Z
algorithms/policy/MLP.py
intelligent-control-lab/Autoenv
8d7697421ca14e317ea7de24b6acb694ecae5148
[ "MIT" ]
null
null
null
algorithms/policy/MLP.py
intelligent-control-lab/Autoenv
8d7697421ca14e317ea7de24b6acb694ecae5148
[ "MIT" ]
1
2019-12-21T19:39:20.000Z
2019-12-21T19:39:20.000Z
import torch.nn as nn class MLP(nn.Module): def __init__(self, input_size, hidden_size, output_size): super(MLP, self).__init__() self.fc1 = nn.Linear(input_size, hidden_size[0]) self.relu = nn.ReLU() self.fc2 = nn.Linear(hidden_size[0], hidden_size[1]) self.fc3 = nn.Linear...
28.210526
61
0.591418
import torch.nn as nn class MLP(nn.Module): def __init__(self, input_size, hidden_size, output_size): super(MLP, self).__init__() self.fc1 = nn.Linear(input_size, hidden_size[0]) self.relu = nn.ReLU() self.fc2 = nn.Linear(hidden_size[0], hidden_size[1]) self.fc3 = nn.Linear...
true
true
1c0f21924f7bc4bfd06ebb79ac703dcc8331f7a7
8,790
py
Python
third_party/a2c_ppo_acktr/model_split.py
jyf588/SimGAN
23283d7b5629f1653567b2437bb28aac1cc17169
[ "Apache-2.0" ]
30
2021-06-16T23:28:58.000Z
2022-03-23T17:20:58.000Z
third_party/a2c_ppo_acktr/model_split.py
jyf588/SimGAN
23283d7b5629f1653567b2437bb28aac1cc17169
[ "Apache-2.0" ]
1
2021-06-25T09:21:29.000Z
2021-08-11T23:14:14.000Z
third_party/a2c_ppo_acktr/model_split.py
jyf588/SimGAN
23283d7b5629f1653567b2437bb28aac1cc17169
[ "Apache-2.0" ]
8
2021-06-19T12:51:50.000Z
2021-12-23T08:31:10.000Z
# MIT License # # Copyright (c) 2017 Ilya Kostrikov and (c) 2020 Google LLC # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights...
36.625
93
0.64562
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from third_party.a2c_ppo_acktr.distributions import PlainDiagGaussian, FixedNormal from third_party.a2c_ppo_acktr.utils import init class Flatten(nn.Module): def forward(self, x): return x.view(x.size(0), -1) class ...
true
true
1c0f21929afd6e78e31deec37eed9e9ab5bc158b
1,456
py
Python
Push2/observable_property_alias.py
phatblat/AbletonLiveMIDIRemoteScripts
ef6e87237a9dcea1046fb6836b18af01b160736a
[ "MIT" ]
4
2015-12-31T19:13:32.000Z
2017-04-23T19:52:16.000Z
Push2/observable_property_alias.py
phatblat/AbletonLiveMIDIRemoteScripts
ef6e87237a9dcea1046fb6836b18af01b160736a
[ "MIT" ]
1
2015-12-23T09:59:18.000Z
2015-12-23T18:53:01.000Z
Push2/observable_property_alias.py
phatblat/AbletonLiveMIDIRemoteScripts
ef6e87237a9dcea1046fb6836b18af01b160736a
[ "MIT" ]
null
null
null
# Source Generated with Decompyle++ # File: observable_property_alias.pyc (Python 2.5) from __future__ import absolute_import from ableton.v2.base import SlotManager, Slot class ObservablePropertyAlias(SlotManager): def __init__(self, alias_host, property_host = None, property_name = '', alias_name = None, g...
33.090909
120
0.692995
from __future__ import absolute_import from ableton.v2.base import SlotManager, Slot class ObservablePropertyAlias(SlotManager): def __init__(self, alias_host, property_host = None, property_name = '', alias_name = None, getter = None, *a, **k): super(ObservablePropertyAlias, self).__init__(*a, **a) ...
true
true
1c0f21d47ecd763a17fdcbab39052b6d7cfded32
52,219
py
Python
sdk/python/pulumi_azure_native/importexport/v20210101/outputs.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/importexport/v20210101/outputs.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/importexport/v20210101/outputs.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
38.998506
316
0.635707
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . import outputs from ._enums import * __all__ = [ 'DeliveryPackageInformationResponse', 'DriveBitLockerKeyResponse', 'DriveStatusResponse', 'Encrypt...
true
true
1c0f21f529204e251d14cf9c1dbe1ee91e0b790b
143
py
Python
qmpy/analysis/thermodynamics/setup.py
tachyontraveler/qmpy
f024de3aa85d4367cd31775bd53eede30c74c083
[ "MIT" ]
103
2015-02-13T16:51:59.000Z
2022-03-24T22:08:54.000Z
qmpy/analysis/thermodynamics/setup.py
tachyontraveler/qmpy
f024de3aa85d4367cd31775bd53eede30c74c083
[ "MIT" ]
59
2015-12-02T22:43:21.000Z
2022-03-28T03:54:44.000Z
qmpy/analysis/thermodynamics/setup.py
tachyontraveler/qmpy
f024de3aa85d4367cd31775bd53eede30c74c083
[ "MIT" ]
62
2015-02-24T21:58:59.000Z
2022-03-21T16:49:09.000Z
from distutils.core import setup from Cython.Build import cythonize setup( name="ConvexHull", ext_modules=cythonize("convex_hull.pyx"), )
20.428571
64
0.776224
from distutils.core import setup from Cython.Build import cythonize setup( name="ConvexHull", ext_modules=cythonize("convex_hull.pyx"), )
true
true
1c0f22d98bade05babad6d8e55a05fd80949c9c8
13,677
py
Python
data_management/VOC2012ManagerObjDetection.py
PilmautBotics/Tracking_SSD_ReID
5fa2f83ac48c64dc1be24cc1a156d19ba5908dff
[ "MIT" ]
null
null
null
data_management/VOC2012ManagerObjDetection.py
PilmautBotics/Tracking_SSD_ReID
5fa2f83ac48c64dc1be24cc1a156d19ba5908dff
[ "MIT" ]
null
null
null
data_management/VOC2012ManagerObjDetection.py
PilmautBotics/Tracking_SSD_ReID
5fa2f83ac48c64dc1be24cc1a156d19ba5908dff
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Pascal VOC2012 dataset manager """ import os import xml.etree.ElementTree as ET import numpy as np import tensorflow as tf class VOC2012ManagerObjDetection: def __init__(self, path="", trainRatio=0.7, batch_size=32, floatType=32): super(VOC2012ManagerO...
37.781768
100
0.554581
import os import xml.etree.ElementTree as ET import numpy as np import tensorflow as tf class VOC2012ManagerObjDetection: def __init__(self, path="", trainRatio=0.7, batch_size=32, floatType=32): super(VOC2012ManagerObjDetection, self).__init__() if floatType == 32: self.floatType =...
true
true
1c0f24924ca98e03f557023e434b944fabee8751
68,903
py
Python
sarpy/geometry/point_projection.py
khavernathy/sarpy
e0c2bb1a55f153628162ef7be89e9b7de34602df
[ "MIT" ]
null
null
null
sarpy/geometry/point_projection.py
khavernathy/sarpy
e0c2bb1a55f153628162ef7be89e9b7de34602df
[ "MIT" ]
null
null
null
sarpy/geometry/point_projection.py
khavernathy/sarpy
e0c2bb1a55f153628162ef7be89e9b7de34602df
[ "MIT" ]
null
null
null
""" Functions to map between the coordinates in image pixel space and geographical coordinates. Examples -------- .. code-block:: python from sarpy.geometry import point_projection from sarpy.io.complex.sicd import SICDReader reader = SICDReader('<path to sicd file>') structure = reader.sicd_meta ...
39.713545
152
0.669013
import logging from typing import Tuple from types import MethodType import numpy from sarpy.compliance import string_types, int_func from sarpy.geometry.geocoords import ecf_to_geodetic, geodetic_to_ecf, wgs_84_norm from sarpy.io.complex.sicd_elements.blocks import Poly2DType, XYZPolyType from sarpy.io.DEM.DEM imp...
true
true
1c0f26043de3ecbbd84b62e391bf664a38eab833
7,729
py
Python
Models/model.py
alopezgit/project-adapt
e93ab350344a5504f76f4e460002e0163996f88a
[ "MIT" ]
8
2020-11-28T10:34:38.000Z
2022-01-18T02:21:40.000Z
Models/model.py
alopezgit/project-adapt
e93ab350344a5504f76f4e460002e0163996f88a
[ "MIT" ]
null
null
null
Models/model.py
alopezgit/project-adapt
e93ab350344a5504f76f4e460002e0163996f88a
[ "MIT" ]
1
2022-03-25T03:05:27.000Z
2022-03-25T03:05:27.000Z
""" Author: Wouter Van Gansbeke Licensed under the CC BY-NC 4.0 license (https://creativecommons.org/licenses/by-nc/4.0/) """ import torch import torch.nn as nn import torch.utils.data import torch.nn.functional as F import numpy as np from .ERFNet import Net import copy import Utils.utils as utils class uncertainty_...
40.046632
172
0.598137
import torch import torch.nn as nn import torch.utils.data import torch.nn.functional as F import numpy as np from .ERFNet import Net import copy import Utils.utils as utils class uncertainty_net(nn.Module): def __init__(self, in_channels, out_channels=1): super(uncertainty_net, self).__init__() o...
true
true
1c0f26ebfd4cc92e227d25e9b38dba933880471a
3,506
py
Python
retriever/try_install_all.py
dmcglinn/retriever
182f0b59b7d4d97efbe5020d90a9eb5892c4d31b
[ "MIT" ]
null
null
null
retriever/try_install_all.py
dmcglinn/retriever
182f0b59b7d4d97efbe5020d90a9eb5892c4d31b
[ "MIT" ]
null
null
null
retriever/try_install_all.py
dmcglinn/retriever
182f0b59b7d4d97efbe5020d90a9eb5892c4d31b
[ "MIT" ]
null
null
null
"""Attempt to install all datasets into all database management systems This module, when run, attempts to install datasets from all Retriever scripts in the /scripts folder (except for those listed in IGNORE), for each engine in ENGINE_LIST() from __init__.py. In other words, it runs trys to install using all possibl...
32.165138
105
0.588135
from __future__ import print_function from __future__ import absolute_import import os import sys from imp import reload from retriever.lib.tools import choose_engine from retriever import MODULE_LIST, ENGINE_LIST, SCRIPT_LIST reload(sys) if hasattr(sys, 'setdefaultencoding'): sys.setdefaultencoding('latin-1') if ...
true
true
1c0f277a5ba2ba0f47289d2d57b9354d0f2a36eb
5,123
py
Python
venv/Lib/site-packages/text_engine/utils/display.py
GabrielAmare/Darts
182748d821b8c1838071f3b28724d0d9b095dcf9
[ "MIT" ]
null
null
null
venv/Lib/site-packages/text_engine/utils/display.py
GabrielAmare/Darts
182748d821b8c1838071f3b28724d0d9b095dcf9
[ "MIT" ]
null
null
null
venv/Lib/site-packages/text_engine/utils/display.py
GabrielAmare/Darts
182748d821b8c1838071f3b28724d0d9b095dcf9
[ "MIT" ]
null
null
null
from tklib37 import * from typing import List from ..base import Result, Result_Unit, Result_List, Result_Error from ..core.results import * class Display_BuilderResult(Frame): CFG = dict(bg="black", fg="yellow", bd=2, relief=RAISED, font=("Consolas", 13), padx=10, pady=4) def __init__(self, root, result: B...
37.948148
138
0.64064
from tklib37 import * from typing import List from ..base import Result, Result_Unit, Result_List, Result_Error from ..core.results import * class Display_BuilderResult(Frame): CFG = dict(bg="black", fg="yellow", bd=2, relief=RAISED, font=("Consolas", 13), padx=10, pady=4) def __init__(self, root, result: B...
true
true
1c0f2814f17aa7eda755b54a968a83201ebd0961
2,148
py
Python
scripts/request_generator.py
linncy/EECS4481-LoadBalancing
263372536a505d822ef5fd3c55ae2b51c653df73
[ "MIT" ]
null
null
null
scripts/request_generator.py
linncy/EECS4481-LoadBalancing
263372536a505d822ef5fd3c55ae2b51c653df73
[ "MIT" ]
null
null
null
scripts/request_generator.py
linncy/EECS4481-LoadBalancing
263372536a505d822ef5fd3c55ae2b51c653df73
[ "MIT" ]
null
null
null
""" HTTP Request Generator. It simulates a number of concurrent users sending requests to the web server. """ from redis import Redis import requests import json import time import threading import sys if len(sys.argv) < 4: print('To few arguments; you need to specify 3 arguments.') print('Default values wil...
32.545455
136
0.643855
from redis import Redis import requests import json import time import threading import sys if len(sys.argv) < 4: print('To few arguments; you need to specify 3 arguments.') print('Default values will be used for server_ip, redis_ip, number of users and interval.\n') server_ip = '127.0.0.1' redis_ip ...
true
true
1c0f28574fac6b39087957c85b8cee0c00d31d11
2,281
py
Python
utils.py
sameh999/kalam
7a867c71daa4d230356d0b85fde2e36397ce608a
[ "MIT" ]
null
null
null
utils.py
sameh999/kalam
7a867c71daa4d230356d0b85fde2e36397ce608a
[ "MIT" ]
null
null
null
utils.py
sameh999/kalam
7a867c71daa4d230356d0b85fde2e36397ce608a
[ "MIT" ]
null
null
null
import torch import librosa from FastSpeech2.buckwalter import ar2bw, bw2ar device = torch.device("cuda" if torch.cuda.is_available() else "cpu") def load_file_to_data(file, srate = 16_000): batch = {} speech, sampling_rate = librosa.load(file, sr=srate) batch["speech"] = speech batch["...
38.016667
99
0.551512
import torch import librosa from FastSpeech2.buckwalter import ar2bw, bw2ar device = torch.device("cuda" if torch.cuda.is_available() else "cpu") def load_file_to_data(file, srate = 16_000): batch = {} speech, sampling_rate = librosa.load(file, sr=srate) batch["speech"] = speech batch["...
true
true
1c0f295fda3f437f0af6f54ab11140e0241d661e
242,927
py
Python
tests/test_edgeql_data_migration.py
sbdchd/edgedb
a70f34d3e5c1477a7755b3531de8f84f2650cf96
[ "Apache-2.0" ]
2
2019-01-21T05:43:52.000Z
2019-05-24T02:53:14.000Z
tests/test_edgeql_data_migration.py
ciusji/edgedb
1c68c02430a92464839f03f43c4e5ad6f7ede4e0
[ "Apache-2.0" ]
null
null
null
tests/test_edgeql_data_migration.py
ciusji/edgedb
1c68c02430a92464839f03f43c4e5ad6f7ede4e0
[ "Apache-2.0" ]
null
null
null
# # This source file is part of the EdgeDB open source project. # # Copyright 2019-present MagicStack Inc. and the EdgeDB 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...
27.542744
79
0.398696
from __future__ import annotations from typing import * import json import os.path import re import textwrap import uuid import edgedb from edb.testbase import server as tb from edb.tools import test class TestEdgeQLDataMigration(tb.DDLTestCase): def normalize_statement(self, s: str) -> str: re_filte...
true
true
1c0f2b047cbfd512deaea0073807a8f69734a6a4
1,293
py
Python
setup.py
ErikWe/github-labels-copy
d7e0f464627cc1accf2049eec48369325373a824
[ "MIT" ]
7
2016-04-29T15:07:02.000Z
2019-04-14T17:07:29.000Z
setup.py
ErikWe/github-labels-copy
d7e0f464627cc1accf2049eec48369325373a824
[ "MIT" ]
4
2017-07-07T23:04:36.000Z
2021-08-16T12:51:49.000Z
setup.py
ErikWe/github-labels-copy
d7e0f464627cc1accf2049eec48369325373a824
[ "MIT" ]
3
2018-04-29T21:46:08.000Z
2021-12-09T21:55:47.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- from setuptools import setup setup(name='githublabelscopy', version='1.1.1', description='A tool to copy labels between repositories using Github API', url='http://github.com/fpietka/github-labels-copy', author='François Pietka', author_email='f...
32.325
80
0.563805
from setuptools import setup setup(name='githublabelscopy', version='1.1.1', description='A tool to copy labels between repositories using Github API', url='http://github.com/fpietka/github-labels-copy', author='François Pietka', author_email='francois@pietka.fr', license='MIT', ...
true
true
1c0f2bc94c58174d7858e5ffb7d64efe482ea8ee
3,367
py
Python
classifier/train.py
va9abund/GAN-traffic-sign
a9e7cc1c6839cdb0f29f68a951040fb27c64f738
[ "MIT" ]
null
null
null
classifier/train.py
va9abund/GAN-traffic-sign
a9e7cc1c6839cdb0f29f68a951040fb27c64f738
[ "MIT" ]
1
2019-05-21T16:32:10.000Z
2019-05-21T16:32:10.000Z
classifier/train.py
va9abund/GAN-traffic-sign
a9e7cc1c6839cdb0f29f68a951040fb27c64f738
[ "MIT" ]
2
2019-10-17T11:45:53.000Z
2021-02-11T01:37:23.000Z
# Python Standard Library from datetime import datetime import json import os import time # Public Libraries from keras.utils import np_utils from keras.models import Sequential from keras.layers import Dense, Conv2D, Flatten, Lambda, Dropout, MaxPooling2D from keras.optimizers import Adam from keras.utils.vis_utils i...
30.0625
80
0.722899
from datetime import datetime import json import os import time from keras.utils import np_utils from keras.models import Sequential from keras.layers import Dense, Conv2D, Flatten, Lambda, Dropout, MaxPooling2D from keras.optimizers import Adam from keras.utils.vis_utils import plot_model from keras.callbacks import ...
true
true
1c0f2bccd9ea04211b0d64557b4d98e1e9d2f723
2,984
py
Python
seahub/api2/permissions.py
jjzhang166/seahub
8ced28759fc1e158196a7743eb149882451f9143
[ "Apache-2.0" ]
null
null
null
seahub/api2/permissions.py
jjzhang166/seahub
8ced28759fc1e158196a7743eb149882451f9143
[ "Apache-2.0" ]
null
null
null
seahub/api2/permissions.py
jjzhang166/seahub
8ced28759fc1e158196a7743eb149882451f9143
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2012-2016 Seafile Ltd. """ Provides a set of pluggable permission policies. """ from rest_framework.permissions import BasePermission from django.conf import settings from seaserv import check_permission, is_repo_owner, ccnet_api from seahub.utils import is_pro_version SAFE_METHODS = ['GET', 'HEAD',...
31.083333
77
0.687332
from rest_framework.permissions import BasePermission from django.conf import settings from seaserv import check_permission, is_repo_owner, ccnet_api from seahub.utils import is_pro_version SAFE_METHODS = ['GET', 'HEAD', 'OPTIONS'] class IsRepoWritable(BasePermission): def has_permission(self, request, view, ...
true
true
1c0f2beecfa68f1cb208bf62a393c2e994745879
14,108
py
Python
python/opae.io/opae/io/utils.py
rchriste1/opae-sdk
a2b08cab139ebfb320a720bab98a6168748561a4
[ "BSD-3-Clause" ]
null
null
null
python/opae.io/opae/io/utils.py
rchriste1/opae-sdk
a2b08cab139ebfb320a720bab98a6168748561a4
[ "BSD-3-Clause" ]
null
null
null
python/opae.io/opae/io/utils.py
rchriste1/opae-sdk
a2b08cab139ebfb320a720bab98a6168748561a4
[ "BSD-3-Clause" ]
null
null
null
# Copyright(c) 2020, Intel Corporation # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, # this list of conditions and the followi...
32.063636
94
0.596328
import contextlib import glob import grp import json import os import pickle import pwd import re import struct import subprocess import sys import uuid import time from enum import Enum from ctypes import Union, LittleEndianStructure, c_uint64 if sys.version_info[0] == 3: from pathlib import Path else: from...
true
true
1c0f2c585b2baa70d6ec7d59aab5fb6fa95ad0b4
275
py
Python
exercise 2.py
lucasdasneves/python_puc_minas
aae6f9407e9709130b0f38a8b227cd72b168b80a
[ "MIT" ]
null
null
null
exercise 2.py
lucasdasneves/python_puc_minas
aae6f9407e9709130b0f38a8b227cd72b168b80a
[ "MIT" ]
null
null
null
exercise 2.py
lucasdasneves/python_puc_minas
aae6f9407e9709130b0f38a8b227cd72b168b80a
[ "MIT" ]
null
null
null
#exercise 2 #Faça um programa para calcular e exibir o valor de 𝑃, onde 𝑥, 𝑎 #e 𝑁 são informados pelo usuário, sendo 𝑁 o número de #termos da sequência: #Ao final, você deverá armazenar e imprimir todos os termos da #sequência e o valor de 𝑃. #𝑃 = 𝑎𝑥^1 + 𝑎𝑥^2 + ... + 𝑎𝑥^n
27.5
64
0.705455
true
true
1c0f2d73c86e8cde46811620362bf4f13c1e1afa
2,607
py
Python
python3/koans/07_about_classes.py
shjohnson/python_code_academy
766be7c2df2c89b9ccabdc9641729603cfd85fe3
[ "MIT" ]
2
2019-04-29T13:42:30.000Z
2019-12-10T12:50:06.000Z
python3/koans/07_about_classes.py
shjohnson/python_code_academy
766be7c2df2c89b9ccabdc9641729603cfd85fe3
[ "MIT" ]
null
null
null
python3/koans/07_about_classes.py
shjohnson/python_code_academy
766be7c2df2c89b9ccabdc9641729603cfd85fe3
[ "MIT" ]
2
2019-03-27T17:30:19.000Z
2019-04-01T11:07:00.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- from runner.koan import * class AboutClasses(Koan): class Dog: "Dogs need regular walkies. Never, ever let them drive." def test_instances_of_classes_can_be_created_adding_parentheses(self): # NOTE: The .__name__ attribute will convert the class ...
26.602041
79
0.560798
from runner.koan import * class AboutClasses(Koan): class Dog: def test_instances_of_classes_can_be_created_adding_parentheses(self): fido = self.Dog() self.assertEqual(__, fido.__class__.__name__) class Dog2: def __init__(self): self._name = 'Paul' ...
true
true
1c0f2edaa8dd0addd7a9046d2ca72ee929b1b0c0
883
py
Python
src/functions.py
cosmicBboy/software20
f956a898aeabcb4de1cea59eb0f1d864bf2b343a
[ "MIT" ]
null
null
null
src/functions.py
cosmicBboy/software20
f956a898aeabcb4de1cea59eb0f1d864bf2b343a
[ "MIT" ]
null
null
null
src/functions.py
cosmicBboy/software20
f956a898aeabcb4de1cea59eb0f1d864bf2b343a
[ "MIT" ]
null
null
null
from enum import Enum from typing import List, Tuple from software20 import optimize from software20.typing import Identity, Cluster, OrderedEnum @optimize def detect_spam(text: str) -> bool: ... @detect_spam.parser def _(datum: str) -> Tuple[str, bool]: target, text = datum.split("\t") return [text], ...
16.980769
90
0.676104
from enum import Enum from typing import List, Tuple from software20 import optimize from software20.typing import Identity, Cluster, OrderedEnum @optimize def detect_spam(text: str) -> bool: ... @detect_spam.parser def _(datum: str) -> Tuple[str, bool]: target, text = datum.split("\t") return [text], ...
true
true
1c0f2f604315430e31d53a5a2d79bb75991fca83
2,904
py
Python
homeassistant/components/supla/cover.py
domwillcode/home-assistant
f170c80bea70c939c098b5c88320a1c789858958
[ "Apache-2.0" ]
6
2020-07-18T16:33:25.000Z
2021-09-26T09:52:04.000Z
homeassistant/components/supla/cover.py
domwillcode/home-assistant
f170c80bea70c939c098b5c88320a1c789858958
[ "Apache-2.0" ]
47
2020-07-23T07:13:11.000Z
2022-03-31T06:01:46.000Z
homeassistant/components/supla/cover.py
klauern/home-assistant-core
c18ba6aec0627e6afb6442c678edb5ff2bb17db6
[ "Apache-2.0" ]
5
2020-03-29T00:29:13.000Z
2021-09-06T20:58:40.000Z
"""Support for Supla cover - curtains, rollershutters, entry gate etc.""" import logging from pprint import pformat from homeassistant.components.cover import ( ATTR_POSITION, DEVICE_CLASS_GARAGE, CoverEntity, ) from homeassistant.components.supla import SuplaChannel _LOGGER = logging.getLogger(__name__) ...
28.194175
77
0.629477
import logging from pprint import pformat from homeassistant.components.cover import ( ATTR_POSITION, DEVICE_CLASS_GARAGE, CoverEntity, ) from homeassistant.components.supla import SuplaChannel _LOGGER = logging.getLogger(__name__) SUPLA_SHUTTER = "CONTROLLINGTHEROLLERSHUTTER" SUPLA_GATE = "CONTROLLINGTH...
true
true
1c0f2ffebc9e80b8d4fd4e62fe9616c46acd9888
5,683
py
Python
worm.py
zH4x/NetWorm
501828fc5d6442b4859dfc34f1df74ccae470726
[ "MIT" ]
1
2020-03-20T16:50:32.000Z
2020-03-20T16:50:32.000Z
worm.py
AmmarHaddadi/NetWorm
501828fc5d6442b4859dfc34f1df74ccae470726
[ "MIT" ]
null
null
null
worm.py
AmmarHaddadi/NetWorm
501828fc5d6442b4859dfc34f1df74ccae470726
[ "MIT" ]
2
2021-03-12T16:10:55.000Z
2021-05-19T09:46:50.000Z
#################################### # File name: worm.py # # Author: Filip Komárek (pylyf) # # Status: Development # # Date created: 7/6/2018 # #################################### import nmap import paramiko import os import coloredlogs, logging import socket from ur...
27.587379
138
0.610065
import nmap import paramiko import os import coloredlogs, logging import socket from urllib.request import urlopen import urllib import time from ftplib import FTP import ftplib from shutil import copy2 import win32api import netifaces logger = logging.getLogger(__name__) coloredlogs.install(level='DEBU...
true
true
1c0f301200a2a36f8e6c23ff4ea006fc4c2ff138
1,834
py
Python
modulo 3/exercicios/Ex084 - Cadastros com lista composta.py
GabrielBrotas/Python
9441b6b86ff3cb7fa5921b508c484075adac08b3
[ "MIT" ]
null
null
null
modulo 3/exercicios/Ex084 - Cadastros com lista composta.py
GabrielBrotas/Python
9441b6b86ff3cb7fa5921b508c484075adac08b3
[ "MIT" ]
null
null
null
modulo 3/exercicios/Ex084 - Cadastros com lista composta.py
GabrielBrotas/Python
9441b6b86ff3cb7fa5921b508c484075adac08b3
[ "MIT" ]
null
null
null
# programa que leia o nome e peso de varias pessoas guardando tudo em uma lista e no final mostre: # a) quantas pessoas foram cadastradas, b) Uma listagem com as pessoas mais pesadas, c)uma listagem com as pessoas mais leves dados = [] pessoas = [] pes = 0 lev = 0 pesado = [] leve = [] while True: # ----------------...
26.2
125
0.497819
dados = [] pessoas = [] pes = 0 lev = 0 pesado = [] leve = [] while True: dados.append(str(input('Nome: ')).strip().title()) dados.append((float(input('peso: ')))) pessoas.append(dados[:]) if len(pessoas) == 1: pes = lev = dados[1] pesado.append(dados[:]) leve.append(dados[:]...
true
true
1c0f31272d8dec257802387d260edc58e7577ca9
3,443
py
Python
examples/lm1b/configs/default.py
mattjj/flax
ebc8df57a4e982eaa82f6e5b0d5a399c9bae2032
[ "Apache-2.0" ]
1
2022-02-27T13:50:55.000Z
2022-02-27T13:50:55.000Z
examples/lm1b/configs/default.py
mattjj/flax
ebc8df57a4e982eaa82f6e5b0d5a399c9bae2032
[ "Apache-2.0" ]
null
null
null
examples/lm1b/configs/default.py
mattjj/flax
ebc8df57a4e982eaa82f6e5b0d5a399c9bae2032
[ "Apache-2.0" ]
null
null
null
# Copyright 2022 The Flax 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 wri...
28.454545
76
0.743538
import ml_collections def get_config(): config = ml_collections.ConfigDict() config.vocab_path = None config.vocab_size = 30_000 config.max_corpus_chars = 10**7 config.dataset_name = "lm1b" config.eval_dataset_name = "lm1b" config.eval_split = "test" config.per_device_batch_size = 32...
true
true
1c0f31742892ba77513b4e9e81f4f04084dec225
164
py
Python
stubs.min/System/Windows/__init___parts/FontStyles.py
denfromufa/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
1
2017-07-07T11:15:45.000Z
2017-07-07T11:15:45.000Z
stubs.min/System/Windows/__init___parts/FontStyles.py
hdm-dt-fb/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
null
null
null
stubs.min/System/Windows/__init___parts/FontStyles.py
hdm-dt-fb/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
null
null
null
class FontStyles(object): """ Provides a set of static predefined System.Windows.FontStyle values. """ Italic=None Normal=None Oblique=None __all__=[]
20.5
78
0.713415
class FontStyles(object): Italic=None Normal=None Oblique=None __all__=[]
true
true
1c0f34aae7a78df3b3d2ad542c979c63cd2a503b
698
py
Python
det3d/datasets/__init__.py
alsun-oven/CenterPoint
cafd89c4008270e648e97202bc256aff968e8109
[ "MIT" ]
1,124
2020-06-22T00:48:18.000Z
2022-03-31T22:03:35.000Z
det3d/datasets/__init__.py
alsun-oven/CenterPoint
cafd89c4008270e648e97202bc256aff968e8109
[ "MIT" ]
290
2020-06-23T01:29:04.000Z
2022-03-29T16:27:32.000Z
det3d/datasets/__init__.py
alsun-oven/CenterPoint
cafd89c4008270e648e97202bc256aff968e8109
[ "MIT" ]
326
2020-06-22T01:48:10.000Z
2022-03-31T08:15:08.000Z
from .builder import build_dataset # from .cityscapes import CityscapesDataset from .nuscenes import NuScenesDataset from .waymo import WaymoDataset # from .custom import CustomDataset from .dataset_wrappers import ConcatDataset, RepeatDataset # from .extra_aug import ExtraAugmentation from .loader import Distribute...
24.928571
75
0.777937
from .builder import build_dataset from .nuscenes import NuScenesDataset from .waymo import WaymoDataset from .dataset_wrappers import ConcatDataset, RepeatDataset from .loader import DistributedGroupSampler, GroupSampler, build_dataloader from .registry import DATASETS __all__ = [ "CustomDataset", "GroupSa...
true
true
1c0f34fc90c4fa4c9fc744ebd836e643459a80f2
37,356
py
Python
googleads/ad_manager.py
siilats/googleads-python-lib
d82a9cb75a4b2d602d02039536443f5b30157a43
[ "Apache-2.0" ]
null
null
null
googleads/ad_manager.py
siilats/googleads-python-lib
d82a9cb75a4b2d602d02039536443f5b30157a43
[ "Apache-2.0" ]
null
null
null
googleads/ad_manager.py
siilats/googleads-python-lib
d82a9cb75a4b2d602d02039536443f5b30157a43
[ "Apache-2.0" ]
null
null
null
# Copyright 2013 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
36.986139
80
0.672074
import csv import datetime import logging import numbers import os import sys import time from urllib.request import build_opener import pytz import googleads.common import googleads.errors DEFAULT_APPLICATION_NAME = 'INSERT_APPLICATION_NAME_HERE' DEFAULT_ENDPOINT = 'https://ads.google.com' SUGGESTED_PAGE_LIMIT = ...
true
true
1c0f36e18899f3283ff8cec6ea36c70bcb741655
44,168
py
Python
flink-python/pyflink/table/tests/test_descriptor.py
PrachiPrakash/flink
6d7a15e328e8af6f001d6191c3f167bd8038bf14
[ "Apache-2.0" ]
1
2020-05-12T09:30:56.000Z
2020-05-12T09:30:56.000Z
flink-python/pyflink/table/tests/test_descriptor.py
PrachiPrakash/flink
6d7a15e328e8af6f001d6191c3f167bd8038bf14
[ "Apache-2.0" ]
1
2019-06-07T13:04:18.000Z
2019-06-07T13:04:18.000Z
flink-python/pyflink/table/tests/test_descriptor.py
PrachiPrakash/flink
6d7a15e328e8af6f001d6191c3f167bd8038bf14
[ "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...
40.079855
99
0.557893
import os from pyflink.table.descriptors import (FileSystem, OldCsv, Rowtime, Schema, Kafka, Elasticsearch, Csv, Avro, Json, CustomConnectorDescriptor, CustomFormatDescriptor) from pyflink.table.table_schema import TableSchema from pyflink.t...
true
true
1c0f3764977078a116ccfb4232a545c382addc11
1,943
py
Python
bert-pair/code/proto.py
th-nuernberg/fe-relation-extraction-natl21
e74e29020190bdcf7badff73ccdcb642d7f9d7a3
[ "Apache-2.0" ]
null
null
null
bert-pair/code/proto.py
th-nuernberg/fe-relation-extraction-natl21
e74e29020190bdcf7badff73ccdcb642d7f9d7a3
[ "Apache-2.0" ]
null
null
null
bert-pair/code/proto.py
th-nuernberg/fe-relation-extraction-natl21
e74e29020190bdcf7badff73ccdcb642d7f9d7a3
[ "Apache-2.0" ]
null
null
null
import sys sys.path.append('..') import fewshot_re_kit import torch from torch import autograd, optim, nn from torch.autograd import Variable from torch.nn import functional as F class Proto(fewshot_re_kit.framework.FewShotREModel): def __init__(self, sentence_encoder, dot=False): fewshot_re_kit.frame...
34.696429
97
0.607308
import sys sys.path.append('..') import fewshot_re_kit import torch from torch import autograd, optim, nn from torch.autograd import Variable from torch.nn import functional as F class Proto(fewshot_re_kit.framework.FewShotREModel): def __init__(self, sentence_encoder, dot=False): fewshot_re_kit.frame...
true
true
1c0f378451a1b3d21ebbbae9c7322cd0d77e4bb9
25,929
py
Python
reinforcement_train/onmt/io/TextDataset.py
songhaoyu/RCDG
962c3b5803b766bd25577460aa90c2741d500d99
[ "MIT" ]
35
2021-03-17T08:00:57.000Z
2022-01-21T06:27:57.000Z
NLI_pretrain/onmt/io/TextDataset.py
songhaoyu/RCDG
962c3b5803b766bd25577460aa90c2741d500d99
[ "MIT" ]
null
null
null
NLI_pretrain/onmt/io/TextDataset.py
songhaoyu/RCDG
962c3b5803b766bd25577460aa90c2741d500d99
[ "MIT" ]
3
2021-04-14T11:15:45.000Z
2021-10-10T13:21:00.000Z
# -*- coding: utf-8 -*- from collections import Counter from itertools import chain import io import codecs import sys import torch import torchtext from onmt.Utils import aeq from onmt.io.DatasetBase import ONMTDatasetBase, PAD_WORD, BOS_WORD, EOS_WORD from torch.nn.functional import Variable from torchtext.data.f...
39.707504
109
0.549925
from collections import Counter from itertools import chain import io import codecs import sys import torch import torchtext from onmt.Utils import aeq from onmt.io.DatasetBase import ONMTDatasetBase, PAD_WORD, BOS_WORD, EOS_WORD from torch.nn.functional import Variable from torchtext.data.field import Field class...
true
true
1c0f37d99148b8729de82423034e05252ea0402e
7,955
py
Python
ds4se/infoxplainer/description/eval/traceability.py
WM-CSCI-435-F19/data-science-4-software-engineering
3692163df710550d4ee5b399a2a184968a0f18c6
[ "Apache-2.0" ]
5
2020-12-08T00:38:24.000Z
2021-11-16T20:00:59.000Z
ds4se/infoxplainer/description/eval/traceability.py
WM-CSCI-435-F19/data-science-4-software-engineering
3692163df710550d4ee5b399a2a184968a0f18c6
[ "Apache-2.0" ]
110
2020-09-26T18:36:35.000Z
2022-03-12T00:54:35.000Z
ds4se/infoxplainer/description/eval/traceability.py
WM-CSCI-435-F19/data-science-4-software-engineering
3692163df710550d4ee5b399a2a184968a0f18c6
[ "Apache-2.0" ]
3
2020-12-09T19:23:10.000Z
2021-02-16T12:54:16.000Z
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/4.5_infoxplainer.description.eval.traceability.ipynb (unless otherwise specified). __all__ = ['VectorEvaluation', 'ExploratoryDataSoftwareAnalysis'] # Cell import ds4se as ds from ....mining.ir import VectorizationType from ....mining.ir import SimilarityMetric from ......
37.701422
177
0.586549
__all__ = ['VectorEvaluation', 'ExploratoryDataSoftwareAnalysis'] import ds4se as ds from ....mining.ir import VectorizationType from ....mining.ir import SimilarityMetric from ....mining.ir import EntropyMetric import numpy as np import gensim import pandas as pd from itertools import product from random import sa...
true
true
1c0f386b3b9b12a3476b9e6815b0049798883214
11,138
py
Python
src/condor_tests/htcondor_tests.py
neurodebian/htcondor
113a5c9921a4fce8a21e3ab96b2c1ba47441bf39
[ "Apache-2.0" ]
1
2017-02-13T01:25:34.000Z
2017-02-13T01:25:34.000Z
src/condor_tests/htcondor_tests.py
neurodebian/htcondor
113a5c9921a4fce8a21e3ab96b2c1ba47441bf39
[ "Apache-2.0" ]
1
2021-04-06T04:19:40.000Z
2021-04-06T04:19:40.000Z
src/condor_tests/htcondor_tests.py
neurodebian/htcondor
113a5c9921a4fce8a21e3ab96b2c1ba47441bf39
[ "Apache-2.0" ]
2
2017-11-09T01:42:58.000Z
2020-07-14T20:20:05.000Z
#!/usr/bin/env python import os import re import time import errno import signal import socket import classad import unittest class TestConfig(unittest.TestCase): def setUp(self): os.environ["_condor_FOO"] = "BAR" htcondor.reload_config() def test_config(self): self.assertEquals(htco...
40.355072
150
0.621566
import os import re import time import errno import signal import socket import classad import unittest class TestConfig(unittest.TestCase): def setUp(self): os.environ["_condor_FOO"] = "BAR" htcondor.reload_config() def test_config(self): self.assertEquals(htcondor.param["FOO"], "BA...
false
true
1c0f38899904e74f6795a05e9f97b9f599570bb0
1,308
py
Python
neural_network/analyzer.py
VictorRodriguez/master-computer
b5b1199c8fa1725e2409c75fe365b369187eb397
[ "Apache-2.0" ]
null
null
null
neural_network/analyzer.py
VictorRodriguez/master-computer
b5b1199c8fa1725e2409c75fe365b369187eb397
[ "Apache-2.0" ]
null
null
null
neural_network/analyzer.py
VictorRodriguez/master-computer
b5b1199c8fa1725e2409c75fe365b369187eb397
[ "Apache-2.0" ]
null
null
null
import glob import csv def get_my_string(file): try: with open(file) as inputFileHandle: return inputFileHandle.read() except IOError: sys.stderr.write( "[myScript] - Error: Could not open %s\n" % (file) ) sys.exit(-1) if __name__ == '__main__': num_hidden_array = [] ...
23.357143
106
0.673547
import glob import csv def get_my_string(file): try: with open(file) as inputFileHandle: return inputFileHandle.read() except IOError: sys.stderr.write( "[myScript] - Error: Could not open %s\n" % (file) ) sys.exit(-1) if __name__ == '__main__': num_hidden_array = [] ...
false
true
1c0f38d3008dc107bcc5831f4e67a287f3498437
5,255
py
Python
deepcarskit/model/neucf/neucmfw0.py
irecsys/DeepCARSKit
20b861728efa0b416075d2e26c102c509923848e
[ "MIT" ]
null
null
null
deepcarskit/model/neucf/neucmfw0.py
irecsys/DeepCARSKit
20b861728efa0b416075d2e26c102c509923848e
[ "MIT" ]
null
null
null
deepcarskit/model/neucf/neucmfw0.py
irecsys/DeepCARSKit
20b861728efa0b416075d2e26c102c509923848e
[ "MIT" ]
1
2022-03-23T07:02:59.000Z
2022-03-23T07:02:59.000Z
# -*- coding: utf-8 -*- # @Time : 2022 # @Author : Yong Zheng r""" NeuCMFw0 ################################################ References ----- Yong Zheng, Gonzalo Florez Arias. "A Family of Neural Contextual Matrix Factorization Models for Context-Aware Recommendations", ACM UMAP, 2022 Notes ----- 1). NeuCMFw0 has...
42.379032
143
0.687345
import torch import torch.nn as nn from torch.nn.init import normal_ from deepcarskit.model.context_recommender import ContextRecommender from recbole.model.layers import MLPLayers from recbole.utils import InputType, EvaluatorType class NeuCMFw0(ContextRecommender): input_type = InputType.POINTWISE de...
true
true
1c0f3929aaa135b9763bba246d6652b28cc98aa3
3,446
py
Python
startrek/startrek.py
drinkfalconpunch/star-trek
33c8155f94f11832d925a733b1f3ed6eecdcb31e
[ "MIT" ]
1
2019-08-21T18:56:42.000Z
2019-08-21T18:56:42.000Z
startrek/startrek.py
drinkfalconpunch/star-trek
33c8155f94f11832d925a733b1f3ed6eecdcb31e
[ "MIT" ]
2
2021-03-31T19:22:55.000Z
2021-06-02T00:17:04.000Z
startrek/startrek.py
drinkfalconpunch/star-trek
33c8155f94f11832d925a733b1f3ed6eecdcb31e
[ "MIT" ]
null
null
null
from startrek.episode import Series from startrek.spider import StarTrekSpider from imdb import IMDb class StarTrek: _star_trek = { "Movies": { "short_name": ["movies"], "imdb_movie_number": 0 }, "The Next Generation": { "short_name": ["tng"], ...
34.46
102
0.616367
from startrek.episode import Series from startrek.spider import StarTrekSpider from imdb import IMDb class StarTrek: _star_trek = { "Movies": { "short_name": ["movies"], "imdb_movie_number": 0 }, "The Next Generation": { "short_name": ["tng"], ...
true
true
1c0f3a359ce7e0cdc86c2503704c526a55b20d6a
4,605
py
Python
tests/bugs/core_5325_test.py
reevespaul/firebird-qa
98f16f425aa9ab8ee63b86172f959d63a2d76f21
[ "MIT" ]
null
null
null
tests/bugs/core_5325_test.py
reevespaul/firebird-qa
98f16f425aa9ab8ee63b86172f959d63a2d76f21
[ "MIT" ]
null
null
null
tests/bugs/core_5325_test.py
reevespaul/firebird-qa
98f16f425aa9ab8ee63b86172f959d63a2d76f21
[ "MIT" ]
null
null
null
#coding:utf-8 # # id: bugs.core_5325 # title: Malformed string error when using cyrilic symbols and x'0d0a' in exception # decription: # Ticked is marked as Won't fix, but it seems that sample shown by Adriano is useful for testing. # Checked on old versions: 3.0....
33.613139
132
0.572204
# Checked on old versions: 3.0.0.32483, 3.0.2.32703, 3.0.4.32972 -- works OK. # # 05-mar-2021. Re-implemented in order to have ability to run this test on Linux. # Test encodes to UTF8 all needed statements (SET NAMES; CONNECT; DDL and DML) and stores...
true
true
1c0f3ce268aa2e122ce07af6b1ee92b5475cbf0d
128
py
Python
day01.py
zhuanqiguozhibozaq/zxcvbnm
62e4762eb63e109379ad27543697e4787df71add
[ "Apache-2.0" ]
null
null
null
day01.py
zhuanqiguozhibozaq/zxcvbnm
62e4762eb63e109379ad27543697e4787df71add
[ "Apache-2.0" ]
null
null
null
day01.py
zhuanqiguozhibozaq/zxcvbnm
62e4762eb63e109379ad27543697e4787df71add
[ "Apache-2.0" ]
null
null
null
print('Hello world') def Joker(num): return num * 10 if __name__ =="__main__": print(Joker(10))
14.222222
26
0.523438
print('Hello world') def Joker(num): return num * 10 if __name__ =="__main__": print(Joker(10))
true
true
1c0f3dd109e3d5f4d91b5cddcfa31292fec38799
11,929
py
Python
doc/source/sphinxext/sphinxcontrib/spelling.py
veronicatozzo/DaLiLa
9d8ed4a1adb0a57316e6ca41852da97ffeb23996
[ "BSD-2-Clause" ]
17
2016-04-05T15:23:20.000Z
2019-09-13T09:41:27.000Z
doc/source/sphinxext/sphinxcontrib/spelling.py
veronicatozzo/DaLiLa
9d8ed4a1adb0a57316e6ca41852da97ffeb23996
[ "BSD-2-Clause" ]
2
2016-04-04T12:25:16.000Z
2016-07-27T12:58:32.000Z
doc/source/sphinxext/sphinxcontrib/spelling.py
veronicatozzo/DaLiLa
9d8ed4a1adb0a57316e6ca41852da97ffeb23996
[ "BSD-2-Clause" ]
2
2017-09-12T06:18:37.000Z
2018-05-03T03:00:32.000Z
#!/usr/bin/env python # encoding: utf-8 # # Copyright (c) 2010 Doug Hellmann. All rights reserved. # """Spelling checker extension for Sphinx. """ import codecs import collections import imp import itertools import os import re import textwrap import tempfile import xmlrpclib #from docutils import core from docutils...
34.778426
93
0.607176
import codecs import collections import imp import itertools import os import re import textwrap import tempfile import xmlrpclib from docutils.frontend import OptionParser from docutils.io import StringOutput import docutils.nodes from docutils.nodes import GenericNodeVisitor from docutils.parsers import rst from do...
true
true
1c0f3deb95eb9fc27961a33ab4dc07d76d19c222
8,591
py
Python
zoo/policies/cross-rl-agent/cross_rl_agent/train/run_test.py
MCZhi/SMARTS
3ef5650b04ac6fb7145cf4e23d5534d73e0929fc
[ "MIT" ]
2
2021-12-13T12:41:54.000Z
2021-12-16T03:10:24.000Z
zoo/policies/cross-rl-agent/cross_rl_agent/train/run_test.py
MCZhi/SMARTS
3ef5650b04ac6fb7145cf4e23d5534d73e0929fc
[ "MIT" ]
null
null
null
zoo/policies/cross-rl-agent/cross_rl_agent/train/run_test.py
MCZhi/SMARTS
3ef5650b04ac6fb7145cf4e23d5534d73e0929fc
[ "MIT" ]
null
null
null
# Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to us...
34.09127
106
0.600047
import argparse import logging import warnings import gym import numpy as np import tensorflow as tf from ac_network import ActorNetwork, CriticNetwork from adapters import ( action_adapter, cross_interface, get_aux_info, observation_adapter, reward_adapter, ) from config import HyperParameters f...
true
true
1c0f3e07f059b42b6e1e1ec64159b8848230485d
5,433
py
Python
pysnmp/MIB-INTEL-RIP.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
11
2021-02-02T16:27:16.000Z
2021-08-31T06:22:49.000Z
pysnmp/MIB-INTEL-RIP.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
75
2021-02-24T17:30:31.000Z
2021-12-08T00:01:18.000Z
pysnmp/MIB-INTEL-RIP.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module MIB-INTEL-RIP (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/MIB-INTEL-RIP # Produced by pysmi-0.3.4 at Mon Apr 29 20:01:48 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 201...
115.595745
567
0.757224
Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsIntersection, ConstraintsUnion, ValueRangeConstraint, SingleValueConstraint, ValueSizeConstraint = mibBuilder.impo...
true
true
1c0f3f52be97213483c439d1cdda91ed795010ac
25,813
py
Python
SMC_V3_11302020.py
pesavent/SMC
8e53f73b81798761ef3aad3dc94e550eb83a3d9b
[ "MIT" ]
null
null
null
SMC_V3_11302020.py
pesavent/SMC
8e53f73b81798761ef3aad3dc94e550eb83a3d9b
[ "MIT" ]
null
null
null
SMC_V3_11302020.py
pesavent/SMC
8e53f73b81798761ef3aad3dc94e550eb83a3d9b
[ "MIT" ]
null
null
null
# This python script was written by a simple biochemist with little formal programming training. Is the code great? # Nope, but it is indeed functional. The program was designed to accomplish a few quick # tasks, namely: how many ms2 events occur for a given precursors mass, summing ms2 ions for a given precursor # ma...
40.843354
166
0.540774
# me at jjp6@stmarys-ca.edu. # If using pyinstaller to make windows and mac executable programs, you must downgrade # matplotlib to version 3.1.0 or else it bugs out. import numpy as np import tkinter as tk import time, sys import matplotlib #import matplotlib.pyplot as plt import matplotlib.backends._tkagg matplotl...
true
true