hexsha
string | size
int64 | ext
string | lang
string | max_stars_repo_path
string | max_stars_repo_name
string | max_stars_repo_head_hexsha
string | max_stars_repo_licenses
list | max_stars_count
int64 | max_stars_repo_stars_event_min_datetime
string | max_stars_repo_stars_event_max_datetime
string | max_issues_repo_path
string | max_issues_repo_name
string | max_issues_repo_head_hexsha
string | max_issues_repo_licenses
list | max_issues_count
int64 | max_issues_repo_issues_event_min_datetime
string | max_issues_repo_issues_event_max_datetime
string | max_forks_repo_path
string | max_forks_repo_name
string | max_forks_repo_head_hexsha
string | max_forks_repo_licenses
list | max_forks_count
int64 | max_forks_repo_forks_event_min_datetime
string | max_forks_repo_forks_event_max_datetime
string | content
string | avg_line_length
float64 | max_line_length
int64 | alphanum_fraction
float64 | qsc_code_num_words_quality_signal
int64 | qsc_code_num_chars_quality_signal
float64 | qsc_code_mean_word_length_quality_signal
float64 | qsc_code_frac_words_unique_quality_signal
float64 | qsc_code_frac_chars_top_2grams_quality_signal
float64 | qsc_code_frac_chars_top_3grams_quality_signal
float64 | qsc_code_frac_chars_top_4grams_quality_signal
float64 | qsc_code_frac_chars_dupe_5grams_quality_signal
float64 | qsc_code_frac_chars_dupe_6grams_quality_signal
float64 | qsc_code_frac_chars_dupe_7grams_quality_signal
float64 | qsc_code_frac_chars_dupe_8grams_quality_signal
float64 | qsc_code_frac_chars_dupe_9grams_quality_signal
float64 | qsc_code_frac_chars_dupe_10grams_quality_signal
float64 | qsc_code_frac_chars_replacement_symbols_quality_signal
float64 | qsc_code_frac_chars_digital_quality_signal
float64 | qsc_code_frac_chars_whitespace_quality_signal
float64 | qsc_code_size_file_byte_quality_signal
float64 | qsc_code_num_lines_quality_signal
float64 | qsc_code_num_chars_line_max_quality_signal
float64 | qsc_code_num_chars_line_mean_quality_signal
float64 | qsc_code_frac_chars_alphabet_quality_signal
float64 | qsc_code_frac_chars_comments_quality_signal
float64 | qsc_code_cate_xml_start_quality_signal
float64 | qsc_code_frac_lines_dupe_lines_quality_signal
float64 | qsc_code_cate_autogen_quality_signal
float64 | qsc_code_frac_lines_long_string_quality_signal
float64 | qsc_code_frac_chars_string_length_quality_signal
float64 | qsc_code_frac_chars_long_word_length_quality_signal
float64 | qsc_code_frac_lines_string_concat_quality_signal
float64 | qsc_code_cate_encoded_data_quality_signal
float64 | qsc_code_frac_chars_hex_words_quality_signal
float64 | qsc_code_frac_lines_prompt_comments_quality_signal
float64 | qsc_code_frac_lines_assert_quality_signal
float64 | qsc_codepython_cate_ast_quality_signal
float64 | qsc_codepython_frac_lines_func_ratio_quality_signal
float64 | qsc_codepython_cate_var_zero_quality_signal
bool | qsc_codepython_frac_lines_pass_quality_signal
float64 | qsc_codepython_frac_lines_import_quality_signal
float64 | qsc_codepython_frac_lines_simplefunc_quality_signal
float64 | qsc_codepython_score_lines_no_logic_quality_signal
float64 | qsc_codepython_frac_lines_print_quality_signal
float64 | qsc_code_num_words
int64 | qsc_code_num_chars
int64 | qsc_code_mean_word_length
int64 | qsc_code_frac_words_unique
null | qsc_code_frac_chars_top_2grams
int64 | qsc_code_frac_chars_top_3grams
int64 | qsc_code_frac_chars_top_4grams
int64 | qsc_code_frac_chars_dupe_5grams
int64 | qsc_code_frac_chars_dupe_6grams
int64 | qsc_code_frac_chars_dupe_7grams
int64 | qsc_code_frac_chars_dupe_8grams
int64 | qsc_code_frac_chars_dupe_9grams
int64 | qsc_code_frac_chars_dupe_10grams
int64 | qsc_code_frac_chars_replacement_symbols
int64 | qsc_code_frac_chars_digital
int64 | qsc_code_frac_chars_whitespace
int64 | qsc_code_size_file_byte
int64 | qsc_code_num_lines
int64 | qsc_code_num_chars_line_max
int64 | qsc_code_num_chars_line_mean
int64 | qsc_code_frac_chars_alphabet
int64 | qsc_code_frac_chars_comments
int64 | qsc_code_cate_xml_start
int64 | qsc_code_frac_lines_dupe_lines
int64 | qsc_code_cate_autogen
int64 | qsc_code_frac_lines_long_string
int64 | qsc_code_frac_chars_string_length
int64 | qsc_code_frac_chars_long_word_length
int64 | qsc_code_frac_lines_string_concat
null | qsc_code_cate_encoded_data
int64 | qsc_code_frac_chars_hex_words
int64 | qsc_code_frac_lines_prompt_comments
int64 | qsc_code_frac_lines_assert
int64 | qsc_codepython_cate_ast
int64 | qsc_codepython_frac_lines_func_ratio
int64 | qsc_codepython_cate_var_zero
int64 | qsc_codepython_frac_lines_pass
int64 | qsc_codepython_frac_lines_import
int64 | qsc_codepython_frac_lines_simplefunc
int64 | qsc_codepython_score_lines_no_logic
int64 | qsc_codepython_frac_lines_print
int64 | effective
string | hits
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
724da380c925fd0be608bd11f30b6d426eb5746d
| 27
|
py
|
Python
|
megnet/data/__init__.py
|
abdalazizrashid/megnet
|
8ad0fca246465bd57d66392f790c5310c610dfff
|
[
"BSD-3-Clause"
] | 367
|
2018-12-13T14:49:00.000Z
|
2022-03-31T10:17:04.000Z
|
megnet/data/__init__.py
|
kdmsit/MEGNet
|
4f3c76c6b99edcb41d52ae5e8ae9dc89956d33d1
|
[
"MIT"
] | 162
|
2019-02-08T20:38:12.000Z
|
2022-03-31T21:13:06.000Z
|
megnet/data/__init__.py
|
kdmsit/MEGNet
|
4f3c76c6b99edcb41d52ae5e8ae9dc89956d33d1
|
[
"MIT"
] | 119
|
2018-12-17T10:16:12.000Z
|
2022-03-31T17:26:57.000Z
|
"""
Data manipulations
"""
| 6.75
| 18
| 0.62963
| 2
| 27
| 8.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.148148
| 27
| 3
| 19
| 9
| 0.73913
| 0.666667
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
a0fa30f527e6c86b6cb9dc5b7f38c0821721deb9
| 71
|
py
|
Python
|
tests/routes/__init__.py
|
Bachhofer/spottydata
|
e9334c2a32bb65018b57d83fc4522ae241427db7
|
[
"MIT"
] | null | null | null |
tests/routes/__init__.py
|
Bachhofer/spottydata
|
e9334c2a32bb65018b57d83fc4522ae241427db7
|
[
"MIT"
] | null | null | null |
tests/routes/__init__.py
|
Bachhofer/spottydata
|
e9334c2a32bb65018b57d83fc4522ae241427db7
|
[
"MIT"
] | null | null | null |
# This is an empty python file to expose this directory to it's parent
| 35.5
| 70
| 0.774648
| 14
| 71
| 3.928571
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.197183
| 71
| 1
| 71
| 71
| 0.964912
| 0.957746
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
9d0fc4d37e8008ce4ffedc8ff1748729bd11a8f1
| 271
|
py
|
Python
|
skilletlib/skillet/__init__.py
|
annabarone/skilletlib
|
d1298218a1a0be35eb9fac2ae79323df600d8900
|
[
"Apache-2.0"
] | 6
|
2020-04-27T18:08:02.000Z
|
2022-01-14T13:27:19.000Z
|
skilletlib/skillet/__init__.py
|
annabarone/skilletlib
|
d1298218a1a0be35eb9fac2ae79323df600d8900
|
[
"Apache-2.0"
] | 85
|
2019-10-28T19:13:55.000Z
|
2021-07-14T13:00:28.000Z
|
skilletlib/skillet/__init__.py
|
annabarone/skilletlib
|
d1298218a1a0be35eb9fac2ae79323df600d8900
|
[
"Apache-2.0"
] | 7
|
2019-12-05T20:17:16.000Z
|
2021-12-09T01:16:58.000Z
|
# from .panos import PanosSkillet
# from .docker import DockerSkillet
# from .pan_validation import PanValidationSkillet
# from .python3 import Python3Skillet
# from .rest import RestSkillet
# from .template import TemplateSkillet
# from .workflow import WorkflowSkillet
| 33.875
| 50
| 0.819188
| 29
| 271
| 7.62069
| 0.586207
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.008475
| 0.129151
| 271
| 7
| 51
| 38.714286
| 0.927966
| 0.944649
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
9d1115c99ef6af6ee80e12df2bf5eac7ff811ea7
| 149
|
py
|
Python
|
CorePythonProg/ch02/0206.py
|
mallius/CppPrimer
|
0285fabe5934492dfed0a9cf67ba5650982a5f76
|
[
"MIT"
] | null | null | null |
CorePythonProg/ch02/0206.py
|
mallius/CppPrimer
|
0285fabe5934492dfed0a9cf67ba5650982a5f76
|
[
"MIT"
] | null | null | null |
CorePythonProg/ch02/0206.py
|
mallius/CppPrimer
|
0285fabe5934492dfed0a9cf67ba5650982a5f76
|
[
"MIT"
] | 1
|
2022-01-25T15:51:34.000Z
|
2022-01-25T15:51:34.000Z
|
#!/usr/bin/env python
numTemp = raw_input('Enter a number: ')
num = int(numTemp)
if num > 0:
print '>0'
elif num ==0:
print '0'
else:
print '<0'
| 13.545455
| 39
| 0.61745
| 26
| 149
| 3.5
| 0.653846
| 0.197802
| 0.197802
| 0.21978
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.041667
| 0.194631
| 149
| 10
| 40
| 14.9
| 0.716667
| 0.134228
| 0
| 0
| 0
| 0
| 0.164063
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0.375
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
9d59ba6b91ae4d068be41f7bfb3634b177f8ade2
| 217
|
py
|
Python
|
tests/expr/expr09.py
|
ktok07b6/polyphony
|
657c5c7440520db6b4985970bd50547407693ac4
|
[
"MIT"
] | 83
|
2015-11-30T09:59:13.000Z
|
2021-08-03T09:12:28.000Z
|
tests/expr/expr09.py
|
jesseclin/polyphony
|
657c5c7440520db6b4985970bd50547407693ac4
|
[
"MIT"
] | 4
|
2017-02-10T01:43:11.000Z
|
2020-07-14T03:52:25.000Z
|
tests/expr/expr09.py
|
jesseclin/polyphony
|
657c5c7440520db6b4985970bd50547407693ac4
|
[
"MIT"
] | 11
|
2016-11-18T14:39:15.000Z
|
2021-02-23T10:05:20.000Z
|
from polyphony import testbench
def expr09(a, b):
return a ^ b
@testbench
def test():
assert 1 == expr09(0b1000, 0b1001)
assert 3 == expr09(0b1000, 0b1011)
assert 1 == expr09(0b1010, 0b1011)
test()
| 16.692308
| 38
| 0.654378
| 30
| 217
| 4.733333
| 0.566667
| 0.169014
| 0.183099
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.244048
| 0.225806
| 217
| 12
| 39
| 18.083333
| 0.60119
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.333333
| 1
| 0.222222
| false
| 0
| 0.111111
| 0.111111
| 0.444444
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 4
|
c22bb60421f79ce3a2d29c04e35af61e67fb09d3
| 1,207
|
py
|
Python
|
telegram_ecommerce/filters/decorators.py
|
Anonylions/telegram_ecommerce
|
f5382886bbebf607c735e2f451774c56df8d6011
|
[
"MIT"
] | 10
|
2020-11-20T20:55:52.000Z
|
2022-02-10T20:25:45.000Z
|
telegram_ecommerce/filters/decorators.py
|
Anonylions/telegram_ecommerce
|
f5382886bbebf607c735e2f451774c56df8d6011
|
[
"MIT"
] | 1
|
2022-02-16T10:28:18.000Z
|
2022-02-16T10:35:31.000Z
|
telegram_ecommerce/filters/decorators.py
|
Anonylions/telegram_ecommerce
|
f5382886bbebf607c735e2f451774c56df8d6011
|
[
"MIT"
] | 8
|
2021-05-01T01:13:09.000Z
|
2022-03-13T14:00:01.000Z
|
from ..language import get_text
from ..database.query import (
user_exist,
is_admin)
END = -1
def warning_the_user_that_already_have_an_account(update, context):
text = get_text("user_have_account", context)
update.message.reply_text(text)
return END
def warning_the_user_that_he_dont_have_an_account(update, context):
text = get_text("user_dont_have_account", context)
update.message.reply_text(text)
return END
def execute_if_user_exist(callback):
def execute_warning_if_user_dont_exist(update, context):
user_id = update.effective_user.id
if user_exist(user_id):
return callback(update, context)
else:
return warning_the_user_that_he_dont_have_an_account(
update, context)
return execute_warning_if_user_dont_exist
def execute_if_user_dont_exist(callback):
def execute_warning_if_user_exist(update, context):
user_id = update.effective_user.id
if user_exist(user_id):
return warning_the_user_that_already_have_an_account(
update, context)
else:
return callback(update, context)
return execute_warning_if_user_exist
| 26.822222
| 67
| 0.71831
| 165
| 1,207
| 4.8
| 0.206061
| 0.131313
| 0.069444
| 0.090909
| 0.813131
| 0.795455
| 0.77904
| 0.606061
| 0.606061
| 0.568182
| 0
| 0.001058
| 0.217067
| 1,207
| 44
| 68
| 27.431818
| 0.837037
| 0
| 0
| 0.451613
| 0
| 0
| 0.032365
| 0.018257
| 0
| 0
| 0
| 0
| 0
| 1
| 0.193548
| false
| 0
| 0.064516
| 0
| 0.516129
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
c22fbe148dfbc37e36952003c17c1b1180d11337
| 63
|
py
|
Python
|
albow/demo/openGL/__init__.py
|
hasii2011/albow-python-3
|
04b9d42705b370b62f0e49d10274eebf3ac54bc1
|
[
"MIT"
] | 6
|
2019-04-30T23:50:39.000Z
|
2019-11-04T06:15:02.000Z
|
albow/demo/openGL/__init__.py
|
hasii2011/albow-python-3
|
04b9d42705b370b62f0e49d10274eebf3ac54bc1
|
[
"MIT"
] | 73
|
2019-05-12T18:43:14.000Z
|
2021-04-13T19:19:03.000Z
|
albow/demo/openGL/__init__.py
|
hasii2011/albow-python-3
|
04b9d42705b370b62f0e49d10274eebf3ac54bc1
|
[
"MIT"
] | null | null | null |
""""
This package contains the OpenGL demonstration classes
"""
| 21
| 54
| 0.761905
| 7
| 63
| 6.857143
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.126984
| 63
| 3
| 55
| 21
| 0.872727
| 0.888889
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
c235b37d33733193984303077c70e9f3d941faa4
| 1,847
|
py
|
Python
|
pyglare/scene/objects.py
|
keyvank/pyglare
|
9e26ae444ff4481f0f50d7344d2a5a881d04fe64
|
[
"MIT"
] | 6
|
2017-01-13T22:32:55.000Z
|
2022-03-27T22:19:49.000Z
|
pyglare/scene/objects.py
|
keyvank/pyglare
|
9e26ae444ff4481f0f50d7344d2a5a881d04fe64
|
[
"MIT"
] | 1
|
2016-09-13T17:59:41.000Z
|
2016-09-13T18:05:20.000Z
|
pyglare/scene/objects.py
|
keyvank/pyglare
|
9e26ae444ff4481f0f50d7344d2a5a881d04fe64
|
[
"MIT"
] | null | null | null |
from ..math import geometry as geo
from ..image.color import Color
import math
class Material:
def __init__(self,color,diffuse_rate,specular_rate,specular_exponent,reflection_rate):
self.color = color
self.diffuse_rate = diffuse_rate
self.specular_rate = specular_rate
self.specular_exponent = specular_exponent
self.reflection_rate = reflection_rate
class Object:
def __init__(self,material):
self.material=material
def intersection(self,ray):
'''Considering intersection point is: landa * ray, returns landa if there is intersection or None'''
pass
def normal_at(self,position):
'''Returns normal vector of this shape on a position'''
pass
def color_at(self,position):
pass
class Plane(Object):
def __init__(self,material,normal,intercept):
super().__init__(material)
self.math_repr = geo.Plane(normal,intercept)
def intersection(self,ray):
return self.math_repr.intersection(ray)
def normal_at(self,position):
return self.math_repr.normal
def color_at(self,position):
return self.material.color
class CheckerboardUpPlane(Plane):
def __init__(self,material,intercept,cell_size,cell_color):
super().__init__(material,geo.Vector(0,1,0),intercept)
self.cell_size = cell_size
self.cell_color = cell_color
def color_at(self,position):
checker=math.floor(position.x/self.cell_size)+math.floor(position.z/self.cell_size)
if checker%2 == 0:
return self.material.color
else:
return self.cell_color
class Sphere(Object):
def __init__(self,material,position,radius):
super().__init__(material)
self.math_repr = geo.Sphere(position,radius)
def intersection(self,ray):
return self.math_repr.intersection(ray)
def normal_at(self,position):
return (position-self.math_repr.position).normalize()
def color_at(self,position):
return self.material.color
| 24.959459
| 102
| 0.7634
| 261
| 1,847
| 5.149425
| 0.226054
| 0.071429
| 0.072917
| 0.056548
| 0.348214
| 0.239583
| 0.239583
| 0.191964
| 0.191964
| 0.125
| 0
| 0.003113
| 0.130482
| 1,847
| 73
| 103
| 25.30137
| 0.833748
| 0.077964
| 0
| 0.4
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.3
| false
| 0.06
| 0.06
| 0.12
| 0.62
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 4
|
dfa5cb1adcaf33702f7f2c3cd145a0c36382a865
| 97
|
py
|
Python
|
students/K33421/Samoshchenkov_Alexei/lr_2/hw_system/apps.py
|
Vivasus/ITMO_ICT_WebDevelopment_2020-2021
|
833d7ac1d40d9f7456a3c6b104a0e53c652d0035
|
[
"MIT"
] | null | null | null |
students/K33421/Samoshchenkov_Alexei/lr_2/hw_system/apps.py
|
Vivasus/ITMO_ICT_WebDevelopment_2020-2021
|
833d7ac1d40d9f7456a3c6b104a0e53c652d0035
|
[
"MIT"
] | null | null | null |
students/K33421/Samoshchenkov_Alexei/lr_2/hw_system/apps.py
|
Vivasus/ITMO_ICT_WebDevelopment_2020-2021
|
833d7ac1d40d9f7456a3c6b104a0e53c652d0035
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class HwSystemConfig(AppConfig):
name = 'hw_system'
| 16.166667
| 34
| 0.721649
| 11
| 97
| 6.272727
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.206186
| 97
| 5
| 35
| 19.4
| 0.896104
| 0
| 0
| 0
| 0
| 0
| 0.097826
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
dfaff48e9268da391e5354a533c983a642617b56
| 517
|
py
|
Python
|
matching_operators.py
|
DeadManPoe/PyMatcher
|
fa0301033d6a9476920519c867bc5e66db7793b7
|
[
"MIT"
] | null | null | null |
matching_operators.py
|
DeadManPoe/PyMatcher
|
fa0301033d6a9476920519c867bc5e66db7793b7
|
[
"MIT"
] | null | null | null |
matching_operators.py
|
DeadManPoe/PyMatcher
|
fa0301033d6a9476920519c867bc5e66db7793b7
|
[
"MIT"
] | null | null | null |
def match_plus(string, matching_value):
matches = match_star(string, matching_value)
return matches != 0, matches
def match_star(string, matching_value):
found_occurrences = 0
for i, char in enumerate(string):
if not match_identity(char, matching_value):
return found_occurrences
found_occurrences += 1
return found_occurrences
def match_identity(string, matching_value):
if matching_value == '.':
return string != ''
return string == matching_value
| 28.722222
| 52
| 0.694391
| 62
| 517
| 5.532258
| 0.33871
| 0.265306
| 0.276968
| 0.134111
| 0.163265
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007481
| 0.224371
| 517
| 17
| 53
| 30.411765
| 0.84788
| 0
| 0
| 0.142857
| 0
| 0
| 0.001934
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.214286
| false
| 0
| 0
| 0
| 0.571429
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
dfdfaf2898c9221e7f4f486f5412b4e767f314f2
| 3,821
|
py
|
Python
|
tests/test_constraints.py
|
jayvdb/versions
|
951bc3fd99b6a675190f11ee0752af1d7ff5b440
|
[
"MIT"
] | 3
|
2015-02-20T04:02:25.000Z
|
2021-04-06T14:42:21.000Z
|
tests/test_constraints.py
|
jayvdb/versions
|
951bc3fd99b6a675190f11ee0752af1d7ff5b440
|
[
"MIT"
] | 1
|
2019-07-07T06:37:01.000Z
|
2019-07-07T06:37:01.000Z
|
tests/test_constraints.py
|
jayvdb/versions
|
951bc3fd99b6a675190f11ee0752af1d7ff5b440
|
[
"MIT"
] | 2
|
2019-07-07T05:40:29.000Z
|
2021-04-06T14:42:23.000Z
|
from unittest import TestCase
from versions.constraints import Constraints, merge, ExclusiveConstraints
from versions.constraint import Constraint
class TestConstraints(TestCase):
def test_match(self):
self.assertTrue(Constraints.parse('>1,<2').match('1.5'))
def test_match_in(self):
self.assertTrue('1.5' in Constraints.parse('>1,<2'))
def test_parse(self):
constraints = Constraints.parse('>1,<2')
def test_add(self):
self.assertEqual(Constraints() + '>1', Constraints.parse('>1'))
self.assertEqual(Constraints() + Constraints.parse('>1'),
Constraints.parse('>1'))
self.assertEqual(Constraints() + Constraint.parse('>1'),
Constraints.parse('>1'))
self.assertRaises(TypeError, Constraints().__add__, 42)
def test_iadd(self):
constraints = Constraints()
constraints += '>1'
self.assertEqual(constraints, Constraints.parse('>1'))
def test_str(self):
self.assertEqual(str(Constraints([Constraint.parse('>1'),
Constraint.parse('<2')])),
'>1.0.0,<2.0.0')
def test_repr(self):
self.assertEqual(repr(Constraints()), "Constraints()")
self.assertEqual(repr(Constraints.parse('==1')),
"Constraints.parse('==1.0.0')")
def test_eq_invalid_constraints_str(self):
self.assertFalse(Constraints() == '#@$!')
class TestMerge(TestCase):
def assertMerge(self, input, output):
self.assertEqual(merge(input), output)
def test_raises_ExclusiveConstraints(self):
self.assertRaises(ExclusiveConstraints, merge,
[Constraint.parse('==1'), Constraint.parse('==2')])
self.assertRaises(ExclusiveConstraints, merge,
[Constraint.parse('>2'), Constraint.parse('<1')])
self.assertRaises(ExclusiveConstraints, merge,
[Constraint.parse('>2'), Constraint.parse('<2')])
self.assertRaises(ExclusiveConstraints, merge,
[Constraint.parse('>2'), Constraint.parse('<=2')])
# the first 2 constraints will be merge into ==2,
# which conflicts with !=2
self.assertRaises(ExclusiveConstraints, merge,
[Constraint.parse('<=2'), Constraint.parse('>=2'),
Constraint.parse('!=2')])
def test(self):
constraints = [Constraint.parse('>1'), Constraint.parse('<2')]
self.assertMerge(constraints, constraints)
self.assertMerge([Constraint.parse('<2'), Constraint.parse('<3')],
[Constraint.parse('<2.0.0')])
self.assertMerge([Constraint.parse('<2'), Constraint.parse('>=1')],
[Constraint.parse('>=1.0.0'), Constraint.parse('<2.0.0')])
self.assertMerge([Constraint.parse('>=2'), Constraint.parse('>2')],
[Constraint.parse('>2.0.0')])
self.assertMerge([Constraint.parse('>1'), Constraint.parse('>=2')],
[Constraint.parse('>=2.0.0')])
self.assertMerge([Constraint.parse('<2'), Constraint.parse('<=1')],
[Constraint.parse('<=1.0.0')])
self.assertMerge([Constraint.parse('<=2'), Constraint.parse('<1')],
[Constraint.parse('<1.0.0')])
self.assertMerge([Constraint.parse('<=2'), Constraint.parse('>=2')],
[Constraint.parse('==2.0.0')])
# Negative constraints should not be omitted!
self.assertMerge([Constraint.parse('!=2'), Constraint.parse('!=1')],
sorted([Constraint.parse('!=1.0.0'),
Constraint.parse('!=2.0.0')]))
| 40.221053
| 83
| 0.559016
| 373
| 3,821
| 5.678284
| 0.13941
| 0.29745
| 0.203966
| 0.184136
| 0.607177
| 0.607177
| 0.534466
| 0.392823
| 0.370633
| 0.363078
| 0
| 0.033607
| 0.267993
| 3,821
| 94
| 84
| 40.648936
| 0.723632
| 0.030359
| 0
| 0.106061
| 0
| 0
| 0.065118
| 0.007566
| 0
| 0
| 0
| 0
| 0.409091
| 1
| 0.166667
| false
| 0
| 0.045455
| 0
| 0.242424
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
dfe12be6330b0968db19fa6ffe0881fb8fa8099d
| 1,224
|
py
|
Python
|
typefactory/constraints/numeric.py
|
stevemccartney/typefactory
|
75c9eb9eec9a7b9488db9cc0d06352f4fd1de1d9
|
[
"Apache-2.0"
] | null | null | null |
typefactory/constraints/numeric.py
|
stevemccartney/typefactory
|
75c9eb9eec9a7b9488db9cc0d06352f4fd1de1d9
|
[
"Apache-2.0"
] | null | null | null |
typefactory/constraints/numeric.py
|
stevemccartney/typefactory
|
75c9eb9eec9a7b9488db9cc0d06352f4fd1de1d9
|
[
"Apache-2.0"
] | null | null | null |
from dataclasses import dataclass
from numbers import Real
from typing import Optional
@dataclass
class MultipleOf:
param: Real
def __call__(self, value: Real) -> Optional[str]:
if value % self.param != 0:
return f"Value must be a multiple of {self.param}"
else:
return None
@dataclass
class Minimum:
param: Real
def __call__(self, value: Real) -> Optional[str]:
if value < self.param:
return f"Value must be >= {self.param}"
else:
return None
@dataclass
class ExclusiveMinimum:
param: Real
def __call__(self, value: Real) -> Optional[str]:
if value <= self.param:
return f"Value must be > {self.param}"
else:
return None
@dataclass
class Maximum:
param: Real
def __call__(self, value: Real) -> Optional[str]:
if value > self.param:
return f"Value must be <= {self.param}"
else:
return None
@dataclass
class ExclusiveMaximum:
param: Real
def __call__(self, value: Real) -> Optional[str]:
if value >= self.param:
return f"Value must be < {self.param}"
else:
return None
| 20.745763
| 62
| 0.586601
| 146
| 1,224
| 4.780822
| 0.212329
| 0.12894
| 0.08596
| 0.114613
| 0.775072
| 0.749284
| 0.749284
| 0.696275
| 0.696275
| 0.696275
| 0
| 0.0012
| 0.319444
| 1,224
| 58
| 63
| 21.103448
| 0.836735
| 0
| 0
| 0.581395
| 0
| 0
| 0.125817
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.116279
| false
| 0
| 0.069767
| 0
| 0.651163
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
dfed59a42f4a11efd34b43e01fd5f7beba8d46b6
| 169
|
py
|
Python
|
tests/web_platform/css_grid_1/abspos/test_grid_positioned_items_gaps.py
|
jonboland/colosseum
|
cbf974be54fd7f6fddbe7285704cfaf7a866c5c5
|
[
"BSD-3-Clause"
] | 71
|
2015-04-13T09:44:14.000Z
|
2019-03-24T01:03:02.000Z
|
tests/web_platform/css_grid_1/abspos/test_grid_positioned_items_gaps.py
|
jonboland/colosseum
|
cbf974be54fd7f6fddbe7285704cfaf7a866c5c5
|
[
"BSD-3-Clause"
] | 35
|
2019-05-06T15:26:09.000Z
|
2022-03-28T06:30:33.000Z
|
tests/web_platform/css_grid_1/abspos/test_grid_positioned_items_gaps.py
|
jonboland/colosseum
|
cbf974be54fd7f6fddbe7285704cfaf7a866c5c5
|
[
"BSD-3-Clause"
] | 139
|
2015-05-30T18:37:43.000Z
|
2019-03-27T17:14:05.000Z
|
from tests.utils import W3CTestCase
class TestGridPositionedItemsGaps(W3CTestCase):
vars().update(W3CTestCase.find_tests(__file__, 'grid-positioned-items-gaps-'))
| 28.166667
| 82
| 0.804734
| 18
| 169
| 7.277778
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.019355
| 0.08284
| 169
| 5
| 83
| 33.8
| 0.825806
| 0
| 0
| 0
| 0
| 0
| 0.159763
| 0.159763
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
dff0a891ee94445188ef897fe40edf7b03e0dcdf
| 18
|
py
|
Python
|
src/__init__.py
|
PMantovani/pympu6050
|
bab4e680d700d9ad62855958cdb93feaaa16060c
|
[
"MIT"
] | null | null | null |
src/__init__.py
|
PMantovani/pympu6050
|
bab4e680d700d9ad62855958cdb93feaaa16060c
|
[
"MIT"
] | null | null | null |
src/__init__.py
|
PMantovani/pympu6050
|
bab4e680d700d9ad62855958cdb93feaaa16060c
|
[
"MIT"
] | null | null | null |
name = "pympu6050"
| 18
| 18
| 0.722222
| 2
| 18
| 6.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.25
| 0.111111
| 18
| 1
| 18
| 18
| 0.5625
| 0
| 0
| 0
| 0
| 0
| 0.473684
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
5f018a5353d8adb9d68568f7a0b49dde04ed193e
| 75
|
py
|
Python
|
storch/models/__init__.py
|
STomoya/storch
|
47754eecd5fb5404dd345f06fb0f8d3270a9e5b9
|
[
"MIT"
] | null | null | null |
storch/models/__init__.py
|
STomoya/storch
|
47754eecd5fb5404dd345f06fb0f8d3270a9e5b9
|
[
"MIT"
] | null | null | null |
storch/models/__init__.py
|
STomoya/storch
|
47754eecd5fb5404dd345f06fb0f8d3270a9e5b9
|
[
"MIT"
] | null | null | null |
from multiscale import MultiScale
from patchgan import PatchDiscriminator
| 18.75
| 39
| 0.88
| 8
| 75
| 8.25
| 0.625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.12
| 75
| 3
| 40
| 25
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
5f0603321cb19a9d08d78984f4e1439bd2f1a90c
| 121
|
py
|
Python
|
python/testData/findUsages/GlobalUsages.py
|
jnthn/intellij-community
|
8fa7c8a3ace62400c838e0d5926a7be106aa8557
|
[
"Apache-2.0"
] | 2
|
2019-04-28T07:48:50.000Z
|
2020-12-11T14:18:08.000Z
|
python/testData/findUsages/GlobalUsages.py
|
Cyril-lamirand/intellij-community
|
60ab6c61b82fc761dd68363eca7d9d69663cfa39
|
[
"Apache-2.0"
] | 173
|
2018-07-05T13:59:39.000Z
|
2018-08-09T01:12:03.000Z
|
python/testData/findUsages/GlobalUsages.py
|
Cyril-lamirand/intellij-community
|
60ab6c61b82fc761dd68363eca7d9d69663cfa39
|
[
"Apache-2.0"
] | 2
|
2020-03-15T08:57:37.000Z
|
2020-04-07T04:48:14.000Z
|
<caret>search_variable = 1
def function():
global search_variable
search_variable = 2
print(search_variable)
| 20.166667
| 26
| 0.735537
| 15
| 121
| 5.666667
| 0.6
| 0.658824
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.020408
| 0.190083
| 121
| 6
| 27
| 20.166667
| 0.846939
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0.2
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
a054dcd6697f8d246a99e2b87deb291ef103d4ce
| 101
|
py
|
Python
|
add.py
|
Harshillab/python
|
877d5fa6769ce7bcc28ca75c247df42ed7375e55
|
[
"MIT"
] | null | null | null |
add.py
|
Harshillab/python
|
877d5fa6769ce7bcc28ca75c247df42ed7375e55
|
[
"MIT"
] | null | null | null |
add.py
|
Harshillab/python
|
877d5fa6769ce7bcc28ca75c247df42ed7375e55
|
[
"MIT"
] | null | null | null |
import os
a=input("enter username:")
if a.isalpha():
os.system("useradd "+a)
os.system("passwd a")
| 16.833333
| 26
| 0.673267
| 17
| 101
| 4
| 0.647059
| 0.235294
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.118812
| 101
| 5
| 27
| 20.2
| 0.764045
| 0
| 0
| 0
| 0
| 0
| 0.306931
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.2
| 0.2
| 0
| 0.2
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
a0732a0c9e8673154fd43815d09dd9d39d2b3b7d
| 96
|
py
|
Python
|
batchout/core/util.py
|
ilia-khaustov/batchout
|
e916a1b0bfac771e6c96d0ff2478dc3f44804a94
|
[
"MIT"
] | 8
|
2019-11-05T06:54:30.000Z
|
2021-12-14T14:52:24.000Z
|
batchout/core/util.py
|
ilia-khaustov/batchout
|
e916a1b0bfac771e6c96d0ff2478dc3f44804a94
|
[
"MIT"
] | null | null | null |
batchout/core/util.py
|
ilia-khaustov/batchout
|
e916a1b0bfac771e6c96d0ff2478dc3f44804a94
|
[
"MIT"
] | 1
|
2020-05-05T09:31:14.000Z
|
2020-05-05T09:31:14.000Z
|
def to_iter(obj):
try:
return iter(obj)
except TypeError:
return obj,
| 12
| 24
| 0.552083
| 12
| 96
| 4.333333
| 0.666667
| 0.269231
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.364583
| 96
| 7
| 25
| 13.714286
| 0.852459
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0
| 0
| 0.6
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
a07710f0bb90f929f1fc7e78cba178a4fc0fa117
| 1,007
|
py
|
Python
|
tests/article_test.py
|
Kabu1/flashnews
|
30852077c465ce828452125ec5e2b21115609c38
|
[
"Unlicense"
] | null | null | null |
tests/article_test.py
|
Kabu1/flashnews
|
30852077c465ce828452125ec5e2b21115609c38
|
[
"Unlicense"
] | null | null | null |
tests/article_test.py
|
Kabu1/flashnews
|
30852077c465ce828452125ec5e2b21115609c38
|
[
"Unlicense"
] | null | null | null |
import unittest
from app.models import Article
class ArticleTest(unittest.TestCase):
'''
Test Class to test the behaviour of the Article class
'''
def setUp(self):
'''
Set up method that will run before every Test
'''
self.new_article = Article('Jack Healy, Jack Nicas and Mike Baker','Firefighters continued to battle blazes along the West Coast that have now charred nearly five million acres. At least 17 people are dead, with dozens still missing','2020-09-12T00:32:15.000Z','https://www.nytimes.com/2020/09/11/us/fires-oregon-california-washington.html?action=click&module=Spotlight&pgtype=Homepage','https://static01.nyt.com/images/2020/09/11/us/11wildfires-oregon02/11wildfires-oregon02-facebookJumbo.jpg','A Line of Fire South of Portland and a Yearslong Recovery Ahead')
def test_instance(self):
'''
Test to check creation of new article instance
'''
self.assertTrue(isinstance(self.new_article,Article))
| 45.772727
| 569
| 0.715988
| 142
| 1,007
| 5.056338
| 0.697183
| 0.041783
| 0.038997
| 0.058496
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.054745
| 0.183714
| 1,007
| 21
| 570
| 47.952381
| 0.818735
| 0.144985
| 0
| 0
| 0
| 0.428571
| 0.645807
| 0.030038
| 0
| 0
| 0
| 0
| 0.142857
| 1
| 0.285714
| false
| 0
| 0.285714
| 0
| 0.714286
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
a078916cfe94a2866d1c06904964969d62a237ec
| 25
|
py
|
Python
|
relatives/__init__.py
|
treyhunner/django-relatives
|
a578ab135f865df2835957cedfd00476c4b65e18
|
[
"MIT"
] | 10
|
2015-08-14T00:22:52.000Z
|
2021-09-16T08:15:14.000Z
|
relatives/__init__.py
|
treyhunner/django-relatives
|
a578ab135f865df2835957cedfd00476c4b65e18
|
[
"MIT"
] | 12
|
2015-03-09T20:17:16.000Z
|
2021-09-30T18:46:11.000Z
|
relatives/__init__.py
|
treyhunner/django-relatives
|
a578ab135f865df2835957cedfd00476c4b65e18
|
[
"MIT"
] | 3
|
2016-01-05T15:20:10.000Z
|
2018-08-03T10:51:23.000Z
|
__version__ = '1.3.0.a3'
| 12.5
| 24
| 0.64
| 5
| 25
| 2.4
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.181818
| 0.12
| 25
| 1
| 25
| 25
| 0.363636
| 0
| 0
| 0
| 0
| 0
| 0.32
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
a0921c92865225de5297219ccf69a9133b387063
| 2,431
|
py
|
Python
|
dist/snippets/woosmap_http_zones_collection_request/woosmap_http_zones_collection_request.py
|
woosmap/openapi-specification
|
7f934628a75695884db2fa29dd1d04efd1fb20de
|
[
"MIT"
] | null | null | null |
dist/snippets/woosmap_http_zones_collection_request/woosmap_http_zones_collection_request.py
|
woosmap/openapi-specification
|
7f934628a75695884db2fa29dd1d04efd1fb20de
|
[
"MIT"
] | 3
|
2021-12-20T16:15:13.000Z
|
2022-02-15T00:44:19.000Z
|
dist/snippets/woosmap_http_zones_collection_request/woosmap_http_zones_collection_request.py
|
woosmap/openapi-specification
|
7f934628a75695884db2fa29dd1d04efd1fb20de
|
[
"MIT"
] | null | null | null |
# [START woosmap_http_zones_collection_request]
import requests
import json
url = "https://api.woosmap.com/zones?private_key=YOUR_PRIVATE_API_KEY"
payload = json.dumps({
"zones": [
{
"zone_id": "ZoneA",
"description": "Delivery Zone for Store A",
"store_id": "STORE_ID_123456",
"polygon": "POLYGON ((-122.496116 37.7648181,-122.4954079 37.751518,-122.4635648 37.7530788,-122.4618481 37.7514501,-122.4601315 37.7521288,-122.4565266 37.7513144,-122.4540375 37.7566755,-122.4528359 37.7583041,-122.4515485 37.7595934,-122.4546384 37.774656,-122.4718903 37.7731635,-122.472577 37.772485,-122.4755811 37.7725529,-122.4791001 37.7723493,-122.4793576 37.7713995,-122.4784993 37.769839,-122.4783276 37.7680071,-122.4774693 37.766718,-122.4772118 37.7652931,-122.496116 37.7648181))",
"types": [
"delivery"
]
},
{
"zone_id": "ZoneB",
"description": "Delivery Zone for Store B",
"store_id": "STORE_ID_123456",
"polygon": "POLYGON ((-122.4546384 37.774656,-122.4515485 37.7595934,-122.4354306 37.7602172,-122.4333707 37.7512596,-122.423071 37.7511239,-122.4242726 37.7687665,-122.4259893 37.7691736,-122.4289075 37.7732444,-122.4306241 37.7850483,-122.4472753 37.7830133,-122.445902 37.7759581,-122.4546384 37.774656))",
"types": [
"delivery"
]
},
{
"zone_id": "ZoneC",
"description": "Delivery Zone for Store C",
"store_id": "STORE_ID_45678",
"polygon": "POLYGON ((-122.4758889 37.7524995,-122.4751594 37.7321718,-122.4688079 37.7299995,-122.4648597 37.7261979,-122.4519851 37.7228035,-122.4483802 37.7215815,-122.4458053 37.726741,-122.4365356 37.7310857,-122.4315574 37.7324433,-122.4246909 37.7312214,-122.4219444 37.731493,-122.423071 37.7511239,-122.4333707 37.7512596,-122.4354306 37.7602172,-122.4515485 37.7595934,-122.4528628 37.7582744,-122.4540375 37.7566755,-122.4565266 37.7513144,-122.4601315 37.7521288,-122.4618481 37.7514501,-122.4635648 37.7530788,-122.4758889 37.7524995))",
"types": [
"delivery"
]
}
]
})
headers = {
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
# [END woosmap_http_zones_collection_request]
| 52.847826
| 562
| 0.65035
| 319
| 2,431
| 4.880878
| 0.394984
| 0.026975
| 0.044316
| 0.050096
| 0.411047
| 0.047527
| 0.047527
| 0.047527
| 0
| 0
| 0
| 0.524758
| 0.194159
| 2,431
| 46
| 563
| 52.847826
| 0.270036
| 0.03661
| 0
| 0.205128
| 0
| 0.076923
| 0.720085
| 0.495727
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.051282
| 0
| 0.051282
| 0.025641
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
a09b9af2b847bf39b063ead0a72aab28cd93427e
| 126
|
py
|
Python
|
wtpy/apps/__init__.py
|
Huijun-Cui/wtpy
|
9a8243a20b944fbb37aa33d81215b7b36ac7b1e2
|
[
"MIT"
] | null | null | null |
wtpy/apps/__init__.py
|
Huijun-Cui/wtpy
|
9a8243a20b944fbb37aa33d81215b7b36ac7b1e2
|
[
"MIT"
] | null | null | null |
wtpy/apps/__init__.py
|
Huijun-Cui/wtpy
|
9a8243a20b944fbb37aa33d81215b7b36ac7b1e2
|
[
"MIT"
] | null | null | null |
from .WtBtAnalyst import WtBtAnalyst
from .WtCtaOptimizer import WtCtaOptimizer
__all__ = ["WtBtAnalyst","WtCtaOptimizer"]
| 31.5
| 43
| 0.809524
| 11
| 126
| 8.909091
| 0.454545
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 126
| 4
| 44
| 31.5
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0.201613
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
a09c77edcb165aec8e2b0d92f741bba565b1c3ad
| 627
|
py
|
Python
|
ad2web/api/forms.py
|
billfor/alarmdecoder-webapp
|
43c3ebb2b44c7291cd89a2a7a31bbdfdb3ec06dc
|
[
"BSD-3-Clause",
"MIT"
] | 46
|
2015-06-14T02:19:16.000Z
|
2022-03-24T03:11:19.000Z
|
ad2web/api/forms.py
|
billfor/alarmdecoder-webapp
|
43c3ebb2b44c7291cd89a2a7a31bbdfdb3ec06dc
|
[
"BSD-3-Clause",
"MIT"
] | 66
|
2015-03-14T16:30:43.000Z
|
2021-08-28T22:20:01.000Z
|
ad2web/api/forms.py
|
billfor/alarmdecoder-webapp
|
43c3ebb2b44c7291cd89a2a7a31bbdfdb3ec06dc
|
[
"BSD-3-Clause",
"MIT"
] | 44
|
2015-02-13T19:23:37.000Z
|
2021-12-30T04:17:21.000Z
|
# -*- coding: utf-8 -*-
import string
from flask_wtf import FlaskForm as Form
from wtforms.fields.html5 import URLField, EmailField, TelField
from wtforms import (ValidationError, HiddenField, TextField, HiddenField,
PasswordField, SubmitField, TextAreaField, IntegerField, RadioField,
FileField, DecimalField, BooleanField, SelectField, FormField, FieldList)
from wtforms.validators import (Required, Length, EqualTo, Email, NumberRange,
URL, AnyOf, Optional, IPAddress)
from flask_login import current_user
from ..user import User
from ..widgets import ButtonField
class APIKeyForm(Form):
pass
| 34.833333
| 81
| 0.773525
| 69
| 627
| 6.985507
| 0.710145
| 0.068465
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.003759
| 0.151515
| 627
| 18
| 82
| 34.833333
| 0.902256
| 0.033493
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.153846
| 0.615385
| 0
| 0.692308
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
|
0
| 4
|
2604cf6f50e982afd7ab5c70c9417b6682140a5d
| 6,513
|
py
|
Python
|
tests/test_facade.py
|
seucolega/lista-de-listas-cli
|
48815fac9cf3332c5e4fbc935d6ddd09be2738a8
|
[
"MIT"
] | null | null | null |
tests/test_facade.py
|
seucolega/lista-de-listas-cli
|
48815fac9cf3332c5e4fbc935d6ddd09be2738a8
|
[
"MIT"
] | null | null | null |
tests/test_facade.py
|
seucolega/lista-de-listas-cli
|
48815fac9cf3332c5e4fbc935d6ddd09be2738a8
|
[
"MIT"
] | null | null | null |
import facade
import pytest
import schemas
@pytest.fixture(autouse=True)
def configure_db_session(db_session):
facade.db_session = db_session
def test_get_item_list__empty():
assert facade.get_item_list() == []
def test_get_item_list__with_item(item_1):
assert facade.get_item_list() == [item_1]
def test_get_actionable_items__empty():
assert facade.get_actionable_items() == []
def test_get_actionable_items__with_a_done_item(done_item_1):
assert facade.get_actionable_items() == []
def test_get_actionable_items__with_done_and_undone_items(
done_item_1, undone_item_1
):
assert facade.get_actionable_items() == [undone_item_1]
def test_get_actionable_items_with_the_tag__empty(tag_1):
assert facade.get_actionable_items_with_the_tag(tag_1) == []
def test_get_inbox_items__empty():
assert facade.get_inbox_items() == []
def test_get_inbox_items__with_a_done_item(done_item_1):
assert facade.get_inbox_items() == []
def test_get_inbox_items__with_done_and_undone_items(
done_item_1, undone_item_1
):
assert facade.get_inbox_items() == [undone_item_1]
def test_get_inbox_items__with_a_undone_and_tagged_item(undone_item_1, tag_1):
undone_item_1.tags = [tag_1]
assert facade.get_inbox_items() == []
def test_get_actionable_items_with_the_tag__with_a_done_item(
tag_1, done_item_1
):
assert facade.get_actionable_items_with_the_tag(tag_1) == []
def test_get_actionable_items_with_the_tag__with_items_without_the_tag(
tag_1, done_item_1, undone_item_1
):
assert facade.get_actionable_items_with_the_tag(tag_1) == []
def test_get_actionable_items_with_the_tag__with_items_and_the_tag(
tag_1, done_item_1, undone_item_1
):
tag_1.items = [done_item_1, undone_item_1]
assert facade.get_actionable_items_with_the_tag(tag_1) == [undone_item_1]
def test_get_item(item_1):
assert facade.get_item(item_id=item_1.id) == item_1
def test_create_item():
item = schemas.ItemCreate(name='Something')
assert facade.create_item(item=item).id
@pytest.mark.parametrize('status', [*schemas.ItemStatus])
def test_set_item_status(item_1, status):
facade.set_item_status(item=item_1, status=status)
assert item_1.status == status
def test_get_tag_list__empty():
assert facade.get_tag_list() == []
def test_get_list_of_tags_with_items(item_1, tag_1, tag_2):
item_1.tags = [tag_1]
assert facade.get_list_of_tags_with_items() == [tag_1]
def test_get_actionable_tag_list(tag_1, child_tag_1_of_parent_tag_1):
result = facade.get_actionable_tag_list()
assert result == [tag_1, child_tag_1_of_parent_tag_1]
def test_get_tag_list__with_item(db_session, tag_1):
assert facade.get_tag_list() == [tag_1]
def test_get_tag_list_without_parent(
parent_tag_1, child_tag_1_of_parent_tag_1
):
assert facade.get_tag_list_without_parent() == [parent_tag_1]
def test_get_tag(tag_1):
assert facade.get_tag(tag_id=tag_1.id) == tag_1
def test_create_tag():
tag = schemas.TagCreate(name='Tag Name')
assert facade.create_tag(tag=tag).id
def test_get_tag_by_name__case_insensitive(tag_1):
tag_1.name = 'Next Actions'
assert facade.get_tag_by_name('next actions')
def test_get_tag_by_name__not_found(tag_1):
tag_1.name = 'Next Actions'
assert not facade.get_tag_by_name('waiting')
def test_get_item_text_to_show__item_name_without_tags(item_1):
item_1.name = 'Item name'
item_1.tags = []
assert facade.get_item_text_to_show(item_1) == item_1.name
def test_get_item_text_to_show__item_with_one_tag(item_1, tag_1):
item_1.name = 'Item name'
item_1.tags = [tag_1]
tag_1.name = 'Waiting'
expected = 'Item name @Waiting'
assert facade.get_item_text_to_show(item_1) == expected
def test_get_item_text_to_show__item_with_one_spaced_tag(item_1, tag_1):
item_1.name = 'Item name'
item_1.tags = [tag_1]
tag_1.name = 'First Tag'
expected = 'Item name @First_Tag'
assert facade.get_item_text_to_show(item_1) == expected
def test_get_item_text_to_show__item_with_two_tags(item_1, tag_1, tag_2):
item_1.name = 'Item name'
item_1.tags = [tag_1, tag_2]
tag_1.name = 'First Tag'
tag_2.name = 'Second Tag'
expected = 'Item name @First_Tag @Second_Tag'
assert facade.get_item_text_to_show(item_1) == expected
def test_get_item_text_to_show__item_with_one_tag_and_context(item_1, tag_1):
item_1.name = 'Item name'
item_1.tags = [tag_1]
tag_1.name = 'Waiting'
result = facade.get_item_text_to_show(item=item_1, context=tag_1)
expected = 'Item name'
assert result == expected
def test_get_item_text_to_show__item_with_two_tags_and_context(
item_1, tag_1, tag_2
):
item_1.name = 'Item name'
item_1.tags = [tag_1, tag_2]
tag_1.name = 'First Tag'
tag_2.name = 'Second Tag'
result = facade.get_item_text_to_show(item=item_1, context=tag_1)
expected = 'Item name @Second_Tag'
assert result == expected
def test_get_tag_text_to_show__tag_without_parent_tag(tag_1):
assert facade.get_tag_text_to_show(tag_1) == tag_1.name
def test_get_tag_text_to_show__item_with_parent_tag(
parent_tag_1, child_tag_1_of_parent_tag_1
):
child_tag_1_of_parent_tag_1.name = 'Tag name'
parent_tag_1.name = 'Waiting'
expected = 'Tag name @Waiting'
assert facade.get_tag_text_to_show(child_tag_1_of_parent_tag_1) == expected
def test_get_tag_text_to_show__item_with_one_spaced_tag(
parent_tag_1, child_tag_1_of_parent_tag_1
):
child_tag_1_of_parent_tag_1.name = 'Tag name'
parent_tag_1.name = 'Parent Tag'
expected = 'Tag name @Parent_Tag'
assert facade.get_tag_text_to_show(child_tag_1_of_parent_tag_1) == expected
def test_get_tag_text_to_show__item_with_one_tag_and_context(
parent_tag_1, child_tag_1_of_parent_tag_1
):
child_tag_1_of_parent_tag_1.name = 'Tag name'
parent_tag_1.name = 'Waiting'
result = facade.get_tag_text_to_show(
tag=child_tag_1_of_parent_tag_1, context=parent_tag_1
)
expected = 'Tag name'
assert result == expected
def test_get_list_of_tags_with_actionable_items__with_a_done_item(
done_item_1, tag_1
):
done_item_1.tags = [tag_1]
assert facade.get_list_of_tags_with_actionable_items() == []
def test_get_list_of_tags_with_actionable_items__with_an_undone_item(
undone_item_1, tag_1
):
undone_item_1.tags = [tag_1]
assert facade.get_list_of_tags_with_actionable_items() == [tag_1]
| 24.484962
| 79
| 0.76094
| 1,118
| 6,513
| 3.853309
| 0.059034
| 0.077066
| 0.078923
| 0.066852
| 0.831012
| 0.774838
| 0.733983
| 0.642758
| 0.595868
| 0.533658
| 0
| 0.026534
| 0.149394
| 6,513
| 265
| 80
| 24.577358
| 0.751083
| 0
| 0
| 0.428571
| 0
| 0
| 0.057424
| 0
| 0
| 0
| 0
| 0
| 0.24026
| 1
| 0.246753
| false
| 0
| 0.019481
| 0
| 0.266234
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
260b70a7a637b6e3448163b26c95e89556398218
| 70
|
py
|
Python
|
24/aoc24-1-cython.py
|
combs/AdventOfCode2021
|
925df8a3526cb9c0dde368cf828673f345096e06
|
[
"MIT"
] | null | null | null |
24/aoc24-1-cython.py
|
combs/AdventOfCode2021
|
925df8a3526cb9c0dde368cf828673f345096e06
|
[
"MIT"
] | null | null | null |
24/aoc24-1-cython.py
|
combs/AdventOfCode2021
|
925df8a3526cb9c0dde368cf828673f345096e06
|
[
"MIT"
] | null | null | null |
import pyximport
pyximport.install()
from aoc24 import do_it
do_it()
| 11.666667
| 23
| 0.8
| 11
| 70
| 4.909091
| 0.636364
| 0.148148
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.032787
| 0.128571
| 70
| 5
| 24
| 14
| 0.852459
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.75
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
263f1ba2adc1731ba0f7b0bae1afb72287535d53
| 11,877
|
py
|
Python
|
Vaccine_page/vaccine_maps_population.py
|
ScilifelabDataCentre/Covid_portal_vis
|
f41c1fe3b3d271b4d414378d622443f066a69d71
|
[
"MIT"
] | null | null | null |
Vaccine_page/vaccine_maps_population.py
|
ScilifelabDataCentre/Covid_portal_vis
|
f41c1fe3b3d271b4d414378d622443f066a69d71
|
[
"MIT"
] | 2
|
2021-02-24T11:59:16.000Z
|
2021-04-27T07:48:50.000Z
|
Vaccine_page/vaccine_maps_population.py
|
ScilifelabDataCentre/Covid_portal_vis
|
f41c1fe3b3d271b4d414378d622443f066a69d71
|
[
"MIT"
] | 7
|
2021-02-18T14:50:03.000Z
|
2021-11-11T11:41:07.000Z
|
import plotly.express as px
import plotly.graph_objects as go
import pandas as pd
import json
import os
from vaccine_dataprep_Swedentots import (
df_vacc_lan, # data on 1st 2 doses
third_vacc_dose_lan, # data on 3rd dose
# df_vacc_ålders_lan, # a switch to age data for 1st and second doses?
SCB_population, # raw population counts for each lan
)
# map
with open("sweden-counties.geojson", "r") as sw:
jdata = json.load(sw)
# dictionary to match data and map
counties_id_map = {}
for feature in jdata["features"]:
feature["id"] = feature["properties"]["cartodb_id"]
counties_id_map[feature["properties"]["name"]] = feature["id"]
# data to match to map (make 3 maps ultimately, with each data frame linked to a new map)
# df_vacc_lan = df_vacc_ålders_lan #if we switch, we need to do this and get rid of date stuff and switch to using totals instead
# Need to make calculation based on population data - need to match SCB population data
df_vacc_lan = pd.merge(
df_vacc_lan, SCB_population, how="left", left_on="Region", right_on="Lan"
)
df_vacc_lan["Vacc_perc_population"] = (
df_vacc_lan["Antal vaccinerade"] / df_vacc_lan["Population"]
) * 100
third_vacc_dose_lan = pd.merge(
third_vacc_dose_lan, SCB_population, how="left", left_on="Region", right_on="Lan"
)
third_vacc_dose_lan["Vacc_perc_population"] = (
third_vacc_dose_lan["Antal vaccinerade"] / third_vacc_dose_lan["Population"]
) * 100
# first two doses
one_dose_lan_pop = df_vacc_lan[
(df_vacc_lan["date"] == df_vacc_lan["date"].max())
# (df_vacc_lan["Åldersgrupp"] == "Totalt")
& (df_vacc_lan["Vaccinationsstatus"] == "Minst 1 dos")
]
one_dose_lan_pop.drop(
one_dose_lan_pop[(one_dose_lan_pop["Region"] == "Sweden")].index, inplace=True
)
one_dose_lan_pop = one_dose_lan_pop.replace("Minst 1 dos", "One dose")
two_dose_lan_pop = df_vacc_lan[
(df_vacc_lan["date"] == df_vacc_lan["date"].max())
# (df_vacc_lan["Åldersgrupp"] == "Totalt")
& (df_vacc_lan["Vaccinationsstatus"] == "Minst 2 doser")
]
two_dose_lan_pop.drop(
two_dose_lan_pop[(two_dose_lan_pop["Region"] == "Sweden")].index, inplace=True
)
two_dose_lan_pop = two_dose_lan_pop.replace("Minst 2 doser", "Two doses")
# third dose
third_vacc_dose_lan_pop = third_vacc_dose_lan[
(third_vacc_dose_lan["Åldersgrupp"] == "Totalt")
]
third_vacc_dose_lan_pop.drop(
third_vacc_dose_lan_pop[(third_vacc_dose_lan_pop["Region"] == "Sweden")].index,
inplace=True,
)
third_vacc_dose_lan_pop = third_vacc_dose_lan_pop.replace("3 doser", "Three doses")
# Tie each dataframe to the map
# one dose
one_dose_lan_pop["id"] = one_dose_lan_pop["Region"].apply(lambda x: counties_id_map[x])
# two doses
two_dose_lan_pop["id"] = two_dose_lan_pop["Region"].apply(lambda x: counties_id_map[x])
# three doses
third_vacc_dose_lan_pop["id"] = third_vacc_dose_lan_pop["Region"].apply(
lambda x: counties_id_map[x]
)
# print(one_dose_lan_pop)
# print(two_dose_lan_pop)
# print(third_vacc_dose_lan_pop)
map_colour = px.colors.diverging.RdBu
map_colour[5] = "rgb(255,255,204)"
splits = [0.00, 0.10, 0.20, 0.30, 0.40, 0.50, 0.60, 0.70, 0.80, 0.90, 1.0]
lat_foc = 62.45
lon_foc = 20.5
# One dose
onedose_pop_map_plot = px.choropleth(
one_dose_lan_pop,
geojson=jdata,
locations="id",
color=one_dose_lan_pop["Vacc_perc_population"],
# Below gives discrete colours for ranges
color_continuous_scale=[
(splits[0], map_colour[10]),
(splits[1], map_colour[10]),
(splits[1], map_colour[9]),
(splits[2], map_colour[9]),
(splits[2], map_colour[8]),
(splits[3], map_colour[8]),
(splits[3], map_colour[7]),
(splits[4], map_colour[7]),
(splits[4], map_colour[6]),
(splits[5], map_colour[6]),
(splits[5], map_colour[5]),
(splits[6], map_colour[5]),
(splits[6], map_colour[4]),
(splits[7], map_colour[4]),
(splits[7], map_colour[3]),
(splits[8], map_colour[3]),
(splits[8], map_colour[2]),
(splits[9], map_colour[2]),
(splits[9], map_colour[1]),
(splits[10], map_colour[1]),
],
# this keeps the range of colours constant regardless of data
range_color=[0, 100],
scope="europe",
hover_name="Region",
hover_data={
"Vacc_perc_population": ":.2f",
"Vaccinationsstatus": True, # ":.2f",
"id": False,
},
labels={
"Vacc_perc_population": "Percentage of population<br>vaccinated (%)",
"Vaccinationsstatus": "<br>Number of Doses",
},
)
# this section deals with the exact focus on the map
onedose_pop_map_plot.update_layout(
geo=dict(
lonaxis_range=[20, 90], # the logitudinal range to consider
lataxis_range=[48, 100], # the logitudinal range to consider
projection_scale=4.55, # this is kind of like zoom
center=dict(lat=lat_foc, lon=lon_foc), # this will center on the point
visible=False,
)
)
onedose_pop_map_plot.update_layout(margin={"r": 0, "t": 0, "l": 0, "b": 0})
onedose_pop_map_plot.update_layout(dragmode=False)
# The below labels the colourbar categories
onedose_pop_map_plot.update_layout(
coloraxis_colorbar=dict(
title="<b>"
+ "Percentage of population<br>vaccinated with<br>one dose"
+ "</b>",
tickvals=[5, 15, 25, 35, 45, 55, 65, 75, 85, 95],
ticktext=[
"00.00 - 9.99%",
"10.00 - 19.99%",
"20.00 - 29.99%",
"30.00 - 39.99%",
"40.00 - 49.99%",
"50.00 - 59.99%",
"60.00 - 69.99%",
"70.00 - 79.99%",
"80.00 - 89.99%",
"90.00 - 100.00%",
],
x=0.51,
y=0.40,
thicknessmode="pixels",
thickness=10,
lenmode="pixels",
len=285,
),
font=dict(size=14),
)
onedose_pop_map_plot.update_traces(marker_line_color="white")
# onedose_pop_map_plot.show()
# two doses
twodoses_pop_map_plot = px.choropleth(
two_dose_lan_pop,
geojson=jdata,
locations="id",
color=two_dose_lan_pop["Vacc_perc_population"],
# Below gives discrete colours for ranges
color_continuous_scale=[
(splits[0], map_colour[10]),
(splits[1], map_colour[10]),
(splits[1], map_colour[9]),
(splits[2], map_colour[9]),
(splits[2], map_colour[8]),
(splits[3], map_colour[8]),
(splits[3], map_colour[7]),
(splits[4], map_colour[7]),
(splits[4], map_colour[6]),
(splits[5], map_colour[6]),
(splits[5], map_colour[5]),
(splits[6], map_colour[5]),
(splits[6], map_colour[4]),
(splits[7], map_colour[4]),
(splits[7], map_colour[3]),
(splits[8], map_colour[3]),
(splits[8], map_colour[2]),
(splits[9], map_colour[2]),
(splits[9], map_colour[1]),
(splits[10], map_colour[1]),
],
# this keeps the range of colours constant regardless of data
range_color=[0, 100],
scope="europe",
hover_name="Region",
hover_data={
"Vacc_perc_population": ":.2f",
"Vaccinationsstatus": True, # ":.2f",
"id": False,
},
labels={
"Vacc_perc_population": "Percentage of population<br>vaccinated (%)",
"Vaccinationsstatus": "<br>Number of Doses",
},
)
# # this section deals with the exact focus on the map
twodoses_pop_map_plot.update_layout(
geo=dict(
lonaxis_range=[20, 90], # the logitudinal range to consider
lataxis_range=[48, 100], # the logitudinal range to consider
projection_scale=4.55, # this is kind of like zoom
center=dict(lat=lat_foc, lon=lon_foc), # this will center on the point
visible=False,
)
)
twodoses_pop_map_plot.update_layout(margin={"r": 0, "t": 0, "l": 0, "b": 0})
twodoses_pop_map_plot.update_layout(dragmode=False)
# The below labels the colourbar categories
twodoses_pop_map_plot.update_layout(
coloraxis_colorbar=dict(
title="<b>"
+ "Percentage of population<br>vaccinated with<br>two doses"
+ "</b>",
tickvals=[5, 15, 25, 35, 45, 55, 65, 75, 85, 95],
ticktext=[
"00.00 - 9.99%",
"10.00 - 19.99%",
"20.00 - 29.99%",
"30.00 - 39.99%",
"40.00 - 49.99%",
"50.00 - 59.99%",
"60.00 - 69.99%",
"70.00 - 79.99%",
"80.00 - 89.99%",
"90.00 - 100.00%",
],
x=0.51,
y=0.40,
thicknessmode="pixels",
thickness=10,
lenmode="pixels",
len=285,
),
font=dict(size=14),
)
twodoses_pop_map_plot.update_traces(marker_line_color="white")
# twodoses_pop_map_plot.show()
# three doses
threedoses_pop_map_plot = px.choropleth(
third_vacc_dose_lan_pop,
geojson=jdata,
locations="id",
color=third_vacc_dose_lan_pop["Vacc_perc_population"],
# Below gives discrete colours for ranges
color_continuous_scale=[
(splits[0], map_colour[10]),
(splits[1], map_colour[10]),
(splits[1], map_colour[9]),
(splits[2], map_colour[9]),
(splits[2], map_colour[8]),
(splits[3], map_colour[8]),
(splits[3], map_colour[7]),
(splits[4], map_colour[7]),
(splits[4], map_colour[6]),
(splits[5], map_colour[6]),
(splits[5], map_colour[5]),
(splits[6], map_colour[5]),
(splits[6], map_colour[4]),
(splits[7], map_colour[4]),
(splits[7], map_colour[3]),
(splits[8], map_colour[3]),
(splits[8], map_colour[2]),
(splits[9], map_colour[2]),
(splits[9], map_colour[1]),
(splits[10], map_colour[1]),
],
# this keeps the range of colours constant regardless of data
range_color=[0, 100],
scope="europe",
hover_name="Region",
hover_data={
"Vacc_perc_population": ":.2f",
"Vaccinationsstatus": True, # ":.2f",
"id": False,
},
labels={
"Vacc_perc_population": "Percentage of population<br>vaccinated (%)",
"Vaccinationsstatus": "<br>Number of Doses",
},
)
# this section deals with the exact focus on the map
threedoses_pop_map_plot.update_layout(
geo=dict(
lonaxis_range=[20, 90], # the logitudinal range to consider
lataxis_range=[48, 100], # the logitudinal range to consider
projection_scale=4.55, # this is kind of like zoom
center=dict(lat=lat_foc, lon=lon_foc), # this will center on the point
visible=False,
)
)
threedoses_pop_map_plot.update_layout(margin={"r": 0, "t": 0, "l": 0, "b": 0})
threedoses_pop_map_plot.update_layout(dragmode=False)
# The below labels the colourbar categories
threedoses_pop_map_plot.update_layout(
coloraxis_colorbar=dict(
title="<b>"
+ "Percentage of population<br>vaccinated with<br>three doses"
+ "</b>",
tickvals=[5, 15, 25, 35, 45, 55, 65, 75, 85, 95],
ticktext=[
"00.00 - 9.99%",
"10.00 - 19.99%",
"20.00 - 29.99%",
"30.00 - 39.99%",
"40.00 - 49.99%",
"50.00 - 59.99%",
"60.00 - 69.99%",
"70.00 - 79.99%",
"80.00 - 89.99%",
"90.00 - 100.00%",
],
x=0.51,
y=0.40,
thicknessmode="pixels",
thickness=10,
lenmode="pixels",
len=285,
),
font=dict(size=14),
)
threedoses_pop_map_plot.update_traces(marker_line_color="white")
# threedoses_pop_map_plot.show()
if not os.path.isdir("Plots/"):
os.mkdir("Plots/")
# write out FoHM graphs
onedose_pop_map_plot.write_json("Plots/onedose_pop_map.json")
twodoses_pop_map_plot.write_json("Plots/twodose_pop_map.json")
threedoses_pop_map_plot.write_json("Plots/threedose_pop_map.json")
| 31.841823
| 129
| 0.613707
| 1,706
| 11,877
| 4.028722
| 0.147128
| 0.081187
| 0.048014
| 0.044231
| 0.783501
| 0.741161
| 0.714826
| 0.714826
| 0.670886
| 0.647461
| 0
| 0.065502
| 0.233897
| 11,877
| 372
| 130
| 31.927419
| 0.689856
| 0.155258
| 0
| 0.664474
| 0
| 0
| 0.17183
| 0.024762
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.019737
| 0
| 0.019737
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
26406e10e1297a7c9003be939dfb3100b8150501
| 9,995
|
py
|
Python
|
stanCode_Projects/my_photoshop/blur.py
|
EricCheng8679/sc-projects
|
85f478ecf4c04f3ee79fd4c911a7122b286aff06
|
[
"MIT"
] | null | null | null |
stanCode_Projects/my_photoshop/blur.py
|
EricCheng8679/sc-projects
|
85f478ecf4c04f3ee79fd4c911a7122b286aff06
|
[
"MIT"
] | null | null | null |
stanCode_Projects/my_photoshop/blur.py
|
EricCheng8679/sc-projects
|
85f478ecf4c04f3ee79fd4c911a7122b286aff06
|
[
"MIT"
] | null | null | null |
"""
File: blur.py
-------------------------------
This file shows the original image(smiley-face.png)
first, and then its blurred image. The blur algorithm
uses the average RGB values of a pixel's nearest neighbors.
"""
from simpleimage import SimpleImage
BLURRED_SCALE = 9
def blur(old_img):
"""
:param old_img: a original image
:return: a blurred image
"""
blur_img = SimpleImage.blank(old_img.width, old_img.height)
for x in range(old_img.width):
for y in range(old_img.height):
if x == 0 and y == 0: # Upper left corner
old_pixel_00 = old_img.get_pixel(x, y) # Reference point
old_pixel_s = old_img.get_pixel(x, y + 1) # South
old_pixel_e = old_img.get_pixel(x + 1, y) # East
old_pixel_se = old_img.get_pixel(x + 1, y + 1) # Southeast
blur_pixel = blur_img.get_pixel(x, y)
blur_pixel.red = (old_pixel_00.red + old_pixel_s.red + old_pixel_e.red + old_pixel_se.red) // 4
blur_pixel.green = (old_pixel_00.green + old_pixel_s.green + old_pixel_e.green + old_pixel_se.green) \
// 4
blur_pixel.blue = (old_pixel_00.blue + old_pixel_s.blue + old_pixel_e.blue + old_pixel_se.blue) // 4
elif x == 0 and y == old_img.height - 1: # Bottom left
old_pixel_0h = old_img.get_pixel(x, y)
old_pixel_n = old_img.get_pixel(x, y - 1) # North
old_pixel_e = old_img.get_pixel(x + 1, y)
old_pixel_ne = old_img.get_pixel(x + 1, y - 1) # Northeast
blur_pixel = blur_img.get_pixel(x, y)
blur_pixel.red = (old_pixel_0h.red + old_pixel_n.red + old_pixel_e.red + old_pixel_ne.red) // 4
blur_pixel.green = (old_pixel_0h.green + old_pixel_n.green + old_pixel_e.green + old_pixel_ne.green) \
// 4
blur_pixel.blue = (old_pixel_0h.blue + old_pixel_n.blue + old_pixel_e.blue + old_pixel_ne.blue) // 4
elif x == old_img.width - 1 and y == 0: # Upper right corner
old_pixel_w0 = old_img.get_pixel(x, y)
old_pixel_s = old_img.get_pixel(x, y + 1)
old_pixel_w = old_img.get_pixel(x - 1, y) # West
old_pixel_sw = old_img.get_pixel(x - 1, y + 1) # Southwest
blur_pixel = blur_img.get_pixel(x, y)
blur_pixel.red = (old_pixel_w0.red + old_pixel_s.red + old_pixel_w.red + old_pixel_sw.red) // 4
blur_pixel.green = (old_pixel_w0.green + old_pixel_s.green + old_pixel_w.green + old_pixel_sw.green) \
// 4
blur_pixel.blue = (old_pixel_w0.blue + old_pixel_s.blue + old_pixel_w.blue + old_pixel_sw.blue) // 4
elif x == old_img.width - 1 and y == old_img.height - 1: # Bottom right corner
old_pixel_wh = old_img.get_pixel(x, y)
old_pixel_n = old_img.get_pixel(x, y - 1)
old_pixel_w = old_img.get_pixel(x - 1, y)
old_pixel_nw = old_img.get_pixel(x - 1, y - 1) # Northwest
blur_pixel = blur_img.get_pixel(x, y)
blur_pixel.red = (old_pixel_wh.red + old_pixel_n.red + old_pixel_w.red + old_pixel_nw.red) // 4
blur_pixel.green = (old_pixel_wh.green + old_pixel_n.green + old_pixel_w.green + old_pixel_nw.green) \
// 4
blur_pixel.blue = (old_pixel_wh.blue + old_pixel_n.blue + old_pixel_w.blue + old_pixel_nw.blue) // 4
elif x == 0 and y != 0 and y != old_img.height - 1: # Left side except for head and tail
old_pixel_0y = old_img.get_pixel(x, y)
old_pixel_n = old_img.get_pixel(x, y - 1)
old_pixel_s = old_img.get_pixel(x, y + 1)
old_pixel_ne = old_img.get_pixel(x + 1, y - 1)
old_pixel_e = old_img.get_pixel(x + 1, y)
old_pixel_se = old_img.get_pixel(x + 1, y + 1)
blur_pixel = blur_img.get_pixel(x, y)
blur_pixel.red = (old_pixel_0y.red + old_pixel_n.red + old_pixel_s.red + old_pixel_ne.red +
old_pixel_e.red + old_pixel_se.red) // 6
blur_pixel.green = (old_pixel_0y.green + old_pixel_n.green + old_pixel_s.green + old_pixel_ne.green +
old_pixel_e.green + old_pixel_se.green) // 6
blur_pixel.blue = (old_pixel_0y.blue + old_pixel_n.blue + old_pixel_s.blue + old_pixel_ne.blue +
old_pixel_e.blue + old_pixel_se.blue) // 6
elif y == 0 and x != 0 and x != old_img.width - 1: # Top except for head and tail
old_pixel_x0 = old_img.get_pixel(x, y)
old_pixel_w = old_img.get_pixel(x - 1, y)
old_pixel_sw = old_img.get_pixel(x - 1, y + 1)
old_pixel_s = old_img.get_pixel(x, y + 1)
old_pixel_e = old_img.get_pixel(x + 1, y)
old_pixel_se = old_img.get_pixel(x + 1, y + 1)
blur_pixel = blur_img.get_pixel(x, y)
blur_pixel.red = (old_pixel_x0.red + old_pixel_w.red + old_pixel_s.red + old_pixel_sw.red +
old_pixel_e.red + old_pixel_se.red) // 6
blur_pixel.green = (old_pixel_x0.green + old_pixel_w.green + old_pixel_s.green + old_pixel_sw.green +
old_pixel_e.green + old_pixel_se.green) // 6
blur_pixel.blue = (old_pixel_x0.blue + old_pixel_w.blue + old_pixel_s.blue + old_pixel_sw.blue +
old_pixel_e.blue + old_pixel_se.blue) // 6
elif x == old_img.width - 1 and y != 0 and y != old_img.height - 1: # right side except for head and tail
old_pixel_wy = old_img.get_pixel(x, y)
old_pixel_n = old_img.get_pixel(x, y - 1)
old_pixel_nw = old_img.get_pixel(x - 1, y - 1)
old_pixel_w = old_img.get_pixel(x - 1, y)
old_pixel_sw = old_img.get_pixel(x - 1, y + 1)
old_pixel_s = old_img.get_pixel(x, y + 1)
blur_pixel = blur_img.get_pixel(x, y)
blur_pixel.red = (old_pixel_wy.red + old_pixel_n.red + old_pixel_s.red + old_pixel_nw.red +
old_pixel_w.red + old_pixel_sw.red) // 6
blur_pixel.green = (old_pixel_wy.green + old_pixel_n.green + old_pixel_s.green + old_pixel_nw.green +
old_pixel_w.green + old_pixel_sw.green) // 6
blur_pixel.blue = (old_pixel_wy.blue + old_pixel_n.blue + old_pixel_s.blue + old_pixel_nw.blue +
old_pixel_w.blue + old_pixel_sw.blue) // 6
elif y == old_img.height - 1 and x != 0 and x != old_img.width - 1: # Bottom except for head and tail
old_pixel_xh = old_img.get_pixel(x, y)
old_pixel_w = old_img.get_pixel(x - 1, y)
old_pixel_nw = old_img.get_pixel(x - 1, y - 1)
old_pixel_n = old_img.get_pixel(x, y - 1)
old_pixel_ne = old_img.get_pixel(x + 1, y - 1)
old_pixel_e = old_img.get_pixel(x + 1, y)
blur_pixel = blur_img.get_pixel(x, y)
blur_pixel.red = (old_pixel_xh.red + old_pixel_w.red + old_pixel_nw.red + old_pixel_n.red +
old_pixel_e.red + old_pixel_ne.red) // 6
blur_pixel.green = (old_pixel_xh.green + old_pixel_w.green + old_pixel_nw.green + old_pixel_n.green +
old_pixel_e.green + old_pixel_ne.green) // 6
blur_pixel.blue = (old_pixel_xh.blue + old_pixel_w.blue + old_pixel_nw.blue + old_pixel_n.blue +
old_pixel_e.blue + old_pixel_ne.blue) // 6
else: # middle parts having 8 neighbors
old_pixel_xy = old_img.get_pixel(x, y)
old_pixel_w = old_img.get_pixel(x - 1, y)
old_pixel_nw = old_img.get_pixel(x - 1, y - 1)
old_pixel_n = old_img.get_pixel(x, y - 1)
old_pixel_ne = old_img.get_pixel(x + 1, y - 1)
old_pixel_s = old_img.get_pixel(x, y + 1)
old_pixel_sw = old_img.get_pixel(x - 1, y + 1)
old_pixel_e = old_img.get_pixel(x + 1, y)
old_pixel_se = old_img.get_pixel(x + 1, y + 1)
blur_pixel = blur_img.get_pixel(x, y)
blur_pixel.red = (old_pixel_xy.red + old_pixel_w.red + old_pixel_nw.red + old_pixel_n.red +
old_pixel_e.red + old_pixel_ne.red + old_pixel_s.red + old_pixel_sw.red +
old_pixel_se.red) // 9
blur_pixel.green = (old_pixel_xy.green + old_pixel_w.green + old_pixel_nw.green + old_pixel_n.green +
old_pixel_e.green + old_pixel_ne.green + old_pixel_s.green + old_pixel_sw.green +
old_pixel_se.green) // 9
blur_pixel.blue = (old_pixel_xy.blue + old_pixel_w.blue + old_pixel_nw.blue + old_pixel_n.blue +
old_pixel_e.blue + old_pixel_ne.blue + old_pixel_s.blue + old_pixel_sw.blue +
old_pixel_se.blue) // 9
return blur_img
def main():
"""
This program blurs a image. The practical approach is to find average values of RGB with adjacent pixels
Then,it would show the blurred one by repeating the above approach some times.
"""
old_img = SimpleImage("images/smiley-face.png")
old_img.show()
blurred_img = blur(old_img)
for i in range(BLURRED_SCALE):
blurred_img = blur(blurred_img)
blurred_img.show()
if __name__ == '__main__':
main()
| 63.66242
| 118
| 0.561681
| 1,555
| 9,995
| 3.237942
| 0.076527
| 0.31142
| 0.126713
| 0.138232
| 0.8143
| 0.798014
| 0.794836
| 0.685601
| 0.669712
| 0.576763
| 0
| 0.019551
| 0.33987
| 9,995
| 156
| 119
| 64.070513
| 0.743559
| 0.076538
| 0
| 0.44697
| 0
| 0
| 0.003273
| 0.0024
| 0
| 0
| 0
| 0
| 0
| 1
| 0.015152
| false
| 0
| 0.007576
| 0
| 0.030303
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
13fb266bbbe1b42018ffaaf4a8dc92668ab6d95f
| 137
|
py
|
Python
|
src/__init__.py
|
gitlabbin/zookeeper-kazoo-barrier-snippet
|
2ab88fa3735b61dd9a94e0e0294e88a12c458ee3
|
[
"MIT"
] | null | null | null |
src/__init__.py
|
gitlabbin/zookeeper-kazoo-barrier-snippet
|
2ab88fa3735b61dd9a94e0e0294e88a12c458ee3
|
[
"MIT"
] | null | null | null |
src/__init__.py
|
gitlabbin/zookeeper-kazoo-barrier-snippet
|
2ab88fa3735b61dd9a94e0e0294e88a12c458ee3
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
from __future__ import absolute_import
def main():
import src.barrier
if __name__ == '__main__':
main()
| 13.7
| 38
| 0.693431
| 18
| 137
| 4.555556
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.189781
| 137
| 10
| 39
| 13.7
| 0.738739
| 0.145985
| 0
| 0
| 0
| 0
| 0.068376
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| true
| 0
| 0.4
| 0
| 0.6
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
cd08e9d07146abb0712c59ab83d9a3d247ba38c2
| 27
|
py
|
Python
|
tool/klint/bpf/__init__.py
|
kylerky/klint
|
77be216ec3f4315a835b7bcdaef1b66ed3144603
|
[
"MIT"
] | 2
|
2022-03-08T16:10:27.000Z
|
2022-03-11T14:14:04.000Z
|
tool/klint/bpf/__init__.py
|
kylerky/klint
|
77be216ec3f4315a835b7bcdaef1b66ed3144603
|
[
"MIT"
] | null | null | null |
tool/klint/bpf/__init__.py
|
kylerky/klint
|
77be216ec3f4315a835b7bcdaef1b66ed3144603
|
[
"MIT"
] | 1
|
2022-03-24T09:27:41.000Z
|
2022-03-24T09:27:41.000Z
|
"""
BPF-related stuff.
"""
| 6.75
| 18
| 0.555556
| 3
| 27
| 5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.148148
| 27
| 3
| 19
| 9
| 0.652174
| 0.666667
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
cd592812165ebec71f40378868573e5f9eda72b9
| 252
|
py
|
Python
|
download_and_create_reference_datasets/v02/create_ht__clinvar.py
|
NLSVTN/hail-elasticsearch-pipelines
|
8b895a2e46a33d347dd2a1024101a6d515027a03
|
[
"MIT"
] | 15
|
2017-11-22T14:48:04.000Z
|
2020-10-05T18:22:24.000Z
|
download_and_create_reference_datasets/v02/create_ht__clinvar.py
|
NLSVTN/hail-elasticsearch-pipelines
|
8b895a2e46a33d347dd2a1024101a6d515027a03
|
[
"MIT"
] | 94
|
2020-10-21T17:37:57.000Z
|
2022-03-29T14:59:46.000Z
|
download_and_create_reference_datasets/v02/create_ht__clinvar.py
|
NLSVTN/hail-elasticsearch-pipelines
|
8b895a2e46a33d347dd2a1024101a6d515027a03
|
[
"MIT"
] | 7
|
2019-01-29T09:08:10.000Z
|
2020-02-25T16:22:57.000Z
|
#!/usr/bin/env python3
from kubernetes.shell_utils import simple_run as run
run((
"python3 gcloud_dataproc/v02/run_script.py "
"--cluster create-ht-clinvar "
"download_and_create_reference_datasets/v02/hail_scripts/write_clinvar_ht.py"))
| 28
| 83
| 0.77381
| 37
| 252
| 4.972973
| 0.756757
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.027027
| 0.119048
| 252
| 8
| 84
| 31.5
| 0.801802
| 0.083333
| 0
| 0
| 0
| 0
| 0.630435
| 0.469565
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.2
| 0
| 0.2
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
cd5dd7dda160122dc7f0149e4f5abf4d8e95ebe4
| 206
|
py
|
Python
|
parser/src/test/test-data/math_csc.py
|
luciansmith/sedml-script
|
d891645d0b3f89ff190fc7e719659c8e229c07da
|
[
"MIT"
] | null | null | null |
parser/src/test/test-data/math_csc.py
|
luciansmith/sedml-script
|
d891645d0b3f89ff190fc7e719659c8e229c07da
|
[
"MIT"
] | null | null | null |
parser/src/test/test-data/math_csc.py
|
luciansmith/sedml-script
|
d891645d0b3f89ff190fc7e719659c8e229c07da
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
"""
Created by libsedmlscript v0.0.1
"""
from sed_roadrunner import model, task, plot
from mpmath import csc
#----------------------------------------------
csc(0.5)
| 15.846154
| 48
| 0.475728
| 23
| 206
| 4.217391
| 0.826087
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.035928
| 0.18932
| 206
| 12
| 49
| 17.166667
| 0.54491
| 0.490291
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
cd7e21c2d43aa6b5ca80b05a26cc762c012f19a7
| 228
|
py
|
Python
|
data/__init__.py
|
opconty/keras_std
|
26cbe25c525128a067a97157bca0b060f40e5ec8
|
[
"Apache-2.0"
] | 18
|
2019-07-16T10:54:29.000Z
|
2021-03-16T00:34:23.000Z
|
data/__init__.py
|
opconty/keras_std
|
26cbe25c525128a067a97157bca0b060f40e5ec8
|
[
"Apache-2.0"
] | 2
|
2019-08-26T11:40:12.000Z
|
2019-12-07T13:18:48.000Z
|
data/__init__.py
|
opconty/keras_std
|
26cbe25c525128a067a97157bca0b060f40e5ec8
|
[
"Apache-2.0"
] | 8
|
2019-07-17T08:26:10.000Z
|
2021-03-16T00:34:17.000Z
|
#-*- coding:utf-8 -*-
#'''
# Created on 19-7-16 下午2:14
#
# @Author: Greg Gao(laygin)
#'''
from .synth_text import SynthTextConfig, SynthTextDataset
from .icdar13 import IcdarConfig, IcdarDataset
from .img_aug import resize_image
| 25.333333
| 57
| 0.736842
| 31
| 228
| 5.322581
| 0.870968
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.055
| 0.122807
| 228
| 9
| 58
| 25.333333
| 0.77
| 0.342105
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
cd8abd04dc151085122e27f4484b76ecb7ff52ac
| 225
|
py
|
Python
|
OnePy/sys_module/base_riskmanager.py
|
Chandlercjy/OnePyfx
|
9bd43b721d3f7352495b6ccab76bd533a3d2e8f2
|
[
"MIT"
] | 321
|
2017-07-09T09:25:45.000Z
|
2022-03-29T16:51:35.000Z
|
OnePy/sys_module/base_riskmanager.py
|
sunzhouhong/OnePy
|
4e225945de297ba1211035a7b95b5094cdddc2a7
|
[
"MIT"
] | 7
|
2017-08-23T12:10:29.000Z
|
2020-03-26T12:56:09.000Z
|
OnePy/sys_module/base_riskmanager.py
|
sunzhouhong/OnePy
|
4e225945de297ba1211035a7b95b5094cdddc2a7
|
[
"MIT"
] | 134
|
2017-07-26T22:29:18.000Z
|
2022-03-23T09:22:10.000Z
|
from OnePy.sys_module.metabase_env import OnePyEnvBase
class RiskManagerBase(OnePyEnvBase):
def __init__(self):
self.env.risk_managers.update({self.__class__.__name__: self})
def run(self):
pass
| 17.307692
| 70
| 0.715556
| 27
| 225
| 5.407407
| 0.703704
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.191111
| 225
| 12
| 71
| 18.75
| 0.802198
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0.166667
| 0.166667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
26a4b307dfc5e770b6a75ad04eed2871c82ad2a0
| 174
|
py
|
Python
|
Python/CrashCourse/mongodb-quickstart-course/src/starter_code_snake_bnb/src/infrastructure/state.py
|
Mujtaba-Biyabani/Research
|
211f57812786a151ce8c3b1c3ed379fd1ba4e2f9
|
[
"Unlicense"
] | 52
|
2017-12-06T10:44:05.000Z
|
2021-11-24T10:44:16.000Z
|
Python/CrashCourse/mongodb-quickstart-course/src/starter_code_snake_bnb/src/infrastructure/state.py
|
Mujtaba-Biyabani/Research
|
211f57812786a151ce8c3b1c3ed379fd1ba4e2f9
|
[
"Unlicense"
] | 8
|
2018-01-29T08:32:34.000Z
|
2019-01-02T05:56:51.000Z
|
Python/CrashCourse/mongodb-quickstart-course/src/starter_code_snake_bnb/src/infrastructure/state.py
|
Mujtaba-Biyabani/Research
|
211f57812786a151ce8c3b1c3ed379fd1ba4e2f9
|
[
"Unlicense"
] | 125
|
2018-11-20T07:56:22.000Z
|
2022-03-16T06:32:42.000Z
|
active_account = None
def reload_account():
global active_account
if not active_account:
return
# TODO: pull owner account from the database.
pass
| 15.818182
| 49
| 0.683908
| 22
| 174
| 5.227273
| 0.727273
| 0.33913
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.270115
| 174
| 10
| 50
| 17.4
| 0.905512
| 0.247126
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1
| 0
| 1
| 0.166667
| false
| 0.166667
| 0
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
26ab3cad8e013a6c3ea0f8a7d1ac3f6bf89a579f
| 24,208
|
py
|
Python
|
tests/core/inst_utils.py
|
cornell-brg/lizard
|
7f9a78a913e64b5cfdee3a26223539ad225bd6da
|
[
"BSD-3-Clause"
] | 50
|
2019-05-22T08:43:15.000Z
|
2022-03-21T23:58:50.000Z
|
tests/core/inst_utils.py
|
cornell-brg/lizard
|
7f9a78a913e64b5cfdee3a26223539ad225bd6da
|
[
"BSD-3-Clause"
] | 1
|
2019-07-27T18:51:52.000Z
|
2019-08-02T01:20:22.000Z
|
tests/core/inst_utils.py
|
cornell-brg/lizard
|
7f9a78a913e64b5cfdee3a26223539ad225bd6da
|
[
"BSD-3-Clause"
] | 11
|
2019-12-26T06:00:48.000Z
|
2022-03-27T02:29:35.000Z
|
#=========================================================================
# inst_utils
#=========================================================================
# Includes helper functions to simplify creating assembly tests.
from pymtl import *
from tests.context import lizard
#-------------------------------------------------------------------------
# print_asm
#-------------------------------------------------------------------------
# Pretty print a generated assembly syntax
def print_asm(asm_code):
# If asm_code is a single string, then put it in a list to simplify the
# rest of the logic.
asm_code_list = asm_code
if isinstance(asm_code, str):
asm_code_list = [asm_code]
# Create a single list of lines
asm_list = []
for asm_seq in asm_code_list:
asm_list.extend(asm_seq.splitlines())
# Print the assembly. Remove duplicate blank lines.
prev_blank_line = False
for asm in asm_list:
if asm.strip() == "":
if not prev_blank_line:
print asm
prev_blank_line = True
else:
prev_blank_line = False
print asm
#-------------------------------------------------------------------------
# gen_nops
#-------------------------------------------------------------------------
def gen_nops(num_nops):
if num_nops > 0:
return "nop\n" + (" nop\n" * (num_nops - 1))
else:
return ""
#-------------------------------------------------------------------------
# gen_word_data
#-------------------------------------------------------------------------
def gen_word_data(data_list):
data_str = ".data\n"
for data in data_list:
data_str += ".word {}\n".format(data)
return data_str
#-------------------------------------------------------------------------
# gen_hword_data
#-------------------------------------------------------------------------
def gen_hword_data(data_list):
data_str = ".data\n"
for data in data_list:
data_str += ".hword {}\n".format(data)
return data_str
#-------------------------------------------------------------------------
# gen_byte_data
#-------------------------------------------------------------------------
def gen_byte_data(data_list):
data_str = ".data\n"
for data in data_list:
data_str += ".byte {}\n".format(data)
return data_str
#-------------------------------------------------------------------------
# gen_rr_src01_template
#-------------------------------------------------------------------------
# Template for register-register instructions. We first write src0
# register and then write the src1 register before executing the
# instruction under test. We parameterize the number of nops after
# writing both src registers and the instruction under test to enable
# using this template for testing various bypass paths. We also
# parameterize the register specifiers to enable using this template to
# test situations where the srce registers are equal and/or equal the
# destination register.
def gen_rr_src01_template(num_nops_src0, num_nops_src1, num_nops_dest, reg_src0,
reg_src1, inst, src0, src1, result):
return """
# Move src0 value into register
csrr {reg_src0}, mngr2proc < {src0}
{nops_src0}
# Move src1 value into register
csrr {reg_src1}, mngr2proc < {src1}
{nops_src1}
# Instruction under test
{inst} x3, {reg_src0}, {reg_src1}
{nops_dest}
# Check the result
csrw proc2mngr, x3 > {result}
""".format(
nops_src0=gen_nops(num_nops_src0),
nops_src1=gen_nops(num_nops_src1),
nops_dest=gen_nops(num_nops_dest),
**locals())
#-------------------------------------------------------------------------
# gen_rr_src10_template
#-------------------------------------------------------------------------
# Similar to the above template, except that we reverse the order in
# which we write the two src registers.
def gen_rr_src10_template(num_nops_src0, num_nops_src1, num_nops_dest, reg_src0,
reg_src1, inst, src0, src1, result):
return """
# Move src1 value into register
csrr {reg_src1}, mngr2proc < {src1}
{nops_src1}
# Move src0 value into register
csrr {reg_src0}, mngr2proc < {src0}
{nops_src0}
# Instruction under test
{inst} x3, {reg_src0}, {reg_src1}
{nops_dest}
# Check the result
csrw proc2mngr, x3 > {result}
""".format(
nops_src0=gen_nops(num_nops_src0),
nops_src1=gen_nops(num_nops_src1),
nops_dest=gen_nops(num_nops_dest),
**locals())
#-------------------------------------------------------------------------
# gen_rr_dest_dep_test
#-------------------------------------------------------------------------
# Test the destination bypass path by varying how many nops are
# inserted between the instruction under test and reading the destination
# register with a csrr instruction.
def gen_rr_dest_dep_test(num_nops, inst, src0, src1, result):
return gen_rr_src01_template(0, 8, num_nops, "x1", "x2", inst, src0, src1,
result)
#-------------------------------------------------------------------------
# gen_rr_src1_dep_test
#-------------------------------------------------------------------------
# Test the source 1 bypass paths by varying how many nops are inserted
# between writing the src1 register and reading this register in the
# instruction under test.
def gen_rr_src1_dep_test(num_nops, inst, src0, src1, result):
return gen_rr_src01_template(8 - num_nops, num_nops, 0, "x1", "x2", inst,
src0, src1, result)
#-------------------------------------------------------------------------
# gen_rr_src0_dep_test
#-------------------------------------------------------------------------
# Test the source 0 bypass paths by varying how many nops are inserted
# between writing the src0 register and reading this register in the
# instruction under test.
def gen_rr_src0_dep_test(num_nops, inst, src0, src1, result):
return gen_rr_src10_template(num_nops, 8 - num_nops, 0, "x1", "x2", inst,
src0, src1, result)
#-------------------------------------------------------------------------
# gen_rr_srcs_dep_test
#-------------------------------------------------------------------------
# Test both source bypass paths at the same time by varying how many nops
# are inserted between writing both src registers and reading both
# registers in the instruction under test.
def gen_rr_srcs_dep_test(num_nops, inst, src0, src1, result):
return gen_rr_src01_template(0, num_nops, 0, "x1", "x2", inst, src0, src1,
result)
#-------------------------------------------------------------------------
# gen_rr_src0_eq_dest_test
#-------------------------------------------------------------------------
# Test situation where the src0 register specifier is the same as the
# destination register specifier.
def gen_rr_src0_eq_dest_test(inst, src0, src1, result):
return gen_rr_src01_template(0, 0, 0, "x3", "x2", inst, src0, src1, result)
#-------------------------------------------------------------------------
# gen_rr_src1_eq_dest_test
#-------------------------------------------------------------------------
# Test situation where the src1 register specifier is the same as the
# destination register specifier.
def gen_rr_src1_eq_dest_test(inst, src0, src1, result):
return gen_rr_src01_template(0, 0, 0, "x1", "x3", inst, src0, src1, result)
#-------------------------------------------------------------------------
# gen_rr_src0_eq_src1_test
#-------------------------------------------------------------------------
# Test situation where the src register specifiers are the same.
def gen_rr_src0_eq_src1_test(inst, src, result):
return gen_rr_src01_template(0, 0, 0, "x1", "x1", inst, src, src, result)
#-------------------------------------------------------------------------
# gen_rr_srcs_eq_dest_test
#-------------------------------------------------------------------------
# Test situation where all three register specifiers are the same.
def gen_rr_srcs_eq_dest_test(inst, src, result):
return gen_rr_src01_template(0, 0, 0, "x3", "x3", inst, src, src, result)
#-------------------------------------------------------------------------
# gen_rr_value_test
#-------------------------------------------------------------------------
# Test the actual operation of a register-register instruction under
# test. We assume that bypassing has already been tested.
def gen_rr_value_test(inst, src0, src1, result):
return gen_rr_src01_template(0, 0, 0, "x1", "x2", inst, src0, src1, result)
#-------------------------------------------------------------------------
# gen_rimm_template
#-------------------------------------------------------------------------
# Template for register-immediate instructions. We first write the src
# register before executing the instruction under test. We parameterize
# the number of nops after writing the src register and the instruction
# under test to enable using this template for testing various bypass
# paths. We also parameterize the register specifiers to enable using
# this template to test situations where the srce registers are equal
# and/or equal the destination register.
def gen_rimm_template(num_nops_src, num_nops_dest, reg_src, inst, src, imm,
result):
return """
# Move src value into register
csrr {reg_src}, mngr2proc < {src}
{nops_src}
# Instruction under test
{inst} x3, {reg_src}, {imm}
{nops_dest}
# Check the result
csrw proc2mngr, x3 > {result}
""".format(
nops_src=gen_nops(num_nops_src),
nops_dest=gen_nops(num_nops_dest),
**locals())
#-------------------------------------------------------------------------
# gen_rimm_dest_dep_test
#-------------------------------------------------------------------------
# Test the destination bypass path by varying how many nops are
# inserted between the instruction under test and reading the destination
# register with a csrr instruction.
def gen_rimm_dest_dep_test(num_nops, inst, src, imm, result):
return gen_rimm_template(8, num_nops, "x1", inst, src, imm, result)
#-------------------------------------------------------------------------
# gen_rimm_src_dep_test
#-------------------------------------------------------------------------
# Test the source bypass paths by varying how many nops are inserted
# between writing the src register and reading this register in the
# instruction under test.
def gen_rimm_src_dep_test(num_nops, inst, src, imm, result):
return gen_rimm_template(num_nops, 0, "x1", inst, src, imm, result)
#-------------------------------------------------------------------------
# gen_rimm_src_eq_dest_test
#-------------------------------------------------------------------------
# Test situation where the src register specifier is the same as the
# destination register specifier.
def gen_rimm_src_eq_dest_test(inst, src, imm, result):
return gen_rimm_template(0, 0, "x3", inst, src, imm, result)
#-------------------------------------------------------------------------
# gen_rimm_value_test
#-------------------------------------------------------------------------
# Test the actual operation of a register-immediate instruction under
# test. We assume that bypassing has already been tested.
def gen_rimm_value_test(inst, src, imm, result):
return gen_rimm_template(0, 0, "x1", inst, src, imm, result)
#-------------------------------------------------------------------------
# gen_imm_template
#-------------------------------------------------------------------------
# Template for immediate instructions. We parameterize the number of nops
# after the instruction under test to enable using this template for
# testing various bypass paths.
def gen_imm_template(num_nops_dest, inst, imm, result):
return """
# Instruction under test
{inst} x3, {imm}
{nops_dest}
# Check the result
csrw proc2mngr, x3 > {result}
""".format(
nops_dest=gen_nops(num_nops_dest), **locals())
#-------------------------------------------------------------------------
# gen_imm_dest_dep_test
#-------------------------------------------------------------------------
# Test the destination bypass path by varying how many nops are
# inserted between the instruction under test and reading the destination
# register with a csrr instruction.
def gen_imm_dest_dep_test(num_nops, inst, imm, result):
return gen_imm_template(num_nops, inst, imm, result)
#-------------------------------------------------------------------------
# gen_imm_value_test
#-------------------------------------------------------------------------
# Test the actual operation of an immediate instruction under test. We
# assume that bypassing has already been tested.
def gen_imm_value_test(inst, imm, result):
return gen_imm_template(0, inst, imm, result)
#-------------------------------------------------------------------------
# gen_br2_template
#-------------------------------------------------------------------------
# Template for branch instructions with two sources. We test two forward
# branches and one backwards branch. The way we actually do the test is
# we update a register to reflect the control flow; certain bits in this
# register are set at different points in the program. Then we can check
# the control flow bits at the end to see if only the bits we expect are
# set (i.e., the program only executed those points that we expect). Note
# that test also makes sure that the instruction in the branch delay slot
# is _not_ executed.
# We currently need the id to create labels unique to this test. We might
# eventually allow local labels (e.g., 1f, 1b) as in gas.
gen_br2_template_id = 0
def gen_br2_template(num_nops_src0, num_nops_src1, reg_src0, reg_src1, inst,
src0, src1, taken):
# Determine the expected control flow pattern
if taken:
control_flow_pattern = 0b101010
else:
control_flow_pattern = 0b111111
# Create unique labels
global gen_br2_template_id
id_a = "label_{}".format(gen_br2_template_id + 1)
id_b = "label_{}".format(gen_br2_template_id + 2)
id_c = "label_{}".format(gen_br2_template_id + 3)
gen_br2_template_id += 3
return """
# x3 will track the control flow pattern
addi x3, x0, 0
# Move src0 value into register
csrr {reg_src0}, mngr2proc < {src0}
{nops_src0}
# Move src1 value into register
csrr {reg_src1}, mngr2proc < {src1}
{nops_src1}
{inst} {reg_src0}, {reg_src1}, {id_a} # br -.
addi x3, x3, 0b000001 # |
# |
{id_b}: # <---+-.
addi x3, x3, 0b000010 # | |
# | |
{inst} {reg_src0}, {reg_src1}, {id_c} # br -+-+-.
addi x3, x3, 0b000100 # | | |
# | | |
{id_a}: # <---' | |
addi x3, x3, 0b001000 # | |
# | |
{inst} {reg_src0}, {reg_src1}, {id_b} # br ---' |
addi x3, x3, 0b010000 # |
# |
{id_c}: # <-------'
addi x3, x3, 0b100000 #
# Check the control flow pattern
csrw proc2mngr, x3 > {control_flow_pattern}
""".format(
nops_src0=gen_nops(num_nops_src0),
nops_src1=gen_nops(num_nops_src1),
**locals())
#-------------------------------------------------------------------------
# gen_br2_src1_dep_test
#-------------------------------------------------------------------------
# Test the source 1 bypass paths by varying how many nops are inserted
# between writing the src1 register and reading this register in the
# instruction under test.
def gen_br2_src1_dep_test(num_nops, inst, src0, src1, taken):
return gen_br2_template(8 - num_nops, num_nops, "x1", "x2", inst, src0, src1,
taken)
#-------------------------------------------------------------------------
# gen_br2_src0_dep_test
#-------------------------------------------------------------------------
# Test the source 0 bypass paths by varying how many nops are inserted
# between writing the src0 register and reading this register in the
# instruction under test.
def gen_br2_src0_dep_test(num_nops, inst, src0, src1, result):
return gen_br2_template(num_nops, 0, "x1", "x2", inst, src0, src1, result)
#-------------------------------------------------------------------------
# gen_br2_srcs_dep_test
#-------------------------------------------------------------------------
# Test both source bypass paths at the same time by varying how many nops
# are inserted between writing both src registers and reading both
# registers in the instruction under test.
def gen_br2_srcs_dep_test(num_nops, inst, src0, src1, result):
return gen_br2_template(0, num_nops, "x1", "x2", inst, src0, src1, result)
#-------------------------------------------------------------------------
# gen_br2_src0_eq_src1_test
#-------------------------------------------------------------------------
# Test situation where the src register specifiers are the same.
def gen_br2_src0_eq_src1_test(inst, src, result):
return gen_br2_template(0, 0, "x1", "x1", inst, src, src, result)
#-------------------------------------------------------------------------
# gen_br2_value_test
#-------------------------------------------------------------------------
# Test the correct branch resolution based on various source values.
def gen_br2_value_test(inst, src0, src1, taken):
return gen_br2_template(0, 0, "x1", "x2", inst, src0, src1, taken)
# ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
gen_jal_template_id = 0
def gen_jal_dest_dep_test(num_nops_dest):
global gen_jal_template_id
id_a = "label_{}".format(gen_jal_template_id + 1)
gen_jal_template_id += 1
return """
# Use r3 to track the control flow pattern
addi x3, x0, 0 # 0x0200
jal x1, {id_a} # 0x0204
addi x3, x3, 0b01 # 0x0208
{nops_dest}
{id_a}:
# Check the link address
csrw proc2mngr, x1 > 0x0208
addi x3, x3, 0b10
# Only the second bit should be set if jump was taken
csrw proc2mngr, x3 > 0b10
""".format(
nops_dest=gen_nops(num_nops_dest), **locals())
#-------------------------------------------------------------------------
# gen_ld_template
#-------------------------------------------------------------------------
# Template for load instructions. We first write the base register before
# executing the instruction under test. We parameterize the number of
# nops after writing the base register and the instruction under test to
# enable using this template for testing various bypass paths. We also
# parameterize the register specifiers to enable using this template to
# test situations where the base register is equal to the destination
# register.
def gen_ld_template(num_nops_base, num_nops_dest, reg_base, inst, offset, base,
result):
return """
# Move base value into register
csrr {reg_base}, mngr2proc < {base}
{nops_base}
# Instruction under test
{inst} x3, {offset}({reg_base})
{nops_dest}
# Check the result
csrw proc2mngr, x3 > {result}
""".format(
nops_base=gen_nops(num_nops_base),
nops_dest=gen_nops(num_nops_dest),
**locals())
#-------------------------------------------------------------------------
# gen_ld_dest_dep_test
#-------------------------------------------------------------------------
# Test the destination bypass path by varying how many nops are
# inserted between the instruction under test and reading the destination
# register with a csrr instruction.
def gen_ld_dest_dep_test(num_nops, inst, base, result):
return gen_ld_template(8, num_nops, "x1", inst, 0, base, result)
#-------------------------------------------------------------------------
# gen_ld_base_dep_test
#-------------------------------------------------------------------------
# Test the base register bypass paths by varying how many nops are
# inserted between writing the base register and reading this register in
# the instruction under test.
def gen_ld_base_dep_test(num_nops, inst, base, result):
return gen_ld_template(num_nops, 0, "x1", inst, 0, base, result)
#-------------------------------------------------------------------------
# gen_ld_base_eq_dest_test
#-------------------------------------------------------------------------
# Test situation where the base register specifier is the same as the
# destination register specifier.
def gen_ld_base_eq_dest_test(inst, base, result):
return gen_ld_template(0, 0, "x3", inst, 0, base, result)
#-------------------------------------------------------------------------
# gen_ld_value_test
#-------------------------------------------------------------------------
# Test the actual operation of a register-register instruction under
# test. We assume that bypassing has already been tested.
def gen_ld_value_test(inst, offset, base, result):
return gen_ld_template(0, 0, "x1", inst, offset, base, result)
# ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
def sum_i(i):
if i <= 0:
return 0
ret = 0
for j in range(0, i + 1):
ret += j
return ret
#-------------------------------------------------------------------------
# gen_st_template
#-------------------------------------------------------------------------
# Template for load instructions. We first write the base register before
# executing the instruction under test. We parameterize the number of
# nops after writing the base register and the instruction under test to
# enable using this template for testing various bypass paths. We also
# parameterize the register specifiers to enable using this template to
# test situations where the base register is equal to the destination
# register.
def gen_st_base_data_template(num_nops_data, num_nops_dest, reg_base, reg_data,
inst, offset, base, data):
return """
# Move base value into register
csrr {reg_base}, mngr2proc < {base}
csrr {reg_data}, mngr2proc < {data}
{nops_data}
# Instruction under test
{inst} {reg_data}, {offset}({reg_base})
{nops_dest}
# Check the result
lwu x3, {offset}({reg_base})
csrw proc2mngr, x3 > {data}
""".format(
nops_data=gen_nops(num_nops_data),
nops_dest=gen_nops(num_nops_dest),
**locals())
def gen_st_data_base_template(num_nops_base, num_nops_dest, reg_base, reg_data,
inst, offset, base, data):
return """
# Move base value into register
csrr {reg_data}, mngr2proc < {data}
csrr {reg_base}, mngr2proc < {base}
{nops_base}
# Instruction under test
{inst} {reg_data}, {offset}({reg_base})
{nops_dest}
# Check the result
lwu x3, {offset}({reg_base})
csrw proc2mngr, x3 > {data}
""".format(
nops_base=gen_nops(num_nops_base),
nops_dest=gen_nops(num_nops_dest),
**locals())
# test dependency in load of same address as store
def gen_st_dest_dep_test(num_nops, inst, base, data):
return gen_st_base_data_template(8, num_nops, "x1", "x2", inst, 0, base, data)
def gen_st_base_dep_test(num_nops, inst, base, data):
return gen_st_data_base_template(num_nops, 8, "x1", "x2", inst, 0, base, data)
def gen_st_data_dep_test(num_nops, inst, base, data):
return gen_st_base_data_template(num_nops, 8, "x1", "x2", inst, 0, base, data)
def gen_st_base_eq_data_test(inst, base, data):
return gen_st_base_data_template(0, 0, "x1", "x1", inst, 0, base, data)
def gen_st_value_test(inst, offset, base, data):
return gen_st_base_data_template(0, 0, "x1", "x2", inst, offset, base, data)
| 33.207133
| 80
| 0.527801
| 2,815
| 24,208
| 4.307993
| 0.094849
| 0.04156
| 0.052775
| 0.039828
| 0.799621
| 0.757153
| 0.722108
| 0.670817
| 0.634617
| 0.604684
| 0
| 0.022921
| 0.17457
| 24,208
| 728
| 81
| 33.252747
| 0.583976
| 0.51673
| 0
| 0.475177
| 0
| 0
| 0.322035
| 0.001917
| 0
| 0
| 0.002091
| 0
| 0
| 0
| null | null | 0
| 0.007092
| null | null | 0.010638
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
26b0dec6991fd98013cf8dc45f05ed08b2f7cb49
| 479
|
py
|
Python
|
hooks/relations/juju-info/requires.py
|
xenefix/RoutingPolicyRule
|
fb0c815c3fc049f63491a3ca56416c8ba0fe692c
|
[
"Apache-2.0"
] | null | null | null |
hooks/relations/juju-info/requires.py
|
xenefix/RoutingPolicyRule
|
fb0c815c3fc049f63491a3ca56416c8ba0fe692c
|
[
"Apache-2.0"
] | null | null | null |
hooks/relations/juju-info/requires.py
|
xenefix/RoutingPolicyRule
|
fb0c815c3fc049f63491a3ca56416c8ba0fe692c
|
[
"Apache-2.0"
] | null | null | null |
from charms.reactive import RelationBase
from charms.reactive import scopes
from charms.reactive import hook
from charms.reactive import when
class TestRelation(RelationBase):
scope = scopes.GLOBAL
@hook('{requires:test}-relation-joined')
def joined(self):
self.set_state('{relation_name}.ready')
@when('juju-info.ready')
def test(self):
self.set_local('call_count', self.get_local('call_count', 0) + 1)
self.set_state('relation')
| 26.611111
| 73
| 0.707724
| 63
| 479
| 5.269841
| 0.47619
| 0.120482
| 0.216867
| 0.289157
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005038
| 0.17119
| 479
| 17
| 74
| 28.176471
| 0.831234
| 0
| 0
| 0
| 0
| 0
| 0.19833
| 0.10856
| 0
| 0
| 0
| 0
| 0
| 1
| 0.153846
| false
| 0
| 0.307692
| 0
| 0.615385
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
26c624cf265c7c07d22297b36c515787f4a26b33
| 92
|
py
|
Python
|
proton_decay_study/config/__init__.py
|
HEP-DL/proton_decay_study
|
e7b087a123b893254401f897100f656588bf0c19
|
[
"MIT"
] | 2
|
2018-01-02T02:58:50.000Z
|
2021-11-17T07:26:25.000Z
|
proton_decay_study/config/__init__.py
|
HEP-DL/proton_decay_study
|
e7b087a123b893254401f897100f656588bf0c19
|
[
"MIT"
] | 415
|
2017-04-27T21:16:01.000Z
|
2022-03-27T23:01:21.000Z
|
proton_decay_study/config/__init__.py
|
HEP-DL/proton_decay_study
|
e7b087a123b893254401f897100f656588bf0c19
|
[
"MIT"
] | 2
|
2018-01-03T18:38:45.000Z
|
2019-10-03T19:27:29.000Z
|
class Config(object):
"""
Represents configuration of network training
"""
pass
| 11.5
| 48
| 0.663043
| 9
| 92
| 6.777778
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.23913
| 92
| 7
| 49
| 13.142857
| 0.871429
| 0.478261
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
26d8feef12cddd2dca60e0f08ac5f863599108a2
| 1,213
|
py
|
Python
|
analysis/hist_javelin.py
|
LiyrAstroph/MICA
|
2592b8ad3011880898f557a69b22cad63fcd47e0
|
[
"MIT"
] | 1
|
2016-10-25T06:32:33.000Z
|
2016-10-25T06:32:33.000Z
|
analysis/hist_javelin.py
|
LiyrAstroph/MICA
|
2592b8ad3011880898f557a69b22cad63fcd47e0
|
[
"MIT"
] | null | null | null |
analysis/hist_javelin.py
|
LiyrAstroph/MICA
|
2592b8ad3011880898f557a69b22cad63fcd47e0
|
[
"MIT"
] | 3
|
2016-12-29T06:04:13.000Z
|
2020-04-12T11:48:42.000Z
|
import numpy as np
import matplotlib.pyplot as plt
import corner
mcmc = np.loadtxt("mychain1.dat")
ntheta = mcmc.shape[1]
fig = plt.figure(1, figsize=(15, 6))
ax = fig.add_subplot(231)
ax.hist(mcmc[:, 0]/np.log(10.0), 100, normed=True, range=(-0.9, -0.1))
ax = fig.add_subplot(232)
ax.hist(mcmc[:, 1]/np.log(10.0), 100, normed=True, range=(0.0, 2.0))
ax = fig.add_subplot(234)
ax.hist(mcmc[:, 2], 100, normed=True, range=(1.0, 2.8))
ax = fig.add_subplot(235)
ax.hist(mcmc[:, 3], 100, normed=True, range=(0.0, 1.2))
ax = fig.add_subplot(236)
ax.hist(mcmc[:, 4], 100, normed=True, range=(5, 13))
mcmc = np.loadtxt("../data/mcmc.txt")
ntheta = mcmc.shape[1]
nb = 20000
fig = plt.figure(2, figsize=(15, 6))
ax = fig.add_subplot(231)
ax.hist( (mcmc[nb:, 1]+0.5*mcmc[nb:, 2]-0.5*np.log(2.0))/np.log(10.0), 100, normed=True, range=(-0.9, -0.1))
ax = fig.add_subplot(232)
ax.hist(mcmc[nb:, 2]/np.log(10), 100, normed=True, range=(0.0, 2.0))
ax = fig.add_subplot(234)
ax.hist(mcmc[nb:, 5], 100, normed=True, range=(1.0, 2.8))
ax = fig.add_subplot(235)
ax.hist(mcmc[nb:, 3], 100, normed=True, range=(0.0, 1.2))
ax = fig.add_subplot(236)
ax.hist(mcmc[nb:, 4], 100, normed=True, range=(5, 13))
plt.show()
| 24.26
| 108
| 0.635614
| 245
| 1,213
| 3.106122
| 0.195918
| 0.065703
| 0.105125
| 0.197109
| 0.720105
| 0.720105
| 0.720105
| 0.662286
| 0.662286
| 0.651774
| 0
| 0.133333
| 0.122012
| 1,213
| 49
| 109
| 24.755102
| 0.581221
| 0
| 0
| 0.387097
| 0
| 0
| 0.023083
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.096774
| 0
| 0.096774
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
26fd4d122991c7a14eaad9bffe766e315791616a
| 90
|
py
|
Python
|
root/ilikeit/MySQLCrashCourse/dbcom/tests/__init__.py
|
ChyiYaqing/chyidlTutorial
|
77e7f6f84f21537a58a8a8a42e31cf2e3dd31996
|
[
"MIT"
] | 5
|
2018-10-17T05:57:39.000Z
|
2021-07-05T15:38:24.000Z
|
root/ilikeit/MySQLCrashCourse/dbcom/tests/__init__.py
|
ChyiYaqing/chyidlTutorial
|
77e7f6f84f21537a58a8a8a42e31cf2e3dd31996
|
[
"MIT"
] | 2
|
2021-04-14T00:48:43.000Z
|
2021-04-14T02:20:50.000Z
|
root/ilikeit/MySQLCrashCourse/dbcom/tests/__init__.py
|
ChyiYaqing/chyidlTutorial
|
77e7f6f84f21537a58a8a8a42e31cf2e3dd31996
|
[
"MIT"
] | 3
|
2019-03-02T14:36:19.000Z
|
2022-03-18T10:12:09.000Z
|
#!/usr/bin/env python3
# -*- coding:utf-8 -*-
"""Requests test package initialisation."""
| 22.5
| 43
| 0.655556
| 11
| 90
| 5.363636
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.025
| 0.111111
| 90
| 4
| 43
| 22.5
| 0.7125
| 0.888889
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
f81ce517b53ccd795c4a506f2213bfeafa42c8e0
| 255
|
py
|
Python
|
django_selectel_storage/exceptions.py
|
Stuvros/django-selectel-storage
|
076f7e3c58d9391e2e7e27feb0526736d101c2b5
|
[
"MIT"
] | 27
|
2015-01-28T09:17:09.000Z
|
2021-06-21T20:48:01.000Z
|
django_selectel_storage/exceptions.py
|
Stuvros/django-selectel-storage
|
076f7e3c58d9391e2e7e27feb0526736d101c2b5
|
[
"MIT"
] | 9
|
2015-08-07T15:03:00.000Z
|
2020-05-01T04:54:02.000Z
|
django_selectel_storage/exceptions.py
|
Stuvros/django-selectel-storage
|
076f7e3c58d9391e2e7e27feb0526736d101c2b5
|
[
"MIT"
] | 19
|
2015-05-20T14:16:25.000Z
|
2022-03-31T06:31:59.000Z
|
class SelectelException(ValueError):
pass
class InvalidSchema(SelectelException):
pass
class EmptyUsername(SelectelException):
pass
class EmptyPassword(SelectelException):
pass
class EmptyContainerName(SelectelException):
pass
| 13.421053
| 44
| 0.772549
| 20
| 255
| 9.85
| 0.4
| 0.182741
| 0.395939
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.168627
| 255
| 18
| 45
| 14.166667
| 0.929245
| 0
| 0
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.6
| 0
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
f8459ec6a60f2e71cf7db3476a3460a08e1783eb
| 110
|
wsgi
|
Python
|
cryptovote/cryptovote.wsgi
|
cryptovoting/cryptovote
|
b236cf031a8f9dfa5cca54ff45003313275a0fc8
|
[
"MIT"
] | 8
|
2019-05-14T02:41:34.000Z
|
2021-11-25T08:07:22.000Z
|
cryptovote/cryptovote.wsgi
|
cryptovoting/cryptovote
|
b236cf031a8f9dfa5cca54ff45003313275a0fc8
|
[
"MIT"
] | null | null | null |
cryptovote/cryptovote.wsgi
|
cryptovoting/cryptovote
|
b236cf031a8f9dfa5cca54ff45003313275a0fc8
|
[
"MIT"
] | 2
|
2019-05-14T20:20:07.000Z
|
2021-11-25T08:07:24.000Z
|
# Used for deploying on Apache with mod_wsgi
from cryptovote.app import create_app
application = create_app()
| 27.5
| 44
| 0.818182
| 17
| 110
| 5.117647
| 0.823529
| 0.206897
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.136364
| 110
| 3
| 45
| 36.666667
| 0.915789
| 0.381818
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
f8675dfd4e125d168dde1ba9e29185bd73af107b
| 4,331
|
py
|
Python
|
writer/cashData/csvUtils.py
|
sifarone/gce_k8s_deployment
|
f596e17b9d0263ae24c61ebba9925af4719b4306
|
[
"MIT"
] | null | null | null |
writer/cashData/csvUtils.py
|
sifarone/gce_k8s_deployment
|
f596e17b9d0263ae24c61ebba9925af4719b4306
|
[
"MIT"
] | null | null | null |
writer/cashData/csvUtils.py
|
sifarone/gce_k8s_deployment
|
f596e17b9d0263ae24c61ebba9925af4719b4306
|
[
"MIT"
] | 1
|
2021-01-24T17:07:37.000Z
|
2021-01-24T17:07:37.000Z
|
import pandas as pd
from . import cashUtils as utils
class ReadStockBhavDataCSV:
def __init__(self, fileName):
self.df = pd.read_csv(fileName)
self.columns = self.df.columns
def getCSVColumnList(self):
return self.columns
def getStockFlatData(self):
'''
Returns a list of following dictionary corresponding to each row in the csv file
[
{
symbol : ,
date : ,
prevClose : ,
openPrice : ,
highPrice : ,
lowPrice : ,
lastPrice : ,
closePrice : ,
avgPrice : ,
ttlTrdQtnty : ,
turnoverLacs : ,
noOfTrades : ,
delivQty : ,
delivPer :
},
{},
{},
.
.
.
]
'''
# Nested function
def getDictFromRows(r):
rowDict = {
'symbol' : r[self.columns[utils.STOCK_COL_IDX['symbol']]],
'date' : r[self.columns[utils.STOCK_COL_IDX['date']]],
'prevClose' : r[self.columns[utils.STOCK_COL_IDX['prevClose']]],
'openPrice' : r[self.columns[utils.STOCK_COL_IDX['openPrice']]],
'highPrice' : r[self.columns[utils.STOCK_COL_IDX['highPrice']]],
'lowPrice' : r[self.columns[utils.STOCK_COL_IDX['lowPrice']]],
'lastPrice' : r[self.columns[utils.STOCK_COL_IDX['lastPrice']]],
'closePrice' : r[self.columns[utils.STOCK_COL_IDX['closePrice']]],
'avgPrice' : r[self.columns[utils.STOCK_COL_IDX['avgPrice']]],
'ttlTrdQtnty' : r[self.columns[utils.STOCK_COL_IDX['ttlTrdQtnty']]],
'turnoverLacs' : r[self.columns[utils.STOCK_COL_IDX['turnoverLacs']]],
'noOfTrades' : r[self.columns[utils.STOCK_COL_IDX['noOfTrades']]],
'delivQty' : r[self.columns[utils.STOCK_COL_IDX['delivQty']]],
'delivPer' : r[self.columns[utils.STOCK_COL_IDX['delivPer']]]
}
return rowDict
returnList = []
for index, row in self.df.iterrows():
rowDict = getDictFromRows(row)
returnList.append(rowDict)
return returnList
class ReadArchivedStockBhavDataCSV:
def __init__(self, fileName):
self.df = pd.read_csv(fileName)
self.columns = self.df.columns
def getCSVColumnList(self):
return self.columns
def getStockFlatData(self):
'''
Returns a list of following dictionary corresponding to each row in the csv file
[
{
symbol : ,
openPrice : ,
highPrice : ,
lowPrice : ,
closePrice : ,
lastPrice : ,
prevClose : ,
date :
},
{},
{},
.
.
.
]
'''
# Nested function
def getDictFromRows(r):
rowDict = {
'symbol' : r[self.columns[utils.STOCK_ARCHIVED_COL_IDX['symbol']]],
'date' : r[self.columns[utils.STOCK_ARCHIVED_COL_IDX['date']]],
'prevClose' : r[self.columns[utils.STOCK_ARCHIVED_COL_IDX['prevClose']]],
'openPrice' : r[self.columns[utils.STOCK_ARCHIVED_COL_IDX['openPrice']]],
'highPrice' : r[self.columns[utils.STOCK_ARCHIVED_COL_IDX['highPrice']]],
'lowPrice' : r[self.columns[utils.STOCK_ARCHIVED_COL_IDX['lowPrice']]],
'lastPrice' : r[self.columns[utils.STOCK_ARCHIVED_COL_IDX['lastPrice']]],
'closePrice' : r[self.columns[utils.STOCK_ARCHIVED_COL_IDX['closePrice']]]
}
return rowDict
returnList = []
for index, row in self.df.iterrows():
rowDict = getDictFromRows(row)
returnList.append(rowDict)
return returnList
| 36.091667
| 93
| 0.484184
| 365
| 4,331
| 5.575342
| 0.169863
| 0.140541
| 0.12973
| 0.183784
| 0.8
| 0.8
| 0.8
| 0.714496
| 0.680098
| 0.377396
| 0
| 0
| 0.406142
| 4,331
| 119
| 94
| 36.394958
| 0.791213
| 0.209651
| 0
| 0.5
| 0
| 0
| 0.121153
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.142857
| false
| 0
| 0.035714
| 0.035714
| 0.321429
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
f86d0468889ac52f5ce1040fe21e913a6db95f94
| 20,391
|
py
|
Python
|
pymatflow/abinit/post/bands.py
|
DeqiTang/pymatflow
|
bd8776feb40ecef0e6704ee898d9f42ded3b0186
|
[
"MIT"
] | 6
|
2020-03-06T16:13:08.000Z
|
2022-03-09T07:53:34.000Z
|
pymatflow/abinit/post/bands.py
|
DeqiTang/pymatflow
|
bd8776feb40ecef0e6704ee898d9f42ded3b0186
|
[
"MIT"
] | 1
|
2021-10-02T02:23:08.000Z
|
2021-11-08T13:29:37.000Z
|
pymatflow/abinit/post/bands.py
|
DeqiTang/pymatflow
|
bd8776feb40ecef0e6704ee898d9f42ded3b0186
|
[
"MIT"
] | 1
|
2021-07-10T16:28:14.000Z
|
2021-07-10T16:28:14.000Z
|
"""
post_bands:
post_bands extract data from static-o_DS3_EBANDS.agr and it will build
the kpoints length: xcoord_k from the high symmetry line and the corresponding
basis for reciprocal space.
b1 = 1 / a1, b2 = 1 / a2 and b3 = 1 / a3.
"""
import os
import numpy as np
import matplotlib.pyplot as plt
class PostBands:
def __init__(self):
pass
def get_xcoord_k(self, kpath, cell):
"""
Note:
xcoord_k is the x axis of the band structure plot
let's see how it is build from kpoints and the
crystal lattice or reciprocal lattice.
"""
self.kpath = kpath
self.xcoord_k = []
b1 = 1 / np.sqrt(cell[0][0]**2 + cell[0][1]**2 + cell[0][2]**2)
b2 = 1 / np.sqrt(cell[1][0]**2 + cell[1][1]**2 + cell[1][2]**2)
b3 = 1 / np.sqrt(cell[2][0]**2 + cell[2][1]**2 + cell[2][2]**2)
# actually you will find that in vasp b1=1/a1, b2=1/a2, b3=1/a3
V = np.dot(cell[0], np.cross(cell[1], cell[2]))
b1_vec = np.cross(cell[1], cell[2]) * 2 * np.pi / V
b2_vec = np.cross(cell[2], cell[0]) * 2 * np.pi / V
b3_vec = np.cross(cell[0], cell[1]) * 2 * np.pi / V
print("cell a:")
print("%f %f %f\n" % (cell[0][0], cell[0][1], cell[0][2]))
print("%f %f %f\n" % (cell[1][0], cell[1][1], cell[1][2]))
print("%f %f %f\n" % (cell[2][0], cell[2][1], cell[2][2]))
print("cell b:\n")
print("%f %f %f\n" % (b1_vec[0], b1_vec[1], b1_vec[2]))
print("%f %f %f\n" % (b2_vec[0], b2_vec[1], b2_vec[2]))
print("%f %f %f\n" % (b3_vec[0], b3_vec[1], b3_vec[2]))
self.xcoord_k.append(0.0000000)
for i in range(len(self.kpath) - 1):
# the step in the xcoord_k for each segment is different and it is actually
# the distance between the two high symmetry kpoint in unit of reciprocal coordinates
# divided by the conneciting number kpath[i][4]
if self.kpath[i][4] != "|":
#delta_b_1 = b1*(self.kpath[i+1][0] - self.kpath[i][0])
#delta_b_2 = b2*(self.kpath[i+1][1] - self.kpath[i][1])
#delta_b_3 = b3*(self.kpath[i+1][2] - self.kpath[i][2])
#step = np.sqrt(delta_b_1**2+delta_b_2**2+delta_b_3**2) / (self.kpath[i][4])
# the above way to calculate step is only applicable when
# b1 b2 b3 are perpendicular to each other so they are abandoned.
vec1 = self.kpath[i][0] * np.array(b1_vec) + self.kpath[i][1] * np.array(b2_vec) + self.kpath[i][2] * np.array(b3_vec)
vec2 = self.kpath[i+1][0] * np.array(b1_vec) + self.kpath[i+1][1] * np.array(b2_vec) + self.kpath[i+1][2] * np.array(b3_vec)
distance_in_b = np.linalg.norm(np.array(vec2)-np.array(vec1))
step = distance_in_b / (self.kpath[i][4])
for j in range(self.kpath[i][4]):
self.xcoord_k.append(self.xcoord_k[-1] + step)
else:
self.xcoord_k.append(self.xcoord_k[-1])
# label for plot
self.locs = []
self.labels_for_matplotlib = []
self.labels_for_gnuplot = []
self.locs.append(0.0000000)
nk = 0
print("%d\n" % nk)
for i in range(len(self.kpath)-1):
if self.kpath[i][4] != "|":
nk = nk + self.kpath[i][4]
self.locs.append(self.xcoord_k[nk])
print("%d\n" % nk)
else:
nk = nk + 1
self.labels_for_matplotlib.append(r"$%s$" % self.kpath[0][3].upper() if self.kpath[0][3].upper() != "GAMMA" else r"$\Gamma$")
self.labels_for_gnuplot.append("%s" % self.kpath[0][3].upper() if self.kpath[0][3].upper() != "GAMMA" else "{/symbol G}")
for i in range(1, len(self.kpath)):
if self.kpath[i-1][4] != "|":
self.labels_for_matplotlib.append(r"$%s$" % self.kpath[i][3].upper() if self.kpath[i][3].upper() != "GAMMA" else r"$\Gamma$")
self.labels_for_gnuplot.append("%s" % self.kpath[i][3].upper() if self.kpath[i][3].upper() != "GAMMA" else "{/symbol G}")
else:
self.labels_for_matplotlib[-1] = r"$%s | %s$" % (self.labels_for_matplotlib[-1].split("$")[1], self.kpath[i][3].upper())
self.labels_for_gnuplot[-1] = "%s | %s" % (self.labels_for_gnuplot[-1], self.kpath[i][3].upper())
def get_ebands_agr(self, filepath="static-o_DS3_EBANDS.agr"):
with open(filepath, 'r') as fin:
self.lines = fin.readlines()
# get the band energy
# in xxx_EBANDS.agr, energy are in unit of eV, and fermi energy are already shfited to 0
# first check the magnetic_status
for line in self.lines:
if len(line.split()) == 0:
continue
if line.split()[0] == "#" and line.split()[1] == "mband:":
self.mband = int(line.split()[2].split(",")[0])
self.nkpt = int(line.split()[4].split(",")[0])
self.nsppol = int(line.split()[6].split(",")[0])
self.nspinor = int(line.split()[8])
# get the eigenval (in agr, efermi is shfited to 0 already)
self.energies_agr = []
for i in range(len(self.lines)):
if len(self.lines[i].split()) == 0:
continue
if self.lines[i].split()[0] == "@type" and self.lines[i].split()[1].split("\n")[0] == "xy":
band = []
for j in range(self.nkpt):
band.append(float(self.lines[i+j+1].split()[1]))
self.energies_agr.append(band)
def _plot_band_matplotlib(self, bandrange=[0, 1.0]):
"""
:param bandrange:
a list of two values(between 0 and 1) defining the percentage
of bands to plot.
plotrange[0]: left boundary of the nth band to plot
plotrange[1]: right boundary of the nth band to plot
default is plotrange[0] = 0, plotrange[1], in which case
all the band available will be plot.
Be aware that the range if not for energy but for band number
:param imagebase: image file name(not full)
"""
if self.nsppol == 1:
band_min = int(bandrange[0] * self.mband)
band_max = int(bandrange[1] * self.mband)
for i in range(band_min, band_max, 1):
plt.plot(self.xcoord_k, self.energies_agr[i], color='blue', linewidth=1)
plt.xticks(self.locs, self.labels_for_matplotlib)
plt.title("Band Structure")
plt.xlabel("K")
plt.ylabel("Energy(eV)")
plt.grid(b=True, which='major')
plt.savefig("band-structure-spin-unpolarized.png")
if self.nsppol == 2:
# half of self.energies_agr are spin up, and half are spin down
band_min = int(bandrange[0] * self.mband)
band_max = int(bandrange[1] * self.mband)
# spin up
for i in range(band_min, band_max, 1):
plt.plot(self.xcoord_k, self.energies_agr[i])
plt.title("Band Structure(Spin Up)")
plt.xlabel("K")
plt.ylabel("Energy(eV)")
plt.xticks(self.locs, self.labels_for_matplotlib)
plt.grid(b=True, which='major')
plt.savefig("band-structure-spin-polarized-1.png")
plt.close()
# spin down
for i in range(int(band_min+self.mband), int(band_max+self.mband), 1):
plt.plot(self.xcoord_k, self.energies_agr[i])
plt.title("Band Structure(Spin Down)")
plt.xlabel("K")
plt.ylabel("Energy(eV)")
plt.xticks(self.locs, self.labels_for_matplotlib)
plt.grid(b=True, which='major')
plt.savefig("band-structure-spin-polarized-2.png")
plt.close()
# all in one picture
for i in range(band_min, band_max, 1):
plt.plot(self.xcoord_k, self.energies_agr[i], color="blue", linewidth=1)
for i in range(int(band_min+self.mband), int(band_max+self.mband), 1):
plt.plot(self.xcoord_k, self.energies_agr[i], color="red", linewidth=1)
plt.title("Band Structure(Spin Up&Down)")
plt.xlabel("K")
plt.ylabel("Energy(eV)")
plt.xticks(self.locs, self.labels_for_matplotlib)
plt.grid(b=True, which='major')
plt.savefig("band-structure-spin-polarized-all.png")
plt.close()
def _plot_band_gnuplot(self, bandrange=[0, 1.0]):
"""
:param bandrange:
a list of two values(between 0 and 1) defining the percentage
of bands to plot.
plotrange[0]: left boundary of the nth band to plot
plotrange[1]: right boundary of the nth band to plot
default is plotrange[0] = 0, plotrange[1], in which case
all the band available will be plot.
Be aware that the range if not for energy but for band number
:param imagebase: image file name(not full)
"""
if self.nsppol == 1:
band_min = int(bandrange[0] * self.mband)
band_max = int(bandrange[1] * self.mband)
with open("all-bands-spin-unpolarized.data", 'w') as fout:
fout.write("# band structure extracted from xxx_EBANDS.agr\n")
fout.write("# efermi shfited to 0 already\n")
for i in range(self.mband):
for j in range(len(self.xcoord_k)):
fout.write("%f %f\n" % (self.xcoord_k[j], self.energies_agr[i][j]))
fout.write("\n")
with open("specified-bands-spin-unpolarized.data", 'w') as fout:
fout.write("# band structure extracted from ***_EBANDS.agr\n")
fout.write("# efermi shifted to 0 already\n")
for i in range(band_min, band_max, 1):
for j in range(len(self.xcoord_k)):
fout.write("%f %f\n" % (self.xcoord_k[j], self.energies_agr[i][j]))
fout.write("\n")
with open("all-bands-spin-unpolarized.gnuplot", 'w') as fout:
fout.write("set terminal gif\n")
fout.write("set output 'all-bands-spin-unpolarized.gif'\n")
fout.write("unset key\n")
fout.write("set parametric\n")
fout.write("set title 'Band Structure'\n")
fout.write("set xlabel 'K'\n")
fout.write("set ylabel 'Energy(eV)'\n")
fout.write("set xtics(")
for i in range(len(self.labels_for_gnuplot)-1):
fout.write("'%s' %f, " % (self.labels_for_gnuplot[i], self.locs[i]))
fout.write("'%s' %f)\n" % (self.labels_for_gnuplot[-1], self.locs[-1]))
fout.write("set grid xtics ytics\n")
fout.write("set autoscale\n")
fout.write("plot 'all-bands-spin-unpolarized.data' using 1:2 w l\n")
os.system("gnuplot all-bands-spin-unpolarized.gnuplot")
with open("specified-bands-spin-unpolarized.gnuplot", 'w') as fout:
fout.write("set terminal gif\n")
fout.write("set output 'specified-bands-spin-unpolarized.gif'\n")
fout.write("unset key\n")
fout.write("set parametric\n")
fout.write("set title 'Band Structure'\n")
fout.write("set xlabel 'K'\n")
fout.write("set ylabel 'Energy(eV)'\n")
fout.write("set xtics(")
for i in range(len(self.labels_for_gnuplot)-1):
fout.write("'%s' %f, " % (self.labels_for_gnuplot[i], self.locs[i]))
fout.write("'%s' %f)\n" % (self.labels_for_gnuplot[-1], self.locs[-1]))
fout.write("set grid xtics ytics\n")
fout.write("set autoscale\n")
fout.write("plot 'specified-bands-spin-unpolarized.data' using 1:2 w l\n")
os.system("gnuplot specified-bands-spin-unpolarized.gnuplot")
if self.nsppol == 2:
band_min = int(bandrange[0] * self.mband)
band_max = int(bandrange[1] * self.mband)
with open("all-bands-spin-polarized-spin-1.data", 'w') as fout:
fout.write("# band structure extracted from xxx_EBANDS.agr\n")
fout.write("# efermi shfited to 0 already\n")
for i in range(self.mband):
for j in range(len(self.xcoord_k)):
fout.write("%f %f\n" % (self.xcoord_k[j], self.energies_agr[i][j]))
fout.write("\n")
with open("all-bands-spin-polarized-spin-2.data", 'w') as fout:
fout.write("# band structure extracted from xxx_EBANDS.agr\n")
fout.write("# efermi shifted to 0 already\n")
for i in range(self.mband):
for j in range(len(self.xcoord_k)):
fout.write("%f %f\n" % (self.xcoord_k[j], self.energies_agr[self.mband+i][j]))
fout.write("\n")
with open("specified-bands-spin-polarized-spin-1.data", 'w') as fout:
fout.write("# band structure extracted from xxx_EBANDS.agr\n")
fout.write("# efermi shifted to 0 already\n")
for i in range(band_min, band_max, 1):
for j in range(len(self.xcoord_k)):
fout.write("%f %f\n" % (self.xcoord_k[j], self.energies_agr[i][j]))
fout.write("\n")
with open("specified-bands-spin-polarized-spin-2.data", 'w') as fout:
fout.write("# band structure extracted from xxx_EBANDS.agr\n")
fout.write("# efermi shifted to 0 already\n")
for i in range(band_min, band_max, 1):
for j in range(len(self.xcoord_k)):
fout.write("%f %f\n" % (self.xcoord_k[j], self.energies_agr[self.mband+i][j]))
fout.write("\n")
with open("all-bands-spin-polarized-spin-1.gnuplot", 'w') as fout:
fout.write("set terminal gif\n")
fout.write("set output 'all-bands-spin-polarized-spin-1.gif'\n")
fout.write("unset key\n")
fout.write("set parametric\n")
fout.write("set title 'Band Structure'\n")
fout.write("set xlabel 'K'\n")
fout.write("set ylabel 'Energy(eV)'\n")
fout.write("set xtics(")
for i in range(len(self.labels_for_gnuplot)-1):
fout.write("'%s' %f, " % (self.labels_for_gnuplot[i], self.locs[i]))
fout.write("'%s' %f)\n" % (self.labels_for_gnuplot[-1], self.locs[-1]))
fout.write("set grid xtics ytics\n")
fout.write("set autoscale\n")
fout.write("plot 'all-bands-spin-polarized-spin-1.data' using 1:2 w l\n")
os.system("gnuplot all-bands-spin-polarized-spin-1.gnuplot")
with open("all-bands-spin-polarized-spin-2.gnuplot", 'w') as fout:
fout.write("set terminal gif\n")
fout.write("set output 'all-bands-spin-polarized-spin-2.gif'\n")
fout.write("unset key\n")
fout.write("set parametric\n")
fout.write("set title 'Band Structure'\n")
fout.write("set xlabel 'K'\n")
fout.write("set ylabel 'Energy(eV)'\n")
fout.write("set xtics(")
for i in range(len(self.labels_for_gnuplot)-1):
fout.write("'%s' %f, " % (self.labels_for_gnuplot[i], self.locs[i]))
fout.write("'%s' %f)\n" % (self.labels_for_gnuplot[-1], self.locs[-1]))
fout.write("set grid xtics ytics\n")
fout.write("set autoscale\n")
fout.write("plot 'all-bands-spin-polarized-spin-2.data' using 1:2 w l\n")
os.system("gnuplot all-bands-spin-polarized-spin-2.gnuplot")
with open("specified-bands-spin-polarized-spin-1.gnuplot", 'w') as fout:
fout.write("set terminal gif\n")
fout.write("set output 'specified-bands-spin-polarized-spin-1.gif'\n")
fout.write("unset key\n")
fout.write("set parametric\n")
fout.write("set title 'Band Structure'\n")
fout.write("set xlabel 'K'\n")
fout.write("set ylabel 'Energy(eV)'\n")
fout.write("set xtics(")
for i in range(len(self.labels_for_gnuplot)-1):
fout.write("'%s' %f, " % (self.labels_for_gnuplot[i], self.locs[i]))
fout.write("'%s' %f)\n" % (self.labels_for_gnuplot[-1], self.locs[-1]))
fout.write("set grid xtics ytics\n")
fout.write("set autoscale\n")
fout.write("plot 'specified-bands-spin-polarized-spin-1.data' using 1:2 w l\n")
os.system("gnuplot specified-bands-spin-polarized-spin-1.gnuplot")
with open("specified-bands-spin-polarized-spin-2.gnuplot", 'w') as fout:
fout.write("set terminal gif\n")
fout.write("set output 'specified-bands-spin-polarized-spin-2.gif'\n")
fout.write("unset key\n")
fout.write("set parametric\n")
fout.write("set title 'Band Structure'\n")
fout.write("set xlabel 'K'\n")
fout.write("set ylabel 'Energy(eV)'\n")
fout.write("set xtics(")
for i in range(len(self.labels_for_gnuplot)-1):
fout.write("'%s' %f, " % (self.labels_for_gnuplot[i], self.locs[i]))
fout.write("'%s' %f)\n" % (self.labels_for_gnuplot[-1], self.locs[-1]))
fout.write("set grid xtics ytics\n")
fout.write("set autoscale\n")
fout.write("plot 'specified-bands-spin-polarized-spin-2.data' using 1:2 w l\n")
os.system("gnuplot specified-bands-spin-polarized-spin-2.gnuplot")
def plot_band(self, option="matplotlib", bandrange=[0, 1.0]):
"""
:parama option:
gnuplot or matplotlib
:param bandrange:
a list of two values(between 0 and 1) defining the percentage
of bands to plot.
plotrange[0]: left boundary of the nth band to plot
plotrange[1]: right boundary of the nth band to plot
default is plotrange[0] = 0, plotrange[1], in which case
all the band available will be plot.
Be aware that the range if not for energy but for band number
:param imagebase: image file name(not full)
"""
if option == "matplotlib":
self._plot_band_matplotlib(bandrange=bandrange)
elif option == "gnuplot":
self._plot_band_gnuplot(bandrange=bandrange)
#
def export(self, directory="tmp-abinit-static", bandrange=[0, 1], option="matplotlib"):
"""
:parama option:
gnuplot or matplotlib
:param bandrange:
a list of two values(between 0 and 1) defining the percentage
of bands to plot.
plotrange[0]: left boundary of the nth band to plot
plotrange[1]: right boundary of the nth band to plot
default is plotrange[0] = 0, plotrange[1], in which case
all the band available will be plot.
Be aware that the range if not for energy but for band number
"""
os.system("mkdir -p %s/post-processing" % directory)
os.chdir(os.path.join(directory, "post-processing"))
self.plot_band(option=option, bandrange=bandrange)
os.chdir("../../")
| 51.492424
| 142
| 0.529106
| 2,816
| 20,391
| 3.760653
| 0.089134
| 0.086686
| 0.056657
| 0.051558
| 0.768839
| 0.737394
| 0.715014
| 0.709065
| 0.685836
| 0.671577
| 0
| 0.024399
| 0.324653
| 20,391
| 395
| 143
| 51.622785
| 0.744608
| 0.152126
| 0
| 0.565217
| 0
| 0.014493
| 0.223249
| 0.082138
| 0
| 0
| 0
| 0
| 0
| 1
| 0.025362
| false
| 0.003623
| 0.01087
| 0
| 0.039855
| 0.036232
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
f88ab7cb09ff4cce53f828728ecd959e4a4ca37a
| 955
|
py
|
Python
|
djangoBackend/payment_module/migrations/0005_auto_20210924_0054.py
|
muhanzi/Django-REST-API
|
08b8b2bbd08a74589cca7b5fd4e1d604d9a6d7eb
|
[
"Apache-2.0"
] | null | null | null |
djangoBackend/payment_module/migrations/0005_auto_20210924_0054.py
|
muhanzi/Django-REST-API
|
08b8b2bbd08a74589cca7b5fd4e1d604d9a6d7eb
|
[
"Apache-2.0"
] | null | null | null |
djangoBackend/payment_module/migrations/0005_auto_20210924_0054.py
|
muhanzi/Django-REST-API
|
08b8b2bbd08a74589cca7b5fd4e1d604d9a6d7eb
|
[
"Apache-2.0"
] | null | null | null |
# Generated by Django 3.1.2 on 2021-09-23 21:54
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('payment_module', '0004_auto_20210924_0009'),
]
operations = [
migrations.RenameField(
model_name='commission',
old_name='agencyId',
new_name='agency',
),
migrations.RenameField(
model_name='commission',
old_name='paymentId',
new_name='payment',
),
migrations.RenameField(
model_name='invoice',
old_name='employeeId',
new_name='employee',
),
migrations.RenameField(
model_name='invoice',
old_name='employerId',
new_name='employer',
),
migrations.RenameField(
model_name='invoice',
old_name='paymentId',
new_name='payment',
),
]
| 24.487179
| 54
| 0.536126
| 84
| 955
| 5.869048
| 0.47619
| 0.212982
| 0.263692
| 0.30426
| 0.551724
| 0.551724
| 0.458418
| 0
| 0
| 0
| 0
| 0.050243
| 0.353927
| 955
| 38
| 55
| 25.131579
| 0.748784
| 0.04712
| 0
| 0.59375
| 1
| 0
| 0.176211
| 0.02533
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.03125
| 0
| 0.125
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
f89ffb26ee589ce79dc400f7f5cf4afa16b557b3
| 88
|
py
|
Python
|
view/resources/__init__.py
|
surfaceanalytics/inelasticscattering
|
da549dde788a55084c565bbc5f89ebf9cbae4263
|
[
"MIT"
] | null | null | null |
view/resources/__init__.py
|
surfaceanalytics/inelasticscattering
|
da549dde788a55084c565bbc5f89ebf9cbae4263
|
[
"MIT"
] | 3
|
2021-09-08T03:02:25.000Z
|
2022-03-12T01:00:06.000Z
|
view/resources/__init__.py
|
surfaceanalytics/inelasticscattering
|
da549dde788a55084c565bbc5f89ebf9cbae4263
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
"""
Created on Thu Sep 3 16:43:28 2020
@author: nicholls
"""
| 11
| 35
| 0.568182
| 14
| 88
| 3.571429
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.173913
| 0.215909
| 88
| 7
| 36
| 12.571429
| 0.550725
| 0.875
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
f8ab70b04aa64ecaf4843be345aba0efec2cfc69
| 414
|
py
|
Python
|
sapextractor/utils/string_matching/distances.py
|
aarkue/sap-meta-explorer
|
613bf657bbaa72a3781a84664e5de7626516532f
|
[
"Apache-2.0"
] | 2
|
2021-02-10T08:09:35.000Z
|
2021-05-21T06:25:34.000Z
|
sapextractor/utils/string_matching/distances.py
|
aarkue/sap-meta-explorer
|
613bf657bbaa72a3781a84664e5de7626516532f
|
[
"Apache-2.0"
] | null | null | null |
sapextractor/utils/string_matching/distances.py
|
aarkue/sap-meta-explorer
|
613bf657bbaa72a3781a84664e5de7626516532f
|
[
"Apache-2.0"
] | 3
|
2021-11-22T13:27:00.000Z
|
2022-03-16T22:08:51.000Z
|
import stringdist
def levenshtein(stru1, stru2):
"""
Measures the Levenshtein distance between two strings
Parameters
---------------
stru1
First string
stru2
Second string
Returns
---------------
levens_dist
Levenshtein distance
"""
return stringdist.levenshtein(stru1, stru2)
def apply(stru1, stru2):
return levenshtein(stru1, stru2)
| 16.56
| 57
| 0.601449
| 38
| 414
| 6.526316
| 0.552632
| 0.16129
| 0.254032
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.033333
| 0.275362
| 414
| 24
| 58
| 17.25
| 0.793333
| 0.458937
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.4
| false
| 0
| 0.2
| 0.2
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
f8ba3fd25de458d4df99e4ca579804ce22c8dbdc
| 112
|
py
|
Python
|
database.py
|
anthonypang99/TakeNote
|
7da668d48b72ee825f3fb9f503f8d4d6fe2ff644
|
[
"MIT"
] | null | null | null |
database.py
|
anthonypang99/TakeNote
|
7da668d48b72ee825f3fb9f503f8d4d6fe2ff644
|
[
"MIT"
] | null | null | null |
database.py
|
anthonypang99/TakeNote
|
7da668d48b72ee825f3fb9f503f8d4d6fe2ff644
|
[
"MIT"
] | null | null | null |
from flask_sqlalchemy import SQLAlchemy
# Initialize the Flask-SQLAlchemy extension instance
db = SQLAlchemy()
| 22.4
| 52
| 0.830357
| 13
| 112
| 7.076923
| 0.692308
| 0.326087
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.125
| 112
| 4
| 53
| 28
| 0.938776
| 0.446429
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
f8c2cf6aa69e132e2490580fb1e86b3b369033e8
| 192
|
py
|
Python
|
src/qualtrutils/__init__.py
|
emanuele-albini/qualtrutils
|
7f1fb08221edb220738445bf3e8a92a1a037bb76
|
[
"MIT"
] | null | null | null |
src/qualtrutils/__init__.py
|
emanuele-albini/qualtrutils
|
7f1fb08221edb220738445bf3e8a92a1a037bb76
|
[
"MIT"
] | null | null | null |
src/qualtrutils/__init__.py
|
emanuele-albini/qualtrutils
|
7f1fb08221edb220738445bf3e8a92a1a037bb76
|
[
"MIT"
] | null | null | null |
try:
import os
import pkg_resources # part of setuptools
__version__ = pkg_resources.get_distribution(os.path.dirname(__file__)).version
except:
pass
from .qualtrics import *
| 24
| 83
| 0.744792
| 24
| 192
| 5.5
| 0.75
| 0.181818
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.182292
| 192
| 8
| 84
| 24
| 0.840764
| 0.09375
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.142857
| 0.428571
| 0
| 0.428571
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
|
0
| 4
|
f8c3a6ea72bf6a5606bd1c07a86991ac84f55edc
| 97
|
py
|
Python
|
image_web/image_app/apps.py
|
datasciencee/Image_web
|
28d0d8a3006e64da05bb6ede03b037daaa2897b2
|
[
"MIT"
] | null | null | null |
image_web/image_app/apps.py
|
datasciencee/Image_web
|
28d0d8a3006e64da05bb6ede03b037daaa2897b2
|
[
"MIT"
] | null | null | null |
image_web/image_app/apps.py
|
datasciencee/Image_web
|
28d0d8a3006e64da05bb6ede03b037daaa2897b2
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class ImageAppConfig(AppConfig):
name = 'image_app'
| 16.166667
| 34
| 0.721649
| 11
| 97
| 6.272727
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.206186
| 97
| 5
| 35
| 19.4
| 0.896104
| 0
| 0
| 0
| 0
| 0
| 0.097826
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
f8c5dfc6d0cdbf14f1da548855e712503b3de0e5
| 230
|
py
|
Python
|
frameworks/MLNet/__init__.py
|
Ennosigaeon/automlbenchmark
|
bd3e529d641b64300a075d59408203d537311b7e
|
[
"MIT"
] | 282
|
2018-09-19T09:45:46.000Z
|
2022-03-30T04:05:51.000Z
|
frameworks/MLNet/__init__.py
|
Ennosigaeon/automlbenchmark
|
bd3e529d641b64300a075d59408203d537311b7e
|
[
"MIT"
] | 267
|
2018-11-02T11:43:11.000Z
|
2022-03-31T08:58:16.000Z
|
frameworks/MLNet/__init__.py
|
Ennosigaeon/automlbenchmark
|
bd3e529d641b64300a075d59408203d537311b7e
|
[
"MIT"
] | 104
|
2018-10-17T19:32:36.000Z
|
2022-03-19T22:47:59.000Z
|
from amlb.utils import call_script_in_same_dir
def setup(*args, **kwargs):
call_script_in_same_dir(__file__, "setup.sh", *args, **kwargs)
def run(dataset, config):
from .exec import run
return run(dataset, config)
| 20.909091
| 66
| 0.721739
| 35
| 230
| 4.4
| 0.571429
| 0.12987
| 0.155844
| 0.207792
| 0.246753
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.16087
| 230
| 10
| 67
| 23
| 0.797927
| 0
| 0
| 0
| 0
| 0
| 0.034783
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.333333
| 0
| 0.833333
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
f8c656a1fcea7a9ee14e5a204d4f559a5949f3d3
| 189
|
py
|
Python
|
generate_pentagons.py
|
YessOn/ProjectEuler-Toolkits
|
cc196c1c6faca32f7613ae40ddb3c7f7b86e071e
|
[
"MIT"
] | null | null | null |
generate_pentagons.py
|
YessOn/ProjectEuler-Toolkits
|
cc196c1c6faca32f7613ae40ddb3c7f7b86e071e
|
[
"MIT"
] | null | null | null |
generate_pentagons.py
|
YessOn/ProjectEuler-Toolkits
|
cc196c1c6faca32f7613ae40ddb3c7f7b86e071e
|
[
"MIT"
] | null | null | null |
def generate_pentagons(n_of_pentagons):
pentagons = (num * (3 * num - 1) // 2 for num in range(1, n_of_pentagons))
for _ in range(n_of_pentagons - 1):
yield next(pentagons)
| 37.8
| 78
| 0.661376
| 30
| 189
| 3.9
| 0.466667
| 0.076923
| 0.307692
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.034014
| 0.222222
| 189
| 4
| 79
| 47.25
| 0.761905
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 0
| 0.25
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
f8caa3e778c29557bd6611746d149fdf5e4f18a9
| 113
|
py
|
Python
|
juno/server/http/handler/api.py
|
DSciLab/juno
|
1d572c8d3fd06a6c1fcc51b42a6539dd3ae0927e
|
[
"MIT"
] | null | null | null |
juno/server/http/handler/api.py
|
DSciLab/juno
|
1d572c8d3fd06a6c1fcc51b42a6539dd3ae0927e
|
[
"MIT"
] | null | null | null |
juno/server/http/handler/api.py
|
DSciLab/juno
|
1d572c8d3fd06a6c1fcc51b42a6539dd3ae0927e
|
[
"MIT"
] | null | null | null |
from .base.api_handler import APIBaseHandler
class APIHandler(APIBaseHandler):
def get(self):
pass
| 16.142857
| 44
| 0.725664
| 13
| 113
| 6.230769
| 0.923077
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.20354
| 113
| 6
| 45
| 18.833333
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0.25
| 0.25
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
f8d1533d26da78b1c9ff1203760b4a5ae33a69c7
| 206
|
py
|
Python
|
1546.py
|
ShawonBarman/URI-Online-judge-Ad-Hoc-level-problem-solution-in-python
|
9a0f0ad5efd4a9e73589c357ab4b34b7c73a11da
|
[
"MIT"
] | 1
|
2022-01-14T08:45:32.000Z
|
2022-01-14T08:45:32.000Z
|
1546.py
|
ShawonBarman/URI-Online-judge-Ad-Hoc-level-problem-solution-in-python
|
9a0f0ad5efd4a9e73589c357ab4b34b7c73a11da
|
[
"MIT"
] | null | null | null |
1546.py
|
ShawonBarman/URI-Online-judge-Ad-Hoc-level-problem-solution-in-python
|
9a0f0ad5efd4a9e73589c357ab4b34b7c73a11da
|
[
"MIT"
] | null | null | null |
arr = ['', 'Rolien', 'Naej', 'Elehcim', 'Odranoel']
n = int(input())
while n != 0:
n -= 1
k = int(input())
while k != 0:
k -= 1
num = int(input())
print(arr[num])
| 22.888889
| 52
| 0.417476
| 27
| 206
| 3.185185
| 0.518519
| 0.27907
| 0.302326
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.030303
| 0.359223
| 206
| 9
| 53
| 22.888889
| 0.621212
| 0
| 0
| 0
| 0
| 0
| 0.125628
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.111111
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
3e1d352c7922c834041d16e3fdaa531ed2d9b63c
| 75
|
py
|
Python
|
map2annotation/__main__.py
|
aas-integration/integration-test2
|
dc9a9b4593cd59841f0d8348056cbff80a9c2a21
|
[
"MIT"
] | 3
|
2016-10-10T20:18:51.000Z
|
2018-05-01T19:42:10.000Z
|
map2annotation/__main__.py
|
aas-integration/integration-test2
|
dc9a9b4593cd59841f0d8348056cbff80a9c2a21
|
[
"MIT"
] | 38
|
2016-08-22T03:20:25.000Z
|
2018-06-11T19:13:05.000Z
|
map2annotation/__main__.py
|
aas-integration/integration-test2
|
dc9a9b4593cd59841f0d8348056cbff80a9c2a21
|
[
"MIT"
] | 7
|
2016-08-29T17:37:42.000Z
|
2022-01-28T00:30:10.000Z
|
import map2annotation
if __name__ == '__main__':
map2annotation.main()
| 18.75
| 26
| 0.746667
| 7
| 75
| 6.857143
| 0.714286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.03125
| 0.146667
| 75
| 4
| 27
| 18.75
| 0.71875
| 0
| 0
| 0
| 0
| 0
| 0.105263
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
3e24efcd76f37df58a59baf6375172236bdbc8f9
| 116
|
py
|
Python
|
notifications/utils.py
|
Natgeoed/django-notifications
|
a73c01f167bdf796b609d44a2be5323d08180b7f
|
[
"BSD-3-Clause"
] | 1
|
2019-05-28T14:55:58.000Z
|
2019-05-28T14:55:58.000Z
|
notifications/utils.py
|
Natgeoed/django-notifications
|
a73c01f167bdf796b609d44a2be5323d08180b7f
|
[
"BSD-3-Clause"
] | null | null | null |
notifications/utils.py
|
Natgeoed/django-notifications
|
a73c01f167bdf796b609d44a2be5323d08180b7f
|
[
"BSD-3-Clause"
] | 1
|
2020-03-29T10:13:28.000Z
|
2020-03-29T10:13:28.000Z
|
# -*- coding: utf-8 -*-
def slug2id(slug):
return long(slug) - 110909
def id2slug(id):
return id + 110909
| 14.5
| 30
| 0.603448
| 16
| 116
| 4.375
| 0.6875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.168539
| 0.232759
| 116
| 7
| 31
| 16.571429
| 0.617978
| 0.181034
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0.5
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 4
|
3e509827f57ba47184b958f8189726f8a1765c22
| 87
|
py
|
Python
|
division.py
|
ReverseScale/PyDemo
|
9cc6f3cbb8482f6e403bf65419537b0163798e61
|
[
"MIT"
] | null | null | null |
division.py
|
ReverseScale/PyDemo
|
9cc6f3cbb8482f6e403bf65419537b0163798e61
|
[
"MIT"
] | null | null | null |
division.py
|
ReverseScale/PyDemo
|
9cc6f3cbb8482f6e403bf65419537b0163798e61
|
[
"MIT"
] | null | null | null |
try:
print(5/0)
except ZeroDivisionError:
print('你是啥子吗!')
else:
print('算了')
| 14.5
| 25
| 0.62069
| 11
| 87
| 4.909091
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.028986
| 0.206897
| 87
| 6
| 26
| 14.5
| 0.753623
| 0
| 0
| 0
| 0
| 0
| 0.090909
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
3e52b2bc37f4905d4ab47d9e200507510863fee4
| 626
|
py
|
Python
|
Python/Data Structure and Algorithm/Krish Naik/Amazon Que.py
|
omkarsutar1255/Python-Data
|
169d0c54b23d9dd5a7f1aea41ab385121c3b3c63
|
[
"CC-BY-3.0"
] | null | null | null |
Python/Data Structure and Algorithm/Krish Naik/Amazon Que.py
|
omkarsutar1255/Python-Data
|
169d0c54b23d9dd5a7f1aea41ab385121c3b3c63
|
[
"CC-BY-3.0"
] | null | null | null |
Python/Data Structure and Algorithm/Krish Naik/Amazon Que.py
|
omkarsutar1255/Python-Data
|
169d0c54b23d9dd5a7f1aea41ab385121c3b3c63
|
[
"CC-BY-3.0"
] | null | null | null |
# l1 = [1095, 1094, 1095]
# del l1[:]
# l1.extend([1005, 1094, 1095])
# print(l1)
l1 = [8676, 4444, 3333, 2222, 1111]
for i, n in enumerate(l1):
print(i, n)
if int(n / 1000) == 1:
l1[i] = n + 8000
elif int(n / 1000) == 2:
l1[i] = n + 6000
elif int(n / 1000) == 3:
l1[i] = n + 4000
elif int(n / 1000) == 4:
l1[i] = n + 2000
elif int(n / 1000) == 6:
l1[i] = n - 2000
elif int(n / 1000) == 7:
l1[i] = n + 4000
elif int(n / 1000) == 8:
l1[i] = n - 6000
elif int(n / 1000) == 9:
l1[i] = n - 8000
else:
pass
print(l1)
| 21.586207
| 35
| 0.4377
| 104
| 626
| 2.634615
| 0.336538
| 0.072993
| 0.233577
| 0.306569
| 0.437956
| 0.437956
| 0.437956
| 0.437956
| 0
| 0
| 0
| 0.334184
| 0.373802
| 626
| 28
| 36
| 22.357143
| 0.364796
| 0.116613
| 0
| 0.090909
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.045455
| 0
| 0
| 0
| 0.090909
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
3e6ad6e1c6ce978983b60511c62b60c613bacb9a
| 92
|
py
|
Python
|
script.py
|
juand1809/JuanVelasquez_Ejercicio23
|
40b20dc3db6e3a9a884265a950dd3ccac1f7a615
|
[
"MIT"
] | null | null | null |
script.py
|
juand1809/JuanVelasquez_Ejercicio23
|
40b20dc3db6e3a9a884265a950dd3ccac1f7a615
|
[
"MIT"
] | null | null | null |
script.py
|
juand1809/JuanVelasquez_Ejercicio23
|
40b20dc3db6e3a9a884265a950dd3ccac1f7a615
|
[
"MIT"
] | null | null | null |
import os
a = os.system("g++ sumatoria.cpp -o sumatoria.x")
a = os.system("./sumatoria.x")
| 18.4
| 49
| 0.652174
| 16
| 92
| 3.75
| 0.5625
| 0.1
| 0.3
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.130435
| 92
| 4
| 50
| 23
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0.48913
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
e43608fd33081461199e20cc093779ca67fd8543
| 132
|
py
|
Python
|
pythonExercicios/ex014.py
|
Yhago-Carvalho/CursoPython
|
343ccabb1a61e16c6078de9672c78c56deed2589
|
[
"MIT"
] | null | null | null |
pythonExercicios/ex014.py
|
Yhago-Carvalho/CursoPython
|
343ccabb1a61e16c6078de9672c78c56deed2589
|
[
"MIT"
] | null | null | null |
pythonExercicios/ex014.py
|
Yhago-Carvalho/CursoPython
|
343ccabb1a61e16c6078de9672c78c56deed2589
|
[
"MIT"
] | null | null | null |
c = float(input('Digite a temperatura em Ceusius: '))
f = (9*c + 160)/5
print(f'A temperatura de {c:.1f}ºC corresponde a {f:.1f}ºF')
| 44
| 60
| 0.659091
| 26
| 132
| 3.346154
| 0.692308
| 0.275862
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.061947
| 0.143939
| 132
| 3
| 60
| 44
| 0.707965
| 0
| 0
| 0
| 0
| 0
| 0.62406
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.333333
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
e479315b2fec6b1b30374526a8f3ec4a57556364
| 536
|
py
|
Python
|
tests/test_set_key.py
|
GustavoKatel/pushbullet-cli
|
e5102772752a97db539594b0d50b5effb36a22e2
|
[
"MIT"
] | 176
|
2017-01-30T16:21:48.000Z
|
2022-02-10T05:32:57.000Z
|
tests/test_set_key.py
|
GustavoKatel/pushbullet-cli
|
e5102772752a97db539594b0d50b5effb36a22e2
|
[
"MIT"
] | 49
|
2017-01-21T20:27:03.000Z
|
2022-01-16T02:57:51.000Z
|
tests/test_set_key.py
|
GustavoKatel/pushbullet-cli
|
e5102772752a97db539594b0d50b5effb36a22e2
|
[
"MIT"
] | 21
|
2017-01-26T06:08:54.000Z
|
2022-01-04T19:53:25.000Z
|
import platform
import pytest
@pytest.mark.skipif(
platform.system() == "Windows", reason="cannot test this on windows"
)
def test_set_key(set_key, pb_api, mocker):
import keyring
import getpass
import six
prev_token = six.text_type(keyring.get_password("pushbullet", "cli"))
try:
mocker.patch.object(getpass, "getpass", return_value="abc")
set_key()
assert keyring.get_password("pushbullet", "cli") == "abc"
finally:
keyring.set_password("pushbullet", "cli", prev_token)
| 25.52381
| 73
| 0.673507
| 67
| 536
| 5.208955
| 0.552239
| 0.051576
| 0.180516
| 0.160458
| 0.17765
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.197761
| 536
| 20
| 74
| 26.8
| 0.811628
| 0
| 0
| 0
| 0
| 0
| 0.160448
| 0
| 0
| 0
| 0
| 0
| 0.0625
| 1
| 0.0625
| false
| 0.3125
| 0.3125
| 0
| 0.375
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
|
0
| 4
|
e47c17dddcd00889d223b3d8fce4a9d9c3d285a3
| 356
|
py
|
Python
|
doingmathwithpython/ch03.py
|
andyliumathematics/mlnotes
|
7b7a1c37d7660bdf9144c59693719033080d654b
|
[
"Apache-2.0"
] | null | null | null |
doingmathwithpython/ch03.py
|
andyliumathematics/mlnotes
|
7b7a1c37d7660bdf9144c59693719033080d654b
|
[
"Apache-2.0"
] | null | null | null |
doingmathwithpython/ch03.py
|
andyliumathematics/mlnotes
|
7b7a1c37d7660bdf9144c59693719033080d654b
|
[
"Apache-2.0"
] | null | null | null |
# %%
l = [38,32,49,15,806,806]
sum(l)
# %%
len(l)
# %%
sum(l)//len(l)
# %%
l.sort()
# %%
l
# %%
# %%
l.most_common(1)
# %%
'''
求众数:出现频率最高的数据
'''
from collections import Counter
l = ['38','32','49','15','806','806']
c = Counter(l)
print(c.most_common()[0][0])
print(c.most_common(1))
print(c.most_common(2))
# %%
c.most_common()[0]
# %%
print(33)
# %%
| 11.483871
| 37
| 0.530899
| 60
| 356
| 3.066667
| 0.383333
| 0.271739
| 0.23913
| 0.26087
| 0.163043
| 0.163043
| 0.163043
| 0
| 0
| 0
| 0
| 0.119205
| 0.151685
| 356
| 30
| 38
| 11.866667
| 0.490066
| 0.089888
| 0
| 0
| 0
| 0
| 0.04878
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.066667
| 0
| 0.066667
| 0.266667
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
e4884423f1f3c28f1f01d03c9e676127547b57c0
| 250
|
py
|
Python
|
docs/autodoc_example.py
|
aio-libs/sphinxcontrib-asyncio
|
dbfa79e29980e73ad2dd9dec59f1238b1a8a7cd7
|
[
"Apache-2.0"
] | 19
|
2016-02-21T13:27:43.000Z
|
2020-02-19T17:22:38.000Z
|
docs/autodoc_example.py
|
aio-libs/sphinxcontrib-asyncio
|
dbfa79e29980e73ad2dd9dec59f1238b1a8a7cd7
|
[
"Apache-2.0"
] | 9
|
2016-04-15T08:43:39.000Z
|
2022-01-06T10:43:08.000Z
|
docs/autodoc_example.py
|
aio-libs/sphinxcontrib-asyncio
|
dbfa79e29980e73ad2dd9dec59f1238b1a8a7cd7
|
[
"Apache-2.0"
] | 6
|
2016-04-11T07:32:41.000Z
|
2019-09-28T10:59:51.000Z
|
import asyncio
class MyClass:
def my_func(self):
""" Normal function """
@asyncio.coroutine
def my_coro(self):
""" This is my coroutine """
@asyncio.coroutine
def coro(param):
""" Module level async function """
| 14.705882
| 39
| 0.608
| 29
| 250
| 5.172414
| 0.62069
| 0.066667
| 0.253333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.264
| 250
| 16
| 40
| 15.625
| 0.815217
| 0.264
| 0
| 0.285714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.428571
| false
| 0
| 0.142857
| 0
| 0.714286
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
e49334330d41dc2dca73dcd98740a04934ce3d79
| 83
|
py
|
Python
|
DRF-React/appy/apps.py
|
Preet538-neitzen/LOC-Hackathon
|
e7bad458ef0069becdba42576f5fe1bfd736678b
|
[
"MIT"
] | null | null | null |
DRF-React/appy/apps.py
|
Preet538-neitzen/LOC-Hackathon
|
e7bad458ef0069becdba42576f5fe1bfd736678b
|
[
"MIT"
] | 8
|
2021-03-19T13:44:46.000Z
|
2022-03-12T00:55:03.000Z
|
DRF-React/appy/apps.py
|
Preet538-neitzen/LOC-Hackathon
|
e7bad458ef0069becdba42576f5fe1bfd736678b
|
[
"MIT"
] | 1
|
2021-02-13T00:16:36.000Z
|
2021-02-13T00:16:36.000Z
|
from django.apps import AppConfig
class AppyConfig(AppConfig):
name = 'appy'
| 13.833333
| 33
| 0.73494
| 10
| 83
| 6.1
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.180723
| 83
| 5
| 34
| 16.6
| 0.897059
| 0
| 0
| 0
| 0
| 0
| 0.048193
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
e4954716a9c58078b2bd1d9c30cda00cbdaf306f
| 122
|
py
|
Python
|
training/continueLearning.py
|
dwright37/generative-concatenative-image-captioner
|
2bb257d4791e362e42a30bf0e4ca32e84f80d942
|
[
"MIT"
] | null | null | null |
training/continueLearning.py
|
dwright37/generative-concatenative-image-captioner
|
2bb257d4791e362e42a30bf0e4ca32e84f80d942
|
[
"MIT"
] | null | null | null |
training/continueLearning.py
|
dwright37/generative-concatenative-image-captioner
|
2bb257d4791e362e42a30bf0e4ca32e84f80d942
|
[
"MIT"
] | null | null | null |
def continueLearning(losses):
improving = losses[0] < losses[1] or losses[1] < losses[2]
return improving
| 30.5
| 66
| 0.647541
| 15
| 122
| 5.266667
| 0.6
| 0.177215
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.043011
| 0.237705
| 122
| 3
| 67
| 40.666667
| 0.806452
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
e4b424d5ad2b323394201895d8483eb6857e159f
| 3,158
|
py
|
Python
|
Python/tdw/FBOutput/StaticSpring.py
|
ricklentz/tdw
|
da40eec151acae20b28d6486defb4358d96adb0e
|
[
"BSD-2-Clause"
] | null | null | null |
Python/tdw/FBOutput/StaticSpring.py
|
ricklentz/tdw
|
da40eec151acae20b28d6486defb4358d96adb0e
|
[
"BSD-2-Clause"
] | null | null | null |
Python/tdw/FBOutput/StaticSpring.py
|
ricklentz/tdw
|
da40eec151acae20b28d6486defb4358d96adb0e
|
[
"BSD-2-Clause"
] | null | null | null |
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: FBOutput
import tdw.flatbuffers
class StaticSpring(object):
__slots__ = ['_tab']
@classmethod
def GetRootAsStaticSpring(cls, buf, offset):
n = tdw.flatbuffers.encode.Get(tdw.flatbuffers.packer.uoffset, buf, offset)
x = StaticSpring()
x.Init(buf, n + offset)
return x
# StaticSpring
def Init(self, buf, pos):
self._tab = tdw.flatbuffers.table.Table(buf, pos)
# StaticSpring
def Id(self):
o = tdw.flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(tdw.flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
return 0
# StaticSpring
def HasLimits(self):
o = tdw.flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
if o != 0:
return bool(self._tab.Get(tdw.flatbuffers.number_types.BoolFlags, o + self._tab.Pos))
return False
# StaticSpring
def MinLimit(self):
o = tdw.flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
return self._tab.Get(tdw.flatbuffers.number_types.Float32Flags, o + self._tab.Pos)
return 0.0
# StaticSpring
def MaxLimit(self):
o = tdw.flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
if o != 0:
return self._tab.Get(tdw.flatbuffers.number_types.Float32Flags, o + self._tab.Pos)
return 0.0
# StaticSpring
def Axis(self):
o = tdw.flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
if o != 0:
x = o + self._tab.Pos
from .Vector3 import Vector3
obj = Vector3()
obj.Init(self._tab.Bytes, x)
return obj
return None
# StaticSpring
def Force(self):
o = tdw.flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14))
if o != 0:
return self._tab.Get(tdw.flatbuffers.number_types.Float32Flags, o + self._tab.Pos)
return 0.0
# StaticSpring
def Damper(self):
o = tdw.flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16))
if o != 0:
return self._tab.Get(tdw.flatbuffers.number_types.Float32Flags, o + self._tab.Pos)
return 0.0
def StaticSpringStart(builder): builder.StartObject(7)
def StaticSpringAddId(builder, id): builder.PrependInt32Slot(0, id, 0)
def StaticSpringAddHasLimits(builder, hasLimits): builder.PrependBoolSlot(1, hasLimits, 0)
def StaticSpringAddMinLimit(builder, minLimit): builder.PrependFloat32Slot(2, minLimit, 0.0)
def StaticSpringAddMaxLimit(builder, maxLimit): builder.PrependFloat32Slot(3, maxLimit, 0.0)
def StaticSpringAddAxis(builder, axis): builder.PrependStructSlot(4, tdw.flatbuffers.number_types.UOffsetTFlags.py_type(axis), 0)
def StaticSpringAddForce(builder, force): builder.PrependFloat32Slot(5, force, 0.0)
def StaticSpringAddDamper(builder, damper): builder.PrependFloat32Slot(6, damper, 0.0)
def StaticSpringEnd(builder): return builder.EndObject()
| 38.048193
| 129
| 0.679227
| 394
| 3,158
| 5.319797
| 0.22335
| 0.073473
| 0.133588
| 0.166985
| 0.449427
| 0.441317
| 0.432729
| 0.395038
| 0.395038
| 0.395038
| 0
| 0.027666
| 0.21026
| 3,158
| 82
| 130
| 38.512195
| 0.812751
| 0.060165
| 0
| 0.254237
| 1
| 0
| 0.001353
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.305085
| false
| 0
| 0.033898
| 0.016949
| 0.627119
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
e4bd27232f18521dba7be29751865723323f35e8
| 94
|
py
|
Python
|
rust/resources/api/resources.py
|
AsiaLi/rust
|
9954d2bd9c337376840d638c6ac5af6d9a32ed28
|
[
"Apache-2.0"
] | 5
|
2018-02-08T04:31:52.000Z
|
2020-05-08T00:59:05.000Z
|
rust/resources/api/resources.py
|
AsiaLi/rust
|
9954d2bd9c337376840d638c6ac5af6d9a32ed28
|
[
"Apache-2.0"
] | 2
|
2019-03-23T03:14:06.000Z
|
2019-04-19T07:51:55.000Z
|
rust/resources/api/resources.py
|
AsiaLi/rust
|
9954d2bd9c337376840d638c6ac5af6d9a32ed28
|
[
"Apache-2.0"
] | 4
|
2019-02-20T04:35:33.000Z
|
2020-05-07T13:46:27.000Z
|
#coding: utf8
"""
built-in资源采用按需加载策略, 无需在此引入.
如要启用对应的资源, 请在项目的settings文件中配置RUST_RESOURCES
"""
| 15.666667
| 43
| 0.787234
| 8
| 94
| 9.125
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.011628
| 0.085106
| 94
| 6
| 44
| 15.666667
| 0.837209
| 0.893617
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
e4d1a5ffa7594bfb272d1e801de25c346e704f41
| 159
|
py
|
Python
|
finished/edabit/very_easy/return_sum.py
|
UltiRequiem/daily-python-practice
|
31f72c45378be90b8fcadd30d7042819ee551a17
|
[
"MIT"
] | 8
|
2021-05-29T23:30:12.000Z
|
2021-09-24T03:25:44.000Z
|
finished/edabit/very_easy/return_sum.py
|
UltiRequiem/daily-python-practice
|
31f72c45378be90b8fcadd30d7042819ee551a17
|
[
"MIT"
] | null | null | null |
finished/edabit/very_easy/return_sum.py
|
UltiRequiem/daily-python-practice
|
31f72c45378be90b8fcadd30d7042819ee551a17
|
[
"MIT"
] | 6
|
2021-06-02T14:20:24.000Z
|
2021-08-19T00:49:26.000Z
|
def addition(x: int, y: int) -> int:
return x + y
# addition_lambda = lambda x, y: x + y
# Test:
if __name__ == "__main__":
print(addition(78, 98))
| 15.9
| 38
| 0.591195
| 25
| 159
| 3.4
| 0.56
| 0.070588
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.033333
| 0.245283
| 159
| 9
| 39
| 17.666667
| 0.675
| 0.264151
| 0
| 0
| 0
| 0
| 0.070175
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 0.25
| 0.5
| 0.25
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 4
|
9021b355ad9a734bb50dcef4f74291f2233e5506
| 1,386
|
py
|
Python
|
spectrocrunch/utils/comparable.py
|
woutdenolf/spectrocrunch
|
fde4b6e0f462f464ce7af6a942b355d3d8f39f77
|
[
"MIT"
] | 3
|
2018-04-16T15:51:36.000Z
|
2019-12-16T11:21:05.000Z
|
spectrocrunch/utils/comparable.py
|
woutdenolf/spectrocrunch
|
fde4b6e0f462f464ce7af6a942b355d3d8f39f77
|
[
"MIT"
] | null | null | null |
spectrocrunch/utils/comparable.py
|
woutdenolf/spectrocrunch
|
fde4b6e0f462f464ce7af6a942b355d3d8f39f77
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
import operator
class Comparable(object):
@property
def _repr(self):
"""Unique representation of an instance"""
return "{}{}".format(type(self).__name__, id(self))
def _cmpkey(self, other):
return self._repr
def _sortkey(self, other):
return self._cmpkey
def __repr__(self):
return self._repr
def __str__(self):
return repr(self)
def encode(self, *args, **kwargs):
return str(self).encode(*args, **kwargs)
def _compareop(self, other, op, key):
a = getattr(self, key)(other)
try:
b = getattr(other, key)(self)
except:
return op(a, other)
else:
return op(a, b)
def _sort(self, other, op):
return self._compareop(other, op, "_sortkey")
def _compare(self, other, op):
return self._compareop(other, op, "_cmpkey")
def __lt__(self, other):
return self._sort(other, operator.lt)
def __le__(self, other):
return self._sort(other, operator.le)
def __ge__(self, other):
return self._sort(other, operator.ge)
def __gt__(self, other):
return self._sort(other, operator.gt)
def __eq__(self, other):
return self._compare(other, operator.eq)
def __ne__(self, other):
return self._compare(other, operator.ne)
| 23.491525
| 59
| 0.591631
| 170
| 1,386
| 4.5
| 0.270588
| 0.129412
| 0.156863
| 0.198693
| 0.386928
| 0.386928
| 0.386928
| 0.096732
| 0
| 0
| 0
| 0.001002
| 0.279942
| 1,386
| 58
| 60
| 23.896552
| 0.765531
| 0.042569
| 0
| 0.051282
| 0
| 0
| 0.014383
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.384615
| false
| 0
| 0.025641
| 0.333333
| 0.846154
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
5f483bb62aff2e6859980fe0b75abe98dd22d479
| 3,873
|
py
|
Python
|
fixture/contact.py
|
piersto/python_training
|
a5e323f62177e97d31e39449d675192354ec70ed
|
[
"Apache-2.0"
] | null | null | null |
fixture/contact.py
|
piersto/python_training
|
a5e323f62177e97d31e39449d675192354ec70ed
|
[
"Apache-2.0"
] | null | null | null |
fixture/contact.py
|
piersto/python_training
|
a5e323f62177e97d31e39449d675192354ec70ed
|
[
"Apache-2.0"
] | null | null | null |
class ContactHelper:
def __init__(self, app):
self.app = app
def submit_specified_user(self):
wd = self.app.wd
wd.find_element_by_xpath("(//input[@name='submit'])[2]").click()
def add_user(self, add_new_contact):
wd = self.app.wd
wd.find_element_by_link_text("add new").click()
wd.find_element_by_name("firstname").click()
wd.find_element_by_name("firstname").clear()
wd.find_element_by_name("firstname").send_keys(add_new_contact.firstname)
wd.find_element_by_name("middlename").clear()
wd.find_element_by_name("middlename").send_keys(add_new_contact.middlename)
wd.find_element_by_name("lastname").clear()
wd.find_element_by_name("lastname").send_keys(add_new_contact.lastname)
wd.find_element_by_name("nickname").clear()
wd.find_element_by_name("nickname").send_keys(add_new_contact.nickname)
wd.find_element_by_name("title").clear()
wd.find_element_by_name("title").send_keys(add_new_contact.title)
wd.find_element_by_name("company").clear()
wd.find_element_by_name("company").send_keys(add_new_contact.company)
wd.find_element_by_name("address").clear()
wd.find_element_by_name("address").send_keys(add_new_contact.address)
wd.find_element_by_name("home").clear()
wd.find_element_by_name("home").send_keys(add_new_contact.homephone)
wd.find_element_by_name("mobile").clear()
wd.find_element_by_name("mobile").send_keys(add_new_contact.mobilephone)
wd.find_element_by_name("work").clear()
wd.find_element_by_name("work").send_keys(add_new_contact.workphone)
wd.find_element_by_name("fax").clear()
wd.find_element_by_name("fax").send_keys(add_new_contact.fax)
wd.find_element_by_name("email").clear()
wd.find_element_by_name("email").send_keys(add_new_contact.email)
wd.find_element_by_name("homepage").clear()
wd.find_element_by_name("homepage").send_keys(add_new_contact.homepage)
wd.find_element_by_name("bday").click()
Select(wd.find_element_by_name("bday")).select_by_visible_text(add_new_contact.birthday)
wd.find_element_by_name("bday").click()
wd.find_element_by_name("bmonth").click()
Select(wd.find_element_by_name("bmonth")).select_by_visible_text(add_new_contact.birthmonth)
wd.find_element_by_name("bmonth").click()
wd.find_element_by_name("byear").click()
wd.find_element_by_name("byear").clear()
wd.find_element_by_name("byear").send_keys(add_new_contact.birthyear)
wd.find_element_by_name("aday").click()
Select(wd.find_element_by_name("aday")).select_by_visible_text(add_new_contact.anniversaryday)
wd.find_element_by_name("aday").click()
wd.find_element_by_name("amonth").click()
Select(wd.find_element_by_name("amonth")).select_by_visible_text(add_new_contact.anniversarymonth)
wd.find_element_by_name("amonth").click()
wd.find_element_by_name("ayear").click()
wd.find_element_by_name("ayear").clear()
wd.find_element_by_name("ayear").send_keys(add_new_contact.anniversaryyear)
wd.find_element_by_name("address2").click()
wd.find_element_by_name("address2").clear()
wd.find_element_by_name("address2").send_keys(add_new_contact.address_2)
wd.find_element_by_name("phone2").clear()
wd.find_element_by_name("phone2").send_keys(add_new_contact.phone_2)
wd.find_element_by_name("notes").clear()
wd.find_element_by_name("notes").send_keys(add_new_contact.notes)
| 60.515625
| 110
| 0.674154
| 536
| 3,873
| 4.408582
| 0.11194
| 0.137114
| 0.29708
| 0.342785
| 0.869234
| 0.727042
| 0.289463
| 0.022006
| 0
| 0
| 0
| 0.002576
| 0.198296
| 3,873
| 64
| 111
| 60.515625
| 0.758454
| 0
| 0
| 0.163934
| 0
| 0
| 0.08983
| 0.007228
| 0
| 0
| 0
| 0
| 0
| 1
| 0.04918
| false
| 0
| 0
| 0
| 0.065574
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
5f65055d81665e397feccfc78dd6d2f299634b64
| 138
|
py
|
Python
|
cumulus2/template.py
|
peterkh/cumulus2
|
11352ce469acb0c319ba9cfb8691d80f4ae5048e
|
[
"Apache-2.0"
] | 1
|
2016-02-12T11:54:07.000Z
|
2016-02-12T11:54:07.000Z
|
cumulus2/template.py
|
peterkh/cumulus2
|
11352ce469acb0c319ba9cfb8691d80f4ae5048e
|
[
"Apache-2.0"
] | null | null | null |
cumulus2/template.py
|
peterkh/cumulus2
|
11352ce469acb0c319ba9cfb8691d80f4ae5048e
|
[
"Apache-2.0"
] | null | null | null |
"""
Template module for cumulus.
template class for reading yaml tempalte and creating data_source objects to
retrieve external data.
"""
| 23
| 76
| 0.797101
| 19
| 138
| 5.736842
| 0.842105
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.144928
| 138
| 5
| 77
| 27.6
| 0.923729
| 0.934783
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
5f6e27388481683369aca2bd805d2c503d7286e8
| 189
|
py
|
Python
|
deep_learning_zero/ch5/sample.py
|
kaito0223/shakyou
|
8d901b4da24fbf0c708e3eb429a57d194e9857c1
|
[
"MIT"
] | null | null | null |
deep_learning_zero/ch5/sample.py
|
kaito0223/shakyou
|
8d901b4da24fbf0c708e3eb429a57d194e9857c1
|
[
"MIT"
] | null | null | null |
deep_learning_zero/ch5/sample.py
|
kaito0223/shakyou
|
8d901b4da24fbf0c708e3eb429a57d194e9857c1
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
import numpy as np
X = np.random.rand(2) #input
W = np.random.rand(2,3) #weight
B = np.random.rand(3) #bias
print(X)
print(W)
print(B)
Y=np.dot(X,W)+B
print(Y)
| 11.8125
| 31
| 0.613757
| 40
| 189
| 2.9
| 0.5
| 0.206897
| 0.310345
| 0.224138
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.031646
| 0.164021
| 189
| 15
| 32
| 12.6
| 0.702532
| 0.190476
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.111111
| 0
| 0.111111
| 0.444444
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
5f79476b04b3854cb2181098acbee05c751aa836
| 307
|
py
|
Python
|
kinopoisk_unofficial/response/films/seasons_response.py
|
masterWeber/kinopoisk-api-unofficial-client
|
5c95e1ec6e43bd302399b63a1525ee7e61724155
|
[
"MIT"
] | 2
|
2021-11-13T12:23:41.000Z
|
2021-12-24T14:09:49.000Z
|
kinopoisk_unofficial/response/films/seasons_response.py
|
masterWeber/kinopoisk-api-unofficial-client
|
5c95e1ec6e43bd302399b63a1525ee7e61724155
|
[
"MIT"
] | 1
|
2022-03-29T19:13:24.000Z
|
2022-03-30T18:57:23.000Z
|
kinopoisk_unofficial/response/films/seasons_response.py
|
masterWeber/kinopoisk-api-unofficial-client
|
5c95e1ec6e43bd302399b63a1525ee7e61724155
|
[
"MIT"
] | 1
|
2021-11-13T12:30:01.000Z
|
2021-11-13T12:30:01.000Z
|
from dataclasses import field, dataclass
from typing import List
from kinopoisk_unofficial.contract.response import Response
from kinopoisk_unofficial.model.season import Season
@dataclass(frozen=True)
class SeasonsResponse(Response):
total: int
items: List[Season] = field(default_factory=list)
| 25.583333
| 59
| 0.814332
| 38
| 307
| 6.5
| 0.578947
| 0.105263
| 0.186235
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.120521
| 307
| 11
| 60
| 27.909091
| 0.914815
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.875
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
5f9b09cbcd120955bb173c4d9f5b1fd61f32f6e1
| 103
|
py
|
Python
|
notebooks/python_recap/_solutions/python_rehearsal6.py
|
jonasvdd/DS-python-data-analysis
|
835226f562ee0b0631d70e48a17c4526ff58a538
|
[
"BSD-3-Clause"
] | 65
|
2017-03-21T09:15:40.000Z
|
2022-02-01T23:43:08.000Z
|
notebooks/python_recap/_solutions/python_rehearsal6.py
|
jonasvdd/DS-python-data-analysis
|
835226f562ee0b0631d70e48a17c4526ff58a538
|
[
"BSD-3-Clause"
] | 100
|
2016-12-15T03:44:06.000Z
|
2022-03-07T08:14:07.000Z
|
notebooks/python_recap/_solutions/python_rehearsal6.py
|
jonasvdd/DS-python-data-analysis
|
835226f562ee0b0631d70e48a17c4526ff58a538
|
[
"BSD-3-Clause"
] | 52
|
2016-12-19T07:48:52.000Z
|
2022-02-19T17:53:48.000Z
|
np_pressures_hPa * math.exp(-gravit_acc * molar_mass_earth* height/(gas_constant*standard_temperature))
| 103
| 103
| 0.84466
| 15
| 103
| 5.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.048544
| 103
| 1
| 103
| 103
| 0.816327
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
5fb7671976b6e01ae676fe790432693d8f4d3e4c
| 286
|
py
|
Python
|
st_library/utils/generics/singleton.py
|
vartagg/dataprovider-py
|
e392af3dab21c99c51a32345710fcd0dc4023462
|
[
"Apache-2.0"
] | null | null | null |
st_library/utils/generics/singleton.py
|
vartagg/dataprovider-py
|
e392af3dab21c99c51a32345710fcd0dc4023462
|
[
"Apache-2.0"
] | 2
|
2018-03-27T11:06:46.000Z
|
2020-10-27T20:48:51.000Z
|
st_library/utils/generics/singleton.py
|
vartagg/dataprovider-py
|
e392af3dab21c99c51a32345710fcd0dc4023462
|
[
"Apache-2.0"
] | 4
|
2018-02-26T08:12:39.000Z
|
2018-05-18T06:01:01.000Z
|
class Singleton(object):
_instances = {}
def __new__(cls, *args, **kwargs):
if cls not in cls._instances:
# noinspection PyArgumentList
cls._instances[cls] = super(Singleton, cls).__new__(cls, *args, **kwargs)
return cls._instances[cls]
| 31.777778
| 85
| 0.618881
| 31
| 286
| 5.322581
| 0.516129
| 0.218182
| 0.121212
| 0.193939
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.258741
| 286
| 8
| 86
| 35.75
| 0.778302
| 0.094406
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0
| 0
| 0.666667
| 0
| 0
| 0
| 0
| null | 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
396e8a1e3e6aa7c66751f496564ba6b53523d4aa
| 43
|
py
|
Python
|
homemade_steganog/__init__.py
|
zoomie/homemade_steganog
|
1ab0a140b6a2e0d9d36073d067a2c808c97adf38
|
[
"MIT"
] | 1
|
2019-03-12T13:25:43.000Z
|
2019-03-12T13:25:43.000Z
|
homemade_steganog/__init__.py
|
zoomie/homemade_encryption
|
1ab0a140b6a2e0d9d36073d067a2c808c97adf38
|
[
"MIT"
] | 4
|
2020-03-24T16:43:01.000Z
|
2022-03-11T23:39:53.000Z
|
homemade_steganog/__init__.py
|
zoomie/homemade_encryption
|
1ab0a140b6a2e0d9d36073d067a2c808c97adf38
|
[
"MIT"
] | null | null | null |
from .home import Steg
__all__ = ['Steg',]
| 14.333333
| 22
| 0.674419
| 6
| 43
| 4.166667
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.162791
| 43
| 3
| 23
| 14.333333
| 0.694444
| 0
| 0
| 0
| 0
| 0
| 0.090909
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
3974ecf545e9249007cc970e291df529ea220e8f
| 83
|
py
|
Python
|
devind_helpers/validator/__init__.py
|
devind-team/devind-django-helpers
|
5c64d46a12802bbe0b70e44aa9d19bf975511b6e
|
[
"MIT"
] | null | null | null |
devind_helpers/validator/__init__.py
|
devind-team/devind-django-helpers
|
5c64d46a12802bbe0b70e44aa9d19bf975511b6e
|
[
"MIT"
] | 4
|
2022-02-18T09:24:05.000Z
|
2022-03-31T16:46:29.000Z
|
devind_helpers/validator/__init__.py
|
devind-team/devind-django-helpers
|
5c64d46a12802bbe0b70e44aa9d19bf975511b6e
|
[
"MIT"
] | null | null | null |
from .validators import Validator, BaseRule
__all__ = ('Validator', 'BaseRule',)
| 16.6
| 43
| 0.73494
| 8
| 83
| 7.125
| 0.75
| 0.596491
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.13253
| 83
| 4
| 44
| 20.75
| 0.791667
| 0
| 0
| 0
| 0
| 0
| 0.204819
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
39a9bf645816b1c506dcc188750ce0f86697bf35
| 241
|
py
|
Python
|
8. The Prisoner.py
|
Zfauser/Code-Combat-Introductory-To-Computer-Science-Python-Answers
|
231d17ad2224fc616c022b515bc14e78ec5822f9
|
[
"MIT"
] | 1
|
2021-02-25T16:43:08.000Z
|
2021-02-25T16:43:08.000Z
|
8. The Prisoner.py
|
Zfauser/Code-Combat-Introductory-To-Computer-Science-Python-Answers
|
231d17ad2224fc616c022b515bc14e78ec5822f9
|
[
"MIT"
] | null | null | null |
8. The Prisoner.py
|
Zfauser/Code-Combat-Introductory-To-Computer-Science-Python-Answers
|
231d17ad2224fc616c022b515bc14e78ec5822f9
|
[
"MIT"
] | null | null | null |
# Free the prisoner, defeat the guard and grab the gem.
hero.moveRight()
# Free Patrick from behind the "Weak Door".
hero.attack("Weak Door")
hero.moveRight(2)
# Defeat the guard, named "Two".
# Get the gem.
hero.moveRight()
hero.moveDown(3)
| 26.777778
| 55
| 0.73029
| 39
| 241
| 4.512821
| 0.564103
| 0.221591
| 0.159091
| 0.215909
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.009662
| 0.141079
| 241
| 9
| 56
| 26.777778
| 0.84058
| 0.576763
| 0
| 0.4
| 0
| 0
| 0.091837
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
39bfed4c3b2ea966740de31f26fe83daafbdbab5
| 171
|
py
|
Python
|
setup.py
|
andribas404/splay_benchmark
|
1ba2fe4d715b25db806c0b241c6adadd8d442a77
|
[
"MIT"
] | null | null | null |
setup.py
|
andribas404/splay_benchmark
|
1ba2fe4d715b25db806c0b241c6adadd8d442a77
|
[
"MIT"
] | null | null | null |
setup.py
|
andribas404/splay_benchmark
|
1ba2fe4d715b25db806c0b241c6adadd8d442a77
|
[
"MIT"
] | null | null | null |
"""
Setup.
python setup.py build_ext --inplace
"""
from distutils.core import setup
from Cython.Build import cythonize
setup(ext_modules=cythonize('splay_tree.pyx'))
| 13.153846
| 46
| 0.760234
| 24
| 171
| 5.291667
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.122807
| 171
| 12
| 47
| 14.25
| 0.846667
| 0.251462
| 0
| 0
| 0
| 0
| 0.116667
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
39d61db6e252ece16991b4c554bc384accb4d908
| 27,144
|
py
|
Python
|
line/f_MessageService.py
|
winbotscript/LineService
|
4c79029648e858e567378485e75276f865c1f73f
|
[
"Apache-2.0"
] | 1
|
2020-08-20T08:00:23.000Z
|
2020-08-20T08:00:23.000Z
|
line/f_MessageService.py
|
winbotscript/LineService
|
4c79029648e858e567378485e75276f865c1f73f
|
[
"Apache-2.0"
] | null | null | null |
line/f_MessageService.py
|
winbotscript/LineService
|
4c79029648e858e567378485e75276f865c1f73f
|
[
"Apache-2.0"
] | null | null | null |
#
# Autogenerated by Frugal Compiler (3.4.3)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
from threading import Lock
from frugal.middleware import Method
from frugal.exceptions import TApplicationExceptionType
from frugal.exceptions import TTransportExceptionType
from frugal.processor import FBaseProcessor
from frugal.processor import FProcessorFunction
from frugal.util.deprecate import deprecated
from frugal.util import make_hashable
from thrift.Thrift import TApplicationException
from thrift.Thrift import TMessageType
from thrift.transport.TTransport import TTransportException
from .ttypes import *
class Iface(object):
def fetchMessageOperations(self, ctx, localRevision, lastOpTimestamp, count):
"""
Args:
ctx: FContext
localRevision: int (signed 64 bits)
lastOpTimestamp: int (signed 64 bits)
count: int (signed 32 bits)
"""
pass
def getLastReadMessageIds(self, ctx, chatId):
"""
Args:
ctx: FContext
chatId: string
"""
pass
def multiGetLastReadMessageIds(self, ctx, chatIds):
"""
Args:
ctx: FContext
chatIds: list of string
"""
pass
class Client(Iface):
def __init__(self, provider, middleware=None):
"""
Create a new Client with an FServiceProvider containing a transport
and protocol factory.
Args:
provider: FServiceProvider with TSynchronousTransport
middleware: ServiceMiddleware or list of ServiceMiddleware
"""
middleware = middleware or []
if middleware and not isinstance(middleware, list):
middleware = [middleware]
self._transport = provider.get_transport()
self._protocol_factory = provider.get_protocol_factory()
self._oprot = self._protocol_factory.get_protocol(self._transport)
self._iprot = self._protocol_factory.get_protocol(self._transport)
self._write_lock = Lock()
middleware += provider.get_middleware()
self._methods = {
'fetchMessageOperations': Method(self._fetchMessageOperations, middleware),
'getLastReadMessageIds': Method(self._getLastReadMessageIds, middleware),
'multiGetLastReadMessageIds': Method(self._multiGetLastReadMessageIds, middleware),
}
def fetchMessageOperations(self, ctx, localRevision, lastOpTimestamp, count):
"""
Args:
ctx: FContext
localRevision: int (signed 64 bits)
lastOpTimestamp: int (signed 64 bits)
count: int (signed 32 bits)
"""
return self._methods['fetchMessageOperations']([ctx, localRevision, lastOpTimestamp, count])
def _fetchMessageOperations(self, ctx, localRevision, lastOpTimestamp, count):
self._send_fetchMessageOperations(ctx, localRevision, lastOpTimestamp, count)
return self._recv_fetchMessageOperations(ctx)
def _send_fetchMessageOperations(self, ctx, localRevision, lastOpTimestamp, count):
oprot = self._oprot
with self._write_lock:
oprot.get_transport().set_timeout(ctx.timeout)
oprot.write_request_headers(ctx)
oprot.writeMessageBegin('fetchMessageOperations', TMessageType.CALL, 0)
args = fetchMessageOperations_args()
args.localRevision = localRevision
args.lastOpTimestamp = lastOpTimestamp
args.count = count
args.write(oprot)
oprot.writeMessageEnd()
oprot.get_transport().flush()
def _recv_fetchMessageOperations(self, ctx):
self._iprot.read_response_headers(ctx)
_, mtype, _ = self._iprot.readMessageBegin()
if mtype == TMessageType.EXCEPTION:
x = TApplicationException()
x.read(self._iprot)
self._iprot.readMessageEnd()
if x.type == TApplicationExceptionType.RESPONSE_TOO_LARGE:
raise TTransportException(type=TTransportExceptionType.RESPONSE_TOO_LARGE, message=x.message)
raise x
result = fetchMessageOperations_result()
result.read(self._iprot)
self._iprot.readMessageEnd()
if result.e is not None:
raise result.e
if result.success is not None:
return result.success
x = TApplicationException(TApplicationExceptionType.MISSING_RESULT, "fetchMessageOperations failed: unknown result")
raise x
def getLastReadMessageIds(self, ctx, chatId):
"""
Args:
ctx: FContext
chatId: string
"""
return self._methods['getLastReadMessageIds']([ctx, chatId])
def _getLastReadMessageIds(self, ctx, chatId):
self._send_getLastReadMessageIds(ctx, chatId)
return self._recv_getLastReadMessageIds(ctx)
def _send_getLastReadMessageIds(self, ctx, chatId):
oprot = self._oprot
with self._write_lock:
oprot.get_transport().set_timeout(ctx.timeout)
oprot.write_request_headers(ctx)
oprot.writeMessageBegin('getLastReadMessageIds', TMessageType.CALL, 0)
args = getLastReadMessageIds_args()
args.chatId = chatId
args.write(oprot)
oprot.writeMessageEnd()
oprot.get_transport().flush()
def _recv_getLastReadMessageIds(self, ctx):
self._iprot.read_response_headers(ctx)
_, mtype, _ = self._iprot.readMessageBegin()
if mtype == TMessageType.EXCEPTION:
x = TApplicationException()
x.read(self._iprot)
self._iprot.readMessageEnd()
if x.type == TApplicationExceptionType.RESPONSE_TOO_LARGE:
raise TTransportException(type=TTransportExceptionType.RESPONSE_TOO_LARGE, message=x.message)
raise x
result = getLastReadMessageIds_result()
result.read(self._iprot)
self._iprot.readMessageEnd()
if result.e is not None:
raise result.e
if result.success is not None:
return result.success
x = TApplicationException(TApplicationExceptionType.MISSING_RESULT, "getLastReadMessageIds failed: unknown result")
raise x
def multiGetLastReadMessageIds(self, ctx, chatIds):
"""
Args:
ctx: FContext
chatIds: list of string
"""
return self._methods['multiGetLastReadMessageIds']([ctx, chatIds])
def _multiGetLastReadMessageIds(self, ctx, chatIds):
self._send_multiGetLastReadMessageIds(ctx, chatIds)
return self._recv_multiGetLastReadMessageIds(ctx)
def _send_multiGetLastReadMessageIds(self, ctx, chatIds):
oprot = self._oprot
with self._write_lock:
oprot.get_transport().set_timeout(ctx.timeout)
oprot.write_request_headers(ctx)
oprot.writeMessageBegin('multiGetLastReadMessageIds', TMessageType.CALL, 0)
args = multiGetLastReadMessageIds_args()
args.chatIds = chatIds
args.write(oprot)
oprot.writeMessageEnd()
oprot.get_transport().flush()
def _recv_multiGetLastReadMessageIds(self, ctx):
self._iprot.read_response_headers(ctx)
_, mtype, _ = self._iprot.readMessageBegin()
if mtype == TMessageType.EXCEPTION:
x = TApplicationException()
x.read(self._iprot)
self._iprot.readMessageEnd()
if x.type == TApplicationExceptionType.RESPONSE_TOO_LARGE:
raise TTransportException(type=TTransportExceptionType.RESPONSE_TOO_LARGE, message=x.message)
raise x
result = multiGetLastReadMessageIds_result()
result.read(self._iprot)
self._iprot.readMessageEnd()
if result.e is not None:
raise result.e
if result.success is not None:
return result.success
x = TApplicationException(TApplicationExceptionType.MISSING_RESULT, "multiGetLastReadMessageIds failed: unknown result")
raise x
class Processor(FBaseProcessor):
def __init__(self, handler, middleware=None):
"""
Create a new Processor.
Args:
handler: Iface
"""
if middleware and not isinstance(middleware, list):
middleware = [middleware]
super(Processor, self).__init__()
self.add_to_processor_map('fetchMessageOperations', _fetchMessageOperations(Method(handler.fetchMessageOperations, middleware), self.get_write_lock()))
self.add_to_processor_map('getLastReadMessageIds', _getLastReadMessageIds(Method(handler.getLastReadMessageIds, middleware), self.get_write_lock()))
self.add_to_processor_map('multiGetLastReadMessageIds', _multiGetLastReadMessageIds(Method(handler.multiGetLastReadMessageIds, middleware), self.get_write_lock()))
class _fetchMessageOperations(FProcessorFunction):
def __init__(self, handler, lock):
super(_fetchMessageOperations, self).__init__(handler, lock)
def process(self, ctx, iprot, oprot):
args = fetchMessageOperations_args()
args.read(iprot)
iprot.readMessageEnd()
result = fetchMessageOperations_result()
try:
result.success = self._handler([ctx, args.localRevision, args.lastOpTimestamp, args.count])
except TalkException as e:
result.e = e
except TApplicationException as ex:
with self._lock:
_write_application_exception(ctx, oprot, "fetchMessageOperations", exception=ex)
return
except Exception as e:
with self._lock:
_write_application_exception(ctx, oprot, "fetchMessageOperations", ex_code=TApplicationExceptionType.INTERNAL_ERROR, message=e.message)
raise
with self._lock:
try:
oprot.write_response_headers(ctx)
oprot.writeMessageBegin('fetchMessageOperations', TMessageType.REPLY, 0)
result.write(oprot)
oprot.writeMessageEnd()
oprot.get_transport().flush()
except TTransportException as e:
# catch a request too large error because the TMemoryOutputBuffer always throws that if too much data is written
if e.type == TTransportExceptionType.REQUEST_TOO_LARGE:
raise _write_application_exception(ctx, oprot, "fetchMessageOperations", ex_code=TApplicationExceptionType.RESPONSE_TOO_LARGE, message=e.args[0])
else:
raise e
class _getLastReadMessageIds(FProcessorFunction):
def __init__(self, handler, lock):
super(_getLastReadMessageIds, self).__init__(handler, lock)
def process(self, ctx, iprot, oprot):
args = getLastReadMessageIds_args()
args.read(iprot)
iprot.readMessageEnd()
result = getLastReadMessageIds_result()
try:
result.success = self._handler([ctx, args.chatId])
except TalkException as e:
result.e = e
except TApplicationException as ex:
with self._lock:
_write_application_exception(ctx, oprot, "getLastReadMessageIds", exception=ex)
return
except Exception as e:
with self._lock:
_write_application_exception(ctx, oprot, "getLastReadMessageIds", ex_code=TApplicationExceptionType.INTERNAL_ERROR, message=e.message)
raise
with self._lock:
try:
oprot.write_response_headers(ctx)
oprot.writeMessageBegin('getLastReadMessageIds', TMessageType.REPLY, 0)
result.write(oprot)
oprot.writeMessageEnd()
oprot.get_transport().flush()
except TTransportException as e:
# catch a request too large error because the TMemoryOutputBuffer always throws that if too much data is written
if e.type == TTransportExceptionType.REQUEST_TOO_LARGE:
raise _write_application_exception(ctx, oprot, "getLastReadMessageIds", ex_code=TApplicationExceptionType.RESPONSE_TOO_LARGE, message=e.args[0])
else:
raise e
class _multiGetLastReadMessageIds(FProcessorFunction):
def __init__(self, handler, lock):
super(_multiGetLastReadMessageIds, self).__init__(handler, lock)
def process(self, ctx, iprot, oprot):
args = multiGetLastReadMessageIds_args()
args.read(iprot)
iprot.readMessageEnd()
result = multiGetLastReadMessageIds_result()
try:
result.success = self._handler([ctx, args.chatIds])
except TalkException as e:
result.e = e
except TApplicationException as ex:
with self._lock:
_write_application_exception(ctx, oprot, "multiGetLastReadMessageIds", exception=ex)
return
except Exception as e:
with self._lock:
_write_application_exception(ctx, oprot, "multiGetLastReadMessageIds", ex_code=TApplicationExceptionType.INTERNAL_ERROR, message=e.message)
raise
with self._lock:
try:
oprot.write_response_headers(ctx)
oprot.writeMessageBegin('multiGetLastReadMessageIds', TMessageType.REPLY, 0)
result.write(oprot)
oprot.writeMessageEnd()
oprot.get_transport().flush()
except TTransportException as e:
# catch a request too large error because the TMemoryOutputBuffer always throws that if too much data is written
if e.type == TTransportExceptionType.REQUEST_TOO_LARGE:
raise _write_application_exception(ctx, oprot, "multiGetLastReadMessageIds", ex_code=TApplicationExceptionType.RESPONSE_TOO_LARGE, message=e.args[0])
else:
raise e
def _write_application_exception(ctx, oprot, method, ex_code=None, message=None, exception=None):
if exception is not None:
x = exception
else:
x = TApplicationException(type=ex_code, message=message)
oprot.write_response_headers(ctx)
oprot.writeMessageBegin(method, TMessageType.EXCEPTION, 0)
x.write(oprot)
oprot.writeMessageEnd()
oprot.get_transport().flush()
return x
class fetchMessageOperations_args(object):
"""
Attributes:
- localRevision
- lastOpTimestamp
- count
"""
def __init__(self, localRevision=None, lastOpTimestamp=None, count=None):
self.localRevision = localRevision
self.lastOpTimestamp = lastOpTimestamp
self.count = count
def read(self, iprot):
iprot.readStructBegin()
while True:
(fname, ftype, fid) = iprot.readFieldBegin()
if ftype == TType.STOP:
break
if fid == 2:
if ftype == TType.I64:
self.localRevision = iprot.readI64()
else:
iprot.skip(ftype)
elif fid == 3:
if ftype == TType.I64:
self.lastOpTimestamp = iprot.readI64()
else:
iprot.skip(ftype)
elif fid == 4:
if ftype == TType.I32:
self.count = iprot.readI32()
else:
iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
iprot.readStructEnd()
self.validate()
def write(self, oprot):
self.validate()
oprot.writeStructBegin('fetchMessageOperations_args')
if self.localRevision is not None:
oprot.writeFieldBegin('localRevision', TType.I64, 2)
oprot.writeI64(self.localRevision)
oprot.writeFieldEnd()
if self.lastOpTimestamp is not None:
oprot.writeFieldBegin('lastOpTimestamp', TType.I64, 3)
oprot.writeI64(self.lastOpTimestamp)
oprot.writeFieldEnd()
if self.count is not None:
oprot.writeFieldBegin('count', TType.I32, 4)
oprot.writeI32(self.count)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
return
def __hash__(self):
value = 17
value = (value * 31) ^ hash(make_hashable(self.localRevision))
value = (value * 31) ^ hash(make_hashable(self.lastOpTimestamp))
value = (value * 31) ^ hash(make_hashable(self.count))
return value
def __repr__(self):
L = ['%s=%r' % (key, value)
for key, value in self.__dict__.items()]
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
def __eq__(self, other):
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
def __ne__(self, other):
return not (self == other)
class fetchMessageOperations_result(object):
"""
Attributes:
- success
- e
"""
def __init__(self, success=None, e=None):
self.success = success
self.e = e
def read(self, iprot):
iprot.readStructBegin()
while True:
(fname, ftype, fid) = iprot.readFieldBegin()
if ftype == TType.STOP:
break
if fid == 0:
if ftype == TType.STRUCT:
self.success = MessageOperations()
self.success.read(iprot)
else:
iprot.skip(ftype)
elif fid == 1:
if ftype == TType.STRUCT:
self.e = TalkException()
self.e.read(iprot)
else:
iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
iprot.readStructEnd()
self.validate()
def write(self, oprot):
self.validate()
oprot.writeStructBegin('fetchMessageOperations_result')
if self.success is not None:
oprot.writeFieldBegin('success', TType.STRUCT, 0)
self.success.write(oprot)
oprot.writeFieldEnd()
if self.e is not None:
oprot.writeFieldBegin('e', TType.STRUCT, 1)
self.e.write(oprot)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
return
def __hash__(self):
value = 17
value = (value * 31) ^ hash(make_hashable(self.success))
value = (value * 31) ^ hash(make_hashable(self.e))
return value
def __repr__(self):
L = ['%s=%r' % (key, value)
for key, value in self.__dict__.items()]
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
def __eq__(self, other):
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
def __ne__(self, other):
return not (self == other)
class getLastReadMessageIds_args(object):
"""
Attributes:
- chatId
"""
def __init__(self, chatId=None):
self.chatId = chatId
def read(self, iprot):
iprot.readStructBegin()
while True:
(fname, ftype, fid) = iprot.readFieldBegin()
if ftype == TType.STOP:
break
if fid == 2:
if ftype == TType.STRING:
self.chatId = iprot.readString()
else:
iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
iprot.readStructEnd()
self.validate()
def write(self, oprot):
self.validate()
oprot.writeStructBegin('getLastReadMessageIds_args')
if self.chatId is not None:
oprot.writeFieldBegin('chatId', TType.STRING, 2)
oprot.writeString(self.chatId)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
return
def __hash__(self):
value = 17
value = (value * 31) ^ hash(make_hashable(self.chatId))
return value
def __repr__(self):
L = ['%s=%r' % (key, value)
for key, value in self.__dict__.items()]
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
def __eq__(self, other):
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
def __ne__(self, other):
return not (self == other)
class getLastReadMessageIds_result(object):
"""
Attributes:
- success
- e
"""
def __init__(self, success=None, e=None):
self.success = success
self.e = e
def read(self, iprot):
iprot.readStructBegin()
while True:
(fname, ftype, fid) = iprot.readFieldBegin()
if ftype == TType.STOP:
break
if fid == 0:
if ftype == TType.STRUCT:
self.success = LastReadMessageIds()
self.success.read(iprot)
else:
iprot.skip(ftype)
elif fid == 1:
if ftype == TType.STRUCT:
self.e = TalkException()
self.e.read(iprot)
else:
iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
iprot.readStructEnd()
self.validate()
def write(self, oprot):
self.validate()
oprot.writeStructBegin('getLastReadMessageIds_result')
if self.success is not None:
oprot.writeFieldBegin('success', TType.STRUCT, 0)
self.success.write(oprot)
oprot.writeFieldEnd()
if self.e is not None:
oprot.writeFieldBegin('e', TType.STRUCT, 1)
self.e.write(oprot)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
return
def __hash__(self):
value = 17
value = (value * 31) ^ hash(make_hashable(self.success))
value = (value * 31) ^ hash(make_hashable(self.e))
return value
def __repr__(self):
L = ['%s=%r' % (key, value)
for key, value in self.__dict__.items()]
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
def __eq__(self, other):
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
def __ne__(self, other):
return not (self == other)
class multiGetLastReadMessageIds_args(object):
"""
Attributes:
- chatIds
"""
def __init__(self, chatIds=None):
self.chatIds = chatIds
def read(self, iprot):
iprot.readStructBegin()
while True:
(fname, ftype, fid) = iprot.readFieldBegin()
if ftype == TType.STOP:
break
if fid == 2:
if ftype == TType.LIST:
self.chatIds = []
(_, elem602) = iprot.readListBegin()
for _ in range(elem602):
elem603 = iprot.readString()
self.chatIds.append(elem603)
iprot.readListEnd()
else:
iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
iprot.readStructEnd()
self.validate()
def write(self, oprot):
self.validate()
oprot.writeStructBegin('multiGetLastReadMessageIds_args')
if self.chatIds is not None:
oprot.writeFieldBegin('chatIds', TType.LIST, 2)
oprot.writeListBegin(TType.STRING, len(self.chatIds))
for elem604 in self.chatIds:
oprot.writeString(elem604)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
return
def __hash__(self):
value = 17
value = (value * 31) ^ hash(make_hashable(self.chatIds))
return value
def __repr__(self):
L = ['%s=%r' % (key, value)
for key, value in self.__dict__.items()]
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
def __eq__(self, other):
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
def __ne__(self, other):
return not (self == other)
class multiGetLastReadMessageIds_result(object):
"""
Attributes:
- success
- e
"""
def __init__(self, success=None, e=None):
self.success = success
self.e = e
def read(self, iprot):
iprot.readStructBegin()
while True:
(fname, ftype, fid) = iprot.readFieldBegin()
if ftype == TType.STOP:
break
if fid == 0:
if ftype == TType.LIST:
self.success = []
(_, elem605) = iprot.readListBegin()
for _ in range(elem605):
elem606 = LastReadMessageIds()
elem606.read(iprot)
self.success.append(elem606)
iprot.readListEnd()
else:
iprot.skip(ftype)
elif fid == 1:
if ftype == TType.STRUCT:
self.e = TalkException()
self.e.read(iprot)
else:
iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
iprot.readStructEnd()
self.validate()
def write(self, oprot):
self.validate()
oprot.writeStructBegin('multiGetLastReadMessageIds_result')
if self.success is not None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRUCT, len(self.success))
for elem607 in self.success:
elem607.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.e is not None:
oprot.writeFieldBegin('e', TType.STRUCT, 1)
self.e.write(oprot)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
return
def __hash__(self):
value = 17
value = (value * 31) ^ hash(make_hashable(self.success))
value = (value * 31) ^ hash(make_hashable(self.e))
return value
def __repr__(self):
L = ['%s=%r' % (key, value)
for key, value in self.__dict__.items()]
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
def __eq__(self, other):
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
def __ne__(self, other):
return not (self == other)
| 35.57536
| 171
| 0.597222
| 2,578
| 27,144
| 6.069822
| 0.082234
| 0.014379
| 0.010353
| 0.019555
| 0.740542
| 0.70271
| 0.682388
| 0.654269
| 0.632541
| 0.611388
| 0
| 0.007697
| 0.31075
| 27,144
| 762
| 172
| 35.622047
| 0.828692
| 0.050066
| 0
| 0.732082
| 1
| 0
| 0.040028
| 0.031445
| 0
| 0
| 0
| 0
| 0
| 1
| 0.122867
| false
| 0.005119
| 0.020478
| 0.030717
| 0.237201
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
39f17c6cf9e734ea907636289c61a9999dc0de12
| 251
|
py
|
Python
|
src/core/views.py
|
Ao99/django-boilerplate
|
7fa8078b67655698a4070ce58c10d2226fe1d59b
|
[
"MIT"
] | null | null | null |
src/core/views.py
|
Ao99/django-boilerplate
|
7fa8078b67655698a4070ce58c10d2226fe1d59b
|
[
"MIT"
] | null | null | null |
src/core/views.py
|
Ao99/django-boilerplate
|
7fa8078b67655698a4070ce58c10d2226fe1d59b
|
[
"MIT"
] | null | null | null |
from django.shortcuts import render
from django.views import View
# Create your views here.
class CoreView(View):
template_name = 'core/home.html'
def get(self, request, *args, **kwargs):
return render(request, self.template_name, {})
| 31.375
| 54
| 0.717131
| 34
| 251
| 5.235294
| 0.705882
| 0.11236
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.171315
| 251
| 8
| 54
| 31.375
| 0.855769
| 0.091633
| 0
| 0
| 0
| 0
| 0.061674
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0.333333
| 0.166667
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 4
|
f2fea27459e59001e49be2e7ed0478672dee266a
| 264
|
py
|
Python
|
clamor/rest/endpoints/__init__.py
|
TomSputz/Clamor
|
13222b90532938e6ebdbe8aea0430512e7d22817
|
[
"MIT"
] | 15
|
2019-07-05T20:26:18.000Z
|
2020-09-18T12:44:16.000Z
|
clamor/rest/endpoints/__init__.py
|
TomSputz/Clamor
|
13222b90532938e6ebdbe8aea0430512e7d22817
|
[
"MIT"
] | 7
|
2019-07-07T19:55:07.000Z
|
2019-08-20T22:07:31.000Z
|
clamor/rest/endpoints/__init__.py
|
TomSputz/Clamor
|
13222b90532938e6ebdbe8aea0430512e7d22817
|
[
"MIT"
] | 6
|
2019-07-07T20:39:29.000Z
|
2020-11-06T10:12:20.000Z
|
# -*- coding: utf-8 -*-
from . import base
from .audit_log import *
from .channel import *
from .emoji import *
from .gateway import *
from .guild import *
from .invite import *
from .oauth import *
from .user import *
from .voice import *
from .webhook import *
| 18.857143
| 24
| 0.69697
| 37
| 264
| 4.945946
| 0.459459
| 0.491803
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.004673
| 0.189394
| 264
| 13
| 25
| 20.307692
| 0.850467
| 0.079545
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
84513ebf1e835ed2f032b1060dd720580d3e05a2
| 668
|
py
|
Python
|
practicer_flask/app.py
|
DominikPott/practicer-flask
|
c8e523095bdd5912dadb7357d16a4e76229a04da
|
[
"MIT"
] | null | null | null |
practicer_flask/app.py
|
DominikPott/practicer-flask
|
c8e523095bdd5912dadb7357d16a4e76229a04da
|
[
"MIT"
] | null | null | null |
practicer_flask/app.py
|
DominikPott/practicer-flask
|
c8e523095bdd5912dadb7357d16a4e76229a04da
|
[
"MIT"
] | null | null | null |
import os
from flask import Flask
import practicer_flask.auth
import practicer_flask.exercises
import practicer_flask.dashboard
import practicer_flask.topic
import practicer_flask.model_viewer
def create_app(test_config=None):
app = Flask(__name__)
app.config.from_mapping(SECRET_KEY=os.environ.get("SECRET_KEY", 'local'))
app.register_blueprint(practicer_flask.auth.bp)
app.register_blueprint(practicer_flask.exercises.bp)
app.register_blueprint(practicer_flask.dashboard.bp)
app.register_blueprint(practicer_flask.topic.bp)
return app
app = create_app()
if __name__ == "__main__":
app.run(debug=os.environ.get("DEV", False))
| 23.857143
| 77
| 0.784431
| 92
| 668
| 5.347826
| 0.369565
| 0.256098
| 0.203252
| 0.235772
| 0.288618
| 0.219512
| 0
| 0
| 0
| 0
| 0
| 0
| 0.118263
| 668
| 27
| 78
| 24.740741
| 0.835314
| 0
| 0
| 0
| 0
| 0
| 0.038922
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.055556
| false
| 0
| 0.388889
| 0
| 0.5
| 0.222222
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
8460d12d7847a84d2047777b7d49fa013dbd6421
| 92
|
py
|
Python
|
back/apps/base_user/apps.py
|
pylvin/nuxt-drf-template
|
e3f32cf98a2bdf393f88fbda2afedf2c0bf99dc7
|
[
"MIT"
] | 2
|
2021-11-16T03:47:06.000Z
|
2021-12-21T20:19:30.000Z
|
back/apps/base_user/apps.py
|
pylvin/nuxt-drf-template
|
e3f32cf98a2bdf393f88fbda2afedf2c0bf99dc7
|
[
"MIT"
] | null | null | null |
back/apps/base_user/apps.py
|
pylvin/nuxt-drf-template
|
e3f32cf98a2bdf393f88fbda2afedf2c0bf99dc7
|
[
"MIT"
] | 2
|
2021-12-21T20:19:39.000Z
|
2022-01-03T11:27:04.000Z
|
from django.apps import AppConfig
class BaseUserConfig(AppConfig):
name = 'base_user'
| 15.333333
| 33
| 0.76087
| 11
| 92
| 6.272727
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.163043
| 92
| 5
| 34
| 18.4
| 0.896104
| 0
| 0
| 0
| 0
| 0
| 0.097826
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
ffc0fbef26aaac232d9390250ce89e31f64b7ad8
| 31
|
py
|
Python
|
multinet/db/models/__init__.py
|
multinet-app/multinet-girder
|
f34c87849d92c7fe2f8589760f97bebbe04bd4af
|
[
"Apache-2.0"
] | 3
|
2019-10-22T15:21:10.000Z
|
2020-02-13T17:40:07.000Z
|
multinet/db/models/__init__.py
|
multinet-app/multinet
|
f34c87849d92c7fe2f8589760f97bebbe04bd4af
|
[
"Apache-2.0"
] | 183
|
2019-08-01T14:27:00.000Z
|
2020-03-04T17:47:49.000Z
|
multinet/db/models/__init__.py
|
multinet-app/multinet-girder
|
f34c87849d92c7fe2f8589760f97bebbe04bd4af
|
[
"Apache-2.0"
] | 2
|
2020-08-20T11:57:17.000Z
|
2020-11-10T22:54:19.000Z
|
"""ORM models for multinet."""
| 15.5
| 30
| 0.645161
| 4
| 31
| 5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.129032
| 31
| 1
| 31
| 31
| 0.740741
| 0.774194
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
fff27be5ec642c73c3bac5ec2ecda165d7fe17c5
| 145
|
py
|
Python
|
Hackerrank_python/15.numpy/10.Min and Max.py
|
manish1822510059/Hackerrank
|
7c6e4553f033f067e04dc6c756ef90cb43f3c4a8
|
[
"MIT"
] | 39
|
2020-09-27T05:32:05.000Z
|
2022-01-08T18:04:05.000Z
|
Hackerrank_python/15.numpy/10.Min and Max.py
|
manish1822510059/Hackerrank
|
7c6e4553f033f067e04dc6c756ef90cb43f3c4a8
|
[
"MIT"
] | 5
|
2020-10-02T13:33:00.000Z
|
2021-03-01T14:06:08.000Z
|
Hackerrank_python/15.numpy/10.Min and Max.py
|
manish1822510059/Hackerrank
|
7c6e4553f033f067e04dc6c756ef90cb43f3c4a8
|
[
"MIT"
] | 6
|
2020-10-03T04:04:55.000Z
|
2021-10-18T04:07:53.000Z
|
import numpy as arr
n,m=map(int,input().split())
ar=([list(map(int,input().split()))for _ in range(n)])
arr1=arr.min(ar,axis=1)
print(max(arr1))
| 24.166667
| 54
| 0.668966
| 29
| 145
| 3.310345
| 0.724138
| 0.125
| 0.229167
| 0.333333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.022388
| 0.075862
| 145
| 5
| 55
| 29
| 0.69403
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.2
| 0
| 0.2
| 0.2
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
081691097da1b52252fbbf22f08b3e7856a39982
| 5,825
|
py
|
Python
|
gonder_rc.py
|
TarikCinar/python-sesli-asistan
|
1a29a8d3081b67ff352cf03f7b01ac01b7118deb
|
[
"MIT"
] | 1
|
2021-05-28T17:27:50.000Z
|
2021-05-28T17:27:50.000Z
|
gonder_rc.py
|
TarikCinar/python-sesli-asistan
|
1a29a8d3081b67ff352cf03f7b01ac01b7118deb
|
[
"MIT"
] | null | null | null |
gonder_rc.py
|
TarikCinar/python-sesli-asistan
|
1a29a8d3081b67ff352cf03f7b01ac01b7118deb
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
# Resource object code
#
# Created by: The Resource Compiler for PyQt5 (Qt v5.13.0)
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore
qt_resource_data = b"\
\x00\x00\x04\x1a\
\x00\
\x01\x08\x3e\x78\x9c\xed\x9c\x4d\x6e\xd3\x50\x14\x85\x1d\x65\x10\
\x66\x61\xc4\x2c\x75\x87\xdd\x85\x59\x4a\x77\x92\xcc\xd2\x59\x97\
\xc2\x12\x40\x62\x01\x2c\xa1\x48\xb4\x62\x58\x86\x0c\x10\xc1\x76\
\x52\xc7\x3e\x21\x8e\xe3\xdf\x77\xdf\xfb\xbe\xea\x22\x1d\x17\x61\
\xc7\xe7\xbe\x73\x18\x54\x8d\xa2\x59\xfa\xb5\xd9\x44\xe9\x9f\xb7\
\xd1\xdd\xbb\x59\xf4\x21\x8a\xa2\xbb\x74\xd2\x4b\xd9\xc5\xfc\x7a\
\x4e\xfa\x3d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
\x00\x00\x08\x97\x97\xed\x6a\xf3\xfc\xb0\x7a\x7a\xde\xae\xee\x9f\
\x1e\xe3\xf7\x53\x3f\x0f\x8c\x4b\xe6\xff\xcb\xc3\xcd\x2e\x9f\xed\
\xea\xf5\x79\x7b\xf3\xf8\x73\x1b\xdf\x4e\xfd\x5c\x30\x0e\x15\xff\
\x4b\x93\xee\xc1\xa7\x1f\xdb\xf8\xe3\xd4\xcf\x07\xc3\x72\xce\xff\
\x62\x0f\xe8\x06\xaf\xb9\xe4\x3f\xdd\xe0\x37\x8d\xfd\xa7\x1b\xbc\
\xa4\x8d\xff\x74\x83\x3f\x74\xf1\x9f\x6e\xb0\x4f\x2f\xfe\xd3\x0d\
\x66\xe9\xdb\x7f\xba\xc1\x16\x43\xf9\x4f\x37\xd8\x60\x70\xff\xe9\
\x06\xa7\x19\xd3\x7f\xba\xc1\x3d\xa6\xf0\x9f\x6e\x70\x87\x49\xfd\
\xa7\x1b\x26\xc7\x15\xff\xe9\x86\x69\x70\xcd\x7f\xba\x61\x5c\x9c\
\xf5\x9f\x6e\x18\x05\x0b\xfe\xd3\x0d\xc3\x61\xc9\x7f\xba\xa1\x7f\
\x4c\xfa\x5f\xce\x04\xba\xa1\x13\xd6\xfd\x2f\xf6\x80\x6e\x68\x85\
\x2f\xfe\x17\x43\x37\x5c\x85\x77\xfe\x97\x33\x81\x6e\xb8\x88\xcf\
\xfe\x17\x7b\x40\x37\x9c\x25\x04\xff\x8b\xa1\x1b\x4e\x08\xca\xff\
\x72\x26\xd0\x0d\x39\xa1\xfa\x5f\xec\x41\xe0\xdd\x10\xba\xff\xc5\
\x04\xda\x0d\xf8\x7f\x3a\x21\x75\x03\xfe\xd7\xec\x41\x00\xdd\x80\
\xff\x0d\xc6\xe3\x6e\xc0\xff\xeb\xc6\xb7\x6e\xc0\xff\x96\x7b\xe0\
\x49\x37\xe0\x7f\xc7\x31\xde\x0d\xf8\xdf\xdf\x58\xec\x06\xfc\x1f\
\x60\x0f\x0c\x75\x43\xb6\xaf\x59\x7e\xbd\x3c\xac\x3e\xa7\xbb\xf0\
\x6d\xea\x77\xe7\xd5\x18\xed\x86\xec\x79\xf7\x7b\xb1\xba\xcf\x7f\
\x3f\x58\x9a\x6b\x87\xfd\x78\x9d\xfc\x9d\x1a\x1d\x8b\xdd\x70\x8e\
\xec\x73\x64\x73\xd8\x0d\xb2\xe3\x9a\x3d\x30\xd4\x0d\x6d\x20\x3b\
\x1a\x8e\xd1\x6e\xe8\x0a\xd9\x71\x3a\x3e\x75\x43\x17\x42\xcf\x0e\
\xdf\xbb\xa1\x2b\xc1\x64\x47\xa0\xdd\xd0\x05\x5f\xb3\x83\x6e\xe8\
\x07\xeb\xd9\x41\x37\x0c\x87\xa9\xec\xa0\x1b\x46\xc7\xd5\xec\xa0\
\x1b\xc6\x01\xff\xfd\x86\xfc\xf7\x1f\x57\xcf\x70\xe3\xb3\xce\xff\
\xff\x6a\x31\x75\x86\xc9\xf8\x56\x58\x3f\xc3\x8d\x27\xd0\x8c\xf7\
\xf5\x0c\x37\x3e\xeb\x01\x64\x7c\x30\x67\xf8\x1a\xdf\x3d\xca\xf8\
\xd0\xcf\x70\xe3\x31\x9c\xf1\x9c\xe1\xf6\x63\x21\xe3\x39\xc3\x03\
\xf8\xee\x68\xc6\xf3\xf3\x9f\x03\x8e\x81\x8c\xe7\xe7\xbf\xfb\x1f\
\x0b\x19\xff\x06\xfe\xf7\xe8\xbb\xa3\x19\x5f\x07\xfe\x77\x1c\x03\
\x19\x5f\x07\xfe\xb7\x1b\x4b\x19\x5f\x07\xfe\x5f\xe9\xbb\xc1\x8c\
\xaf\x03\xff\x1b\x8c\xf1\x8c\xaf\x03\xff\xcf\x8f\x2f\x19\x5f\x07\
\xfe\xff\xc7\x77\xcf\x32\xbe\x0e\xfc\x3f\x8c\xc7\x19\x5f\x47\xe8\
\xfe\x87\x90\xf1\x75\x84\xea\x7f\x48\x19\x5f\x47\x50\xfe\x07\x9a\
\xf1\x75\x84\xe0\x7f\xe8\x19\x5f\x87\xcf\xfe\x93\xf1\x97\xf1\xce\
\x7f\x32\xfe\x2a\x7c\xf1\x9f\x8c\x6f\x87\x75\xff\xc9\xf8\x6e\x98\
\xf4\x9f\x8c\xef\x0d\x4b\xfe\x93\xf1\xfd\x63\xc1\x7f\x32\x7e\x38\
\x9c\xf5\x9f\x8c\x1f\x05\xd7\xfc\x27\xe3\xc7\xc5\x15\xff\xc9\xf8\
\x69\x98\xd4\x7f\x32\x7e\x72\xa6\xf0\x9f\x8c\x77\x87\x31\xfd\x27\
\xe3\xdd\x63\x70\xff\xc9\x78\xa7\x19\xca\x7f\x32\xde\x06\x7d\xfb\
\x4f\xc6\xdb\xa2\x17\xff\xc9\x78\xb3\x74\xf1\x9f\x8c\xb7\x4f\x1b\
\xff\xc9\x78\x7f\x68\xec\x3f\x19\xef\x25\x97\xfc\x27\xe3\xfd\xe6\
\x9c\xff\x64\x7c\x18\x54\xfc\x27\xe3\x83\x23\xff\xfd\x5e\x64\x3c\
\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\
\x73\xec\x42\xe7\xab\xe8\x2f\xaa\x13\xd1\x0b\xd1\x33\xd1\xd1\x5a\
\xf4\x52\xf4\x5c\x74\xa4\x3a\x16\xbd\x10\x3d\x13\x1d\x25\xa2\x97\
\xa2\xe7\xa2\xcb\x8f\x98\xeb\x58\xf4\x42\x74\xa4\x3a\x11\xbd\x14\
\x3d\x13\x7d\xbc\xe3\x41\xc7\xa2\xe7\xa2\x23\xd5\x89\xe8\x85\xe8\
\x99\xe8\xb7\x3b\x16\x7a\x29\x7a\x2e\x3a\x52\x1d\x8b\x5e\x88\x9e\
\x89\xde\x3f\x62\x49\xe7\x77\xfc\x7b\xd4\xfb\x3b\x96\x2e\xec\x1f\
\xf1\x8f\xdc\xf1\x78\xe1\xed\x33\xfe\xae\x3e\xe2\xf1\x42\x61\xc3\
\xaf\xca\x67\x2c\x2e\x94\x36\xe5\x7b\xf9\xa5\x14\x17\xe2\xb3\x5a\
\xfe\xbe\xfc\x7b\x72\x3f\x79\x1e\x79\x5e\xf9\x3c\xf2\x79\xe5\x7d\
\xe8\xfb\xd2\xf7\x59\xd2\xf2\xbe\xd5\x0f\xf5\x2b\x16\xbd\xab\x6a\
\xdd\x07\xdd\x97\x75\x55\xeb\xbe\xe9\x3e\x26\xa2\x77\x55\xad\xfb\
\x1e\x8b\x5e\x57\xb5\x9e\x27\x3d\x6f\x89\xe8\x5d\x55\xeb\x79\x8e\
\x45\xaf\xab\x5a\xf3\x42\xf3\x24\xa9\x6a\xcd\x23\xcd\xab\x58\xf4\
\xae\xaa\x35\x0f\x35\x2f\xd7\x55\xad\x79\xab\x79\x9c\x88\xae\xca\
\x93\xbc\x0f\x9c\x7f\x31\x73\xbc\x32\
"
qt_resource_name = b"\
\x00\x09\
\x0c\x78\x54\x88\
\x00\x6e\
\x00\x65\x00\x77\x00\x50\x00\x72\x00\x65\x00\x66\x00\x69\x00\x78\
\x00\x0a\
\x0a\xc8\x83\x1f\
\x00\x67\
\x00\x6f\x00\x6e\x00\x64\x00\x65\x00\x72\x00\x2e\x00\x69\x00\x63\x00\x6f\
"
qt_resource_struct_v1 = b"\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x02\
\x00\x00\x00\x18\x00\x01\x00\x00\x00\x01\x00\x00\x00\x00\
"
qt_resource_struct_v2 = b"\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\
\x00\x00\x00\x00\x00\x00\x00\x00\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x02\
\x00\x00\x00\x00\x00\x00\x00\x00\
\x00\x00\x00\x18\x00\x01\x00\x00\x00\x01\x00\x00\x00\x00\
\x00\x00\x01\x6e\xda\x88\xff\x59\
"
qt_version = [int(v) for v in QtCore.qVersion().split('.')]
if qt_version < [5, 8, 0]:
rcc_version = 1
qt_resource_struct = qt_resource_struct_v1
else:
rcc_version = 2
qt_resource_struct = qt_resource_struct_v2
def qInitResources():
QtCore.qRegisterResourceData(rcc_version, qt_resource_struct, qt_resource_name, qt_resource_data)
def qCleanupResources():
QtCore.qUnregisterResourceData(rcc_version, qt_resource_struct, qt_resource_name, qt_resource_data)
qInitResources()
| 47.357724
| 103
| 0.72721
| 1,329
| 5,825
| 3.158766
| 0.222724
| 0.13292
| 0.154359
| 0.148642
| 0.135779
| 0.135779
| 0.120534
| 0.120534
| 0.120534
| 0.120534
| 0
| 0.27106
| 0.036052
| 5,825
| 122
| 104
| 47.745902
| 0.476581
| 0.026094
| 0
| 0.075472
| 0
| 0.688679
| 0.000176
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0.018868
| false
| 0
| 0.009434
| 0
| 0.028302
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
08540bf2ac8cadc1cf3900bd14a8f79f2ba8831e
| 146
|
py
|
Python
|
week-02/appendA.py
|
norbertbodo91/pythonExercises
|
9cd773c5d6ce3280d19a84ef12b8fd478ff09613
|
[
"MIT"
] | null | null | null |
week-02/appendA.py
|
norbertbodo91/pythonExercises
|
9cd773c5d6ce3280d19a84ef12b8fd478ff09613
|
[
"MIT"
] | null | null | null |
week-02/appendA.py
|
norbertbodo91/pythonExercises
|
9cd773c5d6ce3280d19a84ef12b8fd478ff09613
|
[
"MIT"
] | null | null | null |
def appendA(toAppend):
newWord = toAppend + 'a'
return newWord
print(appendA(toAppend = raw_input("Enter a word to add an A letter: ")))
| 24.333333
| 73
| 0.684932
| 21
| 146
| 4.714286
| 0.714286
| 0.30303
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.19863
| 146
| 5
| 74
| 29.2
| 0.846154
| 0
| 0
| 0
| 0
| 0
| 0.232877
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 0
| 0.5
| 0.25
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
08597f4873dfad388e0eb75f921c519b7373d12a
| 180
|
py
|
Python
|
windscribe/__init__.py
|
Dayzpd/Python-Windscribe
|
eaaca7b39286434ec8588c967076f0b5b9961d91
|
[
"MIT"
] | 9
|
2020-09-17T19:42:18.000Z
|
2022-01-04T07:14:37.000Z
|
windscribe/__init__.py
|
Dayzpd/Python-Windscribe
|
eaaca7b39286434ec8588c967076f0b5b9961d91
|
[
"MIT"
] | 4
|
2020-10-28T16:22:54.000Z
|
2022-01-04T07:13:18.000Z
|
windscribe/__init__.py
|
Dayzpd/Python-Windscribe
|
eaaca7b39286434ec8588c967076f0b5b9961d91
|
[
"MIT"
] | 4
|
2020-12-11T11:13:27.000Z
|
2022-01-16T02:40:55.000Z
|
__all__ = [
'account',
'connect',
'locations',
'login',
'logout',
]
from .windscribe import (
account,
connect,
locations,
login,
logout,
)
| 12
| 25
| 0.527778
| 14
| 180
| 6.5
| 0.642857
| 0.307692
| 0.505495
| 0.615385
| 0.747253
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.327778
| 180
| 15
| 26
| 12
| 0.752066
| 0
| 0
| 0
| 0
| 0
| 0.187845
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.071429
| 0
| 0.071429
| 0
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
f286492200c20b0ffd878c540e355986ac87e759
| 265
|
py
|
Python
|
__init__.py
|
Lukas-Dresel/dice22_breach_binja
|
7b481b9209e56203b17d24f4a03e567765cf77d7
|
[
"MIT"
] | null | null | null |
__init__.py
|
Lukas-Dresel/dice22_breach_binja
|
7b481b9209e56203b17d24f4a03e567765cf77d7
|
[
"MIT"
] | null | null | null |
__init__.py
|
Lukas-Dresel/dice22_breach_binja
|
7b481b9209e56203b17d24f4a03e567765cf77d7
|
[
"MIT"
] | null | null | null |
import binaryninja
from .breach_arch import BreachArch
BreachArch.register()
from .breach_programview import BreachProgramView
BreachProgramView.register()
from .breach_calling_convention import BreachCallingConvention
from .breach_platform import BreachPlatform
| 26.5
| 62
| 0.879245
| 27
| 265
| 8.444444
| 0.518519
| 0.175439
| 0.157895
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.083019
| 265
| 10
| 63
| 26.5
| 0.938272
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.714286
| 0
| 0.714286
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
f2957c2436185eaacb1c43fe2b6685f21c467731
| 188
|
py
|
Python
|
python/testData/inspections/PyStringFormatInspection/PackedRefInsideList.py
|
truthiswill/intellij-community
|
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
|
[
"Apache-2.0"
] | 2
|
2019-04-28T07:48:50.000Z
|
2020-12-11T14:18:08.000Z
|
python/testData/inspections/PyStringFormatInspection/PackedRefInsideList.py
|
truthiswill/intellij-community
|
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
|
[
"Apache-2.0"
] | 173
|
2018-07-05T13:59:39.000Z
|
2018-08-09T01:12:03.000Z
|
python/testData/inspections/PyStringFormatInspection/PackedRefInsideList.py
|
truthiswill/intellij-community
|
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
|
[
"Apache-2.0"
] | 2
|
2020-03-15T08:57:37.000Z
|
2020-04-07T04:48:14.000Z
|
list = [3, 4]
"{3}".format(*[1, 2, *list])
"{4}".format(*[1, 2, *list])
"{1}".format(*[1, 2, *list])
"{3}".format(*[*list, 1, 2])
"{4}".format(*[*list, 1, 2])
"{1}".format(*[*list, 1, 2])
| 23.5
| 28
| 0.446809
| 33
| 188
| 2.545455
| 0.181818
| 0.142857
| 0.285714
| 0.428571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.120482
| 0.117021
| 188
| 8
| 29
| 23.5
| 0.385542
| 0
| 0
| 0
| 0
| 0
| 0.095238
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
f2a46d1dd481c7acb620b8393b2d3f64e291c4db
| 3,062
|
py
|
Python
|
externals/IBK/scripts/personaltypes.py
|
Arombolosh/PVTool
|
043f4c94b1f473e6e26b2ee0da8e6a064d9343c5
|
[
"BSD-3-Clause"
] | 2
|
2020-06-03T08:22:25.000Z
|
2020-06-04T13:05:19.000Z
|
externals/IBK/scripts/personaltypes.py
|
Arombolosh/PVTool
|
043f4c94b1f473e6e26b2ee0da8e6a064d9343c5
|
[
"BSD-3-Clause"
] | null | null | null |
externals/IBK/scripts/personaltypes.py
|
Arombolosh/PVTool
|
043f4c94b1f473e6e26b2ee0da8e6a064d9343c5
|
[
"BSD-3-Clause"
] | null | null | null |
############################################################################
#
# Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
# Contact: http://www.qt-project.org/legal
#
# This file is part of Qt Creator.
#
# Commercial License Usage
# Licensees holding valid commercial Qt licenses may use this file in
# accordance with the commercial license agreement provided with the
# Software or, alternatively, in accordance with the terms contained in
# a written agreement between you and Digia. For licensing terms and
# conditions see http://www.qt.io/licensing. For further information
# use the contact form at http://www.qt.io/contact-us.
#
# GNU Lesser General Public License Usage
# Alternatively, this file may be used under the terms of the GNU Lesser
# General Public License version 2.1 or version 3 as published by the Free
# Software Foundation and appearing in the file LICENSE.LGPLv21 and
# LICENSE.LGPLv3 included in the packaging of this file. Please review the
# following information to ensure the GNU Lesser General Public License
# requirements will be met: https://www.gnu.org/licenses/lgpl.html and
# http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
#
# In addition, as a special exception, Digia gives you certain additional
# rights. These rights are described in the Digia Qt LGPL Exception
# version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
#
#############################################################################
# This is a place to add your own dumpers for testing purposes.
# Any contents here will be picked up by GDB and LLDB based
# debugging in Qt Creator automatically. This code is not used
# when debugging with CDB on Windows.
# NOTE: This file will get overwritten when updating Qt Creator.
#
# To add dumpers that don't get overwritten, copy this file here
# to a safe location outside the Qt Creator installation and
# make this location known to Qt Creator using the Debugger /
# GDB / Dumper customization / Additional file setting.
# Example to display a simple type
# template<typename U, typename V> struct MapNode
# {
# U key;
# V data;
# }
#
# def qdump__MapNode(d, value):
# d.putValue("This is the value column contents")
# d.putNumChild(2)
# if d.isExpanded():
# with Children(d):
# # Compact simple case.
# d.putSubItem("key", value["key"])
# # Same effect, with more customization possibilities.
# with SubItem(d, "data")
# d.putItem("data", value["data"])
# Check http://qt-project.org/doc/qtcreator-3.2/creator-debugging-helpers.html
# for more details or look at qttypes.py, stdtypes.py, boosttypes.py
# for more complex examples.
from dumper import *
from stdtypes import *
######################## Your code below #######################
# copy this file over the corresponding file in qt designer installation
def qdump__IBK__Path(d, value):
qdump__std__string(d, value["m_path"])
def qdump__IBK__Unit(d, value):
qdump__std__string(d, value["m_name"])
| 39.25641
| 78
| 0.68452
| 437
| 3,062
| 4.748284
| 0.455378
| 0.026988
| 0.013012
| 0.031807
| 0.070843
| 0.056867
| 0.026024
| 0.026024
| 0
| 0
| 0
| 0.006714
| 0.173089
| 3,062
| 77
| 79
| 39.766234
| 0.812796
| 0.828217
| 0
| 0
| 0
| 0
| 0.045455
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.333333
| 0
| 0.666667
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
4b385a13715b06d087f942d7458bcb33eb5bba5d
| 74
|
py
|
Python
|
src/wagtail_tag_manager/__init__.py
|
Tehnode/wagtail-tag-manager
|
048a03fe61b57ddd1eea0377ab26cf96527f5457
|
[
"BSD-3-Clause"
] | 59
|
2018-06-13T07:30:42.000Z
|
2022-03-22T02:14:34.000Z
|
src/wagtail_tag_manager/__init__.py
|
Tehnode/wagtail-tag-manager
|
048a03fe61b57ddd1eea0377ab26cf96527f5457
|
[
"BSD-3-Clause"
] | 74
|
2018-08-09T20:52:56.000Z
|
2022-03-02T08:39:30.000Z
|
src/wagtail_tag_manager/__init__.py
|
Tehnode/wagtail-tag-manager
|
048a03fe61b57ddd1eea0377ab26cf96527f5457
|
[
"BSD-3-Clause"
] | 23
|
2018-10-10T05:29:38.000Z
|
2022-01-19T15:09:51.000Z
|
default_app_config = "wagtail_tag_manager.config.WagtailTagManagerConfig"
| 37
| 73
| 0.891892
| 8
| 74
| 7.75
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.040541
| 74
| 1
| 74
| 74
| 0.873239
| 0
| 0
| 0
| 0
| 0
| 0.675676
| 0.675676
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
4b675eebc011dcbf30a99943e8204d368b2ed0b9
| 216
|
py
|
Python
|
backend/core/__init__.py
|
itimor/one-ops
|
f1111735de252012752dfabe11598e9690c89257
|
[
"MIT"
] | 2
|
2020-09-25T05:52:55.000Z
|
2021-01-14T07:06:17.000Z
|
backend/core/__init__.py
|
itimor/one-ops
|
f1111735de252012752dfabe11598e9690c89257
|
[
"MIT"
] | 6
|
2021-03-19T10:20:05.000Z
|
2021-09-22T19:30:21.000Z
|
backend/core/__init__.py
|
itimor/one-ops
|
f1111735de252012752dfabe11598e9690c89257
|
[
"MIT"
] | 1
|
2022-02-24T01:37:06.000Z
|
2022-02-24T01:37:06.000Z
|
from __future__ import absolute_import, unicode_literals
# This will make sure the app is always imported when
# Django starts so that shared_task will use this app.
# import pymysql
#
# pymysql.install_as_MySQLdb()
| 30.857143
| 56
| 0.805556
| 33
| 216
| 5
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.148148
| 216
| 6
| 57
| 36
| 0.896739
| 0.685185
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
4b6ab5ac671d440fac187ec117fb8831906a3c8f
| 39
|
tac
|
Python
|
semantics_and_generate/samples/link1.tac
|
AHEADer/my_decaf_compiler
|
42ba9f140c5fda3cd2b4fdb727745d2cfd39c923
|
[
"MIT"
] | 1
|
2018-01-03T03:35:38.000Z
|
2018-01-03T03:35:38.000Z
|
semantics_and_generate/samples/link1.tac
|
AHEADer/my_decaf_compiler
|
42ba9f140c5fda3cd2b4fdb727745d2cfd39c923
|
[
"MIT"
] | null | null | null |
semantics_and_generate/samples/link1.tac
|
AHEADer/my_decaf_compiler
|
42ba9f140c5fda3cd2b4fdb727745d2cfd39c923
|
[
"MIT"
] | null | null | null |
____notmain:
BeginFunc 0 ;
EndFunc ;
| 9.75
| 14
| 0.717949
| 4
| 39
| 6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.032258
| 0.205128
| 39
| 3
| 15
| 13
| 0.741935
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
4b8d4301cde6fb6de24f8efb96ff5081761e33de
| 643
|
py
|
Python
|
Computer Science/Development/GUI/robo_controls.py
|
zbendt/ECE-Capstone-Project
|
1bafc61f896191ccd5a843980500fb4b8bbeb8bd
|
[
"MIT"
] | null | null | null |
Computer Science/Development/GUI/robo_controls.py
|
zbendt/ECE-Capstone-Project
|
1bafc61f896191ccd5a843980500fb4b8bbeb8bd
|
[
"MIT"
] | null | null | null |
Computer Science/Development/GUI/robo_controls.py
|
zbendt/ECE-Capstone-Project
|
1bafc61f896191ccd5a843980500fb4b8bbeb8bd
|
[
"MIT"
] | null | null | null |
import time
#Controls functions for the delta
sleep_time = 0.5
def turn_on_vacuum():
print("Turning on vacuum pump")
def pickup():
print("Picking up sample...")
time.sleep(sleep_time)
def drop():
print("Dropping sample...")
time.sleep(sleep_time)
def move_to_start():
print("Moving to Start...")
time.sleep(sleep_time)
def move_to_camera():
print("Moving to Camera...")
time.sleep(sleep_time)
def move_to_passed():
print("Moving to Pass Stack...")
time.sleep(sleep_time)
def move_to_failed():
print("Moving to Fail Stack...")
time.sleep(sleep_time)
| 20.09375
| 37
| 0.634526
| 89
| 643
| 4.393258
| 0.370787
| 0.161125
| 0.214834
| 0.276215
| 0.432225
| 0.360614
| 0.276215
| 0
| 0
| 0
| 0
| 0.004032
| 0.228616
| 643
| 31
| 38
| 20.741935
| 0.784274
| 0.049767
| 0
| 0.272727
| 0
| 0
| 0.234426
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.318182
| false
| 0.090909
| 0.045455
| 0
| 0.363636
| 0.318182
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
298cc1131b4fa0f1be5f4becb01286a44e8b0a9d
| 66
|
py
|
Python
|
report/create_db.py
|
Kellel/reports
|
975e99396301e87176a38dd440a273c9319b3e22
|
[
"BSD-3-Clause"
] | null | null | null |
report/create_db.py
|
Kellel/reports
|
975e99396301e87176a38dd440a273c9319b3e22
|
[
"BSD-3-Clause"
] | null | null | null |
report/create_db.py
|
Kellel/reports
|
975e99396301e87176a38dd440a273c9319b3e22
|
[
"BSD-3-Clause"
] | null | null | null |
from models import Base, engine
Base.metadata.create_all(engine)
| 16.5
| 32
| 0.818182
| 10
| 66
| 5.3
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.106061
| 66
| 3
| 33
| 22
| 0.898305
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
29c8162014a517194fd9f41815841a6c8677d84e
| 4,458
|
py
|
Python
|
src/genie/libs/parser/iosxe/tests/ShowIpInterfaceBrief/cli/equal/golden_expected.py
|
balmasea/genieparser
|
d1e71a96dfb081e0a8591707b9d4872decd5d9d3
|
[
"Apache-2.0"
] | 204
|
2018-06-27T00:55:27.000Z
|
2022-03-06T21:12:18.000Z
|
src/genie/libs/parser/iosxe/tests/ShowIpInterfaceBrief/cli/equal/golden_expected.py
|
balmasea/genieparser
|
d1e71a96dfb081e0a8591707b9d4872decd5d9d3
|
[
"Apache-2.0"
] | 468
|
2018-06-19T00:33:18.000Z
|
2022-03-31T23:23:35.000Z
|
src/genie/libs/parser/iosxe/tests/ShowIpInterfaceBrief/cli/equal/golden_expected.py
|
balmasea/genieparser
|
d1e71a96dfb081e0a8591707b9d4872decd5d9d3
|
[
"Apache-2.0"
] | 309
|
2019-01-16T20:21:07.000Z
|
2022-03-30T12:56:41.000Z
|
expected_output = {
"interface": {
"GigabitEthernet0/0/0": {
"interface_is_ok": "YES",
"ip_address": "10.105.44.23",
"method": "other",
"protocol": "up",
"status": "up"
},
"GigabitEthernet0/0/1": {
"interface_is_ok": "YES",
"ip_address": "10.174.10.1",
"method": "other",
"protocol": "up",
"status": "up"
},
"GigabitEthernet0/0/2": {
"interface_is_ok": "YES",
"ip_address": "10.64.10.1",
"method": "other",
"protocol": "up",
"status": "up"
},
"GigabitEthernet0/0/3": {
"interface_is_ok": "YES",
"ip_address": "10.186.10.1",
"method": "other",
"protocol": "up",
"status": "up"
},
"Loopback65528": {
"interface_is_ok": "YES",
"ip_address": "192.168.1.1",
"method": "other",
"protocol": "up",
"status": "up"
},
"NVI0": {
"interface_is_ok": "YES",
"ip_address": "unassigned",
"method": "unset",
"protocol": "up",
"status": "up"
},
"Sdwan-system-intf": {
"interface_is_ok": "YES",
"ip_address": "192.168.10.64",
"method": "unset",
"protocol": "up",
"status": "up"
},
"TenGigabitEthernet0/0/4": {
"interface_is_ok": "YES",
"ip_address": "10.121.10.1",
"method": "other",
"protocol": "up",
"status": "up"
},
"TenGigabitEthernet0/0/5": {
"interface_is_ok": "YES",
"ip_address": "unassigned",
"method": "unset",
"protocol": "down",
"status": "down"
},
"Tunnel1": {
"interface_is_ok": "YES",
"ip_address": "10.174.10.1",
"method": "TFTP",
"protocol": "up",
"status": "up"
},
"Tunnel2000000001": {
"interface_is_ok": "YES",
"ip_address": "192.168.2.1",
"method": "unset",
"protocol": "up",
"status": "up"
},
"Tunnel2000000002": {
"interface_is_ok": "YES",
"ip_address": "192.168.166.1",
"method": "unset",
"protocol": "up",
"status": "up"
},
"Tunnel3": {
"interface_is_ok": "YES",
"ip_address": "10.186.10.1",
"method": "TFTP",
"protocol": "up",
"status": "up"
},
"TwoGigabitEthernet0/1/0": {
"interface_is_ok": "YES",
"ip_address": "unassigned",
"method": "unset",
"protocol": "up",
"status": "up"
},
"TwoGigabitEthernet0/2/0": {
"interface_is_ok": "YES",
"ip_address": "unassigned",
"method": "unset",
"protocol": "up",
"status": "up"
},
"Ucse1/0/0": {
"interface_is_ok": "YES",
"ip_address": "10.19.14.1",
"method": "other",
"protocol": "down",
"status": "administratively down"
},
"Ucse1/0/1": {
"interface_is_ok": "YES",
"ip_address": "unassigned",
"method": "unset",
"protocol": "down",
"status": "administratively down"
},
"VirtualPortGroup0": {
"interface_is_ok": "YES",
"ip_address": "192.0.2.1",
"method": "other",
"protocol": "up",
"status": "up"
},
"VirtualPortGroup1": {
"interface_is_ok": "YES",
"ip_address": "192.168.2.1",
"method": "other",
"protocol": "up",
"status": "up"
},
"VirtualPortGroup3": {
"interface_is_ok": "YES",
"ip_address": "192.168.3.1",
"method": "other",
"protocol": "up",
"status": "up"
},
"VirtualPortGroup4": {
"interface_is_ok": "YES",
"ip_address": "192.168.166.1",
"method": "other",
"protocol": "up",
"status": "up"
}
}
}
| 29.328947
| 45
| 0.394796
| 369
| 4,458
| 4.596206
| 0.146341
| 0.136203
| 0.160967
| 0.198113
| 0.858491
| 0.801887
| 0.761203
| 0.636792
| 0.462854
| 0.428656
| 0
| 0.075039
| 0.42306
| 4,458
| 151
| 46
| 29.523179
| 0.58437
| 0
| 0
| 0.635762
| 0
| 0
| 0.407582
| 0.020637
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
29d8926e28c855d35087d877a48866f5e57129f6
| 25
|
py
|
Python
|
env/lib/python2.7/site-packages/grpc/_grpcio_metadata.py
|
husky-parul/SheHacks
|
19383029947f50ebaf07232c9b2ee76c75d8ada6
|
[
"Apache-2.0"
] | 2
|
2018-02-01T06:30:24.000Z
|
2018-04-12T15:39:56.000Z
|
env/lib/python2.7/site-packages/grpc/_grpcio_metadata.py
|
husky-parul/SheHacks
|
19383029947f50ebaf07232c9b2ee76c75d8ada6
|
[
"Apache-2.0"
] | null | null | null |
env/lib/python2.7/site-packages/grpc/_grpcio_metadata.py
|
husky-parul/SheHacks
|
19383029947f50ebaf07232c9b2ee76c75d8ada6
|
[
"Apache-2.0"
] | null | null | null |
__version__ = """1.8.4"""
| 25
| 25
| 0.56
| 4
| 25
| 2.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.130435
| 0.08
| 25
| 1
| 25
| 25
| 0.304348
| 0
| 0
| 0
| 0
| 0
| 0.192308
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
29e4187ad7c1dcf2ceaec9e4c64c93ba30148a08
| 88
|
py
|
Python
|
twitoff/__init__.py
|
boscolio/twitoff-ds19
|
46449f9a55619a74dafa32ebee733daca8d1602f
|
[
"MIT"
] | null | null | null |
twitoff/__init__.py
|
boscolio/twitoff-ds19
|
46449f9a55619a74dafa32ebee733daca8d1602f
|
[
"MIT"
] | null | null | null |
twitoff/__init__.py
|
boscolio/twitoff-ds19
|
46449f9a55619a74dafa32ebee733daca8d1602f
|
[
"MIT"
] | null | null | null |
from .app import create_app
# creates the app by calling the package
APP = create_app()
| 22
| 40
| 0.772727
| 15
| 88
| 4.4
| 0.6
| 0.272727
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.170455
| 88
| 4
| 41
| 22
| 0.90411
| 0.431818
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
29e8e499563826ecb59fe97bb20177891dc4f78e
| 235
|
py
|
Python
|
my_env/lib/python3.8/site-packages/tests/strategies.py
|
David5627/AWWARD
|
a22a2b2f7d7d6377435bfd475e82268e4e907141
|
[
"MIT"
] | 296
|
2015-09-07T16:04:01.000Z
|
2022-03-27T06:31:43.000Z
|
my_env/lib/python3.8/site-packages/tests/strategies.py
|
David5627/AWWARD
|
a22a2b2f7d7d6377435bfd475e82268e4e907141
|
[
"MIT"
] | 189
|
2015-09-07T14:56:32.000Z
|
2022-01-31T09:17:22.000Z
|
my_env/lib/python3.8/site-packages/tests/strategies.py
|
David5627/AWWARD
|
a22a2b2f7d7d6377435bfd475e82268e4e907141
|
[
"MIT"
] | 115
|
2015-09-17T08:36:36.000Z
|
2022-03-09T12:36:14.000Z
|
from __future__ import unicode_literals
from hypothesis.strategies import integers
from star_ratings import app_settings
def scores(max_rating=app_settings.STAR_RATINGS_RANGE):
return integers(min_value=0, max_value=max_rating)
| 26.111111
| 55
| 0.851064
| 34
| 235
| 5.470588
| 0.617647
| 0.11828
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.004739
| 0.102128
| 235
| 8
| 56
| 29.375
| 0.876777
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.6
| 0.2
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 4
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.