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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
527f504c64c7073761090a2b2887d81bf25e99e8
| 160
|
py
|
Python
|
project/app/admin.py
|
diegoinacio/basic-app-django
|
e993909449bb1f86272233d7f7dda40516886606
|
[
"MIT"
] | null | null | null |
project/app/admin.py
|
diegoinacio/basic-app-django
|
e993909449bb1f86272233d7f7dda40516886606
|
[
"MIT"
] | 1
|
2020-02-12T12:59:29.000Z
|
2020-02-12T12:59:29.000Z
|
project/app/admin.py
|
diegoinacio/basic-app-django
|
e993909449bb1f86272233d7f7dda40516886606
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
# Register your models here.
from .models import Person, MailList
admin.site.register(Person)
admin.site.register(MailList)
| 17.777778
| 36
| 0.8
| 22
| 160
| 5.818182
| 0.545455
| 0.140625
| 0.265625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.11875
| 160
| 8
| 37
| 20
| 0.907801
| 0.1625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
bffc660e93ebf92dfe8f9df706f9fa2592e2c227
| 75
|
py
|
Python
|
visualization_tool/visulization_npy/opt/__init__.py
|
nschor/G2LGAN
|
e690c0c0d0d4a2077715749b15a91553e04a76b0
|
[
"MIT"
] | 24
|
2019-01-04T14:08:05.000Z
|
2021-10-13T09:26:52.000Z
|
visualization_tool/visulization_npy/opt/__init__.py
|
nschor/G2LGAN
|
e690c0c0d0d4a2077715749b15a91553e04a76b0
|
[
"MIT"
] | 9
|
2019-07-29T03:07:42.000Z
|
2021-05-22T10:40:24.000Z
|
visualization_tool/visulization_npy/opt/__init__.py
|
nschor/G2LGAN
|
e690c0c0d0d4a2077715749b15a91553e04a76b0
|
[
"MIT"
] | 4
|
2019-04-15T00:30:26.000Z
|
2020-06-03T18:35:06.000Z
|
import constrained_opt
ConstrainedOpt = constrained_opt.ConstrainedOpt
| 18.75
| 48
| 0.853333
| 7
| 75
| 8.857143
| 0.571429
| 0.451613
| 0.903226
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.12
| 75
| 3
| 49
| 25
| 0.939394
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 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
| 5
|
8711103544de443a3e5bc3572c3421c13c929797
| 147
|
py
|
Python
|
pyeccodes/defs/grib2/tables/14/5_8_table.py
|
ecmwf/pyeccodes
|
dce2c72d3adcc0cb801731366be53327ce13a00b
|
[
"Apache-2.0"
] | 7
|
2020-04-14T09:41:17.000Z
|
2021-08-06T09:38:19.000Z
|
pyeccodes/defs/grib2/tables/9/5_8_table.py
|
ecmwf/pyeccodes
|
dce2c72d3adcc0cb801731366be53327ce13a00b
|
[
"Apache-2.0"
] | null | null | null |
pyeccodes/defs/grib2/tables/9/5_8_table.py
|
ecmwf/pyeccodes
|
dce2c72d3adcc0cb801731366be53327ce13a00b
|
[
"Apache-2.0"
] | 3
|
2020-04-30T12:44:48.000Z
|
2020-12-15T08:40:26.000Z
|
def load(h):
return ({'abbr': 'no', 'code': 0, 'title': 'no compression method'},
{'abbr': None, 'code': 255, 'title': 'Missing'})
| 36.75
| 72
| 0.517007
| 18
| 147
| 4.222222
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.035088
| 0.22449
| 147
| 3
| 73
| 49
| 0.631579
| 0
| 0
| 0
| 0
| 0
| 0.380952
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0.333333
| 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
| 1
| 1
| 0
|
0
| 5
|
873515f1a2bafec184a7e007d7ef1f26daefc6f8
| 190
|
py
|
Python
|
rabbit2ev/exception.py
|
lovelle/rabbit2ev
|
e3703760813753565bf445f2af12101c82366b30
|
[
"MIT"
] | 10
|
2016-07-05T04:02:31.000Z
|
2020-12-15T12:48:57.000Z
|
rabbit2ev/exception.py
|
lovelle/rabbit2ev
|
e3703760813753565bf445f2af12101c82366b30
|
[
"MIT"
] | null | null | null |
rabbit2ev/exception.py
|
lovelle/rabbit2ev
|
e3703760813753565bf445f2af12101c82366b30
|
[
"MIT"
] | null | null | null |
class NullMailerErrorPool(Exception):
pass
class NullMailerErrorPipe(Exception):
pass
class NullMailerErrorQueue(Exception):
pass
class RabbitMQError(Exception):
pass
| 11.875
| 38
| 0.752632
| 16
| 190
| 8.9375
| 0.4375
| 0.363636
| 0.377622
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.184211
| 190
| 15
| 39
| 12.666667
| 0.922581
| 0
| 0
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
873eaca1165136ecd3aa329aa39ee953f27ceb70
| 218
|
py
|
Python
|
lib/JumpScale/baselib/jsdeveltools/__init__.py
|
Jumpscale/jumpscale6_core
|
0502ddc1abab3c37ed982c142d21ea3955d471d3
|
[
"BSD-2-Clause"
] | 1
|
2015-10-26T10:38:13.000Z
|
2015-10-26T10:38:13.000Z
|
lib/JumpScale/baselib/jsdeveltools/__init__.py
|
Jumpscale/jumpscale6_core
|
0502ddc1abab3c37ed982c142d21ea3955d471d3
|
[
"BSD-2-Clause"
] | null | null | null |
lib/JumpScale/baselib/jsdeveltools/__init__.py
|
Jumpscale/jumpscale6_core
|
0502ddc1abab3c37ed982c142d21ea3955d471d3
|
[
"BSD-2-Clause"
] | null | null | null |
from JumpScale import j
from JSDevelToolsInstaller import JSDevelToolsInstaller
from JSDevelTools import JSDevelTools
class Empty():
pass
j.develtools=JSDevelTools()
j.develtools.installer=JSDevelToolsInstaller()
| 18.166667
| 55
| 0.844037
| 22
| 218
| 8.363636
| 0.5
| 0.119565
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.100917
| 218
| 11
| 56
| 19.818182
| 0.938776
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.142857
| 0.428571
| 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
| 0
| 1
| 1
| 1
| 0
| 1
| 0
|
0
| 5
|
875312474c2ccfcdbfca2e90171c26ac2a0cf769
| 1,468
|
py
|
Python
|
src/clearskies/column_types/__init__.py
|
cmancone/clearskies
|
aaa33fef6d03205faf26f123183a46adc1dbef9c
|
[
"MIT"
] | 4
|
2021-04-23T18:13:06.000Z
|
2022-03-26T01:51:01.000Z
|
src/clearskies/column_types/__init__.py
|
cmancone/clearskies
|
aaa33fef6d03205faf26f123183a46adc1dbef9c
|
[
"MIT"
] | null | null | null |
src/clearskies/column_types/__init__.py
|
cmancone/clearskies
|
aaa33fef6d03205faf26f123183a46adc1dbef9c
|
[
"MIT"
] | null | null | null |
from .belongs_to import BelongsTo
from .column import Column
from .created import Created
from .datetime import DateTime
from .email import Email
from .float import Float
from .has_many import HasMany
from .integer import Integer
from .json import JSON
from .many_to_many import ManyToMany
from .string import String
from .updated import Updated
def build_column_config(name, column_class, **kwargs):
return (
name,
{
**{"class": column_class},
**kwargs
}
)
def belongs_to(name, **kwargs):
return build_column_config(name, BelongsTo, **kwargs)
def created(name, **kwargs):
return build_column_config(name, Created, **kwargs)
def datetime(name, **kwargs):
return build_column_config(name, DateTime, **kwargs)
def email(name, **kwargs):
return build_column_config(name, Email, **kwargs)
def float_column(name, **kwargs):
return build_column_config(name, Float, **kwargs)
def has_many(name, **kwargs):
return build_column_config(name, HasMany, **kwargs)
def integer(name, **kwargs):
return build_column_config(name, Integer, **kwargs)
def json(name, **kwargs):
return build_column_config(name, JSON, **kwargs)
def many_to_many(name, **kwargs):
return build_column_config(name, ManyToMany, **kwargs)
def string(name, **kwargs):
return build_column_config(name, String, **kwargs)
def updated(name, **kwargs):
return build_column_config(name, Updated, **kwargs)
| 26.690909
| 58
| 0.716621
| 192
| 1,468
| 5.296875
| 0.130208
| 0.129794
| 0.20059
| 0.247788
| 0.408063
| 0.408063
| 0.408063
| 0.080629
| 0
| 0
| 0
| 0
| 0.1703
| 1,468
| 54
| 59
| 27.185185
| 0.834975
| 0
| 0
| 0
| 0
| 0
| 0.003406
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0
| 0.285714
| 0.285714
| 0.857143
| 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
| 1
| 0
|
0
| 5
|
8760f6d3df69853806420feb4a900c1607d7f005
| 116
|
py
|
Python
|
simoni/training/adversarial/trainer.py
|
yamad07/simoni
|
7c0f18667ced093a86e5e5d875b734c4e018015e
|
[
"MIT"
] | null | null | null |
simoni/training/adversarial/trainer.py
|
yamad07/simoni
|
7c0f18667ced093a86e5e5d875b734c4e018015e
|
[
"MIT"
] | null | null | null |
simoni/training/adversarial/trainer.py
|
yamad07/simoni
|
7c0f18667ced093a86e5e5d875b734c4e018015e
|
[
"MIT"
] | null | null | null |
from simoni.models import Model
class AdversarialTrainer(Trainer):
def _train_step(self, batch):
pass
| 16.571429
| 34
| 0.724138
| 14
| 116
| 5.857143
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.206897
| 116
| 6
| 35
| 19.333333
| 0.891304
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0.25
| 0.25
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 5
|
8771add59849a0bd75f778d53acac4427b3c594f
| 17,148
|
py
|
Python
|
polypy/plotting.py
|
symmy596/Polypy
|
9e9ce03b3e2c287f6d7efb04b31a4e9be7dea396
|
[
"MIT"
] | 8
|
2020-11-08T20:08:39.000Z
|
2022-03-24T06:36:40.000Z
|
polypy/plotting.py
|
symmy596/Polypy
|
9e9ce03b3e2c287f6d7efb04b31a4e9be7dea396
|
[
"MIT"
] | 4
|
2018-09-02T05:08:45.000Z
|
2020-09-09T12:58:30.000Z
|
polypy/plotting.py
|
symmy596/Polypy
|
9e9ce03b3e2c287f6d7efb04b31a4e9be7dea396
|
[
"MIT"
] | 2
|
2021-03-03T17:20:15.000Z
|
2021-11-22T09:37:32.000Z
|
"""
Plotting functions included with `polypy`.
"""
# Copyright (c) Adam R. Symington
# Distributed under the terms of the MIT License
# author: Adam R. Symington
import numpy as np
import matplotlib.pyplot as plt
from polypy import fig_params
from matplotlib.gridspec import GridSpec
from matplotlib import ticker
def line_plot(x, y, xlab, ylab,
figsize=(10, 6)):
"""
Simple line plotting function. Designed to be generic and used in several different applications.
Args:
x (:py:attr:`array like`): x axis points.
y (:py:attr:`array like`): y axis points.
xlab (:py:attr:`str`): x axis label.
ylab (:py:attr:`str`): y axis label.
fig_size (:py:class:`tuple`): Horizontal and veritcal size for figure (in inches). Default is :py:attr:`(10, 6)`.
Returns:
(:py:class:`matplotlib.axes.Axes`): The axes with new plots.
"""
ax = plt.subplots(figsize=figsize)[1]
ax.plot(x, y)
ax.set_xlabel(xlab)
ax.set_ylabel(ylab)
ax.tick_params()
plt.tight_layout()
return ax
def msd_plot(msd_data,
show_all_dimensions=True,
figsize=(10, 6)):
"""
Plotting function for the mean squared displacements (MSD).
Args:
msd_data ():py:class:`polypy.msd.MSDContainer`): MSD data.
show_all_dimensions (:py:attr:`bool`): Display all MSD data or the total MSD. Default is :py:attr:`bool`
fig_size (:py:class:`tuple`): Horizontal and veritcal size for figure (in inches). Default is :py:attr:`(10, 6)`.
Returns:
(:py:class:`matplotlib.axes.Axes`): The axes with new plots.
"""
ax = plt.subplots(figsize=figsize)[1]
ax.set_ylim(ymin=0, ymax=np.amax(msd_data.msd))
ax.set_xlim(xmin=0, xmax=np.amax(msd_data.time))
ax.plot(msd_data.time, msd_data.msd, label="XYZMSD")
if show_all_dimensions:
ax.plot(msd_data.time, msd_data.xymsd, label="XYMSD")
ax.plot(msd_data.time, msd_data.xzmsd, label="XZMSD")
ax.plot(msd_data.time, msd_data.yzmsd, label="YZMSD")
ax.plot(msd_data.time, msd_data.xmsd, label="XMSD")
ax.plot(msd_data.time, msd_data.ymsd, label="YMSD")
ax.plot(msd_data.time, msd_data.zmsd, label="ZMSD")
ax.set_xlabel("Time (ps)")
ax.set_ylabel("MSD ($\AA$)")
ax.legend(frameon=True, edgecolor="black", loc=2)
return ax
def volume_plot(x, y,
xlab="Timestep (ps)",
ylab="System Volume ($\AA$)",
figsize=(10, 6)):
"""
Gathers the data and creates a line plot for the system volume as a function of simulation timesteps
Args:
x (:py:attr:`array like`): x axis points - simulation timesteps
y (:py:attr:`array like`): y axis points - Volume
xlab (:py:attr:`str`): x axis label. Default is :py:attr:`"Timestep (ps)"`
ylab (:py:attr:`str`): y axis label. Default is :py:attr:`"System Volume ($\AA$)"`
fig_size (:py:class:`tuple`): Horizontal and veritcal size for figure (in inches). Default is :py:attr:`(10, 6)`.
Returns:
(:py:class:`matplotlib.axes.Axes`): The axes with new plots.
"""
ax = line_plot(x, y, xlab, ylab, figsize)
return ax
def electric_field_plot(x, y,
xlab="X Coordinate ($\AA$)",
ylab="Electric Field (V)",
figsize=(10, 6)):
"""
Gathers the data and creates a line plot for the electric field in one dimension.
Args:
x (:py:attr:`array like`): x axis points - position in simulation cell
y (:py:attr:`array like`): y axis points - electric field
xlab (:py:attr:`str`): x axis label. Default is :py:attr:`"X Coordinate ($\AA$)"`
ylab (:py:attr:`str`): y axis label. Default is :py:attr:`"Electric Field (V)"`
fig_size (:py:class:`tuple`): Horizontal and veritcal size for figure (in inches). Default is :py:attr:`(10, 6)`.
Returns:
(:py:class:`matplotlib.axes.Axes`): The axes with new plots.
"""
ax = line_plot(x, y, xlab, ylab, figsize)
return ax
def electrostatic_potential_plot(x, y,
xlab="X Coordinate ($\AA$)",
ylab="Electrostatic Potential (V)",
figsize=(10, 6)):
"""
Gathers the data and creates a line plot for the electrostatic potential in one dimension.
Args:
x (:py:attr:`array like`): x axis points - position in simulation cell
y (:py:attr:`array like`): y axis points - electrostatic potential
xlab (:py:attr:`str`): x axis label. Default is :py:attr:`"X Coordinate ($\AA$)"`
ylab (:py:attr:`str`): y axis label. Default is :py:attr:`"Electrostatic Potential (V)"`
fig_size (:py:class:`tuple`): Horizontal and veritcal size for figure (in inches). Default is :py:attr:`(10, 6)`.
Returns:
(:py:class:`matplotlib.axes.Axes`): The axes with new plots.
"""
ax = line_plot(x, y, xlab, ylab, figsize)
return ax
def one_dimensional_charge_density_plot(x, y,
xlab="X Coordinate ($\AA$)",
ylab="Charge Density",
figsize=(10, 6)):
"""
Gathers the data and creates a line plot for the charge density in one dimension.
Args:
x (:py:attr:`array like`): x axis points - position in simulation cell
y (:py:attr:`array like`): y axis points - charge density
xlab (:py:attr:`str`): x axis label. Default is :py:attr:`"X Coordinate ($\AA$)"`
ylab (:py:attr:`str`): y axis label. Default is :py:attr:`"Charge Density"`
fig_size (:py:class:`tuple`): Horizontal and veritcal size for figure (in inches). Default is :py:attr:`(10, 6)`.
Returns:
(:py:class:`matplotlib.axes.Axes`): The axes with new plots.
"""
ax = line_plot(x, y, xlab, ylab, figsize)
return ax
def one_dimensional_density_plot(x, y, data_labels,
xlab="X Coordinate ($\AA$)",
ylab="Particle Density",
figsize=(10, 6)):
"""
Plots the number density of all given species in one dimension.
Args:
x (:py:attr:`list`): x axis points - list of numpy arrays containing x axis coordinates.
y (:py:attr:`list`): y axis points - list of numpy arrays containing y axis coordinates.
data_labels (:py:attr:`list`): List of labels for legend.
xlab (:py:attr:`str`): x axis label. Default is :py:attr:`"X Coordinate ($\AA$)"`
ylab (:py:attr:`str`): y axis label. Default is :py:attr:`"Particle Density"`
fig_size (:py:class:`tuple`): Horizontal and veritcal size for figure (in inches). Default is :py:attr:`(10, 6)`.
Returns:
(:py:class:`matplotlib.axes.Axes`): The axes with new plots.
"""
ax = plt.subplots(figsize=figsize)[1]
for i in range(len(x)):
ax.plot(x[i], y[i], label=data_labels[i])
ax.set_xlabel(xlab)
ax.set_ylabel(ylab)
ax.tick_params()
ax.legend(frameon=True, edgecolor="black")
plt.tight_layout()
return ax
def two_dimensional_charge_density_plot(x, y, z,
xlab="X Coordinate ($\AA$)",
ylab="Y Coordinate ($\AA$)",
palette="viridis",
figsize=(10, 6),
colorbar=True, log=False):
"""
Plots the charge density in two dimensions.
Args:
x (:py:attr:`array like`): x axis points - x axis coordinates.
y (:py:attr:`array like`): y axis points - y axis coordinates.
z (:py:attr:`array like`): z axis points - 2D array of points.
xlab (:py:attr:`str`): x axis label. Default is :py:attr:`"X Coordinate ($\AA$)"`
ylab (:py:attr:`str`): y axis label. Default is :py:attr:`"Y Coordinate ($\AA$)"`
fig_size (:py:class:`tuple`): Horizontal and veritcal size for figure (in inches). Default is :py:attr:`(10, 6)`.
colorbar (:py:class:`bool`): Include the colorbar or not.
Returns:
(:py:class:`matplotlib.Fig`): Figure object
(:py:class:`matplotlib.axes.Axes`): The axes with new plots.
"""
fig, ax = plt.subplots(figsize=figsize)
if log:
CM = ax.contourf(x, y, z, cmap=palette, locator=ticker.LogLocator())
else:
CM = ax.contourf(x, y, z, cmap=palette)
ax.set_xlabel(xlab)
ax.set_ylabel(ylab)
ax.tick_params()
if colorbar:
cbar = fig.colorbar(CM)
cbar.set_label('Charge Density', labelpad=-40, y=1.1, rotation=0)
return fig, ax
def two_dimensional_density_plot(x, y, z,
xlab="X Coordinate ($\AA$)",
ylab="Y Coordinate ($\AA$)",
palette="viridis",
figsize=(10, 6),
colorbar=True, log=False):
"""
Plots the distribution of an atom species in two dimensions.
Args:
x (:py:attr:`array like`): x axis points - x axis coordinates.
y (:py:attr:`array like`): y axis points - y axis coordinates.
z (:py:attr:`array like`): z axis points - 2D array of points.
xlab (:py:attr:`str`): x axis label. Default is :py:attr:`"X Coordinate ($\AA$)"`
ylab (:py:attr:`str`): y axis label. Default is :py:attr:`"Y Coordinate ($\AA$)"`
fig_size (:py:class:`tuple`): Horizontal and veritcal size for figure (in inches). Default is :py:attr:`(10, 6)`.
colorbar (:py:class:`bool`): Include the colorbar or not.
log (:py:class:`bool`): Log the z data or not? This can sometimes be useful but obviously one needs to be careful
when drawing conclusions from the data.
Returns:
(:py:class:`matplotlib.Fig`): Figure object
(:py:class:`matplotlib.axes.Axes`): The axes with new plots.
"""
fig, ax = plt.subplots(figsize=figsize)
if log:
CM = ax.contourf(x, y, z, cmap=palette, locator=ticker.LogLocator())
else:
CM = ax.contourf(x, y, z, cmap=palette)
ax.set_xlabel(xlab)
ax.set_ylabel(ylab)
ax.tick_params()
if colorbar:
cbar = fig.colorbar(CM)
cbar.set_label('Particle Density', labelpad=-40, y=1.1, rotation=0)
plt.tight_layout()
return fig, ax
def combined_density_plot(x, y, z,
xlab="X Coordinate ($\AA$)",
ylab="Y Coordinate ($\AA$)",
y2_lab="Number Density",
palette="viridis", linecolor="black",
figsize=(10, 6), log=False):
"""
Plots the distribution of an atom species in two dimensions and overlays the one
dimensional density on top. Think of it as a combination of the two_dimensional_density_plot
and one_dimensional_density_plot functions
Args:
x (:py:attr:`array like`): x axis points - x axis coordinates.
y (:py:attr:`array like`): y axis points - y axis coordinates.
z (:py:attr:`array like`): z axis points - 2D array of points.
xlab (:py:attr:`str`): x axis label. Default is :py:attr:`"X Coordinate ($\AA$)"`
ylab (:py:attr:`str`): y axis label. Default is :py:attr:`"Y Coordinate ($\AA$)"`
y2_lab (:py:attr:`str`): second y axis label. Default is :py:attr:`"Particle Density"`
fig_size (:py:class:`tuple`): Horizontal and veritcal size for figure (in inches). Default is :py:attr:`(10, 6)`.
log (:py:class:`bool`): Log the z data or not? This can sometimes be useful but obviously one needs to be careful
when drawing conclusions from the data.
Returns:
(:py:class:`matplotlib.Fig`): Figure object
(:py:attr:`list`): List of axes objects.
"""
y2 = np.sum(z, axis=0)
fig = plt.figure(constrained_layout=True, figsize=figsize)
gs = GridSpec(5, 2, figure=fig)
gs.update(wspace=0.025, hspace=0.05)
ax2 = fig.add_subplot(gs[0,:])
ax1 = fig.add_subplot(gs[1:, :])
ax = [ax1, ax2]
if log:
ax1.contourf(x, y, z, cmap=palette, locator=ticker.LogLocator())
else:
ax1.contourf(x, y, z, cmap=palette)
ax1.set_xlabel(xlab)
ax1.set_ylabel(ylab)
ax1.set_xlim([np.amin(x), np.amax(x)])
ax1.tick_params()
ax2.plot(x, y2, color=linecolor)
ax2.set_xlim([np.amin(x), np.amax(x)])
ax2.axis('off')
plt.tight_layout()
return fig, ax
def two_dimensional_density_plot_multiple_species(x_list, y_list, z_list, palette_list,
xlab="X Coordinate ($\AA$)",
ylab="Y Coordinate ($\AA$)",
y2_lab="Number Density",
figsize=(10, 6), log=False):
"""
Plots the distribution of a list of atom species in two dimensions. Returns
heatmaps for each species stacking on top of one another. This is limited
to four species.
Args:
x_list (:py:attr:`array like`): x axis points - x axis coordinates.
y_list (:py:attr:`array like`): y axis points - y axis coordinates.
z_list (:py:attr:`array like`): z axis points - 2D array of points.
palette_list (:py:attr:`array like`): Color palletes for each atom species.
xlab (:py:attr:`str`): x axis label. Default is :py:attr:`"X Coordinate ($\AA$)"`
ylab (:py:attr:`str`): y axis label. Default is :py:attr:`"Y Coordinate ($\AA$)"`
y2_lab (:py:attr:`str`): second y axis label. Default is :py:attr:`"Particle Density"`
fig_size (:py:class:`tuple`): Horizontal and veritcal size for figure (in inches). Default is :py:attr:`(10, 6)`.
log (:py:class:`bool`): Log the z data or not? This can sometimes be useful but obviously one needs to be careful
when drawing conclusions from the data.
Returns:
(:py:class:`matplotlib.Fig`): Figure object
(:py:class:`matplotlib.axes.Axes`): The axes with new plots.
"""
fig, ax1 = plt.subplots(figsize=figsize)
alphas = [1.0, 0.7, 0.5, 0.3]
if log:
for i in range(len(x_list)):
ax1.contourf(x_list[i], y_list[i], z_list[i], cmap=palette_list[i], locator=ticker.LogLocator())
else:
for i in range(len(x_list)):
ax1.contourf(x_list[i], y_list[i], z_list[i], cmap=palette_list[i], alpha=alphas[i])
ax1.set_xlabel(xlab)
ax1.set_ylabel(ylab)
ax1.tick_params()
plt.tight_layout()
return fig, ax1
def combined_density_plot_multiple_species(x_list, y_list, z_list, palette_list, label_list, color_list,
xlab="X Coordinate ($\AA$)",
ylab="Y Coordinate ($\AA$)",
figsize=(10, 6), log=False):
"""
Plots the distribution of a list of atom species in two dimensions. Returns
heatmaps for each species stacking on top of one another. It also plots the
same density in one dimension on top of the heatmaps.
Args:
x (:py:attr:`list`): x axis points - x axis coordinates.
y (:py:attr:`list`): y axis points - y axis coordinates.
z (:py:attr:`list`): z axis points - 2D array of points.
palette_list (:py:attr:`list`): Color palletes for each atom species.
label_list (:py:attr:`list`): List of species labels.
color_list (:py:attr:`list`): List of colors for one dimensional plot.
xlab (:py:attr:`str`): x axis label. Default is :py:attr:`"X Coordinate ($\AA$)"`
ylab (:py:attr:`str`): y axis label. Default is :py:attr:`"Y Coordinate ($\AA$)"`
fig_size (:py:class:`tuple`): Horizontal and veritcal size for figure (in inches). Default is :py:attr:`(10, 6)`.
Returns:
(:py:class:`matplotlib.Fig`): Figure object
(:py:attr:`list`): List of axes objects.
"""
fig = plt.figure(constrained_layout=True, figsize=figsize)
gs = GridSpec(5, 2, figure=fig)
gs.update(wspace=0.025, hspace=0.05)
ax2 = fig.add_subplot(gs[0,:])
ax1 = fig.add_subplot(gs[1:, :])
ax = [ax1, ax2]
alphas = [1.0, 0.7, 0.5, 0.3]
if log:
for i in range(len(x_list)):
ax1.contourf(x_list[i], y_list[i], z_list[i], cmap=palette_list[i], locator=ticker.LogLocator())
else:
for i in range(len(x_list)):
ax1.contourf(x_list[i], y_list[i], z_list[i], cmap=palette_list[i], alpha=alphas[i])
ax1.set_xlabel(xlab)
ax1.set_ylabel(ylab)
ax1.set_xlim([np.amin(x_list[0]), np.amax(x_list[0])])
ax1.tick_params()
for i in range(len(x_list)):
ax2.plot(x_list[i], np.sum(z_list[i], axis=0), label=label_list[i], color=color_list[i])
ax2.axis('off')
ax2.set_ylim(np.amin(z_list[0]), np.amax(np.sum(z_list[0], axis=0)) * 1.4)
ax2.set_xlim(np.amin(x_list[0]), np.amax(x_list[0]))
ax2.legend(loc=2, ncol=len(label_list), frameon=False, fontsize=12)
plt.tight_layout()
return fig, ax
| 43.412658
| 121
| 0.591206
| 2,462
| 17,148
| 4.045085
| 0.097076
| 0.056632
| 0.038659
| 0.052716
| 0.811427
| 0.799177
| 0.766643
| 0.72919
| 0.694949
| 0.68049
| 0
| 0.014788
| 0.266503
| 17,148
| 395
| 122
| 43.412658
| 0.776992
| 0.52321
| 0
| 0.681564
| 0
| 0
| 0.072441
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.067039
| false
| 0
| 0.027933
| 0
| 0.162011
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 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
| 5
|
5e3f4f30904da95af856781fb41687a1ad6209de
| 953
|
py
|
Python
|
util/data/gen/wintypes.dll.py
|
56kyle/bloons_auto
|
419d55b51d1cddc49099593970adf1c67985b389
|
[
"MIT"
] | null | null | null |
util/data/gen/wintypes.dll.py
|
56kyle/bloons_auto
|
419d55b51d1cddc49099593970adf1c67985b389
|
[
"MIT"
] | null | null | null |
util/data/gen/wintypes.dll.py
|
56kyle/bloons_auto
|
419d55b51d1cddc49099593970adf1c67985b389
|
[
"MIT"
] | null | null | null |
symbols = []
exports = [{'type': 'function', 'name': 'DllCanUnloadNow', 'address': '0x7ffb385047c0'}, {'type': 'function', 'name': 'DllGetActivationFactory', 'address': '0x7ffb384f9100'}, {'type': 'function', 'name': 'DllGetClassObject', 'address': '0x7ffb384f95a0'}, {'type': 'function', 'name': 'RoCreateNonAgilePropertySet', 'address': '0x7ffb3850aca0'}, {'type': 'function', 'name': 'RoCreatePropertySetSerializer', 'address': '0x7ffb385115c0'}, {'type': 'function', 'name': 'RoGetBufferMarshaler', 'address': '0x7ffb38516110'}, {'type': 'function', 'name': 'RoGetMetaDataFile', 'address': '0x7ffb38517620'}, {'type': 'function', 'name': 'RoIsApiContractMajorVersionPresent', 'address': '0x7ffb38536eb0'}, {'type': 'function', 'name': 'RoIsApiContractPresent', 'address': '0x7ffb38536f00'}, {'type': 'function', 'name': 'RoParseTypeName', 'address': '0x7ffb384f8810'}, {'type': 'function', 'name': 'RoResolveNamespace', 'address': '0x7ffb385171c0'}]
| 476.5
| 940
| 0.690451
| 68
| 953
| 9.676471
| 0.411765
| 0.200608
| 0.267477
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.109853
| 0.073452
| 953
| 2
| 940
| 476.5
| 0.635334
| 0
| 0
| 0
| 0
| 0
| 0.675052
| 0.141509
| 0
| 0
| 0.161426
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
5e845e2739cc0fb1f05c1e2ae4f3e00ccd2d7629
| 316
|
py
|
Python
|
transactions/models.py
|
MattatPath/Path-backend
|
c8fde0f39162ff020c475badc76b191f9fec600c
|
[
"Apache-2.0"
] | null | null | null |
transactions/models.py
|
MattatPath/Path-backend
|
c8fde0f39162ff020c475badc76b191f9fec600c
|
[
"Apache-2.0"
] | null | null | null |
transactions/models.py
|
MattatPath/Path-backend
|
c8fde0f39162ff020c475badc76b191f9fec600c
|
[
"Apache-2.0"
] | null | null | null |
from django.db import models
class Transaction(models.Model):
amount = models.CharField(max_length=20, default="0.00")
date = models.CharField(max_length=8, default="DATE")
identification = models.CharField(max_length=20, default="ID LENGTH?")
status = models.CharField(max_length=20, default="status pending")
| 39.5
| 71
| 0.772152
| 44
| 316
| 5.454545
| 0.5
| 0.25
| 0.3
| 0.4
| 0.4125
| 0.4125
| 0
| 0
| 0
| 0
| 0
| 0.034843
| 0.091772
| 316
| 7
| 72
| 45.142857
| 0.801394
| 0
| 0
| 0
| 0
| 0
| 0.101266
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.166667
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
5e9ee150ade809ec68574bf7e4eeaaec6cfcda7a
| 211
|
py
|
Python
|
models/registry.py
|
liaojh1998/RNW
|
412764400a4a555fb8245ab51047019429d1141f
|
[
"MIT"
] | 46
|
2021-07-28T11:09:24.000Z
|
2022-03-05T07:48:50.000Z
|
models/registry.py
|
liaojh1998/RNW
|
412764400a4a555fb8245ab51047019429d1141f
|
[
"MIT"
] | 10
|
2021-09-27T00:26:26.000Z
|
2022-03-31T13:28:12.000Z
|
models/registry.py
|
liaojh1998/RNW
|
412764400a4a555fb8245ab51047019429d1141f
|
[
"MIT"
] | 6
|
2021-11-18T08:06:12.000Z
|
2022-03-22T13:46:53.000Z
|
import mmcv
from mmcv.utils import Registry
def _build_func(name: str, option: mmcv.ConfigDict, registry: Registry):
return registry.get(name)(option)
MODELS = Registry('models', build_func=_build_func)
| 21.1
| 72
| 0.767773
| 29
| 211
| 5.413793
| 0.517241
| 0.171975
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.127962
| 211
| 9
| 73
| 23.444444
| 0.853261
| 0
| 0
| 0
| 0
| 0
| 0.028436
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.4
| 0.2
| 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
| 1
| 1
| 0
|
0
| 5
|
5eb3d554c92266401685af3b17e7a868588a643d
| 131
|
py
|
Python
|
apps/info/routers.py
|
ycheng-aa/gated_launch_backend
|
cbb9e7e530ab28d5914276e9607ebfcf84be6433
|
[
"MIT"
] | null | null | null |
apps/info/routers.py
|
ycheng-aa/gated_launch_backend
|
cbb9e7e530ab28d5914276e9607ebfcf84be6433
|
[
"MIT"
] | null | null | null |
apps/info/routers.py
|
ycheng-aa/gated_launch_backend
|
cbb9e7e530ab28d5914276e9607ebfcf84be6433
|
[
"MIT"
] | null | null | null |
from apps.common.routers import routers
from .views import MyTasksViewSet
routers.register(r'myTasks', MyTasksViewSet, 'mytasks')
| 26.2
| 55
| 0.816794
| 16
| 131
| 6.6875
| 0.625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.091603
| 131
| 4
| 56
| 32.75
| 0.89916
| 0
| 0
| 0
| 0
| 0
| 0.10687
| 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
| 1
| 0
|
0
| 5
|
5ece1456c64c8809cac5242210f5d56a2a23e4e9
| 87
|
py
|
Python
|
ASS/__init__.py
|
rik2803/aws-ass
|
31c89f888cb30124ecaedda66e36766bcd0f51c8
|
[
"Apache-2.0"
] | 1
|
2019-01-19T05:53:49.000Z
|
2019-01-19T05:53:49.000Z
|
ASS/__init__.py
|
rik2803/aws-delete-tagged-cfn-stacks
|
19fd32913a21801b3cecc19337f0252dce5f86b5
|
[
"Apache-2.0"
] | 1
|
2021-03-08T12:50:30.000Z
|
2021-03-08T12:50:30.000Z
|
ASS/__init__.py
|
rik2803/aws-delete-tagged-cfn-stacks
|
19fd32913a21801b3cecc19337f0252dce5f86b5
|
[
"Apache-2.0"
] | 1
|
2020-10-30T14:45:02.000Z
|
2020-10-30T14:45:02.000Z
|
from .Config import Config
from .AWS import AWS
from .Notification import Notification
| 21.75
| 38
| 0.827586
| 12
| 87
| 6
| 0.416667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.137931
| 87
| 3
| 39
| 29
| 0.96
| 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
| 1
| 0
|
0
| 5
|
0d58c362e299d37087422704241032dc62fdbf80
| 31
|
py
|
Python
|
src/ecs/components/deathcomponent.py
|
joehowells/critical-keep
|
4aba3322a8582a2d06ab0d4b67028738249669e9
|
[
"MIT"
] | 1
|
2019-04-27T22:39:33.000Z
|
2019-04-27T22:39:33.000Z
|
src/ecs/components/deathcomponent.py
|
joehowells/critical-keep
|
4aba3322a8582a2d06ab0d4b67028738249669e9
|
[
"MIT"
] | null | null | null |
src/ecs/components/deathcomponent.py
|
joehowells/critical-keep
|
4aba3322a8582a2d06ab0d4b67028738249669e9
|
[
"MIT"
] | null | null | null |
class DeathComponent:
pass
| 10.333333
| 21
| 0.741935
| 3
| 31
| 7.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.225806
| 31
| 2
| 22
| 15.5
| 0.958333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 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
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
0d741519f1be347f6a56aa5a1b2abbf52c55d16e
| 59
|
py
|
Python
|
enthought/traits/ui/editors/title_editor.py
|
enthought/etsproxy
|
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
|
[
"BSD-3-Clause"
] | 3
|
2016-12-09T06:05:18.000Z
|
2018-03-01T13:00:29.000Z
|
enthought/traits/ui/editors/title_editor.py
|
enthought/etsproxy
|
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
|
[
"BSD-3-Clause"
] | 1
|
2020-12-02T00:51:32.000Z
|
2020-12-02T08:48:55.000Z
|
enthought/traits/ui/editors/title_editor.py
|
enthought/etsproxy
|
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
|
[
"BSD-3-Clause"
] | null | null | null |
# proxy module
from traitsui.editors.title_editor import *
| 19.666667
| 43
| 0.813559
| 8
| 59
| 5.875
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.118644
| 59
| 2
| 44
| 29.5
| 0.903846
| 0.20339
| 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
| 1
| 0
|
0
| 5
|
0d89bcfaf81de261279d6492ef9f45b7e7d598fe
| 130
|
py
|
Python
|
privacy_evaluator/datasets/tf/__init__.py
|
chen-yuxuan/privacy-evaluator
|
ed4852408108c3e6a01216af4183261945fd7e67
|
[
"MIT"
] | 7
|
2021-04-10T15:01:19.000Z
|
2022-02-08T14:45:21.000Z
|
privacy_evaluator/datasets/tf/__init__.py
|
chen-yuxuan/privacy-evaluator
|
ed4852408108c3e6a01216af4183261945fd7e67
|
[
"MIT"
] | 175
|
2021-04-13T08:32:27.000Z
|
2021-08-30T09:44:51.000Z
|
privacy_evaluator/datasets/tf/__init__.py
|
chen-yuxuan/privacy-evaluator
|
ed4852408108c3e6a01216af4183261945fd7e67
|
[
"MIT"
] | 21
|
2021-04-13T08:03:36.000Z
|
2021-10-05T15:35:01.000Z
|
"""
Module providing TensorFlow datasets.
"""
from .cifar10 import TFCIFAR10
from .mnist import TFMNIST
from .tf import TFDataset
| 18.571429
| 37
| 0.784615
| 16
| 130
| 6.375
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.035714
| 0.138462
| 130
| 6
| 38
| 21.666667
| 0.875
| 0.284615
| 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
| 1
| 0
|
0
| 5
|
0dd8bcc221f966910cda3ccf180b7f8c7ec6c881
| 123
|
py
|
Python
|
server/api/resources/user/__init__.py
|
NUS-CS-MComp/cs-cloud-computing-music-personality
|
35cc926bef83fb8be3c6af680862343a67cd6e1c
|
[
"Apache-2.0"
] | 2
|
2021-07-13T07:57:48.000Z
|
2021-11-18T08:20:38.000Z
|
server/api/resources/user/__init__.py
|
NUS-CS-MComp/cs-cloud-computing-music-personality
|
35cc926bef83fb8be3c6af680862343a67cd6e1c
|
[
"Apache-2.0"
] | null | null | null |
server/api/resources/user/__init__.py
|
NUS-CS-MComp/cs-cloud-computing-music-personality
|
35cc926bef83fb8be3c6af680862343a67cd6e1c
|
[
"Apache-2.0"
] | null | null | null |
from .user import UserAuthentication, UserLogout, UserRecord
__all__ = ["UserAuthentication", "UserLogout", "UserRecord"]
| 30.75
| 60
| 0.788618
| 10
| 123
| 9.3
| 0.7
| 0.602151
| 0.817204
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.097561
| 123
| 3
| 61
| 41
| 0.837838
| 0
| 0
| 0
| 0
| 0
| 0.308943
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 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
| 1
| 0
| 0
| 0
|
0
| 5
|
0ddb1cdded8c2dc90232f9804bc3a690b69d14a6
| 62
|
py
|
Python
|
HMMs/__init__.py
|
hiaoxui/D2T_Grounding
|
4c46f8a8d2867712399ac7c0e7f7f34ef911a69a
|
[
"MIT"
] | 15
|
2018-11-16T08:59:12.000Z
|
2021-02-06T10:57:16.000Z
|
HMMs/__init__.py
|
hiaoxui/D2T_Grounding
|
4c46f8a8d2867712399ac7c0e7f7f34ef911a69a
|
[
"MIT"
] | 2
|
2019-01-18T09:36:53.000Z
|
2019-05-01T15:06:03.000Z
|
HMMs/__init__.py
|
hiaoxui/D2T-Grounding
|
4c46f8a8d2867712399ac7c0e7f7f34ef911a69a
|
[
"MIT"
] | null | null | null |
from .HMM import HMMs
from .PR import PosteriorRegularization
| 20.666667
| 39
| 0.83871
| 8
| 62
| 6.5
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.129032
| 62
| 2
| 40
| 31
| 0.962963
| 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
| 1
| 0
|
0
| 5
|
216caa0ab0a33fc950ecdeacd26e0da54e4f4336
| 90
|
py
|
Python
|
python/ovs/PaxHeaders.47482/process.py
|
xiaobinglu/openvswitch
|
b206a49997a51909d73fd5c11784c17aa885f76b
|
[
"Apache-2.0"
] | null | null | null |
python/ovs/PaxHeaders.47482/process.py
|
xiaobinglu/openvswitch
|
b206a49997a51909d73fd5c11784c17aa885f76b
|
[
"Apache-2.0"
] | null | null | null |
python/ovs/PaxHeaders.47482/process.py
|
xiaobinglu/openvswitch
|
b206a49997a51909d73fd5c11784c17aa885f76b
|
[
"Apache-2.0"
] | null | null | null |
30 mtime=1365496689.478878594
30 atime=1440176559.397245608
30 ctime=1440177385.057309404
| 22.5
| 29
| 0.866667
| 12
| 90
| 6.5
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.75
| 0.066667
| 90
| 3
| 30
| 30
| 0.178571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
216f6f3c20006bd0212410104a98f5b48814caab
| 211
|
py
|
Python
|
dexp/datasets/__init__.py
|
haesleinhuepf/dexp
|
2ea84f3db323724588fac565fae56f0d522bc5ca
|
[
"BSD-3-Clause"
] | 16
|
2021-04-21T14:09:19.000Z
|
2022-03-22T02:30:59.000Z
|
dexp/datasets/__init__.py
|
haesleinhuepf/dexp
|
2ea84f3db323724588fac565fae56f0d522bc5ca
|
[
"BSD-3-Clause"
] | 28
|
2021-04-15T17:43:08.000Z
|
2022-03-29T16:08:35.000Z
|
dexp/datasets/__init__.py
|
haesleinhuepf/dexp
|
2ea84f3db323724588fac565fae56f0d522bc5ca
|
[
"BSD-3-Clause"
] | 3
|
2022-02-08T17:41:30.000Z
|
2022-03-18T15:32:27.000Z
|
from dexp.datasets.base_dataset import BaseDataset
from dexp.datasets.clearcontrol_dataset import CCDataset
from dexp.datasets.joined_dataset import JoinedDataset
from dexp.datasets.zarr_dataset import ZDataset
| 42.2
| 56
| 0.886256
| 28
| 211
| 6.535714
| 0.464286
| 0.174863
| 0.349727
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.075829
| 211
| 4
| 57
| 52.75
| 0.938462
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
217055e057f35ada80335a508123ab98c467c868
| 84
|
py
|
Python
|
Lib/js/polyfill/__init__.py
|
jeamick/ares-visual
|
3cf5068f874b3f6fe898968b2a7efa86fadca99d
|
[
"MIT"
] | null | null | null |
Lib/js/polyfill/__init__.py
|
jeamick/ares-visual
|
3cf5068f874b3f6fe898968b2a7efa86fadca99d
|
[
"MIT"
] | 2
|
2019-03-27T00:36:09.000Z
|
2019-04-09T00:39:12.000Z
|
Lib/js/polyfill/__init__.py
|
jeamick/ares-visual
|
3cf5068f874b3f6fe898968b2a7efa86fadca99d
|
[
"MIT"
] | null | null | null |
from . import AresJsGlobals
from . import AresJsData
from . import AresJsDataChart
| 28
| 29
| 0.809524
| 9
| 84
| 7.555556
| 0.555556
| 0.441176
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.154762
| 84
| 3
| 29
| 28
| 0.957746
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
21ad445d2031f20659ba6e5c5005633e3e71339d
| 400
|
py
|
Python
|
src/domain/domainmodel/userstatemachine/states/user_state.py
|
nhmendes/pythonrestapi
|
9c99cb5f9d6e180a69b2d2158d6046817cf8c5fd
|
[
"MIT"
] | null | null | null |
src/domain/domainmodel/userstatemachine/states/user_state.py
|
nhmendes/pythonrestapi
|
9c99cb5f9d6e180a69b2d2158d6046817cf8c5fd
|
[
"MIT"
] | null | null | null |
src/domain/domainmodel/userstatemachine/states/user_state.py
|
nhmendes/pythonrestapi
|
9c99cb5f9d6e180a69b2d2158d6046817cf8c5fd
|
[
"MIT"
] | null | null | null |
from abc import ABC, abstractmethod
class UserState(ABC):
@abstractmethod
def get_name(self) -> str:
pass
def invited(self):
raise Exception("Invalid operation")
def active(self):
raise Exception("Invalid operation")
def disabled(self):
raise Exception("Invalid operation")
def deleted(self):
raise Exception("Invalid operation")
| 20
| 44
| 0.6475
| 43
| 400
| 6
| 0.465116
| 0.139535
| 0.27907
| 0.387597
| 0.562016
| 0.430233
| 0
| 0
| 0
| 0
| 0
| 0
| 0.2575
| 400
| 19
| 45
| 21.052632
| 0.868687
| 0
| 0
| 0.307692
| 0
| 0
| 0.17
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.384615
| false
| 0.076923
| 0.076923
| 0
| 0.538462
| 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
| 1
| 0
| 0
| 1
| 0
|
0
| 5
|
21c1201c93a8b62355a6ebce7016a2c44d288b22
| 34
|
py
|
Python
|
Chapter 01/Chap01_Example1.183.py
|
Anancha/Programming-Techniques-using-Python
|
e80c329d2a27383909d358741a5cab03cb22fd8b
|
[
"MIT"
] | null | null | null |
Chapter 01/Chap01_Example1.183.py
|
Anancha/Programming-Techniques-using-Python
|
e80c329d2a27383909d358741a5cab03cb22fd8b
|
[
"MIT"
] | null | null | null |
Chapter 01/Chap01_Example1.183.py
|
Anancha/Programming-Techniques-using-Python
|
e80c329d2a27383909d358741a5cab03cb22fd8b
|
[
"MIT"
] | null | null | null |
n1 = 3
print(id(n1))
print(id(3))
| 8.5
| 13
| 0.588235
| 8
| 34
| 2.5
| 0.5
| 0.7
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.137931
| 0.147059
| 34
| 3
| 14
| 11.333333
| 0.551724
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.666667
| 1
| 1
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
1d062ced8f1e39dd005011887a20e8ea634159e7
| 145
|
py
|
Python
|
python.io/jindu-py2exe/setup.py
|
cnzht/grit
|
eab457a0a9b216f5a6026669095b8126bf8a9e1d
|
[
"MIT"
] | 1
|
2018-04-04T09:26:21.000Z
|
2018-04-04T09:26:21.000Z
|
python.io/jindu-py2exe/setup.py
|
cnzht/grit
|
eab457a0a9b216f5a6026669095b8126bf8a9e1d
|
[
"MIT"
] | null | null | null |
python.io/jindu-py2exe/setup.py
|
cnzht/grit
|
eab457a0a9b216f5a6026669095b8126bf8a9e1d
|
[
"MIT"
] | null | null | null |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
import py2exe
from distutils.core import setup
setup(console=["jindu.py"]) #console可改为windows
| 24.166667
| 46
| 0.696552
| 19
| 145
| 5.315789
| 0.894737
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.016
| 0.137931
| 145
| 5
| 47
| 29
| 0.792
| 0.441379
| 0
| 0
| 0
| 0
| 0.102564
| 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
| 1
| 0
|
0
| 5
|
df6a229294ac476e8a58b4da1ec91a0522131c7b
| 53
|
py
|
Python
|
model/__init__.py
|
WillyChen123/CDFNet
|
12d6b288aa2a8301683395a75bd44a7be44b7f2a
|
[
"MIT"
] | null | null | null |
model/__init__.py
|
WillyChen123/CDFNet
|
12d6b288aa2a8301683395a75bd44a7be44b7f2a
|
[
"MIT"
] | null | null | null |
model/__init__.py
|
WillyChen123/CDFNet
|
12d6b288aa2a8301683395a75bd44a7be44b7f2a
|
[
"MIT"
] | null | null | null |
from .RTFNet import RTFNet
from .CDFNet import CDFNet
| 26.5
| 26
| 0.830189
| 8
| 53
| 5.5
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.132075
| 53
| 2
| 27
| 26.5
| 0.956522
| 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
| 1
| 0
|
0
| 5
|
10c325bd4fe7a6a51df2daf2afdcb26325450ed1
| 123
|
py
|
Python
|
recommender/admin.py
|
mfrancisco927/djangotutorial
|
580a002845f3438012209b2d88ca7112e2e96cf1
|
[
"Apache-2.0"
] | null | null | null |
recommender/admin.py
|
mfrancisco927/djangotutorial
|
580a002845f3438012209b2d88ca7112e2e96cf1
|
[
"Apache-2.0"
] | null | null | null |
recommender/admin.py
|
mfrancisco927/djangotutorial
|
580a002845f3438012209b2d88ca7112e2e96cf1
|
[
"Apache-2.0"
] | 3
|
2021-02-22T01:49:11.000Z
|
2022-02-09T01:44:13.000Z
|
from django.contrib import admin
from .models import Musicdata
# Register your models here.
admin.site.register(Musicdata)
| 24.6
| 32
| 0.821138
| 17
| 123
| 5.941176
| 0.647059
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.113821
| 123
| 5
| 33
| 24.6
| 0.926606
| 0.211382
| 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
| 1
| 0
|
0
| 5
|
10d30fdc876a8c39d46c4d7536dc311b643c0bda
| 20
|
py
|
Python
|
src/test/resources/files/singleQuotes_after.py
|
rendner/py-prefix-fstring-plugin
|
c2e2ca7cca1b3833e988543fda5bce05c6860309
|
[
"MIT"
] | null | null | null |
src/test/resources/files/singleQuotes_after.py
|
rendner/py-prefix-fstring-plugin
|
c2e2ca7cca1b3833e988543fda5bce05c6860309
|
[
"MIT"
] | null | null | null |
src/test/resources/files/singleQuotes_after.py
|
rendner/py-prefix-fstring-plugin
|
c2e2ca7cca1b3833e988543fda5bce05c6860309
|
[
"MIT"
] | 1
|
2021-05-24T09:32:06.000Z
|
2021-05-24T09:32:06.000Z
|
x = f'test {<caret>'
| 20
| 20
| 0.55
| 4
| 20
| 2.75
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.15
| 20
| 1
| 20
| 20
| 0.647059
| 0
| 0
| 0
| 0
| 0
| 0.619048
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 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
| 1
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
10dd3c1b1637f97fb4f6f2cf5742305eab1a032b
| 58
|
py
|
Python
|
contact_book/src/contact_book/gui/__init__.py
|
marianne-manaog/ContactBookPythonApplication
|
7adcdeb1f7664c1867e8b9939792ed0325ca20c8
|
[
"MIT"
] | null | null | null |
contact_book/src/contact_book/gui/__init__.py
|
marianne-manaog/ContactBookPythonApplication
|
7adcdeb1f7664c1867e8b9939792ed0325ca20c8
|
[
"MIT"
] | null | null | null |
contact_book/src/contact_book/gui/__init__.py
|
marianne-manaog/ContactBookPythonApplication
|
7adcdeb1f7664c1867e8b9939792ed0325ca20c8
|
[
"MIT"
] | null | null | null |
from . import application_window, contacts_user_interface
| 29
| 57
| 0.87931
| 7
| 58
| 6.857143
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.086207
| 58
| 1
| 58
| 58
| 0.90566
| 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
| 1
| 0
|
0
| 5
|
10ebabd6d7dfb02a6809dbca4f237334f0ace00e
| 31
|
py
|
Python
|
run.py
|
Bloomca/github-users-explorer
|
f2cd60e508bfaf584aea456bea9a5eb5e0299c3e
|
[
"MIT"
] | null | null | null |
run.py
|
Bloomca/github-users-explorer
|
f2cd60e508bfaf584aea456bea9a5eb5e0299c3e
|
[
"MIT"
] | null | null | null |
run.py
|
Bloomca/github-users-explorer
|
f2cd60e508bfaf584aea456bea9a5eb5e0299c3e
|
[
"MIT"
] | null | null | null |
# start with "flask run" in CLI
| 31
| 31
| 0.709677
| 6
| 31
| 3.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.193548
| 31
| 1
| 31
| 31
| 0.88
| 0.935484
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
10fb55662ca4fe78c086b3ec07a127ec774e28a5
| 633
|
py
|
Python
|
8kyu/test_exclamation_marks_series_1.py
|
adun/codewars.py
|
89e7d81e9ca05a432007d634892c1cba28f5b715
|
[
"MIT"
] | null | null | null |
8kyu/test_exclamation_marks_series_1.py
|
adun/codewars.py
|
89e7d81e9ca05a432007d634892c1cba28f5b715
|
[
"MIT"
] | null | null | null |
8kyu/test_exclamation_marks_series_1.py
|
adun/codewars.py
|
89e7d81e9ca05a432007d634892c1cba28f5b715
|
[
"MIT"
] | null | null | null |
# Remove a exclamation mark from the end of string. For a beginner kata, you can assume
# that the input data is always a string, no need to verify it.
# Examples
# remove("Hi!") === "Hi"
# remove("Hi!!!") === "Hi!!"
# remove("!Hi") === "!Hi"
# remove("!Hi!") === "!Hi"
# remove("Hi! Hi!") === "Hi! Hi"
# remove("Hi") === "Hi"
def remove(s):
return s[:-1] if s.endswith('!') else s
def test_remove():
assert remove("Hi!") == "Hi"
assert remove("Hi!!!") == "Hi!!"
assert remove("!Hi") == "!Hi"
assert remove("!Hi!") == "!Hi"
assert remove("Hi! Hi!") == "Hi! Hi"
assert remove("Hi") == "Hi"
| 27.521739
| 87
| 0.529226
| 90
| 633
| 3.711111
| 0.4
| 0.191617
| 0.359281
| 0.287425
| 0.491018
| 0.449102
| 0.389222
| 0.389222
| 0.389222
| 0.389222
| 0
| 0.002024
| 0.219589
| 633
| 22
| 88
| 28.772727
| 0.674089
| 0.505529
| 0
| 0
| 0
| 0
| 0.148515
| 0
| 0
| 0
| 0
| 0
| 0.666667
| 1
| 0.222222
| false
| 0
| 0
| 0.111111
| 0.333333
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 5
|
804377ef5839cc7f7012e69b3558f91d9cd16aa4
| 55
|
py
|
Python
|
yourapp/tests/tests.py
|
kevinhowbrook/wagtail-pypi-template
|
99273f4c1614fc60ccee8d669fadb92494f0ca4b
|
[
"MIT"
] | 3
|
2020-04-20T05:35:57.000Z
|
2022-03-22T09:40:57.000Z
|
yourapp/tests/tests.py
|
kevinhowbrook/wagtail-pypi-template
|
99273f4c1614fc60ccee8d669fadb92494f0ca4b
|
[
"MIT"
] | 1
|
2021-01-13T22:50:42.000Z
|
2021-01-13T22:50:42.000Z
|
yourapp/tests/tests.py
|
kevinhowbrook/wagtail-pypi-template
|
99273f4c1614fc60ccee8d669fadb92494f0ca4b
|
[
"MIT"
] | null | null | null |
from django.test import TestCase
# Add your tests here
| 18.333333
| 32
| 0.8
| 9
| 55
| 4.888889
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.163636
| 55
| 3
| 33
| 18.333333
| 0.956522
| 0.345455
| 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
| 1
| 0
|
0
| 5
|
337f06d7edd2330edd549193eea0b1c4f038600a
| 39
|
py
|
Python
|
backend/blog/model/__init__.py
|
o8oo8o/blog
|
2a6f44f86469bfbb472dfd1bec4238587d8402bf
|
[
"MIT"
] | null | null | null |
backend/blog/model/__init__.py
|
o8oo8o/blog
|
2a6f44f86469bfbb472dfd1bec4238587d8402bf
|
[
"MIT"
] | null | null | null |
backend/blog/model/__init__.py
|
o8oo8o/blog
|
2a6f44f86469bfbb472dfd1bec4238587d8402bf
|
[
"MIT"
] | null | null | null |
#!/usr/bin/evn python3
# coding=utf-8
| 9.75
| 22
| 0.666667
| 7
| 39
| 3.714286
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.058824
| 0.128205
| 39
| 3
| 23
| 13
| 0.705882
| 0.871795
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
d500436ee3e22327fc75e120dd9fb9a3c9518a54
| 285
|
py
|
Python
|
Curso de Cisco/Actividades/Intercambio de valores.py
|
tomasfriz/Curso-de-Cisco
|
a50ee5fa96bd86d468403e29ccdc3565a181af60
|
[
"MIT"
] | null | null | null |
Curso de Cisco/Actividades/Intercambio de valores.py
|
tomasfriz/Curso-de-Cisco
|
a50ee5fa96bd86d468403e29ccdc3565a181af60
|
[
"MIT"
] | null | null | null |
Curso de Cisco/Actividades/Intercambio de valores.py
|
tomasfriz/Curso-de-Cisco
|
a50ee5fa96bd86d468403e29ccdc3565a181af60
|
[
"MIT"
] | null | null | null |
variable1 = 1
variable2 = 2
auxiliar = variable1
variable1 = variable2
variable2 = auxiliar
print(variable1)
print(variable2)
#-------------------------------------------
variable1 = 1
variable2 = 2
variable1, variable2 = variable2, variable1
print(variable1)
print(variable2)
| 15
| 44
| 0.645614
| 27
| 285
| 6.851852
| 0.259259
| 0.227027
| 0.205405
| 0.216216
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.080972
| 0.133333
| 285
| 19
| 45
| 15
| 0.663968
| 0.150877
| 0
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0.333333
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
1d7d9b249c8e1648ec9fa11cdd645e65d7948d32
| 133
|
py
|
Python
|
rltorch/scheduler/__init__.py
|
Brandon-Rozek/rltorch
|
cb87105305315c5df4cae91fee0ee54b981bc04b
|
[
"MIT"
] | null | null | null |
rltorch/scheduler/__init__.py
|
Brandon-Rozek/rltorch
|
cb87105305315c5df4cae91fee0ee54b981bc04b
|
[
"MIT"
] | null | null | null |
rltorch/scheduler/__init__.py
|
Brandon-Rozek/rltorch
|
cb87105305315c5df4cae91fee0ee54b981bc04b
|
[
"MIT"
] | null | null | null |
from .Scheduler import Scheduler
from .LinearScheduler import LinearScheduler
from .ExponentialScheduler import ExponentialScheduler
| 33.25
| 54
| 0.887218
| 12
| 133
| 9.833333
| 0.416667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.090226
| 133
| 3
| 55
| 44.333333
| 0.975207
| 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
| 1
| 0
|
0
| 5
|
1d863a2ea2286ab6af13fbb9ae5f9628e8e3cf2b
| 247
|
py
|
Python
|
dad_torch/__init__.py
|
trendscenter/easytorch
|
0faf6c7f09701c8f73ed4061214ca724c83d82aa
|
[
"MIT"
] | 1
|
2021-07-04T15:37:24.000Z
|
2021-07-04T15:37:24.000Z
|
dad_torch/__init__.py
|
trendscenter/easytorch
|
0faf6c7f09701c8f73ed4061214ca724c83d82aa
|
[
"MIT"
] | null | null | null |
dad_torch/__init__.py
|
trendscenter/easytorch
|
0faf6c7f09701c8f73ed4061214ca724c83d82aa
|
[
"MIT"
] | 1
|
2021-09-29T18:17:25.000Z
|
2021-09-29T18:17:25.000Z
|
from dad_torch.config import default_ap, default_args
from dad_torch.data import DTDataset, DTDataHandle
from dad_torch.metrics import DADMetrics, DADAverages, Prf1a, ConfusionMatrix
from .dad_torch import DADTorch
from .trainer import NNTrainer
| 35.285714
| 77
| 0.854251
| 34
| 247
| 6.029412
| 0.558824
| 0.136585
| 0.234146
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.004525
| 0.105263
| 247
| 6
| 78
| 41.166667
| 0.923077
| 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
| 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
| 5
|
d51f3a4b1b4d23e3c75a85467b9d1625865cb146
| 123
|
py
|
Python
|
src/__init__.py
|
ValentinVignal/MusicLoop
|
0831522249b368826aa06b2b8994e443a5a5d548
|
[
"MIT"
] | 2
|
2020-08-11T01:41:38.000Z
|
2020-09-08T03:43:44.000Z
|
src/__init__.py
|
ValentinVignal/MusicLoop
|
0831522249b368826aa06b2b8994e443a5a5d548
|
[
"MIT"
] | 1
|
2020-10-31T12:08:47.000Z
|
2020-10-31T12:08:47.000Z
|
src/__init__.py
|
ValentinVignal/MusicWebLooper
|
0831522249b368826aa06b2b8994e443a5a5d548
|
[
"MIT"
] | null | null | null |
from .Languages import Languages
from .MusicWebLooper import MusicWebLooper
from .Urls import Urls
from . import Buttons
| 17.571429
| 42
| 0.821138
| 15
| 123
| 6.733333
| 0.4
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.146341
| 123
| 6
| 43
| 20.5
| 0.961905
| 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
| 1
| 0
|
0
| 5
|
d52a1bb8c68437cc62e38f0b8ef596af6652f32f
| 243
|
py
|
Python
|
mockseries/interaction/__init__.py
|
cyrilou242/mockseries
|
4dc892f971160bf31cfc7e2a60a1c5acc25be1de
|
[
"BSD-3-Clause"
] | 18
|
2021-06-28T01:24:18.000Z
|
2022-01-24T04:54:49.000Z
|
mockseries/interaction/__init__.py
|
cyrilou242/mockseries
|
4dc892f971160bf31cfc7e2a60a1c5acc25be1de
|
[
"BSD-3-Clause"
] | 23
|
2021-06-20T23:34:24.000Z
|
2022-01-24T08:14:36.000Z
|
mockseries/interaction/__init__.py
|
cyrilou242/mockseries
|
4dc892f971160bf31cfc7e2a60a1c5acc25be1de
|
[
"BSD-3-Clause"
] | null | null | null |
from mockseries.interaction.additive_interaction import AdditiveInteraction
from mockseries.interaction.multiplicative_interaction import MultiplicativeInteraction
ADDITIVE = AdditiveInteraction()
MULTIPLICATIVE = MultiplicativeInteraction()
| 40.5
| 87
| 0.897119
| 18
| 243
| 12
| 0.444444
| 0.12963
| 0.231481
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.061728
| 243
| 5
| 88
| 48.6
| 0.947368
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 1
| 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
| 5
|
d595ccf07bc6eeaeaa97ad2872b7a04bb563d9ed
| 30,599
|
py
|
Python
|
sds/initial.py
|
hanyas/sds
|
3c195fb9cbd88a9284287d62c0eacb6afc4598a7
|
[
"MIT"
] | 12
|
2019-09-21T13:52:09.000Z
|
2022-02-14T06:48:46.000Z
|
sds/initial.py
|
hanyas/sds
|
3c195fb9cbd88a9284287d62c0eacb6afc4598a7
|
[
"MIT"
] | 1
|
2020-01-22T12:34:52.000Z
|
2020-01-26T21:14:11.000Z
|
sds/initial.py
|
hanyas/sds
|
3c195fb9cbd88a9284287d62c0eacb6afc4598a7
|
[
"MIT"
] | 5
|
2019-09-18T15:11:26.000Z
|
2021-12-10T14:04:53.000Z
|
import numpy as np
import numpy.random as npr
import scipy as sc
from scipy import stats
from scipy.special import logsumexp
from scipy.stats import multivariate_normal as mvn
from scipy.stats import invwishart
from sds.utils.stats import multivariate_normal_logpdf as lg_mvn
from sds.utils.general import linear_regression, one_hot
from sds.distributions.categorical import Categorical
from sds.distributions.gaussian import StackedGaussiansWithPrecision
from sds.distributions.gaussian import StackedGaussiansWithDiagonalPrecision
from sds.distributions.lingauss import StackedLinearGaussiansWithPrecision
from sds.distributions.gaussian import GaussianWithPrecision
from sds.distributions.gaussian import GaussianWithDiagonalPrecision
from sklearn.preprocessing import PolynomialFeatures
from functools import partial
from operator import mul
import copy
class InitCategoricalState:
def __init__(self, nb_states, **kwargs):
self.nb_states = nb_states
self.pi = 1. / self.nb_states * np.ones(self.nb_states)
@property
def params(self):
return self.pi
@params.setter
def params(self, value):
self.pi = value
def permute(self, perm):
self.pi = self.pi[perm]
def initialize(self):
pass
def likeliest(self):
return np.argmax(self.pi)
def sample(self):
return npr.choice(self.nb_states, p=self.pi)
def log_init(self):
return np.log(self.pi)
def mstep(self, p, **kwargs):
eps = kwargs.get('eps', 1e-8)
pi = sum([_p[0, :] for _p in p]) + eps
self.pi = pi / sum(pi)
class InitGaussianObservation:
def __init__(self, nb_states, obs_dim, act_dim, nb_lags=1, **kwargs):
assert nb_lags > 0
self.nb_states = nb_states
self.obs_dim = obs_dim
self.act_dim = act_dim
self.nb_lags = nb_lags
# self.mu = npr.randn(self.nb_states, self.obs_dim)
# self._sigma_chol = 5. * npr.randn(self.nb_states, self.obs_dim, self.obs_dim)
self.mu = np.zeros((self.nb_states, self.obs_dim))
self._sigma_chol = np.zeros((self.nb_states, self.obs_dim, self.obs_dim))
for k in range(self.nb_states):
_sigma = invwishart.rvs(self.obs_dim + 1, np.eye(self.obs_dim))
self._sigma_chol[k] = np.linalg.cholesky(_sigma * np.eye(self.obs_dim))
self.mu[k] = mvn.rvs(mean=None, cov=1e2 * _sigma, size=(1, ))
@property
def sigma(self):
return np.matmul(self._sigma_chol, np.swapaxes(self._sigma_chol, -1, -2))
@sigma.setter
def sigma(self, value):
self._sigma_chol = np.linalg.cholesky(value + 1e-8 * np.eye(self.obs_dim))
@property
def params(self):
return self.mu, self._sigma_chol
@params.setter
def params(self, value):
self.mu, self._sigma_chol = value
def permute(self, perm):
self.mu = self.mu[perm]
self._sigma_chol = self._sigma_chol[perm]
def initialize(self, x, **kwargs):
x0 = np.vstack([_x[:self.nb_lags] for _x in x])
self.mu = np.array([np.mean(x0, axis=0) for k in range(self.nb_states)])
self.sigma = np.array([np.cov(x0, rowvar=False) for k in range(self.nb_states)])
def mean(self, z):
return self.mu[z]
def sample(self, z):
x = mvn(mean=self.mean(z), cov=self.sigma[z]).rvs()
return np.atleast_1d(x)
def log_likelihood(self, x):
if isinstance(x, np.ndarray):
x0 = x[:self.nb_lags]
log_lik = np.zeros((x0.shape[0], self.nb_states))
for k in range(self.nb_states):
log_lik[:, k] = lg_mvn(x0, self.mean(k), self.sigma[k])
return log_lik
else:
return list(map(self.log_likelihood, x))
def mstep(self, p, x, **kwargs):
x0, p0 = [], []
for _x, _p in zip(x, p):
x0.append(_x[:self.nb_lags])
p0.append(_p[:self.nb_lags])
J = np.zeros((self.nb_states, self.obs_dim))
h = np.zeros((self.nb_states, self.obs_dim))
for _x, _p in zip(x0, p0):
J += np.sum(_p[:, :, None], axis=0)
h += np.sum(_p[:, :, None] * _x[:, None, :], axis=0)
self.mu = h / J
sqerr = np.zeros((self.nb_states, self.obs_dim, self.obs_dim))
norm = np.zeros((self.nb_states, ))
for _x, _p in zip(x0, p0):
resid = _x[:, None, :] - self.mu
sqerr += np.sum(_p[:, :, None, None] * resid[:, :, None, :]
* resid[:, :, :, None], axis=0)
norm += np.sum(_p, axis=0)
self.sigma = sqerr / norm[:, None, None]
def smooth(self, p, x):
if all(isinstance(i, np.ndarray) for i in [p, x]):
p0 = p[:self.nb_lags]
return p0.dot(self.mu)
else:
return list(map(self.smooth, p, x))
class InitGaussianControl:
def __init__(self, nb_states, obs_dim, act_dim,
nb_lags=1, degree=1, **kwargs):
assert nb_lags > 0
self.nb_states = nb_states
self.obs_dim = obs_dim
self.act_dim = act_dim
self.nb_lags = nb_lags
self.degree = degree
self.feat_dim = int(sc.special.comb(self.degree + self.obs_dim, self.degree)) - 1
self.basis = PolynomialFeatures(self.degree, include_bias=False)
# self.K = npr.randn(self.nb_states, self.act_dim, self.feat_dim)
# self.kff = npr.randn(self.nb_states, self.act_dim)
# self._sigma_chol = 5. * npr.randn(self.nb_states, self.act_dim, self.act_dim)
self.K = np.zeros((self.nb_states, self.act_dim, self.feat_dim))
self.kff = np.zeros((self.nb_states, self.act_dim))
self._sigma_chol = np.zeros((self.nb_states, self.act_dim, self.act_dim))
for k in range(self.nb_states):
_sigma = invwishart.rvs(self.act_dim + 1, np.eye(self.act_dim))
self._sigma_chol[k] = np.linalg.cholesky(_sigma * np.eye(self.act_dim))
self.K[k] = mvn.rvs(mean=None, cov=1e2 * _sigma, size=(self.feat_dim, )).T
self.kff[k] = mvn.rvs(mean=None, cov=1e2 * _sigma, size=(1, ))
@property
def sigma(self):
return np.matmul(self._sigma_chol, np.swapaxes(self._sigma_chol, -1, -2))
@sigma.setter
def sigma(self, value):
self._sigma_chol = np.linalg.cholesky(value + 1e-8 * np.eye(self.act_dim))
@property
def params(self):
return self.K, self.kff, self._sigma_chol
@params.setter
def params(self, value):
self.K, self.kff, self._sigma_chol = value
def permute(self, perm):
self.K = self.K[perm]
self.kff = self.kff[perm]
self._sigma_chol = self._sigma_chol[perm]
def initialize(self, x, u, **kwargs):
mu0 = kwargs.get('mu0', 0.)
sigma0 = kwargs.get('sigma0', 1e64)
psi0 = kwargs.get('psi0', 1.)
nu0 = kwargs.get('nu0', self.act_dim + 1)
x0 = np.vstack([_x[:self.nb_lags] for _x in x])
u0 = np.vstack([_u[:self.nb_lags] for _u in u])
f0 = self.featurize(x0)
K, kff, sigma = linear_regression(f0, u0, weights=None, fit_intercept=True,
mu0=mu0, sigma0=sigma0, psi0=psi0, nu0=nu0)
self.K = np.array([K for _ in range(self.nb_states)])
self.kff = np.array([kff for _ in range(self.nb_states)])
self.sigma = np.array([sigma for _ in range(self.nb_states)])
def featurize(self, x):
feat = self.basis.fit_transform(np.atleast_2d(x))
return np.squeeze(feat) if x.ndim == 1\
else np.reshape(feat, (x.shape[0], -1))
def mean(self, z, x):
feat = self.featurize(x)
u = np.einsum('kh,...h->...k', self.K[z], feat) + self.kff[z]
return np.atleast_1d(u)
def sample(self, z, x):
u = mvn(mean=self.mean(z, x), cov=self.sigma[z]).rvs()
return np.atleast_1d(u)
def log_likelihood(self, x, u):
if isinstance(x, np.ndarray):
x0 = x[:self.nb_lags]
u0 = u[:self.nb_lags]
log_lik = np.zeros((u0.shape[0], self.nb_states))
for k in range(self.nb_states):
log_lik[:, k] = lg_mvn(u0, self.mean(k, x0), self.sigma[k])
return log_lik
else:
return list(map(self.log_likelihood, x, u))
def mstep(self, p, x, u, **kwargs):
mu0 = kwargs.get('mu0', 0.)
sigma0 = kwargs.get('sigma0', 1e64)
psi0 = kwargs.get('psi0', 1.)
nu0 = kwargs.get('nu0', self.act_dim + 1)
x0, u0, p0 = [], [], []
for _x, _u, _p in zip(x, u, p):
x0.append(_x[:self.nb_lags])
u0.append(_u[:self.nb_lags])
p0.append(_p[:self.nb_lags])
f0 = list(map(self.featurize, x0))
_sigma = np.zeros((self.nb_states, self.act_dim, self.act_dim))
for k in range(self.nb_states):
coef, intercept, sigma = linear_regression(Xs=np.vstack(f0), ys=np.vstack(u0),
weights=np.vstack(p0)[:, k], fit_intercept=True,
mu0=mu0, sigma0=sigma0, psi0=psi0, nu0=nu0)
self.K[k] = coef
self.kff[k] = intercept
_sigma[k] = sigma
self.sigma = _sigma
def smooth(self, p, x, u):
if all(isinstance(i, np.ndarray) for i in [p, x, u]):
x0 = x[:self.nb_lags]
u0 = u[:self.nb_lags]
p0 = p[:self.nb_lags]
mu = np.zeros((len(u0), self.nb_states, self.act_dim))
for k in range(self.nb_states):
mu[:, k, :] = self.mean(k, x0)
return np.einsum('nk,nkl->nl', p, mu)
else:
return list(map(self.smooth, p, x, u))
class BayesianInitCategoricalState:
def __init__(self, nb_states, prior, likelihood=None):
self.nb_states = nb_states
# Dirichlet prior
self.prior = prior
# Dirichlet posterior
self.posterior = copy.deepcopy(prior)
# Categorical likelihood
if likelihood is not None:
self.likelihood = likelihood
else:
pi = self.prior.rvs()
self.likelihood = Categorical(dim=nb_states, pi=pi)
@property
def params(self):
return self.likelihood.pi
@params.setter
def params(self, value):
self.likelihood.pi = value
def permute(self, perm):
self.likelihood.pi = self.likelihood.pi[perm]
def initialize(self):
pass
def likeliest(self):
return np.argmax(self.likelihood.pi)
def sample(self):
return npr.choice(self.nb_states, p=self.likelihood.pi)
def log_init(self):
return np.log(self.likelihood.pi)
def mstep(self, p, **kwargs):
p0 = [_p[0, :] for _p in p]
stats = self.likelihood.weighted_statistics(None, p0)
self.posterior.nat_param = self.prior.nat_param + stats
try:
self.likelihood.params = self.posterior.mode()
except AssertionError:
self.likelihood.params = self.posterior.mean()
self.empirical_bayes(**kwargs)
def empirical_bayes(self, lr=1e-3):
grad = self.prior.log_likelihood_grad(self.likelihood.params)
self.prior.params = self.prior.params + lr * grad
class _BayesianInitGaussianObservationBase:
def __init__(self, nb_states, obs_dim, act_dim,
nb_lags, prior, likelihood=None):
assert nb_lags > 0
self.nb_states = nb_states
self.obs_dim = obs_dim
self.act_dim = act_dim
self.nb_lags = nb_lags
self.prior = prior
self.posterior = copy.deepcopy(prior)
self.likelihood = likelihood
@property
def params(self):
return self.likelihood.params
@params.setter
def params(self, values):
self.likelihood.params = values
def permute(self, perm):
raise NotImplementedError
def initialize(self, x, **kwargs):
kmeans = kwargs.get('kmeans', True)
x0 = [_x[:self.nb_lags] for _x in x]
t = list(map(len, x0))
if kmeans:
from sklearn.cluster import KMeans
km = KMeans(self.nb_states)
km.fit(np.vstack(x0))
z0 = np.split(km.labels_, np.cumsum(t)[:-1])
else:
z0 = list(map(partial(npr.choice, self.nb_states), t))
z0 = list(map(partial(one_hot, self.nb_states), z0))
stats = self.likelihood.weighted_statistics(x0, z0)
self.posterior.nat_param = self.prior.nat_param + stats
self.likelihood.params = self.posterior.rvs()
def mean(self, z):
x = self.likelihood.dists[z].mean()
return np.atleast_1d(x)
def sample(self, z):
x = self.likelihood.dists[z].rvs()
return np.atleast_1d(x)
def log_likelihood(self, x):
if isinstance(x, np.ndarray):
x0 = x[:self.nb_lags]
return self.likelihood.log_likelihood(x0)
else:
return list(map(self.log_likelihood, x))
def mstep(self, p, x, **kwargs):
x0, p0 = [], []
for _x, _p in zip(x, p):
x0.append(_x[:self.nb_lags])
p0.append(_p[:self.nb_lags])
stats = self.likelihood.weighted_statistics(x0, p0)
self.posterior.nat_param = self.prior.nat_param + stats
self.likelihood.params = self.posterior.mode()
self.empirical_bayes(**kwargs)
def empirical_bayes(self, lr=np.array([0., 0., 1e-3, 1e-3])):
raise NotImplementedError
def smooth(self, p, x):
if all(isinstance(i, np.ndarray) for i in [p, x]):
p0 = p[:self.nb_lags]
return p0.dot(self.likelihood.mus)
else:
return list(map(self.smooth, p, x))
class BayesianInitGaussianObservation(_BayesianInitGaussianObservationBase):
# mu = np.zeros((obs_dim,))
# kappa = 1e-64
# psi = 1e8 * np.eye(obs_dim) / (obs_dim + 1)
# nu = (obs_dim + 1) + obs_dim + 1
#
# from sds.distributions.composite import StackedNormalWishart
# prior = StackedNormalWishart(nb_states, obs_dim,
# mus=np.array([mu for _ in range(nb_states)]),
# kappas=np.array([kappa for _ in range(nb_states)]),
# psis=np.array([psi for _ in range(nb_states)]),
# nus=np.array([nu for _ in range(nb_states)]))
def __init__(self, nb_states, obs_dim, act_dim,
nb_lags, prior, likelihood=None):
super(BayesianInitGaussianObservation, self).__init__(nb_states, obs_dim, act_dim,
nb_lags, prior, likelihood)
# Gaussian likelihood
if likelihood is not None:
self.likelihood = likelihood
else:
mus, lmbdas = self.prior.rvs()
self.likelihood = StackedGaussiansWithPrecision(size=self.nb_states,
dim=self.obs_dim,
mus=mus, lmbdas=lmbdas)
def permute(self, perm):
self.likelihood.mus = self.likelihood.mus[perm]
self.likelihood.lmbdas = self.likelihood.lmbdas[perm]
def empirical_bayes(self, lr=np.array([0., 0., 1e-3, 1e-3])):
grad = self.prior.log_likelihood_grad(self.likelihood.params)
self.prior.params = [p + r * g for p, g, r in zip(self.prior.params, grad, lr)]
class BayesianInitDiagonalGaussianObservation(_BayesianInitGaussianObservationBase):
# mu = np.zeros((obs_dim,))
# kappa = 1e-64 * np.ones((obs_dim,))
# alpha = ((obs_dim + 1) + obs_dim + 1) / 2. * np.ones((obs_dim,))
# beta = 1. / (2. * 1e8 * np.ones((obs_dim,)) / (obs_dim + 1))
#
# from sds.distributions.composite import StackedNormalGamma
# prior = StackedNormalGamma(nb_states, obs_dim,
# mus=np.array([mu for _ in range(nb_states)]),
# kappas=np.array([kappa for _ in range(nb_states)]),
# alphas=np.array([alpha for _ in range(nb_states)]),
# betas=np.array([beta for _ in range(nb_states)]))
def __init__(self, nb_states, obs_dim, act_dim,
nb_lags, prior, likelihood=None):
super(BayesianInitDiagonalGaussianObservation, self).__init__(nb_states, obs_dim, act_dim,
nb_lags, prior, likelihood)
# Diagonal Gaussian likelihood
if likelihood is not None:
self.likelihood = likelihood
else:
mus, lmbdas_diag = self.prior.rvs()
self.likelihood = StackedGaussiansWithDiagonalPrecision(size=self.nb_states,
dim=self.obs_dim,
mus=mus, lmbdas_diag=lmbdas_diag)
def permute(self, perm):
self.likelihood.mus = self.likelihood.mus[perm]
self.likelihood.lmbdas_diag = self.likelihood.lmbdas_diag[perm]
def empirical_bayes(self, lr=np.array([0., 0., 1e-3, 1e-3])):
pass
class BayesianInitGaussianControl:
def __init__(self, nb_states, obs_dim, act_dim,
nb_lags, prior, degree=1, likelihood=None):
assert nb_lags > 0
self.nb_states = nb_states
self.obs_dim = obs_dim
self.act_dim = act_dim
self.nb_lags = nb_lags
self.degree = degree
self.feat_dim = int(sc.special.comb(self.degree + self.obs_dim, self.degree)) - 1
self.basis = PolynomialFeatures(self.degree, include_bias=False)
self.input_dim = self.feat_dim + 1
self.output_dim = self.act_dim
self.prior = prior
self.posterior = copy.deepcopy(prior)
# Linear-Gaussian likelihood
if likelihood is not None:
self.likelihood = likelihood
else:
As, lmbdas = self.prior.rvs()
self.likelihood = StackedLinearGaussiansWithPrecision(size=self.nb_states,
column_dim=self.input_dim,
row_dim=self.output_dim,
As=As, lmbdas=lmbdas, affine=True)
@property
def params(self):
return self.likelihood.params
@params.setter
def params(self, values):
self.likelihood.params = values
def permute(self, perm):
self.likelihood.As = self.likelihood.As[perm]
self.likelihood.lmbdas = self.likelihood.lmbdas[perm]
def initialize(self, x, u, **kwargs):
kmeans = kwargs.get('kmeans', False)
x0, u0 = [], []
for _x, _u in zip(x, u):
x0.append(_x[:self.nb_lags])
u0.append(_u[:self.nb_lags])
f0 = list(map(self.featurize, x0))
t = list(map(len, f0))
if kmeans:
from sklearn.cluster import KMeans
km = KMeans(self.nb_states)
km.fit(np.vstack(f0))
z0 = np.split(km.labels_, np.cumsum(t)[:-1])
else:
z0 = list(map(partial(npr.choice, self.nb_states), t))
z0 = list(map(partial(one_hot, self.nb_states), z0))
stats = self.likelihood.weighted_statistics(f0, u0, z0)
self.posterior.nat_param = self.prior.nat_param + stats
self.likelihood.params = self.posterior.rvs()
def featurize(self, x):
feat = self.basis.fit_transform(np.atleast_2d(x))
return np.squeeze(feat) if x.ndim == 1\
else np.reshape(feat, (x.shape[0], -1))
def mean(self, z, x):
feat = self.featurize(x)
u = self.likelihood.dists[z].mean(feat)
return np.atleast_1d(u)
def sample(self, z, x):
feat = self.featurize(x)
u = self.likelihood.dists[z].rvs(feat)
return np.atleast_1d(u)
def log_likelihood(self, x, u):
if isinstance(x, np.ndarray):
x0 = x[:self.nb_lags]
u0 = u[:self.nb_lags]
f0 = self.featurize(x0)
return self.likelihood.log_likelihood(f0, u0)
else:
return list(map(self.log_likelihood, x, u))
def mstep(self, p, x, u, **kwargs):
x0, u0, p0 = [], [], []
for _x, _u, _p in zip(x, u, p):
x0.append(_x[:self.nb_lags])
u0.append(_u[:self.nb_lags])
p0.append(_p[:self.nb_lags])
f0 = list(map(self.featurize, x0))
stats = self.likelihood.weighted_statistics(f0, u0, p0)
self.posterior.nat_param = self.prior.nat_param + stats
self.likelihood.params = self.posterior.mode()
def smooth(self, p, x, u):
if all(isinstance(i, np.ndarray) for i in [p, x, u]):
x0 = x[:self.nb_lags]
u0 = u[:self.nb_lags]
p0 = p[:self.nb_lags]
mu = np.zeros((len(u0), self.nb_states, self.obs_dim))
for k in range(self.nb_states):
mu[:, k, :] = self.mean(k, x0)
return np.einsum('nk,nkl->nl', p0, mu)
else:
return list(map(self.smooth, p, x, u))
class BayesianInitGaussianControlWithAutomaticRelevance:
def __init__(self, nb_states, obs_dim, act_dim,
nb_lags, prior, degree=1):
assert nb_lags > 0
self.nb_states = nb_states
self.obs_dim = obs_dim
self.act_dim = act_dim
self.nb_lags = nb_lags
self.degree = degree
self.feat_dim = int(sc.special.comb(self.degree + self.obs_dim, self.degree)) - 1
self.basis = PolynomialFeatures(self.degree, include_bias=False)
self.input_dim = self.feat_dim + 1
self.output_dim = self.act_dim
likelihood_precision_prior = prior['likelihood_precision_prior']
parameter_precision_prior = prior['parameter_precision_prior']
from sds.distributions.composite import StackedMultiOutputLinearGaussianWithAutomaticRelevance
self.object = StackedMultiOutputLinearGaussianWithAutomaticRelevance(self.nb_states,
self.input_dim,
self.output_dim,
likelihood_precision_prior,
parameter_precision_prior)
@property
def params(self):
return self.object.params
@params.setter
def params(self, values):
self.object.params = values
def permute(self, perm):
self.object.As = self.object.As[perm]
self.object.lmbdas = self.object.lmbdas[perm]
def initialize(self, x, u, **kwargs):
pass
def featurize(self, x):
feat = self.basis.fit_transform(np.atleast_2d(x))
return np.squeeze(feat) if x.ndim == 1\
else np.reshape(feat, (x.shape[0], -1))
def mean(self, z, x):
feat = self.featurize(x)
u = self.object.mean(z, feat)
return np.atleast_1d(u)
def sample(self, z, x):
feat = self.featurize(x)
u = self.object.rvs(z, feat)
return np.atleast_1d(u)
def log_likelihood(self, x, u):
if isinstance(x, np.ndarray) and isinstance(u, np.ndarray):
x0 = x[:self.nb_lags]
u0 = u[:self.nb_lags]
f0 = self.featurize(x0)
return self.object.log_likelihood(f0, u0)
else:
def inner(x, u):
return self.log_likelihood(x, u)
return list(map(inner, x, u))
def mstep(self, p, x, u, **kwargs):
x0, u0, p0 = [], [], []
for _x, _u, _p in zip(x, u, p):
x0.append(_x[:self.nb_lags])
u0.append(_u[:self.nb_lags])
p0.append(_p[:self.nb_lags])
f0 = list(map(self.featurize, x0))
f0, u0, p0 = list(map(np.vstack, (f0, u0, p0)))
self.object.em(f0, u0, p0, **kwargs)
def smooth(self, p, x, u):
if all(isinstance(i, np.ndarray) for i in [p, x, u]):
x0 = x[:self.nb_lags]
u0 = u[:self.nb_lags]
p0 = p[:self.nb_lags]
mu = np.zeros((len(x), self.nb_states, self.act_dim))
for k in range(self.nb_states):
mu[:, k, :] = self.mean(k, x0)
return np.einsum('nk,nkl->nl', p0, mu)
else:
return list(map(self.smooth, p, x, u))
class _BayesianInitGaussianLatentBase:
def __init__(self, ltn_dim, act_dim,
nb_lags, prior, likelihood=None):
assert nb_lags > 0
self.ltn_dim = ltn_dim
self.act_dim = act_dim
self.nb_lags = nb_lags
self.prior = prior
self.posterior = copy.deepcopy(prior)
self.likelihood = likelihood
@property
def params(self):
return self.likelihood.params
@params.setter
def params(self, values):
self.likelihood.params = values
def initialize(self, x, **kwargs):
pass
def mstep(self, stats, **kwargs):
self.posterior.nat_param = self.prior.nat_param + stats
self.likelihood.params = self.posterior.mode()
class SingleBayesianInitGaussianLatent(_BayesianInitGaussianLatentBase):
# mu = np.zeros((ltn_dim,))
# kappa = 1e-64
# psi = 1e8 * np.eye(ltn_dim) / (ltn_dim + 1)
# nu = (ltn_dim + 1) + ltn_dim + 1
#
# from sds.distributions.composite import NormalWishart
# prior = NormalWishart(ltn_dim,
# mu=mu, kappa=kappa,
# psi=psi, nu=nu)
def __init__(self, ltn_dim, act_dim,
nb_lags, prior, likelihood=None):
super(SingleBayesianInitGaussianLatent, self).__init__(ltn_dim, act_dim,
nb_lags, prior, likelihood)
# Gaussian likelihood
if likelihood is not None:
self.likelihood = likelihood
else:
mu, lmbda = self.prior.rvs()
self.likelihood = GaussianWithPrecision(dim=self.ltn_dim,
mu=mu, lmbda=lmbda)
class SingleBayesianInitDiagonalGaussianLatent(_BayesianInitGaussianLatentBase):
# mu = np.zeros((ltn_dim,))
# kappa = 1e-64 * np.ones((ltn_dim,))
# alpha = ((ltn_dim + 1) + ltn_dim + 1) / 2. * np.ones((ltn_dim,))
# beta = 1. / (2. * 1e8 * np.ones((ltn_dim,)) / (ltn_dim + 1))
#
# from sds.distributions.composite import NormalGamma
# prior = NormalGamma(ltn_dim,
# mu=mu, kappa=kappa,
# alphas=alpha, betas=beta)
def __init__(self, ltn_dim, act_dim,
nb_lags, prior, likelihood=None):
super(SingleBayesianInitDiagonalGaussianLatent, self).__init__(ltn_dim, act_dim,
nb_lags, prior, likelihood)
# Diagonal Gaussian likelihood
if likelihood is not None:
self.likelihood = likelihood
else:
mu, lmbda_diag = self.prior.rvs()
self.likelihood = GaussianWithDiagonalPrecision(dim=self.ltn_dim,
mu=mu, lmbda_diag=lmbda_diag)
class BayesianInitGaussianLatent(_BayesianInitGaussianLatentBase):
# mu = np.zeros((ltn_dim,))
# kappa = 1e-64
# psi = 1e8 * np.eye(ltn_dim) / (ltn_dim + 1)
# nu = (ltn_dim + 1) + ltn_dim + 1
#
# from sds.distributions.composite import StackedNormalWishart
# prior = StackedNormalWishart(nb_states, ltn_dim,
# mus=np.array([mu for _ in range(nb_states)]),
# kappas=np.array([kappa for _ in range(nb_states)]),
# psis=np.array([psi for _ in range(nb_states)]),
# nus=np.array([nu for _ in range(nb_states)]))
def __init__(self, nb_states, ltn_dim, act_dim,
nb_lags, prior, likelihood=None):
super(BayesianInitGaussianLatent, self).__init__(ltn_dim, act_dim,
nb_lags, prior, likelihood)
self.nb_states = nb_states
# Gaussian likelihood
if likelihood is not None:
self.likelihood = likelihood
else:
mus, lmbdas = self.prior.rvs()
self.likelihood = StackedGaussiansWithPrecision(size=self.nb_states,
dim=self.ltn_dim,
mus=mus, lmbdas=lmbdas)
def permute(self, perm):
pass
class BayesianInitDiagonalGaussianLatent(_BayesianInitGaussianLatentBase):
# mu = np.zeros((ltn_dim,))
# kappa = 1e-64 * np.ones((ltn_dim,))
# alpha = ((ltn_dim + 1) + ltn_dim + 1) / 2. * np.ones((ltn_dim,))
# beta = 1. / (2. * 1e8 * np.ones((ltn_dim,)) / (ltn_dim + 1))
#
# from sds.distributions.composite import StackedNormalGamma
# prior = StackedNormalGamma(nb_states, ltn_dim,
# mus=np.array([mu for _ in range(nb_states)]),
# kappas=np.array([kappa for _ in range(nb_states)]),
# alphas=np.array([alpha for _ in range(nb_states)]),
# betas=np.array([beta for _ in range(nb_states)]))
def __init__(self, nb_states, ltn_dim, act_dim,
nb_lags, prior, likelihood=None):
super(BayesianInitDiagonalGaussianLatent, self).__init__(ltn_dim, act_dim,
nb_lags, prior, likelihood)
self.nb_states = nb_states
# Diagonal Gaussian likelihood
if likelihood is not None:
self.likelihood = likelihood
else:
mus, lmbdas_diag = self.prior.rvs()
self.likelihood = StackedGaussiansWithDiagonalPrecision(size=self.nb_states,
dim=self.ltn_dim,
mus=mus, lmbdas_diag=lmbdas_diag)
def permute(self, perm):
pass
| 35.252304
| 104
| 0.56296
| 3,878
| 30,599
| 4.273595
| 0.064466
| 0.04091
| 0.049961
| 0.020274
| 0.812526
| 0.768539
| 0.73493
| 0.705424
| 0.68678
| 0.638086
| 0
| 0.015428
| 0.317919
| 30,599
| 867
| 105
| 35.292964
| 0.77864
| 0.113206
| 0
| 0.682513
| 0
| 0
| 0.005211
| 0.001885
| 0
| 0
| 0
| 0
| 0.011885
| 1
| 0.16129
| false
| 0.011885
| 0.037351
| 0.03056
| 0.307301
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 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
| 5
|
637fa1b344c6a8d338258e9d43afcac58596c8d9
| 125
|
py
|
Python
|
destinator/handlers/base_handler.py
|
PJUllrich/distributed-systems
|
b362c1c6783fbd1659448277aab6c158485d7c3c
|
[
"MIT"
] | null | null | null |
destinator/handlers/base_handler.py
|
PJUllrich/distributed-systems
|
b362c1c6783fbd1659448277aab6c158485d7c3c
|
[
"MIT"
] | null | null | null |
destinator/handlers/base_handler.py
|
PJUllrich/distributed-systems
|
b362c1c6783fbd1659448277aab6c158485d7c3c
|
[
"MIT"
] | null | null | null |
from abc import ABC
class BaseHandler(ABC):
def __init__(self, message_handler):
self.parent = message_handler
| 17.857143
| 40
| 0.72
| 16
| 125
| 5.25
| 0.6875
| 0.333333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.208
| 125
| 6
| 41
| 20.833333
| 0.848485
| 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 | 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
| 1
| 0
|
0
| 5
|
63ac1b97b49fdc0fe55229a76ab0810e2a0c624a
| 245
|
py
|
Python
|
setup.py
|
azarabdulla/GaraPhishik
|
142b5e43b538060f4b4e5df0450497927a58c78a
|
[
"CC0-1.0"
] | null | null | null |
setup.py
|
azarabdulla/GaraPhishik
|
142b5e43b538060f4b4e5df0450497927a58c78a
|
[
"CC0-1.0"
] | null | null | null |
setup.py
|
azarabdulla/GaraPhishik
|
142b5e43b538060f4b4e5df0450497927a58c78a
|
[
"CC0-1.0"
] | null | null | null |
import os
os.system('sudo apt install php curl python-is-python3 python3 python3-pip')
os.system('pip3 install pyfiglet')
os.system('sudo unzip ngrok.zip')
os.system('sudo chmod +x ngrok')
os.system('sudo mv ngrok /usr/bin')
os.system('ngrok')
| 27.222222
| 76
| 0.742857
| 42
| 245
| 4.333333
| 0.52381
| 0.263736
| 0.263736
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.018265
| 0.106122
| 245
| 8
| 77
| 30.625
| 0.812785
| 0
| 0
| 0
| 0
| 0
| 0.612245
| 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
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
63bca27accdb49de80527711111e24a436600ec5
| 7,777
|
py
|
Python
|
tests/vns3ms/test_backups_api.py
|
cohesive/python-cohesivenet-sdk
|
5620acfa669ff97c94d9aa04a16facda37d648c1
|
[
"MIT"
] | null | null | null |
tests/vns3ms/test_backups_api.py
|
cohesive/python-cohesivenet-sdk
|
5620acfa669ff97c94d9aa04a16facda37d648c1
|
[
"MIT"
] | null | null | null |
tests/vns3ms/test_backups_api.py
|
cohesive/python-cohesivenet-sdk
|
5620acfa669ff97c94d9aa04a16facda37d648c1
|
[
"MIT"
] | null | null | null |
# coding: utf-8
"""
VNS3:ms API
Cohesive networks VNS3 API providing complete control of your network's addresses, routes, rules and edge # noqa: E501
Contact: solutions@cohesive.net
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import pytest
import cohesivenet
from cohesivenet.api.vns3ms import backups_api # noqa: E501
from cohesivenet.rest import ApiException
from tests.openapi import generate_method_test
from tests.vns3ms.stub_data import BackupsApiData
class TestMSBackupsApi(object):
"""VNS3:ms Backups API unit tests"""
def test_get_backups(self, rest_mocker, ms_client, ms_api_schema: dict):
"""Test case for get_backups"""
generate_method_test(
ms_client,
ms_api_schema,
"GET",
"/backups",
rest_mocker,
mock_request_from_schema=True,
mock_response={
"response_type": "success",
"response": {"backup_files": [], "failed_backups": []},
},
)(backups_api.get_backups)
def test_delete_backup(self, rest_mocker, ms_client, ms_api_schema: dict):
"""Test case for delete_backup"""
generate_method_test(
ms_client,
ms_api_schema,
"DELETE",
"/backups",
rest_mocker,
mock_request_from_schema=True,
mock_response_from_schema=True,
)(backups_api.delete_backup)
def test_get_download_backup(self, rest_mocker, ms_client, ms_api_schema: dict):
"""Test case for get_download_backup"""
generate_method_test(
ms_client,
ms_api_schema,
"GET",
"/backups/download",
rest_mocker,
mock_request_from_schema=True,
mock_response="imafileimafileimafileimafileimafileimafileimafile",
)(backups_api.get_download_backup)
def test_post_upload_backup(self, rest_mocker, ms_client, ms_api_schema: dict):
"""Test case for post_upload_backup"""
generate_method_test(
ms_client,
ms_api_schema,
"POST",
"/backups/upload",
rest_mocker,
mock_request_from_schema=True,
mock_response_from_schema=True,
)(backups_api.post_upload_backup)
def test_post_create_backup(self, rest_mocker, ms_client, ms_api_schema: dict):
"""Test case for post_create_backup"""
generate_method_test(
ms_client,
ms_api_schema,
"POST",
"/backups/create_backup",
rest_mocker,
mock_request_from_schema=True,
mock_response=BackupsApiData.CreateBackupResponse,
)(backups_api.post_create_backup)
def test_get_backup_job(self, rest_mocker, ms_client, ms_api_schema: dict):
"""Test case for get_backup_job"""
generate_method_test(
ms_client,
ms_api_schema,
"GET",
"/backups/create_backup/{uuid}",
rest_mocker,
mock_request_from_schema=True,
mock_response=BackupsApiData.BackupJobStatusResponse,
)(backups_api.get_backup_job)
def test_post_restore_backup(self, rest_mocker, ms_client, ms_api_schema: dict):
"""Test case for post_restore_backup"""
generate_method_test(
ms_client,
ms_api_schema,
"POST",
"/backups/restore_backup",
rest_mocker,
mock_request_from_schema=True,
mock_response_from_schema=True,
)(backups_api.post_restore_backup)
def test_get_snapshots_backup(self, rest_mocker, ms_client, ms_api_schema: dict):
"""Test case for get_snapshots_backup"""
generate_method_test(
ms_client,
ms_api_schema,
"GET",
"/snapshots_backup",
rest_mocker,
mock_request_from_schema=True,
mock_response={
"response_type": "success",
"response": {
"snapshot_backup_file": {
"backup_name": "snapshots.tgz",
"create_time": "2020-01-01T10:10:10.000",
"size": 112312312,
}
},
},
)(backups_api.get_snapshots_backup)
def test_delete_snapshots_backup(self, rest_mocker, ms_client, ms_api_schema: dict):
"""Test case for delete_snapshots_backup"""
generate_method_test(
ms_client,
ms_api_schema,
"DELETE",
"/snapshots_backup",
rest_mocker,
mock_request_from_schema=True,
mock_response_from_schema=True,
)(backups_api.delete_snapshots_backup)
def test_get_download_snapshots_backup(
self, rest_mocker, ms_client, ms_api_schema: dict
):
"""Test case for get_download_snapshots_backup"""
generate_method_test(
ms_client,
ms_api_schema,
"GET",
"/snapshots_backup/download",
rest_mocker,
mock_request_from_schema=True,
mock_response="imafileimafileimafileimafileimafileimafileimafile",
)(backups_api.get_download_snapshots_backup)
def test_post_upload_snapshots_backup(
self, rest_mocker, ms_client, ms_api_schema: dict
):
"""Test case for post_upload_snapshots_backup"""
generate_method_test(
ms_client,
ms_api_schema,
"POST",
"/snapshots_backup/upload_backup",
rest_mocker,
mock_request_from_schema=True,
mock_response_from_schema=True,
)(backups_api.post_upload_snapshots_backup)
def test_get_snapshots_upload_status(
self, rest_mocker, ms_client, ms_api_schema: dict
):
"""Test case for get_snapshots_upload_status"""
generate_method_test(
ms_client,
ms_api_schema,
"GET",
"/snapshots_backup/upload_backup/{uuid}",
rest_mocker,
mock_request_from_schema=True,
mock_response_from_schema=True,
)(backups_api.get_snapshots_upload_status)
def test_post_create_snapshots_backup(
self, rest_mocker, ms_client, ms_api_schema: dict
):
"""Test case for post_create_snapshots_backup"""
generate_method_test(
ms_client,
ms_api_schema,
"POST",
"/snapshots_backup/create_backup",
rest_mocker,
mock_request_from_schema=True,
mock_response_from_schema=True,
)(backups_api.post_create_snapshots_backup)
def test_get_snapshots_backup_status(
self, rest_mocker, ms_client, ms_api_schema: dict
):
"""Test case for get_snapshots_backup_status"""
generate_method_test(
ms_client,
ms_api_schema,
"GET",
"/snapshots_backup/create_backup/{uuid}",
rest_mocker,
mock_request_from_schema=True,
mock_response_from_schema=True,
)(backups_api.get_snapshots_backup_status)
def test_post_restore_snapshots_backup(
self, rest_mocker, ms_client, ms_api_schema: dict
):
"""Test case for post_restore_snapshots_backup"""
generate_method_test(
ms_client,
ms_api_schema,
"POST",
"/snapshots_backup/restore_backup",
rest_mocker,
mock_request_from_schema=True,
mock_response_from_schema=True,
)(backups_api.post_restore_snapshots_backup)
| 33.666667
| 123
| 0.612576
| 844
| 7,777
| 5.17891
| 0.112559
| 0.035461
| 0.068634
| 0.089224
| 0.792954
| 0.761611
| 0.74102
| 0.74102
| 0.74102
| 0.74102
| 0
| 0.007066
| 0.308474
| 7,777
| 230
| 124
| 33.813043
| 0.80569
| 0.104796
| 0
| 0.664835
| 0
| 0
| 0.097856
| 0.057022
| 0
| 0
| 0
| 0
| 0
| 1
| 0.082418
| false
| 0
| 0.038462
| 0
| 0.126374
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 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
| 5
|
63c0e5257460e80b12d15b1b3793994f1d4fcda7
| 4,447
|
py
|
Python
|
db/data/generateProductImages.py
|
lorneez/mini-amazon
|
0b707cec7e8e704fa40c537f39274ba4a50e6c36
|
[
"MIT"
] | 2
|
2021-10-21T02:30:38.000Z
|
2021-10-21T22:17:15.000Z
|
db/data/generateProductImages.py
|
lorneez/mini-amazon
|
0b707cec7e8e704fa40c537f39274ba4a50e6c36
|
[
"MIT"
] | null | null | null |
db/data/generateProductImages.py
|
lorneez/mini-amazon
|
0b707cec7e8e704fa40c537f39274ba4a50e6c36
|
[
"MIT"
] | null | null | null |
"""
generateProductImages.py
50 products --> 50 images
10 images per category
Categories:
1. Books
2. Electronics
3. Clothing
4. Games
5. Groceries
"""
def getProductImage(category, idx):
bookImages = ["https://tinyurl.com/bdew8ewr",
"https://tinyurl.com/ycktxfjs",
"https://tinyurl.com/4uuw7d7c",
"https://m.media-amazon.com/images/I/61rFgbqlcrL._AC_UY436_FMwebp_QL65_.jpg",
"https://m.media-amazon.com/images/I/71QVHBdFzAL._AC_UY436_FMwebp_QL65_.jpg",
"https://m.media-amazon.com/images/I/71QVHBdFzAL._AC_UY436_FMwebp_QL65_.jpg",
"https://m.media-amazon.com/images/I/61q1IqrlhyL._AC_UL640_FMwebp_QL65_.jpg",
"https://m.media-amazon.com/images/I/71nSoeWRPNL._AC_UL640_FMwebp_QL65_.jpg",
"https://m.media-amazon.com/images/I/710aLBwkr7L._AC_UL640_FMwebp_QL65_.jpg",
"https://m.media-amazon.com/images/I/71BkEu-sVzL._AC_UL640_FMwebp_QL65_.jpg"]
electronicImages = ["https://m.media-amazon.com/images/I/71hhgeQCrOL._AC_SX960_SY720_.jpg",
"https://m.media-amazon.com/images/I/71+2H96GHZL._AC_SX960_SY720_.jpg",
"https://m.media-amazon.com/images/I/71zRcqRQGOL._AC_SX960_SY720_.jpg",
"https://m.media-amazon.com/images/I/81eRAX3sB6L._AC_SX960_SY720_.jpg",
"https://m.media-amazon.com/images/I/81w3miL-DHL._AC_SX960_SY720_.jpg",
"https://m.media-amazon.com/images/I/81suFCdoD6L._AC_SX960_SY720_.jpg",
"https://m.media-amazon.com/images/I/61xT7CDtrwS._AC_UY436_FMwebp_QL65_.jpg",
"https://m.media-amazon.com/images/I/51utxdpV8cS._AC_UY436_FMwebp_QL65_.jpg",
"https://m.media-amazon.com/images/I/61Kq-Pz8d-L._AC_UY436_FMwebp_QL65_.jpg",
"https://m.media-amazon.com/images/I/71LJJrKbezL._AC_UY436_FMwebp_QL65_.jpg"]
clothingImages = ["https://m.media-amazon.com/images/I/91z1+DpSXIL._AC_UL640_FMwebp_QL65_.jpg",
"https://m.media-amazon.com/images/I/71A6F+t7AoL._AC_UL640_FMwebp_QL65_.jpg",
"https://m.media-amazon.com/images/I/81Sv3Z2suBL._AC_UL640_FMwebp_QL65_.jpg",
"https://m.media-amazon.com/images/I/812m6InUlzL._AC_UL640_FMwebp_QL65_.jpg",
"https://m.media-amazon.com/images/I/61s+ft92apL._AC_UL640_FMwebp_QL65_.jpg",
"https://m.media-amazon.com/images/I/81te-8XgnlL._AC_UL640_FMwebp_QL65_.jpg",
"https://m.media-amazon.com/images/I/61y-w4bewQL._MCnd_AC_UL640_FMwebp_QL65_.jpg",
"https://m.media-amazon.com/images/I/81ZAKQ1jzeL._AC_UL640_FMwebp_QL65_.jpg",
"https://m.media-amazon.com/images/I/71VQsF2tupL._AC_UL640_FMwebp_QL65_.jpg",
"https://m.media-amazon.com/images/I/71F2tjW19JS._AC_UL640_FMwebp_QL65_.jpg"]
gameImages = ["https://m.media-amazon.com/images/I/814IztfQ5LL._AC_UY436_FMwebp_QL65_.jpg",
"https://m.media-amazon.com/images/I/817zvXdCgSL._AC_UY436_FMwebp_QL65_.jpg",
"https://m.media-amazon.com/images/I/818iETWG-aL._AC_UL640_FMwebp_QL65_.jpg",
"https://m.media-amazon.com/images/I/611sCBctXuL._AC_UY436_FMwebp_QL65_.jpg",
"https://m.media-amazon.com/images/I/51PfIGfAutL._AC_UY436_FMwebp_QL65_.jpg",
"https://m.media-amazon.com/images/I/71H2kx9wTqL._AC_UY436_FMwebp_QL65_.jpg",
"https://m.media-amazon.com/images/I/71PIucvgepL._AC_UY436_QL65_.jpg",
"https://m.media-amazon.com/images/I/71YC7GYYKAL._AC_UY436_QL65_.jpg",
"https://m.media-amazon.com/images/I/81-FD3tzUlL._AC_UY436_QL65_.jpg",
"https://m.media-amazon.com/images/I/61+AtsQkQ6S._AC_UY436_FMwebp_QL65_.jpg"]
groceryImages = ["https://m.media-amazon.com/images/I/71kQY4DDlNL._AC_UL640_FMwebp_QL65_.jpg",
"https://m.media-amazon.com/images/I/81u6mQeOSmL._AC_UL640_FMwebp_QL65_.jpg",
"https://m.media-amazon.com/images/I/81DF9tHWcbL._AC_UL640_FMwebp_QL65_.jpg",
"https://m.media-amazon.com/images/I/81p6f569R0L._AC_UL640_FMwebp_QL65_.jpg",
"https://m.media-amazon.com/images/I/71luFg8EBjS._AC_UL640_FMwebp_QL65_.jpg",
"https://m.media-amazon.com/images/I/81te0dgkN4L._AC_UL640_FMwebp_QL65_.jpg",
"https://m.media-amazon.com/images/I/61jTpExBMAL._AC_UL640_FMwebp_QL65_.jpg",
"https://m.media-amazon.com/images/I/81I75zgQ1-L._AC_UL640_FMwebp_QL65_.jpg",
"https://m.media-amazon.com/images/I/817x89Wnc5S._AC_UL640_FMwebp_QL65_.jpg",
"https://m.media-amazon.com/images/I/816flmsx1JL._AC_UL640_FMwebp_QL65_.jpg"]
categoryMap = {"Books": bookImages, "Electronics": electronicImages, "Clothing": clothingImages, "Games": gameImages, "Groceries": groceryImages}
return categoryMap[category][idx]
| 37.369748
| 149
| 0.744097
| 674
| 4,447
| 4.5727
| 0.158754
| 0.091499
| 0.167748
| 0.259247
| 0.708306
| 0.67586
| 0.67586
| 0.632057
| 0.632057
| 0.632057
| 0
| 0.100714
| 0.0868
| 4,447
| 119
| 150
| 37.369748
| 0.658212
| 0.037553
| 0
| 0.037736
| 1
| 0.245283
| 0.83033
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.018868
| false
| 0
| 0
| 0
| 0.037736
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
8944db986de8d470c49b60ae27db8d00296db70e
| 46
|
py
|
Python
|
commodities/exceptions.py
|
uktrade/tamato
|
4ba2ffb25eea2887e4e081c81da7634cd7b4f9ca
|
[
"MIT"
] | 14
|
2020-03-25T11:11:29.000Z
|
2022-03-08T20:41:33.000Z
|
commodities/exceptions.py
|
uktrade/tamato
|
4ba2ffb25eea2887e4e081c81da7634cd7b4f9ca
|
[
"MIT"
] | 352
|
2020-03-25T10:42:09.000Z
|
2022-03-30T15:32:26.000Z
|
commodities/exceptions.py
|
uktrade/tamato
|
4ba2ffb25eea2887e4e081c81da7634cd7b4f9ca
|
[
"MIT"
] | 3
|
2020-08-06T12:22:41.000Z
|
2022-01-16T11:51:12.000Z
|
class InvalidIndentError(Exception):
pass
| 15.333333
| 36
| 0.782609
| 4
| 46
| 9
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.152174
| 46
| 2
| 37
| 23
| 0.923077
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 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
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
98521c28f15b03084ca47f442337a62bd25056d4
| 23
|
py
|
Python
|
app/tests/v1/views/__init__.py
|
Dave-mash/flask-blog-api
|
30a070020b1a784e71558bc0991246894dfeceed
|
[
"MIT"
] | 1
|
2019-03-23T11:36:19.000Z
|
2019-03-23T11:36:19.000Z
|
app/tests/v1/views/__init__.py
|
Dave-mash/flask-blog-api
|
30a070020b1a784e71558bc0991246894dfeceed
|
[
"MIT"
] | null | null | null |
app/tests/v1/views/__init__.py
|
Dave-mash/flask-blog-api
|
30a070020b1a784e71558bc0991246894dfeceed
|
[
"MIT"
] | null | null | null |
# pytest -p no:warnings
| 23
| 23
| 0.73913
| 4
| 23
| 4.25
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.130435
| 23
| 1
| 23
| 23
| 0.85
| 0.913043
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
985734a778f3533ccfe15a02cbcaadfbbfb5a6b2
| 2,325
|
py
|
Python
|
tests/test_networkml.py
|
lostminty/NetML-arff
|
11e933f8772f8502f5b45acf226eaab08abfb090
|
[
"Apache-2.0"
] | null | null | null |
tests/test_networkml.py
|
lostminty/NetML-arff
|
11e933f8772f8502f5b45acf226eaab08abfb090
|
[
"Apache-2.0"
] | 3
|
2020-09-25T21:03:43.000Z
|
2022-02-10T00:40:31.000Z
|
tests/test_networkml.py
|
lostminty/NetML-arff
|
11e933f8772f8502f5b45acf226eaab08abfb090
|
[
"Apache-2.0"
] | null | null | null |
import os
import sys
import pytest
from networkml.NetworkML import NetworkML
def test_networml_nofiles():
sys.argv = ['bin/networkml']
netml = NetworkML()
assert netml.model.feature_list
def test_networkml_eval_onelayer():
sys.argv = ['bin/networkml', '-p', 'tests/']
netml = NetworkML()
assert netml.model.feature_list
def test_networkml_eval_randomforest():
sys.argv = ['bin/networkml', '-p', 'tests/', '-a', 'randomforest']
os.environ['POSEIDON_PUBLIC_SESSIONS'] = ''
netml = NetworkML()
assert netml.model.feature_list
def test_networkml_eval_sos():
sys.argv = ['bin/networkml', '-p', 'tests/trace_ab12_2001-01-01_02_03-client-ip-1-2-3-4.pcap', '-a', 'sos']
netml = NetworkML()
assert netml.model.feature_list
def test_networkml_train_onelayer():
sys.argv = ['bin/networkml', '-p', 'tests/', '-o', 'train']
with pytest.raises(SystemExit) as pytest_wrapped_e:
netml = NetworkML()
assert pytest_wrapped_e.type == SystemExit
assert pytest_wrapped_e.value.code == 1
def test_networkml_train_randomforest():
sys.argv = ['bin/networkml', '-p', 'tests/',
'-o', 'train', '-a', 'randomforest', '-m', 'networkml/trained_models/randomforest/RandomForestModel.pkl']
os.environ['POSEIDON_PUBLIC_SESSIONS'] = ''
with pytest.raises(SystemExit) as pytest_wrapped_e:
netml = NetworkML()
assert pytest_wrapped_e.type == SystemExit
assert pytest_wrapped_e.value.code == 1
def test_networkml_train_sos():
sys.argv = ['bin/networkml', '-p', 'tests/', '-o', 'train',
'-a', 'sos', '-m', 'networkml/trained_models/sos/SoSmodel']
netml = NetworkML()
assert not netml.model.feature_list
def test_networkml_test_onelayer():
sys.argv = ['bin/networkml', '-p', 'tests/', '-o', 'test']
with pytest.raises(SystemExit) as pytest_wrapped_e:
netml = NetworkML()
assert pytest_wrapped_e.type == SystemExit
assert pytest_wrapped_e.value.code == 1
def test_networkml_test_randomforest():
sys.argv = ['bin/networkml', '-p', 'tests/',
'-o', 'test', '-a', 'randomforest', '-m', 'networkml/trained_models/randomforest/RandomForestModel.pkl']
os.environ['POSEIDON_PUBLIC_SESSIONS'] = ''
netml = NetworkML()
assert netml.model.feature_list
| 31.849315
| 121
| 0.669677
| 288
| 2,325
| 5.1875
| 0.204861
| 0.042169
| 0.060241
| 0.114458
| 0.843373
| 0.843373
| 0.843373
| 0.751004
| 0.66332
| 0.621151
| 0
| 0.010943
| 0.174624
| 2,325
| 72
| 122
| 32.291667
| 0.767587
| 0
| 0
| 0.538462
| 0
| 0.019231
| 0.236129
| 0.12172
| 0
| 0
| 0
| 0
| 0.230769
| 1
| 0.173077
| false
| 0
| 0.076923
| 0
| 0.25
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 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
| 5
|
985a0e556a7cd9ed43feff7ed1cb903e7edfddf8
| 203
|
py
|
Python
|
strainrec_app/routes/howto_routes.py
|
bw-ft-med-cabinet-4/DS
|
d718120cf7544240f914557f5a2473968e68dd33
|
[
"MIT"
] | null | null | null |
strainrec_app/routes/howto_routes.py
|
bw-ft-med-cabinet-4/DS
|
d718120cf7544240f914557f5a2473968e68dd33
|
[
"MIT"
] | null | null | null |
strainrec_app/routes/howto_routes.py
|
bw-ft-med-cabinet-4/DS
|
d718120cf7544240f914557f5a2473968e68dd33
|
[
"MIT"
] | 1
|
2020-10-15T21:54:04.000Z
|
2020-10-15T21:54:04.000Z
|
from flask import Blueprint, render_template
howto_routes = Blueprint("howto_routes", __name__)
@howto_routes.route("/quickstart")
def getting_started():
return render_template("quickstart.html")
| 22.555556
| 50
| 0.788177
| 24
| 203
| 6.25
| 0.666667
| 0.22
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.103448
| 203
| 8
| 51
| 25.375
| 0.824176
| 0
| 0
| 0
| 0
| 0
| 0.187192
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.2
| 0.2
| 0.6
| 0.4
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
986322316ccf4a134373e5bd48fb642dc2b73996
| 3,552
|
py
|
Python
|
tests/torchgan/test_layers.py
|
avik-pal/torchgan
|
5644d519581d751605df9763c16c4d6bd7282295
|
[
"MIT"
] | 1
|
2022-01-27T19:24:03.000Z
|
2022-01-27T19:24:03.000Z
|
tests/torchgan/test_layers.py
|
avik-pal/torchgan
|
5644d519581d751605df9763c16c4d6bd7282295
|
[
"MIT"
] | null | null | null |
tests/torchgan/test_layers.py
|
avik-pal/torchgan
|
5644d519581d751605df9763c16c4d6bd7282295
|
[
"MIT"
] | null | null | null |
import os
import sys
import unittest
import torch
from torchgan.layers import *
sys.path.append(os.path.join(os.path.dirname(__file__), "../.."))
class TestLayers(unittest.TestCase):
def match_layer_outputs(self, layer, input, output_shape):
z = layer(input)
self.assertEqual(z.shape, output_shape)
def test_residual_block2d(self):
input = torch.rand(16, 3, 10, 10)
layer = ResidualBlock2d([3, 16, 32, 3], [3, 3, 1], paddings=[1, 1, 0])
self.match_layer_outputs(layer, input, (16, 3, 10, 10))
layer = ResidualBlock2d(
[3, 16, 32, 1],
[3, 3, 1],
paddings=[1, 1, 0],
shortcut=torch.nn.Conv2d(3, 1, 3, padding=1),
)
self.match_layer_outputs(layer, input, (16, 1, 10, 10))
layer = ResidualBlock2d([3, 16, 3], [1, 1])
self.match_layer_outputs(layer, input, (16, 3, 10, 10))
def test_transposed_residula_block2d(self):
input = torch.rand(16, 3, 10, 10)
layer = ResidualBlockTranspose2d([3, 16, 32, 3], [3, 3, 1], paddings=[1, 1, 0])
self.match_layer_outputs(layer, input, (16, 3, 10, 10))
layer = ResidualBlockTranspose2d(
[3, 16, 32, 1],
[3, 3, 1],
paddings=[1, 1, 0],
shortcut=torch.nn.Conv2d(3, 1, 3, padding=1),
)
self.match_layer_outputs(layer, input, (16, 1, 10, 10))
layer = ResidualBlockTranspose2d([3, 16, 3], [1, 1])
self.match_layer_outputs(layer, input, (16, 3, 10, 10))
def test_basic_block2d(self):
input = torch.rand(16, 3, 10, 10)
layer = BasicBlock2d(3, 13, 3, 1, 1)
self.match_layer_outputs(layer, input, (16, 16, 10, 10))
layer = BasicBlock2d(3, 13, 3, 1, 1, batchnorm=False)
self.match_layer_outputs(layer, input, (16, 16, 10, 10))
def test_bottleneck_block2d(self):
input = torch.rand(16, 3, 10, 10)
layer = BottleneckBlock2d(3, 13, 3, 1, 1)
self.match_layer_outputs(layer, input, (16, 16, 10, 10))
layer = BottleneckBlock2d(3, 13, 3, 1, 1, batchnorm=False)
self.match_layer_outputs(layer, input, (16, 16, 10, 10))
def test_transition_block2d(self):
input = torch.rand(16, 3, 10, 10)
layer = TransitionBlock2d(3, 16, 3, 1, 1)
self.match_layer_outputs(layer, input, (16, 16, 10, 10))
layer = TransitionBlock2d(3, 16, 3, 1, 1, batchnorm=False)
self.match_layer_outputs(layer, input, (16, 16, 10, 10))
def test_transition_block_transpose2d(self):
input = torch.rand(16, 3, 10, 10)
layer = TransitionBlockTranspose2d(3, 16, 3, 1, 1)
self.match_layer_outputs(layer, input, (16, 16, 10, 10))
layer = TransitionBlockTranspose2d(3, 16, 3, 1, 1, batchnorm=False)
self.match_layer_outputs(layer, input, (16, 16, 10, 10))
def test_dense_block2d(self):
input = torch.rand(16, 3, 10, 10)
layer = DenseBlock2d(5, 3, 16, BottleneckBlock2d, 3, padding=1)
self.match_layer_outputs(layer, input, (16, 83, 10, 10))
def test_self_attention2d(self):
input = torch.rand(16, 88, 10, 10)
layer = SelfAttention2d(88)
self.match_layer_outputs(layer, input, (16, 88, 10, 10))
def test_spectral_norm2d(self):
input = torch.rand(16, 3, 10, 10)
layer = SpectralNorm2d(
torch.nn.Conv2d(3, 10, 3, padding=1), power_iterations=10
)
self.match_layer_outputs(layer, input, (16, 10, 10, 10))
| 28.645161
| 87
| 0.593468
| 497
| 3,552
| 4.114688
| 0.138833
| 0.052812
| 0.149633
| 0.174572
| 0.769193
| 0.759413
| 0.740342
| 0.708068
| 0.708068
| 0.570171
| 0
| 0.135652
| 0.263232
| 3,552
| 123
| 88
| 28.878049
| 0.645778
| 0
| 0
| 0.405405
| 0
| 0
| 0.001408
| 0
| 0
| 0
| 0
| 0
| 0.013514
| 1
| 0.135135
| false
| 0
| 0.067568
| 0
| 0.216216
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
988f1674c666f023bffde15493c2ee33c45abfa0
| 390
|
py
|
Python
|
Lib/site-packages/nbformat/corpus/tests/test_words.py
|
edupyter/EDUPYTER38
|
396183cea72987506f1ef647c0272a2577c56218
|
[
"bzip2-1.0.6"
] | null | null | null |
Lib/site-packages/nbformat/corpus/tests/test_words.py
|
edupyter/EDUPYTER38
|
396183cea72987506f1ef647c0272a2577c56218
|
[
"bzip2-1.0.6"
] | null | null | null |
Lib/site-packages/nbformat/corpus/tests/test_words.py
|
edupyter/EDUPYTER38
|
396183cea72987506f1ef647c0272a2577c56218
|
[
"bzip2-1.0.6"
] | null | null | null |
"""Tests for nbformat corpus"""
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
from .. import words
def test_generate_corpus_id(recwarn):
assert len(words.generate_corpus_id()) > 7
# 1 in 4294967296 (2^32) times this will fail
assert words.generate_corpus_id() != words.generate_corpus_id()
assert len(recwarn) == 0
| 27.857143
| 67
| 0.728205
| 56
| 390
| 4.910714
| 0.678571
| 0.203636
| 0.232727
| 0.229091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.049536
| 0.171795
| 390
| 13
| 68
| 30
| 0.801858
| 0.428205
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.6
| 1
| 0.2
| false
| 0
| 0.2
| 0
| 0.4
| 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
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
7f576ecc55e4bdf8d47e967f49b6b003e4eb5f3b
| 205
|
py
|
Python
|
project-1.py
|
weasal/python_coursework
|
1a8d48e9d2e36f47f5147ae4ead7cae15425acdf
|
[
"MIT"
] | null | null | null |
project-1.py
|
weasal/python_coursework
|
1a8d48e9d2e36f47f5147ae4ead7cae15425acdf
|
[
"MIT"
] | null | null | null |
project-1.py
|
weasal/python_coursework
|
1a8d48e9d2e36f47f5147ae4ead7cae15425acdf
|
[
"MIT"
] | null | null | null |
# program template for mini-project 0
# Modify the print statement according to
# the mini-project instructions
#This program prints the phrase "We want... a shrubbery!"
print "We want... a shrubbery!"
| 25.625
| 57
| 0.746341
| 30
| 205
| 5.1
| 0.666667
| 0.143791
| 0.091503
| 0.20915
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005848
| 0.165854
| 205
| 7
| 58
| 29.285714
| 0.888889
| 0.790244
| 0
| 0
| 0
| 0
| 0.605263
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 1
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
7f6271e2defecbd50f012a60d71227e4f90f789e
| 5,684
|
py
|
Python
|
tests/flytekit/unit/sdk/test_workflow.py
|
flytehub/flytekit
|
f8f53567594069b29fcd3f99abd1da71a5ef0e22
|
[
"Apache-2.0"
] | 1
|
2019-10-22T05:22:16.000Z
|
2019-10-22T05:22:16.000Z
|
tests/flytekit/unit/sdk/test_workflow.py
|
chixcode/flytekit
|
f901aee721847c6264d44079d4fa31a75b8876e1
|
[
"Apache-2.0"
] | null | null | null |
tests/flytekit/unit/sdk/test_workflow.py
|
chixcode/flytekit
|
f901aee721847c6264d44079d4fa31a75b8876e1
|
[
"Apache-2.0"
] | 1
|
2019-08-28T22:27:07.000Z
|
2019-08-28T22:27:07.000Z
|
from __future__ import absolute_import
import pytest
from flytekit.common import constants
from flytekit.common.exceptions import user as _user_exceptions
from flytekit.common.types import primitives, base_sdk_types, containers
from flytekit.sdk.tasks import python_task, inputs, outputs
from flytekit.sdk.types import Types
from flytekit.sdk.workflow import workflow, Input, Output, workflow_class
def test_input():
i = Input(primitives.Integer, help="blah", default=None)
assert i.name == ''
assert i.sdk_default is None
assert i.default == base_sdk_types.Void()
assert i.sdk_required is False
assert i.required is None
assert i.help == "blah"
assert i.var.description == "blah"
assert i.sdk_type == primitives.Integer
i = i.rename_and_return_reference('new_name')
assert i.name == 'new_name'
assert i.sdk_default is None
assert i.default == base_sdk_types.Void()
assert i.sdk_required is False
assert i.required is None
assert i.help == "blah"
assert i.var.description == "blah"
assert i.sdk_type == primitives.Integer
i = Input(primitives.Integer, default=1)
assert i.name == ''
assert i.sdk_default is 1
assert i.default == primitives.Integer(1)
assert i.sdk_required is False
assert i.required is None
assert i.help is None
assert i.var.description == ""
assert i.sdk_type == primitives.Integer
i = i.rename_and_return_reference('new_name')
assert i.name == 'new_name'
assert i.sdk_default is 1
assert i.default == primitives.Integer(1)
assert i.sdk_required is False
assert i.required is None
assert i.help is None
assert i.var.description == ""
assert i.sdk_type == primitives.Integer
with pytest.raises(_user_exceptions.FlyteAssertion):
Input(primitives.Integer, required=True, default=1)
i = Input([primitives.Integer], default=[1, 2])
assert i.name == ''
assert i.sdk_default == [1, 2]
assert i.default == containers.List(primitives.Integer)([primitives.Integer(1), primitives.Integer(2)])
assert i.sdk_required is False
assert i.required is None
assert i.help is None
assert i.var.description == ""
assert i.sdk_type == containers.List(primitives.Integer)
i = i.rename_and_return_reference('new_name')
assert i.name == 'new_name'
assert i.sdk_default == [1, 2]
assert i.default == containers.List(primitives.Integer)([primitives.Integer(1), primitives.Integer(2)])
assert i.sdk_required is False
assert i.required is None
assert i.help is None
assert i.var.description == ""
assert i.sdk_type == containers.List(primitives.Integer)
def test_output():
o = Output(1, sdk_type=primitives.Integer, help="blah")
assert o.name == ''
assert o.var.description == "blah"
assert o.var.type == primitives.Integer.to_flyte_literal_type()
assert o.binding_data.scalar.primitive.integer == 1
o = o.rename_and_return_reference('new_name')
assert o.name == 'new_name'
assert o.var.description == "blah"
assert o.var.type == primitives.Integer.to_flyte_literal_type()
assert o.binding_data.scalar.primitive.integer == 1
def _get_node_by_id(wf, nid):
for n in wf.nodes:
if n.id == nid:
return n
assert False
def test_workflow_no_node_dependencies_or_outputs():
@inputs(a=Types.Integer)
@outputs(b=Types.Integer)
@python_task
def my_task(wf_params, a, b):
b.set(a + 1)
i1 = Input(Types.Integer)
i2 = Input(Types.Integer, default=5, help='Not required.')
input_dict = {
'input_1': i1,
'input_2': i2
}
nodes = {
'a': my_task(a=input_dict['input_1']),
'b': my_task(a=input_dict['input_2']),
'c': my_task(a=100)
}
w = workflow(inputs=input_dict, outputs={}, nodes=nodes)
assert w.interface.inputs['input_1'].type == Types.Integer.to_flyte_literal_type()
assert w.interface.inputs['input_2'].type == Types.Integer.to_flyte_literal_type()
assert _get_node_by_id(w, 'a').inputs[0].var == 'a'
assert _get_node_by_id(w, 'a').inputs[0].binding.promise.node_id == constants.GLOBAL_INPUT_NODE_ID
assert _get_node_by_id(w, 'a').inputs[0].binding.promise.var == 'input_1'
assert _get_node_by_id(w, 'b').inputs[0].binding.promise.node_id == constants.GLOBAL_INPUT_NODE_ID
assert _get_node_by_id(w, 'b').inputs[0].binding.promise.var == 'input_2'
assert _get_node_by_id(w, 'c').inputs[0].binding.scalar.primitive.integer == 100
def test_workflow_metaclass_no_node_dependencies_or_outputs():
@inputs(a=Types.Integer)
@outputs(b=Types.Integer)
@python_task
def my_task(wf_params, a, b):
b.set(a + 1)
@workflow_class
class sup(object):
input_1 = Input(Types.Integer)
input_2 = Input(Types.Integer, default=5, help='Not required.')
a = my_task(a=input_1)
b = my_task(a=input_2)
c = my_task(a=100)
assert sup.interface.inputs['input_1'].type == Types.Integer.to_flyte_literal_type()
assert sup.interface.inputs['input_2'].type == Types.Integer.to_flyte_literal_type()
assert _get_node_by_id(sup, 'a').inputs[0].var == 'a'
assert _get_node_by_id(sup, 'a').inputs[0].binding.promise.node_id == constants.GLOBAL_INPUT_NODE_ID
assert _get_node_by_id(sup, 'a').inputs[0].binding.promise.var == 'input_1'
assert _get_node_by_id(sup, 'b').inputs[0].binding.promise.node_id == constants.GLOBAL_INPUT_NODE_ID
assert _get_node_by_id(sup, 'b').inputs[0].binding.promise.var == 'input_2'
assert _get_node_by_id(sup, 'c').inputs[0].binding.scalar.primitive.integer == 100
| 35.974684
| 107
| 0.69247
| 860
| 5,684
| 4.353488
| 0.111628
| 0.089744
| 0.048077
| 0.038194
| 0.790064
| 0.782051
| 0.759348
| 0.729701
| 0.683227
| 0.682158
| 0
| 0.01439
| 0.180859
| 5,684
| 157
| 108
| 36.203822
| 0.789734
| 0
| 0
| 0.523438
| 0
| 0
| 0.039233
| 0
| 0
| 0
| 0
| 0
| 0.578125
| 1
| 0.054688
| false
| 0
| 0.0625
| 0
| 0.171875
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
f6b8e3059ac52402c615ca0121ea96a496835ac6
| 27
|
py
|
Python
|
slack_api/__init__.py
|
EndoHizumi/channel-cleaner
|
8eeb95598d161108e1bcd0ae16c8ff02227a7174
|
[
"MIT"
] | 1
|
2020-03-13T09:09:04.000Z
|
2020-03-13T09:09:04.000Z
|
slack_api/__init__.py
|
challenge-every-month/channel-cleaner
|
c4dbb86a218b7eae7ef8905e757a2c5a4e919a14
|
[
"MIT"
] | null | null | null |
slack_api/__init__.py
|
challenge-every-month/channel-cleaner
|
c4dbb86a218b7eae7ef8905e757a2c5a4e919a14
|
[
"MIT"
] | 1
|
2020-03-03T11:57:41.000Z
|
2020-03-03T11:57:41.000Z
|
from slack_api.api import *
| 27
| 27
| 0.814815
| 5
| 27
| 4.2
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 27
| 1
| 27
| 27
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
f6bde9b8e5fb0549a77a404c76a88cda7d940fda
| 57
|
py
|
Python
|
01-HelloWorld/hello.py
|
MrNiebieski/boost-python-test
|
a0330a04c241575d6700a6b1d3f18a0567055afe
|
[
"BSL-1.0"
] | null | null | null |
01-HelloWorld/hello.py
|
MrNiebieski/boost-python-test
|
a0330a04c241575d6700a6b1d3f18a0567055afe
|
[
"BSL-1.0"
] | null | null | null |
01-HelloWorld/hello.py
|
MrNiebieski/boost-python-test
|
a0330a04c241575d6700a6b1d3f18a0567055afe
|
[
"BSL-1.0"
] | null | null | null |
#!/usr/bin/env python
import hello
print hello.greet()
| 9.5
| 21
| 0.719298
| 9
| 57
| 4.555556
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.140351
| 57
| 5
| 22
| 11.4
| 0.836735
| 0.350877
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.5
| null | null | 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
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 1
|
0
| 5
|
63f20884c11ce07356a0003f24206d33168f5c45
| 104
|
py
|
Python
|
tia/bbg/__init__.py
|
AmarisAI/tia
|
a7043b6383e557aeea8fc7112bbffd6e36a230e9
|
[
"BSD-3-Clause"
] | 366
|
2015-01-21T21:57:23.000Z
|
2022-03-29T09:11:24.000Z
|
tia/bbg/__init__.py
|
AmarisAI/tia
|
a7043b6383e557aeea8fc7112bbffd6e36a230e9
|
[
"BSD-3-Clause"
] | 51
|
2015-03-01T14:20:44.000Z
|
2021-08-19T15:46:51.000Z
|
tia/bbg/__init__.py
|
AmarisAI/tia
|
a7043b6383e557aeea8fc7112bbffd6e36a230e9
|
[
"BSD-3-Clause"
] | 160
|
2015-02-22T07:16:17.000Z
|
2022-03-29T13:41:15.000Z
|
from tia.bbg.v3api import *
LocalTerminal = Terminal('localhost', 8194)
from tia.bbg.datamgr import *
| 17.333333
| 43
| 0.75
| 14
| 104
| 5.571429
| 0.714286
| 0.179487
| 0.25641
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.055556
| 0.134615
| 104
| 5
| 44
| 20.8
| 0.811111
| 0
| 0
| 0
| 0
| 0
| 0.086538
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 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
| 1
| 0
|
0
| 5
|
12250a0bdfb1c0dfcfca3d037201528d0d7fe055
| 153
|
py
|
Python
|
app/routes.py
|
andrewmaximoff/aiohttp-redis-docker
|
152c296c24446ca5d3387a4e54a2f3a120899319
|
[
"MIT"
] | null | null | null |
app/routes.py
|
andrewmaximoff/aiohttp-redis-docker
|
152c296c24446ca5d3387a4e54a2f3a120899319
|
[
"MIT"
] | null | null | null |
app/routes.py
|
andrewmaximoff/aiohttp-redis-docker
|
152c296c24446ca5d3387a4e54a2f3a120899319
|
[
"MIT"
] | null | null | null |
from aiohttp import web
from app.views import index
def init_routes(app: web.Application) -> None:
app.add_routes([web.route('GET', '/', index)])
| 19.125
| 50
| 0.699346
| 23
| 153
| 4.565217
| 0.652174
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.150327
| 153
| 7
| 51
| 21.857143
| 0.807692
| 0
| 0
| 0
| 0
| 0
| 0.026144
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.5
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
d6033b7edeaccb11e007400d13b5f56a4b5b4a6b
| 356
|
py
|
Python
|
services/common/domain/game_queue_interface.py
|
tkblackbelt/Asteroids-Multiplayer-Backend
|
e09b110ec8698657d8f22f2600e95acc663b1ba0
|
[
"Apache-2.0"
] | null | null | null |
services/common/domain/game_queue_interface.py
|
tkblackbelt/Asteroids-Multiplayer-Backend
|
e09b110ec8698657d8f22f2600e95acc663b1ba0
|
[
"Apache-2.0"
] | null | null | null |
services/common/domain/game_queue_interface.py
|
tkblackbelt/Asteroids-Multiplayer-Backend
|
e09b110ec8698657d8f22f2600e95acc663b1ba0
|
[
"Apache-2.0"
] | null | null | null |
from abc import ABC, abstractmethod
from typing import List
from common.domain.game import Player
class GameQueueInterface(ABC):
@abstractmethod
def push(self, game: Player) -> bool:
pass
@abstractmethod
def pop(self, max_size: int = 1) -> List[Player]:
pass
@abstractmethod
def size(self) -> int:
pass
| 18.736842
| 53
| 0.654494
| 43
| 356
| 5.395349
| 0.511628
| 0.219828
| 0.181034
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.003788
| 0.258427
| 356
| 18
| 54
| 19.777778
| 0.875
| 0
| 0
| 0.461538
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.230769
| false
| 0.230769
| 0.230769
| 0
| 0.538462
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 5
|
d60a1fc6f3117cfd8aa648ca817c65523a8a5f5d
| 173
|
py
|
Python
|
Reto_Back_Adrian_Velazquez/ExpLab/admin.py
|
Velazquezadrian/hackthatstartup
|
e8845fb4e0f22232c4a143e2c76cc20e1087a01d
|
[
"MIT"
] | null | null | null |
Reto_Back_Adrian_Velazquez/ExpLab/admin.py
|
Velazquezadrian/hackthatstartup
|
e8845fb4e0f22232c4a143e2c76cc20e1087a01d
|
[
"MIT"
] | null | null | null |
Reto_Back_Adrian_Velazquez/ExpLab/admin.py
|
Velazquezadrian/hackthatstartup
|
e8845fb4e0f22232c4a143e2c76cc20e1087a01d
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from ExpLab.models import Employee, Experience
# Register your models here.
admin.site.register(Employee)
admin.site.register(Experience)
| 21.625
| 46
| 0.820809
| 23
| 173
| 6.173913
| 0.565217
| 0.126761
| 0.239437
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.104046
| 173
| 7
| 47
| 24.714286
| 0.916129
| 0.150289
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
d64a351c631025507a07a5a3f35359dd0a53c779
| 47
|
py
|
Python
|
hello.py
|
PES-Coding-for-OOP/Unit-0-Setup-Environment
|
a6c78259fa87b135f8caed6d6d6ed1bea6030851
|
[
"MIT"
] | null | null | null |
hello.py
|
PES-Coding-for-OOP/Unit-0-Setup-Environment
|
a6c78259fa87b135f8caed6d6d6ed1bea6030851
|
[
"MIT"
] | null | null | null |
hello.py
|
PES-Coding-for-OOP/Unit-0-Setup-Environment
|
a6c78259fa87b135f8caed6d6d6ed1bea6030851
|
[
"MIT"
] | null | null | null |
def main():
### add your code here
main()
| 9.4
| 24
| 0.553191
| 7
| 47
| 3.714286
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.276596
| 47
| 4
| 25
| 11.75
| 0.764706
| 0.382979
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.25
| 0
| 0
| null | null | 0
| 0
| null | null | 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
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
c3a60a735a3afaa6f22f14ef1a2b192eb4ca3c5f
| 2,251
|
py
|
Python
|
CV_adv/examples/penul_guided_defect.py
|
ziqi-zhang/ReMoS_artifact
|
9cbac09333aeb0891cc54d287d6829fdf4bd5d23
|
[
"MIT"
] | 4
|
2022-03-14T06:11:19.000Z
|
2022-03-16T09:21:59.000Z
|
CV_adv/examples/penul_guided_defect.py
|
ziqi-zhang/ReMoS_artifact
|
9cbac09333aeb0891cc54d287d6829fdf4bd5d23
|
[
"MIT"
] | null | null | null |
CV_adv/examples/penul_guided_defect.py
|
ziqi-zhang/ReMoS_artifact
|
9cbac09333aeb0891cc54d287d6829fdf4bd5d23
|
[
"MIT"
] | 2
|
2022-03-14T22:58:24.000Z
|
2022-03-16T05:29:37.000Z
|
import os, sys
import os.path as osp
import pandas as pd
from pdb import set_trace as st
import numpy as np
np.set_printoptions(precision = 1)
datasets = ["mit67", "cub200", "flower102", "sdog120", "stanford40"]
dataset_names = ["Scenes", "Birds", "Flowers", "Dogs", "Actions"]
methods = ["finetune", "delta", "weight", "retrain", "deltar", "renofeation", "remos"]
method_names = ["Finetune", "DELTA", "Magprune", "Retrain", "DELTA-R", "Renofeation", "ReMoS"]
model = "resnet18"
root = "results/res18_models"
m_indexes = pd.MultiIndex.from_product([dataset_names, method_names], names=["Dataset", "Techniques"])
result = pd.DataFrame(np.random.randn(2, 5*7), index=["Acc", "DIR"], columns=m_indexes)
for dataset_name, dataset in zip(dataset_names, datasets):
for method_name, method in zip(method_names, methods):
path = osp.join(root, method, f"{model}_{dataset}", "posttrain_eval.txt")
with open(path) as f:
line = f.readline()
info = line.split("|")
acc = float(info[0].split()[-1])
dir = float(info[-1].split()[-1])
result[(dataset_name, method_name)]["Acc"] = acc
result[(dataset_name, method_name)]["DIR"] = dir
print("="*30, " ResNet18 ", "="*30)
for dataset_name in dataset_names:
print(f"Dataset {dataset_name}:")
print(result[dataset_name])
model = "resnet50"
root = "results/res50_models"
m_indexes = pd.MultiIndex.from_product([dataset_names, method_names], names=["Dataset", "Techniques"])
result = pd.DataFrame(np.random.randn(2, 5*7), index=["Acc", "DIR"], columns=m_indexes)
for dataset_name, dataset in zip(dataset_names, datasets):
for method_name, method in zip(method_names, methods):
path = osp.join(root, method, f"{model}_{dataset}", "posttrain_eval.txt")
with open(path) as f:
line = f.readline()
info = line.split("|")
acc = float(info[0].split()[-1])
dir = float(info[-1].split()[-1])
result[(dataset_name, method_name)]["Acc"] = acc
result[(dataset_name, method_name)]["DIR"] = dir
print("="*30, " ResNet50 ", "="*30)
for dataset_name in dataset_names:
print(f"Dataset {dataset_name}:")
print(result[dataset_name])
| 43.288462
| 102
| 0.641937
| 297
| 2,251
| 4.717172
| 0.286195
| 0.094218
| 0.072805
| 0.065667
| 0.723769
| 0.723769
| 0.723769
| 0.723769
| 0.723769
| 0.723769
| 0
| 0.026087
| 0.182586
| 2,251
| 51
| 103
| 44.137255
| 0.735326
| 0
| 0
| 0.652174
| 0
| 0
| 0.188805
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.108696
| 0
| 0.108696
| 0.152174
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 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
| 5
|
c3aaef1e6fddaa49b9b115939e0b2234c541f740
| 53
|
py
|
Python
|
src/attrbench/metrics/runtime/__init__.py
|
zoeparman/benchmark
|
96331b7fa0db84f5f422b52cae2211b41bbd15ce
|
[
"MIT"
] | null | null | null |
src/attrbench/metrics/runtime/__init__.py
|
zoeparman/benchmark
|
96331b7fa0db84f5f422b52cae2211b41bbd15ce
|
[
"MIT"
] | 7
|
2020-03-02T13:03:50.000Z
|
2022-03-12T00:16:20.000Z
|
src/attrbench/metrics/runtime/__init__.py
|
zoeparman/benchmark
|
96331b7fa0db84f5f422b52cae2211b41bbd15ce
|
[
"MIT"
] | null | null | null |
from .runtime import runtime, RuntimeResult, Runtime
| 26.5
| 52
| 0.830189
| 6
| 53
| 7.333333
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.113208
| 53
| 1
| 53
| 53
| 0.93617
| 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
| 1
| 0
|
0
| 5
|
c3afddfc4ad61ae96a832636766c90c1f1ee9e8c
| 408
|
py
|
Python
|
classification_models/__init__.py
|
MinuteswithMetrics/classification_models
|
3caf45b4d565fd786a019518a69373a04fae90c5
|
[
"MIT"
] | null | null | null |
classification_models/__init__.py
|
MinuteswithMetrics/classification_models
|
3caf45b4d565fd786a019518a69373a04fae90c5
|
[
"MIT"
] | null | null | null |
classification_models/__init__.py
|
MinuteswithMetrics/classification_models
|
3caf45b4d565fd786a019518a69373a04fae90c5
|
[
"MIT"
] | null | null | null |
from .resnet.models import ResNet18
from .resnet.models import ResNet34
from .resnet.models import ResNet50
from .resnet.models import ResNet101
from .resnet.models import ResNet152
from .resnext.models import ResNeXt50
from .resnext.models import ResNeXt101
from .__version__ import __version__
__all__ = ['ResNet18', 'ResNet34', 'ResNet50', 'ResNet101', 'ResNet152',
'ResNeXt50', 'ResNeXt101']
| 34
| 72
| 0.776961
| 47
| 408
| 6.489362
| 0.297872
| 0.27541
| 0.262295
| 0.360656
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.095775
| 0.129902
| 408
| 12
| 73
| 34
| 0.76338
| 0
| 0
| 0
| 0
| 0
| 0.149144
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.8
| 0
| 0.8
| 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
| 1
| 0
|
0
| 5
|
c3e8b06e48359aab5c5f6c93475275e85519af70
| 2,539
|
py
|
Python
|
perks.py
|
LonlyGamerX/Dead-By-Daylight-Randomizer
|
9295fa44893b1ea898515124cb97089639b0c2bb
|
[
"MIT"
] | null | null | null |
perks.py
|
LonlyGamerX/Dead-By-Daylight-Randomizer
|
9295fa44893b1ea898515124cb97089639b0c2bb
|
[
"MIT"
] | null | null | null |
perks.py
|
LonlyGamerX/Dead-By-Daylight-Randomizer
|
9295fa44893b1ea898515124cb97089639b0c2bb
|
[
"MIT"
] | null | null | null |
survivorPerks = ('Repressed Alliance','Blood Pact','Soul Guard','Dark Sense','Deja Vu', 'Hope','Lightweight','No One Left Behind',"Plunderer's Instinct", 'Premonition', 'Resilience', 'Slippery Meat', 'Small Game', 'Spine Chill', 'This is Not Happening', "We'll Make It",'Open-Handed', 'Up the Ante', 'Ace in the Hole', 'Deliverance', 'Autodidact', 'Diversion', 'Flip-Flop', 'Buckle Up', 'Mettle of Man', 'Self Care', 'Empathy', 'Botany Knowledge', 'Leader', 'Bond', 'Prove Thyself','Dead Hard', 'No Mither', "We're Gonna Live Forever", 'Stake Out', 'Tenacity', "Detective's Hunch", 'Technician', 'Lithe', 'Alert', 'Calm Spirit', 'Iron Will', 'Saboteur', 'Head On', 'Poised', 'Solidarity', 'Aftercare', 'Breakdown', 'Distortion','Windows Of Opportunity', 'Boil Over', 'Dance With Me', 'Decisive Strike','Sole Survivor', 'Object of Obsession', 'Adrenaline', 'Sprint Burst', 'Quick and Quiet', 'Better Together','Fixated', 'Inner Strength', 'Balanced Landing', 'Urban Evasion', 'Streetwise', 'Pharmacy','Wake Up!', 'Vigil', 'Lucky Break', 'Any Means Necessary', 'Breakout', 'Babysitter', 'Camaraderie', 'Second Wind','Borrowed Time', 'Left Behind', 'Unbreakable')
killerPerks = ( 'Save the Best for Last', 'Dying Light', 'Play With your Food', 'Beast of Prey', 'Hex: Huntress Lullaby', 'Territorial Imperative', 'Remember Me', 'Blood Warden', 'Fire Up', 'Knock Out', 'Barbecue & Chilli', "Franklin's Demise", 'Make Your Choice', "Hangman's Trick", 'Surveillance', 'Bamboozle', 'Coulrophobia', 'Pop Goes The Weasel', 'Monitor & Abuse', 'Overcharge', 'Overwhelming Presence','Shadowborn', 'Bloodhound', 'Predator', 'Enduring', 'Lightborn' 'Tinkerer', 'Agitation', 'Unnerving Presence', 'Brutal Strength', "Nurse's Calling", 'Stridor', 'Thanatophobia', 'Hex: Devour Hope', 'Hex: Ruin', 'Hex: The Third Seal', 'Spirit Fury', 'Hex: Haunted Ground', 'Rancor', 'Discordance', 'Iron Maiden', 'Mad Grit', 'Corrupt Intervention', 'Dark Devotion', 'Infectious Fright', 'Furtive Chase', "I'm All Ears", 'Thrilling Tremors', 'Cruel Limits', 'Mindbreaker', 'Surge', 'Blood Echo', 'Nemesis', 'Zanshin Tactics', 'Gear Head', "Dead Man's Switch", 'Hex: Retribution', 'Bitter Murmur', 'Deerstalker', 'Distressing', 'Insidious', 'Iron Grasp', 'Monstrous Shrine', 'No One Escapes Death', 'Sloppy Butcher', 'Spies From The Shadows', 'Thrill of the Hunt', 'Unrelenting', 'Whispers', 'Forced Penance', 'Trail of Torment', 'Deathbound')
| 846.333333
| 1,318
| 0.658133
| 293
| 2,539
| 5.703072
| 0.83959
| 0.005984
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.157936
| 2,539
| 3
| 1,318
| 846.333333
| 0.781572
| 0
| 0
| 0
| 0
| 0
| 0.709055
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
c3f65d9d2284b07bd11ce0c3a66e52992713e78f
| 183
|
py
|
Python
|
mmcif/io/__init__.py
|
epeisach/py-mmcif
|
f44cb8e4a1699c1f254f873fadced1f4461763f6
|
[
"Apache-2.0"
] | 9
|
2019-08-29T09:43:02.000Z
|
2022-01-11T01:00:39.000Z
|
mmcif/io/__init__.py
|
epeisach/py-mmcif
|
f44cb8e4a1699c1f254f873fadced1f4461763f6
|
[
"Apache-2.0"
] | 7
|
2018-07-03T16:04:38.000Z
|
2022-03-23T05:54:37.000Z
|
mmcif/io/__init__.py
|
epeisach/py-mmcif
|
f44cb8e4a1699c1f254f873fadced1f4461763f6
|
[
"Apache-2.0"
] | 10
|
2019-03-05T18:06:59.000Z
|
2022-01-27T03:32:19.000Z
|
#
#
try:
from mmcif.io.IoAdapterCore import IoAdapterCore as IoAdapter # noqa: F401
except Exception:
from mmcif.io.IoAdapterPy import IoAdapterPy as IoAdapter # noqa: F401
| 26.142857
| 79
| 0.754098
| 23
| 183
| 6
| 0.565217
| 0.130435
| 0.15942
| 0.275362
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.04
| 0.180328
| 183
| 6
| 80
| 30.5
| 0.88
| 0.114754
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 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
| 5
|
c3f9cc5cf08f6904dabebf5c7adedd608de225a7
| 224
|
py
|
Python
|
drl/agents/preprocessing/vision.py
|
lucaslingle/pytorch_drl
|
6b2c1142a36553ce5dcb0a5768767579676d5791
|
[
"MIT"
] | null | null | null |
drl/agents/preprocessing/vision.py
|
lucaslingle/pytorch_drl
|
6b2c1142a36553ce5dcb0a5768767579676d5791
|
[
"MIT"
] | null | null | null |
drl/agents/preprocessing/vision.py
|
lucaslingle/pytorch_drl
|
6b2c1142a36553ce5dcb0a5768767579676d5791
|
[
"MIT"
] | null | null | null |
from drl.agents.preprocessing.abstract import Preprocessing
class ToChannelMajor(Preprocessing):
def __init__(self):
super().__init__()
def forward(self, x, **kwargs):
return x.permute(0, 3, 1, 2)
| 22.4
| 59
| 0.678571
| 27
| 224
| 5.333333
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.022346
| 0.200893
| 224
| 9
| 60
| 24.888889
| 0.782123
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.166667
| 0.166667
| 0.833333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
7f0dca7fdbd0281664930931d7f628d043814816
| 139
|
py
|
Python
|
votaciones/admin.py
|
marthalilianamd/SIVORE
|
7f0d6c2c79aa909e6cecbf5f562ebe64f40a560d
|
[
"Apache-2.0"
] | 1
|
2016-02-11T05:01:49.000Z
|
2016-02-11T05:01:49.000Z
|
votaciones/admin.py
|
marthalilianamd/SIVORE
|
7f0d6c2c79aa909e6cecbf5f562ebe64f40a560d
|
[
"Apache-2.0"
] | 89
|
2016-01-29T00:04:48.000Z
|
2016-07-05T15:52:30.000Z
|
votaciones/admin.py
|
Jorgesolis1989/SIVORE
|
7f0d6c2c79aa909e6cecbf5f562ebe64f40a560d
|
[
"Apache-2.0"
] | 2
|
2016-02-08T15:16:12.000Z
|
2016-05-14T02:33:06.000Z
|
from django.contrib import admin
from votaciones.models import Votacion_Log
# Register your models here.
admin.site.register(Votacion_Log)
| 27.8
| 42
| 0.841727
| 20
| 139
| 5.75
| 0.65
| 0.191304
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.100719
| 139
| 5
| 43
| 27.8
| 0.92
| 0.18705
| 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
| 1
| 0
|
0
| 5
|
7f10daa357e73830e86e176429f62ebb1165e399
| 208
|
py
|
Python
|
packageit/test.py
|
hendrikdutoit/PackageIt
|
c9358c97f3bc99fd33a8ff9abea23dc26e538d4f
|
[
"MIT"
] | null | null | null |
packageit/test.py
|
hendrikdutoit/PackageIt
|
c9358c97f3bc99fd33a8ff9abea23dc26e538d4f
|
[
"MIT"
] | 39
|
2021-12-25T01:02:44.000Z
|
2022-01-24T08:17:37.000Z
|
packageit/test.py
|
hendrikdutoit/PackageIt
|
c9358c97f3bc99fd33a8ff9abea23dc26e538d4f
|
[
"MIT"
] | null | null | null |
class Pizza:
def __init__(self, ingredients):
self.ingredients = ingredients
def __repr__(self):
return f"Pizza({self.ingredients!r})"
print(Pizza(["cheese", "tomatoes"]))
| 20.8
| 46
| 0.620192
| 22
| 208
| 5.5
| 0.590909
| 0.371901
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.240385
| 208
| 9
| 47
| 23.111111
| 0.765823
| 0
| 0
| 0
| 0
| 0
| 0.20603
| 0.135678
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0.166667
| 0.666667
| 0.166667
| 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
| 1
| 0
| 0
|
0
| 5
|
617d43d8af6955c11c6f523d89e880f6dcf8fe9f
| 150
|
py
|
Python
|
mail/admin.py
|
tomwhross/web50-mail
|
0538e30e7f73e82bbbcf2ff6ee260b9858d3d1ed
|
[
"MIT"
] | null | null | null |
mail/admin.py
|
tomwhross/web50-mail
|
0538e30e7f73e82bbbcf2ff6ee260b9858d3d1ed
|
[
"MIT"
] | null | null | null |
mail/admin.py
|
tomwhross/web50-mail
|
0538e30e7f73e82bbbcf2ff6ee260b9858d3d1ed
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from .models import Email, User
admin.site.register(Email)
admin.site.register(User)
# Register your models here.
| 16.666667
| 32
| 0.786667
| 22
| 150
| 5.363636
| 0.545455
| 0.152542
| 0.288136
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.126667
| 150
| 8
| 33
| 18.75
| 0.900763
| 0.173333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
61ca9ed02e81f6f0e43616801ee5d05cca3b95bd
| 158
|
py
|
Python
|
base_django_api/router.py
|
aeasringnar/-django-RESTfulAPI
|
3065f7617dc3534005ab94cd08324c2b51526634
|
[
"MIT"
] | 242
|
2019-07-05T06:15:26.000Z
|
2022-03-30T17:51:06.000Z
|
base_django_api/router.py
|
aeasringnar/-django-RESTfulAPI
|
3065f7617dc3534005ab94cd08324c2b51526634
|
[
"MIT"
] | 11
|
2019-10-16T09:17:26.000Z
|
2022-03-15T05:51:29.000Z
|
base_django_api/router.py
|
aeasringnar/-django-RESTfulAPI
|
3065f7617dc3534005ab94cd08324c2b51526634
|
[
"MIT"
] | 37
|
2019-09-29T01:11:27.000Z
|
2022-03-29T07:08:25.000Z
|
class Router(object):
def db_for_read(self, model, **hints):
return 'read'
def db_for_write(self, model, **hints):
return 'default'
| 19.75
| 43
| 0.613924
| 21
| 158
| 4.428571
| 0.619048
| 0.107527
| 0.172043
| 0.430108
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.253165
| 158
| 7
| 44
| 22.571429
| 0.788136
| 0
| 0
| 0
| 0
| 0
| 0.070064
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.4
| false
| 0
| 0
| 0.4
| 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
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 5
|
4ee04c61ab5038b8025544054098927c47d7ea89
| 213
|
py
|
Python
|
torchreid/engine/image/__init__.py
|
kirillProkofiev/deep-object-reid
|
2abc96ec49bc0005ed556e203925354fdf12165c
|
[
"MIT"
] | null | null | null |
torchreid/engine/image/__init__.py
|
kirillProkofiev/deep-object-reid
|
2abc96ec49bc0005ed556e203925354fdf12165c
|
[
"MIT"
] | null | null | null |
torchreid/engine/image/__init__.py
|
kirillProkofiev/deep-object-reid
|
2abc96ec49bc0005ed556e203925354fdf12165c
|
[
"MIT"
] | null | null | null |
from __future__ import absolute_import
from .softmax import ImageSoftmaxEngine
from .am_softmax import ImageAMSoftmaxEngine
from .triplet import ImageTripletEngine
from .contrastive import ImageContrastiveEngine
| 30.428571
| 47
| 0.882629
| 22
| 213
| 8.272727
| 0.545455
| 0.142857
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.098592
| 213
| 6
| 48
| 35.5
| 0.947917
| 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
| 1
| 0
|
0
| 5
|
4ee2a35140aa9bb5cb70f05c9841e1208ccf37df
| 176
|
py
|
Python
|
challenges/00_introduction/test_A.py
|
deniederhut/workshop_pyintensive
|
f8f494081c6daabeae0724aa058c2b80fe42878b
|
[
"BSD-2-Clause"
] | 1
|
2016-10-04T00:04:56.000Z
|
2016-10-04T00:04:56.000Z
|
challenges/00_introduction/test_A.py
|
deniederhut/workshop_pyintensive
|
f8f494081c6daabeae0724aa058c2b80fe42878b
|
[
"BSD-2-Clause"
] | 8
|
2015-12-26T05:49:39.000Z
|
2016-05-26T00:10:57.000Z
|
challenges/00_introduction/test_A.py
|
deniederhut/workshop_pyintensive
|
f8f494081c6daabeae0724aa058c2b80fe42878b
|
[
"BSD-2-Clause"
] | null | null | null |
#!/bin/env python
import pytest
import sys
import A_objects as A
def test_version():
assert A.version > (3,4)
def test_dillon():
assert isinstance(A.dillon, float)
| 13.538462
| 38
| 0.704545
| 28
| 176
| 4.321429
| 0.642857
| 0.115702
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.013986
| 0.1875
| 176
| 12
| 39
| 14.666667
| 0.832168
| 0.090909
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.285714
| 1
| 0.285714
| true
| 0
| 0.428571
| 0
| 0.714286
| 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
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
4ee909de79c62bc6f80a30df33bd9647bff7a7f1
| 155
|
py
|
Python
|
tests/test_imports.py
|
bukowa/django-georangefilter
|
a2437b0a54d0098b903eae886c2d5a2ec26e6ffa
|
[
"Unlicense"
] | 1
|
2018-06-04T16:17:02.000Z
|
2018-06-04T16:17:02.000Z
|
tests/test_imports.py
|
bukowa/django-georangefilter
|
a2437b0a54d0098b903eae886c2d5a2ec26e6ffa
|
[
"Unlicense"
] | null | null | null |
tests/test_imports.py
|
bukowa/django-georangefilter
|
a2437b0a54d0098b903eae886c2d5a2ec26e6ffa
|
[
"Unlicense"
] | null | null | null |
from django.test import SimpleTestCase
class PackageImportTestCase(SimpleTestCase):
def test_can_import_package(self):
import georangefilter
| 22.142857
| 44
| 0.8
| 16
| 155
| 7.5625
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.154839
| 155
| 6
| 45
| 25.833333
| 0.923664
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 1
| 0
| 1.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
f600db522dbd7410cab1aa5e42e6f1f10af68bd0
| 82
|
py
|
Python
|
samplepack/__init__.py
|
jensqin/samplepack
|
49e0799154968ac9fc6eb2510d6972f091fd1676
|
[
"MIT"
] | 1
|
2021-06-11T14:20:01.000Z
|
2021-06-11T14:20:01.000Z
|
samplepack/__init__.py
|
jensqin/samplepack
|
49e0799154968ac9fc6eb2510d6972f091fd1676
|
[
"MIT"
] | null | null | null |
samplepack/__init__.py
|
jensqin/samplepack
|
49e0799154968ac9fc6eb2510d6972f091fd1676
|
[
"MIT"
] | 1
|
2021-06-11T14:20:03.000Z
|
2021-06-11T14:20:03.000Z
|
from samplepack.sample01 import sample01
from samplepack.sample02 import sample02
| 27.333333
| 40
| 0.878049
| 10
| 82
| 7.2
| 0.5
| 0.388889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.108108
| 0.097561
| 82
| 2
| 41
| 41
| 0.864865
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
f60adcc891304e34ac9d85d108b6a232b4bf0c93
| 172
|
py
|
Python
|
scipy/optimize/_lsq/__init__.py
|
Ennosigaeon/scipy
|
2d872f7cf2098031b9be863ec25e366a550b229c
|
[
"BSD-3-Clause"
] | 9,095
|
2015-01-02T18:24:23.000Z
|
2022-03-31T20:35:31.000Z
|
scipy/optimize/_lsq/__init__.py
|
Ennosigaeon/scipy
|
2d872f7cf2098031b9be863ec25e366a550b229c
|
[
"BSD-3-Clause"
] | 11,500
|
2015-01-01T01:15:30.000Z
|
2022-03-31T23:07:35.000Z
|
scipy/optimize/_lsq/__init__.py
|
Ennosigaeon/scipy
|
2d872f7cf2098031b9be863ec25e366a550b229c
|
[
"BSD-3-Clause"
] | 5,838
|
2015-01-05T11:56:42.000Z
|
2022-03-31T23:21:19.000Z
|
"""This module contains least-squares algorithms."""
from .least_squares import least_squares
from .lsq_linear import lsq_linear
__all__ = ['least_squares', 'lsq_linear']
| 28.666667
| 52
| 0.790698
| 23
| 172
| 5.478261
| 0.478261
| 0.380952
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.104651
| 172
| 5
| 53
| 34.4
| 0.818182
| 0.267442
| 0
| 0
| 0
| 0
| 0.191667
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
f62ed672364b9c1e481236017d1eb7da5c0ce403
| 7,322
|
py
|
Python
|
Finance2Go/solvers/ContinuousInterest.py
|
DenManokhin/Finance2Go
|
d8ad58ad8d6957e3b1c5809e44105552f6cfa05c
|
[
"MIT"
] | null | null | null |
Finance2Go/solvers/ContinuousInterest.py
|
DenManokhin/Finance2Go
|
d8ad58ad8d6957e3b1c5809e44105552f6cfa05c
|
[
"MIT"
] | 4
|
2021-11-19T23:36:19.000Z
|
2021-12-07T22:41:43.000Z
|
Finance2Go/solvers/ContinuousInterest.py
|
DenManokhin/Finance2Go
|
d8ad58ad8d6957e3b1c5809e44105552f6cfa05c
|
[
"MIT"
] | null | null | null |
import numpy as np
# 1
def get_accumulated_value_with_growth_force(n: int, p: float,
delta: float) -> float:
""""
Повертає нарощена суму у випадку використання сили росту.
Parameters
----------
n : int
Термін угоди, виражений у роках
p : float
Сума грошей (капітал), що даються в борг
delta : float
Неперервна ставка нарощення (сила росту)
Returns
-------
S : float Нарощена сума.
"""
return p * np.exp(n * delta)
# 2
def get_continuous_interest(i: float) -> float:
""""
Повертає неперервну ставку нарощення.
Parameters
----------
i : float
Складна дискретна ставка нарощення
Returns
-------
delta : float Неперервна ставка нарощення.
"""
return np.log(1 + i)
# 3
def get_discrete_interest(delta: float) -> float:
""""
Повертає складну дискретна ставка нарощення.
Parameters
----------
delta : float
Складна неперервна ставку нарощення
Returns
-------
i : float Дискретна ставка нарощення.
"""
return np.exp(delta) - 1
# 4
def get_mathematical_discounting_with_growth_force(n: int, s: float,
delta: float) -> float:
""""
Повертає визначення теперішньої суми боргу P за відомою кінцевою сумою S.
Parameters
----------
n : int
Термін кредиту у роках
s : float
Нарощена сума боргу
delta : float
Неперервна ставка нарощення (сила росту)
Returns
-------
P : float Математична дисконтована вартість.
"""
return s * np.exp(-delta * n)
# 5
def get_build_up_multiplier_for_linear_function(n: int, a: float,
delta: float) -> float:
""""
Повертає множник нарощення у випадку використання змінної сили росту
для лінійної залежності.
Parameters
----------
n : int
Термін кредиту у роках
a : float
Приріст сили росту за одиницю часу
delta : float
Початкове значення сили росту
Returns
-------
: float Множник нарощення.
"""
return np.exp(delta * n + (a * n**2) / 2)
# 6
def get_build_up_multiplier_for_exp_function(n: int, a: float,
delta: float) -> float:
""""
Повертає множник нарощення у випадку використання змінної сили росту
для експоненціальної залежності.
Parameters
----------
n : int
Термін кредиту у роках
a : float
Приріст сили росту за одиницю часу
delta : float
Початкове значення сили росту
Returns
-------
: float Множник нарощення.
"""
return (delta / np.log(a)) * (a**n - 1)
# 7
def get_accumulated_value_with_changeable_growth_force(n: int,
a: float,
p: float,
delta: float,
func_type: str) -> \
float:
""""
Повертає нарощена суму у випадку використання змінної сили росту.
Parameters
----------
n : int
Термін кредиту у роках
a : float
Приріст сили росту за одиницю часу
p : float
Сума грошей (капітал), що даються в борг
delta : float
Неперервна ставка нарощення (сила росту)
func_type: str
Тип неперервної функції (linear або exp)
Returns
-------
S : float Нарощена сума.
"""
if func_type == "linear":
return p * get_build_up_multiplier_for_linear_function(n, a, delta)
elif func_type == "exp":
return p * get_build_up_multiplier_for_exp_function(n, a, delta)
else:
pass
# 8
def get_mathematical_discounting_with_changeable_growth_force(
n: int,
a: float,
s: float,
delta: float,
func_type: str) -> float:
""""
Повертає визначення теперішньої суми боргу P за відомою кінцевою сумою S.
Parameters
----------
n : int
Термін кредиту у роках
a : float
Приріст сили росту за одиницю часу
s : float
Нарощена сума боргу
delta : float
Неперервна ставка нарощення (сила росту)
func_type: str
Тип неперервної функції (linear або exp)
Returns
-------
P : float Математична дисконтована вартість.
"""
if func_type == "linear":
return s * get_build_up_multiplier_for_linear_function(n, a, delta)
elif func_type == "exp":
return s * get_build_up_multiplier_for_exp_function(n, a, delta)
else:
pass
# 9
def get_loan_term_with_growth_force(s: float, p: float,
delta: float) -> float:
""""
Повертає термін кредиту у роках для нарощення з постійно силою росту.
Parameters
----------
s : float
Нарощена сума боргу
p : float
Сума грошей (капітал), що даються в борг
delta : float
Неперервна ставка нарощення (сила росту)
Returns
-------
n : float Термін кредиту.
"""
return np.log(s / p) / delta
# 10
def get_continuous_rate_with_growth_force(n: int, p: float,
s: float) -> float:
""""
Повертає неперервну ставку для нарощення з постійно силою росту.
Parameters
----------
n : int
Термін угоди, виражений у роках
p : float
Сума грошей (капітал), що даються в борг
s : float
Нарощена сума боргу
Returns
-------
delta : float Неперервна ставка.
"""
return np.log(s / p) / n
# 11
def get_loan_term_with_changeable_growth_force(a: float, p: float,
s: float,
delta: float) -> float:
""""
Повертає термін кредиту у роках для нарощення зі змінною силою росту.
Parameters
----------
a : float
Приріст сили росту за одиницю часу
p : float
Сума грошей (капітал), що даються в борг
s : float
Нарощена сума боргу
delta : float
Неперервна ставка нарощення (сила росту)
Returns
-------
n : float Термін кредиту.
"""
return np.log(1 + (np.log(a) * np.log(s / p) / delta)) / np.log(a)
# 12
def get_continuous_rate_with_changeable_growth_force(n: int, a: float,
p: float,
s: float) -> float:
""""
Повертає неперервну ставку для нарощення зі змінною силою росту.
Parameters
----------
n : int
Термін угоди, виражений у роках
a : float
Приріст сили росту за одиницю часу
p : float
Сума грошей (капітал), що даються в борг
s : float
Нарощена сума боргу
Returns
-------
delta : float Неперервна ставка.
"""
return (np.log(a) * np.log(s / p)) / (a**n - 1)
| 26.338129
| 77
| 0.526086
| 788
| 7,322
| 4.771574
| 0.149746
| 0.055851
| 0.047872
| 0.062234
| 0.892553
| 0.781117
| 0.743883
| 0.681649
| 0.641755
| 0.641755
| 0
| 0.00487
| 0.383092
| 7,322
| 277
| 78
| 26.433213
| 0.82754
| 0.49044
| 0
| 0.436364
| 0
| 0
| 0.006002
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.218182
| false
| 0.036364
| 0.018182
| 0
| 0.490909
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
f65bbe07fb11515923271c806e235a306382c761
| 37
|
py
|
Python
|
coordinator/SwitchOracles/__init__.py
|
TotalKnob/muse
|
3c4a05d2a3ffc3bceb6827207a2a4a1a63aba503
|
[
"Apache-2.0"
] | 122
|
2019-11-12T18:43:32.000Z
|
2022-01-30T15:11:43.000Z
|
coordinator/SwitchOracles/__init__.py
|
TotalKnob/muse
|
3c4a05d2a3ffc3bceb6827207a2a4a1a63aba503
|
[
"Apache-2.0"
] | 14
|
2020-04-02T07:31:46.000Z
|
2022-03-25T07:35:59.000Z
|
coordinator/SwitchOracles/__init__.py
|
TotalKnob/muse
|
3c4a05d2a3ffc3bceb6827207a2a4a1a63aba503
|
[
"Apache-2.0"
] | 34
|
2019-11-12T18:43:34.000Z
|
2021-12-22T07:46:03.000Z
|
from oracle import get_switch_oracle
| 18.5
| 36
| 0.891892
| 6
| 37
| 5.166667
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.108108
| 37
| 1
| 37
| 37
| 0.939394
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
f677f647ebf8811bcbaaad98110ca329e748efa8
| 214
|
py
|
Python
|
python/testlint/test/example.py
|
mpsonntag/snippets
|
fc3cc42ea49b885c1f29c0aef1379055a931a978
|
[
"BSD-3-Clause"
] | null | null | null |
python/testlint/test/example.py
|
mpsonntag/snippets
|
fc3cc42ea49b885c1f29c0aef1379055a931a978
|
[
"BSD-3-Clause"
] | null | null | null |
python/testlint/test/example.py
|
mpsonntag/snippets
|
fc3cc42ea49b885c1f29c0aef1379055a931a978
|
[
"BSD-3-Clause"
] | null | null | null |
def add_up(a, b):
return a + b
def test_add_up_succeed():
assert add_up(1, 2) == 3
def test_add_up_fail():
assert add_up(1, 2) == 4
def ignore_me():
assert "I will be" == "completely ignored"
| 14.266667
| 46
| 0.616822
| 39
| 214
| 3.128205
| 0.538462
| 0.204918
| 0.163934
| 0.196721
| 0.213115
| 0
| 0
| 0
| 0
| 0
| 0
| 0.037037
| 0.242991
| 214
| 14
| 47
| 15.285714
| 0.716049
| 0
| 0
| 0
| 0
| 0
| 0.126168
| 0
| 0
| 0
| 0
| 0
| 0.375
| 1
| 0.5
| false
| 0
| 0
| 0.125
| 0.625
| 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
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
9c9604ffbc36f9f7552b9a6bd9c3920bc9879260
| 634
|
py
|
Python
|
e.g._mocking_decorator/target.py
|
thinkAmi-sandbox/python_mock-sample
|
ba8714e5fe375bf2f74810eb0bb99e996adac09e
|
[
"Unlicense"
] | 6
|
2017-03-09T02:14:47.000Z
|
2021-03-17T09:29:51.000Z
|
e.g._mocking_decorator/target.py
|
thinkAmi-sandbox/python_mock-sample
|
ba8714e5fe375bf2f74810eb0bb99e996adac09e
|
[
"Unlicense"
] | null | null | null |
e.g._mocking_decorator/target.py
|
thinkAmi-sandbox/python_mock-sample
|
ba8714e5fe375bf2f74810eb0bb99e996adac09e
|
[
"Unlicense"
] | null | null | null |
from deco.my_decorator import countup, countdown, add, calculate
class Target:
def __init__(self, value=0):
self.value = value
@countup
def execute_count_up(self):
return self.value
@countdown
def execute_count_down(self):
return self.value
@add(2)
def execute_add(self):
return self.value
@calculate(1, 2, 3)
def execute_calculate_increment(self):
return self.value
@calculate(1, 2, 3, is_decrement=True)
def execute_calculate_decrement(self):
return self.value
if __name__ == '__main__':
t = Target()
print(t.execute_add())
| 20.451613
| 64
| 0.648265
| 82
| 634
| 4.719512
| 0.402439
| 0.162791
| 0.180879
| 0.245478
| 0.160207
| 0.160207
| 0.160207
| 0.160207
| 0
| 0
| 0
| 0.016913
| 0.253943
| 634
| 30
| 65
| 21.133333
| 0.801269
| 0
| 0
| 0.227273
| 0
| 0
| 0.012618
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.272727
| false
| 0
| 0.045455
| 0.227273
| 0.590909
| 0.045455
| 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
| 1
| 0
|
0
| 5
|
9c9af43acf8c7654d51d3a0d0e83a218ca4e79ff
| 576
|
py
|
Python
|
spec/python/test_expr_int_div.py
|
DarkShadow44/kaitai_struct_tests
|
4bb13cef82965cca66dda2eb2b77cd64e9f70a12
|
[
"MIT"
] | 11
|
2018-04-01T03:58:15.000Z
|
2021-08-14T09:04:55.000Z
|
spec/python/test_expr_int_div.py
|
DarkShadow44/kaitai_struct_tests
|
4bb13cef82965cca66dda2eb2b77cd64e9f70a12
|
[
"MIT"
] | 73
|
2016-07-20T10:27:15.000Z
|
2020-12-17T18:56:46.000Z
|
spec/python/test_expr_int_div.py
|
DarkShadow44/kaitai_struct_tests
|
4bb13cef82965cca66dda2eb2b77cd64e9f70a12
|
[
"MIT"
] | 37
|
2016-08-15T08:25:56.000Z
|
2021-08-28T14:48:46.000Z
|
# Autogenerated from KST: please remove this line if doing any edits by hand!
import unittest
from expr_int_div import ExprIntDiv
class TestExprIntDiv(unittest.TestCase):
def test_expr_int_div(self):
with ExprIntDiv.from_file('src/fixed_struct.bin') as r:
self.assertEqual(r.int_u, 1262698832)
self.assertEqual(r.int_s, -52947)
self.assertEqual(r.div_pos_const, 756)
self.assertEqual(r.div_neg_const, -757)
self.assertEqual(r.div_pos_seq, 97130679)
self.assertEqual(r.div_neg_seq, -4073)
| 33.882353
| 77
| 0.689236
| 81
| 576
| 4.691358
| 0.567901
| 0.236842
| 0.252632
| 0.2
| 0.231579
| 0
| 0
| 0
| 0
| 0
| 0
| 0.073661
| 0.222222
| 576
| 16
| 78
| 36
| 0.774554
| 0.130208
| 0
| 0
| 1
| 0
| 0.04008
| 0
| 0
| 0
| 0
| 0
| 0.545455
| 1
| 0.090909
| false
| 0
| 0.181818
| 0
| 0.363636
| 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
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
9c9e279f927cb808bcf51c6fa389d60b40e0b05e
| 560
|
py
|
Python
|
symbol.py
|
adamchau/mas_sim
|
42eca43915ebf0df4e3842e657cf4ecb26802a6b
|
[
"MIT"
] | null | null | null |
symbol.py
|
adamchau/mas_sim
|
42eca43915ebf0df4e3842e657cf4ecb26802a6b
|
[
"MIT"
] | null | null | null |
symbol.py
|
adamchau/mas_sim
|
42eca43915ebf0df4e3842e657cf4ecb26802a6b
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
"""
Created on Fri Dec 26 16:09:52 2014
@author: ydzhao
"""
import sympy as spy
spy.init_printing(use_unicode=True)
a1=spy.symbols('a1')
a2=spy.symbols('a2')
a3=spy.symbols('a3')
a4=spy.symbols('a4')
a5=spy.symbols('a5')
deltaA=spy.Matrix([[-0.04743*a1,0,0,0,0,0,0,0,0,0],\
[0,-0.0763*a2,0,0,0,0,0,0,0,0],\
[0,0,0,0,0,0,0,0,0,0],\
[0,0,0,0,0,0,0,0,0,0],\
[0,-0.017408*a3,0,0,0,0,0,0,0,0],\
[-0.008981*a4,-0.28926*a5,0,0,0,0,0,0,0,0],\
[0,0,0,0,0,0,0,0,0,0],\
[0,0,0,0,0,0,0,0,0,0],\
[0,0,0,0,0,0,0,0,0,0],\
[0,0,0,0,0,0,0,0,0,0]])
| 20
| 52
| 0.566071
| 157
| 560
| 2.006369
| 0.235669
| 0.596825
| 0.857143
| 1.092063
| 0.311111
| 0.311111
| 0.311111
| 0.311111
| 0.311111
| 0.28254
| 0
| 0.296724
| 0.073214
| 560
| 27
| 53
| 20.740741
| 0.310212
| 0.133929
| 0
| 0.294118
| 0
| 0
| 0.021097
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.058824
| 0
| 0.058824
| 0.058824
| 0
| 0
| 0
| null | 1
| 1
| 1
| 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
| 5
|
9cab78bf24f8a19344adfa03c5e78b16f9344428
| 26
|
py
|
Python
|
application/mod_map/__init__.py
|
hieusydo/Voyage
|
2a98118131fad927326d318ae1766e64bbb5add8
|
[
"MIT"
] | 1
|
2018-04-23T05:16:49.000Z
|
2018-04-23T05:16:49.000Z
|
application/mod_map/__init__.py
|
hieusydo/Voyage
|
2a98118131fad927326d318ae1766e64bbb5add8
|
[
"MIT"
] | null | null | null |
application/mod_map/__init__.py
|
hieusydo/Voyage
|
2a98118131fad927326d318ae1766e64bbb5add8
|
[
"MIT"
] | null | null | null |
# Needed to import mod_map
| 26
| 26
| 0.807692
| 5
| 26
| 4
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.153846
| 26
| 1
| 26
| 26
| 0.909091
| 0.923077
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
9cabb06e7d0e0fed11ec8eb8f94403bcecb84e44
| 35
|
py
|
Python
|
__init__.py
|
cj-mclaughlin/segmentation_research
|
6d59ffccdb274430b2ef02258d120f65db9004d5
|
[
"MIT"
] | 1
|
2021-07-19T04:46:46.000Z
|
2021-07-19T04:46:46.000Z
|
__init__.py
|
cj-mclaughlin/segmentation_research
|
6d59ffccdb274430b2ef02258d120f65db9004d5
|
[
"MIT"
] | null | null | null |
__init__.py
|
cj-mclaughlin/segmentation_research
|
6d59ffccdb274430b2ef02258d120f65db9004d5
|
[
"MIT"
] | null | null | null |
from segmentation_research import *
| 35
| 35
| 0.885714
| 4
| 35
| 7.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.085714
| 35
| 1
| 35
| 35
| 0.9375
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
9cb65c1ea4ee70b1665df0fc35f246a1cac57ba3
| 95
|
py
|
Python
|
app/routes/__init__.py
|
UtkarshMish/ondc_text_parsing
|
3fa2f8153d40ee12b462b22ac40f8b62cbcf2533
|
[
"MIT"
] | null | null | null |
app/routes/__init__.py
|
UtkarshMish/ondc_text_parsing
|
3fa2f8153d40ee12b462b22ac40f8b62cbcf2533
|
[
"MIT"
] | null | null | null |
app/routes/__init__.py
|
UtkarshMish/ondc_text_parsing
|
3fa2f8153d40ee12b462b22ac40f8b62cbcf2533
|
[
"MIT"
] | null | null | null |
from .api import api_route
from .home import home_route
__all__ = ("home_route", "api_route")
| 19
| 37
| 0.757895
| 15
| 95
| 4.266667
| 0.4
| 0.25
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.136842
| 95
| 4
| 38
| 23.75
| 0.780488
| 0
| 0
| 0
| 0
| 0
| 0.2
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
9cc5b99798f2fc191e7dec1457ad0183effa9d57
| 19
|
py
|
Python
|
catboost/python-package/catboost/version.py
|
notimesea/catboost
|
1d3e0744f1d6c6d74d724878dc9fe92076c8b1ce
|
[
"Apache-2.0"
] | 1
|
2021-10-30T05:50:36.000Z
|
2021-10-30T05:50:36.000Z
|
catboost/python-package/catboost/version.py
|
notimesea/catboost
|
1d3e0744f1d6c6d74d724878dc9fe92076c8b1ce
|
[
"Apache-2.0"
] | null | null | null |
catboost/python-package/catboost/version.py
|
notimesea/catboost
|
1d3e0744f1d6c6d74d724878dc9fe92076c8b1ce
|
[
"Apache-2.0"
] | null | null | null |
VERSION = '0.24.2'
| 9.5
| 18
| 0.578947
| 4
| 19
| 2.75
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.25
| 0.157895
| 19
| 1
| 19
| 19
| 0.4375
| 0
| 0
| 0
| 0
| 0
| 0.315789
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
142698335ad500bf03082f9bcef56d7ce13f5469
| 58
|
py
|
Python
|
fpga/myhdl/simple/__init__.py
|
wingel/sds7102
|
77d85533d2ddfd26a0fb45f3ceff4cf8e6ff447a
|
[
"MIT"
] | 47
|
2016-07-16T20:03:19.000Z
|
2021-12-21T03:35:41.000Z
|
fpga/myhdl/simple/__init__.py
|
wingel/sds7102
|
77d85533d2ddfd26a0fb45f3ceff4cf8e6ff447a
|
[
"MIT"
] | null | null | null |
fpga/myhdl/simple/__init__.py
|
wingel/sds7102
|
77d85533d2ddfd26a0fb45f3ceff4cf8e6ff447a
|
[
"MIT"
] | 15
|
2016-07-29T08:10:11.000Z
|
2020-11-28T15:49:55.000Z
|
#! /usr/bin/python
from __future__ import absolute_import
| 19.333333
| 38
| 0.810345
| 8
| 58
| 5.25
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.103448
| 58
| 2
| 39
| 29
| 0.807692
| 0.293103
| 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
| 1
| 0
|
0
| 5
|
142c7a477611360c6f9df8bb9e1e2818e0cee22e
| 41
|
py
|
Python
|
tests/__init__.py
|
yukihiko-shinoda/asyncffmpeg
|
1980aec3065b19cd9d0fffacf1953327062818b8
|
[
"MIT"
] | 8
|
2021-04-14T13:39:25.000Z
|
2022-03-10T06:51:50.000Z
|
tests/__init__.py
|
yukihiko-shinoda/asyncffmpeg
|
1980aec3065b19cd9d0fffacf1953327062818b8
|
[
"MIT"
] | 4
|
2021-03-18T14:13:27.000Z
|
2021-12-26T13:16:32.000Z
|
tests/__init__.py
|
yukihiko-shinoda/asyncffmpeg
|
1980aec3065b19cd9d0fffacf1953327062818b8
|
[
"MIT"
] | 2
|
2021-08-02T18:32:19.000Z
|
2021-12-23T19:51:31.000Z
|
"""Unit test package for asyncffmpeg."""
| 20.5
| 40
| 0.707317
| 5
| 41
| 5.8
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.121951
| 41
| 1
| 41
| 41
| 0.805556
| 0.829268
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
144918db93ef7dc8b44344aaebc017c20af5f234
| 9,501
|
py
|
Python
|
tests/pipelining_test.py
|
NunoEdgarGFlowHub/poptorch
|
2e69b81c7c94b522d9f57cc53d31be562f5e3749
|
[
"MIT"
] | null | null | null |
tests/pipelining_test.py
|
NunoEdgarGFlowHub/poptorch
|
2e69b81c7c94b522d9f57cc53d31be562f5e3749
|
[
"MIT"
] | null | null | null |
tests/pipelining_test.py
|
NunoEdgarGFlowHub/poptorch
|
2e69b81c7c94b522d9f57cc53d31be562f5e3749
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python3
# Copyright (c) 2020 Graphcore Ltd. All rights reserved.
import json
import torch
import poptorch
import pytest
import helpers
def test_missing_block():
poptorch.setLogLevel(1) # Force debug logging
class Model(torch.nn.Module):
def forward(self, x):
poptorch.Block.useAutoId()
with poptorch.Block(ipu_id=0):
x = x * 4
x = x * 4
return x
m = Model()
opts = poptorch.Options()
opts.deviceIterations(2)
opts.setExecutionStrategy(
poptorch.PipelinedExecution(poptorch.AutoStage.AutoIncrement))
m = poptorch.inferenceModel(m, opts)
with pytest.raises(RuntimeError, match="No active Block"):
m.compile(torch.randn(2, 5))
def test_api_inline(capfd):
poptorch.setLogLevel(1) # Force debug logging
class Model(torch.nn.Module):
def forward(self, x):
poptorch.Block.useAutoId()
with poptorch.Block(ipu_id=0):
x = x * 4
with poptorch.Block(ipu_id=1):
x = x * 2
return x
m = Model()
opts = poptorch.Options()
opts.deviceIterations(2)
m = poptorch.inferenceModel(m, opts)
m(torch.randn(2, 5))
log = helpers.LogChecker(capfd)
log.assert_contains("enablePipelining set to value 1")
log.assert_contains(" Mul:0 ", " mode(Pipelined), ipu(0), stage(0)")
log.assert_contains(" Mul:0/1 ", " mode(Pipelined), ipu(1), stage(1)")
def test_recomputation_checkpoint():
poptorch.setLogLevel(1) # Force debug logging
size = 3
class Model(torch.nn.Module):
def __init__(self, checkpoint=False):
super().__init__()
self.checkpoint = checkpoint
weight = torch.nn.Parameter(torch.rand(size, size),
requires_grad=True)
self.register_parameter("weight", weight)
def forward(self, x, target):
poptorch.Block.useAutoId()
with poptorch.Block(ipu_id=0):
x = torch.matmul(self.weight, x)
if self.checkpoint:
x = poptorch.recomputationCheckpoint(x)
x = torch.matmul(self.weight, x)
with poptorch.Block(ipu_id=1):
x = x * 2
return x, torch.nn.functional.l1_loss(x, target)
m = Model()
opts = poptorch.Options()
opts.deviceIterations(6)
opts.Popart.set("autoRecomputation", 3) # All forward pipeline stages.
m = poptorch.trainingModel(Model(), opts)
m.compile(torch.randn(size * 6, 1), torch.randn(size * 6, 1))
ir = json.loads(m._debugGetPopartIR()) # pylint: disable=protected-access
assert not any(["Checkpoint" in node["name"] for node in ir["maingraph"]
]), ("Popart IR shouldn't contain any checkpoint")
assert sum(["Stash" in node["type"] for node in ir["maingraph"]
]) == 1, ("Only the graph input should be stashed")
m = poptorch.trainingModel(Model(True), opts)
m.compile(torch.randn(size * 6, 1), torch.randn(size * 6, 1))
ir = json.loads(m._debugGetPopartIR()) # pylint: disable=protected-access
assert any(["Checkpoint" in node["name"] for node in ir["maingraph"]
]), ("Popart IR should contain a checkpoint")
assert sum([
"Stash" in node["type"] for node in ir["maingraph"]
]) == 2, ("Both the graph input and the checkpoint should be stashed")
def test_api_wrap(capfd):
"""
stage "0" ipu(0) stage(0) l0 l1 l2
"""
poptorch.setLogLevel(1) # Force debug logging
class Block(torch.nn.Module):
def forward(self, x):
return x * 6
class Model(torch.nn.Module):
def __init__(self):
super().__init__()
self.l1 = Block()
self.l2 = Block()
def forward(self, x):
x = self.l1(x)
x = self.l2(x)
return x
m = Model()
m.l1 = poptorch.BeginBlock(m.l1, ipu_id=0)
m.l2 = poptorch.BeginBlock(m.l2, ipu_id=0)
opts = poptorch.Options()
opts.deviceIterations(2)
m = poptorch.inferenceModel(m, opts)
m(torch.randn(2, 5))
log = helpers.LogChecker(capfd)
log.assert_contains("enablePipelining set to value 0")
log.assert_contains(" Mul:0 ", " mode(Pipelined), ipu(0), stage(0)")
log.assert_contains(" Mul:0/1 ", " mode(Pipelined), ipu(0), stage(0)")
def test_api_wrap_2stages(capfd):
"""
stage "0" ipu(0) stage(0) l0
stage "1" ipu(1) stage(1) l1 / l2
"""
poptorch.setLogLevel(1) # Force debug logging
class Block(torch.nn.Module):
def forward(self, x):
return x * 6
class Model(torch.nn.Module):
def __init__(self):
super().__init__()
self.l0 = Block()
self.l1 = Block()
self.l2 = Block()
def forward(self, x):
x = self.l0(x)
x = self.l1(x)
x = self.l2(x)
return x
m = Model()
m.l1 = poptorch.BeginBlock(m.l1, ipu_id=1)
m.l2 = poptorch.BeginBlock(m.l2, ipu_id=1)
opts = poptorch.Options()
opts.deviceIterations(2)
m = poptorch.inferenceModel(m, opts)
m(torch.randn(2, 5))
log = helpers.LogChecker(capfd)
log.assert_contains("enablePipelining set to value 1")
log.assert_contains(" Mul:0 ", " mode(Pipelined), ipu(0), stage(0)")
log.assert_contains(" Mul:0/1 ", " mode(Pipelined), ipu(1), stage(1)")
log.assert_contains(" Mul:0/2 ", " mode(Pipelined), ipu(1), stage(1)")
def test_inline_AutoIncrement(capfd):
poptorch.setLogLevel(1) # Force debug logging
class Model(torch.nn.Module):
def forward(self, x):
poptorch.Block.useAutoId()
with poptorch.Block(ipu_id=0):
x = x * 2
with poptorch.Block(ipu_id=1):
x = x * 3
with poptorch.Block(ipu_id=2):
x = x * 4
with poptorch.Block(ipu_id=1):
x = x * 5
return x
m = Model()
opts = poptorch.Options()
opts.deviceIterations(4).autoRoundNumIPUs(True)
opts.setExecutionStrategy(
poptorch.PipelinedExecution(poptorch.AutoStage.AutoIncrement))
m = poptorch.inferenceModel(m, opts)
m.compile(torch.randn(4, 5))
log = helpers.LogChecker(capfd)
log.assert_contains("enablePipelining set to value 1")
log.assert_contains(" Mul:0 ", " mode(Pipelined), ipu(0), stage(1)")
log.assert_contains(" Mul:0/1 ", " mode(Pipelined), ipu(1), stage(2)")
log.assert_contains(" Mul:0/2 ", " mode(Pipelined), ipu(2), stage(3)")
log.assert_contains(" Mul:0/3 ", " mode(Pipelined), ipu(1), stage(4)")
def test_api_AutoIncrement(capfd):
poptorch.setLogLevel(1) # Force debug logging
class Block(torch.nn.Module):
def forward(self, x):
return x * 6
class Model(torch.nn.Module):
def __init__(self):
super().__init__()
self.l1 = Block()
self.l2 = Block()
self.l3 = Block()
self.l4 = Block()
def forward(self, x):
x = self.l1(x)
x = self.l2(x)
x = self.l3(x)
x = self.l4(x)
return x
m = Model()
m.l2 = poptorch.BeginBlock(m.l2, ipu_id=1)
m.l3 = poptorch.BeginBlock(m.l3, ipu_id=2)
m.l4 = poptorch.BeginBlock(m.l4, ipu_id=1)
opts = poptorch.Options()
opts.deviceIterations(4).autoRoundNumIPUs(True)
opts.setExecutionStrategy(
poptorch.PipelinedExecution(poptorch.AutoStage.AutoIncrement))
m = poptorch.inferenceModel(m, opts)
m(torch.randn(4, 5))
log = helpers.LogChecker(capfd)
log.assert_contains("enablePipelining set to value 1")
log.assert_contains(" Mul:0 ", " mode(Pipelined), ipu(0), stage(0)")
log.assert_contains(" Mul:0/1 ", " mode(Pipelined), ipu(1), stage(1)")
log.assert_contains(" Mul:0/2 ", " mode(Pipelined), ipu(2), stage(2)")
log.assert_contains(" Mul:0/3 ", " mode(Pipelined), ipu(1), stage(3)")
@pytest.mark.skipif(not poptorch.ipuHardwareIsAvailable(),
reason="Round up only needed for IPU Hardware")
def test_ipu_round_up_error():
class Block(torch.nn.Module):
def forward(self, x):
return x * 6
class Model(torch.nn.Module):
def __init__(self):
super().__init__()
self.l1 = Block()
self.l2 = Block()
self.l3 = Block()
def forward(self, x):
x = self.l1(x)
x = self.l2(x)
x = self.l3(x)
return x
m = Model()
m.l1 = poptorch.BeginBlock(m.l2, ipu_id=0)
m.l2 = poptorch.BeginBlock(m.l2, ipu_id=1)
m.l3 = poptorch.BeginBlock(m.l3, ipu_id=2)
opts = poptorch.Options()
opts.setExecutionStrategy(
poptorch.PipelinedExecution(poptorch.AutoStage.AutoIncrement))
m = poptorch.inferenceModel(m, opts)
error_msg = (
".+The model specifies the use of 3 IPUs, however PopTorch must "
"reserve a minimum of 4 in order to allow the model to run, "
"because PopTorch must reserve a power of 2 or a multiple of 64"
r" IPUs\. Please reconfigure your model to use a different "
r"number of IPUs or set poptorch\.Options\(\)\."
r"autoRoundNumIPUs\(True\)\.")
with pytest.raises(RuntimeError, match=error_msg):
m(torch.randn(4, 5))
| 31.460265
| 78
| 0.588991
| 1,234
| 9,501
| 4.449757
| 0.138574
| 0.008013
| 0.06192
| 0.054635
| 0.782735
| 0.763067
| 0.744127
| 0.734839
| 0.710799
| 0.697323
| 0
| 0.029579
| 0.277655
| 9,501
| 301
| 79
| 31.564784
| 0.770509
| 0.043048
| 0
| 0.692982
| 0
| 0
| 0.158413
| 0.005417
| 0
| 0
| 0
| 0
| 0.105263
| 1
| 0.109649
| false
| 0
| 0.02193
| 0.017544
| 0.236842
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 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
| 5
|
147dc3d6ab144dc6640c46ec6afe5b850b2affbf
| 259
|
py
|
Python
|
Darlington/phase1/python Basic 2/day 24 solution/qtn2.py
|
CodedLadiesInnovateTech/-python-challenge-solutions
|
430cd3eb84a2905a286819eef384ee484d8eb9e7
|
[
"MIT"
] | 6
|
2020-05-23T19:53:25.000Z
|
2021-05-08T20:21:30.000Z
|
Darlington/phase1/python Basic 2/day 24 solution/qtn2.py
|
CodedLadiesInnovateTech/-python-challenge-solutions
|
430cd3eb84a2905a286819eef384ee484d8eb9e7
|
[
"MIT"
] | 8
|
2020-05-14T18:53:12.000Z
|
2020-07-03T00:06:20.000Z
|
Darlington/phase1/python Basic 2/day 24 solution/qtn2.py
|
CodedLadiesInnovateTech/-python-challenge-solutions
|
430cd3eb84a2905a286819eef384ee484d8eb9e7
|
[
"MIT"
] | 39
|
2020-05-10T20:55:02.000Z
|
2020-09-12T17:40:59.000Z
|
#program to check whether a given integer is a palindrome or not.
def is_Palindrome(n):
return str(n) == str(n)[::-1]
print(is_Palindrome(100))
print(is_Palindrome(252))
print(is_Palindrome(-838))
print(is_Palindrome('swims'))
print(is_Palindrome(1001))
| 32.375
| 65
| 0.741313
| 42
| 259
| 4.428571
| 0.52381
| 0.387097
| 0.456989
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.060606
| 0.108108
| 259
| 8
| 66
| 32.375
| 0.744589
| 0.247104
| 0
| 0
| 0
| 0
| 0.025641
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.142857
| false
| 0
| 0
| 0.142857
| 0.285714
| 0.714286
| 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
| 0
| 1
| 0
| 1
|
0
| 5
|
14b85ff66f1e4b6db22b5f9f4a49ec7d948b29f1
| 113
|
py
|
Python
|
configuracao/admin.py
|
Moisestuli/karrata
|
962ce0c573214bfc83720727c9cacae823a8c372
|
[
"MIT"
] | null | null | null |
configuracao/admin.py
|
Moisestuli/karrata
|
962ce0c573214bfc83720727c9cacae823a8c372
|
[
"MIT"
] | null | null | null |
configuracao/admin.py
|
Moisestuli/karrata
|
962ce0c573214bfc83720727c9cacae823a8c372
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from configuracao.models import Configuracao
admin.site.register(Configuracao)
| 22.6
| 44
| 0.858407
| 14
| 113
| 6.928571
| 0.642857
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.088496
| 113
| 4
| 45
| 28.25
| 0.941748
| 0
| 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
| 1
| 0
|
0
| 5
|
1ad9652ad4a77a8a5daa6198d53d4bfdb4bc5d77
| 33
|
py
|
Python
|
spikeforest/spikesorters/ironclust/__init__.py
|
mhhennig/spikeforest
|
5b4507ead724af3de0be5d48a3b23aaedb0be170
|
[
"Apache-2.0"
] | 1
|
2021-09-23T01:07:19.000Z
|
2021-09-23T01:07:19.000Z
|
spikeforest/spikesorters/ironclust/__init__.py
|
mhhennig/spikeforest
|
5b4507ead724af3de0be5d48a3b23aaedb0be170
|
[
"Apache-2.0"
] | null | null | null |
spikeforest/spikesorters/ironclust/__init__.py
|
mhhennig/spikeforest
|
5b4507ead724af3de0be5d48a3b23aaedb0be170
|
[
"Apache-2.0"
] | 1
|
2021-09-23T01:07:21.000Z
|
2021-09-23T01:07:21.000Z
|
from .ironclust import IronClust
| 16.5
| 32
| 0.848485
| 4
| 33
| 7
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.121212
| 33
| 1
| 33
| 33
| 0.965517
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
1ae8b0c77774dbc030e11b3b332110a8d7be41ca
| 97
|
py
|
Python
|
kube_hunter/modules/report/__init__.py
|
wongearl/kube-hunter
|
00eb0dfa87d8a1b2932f2fa0bfc67c57e7a4ed03
|
[
"Apache-2.0"
] | 3,521
|
2018-08-15T15:43:57.000Z
|
2022-03-31T07:17:39.000Z
|
kube_hunter/modules/report/__init__.py
|
wongearl/kube-hunter
|
00eb0dfa87d8a1b2932f2fa0bfc67c57e7a4ed03
|
[
"Apache-2.0"
] | 350
|
2018-08-16T16:13:12.000Z
|
2022-03-22T16:22:36.000Z
|
kube_hunter/modules/report/__init__.py
|
wongearl/kube-hunter
|
00eb0dfa87d8a1b2932f2fa0bfc67c57e7a4ed03
|
[
"Apache-2.0"
] | 551
|
2018-08-15T15:53:27.000Z
|
2022-03-30T02:53:40.000Z
|
# flake8: noqa: E402
from kube_hunter.modules.report.factory import get_reporter, get_dispatcher
| 32.333333
| 75
| 0.835052
| 14
| 97
| 5.571429
| 0.928571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.045455
| 0.092784
| 97
| 2
| 76
| 48.5
| 0.840909
| 0.185567
| 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
| 1
| 0
|
0
| 5
|
1af6858bbb903592f72ae3591f7ca22c13bc3a84
| 1,451
|
py
|
Python
|
tests/lib/locations/test_check_file_extension.py
|
Kilobyte22/ffflash
|
44bdecf24065fc37fe189ba2e683f767711e4dcf
|
[
"BSD-3-Clause"
] | 2
|
2016-04-20T14:13:46.000Z
|
2017-01-27T23:43:01.000Z
|
tests/lib/locations/test_check_file_extension.py
|
spookey/changeffapi
|
44bdecf24065fc37fe189ba2e683f767711e4dcf
|
[
"BSD-3-Clause"
] | 1
|
2021-05-10T20:34:36.000Z
|
2021-05-10T20:34:36.000Z
|
tests/lib/locations/test_check_file_extension.py
|
Kilobyte22/ffflash
|
44bdecf24065fc37fe189ba2e683f767711e4dcf
|
[
"BSD-3-Clause"
] | 2
|
2016-01-21T19:22:37.000Z
|
2021-01-19T13:18:16.000Z
|
from ffflash.lib.locations import check_file_extension
def test_check_file_extension_no_ext():
assert check_file_extension('file') == (None, None)
assert check_file_extension('file', '') == (None, None)
assert check_file_extension('file.txt') == (None, None)
assert check_file_extension('file.txt', '') == (None, None)
assert check_file_extension('file.txt', '.') == (None, None)
assert check_file_extension('file.txt', '..') == (None, None)
assert check_file_extension('file.txt', 'file') == (None, None)
assert check_file_extension('file', 'file') == (None, None)
def test_check_file_extension():
for ext in ['txt', '.txt', 'TXT', '.TXT', 'tXt', '.tXt', 'TxT', '.TxT']:
assert check_file_extension('file.txt', ext) == ('file', '.txt')
assert check_file_extension(
'file.json', 'txt', 'yaml'
) == (None, None)
assert check_file_extension(
'file.json', 'txt', 'yaml', 'json'
) == ('file', '.json')
def test_check_file_extension_dir(tmpdir):
assert check_file_extension(
str(tmpdir.join('file.txt')), 'txt'
) == ('file', '.txt')
assert check_file_extension(
str(tmpdir.join('file.txt')), 'json'
) == (None, None)
assert check_file_extension(
str(tmpdir.join('file.txt'))
) == (None, None)
assert check_file_extension(
str(tmpdir.join('out')), 'txt'
) == (None, None)
assert tmpdir.remove() is None
| 32.977273
| 76
| 0.619573
| 182
| 1,451
| 4.697802
| 0.142857
| 0.2
| 0.4
| 0.421053
| 0.835088
| 0.747368
| 0.694737
| 0.65731
| 0.519298
| 0.302924
| 0
| 0
| 0.19366
| 1,451
| 43
| 77
| 33.744186
| 0.730769
| 0
| 0
| 0.30303
| 0
| 0
| 0.135768
| 0
| 0
| 0
| 0
| 0
| 0.484848
| 1
| 0.090909
| false
| 0
| 0.030303
| 0
| 0.121212
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
211af4df5dbb683b5ebdc4a57a47c20bcdbfc597
| 61
|
py
|
Python
|
rouver/__init__.py
|
srittau/rouver
|
29f3b9ca3e96eafc8ceb60e64c40308a5de6c9f6
|
[
"MIT"
] | 1
|
2018-02-27T00:31:15.000Z
|
2018-02-27T00:31:15.000Z
|
rouver/__init__.py
|
srittau/rouver
|
29f3b9ca3e96eafc8ceb60e64c40308a5de6c9f6
|
[
"MIT"
] | 69
|
2017-10-21T15:57:55.000Z
|
2022-03-29T06:56:26.000Z
|
rouver/__init__.py
|
srittau/rouver
|
29f3b9ca3e96eafc8ceb60e64c40308a5de6c9f6
|
[
"MIT"
] | null | null | null |
from .util import absolute_url as absolute_url # noqa: F401
| 30.5
| 60
| 0.786885
| 10
| 61
| 4.6
| 0.8
| 0.478261
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.058824
| 0.163934
| 61
| 1
| 61
| 61
| 0.843137
| 0.163934
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
21528a55a5f288c108c86fcd21208d94e7b0885f
| 82
|
py
|
Python
|
tests/utils/test_utils.py
|
Jimmy-INL/pysensors
|
62b79a233a551ae01125e20e06fde0c96b4dffd2
|
[
"MIT"
] | 43
|
2020-10-26T14:43:56.000Z
|
2022-03-03T16:03:15.000Z
|
tests/utils/test_utils.py
|
Jimmy-INL/pysensors
|
62b79a233a551ae01125e20e06fde0c96b4dffd2
|
[
"MIT"
] | 4
|
2020-11-10T11:15:15.000Z
|
2022-01-07T16:05:11.000Z
|
tests/utils/test_utils.py
|
Jimmy-INL/pysensors
|
62b79a233a551ae01125e20e06fde0c96b4dffd2
|
[
"MIT"
] | 13
|
2020-10-14T10:38:38.000Z
|
2022-01-03T09:05:15.000Z
|
# TODO: include some unit tests once there are more functions
# in this submodule
| 27.333333
| 61
| 0.780488
| 13
| 82
| 4.923077
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.182927
| 82
| 2
| 62
| 41
| 0.955224
| 0.939024
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0.5
| 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
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
dcca08805697066c5d40a74bd183ef98c1ca0a79
| 57
|
py
|
Python
|
admin_email_sender/tests/__init__.py
|
stasfilin/django-admin-email-sender
|
8abb82f45ffebf47e4abcc1a2eda8225e3448668
|
[
"Apache-2.0"
] | 8
|
2018-01-22T00:48:40.000Z
|
2020-05-24T11:40:22.000Z
|
admin_email_sender/tests/__init__.py
|
stasfilin/django-admin-email-sender
|
8abb82f45ffebf47e4abcc1a2eda8225e3448668
|
[
"Apache-2.0"
] | 6
|
2018-01-20T19:18:49.000Z
|
2020-06-27T11:38:59.000Z
|
admin_email_sender/tests/__init__.py
|
stasfilin/django-admin-email-sender
|
8abb82f45ffebf47e4abcc1a2eda8225e3448668
|
[
"Apache-2.0"
] | 2
|
2018-09-14T19:27:30.000Z
|
2020-05-24T11:40:28.000Z
|
from .test_models import *
from .test_validators import *
| 28.5
| 30
| 0.807018
| 8
| 57
| 5.5
| 0.625
| 0.363636
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.122807
| 57
| 2
| 30
| 28.5
| 0.88
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
dcf022812996a768686e6ff59b91ea7868f113fb
| 223
|
py
|
Python
|
scvelo/preprocessing/__init__.py
|
saksham219/scvelo
|
41fb2a90ae6a71577cf2c55b80e1ade4407891b7
|
[
"BSD-3-Clause"
] | null | null | null |
scvelo/preprocessing/__init__.py
|
saksham219/scvelo
|
41fb2a90ae6a71577cf2c55b80e1ade4407891b7
|
[
"BSD-3-Clause"
] | null | null | null |
scvelo/preprocessing/__init__.py
|
saksham219/scvelo
|
41fb2a90ae6a71577cf2c55b80e1ade4407891b7
|
[
"BSD-3-Clause"
] | null | null | null |
from .utils import show_proportions, cleanup, filter_genes, filter_genes_dispersion, normalize_per_cell, log1p, \
filter_and_normalize, recipe_velocity
from .neighbors import pca, neighbors
from .moments import moments
| 44.6
| 113
| 0.834081
| 29
| 223
| 6.103448
| 0.655172
| 0.124294
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005051
| 0.112108
| 223
| 4
| 114
| 55.75
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.75
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
0d0bc21e63c2c002f3303402dca6101e048f5d46
| 28,924
|
py
|
Python
|
app/util/nanote.py
|
bbedward/monkeytalks
|
2f40a0cf7f9a9b8690e2c13fe86113a43ceeca09
|
[
"MIT"
] | 9
|
2019-04-01T13:42:41.000Z
|
2021-12-30T20:32:48.000Z
|
app/util/nanote.py
|
bbedward/monkeytalks
|
2f40a0cf7f9a9b8690e2c13fe86113a43ceeca09
|
[
"MIT"
] | 1
|
2021-08-01T00:00:06.000Z
|
2021-08-01T00:00:06.000Z
|
app/util/nanote.py
|
bbedward/monkeytalks
|
2f40a0cf7f9a9b8690e2c13fe86113a43ceeca09
|
[
"MIT"
] | 8
|
2019-04-26T15:32:56.000Z
|
2021-08-09T11:52:53.000Z
|
class Nanote():
"""Implementation of some Nanote logic in python for server-side validation"""
sikrit = 895175784877
charsets = [" etaoinsrhl"," 1234567890"," 1234567890'"," etaoinsrhl'"," 1234567890'"," etaoinsrhl'"," 1234567890'"," etaoinsrhl'"," 1234567890]"," etaoinsrhl]"," 1234567890["," etaoinsrhl["," 1234567890:"," etaoinsrhl:"," 1234567890;"," etaoinsrhl;"," 1234567890>"," etaoinsrhld"," 1234567890<"," etaoinsrhl<"," 1234567890/"," etaoinsrhl/"," 1234567890?"," etaoinsrhl?"," etaoinsrhl>"," etaoinsrhl~"," 1234567890."," etaoinsrhl."," 1234567890,"," etaoinsrhl,"," 1234567890="," etaoinsrhl="," 1234567890+"," etaoinsrhl+"," 1234567890_"," etaoinsrhl_"," 1234567890-"," etaoinsrhl-"," 1234567890)"," etaoinsrhl)"," 1234567890("," etaoinsrhl("," 1234567890*"," etaoinsrhl*"," 1234567890&"," etaoinsrhl&"," 1234567890%"," etaoinsrhl%"," 1234567890$"," 1234567890~"," etaoinsrhl!"," etaoinsrhl$"," 1234567890#"," etaoinsrhl#"," 1234567890@"," etaoinsrhl@"," 1234567890!"," etaoinsrhld$"," etaoinsrhld_"," etaoinsrhld'"," etaoinsrhld@"," etaoinsrhld-"," etaoinsrhld="," etaoinsrhld'"," etaoinsrhld,"," etaoinsrhld#"," etaoinsrhld)"," etaoinsrhld."," etaoinsrhld~"," etaoinsrhld?"," etaoinsrhld!"," etaoinsrhld+"," etaoinsrhld("," etaoinsrhld/"," etaoinsrhld<"," etaoinsrhld>"," etaoinsrhld*"," etaoinsrhld%"," etaoinsrhld;"," etaoinsrhld:"," etaoinsrhld'"," etaoinsrhld["," etaoinsrhldc"," etaoinsrhld]"," etaoinsrhld&"," etaoinsrhldc_"," etaoinsrhldc'"," etaoinsrhldc+"," etaoinsrhldc$"," etaoinsrhldc'"," etaoinsrhldc,"," etaoinsrhldc/"," etaoinsrhldc)"," etaoinsrhldc<"," etaoinsrhldc@"," etaoinsrhldc>"," etaoinsrhldc*"," etaoinsrhldc#"," etaoinsrhldc-"," etaoinsrhldc%"," etaoinsrhldc~"," etaoinsrhldc;"," etaoinsrhldc["," etaoinsrhldc'"," etaoinsrhldc."," etaoinsrhldc:"," etaoinsrhldcu"," etaoinsrhldc="," etaoinsrhldc]"," etaoinsrhldc?"," etaoinsrhldc&"," etaoinsrhldc("," etaoinsrhldc!"," etaoinsrhldcu$"," etaoinsrhldcu!"," etaoinsrhldcu;"," etaoinsrhldcu'"," etaoinsrhl()-_"," 1234567890$%&*"," etaoinsrhldcu/"," etaoinsrhldcu#"," etaoinsrhldcu="," etaoinsrhl$%&*"," 1234567890~!@#"," etaoinsrhldcu<"," etaoinsrhldcu~"," etaoinsrhldcu'"," etaoinsrhl~!@#"," etaoinsrhldcu>"," etaoinsrhldcu*"," etaoinsrhldcu@"," etaoinsrhldcu-"," etaoinsrhldcu."," etaoinsrhl?/<>"," etaoinsrhldcu%"," 1234567890+=,."," etaoinsrhldcu_"," 1234567890;:[]"," etaoinsrhldcu'"," etaoinsrhldcu+"," etaoinsrhl+=,."," 1234567890()-_"," etaoinsrhldcu:"," etaoinsrhldcu?"," etaoinsrhldcu("," etaoinsrhldcu]"," etaoinsrhldcu,"," etaoinsrhldcu)"," etaoinsrhldcu&"," etaoinsrhl;:[]"," 1234567890?/<>"," etaoinsrhldcu["," etaoinsrhldcum"," etaoinsrhldcum["," etaoinsrhldcum&"," etaoinsrhldcum_"," etaoinsrhldcum]"," etaoinsrhldcum'"," etaoinsrhldcum+"," etaoinsrhldcum-"," etaoinsrhldcum@"," etaoinsrhldcum'"," etaoinsrhldcum:"," etaoinsrhldcum="," etaoinsrhldcum~"," etaoinsrhldcumf"," etaoinsrhldcum,"," etaoinsrhldcum)"," etaoinsrhldcum;"," etaoinsrhld;:[]"," etaoinsrhldcum%"," etaoinsrhldcum!"," etaoinsrhldcum#"," etaoinsrhldcum>"," etaoinsrhldcum'"," etaoinsrhld?/<>"," etaoinsrhldcum."," etaoinsrhldcum*"," etaoinsrhld+=,."," etaoinsrhldcum?"," etaoinsrhldcum("," etaoinsrhld~!@#"," etaoinsrhld()-_"," etaoinsrhldcum$"," etaoinsrhldcum/"," etaoinsrhldcum<"," etaoinsrhld$%&*"," etaoinsrhldcumf%"," etaoinsrhldcumf)"," etaoinsrhldcumf<"," etaoinsrhldcumf$"," etaoinsrhldc~!@#"," etaoinsrhldc()-_"," etaoinsrhldcumfp"," etaoinsrhldcumf("," etaoinsrhldcumf?"," etaoinsrhldcumf["," etaoinsrhldcumf*"," etaoinsrhldc+=,."," etaoinsrhldcumf."," etaoinsrhldcumf'"," etaoinsrhldc?/<>"," etaoinsrhldcumf#"," etaoinsrhldcumf>"," etaoinsrhldcumf/"," etaoinsrhldcumf;"," etaoinsrhldc$%&*"," etaoinsrhldcumf,"," etaoinsrhldc;:[]"," etaoinsrhldcumf~"," etaoinsrhldcumf="," etaoinsrhldcumf:"," etaoinsrhldcumf'"," etaoinsrhldcumf@"," etaoinsrhldcumf]"," etaoinsrhldcumf-"," etaoinsrhldcumf+"," etaoinsrhldcumf!"," etaoinsrhldcumf&"," etaoinsrhldcumf_"," etaoinsrhldcumf'"," etaoinsrhldcumfp$"," etaoinsrhldcumfp)"," etaoinsrhldcu+=,."," etaoinsrhldcumfp;"," etaoinsrhldcumfp."," etaoinsrhldcu;:[]"," etaoinsrhldcumfp%"," etaoinsrhldcumfpg"," etaoinsrhldcu~!@#"," etaoinsrhldcumfp="," etaoinsrhldcumfp'"," etaoinsrhldcumfp]"," etaoinsrhldcumfp("," etaoinsrhldcumfp?"," etaoinsrhldcumfp'"," etaoinsrhldcumfp~"," etaoinsrhldcumfp+"," etaoinsrhldcumfp@"," etaoinsrhldcu?/<>"," etaoinsrhldcumfp:"," etaoinsrhldcumfp#"," etaoinsrhldcumfp<"," etaoinsrhldcumfp-"," etaoinsrhldcumfp,"," etaoinsrhldcumfp&"," etaoinsrhldcumfp*"," etaoinsrhldcumfp!"," etaoinsrhldcumfp>"," etaoinsrhldcumfp_"," etaoinsrhldcumfp/"," etaoinsrhldcumfp["," etaoinsrhldcu$%&*"," etaoinsrhldcumfp'"," etaoinsrhldcu()-_"," etaoinsrhldcumfpg;"," etaoinsrhl?/<>;:[]"," etaoinsrhldcumfpg)"," 1234567890()-_+=,."," etaoinsrhl()-_+=,."," etaoinsrhldcumfpg?"," etaoinsrhldcumfpg'"," etaoinsrhldcumfpg["," etaoinsrhldcumfpg>"," etaoinsrhldcum+=,."," etaoinsrhldcumfpg="," 1234567890~!@#$%&*"," etaoinsrhl~!@#$%&*"," etaoinsrhldcumfpg("," etaoinsrhldcumfpg$"," etaoinsrhldcumfpg@"," etaoinsrhldcum;:[]"," etaoinsrhldcum$%&*"," etaoinsrhldcumfpg~"," etaoinsrhldcumfpg+"," etaoinsrhldcumfpg'"," etaoinsrhldcum()-_"," etaoinsrhldcumfpg*"," etaoinsrhldcumfpg."," etaoinsrhldcumfpg%"," etaoinsrhldcumfpg'"," etaoinsrhldcumfpg&"," etaoinsrhldcumfpg-"," etaoinsrhldcumfpg<"," etaoinsrhldcumfpg#"," etaoinsrhldcumfpg:"," etaoinsrhldcum?/<>"," etaoinsrhldcum~!@#"," etaoinsrhldcumfpg_"," etaoinsrhldcumfpg,"," etaoinsrhldcumfpgw"," etaoinsrhldcumfpg]"," etaoinsrhldcumfpg/"," etaoinsrhldcumfpg!"," 1234567890?/<>;:[]"," etaoinsrhldcumfpgw'"," etaoinsrhldcumfpgw<"," etaoinsrhldcumfpgw_"," etaoinsrhldcumf?/<>"," etaoinsrhldcumfpgw#"," 1234567890?/<>;:[]'"," etaoinsrhldcumfpgw~"," etaoinsrhldcumf+=,."," etaoinsrhldcumfpgw-"," etaoinsrhldcumfpgw+"," etaoinsrhldcumf()-_"," etaoinsrhldcumfpgw$"," etaoinsrhldcumfpgw'"," etaoinsrhldcumf$%&*"," etaoinsrhldcumfpgw="," etaoinsrhldcumf~!@#"," etaoinsrhld?/<>;:[]"," etaoinsrhldcumfpgw)"," etaoinsrhldcumfpgw'"," etaoinsrhldcumfpgw,"," etaoinsrhldcumf;:[]"," etaoinsrhldcumfpgw%"," etaoinsrhldcumfpgw@"," etaoinsrhld~!@#$%&*"," etaoinsrhldcumfpgw."," etaoinsrhldcumfpgw]"," etaoinsrhldcumfpgwy"," etaoinsrhl?/<>;:[]'"," etaoinsrhldcumfpgw["," etaoinsrhldcumfpgw("," etaoinsrhldcumfpgw?"," etaoinsrhldcumfpgw&"," etaoinsrhldcumfpgw:"," etaoinsrhld()-_+=,."," etaoinsrhldcumfpgw/"," etaoinsrhldcumfpgw;"," etaoinsrhldcumfpgw!"," etaoinsrhldcumfpgw>"," etaoinsrhldcumfpgw*"," etaoinsrhldcumfpgwy,"," etaoinsrhldcumfp;:[]"," etaoinsrhldcumfpgwy_"," etaoinsrhldcumfp+=,."," etaoinsrhldcumfpgwy%"," etaoinsrhldcumfpgwy$"," etaoinsrhldcumfpgwy!"," etaoinsrhldcumfpgwy]"," etaoinsrhldcumfpgwy@"," etaoinsrhldcumfpgwy."," etaoinsrhldcumfpgwy~"," etaoinsrhldc~!@#$%&*"," etaoinsrhldc?/<>;:[]"," etaoinsrhldcumfpgwyb"," etaoinsrhldcumfp$%&*"," etaoinsrhldcumfpgwy["," etaoinsrhldcumfp?/<>"," etaoinsrhld?/<>;:[]'"," etaoinsrhldcumfpgwy("," etaoinsrhldcumfpgwy<"," etaoinsrhldcumfpgwy="," etaoinsrhldcumfpgwy?"," etaoinsrhldcumfpgwy'"," etaoinsrhldcumfpgwy:"," etaoinsrhldcumfp~!@#"," etaoinsrhldcumfpgwy&"," tnsrhldcmfpgwbvkxjqz"," etaoinsrhldc()-_+=,."," etaoinsrhldcumfpgwy-"," etaoinsrhldcumfpgwy#"," etaoinsrhldcumfpgwy/"," etaoinsrhldcumfpgwy;"," etaoinsrhldcumfpgwy'"," etaoinsrhldcumfpgwy)"," etaoinsrhldcumfpgwy>"," etaoinsrhldcumfpgwy'"," etaoinsrhldcumfpgwy+"," etaoinsrhldcumfpgwy*"," etaoinsrhl1234567890"," etaoinsrhldcumfp()-_"," etaoinsrhl1234567890;"," etaoinsrhldcumfpgwyb,"," etaoinsrhldcumfpg+=,."," tnsrhldcmfpgwbvkxjqz'"," tnsrhldcmfpgwbvkxjqz~"," tnsrhldcmfpgwbvkxjqz'"," etaoinsrhl1234567890+"," etaoinsrhldcumfpgwyb%"," etaoinsrhl1234567890,"," tnsrhldcmfpgwbvkxjqz_"," tnsrhldcmfpgwbvkxjqz]"," tnsrhldcmfpgwbvkxjqz,"," etaoinsrhl1234567890!"," tnsrhldcmfpgwbvkxjqz("," etaoinsrhldcumfpgwyb@"," etaoinsrhl1234567890]"," etaoinsrhl1234567890("," etaoinsrhldcumfpgwyb]"," etaoinsrhl1234567890-"," tnsrhldcmfpgwbvkxjqz+"," etaoinsrhldcumfpgwyb_"," etaoinsrhldcumfpgwyb."," etaoinsrhldcu?/<>;:[]"," etaoinsrhl1234567890%"," tnsrhldcmfpgwbvkxjqz)"," etaoinsrhldcumfpgwyb~"," etaoinsrhldcumfpg$%&*"," tnsrhldcmfpgwbvkxjqz-"," etaoinsrhl1234567890."," tnsrhldcmfpgwbvkxjqz["," etaoinsrhl1234567890)"," etaoinsrhldcu~!@#$%&*"," tnsrhldcmfpgwbvkxjqz."," etaoinsrhl1234567890["," etaoinsrhldcumfpgwyb["," tnsrhldcmfpgwbvkxjqz@"," etaoinsrhl1234567890#"," etaoinsrhldcumfpgwyb-"," tnsrhldcmfpgwbvkxjqz%"," etaoinsrhldcumfpgwyb("," etaoinsrhldcumfpg?/<>"," etaoinsrhldcumfpgwyb="," etaoinsrhldc?/<>;:[]'"," etaoinsrhldcumfpgwyb$"," etaoinsrhldcumfpgwyb#"," etaoinsrhldcumfpgwyb?"," etaoinsrhldcumfpgwyb'"," etaoinsrhldcumfpgwybv"," tnsrhldcmfpgwbvkxjqz:"," etaoinsrhl1234567890:"," etaoinsrhldcumfpgwyb:"," etaoinsrhldcumfpg~!@#"," etaoinsrhl1234567890?"," etaoinsrhl1234567890@"," tnsrhldcmfpgwbvkxjqz'"," etaoinsrhldcumfpgwyb&"," tnsrhldcmfpgwbvkxjqz?"," etaoinsrhldcu()-_+=,."," etaoinsrhl1234567890="," etaoinsrhl1234567890$"," etaoinsrhl1234567890~"," etaoinsrhl1234567890'"," tnsrhldcmfpgwbvkxjqz*"," tnsrhldcmfpgwbvkxjqz;"," etaoinsrhldcumfpgwyb;"," tnsrhldcmfpgwbvkxjqz="," etaoinsrhl1234567890'"," etaoinsrhldcumfpgwyb/"," etaoinsrhl1234567890'"," etaoinsrhldcumfpgwyb'"," etaoinsrhl1234567890&"," etaoinsrhldcumfpgwyb'"," tnsrhldcmfpgwbvkxjqz>"," etaoinsrhldcumfpgwyb!"," etaoinsrhl1234567890/"," etaoinsrhl1234567890>"," tnsrhldcmfpgwbvkxjqz!"," etaoinsrhldcumfpgwyb>"," tnsrhldcmfpgwbvkxjqz/"," etaoinsrhldcumfpgwyb)"," etaoinsrhl1234567890*"," etaoinsrhldcumfpgwyb+"," tnsrhldcmfpgwbvkxjqz&"," etaoinsrhldcumfpg()-_"," etaoinsrhl1234567890_"," etaoinsrhldcumfpgwyb*"," tnsrhldcmfpgwbvkxjqz$"," etaoinsrhldcumfpg;:[]"," tnsrhldcmfpgwbvkxjqz#"," etaoinsrhldcumfpgwyb<"," tnsrhldcmfpgwbvkxjqz<"," etaoinsrhl1234567890<"," etaoinsrhldcumfpgwybv)"," etaoinsrhldcumfpgwybv%"," etaoinsrhldcumfpgwybv,"," etaoinsrhldcumfpgw;:[]"," etaoinsrhldcumfpgwybv'"," etaoinsrhldcumfpgwybv<"," etaoinsrhldcumfpgw~!@#"," etaoinsrhldcumfpgwybv*"," etaoinsrhldcumfpgwybv]"," etaoinsrhldcumfpgwybv!"," etaoinsrhldcumfpgwybv'"," etaoinsrhldcumfpgwybv>"," etaoinsrhldcumfpgwybv."," etaoinsrhldcumfpgwybv'"," etaoinsrhldcumfpgw?/<>"," etaoinsrhldcumfpgwybv_"," etaoinsrhldcumfpgwybv$"," etaoinsrhldcumfpgwybv#"," etaoinsrhldcumfpgwybv="," etaoinsrhldcumfpgw$%&*"," etaoinsrhldcum?/<>;:[]"," etaoinsrhldcumfpgwybv/"," etaoinsrhldcumfpgw+=,."," etaoinsrhldcumfpgwybv;"," etaoinsrhldcumfpgwybv["," etaoinsrhldcumfpgwybv("," etaoinsrhldcumfpgwybv-"," etaoinsrhldcum~!@#$%&*"," etaoinsrhldcumfpgwybv~"," etaoinsrhldcumfpgwybv?"," etaoinsrhldcumfpgwybvk"," etaoinsrhldcu?/<>;:[]'"," etaoinsrhldcumfpgwybv@"," etaoinsrhldcumfpgwybv&"," etaoinsrhldcum()-_+=,."," etaoinsrhldcumfpgwybv:"," etaoinsrhldcumfpgw()-_"," etaoinsrhldcumfpgwybv+"," etaoinsrhldcumfpgwybvk#"," etaoinsrhldcumfpgwy;:[]"," etaoinsrhldcumfpgwybvk:"," etaoinsrhldcumfpgwybvk@"," etaoinsrhldcumfpgwybvk&"," etaoinsrhldcumfpgwy()-_"," etaoinsrhldcumf~!@#$%&*"," etaoinsrhldcumfpgwybvkx"," etaoinsrhldcumfpgwybvk?"," etaoinsrhldcum?/<>;:[]'"," etaoinsrhldcumfpgwybvk~"," etaoinsrhldcumfpgwybvk-"," etaoinsrhldcumfpgwybvk("," etaoinsrhldcumf?/<>;:[]"," etaoinsrhldcumfpgwybvk;"," etaoinsrhldcumfpgwybvk["," etaoinsrhldcumfpgwybvk/"," etaoinsrhldcumfpgwy$%&*"," etaoinsrhldcumfpgwy+=,."," etaoinsrhldcumf()-_+=,."," etaoinsrhldcumfpgwybvk_"," etaoinsrhldcumfpgwybvk$"," etaoinsrhldcumfpgwybvk="," etaoinsrhldcumfpgwy?/<>"," etaoinsrhldcumfpgwybvk."," etaoinsrhldcumfpgwybvk'"," etaoinsrhldcumfpgwybvk>"," etaoinsrhldcumfpgwy~!@#"," etaoinsrhldcumfpgwybvk*"," etaoinsrhldcumfpgwybvk]"," etaoinsrhldcumfpgwybvk!"," etaoinsrhldcumfpgwybvk'"," etaoinsrhldcumfpgwybvk'"," etaoinsrhldcumfpgwybvk)"," etaoinsrhldcumfpgwybvk<"," etaoinsrhldcumfpgwybvk,"," etaoinsrhldcumfpgwybvk%"," etaoinsrhldcumfpgwybvk+"," etaoinsrhldcumfpgwybvkx>"," etaoinsrhldcumfpgwybvkx?"," etaoinsrhldcumfpgwybvkx*"," etaoinsrhldcumfpgwybvkx;"," etaoinsrhldcumfpgwybvkx'"," etaoinsrhldcumfpgwybvkx-"," etaoinsrhl1234567890$%&*"," tnsrhldcmfpgwbvkxjqz?/<>"," etaoinsrhldcumfpgwybvkx!"," tnsrhldcmfpgwbvkxjqz()-_"," etaoinsrhldcumfpgwybvkx("," etaoinsrhldcumfp()-_+=,."," etaoinsrhldcumfpgwybvkx~"," etaoinsrhldcumfpgwybvkx_"," etaoinsrhl1234567890()-_"," etaoinsrhldcumfpgwybvkx["," etaoinsrhldcumfpgwybvkx@"," etaoinsrhldcumfpgwyb$%&*"," etaoinsrhldcumfpgwybvkxj"," etaoinsrhl1234567890;:[]"," etaoinsrhldcumfpgwyb()-_"," etaoinsrhl1234567890?/<>"," etaoinsrhldcumfpgwybvkx&"," etaoinsrhldcumfpgwybvkx$"," tnsrhldcmfpgwbvkxjqz~!@#"," etaoinsrhldcumfpgwybvkx#"," etaoinsrhldcumfpgwybvkx="," etaoinsrhldcumfpgwybvkx."," tnsrhldcmfpgwbvkxjqz+=,."," etaoinsrhldcumf?/<>;:[]'"," etaoinsrhl1234567890~!@#"," etaoinsrhl1234567890+=,."," etaoinsrhldcumfpgwybvkx'"," etaoinsrhldcumfpgwybvkx%"," tnsrhldcmfpgwbvkxjqz;:[]"," etaoinsrhldcumfpgwyb~!@#"," etaoinsrhldcumfpgwyb+=,."," etaoinsrhldcumfpgwybvkx/"," etaoinsrhldcum1234567890"," etaoinsrhldcumfpgwybvkx]"," etaoinsrhldcumfpgwyb?/<>"," etaoinsrhldcumfpgwybvkx)"," etaoinsrhldcumfpgwybvkx'"," etaoinsrhldcumfpgwybvkx:"," etaoinsrhldcumfpgwybvkx+"," etaoinsrhldcumfpgwyb;:[]"," etaoinsrhldcumfpgwybvkx<"," tnsrhldcmfpgwbvkxjqz$%&*"," etaoinsrhldcumfpgwybvkx,"," etaoinsrhldcumfp?/<>;:[]"," etaoinsrhldcumfp~!@#$%&*"," etaoinsrhldcumfpgwybvkxj!"," etaoinsrhldcum1234567890'"," etaoinsrhldcum1234567890,"," etaoinsrhldcum1234567890!"," etaoinsrhldcumfpgwybvkxj~"," etaoinsrhldcumfpgwybvkxj<"," etaoinsrhldcumfpgwybv;:[]"," etaoinsrhldcum1234567890]"," etaoinsrhldcum1234567890("," etaoinsrhldcumfpgwybvkxj'"," etaoinsrhldcum1234567890<"," etaoinsrhldcum1234567890'"," etaoinsrhldcum1234567890'"," etaoinsrhldcumfpgwybvkxj)"," etaoinsrhldcum1234567890-"," etaoinsrhldcumfpgwybvkxj'"," etaoinsrhldcum1234567890$"," etaoinsrhldcum1234567890="," etaoinsrhldcum1234567890@"," etaoinsrhldcumfpgwybvkxj="," etaoinsrhldcumfpgwybvkxj]"," etaoinsrhldcumfpgwybv~!@#"," etaoinsrhldcumfpgwybvkxj*"," etaoinsrhldcumfpgwybvkxj%"," etaoinsrhldcum1234567890~"," etaoinsrhldcum1234567890%"," etaoinsrhldcumfpgwybvkxj."," etaoinsrhldcumfpgwybvkxj'"," etaoinsrhldcumfpgwybvkxj$"," etaoinsrhldcum1234567890."," etaoinsrhldcum1234567890["," etaoinsrhldcum1234567890)"," etaoinsrhldcumfpg()-_+=,."," etaoinsrhldcumfpgwybvkxj,"," etaoinsrhldcumfpgwybv$%&*"," etaoinsrhldcumfpgwybvkxj["," etaoinsrhldcumfpgwybvkxj("," etaoinsrhldcumfpgwybv?/<>"," etaoinsrhldcum1234567890:"," etaoinsrhldcumfpgwybvkxj>"," etaoinsrhldcumfpgwybvkxj?"," etaoinsrhldcum1234567890+"," etaoinsrhldcumfpgwybvkxj-"," etaoinsrhldcumfpgwybvkxj+"," etaoinsrhldcumfpgwybvkxj:"," etaoinsrhldcum1234567890/"," etaoinsrhldcum1234567890?"," etaoinsrhldcumfpgwybvkxj&"," etaoinsrhldcumfpgwybv()-_"," etaoinsrhldcum1234567890>"," etaoinsrhldcumfpg~!@#$%&*"," etaoinsrhldcumfpgwybvkxj@"," etaoinsrhldcum1234567890;"," etaoinsrhldcumfpgwybvkxj_"," etaoinsrhldcumfp?/<>;:[]'"," etaoinsrhldcum1234567890#"," etaoinsrhldcumfpgwybvkxj#"," etaoinsrhldcumfpgwybvkxj;"," etaoinsrhldcumfpg?/<>;:[]"," etaoinsrhldcum1234567890*"," etaoinsrhldcum1234567890&"," etaoinsrhldcumfpgwybv+=,."," etaoinsrhldcumfpgwybvkxjq"," etaoinsrhldcum1234567890_"," etaoinsrhldcumfpgwybvkxj/"," etaoinsrhldcumfpgwybvkxjq?"," etaoinsrhldcumfpgwybvkxjq+"," etaoinsrhldcumfpgwybvkxjq$"," etaoinsrhldcumfpgwybvkxjq~"," etaoinsrhldcumfpgwybvkxjq:"," etaoinsrhldcumfpgwybvkxjq'"," etaoinsrhldcumfpgwybvkxjq,"," etaoinsrhldcumfpgwybvkxjq'"," etaoinsrhldcumfpgw()-_+=,."," etaoinsrhldcumfpgwybvkxjq-"," etaoinsrhldcumfpgwybvkxjq&"," etaoinsrhldcumfpgwybvkxjq)"," etaoinsrhldcumfpgwybvk()-_"," etaoinsrhldcumfpgwybvkxjq*"," etaoinsrhldcumfpgwybvkxjq("," etaoinsrhldcumfpgwybvkxjq'"," etaoinsrhldcumfpgwybvkxjq!"," etaoinsrhldcumfpgwybvkxjq@"," etaoinsrhldcumfpgw~!@#$%&*"," etaoinsrhldcumfpgwybvk~!@#"," etaoinsrhldcumfpgwybvkxjq["," etaoinsrhldcumfpgwybvk;:[]"," etaoinsrhldcumfpgwybvk$%&*"," etaoinsrhldcumfpgwybvkxjq;"," etaoinsrhldcumfpgwybvkxjq/"," etaoinsrhldcumfpgwybvkxjq#"," etaoinsrhldcumfpgwybvk?/<>"," etaoinsrhldcumfpgwybvkxjq]"," etaoinsrhldcumfpgwybvkxjq%"," etaoinsrhldcumfpgw?/<>;:[]"," 1234567890~!@#$%&*()-_+=,."," etaoinsrhldcumfpgwybvkxjqz"," etaoinsrhldcumfpgwybvkxjq<"," etaoinsrhldcumfpg?/<>;:[]'"," etaoinsrhldcumfpgwybvk+=,."," etaoinsrhl~!@#$%&*()-_+=,."," etaoinsrhldcumfpgwybvkxjq."," etaoinsrhldcumfpgwybvkxjq_"," etaoinsrhldcumfpgwybvkxjq="," etaoinsrhldcumfpgwybvkxjq>"," etaoinsrhldcumfpgwybvkxjqz["," etaoinsrhldcumfpgwybvkxjqz_"," etaoinsrhldcumfpgwybvkx+=,."," etaoinsrhldcumfpgwybvkxjqz'"," etaoinsrhldcumfpgwybvkxjqz&"," etaoinsrhldcumfpgwybvkxjqz#"," etaoinsrhldcumfpgwybvkxjqz;"," etaoinsrhldcumfpgwybvkxjqz@"," etaoinsrhldcumfpgwybvkxjqz/"," etaoinsrhldcumfpgwybvkx()-_"," etaoinsrhldcumfpgwybvkxjqz?"," etaoinsrhldcumfpgwybvkxjqz>"," etaoinsrhldcumfpgwybvkxjqz:"," etaoinsrhldcumfpgwybvkxjqz+"," etaoinsrhld~!@#$%&*()-_+=,."," etaoinsrhldcumfpgw?/<>;:[]'"," etaoinsrhldcumfpgwybvkxjqz~"," etaoinsrhldcumfpgwybvkx$%&*"," etaoinsrhldcumfpgwybvkx?/<>"," etaoinsrhldcumfpgwy~!@#$%&*"," etaoinsrhldcumfpgwybvkxjqz*"," etaoinsrhldcumfpgwybvkxjqz)"," etaoinsrhldcumfpgwy()-_+=,."," etaoinsrhldcumfpgwybvkxjqz."," etaoinsrhldcumfpgwybvkxjqz%"," etaoinsrhldcumfpgwybvkx~!@#"," etaoinsrhldcumfpgwybvkxjqz("," etaoinsrhldcumfpgwybvkxjqz="," etaoinsrhldcumfpgwybvkx;:[]"," etaoinsrhldcumfpgwybvkxjqz$"," etaoinsrhldcumfpgwybvkxjqz-"," etaoinsrhldcumfpgwybvkxjqz'"," etaoinsrhldcumfpgwy?/<>;:[]"," etaoinsrhldcumfpgwybvkxjqz'"," etaoinsrhldcumfpgwybvkxjqz<"," etaoinsrhldcumfpgwybvkxjqz]"," etaoinsrhldcumfpgwybvkxjqz!"," etaoinsrhldcumfpgwybvkxjqz,"," etaoinsrhldcum1234567890+=,."," etaoinsrhldcumfpgwybvkxj?/<>"," etaoinsrhldcumfpgwyb()-_+=,."," etaoinsrhldcum1234567890;:[]"," etaoinsrhldcumfpgwybvkxj$%&*"," etaoinsrhldcum1234567890?/<>"," etaoinsrhldcumfpgwy?/<>;:[]'"," tnsrhldcmfpgwbvkxjqz()-_+=,."," etaoinsrhldcumfpgwyb?/<>;:[]"," etaoinsrhldcum1234567890$%&*"," etaoinsrhldcumfpgwybvkxj~!@#"," etaoinsrhldcumfpgwybvkxj;:[]"," etaoinsrhl1234567890()-_+=,."," etaoinsrhldcumfpgwyb~!@#$%&*"," etaoinsrhldcumfpgwybvkxj()-_"," tnsrhldcmfpgwbvkxjqz~!@#$%&*"," etaoinsrhldcum1234567890~!@#"," etaoinsrhldcumfpgw1234567890"," etaoinsrhldcum1234567890()-_"," tnsrhldcmfpgwbvkxjqz?/<>;:[]"," etaoinsrhldcumfpgwybvkxj+=,."," etaoinsrhl1234567890?/<>;:[]"," etaoinsrhl1234567890~!@#$%&*"," etaoinsrhldc~!@#$%&*()-_+=,."," etaoinsrhldcumfpgw1234567890["," etaoinsrhldcumfpgw1234567890@"," etaoinsrhl1234567890?/<>;:[]'"," etaoinsrhldcumfpgw1234567890,"," etaoinsrhldcumfpgw1234567890="," etaoinsrhldcumfpgwybvkxjq?/<>"," etaoinsrhldcumfpgwybv?/<>;:[]"," etaoinsrhldcumfpgw1234567890)"," etaoinsrhldcumfpgwybvkxjq+=,."," etaoinsrhldcumfpgw1234567890#"," etaoinsrhldcumfpgw1234567890'"," etaoinsrhldcumfpgwybv()-_+=,."," etaoinsrhldcumfpgwybvkxjq()-_"," etaoinsrhldcumfpgw1234567890-"," etaoinsrhldcumfpgw1234567890("," etaoinsrhldcumfpgwybvkxjq$%&*"," etaoinsrhldcu~!@#$%&*()-_+=,."," etaoinsrhldcumfpgw1234567890."," etaoinsrhldcumfpgw1234567890_"," etaoinsrhldcumfpgw1234567890?"," etaoinsrhldcumfpgwybvkxjq~!@#"," etaoinsrhldcumfpgw1234567890$"," etaoinsrhldcumfpgw1234567890'"," etaoinsrhldcumfpgw1234567890'"," etaoinsrhldcumfpgw1234567890]"," etaoinsrhldcumfpgw1234567890%"," etaoinsrhldcumfpgwybvkxjq;:[]"," etaoinsrhldcumfpgw1234567890:"," etaoinsrhldcumfpgw1234567890;"," etaoinsrhldcumfpgw1234567890&"," etaoinsrhldcumfpgwybv~!@#$%&*"," etaoinsrhldcumfpgwyb?/<>;:[]'"," etaoinsrhldcumfpgw1234567890+"," etaoinsrhldcumfpgw1234567890>"," tnsrhldcmfpgwbvkxjqz?/<>;:[]'"," etaoinsrhldcumfpgw1234567890~"," etaoinsrhldcumfpgw1234567890<"," etaoinsrhldcumfpgw1234567890/"," etaoinsrhldcumfpgw1234567890*"," etaoinsrhldcumfpgw1234567890!"," etaoinsrhldcumfpgwybvk~!@#$%&*"," etaoinsrhldcumfpgwybvkxjqz~!@#"," tnsrhldcmfpgwbvkxjqz1234567890"," etaoinsrhldcum~!@#$%&*()-_+=,."," etaoinsrhldcumfpgwybvkxjqz$%&*"," etaoinsrhldcumfpgwybv?/<>;:[]'"," etaoinsrhldcumfpgwybvk()-_+=,."," etaoinsrhldcumfpgwybvkxjqz+=,."," etaoinsrhldcumfpgwybvk?/<>;:[]"," etaoinsrhldcumfpgwybvkxjqz?/<>"," etaoinsrhldcumfpgwybvkxjqz;:[]"," etaoinsrhldcumfpgwybvkxjqz()-_"," tnsrhldcmfpgwbvkxjqz1234567890&"," tnsrhldcmfpgwbvkxjqz1234567890'"," tnsrhldcmfpgwbvkxjqz1234567890]"," tnsrhldcmfpgwbvkxjqz1234567890<"," tnsrhldcmfpgwbvkxjqz1234567890!"," tnsrhldcmfpgwbvkxjqz1234567890+"," tnsrhldcmfpgwbvkxjqz1234567890/"," tnsrhldcmfpgwbvkxjqz1234567890["," etaoinsrhldcumfpgwybvkx?/<>;:[]"," tnsrhldcmfpgwbvkxjqz1234567890*"," tnsrhldcmfpgwbvkxjqz1234567890'"," tnsrhldcmfpgwbvkxjqz1234567890?"," tnsrhldcmfpgwbvkxjqz1234567890%"," tnsrhldcmfpgwbvkxjqz1234567890:"," etaoinsrhldcumf~!@#$%&*()-_+=,."," tnsrhldcmfpgwbvkxjqz1234567890."," etaoinsrhldcumfpgwybvk?/<>;:[]'"," tnsrhldcmfpgwbvkxjqz1234567890;"," tnsrhldcmfpgwbvkxjqz1234567890'"," tnsrhldcmfpgwbvkxjqz1234567890_"," tnsrhldcmfpgwbvkxjqz1234567890>"," etaoinsrhldcumfpgwybvkx()-_+=,."," tnsrhldcmfpgwbvkxjqz1234567890)"," tnsrhldcmfpgwbvkxjqz1234567890#"," tnsrhldcmfpgwbvkxjqz1234567890("," tnsrhldcmfpgwbvkxjqz1234567890-"," tnsrhldcmfpgwbvkxjqz1234567890,"," tnsrhldcmfpgwbvkxjqz1234567890@"," tnsrhldcmfpgwbvkxjqz1234567890="," tnsrhldcmfpgwbvkxjqz1234567890$"," tnsrhldcmfpgwbvkxjqz1234567890~"," etaoinsrhldcumfpgwybvkx~!@#$%&*"," etaoinsrhldcum1234567890?/<>;:[]"," etaoinsrhldcumfpgwybvkx?/<>;:[]'"," etaoinsrhldcumfpgwybvkxj()-_+=,."," etaoinsrhldcumfpgwybvk1234567890"," etaoinsrhldcum1234567890~!@#$%&*"," etaoinsrhldcumfpgwybvkxj~!@#$%&*"," etaoinsrhldcumfp~!@#$%&*()-_+=,."," etaoinsrhldcum1234567890()-_+=,."," etaoinsrhldcumfpgw1234567890$%&*"," etaoinsrhldcumfpgw1234567890()-_"," etaoinsrhldcumfpgw1234567890+=,."," etaoinsrhldcumfpgw1234567890;:[]"," etaoinsrhldcumfpgw1234567890?/<>"," etaoinsrhldcumfpgwybvkxj?/<>;:[]"," etaoinsrhldcumfpgw1234567890~!@#"," etaoinsrhldcumfpgwybvk1234567890]"," etaoinsrhldcumfpgwybvk1234567890/"," etaoinsrhldcumfpgwybvk1234567890&"," etaoinsrhldcumfpgwybvk1234567890'"," etaoinsrhldcumfpgwybvk1234567890'"," etaoinsrhldcumfpgwybvk1234567890@"," etaoinsrhldcumfpgwybvkxjq()-_+=,."," etaoinsrhldcumfpg~!@#$%&*()-_+=,."," etaoinsrhldcumfpgwybvk1234567890_"," etaoinsrhldcumfpgwybvk1234567890;"," etaoinsrhldcumfpgwybvk1234567890%"," etaoinsrhldcumfpgwybvk1234567890$"," etaoinsrhldcumfpgwybvkxjq~!@#$%&*"," etaoinsrhldcum1234567890?/<>;:[]'"," etaoinsrhldcumfpgwybvk1234567890)"," etaoinsrhldcumfpgwybvk1234567890!"," etaoinsrhldcumfpgwybvk1234567890+"," etaoinsrhldcumfpgwybvk1234567890#"," etaoinsrhldcumfpgwybvk1234567890-"," etaoinsrhldcumfpgwybvk1234567890."," etaoinsrhldcumfpgwybvk1234567890("," etaoinsrhldcumfpgwybvk1234567890="," etaoinsrhldcumfpgwybvk1234567890:"," etaoinsrhldcumfpgwybvk1234567890'"," etaoinsrhldcumfpgwybvk1234567890>"," etaoinsrhldcumfpgwybvk1234567890,"," etaoinsrhldcumfpgwybvk1234567890*"," etaoinsrhldcumfpgwybvkxj?/<>;:[]'"," etaoinsrhldcumfpgwybvk1234567890["," etaoinsrhldcumfpgwybvk1234567890<"," etaoinsrhldcumfpgwybvk1234567890?"," etaoinsrhldcumfpgwybvkxjq?/<>;:[]"," etaoinsrhldcumfpgwybvk1234567890~"," etaoinsrhldcumfpgwybvkxjqz()-_+=,."," etaoinsrhldcumfpgwybvkxjqz?/<>;:[]"," etaoinsrhldcumfpgw~!@#$%&*()-_+=,."," tnsrhldcmfpgwbvkxjqz1234567890~!@#"," tnsrhldcmfpgwbvkxjqz1234567890$%&*"," etaoinsrhldcumfpgwybvkxjq?/<>;:[]'"," tnsrhldcmfpgwbvkxjqz1234567890()-_"," tnsrhldcmfpgwbvkxjqz1234567890+=,."," tnsrhldcmfpgwbvkxjqz1234567890?/<>"," tnsrhldcmfpgwbvkxjqz1234567890;:[]"," etaoinsrhldcumfpgwybvkxjqz~!@#$%&*"," etaoinsrhldcumfpgwybvkxjqz?/<>;:[]'"," 1234567890~!@#$%&*()-_+=,.?/<>;:[]'"," etaoinsrhldcumfpgwy~!@#$%&*()-_+=,."," etaoinsrhl~!@#$%&*()-_+=,.?/<>;:[]'"," etaoinsrhldcumfpgw1234567890()-_+=,."," etaoinsrhldcumfpgw1234567890~!@#$%&*"," etaoinsrhldcumfpgwybvk1234567890;:[]"," etaoinsrhldcumfpgw1234567890?/<>;:[]"," etaoinsrhldcumfpgwybvk1234567890?/<>"," etaoinsrhldcumfpgwybvk1234567890+=,."," etaoinsrhldcumfpgwybvk1234567890()-_"," etaoinsrhld~!@#$%&*()-_+=,.?/<>;:[]'"," etaoinsrhldcumfpgwybvk1234567890$%&*"," etaoinsrhldcumfpgwybvk1234567890~!@#"," etaoinsrhldcumfpgwyb~!@#$%&*()-_+=,."," etaoinsrhldcumfpgwybvkxjqz1234567890"," etaoinsrhl1234567890~!@#$%&*()-_+=,."," tnsrhldcmfpgwbvkxjqz~!@#$%&*()-_+=,."," etaoinsrhldcumfpgwybvkxjqz1234567890'"," etaoinsrhldcumfpgwybvkxjqz1234567890:"," etaoinsrhldcumfpgwybvkxjqz1234567890#"," etaoinsrhldcumfpgwybvkxjqz1234567890_"," etaoinsrhldcumfpgwybvkxjqz1234567890="," etaoinsrhldc~!@#$%&*()-_+=,.?/<>;:[]'"," etaoinsrhldcumfpgwybvkxjqz1234567890,"," etaoinsrhldcumfpgwybvkxjqz1234567890("," etaoinsrhldcumfpgwybvkxjqz1234567890+"," etaoinsrhldcumfpgwybvkxjqz1234567890$"," etaoinsrhldcumfpgwybvkxjqz1234567890-"," etaoinsrhldcumfpgwybvkxjqz1234567890'"," etaoinsrhldcumfpgwybvkxjqz1234567890."," etaoinsrhldcumfpgwybvkxjqz1234567890?"," etaoinsrhldcumfpgw1234567890?/<>;:[]'"," etaoinsrhldcumfpgwybv~!@#$%&*()-_+=,."," etaoinsrhldcumfpgwybvkxjqz1234567890@"," etaoinsrhldcumfpgwybvkxjqz1234567890*"," etaoinsrhldcumfpgwybvkxjqz1234567890/"," etaoinsrhldcumfpgwybvkxjqz1234567890<"," etaoinsrhldcumfpgwybvkxjqz1234567890>"," etaoinsrhldcumfpgwybvkxjqz1234567890!"," etaoinsrhldcumfpgwybvkxjqz1234567890&"," etaoinsrhldcumfpgwybvkxjqz1234567890;"," etaoinsrhldcumfpgwybvkxjqz1234567890'"," etaoinsrhldcumfpgwybvkxjqz1234567890~"," etaoinsrhldcumfpgwybvkxjqz1234567890)"," etaoinsrhldcumfpgwybvkxjqz1234567890%"," etaoinsrhldcumfpgwybvkxjqz1234567890]"," etaoinsrhldcumfpgwybvkxjqz1234567890["," etaoinsrhldcumfpgwybvk~!@#$%&*()-_+=,."," tnsrhldcmfpgwbvkxjqz1234567890?/<>;:[]"," tnsrhldcmfpgwbvkxjqz1234567890~!@#$%&*"," tnsrhldcmfpgwbvkxjqz1234567890()-_+=,."," etaoinsrhldcu~!@#$%&*()-_+=,.?/<>;:[]'"," etaoinsrhldcum~!@#$%&*()-_+=,.?/<>;:[]'"," etaoinsrhldcumfpgwybvkx~!@#$%&*()-_+=,."," tnsrhldcmfpgwbvkxjqz1234567890?/<>;:[]'"," etaoinsrhldcumfpgwybvkxjqz1234567890$%&*"," etaoinsrhldcumfpgwybvkxjqz1234567890()-_"," etaoinsrhldcumfpgwybvkxj~!@#$%&*()-_+=,."," etaoinsrhldcumf~!@#$%&*()-_+=,.?/<>;:[]'"," etaoinsrhldcumfpgwybvkxjqz1234567890+=,."," etaoinsrhldcumfpgwybvkxjqz1234567890~!@#"," etaoinsrhldcumfpgwybvkxjqz1234567890?/<>"," etaoinsrhldcumfpgwybvk1234567890()-_+=,."," etaoinsrhldcumfpgwybvkxjqz1234567890;:[]"," etaoinsrhldcumfpgwybvk1234567890~!@#$%&*"," etaoinsrhldcumfpgwybvk1234567890?/<>;:[]"," etaoinsrhldcum1234567890~!@#$%&*()-_+=,."," etaoinsrhldcumfp~!@#$%&*()-_+=,.?/<>;:[]'"," etaoinsrhldcumfpgwybvkxjq~!@#$%&*()-_+=,."," etaoinsrhldcumfpgwybvk1234567890?/<>;:[]'"," etaoinsrhldcumfpgwybvkxjqz~!@#$%&*()-_+=,."," etaoinsrhldcumfpg~!@#$%&*()-_+=,.?/<>;:[]'"," etaoinsrhldcumfpgw~!@#$%&*()-_+=,.?/<>;:[]'"," etaoinsrhldcumfpgwybvkxjqz1234567890()-_+=,."," etaoinsrhldcumfpgwy~!@#$%&*()-_+=,.?/<>;:[]'"," etaoinsrhldcumfpgwybvkxjqz1234567890?/<>;:[]"," etaoinsrhldcumfpgwybvkxjqz1234567890~!@#$%&*"," etaoinsrhldcumfpgw1234567890~!@#$%&*()-_+=,."," etaoinsrhldcumfpgwybvkxjqz1234567890?/<>;:[]'"," tnsrhldcmfpgwbvkxjqz~!@#$%&*()-_+=,.?/<>;:[]'"," etaoinsrhldcumfpgwyb~!@#$%&*()-_+=,.?/<>;:[]'"," etaoinsrhl1234567890~!@#$%&*()-_+=,.?/<>;:[]'"," etaoinsrhldcumfpgwybv~!@#$%&*()-_+=,.?/<>;:[]'"," tnsrhldcmfpgwbvkxjqz1234567890~!@#$%&*()-_+=,."," etaoinsrhldcumfpgwybvk~!@#$%&*()-_+=,.?/<>;:[]'"," etaoinsrhldcumfpgwybvkx~!@#$%&*()-_+=,.?/<>;:[]'"," etaoinsrhldcumfpgwybvk1234567890~!@#$%&*()-_+=,."," etaoinsrhldcum1234567890~!@#$%&*()-_+=,.?/<>;:[]'"," etaoinsrhldcumfpgwybvkxj~!@#$%&*()-_+=,.?/<>;:[]'"," etaoinsrhldcumfpgwybvkxjq~!@#$%&*()-_+=,.?/<>;:[]'"," etaoinsrhldcumfpgwybvkxjqz~!@#$%&*()-_+=,.?/<>;:[]'"," etaoinsrhldcumfpgwybvkxjqz1234567890~!@#$%&*()-_+=,."," etaoinsrhldcumfpgw1234567890~!@#$%&*()-_+=,.?/<>;:[]'"," tnsrhldcmfpgwbvkxjqz1234567890~!@#$%&*()-_+=,.?/<>;:[]'"," etaoinsrhldcumfpgwybvk1234567890~!@#$%&*()-_+=,.?/<>;:[]'"," etaoinsrhldcumfpgwybvkxjqz1234567890~!@#$%&*()-_+=,.?/<>;:[]'"]
def shortest_charset(self, input_str : str) -> int:
"""Find shortest suitable charset for input"""
unique = "".join(set(input_str)) # Remove duplicates
for index,charset in enumerate(self.charsets):
good_charset = True
for char in unique:
if char not in charset:
good_charset = False
break
if good_charset:
return index
return -1
def calculate_checksum(self, digits : int) -> int:
sum = 0
for d in str(digits):
sum += int(d)
sum+=1
return sum % 10
def validate_checksum(self, digits : int, expected : int) -> bool:
try:
int(digits)
int(expected)
except ValueError:
return False
if self.calculate_checksum(digits) == expected:
return True
return False
def validate_message(self, message : str) -> bool:
if len(message) > 29:
message = message[-29:]
shortest = self.shortest_charset(message)
if shortest == -1:
return False
try:
message = str(int(message) ^ self.sikrit)
except Exception:
return False
expected = int(message[-1:])
charset_index = int(message[-4:-1])
return self.validate_checksum(charset_index, expected)
| 578.48
| 27,381
| 0.733854
| 1,169
| 28,924
| 18.038494
| 0.071001
| 0.027505
| 0.035994
| 0.045905
| 0.544933
| 0.442785
| 0.323801
| 0.211362
| 0.190449
| 0.150614
| 0
| 0.103242
| 0.053969
| 28,924
| 50
| 27,382
| 578.48
| 0.667398
| 0.004564
| 0
| 0.142857
| 0
| 0
| 0.846536
| 0.611042
| 0
| 0
| 0
| 0
| 0
| 1
| 0.095238
| false
| 0
| 0
| 0
| 0.380952
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
0d143ff2211a060d0994832159c312c4435375c5
| 877
|
py
|
Python
|
dml/maths/gquad.py
|
FCDM/py-dml
|
3e753e543644211ba42c8e048f46f956af1c5f8c
|
[
"MIT"
] | null | null | null |
dml/maths/gquad.py
|
FCDM/py-dml
|
3e753e543644211ba42c8e048f46f956af1c5f8c
|
[
"MIT"
] | null | null | null |
dml/maths/gquad.py
|
FCDM/py-dml
|
3e753e543644211ba42c8e048f46f956af1c5f8c
|
[
"MIT"
] | null | null | null |
def gaussianQuadrature(function, a, b):
"""
Perform a Gaussian quadrature approximation of the integral of a function
from a to b.
"""
# Coefficient values can be found at pomax.github.io/bezierinfo/legendre-gauss.html
A = (b - a)/2
B = (b + a)/2
return A * (
0.2955242247147529*function(-A*0.1488743389816312 + B) + \
0.2955242247147529*function(+A*0.1488743389816312 + B) + \
0.2692667193099963*function(-A*0.4333953941292472 + B) + \
0.2692667193099963*function(+A*0.4333953941292472 + B) + \
0.2190863625159820*function(-A*0.6794095682990244 + B) + \
0.2190863625159820*function(+A*0.6794095682990244 + B) + \
0.1494513491505806*function(-A*0.8650633666889845 + B) + \
0.1494513491505806*function(+A*0.8650633666889845 + B) + \
0.0666713443086881*function(-A*0.9739065285171717 + B) + \
0.0666713443086881*function(+A*0.9739065285171717 + B)
)
| 43.85
| 84
| 0.713797
| 113
| 877
| 5.539823
| 0.353982
| 0.158147
| 0.159744
| 0.083067
| 0.702875
| 0.702875
| 0.702875
| 0.702875
| 0.42492
| 0
| 0
| 0.452381
| 0.13797
| 877
| 20
| 85
| 43.85
| 0.375661
| 0.192702
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.066667
| false
| 0
| 0
| 0
| 0.133333
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 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
| 5
|
b4a69cab73fcca029c2617b364e28799bbe378ab
| 137
|
py
|
Python
|
lib/__init__.py
|
retr0-13/skype_ip_resolver
|
4f9ec2f05ddff28cc90cb631f8eae4882ee2d293
|
[
"MIT"
] | 11
|
2015-09-03T12:07:59.000Z
|
2022-03-06T06:59:10.000Z
|
lib/__init__.py
|
retr0-13/skype_ip_resolver
|
4f9ec2f05ddff28cc90cb631f8eae4882ee2d293
|
[
"MIT"
] | null | null | null |
lib/__init__.py
|
retr0-13/skype_ip_resolver
|
4f9ec2f05ddff28cc90cb631f8eae4882ee2d293
|
[
"MIT"
] | 4
|
2018-04-01T09:03:30.000Z
|
2021-04-08T19:13:47.000Z
|
#!/usr/bin/python
"""
Copyright (c) 2014 tilt (https://github.com/AeonDave/sir)
See the file 'LICENSE' for copying permission
"""
pass
| 15.222222
| 57
| 0.70073
| 20
| 137
| 4.8
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.033613
| 0.131387
| 137
| 8
| 58
| 17.125
| 0.773109
| 0.875912
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 1
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
b4afccce3dc5588bd98eafe01526566e9c3df548
| 55
|
py
|
Python
|
melior_transformers/ner/__init__.py
|
MeliorAI/meliorTransformers
|
b2936e1aac23e63e0b737d03975124c31a960812
|
[
"Apache-2.0"
] | 1
|
2020-08-06T10:48:49.000Z
|
2020-08-06T10:48:49.000Z
|
melior_transformers/ner/__init__.py
|
MeliorAI/meliorTransformers
|
b2936e1aac23e63e0b737d03975124c31a960812
|
[
"Apache-2.0"
] | 2
|
2020-02-13T12:45:57.000Z
|
2020-04-14T11:30:33.000Z
|
melior_transformers/ner/__init__.py
|
MeliorAI/meliorTransformers
|
b2936e1aac23e63e0b737d03975124c31a960812
|
[
"Apache-2.0"
] | 2
|
2020-07-21T12:43:51.000Z
|
2021-08-13T15:21:22.000Z
|
from melior_transformers.ner.ner_model import NERModel
| 27.5
| 54
| 0.890909
| 8
| 55
| 5.875
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.072727
| 55
| 1
| 55
| 55
| 0.921569
| 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
| 1
| 0
|
0
| 5
|
37037620fc1660cb192fa230b828f7a68ad5534f
| 473
|
py
|
Python
|
components/Actuators/LowLevel/limelight.py
|
Raptacon/Robot-2022
|
f59c6a6ebd5779a2fd91181b65cbcd677507ca5d
|
[
"MIT"
] | 4
|
2022-01-31T14:05:31.000Z
|
2022-03-26T14:12:45.000Z
|
components/Actuators/LowLevel/limelight.py
|
Raptacon/Robot-2022
|
f59c6a6ebd5779a2fd91181b65cbcd677507ca5d
|
[
"MIT"
] | 57
|
2022-01-13T02:41:31.000Z
|
2022-03-26T14:50:42.000Z
|
components/Actuators/LowLevel/limelight.py
|
Raptacon/Robot-2022
|
f59c6a6ebd5779a2fd91181b65cbcd677507ca5d
|
[
"MIT"
] | null | null | null |
from networktables import NetworkTables
class Limelight():
compatString = ["teapot"]
limeTable = NetworkTables.getTable("limelight")
def LEDOff(self):
self.limeTable.putNumber('ledMode',1)
def LEDOn(self):
self.limeTable.putNumber('ledMode',3)
def resetLED(self):
"""
Resets the LED to whatever the setting is
"""
self.limeTable.putNumber('ledMode',0)
def execute(self):
pass
| 27.823529
| 52
| 0.610994
| 48
| 473
| 6.020833
| 0.583333
| 0.134948
| 0.228374
| 0.301038
| 0.228374
| 0
| 0
| 0
| 0
| 0
| 0
| 0.008772
| 0.276956
| 473
| 16
| 53
| 29.5625
| 0.836257
| 0.086681
| 0
| 0
| 0
| 0
| 0.091837
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0.083333
| 0.083333
| 0
| 0.666667
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 5
|
3703d1153db76a59529d150705210dd3bf130f20
| 375
|
py
|
Python
|
app/repository/setting_repository.py
|
tch1bo/viaduct
|
bfd37b0a8408b2dd66fb01138163b80ce97699ff
|
[
"MIT"
] | 11
|
2015-04-23T21:57:56.000Z
|
2019-04-28T12:48:58.000Z
|
app/repository/setting_repository.py
|
tch1bo/viaduct
|
bfd37b0a8408b2dd66fb01138163b80ce97699ff
|
[
"MIT"
] | 1
|
2016-10-05T14:10:58.000Z
|
2016-10-05T14:12:23.000Z
|
app/repository/setting_repository.py
|
tch1bo/viaduct
|
bfd37b0a8408b2dd66fb01138163b80ce97699ff
|
[
"MIT"
] | 3
|
2016-10-05T14:00:42.000Z
|
2019-01-16T14:33:43.000Z
|
from app import db
from app.models.setting_model import Setting
def create_setting():
return Setting()
def save(setting):
db.session.add(setting)
db.session.commit()
return setting
def find_by_key(key):
return db.session.query(Setting).filter_by(key=key).first()
def delete_setting(setting):
db.session.delete(setting)
db.session.commit()
| 17.045455
| 63
| 0.72
| 54
| 375
| 4.888889
| 0.388889
| 0.170455
| 0.242424
| 0.166667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.165333
| 375
| 21
| 64
| 17.857143
| 0.84345
| 0
| 0
| 0.153846
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.307692
| false
| 0
| 0.153846
| 0.153846
| 0.692308
| 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
| 1
| 0
|
0
| 5
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.