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
874d35918b870bf475fffb9d31b3a5f719564dff
217
py
Python
fig/cli/errors.py
KyleAMathews/fig
a8bc51b22994928482b4d5dd4824abd9133736ce
[ "BSD-3-Clause" ]
1
2020-12-26T07:55:13.000Z
2020-12-26T07:55:13.000Z
fig/cli/errors.py
KyleAMathews/fig
a8bc51b22994928482b4d5dd4824abd9133736ce
[ "BSD-3-Clause" ]
null
null
null
fig/cli/errors.py
KyleAMathews/fig
a8bc51b22994928482b4d5dd4824abd9133736ce
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import from textwrap import dedent class UserError(Exception): def __init__(self, msg): self.msg = dedent(msg).strip() def __unicode__(self): return self.msg
19.727273
38
0.700461
27
217
5.148148
0.592593
0.151079
0
0
0
0
0
0
0
0
0
0
0.21659
217
10
39
21.7
0.817647
0
0
0
0
0
0
0
0
0
0
0
0
1
0.285714
false
0
0.285714
0.142857
0.857143
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
8770b896dbaf32654014906b52be0a80d57fee78
73
py
Python
pybricksdev/connections/__init__.py
lobodpav/pybricksdev
62e2143e68022394524608c6f81a89e94de3dc05
[ "MIT" ]
null
null
null
pybricksdev/connections/__init__.py
lobodpav/pybricksdev
62e2143e68022394524608c6f81a89e94de3dc05
[ "MIT" ]
null
null
null
pybricksdev/connections/__init__.py
lobodpav/pybricksdev
62e2143e68022394524608c6f81a89e94de3dc05
[ "MIT" ]
null
null
null
# SPDX-License-Identifier: MIT # Copyright (c) 2022 The Pybricks Authors
24.333333
41
0.767123
10
73
5.6
1
0
0
0
0
0
0
0
0
0
0
0.063492
0.136986
73
2
42
36.5
0.825397
0.931507
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
877122ef82962fc1c22e9b989199bdd9dc9ab466
139
py
Python
reddit2telegram/channels/r_00ag9603/app.py
mainyordle/reddit2telegram
1163e15aed3b6ff0fba65b222d3d9798f644c386
[ "MIT" ]
187
2016-09-20T09:15:54.000Z
2022-03-29T12:22:33.000Z
reddit2telegram/channels/r_00ag9603/app.py
mainyordle/reddit2telegram
1163e15aed3b6ff0fba65b222d3d9798f644c386
[ "MIT" ]
84
2016-09-22T14:25:07.000Z
2022-03-19T01:26:17.000Z
reddit2telegram/channels/r_00ag9603/app.py
mainyordle/reddit2telegram
1163e15aed3b6ff0fba65b222d3d9798f644c386
[ "MIT" ]
172
2016-09-21T15:39:39.000Z
2022-03-16T15:15:58.000Z
#encoding:utf-8 subreddit = '00ag9603' t_channel = '@r_00ag9603' def send_post(submission, r2t): return r2t.send_simple(submission)
15.444444
38
0.741007
19
139
5.210526
0.789474
0
0
0
0
0
0
0
0
0
0
0.125
0.136691
139
8
39
17.375
0.7
0.100719
0
0
0
0
0.153226
0
0
0
0
0
0
1
0.25
false
0
0
0.25
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
1
0
0
0
1
0
0
0
4
5e42c03408eb686d2091f147bb58bd488663314d
418
py
Python
ACME/skinning/__init__.py
mauriziokovacic/ACME
2615b66dd4addfd5c03d9d91a24c7da414294308
[ "MIT" ]
3
2019-10-23T23:10:55.000Z
2021-09-01T07:30:14.000Z
ACME/skinning/__init__.py
mauriziokovacic/ACME-Python
2615b66dd4addfd5c03d9d91a24c7da414294308
[ "MIT" ]
null
null
null
ACME/skinning/__init__.py
mauriziokovacic/ACME-Python
2615b66dd4addfd5c03d9d91a24c7da414294308
[ "MIT" ]
1
2020-07-11T11:35:43.000Z
2020-07-11T11:35:43.000Z
from .arap import * from .current2relative import * from .lbs import * from .limit_weight import * from .local2model import * from .mean_value_coordinates import * from .model2local import * from .normw import * from .relative2current import * from .skin import * from .weight_valence import *
34.833333
37
0.545455
37
418
6.054054
0.432432
0.446429
0
0
0
0
0
0
0
0
0
0.016
0.401914
418
11
38
38
0.88
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
5e62854e63435637bd3382c097899597b99fa88f
140
py
Python
7_kyu/Highest_and_Lowest.py
UlrichBerntien/Codewars-Katas
bbd025e67aa352d313564d3862db19fffa39f552
[ "MIT" ]
null
null
null
7_kyu/Highest_and_Lowest.py
UlrichBerntien/Codewars-Katas
bbd025e67aa352d313564d3862db19fffa39f552
[ "MIT" ]
null
null
null
7_kyu/Highest_and_Lowest.py
UlrichBerntien/Codewars-Katas
bbd025e67aa352d313564d3862db19fffa39f552
[ "MIT" ]
null
null
null
from array import array def high_and_low(numbers: str) -> str: a = array("i", map(int,numbers.split())) return f"{max(a)} {min(a)}"
28
44
0.628571
24
140
3.583333
0.75
0
0
0
0
0
0
0
0
0
0
0
0.171429
140
5
45
28
0.741379
0
0
0
0
0
0.12766
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
5e65f401c62ec5c38412b78d522e34c601699899
810
py
Python
test.py
litex-hub/pythondata-cpu-cv32e41p
2b4333c3edf8fabfb104eaa4e5d3cacbd6b92438
[ "Apache-2.0" ]
null
null
null
test.py
litex-hub/pythondata-cpu-cv32e41p
2b4333c3edf8fabfb104eaa4e5d3cacbd6b92438
[ "Apache-2.0" ]
null
null
null
test.py
litex-hub/pythondata-cpu-cv32e41p
2b4333c3edf8fabfb104eaa4e5d3cacbd6b92438
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 from __future__ import print_function import os import pythondata_cpu_cv32e41p print("Found cv32e41p @ version", pythondata_cpu_cv32e41p.version_str, "(with data", pythondata_cpu_cv32e41p.data_version_str, ")") print() print("Data is in", pythondata_cpu_cv32e41p.data_location) assert os.path.exists(pythondata_cpu_cv32e41p.data_location) print("Data is version", pythondata_cpu_cv32e41p.data_version_str, pythondata_cpu_cv32e41p.data_git_hash) print("-"*75) print(pythondata_cpu_cv32e41p.data_git_msg) print("-"*75) print() print("It contains:") for root, dirs, files in os.walk(pythondata_cpu_cv32e41p.data_location): dirs.sort() for f in sorted(files): path = os.path.relpath(os.path.join(root, f), pythondata_cpu_cv32e41p.data_location) print(" -", path)
33.75
131
0.777778
117
810
5.059829
0.34188
0.219595
0.35473
0.337838
0.452703
0.246622
0
0
0
0
0
0.067493
0.103704
810
23
132
35.217391
0.747934
0.025926
0
0.222222
0
0
0.096447
0
0
0
0
0
0.055556
1
0
false
0
0.166667
0
0.166667
0.611111
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
5e757bbde9839f0d72d58c202c47accb6c2db151
221
py
Python
tier_0_py27.py
rembish/super-quiz
c7c0c97463e2cfa5592ec81c7fbb7dcfbfc249c4
[ "BSD-2-Clause" ]
null
null
null
tier_0_py27.py
rembish/super-quiz
c7c0c97463e2cfa5592ec81c7fbb7dcfbfc249c4
[ "BSD-2-Clause" ]
null
null
null
tier_0_py27.py
rembish/super-quiz
c7c0c97463e2cfa5592ec81c7fbb7dcfbfc249c4
[ "BSD-2-Clause" ]
null
null
null
class Language: def hello(self, name): return "Hello from {0}".format(name) class Python27(Language): def hello(self): return super(Python27, self).hello("Python 2.7") print Python27().hello()
18.416667
56
0.642534
29
221
4.896552
0.551724
0.15493
0.225352
0.28169
0
0
0
0
0
0
0
0.051724
0.21267
221
11
57
20.090909
0.764368
0
0
0
0
0
0.108597
0
0
0
0
0
0
0
null
null
0
0
null
null
0.142857
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
4
5e81a482d4bbdddb430bf67278cd2e080314b9a2
169
py
Python
240. Search a 2D Matrix II.py
viewv/leetcode
b31e643846bb38978746342e3e3a94991178565a
[ "MIT" ]
2
2018-02-26T09:12:19.000Z
2019-06-07T13:38:10.000Z
240. Search a 2D Matrix II.py
viewv/leetcode
b31e643846bb38978746342e3e3a94991178565a
[ "MIT" ]
1
2018-12-24T07:03:34.000Z
2018-12-24T07:03:34.000Z
240. Search a 2D Matrix II.py
viewv/leetcode
b31e643846bb38978746342e3e3a94991178565a
[ "MIT" ]
2
2018-12-24T07:01:03.000Z
2019-06-07T13:38:07.000Z
class Solution: def searchMatrix(self, matrix, target): """ :type matrix: List[List[int]] :type target: int :rtype: bool """
21.125
43
0.514793
17
169
5.117647
0.705882
0
0
0
0
0
0
0
0
0
0
0
0.35503
169
7
44
24.142857
0.798165
0.35503
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
0
0
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
1
0
0
0
0
1
0
0
4
5e91266876ef399a00e16604be78df49266de878
244
py
Python
artist/admin.py
ssoumyajit/imgapiv1
d37d5eee644a485985f81d8943f2981f9e8c7c2c
[ "MIT" ]
null
null
null
artist/admin.py
ssoumyajit/imgapiv1
d37d5eee644a485985f81d8943f2981f9e8c7c2c
[ "MIT" ]
null
null
null
artist/admin.py
ssoumyajit/imgapiv1
d37d5eee644a485985f81d8943f2981f9e8c7c2c
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Artist, ArtistData, Highlights, Journey # Register your models here. admin.site.register(Artist) admin.site.register(ArtistData) admin.site.register(Highlights) admin.site.register(Journey)
27.111111
59
0.819672
32
244
6.25
0.4375
0.18
0.34
0
0
0
0
0
0
0
0
0
0.086066
244
8
60
30.5
0.896861
0.106557
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
5e9f7afd4db387b898bc7df3ca10dd4927db274e
1,186
py
Python
pcapng/pen.py
bridgetrossiter/pcapng
b74b46052c19567f9249b4385567d4c682565bb6
[ "Apache-2.0" ]
3
2021-02-05T12:10:43.000Z
2022-03-08T00:57:21.000Z
pcapng/pen.py
bridgetrossiter/pcapng
b74b46052c19567f9249b4385567d4c682565bb6
[ "Apache-2.0" ]
2
2021-10-05T06:53:12.000Z
2021-10-13T05:23:10.000Z
pcapng/pen.py
bridgetrossiter/pcapng
b74b46052c19567f9249b4385567d4c682565bb6
[ "Apache-2.0" ]
2
2019-06-23T09:05:12.000Z
2022-01-18T00:14:24.000Z
# Copyright 2017 Brocade Communications Systems, Inc # # 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. """ IANA Private Enterprise Numbers See: https://www.iana.org/assignments/enterprise-numbers/enterprise-numbers """ # Brocade Private Enterprise Number (PEN) # see: http://www.iana.org/assignments/enterprise-numbers/enterprise-numbers # Brocade Communications Systems, Inc. # Scott Kipp # skipp@brocade.com BROCADE_PEN = 1588 #todo add other Brocade PEN values? #todo switch to a dict approach to avoid duplication #todo add all PEN values? VALID_PENS = { BROCADE_PEN } #todo check type on all fns def assert_valid_pen( pen ): assert pen in VALID_PENS
29.65
79
0.751265
173
1,186
5.115607
0.549133
0.067797
0.063277
0.070057
0.140113
0.140113
0.140113
0.140113
0.140113
0
0
0.012232
0.17285
1,186
39
80
30.410256
0.889908
0.860877
0
0
0
0
0
0
0
0
0
0.025641
0.5
1
0.25
false
0
0
0
0.25
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
1
1
0
1
0
0
0
0
0
0
0
4
5eca99bcd090109cf20f24800842efdcc4e8fa64
62
py
Python
JulesD3D/Discharge3Dprofile.py
JulesBlm/Delft3D-Python-Thesis
cb16c4f987da6ddea192dab4a440e86d3423d6b0
[ "BSD-3-Clause" ]
6
2020-11-09T23:58:56.000Z
2022-03-16T06:58:35.000Z
JulesD3D/Discharge3Dprofile.py
JulesBlm/Delft3D-Python-Tools
cb16c4f987da6ddea192dab4a440e86d3423d6b0
[ "BSD-3-Clause" ]
null
null
null
JulesD3D/Discharge3Dprofile.py
JulesBlm/Delft3D-Python-Tools
cb16c4f987da6ddea192dab4a440e86d3423d6b0
[ "BSD-3-Clause" ]
null
null
null
# now the rest from that notebook from decimal import Decimal
20.666667
33
0.806452
10
62
5
0.8
0
0
0
0
0
0
0
0
0
0
0
0.177419
62
2
34
31
0.980392
0.5
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
5ed75f9e510875619d01cf2ff0e5651d3f6b57ba
153
py
Python
demos/kitchen_sink/libs/baseclass/manager_swiper_card.py
p3g4asus/KivyMD
441b3ef9daf412bd588bbb485612c5f2a53d669c
[ "MIT" ]
null
null
null
demos/kitchen_sink/libs/baseclass/manager_swiper_card.py
p3g4asus/KivyMD
441b3ef9daf412bd588bbb485612c5f2a53d669c
[ "MIT" ]
null
null
null
demos/kitchen_sink/libs/baseclass/manager_swiper_card.py
p3g4asus/KivyMD
441b3ef9daf412bd588bbb485612c5f2a53d669c
[ "MIT" ]
null
null
null
from kivy.properties import StringProperty from kivymd.uix.card import MDCard class KitchenSinkSwiperManagerCard(MDCard): text = StringProperty()
19.125
43
0.810458
16
153
7.75
0.75
0
0
0
0
0
0
0
0
0
0
0
0.130719
153
7
44
21.857143
0.932331
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
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
5ed8a4073e87b51e9dfe7380287a71d306d5155d
115
py
Python
day_1/operator_shorthand.py
anishLearnsToCode/ml-workshop-wac-2
9992acd30f4b74ce2debf0d5ff3d8a1b78b1163f
[ "MIT" ]
2
2021-01-06T14:20:43.000Z
2021-11-28T15:43:02.000Z
day_1/operator_shorthand.py
anishLearnsToCode/ml-workshop-wac-2
9992acd30f4b74ce2debf0d5ff3d8a1b78b1163f
[ "MIT" ]
null
null
null
day_1/operator_shorthand.py
anishLearnsToCode/ml-workshop-wac-2
9992acd30f4b74ce2debf0d5ff3d8a1b78b1163f
[ "MIT" ]
1
2021-01-13T14:08:31.000Z
2021-01-13T14:08:31.000Z
""" variable [operator]= value/variable_2 i += 1 result += 1 result /= 10 result *= t result += 4/3 prod %= 10 """
11.5
37
0.6
18
115
3.777778
0.666667
0.205882
0
0
0
0
0
0
0
0
0
0.097826
0.2
115
10
38
11.5
0.641304
0.930435
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
1
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
0
0
0
0
0
4
0d58fcbd5072f558a8a66620b049c0646589b045
1,257
py
Python
solar_monitor_huge_test.py
weidnerm/solar_data_monitor
48bcf9b45ab911bdb7af3dff17d28c8f16d2c925
[ "MIT" ]
null
null
null
solar_monitor_huge_test.py
weidnerm/solar_data_monitor
48bcf9b45ab911bdb7af3dff17d28c8f16d2c925
[ "MIT" ]
null
null
null
solar_monitor_huge_test.py
weidnerm/solar_data_monitor
48bcf9b45ab911bdb7af3dff17d28c8f16d2c925
[ "MIT" ]
null
null
null
from unittest import TestCase, main, skip from mock import patch, call, MagicMock from Subfact_ina219 import INA219 import os from solar_monitor import SolarSensors import time class TestSolar(TestCase): def setUp(self): pass def tearDown(self): pass def test_SolarSensors(self): mySolarSensors = SolarSensors() mySolarSensors.addSensor("Panel", INA219(0x45), scale=2.0 ); # A0 and A1 jumpers. # mySolarSensors.addSensor("Dead", INA219(0x43) ); mySolarSensors.addSensor("Batt 5", INA219(0x49) ); mySolarSensors.addSensor("Batt 6", INA219(0x41) ); mySolarSensors.addSensor("Load", INA219(0x40), scale=2.0); mySolarSensors.addSensor("Batt 7", INA219(0x42) ); mySolarSensors.addSensor("Batt 8", INA219(0x43) ); mySolarSensors.addSensor("Batt 4", INA219(0x48) ); mySolarSensors.addSensor("Batt 3", INA219(0x47) ); mySolarSensors.addSensor("Batt 2", INA219(0x4a) ); mySolarSensors.addSensor("Batt 1", INA219(0x46) ); for index in range(10): data = mySolarSensors.getData(); time.sleep(1.0) print data if __name__ == '__main__': main()
27.933333
90
0.623707
134
1,257
5.768657
0.492537
0.327296
0.279431
0.085382
0.095731
0
0
0
0
0
0
0.095699
0.260143
1,257
44
91
28.568182
0.735484
0.054893
0
0.068966
0
0
0.054992
0
0
0
0.033841
0
0
0
null
null
0.068966
0.206897
null
null
0.034483
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
1
0
0
1
0
0
0
0
0
4
0d676c8e6ae9e4c9010578611e91829aa7f99020
340
py
Python
app/extensions.py
alphagov/notify-admin-frontend
70f2a6a97aefe2432d7a3b54dc1555c030dd3693
[ "MIT" ]
33
2016-01-11T20:16:17.000Z
2021-11-23T12:50:29.000Z
app/extensions.py
alphagov/notify-admin-frontend
70f2a6a97aefe2432d7a3b54dc1555c030dd3693
[ "MIT" ]
1,249
2015-11-30T16:43:21.000Z
2022-03-24T13:04:55.000Z
app/extensions.py
alphagov/notify-admin-frontend
70f2a6a97aefe2432d7a3b54dc1555c030dd3693
[ "MIT" ]
36
2015-12-02T09:49:26.000Z
2021-04-10T18:05:41.000Z
from notifications_utils.clients.antivirus.antivirus_client import ( AntivirusClient, ) from notifications_utils.clients.redis.redis_client import RedisClient from notifications_utils.clients.zendesk.zendesk_client import ZendeskClient antivirus_client = AntivirusClient() zendesk_client = ZendeskClient() redis_client = RedisClient()
34
76
0.855882
36
340
7.833333
0.333333
0.180851
0.234043
0.308511
0
0
0
0
0
0
0
0
0.082353
340
9
77
37.777778
0.903846
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.375
0
0.375
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
0d7d8691647562bb440cc97187aaf6fa71521397
93
py
Python
src/brgy175/residents/apps.py
arjanlangit/brgy175
32f91a03c0d8d30472ad8b13e5ce0e47d229e4f8
[ "bzip2-1.0.6" ]
2
2019-11-08T14:37:16.000Z
2019-11-08T14:37:19.000Z
src/brgy175/residents/apps.py
arjanlangit/brgy175
32f91a03c0d8d30472ad8b13e5ce0e47d229e4f8
[ "bzip2-1.0.6" ]
null
null
null
src/brgy175/residents/apps.py
arjanlangit/brgy175
32f91a03c0d8d30472ad8b13e5ce0e47d229e4f8
[ "bzip2-1.0.6" ]
2
2019-10-08T05:40:39.000Z
2020-03-02T20:28:22.000Z
from django.apps import AppConfig class ResidentsConfig(AppConfig): name = 'residents'
15.5
33
0.763441
10
93
7.1
0.9
0
0
0
0
0
0
0
0
0
0
0
0.16129
93
5
34
18.6
0.910256
0
0
0
0
0
0.096774
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
0dc00b30cf44b4c52d6188fb8072237367a1629c
755
py
Python
src/seabreeze/pyseabreeze/features/ethernetconfiguration.py
TeamPiccolo/python-seabreeze
ff806a834019e2d5a548d2af629d01c90646fea8
[ "MIT" ]
159
2015-03-19T14:13:43.000Z
2022-03-26T11:22:43.000Z
src/seabreeze/pyseabreeze/features/ethernetconfiguration.py
TeamPiccolo/python-seabreeze
ff806a834019e2d5a548d2af629d01c90646fea8
[ "MIT" ]
137
2015-02-07T15:40:54.000Z
2022-01-27T17:25:45.000Z
src/seabreeze/pyseabreeze/features/ethernetconfiguration.py
TeamPiccolo/python-seabreeze
ff806a834019e2d5a548d2af629d01c90646fea8
[ "MIT" ]
86
2015-01-12T15:59:41.000Z
2022-03-13T09:23:00.000Z
from seabreeze.pyseabreeze.features._base import SeaBreezeFeature # Definition # ========== # # TODO: This feature needs to be implemented for pyseabreeze # class SeaBreezeEthernetConfigurationFeature(SeaBreezeFeature): identifier = "ethernet_configuration" def get_mac_address(self, interface_index): raise NotImplementedError("implement in derived class") def set_mac_address(self, interface_index, mac_address): raise NotImplementedError("implement in derived class") def get_gbe_enable_status(self, interface_index): raise NotImplementedError("implement in derived class") def set_gbe_enable_status(self, interface_index, enable_state): raise NotImplementedError("implement in derived class")
32.826087
67
0.766887
81
755
6.925926
0.469136
0.092692
0.128342
0.249554
0.579323
0.511586
0.342246
0.253119
0.253119
0.253119
0
0
0.154967
755
22
68
34.318182
0.87931
0.10596
0
0.363636
0
0
0.188341
0.032885
0
0
0
0.045455
0
1
0.363636
false
0
0.090909
0
0.636364
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
1
0
0
1
0
0
0
0
1
0
0
4
0dd91565bde85622b267c88e27458d9e9a26b9de
27
py
Python
selfdrive/car/mock/values.py
Neptos/openpilot
01914a1a91ade18bd7aead99e7d1bf38cd22ad89
[ "MIT" ]
37,508
2016-11-30T18:18:49.000Z
2022-03-31T23:52:00.000Z
selfdrive/car/mock/values.py
Neptos/openpilot
01914a1a91ade18bd7aead99e7d1bf38cd22ad89
[ "MIT" ]
3,719
2016-11-30T19:25:03.000Z
2022-03-31T22:03:56.000Z
selfdrive/car/mock/values.py
Neptos/openpilot
01914a1a91ade18bd7aead99e7d1bf38cd22ad89
[ "MIT" ]
7,859
2016-11-30T19:03:05.000Z
2022-03-31T22:56:37.000Z
class CAR: MOCK = 'mock'
9
15
0.592593
4
27
4
0.75
0
0
0
0
0
0
0
0
0
0
0
0.259259
27
2
16
13.5
0.8
0
0
0
0
0
0.148148
0
0
0
0
0
0
1
0
false
0
0
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
0de04a463437011f7477104cdf3efa6557e7d463
67
py
Python
Problem141.py
Cleancode404/ProjectEuler
2f93b256b107bfb6a395b8aa197cfeacc599b00b
[ "MIT" ]
null
null
null
Problem141.py
Cleancode404/ProjectEuler
2f93b256b107bfb6a395b8aa197cfeacc599b00b
[ "MIT" ]
null
null
null
Problem141.py
Cleancode404/ProjectEuler
2f93b256b107bfb6a395b8aa197cfeacc599b00b
[ "MIT" ]
null
null
null
""" Investigating progressive numbers, n, which are also square """
22.333333
59
0.746269
8
67
6.25
1
0
0
0
0
0
0
0
0
0
0
0
0.134328
67
3
60
22.333333
0.862069
0.880597
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
219628ba72ffa07cf9d267e5ea72caeae6754b03
102
py
Python
slr/submission_app/apps.py
iamvineettiwari012/WSoC-TestRepo1
917ad850c3eaf62a8c07f45d19f5dac3fa053af0
[ "Apache-2.0" ]
1
2022-01-30T04:33:52.000Z
2022-01-30T04:33:52.000Z
slr/submission_app/apps.py
iamvineettiwari012/WSoC-TestRepo1
917ad850c3eaf62a8c07f45d19f5dac3fa053af0
[ "Apache-2.0" ]
null
null
null
slr/submission_app/apps.py
iamvineettiwari012/WSoC-TestRepo1
917ad850c3eaf62a8c07f45d19f5dac3fa053af0
[ "Apache-2.0" ]
1
2021-03-01T08:41:05.000Z
2021-03-01T08:41:05.000Z
from django.apps import AppConfig class SubmissionAppConfig(AppConfig): name = 'submission_app'
17
37
0.784314
11
102
7.181818
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.147059
102
5
38
20.4
0.908046
0
0
0
0
0
0.137255
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
21aa47ed98a22bf62d3a7ac12121cbc490d5ca3a
363
py
Python
CarSalon_Project/projectSetup.py
KSD9/Car-Salon-Web-App
e9d28053a5688176709850d406bebdead4f8631f
[ "MIT" ]
null
null
null
CarSalon_Project/projectSetup.py
KSD9/Car-Salon-Web-App
e9d28053a5688176709850d406bebdead4f8631f
[ "MIT" ]
null
null
null
CarSalon_Project/projectSetup.py
KSD9/Car-Salon-Web-App
e9d28053a5688176709850d406bebdead4f8631f
[ "MIT" ]
1
2019-01-29T09:47:28.000Z
2019-01-29T09:47:28.000Z
#!/usr/bin/python3 import sqlite3 import filecmp import os import subprocess os.system("python3 manage.py makemigrations CarSalon_App") os.system("python3 manage.py migrate CarSalon_App") os.system("python3 manage.py makemigrations") os.system("python3 manage.py migrate") os.system("python3 manage.py loaddata data") os.system("python3 manage.py runserver")
22.6875
58
0.793388
52
363
5.5
0.346154
0.167832
0.314685
0.440559
0.706294
0.545455
0.237762
0
0
0
0
0.024316
0.093664
363
15
59
24.2
0.844985
0.046832
0
0
0
0
0.578947
0
0
0
0
0
0
1
0
true
0
0.4
0
0.4
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
21b0b6ef09081080c08a08dca17dbd50bf6f03dd
72
py
Python
Dinsel/ex3/ex3.py
appfs/appfs
8cbbfa0e40e4d4a75a498ce8dd894bb2fbc3a9e3
[ "MIT" ]
11
2017-04-21T11:39:55.000Z
2022-02-11T20:25:18.000Z
Dinsel/ex3/ex3.py
appfs/appfs
8cbbfa0e40e4d4a75a498ce8dd894bb2fbc3a9e3
[ "MIT" ]
69
2017-04-26T09:30:38.000Z
2017-08-01T11:31:21.000Z
Dinsel/ex3/ex3.py
appfs/appfs
8cbbfa0e40e4d4a75a498ce8dd894bb2fbc3a9e3
[ "MIT" ]
53
2017-04-20T16:16:11.000Z
2017-07-19T12:53:01.000Z
#!/usr/bin/env python with open(__file__) as fname: print(fname.read())
24
49
0.722222
12
72
4
0.916667
0
0
0
0
0
0
0
0
0
0
0
0.097222
72
2
50
36
0.738462
0.277778
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
4
21d74b6ea577df9d2e654046af4057f86f751541
328
py
Python
xos/importer/plclassic/user_importer.py
wathsalav/xos
f6bcaa37a948ee41729236afe7fce0802e002404
[ "Apache-2.0" ]
null
null
null
xos/importer/plclassic/user_importer.py
wathsalav/xos
f6bcaa37a948ee41729236afe7fce0802e002404
[ "Apache-2.0" ]
null
null
null
xos/importer/plclassic/user_importer.py
wathsalav/xos
f6bcaa37a948ee41729236afe7fce0802e002404
[ "Apache-2.0" ]
null
null
null
class UserImporter: def __init__(self, api): self.api = api self.users = {} def run(self): users = self.api.GetPersons() def save_site_privs(self, user): # update site roles pass def save_slice_privs(self, user): # update slice roles pass
16.4
37
0.542683
38
328
4.473684
0.447368
0.123529
0.152941
0.223529
0
0
0
0
0
0
0
0
0.368902
328
19
38
17.263158
0.821256
0.109756
0
0.2
0
0
0
0
0
0
0
0
0
1
0.4
false
0.2
0.1
0
0.6
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
1
0
0
1
0
0
4
df2803f4706020f29bf86b4f358e418690f94f50
108
py
Python
LHD_Build_2022/useless.py
Welf06/Beginnner_Projects
61e1c56f3bd7497c4b711a52053fec6f21f67fe1
[ "MIT" ]
1
2022-01-22T15:53:01.000Z
2022-01-22T15:53:01.000Z
LHD_Build_2022/useless.py
Welf06/Beginnner_Projects
61e1c56f3bd7497c4b711a52053fec6f21f67fe1
[ "MIT" ]
null
null
null
LHD_Build_2022/useless.py
Welf06/Beginnner_Projects
61e1c56f3bd7497c4b711a52053fec6f21f67fe1
[ "MIT" ]
null
null
null
from webbrowser import open open('https://www.youtube.com/watch?v=dQw4w9WgXcQ&ab_channel=RickAstley', new=0)
54
80
0.805556
17
108
5.058824
0.941176
0
0
0
0
0
0
0
0
0
0
0.029126
0.046296
108
2
80
54
0.805825
0
0
0
0
0
0.59633
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
df864db91e26d6af6203a4d8e69cc3e5c0ee372d
203
py
Python
deep-versions.py
ecdedios/keras-neural-network
4ac0bc5a2116d0d51371385921aa1f6c65ff0d4c
[ "MIT" ]
1
2019-03-23T18:52:49.000Z
2019-03-23T18:52:49.000Z
deep-versions.py
ecdedios/keras-neural-network
4ac0bc5a2116d0d51371385921aa1f6c65ff0d4c
[ "MIT" ]
null
null
null
deep-versions.py
ecdedios/keras-neural-network
4ac0bc5a2116d0d51371385921aa1f6c65ff0d4c
[ "MIT" ]
null
null
null
#theano import theano print('theano: %s' % theano.__version__) #tensorflow import tensorflow print('tensorflow: %s' % tensorflow.__version__) #keras import keras print('keras: %s' % keras.__version__)
16.916667
48
0.753695
24
203
5.875
0.291667
0
0
0
0
0
0
0
0
0
0
0
0.1133
203
11
49
18.454545
0.783333
0.103448
0
0
0
0
0.184358
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0.5
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
1
0
4
df90894adb2ca2616395aef1cf6f43b4c062b023
50
py
Python
testfiles/type2.py
dfandrich/fileviewinfo
4a0e10b7b90f64ba2f3848b94dbc6266bb5f79df
[ "CC0-1.0" ]
1
2022-02-22T17:12:45.000Z
2022-02-22T17:12:45.000Z
testfiles/type2.py
dfandrich/fileviewinfo
4a0e10b7b90f64ba2f3848b94dbc6266bb5f79df
[ "CC0-1.0" ]
null
null
null
testfiles/type2.py
dfandrich/fileviewinfo
4a0e10b7b90f64ba2f3848b94dbc6266bb5f79df
[ "CC0-1.0" ]
null
null
null
'''Docstring type comment, single quotes.''' pass
16.666667
44
0.72
6
50
6
1
0
0
0
0
0
0
0
0
0
0
0
0.12
50
2
45
25
0.818182
0.76
0
0
0
0
0
0
0
0
0
0
0
1
0
true
1
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
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
4
df919e1749ec46a9e378ac3958e7c037038bf046
816
py
Python
app/admin/routes.py
biefeng/profile
daa3d4e185db3008e3ad649f4249ed0b3945ad3d
[ "Apache-2.0" ]
null
null
null
app/admin/routes.py
biefeng/profile
daa3d4e185db3008e3ad649f4249ed0b3945ad3d
[ "Apache-2.0" ]
4
2020-07-02T04:14:57.000Z
2020-07-02T04:17:05.000Z
app/admin/routes.py
biefeng/profile
daa3d4e185db3008e3ad649f4249ed0b3945ad3d
[ "Apache-2.0" ]
null
null
null
# -*- coding:utf-8 -*- # author : BieFeNg # date_time 2020/06/30 16:31 # file_name : routes.py from flask import render_template, redirect, url_for from flask_login import login_required from . import admin @admin.route('/') @login_required def manager(): return redirect(url_for('admin.manage_articles')) @admin.route('/index') @login_required def index(): return render_template('base/index.html', component="admin/article-list.vue") @admin.route('/manage-articles', methods=['GET', 'POST']) @login_required def manage_articles(): return render_template('base/admin.html', component="admin/article-list.vue") @admin.route('/manage-plugins', methods=['GET', 'POST']) @login_required def manage_plugins(): return render_template('base/admin.html', component="admin/chrome-plugin-list.vue")
24.727273
87
0.731618
111
816
5.225225
0.414414
0.112069
0.110345
0.124138
0.42069
0.42069
0.42069
0.296552
0.165517
0
0
0.017833
0.106618
816
32
88
25.5
0.777778
0.105392
0
0.210526
0
0
0.262069
0.128276
0
0
0
0
0
1
0.210526
true
0
0.157895
0.210526
0.578947
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
1
0
0
1
1
0
0
4
df93fb40b18272c25ee42c962cf7c49cf8a65172
236
py
Python
setup_git.py
salilab/module_template
b0b4042ae40356fd81735eaf44b6a734daa8e10b
[ "Info-ZIP" ]
null
null
null
setup_git.py
salilab/module_template
b0b4042ae40356fd81735eaf44b6a734daa8e10b
[ "Info-ZIP" ]
null
null
null
setup_git.py
salilab/module_template
b0b4042ae40356fd81735eaf44b6a734daa8e10b
[ "Info-ZIP" ]
1
2015-01-14T10:53:56.000Z
2015-01-14T10:53:56.000Z
#! /usr/bin/env python """Call the main setup_git.py. This should be copied to the main directory of your project and named setup_git.py.""" import os import os.path os.system(os.path.join("tools", "dev_tools", "git", "setup_git.py"))
29.5
71
0.724576
43
236
3.883721
0.651163
0.143713
0.179641
0
0
0
0
0
0
0
0
0
0.127119
236
7
72
33.714286
0.81068
0.563559
0
0
0
0
0.298969
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
10d26262ec902c68f2cf63b97ebc455772414c02
168
py
Python
autorest/wsgi.py
gregschmit/django-autorest
9c2065ec6871fde1b26d72d9285ad2c3b240dff7
[ "MIT" ]
2
2020-01-11T02:08:16.000Z
2020-08-16T08:22:16.000Z
autorest/wsgi.py
gregschmit/django-autorest
9c2065ec6871fde1b26d72d9285ad2c3b240dff7
[ "MIT" ]
null
null
null
autorest/wsgi.py
gregschmit/django-autorest
9c2065ec6871fde1b26d72d9285ad2c3b240dff7
[ "MIT" ]
null
null
null
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS_MODULE", "autorest.settings") application = get_wsgi_application()
24
68
0.833333
22
168
6.090909
0.590909
0.104478
0.268657
0
0
0
0
0
0
0
0
0
0.077381
168
6
69
28
0.864516
0
0
0
0
0
0.232143
0.130952
0
0
0
0
0
1
0
false
0
0.5
0
0.5
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
80000dfe8c00f3dffdc9168bc1b16b334ee0b949
230
py
Python
tcga/data/genesets/static/download.py
numpde/tcga
a7df66530a0249b82788f6367b9642b68eaf6ec5
[ "MIT" ]
2
2020-06-30T13:15:14.000Z
2021-08-04T07:46:02.000Z
tcga/data/genesets/static/download.py
numpde/tcga
a7df66530a0249b82788f6367b9642b68eaf6ec5
[ "MIT" ]
null
null
null
tcga/data/genesets/static/download.py
numpde/tcga
a7df66530a0249b82788f6367b9642b68eaf6ec5
[ "MIT" ]
null
null
null
# RA, 2020-06-27 from tcga.utils import download url = "https://www.gsea-msigdb.org/gsea/msigdb/download_file.jsp?filePath=/msigdb/release/7.1/msigdb_v7.1_files_to_download_locally.zip" download(url).to(rel_path="original").now
32.857143
136
0.786957
40
230
4.35
0.75
0.126437
0
0
0
0
0
0
0
0
0
0.0553
0.056522
230
6
137
38.333333
0.746544
0.06087
0
0
0
0.333333
0.635514
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
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
1
1
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
80075b00ad9b5ea2ab14b9b457a39ae555885da6
133
py
Python
Pacman/pacman_game_starter/eyes_test.py
kevz17/projects
f2a1fbea5cceaa6ebcd7709ea365d2db6cad7f83
[ "CNRI-Python" ]
1
2021-09-30T21:55:39.000Z
2021-09-30T21:55:39.000Z
pacman_game_starter/eyes_test.py
HuitingZhengAvery/avery-s-arcade-center
79ebc83035bd479538b8193080e14b4519a3a6e1
[ "Apache-2.0" ]
3
2021-09-30T21:17:33.000Z
2021-09-30T21:38:52.000Z
pacman_game_starter/eyes_test.py
HuitingZhengAvery/avery-s-arcade-center
79ebc83035bd479538b8193080e14b4519a3a6e1
[ "Apache-2.0" ]
null
null
null
from eyes import Eyes def test_constructor(): es = Eyes() assert es.left_eye.direction == es.right_eye.direction == (0, 0)
19
68
0.676692
20
133
4.35
0.65
0.275862
0
0
0
0
0
0
0
0
0
0.018692
0.195489
133
6
69
22.166667
0.794393
0
0
0
0
0
0
0
0
0
0
0
0.25
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
800e88403c9b9caee886e81fdb94baffd4937857
183
py
Python
agendamentos/exceptions.py
ceb10n/agendamentos
91e1044cad825db763474cb47935a0c42509ab32
[ "MIT" ]
1
2019-02-20T00:37:14.000Z
2019-02-20T00:37:14.000Z
agendamentos/exceptions.py
ceb10n/agendamentos
91e1044cad825db763474cb47935a0c42509ab32
[ "MIT" ]
null
null
null
agendamentos/exceptions.py
ceb10n/agendamentos
91e1044cad825db763474cb47935a0c42509ab32
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- class AgendamentoExistenteError(Exception): def __init__(self, *args, **kwargs): super(AgendamentoExistenteError, self).__init__(*args, **kwargs)
30.5
72
0.688525
17
183
6.941176
0.705882
0.169492
0
0
0
0
0
0
0
0
0
0.00641
0.147541
183
5
73
36.6
0.75
0.114754
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
801886ac2b8993ae30bd84b13ddb53163d6002f1
2,189
py
Python
tests/test_aion_validator.py
null-po1nter/crypto-address-validator
a65239ff86613c1cca744849c3c6910bb4eacf64
[ "Unlicense" ]
6
2022-01-11T15:25:57.000Z
2022-02-16T08:05:07.000Z
tests/test_aion_validator.py
null-po1nter/crypto-address-validator
a65239ff86613c1cca744849c3c6910bb4eacf64
[ "Unlicense" ]
null
null
null
tests/test_aion_validator.py
null-po1nter/crypto-address-validator
a65239ff86613c1cca744849c3c6910bb4eacf64
[ "Unlicense" ]
2
2022-01-11T15:26:05.000Z
2022-03-22T08:05:59.000Z
import pytest from crypto_address_validator.validators import aion_validator as aionv @pytest.mark.valid @pytest.mark.address @pytest.mark.aion @pytest.mark.parametrize( 'address', [ # mainnet '0xa0c24fbbecf42184d1ca8e9401ddaa2a99f69f3560e3d6c673de3c8a0be2a8eb', '0xa008e42a76e2e779175c589efdb2a0e742b40d8d421df2b93a8a0b13090c7cc8', '0xa00983f07c11ee9160a64dd3ba3dc3d1f88332a2869f25725f56cbd0be32ef7a', '0xa06ed7c5bc9aedb0f9fccdb431363a66d0a7f0ba334697468dcf826a6aee9a69', '0xa001f738ac5b5a9d0c4883ac08fb37fe33b6f32143163d96a7f7c9d82a2b4ccc', 'a01d2fb2c000fcd6f934495b7c9c2b94eedbfb0f5edbfcd0f0d4938abd87da83', # testnet '0xa0178543726d2018431e51e68815c4419dbbc6f172908be3792496e001d8a54e', '0xa0a7707f5bf4a257cf2f582e5a8be3c5a869bcf47ed6801517635edf4d279cb7', '0xa0bc56fa67275de02841bfe21043c153b6eabfd095b3b9067ee531070ede8ce5' ] ) def test_address_is_valid(address): assert aionv.is_valid_address(address) @pytest.mark.invalid @pytest.mark.address @pytest.mark.aion @pytest.mark.parametrize( 'address', [ '0xa0c24fbbecf42184d1ca8e9401ddaa2a99f69f3560e3d6c673de3c8a0be2a8ebq', '0xa008e42a76e2e779175c589efdb2a0e742b40d8d421df2b93a8a0b13090c7cc', 'a01d2fb2c000fcd6f934495b7c9c2b94eedbfb0f5edbfcd0f0d4938abd87da8', '1xa0178543726d2018431e51e68815c4419dbbc6f172908be3792496e001d8a54e1', '0xa0a7707f5bf4a257cf2f582e5a8be3c5a869bcf47ed6801517635edf4d279cb', '0xa0178543726d2018431e51e68815c4419dbbc6f172908be3792496e001d8a542e', '0xa0bc56fa67275de02841bfe21043c153b6eabfd095b3b9067ee531070ede8ce' 'cosmos16na5gpcj80tafv5gycm4gk7garj8jjsgydtkmq', 'cosmos', '6026aeb850f355f63778fe86fefa9cf670e89e6d2a0a2be992c34c12009fa3ab', '12345', 'qwerty', '', '31hr5x7HpgUTNJsdukGEUmjNNTiyVr9aT', 'bc1qnpgqxy7nq7zt6snx0kn76lv3z6xz5dtceupg401', 'мой биткоин адрес', '比特币地址', 'Àåæ´ýú.ü.£ßòÒÀì£Ê·¸®±ô¿¯åÇʯ¯ï', '-[:%/~%`!,)+~;{.\\-.%.**_[(\\$".' ] ) def test_address_is_invalid(address): assert not aionv.is_valid_address(address)
37.741379
78
0.761535
109
2,189
15.266055
0.568807
0.048077
0.030649
0.027644
0.102163
0.070913
0.070913
0.070913
0.070913
0.070913
0
0.377778
0.157149
2,189
57
79
38.403509
0.518157
0.006852
0
0.16
0
0
0.622294
0.597881
0
0
0.363888
0
0.04
1
0.04
false
0
0.04
0
0.08
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
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
33a9774a0ce727047dddb4e20659f842e2dca7b3
180
py
Python
ABC_B/ABC050_B.py
ryosuke0825/atcoder_python
185cdbe7db44ecca1aaf357858d16d31ce515ddb
[ "MIT" ]
null
null
null
ABC_B/ABC050_B.py
ryosuke0825/atcoder_python
185cdbe7db44ecca1aaf357858d16d31ce515ddb
[ "MIT" ]
null
null
null
ABC_B/ABC050_B.py
ryosuke0825/atcoder_python
185cdbe7db44ecca1aaf357858d16d31ce515ddb
[ "MIT" ]
null
null
null
n = int(input()) tl = list(map(int, input().split())) m = int(input()) sum_time = sum(tl) for _ in range(m): p, x = map(int, input().split()) print(sum_time - tl[p-1] + x)
22.5
36
0.561111
33
180
2.969697
0.515152
0.326531
0.22449
0.326531
0
0
0
0
0
0
0
0.006897
0.194444
180
7
37
25.714286
0.668966
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.142857
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
33c652b54ee2ca332c42b5d36c30dd5596effb6e
179
py
Python
mysite/tasks/views.py
opanguane/MyProject
a68acdc3ac19ffd5a81b5078a10128bd28078238
[ "MIT" ]
null
null
null
mysite/tasks/views.py
opanguane/MyProject
a68acdc3ac19ffd5a81b5078a10128bd28078238
[ "MIT" ]
null
null
null
mysite/tasks/views.py
opanguane/MyProject
a68acdc3ac19ffd5a81b5078a10128bd28078238
[ "MIT" ]
null
null
null
from django.shortcuts import render # Create your views here. tasks = ['foo', 'bar', 'baz'] def index(request): return render(request, 'tasks/index.html', {'tasks': tasks})
22.375
64
0.681564
24
179
5.083333
0.75
0
0
0
0
0
0
0
0
0
0
0
0.150838
179
8
64
22.375
0.802632
0.128492
0
0
0
0
0.193548
0
0
0
0
0
0
1
0.25
false
0
0.25
0.25
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
1
0
0
0
4
33c9968feb7a61bf41d9160e95ebee0be97050bc
90
py
Python
egov_edu/apps.py
lanfia/egov
9d97fef31eb9bca05cd0ceef8a4606b7c2bfceba
[ "MIT" ]
null
null
null
egov_edu/apps.py
lanfia/egov
9d97fef31eb9bca05cd0ceef8a4606b7c2bfceba
[ "MIT" ]
null
null
null
egov_edu/apps.py
lanfia/egov
9d97fef31eb9bca05cd0ceef8a4606b7c2bfceba
[ "MIT" ]
null
null
null
from django.apps import AppConfig class EgovEduConfig(AppConfig): name = 'egov_edu'
15
33
0.755556
11
90
6.090909
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.166667
90
5
34
18
0.893333
0
0
0
0
0
0.088889
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
33ddc420a5816b7704e1a7586fb8c826d29787eb
222
py
Python
runBib.py
diku-irlab/hugo_academic_webpage
af55f8e5455fb1f01f69bbc4d10fbb9fb1cd34e5
[ "MIT" ]
null
null
null
runBib.py
diku-irlab/hugo_academic_webpage
af55f8e5455fb1f01f69bbc4d10fbb9fb1cd34e5
[ "MIT" ]
null
null
null
runBib.py
diku-irlab/hugo_academic_webpage
af55f8e5455fb1f01f69bbc4d10fbb9fb1cd34e5
[ "MIT" ]
null
null
null
import subprocess import glob for file in glob.glob("bibtex/*"): print("academic import --bibtex "+file) callProcess = subprocess.call("academic import --overwrite --bibtex "+file, shell=True) # print("---")
27.75
94
0.675676
26
222
5.769231
0.538462
0.186667
0
0
0
0
0
0
0
0
0
0
0.162162
222
7
95
31.714286
0.806452
0
0
0
0
0
0.331818
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
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
0
0
1
0
1
0
0
4
d515ee44fbdb742fded1baa364cb4347a09af9a4
272
bzl
Python
bazel/cc_eventuals_library.bzl
ArthurBandaryk/eventuals-grpc
f3e2ec50e48455873c8f34fa0d69a5448a7a4387
[ "Apache-2.0" ]
15
2020-07-17T15:38:21.000Z
2021-09-11T10:40:46.000Z
bazel/cc_eventuals_library.bzl
ArthurBandaryk/eventuals-grpc
f3e2ec50e48455873c8f34fa0d69a5448a7a4387
[ "Apache-2.0" ]
19
2021-04-27T09:47:32.000Z
2021-10-06T11:54:41.000Z
bazel/cc_eventuals_library.bzl
ArthurBandaryk/eventuals-grpc
f3e2ec50e48455873c8f34fa0d69a5448a7a4387
[ "Apache-2.0" ]
3
2020-08-05T01:57:35.000Z
2021-09-30T14:36:16.000Z
load("@com_github_reboot_dev_pyprotoc_plugin//:rules.bzl", "create_protoc_plugin_rule") cc_eventuals_library = create_protoc_plugin_rule( "@com_github_3rdparty_eventuals_grpc//protoc-gen-eventuals:protoc-gen-eventuals", extensions=(".eventuals.h", ".eventuals.cc") )
45.333333
130
0.808824
36
272
5.638889
0.555556
0.08867
0.17734
0.216749
0
0
0
0
0
0
0
0.003876
0.051471
272
5
131
54.4
0.782946
0
0
0
0
0
0.654412
0.5625
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
0
0
1
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
1d1fbcaf417c79327f8d0fa03c7dae2636cf7cfc
61
py
Python
poradnia/records/__init__.py
efefre/poradnia
8bf9c88888d538cf4d1224431355c850d31ef252
[ "MIT" ]
23
2015-07-20T01:10:52.000Z
2021-01-12T10:05:48.000Z
poradnia/records/__init__.py
efefre/poradnia
8bf9c88888d538cf4d1224431355c850d31ef252
[ "MIT" ]
710
2015-07-12T13:19:14.000Z
2022-03-29T12:38:18.000Z
poradnia/records/__init__.py
efefre/poradnia
8bf9c88888d538cf4d1224431355c850d31ef252
[ "MIT" ]
20
2015-07-21T00:45:34.000Z
2021-01-31T12:48:18.000Z
default_app_config = "poradnia.records.apps.CustomAppConfig"
30.5
60
0.852459
7
61
7.142857
1
0
0
0
0
0
0
0
0
0
0
0
0.04918
61
1
61
61
0.862069
0
0
0
0
0
0.606557
0.606557
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
1d254bbab0217b056702738ef1db1e1ce7b4ac51
100
py
Python
server_status/apps.py
Red-Teapot/bbyaworld.com-django
6eb8febd2cfa304a062ac924240cbdf060499cfc
[ "MIT" ]
1
2020-01-11T18:04:15.000Z
2020-01-11T18:04:15.000Z
server_status/apps.py
Red-Teapot/bbyaworld.com-django
6eb8febd2cfa304a062ac924240cbdf060499cfc
[ "MIT" ]
2
2018-08-24T08:53:27.000Z
2019-07-05T16:08:28.000Z
server_status/apps.py
Red-Teapot/bbyaworld.com-django
6eb8febd2cfa304a062ac924240cbdf060499cfc
[ "MIT" ]
1
2018-11-22T16:19:52.000Z
2018-11-22T16:19:52.000Z
from django.apps import AppConfig class ServerStatusConfig(AppConfig): name = 'server_status'
16.666667
36
0.78
11
100
7
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.15
100
5
37
20
0.905882
0
0
0
0
0
0.13
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
1d501bd78d17b12279d2633cb0de1fe1a1e603f9
206
py
Python
src/infrastructure/exceptions.py
symonk/pytest-validate
384fef57919f0bf8d25d65f9ab64b407a95e6ebe
[ "MIT" ]
1
2020-08-12T11:10:43.000Z
2020-08-12T11:10:43.000Z
src/infrastructure/exceptions.py
symonk/pytest-infrastructure
384fef57919f0bf8d25d65f9ab64b407a95e6ebe
[ "MIT" ]
23
2020-03-29T18:25:54.000Z
2020-11-14T15:20:24.000Z
src/infrastructure/exceptions.py
symonk/pytest-infrastructure
384fef57919f0bf8d25d65f9ab64b407a95e6ebe
[ "MIT" ]
null
null
null
class InfrastructureException(Exception): """ Custom exception to be raised to indicate a infrastructure function has failed its checks. You should be explicit in such checks. """ pass
25.75
94
0.718447
25
206
5.92
0.84
0
0
0
0
0
0
0
0
0
0
0
0.228155
206
7
95
29.428571
0.930818
0.626214
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
1d5358ba944c7808ed5e51c84aa3fc5569a43736
82
py
Python
beta_code/__init__.py
zfletch/beta-code-py
788db49ccdd2fc20d5b39c4af8b1c974599da7fd
[ "MIT" ]
null
null
null
beta_code/__init__.py
zfletch/beta-code-py
788db49ccdd2fc20d5b39c4af8b1c974599da7fd
[ "MIT" ]
6
2020-03-05T21:31:51.000Z
2021-04-05T19:21:49.000Z
beta_code/__init__.py
perseids-tools/beta-code-py
788db49ccdd2fc20d5b39c4af8b1c974599da7fd
[ "MIT" ]
null
null
null
from .beta_code import greek_to_beta_code, beta_code_to_greek name = "beta_code"
20.5
61
0.829268
15
82
4
0.466667
0.533333
0
0
0
0
0
0
0
0
0
0
0.109756
82
3
62
27.333333
0.821918
0
0
0
0
0
0.109756
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
1d82b2938110f30379076c2318f35b90b9c675e7
185
py
Python
takeyourmeds/utils/dt.py
takeyourmeds/takeyourmeds-web
edf24188f26948902cfb69793b4d5aa3cf8b6dea
[ "MIT" ]
11
2015-06-01T16:31:42.000Z
2022-03-01T01:20:58.000Z
takeyourmeds/utils/dt.py
takeyourmeds/takeyourmeds-web
edf24188f26948902cfb69793b4d5aa3cf8b6dea
[ "MIT" ]
111
2015-07-20T13:23:16.000Z
2017-09-08T08:17:10.000Z
takeyourmeds/utils/dt.py
takeyourmeds/takeyourmeds-web
edf24188f26948902cfb69793b4d5aa3cf8b6dea
[ "MIT" ]
6
2015-07-15T08:08:12.000Z
2018-06-23T00:13:13.000Z
import pytz import datetime def local_time(timezone='Europe/London'): now = datetime.datetime.utcnow().replace(tzinfo=pytz.utc) return now.astimezone(pytz.timezone(timezone))
23.125
61
0.762162
24
185
5.833333
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.113514
185
7
62
26.428571
0.853659
0
0
0
0
0
0.07027
0
0
0
0
0
0
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
1d95948fb0e72236ee020df5a1980b682eecd52c
199
py
Python
Translation/src/nn/nonlinearities.py
daphnemt181/MScProject
8691bf984efe08f8f12c006c307cfcba4c21aae5
[ "BSD-3-Clause" ]
null
null
null
Translation/src/nn/nonlinearities.py
daphnemt181/MScProject
8691bf984efe08f8f12c006c307cfcba4c21aae5
[ "BSD-3-Clause" ]
null
null
null
Translation/src/nn/nonlinearities.py
daphnemt181/MScProject
8691bf984efe08f8f12c006c307cfcba4c21aae5
[ "BSD-3-Clause" ]
null
null
null
import theano.tensor as T from lasagne.nonlinearities import elu def elu_plus_one(x): return elu(x) + 1. + 1.e-5 def log_linear(x): return T.switch(T.lt(x, 0), -T.log(1. - x), x) + 1.
14.214286
55
0.628141
39
199
3.128205
0.564103
0.114754
0
0
0
0
0
0
0
0
0
0.038217
0.211055
199
13
56
15.307692
0.738854
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0.333333
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
d5173916d9738cd9daa1f2086a24de5eda27af38
14,399
py
Python
batoid/utils.py
jmeyers314/jtrace
9149a5af766fb9a9cd7ebfe6f3f18de0eb8b2e89
[ "BSD-2-Clause" ]
13
2018-12-24T03:55:04.000Z
2021-11-09T11:40:40.000Z
batoid/utils.py
bregeon/batoid
7b03d9b59ff43db6746eadab7dd58a463a0415c3
[ "BSD-2-Clause" ]
65
2017-08-15T07:19:05.000Z
2021-09-08T17:44:57.000Z
batoid/utils.py
bregeon/batoid
7b03d9b59ff43db6746eadab7dd58a463a0415c3
[ "BSD-2-Clause" ]
10
2019-02-19T07:02:31.000Z
2021-12-10T22:19:40.000Z
import warnings import numpy as np def normalized(*args): if len(args) == 1: args = np.array(*args) return args/np.linalg.norm(args) def bilinear_fit(ux, uy, kx, ky): a = np.empty((len(ux), 3), dtype=float) a[:,0] = 1 a[:,1] = ux a[:,2] = uy b = np.empty((len(ux), 2), dtype=float) b[:,0] = kx b[:,1] = ky x, _, _, _ = np.linalg.lstsq(a, b, rcond=-1) return x def gnomonicToDirCos(u, v): """Convert gnomonic tangent plane projection u,v to direction cosines. Parameters ---------- u, v : float Gnomonic tangent plane coordinates in radians. Returns ------- alpha, beta, gamma : float Direction cosines (unit vector projected onto x, y, z in order) Notes ----- The tangent plane reference is at (u,v) = (0,0), which corresponds to (alpha, beta, gamma) = (0, 0, -1) (a ray coming directly from above). The orientation is such that vx (vy) is positive when u (v) is positive. """ gamma = 1/np.sqrt(1.0 + u*u + v*v) alpha = u*gamma beta = v*gamma return alpha, beta, -gamma def dirCosToGnomonic(alpha, beta, gamma): """Convert direction cosines to gnomonic tangent plane projection. Parameters ---------- alpha, beta, gamma : float Direction cosines (unit vector projected onto x, y, z in order) Returns ------- u, v : float Gnomonic tangent plane coordinates in radians. Notes ----- The tangent plane reference is at (u,v) = (0,0), which corresponds to (alpha, beta, gamma) = (0, 0, -1) (a ray coming directly from above). The orientation is such that vx (vy) is positive when u (v) is positive. """ u = -alpha / gamma v = -beta / gamma return u, v def postelToDirCos(u, v): """Convert Postel azimuthal equidistant tangent plane projection u,v to direction cosines. Parameters ---------- u, v : float Postel tangent plane coordinates in radians. Returns ------- alpha, beta, gamma : float Direction cosines (unit vector projected onto x, y, z in order) Notes ----- The tangent plane reference is at (u,v) = (0,0), which corresponds to (alpha, beta, gamma) = (0, 0, -1) (a ray coming directly from above). The orientation is such that vx (vy) is positive when u (v) is positive. """ rho = np.sqrt(u*u + v*v) wZero = (rho == 0.0) try: if wZero: return 0.0, 0.0, -1.0 except ValueError: pass srho = np.sin(rho) with warnings.catch_warnings(): warnings.simplefilter("ignore") alpha = u/rho*srho beta = v/rho*srho gamma = -np.cos(rho) if np.any(wZero): alpha[wZero] = 0.0 beta[wZero] = 0.0 gamma[wZero] = -1.0 return alpha, beta, gamma def dirCosToPostel(alpha, beta, gamma): """Convert direction cosines to Postel azimuthal equidistant tangent plane projection. Parameters ---------- alpha, beta, gamma : float Direction cosines (unit vector projected onto x, y, z in order) Returns ------- u, v : float Postel tangent plane coordinates in radians. Notes ----- The tangent plane reference is at (u,v) = (0,0), which corresponds to (alpha, beta, gamma) = (0, 0, -1) (a ray coming directly from above). The orientation is such that vx (vy) is positive when u (v) is positive. """ wZero = (gamma == -1) try: if wZero: return 0.0, 0.0 except ValueError: pass rho = np.arccos(-gamma) srho = np.sin(rho) with warnings.catch_warnings(): warnings.simplefilter("ignore") u = alpha*rho/srho v = beta*rho/srho if np.any(wZero): u[wZero] = 0.0 v[wZero] = 0.0 return u, v def zemaxToDirCos(u, v): """Convert Zemax field angles u,v to direction cosines. Parameters ---------- u, v : float Zemax field angles in radians. Returns ------- alpha, beta, gamma : float Direction cosines (unit vector projected onto x, y, z in order) Notes ----- The tangent plane reference is at (u,v) = (0,0), which corresponds to (alpha, beta, gamma) = (0, 0, -1) (a ray coming directly from above). The orientation is such that vx (vy) is positive when u (v) is positive. The Zemax field angle convention is not rotationally invariant. The z-direction cosine for (u, v) = (0, 1) does not equal the z-direction cosine for (u, v) = (0.6, 0.8). """ tanu = np.tan(u) tanv = np.tan(v) norm = np.sqrt(1 + tanu*tanu + tanv*tanv) return tanu/norm, tanv/norm, -1/norm def dirCosToZemax(alpha, beta, gamma): """Convert direction cosines to Postel azimuthal equidistant tangent plane projection. Parameters ---------- alpha, beta, gamma : float Direction cosines (unit vector projected onto x, y, z in order) Returns ------- u, v : float Postel tangent plane coordinates in radians. Notes ----- The tangent plane reference is at (u,v) = (0,0), which corresponds to (alpha, beta, gamma) = (0, 0, -1) (a ray coming directly from above). The orientation is such that vx (vy) is positive when u (v) is positive. The Zemax field angle convention is not rotationally invariant. The z-direction cosine for (u, v) = (0, 1) does not equal the z-direction cosine for (u, v) = (0.6, 0.8). """ return np.arctan(-alpha/gamma), np.arctan(-beta/gamma) def stereographicToDirCos(u, v): """Convert stereographic tangent plane projection u,v to direction cosines. Parameters ---------- u, v : float Stereographic tangent plane coordinates in radians. Returns ------- alpha, beta, gamma : float Direction cosines (unit vector projected onto x, y, z in order) Notes ----- The tangent plane reference is at (u,v) = (0,0), which corresponds to (alpha, beta, gamma) = (0, 0, -1) (a ray coming directly from above). The orientation is such that vx (vy) is positive when u (v) is positive. """ rho = np.sqrt(u*u + v*v) wZero = (rho == 0.0) try: if wZero: return 0.0, 0.0, -1.0 except ValueError: pass theta = 2*np.arctan(rho/2) stheta = np.sin(theta) with warnings.catch_warnings(): warnings.simplefilter("ignore") alpha = u/rho*stheta beta = v/rho*stheta gamma = -np.cos(theta) if np.any(wZero): alpha[wZero] = 0.0 beta[wZero] = 0.0 gamma[wZero] = -1.0 return alpha, beta, gamma def dirCosToStereographic(alpha, beta, gamma): """Convert direction cosines to stereographic tangent plane projection. Parameters ---------- alpha, beta, gamma : float Direction cosines (unit vector projected onto x, y, z in order) Returns ------- u, v : float Stereographic tangent plane coordinates in radians. Notes ----- The tangent plane reference is at (u,v) = (0,0), which corresponds to (alpha, beta, gamma) = (0, 0, -1) (a ray coming directly from above). The orientation is such that vx (vy) is positive when u (v) is positive. """ wZero = (gamma == -1) try: if wZero: return 0.0, 0.0 except ValueError: pass theta = np.arccos(-gamma) rho = 2*np.tan(theta/2) stheta = np.sin(theta) with warnings.catch_warnings(): warnings.simplefilter("ignore") u = alpha*rho/stheta v = beta*rho/stheta if np.any(wZero): u[wZero] = 0.0 v[wZero] = 0.0 return u, v def orthographicToDirCos(u, v): """Convert orthographic tangent plane projection u,v to direction cosines. Parameters ---------- u, v : float Orthographic tangent plane coordinates in radians. Returns ------- alpha, beta, gamma : float Direction cosines (unit vector projected onto x, y, z in order) Notes ----- The tangent plane reference is at (u,v) = (0,0), which corresponds to (alpha, beta, gamma) = (0, 0, -1) (a ray coming directly from above). The orientation is such that vx (vy) is positive when u (v) is positive. """ rho = np.sqrt(u*u + v*v) theta = np.arcsin(rho) gamma = np.cos(theta) alpha = u beta = v return alpha, beta, -gamma def dirCosToOrthographic(alpha, beta, gamma): """Convert direction cosines to orthographic tangent plane projection. Parameters ---------- alpha, beta, gamma : float Direction cosines (unit vector projected onto x, y, z in order) Returns ------- u, v : float Orthographic tangent plane coordinates in radians. Notes ----- The tangent plane reference is at (u,v) = (0,0), which corresponds to (alpha, beta, gamma) = (0, 0, -1) (a ray coming directly from above). The orientation is such that vx (vy) is positive when u (v) is positive. """ u = alpha v = beta return u, v def lambertToDirCos(u, v): """Convert Lambert azimuthal equal-area tangent plane projection u,v to direction cosines. Parameters ---------- u, v : float Lambert tangent plane coordinates in radians. Returns ------- alpha, beta, gamma : float Direction cosines (unit vector projected onto x, y, z in order) Notes ----- The tangent plane reference is at (u,v) = (0,0), which corresponds to (alpha, beta, gamma) = (0, 0, -1) (a ray coming directly from above). The orientation is such that vx (vy) is positive when u (v) is positive. """ rhosqr = u*u + v*v wZero = rhosqr == 0.0 try: if wZero: return 0.0, 0.0, -1.0 except ValueError: pass rho = np.sqrt(rhosqr) gamma = (2-rhosqr)/2 r = np.sqrt(1-gamma*gamma) with warnings.catch_warnings(): warnings.simplefilter("ignore") alpha = u * r/rho beta = v * r/rho if np.any(wZero): alpha[wZero] = 0.0 beta[wZero] = 0.0 gamma[wZero] = 1.0 return alpha, beta, -gamma def dirCosToLambert(alpha, beta, gamma): """Convert direction cosines to Lambert azimuthal equal-area tangent plane projection. Parameters ---------- alpha, beta, gamma : float Direction cosines (unit vector projected onto x, y, z in order) Returns ------- u, v : float Lambert tangent plane coordinates in radians. Notes ----- The tangent plane reference is at (u,v) = (0,0), which corresponds to (alpha, beta, gamma) = (0, 0, -1) (a ray coming directly from above). The orientation is such that vx (vy) is positive when u (v) is positive. """ wZero = (gamma == -1) try: if wZero: return 0.0, 0.0 except ValueError: pass rho = np.sqrt(2+2*gamma) norm = np.sqrt(1-gamma*gamma) with warnings.catch_warnings(): warnings.simplefilter("ignore") u = alpha*rho/norm v = beta*rho/norm if np.any(wZero): u[wZero] = 0.0 v[wZero] = 0.0 return u, v def fieldToDirCos(u, v, projection='postel'): """Convert field angle to direction cosines using specified projection. Parameters ---------- u, v : float Tangent plane coordinates in radians. projection : {'postel', 'zemax', 'gnomonic', 'stereographic', 'lambert', 'orthographic'} Projection used to convert field angle to direction cosines. Returns ------- alpha, beta, gamma : float Direction cosines (unit vector projected onto x, y, z in order) Notes ----- The tangent plane reference is at (u,v) = (0,0), which corresponds to (alpha, beta, gamma) = (0, 0, -1) (a ray coming directly from above). The orientation is such that vx (vy) is positive when u (v) is positive. """ if projection == 'postel': return postelToDirCos(u, v) elif projection == 'zemax': return zemaxToDirCos(u, v) elif projection == 'gnomonic': return gnomonicToDirCos(u, v) elif projection == 'stereographic': return stereographicToDirCos(u, v) elif projection == 'lambert': return lambertToDirCos(u, v) elif projection == 'orthographic': return orthographicToDirCos(u, v) else: raise ValueError("Bad projection: {}".format(projection)) def dirCosToField(alpha, beta, gamma, projection='postel'): """Convert direction cosines to field angle using specified projection. Parameters ---------- alpha, beta, gamma : float Direction cosines (unit vector projected onto x, y, z in order) projection : {'postel', 'zemax', 'gnomonic', 'stereographic', 'lambert', 'orthographic'} Projection used to convert direction cosines to field angle. Returns ------- u, v : float Tangent plane coordinates in radians. Notes ----- The tangent plane reference is at (u,v) = (0,0), which corresponds to (alpha, beta, gamma) = (0, 0, -1) (a ray coming directly from above). The orientation is such that vx (vy) is positive when u (v) is positive. """ if projection == 'postel': return dirCosToPostel(alpha, beta, gamma) elif projection == 'zemax': return dirCosToZemax(alpha, beta, gamma) elif projection == 'gnomonic': return dirCosToGnomonic(alpha, beta, gamma) elif projection == 'stereographic': return dirCosToStereographic(alpha, beta, gamma) elif projection == 'lambert': return dirCosToLambert(alpha, beta, gamma) elif projection == 'orthographic': return dirCosToOrthographic(alpha, beta, gamma) else: raise ValueError("Bad projection: {}".format(projection)) # http://stackoverflow.com/a/6849299 class lazy_property(object): """ meant to be used for lazy evaluation of an object attribute. property should represent non-mutable data, as it replaces itself. """ def __init__(self, fget): self.fget = fget self.func_name = fget.__name__ def __get__(self, obj, cls): if obj is None: return self value = self.fget(obj) setattr(obj, self.func_name, value) return value
28.400394
92
0.599486
1,929
14,399
4.461897
0.091757
0.017428
0.074823
0.030905
0.779598
0.75578
0.73812
0.701522
0.696178
0.68119
0
0.017608
0.278214
14,399
506
93
28.456522
0.810546
0.540871
0
0.515464
0
0
0.032845
0
0
0
0
0
0
1
0.092784
false
0.030928
0.010309
0
0.283505
0
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
d526231538edbd2f827c0ecf998d621f8421f7f1
174
py
Python
python/problem_0006_jens.py
juwens/project-euler-solutions
9767676c613df72f332002a187b93be64cf5a5bd
[ "Apache-2.0" ]
null
null
null
python/problem_0006_jens.py
juwens/project-euler-solutions
9767676c613df72f332002a187b93be64cf5a5bd
[ "Apache-2.0" ]
null
null
null
python/problem_0006_jens.py
juwens/project-euler-solutions
9767676c613df72f332002a187b93be64cf5a5bd
[ "Apache-2.0" ]
null
null
null
MAX = 100 sum_of_squares = sum([x**2 for x in range(1,MAX + 1)]) square_of_sum = sum(range(1,MAX + 1))**2 print sum_of_squares, square_of_sum, square_of_sum - sum_of_squares
34.8
67
0.729885
37
174
3.108108
0.351351
0.130435
0.313043
0.173913
0
0
0
0
0
0
0
0.059603
0.132184
174
4
68
43.5
0.701987
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
0.25
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
4
d52f64707433253d1e7a3d47b3894aca4a0a6c34
186
py
Python
tests/test_wsgi.py
dorianbrown/flask-flamegraph
71a29ac6085a3b1dca8231e63cc009b8f3d8052d
[ "MIT" ]
5
2019-03-27T04:17:07.000Z
2021-08-13T16:43:09.000Z
tests/test_wsgi.py
dorianbrown/flask-flamegraph
71a29ac6085a3b1dca8231e63cc009b8f3d8052d
[ "MIT" ]
null
null
null
tests/test_wsgi.py
dorianbrown/flask-flamegraph
71a29ac6085a3b1dca8231e63cc009b8f3d8052d
[ "MIT" ]
2
2019-03-27T06:42:18.000Z
2021-12-08T14:43:16.000Z
import flask from flask_flamegraph import FlaskFlamegraph def test_wsgi(): app = flask.Flask(__name__) flask_flamegraph = FlaskFlamegraph() flask_flamegraph.init_app(app)
18.6
44
0.768817
22
186
6.090909
0.5
0.335821
0
0
0
0
0
0
0
0
0
0
0.16129
186
9
45
20.666667
0.858974
0
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
false
0
0.333333
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
d530f9b679d52aaf8a5858b41a0fcab5850c5043
243
py
Python
distributed/shuffle/__init__.py
crendoncoiled/distributed
2d68dfc8d29b8d0044d627aa56be9f2e94ce683e
[ "BSD-3-Clause" ]
null
null
null
distributed/shuffle/__init__.py
crendoncoiled/distributed
2d68dfc8d29b8d0044d627aa56be9f2e94ce683e
[ "BSD-3-Clause" ]
null
null
null
distributed/shuffle/__init__.py
crendoncoiled/distributed
2d68dfc8d29b8d0044d627aa56be9f2e94ce683e
[ "BSD-3-Clause" ]
null
null
null
from .shuffle import rearrange_by_column_p2p from .shuffle_extension import ShuffleId, ShuffleMetadata, ShuffleWorkerExtension __all__ = [ "rearrange_by_column_p2p", "ShuffleId", "ShuffleMetadata", "ShuffleWorkerExtension", ]
24.3
81
0.777778
22
243
8.090909
0.545455
0.123596
0.191011
0.224719
0
0
0
0
0
0
0
0.009615
0.144033
243
9
82
27
0.846154
0
0
0
0
0
0.283951
0.185185
0
0
0
0
0
1
0
false
0
0.25
0
0.25
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
d531e0b7bba6fb07a57c0a93acaf594d643ab397
607
py
Python
twitter_scraper/scraper/search_params.py
sagaragarwal94/TwitterScraper
1df4a27d02f97ba89a5f970401483721f145e55b
[ "MIT" ]
15
2017-04-08T18:29:14.000Z
2020-08-16T14:19:41.000Z
twitter_scraper/scraper/search_params.py
shivammathur/TwitterScraper
40eaf654d9cfb9c3c18b77a64c96652430a89225
[ "MIT" ]
null
null
null
twitter_scraper/scraper/search_params.py
shivammathur/TwitterScraper
40eaf654d9cfb9c3c18b77a64c96652430a89225
[ "MIT" ]
7
2017-05-01T05:55:59.000Z
2020-01-11T03:49:16.000Z
class SearchParams(object): def __init__(self): self.maxTweets = 0 def set_username(self, username): self.username = username return self def set_since(self, since): self.since = since return self def set_until(self, until): self.until = until return self def set_search(self, query_search): self.querySearch = query_search return self def set_max_tweets(self, max_tweets): self.maxTweets = max_tweets return self def set_lang(self, lang): self.lang = lang return self
21.678571
41
0.609555
74
607
4.797297
0.256757
0.101408
0.183099
0.225352
0
0
0
0
0
0
0
0.002415
0.317957
607
27
42
22.481481
0.855072
0
0
0.285714
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0
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
d55092b5209a27a5e9e332a131f6cd34bc88a084
57
py
Python
archive/pymc3/binomial_example.py
ajrichards/bayesian-examples
fbd87c6f1613ea516408e9ebc3c9eff1248246e4
[ "BSD-3-Clause" ]
2
2016-01-27T08:51:23.000Z
2017-04-17T02:21:34.000Z
archive/pymc3/binomial_example.py
ajrichards/notebook
fbd87c6f1613ea516408e9ebc3c9eff1248246e4
[ "BSD-3-Clause" ]
null
null
null
archive/pymc3/binomial_example.py
ajrichards/notebook
fbd87c6f1613ea516408e9ebc3c9eff1248246e4
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python """ check out chapter 2 of cam """
11.4
26
0.631579
10
57
3.6
1
0
0
0
0
0
0
0
0
0
0
0.021277
0.175439
57
4
27
14.25
0.744681
0.824561
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
d55f79d7f3d8b8532a37aebf3783a0be1667ef94
112
py
Python
Python-Review/Chapter1-Overview/hello.py
tz70s/lesson
a647105682bb0d1420c450d0cd7c56fe1de6e21b
[ "Apache-2.0" ]
1
2015-08-27T17:27:43.000Z
2015-08-27T17:27:43.000Z
Python-Review/Chapter1-Overview/hello.py
tz70s/lesson
a647105682bb0d1420c450d0cd7c56fe1de6e21b
[ "Apache-2.0" ]
null
null
null
Python-Review/Chapter1-Overview/hello.py
tz70s/lesson
a647105682bb0d1420c450d0cd7c56fe1de6e21b
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 #chmod +x hello.py #It will insert space and newline in preset print ("Hello", "World!")
22.4
43
0.705357
19
112
4.157895
0.947368
0
0
0
0
0
0
0
0
0
0
0.010417
0.142857
112
4
44
28
0.8125
0.714286
0
0
0
0
0.37931
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
4
d5958fd8b11c6f9f68e826a30c32433e1316bc3d
513
py
Python
tests/test_comment.py
Juliet-jay/code-blog
90e31b77c9b61411e92f7b7e00fa47650d382f35
[ "PostgreSQL", "MIT" ]
null
null
null
tests/test_comment.py
Juliet-jay/code-blog
90e31b77c9b61411e92f7b7e00fa47650d382f35
[ "PostgreSQL", "MIT" ]
null
null
null
tests/test_comment.py
Juliet-jay/code-blog
90e31b77c9b61411e92f7b7e00fa47650d382f35
[ "PostgreSQL", "MIT" ]
null
null
null
import unittest from app import db from app.models import Comment, User, Blog class CommentModelTest(unittest.TestCase): def setUp(self): self.user_juliet = User(username = 'juliet', password = 'billions', email = 'juliet@ms.com') self.new_pitch = Blog(id = 1, pitch_title = 'Test', pitch_content = 'This is a test pitch', category = 'interview', user = self.user_juliet) self.new_comment = Comment(id = 1, comment = 'Test comment', user = self.user_juliet, pitch_id = self.new_pitch)
57
148
0.701754
72
513
4.875
0.472222
0.068376
0.119658
0.102564
0
0
0
0
0
0
0
0.004739
0.177388
513
9
149
57
0.827014
0
0
0
0
0
0.140078
0
0
0
0
0
0
1
0.125
false
0.125
0.375
0
0.625
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
1
1
0
1
0
0
4
d598bf0428fe5fc083a71c9327f7c554a9505988
219
py
Python
virtual/lib/python3.6/site-packages/pymacaroons/serializers/__init__.py
marknesh/pitches
0a480d9bc2beafaefa0121393b1502cc05edab89
[ "MIT" ]
58
2015-01-27T17:08:29.000Z
2021-12-14T16:45:13.000Z
virtual/lib/python3.6/site-packages/pymacaroons/serializers/__init__.py
marknesh/pitches
0a480d9bc2beafaefa0121393b1502cc05edab89
[ "MIT" ]
41
2015-01-01T05:09:35.000Z
2021-12-12T21:42:12.000Z
flask/lib/python3.6/site-packages/pymacaroons/serializers/__init__.py
JOFLIX/grapevines
34576e01184570d79cc140b42ffb71d322132da6
[ "MIT", "Unlicense" ]
19
2015-01-01T04:54:57.000Z
2020-11-12T05:40:32.000Z
from .base_serializer import BaseSerializer from .binary_serializer import BinarySerializer from .json_serializer import JsonSerializer __all__ = [ 'BaseSerializer', 'BinarySerializer', 'JsonSerializer', ]
21.9
47
0.785388
19
219
8.684211
0.526316
0.290909
0
0
0
0
0
0
0
0
0
0
0.146119
219
9
48
24.333333
0.882353
0
0
0
0
0
0.200913
0
0
0
0
0
0
1
0
false
0
0.375
0
0.375
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
6338981567616d960bf021b575b22d36b9e38900
63
py
Python
wemake_python_styleguide/presets/__init__.py
n1kolasM/wemake-python-styleguide
f39e87897de89bea1c49d410beb5b1cbaf930807
[ "MIT" ]
1
2020-02-21T18:58:44.000Z
2020-02-21T18:58:44.000Z
wemake_python_styleguide/presets/__init__.py
n1kolasM/wemake-python-styleguide
f39e87897de89bea1c49d410beb5b1cbaf930807
[ "MIT" ]
15
2020-02-22T11:09:46.000Z
2020-02-27T16:36:54.000Z
wemake_python_styleguide/presets/__init__.py
n1kolasM/wemake-python-styleguide
f39e87897de89bea1c49d410beb5b1cbaf930807
[ "MIT" ]
1
2019-12-12T19:18:58.000Z
2019-12-12T19:18:58.000Z
# -*- coding: utf-8 -*- """See :term:`preset` in the docs."""
15.75
37
0.507937
9
63
3.555556
1
0
0
0
0
0
0
0
0
0
0
0.019231
0.174603
63
3
38
21
0.596154
0.857143
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
635d72911eb32b9c130e40aec48d82896ebf5583
240
py
Python
api/v2/serializers/details/allocation_source_command.py
xuhang57/atmosphere
f53fea2a74ee89ccc8852906799b1d9a7e9178b7
[ "BSD-3-Clause" ]
null
null
null
api/v2/serializers/details/allocation_source_command.py
xuhang57/atmosphere
f53fea2a74ee89ccc8852906799b1d9a7e9178b7
[ "BSD-3-Clause" ]
null
null
null
api/v2/serializers/details/allocation_source_command.py
xuhang57/atmosphere
f53fea2a74ee89ccc8852906799b1d9a7e9178b7
[ "BSD-3-Clause" ]
null
null
null
from rest_framework import serializers class AllocationSourceCommandSerializer(serializers.Serializer): id = serializers.IntegerField(read_only=True) name = serializers.CharField(max_length=256) desc = serializers.CharField()
30
64
0.804167
24
240
7.916667
0.791667
0.210526
0
0
0
0
0
0
0
0
0
0.014218
0.120833
240
7
65
34.285714
0.886256
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.2
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
636b2bbdc114f69a500083c64333b380e89ee339
194
py
Python
Exercises/ex011.py
ngama10/PythonExercises
f7f625de2fe6f63b832e8c5b5b8493783acd3a2e
[ "MIT" ]
2
2020-04-30T16:22:51.000Z
2020-04-30T18:26:31.000Z
Exercises/ex011.py
ngama10/PythonExercises
f7f625de2fe6f63b832e8c5b5b8493783acd3a2e
[ "MIT" ]
null
null
null
Exercises/ex011.py
ngama10/PythonExercises
f7f625de2fe6f63b832e8c5b5b8493783acd3a2e
[ "MIT" ]
1
2022-01-19T17:41:33.000Z
2022-01-19T17:41:33.000Z
n1 = float(input("Write the average of the first student ")) n2 = float(input("Write the average of the second student ")) m = (n1+n2)/2 print("The average of the two students is {}".format(m))
38.8
61
0.695876
34
194
3.970588
0.529412
0.222222
0.266667
0.333333
0.444444
0.444444
0.444444
0
0
0
0
0.030675
0.159794
194
4
62
48.5
0.797546
0
0
0
0
0
0.597938
0
0
0
0
0
0
1
0
false
0
0
0
0
0.25
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
6380a2a5a9db58cce21472306ca68d0024414a4c
102
py
Python
trades/decisions.py
wasimusu/trades
db5357294649978ed9fd6c074c6428e5a520cc26
[ "MIT" ]
null
null
null
trades/decisions.py
wasimusu/trades
db5357294649978ed9fd6c074c6428e5a520cc26
[ "MIT" ]
null
null
null
trades/decisions.py
wasimusu/trades
db5357294649978ed9fd6c074c6428e5a520cc26
[ "MIT" ]
null
null
null
""" Takes BUY/SELL/HOLD decision on stocks based on some metrics """ def decision(ticker): pass
12.75
60
0.696078
15
102
4.733333
0.866667
0
0
0
0
0
0
0
0
0
0
0
0.196078
102
7
61
14.571429
0.865854
0.588235
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
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
1
0
1
0
0
0
0
0
4
63947a25dfa83b0cec6b68e8082fe8ff79b0f57b
127
py
Python
src/main/python/NLTK.py
debmalya/EmailClassification
9bb2bf34c81ed01d8258814b79c6c99aaed769a5
[ "Apache-2.0" ]
null
null
null
src/main/python/NLTK.py
debmalya/EmailClassification
9bb2bf34c81ed01d8258814b79c6c99aaed769a5
[ "Apache-2.0" ]
null
null
null
src/main/python/NLTK.py
debmalya/EmailClassification
9bb2bf34c81ed01d8258814b79c6c99aaed769a5
[ "Apache-2.0" ]
null
null
null
from __future__ import division from nltk.book import * text1.concordance("monstrous") print 100 * text4.count('a')/len(text4)
25.4
39
0.771654
18
127
5.222222
0.833333
0
0
0
0
0
0
0
0
0
0
0.052632
0.102362
127
5
39
25.4
0.77193
0
0
0
0
0
0.078125
0
0
0
0
0
0
0
null
null
0
0.5
null
null
0.25
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
1
0
0
0
0
4
639a20f4f341f4a6c7f849ea35e9c5006f825b9e
67
py
Python
Basic/__main2.py
jatiinyadav/Python
4ba8df06780c9543d00b6b9f96e32fbcb5fd5aa4
[ "MIT" ]
null
null
null
Basic/__main2.py
jatiinyadav/Python
4ba8df06780c9543d00b6b9f96e32fbcb5fd5aa4
[ "MIT" ]
null
null
null
Basic/__main2.py
jatiinyadav/Python
4ba8df06780c9543d00b6b9f96e32fbcb5fd5aa4
[ "MIT" ]
null
null
null
# import __main print("Hello, Python welcomes you!!! " + __name__)
22.333333
50
0.701493
8
67
5.125
1
0
0
0
0
0
0
0
0
0
0
0
0.149254
67
3
50
22.333333
0.719298
0.19403
0
0
0
0
0.566038
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
4
63aa9dd28ae35ffa0302795e95da3cb15e1f252e
336
py
Python
problems/can-scramble/can-scramble.py
vidyadeepa/the-coding-interview
90171b77b6884176a6c28bdccb5d45bd6929b489
[ "MIT" ]
1,571
2015-12-09T14:08:47.000Z
2022-03-30T21:34:36.000Z
problems/can-scramble/can-scramble.py
vidyadeepa/the-coding-interview
90171b77b6884176a6c28bdccb5d45bd6929b489
[ "MIT" ]
117
2015-10-22T05:59:19.000Z
2021-09-17T00:14:38.000Z
problems/can-scramble/can-scramble.py
vidyadeepa/the-coding-interview
90171b77b6884176a6c28bdccb5d45bd6929b489
[ "MIT" ]
452
2015-10-21T23:00:58.000Z
2022-03-18T21:16:50.000Z
from collections import Counter def can_scramble(source, dest): if len(source) != len(dest): return False return Counter(source) == Counter(dest) assert(can_scramble("abc", "cba") == True) assert(can_scramble("abc", "ccc") == False) assert(can_scramble("aab", "bbc") == False) assert(can_scramble("aabaaaa", "bbc") == False)
25.846154
47
0.6875
45
336
5.022222
0.466667
0.243363
0.300885
0.176991
0
0
0
0
0
0
0
0
0.130952
336
12
48
28
0.773973
0
0
0
0
0
0.083333
0
0
0
0
0
0.444444
1
0.111111
false
0
0.111111
0
0.444444
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
63c2fce3b080ff88f5fbf1c02f0bd4299f80fb86
219
py
Python
part_2_Advanced/fastapi_advanced_project/project/tests/test_ping.py
felixdittrich92/fastapi_parts
cce39b619a217bb5cad675bbde73942f9ec30a27
[ "Apache-2.0" ]
2
2021-05-19T06:36:34.000Z
2022-03-02T07:16:40.000Z
part_2_Advanced/fastapi_advanced_project/project/tests/test_ping.py
felixdittrich92/fastapi_parts
cce39b619a217bb5cad675bbde73942f9ec30a27
[ "Apache-2.0" ]
null
null
null
part_2_Advanced/fastapi_advanced_project/project/tests/test_ping.py
felixdittrich92/fastapi_parts
cce39b619a217bb5cad675bbde73942f9ec30a27
[ "Apache-2.0" ]
null
null
null
# project/tests/test_ping.py def test_ping(test_app): response = test_app.get("/ping") assert response.status_code == 200 assert response.json() == {"environment": "dev", "ping": "pong!", "testing": True}
27.375
86
0.6621
29
219
4.827586
0.655172
0.114286
0
0
0
0
0
0
0
0
0
0.016216
0.155251
219
7
87
31.285714
0.740541
0.118721
0
0
0
0
0.183246
0
0
0
0
0
0.5
1
0.25
false
0
0
0
0.25
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
1
0
1
0
0
0
0
0
0
0
4
63c771605c50d01ae5e2b4318d100624a40aed3e
182
py
Python
tests/spec/cms/test_hubdb.py
Michimx31/hubspot-api-python
90d529fdf3be5b56ae5b2a3fda308efbda44b63f
[ "Apache-2.0" ]
1
2020-11-12T08:46:32.000Z
2020-11-12T08:46:32.000Z
tests/spec/cms/test_hubdb.py
Michimx31/hubspot-api-python
90d529fdf3be5b56ae5b2a3fda308efbda44b63f
[ "Apache-2.0" ]
null
null
null
tests/spec/cms/test_hubdb.py
Michimx31/hubspot-api-python
90d529fdf3be5b56ae5b2a3fda308efbda44b63f
[ "Apache-2.0" ]
null
null
null
from hubspot import HubSpot from hubspot.cms.hubdb import DefaultApi def test_is_discoverable(): apis = HubSpot().cms.hubdb assert isinstance(apis.default_api, DefaultApi)
22.75
51
0.78022
24
182
5.791667
0.625
0.158273
0.215827
0
0
0
0
0
0
0
0
0
0.142857
182
7
52
26
0.891026
0
0
0
0
0
0
0
0
0
0
0
0.2
1
0.2
false
0
0.4
0
0.6
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
893ea323d1c51f21c4cea98c7d31baacf7217405
1,878
py
Python
botsdk/util/HttpRequest.py
f88af65a/XyzB0ts
21a557288877b24f337f16002d8bb72b155f2551
[ "MIT" ]
4
2021-10-17T11:54:07.000Z
2022-03-18T13:10:11.000Z
botsdk/util/HttpRequest.py
f88af65a/XyzB0ts
21a557288877b24f337f16002d8bb72b155f2551
[ "MIT" ]
null
null
null
botsdk/util/HttpRequest.py
f88af65a/XyzB0ts
21a557288877b24f337f16002d8bb72b155f2551
[ "MIT" ]
1
2021-10-16T09:51:25.000Z
2021-10-16T09:51:25.000Z
import json from threading import local import aiohttp from .Error import debugPrint, printTraceBack localData = local() async def get(url, proxy=None, headers=None, byte=None, timeout: int = 15): global localData if getattr(localData, "conn", None) is None: localData.conn = aiohttp.TCPConnector( ttl_dns_cache=300, limit=0 ) try: timeout = aiohttp.ClientTimeout(total=timeout) async with aiohttp.ClientSession( headers=headers, connector=localData.conn, connector_owner=False, timeout=timeout) as session: async with session.get( url, proxy=proxy if proxy is not None else None, verify_ssl=False) as r: if byte is not None and byte: return await r.read() return await r.text() except Exception: printTraceBack() debugPrint(f"请求{url}时发生异常") return None async def post(url, data, headers=None, byte=None, timeout: int = 15): global localData if getattr(localData, "conn", None) is None: localData.conn = aiohttp.TCPConnector() try: timeout = aiohttp.ClientTimeout(total=timeout) async with aiohttp.ClientSession( connector=localData.conn, connector_owner=False, timeout=timeout) as session: async with session.post(url, data=json.dumps(data).encode("utf8"), headers=headers, verify_ssl=False) as r: if byte is True: return await r.read() return await r.text() except Exception: printTraceBack() debugPrint(f"请求{url}时发生异常") return None
32.37931
78
0.555911
198
1,878
5.242424
0.323232
0.075145
0.046243
0.036609
0.728324
0.728324
0.728324
0.728324
0.680154
0.680154
0
0.007557
0.365815
1,878
57
79
32.947368
0.86398
0
0
0.64
0
0
0.019169
0
0
0
0
0
0
1
0
false
0
0.08
0
0.2
0.06
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
898041941d0a0380f60dd970d20a7a4302da5941
141
py
Python
Lib/vanilla/vanillaGradientButton.py
miguelsousa/vanilla
042f5f6d4c49f4739a1c2f068c46771e81af83f8
[ "MIT" ]
21
2015-01-16T05:10:02.000Z
2021-06-11T20:48:15.000Z
Lib/vanilla/vanillaGradientButton.py
miguelsousa/vanilla
042f5f6d4c49f4739a1c2f068c46771e81af83f8
[ "MIT" ]
1
2019-09-09T12:10:27.000Z
2020-05-22T10:12:14.000Z
Lib/vanilla/vanillaGradientButton.py
miguelsousa/vanilla
042f5f6d4c49f4739a1c2f068c46771e81af83f8
[ "MIT" ]
2
2015-05-03T04:51:08.000Z
2018-08-24T08:28:53.000Z
from AppKit import * from vanillaButton import ImageButton class GradientButton(ImageButton): nsBezelStyle = NSSmallSquareBezelStyle
15.666667
42
0.815603
12
141
9.583333
0.75
0
0
0
0
0
0
0
0
0
0
0
0.148936
141
8
43
17.625
0.958333
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
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
89851d1efb6257fde5c6c9a263a8ea7cddcb93d2
1,763
py
Python
tests/benchmarks/test_upsert_bulk.py
whtsky/django-postgres-extra
863b64ee87269ea3f6ce0c38e4e97f139138ff5f
[ "MIT" ]
null
null
null
tests/benchmarks/test_upsert_bulk.py
whtsky/django-postgres-extra
863b64ee87269ea3f6ce0c38e4e97f139138ff5f
[ "MIT" ]
null
null
null
tests/benchmarks/test_upsert_bulk.py
whtsky/django-postgres-extra
863b64ee87269ea3f6ce0c38e4e97f139138ff5f
[ "MIT" ]
null
null
null
import uuid import pytest from django.db import models from psqlextra.query import ConflictAction from ..fake_model import get_fake_model ROW_COUNT = 10000 @pytest.mark.benchmark() def test_upsert_bulk_naive(benchmark): model = get_fake_model( {"field": models.CharField(max_length=255, unique=True)} ) rows = [] random_values = [] for i in range(0, ROW_COUNT): random_value = str(uuid.uuid4()) random_values.append(random_value) rows.append(model(field=random_value)) model.objects.bulk_create(rows) def _native_upsert(model, random_values): """Performs a concurrency safe upsert using the native PostgreSQL upsert.""" rows = [dict(field=random_value) for random_value in random_values] for row in rows: model.objects.on_conflict(["field"], ConflictAction.UPDATE).insert( **row ) benchmark(_native_upsert, model, random_values) @pytest.mark.benchmark() def test_upsert_bulk_native(benchmark): model = get_fake_model( {"field": models.CharField(max_length=255, unique=True)} ) rows = [] random_values = [] for i in range(0, ROW_COUNT): random_value = str(uuid.uuid4()) random_values.append(random_value) rows.append(model(field=random_value)) model.objects.bulk_create(rows) def _native_upsert(model, random_values): """Performs a concurrency safe upsert using the native PostgreSQL upsert.""" rows = [dict(field=random_value) for random_value in random_values] model.objects.on_conflict(["field"], ConflictAction.UPDATE).bulk_insert( rows ) benchmark(_native_upsert, model, random_values)
25.550725
80
0.669881
217
1,763
5.207373
0.262673
0.106195
0.056637
0.081416
0.846018
0.846018
0.778761
0.631858
0.631858
0.631858
0
0.011038
0.229155
1,763
68
81
25.926471
0.820456
0.079977
0
0.604651
0
0
0.012539
0
0
0
0
0
0
1
0.093023
false
0
0.116279
0
0.209302
0
0
0
0
null
0
0
0
1
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
89b42f91445ab6c78f3468c4ddbf29797e6ce69b
74
py
Python
Bronze/Bronze_IV/19698.py
masterTyper/baekjoon_solved_ac
b9ce14d9bdaa5b5b06735ad075fb827de9f44b9c
[ "MIT" ]
null
null
null
Bronze/Bronze_IV/19698.py
masterTyper/baekjoon_solved_ac
b9ce14d9bdaa5b5b06735ad075fb827de9f44b9c
[ "MIT" ]
null
null
null
Bronze/Bronze_IV/19698.py
masterTyper/baekjoon_solved_ac
b9ce14d9bdaa5b5b06735ad075fb827de9f44b9c
[ "MIT" ]
null
null
null
N, W, H, L = map(int, input().split()) print(min((W // L) * (H // L), N))
24.666667
38
0.445946
15
74
2.2
0.666667
0.121212
0
0
0
0
0
0
0
0
0
0
0.202703
74
3
39
24.666667
0.559322
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0
0
0
0.5
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
4
9821c7d7c3b663964fe8ba836181563c0d410bd0
199
py
Python
Python/palindrome.py
PushpneetSingh/Hello-world
def0f44737e02fb40063cd347e93e456658e2532
[ "MIT" ]
1,428
2018-10-03T15:15:17.000Z
2019-03-31T18:38:36.000Z
Python/palindrome.py
PushpneetSingh/Hello-world
def0f44737e02fb40063cd347e93e456658e2532
[ "MIT" ]
1,162
2018-10-03T15:05:49.000Z
2018-10-18T14:17:52.000Z
Python/palindrome.py
PushpneetSingh/Hello-world
def0f44737e02fb40063cd347e93e456658e2532
[ "MIT" ]
3,909
2018-10-03T15:07:19.000Z
2019-03-31T18:39:08.000Z
//to check if string is a palindrome or not string=raw_input("Enter string:") if(string==string[::-1]): print("The string is a palindrome") else: print("The string isn't a palindrome")
24.875
44
0.673367
32
199
4.15625
0.5625
0.24812
0.135338
0.285714
0
0
0
0
0
0
0
0.006173
0.18593
199
7
45
28.428571
0.814815
0
0
0
0
0
0.341709
0
0
0
0
0
0
0
null
null
0
0
null
null
0.333333
0
0
0
null
1
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
4
983d10efe6acf6f4dbb6c708e453e20c0b3674bc
112
py
Python
Conditions/Climates/Hail.py
saisua/RAF-Game
79b2b618aa18c31a40c080865b58fac02c1cac68
[ "MIT" ]
null
null
null
Conditions/Climates/Hail.py
saisua/RAF-Game
79b2b618aa18c31a40c080865b58fac02c1cac68
[ "MIT" ]
null
null
null
Conditions/Climates/Hail.py
saisua/RAF-Game
79b2b618aa18c31a40c080865b58fac02c1cac68
[ "MIT" ]
null
null
null
from .Climate import Climate class Hail(Climate): name:str="Hail" def __init__(self): pass
16
28
0.625
14
112
4.714286
0.785714
0
0
0
0
0
0
0
0
0
0
0
0.276786
112
7
29
16
0.814815
0
0
0
0
0
0.035398
0
0
0
0
0
0
1
0.2
false
0.2
0.2
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
1
0
0
1
0
0
4
9859d0774ea380f0f2246788c30a8d00b03a3476
447
py
Python
emepy/__init__.py
smartalecH/emepy
f7e20c9b8391a47bbe241f835d832ee51dea87b6
[ "MIT" ]
null
null
null
emepy/__init__.py
smartalecH/emepy
f7e20c9b8391a47bbe241f835d832ee51dea87b6
[ "MIT" ]
null
null
null
emepy/__init__.py
smartalecH/emepy
f7e20c9b8391a47bbe241f835d832ee51dea87b6
[ "MIT" ]
null
null
null
""" emepy Eigenmode Expansion Python """ __version__ = "1.0.0" __author__ = "Ian Hammond" __credits__ = "BYU CamachoLab" from emepy.eme import * from emepy.tools import * from emepy.mode import * from emepy.fd import * from emepy.models import * from emepy.source import * # from emepy.geometries import * from emepy.gpu import * from emepy.ann import * from emepy.monitors import * from emepy.lumerical import * from emepy.materials import *
18.625
32
0.749441
62
447
5.209677
0.435484
0.334365
0.510836
0
0
0
0
0
0
0
0
0.007958
0.1566
447
23
33
19.434783
0.848806
0.145414
0
0
0
0
0.080214
0
0
0
0
0
0
1
0
false
0
0.785714
0
0.785714
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
98620960de00d868f9355cf075c49d229fe780bb
116
py
Python
rlpy/gradnet/AC/__init__.py
imandr/RLpy
f01cf7af47b6054e4e52d663ceafc463df6f6166
[ "BSD-3-Clause" ]
null
null
null
rlpy/gradnet/AC/__init__.py
imandr/RLpy
f01cf7af47b6054e4e52d663ceafc463df6f6166
[ "BSD-3-Clause" ]
null
null
null
rlpy/gradnet/AC/__init__.py
imandr/RLpy
f01cf7af47b6054e4e52d663ceafc463df6f6166
[ "BSD-3-Clause" ]
null
null
null
from .ac import Brain, RNNBrain, entropy_loss, actor_loss, invalid_actions_loss from .ac_cont import BrainContinuous
58
79
0.853448
17
116
5.529412
0.705882
0.12766
0
0
0
0
0
0
0
0
0
0
0.094828
116
2
80
58
0.895238
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
989cb0e6ce19c8307e82640a3f870ea4cffe9e1c
586
py
Python
index_creation/vector_feeder.py
lukasstracke/postgres-word2vec
5e469aa59d0f322980ae37683d390b0457119300
[ "MIT" ]
131
2018-02-13T08:26:15.000Z
2022-03-14T22:43:56.000Z
index_creation/vector_feeder.py
lukasstracke/postgres-word2vec
5e469aa59d0f322980ae37683d390b0457119300
[ "MIT" ]
7
2018-02-17T15:25:29.000Z
2021-10-06T12:47:39.000Z
index_creation/vector_feeder.py
lukasstracke/postgres-word2vec
5e469aa59d0f322980ae37683d390b0457119300
[ "MIT" ]
17
2018-06-12T19:37:20.000Z
2021-03-19T14:34:00.000Z
#!/usr/bin/python3 class VectorFeeder: def __init__(self, vectors, words, cursor=0): self.data = vectors self.cursor = cursor self.words = words print('len words', len(self.words), 'len data', len(self.data)) def get_next_batch(self, size): batch = self.data[self.cursor:(self.cursor+size)] word_batch = self.words[self.cursor:(self.cursor+size)] self.cursor += size return batch, word_batch def has_next(self): return self.cursor < len(self.data) def get_cursor(self): return self.cursor
32.555556
71
0.62628
79
586
4.518987
0.278481
0.22409
0.117647
0.078431
0.229692
0
0
0
0
0
0
0.004535
0.24744
586
17
72
34.470588
0.804989
0.02901
0
0
0
0
0.02993
0
0
0
0
0
0
1
0.266667
false
0
0
0.133333
0.533333
0.066667
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
1
0
0
0
1
1
0
0
4
7f36742d77a60016020c5bf3c87374c618c7dd4c
226
py
Python
tests/project/apps/catalogue/config.py
fourdigits/django-oscar-wagtail
818c8ac93a7854c7837043d145e36d8177f29a70
[ "MIT" ]
48
2018-07-12T21:55:33.000Z
2022-03-23T08:09:01.000Z
tests/project/apps/catalogue/config.py
fourdigits/django-oscar-wagtail
818c8ac93a7854c7837043d145e36d8177f29a70
[ "MIT" ]
7
2018-12-05T07:33:58.000Z
2021-12-20T08:32:02.000Z
tests/project/apps/catalogue/config.py
fourdigits/django-oscar-wagtail
818c8ac93a7854c7837043d145e36d8177f29a70
[ "MIT" ]
32
2018-09-09T09:38:51.000Z
2022-02-14T22:49:56.000Z
from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ class CatalogueConfig(AppConfig): label = 'catalogue' name = 'tests.project.apps.catalogue' verbose_name = _('Catalogue')
25.111111
55
0.756637
26
226
6.423077
0.692308
0.11976
0
0
0
0
0
0
0
0
0
0
0.154867
226
8
56
28.25
0.874346
0
0
0
0
0
0.20354
0.123894
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
7f53409298157f41b4e417e291da5d2a0531d72c
81
py
Python
app/api/auth/models.py
nccr-itmo/FEDOT.Web
9b6f7b66de277ea34d6d5ed621b99a3f938db61b
[ "BSD-3-Clause" ]
23
2020-12-24T11:05:01.000Z
2022-03-31T20:29:12.000Z
app/api/auth/models.py
nccr-itmo/FedotWeb
763fb1f39ad2b69104b6568e6f941c4c67762e34
[ "BSD-3-Clause" ]
42
2021-01-11T09:38:31.000Z
2022-03-25T17:19:05.000Z
app/api/auth/models.py
nccr-itmo/FedotWeb
763fb1f39ad2b69104b6568e6f941c4c67762e34
[ "BSD-3-Clause" ]
5
2021-03-31T04:38:31.000Z
2022-03-31T20:29:26.000Z
from dataclasses import dataclass @dataclass class Token: token_value: str
11.571429
33
0.777778
10
81
6.2
0.8
0
0
0
0
0
0
0
0
0
0
0
0.185185
81
6
34
13.5
0.939394
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
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
0
1
0
0
0
1
0
0
4
7f764cbde5573cce0d64c230ef488b5b05fdbcc1
3,828
py
Python
tests/services/gridreader/test_time_series_names.py
mwtoews/pymt
81a8469b0d0d115d21186ec1d1c9575690d51850
[ "MIT" ]
38
2017-06-30T17:10:53.000Z
2022-01-05T07:38:03.000Z
tests/services/gridreader/test_time_series_names.py
mwtoews/pymt
81a8469b0d0d115d21186ec1d1c9575690d51850
[ "MIT" ]
96
2017-04-04T18:52:41.000Z
2021-11-01T21:30:48.000Z
tests/services/gridreader/test_time_series_names.py
mwtoews/pymt
81a8469b0d0d115d21186ec1d1c9575690d51850
[ "MIT" ]
15
2017-05-23T15:40:16.000Z
2021-06-14T21:30:28.000Z
import pytest from pymt.services.gridreader import time_series_names as tsn def test_split_valid(): parts = tsn.split("sea_floor_surface__elevation@t=123") assert parts == ("sea_floor_surface__elevation", 123) def test_split_no_time_stamp(): with pytest.raises(tsn.TimeSeriesNameError): tsn.split("sea_floor_surface__elevation") def test_split_bad_time_stamp(): with pytest.raises(tsn.TimeSeriesNameError): tsn.split("sea_floor_surface__elevation@t=12.2") def test_split_time_stamp_with_leading_zeros(): parts = tsn.split("sea_floor_surface__elevation@t=0001") assert parts[1] == 1 def test_unsplit(): name = tsn.unsplit("ice_surface__temperature", 1) assert name == "ice_surface__temperature@t=1" def test_unsplit_str_time_stamp(): name = tsn.unsplit("ice_surface__temperature", "0001") assert name == "ice_surface__temperature@t=1" def test_unsplit_float_time_stamp(): with pytest.raises(tsn.TimeStampError): tsn.unsplit("ice_surface__temperature", "1.2") def test_get_time_series_names(): names = tsn.get_time_series_names( [ "ice_surface__temperature@t=0", "ice_surface__temperature@t=1", "earth_surface__temperature", ] ) assert names == set(["ice_surface__temperature"]) def test_get_time_series_names_empty(): names = tsn.get_time_series_names(["ice_surface__temperature"]) assert names == set() names = tsn.get_time_series_names([]) assert names == set() def test_get_time_series_names_ignore_bad_names(): names = tsn.get_time_series_names( [ "ice_surface__temperature@t=0", "ice_surface__temperature@t=1", "earth_surface__temperature@t=1.2", "sea_surface__temperature@t=", ] ) assert names == set(["ice_surface__temperature"]) def test_sort_ascending_is_default(): names = [ "ice_surface__temperature@t=1", "ice_surface__temperature@t=2", "ice_surface__temperature@t=0", "ice_surface__temperature@t=10", "earth_surface__temperature", ] assert tsn.sort_time_series_names(names) == tsn.sort_time_series_names( names, ordering="ascending" ) def test_sort_ascending(): names = tsn.sort_time_series_names( [ "ice_surface__temperature@t=1", "ice_surface__temperature@t=0", "ice_surface__temperature@t=10", "ice_surface__temperature@t=2", "earth_surface__temperature", ], ordering="ascending", ) assert names == { "ice_surface__temperature": [ "ice_surface__temperature@t=0", "ice_surface__temperature@t=1", "ice_surface__temperature@t=2", "ice_surface__temperature@t=10", ] } def test_sort_descending(): names = tsn.sort_time_series_names( [ "ice_surface__temperature@t=1", "ice_surface__temperature@t=2", "ice_surface__temperature@t=0", "earth_surface__temperature", ], ordering="descending", ) assert names == { "ice_surface__temperature": [ "ice_surface__temperature@t=2", "ice_surface__temperature@t=1", "ice_surface__temperature@t=0", ] } def test_sort_no_ordering(): names = [ "ice_surface__temperature@t=1", "ice_surface__temperature@t=2", "earth_surface__temperature", "ice_surface__temperature@t=0", ] assert tsn.sort_time_series_names(names, ordering=None) == dict( ice_surface__temperature=[ "ice_surface__temperature@t=1", "ice_surface__temperature@t=2", "ice_surface__temperature@t=0", ] )
27.539568
75
0.649164
452
3,828
4.969027
0.126106
0.368655
0.364648
0.293856
0.780499
0.773375
0.675423
0.606857
0.504898
0.445236
0
0.019608
0.240596
3,828
138
76
27.73913
0.75301
0
0
0.490741
0
0
0.37069
0.361547
0
0
0
0
0.111111
1
0.12963
false
0
0.018519
0
0.148148
0
0
0
0
null
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
f695d6f1736c69b44500061513c9147159307a30
269
py
Python
extra_keras_metrics/f1score.py
LucaCappelletti94/keras_metrics
2af59d26f7134a65e8332a29a3f7ae712b928f0e
[ "MIT" ]
14
2019-06-14T10:37:11.000Z
2021-09-17T11:42:48.000Z
extra_keras_metrics/f1score.py
LucaCappelletti94/keras_metrics
2af59d26f7134a65e8332a29a3f7ae712b928f0e
[ "MIT" ]
5
2019-06-15T07:11:45.000Z
2021-01-04T16:46:40.000Z
extra_keras_metrics/f1score.py
LucaCappelletti94/keras_metrics
2af59d26f7134a65e8332a29a3f7ae712b928f0e
[ "MIT" ]
1
2019-12-02T08:00:25.000Z
2019-12-02T08:00:25.000Z
"""Module implementing the F1 Score metric.""" from tensorflow.keras.backend import epsilon from .binary_metric import BinaryMetric class F1Score(BinaryMetric): def _custom_metric(self): return self.tp / (self.tp + 0.5 * (self.fp + self.fn) + epsilon())
26.9
74
0.713755
36
269
5.25
0.694444
0.063492
0
0
0
0
0
0
0
0
0
0.017857
0.167286
269
9
75
29.888889
0.825893
0.148699
0
0
0
0
0
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
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
f6ada69dbd8b761580712d68502409c8a49854dd
211
py
Python
shopping_cart/api_app/urls.py
Hakim37/Django_API
844bdd73840a93d1d44b98fec29b68d3aa3feba2
[ "MIT" ]
null
null
null
shopping_cart/api_app/urls.py
Hakim37/Django_API
844bdd73840a93d1d44b98fec29b68d3aa3feba2
[ "MIT" ]
null
null
null
shopping_cart/api_app/urls.py
Hakim37/Django_API
844bdd73840a93d1d44b98fec29b68d3aa3feba2
[ "MIT" ]
null
null
null
from django.urls import path from .views import ShoppingCart, ShoppingCartUpdate urlpatterns = [ path('cart-items/', ShoppingCart.as_view()), path('update-item/<int:item_id>', ShoppingCart.as_view()), ]
30.142857
62
0.734597
26
211
5.846154
0.653846
0.184211
0.236842
0
0
0
0
0
0
0
0
0
0.118483
211
7
63
30.142857
0.817204
0
0
0
0
0
0.169811
0.117925
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
f6c7014f0e82b441f6934f8e2d26e0ab17ceb6db
54
py
Python
post_setup.py
Scalr/pecha
40525bfca9fe2bea319ac18ea454a24ead5c405a
[ "Apache-2.0" ]
8
2016-07-21T13:03:22.000Z
2020-07-18T13:34:09.000Z
post_setup.py
Scalr/scalr-ctl
40525bfca9fe2bea319ac18ea454a24ead5c405a
[ "Apache-2.0" ]
18
2016-04-04T16:00:23.000Z
2019-04-17T12:04:15.000Z
post_setup.py
Scalr/pecha
40525bfca9fe2bea319ac18ea454a24ead5c405a
[ "Apache-2.0" ]
8
2017-01-03T00:13:18.000Z
2019-05-14T17:53:40.000Z
__author__ = 'Dmitriy Korsakov' def main(): pass
10.8
31
0.666667
6
54
5.333333
1
0
0
0
0
0
0
0
0
0
0
0
0.222222
54
4
32
13.5
0.761905
0
0
0
0
0
0.296296
0
0
0
0
0
0
1
0.333333
false
0.333333
0
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
1
0
1
0
0
0
0
0
4
f6cf48b6e1d777615f5710e3200924ca37f9f19b
103
py
Python
sample-proxies/advanced-api-services/token-validate/apiproxy/resources/py/ConvertExpiresInToString.py
sandeep171717/arsenal
bd064abaec6412fd7ab4d12666a3f7d2ecf28821
[ "Apache-2.0" ]
413
2015-01-09T02:13:27.000Z
2022-03-27T10:02:46.000Z
sample-proxies/advanced-api-services/token-validate/apiproxy/resources/py/ConvertExpiresInToString.py
sandeep171717/arsenal
bd064abaec6412fd7ab4d12666a3f7d2ecf28821
[ "Apache-2.0" ]
52
2015-02-04T17:14:38.000Z
2022-03-21T21:21:49.000Z
sample-proxies/advanced-api-services/token-validate/apiproxy/resources/py/ConvertExpiresInToString.py
sandeep171717/arsenal
bd064abaec6412fd7ab4d12666a3f7d2ecf28821
[ "Apache-2.0" ]
625
2015-01-06T14:20:15.000Z
2022-03-21T16:27:15.000Z
flow.setVariable("expiresIn_string", str(flow.getVariable("appServicesTokenResponse.expiresIn_long")));
103
103
0.84466
10
103
8.5
0.8
0
0
0
0
0
0
0
0
0
0
0
0.009709
103
1
103
103
0.833333
0
0
0
0
0
0.528846
0.375
0
0
0
0
0
1
0
true
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
1
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
10111c38cdf94bb347442087d1bd2b5d1d8e143f
165
py
Python
userprofiles/forms.py
stef-k/socketizer
3f7e1d0a90071efb2012b3840e53b5751d4b4b70
[ "MIT" ]
null
null
null
userprofiles/forms.py
stef-k/socketizer
3f7e1d0a90071efb2012b3840e53b5751d4b4b70
[ "MIT" ]
null
null
null
userprofiles/forms.py
stef-k/socketizer
3f7e1d0a90071efb2012b3840e53b5751d4b4b70
[ "MIT" ]
null
null
null
from django import forms from mainsite import models class DomainForm(forms.ModelForm): class Meta: model = models.Domain fields = ('domain',)
18.333333
34
0.678788
19
165
5.894737
0.684211
0
0
0
0
0
0
0
0
0
0
0
0.242424
165
8
35
20.625
0.896
0
0
0
0
0
0.036364
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
63e509d7cea9ce7f7105b19a39bea6542c29b468
106
py
Python
template_repo/opg_data_template/lambda_functions/v1/functions/template/app/template.py
ministryofjustice/opg-data
6b08f5a9928823909e22506a06a8a532496a5d75
[ "RSA-MD" ]
null
null
null
template_repo/opg_data_template/lambda_functions/v1/functions/template/app/template.py
ministryofjustice/opg-data
6b08f5a9928823909e22506a06a8a532496a5d75
[ "RSA-MD" ]
3
2020-04-16T14:56:52.000Z
2021-01-11T09:26:21.000Z
template_repo/opg_data_template/lambda_functions/v1/functions/template/app/template.py
ministryofjustice/opg-data
6b08f5a9928823909e22506a06a8a532496a5d75
[ "RSA-MD" ]
2
2020-12-18T10:59:42.000Z
2021-04-11T06:26:07.000Z
from .flask_lambda import FlaskLambda from . import create_app lambda_handler = create_app(FlaskLambda)
17.666667
40
0.830189
14
106
6
0.571429
0.214286
0
0
0
0
0
0
0
0
0
0
0.122642
106
5
41
21.2
0.903226
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
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
121e02fff52791903c4202119461a1772c5cd5ab
52
py
Python
cruft/__main__.py
tdhopper/cruft
37e46693ecdd3467bd01b022447e100163f4733a
[ "MIT" ]
293
2020-08-18T05:52:45.000Z
2022-03-31T20:39:43.000Z
cruft/__main__.py
tdhopper/cruft
37e46693ecdd3467bd01b022447e100163f4733a
[ "MIT" ]
102
2020-08-28T16:38:34.000Z
2022-03-31T11:01:41.000Z
cruft/__main__.py
tdhopper/cruft
37e46693ecdd3467bd01b022447e100163f4733a
[ "MIT" ]
36
2020-08-28T16:34:10.000Z
2022-03-31T21:55:53.000Z
from cruft import _cli _cli.app(prog_name="cruft")
13
27
0.769231
9
52
4.111111
0.777778
0
0
0
0
0
0
0
0
0
0
0
0.115385
52
3
28
17.333333
0.804348
0
0
0
0
0
0.096154
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
89c3b01b65dc557fd038a86fa751045141e02a4e
10,784
py
Python
app/util/messageque/msgsender.py
B-ROY/TESTGIT
40221cf254c90d37d21afb981635740aebf11949
[ "Apache-2.0" ]
2
2017-12-02T13:58:30.000Z
2018-08-02T17:07:59.000Z
app/util/messageque/msgsender.py
B-ROY/TESTGIT
40221cf254c90d37d21afb981635740aebf11949
[ "Apache-2.0" ]
null
null
null
app/util/messageque/msgsender.py
B-ROY/TESTGIT
40221cf254c90d37d21afb981635740aebf11949
[ "Apache-2.0" ]
null
null
null
#coding=utf-8 import json from app.util.messageque.http_request import RequestApi import logging from django.conf import settings class MessageSender: Host = settings.Message_Tornado_host @classmethod def send_bottle_message(cls, from_id, desc): body = {} body["from_id"] = from_id body["desc"] = desc path = "/tecent/bottle" data = RequestApi.post_body_request_http(path=path, body=json.dumps(body), headers={}, host=cls.Host) result = json.loads(data) print result.get("status_code") if result.get("status_code")==200: return 200 elif result.get("status_code") ==400: logging.error("send bottle message to mq error") return 400 @classmethod def send_bottle_message_v3(cls, from_id, desc, gender): body = {} body["from_id"] = from_id body["desc"] = desc body["gender"] = gender path = "/tecent/bottle_v3" data = RequestApi.post_body_request_http(path=path, body=json.dumps(body), headers={}, host=cls.Host) result = json.loads(data) print result.get("status_code") if result.get("status_code") == 200: return 200 elif result.get("status_code") == 400: logging.error("send bottle message to mq error") return 400 @classmethod def send_block_user_message(cls, user_id, desc): body = {} body["block_id"] = user_id body["desc"] = desc path = "/tecent/bottle" data = RequestApi.post_body_request_http(path=path, body=json.dumps(body), headers={}, host=cls.Host) result = json.loads(data) print result.get("status_code") print 1234566 if result.get("status_code") == 200: return 200 elif result.get("status_code") == 400: logging.error("send blocker_user message to mq error") return 400 @classmethod def send_charge_bottle_message(cls, from_id): body = {} body["from_id"] = from_id desc = u"我已经成为土豪,快来撩我吧~" body["desc"] = desc path = "/tecent/charge_bottle" data = RequestApi.post_body_request_http(path=path, body=json.dumps(body), headers={}, host=cls.Host) result = json.loads(data) print result.get("status_code") if result.get("status_code") == 200: return 200 elif result.get("status_code") == 400: logging.error("send charge bottle message to mq error") return 400 @classmethod def send_system_message(cls, to_user_id, desc): body = {} body["to_user_id"] = to_user_id body["desc"] = desc path = "/tecent/system_message" data = RequestApi.post_body_request_http(path=path, body=json.dumps(body), headers={}, host=cls.Host) result = json.loads(data) print result.get("status_code") if result.get("status_code") == 200: return 200 elif result.get("status_code") == 400: logging.error("send system message to mq error") return @classmethod def send_big_gift_info_message(cls, sender_id, sender_name, receiver_id, receiver_name, gift_id, gift_name, gift_count): body = { "sender_id": sender_id, "sender_name": sender_name, "receiver_id": receiver_id, "receiver_name": receiver_name, "gift_id": gift_id, "gift_count": gift_count, "gift_name": gift_name } path = "/tecent/information/big_gift" data = RequestApi.post_body_request_http(path=path, body=json.dumps(body), headers={}, host=cls.Host) print data print cls.Host result = json.loads(data) print result.get("status_code") if result.get("status_code") == 200: return 200 elif result.get("status_code") == 400: logging.error("send big gift message to mq error") return 400 @classmethod def send_charge_info_message(cls, user_id, user_name, money): body = { "user_id": user_id, "user_name": user_name, "money": money } path = "/tecent/information/charge" data = RequestApi.post_body_request_http(path=path, body=json.dumps(body), headers={}, host=cls.Host) print data print cls.Host result = json.loads(data) print result.get("status_code") if result.get("status_code") == 200: return 200 elif result.get("status_code") == 400: logging.error("send charge info message to mq error") return 400 @classmethod def send_video_auth_info_message(cls, user_id, user_name): body = { "user_id": user_id, "user_name": user_name, } path = "/tecent/information/video_auth" data = RequestApi.post_body_request_http(path=path, body=json.dumps(body), headers={}, host=cls.Host) print data print cls.Host result = json.loads(data) print result.get("status_code") if result.get("status_code") == 200: return 200 elif result.get("status_code") == 400: logging.error("send video auth info message to mq error") return 400 @classmethod def send_activity_info_message(cls, user_id, user_name, desc): body = { "user_id": user_id, "user_name": user_name, "desc": desc } path = "/tecent/information/activity" data = RequestApi.post_body_request_http(path=path, body=json.dumps(body), headers={}, host=cls.Host) print data print cls.Host result = json.loads(data) print result.get("status_code") if result.get("status_code") == 200: return 200 elif result.get("status_code") == 400: logging.error("send activity info message to mq error") return 400 @classmethod def send_withdraw_info_message(cls, user_id, user_name, money): body = { "user_id": user_id, "user_name": user_name, "money": money, } path = "/tecent/information/withdraw" data = RequestApi.post_body_request_http(path=path, body=json.dumps(body), headers={}, host=cls.Host) print data result = json.loads(data) print result.get("status_code") if result.get("status_code") == 200: return 200 elif result.get("status_code") == 400: logging.error("send withdraw info message to mq error") return 400 @classmethod def send_porn_check(cls, file_id, pic_url, room_id, user_id, join_id, room_user_id): body = { "file_id": file_id, "pic_url": pic_url, "room_id": room_id, "user_id": user_id, "join_id": join_id, "room_user_id": room_user_id } path = "/audit/porn_check" data = RequestApi.post_body_request_http(path=path, body=json.dumps(body), headers={}, host=cls.Host) print data result = json.loads(data) print result.get("status_code") if result.get("status_code") == 200: return 200 elif result.get("status_code") == 400: logging.error("send porn_check message to mq error") return 400 @classmethod def send_picture_detect(cls, pic_url="", user_id=0, pic_channel=0, source=0, obj_id=None, pic_type=1): if source == 1: body = { "pic_url": pic_url, "user_id": user_id, "pic_channel": pic_channel, "source": source } elif source == 2: # 2: 社区动态 图片 body = { "obj_id": obj_id, "source": source } elif source == 3: # 3:个人相册 body = { "pic_urls": pic_url, # 多个用逗号分隔 "source": source, "user_id": user_id, "pic_type": pic_type } elif source == 4: # 4:聊天图片鉴定 body = { "pic_url": pic_url, "source": source, "obj_id": obj_id } else: return 400 path = "/audit/pic_check" data = RequestApi.post_body_request_http(path=path, body=json.dumps(body), headers={}, host=cls.Host) print data result = json.loads(data) print result.get("status_code") if result.get("status_code") == 200: return 200 elif result.get("status_code") == 400: logging.error("send pic_check message to mq error") return 400 @classmethod def send_text_check(cls, text, user_id, text_channel, ip): body = { "text": text, "user_id": user_id, "text_channel": text_channel, "ip": ip } path = "/audit/text_check" data = RequestApi.post_body_request_http(path=path, body=json.dumps(body), headers={}, host=cls.Host) print data result = json.loads(data) print result.get("status_code") if result.get("status_code") == 200: return 200 elif result.get("status_code") == 400: logging.error("send text_check message to mq error") return 400 @classmethod def send_about_me_message(cls, user_id): body = {} body["user_id"] = user_id path = "/tecent/about_me" data = RequestApi.post_body_request_http(path=path, body=json.dumps(body), headers={}, host=cls.Host) result = json.loads(data) print result.get("status_code") if result.get("status_code") == 200: return 200 elif result.get("status_code") == 400: logging.error("send about me message to mq error") return 400 @classmethod def send_return_tool(cls, from_id, to_id, close_type): body = {} body["from_id"] = from_id body["to_id"] = to_id body["close_type"] = close_type path = "/tecent/return_tool" print close_type, "=======================cloase_type" data = RequestApi.post_body_request_http(path=path, body=json.dumps(body), headers={}, host=cls.Host) result = json.loads(data) if result.get("status_code") == 200: return 200 elif result.get("status_code") == 400: logging.error("send_return_tool to mq error") return 400
35.127036
111
0.567507
1,314
10,784
4.447489
0.081431
0.067762
0.112936
0.143053
0.782341
0.717488
0.707906
0.688741
0.688741
0.661875
0
0.027291
0.317044
10,784
306
112
35.24183
0.766191
0.004544
0
0.65343
0
0
0.164772
0.020224
0
0
0
0
0
0
null
null
0
0.01444
null
null
0.101083
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
4
89cbe2ee72c2c03a0b7605890ff21ac80b70ac5e
92
py
Python
HelloWorld/__init__.py
ulshi/passwdGen
201ced603c0176fb497dca193e5dea293ec3dcb7
[ "Apache-2.0" ]
null
null
null
HelloWorld/__init__.py
ulshi/passwdGen
201ced603c0176fb497dca193e5dea293ec3dcb7
[ "Apache-2.0" ]
null
null
null
HelloWorld/__init__.py
ulshi/passwdGen
201ced603c0176fb497dca193e5dea293ec3dcb7
[ "Apache-2.0" ]
null
null
null
# 在与 settings.py 同级目录下的 __init__.py 中引入模块和进行配置 import pymysql pymysql.install_as_MySQLdb()
30.666667
47
0.826087
13
92
5.384615
0.846154
0
0
0
0
0
0
0
0
0
0
0
0.108696
92
3
48
30.666667
0.853659
0.478261
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
d607748ece0379a7d889e125bef45bf61b2d0fbf
213
py
Python
squirrel/docker/squirrel/nuts_manager/modules/wordpress-mysql/__manifest__.py
guadaltech/kubernetes-containers-tools
5d4d9da6bf95162404b927cf23178d86dd99dd85
[ "Apache-2.0" ]
6
2019-07-16T22:10:30.000Z
2021-12-27T09:19:49.000Z
squirrel/docker/squirrel/nuts_manager/modules/wordpress-mysql/__manifest__.py
guadaltech/kubernetes-containers-tools
5d4d9da6bf95162404b927cf23178d86dd99dd85
[ "Apache-2.0" ]
2
2021-04-30T21:26:44.000Z
2021-06-02T02:52:11.000Z
squirrel/docker/squirrel/nuts_manager/modules/wordpress-mysql/__manifest__.py
guadaltech/kubernetes-containers-tools
5d4d9da6bf95162404b927cf23178d86dd99dd85
[ "Apache-2.0" ]
5
2019-12-05T17:50:44.000Z
2020-12-21T13:43:59.000Z
{ "name": "Module Wordpess Mysql", "author": "Tedezed", "version": "0.1", "frontend": "wordpress", "backend": "mysql", "check_app": True, "update_app_password": True, "update_secret": True, "executable": False, }
17.75
32
0.666667
25
213
5.52
0.8
0.144928
0
0
0
0
0
0
0
0
0
0.010471
0.103286
213
11
33
19.363636
0.712042
0
0
0
0
0
0.600939
0
0
0
0
0
0
1
0
true
0.090909
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
4
d61370eea198271d687834642156bebb7f4b87c4
5,287
py
Python
ooobuild/csslo/task/__init__.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
ooobuild/csslo/task/__init__.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
ooobuild/csslo/task/__init__.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # # Copyright 2022 :Barry-Thomas-Paul: Moss # # 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 ...lo.task.async_job import AsyncJob as AsyncJob from ...lo.task.classified_interaction_request import ClassifiedInteractionRequest as ClassifiedInteractionRequest from ...lo.task.document_ms_password_request import DocumentMSPasswordRequest as DocumentMSPasswordRequest from ...lo.task.document_ms_password_request2 import DocumentMSPasswordRequest2 as DocumentMSPasswordRequest2 from ...lo.task.document_macro_confirmation_request import DocumentMacroConfirmationRequest as DocumentMacroConfirmationRequest from ...lo.task.document_password_request import DocumentPasswordRequest as DocumentPasswordRequest from ...lo.task.document_password_request2 import DocumentPasswordRequest2 as DocumentPasswordRequest2 from ...lo.task.error_code_io_exception import ErrorCodeIOException as ErrorCodeIOException from ...lo.task.error_code_request import ErrorCodeRequest as ErrorCodeRequest from ...lo.task.interaction_classification import InteractionClassification as InteractionClassification from ...lo.task.interaction_handler import InteractionHandler as InteractionHandler from ...lo.task.interaction_request_string_resolver import InteractionRequestStringResolver as InteractionRequestStringResolver from ...lo.task.job import Job as Job from ...lo.task.job_executor import JobExecutor as JobExecutor from ...lo.task.master_password_request import MasterPasswordRequest as MasterPasswordRequest from ...lo.task.no_master_exception import NoMasterException as NoMasterException from ...lo.task.office_restart_manager import OfficeRestartManager as OfficeRestartManager from ...lo.task.pdf_export_exception import PDFExportException as PDFExportException from ...lo.task.password_container import PasswordContainer as PasswordContainer from ...lo.task.password_container_interaction_handler import PasswordContainerInteractionHandler as PasswordContainerInteractionHandler from ...lo.task.password_request import PasswordRequest as PasswordRequest from ...lo.task.password_request_mode import PasswordRequestMode as PasswordRequestMode from ...lo.task.status_indicator_factory import StatusIndicatorFactory as StatusIndicatorFactory from ...lo.task.unsupported_overwrite_request import UnsupportedOverwriteRequest as UnsupportedOverwriteRequest from ...lo.task.url_record import UrlRecord as UrlRecord from ...lo.task.user_record import UserRecord as UserRecord from ...lo.task.x_abort_channel import XAbortChannel as XAbortChannel from ...lo.task.x_async_job import XAsyncJob as XAsyncJob from ...lo.task.x_interaction_abort import XInteractionAbort as XInteractionAbort from ...lo.task.x_interaction_approve import XInteractionApprove as XInteractionApprove from ...lo.task.x_interaction_ask_later import XInteractionAskLater as XInteractionAskLater from ...lo.task.x_interaction_continuation import XInteractionContinuation as XInteractionContinuation from ...lo.task.x_interaction_disapprove import XInteractionDisapprove as XInteractionDisapprove from ...lo.task.x_interaction_handler import XInteractionHandler as XInteractionHandler from ...lo.task.x_interaction_handler2 import XInteractionHandler2 as XInteractionHandler2 from ...lo.task.x_interaction_password import XInteractionPassword as XInteractionPassword from ...lo.task.x_interaction_password2 import XInteractionPassword2 as XInteractionPassword2 from ...lo.task.x_interaction_request import XInteractionRequest as XInteractionRequest from ...lo.task.x_interaction_request_string_resolver import XInteractionRequestStringResolver as XInteractionRequestStringResolver from ...lo.task.x_interaction_retry import XInteractionRetry as XInteractionRetry from ...lo.task.x_job import XJob as XJob from ...lo.task.x_job_executor import XJobExecutor as XJobExecutor from ...lo.task.x_job_listener import XJobListener as XJobListener from ...lo.task.x_master_password_handling import XMasterPasswordHandling as XMasterPasswordHandling from ...lo.task.x_master_password_handling2 import XMasterPasswordHandling2 as XMasterPasswordHandling2 from ...lo.task.x_password_container import XPasswordContainer as XPasswordContainer from ...lo.task.x_password_container2 import XPasswordContainer2 as XPasswordContainer2 from ...lo.task.x_restart_manager import XRestartManager as XRestartManager from ...lo.task.x_status_indicator import XStatusIndicator as XStatusIndicator from ...lo.task.x_status_indicator_factory import XStatusIndicatorFactory as XStatusIndicatorFactory from ...lo.task.x_status_indicator_supplier import XStatusIndicatorSupplier as XStatusIndicatorSupplier from ...lo.task.x_url_container import XUrlContainer as XUrlContainer from ...lo.task.the_job_executor import theJobExecutor as theJobExecutor
75.528571
136
0.861169
627
5,287
7.089314
0.282297
0.071541
0.119235
0.064342
0.178628
0.054443
0
0
0
0
0
0.005552
0.080197
5,287
69
137
76.623188
0.908493
0.108946
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.283019
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
0
0
0
0
null
0
0
0
0
0
0
1
1
1
0
1
0
0
4
d6389165a96e0f331350e4ae53fc36f1a2b31f02
2,609
py
Python
src/junk/junk/keras.py
spil3141/Reseach-2-Malware-Detection-using-1D-CNN-and-RNN
8452a723d19d304fe5469dc8b89af194d25cb8b0
[ "MIT" ]
1
2021-02-23T05:01:56.000Z
2021-02-23T05:01:56.000Z
src/junk/junk/keras.py
spil3141/Reseach-2-Malware-Detection-using-1D-CNN-and-RNN
8452a723d19d304fe5469dc8b89af194d25cb8b0
[ "MIT" ]
null
null
null
src/junk/junk/keras.py
spil3141/Reseach-2-Malware-Detection-using-1D-CNN-and-RNN
8452a723d19d304fe5469dc8b89af194d25cb8b0
[ "MIT" ]
null
null
null
# 텐서플로와 텐서플로 데이터셋 패키지 가져오기 #!pip install tensorflow-gpu==2.0.0-rc1 import tensorflow_datasets as tfds import tensorflow as tf #tfds.disable_progress_bar() import os #print(tf.config.list_physical_devices('GPU')) print(tf.test.is_gpu_available()) # #datasets, info = tfds.load(name='mnist', with_info=True, as_supervised=True) # #mnist_train, mnist_test = datasets['train'], datasets['test'] # #"""## 분산 전략 정의하기 # #분산과 관련된 처리를 하는 `MirroredStrategy` 객체를 만듭니다. 이 객체가 컨텍스트 관리자(`tf.distribute.MirroredStrategy.scope`)도 제공하는데, 이 안에서 모델을 만들어야 합니다. #""" # # # #print('장치의 수: {}'.format(strategy.num_replicas_in_sync)) # # ## 데이터셋 내 샘플의 수는 info.splits.total_num_examples 로도 ## 얻을 수 있습니다. # #num_train_examples = info.splits['train'].num_examples #num_test_examples = info.splits['test'].num_examples # #BUFFER_SIZE = 10000 # #BATCH_SIZE_PER_REPLICA = 64 #BATCH_SIZE = BATCH_SIZE_PER_REPLICA * strategy.num_replicas_in_sync # # #def scale(image, label): # image = tf.cast(image, tf.float32) # image /= 255 # # return image, label # # #train_dataset = mnist_train.map(scale).shuffle(BUFFER_SIZE).batch(BATCH_SIZE) #eval_dataset = mnist_test.map(scale).batch(BATCH_SIZE) # #strategy = tf.distribute.MirroredStrategy() # #with strategy.scope(): # model = tf.keras.Sequential([ # tf.keras.layers.Conv2D(32, 3, activation='relu', input_shape=(28, 28, 1)), # tf.keras.layers.MaxPooling2D(), # tf.keras.layers.Flatten(), # tf.keras.layers.Dense(64, activation='relu'), # tf.keras.layers.Dense(10, activation='softmax') # ]) # #model.compile(loss='sparse_categorical_crossentropy', # optimizer=tf.keras.optimizers.Adam(), # metrics=['accuracy']) # # # ## 체크포인트를 저장할 체크포인트 디렉터리를 지정합니다. #checkpoint_dir = './training_checkpoints' ## 체크포인트 파일의 이름 #checkpoint_prefix = os.path.join(checkpoint_dir, "ckpt_{epoch}") # ## 학습률을 점점 줄이기 위한 함수 ## 필요한 함수를 직접 정의하여 사용할 수 있습니다. #def decay(epoch): # if epoch < 3: # return 1e-3 # elif epoch >= 3 and epoch < 7: # return 1e-4 # else: # return 1e-5 # ## 에포크가 끝날 때마다 학습률을 출력하는 콜백. #class PrintLR(tf.keras.callbacks.Callback): # def on_epoch_end(self, epoch, logs=None): # print('\n에포크 {}의 학습률은 {}입니다.'.format(epoch + 1, # model.optimizer.lr.numpy())) # #callbacks = [ # tf.keras.callbacks.TensorBoard(log_dir='./logs'), # tf.keras.callbacks.ModelCheckpoint(filepath=checkpoint_prefix, # save_weights_only=True), # tf.keras.callbacks.LearningRateScheduler(decay), # PrintLR() #] # #model.fit(train_dataset, epochs=12)
27.177083
127
0.674205
356
2,609
4.786517
0.530899
0.045188
0.038146
0.024648
0.029343
0
0
0
0
0
0
0.019391
0.169797
2,609
95
128
27.463158
0.767313
0.88808
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.75
0
0.75
0.25
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
d64b984e366e205ba66486e3a812c86ab7956da0
47
py
Python
packages/expat.py
mhutch/bockbuild
0d989e2d0259d17d41a195f8d28b3844a4652e7b
[ "MIT" ]
null
null
null
packages/expat.py
mhutch/bockbuild
0d989e2d0259d17d41a195f8d28b3844a4652e7b
[ "MIT" ]
null
null
null
packages/expat.py
mhutch/bockbuild
0d989e2d0259d17d41a195f8d28b3844a4652e7b
[ "MIT" ]
null
null
null
SourceForgePackage ('expat', 'expat', '2.0.1')
23.5
46
0.659574
6
47
5.166667
0.833333
0
0
0
0
0
0
0
0
0
0
0.069767
0.085106
47
1
47
47
0.651163
0
0
0
0
0
0.319149
0
0
0
0
0
0
1
0
true
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
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
d6500eb338dc5cb76e072ccb0bb0ca5705ca4ad4
112
py
Python
selenium/temp.py
InfiniteRandomVariable/hello-world
6ca4e2f4319c45d5d05b5719f0390f7cb16cca6e
[ "Apache-2.0" ]
null
null
null
selenium/temp.py
InfiniteRandomVariable/hello-world
6ca4e2f4319c45d5d05b5719f0390f7cb16cca6e
[ "Apache-2.0" ]
null
null
null
selenium/temp.py
InfiniteRandomVariable/hello-world
6ca4e2f4319c45d5d05b5719f0390f7cb16cca6e
[ "Apache-2.0" ]
null
null
null
def greet(name): print "Hello, {0}!".format(name) print "What's your name?" name = raw_input() greet(name)
16
36
0.651786
18
112
4
0.666667
0.25
0
0
0
0
0
0
0
0
0
0.010638
0.160714
112
6
37
18.666667
0.755319
0
0
0
0
0
0.252252
0
0
0
0
0
0
0
null
null
0
0
null
null
0.4
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
4
c3c4e9ff7407b2ebb1f6035508d86590703134e7
305
py
Python
ex026.py
vinisantos7/PythonExercicios
bc8f38e03a606d6b0216632a93affeab0792e534
[ "MIT" ]
2
2021-11-04T21:09:11.000Z
2021-11-08T09:42:10.000Z
ex026.py
vinisantos7/PythonExercicios
bc8f38e03a606d6b0216632a93affeab0792e534
[ "MIT" ]
null
null
null
ex026.py
vinisantos7/PythonExercicios
bc8f38e03a606d6b0216632a93affeab0792e534
[ "MIT" ]
null
null
null
print("Primeira e Última String\n") frase = str(input("Digite a frase: ")).strip().upper() print("A letra A aparece {} vezes na frase\n".format(frase.count('A'))) print(f"A primeira letra A aparece na posição: {frase.find('A')+1}\n") print(f"A última letra A aparece na posição: {frase.rfind('A')+1}\n")
43.571429
71
0.681967
55
305
3.781818
0.436364
0.086538
0.1875
0.144231
0.259615
0.259615
0
0
0
0
0
0.007407
0.114754
305
7
72
43.571429
0.762963
0
0
0
0
0
0.650327
0.140523
0
0
0
0
0
1
0
false
0
0
0
0
0.8
0
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
1
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
c3d0c78a7c29bd77c729dcac6a45499ed1197b7d
728
py
Python
ex7/projectData.py
cyberbaker/CSML
c2adad5e796fa12b5afcfafd5fd1b51f642ce730
[ "MIT" ]
null
null
null
ex7/projectData.py
cyberbaker/CSML
c2adad5e796fa12b5afcfafd5fd1b51f642ce730
[ "MIT" ]
null
null
null
ex7/projectData.py
cyberbaker/CSML
c2adad5e796fa12b5afcfafd5fd1b51f642ce730
[ "MIT" ]
null
null
null
def projectData(X, U, K): """computes the projection of the normalized inputs X into the reduced dimensional space spanned by the first K columns of U. It returns the projected examples in Z. """ # ====================== YOUR CODE HERE ====================== # Instructions: Compute the projection of the data using only the top K # eigenvectors in U (first K columns). # For the i-th example X(i,:), the projection on to the k-th # eigenvector is given as follows: # x = X(i, :)' # projection_k = x' * U(:, k) # # ============================================================= return Z
33.090909
78
0.467033
83
728
4.084337
0.566265
0.115044
0.017699
0.106195
0
0
0
0
0
0
0
0
0.324176
728
21
79
34.666667
0.689024
0.832418
0
0
0
0
0
0
0
0
0
0.047619
0
1
0.5
false
0
0
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
1
0
0
1
0
0
0
0
1
0
0
4
c3e008dc087db998e50eb035bd402e923c1e3007
257
py
Python
notebooks/tests/test_requirements.py
jagin/opencv-notebooks
f808a46065a9cdff639e4564f41183cb93051db3
[ "MIT" ]
6
2019-08-29T08:34:18.000Z
2021-05-24T16:33:59.000Z
notebooks/tests/test_requirements.py
jagin/opencv-notebooks
f808a46065a9cdff639e4564f41183cb93051db3
[ "MIT" ]
null
null
null
notebooks/tests/test_requirements.py
jagin/opencv-notebooks
f808a46065a9cdff639e4564f41183cb93051db3
[ "MIT" ]
1
2019-10-26T06:02:14.000Z
2019-10-26T06:02:14.000Z
import cv2 import matplotlib import jupyter def test_opencv_version(): assert cv2.__version__ == '3.4.5' def test_matplotlib_version(): assert matplotlib.__version__ == '3.0.2' def test_jupyter_version(): assert jupyter.__version__ == '1.0.0'
21.416667
44
0.735409
36
257
4.75
0.416667
0.122807
0
0
0
0
0
0
0
0
0
0.050228
0.14786
257
12
45
21.416667
0.730594
0
0
0
0
0
0.05814
0
0
0
0
0
0.333333
1
0.333333
true
0
0.333333
0
0.666667
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
1
0
1
0
0
4
c3e3366300ae1b36c624572f8f26ccfbb49f1a01
104
py
Python
test.py
haliphax/supybot-dropboxwatch
b56289a93ccb385943835ee412d2fd844c72db03
[ "MIT" ]
2
2019-04-12T17:18:29.000Z
2021-06-10T14:07:05.000Z
test.py
haliphax/supybot-dropboxwatch
b56289a93ccb385943835ee412d2fd844c72db03
[ "MIT" ]
3
2019-04-12T17:03:00.000Z
2019-04-17T13:54:50.000Z
test.py
haliphax/supybot-dropboxwatch
b56289a93ccb385943835ee412d2fd844c72db03
[ "MIT" ]
null
null
null
from supybot.test import * class DropboxWatchTestCase(PluginTestCase): plugins = ('DropboxWatch',)
20.8
43
0.759615
9
104
8.777778
1
0
0
0
0
0
0
0
0
0
0
0
0.134615
104
4
44
26
0.877778
0
0
0
0
0
0.115385
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
c3f33fc2152f638ffad3c23722a191fce603fd6c
148
py
Python
lib/procedures/__init__.py
shashank3959/Model-Distillation
d314c0b49fbb54eba05e947b20372e8fb3c7e13d
[ "MIT" ]
null
null
null
lib/procedures/__init__.py
shashank3959/Model-Distillation
d314c0b49fbb54eba05e947b20372e8fb3c7e13d
[ "MIT" ]
null
null
null
lib/procedures/__init__.py
shashank3959/Model-Distillation
d314c0b49fbb54eba05e947b20372e8fb3c7e13d
[ "MIT" ]
null
null
null
from .starts import prepare_seed, prepare_logger, get_machine_info, save_checkpoint, copy_checkpoint from .optimizers import get_optim_scheduler
74
104
0.858108
20
148
5.95
0.75
0
0
0
0
0
0
0
0
0
0
0
0.101351
148
2
105
74
0.894737
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
c3f7c5cadf611c7a5b87f9a27c850825f92d139e
137
py
Python
src/Client/SystemTools/ChangeLanguage/changeLanguage.py
Sniper970119/MemoryAssistInPython
434efd09edbda7919a3f754374add7f34912fab7
[ "MIT" ]
19
2019-02-11T01:39:32.000Z
2022-03-05T05:14:34.000Z
src/Client/SystemTools/ChangeLanguage/changeLanguage.py
Sniper970119/MemoryAssistInPython
434efd09edbda7919a3f754374add7f34912fab7
[ "MIT" ]
1
2020-02-04T15:20:04.000Z
2020-06-04T05:02:06.000Z
src/Client/SystemTools/ChangeLanguage/changeLanguage.py
Sniper970119/MemoryAssistInPython
434efd09edbda7919a3f754374add7f34912fab7
[ "MIT" ]
5
2019-04-20T07:23:25.000Z
2021-03-24T03:13:01.000Z
# -*- coding:utf-8 -*- from src.Client.Conf.config import * class ChangeLanguage(): def change(self, languageType): pass
13.7
36
0.635036
16
137
5.4375
1
0
0
0
0
0
0
0
0
0
0
0.009346
0.218978
137
9
37
15.222222
0.803738
0.145985
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0.25
0.25
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
4
7f180f5e5a2cad63109387839b0acb7bae2a8894
90
py
Python
pkg/_details/packet.py
complyue/hbi
64ea5510f9313d4cb6af91a609393c856b8098c6
[ "BSD-3-Clause" ]
3
2016-03-03T15:32:07.000Z
2019-05-19T15:23:54.000Z
pkg/_details/packet.py
complyue/hbi
64ea5510f9313d4cb6af91a609393c856b8098c6
[ "BSD-3-Clause" ]
null
null
null
pkg/_details/packet.py
complyue/hbi
64ea5510f9313d4cb6af91a609393c856b8098c6
[ "BSD-3-Clause" ]
null
null
null
__all__ = ["PACK_HEADER_MAX"] # max scanned length of packet header PACK_HEADER_MAX = 60
18
37
0.766667
14
90
4.357143
0.642857
0.327869
0.42623
0
0
0
0
0
0
0
0
0.026316
0.155556
90
4
38
22.5
0.776316
0.388889
0
0
0
0
0.283019
0
0
0
0
0
0
1
0
false
0
0
0
0
0
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
6159ffaf43c165a9e085d362ec9dc64d1b9c3f39
184
py
Python
treyhunner/map.py
SiteReliabilityEngineering/PythonExercises
2d056a94c8e7e5f88c4abc2da6611e1acbaa2533
[ "MIT" ]
null
null
null
treyhunner/map.py
SiteReliabilityEngineering/PythonExercises
2d056a94c8e7e5f88c4abc2da6611e1acbaa2533
[ "MIT" ]
null
null
null
treyhunner/map.py
SiteReliabilityEngineering/PythonExercises
2d056a94c8e7e5f88c4abc2da6611e1acbaa2533
[ "MIT" ]
null
null
null
# """Make a function map that works the same way as the built-in map function:""" def square(n): return n * n def map(square, list1): return [ square(num) for num in list1 ]
23
80
0.657609
32
184
3.78125
0.59375
0
0
0
0
0
0
0
0
0
0
0.014085
0.228261
184
8
81
23
0.838028
0.396739
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
0
0
0.5
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
1
0
0
0
1
1
0
0
4
61687fe2cce6a1382e9cd256992629c4a48d6bc1
158
py
Python
Curso-python/aula008/Exerciocio8..py
Luis12368/python
23352d75ad13bcfd09ea85ab422fdc6ae1fcc5e7
[ "MIT" ]
1
2022-03-05T17:07:02.000Z
2022-03-05T17:07:02.000Z
Curso-python/aula008/Exerciocio8..py
Luis12368/python
23352d75ad13bcfd09ea85ab422fdc6ae1fcc5e7
[ "MIT" ]
null
null
null
Curso-python/aula008/Exerciocio8..py
Luis12368/python
23352d75ad13bcfd09ea85ab422fdc6ae1fcc5e7
[ "MIT" ]
null
null
null
q1 = float(input('Insira o valor de Q1: ')) q2 = float(input('Insira o valor de Q2: ')) d = float(input('Insira o valor de D: ')) print(9000000000*q1*q2/d**2)
39.5
43
0.651899
30
158
3.433333
0.4
0.291262
0.466019
0.495146
0.699029
0.699029
0
0
0
0
0
0.126866
0.151899
158
4
44
39.5
0.641791
0
0
0
0
0
0.408805
0
0
0
0
0
0
1
0
false
0
0
0
0
0.25
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
617093c76b79d98356c131e1e0ceb6dff912c46e
68
py
Python
starling_sim/basemodel/agent/stations/__init__.py
tellae/starling
56121c728eb5de3dfc77cdf08da89548f3315c87
[ "CECILL-B" ]
19
2021-02-16T12:32:22.000Z
2022-01-06T11:16:44.000Z
starling_sim/basemodel/agent/stations/__init__.py
tellae/starling
56121c728eb5de3dfc77cdf08da89548f3315c87
[ "CECILL-B" ]
20
2021-01-13T20:58:07.000Z
2022-03-21T15:53:07.000Z
starling_sim/basemodel/agent/stations/__init__.py
tellae/starling
56121c728eb5de3dfc77cdf08da89548f3315c87
[ "CECILL-B" ]
null
null
null
""" This package contains the modules related to station agents """
17
59
0.75
9
68
5.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.161765
68
3
60
22.666667
0.894737
0.867647
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
61723998c8c5d25d1fa0144b548fb95347d02ed2
2,732
py
Python
python/examples/demo_scratch.py
FumeauxG/mm-api
bb59e448562ff30349d7b1b831ee0db1465a9e6b
[ "MIT" ]
67
2015-03-27T17:30:34.000Z
2022-03-01T11:08:24.000Z
python/examples/demo_scratch.py
FumeauxG/mm-api
bb59e448562ff30349d7b1b831ee0db1465a9e6b
[ "MIT" ]
15
2015-03-17T07:46:58.000Z
2021-07-10T06:14:16.000Z
python/examples/demo_scratch.py
FumeauxG/mm-api
bb59e448562ff30349d7b1b831ee0db1465a9e6b
[ "MIT" ]
35
2015-03-16T15:32:46.000Z
2022-03-19T17:53:06.000Z
# short script examples. # Note that most of these use the SWIG-generated interface directly, # instead of the mm package import os import mmapi from mmRemote import * import mm from mm.mm_math import * from mm.convert import * import ctypes # initialize connection remote = mmRemote() remote.connect() #[RMS] this is how to flatten the current set of facegroups into 2D paths and write as SVG #cmd2 = mmapi.StoredCommands() #cmd2.AppendSceneCommand_ClearTarget(); #cmd2.AppendBeginToolCommand("select") #cmd2.AppendToolUtilityCommand("generateFlattenedSVGFromGroups", "C:/scratch/debug/") #remote.runCommand(cmd2) #[RMS] this is how to start up the volbrush and set the brush mode #cmd2 = mmapi.StoredCommands() #cmd2.AppendBeginToolCommand("volumeBrush") #cmd2.AppendToolUtilityCommand("setPrimary", "flatten") #remote.runCommand(cmd2) #[RMS] this is how to invert the selection #cmd2 = mmapi.StoredCommands() #cmd2.AppendSelectUtilityCommand("invert") #remote.runCommand(cmd2) #[RMS] this is how to change the normal and color modes #cmd2 = mmapi.StoredCommands() #cmd2.ViewControl_SetTriangleColorMode(0) #cmd2.ViewControl_SetSurfaceNormalMode(0) #remote.runCommand(cmd2) #[RMS] this is how to change object visibility #cmd2 = mmapi.StoredCommands() #obj_list = mm.list_objects(remote) #cmd2.AppendSceneCommand_SetHidden(obj_list[0]) #cmd2.AppendSceneCommand_SetVisible(obj_list[0]) #cmd2.AppendSceneCommand_ShowAll(); #remote.runCommand(cmd2) #[RMS] this is how to save a screenshot (will write to python\examples\screenshot.png) #cmd2 = mmapi.StoredCommands() #cmd2.AppendSceneCommand_SaveScreenShot(os.path.join( os.getcwd(), "screenshot.png" )) #remote.runCommand(cmd2) #[RMS] this is how to create a pivot and link it to an object in the scene #objects = mm.list_objects(remote) #f = mm.mmFrame() #f.origin = (1,0,0) #pivot_id = mm.create_pivot(remote, f) #link_ok = mm.link_pivot(remote, pivot_id, objects[0]) #cmd2 = mmapi.StoredCommands() #cmd2.AppendBeginToolCommand("select") #cmd2.ViewControl_TakeFocus(); #remote.runCommand(cmd2) #mm.begin_tool(remote, "volumeBrush") #mm.tool_utility_command(remote, "setPrimary", "drag") #mm.tool_utility_command(remote, "setSecondary", "bubbleSmooth") #mm.select_printer(remote, "replicator 2") #mm.begin_tool(remote, "remesh") #mm.set_toolparam(remote, "goalType", 2) # mmapi.mat3f param read/write #mm.begin_tool(remote, "transform"); #mat1 = to_mat3f( (0.36,0.48,-0.8, -0.8,0.6,0, 0.48,0.64,0.6) ) #mm.set_toolparam(remote, "rotation", mat1) #mat2 = mm.get_toolparam_mat3f(remote, "rotation") obj_list = mm.list_objects(remote) uuid = mm.get_object_uuid(remote, obj_list[0]) (found, id) = mm.find_object_by_uuid(remote, uuid) #done! remote.shutdown();
29.06383
90
0.764275
381
2,732
5.375328
0.364829
0.023926
0.030762
0.041016
0.28418
0.130859
0.105469
0.105469
0.039063
0
0
0.027313
0.102123
2,732
93
91
29.376344
0.807583
0.836384
0
0
1
0
0
0
0
0
0
0
0
1
0
false
0
0.538462
0
0.538462
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
1
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
61959fe5d1782424bb2d9a55318eda651193a116
134
py
Python
flowbee/models.py
blitzagency/flowbee
35e8977827eda34474aa5edc95bbfec86c61b33a
[ "MIT" ]
null
null
null
flowbee/models.py
blitzagency/flowbee
35e8977827eda34474aa5edc95bbfec86c61b33a
[ "MIT" ]
null
null
null
flowbee/models.py
blitzagency/flowbee
35e8977827eda34474aa5edc95bbfec86c61b33a
[ "MIT" ]
null
null
null
from collections import namedtuple TaskMeta = namedtuple("TaskMeta", ["task_token", "run_id", "workflow_id", "domain", "tasklist"])
26.8
96
0.731343
15
134
6.333333
0.8
0.378947
0
0
0
0
0
0
0
0
0
0
0.104478
134
4
97
33.5
0.791667
0
0
0
0
0
0.365672
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4