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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
230ce7a68295d2b27c184cb0a65f1211483d5f83
| 41
|
py
|
Python
|
vk_dumper/__init__.py
|
saber-nyan/vk_telegram_utils
|
79fc116ea27a993201e03a8d84b18510eca63a45
|
[
"WTFPL"
] | 2
|
2020-03-19T14:22:50.000Z
|
2020-04-02T21:45:50.000Z
|
vk_dumper/__init__.py
|
saber-nyan/vk_telegram_utils
|
79fc116ea27a993201e03a8d84b18510eca63a45
|
[
"WTFPL"
] | 2
|
2021-03-31T19:43:15.000Z
|
2021-12-13T20:36:31.000Z
|
vk_dumper/__init__.py
|
saber-nyan/vk_telegram_utils
|
79fc116ea27a993201e03a8d84b18510eca63a45
|
[
"WTFPL"
] | null | null | null |
"""
Utility for dumping VK messages.
"""
| 10.25
| 32
| 0.658537
| 5
| 41
| 5.4
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.170732
| 41
| 3
| 33
| 13.666667
| 0.794118
| 0.780488
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
232bb3c4b985e8e2c3ab7b848bf302b3144b98fd
| 1,898
|
py
|
Python
|
tests/test_tekpower.py
|
mgeiger/tekpower
|
26e06c70c8cbce4125bc7d53144a92f3cd55450b
|
[
"MIT"
] | 1
|
2018-04-21T02:58:02.000Z
|
2018-04-21T02:58:02.000Z
|
tests/test_tekpower.py
|
mgeiger/tekpower
|
26e06c70c8cbce4125bc7d53144a92f3cd55450b
|
[
"MIT"
] | 291
|
2018-04-26T00:03:53.000Z
|
2022-03-14T10:17:04.000Z
|
tests/test_tekpower.py
|
mgeiger/tekpower
|
26e06c70c8cbce4125bc7d53144a92f3cd55450b
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests for `tekpower` package."""
import pytest
from tekpower import tekpower
@pytest.fixture(scope='module')
def blank_tp3005p():
tp = tekpower.TP3005P(None)
yield tp
@pytest.mark.usefixtures('blank_tp3005p')
def test_tp3005p_init(blank_tp3005p):
assert not blank_tp3005p.on, "Initialized TP3005P to On state."
@pytest.mark.usefixtures('blank_tp3005p')
def test_tp3005p_identify(blank_tp3005p):
with pytest.raises(AttributeError):
identify = blank_tp3005p.identify()
@pytest.mark.usefixtures('blank_tp3005p')
def test_tp3005p_status(blank_tp3005p):
with pytest.raises(AttributeError):
status = blank_tp3005p.status()
@pytest.mark.usefixtures('blank_tp3005p')
def test_tp3005p_output(blank_tp3005p):
assert not blank_tp3005p.output(state=False), \
"State should not have been set."
with pytest.raises(AttributeError):
blank_tp3005p.output(state=True)
@pytest.mark.usefixtures('blank_tp3005p')
def test_tp3005p_current(blank_tp3005p):
with pytest.raises(AttributeError):
current = blank_tp3005p.current()
@pytest.mark.usefixtures('blank_tp3005p')
def test_tp3005p_voltage(blank_tp3005p):
with pytest.raises(AttributeError):
voltage = blank_tp3005p.voltage()
@pytest.mark.usefixtures('blank_tp3005p')
def test_tp3005p_current_setpoint(blank_tp3005p):
with pytest.raises(AttributeError):
current_setpoint = blank_tp3005p.current_setpoint()
with pytest.raises(AttributeError):
current_setpoint = blank_tp3005p.current_setpoint(1.0)
@pytest.mark.usefixtures('blank_tp3005p')
def test_tp3005p_voltage_setpoint(blank_tp3005p):
with pytest.raises(AttributeError):
voltage_setpoint = blank_tp3005p.voltage_setpoint()
with pytest.raises(AttributeError):
voltage_setpoint = blank_tp3005p.voltage_setpoint(1.0)
| 28.757576
| 67
| 0.754478
| 228
| 1,898
| 6.04386
| 0.219298
| 0.243832
| 0.104499
| 0.195936
| 0.711176
| 0.711176
| 0.602322
| 0.502177
| 0.365747
| 0.208999
| 0
| 0.095907
| 0.137513
| 1,898
| 66
| 68
| 28.757576
| 0.745877
| 0.037935
| 0
| 0.395349
| 0
| 0
| 0.095055
| 0
| 0
| 0
| 0
| 0
| 0.046512
| 1
| 0.209302
| false
| 0
| 0.046512
| 0
| 0.255814
| 0
| 0
| 0
| 0
| null | 1
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
23378451e7b7d74616257e9760ca9297352e9bd6
| 233
|
py
|
Python
|
pokemon/admin.py
|
pessman/pokemon_utils
|
cbe06ebe323cb38a35846274d812bdbe8d0ae8ca
|
[
"MIT"
] | 1
|
2019-03-11T04:12:50.000Z
|
2019-03-11T04:12:50.000Z
|
pokemon/admin.py
|
pessman/pokemon_utils
|
cbe06ebe323cb38a35846274d812bdbe8d0ae8ca
|
[
"MIT"
] | null | null | null |
pokemon/admin.py
|
pessman/pokemon_utils
|
cbe06ebe323cb38a35846274d812bdbe8d0ae8ca
|
[
"MIT"
] | 2
|
2019-03-13T03:17:29.000Z
|
2019-04-04T20:06:50.000Z
|
from django.contrib import admin
from pokemon.models import Ability, Item, Move, Pokemon, Type
admin.site.register(Ability)
admin.site.register(Item)
admin.site.register(Move)
admin.site.register(Pokemon)
admin.site.register(Type)
| 23.3
| 61
| 0.806867
| 34
| 233
| 5.529412
| 0.382353
| 0.239362
| 0.452128
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.081545
| 233
| 9
| 62
| 25.888889
| 0.878505
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.285714
| 0
| 0.285714
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
237d56662df38a8104b0d4ec87e91612b84f9058
| 245
|
py
|
Python
|
2015/12/part1.py
|
timofurrer/aoc-2020
|
446b688a57601d9891f520e43b7f822c373a6ff4
|
[
"MIT"
] | null | null | null |
2015/12/part1.py
|
timofurrer/aoc-2020
|
446b688a57601d9891f520e43b7f822c373a6ff4
|
[
"MIT"
] | null | null | null |
2015/12/part1.py
|
timofurrer/aoc-2020
|
446b688a57601d9891f520e43b7f822c373a6ff4
|
[
"MIT"
] | null | null | null |
from pathlib import Path
with (Path(__file__).parent / "input.txt").open() as puzzle_input_file:
puzzle_input_raw = puzzle_input_file.read()
import re
numbers = re.findall(r"[-+]?\d+", puzzle_input_raw)
print(sum(int(x) for x in numbers))
| 27.222222
| 71
| 0.726531
| 40
| 245
| 4.15
| 0.625
| 0.26506
| 0.180723
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.122449
| 245
| 9
| 72
| 27.222222
| 0.772093
| 0
| 0
| 0
| 0
| 0
| 0.069106
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0.166667
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
88c3c0ab0f8fd8ee94c8b6822cd9fbd7a1ece7f6
| 177
|
py
|
Python
|
bookstore/apps/coupons/apps.py
|
jgmartinss/bookstore
|
e629d5b58ed8f59f7b33b7a76da97a014f196f72
|
[
"MIT"
] | null | null | null |
bookstore/apps/coupons/apps.py
|
jgmartinss/bookstore
|
e629d5b58ed8f59f7b33b7a76da97a014f196f72
|
[
"MIT"
] | 17
|
2019-01-04T00:36:31.000Z
|
2019-01-24T14:01:08.000Z
|
bookstore/apps/coupons/apps.py
|
jgmartinss/bookstore
|
e629d5b58ed8f59f7b33b7a76da97a014f196f72
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class CouponsConfig(AppConfig):
name = "coupons"
verbose_name = _("Coupons")
| 19.666667
| 54
| 0.757062
| 21
| 177
| 6.190476
| 0.714286
| 0.153846
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.163842
| 177
| 8
| 55
| 22.125
| 0.878378
| 0
| 0
| 0
| 0
| 0
| 0.079096
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.4
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
88d14956cb2ef0ca8699fe11ca62f3ac8c6fbfa3
| 164
|
py
|
Python
|
logs/admin.py
|
khabdrick/Workout-progress-tracker
|
0e870d37d42e38873a4391fef2e187978ecfc9a2
|
[
"MIT"
] | 3
|
2021-03-07T22:35:10.000Z
|
2021-12-06T14:43:18.000Z
|
logs/admin.py
|
khabdrick/Workout-progress-tracker
|
0e870d37d42e38873a4391fef2e187978ecfc9a2
|
[
"MIT"
] | 4
|
2021-03-07T17:48:16.000Z
|
2021-03-09T19:00:34.000Z
|
logs/admin.py
|
khabdrick/Workout-progress-tracker
|
0e870d37d42e38873a4391fef2e187978ecfc9a2
|
[
"MIT"
] | 1
|
2021-03-07T00:24:56.000Z
|
2021-03-07T00:24:56.000Z
|
from django.contrib import admin
from .models import WorkoutLog
# class LogAdmin(admin.ModelAdmin):
# form = WorkoutLogForm
admin.site.register(WorkoutLog)
| 16.4
| 35
| 0.77439
| 19
| 164
| 6.684211
| 0.736842
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.146341
| 164
| 9
| 36
| 18.222222
| 0.907143
| 0.359756
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
0021adc61f80ce0afcb0853e68cabb348c235ff2
| 163
|
py
|
Python
|
src/haroslaunch/__main__.py
|
git-afsantos/haroslaunch
|
5c5826683a6979c2249da0969a85b8739c238914
|
[
"MIT"
] | null | null | null |
src/haroslaunch/__main__.py
|
git-afsantos/haroslaunch
|
5c5826683a6979c2249da0969a85b8739c238914
|
[
"MIT"
] | null | null | null |
src/haroslaunch/__main__.py
|
git-afsantos/haroslaunch
|
5c5826683a6979c2249da0969a85b8739c238914
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# SPDX-License-Identifier: MIT
# Copyright © 2021 André Santos
import sys
from .main import main
sys.exit(main())
| 14.818182
| 31
| 0.680982
| 25
| 163
| 4.48
| 0.84
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.036496
| 0.159509
| 163
| 10
| 32
| 16.3
| 0.773723
| 0.619632
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
0036d8def17f030985ada8c9e9875a330a33479b
| 16,231
|
py
|
Python
|
arim/_scat_crack.py
|
will-jj/arim
|
fc15efe171a41355090123fcea10406ee75efe31
|
[
"MIT"
] | 14
|
2019-04-05T13:43:36.000Z
|
2022-02-01T21:38:19.000Z
|
arim/_scat_crack.py
|
will-jj/arim
|
fc15efe171a41355090123fcea10406ee75efe31
|
[
"MIT"
] | 2
|
2019-04-09T10:38:26.000Z
|
2019-06-17T16:23:16.000Z
|
arim/_scat_crack.py
|
will-jj/arim
|
fc15efe171a41355090123fcea10406ee75efe31
|
[
"MIT"
] | 5
|
2019-04-04T17:02:20.000Z
|
2020-09-30T15:36:03.000Z
|
"""Nuts and bolts of arim.scat.crack_2d_scat"""
import numpy as np
import numba
import scipy.integrate as si
from numpy.core.umath import sin, cos, pi, exp, sqrt
import ctypes
import scipy
@numba.njit(cache=True)
def basis_function(k):
k_00 = 1e-1
if abs(k) <= k_00:
return 1 - 1 / 18 * k ** 2 + 1 / 792 * k ** 4
else:
return 105.0 / k ** 7 * (k * (k * k - 15) * cos(k) - (6 * k * k - 15) * sin(k))
@numba.njit(cache=True)
def sigma(k, k0):
return sqrt(np.complex(k * k - k0 * k0)).conjugate()
@numba.njit(cache=True)
def F(xi, xi2, h, beta):
# input: float, returns a complex
k = xi2 * h * beta
F = basis_function(k)
sigma_1 = sigma(beta, xi)
sigma_2 = sigma(beta, 1)
L2 = -((beta ** 2 - 0.5) ** 2) + beta ** 2 * sigma_1 * sigma_2
return F ** 2 * L2
@numba.njit(cache=True)
def P(k):
# input: float, returns a complex
k_00 = 1e-1
if abs(k) <= k_00:
F = 1 + 1j * k - 5 / 9 * k ** 2 - 2j / 9 * k ** 3
else:
sk = (exp(2j * k) - 1) / 2j
ck = (exp(2j * k) + 1) / 2
F = 105 / k ** 7 * (k * (k ** 2 - 15) * ck - (6 * k ** 2 - 15) * sk)
return F ** 2
@numba.njit(cache=True)
def A_x_F1(x, xi, xi2, h_nodes, z):
return F(xi, xi2, h_nodes, 1 - x ** 2) / sqrt(2 - x ** 2) * cos((1 - x ** 2) * z)
@numba.cfunc("f8(f8, voidptr)", cache=True)
def A_x_F1_real(x, data):
xi, xi2, h_nodes, z = numba.carray(data, 4, dtype=numba.float64)
return A_x_F1(x, xi, xi2, h_nodes, z).real
@numba.cfunc("f8(f8, voidptr)", cache=True)
def A_x_F1_imag(x, data):
xi, xi2, h_nodes, z = numba.carray(data, 4, dtype=numba.float64)
return A_x_F1(x, xi, xi2, h_nodes, z).imag
@numba.njit(cache=True)
def A_x_F2(x, xi, xi2, h_nodes, z):
return F(xi, xi2, h_nodes, 1 + x ** 2) / sqrt(2 + x ** 2) * cos((1 + x ** 2) * z)
@numba.cfunc("f8(f8, voidptr)", cache=True)
def A_x_F2_real(x, data):
xi, xi2, h_nodes, z = numba.carray(data, 4, dtype=numba.float64)
return A_x_F2(x, xi, xi2, h_nodes, z).real
@numba.cfunc("f8(f8, voidptr)", cache=True)
def A_x_F2_imag(x, data):
xi, xi2, h_nodes, z = numba.carray(data, 4, dtype=numba.float64)
return A_x_F2(x, xi, xi2, h_nodes, z).imag
@numba.njit(cache=True)
def A_x_F(x, xi, xi2, h_nodes, z):
return (
-(((1 + 1j * x ** 2) ** 2 - 0.5) ** 2)
* P(xi2 * h_nodes * (1 + 1j * x ** 2))
/ sqrt(2 + 1j * x ** 2)
* exp(-1j * pi / 4)
* exp(1j * (z - 2 * xi2 * h_nodes))
+ (xi + 1j * x ** 2) ** 2
* P(xi2 * h_nodes * (xi + 1j * x ** 2))
* sqrt(2 * xi + 1j * x ** 2)
* x ** 2
* exp(1j * pi / 4)
* exp(1j * xi * (z - 2 * xi2 * h_nodes))
) * exp(-(z - 2 * xi2 * h_nodes) * x ** 2)
@numba.cfunc("f8(f8, voidptr)", cache=True)
def A_x_F_real(x, data):
xi, xi2, h_nodes, z = numba.carray(data, 4, dtype=numba.float64)
return A_x_F(x, xi, xi2, h_nodes, z).real
@numba.cfunc("f8(f8, voidptr)", cache=True)
def A_x_F_imag(x, data):
xi, xi2, h_nodes, z = numba.carray(data, 4, dtype=numba.float64)
return A_x_F(x, xi, xi2, h_nodes, z).imag
def A_x(xi, xi2, h_nodes, num_nodes):
# From fn_Qx_matrix
# Notes: the longest in this function is the numerical integration with scipy.integrate.quad.
# To speed it up, the integrand is compiled with numba. The quad function requires
# a function f8(f8, voidptr) so the arguments xi, xi2, h_nodes and z, needed for the
# calculation of the integrand, are packed.
# integral around branch point
z_1 = xi2 * h_nodes * np.arange(num_nodes)
# Pack arguments for LowLevelCallable.
# data is updated at every loop. The main loop is NOT thread-safe. If the main loop
# becomes parallel some day, make "data" local.
data = np.array([xi, xi2, h_nodes, 0.0])
data_ptr = ctypes.cast(data.ctypes, ctypes.c_void_p)
quad_args = dict(limit=200)
# For num_nodes = 4, I_12 looks like [a3, a2, a1, a0, a1, a2, a3] (size: 2*num_nodes-1)
# Build the second half first, then copy it to the first half
I_12 = np.zeros(2 * num_nodes - 1, np.complex)
for i, z in enumerate(z_1):
data[3] = z
if i < 2: # two first iterations, coefficients a0 and a1
int_F1_real = scipy.LowLevelCallable(A_x_F1_real.ctypes, data_ptr)
int_F1_imag = scipy.LowLevelCallable(A_x_F1_imag.ctypes, data_ptr)
int_F2_real = scipy.LowLevelCallable(A_x_F2_real.ctypes, data_ptr)
int_F2_imag = scipy.LowLevelCallable(A_x_F2_imag.ctypes, data_ptr)
I_12[i + num_nodes - 1] = 4j * (
si.quad(int_F1_real, 0, 1, **quad_args)[0]
+ 1j * si.quad(int_F1_imag, 0, 1, **quad_args)[0]
) + 4 * (
si.quad(int_F2_real, 0, 50, **quad_args)[0]
+ 1j * si.quad(int_F2_imag, 0, 50, **quad_args)[0]
)
else:
int_F_real = scipy.LowLevelCallable(A_x_F_real.ctypes, data_ptr)
int_F_imag = scipy.LowLevelCallable(A_x_F_imag.ctypes, data_ptr)
I_12[i + num_nodes - 1] = 4j * (
si.quad(int_F_real, 0, 70, **quad_args)[0]
+ 1j * si.quad(int_F_imag, 0, 70, **quad_args)[0]
)
I_12[: num_nodes - 1] = I_12[: num_nodes - 1 : -1]
v_ind = np.arange(num_nodes)
m_ind = (
np.full((num_nodes, num_nodes), num_nodes - 1) + v_ind[:, np.newaxis] - v_ind
)
return I_12[m_ind]
@numba.njit(cache=True)
def A_z_F1(x, xi, xi2, h_nodes, z):
return (
F(xi, xi2, h_nodes, xi - x ** 2)
/ sqrt(2 * xi - x ** 2)
* cos((xi - x ** 2) * z)
)
@numba.cfunc("f8(f8, voidptr)", cache=True)
def A_z_F1_real(x, data):
xi, xi2, h_nodes, z = numba.carray(data, 4, dtype=numba.float64)
return A_z_F1(x, xi, xi2, h_nodes, z).real
@numba.cfunc("f8(f8, voidptr)", cache=True)
def A_z_F1_imag(x, data):
xi, xi2, h_nodes, z = numba.carray(data, 4, dtype=numba.float64)
return A_z_F1(x, xi, xi2, h_nodes, z).imag
@numba.njit(cache=True)
def A_z_F2(x, xi, xi2, h_nodes, z):
return (
F(xi, xi2, h_nodes, xi + x ** 2)
/ sqrt(2 * xi + x ** 2)
* cos((xi + x ** 2) * z)
)
@numba.cfunc("f8(f8, voidptr)", cache=True)
def A_z_F2_real(x, data):
xi, xi2, h_nodes, z = numba.carray(data, 4, dtype=numba.float64)
return A_z_F2(x, xi, xi2, h_nodes, z).real
@numba.cfunc("f8(f8, voidptr)", cache=True)
def A_z_F2_imag(x, data):
xi, xi2, h_nodes, z = numba.carray(data, 4, dtype=numba.float64)
return A_z_F2(x, xi, xi2, h_nodes, z).imag
@numba.njit(cache=True)
def A_z_F(x, xi, xi2, h_nodes, z):
return (
-(((xi + 1j * x ** 2) ** 2 - 0.5) ** 2)
* P(xi2 * h_nodes * (xi + 1j * x ** 2))
/ sqrt(2 * xi + 1j * x ** 2)
* exp(-1j * pi / 4)
* exp(xi * 1j * (z - 2 * xi2 * h_nodes))
+ (1 + 1j * x ** 2) ** 2
* P(xi2 * h_nodes * (1 + 1j * x ** 2))
* sqrt(2 + 1j * x ** 2)
* x ** 2
* exp(1j * pi / 4)
* exp(1j * (z - 2 * xi2 * h_nodes))
) * exp(-(z - 2 * xi2 * h_nodes) * x ** 2)
@numba.cfunc("f8(f8, voidptr)", cache=True)
def A_z_F_real(x, data):
xi, xi2, h_nodes, z = numba.carray(data, 4, dtype=numba.float64)
return A_z_F(x, xi, xi2, h_nodes, z).real
@numba.cfunc("f8(f8, voidptr)", cache=True)
def A_z_F_imag(x, data):
xi, xi2, h_nodes, z = numba.carray(data, 4, dtype=numba.float64)
return A_z_F(x, xi, xi2, h_nodes, z).imag
def A_z(xi, xi2, h_nodes, num_nodes):
# from fn_Qz_matrix
# integral around branch point
z_1 = xi2 * h_nodes * np.arange(num_nodes)
# Pack arguments for LowLevelCallable.
# data is updated at every loop. The main loop is NOT thread-safe. If the main loop
# becomes parallel some day, make "data" local.
data = np.array([xi, xi2, h_nodes, 0.0])
data_ptr = ctypes.cast(data.ctypes, ctypes.c_void_p)
quad_args = dict(limit=200)
# For num_nodes = 4, I_12 looks like [a3, a2, a1, a0, a1, a2, a3] (size: 2*num_nodes-1)
# Build the second half first, then copy it to the first half
I_12 = np.zeros(2 * num_nodes - 1, np.complex)
for i, z in enumerate(z_1):
data[3] = z
if i < 2: # two first iterations, coefficients a0 and a1
int_F1_real = scipy.LowLevelCallable(A_z_F1_real.ctypes, data_ptr)
int_F1_imag = scipy.LowLevelCallable(A_z_F1_imag.ctypes, data_ptr)
int_F2_real = scipy.LowLevelCallable(A_z_F2_real.ctypes, data_ptr)
int_F2_imag = scipy.LowLevelCallable(A_z_F2_imag.ctypes, data_ptr)
I_12[i + num_nodes - 1] = 4j * (
si.quad(int_F1_real, 0, sqrt(xi), **quad_args)[0]
+ 1j * si.quad(int_F1_imag, 0, sqrt(xi), **quad_args)[0]
) + 4 * (
si.quad(int_F2_real, 0, 50, **quad_args)[0]
+ 1j * si.quad(int_F2_imag, 0, 50, **quad_args)[0]
)
else:
int_F_real = scipy.LowLevelCallable(A_z_F_real.ctypes, data_ptr)
int_F_imag = scipy.LowLevelCallable(A_z_F_imag.ctypes, data_ptr)
I_12[i + num_nodes - 1] = 4j * (
si.quad(int_F_real, 0, 70, **quad_args)[0]
+ 1j * si.quad(int_F_imag, 0, 70, **quad_args)[0]
)
I_12[: num_nodes - 1] = I_12[: num_nodes - 1 : -1]
v_ind = np.arange(num_nodes)
m_ind = (
np.full((num_nodes, num_nodes), num_nodes - 1) + v_ind[:, np.newaxis] - v_ind
)
return I_12[m_ind]
@numba.jit(nopython=True, nogil=True, cache=True)
def crack_2d_scat_kernel(
phi_in,
phi_out_array,
vel_L,
vel_T,
density,
frequency,
use_incident_L,
use_incident_T,
x_nodes,
h_nodes,
A_x,
A_z,
S_LL,
S_LT,
S_TL,
S_TT,
):
"""
work on one incident angle in order to cache the results of two to four
linear solve
"""
# Lamé coefficients, see http://subsurfwiki.org/wiki/Template:Elastic_modulus
lame_lambda = density * (vel_L ** 2 - 2 * vel_T ** 2)
lame_mu = density * vel_T ** 2
omega = 2 * pi * frequency
xi1 = 2 * pi * frequency / vel_L
xi2 = 2 * pi * frequency / vel_T
lambda_L = vel_L / frequency
lambda_T = vel_T / frequency
xi = vel_T / vel_L
k_L = xi1 # alias
k_T = xi2 # alias
a_L = -1j * k_L * pi / xi2 ** 2 # incident L wave
a_T = -1j * k_T * pi / xi2 ** 2 # incident S wave
# normal vector to the crack
nv = np.array([0.0, 1.0], np.complex128) # force to complex to please numba
sv = np.array(
[-sin(phi_in), -cos(phi_in)], np.complex128
) # force to complex to please numba
tv = np.array([sv[1], -sv[0]], np.complex128)
if use_incident_L:
b_L = exp(1j * k_L * x_nodes * sv[0]) * basis_function(-k_L * h_nodes * sv[0])
b_x = -2 * sv[0] * sv[1] * b_L
b_z = -(1 / xi ** 2 - 2 * sv[0] ** 2) * b_L
vxL = np.linalg.solve(A_x, b_x)
vzL = np.linalg.solve(A_z, b_z)
if use_incident_T:
b_T = exp(1j * k_T * x_nodes * sv[0]) * basis_function(-k_T * h_nodes * sv[0])
b_x = -(tv[0] * sv[1] + tv[1] * sv[0]) * b_T
b_z = -2 * tv[1] * sv[1] * b_T
vxT = np.linalg.solve(A_x, b_x)
vzT = np.linalg.solve(A_z, b_z)
for j, phi_out in enumerate(phi_out_array):
ev = np.array([sin(phi_out), cos(phi_out)], np.complex128)
tv = np.array([ev[1], -ev[0]], np.complex128)
c_L = basis_function(xi1 * h_nodes * ev[0]) * exp(-1j * xi1 * ev[0] * x_nodes)
c_T = basis_function(xi2 * h_nodes * ev[0]) * exp(-1j * xi2 * ev[0] * x_nodes)
if use_incident_L:
v_L = np.array([a_L * np.dot(vxL, c_L), a_L * np.dot(vzL, c_L)])
v_T = np.array([a_L * np.dot(vxL, c_T), a_L * np.dot(vzL, c_T)])
S_LL[j] = (
1
/ 4
* sqrt(2 / pi)
* exp(-1j * pi / 4)
* xi1 ** (5 / 2)
* (
lame_lambda / (density * omega ** 2) * (np.dot(v_L, nv))
+ 2
* lame_mu
/ (density * omega ** 2)
* np.dot(v_L, ev)
* np.dot(ev, nv)
)
/ sqrt(lambda_L)
)
S_LT[j] = (
1
/ 4
* sqrt(2 / pi)
* exp(-1j * pi / 4)
* xi2 ** (5 / 2)
* lame_mu
/ (density * omega ** 2)
* (np.dot(v_T, tv) * np.dot(ev, nv) + np.dot(v_T, ev) * np.dot(tv, nv))
/ sqrt(lambda_T)
)
if use_incident_T:
v_L = np.array([a_T * np.dot(vxT, c_L), a_T * np.dot(vzT, c_L)])
v_T = np.array([a_T * np.dot(vxT, c_T), a_T * np.dot(vzT, c_T)])
# This is the same expression as for LL and LT but v_L and v_T are
# different.
# Add a minus sign compared to the original code because change of
# polarisation.
S_TL[j] = -(
1
/ 4
* sqrt(2 / pi)
* exp(-1j * pi / 4)
* xi1 ** (5 / 2)
* (
lame_lambda / (density * omega ** 2) * (np.dot(v_L, nv))
+ 2
* lame_mu
/ (density * omega ** 2)
* np.dot(v_L, ev)
* np.dot(ev, nv)
)
/ sqrt(lambda_L)
)
S_TT[j] = -(
1
/ 4
* sqrt(2 / pi)
* exp(-1j * pi / 4)
* xi2 ** (5 / 2)
* lame_mu
/ (density * omega ** 2)
* (np.dot(v_T, tv) * np.dot(ev, nv) + np.dot(v_T, ev) * np.dot(tv, nv))
/ sqrt(lambda_T)
)
return S_LL, S_LT, S_TL, S_TT
@numba.jit(nopython=True, nogil=True, cache=True, parallel=False)
def crack_2d_scat_matrix(
phi_in_vect,
phi_out_array,
vel_L,
vel_T,
density,
frequency,
use_incident_L,
use_incident_T,
x_nodes,
h_nodes,
A_x,
A_z,
S_LL,
S_LT,
S_TL,
S_TT,
):
"""
call the kernel in the case where there is one phi_in for many phi_out
(use optimised kernel)
"""
# todo: set parallel=True if one day numba supports cache=True with this flag.
assert phi_in_vect.ndim == 1
assert phi_out_array.ndim == 2
for i in range(phi_in_vect.shape[0]):
crack_2d_scat_kernel(
phi_in_vect[i],
phi_out_array[:, i],
vel_L,
vel_T,
density,
frequency,
use_incident_L,
use_incident_T,
x_nodes,
h_nodes,
A_x,
A_z,
S_LL[:, i],
S_LT[:, i],
S_TL[:, i],
S_TT[:, i],
)
return S_LL, S_LT, S_TL, S_TT
@numba.jit(nopython=True, nogil=True, cache=True, parallel=False)
def crack_2d_scat_general(
phi_in_array,
phi_out_array,
vel_L,
vel_T,
density,
frequency,
use_incident_L,
use_incident_T,
x_nodes,
h_nodes,
A_x,
A_z,
S_LL,
S_LT,
S_TL,
S_TT,
):
"""
call the kernel in the case where there is one phi_in for one phi_out
(no optimisation available)
"""
# todo: set parallel=True if one day numba supports cache=True with this flag.
for i in range(phi_in_array.shape[0]):
for j in range(phi_out_array.shape[1]):
# pass a slice which is writeable
crack_2d_scat_kernel(
phi_in_array[i, j],
phi_out_array[i, j : j + 1],
vel_L,
vel_T,
density,
frequency,
use_incident_L,
use_incident_T,
x_nodes,
h_nodes,
A_x,
A_z,
S_LL[i, j : j + 1],
S_LT[i, j : j + 1],
S_TL[i, j : j + 1],
S_TT[i, j : j + 1],
)
return S_LL, S_LT, S_TL, S_TT
| 31.577821
| 97
| 0.52449
| 2,664
| 16,231
| 2.986862
| 0.100976
| 0.045243
| 0.058816
| 0.053915
| 0.770517
| 0.755435
| 0.723137
| 0.701646
| 0.668468
| 0.658414
| 0
| 0.053954
| 0.333128
| 16,231
| 513
| 98
| 31.639376
| 0.681171
| 0.125747
| 0
| 0.557252
| 0
| 0
| 0.012774
| 0
| 0
| 0
| 0
| 0.003899
| 0.005089
| 1
| 0.068702
| false
| 0
| 0.015267
| 0.017812
| 0.155216
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
003f11090fe092ef5872964cf2a10b23bcb90236
| 69
|
py
|
Python
|
starkit/fitkit/multinest/__init__.py
|
dchu808/starkit
|
1940683ef231cee54be2c703d4a7611a3991d8b7
|
[
"BSD-3-Clause"
] | 12
|
2018-05-15T14:59:27.000Z
|
2022-01-11T16:44:43.000Z
|
starkit/fitkit/multinest/__init__.py
|
dchu808/starkit
|
1940683ef231cee54be2c703d4a7611a3991d8b7
|
[
"BSD-3-Clause"
] | 27
|
2018-03-13T10:45:38.000Z
|
2020-08-03T20:47:31.000Z
|
starkit/fitkit/multinest/__init__.py
|
dchu808/starkit
|
1940683ef231cee54be2c703d4a7611a3991d8b7
|
[
"BSD-3-Clause"
] | 17
|
2018-03-13T10:06:53.000Z
|
2019-06-27T02:02:10.000Z
|
from starkit.fitkit.multinest.base import MultiNest, MultiNestResult
| 34.5
| 68
| 0.869565
| 8
| 69
| 7.5
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.072464
| 69
| 1
| 69
| 69
| 0.9375
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
0043eb9985f03073219a27c15bca60135356a60e
| 92
|
py
|
Python
|
tests/wordnet_test.py
|
yoyo-go/wn
|
2533a8df129e761b239193674cef0d96e0a1a7db
|
[
"MIT"
] | null | null | null |
tests/wordnet_test.py
|
yoyo-go/wn
|
2533a8df129e761b239193674cef0d96e0a1a7db
|
[
"MIT"
] | null | null | null |
tests/wordnet_test.py
|
yoyo-go/wn
|
2533a8df129e761b239193674cef0d96e0a1a7db
|
[
"MIT"
] | null | null | null |
from wn import WordNet
class TestWordNet:
def test_init(self):
w = WordNet()
| 11.5
| 24
| 0.641304
| 12
| 92
| 4.833333
| 0.916667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.282609
| 92
| 7
| 25
| 13.142857
| 0.878788
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
005386731454815dfca462b62e56c9cdaf48a1cd
| 189
|
py
|
Python
|
friends/serializers.py
|
inf3rnus/ReNa-Chat-Django-Backend
|
983f34e0f1e6db99cf6be3a4fbfcf64bf7eaf108
|
[
"bzip2-1.0.6"
] | 1
|
2020-09-09T23:07:49.000Z
|
2020-09-09T23:07:49.000Z
|
friends/serializers.py
|
inf3rnus/ReNa-Chat-Django-Backend
|
983f34e0f1e6db99cf6be3a4fbfcf64bf7eaf108
|
[
"bzip2-1.0.6"
] | 8
|
2021-04-08T21:58:27.000Z
|
2022-03-12T00:44:58.000Z
|
friends/serializers.py
|
inf3rnus/ReNa-Chat-Django-Backend
|
983f34e0f1e6db99cf6be3a4fbfcf64bf7eaf108
|
[
"bzip2-1.0.6"
] | 1
|
2020-12-14T07:10:57.000Z
|
2020-12-14T07:10:57.000Z
|
from rest_framework.serializers import ModelSerializer
from .models import Friend
class FriendSerializer(ModelSerializer):
class Meta:
model = Friend
fields = '__all__'
| 27
| 54
| 0.746032
| 19
| 189
| 7.157895
| 0.736842
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.201058
| 189
| 7
| 55
| 27
| 0.900662
| 0
| 0
| 0
| 0
| 0
| 0.036842
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
cc3748c324ba46bf17c44c0d743420de0e76c2cc
| 610
|
py
|
Python
|
unittest/scripts/auto/py_mixed_versions/validation/cluster_multiple_server_versions.py
|
mueller/mysql-shell
|
29bafc5692bd536a12c4e41c54cb587375fe52cf
|
[
"Apache-2.0"
] | 119
|
2016-04-14T14:16:22.000Z
|
2022-03-08T20:24:38.000Z
|
unittest/scripts/auto/py_mixed_versions/validation/cluster_multiple_server_versions.py
|
mueller/mysql-shell
|
29bafc5692bd536a12c4e41c54cb587375fe52cf
|
[
"Apache-2.0"
] | 9
|
2017-04-26T20:48:42.000Z
|
2021-09-07T01:52:44.000Z
|
unittest/scripts/auto/py_mixed_versions/validation/cluster_multiple_server_versions.py
|
mueller/mysql-shell
|
29bafc5692bd536a12c4e41c54cb587375fe52cf
|
[
"Apache-2.0"
] | 51
|
2016-07-20T05:06:48.000Z
|
2022-03-09T01:20:53.000Z
|
#@<OUT> get cluster status
{
"clusterName": "testCluster",
"defaultReplicaSet": {
"name": "default",
"topology": [
{
"address": "<<<hostname>>>:<<<__mysql_sandbox_port2>>>",
"label": "<<<hostname>>>:<<<__mysql_sandbox_port2>>>",
"role": "HA"
},
{
"address": "<<<hostname>>>:<<<__mysql_sandbox_port1>>>",
"label": "<<<hostname>>>:<<<__mysql_sandbox_port1>>>",
"role": "HA"
}
],
"topologyMode": "Single-Primary"
}
}
| 29.047619
| 73
| 0.416393
| 37
| 610
| 6.432432
| 0.594595
| 0.218487
| 0.336134
| 0.226891
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.010526
| 0.377049
| 610
| 20
| 74
| 30.5
| 0.615789
| 0.040984
| 0
| 0.105263
| 0
| 0
| 0.493151
| 0.287671
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
cc7f7fb1c1048472b8a30553c108efd9da9b020c
| 31
|
py
|
Python
|
relstorage/tests/__init__.py
|
FinnArild/relstorage
|
02699c2d68ace19d530e390abfced9255a3ebb23
|
[
"ZPL-2.1"
] | 1
|
2020-02-05T07:49:55.000Z
|
2020-02-05T07:49:55.000Z
|
relstorage/tests/__init__.py
|
dpedu/relstorage
|
0b6990402f3db3b8c7a33681cb940b9a308367b4
|
[
"ZPL-2.1"
] | null | null | null |
relstorage/tests/__init__.py
|
dpedu/relstorage
|
0b6990402f3db3b8c7a33681cb940b9a308367b4
|
[
"ZPL-2.1"
] | null | null | null |
"""relstorage.tests package"""
| 15.5
| 30
| 0.709677
| 3
| 31
| 7.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.064516
| 31
| 1
| 31
| 31
| 0.758621
| 0.774194
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
ccaa37392a5c6387cf176f6943ae6c00eebb50e4
| 231
|
py
|
Python
|
Task1F.py
|
WilliaaamWang/IA-Flood-Warning-System
|
43fff774207dd4ea0925864408f556aa216a81f9
|
[
"MIT"
] | null | null | null |
Task1F.py
|
WilliaaamWang/IA-Flood-Warning-System
|
43fff774207dd4ea0925864408f556aa216a81f9
|
[
"MIT"
] | null | null | null |
Task1F.py
|
WilliaaamWang/IA-Flood-Warning-System
|
43fff774207dd4ea0925864408f556aa216a81f9
|
[
"MIT"
] | 1
|
2022-02-06T20:54:51.000Z
|
2022-02-06T20:54:51.000Z
|
from floodsystem.stationdata import build_station_list
from floodsystem.station import inconsistent_typical_range_stations
stations = build_station_list()
output = inconsistent_typical_range_stations(stations)
print(sorted(output))
| 46.2
| 67
| 0.887446
| 28
| 231
| 6.964286
| 0.5
| 0.153846
| 0.164103
| 0.328205
| 0.410256
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.060606
| 231
| 5
| 68
| 46.2
| 0.898618
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.4
| 0
| 0.4
| 0.2
| 1
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
ccbe1ddea4bcadb230d54032ea4aed819d4605f2
| 651
|
py
|
Python
|
polyaxon/activitylogs/events/job.py
|
elyase/polyaxon
|
1c19f059a010a6889e2b7ea340715b2bcfa382a0
|
[
"MIT"
] | null | null | null |
polyaxon/activitylogs/events/job.py
|
elyase/polyaxon
|
1c19f059a010a6889e2b7ea340715b2bcfa382a0
|
[
"MIT"
] | null | null | null |
polyaxon/activitylogs/events/job.py
|
elyase/polyaxon
|
1c19f059a010a6889e2b7ea340715b2bcfa382a0
|
[
"MIT"
] | null | null | null |
import activitylogs
from event_manager.events import job
activitylogs.subscribe(job.JobStartedTriggeredEvent)
activitylogs.subscribe(job.JobSoppedTriggeredEvent)
activitylogs.subscribe(job.JobDeletedTriggeredEvent)
activitylogs.subscribe(job.JobCreatedEvent)
activitylogs.subscribe(job.JobUpdatedEvent)
activitylogs.subscribe(job.JobViewedEvent)
activitylogs.subscribe(job.JobBookmarkedEvent)
activitylogs.subscribe(job.JobUnBookmarkedEvent)
activitylogs.subscribe(job.JobLogsViewedEvent)
activitylogs.subscribe(job.JobRestartedTriggeredEvent)
activitylogs.subscribe(job.JobStatusesViewedEvent)
activitylogs.subscribe(job.JobOutputsDownloadedEvent)
| 38.294118
| 54
| 0.894009
| 56
| 651
| 10.375
| 0.357143
| 0.433735
| 0.495697
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.030722
| 651
| 16
| 55
| 40.6875
| 0.920761
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.142857
| 0
| 0.142857
| 0
| 0
| 0
| 1
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
4e16f7c12ee8c5535906b9007aae2b47e80c1127
| 113
|
py
|
Python
|
dashboard/models.py
|
permallotment/allotment3
|
0eb390086cc8f48ba6817541c6c70c06dfc83058
|
[
"CC0-1.0"
] | null | null | null |
dashboard/models.py
|
permallotment/allotment3
|
0eb390086cc8f48ba6817541c6c70c06dfc83058
|
[
"CC0-1.0"
] | null | null | null |
dashboard/models.py
|
permallotment/allotment3
|
0eb390086cc8f48ba6817541c6c70c06dfc83058
|
[
"CC0-1.0"
] | null | null | null |
from django.db import models
class PermaculturePrinciple(models.Model):
text = models.CharField(max_length=63)
| 22.6
| 42
| 0.814159
| 15
| 113
| 6.066667
| 0.866667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.019608
| 0.097345
| 113
| 4
| 43
| 28.25
| 0.872549
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
4e3f7c7a44a87d694e744a1b999e21743e5a1e2e
| 87
|
py
|
Python
|
src/wordlistools/plugins/__init__.py
|
Massiil/wordlistools
|
45edc94200130e87b444fd5c04e24e6093160f93
|
[
"MIT"
] | null | null | null |
src/wordlistools/plugins/__init__.py
|
Massiil/wordlistools
|
45edc94200130e87b444fd5c04e24e6093160f93
|
[
"MIT"
] | null | null | null |
src/wordlistools/plugins/__init__.py
|
Massiil/wordlistools
|
45edc94200130e87b444fd5c04e24e6093160f93
|
[
"MIT"
] | null | null | null |
# flake8: noqa
from . import filters_tools, modifiers_tools, plugins, statistics_tools
| 29
| 71
| 0.816092
| 11
| 87
| 6.181818
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.012987
| 0.114943
| 87
| 2
| 72
| 43.5
| 0.87013
| 0.137931
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
9d6d91a5c00a630295f81f17e6d7f363a9ad43c8
| 859
|
py
|
Python
|
import_etl/routers.py
|
wbar/poc-import-snow-flake
|
14bab92ea6b8a2ba0acfd6628758d21c904b5317
|
[
"MIT"
] | 1
|
2016-11-11T17:24:42.000Z
|
2016-11-11T17:24:42.000Z
|
import_etl/routers.py
|
wbar/poc-import-snow-flake
|
14bab92ea6b8a2ba0acfd6628758d21c904b5317
|
[
"MIT"
] | null | null | null |
import_etl/routers.py
|
wbar/poc-import-snow-flake
|
14bab92ea6b8a2ba0acfd6628758d21c904b5317
|
[
"MIT"
] | null | null | null |
from django.conf import settings
# noinspection PyMethodMayBeStatic,PyProtectedMember,PyUnusedLocal
class EtlRouter(object):
"""
A router to ETL process
"""
def db_for_read(self, model, **hints):
if model._meta.app_label == 'import_etl':
return settings.ETL_DATABASE_ID
return None
def db_for_write(self, model, **hints):
if model._meta.app_label == 'import_etl':
return settings.ETL_DATABASE_ID
return None
def allow_relation(self, obj1, obj2, **hints):
if obj1._meta.app_label == 'import_etl' and \
obj2._meta.app_label == 'import_etl':
return True
return None
def allow_migrate(self, db, app_label, model=None, **hints):
if app_label == 'import_etl':
return db == settings.ETL_DATABASE_ID
return None
| 29.62069
| 66
| 0.636787
| 107
| 859
| 4.859813
| 0.373832
| 0.092308
| 0.134615
| 0.163462
| 0.511538
| 0.426923
| 0.315385
| 0.315385
| 0.315385
| 0.315385
| 0
| 0.006349
| 0.266589
| 859
| 28
| 67
| 30.678571
| 0.819048
| 0.103609
| 0
| 0.421053
| 0
| 0
| 0.066313
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.210526
| false
| 0
| 0.315789
| 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
| 1
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
9d70100e02bb215b231b4efe2b6b322af83f4c5d
| 172
|
py
|
Python
|
scenario_player/utils/files/constants.py
|
hackaugusto/scenario-player
|
0701bb986f47e1ec4a4fb7a469157826da1993e2
|
[
"MIT"
] | null | null | null |
scenario_player/utils/files/constants.py
|
hackaugusto/scenario-player
|
0701bb986f47e1ec4a4fb7a469157826da1993e2
|
[
"MIT"
] | null | null | null |
scenario_player/utils/files/constants.py
|
hackaugusto/scenario-player
|
0701bb986f47e1ec4a4fb7a469157826da1993e2
|
[
"MIT"
] | null | null | null |
BINARY_FNAME_TEMPLATE = "{version}-{platform}-{architecture}"
ARCHIVE_FNAME_TEMPLATE = BINARY_FNAME_TEMPLATE + ".{ext}"
CLOUD_STORAGE_URL = "http://cloud.raiden.network/"
| 34.4
| 61
| 0.773256
| 20
| 172
| 6.25
| 0.7
| 0.312
| 0.304
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.069767
| 172
| 4
| 62
| 43
| 0.78125
| 0
| 0
| 0
| 0
| 0
| 0.401163
| 0.203488
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
9d7beffe6aa3005e7af6935da1156ed8a4e8688b
| 148
|
py
|
Python
|
aff3ct-client/aff3ct/proto/ResultType.py
|
simonrus/aff3ct-bfe
|
c84ddc11ec75140632471e13f3f55dae3ce7950e
|
[
"MIT"
] | null | null | null |
aff3ct-client/aff3ct/proto/ResultType.py
|
simonrus/aff3ct-bfe
|
c84ddc11ec75140632471e13f3f55dae3ce7950e
|
[
"MIT"
] | null | null | null |
aff3ct-client/aff3ct/proto/ResultType.py
|
simonrus/aff3ct-bfe
|
c84ddc11ec75140632471e13f3f55dae3ce7950e
|
[
"MIT"
] | null | null | null |
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: proto
class ResultType(object):
Success = 0
Failed = 1
| 16.444444
| 68
| 0.722973
| 18
| 148
| 5.944444
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.017241
| 0.216216
| 148
| 8
| 69
| 18.5
| 0.905172
| 0.560811
| 0
| 0
| 1
| 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
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
9d7cecec0c2684aa30861338779cf36aaafa378e
| 187
|
py
|
Python
|
tests/views.py
|
nicknelson/django-cache-tags
|
2bb381b45e454d2848e66e58232c0311a217fa18
|
[
"BSD-3-Clause"
] | null | null | null |
tests/views.py
|
nicknelson/django-cache-tags
|
2bb381b45e454d2848e66e58232c0311a217fa18
|
[
"BSD-3-Clause"
] | null | null | null |
tests/views.py
|
nicknelson/django-cache-tags
|
2bb381b45e454d2848e66e58232c0311a217fa18
|
[
"BSD-3-Clause"
] | null | null | null |
from django_cache_tags.utils.cache import cache_view
from django.views.generic.base import TemplateView
@cache_view
class TestView(TemplateView):
cache_tags = ['test_tag']
pass
| 20.777778
| 52
| 0.791444
| 26
| 187
| 5.461538
| 0.615385
| 0.140845
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.13369
| 187
| 8
| 53
| 23.375
| 0.876543
| 0
| 0
| 0
| 0
| 0
| 0.042781
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.166667
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
|
0
| 4
|
9d86431ab563cff83673d49c61b10f18b9125389
| 250
|
py
|
Python
|
clients/keto/python/ory_keto_client/api/__init__.py
|
mojotalantikite/sdk
|
00fc86e98570e88911cfc66ce76637f8f1ac9dbe
|
[
"Apache-2.0"
] | null | null | null |
clients/keto/python/ory_keto_client/api/__init__.py
|
mojotalantikite/sdk
|
00fc86e98570e88911cfc66ce76637f8f1ac9dbe
|
[
"Apache-2.0"
] | null | null | null |
clients/keto/python/ory_keto_client/api/__init__.py
|
mojotalantikite/sdk
|
00fc86e98570e88911cfc66ce76637f8f1ac9dbe
|
[
"Apache-2.0"
] | null | null | null |
from __future__ import absolute_import
# flake8: noqa
# import apis into api package
from ory_keto_client.api.engines_api import EnginesApi
from ory_keto_client.api.health_api import HealthApi
from ory_keto_client.api.version_api import VersionApi
| 27.777778
| 54
| 0.856
| 39
| 250
| 5.128205
| 0.487179
| 0.105
| 0.165
| 0.255
| 0.3
| 0
| 0
| 0
| 0
| 0
| 0
| 0.004484
| 0.108
| 250
| 8
| 55
| 31.25
| 0.892377
| 0.164
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
9d8b717c5a6853497a84b395d30f6fffc9f51d29
| 150
|
py
|
Python
|
plasmapy/diagnostics/__init__.py
|
KhalilBryant/PlasmaPy
|
05f7cb60348c7048fb3b8fbaf25985f2fba47fb7
|
[
"MIT",
"BSD-2-Clause-Patent",
"BSD-2-Clause",
"BSD-3-Clause"
] | 1
|
2020-02-14T16:35:02.000Z
|
2020-02-14T16:35:02.000Z
|
plasmapy/diagnostics/__init__.py
|
KhalilBryant/PlasmaPy
|
05f7cb60348c7048fb3b8fbaf25985f2fba47fb7
|
[
"MIT",
"BSD-2-Clause-Patent",
"BSD-2-Clause",
"BSD-3-Clause"
] | 1
|
2018-06-18T16:00:57.000Z
|
2018-06-18T17:07:00.000Z
|
plasmapy/diagnostics/__init__.py
|
KhalilBryant/PlasmaPy
|
05f7cb60348c7048fb3b8fbaf25985f2fba47fb7
|
[
"MIT",
"BSD-2-Clause-Patent",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null |
"""The diagnostics subpackage contains tools for experimental research.
Currently, we have functionality for analyzing data from Langmuir probes.
"""
| 37.5
| 73
| 0.813333
| 18
| 150
| 6.777778
| 0.944444
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.126667
| 150
| 3
| 74
| 50
| 0.931298
| 0.946667
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
9dad13d096deb2e43e930d8446110728999496ac
| 3,189
|
py
|
Python
|
tests/regressiontests/forms/localflavortests.py
|
kvbik/django
|
a507e552af4e7ac3080282e690e2e33c6d34570d
|
[
"BSD-3-Clause"
] | 1
|
2016-05-09T15:16:24.000Z
|
2016-05-09T15:16:24.000Z
|
tests/regressiontests/forms/localflavortests.py
|
kvbik/django
|
a507e552af4e7ac3080282e690e2e33c6d34570d
|
[
"BSD-3-Clause"
] | null | null | null |
tests/regressiontests/forms/localflavortests.py
|
kvbik/django
|
a507e552af4e7ac3080282e690e2e33c6d34570d
|
[
"BSD-3-Clause"
] | null | null | null |
# -*- coding: utf-8 -*-
from localflavor.ar import tests as localflavor_ar_tests
from localflavor.at import tests as localflavor_at_tests
from localflavor.au import tests as localflavor_au_tests
from localflavor.br import tests as localflavor_br_tests
from localflavor.ca import tests as localflavor_ca_tests
from localflavor.ch import tests as localflavor_ch_tests
from localflavor.cl import tests as localflavor_cl_tests
from localflavor.cz import tests as localflavor_cz_tests
from localflavor.de import DELocalFlavorTests
from localflavor.es import tests as localflavor_es_tests
from localflavor.fi import tests as localflavor_fi_tests
from localflavor.fr import tests as localflavor_fr_tests
from localflavor.generic import tests as localflavor_generic_tests
from localflavor.id import tests as localflavor_id_tests
from localflavor.ie import tests as localflavor_ie_tests
from localflavor.il import IsraelLocalFlavorTests
from localflavor.is_ import tests as localflavor_is_tests
from localflavor.it import tests as localflavor_it_tests
from localflavor.jp import tests as localflavor_jp_tests
from localflavor.kw import tests as localflavor_kw_tests
from localflavor.nl import tests as localflavor_nl_tests
from localflavor.pl import tests as localflavor_pl_tests
from localflavor.pt import tests as localflavor_pt_tests
from localflavor.ro import tests as localflavor_ro_tests
from localflavor.se import tests as localflavor_se_tests
from localflavor.sk import tests as localflavor_sk_tests
from localflavor.uk import tests as localflavor_uk_tests
from localflavor.us import tests as localflavor_us_tests
from localflavor.uy import tests as localflavor_uy_tests
from localflavor.za import tests as localflavor_za_tests
from localflavor.be import BETests
__test__ = {
'localflavor_ar_tests': localflavor_ar_tests,
'localflavor_at_tests': localflavor_at_tests,
'localflavor_au_tests': localflavor_au_tests,
'localflavor_br_tests': localflavor_br_tests,
'localflavor_ca_tests': localflavor_ca_tests,
'localflavor_ch_tests': localflavor_ch_tests,
'localflavor_cl_tests': localflavor_cl_tests,
'localflavor_cz_tests': localflavor_cz_tests,
'localflavor_es_tests': localflavor_es_tests,
'localflavor_fi_tests': localflavor_fi_tests,
'localflavor_fr_tests': localflavor_fr_tests,
'localflavor_generic_tests': localflavor_generic_tests,
'localflavor_id_tests': localflavor_id_tests,
'localflavor_ie_tests': localflavor_ie_tests,
'localflavor_is_tests': localflavor_is_tests,
'localflavor_it_tests': localflavor_it_tests,
'localflavor_jp_tests': localflavor_jp_tests,
'localflavor_kw_tests': localflavor_kw_tests,
'localflavor_nl_tests': localflavor_nl_tests,
'localflavor_pl_tests': localflavor_pl_tests,
'localflavor_pt_tests': localflavor_pt_tests,
'localflavor_ro_tests': localflavor_ro_tests,
'localflavor_se_tests': localflavor_se_tests,
'localflavor_sk_tests': localflavor_sk_tests,
'localflavor_uk_tests': localflavor_uk_tests,
'localflavor_us_tests': localflavor_us_tests,
'localflavor_uy_tests': localflavor_uy_tests,
'localflavor_za_tests': localflavor_za_tests,
}
| 49.061538
| 66
| 0.838821
| 439
| 3,189
| 5.699317
| 0.09795
| 0.351719
| 0.145484
| 0.268585
| 0.384492
| 0
| 0
| 0
| 0
| 0
| 0
| 0.000353
| 0.112574
| 3,189
| 64
| 67
| 49.828125
| 0.883746
| 0.006585
| 0
| 0
| 0
| 0
| 0.178459
| 0.007896
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.508197
| 0
| 0.508197
| 0
| 0
| 0
| 0
| null | 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
9de8548126c0bb0004bd92da17ad48b3fbc94ad4
| 74
|
py
|
Python
|
pythonProj/FZPython/pyquant/libs/__init__.py
|
iHamburg/FZQuant
|
86b750ec33d01badfd3f324d6f1599118b9bf8ff
|
[
"MIT"
] | null | null | null |
pythonProj/FZPython/pyquant/libs/__init__.py
|
iHamburg/FZQuant
|
86b750ec33d01badfd3f324d6f1599118b9bf8ff
|
[
"MIT"
] | null | null | null |
pythonProj/FZPython/pyquant/libs/__init__.py
|
iHamburg/FZQuant
|
86b750ec33d01badfd3f324d6f1599118b9bf8ff
|
[
"MIT"
] | 2
|
2019-04-10T10:05:00.000Z
|
2021-11-24T17:17:23.000Z
|
# coding: utf8
# from .loglib import logger
# from .socketioclient import
| 18.5
| 29
| 0.756757
| 9
| 74
| 6.222222
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.016129
| 0.162162
| 74
| 4
| 29
| 18.5
| 0.887097
| 0.905405
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
9debededccf60db1891feb68006625a66e21dbeb
| 75
|
py
|
Python
|
contests_atcoder/abc194/abc194_c_after.py
|
takelifetime/competitive-programming
|
e7cf8ef923ccefad39a1727ca94c610d650fcb76
|
[
"BSD-2-Clause"
] | null | null | null |
contests_atcoder/abc194/abc194_c_after.py
|
takelifetime/competitive-programming
|
e7cf8ef923ccefad39a1727ca94c610d650fcb76
|
[
"BSD-2-Clause"
] | 1
|
2021-01-02T06:36:51.000Z
|
2021-01-02T06:36:51.000Z
|
contests_atcoder/abc194/abc194_c_after.py
|
takelifetime/competitive-programming
|
e7cf8ef923ccefad39a1727ca94c610d650fcb76
|
[
"BSD-2-Clause"
] | null | null | null |
n,*a=map(int,open(0).read().split())
print(sum(n*x**2for x in a)-sum(a)**2)
| 37.5
| 38
| 0.6
| 19
| 75
| 2.368421
| 0.736842
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.042254
| 0.053333
| 75
| 2
| 38
| 37.5
| 0.591549
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
9df01c65fd0965ac6d4c3073e5337e68b990116f
| 193
|
py
|
Python
|
Hackerrank/Higher order functions and closures - 2.py
|
amarlearning/CodeForces
|
6625d3be21cb6a78b88c7521860d1da263e77121
|
[
"Unlicense"
] | 3
|
2016-02-20T12:14:51.000Z
|
2016-03-18T20:09:36.000Z
|
Hackerrank/Higher order functions and closures - 2.py
|
amarlearning/Codeforces
|
6625d3be21cb6a78b88c7521860d1da263e77121
|
[
"Unlicense"
] | null | null | null |
Hackerrank/Higher order functions and closures - 2.py
|
amarlearning/Codeforces
|
6625d3be21cb6a78b88c7521860d1da263e77121
|
[
"Unlicense"
] | 2
|
2018-07-26T21:00:42.000Z
|
2019-11-30T19:33:57.000Z
|
def factory(n):
def current():
return n
def counter():
return n + 1
return current, counter
f_current, f_counter = factory(int(input()))
| 16.083333
| 44
| 0.512953
| 22
| 193
| 4.409091
| 0.454545
| 0.082474
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.008475
| 0.388601
| 193
| 11
| 45
| 17.545455
| 0.813559
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.428571
| false
| 0
| 0
| 0.285714
| 0.857143
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
9df0a1ffd7f34816b925099520634ebf75990078
| 5,733
|
py
|
Python
|
advent day 1.py
|
brli6383/AoC
|
5b08be1e1e5742b6fe2510c4ac156b0c47b1d8e4
|
[
"MIT"
] | null | null | null |
advent day 1.py
|
brli6383/AoC
|
5b08be1e1e5742b6fe2510c4ac156b0c47b1d8e4
|
[
"MIT"
] | null | null | null |
advent day 1.py
|
brli6383/AoC
|
5b08be1e1e5742b6fe2510c4ac156b0c47b1d8e4
|
[
"MIT"
] | null | null | null |
numbers = [
-9,
+7,
+5,
-13,
+6,
+14,
-5,
-10,
-10,
-12,
+2,
+5,
+2,
-6,
-12,
+1,
+13,
+5,
+3,
-15,
-12,
+4,
-11,
+10,
-5,
-14,
-6,
+2,
-9,
-18,
+8,
-1,
+12,
+9,
+5,
-9,
+14,
+3,
-4,
-16,
+14,
+14,
+13,
-7,
-19,
+12,
-9,
+5,
+21,
-7,
+19,
-2,
+14,
+18,
+17,
+4,
+11,
-16,
-5,
-6,
-7,
-2,
-1,
-2,
-1,
+14,
-17,
+5,
+13,
+8,
-6,
+15,
+2,
+16,
-7,
-6,
+11,
+10,
+17,
+13,
-7,
+17,
-18,
+2,
+8,
-17,
+16,
+4,
+7,
+4,
-10,
-10,
+8,
+16,
-13,
-19,
-12,
-12,
+10,
-5,
+21,
-12,
-17,
+6,
-19,
+18,
-10,
+3,
-19,
+7,
+16,
-12,
+6,
+15,
-4,
+9,
+5,
+17,
-16,
-4,
-8,
+2,
+8,
+5,
-6,
+9,
+2,
+17,
+15,
-6,
+9,
+18,
+6,
+18,
-5,
-3,
+17,
+7,
-10,
-5,
+4,
-6,
+3,
-12,
-15,
-16,
-16,
+18,
+16,
-14,
-9,
+12,
-13,
-2,
+5,
+16,
-15,
+7,
+9,
+8,
-11,
-8,
-15
+13,
+11,
+18,
-15,
-5,
+10,
+14,
-13,
+16,
+2,
+19,
+17,
+17,
-12,
+17,
+8,
-4,
-12,
-11,
-12,
-4,
+15,
+5,
+9,
-18,
-14,
-8,
+13,
+19,
+2,
-11,
+5,
+5,
-3,
+6,
+9,
+12,
+19,
-15,
-12,
-6,
+22,
+2,
-4,
+16,
-11,
+18,
+6,
+14,
+1,
-3,
-10,
+6,
-10,
+12,
+7,
+1,
-11,
+13,
-17,
+19,
+16,
+1,
-12,
-14,
+8,
+16,
-11,
+10,
+7,
+5,
-6,
+5,
+8,
+2,
-4,
+8,
+5,
-10,
+7,
+5,
+4,
+13,
+15,
+12,
+12,
-14,
+6,
-12,
+2,
-8,
+16,
+5,
+10,
+18,
-2,
+16,
+2,
-11,
-13,
+19,
+9,
+12,
+18,
+14,
+17,
+9,
-13,
+25,
-27,
+18,
+4,
+16,
+5,
-15,
+13,
+15,
-16,
+12,
+23,
-12,
-8,
-19,
-10,
+24,
+16,
+6,
-15,
+26,
-16,
-13,
+7,
+25,
+12,
+19,
+14,
+16,
-5,
-12,
-22,
-17,
-20,
-6,
-32,
-2,
-18,
-10,
-11,
-26,
+10,
-17,
-8,
-17,
-8,
+9,
-16,
-14,
-19,
+17,
+19,
+2,
+20,
+19,
-13,
-7,
+19,
-14,
-15,
-5,
+3,
-19,
-6,
-11,
-2,
+15,
+13,
-8,
-12,
-22,
-9,
-14,
+15,
-17,
-1,
-13,
+9,
+17,
+15,
-7,
+13,
+2,
+15,
-6,
+17,
+14,
+8,
+24,
-19,
-10,
+26,
-31,
-18,
-9,
+11,
-15,
+20,
+22,
+2,
+20,
+18,
+10,
-16,
-20,
-32,
+27,
+33,
-12,
-13,
+14,
-20,
-80,
-11,
+6,
-19,
-13,
-5,
-9,
+5,
+13,
-8,
-17,
-14,
-10,
-16,
-5,
-11,
+6,
+6,
-9,
-13,
-4,
-20,
+13,
+3,
+15,
+4,
+18,
+3,
-13,
-7,
+11,
-20,
-6,
+18,
+13,
-23,
+13,
-17,
-18,
-5,
+7,
+8,
-13,
-23,
-18,
+14,
+2,
+7,
-1,
+5,
-16,
-15,
+7,
-8,
+10,
-16,
-10,
-22,
+3,
+18,
+8,
-6,
-4,
+7,
+24,
-8,
-22,
+27,
+15,
+1,
-14,
-47,
-22,
-10,
+48,
-56,
-41,
-9,
+73,
+79,
-9,
+48,
-11,
+36,
+6,
-16,
+20,
+10,
+13,
-20,
+12,
+9,
+3,
+4,
+9,
-12,
+15,
+2,
+19,
+8,
+16,
+13,
-19,
-23,
+10,
-18,
+12,
+20,
+3,
+12,
-17,
-8,
+20,
+3,
+8,
+2,
-17,
-13,
-18,
-8,
-28,
+7,
+1,
+4,
-1,
-29,
+131,
-4,
+8,
-27,
-32,
+14,
-16,
-10,
-77,
-31,
+160,
-115,
-130,
-103,
+930,
+75389,
-16,
-5,
+4,
+8,
+2,
-7,
+6,
+7,
+11,
-8,
+4,
-3,
-5,
+13,
+7,
-5,
+7,
-5,
-1,
+11,
+18,
+19,
-18,
+7,
-14,
+2,
-5,
+12,
+11,
+15,
-17,
-6,
+17,
+3,
-4,
+9,
+16,
-13,
+2,
+19,
-7,
-3,
+18,
+20,
-11,
+13,
+3,
+4,
-2,
+14,
+9,
-17,
+2,
+8,
-5,
-8,
+2,
+10,
+17,
+2,
+15,
-1,
-11,
+13,
-9,
-5,
-19,
-18,
-16,
-14,
-7,
-13,
-11,
-10,
+15,
+7,
+18,
-12,
-9,
-16,
+3,
-14,
-1,
+16,
-9,
-12,
-19,
+1,
-5,
-15,
-14,
-7,
+17,
-1,
-19,
-9,
+6,
+12,
-21,
-20,
-11,
-6,
+8,
+5,
+10,
-2,
+12,
-13,
+6,
+12,
-10,
+13,
-6,
+19,
-3,
-22,
-18,
-4,
-3,
+20,
+10,
-3,
-19,
-9,
+6,
-7,
-13,
-18,
-18,
-3,
+10,
-13,
-14,
-6,
+9,
+20,
+5,
+5,
+16,
+14,
+14,
-19,
-19,
+11,
+10,
-14,
-17,
-19,
-6,
-11,
-13,
-1,
-18,
-14,
+10,
-8,
+1,
+1,
+15,
+8,
-15,
+6,
-9,
+2,
+12,
+13,
-7,
-5,
-19,
-6,
-1,
-19,
-12,
-1,
-4,
-6,
-16,
+2,
-20,
-15,
+5,
+9,
-19,
+12,
+9,
-15,
-5,
-12,
-6,
-12,
-11,
+13,
-11,
-9,
-2,
-16,
-17,
-9,
+16,
+20,
+5,
+20,
-7,
-6,
+4,
-12,
-1,
-5,
-22,
-19,
+10,
-9,
-4,
-5,
-8,
-11,
-18,
-13,
+20,
+1,
-12,
+7,
-19,
+10,
-8,
+13,
-7,
-19,
-15,
-2,
+7,
-18,
-14,
+2,
+15,
-6,
-20,
-10,
+20,
+3,
-19,
-19,
-22,
-14,
+7,
+10,
-15,
-12,
-18,
-7,
-20,
-12,
+1,
+14,
+13,
-8,
-1,
-10,
-13,
+9,
+11,
+7,
+18,
-4,
+6,
-3,
+20,
+18,
-14,
-3,
+11,
+15,
+8,
-9,
+28,
+15,
+13,
+14,
+4,
-13,
-1,
-14,
-5,
-20,
+16,
+10,
+11,
+32,
+23,
+18,
+3,
+3,
-12,
+4,
+11,
+14,
+17,
+2,
+6,
-5,
+19,
+12,
+17,
-15,
-10,
-15,
-5,
-17,
+20,
+20,
-14,
+23,
-14,
+26,
-11,
+9,
+21,
+4,
+16,
-4,
+5,
-11,
-8,
-10,
-5,
+14,
-2,
-4,
+12,
-10,
+16,
+1,
+12,
+1,
-2,
-17,
+10,
+21,
-9,
+15,
-9,
+14,
+3,
-1,
+5,
+19,
+10,
-7,
-10,
-13,
+14,
-2,
+16,
+10,
-1,
-20,
+9,
-8,
-9,
-19,
+18,
+3,
-18,
+11,
-1,
-5,
+21,
+22,
+4,
-11,
+6,
+18,
-8,
+10,
+12,
-19,
-5,
+25,
+5,
-12,
-12,
+3,
+14,
+15,
+4,
+6,
+19,
+18,
+7,
-16,
-1,
-13,
-6,
-1,
+11,
-7,
+13,
-15,
-5,
+13,
+21,
-3,
-14,
-8,
-16,
+13,
+2,
-9,
-18,
+21,
-20,
-20,
+18,
-19,
-22,
+20,
-3,
-4,
-9,
-8,
-20,
+1,
-21,
-4,
-9,
-1,
+18,
-7,
+10,
+20,
-16,
+23,
+17,
+9,
-19,
-3,
+9,
+5,
+2,
-25,
+1,
-15,
-55,
-13,
-10,
-11,
+1,
-14,
-12,
+23,
+15,
+15,
-2,
+19,
-7,
-6,
+10,
+12,
+1,
+8,
-51,
+28,
+24,
-98,
+16,
-3,
-5,
-13,
-37,
+6,
-14,
+9,
-12,
-6,
-23,
+16,
-12,
-10,
+3,
+41,
+4,
+20,
-13,
-5,
-1,
-64,
-30,
-11,
-23,
-46,
-27,
-11,
-75223
]
Sum = sum(numbers)
print(Sum)
print(numbers)
frequencies = set()
found = False
currentfrequency = 0
while not found:
for num in numbers: #for each individual number in the array above
currentfrequency += num #each recurrence adds the integer
currentSet = set({currentfrequency}) #assigns variable curset to a set of length one to utilize the set operations on the intersection
if len(currentSet.intersection(frequencies)) > 0: #compares sets to return a new set of the intersection (intersection = anything contained in both sets)
found = True #if the intersection is > 1 then you have your first repeat
break #kills the for loop - back up to while not found
frequencies.add(currentfrequency) #If you dont break the loop, then you add curfreq again until the loop is broken
print(currentfrequency)
| 5.517806
| 166
| 0.39543
| 1,141
| 5,733
| 1.986854
| 0.105171
| 0.010587
| 0.006617
| 0.006176
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.375776
| 0.241061
| 5,733
| 1,038
| 167
| 5.523121
| 0.145254
| 0.080063
| 0
| 0.953623
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.002899
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
d17ecf3f1b7b4d61b755c0867ab2e4e9ea87ca7c
| 759
|
py
|
Python
|
mw/colorize.py
|
devrandom/pymultiwallet
|
baf7bfb1b70d6ec1e02ce3a7f1c49567ab62a176
|
[
"MIT"
] | 3
|
2018-06-21T00:36:53.000Z
|
2021-03-19T14:51:33.000Z
|
mw/colorize.py
|
devrandom/pymultiwallet
|
baf7bfb1b70d6ec1e02ce3a7f1c49567ab62a176
|
[
"MIT"
] | 10
|
2017-12-22T19:55:32.000Z
|
2021-03-25T19:05:45.000Z
|
mw/colorize.py
|
devrandom/pymultiwallet
|
baf7bfb1b70d6ec1e02ce3a7f1c49567ab62a176
|
[
"MIT"
] | 2
|
2017-12-22T00:22:06.000Z
|
2020-05-18T07:23:13.000Z
|
colors = [
'\033[38;5;21m', # blue (cold)
'\033[38;5;39m',
'\033[38;5;50m',
'\033[38;5;48m',
'\033[38;5;46m', # green
'\033[38;5;118m',
'\033[38;5;190m',
'\033[38;5;226m', # yellow
'\033[38;5;220m',
'\033[38;5;214m', # orange
'\033[38;5;208m',
'\033[38;5;202m',
'\033[38;5;196m', # red
'\033[38;5;203m',
'\033[38;5;210m',
'\033[38;5;217m', # pink
'\033[38;5;224m',
'\033[38;5;231m' # white (hot)
]
reset = '\033[0m'
mapping = 'SE .o+=*BOX@%&#/^'
def colorize_char(c):
ind = mapping.find(c)
if (ind < 0 or ind >= len(colors)):
return c
return "%s%s%s"%(colors[ind], c, reset)
def colorize(visualization):
return ''.join(colorize_char(c) for c in visualization)
| 23.71875
| 59
| 0.519104
| 126
| 759
| 3.111111
| 0.420635
| 0.229592
| 0.27551
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.27551
| 0.225296
| 759
| 31
| 60
| 24.483871
| 0.391156
| 0.068511
| 0
| 0
| 0
| 0
| 0.39628
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.068966
| false
| 0
| 0
| 0.034483
| 0.172414
| 0
| 0
| 0
| 0
| null | 1
| 1
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
d18e9a245e6a4658534fc7ef131fdf0f1101d3ea
| 1,040
|
py
|
Python
|
solutions/python/2018/groupDating.py
|
lucifer1198/Codesignal
|
07d6d6457b8b3a9f1c51118b0e8e44cce66ee039
|
[
"MIT"
] | 2
|
2020-12-21T22:09:26.000Z
|
2021-01-01T15:40:01.000Z
|
solutions/python/2018/groupDating.py
|
nsu1210/Codesignal
|
07d6d6457b8b3a9f1c51118b0e8e44cce66ee039
|
[
"MIT"
] | null | null | null |
solutions/python/2018/groupDating.py
|
nsu1210/Codesignal
|
07d6d6457b8b3a9f1c51118b0e8e44cce66ee039
|
[
"MIT"
] | 1
|
2021-01-28T18:15:02.000Z
|
2021-01-28T18:15:02.000Z
|
"""
You're organizing a group dating activity for cats, i.e. a meeting where an equal number of male and female cats get together. For each cat you calculate their nature value, an integer that describes the cat's spirit. When a male and a female cat with the same nature value see each other, they become connected and happily walk out together.
You've just started another group dating, and placed the cats in front of one another so that the ith male is sitting across the ith female. What cats will remain at their places, assuming that the pairs of cats sitting in front of each other and having the same nature values will walk out?
Example
For male = [5, 28, 14, 99, 17] and
female = [5, 14, 28, 99, 16],
the output should be
groupDating(male, female) = [[28, 14, 17], [14, 28, 16]].
Pairs of cats at positions 0 and 3 (0-based) have the same nature values, so they will leave the meeting.
"""
def groupDating(male, female):
return [[m for m, f in zip(male, female) if m != f], [f for m, f in zip(male, female) if m != f]]
| 54.736842
| 342
| 0.728846
| 194
| 1,040
| 3.907216
| 0.463918
| 0.05277
| 0.051451
| 0.050132
| 0.063325
| 0.063325
| 0.063325
| 0.063325
| 0.063325
| 0.063325
| 0
| 0.039379
| 0.194231
| 1,040
| 18
| 343
| 57.777778
| 0.865155
| 0.861538
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0.5
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
d19f1f966a9a89b22ad82f3d2e31981b365e768a
| 2,669
|
py
|
Python
|
platform/core/polyaxon/schemas/__init__.py
|
hackerwins/polyaxon
|
ff56a098283ca872abfbaae6ba8abba479ffa394
|
[
"Apache-2.0"
] | null | null | null |
platform/core/polyaxon/schemas/__init__.py
|
hackerwins/polyaxon
|
ff56a098283ca872abfbaae6ba8abba479ffa394
|
[
"Apache-2.0"
] | null | null | null |
platform/core/polyaxon/schemas/__init__.py
|
hackerwins/polyaxon
|
ff56a098283ca872abfbaae6ba8abba479ffa394
|
[
"Apache-2.0"
] | null | null | null |
from polyaxon_schemas.api.experiment import ContainerResourcesConfig # noqa
from polyaxon_schemas.api.job import JobLabelConfig, JobLabelSchema # noqa
from polyaxon_schemas.api.log_handler import LogHandlerConfig # noqa
from polyaxon_schemas.api.user import UserConfig # noqa
from polyaxon_schemas.api.version import ( # noqa
ChartVersionConfig,
CliVersionConfig,
LibVersionConfig,
PlatformVersionConfig
)
from polyaxon_schemas.base import BaseConfig, BaseSchema # noqa
from polyaxon_schemas.exceptions import ( # noqa
PolyaxonConfigurationError,
PolyaxonfileError,
PolyaxonSchemaError
)
from polyaxon_schemas.fields import UUID # noqa
from polyaxon_schemas.ops import params as ops_params # noqa
from polyaxon_schemas.ops.build_job.backends import BuildBackend # noqa
from polyaxon_schemas.ops.environments.outputs import OutputsConfig # noqa
from polyaxon_schemas.ops.environments.persistence import PersistenceConfig # noqa
from polyaxon_schemas.ops.environments.resources import PodResourcesConfig # noqa
from polyaxon_schemas.ops.experiment.backends import ExperimentBackend # noqa
from polyaxon_schemas.ops.experiment.environment import ( # noqa
HorovodClusterConfig,
MPIClusterConfig,
MXNetClusterConfig,
PytorchClusterConfig,
TensorflowClusterConfig
)
from polyaxon_schemas.ops.experiment.frameworks import ExperimentFramework # noqa
from polyaxon_schemas.ops.group.early_stopping_policies import EarlyStoppingConfig # noqa
from polyaxon_schemas.ops.group.matrix import MatrixConfig # noqa
from polyaxon_schemas.ops.group.metrics import Optimization, SearchMetricConfig # noqa
from polyaxon_schemas.ops.notebook.backends import NotebookBackend # noqa
from polyaxon_schemas.pod import PodLifeCycle # noqa
from polyaxon_schemas.polyaxonfile import PolyaxonFile # noqa
from polyaxon_schemas.specs import kinds # noqa
from polyaxon_schemas.specs import (
BuildSpecification,
ExperimentSpecification,
GroupSpecification,
JobSpecification,
NotebookSpecification,
PipelineSpecification,
TensorboardSpecification
)
from polyaxon_schemas.specs.frameworks import ( # noqa
HorovodSpecification,
MPISpecification,
MXNetSpecification,
PytorchSpecification,
TensorflowSpecification
)
from polyaxon_schemas.utils import TaskType # noqa
from polyaxon_schemas.ops.group.hptuning import ( # noqa; noqa
AcquisitionFunctions,
BOConfig,
GaussianProcessConfig,
GaussianProcessesKernels,
GridSearchConfig,
HPTuningConfig,
HyperbandConfig,
RandomSearchConfig,
ResourceConfig,
SearchAlgorithms,
UtilityFunctionConfig
)
| 38.128571
| 90
| 0.811915
| 258
| 2,669
| 8.275194
| 0.368217
| 0.151756
| 0.240281
| 0.22623
| 0.277283
| 0.177049
| 0
| 0
| 0
| 0
| 0
| 0
| 0.140127
| 2,669
| 69
| 91
| 38.681159
| 0.930283
| 0.050581
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.397059
| 0
| 0.397059
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
d1b0722861a48dda7c0619379c7ce95af269d797
| 192
|
py
|
Python
|
src/settings_prod.py
|
chrisromito/cabin-iot-board
|
add87c47164d33bf3d8c318415d4eede2ea7e930
|
[
"MIT"
] | null | null | null |
src/settings_prod.py
|
chrisromito/cabin-iot-board
|
add87c47164d33bf3d8c318415d4eede2ea7e930
|
[
"MIT"
] | null | null | null |
src/settings_prod.py
|
chrisromito/cabin-iot-board
|
add87c47164d33bf3d8c318415d4eede2ea7e930
|
[
"MIT"
] | null | null | null |
class Settings:
WLAN_HOST = '$sudo'
WLAN_PASSWORD = 'HowNowBrownCow'
MQTT_BROKER_HOST = '192.168.0.136'
MQTT_BROKER_PORT = '1883'
API_URL = 'http://192.168.0.136:5000/api'
| 27.428571
| 45
| 0.661458
| 28
| 192
| 4.285714
| 0.678571
| 0.166667
| 0.116667
| 0.166667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.180645
| 0.192708
| 192
| 6
| 46
| 32
| 0.593548
| 0
| 0
| 0
| 0
| 0
| 0.338542
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.166667
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
d1b90a91e13c2a5e47ba35e6c28a9f9dae40ba91
| 113
|
py
|
Python
|
terrascript/provider/clc.py
|
hugovk/python-terrascript
|
08fe185904a70246822f5cfbdc9e64e9769ec494
|
[
"BSD-2-Clause"
] | 507
|
2017-07-26T02:58:38.000Z
|
2022-01-21T12:35:13.000Z
|
terrascript/provider/clc.py
|
hugovk/python-terrascript
|
08fe185904a70246822f5cfbdc9e64e9769ec494
|
[
"BSD-2-Clause"
] | 135
|
2017-07-20T12:01:59.000Z
|
2021-10-04T22:25:40.000Z
|
terrascript/provider/clc.py
|
hugovk/python-terrascript
|
08fe185904a70246822f5cfbdc9e64e9769ec494
|
[
"BSD-2-Clause"
] | 81
|
2018-02-20T17:55:28.000Z
|
2022-01-31T07:08:40.000Z
|
# terrascript/provider/clc.py
import terrascript
class clc(terrascript.Provider):
pass
__all__ = ["clc"]
| 11.3
| 32
| 0.725664
| 13
| 113
| 6
| 0.615385
| 0.487179
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.159292
| 113
| 9
| 33
| 12.555556
| 0.821053
| 0.238938
| 0
| 0
| 0
| 0
| 0.035714
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.25
| 0.25
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
d1bc16902466b4a8dc9b7b855cc8a5329c97c4dd
| 131
|
py
|
Python
|
urls.py
|
torkashvand/async-chord
|
e543ca2d8235b846e78b7e84b8bef827e82e150b
|
[
"MIT"
] | null | null | null |
urls.py
|
torkashvand/async-chord
|
e543ca2d8235b846e78b7e84b8bef827e82e150b
|
[
"MIT"
] | null | null | null |
urls.py
|
torkashvand/async-chord
|
e543ca2d8235b846e78b7e84b8bef827e82e150b
|
[
"MIT"
] | null | null | null |
from handlers.chord import ChordHandler
from handlers.base import IndexHandler
url_patterns = [
(r"/index/", IndexHandler),
]
| 18.714286
| 39
| 0.755725
| 15
| 131
| 6.533333
| 0.733333
| 0.244898
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.145038
| 131
| 6
| 40
| 21.833333
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0.053435
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.4
| 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
| 1
| 0
| 0
| 0
|
0
| 4
|
d1bd115ff485ff130c216d3eeab674a76e4a2a4e
| 2,678
|
py
|
Python
|
scripts/testcase.py
|
HolisticCoders/maya-tests
|
4e8c1ee536826f86f1084f5cf04388c27be7ff27
|
[
"MIT"
] | null | null | null |
scripts/testcase.py
|
HolisticCoders/maya-tests
|
4e8c1ee536826f86f1084f5cf04388c27be7ff27
|
[
"MIT"
] | null | null | null |
scripts/testcase.py
|
HolisticCoders/maya-tests
|
4e8c1ee536826f86f1084f5cf04388c27be7ff27
|
[
"MIT"
] | null | null | null |
import unittest
import maya.cmds as cmds
class TestCase(unittest.TestCase):
pass
# """Base class for unit test cases run in Maya.
# Tests do not have to inherit from this TestCase but this derived TestCase contains convenience
# functions to load/unload plug-ins and clean up temporary files.
# """
# # Keep track of all temporary files that were created so they can be cleaned up after
# # all tests have been run
# files_created = []
# # Keep track of which plugins were loaded so we can unload them after all tests have been run
# plugins_loaded = set()
# @classmethod
# def tearDownClass(cls):
# super(TestCase, cls).tearDownClass()
# cls.delete_temp_files()
# cls.unload_plugins()
# @classmethod
# def load_plugin(cls, plugin):
# """Load the given plug-in and saves it to be unloaded when the TestCase is finished.
# @param plugin: Plug-in name.
# """
# cmds.loadPlugin(plugin, qt=True)
# cls.plugins_loaded.add(plugin)
# @classmethod
# def unload_plugins(cls):
# # Unload any plugins that this test case loaded
# for plugin in cls.plugins_loaded:
# cmds.unloadPlugin(plugin)
# cls.plugins_loaded = []
# @classmethod
# def delete_temp_files(cls):
# """Delete the temp files in the cache and clear the cache."""
# # If we don't want to keep temp files around for debugging purposes, delete them when
# # all tests in this TestCase have been run
# if Settings.delete_files:
# for f in cls.files_created:
# if os.path.exists(f):
# os.remove(f)
# cls.files_create = []
# @classmethod
# def get_temp_filename(cls, file_name):
# """Get a unique filepath name in the testing directory.
# The file will not be created, that is up to the caller. This file will be deleted when
# the tests are finished.
# @param file_name: A partial path ex: 'directory/somefile.txt'
# @return The full path to the temporary file.
# """
# temp_dir = Settings.temp_dir
# if not os.path.exists(temp_dir):
# os.makedirs(temp_dir)
# base_name, ext = os.path.splitext(file_name)
# path = "{0}/{1}{2}".format(temp_dir, base_name, ext)
# count = 0
# while os.path.exists(path):
# # If the file already exists, add an incrememted number
# count += 1
# path = "{0}/{1}{2}{3}".format(temp_dir, base_name, count, ext)
# cls.files_created.append(path)
# return path
| 36.189189
| 100
| 0.609037
| 358
| 2,678
| 4.472067
| 0.368715
| 0.026234
| 0.020612
| 0.028107
| 0.069332
| 0.029981
| 0
| 0
| 0
| 0
| 0
| 0.004772
| 0.295743
| 2,678
| 73
| 101
| 36.684932
| 0.844115
| 0.833084
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.25
| 0.5
| 0
| 0.75
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
|
0
| 4
|
d1c92147433267cc39353766161e81d2357f9572
| 41
|
py
|
Python
|
pyewts/__init__.py
|
riggy2013/pyewts
|
25c21a59e46460ef8286208fe355b23c04fa8a76
|
[
"Apache-2.0"
] | null | null | null |
pyewts/__init__.py
|
riggy2013/pyewts
|
25c21a59e46460ef8286208fe355b23c04fa8a76
|
[
"Apache-2.0"
] | null | null | null |
pyewts/__init__.py
|
riggy2013/pyewts
|
25c21a59e46460ef8286208fe355b23c04fa8a76
|
[
"Apache-2.0"
] | null | null | null |
from .pyewts import *
VERSION = "0.1.2"
| 10.25
| 21
| 0.634146
| 7
| 41
| 3.714286
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.090909
| 0.195122
| 41
| 3
| 22
| 13.666667
| 0.69697
| 0
| 0
| 0
| 0
| 0
| 0.121951
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
d1f9ef1d4e519a01f413fb8625d7bb2aa5470dfa
| 14,560
|
py
|
Python
|
supervised/seg_model/U_net/FC_EF.py
|
lexuanquyen/DSMSCN
|
f69ad118a5dea35e7bd7170a38bb088a4c7b2fc8
|
[
"MIT"
] | 1
|
2020-11-30T12:18:13.000Z
|
2020-11-30T12:18:13.000Z
|
supervised/seg_model/U_net/FC_EF.py
|
lexuanquyen/DSMSCN
|
f69ad118a5dea35e7bd7170a38bb088a4c7b2fc8
|
[
"MIT"
] | null | null | null |
supervised/seg_model/U_net/FC_EF.py
|
lexuanquyen/DSMSCN
|
f69ad118a5dea35e7bd7170a38bb088a4c7b2fc8
|
[
"MIT"
] | null | null | null |
import keras.backend as K
from keras.layers import Conv2D, MaxPooling2D, Dropout, UpSampling2D, Concatenate, Lambda, Subtract, Conv2DTranspose, \
Multiply, GlobalAveragePooling2D
from keras.models import Input, Model
def get_FCEF_model(input_size, pre_weights=None):
# get a Siamese Encoder
inputs_tensor = Input(shape=input_size)
Contract_Path_Model = Model(inputs=[inputs_tensor], outputs=contract_path(inputs_tensor))
Inputs = Input(shape=input_size)
net, feature_1, feature_2, feature_3, feature_4 = Contract_Path_Model(Inputs)
# get a Decoder
FSEF_model = Model(inputs=Inputs,
outputs=expansive_path(net, feature_1, feature_2, feature_3, feature_4))
return FSEF_model
def Abs_layer(tensor):
return Lambda(K.abs)(tensor)
def contract_path(Inputs):
Conv_1 = Conv2D(16, 3, activation='relu', padding='same', kernel_initializer='he_normal')(Inputs)
# Conv_1 = BatchNormalization()(Conv_1)
Conv_1 = Conv2D(16, 3, activation='relu', padding='same', kernel_initializer='he_normal')(Conv_1)
feature_1 = Conv_1
# Conv_1 = BatchNormalization()(Conv_1)
Pool_1 = MaxPooling2D(pool_size=(2, 2), padding='same')(Conv_1)
Conv_2 = Conv2D(32, 3, activation='relu', padding='same', kernel_initializer='he_normal')(Pool_1)
# Conv_2 = BatchNormalization()(Conv_2)
Conv_2 = Conv2D(32, 3, activation='relu', padding='same', kernel_initializer='he_normal')(Conv_2)
feature_2 = Conv_2
Merge_2 = Dropout(0.2)(Conv_2)
# Conv_2 = BatchNormalization()(Conv_2)
Pool_2 = MaxPooling2D(pool_size=(2, 2), padding='same')(Merge_2)
# Conv_3 = Conv2D(64, 3, activation='relu', padding='same', kernel_initializer='he_normal')(Pool_2)
# Conv_3 = Conv2D(64, 3, activation='relu', padding='same', kernel_initializer='he_normal')(Conv_3)
# Conv_3 = Conv2D(64, 3, activation='relu', padding='same', kernel_initializer='he_normal')(Conv_3)
Conv_3 = _Inception_model_2(inputs=Pool_2, strides=[1, 1], data_format='NHWC')
Conv_3 = _Inception_model_1(inputs=Conv_3, strides=[1, 1], data_format='NHWC')
Conv_3 = _Inception_model_1(inputs=Conv_3, strides=[1, 1], data_format='NHWC')
feature_3 = Conv_3
Conv_3 = Dropout(0.3)(Conv_3)
# Conv_3 = BatchNormalization()(Conv_3)
Pool_3 = MaxPooling2D(pool_size=(2, 2), padding='same')(Conv_3)
Conv_4 = _Inception_model_2(inputs=Pool_3, strides=[1, 1], data_format='NHWC')
Conv_4 = _Inception_model_1(inputs=Conv_4, strides=[1, 1], data_format='NHWC')
Conv_4 = _Inception_model_1(inputs=Conv_4, strides=[1, 1], data_format='NHWC')
# Conv_4 = Conv2D(128, 3, activation='relu', padding='same', kernel_initializer='he_normal')(Pool_3)
# # Conv_4 = BatchNormalization()(Conv_4)
# Conv_4 = Conv2D(128, 3, activation='relu', padding='same', kernel_initializer='he_normal')(Conv_4)
# # Conv_4 = BatchNormalization()(Conv_4)
# Conv_4 = Conv2D(128, 3, activation='relu', padding='same', kernel_initializer='he_normal')(Conv_4)
feature_4 = Conv_4
Drop_4 = Dropout(0.5)(Conv_4)
#Pool_4 = Conv2D(128, 3, activation='relu', padding='same', kernel_initializer='he_normal', dilation_rate=2)(Drop_4)
Pool_4 = MaxPooling2D(pool_size=(2, 2), padding='same')(Drop_4)
return Pool_4, feature_1, feature_2, feature_3, feature_4
def expansive_path(feature, fea_1, fea_2, fea_3, fea_4):
# layer_1 = Conv2DTranspose(128, 2, activation='relu', padding='same', kernel_initializer='he_normal')(
# UpSampling2D(size=(2, 2))(feature))
layer_1 = Conv2DTranspose(128, 2, activation='relu', padding='same', kernel_initializer='he_normal')(feature)
# attention_1 = Attention_layer(layer_1)
# diff_fea_4 = Multiply()([attention_1, fea_4])
concat_layer_1 = Concatenate()([layer_1, fea_4])
layer_1 = Conv2D(128, 3, strides=[1, 1], activation='relu', padding='same', kernel_initializer='he_normal')(
concat_layer_1)
layer_1 = Conv2D(128, 3, strides=[1, 1], activation='relu', padding='same', kernel_initializer='he_normal')(
layer_1)
layer_1 = Dropout(0.5)(layer_1)
# layer_1 = BatchNormalization()(layer_1)
layer_1 = Conv2D(64, 3, strides=[1, 1], activation='relu', padding='same', kernel_initializer='he_normal')(
layer_1)
# (B, H/8, W/8, 64) --> (B, H/4, W/4, 32)
layer_2 = Conv2DTranspose(64, 2, strides=[1, 1], activation='relu', padding='same',
kernel_initializer='he_normal')(
UpSampling2D(size=(2, 2))(layer_1))
# attention_2 = Attention_layer(layer_2)
# diff_fea_3 = Multiply()([attention_2, fea_3])
concat_layer_2 = Concatenate()([layer_2, fea_3])
layer_2 = Conv2D(64, 3, activation='relu', padding='same', kernel_initializer='he_normal')(
concat_layer_2)
layer_2 = Conv2D(64, 3, activation='relu', padding='same', kernel_initializer='he_normal')(layer_2)
# layer_2 = BatchNormalization()(layer_2)
layer_2 = Conv2D(32, 3, activation='relu', padding='same', kernel_initializer='he_normal')(layer_2)
drop_layer_2 = Dropout(0.4)(layer_2)
# (B, H/4, W/4, 32) --> (B, H/2, W/2, 16)
layer_3 = Conv2DTranspose(32, 2, activation='relu', padding='same', kernel_initializer='he_normal')(
UpSampling2D(size=(2, 2))(drop_layer_2))
# attention_3 = Attention_layer(layer_3)
# diff_fea_2 = Multiply()([attention_3, fea_2])
concat_layer_3 = Concatenate()([layer_3, fea_2])
layer_3 = Conv2D(32, 3, activation='relu', padding='same', kernel_initializer='he_normal')(concat_layer_3)
# layer_3 = BatchNormalization()(layer_3)
layer_3 = Conv2D(16, 3, activation='relu', padding='same', kernel_initializer='he_normal')(layer_3)
drop_layer_3 = Dropout(0.3)(layer_3)
# (B, H/2, W/2, 16) --> (B, H, W, 1)
layer_4 = Conv2DTranspose(16, 2, activation='relu', padding='same', kernel_initializer='he_normal')(
UpSampling2D(size=(2, 2))(drop_layer_3))
# attention_4 = Attention_layer(layer_4)
# diff_fea_1 = Multiply()([attention_4, fea_1])
concat_layer_4 = Concatenate()([layer_4, fea_1])
# drop_layer_4 = Dropout(0.2)(concat_layer_4)
# layer_4 = Conv2D(32, 3, activation='relu', padding='same', kernel_initializer='he_normal')(
# concat_layer_4)
# layer_3 = BatchNormalization()(layer_3)
layer_4 = Conv2D(16, 3, activation='relu', padding='same', kernel_initializer='he_normal')(concat_layer_4)
logits = Conv2D(1, 3, activation='sigmoid', padding='same', kernel_initializer='he_normal')(layer_4)
logits = Lambda(squeeze)(logits)
# Up_1 = Conv2D(128, 2, activation='relu', padding='same', kernel_initializer='he_normal')(
# UpSampling2D(size=(2, 2))(feature))
# Merge_1 = Concatenate()([fea_4, Up_1])
# Deconv_1 = Conv2D(128, 3, activation='relu', padding='same', kernel_initializer='he_normal')(Merge_1)
# # Deconv_1 = BatchNormalization()(Deconv_1)
# Deconv_1 = Conv2D(128, 3, activation='relu', padding='same', kernel_initializer='he_normal')(Deconv_1)
# # Deconv_1 = BatchNormalization()(Deconv_1)
# Deconv_1 = Conv2D(64, 3, activation='relu', padding='same', kernel_initializer='he_normal')(Deconv_1)
# # Deconv_1 = BatchNormalization()(Deconv_1)
# Up_2 = Conv2D(64, 2, activation='relu', padding='same', kernel_initializer='he_normal')(
# UpSampling2D(size=(2, 2))(Deconv_1))
# Merge_2 = Concatenate(axis=-1)([fea_3, Up_2])
# Merge_2 = Dropout(0.5)(Merge_2)
# Deconv_2 = Conv2D(64, 3, activation='relu', padding='same', kernel_initializer='he_normal')(Merge_2)
# # Deconv_2 = BatchNormalization()(Deconv_2)
# Deconv_2 = Conv2D(64, 3, activation='relu', padding='same', kernel_initializer='he_normal')(Deconv_2)
# # Deconv_2 = BatchNormalization()(Deconv_2)
# Deconv_2 = Conv2D(32, 3, activation='relu', padding='same', kernel_initializer='he_normal')(Deconv_2)
# # Deconv_2 = BatchNormalization()(Deconv_2)
# Up_3 = Conv2D(32, 2, activation='relu', padding='same', kernel_initializer='he_normal')(
# UpSampling2D(size=(2, 2))(Deconv_2))
# Merge_3 = Concatenate(axis=-1)([fea_2, Up_3])
# Merge_3 = Dropout(0.3)(Merge_3)
# Deconv_3 = Conv2D(32, 3, activation='relu', padding='same', kernel_initializer='he_normal')(Merge_3)
# # Deconv_3 = BatchNormalization()(Deconv_3)
# Deconv_3 = Conv2D(16, 3, activation='relu', padding='same', kernel_initializer='he_normal')(Deconv_3)
# # Deconv_3 = BatchNormalization()(Deconv_3)
# Up_4 = Conv2D(16, 2, activation='relu', padding='same', kernel_initializer='he_normal')(
# UpSampling2D(size=(2, 2))(Deconv_3))
# Merge_4 = Concatenate(axis=-1)([fea_1, Up_4])
# Merge_4 = Dropout(0.2)(Merge_4)
# Deconv_4 = Conv2D(32, 3, activation='relu', padding='same', kernel_initializer='he_normal')(Merge_4)
# # Deconv_4 = BatchNormalization()(Deconv_4)
# Deconv_4 = Conv2D(16, 3, activation='relu', padding='same', kernel_initializer='he_normal')(Deconv_4)
# # Deconv_4 = BatchNormalization()(Deconv_4)
# logits = Conv2D(1, 3, activation='sigmoid', padding='same', kernel_initializer='he_normal')(Deconv_4)
# logits = Lambda(squeeze)(logits)
return logits
def Global_Attention(high_feature, low_feature, low_fea_dim, high_fea_dim):
weight = GlobalAveragePooling2D()(high_feature)
weight = Expand_Dim_Layer(tensor=weight)
weight = Expand_Dim_Layer(tensor=weight)
weight = Conv2D(high_fea_dim, kernel_size=1, strides=[1, 1], activation='sigmoid', padding='same',
kernel_initializer='glorot_uniform')(weight)
low_feature = Conv2D(low_fea_dim, kernel_size=3, strides=[1, 1], activation='relu',
padding='same',
kernel_initializer='he_normal')(low_feature)
weight_low_feature = Multiply()([weight, low_feature])
return weight_low_feature
def Expand_Dim_Layer(tensor):
def expand_dim(tensor):
return K.expand_dims(tensor, axis=1)
return Lambda(expand_dim)(tensor)
def _Inception_model_1(inputs, strides, data_format='NHWC'):
"""
Inception model v1, which keep the channel of outputs is same with inputs
:param inputs: (B, H, W, C)
:param data_format: str
:return: net, (B, H, W, C)
"""
if data_format == 'NHWC':
inputs_channel = inputs.get_shape().as_list()[-1]
else:
inputs_channel = inputs.get_shape().as_list()[1]
# 1x1 Conv
branch_11conv = Conv2D(inputs_channel // 4, kernel_size=1, strides=strides, activation='relu', padding='same',
kernel_initializer='he_normal')(inputs)
# 3x3 Conv
# branch_33conv = Conv2D(inputs_channel // 4, kernel_size=1, strides=[1, 1], activation='relu', padding='same',
# kernel_initializer='he_normal')(inputs)
branch_33conv = Conv2D(inputs_channel // 2, kernel_size=3, strides=strides, activation='relu', padding='same',
kernel_initializer='he_normal')(inputs)
# use two 3x3 conv layer to replace 5x5 conv layer, which can reduce parameter size and improve nonlinear
branch_55conv = Conv2D(inputs_channel // 4, kernel_size=1, strides=strides, activation='relu', padding='same',
kernel_initializer='he_normal')(inputs)
branch_55conv = Conv2D(inputs_channel // 8, kernel_size=3, strides=strides, activation='relu', padding='same',
kernel_initializer='he_normal')(branch_55conv)
branch_55conv = Conv2D(inputs_channel // 8, kernel_size=3, strides=strides, activation='relu', padding='same',
kernel_initializer='he_normal')(branch_55conv)
# Max Pool
branch_pool = MaxPooling2D(pool_size=[3, 3], strides=strides, padding='same')(inputs)
branch_pool = Conv2D(inputs_channel // 8, kernel_size=[1, 1], strides=strides, activation='relu',
padding='same', kernel_initializer='he_normal')(branch_pool)
net = Concatenate()([branch_11conv, branch_33conv, branch_55conv, branch_pool])
return net
def _Inception_model_2(inputs, strides, data_format='NHWC'):
"""
Inception model v2, which keep the channel of outputs is twice than inputs
:param inputs: (B, H, W, C)
:param data_format: str
:return: net, (B, H, W, 2 * C)
"""
if data_format == 'NHWC':
inputs_channel = inputs.get_shape().as_list()[-1]
concat_dim = 3
else:
inputs_channel = inputs.get_shape().as_list()[1]
concat_dim = 1
# 1x1 Conv
branch_11conv = Conv2D(inputs_channel // 2, 1, strides=strides, activation='relu', padding='same',
kernel_initializer='he_normal')(inputs)
# 3x3 Conv
# branch_33conv = Conv2D(inputs_channel // 2, 1, strides=strides, activation='relu', padding='same',
# kernel_initializer='he_normal')(inputs)
branch_33conv = Conv2D(inputs_channel, 3, strides=strides, activation='relu', padding='same',
kernel_initializer='he_normal')(inputs)
# use two 3x3 conv layer to replace 5x5 conv layer, which can reduce parameter size and improve nonlinear
branch_55conv = Conv2D(inputs_channel // 2, 1, strides=strides, activation='relu', padding='same',
kernel_initializer='he_normal')(inputs)
branch_55conv = Conv2D(inputs_channel // 4, 3, strides=strides, activation='relu', padding='same',
kernel_initializer='he_normal')(branch_55conv)
branch_55conv = Conv2D(inputs_channel // 4, 3, strides=strides, activation='relu', padding='same',
kernel_initializer='he_normal')(branch_55conv)
# Max Pool
branch_pool = MaxPooling2D(pool_size=[3, 3], strides=strides, padding='same')(inputs)
branch_pool = Conv2D(inputs_channel // 4, 1, strides=strides, activation='relu', padding='same',
kernel_initializer='he_normal')(branch_pool)
net = Concatenate(axis=concat_dim)([branch_11conv, branch_33conv, branch_55conv, branch_pool])
return net
def Attention_layer(tensor):
# fea = Lambda(self.sum_func)(Lambda(K.square)(tensor))
attention = Negative_layer(Conv2D(1, kernel_size=1, strides=[1, 1], activation='sigmoid', padding='same',
kernel_initializer='glorot_uniform')(tensor))
return attention
def Negative_layer(tensor):
return Lambda(negative)(tensor)
def negative(tensor):
return -tensor
def squeeze(tensor):
return K.squeeze(tensor, axis=-1)
| 51.087719
| 120
| 0.674519
| 1,957
| 14,560
| 4.745529
| 0.070005
| 0.076989
| 0.108
| 0.177883
| 0.761495
| 0.729622
| 0.703779
| 0.673307
| 0.655432
| 0.634435
| 0
| 0.054812
| 0.179258
| 14,560
| 284
| 121
| 51.267606
| 0.722343
| 0.361607
| 0
| 0.264706
| 0
| 0
| 0.070436
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.095588
| false
| 0
| 0.022059
| 0.036765
| 0.213235
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 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
| 4
|
d1fc6d502ee954371f9be38cd08a7401115179bb
| 70
|
py
|
Python
|
tests/__init__.py
|
William-Lake/comparing_lists
|
d9d53c89d4a36b1843bc536655cf8831afd4a2d4
|
[
"MIT"
] | null | null | null |
tests/__init__.py
|
William-Lake/comparing_lists
|
d9d53c89d4a36b1843bc536655cf8831afd4a2d4
|
[
"MIT"
] | 1
|
2018-10-25T22:38:47.000Z
|
2018-10-25T22:38:47.000Z
|
tests/__init__.py
|
William-Lake/comparing_lists
|
d9d53c89d4a36b1843bc536655cf8831afd4a2d4
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
"""Unit test package for comparing_lists."""
| 17.5
| 44
| 0.614286
| 9
| 70
| 4.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.016949
| 0.157143
| 70
| 3
| 45
| 23.333333
| 0.694915
| 0.871429
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
06073b985f52e20e57599162f46114fb7aa2f95c
| 138
|
py
|
Python
|
agents/__init__.py
|
BenGHolmes/AlphaFour
|
21fd34dfaca2899f5a17f323e964e5dab9f1e100
|
[
"MIT"
] | 1
|
2021-08-05T04:09:15.000Z
|
2021-08-05T04:09:15.000Z
|
agents/__init__.py
|
BenGHolmes/AlphaFour
|
21fd34dfaca2899f5a17f323e964e5dab9f1e100
|
[
"MIT"
] | null | null | null |
agents/__init__.py
|
BenGHolmes/AlphaFour
|
21fd34dfaca2899f5a17f323e964e5dab9f1e100
|
[
"MIT"
] | null | null | null |
from .agent import Agent
from .human import Human
from .alphabeta import AlphaBeta
from .mcts import Mcts
from .alphafour import AlphaFour
| 27.6
| 32
| 0.826087
| 20
| 138
| 5.7
| 0.35
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.137681
| 138
| 5
| 33
| 27.6
| 0.957983
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
ae7aef0cf6bbdefb51922c7e96c53008886fec83
| 545
|
py
|
Python
|
suvec/vk_api_impl/executing/responses_factory.py
|
ProtsenkoAI/skady-user-vectorizer
|
9114337d4a5cb176f6980e73a93eef90a49b478e
|
[
"MIT"
] | 1
|
2021-05-07T16:48:16.000Z
|
2021-05-07T16:48:16.000Z
|
suvec/vk_api_impl/executing/responses_factory.py
|
ProtsenkoAI/skady-user-vectorizer
|
9114337d4a5cb176f6980e73a93eef90a49b478e
|
[
"MIT"
] | null | null | null |
suvec/vk_api_impl/executing/responses_factory.py
|
ProtsenkoAI/skady-user-vectorizer
|
9114337d4a5cb176f6980e73a93eef90a49b478e
|
[
"MIT"
] | null | null | null |
from suvec.common.executing import ResponsesFactoryImpl
from .parsers import VkApiFriendsParser, VkApiGroupsParser
from .data_retrieving import VkApiRequestDataRetriever, AioVkRequestDataRetriever
class VkApiResponsesFactory(ResponsesFactoryImpl):
def __init__(self):
super().__init__(VkApiFriendsParser(), VkApiGroupsParser(), VkApiRequestDataRetriever())
class AioVkResponsesFactory(ResponsesFactoryImpl):
def __init__(self):
super().__init__(VkApiFriendsParser(), VkApiGroupsParser(), AioVkRequestDataRetriever())
| 38.928571
| 96
| 0.816514
| 39
| 545
| 10.974359
| 0.512821
| 0.245327
| 0.126168
| 0.14486
| 0.350467
| 0.350467
| 0.350467
| 0.350467
| 0
| 0
| 0
| 0
| 0.102752
| 545
| 13
| 97
| 41.923077
| 0.875256
| 0
| 0
| 0.222222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.222222
| false
| 0
| 0.333333
| 0
| 0.777778
| 0
| 0
| 0
| 1
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
ae9c5753d3dd9e274e86f1b42ff88599a0097444
| 23
|
py
|
Python
|
trimesh/version.py
|
bogacunver/trimesh
|
6ae6ddc898186c8f29bc8ab575653a46e99d2f9c
|
[
"MIT"
] | null | null | null |
trimesh/version.py
|
bogacunver/trimesh
|
6ae6ddc898186c8f29bc8ab575653a46e99d2f9c
|
[
"MIT"
] | null | null | null |
trimesh/version.py
|
bogacunver/trimesh
|
6ae6ddc898186c8f29bc8ab575653a46e99d2f9c
|
[
"MIT"
] | null | null | null |
__version__ = '3.9.25'
| 11.5
| 22
| 0.652174
| 4
| 23
| 2.75
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.2
| 0.130435
| 23
| 1
| 23
| 23
| 0.35
| 0
| 0
| 0
| 0
| 0
| 0.26087
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
ae9e1ae98df292186105f015809a236f820d5edb
| 658
|
py
|
Python
|
tests/test_nz_bank_validate.py
|
zhaowb/nz-bank-validate
|
795b8aae7c29b7fe10ae22522561899d029ef36b
|
[
"MIT"
] | null | null | null |
tests/test_nz_bank_validate.py
|
zhaowb/nz-bank-validate
|
795b8aae7c29b7fe10ae22522561899d029ef36b
|
[
"MIT"
] | null | null | null |
tests/test_nz_bank_validate.py
|
zhaowb/nz-bank-validate
|
795b8aae7c29b7fe10ae22522561899d029ef36b
|
[
"MIT"
] | null | null | null |
import pytest
from nz_bank_validate import nz_bank_validate
def test_examples():
"""examples from official pdf document"""
assert nz_bank_validate(*'01-902-0068389-00'.split('-'))
assert nz_bank_validate(*'08-6523-1954512-001'.split('-'))
assert nz_bank_validate(*'26-2600-0320871-032'.split('-'))
def test_invalid_numbers():
"""test invalid numbers"""
with pytest.raises(ValueError) as exc_info:
nz_bank_validate(*'03-0001-0016527-000'.split('-'))
def test_invalid_numbers_return_on_fail():
"""test invalid numbers"""
assert nz_bank_validate(*'03-0001-0016527-000'.split('-'), return_false_on_fail=True) is False
| 34.631579
| 98
| 0.717325
| 93
| 658
| 4.795699
| 0.473118
| 0.09417
| 0.219731
| 0.179372
| 0.374439
| 0.156951
| 0.156951
| 0.156951
| 0
| 0
| 0
| 0.135652
| 0.12614
| 658
| 18
| 99
| 36.555556
| 0.64
| 0.117021
| 0
| 0
| 0
| 0
| 0.173451
| 0
| 0
| 0
| 0
| 0
| 0.363636
| 1
| 0.272727
| true
| 0
| 0.181818
| 0
| 0.454545
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
8819f73df04aaa1b12d64e583c0954dc563ad8c3
| 120
|
py
|
Python
|
fact3.py
|
PiciAkk/factorial.py
|
19b7027718665c63a466b5c15f888bcd5adf0069
|
[
"MIT"
] | null | null | null |
fact3.py
|
PiciAkk/factorial.py
|
19b7027718665c63a466b5c15f888bcd5adf0069
|
[
"MIT"
] | null | null | null |
fact3.py
|
PiciAkk/factorial.py
|
19b7027718665c63a466b5c15f888bcd5adf0069
|
[
"MIT"
] | null | null | null |
def factorial(num):
if num == 0:
return 1
return num * factorial(num-1)
print(factorial(int(input())))
| 17.142857
| 33
| 0.6
| 17
| 120
| 4.235294
| 0.588235
| 0.333333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.033333
| 0.25
| 120
| 6
| 34
| 20
| 0.766667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0
| 0
| 0.6
| 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
| 1
| 0
|
0
| 4
|
88454ffa6c135913cb11f93baab7a0bbc357098f
| 255
|
py
|
Python
|
Evaluation.py
|
allanbatista/search_engine
|
478b027c64889c9e5681c7ce55a9a2276522e8fd
|
[
"Apache-2.0"
] | 1
|
2019-04-22T21:45:54.000Z
|
2019-04-22T21:45:54.000Z
|
Evaluation.py
|
allanbatista/search_engine
|
478b027c64889c9e5681c7ce55a9a2276522e8fd
|
[
"Apache-2.0"
] | null | null | null |
Evaluation.py
|
allanbatista/search_engine
|
478b027c64889c9e5681c7ce55a9a2276522e8fd
|
[
"Apache-2.0"
] | null | null | null |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from Tools.Config import CONFIG, ROOT_DIR
from Tools.Logger import logger
from Lib.Similarity.Cosine import Cosine
from Tools.EvaluatorData import EvaluatorData
from Lib.NLP.Preprocessor import Preprocessor
| 25.5
| 45
| 0.796078
| 36
| 255
| 5.611111
| 0.555556
| 0.133663
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.004444
| 0.117647
| 255
| 9
| 46
| 28.333333
| 0.893333
| 0.164706
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
8849d4f0e8edd0c02a812d43a77ce3b5a05475a1
| 380
|
py
|
Python
|
__init__.py
|
aehlke/ableton-cmd-mm1
|
b1fedb335c0ee421c16294a1bab832bf0895cd28
|
[
"MIT"
] | null | null | null |
__init__.py
|
aehlke/ableton-cmd-mm1
|
b1fedb335c0ee421c16294a1bab832bf0895cd28
|
[
"MIT"
] | null | null | null |
__init__.py
|
aehlke/ableton-cmd-mm1
|
b1fedb335c0ee421c16294a1bab832bf0895cd28
|
[
"MIT"
] | null | null | null |
# https://forum.ableton.com/viewtopic.php?f=1&t=200513
from cmd_mm1 import CMDMM1 # you import your main program during the initialisation of your script
def create_instance(c_instance): # this function tells live that you create a new midi remote script
return CMDMM1(c_instance) # the initialisation result is the calling of the main function of your script.
| 54.285714
| 113
| 0.765789
| 60
| 380
| 4.783333
| 0.683333
| 0.118467
| 0.083624
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.032051
| 0.178947
| 380
| 6
| 114
| 63.333333
| 0.887821
| 0.7
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.333333
| 0.333333
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 1
| 0
| 0
|
0
| 4
|
8860c1d3e267f1982de4dacf3d827350eb55352a
| 174
|
py
|
Python
|
tourbillon/rabbitmq/__init__.py
|
tourbillon-python/tourbillon-rabbitmq
|
b829e04438ca34805579fd2295e1f5dd64605e08
|
[
"Apache-2.0"
] | 1
|
2015-11-11T01:33:13.000Z
|
2015-11-11T01:33:13.000Z
|
tourbillon/rabbitmq/__init__.py
|
tourbillon-python/tourbillon-rabbitmq
|
b829e04438ca34805579fd2295e1f5dd64605e08
|
[
"Apache-2.0"
] | null | null | null |
tourbillon/rabbitmq/__init__.py
|
tourbillon-python/tourbillon-rabbitmq
|
b829e04438ca34805579fd2295e1f5dd64605e08
|
[
"Apache-2.0"
] | null | null | null |
import sys
PY34_PLUS = sys.version_info[0] == 3 and sys.version_info[1] >= 4
if PY34_PLUS:
from .rabbitmq.rabbitmq import *
else:
from .rabbitmq2.rabbitmq import *
| 19.333333
| 65
| 0.706897
| 27
| 174
| 4.407407
| 0.592593
| 0.134454
| 0.235294
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.06338
| 0.183908
| 174
| 8
| 66
| 21.75
| 0.774648
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
886ca3cca618ba72aef68fdeafd07f9afaa4a315
| 103
|
py
|
Python
|
PriceIndices/__init__.py
|
dc-aichara/Price-Indices
|
31159417b5ee79d051dea0f68600f1f2f3745eda
|
[
"MIT"
] | 11
|
2019-06-14T01:49:49.000Z
|
2021-11-16T00:36:29.000Z
|
PriceIndices/__init__.py
|
dc-aichara/Price-Indices
|
31159417b5ee79d051dea0f68600f1f2f3745eda
|
[
"MIT"
] | null | null | null |
PriceIndices/__init__.py
|
dc-aichara/Price-Indices
|
31159417b5ee79d051dea0f68600f1f2f3745eda
|
[
"MIT"
] | 4
|
2019-12-14T05:39:32.000Z
|
2021-12-12T21:12:00.000Z
|
from .crypto_history import MarketHistory
from .price_indicators import Indices
__version__ = "1.3.0"
| 20.6
| 41
| 0.815534
| 14
| 103
| 5.571429
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.032967
| 0.116505
| 103
| 4
| 42
| 25.75
| 0.824176
| 0
| 0
| 0
| 0
| 0
| 0.048544
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
88852f56e6cf1c14c1d243f8f97646e78e7e74ab
| 208
|
py
|
Python
|
day54/Solution.py
|
silvioedu/DailyInterview
|
976aec8e001344931aed19f20ccffc605fe063fd
|
[
"MIT"
] | null | null | null |
day54/Solution.py
|
silvioedu/DailyInterview
|
976aec8e001344931aed19f20ccffc605fe063fd
|
[
"MIT"
] | null | null | null |
day54/Solution.py
|
silvioedu/DailyInterview
|
976aec8e001344931aed19f20ccffc605fe063fd
|
[
"MIT"
] | null | null | null |
class Solution:
def intersection(self, nums1, nums2):
return list(set(nums1) & set(nums2))
if __name__ == '__main__':
print(Solution().intersection([4, 9, 5], [9, 4, 9, 8, 4]))
# [9, 4]
| 23.111111
| 62
| 0.581731
| 29
| 208
| 3.896552
| 0.62069
| 0.053097
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.086957
| 0.225962
| 208
| 8
| 63
| 26
| 0.614907
| 0.028846
| 0
| 0
| 0
| 0
| 0.04
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0
| 0.2
| 0.6
| 0.2
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
8885d84a749fbd78bfe5ee88a5c57444e846df69
| 792
|
py
|
Python
|
hknweb/candidate/views/__init__.py
|
jyxzhang/hknweb
|
a01ffd8587859bf63c46213be6a0c8b87164a5c2
|
[
"MIT"
] | null | null | null |
hknweb/candidate/views/__init__.py
|
jyxzhang/hknweb
|
a01ffd8587859bf63c46213be6a0c8b87164a5c2
|
[
"MIT"
] | null | null | null |
hknweb/candidate/views/__init__.py
|
jyxzhang/hknweb
|
a01ffd8587859bf63c46213be6a0c8b87164a5c2
|
[
"MIT"
] | null | null | null |
from hknweb.candidate.views.autocomplete import OfficerAutocomplete, UserAutocomplete
from hknweb.candidate.views.checkoffs import MemberCheckoffView, checkoff_csv
from hknweb.candidate.views.mass_add_cands import (
create_candidates_view,
add_cands,
check_mass_candidate_status,
)
from hknweb.candidate.views.index import IndexView
from hknweb.candidate.views.officer_challenge import (
officer_confirm_view,
confirm_challenge,
officer_review_confirmation,
CandRequestView,
challenge_detail_view,
)
from hknweb.candidate.views.officer_portal import OfficerPortalView
from hknweb.candidate.views.bitbyte import BitByteView
from hknweb.candidate.views.view_by_username import candidate_portal_view_by_username
from hknweb.candidate.views.summary import summary
| 39.6
| 85
| 0.847222
| 95
| 792
| 6.810526
| 0.378947
| 0.139104
| 0.264297
| 0.333849
| 0.095827
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.10101
| 792
| 19
| 86
| 41.684211
| 0.908708
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.473684
| 0
| 0.473684
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
8886e2c0f2b35cb4ac1161d0ded633abdbd2e482
| 117
|
py
|
Python
|
461-Hamming-Distance.py
|
QuenLo/leecode
|
ce861103949510dc54fd5cb336bd992c40748de2
|
[
"MIT"
] | 6
|
2018-06-13T06:48:42.000Z
|
2020-11-25T10:48:13.000Z
|
461-Hamming-Distance.py
|
QuenLo/leecode
|
ce861103949510dc54fd5cb336bd992c40748de2
|
[
"MIT"
] | null | null | null |
461-Hamming-Distance.py
|
QuenLo/leecode
|
ce861103949510dc54fd5cb336bd992c40748de2
|
[
"MIT"
] | null | null | null |
class Solution:
def hammingDistance(self, x, y):
result = x^y
return bin(result).count('1')
| 19.5
| 37
| 0.564103
| 15
| 117
| 4.4
| 0.8
| 0.060606
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.012346
| 0.307692
| 117
| 5
| 38
| 23.4
| 0.802469
| 0
| 0
| 0
| 0
| 0
| 0.008547
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
88adc56798a56cf5f181bfcf496e63c2d30a6cec
| 170
|
py
|
Python
|
bank_ddd_es_cqrs/accounts/infrastructure/__init__.py
|
Hyaxia/Bank-DDD-CQRS-ES
|
116e3eb3e93d549c1da53e6d506ab47667d77445
|
[
"MIT"
] | 8
|
2020-10-27T09:46:20.000Z
|
2022-01-27T12:16:48.000Z
|
bank_ddd_es_cqrs/accounts/infrastructure/__init__.py
|
Hyaxia/Bank-DDD-CQRS-ES
|
116e3eb3e93d549c1da53e6d506ab47667d77445
|
[
"MIT"
] | null | null | null |
bank_ddd_es_cqrs/accounts/infrastructure/__init__.py
|
Hyaxia/Bank-DDD-CQRS-ES
|
116e3eb3e93d549c1da53e6d506ab47667d77445
|
[
"MIT"
] | 2
|
2021-05-29T08:11:48.000Z
|
2021-07-26T04:44:53.000Z
|
from .repos import ESAccountRepository, ESClientRepository
from .sql import *
from .event_manager import PyDispatcherEventManager
from .kafka import start_kafka_consumer
| 34
| 58
| 0.864706
| 19
| 170
| 7.578947
| 0.631579
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1
| 170
| 4
| 59
| 42.5
| 0.941176
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
31f02dc2dbf4af9b42a31b0f3c03c8300a8459ad
| 181
|
py
|
Python
|
app/__init__.py
|
IGSN/isgn-registry-mvp
|
ad603de8bb7c2e98704bc14c9cc39aa90eb45e99
|
[
"MIT"
] | null | null | null |
app/__init__.py
|
IGSN/isgn-registry-mvp
|
ad603de8bb7c2e98704bc14c9cc39aa90eb45e99
|
[
"MIT"
] | null | null | null |
app/__init__.py
|
IGSN/isgn-registry-mvp
|
ad603de8bb7c2e98704bc14c9cc39aa90eb45e99
|
[
"MIT"
] | 1
|
2021-12-13T06:53:33.000Z
|
2021-12-13T06:53:33.000Z
|
""" file: __init__.py (api)
author: Jess Robertson, jessrobertson@icloud.com
date: July 2019
description: IGSN Registry API
"""
from .factory import create_app
| 20.111111
| 53
| 0.679558
| 22
| 181
| 5.363636
| 0.954545
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.028571
| 0.226519
| 181
| 8
| 54
| 22.625
| 0.814286
| 0.701657
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
31f4a14d4e434033bb0f08e9065f83948e1c8012
| 789
|
py
|
Python
|
thualign/utils/__init__.py
|
bryant1410/Mask-Align
|
329690919d6885a8fcdf13beef6cf98ff6a2d51a
|
[
"BSD-3-Clause"
] | 27
|
2021-05-11T07:24:59.000Z
|
2022-03-25T05:23:45.000Z
|
thualign/utils/__init__.py
|
bryant1410/Mask-Align
|
329690919d6885a8fcdf13beef6cf98ff6a2d51a
|
[
"BSD-3-Clause"
] | 11
|
2021-10-02T05:56:01.000Z
|
2022-03-30T02:32:36.000Z
|
thualign/utils/__init__.py
|
bryant1410/Mask-Align
|
329690919d6885a8fcdf13beef6cf98ff6a2d51a
|
[
"BSD-3-Clause"
] | 11
|
2021-06-04T05:23:39.000Z
|
2022-03-19T19:40:55.000Z
|
from thualign.utils.hparams import HParams
from thualign.utils.inference import beam_search, argmax_decoding
from thualign.utils.evaluation import evaluate
from thualign.utils.checkpoint import save, latest_checkpoint, best_checkpoint
from thualign.utils.scope import scope, get_scope, unique_name
from thualign.utils.misc import get_global_step, set_global_step
from thualign.utils.convert_params import params_to_vec, vec_to_params
from thualign.utils.config import Config
from thualign.utils.alignment import parse_refs, alignment_metrics, align_to_weights, weights_to_align, bidir_weights_to_align, get_extract_params, grow_diag_final
from thualign.utils.hook import add_global_collection, get_global_collection, clear_global_collection, start_global_collection, stop_global_collection
| 78.9
| 163
| 0.882129
| 115
| 789
| 5.721739
| 0.4
| 0.182371
| 0.258359
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.070976
| 789
| 10
| 164
| 78.9
| 0.897681
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
ee1d6180cf60befc00caa3ae471b15fe38ceff93
| 125
|
py
|
Python
|
camera-python/02-picamera/take_photo.py
|
josemarin7/Python-OpenCV-Recognition-via-Camera
|
16ecd87f4d535a3c98f1f5d27abfe193d647e5ff
|
[
"BSD-2-Clause"
] | null | null | null |
camera-python/02-picamera/take_photo.py
|
josemarin7/Python-OpenCV-Recognition-via-Camera
|
16ecd87f4d535a3c98f1f5d27abfe193d647e5ff
|
[
"BSD-2-Clause"
] | null | null | null |
camera-python/02-picamera/take_photo.py
|
josemarin7/Python-OpenCV-Recognition-via-Camera
|
16ecd87f4d535a3c98f1f5d27abfe193d647e5ff
|
[
"BSD-2-Clause"
] | 1
|
2020-01-24T21:14:20.000Z
|
2020-01-24T21:14:20.000Z
|
import picamera
import time
camera = picamera.PiCamera()
time.sleep(2) # Camera warm-up time
camera.capture('test.jpg')
| 15.625
| 38
| 0.736
| 18
| 125
| 5.111111
| 0.611111
| 0.217391
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.009346
| 0.144
| 125
| 7
| 39
| 17.857143
| 0.850467
| 0.152
| 0
| 0
| 0
| 0
| 0.07767
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.4
| 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
| 1
| 0
| 0
| 0
|
0
| 4
|
ee3c724ee3f56dbe3c614e84d6c2eb0d7d53c92e
| 161
|
py
|
Python
|
apenas_django/projeto_blog/categorias/models.py
|
Nataliaartini/cursoPython
|
01dc9cafd5cef1252ca84503e7a9011bd709ef46
|
[
"MIT"
] | null | null | null |
apenas_django/projeto_blog/categorias/models.py
|
Nataliaartini/cursoPython
|
01dc9cafd5cef1252ca84503e7a9011bd709ef46
|
[
"MIT"
] | null | null | null |
apenas_django/projeto_blog/categorias/models.py
|
Nataliaartini/cursoPython
|
01dc9cafd5cef1252ca84503e7a9011bd709ef46
|
[
"MIT"
] | null | null | null |
from django.db import models
class Categoria(models.Model):
nome_cat = models.CharField(max_lenght=50)
def __str__(self):
return self.nome_cat
| 20.125
| 46
| 0.720497
| 23
| 161
| 4.73913
| 0.782609
| 0.12844
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.015385
| 0.192547
| 161
| 7
| 47
| 23
| 0.823077
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.2
| 0.2
| 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
| 1
| 1
| 0
|
0
| 4
|
ee5a0f4aecb364e663b86d27daaa30fa5fec2754
| 214
|
py
|
Python
|
dev_wsgi.py
|
cclauss/confidant
|
85bf2980c47bced1fd71f7a515baa2c824f3ac39
|
[
"Apache-2.0"
] | 4
|
2019-06-04T17:07:57.000Z
|
2020-11-20T00:02:08.000Z
|
dev_wsgi.py
|
cclauss/confidant
|
85bf2980c47bced1fd71f7a515baa2c824f3ac39
|
[
"Apache-2.0"
] | 1,601
|
2018-09-13T14:56:27.000Z
|
2021-03-31T20:06:16.000Z
|
dev_wsgi.py
|
cclauss/confidant
|
85bf2980c47bced1fd71f7a515baa2c824f3ac39
|
[
"Apache-2.0"
] | 5
|
2019-10-30T20:37:02.000Z
|
2021-07-04T00:45:36.000Z
|
from confidant.app import app
if __name__ == '__main__':
app.run(
host=app.config.get('HOST', '127.0.0.1'),
port=app.config.get('PORT', 5000),
debug=app.config.get('DEBUG', True)
)
| 23.777778
| 49
| 0.584112
| 31
| 214
| 3.774194
| 0.580645
| 0.230769
| 0.307692
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.060606
| 0.228972
| 214
| 8
| 50
| 26.75
| 0.648485
| 0
| 0
| 0
| 0
| 0
| 0.140187
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.142857
| 0
| 0.142857
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
ee600a96abd6b1616c8b75e0f644d2a2a56a6ab5
| 92
|
py
|
Python
|
chapter_01/Prolog/fib.py
|
rkneusel9/StrangeCodeBook
|
70ed93396885a5cbf2f4d774d9aa30feca83e46d
|
[
"MIT"
] | null | null | null |
chapter_01/Prolog/fib.py
|
rkneusel9/StrangeCodeBook
|
70ed93396885a5cbf2f4d774d9aa30feca83e46d
|
[
"MIT"
] | null | null | null |
chapter_01/Prolog/fib.py
|
rkneusel9/StrangeCodeBook
|
70ed93396885a5cbf2f4d774d9aa30feca83e46d
|
[
"MIT"
] | null | null | null |
def fib(n):
if (n <= 2):
return 1
else:
return fib(n-1) + fib(n-2)
| 13.142857
| 34
| 0.413043
| 16
| 92
| 2.375
| 0.5
| 0.315789
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.074074
| 0.413043
| 92
| 6
| 35
| 15.333333
| 0.62963
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0
| 0
| 0.6
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
ee61e333f489f2c522b6757913b2afa6ccfe5459
| 236
|
py
|
Python
|
adapters/tuya/TS0013.py
|
russdan/domoticz-zigbee2mqtt-plugin
|
d47895eab44bc87fc19ce151698d2afe9554fadc
|
[
"MIT"
] | 146
|
2018-09-19T11:38:48.000Z
|
2022-03-21T11:54:12.000Z
|
adapters/tuya/TS0013.py
|
russdan/domoticz-zigbee2mqtt-plugin
|
d47895eab44bc87fc19ce151698d2afe9554fadc
|
[
"MIT"
] | 783
|
2018-09-28T17:07:14.000Z
|
2022-03-31T10:18:27.000Z
|
adapters/tuya/TS0013.py
|
russdan/domoticz-zigbee2mqtt-plugin
|
d47895eab44bc87fc19ce151698d2afe9554fadc
|
[
"MIT"
] | 147
|
2018-09-25T18:39:51.000Z
|
2022-03-01T19:31:27.000Z
|
from adapters.tuya.TS0012 import TS0012
from devices.switch.on_off_switch import OnOffSwitch
class TS0013(TS0012):
def __init__(self):
super().__init__()
self.devices.append(OnOffSwitch('center', 'state_center'))
| 23.6
| 66
| 0.728814
| 29
| 236
| 5.551724
| 0.655172
| 0.099379
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.080808
| 0.161017
| 236
| 9
| 67
| 26.222222
| 0.732323
| 0
| 0
| 0
| 0
| 0
| 0.076596
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
ee6251a1580ced0e9c2a2175b733163975496a3e
| 4,128
|
py
|
Python
|
src/diffpy/tests/integration_test.py
|
diffpy/fourigui
|
61e9157bd0d84df307f85f9d674e9f39354f1632
|
[
"BSD-3-Clause"
] | null | null | null |
src/diffpy/tests/integration_test.py
|
diffpy/fourigui
|
61e9157bd0d84df307f85f9d674e9f39354f1632
|
[
"BSD-3-Clause"
] | null | null | null |
src/diffpy/tests/integration_test.py
|
diffpy/fourigui
|
61e9157bd0d84df307f85f9d674e9f39354f1632
|
[
"BSD-3-Clause"
] | 3
|
2021-12-23T16:13:45.000Z
|
2021-12-23T20:42:49.000Z
|
import unittest
import numpy as np
import h5py
from ..fourigui.fourigui import Gui
class TestGui(unittest.TestCase):
def setUp(self):
# set up gui
self.test_gui = Gui()
# set up test data
self.test_sofq = h5py.File('diffpy/tests/testdata/sofq.h5')['data']
self.test_sofq_cut_10to40px = h5py.File('diffpy/tests/testdata/sofq_cut_10to40px.h5')['data']
self.test_sofq_cut_15to35px = h5py.File('diffpy/tests/testdata/sofq_cut_15to35px.h5')['data']
self.test_gofr = h5py.File('diffpy/tests/testdata/gofr.h5')['data']
self.test_gofr_cut_10to40px = h5py.File('diffpy/tests/testdata/gofr_from_sofq_cut_10to40px.h5')['data']
self.test_gofr_cut_15to35px = h5py.File('diffpy/tests/testdata/gofr_from_sofq_cut_15to35px.h5')['data']
def test_load_cube_testdataset1(self):
# given
self.test_gui.filename_entry.delete(0, 'end')
self.test_gui.filename_entry.insert(0, 'diffpy/tests/testdata/sofq.h5')
# when
self.test_gui.load_cube()
result = self.test_gui.cube
# then
self.assertTrue(np.allclose(result, self.test_sofq))
def test_load_cube_testdataset2(self):
# given
self.test_gui.filename_entry.delete(0, 'end')
self.test_gui.filename_entry.insert(0, 'diffpy/tests/testdata/sofq_cut_10to40px.h5')
# when
self.test_gui.load_cube()
result = self.test_gui.cube
# then
self.assertTrue(np.allclose(np.nan_to_num(result), np.nan_to_num(self.test_sofq_cut_10to40px)))
def test_load_cube_testdataset3(self):
# given
self.test_gui.filename_entry.delete(0, 'end')
self.test_gui.filename_entry.insert(0, 'diffpy/tests/testdata/sofq_cut_15to35px.h5')
# when
self.test_gui.load_cube()
result = self.test_gui.cube
# then
self.assertTrue(np.allclose(np.nan_to_num(result), np.nan_to_num(self.test_sofq_cut_15to35px)))
def test_fft_testdataset1(self):
# given
self.test_gui.plot_plane = lambda *a, **b: () # overwrite plot_plane which requires not initialized attribute im
self.test_gui.cube = self.test_sofq
# when
self.test_gui.fft()
result = self.test_gui.cube
# then
self.assertTrue(np.allclose(result, self.test_gofr))
def test_fft_testdataset2(self):
# given
self.test_gui.plot_plane = lambda *a, **b: () # overwrite plot_plane which requires not initialized attribute im
self.test_gui.cube = self.test_sofq_cut_10to40px
# when
self.test_gui.fft()
result = self.test_gui.cube
# then
self.assertTrue(np.allclose(result, self.test_gofr_cut_10to40px))
def test_fft_testdataset3(self):
# given
self.test_gui.plot_plane = lambda *a, **b: () # overwrite plot_plane which requires not initialized attribute im
self.test_gui.cube = self.test_sofq_cut_15to35px
# when
self.test_gui.fft()
result = self.test_gui.cube
# then
self.assertTrue(np.allclose(result, self.test_gofr_cut_15to35px))
def test_applycutoff_range1(self):
# given
self.test_gui.plot_plane = lambda *a, **b: ()
self.test_gui.cube = self.test_sofq
self.test_gui.qminentry.insert(0, '10')
self.test_gui.qmaxentry.insert(0, '40')
# when
self.test_gui.applycutoff()
result = self.test_gui.cube
# then
self.assertTrue(np.allclose(np.nan_to_num(result), np.nan_to_num(self.test_sofq_cut_10to40px)))
def test_applycutoff_range2(self):
# given
self.test_gui.plot_plane = lambda *a, **b: ()
self.test_gui.cube = self.test_sofq
self.test_gui.qminentry.insert(0, '15')
self.test_gui.qmaxentry.insert(0, '35')
# when
self.test_gui.applycutoff()
result = self.test_gui.cube
# then
self.assertTrue(np.allclose(np.nan_to_num(result), np.nan_to_num(self.test_sofq_cut_15to35px)))
if __name__ == '__main__':
unittest.main()
| 33.290323
| 120
| 0.657946
| 570
| 4,128
| 4.491228
| 0.129825
| 0.175
| 0.158984
| 0.076172
| 0.883594
| 0.859375
| 0.76875
| 0.697656
| 0.697656
| 0.664844
| 0
| 0.03577
| 0.227955
| 4,128
| 123
| 121
| 33.560976
| 0.767493
| 0.084787
| 0
| 0.462687
| 0
| 0
| 0.108858
| 0.095784
| 0
| 0
| 0
| 0
| 0.119403
| 1
| 0.134328
| false
| 0
| 0.059701
| 0
| 0.208955
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
ee7c32e9907aafec238f11783f4dd090dd3c3651
| 141
|
py
|
Python
|
apps/role/handler.py
|
Freen247/dj_blog
|
f7df1a7b101d41835a334b78cddf3570968799e4
|
[
"Apache-2.0"
] | 51
|
2020-09-28T09:41:03.000Z
|
2022-03-19T08:25:19.000Z
|
apps/role/handler.py
|
Freen247/dj_blog
|
f7df1a7b101d41835a334b78cddf3570968799e4
|
[
"Apache-2.0"
] | 17
|
2020-09-24T10:26:40.000Z
|
2022-03-12T00:49:05.000Z
|
apps/role/handler.py
|
Freen247/django_blogback
|
f7df1a7b101d41835a334b78cddf3570968799e4
|
[
"Apache-2.0"
] | 11
|
2020-10-10T01:23:09.000Z
|
2022-02-08T17:06:09.000Z
|
#!/usr/bin/python
# -*- coding: utf-8 -*-
# __author__ : stray_camel
# __description__ : role
# __REFERENCES__ :
# __date__: 2020/10/16 21
| 17.625
| 26
| 0.666667
| 17
| 141
| 4.529412
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.09322
| 0.163121
| 141
| 7
| 27
| 20.142857
| 0.559322
| 0.907801
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
ee8e684b6e892d3f3395755e702cd119973d1453
| 439
|
py
|
Python
|
tests/__init__.py
|
defgsus/elastipy
|
c1144ab39fa70571ba0e02ccf41d380a8a1bd730
|
[
"Apache-2.0"
] | 1
|
2021-02-17T17:50:28.000Z
|
2021-02-17T17:50:28.000Z
|
tests/__init__.py
|
defgsus/elastipy
|
c1144ab39fa70571ba0e02ccf41d380a8a1bd730
|
[
"Apache-2.0"
] | 2
|
2021-03-29T02:09:41.000Z
|
2022-03-01T20:09:48.000Z
|
tests/__init__.py
|
netzkolchose/elastipy
|
c1144ab39fa70571ba0e02ccf41d380a8a1bd730
|
[
"Apache-2.0"
] | null | null | null |
from .test_agg_housing import *
from .test_bool import *
from .test_doc_ext import *
from .test_doc_helper import *
from .test_exporter import *
from .test_generator import *
from .test_heatmap import *
from .test_json import *
from .test_query_body import *
from .test_query_housing import *
from .test_response import *
from .test_search import *
from .test_search_request import *
from .test_table import *
from .test_wildcard import *
| 27.4375
| 34
| 0.794989
| 66
| 439
| 4.969697
| 0.30303
| 0.365854
| 0.597561
| 0.128049
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.136674
| 439
| 15
| 35
| 29.266667
| 0.865435
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
c9b81f09972467031702ea9e0268f67907434c48
| 217
|
py
|
Python
|
basic/variable_test.py
|
sanikamal/awesome-python-examples
|
998dd2b1ef31714f20f6e6aa061ac1f303026e84
|
[
"MIT"
] | 1
|
2020-07-07T23:36:51.000Z
|
2020-07-07T23:36:51.000Z
|
basic/variable_test.py
|
sanikamal/awesome-python-examples
|
998dd2b1ef31714f20f6e6aa061ac1f303026e84
|
[
"MIT"
] | null | null | null |
basic/variable_test.py
|
sanikamal/awesome-python-examples
|
998dd2b1ef31714f20f6e6aa061ac1f303026e84
|
[
"MIT"
] | null | null | null |
"""
Created by Sani Kamal
"""
print("hello Rashmi")
variablename = 1;
print (variablename)
variablename2 = 2;
variable3 = variablename + variablename2
print (variable3)
| 18.083333
| 44
| 0.580645
| 18
| 217
| 7
| 0.666667
| 0.396825
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.041096
| 0.327189
| 217
| 11
| 45
| 19.727273
| 0.821918
| 0
| 0
| 0
| 0
| 0
| 0.066667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0.5
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
c9ba834056a8519b7c1744c6f2bf6724bc877345
| 61
|
py
|
Python
|
ex1/evento.py
|
renzon/oo-inpe
|
1b33939974f998badbeebd7bfe182070e77ef98f
|
[
"MIT"
] | null | null | null |
ex1/evento.py
|
renzon/oo-inpe
|
1b33939974f998badbeebd7bfe182070e77ef98f
|
[
"MIT"
] | null | null | null |
ex1/evento.py
|
renzon/oo-inpe
|
1b33939974f998badbeebd7bfe182070e77ef98f
|
[
"MIT"
] | null | null | null |
class Evento():
def __init__(self, s):
self.s = s
| 20.333333
| 26
| 0.540984
| 9
| 61
| 3.222222
| 0.666667
| 0.344828
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.311475
| 61
| 3
| 27
| 20.333333
| 0.690476
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
a0084b228a6c08cb47fe350d270a6dc7da3aa298
| 38
|
py
|
Python
|
src/rcbu/client/__init__.py
|
BenjamenMeyer/cloudfiles-viewer
|
909cd3e976a1acb5d3fcc755a8c89eec700e14fc
|
[
"Apache-2.0"
] | 1
|
2017-04-14T13:54:20.000Z
|
2017-04-14T13:54:20.000Z
|
src/rcbu/client/__init__.py
|
BenjamenMeyer/cloudfiles-viewer
|
909cd3e976a1acb5d3fcc755a8c89eec700e14fc
|
[
"Apache-2.0"
] | null | null | null |
src/rcbu/client/__init__.py
|
BenjamenMeyer/cloudfiles-viewer
|
909cd3e976a1acb5d3fcc755a8c89eec700e14fc
|
[
"Apache-2.0"
] | null | null | null |
"""
RCBU API Client Functionality
"""
| 9.5
| 29
| 0.684211
| 4
| 38
| 6.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.157895
| 38
| 3
| 30
| 12.666667
| 0.8125
| 0.763158
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
4e7421d0c007409cda77330db43d89c1e7e3fd5a
| 153
|
py
|
Python
|
Mundo 1/ex30.py
|
Silvalhd/Aulas-Python
|
77ddc0e276accff4bfef9d474f80d0ad399ef74f
|
[
"MIT"
] | null | null | null |
Mundo 1/ex30.py
|
Silvalhd/Aulas-Python
|
77ddc0e276accff4bfef9d474f80d0ad399ef74f
|
[
"MIT"
] | null | null | null |
Mundo 1/ex30.py
|
Silvalhd/Aulas-Python
|
77ddc0e276accff4bfef9d474f80d0ad399ef74f
|
[
"MIT"
] | null | null | null |
num = int(input('Digite um número:'))
if int(num) % 2 == 0:
print('O número {} é par'.format(num))
else:
print('O número {} é ímpar'.format(num))
| 30.6
| 44
| 0.594771
| 26
| 153
| 3.5
| 0.615385
| 0.131868
| 0.263736
| 0.285714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.016129
| 0.189542
| 153
| 5
| 44
| 30.6
| 0.717742
| 0
| 0
| 0
| 0
| 0
| 0.344156
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.4
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
4e7584ac1438e422a400bb311314107402444b7f
| 67
|
py
|
Python
|
modules/event_driven_fd/__init__.py
|
sspbft/BFTList
|
d73aee5bd0ab05995509f0fcfaf3c0a5944e617a
|
[
"MIT"
] | 6
|
2019-11-12T01:45:55.000Z
|
2022-03-18T10:57:21.000Z
|
modules/event_driven_fd/__init__.py
|
practicalbft/BFTList
|
d73aee5bd0ab05995509f0fcfaf3c0a5944e617a
|
[
"MIT"
] | 4
|
2019-02-14T10:57:09.000Z
|
2019-03-21T15:22:08.000Z
|
modules/event_driven_fd/__init__.py
|
sspbft/BFTList
|
d73aee5bd0ab05995509f0fcfaf3c0a5944e617a
|
[
"MIT"
] | 1
|
2019-04-04T15:09:33.000Z
|
2019-04-04T15:09:33.000Z
|
"""Package containing the event-driven failure detector module."""
| 33.5
| 66
| 0.776119
| 8
| 67
| 6.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.104478
| 67
| 1
| 67
| 67
| 0.866667
| 0.895522
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
4e85595dbf50903dd14d0bd39ba59087309e0c6a
| 7,530
|
py
|
Python
|
src/inverse_text_normalization/mr/itn_tests/tests_itn_mr.py
|
yashiagar1999/indict_punc
|
8697ac5a5245c7e0d35b0777b1dc6fb1b8d6d525
|
[
"MIT"
] | 15
|
2021-07-30T18:18:47.000Z
|
2022-02-14T09:04:19.000Z
|
src/inverse_text_normalization/mr/itn_tests/tests_itn_mr.py
|
yashiagar1999/indict_punc
|
8697ac5a5245c7e0d35b0777b1dc6fb1b8d6d525
|
[
"MIT"
] | 1
|
2021-12-15T12:42:12.000Z
|
2022-02-15T05:33:00.000Z
|
src/inverse_text_normalization/mr/itn_tests/tests_itn_mr.py
|
yashiagar1999/indict_punc
|
8697ac5a5245c7e0d35b0777b1dc6fb1b8d6d525
|
[
"MIT"
] | 4
|
2021-07-30T10:03:38.000Z
|
2021-12-01T14:46:54.000Z
|
'''
Please move this file to src/ before running the tests
'''
import unittest
from inverse_text_normalization.run_predict import inverse_normalize_text
class MarathiInverseTextNormalization(unittest.TestCase):
def test_two_digit_numbers_are_converted_to_numerals(self):
data = ['रीटाला सोळा मांजरी आहेत']
expected_output = ['रीटाला 16 मांजरी आहेत']
inverse_normalizer_prediction = inverse_normalize_text(data, lang='mr')
inverse_normalizer_prediction = [sent.replace('\r', '') for sent in inverse_normalizer_prediction]
self.assertEqual(expected_output, inverse_normalizer_prediction)
def test_hundreds_are_converted_to_numerals_with_correct_grammar_only(self):
data = [
'चार शंभर',
'शंभर',
'शे',
'चारशे'
]
expected_output = [
'4 100', # we want चारशे for 400. 'चार शंभर' is incorrect usage
'100', # शंभर implies 100
'शे', # शे in itself doesn't imply 100. It has to come with a number
'400' # correct usage
]
inverse_normalizer_prediction = inverse_normalize_text(data, lang='mr')
inverse_normalizer_prediction = [sent.replace('\r', '') for sent in inverse_normalizer_prediction]
self.assertEqual(expected_output, inverse_normalizer_prediction)
def test_hundreds_are_converted_to_numerals(self):
data = [
'रीटाकडे नऊशे वीस मांजरी आहेत',
'दोनशे एकोणीस',
'दोन शे एकोणीस' # space between two and hundred
]
expected_output = [
'रीटाकडे 920 मांजरी आहेत',
'219',
'219'
]
inverse_normalizer_prediction = inverse_normalize_text(data, lang='mr')
inverse_normalizer_prediction = [sent.replace('\r', '') for sent in inverse_normalizer_prediction]
self.assertEqual(expected_output, inverse_normalizer_prediction)
def test_thousands_are_converted_to_numerals(self):
data = ['एक हजार चारशे वीस', 'बारा हजार सातशे तीन', 'पंधराशे', 'पंधराशे सात',
'पंधरा शे सात',
'अठरा हजार तीनशे नव्व्याण्णव']
expected_output = ['1,420', '12,703', '1,500', '1,507', '1,507', '18,399']
inverse_normalizer_prediction = inverse_normalize_text(data, lang='mr')
inverse_normalizer_prediction = [sent.replace('\r', '') for sent in inverse_normalizer_prediction]
self.assertEqual(expected_output, inverse_normalizer_prediction)
def test_lakhs_are_converted_to_formatted_numerals(self):
data = ['चार लाख चारशे चार',
'चार लक्ष चारशे चार', # alternate spelling
'बारा लाख वीस हजार सातशे पंधरा',
'बारा लाख वीस हज़ार सातशे पंधरा'] # alternate spelling
expected_output = ['4,00,404',
'4,00,404',
'12,20,715',
'12,20,715']
inverse_normalizer_prediction = inverse_normalize_text(data, lang='mr')
inverse_normalizer_prediction = [sent.replace('\r', '') for sent in inverse_normalizer_prediction]
self.assertEqual(expected_output, inverse_normalizer_prediction)
def test_single_and_double_digit_crores_are_converted_to_formatted_numerals(self):
data = ['चार कोटी',
'एकवीस लाख',
'चार कोटी एकवीस लाख', 'चार कोटी एकवीस लाख चार हजार चारशे चार',
'बत्तीस कोटी एकवीस लाख सदतीस हजार चारशे बारा', 'बत्तीस कोटी दोनशे']
expected_output = ['4,00,00,000', '21,00,000',
'4,21,00,000', '4,21,04,404', '32,21,37,412', '32,00,00,200']
inverse_normalizer_prediction = inverse_normalize_text(data, lang='mr')
inverse_normalizer_prediction = [sent.replace('\r', '') for sent in inverse_normalizer_prediction]
self.assertEqual(expected_output, inverse_normalizer_prediction)
def test_spoken_form_of_single_digit_thousands_for_years_are_converted(self):
# TODO: don't format (comma) for years
data = ['वर्ष एकोणीसशे चौर्याहत्तर', 'वर्ष एकोणीसशे चौहत्तर', 'एक हजार नऊशे चौहत्तर लेख आहेत']
expected_output = ['वर्ष 1,974', 'वर्ष 1,974', '1,974 लेख आहेत']
inverse_normalizer_prediction = inverse_normalize_text(data, lang='mr')
inverse_normalizer_prediction = [sent.replace('\r', '') for sent in inverse_normalizer_prediction]
self.assertEqual(expected_output, inverse_normalizer_prediction)
def test_variations_of_hundreds_and_thousands_of_crores_or_lakhs_are_converted(self):
data = ['चार हजार चारशे कोटी', 'दोनशे कोटी', 'चोवीस हजार कोटी', 'चार हजार चारशे लाख']
expected_output = ['44,00,00,00,000', '2,00,00,00,000', '2,40,00,00,00,000', '44,00,00,000']
inverse_normalizer_prediction = inverse_normalize_text(data, lang='mr')
inverse_normalizer_prediction = [sent.replace('\r', '') for sent in inverse_normalizer_prediction]
self.assertEqual(expected_output, inverse_normalizer_prediction)
def test_spoken_variations_of_hundreds_and_thousands_of_crores_or_lakhs_are_converted(self):
data = ['एकोणीसशे एकोणीस कोटी', 'सत्तावीसशे कोटी', 'छत्तीसशे लाख']
expected_output = ['19,19,00,00,000', '27,00,00,00,000', '36,00,00,000']
inverse_normalizer_prediction = inverse_normalize_text(data, lang='mr')
inverse_normalizer_prediction = [sent.replace('\r', '') for sent in inverse_normalizer_prediction]
self.assertEqual(expected_output, inverse_normalizer_prediction)
def test_simple_lakhs_of_crores_are_converted(self):
data = ['चार लाख कोटी']
expected_output = ['40,00,00,00,00,000']
inverse_normalizer_prediction = inverse_normalize_text(data, lang='mr')
inverse_normalizer_prediction = [sent.replace('\r', '') for sent in inverse_normalizer_prediction]
self.assertEqual(expected_output, inverse_normalizer_prediction)
def test_number_after_decimals_are_not_formatted_with_commas(self):
data = ['एकोणतीस दशांश चार तीन', 'शून्य दशांश नऊ तीन चार पाच']
expected_output = ['29.43', '0.9345']
inverse_normalizer_prediction = inverse_normalize_text(data, lang='mr')
inverse_normalizer_prediction = [sent.replace('\r', '') for sent in inverse_normalizer_prediction]
self.assertEqual(expected_output, inverse_normalizer_prediction)
def test_spoken_words_like_only_crore_lakh_and_thousand_are_converted_to_corresponding_numerals(self):
data = ['त्याला हजार द्या', 'त्याला कोटी द्या', 'त्याला लाख द्या', 'शंभर']
expected_output = ['त्याला 1,000 द्या', 'त्याला 1,00,00,000 द्या', 'त्याला 1,00,000 द्या', '100']
inverse_normalizer_prediction = inverse_normalize_text(data, lang='mr')
inverse_normalizer_prediction = [sent.replace('\r', '') for sent in inverse_normalizer_prediction]
self.assertEqual(expected_output, inverse_normalizer_prediction)
def test_money_is_converted_to_corresponding_numerals(self):
data = ['त्याला एक हजार रुपये द्या', 'त्याला एक हजार चारशे एकोणतीस डॉलर द्या']
expected_output = ['त्याला ₹ 1,000 द्या', 'त्याला $ 1,429 द्या']
inverse_normalizer_prediction = inverse_normalize_text(data, lang='mr')
inverse_normalizer_prediction = [sent.replace('\r', '') for sent in inverse_normalizer_prediction]
self.assertEqual(expected_output, inverse_normalizer_prediction)
if __name__ == '__main__':
unittest.main()
| 42.784091
| 106
| 0.641301
| 1,405
| 7,530
| 3.448399
| 0.143061
| 0.182456
| 0.289783
| 0.091228
| 0.777503
| 0.755624
| 0.7129
| 0.69515
| 0.677193
| 0.665222
| 0
| 0.045377
| 0.218592
| 7,530
| 175
| 107
| 43.028571
| 0.728246
| 0.040505
| 0
| 0.39823
| 0
| 0.044248
| 0.179057
| 0
| 0
| 0
| 0
| 0.005714
| 0.115044
| 1
| 0.115044
| false
| 0
| 0.017699
| 0
| 0.141593
| 0
| 0
| 0
| 0
| null | 0
| 1
| 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
| 4
|
4e8e948a0b361b298999e556b9c2a44e0e455acf
| 289
|
py
|
Python
|
vaultmanager/cli.py
|
leboncoin/vault-manager
|
3457e8c2487a0d9cba8362208df91b77024d7782
|
[
"MIT"
] | 6
|
2018-07-19T14:11:09.000Z
|
2020-01-27T14:43:56.000Z
|
vaultmanager/cli.py
|
leboncoin/vault-manager
|
3457e8c2487a0d9cba8362208df91b77024d7782
|
[
"MIT"
] | null | null | null |
vaultmanager/cli.py
|
leboncoin/vault-manager
|
3457e8c2487a0d9cba8362208df91b77024d7782
|
[
"MIT"
] | 3
|
2020-02-10T08:46:58.000Z
|
2020-09-15T16:03:33.000Z
|
#!/usr/bin/env python
import os
import inspect
try:
from VaultManager import VaultManager
except ImportError:
from vaultmanager.VaultManager import VaultManager
def main():
VaultManager(os.path.split(inspect.getfile(VaultManager))[0])
if __name__ == "__main__":
main()
| 18.0625
| 65
| 0.743945
| 34
| 289
| 6.088235
| 0.588235
| 0.154589
| 0.289855
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.004098
| 0.155709
| 289
| 15
| 66
| 19.266667
| 0.844262
| 0.069204
| 0
| 0
| 0
| 0
| 0.029851
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.1
| true
| 0
| 0.5
| 0
| 0.6
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
4ea981795a66f351a3b7e0eaad94ed877267dbd4
| 219
|
py
|
Python
|
docs/lib/DevLibrary.py
|
serra/impact-spheres-drive-monitor
|
2e1e84c962538af9a0bea293a98b23c1ae7973c9
|
[
"MIT"
] | null | null | null |
docs/lib/DevLibrary.py
|
serra/impact-spheres-drive-monitor
|
2e1e84c962538af9a0bea293a98b23c1ae7973c9
|
[
"MIT"
] | 10
|
2017-11-04T10:01:31.000Z
|
2018-05-18T13:56:07.000Z
|
docs/lib/DevLibrary.py
|
serra/impact-spheres-drive-monitor
|
2e1e84c962538af9a0bea293a98b23c1ae7973c9
|
[
"MIT"
] | null | null | null |
import pkg_resources
class DevLibrary:
def __init__(sefl):
pass
def all_dependencies_should_be_installed(self):
with open('requirements.txt') as reqs:
pkg_resources.require(reqs)
| 18.25
| 51
| 0.680365
| 26
| 219
| 5.346154
| 0.846154
| 0.172662
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.246575
| 219
| 11
| 52
| 19.909091
| 0.842424
| 0
| 0
| 0
| 0
| 0
| 0.073059
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0.142857
| 0.142857
| 0
| 0.571429
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
4eb0163be704048ef7e7d81be1677d1ddf22a0d8
| 129
|
py
|
Python
|
Retired/Which Millennia is It.py
|
mwk0408/codewars_solutions
|
9b4f502b5f159e68024d494e19a96a226acad5e5
|
[
"MIT"
] | 6
|
2020-09-03T09:32:25.000Z
|
2020-12-07T04:10:01.000Z
|
Retired/Which Millennia is It.py
|
mwk0408/codewars_solutions
|
9b4f502b5f159e68024d494e19a96a226acad5e5
|
[
"MIT"
] | 1
|
2021-12-13T15:30:21.000Z
|
2021-12-13T15:30:21.000Z
|
Retired/Which Millennia is It.py
|
mwk0408/codewars_solutions
|
9b4f502b5f159e68024d494e19a96a226acad5e5
|
[
"MIT"
] | null | null | null |
def this_millennia_or_last(date):
prefix, year=date[:-2], date[-2:]
return f"{prefix}{19 if int(year)>=50 else 20}{year}"
| 43
| 57
| 0.658915
| 23
| 129
| 3.565217
| 0.73913
| 0.121951
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.072072
| 0.139535
| 129
| 3
| 57
| 43
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0.330769
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
4ece1aee742f93737a4b2715761a798a28dd79cf
| 47
|
py
|
Python
|
examples/web/the_ugly_blog/steps/1.py
|
Bnz-0/chad
|
7bfea262f0a343d70a337608d5e7b9ad7dd52151
|
[
"MIT"
] | null | null | null |
examples/web/the_ugly_blog/steps/1.py
|
Bnz-0/chad
|
7bfea262f0a343d70a337608d5e7b9ad7dd52151
|
[
"MIT"
] | null | null | null |
examples/web/the_ugly_blog/steps/1.py
|
Bnz-0/chad
|
7bfea262f0a343d70a337608d5e7b9ad7dd52151
|
[
"MIT"
] | null | null | null |
check_solution("bash test_solution.sh", flag)
| 15.666667
| 45
| 0.787234
| 7
| 47
| 5
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.085106
| 47
| 2
| 46
| 23.5
| 0.813953
| 0
| 0
| 0
| 0
| 0
| 0.456522
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
4ecf4ad83a285c2892aec04394c4e28164728aac
| 32
|
py
|
Python
|
emulation_system/tests/command_creators/__init__.py
|
Opentrons/ot3-emulator
|
90fad37b54dc3b003732220e630185de1a1d5dfd
|
[
"Apache-2.0"
] | 3
|
2022-02-15T23:58:01.000Z
|
2022-03-17T19:32:15.000Z
|
emulation_system/tests/command_creators/__init__.py
|
Opentrons/opentrons-emulation
|
aee3b362ef47190b35a1a99d040f5d87800e740b
|
[
"Apache-2.0"
] | 23
|
2021-11-17T17:55:22.000Z
|
2022-03-29T19:15:20.000Z
|
emulation_system/tests/command_creators/__init__.py
|
Opentrons/opentrons-emulation
|
aee3b362ef47190b35a1a99d040f5d87800e740b
|
[
"Apache-2.0"
] | null | null | null |
"""command_creators package."""
| 16
| 31
| 0.71875
| 3
| 32
| 7.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.0625
| 32
| 1
| 32
| 32
| 0.733333
| 0.78125
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
14e5990b7456abde3df6d4c0ae7327c7c2c483f2
| 98
|
py
|
Python
|
AI_News/apps/app_funthing/apps.py
|
puxiaoshuai/News
|
fcfe09883e489777dfbcc7a882bf52aa195054f1
|
[
"MIT"
] | null | null | null |
AI_News/apps/app_funthing/apps.py
|
puxiaoshuai/News
|
fcfe09883e489777dfbcc7a882bf52aa195054f1
|
[
"MIT"
] | 3
|
2019-01-15T09:34:49.000Z
|
2021-06-10T21:07:06.000Z
|
AI_News/apps/app_funthing/apps.py
|
puxiaoshuai/News
|
fcfe09883e489777dfbcc7a882bf52aa195054f1
|
[
"MIT"
] | 1
|
2019-01-15T09:35:31.000Z
|
2019-01-15T09:35:31.000Z
|
from django.apps import AppConfig
class AppFunthingConfig(AppConfig):
name = 'app_funthing'
| 16.333333
| 35
| 0.77551
| 11
| 98
| 6.818182
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.153061
| 98
| 5
| 36
| 19.6
| 0.903614
| 0
| 0
| 0
| 0
| 0
| 0.122449
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
0903d23e39c69c82a1ee9c1334a837a70ee23445
| 111
|
py
|
Python
|
b2/config.py
|
yifanwu/b2
|
3dc11605a365a28ed07c8a2b253ff87fa43e549d
|
[
"Apache-2.0"
] | 41
|
2020-07-16T21:33:11.000Z
|
2021-12-12T13:21:34.000Z
|
b2/config.py
|
ucbrise/b2
|
69bb1b5a40e895e91829404e2f1c46d81ff54ae2
|
[
"Apache-2.0"
] | 4
|
2020-08-18T22:05:21.000Z
|
2021-04-27T07:59:40.000Z
|
b2/config.py
|
yifanwu/midas
|
3dc11605a365a28ed07c8a2b253ff87fa43e549d
|
[
"Apache-2.0"
] | 4
|
2020-07-08T15:27:50.000Z
|
2021-05-12T17:41:08.000Z
|
class MidasConfig(object):
def __init__(self, linked: bool):
self.linked = linked
IS_DEBUG = True
| 18.5
| 37
| 0.675676
| 14
| 111
| 5
| 0.785714
| 0.285714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.225225
| 111
| 6
| 38
| 18.5
| 0.813953
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
090c269665b91af144f8e5e1368dd4c8fb1cf96a
| 265
|
py
|
Python
|
mocha/signals.py
|
mardix/Mocha
|
bce481cb31a0972061dd99bc548701411dcb9de3
|
[
"MIT"
] | 7
|
2017-05-14T02:21:48.000Z
|
2020-11-07T20:12:01.000Z
|
mocha/signals.py
|
mardix/Mocha
|
bce481cb31a0972061dd99bc548701411dcb9de3
|
[
"MIT"
] | 6
|
2019-11-04T02:52:17.000Z
|
2021-05-06T19:00:33.000Z
|
mocha/signals.py
|
mardix/Mocha
|
bce481cb31a0972061dd99bc548701411dcb9de3
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
from . import decorators as deco
@deco.emit_signal()
def upload_file(change):
return change()
@deco.emit_signal()
def delete_file(change):
return change()
@deco.emit_signal()
def send_mail(change, **kwargs):
return change()
| 15.588235
| 32
| 0.683019
| 36
| 265
| 4.861111
| 0.527778
| 0.137143
| 0.24
| 0.291429
| 0.445714
| 0.445714
| 0.445714
| 0.445714
| 0
| 0
| 0
| 0.004525
| 0.166038
| 265
| 16
| 33
| 16.5625
| 0.78733
| 0.079245
| 0
| 0.6
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.3
| false
| 0
| 0.1
| 0.3
| 0.7
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 4
|
0918eb309846160b0189b5a6831a8b2f23578581
| 136
|
py
|
Python
|
pilapse/logger.py
|
git-akihakune/pilapse
|
2e2cb99e074b5b234c3d8816d421e3d24909e2e6
|
[
"MIT"
] | null | null | null |
pilapse/logger.py
|
git-akihakune/pilapse
|
2e2cb99e074b5b234c3d8816d421e3d24909e2e6
|
[
"MIT"
] | null | null | null |
pilapse/logger.py
|
git-akihakune/pilapse
|
2e2cb99e074b5b234c3d8816d421e3d24909e2e6
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python3
from .arguments import arguments
from .interface import logger
logging = logger(verbose=arguments['--verbose'])
| 22.666667
| 48
| 0.772059
| 17
| 136
| 6.176471
| 0.647059
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.008197
| 0.102941
| 136
| 6
| 48
| 22.666667
| 0.852459
| 0.154412
| 0
| 0
| 0
| 0
| 0.078261
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
0958761a264c5764bd76b78ed887155e16b45dc0
| 289
|
py
|
Python
|
commonutils/color.py
|
NumenCyberLabs/bypass403
|
9b9734937a6f43c56ab939e915a43f2d8a3078b5
|
[
"MIT"
] | 2
|
2021-10-14T18:26:27.000Z
|
2021-10-21T03:22:44.000Z
|
commonutils/color.py
|
NumenCyberLabs/bypass403
|
9b9734937a6f43c56ab939e915a43f2d8a3078b5
|
[
"MIT"
] | null | null | null |
commonutils/color.py
|
NumenCyberLabs/bypass403
|
9b9734937a6f43c56ab939e915a43f2d8a3078b5
|
[
"MIT"
] | null | null | null |
# coding:utf-8
def redprint(str):
print("\033[1;31m {0}\033[0m".format(str))
def greenprint(str):
print("\033[1;32m {0}\033[0m".format(str))
def blueprint(str):
print("\033[1;34m {0}\033[0m".format(str))
def yellowprint(str):
print("\033[1;33m {0}\033[0m".format(str))
| 20.642857
| 46
| 0.622837
| 51
| 289
| 3.529412
| 0.372549
| 0.177778
| 0.244444
| 0.266667
| 0.383333
| 0.3
| 0
| 0
| 0
| 0
| 0
| 0.179283
| 0.131488
| 289
| 13
| 47
| 22.230769
| 0.537849
| 0.041522
| 0
| 0
| 0
| 0
| 0.305455
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0
| 0.5
| 1
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
eebe2cc357b75e4d1564479138951b80ab9210ae
| 122
|
py
|
Python
|
ipywidgets/__init__.py
|
jakevdp/ipywidgets-unsupported
|
f45415931833d99bb069992a4b428b89a9ac905d
|
[
"BSD-3-Clause"
] | 23
|
2016-03-08T13:46:06.000Z
|
2021-11-16T11:47:57.000Z
|
ipywidgets/__init__.py
|
jeffhussmann/ipywidgets-unsupported
|
a1e889ed6af0e3607dfda55a5f3404140d1f56c2
|
[
"BSD-3-Clause"
] | 5
|
2015-01-27T12:31:40.000Z
|
2015-09-23T06:42:12.000Z
|
ipywidgets/__init__.py
|
jeffhussmann/ipywidgets-unsupported
|
a1e889ed6af0e3607dfda55a5f3404140d1f56c2
|
[
"BSD-3-Clause"
] | 7
|
2016-03-08T14:15:47.000Z
|
2021-08-29T03:46:16.000Z
|
__version__ = "0.0.1"
from .interact import StaticInteract
from .widgets import RadioWidget, RangeWidget, DropDownWidget
| 24.4
| 61
| 0.811475
| 14
| 122
| 6.785714
| 0.785714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.027778
| 0.114754
| 122
| 4
| 62
| 30.5
| 0.851852
| 0
| 0
| 0
| 0
| 0
| 0.040984
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
eecb91332c330ac739addf74d5d192d4bf7174a7
| 261
|
py
|
Python
|
situacion_problema_1/palindorme.py
|
rafaeljimenez01/advanced-algos-project
|
95e09267761372de95074617c4b76f9287c54e9f
|
[
"MIT"
] | null | null | null |
situacion_problema_1/palindorme.py
|
rafaeljimenez01/advanced-algos-project
|
95e09267761372de95074617c4b76f9287c54e9f
|
[
"MIT"
] | null | null | null |
situacion_problema_1/palindorme.py
|
rafaeljimenez01/advanced-algos-project
|
95e09267761372de95074617c4b76f9287c54e9f
|
[
"MIT"
] | 1
|
2021-09-09T01:28:16.000Z
|
2021-09-09T01:28:16.000Z
|
class Palindrome:
def __init__(self, word, start, end):
self.word = word
self.start = int(start / 2)
self.end = int(end / 2)
def __str__(self):
return self.word + " " + str(self.start) + " " + str(self.end) + "\n"
| 32.625
| 77
| 0.524904
| 34
| 261
| 3.794118
| 0.382353
| 0.186047
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.011236
| 0.318008
| 261
| 8
| 77
| 32.625
| 0.713483
| 0
| 0
| 0
| 0
| 0
| 0.015686
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0
| 0
| 0.142857
| 0.571429
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
eed6a07a200f0460162ed8c176e96edd24bb33a4
| 624
|
py
|
Python
|
metric_learn/eye/EyeAlgorithm.py
|
johncollins/metric-learn
|
01746ec3ce9f7039900cd50be48ef6fa0d3ed1b9
|
[
"BSD-2-Clause"
] | 4
|
2015-02-02T21:49:27.000Z
|
2018-07-05T04:16:50.000Z
|
metric_learn/eye/EyeAlgorithm.py
|
johncollins/metric-learn
|
01746ec3ce9f7039900cd50be48ef6fa0d3ed1b9
|
[
"BSD-2-Clause"
] | null | null | null |
metric_learn/eye/EyeAlgorithm.py
|
johncollins/metric-learn
|
01746ec3ce9f7039900cd50be48ef6fa0d3ed1b9
|
[
"BSD-2-Clause"
] | null | null | null |
"""
@date: 5/27/2013
@author: John Collins
EyeAlgorithm
-------------------
Learn the identity matrix. For testing and comparison.
"""
import numpy as np
from ..MetricLearningAlgorithm import MetricLearningAlgorithm
class EyeAlgorithm(MetricLearningAlgorithm):
"""
Learn the identity matrix. For testing and comparison.
"""
def set_default_parameters(self):
pass
def run_algorithm_specific_setup(self):
pass
def learn_metric(self):
"""
"Learn" the identity matrix
"""
return np.eye(np.array(self.X).shape[1])
| 20.8
| 62
| 0.613782
| 65
| 624
| 5.8
| 0.615385
| 0.06366
| 0.127321
| 0.175066
| 0.238727
| 0.238727
| 0.238727
| 0.238727
| 0
| 0
| 0
| 0.017544
| 0.269231
| 624
| 29
| 63
| 21.517241
| 0.809211
| 0.336538
| 0
| 0.222222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0.222222
| 0.222222
| 0
| 0.777778
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
e101984cd830c97ed21423cc10f1cb5ba3f5de53
| 6,741
|
py
|
Python
|
pmhcmdsapp/app/models.py
|
brenwickham/pmhc-mds
|
077c0155f1c2820e7b163cca9375166902c4d372
|
[
"CC0-1.0"
] | null | null | null |
pmhcmdsapp/app/models.py
|
brenwickham/pmhc-mds
|
077c0155f1c2820e7b163cca9375166902c4d372
|
[
"CC0-1.0"
] | null | null | null |
pmhcmdsapp/app/models.py
|
brenwickham/pmhc-mds
|
077c0155f1c2820e7b163cca9375166902c4d372
|
[
"CC0-1.0"
] | null | null | null |
import os
import base64
from datetime import datetime, timedelta
from operator import attrgetter, itemgetter
from flask import current_app
from werkzeug.security import generate_password_hash, check_password_hash
from flask_login import UserMixin
import sqlalchemy as sa
from sqlalchemy_continuum.plugins import FlaskPlugin
from sqlalchemy_continuum import make_versioned
from app import login #, db
#This line critical, it's required for sqlalchemy_continuum versioning:
make_versioned(plugins=[FlaskPlugin()])
#Extending a class from this class enables get_dict automatically, returning column names and field values:
class BaseModel(object):
@classmethod
def _get_keys(cls):
return db.class_mapper(cls).c.keys()
def get_dict(self):
d = {}
for k in self._get_keys():
d[k] = getattr(self, k)
return d
#Suggestion to use, and explaination of, CRUDMixin comes from https://realpython.com/python-web-applications-with-flask-part-ii/
#Customisations from original CRUDMixin:
# - added fill_with_formdata method (so it's easy to pass the class back to a form that failed validation).
# class CRUDMixin(object):
# __table_args__ = {'extend_existing': True}
# id = db.Column(db.Integer, primary_key=True)
# @classmethod
# def get_by_id(cls, id):
# if any(
# (
# isinstance(id, str) and id.isdigit(),
# isinstance(id, (int, float))
# ),
# ):
# return cls.query.get(int(id))
# return None
# @classmethod
# def create(cls, **kwargs):
# classdict = {k: v for k, v in kwargs.items() if k in cls._get_keys()}
# instance = cls(**classdict)
# return instance.save()
# def update(self, commit=True, **kwargs):
# for attr, value in kwargs.items():
# setattr(self, attr, value)
# return commit and self.save() or self
# def save(self, commit=True):
# db.session.add(self)
# if commit:
# db.session.commit()
# return self
# def delete(self, commit=True):
# db.session.delete(self)
# return commit and db.session.commit()
# @classmethod
# def fill_with_formdata(cls, formdata):
# classdict = {k: v for k, v in formdata.items() if k in cls._get_keys()}
# return cls(**classdict)
# class User(BaseModel, UserMixin, db.Model):
# __tablename__ = 'user'
# __versioned__ = {}
# id = db.Column(db.Integer, primary_key=True, autoincrement=True)
# email = db.Column(db.String(120), index=True, unique=True)
# firstname = db.Column(db.String(64), index=True, )
# surname = db.Column(db.String(64), index=True, )
# password_hash = db.Column(db.String(128))
# password_expired = db.Column(db.Boolean, default=False)
# is_admin = db.Column(db.Boolean ,default=False)
# is_active = db.Column(db.Boolean, default=True)
# token = db.Column(db.String(32), index=True, unique=True)
# token_expiration = db.Column(db.DateTime)
# # roles = db.relationship("UserRole")
# # currentorganisation_id = db.Column(db.Integer, db.ForeignKey("organisation.id"), index=True)
# # currentorganisation = db.relationship("app.models.Organisation", backref=db.backref("currentorganisation"))
# def set_password(self, password):
# self.password_hash = generate_password_hash(password)
# def check_password(self, password):
# return check_password_hash(self.password_hash, password)
# def get_token(self, expires_in=3600):
# now = datetime.utcnow()
# if self.token and self.token_expiration > now + timedelta(seconds=60):
# return self.token
# self.token = base64.b64encode(os.urandom(24)).decode('utf-8')
# self.token_expiration = now + timedelta(seconds=expires_in)
# db.session.add(self)
# return self.token
# def revoke_token(self):
# self.token_expiration = datetime.utcnow() - timedelta(seconds=1)
# @staticmethod
# def check_token(token):
# user = User.query.filter_by(token=token).first()
# if user is None or user.token_expiration < datetime.utcnow():
# return None
# return user
# def rolelist(self):
# return [r.role_id for r in self.roles]
# def can_delete(self):
# #If user is in Admin (2) role, then they can delete:
# if set(self.rolelist()).intersection(set([2])):
# return True
# else:
# return False
@login.user_loader
def load_user(id):
return None #User.query.get(int(id))
# class Announcement(BaseModel, db.Model):
# __tablename__ = 'announcement'
# __versioned__ = {}
# id = db.Column(db.Integer, primary_key=True, autoincrement=True)
# subject = db.Column(db.String(120))
# announcement = db.Column(db.Text())
# announcementdate = db.Column(db.Date)
# type = db.Column(db.Integer,default=1)
# status = db.Column(db.Integer,default=1)
# class Role(BaseModel, db.Model):
# __tablename__ = 'role'
# __versioned__ = {}
# id = db.Column(db.Integer, primary_key=True)
# rolename = db.Column(db.String(120))
# class UserRole(db.Model):
# __versioned__ = {}
# user_id = db.Column(db.Integer, db.ForeignKey(User.id), primary_key=True)
# role_id = db.Column(db.Integer, db.ForeignKey(Role.id), primary_key=True)
# # role = db.relationship(Role, backref=db.backref("role_assoc"))
# # user = db.relationship(User, backref=db.backref("user_assoc"))
# class UserOrganisation(BaseModel, db.Model):
# __tablename__ = 'user_organisation'
# __versioned__ = {}
# user_id = db.Column(db.Integer, db.ForeignKey("user.id"), primary_key=True)
# organisation_id = db.Column(db.Integer, db.ForeignKey("organisation.id"), primary_key=True)
# # user = db.relationship("app.models.User", backref=db.backref("user2_assoc"))
# # organisation = db.relationship("app.models.Organisation", backref=db.backref("userorg_assoc"))
# class Organisation(BaseModel, db.Model, CRUDMixin):
# __tablename__ = 'organisation'
# __versioned__ = {}
# id = db.Column(db.Integer, primary_key=True, autoincrement=True)
# name = db.Column(db.String(255), nullable=False)
# type = db.Column(db.SmallInteger)
# # users = db.relationship(UserOrganisation, backref=db.backref("users"))
#Lookups:
# class lkup_example(BaseModel, db.Model):
# id = db.Column(db.SmallInteger, primary_key=True, autoincrement=False)
# example = db.Column(db.String(150))
#This line critical. It configures the sqlalchemy_continuum versioning:
sa.orm.configure_mappers()
| 33.874372
| 128
| 0.657024
| 845
| 6,741
| 5.089941
| 0.254438
| 0.053941
| 0.067426
| 0.047431
| 0.249244
| 0.214136
| 0.184841
| 0.132992
| 0.101604
| 0.070914
| 0
| 0.008486
| 0.213321
| 6,741
| 198
| 129
| 34.045455
| 0.802565
| 0.838451
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.12
| false
| 0.04
| 0.44
| 0.08
| 0.72
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
e10a01e290038823acec96e0b62f2a39baf7d1d6
| 68
|
py
|
Python
|
build/lib/ms_tools/__init__.py
|
michaelsilverstein/ms_tools
|
3e3e7438245e37d19d8c7959df4daaa4e67551c8
|
[
"MIT"
] | 1
|
2021-11-06T13:37:27.000Z
|
2021-11-06T13:37:27.000Z
|
ms_tools/__init__.py
|
michaelsilverstein/ms_tools
|
3e3e7438245e37d19d8c7959df4daaa4e67551c8
|
[
"MIT"
] | null | null | null |
ms_tools/__init__.py
|
michaelsilverstein/ms_tools
|
3e3e7438245e37d19d8c7959df4daaa4e67551c8
|
[
"MIT"
] | null | null | null |
__version__ = '0.2.1'
from .composition import *
from .viz import *
| 17
| 26
| 0.705882
| 10
| 68
| 4.4
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.052632
| 0.161765
| 68
| 4
| 27
| 17
| 0.719298
| 0
| 0
| 0
| 0
| 0
| 0.072464
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
0113559a4b1f14e72b1506cd7bb70ba5f7a4c514
| 73
|
py
|
Python
|
Advanced/pianoTilesBot/mousePosition.py
|
Sanjulata19/Hacktoberfest_2021-1
|
720855c9e7e3d1ca04d409cc7defb29381e4a16a
|
[
"Apache-2.0"
] | 1
|
2021-10-31T14:33:09.000Z
|
2021-10-31T14:33:09.000Z
|
Advanced/pianoTilesBot/mousePosition.py
|
Sanjulata19/Hacktoberfest_2021-1
|
720855c9e7e3d1ca04d409cc7defb29381e4a16a
|
[
"Apache-2.0"
] | 4
|
2021-10-30T06:51:56.000Z
|
2021-10-30T06:58:35.000Z
|
Advanced/pianoTilesBot/mousePosition.py
|
Sanjulata19/Hacktoberfest_2021-1
|
720855c9e7e3d1ca04d409cc7defb29381e4a16a
|
[
"Apache-2.0"
] | 19
|
2021-10-30T06:23:49.000Z
|
2021-10-31T14:51:04.000Z
|
import pyautogui as gui
while(input() == 'y'):
print(gui.position())
| 18.25
| 25
| 0.643836
| 10
| 73
| 4.7
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.164384
| 73
| 4
| 25
| 18.25
| 0.770492
| 0
| 0
| 0
| 0
| 0
| 0.013514
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0.333333
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
011ae45320a061d41cf9c9cf27bdb4e55f996cd6
| 269
|
py
|
Python
|
ethinjest/__init__.py
|
agonopol/ethscan
|
e1c1433458e92a35b4729809bdf8e77f95ef32cd
|
[
"MIT"
] | null | null | null |
ethinjest/__init__.py
|
agonopol/ethscan
|
e1c1433458e92a35b4729809bdf8e77f95ef32cd
|
[
"MIT"
] | null | null | null |
ethinjest/__init__.py
|
agonopol/ethscan
|
e1c1433458e92a35b4729809bdf8e77f95ef32cd
|
[
"MIT"
] | 2
|
2019-06-04T11:51:34.000Z
|
2019-06-04T15:51:38.000Z
|
from ethinjest.model import Status
from ethinjest.ethscan import balance, transactions
from datetime import datetime
def status(address, asof=datetime.now()):
return Status(address=address, balance=balance(address), transactions=transactions(address), asof=asof)
| 33.625
| 107
| 0.810409
| 33
| 269
| 6.606061
| 0.424242
| 0.119266
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.100372
| 269
| 7
| 108
| 38.428571
| 0.900826
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.6
| 0.2
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 4
|
0140db0ade6d7c418bcbe4f429b83edc74c99322
| 217
|
py
|
Python
|
pesquisa_e_ordenacao/utils/elementGenerator.py
|
Rudigus/besteirinhas-python
|
70f93dd522770a46966656980cd9f0d559aa8b0f
|
[
"MIT"
] | null | null | null |
pesquisa_e_ordenacao/utils/elementGenerator.py
|
Rudigus/besteirinhas-python
|
70f93dd522770a46966656980cd9f0d559aa8b0f
|
[
"MIT"
] | null | null | null |
pesquisa_e_ordenacao/utils/elementGenerator.py
|
Rudigus/besteirinhas-python
|
70f93dd522770a46966656980cd9f0d559aa8b0f
|
[
"MIT"
] | null | null | null |
import random
from .element import Element
def getRandomRepeatingListWithRange(elementCount, elementRange):
intList = [Element(random.randint(0, elementRange - 1), i) for i in range(elementCount)]
return intList
| 31
| 90
| 0.792627
| 25
| 217
| 6.88
| 0.68
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.010526
| 0.124424
| 217
| 6
| 91
| 36.166667
| 0.894737
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.4
| 0
| 0.8
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
6d736519506159e2f6862cc9d01888b1f180caa0
| 126
|
py
|
Python
|
django_flow/signals.py
|
dalou/django-flow
|
9b3de6ea597e3da420948a55735c4b2799419dfb
|
[
"BSD-3-Clause"
] | 8
|
2015-10-13T04:54:26.000Z
|
2019-07-09T10:41:18.000Z
|
django_flow/signals.py
|
dalou/django-flow
|
9b3de6ea597e3da420948a55735c4b2799419dfb
|
[
"BSD-3-Clause"
] | null | null | null |
django_flow/signals.py
|
dalou/django-flow
|
9b3de6ea597e3da420948a55735c4b2799419dfb
|
[
"BSD-3-Clause"
] | null | null | null |
import django.dispatch
# USERS
flow_user_disconnected = django.dispatch.Signal(providing_args=["user_pk", "data", "kwargs"])
| 25.2
| 93
| 0.777778
| 16
| 126
| 5.875
| 0.8125
| 0.297872
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.079365
| 126
| 5
| 93
| 25.2
| 0.810345
| 0.039683
| 0
| 0
| 0
| 0
| 0.142857
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
6d972b9c6e23fff5e5133ab224b5923267bd83b8
| 65
|
py
|
Python
|
examples/int.from_bytes/ex3.py
|
mcorne/python-by-example
|
15339c0909c84b51075587a6a66391100971c033
|
[
"MIT"
] | null | null | null |
examples/int.from_bytes/ex3.py
|
mcorne/python-by-example
|
15339c0909c84b51075587a6a66391100971c033
|
[
"MIT"
] | null | null | null |
examples/int.from_bytes/ex3.py
|
mcorne/python-by-example
|
15339c0909c84b51075587a6a66391100971c033
|
[
"MIT"
] | null | null | null |
print(int.from_bytes(b'\xfc\x00', byteorder='big', signed=True))
| 32.5
| 64
| 0.723077
| 11
| 65
| 4.181818
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.032258
| 0.046154
| 65
| 1
| 65
| 65
| 0.709677
| 0
| 0
| 0
| 0
| 0
| 0.169231
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
6da26902a0909ed83458d8e324c1541dbd310057
| 9
|
py
|
Python
|
src/application/detect-by-video.py
|
hconcessa/mask-person-identifier
|
0568a061e7b71509cdded3025807480cf9a3b02c
|
[
"MIT"
] | null | null | null |
src/application/detect-by-video.py
|
hconcessa/mask-person-identifier
|
0568a061e7b71509cdded3025807480cf9a3b02c
|
[
"MIT"
] | null | null | null |
src/application/detect-by-video.py
|
hconcessa/mask-person-identifier
|
0568a061e7b71509cdded3025807480cf9a3b02c
|
[
"MIT"
] | null | null | null |
# To do..
| 9
| 9
| 0.444444
| 2
| 9
| 2
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.222222
| 9
| 1
| 9
| 9
| 0.571429
| 0.777778
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
6da320aa7915c0112040163f0935205824abaa36
| 63
|
py
|
Python
|
backend/project/conversations/__init__.py
|
winoutt/winoutt-django
|
f48dfd933b3c12286f973701676eb2c2ab2bff73
|
[
"MIT"
] | null | null | null |
backend/project/conversations/__init__.py
|
winoutt/winoutt-django
|
f48dfd933b3c12286f973701676eb2c2ab2bff73
|
[
"MIT"
] | null | null | null |
backend/project/conversations/__init__.py
|
winoutt/winoutt-django
|
f48dfd933b3c12286f973701676eb2c2ab2bff73
|
[
"MIT"
] | null | null | null |
# default_app_config = 'conversations.apps.ConversationsConfig'
| 63
| 63
| 0.857143
| 6
| 63
| 8.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.047619
| 63
| 1
| 63
| 63
| 0.866667
| 0.968254
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
6dac62da79032108241b1ac39c624a45d22206b2
| 174
|
py
|
Python
|
reports/runtests/example/models.py
|
IgorBwork/django-libreport
|
c3b08702e7b1d27f3a69f9c0a03bb60084d40b08
|
[
"MIT"
] | 2
|
2018-09-07T09:49:27.000Z
|
2020-10-01T20:48:13.000Z
|
reports/runtests/example/models.py
|
IgorBwork/django-libreport
|
c3b08702e7b1d27f3a69f9c0a03bb60084d40b08
|
[
"MIT"
] | 9
|
2018-05-15T15:56:47.000Z
|
2021-04-16T17:07:45.000Z
|
reports/runtests/example/models.py
|
IgorBwork/django-libreport
|
c3b08702e7b1d27f3a69f9c0a03bb60084d40b08
|
[
"MIT"
] | 4
|
2018-07-12T21:21:52.000Z
|
2019-12-12T21:02:08.000Z
|
from django.db import models
class Organization(models.Model):
"""
Customer's Organization Model
"""
name = models.CharField(unique=True, max_length=1024)
| 17.4
| 57
| 0.695402
| 21
| 174
| 5.714286
| 0.809524
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.028571
| 0.195402
| 174
| 9
| 58
| 19.333333
| 0.828571
| 0.166667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
6ddb40d80652eb46b9339f3cdbdb51775427f314
| 125
|
py
|
Python
|
com_cards/run.py
|
BjohnShawL/ComRepo
|
8ffd9a3b4d684ad8dd6744eacae7543431c316d3
|
[
"MIT"
] | null | null | null |
com_cards/run.py
|
BjohnShawL/ComRepo
|
8ffd9a3b4d684ad8dd6744eacae7543431c316d3
|
[
"MIT"
] | null | null | null |
com_cards/run.py
|
BjohnShawL/ComRepo
|
8ffd9a3b4d684ad8dd6744eacae7543431c316d3
|
[
"MIT"
] | null | null | null |
"""Runs the application"""
from tags_registry import APP
print("hello world")
APP.run(host='0.0.0.0', port=80, debug=True)
| 17.857143
| 44
| 0.704
| 22
| 125
| 3.954545
| 0.818182
| 0.068966
| 0.068966
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.054054
| 0.112
| 125
| 6
| 45
| 20.833333
| 0.72973
| 0.16
| 0
| 0
| 0
| 0
| 0.181818
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0.333333
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
6de97fbe3e6512c175c4ee7af5bb0dc7e585db40
| 8,922
|
py
|
Python
|
ros_bt_py/test/unittest/test_compare.py
|
fzi-forschungszentrum-informatik/ros_bt_py
|
ed65e2b2f0a03411101f455c0ab38401ba50bada
|
[
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] | 4
|
2022-03-11T14:30:43.000Z
|
2022-03-31T07:21:35.000Z
|
ros_bt_py/test/unittest/test_compare.py
|
fzi-forschungszentrum-informatik/ros_bt_py
|
ed65e2b2f0a03411101f455c0ab38401ba50bada
|
[
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null |
ros_bt_py/test/unittest/test_compare.py
|
fzi-forschungszentrum-informatik/ros_bt_py
|
ed65e2b2f0a03411101f455c0ab38401ba50bada
|
[
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null |
# -------- BEGIN LICENSE BLOCK --------
# Copyright 2022 FZI Forschungszentrum Informatik
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# * Neither the name of the {copyright_holder} nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
# -------- END LICENSE BLOCK --------
import unittest
from ros_bt_py_msgs.msg import Node as NodeMsg
from ros_bt_py.exceptions import BehaviorTreeException
from ros_bt_py.nodes.compare import Compare, CompareNewOnly, CompareConstant
from ros_bt_py.nodes.compare import ALessThanB, LessThanConstant
class TestCompare(unittest.TestCase):
def setUp(self):
self.compare = Compare({'compare_type': int})
self.compare.setup()
self.compare.inputs['a'] = 42
self.compare.inputs['b'] = 42
def testResult(self):
# Both inputs are set, we should have an output
self.compare.tick()
self.assertEqual(self.compare.state, NodeMsg.SUCCEEDED)
# Another tick, same result
self.compare.tick()
self.assertEqual(self.compare.state, NodeMsg.SUCCEEDED)
self.compare.inputs['b'] = 41
# 'in' changed, so we get a different result, FAILED
self.compare.tick()
self.assertEqual(self.compare.state, NodeMsg.FAILED)
def testReset(self):
# Start as before, 42 == 42
self.compare.tick()
self.assertEqual(self.compare.state, NodeMsg.SUCCEEDED)
self.compare.reset()
self.assertEqual(self.compare.state, NodeMsg.IDLE)
# Neither of the inputs have updated, so ticking fails
self.compare.tick()
self.assertEqual(self.compare.state, NodeMsg.FAILED)
# If we update the inputs, the result changes to SUCCEEDED
self.compare.inputs['a'] = 42
self.compare.inputs['b'] = 42
self.compare.tick()
self.assertEqual(self.compare.state, NodeMsg.SUCCEEDED)
def testUntick(self):
self.compare.untick()
self.assertEqual(self.compare.state, NodeMsg.IDLE)
def testShutdown(self):
self.compare.shutdown()
self.assertEqual(self.compare.state, NodeMsg.SHUTDOWN)
class TestCompareNewOnly(unittest.TestCase):
def setUp(self):
self.compare = CompareNewOnly({'compare_type': int})
self.compare.setup()
self.compare.inputs['a'] = 42
self.compare.inputs['b'] = 42
def testResult(self):
# Both inputs are set, we should have an output
self.compare.tick()
self.assertEqual(self.compare.state, NodeMsg.SUCCEEDED)
# Another tick, inputs were not updated => RUNNING
self.compare.tick()
self.assertEqual(self.compare.state, NodeMsg.RUNNING)
self.compare.inputs['b'] = 41
# 'in' changed, so we get a different result, FAILED
self.compare.tick()
self.assertEqual(self.compare.state, NodeMsg.FAILED)
def testReset(self):
# Start as before, 42 == 42
self.compare.tick()
self.assertEqual(self.compare.state, NodeMsg.SUCCEEDED)
self.compare.reset()
self.assertEqual(self.compare.state, NodeMsg.IDLE)
# Neither of the inputs have updated, so the node stays
# RUNNING
self.compare.tick()
self.assertEqual(self.compare.state, NodeMsg.RUNNING)
# If we update the inputs, the result changes to SUCCEEDED
self.compare.inputs['a'] = 42
self.compare.inputs['b'] = 42
self.compare.tick()
self.assertEqual(self.compare.state, NodeMsg.SUCCEEDED)
def testUntick(self):
self.compare.untick()
self.assertEqual(self.compare.state, NodeMsg.IDLE)
def testShutdown(self):
self.compare.shutdown()
self.assertEqual(self.compare.state, NodeMsg.SHUTDOWN)
class TestCompareConstant(unittest.TestCase):
def setUp(self):
self.compare = CompareConstant({'compare_type': int,
'expected': 5})
self.compare.setup()
self.compare.inputs['in'] = 5
def testResult(self):
# Both inputs are set, we should have an output
self.compare.tick()
self.assertEqual(self.compare.state, NodeMsg.SUCCEEDED)
# Another tick, same result
self.compare.tick()
self.assertEqual(self.compare.state, NodeMsg.SUCCEEDED)
self.compare.inputs['in'] = 41
# 'in' changed, so we get a different result, FAILED
self.compare.tick()
self.assertEqual(self.compare.state, NodeMsg.FAILED)
def testReset(self):
# Start as before, 42 == 42
self.compare.tick()
self.assertEqual(self.compare.state, NodeMsg.SUCCEEDED)
self.compare.reset()
self.assertEqual(self.compare.state, NodeMsg.IDLE)
# The input hasn't updated yet, so ticking fails
self.compare.tick()
self.assertEqual(self.compare.state, NodeMsg.FAILED)
# If we update the input, the result changes to SUCCEEDED
self.compare.inputs['in'] = 5
self.compare.tick()
self.assertEqual(self.compare.state, NodeMsg.SUCCEEDED)
def testUntick(self):
self.compare.untick()
self.assertEqual(self.compare.state, NodeMsg.IDLE)
def testShutdown(self):
self.compare.shutdown()
self.assertEqual(self.compare.state, NodeMsg.SHUTDOWN)
class TestLessThan(unittest.TestCase):
def testALessThanB(self):
less_than = ALessThanB()
less_than.setup()
with self.assertRaises(ValueError):
less_than.tick()
less_than.inputs['a'] = 42
less_than.inputs['b'] = 42
self.assertEqual(less_than.tick(), NodeMsg.FAILED)
less_than.inputs['a'] = 100
self.assertEqual(less_than.tick(), NodeMsg.FAILED)
less_than.inputs['a'] = 1
self.assertEqual(less_than.tick(), NodeMsg.SUCCEEDED)
less_than.reset()
self.assertEqual(less_than.state, NodeMsg.IDLE)
# Neither of the inputs have updated, so ticking fails
less_than.tick()
self.assertEqual(less_than.state, NodeMsg.FAILED)
# If we update the inputs, the result changes to SUCCEEDED
less_than.inputs['a'] = 1
less_than.inputs['b'] = 42
less_than.tick()
self.assertEqual(less_than.state, NodeMsg.SUCCEEDED)
less_than.untick()
self.assertEqual(less_than.state, NodeMsg.IDLE)
less_than.shutdown()
self.assertEqual(less_than.state, NodeMsg.SHUTDOWN)
def testLessThanConstant(self):
less_than = LessThanConstant({'target': 42})
less_than.setup()
with self.assertRaises(ValueError):
less_than.tick()
less_than.inputs['a'] = 42
self.assertEqual(less_than.tick(), NodeMsg.FAILED)
less_than.inputs['a'] = 100
self.assertEqual(less_than.tick(), NodeMsg.FAILED)
less_than.inputs['a'] = 1
self.assertEqual(less_than.tick(), NodeMsg.SUCCEEDED)
less_than.reset()
self.assertEqual(less_than.state, NodeMsg.IDLE)
# Neither of the inputs have updated, so ticking fails
less_than.tick()
self.assertEqual(less_than.state, NodeMsg.FAILED)
# If we update the inputs, the result changes to SUCCEEDED
less_than.inputs['a'] = 1
less_than.tick()
self.assertEqual(less_than.state, NodeMsg.SUCCEEDED)
less_than.untick()
self.assertEqual(less_than.state, NodeMsg.IDLE)
less_than.shutdown()
self.assertEqual(less_than.state, NodeMsg.SHUTDOWN)
| 35.545817
| 77
| 0.665882
| 1,095
| 8,922
| 5.375342
| 0.189954
| 0.136425
| 0.087156
| 0.119266
| 0.74227
| 0.728678
| 0.723072
| 0.69334
| 0.685865
| 0.685865
| 0
| 0.008917
| 0.233244
| 8,922
| 250
| 78
| 35.688
| 0.851484
| 0.291527
| 0
| 0.875
| 0
| 0
| 0.012127
| 0
| 0
| 0
| 0
| 0
| 0.3125
| 1
| 0.118056
| false
| 0
| 0.034722
| 0
| 0.180556
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
6ded9f9daf2ff2b6cb05f2ded22c8e0b50b96cc5
| 744
|
py
|
Python
|
9_functions/6_goThrough.py
|
qaidjohar/PythonCourse
|
6c638f8a1e1172eb12459c0fd6dc20e0590825b8
|
[
"MIT"
] | null | null | null |
9_functions/6_goThrough.py
|
qaidjohar/PythonCourse
|
6c638f8a1e1172eb12459c0fd6dc20e0590825b8
|
[
"MIT"
] | null | null | null |
9_functions/6_goThrough.py
|
qaidjohar/PythonCourse
|
6c638f8a1e1172eb12459c0fd6dc20e0590825b8
|
[
"MIT"
] | null | null | null |
# def math(num1, num2, operation='add'):
# if(operation == "mult"):
# return num1 * num2
# if(operation == "div"):
# return num1 / num2
# if(operation == "sub"):
# return num1 - num2
# if(operation == "add"):
# return num1 + num2
# else:
# print("not a valid opreation")
# num1 = int(input("input number1:"))
# num2 = int(input("input number2:"))
# operation = input("write the opreation :add,sub,mult,div:")
# val = math(num1, num2, operation)
# print(val)
# num1 and num2 are parameters
# def add(num1, num2):
# return num1 + num2
# 100 and 20 are arguments
# x = add(100, 20)
# print(x)
def multiply(num1, num2):
return num1 * num2
y = multiply(10, 20)
print(y)
| 19.578947
| 61
| 0.577957
| 98
| 744
| 4.387755
| 0.346939
| 0.186047
| 0.195349
| 0.111628
| 0.276744
| 0
| 0
| 0
| 0
| 0
| 0
| 0.072464
| 0.258065
| 744
| 37
| 62
| 20.108108
| 0.706522
| 0.818548
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 0.25
| 0.5
| 0.25
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 4
|
6dfd6a7ebe25ebf5a26d90a37fe1c79d9ada503d
| 284
|
py
|
Python
|
API/__init__.py
|
ArgonDesign/gumpifier
|
593e6b4cc661e8399ff8eb0457aaecfc97f84af8
|
[
"MIT"
] | 1
|
2018-12-09T17:06:40.000Z
|
2018-12-09T17:06:40.000Z
|
API/__init__.py
|
ArgonDesign/gumpifier
|
593e6b4cc661e8399ff8eb0457aaecfc97f84af8
|
[
"MIT"
] | null | null | null |
API/__init__.py
|
ArgonDesign/gumpifier
|
593e6b4cc661e8399ff8eb0457aaecfc97f84af8
|
[
"MIT"
] | 1
|
2019-02-14T04:10:53.000Z
|
2019-02-14T04:10:53.000Z
|
# See here for a good tutorial on imports: https://chrisyeh96.github.io/2017/08/08/definitive-guide-python-imports.html
# We use a modified version of workaround 2 in case example 2.
import sys, os
sys.path.append(os.path.dirname(os.path.realpath(__file__)))
from . import API
| 40.571429
| 120
| 0.757042
| 48
| 284
| 4.395833
| 0.791667
| 0.056872
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.04878
| 0.133803
| 284
| 7
| 121
| 40.571429
| 0.808943
| 0.626761
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
09b28d1441544ea78bea7a7c0f543e853d8d2b17
| 99
|
py
|
Python
|
src/BribeNet/graph/temporal/action/actionType.py
|
RobMurray98/BribeNet
|
09ddd8f15d9ab5fac44ae516ed92c6ba5e5119bc
|
[
"MIT"
] | null | null | null |
src/BribeNet/graph/temporal/action/actionType.py
|
RobMurray98/BribeNet
|
09ddd8f15d9ab5fac44ae516ed92c6ba5e5119bc
|
[
"MIT"
] | null | null | null |
src/BribeNet/graph/temporal/action/actionType.py
|
RobMurray98/BribeNet
|
09ddd8f15d9ab5fac44ae516ed92c6ba5e5119bc
|
[
"MIT"
] | null | null | null |
import enum
@enum.unique
class ActionType(enum.Enum):
NONE = 0
BRIBED = 1
SELECT = 2
| 11
| 28
| 0.626263
| 14
| 99
| 4.428571
| 0.785714
| 0.258065
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.042254
| 0.282828
| 99
| 8
| 29
| 12.375
| 0.830986
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.166667
| 0
| 0.833333
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
09c1fb753f493272fad105cf97a0f3d4a1628027
| 1,550
|
py
|
Python
|
packages/pyright-internal/src/tests/samples/final2.py
|
Microsoft/pyright
|
adf7c3e92e4540d930e3652de3c1c335855af595
|
[
"MIT"
] | 3,934
|
2019-03-22T09:26:41.000Z
|
2019-05-06T21:03:08.000Z
|
packages/pyright-internal/src/tests/samples/final2.py
|
Microsoft/pyright
|
adf7c3e92e4540d930e3652de3c1c335855af595
|
[
"MIT"
] | 107
|
2019-03-24T04:09:37.000Z
|
2019-05-06T17:00:04.000Z
|
packages/pyright-internal/src/tests/samples/final2.py
|
Microsoft/pyright
|
adf7c3e92e4540d930e3652de3c1c335855af595
|
[
"MIT"
] | 119
|
2019-03-23T10:48:04.000Z
|
2019-05-06T08:57:56.000Z
|
# This sample tests the handling of the @final method decorator.
from typing import final
class ClassA:
def func1(self):
pass
@classmethod
def func2(cls):
pass
@final
def func3(self):
pass
@final
@classmethod
def func4(cls):
pass
@final
def _func5(self):
pass
@final
def __func6(self):
pass
# This should generate an error because func3 is final.
ClassA.func3 = lambda self: None
# This should generate an error because func4 is final.
ClassA.func4 = lambda cls: None
# This should generate an error because _func5 is final.
ClassA._func5 = lambda self: None
class ClassB(ClassA):
def func1(self):
pass
@classmethod
def func2(cls):
pass
# This should generate an error because func3 is
# defined as final.
def func3(self):
pass
# This should generate an error because func3 is
# defined as final.
@classmethod
def func4(cls):
pass
# This should generate an error because func3 is
# defined as final.
def _func5(self):
pass
# This should not generate an error because double
# underscore symbols are exempt from this check.
def __func6(self):
pass
class Base4:
...
class Base5:
@final
def __init__(self, v: int) -> None:
...
class C(Base4, Base5):
# This should generate an error because it overrides Base5,
# and __init__ is marked final there.
def __init__(self) -> None:
...
| 17.816092
| 64
| 0.622581
| 199
| 1,550
| 4.748744
| 0.271357
| 0.067725
| 0.126984
| 0.186243
| 0.568254
| 0.504762
| 0.417989
| 0.341799
| 0.341799
| 0.341799
| 0
| 0.024186
| 0.306452
| 1,550
| 86
| 65
| 18.023256
| 0.854884
| 0.393548
| 0
| 0.765957
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.297872
| false
| 0.255319
| 0.021277
| 0
| 0.425532
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
09c939b64303de29d0dcebbe65910a3839d59090
| 820
|
py
|
Python
|
crawler/database.py
|
reeoss/community_crawler
|
d4849a0ca6b4bc0f439a49d3899fda3d921886c1
|
[
"MIT"
] | 9
|
2017-09-25T07:39:33.000Z
|
2020-03-15T02:06:40.000Z
|
crawler/database.py
|
reeoss/community_crawler
|
d4849a0ca6b4bc0f439a49d3899fda3d921886c1
|
[
"MIT"
] | 5
|
2016-03-20T09:37:29.000Z
|
2018-04-09T14:08:38.000Z
|
crawler/database.py
|
reeoss/community_crawler
|
d4849a0ca6b4bc0f439a49d3899fda3d921886c1
|
[
"MIT"
] | 8
|
2017-06-26T10:04:27.000Z
|
2021-07-07T07:33:21.000Z
|
""":mod:`crawler.database` --- MongoDB Manager
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"""
import logging
from pymongo import MongoClient
from .config import crawler_config
logger = logging.getLogger(__name__)
class MongoDB:
def __init__(self, db: str):
db_config = crawler_config.db_config
client = MongoClient(host=db_config['url'],
serverSelectionTimeoutMS=3)
self.collection = client[db]
def query(self, document: str):
return self.collection[document]
def insert(self, document: str, *, data: dict):
return self.collection[document] \
.insert(data)
def update(self, document: str, *, c, data: dict):
return self.collection[document] \
.update({'_id': c['_id']}, {'$set': data})
| 24.848485
| 56
| 0.584146
| 85
| 820
| 5.458824
| 0.423529
| 0.12069
| 0.096983
| 0.181034
| 0.155172
| 0.155172
| 0
| 0
| 0
| 0
| 0
| 0.001603
| 0.239024
| 820
| 32
| 57
| 25.625
| 0.741987
| 0.112195
| 0
| 0.111111
| 0
| 0
| 0.018056
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.222222
| false
| 0
| 0.166667
| 0.166667
| 0.611111
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
09ecc105363b7818ef99bc8984d951b573d2909f
| 50
|
py
|
Python
|
tests/pyicontract_hypothesis/__init__.py
|
ProLoD/icontract-hypothesis
|
fe6c12a7395807d78880c2bbead48580fe8a1cff
|
[
"MIT"
] | 57
|
2021-01-14T12:01:19.000Z
|
2022-03-02T10:54:43.000Z
|
tests/pyicontract_hypothesis/__init__.py
|
ProLoD/icontract-hypothesis
|
fe6c12a7395807d78880c2bbead48580fe8a1cff
|
[
"MIT"
] | 7
|
2021-02-15T16:28:55.000Z
|
2021-07-23T10:58:21.000Z
|
tests/pyicontract_hypothesis/__init__.py
|
ProLoD/icontract-hypothesis
|
fe6c12a7395807d78880c2bbead48580fe8a1cff
|
[
"MIT"
] | 2
|
2021-01-21T05:35:58.000Z
|
2021-04-02T08:28:06.000Z
|
"""Test pyicontract-hypothesis as a component."""
| 25
| 49
| 0.74
| 6
| 50
| 6.166667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1
| 50
| 1
| 50
| 50
| 0.822222
| 0.86
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
111d89dc3fa97f05216826d77249b04673a33d5f
| 381
|
py
|
Python
|
examples/seq2seq/att_all_need/__init__.py
|
yym6472/transformers
|
abd01205561e5caec167c1fbb20bccea24d7ba46
|
[
"Apache-2.0"
] | 1
|
2021-12-30T05:41:37.000Z
|
2021-12-30T05:41:37.000Z
|
examples/seq2seq/att_all_need/__init__.py
|
yym6472/transformers
|
abd01205561e5caec167c1fbb20bccea24d7ba46
|
[
"Apache-2.0"
] | null | null | null |
examples/seq2seq/att_all_need/__init__.py
|
yym6472/transformers
|
abd01205561e5caec167c1fbb20bccea24d7ba46
|
[
"Apache-2.0"
] | null | null | null |
import att_all_need.Constants
import att_all_need.Modules
import att_all_need.Layers
import att_all_need.SubLayers
import att_all_need.Models
import att_all_need.Translator
import att_all_need.Optim
__all__ = [
att_all_need.Constants, att_all_need.Modules, att_all_need.Layers,
att_all_need.SubLayers, att_all_need.Models, att_all_need.Optim,
att_all_need.Translator]
| 29.307692
| 70
| 0.84252
| 64
| 381
| 4.515625
| 0.171875
| 0.290657
| 0.484429
| 0.387543
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.097113
| 381
| 12
| 71
| 31.75
| 0.840116
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.636364
| 0
| 0.636364
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
112ee878f6cb390f7d55d0ec0e3b0475f06c4c64
| 98
|
py
|
Python
|
src/util/init.py
|
LeanderK/deeptech-ai
|
4a2fca638d7d33acd1c255755bb62c8d88a54c02
|
[
"MIT"
] | 1
|
2019-05-26T14:07:37.000Z
|
2019-05-26T14:07:37.000Z
|
src/util/init.py
|
LeanderK/deeptech-ai
|
4a2fca638d7d33acd1c255755bb62c8d88a54c02
|
[
"MIT"
] | null | null | null |
src/util/init.py
|
LeanderK/deeptech-ai
|
4a2fca638d7d33acd1c255755bb62c8d88a54c02
|
[
"MIT"
] | 1
|
2019-05-26T14:25:28.000Z
|
2019-05-26T14:25:28.000Z
|
import os
import sys
import locale
def init():
locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')
| 16.333333
| 50
| 0.734694
| 17
| 98
| 4.117647
| 0.764706
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.011905
| 0.142857
| 98
| 6
| 50
| 16.333333
| 0.821429
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| true
| 0
| 0.6
| 0
| 0.8
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.