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
88fbfcd58c0fce981e3b3a319912bd08eceec6dd
150
py
Python
python/_PYTHONSTARTUP.py
mfarrugi/.dots
e8abf8eeb285187c7b9d3d6064fc9cbfe3eadbdd
[ "MIT" ]
1
2018-09-17T15:34:14.000Z
2018-09-17T15:34:14.000Z
python/_PYTHONSTARTUP.py
mfarrugi/.dots
e8abf8eeb285187c7b9d3d6064fc9cbfe3eadbdd
[ "MIT" ]
null
null
null
python/_PYTHONSTARTUP.py
mfarrugi/.dots
e8abf8eeb285187c7b9d3d6064fc9cbfe3eadbdd
[ "MIT" ]
1
2018-11-19T10:56:47.000Z
2018-11-19T10:56:47.000Z
import subprocess def shell(*args): return (subprocess.check_output(args) .decode('ascii') .strip() .split('\n'))
18.75
42
0.546667
15
150
5.4
0.866667
0
0
0
0
0
0
0
0
0
0
0
0.3
150
7
43
21.428571
0.771429
0
0
0
0
0
0.048951
0
0
0
0
0
0
1
0.166667
true
0
0.166667
0.166667
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
0
1
0
0
0
4
001108a70d1432d86e35906c243dde7c11c0bd34
91
py
Python
server/dockyard/service/interface/manager/__init__.py
tor4z/Galileo-dockyard
c7f65c1466a1450315935ad03a5a504e7bdb1660
[ "MIT" ]
null
null
null
server/dockyard/service/interface/manager/__init__.py
tor4z/Galileo-dockyard
c7f65c1466a1450315935ad03a5a504e7bdb1660
[ "MIT" ]
null
null
null
server/dockyard/service/interface/manager/__init__.py
tor4z/Galileo-dockyard
c7f65c1466a1450315935ad03a5a504e7bdb1660
[ "MIT" ]
null
null
null
from dockyard.var import GLOBAL routes = [] def init(): GLOBAL.routes.extend(routes)
13
32
0.703297
12
91
5.333333
0.75
0.375
0
0
0
0
0
0
0
0
0
0
0.175824
91
7
32
13
0.853333
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.25
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
1
0
0
0
0
0
0
0
4
00148430ef8d0c59b2fb43f8963ed49b5ead0bac
28
py
Python
junn/common/launcher/__init__.py
modsim/junn
a40423b98c6a3739dd0b2ba02d546a5db91f9215
[ "BSD-2-Clause" ]
null
null
null
junn/common/launcher/__init__.py
modsim/junn
a40423b98c6a3739dd0b2ba02d546a5db91f9215
[ "BSD-2-Clause" ]
null
null
null
junn/common/launcher/__init__.py
modsim/junn
a40423b98c6a3739dd0b2ba02d546a5db91f9215
[ "BSD-2-Clause" ]
null
null
null
"""JUNN launcher helper."""
14
27
0.642857
3
28
6
1
0
0
0
0
0
0
0
0
0
0
0
0.107143
28
1
28
28
0.72
0.75
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
0022bf34c7e00c6b570a3a68125178f9abc9ea22
38
py
Python
bot/settings.py
RunningMSN/interview-bot
346ea7ad5241a39fbafba7191d395b627abf0d96
[ "MIT" ]
null
null
null
bot/settings.py
RunningMSN/interview-bot
346ea7ad5241a39fbafba7191d395b627abf0d96
[ "MIT" ]
null
null
null
bot/settings.py
RunningMSN/interview-bot
346ea7ad5241a39fbafba7191d395b627abf0d96
[ "MIT" ]
null
null
null
# Discord API Bot Token bot_token = ""
19
23
0.710526
6
38
4.333333
0.666667
0.615385
0
0
0
0
0
0
0
0
0
0
0.184211
38
2
24
19
0.83871
0.552632
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
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
0
0
0
4
00414f14df45dff8bc1a5702510b6aefae4aef9e
247
gyp
Python
binding.gyp
inception-soa/inception.streams.av
ef94fe8a8da50d26b1ae243cea316e09fc774c0f
[ "Apache-2.0" ]
null
null
null
binding.gyp
inception-soa/inception.streams.av
ef94fe8a8da50d26b1ae243cea316e09fc774c0f
[ "Apache-2.0" ]
null
null
null
binding.gyp
inception-soa/inception.streams.av
ef94fe8a8da50d26b1ae243cea316e09fc774c0f
[ "Apache-2.0" ]
null
null
null
{ "targets": [ { "target_name": "inception.streams.av", "sources": ["src/inception.streams.av.c"], "include_dirs": [ "<!(node -e \"require('nan')\")" ] } ], }
20.583333
54
0.37247
18
247
5
0.833333
0.355556
0.4
0
0
0
0
0
0
0
0
0
0.425101
247
11
55
22.454545
0.633803
0
0
0
0
0
0.40081
0.105263
0
0
0
0
0
1
0
true
0
0
0
0
0
1
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
0
1
0
0
0
0
0
0
4
cc3757ecabe659b144e7a17a778f73836e2d3b58
1,091
py
Python
clients/python/test/test_actions_api.py
adipolak/lakeFS
798e7b7d42f20dba2261c7ecbdc56a5c9131a28c
[ "Apache-2.0" ]
1
2022-02-02T08:52:15.000Z
2022-02-02T08:52:15.000Z
clients/python/test/test_actions_api.py
adipolak/lakeFS
798e7b7d42f20dba2261c7ecbdc56a5c9131a28c
[ "Apache-2.0" ]
null
null
null
clients/python/test/test_actions_api.py
adipolak/lakeFS
798e7b7d42f20dba2261c7ecbdc56a5c9131a28c
[ "Apache-2.0" ]
null
null
null
""" lakeFS API lakeFS HTTP API # noqa: E501 The version of the OpenAPI document: 0.1.0 Contact: services@treeverse.io Generated by: https://openapi-generator.tech """ import unittest import lakefs_client from lakefs_client.api.actions_api import ActionsApi # noqa: E501 class TestActionsApi(unittest.TestCase): """ActionsApi unit test stubs""" def setUp(self): self.api = ActionsApi() # noqa: E501 def tearDown(self): pass def test_get_run(self): """Test case for get_run get a run # noqa: E501 """ pass def test_get_run_hook_output(self): """Test case for get_run_hook_output get run hook output # noqa: E501 """ pass def test_list_repository_runs(self): """Test case for list_repository_runs list runs # noqa: E501 """ pass def test_list_run_hooks(self): """Test case for list_run_hooks list run hooks # noqa: E501 """ pass if __name__ == '__main__': unittest.main()
18.810345
66
0.60495
138
1,091
4.557971
0.376812
0.08903
0.069952
0.09539
0.267091
0.139905
0
0
0
0
0
0.031662
0.305225
1,091
57
67
19.140351
0.798153
0.408799
0
0.277778
1
0
0.015296
0
0
0
0
0
0
1
0.333333
false
0.277778
0.166667
0
0.555556
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
1
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
4
cc57a043c5cd3ac55ad095151ce826024e589aa2
117
py
Python
Baekjoon/Python/10870.py
KHJcode/Algorithm-study
fa08d3c752fcb3557fd45fb394157926afc0de4a
[ "MIT" ]
2
2020-05-23T01:55:38.000Z
2020-07-07T15:59:00.000Z
Baekjoon/Python/10870.py
KHJcode/Algorithm-study
fa08d3c752fcb3557fd45fb394157926afc0de4a
[ "MIT" ]
null
null
null
Baekjoon/Python/10870.py
KHJcode/Algorithm-study
fa08d3c752fcb3557fd45fb394157926afc0de4a
[ "MIT" ]
null
null
null
def fibonacci(n): if n < 2: return n return fibonacci(n - 1) + fibonacci(n - 2) print(fibonacci(int(input())))
19.5
44
0.632479
19
117
3.894737
0.526316
0.405405
0
0
0
0
0
0
0
0
0
0.031915
0.196581
117
5
45
23.4
0.755319
0
0
0
0
0
0
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
cc81fa54f8b7f16ec1404f835b50c10ce1bc54d8
244
py
Python
rosen98_gasabs.py
DaveOri/pyGasAbs
966eae26d0d356f33bb8964c912d63e2fffe2345
[ "MIT" ]
null
null
null
rosen98_gasabs.py
DaveOri/pyGasAbs
966eae26d0d356f33bb8964c912d63e2fffe2345
[ "MIT" ]
null
null
null
rosen98_gasabs.py
DaveOri/pyGasAbs
966eae26d0d356f33bb8964c912d63e2fffe2345
[ "MIT" ]
null
null
null
import numpy as np from rosen98_gasabs import rosen98_gasabs as r98 # rosen98_gasabs(f[GHz], absolute_humidity[kg/m3], pressure[Pa]) r98(94.0,300,0.001,100000.0) r98(94.0,300,0.01,100000.0) # OUT = [0(always), absAir[Np/km], absH2O[Np/km]]
22.181818
64
0.721311
47
244
3.659574
0.574468
0.226744
0.069767
0.104651
0.116279
0
0
0
0
0
0
0.220183
0.106557
244
10
65
24.4
0.568807
0.45082
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
0
0
0
null
1
0
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
0
1
0
1
0
0
0
0
4
aea0294ddb7fae3c160bdf92312595a51649a14c
459
py
Python
RESTful_Face_Web/expiring_token/models.py
luzhoutao/face
ae5910f57ae86412e8a56adbefe4f260dde216f0
[ "MIT" ]
null
null
null
RESTful_Face_Web/expiring_token/models.py
luzhoutao/face
ae5910f57ae86412e8a56adbefe4f260dde216f0
[ "MIT" ]
null
null
null
RESTful_Face_Web/expiring_token/models.py
luzhoutao/face
ae5910f57ae86412e8a56adbefe4f260dde216f0
[ "MIT" ]
null
null
null
from django.db import models from rest_framework.authtoken.models import Token from django.utils import timezone # Create your models here. class ExpiringToken(Token): expired_time = models.DateTimeField(null=True) def expired(self): """Return boolean indicating token expiration.""" return timezone.localtime(timezone.now()) > self.expired_time def get_expired_time(self): return timezone.localtime(self.expired_time)
28.6875
69
0.747277
57
459
5.912281
0.526316
0.130564
0.136499
0
0
0
0
0
0
0
0
0
0.167756
459
15
70
30.6
0.882199
0.150327
0
0
0
0
0
0
0
0
0
0
0
1
0.222222
false
0
0.333333
0.111111
1
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
0
1
1
1
0
0
4
aee476b8eb46b564e8a91fec9ca52b7246c45b54
178
py
Python
src/blogapp/forms.py
Rutujakenjale/Rest-Api-Django
4deacc199fef6b65b2020dd2e5dfbc45351dd804
[ "bzip2-1.0.6" ]
null
null
null
src/blogapp/forms.py
Rutujakenjale/Rest-Api-Django
4deacc199fef6b65b2020dd2e5dfbc45351dd804
[ "bzip2-1.0.6" ]
null
null
null
src/blogapp/forms.py
Rutujakenjale/Rest-Api-Django
4deacc199fef6b65b2020dd2e5dfbc45351dd804
[ "bzip2-1.0.6" ]
null
null
null
from django import forms from .models import Article class ArticleForm(forms.ModelForm): class Meta: model=Article fields=['Title','Author','published_date','description']
25.428571
58
0.769663
22
178
6.181818
0.772727
0
0
0
0
0
0
0
0
0
0
0
0.11236
178
7
58
25.428571
0.860759
0
0
0
0
0
0.201117
0
0
0
0
0
0
1
0
false
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
0
0
1
0
1
0
0
4
4e2c6c6866881be94ab35cafe00f6917fa9fd5e4
1,745
py
Python
app.py
AdrianoZapata/sistema_login
a311d5e283ba917e5d26d63e001befdccf1e60e3
[ "MIT" ]
null
null
null
app.py
AdrianoZapata/sistema_login
a311d5e283ba917e5d26d63e001befdccf1e60e3
[ "MIT" ]
null
null
null
app.py
AdrianoZapata/sistema_login
a311d5e283ba917e5d26d63e001befdccf1e60e3
[ "MIT" ]
null
null
null
from bottle import Bottle, route, run from bottle import request, template from bottle import static_file, get from bottle import error ''' @route('/') @route('/user/<nome>') def index(nome='Unknown'): return '<center><h1>Look how awesome you are</h1>' + nome + '</h1></center>' @route('/artigo/<id>') def artigo(id): return '<h1> You are reading my article' + id + '</h1>' @route('/pagina/<id>/<nome>') def pagina(id, nome): return '<h1> You are checking my newest work ' + id + ' with name ' + nome + '</h1>' ''' # static routes @get('/<filename:re:.*\.css>') def stylesheets(filename): return static_file(filename, root='static/css') @get('/<filename:re:.*\.js>') def javascripts(filename): return static_file(filename, root='static/js') @get('/<filename:re:.*\.(jpg/png/gif/ico)>') def stylesheets(filename): return static_file(filename, root='static/img') @get('/<filename:re:.*\.(eot/ttf/woff/svg)>') def stylesheets(filename): return static_file(filename, root='static/fonts') @route('/login') # @get('/login') def login(): return template('login') def check_login(username, password): d = {'adriano':'python', 'jhon':'java', 'peter':'go'} if username in d.keys() and d[username] == password: return True else: False @route('/login', method='POST') # @post('/login') def acao_login(): username = request.forms.get('username') password = request.forms.get('password') sucesso = check_login(username, password) return template('verificao_login', sucesso=check_login(username,password), nome=username) @error(404) def error404(error): return template('page404') if __name__ == '__main__': run(host='localhost', port=8080, debug=False, reloader=True)
29.083333
91
0.661318
230
1,745
4.93913
0.378261
0.044014
0.056338
0.084507
0.242958
0.184859
0.184859
0.147887
0.147887
0
0
0.013396
0.144413
1,745
60
92
29.083333
0.747488
0.025215
0
0.083333
0
0
0.207803
0.092357
0
0
0
0
0
1
0.222222
false
0.138889
0.111111
0.166667
0.555556
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
9d6d04973203ded39acca742d62539be1f82545d
419
py
Python
DataStructures-Algorithms/Udacity-Python-DSA/02-Stacks-and-Queues/implement-stack-class.py
shoaibur/SWE
1e114a2750f2df5d6c50b48c8e439224894d65da
[ "MIT" ]
1
2020-11-14T18:28:13.000Z
2020-11-14T18:28:13.000Z
DataStructures-Algorithms/Udacity-Python-DSA/02-Stacks-and-Queues/implement-stack-class.py
shoaibur/SWE
1e114a2750f2df5d6c50b48c8e439224894d65da
[ "MIT" ]
null
null
null
DataStructures-Algorithms/Udacity-Python-DSA/02-Stacks-and-Queues/implement-stack-class.py
shoaibur/SWE
1e114a2750f2df5d6c50b48c8e439224894d65da
[ "MIT" ]
null
null
null
class Stack(object): def __init__(self): self.stack = [] def push(self, value): self.stack.append(value) def pop(self): return self.stack.pop() def is_empty(self): return self.stack == [] def size(self): return len(self.stack) # Example s = Stack() s.push(1) s.push(2) s.push(3) print(s.stack) # [1, 2, 3] s.pop() print(s.stack) # [1, 2]
17.458333
32
0.536993
62
419
3.548387
0.33871
0.204545
0.109091
0.172727
0.118182
0
0
0
0
0
0
0.027119
0.295943
419
23
33
18.217391
0.718644
0.057279
0
0.111111
0
0
0
0
0
0
0
0
0
1
0.277778
false
0
0
0.166667
0.5
0.111111
0
0
0
null
1
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
0
0
0
4
9da345adf94022cdb82528b95c856892806c16e8
216
py
Python
workflow/apps.py
thomasbtf/snakesite
fba1cd3faf717d10ffc286f33f88f4b3398e72c3
[ "MIT" ]
1
2021-09-30T09:45:26.000Z
2021-09-30T09:45:26.000Z
workflow/apps.py
thomasbtf/snakesite
fba1cd3faf717d10ffc286f33f88f4b3398e72c3
[ "MIT" ]
1
2021-05-22T16:24:06.000Z
2021-05-22T16:24:06.000Z
workflow/apps.py
thomasbtf/snakesite
fba1cd3faf717d10ffc286f33f88f4b3398e72c3
[ "MIT" ]
1
2021-09-30T09:46:24.000Z
2021-09-30T09:46:24.000Z
from django.apps import AppConfig class WorkflowConfig(AppConfig): default_auto_field = "django.db.models.BigAutoField" name = "workflow" def ready(self): import workflow.signals # noqa: F401
21.6
56
0.712963
25
216
6.08
0.84
0
0
0
0
0
0
0
0
0
0
0.017341
0.199074
216
9
57
24
0.861272
0.046296
0
0
0
0
0.181373
0.142157
0
0
0
0
0
1
0.166667
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
9dcaa374cf582b24a3cb494d790da3cb680a512a
10
py
Python
templates/FLASK/blog.py
God-status/PyPC
d2db55b1a24f4149cb4a69ebed6d36a160d92d76
[ "MIT" ]
1
2021-11-26T19:09:09.000Z
2021-11-26T19:09:09.000Z
templates/FLASK/blog.py
God-status/PyPC
d2db55b1a24f4149cb4a69ebed6d36a160d92d76
[ "MIT" ]
null
null
null
templates/FLASK/blog.py
God-status/PyPC
d2db55b1a24f4149cb4a69ebed6d36a160d92d76
[ "MIT" ]
null
null
null
# blog.py
5
9
0.6
2
10
3
1
0
0
0
0
0
0
0
0
0
0
0
0.2
10
1
10
10
0.75
0.7
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
9dfd3dc462a8d16c5a8df64b569ebc84f97bb187
96
py
Python
spectrocrunch/materials/__init__.py
woutdenolf/spectrocrunch
fde4b6e0f462f464ce7af6a942b355d3d8f39f77
[ "MIT" ]
3
2018-04-16T15:51:36.000Z
2019-12-16T11:21:05.000Z
spectrocrunch/materials/__init__.py
woutdenolf/spectrocrunch
fde4b6e0f462f464ce7af6a942b355d3d8f39f77
[ "MIT" ]
null
null
null
spectrocrunch/materials/__init__.py
woutdenolf/spectrocrunch
fde4b6e0f462f464ce7af6a942b355d3d8f39f77
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Compounds and mixtures with calculation of physical properties. """
19.2
66
0.677083
11
96
5.909091
1
0
0
0
0
0
0
0
0
0
0
0.012346
0.15625
96
4
67
24
0.790123
0.895833
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
3b053b0fd161bb7de5cd0088a21e666d954af89a
5,105
py
Python
tests/testing_output_files/src/dense/dense.py
RS-Coop/Correll_Lab
7c9ea0ff0ce3f54848a0eb112ef29b28d8e735e5
[ "MIT" ]
4
2021-05-31T23:49:39.000Z
2022-03-16T12:27:08.000Z
tests/testing_output_files/src/dense/dense.py
RS-Coop/Correll_Lab
7c9ea0ff0ce3f54848a0eb112ef29b28d8e735e5
[ "MIT" ]
1
2021-10-02T19:51:01.000Z
2022-01-20T21:45:37.000Z
tests/testing_output_files/src/dense/dense.py
correlllab/nn4mc_py
24fa3f9187f7d89692041b640c48f91c2a77b644
[ "MIT" ]
null
null
null
# This file was automatically generated by SWIG (http://www.swig.org). # Version 4.0.1 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. from sys import version_info as _swig_python_version_info if _swig_python_version_info < (2, 7, 0): raise RuntimeError("Python 2.7 or later required") # Import the low-level C/C++ module if __package__ or "." in __name__: from . import _dense else: import _dense try: import builtins as __builtin__ except ImportError: import __builtin__ def _swig_repr(self): try: strthis = "proxy of " + self.this.__repr__() except __builtin__.Exception: strthis = "" return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) def _swig_setattr_nondynamic_instance_variable(set): def set_instance_attr(self, name, value): if name == "thisown": self.this.own(value) elif name == "this": set(self, name, value) elif hasattr(self, name) and isinstance(getattr(type(self), name), property): set(self, name, value) else: raise AttributeError("You cannot add instance attributes to %s" % self) return set_instance_attr def _swig_setattr_nondynamic_class_variable(set): def set_class_attr(cls, name, value): if hasattr(cls, name) and not isinstance(getattr(cls, name), property): set(cls, name, value) else: raise AttributeError("You cannot add class attributes to %s" % cls) return set_class_attr def _swig_add_metaclass(metaclass): """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass""" def wrapper(cls): return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy()) return wrapper class _SwigNonDynamicMeta(type): """Meta class to enforce nondynamic attributes (no new attributes) for a class""" __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__) def build_layer_dense(W, b, input_size, output_size, activation): return _dense.build_layer_dense(W, b, input_size, output_size, activation) def fwd_dense(L, input): return _dense.fwd_dense(L, input) class Dense(object): thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr weights = property(_dense.Dense_weights_get, _dense.Dense_weights_set) biases = property(_dense.Dense_biases_get, _dense.Dense_biases_set) activation = property(_dense.Dense_activation_get, _dense.Dense_activation_set) weight_shape = property(_dense.Dense_weight_shape_get, _dense.Dense_weight_shape_set) input_shape = property(_dense.Dense_input_shape_get, _dense.Dense_input_shape_set) output_shape = property(_dense.Dense_output_shape_get, _dense.Dense_output_shape_set) def __init__(self): _dense.Dense_swiginit(self, _dense.new_Dense()) __swig_destroy__ = _dense.delete_Dense # Register Dense in _dense: _dense.Dense_swigregister(Dense) class input(object): thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr def __init__(self, nelements): _dense.input_swiginit(self, _dense.new_input(nelements)) __swig_destroy__ = _dense.delete_input def __getitem__(self, index): return _dense.input___getitem__(self, index) def __setitem__(self, index, value): return _dense.input___setitem__(self, index, value) def cast(self): return _dense.input_cast(self) @staticmethod def frompointer(t): return _dense.input_frompointer(t) # Register input in _dense: _dense.input_swigregister(input) cvar = _dense.cvar conv1d_1_W = cvar.conv1d_1_W conv1d_1_b = cvar.conv1d_1_b conv1d_2_W = cvar.conv1d_2_W conv1d_2_b = cvar.conv1d_2_b dense_1_W = cvar.dense_1_W dense_1_b = cvar.dense_1_b dense_2_W = cvar.dense_2_W dense_2_b = cvar.dense_2_b dense_3_W = cvar.dense_3_W dense_3_b = cvar.dense_3_b dense_4_W = cvar.dense_4_W dense_4_b = cvar.dense_4_b dense_5_W = cvar.dense_5_W dense_5_b = cvar.dense_5_b dense_6_W = cvar.dense_6_W dense_6_b = cvar.dense_6_b dense_7_W = cvar.dense_7_W dense_7_b = cvar.dense_7_b dense_8_W = cvar.dense_8_W dense_8_b = cvar.dense_8_b def input_frompointer(t): return _dense.input_frompointer(t) def activate(input, output_shape, type): return _dense.activate(input, output_shape, type) def sigmoid(input, m): return _dense.sigmoid(input, m) def exp_activation(input, m): return _dense.exp_activation(input, m) def softplus(input, m): return _dense.softplus(input, m) def softsign(input, m): return _dense.softsign(input, m) def hard_sigmoid(input, m): return _dense.hard_sigmoid(input, m) def exponential(input): return _dense.exponential(input) def relu(input, m): return _dense.relu(input, m) def hyper_tan(input, m): return _dense.hyper_tan(input, m) def softmax(input, m): return _dense.softmax(input, m)
30.568862
118
0.727326
765
5,105
4.419608
0.20915
0.055309
0.023662
0.040225
0.178054
0.127181
0.127181
0.10352
0.077492
0.077492
0
0.013314
0.176102
5,105
166
119
30.753012
0.790537
0.090695
0
0.111111
1
0
0.038079
0
0
0
0
0
0
1
0.222222
false
0
0.051282
0.153846
0.598291
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
1
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
d178d8994592fbff04d26c8aac479115dbdd9296
208
py
Python
dataset/__init__.py
ThuYShao/pytorch-worker
1d5a576e0ad887d981c0aa06bdae6a23637b870b
[ "MIT" ]
null
null
null
dataset/__init__.py
ThuYShao/pytorch-worker
1d5a576e0ad887d981c0aa06bdae6a23637b870b
[ "MIT" ]
null
null
null
dataset/__init__.py
ThuYShao/pytorch-worker
1d5a576e0ad887d981c0aa06bdae6a23637b870b
[ "MIT" ]
null
null
null
from .nlp.JsonFromFiles import JsonFromFilesDataset from .others.FilenameOnly import FilenameOnlyDataset dataset_list = { "JsonFromFiles": JsonFromFilesDataset, "FilenameOnly": FilenameOnlyDataset }
26
52
0.8125
16
208
10.5
0.625
0
0
0
0
0
0
0
0
0
0
0
0.120192
208
7
53
29.714286
0.918033
0
0
0
0
0
0.120192
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
1
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
d194108162246aeac07f9565129b82b2c8538085
146
py
Python
katas/kyu_7/the_office_1_outed.py
the-zebulan/CodeWars
1eafd1247d60955a5dfb63e4882e8ce86019f43a
[ "MIT" ]
40
2016-03-09T12:26:20.000Z
2022-03-23T08:44:51.000Z
katas/kyu_7/the_office_1_outed.py
akalynych/CodeWars
1eafd1247d60955a5dfb63e4882e8ce86019f43a
[ "MIT" ]
null
null
null
katas/kyu_7/the_office_1_outed.py
akalynych/CodeWars
1eafd1247d60955a5dfb63e4882e8ce86019f43a
[ "MIT" ]
36
2016-11-07T19:59:58.000Z
2022-03-31T11:18:27.000Z
def outed(meet, boss): result = (sum(meet.values()) + meet[boss]) / len(meet) return 'Nice Work Champ!' if result > 5 else 'Get Out Now!'
36.5
63
0.623288
23
146
3.956522
0.782609
0.175824
0
0
0
0
0
0
0
0
0
0.008621
0.205479
146
3
64
48.666667
0.775862
0
0
0
0
0
0.191781
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
d19feeba1b4c0cdd0df98a55d0e8941b0fa03414
80
py
Python
abc/ABC139/python/b.py
yokotani92/atcoder
febaef2d13c40093a2a284c87a949cd46113801d
[ "MIT" ]
null
null
null
abc/ABC139/python/b.py
yokotani92/atcoder
febaef2d13c40093a2a284c87a949cd46113801d
[ "MIT" ]
null
null
null
abc/ABC139/python/b.py
yokotani92/atcoder
febaef2d13c40093a2a284c87a949cd46113801d
[ "MIT" ]
null
null
null
import math A, B = map(int, input().split()) print(math.ceil(((B-A)/(A-1))+1))
20
33
0.575
16
80
2.875
0.6875
0
0
0
0
0
0
0
0
0
0
0.028169
0.1125
80
4
33
20
0.619718
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0.333333
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
d1c156eea0e6d2003239e32460c9e7e914159139
199
py
Python
app/api/v1/user.py
DanylZhang/Netflix-Genre
d68d5b01d8ba25e776edb5fca4f4295a7d3a55a1
[ "MIT" ]
null
null
null
app/api/v1/user.py
DanylZhang/Netflix-Genre
d68d5b01d8ba25e776edb5fca4f4295a7d3a55a1
[ "MIT" ]
2
2021-05-09T17:55:15.000Z
2021-12-13T19:58:57.000Z
app/api/v1/user.py
DanylZhang/Netflix-Genre
d68d5b01d8ba25e776edb5fca4f4295a7d3a55a1
[ "MIT" ]
null
null
null
from flask import Blueprint # blueprint from app.libs.redprint import Redprint user = Blueprint('user', __name__) api = Redprint('user') @api.route('/get') def get_user(): return "I'm danyl"
15.307692
38
0.708543
28
199
4.857143
0.607143
0.176471
0
0
0
0
0
0
0
0
0
0
0.155779
199
12
39
16.583333
0.809524
0.045226
0
0
0
0
0.111702
0
0
0
0
0
0
1
0.142857
false
0
0.285714
0.142857
0.571429
0.571429
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
0
0
0
1
1
1
0
4
d1c1f772be4bbd1f58b9a975a7dc50b165fd1431
257
py
Python
quote.py
periodically-makes-puns/CipherBot
d59795c6bd7aebe381a35e8695daeafeefd91542
[ "MIT" ]
null
null
null
quote.py
periodically-makes-puns/CipherBot
d59795c6bd7aebe381a35e8695daeafeefd91542
[ "MIT" ]
null
null
null
quote.py
periodically-makes-puns/CipherBot
d59795c6bd7aebe381a35e8695daeafeefd91542
[ "MIT" ]
null
null
null
import random file = "data/quotes.txt" quotes = open(file, "r", encoding="utf-8").readlines() # use builtin readlines def reload(): quotes = open(file, "r", encoding="utf-8").readlines() def getQuote() -> str: return random.choice(quotes).strip()
25.7
78
0.669261
35
257
4.914286
0.6
0.116279
0.162791
0.174419
0.418605
0.418605
0.418605
0.418605
0
0
0
0.009091
0.143969
257
10
79
25.7
0.772727
0.081712
0
0.285714
0
0
0.114894
0
0
0
0
0
0
1
0.285714
false
0
0.142857
0.142857
0.571429
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
ae43fddedade101e5d9d6d647b91e92395d2b2aa
209
py
Python
fpas/crud/crud_item.py
martin-hanzely/fpas
0b30c363a66b98eeb8f6b081a2ab74fc55dd6375
[ "Unlicense" ]
null
null
null
fpas/crud/crud_item.py
martin-hanzely/fpas
0b30c363a66b98eeb8f6b081a2ab74fc55dd6375
[ "Unlicense" ]
null
null
null
fpas/crud/crud_item.py
martin-hanzely/fpas
0b30c363a66b98eeb8f6b081a2ab74fc55dd6375
[ "Unlicense" ]
null
null
null
from fpas.crud.crud_base import CRUDBase from fpas.models.item import Item from fpas.schemas import ItemCreate, ItemUpdate class CRUDItem(CRUDBase[Item, ItemCreate, ItemUpdate]): ... item = CRUDItem(Item)
20.9
59
0.789474
28
209
5.857143
0.464286
0.146341
0
0
0
0
0
0
0
0
0
0
0.119617
209
9
60
23.222222
0.891304
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.6
0
0.8
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
ae6942660ab9f082686db17f16a71ec885349c8b
546
py
Python
ggpy/cruft/autocode/GamePreviewException.py
hobson/ggpy
4e6e6e876c3a4294cd711647051da2d9c1836b60
[ "MIT" ]
1
2015-01-26T19:07:45.000Z
2015-01-26T19:07:45.000Z
ggpy/cruft/autocode/GamePreviewException.py
hobson/ggpy
4e6e6e876c3a4294cd711647051da2d9c1836b60
[ "MIT" ]
null
null
null
ggpy/cruft/autocode/GamePreviewException.py
hobson/ggpy
4e6e6e876c3a4294cd711647051da2d9c1836b60
[ "MIT" ]
null
null
null
#!/usr/bin/env python """ generated source for module GamePreviewException """ # package: org.ggp.base.player.gamer.exception @SuppressWarnings("serial") class GamePreviewException(Exception): """ generated source for class GamePreviewException """ def __init__(self, cause): """ generated source for method __init__ """ super(GamePreviewException, self).__init__(cause) def __str__(self): """ generated source for method toString """ return "An unhandled exception occurred during game previewing!"
36.4
72
0.712454
56
546
6.660714
0.607143
0.160858
0.193029
0.128686
0
0
0
0
0
0
0
0
0.177656
546
14
73
39
0.830735
0.43956
0
0
1
0
0.218638
0
0
0
0
0
0
1
0.333333
false
0
0
0
0.666667
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
1
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
ae8b5a10d28c6937f647e92f9f564b76d3f2adbe
858
py
Python
store/tests/test_urls.py
JuanFariasGit/crm
5ab322644cb988a916bf6b5e8ee79322a40f2601
[ "MIT" ]
null
null
null
store/tests/test_urls.py
JuanFariasGit/crm
5ab322644cb988a916bf6b5e8ee79322a40f2601
[ "MIT" ]
null
null
null
store/tests/test_urls.py
JuanFariasGit/crm
5ab322644cb988a916bf6b5e8ee79322a40f2601
[ "MIT" ]
null
null
null
from django.test import TestCase from django.urls import reverse, resolve class TestStoreURLs(TestCase): def test_urls(self): self.assertEqual(reverse('store:main'), '/store/') self.assertEqual(reverse('store:list'), '/store/list/') self.assertEqual(reverse('store:create'), '/store/create/') self.assertEqual(reverse('store:update', kwargs={'id': 1}), '/store/update/1/') self.assertEqual(reverse('store:delete'), '/store/delete/') self.assertEqual(resolve('/store/').view_name, 'store:main') self.assertEqual(resolve('/store/list/').view_name, 'store:list') self.assertEqual(resolve('/store/create/').view_name, 'store:create') self.assertEqual(resolve('/store/update/1/').view_name, 'store:update') self.assertEqual(resolve('/store/delete/').view_name, 'store:delete')
50.470588
87
0.671329
101
858
5.643564
0.237624
0.263158
0.192982
0.236842
0
0
0
0
0
0
0
0.004071
0.141026
858
16
88
53.625
0.769335
0
0
0
0
0
0.27972
0
0
0
0
0
0.714286
1
0.071429
false
0
0.142857
0
0.285714
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
ae8d018366f73b2f3ad5d099501197179e3e5aa5
198
py
Python
venv/lib/python2.7/dist-packages/landscape/lib/__init__.py
pengwu/scapy_env
3db9c5dea2e219048a2387649d6d89be342903d9
[ "MIT" ]
null
null
null
venv/lib/python2.7/dist-packages/landscape/lib/__init__.py
pengwu/scapy_env
3db9c5dea2e219048a2387649d6d89be342903d9
[ "MIT" ]
null
null
null
venv/lib/python2.7/dist-packages/landscape/lib/__init__.py
pengwu/scapy_env
3db9c5dea2e219048a2387649d6d89be342903d9
[ "MIT" ]
null
null
null
""" This package contains the Landscape library. Code inside this package must be generic and self-contained, depending only on code inside of the package itself or libraries outside Landscape. """
28.285714
61
0.79798
29
198
5.448276
0.758621
0.139241
0
0
0
0
0
0
0
0
0
0
0.151515
198
6
62
33
0.940476
0.954545
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
ae95018faf20a81439cd444ca5b892080f9fa8c2
892
py
Python
myfunds/modules/security.py
anzodev/myfunds
9f6cda99f443cec064d15d7ff7780f297cbdfe10
[ "MIT" ]
null
null
null
myfunds/modules/security.py
anzodev/myfunds
9f6cda99f443cec064d15d7ff7780f297cbdfe10
[ "MIT" ]
null
null
null
myfunds/modules/security.py
anzodev/myfunds
9f6cda99f443cec064d15d7ff7780f297cbdfe10
[ "MIT" ]
null
null
null
from abc import ABC from abc import abstractmethod from werkzeug.security import check_password_hash from werkzeug.security import generate_password_hash class PasswordHasher(ABC): @abstractmethod def make_hash(self, password: str) -> str: ... @abstractmethod def is_hash_correct(self, password_hash: str, password: str) -> bool: ... class PBKDF2_PasswordHasher(PasswordHasher): def __init__( self, hash_func: str = "sha256", iterations: int = 80000, salt_length: int = 16 ): self._method = f"pbkdf2:{hash_func}:{iterations}" self._salt_length = salt_length def make_hash(self, password: str) -> str: return generate_password_hash(password, self._method, self._salt_length) def is_hash_correct(self, password_hash: str, password: str) -> bool: return check_password_hash(password_hash, password)
29.733333
87
0.70852
110
892
5.454545
0.290909
0.14
0.1
0.086667
0.263333
0.263333
0.263333
0.166667
0.166667
0.166667
0
0.016783
0.19843
892
29
88
30.758621
0.822378
0
0
0.380952
1
0
0.04148
0.034753
0
0
0
0
0
1
0.238095
false
0.47619
0.190476
0.095238
0.619048
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
1
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
4
883f223c5cfe6a9309871c7904089a6c1b06bd47
81
py
Python
__init__.py
ASPDB/ASPDB-Data
112bc9880068e4f9d100b1f40ee2b33533424cb8
[ "Apache-2.0" ]
1
2016-12-09T16:51:33.000Z
2016-12-09T16:51:33.000Z
__init__.py
ASPDB/ASPDB-Data
112bc9880068e4f9d100b1f40ee2b33533424cb8
[ "Apache-2.0" ]
4
2016-12-10T17:11:45.000Z
2016-12-14T17:16:20.000Z
__init__.py
ASPDB/ASPDB-Data
112bc9880068e4f9d100b1f40ee2b33533424cb8
[ "Apache-2.0" ]
null
null
null
""" ASPDB® ====== A manually curated dedicated acid shock proteins database. """
13.5
58
0.679012
10
81
5.6
1
0
0
0
0
0
0
0
0
0
0
0
0.148148
81
5
59
16.2
0.797101
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
884bfa5c51a932929a7dfe8c047780c084742b9a
58
py
Python
apps/shop/utils/__init__.py
Zomba4okk/DjangoOnlinerLikeShop
6f2bc8ca8072c6b3c69a79c33e448aa6c5be0f81
[ "MIT" ]
null
null
null
apps/shop/utils/__init__.py
Zomba4okk/DjangoOnlinerLikeShop
6f2bc8ca8072c6b3c69a79c33e448aa6c5be0f81
[ "MIT" ]
7
2021-02-20T13:17:16.000Z
2021-04-17T18:43:25.000Z
apps/shop/utils/__init__.py
Zomba4okk/DjangoOnlinerLikeShop
6f2bc8ca8072c6b3c69a79c33e448aa6c5be0f81
[ "MIT" ]
null
null
null
# flake8: noqa from .delta_util import ( DeltaUtil, )
11.6
25
0.672414
7
58
5.428571
1
0
0
0
0
0
0
0
0
0
0
0.022222
0.224138
58
4
26
14.5
0.822222
0.206897
0
0
0
0
0
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
88528d7ab0217fe5bbf2acb11218d967d4414c53
201
py
Python
Models/__init__.py
austrian-code-wizard/Timeinator
f83351587d877a97611aa228787b9fed00d495d3
[ "MIT" ]
null
null
null
Models/__init__.py
austrian-code-wizard/Timeinator
f83351587d877a97611aa228787b9fed00d495d3
[ "MIT" ]
null
null
null
Models/__init__.py
austrian-code-wizard/Timeinator
f83351587d877a97611aa228787b9fed00d495d3
[ "MIT" ]
null
null
null
from Models.models import User, Task, Interval from Models.schema import UserSchema, TaskSchema, IntervalSchema User.schema = UserSchema() Task.schema = TaskSchema() Interval.schema = IntervalSchema()
33.5
64
0.80597
23
201
7.043478
0.434783
0.123457
0
0
0
0
0
0
0
0
0
0
0.104478
201
6
65
33.5
0.9
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.4
0
0.4
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
887cf5169da1874d50e9c798c371f03375f7214d
759
py
Python
independentreserve/__init__.py
MelchiSalins/pyindependentreserve
91ffc6d9667fc08acf4eb0a2afcf942e480801cb
[ "MIT" ]
18
2017-12-01T09:39:34.000Z
2021-08-13T05:45:08.000Z
independentreserve/__init__.py
MelchiSalins/pyindependentreserve
91ffc6d9667fc08acf4eb0a2afcf942e480801cb
[ "MIT" ]
10
2017-09-03T08:27:37.000Z
2021-07-01T05:53:04.000Z
independentreserve/__init__.py
MelchiSalins/pyindependentreserve
91ffc6d9667fc08acf4eb0a2afcf942e480801cb
[ "MIT" ]
13
2017-09-28T12:20:11.000Z
2021-10-05T01:23:56.000Z
""" Independent Reserve features a JSON based API, that is comprised of Public and Private methods. All API calls must be made over SSL to https://api.independentreserve.com . Public methods do not require an authentication token and should be accessed via HTTP GET. Private methods require a valid authentication token and must be accessed via HTTP POST. Errors are returned to the caller as a HTTP 400 return code and a descriptive error message. Ensure that the contentType of the your JSON POST request is set to 'application/json'. Fiat currency amounts cannot have more than 2 decimal places, and XBT amounts cannot have more than 8 decimal places. """ from .public import * from .authentication import * from .private import * from .websocket import *
54.214286
117
0.795784
121
759
4.991736
0.595041
0.049669
0.072848
0.056291
0.082781
0
0
0
0
0
0
0.007874
0.163373
759
14
118
54.214286
0.943307
0.857708
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
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
888d738a485baa93fc39cc81df747fbade1afe55
20,087
py
Python
englishtobengali/entobn.py
jabedparadox/englishtobengali
bd28fca3583d297f114364450a8f1d5c100b8a27
[ "MIT" ]
null
null
null
englishtobengali/entobn.py
jabedparadox/englishtobengali
bd28fca3583d297f114364450a8f1d5c100b8a27
[ "MIT" ]
null
null
null
englishtobengali/entobn.py
jabedparadox/englishtobengali
bd28fca3583d297f114364450a8f1d5c100b8a27
[ "MIT" ]
null
null
null
#!/usr/bin/python #!/usr/bin/python3 #!/usr/bin/env python #!/usr/bin/env python3 # -*- coding: utf8 -*- # Python Web Based English To Bangla Translator (Google, Bing, Yandex, Baidu). # Author :- Md Jabed Ali(jabed) # Facebook :- https://www.facebook.com/paradox.jabed # Github :- https://github.com/jabedparadox import random from json import loads import requests from bs4 import BeautifulSoup import argparse import re #import aiohttp #import asyncio #import async_timeout #from aiohttp import web from json import loads import json import argparse import os import sys import time #from google.cloud import translate #print("******************************** Md Jabed Ali(jabed) **********************************\n************************************ Translator ***************************************\n******** Example:- Translate to: Enter 1 for Afrikaans / Enter 2 for Albanian ********\n\n1-Afrikaans~af 2-Albanian~sq 3-Amharic~am 4-Arabic~ar 5-Armenian~hy\n6-Azerbaijani~az 7-Basque~eu 8-Belarusian~be 9-Bengali~bn 10-Bosnian~bs\n11-Bulgarian~bg 12-Catalan~ca 13-Cebuano~ceb 14-Chichewa~ny 15-Chinese~zh-CN\n16-Corsican~co 17-Croatian~hr 18-Czech~cs 19-Danish~da 20-Dutch~nl\n21-English~en 22-Esperanto~eo 23-Estonian~et 24-Filipino~tl 25-Finnish~fi\n26-French~fr 27-Frisian~fy 28-Galician~gl 29-Georgian~ka 30-German~de\n31-Greek~el 32-Gujarati~gu 33-Haitian Creole~ht 34-Hausa~ha 35-Hawaiian~haw\n36-Hebrew~iw 37-Hindi~hi 38-Hmong~hmn 39-Hungarian~hu 40-Icelandic~is\n41-Igbo~ig 42-Indonesian~id 43-Irish~ga 44-Italian~it 45-Japanese~ja\n46-Javanese~jw 47-Kannada~kn 48-Kazakh~kk 49-Khmer~km 50-Korean~ko\n51-Kurdish~ku 52-Kyrgyz~ky 53-Lao~lo 54-Latin~la 55-Latvian~lv\n56-Lithuanian~lt 57-Luxembourgish~lb 58-Macedonian~mk 59-Malagasy~mg 60-Malay~ms\n61-Malayalam~ml 62-Maltese~mt 63-Maori~mi 64-Marathi~mr 65-Mongolian~mn\n66-Myanmar~my 67-Nepali~ne 68-Norwegian~no 69-Pashto~ps 70-Persian~fa\n71-Polish~pl 72-Portuguese~pt 73-Punjabi~pa 74-Romanian~ro 75-Russian~ru\n76-Samoan~sm 77-Scots Gaelic~gd 78-Serbian~sr 79-Sesotho~st 80-Shona~sn\n81-Sindhi~sd 82-Sinhala~si 83-Slovak~sk 84-Slovenian~sl 85-Somali~so\n86-Spanish~es 87-Sundanese~su 88-Swahili~sw 89-Swedish~sv 90-Tajik~tg\n91-Tamil~ta 92-Telugu~te 93-Thai~th 94-Turkish~tr 95-Ukrainian~uk\n96-Urdu~ur 97-Uzbek~uz 98-Vietnamese~vi 99-Welsh~cy 100-Xhosa~xh\n101-Yiddish~yi 102-Yoruba~yo 103-Zulu~zu\n\n*********************************** Translator **************************************\n") #print("******************************** Md Jabed Ali(jabed) **********************************\n*************************** English To Bengali Translator *****************************\n") # Example:- Translate to: Enter 1 for Afrikaans / Enter 2 for Albanian ********\n\n1-Afrikaans~af 2-Albanian~sq 3-Amharic~am 4-Arabic~ar 5-Armenian~hy\n6-Azerbaijani~az 7-Basque~eu 8-Belarusian~be 9-Bengali~bn 10-Bosnian~bs\n11-Bulgarian~bg 12-Catalan~ca 13-Cebuano~ceb 14-Chichewa~ny 15-Chinese~zh-CN\n16-Corsican~co 17-Croatian~hr 18-Czech~cs 19-Danish~da 20-Dutch~nl\n21-English~en 22-Esperanto~eo 23-Estonian~et 24-Filipino~tl 25-Finnish~fi\n26-French~fr 27-Frisian~fy 28-Galician~gl 29-Georgian~ka 30-German~de\n31-Greek~el 32-Gujarati~gu 33-Haitian Creole~ht 34-Hausa~ha 35-Hawaiian~haw\n36-Hebrew~iw 37-Hindi~hi 38-Hmong~hmn 39-Hungarian~hu 40-Icelandic~is\n41-Igbo~ig 42-Indonesian~id 43-Irish~ga 44-Italian~it 45-Japanese~ja\n46-Javanese~jw 47-Kannada~kn 48-Kazakh~kk 49-Khmer~km 50-Korean~ko\n51-Kurdish~ku 52-Kyrgyz~ky 53-Lao~lo 54-Latin~la 55-Latvian~lv\n56-Lithuanian~lt 57-Luxembourgish~lb 58-Macedonian~mk 59-Malagasy~mg 60-Malay~ms\n61-Malayalam~ml 62-Maltese~mt 63-Maori~mi 64-Marathi~mr 65-Mongolian~mn\n66-Myanmar~my 67-Nepali~ne 68-Norwegian~no 69-Pashto~ps 70-Persian~fa\n71-Polish~pl 72-Portuguese~pt 73-Punjabi~pa 74-Romanian~ro 75-Russian~ru\n76-Samoan~sm 77-Scots Gaelic~gd 78-Serbian~sr 79-Sesotho~st 80-Shona~sn\n81-Sindhi~sd 82-Sinhala~si 83-Slovak~sk 84-Slovenian~sl 85-Somali~so\n86-Spanish~es 87-Sundanese~su 88-Swahili~sw 89-Swedish~sv 90-Tajik~tg\n91-Tamil~ta 92-Telugu~te 93-Thai~th 94-Turkish~tr 95-Ukrainian~uk\n96-Urdu~ur 97-Uzbek~uz 98-Vietnamese~vi 99-Welsh~cy 100-Xhosa~xh\n101-Yiddish~yi 102-Yoruba~yo 103-Zulu~zu\n\n*********************************** Translator **************************************\n") # Different headers. def random_useragent(): #http://useragentstring.com/pages/useragentstring.php url = "https://fake-useragent.herokuapp.com/browsers/0.1.8" r = requests.get(url) randomuseragent = loads(r.text)['browsers'] #print(random.choice(randomuseragent[random.choice(list(randomuseragent))])) return random.choice(randomuseragent[random.choice(list(randomuseragent))]) u_a = random_useragent() headers = {'User-Agent': u_a, #'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36', #':authority': 'translate.google.com', #':scheme': 'https', 'X-Requested-With': 'XMLHttpRequest', 'Upgrade-Insecure-Requests': '1', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,application/json,image/apng,*/*;q=0.8', 'Accept-Encoding': 'gzip, deflate, br', #'Origin': ' ', #'Host': ' ', } # Possible spell error. def pssible_error(): url_pssible_error = 'https://api.languagetool.org/v2/check?instanceId=19644:1556175692778?disabledRules=WHITESPACE_RULE,FRENCH_WHITESPACE&allowIncompleteResults=true&enableHiddenRules=true&useragent=ltorg&text=Thre is so sorce&language=auto&altLanguages=en-US&textSessionId=19644:1556175692778' res_pssible_error = requests.get(url_pssible_error, headers=headers).text rslt_pssible_error = json.loads(res_pssible_error) rslt0_pssible_error = rslt_pssible_error['matches'] rslt1_pssible_error = [str(re.findall('{\'value\': \'(.*?)\'', str(i['replacements']), re.DOTALL)).replace('\'', '') for i in rslt0_pssible_error] return rslt1_pssible_error # With aiohttp. async def get_session(session, url): with async_timeout.timeout(5): async with session.get(url) as response: return await response.text() # With aiohttp. '''async def init_get(): app = web.Application() app.router.add_route('GET', '/{name}', handle) return await loop.create_server( app._make_handler(), '127.0.0.1', 8080)''' # With aiohttp. #url =['', ''] async def get_main(): async with aiohttp.ClientSession() as session: resp = await get_session(session, 'https://www.-.com') return web.Response(text=resp) #session.close() # Which lang. def translateto(): while True: trnslt_to = input("Translate to: ") if trnslt_to.isdigit(): return trnslt_to break else: print ("Enter a digit.") # Translating frm baidu. #def baidu_translate(): #trnslt_to = input("Translate to: ") # Multiple item extend. def mltipl(lst, *elmnt): lst.extend(elmnt) # Translating frm bing. def bing_translate(frm_bing, to_bing): trnslt_to = translateto() bing_param = {'text': '', 'from': 'en', 'to': 'bn' } bing_param_detect = {'text': ''} url_bing = 'https://www.bing.com/ttranslate?&category=&IG=D458B762C9184506AF3108AE1F0CDA26&IID=translator.5036.3' url_bing_detect = requests.post('https://www.bing.com/tdetect?&IG=103CA78C8D314209BCF33D5EC2D6FC56&IID=translator.5036.1', data=bing_param_detect, headers=headers).text res_bing = requests.post(url_bing, data=bing_param, headers=headers).text return res_bing # English to Bengali. def en_bn(word_en=None): url0_en_bn = 'https://translate.googleapis.com/translate_a/single?client=gtx&sl=auto&tl=bn&dt=t&q=' + word_en.title() res0_en_bn = requests.get(url0_en_bn, headers=headers).text yandex_param = {'text': word_en.title(), 'from': '4' } url_yandex = 'https://translate.yandex.net/api/v1/tr.json/translate?id=6d3ae0b0.5cbf4919.6cddeec8-4-0&srv=tr-text&lang=en-bn&reason=auto' res_yandex = requests.post(url_yandex, data=yandex_param, headers=headers).text try: #bing_param_detect = {'text': word_en} #url_bing_detect = requests.post('https://www.bing.com/tdetect?&IG=103CA78C8D314209BCF33D5EC2D6FC56&IID=translator.5036.1', data=bing_param_detect, headers=headers, timeout=3).text bing_param = {'text': word_en.title(), 'from': 'en', #'to': tl.split('~')[-1] 'to': 'bn' } url_bing = 'https://www.bing.com/ttranslate?&category=&IG=D458B762C9184506AF3108AE1F0CDA26&IID=translator.5036.3' res_bing = requests.post(url_bing, data=bing_param, headers=headers, timeout=3).text except (IndexError, ValueError): res_bing = "na" try: rslt_bing = re.findall('"(.*?)"', str(res_bing), re.DOTALL)[-1] except (IndexError, ValueError): rslt_bing = 'Null' try: rslt_yandex = re.findall('"(.*?)"', str(res_yandex), re.DOTALL)[-1] except (IndexError, ValueError): rslt_yandex = 'Null' try: rslt_en_bn = re.findall('"(.*?)"', str(res0_en_bn), re.DOTALL)[0] except (IndexError, ValueError): rslt_en_bn = 'Null' rslt_final = [] #rslt_final.append(str(rslt_en_bn+rslt_yandex+rslt_bing)) #mltipl(rslt_en_bn, rslt_yandex, rslt_bing) rslt_final = rslt_en_bn + ', ' + rslt_yandex + ', ' + rslt_bing return rslt_final # Bengali to English. def bn_en(word_bn=None): while True: url0_bn_en = 'https://translate.googleapis.com/translate_a/single?client=gtx&sl=auto&tl=en&dt=t&q=' + word_bn.title() res0_bn_en = requests.get(url0_bn_en, headers=headers).text yandex_param = {'text': word_bn.title(), 'from': '4' } url_yandex = 'https://translate.yandex.net/api/v1/tr.json/translate?id=6d3ae0b0.5cbf4919.6cddeec8-4-0&srv=tr-text&lang=bn-en&reason=auto' res_yandex = requests.post(url_yandex, data=yandex_param, headers=headers).text try: #bing_param_detect = {'text': word_en} #url_bing_detect = requests.post('https://www.bing.com/tdetect?&IG=103CA78C8D314209BCF33D5EC2D6FC56&IID=translator.5036.1', data=bing_param_detect, headers=headers, timeout=3).text bing_param = {'text': word_bn.title(), 'from': 'bn', #'to': tl.split('~')[-1] 'to': 'en' } url_bing = 'https://www.bing.com/ttranslate?&category=&IG=D458B762C9184506AF3108AE1F0CDA26&IID=translator.5036.3' res_bing = requests.post(url_bing, data=bing_param, headers=headers, timeout=3).text except (IndexError, ValueError): res_bing = "na" try: rslt_bing = re.findall('"(.*?)"', str(res_bing), re.DOTALL)[-1] except (IndexError, ValueError): rslt_bing = 'Null' try: rslt_yandex = re.findall('"(.*?)"', str(res_yandex), re.DOTALL)[-1] except (IndexError, ValueError): rslt_yandex = 'Null' try: rslt_en_bn = re.findall('"(.*?)"', str(res0_bn_en), re.DOTALL)[0] except (IndexError, ValueError): rslt_en_bn = 'Null' rslt_final = [] #rslt_final.append(str(rslt_en_bn+rslt_yandex+rslt_bing)) #mltipl(rslt_en_bn, rslt_yandex, rslt_bing) rslt_final = rslt_en_bn + ', ' + rslt_yandex + ', ' + rslt_bing return rslt_final # Translating frm googel. def translate_bengali(inputtext=None): while True: #trnslt_to = translateto() #trnslt_to = input("Translate to: ") '''if trnslt_to == '1': tl = 'Afrikaans~af' elif trnslt_to == '2': tl = 'Albanian~sq' elif trnslt_to == '3': tl = 'Amharic~am' elif trnslt_to == '4': tl = 'Arabic~ar' elif trnslt_to == '5': tl = 'Armenian~hy' elif trnslt_to == '6': tl = 'Azerbaijani~az' elif trnslt_to == '7': tl = 'Basque~eu' elif trnslt_to == '8': tl = 'Belarusian~be' elif trnslt_to == '9': tl = 'Bengali~bn' elif trnslt_to == '10': tl = 'Bosnian~bs' elif trnslt_to == '21': tl = 'en' ''' while True: if inputtext==None: inputtext = input("Enter Text: ").title() url = 'https://api.languagetool.org/v2/check?instanceId=19644:1556175692778?disabledRules=WHITESPACE_RULE,FRENCH_WHITESPACE&allowIncompleteResults=true&enableHiddenRules=true&useragent=ltorg&text=' + inputtext + '&language=auto&altLanguages=en-US&textSessionId=19644:1556175692778' res_pssible_error = requests.get(url, headers=headers).text rslt_pssible_error = json.loads(res_pssible_error) if 'misspelling' in str(rslt_pssible_error): #print(json.dumps(rslt_pssible_error, indent = 4, sort_keys=True)) rslt0_pssible_error = rslt_pssible_error['matches'] rslt1_pssible_error = [str(re.findall('{\'value\': \'(.*?)\'', str(i['replacements']), re.DOTALL)).replace('\'', '') for i in rslt0_pssible_error] print ('Possible spelling mistake. Correction :' + str(rslt1_pssible_error)) else: break # Bing. try: bing_param_detect = {'text': inputtext} url_bing_detect = requests.post('https://www.bing.com/tdetect?&IG=103CA78C8D314209BCF33D5EC2D6FC56&IID=translator.5036.1', data=bing_param_detect, headers=headers, timeout=3).text bing_param = {'text': inputtext, 'from': url_bing_detect, #'to': tl.split('~')[-1] 'to': 'bn' } url_bing = 'https://www.bing.com/ttranslate?&category=&IG=D458B762C9184506AF3108AE1F0CDA26&IID=translator.5036.3' res_bing = requests.post(url_bing, data=bing_param, headers=headers, timeout=3).text except: res_bing = "na" try: rslt_bing = '\n' + "From Bing : " + inputtext + ' <-> ' + re.findall('"(.*?)"', str(res_bing), re.DOTALL)[-1] except (IndexError, ValueError): rslt_bing = "From Bing : " + 'Null' # Yandex. yandex_param = {'text': inputtext, 'from': '4' } url_yandex = 'https://translate.yandex.net/api/v1/tr.json/translate?id=6d3ae0b0.5cbf4919.6cddeec8-4-0&srv=tr-text&lang=en-bn&reason=auto' res_yandex = requests.post(url_yandex, data=yandex_param, headers=headers).text try: rslt_yandex = "From Yandex : " + inputtext + ' <-> ' + re.findall('"(.*?)"', str(res_yandex), re.DOTALL)[-1] except (IndexError, ValueError): rslt_yandex = "From Yandex : " + 'Null' # Google. url = 'https://translate.googleapis.com/translate_a/single?client=gtx&sl=auto&tl=bn&dt=t&q=' + inputtext res = requests.get(url, headers=headers).text #print ("Translating to " + tl.split('~')[0] + " .....") #print ("Translating To Bengali .....") try: rslt_google = "From Google : " + inputtext + ' <-> ' + re.findall('"(.*?)"', str(res), re.DOTALL)[0] except (IndexError, ValueError): rslt_google = "From Google : " + 'Null' # Baidu. #url_baidu = 'https://api.fanyi.baidu.com' rslt_baidu = "From Baidu : " + 'Null' #print ('\n' + "From Googel: " + inputtext + ' <-> ' + re.findall('"(.*?)"', str(res), re.DOTALL)[0] + '\n' + "From Bing : " + inputtext + ' <-> ' + re.findall('"(.*?)"', str(res_bing), re.DOTALL)[-1] + '\n' + "From Yandex: " + inputtext + ' <-> ' + re.findall('"(.*?)"', str(res_yandex), re.DOTALL)[-1] + '\n') #print (rslt_bing + '\n' + rslt_yandex + '\n' + rslt_google + '\n' + rslt_baidu + '\n') rslt_final = rslt_bing + '\n' + rslt_yandex + '\n' + rslt_google + '\n' + rslt_baidu + '\n' return rslt_final #if inputtext!==None: agn = input("Want to translate again? (Y/N): ") if agn == 'Y': pass else: sys.exit() #if __name__ == '__main__': #googel_translate() '''print("1-Afrikaans~af 2-Albanian~sq 3-Amharic~am 4-Arabic~ar 5-Armenian~hy 6-Azerbaijani~az 7-Basque~eu 8-Belarusian~be 9-Bengali~bn 10-Bosnian~bs 11-Bulgarian~bg 12-Catalan~ca 13-Cebuano~ceb 14-Chichewa~ny 15-Chinese~zh-CN 16-Corsican~co 17-Croatian~hr 18-Czech~cs 19-Danish~da 20-Dutch~nl 21-English~en 22-Esperanto~eo 23-Estonian~et 24-Filipino~tl 25-Finnish~fi 26-French~fr 27-Frisian~fy 28-Galician~gl 29-Georgian~ka 30-German~de 31-Greek~el 32-Gujarati~gu 33-Haitian Creole~ht 34-Hausa~ha 35-Hawaiian~haw 36-Hebrew~iw 37-Hindi~hi 38-Hmong~hmn 39-Hungarian~hu 40-Icelandic~is 41-Igbo~ig 42-Indonesian~id 43-Irish~ga 44-Italian~it 45-Japanese~ja 46-Javanese~jw 47-Kannada~kn 48-Kazakh~kk 49-Khmer~km 50-Korean~ko 51-Kurdish~ku 52-Kyrgyz~ky 53-Lao~lo 54-Latin~la 55-Latvian~lv 56-Lithuanian~lt 57-Luxembourgish~lb 58-Macedonian~mk 59-Malagasy~mg 60-Malay~ms 61-Malayalam~ml 62-Maltese~mt 63-Maori~mi 64-Marathi~mr 65-Mongolian~mn 66-Myanmar~my 67-Nepali~ne 68-Norwegian~no 69-Pashto~ps 70-Persian~fa 71-Polish~pl 72-Portuguese~pt 73-Punjabi~pa 74-Romanian~ro 75-Russian~ru 76-Samoan~sm 77-Scots Gaelic~gd 78-Serbian~sr 79-Sesotho~st 80-Shona~sn 81-Sindhi~sd 82-Sinhala~si 83-Slovak~sk 84-Slovenian~sl 85-Somali~so 86-Spanish~es 87-Sundanese~su 88-Swahili~sw 89-Swedish~sv 90-Tajik~tg 91-Tamil~ta 92-Telugu~te 93-Thai~th 94-Turkish~tr 95-Ukrainian~uk 96-Urdu~ur 97-Uzbek~uz 98-Vietnamese~vi 99-Welsh~cy 100-Xhosa~xh 101-Yiddish~yi 102-Yoruba~yo 103-Zulu~zu")'''
63.365931
2,199
0.569423
2,538
20,087
4.402679
0.228526
0.022552
0.012887
0.013424
0.73671
0.727045
0.716306
0.696617
0.68203
0.68203
0
0.070478
0.274556
20,087
316
2,200
63.566456
0.696335
0.345447
0
0.463277
0
0.045198
0.25598
0.027074
0.028249
0
0
0
0
1
0.045198
false
0.00565
0.067797
0
0.163842
0.011299
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
889630bf02fd88370a17c78c7cc4b290d4688774
1,513
py
Python
flax_models/bert/run_classifier_test.py
deepneuralmachine/google-research
d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231
[ "Apache-2.0" ]
7
2021-06-15T05:54:29.000Z
2022-02-21T06:57:06.000Z
flax_models/bert/run_classifier_test.py
deepneuralmachine/google-research
d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231
[ "Apache-2.0" ]
12
2021-08-25T16:15:31.000Z
2022-02-10T05:10:37.000Z
flax_models/bert/run_classifier_test.py
deepneuralmachine/google-research
d2ce2cf0f5c004f8d78bfeddf6e88e88f4840231
[ "Apache-2.0" ]
5
2021-11-25T07:40:17.000Z
2022-03-22T11:13:39.000Z
# coding=utf-8 # Copyright 2021 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """Tests for flax_models.bert.run_classifier.""" from absl.testing import absltest import tensorflow as tf from flax_models.bert import run_classifier from flax_models.bert.configs import classification as default_config class RunClassifierTest(absltest.TestCase): def setUp(self): super().setUp() # Make sure tf does not allocate gpu memory. tf.config.experimental.set_visible_devices([], 'GPU') def test_create_model(self): """Tests creating model.""" run_classifier.create_model(default_config.get_config()) def test_train_and_evaluate(self): # TODO(marcvanzee): Write a test for this. # We have to refactor the code somewhat in order to test this, since it # currently is too slow to run on CPU, and if we are using the py3_test # build rule then we cannot read the vocab and checkpoint from CNS. pass if __name__ == '__main__': absltest.main()
33.622222
75
0.750165
229
1,513
4.842795
0.60262
0.054103
0.037872
0.028855
0
0
0
0
0
0
0
0.007994
0.173166
1,513
44
76
34.386364
0.878497
0.617317
0
0
0
0
0.02
0
0
0
0
0.022727
0
1
0.214286
false
0.071429
0.285714
0
0.571429
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
1
0
0
1
0
1
0
0
1
0
0
4
889ef2572807e042465ce43d61bf963580218897
42
py
Python
pyexcel_xlsxr/_version.py
mobanbot/pyexcel-xlsxr
d9e53b6d773b6e35ee48c9d460cb8baf36eef797
[ "BSD-3-Clause" ]
null
null
null
pyexcel_xlsxr/_version.py
mobanbot/pyexcel-xlsxr
d9e53b6d773b6e35ee48c9d460cb8baf36eef797
[ "BSD-3-Clause" ]
null
null
null
pyexcel_xlsxr/_version.py
mobanbot/pyexcel-xlsxr
d9e53b6d773b6e35ee48c9d460cb8baf36eef797
[ "BSD-3-Clause" ]
null
null
null
__version__ = '0.5.2' __author__ = 'C.W.'
14
21
0.619048
7
42
2.571429
1
0
0
0
0
0
0
0
0
0
0
0.083333
0.142857
42
2
22
21
0.416667
0
0
0
0
0
0.214286
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
88a54b0805ca261a699ad2360ff913f87c9269b5
38,251
py
Python
python/examples/Colormapping_Backup.py
Tornadiz/LOGO_Colormapping
9bab54899f3afa3c6147277e3feea82eaf86c596
[ "BSD-2-Clause" ]
null
null
null
python/examples/Colormapping_Backup.py
Tornadiz/LOGO_Colormapping
9bab54899f3afa3c6147277e3feea82eaf86c596
[ "BSD-2-Clause" ]
null
null
null
python/examples/Colormapping_Backup.py
Tornadiz/LOGO_Colormapping
9bab54899f3afa3c6147277e3feea82eaf86c596
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python3 # rpi_ws281x library Colormapping # Author: Norbert Karpen # # To map specific LED strip locations to a color gradient # import time from rpi_ws281x import * import argparse import numpy as np import copy # LED strip configuration: LED_COUNT = 130 # Number of LED pixels. LED_PIN = 18 # GPIO pin connected to the pixels (18 uses PWM!). #LED_PIN = 10 # GPIO pin connected to the pixels (10 uses SPI /dev/spidev0.0). LED_FREQ_HZ = 800000 # LED signal frequency in hertz (usually 800khz) LED_DMA = 10 # DMA channel to use for generating signal (try 10) LED_BRIGHTNESS = 255 # Set to 0 for darkest and 255 for brightest LED_INVERT = False # True to invert the signal (when using NPN transistor level shift) LED_CHANNEL = 0 # set to '1' for GPIOs 13, 19, 41, 45 or 53 # Gradient settings gradient_map_original = [[1, (184, 52, 138)], [2, (185, 53, 139)], [3, (187, 55, 139)], [4, (188, 56, 140)], [5, (191, 60, 140)], [6, (192, 61, 139)], [7, (192, 61, 139)], [8, (194, 63, 139)], [9, (194, 63, 139)], [10, (196, 66, 140)], [11, (196, 65, 141)], [12, (196, 66, 140)], [13, (195, 64, 140)], [14, (193, 62, 140)], [15, (190, 58, 141)], [16, (185, 53, 139)], [17, (177, 46, 139)], [18, (170, 40, 140)], [19, (165, 42, 146)], [20, (162, 47, 151)], [21, (156, 50, 158)], [22, (151, 55, 165)], [23, (147, 59, 171)], [24, (140, 63, 179)], [25, (134, 66, 185)], [26, (127, 69, 189)], [27, (116, 70, 194)], [28, (108, 74, 197)], [29, (103, 74, 200)], [30, (97, 75, 201)], [31, (96, 75, 202)], [32, (92, 75, 203)], [33, (91, 76, 203)], [34, (91, 76, 205)], [35, (89, 77, 205)], [36, (88, 77, 205)], [37, (88, 77, 205)], [38, (87, 78, 207)], [39, (85, 78, 207)], [40, (84, 79, 208)], [41, (81, 78, 207)], [42, (80, 79, 207)], [43, (79, 79, 209)], [44, (76, 81, 211)], [45, (73, 80, 210)], [46, (72, 81, 212)], [47, (71, 81, 213)], [48, (65, 82, 214)], [49, (64, 82, 216)], [50, (60, 83, 215)], [51, (61, 80, 209)], [52, (58, 79, 206)], [53, (57, 75, 199)], [54, (55, 74, 194)], [55, (54, 71, 187)], [56, (53, 69, 182)], [57, (53, 65, 173)], [58, (50, 63, 168)], [59, (49, 61, 163)], [60, (49, 57, 155)], [61, (46, 55, 148)], [62, (54, 73, 191)], [63, (56, 74, 198)], [64, (57, 77, 202)], [65, (59, 80, 208)], [66, (59, 82, 214)], [67, (65, 83, 217)], [68, (65, 82, 214)], [69, (71, 81, 213)], [70, (73, 80, 212)], [71, (79, 79, 209)], [72, (81, 78, 209)], [73, (85, 78, 207)], [74, (89, 77, 205)], [75, (92, 75, 203)], [76, (96, 75, 202)], [77, (97, 75, 201)], [78, (99, 74, 201)], [79, (104, 74, 198)], [80, (105, 73, 198)], [81, (108, 74, 197)], [82, (138, 65, 182)], [83, (137, 66, 184)], [84, (135, 66, 183)], [85, (136, 67, 186)], [86, (133, 68, 186)], [87, (132, 68, 188)], [88, (129, 68, 187)], [89, (128, 69, 189)], [90, (123, 69, 189)], [91, (120, 70, 193)], [92, (115, 71, 192)], [93, (111, 71, 194)], [94, (109, 73, 197)], [95, (104, 74, 198)], [96, (102, 76, 201)], [97, (96, 74, 200)], [98, (95, 76, 202)], [99, (89, 77, 205)], [100, (136, 65, 183)], [101, (139, 66, 183)], [102, (139, 65, 180)], [103, (141, 62, 177)], [104, (144, 61, 175)], [105, (143, 60, 174)], [106, (145, 58, 171)], [107, (146, 58, 170)], [108, (146, 57, 167)], [109, (150, 56, 168)], [110, (151, 55, 165)], [111, (151, 55, 165)], [112, (151, 55, 165)], [113, (152, 54, 163)], [114, (152, 54, 163)], [115, (151, 53, 162)], [116, (167, 42, 146)], [117, (166, 43, 147)], [118, (165, 44, 147)], [119, (165, 44, 147)], [120, (165, 44, 147)], [121, (165, 44, 149)], [122, (164, 45, 149)], [123, (164, 45, 147)], [124, (163, 46, 150)], [125, (162, 47, 151)], [126, (160, 47, 153)], [127, (159, 48, 153)], [128, (157, 50, 156)], [129, (157, 50, 156)], [130, (155, 52, 161)]] gradient_maps_list = [[[1, (1, 155, 193)], [2, (0, 184, 210)], [3, (0, 218, 227)], [4, (1, 230, 233)], [5, (0, 239, 236)], [6, (0, 237, 243)], [7, (0, 237, 249)], [8, (0, 254, 254)], [9, (1, 255, 253)], [10, (1, 255, 253)], [11, (1, 255, 253)], [12, (1, 255, 253)], [13, (1, 255, 253)], [14, (1, 255, 253)], [15, (1, 255, 253)], [16, (1, 255, 253)], [17, (1, 255, 253)], [18, (0, 255, 251)], [19, (0, 255, 251)], [20, (0, 255, 249)], [21, (0, 254, 243)], [22, (0, 254, 226)], [23, (0, 255, 199)], [24, (0, 255, 171)], [25, (0, 255, 151)], [26, (83, 255, 138)], [27, (187, 255, 134)], [28, (247, 240, 133)], [29, (255, 202, 124)], [30, (255, 160, 116)], [31, (255, 123, 102)], [32, (255, 103, 92)], [33, (255, 89, 81)], [34, (255, 80, 65)], [35, (255, 76, 53)], [36, (255, 77, 31)], [37, (254, 81, 25)], [38, (255, 85, 26)], [39, (255, 89, 29)], [40, (255, 96, 12)], [41, (254, 100, 2)], [42, (255, 102, 6)], [43, (255, 86, 79)], [44, (250, 9, 140)], [45, (255, 0, 194)], [46, (255, 0, 218)], [47, (255, 0, 242)], [48, (255, 0, 252)], [49, (255, 0, 254)], [50, (255, 0, 254)], [51, (255, 0, 254)], [52, (240, 0, 255)], [53, (225, 0, 254)], [54, (221, 0, 254)], [55, (221, 0, 254)], [56, (220, 0, 255)], [57, (220, 0, 254)], [58, (220, 0, 255)], [59, (220, 0, 255)], [60, (220, 0, 254)], [61, (220, 0, 255)], [62, (191, 0, 254)], [63, (191, 0, 254)], [64, (190, 0, 255)], [65, (187, 0, 255)], [66, (179, 0, 254)], [67, (145, 0, 255)], [68, (119, 0, 254)], [69, (194, 0, 255)], [70, (255, 0, 254)], [71, (247, 0, 255)], [72, (234, 0, 255)], [73, (216, 1, 255)], [74, (194, 0, 255)], [75, (177, 0, 255)], [76, (164, 0, 255)], [77, (146, 0, 255)], [78, (142, 1, 255)], [79, (132, 0, 255)], [80, (117, 9, 253)], [81, (0, 158, 188)], [82, (0, 175, 240)], [83, (0, 178, 238)], [84, (0, 178, 229)], [85, (1, 153, 176)], [86, (1, 94, 83)], [87, (5, 27, 15)], [88, (26, 5, 20)], [89, (2, 50, 0)], [90, (1, 95, 81)], [91, (0, 121, 142)], [92, (0, 125, 173)], [93, (28, 114, 201)], [94, (88, 96, 223)], [95, (126, 73, 239)], [96, (152, 57, 249)], [97, (179, 35, 254)], [98, (200, 30, 251)], [99, (195, 36, 253)], [100, (1, 75, 74)], [101, (0, 59, 34)], [102, (20, 37, 1)], [103, (28, 13, 8)], [104, (31, 0, 10)], [105, (25, 11, 10)], [106, (0, 41, 0)], [107, (0, 71, 57)], [108, (0, 99, 114)], [109, (0, 126, 161)], [110, (0, 147, 199)], [111, (1, 160, 225)], [112, (0, 170, 242)], [113, (0, 170, 245)], [114, (0, 172, 241)], [115, (0, 173, 242)], [116, (1, 255, 253)], [117, (1, 255, 253)], [118, (0, 244, 254)], [119, (0, 241, 252)], [120, (0, 248, 250)], [121, (1, 228, 244)], [122, (0, 204, 229)], [123, (0, 176, 215)], [124, (0, 145, 190)], [125, (1, 117, 158)], [126, (0, 93, 123)], [127, (0, 72, 81)], [128, (0, 49, 38)], [129, (2, 30, 7)], [130, (23, 13, 11)]], [[1, (27, 210, 104)], [2, (31, 214, 108)], [3, (33, 216, 112)], [4, (35, 215, 116)], [5, (41, 220, 120)], [6, (43, 221, 123)], [7, (42, 222, 125)], [8, (46, 224, 128)], [9, (46, 226, 129)], [10, (49, 226, 135)], [11, (54, 227, 137)], [12, (49, 226, 135)], [13, (47, 226, 132)], [14, (45, 223, 127)], [15, (40, 218, 120)], [16, (30, 213, 107)], [17, (18, 205, 90)], [18, (2, 192, 66)], [19, (15, 186, 58)], [20, (29, 176, 44)], [21, (41, 169, 30)], [22, (74, 179, 37)], [23, (97, 187, 40)], [24, (122, 199, 45)], [25, (143, 209, 49)], [26, (163, 214, 51)], [27, (178, 220, 50)], [28, (195, 224, 54)], [29, (208, 231, 55)], [30, (215, 232, 55)], [31, (221, 234, 56)], [32, (224, 235, 53)], [33, (227, 237, 54)], [34, (231, 239, 55)], [35, (230, 238, 56)], [36, (233, 238, 57)], [37, (234, 237, 58)], [38, (238, 242, 57)], [39, (237, 241, 56)], [40, (241, 243, 56)], [41, (244, 243, 57)], [42, (249, 243, 57)], [43, (248, 243, 55)], [44, (250, 236, 51)], [45, (253, 238, 51)], [46, (253, 232, 45)], [47, (255, 226, 42)], [48, (255, 220, 40)], [49, (255, 214, 40)], [50, (254, 206, 34)], [51, (255, 210, 28)], [52, (251, 206, 27)], [53, (245, 198, 24)], [54, (241, 188, 24)], [55, (237, 181, 26)], [56, (229, 175, 23)], [57, (222, 167, 25)], [58, (218, 162, 27)], [59, (212, 153, 27)], [60, (206, 147, 31)], [61, (198, 138, 28)], [62, (238, 182, 23)], [63, (241, 188, 22)], [64, (249, 197, 25)], [65, (255, 204, 25)], [66, (255, 205, 32)], [67, (253, 211, 37)], [68, (254, 219, 39)], [69, (255, 228, 43)], [70, (255, 238, 47)], [71, (249, 244, 56)], [72, (245, 244, 56)], [73, (239, 241, 56)], [74, (233, 237, 56)], [75, (225, 237, 53)], [76, (220, 233, 55)], [77, (217, 235, 55)], [78, (212, 233, 54)], [79, (205, 227, 54)], [80, (203, 227, 51)], [81, (200, 229, 53)], [82, (131, 202, 46)], [83, (135, 205, 47)], [84, (138, 205, 47)], [85, (142, 208, 48)], [86, (143, 209, 47)], [87, (149, 209, 49)], [88, (153, 211, 47)], [89, (158, 213, 49)], [90, (166, 214, 50)], [91, (176, 219, 51)], [92, (181, 218, 52)], [93, (190, 222, 51)], [94, (198, 226, 54)], [95, (203, 227, 53)], [96, (211, 232, 53)], [97, (215, 233, 53)], [98, (221, 234, 56)], [99, (230, 238, 57)], [100, (137, 204, 46)], [101, (130, 204, 45)], [102, (125, 199, 44)], [103, (116, 195, 41)], [104, (107, 193, 40)], [105, (104, 188, 40)], [106, (99, 189, 40)], [107, (91, 187, 36)], [108, (90, 181, 41)], [109, (79, 181, 35)], [110, (76, 181, 37)], [111, (75, 180, 35)], [112, (73, 178, 36)], [113, (68, 177, 36)], [114, (67, 176, 33)], [115, (66, 175, 34)], [116, (11, 186, 59)], [117, (14, 185, 55)], [118, (17, 184, 55)], [119, (16, 183, 52)], [120, (18, 181, 52)], [121, (18, 181, 52)], [122, (17, 180, 51)], [123, (22, 181, 52)], [124, (25, 181, 48)], [125, (27, 176, 46)], [126, (30, 175, 36)], [127, (31, 171, 36)], [128, (38, 170, 32)], [129, (39, 167, 31)], [130, (50, 171, 32)]], [[1, (149, 225, 2)], [2, (156, 229, 2)], [3, (166, 232, 2)], [4, (175, 235, 0)], [5, (181, 238, 1)], [6, (189, 239, 0)], [7, (194, 243, 1)], [8, (200, 246, 0)], [9, (206, 248, 0)], [10, (213, 249, 1)], [11, (216, 251, 1)], [12, (220, 253, 0)], [13, (220, 253, 0)], [14, (220, 253, 0)], [15, (221, 254, 1)], [16, (221, 254, 1)], [17, (221, 254, 1)], [18, (220, 253, 0)], [19, (219, 251, 0)], [20, (214, 251, 0)], [21, (207, 247, 0)], [22, (199, 244, 1)], [23, (187, 240, 0)], [24, (176, 236, 1)], [25, (163, 231, 0)], [26, (149, 225, 2)], [27, (134, 219, 2)], [28, (118, 212, 2)], [29, (104, 207, 2)], [30, (89, 201, 3)], [31, (74, 195, 4)], [32, (62, 191, 3)], [33, (51, 185, 4)], [34, (39, 180, 5)], [35, (29, 175, 6)], [36, (19, 170, 5)], [37, (12, 166, 6)], [38, (4, 162, 7)], [39, (0, 157, 6)], [40, (0, 152, 8)], [41, (0, 145, 10)], [42, (0, 139, 12)], [43, (0, 133, 14)], [44, (0, 127, 16)], [45, (0, 121, 18)], [46, (0, 115, 20)], [47, (0, 110, 23)], [48, (0, 104, 25)], [49, (0, 99, 27)], [50, (0, 95, 29)], [51, (1, 92, 31)], [52, (0, 91, 30)], [53, (0, 95, 31)], [54, (1, 98, 29)], [55, (0, 102, 26)], [56, (0, 108, 23)], [57, (0, 115, 22)], [58, (0, 121, 20)], [59, (0, 128, 15)], [60, (0, 138, 13)], [61, (0, 144, 10)], [62, (1, 124, 18)], [63, (0, 117, 20)], [64, (0, 112, 22)], [65, (1, 105, 26)], [66, (0, 101, 27)], [67, (0, 97, 28)], [68, (0, 95, 29)], [69, (0, 95, 31)], [70, (0, 96, 29)], [71, (0, 99, 27)], [72, (0, 102, 26)], [73, (0, 108, 23)], [74, (0, 113, 21)], [75, (0, 118, 21)], [76, (0, 123, 17)], [77, (1, 129, 16)], [78, (0, 135, 14)], [79, (0, 141, 11)], [80, (0, 146, 9)], [81, (0, 152, 8)], [82, (45, 182, 4)], [83, (35, 177, 5)], [84, (26, 173, 5)], [85, (18, 169, 6)], [86, (11, 165, 5)], [87, (5, 163, 8)], [88, (1, 160, 8)], [89, (0, 154, 8)], [90, (0, 148, 10)], [91, (0, 141, 11)], [92, (1, 137, 13)], [93, (0, 130, 16)], [94, (0, 126, 18)], [95, (0, 121, 18)], [96, (0, 117, 20)], [97, (0, 114, 19)], [98, (0, 112, 22)], [99, (0, 110, 23)], [100, (0, 153, 9)], [101, (0, 157, 8)], [102, (3, 160, 7)], [103, (8, 164, 5)], [104, (15, 167, 6)], [105, (21, 170, 6)], [106, (29, 175, 6)], [107, (38, 179, 4)], [108, (48, 183, 3)], [109, (58, 188, 4)], [110, (67, 192, 4)], [111, (74, 195, 4)], [112, (86, 199, 3)], [113, (92, 203, 2)], [114, (103, 208, 2)], [115, (112, 212, 2)], [116, (176, 236, 1)], [117, (165, 233, 2)], [118, (158, 229, 1)], [119, (150, 225, 2)], [120, (142, 222, 1)], [121, (134, 219, 2)], [122, (126, 217, 2)], [123, (118, 212, 1)], [124, (107, 209, 3)], [125, (97, 204, 2)], [126, (87, 200, 4)], [127, (77, 197, 4)], [128, (68, 193, 3)], [129, (59, 189, 3)], [130, (50, 185, 4)]], [[1, (225, 22, 86)], [2, (222, 19, 83)], [3, (220, 15, 80)], [4, (219, 13, 77)], [5, (218, 12, 76)], [6, (217, 11, 75)], [7, (219, 11, 73)], [8, (219, 11, 73)], [9, (219, 10, 75)], [10, (220, 11, 76)], [11, (219, 13, 77)], [12, (220, 14, 78)], [13, (221, 15, 79)], [14, (222, 17, 82)], [15, (223, 18, 83)], [16, (222, 19, 83)], [17, (222, 19, 83)], [18, (222, 19, 83)], [19, (223, 18, 83)], [20, (223, 20, 86)], [21, (224, 21, 85)], [22, (224, 24, 89)], [23, (223, 27, 93)], [24, (225, 30, 98)], [25, (224, 35, 103)], [26, (224, 39, 107)], [27, (224, 43, 112)], [28, (224, 47, 119)], [29, (225, 51, 123)], [30, (224, 52, 124)], [31, (225, 55, 128)], [32, (224, 57, 129)], [33, (225, 58, 130)], [34, (224, 58, 130)], [35, (224, 60, 133)], [36, (224, 62, 137)], [37, (224, 63, 139)], [38, (224, 66, 141)], [39, (224, 67, 144)], [40, (223, 71, 148)], [41, (225, 74, 153)], [42, (224, 77, 157)], [43, (224, 81, 161)], [44, (223, 84, 165)], [45, (224, 87, 169)], [46, (223, 89, 174)], [47, (216, 92, 178)], [48, (208, 96, 182)], [49, (195, 99, 188)], [50, (185, 102, 194)], [51, (171, 104, 199)], [52, (158, 108, 205)], [53, (142, 110, 209)], [54, (126, 114, 216)], [55, (109, 116, 220)], [56, (94, 118, 226)], [57, (77, 120, 232)], [58, (61, 123, 236)], [59, (45, 125, 240)], [60, (28, 127, 244)], [61, (18, 128, 249)], [62, (63, 123, 237)], [63, (78, 120, 232)], [64, (94, 118, 226)], [65, (111, 116, 220)], [66, (126, 114, 216)], [67, (145, 110, 210)], [68, (161, 107, 203)], [69, (172, 105, 198)], [70, (186, 101, 192)], [71, (198, 98, 188)], [72, (209, 95, 182)], [73, (219, 91, 176)], [74, (225, 88, 170)], [75, (225, 83, 165)], [76, (226, 80, 161)], [77, (224, 76, 154)], [78, (224, 72, 149)], [79, (224, 67, 144)], [80, (223, 63, 137)], [81, (225, 59, 133)], [82, (225, 26, 93)], [83, (224, 31, 98)], [84, (224, 35, 103)], [85, (224, 39, 107)], [86, (225, 44, 115)], [87, (223, 47, 119)], [88, (224, 52, 124)], [89, (224, 58, 132)], [90, (224, 64, 138)], [91, (224, 69, 147)], [92, (223, 75, 151)], [93, (225, 78, 158)], [94, (224, 82, 164)], [95, (224, 87, 169)], [96, (219, 91, 176)], [97, (212, 94, 182)], [98, (200, 97, 186)], [99, (187, 101, 192)], [100, (225, 70, 146)], [101, (224, 66, 141)], [102, (225, 61, 134)], [103, (225, 55, 126)], [104, (224, 50, 121)], [105, (224, 45, 113)], [106, (224, 39, 107)], [107, (224, 33, 102)], [108, (223, 28, 94)], [109, (224, 24, 89)], [110, (222, 19, 83)], [111, (221, 15, 79)], [112, (220, 11, 76)], [113, (217, 9, 71)], [114, (216, 6, 69)], [115, (214, 4, 65)], [116, (214, 0, 60)], [117, (214, 0, 60)], [118, (214, 0, 60)], [119, (214, 0, 60)], [120, (214, 2, 61)], [121, (216, 4, 65)], [122, (217, 7, 70)], [123, (219, 10, 75)], [124, (220, 14, 78)], [125, (221, 18, 82)], [126, (225, 22, 88)], [127, (223, 27, 93)], [128, (225, 32, 99)], [129, (224, 37, 105)], [130, (223, 42, 111)]], [[1, (202, 5, 76)], [2, (202, 2, 75)], [3, (203, 1, 77)], [4, (203, 1, 77)], [5, (203, 1, 77)], [6, (203, 1, 77)], [7, (203, 1, 77)], [8, (203, 1, 77)], [9, (203, 1, 77)], [10, (203, 1, 77)], [11, (203, 1, 77)], [12, (203, 1, 77)], [13, (203, 1, 77)], [14, (203, 1, 77)], [15, (203, 1, 77)], [16, (203, 1, 77)], [17, (203, 1, 77)], [18, (203, 1, 77)], [19, (203, 1, 77)], [20, (203, 1, 77)], [21, (203, 1, 77)], [22, (203, 3, 76)], [23, (203, 19, 69)], [24, (203, 45, 60)], [25, (203, 73, 49)], [26, (203, 104, 37)], [27, (202, 136, 24)], [28, (200, 170, 12)], [29, (199, 196, 5)], [30, (197, 218, 1)], [31, (193, 236, 0)], [32, (188, 246, 1)], [33, (183, 253, 0)], [34, (178, 255, 1)], [35, (171, 255, 7)], [36, (162, 252, 17)], [37, (153, 247, 26)], [38, (141, 237, 39)], [39, (132, 230, 49)], [40, (120, 220, 62)], [41, (109, 209, 77)], [42, (97, 195, 94)], [43, (86, 183, 106)], [44, (75, 172, 119)], [45, (69, 163, 127)], [46, (60, 154, 138)], [47, (55, 147, 146)], [48, (48, 140, 153)], [49, (43, 135, 160)], [50, (41, 132, 163)], [51, (44, 134, 160)], [52, (49, 142, 150)], [53, (56, 148, 143)], [54, (67, 162, 132)], [55, (80, 176, 113)], [56, (90, 189, 98)], [57, (106, 204, 81)], [58, (123, 220, 63)], [59, (138, 235, 44)], [60, (152, 246, 26)], [61, (166, 254, 12)], [62, (157, 250, 21)], [63, (147, 243, 32)], [64, (138, 235, 44)], [65, (126, 225, 56)], [66, (118, 216, 67)], [67, (111, 208, 77)], [68, (104, 203, 84)], [69, (100, 198, 89)], [70, (97, 195, 92)], [71, (98, 196, 93)], [72, (99, 198, 90)], [73, (102, 201, 84)], [74, (108, 207, 78)], [75, (114, 213, 70)], [76, (118, 217, 65)], [77, (125, 224, 56)], [78, (132, 229, 51)], [79, (140, 236, 40)], [80, (149, 243, 32)], [81, (156, 248, 23)], [82, (196, 217, 0)], [83, (195, 228, 0)], [84, (193, 235, 1)], [85, (191, 242, 1)], [86, (187, 247, 0)], [87, (185, 252, 1)], [88, (183, 254, 0)], [89, (179, 254, 1)], [90, (174, 254, 5)], [91, (167, 255, 11)], [92, (164, 252, 16)], [93, (157, 250, 21)], [94, (152, 246, 25)], [95, (149, 244, 30)], [96, (147, 243, 32)], [97, (147, 243, 32)], [98, (147, 242, 34)], [99, (148, 242, 31)], [100, (189, 245, 0)], [101, (191, 242, 1)], [102, (192, 236, 0)], [103, (194, 230, 0)], [104, (195, 221, 0)], [105, (197, 213, 0)], [106, (200, 204, 5)], [107, (201, 193, 7)], [108, (202, 179, 11)], [109, (202, 169, 14)], [110, (202, 156, 18)], [111, (204, 149, 22)], [112, (203, 135, 26)], [113, (203, 124, 31)], [114, (202, 112, 34)], [115, (203, 101, 37)], [116, (203, 6, 75)], [117, (202, 14, 72)], [118, (202, 20, 68)], [119, (203, 28, 67)], [120, (203, 34, 63)], [121, (203, 45, 60)], [122, (204, 50, 58)], [123, (202, 59, 55)], [124, (203, 73, 49)], [125, (203, 85, 45)], [126, (204, 99, 41)], [127, (203, 109, 35)], [128, (204, 120, 32)], [129, (203, 132, 28)], [130, (204, 144, 24)]], [[1, (151, 13, 255)], [2, (160, 7, 255)], [3, (172, 3, 255)], [4, (178, 1, 255)], [5, (192, 2, 250)], [6, (203, 9, 245)], [7, (212, 18, 237)], [8, (222, 32, 228)], [9, (229, 47, 218)], [10, (236, 64, 208)], [11, (242, 78, 201)], [12, (245, 88, 195)], [13, (248, 98, 188)], [14, (251, 104, 184)], [15, (253, 108, 183)], [16, (252, 108, 180)], [17, (251, 104, 184)], [18, (248, 98, 188)], [19, (244, 86, 196)], [20, (238, 71, 203)], [21, (230, 49, 216)], [22, (218, 26, 233)], [23, (202, 8, 244)], [24, (181, 0, 255)], [25, (166, 5, 255)], [26, (149, 14, 255)], [27, (129, 28, 254)], [28, (107, 48, 254)], [29, (88, 63, 251)], [30, (70, 81, 249)], [31, (52, 96, 245)], [32, (41, 107, 245)], [33, (31, 116, 241)], [34, (22, 126, 241)], [35, (14, 132, 238)], [36, (6, 138, 236)], [37, (2, 143, 235)], [38, (0, 144, 233)], [39, (0, 143, 230)], [40, (0, 143, 229)], [41, (1, 143, 227)], [42, (0, 138, 226)], [43, (3, 132, 223)], [44, (9, 126, 221)], [45, (13, 120, 218)], [46, (20, 112, 215)], [47, (24, 103, 208)], [48, (27, 95, 204)], [49, (28, 82, 190)], [50, (25, 66, 171)], [51, (25, 50, 151)], [52, (20, 32, 130)], [53, (19, 17, 114)], [54, (16, 5, 97)], [55, (15, 0, 91)], [56, (15, 0, 91)], [57, (15, 0, 91)], [58, (15, 0, 91)], [59, (15, 0, 91)], [60, (15, 0, 91)], [61, (15, 0, 91)], [62, (15, 0, 91)], [63, (15, 0, 91)], [64, (15, 0, 91)], [65, (15, 0, 91)], [66, (15, 4, 96)], [67, (18, 17, 111)], [68, (21, 35, 132)], [69, (24, 49, 150)], [70, (27, 66, 171)], [71, (28, 82, 190)], [72, (29, 93, 201)], [73, (25, 104, 209)], [74, (19, 112, 215)], [75, (12, 120, 218)], [76, (8, 127, 221)], [77, (1, 135, 224)], [78, (0, 140, 225)], [79, (1, 143, 227)], [80, (0, 143, 230)], [81, (0, 144, 233)], [82, (52, 96, 245)], [83, (41, 107, 243)], [84, (31, 116, 241)], [85, (20, 125, 240)], [86, (12, 133, 238)], [87, (5, 139, 236)], [88, (2, 143, 235)], [89, (0, 143, 230)], [90, (0, 143, 229)], [91, (1, 143, 227)], [92, (0, 139, 224)], [93, (6, 131, 223)], [94, (11, 124, 220)], [95, (18, 114, 216)], [96, (24, 105, 212)], [97, (26, 97, 205)], [98, (29, 87, 195)], [99, (27, 71, 176)], [100, (1, 143, 227)], [101, (0, 143, 229)], [102, (0, 144, 233)], [103, (2, 143, 235)], [104, (8, 138, 236)], [105, (16, 131, 238)], [106, (26, 121, 241)], [107, (38, 110, 244)], [108, (52, 98, 246)], [109, (64, 86, 249)], [110, (77, 74, 251)], [111, (87, 65, 252)], [112, (101, 52, 255)], [113, (112, 43, 255)], [114, (123, 33, 255)], [115, (134, 25, 254)], [116, (198, 4, 248)], [117, (185, 0, 254)], [118, (176, 0, 255)], [119, (170, 3, 255)], [120, (162, 8, 255)], [121, (152, 13, 255)], [122, (142, 19, 255)], [123, (132, 27, 254)], [124, (117, 38, 254)], [125, (103, 50, 254)], [126, (89, 62, 251)], [127, (75, 75, 249)], [128, (62, 87, 249)], [129, (49, 101, 246)], [130, (35, 112, 244)]], [[1, (255, 113, 179)], [2, (255, 113, 179)], [3, (255, 113, 179)], [4, (255, 113, 179)], [5, (255, 113, 179)], [6, (255, 113, 179)], [7, (255, 113, 179)], [8, (255, 113, 179)], [9, (255, 113, 179)], [10, (255, 113, 179)], [11, (255, 113, 179)], [12, (255, 112, 181)], [13, (255, 112, 181)], [14, (255, 113, 179)], [15, (255, 113, 179)], [16, (255, 113, 179)], [17, (255, 113, 179)], [18, (255, 113, 179)], [19, (255, 113, 179)], [20, (255, 113, 179)], [21, (255, 113, 179)], [22, (255, 112, 181)], [23, (255, 113, 179)], [24, (254, 110, 179)], [25, (250, 102, 186)], [26, (244, 92, 193)], [27, (240, 77, 202)], [28, (232, 62, 213)], [29, (226, 48, 220)], [30, (221, 37, 229)], [31, (215, 27, 238)], [32, (209, 19, 241)], [33, (203, 12, 247)], [34, (196, 7, 249)], [35, (188, 2, 253)], [36, (176, 0, 255)], [37, (164, 3, 255)], [38, (140, 16, 250)], [39, (116, 33, 245)], [40, (83, 59, 233)], [41, (51, 83, 218)], [42, (29, 93, 201)], [43, (18, 88, 186)], [44, (16, 77, 170)], [45, (16, 63, 155)], [46, (14, 49, 139)], [47, (16, 37, 128)], [48, (14, 27, 119)], [49, (15, 22, 113)], [50, (14, 18, 109)], [51, (14, 14, 104)], [52, (15, 10, 102)], [53, (14, 9, 99)], [54, (14, 8, 98)], [55, (15, 4, 96)], [56, (15, 4, 96)], [57, (15, 4, 96)], [58, (16, 3, 95)], [59, (16, 3, 95)], [60, (16, 3, 95)], [61, (15, 2, 94)], [62, (11, 15, 106)], [63, (12, 15, 108)], [64, (11, 14, 107)], [65, (10, 15, 106)], [66, (11, 15, 106)], [67, (11, 15, 106)], [68, (12, 13, 105)], [69, (11, 15, 106)], [70, (12, 13, 105)], [71, (12, 11, 104)], [72, (12, 11, 104)], [73, (14, 9, 101)], [74, (13, 7, 97)], [75, (13, 4, 95)], [76, (16, 3, 93)], [77, (14, 8, 98)], [78, (14, 25, 115)], [79, (15, 54, 145)], [80, (21, 90, 191)], [81, (87, 56, 237)], [82, (255, 113, 179)], [83, (255, 113, 179)], [84, (255, 112, 181)], [85, (255, 113, 179)], [86, (255, 113, 179)], [87, (244, 114, 184)], [88, (147, 133, 212)], [89, (50, 144, 232)], [90, (5, 143, 232)], [91, (1, 130, 222)], [92, (1, 114, 206)], [93, (0, 101, 193)], [94, (0, 89, 181)], [95, (0, 81, 173)], [96, (1, 78, 170)], [97, (0, 73, 167)], [98, (1, 70, 163)], [99, (0, 65, 157)], [100, (38, 143, 234)], [101, (59, 143, 231)], [102, (91, 143, 226)], [103, (133, 136, 215)], [104, (169, 128, 204)], [105, (207, 121, 192)], [106, (235, 116, 184)], [107, (253, 112, 180)], [108, (255, 113, 179)], [109, (255, 113, 179)], [110, (255, 113, 179)], [111, (255, 113, 179)], [112, (255, 112, 181)], [113, (255, 113, 179)], [114, (255, 113, 179)], [115, (255, 113, 179)], [116, (255, 113, 179)], [117, (255, 113, 179)], [118, (255, 113, 179)], [119, (255, 113, 179)], [120, (255, 113, 179)], [121, (255, 113, 179)], [122, (255, 113, 179)], [123, (255, 113, 179)], [124, (255, 113, 179)], [125, (255, 113, 179)], [126, (255, 113, 179)], [127, (252, 113, 181)], [128, (239, 113, 184)], [129, (225, 118, 188)], [130, (207, 121, 192)]], [[1, (255, 194, 113)], [2, (255, 194, 113)], [3, (255, 194, 113)], [4, (255, 194, 113)], [5, (255, 194, 113)], [6, (255, 194, 113)], [7, (255, 194, 113)], [8, (255, 194, 113)], [9, (255, 194, 113)], [10, (255, 194, 113)], [11, (255, 194, 113)], [12, (255, 194, 113)], [13, (255, 194, 113)], [14, (255, 194, 113)], [15, (255, 194, 113)], [16, (255, 194, 113)], [17, (255, 194, 113)], [18, (255, 194, 113)], [19, (255, 194, 113)], [20, (255, 194, 113)], [21, (255, 194, 113)], [22, (255, 194, 113)], [23, (255, 194, 113)], [24, (254, 192, 109)], [25, (255, 174, 98)], [26, (255, 150, 84)], [27, (255, 115, 62)], [28, (254, 76, 40)], [29, (254, 39, 19)], [30, (255, 13, 12)], [31, (255, 8, 24)], [32, (255, 5, 30)], [33, (255, 4, 37)], [34, (254, 2, 43)], [35, (255, 1, 55)], [36, (255, 0, 66)], [37, (255, 3, 80)], [38, (254, 12, 115)], [39, (254, 23, 153)], [40, (255, 38, 213)], [41, (224, 17, 255)], [42, (154, 1, 231)], [43, (129, 0, 204)], [44, (120, 0, 185)], [45, (118, 0, 167)], [46, (119, 0, 154)], [47, (122, 1, 142)], [48, (122, 0, 135)], [49, (125, 0, 128)], [50, (124, 0, 122)], [51, (118, 0, 110)], [52, (112, 0, 100)], [53, (110, 0, 97)], [54, (105, 1, 90)], [55, (102, 0, 84)], [56, (102, 0, 84)], [57, (99, 0, 82)], [58, (97, 0, 79)], [59, (97, 0, 79)], [60, (97, 0, 79)], [61, (94, 0, 74)], [62, (117, 0, 115)], [63, (119, 0, 118)], [64, (117, 0, 115)], [65, (118, 0, 115)], [66, (117, 0, 114)], [67, (117, 0, 114)], [68, (118, 0, 114)], [69, (116, 0, 113)], [70, (116, 0, 111)], [71, (114, 1, 109)], [72, (113, 0, 106)], [73, (110, 0, 99)], [74, (105, 0, 92)], [75, (98, 0, 81)], [76, (97, 0, 77)], [77, (106, 0, 92)], [78, (125, 0, 132)], [79, (118, 1, 160)], [80, (134, 0, 209)], [81, (255, 35, 206)], [82, (255, 194, 113)], [83, (255, 194, 113)], [84, (255, 194, 113)], [85, (255, 194, 113)], [86, (255, 194, 113)], [87, (255, 182, 103)], [88, (255, 88, 217)], [89, (152, 30, 255)], [90, (107, 0, 240)], [91, (104, 0, 223)], [92, (103, 0, 206)], [93, (101, 0, 190)], [94, (101, 0, 182)], [95, (100, 0, 174)], [96, (101, 0, 169)], [97, (99, 1, 166)], [98, (101, 1, 162)], [99, (100, 0, 158)], [100, (140, 17, 255)], [101, (159, 35, 255)], [102, (188, 61, 255)], [103, (252, 90, 253)], [104, (255, 78, 148)], [105, (255, 111, 74)], [106, (255, 169, 94)], [107, (255, 191, 109)], [108, (255, 194, 113)], [109, (255, 194, 113)], [110, (255, 194, 113)], [111, (255, 194, 113)], [112, (255, 194, 113)], [113, (255, 194, 113)], [114, (255, 194, 113)], [115, (255, 194, 113)], [116, (255, 194, 113)], [117, (255, 194, 113)], [118, (255, 194, 113)], [119, (255, 194, 113)], [120, (255, 194, 113)], [121, (255, 194, 113)], [122, (255, 194, 113)], [123, (255, 194, 113)], [124, (255, 194, 113)], [125, (255, 194, 113)], [126, (255, 194, 113)], [127, (253, 191, 108)], [128, (255, 176, 99)], [129, (255, 153, 87)], [130, (253, 114, 73)]], [[1, (63, 30, 85)], [2, (70, 34, 82)], [3, (78, 38, 75)], [4, (80, 33, 67)], [5, (75, 21, 47)], [6, (73, 5, 26)], [7, (73, 0, 19)], [8, (71, 0, 16)], [9, (68, 0, 13)], [10, (68, 0, 13)], [11, (68, 0, 13)], [12, (69, 1, 16)], [13, (72, 0, 22)], [14, (75, 15, 43)], [15, (76, 31, 74)], [16, (68, 27, 85)], [17, (34, 1, 82)], [18, (26, 0, 87)], [19, (21, 0, 91)], [20, (14, 0, 97)], [21, (7, 0, 106)], [22, (0, 1, 119)], [23, (0, 5, 127)], [24, (0, 9, 136)], [25, (0, 21, 138)], [26, (0, 32, 132)], [27, (0, 41, 121)], [28, (0, 45, 95)], [29, (0, 37, 63)], [30, (3, 16, 32)], [31, (10, 0, 27)], [32, (34, 0, 39)], [33, (50, 0, 49)], [34, (63, 0, 55)], [35, (76, 0, 65)], [36, (95, 0, 82)], [37, (116, 1, 105)], [38, (152, 1, 158)], [39, (188, 1, 206)], [40, (228, 1, 254)], [41, (255, 1, 249)], [42, (255, 0, 220)], [43, (255, 0, 220)], [44, (250, 1, 217)], [45, (220, 1, 191)], [46, (209, 0, 180)], [47, (196, 0, 170)], [48, (201, 0, 171)], [49, (196, 0, 86)], [50, (213, 116, 1)], [51, (205, 121, 0)], [52, (198, 122, 0)], [53, (196, 125, 1)], [54, (190, 126, 0)], [55, (186, 129, 0)], [56, (186, 128, 2)], [57, (182, 127, 0)], [58, (181, 131, 0)], [59, (181, 130, 2)], [60, (180, 129, 1)], [61, (178, 131, 1)], [62, (203, 108, 0)], [63, (203, 106, 0)], [64, (201, 104, 1)], [65, (200, 98, 0)], [66, (196, 91, 0)], [67, (195, 78, 0)], [68, (184, 53, 0)], [69, (179, 28, 1)], [70, (178, 3, 0)], [71, (168, 1, 47)], [72, (149, 1, 85)], [73, (112, 0, 72)], [74, (81, 0, 45)], [75, (59, 0, 28)], [76, (47, 0, 18)], [77, (56, 1, 24)], [78, (86, 0, 49)], [79, (115, 0, 77)], [80, (159, 0, 116)], [81, (165, 9, 132)], [82, (75, 28, 80)], [83, (75, 26, 58)], [84, (71, 3, 28)], [85, (68, 0, 15)], [86, (68, 0, 13)], [87, (66, 0, 12)], [88, (150, 1, 85)], [89, (185, 0, 130)], [90, (185, 1, 135)], [91, (185, 1, 135)], [92, (188, 0, 138)], [93, (191, 0, 140)], [94, (202, 0, 150)], [95, (216, 0, 161)], [96, (231, 1, 162)], [97, (244, 0, 152)], [98, (255, 1, 131)], [99, (255, 0, 101)], [100, (254, 12, 208)], [101, (255, 24, 228)], [102, (238, 26, 224)], [103, (217, 37, 206)], [104, (126, 32, 106)], [105, (51, 38, 48)], [106, (64, 38, 67)], [107, (77, 38, 69)], [108, (74, 20, 46)], [109, (73, 0, 17)], [110, (71, 0, 16)], [111, (68, 0, 15)], [112, (68, 0, 15)], [113, (69, 0, 18)], [114, (66, 0, 27)], [115, (75, 25, 62)], [116, (79, 16, 43)], [117, (72, 0, 22)], [118, (71, 0, 16)], [119, (68, 0, 13)], [120, (68, 0, 13)], [121, (71, 0, 16)], [122, (72, 0, 18)], [123, (76, 12, 38)], [124, (75, 22, 50)], [125, (79, 39, 74)], [126, (72, 35, 79)], [127, (57, 29, 78)], [128, (40, 23, 75)], [129, (28, 22, 68)], [130, (33, 30, 61)]]] # gradient_li = ["gradient_logo_small.jpg", "gradient_logo_2_small.jpg", "gradient_logo_3_small.jpg", "gradient_logo_4_small.jpg", "gradient_logo_5_small.jpg", "gradient_logo_6_small.jpg", # "gradient_logo_7_small.jpg", "gradient_logo_8_small.jpg", "gradient_logo_9_small.jpg", "gradient_logo_10_small.jpg"] # gradient = "gradient_logo_small.jpg" # gradient_2 = "gradient_logo_2_small.jpg" speed = 5000 # in % def illuminate_all_pos(calc_colors): for [pos, col] in calc_colors: strip.setPixelColor(pos, Color(col[0], col[1], col[2])) strip.show() # color gradient mapping function # def colormap(strip, img_gradient, locations_rel, shift, brightness): # calc_color = [] # for j, [num, x_rel, y_rel] in enumerate(locations_rel): # # print("img_gradient[x, y]: ", img_gradient[x, y]) # gradient_height, gradient_width, gradient_channels = img_gradient.shape # x = int(x_rel * gradient_height) # y = int(y_rel * gradient_width) # B = int(img_gradient[x, y][0]) # G = int(img_gradient[x, y][1]) # R = int(img_gradient[x, y][2]) # color = (R, G, B) # current_LED_num = j + shift # if current_LED_num > LED_COUNT-1: # current_LED_num = current_LED_num % LED_COUNT # calc_color.append([current_LED_num, color]) # return calc_color def shift(img_gradient, shifter): calc_color = [] for j in range(0, len(img_gradient)): color = img_gradient[j][1] current_LED_num = j + shifter if current_LED_num > LED_COUNT-1: current_LED_num = current_LED_num % LED_COUNT calc_color.append([current_LED_num, color]) return calc_color # fade between colors def fade_gradient(strip, col_map_1, col_map_2, speed): fade_dist = 15 for counter in range(0, fade_dist): col_map_inter = [] for led_count, _ in enumerate(col_map_1): R_inter = int(col_map_1[led_count][1][0] + counter/fade_dist*(col_map_2[led_count][1][0] - col_map_1[led_count][1][0])) # print("R1: " + str(col_map_1[led_count][1][0]) + " | R2: " + str(col_map_2[led_count][1][0]) + " | Rinter: " + str(R_inter)) G_inter = int(col_map_1[led_count][1][1] + counter/fade_dist*(col_map_2[led_count][1][1] - col_map_1[led_count][1][1])) B_inter = int(col_map_1[led_count][1][2] + counter/fade_dist*(col_map_2[led_count][1][2] - col_map_1[led_count][1][2])) ins = [col_map_1[led_count][0], (R_inter, G_inter, B_inter)] col_map_inter.append(ins) illuminate_all_pos(col_map_inter) time.sleep(0.5/(speed/100)) # gradient animation functions def rotate_gradient(strip, img_gradient, speed): bright = 255 col_map_old = [] for k in range(0, LED_COUNT): col_map_old = shift(img_gradient, k) col_map_new = copy.deepcopy(col_map_old) col_map_new.append(col_map_new.pop(0)) for en_counter, entry in enumerate(col_map_new): col_map_new[en_counter][0] = col_map_old[en_counter][0] # print("old: " + str(col_map_old[0]) + ", new: " + str(col_map_new[0])) fade_gradient(strip, col_map_new, col_map_old, speed*100) # illuminate_all_pos(color_map) # time.sleep(0.5/(speed/100)) # Define functions which animate LEDs in various ways. def colorWipe(strip, color, wait_ms=50): """Wipe color across display a pixel at a time.""" for i in range(strip.numPixels()): strip.setPixelColor(i, color) strip.show() time.sleep(wait_ms/1000.0) # def theaterChase(strip, color, wait_ms=50, iterations=10): # """Movie theater light style chaser animation.""" # for j in range(iterations): # for q in range(3): # for i in range(0, strip.numPixels(), 3): # strip.setPixelColor(i+q, color) # strip.show() # time.sleep(wait_ms/1000.0) # for i in range(0, strip.numPixels(), 3): # strip.setPixelColor(i+q, 0) # theaterChase(strip, Color(127, 127, 127)) # White theater chase # def wheel(pos): # """Generate rainbow colors across 0-255 positions.""" # if pos < 85: # return Color(pos * 3, 255 - pos * 3, 0) # elif pos < 170: # pos -= 85 # return Color(255 - pos * 3, 0, pos * 3) # else: # pos -= 170 # return Color(0, pos * 3, 255 - pos * 3) # def rainbow(strip, wait_ms=20, iterations=1): # """Draw rainbow that fades across all pixels at once.""" # for j in range(256*iterations): # for i in range(strip.numPixels()): # strip.setPixelColor(i, wheel((i+j) & 255)) # strip.show() # time.sleep(wait_ms/1000.0) # def rainbowCycle(strip, wait_ms=20, iterations=5): # """Draw rainbow that uniformly distributes itself across all pixels.""" # for j in range(256*iterations): # for i in range(strip.numPixels()): # strip.setPixelColor(i, wheel((int(i * 256 / strip.numPixels()) + j) & 255)) # strip.show() # time.sleep(wait_ms/1000.0) # def theaterChaseRainbow(strip, wait_ms=50): # """Rainbow movie theater light style chaser animation.""" # for j in range(256): # for q in range(3): # for i in range(0, strip.numPixels(), 3): # strip.setPixelColor(i+q, wheel((i+j) % 255)) # strip.show() # time.sleep(wait_ms/1000.0) # for i in range(0, strip.numPixels(), 3): # strip.setPixelColor(i+q, 0) # Main program logic follows: if __name__ == '__main__': # Process arguments parser = argparse.ArgumentParser() parser.add_argument('-c', '--clear', action='store_true', help='clear the display on exit') args = parser.parse_args() # Create NeoPixel object with appropriate configuration. strip = Adafruit_NeoPixel(LED_COUNT, LED_PIN, LED_FREQ_HZ, LED_DMA, LED_INVERT, LED_BRIGHTNESS, LED_CHANNEL) # Intialize the library (must be called once before other functions). strip.begin() print ('Press Ctrl-C to quit.') if not args.clear: print('Use "-c" argument to clear LEDs on exit') # locations_rel = [] # for [pos, x_raw, y_raw] in locations: # x_rel = x_raw / image_width # y_rel = y_raw / image_height # locations_rel.append([pos, x_rel, y_rel]) i=0 # path_mainfolder = getcwd() try: # image_grad = imread(path_mainfolder + "/gradients/" + gradient_li[0]) # image_grad_2 = imread(path_mainfolder + "/gradients/" + gradient_li[1]) # image_grad_3 = imread(path_mainfolder + "/gradients/" + gradient_li[2]) # image_grad_4 = imread(path_mainfolder + "/gradients/" + gradient_li[3]) # image_grad_5 = imread(path_mainfolder + "/gradients/" + gradient_li[4]) # image_grad_6 = imread(path_mainfolder + "/gradients/" + gradient_li[5]) # image_grad_7 = imread(path_mainfolder + "/gradients/" + gradient_li[6]) # image_grad_8 = imread(path_mainfolder + "/gradients/" + gradient_li[7]) # image_grad_9 = imread(path_mainfolder + "/gradients/" + gradient_li[8]) # image_grad_10 = imread(path_mainfolder + "/gradients/" + gradient_li[9]) # col_map_1 = colormap(strip, image_grad, locations_rel, 0, 255) # col_map_2 = colormap(strip, image_grad_2, locations_rel, 0, 255) # col_map_3 = colormap(strip, image_grad_3, locations_rel, 0, 255) # col_map_4 = colormap(strip, image_grad_4, locations_rel, 0, 255) # col_map_5 = colormap(strip, image_grad_5, locations_rel, 0, 255) # col_map_6 = colormap(strip, image_grad_6, locations_rel, 0, 255) # col_map_7 = colormap(strip, image_grad_7, locations_rel, 0, 255) # col_map_8 = colormap(strip, image_grad_8, locations_rel, 0, 255) # col_map_9 = colormap(strip, image_grad_9, locations_rel, 0, 255) # col_map_10 = colormap(strip, image_grad_10, locations_rel, 0, 255) # img_grads = [image_grad, image_grad_2, image_grad_3, image_grad_4, image_grad_5, image_grad_6, image_grad_7, image_grad_8, image_grad_9, image_grad_10] # color_maps_li = [col_map_1, col_map_2, col_map_3, col_map_4, col_map_5, col_map_6, col_map_7, col_map_8, col_map_9, col_map_10] color_maps_li = gradient_maps_list while True: # if i > len(gradient_li): # i = 0 # image_grad = cv2.imread(gradient_li(i)) # theaterChase(strip, Color(127, 127, 127)) # White theater chase # print ('gradient_list(' + str(i) + ') now playing') for map_counter, c_map in enumerate(color_maps_li): rotate_gradient(strip, gradient_map_original, speed) fade_gradient(strip, gradient_map_original, color_maps_li[map_counter], speed) rotate_gradient(strip, color_maps_li[map_counter], speed) fade_gradient(strip, color_maps_li[map_counter], gradient_map_original, speed) # i =+ 1 except KeyboardInterrupt: if args.clear: colorWipe(strip, Color(0,0,0), 10)
159.379167
24,996
0.486968
6,677
38,251
2.728022
0.073536
0.016799
0.023223
0.015921
0.133956
0.112654
0.072083
0.063464
0.059511
0.044414
0
0.414703
0.208021
38,251
239
24,997
160.046025
0.186572
0.173041
0
0.026316
0
0
0.003556
0
0
0
0
0
0
1
0.065789
false
0
0.065789
0
0.144737
0.026316
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
1
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
88a96ebb6bb32c3a368b1b1f159bb483e6dda05c
55
py
Python
classgroup/views/admin.py
wanderknight/OnlineJudge
dc1a085867a7f26799931f7ab6d58e071f75cf1c
[ "MIT" ]
null
null
null
classgroup/views/admin.py
wanderknight/OnlineJudge
dc1a085867a7f26799931f7ab6d58e071f75cf1c
[ "MIT" ]
null
null
null
classgroup/views/admin.py
wanderknight/OnlineJudge
dc1a085867a7f26799931f7ab6d58e071f75cf1c
[ "MIT" ]
null
null
null
__author__ = 'wanderknight' __time__ = '2019/8/9 20:31'
27.5
27
0.727273
8
55
4
1
0
0
0
0
0
0
0
0
0
0
0.204082
0.109091
55
2
28
27.5
0.44898
0
0
0
0
0
0.464286
0
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
1
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
88ae297d2240f240020aaafaacc83b9ba081748a
218
py
Python
pytarallo/ProductToUpload.py
pippo314/pytarallo
ede1b47a2777317cf7c37aa51d7edfc9d8064e31
[ "MIT" ]
null
null
null
pytarallo/ProductToUpload.py
pippo314/pytarallo
ede1b47a2777317cf7c37aa51d7edfc9d8064e31
[ "MIT" ]
null
null
null
pytarallo/ProductToUpload.py
pippo314/pytarallo
ede1b47a2777317cf7c37aa51d7edfc9d8064e31
[ "MIT" ]
null
null
null
from pytarallo.Product import Product class ProductToUpload(Product): """Not sure what this is""" def __init__(self, data: dict): """Constructor for ProductToUpload""" super().__init__(data)
21.8
45
0.669725
24
218
5.75
0.791667
0
0
0
0
0
0
0
0
0
0
0
0.211009
218
9
46
24.222222
0.802326
0.243119
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
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
0
0
0
1
0
0
4
88b5a3f02b92247c7b02d0307b21178d1f7556b5
362
py
Python
airbyte-integrations/connectors/source-bitrix24-crm/source_bitrix24_crm/utils.py
adventum/airbyte
e563d1bce7c192882c719fc112bfc371e701ea48
[ "MIT" ]
null
null
null
airbyte-integrations/connectors/source-bitrix24-crm/source_bitrix24_crm/utils.py
adventum/airbyte
e563d1bce7c192882c719fc112bfc371e701ea48
[ "MIT" ]
null
null
null
airbyte-integrations/connectors/source-bitrix24-crm/source_bitrix24_crm/utils.py
adventum/airbyte
e563d1bce7c192882c719fc112bfc371e701ea48
[ "MIT" ]
null
null
null
from datetime import datetime, timedelta def get_yesterday_date() -> str: """Returns yesterday date (mm/dd/yyyy for requests report).""" return (datetime.now() - timedelta(1)).date().strftime("%Y/%m/%d") + "T23:59:59" def get_today_minus_n_days_date(days: int): return (datetime.now() - timedelta(days)).date().strftime("%m/%d/%Y") + "T00:00:00"
32.909091
87
0.668508
54
362
4.351852
0.592593
0.051064
0.144681
0.221277
0
0
0
0
0
0
0
0.04127
0.129834
362
10
88
36.2
0.704762
0.154696
0
0
0
0
0.113333
0
0
0
0
0
0
1
0.4
false
0
0.2
0.2
1
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
ee1608bfc397ef6cd86c476cdfbd665f0ba9d0d9
185
py
Python
common/mod/Mod.py
wode490390/Mod-stub
0a1451f39e9c41c6a6645257f76d9a01591342ce
[ "MIT" ]
null
null
null
common/mod/Mod.py
wode490390/Mod-stub
0a1451f39e9c41c6a6645257f76d9a01591342ce
[ "MIT" ]
null
null
null
common/mod/Mod.py
wode490390/Mod-stub
0a1451f39e9c41c6a6645257f76d9a01591342ce
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- def Binding(name, version): pass def InitServer(): pass def DestroyServer(): pass def InitClient(): pass def DestroyClient(): pass
8.409091
27
0.589189
20
185
5.45
0.6
0.256881
0
0
0
0
0
0
0
0
0
0.007463
0.275676
185
21
28
8.809524
0.80597
0.113514
0
0.5
0
0
0
0
0
0
0
0
0
1
0.5
false
0.5
0
0
0.5
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
0
0
0
1
0
1
0
0
0
0
0
4
ee2b8628e865cc2f5567aa9c66d769d53d4631c8
1,441
py
Python
steam_inbox.py
AgincourtProjects/Steam-Email-Service
278e2f1b07bcd73ba7ded831f95d06fc7f6cbd11
[ "MIT" ]
null
null
null
steam_inbox.py
AgincourtProjects/Steam-Email-Service
278e2f1b07bcd73ba7ded831f95d06fc7f6cbd11
[ "MIT" ]
null
null
null
steam_inbox.py
AgincourtProjects/Steam-Email-Service
278e2f1b07bcd73ba7ded831f95d06fc7f6cbd11
[ "MIT" ]
null
null
null
import imaplib import email host = 'imap.gmail.com' username = 'kunforever16@gmail.com' password = 'additya007' mail = imaplib.IMAP4_SSL(host) mail.login(username, password) mail.select("inbox") _, search_data = mail.search(None, 'UNSEEN') mail_list = search_data[0].split() latest = mail_list[-1] _, data = mail.fetch(latest, '(RFC822)') _, b = data[0] email_message = email.message_from_bytes(b) # print(email_message) # print(email_message, file=open('mail.txt', 'w')) x = str(email_message) a = x.split('Here is the Steam Guard code you need to login to account kunforever16:</td>\r\n\t\t\t\t</tr>\r\n\t\t\t</table>\r\n\t\t\t\t\t\t<table width="100%" border="0" cellspacing="0" cellpadding="0">\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td class="pb-70 mpb-50" style="padding-bottom: 70px;">\r\n\t\t\t\t\t\t<table width="100%" border="0" cellspacing="0" cellpadding="0"bgcolor="#17191c">\r\n\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t<td class="py-30 px-56" style="padding-top: 30px; padding-bottom: 30px; padding-left: 56px; padding-right: 56px;">\r\n\t\t\t\t\t\t\t\t\t<table width="100%" border="0" cellspacing="0" cellpadding="0">\r\n\t\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t<td class="title-48 c-blue1 fw-b a-center" style="font-size:48px; line-height:52px; font-family:\'Motiva Sans\', Helvetica, Arial, sans-serif; color:#3a9aed; font-weight:bold; text-align:center;">\r\n\t\t\t\t\t\t\t\t\t\t\t\t') b = a[1] code = b[1:6] print(code)
53.37037
905
0.680083
303
1,441
3.188119
0.349835
0.151139
0.189441
0.202899
0.279503
0.279503
0.279503
0.272257
0.272257
0.270186
0
0.050642
0.081888
1,441
26
906
55.423077
0.679516
0.047883
0
0
0
0.105263
0.687363
0.330898
0
0
0
0
0
1
0
false
0.105263
0.105263
0
0.105263
0.052632
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
1
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
4
ee2d9fce933882cb2481f6db8ce1bbd344c89f26
143
py
Python
django_directed/urls.py
jacklinke/django-directed
8ef8cd8a71e9a03a8628dce6465351f676f542ff
[ "Apache-2.0" ]
2
2022-02-09T10:15:40.000Z
2022-02-22T14:11:03.000Z
django_directed/urls.py
jacklinke/django-directed
8ef8cd8a71e9a03a8628dce6465351f676f542ff
[ "Apache-2.0" ]
1
2022-02-20T14:49:37.000Z
2022-02-20T14:49:37.000Z
django_directed/urls.py
jacklinke/django-directed
8ef8cd8a71e9a03a8628dce6465351f676f542ff
[ "Apache-2.0" ]
null
null
null
from django.urls import path from django.views.generic import TemplateView from . import views app_name = "django_directed" urlpatterns = []
17.875
45
0.79021
19
143
5.842105
0.631579
0.18018
0
0
0
0
0
0
0
0
0
0
0.13986
143
7
46
20.428571
0.902439
0
0
0
0
0
0.104895
0
0
0
0
0
0
1
0
false
0
0.6
0
0.6
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
ee443e82f0dbc4ed50509bda6ebd72f7adaba101
168
py
Python
08_pr3_05.py
AmreshTripathy/Python
e86420fef7f52da393be5b50ac2f13bddfeb3306
[ "Apache-2.0" ]
4
2021-05-27T05:06:09.000Z
2021-06-12T17:12:47.000Z
08_pr3_05.py
AmreshTripathy/Python
e86420fef7f52da393be5b50ac2f13bddfeb3306
[ "Apache-2.0" ]
null
null
null
08_pr3_05.py
AmreshTripathy/Python
e86420fef7f52da393be5b50ac2f13bddfeb3306
[ "Apache-2.0" ]
null
null
null
letter = "Dear Harry, This python course is nice! Thanks!" print (letter) formatted_letter = "Dear Harry,\nThis course is nice!\nThanks!" print (formatted_letter )
33.6
64
0.738095
23
168
5.304348
0.565217
0.163934
0.245902
0
0
0
0
0
0
0
0
0
0.154762
168
5
65
33.6
0.859155
0
0
0
0
0
0.539394
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
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
0
0
0
1
0
4
c9bb9da975d4e98bb70a9018354bb0c7626be25b
13,527
py
Python
src/chatbots/intentions/talk.py
leolani/cltl-chatbots
45a2300c87853911b53f19e53ab7c8a4705ba2e6
[ "Apache-2.0" ]
null
null
null
src/chatbots/intentions/talk.py
leolani/cltl-chatbots
45a2300c87853911b53f19e53ab7c8a4705ba2e6
[ "Apache-2.0" ]
14
2021-11-02T08:33:53.000Z
2022-03-30T16:00:01.000Z
src/chatbots/intentions/talk.py
leolani/cltl-chatbots
45a2300c87853911b53f19e53ab7c8a4705ba2e6
[ "Apache-2.0" ]
1
2021-12-11T11:54:29.000Z
2021-12-11T11:54:29.000Z
import os import sys from random import choice import pprint from cltl.brain.long_term_memory import LongTermMemory from cltl.brain.utils.helper_functions import brain_response_to_json from cltl.combot.backend.api.discrete import UtteranceType from cltl.reply_generation.data.sentences import ELOQUENCE from cltl.reply_generation.lenka_replier import LenkaReplier from cltl.triple_extraction.api import Chat from emissor.representation.scenario import TextSignal, Scenario from cltl.triple_extraction.cfg_analyzer import CFGAnalyzer src_path = os.path.abspath(os.path.join('../..')) if src_path not in sys.path: sys.path.append(src_path) import chatbots.util.capsule_util as c_util import chatbots.util.text_util as t_util # basic function that creates a capsule from a triple and stores it on the brain # @parameters triple as a json string and the initilised brain as LongTermMemory # Posting triples triggers thoughts that are converted to json and returned # ADDITIONAL PARAMETERS my_brain.update(capsule, reason_types=True, create_label=False) # reason_types=True --> it will find subjects and objects in the Semantic web and add the type information # create_label=True --> it will automatically create a rdfs:label property from the subject label def post_a_triple(triple, my_brain: LongTermMemory): response_json = None response = None capsule = c_util.triple_to_capsule(triple, UtteranceType.STATEMENT) try: response = my_brain.update(capsule) response_json = brain_response_to_json(response) except: print('Error:', response) return capsule, response_json def post_a_triple_label_and_type(triple, my_brain: LongTermMemory): response_json = None response = None capsule = c_util.triple_to_capsule(triple, UtteranceType.STATEMENT) try: response = my_brain.update(capsule, reason_types=True, create_label=True) response_json = brain_response_to_json(response) except: print('Error:', response) return capsule, response_json def post_a_triple_and_verbalise_throughts(triple, replier: LenkaReplier, my_brain: LongTermMemory): reply = None response = None capsule = c_util.triple_to_capsule(triple, UtteranceType.STATEMENT) #print(capsule) try: response = my_brain.update(capsule) # ADDITIONAL PARAMTERS reason_types=True, create_label=False response_json = brain_response_to_json(response) reply = replier.reply_to_statement(response_json) # ADDITIONAL PARAMETERS proactive=True, persist=True except: print('Error:', response) if reply is None: reply = choice(ELOQUENCE) return reply def post_a_query(triple,my_brain: LongTermMemory): response_json = None response = None capsule = c_util.triple_to_capsule(triple, UtteranceType.QUESTION) #print(capsule) try: response = my_brain.query_brain(capsule) response_json = brain_response_to_json(response) except: print('Error:', response) return response_json def post_a_query_and_verbalise_answer(triple, replier: LenkaReplier, my_brain: LongTermMemory): reply = None response = None capsule = c_util.triple_to_capsule(triple, UtteranceType.QUESTION) #print(capsule) try: response = my_brain.query_brain(capsule) response_json = brain_response_to_json(response) reply = replier.reply_to_question(response_json) except: print('Error:', response) if reply is None: reply = choice(ELOQUENCE) return reply ######## Utility function to integrate calls to the brain with ESMISSOR scenarios def process_text_and_reply(scenario: Scenario, place_id: str, location: str, human_id: str, textSignal: TextSignal, chat: Chat, analyzer: CFGAnalyzer, replier: LenkaReplier, my_brain: LongTermMemory, print_details:False): reply_list = [] capsule = None response = None response_json = None response_list = [] ### Next, we get all possible triples chat.add_utterance(c_util.seq_to_text(textSignal.seq)) analyzer.analyze(chat.last_utterance) if print_details: print('Last utterance:', c_util.seq_to_text(textSignal.seq)) if not chat.last_utterance.triples: reply = choice(ELOQUENCE) reply_list.append(reply) else: for extracted_triple in chat.last_utterance.triples: print(extracted_triple) capsule = c_util.scenario_utterance_to_capsule(scenario,place_id,location, textSignal,human_id, extracted_triple) if chat.last_utterance.utterance_type == UtteranceType.QUESTION: capsule = c_util.lowcase_triple_json_for_query(capsule) try: response = my_brain.query_brain(capsule) response_json = brain_response_to_json(response) reply = replier.reply_to_question(response_json) response_list.append(response_json) reply_list.append(reply) except: print('Error:', response) elif chat.last_utterance.utterance_type == UtteranceType.STATEMENT: try: response = my_brain.update(capsule, reason_types=True, create_label=True) response_json = brain_response_to_json(response) reply = replier.reply_to_statement(response_json, proactive=True, persist=True) response_list.append(response_json) reply_list.append(reply) except: print('Error:', response) response_list.append(response_json) return capsule, reply_list, response_list def process_statement_and_reply(scenario: Scenario, place_id: str, location: str, human_id: str, textSignal: TextSignal, chat: Chat, analyzer: CFGAnalyzer, replier: LenkaReplier, my_brain: LongTermMemory, print_details:False): reply_list = [] capsule_list = [] response = None response_json = None response_list = [] ### Next, we get all possible triples chat.add_utterance(c_util.seq_to_text(textSignal.seq)) analyzer.analyze(chat.last_utterance) if print_details: print('Last utterance:', c_util.seq_to_text(textSignal.seq)) if not chat.last_utterance.triples: reply = choice(ELOQUENCE) reply_list.append(reply) else: for extracted_triple in chat.last_utterance.triples: c_util.add_uri_to_triple(extracted_triple) capsule = c_util.scenario_utterance_to_capsule(scenario,place_id,location, textSignal,human_id, extracted_triple) capsule_list.append(capsule) if print_details: print("Triple",extracted_triple) print("Capsule", capsule) try: response = my_brain.update(capsule, reason_types=True, create_label=True) response_json = brain_response_to_json(response) reply = replier.reply_to_statement(response_json, proactive=True, persist=True) response_list.append(response_json) reply_list.append(reply) except: print('Error:', response) response_list.append(response_json) return capsule_list, reply_list, response_list def process_text_spacy_and_reply(scenario: Scenario, place_id: str, location: str, speaker: str, hearer:str, textSignal: TextSignal, replier: LenkaReplier, my_brain: LongTermMemory, nlp, print_details:False): reply_list = [] response_list = [] response = None ### We first add the mentions for any entities to the signal entities = t_util.add_ner_annotation_with_spacy(textSignal, nlp) subject_objects = t_util.add_np_annotation_with_spacy(textSignal, nlp, speaker, hearer) if print_details: print('Entities', entities) print('Subject_and_objects', subject_objects) if entities is None and subject_objects is None: reply = choice(ELOQUENCE) reply_list.append(reply) if len(entities)>0: for entity in entities: capsule = c_util.scenario_text_mention_to_capsule(scenario, place_id, location, textSignal, speaker, entity, "denotedIn", textSignal.id) if print_details: print('Entity Capsule:') pprint.pprint(capsule) try: response = my_brain.update(capsule, reason_types=True, create_label=True) response_json = brain_response_to_json(response) reply = replier.reply_to_statement(response_json, proactive=True, persist=True) response_list.append(response_json) reply_list.append(reply) if print_details: print('Entity reply', reply) except: print('Error:', response) if len(subject_objects)>0: for np in subject_objects: capsule = c_util.scenario_text_mention_to_capsule(scenario, place_id, location, textSignal, speaker, np, "denotedIn", textSignal.id) if print_details: print('Subj/Obj Capsule:') pprint.pprint(capsule) try: response = my_brain.update(capsule, reason_types=True, create_label=True) response_json = brain_response_to_json(response) reply = replier.reply_to_statement(response_json, proactive=True, persist=True) reply_list.append(reply) response_list.append(response) if print_details: print('Sub/Obj reply', reply) except: print('Error:', response) return reply_list, response_list def process_triple_spacy_and_reply(scenario: Scenario, place_id: str, location: str, speaker: str, hearer:str, textSignal: TextSignal, replier: LenkaReplier, my_brain: LongTermMemory, nlp, print_details:False): reply_list = [] response_list = [] response = None triples = t_util.get_subj_amod_triples_with_spacy(textSignal, nlp, speaker, hearer) triples.extend(t_util.get_subj_obj_triples_with_spacy(textSignal, nlp, speaker, hearer)) if print_details: print('Triples', triples) if triples is None: reply = choice(ELOQUENCE) reply_list.append(reply) else: for triple in triples: capsule = c_util.scenario_text_mention_to_capsule(scenario, place_id, location, textSignal, speaker, triple[1], "hasState", triple[2]) if print_details: print('Triple spacy Capsule:') pprint.pprint(capsule) try: response = my_brain.update(capsule, reason_types=True, create_label=True) response_json = brain_response_to_json(response) reply = replier.reply_to_statement(response_json, proactive=True, persist=True) response_list(response_json) reply_list.append(reply) if print_details: print('Triple spacy reply', reply) except: print('Error:', response) return reply_list, response_list
40.258929
125
0.566423
1,340
13,527
5.457463
0.127612
0.055791
0.024614
0.031177
0.75523
0.741146
0.705456
0.68262
0.68262
0.662792
0
0.000468
0.368596
13,527
335
126
40.379104
0.855755
0.064242
0
0.753676
0
0
0.021384
0
0
0
0
0
0
1
0.033088
false
0
0.051471
0
0.117647
0.161765
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
c9c3a153e7e6518d8c4fc7f469b7b7b64cc8fc49
96
py
Python
biplane_kine/graphing/__init__.py
klevis-a/process-vicon-biplane
f140589b4705f0d6411b80b8e2699add68d08662
[ "MIT" ]
1
2021-11-10T21:09:59.000Z
2021-11-10T21:09:59.000Z
biplane_kine/graphing/__init__.py
klevis-a/process-vicon-biplane
f140589b4705f0d6411b80b8e2699add68d08662
[ "MIT" ]
null
null
null
biplane_kine/graphing/__init__.py
klevis-a/process-vicon-biplane
f140589b4705f0d6411b80b8e2699add68d08662
[ "MIT" ]
null
null
null
"""This package provides contains utilities for graphing Vicon and biplane fluoroscopy data."""
48
95
0.802083
12
96
6.416667
1
0
0
0
0
0
0
0
0
0
0
0
0.125
96
1
96
96
0.916667
0.927083
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
a00a65b7ddea8dc99ee7ff1851dc7e40899d32a3
246
py
Python
app/es.py
Ferlab-Ste-Justine/csv-to-es
85d4a6ccd60115007607bc330232b40d77fc022e
[ "Apache-2.0" ]
null
null
null
app/es.py
Ferlab-Ste-Justine/csv-to-es
85d4a6ccd60115007607bc330232b40d77fc022e
[ "Apache-2.0" ]
null
null
null
app/es.py
Ferlab-Ste-Justine/csv-to-es
85d4a6ccd60115007607bc330232b40d77fc022e
[ "Apache-2.0" ]
null
null
null
from elasticsearch import Elasticsearch def get_es(conf) -> Elasticsearch: return Elasticsearch( hosts=conf['elasticsearch']['host'], scheme=conf['elasticsearch']['scheme'], port=conf['elasticsearch']['port'], )
24.6
47
0.654472
23
246
6.956522
0.521739
0.425
0
0
0
0
0
0
0
0
0
0
0.195122
246
9
48
27.333333
0.808081
0
0
0
0
0
0.215447
0
0
0
0
0
0
1
0.142857
false
0
0.142857
0.142857
0.428571
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
1
0
0
0
4
4e5384ed6739a072be19c7a06e2acc67985243ac
592
py
Python
200-299/295.py
linyk9/leetcode
eaaadead32cc9d3884543f4ed832bb3cb5aa68e6
[ "MIT" ]
null
null
null
200-299/295.py
linyk9/leetcode
eaaadead32cc9d3884543f4ed832bb3cb5aa68e6
[ "MIT" ]
null
null
null
200-299/295.py
linyk9/leetcode
eaaadead32cc9d3884543f4ed832bb3cb5aa68e6
[ "MIT" ]
null
null
null
class MedianFinder: def __init__(self): """ initialize your data structure here. """ self.nums = [] self.length = 0 def addNum(self, num: int) -> None: bisect.insort(self.nums, num) self.length += 1 def findMedian(self) -> float: return self.nums[self.length // 2] if self.length % 2 == 1 else (self.nums[self.length // 2] + self.nums[self.length // 2 - 1]) / 2 # Your MedianFinder object will be instantiated and called as such: # obj = MedianFinder() # obj.addNum(num) # param_2 = obj.findMedian()
24.666667
140
0.584459
76
592
4.486842
0.473684
0.175953
0.140762
0.211144
0.167155
0
0
0
0
0
0
0.023529
0.282095
592
23
141
25.73913
0.778824
0.282095
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0
0.111111
0.555556
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
4e6d0844205212e72428c847e0e4d7ea114529ed
171
py
Python
dapricot/__init__.py
softapr/django_apricot
911b6627a5ffaf3f7b13a099ca129f3a2ffda558
[ "BSD-3-Clause" ]
null
null
null
dapricot/__init__.py
softapr/django_apricot
911b6627a5ffaf3f7b13a099ca129f3a2ffda558
[ "BSD-3-Clause" ]
null
null
null
dapricot/__init__.py
softapr/django_apricot
911b6627a5ffaf3f7b13a099ca129f3a2ffda558
[ "BSD-3-Clause" ]
null
null
null
from django.utils.module_loading import autodiscover_modules def autodiscover(): autodiscover_modules('dapricot') default_app_config = 'dapricot.apps.DapricotConfig'
28.5
60
0.830409
19
171
7.210526
0.789474
0.277372
0
0
0
0
0
0
0
0
0
0
0.087719
171
6
61
28.5
0.878205
0
0
0
0
0
0.209302
0.162791
0
0
0
0
0
1
0.25
false
0
0.25
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
1
0
0
0
0
0
0
0
4
4e85e1e5cc1b28371bc7356a6ebee340230c8e31
827
py
Python
celadon/apps/form/models.py
ninapavlich/caledon
c5c1af7ac038b8e62e31637822d5412ad8587cbd
[ "MIT" ]
null
null
null
celadon/apps/form/models.py
ninapavlich/caledon
c5c1af7ac038b8e62e31637822d5412ad8587cbd
[ "MIT" ]
null
null
null
celadon/apps/form/models.py
ninapavlich/caledon
c5c1af7ac038b8e62e31637822d5412ad8587cbd
[ "MIT" ]
null
null
null
from django.db import models from django.conf import settings from django.core.urlresolvers import reverse from carbon.compounds.form.models import Form as BaseForm from carbon.compounds.form.models import FormField as BaseFormField from carbon.compounds.form.models import FormEntry as BaseFormEntry from carbon.compounds.form.models import FieldEntry as BaseFieldEntry from carbon.compounds.form.models import FormEntryStatus as BaseFormEntryStatus from carbon.compounds.form.models import FormEntryTag as BaseFormEntryTag class FormEntryStatus(BaseFormEntryStatus): pass class FormEntryTag(BaseFormEntryTag): pass class FormField(BaseFormField): pass class Form(BaseForm): field_model = FormField class FieldEntry(BaseFieldEntry): pass class FormEntry(BaseFormEntry): field_entry_model = FieldEntry
24.323529
79
0.834341
99
827
6.939394
0.30303
0.087336
0.165939
0.200873
0.305677
0.305677
0
0
0
0
0
0
0.114873
827
33
80
25.060606
0.938525
0
0
0.190476
0
0
0
0
0
0
0
0
0
1
0
false
0.190476
0.428571
0
0.809524
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
0
0
1
1
0
1
0
0
4
4e88b5287ec00f50565e2f5ada09f42e335f681f
165
py
Python
Yadu/generic/10.py
SrishtiGameLab/ema-virtual-worlds-s1c1ws-1617
483049e05ac032af4f3f2023c059eb8ffa3c369d
[ "MIT" ]
null
null
null
Yadu/generic/10.py
SrishtiGameLab/ema-virtual-worlds-s1c1ws-1617
483049e05ac032af4f3f2023c059eb8ffa3c369d
[ "MIT" ]
null
null
null
Yadu/generic/10.py
SrishtiGameLab/ema-virtual-worlds-s1c1ws-1617
483049e05ac032af4f3f2023c059eb8ffa3c369d
[ "MIT" ]
null
null
null
''' datetime ''' from datetime import datetime now = datetime.now() print now.year print now.month print now.day print now.hour print now.minute print now.second
11
29
0.751515
26
165
4.769231
0.423077
0.387097
0
0
0
0
0
0
0
0
0
0
0.151515
165
15
30
11
0.885714
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0.125
null
null
0.75
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
0
0
1
0
0
0
0
0
0
1
0
4
4ea83995a3865d6cc99180f78d883e4fbdffde44
87
py
Python
test/api/week_info/config.py
me2nuk/CTF-info
d811946f95368a80e561d113cbd5411f6f590c98
[ "MIT" ]
null
null
null
test/api/week_info/config.py
me2nuk/CTF-info
d811946f95368a80e561d113cbd5411f6f590c98
[ "MIT" ]
null
null
null
test/api/week_info/config.py
me2nuk/CTF-info
d811946f95368a80e561d113cbd5411f6f590c98
[ "MIT" ]
null
null
null
auth_key = "AIzaSyC8kuwqFhzPZYxxfItL0we2tQzIVl2nZuM" calendars_Id = "ctftime@gmail.com"
43.5
52
0.850575
8
87
9
1
0
0
0
0
0
0
0
0
0
0
0.04878
0.057471
87
2
53
43.5
0.829268
0
0
0
0
0
0.636364
0.443182
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
4edc0967751fbc424183b4d6b4fc2abcc2628bfa
2,282
py
Python
ipcam/src/remove_snap.py
jack139/HF
4810f4ee2faf9ab51c867e105addc139da2adfd1
[ "BSD-3-Clause" ]
10
2019-04-07T20:13:23.000Z
2021-12-07T06:23:52.000Z
ipcam/src/remove_snap.py
jack139/HF
4810f4ee2faf9ab51c867e105addc139da2adfd1
[ "BSD-3-Clause" ]
1
2020-05-29T16:11:22.000Z
2020-05-29T16:11:22.000Z
ipcam/src/remove_snap.py
jack139/HF
4810f4ee2faf9ab51c867e105addc139da2adfd1
[ "BSD-3-Clause" ]
6
2017-10-20T10:53:33.000Z
2020-04-24T06:34:18.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # import sys import shutil, os from config import setting #{ ObjectId("534ce70e1ecffb0b5565221d"), "192.168.100.15", "放映厅3", "K307PBVQ3GV3" } #{ ObjectId("534cf1b11ecffb0b5565225d"), "192.168.100.22", "放映厅4", "K307FX2N35KX" } #{ ObjectId("534cf3c01ecffb0b55652264"), "192.168.100.24", "放映厅6", "K307PTAL9ASM" } #{ ObjectId("534cf4dc1ecffb0b55652266"), "192.168.100.25", "放映厅1", "K307MJ5542Q9" } #{ ObjectId("534cf5681ecffb0b55652268"), "192.168.100.26", "放映厅5", "K307AQX7346Q" } #{ ObjectId("5361b5331ecffb52af0a7b6f"), "192.168.100.28", "放映厅2", "K307XPRYCT86" } #{ ObjectId("5361b7761ecffb576ab5a5b0"), "192.168.100.32", "放映厅7", "K30758SFKTGB" } cam_list = [ "534ce70e1ecffb0b5565221d", "534cf1b11ecffb0b5565225d", "534cf3c01ecffb0b55652264", "534cf4dc1ecffb0b55652266", "534cf5681ecffb0b55652268", "5361b5331ecffb52af0a7b6f", "5361b7761ecffb576ab5a5b0", "535e3bc31ecffb2fa372fdde", "5361d2f11ecffb0f1c162d8e", "535e3ca01ecffb2fa372fde3", "535e2eeb1ecffb2fa372fdc2", "535e21e81ecffb2fa372fdb4", "5347be091ecffb4c55f32b9d", "5347c0411ecffb4c55f32ba3", "534bab311ecffb50fcbc590e", "534ce0b11ecffb0b55652215", "534ce4851ecffb0b5565221a", "534cecdc1ecffb0b55652233", "534cef201ecffb0b55652253", "534cefc81ecffb0b55652255", "534cf2d81ecffb0b5565225f", "5361b4531ecffb0b20361fbd", "5361b5d01ecffb0f1c162d86", "5361b6691ecffb576ab5a5aa", "5361b6f81ecffb576ab5a5ad", "5361b8371ecffb576ab5a5b3", "5361b8bc1ecffb576ab5a5b6", "5361b9c11ecffb52af0a7b72", "5361baec1ecffb576ab5a5b9", "5361bc3c1ecffb52af0a7b75", ] if __name__=='__main__': parent = setting.snap_store_path n=0 l=0 for camid in cam_list: t_dirs = os.listdir("%s/%s" % (parent, camid)) t_dirs.sort() for d in t_dirs: if d=='capture': continue #shutil.rmtree('%s/%s/%s' % (parent, camid, d)) #print 'remove %s/%s/%s' % (parent, camid, d) #sys.stdout.flush() t_files = os.listdir("%s/%s/%s" % (parent, camid, d)) for f in t_files: n += 1 os.remove('%s/%s/%s/%s' % (parent, camid, d, f)) #print '%s - %s removed' % (camid, f) #sys.stdout.flush() os.rmdir('%s/%s/%s' % (parent, camid, d)) if n/1000>l: l = n/1000 print '%s - %d files removed' % (camid, n) sys.stdout.flush()
28.17284
84
0.698948
221
2,282
7.140271
0.466063
0.016477
0.039924
0.04943
0.047529
0.047529
0
0
0
0
0
0.317404
0.128834
2,282
80
85
28.525
0.476358
0.343996
0
0
0
0
0.532073
0.486158
0
0
0
0
0
0
null
null
0
0.055556
null
null
0.018519
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
0
1
null
0
0
0
0
1
0
0
0
0
0
0
0
0
4
0913f6aaa799906b156aab088806466f150b4a05
97
py
Python
models/BiBloSA.py
ForeverZyh/ASCC
2d76d679889953501c469221a37d486e7ee42ded
[ "MIT" ]
576
2017-12-13T12:44:20.000Z
2022-03-03T13:28:58.000Z
models/BiBloSA.py
motefly/TextClassificationBenchmark
77cbf922e3abe1241961c2759170a4657a3a4672
[ "MIT" ]
21
2017-12-17T07:46:25.000Z
2020-08-20T16:55:01.000Z
models/BiBloSA.py
motefly/TextClassificationBenchmark
77cbf922e3abe1241961c2759170a4657a3a4672
[ "MIT" ]
149
2017-12-13T15:00:37.000Z
2022-03-23T18:29:44.000Z
# -*- coding: utf-8 -*- #https://github.com/galsang/BiBloSA-pytorch/blob/master/model/model.py
19.4
70
0.690722
14
97
4.785714
0.928571
0
0
0
0
0
0
0
0
0
0
0.011236
0.082474
97
4
71
24.25
0.741573
0.927835
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
0935b3a6a31731fca608350755e68650f8fd10d1
473
py
Python
dynamicserialize/dstypes/com/raytheon/uf/common/auth/resp/SuccessfulExecution.py
mjames-upc/python-awips
e2b05f5587b02761df3b6dd5c6ee1f196bd5f11c
[ "BSD-3-Clause" ]
null
null
null
dynamicserialize/dstypes/com/raytheon/uf/common/auth/resp/SuccessfulExecution.py
mjames-upc/python-awips
e2b05f5587b02761df3b6dd5c6ee1f196bd5f11c
[ "BSD-3-Clause" ]
null
null
null
dynamicserialize/dstypes/com/raytheon/uf/common/auth/resp/SuccessfulExecution.py
mjames-upc/python-awips
e2b05f5587b02761df3b6dd5c6ee1f196bd5f11c
[ "BSD-3-Clause" ]
null
null
null
## ## # File auto-generated against equivalent DynamicSerialize Java class class SuccessfulExecution(object): def __init__(self): self.response = None self.updatedData = None def getResponse(self): return self.response def setResponse(self, response): self.response = response def getUpdatedData(self): return self.updatedData def setUpdatedData(self, updatedData): self.updatedData = updatedData
19.708333
68
0.678647
46
473
6.891304
0.456522
0.15142
0.088328
0
0
0
0
0
0
0
0
0
0.245243
473
23
69
20.565217
0.887955
0.139535
0
0
1
0
0
0
0
0
0
0
0
1
0.416667
false
0
0
0.166667
0.666667
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
1
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
094029e32c3fac9214dc951ca6564f88061ab551
124
py
Python
binner/exception.py
Zbooni/binner
292236e6bd4668aa904c2cd9a00cacc792984603
[ "MIT" ]
29
2015-03-19T02:54:31.000Z
2020-12-21T00:11:35.000Z
binner/exception.py
nadirhamid/binner
292236e6bd4668aa904c2cd9a00cacc792984603
[ "MIT" ]
2
2017-11-02T15:58:54.000Z
2019-12-07T20:45:53.000Z
binner/exception.py
Zbooni/binner
292236e6bd4668aa904c2cd9a00cacc792984603
[ "MIT" ]
10
2015-03-19T03:01:28.000Z
2018-06-28T22:04:05.000Z
## exception when an error based proportion ## of bins to items is received class DistributionException(Exception): pass
17.714286
43
0.782258
16
124
6.0625
0.9375
0
0
0
0
0
0
0
0
0
0
0
0.16129
124
6
44
20.666667
0.932692
0.556452
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
117de92352dbd13d19056c68909e1500cff214bf
169
py
Python
pyPseudo/error/ResolveError.py
johnyob/Pseudo
02e637e93872e786201538f719cd19676a03c170
[ "MIT" ]
1
2019-03-10T21:25:47.000Z
2019-03-10T21:25:47.000Z
pyPseudo/error/ResolveError.py
johnyob/Pseudo
02e637e93872e786201538f719cd19676a03c170
[ "MIT" ]
null
null
null
pyPseudo/error/ResolveError.py
johnyob/Pseudo
02e637e93872e786201538f719cd19676a03c170
[ "MIT" ]
null
null
null
from pyPseudo.error.RuntimeError import RuntimeError class ResolveError(RuntimeError): def __init__(self, token, message): super().__init__(token, message)
28.166667
52
0.757396
18
169
6.666667
0.722222
0.2
0
0
0
0
0
0
0
0
0
0
0.147929
169
5
53
33.8
0.833333
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
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
0
0
0
1
0
0
4
1190cdf55bf313430c66edb0631bb91371f60135
203
py
Python
rpspp/classifier/_base.py
walwe/rpspp
0899f54d78a48bc538d9be097899ff2cb50150ce
[ "MIT" ]
2
2021-11-25T13:40:57.000Z
2022-03-30T04:11:41.000Z
rpspp/classifier/_base.py
walwe/rpspp
0899f54d78a48bc538d9be097899ff2cb50150ce
[ "MIT" ]
null
null
null
rpspp/classifier/_base.py
walwe/rpspp
0899f54d78a48bc538d9be097899ff2cb50150ce
[ "MIT" ]
null
null
null
class ClassifierMixin: def fit(self, data, labels, test_data=None, test_label=None, log_dir=None): raise NotImplementedError def predict(self, data): raise NotImplementedError
22.555556
79
0.70936
24
203
5.875
0.625
0.113475
0
0
0
0
0
0
0
0
0
0
0.211823
203
8
80
25.375
0.88125
0
0
0.4
0
0
0
0
0
0
0
0
0
1
0.4
false
0
0
0
0.6
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
119f0ba9b9f9532a2f86f37e869f10715526a3a2
1,544
py
Python
mys/pygments/pygments/lexers/web.py
eerimoq/sython
90937bf44b798b9c1ae0d18e31e11e95967b46c6
[ "MIT" ]
83
2020-08-18T18:48:46.000Z
2021-01-01T17:00:45.000Z
mys/pygments/pygments/lexers/web.py
eerimoq/sython
90937bf44b798b9c1ae0d18e31e11e95967b46c6
[ "MIT" ]
31
2021-01-05T00:32:36.000Z
2022-02-23T13:34:33.000Z
mys/pygments/pygments/lexers/web.py
eerimoq/sython
90937bf44b798b9c1ae0d18e31e11e95967b46c6
[ "MIT" ]
7
2021-01-03T11:53:03.000Z
2022-02-22T17:49:42.000Z
""" pygments.lexers.web ~~~~~~~~~~~~~~~~~~~ Just export previously exported lexers. :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.lexers.actionscript import ActionScript3Lexer from pygments.lexers.actionscript import ActionScriptLexer from pygments.lexers.actionscript import MxmlLexer from pygments.lexers.css import CssLexer from pygments.lexers.css import SassLexer from pygments.lexers.css import ScssLexer from pygments.lexers.data import JsonLexer from pygments.lexers.html import DtdLexer from pygments.lexers.html import HamlLexer from pygments.lexers.html import HtmlLexer from pygments.lexers.html import JadeLexer from pygments.lexers.html import ScamlLexer from pygments.lexers.html import XmlLexer from pygments.lexers.html import XsltLexer from pygments.lexers.javascript import CoffeeScriptLexer from pygments.lexers.javascript import DartLexer from pygments.lexers.javascript import JavascriptLexer from pygments.lexers.javascript import LassoLexer from pygments.lexers.javascript import LiveScriptLexer from pygments.lexers.javascript import ObjectiveJLexer from pygments.lexers.javascript import TypeScriptLexer from pygments.lexers.php import PhpLexer from pygments.lexers.webmisc import DuelLexer from pygments.lexers.webmisc import QmlLexer from pygments.lexers.webmisc import SlimLexer from pygments.lexers.webmisc import XQueryLexer JSONLexer = JsonLexer # for backwards compatibility with Pygments 1.5 __all__ = []
37.658537
70
0.830311
190
1,544
6.726316
0.315789
0.295775
0.366197
0.120501
0.584507
0
0
0
0
0
0
0.007988
0.108161
1,544
40
71
38.6
0.920116
0.152202
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.928571
0
0.928571
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
0
0
0
1
0
1
0
0
4
11c0faab3a0cb9d4b29464fdccdbf75f4d47d4c9
61
py
Python
models/vision/detection/configs/faster_rcnn/SM/CI/2/faster_rcnn_r50v1_d_fpn_1x_coco.py
piyushghai/deep-learning-models
eebc5007a9f60540a98ed8ea5f9fbd5786b21db9
[ "Apache-2.0", "MIT" ]
129
2018-07-21T11:51:16.000Z
2022-03-09T07:15:09.000Z
models/vision/detection/configs/faster_rcnn/SM/CI/2/faster_rcnn_r50v1_d_fpn_1x_coco.py
piyushghai/deep-learning-models
eebc5007a9f60540a98ed8ea5f9fbd5786b21db9
[ "Apache-2.0", "MIT" ]
20
2018-09-13T23:19:56.000Z
2021-05-22T02:12:53.000Z
models/vision/detection/configs/faster_rcnn/SM/CI/2/faster_rcnn_r50v1_d_fpn_1x_coco.py
piyushghai/deep-learning-models
eebc5007a9f60540a98ed8ea5f9fbd5786b21db9
[ "Apache-2.0", "MIT" ]
74
2018-07-23T12:14:01.000Z
2022-01-21T05:17:13.000Z
base_files = ['../../2/faster_rcnn_r50v1_d_fpn_1x_coco.py']
20.333333
59
0.721311
11
61
3.363636
1
0
0
0
0
0
0
0
0
0
0
0.087719
0.065574
61
2
60
30.5
0.561404
0
0
0
0
0
0.7
0.7
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
11eed7b432bb8a6d687d8a88640ab1a4e3bd88f4
26
py
Python
subdomains/__init__.py
abe312/django-subdomains
4064c485d5161ce7289cdbd861675afe6f037196
[ "MIT" ]
26
2017-06-30T05:42:00.000Z
2021-10-04T06:40:23.000Z
subdomains/__init__.py
abe312/django-subdomains
4064c485d5161ce7289cdbd861675afe6f037196
[ "MIT" ]
4
2017-09-16T20:12:31.000Z
2021-12-06T14:14:41.000Z
subdomains/__init__.py
abe312/django-subdomains
4064c485d5161ce7289cdbd861675afe6f037196
[ "MIT" ]
15
2017-05-30T06:50:02.000Z
2020-07-29T20:16:56.000Z
__version__ = (3, 0, '1')
13
25
0.538462
4
26
2.5
1
0
0
0
0
0
0
0
0
0
0
0.142857
0.192308
26
1
26
26
0.333333
0
0
0
0
0
0.038462
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
eebedd6d18d1335e99b1c8c90a3f2d425e07df1a
105
py
Python
backend/program/models.py
solmari323/Hackathon-NASA-2020-II
893585aef009148a263ee310a0a843854b6d218c
[ "MIT" ]
null
null
null
backend/program/models.py
solmari323/Hackathon-NASA-2020-II
893585aef009148a263ee310a0a843854b6d218c
[ "MIT" ]
null
null
null
backend/program/models.py
solmari323/Hackathon-NASA-2020-II
893585aef009148a263ee310a0a843854b6d218c
[ "MIT" ]
null
null
null
from django.db import models class Program(models.Model): title = models.CharField(max_length=200)
17.5
44
0.761905
15
105
5.266667
0.866667
0
0
0
0
0
0
0
0
0
0
0.033333
0.142857
105
5
45
21
0.844444
0
0
0
0
0
0
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
eede212b5dede22b3bffd2a59c3f037f4152e183
179
py
Python
eventlet/green/time.py
CaesarLinsa/Eventlet
43e832b441977f0344a56d22b267dca443333960
[ "MIT" ]
1
2015-02-05T19:54:48.000Z
2015-02-05T19:54:48.000Z
eventlet/green/time.py
CaesarLinsa/Eventlet
43e832b441977f0344a56d22b267dca443333960
[ "MIT" ]
null
null
null
eventlet/green/time.py
CaesarLinsa/Eventlet
43e832b441977f0344a56d22b267dca443333960
[ "MIT" ]
1
2020-06-27T16:03:14.000Z
2020-06-27T16:03:14.000Z
__time = __import__('time') for var in dir(__time): exec "%s = __time.%s" % (var, var) __patched__ = ['sleep'] from eventlet.greenthread import sleep sleep # silence pyflakes
25.571429
38
0.698324
24
179
4.625
0.625
0
0
0
0
0
0
0
0
0
0
0
0.162011
179
6
39
29.833333
0.74
0.089385
0
0
0
0
0.142857
0
0
0
0
0
0
0
null
null
0
0.333333
null
null
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
1
0
0
0
1
0
0
0
0
4
eee42c27192758ba3eaa802a5d3b7992f6143e8d
746
py
Python
examples/people_api/flask/load_people.py
sebastiandev/peach
503a0b00ed1562e8d619c5c6f4ca5be6c1d17339
[ "MIT" ]
20
2017-04-27T09:00:12.000Z
2021-11-15T14:28:31.000Z
examples/people_api/flask/load_people.py
sebastiandev/peach
503a0b00ed1562e8d619c5c6f4ca5be6c1d17339
[ "MIT" ]
1
2019-12-07T07:42:10.000Z
2019-12-07T07:42:10.000Z
examples/people_api/flask/load_people.py
sebastiandev/peach
503a0b00ed1562e8d619c5c6f4ca5be6c1d17339
[ "MIT" ]
2
2018-08-13T20:10:09.000Z
2019-03-27T02:04:55.000Z
#!/usr/bin/env python from peach import Peach from peach.handlers.flask import FlaskHandler from peach.utils import module_dir Peach.init(config=module_dir(__file__), handler=FlaskHandler()) from app import People People.add(People(name='Lionel', age=28, address='Somewhere in Barcelona')) People.add(People(name='Radamel', age=30, address='Somewhere in Monaco')) People.add(People(name='Cristiano', age=29, address='Somewhere in Madrid')) People.add(People(name='Paulo', age=24, address='Somewhere in Italy')) People.add(People(name='Luis', age=30, address='Somewhere in Barcelona')) People.add(People(name='Sebastian', age=33, address='Somewhere in Buenos Aires')) People.add(People(name='Hernan', age=35, address='Somewhere in Italy'))
35.52381
81
0.760054
110
746
5.1
0.4
0.112299
0.187166
0.237077
0.213904
0.163993
0.163993
0.163993
0
0
0
0.020498
0.08445
746
20
82
37.3
0.800878
0.02681
0
0
0
0
0.26105
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
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
1
0
1
0
0
0
0
4
e11750e9c63062c0d62e834595d198489425a268
261
py
Python
python/solusvm/vm_action.py
BwmBama/scripts
4dc46ad5522962466d6957b0f1fa6bcac4b73921
[ "Apache-2.0" ]
26
2016-03-11T21:10:52.000Z
2021-11-15T05:31:51.000Z
python/solusvm/vm_action.py
BwmBama/scripts
4dc46ad5522962466d6957b0f1fa6bcac4b73921
[ "Apache-2.0" ]
1
2020-05-13T10:37:00.000Z
2020-05-13T10:37:00.000Z
python/solusvm/vm_action.py
BwmBama/scripts
4dc46ad5522962466d6957b0f1fa6bcac4b73921
[ "Apache-2.0" ]
14
2016-03-25T14:03:59.000Z
2022-01-27T06:23:12.000Z
#coding:utf-8 from solusvm import SolusVMClient from config import SOLUS_URL,SOLUS_CLIENTS for solus_client in SOLUS_CLIENTS: solus_client = SolusVMClient(SOLUS_URL,solus_client["key"],solus_client["hash"]) print solus_client.serverStatus().text
26.1
84
0.789272
36
261
5.472222
0.527778
0.279188
0.13198
0
0
0
0
0
0
0
0
0.004386
0.126437
261
9
85
29
0.859649
0.045977
0
0
0
0
0.028226
0
0
0
0
0
0
0
null
null
0
0.4
null
null
0.2
0
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
1
0
0
0
0
4
0112caa47aa9aed9aa08df78fa7411c92fb605dd
224
py
Python
chapter3/3_3_1.py
kungbob/Machine_Learning_In_Action
007db9d2a6c957d314ecd0b4322cad5b04da7113
[ "MIT" ]
null
null
null
chapter3/3_3_1.py
kungbob/Machine_Learning_In_Action
007db9d2a6c957d314ecd0b4322cad5b04da7113
[ "MIT" ]
1
2018-01-05T15:48:33.000Z
2018-01-05T15:54:22.000Z
chapter3/3_3_1.py
kungbob/Machine_Learning_In_Action
007db9d2a6c957d314ecd0b4322cad5b04da7113
[ "MIT" ]
2
2019-02-12T01:35:20.000Z
2019-03-24T03:00:51.000Z
import trees, treePlotter myDat, labels = trees.createDataSet() print(labels) myTree = treePlotter.retrieveTree(0) print(myTree) print(trees.classify(myTree, labels, [1, 0])) print(trees.classify(myTree, labels, [1, 1]))
20.363636
45
0.745536
29
224
5.758621
0.413793
0.071856
0.215569
0.287425
0.371257
0.371257
0
0
0
0
0
0.024876
0.102679
224
10
46
22.4
0.80597
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.142857
0
0.142857
0.571429
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
0
0
0
0
0
0
0
1
0
4
01210afa6c3e191ea011a98708fce02e2debe72c
184
py
Python
SysPy_ver/func_search.py
evlog/SysPy
d1ee6e2ca60492d20339c0016a9c24d027170553
[ "CNRI-Python" ]
4
2017-12-28T14:00:16.000Z
2021-01-21T08:53:14.000Z
SysPy_ver/func_search.py
evlog/SysPy
d1ee6e2ca60492d20339c0016a9c24d027170553
[ "CNRI-Python" ]
1
2018-07-31T16:27:00.000Z
2018-07-31T16:27:37.000Z
SysPy_ver/func_search.py
evlog/SysPy
d1ee6e2ca60492d20339c0016a9c24d027170553
[ "CNRI-Python" ]
2
2015-10-12T09:13:13.000Z
2020-01-06T12:22:55.000Z
import libs._func_lib reload(libs._func_lib) def func_search(): func_vars = libs._func_lib.fir_filt_s([-0.1, 0.2], "1.7") print("func_search.func_vars:", func_vars) return func_vars
30.666667
58
0.755435
35
184
3.571429
0.485714
0.256
0.264
0.288
0
0
0
0
0
0
0
0.035714
0.086957
184
6
59
30.666667
0.708333
0
0
0
0
0
0.135135
0.118919
0
0
0
0
0
1
0.166667
false
0
0.166667
0
0.5
0.166667
0
0
0
null
1
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
012e04ad5c24ba746a4d0e4268c220f7662e0d7b
615
py
Python
homura/utils/__init__.py
wangjunyan305/homura
815750e927e0eeaac3f5c0bf49d8d46dabaf5988
[ "Apache-2.0" ]
null
null
null
homura/utils/__init__.py
wangjunyan305/homura
815750e927e0eeaac3f5c0bf49d8d46dabaf5988
[ "Apache-2.0" ]
null
null
null
homura/utils/__init__.py
wangjunyan305/homura
815750e927e0eeaac3f5c0bf49d8d46dabaf5988
[ "Apache-2.0" ]
null
null
null
from .backends import einsum, torch_to_xp, xp_to_torch from .benchmarks import timeit from .containers import TensorDataClass, TensorTuple from .distributed import (distributed_print, distributed_ready_main, get_global_rank, get_local_rank, get_num_nodes, get_world_size, if_is_master, init_distributed, is_distributed, is_distributed_available, is_master) from .environment import (enable_accimage, get_args, get_environ, get_git_hash, is_accimage_available, is_faiss_available) from .reproducibility import set_deterministic, set_seed
61.5
116
0.756098
76
615
5.684211
0.539474
0.032407
0.111111
0
0
0
0
0
0
0
0
0
0.196748
615
9
117
68.333333
0.874494
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0.111111
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
0160dc72e18017efa1f95134eef943e901b0fb14
110
gyp
Python
3rdParty/nodejs/8.0.0/source/test/addons-napi/test_globals/binding.gyp
Internet-of-People/ApertusVR
3bb954ef02beb8a5a54ac7c062a55b7a0cf402bf
[ "MIT" ]
null
null
null
3rdParty/nodejs/8.0.0/source/test/addons-napi/test_globals/binding.gyp
Internet-of-People/ApertusVR
3bb954ef02beb8a5a54ac7c062a55b7a0cf402bf
[ "MIT" ]
null
null
null
3rdParty/nodejs/8.0.0/source/test/addons-napi/test_globals/binding.gyp
Internet-of-People/ApertusVR
3bb954ef02beb8a5a54ac7c062a55b7a0cf402bf
[ "MIT" ]
null
null
null
{ "targets": [ { "target_name": "test_globals", "sources": [ "test_globals.c" ] } ] }
12.222222
37
0.454545
9
110
5.222222
0.777778
0.468085
0
0
0
0
0
0
0
0
0
0
0.336364
110
8
38
13.75
0.643836
0
0
0
0
0
0.463636
0
0
0
0
0
0
1
0
true
0
0
0
0
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
1
0
0
0
0
0
0
4
6d780ad0bb0e1ab1f0d8fbe4f8c8201497586e15
368
py
Python
good_practice_examples/cms_app.py
bitmazk/django-good-practice-examples
923789b29790e4e0617b94a81db0b7f4c8537231
[ "MIT" ]
null
null
null
good_practice_examples/cms_app.py
bitmazk/django-good-practice-examples
923789b29790e4e0617b94a81db0b7f4c8537231
[ "MIT" ]
2
2020-02-11T23:25:49.000Z
2020-06-05T17:24:26.000Z
good_practice_examples/cms_app.py
bitlabstudio/django-good-practice-examples
923789b29790e4e0617b94a81db0b7f4c8537231
[ "MIT" ]
2
2016-05-11T02:05:06.000Z
2016-06-12T20:09:57.000Z
"""CMS app-hook for the ``good_practice_examples`` app.""" from cms.app_base import CMSApp from cms.apphook_pool import apphook_pool from django.utils.translation import ugettext_lazy as _ class GoodPracticeExamplesApphook(CMSApp): name = _("Good practice examples") urls = ["good_practice_examples.urls"] apphook_pool.register(GoodPracticeExamplesApphook)
30.666667
58
0.796196
46
368
6.130435
0.543478
0.12766
0.212766
0.170213
0
0
0
0
0
0
0
0
0.11413
368
11
59
33.454545
0.865031
0.141304
0
0
0
0
0.158065
0.087097
0
0
0
0
0
1
0
false
0
0.428571
0
0.857143
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
6d845bead79007d9272ad8979290c4b8b801b0c1
310
py
Python
gamecraft/django_prometheus_light/views.py
micktwomey/gamecraft-mk-iii
b1d649571a4d0725d20eaa6988e063a1eddd8843
[ "MIT" ]
1
2015-09-08T20:09:58.000Z
2015-09-08T20:09:58.000Z
gamecraft/django_prometheus_light/views.py
micktwomey/gamecraft-mk-iii
b1d649571a4d0725d20eaa6988e063a1eddd8843
[ "MIT" ]
null
null
null
gamecraft/django_prometheus_light/views.py
micktwomey/gamecraft-mk-iii
b1d649571a4d0725d20eaa6988e063a1eddd8843
[ "MIT" ]
null
null
null
from django.http import HttpResponse from django.views.decorators.cache import never_cache from prometheus_client import generate_latest, CONTENT_TYPE_LATEST @never_cache def metrics(request): """Exposes prometheus metrics""" return HttpResponse(generate_latest(), content_type=CONTENT_TYPE_LATEST)
28.181818
76
0.825806
39
310
6.307692
0.512821
0.134146
0.170732
0.203252
0
0
0
0
0
0
0
0
0.106452
310
10
77
31
0.888087
0.083871
0
0
1
0
0
0
0
0
0
0
0
1
0.166667
false
0
0.5
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
1
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
6de928d71ed038140c879dfba7c2191967159282
92
py
Python
oddt/scoring/functions/__init__.py
mwojcikowski/opendrugdiscovery
174b22f6a9378bfbb1f435a6e71cad13218e5e6d
[ "BSD-3-Clause" ]
null
null
null
oddt/scoring/functions/__init__.py
mwojcikowski/opendrugdiscovery
174b22f6a9378bfbb1f435a6e71cad13218e5e6d
[ "BSD-3-Clause" ]
null
null
null
oddt/scoring/functions/__init__.py
mwojcikowski/opendrugdiscovery
174b22f6a9378bfbb1f435a6e71cad13218e5e6d
[ "BSD-3-Clause" ]
null
null
null
from .RFScore import rfscore from .NNScore import nnscore __all__ = ['rfscore', 'nnscore']
18.4
32
0.75
11
92
5.909091
0.454545
0
0
0
0
0
0
0
0
0
0
0
0.141304
92
4
33
23
0.822785
0
0
0
0
0
0.152174
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
097f25194131547181a422a1632ae39e9de574d6
1,110
py
Python
tools/scoring/dimensions/entity/connection_identification.py
ahemphill/digitalbuildings
56a03b0055f9f771c3ed0a962f6bfb2b1d968947
[ "Apache-2.0" ]
null
null
null
tools/scoring/dimensions/entity/connection_identification.py
ahemphill/digitalbuildings
56a03b0055f9f771c3ed0a962f6bfb2b1d968947
[ "Apache-2.0" ]
null
null
null
tools/scoring/dimensions/entity/connection_identification.py
ahemphill/digitalbuildings
56a03b0055f9f771c3ed0a962f6bfb2b1d968947
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the License); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an AS IS BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """ # Entity Connection Identification # Connections are scored on targets (because this is where they are defined). # Connections can be scored: # (correctly defined connections) - (incorrectly defined connections) total # connections # In addition to overall score, sub-scores should be available for connections # where the source is another piece of equipment vs. a Facilities entity # (building/floor). """ from dimensions.dimension import Dimension class ConnectionIdentification(Dimension): def __init__(self): pass
29.210526
78
0.769369
155
1,110
5.483871
0.670968
0.070588
0.030588
0.037647
0
0
0
0
0
0
0
0.008658
0.167568
1,110
37
79
30
0.911255
0.858559
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0.25
0.25
0
0.75
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
1
0
0
1
0
0
4
098d7e7d695e220d942c49498f755e6fd11b63b9
302
py
Python
numba/nodes/bitwise.py
liuzhenhai/numba
855a2b262ae3d82bd6ac1c3e1c0acb36ee2e2acf
[ "BSD-2-Clause" ]
1
2015-01-29T06:52:36.000Z
2015-01-29T06:52:36.000Z
numba/nodes/bitwise.py
shiquanwang/numba
a41c85fdd7d6abf8ea1ebe9116939ddc2217193b
[ "BSD-2-Clause" ]
null
null
null
numba/nodes/bitwise.py
shiquanwang/numba
a41c85fdd7d6abf8ea1ebe9116939ddc2217193b
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import import ast from numba.nodes import * from numba import typesystem def is_bitwise(op): return isinstance(op, (ast.BitAnd, ast.BitOr, ast.BitXor, ast.LShift, ast.RShift, ast.Invert))
30.2
64
0.68543
40
302
5
0.65
0.09
0
0
0
0
0
0
0
0
0
0.004184
0.208609
302
9
65
33.555556
0.832636
0.069536
0
0
0
0
0
0
0
0
0
0
0
1
0.142857
false
0
0.571429
0.142857
0.857143
0.142857
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
099b3998ec6594f107e88d4dc335fde806a6e990
231
py
Python
pyvalidator/utils/includes.py
theteladras/py.validator
624ace7973552c8ac9353f48acbf96ec0ecc24a9
[ "MIT" ]
15
2021-11-01T14:14:56.000Z
2022-03-17T11:52:29.000Z
pyvalidator/utils/includes.py
theteladras/py.validator
624ace7973552c8ac9353f48acbf96ec0ecc24a9
[ "MIT" ]
1
2022-03-16T13:39:16.000Z
2022-03-17T09:16:00.000Z
pyvalidator/utils/includes.py
theteladras/py.validator
624ace7973552c8ac9353f48acbf96ec0ecc24a9
[ "MIT" ]
null
null
null
def includes(list, val): return val in list def includesNot(list, val): return val not in list def includesSome(list, listVal): for item in listVal: if item in list: return True return False
16.5
32
0.636364
33
231
4.454545
0.454545
0.122449
0.176871
0.217687
0
0
0
0
0
0
0
0
0.30303
231
13
33
17.769231
0.913043
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0
0.222222
0.777778
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
09c229700e438633ec5e16ce0063c5c31acdbd91
177
py
Python
03.Complete Python Developer - Zero to Mastery - AN/03.Advanced Python Object Oriented Programming/mro example.py
ptyadana/python-dojo
98c7234b84f0afea99a091c7198342d66bbdff5b
[ "MIT" ]
3
2020-06-01T04:17:18.000Z
2020-12-18T03:05:55.000Z
03.Complete Python Developer - Zero to Mastery - AN/03.Advanced Python Object Oriented Programming/mro example.py
ptyadana/python-dojo
98c7234b84f0afea99a091c7198342d66bbdff5b
[ "MIT" ]
1
2020-04-25T08:01:59.000Z
2020-04-25T08:01:59.000Z
03.Complete Python Developer - Zero to Mastery - AN/03.Advanced Python Object Oriented Programming/mro example.py
ptyadana/python-dojo
98c7234b84f0afea99a091c7198342d66bbdff5b
[ "MIT" ]
7
2020-04-26T10:02:36.000Z
2021-06-08T05:12:46.000Z
# https://data-flair.training/blogs/python-multiple-inheritance/ class X:pass class Y: pass class Z:pass class A(X,Y):pass class B(Y,Z):pass class M(B,A,Z):pass print(M.mro())
17.7
64
0.723164
36
177
3.555556
0.5
0.351563
0.15625
0
0
0
0
0
0
0
0
0
0.096045
177
10
65
17.7
0.8
0.350282
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.857143
0
0
0.857143
0.142857
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
1
0
0
1
0
0
4
09df289ceb225a0f1cdb372b38af5c1fb6a84e1f
16,626
py
Python
length/tests.py
Tiki92/converter
a14582bfec5b3cc4b5bb299f2fe1c55cb7ef4437
[ "MIT" ]
null
null
null
length/tests.py
Tiki92/converter
a14582bfec5b3cc4b5bb299f2fe1c55cb7ef4437
[ "MIT" ]
null
null
null
length/tests.py
Tiki92/converter
a14582bfec5b3cc4b5bb299f2fe1c55cb7ef4437
[ "MIT" ]
null
null
null
from django.test import TestCase, Client from django.urls import reverse class TestLengthConversion(TestCase): """ This class contains tests that convert measurements from one unit of measurement to another. """ def setUp(self): """ This method runs before the execution of each test case. """ self.client = Client() self.url = reverse("length:convert") def test_centimetre_to_metre_conversion(self): """ Tests conversion of centimetre measurements to metre. """ data = { "input_unit": "centimetre", "output_unit": "metre", "input_value": round(8096.894, 3) } response = self.client.get(self.url, data) self.assertContains(response, 80.969) def test_centimetre_to_mile_conversion(self): data = { "input_unit": "centimetre", "output_unit": "mile", "input_value": round(985805791.3527409, 3) } response = self.client.get(self.url, data) self.assertContains(response, 6125.511) def test_centimetre_to_inch_conversion(self): data = { "input_unit": "centimetre", "output_unit": "inch", "input_value": round(123.442, 3) } response = self.client.get(self.url, data) self.assertContains(response, 48.599) def test_centimetre_to_kilometre_conversion(self): data = { "input_unit": "centimetre", "output_unit": "kilometre", "input_value": round(439723.442664, 3) } response = self.client.get(self.url, data) self.assertContains(response, 4.397) def test_centimetre_to_yard_conversion(self): data = { "input_unit": "centimetre", "output_unit": "yard", "input_value": round(568.2326599, 3) } response = self.client.get(self.url, data) self.assertContains(response, 6.214) def test_centimetre_to_millimetre_conversion(self): data = { "input_unit": "centimetre", "output_unit": "millimetre", "input_value": round(45.455, 3) } response = self.client.get(self.url, data) self.assertContains(response, 454.55) def test_centimetre_to_foot_conversion(self): data = { "input_unit": "centimetre", "output_unit": "foot", "input_value": round(346.653, 3) } response = self.client.get(self.url, data) self.assertContains(response, 11.373) def test_metre_to_centimetres_conversion(self): data = { "input_unit": "metre", "output_unit": "centimetre", "input_value": round(12.264, 3) } response = self.client.get(self.url, data) self.assertContains(response, 1226.4) def test_metre_to_miles_conversion(self): data = { "input_unit": "metre", "output_unit": "mile", "input_value": round(3486.25479998, 3) } response = self.client.get(self.url, data) self.assertContains(response, 2.166) def test_metre_to_inch_conversion(self): data = { "input_unit": "metre", "output_unit": "inch", "input_value": round(23.3698, 3) } response = self.client.get(self.url, data) self.assertContains(response, 920.070) def test_metre_to_kilometre_conversion(self): data = { "input_unit": "metre", "output_unit": "kilometre", "input_value": round(85.369, 3) } response = self.client.get(self.url, data) self.assertContains(response, 0.085) def test_metre_to_yard_conversion(self): data = { "input_unit": "metre", "output_unit": "yard", "input_value": round(54.5874, 3) } response = self.client.get(self.url, data) self.assertContains(response, 59.697) def test_metre_to_millimetre_conversion(self): data = { "input_unit": "metre", "output_unit": "millimetre", "input_value": round(9, 3) } response = self.client.get(self.url, data) self.assertContains(response, 9000) def test_metre_to_foot_conversion(self): data = { "input_unit": "metre", "output_unit": "foot", "input_value": round(5874.25, 3) } response = self.client.get(self.url, data) self.assertContains(response, 19272) def test_mile_to_centimetre_conversion(self): data = { "input_unit": "mile", "output_unit": "centimetre", "input_value": round(12.563, 3) } response = self.client.get(self.url, data) self.assertContains(response, 2021813.842) def test_mile_to_metres_conversion(self): data = { "input_unit": "mile", "output_unit": "metre", "input_value": round(24.254, 3) } response = self.client.get(self.url, data) self.assertContains(response, 39032.932) def test_mile_to_inch_conversion(self): data = { "input_unit": "mile", "output_unit": "inch", "input_value": round(45.789, 3) } response = self.client.get(self.url, data) self.assertContains(response, 2901183.829) def test_mile_to_kilometre_conversion(self): data = { "input_unit": "mile", "output_unit": "kilometre", "input_value": round(15.897, 3) } response = self.client.get(self.url, data) self.assertContains(response, 25.584) def test_mile_to_yard_conversion(self): data = { "input_unit": "mile", "output_unit": "yard", "input_value": round(78.123, 3) } response = self.client.get(self.url, data) self.assertContains(response, 137496.138) def test_mile_to_millimetre_conversion(self): data = { "input_unit": "mile", "output_unit": "millimetre", "input_value": round(568.214, 3) } response = self.client.get(self.url, data) self.assertContains(response, 914449518.76) def test_mile_to_foot_conversion(self): data = { "input_unit": "mile", "output_unit": "foot", "input_value": round(48.245, 3) } response = self.client.get(self.url, data) self.assertContains(response, 254732.967) def test_inch_to_centimetre_conversion(self): data = { "input_unit": "inch", "output_unit": "centimetre", "input_value": round(48.245, 3) } response = self.client.get(self.url, data) self.assertContains(response, 122.542) def test_inch_to_metre_conversion(self): data = { "input_unit": "inch", "output_unit": "metre", "input_value": round(48.245, 3) } response = self.client.get(self.url, data) self.assertContains(response, 1.225) def test_inch_to_mile_conversion(self): data = { "input_unit": "inch", "output_unit": "mile", "input_value": round(48.245, 3) } response = self.client.get(self.url, data) self.assertContains(response, 0.001) def test_inch_to_yard_conversion(self): data = { "input_unit": "inch", "output_unit": "yard", "input_value": round(48.245, 3) } response = self.client.get(self.url, data) self.assertContains(response, 1.34) def test_inch_to_millimetre_conversion(self): data = { "input_unit": "inch", "output_unit": "millimetre", "input_value": round(48.245, 3) } response = self.client.get(self.url, data) self.assertContains(response, 1225.423) def test_inch_to_foot_conversion(self): data = { "input_unit": "inch", "output_unit": "foot", "input_value": round(48.245, 3) } response = self.client.get(self.url, data) self.assertContains(response, 4.02) def test_kilometre_to_centimtre_conversion(self): data = { "input_unit": "kilometre", "output_unit": "centimetre", "input_value": round(484.245, 3) } response = self.client.get(self.url, data) self.assertContains(response, 48424500.0) def test_kilometre_to_metre_conversion(self): data = { "input_unit": "kilometre", "output_unit": "metre", "input_value": round(484.245, 3) } response = self.client.get(self.url, data) self.assertContains(response, 484245.0) def test_kilometre_to_mile_conversion(self): data = { "input_unit": "kilometre", "output_unit": "mile", "input_value": round(484.245, 3) } response = self.client.get(self.url, data) self.assertContains(response, 300.896) def test_kilometre_to_inch_conversion(self): data = { "input_unit": "kilometre", "output_unit": "inch", "input_value": round(484.245, 3) } response = self.client.get(self.url, data) self.assertContains(response, 19064763.779) def test_kilometre_to_yard_conversion(self): data = { "input_unit": "kilometre", "output_unit": "yard", "input_value": round(484.245, 3) } response = self.client.get(self.url, data) self.assertContains(response, 529576.772) def test_kilometre_to_millimetre_conversion(self): data = { "input_unit": "kilometre", "output_unit": "millimetre", "input_value": round(484.245, 3) } response = self.client.get(self.url, data) self.assertContains(response, 484245000.0) def test_kilometre_to_foot_conversion(self): data = { "input_unit": "kilometre", "output_unit": "foot", "input_value": round(484.245, 3) } response = self.client.get(self.url, data) self.assertContains(response, 1588730.315) def test_yard_to_centimetre_conversion(self): data = { "input_unit": "yard", "output_unit": "centimetre", "input_value": round(484.245, 3) } response = self.client.get(self.url, data) self.assertContains(response, 44279.363) def test_yard_to_metre_conversion(self): data = { "input_unit": "yard", "output_unit": "metre", "input_value": round(484.245, 3) } response = self.client.get(self.url, data) self.assertContains(response, 442.794) def test_yard_to_mile_conversion(self): data = { "input_unit": "yard", "output_unit": "mile", "input_value": round(484.245, 3) } response = self.client.get(self.url, data) self.assertContains(response, 0.275) def test_yard_to_inch_conversion(self): data = { "input_unit": "yard", "output_unit": "inch", "input_value": round(484.245, 3) } response = self.client.get(self.url, data) self.assertContains(response, 17432.82) def test_yard_to_kilometre_conversion(self): data = { "input_unit": "yard", "output_unit": "kilometre", "input_value": round(484.245, 3) } response = self.client.get(self.url, data) self.assertContains(response, 0.443) def test_yard_to_millimetre_conversion(self): data = { "input_unit": "yard", "output_unit": "millimetre", "input_value": round(484.245, 3) } response = self.client.get(self.url, data) self.assertContains(response, 442793.628) def test_yard_to_foot_conversion(self): data = { "input_unit": "yard", "output_unit": "foot", "input_value": round(484.245, 3) } response = self.client.get(self.url, data) self.assertContains(response, 1452.735) def test_millimetre_to_centimetre_conversion(self): data = { "input_unit": "millimetre", "output_unit": "centimetre", "input_value": round(484.245, 3) } response = self.client.get(self.url, data) self.assertContains(response, 48.425) def test_millimetre_to_metre_conversion(self): data = { "input_unit": "millimetre", "output_unit": "metre", "input_value": round(484.245, 3) } response = self.client.get(self.url, data) self.assertContains(response, 0.484) def test_millimetre_to_mile_conversion(self): data = { "input_unit": "millimetre", "output_unit": "mile", "input_value": round(484.245, 3) } response = self.client.get(self.url, data) self.assertContains(response, 0.0) def test_millimetre_to_inch_conversion(self): data = { "input_unit": "millimetre", "output_unit": "inch", "input_value": round(484.245, 3) } response = self.client.get(self.url, data) self.assertContains(response, 19.065) def test_millimetre_to_kilometre_conversion(self): data = { "input_unit": "millimetre", "output_unit": "kilometre", "input_value": round(484.245, 3) } response = self.client.get(self.url, data) self.assertContains(response, 0.0) def test_millimetre_to_yard_conversion(self): data = { "input_unit": "millimetre", "output_unit": "yard", "input_value": round(484.245, 3) } response = self.client.get(self.url, data) self.assertContains(response, 0.53) def test_millimetre_to_foot_conversion(self): data = { "input_unit": "millimetre", "output_unit": "foot", "input_value": round(484.245, 3) } response = self.client.get(self.url, data) self.assertContains(response, 1.589) def test_foot_to_centimetre_conversion(self): data = { "input_unit": "foot", "output_unit": "centimetre", "input_value": round(484.245, 3) } response = self.client.get(self.url, data) self.assertContains(response, 14759.788) def test_foot_to_metre_conversion(self): data = { "input_unit": "foot", "output_unit": "metre", "input_value": round(484.245, 3) } response = self.client.get(self.url, data) self.assertContains(response, 147.598) def test_foot_to_mile_conversion(self): data = { "input_unit": "foot", "output_unit": "mile", "input_value": round(484.245, 3) } response = self.client.get(self.url, data) self.assertContains(response, 0.092) def test_foot_to_inch_conversion(self): data = { "input_unit": "foot", "output_unit": "inch", "input_value": round(484.245, 3) } response = self.client.get(self.url, data) self.assertContains(response, 5810.94) def test_foot_to_kilometre_conversion(self): data = { "input_unit": "foot", "output_unit": "kilometre", "input_value": round(484.245, 3) } response = self.client.get(self.url, data) self.assertContains(response, 0.148) def test_foot_to_yard_conversion(self): data = { "input_unit": "foot", "output_unit": "yard", "input_value": round(484.245, 3) } response = self.client.get(self.url, data) self.assertContains(response, 161.415) def test_foot_to_millimetre_conversion(self): data = { "input_unit": "foot", "output_unit": "millimetre", "input_value": round(484.245, 3) } response = self.client.get(self.url, data) self.assertContains(response, 147597.876)
32.22093
64
0.562312
1,813
16,626
4.944291
0.097628
0.062472
0.079764
0.116577
0.836457
0.830768
0.781348
0.730366
0.503458
0.503458
0
0.063386
0.313004
16,626
515
65
32.283495
0.721415
0.01221
0
0.576233
0
0
0.150465
0
0
0
0
0
0.123318
1
0.125561
false
0
0.004484
0
0.132287
0
0
0
0
null
0
0
0
1
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
09e90523a6979663cb3a2a00a42b07163debeb4e
231
py
Python
backend/Sapereaude.py
josuuribe/sapereaude
2e221fa9c5cc5c1a5fa927146e15bfd950766009
[ "Apache-2.0" ]
null
null
null
backend/Sapereaude.py
josuuribe/sapereaude
2e221fa9c5cc5c1a5fa927146e15bfd950766009
[ "Apache-2.0" ]
null
null
null
backend/Sapereaude.py
josuuribe/sapereaude
2e221fa9c5cc5c1a5fa927146e15bfd950766009
[ "Apache-2.0" ]
null
null
null
import sys from Console import Console sys.path.extend(['E:\\Proyectos\\sapereaude', 'E:\\Proyectos\\sapereaude\\backend', 'E:/Proyectos/sapereaude']) if __name__ == '__main__': console = Console(sys.argv) console.show()
25.666667
111
0.705628
28
231
5.535714
0.535714
0.193548
0.387097
0
0
0
0
0
0
0
0
0
0.116883
231
8
112
28.875
0.759804
0
0
0
0
0
0.38961
0.354978
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
09f997c8abcb17d8247317e2687e858b53a84afa
148
py
Python
tests/test_easy_problems/test_1_to_50/test_two_sum_ii.py
ivan1016017/LeetCodeAlgorithmProblems
454284b76634cc34ed41f7fa30d857403cedf1bf
[ "MIT" ]
null
null
null
tests/test_easy_problems/test_1_to_50/test_two_sum_ii.py
ivan1016017/LeetCodeAlgorithmProblems
454284b76634cc34ed41f7fa30d857403cedf1bf
[ "MIT" ]
1
2021-09-22T12:26:14.000Z
2021-09-22T12:26:14.000Z
tests/test_easy_problems/test_1_to_50/test_two_sum_ii.py
ivan1016017/LeetCodeAlgorithmProblems
454284b76634cc34ed41f7fa30d857403cedf1bf
[ "MIT" ]
null
null
null
from faker import Faker import unittest class TestTwoNumbersTestCase(unittest.TestCase): def test_empty(self): self.assertEqual(1,1)
16.444444
48
0.75
18
148
6.111111
0.722222
0.2
0
0
0
0
0
0
0
0
0
0.016393
0.175676
148
9
49
16.444444
0.885246
0
0
0
0
0
0
0
0
0
0
0
0.2
1
0.2
false
0
0.4
0
0.8
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
61edae10e2e232866444d739766c12f05260df3d
249
py
Python
mmcls/models/necks/__init__.py
apulis/ApulisVision
d1f226f4bc769b03c5565b9d6e76dd9823771cc7
[ "Apache-2.0" ]
1
2020-09-09T05:10:39.000Z
2020-09-09T05:10:39.000Z
mmcls/models/necks/__init__.py
apulis/ApulisVision
d1f226f4bc769b03c5565b9d6e76dd9823771cc7
[ "Apache-2.0" ]
null
null
null
mmcls/models/necks/__init__.py
apulis/ApulisVision
d1f226f4bc769b03c5565b9d6e76dd9823771cc7
[ "Apache-2.0" ]
1
2021-03-31T02:00:13.000Z
2021-03-31T02:00:13.000Z
from .adaptive_avgmaxpool2d import AdaptiveAvgMaxPool2d from .adaptive_catavgmaxpool2d import AdaptiveCatAvgMaxPool2d from .gap import GlobalAveragePooling __all__ = [ 'GlobalAveragePooling', 'AdaptiveAvgMaxPool2d', 'AdaptiveCatAvgMaxPool2d' ]
31.125
77
0.84739
18
249
11.388889
0.555556
0.117073
0
0
0
0
0
0
0
0
0
0.026667
0.096386
249
7
78
35.571429
0.884444
0
0
0
0
0
0.253012
0.092369
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
1
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
1113cef620acb8aaf313b7e4db4a75d5db02ae61
102
py
Python
file_and_io/chdir.py
daiyadong/python2_learn
6930ddc3dd2edfc31064b1a8001ad826a775e912
[ "Apache-2.0" ]
null
null
null
file_and_io/chdir.py
daiyadong/python2_learn
6930ddc3dd2edfc31064b1a8001ad826a775e912
[ "Apache-2.0" ]
null
null
null
file_and_io/chdir.py
daiyadong/python2_learn
6930ddc3dd2edfc31064b1a8001ad826a775e912
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python2 # -*- coding: UTF-8 -*- import os # 将当前目录改为"/home/newdir" os.chdir("/tmp")
14.571429
24
0.568627
14
102
4.142857
0.928571
0
0
0
0
0
0
0
0
0
0
0.024096
0.186275
102
7
25
14.571429
0.674699
0.598039
0
0
0
0
0.121212
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
111a49832cf511f4c23e7b47b76d2fc565b26d2f
198
py
Python
server/instances/config.py
Chikuji/intelligent-systems-project
9b5e6e8ece24ecbf198ba717b86f1255df00373b
[ "MIT" ]
null
null
null
server/instances/config.py
Chikuji/intelligent-systems-project
9b5e6e8ece24ecbf198ba717b86f1255df00373b
[ "MIT" ]
null
null
null
server/instances/config.py
Chikuji/intelligent-systems-project
9b5e6e8ece24ecbf198ba717b86f1255df00373b
[ "MIT" ]
null
null
null
import os MODEL_PATH = os.environ['MODEL_PATH'] NLTK_STOPWORDS_PATH = os.environ['API_DIR'] + os.environ['NLTK_STOPWORDS_PATH'] JSON_TEST = os.environ['API_DIR'] + os.environ['JSON_TEST']
33
79
0.722222
30
198
4.433333
0.366667
0.338346
0.195489
0.225564
0.360902
0.360902
0
0
0
0
0
0
0.126263
198
6
80
33
0.768786
0
0
0
0
0
0.261307
0
0
0
0
0
0
1
0
false
0
0.25
0
0.25
0
0
0
0
null
1
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
1132c536d33aea4d0af3365706885bd1836b3f8c
263
py
Python
main/serializer.py
mayconabe/djangorest
22b582188685831ac189216ca91b403ec60fc33e
[ "MIT" ]
1
2022-01-11T22:16:34.000Z
2022-01-11T22:16:34.000Z
main/serializer.py
mayconabe/djangorest
22b582188685831ac189216ca91b403ec60fc33e
[ "MIT" ]
null
null
null
main/serializer.py
mayconabe/djangorest
22b582188685831ac189216ca91b403ec60fc33e
[ "MIT" ]
null
null
null
from rest_framework import serializers from main.models import Usuario class UsuarioSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = Usuario fields = ['url', 'id', 'nome', 'sobrenome', 'data_nasc', 'idade', 'is_admin']
32.875
85
0.714829
28
263
6.607143
0.821429
0
0
0
0
0
0
0
0
0
0
0
0.171103
263
8
85
32.875
0.848624
0
0
0
0
0
0.151515
0
0
0
0
0
0
1
0
false
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
0
0
1
0
1
0
0
4
114d734204b71ab9b24c4a0b9836ae798d6336ac
7,006
py
Python
graylog/models/__init__.py
yumimobi/graylog.py
3118f4a49c91c2cbbd660523b0ab99e56fbfd861
[ "Apache-2.0" ]
10
2016-09-27T08:13:22.000Z
2018-09-04T13:15:42.000Z
graylog/models/__init__.py
yumimobi/graylog.py
3118f4a49c91c2cbbd660523b0ab99e56fbfd861
[ "Apache-2.0" ]
1
2019-08-28T16:16:09.000Z
2019-08-28T16:16:09.000Z
graylog/models/__init__.py
yumimobi/graylog.py
3118f4a49c91c2cbbd660523b0ab99e56fbfd861
[ "Apache-2.0" ]
5
2016-11-03T07:45:18.000Z
2021-08-19T14:21:49.000Z
# coding: utf-8 """ No descripton provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 2.1.1+01d50e5 Generated by: https://github.com/swagger-api/swagger-codegen.git Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. """ from __future__ import absolute_import # import models into model package from .alert_list_summary import AlertListSummary from .all_indices import AllIndices from .bulk_rule_request import BulkRuleRequest from .change_password_request import ChangePasswordRequest from .change_user_request import ChangeUserRequest from .clone_stream_request import CloneStreamRequest from .closed_indices import ClosedIndices from .cluster_config_list import ClusterConfigList from .cluster_data_set import ClusterDataSet from .cluster_health import ClusterHealth from .cluster_name import ClusterName from .cluster_stats import ClusterStats from .collector_list import CollectorList from .collector_registration_request import CollectorRegistrationRequest from .collector_summary import CollectorSummary from .configuration_bundle import ConfigurationBundle from .create_dashboard_request import CreateDashboardRequest from .create_output_request import CreateOutputRequest from .create_saved_search_request import CreateSavedSearchRequest from .create_stream_request import CreateStreamRequest from .create_user_request import CreateUserRequest from .dashboard_list import DashboardList from .debug_event import DebugEvent from .decorator_impl import DecoratorImpl from .deflector_summary import DeflectorSummary from .display_getting_started import DisplayGettingStarted from .elasticsearch_stats import ElasticsearchStats from .export_bundle import ExportBundle from .exposed_configuration import ExposedConfiguration from .failure_count import FailureCount from .field_stats_result import FieldStatsResult from .filter_description import FilterDescription from .fs_stats import FsStats from .grok_pattern import GrokPattern from .grok_pattern_list import GrokPatternList from .grok_pattern_summary import GrokPatternSummary from .histogram_result import HistogramResult from .index_info import IndexInfo from .index_range_summary import IndexRangeSummary from .index_ranges_response import IndexRangesResponse from .indexer_overview import IndexerOverview from .indices_read_request import IndicesReadRequest from .input_create_request import InputCreateRequest from .input_created import InputCreated from .input_deleted import InputDeleted from .input_state_summary import InputStateSummary from .input_states_list import InputStatesList from .input_summary import InputSummary from .input_type_info import InputTypeInfo from .input_types_summary import InputTypesSummary from .inputs_list import InputsList from .journal_summary_response import JournalSummaryResponse from .jvm_stats import JvmStats from .ldap_settings_request import LdapSettingsRequest from .ldap_settings_response import LdapSettingsResponse from .ldap_test_config_request import LdapTestConfigRequest from .ldap_test_config_response import LdapTestConfigResponse from .log_messages_summary import LogMessagesSummary from .loggers_summary import LoggersSummary from .map_data_search_request import MapDataSearchRequest from .map_data_search_result import MapDataSearchResult from .message_count_response import MessageCountResponse from .message_parse_request import MessageParseRequest from .message_processors_config_with_descriptors import MessageProcessorsConfigWithDescriptors from .message_tokens import MessageTokens from .metric_names_response import MetricNamesResponse from .metrics_read_request import MetricsReadRequest from .metrics_summary_response import MetricsSummaryResponse from .mongo_stats import MongoStats from .network_stats import NetworkStats from .node_data_set import NodeDataSet from .node_summary import NodeSummary from .node_summary_list import NodeSummaryList from .open_indices_info import OpenIndicesInfo from .os_stats import OsStats from .output import Output from .output_list_response import OutputListResponse from .output_summary import OutputSummary from .permission_edit_request import PermissionEditRequest from .pipeline_connections import PipelineConnections from .pipeline_source import PipelineSource from .plugin_list import PluginList from .process_stats import ProcessStats from .reader_permission_response import ReaderPermissionResponse from .retention_strategies import RetentionStrategies from .retention_strategy_description import RetentionStrategyDescription from .retention_strategy_summary import RetentionStrategySummary from .role_membership_response import RoleMembershipResponse from .role_response import RoleResponse from .roles_response import RolesResponse from .rotation_strategies import RotationStrategies from .rotation_strategy_description import RotationStrategyDescription from .rotation_strategy_summary import RotationStrategySummary from .rule_source import RuleSource from .search_response import SearchResponse from .session_create_request import SessionCreateRequest from .session_response import SessionResponse from .session_validation_response import SessionValidationResponse from .simulation_request import SimulationRequest from .simulation_response import SimulationResponse from .sources_list import SourcesList from .stream_list_response import StreamListResponse from .stream_response import StreamResponse from .subsystem_summary import SubsystemSummary from .system_jvm_response import SystemJVMResponse from .system_job_summary import SystemJobSummary from .system_overview_response import SystemOverviewResponse from .system_stats import SystemStats from .system_thread_dump_response import SystemThreadDumpResponse from .terms_result import TermsResult from .terms_stats_result import TermsStatsResult from .test_match_response import TestMatchResponse from .throughput import Throughput from .token import Token from .token_list import TokenList from .trigger_request import TriggerRequest from .update_dashboard_request import UpdateDashboardRequest from .update_stream_request import UpdateStreamRequest from .update_user_preferences import UpdateUserPreferences from .usage_stats_configuration_response import UsageStatsConfigurationResponse from .usage_stats_opt_out_state import UsageStatsOptOutState from .user_list import UserList from .user_summary import UserSummary from .widget_positions_request import WidgetPositionsRequest
46.397351
104
0.878533
823
7,006
7.233293
0.402187
0.052411
0.009575
0.007055
0.012767
0.012767
0.012767
0
0
0
0
0.002051
0.09549
7,006
150
105
46.706667
0.937352
0.110762
0
0
1
0
0
0
0
0
0
0
0
1
0
true
0.008
1
0
1
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
1
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
fefe881a3a4f8e5e6ea6c1c0e39fd59b43d84b17
500
py
Python
__version__.py
alexanderepstein/cryptowatch
7fed9abe67b32e5a7dff798b8f8d8f1f9bbcdd53
[ "MIT" ]
331
2017-09-10T05:23:05.000Z
2022-03-07T14:51:04.000Z
__version__.py
alexanderepstein/cryptowatch
7fed9abe67b32e5a7dff798b8f8d8f1f9bbcdd53
[ "MIT" ]
16
2017-09-10T14:03:50.000Z
2021-05-26T19:35:53.000Z
__version__.py
alexanderepstein/cryptowatch
7fed9abe67b32e5a7dff798b8f8d8f1f9bbcdd53
[ "MIT" ]
44
2017-09-10T08:15:15.000Z
2021-03-13T11:05:14.000Z
#_________ __ __ .__ #\_ ___ \_______ ___.__._______/ |_ ______ _ _______ _/ |_ ____ | |__ #/ \ \/\_ __ < | |\____ \ __\/ _ \ \/ \/ /\__ \\ __\/ ___\| | \ #\ \____| | \/\___ || |_> > | ( <_> ) / / __ \| | \ \___| Y \ # \______ /|__| / ____|| __/|__| \____/ \/\_/ (____ /__| \___ >___| / # \/ \/ |__| \/ \/ \/ __version__ = '0.0.11'
62.5
80
0.286
5
500
2.4
0.8
0
0
0
0
0
0
0
0
0
0
0.01581
0.494
500
7
81
71.428571
0.031621
0.93
0
0
0
0
0.206897
0
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
1
1
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
3a186f95dc329e5b36a42bc2f5c86ee955952334
301
py
Python
tests/test_base.py
azevakin/django-google-json-style-api
f1d8058ed7ce03368ea36ca333e96e21fa74b2e1
[ "MIT" ]
1
2021-10-19T20:00:02.000Z
2021-10-19T20:00:02.000Z
tests/test_base.py
azevakin/django-google-json-style-api
f1d8058ed7ce03368ea36ca333e96e21fa74b2e1
[ "MIT" ]
null
null
null
tests/test_base.py
azevakin/django-google-json-style-api
f1d8058ed7ce03368ea36ca333e96e21fa74b2e1
[ "MIT" ]
null
null
null
from django_google_json_style_api import base class TestSnakeToCamel: """This test covers _snake_to_camel method""" def test_snake_string(self): assert base._snake_to_camel("snake_case") == "snakeCase" def test_empty_string(self): assert base._snake_to_camel("") == ""
25.083333
64
0.714286
40
301
4.925
0.6
0.106599
0.182741
0.203046
0.324873
0.324873
0.324873
0
0
0
0
0
0.182724
301
11
65
27.363636
0.800813
0.129568
0
0
0
0
0.074219
0
0
0
0
0
0.333333
1
0.333333
false
0
0.166667
0
0.666667
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
1
0
0
0
0
1
0
0
4
28b455cec802b6f8afe2a8282f3ee6af751fd355
165
py
Python
ex014.py
lucaspereirag/pythonProject
15a88762ca94322918474537bbed13e0ed2b60a6
[ "MIT" ]
null
null
null
ex014.py
lucaspereirag/pythonProject
15a88762ca94322918474537bbed13e0ed2b60a6
[ "MIT" ]
null
null
null
ex014.py
lucaspereirag/pythonProject
15a88762ca94322918474537bbed13e0ed2b60a6
[ "MIT" ]
null
null
null
temperatura = float(input('Informe a temperatura em ºC: ')) fahrenheit = ((temperatura * 9 / 5) + 32) print('A temperatura em fahrenheit: {}ºF'.format(fahrenheit))
33
61
0.70303
21
165
5.52381
0.666667
0.206897
0.241379
0
0
0
0
0
0
0
0
0.028169
0.139394
165
4
62
41.25
0.788732
0
0
0
0
0
0.375758
0
0
0
0
0
0
1
0
false
0
0
0
0
0.333333
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
28b6b4cbeb419fa3110b255d25a672e71ce93ced
151
py
Python
src/fatsecret/__init__.py
walexnelson/pyfatsecret
15c8a48d144c2682df7374b72f154629e00f5b4b
[ "MIT" ]
21
2015-01-18T16:46:07.000Z
2022-02-15T00:52:55.000Z
src/fatsecret/__init__.py
walexnelson/pyfatsecret
15c8a48d144c2682df7374b72f154629e00f5b4b
[ "MIT" ]
3
2017-03-13T20:51:08.000Z
2019-02-07T01:29:29.000Z
src/fatsecret/__init__.py
walexnelson/pyfatsecret
15c8a48d144c2682df7374b72f154629e00f5b4b
[ "MIT" ]
23
2015-02-17T07:09:39.000Z
2021-09-16T03:42:12.000Z
from .fatsecret import ( Fatsecret, BaseFatsecretError, GeneralError, AuthenticationError, ParameterError, ApplicationError, )
16.777778
24
0.708609
9
151
11.888889
0.888889
0
0
0
0
0
0
0
0
0
0
0
0.231788
151
8
25
18.875
0.922414
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.125
0
0.125
0
1
0
1
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
28e8cdf813504f8779296e61c5f00c178b1cdc97
251
py
Python
toontown/estate/DistributedFlowerAI.py
TheFamiliarScoot/open-toontown
678313033174ea7d08e5c2823bd7b473701ff547
[ "BSD-3-Clause" ]
99
2019-11-02T22:25:00.000Z
2022-02-03T03:48:00.000Z
toontown/estate/DistributedFlowerAI.py
TheFamiliarScoot/open-toontown
678313033174ea7d08e5c2823bd7b473701ff547
[ "BSD-3-Clause" ]
42
2019-11-03T05:31:08.000Z
2022-03-16T22:50:32.000Z
toontown/estate/DistributedFlowerAI.py
TheFamiliarScoot/open-toontown
678313033174ea7d08e5c2823bd7b473701ff547
[ "BSD-3-Clause" ]
57
2019-11-03T07:47:37.000Z
2022-03-22T00:41:49.000Z
from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI class DistributedFlowerAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedFlowerAI')
41.833333
79
0.876494
19
251
11.578947
0.578947
0.090909
0
0
0
0
0
0
0
0
0
0
0.071713
251
5
80
50.2
0.944206
0
0
0
0
0
0.075697
0
0
0
0
0
0
1
0
false
0
0.5
0
1
0
1
0
1
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
28f60232c33615cd20a787c09f6df3961f2cc8c8
153
py
Python
handle_alerts.py
mandano/bitvavo_trailing_stop
491e9296d377265ef6837a6c1dd3898e4af334aa
[ "MIT" ]
null
null
null
handle_alerts.py
mandano/bitvavo_trailing_stop
491e9296d377265ef6837a6c1dd3898e4af334aa
[ "MIT" ]
null
null
null
handle_alerts.py
mandano/bitvavo_trailing_stop
491e9296d377265ef6837a6c1dd3898e4af334aa
[ "MIT" ]
1
2021-05-24T17:48:44.000Z
2021-05-24T17:48:44.000Z
from models.AlertHandler import AlertHandler import main if __name__ == '__main__': ah = AlertHandler() ah.update_alerts() ah.save_alerts()
19.125
44
0.718954
18
153
5.555556
0.611111
0.36
0
0
0
0
0
0
0
0
0
0
0.183007
153
7
45
21.857143
0.8
0
0
0
0
0
0.052288
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
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
e919e887d4c153790e4189bcd45029bc440fa729
47
py
Python
Chapter04/lambda_python.py
PacktPublishing/Python-Data-Science-with-AI-for-Noobs
d7df90c6f0fbafe3e5b22e8bf6618eabe8d2e830
[ "MIT" ]
8
2019-02-21T15:50:38.000Z
2021-11-08T13:10:49.000Z
Chapter04/lambda_python.py
PacktPublishing/Python-Data-Science-with-AI-for-Noobs
d7df90c6f0fbafe3e5b22e8bf6618eabe8d2e830
[ "MIT" ]
null
null
null
Chapter04/lambda_python.py
PacktPublishing/Python-Data-Science-with-AI-for-Noobs
d7df90c6f0fbafe3e5b22e8bf6618eabe8d2e830
[ "MIT" ]
7
2018-12-26T08:17:22.000Z
2020-08-24T08:23:11.000Z
answer = lambda number, power : number ** power
47
47
0.723404
6
47
5.666667
0.666667
0.647059
0
0
0
0
0
0
0
0
0
0
0.170213
47
1
47
47
0.871795
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
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
0
0
0
4
e91c96e21cb1ff9943d8b3d125261e111534f489
124
py
Python
Shishkin_Anatoliy_lesson_4/hello/hello_module.py
kpu3uc/1824_GB_Python_1
3759379fc99a815f546f4497974a11aacf49df0a
[ "MIT" ]
2
2021-11-01T20:52:13.000Z
2021-11-01T20:52:23.000Z
Shishkin_Anatoliy_lesson_4/hello/hello_module.py
kpu3uc/1824_GB_Python_1
3759379fc99a815f546f4497974a11aacf49df0a
[ "MIT" ]
null
null
null
Shishkin_Anatoliy_lesson_4/hello/hello_module.py
kpu3uc/1824_GB_Python_1
3759379fc99a815f546f4497974a11aacf49df0a
[ "MIT" ]
3
2021-11-05T06:25:18.000Z
2021-11-17T17:50:09.000Z
def say_hello(name): print(f'Привет, {name}!') def hello2(attr): pass if __name__ == '__main__': print(__name__)
13.777778
28
0.645161
17
124
3.941176
0.705882
0
0
0
0
0
0
0
0
0
0
0.009901
0.185484
124
8
29
15.5
0.653465
0
0
0
0
0
0.185484
0
0
0
0
0
0
1
0.333333
false
0.166667
0
0
0.333333
0.333333
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
e92baa427fb6a1a20aebab2ba96eba4e8c170ef6
217
py
Python
NewPee/Authors/function_handler.py
CMPUT404W19T3/NewPee
ba34341e0407746c12aec72689e50fbc2054ae77
[ "MIT" ]
2
2019-02-19T17:11:58.000Z
2019-02-19T17:19:28.000Z
NewPee/Authors/function_handler.py
CMPUT404W19T3/NewPee
ba34341e0407746c12aec72689e50fbc2054ae77
[ "MIT" ]
74
2019-02-01T17:15:02.000Z
2022-03-08T21:09:44.000Z
NewPee/Authors/function_handler.py
CMPUT404W19T3/NewPee
ba34341e0407746c12aec72689e50fbc2054ae77
[ "MIT" ]
1
2019-03-15T16:09:51.000Z
2019-03-15T16:09:51.000Z
from django.contrib.auth.models import User from django.db import models from models import Author import uuid def check_friend_status(User1ID, User2ID): pass def check_username_availablity(user1ID): pass
16.692308
43
0.797235
31
217
5.451613
0.612903
0.118343
0
0
0
0
0
0
0
0
0
0.016304
0.152074
217
13
44
16.692308
0.902174
0
0
0.25
0
0
0
0
0
0
0
0
0
1
0.25
false
0.25
0.5
0
0.75
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
1
0
1
0
0
4
e937e74dfc45e32cf982978d4d1f50ab42262a93
232
py
Python
{{ cookiecutter.repo_name }}/{{ cookiecutter.repo_name.replace("-", "_") }}/scripts/predict_test.py
MAVJ/orbyter-cookiecutter
c37edca8c45428b619f421e0067d925dfee5c24b
[ "MIT" ]
null
null
null
{{ cookiecutter.repo_name }}/{{ cookiecutter.repo_name.replace("-", "_") }}/scripts/predict_test.py
MAVJ/orbyter-cookiecutter
c37edca8c45428b619f421e0067d925dfee5c24b
[ "MIT" ]
null
null
null
{{ cookiecutter.repo_name }}/{{ cookiecutter.repo_name.replace("-", "_") }}/scripts/predict_test.py
MAVJ/orbyter-cookiecutter
c37edca8c45428b619f421e0067d925dfee5c24b
[ "MIT" ]
null
null
null
from click.testing import CliRunner from {{cookiecutter.repo_name.replace("-", "_")}}.scripts.predict import main def test_predict(): runner = CliRunner() result = runner.invoke(main, []) assert result.exit_code == 0
23.2
77
0.698276
28
232
5.642857
0.75
0
0
0
0
0
0
0
0
0
0
0.005128
0.159483
232
9
78
25.777778
0.805128
0
0
0
0
0
0.008621
0
0
0
0
0
0.166667
0
null
null
0
0.333333
null
null
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
1
0
0
0
1
0
0
0
0
4
e93a103a0c2d23ebdc3068fcfda7b8efd2c00b63
998
py
Python
test/test_empty.py
BlockMarkets/python-rest-sdk
aa8e9b59ba86ded1da7a6fdcdad3c2ed76efc00e
[ "Apache-2.0" ]
null
null
null
test/test_empty.py
BlockMarkets/python-rest-sdk
aa8e9b59ba86ded1da7a6fdcdad3c2ed76efc00e
[ "Apache-2.0" ]
null
null
null
test/test_empty.py
BlockMarkets/python-rest-sdk
aa8e9b59ba86ded1da7a6fdcdad3c2ed76efc00e
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ BlockMarkets Cryptocurrency API The BlockMarkets API provides real-time and historical market data on cryptocurrencies from the world's leading crypto exchanges. Sign up for a free, unlimited API key at [BlockMarkets Cryptocurrency API](https://www.blockmarkets.io/cryptocurrency-api). # noqa: E501 OpenAPI spec version: 1.0.0 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import unittest import blockmarkets from blockmarkets.models.empty import Empty # noqa: E501 from blockmarkets.rest import ApiException class TestEmpty(unittest.TestCase): """Empty unit test stubs""" def setUp(self): pass def tearDown(self): pass def testEmpty(self): """Test Empty""" # FIXME: construct object with mandatory attributes with example values # model = blockmarkets.models.empty.Empty() # noqa: E501 pass if __name__ == '__main__': unittest.main()
24.95
271
0.708417
122
998
5.688525
0.614754
0.073487
0.083573
0
0
0
0
0
0
0
0
0.016414
0.206413
998
39
272
25.589744
0.859848
0.559118
0
0.214286
0
0
0.019901
0
0
0
0
0.025641
0
1
0.214286
false
0.214286
0.357143
0
0.642857
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
1
0
0
1
0
1
1
0
0
0
0
4
e93e7ffbab5dab4b065be05e387eaadd67f6a2f3
588
py
Python
rest_helpers/tests/test_type_deserializers.py
WillFr/restlax
ec47617d915094137077f641427976f04acd8d47
[ "Apache-2.0" ]
1
2019-07-03T16:29:05.000Z
2019-07-03T16:29:05.000Z
rest_helpers/tests/test_type_deserializers.py
WillFr/restlax
ec47617d915094137077f641427976f04acd8d47
[ "Apache-2.0" ]
null
null
null
rest_helpers/tests/test_type_deserializers.py
WillFr/restlax
ec47617d915094137077f641427976f04acd8d47
[ "Apache-2.0" ]
null
null
null
from rest_helpers import type_deserializers class TestTypeDeserializers(object): def test_bool_deserializer(self): assert type_deserializers.bool_deserializer("") assert type_deserializers.bool_deserializer("True") assert type_deserializers.bool_deserializer("true") assert not type_deserializers.bool_deserializer("false") assert not type_deserializers.bool_deserializer("False") assert not type_deserializers.bool_deserializer(None) def test_int_deserializer(self): assert type_deserializers.int_deserializer("3") == 3
39.2
64
0.761905
64
588
6.6875
0.328125
0.317757
0.294393
0.462617
0.738318
0.518692
0.518692
0.317757
0.317757
0.317757
0
0.004065
0.163265
588
15
65
39.2
0.865854
0
0
0
0
0
0.032258
0
0
0
0
0
0.636364
1
0.181818
false
0
0.090909
0
0.363636
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
3a64e7d7a7955f280699f6c9800209bef540c37c
568
py
Python
components/mpas-seaice/testing_and_setup/testcases/square/square_quadhex/run_testcase.py
Fa-Li/E3SM
a91995093ec6fc0dd6e50114f3c70b5fb64de0f0
[ "zlib-acknowledgement", "FTL", "RSA-MD" ]
235
2018-04-23T16:30:06.000Z
2022-03-21T17:53:12.000Z
components/mpas-seaice/testing_and_setup/testcases/square/square_quadhex/run_testcase.py
Fa-Li/E3SM
a91995093ec6fc0dd6e50114f3c70b5fb64de0f0
[ "zlib-acknowledgement", "FTL", "RSA-MD" ]
2,372
2018-04-20T18:12:34.000Z
2022-03-31T23:43:17.000Z
components/mpas-seaice/testing_and_setup/testcases/square/square_quadhex/run_testcase.py
Fa-Li/E3SM
a91995093ec6fc0dd6e50114f3c70b5fb64de0f0
[ "zlib-acknowledgement", "FTL", "RSA-MD" ]
254
2018-04-20T20:43:32.000Z
2022-03-30T20:13:38.000Z
from create_grids import create_grids from create_ics import create_ics from run_model import run_model from set_difference_fields import set_difference_fields from plot_testcase import plot_testcase #------------------------------------------------------------------------------- def run_square_quadhex_testcase(): create_grids() create_ics() run_model() set_difference_fields() plot_testcase() #------------------------------------------------------------------------------- if __name__ == "__main__": run_square_quadhex_testcase()
21.846154
80
0.56338
55
568
5.236364
0.327273
0.114583
0.197917
0.166667
0
0
0
0
0
0
0
0
0.119718
568
25
81
22.72
0.576
0.278169
0
0
0
0
0.019608
0
0
0
0
0
0
1
0.076923
true
0
0.384615
0
0.461538
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
1
0
1
0
0
0
0
4
3a8d77b07a0f3b34d2c3240c2a9bdaf7c5b77fe5
311
py
Python
sleepless/app/views/dashboard.py
Shagrat/eye-of-sauron
a80072f7af0fd6d324532eb405e831e34267d797
[ "MIT" ]
null
null
null
sleepless/app/views/dashboard.py
Shagrat/eye-of-sauron
a80072f7af0fd6d324532eb405e831e34267d797
[ "MIT" ]
null
null
null
sleepless/app/views/dashboard.py
Shagrat/eye-of-sauron
a80072f7af0fd6d324532eb405e831e34267d797
[ "MIT" ]
null
null
null
""" Dashboard module provides classes and functions to generate and return HTML pages as responses """ from flask import render_template from flask.views import View class ShowDashboard(View): """ Default Index View """ def dispatch_request(self): return render_template('index.html')
20.733333
75
0.726688
39
311
5.717949
0.717949
0.080717
0
0
0
0
0
0
0
0
0
0
0.196141
311
14
76
22.214286
0.892
0.363344
0
0
1
0
0.057143
0
0
0
0
0
0
1
0.2
false
0
0.4
0.2
1
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
1
0
0
0
null
0
0
0
0
0
0
0
0
1
1
1
0
0
4
3ac226599b198d8de40276e63e1187fe1769aadd
290
py
Python
gehomesdk/erd/converters/specialized/erd_unit_type_converter.py
warrenrees/gehome
6a40f15cfd0738aa7e2ac74b2d8d87780fc07ec8
[ "MIT" ]
null
null
null
gehomesdk/erd/converters/specialized/erd_unit_type_converter.py
warrenrees/gehome
6a40f15cfd0738aa7e2ac74b2d8d87780fc07ec8
[ "MIT" ]
null
null
null
gehomesdk/erd/converters/specialized/erd_unit_type_converter.py
warrenrees/gehome
6a40f15cfd0738aa7e2ac74b2d8d87780fc07ec8
[ "MIT" ]
null
null
null
from ..abstract import ErdReadOnlyConverter from ..primitives import * from gehomesdk.erd.values.common import ErdUnitType class ErdUnitTypeConverter(ErdReadOnlyConverter[ErdUnitType]): def erd_decode(self, value: str) -> ErdUnitType: return ErdUnitType(erd_decode_int(value))
36.25
62
0.796552
31
290
7.354839
0.612903
0.078947
0
0
0
0
0
0
0
0
0
0
0.12069
290
7
63
41.428571
0.894118
0
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
false
0
0.5
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
3ace3050877e325265a65529d34908ee0bf1bc6c
277
py
Python
web/registry/admin.py
dimitrios-ath/agentos
e01d13447c52cdcecef6a1ecaadcf6160df1d104
[ "Apache-2.0" ]
1
2021-10-04T19:32:31.000Z
2021-10-04T19:32:31.000Z
web/registry/admin.py
andyk/agentos
2f5fc5443bfae586c3a9fc7c5bffcca860a0d878
[ "Apache-2.0" ]
2
2021-02-19T20:16:26.000Z
2022-01-03T15:06:50.000Z
web/registry/admin.py
andyk/agentos
2f5fc5443bfae586c3a9fc7c5bffcca860a0d878
[ "Apache-2.0" ]
null
null
null
from django.contrib import admin from .models import Component from .models import ComponentDependency from .models import Repo from .models import Run admin.site.register(Component) admin.site.register(ComponentDependency) admin.site.register(Repo) admin.site.register(Run)
23.083333
40
0.830325
37
277
6.216216
0.324324
0.173913
0.278261
0
0
0
0
0
0
0
0
0
0.093863
277
11
41
25.181818
0.916335
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.555556
0
0.555556
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
3ad49ff5e2c9c04518b68b0bd654ca424042bbe6
150
py
Python
daru_wheel/apps.py
gibeongideon/daruapp
20c454023674aeb66bf6c2880e81a8a00a4c92bc
[ "Unlicense", "MIT" ]
3
2021-05-26T12:38:22.000Z
2021-06-26T12:49:29.000Z
daru_wheel/apps.py
gibeongideon/daruapp
20c454023674aeb66bf6c2880e81a8a00a4c92bc
[ "Unlicense", "MIT" ]
null
null
null
daru_wheel/apps.py
gibeongideon/daruapp
20c454023674aeb66bf6c2880e81a8a00a4c92bc
[ "Unlicense", "MIT" ]
1
2021-05-04T05:45:26.000Z
2021-05-04T05:45:26.000Z
from django.apps import AppConfig class DaruWheelConfig(AppConfig): name = "daru_wheel" def ready(self): import daru_wheel.signals
16.666667
33
0.713333
18
150
5.833333
0.777778
0.171429
0
0
0
0
0
0
0
0
0
0
0.213333
150
8
34
18.75
0.889831
0
0
0
0
0
0.066667
0
0
0
0
0
0
1
0.2
false
0
0.4
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
aafd7c70a8306019e1f8cbe4e39a0d85c7869a3b
576
py
Python
SourceCode/Python/Graphs/Graph.py
ChalmersGU-data-structure-courses/OpenDSA
abfc48391336cb6d118a065550816c0bb8665767
[ "MIT" ]
null
null
null
SourceCode/Python/Graphs/Graph.py
ChalmersGU-data-structure-courses/OpenDSA
abfc48391336cb6d118a065550816c0bb8665767
[ "MIT" ]
1
2021-11-09T10:15:47.000Z
2021-11-10T12:21:45.000Z
SourceCode/Python/Graphs/Graph.py
ChalmersGU-data-structure-courses/OpenDSA
abfc48391336cb6d118a065550816c0bb8665767
[ "MIT" ]
null
null
null
#/* *** ODSATag: GraphADT *** */ class Graph: def nodeCount(self): raise NotImplementedError def edgeCount(self): raise NotImplementedError def getValue(self, v): raise NotImplementedError def setValue(self, v, val): raise NotImplementedError def addEdge(self, v, w, wgt): raise NotImplementedError def weight(self, v, w): raise NotImplementedError def removeEdge(self, v, w): raise NotImplementedError def hasEdge(self, v, w): raise NotImplementedError def neighbors(self, v): raise NotImplementedError #/* *** ODSAendTag: GraphADT *** */
44.307692
59
0.715278
64
576
6.4375
0.34375
0.524272
0.524272
0.080097
0.240291
0.240291
0
0
0
0
0
0
0.171875
576
12
60
48
0.863732
0.112847
0
0
0
0
0
0
0
0
0
0
0
1
0.9
false
0
0
0
1
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
c91163aa49a473629dd65ef99f5b49cb9fa6b632
434
py
Python
portfolio/views.py
shyuldashov/my-portfolio-root
7b8f4dfcdedd61aa44a75844b76d9d286f05ea68
[ "MIT" ]
null
null
null
portfolio/views.py
shyuldashov/my-portfolio-root
7b8f4dfcdedd61aa44a75844b76d9d286f05ea68
[ "MIT" ]
null
null
null
portfolio/views.py
shyuldashov/my-portfolio-root
7b8f4dfcdedd61aa44a75844b76d9d286f05ea68
[ "MIT" ]
null
null
null
from django.shortcuts import render from .models import Project def home(request): projects = Project.objects.all() # post_title = Project.title # post_description = Project.description # post_image = Project.image # post_url = Project.title return render(request, 'portfolio/home.html', {'projects': projects}) def page_not_found_view(request, exception): return render(request, 'portfolio/404.html')
27.125
73
0.728111
53
434
5.830189
0.509434
0.07767
0.122977
0.18123
0
0
0
0
0
0
0
0.008287
0.165899
434
15
74
28.933333
0.845304
0.269585
0
0
0
0
0.144231
0
0
0
0
0
0
1
0.285714
false
0
0.285714
0.142857
0.857143
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