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
1dcda00f06d484c429e78cd8348704164d75422d
507
py
Python
contesto/__init__.py
kaktaktoa/contesto
c31d10959abf1397182c24216880c487d29ac184
[ "MIT" ]
null
null
null
contesto/__init__.py
kaktaktoa/contesto
c31d10959abf1397182c24216880c487d29ac184
[ "MIT" ]
null
null
null
contesto/__init__.py
kaktaktoa/contesto
c31d10959abf1397182c24216880c487d29ac184
[ "MIT" ]
null
null
null
from contesto.config import config from contesto.basis.test_case import ContestoTestCase from contesto.basis.benchmark import BenchmarkBaseCase from contesto.basis.page import Page, WebPage, MobilePage from contesto.basis.component import Component, WebComponent, MobileComponent from contesto.core.locator import * from contesto.core.finder import find_element, find_elements from contesto.core.driver_mixin import * from contesto.globals import current_test from contesto.step import Step, step, is_step
42.25
77
0.854043
68
507
6.279412
0.411765
0.28103
0.159251
0
0
0
0
0
0
0
0
0
0.094675
507
11
78
46.090909
0.930283
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
1df84d03d4dedda02e3d15a5a6f8e4d3b39b329c
245
py
Python
sales/serializers.py
joarkm/olmonopolet-api
5fb605f53d6fc87c441ae0f72360c524cb0d3fb7
[ "MIT" ]
2
2020-11-21T13:15:53.000Z
2021-05-18T19:17:41.000Z
sales/serializers.py
joarkm/olmonopolet-api
5fb605f53d6fc87c441ae0f72360c524cb0d3fb7
[ "MIT" ]
6
2021-03-21T19:24:26.000Z
2021-09-22T19:09:31.000Z
sales/serializers.py
joarkm/olmonopolet-api
5fb605f53d6fc87c441ae0f72360c524cb0d3fb7
[ "MIT" ]
1
2021-05-20T21:52:10.000Z
2021-05-20T21:52:10.000Z
from rest_framework import serializers from .models import DailySale class DailySaleSerializer(serializers.ModelSerializer): class Meta: fields=('beer_id','store_id','sales_day','beers_sold','last_updated') model = DailySale
35
77
0.755102
28
245
6.392857
0.785714
0
0
0
0
0
0
0
0
0
0
0
0.146939
245
7
78
35
0.856459
0
0
0
0
0
0.186992
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
38078293d27ebd5374a29f80e1845de043a57dc2
150
py
Python
contests_atcoder/abc161/abc161_b.py
takelifetime/competitive-programming
e7cf8ef923ccefad39a1727ca94c610d650fcb76
[ "BSD-2-Clause" ]
null
null
null
contests_atcoder/abc161/abc161_b.py
takelifetime/competitive-programming
e7cf8ef923ccefad39a1727ca94c610d650fcb76
[ "BSD-2-Clause" ]
1
2021-01-02T06:36:51.000Z
2021-01-02T06:36:51.000Z
contests_atcoder/abc161/abc161_b.py
takelifetime/competitive-programming
e7cf8ef923ccefad39a1727ca94c610d650fcb76
[ "BSD-2-Clause" ]
null
null
null
n, m = map(int, input().split()) a = list(map(int, input().split())) a.sort(reverse=True) if a[m-1] * 4 * m < sum(a): print("No") else: print("Yes")
21.428571
39
0.566667
29
150
2.931034
0.655172
0.141176
0.258824
0.376471
0.4
0
0
0
0
0
0
0.015625
0.146667
150
7
40
21.428571
0.648438
0
0
0
0
0
0.033113
0
0
0
0
0
0
1
0
false
0
0
0
0
0.4
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
381d918d4ccee3d8d356969cadd9803f3f8a5b54
212
py
Python
tests/fixtures/info2.py
Nitnelav/synpp
b2b2136a99701ce77fd4fea939f8efb521f67c21
[ "MIT" ]
6
2020-04-01T12:06:20.000Z
2021-11-02T19:10:27.000Z
tests/fixtures/info2.py
Nitnelav/synpp
b2b2136a99701ce77fd4fea939f8efb521f67c21
[ "MIT" ]
26
2019-12-08T12:25:39.000Z
2022-02-28T07:24:56.000Z
tests/fixtures/info2.py
Nitnelav/synpp
b2b2136a99701ce77fd4fea939f8efb521f67c21
[ "MIT" ]
8
2020-06-19T15:49:46.000Z
2021-07-06T10:15:37.000Z
def configure(context): context.stage("tests.fixtures.info1") def execute(context): context.set_info("abc", "123") context.set_info("concat", "123" + context.get_info("tests.fixtures.info1", "uvw"))
30.285714
87
0.693396
28
212
5.142857
0.535714
0.194444
0.25
0
0
0
0
0
0
0
0
0.042781
0.117925
212
6
88
35.333333
0.727273
0
0
0
0
0
0.273585
0
0
0
0
0
0
1
0.4
false
0
0
0
0.4
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
1
0
0
0
0
0
0
0
4
3849f17833f0b2721a53c16b7e3526ee3bbdc1fc
86
py
Python
setup.py
Yeachan-Heo/HSC2021-AlphaSolar
e572fb2fc44922f454c19396e17537bb706d23c8
[ "MIT" ]
13
2021-06-11T06:17:23.000Z
2021-07-19T01:50:36.000Z
setup.py
Yeachan-Heo/HSC2021-AlphaSolar
e572fb2fc44922f454c19396e17537bb706d23c8
[ "MIT" ]
null
null
null
setup.py
Yeachan-Heo/HSC2021-AlphaSolar
e572fb2fc44922f454c19396e17537bb706d23c8
[ "MIT" ]
5
2021-06-11T06:32:24.000Z
2021-06-14T02:16:24.000Z
from setuptools import setup setup(packages=["alphasolar"], name="alphasolar") #asdf
17.2
49
0.767442
10
86
6.6
0.8
0
0
0
0
0
0
0
0
0
0
0
0.093023
86
5
50
17.2
0.846154
0.046512
0
0
0
0
0.243902
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
69c0934faedd49900c35f0566f6f4e1dfba19135
3,473
py
Python
tests/test_AdresseParser.py
bmadjic/AdresseParser
b57d15078888056086b643b2b905b336c160bcad
[ "MIT" ]
null
null
null
tests/test_AdresseParser.py
bmadjic/AdresseParser
b57d15078888056086b643b2b905b336c160bcad
[ "MIT" ]
null
null
null
tests/test_AdresseParser.py
bmadjic/AdresseParser
b57d15078888056086b643b2b905b336c160bcad
[ "MIT" ]
null
null
null
from unittest import TestCase from AdresseParser import AdresseParser """Run python -m unittest discover tests""" class TestAdresseParser(TestCase): def setUp(self) -> None: self.adresse_parser = AdresseParser() self.adresse1 = self.adresse_parser.parse("88 rue de rivoli 75002 paris") self.adresse2 = self.adresse_parser.parse("75002 paris 88 rue de rivoli") self.adresse3 = self.adresse_parser.parse("88 rue de rivoli") self.adresse4 = self.adresse_parser.parse("rue de rivoli 75002 paris") self.adresse5 = self.adresse_parser.parse("75002 paris rue de rivoli") def test_succes_parse_numero(self): self.assertEqual(self.adresse1["numero"], str(88)) self.assertEqual(self.adresse2["numero"], str(88)) self.assertEqual(self.adresse3["numero"], str(88)) self.assertEqual(self.adresse4["numero"], str(-1)) self.assertEqual(self.adresse5["numero"], str(-1)) def test_succes_parse_rue(self): self.assertEqual(self.adresse1["rue"]["type"], "RUE") self.assertEqual(self.adresse1["rue"]["nom"], "RIVOLI") self.assertEqual(self.adresse2["rue"]["type"], "RUE") self.assertEqual(self.adresse2["rue"]["nom"], "RIVOLI") self.assertEqual(self.adresse3["rue"]["type"], "RUE") self.assertEqual(self.adresse3["rue"]["nom"], "RIVOLI") self.assertEqual(self.adresse4["rue"]["type"], "RUE") self.assertEqual(self.adresse4["rue"]["nom"], "RIVOLI") self.assertEqual(self.adresse5["rue"]["type"], "RUE") self.assertEqual(self.adresse5["rue"]["nom"], "RIVOLI") def test_succes_parse_ville(self): self.assertEqual(self.adresse1["ville"]["arrondissement"], 2) self.assertEqual(self.adresse1["ville"]["nom"], "PARIS") self.assertEqual(self.adresse2["ville"]["arrondissement"], 2) self.assertEqual(self.adresse2["ville"]["nom"], "PARIS") self.assertEqual(self.adresse3["ville"]["arrondissement"], 0) self.assertEqual(self.adresse3["ville"]["nom"], "") self.assertEqual(self.adresse4["ville"]["arrondissement"], 2) self.assertEqual(self.adresse4["ville"]["nom"], "PARIS") self.assertEqual(self.adresse5["ville"]["arrondissement"], 2) self.assertEqual(self.adresse5["ville"]["nom"], "PARIS") def test_succes_parse_departement(self): self.assertEqual(self.adresse1["departement"]["numero"], 75) self.assertEqual(self.adresse1["departement"]["nom"], "Paris") self.assertEqual(self.adresse2["departement"]["numero"], 75) self.assertEqual(self.adresse2["departement"]["nom"], "Paris") self.assertEqual(self.adresse3["departement"]["numero"], 75) self.assertEqual(self.adresse3["departement"]["nom"], "Paris") self.assertEqual(self.adresse4["departement"]["numero"], 75) self.assertEqual(self.adresse4["departement"]["nom"], "Paris") self.assertEqual(self.adresse5["departement"]["numero"], 75) self.assertEqual(self.adresse5["departement"]["nom"], "Paris") def test_succes_parse_region(self): self.assertEqual(self.adresse1["region"], "Île-de-France") self.assertEqual(self.adresse2["region"], "Île-de-France") self.assertEqual(self.adresse3["region"], "Île-de-France") self.assertEqual(self.adresse4["region"], "Île-de-France") self.assertEqual(self.adresse5["region"], "Île-de-France")
41.843373
81
0.656493
395
3,473
5.718987
0.118987
0.265604
0.336432
0.095618
0.80965
0.606463
0.094732
0.030987
0
0
0
0.032347
0.163259
3,473
83
82
41.843373
0.74501
0
0
0
0
0
0.20169
0
0
0
0
0
0.727273
1
0.109091
false
0
0.036364
0
0.163636
0
0
0
0
null
1
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
0
0
0
0
0
0
0
4
69da23616aa4ddd123da5974448feff50ac1f828
2,132
py
Python
_assignments/intermediate/regex/re_standards_a.py
sages-pl/2022-01-pythonsqlalchemy-aptiv
1d6d856608e9dbe25b139e8968c48b7f46753b84
[ "MIT" ]
null
null
null
_assignments/intermediate/regex/re_standards_a.py
sages-pl/2022-01-pythonsqlalchemy-aptiv
1d6d856608e9dbe25b139e8968c48b7f46753b84
[ "MIT" ]
null
null
null
_assignments/intermediate/regex/re_standards_a.py
sages-pl/2022-01-pythonsqlalchemy-aptiv
1d6d856608e9dbe25b139e8968c48b7f46753b84
[ "MIT" ]
null
null
null
""" * Assignment: RE Standards PESEL * Complexity: medium * Lines of code: 0 lines * Time: 5 min * Warning: Do no write any code - **discussion only** English: TODO: English Translation X. Run doctests - all must succeed Polish: 1. Napisz implementację `is_pesel_valid` a. Temat walidacji Pesel jest zbyt trudny dla Regex b. W tej funkcji użujemy prostego sprawdzenia r'^\d{11}$' c. Już tylko taki kawałek kodu pozwoli na uniknięcie 80% błędów 2. Napisz implementację `is_pesel_woman` a. Pesel należy do kobiety, jeżeli przed ostatnia cyfra jest parzysta a. Nie korzystaj z regex 3. Uruchom doctesty - wszystkie muszą się powieść Discuss: * nie pisz kodu, przeprowadź tylko dyskusję * Co to jest suma kontrolna? * Mając PESEL "69072101234" a. Jakie wyrażenie może być na pierwszym miejscu w PESEL? b. Jakie wyrażenie może być na drugim miejscu w PESEL? c. Jakie wyrażenie może być na trzecim miejscu w PESEL? d. Jakie wyrażenie może być na czwartym miejscu w PESEL? e. Jakie wyrażenie może być na piątym miejscu w PESEL? f. Jakie wyrażenie może być na szóstym miejscu w PESEL? * Mając PESEL "18220812345" a. Jakie wyrażenie może być na pierwszym miejscu w PESEL? b. Jakie wyrażenie może być na drugim miejscu w PESEL? c. Jakie wyrażenie może być na trzecim miejscu w PESEL? d. Jakie wyrażenie może być na czwartym miejscu w PESEL? e. Jakie wyrażenie może być na piątym miejscu w PESEL? f. Jakie wyrażenie może być na szóstym miejscu w PESEL? Tests: >>> import sys; sys.tracebacklimit = 0 >>> is_pesel_valid('69072101234') True >>> is_pesel_valid('18220812345') True >>> is_pesel_woman('69072101234') False >>> is_pesel_woman('18220812345') True """ import re PATTERN = r'^\d{11}$' def is_pesel_valid(pesel: str) -> bool: ... def is_pesel_woman(pesel: str) -> bool: """ Check whether PESEL is woman's. If the second to last number is even, then PESEL is woman's, in other case PESEL is man's. """ ...
30.028169
76
0.674484
308
2,132
4.616883
0.425325
0.118143
0.151899
0.177215
0.372714
0.372714
0.372714
0.372714
0.372714
0.372714
0
0.048903
0.251876
2,132
70
77
30.457143
0.842633
0.918856
0
0.333333
0
0
0.057143
0
0
0
0
0.014286
0
1
0.333333
false
0
0.166667
0
0.5
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
1
0
0
1
0
0
0
0
0
0
0
4
69dd7e2c77c7bfe28caa6cf3f8c0bfaaec8daa37
385
py
Python
python-serv/core/validator/rule.py
plvhx/efishery-backend-test
091a51534bc5259993debea2cb55a4f4548f3d07
[ "BSD-3-Clause" ]
null
null
null
python-serv/core/validator/rule.py
plvhx/efishery-backend-test
091a51534bc5259993debea2cb55a4f4548f3d07
[ "BSD-3-Clause" ]
null
null
null
python-serv/core/validator/rule.py
plvhx/efishery-backend-test
091a51534bc5259993debea2cb55a4f4548f3d07
[ "BSD-3-Clause" ]
null
null
null
from abc import ABC class AbstractRule(ABC): pass class Rule(AbstractRule): def __init__(self, name, data_type, required=True): self.name = name self.type = data_type self.required = required def get_name(self): return self.name def get_type(self): return self.type def is_required(self): return self.required
17.5
55
0.633766
50
385
4.7
0.36
0.102128
0.178723
0
0
0
0
0
0
0
0
0
0.285714
385
21
56
18.333333
0.854545
0
0
0
0
0
0
0
0
0
0
0
0
1
0.285714
false
0.071429
0.071429
0.214286
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
385d55f31e4d10f3124614234c4211c34607e24d
537
py
Python
jsub/manager/error.py
xianghuzhao/jsub
fda16e9a0983410d33e454d9f1c4a94134e49d41
[ "MIT" ]
2
2017-05-26T07:17:34.000Z
2019-04-08T05:53:35.000Z
jsub/manager/error.py
xianghuzhao/jsub
fda16e9a0983410d33e454d9f1c4a94134e49d41
[ "MIT" ]
null
null
null
jsub/manager/error.py
xianghuzhao/jsub
fda16e9a0983410d33e454d9f1c4a94134e49d41
[ "MIT" ]
1
2019-04-08T06:52:46.000Z
2019-04-08T06:52:46.000Z
from jsub.error import JsubError class ExtensionNotFoundError(JsubError): pass class BadConfigError(JsubError): pass class ConfigNotSetupError(JsubError): pass class ExtensionNotSetupError(JsubError): pass class RepoNotSetupError(ExtensionNotSetupError): pass class ContentNotSetupError(ExtensionNotSetupError): pass class ScenarioNotSetupError(ExtensionNotSetupError): pass class JobvarListNotSetupError(ExtensionNotSetupError): pass class BackendNotSetupError(ExtensionNotSetupError): pass
16.78125
54
0.806331
41
537
10.560976
0.390244
0.166282
0.166282
0
0
0
0
0
0
0
0
0
0.141527
537
31
55
17.322581
0.939262
0
0
0.473684
0
0
0
0
0
0
0
0
0
1
0
true
0.473684
0.052632
0
0.526316
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
1
0
0
4
385dfe1c01c96f781d3e88f713c98961b99b4d9e
293
py
Python
GraduationDesign/SSFN_V6_02/Methods/WJ/wj_similarity.py
sivanWu0222/GraduationProject
3f98d078b763dd84a246999879040c34cfbc5efb
[ "MIT" ]
12
2019-04-27T11:17:16.000Z
2022-02-27T14:03:12.000Z
GraduationDesign/SSFN_V6_02/Methods/WJ/wj_similarity.py
sivanWu0222/GraduationProject
3f98d078b763dd84a246999879040c34cfbc5efb
[ "MIT" ]
1
2022-03-21T12:31:29.000Z
2022-03-26T03:01:14.000Z
GraduationDesign/SSFN_V6_02/Methods/WJ/wj_similarity.py
sivanWu0222/GraduationProject
3f98d078b763dd84a246999879040c34cfbc5efb
[ "MIT" ]
null
null
null
def wj_similarity(word2vec, sentence1words, sentence2words): """ 计算句子的WMD距离 :param word2vec: Word2Vec对象 :param sentence1words: 句子1词语列表 :param sentence2words: 句子2词语列表 :return: 两个句子的wj相似度 """ return word2vec.sentence_similarity(sentence1words, sentence2words)
29.3
71
0.730375
24
293
8.833333
0.583333
0.264151
0
0
0
0
0
0
0
0
0
0.050633
0.191126
293
9
72
32.555556
0.843882
0.419795
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
0
0
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
4
387784917102d793d93b964d695956b211aaa4e7
2,440
py
Python
tests/test_trio.py
thedjinn/pyee
94a6d54ccb878748be876e4118292b847bc4a143
[ "MIT" ]
null
null
null
tests/test_trio.py
thedjinn/pyee
94a6d54ccb878748be876e4118292b847bc4a143
[ "MIT" ]
null
null
null
tests/test_trio.py
thedjinn/pyee
94a6d54ccb878748be876e4118292b847bc4a143
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import pytest import pytest_trio.plugin # noqa import trio from pyee import TrioEventEmitter class PyeeTestError(Exception): pass @pytest.mark.trio async def test_trio_emit(): """Test that the trio event emitter can handle wrapping coroutines """ async with TrioEventEmitter() as ee: should_call = trio.Event() @ee.on("event") async def event_handler(): should_call.set() ee.emit("event") result = False with trio.move_on_after(0.1): await should_call.wait() result = True assert result @pytest.mark.trio async def test_trio_once_emit(): """Test that trio event emitters also wrap coroutines when using once """ async with TrioEventEmitter() as ee: should_call = trio.Event() @ee.once("event") async def event_handler(): should_call.set() ee.emit("event") result = False with trio.move_on_after(0.1): await should_call.wait() result = True assert result @pytest.mark.trio async def test_trio_error(): """Test that trio event emitters can handle errors when wrapping coroutines """ async with TrioEventEmitter() as ee: send, rcv = trio.open_memory_channel(1) @ee.on("event") async def event_handler(): raise PyeeTestError() @ee.on("error") async def handle_error(exc): async with send: await send.send(exc) ee.emit("event") result = None with trio.move_on_after(0.1): async with rcv: result = await rcv.__anext__() assert isinstance(result, PyeeTestError) @pytest.mark.trio async def test_sync_error(event_loop): """Test that regular functions have the same error handling as coroutines""" async with TrioEventEmitter() as ee: send, rcv = trio.open_memory_channel(1) @ee.on("event") def sync_handler(): raise PyeeTestError() @ee.on("error") async def handle_error(exc): async with send: await send.send(exc) ee.emit("event") result = None with trio.move_on_after(0.1): async with rcv: result = await rcv.__anext__() assert isinstance(result, PyeeTestError)
21.59292
80
0.588115
293
2,440
4.750853
0.242321
0.051724
0.04023
0.054598
0.783764
0.747845
0.729167
0.678161
0.678161
0.678161
0
0.006599
0.316803
2,440
112
81
21.785714
0.828434
0.010656
0
0.818182
0
0
0.023935
0
0
0
0
0
0.060606
1
0.015152
false
0.015152
0.060606
0
0.090909
0
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
3890794cc8ee794c45ba856f259aba682613ddd2
2,522
py
Python
utils.py
karianjahi/recommender_system
9484a6a779c6ac731046d1519f4dd7c2ae96901e
[ "MIT" ]
null
null
null
utils.py
karianjahi/recommender_system
9484a6a779c6ac731046d1519f4dd7c2ae96901e
[ "MIT" ]
null
null
null
utils.py
karianjahi/recommender_system
9484a6a779c6ac731046d1519f4dd7c2ae96901e
[ "MIT" ]
null
null
null
""" UTILS - Helper functions to use for your recommender funcions, etc - Data: import files/models here e.g. - movies: list of movie titles and assigned cluster - ratings - user_item_matrix - item-item matrix - Models: - nmf_model: trained sklearn NMF model """ import pandas as pd import numpy as np from fuzzywuzzy import process from sklearn.impute import SimpleImputer import pickle movies = pd.read_csv('data/movies_clusters_ratings.csv') ratings = pd.read_csv("data/ratings_clean.csv") user_item_matrix = pd.read_csv("data/my_user_item_matrix.csv", index_col=0) model = pickle.load(open("nmf_model.sav","rb")) def match_movie_title(input_title, movie_titles): """ Matches inputed movie title to existing one in the list with fuzzywuzzy """ matched_title = process.extractOne(input_title, movie_titles)[0] return matched_title def print_movie_titles(movie_titles): """ Prints list of movie titles in cli app """ pass def create_user_vector(user_rating, movies): """ Convert dict of user_ratings to a user_vector """ # generate the user vector print(user_rating) user_vector = None return user_vector def lookup_movieId(movieId): """ Convert output of recommendation to movie title """ assert isinstance(movieId, int) # match movieId to title movie_title = list(movies[movies["movieid"] == movieId]["title"])[0] return movie_title def create_user_item_matrix(): pass def printt(item): print("=======================================") print("") print("") print("") print("") print("") print("") print("") print("") print("") print("") print("") print("") print("") print("") print("") print("") print("") print("") print(item) print("") print("") print("") print("") print("") print("") print("") print("") print("") print("") print("") print("=======================================") if __name__ == "__main__": user_rating = { "four rooms": 5, "sudden death": 3, "othello": 4, "nixon": 3, "Golden eye": 1, "total eclipse": 5, "nadja": 3 } #print(create_user_vector(user_rating, movies)) print("====================") print("") print("") print("") print("") print("") print("") print("") print("") print("") print(user_item_matrix)
20.672131
75
0.57732
291
2,522
4.814433
0.37457
0.28551
0.396146
0.485368
0.204854
0.204854
0.159172
0.159172
0.159172
0.159172
0
0.00526
0.246233
2,522
122
76
20.672131
0.73172
0.227994
0
0.538462
0
0
0.147497
0.085197
0
0
0
0
0.012821
1
0.076923
false
0.025641
0.064103
0
0.179487
0.589744
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
3892c0877416988251b5ed3158a958943ea97c4c
344
py
Python
miapy/miapy/plotting/__init__.py
SCAN-NRAD/BrainRegressorCNN
7917c6a6c4e3728db17ec762c63f8253392e6c04
[ "BSD-3-Clause" ]
1
2022-02-11T18:49:34.000Z
2022-02-11T18:49:34.000Z
miapy/miapy/plotting/__init__.py
SCAN-NRAD/BrainRegressorCNN
7917c6a6c4e3728db17ec762c63f8253392e6c04
[ "BSD-3-Clause" ]
null
null
null
miapy/miapy/plotting/__init__.py
SCAN-NRAD/BrainRegressorCNN
7917c6a6c4e3728db17ec762c63f8253392e6c04
[ "BSD-3-Clause" ]
null
null
null
""" ======================================== Image plotting (:mod:`plotting` package) ======================================== This package facilitates the plotting of images for presentation and documentation purposes. Plotting (:mod:`plotting.plotter`) ---------------------------------- .. automodule:: plotting.plotter :members: """
24.571429
92
0.491279
25
344
6.76
0.68
0.130178
0.224852
0
0
0
0
0
0
0
0
0
0.098837
344
14
93
24.571429
0.545161
0.973837
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
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
38a2303a599c37b9e68ee26bd177ee9a459a29bc
665
py
Python
wagtailschemaorg/templates.py
fredvollmer/wagtail-schema.org
e3f702304b33b040b57e2f18090096c45cc163f8
[ "BSD-2-Clause" ]
null
null
null
wagtailschemaorg/templates.py
fredvollmer/wagtail-schema.org
e3f702304b33b040b57e2f18090096c45cc163f8
[ "BSD-2-Clause" ]
null
null
null
wagtailschemaorg/templates.py
fredvollmer/wagtail-schema.org
e3f702304b33b040b57e2f18090096c45cc163f8
[ "BSD-2-Clause" ]
null
null
null
import json from django.utils.html import conditional_escape from django.utils.safestring import mark_safe from .encoder import JSONLDEncoder from .registry import registry def nl(xs): return mark_safe('\n'.join(map(conditional_escape, xs))) def ld_for_site(site, request=None): return nl(map(ld_print_entity, registry.get_entities(site, request))) def ld_for_object(obj, request=None): return nl(map(ld_print_entity, obj.ld_entity_list(request))) def ld_print_entity(entity): json_out = json.dumps(entity, cls=JSONLDEncoder, sort_keys=True) return mark_safe('<script type="application/ld+json">{}</script>'.format( json_out))
25.576923
77
0.756391
99
665
4.868687
0.434343
0.049793
0.080913
0.078838
0.145228
0.145228
0.145228
0.145228
0
0
0
0
0.12782
665
25
78
26.6
0.831034
0
0
0
0
0
0.07218
0.057143
0
0
0
0
0
1
0.266667
false
0
0.333333
0.2
0.866667
0.2
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
38ba6b8c0d60a8ce7e19aa11744f570ea58f9efd
170
py
Python
backend/coreApi/trips/urls.py
rochdikhalid/kopra-v1
1899e6f695ff8b3041aa7b4e24f99cb6f585085c
[ "MIT" ]
3
2021-12-14T12:31:18.000Z
2021-12-15T08:12:45.000Z
backend/coreApi/trips/urls.py
rochdikhalid/kopra-v1
1899e6f695ff8b3041aa7b4e24f99cb6f585085c
[ "MIT" ]
null
null
null
backend/coreApi/trips/urls.py
rochdikhalid/kopra-v1
1899e6f695ff8b3041aa7b4e24f99cb6f585085c
[ "MIT" ]
1
2022-01-06T14:41:27.000Z
2022-01-06T14:41:27.000Z
from django.urls import path from trips import views urlpatterns = [ path('api/trips/', views.tripApi), path('api/trips/<int:id>/', views.tripApi), ]
17
48
0.635294
22
170
4.909091
0.545455
0.12963
0.222222
0
0
0
0
0
0
0
0
0
0.211765
170
9
49
18.888889
0.80597
0
0
0
0
0
0.180124
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
38be1017e4cfbd80d2ca4337459d6841e9264ef4
158
py
Python
hjz/code_graph/code_tag.py
hantianjz/Code-Graph
1cfe9a8491ff91f0c1b5f7698365db4819848eeb
[ "MIT" ]
null
null
null
hjz/code_graph/code_tag.py
hantianjz/Code-Graph
1cfe9a8491ff91f0c1b5f7698365db4819848eeb
[ "MIT" ]
null
null
null
hjz/code_graph/code_tag.py
hantianjz/Code-Graph
1cfe9a8491ff91f0c1b5f7698365db4819848eeb
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import subprocess def generate_code_tag(): """ """ def main(): generate_graph(nodes, edges) if __name__ == "__main__": main()
9.875
30
0.64557
19
158
4.789474
0.789474
0
0
0
0
0
0
0
0
0
0
0.007752
0.183544
158
15
31
10.533333
0.697674
0.107595
0
0
1
0
0.06015
0
0
0
0
0
0
1
0.333333
true
0
0.166667
0
0.5
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
1
0
0
0
null
0
0
0
0
0
1
1
0
0
0
0
0
0
4
38c1cd62cf086dc7f2571ab29b8751180e7c04e0
93
py
Python
app/apps.py
6Arin9/wulkanowy-web
a97778f4a3716ca2d3c4cf4d4dd83cfa76e1d050
[ "Apache-2.0" ]
16
2020-11-23T19:44:41.000Z
2021-09-29T20:21:07.000Z
app/apps.py
6Arin9/wulkanowy-web
a97778f4a3716ca2d3c4cf4d4dd83cfa76e1d050
[ "Apache-2.0" ]
28
2021-01-12T16:22:57.000Z
2022-02-28T06:04:55.000Z
app/apps.py
6Arin9/wulkanowy-web
a97778f4a3716ca2d3c4cf4d4dd83cfa76e1d050
[ "Apache-2.0" ]
9
2021-02-05T19:48:12.000Z
2021-10-02T18:11:26.000Z
from django.apps import AppConfig class WulkanowyConfig(AppConfig): name = 'Wulkanowy'
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
38e29aa0999cbc8eb9a5ba124edbf32be3dc2661
330
py
Python
tests/test_regex_utils.py
fareszr/app
1f3bc693eccb307234e53653f6fa2cb25ddc0647
[ "MIT" ]
null
null
null
tests/test_regex_utils.py
fareszr/app
1f3bc693eccb307234e53653f6fa2cb25ddc0647
[ "MIT" ]
null
null
null
tests/test_regex_utils.py
fareszr/app
1f3bc693eccb307234e53653f6fa2cb25ddc0647
[ "MIT" ]
null
null
null
from app.regex_utils import regex_match def test_regex_match(flask_client): assert regex_match("prefix.*", "prefix-abcd") # this generates re2 error "Argument 'pattern' has incorrect type (expected bytes, got PythonRePattern)" # fallback to re assert not regex_match("(?!abcd)s(\\.|-)?([a-z0-9]{4,6})", "abcd")
33
108
0.693939
47
330
4.723404
0.765957
0.18018
0
0
0
0
0
0
0
0
0
0.017857
0.151515
330
9
109
36.666667
0.775
0.354545
0
0
1
0
0.261905
0.152381
0
0
0
0
0.5
1
0.25
false
0
0.25
0
0.5
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
1
0
1
0
0
0
0
0
0
0
4
38e9303e1bb9a36263e74f4eef9e66071efad3a8
58
py
Python
tests/loghandler/__init__.py
AISyLab/side-channel-attacks
83c93b1087c9f16423ece7191c3171d07ed1cdce
[ "MIT" ]
14
2020-04-20T16:22:00.000Z
2022-01-26T16:52:35.000Z
tests/loghandler/__init__.py
AISyLab/side-channel-attacks
83c93b1087c9f16423ece7191c3171d07ed1cdce
[ "MIT" ]
1
2021-09-02T13:53:05.000Z
2021-09-02T14:19:01.000Z
tests/loghandler/__init__.py
AISyLab/side-channel-attacks
83c93b1087c9f16423ece7191c3171d07ed1cdce
[ "MIT" ]
6
2020-07-02T16:24:18.000Z
2022-02-07T08:55:20.000Z
# This file is here so Python can always find our modules
29
57
0.775862
11
58
4.090909
1
0
0
0
0
0
0
0
0
0
0
0
0.206897
58
1
58
58
0.978261
0.948276
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
c7f99039f0d47d00a336236fc3d23ee403808fac
11
py
Python
webrepl_cfg.py
hauchel/duco
875cb45bb6339642bcdc2f74e75c1c35aa59fb8b
[ "MIT" ]
5
2021-05-29T17:20:22.000Z
2021-07-10T09:38:43.000Z
webrepl_cfg.py
hauchel/duco
875cb45bb6339642bcdc2f74e75c1c35aa59fb8b
[ "MIT" ]
null
null
null
webrepl_cfg.py
hauchel/duco
875cb45bb6339642bcdc2f74e75c1c35aa59fb8b
[ "MIT" ]
1
2021-12-07T00:53:30.000Z
2021-12-07T00:53:30.000Z
PASS = 'p'
5.5
10
0.454545
2
11
2.5
1
0
0
0
0
0
0
0
0
0
0
0
0.272727
11
1
11
11
0.625
0
0
0
0
0
0.090909
0
0
0
0
0
0
1
0
false
1
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
c7ff6851a8c7cb3d545a1e5eec532dce1060b071
232
py
Python
one_fm/one_fm/doctype/training_evaluation_form/training_evaluation_form_dashboard.py
askmetoo/One-FM
c93ed63695a3e62ee8129bd9adf563116b749030
[ "MIT" ]
16
2021-06-14T23:56:47.000Z
2022-03-22T12:05:06.000Z
one_fm/one_fm/doctype/training_evaluation_form/training_evaluation_form_dashboard.py
askmetoo/One-FM
c93ed63695a3e62ee8129bd9adf563116b749030
[ "MIT" ]
119
2020-08-17T16:27:45.000Z
2022-03-28T12:42:56.000Z
one_fm/one_fm/doctype/training_evaluation_form/training_evaluation_form_dashboard.py
askmetoo/One-FM
c93ed63695a3e62ee8129bd9adf563116b749030
[ "MIT" ]
12
2021-05-16T13:35:40.000Z
2022-02-21T12:41:04.000Z
from __future__ import unicode_literals from frappe import _ def get_data(): return { 'fieldname': 'training_evaluation_form', 'transactions': [ { 'items': ['Training Evaluation Form Response'] }, ] }
17.846154
51
0.646552
22
232
6.409091
0.772727
0.255319
0.312057
0
0
0
0
0
0
0
0
0
0.241379
232
12
52
19.333333
0.801136
0
0
0
0
0
0.377273
0.109091
0
0
0
0
0
1
0.090909
true
0
0.181818
0.090909
0.363636
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
2a261e7faa280fc9f859c3fda281f9cbf7e1c0ed
603
py
Python
hastyherald/agent/hhagent/meta.py
vesche/snippets
7a9d598df99c26c4e0c63669f9f95a94eeed0d08
[ "Unlicense" ]
7
2016-01-03T19:42:07.000Z
2018-10-23T14:03:12.000Z
hastyherald/agent/hhagent/meta.py
vesche/snippets
7a9d598df99c26c4e0c63669f9f95a94eeed0d08
[ "Unlicense" ]
null
null
null
hastyherald/agent/hhagent/meta.py
vesche/snippets
7a9d598df99c26c4e0c63669f9f95a94eeed0d08
[ "Unlicense" ]
1
2018-03-09T08:52:01.000Z
2018-03-09T08:52:01.000Z
"""hhagent.meta""" BANNER = ''' __ __ ____ _____ ______ __ __ __ __ ___ ____ ____ _ ___ | | | / |/ ___/| || | || | | / _]| \ / || | | \\ | | || o ( \_ | || | || | | / [_ | D )| o || | | \\ | _ || |\__ ||_| |_|| ~ || _ || _]| / | || |___ | D | | | || _ |/ \ | | | |___, || | || [_ | \ | _ || || | | | || | |\ | | | | || | || || . \| | || || | |__|__||__|__| \___| |__| |____/ |__|__||_____||__|\_||__|__||_____||_____| ''' VERSION = '0.1.0'
46.384615
78
0.228856
11
603
2.818182
0.727273
0.129032
0
0
0
0
0
0
0
0
0
0.009554
0.47927
603
13
79
46.384615
0.089172
0.019901
0
0
0
0.5
0.945392
0.071672
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
0
0
0
1
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
2a39bd04af16a77e9b458ec933e8d92049153f27
425
py
Python
pgquery/__init__.py
deknowny/pgquery
e8f9093f05fc0825886ba443cd648b5653040088
[ "MIT" ]
2
2021-10-01T21:14:23.000Z
2022-01-29T19:51:55.000Z
pgquery/__init__.py
deknowny/genorm
e8f9093f05fc0825886ba443cd648b5653040088
[ "MIT" ]
null
null
null
pgquery/__init__.py
deknowny/genorm
e8f9093f05fc0825886ba443cd648b5653040088
[ "MIT" ]
null
null
null
__version__ = "0.1.0a0" from pgquery.builder.actor import BuildingActor from pgquery.builder.clauses.column import ( Integer, References, Serial, Text, Varchar, ) from pgquery.builder.clauses.func import Func from pgquery.builder.clauses.literal import Literal from pgquery.builder.clauses.logical import And, Or from pgquery.builder.clauses.table import Table from pgquery.colorizer import colorize_sql
26.5625
51
0.788235
56
425
5.892857
0.464286
0.233333
0.327273
0.378788
0
0
0
0
0
0
0
0.010929
0.138824
425
15
52
28.333333
0.89071
0
0
0
0
0
0.016471
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
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
0
1
0
0
0
0
4
2a3c678ca7b37c361fbb45baee31520af7704235
112
py
Python
modules/2.79/bpy/types/ObjectSolverConstraint.py
cmbasnett/fake-bpy-module
acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55
[ "MIT" ]
null
null
null
modules/2.79/bpy/types/ObjectSolverConstraint.py
cmbasnett/fake-bpy-module
acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55
[ "MIT" ]
null
null
null
modules/2.79/bpy/types/ObjectSolverConstraint.py
cmbasnett/fake-bpy-module
acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55
[ "MIT" ]
null
null
null
class ObjectSolverConstraint: camera = None clip = None object = None use_active_clip = None
12.444444
29
0.660714
12
112
6
0.666667
0.222222
0
0
0
0
0
0
0
0
0
0
0.294643
112
8
30
14
0.911392
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
2a434e550f7c12fd8bd84bdc8c4d4f5b021278c7
327
py
Python
pysteps/verification/__init__.py
leabeusch/pysteps
5f162d4b1155e4cfd894c9635eed3f0e823adedd
[ "BSD-3-Clause" ]
null
null
null
pysteps/verification/__init__.py
leabeusch/pysteps
5f162d4b1155e4cfd894c9635eed3f0e823adedd
[ "BSD-3-Clause" ]
null
null
null
pysteps/verification/__init__.py
leabeusch/pysteps
5f162d4b1155e4cfd894c9635eed3f0e823adedd
[ "BSD-3-Clause" ]
null
null
null
# -- coding: utf-8 -- """Methods for verification of deterministic, probabilistic and ensemble forecasts.""" from .interface import get_method from .detcatscores import * from .detcontscores import * from .ensscores import * from .plots import * from .probscores import * from .spatialscores import * from .salscores import *
27.25
86
0.764526
38
327
6.552632
0.631579
0.240964
0
0
0
0
0
0
0
0
0
0.003571
0.143731
327
11
87
29.727273
0.885714
0.308869
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
2a6d9f61e73d8df3b9a745c4bdd586e3fe0af979
42
py
Python
sheets/python/yaml-dump-without-compact-mode.py
zgmarx/cheatsheet
b29e43a55c5c0fae8763a855025d77a8f46e1208
[ "MIT" ]
1
2020-03-31T11:26:05.000Z
2020-03-31T11:26:05.000Z
sheets/python/yaml-dump-without-compact-mode.py
zgmarx/cheatsheet
b29e43a55c5c0fae8763a855025d77a8f46e1208
[ "MIT" ]
null
null
null
sheets/python/yaml-dump-without-compact-mode.py
zgmarx/cheatsheet
b29e43a55c5c0fae8763a855025d77a8f46e1208
[ "MIT" ]
null
null
null
yaml.dump(..., default_flow_style=False)
14
40
0.738095
6
42
4.833333
1
0
0
0
0
0
0
0
0
0
0
0
0.071429
42
2
41
21
0.74359
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
aa49d0989b7347cde26b17cb422ced47a86146e1
165
py
Python
app/models/phone_type.py
olivierpons/evalr
7c76474ad41769804965a11550501321d7b1889b
[ "MIT" ]
null
null
null
app/models/phone_type.py
olivierpons/evalr
7c76474ad41769804965a11550501321d7b1889b
[ "MIT" ]
null
null
null
app/models/phone_type.py
olivierpons/evalr
7c76474ad41769804965a11550501321d7b1889b
[ "MIT" ]
null
null
null
from django.db import models from app.models.base import BaseModel class PhoneType(BaseModel): name = models.CharField(max_length=200, blank=True, null=True)
20.625
66
0.775758
24
165
5.291667
0.75
0
0
0
0
0
0
0
0
0
0
0.020979
0.133333
165
7
67
23.571429
0.867133
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
aa6b3b1f1f6bc588f92d463ed7d5c0cfdeb40a79
233
py
Python
CodeWars/8 Kyu/Generate user links.py
anubhab-code/Competitive-Programming
de28cb7d44044b9e7d8bdb475da61e37c018ac35
[ "MIT" ]
null
null
null
CodeWars/8 Kyu/Generate user links.py
anubhab-code/Competitive-Programming
de28cb7d44044b9e7d8bdb475da61e37c018ac35
[ "MIT" ]
null
null
null
CodeWars/8 Kyu/Generate user links.py
anubhab-code/Competitive-Programming
de28cb7d44044b9e7d8bdb475da61e37c018ac35
[ "MIT" ]
null
null
null
def generate_link(user): user = ''.join(('%'+hex(ord(let)).upper()[-2:] if not (let.isalpha() or let.isdigit() or let == '_' or let == '.' or let == '/') else let) for let in user) return 'http://www.codewars.com/users/'+user
77.666667
159
0.592275
37
233
3.675676
0.648649
0.147059
0.102941
0.147059
0
0
0
0
0
0
0
0.005102
0.158798
233
3
160
77.666667
0.688776
0
0
0
1
0
0.145299
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
aa85f29a4571ab733191e121620646482bf09e3a
96
py
Python
paintera_tools/curate/__init__.py
wolny/paintera_tools
e55b08b5154991873eaea7bf43448ce9da4ad6e7
[ "MIT" ]
1
2019-06-23T21:32:15.000Z
2019-06-23T21:32:15.000Z
paintera_tools/curate/__init__.py
wolny/paintera_tools
e55b08b5154991873eaea7bf43448ce9da4ad6e7
[ "MIT" ]
null
null
null
paintera_tools/curate/__init__.py
wolny/paintera_tools
e55b08b5154991873eaea7bf43448ce9da4ad6e7
[ "MIT" ]
1
2019-08-08T11:36:47.000Z
2019-08-08T11:36:47.000Z
from .splitter import interactive_splitter, batch_splitter from .postprocess import postprocess
32
58
0.875
11
96
7.454545
0.545455
0
0
0
0
0
0
0
0
0
0
0
0.09375
96
2
59
48
0.942529
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
aa912151eb510ad9b366a0dc69e79ca67410b687
92
py
Python
datary/requests/__init__.py
Datary/python-sdk
2790a50e1ad262cbe3210665dc34f497625e923d
[ "MIT" ]
null
null
null
datary/requests/__init__.py
Datary/python-sdk
2790a50e1ad262cbe3210665dc34f497625e923d
[ "MIT" ]
null
null
null
datary/requests/__init__.py
Datary/python-sdk
2790a50e1ad262cbe3210665dc34f497625e923d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Datary Requests Module """ from .requests import DataryRequests
15.333333
36
0.673913
10
92
6.2
0.9
0
0
0
0
0
0
0
0
0
0
0.012821
0.152174
92
5
37
18.4
0.782051
0.48913
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
2ab5d83e96ecc91c1450a7c3270cb6d6153ce97c
91
py
Python
hapic/ext/pyramid/__init__.py
raphj/hapic
b169ee901005bbe535e27ec878a051c2c1226e43
[ "MIT" ]
20
2017-10-13T11:23:33.000Z
2021-12-09T12:42:06.000Z
hapic/ext/pyramid/__init__.py
raphj/hapic
b169ee901005bbe535e27ec878a051c2c1226e43
[ "MIT" ]
130
2017-10-10T15:09:13.000Z
2021-12-30T10:36:08.000Z
hapic/ext/pyramid/__init__.py
raphj/hapic
b169ee901005bbe535e27ec878a051c2c1226e43
[ "MIT" ]
7
2017-10-17T07:24:42.000Z
2021-09-16T14:33:17.000Z
# -*- coding: utf-8 -*- from hapic.ext.pyramid.context import PyramidContext # noqa: F401
30.333333
66
0.703297
12
91
5.333333
1
0
0
0
0
0
0
0
0
0
0
0.051282
0.142857
91
2
67
45.5
0.769231
0.351648
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
2af97c5cd11784e18d857f8842a259dc728a3fb1
162
py
Python
web/servicecalls/siteservice_gets.py
vacoj/mbodjango
e9a6df563862c587e4cc2c2713ed7f8ea0a6e4e3
[ "MIT" ]
8
2015-10-27T12:38:54.000Z
2018-02-23T03:03:24.000Z
web/servicecalls/siteservice_gets.py
vacoj/mbodjango
e9a6df563862c587e4cc2c2713ed7f8ea0a6e4e3
[ "MIT" ]
3
2015-10-28T22:23:58.000Z
2016-01-13T04:05:04.000Z
web/servicecalls/siteservice_gets.py
vacoj/mbodjango
e9a6df563862c587e4cc2c2713ed7f8ea0a6e4e3
[ "MIT" ]
9
2015-09-28T17:32:17.000Z
2018-02-01T00:01:04.000Z
from helpers.mbosoap.SiteService import SiteServiceCalls def GetSessionTypes(): sessiontypes = SiteServiceCalls().GetSessionTypes() return sessiontypes
23.142857
56
0.802469
13
162
10
0.769231
0
0
0
0
0
0
0
0
0
0
0
0.12963
162
6
57
27
0.921986
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.25
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
2d6f1376c326e99de84c8d2757528c2becc04be7
850
py
Python
sourced/ml/core/extractors/__init__.py
r0mainK/ml-core
ac17828d58e817e771caf2b2c3de523d527874b8
[ "Apache-2.0" ]
13
2019-05-30T21:19:06.000Z
2021-12-22T18:27:55.000Z
sourced/ml/core/extractors/__init__.py
r0mainK/ml-core
ac17828d58e817e771caf2b2c3de523d527874b8
[ "Apache-2.0" ]
23
2019-04-16T11:45:06.000Z
2020-04-08T14:47:08.000Z
sourced/ml/core/extractors/__init__.py
r0mainK/ml-core
ac17828d58e817e771caf2b2c3de523d527874b8
[ "Apache-2.0" ]
16
2019-04-11T14:08:31.000Z
2021-02-03T19:57:14.000Z
# flake8: noqa from sourced.ml.core.extractors.helpers import __extractors__, get_names_from_kwargs, \ register_extractor, filter_kwargs, create_extractors_from_args from sourced.ml.core.extractors.bags_extractor import Extractor, BagsExtractor, RoleIdsExtractor from sourced.ml.core.extractors.identifiers import IdentifiersBagExtractor from sourced.ml.core.extractors.literals import LiteralsBagExtractor from sourced.ml.core.extractors.uast_random_walk import UastRandomWalkBagExtractor from sourced.ml.core.extractors.uast_seq import UastSeqBagExtractor from sourced.ml.core.extractors.children import ChildrenBagExtractor from sourced.ml.core.extractors.graphlets import GraphletBagExtractor from sourced.ml.core.extractors.identifier_distance import IdentifierDistance from sourced.ml.core.extractors.id_sequence import IdSequenceExtractor
65.384615
96
0.878824
102
850
7.147059
0.392157
0.150892
0.178326
0.233196
0.381344
0.085048
0
0
0
0
0
0.001256
0.063529
850
12
97
70.833333
0.914573
0.014118
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.909091
0
0.909091
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
1
0
1
0
1
0
0
4
2d77106bf97e6427fb58a99bd1f1430d0b47cccc
3,965
py
Python
test.py
MohammadForouhesh/Computational-Political-Science-Papers-Implementations
403bc6123b4e6f4c30667aa135a5d5a588638209
[ "MIT" ]
1
2022-02-19T09:52:47.000Z
2022-02-19T09:52:47.000Z
test.py
Faethe79/tracking-policy-agendas
1bdc735f37d2d3bdce572fd719f1c7d307db008e
[ "MIT" ]
5
2022-03-12T13:50:30.000Z
2022-03-14T10:34:11.000Z
test.py
Faethe79/tracking-policy-agendas
1bdc735f37d2d3bdce572fd719f1c7d307db008e
[ "MIT" ]
1
2022-02-27T10:00:09.000Z
2022-02-27T10:00:09.000Z
""" UnitTest Module .................................................................................................... MIT License Copyright (c) 2021-2023 AUT Iran, Mohammad H Forouhesh Copyright (c) 2021-2022 MetoData.ai, Mohammad H Forouhesh .................................................................................................... This module serves as unit testing for various functionalities in the code. """ import unittest from tracking_policy_agendas.api import downloader from tracking_policy_agendas.classifiers.pa_clf import PAClf from tracking_policy_agendas.classifiers.xgb_clf import XgbClf from tracking_policy_agendas.classifiers.naive_bayes_clf import GNBClf from tracking_policy_agendas.classifiers.lasso_clf import LassoClf class XgbTestCase(unittest.TestCase): def setUp(self) -> None: self.clf = XgbClf(text_array=None, labels=None, load_path='xgb_vaccine') def test_xgb_api(self) -> None: self.assertRaises(Exception, downloader, path='wrong-path') def test_xgb_soundness(self) -> None: self.assertEqual(self.clf['تزریق دوز سوم واکسن هم تصویب شد'], self.clf['کرونا با ماسک و واکسن هم از بین نمیرود']) self.assertNotEqual(self.clf['واکسیناسیون عمومی کزاز در ریشه کنی این بیماری بسیار مثمر ثمر بوده است'], self.clf['تزریق دوز سوم واکسن کرونا هم تصویب شد']) def test_xgb_completeness(self) -> None: self.assertEqual(self.clf.predict('دوز سوم واکسن کرونا'), 1) self.assertEqual(self.clf['رئيس‌جمهور جمهوری اسلامی'], 0) self.assertEqual(self.clf['بورس نماد اقتصاد بحران زده‌ی ایران'], 0) class PATestCase(unittest.TestCase): def setUp(self) -> None: self.clf = PAClf(text_array=None, labels=None, load_path='pa_vaccine') def test_pa_api(self) -> None: self.assertRaises(Exception, downloader, path='wrong-path') def test_pa_soundness(self) -> None: self.assertEqual(self.clf['تزریق دوز سوم واکسن هم تصویب شد'], self.clf['کرونا با ماسک و واکسن هم از بین نمیرود']) self.assertNotEqual(self.clf['واکسیناسیون عمومی کزاز در ریشه کنی این بیماری بسیار مثمر ثمر بوده است'], self.clf['تزریق دوز سوم واکسن کرونا هم تصویب شد']) def test_pa_completeness(self) -> None: self.assertEqual(self.clf.predict('دوز سوم واکسن کرونا'), 1) self.assertEqual(self.clf['بورس نماد اقتصاد بحران زده‌ی ایران'], 0) class LassoTestCase(unittest.TestCase): def setUp(self) -> None: self.clf = LassoClf(text_array=None, labels=None, load_path='lasso_vaccine') def test_lasso_api(self) -> None: self.assertRaises(Exception, downloader, path='wrong-path') def test_lasso_soundness(self) -> None: self.assertEqual(self.clf['تزریق دوز سوم واکسن هم تصویب شد'], self.clf['کرونا با ماسک و واکسن هم از بین نمیرود']) self.assertNotEqual(self.clf['واکسیناسیون عمومی کزاز در ریشه کنی این بیماری بسیار مثمر ثمر بوده است'], self.clf['تزریق دوز سوم واکسن کرونا هم تصویب شد']) def test_lasso_completeness(self) -> None: self.assertEqual(self.clf.predict('دوز سوم واکسن کرونا'), 1) class GNBTestCase(unittest.TestCase): def setUp(self) -> None: self.clf = GNBClf(text_array=None, labels=None, load_path='gnb_vaccine') def test_gnb_api(self) -> None: self.assertRaises(Exception, downloader, path='wrong-path') def test_gnb_soundness(self) -> None: self.assertEqual(self.clf['تزریق دوز سوم واکسن کرونا هم تصویب شد'], self.clf['کرونا با ماسک و واکسن هم از بین نمیرود']) def test_gnb_completeness(self) -> None: self.assertEqual(self.clf.predict('دوز سوم واکسن کرونا'), 1) self.assertEqual(self.clf['رئيس‌جمهور جمهوری اسلامی'], 0) self.assertEqual(self.clf['بورس نماد اقتصاد بحران زده‌ی ایران'], 0) if __name__ == '__main__': unittest.main()
42.634409
121
0.650946
534
3,965
4.73221
0.215356
0.074792
0.075979
0.113178
0.789474
0.732489
0.732489
0.683419
0.621686
0.621686
0
0.007867
0.198487
3,965
92
122
43.097826
0.785714
0.105675
0
0.482759
0
0
0.259751
0
0
0
0
0
0.344828
1
0.275862
false
0
0.103448
0
0.448276
0
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
4
2da751bbaeb1ca599f3c49fa84fbf41ce22a3752
221
py
Python
python_actr/__init__.py
osaaso1/python_actr
f7cb03bcf78310f1a6b68e72d2cef28bd8f83aab
[ "MIT" ]
3
2021-12-11T02:51:51.000Z
2022-01-23T02:33:18.000Z
python_actr/__init__.py
osaaso1/python_actr
f7cb03bcf78310f1a6b68e72d2cef28bd8f83aab
[ "MIT" ]
8
2022-01-17T22:51:27.000Z
2022-03-15T00:44:20.000Z
python_actr/__init__.py
osaaso1/python_actr
f7cb03bcf78310f1a6b68e72d2cef28bd8f83aab
[ "MIT" ]
8
2021-12-06T20:16:35.000Z
2022-03-14T07:21:56.000Z
from .model import Model, log_everything from .production import ProductionSystem from .logger import log, finished from .runner import run, run_with from .display import display from .actr import * from . import version
27.625
40
0.809955
31
221
5.709677
0.483871
0
0
0
0
0
0
0
0
0
0
0
0.140271
221
7
41
31.571429
0.931579
0
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
2da7ea1b35a9a5296e4f8e5e39ea1215a9abc18e
88
py
Python
pg_copy/apps.py
amalek215/django-pg-copy
cf910714dcf6a4fcb820074ebbd4b0f09425e388
[ "BSD-3-Clause" ]
16
2019-03-07T18:22:21.000Z
2022-02-18T11:15:05.000Z
pg_copy/apps.py
amalek215/django-pg-copy
cf910714dcf6a4fcb820074ebbd4b0f09425e388
[ "BSD-3-Clause" ]
2
2018-04-17T22:58:23.000Z
2020-06-26T12:01:14.000Z
pg_copy/apps.py
amalek215/django-pg-copy
cf910714dcf6a4fcb820074ebbd4b0f09425e388
[ "BSD-3-Clause" ]
6
2018-04-17T21:38:12.000Z
2022-01-23T21:30:57.000Z
from django.apps import AppConfig class PgCopyConfig(AppConfig): name = "pg_copy"
14.666667
33
0.75
11
88
5.909091
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.170455
88
5
34
17.6
0.890411
0
0
0
0
0
0.079545
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
2dadd07d8916afa7e7e337da1b04cd245311ecf1
67
py
Python
tests/source/input/import_wordtok_alias.py
tomaarsen/module_dependencies
4b452bf9dcea28df4ed2e632f33eda627b2363f5
[ "MIT" ]
1
2022-01-22T17:11:20.000Z
2022-01-22T17:11:20.000Z
tests/source/input/import_wordtok_alias.py
tomaarsen/module_dependencies
4b452bf9dcea28df4ed2e632f33eda627b2363f5
[ "MIT" ]
null
null
null
tests/source/input/import_wordtok_alias.py
tomaarsen/module_dependencies
4b452bf9dcea28df4ed2e632f33eda627b2363f5
[ "MIT" ]
null
null
null
from nltk import word_tokenize as word_tknr tokenizer = word_tknr
16.75
43
0.835821
11
67
4.818182
0.727273
0.301887
0
0
0
0
0
0
0
0
0
0
0.149254
67
3
44
22.333333
0.929825
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
2dc0518d3dff01ff0e6c49a1570148ab33823cca
63
py
Python
metaclass/Item.py
majianfei/practice
345f63c2f4118617f0165700e079cb70a32eb4f8
[ "MIT" ]
1
2019-08-13T15:14:12.000Z
2019-08-13T15:14:12.000Z
metaclass/Item.py
majianfei/practice
345f63c2f4118617f0165700e079cb70a32eb4f8
[ "MIT" ]
null
null
null
metaclass/Item.py
majianfei/practice
345f63c2f4118617f0165700e079cb70a32eb4f8
[ "MIT" ]
null
null
null
class Item(): def func3(self): print("func3")
12.6
22
0.492063
7
63
4.428571
0.857143
0
0
0
0
0
0
0
0
0
0
0.04878
0.349206
63
5
22
12.6
0.707317
0
0
0
0
0
0.084746
0
0
0
0
0
0
1
0.333333
false
0
0
0
0.666667
0.333333
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
2dc9c4e05cc218ee7203cc131f414cb8013e506c
2,614
py
Python
tests/unit/domain/test_event_publishing.py
ets-labs/newsfeed
9f59f94e1cd5f24d4b4121929050fc8b304173af
[ "BSD-3-Clause" ]
10
2019-11-07T15:04:02.000Z
2022-02-19T11:47:40.000Z
tests/unit/domain/test_event_publishing.py
ets-labs/newsfeed
9f59f94e1cd5f24d4b4121929050fc8b304173af
[ "BSD-3-Clause" ]
27
2019-10-31T16:31:27.000Z
2020-01-14T15:21:29.000Z
tests/unit/domain/test_event_publishing.py
ets-labs/newsfeed
9f59f94e1cd5f24d4b4121929050fc8b304173af
[ "BSD-3-Clause" ]
10
2019-11-07T15:08:43.000Z
2021-12-03T22:31:49.000Z
"""Event publishing tests.""" async def test_event_publishing(container): """Check event publishing.""" newsfeed_id = '123' event_dispatcher_service = container.event_dispatcher_service() event_processor_service = container.event_processor_service() await _process_event( event_dispatcher_service, event_processor_service, newsfeed_id=newsfeed_id, data={ 'event_data': 'some_data_1', }, ) await _process_event( event_dispatcher_service, event_processor_service, newsfeed_id=newsfeed_id, data={ 'event_data': 'some_data_2', }, ) event_repository = container.event_repository() events = await event_repository.get_by_newsfeed_id(newsfeed_id) assert events[0].data == { 'event_data': 'some_data_2', } assert events[1].data == { 'event_data': 'some_data_1', } async def test_event_publishing_to_subscriber(container): """Check event publishing.""" newsfeed_id = '123' subscriber_newsfeed_id = '124' subscription_service = container.subscription_service() await subscription_service.create_subscription( newsfeed_id=subscriber_newsfeed_id, to_newsfeed_id=newsfeed_id, ) event_dispatcher_service = container.event_dispatcher_service() event_processor_service = container.event_processor_service() await _process_event( event_dispatcher_service, event_processor_service, newsfeed_id=newsfeed_id, data={ 'event_data': 'some_data_1', }, ) await _process_event( event_dispatcher_service, event_processor_service, newsfeed_id=newsfeed_id, data={ 'event_data': 'some_data_2', }, ) event_repository = container.event_repository() events = await event_repository.get_by_newsfeed_id(newsfeed_id) assert events[0].data == { 'event_data': 'some_data_2', } assert events[1].data == { 'event_data': 'some_data_1', } subscriber_events = await event_repository.get_by_newsfeed_id(subscriber_newsfeed_id) assert subscriber_events[0].data == { 'event_data': 'some_data_2', } assert subscriber_events[1].data == { 'event_data': 'some_data_1', } async def _process_event(event_dispatcher_service, event_processor_service, newsfeed_id, data): await event_dispatcher_service.dispatch_new_event( newsfeed_id=newsfeed_id, data=data, ) await event_processor_service.process_event()
28.107527
95
0.671002
287
2,614
5.634146
0.114983
0.148423
0.136054
0.105133
0.820037
0.745826
0.745826
0.693878
0.668522
0.646877
0
0.012531
0.236802
2,614
92
96
28.413043
0.797995
0.008799
0
0.6
0
0
0.086664
0
0
0
0
0
0.08
1
0
false
0
0
0
0
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
9307bf35dd2fd7ee77bca328781097b1712f3450
23
py
Python
cantools/version.py
sfpetersen/cantools
e6437431914183161c585889097f067f578843d4
[ "MIT" ]
null
null
null
cantools/version.py
sfpetersen/cantools
e6437431914183161c585889097f067f578843d4
[ "MIT" ]
null
null
null
cantools/version.py
sfpetersen/cantools
e6437431914183161c585889097f067f578843d4
[ "MIT" ]
null
null
null
__version__ = '35.4.0'
11.5
22
0.652174
4
23
2.75
1
0
0
0
0
0
0
0
0
0
0
0.2
0.130435
23
1
23
23
0.35
0
0
0
0
0
0.26087
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
930d5b47414d786e77b827dd3107e4cabd5aba96
207
py
Python
weborquesta/music/views.py
miguel-rojorev/weborquesta
d0c98e1acea1346d521deb2ec15ae76d9c855546
[ "MIT" ]
null
null
null
weborquesta/music/views.py
miguel-rojorev/weborquesta
d0c98e1acea1346d521deb2ec15ae76d9c855546
[ "MIT" ]
null
null
null
weborquesta/music/views.py
miguel-rojorev/weborquesta
d0c98e1acea1346d521deb2ec15ae76d9c855546
[ "MIT" ]
null
null
null
from django.shortcuts import render from .models import Music # Create your views here. def music(request): audios = Music.objects.all() return render(request, "music/music.html", {'audios':audios})
29.571429
65
0.7343
28
207
5.428571
0.642857
0
0
0
0
0
0
0
0
0
0
0
0.144928
207
7
65
29.571429
0.858757
0.111111
0
0
0
0
0.120219
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
9362b63dc77c88ff9a66bbb49db7f78d13980c7d
199
py
Python
todo_api/serializers.py
Saknowman/django_setting_sample_project
3f11103a57628190ed4ab480cba39d4474847040
[ "MIT" ]
null
null
null
todo_api/serializers.py
Saknowman/django_setting_sample_project
3f11103a57628190ed4ab480cba39d4474847040
[ "MIT" ]
7
2020-06-06T00:28:14.000Z
2022-02-10T11:03:44.000Z
todo_api/serializers.py
Saknowman/django_setting_sample_project
3f11103a57628190ed4ab480cba39d4474847040
[ "MIT" ]
null
null
null
from rest_framework import serializers from .models import Task class TaskSerializer(serializers.ModelSerializer): class Meta: model = Task fields = ['title', 'status']
22.111111
51
0.678392
20
199
6.7
0.75
0
0
0
0
0
0
0
0
0
0
0
0.246231
199
9
52
22.111111
0.893333
0
0
0
0
0
0.057292
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
fac0cfd49abb091ebc16d9f6ab886e7b920930b4
191
py
Python
third_party/phkit/phkit/chinese/pinyin.py
zh794390558/DeepSpeech
34178893327ad359cb816e55d7c66a10244fa08a
[ "Apache-2.0" ]
null
null
null
third_party/phkit/phkit/chinese/pinyin.py
zh794390558/DeepSpeech
34178893327ad359cb816e55d7c66a10244fa08a
[ "Apache-2.0" ]
null
null
null
third_party/phkit/phkit/chinese/pinyin.py
zh794390558/DeepSpeech
34178893327ad359cb816e55d7c66a10244fa08a
[ "Apache-2.0" ]
null
null
null
#!usr/bin/env python # -*- coding: utf-8 -*- # author: kuangdd # date: 2020/2/17 """ #### pinyin 转为拼音的方法,汉字转拼音,分离声调。 拼音为字母+数字形式,例如pin1。 """ from ..pinyinkit import text2pinyin, split_pinyin
15.916667
49
0.670157
26
191
4.884615
0.961538
0
0
0
0
0
0
0
0
0
0
0.060241
0.13089
191
11
50
17.363636
0.704819
0.65445
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
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
faca5ef88bb7ecfa9f9dbf44a164934f02e900b4
93
py
Python
opencolorio_config_aces/config/studio/generate/__init__.py
michdolan/OpenColorIO-Config-ACES
5216c2a184e03529557993b7dc670d351aadddc7
[ "BSD-3-Clause" ]
52
2020-05-19T05:05:11.000Z
2022-03-29T20:20:42.000Z
opencolorio_config_aces/config/studio/generate/__init__.py
michdolan/OpenColorIO-Config-ACES
5216c2a184e03529557993b7dc670d351aadddc7
[ "BSD-3-Clause" ]
41
2020-05-17T03:18:24.000Z
2022-03-31T12:02:35.000Z
opencolorio_config_aces/config/studio/generate/__init__.py
michdolan/OpenColorIO-Config-ACES
5216c2a184e03529557993b7dc670d351aadddc7
[ "BSD-3-Clause" ]
12
2020-05-18T18:21:57.000Z
2022-03-29T20:00:55.000Z
# SPDX-License-Identifier: BSD-3-Clause # Copyright Contributors to the OpenColorIO Project.
31
52
0.806452
12
93
6.25
1
0
0
0
0
0
0
0
0
0
0
0.012048
0.107527
93
2
53
46.5
0.891566
0.946237
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
faf1d9d0d06a202750017725065478e26d66dc7d
4,602
py
Python
antlir/tests/test_unionfind.py
SaurabhAgarwala/antlir
d9513d35d3eaa9d28717a40057a14d099c6ec775
[ "MIT" ]
28
2020-08-11T16:22:46.000Z
2022-03-04T15:41:52.000Z
antlir/tests/test_unionfind.py
SaurabhAgarwala/antlir
d9513d35d3eaa9d28717a40057a14d099c6ec775
[ "MIT" ]
137
2020-08-11T16:07:49.000Z
2022-02-27T10:59:05.000Z
antlir/tests/test_unionfind.py
SaurabhAgarwala/antlir
d9513d35d3eaa9d28717a40057a14d099c6ec775
[ "MIT" ]
10
2020-09-10T00:01:28.000Z
2022-03-08T18:00:28.000Z
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import unittest from ..unionfind import UnionFind class TestUnionFind(unittest.TestCase): def setUp(self): self.union_find = UnionFind() def test_find(self): """Tests implementation details and find with path compression""" self.union_find.add(1) self.assertEqual(self.union_find._parent(1), 1) self.union_find.union(2, 1) self.assertEqual(self.union_find._parent(1), 1) self.assertEqual(self.union_find._parent(2), 1) self.assertEqual(self.union_find.find(3), 3) self.union_find.union(3, 2) self.assertEqual(self.union_find._parent(3), 1) def test_flatten(self): """Tests implementation of flatten(), which should do find on all keys""" self.union_find.add(1) self.union_find.union(3, 2) self.union_find.union(7, 5) self.union_find.union(2, 1) self.union_find.union(4, 2) self.union_find.union(5, 2) self.union_find.union(6, 5) self.union_find.add(14) self.union_find.union(14, 12) self.union_find.union(15, 13) self.union_find.union(16, 11) self.union_find.union(15, 14) self.union_find.union(16, 17) self.union_find.union(13, 11) self.assertEqual(self.union_find._representative_dict[1], 1) self.assertEqual(self.union_find._representative_dict[2], 1) self.assertEqual(self.union_find._representative_dict[3], 2) self.assertEqual(self.union_find._representative_dict[4], 1) self.assertEqual(self.union_find._representative_dict[5], 1) self.assertEqual(self.union_find._representative_dict[6], 1) self.assertEqual(self.union_find._representative_dict[7], 5) self.assertEqual(self.union_find._representative_dict[11], 17) self.assertEqual(self.union_find._representative_dict[12], 17) self.assertEqual(self.union_find._representative_dict[13], 12) self.assertEqual(self.union_find._representative_dict[14], 12) self.assertEqual(self.union_find._representative_dict[15], 13) self.assertEqual(self.union_find._representative_dict[16], 11) self.assertEqual(self.union_find._representative_dict[17], 17) self.union_find.flatten() self.assertEqual(self.union_find._representative_dict[1], 1) self.assertEqual(self.union_find._representative_dict[2], 1) self.assertEqual(self.union_find._representative_dict[3], 1) self.assertEqual(self.union_find._representative_dict[4], 1) self.assertEqual(self.union_find._representative_dict[5], 1) self.assertEqual(self.union_find._representative_dict[6], 1) self.assertEqual(self.union_find._representative_dict[7], 1) self.assertEqual(self.union_find._representative_dict[11], 17) self.assertEqual(self.union_find._representative_dict[12], 17) self.assertEqual(self.union_find._representative_dict[13], 17) self.assertEqual(self.union_find._representative_dict[14], 17) self.assertEqual(self.union_find._representative_dict[15], 17) self.assertEqual(self.union_find._representative_dict[16], 17) self.assertEqual(self.union_find._representative_dict[17], 17) def test_enumerate(self): union_find = UnionFind() union_find.add(1) union_find.union(2, 1) union_find.union(3, 2) count = 0 for _ in union_find: count += 1 self.assertEqual(count, 3) keys = list(union_find) self.assertEqual(keys[0], 1) def test_iteritems(self): union_find = UnionFind() union_find.add(1) union_find.union(2, 1) union_find.union(3, 2) count = 0 for key, val in union_find.items(): count += 1 self.assertEqual(union_find.find(key), val) self.assertEqual(count, 3) def test_persistence(self): """Makes sure that once two nodes are joined, they do not split""" union_find = UnionFind() union_find.add(1) union_find.union(1, 2) self.assertEqual(union_find.find(1), 2) self.assertEqual(union_find.find(2), 2) union_find.add(1) union_find.add(2) self.assertEqual(union_find.find(1), 2) self.assertEqual(union_find.find(2), 2) if __name__ == "__main__": unittest.main()
37.414634
81
0.671013
626
4,602
4.698083
0.153355
0.223393
0.238694
0.269296
0.748385
0.681741
0.661
0.602176
0.49813
0.464128
0
0.046974
0.213603
4,602
122
82
37.721311
0.765681
0.082356
0
0.494505
0
0
0.001903
0
0
0
0
0
0.450549
1
0.065934
false
0
0.021978
0
0.098901
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
4
87b209f3a6ca98164e4289ed16e73f9f7fcb2798
273
py
Python
classes/Internal_Rate_Return.py
Fixed-Income-OS/fixedincome-py
9dc1ef0faf2d26cfacc9d79eed0e2f12cdb5b1fa
[ "Apache-2.0" ]
4
2019-11-25T04:22:59.000Z
2021-05-18T04:57:16.000Z
classes/Internal_Rate_Return.py
Fixed-Income-OS/fixedincome-py
9dc1ef0faf2d26cfacc9d79eed0e2f12cdb5b1fa
[ "Apache-2.0" ]
5
2019-11-15T00:29:52.000Z
2021-06-02T00:37:37.000Z
classes/Internal_Rate_Return.py
Fixed-Income-OS/fixedincome-py
9dc1ef0faf2d26cfacc9d79eed0e2f12cdb5b1fa
[ "Apache-2.0" ]
4
2020-03-03T20:06:48.000Z
2022-02-19T02:01:56.000Z
import numpy as np class InternalRateReturn: def __init__(self, price, cash_flow): self.price = price self.cash_flow = cash_flow def calculate(self): self.cash_flow.insert(0, self.price) return round(np.irr(self.cash_flow) * 100)
22.75
50
0.659341
38
273
4.5
0.5
0.233918
0.210526
0
0
0
0
0
0
0
0
0.019417
0.245421
273
11
51
24.818182
0.81068
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.125
0
0.625
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
87cb51f6547fdf60661f8e9bb827a71aef585c0c
290
py
Python
src/models/composed_lstm.py
clin366/airpollutionnowcast
f9152583eebc4ad747c8d0510460334a5fb23ff9
[ "MIT" ]
null
null
null
src/models/composed_lstm.py
clin366/airpollutionnowcast
f9152583eebc4ad747c8d0510460334a5fb23ff9
[ "MIT" ]
9
2020-03-24T18:12:45.000Z
2022-02-10T00:36:57.000Z
src/models/composed_lstm.py
clin366/airpollutionnowcast
f9152583eebc4ad747c8d0510460334a5fb23ff9
[ "MIT" ]
null
null
null
''' Author: Chen Lin Email: chen.lin@emory.edu Date created: 2019/9/21 Python Version: 3.6 ''' import sys sys.path.append('.') from src.models.composed_model import ComposedModel from src.models.lstm import LSTMModel class ComposedLSTM(ComposedModel, LSTMModel): pass
19.333333
51
0.72069
40
290
5.2
0.75
0.067308
0.125
0
0
0
0
0
0
0
0
0.0375
0.172414
290
14
52
20.714286
0.829167
0.296552
0
0
0
0
0.005556
0
0
0
0
0
0
1
0
true
0.166667
0.5
0
0.666667
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
1
0
1
0
0
4
e21109bbcd13b1d8abce2d567e66e0bbf467be0d
115
py
Python
b8/paths.py
aliafshar/b8
81cdb5c687299e7ecd7b0c8f75e54a19b392d0f2
[ "Unlicense" ]
4
2020-11-01T22:55:14.000Z
2022-03-30T16:48:21.000Z
b8/paths.py
aliafshar/b8
81cdb5c687299e7ecd7b0c8f75e54a19b392d0f2
[ "Unlicense" ]
1
2020-11-01T22:49:32.000Z
2020-11-01T23:02:36.000Z
b8/paths.py
aliafshar/b8
81cdb5c687299e7ecd7b0c8f75e54a19b392d0f2
[ "Unlicense" ]
null
null
null
# (c) 2005-2020 Ali Afshar <aafshar@gmail.com>. # MIT License. See LICENSE. # vim: ft=python sw=2 ts=2 sts=2 tw=80
28.75
47
0.678261
23
115
3.391304
0.869565
0
0
0
0
0
0
0
0
0
0
0.134021
0.156522
115
3
48
38.333333
0.670103
0.93913
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
35534aa031751fe671ef7f7a6c91d73c584d08db
4,782
py
Python
core/admin/migrations/versions/546b04c886f0_.py
mboogert/Mailu
ebf6d84aabebe854824546df3ea64566107ed004
[ "MIT" ]
3,620
2016-10-30T14:13:46.000Z
2022-03-31T18:40:15.000Z
core/admin/migrations/versions/546b04c886f0_.py
mboogert/Mailu
ebf6d84aabebe854824546df3ea64566107ed004
[ "MIT" ]
2,113
2016-10-27T10:36:52.000Z
2022-03-31T16:38:26.000Z
core/admin/migrations/versions/546b04c886f0_.py
mboogert/Mailu
ebf6d84aabebe854824546df3ea64566107ed004
[ "MIT" ]
815
2016-10-29T12:02:00.000Z
2022-03-31T08:44:28.000Z
""" Fix constraint naming by addint a name to all constraints Revision ID: 546b04c886f0 Revises: 5aeb5811408e Create Date: 2018-12-08 16:33:37.757634 """ # revision identifiers, used by Alembic. revision = '546b04c886f0' down_revision = 'cd79ed46d9c2' from alembic import op, context import sqlalchemy as sa def upgrade(): # Only run this for somehow supported data types at the date we started naming constraints # Among others, these will probably fail on MySQL if context.get_bind().engine.name not in ('sqlite', 'postgresql'): return metadata = context.get_context().opts['target_metadata'] # Drop every constraint on every table with op.batch_alter_table('alias', naming_convention=metadata.naming_convention) as batch_op: batch_op.drop_constraint('alias_pkey', type_="primary") batch_op.drop_constraint('alias_domain_name_fkey', type_="foreignkey") with op.batch_alter_table('alternative', naming_convention=metadata.naming_convention) as batch_op: batch_op.drop_constraint('alternative_pkey', type_="primary") batch_op.drop_constraint('alternative_domain_name_fkey', type_="foreignkey") with op.batch_alter_table('manager', naming_convention=metadata.naming_convention) as batch_op: batch_op.drop_constraint('manager_domain_name_fkey', type_="foreignkey") batch_op.drop_constraint('manager_user_email_fkey', type_="foreignkey") with op.batch_alter_table('token', naming_convention=metadata.naming_convention) as batch_op: batch_op.drop_constraint('token_pkey', type_="primary") batch_op.drop_constraint('token_user_email_fkey', type_="foreignkey") with op.batch_alter_table('fetch', naming_convention=metadata.naming_convention) as batch_op: batch_op.drop_constraint('fetch_pkey', type_="primary") batch_op.drop_constraint('fetch_user_email_fkey', type_="foreignkey") with op.batch_alter_table('relay', naming_convention=metadata.naming_convention) as batch_op: batch_op.drop_constraint('relay_pkey', type_="primary") with op.batch_alter_table('config', naming_convention=metadata.naming_convention) as batch_op: batch_op.drop_constraint('config_pkey', type_="primary") with op.batch_alter_table('user', naming_convention=metadata.naming_convention) as batch_op: batch_op.drop_constraint('user_pkey', type_="primary") batch_op.drop_constraint('user_domain_name_fkey', type_="foreignkey") with op.batch_alter_table('domain', naming_convention=metadata.naming_convention) as batch_op: batch_op.drop_constraint('domain_pkey', type_="primary") # Recreate constraints with proper names with op.batch_alter_table('domain', naming_convention=metadata.naming_convention) as batch_op: batch_op.create_primary_key('domain_pkey', ['name']) with op.batch_alter_table('alias', naming_convention=metadata.naming_convention) as batch_op: batch_op.create_primary_key('alias_pkey', ['email']) batch_op.create_foreign_key('alias_domain_name_fkey', 'domain', ['domain_name'], ['name']) with op.batch_alter_table('user', naming_convention=metadata.naming_convention) as batch_op: batch_op.create_primary_key('user_pkey', ['email']) batch_op.create_foreign_key('user_domain_name_fkey', 'domain', ['domain_name'], ['name']) with op.batch_alter_table('alternative', naming_convention=metadata.naming_convention) as batch_op: batch_op.create_primary_key('alternative_pkey', ['name']) batch_op.create_foreign_key('alternative_domain_name_fkey', 'domain', ['domain_name'], ['name']) with op.batch_alter_table('manager', naming_convention=metadata.naming_convention) as batch_op: batch_op.create_foreign_key('manager_domain_name_fkey', 'domain', ['domain_name'], ['name']) batch_op.create_foreign_key('manager_user_email_fkey', 'user', ['user_email'], ['email']) with op.batch_alter_table('token', naming_convention=metadata.naming_convention) as batch_op: batch_op.create_primary_key('token_pkey', ['id']) batch_op.create_foreign_key('token_user_email_fkey', 'user', ['user_email'], ['email']) with op.batch_alter_table('fetch', naming_convention=metadata.naming_convention) as batch_op: batch_op.create_primary_key('fetch_pkey', ['id']) batch_op.create_foreign_key('fetch_user_email_fkey', 'user', ['user_email'], ['email']) with op.batch_alter_table('relay', naming_convention=metadata.naming_convention) as batch_op: batch_op.create_primary_key('relay_pkey', ['name']) with op.batch_alter_table('config', naming_convention=metadata.naming_convention) as batch_op: batch_op.create_primary_key('config_pkey', ['name']) def downgrade(): pass
59.775
104
0.75366
641
4,782
5.234009
0.154446
0.100149
0.059016
0.085842
0.802683
0.766021
0.743964
0.639046
0.630104
0.630104
0
0.012488
0.129235
4,782
79
105
60.531646
0.793228
0.083438
0
0.310345
0
0
0.218307
0.073227
0
0
0
0
0
1
0.034483
false
0.017241
0.034483
0
0.086207
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
3566d74ed2d08a35c1f17560269150324ee95b0e
86
py
Python
binset/apps.py
wh8983298/GreaterWMS
487e819fcf21a0dca1c74f5b44bc7221353ea3e2
[ "Apache-2.0" ]
1,063
2020-11-15T12:55:15.000Z
2022-03-31T14:33:12.000Z
binset/apps.py
ashrafali46/GreaterWMS
1aed14a8c26c8ac4571db5e6b07ab7e4fa3c7c72
[ "Apache-2.0" ]
96
2020-11-18T00:06:05.000Z
2022-03-03T09:05:39.000Z
binset/apps.py
ashrafali46/GreaterWMS
1aed14a8c26c8ac4571db5e6b07ab7e4fa3c7c72
[ "Apache-2.0" ]
349
2020-11-15T13:15:30.000Z
2022-03-31T11:01:15.000Z
from django.apps import AppConfig class BinsetConfig(AppConfig): name = 'binset'
17.2
33
0.755814
10
86
6.5
0.9
0
0
0
0
0
0
0
0
0
0
0
0.162791
86
4
34
21.5
0.902778
0
0
0
0
0
0.069767
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
358b15031a69d3752e5b10a1216da08bdf18876b
103
py
Python
src/audio_processor/__init__.py
Brian-Pho/RVST598_Speech_Emotion_Recognition
e31d2c948319f0f38515e509545b39f2e0ecac96
[ "MIT" ]
2
2019-10-25T14:59:16.000Z
2019-11-22T13:15:28.000Z
src/audio_processor/__init__.py
Brian-Pho/RVST598_Speech-Emotion-Recognition
e31d2c948319f0f38515e509545b39f2e0ecac96
[ "MIT" ]
null
null
null
src/audio_processor/__init__.py
Brian-Pho/RVST598_Speech-Emotion-Recognition
e31d2c948319f0f38515e509545b39f2e0ecac96
[ "MIT" ]
null
null
null
""" This package processes audio data into a more usable format for machine learning applications. """
20.6
80
0.776699
14
103
5.714286
1
0
0
0
0
0
0
0
0
0
0
0
0.15534
103
4
81
25.75
0.91954
0.912621
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
35928f3a83f68b0623531c902c54c5cfd75d99eb
454
py
Python
choria_discovery/discovery.py
optiz0r/py-choria-discovery
3db3e017861479370d40904f0f8e8971faeba737
[ "Apache-2.0" ]
null
null
null
choria_discovery/discovery.py
optiz0r/py-choria-discovery
3db3e017861479370d40904f0f8e8971faeba737
[ "Apache-2.0" ]
null
null
null
choria_discovery/discovery.py
optiz0r/py-choria-discovery
3db3e017861479370d40904f0f8e8971faeba737
[ "Apache-2.0" ]
null
null
null
import logging from choria_external.base import ChoriaExternal # Ensure the protocol messages are loaded and registered import choria_discovery.protocol class Discovery(ChoriaExternal): """ Base class for External Discovery requests """ def discover(self): """ Implement the node discovery action This method should be overridden by subclasses """ pass def execute(self): self.discover()
21.619048
58
0.69163
50
454
6.24
0.68
0
0
0
0
0
0
0
0
0
0
0
0.248899
454
20
59
22.7
0.914956
0.409692
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0.125
0.375
0
0.75
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
1
0
1
0
0
4
35a24a27a7b9b6c0a4d8b126617353c093939585
62
py
Python
src/ralph/deployment/__init__.py
DoNnMyTh/ralph
97b91639fa68965ad3fd9d0d2652a6545a2a5b72
[ "Apache-2.0" ]
1,668
2015-01-01T12:51:20.000Z
2022-03-29T09:05:35.000Z
src/ralph/deployment/__init__.py
hq-git/ralph
e2448caf02d6e5abfd81da2cff92aefe0a534883
[ "Apache-2.0" ]
2,314
2015-01-02T13:26:26.000Z
2022-03-29T04:06:03.000Z
src/ralph/deployment/__init__.py
hq-git/ralph
e2448caf02d6e5abfd81da2cff92aefe0a534883
[ "Apache-2.0" ]
534
2015-01-05T12:40:28.000Z
2022-03-29T21:10:12.000Z
default_app_config = 'ralph.deployment.apps.DeploymentConfig'
31
61
0.854839
7
62
7.285714
1
0
0
0
0
0
0
0
0
0
0
0
0.048387
62
1
62
62
0.864407
0
0
0
0
0
0.612903
0.612903
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
35adeb92c268593776c6216a1b47db4dc988df5e
378
py
Python
src/libcask/error.py
ianpreston/cask
9e1d9c38b5a9b8827547ed963b0018003abbb047
[ "MIT" ]
6
2016-01-23T23:24:24.000Z
2022-03-06T04:19:01.000Z
src/libcask/error.py
ianpreston/cask
9e1d9c38b5a9b8827547ed963b0018003abbb047
[ "MIT" ]
null
null
null
src/libcask/error.py
ianpreston/cask
9e1d9c38b5a9b8827547ed963b0018003abbb047
[ "MIT" ]
null
null
null
class ContainerError(Exception): pass class AlreadyRunning(ContainerError): pass class NotRunning(ContainerError): pass class AlreadyExists(ContainerError): pass class AttributeInvalid(ContainerError): pass class NoSuchContainer(ContainerError): pass class NoSuchImage(ContainerError): pass class InvalidImage(ContainerError): pass
12.193548
39
0.751323
32
378
8.875
0.34375
0.221831
0.485915
0
0
0
0
0
0
0
0
0
0.185185
378
30
40
12.6
0.922078
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
35b6e519ab315d0ee6a9b9185230ec479fb83e6b
1,504
py
Python
apps/homepage/serializers.py
ShAlireza/gamein-backend
cd7db7a06cacb4398fb89d291e7fc796702157a2
[ "MIT" ]
5
2020-05-26T12:50:29.000Z
2020-06-09T19:22:16.000Z
apps/homepage/serializers.py
ShAlireza/gamein-backend
cd7db7a06cacb4398fb89d291e7fc796702157a2
[ "MIT" ]
7
2021-03-30T13:28:52.000Z
2022-01-13T02:45:23.000Z
apps/homepage/serializers.py
ShAlireza/gamein-backend
cd7db7a06cacb4398fb89d291e7fc796702157a2
[ "MIT" ]
1
2020-05-29T14:08:05.000Z
2020-05-29T14:08:05.000Z
from drf_yasg.utils import swagger_serializer_method from rest_framework import serializers from .models import * from rest_framework.serializers import ModelSerializer class AboutSerializer(ModelSerializer): class Meta: model = About fields = '__all__' class StatisticsSerializer(ModelSerializer): class Meta: model = Statistics fields = '__all__' class EventSerializer(ModelSerializer): class Meta: model = Event fields = '__all__' class WinnerSerializer(ModelSerializer): class Meta: model = Winner fields = '__all__' class StaffSerializer(ModelSerializer): class Meta: model = Staff fields = '__all__' class StaffTeamSerializer(ModelSerializer): class Meta: model = StaffTeam fields = '__all__' class SponsorSerializer(ModelSerializer): class Meta: model = Sponsor fields = '__all__' class QuoteSerializer(ModelSerializer): class Meta: model = Quote fields = '__all__' class SocialSerializer(ModelSerializer): class Meta: model = Social fields = '__all__' class VideoSerializer(ModelSerializer): class Meta: model = Video fields = '__all__' class FAQSerializer(ModelSerializer): class Meta: model = FAQ fields = '__all__' class HomepageSerializer(ModelSerializer): class Meta: model = Homepage fields = '__all__' depth = 3
18.120482
54
0.65625
132
1,504
7.075758
0.333333
0.278373
0.308351
0.372591
0
0
0
0
0
0
0
0.000919
0.276596
1,504
82
55
18.341463
0.857537
0
0
0.45283
0
0
0.055963
0
0
0
0
0
0
1
0
false
0
0.075472
0
0.528302
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
0
0
0
1
0
0
4
35d18cab4f5990676a33217f63251faa5f3f2037
382
py
Python
Application/remove_from_blacklist.py
soheyldaliraan/instagram_sub_bot_remover
8ccf7134c79b8a9c9c09413321f526dd388c5609
[ "MIT" ]
27
2019-02-10T09:04:36.000Z
2022-03-07T21:44:26.000Z
Application/remove_from_blacklist.py
soheyldaliraan/instagram_sub_bot_remover
8ccf7134c79b8a9c9c09413321f526dd388c5609
[ "MIT" ]
1
2022-03-01T02:45:18.000Z
2022-03-01T02:45:18.000Z
Application/remove_from_blacklist.py
soheyldaliraan/instagram_sub_bot_remover
8ccf7134c79b8a9c9c09413321f526dd388c5609
[ "MIT" ]
5
2019-12-27T07:43:33.000Z
2022-02-15T19:51:37.000Z
import os import pandas as pd import configuration def remove_from_blacklist(pk): if os.path.exists(configuration.blacklist_path): black_dataset = pd.read_csv(configuration.blacklist_path) black_dataset.drop(black_dataset[black_dataset['pk'] == pk].index, inplace=True) black_dataset.to_csv(configuration.blacklist_path, columns=['pk', 'username'])
27.285714
88
0.748691
50
382
5.48
0.5
0.218978
0.284672
0.226277
0.277372
0
0
0
0
0
0
0
0.143979
382
13
89
29.384615
0.83792
0
0
0
0
0
0.031414
0
0
0
0
0
0
1
0.125
false
0
0.375
0
0.5
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
0
1
0
0
0
0
4
ea3923e81a3fa7afd6634fb00836d13902e8813d
171
py
Python
serious_shop/items/apps.py
ImustAdmit/django-serious-shop
e2145f2315b4afdfe1fc35fb2b6e02adc0df33c5
[ "MIT" ]
1
2020-09-17T13:40:42.000Z
2020-09-17T13:40:42.000Z
serious_shop/items/apps.py
ImustAdmit/django-serious-shop
e2145f2315b4afdfe1fc35fb2b6e02adc0df33c5
[ "MIT" ]
null
null
null
serious_shop/items/apps.py
ImustAdmit/django-serious-shop
e2145f2315b4afdfe1fc35fb2b6e02adc0df33c5
[ "MIT" ]
null
null
null
from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ class ItemsConfig(AppConfig): name = "items" verbose_name = _("Items")
21.375
55
0.754386
21
171
5.952381
0.714286
0.16
0
0
0
0
0
0
0
0
0
0
0.163743
171
7
56
24.428571
0.874126
0
0
0
0
0
0.05848
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
ea498d1934f7e64e034ea99a3852ff7fdab2b8dc
191
py
Python
docs/examples/compute/digitalocean/instantiate_api_v1.0.py
atsaki/libcloud
ae85479e835494e196e2f6e79aae9a475603d8ac
[ "Apache-2.0" ]
3
2016-06-03T03:40:18.000Z
2018-09-24T05:28:47.000Z
docs/examples/compute/digitalocean/instantiate_api_v1.0.py
atsaki/libcloud
ae85479e835494e196e2f6e79aae9a475603d8ac
[ "Apache-2.0" ]
1
2015-10-26T21:29:56.000Z
2015-10-27T17:29:20.000Z
docs/examples/compute/digitalocean/instantiate_api_v1.0.py
atsaki/libcloud
ae85479e835494e196e2f6e79aae9a475603d8ac
[ "Apache-2.0" ]
3
2016-02-08T23:38:18.000Z
2019-11-05T00:31:34.000Z
from libcloud.compute.types import Provider from libcloud.compute.providers import get_driver cls = get_driver(Provider.DIGITAL_OCEAN) driver = cls('client id', 'api key', api_version='v1')
31.833333
54
0.795812
28
191
5.285714
0.642857
0.162162
0.256757
0
0
0
0
0
0
0
0
0.005814
0.099476
191
5
55
38.2
0.854651
0
0
0
0
0
0.094241
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
ea74e5fbf7a46a012c2919a0ff73451f60eaa6a2
562
py
Python
src/sage/rings/complex_field.py
UCD4IDS/sage
43474c96d533fd396fe29fe0782d44dc7f5164f7
[ "BSL-1.0" ]
1,742
2015-01-04T07:06:13.000Z
2022-03-30T11:32:52.000Z
src/sage/rings/complex_field.py
UCD4IDS/sage
43474c96d533fd396fe29fe0782d44dc7f5164f7
[ "BSL-1.0" ]
66
2015-03-19T19:17:24.000Z
2022-03-16T11:59:30.000Z
src/sage/rings/complex_field.py
UCD4IDS/sage
43474c96d533fd396fe29fe0782d44dc7f5164f7
[ "BSL-1.0" ]
495
2015-01-10T10:23:18.000Z
2022-03-24T22:06:11.000Z
r""" Deprecated in favor of :mod:`sage.rings.complex_mpfr` TESTS:: sage: from sage.rings.complex_field import ComplexField doctest:warning ... DeprecationWarning: the complex_field module is deprecated, please use sage.rings.complex_mpfr See http://trac.sagemath.org/24483 for details. sage: ComplexField() Complex Field with 53 bits of precision """ from sage.misc.superseded import deprecation from sage.rings.complex_mpfr import * deprecation(24483, "the complex_field module is deprecated, please use sage.rings.complex_mpfr")
31.222222
98
0.763345
77
562
5.480519
0.493506
0.106635
0.189573
0.189573
0.293839
0.293839
0.293839
0.293839
0.293839
0.293839
0
0.025157
0.151246
562
17
99
33.058824
0.859539
0.660142
0
0
0
0
0.404372
0.125683
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
ea770b71bab0b926d4f77cb36e86c70b6b4b3dbc
214
py
Python
TargetNone.py
Bob-Z/RoRBot
d8b45e48bcebc3ed9905fa5ff05fd5e3509fd18f
[ "Apache-2.0" ]
null
null
null
TargetNone.py
Bob-Z/RoRBot
d8b45e48bcebc3ed9905fa5ff05fd5e3509fd18f
[ "Apache-2.0" ]
null
null
null
TargetNone.py
Bob-Z/RoRBot
d8b45e48bcebc3ed9905fa5ff05fd5e3509fd18f
[ "Apache-2.0" ]
null
null
null
class TargetNone: def __init__(self): pass def run(self, position, rotation, speed_ms, rot_diff, target_speed_ms, go_up): return 0.0, 0.0, 0.0 def reset(self): self.__init__()
21.4
82
0.616822
32
214
3.71875
0.59375
0.084034
0.10084
0.10084
0.05042
0
0
0
0
0
0
0.038462
0.271028
214
9
83
23.777778
0.724359
0
0
0
0
0
0
0
0
0
0
0
0
1
0.428571
false
0.142857
0
0.142857
0.714286
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
1
0
1
0
0
0
4
ea7c1f7ee251dcd0d9748e2d0e10641305897adc
173
py
Python
tests/core/admin-module/test_admin_nodeInfo.py
happyuc-project/webu.py
5a01124fc84d74df09a33d9dabe88b704cd5b6c6
[ "MIT" ]
null
null
null
tests/core/admin-module/test_admin_nodeInfo.py
happyuc-project/webu.py
5a01124fc84d74df09a33d9dabe88b704cd5b6c6
[ "MIT" ]
null
null
null
tests/core/admin-module/test_admin_nodeInfo.py
happyuc-project/webu.py
5a01124fc84d74df09a33d9dabe88b704cd5b6c6
[ "MIT" ]
null
null
null
def test_admin_nodeInfo(webu, skip_if_testrpc): skip_if_testrpc(webu) node_info = webu.admin.nodeInfo assert 'enode' in node_info assert 'id' in node_info
21.625
47
0.734104
27
173
4.37037
0.518519
0.20339
0.220339
0
0
0
0
0
0
0
0
0
0.190751
173
7
48
24.714286
0.842857
0
0
0
0
0
0.040462
0
0
0
0
0
0.4
1
0.2
false
0
0
0
0.2
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
ea8074848d6eefc73108f8591ed9efa5b23d5c40
17,682
py
Python
src/models/transformer_model.py
flowersteam/spatio-temporal-language-transformers
a33a9bc4748586ef08f9768de2aafd76de71823c
[ "MIT" ]
3
2021-11-26T18:04:53.000Z
2022-01-02T05:28:04.000Z
src/models/transformer_model.py
flowersteam/spatio-temporal-language-transformers
a33a9bc4748586ef08f9768de2aafd76de71823c
[ "MIT" ]
null
null
null
src/models/transformer_model.py
flowersteam/spatio-temporal-language-transformers
a33a9bc4748586ef08f9768de2aafd76de71823c
[ "MIT" ]
null
null
null
""" This module implements the models used for the experiments. """ import math import torch import torch.nn as nn from functools import reduce from src.models.shared import Feedforward ### Helper fns prod = lambda x, y: x * y prod_reduce = lambda l: reduce(prod, l, 1) ### Helper modules class PositionalEncoding(nn.Module): """ Positional encoding matrix based on sinusoids. From pytorch language modeling example here: https://pytorch.org/tutorials/beginner/transformer_tutorial.html """ def __init__(self, d_model, dropout=0.1, max_len=5000, device=torch.device('cpu')): super().__init__() self.dropout = nn.Dropout(p=dropout) pe = torch.zeros(max_len, d_model, device=device) position = torch.arange(0, max_len, dtype=torch.float, device=device).unsqueeze(1) div_term = torch.exp( torch.arange( 0, d_model, 2, device=device ).float() * (-math.log(10000.0) / d_model) ) pe[:, 0::2] = torch.sin(position * div_term) pe[:, 1::2] = torch.cos(position * div_term) pe = pe.unsqueeze(0).transpose(0, 1) self.register_buffer('pe', pe) def forward(self, x): # x is [T, B, (Nobj), H] if len(x.shape) == 4: # adaptation for tensors with 4 dimensions pe = self.pe.unsqueeze(1) else: pe = self.pe x = x + pe[:x.size(0)] return self.dropout(x) class TransformerModule(nn.Module): """ Wrapper around the TransformerEncoderLayer and TransformerEncoder. Also allows for easier processing of 4+ dimensional tensors; the first dimension in considered as the obj dim on which to perform self-attention; the middle dims (at least 1) are considered as batch dims and have no effect, the last dim is considered as the feature dim. """ def __init__(self, hidden_size, num_heads, num_layers, dropout=0.1): super().__init__() tfm_layer = nn.TransformerEncoderLayer( hidden_size, num_heads, hidden_size, dropout=dropout, ) layernorm = nn.LayerNorm(hidden_size) self.tfm = nn.TransformerEncoder( tfm_layer, num_layers, layernorm, ) def forward(self, x): if len(x.shape) == 3: return self.tfm(x) elif len(x.shape) > 3: shape = list(x.shape) mid_shape = shape[1:-1] mid_size = prod_reduce(mid_shape) x = x.reshape(shape[0], mid_size, shape[-1]) x = self.tfm(x) x = x.reshape(shape[:1] + mid_shape + shape[-1:]) return x else: raise ValueError('Invalid shape for input') class Transformer_UT(nn.Module): """ This model concatenates all the tokens corresponding to temporal traces of objects and words in the sentence, and performs num_layers of self-attention over all tokens. A learned query vector is used to query the transformed tensors. Parameters: - body_size: number of body features; - obj_size: number of object features; - voc_size: size of the vocabulary used in descriptions of the scene - seq_length: maximum size of a sentence; - hidden_size: size of: the output of the core and object encoding layers, the hidden layers of both Transformers; - num_heads: number of attention heads in both Transformers; - num_layers: number of layers in both Transformers; - dropout: dropout used in the Transformers, defaults to 0.1; - device: device on which to load the model; - word_aggreg: whether to use word_aggregation, if True the model becomes UT-WA """ def __init__(self, body_size, obj_size, voc_size, seq_length, hidden_size, num_heads, num_layers, dropout=0.1, device=torch.device('cpu'), word_aggreg=False, **kwargs): super().__init__() self.body_size = body_size self.obj_size = obj_size self.voc_size = voc_size self.seq_length = seq_length self.ff_size = hidden_size self.hidden_size = hidden_size self.num_heads = num_heads self.num_layers = num_layers self.dropout = dropout self.device = device self.word_aggreg = word_aggreg self.fc_cast_body = Feedforward(self.body_size, [self.ff_size, self.hidden_size]) self.fc_cast_obj = Feedforward(self.obj_size, [self.ff_size, self.hidden_size]) self.fc_cast_words = Feedforward(self.voc_size, [self.ff_size, self.hidden_size]) # init cls token self.query = nn.Parameter(torch.zeros(self.hidden_size)) # self.query_token = torch.zeros(self.hidden_size, device=device) self.sensory_oh = torch.tensor([1., 0.], device=device) self.linguistic_oh = torch.tensor([0., 1.], device=device) self.dim_adjust_proj = nn.Linear(self.hidden_size + 2, self.hidden_size) self.fc_out = Feedforward(self.hidden_size, [self.ff_size, 1]) self.transformer = TransformerModule( hidden_size=hidden_size, num_heads=num_heads, num_layers=num_layers, dropout=dropout, ) if self.word_aggreg: self.word_transformer = TransformerModule( hidden_size=hidden_size, num_heads=num_heads, num_layers=num_layers, dropout=dropout, ) self.pe = PositionalEncoding(self.hidden_size, device=device, dropout=dropout) self.device = device self.to(self.device) def forward(self, state_trace, body_trace, description): state_trace = self.fc_cast_obj(state_trace) # [B, T, Nobj, h] body_trace = self.fc_cast_body(body_trace) # [B, T, 1, h] words = self.fc_cast_words(description) # [B, Seq, h] query_token = self.query B, T, Nobj, h = state_trace.shape _, S, _ = words.shape state_trace = state_trace.permute(1, 2, 0, 3) # [T, Nobj, B, h] body_trace = body_trace.permute(1, 2, 0, 3) # [T, 1, B, h] words = words.transpose(0, 1) # [S, B, h] # positional encoding state_trace = self.pe(state_trace) body_trace = self.pe(body_trace) words = self.pe(words) state_trace = state_trace.reshape(T * Nobj, B, h) body_trace = body_trace.reshape(T, B, h) sensory_trace = torch.cat([state_trace, body_trace], 0) # add one hot identifiers and reproject to hidden dim sensory_trace = torch.cat([ sensory_trace, self.sensory_oh.expand(T * (Nobj + 1), B, 2) ], -1) words = torch.cat([ words, self.linguistic_oh.expand(S, B, 2) ], -1) sensory_trace = self.dim_adjust_proj(sensory_trace) words = self.dim_adjust_proj(words) if self.word_aggreg: words = torch.cat([words, query_token.expand(1, B, h)], 0) words = self.word_transformer(words)[-1:] tfm_input = torch.cat([ sensory_trace, words, query_token.expand(1, B, h) # query is last token ], dim=0) tfm_output = self.transformer(tfm_input) return torch.sigmoid(self.fc_out(tfm_output[-1])) class SpatialFirstTransformer(nn.Module): """ This model performs a first round of self-attention in individual frames/timesteps, using linguistic information, then performs self-attention over the temporal dimension. Parameters: - body_size: number of body features; - obj_size: number of object features; - voc_size: size of the vocabulary used in descriptions of the scene - seq_length: maximum size of a sentence; - hidden_size: size of: the output of the core and object encoding layers, the hidden layers of both Transformers; - num_heads: number of attention heads in both Transformers; - num_layers: number of layers in both Transformers; - dropout: dropout used in the Transformers, defaults to 0.1; - device: device on which to load the model; - word_aggreg: whether to use word_aggregation, if True the model becomes UT-WA """ def __init__(self, body_size, obj_size, voc_size, seq_length, hidden_size, num_heads, num_layers, dropout=0.1, device=torch.device('cpu'), word_aggreg=False, **kwargs): super().__init__() self.body_size = body_size self.obj_size = obj_size self.voc_size = voc_size self.seq_length = seq_length self.ff_size = hidden_size self.hidden_size = hidden_size self.num_heads = num_heads self.num_layers = num_layers self.dropout = dropout self.device = device self.word_aggreg = word_aggreg self.fc_cast_body = Feedforward(self.body_size, [self.ff_size, self.hidden_size]) self.fc_cast_obj = Feedforward(self.obj_size, [self.ff_size, self.hidden_size]) self.fc_cast_words = Feedforward(self.voc_size, [self.ff_size, self.hidden_size]) # init cls token self.query = nn.Parameter(torch.zeros(self.hidden_size)) # self.query_token = torch.zeros(self.hidden_size, device=device) self.sensory_oh = torch.tensor([1., 0.], device=device) self.linguistic_oh = torch.tensor([0., 1.], device=device) self.dim_adjust_proj = nn.Linear(self.hidden_size + 2, self.hidden_size) self.fc_out = Feedforward(self.hidden_size, [self.ff_size, 1]) self.spatial_transformer = TransformerModule( hidden_size=hidden_size, num_heads=num_heads, num_layers=num_layers, dropout=dropout, ) self.temporal_transformer = TransformerModule( hidden_size=hidden_size, num_heads=num_heads, num_layers=num_layers, dropout=dropout, ) if self.word_aggreg: self.word_transformer = TransformerModule( hidden_size=hidden_size, num_heads=num_heads, num_layers=num_layers, dropout=dropout, ) self.pe = PositionalEncoding(self.hidden_size, device=device, dropout=dropout) self.device = device self.to(self.device) def forward(self, state_trace, body_trace, description): state_trace = self.fc_cast_obj(state_trace) # [B, T, Nobj, h] body_trace = self.fc_cast_body(body_trace) # [B, T, 1, h] words = self.fc_cast_words(description) # [B, Seq, h] query_token = self.query B, T, Nobj, h = state_trace.shape _, S, _ = words.shape state_trace = state_trace.permute(1, 2, 0, 3) body_trace = body_trace.permute(1, 2, 0, 3) words = words.transpose(0, 1) # positional encoding state_trace = self.pe(state_trace) # [T, Nobj, B, h] body_trace = self.pe(body_trace) # [T, 1, B, h] words = self.pe(words) # [S, B, h] # add sensory and linguistic identifiers and reproject to dim state_trace = torch.cat([state_trace, self.sensory_oh.expand(T, Nobj, B, 2)], -1) state_trace = self.dim_adjust_proj(state_trace) body_trace = torch.cat([body_trace, self.sensory_oh.expand(T, 1, B, 2)], -1) body_trace = self.dim_adjust_proj(body_trace) words = torch.cat([words, self.linguistic_oh.expand(S, B, 2)], -1) words = self.dim_adjust_proj(words) # aggreg words if need be if self.word_aggreg: words = torch.cat([words, query_token.expand(1, B, h)], 0) words = self.word_transformer(words)[-1:] S = 1 # make spatial transformer input words = words.expand(T, S, B, h) query_token_spatial = query_token.expand(T, 1, B, h) spatial_tfm_input = torch.cat([ state_trace, body_trace, words, query_token_spatial ], 1) spatial_tfm_input.transpose(0, 1) # [Nobj + 1 + S + 1, T, B, h] # [T, B, h] temporal_tfm_input = self.spatial_transformer(spatial_tfm_input)[-1] query_token_temporal = query_token.expand([1, B, h]) temporal_tfm_input = torch.cat([temporal_tfm_input, query_token_temporal], 0) return torch.sigmoid(self.fc_out(self.temporal_transformer(temporal_tfm_input)[-1])) class TemporalFirstTransformer(nn.Module): """ This model performs a first round of self-attention over individual object traces using linguitic information, then performs self attention on the resulting object summaries. Parameters: - body_size: number of body features; - obj_size: number of object features; - voc_size: size of the vocabulary used in descriptions of the scene - seq_length: maximum size of a sentence; - hidden_size: size of: the output of the core and object encoding layers, the hidden layers of both Transformers; - num_heads: number of attention heads in both Transformers; - num_layers: number of layers in both Transformers; - dropout: dropout used in the Transformers, defaults to 0.1; - device: device on which to load the model; - word_aggreg: whether to use word_aggregation, if True the model becomes UT-WA """ def __init__(self, body_size, obj_size, voc_size, seq_length, hidden_size, num_heads, num_layers, dropout=0.1, device=torch.device('cpu'), word_aggreg=False, **kwargs): super().__init__() self.body_size = body_size self.obj_size = obj_size self.voc_size = voc_size self.seq_length = seq_length self.ff_size = hidden_size self.hidden_size = hidden_size self.num_heads = num_heads self.num_layers = num_layers self.dropout = dropout self.device = device self.word_aggreg = word_aggreg self.fc_cast_body = Feedforward(self.body_size, [self.ff_size, self.hidden_size]) self.fc_cast_obj = Feedforward(self.obj_size, [self.ff_size, self.hidden_size]) self.fc_cast_words = Feedforward(self.voc_size, [self.ff_size, self.hidden_size]) # init cls token self.query = nn.Parameter(torch.zeros(self.hidden_size)) # self.query_token = torch.zeros(self.hidden_size, device=device) self.sensory_oh = torch.tensor([1., 0.], device=device) self.linguistic_oh = torch.tensor([0., 1.], device=device) self.dim_adjust_proj = nn.Linear(self.hidden_size + 2, self.hidden_size) self.fc_out = Feedforward(self.hidden_size, [self.ff_size, 1]) self.spatial_transformer = TransformerModule( hidden_size=hidden_size, num_heads=num_heads, num_layers=num_layers, dropout=dropout, ) self.temporal_transformer = TransformerModule( hidden_size=hidden_size, num_heads=num_heads, num_layers=num_layers, dropout=dropout, ) if self.word_aggreg: self.word_transformer = TransformerModule( hidden_size=hidden_size, num_heads=num_heads, num_layers=num_layers, dropout=dropout, ) self.pe = PositionalEncoding(self.hidden_size, device=device, dropout=dropout) self.device = device self.to(self.device) def forward(self, state_trace, body_trace, description): state_trace = self.fc_cast_obj(state_trace) # [B, T, Nobj, h] body_trace = self.fc_cast_body(body_trace) # [B, T, 1, h] words = self.fc_cast_words(description) # [B, Seq, h] query_token = self.query B, T, Nobj, h = state_trace.shape _, S, _ = words.shape state_trace = state_trace.permute(1, 2, 0, 3) body_trace = body_trace.permute(1, 2, 0, 3) words = words.transpose(0, 1) # positional encoding state_trace = self.pe(state_trace) # [T, Nobj, B, h] body_trace = self.pe(body_trace) # [T, 1, B, h] sensory_trace = torch.cat([state_trace, body_trace], 1) # [T, Nobj+1, B, h] words = self.pe(words) # [S, B, h] # add sensory and linguistic identifiers and reproject to dim sensory_trace = torch.cat([sensory_trace, self.sensory_oh.expand(T, Nobj + 1, B, 2)], -1) sensory_trace = self.dim_adjust_proj(sensory_trace) words = torch.cat([words, self.linguistic_oh.expand(S, B, 2)], -1) words = self.dim_adjust_proj(words) # aggreg words if need be if self.word_aggreg: words = torch.cat([words, query_token.expand(1, B, h)], 0) words = self.word_transformer(words)[-1:] S = 1 words = words.expand(Nobj + 1, S, B, h).transpose(0, 1) query_token_temporal = query_token.expand(1, Nobj + 1, B, h) temporal_tfm_input = torch.cat([ sensory_trace, words, query_token_temporal ], 0) # out is [T, B, h] spatial_tfm_input = self.temporal_transformer(temporal_tfm_input)[-1] query_token_spatial = query_token.expand([1, B, h]) spatial_tfm_input = torch.cat([spatial_tfm_input, query_token_spatial], 0) return torch.sigmoid(self.fc_out(self.spatial_transformer(spatial_tfm_input)[-1]))
37.303797
97
0.621706
2,356
17,682
4.45034
0.098896
0.059132
0.041392
0.025751
0.767859
0.749452
0.731998
0.714258
0.685551
0.671149
0
0.012549
0.278928
17,682
474
98
37.303797
0.809804
0.233401
0
0.663265
0
0
0.002799
0
0
0
0
0
0
1
0.034014
false
0
0.017007
0
0.088435
0
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
ea82aa6e4246fdd22e64753ef51e6e4e18ee026c
279
py
Python
app/models/content.py
yogeshwaran01/Book-Store
7b4caa37b4132d8e969798eface3fd56c9721395
[ "MIT" ]
null
null
null
app/models/content.py
yogeshwaran01/Book-Store
7b4caa37b4132d8e969798eface3fd56c9721395
[ "MIT" ]
null
null
null
app/models/content.py
yogeshwaran01/Book-Store
7b4caa37b4132d8e969798eface3fd56c9721395
[ "MIT" ]
null
null
null
from app import database as db class Note(db.Model): # type: ignore id = db.Column(db.Integer, primary_key=True) title = db.Column(db.Text()) info = db.Column(db.Text()) link = db.Column(db.Text()) def __repr__(self) -> str: return f"{self.title}"
23.25
48
0.623656
43
279
3.930233
0.627907
0.189349
0.236686
0.248521
0
0
0
0
0
0
0
0
0.218638
279
11
49
25.363636
0.775229
0.043011
0
0
0
0
0.045283
0
0
0
0
0
0
1
0.125
false
0
0.125
0.125
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
578fad38630cb3dc8fb9e479454fd2f2a02a0ad5
51
py
Python
lr1 parser/test.py
arvin2079/java-lexer-with-python
6d4b163bea139b647c3f8d3d1539eaf706602cc7
[ "MIT" ]
null
null
null
lr1 parser/test.py
arvin2079/java-lexer-with-python
6d4b163bea139b647c3f8d3d1539eaf706602cc7
[ "MIT" ]
null
null
null
lr1 parser/test.py
arvin2079/java-lexer-with-python
6d4b163bea139b647c3f8d3d1539eaf706602cc7
[ "MIT" ]
null
null
null
l = ['a', '-', 'C', '----', 'S'] print(''.join(l))
17
32
0.27451
7
51
2
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.156863
51
3
33
17
0.325581
0
0
0
0
0
0.153846
0
0
0
0
0
0
1
0
false
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
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
579e9f32e6aa0f8ffd97b4d9575834e3f78e74ec
174
py
Python
client/launcher.py
MatejKafka/guess-the-song
58bbefffd7a00b851932fac6c982128a1013c24d
[ "WTFPL" ]
null
null
null
client/launcher.py
MatejKafka/guess-the-song
58bbefffd7a00b851932fac6c982128a1013c24d
[ "WTFPL" ]
null
null
null
client/launcher.py
MatejKafka/guess-the-song
58bbefffd7a00b851932fac6c982128a1013c24d
[ "WTFPL" ]
null
null
null
# slight hack - pyinstaller does not allow main file # as module, this file allows me to use module namespace from src import __main__ if __name__ == "__main__": __main__()
34.8
57
0.758621
26
174
4.461538
0.807692
0
0
0
0
0
0
0
0
0
0
0
0.178161
174
5
58
34.8
0.811189
0.609195
0
0
0
0
0.121212
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
57b99a9e33d5ca32803983d019b3516cd30fdc79
2,167
py
Python
test_project/test_project/formtest/views.py
scott-w/view-helpers
389fe3599e5b4e5da35f490a33895b220025b2a5
[ "BSD-3-Clause" ]
1
2015-12-10T17:52:50.000Z
2015-12-10T17:52:50.000Z
test_project/test_project/formtest/views.py
scott-w/view-helpers
389fe3599e5b4e5da35f490a33895b220025b2a5
[ "BSD-3-Clause" ]
null
null
null
test_project/test_project/formtest/views.py
scott-w/view-helpers
389fe3599e5b4e5da35f490a33895b220025b2a5
[ "BSD-3-Clause" ]
null
null
null
from django.views.generic import View from pebble_helpers.views.mixins.form import RedirectReverseMixin class SuccessUrlView(RedirectReverseMixin, View): """View that has a Success Url """ success_url = 'testproject-success-plain' class SuccessUrlArgView(RedirectReverseMixin, View): """View that has a Success Url that takes an arg. """ success_url = 'testproject-success-arg' def get_success_args(self): """ """ return 0, class SuccessUrlKwargView(RedirectReverseMixin, View): """View that has a Success Url that takes a kwarg. """ success_url = 'testproject-success-kwarg' def get_success_kwargs(self): """ """ return {'i': 0} class SuccessUrlArgKwargView(RedirectReverseMixin, View): """View that has both get_success_kwargs and get_success_args defined. """ success_url = 'testproject-success-argkwarg' def get_success_args(self): """ """ return 0, def get_success_kwargs(self): """ """ return {'i': 0} class FailureUrlView(RedirectReverseMixin, View): """View that has a Failure Url """ failure_url = 'testproject-failure-plain' class FailureUrlArgView(RedirectReverseMixin, View): """View that has a Failure Url that takes an Arg. """ failure_url = 'testproject-failure-arg' def get_failure_args(self): """ """ return 0, class FailureUrlKwargView(RedirectReverseMixin, View): """View that has a Failure Url that takes a kwarg. """ failure_url = 'testproject-failure-kwarg' def get_failure_kwargs(self): """ """ return {'i': 0} class FailureUrlArgKwargView(RedirectReverseMixin, View): """View that has both get_failure_kwargs and get_failure_args defined. """ failure_url = 'testproject-failure-argkwarg' def get_failure_args(self): """ """ return 0, def get_failure_kwargs(self): """ """ return {'i': 0} class NoUrlView(RedirectReverseMixin, View): """View that has neither a Success or Failure Url. """
22.340206
74
0.635441
235
2,167
5.719149
0.2
0.160714
0.1875
0.214286
0.53497
0.485119
0.485119
0.339286
0.270833
0.16369
0
0.004954
0.25473
2,167
96
75
22.572917
0.827245
0.216428
0
0.457143
0
0
0.134905
0.132286
0
0
0
0
0
1
0.228571
false
0
0.057143
0
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
1
0
0
0
0
1
0
0
4
57ea3d03d3673d8433a77e85aa2a6d72179ed833
212
py
Python
backend/document/domain/exceptions.py
linearcombination/InterleavedResourcesGenerator
8c2f8ae30304eab5806e516c58158e6c3ddeaa2b
[ "MIT" ]
1
2022-01-10T21:03:26.000Z
2022-01-10T21:03:26.000Z
backend/document/domain/exceptions.py
linearcombination/InterleavedResourcesGenerator
8c2f8ae30304eab5806e516c58158e6c3ddeaa2b
[ "MIT" ]
null
null
null
backend/document/domain/exceptions.py
linearcombination/InterleavedResourcesGenerator
8c2f8ae30304eab5806e516c58158e6c3ddeaa2b
[ "MIT" ]
1
2021-09-10T19:49:59.000Z
2021-09-10T19:49:59.000Z
"""This module provides custom domain exceptions.""" from typing import final @final class InvalidDocumentRequestException(Exception): def __init__(self, message: str): self.message: str = message
21.2
52
0.740566
23
212
6.652174
0.782609
0.143791
0.183007
0
0
0
0
0
0
0
0
0
0.169811
212
9
53
23.555556
0.869318
0.216981
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0.2
0
0.6
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
57fcecc2ce3e54b39114eb5ff7eef5166ecf89c3
43
py
Python
Scripts/rm_aspect.py
9bstudios/mecco_renderMonkey
6a88a65ec4f9bd76150927df07fad7c85e3a87f4
[ "MIT" ]
1
2021-04-19T23:43:56.000Z
2021-04-19T23:43:56.000Z
Scripts/rm_aspect.py
adamohern/mecco_renderMonkey
6a88a65ec4f9bd76150927df07fad7c85e3a87f4
[ "MIT" ]
null
null
null
Scripts/rm_aspect.py
adamohern/mecco_renderMonkey
6a88a65ec4f9bd76150927df07fad7c85e3a87f4
[ "MIT" ]
2
2019-10-21T15:21:44.000Z
2021-09-23T15:59:43.000Z
# python args = lx.args() lx.out(args[0])
8.6
16
0.604651
8
43
3.25
0.625
0.461538
0
0
0
0
0
0
0
0
0
0.027778
0.162791
43
5
17
8.6
0.694444
0.139535
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
17c83c2e236a9921f97986d8951d93cf4e3e9ff1
779
py
Python
03-design-section/designable_web/designable_web/views.py
g2gcio/course-demo
b0d00a6ac7a6a6a17af963cee67cf13dc5941e95
[ "MIT" ]
276
2016-04-04T20:57:36.000Z
2022-03-12T02:42:46.000Z
03-design-section/designable_web/designable_web/views.py
g2gcio/course-demo
b0d00a6ac7a6a6a17af963cee67cf13dc5941e95
[ "MIT" ]
37
2016-10-13T12:04:27.000Z
2020-11-22T10:36:53.000Z
03-design-section/designable_web/designable_web/views.py
g2gcio/course-demo
b0d00a6ac7a6a6a17af963cee67cf13dc5941e95
[ "MIT" ]
163
2016-10-03T02:10:00.000Z
2022-03-25T03:43:01.000Z
from pyramid.view import view_config import designable_web.utils @view_config(route_name='index', renderer='templates/index.pt') def index(_): return extend_model({'project': 'designable_web'}) @view_config(route_name='box', renderer='templates/box_model.pt') def box_model(_): return extend_model({}) @view_config(route_name='selectors', renderer='templates/selectors.pt') def selectors(_): return extend_model({}) @view_config(route_name='layout', renderer='templates/layout.pt') def layout(_): return extend_model({}) @view_config(route_name='float', renderer='templates/float.pt') def float_(_): return extend_model({}) def extend_model(model_dict): model_dict['build_cache_id'] = designable_web.utils.build_cache_id return model_dict
23.606061
71
0.748395
104
779
5.269231
0.259615
0.109489
0.136861
0.173358
0.19708
0.19708
0.19708
0
0
0
0
0
0.107831
779
32
72
24.34375
0.788489
0
0
0.2
0
0
0.207959
0.056483
0
0
0
0
0
1
0.3
false
0
0.1
0.25
0.7
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
17de6fa86f76256b240f0ebb381df43c9d3066fd
107
py
Python
controller/LoadCraft/apps/utils_mq_listener/apps.py
antondmtvch/yah2j
3ed2e82a2c72b93ad1f11905ff37b79c386b0a58
[ "MIT" ]
4
2019-12-04T10:39:09.000Z
2020-02-18T06:57:05.000Z
controller/LoadCraft/apps/utils_mq_listener/apps.py
antondmtvch/yah2j
3ed2e82a2c72b93ad1f11905ff37b79c386b0a58
[ "MIT" ]
37
2019-12-18T13:12:50.000Z
2022-02-10T10:52:37.000Z
controller/LoadCraft/apps/utils_mq_listener/apps.py
antondmtvch/yah2j
3ed2e82a2c72b93ad1f11905ff37b79c386b0a58
[ "MIT" ]
5
2019-12-06T10:55:56.000Z
2020-06-01T19:32:32.000Z
from django.apps import AppConfig class UtilsMqListenerConfig(AppConfig): name = 'utils_mq_listener'
17.833333
39
0.794393
12
107
6.916667
0.916667
0
0
0
0
0
0
0
0
0
0
0
0.140187
107
5
40
21.4
0.902174
0
0
0
0
0
0.158879
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
17e0d16c450ac6b9ea1068936422fbddc9f95db2
92
py
Python
presalytics/lib/plugins/__init__.py
presalytics/python-client
5d80b78562126feeeb49af4738e2c1aed12dce3a
[ "MIT" ]
4
2020-02-21T16:30:46.000Z
2021-01-12T12:22:03.000Z
presalytics/lib/plugins/__init__.py
presalytics/python-client
5d80b78562126feeeb49af4738e2c1aed12dce3a
[ "MIT" ]
4
2019-12-28T19:30:08.000Z
2020-03-31T19:27:45.000Z
presalytics/lib/plugins/__init__.py
presalytics/python-client
5d80b78562126feeeb49af4738e2c1aed12dce3a
[ "MIT" ]
null
null
null
""" Library folder for plugins configured from `presalytics.story.outline.Plugin` class """
23
83
0.771739
11
92
6.454545
1
0
0
0
0
0
0
0
0
0
0
0
0.108696
92
3
84
30.666667
0.865854
0.902174
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
aa02d1114f383df02d21751cb0b4236b1bd6765f
5,026
py
Python
scripts/us_bjs/nps/import_data.py
padma-g/data
b65e4e04a759ecc5b0b4df67e8cc290b0ddcadff
[ "Apache-2.0" ]
1
2021-01-01T05:27:56.000Z
2021-01-01T05:27:56.000Z
scripts/us_bjs/nps/import_data.py
padma-g/data
b65e4e04a759ecc5b0b4df67e8cc290b0ddcadff
[ "Apache-2.0" ]
null
null
null
scripts/us_bjs/nps/import_data.py
padma-g/data
b65e4e04a759ecc5b0b4df67e8cc290b0ddcadff
[ "Apache-2.0" ]
1
2021-01-01T05:27:58.000Z
2021-01-01T05:27:58.000Z
import pandas as pd from preprocess_data import preprocess_df from nps_statvar_writer import write_sv from absl import flags from absl import app FLAGS = flags.FLAGS flags.DEFINE_string('input_file', 'NPS_1978-2018_Data.tsv', 'file path to tsv file with import data', short_name='i') AGGREGATE_COLUMNS = [ "Count_Person_Incarcerated_MeasuredBasedOnJurisdiction", "Count_Person_Incarcerated_WhiteAlone_MeasuredBasedOnJurisdiction", "Count_Person_BlackOrAfricanAmericanAlone_Incarcerated_MeasuredBasedOnJurisdiction", "Count_Person_HispanicOrLatino_Incarcerated_MeasuredBasedOnJurisdiction", "Count_Person_AmericanIndianOrAlaskaNativeAlone_Incarcerated_MeasuredBasedOnJurisdiction", "Count_Person_AsianAlone_Incarcerated_MeasuredBasedOnJurisdiction", "Count_Person_Incarcerated_NativeHawaiianOrOtherPacificIslanderAlone_MeasuredBasedOnJurisdiction", "Count_Person_Incarcerated_TwoOrMoreRaces_MeasuredBasedOnJurisdiction", "Count_MortalityEvent_Incarcerated_MeasuredBasedOnJurisdiction", "Count_MortalityEvent_Incarcerated_JudicialExecution_MeasuredBasedOnJurisdiction", "Count_MortalityEvent_IllnessOrNaturalCause_Incarcerated_MeasuredBasedOnJurisdiction", "Count_MortalityEvent_AIDS_Incarcerated_MeasuredBasedOnJurisdiction", "Count_MortalityEvent_Incarcerated_IntentionalSelf-Harm(Suicide)_MeasuredBasedOnJurisdiction", "Count_MortalityEvent_Accidents(UnintentionalInjuries)_Incarcerated_MeasuredBasedOnJurisdiction", "Count_MortalityEvent_DeathDueToAnotherPerson_Incarcerated_MeasuredBasedOnJurisdiction", "Count_MortalityEvent_Assault(Homicide)_Incarcerated_MeasuredBasedOnJurisdiction", "Count_MortalityEvent_Incarcerated_NPSOtherCauseOfDeath_MeasuredBasedOnJurisdiction", "Count_IncarcerationEvent_AdmittedToPrison_Incarcerated_MaxSentenceGreaterThan1Year_Sentenced_MeasuredBasedOnJurisdiction", "Count_IncarcerationEvent_Incarcerated_MaxSentenceGreaterThan1Year_ReleasedFromPrison_Sentenced_MeasuredBasedOnJurisdiction", "Count_Person_Incarcerated_MaxSentenceGreaterThan1Year_Sentenced_MeasuredBasedOnJurisdiction", "Count_Person_Incarcerated_MaxSentence1YearOrLess_Sentenced_MeasuredBasedOnJurisdiction", "Count_Person_Incarcerated_Unsentenced_MeasuredBasedOnJurisdiction", "Count_Person_Incarcerated_InState_PrivatelyOperated_MeasuredBasedOnJurisdiction", "Count_Person_Incarcerated_OutOfState_PrivatelyOperated_MeasuredBasedOnJurisdiction", "Count_Person_Incarcerated_Local_LocallyOperated_MeasuredBasedOnJurisdiction", "Count_Person_FederallyOperated_Incarcerated_MeasuredBasedOnJurisdiction", "Count_Person_Incarcerated_OutOfState_StateOperated_MeasuredBasedOnJurisdiction", "Count_Person_Incarcerated_NotAUSCitizen_StateOperated&FederallyOperated&PrivatelyOperated_MeasuredBasedOnCustody", "Count_Person_Incarcerated_MaxSentenceGreaterThan1Year_NotAUSCitizen_Sentenced_StateOperated&FederallyOperated&PrivatelyOperated_MeasuredBasedOnCustody", "Count_Person_Incarcerated_MaxSentence1YearOrLess_NotAUSCitizen_Sentenced_StateOperated&FederallyOperated&PrivatelyOperated_MeasuredBasedOnCustody", "Count_Person_Incarcerated_NotAUSCitizen_StateOperated&FederallyOperated&PrivatelyOperated_Unsentenced_MeasuredBasedOnCustody", "Count_Person_Female_Incarcerated_MeasuredBasedOnJurisdiction", "Count_Person_Incarcerated_Male_MeasuredBasedOnJurisdiction" ] FILENAME = 'national_prison_stats' def generate_tmcf(df): template = """ Node: E:{filename}->E{i} typeOf: dcs:StatVarObservation variableMeasured: dcs:{stat_var} measurementMethod: dcs:{mmethod} observationAbout: C:{filename}->GeoId observationDate: C:{filename}->YEAR value: C:{filename}->{stat_var} """ with open('national_prison_stats.tmcf', 'w') as tmcf_f: col_num = 0 for col in list(df.columns): if not col == "GeoId" and not col == "YEAR": if col in AGGREGATE_COLUMNS: tmcf_f.write( template.format_map({ 'i': col_num, 'stat_var': col, 'filename': FILENAME, 'mmethod': 'dcAggregate/NationalPrisonerStatistics' })) else: tmcf_f.write( template.format_map({ 'i': col_num, 'stat_var': col, 'filename': FILENAME, 'mmethod': 'NationalPrisonerStatistics' })) col_num += 1 def save_csv(df, filename): df.to_csv(filename + '.csv', index=False) def main(args): df = pd.read_csv(FLAGS.input_file, delimiter='\t') processed_df = preprocess_df(df) save_csv(processed_df, FILENAME) generate_tmcf(processed_df) f = open("nps_statvars.mcf", "w+") write_sv(f) if __name__ == '__main__': app.run(main)
50.26
157
0.767608
404
5,026
9.056931
0.316832
0.244876
0.176551
0.163979
0.39519
0.150314
0.150314
0.098934
0.098934
0.036622
0
0.003831
0.169121
5,026
99
158
50.767677
0.872366
0
0
0.136364
0
0
0.660764
0.596697
0
0
0
0
0
1
0.034091
false
0
0.068182
0
0.102273
0
0
0
0
null
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
aa36a5cc8745de8f060a520ebe1650d3bd2afe80
580
py
Python
test_importing/taskflow_import_dag2.py
csprl-nowigence/airflow
f0c3b56ba13de95299ff8193b2d45275183ea575
[ "Apache-2.0" ]
null
null
null
test_importing/taskflow_import_dag2.py
csprl-nowigence/airflow
f0c3b56ba13de95299ff8193b2d45275183ea575
[ "Apache-2.0" ]
null
null
null
test_importing/taskflow_import_dag2.py
csprl-nowigence/airflow
f0c3b56ba13de95299ff8193b2d45275183ea575
[ "Apache-2.0" ]
null
null
null
import pendulum from airflow.decorators import dag, task import test_importing.mylib @dag( default_args={ 'owner': 'csprl', }, schedule_interval=None, start_date=pendulum.datetime(2022, 1, 1, tz='UTC'), catchup=False, tags=['debugging', 'learning', 'troubleshooting'], ) def import_with_package(): @task def main_task(): test_importing.mylib.func1() print(test_importing.mylib.func2()) print(test_importing.mylib.var1) print(test_importing.mylib.var2) main_task() this_dag = import_with_package()
20
55
0.667241
69
580
5.391304
0.57971
0.174731
0.241935
0.185484
0
0
0
0
0
0
0
0.021739
0.206897
580
28
56
20.714286
0.786957
0
0
0
0
0
0.07772
0
0
0
0
0
0
1
0.095238
false
0
0.428571
0
0.52381
0.142857
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
aa38ea99c20ca8b73b73e9d9e5b550e2a0eb6143
225
py
Python
binance_utils/connection.py
victorvalentee/python-binance-tick-data
5cd1c37ee7dbe93c398e3f9dc2eed2af198cc28e
[ "MIT" ]
null
null
null
binance_utils/connection.py
victorvalentee/python-binance-tick-data
5cd1c37ee7dbe93c398e3f9dc2eed2af198cc28e
[ "MIT" ]
null
null
null
binance_utils/connection.py
victorvalentee/python-binance-tick-data
5cd1c37ee7dbe93c398e3f9dc2eed2af198cc28e
[ "MIT" ]
null
null
null
import binance from config import BINANCE_API_KEY, BINANCE_API_SECRET async def connect(): binance_client = binance.Client(BINANCE_API_KEY, BINANCE_API_SECRET) await binance_client.load() return binance_client
22.5
72
0.8
31
225
5.451613
0.451613
0.236686
0.153846
0.236686
0.343195
0.343195
0
0
0
0
0
0
0.146667
225
9
73
25
0.880208
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.5
0
0
0
0
null
1
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
350d2442f3be28cf555f5223b8b68675f3b34327
175
py
Python
rl2048player/__init__.py
aar015/rl-2048-player
91c67f5d9bf3e4e1ee7ef3c204ff356b449827d8
[ "MIT" ]
null
null
null
rl2048player/__init__.py
aar015/rl-2048-player
91c67f5d9bf3e4e1ee7ef3c204ff356b449827d8
[ "MIT" ]
null
null
null
rl2048player/__init__.py
aar015/rl-2048-player
91c67f5d9bf3e4e1ee7ef3c204ff356b449827d8
[ "MIT" ]
null
null
null
'''Package containing all code related to learning algorithms''' from .agents import QAgent, TD0Agent, SARSAAgent from .masks import Mask_rxcx4 from .examples import example1
35
64
0.811429
23
175
6.130435
0.826087
0
0
0
0
0
0
0
0
0
0
0.019608
0.125714
175
4
65
43.75
0.901961
0.331429
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
351b2d5a1a71bc6f162c992f89bc5da245a2c424
100
py
Python
mdm_inventory/users/serializers/__init__.py
TeamWalls/mdm-backend-django
4e23f9abc8531eb786d5e6cf958c9ffa8acd6b1d
[ "MIT" ]
null
null
null
mdm_inventory/users/serializers/__init__.py
TeamWalls/mdm-backend-django
4e23f9abc8531eb786d5e6cf958c9ffa8acd6b1d
[ "MIT" ]
null
null
null
mdm_inventory/users/serializers/__init__.py
TeamWalls/mdm-backend-django
4e23f9abc8531eb786d5e6cf958c9ffa8acd6b1d
[ "MIT" ]
null
null
null
from .users import ( UserCreateSerializer, UserUpdateSerializer, UserDisableSerializer )
20
25
0.76
6
100
12.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.19
100
5
26
20
0.938272
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.2
0
0.2
0
1
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
351f8d0603b8ae7a9a7bb593a8f8d4e78d921ca4
22
py
Python
plaid/version.py
cwatsonplaid/plaid-python
118200484ca6f24d4dbed4cf00e46f5b4d20f914
[ "MIT" ]
null
null
null
plaid/version.py
cwatsonplaid/plaid-python
118200484ca6f24d4dbed4cf00e46f5b4d20f914
[ "MIT" ]
null
null
null
plaid/version.py
cwatsonplaid/plaid-python
118200484ca6f24d4dbed4cf00e46f5b4d20f914
[ "MIT" ]
null
null
null
__version__ = '7.3.0'
11
21
0.636364
4
22
2.5
1
0
0
0
0
0
0
0
0
0
0
0.157895
0.136364
22
1
22
22
0.368421
0
0
0
0
0
0.227273
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
3532d44591878b86460925f680f44872786b8aa6
61
py
Python
sequin/__init__.py
josefdlange/sequin
496099949444602e5ed988a8d9aed0bf3dc47dd2
[ "MIT" ]
null
null
null
sequin/__init__.py
josefdlange/sequin
496099949444602e5ed988a8d9aed0bf3dc47dd2
[ "MIT" ]
null
null
null
sequin/__init__.py
josefdlange/sequin
496099949444602e5ed988a8d9aed0bf3dc47dd2
[ "MIT" ]
null
null
null
from base import SequinEntity, SequinEvent, register_database
61
61
0.885246
7
61
7.571429
1
0
0
0
0
0
0
0
0
0
0
0
0.081967
61
1
61
61
0.946429
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
3533010fb748fc7b5f8658024873ea797cbeb4f1
20,819
py
Python
contest/weekly/229/max_score/py/greedy.py
phunc20/leetcode
4581f39be565593ad0f5718dd4b0e1c34c209bf3
[ "MIT" ]
null
null
null
contest/weekly/229/max_score/py/greedy.py
phunc20/leetcode
4581f39be565593ad0f5718dd4b0e1c34c209bf3
[ "MIT" ]
null
null
null
contest/weekly/229/max_score/py/greedy.py
phunc20/leetcode
4581f39be565593ad0f5718dd4b0e1c34c209bf3
[ "MIT" ]
null
null
null
#class Solution: # def maximumScore(self, nums: List[int], multipliers: List[int]) -> int: def maximumScore(nums, multipliers): """ Greedy cannot give the best solution. """ from random import randomint def random_pick(H, T): k = randomint(0,1) if k % 2: return H, 0 else: return T, -1 m = len(multipliers) n = len(nums) score = 0 for i in range(m): head = nums[0] tail = nums[-1] # randomly pick one if they are equal if head == tail: chosen, idx = random_pick(head, tail) score += multipliers[i] * chosen if idx == 0: nums = nums[1:] else: nums = nums[:-1] else: multipliers[i] if __name__ == "__main__": nums = [1,2,3] multipliers = [3,2,1] ans = maximumScore(nums, multipliers) expected = 14 #print(f"{'Correct' if ans == expected else 'Incorrect'}") print(f"{'Correct' if ans == expected else f'Incorrect: ans = {ans}, expected = {expected}'}") nums = [-5,-3,-3,-2,7,1] multipliers = [-10,-5,3,4,6] ans = maximumScore(nums, multipliers) expected = 102 print(f"{'Correct' if ans == expected else f'Incorrect: ans = {ans}, expected = {expected}'}") nums = [822,963,170,305,258,841,204,748,850,721,824,405,108,843,76,78,848,318,105,530,703,38,875,785,223,733,310,402,450,447,712,253,369,189,232,478,990,681,847,137,706,789,241,457,351,91,445,823,780,555,144,866,286,808,147,334,818,751,286,60,90,88,53,850,513,694,727,100,335,137,92,37,806,963,566,948,193,838,299,299,655,777,50,353,681,65,47,768,562,854,553,939,334,419,570,704,601,735,123,602,621,910,821,327,526,613,455,979,32,876,974,359,765,248,313,380,127,382,551,987,720,753,382,962,415,7,973,648,194,399,379,717,462,682,488,835,781,599,841,890,520,24,296,702,2,690,613,983,653,485,907,643,458,811,100,254,964,990,708,413,543,632,584,324,843,415,849,976,727,894,380,318,513,818,228,971,990,13,373,882,433,84,986,303,891,789,775,612,612,470,509,718,566,416,236,710,875,861,905,758,400,467,116,297,140,527,43,950,794,475,954,140,743,403,506,252,623,479,960,379,161,140,702,677,700,52,77,428,258,545,926,999,45,436,99,810,823,733,683,199,625,766,547,574,483,535,625,954,173,136,470,149,956,509,929,119,228,194,146,968,901,883,530,161,885,949,137,726,697,313,717,781,169,678,377,53,114,273,517,866,595,546,288,448,16,855,748,754,88,960,451,872,52,911,178,652,70,108,116,461,72,590,11,71,633,531,276,298,425,452,338,325,191,123,386,21,120,288,263,511,639,279,195,865,957,606,180,587,344,526,707,383,671,764,985,85,116,506,835,691,702,705,292,220,926,480,82,953,612,191,127,943,191,82,998,920,171,824,12,487,357,684,918,939,738,495,132,239,550,329,831,127,523,91,624,760,577,996,283,492,127,955,747,701,629,5,723,383,528,97,914,211,573,320,416,52,190,137,695,283,91,559,695,348,679,855,380,561,705,66,183,847,568,579,805,423,926,904,934,73,539,382,698,398,953,831,157,923,747,68,312,825,517,463,365,884,179,549,811,299,125,34,734,844,40,604,282,55,420,234,195,324,170,605,842,300,943,451,507,276,156,97,131,691,103,782,886,583,485,269,636,415,276,105,141,86,229,858,923,526,431,469,647,678,673,316,97,397,546,658,395,158,162,939,136,953,519,475,986,611,378,133,23,897,112,558,245,732,732,683,131,648,719,688,967,415,666,2,68,206,915,43,346,477,645,841,747,200,533,81,216,785,204,832,390,755,782,629,925,523,954,602,628,299,490,30,406,183,157,428,232,206,887,411,796,397,843,574,277,665,963,497,108,759,763,406,646,397,100,419,299,718,517,315,189,604,623,792,928,72,689,955,604,262,148,706,955,169,956,311,955,903,562,600,840,403,346,115,107,815,135,488,363,629,889,404,316,595,30,934,121,194,246,444,465,878,942,886,545,8,746,516,42,726,883,821,827,386,749,945,313,386,237,612,108,965,280,390,136,74,989,692,764,91,335,268,979,13,349,46,403,592,168,198,27,191,801,80,41,256,228,127,521,998,257,93,779,484,922,924,931,894,336,133,492,815,972,524,136,918,96,192,25,367,86,784,378,583,677,971,507,550,638,436,1000,684,31,565,627,915,517,221,930,523,900,472,776,892,779,576,490,27,87,517,301,570,747,481,596,360,276,884,891,784,951,250,99,711,538,560,951,578,725,686,765,543,224,399,458,558,593,447,367,56,778,264,644,725,961,598,829,45,433,286,747,343,94,486,462,135,877,469,822,137,843,501,18,939,182,618,486,442,444,907,549,455,216,461,684,29,440,365,506,481,301,855,225,195,112,894,398,909,878,226,480,514,742,722,344,113,401,941,297,349,32,558,397,989,961,478,56,302,350,53,658,529,444,888,40,468,104,895,629,365,611,56,639,716,181,988,91,742,712,596,588,339,795,406,127,558,181,701,24,861,338,509,680,203,730,444,331,913,770,902,720,186,812,226,350,760,343,995,330,367,734,963,758,858,591,847,68,780,812,255,695,268,955,919,347,60,86,566,156,134,59,738,491,804,367,88,780,364,306,967,772,43,130,957,565,57,485,418,169,861,599,28,109,440,194,833,799,129,945,443,147,21,368,641,798,32,9,638,366,694,836,1000,811,515,898,741,717,889,458,209,556,611,825,288,755,450,942,799,404,801,892,29,375,545,859,207,573,194,885,227,983,148,219,903,875,319,668,492,732,747,410,217,473,718,564,897,876,8,305,204,576,747,290,604,315,25,156,28,48,897,735,90,760,962,26,135,545,535,775,917,330,564,738,298,19,99,278,540,781,632,659,343,193,478,608,600,657,1000,816,412,802,931,655,896,157,865,218,87,683,271,144,964,695,907,460,865,901,759,657,887,486,564,545,188,258,827,403,173,750,55,859,857,511,758,300,832,975,37,258,332,74,179,26,117,852,624,250,229,54,139,963,453,728,440,247,442,901,253,592,301,557,367,558,732,151,975,279,815,520,424,810,215,396,362,259,786,356,777,57,407,76,330,751,178,440,802,329,851,112,788,938,697,399,249,478,258,474,978,699,576,616,932,576,682,361,502,357,894,957,803,529,521,443,208,87,441,247,531,990,148,123,527,798,207,227,43,46,850,935,393,271,633,897,955,781,584,463,309,36,864,960,152,754,998,679,356,785,46,228,55,692,460,733,492,378,592,135,925,797,748,593,932,393,353,223,947,396,953,685,186,748,383,824,262,76,758,730,725,950,462,464,286,513,765,343,723,873,671,934,86,325,335,73,754,726,863,179,880,916,339,256,541,200,837,932,624,639,88,36,209,841,736,662,849,586,738,516,776,743,831,757,480,818,382,993,290,163,464,602,907,414,348,501,665,928,225,124,257,922,839,305,890,568,870,106,898,454,169,559,790,236,646,347,41,949,333,887,211,984,349,26,622,900,156,461,226,617,333,976,32,342,442,995,99,726,951,114,329,67,602,358,306,844,124,465,383,548,265,213,106,720,917,526,759,316,619,18,83,461,649,579,75,493,568,604,482,796,431,503,67,169,312,509,772,591,509,372,635,620,359,253,137,535,732,919,746,186,95,441,28,309,112,924,260,389,1,414,130,640,162,177,106,867,302,879,7,553,790,762,796,977,647,111,342,866,944,657,974,434,894,641,382,982,891,407,779,838,138,659,432,706,725,969,361,631,256,33,226,678,840,820,582,847,816,658,611,190,84,627,420,239,870,121,1000,754,665,612,767,541,780,22,141,954,245,287,687,5,939,783,373,76,995,316,160,601,284,808,833,880,870,85,838,129,276,977,810,295,890,299,718,376,980,685,196,439,90,371,573,682,868,370,298,616,689,492,502,212,260,320,219,310,997,972,42,989,216,318,240,227,519,461,161,829,147,451,345,493,408,44,1,601,288,889,794,569,646,105,110,428,233,765,953,674,967,236,227,600,400,532,770,110,192,637,925,659,730,478,957,864,560,85,173,488,645,853,49,556,85,553,781,478,576,926,38,931,536,337,534,161,166,606,318,390,491,972,95,162,841,856,13,967,334,673,354,481,654,914,456,393,303,145,288,144,651,33,584,698,754,78,614,700,96,719,838,947,974,513,884,133,23,746,879,672,922,893,609,620,468,121,966,42,994,935,199,56,481,285,292,568,776,830,163,742,663,768,974,634,293,934,803,413,364,880,38,922,241,387,389,810,341,466,500,486,285,57,453,951,804,563,874,138,382,234,290,645,64,51,977,322,59,424,265,451,10,226,503,34,445,10,614,256,336,285,512,31,583,732,61,744,162,624,226,905,516,788,898,587,426,38,22,130,708,653,531,56,803,440,154,698,646,684,943,108,455,595,469,450,78,130,536,227,766,384,904,295,116,298,838,987,636,273,51,191,402,947,607,314,794,459,920,208,351,722,737,305,399,221,798,707,550,869,614,988,680,392,196,378,436,916,533,697,836,681,518,493,678,565,967,319,441,187,337,393,530,79,704,493,978,249,540,953,940,534,604,749,752,559,488,902,52,169,50,959,684,544,61,38,336,43,119,758,55,877,442,877,395,297,500,678,932,519,206,46,808,172,246,630,340,193,480,418,191,646,313,113,534,677,478,49,892,34,794,571,8,606,548,51,199,1000,154,615,235,772,897,377,106,704,128,635,692,17,964,915,555,799,326,939,846,249,329,606,259,996,616,137,165,420,882,9,364,848,209,447,746,697,699,690,861,870,244,851,942,779,538,516,448,224,98,480,869,430,90,933,308,417,515,807,585,625,632,620,50,173,417,689,67,862,833,322,722,719,701,190,400,201,9,358,126,910,652,335,867,182,602,214,670,931,581,520,970,121,139,472,107,416,631,914,118,547,297,263,405,192,674,817,46,774,828,370,644,985,755,960,226,514,110,766,296,670,762,179,662,862,390,416,616,405,731,822,924,606,102,609,586,281,226,812,780,318,363,797,970,338,940,732,188,439,512,409,104,671,548,324,816,273,269,120,642,394,318,962,425,811,647,370,960,361,702,475,516,690,74,597,943,174,200,802,813,919,323,567,195,873,891,316,657,203,718,250,204,239,924,216,253,921,393,863,37,233,870,264,770,674,581,579,984,938,20,245,831,364,292,972,294,236,761,66,486,694,863,489,601,305,981,894,798,718,518,62,451,766,457,348,244,678,479,551,141,808,894,89,994,550,398,24,762,262,344,463,323,951,158,789,310,599,968,883,163,614,271,637,403,35,389,437,449,187,671,596,428,449,546,450,755,966,141,788,866,53,388,241,195,367,279,279,878,292,731,31,996,284,31,46,547,80,510,763,962,887,298,195,186,58,25,185,568,34,199,861,188,602,820,63,106,967,365,887,66,388,61,168,400,356,255,101,918,93,443,29,448,796,601,545,905,6,355,762,247,870,180,17,20,656,50,964,196,583,647,516,862,964,560,590,124,119,429,330,138,341,844,61,935,781,158,205,603,775,201,629,493,715,168,881,413,986,902,56,503,304,505,984,156,262,100,72,879,679,401,415,715,102,240,116,287,737,225,160,902,572,52,240,731,812,938,884,167,997,365,218,675,193,531,690,298,270,85,787,949,767,8,214,564,937,548,220,781,45,280,988,261,533,455,460,159,9,191,45,529,901,416,152,408,907,624,432,932,324,9,791,872,729,929,743,690,412,270,356,545,201,130,863,908,103,65,622,468,907,802,942,540,589,625,457,32,229,818,299,99,943,20,293,147,764,291,438,588,107,521,953,235,200,130,607,114,126,732,573,472,586,562,8,533,354,413,865,112,895,678,195,763,489,163,878,83,486,19,171,970,596,948,705,166,751,780,202,289,553,995,116,838,517,585,930,117,896,546,886,1000,366,697,965,540,345,82,501,449,722,380,670,162,449,30,199,18,45,850,678,259,313,159,542,141,845,39,560,50,712,503,580,22,227,440,44,474,322,559,81,261,865,241,129,831,860,653,608,854,597,405,475,871,308,341,551,893,498,336,673,651,68,620,65,920,875,474,923,101,789,222,59,925,254,633,750,810,814,151,363,357,919,973,974,414,304,399,311,33,976,533,114,911,451,602,85,316,808,120,187,512,650,149,950,575,728,543,933,245,311,311,955,15,289,16,481,95,608,450,109,163,323,703,67,491,247,128,545,406,501,8,72,275,483,947,396,333,426,635,701,712,469,367,774,460,301,718,90,199,507,860,483,363,918,280,629,890,440,769,515,914,604,747,87,734,491,466,140,354,86,333,585,947,439,936,278,513,985,362,968,57,874,875,769,499,898,309,972,137,579,761,578,658,588,506,238,176,572,885,596,657,8,90,916,755,293,307,534,475,430,658,86,801,997,4,924,379,507,178,1000,571,737,357,347,75,513,193,214,274,307,152,59,591,426,905,96,473,168,425,130,84,502,950,226,566,74,938,204,217,461,594,954,705,282,478,324,364,576,819,915,420,984,545,41,860,630,297,43,298,513,492,16,165,151,291,408,815,903,155,686,222,258,576,986,762,560,932,997,326,575,266,378,987,365,137,849,549,868,983,95,983,374,893,633,462,643,207,940,827,91,394,242,886,633,540,471,884,716,387,208,199,846,343,877,85,90,474,164,320,699,594,275,40,708,446,821,259,522,845,651,301,621,200,541,153,474,244,80,812,212,924,341,185,22,680,766,529,206,192,330,913,848,23,10,309,518,740,257,777,534,917,823,172,901,197,681,688,923,824,609,446,734,84,268,352,739,631,228,183,997,562,756,349,791,633,939,275,889,706,385,560,588,745,401,149,800,768,761,756,808,138,707,350,944,192,697,990,435,419,240,387,455,812,778,479,429,445,51,730,307,238,153,331,838,178,454,658,829,645,332,855,684,44,554,383,430,574,243,305,994,778,513,392,209,720,232,68,613,674,716,663,859,548,993,40,575,245,443,822,883,695,39,69,976,215,51,515,722,67,214,131,729,909,419,593,266,515,434,347,123,699,525,192,753,701,865,266,107,289,851,351,82,17,601,754,398,365,940,343,870,488,32,19,458,745,807,919,130,582,478,53,796,990,211,102,388,371,21,606,998,1,37,689,276,673,642,889,689,811,399,691,219,780,294,737,225,286,331,249,439,425,955,718,685,712,529,885,700,514,11,904,555,380,495,932,439,957,698,504,784,600,340,360,653,660,676,437,836,404,871,399,23,283,563,609,595,928,72,710,950,870,684,421,175,180,367,761,585,842,563,371,240,265,447,558,514,97,433,32,908,900,736,423,826,605,952,882,862,388,898,742,810,957,971,606,28,376,677,606,746,719,877,25,168,262,828,187,688,922,202,302,213,835,536,129,720,556,412,723,964,143,635,156,677,444,437,460,878,6,892,729,144,883,873,319,689,170,396,725,313,439,20,303,934,895,351,734,164,38,421,789,668,775,688,433,964,786,473,573,320,954,155,661,47,239,261,665,701,220,263,29,466,84,949,482,244,45,510,943,624,410,932,783,480,511,354,885,425,357,243,160,496,419,35,631,304,703,479,349,49,619,720,607,509,896,561,741,801,662,264,410,511,461,182,323,501,571,810,171,916,57,87,459,840,199,591,189,229,787,674,468,774,274,811,536,553,475,66,940,243,58,136,789,511,18,589,416,598,522,360,241,377,322,721,971,868,912,715,460,138,413,7,56,132,877,14,548,376,839,275,15,985,729,235,540,312,36,886,796,474,470,755,965,417,505,481,425,837,829,557,615,68,213,732,52,436,249,881,334,769,514,743,304,775,858,775,802,168,551,745,214,803,418,790,588,801,190,667,653,639,577,989,220,566,869,788,348,960,257,513,138,394,426,487,691,720,767,851,353,474,230,822,348,612,938,883,50,97,809,772,243,135,861,568,257,876,400,285,1,621,472,555,821,807,924,299,385,534,107,119,9,785,55,549,595,639,557,210,198,553,346,723,269,551,659,217,760,329,160,164,53,351,476,533,935,344,655,159,254,722,341,953,74,731,823,759,224,323,319,935,798,703,793,256,49,142,914,779,72,345,815,746,756,799,992,18,155,384,182,54,399,977,726,282,664,315,889,672,887,62,863,79,560,626,679,391,272,261,854,707,376,24,369,161,275,575,93,195,539,820,187,782,86,378,423,807,862,215,609,23,935,236,924,60,493,481,162,907,411,739,463,910,95,748,686,675,635,721,225,319,856,465,503,726,924,166,931,312,57,389,572,332,402,378,576,990,698,37,656,765,370,32,840,909,20,816,99,692,543,358,741,512,362,237,912,545,907,2,504,541,821,852,623,21,544,299,522,992,100,586,253,308,779,174,530,113,433,418,244,141,660,935,851,446,660,503,184,890,238,453,629,942,221,311,776,575,192,863,131,361,716,436,208,525,695,680,77,23,331,858,380,507,428,418,576,622,494,678,960,85,820,106,315,228,653,280,315,900,807,752,68,464,335,102,914,148,299,776,936,707,233,633,510,918,226,205,673,501,667,152,86,635,801,632,623,817,170,781,553,539,30,153,77,83,252,170,867,67,721,716,634,271,516,214,360,165,712,856,384,902,276,697,635,342,406,12,264,973,936,267,102,300,392,519,468,331,171,282,788,980,62,381,55,298,693,31,502,373,618,977,473,715,346,885,399,156,877,802,558,567,297,322,846,918,187,186,46,542,818,966,42,836,604,550,367,610,493,714,986,306,208,147,489,151,253,302,230,782,164,134,668,826,851,299,70,307,11,167,873,333,193,981,135,779,801,795,478,9,88,17,755,58,609,117,526,558,254,958,22,536,785,596,767,640,108,389,558,184,314,870,54,368,512,905,89,503,282,734,518,362,24,288,444,445,845,133,477,920,147,552,530,214,92,116,259,295,348,913,812,132,6,289,629,831,272,995,979,271,197,964,68,665,633,943,17,785,529,710,788,725,164,617,589,50,924,923,739,581,885,641,360,386,245,287,653,586,405,260,898,3,533,902,661,48,890,844,837,170,828,530,586,812,587,641,51,215,220,733,386,334,656,779,287,410,680,413,990,606,233,905,21,391,743,394,834,843,938,815,771,18,702,668,94,653,550,928,788,795,234,85,341,651,623,106,821,325,890,547,710,617,303,513,413,569,736,373,794,237,418,825,498,803,608,735,237,119,977,154,429,744,625,53,413,91,926,200,296,8,975,453,28,271,486,305,146,149,663,368,783,139,538,268,343,533,152,987,968,225,278,671,892,694,553,978,544,49,413,3,668,745,250,115,707,154,961,536,279,510,363,5,408,918,18,146,331,625,685,803,487,576,21,455,605,698,823,668,183,223,830,752,930,-250,592,517,726,205,-478,199,388,-658,293,-400,-790,-53,-671,929,-657,-411,-365,69,45,-713,-878,-368,-230,-920,-257,-989,778,504,-999,863,-746,531,77,-308,724,389,260,-444,425,938,-91,517,-791,-955,332,-942,36,947,-417,26,-929,-899,373,-263,-865,-587,-979,-34,-535,427,-9,383,813,-456,-506,665,-838,951,-771,-110,-329,-358,-902,913,277,-867,-969,-506,639,-232] multipliers = [-525,571,-905,-670,-892,-87,-697,-566,-606,-375,-749,-294,-312,-765,-714,-833,496,-990,-731,-228,-178,-564,-566,-495,-328,-319,-180,-895,-461,-453,-16,-938,-627,-8,-95,144,-60,-794,-663,-723,-492,-427,-719,-497,-506,-823,-974,-529,-427,-640,-274,-675,-741,899,-349,-283,-584,-521,-634,-346,-690,-868,-603,-409,-479,-895,-783,-532,-748,-611,126,-523,-995,-109,-225,-845,-470,-884,-125,-201,-24,-450,-516,-654,-285,-309,-41,-895,-306,-337,-827,-288,-99,-551,-518,-895,965,-568,-254,-166,-363,-77,-173,520,-649,-428,-684,-358,750,-401,-58,-747,-638,-3,-222,-986,-992,-826,-690,-290,-86,300,-984,532,-564,-231,-677,-160,-912,-740,-447,-172,-164,-269,-150,-28,-193,-419,-803,-838,632,-461,-483,-82,-804,-205,-629,-163,-449,-330,-987,-760,-783,-739,-525,-965,-661,-19,-842,-324,-81,770,-111,-613,-244,-689,-193,-367,-939,-107,-936,-840,-112,-700,-330,-396,-138,-156,-362,310,-437,-848,-5,-624,631,-388,-192,-66,-704,-916,-796,542,-37,-858,-68,-961,-533,-157,-306,-768,-688,-888,-987,-437,-465,244,-542,-976,-173,-23,-945,-378,-456,-564,-764,544,747,-389,-167,-388,-934,-178,-466,-361,-169,-610,-95,-836,-611,-387,-472,-396,-629,-33,-799,-691,-853,-328,-234,-264,-978,-189,-308,-510,-665,-719,-246,-220,-418,-732,982,-521,-708,-790,-683,-793,-169,-335,-584,-429,-421,-355,-295,-150,-888,-394,-431,-149,-243,-394,-56,-774,-170,-906,-811,-712,-456,-541,-757,-373,-40,-278,-132,-79,-774,263,-612,-811,-366,-813,-576,-8,676,-43,-983,-376,-153,-48,-906,-182,-335,-285,-419,-909,-433,-223,-487,60,-766,-356,-701,-623,-672,-872,-320,-782,-5,-747,-415,-385,-835,-393,-693,-22,-91,-638,-786,-133,-14,-218,-713,-560,-725,-200,-890,766,-979,-369,-481,-924,-500,-295,-940,-658,-528,-684,490,-690,-881,-781,-410,-141,-365,-598,-840,-440,-460,-787,-450,-326,-92,-596,-141,-65,-930,-691,-547,-765,-76,-328,-751,-653,-783,-552,-470,-478,-232,-829,-477,462,-831,-713,-851,-228,-254,135,-528,-784,-292,-472,-26,-890,-252,-684,-580,-791,-273,-623,-53,-289,-52,-165,-261,-395,-939,-477,-455,-138,-473,-289,-139,-63,-685,-11,-294,-152,-182,-907,-218,-233,-631,-809,-292,-703,-78,-527,-92,-778,-223,-636,-22,-122,-419,-440,-518,-310,-34,-93,-166,-584,-312,-627,-711,326,-513,-818,-350,-897,-676,-503,-664,-447,-653,-105,502,-678,-734,-614,-334,-170,-152,-409,-707,-410,-295,-78,961,-800,-152,-342,-342,-30,487,-692,-426,947,-111,-454,-184,-168,-105,-460,-994,-565,-944,492,-602,-353,-112,-224,-368,-849,-468,-866,-908,-577,-211,-905,-177,-829,-693,-912,-924,-280,-172,-467,-794,-470,-953,-919,-904,-174,-868,-865,-463,-976,-939,-225,-592,-235,-172,-308,-115,-605,-930,-698,-460,-344,-810,-467,-80,-610,-521,-877,-9,-202,-951,-496,-521,-569,-447,-815,-987,-661,-727,739,-744,-672,-635,-431,-233,-57,-704,-277,-8,-794,-127,-744,-251,-771,-617,-412,-925,-311,-611,-169,-756,-219,-627,-175,-149,-765,-32,-553,-576,-484,-698,-599,-84,-677,-117,636,-253,-950,-208,-893,-622,-8,-477,-4,-981,-581,-406,-59,-89,167,-222,758,-100,536,-688,-952,-57,-797,-649,-983,-442,-828,-544,-842,-473,-133,-548,-514,-889,-430,-119,-835,-863,-231,-754,-533,-134,-832,-785,-537,-205,-870,-729,-641,-71,-915,-789,-340,-501,-641,-483,-525,-146,-100,-645,-543,-780,-466,-231,-964,-315,-311,881,-864,-501,-661,-156,-213,-872,-823,-999,-87,-687,-892,-925,-196,-438,-606,-178,-841,-660,-981,-579,-640,-203,-430,-532,-670,-713,-329,-631,-297,-522,-679,-45,-18,-36,-930,-359,-18,-335,-791,-242,-106,-674,-152,847,-167,-366,-973,-95,-658,-18,-989,-422,-832,-331,-853,-969,-673,-13,-802,-86,-147,-82,-253,522,-403,-463,-964,-57,-344,-434,-976,-385,597,-522,-954,-711,-620,-554,-542,-392,-511,-440,-290,-749,-243,186,-312,-704,-275,-317,-525,-57,-228,-395,177,-916,-390,-57,-811,-555,445,-499,-90,-787,-718,-596,-250,-882,-875,-19,-627,-6,-830,-724,-716,-841,-133,-122,-839,-815,-360,486,-181,-599,-264,-579,-506,-375,-2,-465,-186,-88,-334,-362,-612,-494,-79,-9,-824,-191,-910,-382,-453,-670,-750,-664,-127,-749,-734,-132,-698,699,-563,-985,-399,-961,-602,-733,-495,-305,-375,-790,-367,-136,-314,-979,-303,-32,-109,-920,-677] ans = maximumScore(nums, multipliers) expected = "Unknown" print(f"{'Correct' if ans == expected else f'Incorrect: ans = {ans}, expected = {expected}'}")
408.215686
15,353
0.699073
4,941
20,819
2.943534
0.211091
0.005294
0.007426
0.004125
0.02324
0.015402
0.015402
0.013339
0.013339
0.013339
0
0.676349
0.02272
20,819
50
15,354
416.38
0.038484
0.010615
0
0.230769
0
0.076923
0.012974
0
0
0
0
0
0
1
0.051282
false
0
0.025641
0
0.128205
0.076923
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
1
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
3538b3abe57630da9f9d1b056bf354c3392e9ba5
346
py
Python
pages/admin.py
connorpekovic/djangox
f3790abe3981a82ee6fd3ac134ce87338da4dd94
[ "MIT" ]
null
null
null
pages/admin.py
connorpekovic/djangox
f3790abe3981a82ee6fd3ac134ce87338da4dd94
[ "MIT" ]
5
2021-04-08T20:25:22.000Z
2021-10-03T21:19:50.000Z
pages/admin.py
connorpekovic/djangox
f3790abe3981a82ee6fd3ac134ce87338da4dd94
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Response # Description: Register your models here. If you want the model to appear in # the admin screens, you must include it here with these 2 lines of code. # # Improvements: Add inline detail. class ResponceAdmin(admin.ModelAdmin): pass admin.site.register(Response, ResponceAdmin)
28.833333
77
0.780347
50
346
5.4
0.76
0
0
0
0
0
0
0
0
0
0
0.003436
0.15896
346
12
78
28.833333
0.924399
0.520231
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.2
0.4
0
0.6
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
1
0
1
0
0
4
35425877797818acfc9446104f1f4fbff6407793
57
py
Python
gc-ai-notebook-tutorials/src/third_party/python-path-specification/setup.py
kalona/training-data-analyst
fd619ea2c63519463b759393e818078c5a60df15
[ "Apache-2.0" ]
11
2020-05-19T09:52:35.000Z
2022-02-25T10:39:56.000Z
gc-ai-notebook-tutorials/src/third_party/python-path-specification/setup.py
kalona/training-data-analyst
fd619ea2c63519463b759393e818078c5a60df15
[ "Apache-2.0" ]
null
null
null
gc-ai-notebook-tutorials/src/third_party/python-path-specification/setup.py
kalona/training-data-analyst
fd619ea2c63519463b759393e818078c5a60df15
[ "Apache-2.0" ]
1
2021-07-16T22:42:55.000Z
2021-07-16T22:42:55.000Z
# encoding: utf-8 from setuptools import setup setup()
9.5
28
0.736842
8
57
5.25
0.875
0
0
0
0
0
0
0
0
0
0
0.021277
0.175439
57
5
29
11.4
0.87234
0.263158
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
354457b01115de740c4d7d5bab8b6817fa17ec98
46
py
Python
src/heatspreader/shell/__init__.py
acticloud/heat-spreader
89d62f0ba4fe62309029258ff75a66ea6d803e39
[ "MIT" ]
null
null
null
src/heatspreader/shell/__init__.py
acticloud/heat-spreader
89d62f0ba4fe62309029258ff75a66ea6d803e39
[ "MIT" ]
null
null
null
src/heatspreader/shell/__init__.py
acticloud/heat-spreader
89d62f0ba4fe62309029258ff75a66ea6d803e39
[ "MIT" ]
null
null
null
from .shell import Shell __all__ = ["Shell"]
11.5
24
0.695652
6
46
4.666667
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.173913
46
3
25
15.333333
0.736842
0
0
0
0
0
0.108696
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
3548cd4ec5cc76217fad382dce629c54f556fef2
110
py
Python
aviation/__init__.py
xsvStudios/xH-Cogs
ff207561c73e12631028a967786a1c5e68258996
[ "MIT" ]
1
2020-07-26T18:28:11.000Z
2020-07-26T18:28:11.000Z
aviation/__init__.py
xsvStudios/xsvCogs
ff207561c73e12631028a967786a1c5e68258996
[ "MIT" ]
null
null
null
aviation/__init__.py
xsvStudios/xsvCogs
ff207561c73e12631028a967786a1c5e68258996
[ "MIT" ]
null
null
null
from .aviation import Aviation # Setup file to read in the cog def setup(bot): bot.add_cog(Aviation(bot))
22
31
0.736364
19
110
4.210526
0.684211
0
0
0
0
0
0
0
0
0
0
0
0.172727
110
5
32
22
0.879121
0.263636
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
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
1
0
0
1
0
0
0
0
4
104be773bfee5b3beaa21261e832886eab88ebd2
1,337
py
Python
src/jk_argparsing/textmodel/TBlock.py
jkpubsrc/python-module-jk-argsparsing
9ef4b907c67fd1df5bd8c378df46ba527ebc2a83
[ "Apache-2.0" ]
null
null
null
src/jk_argparsing/textmodel/TBlock.py
jkpubsrc/python-module-jk-argsparsing
9ef4b907c67fd1df5bd8c378df46ba527ebc2a83
[ "Apache-2.0" ]
null
null
null
src/jk_argparsing/textmodel/TBlock.py
jkpubsrc/python-module-jk-argsparsing
9ef4b907c67fd1df5bd8c378df46ba527ebc2a83
[ "Apache-2.0" ]
null
null
null
class TBlock(object): ################################################################################################################################ ## Constructor ################################################################################################################################ # # Constructor method. # def __init__(self, text:str): assert isinstance(text, str) self.__text = text # ################################################################################################################################ ## Public Properties ################################################################################################################################ @property def text(self) -> str: return self.__text # ################################################################################################################################ ## Helper Methods ################################################################################################################################ ################################################################################################################################ ## Public Methods ################################################################################################################################ #
27.285714
129
0.137622
32
1,337
5.5
0.5625
0.136364
0
0
0
0
0
0
0
0
0
0
0.070307
1,337
48
130
27.854167
0.141593
0.059088
0
0
0
0
0
0
0
0
0
0
0.142857
1
0.285714
false
0
0
0.142857
0.571429
0
0
0
0
null
0
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
1
0
0
0
1
1
0
0
4
529cc9eb78ab2fd12455f4d5aba851c68761912e
330
py
Python
rex/exploit/__init__.py
tiedaoxiaotubie/rex
049bbce3ab2717cbb4d2f0fc10fe8c0433b39c1d
[ "BSD-2-Clause" ]
1
2021-01-22T11:25:40.000Z
2021-01-22T11:25:40.000Z
rex/exploit/__init__.py
tiedaoxiaotubie/rex
049bbce3ab2717cbb4d2f0fc10fe8c0433b39c1d
[ "BSD-2-Clause" ]
null
null
null
rex/exploit/__init__.py
tiedaoxiaotubie/rex
049bbce3ab2717cbb4d2f0fc10fe8c0433b39c1d
[ "BSD-2-Clause" ]
1
2018-07-17T03:00:20.000Z
2018-07-17T03:00:20.000Z
from .exceptions import CannotExploit, CannotExplore, NoSuchShellcode from .shellcodes import Shellcodes from .shellcode_factory import ShellcodeFactory from .exploit import Exploit, ExploitException from .exploit_factory import ExploitFactory from .cgc_exploit_factory import CGCExploitFactory from .techniques import Techniques
41.25
69
0.875758
35
330
8.142857
0.457143
0.136842
0.140351
0
0
0
0
0
0
0
0
0
0.093939
330
7
70
47.142857
0.953177
0
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
52f803bd080fe46af55734b645fdc85f40d74ecf
322
py
Python
v3/Libraries/builtin/statement/pass.py
TheShellLand/python
a35e9b32bec3a3ff03d6f0f4c2c2cc891180e516
[ "MIT" ]
null
null
null
v3/Libraries/builtin/statement/pass.py
TheShellLand/python
a35e9b32bec3a3ff03d6f0f4c2c2cc891180e516
[ "MIT" ]
1
2021-06-01T22:50:19.000Z
2021-06-01T22:50:19.000Z
v3/Libraries/builtin/statement/pass.py
TheShellLand/python
a35e9b32bec3a3ff03d6f0f4c2c2cc891180e516
[ "MIT" ]
null
null
null
#!/usr/bin/python for letter in 'Python': if letter == 'h': pass print 'This is pass block' print 'Current Letter :', letter print "Good bye!" # Current Letter : P # Current Letter : y # Current Letter : t # This is pass block # Current Letter : h # Current Letter : o # Current Letter : n # Good bye!
17.888889
35
0.63354
47
322
4.340426
0.446809
0.446078
0.098039
0.147059
0
0
0
0
0
0
0
0
0.251553
322
18
36
17.888889
0.846473
0.493789
0
0
0
0
0.322581
0
0
0
0
0
0
0
null
null
0.333333
0
null
null
0.5
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
1
0
0
1
0
0
0
1
0
4
5e21483b927b28fbab71b745198ed9ca86059d00
21
py
Python
vttformatter/__init__.py
georgiewellock/VTT_formatter
9d97fb313c0c7977c224c65551d154d893fed2d8
[ "MIT" ]
2
2019-07-10T22:42:02.000Z
2021-03-18T02:09:51.000Z
vttformatter/__init__.py
georgiewellock/VTT_formatter
9d97fb313c0c7977c224c65551d154d893fed2d8
[ "MIT" ]
null
null
null
vttformatter/__init__.py
georgiewellock/VTT_formatter
9d97fb313c0c7977c224c65551d154d893fed2d8
[ "MIT" ]
null
null
null
__version__ = '2.11'
10.5
20
0.666667
3
21
3.333333
1
0
0
0
0
0
0
0
0
0
0
0.166667
0.142857
21
1
21
21
0.388889
0
0
0
0
0
0.190476
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
5e220f2439c5fd361155faa613d1d4b2969404cf
225
py
Python
clubbi_utils/publisher.py
dev-clubbi/clubbi_utils
3a3622374daf0927e6b8aedb58266e8792426880
[ "MIT" ]
null
null
null
clubbi_utils/publisher.py
dev-clubbi/clubbi_utils
3a3622374daf0927e6b8aedb58266e8792426880
[ "MIT" ]
34
2021-11-23T14:10:52.000Z
2022-03-30T22:46:24.000Z
clubbi_utils/publisher.py
dev-clubbi/clubbi_utils
3a3622374daf0927e6b8aedb58266e8792426880
[ "MIT" ]
null
null
null
from asyncio import Protocol from typing import Any, Optional, Dict class Publisher(Protocol): async def publish(self, message: Any, attributes: Optional[Dict[str, str]] = None) -> None: """Protocol function"""
28.125
95
0.706667
28
225
5.678571
0.678571
0.150943
0
0
0
0
0
0
0
0
0
0
0.177778
225
7
96
32.142857
0.859459
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
eaabd7127a0ffec1afb345fb1cf84a14696e0d35
93
py
Python
apps/documento/apps.py
diegocostacmp/gestao_rh
5fc6333aa1937ecbd05528ca01f4b9cb5f5eb895
[ "Linux-OpenIB" ]
null
null
null
apps/documento/apps.py
diegocostacmp/gestao_rh
5fc6333aa1937ecbd05528ca01f4b9cb5f5eb895
[ "Linux-OpenIB" ]
6
2020-02-08T21:28:12.000Z
2022-03-12T00:15:11.000Z
apps/documento/apps.py
diegocostacmp/gestao_rh
5fc6333aa1937ecbd05528ca01f4b9cb5f5eb895
[ "Linux-OpenIB" ]
null
null
null
from django.apps import AppConfig class DocumentoConfig(AppConfig): name = "documento"
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
eaaf9181ab5fdb6778c4f31963c93427b3e8ad32
350
py
Python
trident/loggers/__init__.py
cronin4392/trident
1c1eb01bcde861496ce83e265ff071fc9bcb9db2
[ "MIT" ]
68
2020-11-13T06:40:52.000Z
2022-03-28T12:40:59.000Z
trident/loggers/__init__.py
cronin4392/trident
1c1eb01bcde861496ce83e265ff071fc9bcb9db2
[ "MIT" ]
1
2021-08-15T17:06:35.000Z
2021-11-10T04:42:52.000Z
trident/loggers/__init__.py
cronin4392/trident
1c1eb01bcde861496ce83e265ff071fc9bcb9db2
[ "MIT" ]
11
2020-11-24T13:14:16.000Z
2021-12-26T07:41:29.000Z
"""trident models""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from trident.backend.common import get_backend if get_backend()=='pytorch': from . import pytorch_tensorboard as tensorboard elif get_backend()=='tensorflow': from . import tensorflow_tensorboard as tensorboard
31.818182
55
0.808571
43
350
6.139535
0.418605
0.113636
0.181818
0
0
0
0
0
0
0
0
0
0.122857
350
11
55
31.818182
0.859935
0.04
0
0
0
0
0.05136
0
0
0
0
0
0
1
0
true
0
0.75
0
0.75
0.125
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
eaf799c893aca0561a899b7414d4f9b46d90a877
274
py
Python
savu/plugins/savers/base_saver_tools.py
elainehoml/Savu
e4772704606f71d6803d832084e10faa585e7358
[ "Apache-2.0" ]
39
2015-03-30T14:03:42.000Z
2022-03-16T16:50:33.000Z
savu/plugins/savers/base_saver_tools.py
elainehoml/Savu
e4772704606f71d6803d832084e10faa585e7358
[ "Apache-2.0" ]
670
2015-02-11T11:08:09.000Z
2022-03-21T09:27:57.000Z
savu/plugins/savers/base_saver_tools.py
elainehoml/Savu
e4772704606f71d6803d832084e10faa585e7358
[ "Apache-2.0" ]
54
2015-02-13T14:09:52.000Z
2022-01-24T13:57:09.000Z
from savu.plugins.plugin_tools import PluginTools class BaseSaverTools(PluginTools): """A base plugin from which all data saver plugins should inherit. """ def define_parameters(self): """ out_datasets: visibility: hidden """
27.4
70
0.649635
29
274
6.034483
0.862069
0
0
0
0
0
0
0
0
0
0
0
0.266423
274
10
71
27.4
0.870647
0.383212
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
d83591fa2aa33aa06919cd0f444fbfb320df4f49
34
py
Python
src/Wython.example/expressions/example4.py
JRasmusBm/metaborg-python
ffc47439744be53c3a8f3bf7bbd55fbfc3f9f193
[ "Apache-2.0" ]
2
2020-09-18T13:10:29.000Z
2021-09-23T21:04:46.000Z
src/Wython.example/expressions/example4.py
MetaBorgCube/metaborg-python
f16cbfd7840e1c762b947eb743cfad1cdd60c237
[ "Apache-2.0" ]
3
2018-05-04T21:01:59.000Z
2018-06-15T20:39:06.000Z
src/Wython.example/expressions/example4.py
JRasmusBm/metaborg-python
ffc47439744be53c3a8f3bf7bbd55fbfc3f9f193
[ "Apache-2.0" ]
2
2018-05-04T13:51:53.000Z
2019-03-11T08:09:37.000Z
a = lambda x,y=1+1, z=13: print(x)
34
34
0.588235
10
34
2
0.8
0
0
0
0
0
0
0
0
0
0
0.137931
0.147059
34
1
34
34
0.551724
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
1
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
dc22ece2b9570973edfc3c4711b8e716b71b8e59
132
py
Python
rebrickable_latest_set_id.py
maczniak/brickstats
ac16a62242a374b15d46ccf4132db445dfa1fd76
[ "MIT" ]
1
2015-09-10T00:04:23.000Z
2015-09-10T00:04:23.000Z
rebrickable_latest_set_id.py
maczniak/brickstats
ac16a62242a374b15d46ccf4132db445dfa1fd76
[ "MIT" ]
null
null
null
rebrickable_latest_set_id.py
maczniak/brickstats
ac16a62242a374b15d46ccf4132db445dfa1fd76
[ "MIT" ]
null
null
null
rebrickable_latest_set_id = { 620: '620-3', 630: '630-3', 6200: '6200-2', 6202: '6202-2', 6862: '6862-2', 70012: '70012-2', }
14.666667
29
0.583333
22
132
3.363636
0.545455
0
0
0
0
0
0
0
0
0
0
0.472727
0.166667
132
8
30
16.5
0.2
0
0
0
0
0
0.265152
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
dc2be8649a2b4266ed87a484a715922e4a5e2bf2
22
py
Python
tarbell/__init__.py
write-this-way/flask-tarbell
0e23e8d90ba66fde1a961ea530c99d94357ff664
[ "BSD-3-Clause" ]
1
2016-03-12T21:16:46.000Z
2016-03-12T21:16:46.000Z
tarbell/__init__.py
write-this-way/flask-tarbell
0e23e8d90ba66fde1a961ea530c99d94357ff664
[ "BSD-3-Clause" ]
null
null
null
tarbell/__init__.py
write-this-way/flask-tarbell
0e23e8d90ba66fde1a961ea530c99d94357ff664
[ "BSD-3-Clause" ]
null
null
null
__VERSION__ = '0.9b4'
11
21
0.681818
3
22
3.666667
1
0
0
0
0
0
0
0
0
0
0
0.157895
0.136364
22
1
22
22
0.421053
0
0
0
0
0
0.227273
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
dc3bca935497cfe32c4a6635c3656fd20b0c7b9c
87
py
Python
rlbox/core/__init__.py
ocraft/rl-sandbox
fba6571545cf040829998ba4cd9009a15ac1bbdd
[ "MIT" ]
2
2019-03-23T17:52:39.000Z
2019-03-29T17:29:52.000Z
rlbox/core/__init__.py
ocraft/rl-sandbox
fba6571545cf040829998ba4cd9009a15ac1bbdd
[ "MIT" ]
null
null
null
rlbox/core/__init__.py
ocraft/rl-sandbox
fba6571545cf040829998ba4cd9009a15ac1bbdd
[ "MIT" ]
2
2020-05-19T21:32:52.000Z
2020-09-30T09:28:45.000Z
from .core import AgentProgram, Agent, Environment, Run from .space import Space, Spec
29
55
0.793103
12
87
5.75
0.75
0
0
0
0
0
0
0
0
0
0
0
0.137931
87
2
56
43.5
0.92
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
dc50b7c77720dd7fbd8d9a149c2c78f80b685849
36
py
Python
jetbrains-academy/Tic-Tac-Toe/Problems/Poster artist/task.py
robinpatra/ML-Study-3
6f401706a8da4cac5e63304ce09ff6ff62756d0b
[ "MIT" ]
null
null
null
jetbrains-academy/Tic-Tac-Toe/Problems/Poster artist/task.py
robinpatra/ML-Study-3
6f401706a8da4cac5e63304ce09ff6ff62756d0b
[ "MIT" ]
null
null
null
jetbrains-academy/Tic-Tac-Toe/Problems/Poster artist/task.py
robinpatra/ML-Study-3
6f401706a8da4cac5e63304ce09ff6ff62756d0b
[ "MIT" ]
null
null
null
word = input() print(word.upper())
9
19
0.638889
5
36
4.6
0.8
0
0
0
0
0
0
0
0
0
0
0
0.138889
36
3
20
12
0.741935
0
0
0
0
0
0
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
dc5bc4ecb5cb7599cee61d33ccd218509963a01a
169
py
Python
server/server/__init__.py
LezendarySandwich/Generic-CSP-Solver
1f0577a92e4ebaabe60f1c7dcac4904872e704f4
[ "MIT" ]
1
2021-03-06T11:11:59.000Z
2021-03-06T11:11:59.000Z
server/server/__init__.py
LezendarySandwich/Generic-CSP-Solver
1f0577a92e4ebaabe60f1c7dcac4904872e704f4
[ "MIT" ]
null
null
null
server/server/__init__.py
LezendarySandwich/Generic-CSP-Solver
1f0577a92e4ebaabe60f1c7dcac4904872e704f4
[ "MIT" ]
null
null
null
from flask import Flask def create_app(): app = Flask(__name__) from .api import api as api_blueprint app.register_blueprint(api_blueprint) return app
18.777778
41
0.727811
24
169
4.791667
0.5
0.208696
0
0
0
0
0
0
0
0
0
0
0.213018
169
8
42
21.125
0.864662
0
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
false
0
0.333333
0
0.666667
0.333333
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
dca14782d592df99844a7fbfa2c8ba6e8268e3c9
139
py
Python
GCP/sample-notebooks/CrossValScore/CrossValScore/trainer/model.py
SAP-samples/dwc-fedml
39ea8cefc31741c4ec37eb6c0d70dd48e7c034ba
[ "Apache-2.0" ]
2
2021-11-24T14:58:56.000Z
2022-01-12T07:32:29.000Z
GCP/sample-notebooks/CrossValScore/CrossValScore/trainer/model.py
SAP-samples/dwc-fedml
39ea8cefc31741c4ec37eb6c0d70dd48e7c034ba
[ "Apache-2.0" ]
null
null
null
GCP/sample-notebooks/CrossValScore/CrossValScore/trainer/model.py
SAP-samples/dwc-fedml
39ea8cefc31741c4ec37eb6c0d70dd48e7c034ba
[ "Apache-2.0" ]
2
2021-12-16T15:18:15.000Z
2022-01-12T07:32:41.000Z
from sklearn.linear_model import LogisticRegression def get_estimator(flags): clf = LogisticRegression(max_iter=1000) return clf
19.857143
51
0.791367
17
139
6.294118
0.882353
0
0
0
0
0
0
0
0
0
0
0.033898
0.151079
139
6
52
23.166667
0.872881
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.25
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
f4d1bf83aad9bde1e4313739a5920db0de00038b
52
py
Python
mudaemod_module/__init__.py
alentoghostflame/StupidAlentoBot
c024bfb79a9ecb0d9fda5ddc4e361a0cb878baba
[ "MIT" ]
1
2021-12-12T02:50:20.000Z
2021-12-12T02:50:20.000Z
mudaemod_module/__init__.py
alentoghostflame/StupidAlentoBot
c024bfb79a9ecb0d9fda5ddc4e361a0cb878baba
[ "MIT" ]
17
2020-02-07T23:40:36.000Z
2020-12-22T16:38:44.000Z
mudaemod_module/__init__.py
alentoghostflame/StupidAlentoBot
c024bfb79a9ecb0d9fda5ddc4e361a0cb878baba
[ "MIT" ]
null
null
null
from mudaemod_module.mudaemod import MudaeModModule
26
51
0.903846
6
52
7.666667
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.076923
52
1
52
52
0.958333
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
7625d7f650f5643c7d2dd0b07f1a6bb4fc6f314d
223
py
Python
optimade/server/models/util.py
dietherjohn20/optimade-python-tools
c0c2bbf5851b3c4033a536b978fe633bd84bdf95
[ "MIT" ]
null
null
null
optimade/server/models/util.py
dietherjohn20/optimade-python-tools
c0c2bbf5851b3c4033a536b978fe633bd84bdf95
[ "MIT" ]
null
null
null
optimade/server/models/util.py
dietherjohn20/optimade-python-tools
c0c2bbf5851b3c4033a536b978fe633bd84bdf95
[ "MIT" ]
null
null
null
from typing import cast, Any, Dict, Type from pydantic import ConstrainedInt, errors from pydantic.types import OptionalInt from pydantic.validators import list_validator class NonnegativeInt(ConstrainedInt): ge = 0
22.3
46
0.811659
28
223
6.428571
0.678571
0.2
0
0
0
0
0
0
0
0
0
0.005236
0.143498
223
9
47
24.777778
0.937173
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.666667
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