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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
42a3f6abe5d81d91591b4e5a173d6a2692cdae44
| 54
|
py
|
Python
|
kloppy/event_pattern_matching.py
|
benoitblanc/kloppy
|
5c3f94ff8806f9e23f8bad095a948a403a06a54c
|
[
"BSD-3-Clause"
] | null | null | null |
kloppy/event_pattern_matching.py
|
benoitblanc/kloppy
|
5c3f94ff8806f9e23f8bad095a948a403a06a54c
|
[
"BSD-3-Clause"
] | null | null | null |
kloppy/event_pattern_matching.py
|
benoitblanc/kloppy
|
5c3f94ff8806f9e23f8bad095a948a403a06a54c
|
[
"BSD-3-Clause"
] | null | null | null |
from .domain.services.matchers.pattern.event import *
| 27
| 53
| 0.814815
| 7
| 54
| 6.285714
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.074074
| 54
| 1
| 54
| 54
| 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 | 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
|
35f8b257b484d64a21370032a6d703702f87e375
| 127
|
py
|
Python
|
test/tests/future_not_at_beginning2.py
|
aisk/pyston
|
ac69cfef0621dbc8901175e84fa2b5cb5781a646
|
[
"BSD-2-Clause",
"Apache-2.0"
] | 1
|
2020-02-06T14:28:45.000Z
|
2020-02-06T14:28:45.000Z
|
test/tests/future_not_at_beginning2.py
|
aisk/pyston
|
ac69cfef0621dbc8901175e84fa2b5cb5781a646
|
[
"BSD-2-Clause",
"Apache-2.0"
] | null | null | null |
test/tests/future_not_at_beginning2.py
|
aisk/pyston
|
ac69cfef0621dbc8901175e84fa2b5cb5781a646
|
[
"BSD-2-Clause",
"Apache-2.0"
] | 1
|
2020-02-06T14:29:00.000Z
|
2020-02-06T14:29:00.000Z
|
# should_error
"docstring"
def f():
class C(object):
from __future__ import division # should cause syntax error
| 15.875
| 67
| 0.685039
| 16
| 127
| 5.125
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.23622
| 127
| 7
| 68
| 18.142857
| 0.845361
| 0.385827
| 0
| 0
| 0
| 0
| 0.104651
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| true
| 0
| 0.25
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
35ff5d7d64ba8568b410e9d8f5d1a87e66d5a2d6
| 2,174
|
py
|
Python
|
test/unittests/test_StreamBankNSum.py
|
mudkipmaster/gwlf-e
|
9e058445537dd32d1916f76c4b73ca64261771cd
|
[
"Apache-2.0"
] | null | null | null |
test/unittests/test_StreamBankNSum.py
|
mudkipmaster/gwlf-e
|
9e058445537dd32d1916f76c4b73ca64261771cd
|
[
"Apache-2.0"
] | 6
|
2018-07-24T22:46:28.000Z
|
2018-07-29T19:13:09.000Z
|
test/unittests/test_StreamBankNSum.py
|
mudkipmaster/gwlf-e
|
9e058445537dd32d1916f76c4b73ca64261771cd
|
[
"Apache-2.0"
] | 1
|
2018-07-24T18:22:01.000Z
|
2018-07-24T18:22:01.000Z
|
import numpy as np
from VariableUnittest import VariableUnitTest
from gwlfe.Output.Loading import StreamBankNSum
class TestStreamBankNSum(VariableUnitTest):
def test_StreamBankNSum(self):
z = self.z
np.testing.assert_array_almost_equal(
StreamBankNSum.StreamBankNSum_f(z.NYrs, z.DaysMonth, z.Temp, z.InitSnow_0, z.Prec, z.NRur, z.NUrb, z.Area,
z.CNI_0, z.AntMoist_0, z.Grow_0, z.CNP_0, z.Imper, z.ISRR, z.ISRA, z.CN,
z.UnsatStor_0, z.KV, z.PcntET, z.DayHrs, z.MaxWaterCap, z.SatStor_0,
z.RecessionCoef, z.SeepCoef, z.Qretention, z.PctAreaInfil, z.n25b,
z.Landuse,
z.TileDrainDensity, z.PointFlow, z.StreamWithdrawal, z.GroundWithdrawal,
z.NumAnimals, z.AvgAnimalWt, z.StreamFlowVolAdj, z.SedAFactor_0, z.AvKF,
z.AvSlope, z.SedAAdjust, z.StreamLength, z.n42b, z.AgLength,
z.UrbBankStab, z.SedNitr, z.BankNFrac, z.n69c, z.n45, z.n69, z.n46c, z.n42),
StreamBankNSum.StreamBankNSum(z.NYrs, z.DaysMonth, z.Temp, z.InitSnow_0, z.Prec, z.NRur, z.NUrb, z.Area,
z.CNI_0, z.AntMoist_0, z.Grow_0, z.CNP_0, z.Imper, z.ISRR, z.ISRA, z.CN,
z.UnsatStor_0, z.KV, z.PcntET, z.DayHrs, z.MaxWaterCap, z.SatStor_0,
z.RecessionCoef, z.SeepCoef, z.Qretention, z.PctAreaInfil, z.n25b, z.Landuse,
z.TileDrainDensity, z.PointFlow, z.StreamWithdrawal, z.GroundWithdrawal,
z.NumAnimals, z.AvgAnimalWt, z.StreamFlowVolAdj, z.SedAFactor_0, z.AvKF,
z.AvSlope, z.SedAAdjust, z.StreamLength, z.n42b, z.AgLength,
z.UrbBankStab, z.SedNitr, z.BankNFrac, z.n69c, z.n45, z.n69, z.n46c, z.n42),
decimal=7)
| 72.466667
| 120
| 0.517939
| 253
| 2,174
| 4.367589
| 0.296443
| 0.028959
| 0.01086
| 0.027149
| 0.760181
| 0.760181
| 0.760181
| 0.760181
| 0.760181
| 0.760181
| 0
| 0.033408
| 0.380405
| 2,174
| 29
| 121
| 74.965517
| 0.786934
| 0
| 0
| 0.48
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.04
| 1
| 0.04
| false
| 0
| 0.12
| 0
| 0.2
| 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
|
c43f5bf996e0ded3e9205b0383346edba36a9fdc
| 260
|
py
|
Python
|
utils/pipe.py
|
ztytotoro/python-scripts
|
a337abd6c2705483d3167f611d671a2b7ee517f7
|
[
"MIT"
] | null | null | null |
utils/pipe.py
|
ztytotoro/python-scripts
|
a337abd6c2705483d3167f611d671a2b7ee517f7
|
[
"MIT"
] | null | null | null |
utils/pipe.py
|
ztytotoro/python-scripts
|
a337abd6c2705483d3167f611d671a2b7ee517f7
|
[
"MIT"
] | null | null | null |
class Pipe(object):
def __init__(self, function):
self.function = function
def __ror__(self, other):
return self.function(other)
def __call__(self, *args, **kwargs):
return Pipe(lambda x: self.function(x, *args, **kwargs))
| 28.888889
| 64
| 0.634615
| 32
| 260
| 4.78125
| 0.46875
| 0.313725
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.230769
| 260
| 9
| 64
| 28.888889
| 0.765
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.428571
| false
| 0
| 0
| 0.285714
| 0.857143
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
c46cf5709823c1423ac86947295e250f61a5fdeb
| 126
|
py
|
Python
|
spotlightpy/__init__.py
|
neil-vqa/spotlightpy
|
28b838fcaf69feb1aa1f950dba60353fbdfbb54a
|
[
"MIT"
] | null | null | null |
spotlightpy/__init__.py
|
neil-vqa/spotlightpy
|
28b838fcaf69feb1aa1f950dba60353fbdfbb54a
|
[
"MIT"
] | null | null | null |
spotlightpy/__init__.py
|
neil-vqa/spotlightpy
|
28b838fcaf69feb1aa1f950dba60353fbdfbb54a
|
[
"MIT"
] | 1
|
2021-06-03T19:21:20.000Z
|
2021-06-03T19:21:20.000Z
|
''' Use the sub module spotlight to harness Images from MS Windows X Spotlight project'''
from spotlightpy import spotlight
| 25.2
| 89
| 0.785714
| 18
| 126
| 5.5
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 126
| 4
| 90
| 31.5
| 0.942857
| 0.650794
| 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
|
c46f88a335ba33329f3cca081d428034c24a6951
| 219
|
py
|
Python
|
tests/test_packages.py
|
c4pt0r/tuir
|
ba3435cca3e4e66c029230e523fa24b775378874
|
[
"MIT"
] | 7
|
2021-05-21T20:40:57.000Z
|
2022-03-08T09:18:01.000Z
|
tests/test_packages.py
|
c4pt0r/tuir
|
ba3435cca3e4e66c029230e523fa24b775378874
|
[
"MIT"
] | null | null | null |
tests/test_packages.py
|
c4pt0r/tuir
|
ba3435cca3e4e66c029230e523fa24b775378874
|
[
"MIT"
] | 1
|
2022-03-07T14:52:33.000Z
|
2022-03-07T14:52:33.000Z
|
from tuir import packages
def test_praw3_package():
# Sanity check that the package was installed
assert packages.praw
assert len(packages.__praw_hash__) == 40
assert packages.__praw_bundled__ is True
| 24.333333
| 49
| 0.757991
| 30
| 219
| 5.133333
| 0.733333
| 0.233766
| 0.233766
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.016949
| 0.191781
| 219
| 8
| 50
| 27.375
| 0.853107
| 0.196347
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.6
| 1
| 0.2
| true
| 0
| 0.2
| 0
| 0.4
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
c47bb4fb46e931a8c9e57f74df718cc9a79abfea
| 1,135
|
py
|
Python
|
grr/server/server_plugins.py
|
panhania/grr
|
fe16a7311a528e31fe0e315a880e98273b8df960
|
[
"Apache-2.0"
] | null | null | null |
grr/server/server_plugins.py
|
panhania/grr
|
fe16a7311a528e31fe0e315a880e98273b8df960
|
[
"Apache-2.0"
] | 1
|
2018-05-08T21:15:51.000Z
|
2018-05-08T21:15:51.000Z
|
grr/server/server_plugins.py
|
panhania/grr
|
fe16a7311a528e31fe0e315a880e98273b8df960
|
[
"Apache-2.0"
] | null | null | null |
#!/usr/bin/env python
"""Centralized import point for server plugins in grr/server directory.
This acts as a centralized point for modules that need to be loaded for
the server components so that the server_startup.Init() function will find and
register them.
This also acts as a sensible single place to add deployment specific plugin
modules that have been customized for your deployment.
"""
# pylint: disable=unused-import
from grr.server import access_control
from grr.server import export
from grr.server import file_store
from grr.server import flow
from grr.server import foreman
from grr.server import hunts
from grr.server import ip_resolver
from grr.server import master
from grr.server import output_plugin
from grr.server import output_plugins
from grr.server import stats_server
from grr.server.aff4_objects import registry_init
from grr.server.blob_stores import registry_init
from grr.server.data_stores import registry_init
from grr.server.flows.cron import registry_init
from grr.server.flows.general import registry_init
from grr.server.flows.local import registry_init
from grr.server.local import registry_init
| 36.612903
| 78
| 0.834361
| 184
| 1,135
| 5.054348
| 0.396739
| 0.183871
| 0.251613
| 0.224731
| 0.282796
| 0.229032
| 0.162366
| 0
| 0
| 0
| 0
| 0.001003
| 0.121586
| 1,135
| 30
| 79
| 37.833333
| 0.931795
| 0.368282
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
c47fcabb54fbcd6dc9767facb73d96e7c56eb964
| 6,833
|
py
|
Python
|
Src/ApRES/Rover/HF/StartStop/plot_start_stop_pos_rtk.py
|
rdrews-dev/ReMeltRadar
|
7492323e7a412d35506c5c4f53333a9aea12a562
|
[
"MIT"
] | null | null | null |
Src/ApRES/Rover/HF/StartStop/plot_start_stop_pos_rtk.py
|
rdrews-dev/ReMeltRadar
|
7492323e7a412d35506c5c4f53333a9aea12a562
|
[
"MIT"
] | null | null | null |
Src/ApRES/Rover/HF/StartStop/plot_start_stop_pos_rtk.py
|
rdrews-dev/ReMeltRadar
|
7492323e7a412d35506c5c4f53333a9aea12a562
|
[
"MIT"
] | 1
|
2022-03-10T10:48:32.000Z
|
2022-03-10T10:48:32.000Z
|
import datetime
import matplotlib.dates as mdates
import matplotlib.pyplot as plt
import pandas as pd
import pathlib
# Define colour fields
ucl_blue = (0, 151/255, 169/255)
ucl_orange = (234/255, 118/255, 0)
ucl_green = (181/255, 189/255, 0)
ucl_red = (213/255, 0, 50/255)
MARKER_SIZE=0.5
ROOT_PATH = pathlib.Path(".")
DB_PATH = ROOT_PATH / pathlib.Path("Doc/ApRES/Rover/HF/StartStop.db")
FIG_PATH = ROOT_PATH / "Doc/ApRES/Rover/HF/StartStop"
df = pd.read_csv("Proc/RTKGPS/ApRES/Rover/HF/rtk_processed.csv")
# Convert first column to datetime
df['timestamp'] = pd.to_datetime(df['timestamp'])
# Create day indices
day_7 = df.timestamp.dt.day == 7
day_8 = df.timestamp.dt.day == 8
day_7_min = datetime.datetime(2022, 1, 7, 18, 15, 00)
day_7_max = datetime.datetime(2022, 1, 7, 19, 30, 00)
day_8_min = datetime.datetime(2022, 1, 8, 12, 30, 00)
day_8_max = datetime.datetime(2022, 1, 8, 17, 45, 00)
day_ratio = (day_7_max -day_7_min).seconds / \
(day_8_max - day_8_min).seconds
# Highlight active areas
ACTIVE_AREAS = [
[datetime.datetime(2022, 1, 7, 18, 24, 29), datetime.datetime(2022, 1, 7, 19, 23, 50)],
[datetime.datetime(2022, 1, 8, 12, 45, 00), datetime.datetime(2022, 1, 8, 13, 43, 53)],
[datetime.datetime(2022, 1, 8, 13, 47, 25), datetime.datetime(2022, 1, 8, 14, 44, 36)],
[datetime.datetime(2022, 1, 8, 14, 47, 55), datetime.datetime(2022, 1, 8, 15, 43, 35)],
[datetime.datetime(2022, 1, 8, 16, 23, 54), datetime.datetime(2022, 1, 8, 16, 50, 57)],
[datetime.datetime(2022, 1, 8, 17, 16, 00), datetime.datetime(2022, 1, 8, 17, 31, 9)]
]
def highlight_active_areas(ax, areas):
for area in areas:
ax.axvspan(area[0], area[1], color=[0.5, 0.5, 0.5], alpha=0.1)
# Create figure
fig, ax = plt.subplots(3,2,
figsize=(7.5,4),
dpi=300,
gridspec_kw={"width_ratios" : [day_ratio, 1]},
sharex='col',
sharey='row'
)
# Plot Polarstereogrpahic X
ax[0][0].plot(
df[day_7].timestamp, df[day_7].basestation_psx, '.', color=ucl_blue,
markersize=MARKER_SIZE
)
ax[0][0].plot(
df[day_7].timestamp, df[day_7].rover_psx, '.', color=ucl_red,
markersize=MARKER_SIZE
)
ax[0][0].grid()
ax[0][0].set_ylabel('PSX (m)')
highlight_active_areas(ax[0][0], ACTIVE_AREAS)
ax[0][1].plot(
df[day_8].timestamp, df[day_8].basestation_psx, '.', color=ucl_blue,
markersize=MARKER_SIZE
)
ax[0][1].plot(
df[day_8].timestamp, df[day_8].rover_psx, '.', color=ucl_red,
markersize=MARKER_SIZE
)
ax[0][1].grid()
highlight_active_areas(ax[0][1], ACTIVE_AREAS)
# Plot Polarstereogrpahic X
ax[1][0].plot(
df[day_7].timestamp, df[day_7].basestation_psy, '.', color=ucl_blue,
markersize=MARKER_SIZE
)
ax[1][0].plot(
df[day_7].timestamp, df[day_7].rover_psy, '.', color=ucl_red,
markersize=MARKER_SIZE
)
ax[1][0].grid()
ax[1][0].set_ylabel('PSY (m)')
highlight_active_areas(ax[1][0], ACTIVE_AREAS)
ax[1][1].plot(
df[day_8].timestamp, df[day_8].basestation_psy, '.', color=ucl_blue,
markersize=MARKER_SIZE
)
ax[1][1].plot(
df[day_8].timestamp, df[day_8].rover_psy, '.', color=ucl_red,
markersize=MARKER_SIZE
)
ax[1][1].grid()
highlight_active_areas(ax[1][1], ACTIVE_AREAS)
# Plot Polarstereogrpahic X
ax[2][0].plot(
df[day_7].timestamp, df[day_7].basestation_el, '.', color=ucl_blue,
markersize=MARKER_SIZE
)
ax[2][0].plot(
df[day_7].timestamp, df[day_7].rover_el, '.', color=ucl_red,
markersize=MARKER_SIZE
)
ax[2][0].grid()
ax[2][0].set_ylabel('El. (m)')
highlight_active_areas(ax[2][0], ACTIVE_AREAS)
ax[2][1].plot(
df[day_8].timestamp, df[day_8].basestation_el, '.', color=ucl_blue,
markersize=MARKER_SIZE, label="Base Station"
)
ax[2][1].plot(
df[day_8].timestamp, df[day_8].rover_el, '.', color=ucl_red,
markersize=MARKER_SIZE, label="Rover"
)
ax[2][1].grid()
ax[2][1].legend(markerscale=4)
highlight_active_areas(ax[2][1], ACTIVE_AREAS)
ax[2][1].xaxis.set_major_formatter(mdates.DateFormatter('%H:%M'))
ax[2][1].xaxis.set_major_locator(mdates.MinuteLocator(interval=30))
ax[2][1].xaxis.set_minor_locator(mdates.MinuteLocator(interval=5))
ax[2][1].set_xlabel("Time of Day")
ax[2][1].set_xlim([day_8_min, day_8_max])
ax[2][0].xaxis.set_major_formatter(mdates.DateFormatter('%H:%M'))
ax[2][0].xaxis.set_major_locator(mdates.MinuteLocator(interval=30))
ax[2][0].xaxis.set_minor_locator(mdates.MinuteLocator(interval=5))
ax[2][0].set_xlabel("Time of Day")
ax[2][0].set_xlim([day_7_min, day_7_max])
ax[0][0].set_title('2022-01-07')
ax[0][1].set_title('2022-01-08')
for a in ax:
try:
a.label_outer()
except:
pass
fig.tight_layout()
fig.savefig(FIG_PATH / "StartStopRTKPositions.png")
# Create figure
fig, ax = plt.subplots(3,2,
figsize=(7.5,4),
dpi=300,
gridspec_kw={"width_ratios" : [day_ratio, 1]},
sharex='col',
sharey='row'
)
# Plot Polarstereogrpahic X
ax[0][0].plot(
df[day_7].timestamp, df[day_7].rover_x, '.', color=ucl_orange,
markersize=MARKER_SIZE
)
ax[0][0].set_ylabel('Rover X (m)')
ax[0][0].grid()
highlight_active_areas(ax[0][0], ACTIVE_AREAS)
ax[0][1].plot(
df[day_8].timestamp, df[day_8].rover_x, '.', color=ucl_orange,
markersize=MARKER_SIZE
)
ax[0][1].grid()
highlight_active_areas(ax[0][1], ACTIVE_AREAS)
# Plot Polarstereogrpahic X
ax[1][0].plot(
df[day_7].timestamp, df[day_7].rover_y, '.', color=ucl_orange,
markersize=MARKER_SIZE
)
ax[1][0].grid()
ax[1][0].set_ylabel('Rover Y (m)')
highlight_active_areas(ax[1][0], ACTIVE_AREAS)
ax[1][1].plot(
df[day_8].timestamp, df[day_8].rover_y, '.', color=ucl_orange,
markersize=MARKER_SIZE
)
ax[1][1].grid()
highlight_active_areas(ax[1][1], ACTIVE_AREAS)
# Plot Polarstereogrpahic X
ax[2][0].plot(
df[day_7].timestamp, df[day_7].rover_z, '.', color=ucl_orange,
markersize=MARKER_SIZE
)
ax[2][0].grid()
ax[2][0].set_ylabel('Rover Z (m)')
highlight_active_areas(ax[2][0], ACTIVE_AREAS)
ax[2][1].plot(
df[day_8].timestamp, df[day_8].rover_z, '.', color=ucl_orange,
markersize=MARKER_SIZE
)
ax[2][1].grid()
highlight_active_areas(ax[2][1], ACTIVE_AREAS)
ax[2][1].xaxis.set_major_formatter(mdates.DateFormatter('%H:%M'))
ax[2][1].xaxis.set_major_locator(mdates.MinuteLocator(interval=30))
ax[2][1].xaxis.set_minor_locator(mdates.MinuteLocator(interval=5))
ax[2][1].set_xlabel("Time of Day")
ax[2][1].set_xlim([day_8_min, day_8_max])
ax[2][0].xaxis.set_major_formatter(mdates.DateFormatter('%H:%M'))
ax[2][0].xaxis.set_major_locator(mdates.MinuteLocator(interval=30))
ax[2][0].xaxis.set_minor_locator(mdates.MinuteLocator(interval=5))
ax[2][0].set_xlabel("Time of Day")
ax[2][0].set_xlim([day_7_min, day_7_max])
ax[0][0].set_title('2022-01-07')
ax[0][1].set_title('2022-01-08')
for a in ax:
try:
a.label_outer()
except:
pass
fig.tight_layout()
fig.savefig(FIG_PATH / "StartStopRoverPositions.png")
| 28.710084
| 91
| 0.68418
| 1,194
| 6,833
| 3.721943
| 0.138191
| 0.024978
| 0.061431
| 0.075608
| 0.817507
| 0.80468
| 0.707696
| 0.707696
| 0.682043
| 0.682043
| 0
| 0.086514
| 0.122055
| 6,833
| 238
| 92
| 28.710084
| 0.654276
| 0.040978
| 0
| 0.560847
| 0
| 0
| 0.061611
| 0.023697
| 0
| 0
| 0
| 0
| 0
| 1
| 0.005291
| false
| 0.010582
| 0.026455
| 0
| 0.031746
| 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
|
c480194841443ef682d525500c2b0a286839bdb3
| 129
|
py
|
Python
|
Documentation/GuidesFromPlosCompBioPaper/ExampleCaseC/AdditionalInputFiles/RestingCondition/LVDataElastanceController.py
|
carthurs/CRIMSONGUI
|
1464df9c4d04cf3ba131ca90b91988a06845c68e
|
[
"BSD-3-Clause"
] | 10
|
2020-09-17T18:55:31.000Z
|
2022-02-23T02:52:38.000Z
|
Documentation/GuidesFromPlosCompBioPaper/ExampleCaseC/ReadyToUseFiles/RestingCondition/LVDataElastanceController.py
|
carthurs/CRIMSONGUI
|
1464df9c4d04cf3ba131ca90b91988a06845c68e
|
[
"BSD-3-Clause"
] | null | null | null |
Documentation/GuidesFromPlosCompBioPaper/ExampleCaseC/ReadyToUseFiles/RestingCondition/LVDataElastanceController.py
|
carthurs/CRIMSONGUI
|
1464df9c4d04cf3ba131ca90b91988a06845c68e
|
[
"BSD-3-Clause"
] | 3
|
2021-05-19T09:02:21.000Z
|
2021-07-26T17:39:57.000Z
|
version https://git-lfs.github.com/spec/v1
oid sha256:00d41c118e6c444c85be97ecd91f67088a2fd53b9c4398d2a9b0b9fd8b244979
size 2932
| 32.25
| 75
| 0.883721
| 13
| 129
| 8.769231
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.398374
| 0.046512
| 129
| 3
| 76
| 43
| 0.528455
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
670c7bc945f565c15a80b6e79960ea95c499eec0
| 56
|
py
|
Python
|
smhi/exceptions/SmhiExceptions.py
|
Menturan/SMHIpy
|
fec57677dc6643cdede5694b79edbfa6b65ac7dc
|
[
"MIT"
] | 1
|
2018-12-12T05:51:12.000Z
|
2018-12-12T05:51:12.000Z
|
smhi/exceptions/SmhiExceptions.py
|
Menturan/SMHIpy
|
fec57677dc6643cdede5694b79edbfa6b65ac7dc
|
[
"MIT"
] | null | null | null |
smhi/exceptions/SmhiExceptions.py
|
Menturan/SMHIpy
|
fec57677dc6643cdede5694b79edbfa6b65ac7dc
|
[
"MIT"
] | null | null | null |
class SmhiConnectionException(BaseException):
pass
| 14
| 45
| 0.803571
| 4
| 56
| 11.25
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 56
| 3
| 46
| 18.666667
| 0.9375
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
678b2b3835fdc1e979a27698e85e27ec78714b63
| 91
|
py
|
Python
|
manage.py
|
KarimLulu/sms-spam-detection
|
1bdd1b019217bd69b852be148865eb605171c24f
|
[
"MIT"
] | null | null | null |
manage.py
|
KarimLulu/sms-spam-detection
|
1bdd1b019217bd69b852be148865eb605171c24f
|
[
"MIT"
] | 3
|
2021-05-19T13:49:43.000Z
|
2022-03-11T16:15:05.000Z
|
manage.py
|
KarimLulu/sms-spam-detection
|
1bdd1b019217bd69b852be148865eb605171c24f
|
[
"MIT"
] | 1
|
2020-05-18T05:17:23.000Z
|
2020-05-18T05:17:23.000Z
|
from app import create_app
app = create_app()
@app.cli.command()
def deploy():
pass
| 10.111111
| 26
| 0.681319
| 14
| 91
| 4.285714
| 0.642857
| 0.3
| 0.4
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.197802
| 91
| 8
| 27
| 11.375
| 0.821918
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0.2
| 0.2
| 0
| 0.4
| 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
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
67914a59d236571822523d2d871adef32fcc784a
| 191
|
py
|
Python
|
hw9group11pkg/__init__.py
|
gptomaleri/hw9group11pkg
|
98fd553711df49c17157104a705b4a1eb9ca4629
|
[
"MIT"
] | 1
|
2019-12-11T04:00:44.000Z
|
2019-12-11T04:00:44.000Z
|
hw9group11pkg/__init__.py
|
gptomaleri/hw9group11pkg
|
98fd553711df49c17157104a705b4a1eb9ca4629
|
[
"MIT"
] | null | null | null |
hw9group11pkg/__init__.py
|
gptomaleri/hw9group11pkg
|
98fd553711df49c17157104a705b4a1eb9ca4629
|
[
"MIT"
] | null | null | null |
from .gamma_functions import *
from .two_step_functions import *
from .graphics_functions import *
__author__ = 'Andrew Schcht'
__email__ = 'Andrew.Schacht1@gmail.com'
__version__ = '0.0.1'
| 23.875
| 39
| 0.774869
| 25
| 191
| 5.28
| 0.68
| 0.340909
| 0.287879
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.02381
| 0.120419
| 191
| 7
| 40
| 27.285714
| 0.761905
| 0
| 0
| 0
| 0
| 0
| 0.225131
| 0.13089
| 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
|
67cbee1b040e110aea35a6b17fa3fdcef2639012
| 42,963
|
py
|
Python
|
google/ads/google_ads/v6/proto/resources/invoice_pb2.py
|
jphanwebstaurant/google-ads-python
|
600812b2afcc4d57f00b47dfe436620ce50bfe9b
|
[
"Apache-2.0"
] | 1
|
2021-04-09T04:28:47.000Z
|
2021-04-09T04:28:47.000Z
|
google/ads/google_ads/v6/proto/resources/invoice_pb2.py
|
jphanwebstaurant/google-ads-python
|
600812b2afcc4d57f00b47dfe436620ce50bfe9b
|
[
"Apache-2.0"
] | null | null | null |
google/ads/google_ads/v6/proto/resources/invoice_pb2.py
|
jphanwebstaurant/google-ads-python
|
600812b2afcc4d57f00b47dfe436620ce50bfe9b
|
[
"Apache-2.0"
] | null | null | null |
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/ads/googleads_v6/proto/resources/invoice.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from google.ads.google_ads.v6.proto.common import dates_pb2 as google_dot_ads_dot_googleads__v6_dot_proto_dot_common_dot_dates__pb2
from google.ads.google_ads.v6.proto.enums import invoice_type_pb2 as google_dot_ads_dot_googleads__v6_dot_proto_dot_enums_dot_invoice__type__pb2
from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2
from google.api import resource_pb2 as google_dot_api_dot_resource__pb2
from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name='google/ads/googleads_v6/proto/resources/invoice.proto',
package='google.ads.googleads.v6.resources',
syntax='proto3',
serialized_options=b'\n%com.google.ads.googleads.v6.resourcesB\014InvoiceProtoP\001ZJgoogle.golang.org/genproto/googleapis/ads/googleads/v6/resources;resources\242\002\003GAA\252\002!Google.Ads.GoogleAds.V6.Resources\312\002!Google\\Ads\\GoogleAds\\V6\\Resources\352\002%Google::Ads::GoogleAds::V6::Resources',
create_key=_descriptor._internal_create_key,
serialized_pb=b'\n5google/ads/googleads_v6/proto/resources/invoice.proto\x12!google.ads.googleads.v6.resources\x1a\x30google/ads/googleads_v6/proto/common/dates.proto\x1a\x36google/ads/googleads_v6/proto/enums/invoice_type.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1cgoogle/api/annotations.proto\"\xb9\x0f\n\x07Invoice\x12?\n\rresource_name\x18\x01 \x01(\tB(\xe0\x41\x03\xfa\x41\"\n googleads.googleapis.com/Invoice\x12\x14\n\x02id\x18\x19 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12M\n\x04type\x18\x03 \x01(\x0e\x32:.google.ads.googleads.v6.enums.InvoiceTypeEnum.InvoiceTypeB\x03\xe0\x41\x03\x12\x1f\n\rbilling_setup\x18\x1a \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12%\n\x13payments_account_id\x18\x1b \x01(\tB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12%\n\x13payments_profile_id\x18\x1c \x01(\tB\x03\xe0\x41\x03H\x03\x88\x01\x01\x12\x1c\n\nissue_date\x18\x1d \x01(\tB\x03\xe0\x41\x03H\x04\x88\x01\x01\x12\x1a\n\x08\x64ue_date\x18\x1e \x01(\tB\x03\xe0\x41\x03H\x05\x88\x01\x01\x12J\n\x12service_date_range\x18\t \x01(\x0b\x32).google.ads.googleads.v6.common.DateRangeB\x03\xe0\x41\x03\x12\x1f\n\rcurrency_code\x18\x1f \x01(\tB\x03\xe0\x41\x03H\x06\x88\x01\x01\x12/\n\"adjustments_subtotal_amount_micros\x18\x13 \x01(\x03\x42\x03\xe0\x41\x03\x12*\n\x1d\x61\x64justments_tax_amount_micros\x18\x14 \x01(\x03\x42\x03\xe0\x41\x03\x12,\n\x1f\x61\x64justments_total_amount_micros\x18\x15 \x01(\x03\x42\x03\xe0\x41\x03\x12\x34\n\'regulatory_costs_subtotal_amount_micros\x18\x16 \x01(\x03\x42\x03\xe0\x41\x03\x12/\n\"regulatory_costs_tax_amount_micros\x18\x17 \x01(\x03\x42\x03\xe0\x41\x03\x12\x31\n$regulatory_costs_total_amount_micros\x18\x18 \x01(\x03\x42\x03\xe0\x41\x03\x12(\n\x16subtotal_amount_micros\x18! \x01(\x03\x42\x03\xe0\x41\x03H\x07\x88\x01\x01\x12#\n\x11tax_amount_micros\x18\" \x01(\x03\x42\x03\xe0\x41\x03H\x08\x88\x01\x01\x12%\n\x13total_amount_micros\x18# \x01(\x03\x42\x03\xe0\x41\x03H\t\x88\x01\x01\x12#\n\x11\x63orrected_invoice\x18$ \x01(\tB\x03\xe0\x41\x03H\n\x88\x01\x01\x12\x1e\n\x11replaced_invoices\x18% \x03(\tB\x03\xe0\x41\x03\x12\x19\n\x07pdf_url\x18& \x01(\tB\x03\xe0\x41\x03H\x0b\x88\x01\x01\x12\x66\n\x18\x61\x63\x63ount_budget_summaries\x18\x12 \x03(\x0b\x32?.google.ads.googleads.v6.resources.Invoice.AccountBudgetSummaryB\x03\xe0\x41\x03\x1a\xd6\x04\n\x14\x41\x63\x63ountBudgetSummary\x12\x1a\n\x08\x63ustomer\x18\n \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12+\n\x19\x63ustomer_descriptive_name\x18\x0b \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12 \n\x0e\x61\x63\x63ount_budget\x18\x0c \x01(\tB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12%\n\x13\x61\x63\x63ount_budget_name\x18\r \x01(\tB\x03\xe0\x41\x03H\x03\x88\x01\x01\x12\'\n\x15purchase_order_number\x18\x0e \x01(\tB\x03\xe0\x41\x03H\x04\x88\x01\x01\x12(\n\x16subtotal_amount_micros\x18\x0f \x01(\x03\x42\x03\xe0\x41\x03H\x05\x88\x01\x01\x12#\n\x11tax_amount_micros\x18\x10 \x01(\x03\x42\x03\xe0\x41\x03H\x06\x88\x01\x01\x12%\n\x13total_amount_micros\x18\x11 \x01(\x03\x42\x03\xe0\x41\x03H\x07\x88\x01\x01\x12T\n\x1c\x62illable_activity_date_range\x18\t \x01(\x0b\x32).google.ads.googleads.v6.common.DateRangeB\x03\xe0\x41\x03\x42\x0b\n\t_customerB\x1c\n\x1a_customer_descriptive_nameB\x11\n\x0f_account_budgetB\x16\n\x14_account_budget_nameB\x18\n\x16_purchase_order_numberB\x19\n\x17_subtotal_amount_microsB\x14\n\x12_tax_amount_microsB\x16\n\x14_total_amount_micros:T\xea\x41Q\n googleads.googleapis.com/Invoice\x12-customers/{customer_id}/invoices/{invoice_id}B\x05\n\x03_idB\x10\n\x0e_billing_setupB\x16\n\x14_payments_account_idB\x16\n\x14_payments_profile_idB\r\n\x0b_issue_dateB\x0b\n\t_due_dateB\x10\n\x0e_currency_codeB\x19\n\x17_subtotal_amount_microsB\x14\n\x12_tax_amount_microsB\x16\n\x14_total_amount_microsB\x14\n\x12_corrected_invoiceB\n\n\x08_pdf_urlB\xf9\x01\n%com.google.ads.googleads.v6.resourcesB\x0cInvoiceProtoP\x01ZJgoogle.golang.org/genproto/googleapis/ads/googleads/v6/resources;resources\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V6.Resources\xca\x02!Google\\Ads\\GoogleAds\\V6\\Resources\xea\x02%Google::Ads::GoogleAds::V6::Resourcesb\x06proto3'
,
dependencies=[google_dot_ads_dot_googleads__v6_dot_proto_dot_common_dot_dates__pb2.DESCRIPTOR,google_dot_ads_dot_googleads__v6_dot_proto_dot_enums_dot_invoice__type__pb2.DESCRIPTOR,google_dot_api_dot_field__behavior__pb2.DESCRIPTOR,google_dot_api_dot_resource__pb2.DESCRIPTOR,google_dot_api_dot_annotations__pb2.DESCRIPTOR,])
_INVOICE_ACCOUNTBUDGETSUMMARY = _descriptor.Descriptor(
name='AccountBudgetSummary',
full_name='google.ads.googleads.v6.resources.Invoice.AccountBudgetSummary',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='customer', full_name='google.ads.googleads.v6.resources.Invoice.AccountBudgetSummary.customer', index=0,
number=10, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='customer_descriptive_name', full_name='google.ads.googleads.v6.resources.Invoice.AccountBudgetSummary.customer_descriptive_name', index=1,
number=11, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='account_budget', full_name='google.ads.googleads.v6.resources.Invoice.AccountBudgetSummary.account_budget', index=2,
number=12, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='account_budget_name', full_name='google.ads.googleads.v6.resources.Invoice.AccountBudgetSummary.account_budget_name', index=3,
number=13, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='purchase_order_number', full_name='google.ads.googleads.v6.resources.Invoice.AccountBudgetSummary.purchase_order_number', index=4,
number=14, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='subtotal_amount_micros', full_name='google.ads.googleads.v6.resources.Invoice.AccountBudgetSummary.subtotal_amount_micros', index=5,
number=15, type=3, cpp_type=2, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='tax_amount_micros', full_name='google.ads.googleads.v6.resources.Invoice.AccountBudgetSummary.tax_amount_micros', index=6,
number=16, type=3, cpp_type=2, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='total_amount_micros', full_name='google.ads.googleads.v6.resources.Invoice.AccountBudgetSummary.total_amount_micros', index=7,
number=17, type=3, cpp_type=2, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='billable_activity_date_range', full_name='google.ads.googleads.v6.resources.Invoice.AccountBudgetSummary.billable_activity_date_range', index=8,
number=9, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
_descriptor.OneofDescriptor(
name='_customer', full_name='google.ads.googleads.v6.resources.Invoice.AccountBudgetSummary._customer',
index=0, containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[]),
_descriptor.OneofDescriptor(
name='_customer_descriptive_name', full_name='google.ads.googleads.v6.resources.Invoice.AccountBudgetSummary._customer_descriptive_name',
index=1, containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[]),
_descriptor.OneofDescriptor(
name='_account_budget', full_name='google.ads.googleads.v6.resources.Invoice.AccountBudgetSummary._account_budget',
index=2, containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[]),
_descriptor.OneofDescriptor(
name='_account_budget_name', full_name='google.ads.googleads.v6.resources.Invoice.AccountBudgetSummary._account_budget_name',
index=3, containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[]),
_descriptor.OneofDescriptor(
name='_purchase_order_number', full_name='google.ads.googleads.v6.resources.Invoice.AccountBudgetSummary._purchase_order_number',
index=4, containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[]),
_descriptor.OneofDescriptor(
name='_subtotal_amount_micros', full_name='google.ads.googleads.v6.resources.Invoice.AccountBudgetSummary._subtotal_amount_micros',
index=5, containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[]),
_descriptor.OneofDescriptor(
name='_tax_amount_micros', full_name='google.ads.googleads.v6.resources.Invoice.AccountBudgetSummary._tax_amount_micros',
index=6, containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[]),
_descriptor.OneofDescriptor(
name='_total_amount_micros', full_name='google.ads.googleads.v6.resources.Invoice.AccountBudgetSummary._total_amount_micros',
index=7, containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[]),
],
serialized_start=1356,
serialized_end=1954,
)
_INVOICE = _descriptor.Descriptor(
name='Invoice',
full_name='google.ads.googleads.v6.resources.Invoice',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='resource_name', full_name='google.ads.googleads.v6.resources.Invoice.resource_name', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=b'\340A\003\372A\"\n googleads.googleapis.com/Invoice', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='id', full_name='google.ads.googleads.v6.resources.Invoice.id', index=1,
number=25, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='type', full_name='google.ads.googleads.v6.resources.Invoice.type', index=2,
number=3, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='billing_setup', full_name='google.ads.googleads.v6.resources.Invoice.billing_setup', index=3,
number=26, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='payments_account_id', full_name='google.ads.googleads.v6.resources.Invoice.payments_account_id', index=4,
number=27, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='payments_profile_id', full_name='google.ads.googleads.v6.resources.Invoice.payments_profile_id', index=5,
number=28, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='issue_date', full_name='google.ads.googleads.v6.resources.Invoice.issue_date', index=6,
number=29, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='due_date', full_name='google.ads.googleads.v6.resources.Invoice.due_date', index=7,
number=30, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='service_date_range', full_name='google.ads.googleads.v6.resources.Invoice.service_date_range', index=8,
number=9, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='currency_code', full_name='google.ads.googleads.v6.resources.Invoice.currency_code', index=9,
number=31, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='adjustments_subtotal_amount_micros', full_name='google.ads.googleads.v6.resources.Invoice.adjustments_subtotal_amount_micros', index=10,
number=19, type=3, cpp_type=2, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='adjustments_tax_amount_micros', full_name='google.ads.googleads.v6.resources.Invoice.adjustments_tax_amount_micros', index=11,
number=20, type=3, cpp_type=2, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='adjustments_total_amount_micros', full_name='google.ads.googleads.v6.resources.Invoice.adjustments_total_amount_micros', index=12,
number=21, type=3, cpp_type=2, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='regulatory_costs_subtotal_amount_micros', full_name='google.ads.googleads.v6.resources.Invoice.regulatory_costs_subtotal_amount_micros', index=13,
number=22, type=3, cpp_type=2, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='regulatory_costs_tax_amount_micros', full_name='google.ads.googleads.v6.resources.Invoice.regulatory_costs_tax_amount_micros', index=14,
number=23, type=3, cpp_type=2, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='regulatory_costs_total_amount_micros', full_name='google.ads.googleads.v6.resources.Invoice.regulatory_costs_total_amount_micros', index=15,
number=24, type=3, cpp_type=2, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='subtotal_amount_micros', full_name='google.ads.googleads.v6.resources.Invoice.subtotal_amount_micros', index=16,
number=33, type=3, cpp_type=2, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='tax_amount_micros', full_name='google.ads.googleads.v6.resources.Invoice.tax_amount_micros', index=17,
number=34, type=3, cpp_type=2, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='total_amount_micros', full_name='google.ads.googleads.v6.resources.Invoice.total_amount_micros', index=18,
number=35, type=3, cpp_type=2, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='corrected_invoice', full_name='google.ads.googleads.v6.resources.Invoice.corrected_invoice', index=19,
number=36, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='replaced_invoices', full_name='google.ads.googleads.v6.resources.Invoice.replaced_invoices', index=20,
number=37, type=9, cpp_type=9, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='pdf_url', full_name='google.ads.googleads.v6.resources.Invoice.pdf_url', index=21,
number=38, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='account_budget_summaries', full_name='google.ads.googleads.v6.resources.Invoice.account_budget_summaries', index=22,
number=18, type=11, cpp_type=10, label=3,
has_default_value=False, default_value=[],
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=b'\340A\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[_INVOICE_ACCOUNTBUDGETSUMMARY, ],
enum_types=[
],
serialized_options=b'\352AQ\n googleads.googleapis.com/Invoice\022-customers/{customer_id}/invoices/{invoice_id}',
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
_descriptor.OneofDescriptor(
name='_id', full_name='google.ads.googleads.v6.resources.Invoice._id',
index=0, containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[]),
_descriptor.OneofDescriptor(
name='_billing_setup', full_name='google.ads.googleads.v6.resources.Invoice._billing_setup',
index=1, containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[]),
_descriptor.OneofDescriptor(
name='_payments_account_id', full_name='google.ads.googleads.v6.resources.Invoice._payments_account_id',
index=2, containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[]),
_descriptor.OneofDescriptor(
name='_payments_profile_id', full_name='google.ads.googleads.v6.resources.Invoice._payments_profile_id',
index=3, containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[]),
_descriptor.OneofDescriptor(
name='_issue_date', full_name='google.ads.googleads.v6.resources.Invoice._issue_date',
index=4, containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[]),
_descriptor.OneofDescriptor(
name='_due_date', full_name='google.ads.googleads.v6.resources.Invoice._due_date',
index=5, containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[]),
_descriptor.OneofDescriptor(
name='_currency_code', full_name='google.ads.googleads.v6.resources.Invoice._currency_code',
index=6, containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[]),
_descriptor.OneofDescriptor(
name='_subtotal_amount_micros', full_name='google.ads.googleads.v6.resources.Invoice._subtotal_amount_micros',
index=7, containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[]),
_descriptor.OneofDescriptor(
name='_tax_amount_micros', full_name='google.ads.googleads.v6.resources.Invoice._tax_amount_micros',
index=8, containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[]),
_descriptor.OneofDescriptor(
name='_total_amount_micros', full_name='google.ads.googleads.v6.resources.Invoice._total_amount_micros',
index=9, containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[]),
_descriptor.OneofDescriptor(
name='_corrected_invoice', full_name='google.ads.googleads.v6.resources.Invoice._corrected_invoice',
index=10, containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[]),
_descriptor.OneofDescriptor(
name='_pdf_url', full_name='google.ads.googleads.v6.resources.Invoice._pdf_url',
index=11, containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[]),
],
serialized_start=289,
serialized_end=2266,
)
_INVOICE_ACCOUNTBUDGETSUMMARY.fields_by_name['billable_activity_date_range'].message_type = google_dot_ads_dot_googleads__v6_dot_proto_dot_common_dot_dates__pb2._DATERANGE
_INVOICE_ACCOUNTBUDGETSUMMARY.containing_type = _INVOICE
_INVOICE_ACCOUNTBUDGETSUMMARY.oneofs_by_name['_customer'].fields.append(
_INVOICE_ACCOUNTBUDGETSUMMARY.fields_by_name['customer'])
_INVOICE_ACCOUNTBUDGETSUMMARY.fields_by_name['customer'].containing_oneof = _INVOICE_ACCOUNTBUDGETSUMMARY.oneofs_by_name['_customer']
_INVOICE_ACCOUNTBUDGETSUMMARY.oneofs_by_name['_customer_descriptive_name'].fields.append(
_INVOICE_ACCOUNTBUDGETSUMMARY.fields_by_name['customer_descriptive_name'])
_INVOICE_ACCOUNTBUDGETSUMMARY.fields_by_name['customer_descriptive_name'].containing_oneof = _INVOICE_ACCOUNTBUDGETSUMMARY.oneofs_by_name['_customer_descriptive_name']
_INVOICE_ACCOUNTBUDGETSUMMARY.oneofs_by_name['_account_budget'].fields.append(
_INVOICE_ACCOUNTBUDGETSUMMARY.fields_by_name['account_budget'])
_INVOICE_ACCOUNTBUDGETSUMMARY.fields_by_name['account_budget'].containing_oneof = _INVOICE_ACCOUNTBUDGETSUMMARY.oneofs_by_name['_account_budget']
_INVOICE_ACCOUNTBUDGETSUMMARY.oneofs_by_name['_account_budget_name'].fields.append(
_INVOICE_ACCOUNTBUDGETSUMMARY.fields_by_name['account_budget_name'])
_INVOICE_ACCOUNTBUDGETSUMMARY.fields_by_name['account_budget_name'].containing_oneof = _INVOICE_ACCOUNTBUDGETSUMMARY.oneofs_by_name['_account_budget_name']
_INVOICE_ACCOUNTBUDGETSUMMARY.oneofs_by_name['_purchase_order_number'].fields.append(
_INVOICE_ACCOUNTBUDGETSUMMARY.fields_by_name['purchase_order_number'])
_INVOICE_ACCOUNTBUDGETSUMMARY.fields_by_name['purchase_order_number'].containing_oneof = _INVOICE_ACCOUNTBUDGETSUMMARY.oneofs_by_name['_purchase_order_number']
_INVOICE_ACCOUNTBUDGETSUMMARY.oneofs_by_name['_subtotal_amount_micros'].fields.append(
_INVOICE_ACCOUNTBUDGETSUMMARY.fields_by_name['subtotal_amount_micros'])
_INVOICE_ACCOUNTBUDGETSUMMARY.fields_by_name['subtotal_amount_micros'].containing_oneof = _INVOICE_ACCOUNTBUDGETSUMMARY.oneofs_by_name['_subtotal_amount_micros']
_INVOICE_ACCOUNTBUDGETSUMMARY.oneofs_by_name['_tax_amount_micros'].fields.append(
_INVOICE_ACCOUNTBUDGETSUMMARY.fields_by_name['tax_amount_micros'])
_INVOICE_ACCOUNTBUDGETSUMMARY.fields_by_name['tax_amount_micros'].containing_oneof = _INVOICE_ACCOUNTBUDGETSUMMARY.oneofs_by_name['_tax_amount_micros']
_INVOICE_ACCOUNTBUDGETSUMMARY.oneofs_by_name['_total_amount_micros'].fields.append(
_INVOICE_ACCOUNTBUDGETSUMMARY.fields_by_name['total_amount_micros'])
_INVOICE_ACCOUNTBUDGETSUMMARY.fields_by_name['total_amount_micros'].containing_oneof = _INVOICE_ACCOUNTBUDGETSUMMARY.oneofs_by_name['_total_amount_micros']
_INVOICE.fields_by_name['type'].enum_type = google_dot_ads_dot_googleads__v6_dot_proto_dot_enums_dot_invoice__type__pb2._INVOICETYPEENUM_INVOICETYPE
_INVOICE.fields_by_name['service_date_range'].message_type = google_dot_ads_dot_googleads__v6_dot_proto_dot_common_dot_dates__pb2._DATERANGE
_INVOICE.fields_by_name['account_budget_summaries'].message_type = _INVOICE_ACCOUNTBUDGETSUMMARY
_INVOICE.oneofs_by_name['_id'].fields.append(
_INVOICE.fields_by_name['id'])
_INVOICE.fields_by_name['id'].containing_oneof = _INVOICE.oneofs_by_name['_id']
_INVOICE.oneofs_by_name['_billing_setup'].fields.append(
_INVOICE.fields_by_name['billing_setup'])
_INVOICE.fields_by_name['billing_setup'].containing_oneof = _INVOICE.oneofs_by_name['_billing_setup']
_INVOICE.oneofs_by_name['_payments_account_id'].fields.append(
_INVOICE.fields_by_name['payments_account_id'])
_INVOICE.fields_by_name['payments_account_id'].containing_oneof = _INVOICE.oneofs_by_name['_payments_account_id']
_INVOICE.oneofs_by_name['_payments_profile_id'].fields.append(
_INVOICE.fields_by_name['payments_profile_id'])
_INVOICE.fields_by_name['payments_profile_id'].containing_oneof = _INVOICE.oneofs_by_name['_payments_profile_id']
_INVOICE.oneofs_by_name['_issue_date'].fields.append(
_INVOICE.fields_by_name['issue_date'])
_INVOICE.fields_by_name['issue_date'].containing_oneof = _INVOICE.oneofs_by_name['_issue_date']
_INVOICE.oneofs_by_name['_due_date'].fields.append(
_INVOICE.fields_by_name['due_date'])
_INVOICE.fields_by_name['due_date'].containing_oneof = _INVOICE.oneofs_by_name['_due_date']
_INVOICE.oneofs_by_name['_currency_code'].fields.append(
_INVOICE.fields_by_name['currency_code'])
_INVOICE.fields_by_name['currency_code'].containing_oneof = _INVOICE.oneofs_by_name['_currency_code']
_INVOICE.oneofs_by_name['_subtotal_amount_micros'].fields.append(
_INVOICE.fields_by_name['subtotal_amount_micros'])
_INVOICE.fields_by_name['subtotal_amount_micros'].containing_oneof = _INVOICE.oneofs_by_name['_subtotal_amount_micros']
_INVOICE.oneofs_by_name['_tax_amount_micros'].fields.append(
_INVOICE.fields_by_name['tax_amount_micros'])
_INVOICE.fields_by_name['tax_amount_micros'].containing_oneof = _INVOICE.oneofs_by_name['_tax_amount_micros']
_INVOICE.oneofs_by_name['_total_amount_micros'].fields.append(
_INVOICE.fields_by_name['total_amount_micros'])
_INVOICE.fields_by_name['total_amount_micros'].containing_oneof = _INVOICE.oneofs_by_name['_total_amount_micros']
_INVOICE.oneofs_by_name['_corrected_invoice'].fields.append(
_INVOICE.fields_by_name['corrected_invoice'])
_INVOICE.fields_by_name['corrected_invoice'].containing_oneof = _INVOICE.oneofs_by_name['_corrected_invoice']
_INVOICE.oneofs_by_name['_pdf_url'].fields.append(
_INVOICE.fields_by_name['pdf_url'])
_INVOICE.fields_by_name['pdf_url'].containing_oneof = _INVOICE.oneofs_by_name['_pdf_url']
DESCRIPTOR.message_types_by_name['Invoice'] = _INVOICE
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
Invoice = _reflection.GeneratedProtocolMessageType('Invoice', (_message.Message,), {
'AccountBudgetSummary' : _reflection.GeneratedProtocolMessageType('AccountBudgetSummary', (_message.Message,), {
'DESCRIPTOR' : _INVOICE_ACCOUNTBUDGETSUMMARY,
'__module__' : 'google.ads.googleads_v6.proto.resources.invoice_pb2'
,
'__doc__': """Represents a summarized account budget billable cost.
Attributes:
customer:
Output only. The resource name of the customer associated with
this account budget. This contains the customer ID, which
appears on the invoice PDF as "Account ID". Customer resource
names have the form: ``customers/{customer_id}``
customer_descriptive_name:
Output only. The descriptive name of the account budget’s
customer. It appears on the invoice PDF as "Account".
account_budget:
Output only. The resource name of the account budget
associated with this summarized billable cost. AccountBudget
resource names have the form:
``customers/{customer_id}/accountBudgets/{account_budget_id}``
account_budget_name:
Output only. The name of the account budget. It appears on the
invoice PDF as "Account budget".
purchase_order_number:
Output only. The purchase order number of the account budget.
It appears on the invoice PDF as "Purchase order".
subtotal_amount_micros:
Output only. The pretax subtotal amount attributable to this
budget during the service period, in micros.
tax_amount_micros:
Output only. The tax amount attributable to this budget during
the service period, in micros.
total_amount_micros:
Output only. The total amount attributable to this budget
during the service period, in micros. This equals the sum of
the account budget subtotal amount and the account budget tax
amount.
billable_activity_date_range:
Output only. The billable activity date range of the account
budget, within the service date range of this invoice. The end
date is inclusive. This can be different from the account
budget's start and end time.
""",
# @@protoc_insertion_point(class_scope:google.ads.googleads.v6.resources.Invoice.AccountBudgetSummary)
})
,
'DESCRIPTOR' : _INVOICE,
'__module__' : 'google.ads.googleads_v6.proto.resources.invoice_pb2'
,
'__doc__': """An invoice. All invoice information is snapshotted to match the PDF
invoice. For invoices older than the launch of InvoiceService, the
snapshotted information may not match the PDF invoice.
Attributes:
resource_name:
Output only. The resource name of the invoice. Multiple
customers can share a given invoice, so multiple resource
names may point to the same invoice. Invoice resource names
have the form:
``customers/{customer_id}/invoices/{invoice_id}``
id:
Output only. The ID of the invoice. It appears on the invoice
PDF as "Invoice number".
type:
Output only. The type of invoice.
billing_setup:
Output only. The resource name of this invoice’s billing
setup.
``customers/{customer_id}/billingSetups/{billing_setup_id}``
payments_account_id:
Output only. A 16 digit ID used to identify the payments
account associated with the billing setup, e.g.
"1234-5678-9012-3456". It appears on the invoice PDF as
"Billing Account Number".
payments_profile_id:
Output only. A 12 digit ID used to identify the payments
profile associated with the billing setup, e.g.
"1234-5678-9012". It appears on the invoice PDF as "Billing
ID".
issue_date:
Output only. The issue date in yyyy-mm-dd format. It appears
on the invoice PDF as either "Issue date" or "Invoice date".
due_date:
Output only. The due date in yyyy-mm-dd format.
service_date_range:
Output only. The service period date range of this invoice.
The end date is inclusive.
currency_code:
Output only. The currency code. All costs are returned in this
currency. A subset of the currency codes derived from the ISO
4217 standard is supported.
adjustments_subtotal_amount_micros:
Output only. The pretax subtotal amount of invoice level
adjustments, in micros.
adjustments_tax_amount_micros:
Output only. The sum of taxes on the invoice level
adjustments, in micros.
adjustments_total_amount_micros:
Output only. The total amount of invoice level adjustments, in
micros.
regulatory_costs_subtotal_amount_micros:
Output only. The pretax subtotal amount of invoice level
regulatory costs, in micros.
regulatory_costs_tax_amount_micros:
Output only. The sum of taxes on the invoice level regulatory
costs, in micros.
regulatory_costs_total_amount_micros:
Output only. The total amount of invoice level regulatory
costs, in micros.
subtotal_amount_micros:
Output only. The pretax subtotal amount, in micros. This
equals the sum of the AccountBudgetSummary subtotal amounts,
Invoice.adjustments\_subtotal\_amount\_micros, and
Invoice.regulatory\_costs\_subtotal\_amount\_micros. Starting
with v6, the
Invoice.regulatory\_costs\_subtotal\_amount\_micros is no
longer included.
tax_amount_micros:
Output only. The sum of all taxes on the invoice, in micros.
This equals the sum of the AccountBudgetSummary tax amounts,
plus taxes not associated with a specific account budget.
total_amount_micros:
Output only. The total amount, in micros. This equals the sum
of Invoice.subtotal\_amount\_micros and
Invoice.tax\_amount\_micros. Starting with v6,
Invoice.regulatory\_costs\_subtotal\_amount\_micros is also
added as it is no longer already included in
Invoice.tax\_amount\_micros.
corrected_invoice:
Output only. The resource name of the original invoice
corrected, wrote off, or canceled by this invoice, if
applicable. If ``corrected_invoice`` is set,
``replaced_invoices`` will not be set. Invoice resource names
have the form:
``customers/{customer_id}/invoices/{invoice_id}``
replaced_invoices:
Output only. The resource name of the original invoice(s)
being rebilled or replaced by this invoice, if applicable.
There might be multiple replaced invoices due to invoice
consolidation. The replaced invoices may not belong to the
same payments account. If ``replaced_invoices`` is set,
``corrected_invoice`` will not be set. Invoice resource names
have the form:
``customers/{customer_id}/invoices/{invoice_id}``
pdf_url:
Output only. The URL to a PDF copy of the invoice. Users need
to pass in their OAuth token to request the PDF with this URL.
account_budget_summaries:
Output only. The list of summarized account budget information
associated with this invoice.
""",
# @@protoc_insertion_point(class_scope:google.ads.googleads.v6.resources.Invoice)
})
_sym_db.RegisterMessage(Invoice)
_sym_db.RegisterMessage(Invoice.AccountBudgetSummary)
DESCRIPTOR._options = None
_INVOICE_ACCOUNTBUDGETSUMMARY.fields_by_name['customer']._options = None
_INVOICE_ACCOUNTBUDGETSUMMARY.fields_by_name['customer_descriptive_name']._options = None
_INVOICE_ACCOUNTBUDGETSUMMARY.fields_by_name['account_budget']._options = None
_INVOICE_ACCOUNTBUDGETSUMMARY.fields_by_name['account_budget_name']._options = None
_INVOICE_ACCOUNTBUDGETSUMMARY.fields_by_name['purchase_order_number']._options = None
_INVOICE_ACCOUNTBUDGETSUMMARY.fields_by_name['subtotal_amount_micros']._options = None
_INVOICE_ACCOUNTBUDGETSUMMARY.fields_by_name['tax_amount_micros']._options = None
_INVOICE_ACCOUNTBUDGETSUMMARY.fields_by_name['total_amount_micros']._options = None
_INVOICE_ACCOUNTBUDGETSUMMARY.fields_by_name['billable_activity_date_range']._options = None
_INVOICE.fields_by_name['resource_name']._options = None
_INVOICE.fields_by_name['id']._options = None
_INVOICE.fields_by_name['type']._options = None
_INVOICE.fields_by_name['billing_setup']._options = None
_INVOICE.fields_by_name['payments_account_id']._options = None
_INVOICE.fields_by_name['payments_profile_id']._options = None
_INVOICE.fields_by_name['issue_date']._options = None
_INVOICE.fields_by_name['due_date']._options = None
_INVOICE.fields_by_name['service_date_range']._options = None
_INVOICE.fields_by_name['currency_code']._options = None
_INVOICE.fields_by_name['adjustments_subtotal_amount_micros']._options = None
_INVOICE.fields_by_name['adjustments_tax_amount_micros']._options = None
_INVOICE.fields_by_name['adjustments_total_amount_micros']._options = None
_INVOICE.fields_by_name['regulatory_costs_subtotal_amount_micros']._options = None
_INVOICE.fields_by_name['regulatory_costs_tax_amount_micros']._options = None
_INVOICE.fields_by_name['regulatory_costs_total_amount_micros']._options = None
_INVOICE.fields_by_name['subtotal_amount_micros']._options = None
_INVOICE.fields_by_name['tax_amount_micros']._options = None
_INVOICE.fields_by_name['total_amount_micros']._options = None
_INVOICE.fields_by_name['corrected_invoice']._options = None
_INVOICE.fields_by_name['replaced_invoices']._options = None
_INVOICE.fields_by_name['pdf_url']._options = None
_INVOICE.fields_by_name['account_budget_summaries']._options = None
_INVOICE._options = None
# @@protoc_insertion_point(module_scope)
| 64.315868
| 4,099
| 0.770686
| 5,815
| 42,963
| 5.337919
| 0.070507
| 0.030412
| 0.05203
| 0.04768
| 0.835052
| 0.808956
| 0.752223
| 0.693943
| 0.620071
| 0.535116
| 0
| 0.040804
| 0.121546
| 42,963
| 667
| 4,100
| 64.412294
| 0.781643
| 0.009171
| 0
| 0.459502
| 1
| 0.007788
| 0.417542
| 0.224008
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.001558
| 0.014019
| 0
| 0.014019
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
67cd1ce3b4aa1cca6d34e1ef6ca9a1d3120d7885
| 70
|
py
|
Python
|
baekjoon/python/we_love_krii_10718.py
|
yskang/AlgorithmPracticeWithPython
|
f7129bd1924a7961489198f0ee052d2cd1e9cf40
|
[
"MIT"
] | null | null | null |
baekjoon/python/we_love_krii_10718.py
|
yskang/AlgorithmPracticeWithPython
|
f7129bd1924a7961489198f0ee052d2cd1e9cf40
|
[
"MIT"
] | null | null | null |
baekjoon/python/we_love_krii_10718.py
|
yskang/AlgorithmPracticeWithPython
|
f7129bd1924a7961489198f0ee052d2cd1e9cf40
|
[
"MIT"
] | null | null | null |
# https://www.acmicpc.net/problem/10718
print("강한친구 대한육군\n강한친구 대한육군")
| 35
| 40
| 0.742857
| 11
| 70
| 4.727273
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.076923
| 0.071429
| 70
| 2
| 41
| 35
| 0.723077
| 0.528571
| 0
| 0
| 0
| 0
| 0.645161
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
e1d183b110225123fb9dbe0fde22ff7df2a54cbb
| 267
|
py
|
Python
|
notebooks/tests/test_inference.py
|
pomcho555/urban-sciences-model
|
43b56ff09ba8b06fae43e138a290b2ed9bf1529c
|
[
"MIT"
] | 3
|
2022-02-12T12:48:59.000Z
|
2022-03-08T13:39:11.000Z
|
notebooks/tests/test_inference.py
|
pomcho555/urban-sciences-model
|
43b56ff09ba8b06fae43e138a290b2ed9bf1529c
|
[
"MIT"
] | null | null | null |
notebooks/tests/test_inference.py
|
pomcho555/urban-sciences-model
|
43b56ff09ba8b06fae43e138a290b2ed9bf1529c
|
[
"MIT"
] | 2
|
2021-07-04T11:06:41.000Z
|
2022-02-13T07:31:04.000Z
|
import sys
sys.path.append("../")
from inference import get_masked_pil_img
from PIL import Image
def test_get_masked_pil_img():
output = get_masked_pil_img('../data/test/img/20201229Akihabara_out_00000_dir_020013selected_1.jpg')
assert type(output) == Image
| 29.666667
| 104
| 0.786517
| 41
| 267
| 4.756098
| 0.585366
| 0.138462
| 0.184615
| 0.230769
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.084034
| 0.108614
| 267
| 8
| 105
| 33.375
| 0.735294
| 0
| 0
| 0
| 0
| 0
| 0.269663
| 0.258427
| 0
| 0
| 0
| 0
| 0.142857
| 1
| 0.142857
| false
| 0
| 0.428571
| 0
| 0.571429
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
e1d2f89bc68f7d124c571c19f13adb9e5dd6050f
| 31
|
py
|
Python
|
project/app2/tests/test_app2.py
|
tomviner/bug-report-pytest-fixtures-list
|
15ce2360ad022309695e199ecb9c78435f870803
|
[
"MIT"
] | null | null | null |
project/app2/tests/test_app2.py
|
tomviner/bug-report-pytest-fixtures-list
|
15ce2360ad022309695e199ecb9c78435f870803
|
[
"MIT"
] | null | null | null |
project/app2/tests/test_app2.py
|
tomviner/bug-report-pytest-fixtures-list
|
15ce2360ad022309695e199ecb9c78435f870803
|
[
"MIT"
] | null | null | null |
def test_app2(fixy2):
pass
| 10.333333
| 21
| 0.677419
| 5
| 31
| 4
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.083333
| 0.225806
| 31
| 2
| 22
| 15.5
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 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
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
e1df01cafc1f0ea0ccf554120bdcd1d566c1d8be
| 80
|
py
|
Python
|
hypergan/search/default_configurations.py
|
limberc/HyperGAN
|
b074e74abf0ed9b81bd52084706e3707a47e0fe2
|
[
"MIT"
] | 889
|
2016-08-27T01:37:35.000Z
|
2018-10-07T19:47:56.000Z
|
hypergan/search/default_configurations.py
|
limberc/HyperGAN
|
b074e74abf0ed9b81bd52084706e3707a47e0fe2
|
[
"MIT"
] | 218
|
2021-05-25T01:46:15.000Z
|
2022-02-11T01:08:52.000Z
|
hypergan/search/default_configurations.py
|
limberc/HyperGAN
|
b074e74abf0ed9b81bd52084706e3707a47e0fe2
|
[
"MIT"
] | 145
|
2016-09-27T06:56:24.000Z
|
2018-09-25T16:09:28.000Z
|
class DefaultConfigurations:
@staticmethod
def get():
return {}
| 16
| 28
| 0.625
| 6
| 80
| 8.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.2875
| 80
| 4
| 29
| 20
| 0.877193
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| true
| 0
| 0
| 0.25
| 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
| 1
| 0
| 0
| 1
| 0
| 0
|
0
| 5
|
c036d64299ea73f594f3e7274d7746722758b468
| 329
|
py
|
Python
|
backend/fakebox/models/player.py
|
teodorvoicencu/FakeBox
|
f14ca83643894d9d0761294cfce511a52401de68
|
[
"MIT"
] | null | null | null |
backend/fakebox/models/player.py
|
teodorvoicencu/FakeBox
|
f14ca83643894d9d0761294cfce511a52401de68
|
[
"MIT"
] | null | null | null |
backend/fakebox/models/player.py
|
teodorvoicencu/FakeBox
|
f14ca83643894d9d0761294cfce511a52401de68
|
[
"MIT"
] | null | null | null |
class Player:
def __init__(self, player_id: int, nickname: str, websocket, is_vip: bool = False):
self.player_id = player_id
self.nickname = nickname
self.is_vip = is_vip
self.websocket = websocket
def __repr__(self):
return 'Player({}, {})'.format(self.player_id, self.nickname)
| 32.9
| 87
| 0.641337
| 42
| 329
| 4.666667
| 0.404762
| 0.163265
| 0.183673
| 0.204082
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.243161
| 329
| 9
| 88
| 36.555556
| 0.787149
| 0
| 0
| 0
| 0
| 0
| 0.042553
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 0.125
| 0.5
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 5
|
c052d039c94e542c69585ef93acaf89e1baaab44
| 73
|
py
|
Python
|
django_root/timerecording/__init__.py
|
mkue/time-recording-django
|
dcf6d9a54f632c8f3838ddcd02e0405e81ee9f77
|
[
"MIT"
] | null | null | null |
django_root/timerecording/__init__.py
|
mkue/time-recording-django
|
dcf6d9a54f632c8f3838ddcd02e0405e81ee9f77
|
[
"MIT"
] | null | null | null |
django_root/timerecording/__init__.py
|
mkue/time-recording-django
|
dcf6d9a54f632c8f3838ddcd02e0405e81ee9f77
|
[
"MIT"
] | null | null | null |
from configurations import importer
importer.install(check_options=True)
| 24.333333
| 36
| 0.876712
| 9
| 73
| 7
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.068493
| 73
| 3
| 36
| 24.333333
| 0.926471
| 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
|
c054aa4348a6807f7f019c83e3bf114b06153f91
| 112
|
py
|
Python
|
ruflesound/__init__.py
|
srufle/ruflesound
|
52d557b217b39bd44cbf1885b6d3ee215b4fed59
|
[
"MIT"
] | null | null | null |
ruflesound/__init__.py
|
srufle/ruflesound
|
52d557b217b39bd44cbf1885b6d3ee215b4fed59
|
[
"MIT"
] | null | null | null |
ruflesound/__init__.py
|
srufle/ruflesound
|
52d557b217b39bd44cbf1885b6d3ee215b4fed59
|
[
"MIT"
] | null | null | null |
name="ruflesound"
from . import effects
from . import filters
from . import formats
print(f"init ruflesound")
| 14
| 25
| 0.758929
| 15
| 112
| 5.666667
| 0.666667
| 0.352941
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.151786
| 112
| 7
| 26
| 16
| 0.894737
| 0
| 0
| 0
| 0
| 0
| 0.223214
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.6
| 0
| 0.6
| 0.2
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
c065a19f57c5f5289069a8bd9c02e2f3902ec1e4
| 94
|
py
|
Python
|
py2app/recipes/matplotlib_prescript.py
|
flupke/py2app
|
8eb6c618f9c63d6ac970fb145a7f7782b71bcb4d
|
[
"MIT"
] | 81
|
2015-11-29T12:17:39.000Z
|
2021-08-02T07:06:51.000Z
|
contents/img_google/.eggs/py2app-0.10-py2.7.egg/py2app/recipes/matplotlib_prescript.py
|
ivrson9/cdol
|
605fc330e7678e1b959d42094b59d0e02434ee26
|
[
"MIT"
] | 11
|
2016-10-23T16:34:10.000Z
|
2022-01-30T05:45:54.000Z
|
contents/img_google/.eggs/py2app-0.10-py2.7.egg/py2app/recipes/matplotlib_prescript.py
|
ivrson9/cdol
|
605fc330e7678e1b959d42094b59d0e02434ee26
|
[
"MIT"
] | 21
|
2016-01-25T18:46:31.000Z
|
2021-01-08T17:38:03.000Z
|
import os
os.environ['MATPLOTLIBDATA'] = os.path.join(os.environ['RESOURCEPATH'], 'mpl-data')
| 31.333333
| 83
| 0.734043
| 13
| 94
| 5.307692
| 0.692308
| 0.26087
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.06383
| 94
| 2
| 84
| 47
| 0.784091
| 0
| 0
| 0
| 0
| 0
| 0.361702
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
fbe3be5a24bca83fa6454a9457ed4657c1570582
| 263
|
py
|
Python
|
utils.py
|
GLutzBR/cli-atm
|
4bf6e56e0b8ed1d2a3728f3ec2c7cabde20f649e
|
[
"MIT"
] | null | null | null |
utils.py
|
GLutzBR/cli-atm
|
4bf6e56e0b8ed1d2a3728f3ec2c7cabde20f649e
|
[
"MIT"
] | null | null | null |
utils.py
|
GLutzBR/cli-atm
|
4bf6e56e0b8ed1d2a3728f3ec2c7cabde20f649e
|
[
"MIT"
] | null | null | null |
import os
def header():
print("****************************************")
print("*** School of Net - Caixa Eletrônico ***")
print("****************************************")
def clear_screen():
os.system('cls' if os.name == 'nt' else 'clear')
| 21.916667
| 53
| 0.391635
| 24
| 263
| 4.25
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.163498
| 263
| 11
| 54
| 23.909091
| 0.463636
| 0
| 0
| 0.285714
| 0
| 0
| 0.494297
| 0.304183
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| true
| 0
| 0.142857
| 0
| 0.428571
| 0.428571
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
fbfbd20cfe07c0965ed4f036c5c9e9dfb96fe78e
| 149
|
py
|
Python
|
codingbat.com/Logic-1/date_fashion.py
|
ahmedelq/PythonicAlgorithms
|
ce10dbb6e1fd0ea5c922a932b0f920236aa411bf
|
[
"MIT"
] | null | null | null |
codingbat.com/Logic-1/date_fashion.py
|
ahmedelq/PythonicAlgorithms
|
ce10dbb6e1fd0ea5c922a932b0f920236aa411bf
|
[
"MIT"
] | null | null | null |
codingbat.com/Logic-1/date_fashion.py
|
ahmedelq/PythonicAlgorithms
|
ce10dbb6e1fd0ea5c922a932b0f920236aa411bf
|
[
"MIT"
] | null | null | null |
def date_fashion(you, date):
high = (you > 8 or date > 8)
return (high and you > 2 and date > 2) * 2 + (not high and (you > 2 and date > 2) )
| 49.666667
| 85
| 0.57047
| 28
| 149
| 3
| 0.392857
| 0.166667
| 0.238095
| 0.261905
| 0.452381
| 0.452381
| 0.452381
| 0
| 0
| 0
| 0
| 0.066038
| 0.288591
| 149
| 3
| 85
| 49.666667
| 0.726415
| 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
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
fbfc024868d6d1f044384ed72c276f727cf88034
| 118
|
py
|
Python
|
aioautomatic/__init__.py
|
armills/aioautomatic
|
346666868f35308dd6edd8a1fffb4c4f0d0ba2da
|
[
"Apache-2.0"
] | 8
|
2017-04-16T01:16:31.000Z
|
2019-06-07T07:16:26.000Z
|
aioautomatic/__init__.py
|
armills/aioautomatic
|
346666868f35308dd6edd8a1fffb4c4f0d0ba2da
|
[
"Apache-2.0"
] | 5
|
2017-04-24T02:33:15.000Z
|
2019-10-16T21:30:04.000Z
|
aioautomatic/__init__.py
|
armills/aioautomatic
|
346666868f35308dd6edd8a1fffb4c4f0d0ba2da
|
[
"Apache-2.0"
] | 4
|
2017-04-24T02:06:27.000Z
|
2018-12-11T19:16:26.000Z
|
"""API interface to Automatic."""
# Export Client for external access
from aioautomatic.client import Client # noqa
| 23.6
| 46
| 0.762712
| 15
| 118
| 6
| 0.866667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.152542
| 118
| 4
| 47
| 29.5
| 0.9
| 0.567797
| 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
|
fbffb58a39daef39592f7319ab859098edf83ac8
| 489
|
py
|
Python
|
src/homework/sic-industry/main.py
|
andreajimenezorozco/CREDIT-RISK-2020
|
53e0da122d03f0b79615e11b9cc3578ffc6a4325
|
[
"MIT"
] | null | null | null |
src/homework/sic-industry/main.py
|
andreajimenezorozco/CREDIT-RISK-2020
|
53e0da122d03f0b79615e11b9cc3578ffc6a4325
|
[
"MIT"
] | null | null | null |
src/homework/sic-industry/main.py
|
andreajimenezorozco/CREDIT-RISK-2020
|
53e0da122d03f0b79615e11b9cc3578ffc6a4325
|
[
"MIT"
] | null | null | null |
import os
import json
from typing import Dict
from fintools.settings import get_logger
from fintools.utils import StringWrapper, timeit
from .settings import (
INDUSTRY_SEARCH_DEFAULT_FILENAME,
INDUSTRY_SEARCH_DEFAULT_THRESHOLD
)
logger = get_logger(name=__name__)
class Main:
threshold = INDUSTRY_SEARCH_DEFAULT_THRESHOLD
@timeit(logger=logger)
def search(self, title: str, exact: bool = False, file: str = INDUSTRY_SEARCH_DEFAULT_FILENAME) -> str:
pass
| 22.227273
| 107
| 0.770961
| 62
| 489
| 5.790323
| 0.483871
| 0.155989
| 0.233983
| 0.16156
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.167689
| 489
| 21
| 108
| 23.285714
| 0.882064
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.066667
| false
| 0.066667
| 0.4
| 0
| 0.6
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
|
0
| 5
|
225e4dea1750bee990c21e36b1de20d846d0fb6c
| 68
|
py
|
Python
|
yo_fluq_ds/_queries/__init__.py
|
okulovsky/yo_ds
|
9e1fa2e7a1b9746c3982afc152c024169fec45ca
|
[
"MIT"
] | 16
|
2019-09-26T09:05:42.000Z
|
2021-02-04T01:39:09.000Z
|
yo_fluq_ds/_queries/__init__.py
|
okulovsky/yo_ds
|
9e1fa2e7a1b9746c3982afc152c024169fec45ca
|
[
"MIT"
] | 2
|
2019-10-23T19:01:23.000Z
|
2020-06-11T09:08:45.000Z
|
yo_fluq_ds/_queries/__init__.py
|
okulovsky/yo_ds
|
9e1fa2e7a1b9746c3982afc152c024169fec45ca
|
[
"MIT"
] | 2
|
2019-09-26T09:05:50.000Z
|
2019-10-23T18:46:11.000Z
|
from .queryable import Queryable
from .query_class import QueryClass
| 34
| 35
| 0.867647
| 9
| 68
| 6.444444
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.102941
| 68
| 2
| 35
| 34
| 0.95082
| 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
|
226f809345d2cb38bcee6584f72e63bbd609bea8
| 145
|
py
|
Python
|
library_app/library_app/doctype/records/test_records.py
|
priyatoshy/FrappeLibraryApplication
|
73237b49f9647024ef7262b756fa799fe201b6d9
|
[
"MIT"
] | null | null | null |
library_app/library_app/doctype/records/test_records.py
|
priyatoshy/FrappeLibraryApplication
|
73237b49f9647024ef7262b756fa799fe201b6d9
|
[
"MIT"
] | null | null | null |
library_app/library_app/doctype/records/test_records.py
|
priyatoshy/FrappeLibraryApplication
|
73237b49f9647024ef7262b756fa799fe201b6d9
|
[
"MIT"
] | null | null | null |
# Copyright (c) 2022, Priyatosh and Contributors
# See license.txt
# import frappe
import unittest
class TestRecords(unittest.TestCase):
pass
| 16.111111
| 48
| 0.77931
| 18
| 145
| 6.277778
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.032258
| 0.144828
| 145
| 8
| 49
| 18.125
| 0.879032
| 0.524138
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.333333
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
|
0
| 5
|
97fb4e7f16e2d0907754c217a037d48a4790b69a
| 137
|
py
|
Python
|
examples/transliterate.py
|
fossabot/pythainlp
|
b3ea0ea2039ab9421bf851a73beb2559f3a28624
|
[
"Apache-2.0"
] | null | null | null |
examples/transliterate.py
|
fossabot/pythainlp
|
b3ea0ea2039ab9421bf851a73beb2559f3a28624
|
[
"Apache-2.0"
] | null | null | null |
examples/transliterate.py
|
fossabot/pythainlp
|
b3ea0ea2039ab9421bf851a73beb2559f3a28624
|
[
"Apache-2.0"
] | null | null | null |
# -*- coding: utf-8 -*-
from pythainlp.transliterate import romanize, transliterate
print(romanize("แมว"))
print(transliterate("แมว"))
| 19.571429
| 59
| 0.729927
| 15
| 137
| 6.666667
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.00813
| 0.10219
| 137
| 6
| 60
| 22.833333
| 0.804878
| 0.153285
| 0
| 0
| 0
| 0
| 0.052632
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0.666667
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
|
0
| 5
|
4513f84454c3ec066496a822142421a778c0efb1
| 6,739
|
py
|
Python
|
tests/bulk_importer/test_bulk_importer.py
|
alessiamarcolini/hangar-py
|
9084381cdc6bd2f01cf8701f5c799d8fadf72828
|
[
"Apache-2.0"
] | 202
|
2019-04-16T06:26:28.000Z
|
2022-03-11T19:57:07.000Z
|
tests/bulk_importer/test_bulk_importer.py
|
alessiamarcolini/hangar-py
|
9084381cdc6bd2f01cf8701f5c799d8fadf72828
|
[
"Apache-2.0"
] | 183
|
2019-04-20T07:09:15.000Z
|
2022-03-09T21:59:27.000Z
|
tests/bulk_importer/test_bulk_importer.py
|
alessiamarcolini/hangar-py
|
9084381cdc6bd2f01cf8701f5c799d8fadf72828
|
[
"Apache-2.0"
] | 30
|
2019-04-21T16:11:21.000Z
|
2022-03-03T08:32:28.000Z
|
import pytest
import numpy as np
def assert_equal(arr, arr2):
assert np.array_equal(arr, arr2)
assert arr.dtype == arr2.dtype
def test_bulk_importer_ndarray(repo):
from hangar.bulk_importer import run_bulk_import
from hangar.bulk_importer import UDF_Return
def make_ndarray(column, key, shape, dtype, multiplier):
size = np.prod(shape)
arr = np.arange(size, dtype=dtype).reshape(shape) * multiplier
yield UDF_Return(column=column, key=key, data=arr)
co = repo.checkout(write=True)
co.add_ndarray_column('arr', shape=(5, 5), dtype=np.uint32)
co.commit('first')
co.close()
kwargs = []
expected_kv = []
for idx in range(200):
_kw_dict = {
'column': 'arr',
'key': idx,
'shape': (5, 5),
'dtype': np.uint32,
'multiplier': idx
}
kwargs.append(_kw_dict)
for _udf_val in make_ndarray(**_kw_dict):
expected_kv.append(_udf_val)
assert len(expected_kv) == 200
run_bulk_import(
repo,
branch_name='master',
column_names=['arr'],
udf=make_ndarray,
udf_kwargs=kwargs,
ncpus=2)
co = repo.checkout()
try:
arr_col = co['arr']
assert len(arr_col) == 200
for _expected_udf_val in expected_kv:
assert _expected_udf_val.key in arr_col
assert_equal(arr_col[_expected_udf_val.key], _expected_udf_val.data)
finally:
co.close()
def test_bulk_importer_pystr(repo):
from hangar.bulk_importer import run_bulk_import
from hangar.bulk_importer import UDF_Return
def make_pystr(column, key, str_val):
yield UDF_Return(column=column, key=key, data=str_val)
co = repo.checkout(write=True)
co.add_str_column('str')
co.commit('first')
co.close()
kwargs = []
expected_kv = []
for idx in range(200):
_kw_dict = {
'column': 'str',
'key': idx,
'str_val': f'{str(idx) * 2}',
}
kwargs.append(_kw_dict)
for _udf_val in make_pystr(**_kw_dict):
expected_kv.append(_udf_val)
assert len(expected_kv) == 200
run_bulk_import(
repo,
branch_name='master',
column_names=['str'],
udf=make_pystr,
udf_kwargs=kwargs,
ncpus=2)
co = repo.checkout()
try:
str_col = co['str']
assert len(str_col) == 200
for _expected_udf_val in expected_kv:
assert _expected_udf_val.key in str_col
assert str_col[_expected_udf_val.key] == _expected_udf_val.data
finally:
co.close()
def test_bulk_importer_pybytes(repo):
from hangar.bulk_importer import run_bulk_import
from hangar.bulk_importer import UDF_Return
def make_pybytes(column, key, str_val):
raw = str_val.encode()
yield UDF_Return(column=column, key=key, data=raw)
co = repo.checkout(write=True)
co.add_bytes_column('bytes')
co.commit('first')
co.close()
kwargs = []
expected_kv = []
for idx in range(200):
_kw_dict = {
'column': 'bytes',
'key': idx,
'str_val': f'{str(idx) * 2}',
}
kwargs.append(_kw_dict)
for _udf_val in make_pybytes(**_kw_dict):
expected_kv.append(_udf_val)
assert len(expected_kv) == 200
run_bulk_import(
repo,
branch_name='master',
column_names=['bytes'],
udf=make_pybytes,
udf_kwargs=kwargs,
ncpus=2)
co = repo.checkout()
try:
bytes_col = co['bytes']
assert len(bytes_col) == 200
for _expected_udf_val in expected_kv:
assert _expected_udf_val.key in bytes_col
assert bytes_col[_expected_udf_val.key] == _expected_udf_val.data
finally:
co.close()
def test_bulk_importer_two_col_pybytes_pystr(repo):
from hangar.bulk_importer import run_bulk_import
from hangar.bulk_importer import UDF_Return
def _make_pystr(column, key, str_val):
yield UDF_Return(column=column, key=key, data=str_val)
def _make_pybytes(column, key, str_val):
raw = str_val.encode()
yield UDF_Return(column=column, key=key, data=raw)
def make_pystr_pybytes(str_col, bytes_col, key, str_val):
yield from _make_pystr(column=str_col, key=key, str_val=str_val)
yield from _make_pybytes(column=bytes_col, key=key, str_val=str_val)
co = repo.checkout(write=True)
co.add_bytes_column('bytes')
co.add_str_column('str')
co.commit('first')
co.close()
kwargs = []
expected_kv = []
for idx in range(200):
_kw_dict = {
'str_col': 'str',
'bytes_col': 'bytes',
'key': idx,
'str_val': f'{str(idx) * 2}',
}
kwargs.append(_kw_dict)
for _udf_val in make_pystr_pybytes(**_kw_dict):
expected_kv.append(_udf_val)
assert len(expected_kv) == 400
run_bulk_import(
repo,
branch_name='master',
column_names=['bytes', 'str'],
udf=make_pystr_pybytes,
udf_kwargs=kwargs,
ncpus=2)
co = repo.checkout()
try:
pybytes_col = co['bytes']
pystr_col = co['str']
assert len(pybytes_col) == 200
assert len(pystr_col) == 200
for _expected_udf_val in expected_kv:
assert _expected_udf_val.column in ['str', 'bytes']
if _expected_udf_val.column == 'str':
assert _expected_udf_val.key in pystr_col
assert pystr_col[_expected_udf_val.key] == _expected_udf_val.data
elif _expected_udf_val.column == 'bytes':
assert _expected_udf_val.key in pystr_col
assert pybytes_col[_expected_udf_val.key] == _expected_udf_val.data
else:
raise ValueError(_expected_udf_val.column)
finally:
co.close()
def test_signature_wrong(repo):
from hangar.bulk_importer import run_bulk_import
from hangar.bulk_importer import UDF_Return
def wrong_sig_udf(a, b, c=None):
yield UDF_Return(column='str', key=a, data=f'{a} {b} {c}')
co = repo.checkout(write=True)
co.add_str_column('str')
co.commit('first')
co.close()
kwargs = []
for idx in range(200):
_kw_dict = {
'a': 'bytes',
'str_val': f'{str(idx) * 2}',
}
kwargs.append(_kw_dict)
with pytest.raises(TypeError):
run_bulk_import(
repo,
branch_name='master',
column_names=['str'],
udf=wrong_sig_udf,
udf_kwargs=kwargs,
ncpus=2)
| 27.847107
| 83
| 0.599644
| 892
| 6,739
| 4.20852
| 0.099776
| 0.049547
| 0.085775
| 0.058604
| 0.782099
| 0.75333
| 0.742674
| 0.719766
| 0.710176
| 0.638519
| 0
| 0.012968
| 0.290548
| 6,739
| 241
| 84
| 27.962656
| 0.772223
| 0
| 0
| 0.623116
| 0
| 0
| 0.04793
| 0
| 0
| 0
| 0
| 0
| 0.115578
| 1
| 0.065327
| false
| 0
| 0.105528
| 0
| 0.170854
| 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
|
453bf7fe308eeb7fe0217b9bedf9327c548e5ae8
| 194
|
py
|
Python
|
engine/handlers.py
|
ellastyko/Widowmaker-1917-1922
|
2d9d2b8f273ea210997223193b6b9426ada3d738
|
[
"MIT"
] | null | null | null |
engine/handlers.py
|
ellastyko/Widowmaker-1917-1922
|
2d9d2b8f273ea210997223193b6b9426ada3d738
|
[
"MIT"
] | null | null | null |
engine/handlers.py
|
ellastyko/Widowmaker-1917-1922
|
2d9d2b8f273ea210997223193b6b9426ada3d738
|
[
"MIT"
] | null | null | null |
from config import *
# Screen change
def change_size(*args):
pass
# print(f'Size: {args [0]}')
# Mouse move
def on_motion(*args):
print(f'Motion: {args [0]}')
# Keyboard click
| 12.125
| 32
| 0.618557
| 28
| 194
| 4.214286
| 0.642857
| 0.135593
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.013245
| 0.221649
| 194
| 15
| 33
| 12.933333
| 0.768212
| 0.340206
| 0
| 0
| 0
| 0
| 0.146341
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.4
| true
| 0.2
| 0.2
| 0
| 0.6
| 0.2
| 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
| 1
| 0
| 0
| 1
| 0
|
0
| 5
|
4541dd27ae9808f3c9395d78e08781a27d56c04a
| 5,430
|
py
|
Python
|
nn_pruning/tests/test_patch.py
|
ebell495/nn_pruning
|
41263ab898117a639f3f219c23a4cecc8bc0e3f3
|
[
"Apache-2.0"
] | 250
|
2021-02-22T15:50:04.000Z
|
2022-03-31T08:12:02.000Z
|
nn_pruning/tests/test_patch.py
|
vuiseng9/nn_pruning
|
8f4a14dd63d621483cbc1bc4eb34600d66e9e71b
|
[
"Apache-2.0"
] | 28
|
2021-02-22T15:54:34.000Z
|
2022-03-17T08:57:38.000Z
|
nn_pruning/tests/test_patch.py
|
vuiseng9/nn_pruning
|
8f4a14dd63d621483cbc1bc4eb34600d66e9e71b
|
[
"Apache-2.0"
] | 31
|
2021-02-22T16:07:17.000Z
|
2022-03-28T09:17:24.000Z
|
import unittest
from unittest import TestCase
from transformers import BertConfig, BertForQuestionAnswering
from nn_pruning.model_structure import BertStructure
from nn_pruning.modules.masked_nn import (
ChannelPruningModulePatcher,
JointPruningModulePatcher,
LinearPruningArgs,
LinearPruningModulePatcher,
LinearPruningArgs,
)
from nn_pruning.training_patcher import LinearModelPatcher, PatcherContext
class TestFun(TestCase):
MODEL_STRUCTURE = BertStructure
def test_base(self):
config = BertConfig.from_pretrained("bert-base-uncased")
model = BertForQuestionAnswering(config)
patcher = LinearModelPatcher({}, self.MODEL_STRUCTURE)
layers = patcher.get_patchable_layers(model)
# for regexp, layers in layers.items():
# print(regexp)
def test_patch_module_independent_parameters(self):
config = BertConfig.from_pretrained("bert-base-uncased")
model = BertForQuestionAnswering(config)
parameters = LinearPruningArgs(
method="topK",
submethod="default",
ampere_method="disabled",
block_rows=32,
block_cols=32,
min_elements=0.005,
)
context = PatcherContext()
p = LinearPruningModulePatcher(context, parameters, self.MODEL_STRUCTURE)
module_patchers = dict(query=p, key=p, value=p, att_dense=p, interm_dense=p, output_dense=p)
patcher = LinearModelPatcher(module_patchers, self.MODEL_STRUCTURE)
patcher.patch(model)
self.assertEqual(patcher.stats["patched"], 72)
key_sizes = {k: len(v) for k, v in context.context_modules.items()}
self.assertEqual(key_sizes, {"mask": 72})
def test_patch_module_ampere(self):
config = BertConfig.from_pretrained("bert-base-uncased")
model = BertForQuestionAnswering(config)
parameters = LinearPruningArgs(
method="topK",
submethod="default",
ampere_method="annealing",
block_rows=32,
block_cols=32,
min_elements=0.005,
)
context = PatcherContext()
p = LinearPruningModulePatcher(context, parameters, self.MODEL_STRUCTURE)
module_patchers = dict(query=p, key=p, value=p, att_dense=p, interm_dense=p, output_dense=p)
patcher = LinearModelPatcher(module_patchers, self.MODEL_STRUCTURE)
patcher.patch(model)
self.assertEqual(patcher.stats["patched"], 72)
key_sizes = {k: len(v) for k, v in context.context_modules.items()}
self.assertEqual(key_sizes, {"ampere_mask": 72, "mask": 72})
def test_patch_module_tied_attention(self):
config = BertConfig.from_pretrained("bert-base-uncased")
model = BertForQuestionAnswering(config)
parameters = LinearPruningArgs(
method="topK",
submethod="default",
ampere_method="annealing",
block_rows=32,
block_cols=32,
min_elements=0.005,
)
context = PatcherContext()
p_attention = JointPruningModulePatcher(context, parameters, self.MODEL_STRUCTURE, "attention")
p_dense = LinearPruningModulePatcher(context, parameters, self.MODEL_STRUCTURE)
module_patchers = dict(
query=p_attention,
key=p_attention,
value=p_attention,
att_dense=p_dense,
interm_dense=p_dense,
output_dense=p_dense,
)
patcher = LinearModelPatcher(module_patchers, self.MODEL_STRUCTURE)
patcher.patch(model)
self.assertEqual(patcher.stats["patched"], 72)
key_sizes = {k: len(v) for k, v in context.context_modules.items()}
self.assertEqual(key_sizes, {"ampere_mask": 72, "mask": 48})
def test_patch_tiedattention_line_pruning(self):
config = BertConfig.from_pretrained("bert-base-uncased")
model = BertForQuestionAnswering(config)
parameters_attention = LinearPruningArgs(
method="topK",
submethod="default",
ampere_method="annealing",
block_rows=32,
block_cols=32,
min_elements=0.005,
)
parameters_dense = LinearPruningArgs(
method="topK", submethod="1d", ampere_method="annealing", block_rows=32, block_cols=32, min_elements=0.005
)
context = PatcherContext()
p_attention = JointPruningModulePatcher(context, parameters_attention, self.MODEL_STRUCTURE, suffix=".attention")
p_dense = ChannelPruningModulePatcher(context, parameters_dense, self.MODEL_STRUCTURE, suffix="dense")
module_patchers = dict(
query=p_attention,
key=p_attention,
value=p_attention,
att_dense=p_dense,
interm_dense=p_dense,
output_dense=p_dense,
)
patcher = LinearModelPatcher(module_patchers, self.MODEL_STRUCTURE)
patcher.patch(model)
self.assertEqual(patcher.stats["patched"], 72)
key_sizes = {k: len(v) for k, v in context.context_modules.items()}
for k, v in key_sizes.items():
print(k, v)
for k, v in context.context_modules.items():
print(k, v)
self.assertEqual(key_sizes, {"ampere_mask": 72, "mask": 12, "mask_1d": 48})
if __name__ == "__main__":
unittest.main()
| 33.109756
| 121
| 0.64954
| 564
| 5,430
| 6.028369
| 0.159574
| 0.053529
| 0.058235
| 0.012353
| 0.734706
| 0.729412
| 0.716471
| 0.716471
| 0.705
| 0.695
| 0
| 0.016296
| 0.254144
| 5,430
| 163
| 122
| 33.312883
| 0.82321
| 0.009945
| 0
| 0.65
| 0
| 0
| 0.054904
| 0
| 0
| 0
| 0
| 0
| 0.066667
| 1
| 0.041667
| false
| 0
| 0.05
| 0
| 0.108333
| 0.016667
| 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
|
45423af22ce0ee4eba11e9431e81dbbec3ed9d95
| 23
|
py
|
Python
|
server/core/services/__init__.py
|
FranciscoShi/jenkins-gitlab-integrator
|
9e9b101df2c67ff73f204828fdf702fc1e2a382d
|
[
"Apache-2.0"
] | 2
|
2017-07-19T10:39:31.000Z
|
2018-03-21T10:24:42.000Z
|
server/core/services/__init__.py
|
FranciscoShi/jenkins-gitlab-integrator
|
9e9b101df2c67ff73f204828fdf702fc1e2a382d
|
[
"Apache-2.0"
] | 1
|
2017-08-11T20:29:43.000Z
|
2017-08-14T15:06:14.000Z
|
server/core/services/__init__.py
|
FranciscoShi/jenkins-gitlab-integrator
|
9e9b101df2c67ff73f204828fdf702fc1e2a382d
|
[
"Apache-2.0"
] | 1
|
2021-08-08T00:07:12.000Z
|
2021-08-08T00:07:12.000Z
|
# Business Logic Layer
| 11.5
| 22
| 0.782609
| 3
| 23
| 6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.173913
| 23
| 1
| 23
| 23
| 0.947368
| 0.869565
| 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
|
189b99aee9344c8ad3fdb04e41ebab6b1ae16643
| 46
|
py
|
Python
|
pycode/__init__.py
|
tobleroo/project-Johias
|
ba27eb7ce41424f2667ff4c7ab74c96b5839cfe2
|
[
"MIT"
] | null | null | null |
pycode/__init__.py
|
tobleroo/project-Johias
|
ba27eb7ce41424f2667ff4c7ab74c96b5839cfe2
|
[
"MIT"
] | null | null | null |
pycode/__init__.py
|
tobleroo/project-Johias
|
ba27eb7ce41424f2667ff4c7ab74c96b5839cfe2
|
[
"MIT"
] | 1
|
2022-02-22T19:39:18.000Z
|
2022-02-22T19:39:18.000Z
|
"""Py file needed to create documentation."""
| 23
| 45
| 0.717391
| 6
| 46
| 5.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.130435
| 46
| 1
| 46
| 46
| 0.825
| 0.847826
| 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
|
18a85b17df8ce23dfcb1e3b778abc48cf5b09d4c
| 2,720
|
py
|
Python
|
test/unit_tests/models/test_models.py
|
Simon-Free/braindecode
|
41a216572f08ef23fd0af47e10e89bc9179cce5e
|
[
"BSD-3-Clause"
] | 1
|
2020-05-25T14:22:34.000Z
|
2020-05-25T14:22:34.000Z
|
test/unit_tests/models/test_models.py
|
alakialakiani/braindecode
|
41a216572f08ef23fd0af47e10e89bc9179cce5e
|
[
"BSD-3-Clause"
] | null | null | null |
test/unit_tests/models/test_models.py
|
alakialakiani/braindecode
|
41a216572f08ef23fd0af47e10e89bc9179cce5e
|
[
"BSD-3-Clause"
] | null | null | null |
# Authors: Alexandre Gramfort
#
# License: BSD-3
import numpy as np
import torch
from braindecode.models import Deep4Net
from braindecode.models import EEGNetv4, EEGNetv1
from braindecode.models import HybridNet
from braindecode.models import ShallowFBCSPNet
from braindecode.models import EEGResNet
def test_shallow_fbcsp_net():
rng = np.random.RandomState(42)
n_channels = 18
n_in_times = 200
n_classes = 2
n_samples = 7
X = rng.randn(n_samples, n_channels, n_in_times, 1)
X = torch.Tensor(X.astype(np.float32))
model = ShallowFBCSPNet(
n_channels, n_classes, n_in_times, final_conv_length="auto"
)
y_pred = model(X)
assert y_pred.shape == (n_samples, n_classes)
def test_deep4net():
rng = np.random.RandomState(42)
n_channels = 18
n_in_times = 600
n_classes = 2
n_samples = 7
X = rng.randn(n_samples, n_channels, n_in_times, 1)
X = torch.Tensor(X.astype(np.float32))
model = Deep4Net(
n_channels, n_classes, n_in_times, final_conv_length="auto"
)
y_pred = model(X)
assert y_pred.shape == (n_samples, n_classes)
def test_eegresnet():
rng = np.random.RandomState(42)
n_channels = 18
n_in_times = 600
n_classes = 2
n_samples = 7
X = rng.randn(n_samples, n_channels, n_in_times, 1)
X = torch.Tensor(X.astype(np.float32))
model = EEGResNet(
n_channels,
n_classes,
n_in_times,
final_pool_length=5,
n_first_filters=2,
)
y_pred = model(X)
assert y_pred.shape[:2] == (n_samples, n_classes)
def test_hybridnet():
rng = np.random.RandomState(42)
n_channels = 18
n_in_times = 600
n_classes = 2
n_samples = 7
X = rng.randn(n_samples, n_channels, n_in_times, 1)
X = torch.Tensor(X.astype(np.float32))
model = HybridNet(n_channels, n_classes, n_in_times)
y_pred = model(X)
assert y_pred.shape[:2] == (n_samples, n_classes)
def test_eegnet_v4():
rng = np.random.RandomState(42)
n_channels = 18
n_in_times = 500
n_classes = 2
n_samples = 7
X = rng.randn(n_samples, n_channels, n_in_times, 1)
X = torch.Tensor(X.astype(np.float32))
model = EEGNetv4(n_channels, n_classes, input_window_samples=n_in_times)
y_pred = model(X)
assert y_pred.shape == (n_samples, n_classes)
def test_eegnet_v1():
rng = np.random.RandomState(42)
n_channels = 18
n_in_times = 500
n_classes = 2
n_samples = 7
X = rng.randn(n_samples, n_channels, n_in_times, 1)
X = torch.Tensor(X.astype(np.float32))
model = EEGNetv1(n_channels, n_classes, input_window_samples=n_in_times)
y_pred = model(X)
assert y_pred.shape == (n_samples, n_classes)
| 26.666667
| 76
| 0.676103
| 426
| 2,720
| 4.025822
| 0.152582
| 0.094461
| 0.083965
| 0.076968
| 0.772595
| 0.772595
| 0.772595
| 0.755685
| 0.738192
| 0.738192
| 0
| 0.040604
| 0.221324
| 2,720
| 101
| 77
| 26.930693
| 0.769122
| 0.015441
| 0
| 0.662651
| 0
| 0
| 0.002992
| 0
| 0
| 0
| 0
| 0
| 0.072289
| 1
| 0.072289
| false
| 0
| 0.084337
| 0
| 0.156627
| 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
|
18b0079a8725811fbc2f9e90c3e5b9a24a520191
| 27
|
py
|
Python
|
project/tests/helpers.py
|
InStateTeam/virtual-identities
|
91af9f8f9aa709a77360d608e29ae9969fc0e098
|
[
"MIT"
] | 267
|
2017-01-10T09:01:55.000Z
|
2022-03-23T02:59:31.000Z
|
project/tests/helpers.py
|
InStateTeam/virtual-identities
|
91af9f8f9aa709a77360d608e29ae9969fc0e098
|
[
"MIT"
] | 39
|
2019-03-13T05:40:40.000Z
|
2021-06-25T15:17:43.000Z
|
project/tests/helpers.py
|
InStateTeam/virtual-identities
|
91af9f8f9aa709a77360d608e29ae9969fc0e098
|
[
"MIT"
] | 199
|
2016-12-13T20:44:01.000Z
|
2022-03-30T08:57:15.000Z
|
# project/tests/helpers.py
| 13.5
| 26
| 0.777778
| 4
| 27
| 5.25
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.074074
| 27
| 1
| 27
| 27
| 0.84
| 0.888889
| 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
|
18b159b2c0df359628d2ab7c818e066792b1b9f8
| 172
|
py
|
Python
|
jtyoui/person/__init__.py
|
vanton/Jtyoui
|
c44d66b038ac5f4e2d75b68b3493d02f7b7b385e
|
[
"MIT"
] | 2
|
2019-11-06T01:47:17.000Z
|
2019-11-06T01:48:19.000Z
|
jtyoui/person/__init__.py
|
liangxioa/Jtyoui
|
5a584cbf12d644b6c4fb13167d8841a383afbbac
|
[
"MIT"
] | null | null | null |
jtyoui/person/__init__.py
|
liangxioa/Jtyoui
|
5a584cbf12d644b6c4fb13167d8841a383afbbac
|
[
"MIT"
] | null | null | null |
#!/usr/bin/python3.7
# -*- coding: utf-8 -*-
# @Time : 2019/10/11 15:04
# @Author: Jtyoui@qq.com
"""
关于人属性的一个包
"""
from .nation import * # 民族
from .surname import * # 姓
| 17.2
| 27
| 0.593023
| 26
| 172
| 3.923077
| 0.923077
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.107143
| 0.186047
| 172
| 9
| 28
| 19.111111
| 0.621429
| 0.610465
| 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
|
18d999d01b146b40c8d0130e9ce21cb1387a8dc7
| 193
|
py
|
Python
|
tests/test_jobs.py
|
sanjibansg/nbox
|
bf23b7cceb3179ba3d051a38aac0e32925a513e8
|
[
"BSD-3-Clause"
] | 9
|
2021-09-28T19:01:39.000Z
|
2022-03-22T19:01:29.000Z
|
tests/test_jobs.py
|
sanjibansg/nbox
|
bf23b7cceb3179ba3d051a38aac0e32925a513e8
|
[
"BSD-3-Clause"
] | 2
|
2021-08-06T10:25:41.000Z
|
2022-03-18T08:31:19.000Z
|
tests/test_jobs.py
|
sanjibansg/nbox
|
bf23b7cceb3179ba3d051a38aac0e32925a513e8
|
[
"BSD-3-Clause"
] | 4
|
2021-09-17T12:40:44.000Z
|
2022-02-16T06:14:44.000Z
|
# from nbox import Instance
# instance = Instance("nbox-dev", cs_endpoint="jobs")
# instance.files
# print(instance)
# uid = instance("add.py")
# print(uid)
# print(instance("azure-cadence"))
| 21.444444
| 53
| 0.699482
| 25
| 193
| 5.36
| 0.6
| 0.238806
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.119171
| 193
| 8
| 54
| 24.125
| 0.788235
| 0.917098
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 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
|
18e4fbdf7e6734417d402300d9577c6dc7ec3085
| 43
|
py
|
Python
|
ipynb/test.py
|
ssunggun2/korean-ner
|
828e07d1c44692edd09460e08d6142916e83b27b
|
[
"MIT"
] | null | null | null |
ipynb/test.py
|
ssunggun2/korean-ner
|
828e07d1c44692edd09460e08d6142916e83b27b
|
[
"MIT"
] | null | null | null |
ipynb/test.py
|
ssunggun2/korean-ner
|
828e07d1c44692edd09460e08d6142916e83b27b
|
[
"MIT"
] | null | null | null |
from ML_main import main
main()
#왜 안되는겉까
| 7.166667
| 24
| 0.72093
| 8
| 43
| 3.75
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.209302
| 43
| 5
| 25
| 8.6
| 0.882353
| 0.162791
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
7a04746fe90a7f8f88553159d5d10131c72b8785
| 2,921
|
py
|
Python
|
evdemo/typeclasses/channels.py
|
evennia/evdemo
|
c8e7a935100c6717bbddd50af5662a4e19804803
|
[
"BSD-3-Clause"
] | 5
|
2016-07-10T05:40:46.000Z
|
2019-08-24T16:02:43.000Z
|
evdemo/typeclasses/channels.py
|
evennia/evdemo
|
c8e7a935100c6717bbddd50af5662a4e19804803
|
[
"BSD-3-Clause"
] | 5
|
2019-02-02T22:52:46.000Z
|
2021-06-23T08:39:17.000Z
|
evdemo/typeclasses/channels.py
|
evennia/evdemo
|
c8e7a935100c6717bbddd50af5662a4e19804803
|
[
"BSD-3-Clause"
] | 5
|
2015-06-16T05:53:48.000Z
|
2018-12-01T16:00:36.000Z
|
"""
Channel
The channel class represents the out-of-character chat-room usable by
Accounts in-game. It is mostly overloaded to change its appearance, but
channels can be used to implement many different forms of message
distribution systems.
Note that sending data to channels are handled via the CMD_CHANNEL
syscommand (see evennia.syscmds). The sending should normally not need
to be modified.
"""
from evennia import DefaultChannel
class Channel(DefaultChannel):
"""
Working methods:
at_channel_creation() - called once, when the channel is created
has_connection(account) - check if the given account listens to this channel
connect(account) - connect account to this channel
disconnect(account) - disconnect account from channel
access(access_obj, access_type='listen', default=False) - check the
access on this channel (default access_type is listen)
delete() - delete this channel
message_transform(msg, emit=False, prefix=True,
sender_strings=None, external=False) - called by
the comm system and triggers the hooks below
msg(msgobj, header=None, senders=None, sender_strings=None,
persistent=None, online=False, emit=False, external=False) - main
send method, builds and sends a new message to channel.
tempmsg(msg, header=None, senders=None) - wrapper for sending non-persistent
messages.
distribute_message(msg, online=False) - send a message to all
connected accounts on channel, optionally sending only
to accounts that are currently online (optimized for very large sends)
Useful hooks:
channel_prefix(msg, emit=False) - how the channel should be
prefixed when returning to user. Returns a string
format_senders(senders) - should return how to display multiple
senders to a channel
pose_transform(msg, sender_string) - should detect if the
sender is posing, and if so, modify the string
format_external(msg, senders, emit=False) - format messages sent
from outside the game, like from IRC
format_message(msg, emit=False) - format the message body before
displaying it to the user. 'emit' generally means that the
message should not be displayed with the sender's name.
pre_join_channel(joiner) - if returning False, abort join
post_join_channel(joiner) - called right after successful join
pre_leave_channel(leaver) - if returning False, abort leave
post_leave_channel(leaver) - called right after successful leave
pre_send_message(msg) - runs just before a message is sent to channel
post_send_message(msg) - called just after message was sent to channel
"""
pass
| 47.885246
| 86
| 0.682985
| 379
| 2,921
| 5.187335
| 0.432718
| 0.022889
| 0.018311
| 0.021363
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.263951
| 2,921
| 60
| 87
| 48.683333
| 0.914419
| 0.913728
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.333333
| 0.333333
| 0
| 0.666667
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
|
0
| 5
|
7a1bf63b770f8b966a9048bc01ce3f8e3e51657c
| 115
|
py
|
Python
|
etc/gunicorn.conf.py
|
ciur/lesson-6-gunicorn
|
8854653b4143b2c5bdb48a09273ba417698d3624
|
[
"Apache-2.0"
] | null | null | null |
etc/gunicorn.conf.py
|
ciur/lesson-6-gunicorn
|
8854653b4143b2c5bdb48a09273ba417698d3624
|
[
"Apache-2.0"
] | null | null | null |
etc/gunicorn.conf.py
|
ciur/lesson-6-gunicorn
|
8854653b4143b2c5bdb48a09273ba417698d3624
|
[
"Apache-2.0"
] | 1
|
2021-11-25T11:17:28.000Z
|
2021-11-25T11:17:28.000Z
|
workers = 2
errorlog = "/demo/mysite.gunicorn.error"
accesslog = "/demo/mysite.gunicorn.access"
loglevel = "debug"
| 23
| 42
| 0.73913
| 14
| 115
| 6.071429
| 0.785714
| 0.235294
| 0.423529
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.009709
| 0.104348
| 115
| 4
| 43
| 28.75
| 0.815534
| 0
| 0
| 0
| 0
| 0
| 0.521739
| 0.478261
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
e132f6f9dfe82a8e509706068d362377e4482fa0
| 31
|
py
|
Python
|
correios/__init__.py
|
hudsonbrendon/py-correios
|
69c625bae7fc7bfa943b6443ebac5e5bb75b259b
|
[
"MIT"
] | 7
|
2017-12-05T23:06:41.000Z
|
2018-11-30T02:36:50.000Z
|
correios/__init__.py
|
hudsonbrendon/py-correios
|
69c625bae7fc7bfa943b6443ebac5e5bb75b259b
|
[
"MIT"
] | 1
|
2019-02-06T04:16:39.000Z
|
2019-05-23T11:08:31.000Z
|
correios/__init__.py
|
hudsonbrendon/py-correios
|
69c625bae7fc7bfa943b6443ebac5e5bb75b259b
|
[
"MIT"
] | 3
|
2017-12-06T02:00:15.000Z
|
2020-12-17T02:50:07.000Z
|
from .correios import Correios
| 15.5
| 30
| 0.83871
| 4
| 31
| 6.5
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.129032
| 31
| 1
| 31
| 31
| 0.962963
| 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
|
e1390ae2fdbf9c46aea12e07bc11432e1325a699
| 57
|
py
|
Python
|
eds/openmtc-gevent/server/openmtc-ngsi/openmtc-ngsi-pylibs/urllib3/packages/six.py
|
piyush82/elastest-device-emulator-service
|
b4d6b393d6042c54a7b3dfb5f58cad5efd00f0e7
|
[
"Apache-2.0"
] | null | null | null |
eds/openmtc-gevent/server/openmtc-ngsi/openmtc-ngsi-pylibs/urllib3/packages/six.py
|
piyush82/elastest-device-emulator-service
|
b4d6b393d6042c54a7b3dfb5f58cad5efd00f0e7
|
[
"Apache-2.0"
] | null | null | null |
eds/openmtc-gevent/server/openmtc-ngsi/openmtc-ngsi-pylibs/urllib3/packages/six.py
|
piyush82/elastest-device-emulator-service
|
b4d6b393d6042c54a7b3dfb5f58cad5efd00f0e7
|
[
"Apache-2.0"
] | null | null | null |
from __future__ import absolute_import
from six import *
| 19
| 38
| 0.842105
| 8
| 57
| 5.375
| 0.625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.140351
| 57
| 2
| 39
| 28.5
| 0.877551
| 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
|
e1903bb2c87750841dffd51baeb72b0077cd8b40
| 255
|
py
|
Python
|
geekshop/adminapp/templatetags/my_tags.py
|
LopukhovDA/django_base
|
3aad5de7ef611a1e0103351409ca3043dc95046e
|
[
"MIT"
] | null | null | null |
geekshop/adminapp/templatetags/my_tags.py
|
LopukhovDA/django_base
|
3aad5de7ef611a1e0103351409ca3043dc95046e
|
[
"MIT"
] | null | null | null |
geekshop/adminapp/templatetags/my_tags.py
|
LopukhovDA/django_base
|
3aad5de7ef611a1e0103351409ca3043dc95046e
|
[
"MIT"
] | null | null | null |
from django import template
from django.conf import settings
register = template.Library()
@register.filter(name="pieces")
def pieces(string):
return f"{string} шт."
@register.filter(name="rubles")
def rubles(string):
return f"{string} руб."
| 17
| 32
| 0.721569
| 34
| 255
| 5.411765
| 0.529412
| 0.108696
| 0.195652
| 0.206522
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.141176
| 255
| 14
| 33
| 18.214286
| 0.840183
| 0
| 0
| 0
| 0
| 0
| 0.145098
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.222222
| false
| 0
| 0.222222
| 0.222222
| 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
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
e19cc495e51dee2b5213132fcfa547fa98d0e29a
| 77
|
py
|
Python
|
flask_core/database/__init__.py
|
secedu/flask-core
|
3d8def8280613825f070d150372f9513f7727b69
|
[
"Apache-2.0"
] | 3
|
2019-03-07T05:33:21.000Z
|
2019-04-22T22:29:34.000Z
|
flask_core/database/__init__.py
|
secedu/flask-core
|
3d8def8280613825f070d150372f9513f7727b69
|
[
"Apache-2.0"
] | 23
|
2019-03-10T15:03:14.000Z
|
2019-05-16T11:15:22.000Z
|
flask_core/database/__init__.py
|
secedu/flask-core
|
3d8def8280613825f070d150372f9513f7727b69
|
[
"Apache-2.0"
] | 3
|
2019-03-07T05:33:05.000Z
|
2021-02-17T16:39:18.000Z
|
#!/usr/bin/env python3
# TODO: export a singleton database isolation class?
| 19.25
| 52
| 0.753247
| 11
| 77
| 5.272727
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.015152
| 0.142857
| 77
| 3
| 53
| 25.666667
| 0.863636
| 0.935065
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0.333333
| 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
|
e1a525ba1b57330a3bd7ba635c6be970718cd87e
| 165
|
py
|
Python
|
src/plugins/get_time.py
|
Tpool1/Asclepius
|
760ab31a8933772faa76064a42b11ab6e12d6c9a
|
[
"MIT"
] | null | null | null |
src/plugins/get_time.py
|
Tpool1/Asclepius
|
760ab31a8933772faa76064a42b11ab6e12d6c9a
|
[
"MIT"
] | null | null | null |
src/plugins/get_time.py
|
Tpool1/Asclepius
|
760ab31a8933772faa76064a42b11ab6e12d6c9a
|
[
"MIT"
] | null | null | null |
from datetime import datetime
from packages.play_text import play_text
def get_time():
time = datetime.now()
play_text('The time is ' + str(time))
| 20.625
| 41
| 0.684848
| 24
| 165
| 4.541667
| 0.541667
| 0.220183
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.224242
| 165
| 8
| 42
| 20.625
| 0.851563
| 0
| 0
| 0
| 0
| 0
| 0.072289
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.4
| 0
| 0.6
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
bed489c3b5efb041c2a5769527ea2aeb84556fb8
| 147
|
py
|
Python
|
apistar_jwt/decorators.py
|
jgirardet/apistar-jwt
|
46559eae367cf3c90cabd713c48ff0ef2d4d799d
|
[
"MIT"
] | 42
|
2017-10-05T00:58:10.000Z
|
2020-02-22T22:36:30.000Z
|
apistar_jwt/decorators.py
|
jgirardet/apistar-jwt
|
46559eae367cf3c90cabd713c48ff0ef2d4d799d
|
[
"MIT"
] | 19
|
2017-10-06T18:31:42.000Z
|
2019-10-18T16:22:22.000Z
|
apistar_jwt/decorators.py
|
jgirardet/apistar-jwt
|
46559eae367cf3c90cabd713c48ff0ef2d4d799d
|
[
"MIT"
] | 11
|
2017-10-06T20:02:20.000Z
|
2018-08-14T12:10:32.000Z
|
def anonymous_allowed(fn):
fn.authenticated = False
return fn
def authentication_required(fn):
fn.authenticated = True
return fn
| 16.333333
| 32
| 0.714286
| 18
| 147
| 5.722222
| 0.555556
| 0.07767
| 0.330097
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.217687
| 147
| 8
| 33
| 18.375
| 0.895652
| 0
| 0
| 0.333333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 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
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
beec1deb008785b5fd5011a01d96645fc7224bb6
| 42
|
py
|
Python
|
demo.py
|
MacHu-GWU/afwf-project
|
09ba89da9ec03c125031bb7cc01bcdf0042d3408
|
[
"MIT"
] | null | null | null |
demo.py
|
MacHu-GWU/afwf-project
|
09ba89da9ec03c125031bb7cc01bcdf0042d3408
|
[
"MIT"
] | null | null | null |
demo.py
|
MacHu-GWU/afwf-project
|
09ba89da9ec03c125031bb7cc01bcdf0042d3408
|
[
"MIT"
] | null | null | null |
import sys
print(1)
sys.exit(0)
print(2)
| 7
| 11
| 0.690476
| 9
| 42
| 3.222222
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.083333
| 0.142857
| 42
| 5
| 12
| 8.4
| 0.722222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.25
| 0
| 0.25
| 0.5
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
8302629152dc16494fd3443ef8b177522ffc81dc
| 46
|
py
|
Python
|
python/fastcampus_python_all_in_one/1.python_basic/section11_csv_xlsx.py
|
RollLife/oddmentsLabs
|
82ee4d2413edc153a89f31a7a70328949cb069a5
|
[
"MIT"
] | null | null | null |
python/fastcampus_python_all_in_one/1.python_basic/section11_csv_xlsx.py
|
RollLife/oddmentsLabs
|
82ee4d2413edc153a89f31a7a70328949cb069a5
|
[
"MIT"
] | null | null | null |
python/fastcampus_python_all_in_one/1.python_basic/section11_csv_xlsx.py
|
RollLife/oddmentsLabs
|
82ee4d2413edc153a89f31a7a70328949cb069a5
|
[
"MIT"
] | null | null | null |
# import csv
# xsl, xlsx 패키지 사용
# openxsl 사용
| 11.5
| 18
| 0.652174
| 8
| 46
| 3.75
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.26087
| 46
| 4
| 19
| 11.5
| 0.882353
| 0.847826
| 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
|
832adac21167c53a5b3844b574477ba20687aef2
| 42
|
py
|
Python
|
birg_chemometrics_tools/classification/__init__.py
|
BiRG/chemometrics_tools
|
f96aa5fc2478ce454f110f4940ff29632c2e0324
|
[
"MIT"
] | null | null | null |
birg_chemometrics_tools/classification/__init__.py
|
BiRG/chemometrics_tools
|
f96aa5fc2478ce454f110f4940ff29632c2e0324
|
[
"MIT"
] | null | null | null |
birg_chemometrics_tools/classification/__init__.py
|
BiRG/chemometrics_tools
|
f96aa5fc2478ce454f110f4940ff29632c2e0324
|
[
"MIT"
] | null | null | null |
from .plsda import PLSDiscriminantAnalysis
| 42
| 42
| 0.904762
| 4
| 42
| 9.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.071429
| 42
| 1
| 42
| 42
| 0.974359
| 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
|
83336a5c43faa2d228e6b197cb1d9d3dd86afa9d
| 321
|
py
|
Python
|
src/myapi/vecutil.py
|
mexeniz/cython-example
|
37b4b2cce5e49d35e7760ed9d2ab64847846b5c9
|
[
"MIT"
] | null | null | null |
src/myapi/vecutil.py
|
mexeniz/cython-example
|
37b4b2cce5e49d35e7760ed9d2ab64847846b5c9
|
[
"MIT"
] | null | null | null |
src/myapi/vecutil.py
|
mexeniz/cython-example
|
37b4b2cce5e49d35e7760ed9d2ab64847846b5c9
|
[
"MIT"
] | null | null | null |
import numpy as np
def random_vec(length):
if type(length) is not int:
raise ValueError("length should be int.")
elif length <= 0:
raise ValueError("length should be a positive number.")
return np.random.rand(length)
def normalize_vec(vector):
return vector / np.linalg.norm(vector)
| 26.75
| 63
| 0.676012
| 46
| 321
| 4.673913
| 0.608696
| 0.139535
| 0.195349
| 0.251163
| 0.269767
| 0
| 0
| 0
| 0
| 0
| 0
| 0.004032
| 0.227414
| 321
| 12
| 64
| 26.75
| 0.862903
| 0
| 0
| 0
| 0
| 0
| 0.173913
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.222222
| false
| 0
| 0.111111
| 0.111111
| 0.555556
| 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
|
8334ec4649803b2561f1473aeee29f5ad53f5d9b
| 110
|
py
|
Python
|
c2cgeoportal/scaffolds/create/+package+/resources.py
|
craxxkid/c2cgeoportal
|
60ca7d5d014d69b0a938f858271c911a30da77c3
|
[
"BSD-2-Clause-FreeBSD"
] | null | null | null |
c2cgeoportal/scaffolds/create/+package+/resources.py
|
craxxkid/c2cgeoportal
|
60ca7d5d014d69b0a938f858271c911a30da77c3
|
[
"BSD-2-Clause-FreeBSD"
] | 22
|
2017-03-22T14:46:10.000Z
|
2017-06-19T14:23:38.000Z
|
geoportailv3/resources.py
|
geoportallux/geoportailv3-gisgr
|
eb973863aec11faa50c8be47221988eaf4716452
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
class Root(object):
def __init__(self, request):
self.request = request
| 15.714286
| 32
| 0.590909
| 13
| 110
| 4.692308
| 0.769231
| 0.360656
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.012048
| 0.245455
| 110
| 6
| 33
| 18.333333
| 0.722892
| 0.190909
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
8369290322e65ed3a18b31582e8f334d11d9c553
| 52
|
py
|
Python
|
src/maclookup/exceptions/invalid_mac_or_oui_exception.py
|
BharatLLP/tokyopro
|
bf113c0c5de327e2451bf952ae9df61a7b59a19a
|
[
"MIT"
] | null | null | null |
src/maclookup/exceptions/invalid_mac_or_oui_exception.py
|
BharatLLP/tokyopro
|
bf113c0c5de327e2451bf952ae9df61a7b59a19a
|
[
"MIT"
] | null | null | null |
src/maclookup/exceptions/invalid_mac_or_oui_exception.py
|
BharatLLP/tokyopro
|
bf113c0c5de327e2451bf952ae9df61a7b59a19a
|
[
"MIT"
] | null | null | null |
class InvalidMacOrOuiException(Exception):
pass
| 17.333333
| 42
| 0.807692
| 4
| 52
| 10.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.134615
| 52
| 2
| 43
| 26
| 0.933333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
36290cae3f654007538a0b828e74845b35e6b4e0
| 155
|
py
|
Python
|
Main.py
|
JamaSoftware/fieldMapper
|
f17b8176c7a22e9646a662a827cad6e08f002f4e
|
[
"MIT"
] | null | null | null |
Main.py
|
JamaSoftware/fieldMapper
|
f17b8176c7a22e9646a662a827cad6e08f002f4e
|
[
"MIT"
] | null | null | null |
Main.py
|
JamaSoftware/fieldMapper
|
f17b8176c7a22e9646a662a827cad6e08f002f4e
|
[
"MIT"
] | null | null | null |
from core import Handler
from core import JamaConfig
jamaConfig = JamaConfig()
handler = Handler()
handler.map_fields(jamaConfig.item_type)
print "done"
| 17.222222
| 40
| 0.8
| 20
| 155
| 6.1
| 0.55
| 0.131148
| 0.229508
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.122581
| 155
| 8
| 41
| 19.375
| 0.897059
| 0
| 0
| 0
| 0
| 0
| 0.025806
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.333333
| null | null | 0.166667
| 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
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
3644bc0811156761c1829bfd0b47c96ab15c559f
| 159
|
py
|
Python
|
bitmovin/resources/models/encodings/live/__init__.py
|
camberbridge/bitmovin-python
|
3af4c6e79b0291fda05fd1ceeb5bed1bba9f3c95
|
[
"Unlicense"
] | null | null | null |
bitmovin/resources/models/encodings/live/__init__.py
|
camberbridge/bitmovin-python
|
3af4c6e79b0291fda05fd1ceeb5bed1bba9f3c95
|
[
"Unlicense"
] | null | null | null |
bitmovin/resources/models/encodings/live/__init__.py
|
camberbridge/bitmovin-python
|
3af4c6e79b0291fda05fd1ceeb5bed1bba9f3c95
|
[
"Unlicense"
] | null | null | null |
from .live_dash_manifest import LiveDashManifest
from .live_hls_manifest import LiveHlsManifest
from .live_stream_configuration import LiveStreamConfiguration
| 39.75
| 62
| 0.90566
| 18
| 159
| 7.666667
| 0.611111
| 0.173913
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.075472
| 159
| 3
| 63
| 53
| 0.938776
| 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
|
36c809af1d5df0142d0504db8e732b37651ffa2e
| 461
|
py
|
Python
|
relogic/logickit/base/configuration_trainer.py
|
Impavidity/relogic
|
f647106e143cd603b95b63e06ea530cdd516aefe
|
[
"MIT"
] | 24
|
2019-07-20T02:10:21.000Z
|
2022-03-15T07:13:07.000Z
|
relogic/logickit/base/configuration_trainer.py
|
One-paper-luck/relogic
|
f647106e143cd603b95b63e06ea530cdd516aefe
|
[
"MIT"
] | 3
|
2019-11-28T04:19:25.000Z
|
2019-11-30T23:29:19.000Z
|
relogic/logickit/base/configuration_trainer.py
|
One-paper-luck/relogic
|
f647106e143cd603b95b63e06ea530cdd516aefe
|
[
"MIT"
] | 5
|
2019-11-27T03:12:07.000Z
|
2021-12-08T11:45:43.000Z
|
from dataclasses import dataclass
import json
from typing import Dict
@dataclass
class TrainerConfig:
tokenizers: Dict
def __post_init__(self):
pass
@classmethod
def load_from_json(cls, config):
return cls(
tokenizers = config["tokenizers"]
)
@classmethod
def load_from_namespace(cls, config):
pass
@classmethod
def load_from_json_file(cls, config_path):
return cls.load_from_json(json.load(open(config_path)))
| 16.464286
| 59
| 0.72885
| 59
| 461
| 5.423729
| 0.40678
| 0.1
| 0.16875
| 0.20625
| 0.1875
| 0.1875
| 0
| 0
| 0
| 0
| 0
| 0
| 0.193059
| 461
| 27
| 60
| 17.074074
| 0.860215
| 0
| 0
| 0.263158
| 0
| 0
| 0.021786
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.210526
| false
| 0.105263
| 0.157895
| 0.105263
| 0.578947
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 5
|
36ee726161a1b469c63ff1750d8d27f940698310
| 229
|
py
|
Python
|
objects/CSCG/_2d/forms/standard/_2_form/base/visualize/matplot.py
|
mathischeap/mifem
|
3242e253fb01ca205a76568eaac7bbdb99e3f059
|
[
"MIT"
] | 1
|
2020-10-14T12:48:35.000Z
|
2020-10-14T12:48:35.000Z
|
objects/CSCG/_2d/forms/standard/_2_form/base/visualize/matplot.py
|
mathischeap/mifem
|
3242e253fb01ca205a76568eaac7bbdb99e3f059
|
[
"MIT"
] | null | null | null |
objects/CSCG/_2d/forms/standard/_2_form/base/visualize/matplot.py
|
mathischeap/mifem
|
3242e253fb01ca205a76568eaac7bbdb99e3f059
|
[
"MIT"
] | null | null | null |
"""Fully inherit the Matplot class for 0-standard-form."""
from objects.CSCG._2d.forms.standard._0_form.base.visualize.matplot import _2dCSCG_S0F_VIS_Matplot
class _2dCSCG_S2F_VIS_Matplot(_2dCSCG_S0F_VIS_Matplot):
""""""
| 25.444444
| 98
| 0.790393
| 34
| 229
| 4.882353
| 0.617647
| 0.180723
| 0.144578
| 0.228916
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.043478
| 0.09607
| 229
| 8
| 99
| 28.625
| 0.758454
| 0.227074
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
7fc3b16d06e938769eb1435633676f106bf48ea7
| 225
|
py
|
Python
|
__init__.py
|
SamuelFigueroa/kinetics
|
6464aae2a900109c479fba58fd7316caed8cf71d
|
[
"MIT"
] | 1
|
2022-03-28T20:36:10.000Z
|
2022-03-28T20:36:10.000Z
|
__init__.py
|
SamuelFigueroa/kinetics
|
6464aae2a900109c479fba58fd7316caed8cf71d
|
[
"MIT"
] | null | null | null |
__init__.py
|
SamuelFigueroa/kinetics
|
6464aae2a900109c479fba58fd7316caed8cf71d
|
[
"MIT"
] | null | null | null |
# from .FSQ import compFTOfSpectrum, compSortedEigenSet, compNumEigenVectors, compSEE
# from .initial_rates import compInitialRate, compLeastSquaresRateLaw
# from .json_definitions import readCalibrationData, readKineticData
| 56.25
| 85
| 0.862222
| 19
| 225
| 10.105263
| 0.789474
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.088889
| 225
| 3
| 86
| 75
| 0.936585
| 0.968889
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 1
| 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
|
7fe206e28745c34fc4b79e8742cfb2da6cbdd892
| 172
|
py
|
Python
|
mosaic/strategy/early_stopping.py
|
JohnKurian/mosaic
|
bc985640844e10b9aded478d6ef7a5f286ab2d82
|
[
"BSD-3-Clause"
] | 6
|
2018-09-17T13:27:46.000Z
|
2021-09-03T15:46:15.000Z
|
mosaic/strategy/early_stopping.py
|
JohnKurian/mosaic
|
bc985640844e10b9aded478d6ef7a5f286ab2d82
|
[
"BSD-3-Clause"
] | null | null | null |
mosaic/strategy/early_stopping.py
|
JohnKurian/mosaic
|
bc985640844e10b9aded478d6ef7a5f286ab2d82
|
[
"BSD-3-Clause"
] | 2
|
2019-11-21T13:17:11.000Z
|
2020-11-30T03:32:41.000Z
|
from mosaic.strategy import BaseEarlyStopping
class Hyperband(BaseEarlyStopping):
def __init__(self):
super().__init__()
def evaluate(self):
pass
| 19.111111
| 45
| 0.69186
| 17
| 172
| 6.529412
| 0.764706
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.22093
| 172
| 8
| 46
| 21.5
| 0.828358
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0.166667
| 0.166667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 5
|
7feae75d2eca08c84ee5087c807dd2e905ea94a3
| 168
|
py
|
Python
|
backend/mmlp/endpoint/result/__init__.py
|
magreiner/MMLP
|
23113866d8d0062c8c0e54c7fa5a0bbd0fa15f4e
|
[
"Apache-2.0"
] | null | null | null |
backend/mmlp/endpoint/result/__init__.py
|
magreiner/MMLP
|
23113866d8d0062c8c0e54c7fa5a0bbd0fa15f4e
|
[
"Apache-2.0"
] | null | null | null |
backend/mmlp/endpoint/result/__init__.py
|
magreiner/MMLP
|
23113866d8d0062c8c0e54c7fa5a0bbd0fa15f4e
|
[
"Apache-2.0"
] | null | null | null |
from .ResultCollection import ResultCollection
from .ResultCount import ResultCount
from .ResultDownload import ResultDownload
from .ResultReplace import ResultReplace
| 33.6
| 46
| 0.880952
| 16
| 168
| 9.25
| 0.375
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.095238
| 168
| 4
| 47
| 42
| 0.973684
| 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
|
3d0725ab1aebd0d997efc8af5e7e73a015547a60
| 12,378
|
py
|
Python
|
fn_scheduler/tests/test_create_a_scheduled_rule.py
|
nickpartner-goahead/resilient-community-apps
|
097c0dbefddbd221b31149d82af9809420498134
|
[
"MIT"
] | 65
|
2017-12-04T13:58:32.000Z
|
2022-03-24T18:33:17.000Z
|
fn_scheduler/tests/test_create_a_scheduled_rule.py
|
nickpartner-goahead/resilient-community-apps
|
097c0dbefddbd221b31149d82af9809420498134
|
[
"MIT"
] | 48
|
2018-03-02T19:17:14.000Z
|
2022-03-09T22:00:38.000Z
|
fn_scheduler/tests/test_create_a_scheduled_rule.py
|
nickpartner-goahead/resilient-community-apps
|
097c0dbefddbd221b31149d82af9809420498134
|
[
"MIT"
] | 95
|
2018-01-11T16:23:39.000Z
|
2022-03-21T11:34:29.000Z
|
# -*- coding: utf-8 -*-
"""
Tests using pytest_resilient_circuits
use the environment variable TEST_RESILIENT_APP_CONFIG to refer to the app.config file for testing
"""
from __future__ import print_function
import datetime
import logging
import pytest
import sys
if sys.version_info.major == 3:
from unittest.mock import Mock, patch
else:
from mock import Mock, patch
from resilient_circuits.util import get_config_data, get_function_definition
from resilient_circuits import SubmitTestFunction, FunctionResult
from fn_scheduler.lib.scheduler_helper import ResilientScheduler
from common import setup_mock_incident, setup_mock_actions, setup_evt
PACKAGE_NAME = "fn_scheduler"
FUNCTION_NAME = "create_a_scheduled_rule"
log = logging.getLogger(__name__)
# Use mock configuration data
config_data = """[{0}]
thread_max=20
timezone=utc
datastore_dir=/tmp""".format(PACKAGE_NAME)
# Provide a simulation of the Resilient REST API (uncomment to connect to a real appliance)
resilient_mock = "pytest_resilient_circuits.BasicResilientMock"
now = datetime.datetime.now()
yyyymmdd = now.strftime('%s')
def call_create_a_scheduled_rule_function(circuits, function_params, timeout=10):
# Fire a message to the function
evt = SubmitTestFunction("create_a_scheduled_rule", function_params)
setup_evt(evt)
circuits.manager.fire(evt)
event = circuits.watcher.wait("create_a_scheduled_rule_result", parent=evt, timeout=timeout)
assert event
assert isinstance(event.kwargs["result"], FunctionResult)
pytest.wait_for(event, "complete", True)
return event.kwargs["result"].value
class TestCreateAScheduledRule:
""" Tests for the create_a_scheduled_rule function"""
def test_function_definition(self):
""" Test that the package provides customization_data that defines the function """
func = get_function_definition(PACKAGE_NAME, FUNCTION_NAME)
assert func is not None
#@pytest.mark.skip
@pytest.mark.parametrize("scheduler_type, scheduler_type_value, scheduler_rule_name, scheduler_rule_parameters, scheduler_label_prefix, incident_id, object_id, row_id, expected_results", [
('cron', "* 2 * *", "Test Rule", "text=text", "bad cron", 123, 0, None, {"value": "xyz"}),
('interval', "2", "Test Rule", "text=text", "bad interval", 123, 0, None, {"value": "xyz"}),
('date', "10/31/2019", "Test Rule", "text=text", "bad date", 123, 0, None, {"value": "xyz"}),
('delta', "2x", "Test Rule", "text=text", "bad delta", 123, 0, None, {"value": "xyz"}),
('deltax', "2x", "Test Rule", "text=text", "bad scheduler name", 123, 0, None, {"value": "xyz"})
])
@patch('fn_scheduler.lib.resilient_helper.get_rules')
@patch('fn_scheduler.components.create_a_scheduled_rule.get_incident')
def test_failure_scheduler_type(self, mock_incident, mock_rules,
circuits_app, scheduler_type, scheduler_type_value,
scheduler_rule_name, scheduler_rule_parameters, scheduler_label_prefix,
incident_id, object_id, row_id, expected_results):
""" Test calling with sample values for the parameters """
setup_mock_incident(mock_incident)
setup_mock_actions(mock_rules)
function_params = {
"scheduler_type": scheduler_type,
"scheduler_type_value": scheduler_type_value,
"scheduler_rule_name": scheduler_rule_name,
"scheduler_rule_parameters": scheduler_rule_parameters,
"scheduler_label_prefix": scheduler_label_prefix,
"incident_id": incident_id,
"object_id": object_id,
"row_id": row_id
}
with pytest.raises(Exception):
results = call_create_a_scheduled_rule_function(circuits_app, function_params)
#@pytest.mark.skip
@pytest.mark.parametrize("scheduler_type, scheduler_type_value, scheduler_rule_name, scheduler_rule_parameters, scheduler_label_prefix, incident_id, object_id, row_id, expected_results", [
('cron', "* 2 * * *", "Rule not found", "text=text", "Rule not found", 123, 0, None, {"value": "xyz"}),
('interval', "2m", "Test Rule", "text=text", "Rule disabled", 123, 0, None, {"value": "xyz"})
])
@patch('fn_scheduler.lib.resilient_helper.get_rules')
@patch('fn_scheduler.components.create_a_scheduled_rule.get_incident')
def test_failure_scheduler_rule(self, mock_incident, mock_rules,
circuits_app, scheduler_type, scheduler_type_value,
scheduler_rule_name, scheduler_rule_parameters, scheduler_label_prefix,
incident_id, object_id, row_id, expected_results):
""" Test calling with sample values for the parameters """
setup_mock_incident(mock_incident)
setup_mock_actions(mock_rules, enabled=False)
function_params = {
"scheduler_type": scheduler_type,
"scheduler_type_value": scheduler_type_value,
"scheduler_rule_name": scheduler_rule_name,
"scheduler_rule_parameters": scheduler_rule_parameters,
"scheduler_label_prefix": scheduler_label_prefix,
"incident_id": incident_id,
"object_id": object_id,
"row_id": row_id
}
with pytest.raises(Exception):
results = call_create_a_scheduled_rule_function(circuits_app, function_params)
#@pytest.mark.skip
@pytest.mark.parametrize("scheduler_type, scheduler_type_value, scheduler_rule_name, scheduler_rule_parameters, scheduler_label_prefix, incident_id, object_id, row_id, expected_results", [
('cron', "* 2 * * *", "Test Rule", "text=text", "incident closed", 123, 0, None, {"value": "xyz"})
])
@patch('fn_scheduler.lib.resilient_helper.get_rules')
@patch('fn_scheduler.components.create_a_scheduled_rule.get_incident')
def test_failure_incident_closed(self, mock_incident, mock_rules,
circuits_app, scheduler_type, scheduler_type_value,
scheduler_rule_name, scheduler_rule_parameters, scheduler_label_prefix,
incident_id, object_id, row_id, expected_results):
""" Test calling with sample values for the parameters """
setup_mock_incident(mock_incident, end_date=1546719640000)
setup_mock_actions(mock_rules)
function_params = {
"scheduler_type": scheduler_type,
"scheduler_type_value": scheduler_type_value,
"scheduler_rule_name": scheduler_rule_name,
"scheduler_rule_parameters": scheduler_rule_parameters,
"scheduler_label_prefix": scheduler_label_prefix,
"incident_id": incident_id,
"object_id": object_id,
"row_id": row_id
}
with pytest.raises(Exception):
results = call_create_a_scheduled_rule_function(circuits_app, function_params)
#@pytest.mark.skip
@pytest.mark.parametrize("scheduler_type, scheduler_type_value, scheduler_rule_name, scheduler_rule_parameters, scheduler_label_prefix, incident_id, object_id, row_id, expected_results", [
('cron', "* 2 * * *", "Test Rule", "text=text", "incident not found", 1234, 0, None, {"value": "xyz"})
])
@patch('fn_scheduler.lib.resilient_helper.get_rules')
@patch('fn_scheduler.components.create_a_scheduled_rule.get_incident')
def test_failure_incident_not_found(self, mock_incident, mock_rules,
circuits_app, scheduler_type, scheduler_type_value,
scheduler_rule_name, scheduler_rule_parameters, scheduler_label_prefix,
incident_id, object_id, row_id, expected_results):
""" Test calling with sample values for the parameters """
setup_mock_incident(mock_incident, success=False)
setup_mock_actions(mock_rules)
function_params = {
"scheduler_type": scheduler_type,
"scheduler_type_value": scheduler_type_value,
"scheduler_rule_name": scheduler_rule_name,
"scheduler_rule_parameters": scheduler_rule_parameters,
"scheduler_label_prefix": scheduler_label_prefix,
"incident_id": incident_id,
"object_id": object_id,
"row_id": row_id
}
with pytest.raises(Exception):
results = call_create_a_scheduled_rule_function(circuits_app, function_params)
#@pytest.mark.skip
@pytest.mark.parametrize("scheduler_type, scheduler_type_value, scheduler_rule_name, scheduler_rule_parameters, scheduler_label_prefix, incident_id, object_id, row_id, expected_results", [
('cron', "* 2 * * *", "Test Rule", "text=text", "object id mismatch", 123, 4, None, {"value": "xyz"})
])
@patch('fn_scheduler.lib.resilient_helper.get_rules')
@patch('fn_scheduler.components.create_a_scheduled_rule.get_incident')
def test_failure_object_id_mismatch(self, mock_incident, mock_rules,
circuits_app, scheduler_type, scheduler_type_value,
scheduler_rule_name, scheduler_rule_parameters, scheduler_label_prefix,
incident_id, object_id, row_id, expected_results):
""" Test calling with sample values for the parameters """
setup_mock_incident(mock_incident)
setup_mock_actions(mock_rules, object_type=4)
function_params = {
"scheduler_type": scheduler_type,
"scheduler_type_value": scheduler_type_value,
"scheduler_rule_name": scheduler_rule_name,
"scheduler_rule_parameters": scheduler_rule_parameters,
"scheduler_label_prefix": scheduler_label_prefix,
"incident_id": incident_id,
"object_id": object_id,
"row_id": row_id
}
with pytest.raises(Exception):
results = call_create_a_scheduled_rule_function(circuits_app, function_params)
#@pytest.mark.skip
@pytest.mark.parametrize("scheduler_type, scheduler_type_value, scheduler_rule_name, scheduler_rule_parameters, "
"scheduler_label_prefix, incident_id, object_id, row_id, expected_results", [
('cron', "* 2 * * *", "Test Rule", None, "cron", 123, None, None, {"value": "xyz"}),
('interval', "2h", "Test Rule", None, "interval", 123, None, None, {"value": "xyz"}),
('date', "", "Test Rule", None, "date", 123, None, None, {"value": "xyz"}),
('delta', "2h", "Test Rule", None, "delta", 123, None, None, {"value": "xyz"})
])
@patch('fn_scheduler.lib.resilient_helper.get_rules')
@patch('fn_scheduler.components.create_a_scheduled_rule.get_incident')
def test_success(self, mock_get_incident, mock_get_rules,
circuits_app, scheduler_type, scheduler_type_value,
scheduler_rule_name, scheduler_rule_parameters,
scheduler_label_prefix, incident_id, object_id, row_id, expected_results):
""" Test calling with sample values for the parameters """
setup_mock_incident(mock_get_incident)
setup_mock_actions(mock_get_rules)
rule_label = u"{}_{}".format(scheduler_label_prefix, yyyymmdd)
if scheduler_type == "date":
dt = ResilientScheduler.get_interval("2h", date=True)
scheduler_type_value = dt.strftime('%Y-%m-%d %H:%M:%S')
function_params = {
"scheduler_type": scheduler_type,
"scheduler_type_value": scheduler_type_value,
"scheduler_rule_name": scheduler_rule_name,
"scheduler_rule_parameters": scheduler_rule_parameters,
"scheduler_label_prefix": rule_label,
"incident_id": incident_id,
"object_id": object_id,
"row_id": row_id
}
results = call_create_a_scheduled_rule_function(circuits_app, function_params)
assert results['success']
| 49.91129
| 192
| 0.6598
| 1,409
| 12,378
| 5.407381
| 0.120653
| 0.087019
| 0.059063
| 0.081901
| 0.75443
| 0.722536
| 0.707704
| 0.702454
| 0.702454
| 0.702454
| 0
| 0.010095
| 0.239699
| 12,378
| 247
| 193
| 50.11336
| 0.79949
| 0.068347
| 0
| 0.582888
| 0
| 0
| 0.278538
| 0.125578
| 0
| 0
| 0
| 0
| 0.02139
| 1
| 0.042781
| false
| 0
| 0.058824
| 0
| 0.112299
| 0.005348
| 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
|
3d3b4b9546f5bc6006096268cd933e5d754d77b6
| 235
|
py
|
Python
|
mysite/secrets.py
|
xiaoranppp/si664-final
|
f5545c04452fd674ddf1d078444e79ea58385e7e
|
[
"MIT"
] | null | null | null |
mysite/secrets.py
|
xiaoranppp/si664-final
|
f5545c04452fd674ddf1d078444e79ea58385e7e
|
[
"MIT"
] | 1
|
2018-11-25T21:07:37.000Z
|
2018-11-25T21:07:37.000Z
|
mysite/secrets.py
|
xiaoranppp/si664-final
|
f5545c04452fd674ddf1d078444e79ea58385e7e
|
[
"MIT"
] | 1
|
2018-12-21T12:06:03.000Z
|
2018-12-21T12:06:03.000Z
|
SECRET_KEY = ')-m9dh9tk8!=j4_+1fwbq==!@0whh&dt)&xk0l($sn%bjkn0eb'
SOCIAL_AUTH_GOOGLE_OAUTH2_KEY = '1016293643402-qkert4te1e9be4284l9oon4hsd9e394d.apps.googleusercontent.com'
SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = 'AqMn1OWWSQIMnHobuwiGK_3U'
| 78.333333
| 107
| 0.846809
| 27
| 235
| 6.962963
| 0.777778
| 0.106383
| 0.170213
| 0.234043
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.167401
| 0.034043
| 235
| 3
| 108
| 78.333333
| 0.660793
| 0
| 0
| 0
| 0
| 0
| 0.622881
| 0.622881
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 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
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
3d4b0968ad5286f2fa800e2f1960251d05824ec7
| 256
|
py
|
Python
|
Dataset/Leetcode/train/94/710.py
|
kkcookies99/UAST
|
fff81885aa07901786141a71e5600a08d7cb4868
|
[
"MIT"
] | null | null | null |
Dataset/Leetcode/train/94/710.py
|
kkcookies99/UAST
|
fff81885aa07901786141a71e5600a08d7cb4868
|
[
"MIT"
] | null | null | null |
Dataset/Leetcode/train/94/710.py
|
kkcookies99/UAST
|
fff81885aa07901786141a71e5600a08d7cb4868
|
[
"MIT"
] | null | null | null |
class Solution:
def XXX(self, root: TreeNode) -> List[int]:
def mid(root):
if root == None:
return []
else:
return mid(root.left) + [root.val] + mid(root.right)
return mid(root)
| 25.6
| 68
| 0.472656
| 29
| 256
| 4.172414
| 0.586207
| 0.231405
| 0.214876
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.402344
| 256
| 9
| 69
| 28.444444
| 0.79085
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
e9e5ca591180e68e5942d7efb72a444d291477f7
| 77
|
py
|
Python
|
Online-Judges/CodingBat/Python/Warmup-01/03-sum_double.py
|
shihab4t/Competitive-Programming
|
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
|
[
"Unlicense"
] | 3
|
2021-06-15T01:19:23.000Z
|
2022-03-16T18:23:53.000Z
|
Online-Judges/CodingBat/Python/Warmup-01/03-sum_double.py
|
shihab4t/Competitive-Programming
|
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
|
[
"Unlicense"
] | null | null | null |
Online-Judges/CodingBat/Python/Warmup-01/03-sum_double.py
|
shihab4t/Competitive-Programming
|
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
|
[
"Unlicense"
] | null | null | null |
def sum_double(a, b):
if a == b:
return (a+b)*2
else:
return a+b
| 12.833333
| 21
| 0.519481
| 16
| 77
| 2.4375
| 0.5625
| 0.205128
| 0.410256
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.018868
| 0.311688
| 77
| 5
| 22
| 15.4
| 0.716981
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0
| 0
| 0.6
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
e9fcc6402129ab4069f09fac71aad908b90e02ec
| 174
|
py
|
Python
|
d2go/optimizer/__init__.py
|
Pandinosaurus/d2go
|
fd79c680749184509efb2017d478d8c00656bbe2
|
[
"Apache-2.0"
] | 3
|
2021-06-30T16:42:48.000Z
|
2022-03-10T20:53:41.000Z
|
d2go/optimizer/__init__.py
|
Pandinosaurus/d2go
|
fd79c680749184509efb2017d478d8c00656bbe2
|
[
"Apache-2.0"
] | 1
|
2021-07-08T03:55:00.000Z
|
2021-07-08T03:55:00.000Z
|
d2go/optimizer/__init__.py
|
Pandinosaurus/d2go
|
fd79c680749184509efb2017d478d8c00656bbe2
|
[
"Apache-2.0"
] | 1
|
2021-03-25T16:19:43.000Z
|
2021-03-25T16:19:43.000Z
|
#!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
from .build import build_optimizer_mapper
__all__ = ['build_optimizer_mapper']
| 29
| 70
| 0.781609
| 24
| 174
| 5.333333
| 0.791667
| 0.21875
| 0.3125
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.006536
| 0.12069
| 174
| 5
| 71
| 34.8
| 0.830065
| 0.517241
| 0
| 0
| 0
| 0
| 0.268293
| 0.268293
| 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
|
180158ab1a27b4934cecb6ae60669424c462d1b0
| 65
|
py
|
Python
|
test/test_cli.py
|
vche/pyweblogalyzer
|
5908470708a712e2cf1af976847f7da396cd1e9c
|
[
"MIT"
] | null | null | null |
test/test_cli.py
|
vche/pyweblogalyzer
|
5908470708a712e2cf1af976847f7da396cd1e9c
|
[
"MIT"
] | 2
|
2022-02-22T23:28:48.000Z
|
2022-02-22T23:31:20.000Z
|
test/test_cli.py
|
vche/pyweblogalyzer
|
5908470708a712e2cf1af976847f7da396cd1e9c
|
[
"MIT"
] | null | null | null |
from pyweblogalyzer import cli
def test_cli():
cli.main()
| 9.285714
| 30
| 0.692308
| 9
| 65
| 4.888889
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.215385
| 65
| 6
| 31
| 10.833333
| 0.862745
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| true
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
18238236129683794b39d5999532b0f7341a5c84
| 2,599
|
py
|
Python
|
vkontakte_photos/parser.py
|
Andertaker/django-vkontakte-photos
|
eea293098070b428e935581fad0f245915675254
|
[
"BSD-3-Clause"
] | null | null | null |
vkontakte_photos/parser.py
|
Andertaker/django-vkontakte-photos
|
eea293098070b428e935581fad0f245915675254
|
[
"BSD-3-Clause"
] | null | null | null |
vkontakte_photos/parser.py
|
Andertaker/django-vkontakte-photos
|
eea293098070b428e935581fad0f245915675254
|
[
"BSD-3-Clause"
] | null | null | null |
# -*- coding: utf-8 -*-
from datetime import datetime
from vkontakte_api.parser import VkontakteParser, VkontakteParseError
import re
class VkontaktePhotosParser(VkontakteParser):
pass
# def parse_container_date(self, container):
#
# text = container.find('span', {'class': re.compile('^rel_date')})
# if text:
# text = text.text
# else:
# raise VkontakteParseError("Impossible to find date container in %s" % container)
# return datetime(1970,1,1)
#
# return self.parse_date(text)
# def parse_comment(self, content, wall_owner=None):
# from models import Comment
# from vkontakte_users.models import User
#
# remote_id = content['id'][4:]
# try:
# instance = Comment.objects.get(remote_id=remote_id)
# except Comment.DoesNotExist:
# instance = Comment(remote_id=remote_id)
#
# comment_text = content.find('div', {'class': 'fw_reply_text'})
# if comment_text:
# instance.text = comment_text.text
#
# # date
# instance.date = self.parse_container_date(content)
# # likes
# instance.likes = self.parse_container_likes(content, 'like_count fl_l')
#
# # author
# users = content.findAll('a', {'class': 'fw_reply_author'})
# slug = users[0]['href'][1:]
# if wall_owner and wall_owner.screen_name == slug:
# instance.author = wall_owner
# else:
# avatar = content.find('a', {'class': 'fw_reply_thumb'}).find('img')['src']
# name_parts = users[0].text.split(' ')
#
# user = User.remote.get_by_slug(slug)
# if user:
# user.first_name = name_parts[0]
# if len(name_parts) > 1:
# user.last_name = name_parts[1]
# user.photo = avatar
# user.save()
# instance.author = user
#
# if len(users) == 2:
# # this comment is answer
# slug = users[1]['href'][1:]
# if wall_owner and wall_owner.screen_name == slug:
# instance.reply_for = wall_owner
# else:
# instance.reply_for = User.remote.get_by_slug(slug)
# # имя в падеже, аватара нет
# # чтобы получть текст и ID родительского коммента нужно отправить:
# #http://vk.com/al_wall.php
# #act:post_tt
# #al:1
# #post:-16297716_126263
# #reply:1
#
# instance.fetched = datetime.now()
# return instance
| 36.097222
| 93
| 0.559061
| 291
| 2,599
| 4.817869
| 0.381443
| 0.044936
| 0.025678
| 0.022825
| 0.104137
| 0.104137
| 0.071327
| 0.071327
| 0.071327
| 0.071327
| 0
| 0.018602
| 0.31743
| 2,599
| 72
| 94
| 36.097222
| 0.771702
| 0.881493
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.2
| 0.6
| 0
| 0.8
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
|
0
| 5
|
182d44d5244d57f140be3c5d561b56f70f30ab17
| 192
|
py
|
Python
|
models/user/download.py
|
ithollie/PayBits
|
5affbf5c20859ba2065234a45978630b7396e322
|
[
"bzip2-1.0.6"
] | null | null | null |
models/user/download.py
|
ithollie/PayBits
|
5affbf5c20859ba2065234a45978630b7396e322
|
[
"bzip2-1.0.6"
] | null | null | null |
models/user/download.py
|
ithollie/PayBits
|
5affbf5c20859ba2065234a45978630b7396e322
|
[
"bzip2-1.0.6"
] | null | null | null |
from flask import request
from models.User import User
class Download(object):
def __init__(self,file_name,database):
self.file_name = file_name
self.database = database
| 21.333333
| 42
| 0.723958
| 26
| 192
| 5.076923
| 0.576923
| 0.181818
| 0.181818
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.208333
| 192
| 8
| 43
| 24
| 0.868421
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0.333333
| 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
|
1847edd92fb56b526bae26cd17064f358728b152
| 55
|
py
|
Python
|
Course/modules/example_9.py
|
zevgenia/Python_shultais
|
e51c31de221c5e7f36ede857a960138009ec8a05
|
[
"Apache-2.0"
] | null | null | null |
Course/modules/example_9.py
|
zevgenia/Python_shultais
|
e51c31de221c5e7f36ede857a960138009ec8a05
|
[
"Apache-2.0"
] | null | null | null |
Course/modules/example_9.py
|
zevgenia/Python_shultais
|
e51c31de221c5e7f36ede857a960138009ec8a05
|
[
"Apache-2.0"
] | null | null | null |
import math
import sys
print(math.pi)
print(sys.path)
| 9.166667
| 15
| 0.763636
| 10
| 55
| 4.2
| 0.6
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.127273
| 55
| 5
| 16
| 11
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
|
0
| 5
|
a125e802b9da64083cc27777dee00ded5786b470
| 79
|
py
|
Python
|
social_auth/backends/contrib/yammer_staging.py
|
merutak/django-social-auth
|
3a6e4414da0e969fcaf625a891852a3b2d7627c0
|
[
"BSD-2-Clause",
"BSD-3-Clause"
] | 863
|
2015-01-01T00:42:07.000Z
|
2022-03-30T02:47:18.000Z
|
social_auth/backends/contrib/yammer_staging.py
|
merutak/django-social-auth
|
3a6e4414da0e969fcaf625a891852a3b2d7627c0
|
[
"BSD-2-Clause",
"BSD-3-Clause"
] | 101
|
2015-01-08T00:28:16.000Z
|
2022-03-07T03:11:19.000Z
|
social_auth/backends/contrib/yammer_staging.py
|
merutak/django-social-auth
|
3a6e4414da0e969fcaf625a891852a3b2d7627c0
|
[
"BSD-2-Clause",
"BSD-3-Clause"
] | 256
|
2015-01-02T16:55:36.000Z
|
2022-03-04T11:10:47.000Z
|
from social.backends.yammer import YammerStagingOAuth2 as YammerStagingBackend
| 39.5
| 78
| 0.898734
| 8
| 79
| 8.875
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.013699
| 0.075949
| 79
| 1
| 79
| 79
| 0.958904
| 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
|
a1261f70d96c174b2eb2b91167c61c79121e7733
| 218
|
py
|
Python
|
NotionData/__init__.py
|
victoriano/notion_data
|
2503047b19b23623fc3960c886f83bdef4bcaaea
|
[
"Apache-2.0"
] | 4
|
2022-02-03T13:41:22.000Z
|
2022-02-07T08:23:27.000Z
|
NotionData/__init__.py
|
victoriano/notion_data
|
2503047b19b23623fc3960c886f83bdef4bcaaea
|
[
"Apache-2.0"
] | null | null | null |
NotionData/__init__.py
|
victoriano/notion_data
|
2503047b19b23623fc3960c886f83bdef4bcaaea
|
[
"Apache-2.0"
] | null | null | null |
from .notiondb_to_csv import NotionToCSV
from .notiondb_to_csv import get_all_db_entries
from .notiondb_to_csv import merge_notion_dbs
__all__ = [
"NotionToCSV",
"get_all_db_entries",
"merge_notion_dbs",
]
| 24.222222
| 47
| 0.788991
| 32
| 218
| 4.75
| 0.40625
| 0.236842
| 0.276316
| 0.335526
| 0.453947
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142202
| 218
| 9
| 48
| 24.222222
| 0.812834
| 0
| 0
| 0
| 0
| 0
| 0.205479
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.375
| 0
| 0.375
| 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
| 1
| 0
| 0
| 0
|
0
| 5
|
a12adb23ec073268b6fb25c89914524a74892c9d
| 4,266
|
py
|
Python
|
tests/stl_corruption.py
|
Gjacquenot/numpy-stl
|
bda50aff0c171d1f48ae0b7f3c6122930346f7b4
|
[
"BSD-3-Clause"
] | 464
|
2015-01-29T17:46:51.000Z
|
2022-03-28T13:41:19.000Z
|
tests/stl_corruption.py
|
Gjacquenot/numpy-stl
|
bda50aff0c171d1f48ae0b7f3c6122930346f7b4
|
[
"BSD-3-Clause"
] | 187
|
2015-01-16T20:41:25.000Z
|
2022-03-29T20:19:50.000Z
|
tests/stl_corruption.py
|
Gjacquenot/numpy-stl
|
bda50aff0c171d1f48ae0b7f3c6122930346f7b4
|
[
"BSD-3-Clause"
] | 110
|
2015-02-04T09:10:55.000Z
|
2022-01-27T08:48:28.000Z
|
from __future__ import print_function
import sys
import numpy
import pytest
import struct
from stl import mesh
_STL_FILE = '''
solid test.stl
facet normal -0.014565 0.073223 -0.002897
outer loop
vertex 0.399344 0.461940 1.044090
vertex 0.500000 0.500000 1.500000
vertex 0.576120 0.500000 1.117320
endloop
endfacet
endsolid test.stl
'''.lstrip()
def test_valid_ascii(tmpdir, speedups):
tmp_file = tmpdir.join('tmp.stl')
with tmp_file.open('w+') as fh:
fh.write(_STL_FILE)
fh.seek(0)
mesh.Mesh.from_file(str(tmp_file), fh=fh, speedups=speedups)
def test_ascii_with_missing_name(tmpdir, speedups):
tmp_file = tmpdir.join('tmp.stl')
with tmp_file.open('w+') as fh:
# Split the file into lines
lines = _STL_FILE.splitlines()
# Remove everything except solid
lines[0] = lines[0].split()[0]
# Join the lines to test files that start with solid without space
fh.write('\n'.join(lines))
fh.seek(0)
mesh.Mesh.from_file(str(tmp_file), fh=fh, speedups=speedups)
def test_ascii_with_blank_lines(tmpdir, speedups):
_stl_file = '''
solid test.stl
facet normal -0.014565 0.073223 -0.002897
outer loop
vertex 0.399344 0.461940 1.044090
vertex 0.500000 0.500000 1.500000
vertex 0.576120 0.500000 1.117320
endloop
endfacet
endsolid test.stl
'''.lstrip()
tmp_file = tmpdir.join('tmp.stl')
with tmp_file.open('w+') as fh:
fh.write(_stl_file)
fh.seek(0)
mesh.Mesh.from_file(str(tmp_file), fh=fh, speedups=speedups)
def test_incomplete_ascii_file(tmpdir, speedups):
tmp_file = tmpdir.join('tmp.stl')
with tmp_file.open('w+') as fh:
fh.write('solid some_file.stl')
fh.seek(0)
with pytest.raises(AssertionError):
mesh.Mesh.from_file(str(tmp_file), fh=fh, speedups=speedups)
for offset in (-20, 82, 100):
with tmp_file.open('w+') as fh:
fh.write(_STL_FILE[:-offset])
fh.seek(0)
with pytest.raises(AssertionError):
mesh.Mesh.from_file(str(tmp_file), fh=fh, speedups=speedups)
def test_corrupt_ascii_file(tmpdir, speedups):
tmp_file = tmpdir.join('tmp.stl')
with tmp_file.open('w+') as fh:
fh.write(_STL_FILE)
fh.seek(40)
print('####\n' * 100, file=fh)
fh.seek(0)
if speedups and sys.version_info.major != 2:
with pytest.raises(AssertionError):
mesh.Mesh.from_file(str(tmp_file), fh=fh, speedups=speedups)
with tmp_file.open('w+') as fh:
fh.write(_STL_FILE)
fh.seek(40)
print(' ' * 100, file=fh)
fh.seek(80)
fh.write(struct.pack('<i', 10).decode('utf-8'))
fh.seek(0)
with pytest.raises(AssertionError):
mesh.Mesh.from_file(str(tmp_file), fh=fh, speedups=speedups)
def test_corrupt_binary_file(tmpdir, speedups):
tmp_file = tmpdir.join('tmp.stl')
with tmp_file.open('w+') as fh:
fh.write('#########\n' * 8)
fh.write('#\0\0\0')
fh.seek(0)
mesh.Mesh.from_file(str(tmp_file), fh=fh, speedups=speedups)
with tmp_file.open('w+') as fh:
fh.write('#########\n' * 9)
fh.seek(0)
with pytest.raises(AssertionError):
mesh.Mesh.from_file(str(tmp_file), fh=fh, speedups=speedups)
with tmp_file.open('w+') as fh:
fh.write('#########\n' * 8)
fh.write('#\0\0\0')
fh.seek(0)
fh.write('solid test.stl')
fh.seek(0)
mesh.Mesh.from_file(str(tmp_file), fh=fh, speedups=speedups)
def test_duplicate_polygons():
data = numpy.zeros(3, dtype=mesh.Mesh.dtype)
data['vectors'][0] = numpy.array([[0, 0, 0],
[1, 0, 0],
[0, 1, 1.]])
data['vectors'][0] = numpy.array([[0, 0, 0],
[2, 0, 0],
[0, 2, 1.]])
data['vectors'][0] = numpy.array([[0, 0, 0],
[3, 0, 0],
[0, 3, 1.]])
assert not mesh.Mesh(data, remove_empty_areas=False).check()
| 29.020408
| 76
| 0.570089
| 608
| 4,266
| 3.865132
| 0.177632
| 0.077447
| 0.040851
| 0.06383
| 0.763404
| 0.750638
| 0.750638
| 0.750638
| 0.74
| 0.717872
| 0
| 0.080302
| 0.28481
| 4,266
| 146
| 77
| 29.219178
| 0.689938
| 0.028364
| 0
| 0.666667
| 0
| 0
| 0.165419
| 0
| 0
| 0
| 0
| 0
| 0.054054
| 1
| 0.063063
| false
| 0
| 0.054054
| 0
| 0.117117
| 0.027027
| 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
|
a12c6ca88cdefb19e3792bee805232ded4e8260d
| 136
|
py
|
Python
|
tests/web_platform/CSS2/box/test_ltr_basic.py
|
fletchgraham/colosseum
|
77be4896ee52b8f5956a3d77b5f2ccd2c8608e8f
|
[
"BSD-3-Clause"
] | null | null | null |
tests/web_platform/CSS2/box/test_ltr_basic.py
|
fletchgraham/colosseum
|
77be4896ee52b8f5956a3d77b5f2ccd2c8608e8f
|
[
"BSD-3-Clause"
] | null | null | null |
tests/web_platform/CSS2/box/test_ltr_basic.py
|
fletchgraham/colosseum
|
77be4896ee52b8f5956a3d77b5f2ccd2c8608e8f
|
[
"BSD-3-Clause"
] | 1
|
2020-01-16T01:56:41.000Z
|
2020-01-16T01:56:41.000Z
|
from tests.utils import W3CTestCase
class TestLtrBasic(W3CTestCase):
vars().update(W3CTestCase.find_tests(__file__, 'ltr-basic'))
| 22.666667
| 64
| 0.779412
| 16
| 136
| 6.3125
| 0.8125
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.02459
| 0.102941
| 136
| 5
| 65
| 27.2
| 0.803279
| 0
| 0
| 0
| 0
| 0
| 0.066667
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
a1642176e7779f662925b34f80767ea6fb356d0a
| 21,227
|
py
|
Python
|
test_pyquery.py
|
zhyq0826/test-lab
|
b5b4d1372f2201dc5299bbe8983af18e8d4e1a1a
|
[
"MIT"
] | null | null | null |
test_pyquery.py
|
zhyq0826/test-lab
|
b5b4d1372f2201dc5299bbe8983af18e8d4e1a1a
|
[
"MIT"
] | null | null | null |
test_pyquery.py
|
zhyq0826/test-lab
|
b5b4d1372f2201dc5299bbe8983af18e8d4e1a1a
|
[
"MIT"
] | null | null | null |
#-*- coding:utf-8 -*-
from pyquery import PyQuery as pq
s = """
var tumblr_api_read = {
"tumblelog": {
"title": "Japanese Aesthetics",
"description": "A blog dedicated to Japanese artistic heritage.",
"name": "japaneseaesthetics",
"timezone": "Canada\/Eastern",
"cname": false,
"feeds": []
},
"posts-start": 0,
"posts-total": 1015,
"posts-type": false,
"posts": [{
"id": "110585727256",
"url": "http:\/\/japaneseaesthetics.tumblr.com\/post\/110585727256",
"url-with-slug": "http:\/\/japaneseaesthetics.tumblr.com\/post\/110585727256\/fishstickmonkey-sword-guard-tsuba-date-ca",
"type": "photo",
"date-gmt": "2015-02-10 00:38:47 GMT",
"date": "Mon, 09 Feb 2015 19:38:47",
"bookmarklet": 0,
"mobile": 0,
"feed-item": "",
"from-feed-id": 0,
"unix-timestamp": 1423528727,
"format": "html",
"reblog-key": "OS7UlPbx",
"slug": "fishstickmonkey-sword-guard-tsuba-date-ca",
"photo-caption": "<p><a href=\"http:\/\/fishstickmonkey.tumblr.com\/post\/109672817420\/sword-guard-tsuba-date-ca-1615-1868-culture\" class=\"tumblr_blog\">fishstickmonkey<\/a>:<\/p><blockquote><h2><b>Sword Guard (Tsuba)<\/b><\/h2>\n<b>Date:<\/b> ca. 1615\u20131868\n<b>Culture:<\/b> Japanese\n<b>Medium:<\/b> Copper-gold alloy (shakud\u014d), copper-silver alloy (shibuichi), gold, enameled cloisonn\u00e9 (shipp\u014d), copper\n<b>Dimensions:<\/b> H. 3 in. (7.6\u00a0cm); W. 2\u00a03\/4in. (7\u00a0cm); thickness 1\/4 in. (0.6\u00a0cm); Wt. 4.9 oz. (138.9\u00a0g)\n<a href=\"http:\/\/www.metmuseum.org\/collection\/the-collection-online\/search\/34413\">Metropolitan Museum of Art<\/a><\/blockquote>",
"width": "600",
"height": "600",
"photo-url-1280": "http:\/\/40.media.tumblr.com\/8c420cb5cc3642c35b1f44eda8c750a2\/tumblr_nir2kvBG4B1r0h08no1_1280.jpg",
"photo-url-500": "http:\/\/41.media.tumblr.com\/8c420cb5cc3642c35b1f44eda8c750a2\/tumblr_nir2kvBG4B1r0h08no1_500.jpg",
"photo-url-400": "http:\/\/36.media.tumblr.com\/8c420cb5cc3642c35b1f44eda8c750a2\/tumblr_nir2kvBG4B1r0h08no1_400.jpg",
"photo-url-250": "http:\/\/41.media.tumblr.com\/8c420cb5cc3642c35b1f44eda8c750a2\/tumblr_nir2kvBG4B1r0h08no1_250.jpg",
"photo-url-100": "http:\/\/41.media.tumblr.com\/8c420cb5cc3642c35b1f44eda8c750a2\/tumblr_nir2kvBG4B1r0h08no1_100.jpg",
"photo-url-75": "http:\/\/40.media.tumblr.com\/8c420cb5cc3642c35b1f44eda8c750a2\/tumblr_nir2kvBG4B1r0h08no1_75sq.jpg",
"photos": [{
"offset": "o1",
"caption": "",
"width": "600",
"height": "600",
"photo-url-1280": "http:\/\/40.media.tumblr.com\/8c420cb5cc3642c35b1f44eda8c750a2\/tumblr_nir2kvBG4B1r0h08no1_1280.jpg",
"photo-url-500": "http:\/\/41.media.tumblr.com\/8c420cb5cc3642c35b1f44eda8c750a2\/tumblr_nir2kvBG4B1r0h08no1_500.jpg",
"photo-url-400": "http:\/\/36.media.tumblr.com\/8c420cb5cc3642c35b1f44eda8c750a2\/tumblr_nir2kvBG4B1r0h08no1_400.jpg",
"photo-url-250": "http:\/\/41.media.tumblr.com\/8c420cb5cc3642c35b1f44eda8c750a2\/tumblr_nir2kvBG4B1r0h08no1_250.jpg",
"photo-url-100": "http:\/\/41.media.tumblr.com\/8c420cb5cc3642c35b1f44eda8c750a2\/tumblr_nir2kvBG4B1r0h08no1_100.jpg",
"photo-url-75": "http:\/\/40.media.tumblr.com\/8c420cb5cc3642c35b1f44eda8c750a2\/tumblr_nir2kvBG4B1r0h08no1_75sq.jpg"
}, {
"offset": "o2",
"caption": "",
"width": "600",
"height": "600",
"photo-url-1280": "http:\/\/40.media.tumblr.com\/df6e3732ba9aab45684e4e0ed819aa58\/tumblr_nir2kvBG4B1r0h08no2_1280.jpg",
"photo-url-500": "http:\/\/40.media.tumblr.com\/df6e3732ba9aab45684e4e0ed819aa58\/tumblr_nir2kvBG4B1r0h08no2_500.jpg",
"photo-url-400": "http:\/\/40.media.tumblr.com\/df6e3732ba9aab45684e4e0ed819aa58\/tumblr_nir2kvBG4B1r0h08no2_400.jpg",
"photo-url-250": "http:\/\/41.media.tumblr.com\/df6e3732ba9aab45684e4e0ed819aa58\/tumblr_nir2kvBG4B1r0h08no2_250.jpg",
"photo-url-100": "http:\/\/40.media.tumblr.com\/df6e3732ba9aab45684e4e0ed819aa58\/tumblr_nir2kvBG4B1r0h08no2_100.jpg",
"photo-url-75": "http:\/\/41.media.tumblr.com\/df6e3732ba9aab45684e4e0ed819aa58\/tumblr_nir2kvBG4B1r0h08no2_75sq.jpg"
}]
}, {
"id": "110454587701",
"url": "http:\/\/japaneseaesthetics.tumblr.com\/post\/110454587701",
"url-with-slug": "http:\/\/japaneseaesthetics.tumblr.com\/post\/110454587701\/a-woman-carrying-a-load-of-fagots-on-her-head",
"type": "photo",
"date-gmt": "2015-02-08 17:55:06 GMT",
"date": "Sun, 08 Feb 2015 12:55:06",
"bookmarklet": 0,
"mobile": 0,
"feed-item": "",
"from-feed-id": 0,
"unix-timestamp": 1423418106,
"format": "html",
"reblog-key": "esFNw8V5",
"slug": "a-woman-carrying-a-load-of-fagots-on-her-head",
"photo-caption": "<p class=\"MsoNormal\"><span>A woman carrying a load of fagots on her head.\u00a0 Ink and tint on paper.\u00a0 Second half of 18th century, Japan, by artist Maruyama Okyo.\u00a0 Gift of Charles Lang Freer . Freer Gallery of Art and Arthur M. Sackler Gallery<\/span><\/p>",
"width": "387",
"height": "711",
"photo-url-1280": "http:\/\/40.media.tumblr.com\/4666e29abbf69f04623c8fa0198849ba\/tumblr_ni0j3hNqLn1rlobeho1_500.jpg",
"photo-url-500": "http:\/\/40.media.tumblr.com\/4666e29abbf69f04623c8fa0198849ba\/tumblr_ni0j3hNqLn1rlobeho1_500.jpg",
"photo-url-400": "http:\/\/40.media.tumblr.com\/4666e29abbf69f04623c8fa0198849ba\/tumblr_ni0j3hNqLn1rlobeho1_400.jpg",
"photo-url-250": "http:\/\/40.media.tumblr.com\/4666e29abbf69f04623c8fa0198849ba\/tumblr_ni0j3hNqLn1rlobeho1_250.jpg",
"photo-url-100": "http:\/\/41.media.tumblr.com\/4666e29abbf69f04623c8fa0198849ba\/tumblr_ni0j3hNqLn1rlobeho1_100.jpg",
"photo-url-75": "http:\/\/36.media.tumblr.com\/4666e29abbf69f04623c8fa0198849ba\/tumblr_ni0j3hNqLn1rlobeho1_75sq.jpg",
"photos": []
}, {
"id": "110434859451",
"url": "http:\/\/japaneseaesthetics.tumblr.com\/post\/110434859451",
"url-with-slug": "http:\/\/japaneseaesthetics.tumblr.com\/post\/110434859451\/explodingrocks-catfish-tail-namazuo-kawari",
"type": "photo",
"date-gmt": "2015-02-08 13:26:10 GMT",
"date": "Sun, 08 Feb 2015 08:26:10",
"bookmarklet": 0,
"mobile": 0,
"feed-item": "",
"from-feed-id": 0,
"unix-timestamp": 1423401970,
"format": "html",
"reblog-key": "TGJPWTmx",
"slug": "explodingrocks-catfish-tail-namazuo-kawari",
"photo-caption": "<p><a href=\"http:\/\/explodingrocks.tumblr.com\/post\/31597110864\/catfish-tail-namazuo-kawari-kabuto-edo-period\" class=\"tumblr_blog\">explodingrocks<\/a>:<\/p><blockquote><p>Catfish-Tail (<i>Namazuo<\/i>) <i>KAWARI KABUTO<\/i>. Edo period (17th-18th century), <b>Japan<\/b>. \u00a0<br\/>An eight-plate <i>shiinari<\/i> (\u201cacorn\u201d-shape) helmet bowl built up into a tall <i>namazuo<\/i>, or \u201ccatfish tail,\u201d shape with wood, papier m\u00e2ch\u00e9 lacquered silver over a black ground, a four-tiered black-lacquered <i>hineno-jikoro<\/i> (close-fitting neck guard), with a simulated band tied at the front forming a <i>maedate<\/i> (forecrest) <\/p><\/blockquote>",
"width": "700",
"height": "1500",
"photo-url-1280": "http:\/\/36.media.tumblr.com\/tumblr_ma9ldwdOjs1rsbisvo1_1280.jpg",
"photo-url-500": "http:\/\/41.media.tumblr.com\/tumblr_ma9ldwdOjs1rsbisvo1_500.jpg",
"photo-url-400": "http:\/\/41.media.tumblr.com\/tumblr_ma9ldwdOjs1rsbisvo1_400.jpg",
"photo-url-250": "http:\/\/40.media.tumblr.com\/tumblr_ma9ldwdOjs1rsbisvo1_250.jpg",
"photo-url-100": "http:\/\/41.media.tumblr.com\/tumblr_ma9ldwdOjs1rsbisvo1_100.jpg",
"photo-url-75": "http:\/\/41.media.tumblr.com\/tumblr_ma9ldwdOjs1rsbisvo1_75sq.jpg",
"photos": []
}, {
"id": "110206381771",
"url": "http:\/\/japaneseaesthetics.tumblr.com\/post\/110206381771",
"url-with-slug": "http:\/\/japaneseaesthetics.tumblr.com\/post\/110206381771\/two-girls-under-umbrella-in-snowstorm-painting",
"type": "photo",
"date-gmt": "2015-02-06 01:00:47 GMT",
"date": "Thu, 05 Feb 2015 20:00:47",
"bookmarklet": 0,
"mobile": 0,
"feed-item": "",
"from-feed-id": 0,
"unix-timestamp": 1423184447,
"format": "html",
"reblog-key": "QK4oQss8",
"slug": "two-girls-under-umbrella-in-snowstorm-painting",
"photo-caption": "<p class=\"MsoNormal\"><span>Two girls under umbrella in snowstorm.\u00a0 Painting.\u00a0 About 1800, <\/span><span>Japan<\/span><span>, by artist \u00a0Kitagawa Utamaro.\u00a0 Gift of Charles Lang Freer . Freer Gallery of Art and Arthur M. Sackler Gallery<\/span><\/p>",
"width": "345",
"height": "615",
"photo-url-1280": "http:\/\/40.media.tumblr.com\/c8363b10f6ac6d348f733b57276d1f0b\/tumblr_ni0o4eBN3w1rlobeho1_500.jpg",
"photo-url-500": "http:\/\/40.media.tumblr.com\/c8363b10f6ac6d348f733b57276d1f0b\/tumblr_ni0o4eBN3w1rlobeho1_500.jpg",
"photo-url-400": "http:\/\/41.media.tumblr.com\/c8363b10f6ac6d348f733b57276d1f0b\/tumblr_ni0o4eBN3w1rlobeho1_400.jpg",
"photo-url-250": "http:\/\/41.media.tumblr.com\/c8363b10f6ac6d348f733b57276d1f0b\/tumblr_ni0o4eBN3w1rlobeho1_250.jpg",
"photo-url-100": "http:\/\/40.media.tumblr.com\/c8363b10f6ac6d348f733b57276d1f0b\/tumblr_ni0o4eBN3w1rlobeho1_100.jpg",
"photo-url-75": "http:\/\/40.media.tumblr.com\/c8363b10f6ac6d348f733b57276d1f0b\/tumblr_ni0o4eBN3w1rlobeho1_75sq.jpg",
"photos": []
}, {
"id": "110167897251",
"url": "http:\/\/japaneseaesthetics.tumblr.com\/post\/110167897251",
"url-with-slug": "http:\/\/japaneseaesthetics.tumblr.com\/post\/110167897251\/50watts-1933-japan-hito-o",
"type": "photo",
"date-gmt": "2015-02-05 16:37:27 GMT",
"date": "Thu, 05 Feb 2015 11:37:27",
"bookmarklet": 0,
"mobile": 0,
"feed-item": "",
"from-feed-id": 0,
"unix-timestamp": 1423154247,
"format": "html",
"reblog-key": "NK3e2pIl",
"slug": "50watts-1933-japan-hito-o",
"photo-caption": "<p><a href=\"http:\/\/50watts.tumblr.com\/post\/109711836642\/1933-hito-o-warawaseru-kobanashishu\" class=\"tumblr_blog\">50watts<\/a>:<\/p><blockquote><p>1933, Japan, \u00a0\u4eba\u3092\u7b11\u306f\u305b\u308b\u5c0f\u8a71\u96c6 \/ Hito o warawaseru kobanashishu\u0304 (<a href=\"http:\/\/blog.livedoor.jp\/shiroku_shobo\/archives\/54871029.html\">via<\/a>)<\/p><\/blockquote>",
"width": "889",
"height": "1280",
"photo-url-1280": "http:\/\/36.media.tumblr.com\/aaeaa76e3b4fd9312eb6c18cd95b5a86\/tumblr_nj27vxDF8o1qabkwjo1_1280.jpg",
"photo-url-500": "http:\/\/36.media.tumblr.com\/aaeaa76e3b4fd9312eb6c18cd95b5a86\/tumblr_nj27vxDF8o1qabkwjo1_500.jpg",
"photo-url-400": "http:\/\/36.media.tumblr.com\/aaeaa76e3b4fd9312eb6c18cd95b5a86\/tumblr_nj27vxDF8o1qabkwjo1_400.jpg",
"photo-url-250": "http:\/\/41.media.tumblr.com\/aaeaa76e3b4fd9312eb6c18cd95b5a86\/tumblr_nj27vxDF8o1qabkwjo1_250.jpg",
"photo-url-100": "http:\/\/40.media.tumblr.com\/aaeaa76e3b4fd9312eb6c18cd95b5a86\/tumblr_nj27vxDF8o1qabkwjo1_100.jpg",
"photo-url-75": "http:\/\/40.media.tumblr.com\/aaeaa76e3b4fd9312eb6c18cd95b5a86\/tumblr_nj27vxDF8o1qabkwjo1_75sq.jpg",
"photos": []
}, {
"id": "110010125051",
"url": "http:\/\/japaneseaesthetics.tumblr.com\/post\/110010125051",
"url-with-slug": "http:\/\/japaneseaesthetics.tumblr.com\/post\/110010125051\/vase-in-the-form-of-a-gourd-metalwork-17th-or",
"type": "photo",
"date-gmt": "2015-02-03 22:19:07 GMT",
"date": "Tue, 03 Feb 2015 17:19:07",
"bookmarklet": 0,
"mobile": 0,
"feed-item": "",
"from-feed-id": 0,
"unix-timestamp": 1423001947,
"format": "html",
"reblog-key": "RYExKLJ4",
"slug": "vase-in-the-form-of-a-gourd-metalwork-17th-or",
"photo-caption": "<p><span>Vase in the form of a gourd.\u00a0 Metalwork. 17th or 18th century.\u00a0 Gift of Charles Lang Freer . Freer Gallery of Art and Arthur M. Sackler Gallery<\/span><\/p>",
"width": "610",
"height": "770",
"photo-url-1280": "http:\/\/41.media.tumblr.com\/78721ca88e0bc8d47ef11fd3d27fd314\/tumblr_ni0jew0BD81rlobeho1_1280.jpg",
"photo-url-500": "http:\/\/36.media.tumblr.com\/78721ca88e0bc8d47ef11fd3d27fd314\/tumblr_ni0jew0BD81rlobeho1_500.jpg",
"photo-url-400": "http:\/\/40.media.tumblr.com\/78721ca88e0bc8d47ef11fd3d27fd314\/tumblr_ni0jew0BD81rlobeho1_400.jpg",
"photo-url-250": "http:\/\/40.media.tumblr.com\/78721ca88e0bc8d47ef11fd3d27fd314\/tumblr_ni0jew0BD81rlobeho1_250.jpg",
"photo-url-100": "http:\/\/40.media.tumblr.com\/78721ca88e0bc8d47ef11fd3d27fd314\/tumblr_ni0jew0BD81rlobeho1_100.jpg",
"photo-url-75": "http:\/\/41.media.tumblr.com\/78721ca88e0bc8d47ef11fd3d27fd314\/tumblr_ni0jew0BD81rlobeho1_75sq.jpg",
"photos": []
}, {
"id": "109818940931",
"url": "http:\/\/japaneseaesthetics.tumblr.com\/post\/109818940931",
"url-with-slug": "http:\/\/japaneseaesthetics.tumblr.com\/post\/109818940931\/virtual-artifacts-dragonflies-from-an-album-of",
"type": "photo",
"date-gmt": "2015-02-01 23:15:13 GMT",
"date": "Sun, 01 Feb 2015 18:15:13",
"bookmarklet": 0,
"mobile": 0,
"feed-item": "",
"from-feed-id": 0,
"unix-timestamp": 1422832513,
"format": "html",
"reblog-key": "dNYWHHQz",
"slug": "virtual-artifacts-dragonflies-from-an-album-of",
"photo-caption": "<p><a href=\"http:\/\/virtual-artifacts.tumblr.com\/post\/109593767519\/dragonflies-from-an-album-of-paintings-by-mori\" class=\"tumblr_blog\">virtual-artifacts<\/a>:<\/p><blockquote><p>Dragonflies from an album of paintings by Mori Shunkei Japan (1775-1841)<\/p><\/blockquote>",
"width": "736",
"height": "532",
"photo-url-1280": "http:\/\/40.media.tumblr.com\/4e905062f626b4e7f39ac9f806fc6d91\/tumblr_nixn60oFFE1tqy9k3o1_1280.jpg",
"photo-url-500": "http:\/\/40.media.tumblr.com\/4e905062f626b4e7f39ac9f806fc6d91\/tumblr_nixn60oFFE1tqy9k3o1_500.jpg",
"photo-url-400": "http:\/\/40.media.tumblr.com\/4e905062f626b4e7f39ac9f806fc6d91\/tumblr_nixn60oFFE1tqy9k3o1_400.jpg",
"photo-url-250": "http:\/\/41.media.tumblr.com\/4e905062f626b4e7f39ac9f806fc6d91\/tumblr_nixn60oFFE1tqy9k3o1_250.jpg",
"photo-url-100": "http:\/\/40.media.tumblr.com\/4e905062f626b4e7f39ac9f806fc6d91\/tumblr_nixn60oFFE1tqy9k3o1_100.jpg",
"photo-url-75": "http:\/\/40.media.tumblr.com\/4e905062f626b4e7f39ac9f806fc6d91\/tumblr_nixn60oFFE1tqy9k3o1_75sq.jpg",
"photos": []
}, {
"id": "109786301176",
"url": "http:\/\/japaneseaesthetics.tumblr.com\/post\/109786301176",
"url-with-slug": "http:\/\/japaneseaesthetics.tumblr.com\/post\/109786301176\/kyoto-ware-incense-box-in-shape-of-crouching",
"type": "photo",
"date-gmt": "2015-02-01 17:30:07 GMT",
"date": "Sun, 01 Feb 2015 12:30:07",
"bookmarklet": 0,
"mobile": 0,
"feed-item": "",
"from-feed-id": 0,
"unix-timestamp": 1422811807,
"format": "html",
"reblog-key": "cnfwEZML",
"slug": "kyoto-ware-incense-box-in-shape-of-crouching",
"photo-caption": "<p class=\"MsoNormal\"><span>Kyoto<\/span><span> ware incense box in shape of crouching rabbit.\u00a0 Stoneware with enamels over clear glaze.\u00a0 Nonomura Ninsei, active ca. 1646-77.\u00a0 <\/span><span>Kyoto<\/span><span>, <\/span><span>Kyoto<\/span><span> prefecture, <\/span><span>Japan<\/span><span>. Gift of Charles Lang Freer . Freer Gallery of Art and Arthur M. Sackler Gallery<\/span><\/p>",
"width": "469",
"height": "635",
"photo-url-1280": "http:\/\/40.media.tumblr.com\/53ed54297a2cc9682b63e837c5edf3b6\/tumblr_ni4vd6yVAg1rlobeho1_500.jpg",
"photo-url-500": "http:\/\/40.media.tumblr.com\/53ed54297a2cc9682b63e837c5edf3b6\/tumblr_ni4vd6yVAg1rlobeho1_500.jpg",
"photo-url-400": "http:\/\/41.media.tumblr.com\/53ed54297a2cc9682b63e837c5edf3b6\/tumblr_ni4vd6yVAg1rlobeho1_400.jpg",
"photo-url-250": "http:\/\/41.media.tumblr.com\/53ed54297a2cc9682b63e837c5edf3b6\/tumblr_ni4vd6yVAg1rlobeho1_250.jpg",
"photo-url-100": "http:\/\/41.media.tumblr.com\/53ed54297a2cc9682b63e837c5edf3b6\/tumblr_ni4vd6yVAg1rlobeho1_100.jpg",
"photo-url-75": "http:\/\/36.media.tumblr.com\/53ed54297a2cc9682b63e837c5edf3b6\/tumblr_ni4vd6yVAg1rlobeho1_75sq.jpg",
"photos": []
}, {
"id": "109678693506",
"url": "http:\/\/japaneseaesthetics.tumblr.com\/post\/109678693506",
"url-with-slug": "http:\/\/japaneseaesthetics.tumblr.com\/post\/109678693506\/yama-bato-matsubayashi-keigetsu-japanese",
"type": "photo",
"date-gmt": "2015-01-31 15:59:37 GMT",
"date": "Sat, 31 Jan 2015 10:59:37",
"bookmarklet": 0,
"mobile": 0,
"feed-item": "",
"from-feed-id": 0,
"unix-timestamp": 1422719977,
"format": "html",
"reblog-key": "xu7Dm2Wq",
"slug": "yama-bato-matsubayashi-keigetsu-japanese",
"photo-caption": "<p><a class=\"tumblr_blog\" href=\"http:\/\/yama-bato.tumblr.com\/post\/103714857006\/matsubayashi-keigetsu-japanese-1876-1963\">yama-bato<\/a>:<\/p>\n\n<blockquote>\n<p><strong>MATSUBAYASHI Keigetsu<\/strong>\uff08\u677e\u6797\u6842\u6708 Japanese, 1876-1963\uff09<\/p>\n<p>(Source: <a href=\"http:\/\/iamjapanese.tumblr.com\/tagged\/Keigetsu-Matsubayashi\" title=\"iamjapanese\">iamjapanese<\/a>)<\/p>\n<\/blockquote>",
"width": "560",
"height": "1001",
"photo-url-1280": "http:\/\/40.media.tumblr.com\/cae7b00dc6dad3e75f3bf2890d485605\/tumblr_nfp1ywtqL61qahuhjo1_1280.jpg",
"photo-url-500": "http:\/\/40.media.tumblr.com\/cae7b00dc6dad3e75f3bf2890d485605\/tumblr_nfp1ywtqL61qahuhjo1_500.jpg",
"photo-url-400": "http:\/\/40.media.tumblr.com\/cae7b00dc6dad3e75f3bf2890d485605\/tumblr_nfp1ywtqL61qahuhjo1_400.jpg",
"photo-url-250": "http:\/\/40.media.tumblr.com\/cae7b00dc6dad3e75f3bf2890d485605\/tumblr_nfp1ywtqL61qahuhjo1_250.jpg",
"photo-url-100": "http:\/\/40.media.tumblr.com\/cae7b00dc6dad3e75f3bf2890d485605\/tumblr_nfp1ywtqL61qahuhjo1_100.jpg",
"photo-url-75": "http:\/\/40.media.tumblr.com\/cae7b00dc6dad3e75f3bf2890d485605\/tumblr_nfp1ywtqL61qahuhjo1_75sq.jpg",
"photos": []
}, {
"id": "109629178056",
"url": "http:\/\/japaneseaesthetics.tumblr.com\/post\/109629178056",
"url-with-slug": "http:\/\/japaneseaesthetics.tumblr.com\/post\/109629178056\/medicine-case-inro-with-design-of-eight",
"type": "photo",
"date-gmt": "2015-01-31 01:35:15 GMT",
"date": "Fri, 30 Jan 2015 20:35:15",
"bookmarklet": 0,
"mobile": 0,
"feed-item": "",
"from-feed-id": 0,
"unix-timestamp": 1422668115,
"format": "html",
"reblog-key": "HUGxtxKM",
"slug": "medicine-case-inro-with-design-of-eight",
"photo-caption": "<p class=\"MsoNormal\"><span>Medicine case (inro) with design of “eight bridges” (yatsuhashi).\u00a0 Reddish-buff clay; pigments, enamels under transparent lead glaze.\u00a0 Mid-19th century, <\/span><span>Japan<\/span><span>, by artist <\/span><\/p>\n\n<p class=\"MsoNormal\"><span>Miura Ken’ya.\u00a0 \u00a0Gift of Stanley D. Fishman.\u00a0 Freer Gallery of Art and Arthur M. Sackler Gallery<\/span><\/p>",
"width": "610",
"height": "1077",
"photo-url-1280": "http:\/\/36.media.tumblr.com\/2469dc85ddb7d630019331c2ea4819eb\/tumblr_ni0lfcaxHW1rlobeho1_1280.jpg",
"photo-url-500": "http:\/\/40.media.tumblr.com\/2469dc85ddb7d630019331c2ea4819eb\/tumblr_ni0lfcaxHW1rlobeho1_500.jpg",
"photo-url-400": "http:\/\/40.media.tumblr.com\/2469dc85ddb7d630019331c2ea4819eb\/tumblr_ni0lfcaxHW1rlobeho1_400.jpg",
"photo-url-250": "http:\/\/40.media.tumblr.com\/2469dc85ddb7d630019331c2ea4819eb\/tumblr_ni0lfcaxHW1rlobeho1_250.jpg",
"photo-url-100": "http:\/\/40.media.tumblr.com\/2469dc85ddb7d630019331c2ea4819eb\/tumblr_ni0lfcaxHW1rlobeho1_100.jpg",
"photo-url-75": "http:\/\/41.media.tumblr.com\/2469dc85ddb7d630019331c2ea4819eb\/tumblr_ni0lfcaxHW1rlobeho1_75sq.jpg",
"photos": []
}]
};
"""
# import re
# p = re.compile(r'\{.*\}', re.S)
# import json
# s = p.search(s).group()
# s = s.strip('\n')
# s = s.strip()
# print json.loads(s)
import logging
try:
try:
raise IndexError
except Exception as e:
logging.exception(e)
except Exception as e:
print 's'
logging.exception(e)
else:
print 'ss'
| 67.387302
| 711
| 0.653272
| 2,433
| 21,227
| 5.637074
| 0.183724
| 0.064309
| 0.073496
| 0.048341
| 0.742763
| 0.71914
| 0.600875
| 0.558513
| 0.331899
| 0.331899
| 0
| 0.189867
| 0.15664
| 21,227
| 314
| 712
| 67.601911
| 0.576248
| 0.007066
| 0
| 0.356667
| 0
| 0.313333
| 0.988228
| 0.534295
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.006667
| null | null | 0.006667
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
a17839ce3bd46cba8a1f5350279f3a917375d89a
| 402
|
py
|
Python
|
login/models.py
|
Aki-qiu/DATA130039.01-MyBookDB
|
d853bfc1a26a1b0ea3c8d08bb572a24a25395ec6
|
[
"Apache-2.0"
] | 3
|
2021-06-06T21:24:23.000Z
|
2021-07-04T04:33:23.000Z
|
login/models.py
|
Aki-qiu/DATA130039.01-MyBookDB
|
d853bfc1a26a1b0ea3c8d08bb572a24a25395ec6
|
[
"Apache-2.0"
] | null | null | null |
login/models.py
|
Aki-qiu/DATA130039.01-MyBookDB
|
d853bfc1a26a1b0ea3c8d08bb572a24a25395ec6
|
[
"Apache-2.0"
] | 1
|
2021-06-17T16:55:36.000Z
|
2021-06-17T16:55:36.000Z
|
from django.db import models
# Create your models here.
class User(models.Model):
username = models.CharField(max_length=40, verbose_name="Username")
email = models.EmailField(max_length=40, verbose_name="E-mail")
pwd = models.CharField(max_length=128, verbose_name="Password")
ip = models.CharField(max_length=40, verbose_name="Login ip", default=0)
def __str__(self):
return self.username
| 28.714286
| 73
| 0.766169
| 59
| 402
| 5.016949
| 0.559322
| 0.121622
| 0.182432
| 0.243243
| 0.324324
| 0.25
| 0.25
| 0
| 0
| 0
| 0
| 0.027933
| 0.109453
| 402
| 13
| 74
| 30.923077
| 0.798883
| 0.059701
| 0
| 0
| 0
| 0
| 0.079787
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.125
| false
| 0.125
| 0.125
| 0.125
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 5
|
a1b7b0c95ccdf8eb23d57d6f6f1c50d7cf3b1ebc
| 292
|
py
|
Python
|
src/architectures/nmp/adjacency/simple/__init__.py
|
isaachenrion/jets
|
59aeba81788d0741af448192d9dfb764fb97cf8d
|
[
"BSD-3-Clause"
] | 9
|
2017-10-09T17:01:52.000Z
|
2018-06-12T18:06:05.000Z
|
src/architectures/nmp/adjacency/simple/__init__.py
|
isaachenrion/jets
|
59aeba81788d0741af448192d9dfb764fb97cf8d
|
[
"BSD-3-Clause"
] | 31
|
2017-11-01T14:39:02.000Z
|
2018-04-18T15:34:24.000Z
|
src/architectures/nmp/adjacency/simple/__init__.py
|
isaachenrion/jets
|
59aeba81788d0741af448192d9dfb764fb97cf8d
|
[
"BSD-3-Clause"
] | 10
|
2017-10-17T19:23:14.000Z
|
2020-07-05T04:44:45.000Z
|
from .learned import LEARNED_ADJACENCIES
from .constant import CONSTANT_ADJACENCIES
from .physics import PHYSICS_ADJACENCIES
SIMPLE_ADJACENCIES = {}
SIMPLE_ADJACENCIES.update(LEARNED_ADJACENCIES)
SIMPLE_ADJACENCIES.update(CONSTANT_ADJACENCIES)
SIMPLE_ADJACENCIES.update(PHYSICS_ADJACENCIES)
| 32.444444
| 47
| 0.883562
| 32
| 292
| 7.75
| 0.25
| 0.274194
| 0.451613
| 0.41129
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.065068
| 292
| 8
| 48
| 36.5
| 0.908425
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.428571
| 0
| 0.428571
| 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
| 1
| 0
| 0
| 0
|
0
| 5
|
a1d5383a005afa2650dd87c1d93b89a400046cd8
| 77
|
py
|
Python
|
distributed/__init__.py
|
merlinarer/scrl
|
f5bc426ed6eef130d44dd3a5609dc0772da59613
|
[
"Apache-2.0"
] | 102
|
2021-03-25T08:54:12.000Z
|
2022-03-30T03:46:47.000Z
|
distributed/__init__.py
|
merlinarer/scrl
|
f5bc426ed6eef130d44dd3a5609dc0772da59613
|
[
"Apache-2.0"
] | 10
|
2021-03-23T01:53:55.000Z
|
2021-07-30T08:51:19.000Z
|
distributed/__init__.py
|
merlinarer/scrl
|
f5bc426ed6eef130d44dd3a5609dc0772da59613
|
[
"Apache-2.0"
] | 12
|
2021-04-15T06:02:32.000Z
|
2022-02-10T15:34:39.000Z
|
from .launch import launch
from .getters import get_dist_url, scatter_values
| 25.666667
| 49
| 0.844156
| 12
| 77
| 5.166667
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.116883
| 77
| 2
| 50
| 38.5
| 0.911765
| 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
|
b803bfebd538bbea06734312d44f6e434a16c2de
| 11,366
|
py
|
Python
|
injector.py
|
freezernick/c_cpp_injector
|
f0683a8eba0c4f68e2f643f5e60d68917e831ad7
|
[
"BSL-1.0"
] | null | null | null |
injector.py
|
freezernick/c_cpp_injector
|
f0683a8eba0c4f68e2f643f5e60d68917e831ad7
|
[
"BSL-1.0"
] | 1
|
2021-01-15T02:53:55.000Z
|
2021-01-16T18:48:02.000Z
|
injector.py
|
freezernick/c_cpp_injector
|
f0683a8eba0c4f68e2f643f5e60d68917e831ad7
|
[
"BSL-1.0"
] | null | null | null |
import os, json
from os import path
# don't mind this
base = [
"IS_PROGRAM=0",
"UE_EDITOR=1",
"ENABLE_PGO_PROFILE=0",
"USE_VORBIS_FOR_STREAMING=1",
"USE_XMA2_FOR_STREAMING=1",
"WITH_DEV_AUTOMATION_TESTS=1",
"WITH_PERF_AUTOMATION_TESTS=1",
"UNICODE",
"_UNICODE",
"__UNREAL__",
"IS_MONOLITHIC=0",
"WITH_ENGINE=1",
"WITH_UNREAL_DEVELOPER_TOOLS=1",
"WITH_APPLICATION_CORE=1",
"WITH_COREUOBJECT=1",
"USE_STATS_WITHOUT_ENGINE=0",
"WITH_PLUGIN_SUPPORT=0",
"WITH_ACCESSIBILITY=1",
"WITH_PERFCOUNTERS=1",
"USE_LOGGING_IN_SHIPPING=0",
"WITH_LOGGING_TO_MEMORY=0",
"USE_CACHE_FREED_OS_ALLOCS=1",
"USE_CHECKS_IN_SHIPPING=0",
"WITH_EDITOR=1",
"WITH_SERVER_CODE=1",
"WITH_CEF3=1",
"WITH_LIVE_CODING=1",
"WITH_XGE_CONTROLLER=1",
"UBT_MODULE_MANIFEST=\"UE4Editor.modules\"",
"UBT_MODULE_MANIFEST_DEBUGGAME=\"UE4Editor-Win64-DebugGame.modules\"",
"UBT_COMPILED_PLATFORM=Win64",
"UBT_COMPILED_TARGET=Editor",
"UE_APP_NAME=\"UE4Editor\"",
"NDIS_MINIPORT_MAJOR_VERSION=0",
"WIN32=1",
"_WIN32_WINNT=0x0601",
"WINVER=0x0601",
"PLATFORM_WINDOWS=1",
"OVERRIDE_PLATFORM_HEADER_NAME=Windows",
"NDEBUG=1",
"UE_BUILD_DEVELOPMENT=1",
"UE_IS_ENGINE_MODULE=0",
"IMPLEMENT_ENCRYPTION_KEY_REGISTRATION()=",
"IMPLEMENT_SIGNING_KEY_REGISTRATION()=",
"DEPRECATED_FORGAME=DEPRECATED",
"UE_DEPRECATED_FORGAME=UE_DEPRECATED",
"INCLUDE_CHAOS=0",
"WITH_PHYSX=1",
"WITH_CHAOS=0",
"WITH_CHAOS_CLOTHING=0",
"WITH_CHAOS_NEEDS_TO_BE_FIXED=0",
"PHYSICS_INTERFACE_PHYSX=1",
"WITH_APEX=1",
"WITH_APEX_CLOTHING=1",
"WITH_CLOTH_COLLISION_DETECTION=1",
"WITH_PHYSX_COOKING=1",
"WITH_NVCLOTH=1",
"WITH_CUSTOM_SQ_STRUCTURE=0",
"WITH_IMMEDIATE_PHYSX=0",
"GPUPARTICLE_LOCAL_VF_ONLY=0",
"ENGINE_VTABLE=DLLIMPORT_VTABLE",
"ENGINE_API=",
"UE_ENABLE_ICU=1",
"WITH_VS_PERF_PROFILER=0",
"WITH_DIRECTXMATH=0",
"WITH_MALLOC_STOMP=1",
"CORE_VTABLE=DLLIMPORT_VTABLE",
"CORE_API=",
"TRACELOG_VTABLE=DLLIMPORT_VTABLE",
"TRACELOG_API=",
"COREUOBJECT_VTABLE=DLLIMPORT_VTABLE",
"COREUOBJECT_API=",
"NETCORE_VTABLE=DLLIMPORT_VTABLE",
"NETCORE_API=",
"APPLICATIONCORE_VTABLE=DLLIMPORT_VTABLE",
"APPLICATIONCORE_API=",
"RHI_VTABLE=DLLIMPORT_VTABLE",
"RHI_API=",
"JSON_VTABLE=DLLIMPORT_VTABLE",
"JSON_API=",
"WITH_FREETYPE=1",
"SLATECORE_VTABLE=DLLIMPORT_VTABLE",
"SLATECORE_API=",
"INPUTCORE_VTABLE=DLLIMPORT_VTABLE",
"INPUTCORE_API=",
"SLATE_VTABLE=DLLIMPORT_VTABLE",
"SLATE_API=",
"WITH_UNREALPNG=1",
"WITH_UNREALJPEG=1",
"WITH_UNREALEXR=1",
"IMAGEWRAPPER_VTABLE=DLLIMPORT_VTABLE",
"IMAGEWRAPPER_API=",
"MESSAGING_VTABLE=DLLIMPORT_VTABLE",
"MESSAGING_API=",
"MESSAGINGCOMMON_VTABLE=DLLIMPORT_VTABLE",
"MESSAGINGCOMMON_API=",
"RENDERCORE_VTABLE=DLLIMPORT_VTABLE",
"RENDERCORE_API=",
"SOCKETS_PACKAGE=1",
"SOCKETS_VTABLE=DLLIMPORT_VTABLE",
"SOCKETS_API=",
"ASSETREGISTRY_VTABLE=DLLIMPORT_VTABLE",
"ASSETREGISTRY_API=",
"ENGINEMESSAGES_VTABLE=DLLIMPORT_VTABLE",
"ENGINEMESSAGES_API=",
"ENGINESETTINGS_VTABLE=DLLIMPORT_VTABLE",
"ENGINESETTINGS_API=",
"SYNTHBENCHMARK_VTABLE=DLLIMPORT_VTABLE",
"SYNTHBENCHMARK_API=",
"RENDERER_VTABLE=DLLIMPORT_VTABLE",
"RENDERER_API=",
"GAMEPLAYTAGS_VTABLE=DLLIMPORT_VTABLE",
"GAMEPLAYTAGS_API=",
"PACKETHANDLER_VTABLE=DLLIMPORT_VTABLE",
"PACKETHANDLER_API=",
"RELIABILITYHANDLERCOMPONENT_VTABLE=DLLIMPORT_VTABLE",
"RELIABILITYHANDLERCOMPONENT_API=",
"AUDIOPLATFORMCONFIGURATION_VTABLE=DLLIMPORT_VTABLE",
"AUDIOPLATFORMCONFIGURATION_API=",
"MESHDESCRIPTION_VTABLE=DLLIMPORT_VTABLE",
"MESHDESCRIPTION_API=",
"STATICMESHDESCRIPTION_VTABLE=DLLIMPORT_VTABLE",
"STATICMESHDESCRIPTION_API=",
"PAKFILE_VTABLE=DLLIMPORT_VTABLE",
"PAKFILE_API=",
"RSA_VTABLE=DLLIMPORT_VTABLE",
"RSA_API=",
"NETWORKREPLAYSTREAMING_VTABLE=DLLIMPORT_VTABLE",
"NETWORKREPLAYSTREAMING_API=",
"PHYSICSCORE_VTABLE=DLLIMPORT_VTABLE",
"PHYSICSCORE_API=",
"COMPILE_WITHOUT_UNREAL_SUPPORT=0",
"CHAOS_MEMORY_TRACKING=0",
"CHAOS_VTABLE=DLLIMPORT_VTABLE",
"CHAOS_API=",
"CHAOS_CHECKED=0",
"CHAOSCORE_VTABLE=DLLIMPORT_VTABLE",
"CHAOSCORE_API=",
"INTEL_ISPC=1",
"VORONOI_VTABLE=DLLIMPORT_VTABLE",
"VORONOI_API=",
"FIELDSYSTEMCORE_VTABLE=DLLIMPORT_VTABLE",
"FIELDSYSTEMCORE_API=",
"WITH_PHYSX_RELEASE=0",
"UE_PHYSX_SUFFIX=PROFILE",
"UE_APEX_SUFFIX=PROFILE",
"APEX_UE4=1",
"APEX_STATICALLY_LINKED=0",
"WITH_APEX_LEGACY=1",
"SIGNALPROCESSING_VTABLE=DLLIMPORT_VTABLE",
"SIGNALPROCESSING_API=",
"WITH_RECAST=1",
"UNREALED_VTABLE=DLLIMPORT_VTABLE",
"UNREALED_API=",
"BSPMODE_VTABLE=DLLIMPORT_VTABLE",
"BSPMODE_API=",
"DIRECTORYWATCHER_VTABLE=DLLIMPORT_VTABLE",
"DIRECTORYWATCHER_API=",
"DOCUMENTATION_VTABLE=DLLIMPORT_VTABLE",
"DOCUMENTATION_API=",
"LOAD_PLUGINS_FOR_TARGET_PLATFORMS=1",
"PROJECTS_VTABLE=DLLIMPORT_VTABLE",
"PROJECTS_API=",
"SANDBOXFILE_VTABLE=DLLIMPORT_VTABLE",
"SANDBOXFILE_API=",
"EDITORSTYLE_VTABLE=DLLIMPORT_VTABLE",
"EDITORSTYLE_API=",
"SOURCE_CONTROL_WITH_SLATE=1",
"SOURCECONTROL_VTABLE=DLLIMPORT_VTABLE",
"SOURCECONTROL_API=",
"UNREALEDMESSAGES_VTABLE=DLLIMPORT_VTABLE",
"UNREALEDMESSAGES_API=",
"GAMEPLAYDEBUGGER_VTABLE=DLLIMPORT_VTABLE",
"GAMEPLAYDEBUGGER_API=",
"BLUEPRINTGRAPH_VTABLE=DLLIMPORT_VTABLE",
"BLUEPRINTGRAPH_API=",
"EDITORSUBSYSTEM_VTABLE=DLLIMPORT_VTABLE",
"EDITORSUBSYSTEM_API=",
"HTTP_PACKAGE=1",
"CURL_ENABLE_DEBUG_CALLBACK=1",
"CURL_ENABLE_NO_TIMEOUTS_OPTION=1",
"HTTP_VTABLE=DLLIMPORT_VTABLE",
"HTTP_API=",
"UNREALAUDIO_VTABLE=DLLIMPORT_VTABLE",
"UNREALAUDIO_API=",
"FUNCTIONALTESTING_VTABLE=DLLIMPORT_VTABLE",
"FUNCTIONALTESTING_API=",
"AUTOMATIONCONTROLLER_VTABLE=DLLIMPORT_VTABLE",
"AUTOMATIONCONTROLLER_API=",
"LOCALIZATION_VTABLE=DLLIMPORT_VTABLE",
"LOCALIZATION_API=",
"WITH_SNDFILE_IO=1",
"AUDIOEDITOR_VTABLE=DLLIMPORT_VTABLE",
"AUDIOEDITOR_API=",
"AUDIOMIXER_VTABLE=DLLIMPORT_VTABLE",
"AUDIOMIXER_API=",
"TARGETPLATFORM_VTABLE=DLLIMPORT_VTABLE",
"TARGETPLATFORM_API=",
"UELIBSAMPLERATE_VTABLE=DLLIMPORT_VTABLE",
"UELIBSAMPLERATE_API=",
"LEVELEDITOR_VTABLE=DLLIMPORT_VTABLE",
"LEVELEDITOR_API=",
"SETTINGS_VTABLE=DLLIMPORT_VTABLE",
"SETTINGS_API=",
"INTROTUTORIALS_VTABLE=DLLIMPORT_VTABLE",
"INTROTUTORIALS_API=",
"HEADMOUNTEDDISPLAY_VTABLE=DLLIMPORT_VTABLE",
"HEADMOUNTEDDISPLAY_API=",
"VREDITOR_VTABLE=DLLIMPORT_VTABLE",
"VREDITOR_API=",
"COMMONMENUEXTENSIONS_VTABLE=DLLIMPORT_VTABLE",
"COMMONMENUEXTENSIONS_API=",
"LANDSCAPE_VTABLE=DLLIMPORT_VTABLE",
"LANDSCAPE_API=",
"PROPERTYEDITOR_VTABLE=DLLIMPORT_VTABLE",
"PROPERTYEDITOR_API=",
"ACTORPICKERMODE_VTABLE=DLLIMPORT_VTABLE",
"ACTORPICKERMODE_API=",
"SCENEDEPTHPICKERMODE_VTABLE=DLLIMPORT_VTABLE",
"SCENEDEPTHPICKERMODE_API=",
"DETAILCUSTOMIZATIONS_VTABLE=DLLIMPORT_VTABLE",
"DETAILCUSTOMIZATIONS_API=",
"CLASSVIEWER_VTABLE=DLLIMPORT_VTABLE",
"CLASSVIEWER_API=",
"GRAPHEDITOR_VTABLE=DLLIMPORT_VTABLE",
"GRAPHEDITOR_API=",
"STRUCTVIEWER_VTABLE=DLLIMPORT_VTABLE",
"STRUCTVIEWER_API=",
"CONTENTBROWSER_VTABLE=DLLIMPORT_VTABLE",
"CONTENTBROWSER_API=",
"ENABLE_HTTP_FOR_NFS=1",
"NETWORKFILESYSTEM_VTABLE=DLLIMPORT_VTABLE",
"NETWORKFILESYSTEM_API=",
"UMG_VTABLE=DLLIMPORT_VTABLE",
"UMG_API=",
"MOVIESCENE_VTABLE=DLLIMPORT_VTABLE",
"MOVIESCENE_API=",
"TIMEMANAGEMENT_VTABLE=DLLIMPORT_VTABLE",
"TIMEMANAGEMENT_API=",
"MOVIESCENETRACKS_VTABLE=DLLIMPORT_VTABLE",
"MOVIESCENETRACKS_API=",
"ANIMATIONCORE_VTABLE=DLLIMPORT_VTABLE",
"ANIMATIONCORE_API=",
"PROPERTYPATH_VTABLE=DLLIMPORT_VTABLE",
"PROPERTYPATH_API=",
"NAVIGATIONSYSTEM_VTABLE=DLLIMPORT_VTABLE",
"NAVIGATIONSYSTEM_API=",
"MESHDESCRIPTIONOPERATIONS_VTABLE=DLLIMPORT_VTABLE",
"MESHDESCRIPTIONOPERATIONS_API=",
"MESHBUILDER_VTABLE=DLLIMPORT_VTABLE",
"MESHBUILDER_API=",
"MATERIALSHADERQUALITYSETTINGS_VTABLE=DLLIMPORT_VTABLE",
"MATERIALSHADERQUALITYSETTINGS_API=",
"INTERACTIVETOOLSFRAMEWORK_VTABLE=DLLIMPORT_VTABLE",
"INTERACTIVETOOLSFRAMEWORK_API=",
"TOOLMENUSEDITOR_VTABLE=DLLIMPORT_VTABLE",
"TOOLMENUSEDITOR_API=",
"WITH_OGGVORBIS=1",
"XAUDIO2_VTABLE=DLLIMPORT_VTABLE",
"XAUDIO2_API=",
"AUDIOMIXERXAUDIO2_VTABLE=DLLIMPORT_VTABLE",
"AUDIOMIXERXAUDIO2_API=",
"ASSETTAGSEDITOR_VTABLE=DLLIMPORT_VTABLE",
"ASSETTAGSEDITOR_API=",
"COLLECTIONMANAGER_VTABLE=DLLIMPORT_VTABLE",
"COLLECTIONMANAGER_API=",
"ADDCONTENTDIALOG_VTABLE=DLLIMPORT_VTABLE",
"ADDCONTENTDIALOG_API=",
"USE_EMBREE=1",
"MESHUTILITIES_VTABLE=DLLIMPORT_VTABLE",
"MESHUTILITIES_API=",
"MESHMERGEUTILITIES_VTABLE=DLLIMPORT_VTABLE",
"MESHMERGEUTILITIES_API=",
"HIERARCHICALLODUTILITIES_VTABLE=DLLIMPORT_VTABLE",
"HIERARCHICALLODUTILITIES_API=",
"MESHREDUCTIONINTERFACE_VTABLE=DLLIMPORT_VTABLE",
"MESHREDUCTIONINTERFACE_API=",
"ASSETTOOLS_VTABLE=DLLIMPORT_VTABLE",
"ASSETTOOLS_API=",
"KISMETCOMPILER_VTABLE=DLLIMPORT_VTABLE",
"KISMETCOMPILER_API=",
"GAMEPLAYTASKS_VTABLE=DLLIMPORT_VTABLE",
"GAMEPLAYTASKS_API=",
"WITH_GAMEPLAY_DEBUGGER=1",
"AIMODULE_VTABLE=DLLIMPORT_VTABLE",
"AIMODULE_API=",
"KISMET_VTABLE=DLLIMPORT_VTABLE",
"KISMET_API=",
"PHYSICSSQ_VTABLE=DLLIMPORT_VTABLE",
"PHYSICSSQ_API=",
"CHAOSSOLVERS_VTABLE=DLLIMPORT_VTABLE",
"CHAOSSOLVERS_API=",
"GEOMETRYCOLLECTIONCORE_VTABLE=DLLIMPORT_VTABLE",
"GEOMETRYCOLLECTIONCORE_API=",
"GEOMETRYCOLLECTIONSIMULATIONCORE_VTABLE=DLLIMPORT_VTABLE",
"GEOMETRYCOLLECTIONSIMULATIONCORE_API=",
"CLOTHINGSYSTEMRUNTIMEINTERFACE_VTABLE=DLLIMPORT_VTABLE",
"CLOTHINGSYSTEMRUNTIMEINTERFACE_API=",
"AUDIOMIXERCORE_VTABLE=DLLIMPORT_VTABLE",
"AUDIOMIXERCORE_API="
]
# start
pluginpath = path.join(os.getcwd(), "Plugins")
for plugin in os.listdir(pluginpath):
if "Source" not in os.listdir(path.join(pluginpath, plugin)):
continue
for item in os.listdir(path.join(pluginpath, plugin)):
if(item.endswith(".uplugin")):
pluginname = item.split(".")[0]
base.append(pluginname.upper() + "_VTABLE=DLLIMPORT_VTABLE")
base.append(pluginname.upper() + "_API=")
projectname = ""
for item in os.listdir(os.getcwd()):
if item.endswith(".uproject"):
projectname = item.split(".")[0]
base.append("UE_PROJECT_NAME=" + projectname)
base.append(projectname.upper() + "_VTABLE=DLLEXPORT_VTABLE")
base.append(projectname.upper() + "_API=")
vscode = os.path.join(os.getcwd(), ".vscode/")
if not path.exists(vscode):
exit()
cpp = os.path.join(vscode, "c_cpp_properties.json")
if not path.exists(cpp):
exit()
with open(cpp, "r") as f:
data = json.load(f)
try:
data["configurations"][0]["defines"] = base
except:
data["configurations"][0].append(base)
with open(cpp, "w") as f:
f.write(json.dumps(data, indent=4))
| 32.289773
| 74
| 0.723034
| 1,142
| 11,366
| 6.756567
| 0.261821
| 0.206065
| 0.288491
| 0.003888
| 0.017496
| 0.009072
| 0.009072
| 0
| 0
| 0
| 0
| 0.010991
| 0.151504
| 11,366
| 352
| 75
| 32.289773
| 0.789092
| 0.001848
| 0
| 0.005988
| 0
| 0
| 0.693379
| 0.521026
| 0
| 0
| 0.001058
| 0
| 0
| 1
| 0
| false
| 0
| 0.323353
| 0
| 0.323353
| 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
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
62af8f352c8134316eaf7e81732322c7eefb1b7c
| 45
|
py
|
Python
|
tests/__init__.py
|
lucuma/vd-flask
|
4b545f02e0fed4d981c1e99d727d89f3826cf3ab
|
[
"BSD-3-Clause"
] | 4
|
2015-08-08T20:42:35.000Z
|
2015-08-27T14:22:31.000Z
|
tests/__init__.py
|
lucuma/vd-flask
|
4b545f02e0fed4d981c1e99d727d89f3826cf3ab
|
[
"BSD-3-Clause"
] | null | null | null |
tests/__init__.py
|
lucuma/vd-flask
|
4b545f02e0fed4d981c1e99d727d89f3826cf3ab
|
[
"BSD-3-Clause"
] | null | null | null |
import os
os.environ['APP_ENV'] = 'pytest'
| 9
| 32
| 0.666667
| 7
| 45
| 4.142857
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.155556
| 45
| 4
| 33
| 11.25
| 0.763158
| 0
| 0
| 0
| 0
| 0
| 0.288889
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
62cf56d85a46ef4f12c9e158ee81299dbb41cd5c
| 8,125
|
py
|
Python
|
tests.py
|
quangchiem139/AlphaZeroSimple
|
1b1096cc4b2aded6337a90035aee56b370ea1d3a
|
[
"MIT"
] | 76
|
2020-05-06T17:11:43.000Z
|
2022-03-23T15:52:46.000Z
|
tests.py
|
quangchiem139/AlphaZeroSimple
|
1b1096cc4b2aded6337a90035aee56b370ea1d3a
|
[
"MIT"
] | 7
|
2020-06-24T21:47:45.000Z
|
2022-01-27T23:23:38.000Z
|
tests.py
|
quangchiem139/AlphaZeroSimple
|
1b1096cc4b2aded6337a90035aee56b370ea1d3a
|
[
"MIT"
] | 18
|
2020-09-01T05:24:56.000Z
|
2022-02-28T04:25:34.000Z
|
import numpy as np
import unittest
from monte_carlo_tree_search import Node, MCTS, ucb_score
from game import Connect2Game
class MCTSTests(unittest.TestCase):
def test_mcts_from_root_with_equal_priors(self):
class MockModel:
def predict(self, board):
# starting board is:
# [0, 0, 1, -1]
return np.array([0.26, 0.24, 0.24, 0.26]), 0.0001
game = Connect2Game()
args = {'num_simulations': 50}
model = MockModel()
mcts = MCTS(game, model, args)
canonical_board = [0, 0, 0, 0]
print("starting")
root = mcts.run(model, canonical_board, to_play=1)
# the best move is to play at index 1 or 2
best_outer_move = max(root.children[0].visit_count, root.children[0].visit_count)
best_center_move = max(root.children[1].visit_count, root.children[2].visit_count)
self.assertGreater(best_center_move, best_outer_move)
def test_mcts_finds_best_move_with_really_bad_priors(self):
class MockModel:
def predict(self, board):
# starting board is:
# [0, 0, 1, -1]
return np.array([0.3, 0.7, 0, 0]), 0.0001
game = Connect2Game()
args = {'num_simulations': 25}
model = MockModel()
mcts = MCTS(game, model, args)
canonical_board = [0, 0, 1, -1]
print("starting")
root = mcts.run(model, canonical_board, to_play=1)
# the best move is to play at index 1
self.assertGreater(root.children[1].visit_count, root.children[0].visit_count)
def test_mcts_finds_best_move_with_equal_priors(self):
class MockModel:
def predict(self, board):
return np.array([0.51, 0.49, 0, 0]), 0.0001
game = Connect2Game()
args = { 'num_simulations': 25 }
model = MockModel()
mcts = MCTS(game, model, args)
canonical_board = [0, 0, -1, 1]
root = mcts.run(model, canonical_board, to_play=1)
# the better move is to play at index 1
self.assertLess(root.children[0].visit_count, root.children[1].visit_count)
def test_mcts_finds_best_move_with_really_really_bad_priors(self):
class MockModel:
def predict(self, board):
# starting board is:
# [-1, 0, 0, 0]
return np.array([0, 0.3, 0.3, 0.3]), 0.0001
game = Connect2Game()
args = {'num_simulations': 100}
model = MockModel()
mcts = MCTS(game, model, args)
canonical_board = [-1, 0, 0, 0]
root = mcts.run(model, canonical_board, to_play=1)
# the best move is to play at index 1
self.assertGreater(root.children[1].visit_count, root.children[2].visit_count)
self.assertGreater(root.children[1].visit_count, root.children[3].visit_count)
class NodeTests(unittest.TestCase):
def test_initialization(self):
node = Node(0.5, to_play=1)
self.assertEqual(node.visit_count, 0)
self.assertEqual(node.prior, 0.5)
self.assertEqual(len(node.children), 0)
self.assertFalse(node.expanded())
self.assertEqual(node.value(), 0)
def test_selection(self):
node = Node(0.5, to_play=1)
c0 = Node(0.5, to_play=-1)
c1 = Node(0.5, to_play=-1)
c2 = Node(0.5, to_play=-1)
node.visit_count = 1
c0.visit_count = 0
c2.visit_count = 0
c2.visit_count = 1
node.children = {
0: c0,
1: c1,
2: c2,
}
action = node.select_action(temperature=0)
self.assertEqual(action, 2)
def test_expansion(self):
node = Node(0.5, to_play=1)
state = [0, 0, 0, 0]
action_probs = [0.25, 0.15, 0.5, 0.1]
to_play = 1
node.expand(state, to_play, action_probs)
self.assertEqual(len(node.children), 4)
self.assertTrue(node.expanded())
self.assertEqual(node.to_play, to_play)
self.assertEqual(node.children[0].prior, 0.25)
self.assertEqual(node.children[1].prior, 0.15)
self.assertEqual(node.children[2].prior, 0.50)
self.assertEqual(node.children[3].prior, 0.10)
def test_ucb_score_no_children_visited(self):
node = Node(0.5, to_play=1)
node.visit_count = 1
state = [0, 0, 0, 0]
action_probs = [0.25, 0.15, 0.5, 0.1]
to_play = 1
node.expand(state, to_play, action_probs)
node.children[0].visit_count = 0
node.children[1].visit_count = 0
node.children[2].visit_count = 0
node.children[3].visit_count = 0
score_0 = ucb_score(node, node.children[0])
score_1 = ucb_score(node, node.children[1])
score_2 = ucb_score(node, node.children[2])
score_3 = ucb_score(node, node.children[3])
# With no visits, UCB score is just the priors
self.assertEqual(score_0, node.children[0].prior)
self.assertEqual(score_1, node.children[1].prior)
self.assertEqual(score_2, node.children[2].prior)
self.assertEqual(score_3, node.children[3].prior)
def test_ucb_score_one_child_visited(self):
node = Node(0.5, to_play=1)
node.visit_count = 1
state = [0, 0, 0, 0]
action_probs = [0.25, 0.15, 0.5, 0.1]
to_play = 1
node.expand(state, to_play, action_probs)
node.children[0].visit_count = 0
node.children[1].visit_count = 0
node.children[2].visit_count = 1
node.children[3].visit_count = 0
score_0 = ucb_score(node, node.children[0])
score_1 = ucb_score(node, node.children[1])
score_2 = ucb_score(node, node.children[2])
score_3 = ucb_score(node, node.children[3])
# With no visits, UCB score is just the priors
self.assertEqual(score_0, node.children[0].prior)
self.assertEqual(score_1, node.children[1].prior)
# If we visit one child once, its score is halved
self.assertEqual(score_2, node.children[2].prior / 2)
self.assertEqual(score_3, node.children[3].prior)
action, child = node.select_child()
self.assertEqual(action, 0)
def test_ucb_score_one_child_visited_twice(self):
node = Node(0.5, to_play=1)
node.visit_count = 2
state = [0, 0, 0, 0]
action_probs = [0.25, 0.15, 0.5, 0.1]
to_play = 1
node.expand(state, to_play, action_probs)
node.children[0].visit_count = 0
node.children[1].visit_count = 0
node.children[2].visit_count = 2
node.children[3].visit_count = 0
score_0 = ucb_score(node, node.children[0])
score_1 = ucb_score(node, node.children[1])
score_2 = ucb_score(node, node.children[2])
score_3 = ucb_score(node, node.children[3])
action, child = node.select_child()
# Now that we've visited the second action twice, we should
# end up trying the first action
self.assertEqual(action, 0)
def test_ucb_score_no_children_visited(self):
node = Node(0.5, to_play=1)
node.visit_count = 1
state = [0, 0, 0, 0]
action_probs = [0.25, 0.15, 0.5, 0.1]
to_play = 1
node.expand(state, to_play, action_probs)
node.children[0].visit_count = 0
node.children[1].visit_count = 0
node.children[2].visit_count = 1
node.children[3].visit_count = 0
score_0 = ucb_score(node, node.children[0])
score_1 = ucb_score(node, node.children[1])
score_2 = ucb_score(node, node.children[2])
score_3 = ucb_score(node, node.children[3])
# With no visits, UCB score is just the priors
self.assertEqual(score_0, node.children[0].prior)
self.assertEqual(score_1, node.children[1].prior)
# If we visit one child once, its score is halved
self.assertEqual(score_2, node.children[2].prior / 2)
self.assertEqual(score_3, node.children[3].prior)
if __name__ == '__main__':
unittest.main()
| 33.436214
| 90
| 0.603446
| 1,175
| 8,125
| 3.997447
| 0.102128
| 0.130296
| 0.028316
| 0.054503
| 0.828188
| 0.786672
| 0.773472
| 0.731318
| 0.676602
| 0.643389
| 0
| 0.060735
| 0.276554
| 8,125
| 242
| 91
| 33.57438
| 0.738346
| 0.070031
| 0
| 0.627219
| 0
| 0
| 0.011144
| 0
| 0
| 0
| 0
| 0
| 0.189349
| 1
| 0.088757
| false
| 0
| 0.023669
| 0.023669
| 0.171598
| 0.011834
| 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
|
62e97ff8ab0c79c4b07b3ba178afc466abc4637f
| 106
|
py
|
Python
|
cli.py
|
maartentamboer/testrepo
|
7d297a4ccf64c1b2f1ab950804b8cb12d570d41c
|
[
"Apache-2.0"
] | null | null | null |
cli.py
|
maartentamboer/testrepo
|
7d297a4ccf64c1b2f1ab950804b8cb12d570d41c
|
[
"Apache-2.0"
] | null | null | null |
cli.py
|
maartentamboer/testrepo
|
7d297a4ccf64c1b2f1ab950804b8cb12d570d41c
|
[
"Apache-2.0"
] | null | null | null |
import implementation.implementation
if __name__ == '__main__':
implementation.implementation.main()
| 21.2
| 40
| 0.792453
| 9
| 106
| 8.444444
| 0.555556
| 0.736842
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.113208
| 106
| 4
| 41
| 26.5
| 0.808511
| 0
| 0
| 0
| 0
| 0
| 0.075472
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 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
|
1a21e3b6f433a5d8230d3f09b4a03a896e0da938
| 886
|
py
|
Python
|
LSD/tools/onoworst.py
|
Fabianexe/superbubble
|
5399e76c49ad62da7d6a2de7b5ea548b415bda30
|
[
"BSD-3-Clause"
] | 1
|
2021-09-21T13:29:19.000Z
|
2021-09-21T13:29:19.000Z
|
LSD/tools/onoworst.py
|
Fabianexe/superbubble
|
5399e76c49ad62da7d6a2de7b5ea548b415bda30
|
[
"BSD-3-Clause"
] | null | null | null |
LSD/tools/onoworst.py
|
Fabianexe/superbubble
|
5399e76c49ad62da7d6a2de7b5ea548b415bda30
|
[
"BSD-3-Clause"
] | 2
|
2019-09-11T23:33:12.000Z
|
2021-02-18T14:39:01.000Z
|
def generate_onoworst(outpath, vertnumber):
f = open(outpath, "w")
for i in range(vertnumber-1):
f.write("{fro} {to}\n".format(fro=i, to=(i + 1)))
f.write("{fro} {to}\n".format(fro=i, to=vertnumber))
# for j in range(2):
# f.write("{fro} {to}\n".format(fro=i, to=(i+j + 1) % vertnumber))
f.close()
def generate_dirctworst(outpath, vertnumber):
f = open(outpath, "w")
for i in range(vertnumber):
f.write("{fro} {to}\n".format(fro=i, to=(i + 1) % vertnumber))
f.write("{fro} {to}\n".format(fro=0, to=vertnumber))
# for j in range(2):
# f.write("{fro} {to}\n".format(fro=i, to=(i+j + 1) % vertnumber))
f.close()
if __name__ == "__main__":
import sys
path = sys.argv[1]
size = int(float(sys.argv[2]))
# generate_onoworst(path, size)
generate_dirctworst(path, size)
| 31.642857
| 78
| 0.559819
| 135
| 886
| 3.585185
| 0.244444
| 0.136364
| 0.11157
| 0.136364
| 0.706612
| 0.706612
| 0.706612
| 0.706612
| 0.642562
| 0.642562
| 0
| 0.014793
| 0.23702
| 886
| 27
| 79
| 32.814815
| 0.701183
| 0.231377
| 0
| 0.235294
| 1
| 0
| 0.086053
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.117647
| false
| 0
| 0.058824
| 0
| 0.176471
| 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
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
1a2a0d04a8a70160787956713d9ae6850e80a323
| 37
|
py
|
Python
|
ppqi/__init__.py
|
GT-AcerZhang/PaddleQuickInference
|
987888bf296ad7846ee5c53ffd5195ea85cd0df4
|
[
"Apache-2.0"
] | 26
|
2021-04-26T11:37:21.000Z
|
2022-03-23T13:46:50.000Z
|
ppqi/__init__.py
|
GT-AcerZhang/PaddleQuickInference
|
987888bf296ad7846ee5c53ffd5195ea85cd0df4
|
[
"Apache-2.0"
] | 1
|
2021-01-04T07:20:49.000Z
|
2021-01-04T08:24:51.000Z
|
ppqi/__init__.py
|
GT-AcerZhang/PaddleQuickInference
|
987888bf296ad7846ee5c53ffd5195ea85cd0df4
|
[
"Apache-2.0"
] | 3
|
2021-04-29T04:45:52.000Z
|
2021-11-30T01:21:15.000Z
|
from .inference import InferenceModel
| 37
| 37
| 0.891892
| 4
| 37
| 8.25
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.081081
| 37
| 1
| 37
| 37
| 0.970588
| 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
|
a7f9e0b0b3790c1e0490c4cef2068ded0aaec152
| 2,704
|
py
|
Python
|
npipes/producers/producer.py
|
praxik/nPipes
|
4edf8fa0d0467e3455941c46e960fdf3f43e2d31
|
[
"Apache-2.0"
] | null | null | null |
npipes/producers/producer.py
|
praxik/nPipes
|
4edf8fa0d0467e3455941c46e960fdf3f43e2d31
|
[
"Apache-2.0"
] | null | null | null |
npipes/producers/producer.py
|
praxik/nPipes
|
4edf8fa0d0467e3455941c46e960fdf3f43e2d31
|
[
"Apache-2.0"
] | null | null | null |
# -*- mode: python;-*-
from base64 import b64decode
import json
from os import environ
from typing import Generator, List, Dict, Any
from ..outcome import Outcome, Success, Failure
from ..message.header import Message
# FIXME: What is this doing in here?
def envLower(key:str) -> Dict:
bv = environ.get(key, "e30=") # "e30=" is base64 "{}"
return json.loads(b64decode(bv.encode()).decode())
class Producer:
def messages(self) -> Generator[Message, Outcome[Any, Any], None]:
"""Yields an infinte sequence of *Message*s. Caller is expected to *send*
either *Success* or *Failure* after each yielded *Message* to allow producers
to perform any required cleanup associated with the *Message*.
IMPLEMENTATION WARNING: This method MUST not be implemented as a "normal"
generator. See comments in the function body for more information.
USAGE WARNING: this function is intended to be used **only** with a *for* loop
or *map* operation. DO NOT use the idiom of capturing the value returned
by *generator.send(foo)*.
"""
pass
# # Example implementation:
#
# while MessagesAreStillAvailableOrWhatever:
# result = ( yield Message(...) )
# if type(result) == Success:
# # handle Success
# else:
# # handle Failure
#
# yield Message() # MUST yield an empty Message after receiving result
# # from previous yield. Why? Because python's generator
# # semantics always yield the next value in response to
# # *send*, which does not work for the way we need to
# # use these generators. Best to think of these as bi-directional
# # streams rather than typical python generators.
# Each Producer submodule MUST have a free function named createProducer,
# with the following signature, and which returns a Producer of the specific
# type.
def createProducer(cliArgs:List[str], producerArgs:Dict) -> Producer:
"""Factory-style module load hook. Allows for the producer contained
inside the module to be instantiated without having to know its
name or other details. All we need to know from the outside is the
name of the module.
cliArgs is the list of arguments passed on the commandline. Most
producers won't care about these.
args is the Dict of arguments specified in the env var
NPIPES_producerArgs. See the sqs subclass for a good example of
using these.
"""
pass
| 40.358209
| 95
| 0.631657
| 336
| 2,704
| 5.080357
| 0.535714
| 0.008787
| 0.009373
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.006319
| 0.297707
| 2,704
| 66
| 96
| 40.969697
| 0.892575
| 0.68713
| 0
| 0.142857
| 0
| 0
| 0.00607
| 0
| 0
| 0
| 0
| 0.015152
| 0
| 1
| 0.214286
| false
| 0.142857
| 0.428571
| 0
| 0.785714
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 1
| 0
| 1
| 1
| 0
| 1
| 0
|
0
| 5
|
c5216f2390c5ae443b1e242597dce636a4f2ba97
| 91
|
py
|
Python
|
demo.py
|
Sogrey/python-tools
|
f34fb2a42cf7ed4d9b127a1065a8275b60781fea
|
[
"MIT"
] | null | null | null |
demo.py
|
Sogrey/python-tools
|
f34fb2a42cf7ed4d9b127a1065a8275b60781fea
|
[
"MIT"
] | null | null | null |
demo.py
|
Sogrey/python-tools
|
f34fb2a42cf7ed4d9b127a1065a8275b60781fea
|
[
"MIT"
] | null | null | null |
print('hello', end = " ")
print('world', end = "*")
print('!')
"""
输出结果是:
hello world*!
"""
| 13
| 25
| 0.505495
| 10
| 91
| 4.6
| 0.5
| 0.347826
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.153846
| 91
| 7
| 26
| 13
| 0.597403
| 0
| 0
| 0
| 0
| 0
| 0.203125
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 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
| 0
| 0
| 0
| 1
|
0
| 5
|
c5444904c8fd35c7b5bac3a6f68a6ff1b5ebb1e4
| 4,214
|
py
|
Python
|
tests/python/test_test.py
|
xwang186/taichi
|
1a8ec6ebfae8b3859fd91d4889e2de3c12f1dde2
|
[
"MIT"
] | null | null | null |
tests/python/test_test.py
|
xwang186/taichi
|
1a8ec6ebfae8b3859fd91d4889e2de3c12f1dde2
|
[
"MIT"
] | null | null | null |
tests/python/test_test.py
|
xwang186/taichi
|
1a8ec6ebfae8b3859fd91d4889e2de3c12f1dde2
|
[
"MIT"
] | null | null | null |
'''
This file tests if Taichi's testing utilities are functional.
TODO: Skips these tests after all tests are using @ti.test
'''
import os
import pytest
import taichi as ti
from tests import test_utils
### `ti.test`
@test_utils.test()
def test_all_archs():
assert ti.lang.impl.current_cfg().arch in test_utils.expected_archs()
@test_utils.test(arch=ti.cpu)
def test_arch_cpu():
assert ti.lang.impl.current_cfg().arch in [ti.cpu]
@test_utils.test(arch=[ti.cpu])
def test_arch_list_cpu():
assert ti.lang.impl.current_cfg().arch in [ti.cpu]
@test_utils.test(exclude=ti.cpu)
def test_exclude_cpu():
assert ti.lang.impl.current_cfg().arch not in [ti.cpu]
@test_utils.test(exclude=[ti.cpu])
def test_exclude_list_cpu():
assert ti.lang.impl.current_cfg().arch not in [ti.cpu]
@test_utils.test(arch=ti.opengl)
def test_arch_opengl():
assert ti.lang.impl.current_cfg().arch in [ti.opengl]
@test_utils.test(arch=[ti.cpu, ti.opengl, ti.metal])
def test_multiple_archs():
assert ti.lang.impl.current_cfg().arch in [ti.cpu, ti.opengl, ti.metal]
@test_utils.test(arch=ti.cpu, debug=True, advanced_optimization=False)
def test_init_args():
assert ti.lang.impl.current_cfg().debug == True
assert ti.lang.impl.current_cfg().advanced_optimization == False
@test_utils.test(require=ti.extension.sparse)
def test_require_extensions_1():
assert ti.lang.impl.current_cfg().arch in [ti.cpu, ti.cuda, ti.metal]
@test_utils.test(arch=[ti.cpu, ti.opengl], require=ti.extension.sparse)
def test_require_extensions_2():
assert ti.lang.impl.current_cfg().arch in [ti.cpu]
@test_utils.test(arch=[ti.cpu, ti.opengl],
require=[ti.extension.sparse, ti.extension.bls])
def test_require_extensions_2():
assert ti.lang.impl.current_cfg().arch in [ti.cuda]
### `test_utils.approx` and `test_utils.allclose`
@pytest.mark.parametrize('x', [0.1, 3])
@pytest.mark.parametrize(
'allclose', [test_utils.allclose, lambda x, y: x == test_utils.approx(y)])
@test_utils.test()
def test_allclose_rel(x, allclose):
rel = test_utils.get_rel_eps()
assert not allclose(x + x * rel * 3.0, x)
assert not allclose(x + x * rel * 1.2, x)
assert allclose(x + x * rel * 0.9, x)
assert allclose(x + x * rel * 0.5, x)
assert allclose(x, x)
assert allclose(x - x * rel * 0.5, x)
assert allclose(x - x * rel * 0.9, x)
assert not allclose(x - x * rel * 1.2, x)
assert not allclose(x - x * rel * 3.0, x)
@pytest.mark.parametrize('x', [0.1, 3])
@pytest.mark.parametrize(
'allclose', [test_utils.allclose, lambda x, y: x == test_utils.approx(y)])
@test_utils.test()
def test_allclose_rel_reordered1(x, allclose):
rel = test_utils.get_rel_eps()
assert not allclose(x + x * rel * 3.0, x)
assert not allclose(x + x * rel * 1.2, x)
assert allclose(x + x * rel * 0.9, x)
assert allclose(x + x * rel * 0.5, x)
assert allclose(x, x)
assert allclose(x - x * rel * 0.5, x)
assert allclose(x - x * rel * 0.9, x)
assert not allclose(x - x * rel * 1.2, x)
assert not allclose(x - x * rel * 3.0, x)
@pytest.mark.parametrize('x', [0.1, 3])
@pytest.mark.parametrize(
'allclose', [test_utils.allclose, lambda x, y: x == test_utils.approx(y)])
@test_utils.test()
def test_allclose_rel_reordered2(x, allclose):
rel = test_utils.get_rel_eps()
assert not allclose(x + x * rel * 3.0, x)
assert not allclose(x + x * rel * 1.2, x)
assert allclose(x + x * rel * 0.9, x)
assert allclose(x + x * rel * 0.5, x)
assert allclose(x, x)
assert allclose(x - x * rel * 0.5, x)
assert allclose(x - x * rel * 0.9, x)
assert not allclose(x - x * rel * 1.2, x)
assert not allclose(x - x * rel * 3.0, x)
@pytest.mark.skipif(ti._lib.core.with_metal(),
reason="Skip metal because metal is used as the example")
def test_disable_fallback():
old_environ = os.environ.get('TI_WANTED_ARCHS', '')
os.environ['TI_WANTED_ARCHS'] = "metal"
with pytest.raises(RuntimeError):
@test_utils.test(ti.metal)
def test():
pass
test()
os.environ['TI_WANTED_ARCHS'] = old_environ
os.environ['TI_WANTED_ARCHS'] = old_environ
| 29.676056
| 78
| 0.66374
| 701
| 4,214
| 3.848787
| 0.131241
| 0.093403
| 0.100074
| 0.115641
| 0.777613
| 0.762046
| 0.737954
| 0.714233
| 0.669755
| 0.622313
| 0
| 0.018039
| 0.184385
| 4,214
| 141
| 79
| 29.886525
| 0.766948
| 0.04224
| 0
| 0.541667
| 0
| 0
| 0.034551
| 0
| 0
| 0
| 0
| 0.007092
| 0.40625
| 1
| 0.166667
| false
| 0.010417
| 0.041667
| 0
| 0.208333
| 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
|
3d86529a0def5c5af7aa92db9c923ea00b8adc8e
| 23
|
py
|
Python
|
dime/__init__.py
|
CURENT/dime
|
f4f205dc2d6ebabe645144e70756a40a3318ef4a
|
[
"BSD-2-Clause"
] | null | null | null |
dime/__init__.py
|
CURENT/dime
|
f4f205dc2d6ebabe645144e70756a40a3318ef4a
|
[
"BSD-2-Clause"
] | null | null | null |
dime/__init__.py
|
CURENT/dime
|
f4f205dc2d6ebabe645144e70756a40a3318ef4a
|
[
"BSD-2-Clause"
] | null | null | null |
from .dime import Dime
| 11.5
| 22
| 0.782609
| 4
| 23
| 4.5
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.173913
| 23
| 1
| 23
| 23
| 0.947368
| 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
|
3d8df2e6d8cb45b5caa8f30997c05f4c5ee26897
| 58
|
py
|
Python
|
surround/django/health/models.py
|
sniegu/django-surround
|
e076ec92a6611a056899f3f4f74a24e676dafb5c
|
[
"MIT"
] | 1
|
2016-07-29T13:10:40.000Z
|
2016-07-29T13:10:40.000Z
|
surround/django/health/models.py
|
sniegu/django-surround
|
e076ec92a6611a056899f3f4f74a24e676dafb5c
|
[
"MIT"
] | null | null | null |
surround/django/health/models.py
|
sniegu/django-surround
|
e076ec92a6611a056899f3f4f74a24e676dafb5c
|
[
"MIT"
] | null | null | null |
from __future__ import absolute_import
from . import conf
| 19.333333
| 38
| 0.844828
| 8
| 58
| 5.5
| 0.625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.137931
| 58
| 2
| 39
| 29
| 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 | 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
|
3dc5bd2b743f46f9995b392bf3c1fbbacd5e0d81
| 135
|
py
|
Python
|
sync.py
|
guschmue/test
|
20cf06c40b0c9e9974b33cd5f0c41aa5748a31b9
|
[
"Apache-2.0"
] | null | null | null |
sync.py
|
guschmue/test
|
20cf06c40b0c9e9974b33cd5f0c41aa5748a31b9
|
[
"Apache-2.0"
] | null | null | null |
sync.py
|
guschmue/test
|
20cf06c40b0c9e9974b33cd5f0c41aa5748a31b9
|
[
"Apache-2.0"
] | 1
|
2020-12-23T00:49:17.000Z
|
2020-12-23T00:49:17.000Z
|
with open("log.txt", "r") as f:
line = f.read()
count = int(line) + 1
with open("log.txt", "w") as f:
f.write(str(count))
| 19.285714
| 31
| 0.533333
| 25
| 135
| 2.88
| 0.6
| 0.222222
| 0.305556
| 0.388889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.009709
| 0.237037
| 135
| 6
| 32
| 22.5
| 0.68932
| 0
| 0
| 0
| 0
| 0
| 0.119403
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
3df00cd48ffe42c19f72df51051b28689ad362ea
| 599
|
py
|
Python
|
app/services/security.py
|
ilya-goldin/kanban-board-app
|
3c7026aedb0e21eaccc26a2ac4a37f0b6a91a122
|
[
"MIT"
] | null | null | null |
app/services/security.py
|
ilya-goldin/kanban-board-app
|
3c7026aedb0e21eaccc26a2ac4a37f0b6a91a122
|
[
"MIT"
] | null | null | null |
app/services/security.py
|
ilya-goldin/kanban-board-app
|
3c7026aedb0e21eaccc26a2ac4a37f0b6a91a122
|
[
"MIT"
] | null | null | null |
import bcrypt
from passlib.context import CryptContext
pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto")
def generate_salt() -> str:
return bcrypt.gensalt().decode()
def verify_password(plain_password: str, hashed_password: str) -> bool:
return pwd_context.verify(plain_password, hashed_password)
def get_password_hash(password: str) -> str:
return pwd_context.hash(password)
def generate_password(plain_password: str) -> tuple[str, str]:
salt = generate_salt()
hashed_password = get_password_hash(salt + plain_password)
return salt, hashed_password
| 26.043478
| 71
| 0.75793
| 76
| 599
| 5.723684
| 0.328947
| 0.11954
| 0.096552
| 0.110345
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.138564
| 599
| 22
| 72
| 27.227273
| 0.843023
| 0
| 0
| 0
| 1
| 0
| 0.016694
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.307692
| false
| 0.615385
| 0.153846
| 0.230769
| 0.769231
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 5
|
9a72721d6403d56a0b61ea8543367ad4a32e2e02
| 133
|
py
|
Python
|
apps/service/user.py
|
luohu1/flask-api
|
b5d9305649013716d16fcf8d4d2df0718c8d3a51
|
[
"MIT"
] | null | null | null |
apps/service/user.py
|
luohu1/flask-api
|
b5d9305649013716d16fcf8d4d2df0718c8d3a51
|
[
"MIT"
] | null | null | null |
apps/service/user.py
|
luohu1/flask-api
|
b5d9305649013716d16fcf8d4d2df0718c8d3a51
|
[
"MIT"
] | null | null | null |
from flask_restful import Resource
class UserResource(Resource):
def get(self):
pass
def post(self):
pass
| 13.3
| 34
| 0.639098
| 16
| 133
| 5.25
| 0.75
| 0.190476
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.293233
| 133
| 9
| 35
| 14.777778
| 0.893617
| 0
| 0
| 0.333333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0.333333
| 0.166667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 5
|
9ae86714dad237eb3c1d8dee7b83896d3c072515
| 34
|
py
|
Python
|
_outs/some/folder/something.py
|
rahul-verma/arjuna-workshops
|
7f0e4d14b7268d87006d1f85563771991f474313
|
[
"Apache-2.0"
] | null | null | null |
_outs/some/folder/something.py
|
rahul-verma/arjuna-workshops
|
7f0e4d14b7268d87006d1f85563771991f474313
|
[
"Apache-2.0"
] | null | null | null |
_outs/some/folder/something.py
|
rahul-verma/arjuna-workshops
|
7f0e4d14b7268d87006d1f85563771991f474313
|
[
"Apache-2.0"
] | null | null | null |
def multiply(a,b):
print(a*b)
| 11.333333
| 18
| 0.588235
| 7
| 34
| 2.857143
| 0.714286
| 0.2
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.205882
| 34
| 3
| 19
| 11.333333
| 0.740741
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0
| 0.5
| 0.5
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
9afb998162fdab981e023a28efbf2f0366b2981c
| 20
|
py
|
Python
|
example_project/some_modules/third_modules/a34.py
|
Yuriy-Leonov/cython_imports_limit_issue
|
2f9e7c02798fb52185dabfe6ce3811c439ca2839
|
[
"MIT"
] | null | null | null |
example_project/some_modules/third_modules/a34.py
|
Yuriy-Leonov/cython_imports_limit_issue
|
2f9e7c02798fb52185dabfe6ce3811c439ca2839
|
[
"MIT"
] | null | null | null |
example_project/some_modules/third_modules/a34.py
|
Yuriy-Leonov/cython_imports_limit_issue
|
2f9e7c02798fb52185dabfe6ce3811c439ca2839
|
[
"MIT"
] | null | null | null |
class A34:
pass
| 6.666667
| 10
| 0.6
| 3
| 20
| 4
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.153846
| 0.35
| 20
| 2
| 11
| 10
| 0.769231
| 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
|
9aff8e2520138d59692d89e7972d6fc0939a6b1f
| 706
|
py
|
Python
|
sharkvalidator/readers/__init__.py
|
JohannesSMHI/sharkvalidator
|
79ae4a87e3e95c77d6bf580f66477cc6c5fdd454
|
[
"MIT"
] | null | null | null |
sharkvalidator/readers/__init__.py
|
JohannesSMHI/sharkvalidator
|
79ae4a87e3e95c77d6bf580f66477cc6c5fdd454
|
[
"MIT"
] | null | null | null |
sharkvalidator/readers/__init__.py
|
JohannesSMHI/sharkvalidator
|
79ae4a87e3e95c77d6bf580f66477cc6c5fdd454
|
[
"MIT"
] | 1
|
2021-09-22T08:37:49.000Z
|
2021-09-22T08:37:49.000Z
|
# Copyright (c) 2020 SMHI, Swedish Meteorological and Hydrological Institute.
# License: MIT License (see LICENSE or http://opensource.org/licenses/mit).
"""
Created on 2020-12-15 14:00
@author: johannes
"""
from sharkvalidator.readers.txt import PandasTxtReader, text_reader # noqa: F401
from sharkvalidator.readers.yml import yaml_reader # noqa: F401
from sharkvalidator.readers.xlsx import PandasXlsxReader # noqa: F401
from sharkvalidator.readers.phyche import PhysicalChemicalExcelReader, PhysicalChemicalLIMSReader # noqa: F401
from sharkvalidator.readers.phytop import PhytoplanktonExcelReader # noqa: F401
from sharkvalidator.readers.shark import SharkwebReader, SharkzipReader # noqa: F401
| 50.428571
| 111
| 0.813031
| 82
| 706
| 6.97561
| 0.573171
| 0.188811
| 0.262238
| 0.227273
| 0.309441
| 0.136364
| 0
| 0
| 0
| 0
| 0
| 0.05414
| 0.110482
| 706
| 13
| 112
| 54.307692
| 0.856688
| 0.372521
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
b10a5f223defb0c2e949b1b2e00bc4c557728603
| 271
|
py
|
Python
|
lib/exceptions.py
|
gcomte/lndmanage
|
297be179b08e6c976872aa35699efab158fe5bd5
|
[
"MIT"
] | null | null | null |
lib/exceptions.py
|
gcomte/lndmanage
|
297be179b08e6c976872aa35699efab158fe5bd5
|
[
"MIT"
] | null | null | null |
lib/exceptions.py
|
gcomte/lndmanage
|
297be179b08e6c976872aa35699efab158fe5bd5
|
[
"MIT"
] | null | null | null |
class RouteWithTooSmallCapacity(Exception):
pass
class RebalanceFailure(Exception):
pass
class NoRouteError(Exception):
pass
class DryRunException(Exception):
pass
class PaymentTimeOut(Exception):
pass
class TooExpensive(Exception):
pass
| 12.318182
| 43
| 0.745387
| 24
| 271
| 8.416667
| 0.375
| 0.386139
| 0.445545
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.188192
| 271
| 22
| 44
| 12.318182
| 0.918182
| 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
|
b1129bc15e2398d8bb8af9d49ced59f00dba88f8
| 455
|
py
|
Python
|
automlkiller/models/clustering/__init__.py
|
toandaominh1997/automlkiller
|
c5f451cfb05d8287bec0d26a9b14e2c1b452861c
|
[
"Apache-2.0"
] | null | null | null |
automlkiller/models/clustering/__init__.py
|
toandaominh1997/automlkiller
|
c5f451cfb05d8287bec0d26a9b14e2c1b452861c
|
[
"Apache-2.0"
] | null | null | null |
automlkiller/models/clustering/__init__.py
|
toandaominh1997/automlkiller
|
c5f451cfb05d8287bec0d26a9b14e2c1b452861c
|
[
"Apache-2.0"
] | null | null | null |
from .affinitypropagation_cluster import AffinityPropagation
from .agglomerativeclustering_cluster import AgglomerativeClustering
from .birch_cluster import BirchContainer
from .dbscan_cluster import DBSCANContainer
from .kmeans_cluster import KMeansContainer
from .kmodes_cluster import KModesContainer
from .meanshift_cluster import MeanShiftContainer
from .optics_cluster import OPTICSContainer
from .spectral_cluster import SpectralClusteringContainer
| 50.555556
| 68
| 0.903297
| 45
| 455
| 8.933333
| 0.422222
| 0.291045
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.076923
| 455
| 9
| 69
| 50.555556
| 0.957143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
b114c74255e1e5b6b2f1d16b0585bebc12be374e
| 121
|
py
|
Python
|
organizations/views/__init__.py
|
rogue26/processy.io
|
6c3c1d85e4b0aac9d9ede82f4fb0da95e9f0d888
|
[
"MIT"
] | null | null | null |
organizations/views/__init__.py
|
rogue26/processy.io
|
6c3c1d85e4b0aac9d9ede82f4fb0da95e9f0d888
|
[
"MIT"
] | 5
|
2021-02-15T19:33:35.000Z
|
2021-08-30T20:58:14.000Z
|
organizations/views/__init__.py
|
rogue26/processy.io
|
6c3c1d85e4b0aac9d9ede82f4fb0da95e9f0d888
|
[
"MIT"
] | null | null | null |
from ..views import ajax
from .organization_dashboard import OrganizationDashboard
from .content import ContentDashboard
| 30.25
| 57
| 0.867769
| 13
| 121
| 8
| 0.692308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.099174
| 121
| 3
| 58
| 40.333333
| 0.954128
| 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
|
b12c9976df07d6165bc12c407007c9867fea0a61
| 232
|
py
|
Python
|
tests/TestCase.py
|
golngaz/gol-rpg
|
0a953c5a5f96fc7b476701212b6917029d94f12e
|
[
"MIT"
] | null | null | null |
tests/TestCase.py
|
golngaz/gol-rpg
|
0a953c5a5f96fc7b476701212b6917029d94f12e
|
[
"MIT"
] | null | null | null |
tests/TestCase.py
|
golngaz/gol-rpg
|
0a953c5a5f96fc7b476701212b6917029d94f12e
|
[
"MIT"
] | null | null | null |
import unittest
class TestCase(unittest.TestCase):
def assertSame(self, expected, actual, message: str = ''):
self.assertEqual(type(expected), type(actual), message)
self.assertEqual(expected, actual, message)
| 29
| 63
| 0.706897
| 25
| 232
| 6.56
| 0.52
| 0.237805
| 0.256098
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.172414
| 232
| 7
| 64
| 33.142857
| 0.854167
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.6
| 1
| 0.2
| false
| 0
| 0.2
| 0
| 0.6
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
b13e17f00917b04bb3e4a7823ae13916fd34222c
| 56
|
py
|
Python
|
tot/__init__.py
|
etibger/tot
|
861ea0779bbad0b7d53e3450aedc687dd32e9a86
|
[
"MIT"
] | null | null | null |
tot/__init__.py
|
etibger/tot
|
861ea0779bbad0b7d53e3450aedc687dd32e9a86
|
[
"MIT"
] | null | null | null |
tot/__init__.py
|
etibger/tot
|
861ea0779bbad0b7d53e3450aedc687dd32e9a86
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
from tot.card import Card, Suit
| 18.666667
| 31
| 0.625
| 9
| 56
| 3.888889
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.021739
| 0.178571
| 56
| 2
| 32
| 28
| 0.73913
| 0.375
| 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
|
b1559fd8ce22d13f22e74d6c43e2dcd57b31e2e1
| 8,108
|
py
|
Python
|
Fixture/List_items_before_autorization.py
|
AllaZhulyanova/Autotests_for_ADUKAR
|
ba45b09e2cc859fc10542eb4dc1792ea6e296b08
|
[
"Apache-2.0"
] | null | null | null |
Fixture/List_items_before_autorization.py
|
AllaZhulyanova/Autotests_for_ADUKAR
|
ba45b09e2cc859fc10542eb4dc1792ea6e296b08
|
[
"Apache-2.0"
] | null | null | null |
Fixture/List_items_before_autorization.py
|
AllaZhulyanova/Autotests_for_ADUKAR
|
ba45b09e2cc859fc10542eb4dc1792ea6e296b08
|
[
"Apache-2.0"
] | null | null | null |
class BeforeAutorizationHelper:
def __init__(self,app):
self.app = app
# выбор предмета по порядку, возвращает кол-во уроков/тестов
def Test_list_of_all_items(self, TEXT):
driver = self.app.driver
Items = driver.find_elements_by_class_name('subject-card') # кнопка списка предметов
lenght_Items = len(Items)
number_all_tests = 0 # общее кол-во тестов по всем предметам
number_all_tests_access = 0 # общее кол-во тестов по всем предметам, которые имеют доступ
for i in range(0, lenght_Items):
Items[i].click() # нажимаем на предмет по порядку
Lenght_Objects = len(driver.find_elements_by_class_name(
'subject-number')) # длина списка уроков и тестов, нет атрибута текст
if Lenght_Objects != 0:
number_tests = self.Test_list_of_tests_and_lessons(TEXT) # функция выбор теста по порядку
number_all_tests = number_all_tests + number_tests[0]
number_all_tests_access = number_all_tests_access + number_tests[1]
Button_courses = driver.find_element_by_partial_link_text('курсы') # кнопка "<- курсы"
Button_courses.click() # после нажатия возвращает на список предметов
Items = driver.find_elements_by_class_name('subject-card') # кнопка списка предметов
lenght_Items = len(Items)
return number_all_tests, number_all_tests_access
# выбор предмета по порядку для ТТ, возвращает кол-во ТТ
def Test_list_of_all_items_for_TT (self, TEXT):
driver = self.app.driver
Items = driver.find_elements_by_class_name('subject-card') # кнопка списка предметов
lenght_Items = len(Items)
number_all_tests = 0 # общее кол-во тестов по всем предметам
number_all_tests_access = 0 # общее кол-во тестов по всем предметам, которые имеют доступ
for i in range(0, lenght_Items):
Items[i].click() # нажимаем на предмет по порядку
Buttons = driver.find_elements_by_class_name(
'subject-number') # список уроков и тестов, нет атрибута текст
Lenght_Objects = len(Buttons)
if Lenght_Objects != 0:
number_tests = self.Test_list_of_TT(TEXT) # функция выбор теста по порядку
number_all_tests = number_all_tests + number_tests[0]
number_all_tests_access = number_all_tests_access + number_tests[1]
Button_courses = driver.find_element_by_partial_link_text('курсы') # кнопка "<- курсы"
Button_courses.click() # после нажатия возвращает на список предметов
driver.implicitly_wait(1)
Items = driver.find_elements_by_class_name('subject-card') # кнопка списка предметов
return number_all_tests, number_all_tests_access
# доступ к уроку/тесту, возвращает кол-во уроков/тестов в предмете
def Test_list_of_tests_and_lessons(self,TEXT):
driver = self.app.driver
Text_sub = driver.find_element_by_tag_name('h1').text # название предмета на списке тестов/уроков
Lenght_buttons_objects = len(driver.find_elements_by_class_name('info'))
k = 0 # Кол-во всех разработанных уроков/тестов на странице
n = 0 # Кол-во всех доступных уроков/тестов на странице
for i in range(4, Lenght_buttons_objects):
Buttons_objects = driver.find_elements_by_class_name('info') # кнопка список уроков и тестов и еще 4 кпоки, есть атрибут текст
Text_buttons_objects = Buttons_objects[i].text
Lesson_or_test = Text_buttons_objects.split()
if TEXT == Lesson_or_test[0] and TEXT == "ТЕСТ":
Buttons_objects[i].click()
k = k + 1
message = self.Test_messаge() #функция, которая возварщает текст "Зарегистрируйся и тренируйся без ограничений!"
if message == "Зарегистрируйся и тренируйся без ограничений!":
n = n + 1
Button_close = driver.find_elements_by_class_name('icon_close')[4] # кнопка "Х"
Button_close.click()
else:
print("Ошибка в доступе к тесту")
print("Предмет:", Text_sub)
print(Text_buttons_objects)
elif TEXT == Lesson_or_test[0] and TEXT == "УРОК":
Buttons_objects[i].click()
driver.implicitly_wait(1)
if len(driver.find_elements_by_class_name('test-button')) != 0 or len(driver.find_element_by_tag_name('iframe').get_attribute("src")) != 0:
k = k + 1
if len(driver.find_elements_by_class_name('test-button')) != 0 and len(driver.find_element_by_tag_name('iframe').get_attribute("src")) != 0:
n = n + 1
Button_back = driver.find_element_by_class_name('icon_back') # кнопка <- АДУКАР
Button_back.click()
else:
print("Ошибка в доступе к уроку")
print("Предмет:", Text_sub)
print(Text_buttons_objects)
else:
pass
Lenght_buttons_objects = len(driver.find_elements_by_class_name('info'))
return k, n
# доступ к ТТ1/ТТ2
def Test_list_of_TT(self, TEXT):
driver = self.app.driver
Buttons_objects = driver.find_elements_by_class_name(
'info') # кнопка список уроков и тестов и еще 4 кпоки, есть атрибут текст
Lenght_buttons_objects = len(Buttons_objects)
kTT = 0 # Кол-во всех разработанных тренировочных тестов в уроках
nTT = 0 # Кол-во всех доступных тренировочных тестов в уроках
for i in range(4, Lenght_buttons_objects):
Text_sub = driver.find_element_by_tag_name('h1').text # название предмета на списке тестов/уроков
Text_buttons_objects = Buttons_objects[i].text
Lesson_or_test = Text_buttons_objects.split()
if Lesson_or_test[0] == 'УРОК':
Buttons_objects[i].click()
driver.implicitly_wait(1)
if len(driver.find_elements_by_class_name('test-button')) != 0 and len(driver.find_element_by_tag_name('iframe').get_attribute("src")):
Button_TT = driver.find_elements_by_class_name('test-button') # ТТ1/ТТ2
Lenght_buttons_TT = len(Button_TT)
for j in range(0, Lenght_buttons_TT):
Button_TT[j].click()
kTT = kTT + 1
message = self.Test_messаge() # функция, которая возварщает текст "Зарегистрируйся и тренируйся без ограничений!"
if message == "Зарегистрируйся и тренируйся без ограничений!":
nTT = nTT + 1
driver.back()
Buttons_objects = driver.find_elements_by_class_name('info') # кнопка список уроков
Buttons_objects[i].click()
else:
print("Ошибка в доступе")
print("Предмет:", Text_sub)
print(Text_buttons_objects)
print(Button_TT[j].text)
Button_TT = driver.find_elements_by_class_name('test-button')
Lenght_buttons_TT = len(Button_TT)
Button_back = driver.find_element_by_class_name('icon_back') # кнопка <- АДУКАР
Button_back.click()
Buttons_objects = driver.find_elements_by_class_name('info') # кнопка список уроков/тестов и еще 4 кнопки
Lenght_buttons_objects = len(Buttons_objects)
return kTT, nTT
# возвращение сообщения "Зарегистрируйся и тренируйся без ограничений!"
def Test_messаge(self):
driver = self.app.driver
alert = driver.find_elements_by_tag_name('h2')[-2]
alert_text = alert.text
return alert_text
| 58.330935
| 160
| 0.614085
| 991
| 8,108
| 4.733602
| 0.14329
| 0.059689
| 0.046898
| 0.081006
| 0.843957
| 0.806012
| 0.731401
| 0.703262
| 0.625666
| 0.625666
| 0
| 0.008559
| 0.308337
| 8,108
| 138
| 161
| 58.753623
| 0.827924
| 0.197213
| 0
| 0.645161
| 0
| 0
| 0.064346
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.048387
| false
| 0.008065
| 0
| 0
| 0.096774
| 0.080645
| 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
|
b1698afe7dd2dba2053cbbd66cab84e5ab0b2ff5
| 675
|
py
|
Python
|
pg_rest_api/settings/components/auth.py
|
PartyGwam/api
|
f580e29762990eabdb3bb5e317dee22c6c441696
|
[
"MIT"
] | 1
|
2018-06-24T08:10:12.000Z
|
2018-06-24T08:10:12.000Z
|
pg_rest_api/settings/components/auth.py
|
PartyGwam/api
|
f580e29762990eabdb3bb5e317dee22c6c441696
|
[
"MIT"
] | 48
|
2018-06-24T12:30:15.000Z
|
2022-01-13T00:48:24.000Z
|
pg_rest_api/settings/components/auth.py
|
PartyGwam/api
|
f580e29762990eabdb3bb5e317dee22c6c441696
|
[
"MIT"
] | null | null | null |
# Password validation
# https://docs.djangoproject.com/en/2.0/ref/settings/#auth-password-validators
AUTH_USER_MODEL = 'users.User'
AUTHENTICATION_BACKENDS = [
'pg_rest_api.backends.PGBackend',
'django.contrib.auth.backends.ModelBackend'
]
AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]
| 27
| 91
| 0.706667
| 62
| 675
| 7.516129
| 0.483871
| 0.154506
| 0.182403
| 0.180258
| 0.334764
| 0.334764
| 0
| 0
| 0
| 0
| 0
| 0.003534
| 0.161481
| 675
| 24
| 92
| 28.125
| 0.819788
| 0.140741
| 0
| 0
| 0
| 0
| 0.621528
| 0.576389
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.263158
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.