hexsha
stringlengths
40
40
size
int64
7
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
125
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
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
247
max_issues_repo_name
stringlengths
4
125
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
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
247
max_forks_repo_name
stringlengths
4
125
max_forks_repo_head_hexsha
stringlengths
40
78
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
1
1.04M
avg_line_length
float64
1.77
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
7
1.04M
filtered:remove_function_no_docstring
int64
-102
942k
filtered:remove_class_no_docstring
int64
-354
977k
filtered:remove_delete_markers
int64
0
60.1k
36b5baa6bcd6f0e6d530726507232ed96303b6b6
2,424
py
Python
Examples/2017 code/GetDatasetfromFiles.py
VickyBize/predicting-depression-with-nn
7261033e8e89944292082d7788b1b05929edfe28
[ "MIT" ]
null
null
null
Examples/2017 code/GetDatasetfromFiles.py
VickyBize/predicting-depression-with-nn
7261033e8e89944292082d7788b1b05929edfe28
[ "MIT" ]
null
null
null
Examples/2017 code/GetDatasetfromFiles.py
VickyBize/predicting-depression-with-nn
7261033e8e89944292082d7788b1b05929edfe28
[ "MIT" ]
null
null
null
import os import re import sys import numpy as np from collections import Counter import collections import h5py import pandas as pd pathname = os.path.abspath('C:\\Users\\Vicky\\Desktop\\Courses\\Avi\\erisk collections_2017_2018\\erisk collections\\2017\\2test') os.chdir(pathname) #############Read Outpu...
31.894737
131
0.492574
import os import re import sys import numpy as np from collections import Counter import collections import h5py import pandas as pd pathname = os.path.abspath('C:\\Users\\Vicky\\Desktop\\Courses\\Avi\\erisk collections_2017_2018\\erisk collections\\2017\\2test') os.chdir(pathname) #############Read Outpu...
0
0
0
e431ba97f53ff9a52b67b4a4e5466ab127b70b94
619
py
Python
two_b.py
pkpatricia/python34
5ee4f864444b8835f8ee6cf416bc9fd1d969595b
[ "bzip2-1.0.6" ]
null
null
null
two_b.py
pkpatricia/python34
5ee4f864444b8835f8ee6cf416bc9fd1d969595b
[ "bzip2-1.0.6" ]
null
null
null
two_b.py
pkpatricia/python34
5ee4f864444b8835f8ee6cf416bc9fd1d969595b
[ "bzip2-1.0.6" ]
null
null
null
color =["red", "green", "purple", "orange", "blue", "yellow"] pick = input("What is your favorite color ? ") if pick in color: # Storing the rank of the color picked rank = color.index(pick) + 1 # Check if the color is in your list if rank == 1: print("That is my favorite color.")...
22.107143
61
0.560582
color =["red", "green", "purple", "orange", "blue", "yellow"] pick = input("What is your favorite color ? ") if pick in color: # Storing the rank of the color picked rank = color.index(pick) + 1 # Check if the color is in your list if rank == 1: print("That is my favorite color.")...
0
0
0
138129d74b8b0f40430669bc72780639a642852c
913
py
Python
crds/tests/profile_pickling.py
nden/crds
b72f14cf07531ca70b61daa6b58e762e5899afa4
[ "BSD-3-Clause" ]
null
null
null
crds/tests/profile_pickling.py
nden/crds
b72f14cf07531ca70b61daa6b58e762e5899afa4
[ "BSD-3-Clause" ]
null
null
null
crds/tests/profile_pickling.py
nden/crds
b72f14cf07531ca70b61daa6b58e762e5899afa4
[ "BSD-3-Clause" ]
null
null
null
"""This module is used to profile getrecommendations() and bestreds.BestrefsScript().""" from crds.python23 import pickle import crds from crds.tests.test_config import run_and_profile from crds import data_file if __name__ == "__main__": run_and_profile("HST pickle/unpickle", "pickle_unpickle('hst.pmap', 'dat...
30.433333
112
0.674699
"""This module is used to profile getrecommendations() and bestreds.BestrefsScript().""" from crds.python23 import pickle import crds from crds.tests.test_config import run_and_profile from crds import data_file def pickle_unpickle(context, data): p = crds.get_cached_mapping(context) p.get_required_parkeys(...
534
0
23
3dc7b538e16ff53c625f59a59f95f1ba42f7458d
8,507
py
Python
main.py
cypri99/Off-White-AccGen
e9956265f71ed43b7d14799296143402afd97107
[ "MIT" ]
2
2020-02-15T02:27:05.000Z
2020-04-19T01:15:37.000Z
main.py
cypri99/Off-White-AccGen
e9956265f71ed43b7d14799296143402afd97107
[ "MIT" ]
1
2020-02-15T04:43:05.000Z
2020-02-15T05:16:03.000Z
main.py
cypri99/Off-White-AccGen
e9956265f71ed43b7d14799296143402afd97107
[ "MIT" ]
2
2020-02-15T03:50:37.000Z
2020-05-17T22:00:54.000Z
import requests from colorama import Fore, init from threading import Thread import random, time, names, string, json, os from threading import Lock from random import choice s_print_lock = Lock() def s_print(*a, **b): """Thread safe print function""" with s_print_lock: print(*a, **b) def get_prox...
37.311404
255
0.543787
import requests from colorama import Fore, init from threading import Thread import random, time, names, string, json, os from threading import Lock from random import choice s_print_lock = Lock() def s_print(*a, **b): """Thread safe print function""" with s_print_lock: print(*a, **b) def log(tag,...
5,348
0
92
09c29307b8a660f980d0a78500b3685e3278ae6c
1,333
py
Python
coding_interviews/leetcode/easy/count_students/count_students.py
LeandroTk/Algorithms
569ed68eba3eeff902f8078992099c28ce4d7cd6
[ "MIT" ]
205
2018-12-01T17:49:49.000Z
2021-12-22T07:02:27.000Z
coding_interviews/leetcode/easy/count_students/count_students.py
LeandroTk/Algorithms
569ed68eba3eeff902f8078992099c28ce4d7cd6
[ "MIT" ]
2
2020-01-01T16:34:29.000Z
2020-04-26T19:11:13.000Z
coding_interviews/leetcode/easy/count_students/count_students.py
LeandroTk/Algorithms
569ed68eba3eeff902f8078992099c28ce4d7cd6
[ "MIT" ]
50
2018-11-28T20:51:36.000Z
2021-11-29T04:08:25.000Z
# https://leetcode.com/problems/number-of-students-unable-to-eat-lunch
25.634615
132
0.548387
# https://leetcode.com/problems/number-of-students-unable-to-eat-lunch def is_empty(arr): return len(arr) == 0 def count_students(students, sandwiches): preferred_circles = 0 preferred_squares = 0 for student in students: if student: preferred_squares += 1 else: ...
1,188
0
73
44c2bc408c2a5287fbf1d032d22a1fdf9c32764f
3,477
py
Python
tests/layer_tests/tensorflow_tests/test_tf_ScatterND.py
pfinashx/openvino
1d417e888b508415510fb0a92e4a9264cf8bdef7
[ "Apache-2.0" ]
1
2022-02-26T17:33:44.000Z
2022-02-26T17:33:44.000Z
tests/layer_tests/tensorflow_tests/test_tf_ScatterND.py
pfinashx/openvino
1d417e888b508415510fb0a92e4a9264cf8bdef7
[ "Apache-2.0" ]
18
2022-01-21T08:42:58.000Z
2022-03-28T13:21:31.000Z
tests/layer_tests/tensorflow_tests/test_tf_ScatterND.py
pfinashx/openvino
1d417e888b508415510fb0a92e4a9264cf8bdef7
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2018-2022 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import numpy as np import pytest from openvino.tools.mo.front.common.partial_infer.utils import int64_array, float32_array from unit_tests.utils.graph import build_graph, regular_op_with_shaped_data, connect, \ shaped_data, connect_f...
47.630137
113
0.572332
# Copyright (C) 2018-2022 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import numpy as np import pytest from openvino.tools.mo.front.common.partial_infer.utils import int64_array, float32_array from unit_tests.utils.graph import build_graph, regular_op_with_shaped_data, connect, \ shaped_data, connect_f...
1,300
1,662
23
91e21c4e14706dc08066abf07ddc50830bdd919e
342
py
Python
python/pygecko/fake/__init__.py
MomsFriendlyRobotCompany/gecko
f340381113bdb423a39d47aaee61e013bb9e002a
[ "MIT" ]
3
2019-06-13T07:52:12.000Z
2020-07-05T13:28:43.000Z
python/pygecko/fake/__init__.py
MomsFriendlyRobotCompany/gecko
f340381113bdb423a39d47aaee61e013bb9e002a
[ "MIT" ]
23
2017-07-07T01:29:33.000Z
2018-11-23T18:41:08.000Z
python/pygecko/fake/__init__.py
MomsFriendlyRobotCompany/gecko
f340381113bdb423a39d47aaee61e013bb9e002a
[ "MIT" ]
null
null
null
############################################## # The MIT License (MIT) # Copyright (c) 2014 Kevin Walchko # see LICENSE for full details ############################################## # this directory contains things for testing and fake sources # import pygecko.test.fake_camera as cv2 # from pygecko.test.process impo...
34.2
61
0.573099
############################################## # The MIT License (MIT) # Copyright (c) 2014 Kevin Walchko # see LICENSE for full details ############################################## # this directory contains things for testing and fake sources # import pygecko.test.fake_camera as cv2 # from pygecko.test.process impo...
0
0
0
f49add4aa7228f69d7edee216cdb417c7cecb848
6,473
py
Python
AtomPos/find_peaks.py
rhambach/TEMimage
436c9d8912db481185d09d9d70c4827c87cbd8a5
[ "BSD-3-Clause" ]
2
2020-10-05T06:12:43.000Z
2022-03-15T04:15:16.000Z
AtomPos/find_peaks.py
rhambach/TEMimage
436c9d8912db481185d09d9d70c4827c87cbd8a5
[ "BSD-3-Clause" ]
null
null
null
AtomPos/find_peaks.py
rhambach/TEMimage
436c9d8912db481185d09d9d70c4827c87cbd8a5
[ "BSD-3-Clause" ]
null
null
null
""" Interactive fitting of peaks in noisy 2D images. Copyright (c) 2013, rhambach. This file is part of the TEMimage package and released under the MIT-Licence. See LICENCE file for details. """ import numpy as np import scipy.ndimage as ndimage import scipy.ndimage.filters as filters import matplotlib.py...
36.570621
94
0.630002
""" Interactive fitting of peaks in noisy 2D images. Copyright (c) 2013, rhambach. This file is part of the TEMimage package and released under the MIT-Licence. See LICENCE file for details. """ import numpy as np import scipy.ndimage as ndimage import scipy.ndimage.filters as filters import matplotlib.py...
1,907
0
102
67db5d120956c48d3d49e18bebfa1d66093df016
2,802
gyp
Python
CSipSimple/jni/webrtc/sources/common_video/common_video.gyp
dmfr/CSipSimple-mirror
f2f2b8efcb739090a45b205690a0fb5b74bce343
[ "OpenSSL", "Unlicense" ]
4
2016-09-29T00:04:31.000Z
2021-12-02T08:39:51.000Z
CSipSimple/jni/webrtc/sources/common_video/common_video.gyp
dmfr/CSipSimple-mirror
f2f2b8efcb739090a45b205690a0fb5b74bce343
[ "OpenSSL", "Unlicense" ]
null
null
null
CSipSimple/jni/webrtc/sources/common_video/common_video.gyp
dmfr/CSipSimple-mirror
f2f2b8efcb739090a45b205690a0fb5b74bce343
[ "OpenSSL", "Unlicense" ]
1
2015-01-20T01:38:20.000Z
2015-01-20T01:38:20.000Z
# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. # # Use of this source code is governed by a BSD-style license # that can be found in the LICENSE file in the root of the source # tree. An additional intellectual property rights grant can be found # in the file PATENTS. All contributing project au...
30.791209
89
0.546395
# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. # # Use of this source code is governed by a BSD-style license # that can be found in the LICENSE file in the root of the source # tree. An additional intellectual property rights grant can be found # in the file PATENTS. All contributing project au...
0
0
0
32f476e0d42b0dd90a1a723fb29cc27b1262e1fb
12,361
py
Python
src/ontology/imports/langual_subsets/adjust_siren.py
OnToologyUser/foodon
5213dd66c30b62c3bc3538bc3d21db5fba8998c7
[ "CC-BY-4.0" ]
121
2016-05-31T22:15:02.000Z
2022-03-30T09:20:51.000Z
src/ontology/imports/langual_subsets/adjust_siren.py
OnToologyUser/foodon
5213dd66c30b62c3bc3538bc3d21db5fba8998c7
[ "CC-BY-4.0" ]
172
2016-01-25T09:00:20.000Z
2022-03-31T13:22:36.000Z
src/ontology/imports/langual_subsets/adjust_siren.py
OnToologyUser/foodon
5213dd66c30b62c3bc3538bc3d21db5fba8998c7
[ "CC-BY-4.0" ]
31
2016-03-17T09:58:02.000Z
2022-02-25T15:07:31.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- import re foodon_lookup = {} siren_lookup = {} nameless = '03301032 03301034 03301067 03301068 03301076 03301078 03301107 03301131 03301149 03301152 03301160 03301163 03301168 03301173 03301183 03301192 03301199 03301206 03301212 03301213 03301221 03301229 03301253 03301287 0...
209.508475
10,445
0.845805
#!/usr/bin/python # -*- coding: utf-8 -*- import re foodon_lookup = {} siren_lookup = {} nameless = '03301032 03301034 03301067 03301068 03301076 03301078 03301107 03301131 03301149 03301152 03301160 03301163 03301168 03301173 03301183 03301192 03301199 03301206 03301212 03301213 03301221 03301229 03301253 03301287 0...
0
0
0
5676dd80957d6e933463fa91265afbf0f6f96e70
1,277
py
Python
problems/047.py
6112/project-euler
b7478d14aa6defe347ab12178c7ffe90efdcb867
[ "MIT" ]
null
null
null
problems/047.py
6112/project-euler
b7478d14aa6defe347ab12178c7ffe90efdcb867
[ "MIT" ]
null
null
null
problems/047.py
6112/project-euler
b7478d14aa6defe347ab12178c7ffe90efdcb867
[ "MIT" ]
null
null
null
#encoding=utf-8 ## SOLVED 2014/04/10 ## 134043 # The first two consecutive numbers to have two distinct prime factors are: # 14 = 2 × 7 # 15 = 3 × 5 # The first three consecutive numbers to have three distinct prime factors are: # 644 = 2² × 7 × 23 # 645 = 3 × 5 × 43 # 646 = 2 × 17 × 19. # Find the first four cons...
27.170213
79
0.622553
#encoding=utf-8 ## SOLVED 2014/04/10 ## 134043 # The first two consecutive numbers to have two distinct prime factors are: # 14 = 2 × 7 # 15 = 3 × 5 # The first three consecutive numbers to have three distinct prime factors are: # 644 = 2² × 7 × 23 # 645 = 3 × 5 × 43 # 646 = 2 × 17 × 19. # Find the first four cons...
649
0
23
40e2e30c984b7232475acc2d1822a04974af9399
1,150
py
Python
010_cons.py
Ananyapam7/Rosalind
3117a4a73989fd9c9faf011b345d5805c9dee0bf
[ "MIT" ]
1
2020-07-28T16:53:32.000Z
2020-07-28T16:53:32.000Z
010_cons.py
Ananyapam7/Rosalind
3117a4a73989fd9c9faf011b345d5805c9dee0bf
[ "MIT" ]
null
null
null
010_cons.py
Ananyapam7/Rosalind
3117a4a73989fd9c9faf011b345d5805c9dee0bf
[ "MIT" ]
null
null
null
#!/usr/bin/env python ''' A solution to a ROSALIND bioinformatics problem. Problem Title: Consensus and Profile Rosalind ID: SUBS Rosalind #: 009 URL: http://rosalind.info/problems/subs/ ''' from numpy import zeros from scripts import ReadFASTA # Data is in FASTA form dna_list = ReadFASTA('data/rosalind_cons.txt') ...
26.136364
54
0.633043
#!/usr/bin/env python ''' A solution to a ROSALIND bioinformatics problem. Problem Title: Consensus and Profile Rosalind ID: SUBS Rosalind #: 009 URL: http://rosalind.info/problems/subs/ ''' from numpy import zeros from scripts import ReadFASTA # Data is in FASTA form dna_list = ReadFASTA('data/rosalind_cons.txt') ...
0
0
0
663701b8a32d5455ba2e307ffd2012741310465a
18,886
py
Python
make_CF_RAPID_output.py
CI-WATER/erfp_data_process_ubuntu_aws
73ebef7d983900214890ba9f973f5e61cf386cf9
[ "MIT" ]
1
2015-09-06T01:58:45.000Z
2015-09-06T01:58:45.000Z
make_CF_RAPID_output.py
CI-WATER/erfp_data_process_ubuntu_aws
73ebef7d983900214890ba9f973f5e61cf386cf9
[ "MIT" ]
null
null
null
make_CF_RAPID_output.py
CI-WATER/erfp_data_process_ubuntu_aws
73ebef7d983900214890ba9f973f5e61cf386cf9
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Copies data from RAPID netCDF output to a CF-compliant netCDF file. Remarks: A new netCDF file is created with data from RAPID [1] simulation model output. The result follows CF conventions [2] with additional metadata prescribed by the NODC timeSeries Orthogonal template [3]...
38.860082
145
0.592873
#!/usr/bin/env python """Copies data from RAPID netCDF output to a CF-compliant netCDF file. Remarks: A new netCDF file is created with data from RAPID [1] simulation model output. The result follows CF conventions [2] with additional metadata prescribed by the NODC timeSeries Orthogonal template [3]...
138
0
25
bfbadd3fb009fb3bf924dadff61855cd24d40f97
2,330
py
Python
beep/tests/test_splice.py
JosephMontoya-TRI/BEEP
a0b880997403c8ef528a4986654bab5f8197b842
[ "Apache-2.0" ]
null
null
null
beep/tests/test_splice.py
JosephMontoya-TRI/BEEP
a0b880997403c8ef528a4986654bab5f8197b842
[ "Apache-2.0" ]
123
2021-03-22T07:31:09.000Z
2022-03-28T23:06:32.000Z
beep/tests/test_splice.py
JosephMontoya-TRI/BEEP
a0b880997403c8ef528a4986654bab5f8197b842
[ "Apache-2.0" ]
null
null
null
# Copyright [2020] [Toyota Research Institute] # # 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 agre...
43.148148
87
0.722747
# Copyright [2020] [Toyota Research Institute] # # 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 agre...
1,402
15
103
f07d00c018134ce7b4554425cc07a4a6ea40c85c
505
py
Python
oo/pessoa.py
valmeida90/pythonbirds
305c1efbf3a9988c3ab552ad721923a48fc4944a
[ "MIT" ]
null
null
null
oo/pessoa.py
valmeida90/pythonbirds
305c1efbf3a9988c3ab552ad721923a48fc4944a
[ "MIT" ]
null
null
null
oo/pessoa.py
valmeida90/pythonbirds
305c1efbf3a9988c3ab552ad721923a48fc4944a
[ "MIT" ]
null
null
null
if __name__ == '__main__': victor = Pessoa(nome='Victor') vinicius = Pessoa(victor,nome='Vinicius') print(Pessoa.cumprimentar(vinicius)) print(id(vinicius)) print(vinicius.nome) print(vinicius.idade) for filho in vinicius.filhos: print(filho.nome)
22.954545
53
0.631683
class Pessoa: def __init__(self, *filhos, nome=None, idade=35): self.idade = idade self.nome = nome self.filhos = list(filhos) def cumprimentar(self): return f'Olá {id(self)}' if __name__ == '__main__': victor = Pessoa(nome='Victor') vinicius = Pessoa(victor,nome='Vin...
151
-8
75
ecf8a9906dc459b62251a9a6b8d74ada32bd7948
857
py
Python
examples/panel.py
ronpandolfi/typhos
2a92d895438d3b0fc41ad51dd5b7f783ca306cf1
[ "BSD-3-Clause-LBNL" ]
null
null
null
examples/panel.py
ronpandolfi/typhos
2a92d895438d3b0fc41ad51dd5b7f783ca306cf1
[ "BSD-3-Clause-LBNL" ]
null
null
null
examples/panel.py
ronpandolfi/typhos
2a92d895438d3b0fc41ad51dd5b7f783ca306cf1
[ "BSD-3-Clause-LBNL" ]
null
null
null
"""Example to create a Panel of Ophyd Signals from an object""" import sys import numpy as np from qtpy.QtWidgets import QApplication import typhos from ophyd import Component as Cpt from ophyd import Device, Signal from typhos.utils import SignalRO class Sample(Device): """Simulated Device""" readback = Cp...
25.205882
72
0.704784
"""Example to create a Panel of Ophyd Signals from an object""" import sys import numpy as np from qtpy.QtWidgets import QApplication import typhos from ophyd import Component as Cpt from ophyd import Device, Signal from typhos.utils import SignalRO class Sample(Device): """Simulated Device""" readback = Cp...
0
0
0
092091befa54823369ea669470b3ce9ea5f67f85
6,009
py
Python
src/decomposition.py
jjonhwa/Optuna_and_Knowledge-Distllation
166641fcdffc5b1f6e017ef917a3b0ff5ff516d6
[ "MIT" ]
null
null
null
src/decomposition.py
jjonhwa/Optuna_and_Knowledge-Distllation
166641fcdffc5b1f6e017ef917a3b0ff5ff516d6
[ "MIT" ]
null
null
null
src/decomposition.py
jjonhwa/Optuna_and_Knowledge-Distllation
166641fcdffc5b1f6e017ef917a3b0ff5ff516d6
[ "MIT" ]
1
2021-12-22T06:38:34.000Z
2021-12-22T06:38:34.000Z
import tensorly as tl from tensorly.decomposition import parafac, partial_tucker import numpy as np import torch import torch.nn as nn from typing import * def cp_decomposition_conv_layer(layer, rank): # rank = max(layer.weight.data.numpy().shape) // 3 """Gets a conv layer and a target rank, returns a nn....
31.793651
100
0.633217
import tensorly as tl from tensorly.decomposition import parafac, partial_tucker import numpy as np import torch import torch.nn as nn from typing import * def cp_decomposition_conv_layer(layer, rank): # rank = max(layer.weight.data.numpy().shape) // 3 """Gets a conv layer and a target rank, returns a nn....
1,552
0
46
81d193fa7ba1fae44c78fce0674e30d3a87651ff
4,103
py
Python
voice_rec/speech2text.py
binghaohuang1/object-detective-visual-tracking
e61680a771dc13a006113d96965e59ff1bc3ce6d
[ "MIT" ]
null
null
null
voice_rec/speech2text.py
binghaohuang1/object-detective-visual-tracking
e61680a771dc13a006113d96965e59ff1bc3ce6d
[ "MIT" ]
null
null
null
voice_rec/speech2text.py
binghaohuang1/object-detective-visual-tracking
e61680a771dc13a006113d96965e59ff1bc3ce6d
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- import wave import requests import time import base64 import numpy as np from pyaudio import PyAudio, paInt16 import time from playsound import playsound import os import sys framerate = 16000 # num_samples = 2000 channels = 1 sampwidth = 2 # FILEPATH = 'speech.wav' base_url = "https://opena...
26.642857
114
0.558616
# -*- coding:utf-8 -*- import wave import requests import time import base64 import numpy as np from pyaudio import PyAudio, paInt16 import time from playsound import playsound import os import sys framerate = 16000 # num_samples = 2000 channels = 1 sampwidth = 2 # FILEPATH = 'speech.wav' base_url = "https://opena...
3,221
0
138
b7eda93534e3e34ab718a9b46fc7957b48d53805
1,613
py
Python
setup.py
heitorbaldo/pypdc
442fb5ddf7c4dde05413803233812dd54d8d5a11
[ "MIT" ]
1
2021-11-28T02:44:55.000Z
2021-11-28T02:44:55.000Z
setup.py
heitorbaldo/pypdc
442fb5ddf7c4dde05413803233812dd54d8d5a11
[ "MIT" ]
null
null
null
setup.py
heitorbaldo/pypdc
442fb5ddf7c4dde05413803233812dd54d8d5a11
[ "MIT" ]
null
null
null
from glob import glob import os import sys from setuptools import setup name = "pypdc" version="0.0.8" description = "Python asymptotic Partial Directed Coherence and Directed Coherence estimation package for brain connectivity analysis." authors = { "Sameshima": ("Koichi Sameshima", "ksameshi@usp.br"), "Brit...
28.298246
135
0.637322
from glob import glob import os import sys from setuptools import setup name = "pypdc" version="0.0.8" description = "Python asymptotic Partial Directed Coherence and Directed Coherence estimation package for brain connectivity analysis." authors = { "Sameshima": ("Koichi Sameshima", "ksameshi@usp.br"), "Brit...
0
0
0
2a697c10547ee998915d7b5fd9f3cad563a31878
2,326
py
Python
build_tools/benchmarks/common/android_device_utils.py
tjzhou23/iree
63fd39fa023d0c1e5fb828a96ba927249252ec52
[ "Apache-2.0" ]
null
null
null
build_tools/benchmarks/common/android_device_utils.py
tjzhou23/iree
63fd39fa023d0c1e5fb828a96ba927249252ec52
[ "Apache-2.0" ]
1
2022-01-27T18:10:51.000Z
2022-01-27T18:10:51.000Z
build_tools/benchmarks/common/android_device_utils.py
tjzhou23/iree
63fd39fa023d0c1e5fb828a96ba927249252ec52
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # Copyright 2021 The IREE Authors # # Licensed under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception """Utils for accessing Android devices.""" import json import re from typing i...
34.716418
80
0.662941
#!/usr/bin/env python3 # Copyright 2021 The IREE Authors # # Licensed under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception """Utils for accessing Android devices.""" import json import re from typing i...
0
0
0
20086c74a46b05a7e048f8ea5df75ef9f99dc41f
6,284
py
Python
bin/ambient/profile_from_ctd.py
ChrisBarker-NOAA/tamoc
c797cbb6fee28d788b76d21cc5b0cc0df5444ba8
[ "MIT" ]
18
2016-02-24T01:48:41.000Z
2021-11-05T03:18:24.000Z
bin/ambient/profile_from_ctd.py
ChrisBarker-NOAA/tamoc
c797cbb6fee28d788b76d21cc5b0cc0df5444ba8
[ "MIT" ]
16
2016-08-09T07:06:35.000Z
2021-12-23T19:38:37.000Z
bin/ambient/profile_from_ctd.py
ChrisBarker-NOAA/tamoc
c797cbb6fee28d788b76d21cc5b0cc0df5444ba8
[ "MIT" ]
9
2017-03-01T01:22:27.000Z
2021-09-17T12:13:40.000Z
""" Create a profile from an ASCII CTD datafile =========================================== Use the TAMOC ambient module to create profiles in netCDF format for use by TAMOC from data in text files downloaded from a CTD. This file demonstrates working with the data from the R/V Brooks McCall at Station BM 54 on May ...
34.152174
78
0.612826
""" Create a profile from an ASCII CTD datafile =========================================== Use the TAMOC ambient module to create profiles in netCDF format for use by TAMOC from data in text files downloaded from a CTD. This file demonstrates working with the data from the R/V Brooks McCall at Station BM 54 on May ...
0
0
0
1d81c7428faa5970b0358ffe50aea071a55592d0
14,542
py
Python
tests/test_entrypoint.py
Python-Tools/schema_entry
5884843607a44cc6de5943e2be04c1a5c48f1886
[ "MIT" ]
null
null
null
tests/test_entrypoint.py
Python-Tools/schema_entry
5884843607a44cc6de5943e2be04c1a5c48f1886
[ "MIT" ]
null
null
null
tests/test_entrypoint.py
Python-Tools/schema_entry
5884843607a44cc6de5943e2be04c1a5c48f1886
[ "MIT" ]
null
null
null
import os import json import unittest from pathlib import Path from typing import Dict, Any import jsonschema.exceptions from schema_entry.entrypoint import EntryPoint
27.437736
71
0.421675
import os import json import unittest from pathlib import Path from typing import Dict, Any import jsonschema.exceptions from schema_entry.entrypoint import EntryPoint def setUpModule() -> None: print("[SetUp Submodule schema_entry.entrypoint test]") def tearDownModule() -> None: print("[TearDown Submodule...
13,451
826
92
6f588d8ab562cb24f33c4c2987df22264aede027
2,094
py
Python
tensorflow/compiler/tests/nullary_ops_test.py
tianyapiaozi/tensorflow
fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a
[ "Apache-2.0" ]
522
2016-06-08T02:15:50.000Z
2022-03-02T05:30:36.000Z
tensorflow/compiler/tests/nullary_ops_test.py
tianyapiaozi/tensorflow
fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a
[ "Apache-2.0" ]
133
2017-04-26T16:49:49.000Z
2019-10-15T11:39:26.000Z
tensorflow/compiler/tests/nullary_ops_test.py
tianyapiaozi/tensorflow
fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a
[ "Apache-2.0" ]
108
2016-06-16T15:34:05.000Z
2022-03-12T13:23:11.000Z
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
33.774194
80
0.657116
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
851
13
98
812da7a9821d8cafd6fff8c1031df30589c192b0
272
py
Python
03 - Forms and User Input/blog/config.py
alok-sriv/Flask-Blog
27ac2c63a289ef448ffa9a2321b3c51a3d8c7c64
[ "MIT" ]
null
null
null
03 - Forms and User Input/blog/config.py
alok-sriv/Flask-Blog
27ac2c63a289ef448ffa9a2321b3c51a3d8c7c64
[ "MIT" ]
null
null
null
03 - Forms and User Input/blog/config.py
alok-sriv/Flask-Blog
27ac2c63a289ef448ffa9a2321b3c51a3d8c7c64
[ "MIT" ]
null
null
null
# FileName: Flask-Blog > blog > config.py import os, secrets
34
107
0.705882
# FileName: Flask-Blog > blog > config.py import os, secrets class Config(object): SECRET_KEY = os.environ.get('SECRET_KEY') or secrets.token_urlsafe() # I prefer the "or" method, as that also works if the environment variable is set to an empty string.
0
183
24
53a049eb1d8ddcb78573a7aaa15e0dc599c34ba0
1,912
py
Python
jike/qr_code.py
waysup/Jike-Metro
b8ead80dddd5d695784c5587edfd8df87c55a4e6
[ "MIT" ]
193
2018-04-04T02:27:51.000Z
2022-03-14T03:26:44.000Z
jike/qr_code.py
waysup/Jike-Metro
b8ead80dddd5d695784c5587edfd8df87c55a4e6
[ "MIT" ]
16
2018-04-04T05:58:15.000Z
2021-01-08T02:56:57.000Z
jike/qr_code.py
waysup/Jike-Metro
b8ead80dddd5d695784c5587edfd8df87c55a4e6
[ "MIT" ]
24
2018-04-06T09:34:58.000Z
2021-03-02T02:10:07.000Z
# -*- coding: utf-8 -*- """ QR code that be scanned to allow login """ import qrcode import tempfile import webbrowser from decimal import Decimal from qrcode.image.svg import SvgImage from .constants import JIKE_URI_SCHEME_FMT, RENDER2BROWSER_HTML_TEMPLATE
26.555556
118
0.651674
# -*- coding: utf-8 -*- """ QR code that be scanned to allow login """ import qrcode import tempfile import webbrowser from decimal import Decimal from qrcode.image.svg import SvgImage from .constants import JIKE_URI_SCHEME_FMT, RENDER2BROWSER_HTML_TEMPLATE def make_qrcode(uuid, render_choice='browser'): qr = q...
1,285
247
115
f9734951c87899d8c4336cf213bf5f3befa02662
142
py
Python
decorators_nesting/nesting.py
shaunryan/python-decorators
04f36b25f6e616b01a566b3c4ff42a4b43650e97
[ "MIT" ]
null
null
null
decorators_nesting/nesting.py
shaunryan/python-decorators
04f36b25f6e616b01a566b3c4ff42a4b43650e97
[ "MIT" ]
null
null
null
decorators_nesting/nesting.py
shaunryan/python-decorators
04f36b25f6e616b01a566b3c4ff42a4b43650e97
[ "MIT" ]
null
null
null
from decorators import debug, do_twice # debug(do_twice(greet())) @debug @do_twice greet("Eva")
14.2
38
0.697183
from decorators import debug, do_twice # debug(do_twice(greet())) @debug @do_twice def greet(name): print(f"Hello {name}") greet("Eva")
22
0
22
7d38a049431e1714e2f405a24a19e3ada149bc62
14,810
py
Python
dataset_dstc_clean_asr.py
kolk/MODELING-ASR-AMBIGUITY-FOR-NEURAL-DIALOGUE-STATE-TRACKING-USING-WORD-CONFUSION-NETWORKS
4b70d90683f5489f903e296c3be493294e446cf3
[ "BSD-3-Clause" ]
3
2020-07-01T08:34:57.000Z
2021-12-04T04:22:13.000Z
dataset_dstc_clean_asr.py
kolk/MODELING-ASR-AMBIGUITY-FOR-NEURAL-DIALOGUE-STATE-TRACKING-USING-WORD-CONFUSION-NETWORKS
4b70d90683f5489f903e296c3be493294e446cf3
[ "BSD-3-Clause" ]
2
2019-11-23T20:56:00.000Z
2020-05-03T23:13:41.000Z
dataset_dstc_clean_asr.py
kolk/MODELING-ASR-AMBIGUITY-FOR-NEURAL-DIALOGUE-STATE-TRACKING-USING-WORD-CONFUSION-NETWORKS
4b70d90683f5489f903e296c3be493294e446cf3
[ "BSD-3-Clause" ]
null
null
null
import json from collections import defaultdict import numpy as np from tqdm import tqdm from stanza.nlp.corenlp import CoreNLPClient import itertools from jiwer import wer from utils import get_cnet_best_pass import csv from math import exp from functools import reduce import time client = None def cnet_best_n_paths(...
55.676692
2,270
0.605469
import json from collections import defaultdict import numpy as np from tqdm import tqdm from stanza.nlp.corenlp import CoreNLPClient import itertools from jiwer import wer from utils import get_cnet_best_pass import csv from math import exp from functools import reduce import time client = None def cnet_best_n_paths(...
12,523
846
115
573d5849a3c8ba9bc16374ca194418c4c903bd84
19,822
py
Python
Code/binarytree.py
HexSeal/CS-1.3-Core-Data-Structures
1b6da3afe89cf68c1ad120617b8e1e80652694b9
[ "MIT" ]
null
null
null
Code/binarytree.py
HexSeal/CS-1.3-Core-Data-Structures
1b6da3afe89cf68c1ad120617b8e1e80652694b9
[ "MIT" ]
7
2020-02-14T18:14:10.000Z
2020-03-09T23:39:10.000Z
Code/binarytree.py
HexSeal/CS-1.3-Core-Data-Structures
1b6da3afe89cf68c1ad120617b8e1e80652694b9
[ "MIT" ]
null
null
null
#!python from queue import LinkedQueue if __name__ == '__main__': test_binary_search_tree()
44.245536
141
0.619463
#!python from queue import LinkedQueue class BinaryTreeNode(object): def __init__(self, data): """Initialize this binary tree node with the given data.""" self.data = data self.left = None self.right = None def __repr__(self): """Return a string representation of this ...
1,262
18,392
69
82d6b534d9dc99146c402b66f279b179d1cab4ac
1,972
py
Python
lib/schema.py
chris48s/json-schema-viewer
01c75e779d8c6661947a0bd2c755e8fecc063b71
[ "MIT" ]
null
null
null
lib/schema.py
chris48s/json-schema-viewer
01c75e779d8c6661947a0bd2c755e8fecc063b71
[ "MIT" ]
18
2022-01-03T20:31:15.000Z
2022-03-28T20:35:34.000Z
lib/schema.py
chris48s/json-schema-viewer
01c75e779d8c6661947a0bd2c755e8fecc063b71
[ "MIT" ]
null
null
null
import asyncio import urllib.parse from dataclasses import dataclass import httpx @dataclass(eq=False)
25.282051
85
0.627789
import asyncio import urllib.parse from dataclasses import dataclass import httpx @dataclass(eq=False) class RemoteSchema: url: str schema: bytes = None @property def fetched(self): return bool(self.schema) def __eq__(self, other): return self.url == other.url @property ...
1,555
145
160
0aa3d50febd9aa8cd29d83f827149973ff83da6e
349
py
Python
finished/python_principles/01_capital_indexes.py
UltiRequiem/daily-python-practice
31f72c45378be90b8fcadd30d7042819ee551a17
[ "MIT" ]
8
2021-05-29T23:30:12.000Z
2021-09-24T03:25:44.000Z
finished/python_principles/01_capital_indexes.py
UltiRequiem/daily-python-practice
31f72c45378be90b8fcadd30d7042819ee551a17
[ "MIT" ]
null
null
null
finished/python_principles/01_capital_indexes.py
UltiRequiem/daily-python-practice
31f72c45378be90b8fcadd30d7042819ee551a17
[ "MIT" ]
6
2021-06-02T14:20:24.000Z
2021-08-19T00:49:26.000Z
if __name__ == "__main__": tests()
26.846154
84
0.661891
def capital_indexes(string: str) -> list: return [index for index, char in enumerate(string) if char.isupper()] # return [letter for letter in range(len(indexes)) if indexes[letter].isupper()] def tests() -> None: print(capital_indexes("mYtESt")) # [1, 3, 4] print(capital_indexes("owO")) if __name_...
262
0
45
0f0307d4db988396f9cfea11798ce2ce8f64aeba
2,813
py
Python
neurokit2/signal/signal_period.py
vansjyo/NeuroKit
238cd3d89467f7922c68a3a4c1f44806a8466922
[ "MIT" ]
null
null
null
neurokit2/signal/signal_period.py
vansjyo/NeuroKit
238cd3d89467f7922c68a3a4c1f44806a8466922
[ "MIT" ]
null
null
null
neurokit2/signal/signal_period.py
vansjyo/NeuroKit
238cd3d89467f7922c68a3a4c1f44806a8466922
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import numpy as np from .signal_interpolate import signal_interpolate from .signal_formatpeaks import _signal_formatpeaks_sanitize def signal_period(peaks, sampling_rate=1000, desired_length=None, interpolation_order="cubic"): """Calculate signal period from a series of ...
37.506667
79
0.651262
# -*- coding: utf-8 -*- import numpy as np from .signal_interpolate import signal_interpolate from .signal_formatpeaks import _signal_formatpeaks_sanitize def signal_period(peaks, sampling_rate=1000, desired_length=None, interpolation_order="cubic"): """Calculate signal period from a series of ...
0
0
0
ac01da5aed1a388f449625d499fb1102f61b10d4
6,431
py
Python
morgan/settings/base.py
morgan-county/site
86c0cc9d85fecd62e1d20bd3e841d19165ed3956
[ "MIT" ]
null
null
null
morgan/settings/base.py
morgan-county/site
86c0cc9d85fecd62e1d20bd3e841d19165ed3956
[ "MIT" ]
null
null
null
morgan/settings/base.py
morgan-county/site
86c0cc9d85fecd62e1d20bd3e841d19165ed3956
[ "MIT" ]
null
null
null
# Import global settings to make it easier to extend settings. from django.conf.global_settings import * # pylint: disable=W0614,W0401 #============================================================================ # Generic Django project settings #=====================================================================...
31.52451
78
0.573472
# Import global settings to make it easier to extend settings. from django.conf.global_settings import * # pylint: disable=W0614,W0401 #============================================================================ # Generic Django project settings #=====================================================================...
0
0
0
90be26666e54941741fa17431ea12c308a281654
176
py
Python
students/K33401/Nikitin_Michail/lab2/django_project_nikitin/project_first_app/admin.py
mexannik1998/ITMO_ICT_WebDevelopment_2020-2021
b35f80e8439784e1ab24fbe7db82f30864ba9b69
[ "MIT" ]
null
null
null
students/K33401/Nikitin_Michail/lab2/django_project_nikitin/project_first_app/admin.py
mexannik1998/ITMO_ICT_WebDevelopment_2020-2021
b35f80e8439784e1ab24fbe7db82f30864ba9b69
[ "MIT" ]
null
null
null
students/K33401/Nikitin_Michail/lab2/django_project_nikitin/project_first_app/admin.py
mexannik1998/ITMO_ICT_WebDevelopment_2020-2021
b35f80e8439784e1ab24fbe7db82f30864ba9b69
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import * admin.site.register(Car) admin.site.register(DriverLicense) admin.site.register(Driver) admin.site.register(Ownership)
19.555556
34
0.8125
from django.contrib import admin from .models import * admin.site.register(Car) admin.site.register(DriverLicense) admin.site.register(Driver) admin.site.register(Ownership)
0
0
0
4914b3ff58f712aa219e34237813c84706a51f0f
324
py
Python
_themes/conan/__init__.py
MarcoKoch/conan-docs
72b1fcbee094a33299567b11c0424874e5905aea
[ "MIT" ]
null
null
null
_themes/conan/__init__.py
MarcoKoch/conan-docs
72b1fcbee094a33299567b11c0424874e5905aea
[ "MIT" ]
null
null
null
_themes/conan/__init__.py
MarcoKoch/conan-docs
72b1fcbee094a33299567b11c0424874e5905aea
[ "MIT" ]
null
null
null
"""Sphinx ReadTheDocs theme. From https://github.com/ryan-roemer/sphinx-bootstrap-theme. """ import os __version__ = '0.2.0' __version_full__ = __version__ def get_html_theme_path(): """Return list of HTML theme paths.""" cur_dir = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) return cur_...
20.25
73
0.722222
"""Sphinx ReadTheDocs theme. From https://github.com/ryan-roemer/sphinx-bootstrap-theme. """ import os __version__ = '0.2.0' __version_full__ = __version__ def get_html_theme_path(): """Return list of HTML theme paths.""" cur_dir = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) return cur_...
0
0
0
483523b71a14c73ab3b6ee24a729378037e02225
6,289
py
Python
models/official/detection/modeling/segmentation_model.py
GerinTang/tpu
d6ca25c49b5f7e88fdf7d2623cf6fd8349ddfc3f
[ "Apache-2.0" ]
5,098
2018-02-09T16:56:49.000Z
2022-03-31T13:50:40.000Z
models/official/detection/modeling/segmentation_model.py
GerinTang/tpu
d6ca25c49b5f7e88fdf7d2623cf6fd8349ddfc3f
[ "Apache-2.0" ]
550
2018-02-07T05:30:06.000Z
2022-03-13T22:00:09.000Z
models/official/detection/modeling/segmentation_model.py
GerinTang/tpu
d6ca25c49b5f7e88fdf7d2623cf6fd8349ddfc3f
[ "Apache-2.0" ]
1,920
2018-02-07T23:44:49.000Z
2022-03-29T03:11:08.000Z
# Lint as: python2, python3 # Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
36.563953
80
0.705677
# Lint as: python2, python3 # Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
2,485
0
125
3de6097ae14b4d5331accdf470c72be7e4577169
26,868
py
Python
mf/mf_gp_bandit.py
rajatsen91/MFTreeSearchCV
cf5ef5f537267c1c2c34a4f40042a051aad434f9
[ "MIT" ]
8
2019-10-24T22:27:10.000Z
2021-10-07T00:19:52.000Z
mf/mf_gp_bandit.py
rajatsen91/MFTreeSearchCV
cf5ef5f537267c1c2c34a4f40042a051aad434f9
[ "MIT" ]
1
2021-03-16T23:20:54.000Z
2021-05-25T20:43:27.000Z
mf/mf_gp_bandit.py
rajatsen91/MFTreeSearchCV
cf5ef5f537267c1c2c34a4f40042a051aad434f9
[ "MIT" ]
1
2020-07-21T21:18:58.000Z
2020-07-21T21:18:58.000Z
""" Implements Multi-fidelity GP Bandit Optimisaiton. -- kandasamy@cs.cmu.edu """ # pylint: disable=import-error # pylint: disable=no-member # pylint: disable=invalid-name # pylint: disable=relative-import # pylint: disable=super-on-old-class from argparse import Namespace from copy import deepcopy import time imp...
47.893048
90
0.679582
""" Implements Multi-fidelity GP Bandit Optimisaiton. -- kandasamy@cs.cmu.edu """ # pylint: disable=import-error # pylint: disable=no-member # pylint: disable=invalid-name # pylint: disable=relative-import # pylint: disable=super-on-old-class from argparse import Namespace from copy import deepcopy import time imp...
0
0
0
fa2d11736a48234a5b517a6bde2626fadc7b00b3
615
py
Python
tests/db.py
ralphqq/testing-async-db
de02ed891a638f839f063e7401839ee551955d4c
[ "MIT" ]
null
null
null
tests/db.py
ralphqq/testing-async-db
de02ed891a638f839f063e7401839ee551955d4c
[ "MIT" ]
null
null
null
tests/db.py
ralphqq/testing-async-db
de02ed891a638f839f063e7401839ee551955d4c
[ "MIT" ]
null
null
null
from sqlalchemy import create_engine from sqlalchemy.engine.url import URL from sqlalchemy.orm import scoped_session, sessionmaker from settings import DATABASE TEST_DB = dict(DATABASE) engine = create_engine(URL(**TEST_DB)) Session = scoped_session(sessionmaker(bind=engine)) def delete_rows(db_engine, base_obj):...
27.954545
63
0.744715
from sqlalchemy import create_engine from sqlalchemy.engine.url import URL from sqlalchemy.orm import scoped_session, sessionmaker from settings import DATABASE TEST_DB = dict(DATABASE) engine = create_engine(URL(**TEST_DB)) Session = scoped_session(sessionmaker(bind=engine)) def delete_rows(db_engine, base_obj):...
0
0
0
7292e3a62c53434a27486c5dfb526a299fb18720
1,979
py
Python
readalongs/g2p/make_dict.py
finguist/ReadAlong-Studio
fb2ad609eec175ff18cf9a53df05d8dad739898a
[ "MIT" ]
1
2021-10-02T09:38:49.000Z
2021-10-02T09:38:49.000Z
readalongs/g2p/make_dict.py
finguist/ReadAlong-Studio
fb2ad609eec175ff18cf9a53df05d8dad739898a
[ "MIT" ]
null
null
null
readalongs/g2p/make_dict.py
finguist/ReadAlong-Studio
fb2ad609eec175ff18cf9a53df05d8dad739898a
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ################################################## # # make_dict.py # # This module takes a text file, marked up with # units (e.g. w for word, m for morpheme) and ids # and converted to IPA, and produces a # .dict file for processing by PocketSphinx. # ##################...
27.873239
76
0.590197
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ################################################## # # make_dict.py # # This module takes a text file, marked up with # units (e.g. w for word, m for morpheme) and ids # and converted to IPA, and produces a # .dict file for processing by PocketSphinx. # ##################...
719
0
46
bde58d6a194b02eb7680e0fa09837b37da9569a8
1,604
py
Python
computeChebyshevDerivativeMatrix.py
jeguerra/nonlinearMtnWavesSolver
e2fe83d1f7c3c57cbe9ba0299a1b9179cf4b5869
[ "MIT" ]
null
null
null
computeChebyshevDerivativeMatrix.py
jeguerra/nonlinearMtnWavesSolver
e2fe83d1f7c3c57cbe9ba0299a1b9179cf4b5869
[ "MIT" ]
null
null
null
computeChebyshevDerivativeMatrix.py
jeguerra/nonlinearMtnWavesSolver
e2fe83d1f7c3c57cbe9ba0299a1b9179cf4b5869
[ "MIT" ]
1
2019-09-30T05:04:44.000Z
2019-09-30T05:04:44.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Jul 19 13:05:23 2019 @author: TempestGuerra """ import numpy as np import math as mt from HerfunChebNodesWeights import chebpolym, cheblb
26.295082
71
0.502494
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Jul 19 13:05:23 2019 @author: TempestGuerra """ import numpy as np import math as mt from HerfunChebNodesWeights import chebpolym, cheblb def computeChebyshevDerivativeMatrix(DIMS): # Get data from DIMS ZH = DIMS[2] NZ = D...
1,376
0
23
6d3f596b5983291fc4388b685d44ef14cf7f4bbe
42
py
Python
back/bookclub/db/__init__.py
wonesy/bookclub
0b0368974ca5c9f25666efd556e5b514db44180f
[ "MIT" ]
null
null
null
back/bookclub/db/__init__.py
wonesy/bookclub
0b0368974ca5c9f25666efd556e5b514db44180f
[ "MIT" ]
null
null
null
back/bookclub/db/__init__.py
wonesy/bookclub
0b0368974ca5c9f25666efd556e5b514db44180f
[ "MIT" ]
null
null
null
from .connection import database, init_db
21
41
0.833333
from .connection import database, init_db
0
0
0
ad8ebe3758f338692569062dba22fc8064048c61
6,519
py
Python
opensubtitles/create_data_test.py
azizullah2017/conversational-datasets
932050fbfa0f650c43a3a4df78238e0fcf848f3f
[ "Apache-2.0" ]
1,017
2019-04-16T01:01:07.000Z
2022-03-29T23:22:19.000Z
opensubtitles/create_data_test.py
azizullah2017/conversational-datasets
932050fbfa0f650c43a3a4df78238e0fcf848f3f
[ "Apache-2.0" ]
27
2019-04-21T20:01:10.000Z
2022-03-09T12:11:10.000Z
opensubtitles/create_data_test.py
azizullah2017/conversational-datasets
932050fbfa0f650c43a3a4df78238e0fcf848f3f
[ "Apache-2.0" ]
153
2019-04-16T10:09:36.000Z
2022-02-24T13:17:41.000Z
"""Tests for create_data.py.""" import json import shutil import tempfile import unittest from glob import glob from os import path import tensorflow as tf from opensubtitles import create_data _TRAIN_FILE = "\n".join([ "matt: AAAA", # words followed by colons are stripped. "[skip]", # text in brackets is...
33.430769
76
0.564044
"""Tests for create_data.py.""" import json import shutil import tempfile import unittest from glob import glob from os import path import tensorflow as tf from opensubtitles import create_data _TRAIN_FILE = "\n".join([ "matt: AAAA", # words followed by colons are stripped. "[skip]", # text in brackets is...
5,603
27
212
266bd8a833d8c6d705d9bcc39dcd50ada0c20234
3,851
py
Python
metriql2metabase/metabase.py
metriql/metriql-metabase
64915705864e9214acbbdf9ef5cfc6289fb829ca
[ "MIT" ]
null
null
null
metriql2metabase/metabase.py
metriql/metriql-metabase
64915705864e9214acbbdf9ef5cfc6289fb829ca
[ "MIT" ]
null
null
null
metriql2metabase/metabase.py
metriql/metriql-metabase
64915705864e9214acbbdf9ef5cfc6289fb829ca
[ "MIT" ]
null
null
null
import logging import sys from metriql2metabase.dbt_metabase import MetabaseClient from metriql2metabase.models.metabase import MetabaseModel, MetabaseColumn, MetabaseMetric
44.77907
106
0.576474
import logging import sys from metriql2metabase.dbt_metabase import MetabaseClient from metriql2metabase.models.metabase import MetabaseModel, MetabaseColumn, MetabaseMetric class DatabaseOperation: client: MetabaseClient def __init__(self, metabase_url, username, password, verbose): self.client = M...
3,406
246
23
8a0bc7147cd3b6c1ede46c69b65f77f506ff6f17
7,335
py
Python
clover/core/variable.py
52clover/clover
9c8b763a54059f396c5338856b9402dc7159512e
[ "Apache-2.0" ]
5
2020-05-26T15:19:38.000Z
2021-11-13T15:00:22.000Z
clover/core/variable.py
52clover/clover
9c8b763a54059f396c5338856b9402dc7159512e
[ "Apache-2.0" ]
4
2020-07-26T10:55:39.000Z
2021-09-07T04:17:21.000Z
clover/core/variable.py
52clover/clover
9c8b763a54059f396c5338856b9402dc7159512e
[ "Apache-2.0" ]
3
2020-06-09T01:57:09.000Z
2020-09-03T11:13:25.000Z
""" # Clover平台变量机制实现。 # author : taoyanli0808 # date : 2020-05-27 # version: 1.2 # -------------------- Clover平台变量机制 -------------------- # clover平台变量分为4种类型,平台内置变量、自定义变量、触发变量与运行时变量 # 1、平台内置变量 # clover平台内置变量目前有response、request、keyword、variable、exception、 # validator、extractor共7个,详见各模块说明文档。 # 2、自定义变量 # 自定义变量(default)通过...
34.43662
88
0.543422
""" # Clover平台变量机制实现。 # author : taoyanli0808 # date : 2020-05-27 # version: 1.2 # -------------------- Clover平台变量机制 -------------------- # clover平台变量分为4种类型,平台内置变量、自定义变量、触发变量与运行时变量 # 1、平台内置变量 # clover平台内置变量目前有response、request、keyword、variable、exception、 # validator、extractor共7个,详见各模块说明文档。 # 2、自定义变量 # 自定义变量(default)通过...
1,830
5,203
23
05da3974fb6e3504f505cbb3d1649d9973b0a8b9
1,657
py
Python
59/59.py
bobismijnnaam/bobe-euler
111abdf37256d19c4a8c4e1a071db52929acf9d9
[ "MIT" ]
null
null
null
59/59.py
bobismijnnaam/bobe-euler
111abdf37256d19c4a8c4e1a071db52929acf9d9
[ "MIT" ]
null
null
null
59/59.py
bobismijnnaam/bobe-euler
111abdf37256d19c4a8c4e1a071db52929acf9d9
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from Utils import * if __name__ == "__main__": with open("./p059_cipher.txt", "r") as f: contents = f.read() contents = contents[:-1].split(",") contents = [int(x) for x in contents] print(contents) testContents = contents[:120] candidates = [] # Your code...
31.865385
90
0.490646
#!/usr/bin/env python3 from Utils import * def isNormalCharacter(c): if c == ' ': return True if ord(c) >= ord('a') and ord(c) <= ord('z'): return True if ord(c) >= ord('A') and ord(c) <= ord('Z'): return True return False if __name__ == "__main__": with open("./p059_ciphe...
198
0
23
2003f2d4e31957f7e197dbfb5909a968f0b07601
3,902
py
Python
services/controller/src/plz/controller/volumes.py
prodo-ai/plz
46d179fca5730b7ed2f236d53d78c42358aed72b
[ "MIT" ]
29
2018-04-14T20:05:41.000Z
2019-04-15T09:02:40.000Z
services/controller/src/plz/controller/volumes.py
neomatrix369/plz
12f05a8d071e9c1976c444d34161530ffa73eeae
[ "MIT" ]
23
2018-04-14T23:32:32.000Z
2019-06-07T21:38:58.000Z
services/controller/src/plz/controller/volumes.py
neomatrix369/plz
12f05a8d071e9c1976c444d34161530ffa73eeae
[ "MIT" ]
3
2018-09-19T15:08:21.000Z
2019-03-22T12:21:07.000Z
import io import os.path import tarfile import tempfile from abc import ABC, abstractmethod from typing import List import docker import docker.errors from docker.models.containers import Container from docker.models.volumes import Volume from docker.types import Mount
32.789916
76
0.650692
import io import os.path import tarfile import tempfile from abc import ABC, abstractmethod from typing import List import docker import docker.errors from docker.models.containers import Container from docker.models.volumes import Volume from docker.types import Mount class VolumeObject(ABC): @abstractmethod ...
2,595
733
297
ef0af89c33c3e540c333c2c2fba1b76a30120509
1,361
py
Python
examples/undocumented/python_modular/classifier_multiclasslogisticregression_modular.py
srgnuclear/shogun
33c04f77a642416376521b0cd1eed29b3256ac13
[ "Ruby", "MIT" ]
1
2015-11-05T18:31:14.000Z
2015-11-05T18:31:14.000Z
examples/undocumented/python_modular/classifier_multiclasslogisticregression_modular.py
waderly/shogun
9288b6fa38e001d63c32188f7f847dadea66e2ae
[ "Ruby", "MIT" ]
null
null
null
examples/undocumented/python_modular/classifier_multiclasslogisticregression_modular.py
waderly/shogun
9288b6fa38e001d63c32188f7f847dadea66e2ae
[ "Ruby", "MIT" ]
null
null
null
#!/usr/bin/env python from tools.multiclass_shared import prepare_data [traindat, label_traindat, testdat, label_testdat] = prepare_data(False) parameter_list = [[traindat,testdat,label_traindat,label_testdat,2.1,1e-5],[traindat,testdat,label_traindat,label_testdat,2.2,1e-5]] if __name__=='__main__': print('Multi...
33.195122
189
0.825129
#!/usr/bin/env python from tools.multiclass_shared import prepare_data [traindat, label_traindat, testdat, label_testdat] = prepare_data(False) parameter_list = [[traindat,testdat,label_traindat,label_testdat,2.1,1e-5],[traindat,testdat,label_traindat,label_testdat,2.2,1e-5]] def classifier_multiclasslogisticregre...
923
0
23
8936f81e124bfacbe4b930301caafb02ebc69faa
18,361
py
Python
pycket/option_helper.py
pmatos/pycket
6a04b064981f99538df5c3170a2f947e841e79de
[ "MIT" ]
null
null
null
pycket/option_helper.py
pmatos/pycket
6a04b064981f99538df5c3170a2f947e841e79de
[ "MIT" ]
null
null
null
pycket/option_helper.py
pmatos/pycket
6a04b064981f99538df5c3170a2f947e841e79de
[ "MIT" ]
null
null
null
#! /usr/bin/env python # -*- coding: utf-8 -*- # from rpython.rlib import jit file_expr_opts = ["-e", "--eval", "-f", "--load", "-t", "--require", "-l", "--lib", "-p", "-r", "--script", "-u", "--require-script",...
35.652427
120
0.456457
#! /usr/bin/env python # -*- coding: utf-8 -*- # from rpython.rlib import jit def print_help(argv): print """Welcome to Pycket. %s [<option> ...] <argument> ... File and expression options: -e <exprs>, --eval <exprs> : Evaluate <exprs>, prints results -f <file>, --load <file> : Like -e '(loa...
16,310
0
92
1b799fbbf83ad1972c0cba7b83433448593b70f8
2,969
py
Python
src/states/oklahoma/main.py
mail-my-ballot/elections-officials
f52862b62121a6e30f8f1c865bfe62705d3a0748
[ "Apache-2.0" ]
3
2020-04-26T02:05:33.000Z
2020-07-06T22:11:04.000Z
src/states/oklahoma/main.py
mail-my-ballot/elections-officials
f52862b62121a6e30f8f1c865bfe62705d3a0748
[ "Apache-2.0" ]
25
2020-05-22T18:51:01.000Z
2020-06-28T00:47:19.000Z
src/states/oklahoma/main.py
vote-by-mail/elections-officials
ac3cfb896db11f553f9c22ea2303fa54e6bb1a39
[ "Apache-2.0" ]
5
2020-05-21T01:28:57.000Z
2020-07-01T23:02:31.000Z
from io import BytesIO from io import StringIO import re from urllib.parse import urljoin from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter from pdfminer.converter import TextConverter from pdfminer.layout import LAParams from pdfminer.pdfpage import PDFPage from bs4 import BeautifulSoup from common...
34.523256
119
0.712698
from io import BytesIO from io import StringIO import re from urllib.parse import urljoin from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter from pdfminer.converter import TextConverter from pdfminer.layout import LAParams from pdfminer.pdfpage import PDFPage from bs4 import BeautifulSoup from common...
1,948
0
91
374c68d8637ec6856bc86d4706d8076c322277a6
2,877
py
Python
everyday_wechat/control/horoscope/T2345_horescope.py
filon7/EverydayWechat
cf4f509eb570de312995ce5c3b517f369753a1e9
[ "MIT" ]
null
null
null
everyday_wechat/control/horoscope/T2345_horescope.py
filon7/EverydayWechat
cf4f509eb570de312995ce5c3b517f369753a1e9
[ "MIT" ]
null
null
null
everyday_wechat/control/horoscope/T2345_horescope.py
filon7/EverydayWechat
cf4f509eb570de312995ce5c3b517f369753a1e9
[ "MIT" ]
null
null
null
#! usr/bin/env python # -*- coding: utf-8 -*- """ 爬取 星座屋 星座运势 http://tools.2345.com/naonao/ """ import re from functools import reduce import requests from bs4 import BeautifulSoup from everyday_wechat.utils.common import SPIDER_HEADERS __all__ = ['get_2345_horoscope', 'get_today_horoscope'] XZW_BASE_URL_TOD...
31.271739
133
0.577338
#! usr/bin/env python # -*- coding: utf-8 -*- """ 爬取 星座屋 星座运势 http://tools.2345.com/naonao/ """ import re from functools import reduce import requests from bs4 import BeautifulSoup from everyday_wechat.utils.common import SPIDER_HEADERS __all__ = ['get_2345_horoscope', 'get_today_horoscope'] XZW_BASE_URL_TOD...
0
0
0
b67b7ebbe3349b2c4b392f6b74613696ad15fa6c
5,529
py
Python
tigerpath/models.py
richardhuangz/tigerpath
6f57dc3dffbc773dba7d27cf5fe89b1c92d1b214
[ "MIT" ]
10
2020-07-23T15:41:17.000Z
2021-11-29T02:25:54.000Z
tigerpath/models.py
richardhuangz/tigerpath
6f57dc3dffbc773dba7d27cf5fe89b1c92d1b214
[ "MIT" ]
133
2018-07-13T05:05:10.000Z
2022-03-08T22:05:59.000Z
tigerpath/models.py
churichard/tigerpath
9eda53e171cbd4c97ae2178da2a9b4ca433a91d8
[ "MIT" ]
12
2018-08-19T07:02:34.000Z
2021-12-23T02:14:41.000Z
from django.db import models from django.db.models.signals import post_save from django.dispatch import receiver from django.conf import settings from django.contrib.auth.models import User from django.contrib.postgres.fields import JSONField, ArrayField import uuid @receiver(post_save, sender=User)
32.333333
121
0.666486
from django.db import models from django.db.models.signals import post_save from django.dispatch import receiver from django.conf import settings from django.contrib.auth.models import User from django.contrib.postgres.fields import JSONField, ArrayField import uuid class Semester(models.Model): # fields sta...
931
4,080
206
10e9231683df2d9465801c1fb234717d37c518ec
1,725
py
Python
src/gateways/sqlite3_db.py
SaltyCatFish/rlt-yify-tools
758bfbde5535d80a2f70c6b5a2f913a3da321a6a
[ "MIT" ]
null
null
null
src/gateways/sqlite3_db.py
SaltyCatFish/rlt-yify-tools
758bfbde5535d80a2f70c6b5a2f913a3da321a6a
[ "MIT" ]
null
null
null
src/gateways/sqlite3_db.py
SaltyCatFish/rlt-yify-tools
758bfbde5535d80a2f70c6b5a2f913a3da321a6a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ .. module:: sqlite3_db :platform: Unix :synopsis: I/O for sqlite3 database .. moduleauthor:: Ryan Long <ryanlong1004@gmail.com> """ import os import sqlite3 class Sqlite3: """Gateway for I/O to sqlite 3 database ..todo:: Add context manager so we can close the db """ ...
25.746269
81
0.512464
# -*- coding: utf-8 -*- """ .. module:: sqlite3_db :platform: Unix :synopsis: I/O for sqlite3 database .. moduleauthor:: Ryan Long <ryanlong1004@gmail.com> """ import os import sqlite3 class Sqlite3: """Gateway for I/O to sqlite 3 database ..todo:: Add context manager so we can close the db """ ...
0
0
0
bd56e3e31719abc221db19edbbfd957b9554281f
916
py
Python
snakemake_workflow_template/release_modules/apis/identifiers_api/build/lib/identifiers_api/models/identifier.py
regulondbunam/RegulonDB-MCO-Felipe
6e5546907399d5712a8e69f2f8320af8d30b9d7b
[ "MIT" ]
null
null
null
snakemake_workflow_template/release_modules/apis/identifiers_api/build/lib/identifiers_api/models/identifier.py
regulondbunam/RegulonDB-MCO-Felipe
6e5546907399d5712a8e69f2f8320af8d30b9d7b
[ "MIT" ]
null
null
null
snakemake_workflow_template/release_modules/apis/identifiers_api/build/lib/identifiers_api/models/identifier.py
regulondbunam/RegulonDB-MCO-Felipe
6e5546907399d5712a8e69f2f8320af8d30b9d7b
[ "MIT" ]
null
null
null
from mongoengine import fields from mongoengine import DynamicDocument from .sequence import Sequence
45.8
77
0.791485
from mongoengine import fields from mongoengine import DynamicDocument from .sequence import Sequence class Identifier(DynamicDocument): id = fields.StringField(required=False, db_field="_id", primary_key=True) creationDate = fields.StringField(required=True) createdOnRegulonDBRelease = fields.StringField...
0
790
23
14b57ea50cfb35e04530851c3a3f920798b3208a
53
py
Python
Functions advanced - Lab/Aboslute values.py
DiyanKalaydzhiev23/Advanced---Python
ed2c60bb887c49e5a87624719633e2b8432f6f6b
[ "MIT" ]
null
null
null
Functions advanced - Lab/Aboslute values.py
DiyanKalaydzhiev23/Advanced---Python
ed2c60bb887c49e5a87624719633e2b8432f6f6b
[ "MIT" ]
null
null
null
Functions advanced - Lab/Aboslute values.py
DiyanKalaydzhiev23/Advanced---Python
ed2c60bb887c49e5a87624719633e2b8432f6f6b
[ "MIT" ]
null
null
null
print([abs(float(num)) for num in input().split()])
26.5
52
0.641509
print([abs(float(num)) for num in input().split()])
0
0
0
caa9425bc492cf957a5a47a05e9d006e452b6677
994
py
Python
hardhat/recipes/ippcompress.py
stangelandcl/hardhat
1ad0c5dec16728c0243023acb9594f435ef18f9c
[ "MIT" ]
null
null
null
hardhat/recipes/ippcompress.py
stangelandcl/hardhat
1ad0c5dec16728c0243023acb9594f435ef18f9c
[ "MIT" ]
null
null
null
hardhat/recipes/ippcompress.py
stangelandcl/hardhat
1ad0c5dec16728c0243023acb9594f435ef18f9c
[ "MIT" ]
null
null
null
from .base import GnuRecipe
32.064516
75
0.583501
from .base import GnuRecipe class IppCompressRecipe(GnuRecipe): def __init__(self, *args, **kwargs): super(IppCompressRecipe, self).__init__(*args, **kwargs) self.sha256 = '3d0d4da69e65c46fc97c3713aa4f56ca' \ 'b23f3edca76bded26e4db857dc9efd1f' self.depends = ['unzip'...
821
14
130
5ec984d8dc0e97318302b3f803e506a717a9d987
9,090
py
Python
modules/misc.py
kraileth/miniraven
00e703482240b7db96749ed4631c8d34e6cc7d2a
[ "BSD-2-Clause" ]
1
2021-08-21T04:54:39.000Z
2021-08-21T04:54:39.000Z
modules/misc.py
kraileth/miniraven
00e703482240b7db96749ed4631c8d34e6cc7d2a
[ "BSD-2-Clause" ]
3
2021-08-21T08:17:50.000Z
2021-11-24T09:09:49.000Z
modules/misc.py
kraileth/miniraven
00e703482240b7db96749ed4631c8d34e6cc7d2a
[ "BSD-2-Clause" ]
1
2021-08-29T06:08:30.000Z
2021-08-29T06:08:30.000Z
############# # Imports # ############# import globalvars import modules.conf as conf import hashlib import os import shutil import subprocess from urllib.request import urlretrieve ############### # Functions # ############### ########## # Main # ########## if __name__ == "__main__": main()
38.846154
150
0.612651
############# # Imports # ############# import globalvars import modules.conf as conf import hashlib import os import shutil import subprocess from urllib.request import urlretrieve ############### # Functions # ############### def die(msg): print(msg) exit(1) def verbose_output(string): if globalvars...
8,257
0
529
181c0f79602e5dd8070844bb93a31038cafbc56c
477
py
Python
accounts/views.py
lukeaparker/makewiki_v2
67e4789c5f7fffdeb8f0fbf6b1a2366e32633204
[ "MIT" ]
null
null
null
accounts/views.py
lukeaparker/makewiki_v2
67e4789c5f7fffdeb8f0fbf6b1a2366e32633204
[ "MIT" ]
5
2020-06-06T00:38:29.000Z
2022-02-10T10:30:47.000Z
accounts/views.py
lukeaparker/makewiki_v2
67e4789c5f7fffdeb8f0fbf6b1a2366e32633204
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.shortcuts import render from django.contrib.auth.forms import UserCreationForm from django.urls import reverse_lazy from django.views.generic import CreateView
26.5
54
0.75891
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.shortcuts import render from django.contrib.auth.forms import UserCreationForm from django.urls import reverse_lazy from django.views.generic import CreateView class SignUpView(CreateView): form_class = UserCreationForm success_url = ...
53
156
23
fb571d701e291f44430c57f077fe6e3bcb593f7a
824
py
Python
openFood/foodData/models.py
caro-marks/open-Food
6d8817f307e8e50651b54f422a43b6e2a5c9eddf
[ "Unlicense" ]
null
null
null
openFood/foodData/models.py
caro-marks/open-Food
6d8817f307e8e50651b54f422a43b6e2a5c9eddf
[ "Unlicense" ]
null
null
null
openFood/foodData/models.py
caro-marks/open-Food
6d8817f307e8e50651b54f422a43b6e2a5c9eddf
[ "Unlicense" ]
null
null
null
from django.db import models from django.utils.translation import gettext_lazy as _
37.454545
67
0.701456
from django.db import models from django.utils.translation import gettext_lazy as _ class Product(models.Model): STATUS = ( ("DR", _("draft")), ("TR", _("trash")), ("PB", _("published")) ) status = models.CharField(max_length=2, choices=STATUS) imported_t = models.DateTimeFiel...
0
716
23
a9c7bc91fa36f637b09e12bc7ea9ab66acbc19d2
2,079
py
Python
pagework/backlogin/views.py
Grizzy-bear/Virtual-experiment-WEB
9fc1fdfc1bb369addfc52e39f713200a3724c8e8
[ "MIT" ]
null
null
null
pagework/backlogin/views.py
Grizzy-bear/Virtual-experiment-WEB
9fc1fdfc1bb369addfc52e39f713200a3724c8e8
[ "MIT" ]
null
null
null
pagework/backlogin/views.py
Grizzy-bear/Virtual-experiment-WEB
9fc1fdfc1bb369addfc52e39f713200a3724c8e8
[ "MIT" ]
null
null
null
from django.shortcuts import render from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import redirect, reverse from django import forms from django.views.decorators.csrf import csrf_exempt from django.contrib.auth.decorators import login_required # Create your views here. # @login_requ...
31.984615
66
0.622415
from django.shortcuts import render from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import redirect, reverse from django import forms from django.views.decorators.csrf import csrf_exempt from django.contrib.auth.decorators import login_required # Create your views here. def index(req...
1,491
63
91
769548074a798e406f0b6353447326aef507674c
201
py
Python
tests/records/models.py
chan-dra/django-rest-framework-oauth
b85afd29e4bbc85697edabab9644edc5b4fe60de
[ "MIT" ]
87
2016-01-24T16:41:02.000Z
2021-12-20T21:13:24.000Z
tests/records/models.py
chan-dra/django-rest-framework-oauth
b85afd29e4bbc85697edabab9644edc5b4fe60de
[ "MIT" ]
16
2020-02-11T23:19:19.000Z
2022-03-11T23:33:40.000Z
tests/records/models.py
chan-dra/django-rest-framework-oauth
b85afd29e4bbc85697edabab9644edc5b4fe60de
[ "MIT" ]
57
2016-02-02T05:46:14.000Z
2021-03-21T15:46:06.000Z
from django.db import models
28.714286
74
0.736318
from django.db import models class Record(models.Model): account = models.ForeignKey('accounts.Account', blank=True, null=True) owner = models.ForeignKey('users.User', blank=True, null=True)
0
148
23
f568858393088566079b0a9338f9153052633141
2,215
py
Python
getHrs.py
anthonytoribio/MLBHomeRuns
99405585f63c300acf765af6889f65346aecb1ae
[ "MIT" ]
null
null
null
getHrs.py
anthonytoribio/MLBHomeRuns
99405585f63c300acf765af6889f65346aecb1ae
[ "MIT" ]
null
null
null
getHrs.py
anthonytoribio/MLBHomeRuns
99405585f63c300acf765af6889f65346aecb1ae
[ "MIT" ]
null
null
null
# getHrs.py # Creator: Robert Toribio # Date: 10/28/2021 import statsapi from datetime import date import re if __name__ == "__main__": main()
26.369048
85
0.582844
# getHrs.py # Creator: Robert Toribio # Date: 10/28/2021 import statsapi from datetime import date import re def totalhrsToday(all_hrs): total_hrs = 0 for element in all_hrs: total_hrs += int(element[1]) return total_hrs def getGames(date): game_ids = [] gamesToday = statsapi.schedule(d...
1,907
0
127
9fb4ba1dc50eab2b20907ba4b668bcad8e0c63de
409
py
Python
mundo02/exe061.py
victor-nog/python3-exercicios
3996a41ee6cb8125573bf6f8997a69c9764fabae
[ "MIT" ]
null
null
null
mundo02/exe061.py
victor-nog/python3-exercicios
3996a41ee6cb8125573bf6f8997a69c9764fabae
[ "MIT" ]
null
null
null
mundo02/exe061.py
victor-nog/python3-exercicios
3996a41ee6cb8125573bf6f8997a69c9764fabae
[ "MIT" ]
null
null
null
#061: Refaça o DESAFIO 51, lendo o primeiro termo e a razão de uma PA, mostrando os 10 primeiros termos da progressão usando a estrutura while. print('=-=' * 15) print(f'{"PROGRESSÃO ARITMÉTICA":^40}') print('=-=' * 15) n = int(input('Digite o 1º termo da PA: ')) r = int(input('Digite a razão: ')) c = n z = 0 while...
25.5625
143
0.603912
#061: Refaça o DESAFIO 51, lendo o primeiro termo e a razão de uma PA, mostrando os 10 primeiros termos da progressão usando a estrutura while. print('=-=' * 15) print(f'{"PROGRESSÃO ARITMÉTICA":^40}') print('=-=' * 15) n = int(input('Digite o 1º termo da PA: ')) r = int(input('Digite a razão: ')) c = n z = 0 while...
0
0
0
703fb42904ffbaf021f55f86833b77627d7e77b8
434
py
Python
steelconnection/__version__.py
gwenblum/SteelConnection
1ee809a72696eb3c888b422d382dacfd016e2484
[ "MIT" ]
null
null
null
steelconnection/__version__.py
gwenblum/SteelConnection
1ee809a72696eb3c888b422d382dacfd016e2484
[ "MIT" ]
null
null
null
steelconnection/__version__.py
gwenblum/SteelConnection
1ee809a72696eb3c888b422d382dacfd016e2484
[ "MIT" ]
null
null
null
"""Provide version and author details.""" __title__ = "steelconnection" __description__ = "Simplify access to the Riverbed SteelConnect REST API." __version__ = "0.95.0" __author__ = "Greg Mueller" __author_email__ = "steelconnection@grelleum.com" __copyright__ = "Copyright 2018 Greg Mueller" __license__ = "MIT" __ur...
33.384615
74
0.778802
"""Provide version and author details.""" __title__ = "steelconnection" __description__ = "Simplify access to the Riverbed SteelConnect REST API." __version__ = "0.95.0" __author__ = "Greg Mueller" __author_email__ = "steelconnection@grelleum.com" __copyright__ = "Copyright 2018 Greg Mueller" __license__ = "MIT" __ur...
0
0
0
cc2c055b3d482041b571ee0b15f4759db9a25404
11,747
py
Python
test_la.py
olgarogova86/loganalyzer
19bba7c7dac1b5f6b73d8dce32d99406bfbaa85d
[ "MIT" ]
null
null
null
test_la.py
olgarogova86/loganalyzer
19bba7c7dac1b5f6b73d8dce32d99406bfbaa85d
[ "MIT" ]
null
null
null
test_la.py
olgarogova86/loganalyzer
19bba7c7dac1b5f6b73d8dce32d99406bfbaa85d
[ "MIT" ]
null
null
null
import unittest import logging from log_analyzer import * import os import imp if __name__ == "__main__": unittest.main()
42.407942
274
0.49519
import unittest import logging from log_analyzer import * import os import imp class LogAnalyzerTest(unittest.TestCase): @staticmethod def create_files_for_test(): with open( "test_config_ok.txt", mode='w+', encoding="utf-8") as test_file: ...
2,230
9,355
25
cd43b342d0b091404a211c04b0d5a837c2d32045
2,773
py
Python
Calibaration.py
wq13552463699/3D_Printed_2_Fingers_Gripper
4b0aab18bac54e6862bc38e6ac7a0b5229ffe01d
[ "MIT" ]
3
2021-11-02T10:48:52.000Z
2021-11-25T02:14:44.000Z
Calibaration.py
wq13552463699/3D_Printed_2_Fingers_Gripper
4b0aab18bac54e6862bc38e6ac7a0b5229ffe01d
[ "MIT" ]
null
null
null
Calibaration.py
wq13552463699/3D_Printed_2_Fingers_Gripper
4b0aab18bac54e6862bc38e6ac7a0b5229ffe01d
[ "MIT" ]
null
null
null
from Robotic_Servos import * import time import sys import pandas as pd print("--------------------------------------------------------------------") print("README") print("The is the calibration function, help you to calibarate the gripper") print("for different device. Stongly reconmmend you calibarate the g...
36.486842
116
0.638298
from Robotic_Servos import * import time import sys import pandas as pd print("--------------------------------------------------------------------") print("README") print("The is the calibration function, help you to calibarate the gripper") print("for different device. Stongly reconmmend you calibarate the g...
0
0
0
b8271594117334721ebed7650607ebd2032029b2
22,068
py
Python
src/apiflask/scaffold.py
Farmer-chong/apiflask
a2bc208770a703bdf6ecabe2bb0ddbfce3015aab
[ "MIT" ]
null
null
null
src/apiflask/scaffold.py
Farmer-chong/apiflask
a2bc208770a703bdf6ecabe2bb0ddbfce3015aab
[ "MIT" ]
null
null
null
src/apiflask/scaffold.py
Farmer-chong/apiflask
a2bc208770a703bdf6ecabe2bb0ddbfce3015aab
[ "MIT" ]
null
null
null
import typing as t import warnings from collections.abc import Mapping as ABCMapping from functools import wraps from flask import current_app from flask import jsonify from flask import Response from flask.views import MethodViewType from marshmallow import ValidationError as MarshmallowValidationError from webargs.f...
37.214165
100
0.55909
import typing as t import warnings from collections.abc import Mapping as ABCMapping from functools import wraps from flask import current_app from flask import jsonify from flask import Response from flask.views import MethodViewType from marshmallow import ValidationError as MarshmallowValidationError from webargs.f...
6,313
0
290
d7025517b649a6f69189b2de7d3a565d13475133
2,852
py
Python
test/test_evaluation.py
Yifei-Liu/knee
7c2c7092a2c2dc4c4dac5ebc3b623c5725e0339b
[ "MIT" ]
null
null
null
test/test_evaluation.py
Yifei-Liu/knee
7c2c7092a2c2dc4c4dac5ebc3b623c5725e0339b
[ "MIT" ]
null
null
null
test/test_evaluation.py
Yifei-Liu/knee
7c2c7092a2c2dc4c4dac5ebc3b623c5725e0339b
[ "MIT" ]
null
null
null
import math import unittest import numpy as np import knee.evaluation as evaluation if __name__ == '__main__': unittest.main()
35.209877
84
0.556101
import math import unittest import numpy as np import knee.evaluation as evaluation class TestEvaluation(unittest.TestCase): def test_mae_0(self): points = np.array([[0,0], [1,1], [2,2]]) knees = np.array([0,1,2]) expected = np.array([[0,0], [1,1], [2,2]]) result = evaluation.mae(p...
2,404
19
297
f4157fbbe6301964ab0dc2a49ae803eee6dc1a70
1,507
py
Python
compoelem/detect/openpose_wrapper.py
tilman/compositional_elements
45271196ed01d0515357c7abdf35d6b87f2036d5
[ "MIT" ]
2
2021-06-13T16:21:52.000Z
2021-06-13T16:21:53.000Z
compoelem/detect/openpose_wrapper.py
tilman/compositional_elements
45271196ed01d0515357c7abdf35d6b87f2036d5
[ "MIT" ]
null
null
null
compoelem/detect/openpose_wrapper.py
tilman/compositional_elements
45271196ed01d0515357c7abdf35d6b87f2036d5
[ "MIT" ]
null
null
null
import argparse from .openpose.lib.utils.common import Human from typing import Sequence import torch import torch.nn as nn from . import converter from .openpose.lib.network.rtpose_vgg import get_model from .openpose.evaluate.coco_eval import get_outputs from .openpose.lib.utils.paf_to_pose import paf_to_pose_cpp fro...
33.488889
103
0.704711
import argparse from .openpose.lib.utils.common import Human from typing import Sequence import torch import torch.nn as nn from . import converter from .openpose.lib.network.rtpose_vgg import get_model from .openpose.evaluate.coco_eval import get_outputs from .openpose.lib.utils.paf_to_pose import paf_to_pose_cpp fro...
226
0
23
b7f3cad9283f59f7ed3be01005cd36d5edaac206
20,097
py
Python
Tensorflow/Inception/Trainer.py
BreastCancerAI/IDC-Classifier
cf75d97fd17e58ca8f47004928933f2972254a42
[ "MIT" ]
15
2018-08-09T03:40:58.000Z
2019-07-08T08:47:44.000Z
Tensorflow/Inception/Trainer.py
AdamMiltonBarker/IDC-Classifier
a354effdf65e6461baf083eeb9737d51fc5e7cbd
[ "MIT" ]
null
null
null
Tensorflow/Inception/Trainer.py
AdamMiltonBarker/IDC-Classifier
a354effdf65e6461baf083eeb9737d51fc5e7cbd
[ "MIT" ]
6
2018-08-09T03:41:17.000Z
2019-03-17T16:49:34.000Z
from __future__ import print_function ############################################################################################ # # The MIT License (MIT) # # Intel AI DevJam IDC Demo Classification Server # Copyright (C) 2018 Adam Milton-Barker (AdamMiltonBarker.com) # # Permission is hereby granted, free of charg...
43.5
218
0.665771
from __future__ import print_function ############################################################################################ # # The MIT License (MIT) # # Intel AI DevJam IDC Demo Classification Server # Copyright (C) 2018 Adam Milton-Barker (AdamMiltonBarker.com) # # Permission is hereby granted, free of charg...
11,112
5,623
69
1f2c40556d9a2e5c386f7f78d56c1324b2a9ed22
588
py
Python
stapy/sta/entities/observation.py
zMoooooritz/STApy
022183e0a35ba0d73b97986a695b2a1e6bd0c77c
[ "MIT" ]
8
2021-09-02T18:53:19.000Z
2022-03-10T13:40:57.000Z
stapy/sta/entities/observation.py
zMoooooritz/stapy
022183e0a35ba0d73b97986a695b2a1e6bd0c77c
[ "MIT" ]
20
2021-08-30T19:06:30.000Z
2022-03-15T21:16:53.000Z
stapy/sta/entities/observation.py
zMoooooritz/stapy
022183e0a35ba0d73b97986a695b2a1e6bd0c77c
[ "MIT" ]
null
null
null
from stapy.sta.time import Time from stapy.sta.abstract_entity import AbstractEntity # TODO resultQuality DQ_Element
30.947368
52
0.62415
from stapy.sta.time import Time from stapy.sta.abstract_entity import AbstractEntity # TODO resultQuality DQ_Element class Observation(AbstractEntity): entry_map = { "phenomenonTime": (True, True, Time), "result": (True, True, object), "resultTime": (False, True, Time), "resultQuali...
33
415
22
310857b0018e081679937b133dc6372333ac7766
9,280
py
Python
d2bot/test/Non-RL.py
lenLRX/Dota2BotStepByStep
3b6bebeb194bc9d4657947afa0776944dea24b84
[ "MIT" ]
11
2018-06-24T12:45:58.000Z
2021-10-14T02:16:12.000Z
d2bot/test/Non-RL.py
lenLRX/Dota2BotStepByStep
3b6bebeb194bc9d4657947afa0776944dea24b84
[ "MIT" ]
null
null
null
d2bot/test/Non-RL.py
lenLRX/Dota2BotStepByStep
3b6bebeb194bc9d4657947afa0776944dea24b84
[ "MIT" ]
3
2019-03-02T07:40:43.000Z
2021-06-05T02:09:16.000Z
import d2bot.visualizer as visualizer import d2bot.core.game_env as game_env import d2bot.simulator as simulator from d2bot.torch.a3c.ActorCritic import ActorCritic import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.autograd import Variable import random import ...
27.867868
93
0.577047
import d2bot.visualizer as visualizer import d2bot.core.game_env as game_env import d2bot.simulator as simulator from d2bot.torch.a3c.ActorCritic import ActorCritic import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.autograd import Variable import random import ...
8,072
30
562
f2f87fcca3b8d55be7da08d089431edd1729a2a7
1,654
py
Python
dependency_tree.py
oriolmirosa/dash-recipes
c01372292d60c3fd8c1f3a47bca6330c2b268ba4
[ "MIT" ]
932
2017-07-08T06:37:23.000Z
2022-03-31T11:10:07.000Z
dependency_tree.py
oriolmirosa/dash-recipes
c01372292d60c3fd8c1f3a47bca6330c2b268ba4
[ "MIT" ]
29
2018-02-06T20:09:58.000Z
2021-08-24T06:01:11.000Z
dependency_tree.py
oriolmirosa/dash-recipes
c01372292d60c3fd8c1f3a47bca6330c2b268ba4
[ "MIT" ]
301
2017-09-25T16:16:41.000Z
2022-03-24T23:48:59.000Z
import numpy as np import dash from dash.dependencies import Input, Output from plotly.graph_objs import * import dash_core_components as dcc import dash_html_components as html app = dash.Dash() # function to plot # default ranges for x0 & x1 xranges = [[0,1], [-np.pi, np.pi]] # dropdown to pick which x to plot again...
35.191489
90
0.646312
import numpy as np import dash from dash.dependencies import Input, Output from plotly.graph_objs import * import dash_core_components as dcc import dash_html_components as html app = dash.Dash() # function to plot def func(x): return x[:,0]**2 + np.sin(x[:,1]) # default ranges for x0 & x1 xranges = [[0,1], [-np.p...
352
0
88
c7a9abf5053cd3d1b3e6bced909732c831680d81
5,522
py
Python
datasets_process/get_counter_per_class.py
mumu0419/Python-data_analysis
f81d5d439801dc3668e6a6fc925a73b0aa8750ff
[ "MIT" ]
1
2020-12-01T09:06:35.000Z
2020-12-01T09:06:35.000Z
datasets_process/get_counter_per_class.py
mumu0419/Python-data_analysis
f81d5d439801dc3668e6a6fc925a73b0aa8750ff
[ "MIT" ]
null
null
null
datasets_process/get_counter_per_class.py
mumu0419/Python-data_analysis
f81d5d439801dc3668e6a6fc925a73b0aa8750ff
[ "MIT" ]
null
null
null
''' 统计标注类别和各类别数量 2020.4.21 ''' import operator import sys import argparse import matplotlib.pyplot as plt plt.rcParams['font.sans-serif'] = ['SimHei'] # 用来正常显示中文标签 path = 'D:\wsm\pycharm_pjs\data-analysis\scripts\\traffic_anno.txt' #标注txt文件路径 results_files_path = 'D:\wsm\pycharm_pjs\data-analysis\scripts\...
33.26506
124
0.659906
''' 统计标注类别和各类别数量 2020.4.21 ''' import operator import sys import argparse import matplotlib.pyplot as plt plt.rcParams['font.sans-serif'] = ['SimHei'] # 用来正常显示中文标签 path = 'D:\wsm\pycharm_pjs\data-analysis\scripts\\traffic_anno.txt' #标注txt文件路径 results_files_path = 'D:\wsm\pycharm_pjs\data-analysis\scripts\...
3,781
0
46
9be070e9c3789d14b959cd841911b74851dac19f
302
py
Python
summation_of_primes/python/summation_of_primes.py
ncovercash/sample_projects
7cfd77e8f20fa1a67b0ed7957f9b2b49cb5f5dac
[ "MIT" ]
1
2017-03-31T14:42:36.000Z
2017-03-31T14:42:36.000Z
summation_of_primes/python/summation_of_primes.py
smileytechguy/sample_projects
7cfd77e8f20fa1a67b0ed7957f9b2b49cb5f5dac
[ "MIT" ]
1
2020-03-21T05:51:19.000Z
2020-03-21T05:51:19.000Z
summation_of_primes/python/summation_of_primes.py
ncovercash/sample_projects
7cfd77e8f20fa1a67b0ed7957f9b2b49cb5f5dac
[ "MIT" ]
1
2018-10-23T10:57:08.000Z
2018-10-23T10:57:08.000Z
import math max = 2000000 primes = [2] for i in xrange(3,max,2): prime = True limit = math.ceil(math.sqrt(i)) # tip from SO for j in xrange(3, int(limit)+1, 2): if prime: if i % j == 0: prime = False if prime: primes.append(i) sum = 0 for prime in primes: sum += prime; print sum;
13.727273
46
0.612583
import math max = 2000000 primes = [2] for i in xrange(3,max,2): prime = True limit = math.ceil(math.sqrt(i)) # tip from SO for j in xrange(3, int(limit)+1, 2): if prime: if i % j == 0: prime = False if prime: primes.append(i) sum = 0 for prime in primes: sum += prime; print sum;
0
0
0
d9365d7de5ef088acc5c1dbada1888d46dd9b611
914
py
Python
my_study/sys_study/oneos.py
zhangyage/Python-oldboy
a95c1b465929e2be641e425fcb5e15b366800831
[ "Apache-2.0" ]
1
2020-06-04T08:44:09.000Z
2020-06-04T08:44:09.000Z
my_study/sys_study/oneos.py
zhangyage/Python-oldboy
a95c1b465929e2be641e425fcb5e15b366800831
[ "Apache-2.0" ]
null
null
null
my_study/sys_study/oneos.py
zhangyage/Python-oldboy
a95c1b465929e2be641e425fcb5e15b366800831
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding:utf-8 -*- import os #查看操作系统 print os.name #获取工作目录 print os.getcwd() #获取某个目录下的所有文件名 print os.listdir('E:\workspace\Python-oldboy') #运行一个shell命令 调用计算器 # os.system("calc") #删除某个文件 #os.remove("E:\workspace\Python-oldboy\my_study\sys_study") #判断是文件还是文件夹 print ...
26.882353
79
0.714442
#!/usr/bin/env python # -*- coding:utf-8 -*- import os #查看操作系统 print os.name #获取工作目录 print os.getcwd() #获取某个目录下的所有文件名 print os.listdir('E:\workspace\Python-oldboy') #运行一个shell命令 调用计算器 # os.system("calc") #删除某个文件 #os.remove("E:\workspace\Python-oldboy\my_study\sys_study") #判断是文件还是文件夹 print ...
0
0
0
a0a8a1163d4425922eb4c83ff3a2dd05050764f8
9,470
py
Python
tests/helpers/test_cmd.py
lucasvieirasilva/aws-codeartifact-poetry
ad224f8e403373bc6336d362ce11ba84c2bad616
[ "MIT" ]
null
null
null
tests/helpers/test_cmd.py
lucasvieirasilva/aws-codeartifact-poetry
ad224f8e403373bc6336d362ce11ba84c2bad616
[ "MIT" ]
null
null
null
tests/helpers/test_cmd.py
lucasvieirasilva/aws-codeartifact-poetry
ad224f8e403373bc6336d362ce11ba84c2bad616
[ "MIT" ]
null
null
null
"""aws_codeartifact_poetry.helpers.cmd unit tests.""" import os import subprocess import sys from unittest.mock import MagicMock, patch import pytest from _pytest.logging import LogCaptureFixture from aws_codeartifact_poetry.helpers.catch_exceptions import CLIError from aws_codeartifact_poetry.helpers.cmd import exe...
36.992188
107
0.564942
"""aws_codeartifact_poetry.helpers.cmd unit tests.""" import os import subprocess import sys from unittest.mock import MagicMock, patch import pytest from _pytest.logging import LogCaptureFixture from aws_codeartifact_poetry.helpers.catch_exceptions import CLIError from aws_codeartifact_poetry.helpers.cmd import exe...
0
0
0
2c47de5b76b6c54b316d8474d4ada4ab32ab4b83
7,171
py
Python
servers/genesis/builder.py
peterhajas/Genesis
2f1a03c38934b892ee6bb04e07e867bf463b7ae5
[ "0BSD" ]
7
2015-07-06T02:36:54.000Z
2017-08-10T14:28:01.000Z
servers/genesis/builder.py
peterhajas/Genesis
2f1a03c38934b892ee6bb04e07e867bf463b7ae5
[ "0BSD" ]
1
2021-03-25T22:30:40.000Z
2021-03-25T22:30:40.000Z
servers/genesis/builder.py
peterhajas/Genesis
2f1a03c38934b892ee6bb04e07e867bf463b7ae5
[ "0BSD" ]
2
2015-03-23T22:45:46.000Z
2015-12-22T11:30:02.000Z
import os import mimetypes import fnmatch import yaml from genesis.shell import ShellProxy, ProcessQuery from genesis.utils import expand, is_windows from genesis.config import load_yaml from genesis.scm import get_scm # TODO: simplify here
30.130252
117
0.619858
import os import mimetypes import fnmatch import yaml from genesis.shell import ShellProxy, ProcessQuery from genesis.utils import expand, is_windows from genesis.config import load_yaml from genesis.scm import get_scm # TODO: simplify here class IgnoreList(object): def __init__(self, ignored): self.ig...
4,859
1,891
172
be736746afe8eca23cd41c79204de3296f3b8f02
1,171
py
Python
alipay/aop/api/response/AlipaySecurityRiskHufuAuthQueryResponse.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/response/AlipaySecurityRiskHufuAuthQueryResponse.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/response/AlipaySecurityRiskHufuAuthQueryResponse.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import simplejson as json from alipay.aop.api.response.AlipayResponse import AlipayResponse
25.456522
112
0.641332
#!/usr/bin/env python # -*- coding: utf-8 -*- import simplejson as json from alipay.aop.api.response.AlipayResponse import AlipayResponse class AlipaySecurityRiskHufuAuthQueryResponse(AlipayResponse): def __init__(self): super(AlipaySecurityRiskHufuAuthQueryResponse, self).__init__() self._seria...
659
349
23
10948e902dc363f8c5e4c3ca350f3b8613e4a2d6
790
py
Python
Challenge1/main.py
Gerifield/websocket-smuggle
3541c358c431aad5f26452538a561b79ff682750
[ "MIT" ]
284
2019-11-02T16:47:48.000Z
2022-03-29T10:06:39.000Z
Challenge1/main.py
Gerifield/websocket-smuggle
3541c358c431aad5f26452538a561b79ff682750
[ "MIT" ]
2
2019-12-04T08:58:34.000Z
2020-08-06T01:48:21.000Z
Challenge1/main.py
Gerifield/websocket-smuggle
3541c358c431aad5f26452538a561b79ff682750
[ "MIT" ]
38
2019-11-02T16:50:21.000Z
2022-02-25T02:26:02.000Z
#!/usr/bin/python from flask import Flask, render_template from flask_socketio import SocketIO from flask_restful import Resource, Api app = Flask(__name__) api = Api(app) socketio = SocketIO(app, cors_allowed_origins="*") @app.route('/') api.add_resource(Flag, '/flag') api.add_resource(InternalAPI, '/api/inte...
19.268293
63
0.689873
#!/usr/bin/python from flask import Flask, render_template from flask_socketio import SocketIO from flask_restful import Resource, Api app = Flask(__name__) api = Api(app) socketio = SocketIO(app, cors_allowed_origins="*") @app.route('/') def index(): return render_template('index.html') class InternalAPI(Re...
206
7
142
7bf9552b9207305bce3606b8880dc37e9726ca8f
457
py
Python
rtsdrl/mathcore.py
AI-Guru/RTSDRL
b229f8d7b6ebcee36fd55e2a69fc988b37a20254
[ "BSD-3-Clause" ]
null
null
null
rtsdrl/mathcore.py
AI-Guru/RTSDRL
b229f8d7b6ebcee36fd55e2a69fc988b37a20254
[ "BSD-3-Clause" ]
null
null
null
rtsdrl/mathcore.py
AI-Guru/RTSDRL
b229f8d7b6ebcee36fd55e2a69fc988b37a20254
[ "BSD-3-Clause" ]
null
null
null
import math import numpy as np
22.85
65
0.617068
import math import numpy as np def vector_from_angle_and_length(angle, length): vector = (length * math.sin(angle), length * math.cos(angle)) vector = np.array(vector) return vector def polar_coordinates(x, y): angle = math.atan2(x, y) if angle < 0.0: angle += 2.0 * math.pi length = m...
355
0
69
807a5780507112b5e159e40fc891bd6dd97e9017
138
py
Python
examples/docs_snippets/docs_snippets_tests/concepts_tests/io_management_tests/test_load_from_config.py
rpatil524/dagster
6f918d94cbd543ab752ab484a65e3a40fd441716
[ "Apache-2.0" ]
1
2021-01-31T19:16:29.000Z
2021-01-31T19:16:29.000Z
examples/docs_snippets/docs_snippets_tests/concepts_tests/io_management_tests/test_load_from_config.py
rpatil524/dagster
6f918d94cbd543ab752ab484a65e3a40fd441716
[ "Apache-2.0" ]
null
null
null
examples/docs_snippets/docs_snippets_tests/concepts_tests/io_management_tests/test_load_from_config.py
rpatil524/dagster
6f918d94cbd543ab752ab484a65e3a40fd441716
[ "Apache-2.0" ]
1
2019-09-11T03:02:27.000Z
2019-09-11T03:02:27.000Z
from docs_snippets.concepts.io_management.load_from_config import execute_with_config
23
85
0.847826
from docs_snippets.concepts.io_management.load_from_config import execute_with_config def test_execute_job(): execute_with_config()
28
0
23
d9cf514f3a64cd53c79d6e2b597170f2805f5843
941
py
Python
backend/app/app/api/api_v1/endpoints/utils.py
Pinafore/Karl-flashcards-web-app
2f4d9925c545f83eb3289dfef85d9b0bf9bfeb8c
[ "Apache-2.0" ]
7
2020-09-13T06:06:32.000Z
2021-11-15T11:37:16.000Z
backend/app/app/api/api_v1/endpoints/utils.py
Pinafore/Karl-flashcards-web-app
2f4d9925c545f83eb3289dfef85d9b0bf9bfeb8c
[ "Apache-2.0" ]
16
2020-08-28T20:38:27.000Z
2021-03-18T04:03:00.000Z
backend/app/app/api/api_v1/endpoints/utils.py
Pinafore/Karl-flashcards-web-app
2f4d9925c545f83eb3289dfef85d9b0bf9bfeb8c
[ "Apache-2.0" ]
null
null
null
from typing import Any from app import models, schemas from app.api import deps from app.core.celery_app import celery_app from app.utils.utils import send_test_email from fastapi import APIRouter, Depends from pydantic.networks import EmailStr router = APIRouter() @router.post("/test-celery/", response_model=schem...
26.885714
79
0.712009
from typing import Any from app import models, schemas from app.api import deps from app.core.celery_app import celery_app from app.utils.utils import send_test_email from fastapi import APIRouter, Depends from pydantic.networks import EmailStr router = APIRouter() @router.post("/test-celery/", response_model=schem...
0
0
0
01ad6f5244ddd28d391f605c62bcb75f67862871
1,246
py
Python
aceclient/clientcounter.py
sergelevin/aceproxy
bdd9283426ebb4431c48ede3f43a2245f2644ff1
[ "MIT" ]
182
2015-01-25T09:43:55.000Z
2021-10-20T02:47:45.000Z
aceclient/clientcounter.py
sergelevin/aceproxy
bdd9283426ebb4431c48ede3f43a2245f2644ff1
[ "MIT" ]
39
2015-01-02T18:25:47.000Z
2018-05-20T15:01:03.000Z
aceclient/clientcounter.py
sergelevin/aceproxy
bdd9283426ebb4431c48ede3f43a2245f2644ff1
[ "MIT" ]
120
2015-01-07T00:59:21.000Z
2022-03-17T10:37:42.000Z
''' Simple Client Counter for VLC VLM '''
22.25
48
0.500803
''' Simple Client Counter for VLC VLM ''' class ClientCounter(object): def __init__(self): self.clients = dict() self.aces = dict() self.total = 0 def get(self, id): return self.clients.get(id, (False,))[0] def add(self, id, ip): if self.clients.has_key(id): ...
984
7
212
793a5efcd180daeef2d43cb9b39b2ee7f68c98ad
1,379
py
Python
setup.py
swoopyy/dask-pipes
2a4be29e428b330623a7cfd1f9245e17b0a51fda
[ "MIT" ]
1
2019-12-12T18:23:25.000Z
2019-12-12T18:23:25.000Z
setup.py
swoopyy/dask-pipes
2a4be29e428b330623a7cfd1f9245e17b0a51fda
[ "MIT" ]
null
null
null
setup.py
swoopyy/dask-pipes
2a4be29e428b330623a7cfd1f9245e17b0a51fda
[ "MIT" ]
null
null
null
import importlib import os import io import logging from setuptools import setup, find_packages from typing import List import pathlib PARENT = pathlib.Path(__file__).parent logger = logging.getLogger(__name__) # Kept manually in sync with dask_pipes.__version__ # noinspection PyUnresolvedReferences spec = importlib...
27.039216
95
0.68963
import importlib import os import io import logging from setuptools import setup, find_packages from typing import List import pathlib PARENT = pathlib.Path(__file__).parent logger = logging.getLogger(__name__) # Kept manually in sync with dask_pipes.__version__ # noinspection PyUnresolvedReferences spec = importlib...
546
0
46
c2e1150cf4ae0e085212327cc80e2ce40f2d8ab0
5,297
py
Python
tests/conftest.py
nismod/energy_demand
247fcea074a846026710ed9b039b22f8b9835643
[ "MIT" ]
14
2018-02-23T10:03:45.000Z
2022-03-03T13:59:30.000Z
tests/conftest.py
nismod/energy_demand
247fcea074a846026710ed9b039b22f8b9835643
[ "MIT" ]
59
2017-02-22T15:03:30.000Z
2020-12-16T12:26:17.000Z
tests/conftest.py
nismod/energy_demand
247fcea074a846026710ed9b039b22f8b9835643
[ "MIT" ]
5
2017-08-22T11:31:42.000Z
2020-06-24T18:30:12.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Dummy conftest.py for energy_demand. If you don't know what this is for, just leave it empty. Read more about conftest.py under: https://pytest.org/latest/plugins.html """ from __future__ import absolute_import, division, print_function from pytest imp...
50.447619
147
0.871814
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Dummy conftest.py for energy_demand. If you don't know what this is for, just leave it empty. Read more about conftest.py under: https://pytest.org/latest/plugins.html """ from __future__ import absolute_import, division, print_function from pytest imp...
4,914
0
22
5701e722487411fa3e060fad1f184a3bcbc85256
1,630
py
Python
Bootstrapping.py
marcovaas/uclametrics
be321933bcc6416424512e94aae3a4a780813b4d
[ "MIT" ]
null
null
null
Bootstrapping.py
marcovaas/uclametrics
be321933bcc6416424512e94aae3a4a780813b4d
[ "MIT" ]
null
null
null
Bootstrapping.py
marcovaas/uclametrics
be321933bcc6416424512e94aae3a4a780813b4d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Wed Jan 26 18:33:09 2022 @author: marco """ import pandas as pd import numpy as np import random import math import os from scipy.linalg import pinv as inv from sklearn.linear_model import Lasso from sklearn.linear_model import LassoCV import matplotlib.pyplot as ...
28.103448
102
0.596319
# -*- coding: utf-8 -*- """ Created on Wed Jan 26 18:33:09 2022 @author: marco """ import pandas as pd import numpy as np import random import math import os from scipy.linalg import pinv as inv from sklearn.linear_model import Lasso from sklearn.linear_model import LassoCV import matplotlib.pyplot as ...
827
0
48
ed12d0cbb78972864309087cd934535298b1aaae
228
py
Python
bmsSenderDummyData.py
clean-code-craft-tcq-1/stream-bms-data-karippalrohith
7581a4a84e85ec22864e7a181f74b4baee6ae5bb
[ "MIT" ]
null
null
null
bmsSenderDummyData.py
clean-code-craft-tcq-1/stream-bms-data-karippalrohith
7581a4a84e85ec22864e7a181f74b4baee6ae5bb
[ "MIT" ]
null
null
null
bmsSenderDummyData.py
clean-code-craft-tcq-1/stream-bms-data-karippalrohith
7581a4a84e85ec22864e7a181f74b4baee6ae5bb
[ "MIT" ]
1
2021-06-15T12:52:34.000Z
2021-06-15T12:52:34.000Z
import random import json for i in range(10): # print("\n{\"Temperature\":{},\"SOC\":{}}\n".format(48.00, 58.00)); print(json.dumps({'Temperature':random.randint(10,100), 'SOC':random.randint(10,100)}))
28.5
92
0.587719
import random import json for i in range(10): # print("\n{\"Temperature\":{},\"SOC\":{}}\n".format(48.00, 58.00)); print(json.dumps({'Temperature':random.randint(10,100), 'SOC':random.randint(10,100)}))
0
0
0
9cea8902face673bf6b7c9672cec7ec939ed9a53
787
py
Python
src/data/575.py
NULLCT/LOMC
79a16474a8f21310e0fb47e536d527dd5dc6d655
[ "MIT" ]
null
null
null
src/data/575.py
NULLCT/LOMC
79a16474a8f21310e0fb47e536d527dd5dc6d655
[ "MIT" ]
null
null
null
src/data/575.py
NULLCT/LOMC
79a16474a8f21310e0fb47e536d527dd5dc6d655
[ "MIT" ]
null
null
null
import sys sys.setrecursionlimit(10**6) N, Q = map(int, input().split()) ab = [[int(i) for i in input().split()] for _ in range(N - 1)] cd = [[int(i) for i in input().split()] for _ in range(Q)] G = [[] for _ in range(N)] for a, b in ab: G[a - 1].append(b - 1) G[b - 1].append(a - 1) #Euler tour vs = [-1] * (...
21.27027
74
0.462516
import sys sys.setrecursionlimit(10**6) N, Q = map(int, input().split()) ab = [[int(i) for i in input().split()] for _ in range(N - 1)] cd = [[int(i) for i in input().split()] for _ in range(Q)] G = [[] for _ in range(N)] for a, b in ab: G[a - 1].append(b - 1) G[b - 1].append(a - 1) #Euler tour vs = [-1] * (...
222
0
23
f208e3c47cc674a3755c6e7f5151dfbf26d6144d
8,328
py
Python
src/amuse/test/suite/core_tests/test_pickle.py
UniExeterRSE/amuse
b81504ffa12fced1b94e0014df8610a1d363c10f
[ "Apache-2.0" ]
null
null
null
src/amuse/test/suite/core_tests/test_pickle.py
UniExeterRSE/amuse
b81504ffa12fced1b94e0014df8610a1d363c10f
[ "Apache-2.0" ]
12
2021-11-15T09:13:03.000Z
2022-02-02T14:53:04.000Z
src/amuse/test/suite/core_tests/test_pickle.py
UniExeterRSE/amuse
b81504ffa12fced1b94e0014df8610a1d363c10f
[ "Apache-2.0" ]
null
null
null
from amuse.test import amusetest import pickle from amuse.support.exceptions import AmuseException from amuse.units import core from amuse.units import si from amuse.units import nbody_system from amuse.units import generic_unit_system from amuse.units.quantities import zero from amuse.units.units import * from amus...
34.991597
118
0.62488
from amuse.test import amusetest import pickle from amuse.support.exceptions import AmuseException from amuse.units import core from amuse.units import si from amuse.units import nbody_system from amuse.units import generic_unit_system from amuse.units.quantities import zero from amuse.units.units import * from amus...
7,047
108
625
bb58999e39b1a02a306c7d509378e3240c9bd06d
6,219
py
Python
east/layers/models.py
embracesource-cv-com/keras-east
0733a9a99c4446a30c8b8e1d62e102391f7a854a
[ "Apache-2.0" ]
12
2019-04-01T01:58:13.000Z
2019-12-10T02:54:18.000Z
east/layers/models.py
embracesource-cv-com/keras-east
0733a9a99c4446a30c8b8e1d62e102391f7a854a
[ "Apache-2.0" ]
5
2019-04-22T16:00:02.000Z
2020-08-12T07:03:05.000Z
east/layers/models.py
embracesource-cv-com/keras-east
0733a9a99c4446a30c8b8e1d62e102391f7a854a
[ "Apache-2.0" ]
1
2019-05-24T11:34:44.000Z
2019-05-24T11:34:44.000Z
# -*- coding: utf-8 -*- """ File Name: model Description : 模型层 Author : mick.yi date: 2019/4/1 """ import keras from keras import layers, Input, Model import tensorflow as tf from east.layers.base_net import resnet50 from east.layers.losses import balanced_cross_entropy, iou_lo...
37.920732
117
0.64512
# -*- coding: utf-8 -*- """ File Name: model Description : 模型层 Author : mick.yi date: 2019/4/1 """ import keras from keras import layers, Input, Model import tensorflow as tf from east.layers.base_net import resnet50 from east.layers.losses import balanced_cross_entropy, iou_lo...
1,884
0
25
100f447f26906933640b8f3527dd2ac4cc199741
436
py
Python
bihgpy/betabinomial.py
pedroramaciotti/BIHGPy
6b5be54deb89cdbffa4e2bddf5f7c4553742ffa2
[ "MIT" ]
null
null
null
bihgpy/betabinomial.py
pedroramaciotti/BIHGPy
6b5be54deb89cdbffa4e2bddf5f7c4553742ffa2
[ "MIT" ]
null
null
null
bihgpy/betabinomial.py
pedroramaciotti/BIHGPy
6b5be54deb89cdbffa4e2bddf5f7c4553742ffa2
[ "MIT" ]
null
null
null
from scipy.special import comb from scipy.special import beta as betafunc import numpy as np
21.8
85
0.688073
from scipy.special import comb from scipy.special import beta as betafunc import numpy as np def alpha(mean,var): return mean*mean*((1-mean)/var-1/mean); def beta(mean,var): return alpha(mean,var)*(1/mean-1); def beta_binomial(N,a,b): K_dom = np.arange(0,N+1) K_img = np.zeros(K_dom.size) for i,K in enumerate(...
274
0
69
1e3a112d31066b788dc27d12fd5c5022d08451b2
4,018
py
Python
oocran/django/oocran/settings.py
howls90/oocran
9951f3ff752f9f6517a4d016476c1d1e2bb44a4d
[ "Apache-2.0", "BSD-3-Clause" ]
3
2018-12-12T10:32:16.000Z
2022-02-07T19:46:10.000Z
oocran/django/oocran/settings.py
howls90/oocran
9951f3ff752f9f6517a4d016476c1d1e2bb44a4d
[ "Apache-2.0", "BSD-3-Clause" ]
1
2017-06-16T08:16:57.000Z
2017-06-16T09:45:28.000Z
oocran/django/oocran/settings.py
howls90/OOCRAN
9951f3ff752f9f6517a4d016476c1d1e2bb44a4d
[ "Apache-2.0", "BSD-3-Clause" ]
6
2017-05-29T03:34:23.000Z
2022-02-07T19:46:11.000Z
import os # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__)) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/1.9/...
25.43038
91
0.669985
import os # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__)) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/1.9/...
0
0
0
d47e94bf1a45227e99e512e32b5070c0ff25a395
9,944
py
Python
orangehackathon/widgets/lineplot.py
e-mental-health/orange-hackathon
ff4ece2495fb47599e61e634f94b55c4f5692b0f
[ "Apache-2.0" ]
1
2022-01-06T16:48:07.000Z
2022-01-06T16:48:07.000Z
orangehackathon/widgets/lineplot.py
e-mental-health/orange-hackathon
ff4ece2495fb47599e61e634f94b55c4f5692b0f
[ "Apache-2.0" ]
4
2019-08-30T17:28:11.000Z
2022-02-01T08:06:08.000Z
orangehackathon/widgets/lineplot.py
e-mental-health/orange-hackathon
ff4ece2495fb47599e61e634f94b55c4f5692b0f
[ "Apache-2.0" ]
1
2019-08-30T11:06:20.000Z
2019-08-30T11:06:20.000Z
import re import sys from matplotlib.figure import Figure from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas # alternatives: seaborn, plotnine, from PyQt5.QtCore import Qt,pyqtSignal from PyQt5.QtWidgets import QFormLayout from Orange.widgets.widget import OWWidget, Input from Orange.widg...
44.591928
147
0.621078
import re import sys from matplotlib.figure import Figure from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas # alternatives: seaborn, plotnine, from PyQt5.QtCore import Qt,pyqtSignal from PyQt5.QtWidgets import QFormLayout from Orange.widgets.widget import OWWidget, Input from Orange.widg...
8,492
999
23
89b007824d01089c838fcd8c26342e4c5c8867cf
49,367
py
Python
src/interface/Python/paramonte/vis/LineScatterPlot.py
shahmoradi/paramonte-1
77c81c14e475bfacb19fa6de1f41629380e453d3
[ "MIT" ]
null
null
null
src/interface/Python/paramonte/vis/LineScatterPlot.py
shahmoradi/paramonte-1
77c81c14e475bfacb19fa6de1f41629380e453d3
[ "MIT" ]
null
null
null
src/interface/Python/paramonte/vis/LineScatterPlot.py
shahmoradi/paramonte-1
77c81c14e475bfacb19fa6de1f41629380e453d3
[ "MIT" ]
1
2020-09-19T03:45:07.000Z
2020-09-19T03:45:07.000Z
#################################################################################################################################### #################################################################################################################################### #### #### MIT License #### #### ParaMonte: plain p...
45.166514
166
0.430814
#################################################################################################################################### #################################################################################################################################### #### #### MIT License #### #### ParaMonte: plain p...
2,503
0
81
067504a01da9ec318e0dbd9bd3df5b19eaa8c016
6,351
py
Python
roles/custom_module/library/ibm_ss_cluster.py
dheren-git/ibm-spectrum-scale-install-infra
21f86774a09d9c36fba1ca75e489c9d4b99768d3
[ "Apache-2.0" ]
null
null
null
roles/custom_module/library/ibm_ss_cluster.py
dheren-git/ibm-spectrum-scale-install-infra
21f86774a09d9c36fba1ca75e489c9d4b99768d3
[ "Apache-2.0" ]
null
null
null
roles/custom_module/library/ibm_ss_cluster.py
dheren-git/ibm-spectrum-scale-install-infra
21f86774a09d9c36fba1ca75e489c9d4b99768d3
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # author: IBM Corporation # description: Highly-customizable Ansible module # for installing and configuring IBM Spectrum Scale (GPFS) # company: IBM # license: Apache-2.0 ANSIBLE_METADATA = { 'status': ['preview'], 'supported_by...
30.38756
93
0.534876
#!/usr/bin/python # -*- coding: utf-8 -*- # author: IBM Corporation # description: Highly-customizable Ansible module # for installing and configuring IBM Spectrum Scale (GPFS) # company: IBM # license: Apache-2.0 ANSIBLE_METADATA = { 'status': ['preview'], 'supported_by...
3,395
0
92
140f592268d8d602432a1c2e2ee6848f46a1e781
4,131
py
Python
bbKnapsack.py
LangchunSi/0-1-Knapsack-problem
48cf5c65fe6139c585bc31fe16a245eec592e805
[ "Unlicense" ]
null
null
null
bbKnapsack.py
LangchunSi/0-1-Knapsack-problem
48cf5c65fe6139c585bc31fe16a245eec592e805
[ "Unlicense" ]
null
null
null
bbKnapsack.py
LangchunSi/0-1-Knapsack-problem
48cf5c65fe6139c585bc31fe16a245eec592e805
[ "Unlicense" ]
null
null
null
# Branch and bound method import queue class Node: ''' upbound: upbound value of node value: value of current node weight: weight of current node level: level number of the current node on the subset tree ''' upbound = 0 value = 0 weight = 0 level = 0 class ...
30.828358
103
0.506657
# Branch and bound method import queue class Node: ''' upbound: upbound value of node value: value of current node weight: weight of current node level: level number of the current node on the subset tree ''' upbound = 0 value = 0 weight = 0 level = 0 def ...
2,949
0
172
c27adb36ef98cd03b956b8db80176e513a8fb706
464
py
Python
demos/scope_vrml_test.py
isuthermography/spatialnde
983de2e68139c33ab5eb8df59ac0aaa84bad096a
[ "Apache-2.0" ]
null
null
null
demos/scope_vrml_test.py
isuthermography/spatialnde
983de2e68139c33ab5eb8df59ac0aaa84bad096a
[ "Apache-2.0" ]
null
null
null
demos/scope_vrml_test.py
isuthermography/spatialnde
983de2e68139c33ab5eb8df59ac0aaa84bad096a
[ "Apache-2.0" ]
null
null
null
import numpy as np import dataguzzler as dg import dg_metadata as dgm import dg_file as dgf fin = "/home/linuxadm/usr_local/src/freecad-git032314/build/data/Mod/Robot/Lib/Kuka/kr125_3.wrl" fout = "/tmp/robot.dgs" wfmdict={} fh=open(fin,"r"); wfmdict["robot"]=dg.wfminfo() wfmdict["robot"].Name="robot" wfmdict["rob...
21.090909
96
0.737069
import numpy as np import dataguzzler as dg import dg_metadata as dgm import dg_file as dgf fin = "/home/linuxadm/usr_local/src/freecad-git032314/build/data/Mod/Robot/Lib/Kuka/kr125_3.wrl" fout = "/tmp/robot.dgs" wfmdict={} fh=open(fin,"r"); wfmdict["robot"]=dg.wfminfo() wfmdict["robot"].Name="robot" wfmdict["rob...
0
0
0
c67cb4a02a3fac12aac6f7b9bd93974e4fcc1b34
243
py
Python
setup.py
manics/napari-omero
e1964cb4e44dfd84f7cc43f37c0c795f98339c2a
[ "BSD-3-Clause" ]
23
2020-06-23T01:28:33.000Z
2022-01-22T13:36:21.000Z
setup.py
manics/napari-omero
e1964cb4e44dfd84f7cc43f37c0c795f98339c2a
[ "BSD-3-Clause" ]
29
2020-06-24T00:58:50.000Z
2022-02-02T12:46:55.000Z
setup.py
manics/napari-omero
e1964cb4e44dfd84f7cc43f37c0c795f98339c2a
[ "BSD-3-Clause" ]
7
2020-06-23T11:28:39.000Z
2022-02-03T06:51:38.000Z
from setuptools import setup, find_packages setup( package_dir={"": "src"}, packages=find_packages("src") + ['omero.plugins'], use_scm_version={"write_to": "src/napari_omero/_version.py"}, setup_requires=["setuptools_scm"], )
27
65
0.695473
from setuptools import setup, find_packages setup( package_dir={"": "src"}, packages=find_packages("src") + ['omero.plugins'], use_scm_version={"write_to": "src/napari_omero/_version.py"}, setup_requires=["setuptools_scm"], )
0
0
0
c350ddd466fedbe443d442a3d40d88864309e621
1,076
py
Python
2020/Python/day09/part2.py
tymscar/Advent-Of-Code
cd7b96b0253191e236bd704b0d8b5540fb3e8ef6
[ "MIT" ]
4
2019-12-08T08:20:53.000Z
2021-12-17T12:04:11.000Z
2020/Python/day09/part2.py
tymscar/AdventOfCode2018
9742ddb6bbbc917062baad87d6b6de75375f1ae8
[ "MIT" ]
null
null
null
2020/Python/day09/part2.py
tymscar/AdventOfCode2018
9742ddb6bbbc917062baad87d6b6de75375f1ae8
[ "MIT" ]
4
2020-12-11T22:10:24.000Z
2021-12-25T22:39:05.000Z
print(part_2())
25.023256
85
0.597584
def two_num_sum(arr, start, end, find): for i in range(start, end + 1): complement = find - arr[i] if complement != arr[i] and complement in arr[start:end + 1]: return True return False def find_bad_num_index(arr): file = open('input.txt', 'r') for line in file: li...
964
0
91
2795b922566833e3fee13765e73b9b758e105780
3,176
py
Python
main.py
Philipnah/Corona-Discord-Bot
12b3b267c627ffbcb06f859b6370c0ebdef32a88
[ "Apache-2.0" ]
null
null
null
main.py
Philipnah/Corona-Discord-Bot
12b3b267c627ffbcb06f859b6370c0ebdef32a88
[ "Apache-2.0" ]
null
null
null
main.py
Philipnah/Corona-Discord-Bot
12b3b267c627ffbcb06f859b6370c0ebdef32a88
[ "Apache-2.0" ]
2
2020-04-01T11:10:05.000Z
2020-04-21T08:29:13.000Z
import requests import lxml from bs4 import BeautifulSoup import discord import os token = os.environ.get("S3_KEY") webpage = "https://www.worldometers.info/coronavirus/" # ------------- start data gathering ---------------------- # # ------------- end data gathering ---------------------- # client = discord....
32.742268
119
0.598866
import requests import lxml from bs4 import BeautifulSoup import discord import os token = os.environ.get("S3_KEY") webpage = "https://www.worldometers.info/coronavirus/" # ------------- start data gathering ---------------------- # class dataGather: def __init__(self): print("dataGather has been instanc...
2,659
-4
133
8a16fcb02288043fd068a6a1acdbef11a03a4613
25,254
py
Python
tests/test_integration_test_of_client.py
ndexbio/nice-cx-python
f8cf207e439b3afcf77c45ea80792968a2258bfb
[ "BSD-3-Clause" ]
5
2017-12-01T20:19:46.000Z
2022-03-06T19:22:36.000Z
tests/test_integration_test_of_client.py
ndexbio/nice-cx-python
f8cf207e439b3afcf77c45ea80792968a2258bfb
[ "BSD-3-Clause" ]
77
2017-11-20T17:53:38.000Z
2022-01-26T23:43:34.000Z
tests/test_integration_test_of_client.py
ndexbio/nice-cx-python
f8cf207e439b3afcf77c45ea80792968a2258bfb
[ "BSD-3-Clause" ]
5
2017-11-20T17:03:34.000Z
2021-04-26T20:40:20.000Z
# -*- coding: utf-8 -*- """Integration/acceptance tests for `ndex2.client` package.""" import os import re import sys import io import time import unittest import json import uuid from datetime import datetime import requests from requests.exceptions import HTTPError import ndex2 from ndex2.nice_cx_network import Ni...
43.692042
91
0.570484
# -*- coding: utf-8 -*- """Integration/acceptance tests for `ndex2.client` package.""" import os import re import sys import io import time import unittest import json import uuid from datetime import datetime import requests from requests.exceptions import HTTPError import ndex2 from ndex2.nice_cx_network import Ni...
23,365
1,067
22