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
c224a4092ef855a5aaffef162322a02277bf1192
91
py
Python
tests/__init__.py
araghukas/nwlattice
443d0a000c2b68cd99070245eede032e912c1a40
[ "MIT" ]
1
2020-11-23T01:00:34.000Z
2020-11-23T01:00:34.000Z
tests/__init__.py
araghukas/nwlattice
443d0a000c2b68cd99070245eede032e912c1a40
[ "MIT" ]
null
null
null
tests/__init__.py
araghukas/nwlattice
443d0a000c2b68cd99070245eede032e912c1a40
[ "MIT" ]
null
null
null
# need this to identify `tests` as a package # otherwise can't run tests from command line
30.333333
45
0.758242
16
91
4.3125
0.9375
0
0
0
0
0
0
0
0
0
0
0
0.186813
91
2
46
45.5
0.932432
0.945055
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
dfbcd506a9a2128a5dec1238e09002009ec78cbf
38
py
Python
addition/addition.py
sridevimarudhachalamoorthy/team-nito
e0a77cc1b0e98cffaba64ece94cb1706baafb620
[ "MIT" ]
null
null
null
addition/addition.py
sridevimarudhachalamoorthy/team-nito
e0a77cc1b0e98cffaba64ece94cb1706baafb620
[ "MIT" ]
null
null
null
addition/addition.py
sridevimarudhachalamoorthy/team-nito
e0a77cc1b0e98cffaba64ece94cb1706baafb620
[ "MIT" ]
null
null
null
a=10 b=5 print(a+b) print("addition")
7.6
17
0.657895
9
38
2.777778
0.666667
0
0
0
0
0
0
0
0
0
0
0.088235
0.105263
38
4
18
9.5
0.647059
0
0
0
0
0
0.210526
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
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
0
1
0
4
5f0590778df5f614a0a05e44538d235bc033be39
156
py
Python
app/app/tests.py
gjpsiqueira/recipe-app-api
b22312a979b606fed09871729a297a840b0556b9
[ "MIT" ]
null
null
null
app/app/tests.py
gjpsiqueira/recipe-app-api
b22312a979b606fed09871729a297a840b0556b9
[ "MIT" ]
null
null
null
app/app/tests.py
gjpsiqueira/recipe-app-api
b22312a979b606fed09871729a297a840b0556b9
[ "MIT" ]
null
null
null
from django.test import TestCase from app.calc import add class CalcTests(TestCase): def test_add_numbers(self): self.assertEqual(add(3,8),11)
22.285714
37
0.737179
24
156
4.708333
0.708333
0
0
0
0
0
0
0
0
0
0
0.030769
0.166667
156
7
37
22.285714
0.838462
0
0
0
0
0
0
0
0
0
0
0
0.2
1
0.2
false
0
0.4
0
0.8
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
5f1253ab21e9b6e3d5f8e72343fc93803aaf71a8
230
py
Python
urban_proj/urban_assignment/exchange_rate/admin.py
Ab1gor/INR---USD-Currency-Predictor
4fc3a0029ae5f1af09a98714e3e26d1f8d07efa6
[ "Apache-2.0" ]
null
null
null
urban_proj/urban_assignment/exchange_rate/admin.py
Ab1gor/INR---USD-Currency-Predictor
4fc3a0029ae5f1af09a98714e3e26d1f8d07efa6
[ "Apache-2.0" ]
null
null
null
urban_proj/urban_assignment/exchange_rate/admin.py
Ab1gor/INR---USD-Currency-Predictor
4fc3a0029ae5f1af09a98714e3e26d1f8d07efa6
[ "Apache-2.0" ]
null
null
null
from django.contrib import admin from .models import INR_USD_ExchangeRate, Forecasted_INR_USD_ExchangeRate # Register your models here. models = ( INR_USD_ExchangeRate, Forecasted_INR_USD_ExchangeRate) admin.site.register(models)
38.333333
73
0.856522
31
230
6.032258
0.451613
0.128342
0.385027
0.299465
0.491979
0.491979
0.491979
0
0
0
0
0
0.086957
230
6
74
38.333333
0.890476
0.113043
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
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
5f1c1be9c59d0adbe734a3072c7efa4c0fb9f45c
783
py
Python
olaf/config/config.py
sylcastaing/Olaf-voice
869b68e3a5980c5a69e23d544213ad6eb818d04f
[ "MIT" ]
null
null
null
olaf/config/config.py
sylcastaing/Olaf-voice
869b68e3a5980c5a69e23d544213ad6eb818d04f
[ "MIT" ]
null
null
null
olaf/config/config.py
sylcastaing/Olaf-voice
869b68e3a5980c5a69e23d544213ad6eb818d04f
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import json class Config: def __init__(self): self.test = "aze" @property def bing_key(self): return self.getConfigFile()['keys']['bing'] @property def apiai_key(self): return self.getConfigFile()['keys']['APIAI'] @property def apiweather_key(self): return self.getConfigFile()['keys']['weather'] @property def lang(self): return self.getConfigFile()['params']['lang'] @property def city(self): return self.getConfigFile()['params']['city'] @property def days(self): return self.getConfigFile()['days'] @property def months(self): return self.getConfigFile()['months'] def getConfigFile(self): with open('./config.json') as data: return json.load(data)
19.097561
50
0.64751
94
783
5.319149
0.37234
0.154
0.196
0.378
0.336
0.204
0
0
0
0
0
0.001563
0.182631
783
41
51
19.097561
0.779688
0.05364
0
0.25
0
0
0.1
0
0
0
0
0
0
1
0.321429
false
0
0.035714
0.25
0.678571
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
1
0
0
0
4
5f2d2b8edb05e92ce7fa884ce3898e21a882398b
324
py
Python
api/models.py
kkampardi/TodoLIst
d5b03c7b163b61ac8ef613553817e698573a613f
[ "MIT" ]
2
2017-03-30T00:42:17.000Z
2018-12-04T13:39:41.000Z
api/models.py
kkampardi/TodoLIst
d5b03c7b163b61ac8ef613553817e698573a613f
[ "MIT" ]
null
null
null
api/models.py
kkampardi/TodoLIst
d5b03c7b163b61ac8ef613553817e698573a613f
[ "MIT" ]
null
null
null
from django.db import models # Create your models here. class TodoList(models.Model): name = models.CharField(max_length=255, blank=False, unique=True) created = models.DateTimeField(auto_now_add=True) modified = models.DateTimeField(auto_now=True) def __str__(self): return "{}".format(self.name)
29.454545
69
0.725309
43
324
5.27907
0.72093
0.167401
0.202643
0.229075
0
0
0
0
0
0
0
0.011029
0.160494
324
11
70
29.454545
0.823529
0.074074
0
0
0
0
0.006689
0
0
0
0
0
0
1
0.142857
false
0
0.142857
0.142857
1
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
1
0
0
4
5f2ff2acba7c0067581d932890387e1d5888d0c6
71
py
Python
intask_api/intask/__init__.py
KirovVerst/intask
4bdec6f49fa2873cca1354d7d3967973f5bcadc3
[ "MIT" ]
null
null
null
intask_api/intask/__init__.py
KirovVerst/intask
4bdec6f49fa2873cca1354d7d3967973f5bcadc3
[ "MIT" ]
7
2016-08-17T23:08:31.000Z
2022-03-02T02:23:08.000Z
intask_api/intask/__init__.py
KirovVerst/intask
4bdec6f49fa2873cca1354d7d3967973f5bcadc3
[ "MIT" ]
null
null
null
from intask.celeryapp import app as celery_app __all__ = [celery_app]
17.75
46
0.802817
11
71
4.636364
0.727273
0.352941
0
0
0
0
0
0
0
0
0
0
0.140845
71
3
47
23.666667
0.836066
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
a0a88b4e70b44d1eecd3d35160639868a3dbadde
888
py
Python
graph.py
bentenjamin/a-star
36f4e5c496c12e808ef765043a5735914fe537d0
[ "MIT" ]
null
null
null
graph.py
bentenjamin/a-star
36f4e5c496c12e808ef765043a5735914fe537d0
[ "MIT" ]
null
null
null
graph.py
bentenjamin/a-star
36f4e5c496c12e808ef765043a5735914fe537d0
[ "MIT" ]
null
null
null
class Vertex: def __init__(self, node): self.id = node self.cons = {} def add_con(self, con, weight): self.cons[con] = weight def get_cons(self): return self.cons.keys() def get_id(self): return self.id def get_weight(self, con): return self.cons[con] class Graph: def __init__(self): self.verticies = {} def add_vertex(self, node): self.verticies[node] = Vertex(node) return self.verticies[node] def add_edge(self, frm, to, weight): if frm not in self.verticies: self.add_edge(frm) if to not in self.verticies: self.add_edge(to) self.verticies[frm].add_con(self.verticies[to], weight) self.verticies[to].add_con(self.verticies[frm], weight) def get_verticies(self): return self.verticies.keys()
24.666667
63
0.588964
119
888
4.235294
0.184874
0.257937
0.059524
0.071429
0.115079
0.115079
0.115079
0
0
0
0
0
0.296171
888
36
64
24.666667
0.8064
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0
0.148148
0.592593
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
1
0
0
0
1
1
0
0
4
2613a8cc9e402a1acf5ddfe46cc176bca81cb88d
139
py
Python
python/pressure.py
mrichar1/wemos
b6a4196208055e586a9a7b5b11a5286fe62ba84e
[ "MIT" ]
null
null
null
python/pressure.py
mrichar1/wemos
b6a4196208055e586a9a7b5b11a5286fe62ba84e
[ "MIT" ]
null
null
null
python/pressure.py
mrichar1/wemos
b6a4196208055e586a9a7b5b11a5286fe62ba84e
[ "MIT" ]
null
null
null
from bmp180 import BMP180 from machine import I2C, Pin bus = I2C(scl=Pin(5), sda=Pin(4), freq=100000) # on esp8266 bmp180 = BMP180(bus)
27.8
62
0.71223
24
139
4.125
0.625
0
0
0
0
0
0
0
0
0
0
0.224138
0.165468
139
4
63
34.75
0.62931
0.071942
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
264ba91ee44aa0c9de1c5942200139b2313fccb5
1,349
py
Python
tests/boilerplate_client/exception/errors.py
ixje/app-neo3
079b178017684958cdf66fdf144f317ea37d65ae
[ "MIT" ]
null
null
null
tests/boilerplate_client/exception/errors.py
ixje/app-neo3
079b178017684958cdf66fdf144f317ea37d65ae
[ "MIT" ]
5
2021-09-13T16:41:52.000Z
2022-01-12T16:00:21.000Z
tests/boilerplate_client/exception/errors.py
ixje/app-neo3
079b178017684958cdf66fdf144f317ea37d65ae
[ "MIT" ]
3
2021-09-01T11:40:09.000Z
2022-03-06T06:45:13.000Z
class UnknownDeviceError(Exception): pass class DenyError(Exception): pass class WrongP1P2Error(Exception): pass class WrongDataLengthError(Exception): pass class InsNotSupportedError(Exception): pass class ClaNotSupportedError(Exception): pass class WrongResponseLengthError(Exception): pass class DisplayAddressFailError(Exception): pass class DisplayAmountFailError(Exception): pass class WrongTxLengthError(Exception): pass class TxParsingFailError(Exception): pass class TxHashFail(Exception): pass class BadStateError(Exception): pass class SignatureFailError(Exception): pass class TxRejectSignError(Exception): pass class BIP44BadPurposeError(Exception): pass class BIP44BadCoinTypeError(Exception): pass class BIP44BadAccountNotHardenedError(Exception): pass class BIP44BadAccountError(Exception): pass class BIP44BadBadChangeError(Exception): pass class BIP44BadAddressError(Exception): pass class MagicParsingError(Exception): pass class DisplaySystemFeeFailError(Exception): pass class DisplayNetworkFeeFailError(Exception): pass class DisplayTotalFeeFailError(Exception): pass class DisplayTransferAmountError(Exception): pass class ConvertToAddressFailError(Exception): pass
12.607477
49
0.761305
108
1,349
9.509259
0.277778
0.341772
0.455696
0
0
0
0
0
0
0
0
0.012635
0.178651
1,349
106
50
12.726415
0.91426
0
0
0.5
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
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
1
1
0
0
0
0
0
4
2681db732835083f3bf7ba9a0f73764d721a6061
604
py
Python
core/memory.py
KanishkNavale/Robot-Physics-Engine
84e118547d2a59b37f6084265a045eeca8206e5f
[ "BSD-3-Clause" ]
null
null
null
core/memory.py
KanishkNavale/Robot-Physics-Engine
84e118547d2a59b37f6084265a045eeca8206e5f
[ "BSD-3-Clause" ]
1
2021-11-23T17:26:39.000Z
2022-01-01T12:39:56.000Z
core/memory.py
KanishkNavale/Pinocchio-Based-Robot-Solver
84e118547d2a59b37f6084265a045eeca8206e5f
[ "BSD-3-Clause" ]
null
null
null
############################################################################# # DEVELOPED BY KANISHK ############# # THIS SCRIPT CONTAINS GLOBAL MEMORY ############# ############################################################################# # Library Imports import numpy as np ############################################################################# # GLOBAL MEMORY ############# ############################################################################# pose = np.zeros(3)
46.461538
77
0.167219
20
604
5.05
0.85
0.237624
0
0
0
0
0
0
0
0
0
0.002193
0.245033
604
12
78
50.333333
0.219298
0.256623
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
2683383594e1bac9f748408be7cf1c060c7cfe14
146
py
Python
modules/python3/data/scripts/ivw_numpy/image_utils.py
ImagiaViz/inviwo
a00bb6b0551bc1cf26dc0366c827c1a557a9603d
[ "BSD-2-Clause" ]
349
2015-01-30T09:21:52.000Z
2022-03-25T03:10:02.000Z
modules/python3/data/scripts/ivw_numpy/image_utils.py
liu3xing3long/inviwo
69cca9b6ecd58037bda0ed9e6f53d02f189f19a7
[ "BSD-2-Clause" ]
641
2015-09-23T08:54:06.000Z
2022-03-23T09:50:55.000Z
modules/python3/data/scripts/ivw_numpy/image_utils.py
liu3xing3long/inviwo
69cca9b6ecd58037bda0ed9e6f53d02f189f19a7
[ "BSD-2-Clause" ]
124
2015-02-27T23:45:02.000Z
2022-02-21T09:37:14.000Z
import numpy as np import scipy.misc def save(img,path): print(path) scipy.misc.toimage(np.rot90(img), cmin=0.0, cmax=...).save(path)
14.6
68
0.664384
25
146
3.88
0.64
0.185567
0
0
0
0
0
0
0
0
0
0.032787
0.164384
146
9
69
16.222222
0.762295
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0.4
0
0.6
0.2
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
cd707e8c7c0ebbb0b6b21cadcc0b5d403196d498
188
py
Python
quite/gui/interfaces/ability_interfaces/class_exec_interface.py
Wingsgo/PyQtGraphEmbedded
e1992606c7beacde6b24ea5c858ba26a800accdd
[ "MIT" ]
4
2019-04-08T04:13:33.000Z
2020-12-25T13:15:10.000Z
quite/gui/interfaces/ability_interfaces/class_exec_interface.py
Wingsgo/PyQtGraphEmbedded
e1992606c7beacde6b24ea5c858ba26a800accdd
[ "MIT" ]
2
2018-01-03T12:13:53.000Z
2018-05-03T08:05:52.000Z
quite/gui/interfaces/ability_interfaces/class_exec_interface.py
Wingsgo/PyQtGraphEmbedded
e1992606c7beacde6b24ea5c858ba26a800accdd
[ "MIT" ]
3
2018-01-03T11:29:57.000Z
2018-03-12T00:34:21.000Z
from .. import BaseInterface class ClassExecInterface(BaseInterface): def exec(self, *args): pass @classmethod def class_exec(cls, *args): cls(*args).exec()
17.090909
40
0.638298
20
188
5.95
0.6
0.117647
0
0
0
0
0
0
0
0
0
0
0.244681
188
10
41
18.8
0.838028
0
0
0
0
0
0
0
0
0
0
0
0
1
0.285714
false
0.142857
0.142857
0
0.571429
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
4
cd709a85216e1252402f42fdc83f98bd4d4260d8
227
py
Python
tamcolors/examples/connection_multi_player.py
cmcmarrow/tamcolors
65a5f2455bbe35a739b98d14af158c3df7feb786
[ "Apache-2.0" ]
29
2020-07-17T23:46:17.000Z
2022-02-06T05:36:44.000Z
tamcolors/examples/connection_multi_player.py
sudo-nikhil/tamcolors
65a5f2455bbe35a739b98d14af158c3df7feb786
[ "Apache-2.0" ]
42
2020-07-25T19:39:52.000Z
2021-02-24T01:19:58.000Z
tamcolors/examples/connection_multi_player.py
sudo-nikhil/tamcolors
65a5f2455bbe35a739b98d14af158c3df7feb786
[ "Apache-2.0" ]
8
2020-07-18T23:02:48.000Z
2020-12-30T04:07:35.000Z
from random import randint from tamcolors.utils.tcp import TCPConnection from tamcolors.tam_io.tcp_io import run_tcp_connection def run(): run_tcp_connection(TCPConnection(user_name=str(randint(0, 1000000000000000000))))
28.375
85
0.828194
32
227
5.65625
0.5625
0.143646
0.176796
0
0
0
0
0
0
0
0
0.097561
0.096916
227
7
86
32.428571
0.785366
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
true
0
0.6
0
0.8
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
cd89257aebf991a39b0ccf02c1ab27465502c788
263
py
Python
turbo/__init__.py
DaulPavid/pyturbo
878e0b1b514c043f1b4ea5cd5268b23c0df5192e
[ "MIT" ]
9
2018-10-17T17:02:05.000Z
2022-03-03T18:58:32.000Z
turbo/__init__.py
akshay230994/pyturbo
878e0b1b514c043f1b4ea5cd5268b23c0df5192e
[ "MIT" ]
2
2018-10-16T16:57:57.000Z
2020-04-14T13:34:40.000Z
turbo/__init__.py
akshay230994/pyturbo
878e0b1b514c043f1b4ea5cd5268b23c0df5192e
[ "MIT" ]
4
2019-12-23T18:42:29.000Z
2022-01-19T12:08:35.000Z
# # Simple Turbo Codes Implementation # from turbo.awgn import AWGN from turbo.rsc import RSC from turbo.trellis import Trellis from turbo.siso_decoder import SISODecoder from turbo.turbo_encoder import TurboEncoder from turbo.turbo_decoder import TurboDecoder
23.909091
44
0.840304
37
263
5.891892
0.405405
0.247706
0.12844
0
0
0
0
0
0
0
0
0
0.125475
263
10
45
26.3
0.947826
0.125475
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
26b227dc7d9e7a89644a99da8ab0a71243ed7c05
107
py
Python
socialplantplatform/social/apps.py
hamzabouissi/socialPlantPlatform
60606039a12f41a50970b4d17c4b39ba158c5019
[ "MIT" ]
null
null
null
socialplantplatform/social/apps.py
hamzabouissi/socialPlantPlatform
60606039a12f41a50970b4d17c4b39ba158c5019
[ "MIT" ]
null
null
null
socialplantplatform/social/apps.py
hamzabouissi/socialPlantPlatform
60606039a12f41a50970b4d17c4b39ba158c5019
[ "MIT" ]
null
null
null
from django.apps import AppConfig class SocialConfig(AppConfig): name = 'socialplantplatform.social'
17.833333
39
0.785047
11
107
7.636364
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.140187
107
5
40
21.4
0.913043
0
0
0
0
0
0.242991
0.242991
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
26b69f904227b2eef458a49f3197081ef34ec10d
1,056
py
Python
tests/step14_tests.py
svaningelgem/advent_of_code_2021
80351508d6d6953392bc57af20e1fac05ab3ec2a
[ "MIT" ]
null
null
null
tests/step14_tests.py
svaningelgem/advent_of_code_2021
80351508d6d6953392bc57af20e1fac05ab3ec2a
[ "MIT" ]
null
null
null
tests/step14_tests.py
svaningelgem/advent_of_code_2021
80351508d6d6953392bc57af20e1fac05ab3ec2a
[ "MIT" ]
null
null
null
from pathlib import Path from step14 import count_least_most_after_insertions TEST_INPUT = Path(__file__).parent / 'step14.txt' REAL_INPUT = Path(__file__).parent.parent / 'src/step14.txt' def test_step14(): assert count_least_most_after_insertions(TEST_INPUT, 0) == 1 # 'NNCB' assert count_least_most_after_insertions(TEST_INPUT, 1) == 1 # 'NCNBCHB' assert count_least_most_after_insertions(TEST_INPUT, 2) == 5 # 'NBCCNBBBCBHCB' assert count_least_most_after_insertions(TEST_INPUT, 3) == 7 # 'NBBBCNCCNBBNBNBBCHBHHBCHB' assert count_least_most_after_insertions(TEST_INPUT, 4) == 18 # 'NBBNBNBBCCNBCNCCNBBNBBNBBBNBBNBBCBHCBHHNHCBBCBHCB' assert count_least_most_after_insertions(TEST_INPUT, 10) == 1588 def test_step14_real_data(): assert count_least_most_after_insertions(REAL_INPUT, 10) == 2223 def test_step14_part2(): assert count_least_most_after_insertions(TEST_INPUT, 40) == 2188189693529 def test_step14_part2_real_data(): assert count_least_most_after_insertions(REAL_INPUT, 40) == 2566282754493
36.413793
120
0.788826
141
1,056
5.41844
0.283688
0.13089
0.183246
0.248691
0.589005
0.589005
0.589005
0.539267
0.136126
0.136126
0
0.074756
0.125947
1,056
28
121
37.714286
0.752979
0.106061
0
0
0
0
0.025586
0
0
0
0
0
0.529412
1
0.235294
false
0
0.117647
0
0.352941
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
1
0
1
0
0
0
0
0
0
0
4
26b8ab5f3a8fd88aa7d5c6c3c250e3ddd41e20a4
344
py
Python
accounts/models.py
sean-capper/chatter
5e4b3d8a8e5ae0aaa4ad82b8feaed4ad7fed6b6f
[ "MIT" ]
null
null
null
accounts/models.py
sean-capper/chatter
5e4b3d8a8e5ae0aaa4ad82b8feaed4ad7fed6b6f
[ "MIT" ]
null
null
null
accounts/models.py
sean-capper/chatter
5e4b3d8a8e5ae0aaa4ad82b8feaed4ad7fed6b6f
[ "MIT" ]
null
null
null
from django.contrib.auth.models import AbstractUser from django.db import models # Create your models here. class User(AbstractUser): user_id = models.AutoField(primary_key=True) username = models.CharField(max_length=10, unique=True) password = models.CharField(max_length=99) def __str__(self): return self.username
28.666667
59
0.752907
46
344
5.456522
0.652174
0.079681
0.143426
0.191235
0
0
0
0
0
0
0
0.013841
0.159884
344
12
60
28.666667
0.854671
0.069767
0
0
0
0
0
0
0
0
0
0
0
1
0.125
false
0.125
0.25
0.125
1
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
1
1
0
0
4
26d158835c001b4d13cae64008982d208905172a
1,304
py
Python
tests/test_atc_classification.py
kzfm/pychembldb
0dde6a05b2dc138e0be7f8f27f57b5c2a42e23c7
[ "CC0-1.0" ]
8
2020-01-16T00:43:46.000Z
2021-11-27T18:26:12.000Z
tests/test_atc_classification.py
iwatobipen/pychembldb
0dde6a05b2dc138e0be7f8f27f57b5c2a42e23c7
[ "CC0-1.0" ]
null
null
null
tests/test_atc_classification.py
iwatobipen/pychembldb
0dde6a05b2dc138e0be7f8f27f57b5c2a42e23c7
[ "CC0-1.0" ]
3
2020-05-31T05:54:33.000Z
2021-11-15T04:31:07.000Z
import unittest from pychembldb import chembldb, AtcClassification class AtcClassificationTest(unittest.TestCase): def setUp(self): self.target = chembldb.query(AtcClassification).first() def test_who_name(self): self.assertEqual(self.target.who_name, "sodium fluoride") def test_level1(self): self.assertEqual(self.target.level1, "A") def test_level2(self): self.assertEqual(self.target.level2, "A01") def test_level3(self): self.assertEqual(self.target.level3, "A01A") def test_level4(self): self.assertEqual(self.target.level4, "A01AA") def test_level5(self): self.assertEqual(self.target.level5, "A01AA01") #def test_who_id(self): # self.assertEqual(self.target.who_id, "who0001") def test_level1_description(self): self.assertEqual(self.target.level1_description, "ALIMENTARY TRACT AND METABOLISM") def test_level2_description(self): self.assertEqual(self.target.level2_description, "STOMATOLOGICAL PREPARATIONS") def test_level3_description(self): self.assertEqual(self.target.level3_description, "STOMATOLOGICAL PREPARATIONS") def test_level4_description(self): self.assertEqual(self.target.level4_description, "Caries prophylactic agents")
31.804878
91
0.722393
150
1,304
6.126667
0.286667
0.104461
0.227421
0.275299
0.54951
0.422198
0
0
0
0
0
0.029602
0.171012
1,304
40
92
32.6
0.820537
0.055982
0
0
0
0
0.118796
0
0
0
0
0
0.4
1
0.44
false
0
0.08
0
0.56
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
26d6eb6a3db8a02ac479af6cc70c0ca1a8d4b806
314
py
Python
src/cltk/corpora/grc/tlg/author_female.py
yelircaasi/cltk
1583aa24682543a1f33434a21918f039ca27d60c
[ "MIT" ]
757
2015-11-20T00:58:52.000Z
2022-03-31T06:34:24.000Z
src/cltk/corpora/grc/tlg/author_female.py
yelircaasi/cltk
1583aa24682543a1f33434a21918f039ca27d60c
[ "MIT" ]
950
2015-11-17T05:38:29.000Z
2022-03-14T16:09:34.000Z
src/cltk/corpora/grc/tlg/author_female.py
yelircaasi/cltk
1583aa24682543a1f33434a21918f039ca27d60c
[ "MIT" ]
482
2015-11-22T18:13:02.000Z
2022-03-20T21:22:02.000Z
AUTHOR_FEMALE = { "Femina": [ "0009", "0051", "0054", "0197", "0220", "0244", "0294", "0372", "0509", "1213", "1355", "1493", "1572", "1814", "1828", "2703", "2766", ] }
14.272727
17
0.27707
20
314
4.3
1
0
0
0
0
0
0
0
0
0
0
0.465753
0.535032
314
21
18
14.952381
0.123288
0
0
0
0
0
0.235669
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
26de8d550aaf603ab387cb9014bef7f0ef3aded7
133
py
Python
files/Entrada/p12.py
heltonricardo/estudo-python
e82eb8ebc15378175b03d367a6eeea66e8858cff
[ "MIT" ]
null
null
null
files/Entrada/p12.py
heltonricardo/estudo-python
e82eb8ebc15378175b03d367a6eeea66e8858cff
[ "MIT" ]
null
null
null
files/Entrada/p12.py
heltonricardo/estudo-python
e82eb8ebc15378175b03d367a6eeea66e8858cff
[ "MIT" ]
null
null
null
n1 = float(input('Nota N1: ')) n2 = float(input('Nota N2: ')) m = (n1 + n2) / 2 print("A média do aluno é {:.1f}".format(m)) input()
22.166667
44
0.56391
24
133
3.125
0.625
0.266667
0.373333
0
0
0
0
0
0
0
0
0.073395
0.180451
133
5
45
26.6
0.614679
0
0
0
0
0
0.323308
0
0
0
0
0
0
1
0
false
0
0
0
0
0.2
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
26f0881e00d1366c091699a1bba0f26cab6e02b4
150
py
Python
mlxtk/tools/terminal.py
f-koehler/mlxtk
373aed06ab23ab9b70cd99e160228c50b87e939a
[ "MIT" ]
2
2018-12-21T19:41:10.000Z
2019-11-25T15:26:27.000Z
mlxtk/tools/terminal.py
f-koehler/mlxtk
373aed06ab23ab9b70cd99e160228c50b87e939a
[ "MIT" ]
73
2017-12-22T13:30:16.000Z
2022-02-22T04:21:14.000Z
mlxtk/tools/terminal.py
f-koehler/mlxtk
373aed06ab23ab9b70cd99e160228c50b87e939a
[ "MIT" ]
null
null
null
import subprocess def get_terminal_size(): tmp = subprocess.check_output(["stty", "size"]).decode().split() return int(tmp[0]), int(tmp[1])
21.428571
68
0.666667
21
150
4.619048
0.761905
0.123711
0
0
0
0
0
0
0
0
0
0.015504
0.14
150
6
69
25
0.736434
0
0
0
0
0
0.053333
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
f8253345007fdf8fa689add4646d1b5dc1f16934
221
py
Python
comment/admin.py
Alan-CQU/MyBlog
1c4f2aaece873b6732062f58a1a575172b3caaf2
[ "MIT" ]
null
null
null
comment/admin.py
Alan-CQU/MyBlog
1c4f2aaece873b6732062f58a1a575172b3caaf2
[ "MIT" ]
1
2020-06-04T07:31:28.000Z
2020-06-04T07:31:28.000Z
comment/admin.py
Alan-CQU/MyBlog
1c4f2aaece873b6732062f58a1a575172b3caaf2
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Comment # Register your models here. @admin.register(Comment) class CommentAdmin(admin.ModelAdmin): list_display = ("content_object","text", "comment_time","user")
31.571429
67
0.773756
28
221
6
0.714286
0
0
0
0
0
0
0
0
0
0
0
0.108597
221
6
68
36.833333
0.852792
0.117647
0
0
0
0
0.176166
0
0
0
0
0
0
1
0
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
f8407d3d7e42460aee5601e1e1bfbd7d8914cade
3,715
py
Python
tests/test_firrtl_ir/test_type_equal.py
zhongzc/py-hcl
5a2be0208f915377a1dae12509f1af016df6412b
[ "MIT" ]
null
null
null
tests/test_firrtl_ir/test_type_equal.py
zhongzc/py-hcl
5a2be0208f915377a1dae12509f1af016df6412b
[ "MIT" ]
null
null
null
tests/test_firrtl_ir/test_type_equal.py
zhongzc/py-hcl
5a2be0208f915377a1dae12509f1af016df6412b
[ "MIT" ]
null
null
null
from py_hcl.firrtl_ir.shortcuts import uw, sw, vec, bdl from py_hcl.firrtl_ir.type import UnknownType, ClockType from py_hcl.firrtl_ir.type_measurer import equal def test_type_eq(): assert equal(UnknownType(), UnknownType()) assert equal(ClockType(), ClockType()) assert equal(uw(10), uw(10)) assert equal(sw(10), sw(10)) assert equal(vec(uw(10), 8), vec(uw(10), 8)) assert equal(bdl(a=(vec(uw(10), 8), False), b=(uw(10), True)), bdl(a=(vec(uw(10), 8), False), b=(uw(10), True))) def test_type_neq(): assert not equal(UnknownType(), ClockType()) assert not equal(UnknownType(), uw(10)) assert not equal(UnknownType(), sw(10)) assert not equal(UnknownType(), vec(uw(10), 8)) assert not equal(UnknownType(), vec(sw(10), 8)) assert not equal(UnknownType(), bdl(a=(vec(uw(10), 8), False), b=(uw(10), False))) assert not equal(ClockType(), UnknownType()) assert not equal(ClockType(), uw(10)) assert not equal(ClockType(), sw(10)) assert not equal(ClockType(), vec(uw(10), 8)) assert not equal(ClockType(), vec(sw(10), 8)) assert not equal(ClockType(), bdl(a=(vec(uw(10), 8), False), b=(uw(10), False))) assert not equal(uw(10), UnknownType()) assert not equal(uw(10), ClockType()) assert not equal(uw(10), uw(8)) assert not equal(uw(10), sw(10)) assert not equal(uw(10), sw(10)) assert not equal(uw(10), vec(uw(10), 8)) assert not equal(uw(10), vec(sw(10), 8)) assert not equal(uw(10), bdl(a=(vec(uw(10), 8), False), b=(uw(10), False))) assert not equal(sw(10), UnknownType()) assert not equal(sw(10), ClockType()) assert not equal(sw(10), sw(8)) assert not equal(sw(10), uw(10)) assert not equal(sw(10), uw(10)) assert not equal(sw(10), vec(uw(10), 8)) assert not equal(sw(10), vec(sw(10), 8)) assert not equal(sw(10), bdl(a=(vec(uw(10), 8), False), b=(uw(10), False))) assert not equal(vec(uw(10), 8), UnknownType()) assert not equal(vec(uw(10), 8), ClockType()) assert not equal(vec(uw(10), 8), sw(8)) assert not equal(vec(uw(10), 8), uw(10)) assert not equal(vec(uw(10), 8), uw(10)) assert not equal(vec(uw(10), 8), vec(uw(8), 8)) assert not equal(vec(uw(10), 8), vec(uw(10), 9)) assert not equal(vec(uw(10), 8), vec(sw(10), 8)) assert not equal(vec(uw(10), 8), bdl(a=(vec(uw(10), 8), False), b=(uw(10), False))) assert not equal(bdl(a=(vec(uw(10), 8), False), b=(uw(10), False)), UnknownType()) assert not equal(bdl(a=(vec(uw(10), 8), False), b=(uw(10), False)), ClockType()) assert not equal(bdl(a=(vec(uw(10), 8), False), b=(uw(10), False)), sw(8)) assert not equal(bdl(a=(vec(uw(10), 8), False), b=(uw(10), False)), uw(10)) assert not equal(bdl(a=(vec(uw(10), 8), False), b=(uw(10), False)), uw(10)) assert not equal(bdl(a=(vec(uw(10), 8), False), b=(uw(10), False)), vec(sw(10), 8)) assert not equal(bdl(a=(vec(uw(10), 8), False), b=(uw(10), False)), bdl(a=(vec(uw(10), 8), True), b=(uw(10), False))) assert not equal(bdl(a=(vec(uw(10), 8), False), b=(uw(10), False)), bdl(a=(vec(uw(10), 2), False), b=(uw(10), False))) assert not equal(bdl(a=(uw(3), False), b=(uw(10), False)), bdl(a=(uw(3), False), b=(uw(10), False), c=(sw(2), True))) assert not equal(bdl(a=(vec(uw(10), 8), False), b=(uw(10), False)), bdl(b=(uw(10), False), a=(vec(uw(10), 8), False)))
44.22619
79
0.548048
611
3,715
3.314239
0.052373
0.146173
0.324938
0.13037
0.816296
0.686914
0.638025
0.559506
0.478519
0.442963
0
0.084129
0.238493
3,715
83
80
44.759036
0.631672
0
0
0.297297
0
0
0
0
0
0
0
0
0.716216
1
0.027027
true
0
0.040541
0
0.067568
0
0
0
0
null
0
1
0
1
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
1
0
0
0
0
0
0
4
f8570dee58f3b94234f4d7fac05df7a91645acf1
98
py
Python
rpd_home/apps.py
mariuszbrozda/rpd
7cd4fe3916405c89eb7b20d9efb9ea311fcdd524
[ "MIT" ]
null
null
null
rpd_home/apps.py
mariuszbrozda/rpd
7cd4fe3916405c89eb7b20d9efb9ea311fcdd524
[ "MIT" ]
11
2019-11-18T19:18:29.000Z
2021-06-10T21:57:34.000Z
rpd_home/apps.py
mariuszbrozda/rpd
7cd4fe3916405c89eb7b20d9efb9ea311fcdd524
[ "MIT" ]
null
null
null
from django.apps import AppConfig class RpdWebsiteConfig(AppConfig): name = 'rpd_website'
12.25
34
0.755102
11
98
6.636364
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.173469
98
7
35
14
0.901235
0
0
0
0
0
0.114583
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
f86607fd7c5bfb0c90cf70e6a0063f7bfc4f4796
76
py
Python
login.py
zhanghao000/test004
7e719016566d6a6c90cb7f768ecab1e306257f69
[ "MIT" ]
null
null
null
login.py
zhanghao000/test004
7e719016566d6a6c90cb7f768ecab1e306257f69
[ "MIT" ]
null
null
null
login.py
zhanghao000/test004
7e719016566d6a6c90cb7f768ecab1e306257f69
[ "MIT" ]
null
null
null
a = 999 b = 999999999999999 b = 111 c = 3333333 c = 0000000 d = ieuwoidjfds
10.857143
19
0.684211
12
76
4.333333
0.833333
0
0
0
0
0
0
0
0
0
0
0.603448
0.236842
76
6
20
12.666667
0.293103
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
f888d68b8cc6c21c58966a01c5c8f5ebe808d505
207
py
Python
app/db.py
valentinDruzhinin/task-tracker
fa4fd5a5341f2d0ce5f259c1a687c4a86f11d1c4
[ "MIT" ]
null
null
null
app/db.py
valentinDruzhinin/task-tracker
fa4fd5a5341f2d0ce5f259c1a687c4a86f11d1c4
[ "MIT" ]
null
null
null
app/db.py
valentinDruzhinin/task-tracker
fa4fd5a5341f2d0ce5f259c1a687c4a86f11d1c4
[ "MIT" ]
null
null
null
class ISOLATION_LEVEL: READ_COMMITTED = 'READ COMMITTED' READ_UNCOMMITTED = 'READ UNCOMMITTED' REPEATABLE_READ = 'REPEATABLE READ' SERIALIZABLE = 'SERIALIZABLE' AUTOCOMMIT = 'AUTOCOMMIT'
29.571429
41
0.729469
19
207
7.736842
0.473684
0.176871
0.231293
0
0
0
0
0
0
0
0
0
0.193237
207
6
42
34.5
0.88024
0
0
0
0
0
0.323672
0
0
0
0
0
0
1
0
false
0
0
0
1
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
0
0
1
0
0
4
f8b7ac5d48ad902e286451a4f6812874b26a07aa
176
py
Python
pywiktionary/__init__.py
alessandrome/pywiktionary
b9378ca1e2dfe704eaa8a044bd82519b12f81226
[ "MIT" ]
4
2019-08-08T21:15:01.000Z
2021-01-14T01:32:18.000Z
pywiktionary/__init__.py
alessandrome/pywiktionary
b9378ca1e2dfe704eaa8a044bd82519b12f81226
[ "MIT" ]
1
2021-09-02T17:24:12.000Z
2021-09-02T17:24:12.000Z
pywiktionary/__init__.py
alessandrome/pywiktionary
b9378ca1e2dfe704eaa8a044bd82519b12f81226
[ "MIT" ]
1
2020-03-19T12:57:45.000Z
2020-03-19T12:57:45.000Z
from pywiktionary import parsers from .wiktionary_parser_factory import WiktionaryParserFactory, PageNotFoundException, LANGUAGE_PARSERS, LANGUAGE_CODES name = "pywiktionary"
35.2
119
0.875
17
176
8.823529
0.705882
0
0
0
0
0
0
0
0
0
0
0
0.085227
176
4
120
44
0.931677
0
0
0
0
0
0.068182
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
f8bf33db0f0ebbd72ea533ec23ad8ce30bcf6776
32
py
Python
example_snippets/multimenus_snippets/Snippets/SciPy/Special functions/Mathieu and Related Functions/mathieu_modcem1 Even modified Mathieu function of the first kind and its derivative.py
kuanpern/jupyterlab-snippets-multimenus
477f51cfdbad7409eab45abe53cf774cd70f380c
[ "BSD-3-Clause" ]
null
null
null
example_snippets/multimenus_snippets/Snippets/SciPy/Special functions/Mathieu and Related Functions/mathieu_modcem1 Even modified Mathieu function of the first kind and its derivative.py
kuanpern/jupyterlab-snippets-multimenus
477f51cfdbad7409eab45abe53cf774cd70f380c
[ "BSD-3-Clause" ]
null
null
null
example_snippets/multimenus_snippets/Snippets/SciPy/Special functions/Mathieu and Related Functions/mathieu_modcem1 Even modified Mathieu function of the first kind and its derivative.py
kuanpern/jupyterlab-snippets-multimenus
477f51cfdbad7409eab45abe53cf774cd70f380c
[ "BSD-3-Clause" ]
1
2021-02-04T04:51:48.000Z
2021-02-04T04:51:48.000Z
special.mathieu_modcem1(m, q, x)
32
32
0.78125
6
32
4
1
0
0
0
0
0
0
0
0
0
0
0.033333
0.0625
32
1
32
32
0.766667
0
0
0
0
0
0
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
6ef6f50ae355e488671eeb4472ac5315d4061b04
4,959
py
Python
graphkit/modifiers.py
pygraphkit/graphkit
7658e17fa995aba3a7d09282951bd284ec2a3cc0
[ "Apache-2.0" ]
1
2021-01-18T21:16:30.000Z
2021-01-18T21:16:30.000Z
graphkit/modifiers.py
pygraphkit/graphkit
7658e17fa995aba3a7d09282951bd284ec2a3cc0
[ "Apache-2.0" ]
null
null
null
graphkit/modifiers.py
pygraphkit/graphkit
7658e17fa995aba3a7d09282951bd284ec2a3cc0
[ "Apache-2.0" ]
null
null
null
""" This sub-module contains input/output modifiers that can be applied to arguments to ``needs`` and ``provides`` to let GraphKit know it should treat them differently. Copyright 2016, Yahoo Inc. Licensed under the terms of the Apache License, Version 2.0. See the LICENSE file associated with the project for terms. """ class optional(str): """ An optional need signifies that the function's argument may not receive a value. Only input values in ``needs`` may be designated as optional using this modifier. An ``operation`` will receive a value for an optional need only if if it is available in the graph at the time of its invocation. The ``operation``'s function should have a defaulted parameter with the same name as the opetional, and the input value will be passed as a keyword argument, if it is available. Here is an example of an operation that uses an optional argument:: >>> from graphkit import operation, compose, optional >>> # Function that adds either two or three numbers. >>> def myadd(a, b, c=0): ... return a + b + c >>> # Designate c as an optional argument. >>> graph = compose('mygraph')( ... operation(name='myadd', needs=['a', 'b', optional('c')], provides='sum')(myadd) ... ) >>> graph NetworkOperation(name='mygraph', needs=[optional('a'), optional('b'), optional('c')], provides=['sum']) >>> # The graph works with and without 'c' provided as input. >>> graph({'a': 5, 'b': 2, 'c': 4})['sum'] 11 >>> graph({'a': 5, 'b': 2}) {'a': 5, 'b': 2, 'sum': 7} """ __slots__ = () # avoid __dict__ on instances def __repr__(self): return "optional('%s')" % self class sideffect(str): """ A sideffect data-dependency participates in the graph but never given/asked in functions. Both inputs & outputs in ``needs`` & ``provides`` may be designated as *sideffects* using this modifier. *Sideffects* work as usual while solving the graph but they do not interact with the ``operation``'s function; specifically: - input sideffects are NOT fed into the function; - output sideffects are NOT expected from the function. .. info: an ``operation`` with just a single *sideffect* output return no value at all, but it would still be called for its side-effect only. Their purpose is to describe operations that modify the internal state of some of their arguments ("side-effects"). A typical use case is to signify columns required to produce new ones in pandas dataframes:: >>> from graphkit import operation, compose, sideffect >>> # Function appending a new dataframe column from two pre-existing ones. >>> def addcolumns(df): ... df['sum'] = df['a'] + df['b'] >>> # Designate `a`, `b` & `sum` column names as an sideffect arguments. >>> graph = compose('mygraph')( ... operation( ... name='addcolumns', ... needs=['df', sideffect('a'), sideffect('b')], ... provides=[sideffect('sum')])(addcolumns) ... ) >>> graph NetworkOperation(name='mygraph', needs=[optional('df'), optional('sideffect(a)'), optional('sideffect(b)')], provides=['sideffect(sum)']) >>> # The graph works with and without 'c' provided as input. >>> df = pd.DataFrame({'a': [5], 'b': [2]}) # doctest: +SKIP >>> graph({'df': df})['sum'] == 11 # doctest: +SKIP True Note that regular data in *needs* and *provides* do not match same-named *sideffects*. That is, in the following operation, the ``prices`` input is different from the ``sideffect(prices)`` output: >>> def upd_prices(sales_df, prices): ... sales_df["Prices"] = prices >>> operation(fn=upd_prices, ... name="upd_prices", ... needs=["sales_df", "price"], ... provides=[sideffect("price")]) operation(name='upd_prices', needs=['sales_df', 'price'], provides=['sideffect(price)'], fn=upd_prices) .. note:: An ``operation`` with *sideffects* outputs only, have functions that return no value at all (like the one above). Such operation would still be called for their side-effects. .. tip:: You may associate sideffects with other data to convey their relationships, simply by including their names in the string - in the end, it's just a string - but no enforcement will happen from *graphkit*. >>> sideffect("price[sales_df]") 'sideffect(price[sales_df])' """ __slots__ = () # avoid __dict__ on instances def __new__(cls, name): return super(sideffect, cls).__new__(cls, "sideffect(%s)" % name)
38.742188
145
0.604759
626
4,959
4.728435
0.34345
0.014189
0.004054
0.005405
0.225
0.115541
0.066216
0.066216
0.066216
0.066216
0
0.005779
0.267191
4,959
127
146
39.047244
0.808751
0.878605
0
0.25
0
0
0.100372
0
0
0
0
0
0
1
0.25
false
0
0
0.25
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
6efb8b324644818d3643740b3443cbfde65ad95c
107
py
Python
web/api_duplicates/apps.py
jhamidu1117/DockerizedApp
fd949f81832410ad91174d7bc234dbe6bb552794
[ "MIT" ]
null
null
null
web/api_duplicates/apps.py
jhamidu1117/DockerizedApp
fd949f81832410ad91174d7bc234dbe6bb552794
[ "MIT" ]
null
null
null
web/api_duplicates/apps.py
jhamidu1117/DockerizedApp
fd949f81832410ad91174d7bc234dbe6bb552794
[ "MIT" ]
null
null
null
from django.apps import AppConfig class ApiDuplicatesConfig(AppConfig): name = 'api_duplicates'
17.833333
38
0.747664
11
107
7.181818
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.186916
107
5
39
21.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
3e04e15851b61ccd48440acc9ebf08fc5df85ab8
223
py
Python
experiments/simulation/histogram/simulatedAnnealing/Transformation.py
pjotrscholtze/trident
865da68fff21d31490acc24db2f4b6bde0b80796
[ "Apache-2.0" ]
null
null
null
experiments/simulation/histogram/simulatedAnnealing/Transformation.py
pjotrscholtze/trident
865da68fff21d31490acc24db2f4b6bde0b80796
[ "Apache-2.0" ]
null
null
null
experiments/simulation/histogram/simulatedAnnealing/Transformation.py
pjotrscholtze/trident
865da68fff21d31490acc24db2f4b6bde0b80796
[ "Apache-2.0" ]
null
null
null
# /** # * Copyright MaDgIK Group 2010 - 2015. # */ from simulatedAnnealing.State import State # /** # * @author herald # */ class Transformation: def apply(self, state: State) -> State: raise NotImplementedError()
20.272727
71
0.663677
22
223
6.727273
0.818182
0.135135
0
0
0
0
0
0
0
0
0
0.044444
0.192825
223
10
72
22.3
0.777778
0.32287
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0
1
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
1
0
1
0
0
4
3e0cda2e6af1f077c91eab9057fe17d0f29b31f1
36
py
Python
python/config/credentials.py
caiovini/builds_jenkins
6350c8651decd7ab116fd770741fae0b68d77d84
[ "MIT" ]
null
null
null
python/config/credentials.py
caiovini/builds_jenkins
6350c8651decd7ab116fd770741fae0b68d77d84
[ "MIT" ]
null
null
null
python/config/credentials.py
caiovini/builds_jenkins
6350c8651decd7ab116fd770741fae0b68d77d84
[ "MIT" ]
null
null
null
username="admin" password="admin123"
18
19
0.805556
4
36
7.25
1
0
0
0
0
0
0
0
0
0
0
0.085714
0.027778
36
2
19
18
0.742857
0
0
0
0
0
0.351351
0
0
0
0
0
0
1
0
false
0.5
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
0
1
0
0
0
0
0
4
3e3b721ffa9f1e04d72958eaa12eec70914beb4f
292
py
Python
LeetCode/python3/206.py
ZintrulCre/LeetCode_Archiver
de23e16ead29336b5ee7aa1898a392a5d6463d27
[ "MIT" ]
279
2019-02-19T16:00:32.000Z
2022-03-23T12:16:30.000Z
LeetCode/python3/206.py
ZintrulCre/LeetCode_Archiver
de23e16ead29336b5ee7aa1898a392a5d6463d27
[ "MIT" ]
2
2019-03-31T08:03:06.000Z
2021-03-07T04:54:32.000Z
LeetCode/python3/206.py
ZintrulCre/LeetCode_Crawler
de23e16ead29336b5ee7aa1898a392a5d6463d27
[ "MIT" ]
12
2019-01-29T11:45:32.000Z
2019-02-04T16:31:46.000Z
class Solution: def reverseList(self, head): """ :type head: ListNode :rtype: ListNode """ prev = None while head: next = head.next head.next = prev prev = head head = next return prev
22.461538
32
0.44863
27
292
4.851852
0.518519
0.244275
0.183206
0.244275
0
0
0
0
0
0
0
0
0.472603
292
13
33
22.461538
0.850649
0.126712
0
0
0
0
0
0
0
0
0
0
0
1
0.111111
false
0
0
0
0.333333
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
3e58718ce187130fbda8502a6907b87b182eb724
168
py
Python
Ex003.py
BrunosVieira88/Python
7dc105a62ede0b33d25c5864e892637ca71f2beb
[ "MIT" ]
null
null
null
Ex003.py
BrunosVieira88/Python
7dc105a62ede0b33d25c5864e892637ca71f2beb
[ "MIT" ]
null
null
null
Ex003.py
BrunosVieira88/Python
7dc105a62ede0b33d25c5864e892637ca71f2beb
[ "MIT" ]
null
null
null
n1= int(input('Digite o primeiro numero ')) n2= int(input('digite o segundo numero ')) resultado = n1+n2 print ('O resultado de {} + {} = {}'.format(n1,n2,resultado))
28
61
0.654762
25
168
4.4
0.52
0.145455
0.254545
0.272727
0
0
0
0
0
0
0
0.041958
0.14881
168
6
61
28
0.727273
0
0
0
0
0
0.449704
0
0
0
0
0
0
1
0
false
0
0
0
0
0.25
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
3e6dec30c3d3d6f17af31c9325d0cca4a9f3b989
4,070
py
Python
listshuffler-be/tests/unit/test_patch_probabilities.py
csiztom/listshuffler
d4fea7da3d506e93cca4a8e79c6f0ba98aebbac5
[ "MIT" ]
null
null
null
listshuffler-be/tests/unit/test_patch_probabilities.py
csiztom/listshuffler
d4fea7da3d506e93cca4a8e79c6f0ba98aebbac5
[ "MIT" ]
null
null
null
listshuffler-be/tests/unit/test_patch_probabilities.py
csiztom/listshuffler
d4fea7da3d506e93cca4a8e79c6f0ba98aebbac5
[ "MIT" ]
null
null
null
from unittest import TestCase, mock from src.patch_probabilities import app def good_api_event(): return { "body": """{ "adminID": "", "listID": "", "probabilities": { "id":{ "id":1, "id2":1, "id3":1 }, "id2":{ "id":1, "id2":1, "id3":1 }, "id3":{ "id":1, "id2":1, "id3":1 } } }""", "queryStringParameters": None } def bad_api_event(): return { "body": None, "queryStringParameters": None } def bad_type_api_event(): return { "body": """{ "adminID": "", "listID": "", "probabilities": "" }""", "queryStringParameters": None } def bad_keys_api_event(): return { "body": """{ "adminID": "", "listID": "", "probabilities": { "id9":{ "id9":1, "id29":1, "id39":1 }, "id29":{ "id9":1, "id29":1, "id39":1 }, "id39":{ "id9":1, "id29":1, "id39":1 } } }""", "queryStringParameters": None } class TestPatchInstance(TestCase): def test_bad_api_call(self): assert app.handler(bad_api_event(), "")['statusCode'] == 400 @mock.patch('src.helpers.rds_config.pymysql', autospec=True) def test_non_existing_instance(self, mock_pymysql): mock_cursor = mock.MagicMock() mock_cursor.fetchone.return_value = None mock_cursor.fetchall.return_value = [] mock_pymysql.connect.return_value.cursor.return_value.__enter__.return_value = mock_cursor assert app.handler(good_api_event(), "")['statusCode'] == 404 @mock.patch('src.helpers.rds_config.pymysql', autospec=True) def test_empty_probabilities(self, mock_pymysql): mock_cursor = mock.MagicMock() mock_cursor.fetchone.return_value = ['id', 'id'] mock_cursor.fetchall.return_value = [] mock_pymysql.connect.return_value.cursor.return_value.__enter__.return_value = mock_cursor assert app.handler(good_api_event(), "")['statusCode'] == 200 @mock.patch('src.helpers.rds_config.pymysql', autospec=True) def test_success(self, mock_pymysql): mock_cursor = mock.MagicMock() mock_cursor.fetchone.return_value = ['id', 'id'] mock_cursor.fetchall.return_value = [ ['id', 'id2', 1], ['id2', 'id2', 1], ['id2', 'id3', 1]] mock_pymysql.connect.return_value.cursor.return_value.__enter__.return_value = mock_cursor assert app.handler(good_api_event(), "")['statusCode'] == 200 @mock.patch('src.helpers.rds_config.pymysql', autospec=True) def test_bad_type(self, mock_pymysql): mock_cursor = mock.MagicMock() mock_cursor.fetchone.return_value = ['id', 'id'] mock_cursor.fetchall.return_value = [ ['id', 'id2', 1], ['id2', 'id2', 1], ['id2', 'id3', 1]] mock_pymysql.connect.return_value.cursor.return_value.__enter__.return_value = mock_cursor assert app.handler(bad_type_api_event(), "")['statusCode'] == 400 @mock.patch('src.helpers.rds_config.pymysql', autospec=True) def test_bad_keys(self, mock_pymysql): mock_cursor = mock.MagicMock() mock_cursor.fetchone.return_value = ['id', 'id'] mock_cursor.fetchall.return_value = [ ['id', 'id2', 1], ['id2', 'id2', 1], ['id2', 'id3', 1]] mock_pymysql.connect.return_value.cursor.return_value.__enter__.return_value = mock_cursor assert app.handler(bad_keys_api_event(), "")['statusCode'] == 400
33.089431
98
0.519165
407
4,070
4.90172
0.142506
0.137845
0.052632
0.047619
0.801504
0.801504
0.76391
0.697744
0.697744
0.697744
0
0.032544
0.335627
4,070
122
99
33.360656
0.705251
0
0
0.64486
0
0
0.363145
0.057494
0
0
0
0
0.056075
1
0.093458
false
0
0.018692
0.037383
0.158879
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
3e7b487b12ef12a19d27c1c05d6c127ccbd8e678
144
py
Python
config.py
vidit23/MVP
d6ecfa6e233adca04527a3d567dd6434905d3899
[ "MIT" ]
null
null
null
config.py
vidit23/MVP
d6ecfa6e233adca04527a3d567dd6434905d3899
[ "MIT" ]
null
null
null
config.py
vidit23/MVP
d6ecfa6e233adca04527a3d567dd6434905d3899
[ "MIT" ]
1
2020-08-17T00:50:51.000Z
2020-08-17T00:50:51.000Z
YOUTUBE_API_KEY = [ ""] YOUTUBE_KEY_NUMBER = 0 SPOTIFY_CLIENT_ID = "" SPOTIFY_CLIENT_SECRET = "" MONGO_ATLAS_USER = "" MONGO_ATLAS_PASSWORD = ""
24
26
0.75
19
144
5.052632
0.684211
0.270833
0
0
0
0
0
0
0
0
0
0.007937
0.125
144
6
27
24
0.753968
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0.166667
0
0
0
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
4
e4695feef08b9a89a5a7d2975ca35ac925300481
173
py
Python
lambda/tests/__init__.py
sjmatta-forks/serverless-southwest-check-in
6b8cfbf1cb19c222f51a039db024217637db2ce4
[ "MIT" ]
49
2017-02-14T13:49:37.000Z
2022-03-24T13:57:05.000Z
lambda/tests/__init__.py
sjmatta-forks/serverless-southwest-check-in
6b8cfbf1cb19c222f51a039db024217637db2ce4
[ "MIT" ]
39
2017-02-08T14:21:17.000Z
2022-01-11T00:20:22.000Z
lambda/tests/__init__.py
sjmatta-forks/serverless-southwest-check-in
6b8cfbf1cb19c222f51a039db024217637db2ce4
[ "MIT" ]
13
2018-02-18T18:49:49.000Z
2022-02-16T15:05:35.000Z
import os import sys # Add ../src to the path so we can import project-local packages without src. sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', 'src'))
28.833333
77
0.710983
30
173
3.966667
0.666667
0.10084
0
0
0
0
0
0
0
0
0
0.006667
0.132948
173
5
78
34.6
0.786667
0.433526
0
0
0
0
0.052083
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
e46a9134995ee59251ad71c8d2d1427b1c347a09
82
py
Python
gdrivefs-0.14.9-py3.6.egg/gdrivefs/config/changes.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
gdrivefs-0.14.9-py3.6.egg/gdrivefs/config/changes.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
gdrivefs-0.14.9-py3.6.egg/gdrivefs/config/changes.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
import os MONITOR_CHANGES = bool(int(os.environ.get('GD_MONITOR_CHANGES', '1')))
20.5
70
0.743902
13
82
4.461538
0.769231
0.482759
0
0
0
0
0
0
0
0
0
0.013333
0.085366
82
3
71
27.333333
0.76
0
0
0
0
0
0.231707
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
e46ae36193b29a17c88aa244207a9a1b7c3b146f
54
py
Python
Chapter02/FirstProject/test1.py
pythonOsYun/Hands-On-Application-Development-with-PyCharm
4abd408413f74b179c016f279a236c1cd5e4d183
[ "MIT" ]
null
null
null
Chapter02/FirstProject/test1.py
pythonOsYun/Hands-On-Application-Development-with-PyCharm
4abd408413f74b179c016f279a236c1cd5e4d183
[ "MIT" ]
null
null
null
Chapter02/FirstProject/test1.py
pythonOsYun/Hands-On-Application-Development-with-PyCharm
4abd408413f74b179c016f279a236c1cd5e4d183
[ "MIT" ]
null
null
null
if __name__ == '__main__': print('hello, world')
13.5
26
0.611111
6
54
4.166667
1
0
0
0
0
0
0
0
0
0
0
0
0.203704
54
3
27
18
0.581395
0
0
0
0
0
0.377358
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
900211ac8bd1c7b1c3400e1917aa5820354b5134
196
py
Python
butter/providers/aws_mock/__init__.py
sverch/butter
443024ddf12a98b8635e3198dfbf619a91c62089
[ "Apache-2.0" ]
5
2018-07-24T23:37:19.000Z
2018-10-12T08:45:21.000Z
butter/providers/aws_mock/__init__.py
sverch/butter
443024ddf12a98b8635e3198dfbf619a91c62089
[ "Apache-2.0" ]
30
2018-07-24T23:38:17.000Z
2018-11-29T04:37:51.000Z
butter/providers/aws_mock/__init__.py
sverch/butter
443024ddf12a98b8635e3198dfbf619a91c62089
[ "Apache-2.0" ]
null
null
null
""" Mock AWS Provider This module uses AWS as a backing provider with moto instead of boto3 so that no resources get deployed. """ from butter.providers.aws_mock import (network, service, paths)
24.5
94
0.77551
31
196
4.870968
0.870968
0
0
0
0
0
0
0
0
0
0
0.006061
0.158163
196
7
95
28
0.909091
0.627551
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
900dcf18604615fd7be5fbc93d7c9e631fbb9d8a
286
py
Python
envs/__init__.py
wwongkamjan/me-trpo
b9d2d72aca862d2f1110ef7a1fa627e3e0012764
[ "MIT" ]
84
2018-09-20T00:00:13.000Z
2022-03-27T02:12:12.000Z
envs/__init__.py
jonygao621/me-trpo
7dad9cd91e8f259ffeaf2bdb669c84a6db3ceeaa
[ "MIT" ]
4
2018-10-15T14:11:06.000Z
2020-01-13T14:20:35.000Z
envs/__init__.py
jonygao621/me-trpo
7dad9cd91e8f259ffeaf2bdb669c84a6db3ceeaa
[ "MIT" ]
23
2019-01-07T01:45:06.000Z
2022-02-07T07:42:28.000Z
from .com_swimmer_env import SwimmerEnv from .com_snake_env import SnakeEnv from .reacher_env import ReacherEnv, gym_to_local from .com_half_cheetah_env import HalfCheetahEnv from .com_hopper_env import HopperEnv from .com_ant_env import AntEnv from .com_humanoid_env import HumanoidEnv
40.857143
49
0.874126
45
286
5.2
0.488889
0.269231
0
0
0
0
0
0
0
0
0
0
0.097902
286
7
50
40.857143
0.906977
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
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
9033714fa9dc5b07e13ac368fc2d6744d58b4577
92
py
Python
Exercises/pizzas/apps.py
WillDutcher/project-3-getting-started-with-django
e21cbfeb0e9d1a164a28d9dcca30b69789e2c8ef
[ "CC0-1.0" ]
null
null
null
Exercises/pizzas/apps.py
WillDutcher/project-3-getting-started-with-django
e21cbfeb0e9d1a164a28d9dcca30b69789e2c8ef
[ "CC0-1.0" ]
null
null
null
Exercises/pizzas/apps.py
WillDutcher/project-3-getting-started-with-django
e21cbfeb0e9d1a164a28d9dcca30b69789e2c8ef
[ "CC0-1.0" ]
null
null
null
from django.apps import AppConfig class PizzasConfig(AppConfig): name = 'pizzas'
15.333333
34
0.706522
10
92
6.5
0.9
0
0
0
0
0
0
0
0
0
0
0
0.217391
92
5
35
18.4
0.902778
0
0
0
0
0
0.068966
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
5fcc402f4634d19ac2459134d4931b13dc733596
131
py
Python
nntoolbox/models/__init__.py
nhatsmrt/nn-toolbox
689b9924d3c88a433f8f350b89c13a878ac7d7c3
[ "Apache-2.0" ]
16
2019-07-11T15:57:41.000Z
2020-09-08T13:52:45.000Z
nntoolbox/models/__init__.py
nhatsmrt/nn-toolbox
689b9924d3c88a433f8f350b89c13a878ac7d7c3
[ "Apache-2.0" ]
1
2022-01-18T22:21:57.000Z
2022-01-18T22:21:57.000Z
nntoolbox/models/__init__.py
nhatsmrt/nn-toolbox
689b9924d3c88a433f8f350b89c13a878ac7d7c3
[ "Apache-2.0" ]
1
2019-08-07T10:07:09.000Z
2019-08-07T10:07:09.000Z
"""Abstraction for machine learning modelling (e.g classifier, ensemble, etc.)""" from .ensemble import * from .classifier import *
43.666667
81
0.755725
16
131
6.1875
0.75
0
0
0
0
0
0
0
0
0
0
0
0.122137
131
3
82
43.666667
0.86087
0.572519
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
39897afe32c27d5fc235b2a31b66615d13342807
456
py
Python
src/functions/damage_calc.py
tmaiello/rotmg-damage-calc
d6362794a24d625df29a8bcb6b9ce0f7309f2709
[ "MIT" ]
null
null
null
src/functions/damage_calc.py
tmaiello/rotmg-damage-calc
d6362794a24d625df29a8bcb6b9ce0f7309f2709
[ "MIT" ]
null
null
null
src/functions/damage_calc.py
tmaiello/rotmg-damage-calc
d6362794a24d625df29a8bcb6b9ce0f7309f2709
[ "MIT" ]
null
null
null
__author__ = "Tyler Maiello" from statistics import mean def damage_solve(character): return {"dps":((mean({character.slot_1['_min_damage'], character.slot_1['_max_damage']-1}) * (0.5 + character.att/50)) * character.slot_1['_num_projectiles']) * (1.5 + 6.5*(character.dex/75))} # return {"dps":((0.5 + character.att/50)*(mean({220,275})))} # return {"dps":((mean({220, 274}) * (0.5 + character.att/50)) * 1) * (1.5 + 6.5*(character.dex/75))}
57
196
0.635965
70
456
3.942857
0.414286
0.181159
0.152174
0.152174
0.304348
0.130435
0.130435
0
0
0
0
0.102244
0.120614
456
7
197
65.142857
0.586035
0.348684
0
0
0
0
0.183673
0
0
0
0
0
0
1
0.25
false
0
0.25
0.25
0.75
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
398c01a9467e4ea198ac33f727264f7ebd4ade2f
93
py
Python
cheeseclub/cheeseapp/apps.py
ejmcreates/cheeseclub-app
2bc0bdaf5f9f492528e72600fde2b5ddcdfb13bc
[ "Apache-2.0" ]
null
null
null
cheeseclub/cheeseapp/apps.py
ejmcreates/cheeseclub-app
2bc0bdaf5f9f492528e72600fde2b5ddcdfb13bc
[ "Apache-2.0" ]
null
null
null
cheeseclub/cheeseapp/apps.py
ejmcreates/cheeseclub-app
2bc0bdaf5f9f492528e72600fde2b5ddcdfb13bc
[ "Apache-2.0" ]
null
null
null
from django.apps import AppConfig class CheeseappConfig(AppConfig): name = 'cheeseapp'
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
39f09fb1463e67e1254ff69ee6f2f1b48e78e076
1,108
py
Python
gs/login/easylogin.py
groupserver/gs.login
ba5e171cec6ebfeb03a51ad3ef743f111572fee7
[ "ZPL-2.1" ]
null
null
null
gs/login/easylogin.py
groupserver/gs.login
ba5e171cec6ebfeb03a51ad3ef743f111572fee7
[ "ZPL-2.1" ]
null
null
null
gs/login/easylogin.py
groupserver/gs.login
ba5e171cec6ebfeb03a51ad3ef743f111572fee7
[ "ZPL-2.1" ]
null
null
null
# -*- coding: utf-8 -*- ############################################################################## # # Copyright © 2013 OnlineGroups.net and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. # ############################################################################## from __future__ import absolute_import from gs.viewlet import SiteViewlet from .util import seedGenerator class EasyLogin(SiteViewlet): @property def show(self): retval = self.loggedInUser.anonymous assert type(retval) == bool return retval def passwordsEncrypted(self): return bool(self.context.acl_users.encrypt_passwords) @property def encryptionSeed(self): return seedGenerator()
32.588235
78
0.628159
121
1,108
5.702479
0.68595
0.034783
0.04058
0
0
0
0
0
0
0
0
0.0076
0.168773
1,108
33
79
33.575758
0.740499
0.429603
0
0.142857
0
0
0
0
0
0
0
0
0.071429
1
0.214286
false
0.142857
0.214286
0.142857
0.714286
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
1
1
0
0
4
f2f9a1b2326a5c2754f6640290e6b97e72d39abb
139
py
Python
test/__init__.py
AnziiLuo/point_set_platform
fece24332c3e044f4ad892b8e8f446dc41d562b3
[ "MIT" ]
null
null
null
test/__init__.py
AnziiLuo/point_set_platform
fece24332c3e044f4ad892b8e8f446dc41d562b3
[ "MIT" ]
null
null
null
test/__init__.py
AnziiLuo/point_set_platform
fece24332c3e044f4ad892b8e8f446dc41d562b3
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: UTF-8 -*- """ @Project: point_set_platform @Author: anzii.Luo @Describe: @Date: 2021/8/3 """
15.444444
30
0.589928
19
139
4.210526
0.947368
0
0
0
0
0
0
0
0
0
0
0.061947
0.18705
139
8
31
17.375
0.646018
0.856115
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
8416ff5eb8cb61d12679ef47be36cefaaac4d98c
59
py
Python
tests/hardware_usage_notifier/cli/config/notifiers_test_instances/multiple_classes_in_file.py
ovidiupw/HardwareUsageNotifier
b5f600fa66c1ede1a2337c4a39fc6ec8a209dcf5
[ "MIT" ]
null
null
null
tests/hardware_usage_notifier/cli/config/notifiers_test_instances/multiple_classes_in_file.py
ovidiupw/HardwareUsageNotifier
b5f600fa66c1ede1a2337c4a39fc6ec8a209dcf5
[ "MIT" ]
null
null
null
tests/hardware_usage_notifier/cli/config/notifiers_test_instances/multiple_classes_in_file.py
ovidiupw/HardwareUsageNotifier
b5f600fa66c1ede1a2337c4a39fc6ec8a209dcf5
[ "MIT" ]
null
null
null
class Notifier: pass class AnotherNotifier: pass
8.428571
22
0.694915
6
59
6.833333
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.271186
59
6
23
9.833333
0.953488
0
0
0.5
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
84191d8721df23d467577b2d696e5f68aacd9184
3,503
py
Python
typingwarmup/layout.py
againagainst/typingwarmup
ac9ccdc910245049b085c39e02d703bf0fc8e621
[ "Unlicense" ]
null
null
null
typingwarmup/layout.py
againagainst/typingwarmup
ac9ccdc910245049b085c39e02d703bf0fc8e621
[ "Unlicense" ]
null
null
null
typingwarmup/layout.py
againagainst/typingwarmup
ac9ccdc910245049b085c39e02d703bf0fc8e621
[ "Unlicense" ]
null
null
null
from enum import Enum class Finger(Enum): left_pinky = "left pinky" left_ring = "left ring" left_middle = "left middle" left_index = "left index" any_thumb = "thumb" right_index = "right index" right_middle = "right middle" right_ring = "right ring" right_pinky = "right pinky" other = "other" ISO = { "`": Finger.left_pinky, "~": Finger.left_pinky, "1": Finger.left_pinky, "!": Finger.left_pinky, "q": Finger.left_pinky, "a": Finger.left_pinky, "z": Finger.left_pinky, "Q": Finger.left_pinky, "A": Finger.left_pinky, "Z": Finger.left_pinky, "2": Finger.left_ring, "@": Finger.left_ring, "w": Finger.left_ring, "W": Finger.left_ring, "s": Finger.left_ring, "S": Finger.left_ring, "x": Finger.left_ring, "X": Finger.left_ring, "3": Finger.left_middle, "#": Finger.left_middle, "e": Finger.left_middle, "E": Finger.left_middle, "d": Finger.left_middle, "D": Finger.left_middle, "c": Finger.left_middle, "C": Finger.left_middle, "4": Finger.left_index, "$": Finger.left_index, "r": Finger.left_index, "R": Finger.left_index, "f": Finger.left_index, "F": Finger.left_index, "v": Finger.left_index, "V": Finger.left_index, "5": Finger.left_index, "%": Finger.left_index, "t": Finger.left_index, "T": Finger.left_index, "g": Finger.left_index, "G": Finger.left_index, "b": Finger.left_index, "B": Finger.left_index, "6": Finger.right_index, "^": Finger.right_index, "y": Finger.right_index, "Y": Finger.right_index, "h": Finger.right_index, "H": Finger.right_index, "n": Finger.right_index, "N": Finger.right_index, "7": Finger.right_index, "&": Finger.right_index, "u": Finger.right_index, "U": Finger.right_index, "j": Finger.right_index, "J": Finger.right_index, "m": Finger.right_index, "M": Finger.right_index, "8": Finger.right_middle, "*": Finger.right_middle, "i": Finger.right_middle, "I": Finger.right_middle, "k": Finger.right_middle, "K": Finger.right_middle, ",": Finger.right_middle, "<": Finger.right_middle, "9": Finger.right_ring, "(": Finger.right_ring, "o": Finger.right_ring, "O": Finger.right_ring, "l": Finger.right_ring, "L": Finger.right_ring, ".": Finger.right_ring, ">": Finger.right_ring, "0": Finger.right_pinky, ")": Finger.right_pinky, "p": Finger.right_pinky, "P": Finger.right_pinky, ";": Finger.right_pinky, ":": Finger.right_pinky, "/": Finger.right_pinky, "?": Finger.right_pinky, "-": Finger.right_pinky, "_": Finger.right_pinky, "=": Finger.right_pinky, "+": Finger.right_pinky, "[": Finger.right_pinky, "{": Finger.right_pinky, "]": Finger.right_pinky, "}": Finger.right_pinky, "\\": Finger.right_pinky, "|": Finger.right_pinky, "'": Finger.right_pinky, '"': Finger.right_pinky, " ": Finger.any_thumb, # Special keys "\t": Finger.left_pinky, "⎀": Finger.left_pinky, "⏎": Finger.right_pinky, "⌫": Finger.right_pinky, "\n": Finger.right_pinky, "\x1b": Finger.right_pinky, # Extra keys "⇧": Finger.other, "⇩": Finger.other, "⇦": Finger.other, "⇨": Finger.other, "⇤": Finger.other, "⇥": Finger.other, "⌦": Finger.other, "⤒": Finger.other, "⤓": Finger.other, "⎊": Finger.other, }
26.537879
33
0.596346
450
3,503
4.424444
0.151111
0.309392
0.192868
0.198895
0.748368
0.748368
0.638373
0.195379
0.195379
0.195379
0
0.004029
0.220668
3,503
131
34
26.740458
0.720513
0.006566
0
0
0
0
0.060685
0
0
0
0
0
0
1
0
false
0
0.008
0
0.096
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
842dee7e7b4fdfdbbdda6b708fde5a51f847fe2c
147
py
Python
plugins/wikipedia/__init__.py
su226/IdhagnBot
a5db1b6ab69fdf67fd6e53a63b34c6bc863d6609
[ "MIT" ]
2
2022-02-14T06:37:05.000Z
2022-03-30T12:18:15.000Z
plugins/wikipedia/__init__.py
su226/IdhagnBot
a5db1b6ab69fdf67fd6e53a63b34c6bc863d6609
[ "MIT" ]
null
null
null
plugins/wikipedia/__init__.py
su226/IdhagnBot
a5db1b6ab69fdf67fd6e53a63b34c6bc863d6609
[ "MIT" ]
null
null
null
from .config import CONFIG from nonebot.log import logger if CONFIG.zim: from . import plugin as _ else: logger.info("没有提供ZIM文件,将不会加载维基百科插件")
18.375
38
0.761905
21
147
5.285714
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.156463
147
7
39
21
0.895161
0
0
0
0
0
0.142857
0.142857
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
fff8a34faf99c49f2230c34da9642c0e52ba77e9
3,470
py
Python
acceptance_tests/utilities/notify_helper.py
ONSdigital/ssdc-rm-acceptance-tests
eb842405a58ce24acd3c2972d39221cbcf0cbdf8
[ "MIT" ]
null
null
null
acceptance_tests/utilities/notify_helper.py
ONSdigital/ssdc-rm-acceptance-tests
eb842405a58ce24acd3c2972d39221cbcf0cbdf8
[ "MIT" ]
50
2021-06-21T06:52:19.000Z
2021-11-20T15:54:16.000Z
acceptance_tests/utilities/notify_helper.py
ONSdigital/ssdc-rm-acceptance-tests
eb842405a58ce24acd3c2972d39221cbcf0cbdf8
[ "MIT" ]
null
null
null
import json import requests from tenacity import retry, stop_after_delay, wait_fixed from acceptance_tests.utilities.test_case_helper import test_helper from config import Config def check_sms_fulfilment_response(sms_fulfilment_response, template): expect_uac_hash_and_qid_in_response = any( template_item in json.loads(template) for template_item in ['__qid__', '__uac__']) if expect_uac_hash_and_qid_in_response: test_helper.assertTrue(sms_fulfilment_response['uacHash'], f"sms_fulfilment_response uacHash not found: {sms_fulfilment_response}") test_helper.assertTrue(sms_fulfilment_response['qid'], f"sms_fulfilment_response qid not found: {sms_fulfilment_response}") else: test_helper.assertFalse( sms_fulfilment_response) # Empty JSON is expected response for non-UAC/QID template def check_email_fulfilment_response(email_fulfilment_response, template): expect_uac_hash_and_qid_in_response = any( template_item in json.loads(template) for template_item in ['__qid__', '__uac__']) if expect_uac_hash_and_qid_in_response: test_helper.assertTrue(email_fulfilment_response['uacHash'], f"email_fulfilment_response uacHash not found: {email_fulfilment_response}") test_helper.assertTrue(email_fulfilment_response['qid'], f"email_fulfilment_response qid not found: {email_fulfilment_response}") else: test_helper.assertFalse( email_fulfilment_response) # Empty JSON is expected response for non-UAC/QID template @retry(wait=wait_fixed(1), stop=stop_after_delay(30)) def check_notify_api_called_with_correct_notify_template_id(phone_number, notify_template_id): response = requests.get(f'{Config.NOTIFY_STUB_SERVICE}/log/sms') test_helper.assertEqual(response.status_code, 200, "Unexpected status code") response_json = response.json() test_helper.assertEqual(len(response_json), 1, f"Incorrect number of responses, response json {response_json}") test_helper.assertEqual(response_json[0]["phone_number"], phone_number, "Incorrect phone number, " f'response json {response_json}') test_helper.assertEqual(response_json[0]["template_id"], notify_template_id, f"Incorrect Gov Notify template Id, response json {response_json}") return response_json[0] @retry(wait=wait_fixed(1), stop=stop_after_delay(30)) def check_notify_api_called_with_correct_email_and_notify_template_id(email, notify_template_id): response = requests.get(f'{Config.NOTIFY_STUB_SERVICE}/log/email') test_helper.assertEqual(response.status_code, 200, "Unexpected status code") response_json = response.json() test_helper.assertEqual(len(response_json), 1, f"Incorrect number of responses, response json {response_json}") test_helper.assertEqual(response_json[0]["email_address"], email, "Incorrect email, " f'response json {response_json}') test_helper.assertEqual(response_json[0]["template_id"], notify_template_id, f"Incorrect Gov Notify template Id, response json {response_json}") return response_json[0] def reset_notify_stub(): requests.get(f'{Config.NOTIFY_STUB_SERVICE}/reset')
51.029412
115
0.712968
430
3,470
5.365116
0.174419
0.124837
0.081925
0.083225
0.815345
0.74599
0.708713
0.631123
0.631123
0.631123
0
0.007241
0.204035
3,470
67
116
51.791045
0.828023
0.032565
0
0.509804
0
0
0.257603
0.091831
0
0
0
0
0.27451
1
0.098039
false
0
0.098039
0
0.235294
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
08064ae9fc61ee88d3b7f688312ed8057b76e1ad
305
py
Python
test/test_day_03.py
jacobogomez/adventofcode2021
ce04ebfce991ce3fcdd8891ed19111c4f50a40ef
[ "MIT" ]
null
null
null
test/test_day_03.py
jacobogomez/adventofcode2021
ce04ebfce991ce3fcdd8891ed19111c4f50a40ef
[ "MIT" ]
null
null
null
test/test_day_03.py
jacobogomez/adventofcode2021
ce04ebfce991ce3fcdd8891ed19111c4f50a40ef
[ "MIT" ]
null
null
null
import pytest from adventofcode2021 import day_03 from .utils import load_file @pytest.fixture def input_file(): return load_file("input/day_03.txt") def test_day_03_part_one(input_file): part_one_answer = day_03.calculate_power_consumption(input_file) assert part_one_answer == 3958484
19.0625
68
0.793443
47
305
4.765957
0.489362
0.089286
0.116071
0
0
0
0
0
0
0
0
0.072243
0.137705
305
15
69
20.333333
0.779468
0
0
0
0
0
0.052459
0
0
0
0
0
0.111111
1
0.222222
false
0
0.333333
0.111111
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
0
0
1
1
1
0
0
4
0811bd2006046d19deea3fdf6bee40a65398753e
215
py
Python
SolotNet/trainers/train_factory.py
ASolot/light_obj_detection
ca141bbd1c9d4b79278130531f33a54a0052768d
[ "MIT" ]
1
2019-07-10T10:45:02.000Z
2019-07-10T10:45:02.000Z
SolotNet/trainers/train_factory.py
ASolot/light_obj_detection
ca141bbd1c9d4b79278130531f33a54a0052768d
[ "MIT" ]
null
null
null
SolotNet/trainers/train_factory.py
ASolot/light_obj_detection
ca141bbd1c9d4b79278130531f33a54a0052768d
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function from .ctdet import CtdetTrainer train_factory = { 'ctdet': CtdetTrainer, # 'yolo' : YOLOTrainer, }
17.916667
38
0.786047
24
215
6.416667
0.541667
0.194805
0.311688
0
0
0
0
0
0
0
0
0
0.153488
215
11
39
19.545455
0.846154
0.097674
0
0
0
0
0.026042
0
0
0
0
0
0
1
0
false
0
0.571429
0
0.571429
0.142857
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
0831b0ebdba057fa0d6fca8e235e59c6e256c7f2
61
py
Python
curami/preprocess/__init__.py
EBIBioSamples/curami-v2
671ec5f1d48b866c6ccb24fcddfb80610c377e07
[ "Apache-2.0" ]
null
null
null
curami/preprocess/__init__.py
EBIBioSamples/curami-v2
671ec5f1d48b866c6ccb24fcddfb80610c377e07
[ "Apache-2.0" ]
2
2020-07-02T13:56:03.000Z
2021-06-01T23:51:49.000Z
curami/preprocess/__init__.py
EBIBioSamples/curami-v2
671ec5f1d48b866c6ccb24fcddfb80610c377e07
[ "Apache-2.0" ]
null
null
null
if __name__ == "__main__": print("Preprocessing data")
12.2
31
0.655738
6
61
5.333333
1
0
0
0
0
0
0
0
0
0
0
0
0.196721
61
4
32
15.25
0.653061
0
0
0
0
0
0.440678
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
083cb7950977ead5e5f962ddee6bd4ca9da95dc1
33
py
Python
snippets/python/network/puppeteer/query_selector.py
c6401/Snippets
a88d97005658eeda99f1a2766e3d069a64e142cb
[ "MIT" ]
null
null
null
snippets/python/network/puppeteer/query_selector.py
c6401/Snippets
a88d97005658eeda99f1a2766e3d069a64e142cb
[ "MIT" ]
null
null
null
snippets/python/network/puppeteer/query_selector.py
c6401/Snippets
a88d97005658eeda99f1a2766e3d069a64e142cb
[ "MIT" ]
null
null
null
await (await page.J('')).click()
16.5
32
0.606061
5
33
4
0.8
0
0
0
0
0
0
0
0
0
0
0
0.090909
33
1
33
33
0.666667
0
0
0
0
0
0
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
0841d2621825699ef9f4ac1ffa4d6d3a698896a9
104
py
Python
board/sv6266_evb/ucube.py
ghsecuritylab/store
8e87ddd4a5046a4e8c7e344e935b246430f43bdf
[ "Apache-2.0" ]
4
2019-11-22T04:28:29.000Z
2021-07-06T10:45:10.000Z
board/sv6266_evb/ucube.py
ghsecuritylab/store
8e87ddd4a5046a4e8c7e344e935b246430f43bdf
[ "Apache-2.0" ]
1
2019-04-02T10:03:10.000Z
2019-04-02T10:03:10.000Z
board/sv6266_evb/ucube.py
ghsecuritylab/store
8e87ddd4a5046a4e8c7e344e935b246430f43bdf
[ "Apache-2.0" ]
6
2019-08-30T09:43:03.000Z
2021-04-05T04:20:41.000Z
linux_only_targets="athostapp coapapp helloworld http2app meshapp modbus_demo mqttapp tls udataapp yts"
52
103
0.875
14
104
6.285714
1
0
0
0
0
0
0
0
0
0
0
0.010638
0.096154
104
1
104
104
0.925532
0
0
0
0
0
0.788462
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
1
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
f23b46dae229b87a478d914c551d49cd22a75caa
62,274
py
Python
create_coco_tf_record.py
missingstuffedbun/detr
a510b053e4b18592319705b7012bdcb744bd40f2
[ "Apache-2.0" ]
null
null
null
create_coco_tf_record.py
missingstuffedbun/detr
a510b053e4b18592319705b7012bdcb744bd40f2
[ "Apache-2.0" ]
null
null
null
create_coco_tf_record.py
missingstuffedbun/detr
a510b053e4b18592319705b7012bdcb744bd40f2
[ "Apache-2.0" ]
null
null
null
警告:您目前连接的是 GPU 运行时,但是没有使用 GPU。 vit vit_ See code at https://github.com/google-research/vision_transformer/ See papers at Vision Transformer: https://arxiv.org/abs/2010.11929 MLP-Mixer: https://arxiv.org/abs/2105.01601 How to train your ViT: https://arxiv.org/abs/2106.10270 When Vision Transformers Outperform ResNets without Pretraining or Strong Data Augmentations: https://arxiv.org/abs/2106.01548 This Colab allows you to run the JAX implementation of the Vision Transformer. If you just want to load a pre-trained checkpoint from a large repository and directly use it for inference, you probably want to go the other Colab https://colab.sandbox.google.com/github/google-research/vision_transformer/blob/linen/vit_jax_augreg.ipynb [2] %%bash pip install oss2 pip install tensorflow-object-detection-api [3] 26 秒 import os from google.colab import drive import oss2 drive.mount('/content/drive',force_remount=True) os.chdir("/content/drive/MyDrive/Colab Notebooks") Mounted at /content/drive [4] 1 分钟 %%bash # git clone https://github.com/missingstuffedbun/detr.git # git clone https://github.com/tensorflow/models.git # git clone --depth=1 https://github.com/google-research/vision_transformer pip install -qr vision_transformer/vit_jax/requirements.txt ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. yellowbrick 1.3.post1 requires numpy<1.20,>=1.16.0, but you have numpy 1.21.5 which is incompatible. datascience 0.10.6 requires folium==0.2.1, but you have folium 0.8.3 which is incompatible. albumentations 0.1.12 requires imgaug<0.2.7,>=0.2.5, but you have imgaug 0.2.9 which is incompatible. [5] 0 秒 # %%bash # gsutil ls -lh gs://vit_models/imagenet* # gsutil ls -lh gs://vit_models/sam # gsutil ls -lh gs://mixer_models/* [6] 0 秒 # # Download a pre-trained model. # # Note: you can really choose any of the above, but this Colab has been tested # # with the models of below selection... # model_name = 'Mixer-B_16' #@param ["ViT-B_32", "Mixer-B_16"] # if model_name.startswith('ViT'): # ![ -e "$model_name".npz ] || gsutil cp gs://vit_models/imagenet21k/"$model_name".npz . # if model_name.startswith('Mixer'): # ![ -e "$model_name".npz ] || gsutil cp gs://mixer_models/imagenet21k/"$model_name".npz . # import os # assert os.path.exists(f'{model_name}.npz') [7] 0 秒 os.environ['DATAPATH'] = '/content' [8] 7 秒 %%bash mkdir -p /content/input mkdir -p /content/working mkdir -p /content/input/sarship mkdir -p /content/input/sarship/train mkdir -p /content/input/sarship/val mkdir -p /content/input/sarship/test tar -C /content/input/sarship/train -xf ./sarship/train.tar tar -C /content/input/sarship/val -xf ./sarship/val.tar tar -C /content/input/sarship/test -xf ./sarship/test.tar mkdir /content/input/tf [9] 7 秒 ali_key = 'LTAI5tDZzxHjQET1nQa1z1Pg' ali_token = 'kYoV38UUEHK5ha2UTiVa0bm6s38aMF' auth = oss2.Auth(ali_key, ali_token) bucket = oss2.Bucket(auth, 'https://oss-cn-shenzhen.aliyuncs.com', 'missingstuffedbun-shelter227') bucket.get_object_to_file('custom_train.json', '{}/working/custom_train.json'.format(os.environ['DATAPATH'])) bucket.get_object_to_file('custom_val.json', '{}/working/custom_val.json'.format(os.environ['DATAPATH'])) bucket.get_object_to_file('custom_test.json', '{}/working/custom_test.json'.format(os.environ['DATAPATH'])) <oss2.models.GetObjectResult at 0x7f89394a3ed0> [19] 2 秒 ! rm -rf detr && git clone https://github.com/missingstuffedbun/detr.git Cloning into 'detr'... remote: Enumerating objects: 296, done. remote: Counting objects: 100% (12/12), done. remote: Compressing objects: 100% (12/12), done. remote: Total 296 (delta 6), reused 0 (delta 0), pack-reused 284 Receiving objects: 100% (296/296), 12.86 MiB | 17.46 MiB/s, done. Resolving deltas: 100% (162/162), done. [31] 22 秒 %%bash python detr/create_coco_tf_record.py --logtostderr \ --train_image_dir=$DATAPATH/input/sarship/train/train \ --val_image_dir=$DATAPATH/input/sarship/val/val \ --test_image_dir=$DATAPATH/input/sarship/test/test \ --train_annotations_file=$DATAPATH/working/custom_train.json \ --val_annotations_file=$DATAPATH/working/custom_val.json \ --test_annotations_file=$DATAPATH/working/custom_test.json \ --output_dir=$DATAPATH/input/tf INFO:tensorflow:Found groundtruth annotations. Building annotations index. I0209 07:29:29.604328 140107823540096 create_coco_tf_record.py:209] Found groundtruth annotations. Building annotations index. INFO:tensorflow:0 images are missing annotations. I0209 07:29:29.628294 140107823540096 create_coco_tf_record.py:222] 0 images are missing annotations. INFO:tensorflow:On image 0 of 30674 I0209 07:29:29.628699 140107823540096 create_coco_tf_record.py:227] On image 0 of 30674 INFO:tensorflow:On image 100 of 30674 I0209 07:29:29.693423 140107823540096 create_coco_tf_record.py:227] On image 100 of 30674 INFO:tensorflow:On image 200 of 30674 I0209 07:29:29.739282 140107823540096 create_coco_tf_record.py:227] On image 200 of 30674 INFO:tensorflow:On image 300 of 30674 I0209 07:29:29.788515 140107823540096 create_coco_tf_record.py:227] On image 300 of 30674 INFO:tensorflow:On image 400 of 30674 I0209 07:29:29.836873 140107823540096 create_coco_tf_record.py:227] On image 400 of 30674 INFO:tensorflow:On image 500 of 30674 I0209 07:29:29.885482 140107823540096 create_coco_tf_record.py:227] On image 500 of 30674 INFO:tensorflow:On image 600 of 30674 I0209 07:29:29.933938 140107823540096 create_coco_tf_record.py:227] On image 600 of 30674 INFO:tensorflow:On image 700 of 30674 I0209 07:29:29.982747 140107823540096 create_coco_tf_record.py:227] On image 700 of 30674 INFO:tensorflow:On image 800 of 30674 I0209 07:29:30.032539 140107823540096 create_coco_tf_record.py:227] On image 800 of 30674 INFO:tensorflow:On image 900 of 30674 I0209 07:29:30.083466 140107823540096 create_coco_tf_record.py:227] On image 900 of 30674 INFO:tensorflow:On image 1000 of 30674 I0209 07:29:30.131664 140107823540096 create_coco_tf_record.py:227] On image 1000 of 30674 INFO:tensorflow:On image 1100 of 30674 I0209 07:29:30.180252 140107823540096 create_coco_tf_record.py:227] On image 1100 of 30674 INFO:tensorflow:On image 1200 of 30674 I0209 07:29:30.228890 140107823540096 create_coco_tf_record.py:227] On image 1200 of 30674 INFO:tensorflow:On image 1300 of 30674 I0209 07:29:30.277408 140107823540096 create_coco_tf_record.py:227] On image 1300 of 30674 INFO:tensorflow:On image 1400 of 30674 I0209 07:29:30.326297 140107823540096 create_coco_tf_record.py:227] On image 1400 of 30674 INFO:tensorflow:On image 1500 of 30674 I0209 07:29:30.376172 140107823540096 create_coco_tf_record.py:227] On image 1500 of 30674 INFO:tensorflow:On image 1600 of 30674 I0209 07:29:30.424551 140107823540096 create_coco_tf_record.py:227] On image 1600 of 30674 INFO:tensorflow:On image 1700 of 30674 I0209 07:29:30.473644 140107823540096 create_coco_tf_record.py:227] On image 1700 of 30674 INFO:tensorflow:On image 1800 of 30674 I0209 07:29:30.522514 140107823540096 create_coco_tf_record.py:227] On image 1800 of 30674 INFO:tensorflow:On image 1900 of 30674 I0209 07:29:30.570660 140107823540096 create_coco_tf_record.py:227] On image 1900 of 30674 INFO:tensorflow:On image 2000 of 30674 I0209 07:29:30.625664 140107823540096 create_coco_tf_record.py:227] On image 2000 of 30674 INFO:tensorflow:On image 2100 of 30674 I0209 07:29:30.678481 140107823540096 create_coco_tf_record.py:227] On image 2100 of 30674 INFO:tensorflow:On image 2200 of 30674 I0209 07:29:30.726355 140107823540096 create_coco_tf_record.py:227] On image 2200 of 30674 INFO:tensorflow:On image 2300 of 30674 I0209 07:29:30.773896 140107823540096 create_coco_tf_record.py:227] On image 2300 of 30674 INFO:tensorflow:On image 2400 of 30674 I0209 07:29:30.822477 140107823540096 create_coco_tf_record.py:227] On image 2400 of 30674 INFO:tensorflow:On image 2500 of 30674 I0209 07:29:30.871159 140107823540096 create_coco_tf_record.py:227] On image 2500 of 30674 INFO:tensorflow:On image 2600 of 30674 I0209 07:29:30.919014 140107823540096 create_coco_tf_record.py:227] On image 2600 of 30674 INFO:tensorflow:On image 2700 of 30674 I0209 07:29:30.969668 140107823540096 create_coco_tf_record.py:227] On image 2700 of 30674 INFO:tensorflow:On image 2800 of 30674 I0209 07:29:31.022307 140107823540096 create_coco_tf_record.py:227] On image 2800 of 30674 INFO:tensorflow:On image 2900 of 30674 I0209 07:29:31.073893 140107823540096 create_coco_tf_record.py:227] On image 2900 of 30674 INFO:tensorflow:On image 3000 of 30674 I0209 07:29:31.125197 140107823540096 create_coco_tf_record.py:227] On image 3000 of 30674 INFO:tensorflow:On image 3100 of 30674 I0209 07:29:31.180253 140107823540096 create_coco_tf_record.py:227] On image 3100 of 30674 INFO:tensorflow:On image 3200 of 30674 I0209 07:29:31.235112 140107823540096 create_coco_tf_record.py:227] On image 3200 of 30674 INFO:tensorflow:On image 3300 of 30674 I0209 07:29:31.288720 140107823540096 create_coco_tf_record.py:227] On image 3300 of 30674 INFO:tensorflow:On image 3400 of 30674 I0209 07:29:31.340614 140107823540096 create_coco_tf_record.py:227] On image 3400 of 30674 INFO:tensorflow:On image 3500 of 30674 I0209 07:29:31.393158 140107823540096 create_coco_tf_record.py:227] On image 3500 of 30674 INFO:tensorflow:On image 3600 of 30674 I0209 07:29:31.442740 140107823540096 create_coco_tf_record.py:227] On image 3600 of 30674 INFO:tensorflow:On image 3700 of 30674 I0209 07:29:31.491904 140107823540096 create_coco_tf_record.py:227] On image 3700 of 30674 INFO:tensorflow:On image 3800 of 30674 I0209 07:29:31.539294 140107823540096 create_coco_tf_record.py:227] On image 3800 of 30674 INFO:tensorflow:On image 3900 of 30674 I0209 07:29:31.587508 140107823540096 create_coco_tf_record.py:227] On image 3900 of 30674 INFO:tensorflow:On image 4000 of 30674 I0209 07:29:31.641140 140107823540096 create_coco_tf_record.py:227] On image 4000 of 30674 INFO:tensorflow:On image 4100 of 30674 I0209 07:29:31.706291 140107823540096 create_coco_tf_record.py:227] On image 4100 of 30674 INFO:tensorflow:On image 4200 of 30674 I0209 07:29:31.756948 140107823540096 create_coco_tf_record.py:227] On image 4200 of 30674 INFO:tensorflow:On image 4300 of 30674 I0209 07:29:31.805401 140107823540096 create_coco_tf_record.py:227] On image 4300 of 30674 INFO:tensorflow:On image 4400 of 30674 I0209 07:29:31.855589 140107823540096 create_coco_tf_record.py:227] On image 4400 of 30674 INFO:tensorflow:On image 4500 of 30674 I0209 07:29:31.914511 140107823540096 create_coco_tf_record.py:227] On image 4500 of 30674 INFO:tensorflow:On image 4600 of 30674 I0209 07:29:31.963276 140107823540096 create_coco_tf_record.py:227] On image 4600 of 30674 INFO:tensorflow:On image 4700 of 30674 I0209 07:29:32.013589 140107823540096 create_coco_tf_record.py:227] On image 4700 of 30674 INFO:tensorflow:On image 4800 of 30674 I0209 07:29:32.061713 140107823540096 create_coco_tf_record.py:227] On image 4800 of 30674 INFO:tensorflow:On image 4900 of 30674 I0209 07:29:32.108964 140107823540096 create_coco_tf_record.py:227] On image 4900 of 30674 INFO:tensorflow:On image 5000 of 30674 I0209 07:29:32.158765 140107823540096 create_coco_tf_record.py:227] On image 5000 of 30674 INFO:tensorflow:On image 5100 of 30674 I0209 07:29:32.206059 140107823540096 create_coco_tf_record.py:227] On image 5100 of 30674 INFO:tensorflow:On image 5200 of 30674 I0209 07:29:32.253255 140107823540096 create_coco_tf_record.py:227] On image 5200 of 30674 INFO:tensorflow:On image 5300 of 30674 I0209 07:29:32.301648 140107823540096 create_coco_tf_record.py:227] On image 5300 of 30674 INFO:tensorflow:On image 5400 of 30674 I0209 07:29:32.349104 140107823540096 create_coco_tf_record.py:227] On image 5400 of 30674 INFO:tensorflow:On image 5500 of 30674 I0209 07:29:32.397424 140107823540096 create_coco_tf_record.py:227] On image 5500 of 30674 INFO:tensorflow:On image 5600 of 30674 I0209 07:29:32.445731 140107823540096 create_coco_tf_record.py:227] On image 5600 of 30674 INFO:tensorflow:On image 5700 of 30674 I0209 07:29:32.498605 140107823540096 create_coco_tf_record.py:227] On image 5700 of 30674 INFO:tensorflow:On image 5800 of 30674 I0209 07:29:32.550360 140107823540096 create_coco_tf_record.py:227] On image 5800 of 30674 INFO:tensorflow:On image 5900 of 30674 I0209 07:29:32.603603 140107823540096 create_coco_tf_record.py:227] On image 5900 of 30674 INFO:tensorflow:On image 6000 of 30674 I0209 07:29:32.663421 140107823540096 create_coco_tf_record.py:227] On image 6000 of 30674 INFO:tensorflow:On image 6100 of 30674 I0209 07:29:32.715036 140107823540096 create_coco_tf_record.py:227] On image 6100 of 30674 INFO:tensorflow:On image 6200 of 30674 I0209 07:29:32.766527 140107823540096 create_coco_tf_record.py:227] On image 6200 of 30674 INFO:tensorflow:On image 6300 of 30674 I0209 07:29:32.817535 140107823540096 create_coco_tf_record.py:227] On image 6300 of 30674 INFO:tensorflow:On image 6400 of 30674 I0209 07:29:32.868805 140107823540096 create_coco_tf_record.py:227] On image 6400 of 30674 INFO:tensorflow:On image 6500 of 30674 I0209 07:29:32.917942 140107823540096 create_coco_tf_record.py:227] On image 6500 of 30674 INFO:tensorflow:On image 6600 of 30674 I0209 07:29:32.966505 140107823540096 create_coco_tf_record.py:227] On image 6600 of 30674 INFO:tensorflow:On image 6700 of 30674 I0209 07:29:33.017308 140107823540096 create_coco_tf_record.py:227] On image 6700 of 30674 INFO:tensorflow:On image 6800 of 30674 I0209 07:29:33.070329 140107823540096 create_coco_tf_record.py:227] On image 6800 of 30674 INFO:tensorflow:On image 6900 of 30674 I0209 07:29:33.121753 140107823540096 create_coco_tf_record.py:227] On image 6900 of 30674 INFO:tensorflow:On image 7000 of 30674 I0209 07:29:33.172006 140107823540096 create_coco_tf_record.py:227] On image 7000 of 30674 INFO:tensorflow:On image 7100 of 30674 I0209 07:29:33.221570 140107823540096 create_coco_tf_record.py:227] On image 7100 of 30674 INFO:tensorflow:On image 7200 of 30674 I0209 07:29:33.272365 140107823540096 create_coco_tf_record.py:227] On image 7200 of 30674 INFO:tensorflow:On image 7300 of 30674 I0209 07:29:33.323337 140107823540096 create_coco_tf_record.py:227] On image 7300 of 30674 INFO:tensorflow:On image 7400 of 30674 I0209 07:29:33.374330 140107823540096 create_coco_tf_record.py:227] On image 7400 of 30674 INFO:tensorflow:On image 7500 of 30674 I0209 07:29:33.427039 140107823540096 create_coco_tf_record.py:227] On image 7500 of 30674 INFO:tensorflow:On image 7600 of 30674 I0209 07:29:33.480286 140107823540096 create_coco_tf_record.py:227] On image 7600 of 30674 INFO:tensorflow:On image 7700 of 30674 I0209 07:29:33.534773 140107823540096 create_coco_tf_record.py:227] On image 7700 of 30674 INFO:tensorflow:On image 7800 of 30674 I0209 07:29:33.588568 140107823540096 create_coco_tf_record.py:227] On image 7800 of 30674 INFO:tensorflow:On image 7900 of 30674 I0209 07:29:33.641003 140107823540096 create_coco_tf_record.py:227] On image 7900 of 30674 INFO:tensorflow:On image 8000 of 30674 I0209 07:29:33.699128 140107823540096 create_coco_tf_record.py:227] On image 8000 of 30674 INFO:tensorflow:On image 8100 of 30674 I0209 07:29:33.751177 140107823540096 create_coco_tf_record.py:227] On image 8100 of 30674 INFO:tensorflow:On image 8200 of 30674 I0209 07:29:33.804744 140107823540096 create_coco_tf_record.py:227] On image 8200 of 30674 INFO:tensorflow:On image 8300 of 30674 I0209 07:29:33.856283 140107823540096 create_coco_tf_record.py:227] On image 8300 of 30674 INFO:tensorflow:On image 8400 of 30674 I0209 07:29:33.907517 140107823540096 create_coco_tf_record.py:227] On image 8400 of 30674 INFO:tensorflow:On image 8500 of 30674 I0209 07:29:33.957587 140107823540096 create_coco_tf_record.py:227] On image 8500 of 30674 INFO:tensorflow:On image 8600 of 30674 I0209 07:29:34.009991 140107823540096 create_coco_tf_record.py:227] On image 8600 of 30674 INFO:tensorflow:On image 8700 of 30674 I0209 07:29:34.062829 140107823540096 create_coco_tf_record.py:227] On image 8700 of 30674 INFO:tensorflow:On image 8800 of 30674 I0209 07:29:34.113940 140107823540096 create_coco_tf_record.py:227] On image 8800 of 30674 INFO:tensorflow:On image 8900 of 30674 I0209 07:29:34.162796 140107823540096 create_coco_tf_record.py:227] On image 8900 of 30674 INFO:tensorflow:On image 9000 of 30674 I0209 07:29:34.212890 140107823540096 create_coco_tf_record.py:227] On image 9000 of 30674 INFO:tensorflow:On image 9100 of 30674 I0209 07:29:34.262891 140107823540096 create_coco_tf_record.py:227] On image 9100 of 30674 INFO:tensorflow:On image 9200 of 30674 I0209 07:29:34.312553 140107823540096 create_coco_tf_record.py:227] On image 9200 of 30674 INFO:tensorflow:On image 9300 of 30674 I0209 07:29:34.360566 140107823540096 create_coco_tf_record.py:227] On image 9300 of 30674 INFO:tensorflow:On image 9400 of 30674 I0209 07:29:34.410058 140107823540096 create_coco_tf_record.py:227] On image 9400 of 30674 INFO:tensorflow:On image 9500 of 30674 I0209 07:29:34.457823 140107823540096 create_coco_tf_record.py:227] On image 9500 of 30674 INFO:tensorflow:On image 9600 of 30674 I0209 07:29:34.506357 140107823540096 create_coco_tf_record.py:227] On image 9600 of 30674 INFO:tensorflow:On image 9700 of 30674 I0209 07:29:34.555117 140107823540096 create_coco_tf_record.py:227] On image 9700 of 30674 INFO:tensorflow:On image 9800 of 30674 I0209 07:29:34.604174 140107823540096 create_coco_tf_record.py:227] On image 9800 of 30674 INFO:tensorflow:On image 9900 of 30674 I0209 07:29:34.652172 140107823540096 create_coco_tf_record.py:227] On image 9900 of 30674 INFO:tensorflow:On image 10000 of 30674 I0209 07:29:34.708081 140107823540096 create_coco_tf_record.py:227] On image 10000 of 30674 INFO:tensorflow:On image 10100 of 30674 I0209 07:29:34.758643 140107823540096 create_coco_tf_record.py:227] On image 10100 of 30674 INFO:tensorflow:On image 10200 of 30674 I0209 07:29:34.811463 140107823540096 create_coco_tf_record.py:227] On image 10200 of 30674 INFO:tensorflow:On image 10300 of 30674 I0209 07:29:34.865577 140107823540096 create_coco_tf_record.py:227] On image 10300 of 30674 INFO:tensorflow:On image 10400 of 30674 I0209 07:29:34.920887 140107823540096 create_coco_tf_record.py:227] On image 10400 of 30674 INFO:tensorflow:On image 10500 of 30674 I0209 07:29:34.968788 140107823540096 create_coco_tf_record.py:227] On image 10500 of 30674 INFO:tensorflow:On image 10600 of 30674 I0209 07:29:35.017005 140107823540096 create_coco_tf_record.py:227] On image 10600 of 30674 INFO:tensorflow:On image 10700 of 30674 I0209 07:29:35.065187 140107823540096 create_coco_tf_record.py:227] On image 10700 of 30674 INFO:tensorflow:On image 10800 of 30674 I0209 07:29:35.112729 140107823540096 create_coco_tf_record.py:227] On image 10800 of 30674 INFO:tensorflow:On image 10900 of 30674 I0209 07:29:35.160662 140107823540096 create_coco_tf_record.py:227] On image 10900 of 30674 INFO:tensorflow:On image 11000 of 30674 I0209 07:29:35.210297 140107823540096 create_coco_tf_record.py:227] On image 11000 of 30674 INFO:tensorflow:On image 11100 of 30674 I0209 07:29:35.259209 140107823540096 create_coco_tf_record.py:227] On image 11100 of 30674 INFO:tensorflow:On image 11200 of 30674 I0209 07:29:35.308124 140107823540096 create_coco_tf_record.py:227] On image 11200 of 30674 INFO:tensorflow:On image 11300 of 30674 I0209 07:29:35.356585 140107823540096 create_coco_tf_record.py:227] On image 11300 of 30674 INFO:tensorflow:On image 11400 of 30674 I0209 07:29:35.406039 140107823540096 create_coco_tf_record.py:227] On image 11400 of 30674 INFO:tensorflow:On image 11500 of 30674 I0209 07:29:35.453847 140107823540096 create_coco_tf_record.py:227] On image 11500 of 30674 INFO:tensorflow:On image 11600 of 30674 I0209 07:29:35.501962 140107823540096 create_coco_tf_record.py:227] On image 11600 of 30674 INFO:tensorflow:On image 11700 of 30674 I0209 07:29:35.550579 140107823540096 create_coco_tf_record.py:227] On image 11700 of 30674 INFO:tensorflow:On image 11800 of 30674 I0209 07:29:35.600432 140107823540096 create_coco_tf_record.py:227] On image 11800 of 30674 INFO:tensorflow:On image 11900 of 30674 I0209 07:29:35.648861 140107823540096 create_coco_tf_record.py:227] On image 11900 of 30674 INFO:tensorflow:On image 12000 of 30674 I0209 07:29:35.703112 140107823540096 create_coco_tf_record.py:227] On image 12000 of 30674 INFO:tensorflow:On image 12100 of 30674 I0209 07:29:35.751890 140107823540096 create_coco_tf_record.py:227] On image 12100 of 30674 INFO:tensorflow:On image 12200 of 30674 I0209 07:29:35.800720 140107823540096 create_coco_tf_record.py:227] On image 12200 of 30674 INFO:tensorflow:On image 12300 of 30674 I0209 07:29:35.849707 140107823540096 create_coco_tf_record.py:227] On image 12300 of 30674 INFO:tensorflow:On image 12400 of 30674 I0209 07:29:35.897886 140107823540096 create_coco_tf_record.py:227] On image 12400 of 30674 INFO:tensorflow:On image 12500 of 30674 I0209 07:29:35.946547 140107823540096 create_coco_tf_record.py:227] On image 12500 of 30674 INFO:tensorflow:On image 12600 of 30674 I0209 07:29:35.994341 140107823540096 create_coco_tf_record.py:227] On image 12600 of 30674 INFO:tensorflow:On image 12700 of 30674 I0209 07:29:36.041957 140107823540096 create_coco_tf_record.py:227] On image 12700 of 30674 INFO:tensorflow:On image 12800 of 30674 I0209 07:29:36.090595 140107823540096 create_coco_tf_record.py:227] On image 12800 of 30674 INFO:tensorflow:On image 12900 of 30674 I0209 07:29:36.137639 140107823540096 create_coco_tf_record.py:227] On image 12900 of 30674 INFO:tensorflow:On image 13000 of 30674 I0209 07:29:36.184721 140107823540096 create_coco_tf_record.py:227] On image 13000 of 30674 INFO:tensorflow:On image 13100 of 30674 I0209 07:29:36.231119 140107823540096 create_coco_tf_record.py:227] On image 13100 of 30674 INFO:tensorflow:On image 13200 of 30674 I0209 07:29:36.279808 140107823540096 create_coco_tf_record.py:227] On image 13200 of 30674 INFO:tensorflow:On image 13300 of 30674 I0209 07:29:36.326981 140107823540096 create_coco_tf_record.py:227] On image 13300 of 30674 INFO:tensorflow:On image 13400 of 30674 I0209 07:29:36.391495 140107823540096 create_coco_tf_record.py:227] On image 13400 of 30674 INFO:tensorflow:On image 13500 of 30674 I0209 07:29:36.439026 140107823540096 create_coco_tf_record.py:227] On image 13500 of 30674 INFO:tensorflow:On image 13600 of 30674 I0209 07:29:36.487044 140107823540096 create_coco_tf_record.py:227] On image 13600 of 30674 INFO:tensorflow:On image 13700 of 30674 I0209 07:29:36.534248 140107823540096 create_coco_tf_record.py:227] On image 13700 of 30674 INFO:tensorflow:On image 13800 of 30674 I0209 07:29:36.582198 140107823540096 create_coco_tf_record.py:227] On image 13800 of 30674 INFO:tensorflow:On image 13900 of 30674 I0209 07:29:36.630027 140107823540096 create_coco_tf_record.py:227] On image 13900 of 30674 INFO:tensorflow:On image 14000 of 30674 I0209 07:29:36.697473 140107823540096 create_coco_tf_record.py:227] On image 14000 of 30674 INFO:tensorflow:On image 14100 of 30674 I0209 07:29:36.750743 140107823540096 create_coco_tf_record.py:227] On image 14100 of 30674 INFO:tensorflow:On image 14200 of 30674 I0209 07:29:36.798691 140107823540096 create_coco_tf_record.py:227] On image 14200 of 30674 INFO:tensorflow:On image 14300 of 30674 I0209 07:29:36.847404 140107823540096 create_coco_tf_record.py:227] On image 14300 of 30674 INFO:tensorflow:On image 14400 of 30674 I0209 07:29:36.900060 140107823540096 create_coco_tf_record.py:227] On image 14400 of 30674 INFO:tensorflow:On image 14500 of 30674 I0209 07:29:36.957095 140107823540096 create_coco_tf_record.py:227] On image 14500 of 30674 INFO:tensorflow:On image 14600 of 30674 I0209 07:29:37.009072 140107823540096 create_coco_tf_record.py:227] On image 14600 of 30674 INFO:tensorflow:On image 14700 of 30674 I0209 07:29:37.059747 140107823540096 create_coco_tf_record.py:227] On image 14700 of 30674 INFO:tensorflow:On image 14800 of 30674 I0209 07:29:37.109611 140107823540096 create_coco_tf_record.py:227] On image 14800 of 30674 INFO:tensorflow:On image 14900 of 30674 I0209 07:29:37.163706 140107823540096 create_coco_tf_record.py:227] On image 14900 of 30674 INFO:tensorflow:On image 15000 of 30674 I0209 07:29:37.215618 140107823540096 create_coco_tf_record.py:227] On image 15000 of 30674 INFO:tensorflow:On image 15100 of 30674 I0209 07:29:37.264515 140107823540096 create_coco_tf_record.py:227] On image 15100 of 30674 INFO:tensorflow:On image 15200 of 30674 I0209 07:29:37.313587 140107823540096 create_coco_tf_record.py:227] On image 15200 of 30674 INFO:tensorflow:On image 15300 of 30674 I0209 07:29:37.366154 140107823540096 create_coco_tf_record.py:227] On image 15300 of 30674 INFO:tensorflow:On image 15400 of 30674 I0209 07:29:37.416051 140107823540096 create_coco_tf_record.py:227] On image 15400 of 30674 INFO:tensorflow:On image 15500 of 30674 I0209 07:29:37.464270 140107823540096 create_coco_tf_record.py:227] On image 15500 of 30674 INFO:tensorflow:On image 15600 of 30674 I0209 07:29:37.513511 140107823540096 create_coco_tf_record.py:227] On image 15600 of 30674 INFO:tensorflow:On image 15700 of 30674 I0209 07:29:37.562650 140107823540096 create_coco_tf_record.py:227] On image 15700 of 30674 INFO:tensorflow:On image 15800 of 30674 I0209 07:29:37.611023 140107823540096 create_coco_tf_record.py:227] On image 15800 of 30674 INFO:tensorflow:On image 15900 of 30674 I0209 07:29:37.659338 140107823540096 create_coco_tf_record.py:227] On image 15900 of 30674 INFO:tensorflow:On image 16000 of 30674 I0209 07:29:37.707298 140107823540096 create_coco_tf_record.py:227] On image 16000 of 30674 INFO:tensorflow:On image 16100 of 30674 I0209 07:29:37.761783 140107823540096 create_coco_tf_record.py:227] On image 16100 of 30674 INFO:tensorflow:On image 16200 of 30674 I0209 07:29:37.810244 140107823540096 create_coco_tf_record.py:227] On image 16200 of 30674 INFO:tensorflow:On image 16300 of 30674 I0209 07:29:37.858860 140107823540096 create_coco_tf_record.py:227] On image 16300 of 30674 INFO:tensorflow:On image 16400 of 30674 I0209 07:29:37.906785 140107823540096 create_coco_tf_record.py:227] On image 16400 of 30674 INFO:tensorflow:On image 16500 of 30674 I0209 07:29:37.954585 140107823540096 create_coco_tf_record.py:227] On image 16500 of 30674 INFO:tensorflow:On image 16600 of 30674 I0209 07:29:38.002529 140107823540096 create_coco_tf_record.py:227] On image 16600 of 30674 INFO:tensorflow:On image 16700 of 30674 I0209 07:29:38.051216 140107823540096 create_coco_tf_record.py:227] On image 16700 of 30674 INFO:tensorflow:On image 16800 of 30674 I0209 07:29:38.098484 140107823540096 create_coco_tf_record.py:227] On image 16800 of 30674 INFO:tensorflow:On image 16900 of 30674 I0209 07:29:38.146377 140107823540096 create_coco_tf_record.py:227] On image 16900 of 30674 INFO:tensorflow:On image 17000 of 30674 I0209 07:29:38.196822 140107823540096 create_coco_tf_record.py:227] On image 17000 of 30674 INFO:tensorflow:On image 17100 of 30674 I0209 07:29:38.245764 140107823540096 create_coco_tf_record.py:227] On image 17100 of 30674 INFO:tensorflow:On image 17200 of 30674 I0209 07:29:38.293771 140107823540096 create_coco_tf_record.py:227] On image 17200 of 30674 INFO:tensorflow:On image 17300 of 30674 I0209 07:29:38.341681 140107823540096 create_coco_tf_record.py:227] On image 17300 of 30674 INFO:tensorflow:On image 17400 of 30674 I0209 07:29:38.390666 140107823540096 create_coco_tf_record.py:227] On image 17400 of 30674 INFO:tensorflow:On image 17500 of 30674 I0209 07:29:38.438493 140107823540096 create_coco_tf_record.py:227] On image 17500 of 30674 INFO:tensorflow:On image 17600 of 30674 I0209 07:29:38.489065 140107823540096 create_coco_tf_record.py:227] On image 17600 of 30674 INFO:tensorflow:On image 17700 of 30674 I0209 07:29:38.545770 140107823540096 create_coco_tf_record.py:227] On image 17700 of 30674 INFO:tensorflow:On image 17800 of 30674 I0209 07:29:38.600012 140107823540096 create_coco_tf_record.py:227] On image 17800 of 30674 INFO:tensorflow:On image 17900 of 30674 I0209 07:29:38.651055 140107823540096 create_coco_tf_record.py:227] On image 17900 of 30674 INFO:tensorflow:On image 18000 of 30674 I0209 07:29:38.700518 140107823540096 create_coco_tf_record.py:227] On image 18000 of 30674 INFO:tensorflow:On image 18100 of 30674 I0209 07:29:38.752946 140107823540096 create_coco_tf_record.py:227] On image 18100 of 30674 INFO:tensorflow:On image 18200 of 30674 I0209 07:29:38.803449 140107823540096 create_coco_tf_record.py:227] On image 18200 of 30674 INFO:tensorflow:On image 18300 of 30674 I0209 07:29:38.852744 140107823540096 create_coco_tf_record.py:227] On image 18300 of 30674 INFO:tensorflow:On image 18400 of 30674 I0209 07:29:38.901023 140107823540096 create_coco_tf_record.py:227] On image 18400 of 30674 INFO:tensorflow:On image 18500 of 30674 I0209 07:29:38.949615 140107823540096 create_coco_tf_record.py:227] On image 18500 of 30674 INFO:tensorflow:On image 18600 of 30674 I0209 07:29:38.997643 140107823540096 create_coco_tf_record.py:227] On image 18600 of 30674 INFO:tensorflow:On image 18700 of 30674 I0209 07:29:39.046510 140107823540096 create_coco_tf_record.py:227] On image 18700 of 30674 INFO:tensorflow:On image 18800 of 30674 I0209 07:29:39.095378 140107823540096 create_coco_tf_record.py:227] On image 18800 of 30674 INFO:tensorflow:On image 18900 of 30674 I0209 07:29:39.143252 140107823540096 create_coco_tf_record.py:227] On image 18900 of 30674 INFO:tensorflow:On image 19000 of 30674 I0209 07:29:39.191761 140107823540096 create_coco_tf_record.py:227] On image 19000 of 30674 INFO:tensorflow:On image 19100 of 30674 I0209 07:29:39.239664 140107823540096 create_coco_tf_record.py:227] On image 19100 of 30674 INFO:tensorflow:On image 19200 of 30674 I0209 07:29:39.288391 140107823540096 create_coco_tf_record.py:227] On image 19200 of 30674 INFO:tensorflow:On image 19300 of 30674 I0209 07:29:39.335295 140107823540096 create_coco_tf_record.py:227] On image 19300 of 30674 INFO:tensorflow:On image 19400 of 30674 I0209 07:29:39.382753 140107823540096 create_coco_tf_record.py:227] On image 19400 of 30674 INFO:tensorflow:On image 19500 of 30674 I0209 07:29:39.430925 140107823540096 create_coco_tf_record.py:227] On image 19500 of 30674 INFO:tensorflow:On image 19600 of 30674 I0209 07:29:39.479413 140107823540096 create_coco_tf_record.py:227] On image 19600 of 30674 INFO:tensorflow:On image 19700 of 30674 I0209 07:29:39.526808 140107823540096 create_coco_tf_record.py:227] On image 19700 of 30674 INFO:tensorflow:On image 19800 of 30674 I0209 07:29:39.578537 140107823540096 create_coco_tf_record.py:227] On image 19800 of 30674 INFO:tensorflow:On image 19900 of 30674 I0209 07:29:39.630142 140107823540096 create_coco_tf_record.py:227] On image 19900 of 30674 INFO:tensorflow:On image 20000 of 30674 I0209 07:29:39.680707 140107823540096 create_coco_tf_record.py:227] On image 20000 of 30674 INFO:tensorflow:On image 20100 of 30674 I0209 07:29:39.731282 140107823540096 create_coco_tf_record.py:227] On image 20100 of 30674 INFO:tensorflow:On image 20200 of 30674 I0209 07:29:39.790047 140107823540096 create_coco_tf_record.py:227] On image 20200 of 30674 INFO:tensorflow:On image 20300 of 30674 I0209 07:29:39.843030 140107823540096 create_coco_tf_record.py:227] On image 20300 of 30674 INFO:tensorflow:On image 20400 of 30674 I0209 07:29:39.892612 140107823540096 create_coco_tf_record.py:227] On image 20400 of 30674 INFO:tensorflow:On image 20500 of 30674 I0209 07:29:39.950912 140107823540096 create_coco_tf_record.py:227] On image 20500 of 30674 INFO:tensorflow:On image 20600 of 30674 I0209 07:29:40.000617 140107823540096 create_coco_tf_record.py:227] On image 20600 of 30674 INFO:tensorflow:On image 20700 of 30674 I0209 07:29:40.050609 140107823540096 create_coco_tf_record.py:227] On image 20700 of 30674 INFO:tensorflow:On image 20800 of 30674 I0209 07:29:40.098548 140107823540096 create_coco_tf_record.py:227] On image 20800 of 30674 INFO:tensorflow:On image 20900 of 30674 I0209 07:29:40.146512 140107823540096 create_coco_tf_record.py:227] On image 20900 of 30674 INFO:tensorflow:On image 21000 of 30674 I0209 07:29:40.195150 140107823540096 create_coco_tf_record.py:227] On image 21000 of 30674 INFO:tensorflow:On image 21100 of 30674 I0209 07:29:40.242985 140107823540096 create_coco_tf_record.py:227] On image 21100 of 30674 INFO:tensorflow:On image 21200 of 30674 I0209 07:29:40.291406 140107823540096 create_coco_tf_record.py:227] On image 21200 of 30674 INFO:tensorflow:On image 21300 of 30674 I0209 07:29:40.338825 140107823540096 create_coco_tf_record.py:227] On image 21300 of 30674 INFO:tensorflow:On image 21400 of 30674 I0209 07:29:40.386161 140107823540096 create_coco_tf_record.py:227] On image 21400 of 30674 INFO:tensorflow:On image 21500 of 30674 I0209 07:29:40.435175 140107823540096 create_coco_tf_record.py:227] On image 21500 of 30674 INFO:tensorflow:On image 21600 of 30674 I0209 07:29:40.483256 140107823540096 create_coco_tf_record.py:227] On image 21600 of 30674 INFO:tensorflow:On image 21700 of 30674 I0209 07:29:40.530771 140107823540096 create_coco_tf_record.py:227] On image 21700 of 30674 INFO:tensorflow:On image 21800 of 30674 I0209 07:29:40.578068 140107823540096 create_coco_tf_record.py:227] On image 21800 of 30674 INFO:tensorflow:On image 21900 of 30674 I0209 07:29:40.625772 140107823540096 create_coco_tf_record.py:227] On image 21900 of 30674 INFO:tensorflow:On image 22000 of 30674 I0209 07:29:40.672758 140107823540096 create_coco_tf_record.py:227] On image 22000 of 30674 INFO:tensorflow:On image 22100 of 30674 I0209 07:29:40.720202 140107823540096 create_coco_tf_record.py:227] On image 22100 of 30674 INFO:tensorflow:On image 22200 of 30674 I0209 07:29:40.768235 140107823540096 create_coco_tf_record.py:227] On image 22200 of 30674 INFO:tensorflow:On image 22300 of 30674 I0209 07:29:40.822160 140107823540096 create_coco_tf_record.py:227] On image 22300 of 30674 INFO:tensorflow:On image 22400 of 30674 I0209 07:29:40.870104 140107823540096 create_coco_tf_record.py:227] On image 22400 of 30674 INFO:tensorflow:On image 22500 of 30674 I0209 07:29:40.917841 140107823540096 create_coco_tf_record.py:227] On image 22500 of 30674 INFO:tensorflow:On image 22600 of 30674 I0209 07:29:40.965408 140107823540096 create_coco_tf_record.py:227] On image 22600 of 30674 INFO:tensorflow:On image 22700 of 30674 I0209 07:29:41.013479 140107823540096 create_coco_tf_record.py:227] On image 22700 of 30674 INFO:tensorflow:On image 22800 of 30674 I0209 07:29:41.061653 140107823540096 create_coco_tf_record.py:227] On image 22800 of 30674 INFO:tensorflow:On image 22900 of 30674 I0209 07:29:41.110107 140107823540096 create_coco_tf_record.py:227] On image 22900 of 30674 INFO:tensorflow:On image 23000 of 30674 I0209 07:29:41.157727 140107823540096 create_coco_tf_record.py:227] On image 23000 of 30674 INFO:tensorflow:On image 23100 of 30674 I0209 07:29:41.207663 140107823540096 create_coco_tf_record.py:227] On image 23100 of 30674 INFO:tensorflow:On image 23200 of 30674 I0209 07:29:41.254960 140107823540096 create_coco_tf_record.py:227] On image 23200 of 30674 INFO:tensorflow:On image 23300 of 30674 I0209 07:29:41.304700 140107823540096 create_coco_tf_record.py:227] On image 23300 of 30674 INFO:tensorflow:On image 23400 of 30674 I0209 07:29:41.352308 140107823540096 create_coco_tf_record.py:227] On image 23400 of 30674 INFO:tensorflow:On image 23500 of 30674 I0209 07:29:41.401085 140107823540096 create_coco_tf_record.py:227] On image 23500 of 30674 INFO:tensorflow:On image 23600 of 30674 I0209 07:29:41.449143 140107823540096 create_coco_tf_record.py:227] On image 23600 of 30674 INFO:tensorflow:On image 23700 of 30674 I0209 07:29:41.496366 140107823540096 create_coco_tf_record.py:227] On image 23700 of 30674 INFO:tensorflow:On image 23800 of 30674 I0209 07:29:41.545144 140107823540096 create_coco_tf_record.py:227] On image 23800 of 30674 INFO:tensorflow:On image 23900 of 30674 I0209 07:29:41.611638 140107823540096 create_coco_tf_record.py:227] On image 23900 of 30674 INFO:tensorflow:On image 24000 of 30674 I0209 07:29:41.665069 140107823540096 create_coco_tf_record.py:227] On image 24000 of 30674 INFO:tensorflow:On image 24100 of 30674 I0209 07:29:41.717655 140107823540096 create_coco_tf_record.py:227] On image 24100 of 30674 INFO:tensorflow:On image 24200 of 30674 I0209 07:29:41.776913 140107823540096 create_coco_tf_record.py:227] On image 24200 of 30674 INFO:tensorflow:On image 24300 of 30674 I0209 07:29:41.858232 140107823540096 create_coco_tf_record.py:227] On image 24300 of 30674 INFO:tensorflow:On image 24400 of 30674 I0209 07:29:41.921696 140107823540096 create_coco_tf_record.py:227] On image 24400 of 30674 INFO:tensorflow:On image 24500 of 30674 I0209 07:29:41.979680 140107823540096 create_coco_tf_record.py:227] On image 24500 of 30674 INFO:tensorflow:On image 24600 of 30674 I0209 07:29:42.035171 140107823540096 create_coco_tf_record.py:227] On image 24600 of 30674 INFO:tensorflow:On image 24700 of 30674 I0209 07:29:42.086365 140107823540096 create_coco_tf_record.py:227] On image 24700 of 30674 INFO:tensorflow:On image 24800 of 30674 I0209 07:29:42.137154 140107823540096 create_coco_tf_record.py:227] On image 24800 of 30674 INFO:tensorflow:On image 24900 of 30674 I0209 07:29:42.187874 140107823540096 create_coco_tf_record.py:227] On image 24900 of 30674 INFO:tensorflow:On image 25000 of 30674 I0209 07:29:42.239138 140107823540096 create_coco_tf_record.py:227] On image 25000 of 30674 INFO:tensorflow:On image 25100 of 30674 I0209 07:29:42.289384 140107823540096 create_coco_tf_record.py:227] On image 25100 of 30674 INFO:tensorflow:On image 25200 of 30674 I0209 07:29:42.340937 140107823540096 create_coco_tf_record.py:227] On image 25200 of 30674 INFO:tensorflow:On image 25300 of 30674 I0209 07:29:42.392171 140107823540096 create_coco_tf_record.py:227] On image 25300 of 30674 INFO:tensorflow:On image 25400 of 30674 I0209 07:29:42.442649 140107823540096 create_coco_tf_record.py:227] On image 25400 of 30674 INFO:tensorflow:On image 25500 of 30674 I0209 07:29:42.493071 140107823540096 create_coco_tf_record.py:227] On image 25500 of 30674 INFO:tensorflow:On image 25600 of 30674 I0209 07:29:42.542949 140107823540096 create_coco_tf_record.py:227] On image 25600 of 30674 INFO:tensorflow:On image 25700 of 30674 I0209 07:29:42.591792 140107823540096 create_coco_tf_record.py:227] On image 25700 of 30674 INFO:tensorflow:On image 25800 of 30674 I0209 07:29:42.640826 140107823540096 create_coco_tf_record.py:227] On image 25800 of 30674 INFO:tensorflow:On image 25900 of 30674 I0209 07:29:42.689953 140107823540096 create_coco_tf_record.py:227] On image 25900 of 30674 INFO:tensorflow:On image 26000 of 30674 I0209 07:29:42.738588 140107823540096 create_coco_tf_record.py:227] On image 26000 of 30674 INFO:tensorflow:On image 26100 of 30674 I0209 07:29:42.787057 140107823540096 create_coco_tf_record.py:227] On image 26100 of 30674 INFO:tensorflow:On image 26200 of 30674 I0209 07:29:42.836802 140107823540096 create_coco_tf_record.py:227] On image 26200 of 30674 INFO:tensorflow:On image 26300 of 30674 I0209 07:29:42.891639 140107823540096 create_coco_tf_record.py:227] On image 26300 of 30674 INFO:tensorflow:On image 26400 of 30674 I0209 07:29:42.939060 140107823540096 create_coco_tf_record.py:227] On image 26400 of 30674 INFO:tensorflow:On image 26500 of 30674 I0209 07:29:42.987085 140107823540096 create_coco_tf_record.py:227] On image 26500 of 30674 INFO:tensorflow:On image 26600 of 30674 I0209 07:29:43.038125 140107823540096 create_coco_tf_record.py:227] On image 26600 of 30674 INFO:tensorflow:On image 26700 of 30674 I0209 07:29:43.086430 140107823540096 create_coco_tf_record.py:227] On image 26700 of 30674 INFO:tensorflow:On image 26800 of 30674 I0209 07:29:43.135753 140107823540096 create_coco_tf_record.py:227] On image 26800 of 30674 INFO:tensorflow:On image 26900 of 30674 I0209 07:29:43.183268 140107823540096 create_coco_tf_record.py:227] On image 26900 of 30674 INFO:tensorflow:On image 27000 of 30674 I0209 07:29:43.231203 140107823540096 create_coco_tf_record.py:227] On image 27000 of 30674 INFO:tensorflow:On image 27100 of 30674 I0209 07:29:43.279075 140107823540096 create_coco_tf_record.py:227] On image 27100 of 30674 INFO:tensorflow:On image 27200 of 30674 I0209 07:29:43.328093 140107823540096 create_coco_tf_record.py:227] On image 27200 of 30674 INFO:tensorflow:On image 27300 of 30674 I0209 07:29:43.375055 140107823540096 create_coco_tf_record.py:227] On image 27300 of 30674 INFO:tensorflow:On image 27400 of 30674 I0209 07:29:43.424542 140107823540096 create_coco_tf_record.py:227] On image 27400 of 30674 INFO:tensorflow:On image 27500 of 30674 I0209 07:29:43.473034 140107823540096 create_coco_tf_record.py:227] On image 27500 of 30674 INFO:tensorflow:On image 27600 of 30674 I0209 07:29:43.520908 140107823540096 create_coco_tf_record.py:227] On image 27600 of 30674 INFO:tensorflow:On image 27700 of 30674 I0209 07:29:43.569979 140107823540096 create_coco_tf_record.py:227] On image 27700 of 30674 INFO:tensorflow:On image 27800 of 30674 I0209 07:29:43.623033 140107823540096 create_coco_tf_record.py:227] On image 27800 of 30674 INFO:tensorflow:On image 27900 of 30674 I0209 07:29:43.676839 140107823540096 create_coco_tf_record.py:227] On image 27900 of 30674 INFO:tensorflow:On image 28000 of 30674 I0209 07:29:43.729416 140107823540096 create_coco_tf_record.py:227] On image 28000 of 30674 INFO:tensorflow:On image 28100 of 30674 I0209 07:29:43.783208 140107823540096 create_coco_tf_record.py:227] On image 28100 of 30674 INFO:tensorflow:On image 28200 of 30674 I0209 07:29:43.837840 140107823540096 create_coco_tf_record.py:227] On image 28200 of 30674 INFO:tensorflow:On image 28300 of 30674 I0209 07:29:43.896660 140107823540096 create_coco_tf_record.py:227] On image 28300 of 30674 INFO:tensorflow:On image 28400 of 30674 I0209 07:29:43.946526 140107823540096 create_coco_tf_record.py:227] On image 28400 of 30674 INFO:tensorflow:On image 28500 of 30674 I0209 07:29:43.994785 140107823540096 create_coco_tf_record.py:227] On image 28500 of 30674 INFO:tensorflow:On image 28600 of 30674 I0209 07:29:44.043161 140107823540096 create_coco_tf_record.py:227] On image 28600 of 30674 INFO:tensorflow:On image 28700 of 30674 I0209 07:29:44.092373 140107823540096 create_coco_tf_record.py:227] On image 28700 of 30674 INFO:tensorflow:On image 28800 of 30674 I0209 07:29:44.143258 140107823540096 create_coco_tf_record.py:227] On image 28800 of 30674 INFO:tensorflow:On image 28900 of 30674 I0209 07:29:44.194888 140107823540096 create_coco_tf_record.py:227] On image 28900 of 30674 INFO:tensorflow:On image 29000 of 30674 I0209 07:29:44.247044 140107823540096 create_coco_tf_record.py:227] On image 29000 of 30674 INFO:tensorflow:On image 29100 of 30674 I0209 07:29:44.299930 140107823540096 create_coco_tf_record.py:227] On image 29100 of 30674 INFO:tensorflow:On image 29200 of 30674 I0209 07:29:44.353611 140107823540096 create_coco_tf_record.py:227] On image 29200 of 30674 INFO:tensorflow:On image 29300 of 30674 I0209 07:29:44.405689 140107823540096 create_coco_tf_record.py:227] On image 29300 of 30674 INFO:tensorflow:On image 29400 of 30674 I0209 07:29:44.454727 140107823540096 create_coco_tf_record.py:227] On image 29400 of 30674 INFO:tensorflow:On image 29500 of 30674 I0209 07:29:44.502712 140107823540096 create_coco_tf_record.py:227] On image 29500 of 30674 INFO:tensorflow:On image 29600 of 30674 I0209 07:29:44.551148 140107823540096 create_coco_tf_record.py:227] On image 29600 of 30674 INFO:tensorflow:On image 29700 of 30674 I0209 07:29:44.599494 140107823540096 create_coco_tf_record.py:227] On image 29700 of 30674 INFO:tensorflow:On image 29800 of 30674 I0209 07:29:44.646869 140107823540096 create_coco_tf_record.py:227] On image 29800 of 30674 INFO:tensorflow:On image 29900 of 30674 I0209 07:29:44.694324 140107823540096 create_coco_tf_record.py:227] On image 29900 of 30674 INFO:tensorflow:On image 30000 of 30674 I0209 07:29:44.741466 140107823540096 create_coco_tf_record.py:227] On image 30000 of 30674 INFO:tensorflow:On image 30100 of 30674 I0209 07:29:44.788800 140107823540096 create_coco_tf_record.py:227] On image 30100 of 30674 INFO:tensorflow:On image 30200 of 30674 I0209 07:29:44.836947 140107823540096 create_coco_tf_record.py:227] On image 30200 of 30674 INFO:tensorflow:On image 30300 of 30674 I0209 07:29:44.890257 140107823540096 create_coco_tf_record.py:227] On image 30300 of 30674 INFO:tensorflow:On image 30400 of 30674 I0209 07:29:44.940052 140107823540096 create_coco_tf_record.py:227] On image 30400 of 30674 INFO:tensorflow:On image 30500 of 30674 I0209 07:29:44.987952 140107823540096 create_coco_tf_record.py:227] On image 30500 of 30674 INFO:tensorflow:On image 30600 of 30674 I0209 07:29:45.036247 140107823540096 create_coco_tf_record.py:227] On image 30600 of 30674 INFO:tensorflow:Finished writing, skipped 652 annotations. I0209 07:29:45.072056 140107823540096 create_coco_tf_record.py:234] Finished writing, skipped 652 annotations. INFO:tensorflow:Found groundtruth annotations. Building annotations index. I0209 07:29:45.282140 140107823540096 create_coco_tf_record.py:209] Found groundtruth annotations. Building annotations index. INFO:tensorflow:0 images are missing annotations. I0209 07:29:45.285487 140107823540096 create_coco_tf_record.py:222] 0 images are missing annotations. INFO:tensorflow:On image 0 of 4381 I0209 07:29:45.285650 140107823540096 create_coco_tf_record.py:227] On image 0 of 4381 INFO:tensorflow:On image 100 of 4381 I0209 07:29:45.338083 140107823540096 create_coco_tf_record.py:227] On image 100 of 4381 INFO:tensorflow:On image 200 of 4381 I0209 07:29:45.391104 140107823540096 create_coco_tf_record.py:227] On image 200 of 4381 INFO:tensorflow:On image 300 of 4381 I0209 07:29:45.441899 140107823540096 create_coco_tf_record.py:227] On image 300 of 4381 INFO:tensorflow:On image 400 of 4381 I0209 07:29:45.492035 140107823540096 create_coco_tf_record.py:227] On image 400 of 4381 INFO:tensorflow:On image 500 of 4381 I0209 07:29:45.542772 140107823540096 create_coco_tf_record.py:227] On image 500 of 4381 INFO:tensorflow:On image 600 of 4381 I0209 07:29:45.593809 140107823540096 create_coco_tf_record.py:227] On image 600 of 4381 INFO:tensorflow:On image 700 of 4381 I0209 07:29:45.646643 140107823540096 create_coco_tf_record.py:227] On image 700 of 4381 INFO:tensorflow:On image 800 of 4381 I0209 07:29:45.700170 140107823540096 create_coco_tf_record.py:227] On image 800 of 4381 INFO:tensorflow:On image 900 of 4381 I0209 07:29:45.753659 140107823540096 create_coco_tf_record.py:227] On image 900 of 4381 INFO:tensorflow:On image 1000 of 4381 I0209 07:29:45.806349 140107823540096 create_coco_tf_record.py:227] On image 1000 of 4381 INFO:tensorflow:On image 1100 of 4381 I0209 07:29:45.859146 140107823540096 create_coco_tf_record.py:227] On image 1100 of 4381 INFO:tensorflow:On image 1200 of 4381 I0209 07:29:45.915701 140107823540096 create_coco_tf_record.py:227] On image 1200 of 4381 INFO:tensorflow:On image 1300 of 4381 I0209 07:29:45.964930 140107823540096 create_coco_tf_record.py:227] On image 1300 of 4381 INFO:tensorflow:On image 1400 of 4381 I0209 07:29:46.013833 140107823540096 create_coco_tf_record.py:227] On image 1400 of 4381 INFO:tensorflow:On image 1500 of 4381 I0209 07:29:46.064570 140107823540096 create_coco_tf_record.py:227] On image 1500 of 4381 INFO:tensorflow:On image 1600 of 4381 I0209 07:29:46.114058 140107823540096 create_coco_tf_record.py:227] On image 1600 of 4381 INFO:tensorflow:On image 1700 of 4381 I0209 07:29:46.163121 140107823540096 create_coco_tf_record.py:227] On image 1700 of 4381 INFO:tensorflow:On image 1800 of 4381 I0209 07:29:46.211823 140107823540096 create_coco_tf_record.py:227] On image 1800 of 4381 INFO:tensorflow:On image 1900 of 4381 I0209 07:29:46.260781 140107823540096 create_coco_tf_record.py:227] On image 1900 of 4381 INFO:tensorflow:On image 2000 of 4381 I0209 07:29:46.309998 140107823540096 create_coco_tf_record.py:227] On image 2000 of 4381 INFO:tensorflow:On image 2100 of 4381 I0209 07:29:46.358225 140107823540096 create_coco_tf_record.py:227] On image 2100 of 4381 INFO:tensorflow:On image 2200 of 4381 I0209 07:29:46.408882 140107823540096 create_coco_tf_record.py:227] On image 2200 of 4381 INFO:tensorflow:On image 2300 of 4381 I0209 07:29:46.457455 140107823540096 create_coco_tf_record.py:227] On image 2300 of 4381 INFO:tensorflow:On image 2400 of 4381 I0209 07:29:46.505949 140107823540096 create_coco_tf_record.py:227] On image 2400 of 4381 INFO:tensorflow:On image 2500 of 4381 I0209 07:29:46.554764 140107823540096 create_coco_tf_record.py:227] On image 2500 of 4381 INFO:tensorflow:On image 2600 of 4381 I0209 07:29:46.603295 140107823540096 create_coco_tf_record.py:227] On image 2600 of 4381 INFO:tensorflow:On image 2700 of 4381 I0209 07:29:46.656020 140107823540096 create_coco_tf_record.py:227] On image 2700 of 4381 INFO:tensorflow:On image 2800 of 4381 I0209 07:29:46.707798 140107823540096 create_coco_tf_record.py:227] On image 2800 of 4381 INFO:tensorflow:On image 2900 of 4381 I0209 07:29:46.759378 140107823540096 create_coco_tf_record.py:227] On image 2900 of 4381 INFO:tensorflow:On image 3000 of 4381 I0209 07:29:46.810447 140107823540096 create_coco_tf_record.py:227] On image 3000 of 4381 INFO:tensorflow:On image 3100 of 4381 I0209 07:29:46.861093 140107823540096 create_coco_tf_record.py:227] On image 3100 of 4381 INFO:tensorflow:On image 3200 of 4381 I0209 07:29:46.945095 140107823540096 create_coco_tf_record.py:227] On image 3200 of 4381 INFO:tensorflow:On image 3300 of 4381 I0209 07:29:46.999625 140107823540096 create_coco_tf_record.py:227] On image 3300 of 4381 INFO:tensorflow:On image 3400 of 4381 I0209 07:29:47.050895 140107823540096 create_coco_tf_record.py:227] On image 3400 of 4381 INFO:tensorflow:On image 3500 of 4381 I0209 07:29:47.101934 140107823540096 create_coco_tf_record.py:227] On image 3500 of 4381 INFO:tensorflow:On image 3600 of 4381 I0209 07:29:47.156166 140107823540096 create_coco_tf_record.py:227] On image 3600 of 4381 INFO:tensorflow:On image 3700 of 4381 I0209 07:29:47.215608 140107823540096 create_coco_tf_record.py:227] On image 3700 of 4381 INFO:tensorflow:On image 3800 of 4381 I0209 07:29:47.272501 140107823540096 create_coco_tf_record.py:227] On image 3800 of 4381 INFO:tensorflow:On image 3900 of 4381 I0209 07:29:47.326143 140107823540096 create_coco_tf_record.py:227] On image 3900 of 4381 INFO:tensorflow:On image 4000 of 4381 I0209 07:29:47.381117 140107823540096 create_coco_tf_record.py:227] On image 4000 of 4381 INFO:tensorflow:On image 4100 of 4381 I0209 07:29:47.436727 140107823540096 create_coco_tf_record.py:227] On image 4100 of 4381 INFO:tensorflow:On image 4200 of 4381 I0209 07:29:47.487106 140107823540096 create_coco_tf_record.py:227] On image 4200 of 4381 INFO:tensorflow:On image 4300 of 4381 I0209 07:29:47.540182 140107823540096 create_coco_tf_record.py:227] On image 4300 of 4381 INFO:tensorflow:Finished writing, skipped 103 annotations. I0209 07:29:47.582033 140107823540096 create_coco_tf_record.py:234] Finished writing, skipped 103 annotations. Load dataset [ ] dataset = 'cifar10' batch_size = 512 config = common_config.with_dataset(common_config.get_config(), dataset) num_classes = input_pipeline.get_dataset_info(dataset, 'train')['num_classes'] config.batch = batch_size config.pp.crop = 224 INFO:absl:Load pre-computed DatasetInfo (eg: splits, num examples,...) from GCS: cifar10/3.0.2 INFO:absl:Load dataset info from /tmp/tmp8pyec2amtfds INFO:absl:Field info.citation from disk and from code do not match. Keeping the one from code. [ ] # For details about setting up datasets, see input_pipeline.py on the right. ds_train = input_pipeline.get_data_from_tfds(config=config, mode='train') ds_test = input_pipeline.get_data_from_tfds(config=config, mode='test') del config # Only needed to instantiate datasets. [ ] # Fetch a batch of test images for illustration purposes. batch = next(iter(ds_test.as_numpy_iterator())) # Note the shape : [num_local_devices, local_batch_size, h, w, c] batch['image'].shape (1, 512, 224, 224, 3) [ ] # Show some imags with their labels. images, labels = batch['image'][0][:9], batch['label'][0][:9] titles = map(make_label_getter(dataset), labels.argmax(axis=1)) show_img_grid(images, titles) [ ] # Same as above, but with train images. # Note how images are cropped/scaled differently. # Check out input_pipeline.get_data() in the editor at your right to see how the # images are preprocessed differently. batch = next(iter(ds_train.as_numpy_iterator())) images, labels = batch['image'][0][:9], batch['label'][0][:9] titles = map(make_label_getter(dataset), labels.argmax(axis=1)) show_img_grid(images, titles) Load pre-trained [ ] model_config = models_config.MODEL_CONFIGS[model_name] model_config classifier: token hidden_size: 768 name: ViT-B_32 patches: size: !!python/tuple - 32 - 32 representation_size: null transformer: attention_dropout_rate: 0.0 dropout_rate: 0.0 mlp_dim: 3072 num_heads: 12 num_layers: 12 [ ] # Load model definition & initialize random parameters. # This also compiles the model to XLA (takes some minutes the first time). if model_name.startswith('Mixer'): model = models.MlpMixer(num_classes=num_classes, **model_config) else: model = models.VisionTransformer(num_classes=num_classes, **model_config) variables = jax.jit(lambda: model.init( jax.random.PRNGKey(0), # Discard the "num_local_devices" dimension of the batch for initialization. batch['image'][0, :1], train=False, ), backend='cpu')() [ ] # Load and convert pretrained checkpoint. # This involves loading the actual pre-trained model results, but then also also # modifying the parameters a bit, e.g. changing the final layers, and resizing # the positional embeddings. # For details, refer to the code and to the methods of the paper. params = checkpoint.load_pretrained( pretrained_path=f'{model_name}.npz', init_params=variables['params'], model_config=model_config, ) INFO:absl:Inspect extra keys: {'pre_logits/bias', 'pre_logits/kernel'} INFO:absl:load_pretrained: drop-head variant Evaluate [ ] # So far, all our data is in the host memory. Let's now replicate the arrays # into the devices. # This will make every array in the pytree params become a ShardedDeviceArray # that has the same data replicated across all local devices. # For TPU it replicates the params in every core. # For a single GPU this simply moves the data onto the device. # For CPU it simply creates a copy. params_repl = flax.jax_utils.replicate(params) print('params.cls:', type(params['head']['bias']).__name__, params['head']['bias'].shape) print('params_repl.cls:', type(params_repl['head']['bias']).__name__, params_repl['head']['bias'].shape) params.cls: DeviceArray (10,) params_repl.cls: ShardedDeviceArray (1, 10) /usr/local/lib/python3.7/dist-packages/jax/lib/xla_bridge.py:317: UserWarning: jax.host_count has been renamed to jax.process_count. This alias will eventually be removed; please update your code. "jax.host_count has been renamed to jax.process_count. This alias " /usr/local/lib/python3.7/dist-packages/jax/lib/xla_bridge.py:304: UserWarning: jax.host_id has been renamed to jax.process_index. This alias will eventually be removed; please update your code. "jax.host_id has been renamed to jax.process_index. This alias " [ ] # Then map the call to our model's forward pass onto all available devices. vit_apply_repl = jax.pmap(lambda params, inputs: model.apply( dict(params=params), inputs, train=False)) [ ] def get_accuracy(params_repl): """Returns accuracy evaluated on the test set.""" good = total = 0 steps = input_pipeline.get_dataset_info(dataset, 'test')['num_examples'] // batch_size for _, batch in zip(tqdm.trange(steps), ds_test.as_numpy_iterator()): predicted = vit_apply_repl(params_repl, batch['image']) is_same = predicted.argmax(axis=-1) == batch['label'].argmax(axis=-1) good += is_same.sum() total += len(is_same.flatten()) return good / total [ ] # Random performance without fine-tuning. get_accuracy(params_repl) INFO:absl:Load dataset info from /root/tensorflow_datasets/cifar10/3.0.2 100%|██████████| 19/19 [01:07<00:00, 3.58s/it] DeviceArray(0.10063734, dtype=float32) Fine-tune [ ] # 100 Steps take approximately 15 minutes in the TPU runtime. total_steps = 100 warmup_steps = 5 decay_type = 'cosine' grad_norm_clip = 1 # This controls in how many forward passes the batch is split. 8 works well with # a TPU runtime that has 8 devices. 64 should work on a GPU. You can of course # also adjust the batch_size above, but that would require you to adjust the # learning rate accordingly. accum_steps = 8 base_lr = 0.03 [ ] # Check out train.make_update_fn in the editor on the right side for details. lr_fn = utils.create_learning_rate_schedule(total_steps, base_lr, decay_type, warmup_steps) update_fn_repl = train.make_update_fn( apply_fn=model.apply, accum_steps=accum_steps, lr_fn=lr_fn) # We use a momentum optimizer that uses half precision for state to save # memory. It als implements the gradient clipping. opt = momentum_clip.Optimizer(grad_norm_clip=grad_norm_clip).create(params) opt_repl = flax.jax_utils.replicate(opt) /usr/local/lib/python3.7/dist-packages/jax/lib/xla_bridge.py:317: UserWarning: jax.host_count has been renamed to jax.process_count. This alias will eventually be removed; please update your code. "jax.host_count has been renamed to jax.process_count. This alias " /usr/local/lib/python3.7/dist-packages/jax/lib/xla_bridge.py:304: UserWarning: jax.host_id has been renamed to jax.process_index. This alias will eventually be removed; please update your code. "jax.host_id has been renamed to jax.process_index. This alias " [ ] # Initialize PRNGs for dropout. update_rng_repl = flax.jax_utils.replicate(jax.random.PRNGKey(0)) /usr/local/lib/python3.7/dist-packages/jax/lib/xla_bridge.py:317: UserWarning: jax.host_count has been renamed to jax.process_count. This alias will eventually be removed; please update your code. "jax.host_count has been renamed to jax.process_count. This alias " /usr/local/lib/python3.7/dist-packages/jax/lib/xla_bridge.py:304: UserWarning: jax.host_id has been renamed to jax.process_index. This alias will eventually be removed; please update your code. "jax.host_id has been renamed to jax.process_index. This alias " [ ] losses = [] lrs = [] # Completes in ~20 min on the TPU runtime. for step, batch in zip( tqdm.trange(1, total_steps + 1), ds_train.as_numpy_iterator(), ): opt_repl, loss_repl, update_rng_repl = update_fn_repl( opt_repl, flax.jax_utils.replicate(step), batch, update_rng_repl) losses.append(loss_repl[0]) lrs.append(lr_fn(step)) plt.plot(losses) plt.figure() plt.plot(lrs) [ ] # Should be ~96.7% for Mixer-B/16 or 97.7% for ViT-B/32 on CIFAR10 (both @224) get_accuracy(opt_repl.target) INFO:absl:Load dataset info from /root/tensorflow_datasets/cifar10/3.0.2 100%|██████████| 19/19 [00:32<00:00, 1.73s/it] DeviceArray(0.9762541, dtype=float32) Inference [ ] # Download a pre-trained model. if model_name.startswith('Mixer'): # Download model trained on imagenet2012 ![ -e "$model_name"_imagenet2012.npz ] || gsutil cp gs://mixer_models/imagenet1k/"$model_name".npz "$model_name"_imagenet2012.npz model = models.MlpMixer(num_classes=1000, **model_config) else: # Download model pre-trained on imagenet21k and fine-tuned on imagenet2012. ![ -e "$model_name"_imagenet2012.npz ] || gsutil cp gs://vit_models/imagenet21k+imagenet2012/"$model_name".npz "$model_name"_imagenet2012.npz model = models.VisionTransformer(num_classes=1000, **model_config) import os assert os.path.exists(f'{model_name}_imagenet2012.npz') [ ] # Load and convert pretrained checkpoint. params = checkpoint.load(f'{model_name}_imagenet2012.npz') params['pre_logits'] = {} # Need to restore empty leaf for Flax. [ ] # Get imagenet labels. !wget https://storage.googleapis.com/bit_models/ilsvrc2012_wordnet_lemmas.txt imagenet_labels = dict(enumerate(open('ilsvrc2012_wordnet_lemmas.txt'))) --2021-06-20 16:44:59-- https://storage.googleapis.com/bit_models/ilsvrc2012_wordnet_lemmas.txt Resolving storage.googleapis.com (storage.googleapis.com)... 74.125.142.128, 74.125.20.128, 74.125.197.128, ... Connecting to storage.googleapis.com (storage.googleapis.com)|74.125.142.128|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 21675 (21K) [text/plain] Saving to: ‘ilsvrc2012_wordnet_lemmas.txt.1’ ilsvrc2012_wordnet_ 100%[===================>] 21.17K --.-KB/s in 0s 2021-06-20 16:44:59 (135 MB/s) - ‘ilsvrc2012_wordnet_lemmas.txt.1’ saved [21675/21675] [ ] # Get a random picture with the correct dimensions. resolution = 224 if model_name.startswith('Mixer') else 384 !wget https://picsum.photos/$resolution -O picsum.jpg import PIL img = PIL.Image.open('picsum.jpg') img [ ] # Predict on a batch with a single item (note very efficient TPU usage...) logits, = model.apply(dict(params=params), (np.array(img) / 128 - 1)[None, ...], train=False) [ ] preds = flax.nn.softmax(logits) for idx in preds.argsort()[:-11:-1]: print(f'{preds[idx]:.5f} : {imagenet_labels[idx]}', end='') 0.13330 : sandbar, sand_bar 0.09332 : seashore, coast, seacoast, sea-coast 0.05257 : jeep, landrover 0.05188 : Arabian_camel, dromedary, Camelus_dromedarius 0.01251 : horned_viper, cerastes, sand_viper, horned_asp, Cerastes_cornutus 0.00753 : tiger_beetle 0.00744 : dung_beetle 0.00711 : sidewinder, horned_rattlesnake, Crotalus_cerastes 0.00703 : leatherback_turtle, leatherback, leathery_turtle, Dermochelys_coriacea 0.00647 : pole 11511311411011111210810910710510610410310210110099989796959493 image_height = image['height'] image_width = image['width'] filename = image['file_name'] image_id = image['id'] full_path = os.path.join(image_dir, filename) with tf.io.gfile.GFile(full_path, 'rb') as fid: encoded_jpg = fid.read() encoded_jpg_io = io.BytesIO(encoded_jpg) image = PIL.Image.open(encoded_jpg_io) check 22 秒 完成时间:15:29
57.448339
196
0.813213
10,990
62,274
4.482803
0.125296
0.099744
0.0872
0.1308
0.810965
0.73365
0.397414
0.393842
0.391974
0.146592
0
0.351032
0.109612
62,274
1,083
197
57.501385
0.537116
0
0
0.066332
0
0.026131
0.020159
0.005095
0
0
0.000238
0
0.001005
0
null
null
0
0.005025
null
null
0.003015
0
0
0
null
0
0
0
1
1
0
0
0
0
0
1
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
f244d886925719e9b3a4058996b045eb0a3defb3
768
py
Python
Ago-Dic-2021/hernandez-saucedo-damian-rafael/calculadora/calculadora.py
AnhellO/DAS_Sistemas
07b4eca78357d02d225d570033d05748d91383e3
[ "MIT" ]
41
2017-09-26T09:36:32.000Z
2022-03-19T18:05:25.000Z
Ago-Dic-2021/hernandez-saucedo-damian-rafael/calculadora/calculadora.py
AnhellO/DAS_Sistemas
07b4eca78357d02d225d570033d05748d91383e3
[ "MIT" ]
67
2017-09-11T05:06:12.000Z
2022-02-14T04:44:04.000Z
Ago-Dic-2021/hernandez-saucedo-damian-rafael/calculadora/calculadora.py
AnhellO/DAS_Sistemas
07b4eca78357d02d225d570033d05748d91383e3
[ "MIT" ]
210
2017-09-01T00:10:08.000Z
2022-03-19T18:05:12.000Z
class Calculator: def __init__(self, a: int, b: int) -> None: self.a = a self.b = b def suma(self) -> int: return self.a + self.b def resta(self) -> int: return self.a - self.b def multi(self) -> int: return self.a * self.b def divicion(self): if self.b != 0: return self.a / self.b else: return "indeterminado" def potencia(self): return self.a ** self.b def raiz(self): if self.a < 0: cube_root = "indeterminado" else: if self.b > 0: cube_root = pow(self.a,1/self.b) else: cube_root = "indeterminado" return cube_root
20.756757
48
0.463542
96
768
3.625
0.25
0.12931
0.103448
0.215517
0.324713
0.278736
0.224138
0.224138
0
0
0
0.009132
0.429688
768
36
49
21.333333
0.785388
0
0
0.192308
0
0
0.050914
0
0
0
0
0
0
1
0.269231
false
0
0
0.153846
0.576923
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
f275e47eff2f401f6bcd09f46a09d258c4e3aabc
10,832
py
Python
Examples/motion_driver-5.1.3/motion_driver-5.1.3/simple_apps/msp430/motion-driver-client/motion-driver-client.py
lucyannofrota/Motion_Tracking
5a38e18f2b2261b408abb1e9adc59e53b0b71dae
[ "Apache-2.0" ]
null
null
null
Examples/motion_driver-5.1.3/motion_driver-5.1.3/simple_apps/msp430/motion-driver-client/motion-driver-client.py
lucyannofrota/Motion_Tracking
5a38e18f2b2261b408abb1e9adc59e53b0b71dae
[ "Apache-2.0" ]
null
null
null
Examples/motion_driver-5.1.3/motion_driver-5.1.3/simple_apps/msp430/motion-driver-client/motion-driver-client.py
lucyannofrota/Motion_Tracking
5a38e18f2b2261b408abb1e9adc59e53b0b71dae
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # motion-driver-client.py # A PC application for use with Motion Driver. # Copyright 2012 InvenSense, Inc. All Rights Reserved. import serial, sys, time, string, pygame from ponycube import * # Sensor sensitivities ACCEL_SENS = 16384.0 GYRO_SENS = 16.375 QUAT_SENS = 1073741824.0 # Tap direction enums TAP_X_UP = 1 TAP_X_DOWN = 2 TAP_Y_UP = 3 TAP_Y_DOWN = 4 TAP_Z_UP = 5 TAP_Z_DOWN = 6 # Orientation bits ORIENTATION_X_UP = 0x01 ORIENTATION_X_DOWN = 0x02 ORIENTATION_Y_UP = 0x04 ORIENTATION_Y_DOWN = 0x08 ORIENTATION_Z_UP = 0x10 ORIENTATION_Z_DOWN = 0x20 ORIENTATION_FLIP = 0x40 ORIENTATION_ALL = 0x3F # Android orientation enums ANDROID_PORTRAIT = 0 ANDROID_LANDSCAPE = 1 ANDROID_R_PORTRAIT = 2 ANDROID_R_LANDSCAPE = 3 class motion_driver_packet_reader: def __init__(self, port, quat_delegate=None, debug_delegate=None, data_delegate=None ): self.s = serial.Serial(port,115200) self.s.setTimeout(0.1) self.s.setWriteTimeout(0.2) if quat_delegate: self.quat_delegate = quat_delegate else: self.quat_delegate = empty_packet_delegate() if debug_delegate: self.debug_delegate = debug_delegate else: self.debug_delegate = empty_packet_delegate() if data_delegate: self.data_delegate = data_delegate else: self.data_delegate = empty_packet_delegate() self.packets = [] self.length = 0 self.previous = None def read(self): NUM_BYTES = 23 MAX_PACKET_TYPES = 8 p = None if self.s.inWaiting(): c = self.s.read(1) if ord(c) == ord('$'): # Found the start of a valid packet (maybe). c = self.s.read(1) if ord(c) < MAX_PACKET_TYPES: d = None p = None if ord(c) == 0 or ord(c) == 1: rs = self.s.read(6) d = data_packet(ord(c),rs) elif ord(c) == 2: rs = self.s.read(16) p = quat_packet(rs) self.quat_delegate.dispatch(p) # Currently, we don't print quaternion data (it's really # meant for the cube display only. If you'd like to # change this behavior, uncomment the following line. # # d = data_packet(ord(c),rs) elif ord(c) == 3: rs = self.s.read(2) d = data_packet(ord(c),rs) elif ord(c) == 4: rs = self.s.read(1) d = data_packet(ord(c),rs) elif ord(c) == 5: rs = self.s.read(8) d = data_packet(ord(c),rs) elif ord(c) == 6: rs = self.s.read(4) d = data_packet(ord(c),rs) if d != None: self.data_delegate.dispatch(d) else: print "invalid packet type.." def write(self,a): self.s.write(a) def close(self): self.s.close() def write_log(self,fname): f = open(fname,'w') for p in self.packets: f.write(p.logfile_line()) f.close() # =========== PACKET DELEGATES ========== class packet_delegate(object): def loop(self,event): print "generic packet_delegate loop w/event",event def dispatch(self,p): print "generic packet_delegate dispatched",p class empty_packet_delegate(packet_delegate): def loop(self,event): pass def dispatch(self,p): pass class cube_packet_viewer (packet_delegate): def __init__(self): self.screen = Screen(480,400,scale=1.5) self.cube = Cube(30,60,10) self.q = Quaternion(1,0,0,0) self.previous = None # previous quaternion self.latest = None # latest packet (get in dispatch, use in loop) def loop(self,event): packet = self.latest if packet: q = packet.to_q().normalized() self.cube.erase(self.screen) self.cube.draw(self.screen,q) pygame.display.flip() self.latest = None def dispatch(self,p): if isinstance(p,quat_packet): self.latest = p class debug_packet_viewer (packet_delegate): def loop(self,event): pass def dispatch(self,p): assert isinstance(p,debug_packet); p.display() class data_packet_viewer (packet_delegate): def loop(self,event): pass def dispatch(self,p): assert isinstance(p,data_packet); p.display() # =============== PACKETS ================= # For 16-bit signed integers. def two_bytes(d1,d2): d = ord(d1)*256 + ord(d2) if d > 32767: d -= 65536 return d # For 32-bit signed integers. def four_bytes(d1, d2, d3, d4): d = ord(d1)*(1<<24) + ord(d2)*(1<<16) + ord(d3)*(1<<8) + ord(d4) if d > 2147483648: d-= 4294967296 return d class debug_packet (object): # body of packet is a debug string def __init__(self,l): sss = [] for c in l[3:21]: if ord(c) != 0: sss.append(c) self.s = "".join(sss) def display(self): sys.stdout.write(self.s) class data_packet (object): def __init__(self, type, l): self.data = [0,0,0,0] self.type = type if self.type == 0: # accel self.data[0] = two_bytes(l[0],l[1]) / ACCEL_SENS self.data[1] = two_bytes(l[2],l[3]) / ACCEL_SENS self.data[2] = two_bytes(l[4],l[5]) / ACCEL_SENS elif self.type == 1: # gyro self.data[0] = two_bytes(l[0],l[1]) / GYRO_SENS self.data[1] = two_bytes(l[2],l[3]) / GYRO_SENS self.data[2] = two_bytes(l[4],l[5]) / GYRO_SENS elif self.type == 2: # quaternion self.data[0] = four_bytes(l[0],l[1],l[2],l[3]) / QUAT_SENS self.data[1] = four_bytes(l[4],l[5],l[6],l[7]) / QUAT_SENS self.data[2] = four_bytes(l[8],l[9],l[10],l[11]) / QUAT_SENS self.data[3] = four_bytes(l[12],l[13],l[14],l[15]) / QUAT_SENS elif self.type == 3: # tap self.data[0] = ord(l[0]) self.data[1] = ord(l[1]) elif self.type == 4: # Android orient self.data[0] = ord(l[0]) elif self.type == 5: # pedometer self.data[0] = four_bytes(l[0],l[1],l[2],l[3]) self.data[1] = four_bytes(l[4],l[5],l[6],l[7]) elif self.type == 6: # misc self.data[0] = ord(l[0]) if self.data[0] == ord('t'): # test event self.data[1] = ord(l[1]) else: # unsupported pass def display(self): if self.type == 0: print 'accel: %7.3f %7.3f %7.3f' % \ (self.data[0], self.data[1], self.data[2]) elif self.type == 1: print 'gyro: %9.5f %9.5f %9.5f' % \ (self.data[0], self.data[1], self.data[2]) elif self.type == 2: print 'quat: %7.4f %7.4f %7.4f %7.4f' % \ (self.data[0], self.data[1], self.data[2], self.data[3]) elif self.type == 3: if self.data[0] == TAP_X_UP: s = "+ X" elif self.data[0] == TAP_X_DOWN: s = "- X" elif self.data[0] == TAP_Y_UP: s = "+ Y" elif self.data[0] == TAP_Y_DOWN: s = "- Y" elif self.data[0] == TAP_Z_UP: s = "+ Z" elif self.data[0] == TAP_Z_DOWN: s = "- Z" print 'Detected %s-axis tap x%d' % (s, self.data[1]) elif self.type == 4: if self.data[0] == ANDROID_PORTRAIT: s = "Portrait" elif self.data[0] == ANDROID_LANDSCAPE: s = "Landscape" elif self.data[0] == ANDROID_R_PORTRAIT: s = "Reverse portrait" elif self.data[0] == ANDROID_R_LANDSCAPE: s = "Reverse landscape" print 'Screen orientation: %s' % s elif self.type == 5: print 'Walked %d steps over %d milliseconds.' % \ (self.data[0], self.data[1]) elif self.type == 6: if self.data[0] == ord('t'): if self.data[1] == 7: print 'Self test passed.' else: print 'Self test failed.' pass else: print 'what?' class quat_packet (object): def __init__(self, l): self.l = l self.q0 = four_bytes(l[0],l[1],l[2],l[3]) / QUAT_SENS self.q1 = four_bytes(l[4],l[5],l[6],l[7]) / QUAT_SENS self.q2 = four_bytes(l[8],l[9],l[10],l[11]) / QUAT_SENS self.q3 = four_bytes(l[12],l[13],l[14],l[15]) / QUAT_SENS def display_raw(self): l = self.l print "".join( [ str(ord(l[0])), " "] + \ [ str(ord(l[1])), " "] + \ [ str(ord(a)).ljust(4) for a in [ l[2], l[3], l[4], l[5], l[6], l[7], l[8], l[9], l[10] ] ] + \ [ str(ord(a)).ljust(4) for a in [ l[8], l[9], l[10] , l[11], l[12], l[13]] ] ) def display(self): if 1: print "qs " + " ".join([str(s).ljust(15) for s in [ self.q0, self.q1, self.q2, self.q3 ]]) def to_q(self): return Quaternion(self.q0, self.q1, self.q2, self.q3) # =============== MAIN ====================== if __name__ == "__main__": if len(sys.argv) == 2: comport = int(sys.argv[1]) - 1 else: print "usage: " + sys.argv[0] + " port" sys.exit(-1) pygame.init() viewer = cube_packet_viewer() debug = debug_packet_viewer() data = data_packet_viewer() reader = motion_driver_packet_reader(comport, quat_delegate = viewer, debug_delegate = debug, data_delegate = data) while 1: event = pygame.event.poll() # TODO: Allow exit via keystroke. if event.type == pygame.QUIT: viewer.close() break if event.type == pygame.KEYDOWN: reader.write(pygame.key.name(event.key)) reader.read() viewer.loop(event) debug.loop(event) data.loop(event) # TODO: If system load is too high, increase this sleep time. pygame.time.delay(0)
300.888889
1,804
0.496307
1,466
10,832
3.538199
0.16985
0.072489
0.041643
0.02005
0.296703
0.265664
0.210719
0.196838
0.177752
0.132639
0
0.052968
0.363829
10,832
35
1,805
309.485714
0.699753
0
0
0.261993
0
0
0.039257
0
0
0
0.003246
0.028571
0.00738
0
null
null
0.02583
0.00738
null
null
0.055351
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
null
0
0
1
0
1
0
0
0
0
0
0
0
0
4
f2a697b1d7c386a766a02a1c2651c6b9b6a06e4e
193
py
Python
_celery/__init__.py
bobruk76/E8
5baac811530075b7b0f1e6c7673b33d814675c75
[ "MIT" ]
null
null
null
_celery/__init__.py
bobruk76/E8
5baac811530075b7b0f1e6c7673b33d814675c75
[ "MIT" ]
null
null
null
_celery/__init__.py
bobruk76/E8
5baac811530075b7b0f1e6c7673b33d814675c75
[ "MIT" ]
null
null
null
import os nsq_host = str(os.environ.get("NSQ_HOST", "localhost")) nsq_port = int(os.environ.get("NSQ_PORT", 4151)) broker_host = str(os.environ.get("BROKER_HOST", 'redis://localhost:6379/0'))
32.166667
76
0.720207
32
193
4.15625
0.46875
0.203008
0.270677
0.240602
0.285714
0
0
0
0
0
0
0.050562
0.07772
193
5
77
38.6
0.696629
0
0
0
0
0
0.310881
0.124352
0
0
0
0
0
1
0
false
0
0.25
0
0.25
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
4b4627fc08967ff503dab6747cc5e43cca48d741
98
py
Python
request_vars/apps.py
kindlycat/django-request-vars
81290d309147274c9b2a9cf1953f5bdb6f69a5f0
[ "BSD-3-Clause" ]
1
2018-06-02T12:42:45.000Z
2018-06-02T12:42:45.000Z
request_vars/apps.py
kindlycat/django-request-vars
81290d309147274c9b2a9cf1953f5bdb6f69a5f0
[ "BSD-3-Clause" ]
1
2020-04-15T23:56:53.000Z
2020-04-15T23:56:53.000Z
request_vars/apps.py
kindlycat/django-request-vars
81290d309147274c9b2a9cf1953f5bdb6f69a5f0
[ "BSD-3-Clause" ]
null
null
null
from django.apps import AppConfig class RequestVarsConfig(AppConfig): name = 'request_vars'
16.333333
35
0.77551
11
98
6.818182
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.153061
98
5
36
19.6
0.903614
0
0
0
0
0
0.122449
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
4b7295a1ca79281d192eef8b41bb346239917812
60
py
Python
alpaca_handler/stream.py
benlevitas/alpaca_handler
e542e7acfce3d3aac0e2332cfdba4e25e4011214
[ "MIT" ]
1
2020-11-10T15:11:25.000Z
2020-11-10T15:11:25.000Z
alpaca_handler/stream.py
benlevitas/alpaca_handler
e542e7acfce3d3aac0e2332cfdba4e25e4011214
[ "MIT" ]
1
2020-12-22T19:45:07.000Z
2020-12-23T08:23:32.000Z
alpaca_handler/stream.py
benlevitas/alpaca_handler
e542e7acfce3d3aac0e2332cfdba4e25e4011214
[ "MIT" ]
null
null
null
class Stream: def __init__(self, symbols): pass
15
32
0.616667
7
60
4.714286
1
0
0
0
0
0
0
0
0
0
0
0
0.3
60
3
33
20
0.785714
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0.333333
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
1
0
0
0
0
0
4
4b80e4a5371b70d83f78ac2a415b8e885ec9bc78
203
py
Python
lectures/cap-4/unification.py
luv-sic/composing-programs
27391ac844df045b865524f1936682a0872569b5
[ "MIT" ]
1
2021-11-27T08:53:01.000Z
2021-11-27T08:53:01.000Z
lectures/cap-4/unification.py
luvsic3/composing-programs
27391ac844df045b865524f1936682a0872569b5
[ "MIT" ]
null
null
null
lectures/cap-4/unification.py
luvsic3/composing-programs
27391ac844df045b865524f1936682a0872569b5
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright © <owner> <year> # # @team: <team> # @project: <project> # @author: Manoel Vilela # @email: manoel_vilela@engineer.com #
18.454545
41
0.55665
23
203
4.913043
0.826087
0.212389
0
0
0
0
0
0
0
0
0
0.012987
0.241379
203
10
42
20.3
0.714286
0.901478
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
4b93b9d031ca09a648765f7546d1168c6b0788dc
550
py
Python
tests/test_common/test_utils/test_functional.py
tenkeyless/imagemodel
360c672117b5ccb1bfb3d6771b0720fa1a1f513c
[ "MIT" ]
null
null
null
tests/test_common/test_utils/test_functional.py
tenkeyless/imagemodel
360c672117b5ccb1bfb3d6771b0720fa1a1f513c
[ "MIT" ]
null
null
null
tests/test_common/test_utils/test_functional.py
tenkeyless/imagemodel
360c672117b5ccb1bfb3d6771b0720fa1a1f513c
[ "MIT" ]
null
null
null
from unittest import TestCase from imagemodel.common.utils.functional import compose, compose_left class FunctionalTest(TestCase): def testCompose(self): def f1(value: int): return value + 1 def f2(value: int): return value * 2 def f3(value: int): return value * 3 result = f1(1) result = f2(result) result = f3(result) self.assertEqual(compose(f3, f2, f1)(1), result) self.assertEqual(compose_left(f1, f2, f3)(1), compose(f3, f2, f1)(1))
23.913043
77
0.592727
70
550
4.628571
0.371429
0.074074
0.12963
0.175926
0.08642
0
0
0
0
0
0
0.056995
0.298182
550
22
78
25
0.782383
0
0
0
0
0
0
0
0
0
0
0
0.133333
1
0.266667
false
0
0.133333
0.2
0.666667
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
298aac27a5063b6ca971b67cb2d5a07f8ad62562
37
py
Python
python_base/day_5/test_package/demo.py
sven820/python
ddb13ffdab45bdb2c8ca8038cfa0c47f2502e554
[ "Apache-2.0" ]
null
null
null
python_base/day_5/test_package/demo.py
sven820/python
ddb13ffdab45bdb2c8ca8038cfa0c47f2502e554
[ "Apache-2.0" ]
null
null
null
python_base/day_5/test_package/demo.py
sven820/python
ddb13ffdab45bdb2c8ca8038cfa0c47f2502e554
[ "Apache-2.0" ]
null
null
null
__author__ = "JJ.sven" print('demo')
12.333333
22
0.675676
5
37
4.2
1
0
0
0
0
0
0
0
0
0
0
0
0.108108
37
3
23
12.333333
0.636364
0
0
0
0
0
0.289474
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
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
0
1
0
4
2990cc7c2af3c3f4bd9eca618083407a1ca09a6c
294
py
Python
madoka/utils/__init__.py
korepwx/madoka
56675bd8220935c6a9c1571a886a84bed235fd3b
[ "MIT" ]
null
null
null
madoka/utils/__init__.py
korepwx/madoka
56675bd8220935c6a9c1571a886a84bed235fd3b
[ "MIT" ]
null
null
null
madoka/utils/__init__.py
korepwx/madoka
56675bd8220935c6a9c1571a886a84bed235fd3b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from . import datasets from .configattr import * from .configparser import * from .constant import * from .datatuple import * from .datautils import * from .misc import * from .pathlock import * from .tempdir import * from .tfsummary import * from .trainstore import *
21
27
0.727891
36
294
5.944444
0.444444
0.420561
0
0
0
0
0
0
0
0
0
0.004098
0.170068
294
13
28
22.615385
0.872951
0.071429
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
29ae4ab2dfe31c8b7a0f1fcdae0cc80b8ba8369e
94
py
Python
Code_examples/python/helloworld.py
bodacea/datasciencecodingfordevelopment
0a00546e6038adb9ee902776cbf96ff271c30fe3
[ "CC0-1.0" ]
5
2016-08-02T12:10:34.000Z
2021-04-07T19:33:51.000Z
Code_examples/python/helloworld.py
bodacea/datasciencefordevelopment
0a00546e6038adb9ee902776cbf96ff271c30fe3
[ "CC0-1.0" ]
1
2021-12-26T06:18:05.000Z
2021-12-26T06:18:05.000Z
Code_examples/python/helloworld.py
bodacea/datasciencecodingfordevelopment
0a00546e6038adb9ee902776cbf96ff271c30fe3
[ "CC0-1.0" ]
1
2015-04-19T18:38:58.000Z
2015-04-19T18:38:58.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- #this is a comment print('Hello World!') #English
13.428571
30
0.617021
14
94
4.142857
1
0
0
0
0
0
0
0
0
0
0
0.012658
0.159574
94
6
31
15.666667
0.721519
0.659574
0
0
0
0
0.444444
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
29b6bc9a278004501dd61ece445369a6050a0ab1
106
py
Python
pyservices/store/tests/unit/test_crud.py
makkalot/eskit-example-microservice
5873ee27d1486ebb4617bf3026c2d983ff300a05
[ "BSD-2-Clause" ]
null
null
null
pyservices/store/tests/unit/test_crud.py
makkalot/eskit-example-microservice
5873ee27d1486ebb4617bf3026c2d983ff300a05
[ "BSD-2-Clause" ]
null
null
null
pyservices/store/tests/unit/test_crud.py
makkalot/eskit-example-microservice
5873ee27d1486ebb4617bf3026c2d983ff300a05
[ "BSD-2-Clause" ]
null
null
null
import unittest class TestCrud(unittest.TestCase): def test(self): print("Unit placeholder")
17.666667
34
0.698113
12
106
6.166667
0.916667
0
0
0
0
0
0
0
0
0
0
0
0.198113
106
6
35
17.666667
0.870588
0
0
0
0
0
0.149533
0
0
0
0
0
0
1
0.25
false
0
0.25
0
0.75
0.25
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
29d7c7ce70b05f37ecbdf25f768df6d7b782dd7f
630
py
Python
Config.py
6ixBit/Personal-Website
0f51563b06c1955775ba2ac4e78786cad21cdefa
[ "MIT" ]
null
null
null
Config.py
6ixBit/Personal-Website
0f51563b06c1955775ba2ac4e78786cad21cdefa
[ "MIT" ]
1
2021-06-02T00:29:28.000Z
2021-06-02T00:29:28.000Z
Config.py
6ixBit/Personal-Website
0f51563b06c1955775ba2ac4e78786cad21cdefa
[ "MIT" ]
null
null
null
import os class Config(object): FLASK_ENV = os.environ.get('FLASK_ENV') or 'development' FLASK_APP = os.environ.get('FLASK_APP') or 'run.py' SECRET_KEY = os.environ.get('SECRET_KEY') SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') SQLALCHEMY_TRACK_MODIFICATIONS = False MAIL_PORT = os.environ.get('MAILGUN_SMTP_PORT') or 587 MAIL_USERNAME = os.environ.get('MAILGUN_SMTP_LOGIN') MAIL_PASSWORD = os.environ.get('MAILGUN_SMTP_PASSWORD') MAIL_SERVER = os.environ.get('MAILGUN_SMTP_SERVER') GIT_KEY = os.environ.get('GIT_KEY') REDIS_URL = os.environ.get('REDIS_URL')
30
60
0.712698
91
630
4.637363
0.373626
0.21327
0.28436
0.180095
0.218009
0
0
0
0
0
0
0.005682
0.161905
630
21
61
30
0.793561
0
0
0
0
0
0.234548
0.033281
0
0
0
0
0
1
0
false
0.076923
0.076923
0
1
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
0
0
0
0
1
0
0
0
0
0
4
29ebbd9b5a7660e0a64e74f1beaf90b8ba4d2978
21
py
Python
env/lib/python3.9/site-packages/spline/tools/__init__.py
AdnanKhan27/nicstestbed
d3136e23fda8bd09706eb55d9a8c44ff0ad90730
[ "MIT" ]
30
2017-12-05T11:12:06.000Z
2021-11-06T18:27:58.000Z
env/lib/python3.9/site-packages/spline/tools/__init__.py
AdnanKhan27/nicstestbed
d3136e23fda8bd09706eb55d9a8c44ff0ad90730
[ "MIT" ]
112
2017-10-15T12:13:38.000Z
2021-01-12T22:29:58.000Z
engine/tools/__init__.py
Nachtfeuer/engine
c7d86877b84f648b229c8c958078b899ad9eeeaf
[ "MIT" ]
6
2018-08-12T17:01:52.000Z
2021-08-17T06:05:24.000Z
"""Package tools."""
10.5
20
0.571429
2
21
6
1
0
0
0
0
0
0
0
0
0
0
0
0.095238
21
1
21
21
0.631579
0.666667
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
29f0264f30b61a7afffbbb1a31e77795bab9496c
198
py
Python
src/tengi/command/handler_pool.py
luckybots/tengi
1eef42596fb59035a43d6e1fa7b2aa552b52dffc
[ "Apache-2.0" ]
2
2021-08-09T18:02:59.000Z
2022-01-15T15:11:02.000Z
src/tengi/command/handler_pool.py
luckybots/tengi
1eef42596fb59035a43d6e1fa7b2aa552b52dffc
[ "Apache-2.0" ]
null
null
null
src/tengi/command/handler_pool.py
luckybots/tengi
1eef42596fb59035a43d6e1fa7b2aa552b52dffc
[ "Apache-2.0" ]
null
null
null
from typing import List from tengi.command.command_handler import CommandHandler class CommandHandlerPool: def __init__(self, handlers: List[CommandHandler]): self.handlers = handlers
24.75
56
0.782828
22
198
6.818182
0.636364
0.16
0
0
0
0
0
0
0
0
0
0
0.156566
198
7
57
28.285714
0.898204
0
0
0
0
0
0
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
29f03766594c65365066ed4d9170e2c5e3343198
468
py
Python
item_engine/__init__.py
GabrielAmare/ItemEngine
10277626c3724ad9ae7b934f53e11e305dc34da5
[ "MIT" ]
null
null
null
item_engine/__init__.py
GabrielAmare/ItemEngine
10277626c3724ad9ae7b934f53e11e305dc34da5
[ "MIT" ]
null
null
null
item_engine/__init__.py
GabrielAmare/ItemEngine
10277626c3724ad9ae7b934f53e11e305dc34da5
[ "MIT" ]
null
null
null
""" item_engine : generic engine maker for parsing """ from .constants import * from .rules import * from .items import * from .elements import * #from .ParserConfig import ParserConfig from .build import * # Optional = Optional.make # Repeat = Repeat.make # All = All.make # Any = Any.make # BranchSet = BranchSet.make def include(group: Group) -> Match: return Match(group, INCLUDE) def exclude(group: Group) -> Match: return Match(group, EXCLUDE)
18
39
0.702991
59
468
5.559322
0.440678
0.121951
0.091463
0.128049
0.189024
0.189024
0
0
0
0
0
0
0.185897
468
25
40
18.72
0.860892
0.410256
0
0
0
0
0
0
0
0
0
0
0
1
0.222222
false
0
0.555556
0.222222
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
29f33e1041c3c73c892a81854cffef29464c6286
30
py
Python
replacer/settings/__init__.py
FirinKinuo/plex-anime-replacer
71cda0f11ee69a9080e38c0ebb1018c919158c26
[ "MIT" ]
2
2022-01-26T20:55:58.000Z
2022-01-26T20:56:01.000Z
replacer/settings/__init__.py
FirinKinuo/plex-anime-replacer
71cda0f11ee69a9080e38c0ebb1018c919158c26
[ "MIT" ]
null
null
null
replacer/settings/__init__.py
FirinKinuo/plex-anime-replacer
71cda0f11ee69a9080e38c0ebb1018c919158c26
[ "MIT" ]
null
null
null
"""Project settings module"""
15
29
0.7
3
30
7
1
0
0
0
0
0
0
0
0
0
0
0
0.1
30
1
30
30
0.777778
0.766667
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
4b0d396f62a160a8d38d1ca9b1c67b6c5493c653
249
py
Python
profiles/schema/__init__.py
abdellatifLabr/MyStore
6a1db004d7372c236be72077aa55260927a46135
[ "MIT" ]
null
null
null
profiles/schema/__init__.py
abdellatifLabr/MyStore
6a1db004d7372c236be72077aa55260927a46135
[ "MIT" ]
null
null
null
profiles/schema/__init__.py
abdellatifLabr/MyStore
6a1db004d7372c236be72077aa55260927a46135
[ "MIT" ]
null
null
null
import graphene from .queries import ProfileQuery from .mutations import UpdateProfileMutation class Query( ProfileQuery, graphene.ObjectType ): pass class Mutation(graphene.ObjectType): update_profile = UpdateProfileMutation.Field()
19.153846
50
0.795181
24
249
8.208333
0.625
0.182741
0
0
0
0
0
0
0
0
0
0
0.144578
249
12
51
20.75
0.924883
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0.111111
0.333333
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
1
0
1
0
0
4
4b16854c5c57c755d2b377a316de2412cc38d048
829
py
Python
zork/data/attributes.py
Pyzyryab/Zork
ee48685996b7f6025e11e562ccbb59803670dc6e
[ "MIT" ]
null
null
null
zork/data/attributes.py
Pyzyryab/Zork
ee48685996b7f6025e11e562ccbb59803670dc6e
[ "MIT" ]
1
2022-02-02T20:37:33.000Z
2022-02-02T20:37:33.000Z
zork/data/attributes.py
Pyzyryab/Zork
ee48685996b7f6025e11e562ccbb59803670dc6e
[ "MIT" ]
null
null
null
from dataclasses import dataclass """[summary] Classes for store constant data about the internal configuration (elected by design) of the program attributes and properties """ @dataclass class CompilerAttribute: """ Represents the structure of the compiler attribute """ identifier: str mandatory: bool properties: list @dataclass class LanguageAttribute: """ Represents the structure of the language property """ identifier: str mandatory: bool properties: list @dataclass class BuildAttribute: """ Represents the structure of the build property """ identifier: str mandatory: bool properties: list @dataclass class ExecutableAttribute: """ Holds the configuration for generate an executable """ identifier: str mandatory: bool properties: list
21.25641
69
0.720145
87
829
6.862069
0.494253
0.033501
0.147404
0.174204
0.500838
0.365159
0.298157
0.298157
0.207705
0
0
0
0.214717
829
38
70
21.815789
0.917051
0.242461
0
0.761905
0
0
0
0
0
0
0
0
0
1
0
true
0
0.047619
0
0.809524
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
1
0
0
4
4b17c9b3c7cd755965512c58373ce8d298780a6c
193
py
Python
playing_with_nbdev/core.py
uberparagon/test_nbdev
450a3d706b15782e2bd2986a36efbe86ab13fcb2
[ "Apache-2.0" ]
null
null
null
playing_with_nbdev/core.py
uberparagon/test_nbdev
450a3d706b15782e2bd2986a36efbe86ab13fcb2
[ "Apache-2.0" ]
null
null
null
playing_with_nbdev/core.py
uberparagon/test_nbdev
450a3d706b15782e2bd2986a36efbe86ab13fcb2
[ "Apache-2.0" ]
null
null
null
# AUTOGENERATED! DO NOT EDIT! File to edit: 00_core.ipynb (unless otherwise specified). __all__ = ['square'] # Cell def square(x): """Returns the square of $x$, or $x^2$""" return x*x
24.125
87
0.65285
30
193
4.033333
0.766667
0
0
0
0
0
0
0
0
0
0
0.019231
0.19171
193
8
88
24.125
0.75641
0.658031
0
0
1
0
0.1
0
0
0
0
0
0
1
0.333333
false
0
0
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
1
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
d9a6ca4b44d1ad3826b55b03d02cf177293b3eca
89
py
Python
fissix/tests/data/fixers/bad_order.py
orsinium/fissix-py35
48914fcb69842c9fe3c97652870c7610a2cc639b
[ "PSF-2.0" ]
32
2018-07-07T23:55:16.000Z
2022-01-31T03:47:51.000Z
fissix/tests/data/fixers/bad_order.py
orsinium/fissix-py35
48914fcb69842c9fe3c97652870c7610a2cc639b
[ "PSF-2.0" ]
35
2018-09-18T22:58:16.000Z
2021-11-13T23:28:21.000Z
fissix/tests/data/fixers/bad_order.py
orsinium/fissix-py35
48914fcb69842c9fe3c97652870c7610a2cc639b
[ "PSF-2.0" ]
18
2018-09-21T11:46:32.000Z
2021-11-26T18:08:37.000Z
from fissix.fixer_base import BaseFix class FixBadOrder(BaseFix): order = "crazy"
12.714286
37
0.741573
11
89
5.909091
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.179775
89
6
38
14.833333
0.890411
0
0
0
0
0
0.05618
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
d9ab2a07fdfef571cbc12d449072878931bcf53a
684
bzl
Python
source/bazel/deps/tomlplusplus/get.bzl
luxe/CodeLang-compiler
78837d90bdd09c4b5aabbf0586a5d8f8f0c1e76a
[ "MIT" ]
1
2019-01-06T08:45:46.000Z
2019-01-06T08:45:46.000Z
source/bazel/deps/tomlplusplus/get.bzl
luxe/CodeLang-compiler
78837d90bdd09c4b5aabbf0586a5d8f8f0c1e76a
[ "MIT" ]
264
2015-11-30T08:34:00.000Z
2018-06-26T02:28:41.000Z
source/bazel/deps/tomlplusplus/get.bzl
UniLang/compiler
c338ee92994600af801033a37dfb2f1a0c9ca897
[ "MIT" ]
null
null
null
# Do not edit this file directly. # It was auto-generated by: code/programs/reflexivity/reflexive_refresh load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file") def tomlplusplus(): http_archive( name = "tomlplusplus", build_file = "//bazel/deps/tomlplusplus:build.BUILD", sha256 = "a522eaa80a33d8c457a0b9cb3509f2e7c7a61d8e102f3c14696d5a7606a4e874", strip_prefix = "tomlplusplus-983e22978e8792f6248695047ad7cb892c112e18", urls = [ "https://github.com/Unilang/tomlplusplus/archive/983e22978e8792f6248695047ad7cb892c112e18.tar.gz", ], )
40.235294
110
0.723684
67
684
7.238806
0.61194
0.037113
0.057732
0.078351
0.17732
0.17732
0.17732
0.17732
0.17732
0.17732
0
0.184028
0.157895
684
16
111
42.75
0.657986
0.147661
0
0
1
0
0.637931
0.417241
0
0
0
0
0
1
0.083333
true
0
0
0
0.083333
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
1
1
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
d9ba2ddb5ddb3bd724eb5a8e4cbfe428e2191af2
315
py
Python
forms.py
glts/django-progress
b3f9bd653a5f8cb112168c2d51043a9a2a3f1291
[ "MIT" ]
1
2019-06-19T00:25:23.000Z
2019-06-19T00:25:23.000Z
forms.py
glts/django-progress
b3f9bd653a5f8cb112168c2d51043a9a2a3f1291
[ "MIT" ]
null
null
null
forms.py
glts/django-progress
b3f9bd653a5f8cb112168c2d51043a9a2a3f1291
[ "MIT" ]
null
null
null
from django.forms.models import modelform_factory from .models import Task, Challenge, Routine TaskForm = modelform_factory(Task, fields=('name', 'description')) ChallengeForm = modelform_factory(Challenge, fields=('name', 'description')) RoutineForm = modelform_factory(Routine, fields=('name', 'description'))
35
76
0.780952
34
315
7.117647
0.470588
0.264463
0.260331
0
0
0
0
0
0
0
0
0
0.088889
315
8
77
39.375
0.843206
0
0
0
0
0
0.142857
0
0
0
0
0
0
1
0
false
0
0.4
0
0.4
0
0
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
1
0
0
0
0
4
d9c198fe3c1657602e2bd99b6661c55d412701fa
474
py
Python
fastreid/modeling/backbones/__init__.py
xiaomingzhid/SSKD
806d6db5c5dea4e018e49ee30d7bfc7b95977ffe
[ "Apache-2.0" ]
19
2021-09-10T02:16:29.000Z
2022-03-27T12:47:46.000Z
fastreid/modeling/backbones/__init__.py
liuwuhomepage/sskd
806d6db5c5dea4e018e49ee30d7bfc7b95977ffe
[ "Apache-2.0" ]
5
2021-09-27T03:52:12.000Z
2021-12-29T09:13:40.000Z
fastreid/modeling/backbones/__init__.py
liuwuhomepage/sskd
806d6db5c5dea4e018e49ee30d7bfc7b95977ffe
[ "Apache-2.0" ]
3
2021-12-23T16:44:44.000Z
2022-03-27T12:47:47.000Z
# encoding: utf-8 """ @author: liaoxingyu @contact: sherlockliao01@gmail.com """ from .build import build_backbone, BACKBONE_REGISTRY from .resnet import build_resnet_backbone from .osnet import build_osnet_backbone from .resnest import build_resnest_backbone from .resnext import build_resnext_backbone from .regnet import build_regnet_backbone, build_effnet_backbone from .shufflenet import build_shufflenetv2_backbone from .vision_transformer import build_vit_backbone
31.6
64
0.852321
62
474
6.209677
0.403226
0.228571
0
0
0
0
0
0
0
0
0
0.009324
0.094937
474
15
65
31.6
0.888112
0.151899
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
d9de02d0d573b0519261702e0661d48749b69c51
20
py
Python
python/apsis/service/__init__.py
alexhsamuel/apsis
7a038a39e5002637b60f73147728b4cc53692da3
[ "BSD-3-Clause" ]
1
2021-06-03T15:35:31.000Z
2021-06-03T15:35:31.000Z
python/apsis/service/__init__.py
alexhsamuel/apsis
7a038a39e5002637b60f73147728b4cc53692da3
[ "BSD-3-Clause" ]
93
2018-08-17T20:32:09.000Z
2022-03-23T17:34:37.000Z
python/apsis/service/__init__.py
alexhsamuel/apsis
7a038a39e5002637b60f73147728b4cc53692da3
[ "BSD-3-Clause" ]
null
null
null
DEFAULT_PORT = 5000
10
19
0.8
3
20
5
1
0
0
0
0
0
0
0
0
0
0
0.235294
0.15
20
1
20
20
0.647059
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
d9e674f4dbf7e1588367cb298f191585aeb7cde9
206
py
Python
src/organizations/serializers.py
earth-emoji/citizens4
eb5f5b0191f7c8690037c9adac07eb4affb40de4
[ "MIT" ]
null
null
null
src/organizations/serializers.py
earth-emoji/citizens4
eb5f5b0191f7c8690037c9adac07eb4affb40de4
[ "MIT" ]
10
2020-02-12T00:46:48.000Z
2022-03-11T23:51:27.000Z
src/organizations/serializers.py
earth-emoji/citizens4
eb5f5b0191f7c8690037c9adac07eb4affb40de4
[ "MIT" ]
null
null
null
from rest_framework import serializers from .models import Organization class OrganizationSerializer(serializers.ModelSerializer): class Meta: model = Organization fields = '__all__'
20.6
58
0.752427
19
206
7.894737
0.736842
0
0
0
0
0
0
0
0
0
0
0
0.199029
206
9
59
22.888889
0.909091
0
0
0
0
0
0.033981
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
d9ecd5471aa4a7a917ba61bc2a3dd3edf236dd27
1,470
py
Python
6 - template method & bridge/trading-after.py
mickeybeurskens/betterpython
1b095061b4c11bba39ba4723a23bce495b5ea06a
[ "MIT" ]
523
2021-02-22T09:44:36.000Z
2022-03-30T06:20:23.000Z
6 - template method & bridge/trading-after.py
mickeybeurskens/betterpython
1b095061b4c11bba39ba4723a23bce495b5ea06a
[ "MIT" ]
5
2021-03-03T14:54:41.000Z
2021-12-24T15:58:40.000Z
6 - template method & bridge/trading-after.py
mickeybeurskens/betterpython
1b095061b4c11bba39ba4723a23bce495b5ea06a
[ "MIT" ]
146
2021-03-12T23:10:38.000Z
2022-03-30T11:30:16.000Z
from abc import ABC, abstractmethod from typing import List class TradingBot(ABC): def connect(self): print(f"Connecting to Crypto exchange...") def get_market_data(self, coin: str) -> List[float]: return [10, 12, 18, 14] def check_prices(self, coin: str): self.connect() prices = self.get_market_data(coin) should_buy = self.should_buy(prices) should_sell = self.should_sell(prices) if should_buy: print(f"You should buy {coin}!") elif should_sell: print(f"You should sell {coin}!") else: print(f"No action needed for {coin}.") @abstractmethod def should_buy(self, prices: List[float]) -> bool: pass @abstractmethod def should_sell(self, prices: List[float]) -> bool: pass class AverageTrader(TradingBot): def list_average(self, l: List[float]) -> float: return sum(l) / len(l) def should_buy(self, prices: List[float]) -> bool: return prices[-1] < self.list_average(prices) def should_sell(self, prices: List[float]) -> bool: return prices[-1] > self.list_average(prices) class MinMaxTrader(TradingBot): def should_buy(self, prices: List[float]) -> bool: return prices[-1] == min(prices) def should_sell(self, prices: List[float]) -> bool: return prices[-1] == max(prices) application = MinMaxTrader() application.check_prices("BTC/USD")
27.735849
56
0.626531
189
1,470
4.761905
0.291005
0.08
0.093333
0.126667
0.356667
0.356667
0.347778
0.347778
0.268889
0.268889
0
0.01085
0.247619
1,470
52
57
28.269231
0.802893
0
0
0.263158
0
0
0.07619
0
0
0
0
0
0
1
0.263158
false
0.052632
0.052632
0.157895
0.552632
0.105263
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
1
1
0
0
4
8a023954c7833ea528861163b01e8a0cb7cdfc7e
242
py
Python
run.py
breadada/mieSys
4f89c870473b6f0c28bce7a23ed9df393fae2907
[ "Apache-2.0" ]
51
2016-07-07T03:11:29.000Z
2021-04-21T12:44:05.000Z
run.py
breadada/mieSys
4f89c870473b6f0c28bce7a23ed9df393fae2907
[ "Apache-2.0" ]
1
2016-11-21T04:00:35.000Z
2019-06-03T15:23:26.000Z
run.py
breadada/mieSys
4f89c870473b6f0c28bce7a23ed9df393fae2907
[ "Apache-2.0" ]
27
2016-07-15T05:11:33.000Z
2021-01-08T08:23:03.000Z
import os import behaviroal_targeting import ctr import time def main(): while True: behaviroal_targeting.main() ctr.main() print "UPDATE." time.sleep(2) if __name__ == "__main__": main()
17.285714
36
0.590909
27
242
4.925926
0.592593
0.285714
0
0
0
0
0
0
0
0
0
0.006024
0.31405
242
14
37
17.285714
0.795181
0
0
0
0
0
0.065217
0
0
0
0
0
0
0
null
null
0
0.333333
null
null
0.083333
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
1
0
0
0
0
4
8a1cae16f1ed17d3681c3bea61f5acb9242e12c3
31
py
Python
homeassistant/components/automatic/__init__.py
itewk/home-assistant
769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4
[ "Apache-2.0" ]
23
2017-11-15T21:03:53.000Z
2021-03-29T21:33:48.000Z
homeassistant/components/automatic/__init__.py
itewk/home-assistant
769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4
[ "Apache-2.0" ]
39
2016-12-16T12:40:34.000Z
2017-02-13T17:53:42.000Z
homeassistant/components/automatic/__init__.py
itewk/home-assistant
769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4
[ "Apache-2.0" ]
10
2018-01-01T00:12:51.000Z
2021-12-21T23:08:05.000Z
"""The automatic component."""
15.5
30
0.677419
3
31
7
1
0
0
0
0
0
0
0
0
0
0
0
0.096774
31
1
31
31
0.75
0.774194
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
8a235ee7d859ead8ed766e57eda501571ad99581
795
py
Python
setup.py
williamfzc/pycallback
bc927676a40b77b781b7388a75f6a22ee87df6c6
[ "MIT" ]
1
2020-11-13T14:06:33.000Z
2020-11-13T14:06:33.000Z
setup.py
williamfzc/pycallback
bc927676a40b77b781b7388a75f6a22ee87df6c6
[ "MIT" ]
null
null
null
setup.py
williamfzc/pycallback
bc927676a40b77b781b7388a75f6a22ee87df6c6
[ "MIT" ]
1
2020-11-13T14:06:38.000Z
2020-11-13T14:06:38.000Z
from setuptools import setup, find_packages from pycallback import ( __AUTHOR__, __AUTHOR_EMAIL__, __URL__, __LICENSE__, __VERSION__, __PROJECT_NAME__, __DESCRIPTION__, ) setup( name=__PROJECT_NAME__, version=__VERSION__, description=__DESCRIPTION__, author=__AUTHOR__, author_email=__AUTHOR_EMAIL__, url=__URL__, packages=find_packages(), include_package_data=True, license=__LICENSE__, classifiers=[ "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", ], python_requires=">=3.6", )
24.84375
49
0.651572
75
795
6.026667
0.413333
0.210177
0.276549
0.230089
0
0
0
0
0
0
0
0.014901
0.240252
795
31
50
25.645161
0.733444
0
0
0
0
0
0.275472
0
0
0
0
0
0
1
0
true
0
0.066667
0
0.066667
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
0
0
0
1
0
0
0
0
0
0
4
8a2be00f66b19525bf3c5d02d1e92ba40fe17d36
369
py
Python
main.py
juliusml/building_ai_project
27fe70b4fc8b51a6de03d8d4f43283056c6fc696
[ "CC-BY-2.0" ]
null
null
null
main.py
juliusml/building_ai_project
27fe70b4fc8b51a6de03d8d4f43283056c6fc696
[ "CC-BY-2.0" ]
null
null
null
main.py
juliusml/building_ai_project
27fe70b4fc8b51a6de03d8d4f43283056c6fc696
[ "CC-BY-2.0" ]
null
null
null
# Early experimentation from transvec.transformers import TranslationWordVectorizer as TWV import gensim.downloader as gsd def model_import(): """Imports all needed models.""" # "load" only downloads it if it isn't already on the PC locally #en_model = gsd.load('en§§') #se_model = gsd.load('se§§') #en_se_model = TWV(en_model, se_model).fit(train)
30.75
68
0.715447
56
369
4.660714
0.625
0.08046
0.091954
0
0
0
0
0
0
0
0
0
0.168022
369
12
69
30.75
0.837134
0.585366
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
true
0
1
0
1.333333
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
8a3453cf5dd6bced1ef72c202cec1e16780557c9
4,077
py
Python
cfgov/v1/migrations/0202_add_research_hub_filterable_page.py
Colin-Seifer/consumerfinance.gov
a1a943f7170b498707d642d6be97b9a97a2b52e3
[ "CC0-1.0" ]
156
2015-01-16T15:16:46.000Z
2020-08-04T04:48:01.000Z
cfgov/v1/migrations/0202_add_research_hub_filterable_page.py
Colin-Seifer/consumerfinance.gov
a1a943f7170b498707d642d6be97b9a97a2b52e3
[ "CC0-1.0" ]
3,604
2015-01-05T22:09:12.000Z
2020-08-14T17:09:19.000Z
cfgov/v1/migrations/0202_add_research_hub_filterable_page.py
Colin-Seifer/consumerfinance.gov
a1a943f7170b498707d642d6be97b9a97a2b52e3
[ "CC0-1.0" ]
102
2015-01-28T14:51:18.000Z
2020-08-10T00:00:39.000Z
# Generated by Django 3.2.13 on 2022-04-19 16:09 from django.db import migrations, models import django.db.models.deletion import v1.models.filterable_list_mixins class Migration(migrations.Migration): dependencies = [ ('v1', '0201_remove_well_with_ask_search'), ] operations = [ migrations.CreateModel( name='ResearchHubPage', fields=[ ('sublandingfilterablepage_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='v1.sublandingfilterablepage')), ], options={ 'abstract': False, }, bases=(v1.models.filterable_list_mixins.CategoryFilterableMixin, 'v1.sublandingfilterablepage'), ), migrations.AlterField( model_name='cfgovpagecategory', name='name', field=models.CharField(choices=[('Administrative adjudication docket', (('administrative-adjudication', 'Administrative adjudication'), ('stipulation-and-constent-order', 'Stipulation and consent order'))), ('Amicus Brief', (('us-supreme-court', 'U.S. Supreme Court'), ('fed-circuit-court', 'Federal Circuit Court'), ('fed-district-court', 'Federal District Court'), ('state-court', 'State Court'))), ('Blog', (('at-the-cfpb', 'At the CFPB'), ('directors-notebook', "Director's notebook"), ('policy_compliance', 'Policy and compliance'), ('data-research-reports', 'Data, research, and reports'), ('info-for-consumers', 'Info for consumers'))), ('Consumer Reporting Companies', (('nationwide', 'Nationwide'), ('employment-screening', 'Employment screening'), ('tenant-screening', 'Tenant screening'), ('check-bank-screening', 'Check and bank screening'), ('personal-property-insurance', 'Personal property insurance'), ('medical', 'Medical'), ('low-income-and-subprime', 'Low-income and subprime'), ('supplementary-reports', 'Supplementary reports'), ('utilities', 'Utilities'), ('retail', 'Retail'), ('gaming', 'Gaming'))), ('Enforcement Action', (('administrative-proceeding', 'Administrative Proceeding'), ('civil-action', 'Civil Action'))), ('Final rule', (('interim-final-rule', 'Interim final rule'), ('final-rule', 'Final rule'))), ('FOIA Frequently Requested Record', (('report', 'Report'), ('log', 'Log'), ('record', 'Record'))), ('Newsroom', (('consumer-advisories', 'Consumer advisories'), ('directors-statement', "Director's statement"), ('op-ed', 'Op-ed'), ('press-release', 'Press release'), ('speech', 'Speech'), ('testimony', 'Testimony'))), ('Notice and Opportunity for Comment', (('notice-proposed-rule', 'Advance notice of proposed rulemaking'), ('proposed-rule', 'Proposed rule'), ('interim-final-rule-2', 'Interim final rule'), ('request-comment-info', 'Request for comment or information'), ('proposed-policy', 'Proposed policy'), ('intent-preempt-determ', 'Intent to make preemption determination'), ('info-collect-activity', 'Information collection activities'), ('notice-privacy-act', 'Notice related to Privacy Act'))), ('Research Hub', (('data-point', 'Data point'), ('industry-markets', 'Industry and markets'))), ('Research Report', (('consumer-complaint', 'Consumer complaint'), ('super-highlight', 'Supervisory Highlights'), ('data-point', 'Data point'), ('industry-markets', 'Industry and markets'), ('consumer-edu-empower', 'Consumer education and empowerment'), ('to-congress', 'To Congress'), ('data-spotlight', 'Data spotlight'))), ('Rule Under Development', (('notice-proposed-rule-2', 'Advance notice of proposed rulemaking'), ('proposed-rule-2', 'Proposed rule'))), ('Story', (('auto-loans', 'Auto loans'), ('bank-accts-services', 'Bank accounts and services'), ('credit-cards', 'Credit cards'), ('credit-reports-scores', 'Credit reports and scores'), ('debt-collection', 'Debt collection'), ('money-transfers', 'Money transfers'), ('mortgages', 'Mortgages'), ('payday-loans', 'Payday loans'), ('prepaid-cards', 'Prepaid cards'), ('student-loans', 'Student loans')))], max_length=255), ), ]
131.516129
3,135
0.680402
433
4,077
6.367206
0.452656
0.022851
0.023214
0.021763
0.104824
0.069641
0.069641
0.036997
0.036997
0
0
0.008676
0.12362
4,077
30
3,136
135.9
0.762944
0.011283
0
0.083333
1
0
0.618019
0.092579
0
0
0
0
0
1
0
false
0
0.125
0
0.25
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
1
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
8a379ade02a88906b755e4acf0368207448ef34f
53
py
Python
spruned/application/networks/__init__.py
darosior/spruned
558b93f32ee24c01255ef34cdaa59491caa08049
[ "MIT" ]
152
2018-03-03T20:49:37.000Z
2021-03-07T07:32:44.000Z
spruned/application/networks/__init__.py
darosior/spruned
558b93f32ee24c01255ef34cdaa59491caa08049
[ "MIT" ]
106
2018-02-11T22:30:05.000Z
2021-05-17T21:47:03.000Z
spruned/application/networks/__init__.py
darosior/spruned
558b93f32ee24c01255ef34cdaa59491caa08049
[ "MIT" ]
26
2018-04-12T18:07:10.000Z
2021-05-09T22:41:54.000Z
from . import bitcoin as _bitcoin bitcoin = _bitcoin
17.666667
33
0.792453
7
53
5.714286
0.571429
0.7
0
0
0
0
0
0
0
0
0
0
0.169811
53
2
34
26.5
0.909091
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
8a42d6b4c6e318ef3cd8c03c7d8c1f76acb3992c
205
py
Python
pysster/__init__.py
stella-gao/pysster
43b20f311303859ed3cddf9b78035b4ce456584e
[ "MIT" ]
null
null
null
pysster/__init__.py
stella-gao/pysster
43b20f311303859ed3cddf9b78035b4ce456584e
[ "MIT" ]
null
null
null
pysster/__init__.py
stella-gao/pysster
43b20f311303859ed3cddf9b78035b4ce456584e
[ "MIT" ]
1
2018-09-03T20:49:05.000Z
2018-09-03T20:49:05.000Z
from .Model import * from .Data import * from .Grid_Search import * from .utils import * from .Alphabet_Encoder import * from .Motif import * from .One_Hot_Encoder import * __version__ = '1.1.2'
20.5
32
0.707317
29
205
4.724138
0.517241
0.437956
0
0
0
0
0
0
0
0
0
0.018293
0.2
205
10
33
20.5
0.817073
0
0
0
0
0
0.025381
0
0
0
0
0
0
1
0
false
0
0.875
0
0.875
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
8a4730786db3269957d06a604a155c0c1a4e4eb6
7,706
py
Python
tests/permifrost/core/permissions/test_snowflake_spec_loader.py
cmccann020/permifrost_test
ce3f822d5966f90f8d3caaffc4b4b1122cee4b85
[ "MIT" ]
null
null
null
tests/permifrost/core/permissions/test_snowflake_spec_loader.py
cmccann020/permifrost_test
ce3f822d5966f90f8d3caaffc4b4b1122cee4b85
[ "MIT" ]
null
null
null
tests/permifrost/core/permissions/test_snowflake_spec_loader.py
cmccann020/permifrost_test
ce3f822d5966f90f8d3caaffc4b4b1122cee4b85
[ "MIT" ]
1
2020-11-04T05:50:14.000Z
2020-11-04T05:50:14.000Z
import pytest import os from permifrost.core.permissions import SpecLoadingError from permifrost.core.permissions.snowflake_spec_loader import SnowflakeSpecLoader from permifrost_test_utils.snowflake_schema_builder import SnowflakeSchemaBuilder from permifrost_test_utils.snowflake_connector import MockSnowflakeConnector @pytest.fixture def test_dir(request): return request.fspath.dirname @pytest.fixture def mock_connector(): return MockSnowflakeConnector() class TestSnowflakeSpecLoader: def test_check_entities_on_snowflake_server_no_warehouses( self, test_dir, mocker, mock_connector ): mocker.patch.object(mock_connector, "show_warehouses") SnowflakeSpecLoader( os.path.join(test_dir, "specs", "snowflake_spec_blank.yml"), mock_connector ) mock_connector.show_warehouses.assert_not_called() def test_check_entities_on_snowflake_server_no_databases( self, test_dir, mocker, mock_connector ): mocker.patch.object(mock_connector, "show_databases") SnowflakeSpecLoader( os.path.join(test_dir, "specs", "snowflake_spec_blank.yml"), mock_connector ) mock_connector.show_databases.assert_not_called() def test_check_entities_on_snowflake_server_no_schemas( self, test_dir, mocker, mock_connector ): mocker.patch.object(mock_connector, "show_schemas") SnowflakeSpecLoader( os.path.join(test_dir, "specs", "snowflake_spec_blank.yml"), mock_connector ) mock_connector.show_schemas.assert_not_called() def test_check_entities_on_snowflake_server_no_tables( self, test_dir, mocker, mock_connector ): mocker.patch.object(mock_connector, "show_tables") mocker.patch.object(mock_connector, "show_views") SnowflakeSpecLoader( os.path.join(test_dir, "specs", "snowflake_spec_blank.yml"), mock_connector ) mock_connector.show_tables.assert_not_called() mock_connector.show_views.assert_not_called() def test_check_entities_on_snowflake_server_no_roles( self, test_dir, mocker, mock_connector ): mocker.patch.object(mock_connector, "show_roles") SnowflakeSpecLoader( os.path.join(test_dir, "specs", "snowflake_spec_blank.yml"), mock_connector ) mock_connector.show_roles.assert_not_called() def test_check_entities_on_snowflake_server_no_users( self, test_dir, mocker, mock_connector ): mocker.patch.object(mock_connector, "show_users") SnowflakeSpecLoader( os.path.join(test_dir, "specs", "snowflake_spec_blank.yml"), mock_connector ) mock_connector.show_users.assert_not_called() def test_check_permissions_on_snowflake_server_as_securityadmin( self, test_dir, mocker, mock_connector ): mocker.patch.object( MockSnowflakeConnector, "get_current_role", return_value="securityadmin" ) SnowflakeSpecLoader( os.path.join(test_dir, "specs", "snowflake_spec_blank.yml"), mock_connector ) mock_connector.get_current_role.assert_called() def test_check_permissions_on_snowflake_server_not_as_securityadmin( self, test_dir, mocker, mock_connector ): mocker.patch.object( MockSnowflakeConnector, "get_current_role", return_value="notsecurityadmin" ) with pytest.raises(SpecLoadingError) as context: SnowflakeSpecLoader( os.path.join(test_dir, "specs", "snowflake_spec_blank.yml"), mock_connector, ) mock_connector.get_current_role.assert_called() def test_check_permissions_on_snowflake_server_gets_current_user_info( self, test_dir, mocker, mock_connector ): mocker.patch.object(mock_connector, "get_current_user") SnowflakeSpecLoader( os.path.join(test_dir, "specs", "snowflake_spec_blank.yml"), mock_connector ) mock_connector.get_current_user.assert_called() def test_load_spec_loads_file(self, mocker, mock_connector): mock_open = mocker.patch( "builtins.open", mocker.mock_open(read_data="""version: "1.0" """) ) filepath = "filepath to open" SnowflakeSpecLoader(filepath, mock_connector) mock_open.assert_called_once_with(filepath, "r") @pytest.mark.parametrize( "spec_file_data,method,return_value", [ ( SnowflakeSchemaBuilder().add_db(owner="user").build(), "show_databases", ["testdb"], ), ( SnowflakeSchemaBuilder().add_role(owner="user").build(), "show_roles", ["testrole"], ), ( SnowflakeSchemaBuilder().add_user(owner="user").build(), "show_users", ["testusername"], ), ( SnowflakeSchemaBuilder().add_warehouse(owner="user").build(), "show_warehouses", ["testwarehouse"], ), ( SnowflakeSchemaBuilder().require_owner().add_db(owner="user").build(), "show_databases", ["testdb"], ), ( SnowflakeSchemaBuilder().require_owner().add_role(owner="user").build(), "show_roles", ["testrole"], ), ( SnowflakeSchemaBuilder().require_owner().add_user(owner="user").build(), "show_users", ["testusername"], ), ( SnowflakeSchemaBuilder() .require_owner() .add_warehouse(owner="user") .build(), "show_warehouses", ["testwarehouse"], ), ], ) def test_load_spec_with_owner( self, spec_file_data, method, return_value, mocker, mock_connector ): print("Spec file is: ") print(spec_file_data) mocker.patch("builtins.open", mocker.mock_open(read_data=spec_file_data)) mocker.patch.object(mock_connector, method, return_value=return_value) SnowflakeSpecLoader("", mock_connector) @pytest.mark.parametrize( "spec_file_data,method,return_value", [ ( SnowflakeSchemaBuilder().require_owner().add_db().build(), "show_databases", ["testdb"], ), ( SnowflakeSchemaBuilder().require_owner().add_role().build(), "show_roles", ["testrole"], ), ( SnowflakeSchemaBuilder().require_owner().add_user().build(), "show_users", ["testusername"], ), ( SnowflakeSchemaBuilder().require_owner().add_warehouse().build(), "show_warehouses", ["testwarehouse"], ), ], ) def test_load_spec_owner_required_with_no_owner( self, spec_file_data, method, return_value, mocker, mock_connector ): print("Spec file is: ") print(spec_file_data) mocker.patch("builtins.open", mocker.mock_open(read_data=spec_file_data)) mocker.patch.object(mock_connector, method, return_value=return_value) with pytest.raises(SpecLoadingError) as context: SnowflakeSpecLoader("", mock_connector) assert "Spec Error: Owner not defined" in str(context.value)
36.349057
88
0.619907
754
7,706
5.958886
0.133952
0.130203
0.052971
0.046739
0.80592
0.776319
0.766748
0.744269
0.69063
0.577343
0
0.000361
0.28095
7,706
211
89
36.521327
0.810504
0
0
0.518325
0
0
0.118349
0.036854
0
0
0
0
0.062827
1
0.073298
false
0
0.031414
0.010471
0.120419
0.020942
0
0
0
null
0
0
0
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
8a4d2daba468886781f97dcfd97a4011c90b52d2
186
py
Python
server/recipients/apps.py
tombushmitz86/vims
1dcf1bf655ef8e33092f8e3e4cfbd11e11239e3e
[ "MIT" ]
null
null
null
server/recipients/apps.py
tombushmitz86/vims
1dcf1bf655ef8e33092f8e3e4cfbd11e11239e3e
[ "MIT" ]
null
null
null
server/recipients/apps.py
tombushmitz86/vims
1dcf1bf655ef8e33092f8e3e4cfbd11e11239e3e
[ "MIT" ]
null
null
null
from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ class RecipientsConfig(AppConfig): name = 'recipients' verbose_name = _('Recipients')
23.25
55
0.774194
21
186
6.666667
0.714286
0.142857
0
0
0
0
0
0
0
0
0
0
0.150538
186
7
56
26.571429
0.886076
0
0
0
0
0
0.107527
0
0
0
0
0
0
1
0
false
0
0.4
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
8a515eef84a11584606de17b937dc26b661d3854
373
py
Python
Lektion_3/5_Kivy_Style/5_Kivy_Style.py
tvotan/dhbw_python_kivy
41d363d41a79e1881128be54dc30b5d0c58afb70
[ "MIT" ]
1
2020-10-27T15:27:06.000Z
2020-10-27T15:27:06.000Z
Lektion_3/5_Kivy_Style/5_Kivy_Style.py
tvotan/dhbw_python_kivy
41d363d41a79e1881128be54dc30b5d0c58afb70
[ "MIT" ]
null
null
null
Lektion_3/5_Kivy_Style/5_Kivy_Style.py
tvotan/dhbw_python_kivy
41d363d41a79e1881128be54dc30b5d0c58afb70
[ "MIT" ]
null
null
null
import kivy from kivy.app import App from kivy.uix.label import Label from kivy.uix.gridlayout import GridLayout from kivy.uix.textinput import TextInput from kivy.uix.button import Button from kivy.uix.widget import Widget class MyGrid(Widget): pass class Five_App(App): def build(self): return MyGrid() if __name__ == "__main__": Five_App().run()
19.631579
42
0.742627
56
373
4.767857
0.392857
0.179775
0.205993
0
0
0
0
0
0
0
0
0
0.171582
373
19
43
19.631579
0.864078
0
0
0
0
0
0.02139
0
0
0
0
0
0
1
0.071429
false
0.071429
0.5
0.071429
0.785714
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
1
0
1
0
0
4
8a8e72faa1fb599a7bbbf76772927f97d13f04f0
1,076
py
Python
01_Data_Types_And_Variables/04_long_lists.py
DetainedDeveloper/Pimp-My-Python
8c0749013581bebd65b3df67f92605c4ecd8e685
[ "MIT" ]
1
2021-07-01T10:54:45.000Z
2021-07-01T10:54:45.000Z
01_Data_Types_And_Variables/04_long_lists.py
DetainedDeveloper/Pimp-My-Python
8c0749013581bebd65b3df67f92605c4ecd8e685
[ "MIT" ]
null
null
null
01_Data_Types_And_Variables/04_long_lists.py
DetainedDeveloper/Pimp-My-Python
8c0749013581bebd65b3df67f92605c4ecd8e685
[ "MIT" ]
null
null
null
# print([3, 3.14159, "hi", True, [1, 2, 3]]) # print(type([3, 3.14159, "hi", True, [1, 2, 3]])) # START # my_list = list() # print(my_list) # my_list.append(3) # my_list.append(3.14159) # my_list.append(True) # my_list.append([1, 2, 3]) # print(my_list) # my_list.remove(3) # print(my_list) # my_list.remove("Jay") # print(my_list) # my_list.pop() # print(my_list) # END # START # my_list = [3, 4, 2, 67, 1] # my_list.sort() # print(my_list) # END # START # my_list = ["X", "M", "Z", "L", "I"] # my_list.sort() # print(my_list) # END # START # my_list = [[6, 8, 5], [2, 1, 4, 3]] # my_list[0].sort() # my_list[1].sort() # my_list.sort() # print(my_list) # END # START # my_list = ["Jim", "Bob", "Alice", "John", "David", "Tim"] # print(len(my_list)) # print(my_list[0]) # print(my_list[3]) # print(my_list[-3]) # print(my_list[2:]) # print(my_list[:2]) # print(my_list[-2:]) # print(my_list[:-2]) # print(my_list[2:4]) # print(my_list[-2:-4]) # print(my_list[4:2]) # print(my_list[-4:-2]) # my_list[3] = "Jay" # print(my_list) # END
11.326316
59
0.566914
193
1,076
2.958549
0.181347
0.409807
0.385289
0.126095
0.644483
0.558669
0.558669
0.388792
0.288967
0.288967
0
0.069977
0.17658
1,076
94
60
11.446809
0.574492
0.864312
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
0
0
0
null
1
1
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
8a90059b9d3c9cc33cfb0bea7deffb0bdebd907f
103
py
Python
tech_project/lib/python2.7/site-packages/formtools/models.py
priyamshah112/Project-Descripton-Blog
8e01016c6be79776c4f5ca75563fa3daa839e39e
[ "MIT" ]
331
2015-01-09T01:25:47.000Z
2019-10-01T01:18:13.000Z
tech_project/lib/python2.7/site-packages/formtools/models.py
priyamshah112/Project-Descripton-Blog
8e01016c6be79776c4f5ca75563fa3daa839e39e
[ "MIT" ]
97
2015-01-07T11:33:19.000Z
2019-09-29T16:41:56.000Z
tech_project/lib/python2.7/site-packages/formtools/models.py
priyamshah112/Project-Descripton-Blog
8e01016c6be79776c4f5ca75563fa3daa839e39e
[ "MIT" ]
99
2015-01-20T13:17:28.000Z
2019-09-29T02:26:30.000Z
# This file is required to pretend formtools has models. # Otherwise test models cannot be registered.
34.333333
56
0.796117
15
103
5.466667
0.933333
0
0
0
0
0
0
0
0
0
0
0
0.165049
103
2
57
51.5
0.953488
0.951456
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
8a98356ef32662fbf31380cc09c16cd9f1f42eb8
66
py
Python
pkgs/ops-pkg/src/genie/libs/ops/fdb/fdb.py
miott/genielibs
6464642cdd67aa2367bdbb12561af4bb060e5e62
[ "Apache-2.0" ]
null
null
null
pkgs/ops-pkg/src/genie/libs/ops/fdb/fdb.py
miott/genielibs
6464642cdd67aa2367bdbb12561af4bb060e5e62
[ "Apache-2.0" ]
null
null
null
pkgs/ops-pkg/src/genie/libs/ops/fdb/fdb.py
miott/genielibs
6464642cdd67aa2367bdbb12561af4bb060e5e62
[ "Apache-2.0" ]
null
null
null
from genie.ops.base import Base class Fdb(Base): exclude = []
16.5
31
0.681818
10
66
4.5
0.8
0
0
0
0
0
0
0
0
0
0
0
0.19697
66
4
32
16.5
0.849057
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
8aac2b107b82626a9406f0554f0f415897f390ec
687
py
Python
samples/ner_sample/ner_sample/evaluation/evaluation_metrics.py
katyamust/ml-expr-fw
5ede3ff1f777430cf25e8731e4798fc37387fb9d
[ "MIT" ]
1
2022-03-06T21:52:01.000Z
2022-03-06T21:52:01.000Z
samples/ner_sample/ner_sample/evaluation/evaluation_metrics.py
omri374/FabricML
a545f1ee907b1b89ca9766a873c5944ec88e54e9
[ "MIT" ]
null
null
null
samples/ner_sample/ner_sample/evaluation/evaluation_metrics.py
omri374/FabricML
a545f1ee907b1b89ca9766a873c5944ec88e54e9
[ "MIT" ]
null
null
null
from abc import abstractmethod from ner_sample import LoggableObject class EvaluationMetrics(LoggableObject): """ Class which holds the evaluation output for one model run. For example, precision or recall, MSE, accuracy etc. """ @abstractmethod def get_metrics(self): """ Return the evaluation result's metrics you wish to be stored in the experiment logging system like one for each epoch or for each threshold value :return: A dictionary with names of values of metrics to store """ pass def get_params(self): # Evaluation results are not likely to have params, just metrics return None
28.625
101
0.68559
89
687
5.258427
0.696629
0.081197
0
0
0
0
0
0
0
0
0
0
0.267831
687
23
102
29.869565
0.930418
0.558952
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0.125
0.25
0.125
0.75
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
1
1
0
0
4
8ad6c7c4bfddfe3bcab39d693be6ad52678639ea
75
py
Python
app/datahand/__init__.py
OpenHill/OpenHi
92279362b6513e066dd10f6ccbff8ab8a30b066e
[ "Apache-2.0" ]
null
null
null
app/datahand/__init__.py
OpenHill/OpenHi
92279362b6513e066dd10f6ccbff8ab8a30b066e
[ "Apache-2.0" ]
null
null
null
app/datahand/__init__.py
OpenHill/OpenHi
92279362b6513e066dd10f6ccbff8ab8a30b066e
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -* # There is Mr. Wang's creation # 数据处理 主要序列化和反序列化data
25
30
0.666667
11
75
4.545455
1
0
0
0
0
0
0
0
0
0
0
0.016129
0.173333
75
3
31
25
0.790323
0.92
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
76db30c460581b426c3f4d2e5831a7a3afa4d675
213
py
Python
head_first_design_patterns/hofs_dinamics/croak_behaviors.py
incolumepy-cursos/poop
e4ac26b8d2a8c263a93fd9642fab52aafda53d80
[ "MIT" ]
null
null
null
head_first_design_patterns/hofs_dinamics/croak_behaviors.py
incolumepy-cursos/poop
e4ac26b8d2a8c263a93fd9642fab52aafda53d80
[ "MIT" ]
null
null
null
head_first_design_patterns/hofs_dinamics/croak_behaviors.py
incolumepy-cursos/poop
e4ac26b8d2a8c263a93fd9642fab52aafda53d80
[ "MIT" ]
null
null
null
__author__ = '@britodfbr' def quack(): m = "Quack!" print(m) return m def squeak(): m = "Squeak!" print(m) return m def mute_quack(): m = "<< silence >>" print(m) return m
11.210526
25
0.511737
27
213
3.851852
0.37037
0.173077
0.346154
0.375
0.307692
0
0
0
0
0
0
0
0.328639
213
18
26
11.833333
0.727273
0
0
0.461538
0
0
0.169014
0
0
0
0
0
0
1
0.230769
false
0
0
0
0.461538
0.230769
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
4