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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ab8b5a318fae6f88cbd625318b175b8291d4b261 | 247 | py | Python | 9.py | jaumefe/project_euler | 90beb919b2d9e62313636a2177b5f9bdeb2eac5b | [
"BSD-2-Clause"
] | null | null | null | 9.py | jaumefe/project_euler | 90beb919b2d9e62313636a2177b5f9bdeb2eac5b | [
"BSD-2-Clause"
] | null | null | null | 9.py | jaumefe/project_euler | 90beb919b2d9e62313636a2177b5f9bdeb2eac5b | [
"BSD-2-Clause"
] | null | null | null | #Problema 9
res = 0
for a in range(1, 500):
for b in range(1, 500):
for c in range(1, 500):
if (a < b < c) and (a ** 2 + b ** 2 == c ** 2):
if a + b + c == 1000:
res = a*b*c
print(res)
| 20.583333 | 59 | 0.384615 | 44 | 247 | 2.159091 | 0.386364 | 0.221053 | 0.252632 | 0.347368 | 0.294737 | 0 | 0 | 0 | 0 | 0 | 0 | 0.155556 | 0.453441 | 247 | 11 | 60 | 22.454545 | 0.548148 | 0.040486 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.125 | 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 | 0 | 0 | 3 |
abf4fe21de81053f7720faa2a5bc855ae83d176c | 1,799 | py | Python | PrettyBits/frequency_table.py | mmcgaley/CoreRopeMemory | 929888c3e3a55491e2b95708ecd17a16cfef97b4 | [
"MIT"
] | null | null | null | PrettyBits/frequency_table.py | mmcgaley/CoreRopeMemory | 929888c3e3a55491e2b95708ecd17a16cfef97b4 | [
"MIT"
] | 1 | 2015-08-10T09:36:21.000Z | 2015-08-10T09:55:10.000Z | PrettyBits/frequency_table.py | mmcgaley/CoreRopeMemory | 929888c3e3a55491e2b95708ecd17a16cfef97b4 | [
"MIT"
] | null | null | null | # English character frequency table including capitals and punctuation based on
# http://www.queensu.ca/psychology/hiplab/Publications/Recentpublications/Mewhort_RP_15.pdf
from operator import itemgetter
letterTable = [
("A" , 280937),
("a" , 5263779),
("B" , 169474),
("b" , 866156),
("C" , 229363),
("c" , 1960412),
("D" , 129632),
("d" , 2369820),
("E" , 138443),
("e" , 7741842),
("F" , 100751),
("f" , 1296925),
("G" , 93212),
("g" , 1206747),
("H" , 123632),
("h" , 2955858),
("I" , 223312),
("i" , 4527332),
("J" , 78706),
("j" , 65856),
("K" , 46580),
("k" , 460788),
("L" , 106984),
("l" , 2553152),
("M" , 259474),
("m" , 1467376),
("N" , 205409),
("n" , 4535545),
("O" , 105700),
("o" , 4729266),
("P" , 144239),
("p" , 1255579),
("Q" , 11659),
("q" , 54221),
("R" , 146448),
("r" , 4137949),
("S" , 304971),
("s" , 4186210),
("T" , 325462),
("t" , 5507692),
("U" , 57488),
("u" , 1613323),
("V" , 31053),
("v" , 653370),
("W" , 107195),
("w" , 1015656),
("X" , 7578),
("x" , 123577),
("Y" , 94297),
("y" , 1062040),
("Z" , 5610),
("z" , 66423) ]
letterTable.sort(key=itemgetter(1), reverse=True)
punctuationTable = [
("!" , 2178 ),
("\"" , 284671 ),
("#" , 10 ),
("$" , 51572 ),
("%" , 1993),
("&" , 6523),
("\'" , 204497),
("(" , 53398),
(")" , 53735),
("*" , 20716),
("+" , 309),
("," , 984969 ),
("-" , 252302),
("." , 946136 ),
("/" , 8161 ),
("0" , 546233 ),
("1" , 460946),
("2" , 333499),
("3" , 187606),
("4" , 192528),
("5" , 374413),
("6" , 153865),
("7" , 120094),
("8" , 182627),
("9" , 282364),
(":" , 54036),
(";" , 36727),
("<" , 82),
("=" , 22),
(">" , 83),
("?" , 12357),
("@" , 1),
]
punctuationTable.sort(key=itemgetter(1), reverse=True)
characterTable = letterTable + punctuationTable
characterList = [char[0] for char in characterTable]
print characterList
| 17.133333 | 91 | 0.510283 | 200 | 1,799 | 4.58 | 0.785 | 0.015284 | 0.037118 | 0.039301 | 0.063319 | 0.063319 | 0 | 0 | 0 | 0 | 0 | 0.32616 | 0.17343 | 1,799 | 104 | 92 | 17.298077 | 0.289845 | 0.092829 | 0 | 0 | 0 | 0 | 0.052179 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.010753 | null | null | 0.010753 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
abff287affdd3a44c02e5d0de38893986539ac11 | 7,247 | py | Python | src/memdll/winpe_shellcode.py | YuriSizuku/MemoryModule | 1719ff62def4bfbda5b7bf6d106b12b4d045f3a6 | [
"MIT"
] | 23 | 2022-03-28T15:45:24.000Z | 2022-03-31T09:55:20.000Z | src/memdll/winpe_shellcode.py | YuriSizuku/MemoryModule | 1719ff62def4bfbda5b7bf6d106b12b4d045f3a6 | [
"MIT"
] | null | null | null | src/memdll/winpe_shellcode.py | YuriSizuku/MemoryModule | 1719ff62def4bfbda5b7bf6d106b12b4d045f3a6 | [
"MIT"
] | 13 | 2022-03-29T12:02:22.000Z | 2022-03-31T07:26:10.000Z | import os
import sys
from keystone import *
sys.path.append("./../../util/script/")
import shellcode
def gen_oepinit_code32():
ks = Ks(KS_ARCH_X86, KS_MODE_32)
code_str = f"""
// for relative address, get the base of addr
push ebx;
call getip;
lea ebx, [eax-6];
// get the imagebase
mov eax, 0x30; // to avoid relative addressing
mov edi, dword ptr fs:[eax]; //peb
mov edi, [edi + 0ch]; //ldr
mov edi, [edi + 14h]; //InMemoryOrderLoadList, this
mov edi, [edi -8h + 18h]; //this.DllBase
// get loadlibrarya, getprocaddress
mov eax, [ebx + findloadlibrarya];
add eax, edi;
call eax;
mov [ebx + findloadlibrarya], eax;
mov eax, [ebx + findgetprocaddress];
add eax, edi;
call eax;
mov [ebx + findgetprocaddress], eax;
// reloc
mov eax, [ebx + dllrva];
add eax, edi;
push eax;
push eax;
mov eax, [ebx + memrelocrva];
add eax, edi;
call eax;
// bind iat
mov eax, [ebx + findgetprocaddress];
push eax; // arg3, getprocaddress
mov eax, [ebx + findloadlibrarya];
push eax; // arg2, loadlibraryas
mov eax, [ebx + dllrva];
add eax, edi;
push eax; // arg1, dllbase value
mov eax, [ebx + membindiatrva];
add eax, edi
call eax;
// bind tls
xor eax, eax;
inc eax;
push eax; // arg2, reason for tls
mov eax, [ebx + dllrva]
add eax, edi;
push eax; // arg1, dllbase
mov eax, [ebx + membindtlsrva];
add eax, edi;
call eax;
// call dll oep, for dll entry
xor eax, eax;
push eax; // lpvReserved
inc eax;
push eax; // fdwReason, DLL_PROCESS_ATTACH
mov eax, [ebx + dllrva];
add eax, edi;
push eax; // hinstDLL
mov eax, [ebx + dlloeprva];
add eax, edi;
call eax;
// jmp to origin oep
mov eax, [ebx + exeoeprva];
add eax, edi;
pop ebx;
jmp eax;
getip:
mov eax, [esp]
ret
exeoeprva: nop;nop;nop;nop;
dllrva: nop;nop;nop;nop;
dlloeprva: nop;nop;nop;nop;
memrelocrva: nop;nop;nop;nop;
membindiatrva: nop;nop;nop;nop;
membindtlsrva: nop;nop;nop;nop;
findloadlibrarya: nop;nop;nop;nop;
findgetprocaddress: nop;nop;nop;nop;
"""
# print("gen_oepinit_code32", code_str)
payload, _ = ks.asm(code_str)
# print("payload: ", [hex(x) for x in payload])
return payload
def gen_oepinit_code64():
ks = Ks(KS_ARCH_X86, KS_MODE_64)
code_str = f"""
// for relative address, get the base of addr
call getip;
lea rbx, [rax-5];
push rcx;
push rdx;
push r8;
push r9;
sub rsp, 0x28; // this is for memory 0x10 align
// get the imagebase
mov rax, 0x60; // to avoid relative addressing
mov rdi, qword ptr gs:[rax]; //peb
mov rdi, [rdi + 18h]; //ldr
mov rdi, [rdi + 20h]; //InMemoryOrderLoadList, this
mov rdi, [rdi -10h + 30h]; //this.DllBase
// get loadlibrarya, getprocaddress
mov rax, [rbx + findloadlibrarya];
add rax, rdi;
call rax;
mov [rbx + findloadlibrarya], rax;
mov rax, [rbx + findgetprocaddress];
add rax, rdi;
call rax;
mov [rbx + findgetprocaddress], rax;
// reloc
mov rcx, [rbx + dllrva];
add rcx, rdi;
mov rdx, rcx;
mov rax, [rbx + memrelocrva];
add rax, rdi;
call rax;
// bind iat
mov r8, [rbx + findgetprocaddress]; // arg3, getprocaddress
mov rdx, [rbx + findloadlibrarya]; // arg2, loadlibraryas
mov rcx, [rbx + dllrva];
add rcx, rdi; // arg1, dllbase value
mov rax, [rbx + membindiatrva];
add rax, rdi
call rax;
// bind tls
xor rdx, rdx;
inc rdx; // argc, reason for tls
mov rcx, [rbx + dllrva]
add rcx, rdi; // arg1, dllbase
mov rax, [rbx + membindtlsrva];
add rax, rdi;
call rax;
// call dll oep, for dll entry
xor r8, r8; // lpvReserved
xor rdx, rdx;
inc rdx; // fdwReason, DLL_PROCESS_ATTACH
mov rcx, [rbx + dllrva];
add rcx, rdi; // hinstDLL
mov rax, [rbx + dlloeprva];
add rax, rdi;
call rax;
// jmp to origin oep
add rsp, 0x28;
pop r9;
pop r8;
pop rdx;
pop rcx;
mov rax, [rbx+exeoeprva];
add rax, rdi;
jmp rax;
getip:
mov rax, [rsp]
ret
exeoeprva: nop;nop;nop;nop;nop;nop;nop;nop;
dllrva: nop;nop;nop;nop;nop;nop;nop;nop;
dlloeprva: nop;nop;nop;nop;nop;nop;nop;nop;
memrelocrva: nop;nop;nop;nop;nop;nop;nop;nop;
membindiatrva: nop;nop;nop;nop;nop;nop;nop;nop;
membindtlsrva: nop;nop;nop;nop;nop;nop;nop;nop;
findloadlibrarya: nop;nop;nop;nop;nop;nop;nop;nop;
findgetprocaddress: nop;nop;nop;nop;nop;nop;nop;nop;
"""
# print("gen_oepinit_code64", code_str)
payload, _ = ks.asm(code_str)
# print("payload: ", [hex(x) for x in payload])
return payload
def gen_oepinitstatic_code32():
ks = Ks(KS_ARCH_X86, KS_MODE_32)
code_str = f"""
push eax
push ebx
call getip;
lea ebx, [eax-7];
mov eax, [ebx + dllnameva];
push eax;
mov eax, [ebx + loadlibraryva]
call eax;
mov eax, [ebx + retva];
mov edi, eax;
pop ebx;
pop eax;
jmp edi;
getip:
mov eax, [esp]
ret
retva:nop;nop;nop;nop;
dllnameva:nop;nop;nop;nop;
loadlibraryva:nop;nop;nop;nop;
"""
payload, _ = ks.asm(code_str)
return payload
def gen_oepinitstatic_code64():
ks = Ks(KS_ARCH_X86, KS_MODE_64)
code_str = f"""
push rax;
push rbx;
push rcx;
push rdx;
call getip;
lea rbx, [rax-9];
sub rsp, 0x28;
mov rcx, [rbx + dllnameva];
mov rax, [rbx + loadlibraryva]
call rax;
add rsp, 0x28;
mov rax, [rbx + retva];
mov r15, rax;
pop rdx;
pop rcx;
pop rbx;
pop rax;
jmp r15;
getip:
mov rax, [rsp];
ret;
retva:nop;nop;nop;nop;nop;nop;nop;nop;
dllnameva:nop;nop;nop;nop;nop;nop;nop;nop;
loadlibraryva:nop;nop;nop;nop;nop;nop;nop;nop;
"""
payload, _ = ks.asm(code_str)
return payload
def make_winpe_shellcode(libwinpepath, postfix):
codes = dict()
libwinpe = shellcode.extract_coff(libwinpepath)
# for static inject dll into exe oepinit code
codes[f'g_oepinit_code{postfix}'] = eval(f'gen_oepinit_code{postfix}()')
# for dynamic inject dll into exe oepint code
codes[f'g_oepinitstatic_code{postfix}'] = eval(f'gen_oepinitstatic_code{postfix}()')
for name, code in libwinpe.items():
newname = f"g_{name.replace('winpe_', '').lower()}_code{postfix}"
codes[newname] = code
return codes
def debug():
gen_oepinitstatic_code64()
codes = shellcode.extract_coff("./bin/winpe_shellcode32.obj")
pass
def main():
codes = dict()
codes.update(make_winpe_shellcode(sys.argv[1], '32'))
codes.update(make_winpe_shellcode(sys.argv[2], '64'))
shellcode.write_shellcode_header(codes, outpath=sys.argv[3])
if __name__ == '__main__':
# debug()
main()
pass | 25.790036 | 89 | 0.580516 | 974 | 7,247 | 4.23922 | 0.172485 | 0.159845 | 0.191814 | 0.191814 | 0.544442 | 0.434972 | 0.385081 | 0.303706 | 0.294987 | 0.129329 | 0 | 0.019182 | 0.295019 | 7,247 | 281 | 90 | 25.790036 | 0.789 | 0.036429 | 0 | 0.469136 | 0 | 0 | 0.803465 | 0.104241 | 0 | 0 | 0.004182 | 0 | 0 | 1 | 0.028807 | false | 0.00823 | 0.016461 | 0 | 0.065844 | 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 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
2802ded59550fc796618c529ccd028a724fba65e | 723 | py | Python | mlprodict/onnxrt/ops_cpu/op_erf.py | sdpython/mlprodic | 9367dacc91d35ec670c8a8a76708300a75bbc993 | [
"MIT"
] | 32 | 2018-03-04T23:33:30.000Z | 2022-03-10T19:15:06.000Z | mlprodict/onnxrt/ops_cpu/op_erf.py | sdpython/mlprodic | 9367dacc91d35ec670c8a8a76708300a75bbc993 | [
"MIT"
] | 184 | 2017-11-30T14:10:35.000Z | 2022-02-21T08:29:31.000Z | mlprodict/onnxrt/ops_cpu/op_erf.py | sdpython/mlprodic | 9367dacc91d35ec670c8a8a76708300a75bbc993 | [
"MIT"
] | 9 | 2019-07-24T13:18:00.000Z | 2022-03-07T04:08:07.000Z | # -*- encoding: utf-8 -*-
# pylint: disable=E0203,E1101,C0111
"""
@file
@brief Runtime operator.
"""
from scipy.special import erf # pylint: disable=E0611
from ._op import OpRunUnaryNum
class Erf(OpRunUnaryNum):
def __init__(self, onnx_node, desc=None, **options):
OpRunUnaryNum.__init__(self, onnx_node, desc=desc,
**options)
def _run(self, x): # pylint: disable=W0221
if self.inplaces.get(0, False):
return self._run_inplace(x)
return (erf(x), )
def _run_inplace(self, x):
return (erf(x, out=x), )
def to_python(self, inputs):
return ('from scipy.special import erf',
"return erf(%s)" % inputs[0])
| 25.821429 | 58 | 0.59751 | 90 | 723 | 4.611111 | 0.488889 | 0.093976 | 0.077108 | 0.106024 | 0.216867 | 0 | 0 | 0 | 0 | 0 | 0 | 0.043315 | 0.26556 | 723 | 27 | 59 | 26.777778 | 0.73823 | 0.183956 | 0 | 0 | 0 | 0 | 0.074266 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.266667 | false | 0 | 0.2 | 0.133333 | 0.8 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
f9f9fe56d7ce3d50cc89b17101c20c1de49f75c4 | 53 | py | Python | quart_trio/__init__.py | ssfdust/quart-trio | cfeb81b0976276f0fcc9968db37f6fece049b555 | [
"MIT"
] | 1 | 2020-03-25T23:44:39.000Z | 2020-03-25T23:44:39.000Z | quart_trio/__init__.py | ssfdust/quart-trio | cfeb81b0976276f0fcc9968db37f6fece049b555 | [
"MIT"
] | null | null | null | quart_trio/__init__.py | ssfdust/quart-trio | cfeb81b0976276f0fcc9968db37f6fece049b555 | [
"MIT"
] | null | null | null | from .app import QuartTrio
__all__ = ("QuartTrio",)
| 13.25 | 26 | 0.716981 | 6 | 53 | 5.666667 | 0.833333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.150943 | 53 | 3 | 27 | 17.666667 | 0.755556 | 0 | 0 | 0 | 0 | 0 | 0.169811 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 | 3 |
e609bacc74b2644d57a3c57ba5c45ea1cbf71b59 | 353 | py | Python | bobstack/siptransport/connectedSIPMessage.py | bobjects/BobStack | c177b286075044832f44baf9ace201780c8b4320 | [
"Apache-2.0"
] | null | null | null | bobstack/siptransport/connectedSIPMessage.py | bobjects/BobStack | c177b286075044832f44baf9ace201780c8b4320 | [
"Apache-2.0"
] | null | null | null | bobstack/siptransport/connectedSIPMessage.py | bobjects/BobStack | c177b286075044832f44baf9ace201780c8b4320 | [
"Apache-2.0"
] | null | null | null |
class ConnectedSIPMessage(object):
def __init__(self, a_sip_transport_connection, a_sip_message):
self.connection = a_sip_transport_connection
self.sip_message = a_sip_message
@property
def raw_string(self):
if self.sip_message:
return self.sip_message.raw_string
else:
return None
| 25.214286 | 66 | 0.677054 | 43 | 353 | 5.116279 | 0.418605 | 0.227273 | 0.190909 | 0.209091 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.263456 | 353 | 13 | 67 | 27.153846 | 0.846154 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0 | 0 | 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 | 0 | 0 | 0 | 0 | 0 | 3 |
e61b7ebbb8ed8b018643dcb928d79e27b2cf8c93 | 2,362 | py | Python | dynaconf/vendor/ruamel/yaml/scalarint.py | RonnyPfannschmidt/dynaconf | 3223f6586aa6ae3ef7b5cd7d198fb950f5038526 | [
"MIT"
] | 2,293 | 2015-08-14T22:39:31.000Z | 2022-03-31T12:44:49.000Z | dynaconf/vendor/ruamel/yaml/scalarint.py | RonnyPfannschmidt/dynaconf | 3223f6586aa6ae3ef7b5cd7d198fb950f5038526 | [
"MIT"
] | 676 | 2015-08-20T19:29:56.000Z | 2022-03-31T13:45:51.000Z | dynaconf/vendor/ruamel/yaml/scalarint.py | RonnyPfannschmidt/dynaconf | 3223f6586aa6ae3ef7b5cd7d198fb950f5038526 | [
"MIT"
] | 255 | 2015-12-02T21:16:33.000Z | 2022-03-20T22:03:46.000Z | from __future__ import print_function,absolute_import,division,unicode_literals
_B=False
_A=None
from .compat import no_limit_int
from .anchor import Anchor
if _B:from typing import Text,Any,Dict,List
__all__=['ScalarInt','BinaryInt','OctalInt','HexInt','HexCapsInt','DecimalInt']
class ScalarInt(no_limit_int):
def __new__(D,*E,**A):
F=A.pop('width',_A);G=A.pop('underscore',_A);C=A.pop('anchor',_A);B=no_limit_int.__new__(D,*E,**A);B._width=F;B._underscore=G
if C is not _A:B.yaml_set_anchor(C,always_dump=True)
return B
def __iadd__(A,a):B=type(A)(A+a);B._width=A._width;B._underscore=A._underscore[:]if A._underscore is not _A else _A;return B
def __ifloordiv__(A,a):B=type(A)(A//a);B._width=A._width;B._underscore=A._underscore[:]if A._underscore is not _A else _A;return B
def __imul__(A,a):B=type(A)(A*a);B._width=A._width;B._underscore=A._underscore[:]if A._underscore is not _A else _A;return B
def __ipow__(A,a):B=type(A)(A**a);B._width=A._width;B._underscore=A._underscore[:]if A._underscore is not _A else _A;return B
def __isub__(A,a):B=type(A)(A-a);B._width=A._width;B._underscore=A._underscore[:]if A._underscore is not _A else _A;return B
@property
def anchor(self):
A=self
if not hasattr(A,Anchor.attrib):setattr(A,Anchor.attrib,Anchor())
return getattr(A,Anchor.attrib)
def yaml_anchor(A,any=_B):
if not hasattr(A,Anchor.attrib):return _A
if any or A.anchor.always_dump:return A.anchor
return _A
def yaml_set_anchor(A,value,always_dump=_B):A.anchor.value=value;A.anchor.always_dump=always_dump
class BinaryInt(ScalarInt):
def __new__(A,value,width=_A,underscore=_A,anchor=_A):return ScalarInt.__new__(A,value,width=width,underscore=underscore,anchor=anchor)
class OctalInt(ScalarInt):
def __new__(A,value,width=_A,underscore=_A,anchor=_A):return ScalarInt.__new__(A,value,width=width,underscore=underscore,anchor=anchor)
class HexInt(ScalarInt):
def __new__(A,value,width=_A,underscore=_A,anchor=_A):return ScalarInt.__new__(A,value,width=width,underscore=underscore,anchor=anchor)
class HexCapsInt(ScalarInt):
def __new__(A,value,width=_A,underscore=_A,anchor=_A):return ScalarInt.__new__(A,value,width=width,underscore=underscore,anchor=anchor)
class DecimalInt(ScalarInt):
def __new__(A,value,width=_A,underscore=_A,anchor=_A):return ScalarInt.__new__(A,value,width=width,underscore=underscore,anchor=anchor) | 63.837838 | 136 | 0.777731 | 416 | 2,362 | 4.036058 | 0.15625 | 0.017868 | 0.017868 | 0.083383 | 0.60274 | 0.60274 | 0.57296 | 0.57296 | 0.57296 | 0.57296 | 0 | 0 | 0.066892 | 2,362 | 37 | 137 | 63.837838 | 0.761797 | 0 | 0 | 0.135135 | 0 | 0 | 0.030893 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.378378 | false | 0 | 0.108108 | 0.135135 | 0.72973 | 0.027027 | 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 | 0 | 1 | 1 | 0 | 0 | 3 |
e626510fbf2105f23bbaf85b12dd29e819480701 | 634 | py | Python | api/techietalk/forum/models.py | pujamxpanxion/techietalk | 9c78a9d949863fbcef368207d1988bff6719e4bc | [
"MIT"
] | null | null | null | api/techietalk/forum/models.py | pujamxpanxion/techietalk | 9c78a9d949863fbcef368207d1988bff6719e4bc | [
"MIT"
] | null | null | null | api/techietalk/forum/models.py | pujamxpanxion/techietalk | 9c78a9d949863fbcef368207d1988bff6719e4bc | [
"MIT"
] | null | null | null | from django.db import models
class Category(models.Model):
name = models.CharField(max_length=255)
description = models.CharField(max_length=255, null=True, default='')
class Meta:
verbose_name = "Category"
verbose_name_plural = "Categories"
def __str__(self):
return self.name
class Forum(models.Model):
problem = models.CharField(max_length=255)
statement = models.CharField(max_length=20000)
category = models.ManyToManyField(Category)
class Meta:
verbose_name = "Forum"
verbose_name_plural = "Forums"
def __str__(self):
return self.problem | 25.36 | 73 | 0.684543 | 74 | 634 | 5.621622 | 0.418919 | 0.144231 | 0.173077 | 0.230769 | 0.290865 | 0 | 0 | 0 | 0 | 0 | 0 | 0.028283 | 0.219243 | 634 | 25 | 74 | 25.36 | 0.812121 | 0 | 0 | 0.222222 | 0 | 0 | 0.045669 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.111111 | false | 0 | 0.055556 | 0.111111 | 0.777778 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
e62cc3fc28586a50bc40d9fd0b81c6a10a6888ea | 327 | py | Python | orangecontrib/spectrocrunch/tests/test_example.py | woutdenolf/orange-spectrocrunch | f5cfa783ea7917797581bb7a38d5a12ed6181564 | [
"MIT"
] | null | null | null | orangecontrib/spectrocrunch/tests/test_example.py | woutdenolf/orange-spectrocrunch | f5cfa783ea7917797581bb7a38d5a12ed6181564 | [
"MIT"
] | null | null | null | orangecontrib/spectrocrunch/tests/test_example.py | woutdenolf/orange-spectrocrunch | f5cfa783ea7917797581bb7a38d5a12ed6181564 | [
"MIT"
] | null | null | null | import unittest
from Orange.widgets.tests.base import WidgetTest
from orangecontrib.spectrocrunch.widgets.example import Widget as ExampleWidget
class TestExampleWidget(WidgetTest):
def setUp(self):
self.widget = self.create_widget(ExampleWidget)
def test_addition(self):
self.assertEqual(1 + 1, 2)
| 25.153846 | 79 | 0.761468 | 39 | 327 | 6.333333 | 0.641026 | 0.064777 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.010949 | 0.16208 | 327 | 12 | 80 | 27.25 | 0.890511 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.125 | 1 | 0.25 | false | 0 | 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 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
e65cafaa3c8c08643e67b3e37a6a2171127810dc | 12,899 | py | Python | blog/blog_controller.py | ChaseLyall/udacity-blog-project | d45c45c6af194c2d4c5244823e38d9ec78514760 | [
"Unlicense"
] | null | null | null | blog/blog_controller.py | ChaseLyall/udacity-blog-project | d45c45c6af194c2d4c5244823e38d9ec78514760 | [
"Unlicense"
] | null | null | null | blog/blog_controller.py | ChaseLyall/udacity-blog-project | d45c45c6af194c2d4c5244823e38d9ec78514760 | [
"Unlicense"
] | null | null | null | """Blog Controller
Controls backend functionality of the blog, including:
* create/edit/delete blog posts
* create/edit/delete blog post comments
* like and unlike blog posts
"""
from google.appengine.ext import db
from handler import Handler
from blog_model import *
class BlogHandler(Handler):
"""Generic web handler for the blog"""
def render_post(self):
"""Render a blog post in HTML"""
self._render_text = self.content.replace('\n', '<br>')
return render_str("blog-post.html", p=self)
class BlogFront(BlogHandler):
"""Web hanlder for blog front page"""
def get(self):
"""Get blog front page"""
posts = Post.all().order('-created')
out_posts = []
for post in posts:
likes = Liked.all().filter(' post_id =', str(post.key().id()))
out_post = post
out_post.liked = False
out_post.like_cnt = 0
for like in likes:
out_post.like_cnt += 1
if self.user and like.author == self.user.name:
out_post.liked = True
out_posts.append(out_post)
self.render("blog-front.html", posts=out_posts)
class PostPage(BlogHandler):
"""Web hanlder for individual blog post"""
def get(self, post_id):
"""Get a single blog post"""
key = db.Key.from_path('Post', int(post_id), parent=blog_key())
post = db.get(key)
if not post:
self.render("404.html")
return
comments = Comment.all().filter(' post_id =', post_id).order('created')
likes = Liked.all().filter(' post_id =', post_id)
post.liked = False
post.like_cnt = 0
for like in likes:
post.like_cnt += 1
if self.user and like.author == self.user.name:
post.liked = True
self.render("blog-permalink.html", post=post, comments=comments)
class NewPost(BlogHandler):
"""Web hanlder for creating a new blog post"""
def get(self):
"""Get a web page to create a new blog post"""
if not self.user:
self.redirect('/login')
return
self.render("blog-newpost.html")
def post(self):
"""Post (i.e. publish) a new blog post"""
if not self.user:
self.redirect('/login')
return
subject = self.request.get('subject')
content = self.request.get('content')
if subject and content:
post = Post(parent=blog_key(), author=self.user.name,
subject=subject, content=content)
post.put()
self.redirect('/blog/%s' % str(post.key().id()))
else:
error = "subject and content, please!"
self.render("blog-newpost.html", subject=subject, content=content, error=error)
class EditPost(BlogHandler):
"""Web handler for editing an existing blog post"""
def get(self, post_id):
"""Get a web page for editing an existing blog post"""
if not self.user:
self.redirect('/login')
return
key = db.Key.from_path('Post', int(post_id), parent=blog_key())
post = db.get(key)
if not post:
self.render("404.html")
return
if not self.user.name == post.author:
self.redirect("/blog/%s" % str(post_id))
return
self.render("blog-editpost.html", subject=post.subject, content=post.content, post=post)
def post(self, post_id):
"""Post (i.e. publish) a new edit to an existing blog post"""
if not self.user:
self.redirect('/login')
return
key = db.Key.from_path('Post', int(post_id), parent=blog_key())
post = db.get(key)
if not post:
self.render("404.html")
return
if not self.user.name == post.author:
self.redirect("/blog/%s" % str(post_id))
return
subject = self.request.get('subject')
content = self.request.get('content')
if subject and content:
post.subject = subject
post.content = content
post.put()
self.redirect('/blog/%s' % str(post.key().id()))
else:
error = "subject and content, please!"
self.render("blog-editpost.html", subject=subject, content=content,
error=error, post=post)
class DeletePost(BlogHandler):
"""Web handler for deleting an existing blog post"""
def get(self, post_id):
"""Get the webpage in order to delete the blog post"""
if not self.user:
self.redirect('/login')
return
key = db.Key.from_path('Post', int(post_id), parent=blog_key())
post = db.get(key)
if not post:
self.render("404.html")
return
if not self.user.name == post.author:
self.redirect("/blog/%s" % str(post_id))
return
self.render("blog-deletepost.html", subject=post.subject)
def post(self, post_id):
"""Post (i.e. publish) your delete of the blog post"""
if not self.user:
self.redirect('/login')
return
key = db.Key.from_path('Post', int(post_id), parent=blog_key())
post = db.get(key)
if not post:
self.render("404.html")
return
if not self.user.name == post.author:
self.redirect("/blog/%s" % str(post_id))
return
comments = Comment.all().filter(' post_id =', post_id)
likes = Liked.all().filter(' post_id =', post_id)
subject = self.request.get('subject')
if subject and subject == post.subject:
post.delete()
for comment in comments:
comment.delete()
for like in likes:
like.delete()
self.redirect("/blog")
elif subject and subject != post.subject:
error = "Entered subject does not match the post's subject."
self.render("blog-deletepost.html", subject=post.subject,
error=error)
else:
error = "Please enter the post's subject to delete this post."
self.render("blog-deletepost.html", subject=post.subject,
error=error)
class Like(BlogHandler):
"""Web hanlder for liking a blog post"""
def get(self, post_id):
"""Like a blog post"""
if not self.user:
self.redirect("/login")
return
key = db.Key.from_path('Post', int(post_id), parent=blog_key())
post = db.get(key)
liked = Liked.all().filter(' post_id =', str(post_id))
liked = liked.filter(' author =', self.user.name).get()
if not liked and post.author != self.user.name:
liked = Liked(parent=blog_key(), post_id=str(post_id),
author=self.user.name)
liked.put()
self.redirect("/blog/%s" % str(post_id))
class UnLike(BlogHandler):
"""Web handler for unliking a blog post you previously liked"""
def get(self, post_id):
"""Unlike a blog post"""
if not self.user:
self.redirect("/login")
return
liked = Liked.all().filter(' post_id =', str(post_id))
liked = liked.filter(' author =', self.user.name).get()
if liked:
liked.delete()
self.redirect("/blog/%s" % str(post_id))
class NewComment(BlogHandler):
"""Web hanlder for creating a new comment on an existing blog post"""
def get(self, post_id):
"""Get a webpage for writing a comment under a blog post"""
if not self.user:
self.redirect('/login')
return
post_key = db.Key.from_path('Post', int(post_id), parent=blog_key())
post = db.get(post_key)
if not post:
self.render("404.html")
return
self.render("blog-newcomment.html", post=post)
def post(self, post_id):
"""Post (i.e. publish) a new comment"""
if not self.user:
self.redirect('/login')
return
post_key = db.Key.from_path('Post', int(post_id), parent=blog_key())
post = db.get(post_key)
if not post:
self.render("404.html")
return
content = self.request.get('content')
if content:
comment = Comment(parent=blog_key(), post_id=post_id,
author=self.user.name, content=content)
comment.put()
self.redirect('/blog/%s' % post_id)
else:
error = "Comment cannot be empty"
self.render("blog-newcomment.html", content=content, post=post,
error=error)
class EditComment(BlogHandler):
"""Web handler for editing an existing comment"""
def get(self, comment_id):
"""Get a web page for editing an existing comment"""
if not self.user:
self.redirect('/login')
return
key = db.Key.from_path('Comment', int(comment_id), parent=blog_key())
comment = db.get(key)
if not comment:
self.render("404.html")
return
if not self.user.name == comment.author:
self.redirect("/blog/%s" % str(comment.post_id))
return
post_key = db.Key.from_path('Post', int(comment.post_id),
parent=blog_key())
post = db.get(post_key)
self.render("blog-editcomment.html", content=comment.content,
post=post)
def post(self, comment_id):
"""Post (i.e. publish) an edit to an existing comment"""
if not self.user:
self.redirect('/login')
return
key = db.Key.from_path('Comment', int(comment_id), parent=blog_key())
comment = db.get(key)
if not comment:
self.render("404.html")
return
if not self.user.name == comment.author:
self.redirect("/blog/%s" % str(comment.post_id))
return
post_key = db.Key.from_path('Post', int(comment.post_id),
parent=blog_key())
post = db.get(post_key)
content = self.request.get('content')
if content:
comment.content = content
comment.put()
self.redirect('/blog/%s' % comment.post_id)
else:
error = "Comment cannot be empty"
self.render("blog-editcomment.html", content=content, post=post,
error=error)
class DeleteComment(BlogHandler):
"""Web hanlder for deleting an existing blog post comment"""
def get(self, comment_id):
"""Get a webpage for deleting an existing blog post comment"""
if not self.user:
self.redirect('/login')
return
key = db.Key.from_path('Comment', int(comment_id), parent=blog_key())
comment = db.get(key)
if not comment:
self.render("404.html")
return
if not self.user.name == comment.author:
self.redirect("/blog/%s" % str(comment.post_id))
return
post_key = db.Key.from_path('Post', int(comment.post_id),
parent=blog_key())
post = db.get(post_key)
self.render("blog-deletecomment.html", content=comment.content,
post=post)
def post(self, comment_id):
"""Post (i.e. publish) the deletion of an existng blog post comment"""
if not self.user:
self.redirect('/login')
return
key = db.Key.from_path('Comment', int(comment_id), parent=blog_key())
comment = db.get(key)
if not comment:
self.render("404.html")
return
if not self.user.name == comment.author:
self.redirect("/blog/%s" % str(comment.post_id))
return
post_key = db.Key.from_path('Post', int(comment.post_id),
parent=blog_key())
post = db.get(post_key)
content = self.request.get('content')
if content and content == comment.content:
comment.delete()
self.redirect("/blog/%s" % str(comment.post_id))
elif content and content != comment.content:
error = "Entered content does not match the comment's content."
self.render("blog-deletecomment.html", content=comment.content,
post=post, error=error)
else:
error = "Please enter the comment's content above to delete this comment."
self.render("blog-deletecomment.html", content=comment.content,
post=post, error=error)
| 32.573232 | 96 | 0.552213 | 1,595 | 12,899 | 4.388088 | 0.077743 | 0.043721 | 0.02829 | 0.040863 | 0.783541 | 0.736534 | 0.715817 | 0.661809 | 0.588941 | 0.563652 | 0 | 0.004236 | 0.322893 | 12,899 | 395 | 97 | 32.655696 | 0.797115 | 0.105279 | 0 | 0.739286 | 0 | 0 | 0.104275 | 0.009743 | 0 | 0 | 0 | 0 | 0 | 1 | 0.060714 | false | 0 | 0.010714 | 0 | 0.232143 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
050f4bcf851939e13db7ce2c44ff7364946fdca9 | 719 | py | Python | tests/gateway/test_adapter.py | xlam/autovirt | a19f9237c8b1123ce4f4b8b396dc88122019d4f8 | [
"MIT"
] | null | null | null | tests/gateway/test_adapter.py | xlam/autovirt | a19f9237c8b1123ce4f4b8b396dc88122019d4f8 | [
"MIT"
] | null | null | null | tests/gateway/test_adapter.py | xlam/autovirt | a19f9237c8b1123ce4f4b8b396dc88122019d4f8 | [
"MIT"
] | null | null | null | from typing import Protocol
class Adapter(Protocol):
def fetch(self, num: int) -> list[dict]:
...
class Api:
def __init__(self):
self._s = "api"
def fetch(self, num: int) -> list[dict]:
return [{"num": num, "s": self._s}, {"num": num, "s": self._s}]
class ApiMock:
def __init__(self):
self._s = "mock"
def fetch(self, num: int) -> list[dict]:
return [{"num": num, "s": self._s}, {"num": num, "s": self._s}]
class Gateway:
def __init__(self, adapter: Adapter):
self.adapter = adapter
def get(self, num: int) -> list[dict]:
return self.adapter.fetch(num)
def test_adapter():
gw = Gateway(ApiMock())
print(gw.get(5))
| 19.972222 | 71 | 0.563282 | 98 | 719 | 3.938776 | 0.255102 | 0.07772 | 0.103627 | 0.145078 | 0.528497 | 0.445596 | 0.38342 | 0.316062 | 0.316062 | 0.316062 | 0 | 0.001873 | 0.257302 | 719 | 35 | 72 | 20.542857 | 0.720974 | 0 | 0 | 0.318182 | 0 | 0 | 0.031989 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.363636 | false | 0 | 0.045455 | 0.136364 | 0.727273 | 0.045455 | 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 | 0 | 1 | 1 | 0 | 0 | 3 |
0510e5d3ee2265f204f01f5718db2233bead4d09 | 2,447 | py | Python | game/levels.py | mcjo163/momo-is-you | 24028b55cb00d39dda4fa8201a2f6c1cf32c0e0d | [
"MIT"
] | null | null | null | game/levels.py | mcjo163/momo-is-you | 24028b55cb00d39dda4fa8201a2f6c1cf32c0e0d | [
"MIT"
] | null | null | null | game/levels.py | mcjo163/momo-is-you | 24028b55cb00d39dda4fa8201a2f6c1cf32c0e0d | [
"MIT"
] | null | null | null | # Level board starting states
# TODO: read these layouts from external files
from entities import *
M = Objects.MOMO
W = Objects.WALL
R = Objects.ROCK
F = Objects.FLAG
IS = Verbs.IS
test_level_1_start = [
[[Nouns.MOMO], [IS], [Adjectives.YOU], [], [], [W], [], [], [], [], []],
[[], [], [], [], [], [W], [], [], [], [], []],
[[], [], [], [], [], [W], [], [], [], [], []],
[[], [], [], [], [], [W], [], [], [], [], []],
[[], [], [M], [], [], [R], [], [], [F], [], []],
[[], [], [], [], [], [W], [], [], [], [], []],
[[Nouns.WALL], [Nouns.ROCK], [], [], [], [W], [], [], [], [], []],
[[IS], [IS], [], [], [], [W], [], [], [], [], []],
[[Adjectives.STOP], [Adjectives.PUSH], [], [], [], [W], [], [], [Nouns.FLAG], [IS], [Adjectives.WIN]]
]
test_level_2_start = [
[[Nouns.MOMO], [IS], [Adjectives.YOU], [], [], [W], [], [], [], [], []],
[[], [], [], [], [], [W], [], [], [], [], []],
[[], [], [], [], [], [W], [], [], [], [], []],
[[], [], [], [], [], [W], [], [], [], [], []],
[[], [], [M], [], [], [W], [], [], [F], [], []],
[[], [], [], [], [], [W], [], [], [], [], []],
[[], [Nouns.WALL], [], [], [], [W], [], [], [], [], []],
[[], [IS], [], [], [], [W], [], [], [], [], []],
[[], [Adjectives.STOP], [], [], [], [W], [], [], [Nouns.FLAG], [IS], [Adjectives.WIN]]
]
test_level_3_start = [[[] for x in range(20)] for y in range(15)]
test_level_3_start[0][0:3] = [[Nouns.MOMO], [IS], [Adjectives.YOU]]
test_level_3_start[1][0:3] = [[Nouns.WATER], [IS], [Adjectives.SINK]]
test_level_3_start[-1][0:3] = [[Nouns.ROCK], [IS], [Adjectives.PUSH]]
test_level_3_start[-2][0:3] = [[Nouns.FLAG], [IS], [Adjectives.WIN]]
test_level_3_start[5][4] = [Objects.MOMO]
test_level_3_start[8][4] = [Objects.ROCK]
for row in test_level_3_start: row[12] = [Objects.WATER]
test_level_3_start[7][18] = [Objects.FLAG]
test_level_4_start = [
[[Nouns.MOMO], [IS], [Adjectives.YOU], [], [], [W], [], [], [], [], []],
[[], [], [], [], [], [W], [], [], [], [], []],
[[], [], [IS], [], [], [W], [], [], [], [], []],
[[], [], [], [], [], [W], [], [], [], [], []],
[[], [], [M], [], [], [W], [], [], [F], [], []],
[[], [], [], [Nouns.MOMO], [], [W], [], [], [], [], []],
[[Nouns.WALL], [], [], [], [], [W], [], [], [], [], []],
[[IS], [], [], [], [], [W], [], [], [], [], []],
[[Adjectives.STOP], [], [], [], [], [W], [], [], [Nouns.FLAG], [IS], [Adjectives.WIN]]
] | 42.189655 | 105 | 0.344095 | 224 | 2,447 | 3.598214 | 0.232143 | 0.133995 | 0.111663 | 0.167494 | 0.459057 | 0.420596 | 0.420596 | 0.420596 | 0.282878 | 0.215881 | 0 | 0.019033 | 0.205558 | 2,447 | 58 | 106 | 42.189655 | 0.395576 | 0.029424 | 0 | 0.3125 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.017241 | 0 | 1 | 0 | false | 0 | 0.020833 | 0 | 0.020833 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
051e8d3db314bed09f3bd3e59c1f56ecdfcb6632 | 3,897 | py | Python | community/dm-scaffolder/providers/pubsub.py | shan2202/deploymentmanager-samples | eb1ae051172653665acc7ed7b65d15f60d51ff54 | [
"Apache-2.0"
] | 930 | 2015-07-30T19:02:32.000Z | 2022-03-09T18:02:11.000Z | community/dm-scaffolder/providers/pubsub.py | shan2202/deploymentmanager-samples | eb1ae051172653665acc7ed7b65d15f60d51ff54 | [
"Apache-2.0"
] | 426 | 2015-05-06T17:25:41.000Z | 2022-03-09T16:13:41.000Z | community/dm-scaffolder/providers/pubsub.py | shan2202/deploymentmanager-samples | eb1ae051172653665acc7ed7b65d15f60d51ff54 | [
"Apache-2.0"
] | 812 | 2015-05-06T15:43:05.000Z | 2022-03-24T18:35:37.000Z | # Copyright 2018 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""
PubSubTopic provider implements GCP PubSub Topic specific transaltions
Supports V1, CFT versions
"""
import providers.baseprovider as base
### PubSub Subscription start ###
class PubSubSubscriptionBase(base.BaseProvider):
"""
Common implementation shared accross all PubSub Subscription versions.
This class should not be used outside of it's child classes.
"""
def __init__(self, dm_api, gcloud_stage, gcloud_flags=''):
base.BaseProvider.__init__(
self, "pubsub", "subscriptions", dm_api, gcloud_stage, gcloud_flags)
def get_new(self):
return None # not supposed to run
class PubSubSubscriptionV1(PubSubSubscriptionBase):
""" PubSub-topic V1 API provider"""
def __init__(self, gcloud_flags=''):
PubSubSubscriptionBase.__init__(
self, "gcp-types/pubsub-v1:projects.subscriptions", "", gcloud_flags)
def get_new(self):
return PubSubSubscriptionV1()
class PubSubSubscriptionCFT(PubSubSubscriptionBase):
""" PubSub-Subscription CFT API provider - DO NOT USE DIRECTLY"""
def __init__(self, gcloud_flags=''):
PubSubSubscriptionBase.__init__(
self, "../templates/pubsub/pubsub.py", " ", gcloud_flags)
def get_new(self):
return PubSubSubscriptionCFT()
def fill_properties(self):
self.base_yaml['properties']['topic'] = self.properties['topic']
self.base_yaml['properties']['subscriptions'] = [ self.properties]
### PubSub Subscription end ###
### PubSub Topics start ###
class PubSubTopicBase(base.BaseProvider):
"""
Common implementation shared accross all PubSub Topic versions.
This class should not be used outside of it's child classes.
"""
def __init__(self, dm_api, gcloud_stage, gcloud_flags=''):
base.BaseProvider.__init__(
self, "pubsub", "topics", dm_api, gcloud_stage, gcloud_flags)
def get_new(self):
return None # not supposed to run
class PubSubTopicV1(PubSubTopicBase):
""" PubSub-topic V1 API provider"""
def __init__(self, gcloud_flags=''):
PubSubTopicBase.__init__(
self, "gcp-types/pubsub-v1:projects.topics", "", gcloud_flags)
def get_new(self):
return PubSubTopicV1()
class PubSubTopicCFT(PubSubTopicBase):
""" PubSub-topic CFT API provider """
def __init__(self, gcloud_flags=''):
PubSubTopicBase.__init__(
self, "../templates/pubsub/pubsub.py", " ", gcloud_flags)
def get_new(self):
return PubSubTopicCFT()
def fill_properties(self):
self.base_yaml['properties']['topic'] = self.properties
self.base_yaml['properties']['subscriptions'] = []
self.get_subscriptions()
def get_subscriptions(self):
""" Sub-optimal implementation """
__subscriptions = PubSubSubscriptionCFT().get_list()
__subs_yaml = []
for sub in __subscriptions:
if sub.base_yaml['properties']['topic'] == self.base_yaml['properties']['topic']['name']:
__subs_yaml.append(sub.base_yaml['properties']['subscriptions'][0])
self.base_yaml['properties']['subscriptions'] = __subs_yaml
| 33.594828 | 102 | 0.66487 | 432 | 3,897 | 5.766204 | 0.3125 | 0.038539 | 0.057808 | 0.040947 | 0.507828 | 0.488559 | 0.440385 | 0.397029 | 0.320755 | 0.320755 | 0 | 0.005972 | 0.226585 | 3,897 | 115 | 103 | 33.886957 | 0.820504 | 0.311265 | 0 | 0.470588 | 0 | 0 | 0.133685 | 0.054856 | 0 | 0 | 0 | 0 | 0 | 1 | 0.294118 | false | 0 | 0.019608 | 0.117647 | 0.54902 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
051ff128b695042c212b351dfd4715c246a5d080 | 251 | py | Python | contrib/admin/core/config.py | rfancn/wxgigo | 7ed64248e4df037dbb5ff0683f21f458d3f29a0e | [
"MIT"
] | null | null | null | contrib/admin/core/config.py | rfancn/wxgigo | 7ed64248e4df037dbb5ff0683f21f458d3f29a0e | [
"MIT"
] | null | null | null | contrib/admin/core/config.py | rfancn/wxgigo | 7ed64248e4df037dbb5ff0683f21f458d3f29a0e | [
"MIT"
] | null | null | null | # Auto generated by web.apps.config module
WXMP_TOKEN='laonabuzhai'
WXMP_APP_ID='wxadf692dbf276c755'
WXMP_APP_KEY='d5d70f3c91578b545de3392c8c758dad '
WXMP_ENCODING_AES_KEY='Y81yOIit1k5GZS9Vhx5L1JCOVaQJc9uXnhvaDVKGq4k'
WXMP_MSG_ENCRYPT_METHOD='clear'
| 31.375 | 67 | 0.876494 | 28 | 251 | 7.464286 | 0.785714 | 0.066986 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.159664 | 0.051793 | 251 | 7 | 68 | 35.857143 | 0.718487 | 0.159363 | 0 | 0 | 1 | 0 | 0.526316 | 0.358852 | 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 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
0521b4a1cf9437df7e0e43ef9ddc1a262650df74 | 229 | py | Python | mmedit/utils/__init__.py | wangruohui/mmediting | 6577d307caf9edfb34c6e46547994e6314fffc37 | [
"Apache-2.0"
] | 45 | 2022-03-05T06:54:34.000Z | 2022-03-30T02:15:42.000Z | mmedit/utils/__init__.py | wangruohui/mmediting | 6577d307caf9edfb34c6e46547994e6314fffc37 | [
"Apache-2.0"
] | 1 | 2022-03-25T14:04:39.000Z | 2022-03-31T04:48:38.000Z | mmedit/utils/__init__.py | wangruohui/mmediting | 6577d307caf9edfb34c6e46547994e6314fffc37 | [
"Apache-2.0"
] | 1 | 2022-03-24T05:07:29.000Z | 2022-03-24T05:07:29.000Z | # Copyright (c) OpenMMLab. All rights reserved.
from .cli import modify_args
from .logger import get_root_logger
from .setup_env import setup_multi_processes
__all__ = ['get_root_logger', 'setup_multi_processes', 'modify_args']
| 32.714286 | 69 | 0.80786 | 33 | 229 | 5.151515 | 0.545455 | 0.117647 | 0.152941 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.10917 | 229 | 6 | 70 | 38.166667 | 0.833333 | 0.196507 | 0 | 0 | 0 | 0 | 0.258242 | 0.115385 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.75 | 0 | 0.75 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
05697143cfe07d06a8f060738b6fcbc941a9ab7d | 148 | py | Python | test.py | fishbb/WolframAlphaAPI | 265d9e685fab3d083a9e0a7e5371f2d5b7081a36 | [
"MIT"
] | 2 | 2018-02-25T20:54:55.000Z | 2021-07-18T23:58:03.000Z | test.py | fishbb/WolframAlphaAPI | 265d9e685fab3d083a9e0a7e5371f2d5b7081a36 | [
"MIT"
] | 1 | 2018-05-27T08:59:03.000Z | 2020-09-05T18:14:12.000Z | test.py | fishbb/WolframAlphaAPI | 265d9e685fab3d083a9e0a7e5371f2d5b7081a36 | [
"MIT"
] | null | null | null | from waapi import waAPI
key = 'YOUR-WOLFRAMALPHA-API-KEY'
api = waAPI(key)
spoken = api.spoken_results(i="stock price of google")
print spoken
| 14.8 | 55 | 0.736486 | 23 | 148 | 4.695652 | 0.652174 | 0.148148 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.155405 | 148 | 9 | 56 | 16.444444 | 0.864 | 0 | 0 | 0 | 0 | 0 | 0.310811 | 0.168919 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.2 | null | null | 0.2 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
056b10ed7e0c9c248f450db7f9bab56cf68f1805 | 2,362 | py | Python | scripts/weekly_messages.py | Camtendo/smashleaguebot | 09b6434591a946bf87c6725e2e57d433a4db2a45 | [
"MIT"
] | null | null | null | scripts/weekly_messages.py | Camtendo/smashleaguebot | 09b6434591a946bf87c6725e2e57d433a4db2a45 | [
"MIT"
] | 15 | 2019-07-15T15:10:20.000Z | 2022-02-26T15:24:41.000Z | scripts/weekly_messages.py | Camtendo/smashleaguebot | 09b6434591a946bf87c6725e2e57d433a4db2a45 | [
"MIT"
] | 1 | 2019-10-10T14:54:49.000Z | 2019-10-10T14:54:49.000Z | import os, sys
sys.path.append(os.path.join(os.path.dirname(__file__), "../backend"))
import db
import match_making
import players
import slack
import datetime
# PULL DOWN THE DB FIRST!
# slack.send_custom_to_active('When you have a moment, please fill out this short survey for some potential changes to season 2. https://hudlresearch.typeform.com/to/bM2DK7', debug=False)
# slack.send_custom_to_active('When you have a moment, please fill out this short survey about Season 3. https://hudlresearch.typeform.com/to/nULo4x', debug=False)
# slack.send_custom_to_active('Season 6 starts May 15 (as long as current matches get finished up). You will automatically be included. If you do *not* wish to participate, please let <@> know asap.', debug=False)
four_game_message = "You currently have 3 unplayed matches. Friendly warning that if you don't play a match this week, you'll be booted from this season on monday."
three_game_message = "Season ends Feb 1 and you currently have 3 or more unplayed matches. This is your friendly warning that you are at risk of being removed for next season. If you need to appeal for leniency, dm <@U04QW49D1>."
new_season_message = "The next season starts July 22nd. By receiving this message, you will be entered automatically. If you don't want to participate, please let <@U04QW49D1> know asap if you haven't already."
rankings_updated_message = "Standings for season 3 have been updated. Please finish remaining matches before July 12th. You can view them here: https://sync.hudlnet.com/pages/viewpage.action?pageId=135990683"
new_schedule_message = "The schedule for season 4 has been generated. You can view it here: https://sync.hudlnet.com/x/bAyvC"
debug = True
# slack.send_custom_for_missed_games(four_game_message, 3, datetime.date(2019,3,4), debug=debug)
#slack.send_custom_to_active(new_season_message, debug=debug)
slack.send_custom_messages(new_schedule_message, debug=debug)
# Monday Message
# yyyy m d
# slack.send_messages_for_week(datetime.date(2019,5,29), debug=debug)
# slack.send_messages_for_week(datetime.date(2019,6,24), debug=debug)
# Thursday Messages (reminders, then rankings updated)
# yyyy m d
#slack.send_reminders_for_week(datetime.date(2019,7,1), debug=debug)
#print(match_making.print_season_markup())
#slack.send_custom_to_active(rankings_updated_message, debug=debug)
# db.rm_db()
| 60.564103 | 229 | 0.791279 | 390 | 2,362 | 4.646154 | 0.423077 | 0.049669 | 0.057947 | 0.046909 | 0.271523 | 0.14404 | 0.14404 | 0.120309 | 0.076159 | 0.076159 | 0 | 0.030245 | 0.11812 | 2,362 | 38 | 230 | 62.157895 | 0.839654 | 0.484759 | 0 | 0 | 0 | 0.357143 | 0.687239 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.428571 | 0 | 0.428571 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
056e889bbf160271b220077f192af13e0638bcac | 238 | py | Python | text/shape/geometry/orienting/css.py | jedhsu/text | 8525b602d304ac571a629104c48703443244545c | [
"Apache-2.0"
] | null | null | null | text/shape/geometry/orienting/css.py | jedhsu/text | 8525b602d304ac571a629104c48703443244545c | [
"Apache-2.0"
] | null | null | null | text/shape/geometry/orienting/css.py | jedhsu/text | 8525b602d304ac571a629104c48703443244545c | [
"Apache-2.0"
] | null | null | null | """
*Line-Direction*
Controls the direction of text.
"""
__all__ = ["LineDirection"]
css_syntax = "text-direction"
class LineDirection:
Name = "Direction" # [TODO} ident?
LeftToRight = "ltr"
RightToLeft = "rtl"
| 12.526316 | 39 | 0.630252 | 23 | 238 | 6.304348 | 0.782609 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.231092 | 238 | 18 | 40 | 13.222222 | 0.79235 | 0.268908 | 0 | 0 | 0 | 0 | 0.265823 | 0 | 0 | 0 | 0 | 0.055556 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3 |
05713aa43d3f3d1b5550de33f662a98bc7934d39 | 1,036 | py | Python | Course/p_types/example_3.py | zevgenia/Python_shultais | e51c31de221c5e7f36ede857a960138009ec8a05 | [
"Apache-2.0"
] | null | null | null | Course/p_types/example_3.py | zevgenia/Python_shultais | e51c31de221c5e7f36ede857a960138009ec8a05 | [
"Apache-2.0"
] | null | null | null | Course/p_types/example_3.py | zevgenia/Python_shultais | e51c31de221c5e7f36ede857a960138009ec8a05 | [
"Apache-2.0"
] | null | null | null |
card_number = "4532 1512 1994 8973"
print("*" * 12, card_number[-4:len(card_number)])
hidden_card_number = "*" * 12 + card_number[-4:]
print(hidden_card_number)
card_number = "4532151219948973"
print(card_number)
print(card_number[0:4]) #первые 4 символа
print(card_number[12:16]) #последние 4 символа
print(card_number[12:len(card_number)]) #последние 4 символа c подсчетом длины строки
print(card_number[-4:len(card_number)]) #последние 4 символа , обратная нумерация
print(card_number[-4:]) #последние 4 символа обратная нумерация индексов
print(card_number[:4]) #первые 4 символа
print(card_number[4:(4+4)]) #вторая 4-ка
print(card_number[8:(8+4)]) #третья 4-ка
print(card_number[12:]) #последняя 4-ка
print(card_number[:-12]) #первая 4-ка, обратная нумерация
print(card_number[-12:(-12+4)]) #вторая 4-ка, обратная нумерация
print(card_number[-8:(-8+4)]) #третья 4-ка, обратная нумерация
print(card_number[-4:]) #последняя 4-ка, обратная нумерация
hidden_card_number = "*" * 12 + card_number[-4:]
print(hidden_card_number) | 33.419355 | 85 | 0.748069 | 166 | 1,036 | 4.487952 | 0.180723 | 0.348993 | 0.281879 | 0.114094 | 0.712752 | 0.663087 | 0.404027 | 0.206711 | 0.206711 | 0.134228 | 0 | 0.089936 | 0.098456 | 1,036 | 31 | 86 | 33.419355 | 0.707709 | 0.333012 | 0 | 0.380952 | 0 | 0 | 0.056047 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.809524 | 0 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 3 |
0573b7e28440fe56a7247769dc35af11cf401271 | 73 | py | Python | tests/system_tests/artifacts/properties/true_0.py | samysweb/dnnv | 58fb95b7300914d9da28eed86c39eca473b1aaef | [
"MIT"
] | 5 | 2022-01-28T20:30:34.000Z | 2022-03-17T09:26:52.000Z | tests/system_tests/artifacts/properties/true_0.py | samysweb/dnnv | 58fb95b7300914d9da28eed86c39eca473b1aaef | [
"MIT"
] | 9 | 2022-01-27T03:50:28.000Z | 2022-02-08T18:42:17.000Z | tests/system_tests/artifacts/properties/true_0.py | samysweb/dnnv | 58fb95b7300914d9da28eed86c39eca473b1aaef | [
"MIT"
] | 2 | 2022-02-03T17:32:43.000Z | 2022-03-24T16:38:49.000Z | from dnnv.properties import *
import numpy as np
N = Network("N")
True
| 10.428571 | 29 | 0.712329 | 12 | 73 | 4.333333 | 0.833333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.191781 | 73 | 6 | 30 | 12.166667 | 0.881356 | 0 | 0 | 0 | 0 | 0 | 0.013699 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 | 3 |
057a363bae010a701266c4bee8cd55cbeaeb71ba | 142 | py | Python | apps/doc/urls.py | Jiafauser/News_blog | a3fec19c5e58c50c40268144e2f52820b24cc5d6 | [
"Unlicense"
] | null | null | null | apps/doc/urls.py | Jiafauser/News_blog | a3fec19c5e58c50c40268144e2f52820b24cc5d6 | [
"Unlicense"
] | null | null | null | apps/doc/urls.py | Jiafauser/News_blog | a3fec19c5e58c50c40268144e2f52820b24cc5d6 | [
"Unlicense"
] | null | null | null | from django.urls import path
from . import views
app_name = 'docs'
urlpatterns = [
path('', views.doc_list, name='doc_list'),
]
| 15.777778 | 47 | 0.640845 | 19 | 142 | 4.631579 | 0.631579 | 0.159091 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.225352 | 142 | 8 | 48 | 17.75 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0.089552 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 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 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
058881359992783fc31c48319d095c222f5cd961 | 185 | py | Python | decimal-to-binary.py | leaen/Codeeval-solutions | fa83cb4fba3e56f79c0a6b00361c18cd3092c3f0 | [
"MIT"
] | null | null | null | decimal-to-binary.py | leaen/Codeeval-solutions | fa83cb4fba3e56f79c0a6b00361c18cd3092c3f0 | [
"MIT"
] | null | null | null | decimal-to-binary.py | leaen/Codeeval-solutions | fa83cb4fba3e56f79c0a6b00361c18cd3092c3f0 | [
"MIT"
] | null | null | null | import sys
def decimal_to_binary(number):
return bin(number)[2:]
with open(sys.argv[1]) as input_file:
for number in input_file.readlines():
print(decimal_to_binary(int(number)))
| 20.555556 | 39 | 0.756757 | 31 | 185 | 4.322581 | 0.709677 | 0.134328 | 0.223881 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.012195 | 0.113514 | 185 | 8 | 40 | 23.125 | 0.804878 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.166667 | false | 0 | 0.166667 | 0.166667 | 0.5 | 0.166667 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 3 |
05917a077006d6303830ad1dc6a16d36e837c995 | 1,351 | py | Python | src/sims4communitylib/enums/enumtypes/common_int.py | velocist/TS4CheatsInfo | b59ea7e5f4bd01d3b3bd7603843d525a9c179867 | [
"Apache-2.0"
] | null | null | null | src/sims4communitylib/enums/enumtypes/common_int.py | velocist/TS4CheatsInfo | b59ea7e5f4bd01d3b3bd7603843d525a9c179867 | [
"Apache-2.0"
] | null | null | null | src/sims4communitylib/enums/enumtypes/common_int.py | velocist/TS4CheatsInfo | b59ea7e5f4bd01d3b3bd7603843d525a9c179867 | [
"Apache-2.0"
] | null | null | null | """
The Sims 4 Community Library is licensed under the Creative Commons Attribution 4.0 International public license (CC BY 4.0).
https://creativecommons.org/licenses/by/4.0/
https://creativecommons.org/licenses/by/4.0/legalcode
Copyright (c) COLONOLNUTTY
"""
from sims4.utils import classproperty
from collections import OrderedDict
from typing import Iterator
# noinspection PyBroadException
try:
# noinspection PyUnresolvedReferences
from enum import Int
except:
# noinspection PyMissingOrEmptyDocstring
class Int:
# noinspection PyPropertyDefinition
@property
def name(self) -> str:
pass
# noinspection PyPropertyDefinition
@property
def value(self) -> int:
pass
# noinspection PyPropertyDefinition,PyMethodParameters
@classproperty
def values(cls) -> Iterator[int]:
pass
# noinspection PyPropertyDefinition,PyMethodParameters
@classproperty
def name_to_value(cls) -> OrderedDict:
pass
# noinspection PyPropertyDefinition,PyMethodParameters
@classproperty
def value_to_name(cls) -> OrderedDict:
pass
class CommonInt(Int):
"""An inheritable class that inherits from the vanilla Sims 4 enum.Int class so you don't have to.
"""
pass
| 27.02 | 125 | 0.683198 | 137 | 1,351 | 6.708029 | 0.481752 | 0.174102 | 0.156692 | 0.176279 | 0.31556 | 0.31556 | 0.239391 | 0.080522 | 0.080522 | 0.080522 | 0 | 0.010859 | 0.250185 | 1,351 | 49 | 126 | 27.571429 | 0.896347 | 0.508512 | 0 | 0.458333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.208333 | false | 0.25 | 0.166667 | 0 | 0.458333 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 3 |
0591d3e30ebfc312de3cfd2d8b3471cdb4a3a3c6 | 2,303 | py | Python | scgapi/Keywords.py | Syniverse/Messaging-Python | 1ecd0f52a9a1ebe5a89ae896c409b078058f140b | [
"MIT"
] | 1 | 2020-09-08T19:15:03.000Z | 2020-09-08T19:15:03.000Z | scgapi/Keywords.py | Syniverse-SCG/Messaging-Python | 1ecd0f52a9a1ebe5a89ae896c409b078058f140b | [
"MIT"
] | null | null | null | scgapi/Keywords.py | Syniverse-SCG/Messaging-Python | 1ecd0f52a9a1ebe5a89ae896c409b078058f140b | [
"MIT"
] | 2 | 2017-07-17T11:53:37.000Z | 2022-02-22T17:28:11.000Z | """
Keywords
class Keywords - Keywords manipulation
class Resource - Access to Keywordss
Example:
scg = Scg()
session = scg.connect(API_URL)
res = scgapi.Keywords.Resource(session)
for kw in res.list():
print("Name is %s" % kw.name)
"""
import scgapi
from scgapi.Contact import Contact
URL_BASE = "/messaging/keywords"
class Keywords(scgapi.ObjBase):
"""Keywords object."""
def __init__(self, **kwargs):
"""Constructor.
Can be initialized empty or by specifying property
names and values.
"""
super(Keywords, self).__init__()
self._url_base = URL_BASE
self._init(**kwargs)
def _get_member_variable_names(self):
return ("_id", "name", "description", "value", "case",
"sender_id", "valid_from", "valid_to",
"associated_info", "campaign_id", "type",
"actions", "reply_template", "_application_id",
"_created_date", "_last_update_date", "_version_number")
def _get_contacts_path(self):
return self._url_base + "/" + self._id + "/contacts"
@property
def id(self):
return getattr(self, "_id")
@property
def application_id(self):
return getattr(self, "_application_id")
@property
def created_date(self):
return getattr(self, "_created_date")
@property
def last_update_date(self):
return getattr(self, "_last_update_date")
@property
def version_number(self):
return getattr(self, "_version_number")
@staticmethod
def _create_from_json(json, resource=None):
return scgapi.init_from_json(json, Keywords(), resource)
def update(self):
"""Update the object in the database."""
return self._update()
def delete(self):
"""Delete the object from the database."""
return self._delete()
class Resource(scgapi.ResourceImpl):
"""
Access to Keywords.
Methods:
create() - Create a new Keywords
list() - List Keywordss
get() - Get a specific Keywords
update() - Update a contact Group
delete() - Delete a Keywords
"""
def __init__(self, session):
super(Resource, self).__init__(
session, URL_BASE, Keywords)
| 24.242105 | 72 | 0.616153 | 258 | 2,303 | 5.224806 | 0.337209 | 0.051929 | 0.063056 | 0.077893 | 0.071217 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.267477 | 2,303 | 94 | 73 | 24.5 | 0.799052 | 0.272688 | 0 | 0.119048 | 0 | 0 | 0.162453 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.285714 | false | 0 | 0.047619 | 0.190476 | 0.619048 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
05949aba3b7bda4b9280881b74816db1d116e415 | 437 | py | Python | ex026.py | erikamaylim/Python-CursoemVideo | 5a6809818c4c55a02ec52379d95f3d20c833df2e | [
"MIT"
] | null | null | null | ex026.py | erikamaylim/Python-CursoemVideo | 5a6809818c4c55a02ec52379d95f3d20c833df2e | [
"MIT"
] | null | null | null | ex026.py | erikamaylim/Python-CursoemVideo | 5a6809818c4c55a02ec52379d95f3d20c833df2e | [
"MIT"
] | null | null | null | """Faça um programa que leia uma frase pelo teclado
e mostre quantas vezes aparece a letra “A”, em que posição ela aparece a primeira vez
e em que posição ela aparece a última vez."""
p = str(input('Digite uma frase qualquer: ')).strip().lower()
print(f'Na frase {p} a letra A aparece {p.count("a")} vezes.')
print('A primeira letra A aparece na posição', p.find('a') + 1)
print('A última letra A aparece na posição', p.rfind('a') + 1)
| 48.555556 | 85 | 0.700229 | 80 | 437 | 3.825 | 0.45 | 0.078431 | 0.127451 | 0.098039 | 0.300654 | 0.300654 | 0 | 0 | 0 | 0 | 0 | 0.005464 | 0.162471 | 437 | 8 | 86 | 54.625 | 0.830601 | 0.405034 | 0 | 0 | 0 | 0 | 0.602362 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.75 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 3 |
55510e05553f908f1b558ad810884c8da5cf63b5 | 232 | py | Python | credentials.py | readbrent/AdoptMePhilly | cb1d3cfdf279f2a46ea6418c88b06469347f64aa | [
"MIT"
] | null | null | null | credentials.py | readbrent/AdoptMePhilly | cb1d3cfdf279f2a46ea6418c88b06469347f64aa | [
"MIT"
] | null | null | null | credentials.py | readbrent/AdoptMePhilly | cb1d3cfdf279f2a46ea6418c88b06469347f64aa | [
"MIT"
] | null | null | null | shelters = ['MNTG1', 'MNTG']
twitter_api_key = 'k5O4owMpAPDcI7LG7y4fue9Fc'
twitter_api_secret = 'XXXXX' #Edited out
twitter_access_token = '2150117929-qnttvTJW3uvP0QbZr2ZKxaBlrkRPa9FdUUWSxqx'
twitter_access_token_secret = 'XXXXX'
| 29 | 75 | 0.818966 | 23 | 232 | 7.869565 | 0.652174 | 0.110497 | 0.198895 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.099057 | 0.086207 | 232 | 7 | 76 | 33.142857 | 0.754717 | 0.043103 | 0 | 0 | 0 | 0 | 0.429224 | 0.342466 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 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 | 0 | 0 | 0 | 3 |
55720479d3331bd7f86358ef43bb996fb3af4c37 | 218 | py | Python | utils/lit/tests/Inputs/shtest-timeout/infinite_loop.py | kpdev/llvm-tnt | d81ccf6fad01597f0143a1598d94d7d29002cf41 | [
"MIT"
] | 1,073 | 2017-06-28T05:11:54.000Z | 2022-03-31T12:52:07.000Z | utils/lit/tests/Inputs/shtest-timeout/infinite_loop.py | rjordans/avr-llvm | 1802f85a455fbbe5fd1b55183bf588e2e4731dc5 | [
"FSFAP"
] | 23 | 2017-07-01T02:22:04.000Z | 2020-10-16T09:42:03.000Z | utils/lit/tests/Inputs/shtest-timeout/infinite_loop.py | rjordans/avr-llvm | 1802f85a455fbbe5fd1b55183bf588e2e4731dc5 | [
"FSFAP"
] | 244 | 2017-06-28T05:08:57.000Z | 2022-03-13T05:03:12.000Z | # RUN: %{python} %s
from __future__ import print_function
import time
import sys
print("Running infinite loop")
sys.stdout.flush() # Make sure the print gets flushed so it appears in lit output.
while True:
pass
| 19.818182 | 82 | 0.747706 | 34 | 218 | 4.647059 | 0.852941 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.174312 | 218 | 10 | 83 | 21.8 | 0.877778 | 0.362385 | 0 | 0 | 0 | 0 | 0.154412 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.142857 | 0.428571 | 0 | 0.428571 | 0.285714 | 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 | 0 | 0 | 0 | 3 |
5578e9c92f6608d5c4e358fe062d212e97d66f31 | 88 | py | Python | modules/2.79/bpy/types/LatticeModifier.py | cmbasnett/fake-bpy-module | acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55 | [
"MIT"
] | null | null | null | modules/2.79/bpy/types/LatticeModifier.py | cmbasnett/fake-bpy-module | acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55 | [
"MIT"
] | null | null | null | modules/2.79/bpy/types/LatticeModifier.py | cmbasnett/fake-bpy-module | acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55 | [
"MIT"
] | null | null | null | class LatticeModifier:
object = None
strength = None
vertex_group = None
| 11 | 23 | 0.659091 | 9 | 88 | 6.333333 | 0.777778 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.295455 | 88 | 7 | 24 | 12.571429 | 0.919355 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3 |
55abf7292b9b490b0979a1b350aeb6a923c44c4f | 528 | py | Python | data/download.py | qmkarriem/endings | 4a17c69cac02ac0ef0c7fb7e6fc242666598d28c | [
"MIT"
] | null | null | null | data/download.py | qmkarriem/endings | 4a17c69cac02ac0ef0c7fb7e6fc242666598d28c | [
"MIT"
] | null | null | null | data/download.py | qmkarriem/endings | 4a17c69cac02ac0ef0c7fb7e6fc242666598d28c | [
"MIT"
] | null | null | null | #to run this script once per day (auto-update the washingtonpost data from GitHub) add this to crontab:
# 0 12 * * * python /Users/quran/Dropbox/MusicArtProjects/endsSentenceFunction/data/download.py
import os
import urllib
fullfilename = os.path.join('/Users/quran/Dropbox/MusicArtProjects/endsSentenceFunction/data', 'fatal-police-shootings-data.csv')
csvData = urllib.URLopener()
csvData.retrieve("https://raw.githubusercontent.com/washingtonpost/data-police-shootings/master/fatal-police-shootings-data.csv", fullfilename)
| 58.666667 | 143 | 0.808712 | 68 | 528 | 6.279412 | 0.647059 | 0.105386 | 0.079625 | 0.154567 | 0.393443 | 0.266979 | 0 | 0 | 0 | 0 | 0 | 0.006135 | 0.073864 | 528 | 8 | 144 | 66 | 0.867076 | 0.371212 | 0 | 0 | 0 | 0.2 | 0.615152 | 0.284848 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.4 | 0 | 0.4 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
e952f7db9f96f6c861a24c247c1163ebc8367ff5 | 18 | py | Python | githost/config.py | ethanfaust/python-self-host-git-web | 26afa0eb387f541eadd8cad7c339492cdb02d3d0 | [
"MIT"
] | null | null | null | githost/config.py | ethanfaust/python-self-host-git-web | 26afa0eb387f541eadd8cad7c339492cdb02d3d0 | [
"MIT"
] | null | null | null | githost/config.py | ethanfaust/python-self-host-git-web | 26afa0eb387f541eadd8cad7c339492cdb02d3d0 | [
"MIT"
] | null | null | null | git_root = '/git'
| 9 | 17 | 0.611111 | 3 | 18 | 3.333333 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.166667 | 18 | 1 | 18 | 18 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0.222222 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
e96614054f769740f121deeb0ffabf6348e1f477 | 90 | py | Python | StoveOpt/tests/test_locate_blockmesh_template.py | Liam-Cassidy/StoveOpt | 3908b0ad6bd9b496948310bef66099b532c16f0e | [
"MIT"
] | null | null | null | StoveOpt/tests/test_locate_blockmesh_template.py | Liam-Cassidy/StoveOpt | 3908b0ad6bd9b496948310bef66099b532c16f0e | [
"MIT"
] | 1 | 2019-06-17T16:35:05.000Z | 2019-06-17T16:35:05.000Z | StoveOpt/tests/test_locate_blockmesh_template.py | Liam-Cassidy/StoveOpt | 3908b0ad6bd9b496948310bef66099b532c16f0e | [
"MIT"
] | 1 | 2019-04-17T21:55:00.000Z | 2019-04-17T21:55:00.000Z | # -*- coding: utf-8 -*-
"""
Created on Thu May 2 19:23:43 2019
@author: Lee
"""
| 11.25 | 36 | 0.5 | 14 | 90 | 3.214286 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.1875 | 0.288889 | 90 | 7 | 37 | 12.857143 | 0.515625 | 0.8 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
e97ac8f9a7f6df977196f4f1bd740c3cbf0bd3c8 | 93 | py | Python | FRAKE/__init__.py | AidinZe/FRAKE | 2ec7b6a4c166ce458842f15cd0c53f573019bb4e | [
"MIT"
] | null | null | null | FRAKE/__init__.py | AidinZe/FRAKE | 2ec7b6a4c166ce458842f15cd0c53f573019bb4e | [
"MIT"
] | null | null | null | FRAKE/__init__.py | AidinZe/FRAKE | 2ec7b6a4c166ce458842f15cd0c53f573019bb4e | [
"MIT"
] | null | null | null | from .FRAKE import *
#Version of FRAKE package
__version__ = "1.0.0"
#install nltk packages
| 15.5 | 25 | 0.741935 | 14 | 93 | 4.642857 | 0.785714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.038462 | 0.16129 | 93 | 5 | 26 | 18.6 | 0.794872 | 0.483871 | 0 | 0 | 0 | 0 | 0.108696 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 | 3 |
e98f3336aea1bb8a6fb3830da29daf25e4b84e53 | 1,226 | py | Python | laf/models.py | FcJson/website | 37c49466dde6cde095d9e4c22c4f990bc2443346 | [
"Apache-2.0"
] | 1 | 2020-06-04T05:05:36.000Z | 2020-06-04T05:05:36.000Z | laf/models.py | FcJson/website | 37c49466dde6cde095d9e4c22c4f990bc2443346 | [
"Apache-2.0"
] | null | null | null | laf/models.py | FcJson/website | 37c49466dde6cde095d9e4c22c4f990bc2443346 | [
"Apache-2.0"
] | null | null | null | from django.db import models
from imagekit.models import ProcessedImageField
from imagekit.processors import ResizeToFill
# 用户信息表
class User(models.Model):
username = models.CharField(
max_length=20,
unique=True
)
gender = models.CharField(max_length=8)
age = models.CharField(max_length=3)
phone_number = models.CharField(
max_length=11,
unique=True
)
email = models.EmailField(unique=True)
password = models.CharField(max_length=16)
def __str__(self):
return self.username
# 物品信息表
class Object(models.Model):
user = models.ForeignKey(User, on_delete=models.CASCADE)
category = models.CharField(max_length=5)
date = models.DateField()
province = models.CharField(max_length=10)
city = models.CharField(max_length=10)
image = ProcessedImageField(
upload_to='img',
processors=[ResizeToFill(192, 156)],
options={'quality': 60},
blank=True,
null=True
)
detail = models.CharField(max_length=100)
# lost用来划分是丢东西(True)还是捡到东西(False)
lost = models.BooleanField(default=True)
def __str__(self):
return self.detail
class Meta:
ordering = ['-date']
| 25.020408 | 60 | 0.668026 | 141 | 1,226 | 5.666667 | 0.489362 | 0.168961 | 0.202753 | 0.270338 | 0.115144 | 0 | 0 | 0 | 0 | 0 | 0 | 0.02537 | 0.228385 | 1,226 | 48 | 61 | 25.541667 | 0.819239 | 0.035073 | 0 | 0.108108 | 0 | 0 | 0.012733 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.054054 | false | 0.027027 | 0.081081 | 0.054054 | 0.648649 | 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 | 0 | 1 | 0 | 0 | 3 |
e9ac037136bc1e96049519ad521d6b394cd6cc7d | 229 | py | Python | Algo and DSA/LeetCode-Solutions-master/Python/single-number.py | Sourav692/FAANG-Interview-Preparation | f523e5c94d582328b3edc449ea16ac6ab28cdc81 | [
"Unlicense"
] | 3,269 | 2018-10-12T01:29:40.000Z | 2022-03-31T17:58:41.000Z | Algo and DSA/LeetCode-Solutions-master/Python/single-number.py | Sourav692/FAANG-Interview-Preparation | f523e5c94d582328b3edc449ea16ac6ab28cdc81 | [
"Unlicense"
] | 53 | 2018-12-16T22:54:20.000Z | 2022-02-25T08:31:20.000Z | Algo and DSA/LeetCode-Solutions-master/Python/single-number.py | Sourav692/FAANG-Interview-Preparation | f523e5c94d582328b3edc449ea16ac6ab28cdc81 | [
"Unlicense"
] | 1,236 | 2018-10-12T02:51:40.000Z | 2022-03-30T13:30:37.000Z | # Time: O(n)
# Space: O(1)
import operator
from functools import reduce
class Solution(object):
"""
:type nums: List[int]
:rtype: int
"""
def singleNumber(self, A):
return reduce(operator.xor, A)
| 14.3125 | 38 | 0.60262 | 30 | 229 | 4.6 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.005917 | 0.262009 | 229 | 15 | 39 | 15.266667 | 0.810651 | 0.253275 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0 | 0.4 | 0.2 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 3 |
e9ad356ac6949bec9d057efc63fa0a7b8b83e632 | 128 | py | Python | scripts/quest/q12394s.py | G00dBye/YYMS | 1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb | [
"MIT"
] | 54 | 2019-04-16T23:24:48.000Z | 2021-12-18T11:41:50.000Z | scripts/quest/q12394s.py | G00dBye/YYMS | 1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb | [
"MIT"
] | 3 | 2019-05-19T15:19:41.000Z | 2020-04-27T16:29:16.000Z | scripts/quest/q12394s.py | G00dBye/YYMS | 1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb | [
"MIT"
] | 49 | 2020-11-25T23:29:16.000Z | 2022-03-26T16:20:24.000Z | pm = sm.getChr().getPotentialMan()
pm.addPotential(pm.generateRandomPotential(1))
sm.completeQuestNoRewards(12394)
sm.dispose()
| 25.6 | 46 | 0.804688 | 14 | 128 | 7.357143 | 0.714286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.04918 | 0.046875 | 128 | 4 | 47 | 32 | 0.795082 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
e9b1061195b59b1faf23e8ff72b466c71bc45aa1 | 171 | py | Python | powernad/Object/IpExclusion/RequestObject/UpdateIpExclusionObject.py | devkingsejong/python---PowerNad | c308bba4cb31126ccd318e4574071f4057f5d23f | [
"CNRI-Python"
] | 34 | 2017-03-16T14:32:49.000Z | 2022-03-18T09:23:05.000Z | powernad/Object/IpExclusion/RequestObject/UpdateIpExclusionObject.py | devkingsejong/python---PowerNad | c308bba4cb31126ccd318e4574071f4057f5d23f | [
"CNRI-Python"
] | 16 | 2018-02-08T02:37:56.000Z | 2022-03-15T13:45:34.000Z | powernad/Object/IpExclusion/RequestObject/UpdateIpExclusionObject.py | devkingsejong/python---PowerNad | c308bba4cb31126ccd318e4574071f4057f5d23f | [
"CNRI-Python"
] | 19 | 2017-03-28T21:48:18.000Z | 2021-11-30T05:13:43.000Z | class UpdateIpExclusionObject:
def __init__(self, filterIp, ipFilterId):
self.filterIp = filterIp
self.ipFilterId = ipFilterId
self.memo = None | 34.2 | 45 | 0.684211 | 16 | 171 | 7.0625 | 0.5625 | 0.212389 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.245614 | 171 | 5 | 46 | 34.2 | 0.875969 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0 | 0 | 0 | 0.4 | 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 | 0 | 0 | 0 | 3 |
e9b11dc054a30ba71976eb38c013fe07be6bdf95 | 144 | py | Python | Django-Charts/urls.py | DiogoRibeiro7/Medium-Blog | 26271e468f950a0454543dbb6f7d07b485cee18f | [
"Apache-2.0"
] | 4 | 2019-06-01T12:35:38.000Z | 2020-04-26T05:50:47.000Z | Django-Charts/urls.py | DiogoRibeiro7/Medium-Blog | 26271e468f950a0454543dbb6f7d07b485cee18f | [
"Apache-2.0"
] | 4 | 2020-01-28T22:12:15.000Z | 2021-08-25T14:46:12.000Z | Django-Charts/urls.py | DiogoRibeiro7/Medium-Blog | 26271e468f950a0454543dbb6f7d07b485cee18f | [
"Apache-2.0"
] | 2 | 2019-06-06T12:58:33.000Z | 2019-06-06T15:23:42.000Z | #Filename: app_name / urls.py
from django.conf.urls import url
from.import views
urlpatterns = [
url(r'^$', views.chart, name = 'demo'),
] | 18 | 43 | 0.673611 | 21 | 144 | 4.571429 | 0.714286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.166667 | 144 | 8 | 44 | 18 | 0.8 | 0.194444 | 0 | 0 | 0 | 0 | 0.051724 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.4 | 0 | 0.4 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
e9d168c8eadb4da6fa3be077346905797e818e20 | 254 | py | Python | src/aeroport/payload.py | anti1869/aeroport | e72ea137e76a679b7e3dc55a8e419c2c638c24f6 | [
"Apache-2.0"
] | null | null | null | src/aeroport/payload.py | anti1869/aeroport | e72ea137e76a679b7e3dc55a8e419c2c638c24f6 | [
"Apache-2.0"
] | null | null | null | src/aeroport/payload.py | anti1869/aeroport | e72ea137e76a679b7e3dc55a8e419c2c638c24f6 | [
"Apache-2.0"
] | null | null | null | """
Defining and working with payload.
"""
from aeroport.abc import AbstractPayload, AbstractField
class Field(AbstractField):
"""Container of field metadata"""
class Payload(AbstractPayload):
def postprocess(self, **kwargs):
pass
| 14.941176 | 55 | 0.708661 | 26 | 254 | 6.923077 | 0.807692 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.185039 | 254 | 16 | 56 | 15.875 | 0.869565 | 0.244094 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0.2 | 0.2 | 0 | 0.8 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 3 |
7582f0168bbcac4eff6faaf30e8f3625378bc612 | 10,829 | py | Python | release/stubs.min/Wms/RemotingObjects/NumberRanges.py | tranconbv/ironpython-stubs | a601759e6c6819beff8e6b639d18a24b7e351851 | [
"MIT"
] | null | null | null | release/stubs.min/Wms/RemotingObjects/NumberRanges.py | tranconbv/ironpython-stubs | a601759e6c6819beff8e6b639d18a24b7e351851 | [
"MIT"
] | null | null | null | release/stubs.min/Wms/RemotingObjects/NumberRanges.py | tranconbv/ironpython-stubs | a601759e6c6819beff8e6b639d18a24b7e351851 | [
"MIT"
] | null | null | null | # encoding: utf-8
# module Wms.RemotingObjects.NumberRanges calls itself NumberRanges
# from Wms.RemotingObjects,Version=1.23.1.0,Culture=neutral,PublicKeyToken=null
# by generator 1.145
# no doc
# no important
from __init__ import *
# no functions
# classes
class GenerateArgs(object):
"""
GenerateArgs()
GenerateArgs(numberRange: NumberRange)
"""
def ZZZ(self):
"""hardcoded/mock instance of the class"""
return GenerateArgs()
instance=ZZZ()
"""hardcoded/returns an instance of the class"""
@staticmethod
def __new__(self,numberRange=None):
"""
__new__(cls: type)
__new__(cls: type,numberRange: NumberRange)
"""
pass
Arguments=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Get: Arguments(self: GenerateArgs) -> Array[object]
Set: Arguments(self: GenerateArgs)=value
"""
Length=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Get: Length(self: GenerateArgs) -> int
Set: Length(self: GenerateArgs)=value
"""
Prefix=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Get: Prefix(self: GenerateArgs) -> str
Set: Prefix(self: GenerateArgs)=value
"""
StartingNumber=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Get: StartingNumber(self: GenerateArgs) -> int
Set: StartingNumber(self: GenerateArgs)=value
"""
Suffix=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Get: Suffix(self: GenerateArgs) -> str
Set: Suffix(self: GenerateArgs)=value
"""
class GenerateNumbersBaseArgs(object):
"""
GenerateNumbersBaseArgs()
GenerateNumbersBaseArgs(id: int,type: NumberRangeType)
GenerateNumbersBaseArgs(id: int,type: NumberRangeType,numbersToGenerate: int)
"""
def ZZZ(self):
"""hardcoded/mock instance of the class"""
return GenerateNumbersBaseArgs()
instance=ZZZ()
"""hardcoded/returns an instance of the class"""
def AddGenerationArgs(self,args,numbersToGenerate):
""" AddGenerationArgs(self: GenerateNumbersBaseArgs,args: GenerateArgs,numbersToGenerate: int) """
pass
def AddGenerator(self,generator,args,numbersToGenerate):
""" AddGenerator(self: GenerateNumbersBaseArgs,generator: IGenerator,args: GenerateArgs,numbersToGenerate: int) """
pass
def Generate(self):
"""
Generate(self: GenerateNumbersBaseArgs) -> IEnumerable[IGeneratedBarcode]
Generates a range of numbers
"""
pass
def GenerateOne(self):
"""
GenerateOne(self: GenerateNumbersBaseArgs) -> IGeneratedBarcode
Generates a single number
"""
pass
@staticmethod
def __new__(self,id=None,type=None,numbersToGenerate=None):
"""
__new__(cls: type)
__new__(cls: type,id: int,type: NumberRangeType)
__new__(cls: type,id: int,type: NumberRangeType,numbersToGenerate: int)
"""
pass
AdditionalArguments=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""
Get: AdditionalArguments(self: GenerateNumbersBaseArgs) -> SerializableDictionary[str,object]
"""
Ascending=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""
Get: Ascending(self: GenerateNumbersBaseArgs) -> bool
Set: Ascending(self: GenerateNumbersBaseArgs)=value
"""
HasGenerator=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""
Get: HasGenerator(self: GenerateNumbersBaseArgs) -> bool
"""
Id=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""The ID of the number range
Get: Id(self: GenerateNumbersBaseArgs) -> int
Set: Id(self: GenerateNumbersBaseArgs)=value
"""
NumbersToGenerate=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Amount of numbers to generate (default=1)
Get: NumbersToGenerate(self: GenerateNumbersBaseArgs) -> int
Set: NumbersToGenerate(self: GenerateNumbersBaseArgs)=value
"""
RegisterNumbersAsUsed=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Set to True to register the numbers as used within BOXwise so they cannot be reused.
Get: RegisterNumbersAsUsed(self: GenerateNumbersBaseArgs) -> bool
Set: RegisterNumbersAsUsed(self: GenerateNumbersBaseArgs)=value
"""
Type=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Type of numbers to generate
Get: Type(self: GenerateNumbersBaseArgs) -> NumberRangeType
Set: Type(self: GenerateNumbersBaseArgs)=value
"""
class GenerateBarcodeLabelArgs(GenerateNumbersBaseArgs):
"""
GenerateBarcodeLabelArgs()
GenerateBarcodeLabelArgs(id: int,type: NumberRangeType)
GenerateBarcodeLabelArgs(id: int,type: NumberRangeType,numbersToGenerate: int)
"""
def ZZZ(self):
"""hardcoded/mock instance of the class"""
return GenerateBarcodeLabelArgs()
instance=ZZZ()
"""hardcoded/returns an instance of the class"""
@staticmethod
def __new__(self,id=None,type=None,numbersToGenerate=None):
"""
__new__(cls: type)
__new__(cls: type,id: int,type: NumberRangeType)
__new__(cls: type,id: int,type: NumberRangeType,numbersToGenerate: int)
"""
pass
LabelName=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""
Get: LabelName(self: GenerateBarcodeLabelArgs) -> str
Set: LabelName(self: GenerateBarcodeLabelArgs)=value
"""
Printer=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Override printer,otherwise printer is chosen through printer rules.
Get: Printer(self: GenerateBarcodeLabelArgs) -> str
Set: Printer(self: GenerateBarcodeLabelArgs)=value
"""
PrintingOptions=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Override printing options,otherwise options is chosen through printer rules.
Get: PrintingOptions(self: GenerateBarcodeLabelArgs) -> PrintingOptions
Set: PrintingOptions(self: GenerateBarcodeLabelArgs)=value
"""
class GetNumberRangeArgs(object):
""" GetNumberRangeArgs() """
def ZZZ(self):
"""hardcoded/mock instance of the class"""
return GetNumberRangeArgs()
instance=ZZZ()
"""hardcoded/returns an instance of the class"""
Filter=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Get: Filter(self: GetNumberRangeArgs) -> str
Set: Filter(self: GetNumberRangeArgs)=value
"""
Id=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Get: Id(self: GetNumberRangeArgs) -> int
Set: Id(self: GetNumberRangeArgs)=value
"""
IsTypeSet=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Get: IsTypeSet(self: GetNumberRangeArgs) -> bool
Set: IsTypeSet(self: GetNumberRangeArgs)=value
"""
Type=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Get: Type(self: GetNumberRangeArgs) -> NumberRangeType
Set: Type(self: GetNumberRangeArgs)=value
"""
Default=None
class NumberRange(DbObject):
""" NumberRange() """
def ZZZ(self):
"""hardcoded/mock instance of the class"""
return NumberRange()
instance=ZZZ()
"""hardcoded/returns an instance of the class"""
def __init__(self,*args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __reduce_ex__(self,*args):
pass
Current=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""The current number
Get: Current(self: NumberRange) -> int
Set: Current(self: NumberRange)=value
"""
Description=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""The description
Get: Description(self: NumberRange) -> str
Set: Description(self: NumberRange)=value
"""
From=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""The starting number
Get: From(self: NumberRange) -> int
Set: From(self: NumberRange)=value
"""
Id=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""The ID of the range
Get: Id(self: NumberRange) -> int
Set: Id(self: NumberRange)=value
"""
Length=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Eventually fixed length of the generated number (Left padded with 0)
Get: Length(self: NumberRange) -> int
Set: Length(self: NumberRange)=value
"""
Prefix=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Optional. The prefix for the generated numbers
Get: Prefix(self: NumberRange) -> str
Set: Prefix(self: NumberRange)=value
"""
RangeType=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""
Get: RangeType(self: NumberRange) -> NumberRangeType
Set: RangeType(self: NumberRange)=value
"""
ResetBy=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""The user who performed the reset
Get: ResetBy(self: NumberRange) -> str
Set: ResetBy(self: NumberRange)=value
"""
ResetOn=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Date on which this range was reset
Get: ResetOn(self: NumberRange) -> DateTime
Set: ResetOn(self: NumberRange)=value
"""
Suffix=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Optional. The suffix for the generated numbers
Get: Suffix(self: NumberRange) -> str
Set: Suffix(self: NumberRange)=value
"""
To=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""The end number
Get: To(self: NumberRange) -> int
Set: To(self: NumberRange)=value
"""
class NumberRangeType:
""" enum NumberRangeType,values: PickBatch (2),Regular (0),SSCC (1) """
def ZZZ(self):
"""hardcoded/mock instance of the class"""
return NumberRangeType()
instance=ZZZ()
"""hardcoded/returns an instance of the class"""
def __eq__(self,*args):
""" x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """
pass
def __format__(self,*args):
""" __format__(formattable: IFormattable,format: str) -> str """
pass
def __ge__(self,*args):
pass
def __gt__(self,*args):
pass
def __init__(self,*args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __le__(self,*args):
pass
def __lt__(self,*args):
pass
def __ne__(self,*args):
pass
def __reduce_ex__(self,*args):
pass
def __str__(self,*args):
pass
PickBatch=None
Regular=None
SSCC=None
value__=None
| 28.954545 | 215 | 0.69988 | 1,251 | 10,829 | 5.908074 | 0.132694 | 0.12177 | 0.073062 | 0.097416 | 0.478961 | 0.452983 | 0.43323 | 0.421459 | 0.421459 | 0.415099 | 0 | 0.001664 | 0.167328 | 10,829 | 373 | 216 | 29.032172 | 0.81801 | 0.203989 | 0 | 0.504951 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.247525 | false | 0.188119 | 0.009901 | 0 | 0.782178 | 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 | 0 | 1 | 0 | 0 | 3 |
75c5b34e3fe7a7bf96b20f6e35c5f718afdf5724 | 92 | py | Python | Python_Basico/saludos.py | vhngroup/Backend_with_Python_and_Django | 8505b5e6b9a7530906e7be12c1ce2036e8d2f512 | [
"MIT"
] | null | null | null | Python_Basico/saludos.py | vhngroup/Backend_with_Python_and_Django | 8505b5e6b9a7530906e7be12c1ce2036e8d2f512 | [
"MIT"
] | null | null | null | Python_Basico/saludos.py | vhngroup/Backend_with_Python_and_Django | 8505b5e6b9a7530906e7be12c1ce2036e8d2f512 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
name = str(input('cual es tu nombre?'))
print('hola ' + name + '!') | 23 | 39 | 0.532609 | 13 | 92 | 3.769231 | 0.923077 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.013333 | 0.184783 | 92 | 4 | 40 | 23 | 0.64 | 0.228261 | 0 | 0 | 0 | 0 | 0.342857 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 3 |
75cb0b57d2849ddfe786d72abf02a82e544e1a24 | 104 | py | Python | cookies_website/apps.py | marianagutierrezmiranda/django_homeworks | 19078a6bc1a2b1bcffab7c7d3c8ff95018d677b8 | [
"MIT"
] | null | null | null | cookies_website/apps.py | marianagutierrezmiranda/django_homeworks | 19078a6bc1a2b1bcffab7c7d3c8ff95018d677b8 | [
"MIT"
] | null | null | null | cookies_website/apps.py | marianagutierrezmiranda/django_homeworks | 19078a6bc1a2b1bcffab7c7d3c8ff95018d677b8 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class CookiesWebsiteConfig(AppConfig):
name = 'cookies_website'
| 17.333333 | 38 | 0.788462 | 11 | 104 | 7.363636 | 0.909091 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.144231 | 104 | 5 | 39 | 20.8 | 0.910112 | 0 | 0 | 0 | 0 | 0 | 0.144231 | 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 | 0 | 0 | 0 | 3 |
75cfb6086bc827a9b9ba720913f901a63779c790 | 119 | py | Python | solutions/020_solution_03.py | UFResearchComputing/py4ai | db7f80614f26274ec18556d56ea9f549c463165a | [
"CC-BY-4.0"
] | null | null | null | solutions/020_solution_03.py | UFResearchComputing/py4ai | db7f80614f26274ec18556d56ea9f549c463165a | [
"CC-BY-4.0"
] | null | null | null | solutions/020_solution_03.py | UFResearchComputing/py4ai | db7f80614f26274ec18556d56ea9f549c463165a | [
"CC-BY-4.0"
] | 1 | 2021-04-27T09:50:54.000Z | 2021-04-27T09:50:54.000Z | # Numbers are not stored in the written representation, so they can't be
# treated like strings.
a = 123
print(a[1])
| 19.833333 | 73 | 0.722689 | 21 | 119 | 4.095238 | 0.952381 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.041667 | 0.193277 | 119 | 5 | 74 | 23.8 | 0.854167 | 0.781513 | 0 | 0 | 0 | 0 | 0 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 3 |
75d26bf49d0d787c7f827216e86e674522420163 | 1,140 | py | Python | test/tests/tutorial_notebook_tests.py | jameszhan/swift-jupyter | aa9ab1c46c48dfad938bc6472b4e935522fee96a | [
"Apache-2.0"
] | 624 | 2018-07-13T00:11:01.000Z | 2022-03-31T14:52:44.000Z | test/tests/tutorial_notebook_tests.py | wojtekcz/swift-jupyter | b76b74b01e91aa43fb8099f637058450513b790b | [
"Apache-2.0"
] | 57 | 2018-07-20T18:15:34.000Z | 2022-03-30T00:57:30.000Z | test/tests/tutorial_notebook_tests.py | wojtekcz/swift-jupyter | b76b74b01e91aa43fb8099f637058450513b790b | [
"Apache-2.0"
] | 100 | 2018-07-18T09:09:07.000Z | 2021-12-27T00:33:59.000Z | # TODO(TF-747): Reenable.
# """Checks that tutorial notebooks behave as expected.
# """
#
# import unittest
# import os
# import shutil
# import tempfile
#
# from flaky import flaky
#
# from notebook_tester import NotebookTestRunner
#
#
# class TutorialNotebookTests(unittest.TestCase):
# @classmethod
# def setUpClass(cls):
# cls.tmp_dir = tempfile.mkdtemp()
# git_url = 'https://github.com/tensorflow/swift.git'
# os.system('git clone %s %s -b jupyter-test-branch' % (git_url, cls.tmp_dir))
#
# @classmethod
# def tearDownClass(cls):
# shutil.rmtree(cls.tmp_dir)
#
# @flaky(max_runs=5, min_passes=1)
# def test_iris(self):
# notebook = os.path.join(self.tmp_dir, 'docs', 'site', 'tutorials',
# 'model_training_walkthrough.ipynb')
# runner = NotebookTestRunner(notebook, verbose=False)
# runner.run()
# self.assertEqual([], runner.unexpected_errors)
# all_stdout = '\n\n'.join(runner.stdout)
# self.assertIn('Epoch 100:', all_stdout)
# self.assertIn('Example 2 prediction:', all_stdout)
| 30.810811 | 86 | 0.62807 | 130 | 1,140 | 5.384615 | 0.615385 | 0.034286 | 0.038571 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.010286 | 0.232456 | 1,140 | 36 | 87 | 31.666667 | 0.789714 | 0.936842 | 0 | null | 0 | null | 0 | 0 | null | 0 | 0 | 0.027778 | null | 1 | null | true | 0 | 0 | null | null | null | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
75e459f316690215aecb1de156b541cc0eae3537 | 524 | py | Python | client/websocket_client.py | WorkShoft/dj-pygame-pong | 48c5a449a0904a43aef3305dfe2509f50e0d799c | [
"Apache-2.0"
] | 9 | 2020-07-26T19:45:56.000Z | 2022-01-10T22:55:20.000Z | client/websocket_client.py | WorkShoft/dj-pygame-pong | 48c5a449a0904a43aef3305dfe2509f50e0d799c | [
"Apache-2.0"
] | 5 | 2020-08-01T13:24:07.000Z | 2021-09-22T19:28:58.000Z | client/websocket_client.py | WorkShoft/dj-pygame-pong | 48c5a449a0904a43aef3305dfe2509f50e0d799c | [
"Apache-2.0"
] | 1 | 2021-02-12T08:24:47.000Z | 2021-02-12T08:24:47.000Z | import json
import websocket
def get_uri(game=""):
uri = f"ws://127.0.0.1:8000/{game}/"
return uri
def connect(uri):
connection = websocket.WebSocketApp(uri, on_error=on_error, on_close=on_close)
return connection
def on_error(connection, error):
print(error)
def on_close(connection):
print(f"Closed connection")
def on_open(connection):
def run(*args):
pass
def move(connection, direction):
if direction:
connection.send(json.dumps({"direction": direction,},))
| 16.375 | 82 | 0.675573 | 71 | 524 | 4.873239 | 0.43662 | 0.060694 | 0.052023 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.023641 | 0.192748 | 524 | 31 | 83 | 16.903226 | 0.794326 | 0 | 0 | 0 | 0 | 0 | 0.101145 | 0.051527 | 0 | 0 | 0 | 0 | 0 | 1 | 0.388889 | false | 0.055556 | 0.111111 | 0 | 0.611111 | 0.111111 | 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 | 0 | 1 | 0 | 0 | 3 |
75ec22672b704992f8d0f8641c330e31857005bd | 40 | py | Python | media_nommer/__init__.py | duointeractive/media-nommer | ba8095748582934ab44f6972210381b074bd9d14 | [
"BSD-3-Clause"
] | 2 | 2015-11-05T18:52:05.000Z | 2021-02-16T20:26:23.000Z | media_nommer/__init__.py | duointeractive/media-nommer | ba8095748582934ab44f6972210381b074bd9d14 | [
"BSD-3-Clause"
] | null | null | null | media_nommer/__init__.py | duointeractive/media-nommer | ba8095748582934ab44f6972210381b074bd9d14 | [
"BSD-3-Clause"
] | 3 | 2015-06-04T11:27:39.000Z | 2017-12-06T22:10:07.000Z | # Used in packaging.
VERSION = '1.0dev'
| 13.333333 | 20 | 0.675 | 6 | 40 | 4.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.060606 | 0.175 | 40 | 2 | 21 | 20 | 0.757576 | 0.45 | 0 | 0 | 0 | 0 | 0.3 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
2f002837c465acaddaab21285b65c51edb9fd38e | 217 | py | Python | Python/Programming Fundamentals/Text Processing/11. Reverse String.py | teodoramilcheva/softuni-software-engineering | 98dc9faa66f42570f6538fd7ef186d2bd1d39bff | [
"MIT"
] | null | null | null | Python/Programming Fundamentals/Text Processing/11. Reverse String.py | teodoramilcheva/softuni-software-engineering | 98dc9faa66f42570f6538fd7ef186d2bd1d39bff | [
"MIT"
] | null | null | null | Python/Programming Fundamentals/Text Processing/11. Reverse String.py | teodoramilcheva/softuni-software-engineering | 98dc9faa66f42570f6538fd7ef186d2bd1d39bff | [
"MIT"
] | null | null | null | def get_reversed_string(word):
return word[::-1]
while True:
string = input()
if string == 'end':
break
rev_str = get_reversed_string(string)
print(f'{string} = {rev_str}')
| 16.692308 | 42 | 0.571429 | 27 | 217 | 4.37037 | 0.62963 | 0.186441 | 0.288136 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.006536 | 0.294931 | 217 | 12 | 43 | 18.083333 | 0.764706 | 0 | 0 | 0 | 0 | 0 | 0.112745 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.125 | false | 0 | 0 | 0.125 | 0.25 | 0.125 | 1 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 3 |
f93c57998c27c9024ea69126615ef85af8e04195 | 249 | py | Python | setup.py | eightBEC/watson-visual-recognition-tooling | 54dcd24446c8e1cb846593c9cd2a5c28c868d98e | [
"Apache-2.0"
] | null | null | null | setup.py | eightBEC/watson-visual-recognition-tooling | 54dcd24446c8e1cb846593c9cd2a5c28c868d98e | [
"Apache-2.0"
] | null | null | null | setup.py | eightBEC/watson-visual-recognition-tooling | 54dcd24446c8e1cb846593c9cd2a5c28c868d98e | [
"Apache-2.0"
] | null | null | null | from distutils.core import setup
setup(name='VisualRecognitionTooling',
version='1.0',
description='Tooling Library for IBM Watson Visual Recognition',
author='Jan Forster',
author_email='',
packages=['vrtool'],
) | 27.666667 | 70 | 0.666667 | 26 | 249 | 6.346154 | 0.923077 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.010204 | 0.212851 | 249 | 9 | 71 | 27.666667 | 0.831633 | 0 | 0 | 0 | 0 | 0 | 0.372 | 0.096 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.125 | 0 | 0.125 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
f962fee6f9ee66e2bef80fb91f74bacdc4bbfa78 | 7,383 | py | Python | parser/reader/__init__.py | cheery/better_web_language | 0700a60af0efe7d7a05364dd4af26bc9fe26332d | [
"MIT"
] | 136 | 2015-12-18T21:11:59.000Z | 2022-02-21T19:47:36.000Z | parser/reader/__init__.py | cheery/better_web_language | 0700a60af0efe7d7a05364dd4af26bc9fe26332d | [
"MIT"
] | 1 | 2021-05-07T11:17:02.000Z | 2021-05-07T18:15:07.000Z | parser/reader/__init__.py | cheery/better_web_language | 0700a60af0efe7d7a05364dd4af26bc9fe26332d | [
"MIT"
] | 13 | 2016-03-06T18:27:17.000Z | 2020-06-18T14:27:32.000Z | from stream import CStream
from tokenizer import L2
from data import Expr, Literal, Position
#import space
#table = {
# u'(': u'lp', u')': u'rp',
# u'[': u'lb', u']': u'rb',
# u'{': u'lc', u'}': u'rc',
# u'and': u'and', u'or': u'or', u'not': u'not',
# u'=': u'let', u':=': u'set',
# u'<': u'chain',
# u'>': u'chain',
# u'<=': u'chain',
# u'>=': u'chain',
# u'==': u'chain',
# u'!=': u'chain',
# u'^': u'op', u'&': u'op', u'<<': u'op',
# u'>>': u'op', u'!': u'op', u'*': u'op',
# u'/': u'op', u'%': u'op', u'+': u'op',
# u'-': u'op', u'|': u'op', u'++': u'op',
# u':': u'symbol',
# u'.': u'dot'}
#binops = {
# u'|': 10,
# u'^': 10,
# u'&': 20,
# u'<<': 30, u'>>': 40,
# u'++': 40, u'+': 40, u'-': 40,
# u'*': 50, u'/': 50, u'%': 50,
#}
#right_binding = []
#prefixes = {
# u'~': 90,
# u'-': 90,
# u'+': 90,
#}
#postfixes = {
# u'!': 100,
#}
#
#def read(source):
# exps = []
# ts = L2(CStream(source), table)
# while ts.filled:
# if ts.position.col != 0:
# raise space.Error(u"%s: layout error" % ts.first.start.repr())
# exps.append(toplevel(ts, 0))
# return exps
#
#def toplevel(ts, col):
# head = expression(ts)
# if head.dcf is not None and ts.filled:
# if head.stop.lno == ts.position.lno:
# head.dcf.capture = [toplevel(ts, col)]
# elif ts.position.col > col:
# head.dcf.capture = exps = []
# scol = ts.position.col
# while ts.filled and ts.position.col == scol:
# exp = toplevel(ts, scol)
# exps.append(exp)
# while ts.filled and ts.position.lno == exp.stop.lno and ts.position.col > scol:
# exps.append(toplevel(ts, scol))
# return head
#
#def expressions(ts):
# exps = []
# while ts.filled:
# if match_some(ts.first, [u'rp', u'rb', u'rc']):
# break
# exps.append(expression(ts))
# return exps
#
#def expression(ts):
# left = expression_and(ts)
# if match(ts.first, u'or'):
# op = ts.advance()
# op.name = u'symbol'
# right = expression(ts)
# return Expr(left.start, right.stop, u'form', [op, left, right])
# return left
#
#def expression_and(ts):
# left = expression_chain(ts)
# if match(ts.first, u'and'):
# op = ts.advance()
# op.name = u'symbol'
# right = expression_and(ts)
# return Expr(left.start, right.stop, u'form', [op, left, right])
# return left
#
#def expression_chain(ts):
# left = expression_bare(ts, 0)
# if match(ts.first, u'chain'):
# exps = [left]
# while match(ts.first, u'chain'):
# op = ts.advance()
# op.name = u'symbol'
# exps.append(op)
# exps.append(expression_bare(ts, 0))
# left = Expr(exps[0].start, exps[len(exps)-1].stop, u'chain', exps)
# return left
#
#def expression_bare(ts, rbp):
# if on_prefix(ts):
# op = ts.advance()
# exp = expression_bare(ts, prefixes[op.value])
# op.name = u'symbol'
# op.value = op.value+u'expr'
# left = Expr(op.start, exp.stop, u'form', [op, exp])
# else:
# left = terminal(ts)
# while ts.filled:
# if match(ts.first, u'dot'):
# dot = ts.advance()
# symbol = ts.advance()
# if not match(symbol, u'symbol'):
# raise space.Error(u"%s: expected symbol" % symbol.start.repr())
# left = Expr(left.start, symbol.stop, u'attr', [left, symbol])
# elif match(ts.first, u'lb') and left.stop.eq(ts.first.start):
# lb = ts.advance()
# exps = expressions(ts)
# if not match(ts.first, u'rb'):
# raise space.Error(u"%s: [] truncates at %s" % (lb.start.repr(), ts.position.repr()))
# rb = ts.advance()
# left = Expr(left.start, rb.stop, u'index', [left] + exps)
# elif match_some(ts.first, [u'let', u'set']):
# let = ts.advance()
# exp = expression(ts)
# left = Expr(left.start, exp.stop, let.name, [left, exp])
# elif match(ts.first, u'op') and match(ts.second, u'let') and ts.first.value in binops:
# aug = ts.advance()
# aug.name = u'symbol'
# let = ts.advance()
# exp = expression(ts)
# left = Expr(left.start, exp.stop, u'aug', [aug, left, exp])
# else:
# break
# while ts.filled:
# if on_binop(left, ts) and rbp < binops.get(ts.first.value, 0):
# op = ts.advance()
# op.name = u'symbol'
# lbp = binops.get(op.value, 0)
# right = expression_bare(ts, lbp - (ts.first.value in right_binding))
# left = Expr(left.start, right.stop, u'form', [op, left, right])
# elif on_postfix(left, ts) and rbp < postfixes.get(ts.first.value, 0):
# op = ts.advance()
# op.name = u'symbol'
# lbp = postfixes.get(op.value, 0)
# op.value = u'expr'+op.value
# left = Expr(left.start, op.stop, u'form', [op, left])
# else:
# break
# return left
#
#def terminal(ts):
# if match_some(ts.first, [u'symbol', u'string', u'int', u'hex', u'float']):
# return ts.advance()
# elif match(ts.first, u'lp'):
# lp = ts.advance()
# exps = expressions(ts)
# if not match(ts.first, u'rp'):
# raise space.Error(u"%s: form truncates at %s" % (lp.start.repr(), ts.position.repr()))
# rp = ts.advance()
# exp = Expr(lp.start, rp.stop, u'form', exps)
# exp.dcf = exp
# return exp
# elif match(ts.first, u'lb'):
# lb = ts.advance()
# exps = expressions(ts)
# if not match(ts.first, u'rb'):
# raise space.Error(u"%s: list truncates at %s" % (lb.start.repr(), ts.position.repr()))
# rb = ts.advance()
# exp = Expr(lb.start, rb.stop, u'list', exps)
# exp.dcf = exp
# return exp
# elif match(ts.first, u'lc'):
# lc = ts.advance()
# if match(ts.second, u'rc'):
# exp = ts.advance()
# exp.name = u'symbol'
# else:
# exp = expression(ts)
# rc = ts.advance()
# return exp
# elif match(ts.first, u'not'):
# op = ts.advance()
# op.name = u'symbol'
# exp = expression_chain(ts)
# return Expr(op.start, exp.stop, u'form', [op, exp])
# if ts.filled:
# raise space.Error(u"%s: expected term, got %s" % (ts.position.repr(), ts.first.value))
# raise space.Error(u"%s: expected term, got eof" % ts.position.repr())
#
#def match_some(t, names):
# return t is not None and t.name in names
#
#def match(t, name):
# return t is not None and t.name == name
#
#def on_prefix(ts):
# if match(ts.first, u'op') and ts.second is not None:
# return ts.first.stop.eq(ts.second.start)
# return False
#
#def on_binop(left, ts):
# if match(ts.first, u'op') and ts.second is not None:
# l = left.stop.eq(ts.first.start)
# r = ts.first.stop.eq(ts.second.start)
# return l == r
# return False
#
#def on_postfix(left, ts):
# if match(ts.first, u'op'):
# l = left.stop.eq(ts.first.start)
# r = ts.second is not None and ts.first.stop.eq(ts.second.start)
# return l and not r
# return False
| 33.712329 | 101 | 0.51131 | 1,059 | 7,383 | 3.542965 | 0.107649 | 0.059701 | 0.042644 | 0.058902 | 0.493337 | 0.428305 | 0.370469 | 0.347281 | 0.301706 | 0.235075 | 0 | 0.008228 | 0.292158 | 7,383 | 218 | 102 | 33.866972 | 0.709721 | 0.929297 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
f9822774f6eeeef1505a2759c5c6ae1c592518a6 | 760 | py | Python | VMEncryption/test/test_check_util.py | DecisionLab/azure-linux-extensions | b7de768d7b7e702c359301ff3ea23f61d7ee9ee7 | [
"Apache-2.0"
] | null | null | null | VMEncryption/test/test_check_util.py | DecisionLab/azure-linux-extensions | b7de768d7b7e702c359301ff3ea23f61d7ee9ee7 | [
"Apache-2.0"
] | null | null | null | VMEncryption/test/test_check_util.py | DecisionLab/azure-linux-extensions | b7de768d7b7e702c359301ff3ea23f61d7ee9ee7 | [
"Apache-2.0"
] | null | null | null | import unittest
import check_util
import console_logger
class TestCheckUtil(unittest.TestCase):
""" unit tests for functions in the check_util module """
def setUp(self):
self.logger = console_logger.ConsoleLogger()
self.cutil = check_util.CheckUtil(self.logger)
def test_appcompat(self):
self.assertFalse(self.cutil.is_app_compat_issue_detected())
def test_memory(self):
self.assertFalse(self.cutil.is_insufficient_memory())
def test_mount_scheme(self):
self.assertFalse(self.cutil.is_unsupported_mount_scheme())
def test_lvm_os(self):
self.assertFalse(self.cutil.is_invalid_lvm_os())
def test_precheck_failure(self):
self.assertFalse(self.cutil.is_precheck_failure())
| 30.4 | 67 | 0.730263 | 98 | 760 | 5.387755 | 0.408163 | 0.090909 | 0.179924 | 0.217803 | 0.284091 | 0.284091 | 0 | 0 | 0 | 0 | 0 | 0 | 0.172368 | 760 | 24 | 68 | 31.666667 | 0.839428 | 0.064474 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.294118 | 1 | 0.352941 | false | 0 | 0.176471 | 0 | 0.588235 | 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 | 0 | 1 | 0 | 0 | 3 |
f994bd2ea3188d7c486222c0c97e7c19f9d3c87b | 256 | py | Python | src/Task 2 - API/Authentication_Service.py | Darker97/Virtual-Shop | 7682feb8257856f2c2960bfb5773a8603432c8c6 | [
"MIT"
] | null | null | null | src/Task 2 - API/Authentication_Service.py | Darker97/Virtual-Shop | 7682feb8257856f2c2960bfb5773a8603432c8c6 | [
"MIT"
] | 1 | 2020-01-14T14:08:55.000Z | 2020-01-14T14:08:55.000Z | src/Task 2 - API/Authentication_Service.py | Darker97/Virtual-Shop | 7682feb8257856f2c2960bfb5773a8603432c8c6 | [
"MIT"
] | 1 | 2022-02-27T15:13:59.000Z | 2022-02-27T15:13:59.000Z | import requests
class Authentication_service:
def sendMessage( Adress, body):
file = open("./Authentication.setup")
FinalAdress = (file.readlines[0] + Adress)
sended = requests.get(FinalAdress, data=body)
return sended
| 28.444444 | 53 | 0.667969 | 26 | 256 | 6.538462 | 0.730769 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.005076 | 0.230469 | 256 | 8 | 54 | 32 | 0.857868 | 0 | 0 | 0 | 0 | 0 | 0.085938 | 0.085938 | 0 | 0 | 0 | 0 | 0 | 1 | 0.142857 | false | 0 | 0.142857 | 0 | 0.571429 | 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 | 0 | 0 | 1 | 0 | 0 | 3 |
f9bc2b710a32e7b864e5fa7aac590f748f9f006b | 74 | py | Python | Python/How long is that word/main.py | drtierney/hyperskill-problems | b74da993f0ac7bcff1cbd5d89a3a1b06b05f33e0 | [
"MIT"
] | 5 | 2020-08-29T15:15:31.000Z | 2022-03-01T18:22:34.000Z | Python/How long is that word/main.py | drtierney/hyperskill-problems | b74da993f0ac7bcff1cbd5d89a3a1b06b05f33e0 | [
"MIT"
] | null | null | null | Python/How long is that word/main.py | drtierney/hyperskill-problems | b74da993f0ac7bcff1cbd5d89a3a1b06b05f33e0 | [
"MIT"
] | 1 | 2020-12-02T11:13:14.000Z | 2020-12-02T11:13:14.000Z | word = input()
print(str.format("{0} has {1} letters", word, len(word)))
| 18.5 | 57 | 0.621622 | 12 | 74 | 3.833333 | 0.833333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.03125 | 0.135135 | 74 | 3 | 58 | 24.666667 | 0.6875 | 0 | 0 | 0 | 0 | 0 | 0.256757 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 3 |
f9d363292a07526276baded11aef14e2ba4be92b | 83 | py | Python | webhook_bot/hooks/__init__.py | Codevience-Bot/Webhook-Bot-Python | b92f98e0e3786e95026801f10415b7b3bf7324c7 | [
"BSD-2-Clause"
] | null | null | null | webhook_bot/hooks/__init__.py | Codevience-Bot/Webhook-Bot-Python | b92f98e0e3786e95026801f10415b7b3bf7324c7 | [
"BSD-2-Clause"
] | null | null | null | webhook_bot/hooks/__init__.py | Codevience-Bot/Webhook-Bot-Python | b92f98e0e3786e95026801f10415b7b3bf7324c7 | [
"BSD-2-Clause"
] | null | null | null | from .github import GITHUB_EVENT
HOOKS_LIST = {
'github': GITHUB_EVENT
}
| 13.833333 | 33 | 0.674699 | 10 | 83 | 5.3 | 0.6 | 0.415094 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.240964 | 83 | 5 | 34 | 16.6 | 0.84127 | 0 | 0 | 0 | 0 | 0 | 0.076923 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.25 | 0 | 0.25 | 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 | 0 | 0 | 0 | 3 |
f9defa90529a999b87c77a3d4c5446813642963d | 189 | py | Python | examples/plot_two_features.py | YeoLab/flotilla | 31da64567e59003c2b9c03fc8f4eb27ee62e299c | [
"MIT",
"BSD-3-Clause"
] | 98 | 2015-01-08T19:38:47.000Z | 2021-05-04T02:11:55.000Z | examples/plot_two_features.py | YeoLab/flotilla | 31da64567e59003c2b9c03fc8f4eb27ee62e299c | [
"MIT",
"BSD-3-Clause"
] | 123 | 2015-01-08T22:28:43.000Z | 2019-12-20T05:22:29.000Z | examples/plot_two_features.py | YeoLab/flotilla | 31da64567e59003c2b9c03fc8f4eb27ee62e299c | [
"MIT",
"BSD-3-Clause"
] | 27 | 2015-01-21T15:41:40.000Z | 2020-12-22T05:40:47.000Z | """
Compare gene expression in two features
======================================
"""
import flotilla
study = flotilla.embark(flotilla._brainspan)
study.plot_two_features('FOXP1', 'FOXJ1') | 27 | 44 | 0.619048 | 19 | 189 | 6 | 0.736842 | 0.192982 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.011494 | 0.079365 | 189 | 7 | 45 | 27 | 0.643678 | 0.412698 | 0 | 0 | 0 | 0 | 0.096154 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 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 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
ddb7da0e6bf240be2bb80fcb2d1970a5eb5da9a3 | 424 | py | Python | Scripts/__init__.py | muskanmahajan37/aa | 8cc72f8b36da0f76ba019a6d0200c33f951d5f57 | [
"MIT"
] | 3 | 2020-03-06T12:22:02.000Z | 2022-02-22T00:32:29.000Z | Scripts/__init__.py | muskanmahajan37/aa | 8cc72f8b36da0f76ba019a6d0200c33f951d5f57 | [
"MIT"
] | null | null | null | Scripts/__init__.py | muskanmahajan37/aa | 8cc72f8b36da0f76ba019a6d0200c33f951d5f57 | [
"MIT"
] | 2 | 2021-02-12T19:19:44.000Z | 2022-02-21T12:33:03.000Z | '''
The Python repository "AA" contains the scripts, data,
figures, and text for nudged Arctic Amplification (AA) and
Upper-troposphere Tropical Warming (UTW). The model is SC-WACCM4.
We are interested in the large-scale atmospheric response to
Arctic sea ice loss in AA simulations compared to sea-ice forcing.
See Peings, Cattiaux, and Magnusdottir, GRL (2019) for model set-up.
Author: Zachary Labe (zlabe@uci.edu)
'''
| 42.4 | 68 | 0.771226 | 66 | 424 | 4.954545 | 0.787879 | 0.036697 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.01385 | 0.148585 | 424 | 9 | 69 | 47.111111 | 0.891967 | 0.978774 | 0 | null | 0 | null | 0 | 0 | null | 0 | 0 | 0 | null | 1 | null | true | 0 | 0 | null | null | null | 0 | 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 | 3 |
ddd44404950bc90d482ea0396c96bc01174e0b9e | 123 | py | Python | c2_python-operating-system/6_bash-scripting/_scripts/random_exit.py | DrShams/google-it-automation | 37cd90aa7fec1f771c25b1ce4d770db13c489f9b | [
"MIT"
] | null | null | null | c2_python-operating-system/6_bash-scripting/_scripts/random_exit.py | DrShams/google-it-automation | 37cd90aa7fec1f771c25b1ce4d770db13c489f9b | [
"MIT"
] | null | null | null | c2_python-operating-system/6_bash-scripting/_scripts/random_exit.py | DrShams/google-it-automation | 37cd90aa7fec1f771c25b1ce4d770db13c489f9b | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import sys
import random
value=random.randint(0, 3)
print("Returning: " + str(value))
sys.exit(value)
| 13.666667 | 33 | 0.715447 | 19 | 123 | 4.631579 | 0.736842 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.027523 | 0.113821 | 123 | 8 | 34 | 15.375 | 0.779817 | 0.138211 | 0 | 0 | 0 | 0 | 0.104762 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.4 | 0 | 0.4 | 0.2 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
ddf32da54fe3951a64e954833c18f185e0aea4ea | 17,922 | py | Python | network100_1_circles.py | ufjfeng/jppsolver | 25cca2a50a1e50fffaad7d6ac158f83d03c6e924 | [
"BSD-2-Clause"
] | null | null | null | network100_1_circles.py | ufjfeng/jppsolver | 25cca2a50a1e50fffaad7d6ac158f83d03c6e924 | [
"BSD-2-Clause"
] | null | null | null | network100_1_circles.py | ufjfeng/jppsolver | 25cca2a50a1e50fffaad7d6ac158f83d03c6e924 | [
"BSD-2-Clause"
] | null | null | null | sample_pos_100_circle = {
(0, 12, 14, 28, 61, 76) : (0.6606687940575429, 0.12955294286970329, 0.1392231402857147),
(0, 14, 26, 28, 61, 76) : (0.6775622847685568, 0.0898623709846611, 0.14956067316950022),
(0, 11, 12, 14, 23, 28, 42, 44, 76, 79, 89) : (0.6065886283561139, 0.20320288122581232, 0.14005207871339437),
(0, 11, 12, 14, 23, 42, 44, 76, 79, 89, 98) : (0.5656826490913177, 0.22945537874500058, 0.14709530367632542),
(0, 12, 14, 23, 42, 44, 89, 90, 98) : (0.49723213477453154, 0.23278842941402605, 0.14874812754801625),
(0, 12, 14, 42, 43, 44, 89, 90, 98) : (0.4531982657491745, 0.21474447325341245, 0.14781957286366254),
(0, 12, 14, 42, 44, 60, 89, 90, 98) : (0.4269561884232388, 0.19727225941604984, 0.1493885409990972),
(1, 8, 15, 22, 27, 28, 51, 53, 62, 74, 76) : (0.846301261746641, 0.18166537169350574, 0.14397835552200322),
(1, 8, 13, 15, 27, 28, 39, 51, 53, 62, 74, 76) : (0.8485490407639608, 0.26577545830529575, 0.14237104291986868),
(1, 8, 13, 15, 27, 39, 51, 53, 55, 62, 74) : (0.8598700336382776, 0.2936319361757566, 0.14316008940627623),
(8, 13, 15, 27, 39, 51, 53, 55, 62, 74, 76) : (0.848475421386148, 0.2979123559117623, 0.1495723404911163),
(8, 15, 22, 27, 28, 51, 53, 61, 74, 76) : (0.8313716731911684, 0.15951059780677493, 0.14984734652985005),
(1, 15, 22, 26, 27, 28, 51, 53, 61, 74) : (0.8707649166253553, 0.12603886971740247, 0.14915740644860379),
(15, 22, 26, 27, 28, 51, 53, 61, 74, 76) : (0.8365094688174124, 0.15377823301715582, 0.1482384443600522),
(1, 8, 15, 27, 39, 51, 53, 55, 57, 62, 74) : (0.8744674026914928, 0.32488477158328966, 0.14993334330995228),
(8, 13, 27, 39, 51, 53, 55, 57, 62, 74, 76) : (0.8394379542077309, 0.3149880381645896, 0.14976819860224347),
(2, 7, 46, 54, 57, 77) : (0.8345091660588192, 0.583756096334454, 0.12229815996364714),
(2, 39, 46, 55, 57, 77) : (0.9084352576938933, 0.5098903011547264, 0.14572090388150585),
(2, 7, 46, 54, 67, 77, 78) : (0.812411509094655, 0.6641080591492242, 0.14888487099965556),
(2, 7, 35, 46, 54, 67, 77, 82, 95) : (0.8518389325402812, 0.6847232482307565, 0.14327587769420472),
(2, 7, 35, 54, 67, 77, 82, 93, 95) : (0.9204975034212663, 0.7431093346713038, 0.14939837995538113),
(3, 29, 30, 34, 45, 65, 86, 94, 97) : (0.1004320333187312, 0.25448500386219897, 0.13457985828835478),
(3, 30, 34, 45, 52, 65, 70, 86, 94, 97) : (0.13232166150446328, 0.1787966932430779, 0.14148065167771823),
(3, 30, 33, 45, 52, 65, 70, 86, 94, 97) : (0.10213454221898952, 0.158512554500736, 0.14562465660768442),
(3, 30, 34, 45, 52, 60, 65, 86, 94, 97) : (0.16328756540749167, 0.2126428426271769, 0.14578456301618062),
(3, 34, 45, 52, 60, 65, 70, 86, 94, 97) : (0.17797832456706061, 0.19683196747732873, 0.14011636481529072),
(3, 30, 34, 45, 50, 60, 65, 86, 94, 97) : (0.1553910862561932, 0.23765246912401705, 0.14827548821813938),
(29, 30, 34, 45, 50, 60, 65, 86, 94, 97) : (0.15000102162768236, 0.30018732583286084, 0.14984415048071437),
(4, 9, 10, 20, 38, 75, 81) : (0.4003130616293591, 0.8285844456813044, 0.1480307501034011),
(4, 9, 10, 38, 48, 75, 81) : (0.38580428031766406, 0.8561990999547606, 0.14870245579695562),
(4, 9, 17, 20, 21, 38, 48, 75, 81, 85) : (0.3287611424267173, 0.7727174414557608, 0.14875929774485536),
(4, 9, 21, 38, 48, 68, 75, 81) : (0.35085609036236404, 0.829788163067764, 0.14875398876294763),
(4, 10, 18, 48, 68, 75, 81) : (0.37649547612262557, 0.8951760847630872, 0.14919996648688127),
(4, 9, 19, 20, 21, 38, 49, 75, 85) : (0.41640100306849537, 0.705093150372995, 0.14015996098823705),
(4, 9, 17, 20, 21, 38, 64, 75, 81, 85) : (0.33085298603236063, 0.7418399215994397, 0.14487972439785962),
(4, 17, 20, 21, 38, 48, 64, 75, 81, 85) : (0.3193974850937622, 0.7680632820869213, 0.1474266580607778),
(4, 9, 17, 20, 21, 38, 49, 64, 75, 85) : (0.34114170574087294, 0.6969174305624999, 0.14405921509093017),
(9, 19, 20, 38, 49, 75, 87) : (0.5006885871277305, 0.7412338818491877, 0.1451388894436533),
(4, 9, 10, 75, 80, 81) : (0.4019264767473983, 0.8734149403352809, 0.14482927195072062),
(4, 10, 18, 48, 75, 80, 81) : (0.3830407940310534, 0.8944881167840582, 0.14681390420878215),
(4, 18, 32, 48, 56, 68, 69, 75, 81) : (0.3229807880040072, 0.8650666484497739, 0.14809708296773283),
(4, 10, 18, 48, 56, 68, 80, 81) : (0.37683713029076393, 0.911312260609274, 0.14832443190916603),
(4, 17, 21, 32, 38, 48, 64, 66, 68, 69, 75, 81, 85) : (0.28091256649751173, 0.7845716212169753, 0.141585496443792),
(4, 18, 21, 32, 38, 48, 64, 66, 68, 69, 75, 81) : (0.28070798853230206, 0.8090664742306333, 0.14931465362464058),
(4, 17, 20, 21, 38, 64, 66, 75, 81, 85) : (0.29785238436809, 0.7234263474491083, 0.1490540650472151),
(4, 18, 21, 32, 48, 56, 66, 68, 69, 81, 96) : (0.26699140597300897, 0.8495296776189856, 0.14875348880939057),
(4, 18, 21, 32, 38, 48, 64, 66, 68, 69, 81, 96) : (0.25527949109936104, 0.8106316384539816, 0.1445317451825426),
(4, 17, 21, 32, 38, 48, 64, 66, 68, 69, 81, 85, 96) : (0.23217561230891856, 0.7805372979198325, 0.14511838625757928),
(4, 9, 10, 19, 20, 38, 71, 75, 87) : (0.4775129839401001, 0.7927769793318314, 0.14462380860637297),
(4, 9, 10, 20, 71, 75, 80, 87) : (0.4747088359878572, 0.8297948931425277, 0.14678768577566298),
(9, 10, 19, 20, 71, 75, 80, 87) : (0.502030117116463, 0.8236087646816392, 0.14943676014695212),
(4, 18, 32, 48, 56, 58, 66, 68, 69, 72, 81, 96) : (0.21696064154531802, 0.874101533075222, 0.13041150648755526),
(4, 18, 21, 32, 48, 58, 64, 66, 68, 69, 72, 81, 96) : (0.20114669372366326, 0.8301128240778305, 0.1493335313715823),
(4, 17, 21, 38, 64, 66, 69, 81, 85, 99) : (0.21769657381971141, 0.7313388234347639, 0.14701057273298804),
(4, 17, 21, 32, 48, 64, 66, 69, 81, 85, 96, 99) : (0.2015477050911515, 0.7529044317010726, 0.1494589238432731),
(20, 25, 31, 49, 59, 84) : (0.4258087319921411, 0.5401043228214542, 0.14745116571790448),
(5, 24, 25, 31, 41, 43, 49, 59, 84, 90) : (0.37662482838264727, 0.4751123959489456, 0.1496946360540124),
(5, 17, 20, 24, 25, 31, 38, 41, 49, 85) : (0.3622865226400378, 0.5612057389900295, 0.14877040889503995),
(5, 17, 21, 24, 25, 31, 38, 41, 49, 85) : (0.3397797027650458, 0.5662701001128034, 0.14899731011520068),
(17, 20, 21, 24, 25, 31, 38, 41, 49, 85) : (0.3529122532222511, 0.5772058553558765, 0.145641194646832),
(5, 24, 25, 31, 41, 43, 50, 84, 90) : (0.36744835703496576, 0.44513805791935623, 0.149017727518376),
(5, 17, 24, 25, 41, 50) : (0.25238459020708376, 0.49714842367609063, 0.14920289957040228),
(5, 24, 25, 31, 43, 50, 59, 83, 84, 90) : (0.3742525826195432, 0.4225237020811445, 0.14492114513872695),
(5, 11, 23, 31, 43, 44, 59, 63, 84, 89, 90) : (0.46586820074056295, 0.38692285503826956, 0.14938930201395317),
(5, 25, 31, 43, 50, 59, 60, 83, 84, 90) : (0.37465236999713214, 0.3967343268979738, 0.14793274615561394),
(5, 24, 25, 31, 43, 50, 60, 83, 84, 90) : (0.3666595366409718, 0.4029451066437212, 0.14935861884170346),
(5, 24, 25, 31, 41, 43, 50, 60, 83, 90) : (0.3374953446014549, 0.40768326591677895, 0.14271109555895584),
(5, 11, 23, 31, 43, 44, 59, 84, 89, 90, 98) : (0.46179357379075087, 0.37130700578519776, 0.14959106548201262),
(5, 31, 43, 44, 50, 59, 60, 83, 84, 89, 90, 98) : (0.3992944529514407, 0.34835251138844014, 0.14481894164813303),
(5, 24, 25, 34, 41, 43, 50, 60, 83, 86, 90) : (0.2643514690001076, 0.38046461029115597, 0.13200682283744283),
(5, 42, 43, 44, 59, 60, 83, 84, 89, 90, 98) : (0.4251496043395029, 0.314317932764338, 0.14818426431967247),
(5, 42, 43, 44, 50, 60, 83, 89, 90, 98) : (0.3896204611486524, 0.2884476340796184, 0.14766772614257698),
(5, 34, 43, 50, 60, 65, 83, 89, 90, 98) : (0.35484204032889544, 0.28298632126058126, 0.14896339447527998),
(5, 24, 34, 41, 43, 50, 60, 65, 83, 86, 90) : (0.24186208866496334, 0.35381703763650374, 0.147248332994493),
(42, 43, 50, 60, 65, 83, 89, 90, 98) : (0.3648226358119667, 0.2529208238960593, 0.14563258715152547),
(5, 17, 21, 24, 25, 41, 64, 85) : (0.26509967721642796, 0.5547482058021883, 0.1467474135798299),
(17, 20, 21, 24, 25, 38, 41, 49, 64, 85) : (0.3204205925258258, 0.6110698164118312, 0.1433963240190826),
(5, 24, 34, 41, 50, 60, 65, 83, 86, 94) : (0.1963459614878132, 0.354221443943041, 0.1499119871156634),
(5, 34, 43, 50, 60, 65, 83, 86, 90, 97, 98) : (0.2786672893971936, 0.2764212575028138, 0.148038361569061),
(6, 8, 13, 36, 39, 46, 57, 79, 91) : (0.7812938642651628, 0.40869196155963294, 0.1483179196387932),
(6, 11, 13, 36, 39, 46, 57, 63, 79, 91) : (0.7400403080009023, 0.4149028417553895, 0.14959527944822024),
(6, 11, 13, 23, 36, 40, 46, 57, 63, 79, 91) : (0.6955733914381548, 0.4466149890794219, 0.14332938261511524),
(6, 11, 23, 36, 40, 46, 59, 63, 91) : (0.661799803852757, 0.47465268914249026, 0.14990023270177139),
(6, 11, 13, 23, 36, 40, 57, 59, 63, 79, 91) : (0.6674444223364877, 0.44592897980175666, 0.1493799596176158),
(6, 8, 11, 13, 23, 36, 39, 57, 63, 76, 79, 91) : (0.7479505156724652, 0.3543364256041871, 0.14504949210030488),
(6, 36, 40, 46, 57, 78) : (0.6989923716784051, 0.5550188424375802, 0.14881436260536204),
(6, 11, 13, 23, 36, 40, 44, 59, 63, 79, 84, 91) : (0.6121508102053388, 0.4160214927121739, 0.13919367839740476),
(6, 11, 23, 31, 36, 40, 44, 59, 63, 79, 84, 91) : (0.5840006753840745, 0.425262952856729, 0.13453194363310325),
(6, 7, 40, 46, 54, 57, 78) : (0.7359758275738826, 0.5714274758487573, 0.1459224915245561),
(6, 19, 40, 46, 54, 78) : (0.6804138212873839, 0.6024152093385852, 0.14958356907798287),
(7, 19, 40, 46, 54, 78) : (0.7001663606329307, 0.6736530749126453, 0.145581886573751),
(6, 11, 12, 23, 31, 36, 44, 59, 63, 79, 84, 89, 91) : (0.5546692350232861, 0.3748947382581936, 0.1404608810549469),
(6, 11, 12, 13, 23, 36, 44, 59, 63, 76, 79, 84, 89, 91) : (0.6158471277538801, 0.33210754135354276, 0.13695160632128495),
(6, 19, 40, 49, 78) : (0.5898959630882554, 0.5849837349401764, 0.1395478206848745),
(6, 19, 31, 40, 49, 59, 84) : (0.5508159716065527, 0.5507115624444804, 0.13320543730746362),
(6, 31, 40, 49, 59, 63, 84) : (0.5334868035040657, 0.4969112537149139, 0.13520536905611247),
(6, 11, 12, 23, 31, 43, 44, 59, 63, 79, 84, 89, 90, 91) : (0.5248341660288149, 0.3695285456138079, 0.14898478769694384),
(16, 19, 40, 54, 78) : (0.648734030229264, 0.69772769100568, 0.14566639395175016),
(7, 16, 19, 54, 78, 92) : (0.7017301747157373, 0.7018096583710086, 0.14788217314648738),
(7, 35, 46, 54, 67, 77, 78, 92, 95) : (0.8016668768331154, 0.7050427315864585, 0.14885954882353508),
(7, 35, 54, 67, 77, 78, 82, 92, 95) : (0.8126860837487624, 0.7390030277575786, 0.14963827070744815),
(7, 35, 54, 67, 77, 82, 92, 93, 95) : (0.8541983606053255, 0.7617510039302191, 0.13551854101469707),
(7, 16, 35, 54, 67, 78, 92, 93, 95) : (0.7835123617757969, 0.7940004134527878, 0.14850931037307125),
(7, 35, 54, 67, 73, 82, 92, 93, 95) : (0.8680257488645291, 0.8105733497073806, 0.14461010599432164),
(16, 35, 54, 67, 73, 92, 93, 95) : (0.8039052049993555, 0.8358136241307832, 0.1460176815171897),
(8, 13, 27, 28, 36, 39, 51, 62, 74, 76, 79) : (0.7864858215585857, 0.29075158032698684, 0.14961460741813482),
(8, 13, 27, 28, 36, 39, 62, 74, 76, 79, 91) : (0.7851472504933936, 0.30671346343945144, 0.14266494791580994),
(8, 13, 27, 36, 39, 57, 62, 74, 76, 79, 91) : (0.7947045059120503, 0.31997763795542744, 0.14446794140299074),
(8, 11, 13, 23, 27, 28, 36, 74, 76, 79, 91) : (0.7372472238258292, 0.2715103777107627, 0.14815884891492234),
(8, 11, 13, 23, 36, 39, 57, 74, 76, 79, 91) : (0.7536701632685218, 0.3264131965382456, 0.1499762709695208),
(8, 11, 13, 23, 28, 36, 39, 63, 74, 76, 79, 91) : (0.7432076014100258, 0.3161679754031407, 0.14735220435952692),
(8, 13, 36, 39, 55, 57, 62, 74) : (0.8270244719636314, 0.3463770009824643, 0.14816894016641344),
(8, 13, 36, 39, 46, 55, 57) : (0.8315524471930096, 0.4208862595245414, 0.14308143530640893),
(9, 19, 20, 49, 75, 78, 87) : (0.526255574364575, 0.7284182151763334, 0.1445142284421115),
(9, 10, 16, 19, 20, 71, 75, 78, 87) : (0.5503029395762983, 0.7725028563327712, 0.1379855198507884),
(9, 19, 20, 40, 49, 75, 78) : (0.5308236138060022, 0.6654717052596012, 0.14166070888466),
(9, 16, 19, 40, 78) : (0.6152792270448181, 0.7022038051249079, 0.14724540705027672),
(9, 19, 20, 31, 38, 49, 75, 85) : (0.4397878732528429, 0.6157549414177731, 0.1379389073709895),
(9, 19, 20, 31, 40, 49, 75) : (0.48958920540021267, 0.6234521812075917, 0.14685558331482343),
(9, 10, 16, 19, 71, 75, 80, 87) : (0.5310332240866265, 0.8284058748099863, 0.14651673216295627),
(9, 10, 16, 19, 71, 78, 87, 92) : (0.6106510896880954, 0.7958501908923952, 0.1430714723104721),
(10, 16, 71, 80, 87, 92) : (0.6264282483677088, 0.9079762183947514, 0.1358534990005984),
(11, 12, 23, 31, 42, 43, 44, 59, 63, 84, 89, 90, 98) : (0.4776061998845129, 0.3308921514293687, 0.14948378198882384),
(11, 12, 14, 23, 42, 43, 44, 59, 63, 79, 84, 89, 90, 98) : (0.5190100909516181, 0.3024309974602939, 0.1461597643756266),
(11, 12, 23, 31, 43, 44, 59, 63, 79, 84, 89, 90, 98) : (0.5167680750767972, 0.3408073723414071, 0.1494775277829455),
(11, 12, 14, 23, 42, 44, 59, 63, 79, 84, 89, 90, 91, 98) : (0.5353432225094631, 0.3092813311287071, 0.14961247846229375),
(11, 12, 23, 42, 43, 44, 59, 63, 79, 84, 89, 90, 91, 98) : (0.5269080789204658, 0.3272778263063749, 0.1492860996243205),
(11, 12, 14, 23, 42, 44, 63, 76, 79, 89, 98) : (0.5651889224135658, 0.24974452994663424, 0.1481860442866704),
(11, 12, 13, 14, 23, 42, 44, 59, 63, 76, 79, 84, 89, 91) : (0.5810248153025497, 0.297301468717096, 0.14553280939641036),
(11, 12, 13, 14, 23, 36, 44, 59, 63, 76, 79, 84, 89, 91) : (0.59020808374762, 0.30242702351356676, 0.14518706205274268),
(11, 12, 13, 14, 23, 28, 42, 44, 63, 76, 79, 89, 91) : (0.6206933635449503, 0.24682154651736443, 0.14397395607960825),
(11, 12, 13, 14, 23, 28, 36, 44, 63, 76, 79, 89, 91) : (0.6443421994012091, 0.27263136238807373, 0.1418464361759105),
(11, 12, 13, 14, 23, 28, 74, 76, 79, 91) : (0.6865690251676432, 0.23557064983017745, 0.1497576533972519),
(11, 12, 13, 23, 28, 36, 63, 74, 76, 79, 91) : (0.7095105226389335, 0.27798372862136267, 0.145811382266761),
(12, 13, 27, 28, 74, 76, 79) : (0.7163112725430478, 0.21385230043077974, 0.14778176906674004),
(12, 14, 28, 61, 74, 76) : (0.692614694039914, 0.15857646831069733, 0.14455379460889162),
(12, 23, 42, 43, 44, 59, 83, 84, 89, 90, 98) : (0.4563543195907547, 0.31480881243674935, 0.14922880337038014),
(12, 23, 31, 43, 44, 59, 83, 84, 89, 90, 98) : (0.45419723615723284, 0.32960642809424645, 0.1499761920887504),
(12, 14, 42, 43, 44, 60, 83, 89, 90, 98) : (0.42955231039420116, 0.2226100668877384, 0.14110959536132095),
(12, 42, 43, 44, 59, 60, 83, 84, 89, 90, 98) : (0.4402325483015652, 0.3046223156987031, 0.14721181227676056),
(14, 22, 28, 61, 74, 76) : (0.7017172984423354, 0.12325899188468137, 0.14999980732453855),
(14, 22, 26, 28, 61, 76) : (0.6912503728261168, 0.10016189310233165, 0.14784082552996525),
(16, 19, 54, 71, 78, 87, 92) : (0.6703761804849702, 0.7581413028998242, 0.13727248723415264),
(16, 54, 71, 78, 87, 92, 95) : (0.7055796088125853, 0.8042768799273943, 0.13751533041746666),
(16, 71, 92, 93, 95) : (0.748680649656, 0.8792981719129548, 0.14810534432725672),
(16, 35, 47, 73, 92, 93, 95) : (0.7973963974798904, 0.8730772012592461, 0.14251677211486202),
(17, 20, 21, 25, 38, 49, 64, 75, 85) : (0.33122073385849954, 0.6424372081216861, 0.140272333871763),
(17, 20, 21, 25, 31, 38, 49, 75, 85) : (0.3899560099849434, 0.6080529827711362, 0.14686618715840474),
(17, 21, 24, 25, 38, 41, 64, 66, 85, 99) : (0.2324845209042679, 0.6381836480533993, 0.14541606090517503),
(17, 21, 24, 25, 41, 64, 66, 85, 88, 99) : (0.17759327332460764, 0.6154216464660676, 0.14680527616816053),
(17, 21, 64, 66, 69, 85, 88, 99) : (0.1700753673132927, 0.7010807602993253, 0.14829695794446568),
(17, 21, 64, 66, 69, 88, 96, 99) : (0.14057040165146145, 0.7404980045079362, 0.14458712542500857),
(21, 32, 64, 66, 69, 88, 96, 99) : (0.13589958287585685, 0.7521082386304109, 0.14938908416349977),
(32, 37, 48, 58, 64, 66, 68, 69, 72, 81, 96) : (0.1587853817899879, 0.8265085757585824, 0.14669323412266905),
(18, 32, 37, 48, 56, 58, 66, 68, 69, 72, 81, 96) : (0.1565898330981594, 0.900576785386657, 0.14039118879912008),
(19, 20, 31, 40, 49, 59, 84) : (0.4955100051053224, 0.5592196556545426, 0.13807852710419102),
(29, 88) : (0.021898984551369127, 0.498905674871803, 0.14491984926943427),
(24, 29, 34, 41, 50, 86, 94) : (0.15186115338348286, 0.38521837733842534, 0.14484075712621175),
(29, 30, 34, 41, 50, 86, 94) : (0.1318289821876929, 0.3907884062675565, 0.14663186091122857),
(30, 34, 45, 50, 60, 65, 83, 86, 94, 97) : (0.17218506307174686, 0.2745348904559653, 0.13778262145170894),
(34, 45, 52, 60, 65, 70, 83, 86, 94, 97) : (0.1946945060242287, 0.20205232918260238, 0.14600384549982623),
(34, 45, 50, 60, 65, 70, 83, 86, 94, 97) : (0.1984942686851189, 0.20938746372536046, 0.14945353002055525),
(32, 37, 48, 64, 66, 69, 81, 96, 99) : (0.13998817052833173, 0.7858689353702485, 0.14814097529549805),
(32, 37, 64, 66, 69, 88, 96, 99) : (0.111022615751386, 0.7676327866502684, 0.1464828433048606),
(34, 60, 65, 70, 83, 86, 97, 98) : (0.27881170846041564, 0.18823061782622416, 0.14535381423478827),
(35, 47, 67, 73, 82, 92, 93, 95) : (0.8668407448339298, 0.8654424303052715, 0.12317143039084451),
}
| 106.047337 | 126 | 0.649648 | 2,559 | 17,922 | 4.548652 | 0.235248 | 0.00567 | 0.008247 | 0.009622 | 0.193729 | 0.139863 | 0.087285 | 0.066409 | 0.054381 | 0.037629 | 0 | 0.782038 | 0.170572 | 17,922 | 168 | 127 | 106.678571 | 0.001009 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
fb096d6d25705c7eaa9b7bf75e259490d489b1f4 | 22 | py | Python | python/testData/resolve/multiFile/dunderAll/mypackage.py | truthiswill/intellij-community | fff88cfb0dc168eea18ecb745d3e5b93f57b0b95 | [
"Apache-2.0"
] | 2 | 2019-04-28T07:48:50.000Z | 2020-12-11T14:18:08.000Z | python/testData/resolve/multiFile/dunderAll/mypackage.py | truthiswill/intellij-community | fff88cfb0dc168eea18ecb745d3e5b93f57b0b95 | [
"Apache-2.0"
] | 173 | 2018-07-05T13:59:39.000Z | 2018-08-09T01:12:03.000Z | python/testData/resolve/multiFile/dunderAll/mypackage.py | truthiswill/intellij-community | fff88cfb0dc168eea18ecb745d3e5b93f57b0b95 | [
"Apache-2.0"
] | 2 | 2020-03-15T08:57:37.000Z | 2020-04-07T04:48:14.000Z | __all__ = ["dostuff"]
| 11 | 21 | 0.636364 | 2 | 22 | 5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.136364 | 22 | 1 | 22 | 22 | 0.526316 | 0 | 0 | 0 | 0 | 0 | 0.318182 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
348a854f009720cb83d02d19d9638ec2e1791658 | 6,757 | py | Python | override.py | vsk-1167/5G-rnaseq-sandbox | c94a993a27f87cf6e562c8e00b7a3384c7618094 | [
"MIT"
] | null | null | null | override.py | vsk-1167/5G-rnaseq-sandbox | c94a993a27f87cf6e562c8e00b7a3384c7618094 | [
"MIT"
] | null | null | null | override.py | vsk-1167/5G-rnaseq-sandbox | c94a993a27f87cf6e562c8e00b7a3384c7618094 | [
"MIT"
] | 1 | 2020-10-01T00:20:13.000Z | 2020-10-01T00:20:13.000Z | # python dict of naming overrides
GENE_NAME_OVERRIDE = {
# pmmo Genes
'EQU24_RS19315':'pmoC',
'EQU24_RS19310':'pmoA',
'EQU24_RS19305':'pmoB',
# smmo Genes
'EQU24_RS05930':'mmoR',
'EQU24_RS05925':'mmoG',
'EQU24_RS05910':'mmoC',
'EQU24_RS05900':'mmoZ',
'EQU24_RS05895':'mmoB',
'EQU24_RS05890':'mmoY',
'EQU24_RS05885':'mmoX',
# groEL/groES genes
'EQU24_RS17825':'groS',
'EQU24_RS08650':'groS',
# mxaF genes (mxa and mox)
'EQU24_RS18155':'mxaD',
'EQU24_RS18140':'moxF',
'EQU24_RS18125':'moxI',
'EQU24_RS18120':'moxR',
'EQU24_RS18115':'mxaP', # via blast
'EQU24_RS18110':'mxaS',
'EQU24_RS18105':'mxaA',
'EQU24_RS18100':'mxaC',
'EQU24_RS18095':'mxaK',
'EQU24_RS18090':'mxaL',
'EQU24_RS18145':'mxaB',
# Xox
'EQU24_RS18610':'xoxJ',
'EQU24_RS18605':'xoxF'
}
GENE_PRODUCT_OVERRIDE = {
'EQU24_RS05925':'likely chaperone for smmo',
}
SYS_LOOKUP = {
#pmo
'EQU24_RS19315':'pmo',
'EQU24_RS19310':'pmo',
'EQU24_RS19305':'pmo',
# smo
'EQU24_RS05910':'smo',
'EQU24_RS05905':'smo',
'EQU24_RS05900':'smo',
'EQU24_RS05895':'smo',
'EQU24_RS05890':'smo',
'EQU24_RS05885':'smo',
'EQU24_RS05930':'smo',
'EQU24_RS05925':'smo',
# mxa
'EQU24_RS18145':'mox',
'EQU24_RS18140':'mox',
'EQU24_RS18135':'mox',
'EQU24_RS18130':'mox',
'EQU24_RS18125':'mox',
'EQU24_RS18120':'mox',
'EQU24_RS18115':'mox',
'EQU24_RS18110':'mox',
'EQU24_RS18105':'mox',
'EQU24_RS18100':'mox',
'EQU24_RS18095':'mox',
'EQU24_RS18090':'mox',
# xox
'EQU24_RS18605':'xox',
'EQU24_RS18610':'xox',
#groEL/ES
# 'EQU24_RS17825':'gro',
# 'EQU24_RS17820':'gro',
# 'EQU24_RS08655':'gro',
# 'EQU24_RS08650':'gro',
#pilin
'EQU24_RS04275':'pilin',
'EQU24_RS01095':'pilin',
'EQU24_RS16035':'pilin',
'EQU24_RS03345':'pilin',
'EQU24_RS16020':'pilin',
'EQU24_RS19380':'pilin',
'EQU24_RS00705':'pilin',
'EQU24_RS04470':'pilin',
'EQU24_RS12830':'pilin',
'EQU24_RS04480':'pilin',
'EQU24_RS12835':'pilin',
'EQU24_RS04490':'pilin',
'EQU24_RS04485':'pilin',
'EQU24_RS03355':'pilin',
'EQU24_RS00710':'pilin',
'EQU24_RS05130':'pilin',
'EQU24_RS19585':'pilin',
'EQU24_RS04615':'pilin',
'EQU24_RS05525':'pilin',
'EQU24_RS16025':'pilin',
'EQU24_RS05135':'pilin',
'EQU24_RS12840':'pilin',
'EQU24_RS04585':'pilin',
'EQU24_RS04610':'pilin',
'EQU24_RS04595':'pilin',
'EQU24_RS04600':'pilin',
# secretion
'EQU24_RS19520':'secretion',
'EQU24_RS11235':'secretion',
'EQU24_RS15565':'secretion',
'EQU24_RS06345':'secretion',
'EQU24_RS05115':'secretion',
'EQU24_RS15560':'secretion',
'EQU24_RS11240':'secretion',
'EQU24_RS11280':'secretion',
'EQU24_RS11210':'secretion',
'EQU24_RS11245':'secretion',
'EQU24_RS11180':'secretion',
'EQU24_RS20155':'secretion',
'EQU24_RS15945':'secretion',
'EQU24_RS05120':'secretion',
'EQU24_RS11270':'secretion',
'EQU24_RS11275':'secretion',
'EQU24_RS11250':'secretion',
'EQU24_RS11260':'secretion',
'EQU24_RS20160':'secretion',
'EQU24_RS05110':'secretion',
'EQU24_RS04490':'secretion',
'EQU24_RS03350':'secretion',
'EQU24_RS11255':'secretion',
'EQU24_RS15930':'secretion',
'EQU24_RS16015':'secretion',
'EQU24_RS11215':'secretion',
'EQU24_RS11220':'secretion',
'EQU24_RS11205':'secretion',
'EQU24_RS11190':'secretion',
'EQU24_RS19490':'secretion',
'EQU24_RS05160':'secretion',
'EQU24_RS05105':'secretion',
'EQU24_RS16000':'secretion',
'EQU24_RS19465':'secretion',
'EQU24_RS15995':'secretion',
'EQU24_RS01525':'secretion',
'EQU24_RS05405':'secretion',
'EQU24_RS11175':'secretion',
'EQU24_RS10950':'secretion',
#toxin
'EQU24_RS11700':'toxin',
'EQU24_RS14175':'toxin',
'EQU24_RS18440':'toxin',
'EQU24_RS20880':'toxin',
'EQU24_RS07550':'toxin',
'EQU24_RS11705':'toxin',
'EQU24_RS07535':'toxin',
'EQU24_RS08075':'toxin',
'EQU24_RS02930':'toxin',
'EQU24_RS21185':'toxin',
'EQU24_RS21860':'toxin',
'EQU24_RS17985':'toxin',
'EQU24_RS07545':'toxin',
'EQU24_RS18405':'toxin',
'EQU24_RS00235':'toxin',
'EQU24_RS19535':'toxin',
'EQU24_RS10190':'toxin',
'EQU24_RS08220':'toxin',
'EQU24_RS21865':'toxin',
'EQU24_RS15430':'toxin',
'EQU24_RS20925':'toxin',
'EQU24_RS04285':'toxin',
'EQU24_RS10850':'toxin',
'EQU24_RS20920':'toxin',
'EQU24_RS08175':'toxin',
'EQU24_RS08180':'toxin',
'EQU24_RS08210':'toxin',
'EQU24_RS13090':'toxin',
'EQU24_RS20735':'toxin',
'EQU24_RS04320':'toxin',
'EQU24_RS20730':'toxin',
'EQU24_RS01855':'toxin',
'EQU24_RS10855':'toxin',
'EQU24_RS19540':'toxin',
'EQU24_RS20010':'toxin',
'EQU24_RS20725':'toxin',
'EQU24_RS08130':'toxin',
'EQU24_RS15455':'toxin',
'EQU24_RS13520':'toxin',
'EQU24_RS08065':'toxin',
'EQU24_RS04325':'toxin',
'EQU24_RS01485':'toxin',
'EQU24_RS05330':'toxin',
'EQU24_RS20720':'toxin',
'EQU24_RS13725':'toxin',
'EQU24_RS20935':'toxin',
'EQU24_RS08135':'toxin',
'EQU24_RS01930':'toxin',
'EQU24_RS17920':'toxin',
'EQU24_RS20265':'toxin',
'EQU24_RS16915':'toxin',
'EQU24_RS07460':'toxin',
'EQU24_RS01935':'toxin',
'EQU24_RS22115':'toxin',
'EQU24_RS19020':'toxin',
'EQU24_RS04380':'toxin',
'EQU24_RS04110':'toxin',
'EQU24_RS00215':'toxin',
'EQU24_RS01345':'toxin',
'EQU24_RS07575':'toxin',
'EQU24_RS00220':'toxin',
'EQU24_RS20270':'toxin',
'EQU24_RS05325':'toxin',
'EQU24_RS16470':'toxin',
'EQU24_RS17375':'toxin',
'EQU24_RS12475':'toxin',
'EQU24_RS16330':'toxin',
'EQU24_RS12820':'toxin',
'EQU24_RS12825':'toxin',
'EQU24_RS08850':'toxin',
'EQU24_RS08845':'toxin',
# 5152
'EQU24_RS19480':'5152',
'EQU24_RS19490':'5152',
'EQU24_RS19495':'5152',
'EQU24_RS19515':'5152',
'EQU24_RS19510':'5152',
'EQU24_RS19505':'5152',
'EQU24_RS19470':'5152',
'EQU24_RS19460':'5152',
'EQU24_RS19450':'5152',
# repressible no 5152
'EQU24_RS10650':'RepCurCu-no5152',
'EQU24_RS15800':'RepCurCu-no5152',
'EQU24_RS01900':'RepCurCu-no5152',
'EQU24_RS21005':'RepCurCu-no5152',
'EQU24_RS02325':'RepCurCu-no5152',
'EQU24_RS05885':'RepCurCu-no5152',
'EQU24_RS21000':'RepCurCu-no5152',
'EQU24_RS00670':'RepCurCu-no5152',
'EQU24_RS05870':'RepCurCu-no5152',
'EQU24_RS10665':'RepCurCu-no5152',
'EQU24_RS05880':'RepCurCu-no5152',
'EQU24_RS05905':'RepCurCu-no5152',
'EQU24_RS05915':'RepCurCu-no5152',
'EQU24_RS05920':'RepCurCu-no5152',
'EQU24_RS05925':'RepCurCu-no5152'
}
| 27.136546 | 46 | 0.633861 | 704 | 6,757 | 5.771307 | 0.352273 | 0.174748 | 0.065469 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.286299 | 0.16827 | 6,757 | 248 | 47 | 27.245968 | 0.436655 | 0.042326 | 0 | 0 | 0 | 0 | 0.626454 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
349c60990a782d76cc99097142b2fdda626dcb5b | 187 | py | Python | video.py | zj-zhoujun/flower | 8608262913689842b492954b404f5e19be5b58d5 | [
"FSFAP"
] | null | null | null | video.py | zj-zhoujun/flower | 8608262913689842b492954b404f5e19be5b58d5 | [
"FSFAP"
] | null | null | null | video.py | zj-zhoujun/flower | 8608262913689842b492954b404f5e19be5b58d5 | [
"FSFAP"
] | null | null | null | import requests
import re
urls = "http://ip/PSIA/System/deviceinfo"
r = requests.get(url=urls,auth=('admin','123456'))
deviceName = re.findall(r'<deviceName>(.+?)</deviceName>',r.text)[0] | 37.4 | 68 | 0.705882 | 27 | 187 | 4.888889 | 0.703704 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.04 | 0.064171 | 187 | 5 | 68 | 37.4 | 0.714286 | 0 | 0 | 0 | 0 | 0 | 0.388298 | 0.159574 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.4 | 0 | 0.4 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
34b2d0718d06b08edf4887b00ecbff883946ec90 | 92 | py | Python | main.py | tonikarppi/py-ext-sample | aa96936509414d3177af347470172a1b310bf011 | [
"MIT"
] | null | null | null | main.py | tonikarppi/py-ext-sample | aa96936509414d3177af347470172a1b310bf011 | [
"MIT"
] | null | null | null | main.py | tonikarppi/py-ext-sample | aa96936509414d3177af347470172a1b310bf011 | [
"MIT"
] | null | null | null | import fibonacci
print(fibonacci.version())
result = fibonacci.fib(1000000)
print(result)
| 13.142857 | 31 | 0.782609 | 11 | 92 | 6.545455 | 0.636364 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.084337 | 0.097826 | 92 | 6 | 32 | 15.333333 | 0.783133 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.25 | 0 | 0.25 | 0.5 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 3 |
551cfdf7d0f13e21c03046af1b54f953056816b5 | 13,455 | py | Python | graphipy/api/pinterest_api.py | Stanshi123/USDE | 684d15044dda92f261aa3419f022fd89d05795ae | [
"MIT"
] | 62 | 2018-11-28T00:15:45.000Z | 2022-03-23T00:44:34.000Z | graphipy/api/pinterest_api.py | Stanshi123/USDE | 684d15044dda92f261aa3419f022fd89d05795ae | [
"MIT"
] | 1 | 2019-04-16T01:45:00.000Z | 2019-04-16T01:45:00.000Z | graphipy/api/pinterest_api.py | Stanshi123/USDE | 684d15044dda92f261aa3419f022fd89d05795ae | [
"MIT"
] | 15 | 2019-01-14T07:57:46.000Z | 2022-03-23T00:44:25.000Z | import json
import httplib2
from graphipy.graph.graph_base import BaseNode as Node, BaseEdge as Edge
class Pinterest:
def __init__(self, api):
self.access_token = api["access_token"]
# get a single user info in JSON format by username
def get_single_user(self, username):
url = "https://api.pinterest.com/v1/users/" + username + "/?access_token=" + self.access_token + \
"&fields=first_name%2Cid%2Clast_name%2Curl%2Caccount_type%2Cusername%2Cbio%2Ccounts%2Ccreated_at%2Cimage"
http = httplib2.Http()
response, content = http.request(url, method="GET")
result = json.loads(content.decode())
return result
# get a single board info in JSON format by board_url
def get_single_board(self, board_url):
url = "https://api.pinterest.com/v1/boards/" + board_url + "/?access_token=" + self.access_token + \
"&fields=id%2Cname%2Curl%2Ccounts%2Ccreated_at%2Ccreator%2Cdescription%2Cimage%2Cprivacy"
http = httplib2.Http()
response, content = http.request(url, method="GET")
result = json.loads(content.decode())
return result
# get a single pin info in JSON format by pin_id
def get_single_pin(self, pin_id):
url = "https://api.pinterest.com/v1/pins/" + pin_id + "/?access_token=" + self.access_token + \
"&fields=id%2Clink%2Cnote%2Curl%2Cattribution%2Cboard%2Ccolor%2Coriginal_link%2Ccounts%2Ccreated_at%2Ccreator%2Cimage%2Cmedia"
http = httplib2.Http()
response, content = http.request(url, method="GET")
result = json.loads(content.decode())
return result
# get all pins on one board in JSON format by board_url
def get_pins_from_board(self, board_url):
url = "https://api.pinterest.com/v1/boards/" + board_url + \
"/pins/?access_token=" + self.access_token + "&fields=id"
http = httplib2.Http()
response, content = http.request(url, method="GET")
result = json.loads(content.decode())
return result
# get the graph for a single user by username
def fetch_pinterest_user_by_username(self, graph, username):
result = self.get_single_user(username)
user = PinterestUser(result["data"])
graph.create_node(user)
# get the graph for a single board by board_url
def fetch_pinterest_board_by_url(self, graph, board_url):
board_result = self.get_single_board(board_url)
board = PinterestBoard(board_result["data"])
graph.create_node(board)
creator_username = board_result["data"]["creator"]["url"].split('/')[3]
user_result = self.get_single_user(creator_username)
user = PinterestUser(user_result["data"])
graph.create_node(user)
graph.create_edge(Edge(board.get_id(), user.get_id(), "CREATED_BY"))
graph.create_edge(Edge(user.get_id(), board.get_id(), "CREATED"))
pin_result = self.get_pins_from_board(board_url)
for pin in pin_result["data"]:
single_pin_result = self.get_single_pin(pin["id"])
single_pin = PinterestPin(single_pin_result["data"])
graph.create_node(single_pin)
graph.create_edge(Edge(board.get_id(), single_pin.get_id(), "HAS"))
graph.create_edge(Edge(single_pin.get_id(), board.get_id(), "ON"))
# get the graph for a single pin by pin_id
def fetch_pinterest_pin_by_id(self, graph, pin_id):
pin_result = self.get_single_pin(pin_id)
pin = PinterestPin(pin_result["data"])
graph.create_node(pin)
creator_username = pin_result["data"]["creator"]["url"].split('/')[3]
user_result = self.get_single_user(creator_username)
user = PinterestUser(user_result["data"])
graph.create_node(user)
graph.create_edge(Edge(pin.get_id(), user.get_id(), "CREATED_BY"))
graph.create_edge(Edge(user.get_id(), pin.get_id(), "CREATED"))
board_url = pin_result["data"]["board"]["url"].split(
'/')[3] + "/" + pin_result["data"]["board"]["url"].split('/')[4]
board_result = self.get_single_board(board_url)
board = PinterestBoard(board_result["data"])
graph.create_node(board)
graph.create_edge(Edge(pin.get_id(), board.get_id(), "ON"))
graph.create_edge(Edge(board.get_id(), pin.get_id(), "HAS"))
# get the graph for mine as user node
def fetch_pinterest_my_usernode(self, graph):
url = "https://api.pinterest.com/v1/me/?access_token=" + self.access_token + \
"&fields=first_name%2Cid%2Clast_name%2Curl%2Caccount_type%2Cusername%2Cbio%2Ccounts%2Ccreated_at%2Cimage"
http = httplib2.Http()
response, content = http.request(url, method="GET")
result = json.loads(content.decode())
user = PinterestUser(result["data"])
graph.create_node(user)
# get the graph of my boards
def fetch_pinterest_my_boards(self, graph):
url = "https://api.pinterest.com/v1/me/?access_token=" + self.access_token + \
"&fields=first_name%2Cid%2Clast_name%2Curl%2Cbio%2Caccount_type%2Ccounts%2Ccreated_at%2Cimage%2Cusername"
http = httplib2.Http()
response, content = http.request(url, method="GET")
result = json.loads(content.decode())
user = PinterestUser(result["data"])
graph.create_node(user)
url = "https://api.pinterest.com/v1/me/boards/?access_token=" + self.access_token + \
"&fields=id%2Cname%2Curl%2Ccounts%2Ccreated_at%2Ccreator%2Cdescription%2Cimage%2Cprivacy"
http = httplib2.Http()
response, content = http.request(url, method="GET")
result = json.loads(content.decode())
for myboard in result["data"]:
board = PinterestBoard(myboard)
graph.create_node(board)
graph.create_edge(Edge(board.get_id(), user.get_id(), "CREATED_BY"))
graph.create_edge(Edge(user.get_id(), board.get_id(), "CREATED"))
# get the graph of my pins
def fetch_pinterest_my_pins(self, graph):
url = "https://api.pinterest.com/v1/me/?access_token=" + self.access_token + \
"&fields=first_name%2Cid%2Clast_name%2Curl%2Cbio%2Caccount_type%2Ccounts%2Ccreated_at%2Cimage%2Cusername"
http = httplib2.Http()
response, content = http.request(url, method="GET")
result = json.loads(content.decode())
user = PinterestUser(result["data"])
graph.create_node(user)
url = "https://api.pinterest.com/v1/me/pins/?access_token=" + self.access_token + \
"&fields=id%2Clink%2Cnote%2Curl%2Cattribution%2Cboard%2Ccolor%2Coriginal_link%2Ccounts%2Ccreated_at%2Ccreator%2Cimage%2Cmedia"
http = httplib2.Http()
response, content = http.request(url, method="GET")
result = json.loads(content.decode())
for mypin in result["data"]:
pin = PinterestPin(mypin)
graph.create_node(pin)
graph.create_edge(Edge(pin.get_id(), user.get_id(), "CREATED_BY"))
graph.create_edge(Edge(user.get_id(), pin.get_id(), "CREATED"))
# get the graph of my followers
def fetch_pinterest_my_followers(self, graph):
url = "https://api.pinterest.com/v1/me/?access_token=" + self.access_token + \
"&fields=first_name%2Cid%2Clast_name%2Curl%2Caccount_type%2Cusername%2Cbio%2Ccounts%2Ccreated_at%2Cimage"
http = httplib2.Http()
response, content = http.request(url, method="GET")
result = json.loads(content.decode())
user = PinterestUser(result["data"])
graph.create_node(user)
url = "https://api.pinterest.com/v1/me/followers/?access_token=" + self.access_token + \
"&fields=first_name%2Cid%2Clast_name%2Curl%2Caccount_type%2Cusername%2Cbio%2Ccounts%2Ccreated_at%2Cimage"
http = httplib2.Http()
response, content = http.request(url, method="GET")
result = json.loads(content.decode())
for myfollower in result["data"]:
follower = PinterestUser(myfollower)
graph.create_node(follower)
graph.create_edge(Edge(user.get_id(), follower.get_id(), "FOLLOWED_BY"))
# get the graph of my following users
def fetch_pinterest_my_following_users(self, graph):
url = "https://api.pinterest.com/v1/me/?access_token=" + self.access_token + \
"&fields=first_name%2Cid%2Clast_name%2Curl%2Caccount_type%2Cusername%2Cbio%2Ccounts%2Ccreated_at%2Cimage"
http = httplib2.Http()
response, content = http.request(url, method="GET")
result = json.loads(content.decode())
user = PinterestUser(result["data"])
graph.create_node(user)
url = "https://api.pinterest.com/v1/me/following/users/?access_token=" + self.access_token + \
"&fields=first_name%2Cid%2Clast_name%2Curl%2Caccount_type%2Cusername%2Cbio%2Ccounts%2Ccreated_at%2Cimage"
http = httplib2.Http()
response, content = http.request(url, method="GET")
result = json.loads(content.decode())
for myfollowing in result["data"]:
following = PinterestUser(myfollowing)
graph.create_node(following)
graph.create_edge(Edge(user.get_id(), following.get_id(), "FOLLOWING"))
# get the graph of my following boards
def fetch_pinterest_my_following_boards(self, graph):
url = "https://api.pinterest.com/v1/me/?access_token=" + self.access_token + \
"&fields=first_name%2Cid%2Clast_name%2Curl%2Caccount_type%2Cusername%2Cbio%2Ccounts%2Ccreated_at%2Cimage"
http = httplib2.Http()
response, content = http.request(url, method="GET")
result = json.loads(content.decode())
user = PinterestUser(result["data"])
graph.create_node(user)
url = "https://api.pinterest.com/v1/me/following/boards/?access_token=" + self.access_token + \
"&fields=id%2Cname%2Curl%2Ccounts%2Ccreated_at%2Ccreator%2Cdescription%2Cimage%2Cprivacy"
http = httplib2.Http()
response, content = http.request(url, method="GET")
result = json.loads(content.decode())
for myfollowingboard in result["data"]:
followingboard = PinterestBoard(myfollowingboard)
graph.create_node(followingboard)
graph.create_edge(Edge(user.get_id(), followingboard.get_id(), "FOLLOWING"))
creator_username = myfollowingboard["creator"]["url"].split('/')[3]
creator_result = self.get_single_user(creator_username)
creator = PinterestUser(creator_result["data"])
graph.create_node(creator)
graph.create_edge(Edge(followingboard.get_id(), creator.get_id(), "CREATED_BY"))
graph.create_edge(Edge(creator.get_id(), followingboard.get_id(), "CREATED"))
board_url = myfollowingboard["url"].split(
'/')[3] + "/" + myfollowingboard["url"].split('/')[4]
pin_result = self.get_pins_from_board(board_url)
for pin in pin_result["data"]:
single_pin_result = self.get_single_pin(pin["id"])
single_pin = PinterestPin(single_pin_result["data"])
graph.create_node(single_pin)
graph.create_edge(Edge(followingboard.get_id(), single_pin.get_id(), "HAS"))
graph.create_edge(Edge(single_pin.get_id(), followingboard.get_id(), "ON"))
# User node of Pinterest
class PinterestUser(Node):
def __init__(self, result):
label = result["first_name"] + " " + result["last_name"]
Node.__init__(self, result["id"], label, "user")
self.username = result["username"]
self.first_name = result["first_name"]
self.last_name = result["last_name"]
self.bio = result["bio"]
self.account_type = result["account_type"]
self.url = result["url"]
self.image_url = result["image"]["60x60"]["url"]
self.created_at = result["created_at"]
self.pins_count = result["counts"]["pins"]
self.following_count = result["counts"]["following"]
self.followers_count = result["counts"]["followers"]
self.boards_count = result["counts"]["boards"]
# Board node of Pinterest
class PinterestBoard(Node):
def __init__(self, result):
Node.__init__(self, result["id"], result["name"], "board")
self.name = result["name"]
self.url = result["url"]
self.image_url = result["image"]["60x60"]["url"]
self.created_at = result["created_at"]
self.privacy = result["privacy"]
self.pins_count = result["counts"]["pins"]
self.collaborators_count = result["counts"]["collaborators"]
self.followers_count = result["counts"]["followers"]
self.description = result["description"]
# Pin node of Pinterest
class PinterestPin(Node):
def __init__(self, result):
Node.__init__(self, result["id"], "pin_" + result["id"], "pin")
self.url = result["url"]
self.image_url = result["image"]["original"]["url"]
self.link = result["link"]
self.media = result["media"]["type"]
self.original_link = result["original_link"]
self.created_at = result["created_at"]
self.note = result["note"]
self.color = result["color"]
self.saves = result["counts"]["saves"]
self.comments = result["counts"]["comments"]
| 44.85 | 138 | 0.647417 | 1,666 | 13,455 | 5.02401 | 0.07383 | 0.051254 | 0.035842 | 0.04313 | 0.774433 | 0.736679 | 0.709558 | 0.659379 | 0.6319 | 0.62724 | 0 | 0.016531 | 0.213229 | 13,455 | 299 | 139 | 45 | 0.774136 | 0.044073 | 0 | 0.587444 | 0 | 0.049327 | 0.227092 | 0.111794 | 0 | 0 | 0 | 0 | 0 | 1 | 0.076233 | false | 0 | 0.013453 | 0 | 0.125561 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
9b3df1f9f51b9aa8f8d43e404c1fc4094930de5b | 137 | py | Python | prev.py | shamansanchez/btmusic | d23e68a17d5d920db2182b641a2d8a62e381b2b9 | [
"MIT"
] | 2 | 2020-10-16T18:09:53.000Z | 2021-04-20T01:10:44.000Z | prev.py | shamansanchez/btmusic | d23e68a17d5d920db2182b641a2d8a62e381b2b9 | [
"MIT"
] | null | null | null | prev.py | shamansanchez/btmusic | d23e68a17d5d920db2182b641a2d8a62e381b2b9 | [
"MIT"
] | 1 | 2018-03-09T11:26:17.000Z | 2018-03-09T11:26:17.000Z | #!/usr/bin/python
import dbus
import sys
import player
try:
mp,props = player.getPlayer()
except:
sys.exit(-1)
mp.Previous()
| 9.785714 | 33 | 0.671533 | 20 | 137 | 4.6 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.009009 | 0.189781 | 137 | 13 | 34 | 10.538462 | 0.81982 | 0.116788 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.375 | 0 | 0.375 | 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 | 0 | 0 | 0 | 3 |
9b4dba19319264e77bb5b61778e35753edac7049 | 1,518 | py | Python | Problem.py | thes01/robotanik_analysis | 1635bd19efd2ab50944dd8f99926b9ed22e9439a | [
"MIT"
] | null | null | null | Problem.py | thes01/robotanik_analysis | 1635bd19efd2ab50944dd8f99926b9ed22e9439a | [
"MIT"
] | null | null | null | Problem.py | thes01/robotanik_analysis | 1635bd19efd2ab50944dd8f99926b9ed22e9439a | [
"MIT"
] | null | null | null | # id: 640;Stairs
# title:"Schody",
# about:"",
# robotCol:3,
# robotRow:10,
# robotDir:3,
# subs:[3,3,0,0,0],
# allowedCommands:0,
# board:" ggggggggGG gggggggGGg ggggggGGgg gggggGGggg ggggGGgggg gggGGggggg ggGGgggggg gGGggggggg GGgggggggg gggggggggg "
class Problem:
def __init__(self, parse_str):
gen = self.__lineGenerator(parse_str)
self.id = next(gen)
self.title = next(gen)
self.about = next(gen)
self.robotCol = (int)(next(gen))
self.robotRow = (int)(next(gen))
self.robotDir = (int)(next(gen))
self.subs = next(gen)
self.allowedCommands = (int)(next(gen))
self.board_str = next(gen)
def getBoardCopy(self):
arr = [self.board_str[i:i+16] for i in range(0, 16*12, 16)]
return arr
def getFlowerCount(self):
return self.board_str.count("R") + self.board_str.count("G") + self.board_str.count("B")
def getFirstId(self):
arr = self.id.split(';')
if len(arr) == 1:
return self.id.zfill(4)
else:
return arr[0].zfill(4)
def __lineGenerator(self, parse_str):
for line in parse_str.splitlines():
if len(line) == 0:
continue
line = line.strip()
if line[-1] == ',':
line = line[:-1]
arr = line.split(':')
yield arr[1].strip().replace('"', "")
| 27.107143 | 202 | 0.523057 | 178 | 1,518 | 4.365169 | 0.308989 | 0.23166 | 0.30888 | 0.36036 | 0.1287 | 0.1287 | 0.1287 | 0.1287 | 0.1287 | 0 | 0 | 0.029703 | 0.334651 | 1,518 | 55 | 203 | 27.6 | 0.739604 | 0.20751 | 0 | 0 | 0 | 0 | 0.005868 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.15625 | false | 0 | 0 | 0.03125 | 0.3125 | 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 | 0 | 0 | 0 | 3 |
32fdf79e47a9ded0768c9c49ad60d7e9550d70bd | 52 | py | Python | argantic/__init__.py | mlaradji/argantic | d0d8a9c8a32f8c585265faa194d92134aaae85eb | [
"Apache-2.0"
] | 6 | 2018-10-18T13:28:05.000Z | 2021-01-31T05:14:28.000Z | argantic/__init__.py | mlaradji/argantic | d0d8a9c8a32f8c585265faa194d92134aaae85eb | [
"Apache-2.0"
] | 2 | 2018-10-18T01:34:59.000Z | 2018-10-18T01:46:49.000Z | argantic/__init__.py | mlaradji/argantic | d0d8a9c8a32f8c585265faa194d92134aaae85eb | [
"Apache-2.0"
] | 1 | 2020-03-19T03:26:45.000Z | 2020-03-19T03:26:45.000Z | from .argantic import Argantic
__all__ = [Argantic] | 17.333333 | 30 | 0.788462 | 6 | 52 | 6.166667 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.134615 | 52 | 3 | 31 | 17.333333 | 0.822222 | 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 | 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 | 3 |
fd134193c498ed4e8e336b1202f197f67f6a742a | 129 | py | Python | usr/gre/turtle1.py | Bugnon/oc-2018 | 7961de5ba9923512bd50c579c37f1dadf070b692 | [
"MIT"
] | 3 | 2018-09-20T12:16:48.000Z | 2019-06-21T08:32:17.000Z | usr/gre/turtle1.py | Bugnon/oc-2018 | 7961de5ba9923512bd50c579c37f1dadf070b692 | [
"MIT"
] | null | null | null | usr/gre/turtle1.py | Bugnon/oc-2018 | 7961de5ba9923512bd50c579c37f1dadf070b692 | [
"MIT"
] | 2 | 2018-09-20T11:55:05.000Z | 2019-09-01T19:40:13.000Z | # Turtle
import turtle
bob = turtle.Turtle()
print(bob)
bob.fd(100)
bob.lt(120)
bob.fd(100)
bob.lt(120)
bob.fd(100)
bob.lt(120) | 10.75 | 21 | 0.689922 | 26 | 129 | 3.423077 | 0.307692 | 0.168539 | 0.269663 | 0.370787 | 0.539326 | 0.539326 | 0.539326 | 0.539326 | 0.539326 | 0.539326 | 0 | 0.157895 | 0.116279 | 129 | 12 | 22 | 10.75 | 0.622807 | 0.046512 | 0 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.111111 | 0 | 0.111111 | 0.111111 | 1 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
fd1bd50e4299c5dde9162d84e49d162897463820 | 481 | py | Python | connect.py | zAzouuuu/Projet6 | 6a125e36eddbb8a790d74885beec4715734f141c | [
"Apache-2.0"
] | null | null | null | connect.py | zAzouuuu/Projet6 | 6a125e36eddbb8a790d74885beec4715734f141c | [
"Apache-2.0"
] | null | null | null | connect.py | zAzouuuu/Projet6 | 6a125e36eddbb8a790d74885beec4715734f141c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import sys #pour les arguments
import time #pour date les sauvegardes
import datetime
import shutil #copy and del des fichiers
import os #Create dir and del
import tarfile
import paramiko
from scp import SCPClient
from datetime import timedelta
ssh_client = paramiko.SSHClient()
ssh_client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh_client.connect(hostname=['ip_address'],username=['name'],password=['passw'])
sftp = ssh_client.open_sftp()
| 26.722222 | 80 | 0.804574 | 70 | 481 | 5.385714 | 0.671429 | 0.095491 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.002326 | 0.106029 | 481 | 17 | 81 | 28.294118 | 0.874419 | 0.222453 | 0 | 0 | 0 | 0 | 0.05163 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0.076923 | 0.692308 | 0 | 0.692308 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 3 |
fd4de4934644d10c209ae5bc41924d57e071fb16 | 398 | py | Python | followers/serializers.py | sanidhyamangal/classh | 61b86942f4a26f9e36a803186451455579351e10 | [
"MIT"
] | null | null | null | followers/serializers.py | sanidhyamangal/classh | 61b86942f4a26f9e36a803186451455579351e10 | [
"MIT"
] | null | null | null | followers/serializers.py | sanidhyamangal/classh | 61b86942f4a26f9e36a803186451455579351e10 | [
"MIT"
] | null | null | null | from .models import Followers
from rest_framework import serializers
class FollowersSerializer(serializers.ModelSerializer):
class Meta:
model = Followers
fields = ['uid', 'user', 'followed_by', 'is_private']
class FollowRequestSerializer(serializers.ModelSerializer):
class Meta:
model = Followers
fields = ['uid', 'user', 'requested_by', 'is_private']
| 26.533333 | 62 | 0.701005 | 39 | 398 | 7.025641 | 0.538462 | 0.189781 | 0.226277 | 0.255474 | 0.452555 | 0.452555 | 0.452555 | 0.452555 | 0.452555 | 0 | 0 | 0 | 0.19598 | 398 | 14 | 63 | 28.428571 | 0.85625 | 0 | 0 | 0.4 | 0 | 0 | 0.143216 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.2 | 0 | 0.6 | 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 | 0 | 1 | 0 | 0 | 3 |
fd5a8dea6489e0523e1f28e5d8889174d82b09d5 | 83 | py | Python | venv/lib/python3.8/site-packages/crispy_forms/templates/uni_form/layout/row.html.py | Solurix/Flashcards-Django | 03c863f6722936093927785a2b20b6b668bb743d | [
"MIT"
] | 1 | 2021-05-16T03:20:23.000Z | 2021-05-16T03:20:23.000Z | venv/lib/python3.8/site-packages/crispy_forms/templates/uni_form/layout/row.html.py | Solurix/Flashcards-Django | 03c863f6722936093927785a2b20b6b668bb743d | [
"MIT"
] | 4 | 2021-03-30T14:06:09.000Z | 2021-09-22T19:26:31.000Z | venv/lib/python3.8/site-packages/crispy_forms/templates/uni_form/layout/row.html.py | Solurix/Flashcards-Django | 03c863f6722936093927785a2b20b6b668bb743d | [
"MIT"
] | null | null | null | XXXX BB BBBBBBBBBBXXXXXBBBBB XXXXXXXXXXXXXX FFFFFFFFFFX FFFFX
FFFF
XXXXXX
| 16.6 | 61 | 0.795181 | 8 | 83 | 8.25 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.204819 | 83 | 4 | 62 | 20.75 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0 | null | null | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
b5e1d1b0a184ad42b215bfc1171f6592ebc317c5 | 870 | py | Python | omemo/exceptions/keyexchangeexception.py | fantomfp/python-omemo | 43244e37bae31b3d1591474c73e948652c1c0e91 | [
"MIT"
] | 31 | 2018-03-28T11:15:12.000Z | 2022-01-22T08:05:40.000Z | omemo/exceptions/keyexchangeexception.py | fantomfp/python-omemo | 43244e37bae31b3d1591474c73e948652c1c0e91 | [
"MIT"
] | 30 | 2018-03-28T16:51:27.000Z | 2021-04-04T15:08:41.000Z | omemo/exceptions/keyexchangeexception.py | fantomfp/python-omemo | 43244e37bae31b3d1591474c73e948652c1c0e91 | [
"MIT"
] | 7 | 2018-03-28T16:43:50.000Z | 2022-02-16T03:31:08.000Z | from .sessionmanagerexception import SessionManagerException
class KeyExchangeException(SessionManagerException):
def __init__(self, bare_jid, device, message):
self.__bare_jid = bare_jid
self.__device = device
self.__message = message
@property
def bare_jid(self):
return self.__bare_jid
@property
def device(self):
return self.__device
def __eq__(self, other):
return (
isinstance(other, KeyExchangeException) and
other.bare_jid == self.bare_jid and
other.device == self.device
)
def __hash__(self):
return hash((self.bare_jid, self.device))
def __str__(self):
return (
"The initial key exchange with {} on device {} failed: {}"
.format(self.__bare_jid, self.__device, self.__message)
)
| 27.1875 | 70 | 0.625287 | 91 | 870 | 5.527473 | 0.307692 | 0.125249 | 0.131213 | 0.101392 | 0.083499 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.288506 | 870 | 31 | 71 | 28.064516 | 0.812601 | 0 | 0 | 0.16 | 0 | 0 | 0.064368 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.24 | false | 0 | 0.04 | 0.2 | 0.52 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
bd08e85f340b036fe5b27de95a418d401671ed20 | 1,261 | py | Python | backend/api/views.py | SergiuPV/ToDoApp | e4f35d7fc4f111bfdebbdd4032e6ca211f5fe486 | [
"MIT"
] | null | null | null | backend/api/views.py | SergiuPV/ToDoApp | e4f35d7fc4f111bfdebbdd4032e6ca211f5fe486 | [
"MIT"
] | null | null | null | backend/api/views.py | SergiuPV/ToDoApp | e4f35d7fc4f111bfdebbdd4032e6ca211f5fe486 | [
"MIT"
] | null | null | null | from .models import ToDoList
from rest_framework.generics import ListAPIView
from rest_framework import permissions
from api.serializers import ToDoSerializerList
from django.db import connection
from rest_framework.response import Response
class ToDoListView(ListAPIView):
permission_classes = (permissions.AllowAny,)
authentication_classes = ()
queryset = ToDoList.objects.all()
serializer_class = ToDoSerializerList
def post(self, request, pk):
# client_ip = self.get_client_ip(request)
# cursor = connection.cursor()
# cursor.execute(f"SELECT * FROM website.postlikes where post_liked='{pk}' and client_ip='{client_ip}'")
# row = cursor.fetchone()
# if not row:
# post = Post.objects.get(id=pk)
# likes = request.data['likes']
# post.likes = likes
# post.save()
# cursor.execute(f"INSERT INTO website.postlikes (post_liked, client_ip) values('{pk}', '{client_ip}')")
# data = {'succes': 1, 'status': '200'}
# return Response(data)
# else:
# data = {'failed': 1, 'message': 'You already liked this article', 'status': '210'}
# return Response(data, status=210)
pass | 34.081081 | 116 | 0.637589 | 140 | 1,261 | 5.635714 | 0.485714 | 0.060837 | 0.064639 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.011579 | 0.24663 | 1,261 | 37 | 117 | 34.081081 | 0.818947 | 0.492466 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.076923 | false | 0.076923 | 0.461538 | 0 | 0.923077 | 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 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 3 |
bd0d9355d189ceb84870bf92f3351e0e1a10b66c | 99 | py | Python | src/__init__.py | Jay-Madden/NBAStatsScraper | 50598d1e21db18cdded120da246b549388f9eeec | [
"MIT"
] | null | null | null | src/__init__.py | Jay-Madden/NBAStatsScraper | 50598d1e21db18cdded120da246b549388f9eeec | [
"MIT"
] | null | null | null | src/__init__.py | Jay-Madden/NBAStatsScraper | 50598d1e21db18cdded120da246b549388f9eeec | [
"MIT"
] | null | null | null | import NBAStatsScraper
if __name__== "__main__":
App = NBAStatsScraper.NBAStatsScraper().run() | 24.75 | 49 | 0.757576 | 9 | 99 | 7.444444 | 0.777778 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.121212 | 99 | 4 | 49 | 24.75 | 0.770115 | 0 | 0 | 0 | 0 | 0 | 0.08 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 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 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
bd24f0a7581bc9f81d538d6226a6f05039ed3d32 | 1,885 | py | Python | tests/test_seq_traverse.py | svenkat19/functionali | 64c48a1c2e68de3d5179b31093fef64e53ea3b46 | [
"BSD-3-Clause"
] | null | null | null | tests/test_seq_traverse.py | svenkat19/functionali | 64c48a1c2e68de3d5179b31093fef64e53ea3b46 | [
"BSD-3-Clause"
] | null | null | null | tests/test_seq_traverse.py | svenkat19/functionali | 64c48a1c2e68de3d5179b31093fef64e53ea3b46 | [
"BSD-3-Clause"
] | null | null | null | from functionali import (
first,
ffirst,
second,
third,
fourth,
fifth,
last,
butlast,
rest,
)
def test_first():
assert 1 == first([1, 2, 3])
assert 1 == first((1, 2, 3))
assert 1 == first({1, 2, 3})
assert (1, "a") == first({1: "a", 2: "b"})
assert None == first([])
def test_ffirst():
assert 1 == ffirst([[1], [2], [3]])
assert 1 == ffirst(((1,), (2,), (3,)))
assert 1 == ffirst({(1, 2), (3, 4), (5, 6)})
assert None == ffirst([])
def test_last():
assert 3 == last([1, 2, 3])
assert 3 == last((1, 2, 3))
assert 3 == last({1, 2, 3})
assert (3, "c") == last({1: "a", 2: "b", 3: "c"})
assert None == last([])
def test_rest():
# convert to tuple since rest returns iterator
assert (2, 3) == tuple(rest([1, 2, 3]))
assert (2, 3) == tuple(rest((1, 2, 3)))
assert (2, 3) == tuple(rest({1, 2, 3}))
assert ((2, "b"), (3, "c")) == tuple(rest({1: "a", 2: "b", 3: "c"}))
assert () == tuple(rest([]))
def test_second():
assert 2 == second([1, 2, 3])
assert 2 == second((1, 2, 3))
assert 2 == second({1, 2, 3})
assert (2, "b") == second({1: "a", 2: "b"})
assert None == second([])
# check that the last item is returned
# when iterable is shorter than two
assert 1 == second([1])
def test_third():
assert 3 == third([1, 2, 3])
assert 3 == third((1, 2, 3))
assert 3 == third({1, 2, 3})
assert (3, "c") == third({1: "a", 2: "b", 3: "c"})
assert None == third([])
# check that the last item is returned
# when iterable is shorter than Three
assert 2 == third([1, 2])
def test_butlast():
assert (1, 2) == butlast([1, 2, 3])
assert (1, 2) == butlast((1, 2, 3))
assert (1, 2) == butlast({1, 2, 3})
assert ((1, "a"), (2, "b")) == butlast({1: "a", 2: "b", 3: "c"})
assert None == butlast([])
| 25.472973 | 72 | 0.487533 | 295 | 1,885 | 3.091525 | 0.145763 | 0.054825 | 0.069079 | 0.197368 | 0.644737 | 0.644737 | 0.607456 | 0.594298 | 0.541667 | 0.541667 | 0 | 0.088857 | 0.271618 | 1,885 | 73 | 73 | 25.821918 | 0.575382 | 0.099735 | 0 | 0 | 0 | 0 | 0.014193 | 0 | 0 | 0 | 0 | 0 | 0.666667 | 1 | 0.12963 | true | 0 | 0.018519 | 0 | 0.148148 | 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 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
bd34faf155e53a092d3cde70ba6a3250e3a90a38 | 5,601 | py | Python | Ene-Jun-2020/bucio-montes-hector-daniel/PracticaDos/Script 1-2-3.py | Arbupa/DAS_Sistemas | 52263ab91436b2e5a24ce6f8493aaa2e2fe92fb1 | [
"MIT"
] | 41 | 2017-09-26T09:36:32.000Z | 2022-03-19T18:05:25.000Z | Ene-Jun-2020/bucio-montes-hector-daniel/PracticaDos/Script 1-2-3.py | Arbupa/DAS_Sistemas | 52263ab91436b2e5a24ce6f8493aaa2e2fe92fb1 | [
"MIT"
] | 67 | 2017-09-11T05:06:12.000Z | 2022-02-14T04:44:04.000Z | Ene-Jun-2020/bucio-montes-hector-daniel/PracticaDos/Script 1-2-3.py | Arbupa/DAS_Sistemas | 52263ab91436b2e5a24ce6f8493aaa2e2fe92fb1 | [
"MIT"
] | 210 | 2017-09-01T00:10:08.000Z | 2022-03-19T18:05:12.000Z | # ---------------------------------------------------------------------------------------------------------------------
# # # PARTE 1 # # #
# ---------------------------------------------------------------------------------------------------------------------
class Persona(object):
def __init__(self, **args):
self.nombre = args.get('nombre')
self.edad = args.get('edad')
self.sexo = args.get('sexo')
self.estatura = args.get('estatura')
self.peso = args.get('peso')
# ----------------------------------------------------------
def set_nombre(self, nombre):
self.nombre = nombre
def get_nombre(self):
return self.nombre
# ---------------------------------------------------------
def set_edad(self, edad):
self.edad = edad
def get_edad(self):
return self.edad
# ---------------------------------------------------------
def set_sexo(self, sexo):
self.sexo = sexo
def get_sexo(self):
return self.sexo
# ---------------------------------------------------------
def set_estatura(self, estatura):
self.estatura = estatura
def get_estatura(self):
return self.estatura
# ---------------------------------------------------------
def set_peso(self, peso):
self.peso = peso
def get_peso(self):
return self.peso
# ----------------------------------------------------------
def imc(self):
pe = self.get_peso()
es = self.get_estatura()
imc = pe / (es * es)
return "{0:.4f}".format(imc)
# ----------------------------------------------------------
def __str__(self):
return f'Nombre: {self.nombre}\nEdad: {self.edad} años\nSexo: {self.sexo}\nPeso: {self.peso} kgs.\nEstatura: {self.estatura} mts.\nIMC: {self.imc()}'
# E J E M P L O S
p1 = Persona(nombre='Luis', edad=45, sexo='Masculino', estatura=1.80, peso=108)
p2 = Persona(nombre='Carlos', edad=36, sexo='Masculino', estatura=1.75, peso=81)
p3 = Persona(nombre='Emmanuel', edad=27, sexo='Masculino', estatura=1.68, peso=63)
print(p1.__str__(), '\n')
print(p2.__str__(), '\n')
print(p3.__str__(), '\n')
# ---------------------------------------------------------------------------------------------------------------------
# # # PARTE 2 # # #
# ---------------------------------------------------------------------------------------------------------------------
class Empleado(Persona):
def __init__(self, **args):
super(Empleado, self).__init__(**args)
self._id = args.get('id')
self._puesto = args.get('puesto')
# ----------------------------------------------------------
def set_id(self, idn):
self._id = idn
def get_id(self):
return self._id
# ----------------------------------------------------------
def set_puesto(self, puesto):
self._puesto = puesto
def get_puesto(self):
return self._puesto
# ----------------------------------------------------------
def __str__(self):
return f'{super(Empleado, self).__str__()}\nID de empleado: {self._id}\nPuesto: {self._puesto}'
# E J E M P L O
slave = Empleado(id=9, puesto='Chef')
slave.set_nombre('Mario')
slave.set_edad(27)
slave.set_sexo('Masculino')
slave.set_estatura(1.8)
slave.set_peso(90)
print(slave, '\n')
# ---------------------------------------------------------------------------------------------------------------------
# # # PARTE 3 # # #
# ---------------------------------------------------------------------------------------------------------------------
class Empresa(Empleado):
def __init__(self, **args):
super(Empresa, self).__init__(**args)
self._nombre_empresa = args.get('nombre_empresa')
self._direccion = args.get('direccion')
self._rfc = args.get('rfc')
self._conj_emp = args.get('conj_emp')
def set_nombre_empresa(self, nombre_empresa):
self._nombre_empresa = nombre_empresa
def get_nombre_empresa(self):
return self._nombre_empresa
# ----------------------------------------------------------
def set_direccion(self, direccion):
self._direccion = direccion
def get_direccion(self):
return self._direccion
# ----------------------------------------------------------
def set_rfc(self, rfc):
self._rfc = rfc
def get_rfc(self):
return self._rfc
# ----------------------------------------------------------
def set_conj_emp(self, conj_emp):
self._conj_emp = conj_emp
def get_conj_emp(self):
return self._conj_emp
# ----------------------------------------------------------
def __str__(self):
return f'{super(Empresa, self).__str__()}\nNombre de la empresa: {self._nombre_empresa}\n' \
f'Dirección de la empresa: {self._direccion}\nRFC de la empresa: {self._rfc}\n'
# E J E M P L O S
slave1 = Empresa(nombre_empresa='Krusty Krab', direccion='Acámbaro, #999, Saltillo, Coah.', rfc='CC090509IDK')
slave2 = Empresa(nombre_empresa='Krusty Krab', direccion='Acámbaro, #999, Saltillo, Coah.', rfc='CC090509IDK')
slave1.set_nombre('Ricardo')
slave1.set_edad(27)
slave1.set_sexo('Masculino')
slave1.set_estatura(1.8)
slave1.set_peso(90)
slave1.set_id(1)
slave1.set_puesto('Cocinero')
slave2.set_nombre('Rodrigo')
slave2.set_edad(18)
slave2.set_sexo('Masculino')
slave2.set_estatura(1.90)
slave2.set_peso(81)
slave2.set_id(2)
slave2.set_puesto('Mesero')
print(slave1, '\n', slave2, '\n')
| 28.005 | 157 | 0.447063 | 560 | 5,601 | 4.226786 | 0.173214 | 0.059147 | 0.065061 | 0.019011 | 0.148711 | 0.092522 | 0.073933 | 0.070976 | 0.064216 | 0.064216 | 0 | 0.019697 | 0.175147 | 5,601 | 199 | 158 | 28.145729 | 0.492641 | 0.289234 | 0 | 0.057143 | 0 | 0.028571 | 0.17314 | 0.017771 | 0 | 0 | 0 | 0 | 0 | 1 | 0.27619 | false | 0 | 0 | 0.133333 | 0.447619 | 0.047619 | 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 | 0 | 0 | 0 | 3 |
bd37d108b013819ab38a8a30e221d5bf5699596a | 279 | py | Python | DeepAudio Detector/graphql-api/audio_detector_api/admin.py | i2tResearch/Ciberseguridad_web | ac3dd934a60628532e3538369cb145d9a8f33e4f | [
"MIT"
] | 9 | 2021-10-01T22:02:58.000Z | 2021-11-09T17:48:45.000Z | DeepAudio Detector/graphql-api/audio_detector_api/admin.py | i2tResearch/Ciberseguridad_web | ac3dd934a60628532e3538369cb145d9a8f33e4f | [
"MIT"
] | null | null | null | DeepAudio Detector/graphql-api/audio_detector_api/admin.py | i2tResearch/Ciberseguridad_web | ac3dd934a60628532e3538369cb145d9a8f33e4f | [
"MIT"
] | null | null | null | """Admin Site Configuration.
Setup admin settings.
"""
from django.contrib import admin
# Project configurations
admin.site.site_header = 'Audio Detector'
admin.site.site_title = 'Audio Detector'
admin.site.index_title = 'Audio Detector'
admin.empty_value_display = '**Vacio**' | 25.363636 | 41 | 0.774194 | 36 | 279 | 5.861111 | 0.555556 | 0.170616 | 0.255924 | 0.208531 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.107527 | 279 | 11 | 42 | 25.363636 | 0.84739 | 0.258065 | 0 | 0 | 0 | 0 | 0.253731 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.2 | 0 | 0.2 | 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 | 0 | 0 | 0 | 0 | 0 | 3 |
bd399d10838e5a5f8663b23dc730381a20528bbb | 321 | py | Python | alab_management/dashboard/lab_views.py | CederGroupHub/alab_management | ba9a49ca85e1caefb96f44ef1182c2bc0115bfdf | [
"MIT"
] | 3 | 2021-12-08T02:09:28.000Z | 2021-12-10T01:49:55.000Z | alab_management/dashboard/lab_views.py | CederGroupHub/alab_management | ba9a49ca85e1caefb96f44ef1182c2bc0115bfdf | [
"MIT"
] | 9 | 2021-12-10T01:22:01.000Z | 2022-03-08T22:26:06.000Z | alab_management/dashboard/lab_views.py | CederGroupHub/alab_management | ba9a49ca85e1caefb96f44ef1182c2bc0115bfdf | [
"MIT"
] | 1 | 2022-03-23T22:42:54.000Z | 2022-03-23T22:42:54.000Z | from alab_management.device_view import DeviceView
from alab_management.experiment_view import ExperimentView
from alab_management.sample_view import SampleView
from alab_management.task_view import TaskView
task_view = TaskView()
sample_view = SampleView()
device_view = DeviceView()
experiment_view = ExperimentView()
| 32.1 | 58 | 0.859813 | 40 | 321 | 6.6 | 0.325 | 0.121212 | 0.272727 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.090343 | 321 | 9 | 59 | 35.666667 | 0.90411 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 0 | 0 | 0 | null | 0 | 1 | 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 | 3 |
bd3a9bf0db04a5be3cc5e7e0726d5576e0722bb3 | 168 | py | Python | Itertools/itertools.permutations().py | aydinsimsek/HackerRank-solutions-python | ef4169fb9d1e4f0bf5de46bd09418e6aedfa6134 | [
"MIT"
] | null | null | null | Itertools/itertools.permutations().py | aydinsimsek/HackerRank-solutions-python | ef4169fb9d1e4f0bf5de46bd09418e6aedfa6134 | [
"MIT"
] | null | null | null | Itertools/itertools.permutations().py | aydinsimsek/HackerRank-solutions-python | ef4169fb9d1e4f0bf5de46bd09418e6aedfa6134 | [
"MIT"
] | null | null | null | from itertools import permutations
S, k = input().split(" ")
s = list(S)
s.sort()
per = list(permutations(s, int (k)))
for i in per:
print("".join(i))
| 18.666667 | 38 | 0.577381 | 26 | 168 | 3.730769 | 0.653846 | 0.268041 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.238095 | 168 | 8 | 39 | 21 | 0.757813 | 0 | 0 | 0 | 0 | 0 | 0.00625 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.142857 | 0 | 0.142857 | 0.142857 | 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 | 0 | 0 | 0 | 3 |
bd400466ce9ec9281a20c7fe12bb0c5a6e6d3897 | 177 | py | Python | common/math.py | suchir/passenger_screening_algorithm_challenge | 65e3e3ce1889e9a100f6b9b6a53fe5c785a84612 | [
"MIT"
] | 7 | 2018-02-05T01:57:30.000Z | 2019-06-25T08:00:40.000Z | common/math.py | suchir/passenger_screening_algorithm_challenge | 65e3e3ce1889e9a100f6b9b6a53fe5c785a84612 | [
"MIT"
] | 1 | 2018-05-07T15:28:29.000Z | 2018-05-07T15:28:29.000Z | common/math.py | suchir/passenger_screening_algorithm_challenge | 65e3e3ce1889e9a100f6b9b6a53fe5c785a84612 | [
"MIT"
] | 3 | 2018-05-16T03:50:44.000Z | 2018-08-20T12:40:58.000Z | import numpy as np
def sigmoid(x):
return 1 / (1 + np.exp(-x))
def log_loss(x, y, eps=1e-6):
x = np.clip(x, eps, 1-eps)
return -(y*np.log(x) + (1-y)*np.log(1-x)) | 17.7 | 45 | 0.542373 | 39 | 177 | 2.435897 | 0.435897 | 0.063158 | 0.126316 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.051095 | 0.225989 | 177 | 10 | 45 | 17.7 | 0.642336 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0.166667 | 0.166667 | 0.833333 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
bd47dcb33a45c7a28c432f3e839ecb32677f4453 | 268 | py | Python | ascii_to_wide.py | bmintz/python-snippets | 982861c173bf4bcd5d908514a9e8b1914a580a5d | [
"CC0-1.0"
] | 2 | 2018-11-12T10:33:13.000Z | 2019-02-24T05:01:40.000Z | ascii_to_wide.py | iomintz/python-snippets | 982861c173bf4bcd5d908514a9e8b1914a580a5d | [
"CC0-1.0"
] | null | null | null | ascii_to_wide.py | iomintz/python-snippets | 982861c173bf4bcd5d908514a9e8b1914a580a5d | [
"CC0-1.0"
] | 2 | 2018-11-24T08:16:59.000Z | 2019-02-24T04:41:30.000Z | #!/usr/bin/env python3
table = {i: chr(i + 0xFEE0) for i in range(33, 127)}
table[ord(' ')] = '\N{IDEOGRAPHIC SPACE}'
def ascii_to_fullwidth(text):
return text.translate(table)
def main():
assert ascii_to_fullwidth('h') == 'h'
if __name__ == '__main__':
main()
| 19.142857 | 52 | 0.660448 | 41 | 268 | 4.02439 | 0.707317 | 0.084848 | 0.193939 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.035088 | 0.149254 | 268 | 13 | 53 | 20.615385 | 0.688596 | 0.078358 | 0 | 0 | 0 | 0 | 0.130081 | 0 | 0 | 0 | 0.02439 | 0 | 0.125 | 1 | 0.25 | false | 0 | 0 | 0.125 | 0.375 | 0 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 3 |
bd4f76695395230853985669922c775d5ba0354a | 463 | py | Python | xnatrest/exceptions.py | chaselgrove/xnatrest | 4176f4d3ffe54b5016cc70e2ac07fded8cefd623 | [
"BSD-2-Clause"
] | null | null | null | xnatrest/exceptions.py | chaselgrove/xnatrest | 4176f4d3ffe54b5016cc70e2ac07fded8cefd623 | [
"BSD-2-Clause"
] | null | null | null | xnatrest/exceptions.py | chaselgrove/xnatrest | 4176f4d3ffe54b5016cc70e2ac07fded8cefd623 | [
"BSD-2-Clause"
] | null | null | null | # See file COPYING distributed with xnatrest for copyright and license.
class XNATRESTError(Exception):
"""base class for xnatrest exceptions"""
class CircularReferenceError(XNATRESTError):
def __init__(self, url):
self.url = url
return
def __str__(self):
return 'circular reference to %s' % self.url
class UnidentifiedServerError(XNATRESTError):
def __str__(self):
return 'could not identify server'
# eof
| 21.045455 | 71 | 0.697624 | 51 | 463 | 6.098039 | 0.627451 | 0.067524 | 0.064309 | 0.102894 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.222462 | 463 | 21 | 72 | 22.047619 | 0.863889 | 0.235421 | 0 | 0.2 | 0 | 0 | 0.14121 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.3 | false | 0 | 0 | 0.2 | 0.9 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
1fb09eb6f6aaf5d512c8381516cc2cf89d6f14f3 | 409 | py | Python | shaape/tests/test_parser.py | 251/shaape | c8c8dd786ebe1a8d3249c68a0a58e5e4b77631e4 | [
"BSD-2-Clause-FreeBSD"
] | 85 | 2015-01-22T22:44:49.000Z | 2022-03-04T12:12:56.000Z | shaape/tests/test_parser.py | 251/shaape | c8c8dd786ebe1a8d3249c68a0a58e5e4b77631e4 | [
"BSD-2-Clause-FreeBSD"
] | 5 | 2015-09-16T01:53:44.000Z | 2019-01-11T16:04:42.000Z | shaape/tests/test_parser.py | 251/shaape | c8c8dd786ebe1a8d3249c68a0a58e5e4b77631e4 | [
"BSD-2-Clause-FreeBSD"
] | 16 | 2015-08-07T21:46:20.000Z | 2020-09-06T07:42:11.000Z | from shaape.parser import Parser
import nose
import unittest
from nose.tools import *
class TestParser(unittest.TestCase):
def test_init(self):
parser = Parser()
assert parser != None
assert parser.parsed_data() == []
assert parser.drawable_objects() == []
def test_run(self):
parser = Parser()
assert_raises(NotImplementedError, parser.run, "", [])
| 24.058824 | 62 | 0.647922 | 45 | 409 | 5.777778 | 0.511111 | 0.138462 | 0.123077 | 0.169231 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.242054 | 409 | 16 | 63 | 25.5625 | 0.83871 | 0 | 0 | 0.153846 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.307692 | 1 | 0.153846 | false | 0 | 0.307692 | 0 | 0.538462 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
1fc1061b4a207a879811298dfab093c447014160 | 1,306 | py | Python | day13.py | jlucangelio/adventofcode-2020 | 9b19a3d4f47e5819487bef485332f37ada44e7ef | [
"MIT"
] | null | null | null | day13.py | jlucangelio/adventofcode-2020 | 9b19a3d4f47e5819487bef485332f37ada44e7ef | [
"MIT"
] | null | null | null | day13.py | jlucangelio/adventofcode-2020 | 9b19a3d4f47e5819487bef485332f37ada44e7ef | [
"MIT"
] | null | null | null | DEPART = 1000677
SCHEDULE = "29,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,41,x,x,x,x,x,x,x,x,x,661,x,x,x,x,x,x,x,x,x,x,x,x,13,17,x,x,x,x,x,x,x,x,23,x,x,x,x,x,x,x,521,x,x,x,x,x,37,x,x,x,x,x,x,x,x,x,x,x,x,19"
buses = [int(t) for t in SCHEDULE.split(",") if t != "x"]
waits = [(((DEPART // b) + 1) * b - DEPART, b) for b in buses]
earliest = min(waits, key=lambda v: v[0])
print(earliest[0] * earliest[1])
buses = SCHEDULE.split(",")
a_s = []
n_s = []
for i, b in enumerate(buses):
if b != "x":
b = int(b)
if i == 0:
print("x = %d mod %d" % (i, b))
a_s.append(i)
n_s.append(b)
else:
if b - i < 0:
r = -i % b
else:
r = b - i
print("x = %d mod %d" % (r, b))
a_s.append(r)
n_s.append(b)
from functools import reduce
def chinese_remainder(n, a):
sum = 0
prod = reduce(lambda a, b: a*b, n)
for n_i, a_i in zip(n, a):
p = prod // n_i
sum += a_i * mul_inv(p, n_i) * p
return sum % prod
def mul_inv(a, b):
b0 = b
x0, x1 = 0, 1
if b == 1: return 1
while a > 1:
q = a // b
a, b = b, a%b
x0, x1 = x1 - q * x0, x0
if x1 < 0: x1 += b0
return x1
print(chinese_remainder(n_s, a_s))
| 23.745455 | 183 | 0.459418 | 273 | 1,306 | 2.135531 | 0.216117 | 0.219554 | 0.29331 | 0.343053 | 0.15952 | 0.113208 | 0.113208 | 0.101201 | 0.087479 | 0.072041 | 0 | 0.060325 | 0.339969 | 1,306 | 54 | 184 | 24.185185 | 0.616009 | 0 | 0 | 0.093023 | 0 | 0.023256 | 0.153139 | 0.130168 | 0 | 0 | 0 | 0 | 0 | 1 | 0.046512 | false | 0 | 0.023256 | 0 | 0.116279 | 0.093023 | 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 | 0 | 0 | 3 |
1fc26d7f65b47403e72931a3ea1b813b90a0bce1 | 3,266 | py | Python | doc/python_api/epy/IDProp.py | wycivil08/blendocv | f6cce83e1f149fef39afa8043aade9c64378f33e | [
"Unlicense"
] | 30 | 2015-01-29T14:06:05.000Z | 2022-01-10T07:47:29.000Z | doc/python_api/epy/IDProp.py | ttagu99/blendocv | f6cce83e1f149fef39afa8043aade9c64378f33e | [
"Unlicense"
] | 1 | 2017-02-20T20:57:48.000Z | 2018-12-19T23:44:38.000Z | doc/python_api/epy/IDProp.py | ttagu99/blendocv | f6cce83e1f149fef39afa8043aade9c64378f33e | [
"Unlicense"
] | 15 | 2015-04-23T02:38:36.000Z | 2021-03-01T20:09:39.000Z | class IDGroup:
"""
The IDGroup Type
================
This type supports both iteration and the []
operator to get child ID properties.
You can also add new properties using the [] operator.
For example::
group['a float!'] = 0.0
group['an int!'] = 0
group['a string!'] = "hi!"
group['an array!'] = [0, 0, 1.0, 0]
group['a subgroup!] = {"float": 0.0, "an int": 1.0, "an array": [1, 2],
"another subgroup": {"a": 0.0, "str": "bleh"}}
Note that for arrays, the array type defaults to int unless a float is found
while scanning the template list; if any floats are found, then the whole
array is float. Note that double-precision floating point numbers are used for
python-created float ID properties and arrays (though the internal C api does
support single-precision floats, and the python code will read them).
You can also delete properties with the del operator. For example:
del group['property']
To get the type of a property, use the type() operator, for example::
if type(group['bleh']) == str: pass
To tell if the property is a group or array type, import the Blender.Types module and test
against IDGroupType and IDArrayType, like so::
from Blender.Types import IDGroupType, IDArrayType.
if type(group['bleghr']) == IDGroupType:
(do something)
@ivar name: The name of the property
@type name: string
"""
def pop(item):
"""
Pop an item from the group property.
@type item: string
@param item: The item name.
@rtype: can be dict, list, int, float or string.
@return: The removed property.
"""
def update(updatedict):
"""
Updates items in the dict, similar to normal python
dictionary method .update().
@type updatedict: dict
@param updatedict: A dict of simple types to derive updated/new IDProperties from.
@rtype: None
@return: None
"""
def keys():
"""
Returns a list of the keys in this property group.
@rtype: list of strings.
@return: a list of the keys in this property group.
"""
def values():
"""
Returns a list of the values in this property group.
Note that unless a value is itself a property group or an array, you
cannot change it by changing the values in this list, you must change them
in the parent property group.
For example,
group['some_property'] = new_value
. . .is correct, while,
values = group.values()
values[0] = new_value
. . .is wrong.
@rtype: list of strings.
@return: a list of the values in this property group.
"""
def iteritems():
"""
Implements the python dictionary iteritmes method.
For example::
for k, v in group.iteritems():
print "Property name: " + k
print "Property value: " + str(v)
@rtype: an iterator that spits out items of the form [key, value]
@return: an iterator.
"""
def convert_to_pyobject():
"""
Converts the entire property group to a purely python form.
@rtype: dict
@return: A python dictionary representing the property group
"""
class IDArray:
"""
The IDArray Type
================
@ivar type: returns the type of the array, can be either IDP_Int or IDP_Float
"""
def __getitem__(index):
pass
def __setitem__(index, value):
pass
def __len__():
pass
| 24.556391 | 91 | 0.667177 | 483 | 3,266 | 4.47205 | 0.335404 | 0.048148 | 0.012963 | 0.018519 | 0.094444 | 0.085185 | 0.085185 | 0.085185 | 0.085185 | 0 | 0 | 0.006725 | 0.225964 | 3,266 | 132 | 92 | 24.742424 | 0.847706 | 0.89008 | 0 | 0.214286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.642857 | false | 0.214286 | 0 | 0 | 0.785714 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 3 |
1fd9cb304057c665e3c98c76aed6b26c8265aa34 | 1,969 | py | Python | valid8/tests/readme/examples/test_example2_cases.py | smarie/python-validate | c8a10ccede1c0782355439b0966f532bf00dfcab | [
"BSD-3-Clause"
] | 26 | 2018-01-10T03:44:19.000Z | 2021-11-28T07:56:31.000Z | valid8/tests/readme/examples/test_example2_cases.py | smarie/python-validate | c8a10ccede1c0782355439b0966f532bf00dfcab | [
"BSD-3-Clause"
] | 55 | 2017-11-06T14:45:47.000Z | 2021-05-12T08:28:11.000Z | valid8/tests/readme/examples/test_example2_cases.py | smarie/python-valid8 | c8a10ccede1c0782355439b0966f532bf00dfcab | [
"BSD-3-Clause"
] | null | null | null | import sys
def inline_validate_1(s):
from valid8 import validate
validate('s', s, instance_of=str, min_len=1)
validate('s', s, equals=s.lower())
def inline_validate_2(s):
from valid8 import validate
validate('s', s, instance_of=str, min_len=1, custom=str.islower)
def inline_validate_3(s):
from valid8 import validate
# we create a custom mini_lambda variable, since the name 's' is already used
from mini_lambda import InputVar
txt = InputVar('txt', str)
validate('s', s, instance_of=str, min_len=1, custom=txt.islower())
def with_validator(s):
from valid8 import validator
with validator('s', s, instance_of=str) as v:
v.alid = (len(s) > 0) and s.islower()
def function_input_builtin_stdlib(value):
from valid8 import validate_arg
from valid8.validation_lib import instance_of, minlen
@validate_arg('s', instance_of(str), minlen(1), str.islower)
def my_function(s):
pass
my_function(value)
def function_input_mini_lambda(value):
from mini_lambda import s, Len
from valid8 import validate_arg
from valid8.validation_lib import instance_of
@validate_arg('s', instance_of(str), Len(s) > 0, s.islower())
def my_function(s):
pass
my_function(value)
def class_field_builtin_stdlib(value):
from valid8 import validate_field
from valid8.validation_lib import instance_of, minlen
@validate_field('s', instance_of(str), minlen(1), str.islower)
class Foo:
def __init__(self, s):
self.s = s
Foo(value)
def class_field_mini_lambda(value):
from mini_lambda import s, Len
from valid8 import validate_field
from valid8.validation_lib import instance_of
@validate_field('s', instance_of(str), Len(s) > 0, s.islower())
class Foo:
def __init__(self, s):
self.s = s
Foo(value)
if sys.version_info >= (3, 0):
from ._tests_pep484 import ex2_pep484 as pep484
| 24.6125 | 81 | 0.686643 | 296 | 1,969 | 4.344595 | 0.212838 | 0.093313 | 0.099533 | 0.087092 | 0.692068 | 0.660964 | 0.648523 | 0.620529 | 0.570762 | 0.517885 | 0 | 0.022566 | 0.212291 | 1,969 | 79 | 82 | 24.924051 | 0.806576 | 0.03809 | 0 | 0.529412 | 0 | 0 | 0.006342 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.235294 | false | 0.039216 | 0.333333 | 0 | 0.607843 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
1fed218a00802306e88f0da415d59262aa324590 | 198 | py | Python | curso_hector/17-funcionalidades-avanzadas/funciones_decoradoras.py | corahama/python | 234fa60ac6258905b158f1e114868a2629d52773 | [
"MIT"
] | 1 | 2021-12-22T16:02:27.000Z | 2021-12-22T16:02:27.000Z | curso_hector/17-funcionalidades-avanzadas/funciones_decoradoras.py | corahama/python | 234fa60ac6258905b158f1e114868a2629d52773 | [
"MIT"
] | null | null | null | curso_hector/17-funcionalidades-avanzadas/funciones_decoradoras.py | corahama/python | 234fa60ac6258905b158f1e114868a2629d52773 | [
"MIT"
] | null | null | null | def hola():
def bienvenido():
print("hola!")
return bienvenido
# hola()()
def mensaje():
return "Este es un mensaje"
def test(function):
print(mensaje())
test(mensaje)
| 11.647059 | 31 | 0.59596 | 23 | 198 | 5.130435 | 0.478261 | 0.118644 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.252525 | 198 | 16 | 32 | 12.375 | 0.797297 | 0.040404 | 0 | 0 | 0 | 0 | 0.12234 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.444444 | false | 0 | 0 | 0.111111 | 0.666667 | 0.222222 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 3 |
1ff952cbc2b805fd5e2a081249d04452513d5673 | 4,499 | py | Python | ztlearn/regularizers.py | jefkine/zeta-learn | 04388f90093b52f5df2f334c898f3a1224f5a13f | [
"MIT"
] | 30 | 2018-03-12T19:16:27.000Z | 2021-12-16T05:32:38.000Z | ztlearn/regularizers.py | jefkine/zeta-learn | 04388f90093b52f5df2f334c898f3a1224f5a13f | [
"MIT"
] | 4 | 2018-06-13T03:47:15.000Z | 2018-11-05T21:33:34.000Z | ztlearn/regularizers.py | jefkine/zeta-learn | 04388f90093b52f5df2f334c898f3a1224f5a13f | [
"MIT"
] | 4 | 2018-04-30T07:42:47.000Z | 2022-01-31T11:35:53.000Z | # -*- coding: utf-8 -*-
import numpy as np
# Note: careful as np.multiply does an elementwise multiply on numpy arrays
# asterisk (*) does the same but will perfom matrix multiplication on mat (numpy matrices)
class L1Regularization:
"""
**Lasso Regression (L1Regularization)**
L1Regularization adds sum of the absolute value magnitudes of parameters as
penalty term to the loss function
References:
[1] Regularization (mathematics)
* [Wikipedia Article] https://en.wikipedia.org/wiki/Regularization_(mathematics)
[2] Regression shrinkage and selection via the lasso
* [R Tibshirani, 1996] https://goo.gl/Yh9bBU
* [PDF] https://goo.gl/mQP5mA
[3] Feature selection, L1 vs. L2 regularization, and rotational invariance
* [Andrew Y. Ng, ] [PDF] https://goo.gl/rbwNCt
Args:
_lambda (float32): controls the weight of the penalty term
"""
def __init__(self, _lambda, **kwargs):
self._lambda = _lambda
def regulate(self, weights):
return np.multiply(self._lambda, np.linalg.norm(weights))
def derivative(self, weights):
return np.multiply(self._lambda, np.sign(weights))
@property
def regulation_name(self):
return self.__class__.__name__
class L2Regularization:
"""
**Lasso Regression (L2Regularization)**
L1Regularization adds sum of the squared magnitudes of parameters as penalty
term to the loss function
References:
[1] Regularization (mathematics)
* [Wikipedia Article] https://en.wikipedia.org/wiki/Regularization_(mathematics)
[2] Regression shrinkage and selection via the lasso
* [R Tibshirani, 1996] https://goo.gl/Yh9bBU
* [PDF] https://goo.gl/mQP5mA
[3] Feature selection, L1 vs. L2 regularization, and rotational invariance
* [Andrew Y. Ng, ] [PDF] https://goo.gl/rbwNCt
Args:
_lambda (float32): controls the weight of the penalty term
"""
def __init__(self, _lambda, **kwargs):
self._lambda = _lambda
def regulate(self, weights):
return np.multiply(self._lambda, (0.5 * weights.T.dot(weights)))
def derivative(self, weights):
return np.multiply(self._lambda, weights)
@property
def regulation_name(self):
return self.__class__.__name__
class ElasticNetRegularization:
"""
**Elastic Net Regularization (ElasticNetRegularization)**
ElasticNetRegularization adds both absolute value of magnitude and squared
magnitude of coefficient as penalty term to the loss function
References:
[1] Regularization (mathematics)
* [Wikipedia Article] https://en.wikipedia.org/wiki/Regularization_(mathematics)
Args:
_lambda (float32): controls the weight of the penalty term
l1_ratio (float32): controls the value l1 penalty as a ratio of total penalty added to the loss function
"""
def __init__(self, _lambda, l1_ratio):
self._lambda = _lambda
self.l1_ratio = l1_ratio
def regulate(self, weights):
return np.multiply(self._lambda, (((self.l1_ratio * 0.5) * weights.T.dot(weights)) + ((1 - self.l1_ratio) * np.linalg.norm(weights))))
def derivative(self, weights):
return np.multiply(self._lambda, (((self.l1_ratio * 0.5) * weights) + ((1 - self.l1_ratio) * np.sign(weights))))
@property
def regulation_name(self):
return self.__class__.__name__
class RegularizationFunction:
_regularizers = {
'l1' : L1Regularization,
'lasso' : L1Regularization,
'l2' : L2Regularization,
'ridge' : L2Regularization,
'elastic' : ElasticNetRegularization,
'elastic_net' : ElasticNetRegularization
}
def __init__(self, name = 'lasso', _lambda = 0.5, l1_ratio = 0.5):
if name not in self._regularizers.keys():
raise Exception('Regularization function must be either one of the following: {}.'.format(', '.join(self._regularizers.keys())))
self.regularization_func = self._regularizers[name](_lambda, l1_ratio = l1_ratio)
@property
def name(self):
return self.regularization_func.regularization_name
def regulate(self, weights):
return self.regularization_func.regulate(weights)
def derivative(self, weights):
return self.regularization_func.derivative(weights)
| 32.366906 | 142 | 0.658591 | 511 | 4,499 | 5.62818 | 0.248532 | 0.041725 | 0.047288 | 0.039638 | 0.628651 | 0.605355 | 0.55459 | 0.55459 | 0.55459 | 0.550765 | 0 | 0.019906 | 0.24072 | 4,499 | 138 | 143 | 32.601449 | 0.822014 | 0.442543 | 0 | 0.442308 | 0 | 0 | 0.044168 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.307692 | false | 0 | 0.019231 | 0.230769 | 0.653846 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
1ffaddb4ee59335c1b34e0cad8d6e1da155e78da | 1,407 | py | Python | onboard/client/staging.py | onboard-data/client-py | a05647e46e02f649a9b4fb8df89abcb1b65dbcca | [
"Apache-2.0"
] | 8 | 2020-06-16T15:32:37.000Z | 2021-12-02T20:52:33.000Z | onboard/client/staging.py | onboard-data/client-py | a05647e46e02f649a9b4fb8df89abcb1b65dbcca | [
"Apache-2.0"
] | null | null | null | onboard/client/staging.py | onboard-data/client-py | a05647e46e02f649a9b4fb8df89abcb1b65dbcca | [
"Apache-2.0"
] | 3 | 2020-06-15T21:37:06.000Z | 2021-07-12T19:41:04.000Z | from typing import List, Dict, Any
from .helpers import ClientBase
from .util import json
class StagingClient(ClientBase):
def __init__(self, api_url: str,
api_key: str, name: str = '') -> None:
super().__init__(api_url, api_key=api_key, name=name,
user=None, pw=None, token=None)
@json
def get_staging_building_details(self) -> List[Dict]:
return self.get('/staging')
@json
def update_building_details(self, building_id: int,
details: Dict[str, Any]) -> Dict:
return self.patch(f"/staging/{building_id}/details", json=details)
@json
def get_staged_equipment(self, building_id: int) -> Dict:
return self.get(f'/staging/{building_id}')
def get_staged_equipment_csv(self, building_id: int) -> str:
@json
def get_csv():
return self.get(f'/staging/{building_id}',
headers={'Accept': 'text/csv'})
get_csv.raw_response = True # type: ignore[attr-defined]
return get_csv().text
@json
def update_staged_equipment(self, building_id: int, updates: List[Dict]) -> Dict:
return self.post(f'/staging/{building_id}', json=updates)
class OnboardStagingClient(StagingClient):
def __init__(self, api_key: str) -> None:
super().__init__('https://api.onboarddata.io', api_key)
| 33.5 | 85 | 0.62118 | 177 | 1,407 | 4.672316 | 0.305085 | 0.096735 | 0.067715 | 0.082225 | 0.152358 | 0.152358 | 0.07497 | 0 | 0 | 0 | 0 | 0 | 0.25231 | 1,407 | 41 | 86 | 34.317073 | 0.786122 | 0.018479 | 0 | 0.16129 | 0 | 0 | 0.104424 | 0.069616 | 0 | 0 | 0 | 0 | 0 | 1 | 0.258065 | false | 0 | 0.096774 | 0.16129 | 0.612903 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
1ffd840ce14518f3d01704b2aa2a72a71f666988 | 107 | py | Python | swampymud/util/__init__.py | ufosc/MuddySwamp | 2e28f9db1f0f4e1c4aafccdf7f58bf2a22b82366 | [
"MIT"
] | 10 | 2018-10-14T00:29:27.000Z | 2020-05-02T23:59:30.000Z | swampymud/util/__init__.py | ufosc/MuddySwamp | 2e28f9db1f0f4e1c4aafccdf7f58bf2a22b82366 | [
"MIT"
] | 36 | 2018-06-13T05:48:10.000Z | 2020-02-05T18:51:52.000Z | swampymud/util/__init__.py | ufosc/MuddySwamp | 2e28f9db1f0f4e1c4aafccdf7f58bf2a22b82366 | [
"MIT"
] | 8 | 2018-08-30T03:13:13.000Z | 2020-05-15T21:42:52.000Z | '''Useful classes and functions used elsewhere in the
SwampyMud engine'''
from .misc import *
TAB = " "
| 21.4 | 53 | 0.700935 | 14 | 107 | 5.357143 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.196262 | 107 | 4 | 54 | 26.75 | 0.872093 | 0.626168 | 0 | 0 | 0 | 0 | 0.117647 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 | 3 |
950b65fde6f470f413e9087234fd4f26b18fc873 | 125 | py | Python | DesignPattern/CompositePattern/__init__.py | Oliver-Yan-2019/algorithm | 4563365673cb7aeeba4bba37895bc6be9cf7171c | [
"Unlicense"
] | 1 | 2021-02-09T08:19:23.000Z | 2021-02-09T08:19:23.000Z | DesignPattern/CompositePattern/__init__.py | Oliver-Yan-2019/algorithm | 4563365673cb7aeeba4bba37895bc6be9cf7171c | [
"Unlicense"
] | null | null | null | DesignPattern/CompositePattern/__init__.py | Oliver-Yan-2019/algorithm | 4563365673cb7aeeba4bba37895bc6be9cf7171c | [
"Unlicense"
] | null | null | null | """
组合模式
"""
from DataStructure.Link import FavoritesList
if __name__ == '__main__':
_favorites_list = FavoritesList()
| 13.888889 | 44 | 0.72 | 12 | 125 | 6.666667 | 0.916667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.16 | 125 | 8 | 45 | 15.625 | 0.761905 | 0.032 | 0 | 0 | 0 | 0 | 0.070796 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 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 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
950ddddd4fe3d2d85163bfe217831b8e9b1bdd45 | 219 | py | Python | aiter/iter_to_aiter.py | rostislav/aiter | 28942e66fda6397443aa33c0cb6515d8e8b991e7 | [
"MIT"
] | 10 | 2019-03-19T14:40:06.000Z | 2022-02-01T01:05:18.000Z | aiter/iter_to_aiter.py | rostislav/aiter | 28942e66fda6397443aa33c0cb6515d8e8b991e7 | [
"MIT"
] | 3 | 2019-09-19T07:39:00.000Z | 2020-06-30T17:10:22.000Z | aiter/iter_to_aiter.py | rostislav/aiter | 28942e66fda6397443aa33c0cb6515d8e8b991e7 | [
"MIT"
] | 5 | 2019-09-19T07:35:59.000Z | 2022-03-14T05:55:05.000Z | async def iter_to_aiter(iter):
"""
:type iter: synchronous iterator
:param iter: a synchronous iterator
This converts a regular iterator to an async iterator.
"""
for _ in iter:
yield _
| 21.9 | 58 | 0.648402 | 28 | 219 | 4.928571 | 0.607143 | 0.275362 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.283105 | 219 | 9 | 59 | 24.333333 | 0.878981 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
950f625788458401dfa2fa3e99377cf58f9310f4 | 156 | py | Python | ejercicios_varios/graficas/ejemplo2.py | JuanDuran85/ejemplos_python | 47aa49c65384ab89654f362f3da6cd2b0ef386e5 | [
"Apache-2.0"
] | null | null | null | ejercicios_varios/graficas/ejemplo2.py | JuanDuran85/ejemplos_python | 47aa49c65384ab89654f362f3da6cd2b0ef386e5 | [
"Apache-2.0"
] | null | null | null | ejercicios_varios/graficas/ejemplo2.py | JuanDuran85/ejemplos_python | 47aa49c65384ab89654f362f3da6cd2b0ef386e5 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
x = np.random.randn(100)
y = np.random.randn(100)
fig,ax = plt.subplots()
ax.scatter(x,y,)
plt.show() | 14.181818 | 31 | 0.705128 | 29 | 156 | 3.793103 | 0.586207 | 0.145455 | 0.236364 | 0.290909 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.044776 | 0.141026 | 156 | 11 | 32 | 14.181818 | 0.776119 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.285714 | 0 | 0.285714 | 0 | 1 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
9514a3ccbd7955a778af6dd127be91eef60430c7 | 38 | py | Python | pwngef/functions/__init__.py | GH0st3rs/pwngef | 77619d7266f58523fda2c40a54255093389027e6 | [
"MIT"
] | 8 | 2019-05-28T08:03:07.000Z | 2022-02-23T03:34:30.000Z | pwngef/functions/__init__.py | GH0st3rs/pwngef | 77619d7266f58523fda2c40a54255093389027e6 | [
"MIT"
] | 2 | 2019-04-02T12:36:04.000Z | 2019-08-14T08:31:28.000Z | pwngef/functions/__init__.py | GH0st3rs/pwngef | 77619d7266f58523fda2c40a54255093389027e6 | [
"MIT"
] | 3 | 2019-08-13T11:03:02.000Z | 2021-05-13T19:13:04.000Z | #!/usr/bin/python
__functions__ = []
| 9.5 | 18 | 0.657895 | 4 | 38 | 5.25 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.131579 | 38 | 3 | 19 | 12.666667 | 0.636364 | 0.421053 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 | 3 |
1f1106a78326b638b17c0748de1128ec51b6f90f | 885 | py | Python | yandex_linux/lib/python3.8/site-packages/typepy/checker/_dictionary.py | DmitrySH19/REST_api_yandex | 7cb3301fdaa9676c617619e4712f96e9bc78442a | [
"MIT"
] | 18 | 2017-05-04T05:21:55.000Z | 2022-01-05T20:27:23.000Z | yandex_linux/lib/python3.8/site-packages/typepy/checker/_dictionary.py | DmitrySH19/REST_api_yandex | 7cb3301fdaa9676c617619e4712f96e9bc78442a | [
"MIT"
] | 20 | 2021-05-03T18:02:23.000Z | 2022-03-12T12:01:04.000Z | Lib/site-packages/typepy/checker/_dictionary.py | fochoao/cpython | 3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9 | [
"bzip2-1.0.6",
"0BSD"
] | 5 | 2019-07-26T14:33:42.000Z | 2021-04-10T13:10:20.000Z | """
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
from ._checker import CheckerFactory, TypeCheckerBase, TypeCheckerDelegator
class DictionaryTypeCheckerStrictLevel0(TypeCheckerBase):
def is_instance(self):
return isinstance(self._value, dict)
def is_valid_after_convert(self, converted_value):
return isinstance(converted_value, dict) and converted_value
class DictionaryTypeCheckerStrictLevel1(DictionaryTypeCheckerStrictLevel0):
def is_exclude_instance(self):
return not isinstance(self._value, dict)
_factory = CheckerFactory(
checker_mapping={0: DictionaryTypeCheckerStrictLevel0, 1: DictionaryTypeCheckerStrictLevel1}
)
class DictionaryTypeChecker(TypeCheckerDelegator):
def __init__(self, value, strict_level):
super().__init__(value=value, checker_factory=_factory, strict_level=strict_level)
| 30.517241 | 96 | 0.788701 | 83 | 885 | 8.084337 | 0.457831 | 0.022355 | 0.053651 | 0.068554 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.009091 | 0.129944 | 885 | 28 | 97 | 31.607143 | 0.862338 | 0.071186 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.266667 | false | 0 | 0.066667 | 0.2 | 0.733333 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
1f25fed22904cf54c3c795e1a0cd60e1d7e38330 | 190 | py | Python | datahub/user/company_list/apps.py | Staberinde/data-hub-api | 3d0467dbceaf62a47158eea412a3dba827073300 | [
"MIT"
] | 6 | 2019-12-02T16:11:24.000Z | 2022-03-18T10:02:02.000Z | datahub/user/company_list/apps.py | Staberinde/data-hub-api | 3d0467dbceaf62a47158eea412a3dba827073300 | [
"MIT"
] | 1,696 | 2019-10-31T14:08:37.000Z | 2022-03-29T12:35:57.000Z | datahub/user/company_list/apps.py | Staberinde/data-hub-api | 3d0467dbceaf62a47158eea412a3dba827073300 | [
"MIT"
] | 9 | 2019-11-22T12:42:03.000Z | 2021-09-03T14:25:05.000Z | from django.apps import AppConfig
class CompanyListConfig(AppConfig):
"""Configuration class for this app."""
name = 'datahub.user.company_list'
verbose_name = 'Company list'
| 21.111111 | 43 | 0.726316 | 22 | 190 | 6.181818 | 0.772727 | 0.161765 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.173684 | 190 | 8 | 44 | 23.75 | 0.866242 | 0.173684 | 0 | 0 | 0 | 0 | 0.245033 | 0.165563 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.25 | 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 | 0 | 0 | 1 | 0 | 0 | 3 |
1f3005afc8b3a4f8bceff937be3c38db126e584e | 976 | py | Python | Lib/site-packages/sciplot/__init__.py | fochoao/cpython | 3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9 | [
"bzip2-1.0.6",
"0BSD"
] | null | null | null | Lib/site-packages/sciplot/__init__.py | fochoao/cpython | 3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9 | [
"bzip2-1.0.6",
"0BSD"
] | 20 | 2021-05-03T18:02:23.000Z | 2022-03-12T12:01:04.000Z | Lib/site-packages/sciplot/__init__.py | fochoao/cpython | 3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9 | [
"bzip2-1.0.6",
"0BSD"
] | null | null | null | # -*- coding: utf-8 -*-
"""
SciPlot-PyQt: Publication-ready scientific plotting for Python
==============================================================
SciPlot-PyQt (aka SciPlot) is a user-interface/matplotlib wrapper built with
PyQt5 that allows interactive plotting through an embedded matplotlib canvas.
It enables fast and easy publication-ready plots and images:
* Interactive plotting
* Theme and style editing (TODO)
* Figure saving and opening for later editing (TODO)
Supported Plot Types
---------------------
Line plots : plot
Bar plots : bar, hist
Polycollections : fill_between
Images : imshow
"""
import sys as _sys
import os as _os
import pkg_resources as _pkg_resources
from . import sciplotUI
_sys.path.append(_os.path.abspath('../'))
try:
__version__ = _pkg_resources.require("sciplot-pyqt")[0].version
except:
pass
# __version__ = '0.2.2'
# __all__ = ['SciPlotUI']
# from .sciplotUI import SciPlotUI as main
| 22.697674 | 78 | 0.667008 | 119 | 976 | 5.285714 | 0.613445 | 0.052464 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.007389 | 0.168033 | 976 | 42 | 79 | 23.238095 | 0.767241 | 0.735656 | 0 | 0 | 0 | 0 | 0.060729 | 0 | 0 | 0 | 0 | 0.047619 | 0 | 1 | 0 | false | 0.111111 | 0.444444 | 0 | 0.444444 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 3 |
1f56e5a846774db73cd389c9e8c98b2180ce6305 | 1,027 | py | Python | Settings.py | MAXIORBOY/ReflexGame | 69d3c12f2a227cd948009f863fb5c16ce1c70256 | [
"MIT"
] | null | null | null | Settings.py | MAXIORBOY/ReflexGame | 69d3c12f2a227cd948009f863fb5c16ce1c70256 | [
"MIT"
] | null | null | null | Settings.py | MAXIORBOY/ReflexGame | 69d3c12f2a227cd948009f863fb5c16ce1c70256 | [
"MIT"
] | null | null | null | import h5py
import numpy as np
class Settings:
def __init__(self, file_name):
self.file_name = file_name
try:
self.file = h5py.File(file_name, 'r+')
except:
self.file = h5py.File(file_name, 'w')
self.create()
self.file = h5py.File(file_name, 'r+')
def create(self):
self.file.close()
self.file = h5py.File(self.file_name, 'w')
self.file.create_dataset('Resolution', (1, 1), maxshape=(1, 1), dtype=np.dtype([('Window width', 'i'), ('Window height', 'i')]))
self.file['Resolution']['Window width'] = 640
self.file['Resolution']['Window height'] = 480
self.file.close()
def change_resolution(self, new_resolution):
self.file['Resolution']['Window width'] = new_resolution[0]
self.file['Resolution']['Window height'] = new_resolution[1]
def get_resolution(self):
return self.file['Resolution']['Window width'][0, 0], self.file['Resolution']['Window height'][0, 0]
| 33.129032 | 136 | 0.596884 | 132 | 1,027 | 4.515152 | 0.257576 | 0.214765 | 0.181208 | 0.241611 | 0.424497 | 0.228188 | 0.083893 | 0 | 0 | 0 | 0 | 0.026786 | 0.236611 | 1,027 | 30 | 137 | 34.233333 | 0.733418 | 0 | 0 | 0.173913 | 0 | 0 | 0.17332 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.173913 | false | 0 | 0.086957 | 0.043478 | 0.347826 | 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 | 0 | 0 | 0 | 3 |
1f5791384f2c2c243d00b76580188acf3bcaf65e | 836 | py | Python | src/WebApp/Test/locator.py | sakshiigupta/TumorInsight | 9f49e718e0a2e6afa28332c7564b2215c7ee197d | [
"MIT"
] | 1 | 2021-05-18T15:22:38.000Z | 2021-05-18T15:22:38.000Z | src/WebApp/Test/locator.py | sakshiigupta/TumorInsight | 9f49e718e0a2e6afa28332c7564b2215c7ee197d | [
"MIT"
] | null | null | null | src/WebApp/Test/locator.py | sakshiigupta/TumorInsight | 9f49e718e0a2e6afa28332c7564b2215c7ee197d | [
"MIT"
] | 4 | 2021-05-18T16:22:00.000Z | 2022-02-02T14:02:11.000Z | from selenium.webdriver.common.by import By
class MainPageLocators(object):
LOGIN_BUTTON = (By.XPATH, "/html/body/header/div/nav/ul/li[5]/a")
SIGNUP_BUTTON = (By.XPATH, "/html/body/footer/div[1]/div/div/div[3]/ul/li[5]/a")
GITHUB_SOCIAL = (By.XPATH, "/html/body/footer/div[1]/div/div/div[1]/div/a[1]")
class LoginPageLocators(object):
NEW_ACC = (By.XPATH, "/html/body/div/div/div/form/div[4]/a")
CONFIRM_LOGIN = (By.XPATH, "/html/body/div/div/div/form/div[3]/button")
USER_NAME = (By.ID, "uname")
USER_PASS = (By.ID, "passw")
class SignupPageLocators(object):
LOGIN_LINK = (By.XPATH, "/html/body/div/div/div/form/div[5]/a")
CONFIRM_REGISTER = (By.XPATH, "/html/body/div/div/div/form/div[4]/button")
NEW_NAME = (By.ID, "uname")
NEW_MAIL = (By.ID, "mail")
NEW_PASS = (By.ID, "passw")
| 36.347826 | 84 | 0.654306 | 139 | 836 | 3.848921 | 0.309353 | 0.134579 | 0.143925 | 0.196262 | 0.413084 | 0.362617 | 0.362617 | 0.362617 | 0.362617 | 0.246729 | 0 | 0.015193 | 0.133971 | 836 | 22 | 85 | 38 | 0.723757 | 0 | 0 | 0 | 0 | 0.125 | 0.373206 | 0.344498 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0.125 | 0.0625 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 3 |
1f62dab4d54b3462db42805cd7f75b8e7d6a4b3f | 836 | py | Python | pysimplevcs/hg.py | rcook/pyvcs | e4c87456ecf95d5fee9859c8f8e8fe41d788fbe2 | [
"MIT"
] | null | null | null | pysimplevcs/hg.py | rcook/pyvcs | e4c87456ecf95d5fee9859c8f8e8fe41d788fbe2 | [
"MIT"
] | 2 | 2017-02-22T05:07:29.000Z | 2017-09-11T22:29:32.000Z | pysimplevcs/hg.py | rcook/pyvcs | e4c87456ecf95d5fee9859c8f8e8fe41d788fbe2 | [
"MIT"
] | null | null | null | ############################################################
#
# pysimplevcs.hg
# Copyright (C) 2017, Richard Cook
# Released under MIT License
# https://github.com/rcook/pysimplevcs
#
############################################################
from __future__ import print_function
import os
from pyprelude.process import execute, proxy_command
class Hg(object):
def __init__(self, cwd=None):
if cwd is None:
cwd = os.getcwd()
cwd = os.path.abspath(cwd)
self._repo_dir = execute("hg", "root", cwd=cwd).strip()
@property
def repo_dir(self): return self._repo_dir
def __getattr__(self, name):
def _missing_method(*args, **kwargs):
return proxy_command(name, self._repo_dir, lambda n, args: ["hg", n] + args, *args, **kwargs)
return _missing_method
| 26.125 | 105 | 0.561005 | 95 | 836 | 4.663158 | 0.547368 | 0.063205 | 0.074492 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.005944 | 0.194976 | 836 | 31 | 106 | 26.967742 | 0.652303 | 0.132775 | 0 | 0 | 0 | 0 | 0.013378 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.266667 | false | 0 | 0.2 | 0.133333 | 0.666667 | 0.066667 | 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 | 0 | 1 | 1 | 0 | 0 | 3 |
1f80c7ff09877e2a68e3f87f49286e4d9b914921 | 129 | py | Python | TracebackPrettifier/TracebackPrettifierTest.py | rishidevc/stkovrflw | c33dffbce887f32f609a10dd717d594390ceac8b | [
"MIT"
] | null | null | null | TracebackPrettifier/TracebackPrettifierTest.py | rishidevc/stkovrflw | c33dffbce887f32f609a10dd717d594390ceac8b | [
"MIT"
] | 5 | 2020-05-04T03:11:14.000Z | 2021-06-10T20:20:38.000Z | TracebackPrettifier/TracebackPrettifierTest.py | rishidevc/stkovrflw | c33dffbce887f32f609a10dd717d594390ceac8b | [
"MIT"
] | 1 | 2019-07-31T18:28:34.000Z | 2019-07-31T18:28:34.000Z | def func3(a):
a/0;
def func2(a, b):
func3(a);
def func1(a, b, c):
func2(a, b);
if __name__ == "__main__":
func1(12, 0, 89) | 11.727273 | 26 | 0.565891 | 26 | 129 | 2.5 | 0.5 | 0.092308 | 0.215385 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.116505 | 0.20155 | 129 | 11 | 27 | 11.727273 | 0.514563 | 0 | 0 | 0 | 0 | 0 | 0.061538 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.375 | false | 0 | 0 | 0 | 0.375 | 0 | 1 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
1f8ecf623ff6a5ce0f506cb40b22d09dd630b920 | 327 | py | Python | 5/new code/OpenKE-OpenKE-PyTorch/openke/module/loss/__init__.py | smurf-1119/knowledge-engeneering-experiment | 7fd3647bfc5b05e5fd6f93fea324e7ec0d55d4a1 | [
"MIT"
] | 10 | 2021-11-19T06:24:51.000Z | 2022-02-09T15:44:00.000Z | 5/new code/OpenKE-OpenKE-PyTorch/openke/module/loss/__init__.py | smurf-1119/knowledge-engeneering-experiment | 7fd3647bfc5b05e5fd6f93fea324e7ec0d55d4a1 | [
"MIT"
] | 9 | 2021-10-01T11:06:27.000Z | 2021-12-23T02:10:52.000Z | 5/new code/OpenKE-OpenKE-PyTorch/openke/module/loss/__init__.py | smurf-1119/knowledge-engeneering-experiment | 7fd3647bfc5b05e5fd6f93fea324e7ec0d55d4a1 | [
"MIT"
] | 2 | 2021-09-14T04:08:36.000Z | 2021-11-19T06:24:54.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from .Loss import Loss
from .MarginLoss import MarginLoss
from .SoftplusLoss import SoftplusLoss
from .SigmoidLoss import SigmoidLoss
__all__ = [
'Loss',
'MarginLoss',
'SoftplusLoss',
'SigmoidLoss',
] | 21.8 | 38 | 0.779817 | 35 | 327 | 6.771429 | 0.342857 | 0.126582 | 0.202532 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.16208 | 327 | 15 | 39 | 21.8 | 0.864964 | 0 | 0 | 0 | 0 | 0 | 0.112805 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.538462 | 0 | 0.538462 | 0.076923 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
2f08e55474f5ecd847e0c1b3ce25cf48d9d7088d | 124 | py | Python | runner_score.py | bjoffficial/Python | 73e6fdc19a1bec18488405c4a60c30ba68581ce5 | [
"Apache-2.0"
] | null | null | null | runner_score.py | bjoffficial/Python | 73e6fdc19a1bec18488405c4a60c30ba68581ce5 | [
"Apache-2.0"
] | null | null | null | runner_score.py | bjoffficial/Python | 73e6fdc19a1bec18488405c4a60c30ba68581ce5 | [
"Apache-2.0"
] | null | null | null | n=list(map(int,input("Enter the list").split(",")))
le=max(n)
while max(n)==le:
n.remove(max(n))
print(max(n))
| 20.666667 | 52 | 0.564516 | 23 | 124 | 3.043478 | 0.565217 | 0.228571 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.169355 | 124 | 5 | 53 | 24.8 | 0.679612 | 0 | 0 | 0 | 0 | 0 | 0.12605 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.2 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.