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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0d947c35c21b3239f4d20a797f709237eaf0ece0 | 247 | py | Python | tests/test_runner_deprecation_app/tests.py | fizista/django | 16f3a6a4c7bab11644d11c2be029374e5095cb56 | [
"BSD-3-Clause"
] | 1 | 2019-02-10T19:33:27.000Z | 2019-02-10T19:33:27.000Z | tests/test_runner_deprecation_app/tests.py | fizista/django | 16f3a6a4c7bab11644d11c2be029374e5095cb56 | [
"BSD-3-Clause"
] | null | null | null | tests/test_runner_deprecation_app/tests.py | fizista/django | 16f3a6a4c7bab11644d11c2be029374e5095cb56 | [
"BSD-3-Clause"
] | 1 | 2020-05-03T20:42:29.000Z | 2020-05-03T20:42:29.000Z | import warnings
from django.test import TestCase
warnings.warn("module-level warning from deprecation_app", DeprecationWarning)
class DummyTest(TestCase):
def test_warn(self):
warnings.warn("warning from test", DeprecationWarning)
| 22.454545 | 78 | 0.777328 | 29 | 247 | 6.551724 | 0.586207 | 0.126316 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.1417 | 247 | 10 | 79 | 24.7 | 0.896226 | 0 | 0 | 0 | 0 | 0 | 0.234818 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.166667 | false | 0 | 0.333333 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
0da4e0fd133dd93d9666709ef0d8d3b74297b789 | 1,519 | py | Python | test_utils.py | moritz-gerster/separating_periodic_from_aperiodic_PSDs | 79d771e8cac21098aac26ee369e0994add3e2bf9 | [
"MIT"
] | 2 | 2021-11-05T14:58:34.000Z | 2022-01-05T09:11:33.000Z | test_utils.py | moritz-gerster/separating_periodic_from_aperiodic_PSDs | 79d771e8cac21098aac26ee369e0994add3e2bf9 | [
"MIT"
] | null | null | null | test_utils.py | moritz-gerster/separating_periodic_from_aperiodic_PSDs | 79d771e8cac21098aac26ee369e0994add3e2bf9 | [
"MIT"
] | null | null | null | import numpy as np
from utils import elec_phys_signal
# Test simulation of electrophysiological signals
def test_elec_phys_signal():
# test output
output = elec_phys_signal(1)
assert isinstance(output, tuple)
assert isinstance(output[0], np.ndarray)
assert isinstance(output[1], np.ndarray)
# test impact of 1/f exponent
assert not np.allclose(elec_phys_signal(1)[0],
elec_phys_signal(2)[0])
# test impact of periodic_params
params1 = dict(exponent=1, periodic_params=[(1, 1, 1), (2, 2, 2)])
params2 = dict(exponent=1, periodic_params=[(3, 3, 3), (2, 2, 2)])
aperiodic_signal1, full_signal1 = elec_phys_signal(**params1)
aperiodic_signal2, full_signal2 = elec_phys_signal(**params2)
assert not np.allclose(full_signal1, full_signal2)
assert np.allclose(aperiodic_signal1, aperiodic_signal2)
# test impact of noise level
assert not np.allclose(elec_phys_signal(1, nlv=1)[0],
elec_phys_signal(1, nlv=2)[0])
# test impact of highpass
assert not np.allclose(elec_phys_signal(1, highpass=1)[0],
elec_phys_signal(1, highpass=0)[0])
# test duration of signal
assert elec_phys_signal(1, sample_rate=24, duration=1)[0].shape[0] == 24-2
assert elec_phys_signal(1, sample_rate=1, duration=24)[0].shape[0] == 24-2
# test impact of seed
assert not np.allclose(elec_phys_signal(1, seed=0)[0],
elec_phys_signal(1, seed=1)[0]) | 37.975 | 78 | 0.664253 | 224 | 1,519 | 4.308036 | 0.214286 | 0.124352 | 0.217617 | 0.15544 | 0.409326 | 0.240415 | 0.205181 | 0.140933 | 0 | 0 | 0 | 0.059272 | 0.222515 | 1,519 | 40 | 79 | 37.975 | 0.757832 | 0.140224 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.478261 | 1 | 0.043478 | false | 0.086957 | 0.086957 | 0 | 0.130435 | 0 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 3 |
0da65955b301e345723b597b834f1ffd2509a527 | 520 | py | Python | apps/controllerx/core/integration/deconz.py | sreknob/controllerx | f5e4475dae93d171ba3056399378107df1d52fa5 | [
"MIT"
] | 1 | 2020-02-28T17:26:36.000Z | 2020-02-28T17:26:36.000Z | apps/controllerx/core/integration/deconz.py | sreknob/controllerx | f5e4475dae93d171ba3056399378107df1d52fa5 | [
"MIT"
] | null | null | null | apps/controllerx/core/integration/deconz.py | sreknob/controllerx | f5e4475dae93d171ba3056399378107df1d52fa5 | [
"MIT"
] | null | null | null | from core.integration import Integration
class DeCONZIntegration(Integration):
def get_name(self):
return "deconz"
def get_actions_mapping(self):
return self.controller.get_deconz_actions_mapping()
def listen_changes(self, controller_id):
self.controller.listen_event(self.callback, "deconz_event", id=controller_id)
async def callback(self, event_name, data, kwargs):
type_ = self.kwargs.get("type", "event")
await self.controller.handle_action(data[type_])
| 30.588235 | 85 | 0.721154 | 64 | 520 | 5.625 | 0.421875 | 0.155556 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.178846 | 520 | 16 | 86 | 32.5 | 0.843091 | 0 | 0 | 0 | 0 | 0 | 0.051923 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.272727 | false | 0 | 0.090909 | 0.181818 | 0.636364 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
0daeb0a90ad16d9893602d4410fcfd44b9ab93ae | 316 | py | Python | python/learn/base/data/set.py | qrsforever/workspace | 53c7ce7ca7da62c9fbb3d991ae9e4e34d07ece5f | [
"MIT"
] | 2 | 2017-06-07T03:20:42.000Z | 2020-01-07T09:14:26.000Z | python/learn/base/data/set.py | qrsforever/workspace | 53c7ce7ca7da62c9fbb3d991ae9e4e34d07ece5f | [
"MIT"
] | null | null | null | python/learn/base/data/set.py | qrsforever/workspace | 53c7ce7ca7da62c9fbb3d991ae9e4e34d07ece5f | [
"MIT"
] | null | null | null | #!/usr/bin/python2.7
#coding:utf-8
print dir(set)
s = {'x', 'y', 'z'}
print len(s)
# print s.count('x') # 错误, Set里面的元素没有重复的, 方法没有意义
a = set('aabbccdef')
print a
b = set('abcdeffgg')
print b
print a - b # 在a中不在b中
print a | b
print a & b
print a ^ b # 不同时在a,b中
print { x for x in 'abcdefg' if x not in 'cdef' }
| 15.047619 | 49 | 0.607595 | 60 | 316 | 3.2 | 0.533333 | 0.15625 | 0.182292 | 0.125 | 0.109375 | 0.109375 | 0 | 0 | 0 | 0 | 0 | 0.012097 | 0.21519 | 316 | 20 | 50 | 15.8 | 0.762097 | 0.297468 | 0 | 0 | 0 | 0 | 0.148148 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0 | null | null | 0.75 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 3 |
0db733f1532a37504cff2a5192eab073a5544177 | 125 | py | Python | src/features/feature_normalization.py | t-wyrwas/Titanic | aad7e4431ec926e59821fbe7926767fc7f380ef2 | [
"MIT"
] | null | null | null | src/features/feature_normalization.py | t-wyrwas/Titanic | aad7e4431ec926e59821fbe7926767fc7f380ef2 | [
"MIT"
] | null | null | null | src/features/feature_normalization.py | t-wyrwas/Titanic | aad7e4431ec926e59821fbe7926767fc7f380ef2 | [
"MIT"
] | null | null | null |
def normalize(df, features):
for f in features:
range = df[f].max() - df[f].min()
df[f] = df[f] / range
| 20.833333 | 41 | 0.512 | 20 | 125 | 3.2 | 0.5 | 0.1875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.304 | 125 | 5 | 42 | 25 | 0.735632 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0 | 0 | 0.25 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
0dd761b338c111a00b86dc8b3ddbd3beb9de5179 | 78 | py | Python | pythonexercicios/ex110/ex110-modulos.py | marroni1103/exercicios-pyton | 734162cc4b63ed30d754a6efe4c5622baaa1a50b | [
"MIT"
] | null | null | null | pythonexercicios/ex110/ex110-modulos.py | marroni1103/exercicios-pyton | 734162cc4b63ed30d754a6efe4c5622baaa1a50b | [
"MIT"
] | null | null | null | pythonexercicios/ex110/ex110-modulos.py | marroni1103/exercicios-pyton | 734162cc4b63ed30d754a6efe4c5622baaa1a50b | [
"MIT"
] | null | null | null | import moeda
p = float(input('Digite um valor: R$ '))
moeda.resumo(p, 10, 10) | 19.5 | 40 | 0.666667 | 14 | 78 | 3.714286 | 0.785714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.060606 | 0.153846 | 78 | 4 | 41 | 19.5 | 0.727273 | 0 | 0 | 0 | 0 | 0 | 0.253165 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 0.333333 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
0ddb76da1a8c48b1d8cd59059a0eb5c0268cbd9f | 60 | py | Python | src/greenbudget/app/user/__init__.py | nickmflorin/django-proper-architecture-testing | da7c4019697e85f921695144375d2f548f1e98ad | [
"MIT"
] | null | null | null | src/greenbudget/app/user/__init__.py | nickmflorin/django-proper-architecture-testing | da7c4019697e85f921695144375d2f548f1e98ad | [
"MIT"
] | null | null | null | src/greenbudget/app/user/__init__.py | nickmflorin/django-proper-architecture-testing | da7c4019697e85f921695144375d2f548f1e98ad | [
"MIT"
] | null | null | null | default_app_config = 'greenbudget.app.user.apps.UserConfig'
| 30 | 59 | 0.833333 | 8 | 60 | 6 | 0.875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.05 | 60 | 1 | 60 | 60 | 0.842105 | 0 | 0 | 0 | 0 | 0 | 0.6 | 0.6 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
0de6eaae871446eb0296a2a1ba100ce19a9b744b | 9,310 | py | Python | scratch/lidar.py | zkoppanyi/uni | 32dbf0a425c6922264e737e9d59f794b32bb9c95 | [
"MIT"
] | null | null | null | scratch/lidar.py | zkoppanyi/uni | 32dbf0a425c6922264e737e9d59f794b32bb9c95 | [
"MIT"
] | null | null | null | scratch/lidar.py | zkoppanyi/uni | 32dbf0a425c6922264e737e9d59f794b32bb9c95 | [
"MIT"
] | null | null | null | # %% External imports
%matplotlib qt
import numpy as np
from mpl_toolkits import mplot3d
import matplotlib.pyplot as plt
from numpy.core.fromnumeric import size
import viz
from scipy.spatial.transform import Rotation
# %% Pose definiations
R_cams = []
t_cams = []
R_cams.append(np.array([[0.46224950999999997,-0.88642706999999998,0.023925829999999999],[-0.88672448999999998,-0.46227224,0.0049042499999999998],[0.0067129900000000003,-0.023482610000000001,-0.99970170999999997]]))
t_cams.append(np.array([37.288039423382166,-10.165071594832114,1.8727184629264104]))
R_cams.append(np.array([[0.46651118000000003,-0.88420001999999998,0.02361473],[-0.88449507999999999,-0.46651474999999998,0.0056951700000000003],[0.0059809499999999996,-0.023543979999999999,-0.99970490999999995]]))
t_cams.append(np.array([37.659737128609429,6.2026050253511551,1.806322197411959]))
R_cams.append(np.array([[0.46728996,-0.88381131000000002,0.02275201],[-0.88407325000000003,-0.46733393000000001,0.0036717999999999998],[0.0073876100000000002,-0.021830229999999999,-0.99973440000000002]]))
t_cams.append(np.array([37.110483017656314,-26.062842185291906,2.1648932375751877]))
R_cams.append(np.array([[0.49233894,-0.87008560000000001,0.023524920000000001],[-0.87039502000000002,-0.49227402999999997,0.0088764099999999995],[0.00385747,-0.024846179999999999,-0.99968383999999999]]))
t_cams.append(np.array([-5.4967235887385559,31.091132695336771,1.610341169355259]))
R_cams.append(np.array([[0.50085186000000004,-0.86521892,0.02331571],[-0.86552704000000003,-0.50076681999999995,0.0097747300000000006],[0.0032184499999999999,-0.025076060000000001,-0.99968036999999998]]))
t_cams.append(np.array([-5.5377931849465023,14.710846119800054,1.7300687232930638]))
R_cams.append(np.array([[0.47180678999999998,-0.88143651000000001,0.021633989999999999],[-0.88162320000000005,-0.47195058000000001,-0.0017871199999999999],[0.01178541,-0.018229849999999999,-0.99976436000000002]]))
t_cams.append(np.array([37.384051130187636,-41.633462546113947,2.1158634448314526]))
R_cams.append(np.array([[0.47189439999999999,-0.88132094000000005,0.024270690000000001],[-0.88162231000000002,-0.47193537000000002,0.0043717900000000004],[0.0076012500000000004,-0.023460600000000002,-0.99969585999999999]]))
t_cams.append(np.array([37.970831512826429,22.702039449830167,2.2784408494325161]))
R_cams.append(np.array([[0.49323628000000003,-0.86958290999999999,0.023313810000000001],[-0.86987912999999994,-0.49321372000000002,0.0071084499999999997],[0.0053173099999999996,-0.02378634,-0.99970292000000005]]))
t_cams.append(np.array([-5.7895992643088299,47.41667398960805,1.3434057619016124]))
R_cams.append(np.array([[0.52530100000000002,-0.85062040000000005,0.022445380000000001],[-0.85089974999999995,-0.52527330999999999,0.0075872400000000003],[0.0053360999999999999,-0.02308435,-0.99971927999999999]]))
t_cams.append(np.array([-4.180344666992224,-17.63113751842792,1.6293067869202613]))
R_cams.append(np.array([[0.67739077000000003,-0.73556431,0.0093213199999999993],[-0.73555954000000001,-0.67744453999999998,-0.0045894100000000004],[0.0096904799999999996,-0.00374756,-0.99994601999999999]]))
t_cams.append(np.array([-54.873649641752209,13.564125668214011,2.0621008471261026]))
R_cams.append(np.array([[0.46154272000000002,-0.88673528000000001,0.026055149999999999],[-0.88708531000000002,-0.46157870000000001,0.0049759699999999997],[0.0076141400000000001,-0.02540976,-0.99964812000000003]]))
t_cams.append(np.array([38.403466611833693,38.517046653437177,2.6255313556474733]))
R_cams.append(np.array([[0.52497444000000004,-0.85077981999999996,0.023990129999999998],[-0.85109480000000004,-0.52495965,0.00741715],[0.0062834900000000001,-0.02431169,-0.99968467999999999]]))
t_cams.append(np.array([-3.1792848847595057,-33.939470542312002,1.3347059664748238]))
R_cams.append(np.array([[0.68604211999999998,-0.72722567999999999,0.02211378],[-0.72739374999999995,-0.68622002999999998,-0.00063688000000000004],[0.015638079999999999,-0.015648499999999999,-0.99975526000000003]]))
t_cams.append(np.array([-49.141419809434737,-2.7622727471745492,1.8123658774813083]))
R_cams.append(np.array([[0.66895943999999996,-0.74293441999999998,0.023274739999999999],[-0.74317641000000001,-0.66908968000000002,0.0027978299999999998],[0.013494280000000001,-0.019168879999999999,-0.99972519000000004]]))
t_cams.append(np.array([-45.14375735420402,-17.020471172497622,0.74002029836796157]))
R_cams.append(np.array([[0.46577089999999999,-0.88465850000000001,0.020900169999999999],[-0.88480402999999996,-0.46594503999999998,-0.0041277900000000001],[0.013390020000000001,-0.01656995,-0.99977305000000005]]))
t_cams.append(np.array([36.921765921296576,-58.333465843194972,2.0277098339924837]))
R_cams.append(np.array([[0.48385872000000002,-0.87480838999999999,0.02431088],[-0.87512471000000003,-0.48385447999999998,0.0064485300000000001],[0.0061216999999999999,-0.02439523,-0.99968365000000003]]))
t_cams.append(np.array([-5.3925073936428083,63.572360842694366,1.2795696460166441]))
R_cams.append(np.array([[0.64499671000000003,-0.76379189000000003,0.024519200000000001],[-0.76410549000000005,-0.64506109,0.0062437899999999999],[0.011047420000000001,-0.02276247,-0.99967985999999998]]))
t_cams.append(np.array([-42.318382286406617,-31.469204848937117,0.40737715271141517]))
R_cams.append(np.array([[0.61809161000000001,-0.78570704000000002,0.025044219999999999],[-0.78604348999999996,-0.61813068000000004,0.0070777100000000001],[0.0099196000000000006,-0.024060519999999998,-0.99966129000000004]]))
t_cams.append(np.array([-40.624343186101939,-45.960225675511538,0.35988156190389997]))
# %%
import laspy
las_file_path = '/home/zoltan/Repo/pix/sandbox/output/lidar_filtered_only.las'
pts = []
with laspy.open(las_file_path) as las:
print(f"Point format: {las.header.point_format}")
print(f"Number of points: {las.header.point_count}")
print(f"Number of vlrs: {len(las.header.vlrs)}")
las_pts = next(las.chunk_iterator(las.header.point_count))
x = np.array(las_pts.x.copy())
y = np.array(las_pts.y.copy())
z = np.array(las_pts.z.copy())
pts = np.concatenate(([x], [y], [z]), axis=0).T
cog = np.array([542419.58606533124, 127532.132639184, 239.43887577800001])
pts = pts - cog
# %%
fig = plt.figure(figsize=(12,10))
ax = plt.axes(projection='3d')
msize = np.ones((pts.shape[0], 1))*0.1,
ax.scatter3D(pts[:, 0], pts[:, 1], pts[:, 2], msize, c='g', marker='.', linewidth=0.1)
for k in range(len(R_cams)):
X = -R_cams[k].T @ t_cams[k]
viz.plot_fustrum(ax, X, R_cams[k], f=1.0, scale=10)
viz.set_3d_axes_equal(ax)
# %% Compute the lidar station
# [14:06:28] [Picked] - [shifted] (37.389999;-26.330000;-84.983002)
# [14:06:28] [Picked] - [original] (542456.969999;127505.800000;154.446998)
# [14:06:52] [Picked] - [shifted] (40.630001;-28.370001;-85.163002)
# [14:06:52] [Picked] - [original] (542460.210001;127503.759999;154.266998)
# [14:07:03] [Picked] - [shifted] (40.000000;-25.570000;-85.053001)
# [14:07:03] [Picked] - [original] (542459.580000;127506.560000;154.376999)
# [14:07:10] [Picked] - [shifted] (38.150002;-28.950001;-85.133003)
# [14:07:10] [Picked] - [original] (542457.730002;127503.179999;154.296997)
station_pts = np.array([[542456.969999, 127505.800000, 154.446998],
[542460.210001, 127503.759999, 154.266998],
[542459.580000, 127506.560000, 154.376999],
[542457.730002, 127503.179999, 154.296997]])
station_xyz = np.mean(station_pts, axis=0)
station_xyz_loc = station_xyz - cog
# %%
fig = plt.figure(figsize=(12,10))
ax = plt.axes(projection='3d')
#msize = np.ones((pts.shape[0], 1))*0.1,
#ax.scatter3D(pts[:, 0], pts[:, 1], pts[:, 2], msize, c='g', marker='.', linewidth=0.1)
#ax.scatter3D(station_xyz_loc[0], station_xyz_loc[1], station_xyz_loc[2], c='b', marker='+')
def plot_fustrum(ax, X, R, f=1, scale=1, w=1, h=1):
cam_dir = -scale * R @ np.array([[0, 0, f]]).T
cam_dir_line = np.array([[X[0], X[0]+cam_dir[0, 0]], [X[1], X[1]+cam_dir[1, 0]], [X[2], X[2]+cam_dir[2, 0]]]).T
ax.plot3D(X[0], X[1], X[2], c='r', marker='o')
ax.plot3D(cam_dir_line[:, 0], cam_dir_line[:, 1], cam_dir_line[:, 2], 'gray')
f_pt_0 = np.array([[-w, -h, 0], [-w, h, 0], [w, h, 0], [w, -h, 0], [-w, -h, 0]])
fustrum = scale * (R @ f_pt_0.T ).T + np.array([X[0] - cam_dir[0, 0], X[1] - cam_dir[1, 0], X[2] - cam_dir[2, 0]])
ax.plot3D(fustrum[:,0], fustrum[:,1], fustrum[:,2], c='r')
for pt in fustrum:
ax.plot3D([X[0], pt[0]], [X[1], pt[1]], [X[2], pt[2]], c='r')
scale = 8.8 / 3700 / 1000 # one pixel size in m
w = 1500
h = 1500
scale = 1
for kappa in np.linspace(0, 360, 9):
for omega in np.linspace(0, 180, 5):
R = Rotation.from_euler('xyz', [omega, 0, kappa], degrees=True).as_matrix()
print(f'R << {R[0,0]}, {R[0,1]}, {R[0,2]}, {R[1,0]}, {R[1,1]}, {R[1,2]}, {R[2,0]}, {R[2,1]}, {R[2,2]};')
print(f'virt_cam_poses.push_back(R);')
#plot_fustrum(ax, station_xyz_loc, R, f=3000.0, scale=scale, w=1300, h=1300)
plot_fustrum(ax, station_xyz_loc, R, f=1.0, scale=scale, w=w/3000, h=h/3000)
viz.set_3d_axes_equal(ax)
# %% Create fake image
#import cv2
#img = np.ones((w,h,1), np.uint8)*255
#cv2.imwrite('/home/zoltan/Repo/pix/sandbox/input/lidar.png', img)
# %%
| 67.956204 | 223 | 0.732975 | 1,313 | 9,310 | 5.115765 | 0.329779 | 0.046896 | 0.064314 | 0.091112 | 0.214828 | 0.179098 | 0.064166 | 0.052255 | 0.03707 | 0.03707 | 0 | 0.50342 | 0.073577 | 9,310 | 136 | 224 | 68.455882 | 0.275362 | 0.118153 | 0 | 0.0625 | 0 | 0.010417 | 0.040318 | 0.019426 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.072917 | null | null | 0.052083 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
2177a7a5e622a623db5afca53545157c7bcc5d39 | 1,375 | py | Python | api/analyses/analyses.py | capdragon/cannlytics | 47eeda80b1faf54d709def3641d9476501508fec | [
"MIT"
] | null | null | null | api/analyses/analyses.py | capdragon/cannlytics | 47eeda80b1faf54d709def3641d9476501508fec | [
"MIT"
] | null | null | null | api/analyses/analyses.py | capdragon/cannlytics | 47eeda80b1faf54d709def3641d9476501508fec | [
"MIT"
] | null | null | null | """
Analyses Views | Cannlytics API
Created: 4/21/2021
API to interface with cannabis regulation information.
"""
from rest_framework import status
from rest_framework.decorators import api_view
from rest_framework.response import Response
@api_view(['GET', 'POST', 'DELETE'])
def analyses(request, format=None):
"""Get, create, or update information about cannabis analyses."""
if request.method == 'GET':
# TODO: Implement filters!
# data = get_collection(f"labs/{org_id}/analyses")
return Response({'error': 'not_implemented'}, content_type='application/json')
elif request.method == 'POST':
return Response({'error': 'not_implemented'}, content_type='application/json')
elif request.method == 'DELETE':
return Response({'error': 'not_implemented'}, content_type='application/json')
@api_view(['GET', 'POST', 'DELETE'])
def analytes(request, format=None):
"""Get, create, or update information about cannabis analysis analytes."""
if request.method == 'GET':
return Response({'error': 'not_implemented'}, content_type='application/json')
elif request.method == 'POST':
return Response({'error': 'not_implemented'}, content_type='application/json')
elif request.method == 'DELETE':
return Response({'error': 'not_implemented'}, content_type='application/json')
| 30.555556 | 86 | 0.690909 | 159 | 1,375 | 5.849057 | 0.345912 | 0.083871 | 0.122581 | 0.141935 | 0.649462 | 0.649462 | 0.6 | 0.6 | 0.6 | 0.6 | 0 | 0.006087 | 0.163636 | 1,375 | 44 | 87 | 31.25 | 0.802609 | 0.225455 | 0 | 0.736842 | 0 | 0 | 0.256214 | 0 | 0 | 0 | 0 | 0.022727 | 0 | 1 | 0.105263 | false | 0 | 0.157895 | 0 | 0.578947 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3 |
217866a576361526a8d13c0ad771761199c4b595 | 712 | py | Python | algo-grave.py | bcgreen24/ten-lines-or-less | 7a34ff7d7222fd3946e9cbb418afc992bc84e5e5 | [
"MIT"
] | 44 | 2018-08-15T08:32:43.000Z | 2022-02-15T20:25:03.000Z | algo-grave.py | bcgreen24/ten-lines-or-less | 7a34ff7d7222fd3946e9cbb418afc992bc84e5e5 | [
"MIT"
] | null | null | null | algo-grave.py | bcgreen24/ten-lines-or-less | 7a34ff7d7222fd3946e9cbb418afc992bc84e5e5 | [
"MIT"
] | 7 | 2018-09-08T20:05:58.000Z | 2021-11-22T12:46:15.000Z | Clock.bpm=144; Scale.default="lydianMinor"
d1 >> play("x-o{-[-(-o)]}", sample=0).every([28,4], "trim", 3)
d2 >> play("(X )( X)N{ xv[nX]}", drive=0.2, lpf=var([0,40],[28,4]), rate=PStep(P[5:8],[-1,-2],1)).sometimes("sample.offadd", 1, 0.75)
d3 >> play("e", amp=var([0,1],[PRand(8,16)/2,1.5]), dur=PRand([1/2,1/4]), pan=var([-1,1],2))
c1 >> play("#", dur=32, room=1, amp=2).spread()
var.switch = var([0,1],[32])
p1 >> karp(dur=1/4, rate=PWhite(40), pan=PWhite(-1,1), amplify=var.switch, amp=1, room=0.5)
p2 >> sawbass(var([0,1,5,var([4,6],[14,2])],1), dur=PDur(3,8), cutoff=4000, sus=1/2, amplify=var.switch)
p3 >> glass(oct=6, rate=linvar([-2,2],16), shape=0.5, amp=1.5, amplify=var([0,var.switch],64), room=0.5)
| 71.2 | 133 | 0.580056 | 155 | 712 | 2.664516 | 0.419355 | 0.048426 | 0.03632 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.145038 | 0.080056 | 712 | 9 | 134 | 79.111111 | 0.485496 | 0 | 0 | 0 | 0 | 0 | 0.085674 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
217f0e3eccdc307d3d3f3bd3ab150b392da4a088 | 136 | py | Python | bot/credentials_template.py | stanleykao72/Deepfake-Detection | 417de0a0c7756397cf3a611b26008b7ed64727e9 | [
"Apache-2.0"
] | 1 | 2020-09-30T09:33:28.000Z | 2020-09-30T09:33:28.000Z | bot/credentials_template.py | stanleykao72/Deepfake-Detection | 417de0a0c7756397cf3a611b26008b7ed64727e9 | [
"Apache-2.0"
] | null | null | null | bot/credentials_template.py | stanleykao72/Deepfake-Detection | 417de0a0c7756397cf3a611b26008b7ed64727e9 | [
"Apache-2.0"
] | null | null | null | import os
bot_token = '1168941932:XXGiYEV79cjssoQX_rZ5IwE4nbFhliKlh5M'
bot_user_name = 'xxx_bot'
URL = "https://cf45064e05ed.ngrok.io"
| 22.666667 | 60 | 0.801471 | 17 | 136 | 6.117647 | 0.882353 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.177419 | 0.088235 | 136 | 5 | 61 | 27.2 | 0.66129 | 0 | 0 | 0 | 0 | 0 | 0.602941 | 0.338235 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.25 | 0 | 0.25 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
2182051e14a8401743524d6ab0d1f557a1bde734 | 33 | py | Python | debug.py | andrewtremblay/game-linkage | b7ef3f433cff68aee8f425c4575f2cc251c57064 | [
"Apache-2.0"
] | null | null | null | debug.py | andrewtremblay/game-linkage | b7ef3f433cff68aee8f425c4575f2cc251c57064 | [
"Apache-2.0"
] | null | null | null | debug.py | andrewtremblay/game-linkage | b7ef3f433cff68aee8f425c4575f2cc251c57064 | [
"Apache-2.0"
] | null | null | null | hide_native_cursor = False #True
| 16.5 | 32 | 0.818182 | 5 | 33 | 5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.121212 | 33 | 1 | 33 | 33 | 0.862069 | 0.121212 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
21a961f1700602ed46e95f0a1130b3d95c12010f | 1,027 | py | Python | resolwe/flow/views/__init__.py | plojyon/resolwe | 1bee6f0860fdd087534adf1680e9350d79ab97cf | [
"Apache-2.0"
] | 27 | 2015-12-07T18:29:12.000Z | 2022-03-16T08:01:47.000Z | resolwe/flow/views/__init__.py | plojyon/resolwe | 1bee6f0860fdd087534adf1680e9350d79ab97cf | [
"Apache-2.0"
] | 681 | 2015-12-01T11:52:24.000Z | 2022-03-21T07:43:37.000Z | resolwe/flow/views/__init__.py | plojyon/resolwe | 1bee6f0860fdd087534adf1680e9350d79ab97cf | [
"Apache-2.0"
] | 28 | 2015-12-01T08:32:57.000Z | 2021-12-14T00:04:16.000Z | """.. Ignore pydocstyle D400.
==========
Flow Views
==========
.. autoclass:: resolwe.flow.views.collection.CollectionViewSet
:members:
.. autoclass:: resolwe.flow.views.data.DataViewSet
:members:
.. autoclass:: resolwe.flow.views.descriptor.DescriptorSchemaViewSet
:members:
.. autoclass:: resolwe.flow.views.entity.EntityViewSet
:members:
.. autoclass:: resolwe.flow.views.process.ProcessViewSet
:members:
.. autoclass:: resolwe.flow.views.relation.RelationViewSet
:members:
.. autoclass:: resolwe.flow.views.storage.StorageViewSet
:members:
"""
from .collection import CollectionViewSet
from .data import DataViewSet
from .descriptor import DescriptorSchemaViewSet
from .entity import EntityViewSet
from .process import ProcessViewSet
from .relation import RelationViewSet
from .storage import StorageViewSet
__all__ = (
"CollectionViewSet",
"DataViewSet",
"DescriptorSchemaViewSet",
"EntityViewSet",
"ProcessViewSet",
"RelationViewSet",
"StorageViewSet",
)
| 22.326087 | 68 | 0.735151 | 90 | 1,027 | 8.344444 | 0.277778 | 0.095872 | 0.186418 | 0.233023 | 0.255659 | 0 | 0 | 0 | 0 | 0 | 0 | 0.00339 | 0.138267 | 1,027 | 45 | 69 | 22.822222 | 0.845198 | 0.560857 | 0 | 0 | 0 | 0 | 0.241535 | 0.051919 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.4375 | 0 | 0.4375 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
21ab7b5c543e49cf59fea2226a38a076def48564 | 814 | py | Python | gaz/lpg/models.py | aafedotov/lpg | ee3eb015e6c5ccf01a3114c35d1c0b127d5570ea | [
"MIT"
] | null | null | null | gaz/lpg/models.py | aafedotov/lpg | ee3eb015e6c5ccf01a3114c35d1c0b127d5570ea | [
"MIT"
] | null | null | null | gaz/lpg/models.py | aafedotov/lpg | ee3eb015e6c5ccf01a3114c35d1c0b127d5570ea | [
"MIT"
] | null | null | null | from django.db import models
import os
class Lpg(models.Model):
date = models.DateTimeField()
price = models.FloatField()
volume = models.FloatField()
benz_price = models.FloatField()
cost = models.FloatField()
mileage = models.FloatField()
mileage_total = models.FloatField()
consump = models.FloatField()
saving = models.FloatField()
maintenance = models.IntegerField(blank=True, default=0)
lpg_maintenance = models.IntegerField(blank=True, default=0)
class Meta:
ordering = ['-date']
def __str__(self):
return str(self.date.date())
class File(models.Model):
file = models.FileField(upload_to='')
def filename(self):
return os.path.basename(self.file.name)
def __str__(self):
return self.filename() | 23.941176 | 64 | 0.662162 | 92 | 814 | 5.728261 | 0.434783 | 0.242884 | 0.079696 | 0.129032 | 0.174573 | 0.174573 | 0.174573 | 0 | 0 | 0 | 0 | 0.003145 | 0.218673 | 814 | 34 | 65 | 23.941176 | 0.825472 | 0 | 0 | 0.083333 | 0 | 0 | 0.006135 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.125 | false | 0 | 0.083333 | 0.125 | 0.958333 | 0 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
21ad90b72ec41af156af000c9948419be81a478a | 80 | py | Python | apps/fithm-gateway/libs/exceptions.py | sergio1221/flask-backend | 11a9e0db5b5e664fcc820919d97039738176ac62 | [
"BSD-3-Clause"
] | 3 | 2022-03-04T03:05:55.000Z | 2022-03-04T09:02:32.000Z | apps/fithm-gateway/libs/exceptions.py | sergio1221/flask-backend | 11a9e0db5b5e664fcc820919d97039738176ac62 | [
"BSD-3-Clause"
] | null | null | null | apps/fithm-gateway/libs/exceptions.py | sergio1221/flask-backend | 11a9e0db5b5e664fcc820919d97039738176ac62 | [
"BSD-3-Clause"
] | null | null | null | from werkzeug.exceptions import BadRequest
Http_400_BadRequest = BadRequest
| 20 | 43 | 0.8375 | 9 | 80 | 7.222222 | 0.777778 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.043478 | 0.1375 | 80 | 3 | 44 | 26.666667 | 0.898551 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
21b877126c1f6c0c9851f58312d99e755f641028 | 344 | py | Python | rightarrow/enforce.py | wuzzeb/python-rightarrow | bc26059d272e4a903fa2a18db9ebb484e7f74aed | [
"Apache-2.0"
] | 1 | 2020-04-30T22:24:41.000Z | 2020-04-30T22:24:41.000Z | rightarrow/enforce.py | wuzzeb/python-rightarrow | bc26059d272e4a903fa2a18db9ebb484e7f74aed | [
"Apache-2.0"
] | null | null | null | rightarrow/enforce.py | wuzzeb/python-rightarrow | bc26059d272e4a903fa2a18db9ebb484e7f74aed | [
"Apache-2.0"
] | null | null | null |
from rightarrow.parser import Parser
def check(ty, val):
"Checks that `val` adheres to type `ty`"
if isinstance(ty, basestring):
ty = Parser().parse(ty)
return ty.enforce(val)
def guard(ty):
"A decorator that wraps a function so it the type passed is enforced via `check`"
return lambda f: check(ty, f)
| 22.933333 | 85 | 0.651163 | 52 | 344 | 4.307692 | 0.634615 | 0.0625 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.247093 | 344 | 14 | 86 | 24.571429 | 0.864865 | 0.343023 | 0 | 0 | 0 | 0 | 0.341108 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.222222 | false | 0.111111 | 0.111111 | 0 | 0.555556 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 3 |
21c22c252f9293d6166a6c3ca0cfe32490ca1342 | 1,888 | py | Python | ssm/init_state_distns.py | adelaneh/ssm | 0e8ef2619eae1cdd0f884f1437f2c990251038d7 | [
"MIT"
] | 208 | 2018-06-14T16:20:11.000Z | 2020-08-18T01:13:46.000Z | ssm/init_state_distns.py | adelaneh/ssm | 0e8ef2619eae1cdd0f884f1437f2c990251038d7 | [
"MIT"
] | 82 | 2018-06-28T15:15:41.000Z | 2020-07-30T15:00:46.000Z | ssm/init_state_distns.py | adelaneh/ssm | 0e8ef2619eae1cdd0f884f1437f2c990251038d7 | [
"MIT"
] | 83 | 2018-06-28T22:23:27.000Z | 2020-10-02T19:27:53.000Z | from functools import partial
from warnings import warn
import autograd.numpy as np
import autograd.numpy.random as npr
from autograd.scipy.special import logsumexp
from autograd.misc.optimizers import sgd, adam
from autograd import grad
from ssm.util import ensure_args_are_lists
class InitialStateDistribution(object):
def __init__(self, K, D, M=0):
self.K, self.D, self.M = K, D, M
self.log_pi0 = -np.log(K) * np.ones(K)
@property
def params(self):
return (self.log_pi0,)
@params.setter
def params(self, value):
self.log_pi0 = value[0]
@property
def initial_state_distn(self):
return np.exp(self.log_pi0 - logsumexp(self.log_pi0))
@property
def log_initial_state_distn(self):
return self.log_pi0 - logsumexp(self.log_pi0)
@ensure_args_are_lists
def initialize(self, datas, inputs=None, masks=None, tags=None):
pass
def permute(self, perm):
"""
Permute the discrete latent states.
"""
self.log_pi0 = self.log_pi0[perm]
def log_prior(self):
return 0
def m_step(self, expectations, datas, inputs, masks, tags, **kwargs):
pi0 = sum([Ez[0] for Ez, _, _ in expectations]) + 1e-8
self.log_pi0 = np.log(pi0 / pi0.sum())
class FixedInitialStateDistribution(InitialStateDistribution):
def __init__(self, K, D, pi0=None, M=0):
super(FixedInitialStateDistribution, self).__init__(K, D, M=M)
if pi0 is not None:
# Handle the case where user passes a numpy array of (K, 1) instead of (K,)
pi0 = np.squeeze(np.array(pi0))
assert len(pi0) == K, "Array passed as pi0 is of the wrong length"
self.log_pi0 = np.log(pi0 + 1e-16)
def m_step(self, expectations, datas, inputs, masks, tags, **kwargs):
# Don't change the distribution
pass | 30.451613 | 87 | 0.648305 | 270 | 1,888 | 4.388889 | 0.359259 | 0.065823 | 0.092827 | 0.03038 | 0.260759 | 0.163713 | 0.133333 | 0.084388 | 0.084388 | 0.084388 | 0 | 0.022472 | 0.245763 | 1,888 | 62 | 88 | 30.451613 | 0.809691 | 0.074153 | 0 | 0.162791 | 0 | 0 | 0.024362 | 0 | 0 | 0 | 0 | 0 | 0.023256 | 1 | 0.255814 | false | 0.069767 | 0.186047 | 0.093023 | 0.581395 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 3 |
21c4efefc7b5ce36cd0fc119863a360c0f7f77e0 | 405 | py | Python | farm_ecomm/orders/models.py | SumeetSanwal/Farmer-Ecomm | 021e79e1129a23d12970538451407a52bfe7938d | [
"MIT"
] | null | null | null | farm_ecomm/orders/models.py | SumeetSanwal/Farmer-Ecomm | 021e79e1129a23d12970538451407a52bfe7938d | [
"MIT"
] | null | null | null | farm_ecomm/orders/models.py | SumeetSanwal/Farmer-Ecomm | 021e79e1129a23d12970538451407a52bfe7938d | [
"MIT"
] | null | null | null | from django.db import models
# Create your models here.
class Order(models.Model):
name=models.CharField(max_length=30)
phone=models.CharField(max_length=10)
qty=models.CharField(max_length=3)
address=models.CharField(max_length=30)
pin=models.CharField(max_length=10)
day=models.DateField()
product=models.CharField(max_length=30)
class Meta:
db_table="myorders" | 28.928571 | 43 | 0.735802 | 57 | 405 | 5.105263 | 0.491228 | 0.309278 | 0.371134 | 0.494845 | 0.446735 | 0 | 0 | 0 | 0 | 0 | 0 | 0.03207 | 0.153086 | 405 | 14 | 44 | 28.928571 | 0.816327 | 0.059259 | 0 | 0 | 0 | 0 | 0.021053 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.090909 | 0 | 0.909091 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
21c5a0d877b9ea5b0aec8dcdbfeac7309ad9d58f | 1,132 | py | Python | pydfs_lineup_optimizer/sites/draftkings/showdown/settings.py | BenikaH/pydfs-lineup-optimizer | 20dd39dfb738b8eb114c012a1d455c201da60400 | [
"MIT"
] | null | null | null | pydfs_lineup_optimizer/sites/draftkings/showdown/settings.py | BenikaH/pydfs-lineup-optimizer | 20dd39dfb738b8eb114c012a1d455c201da60400 | [
"MIT"
] | null | null | null | pydfs_lineup_optimizer/sites/draftkings/showdown/settings.py | BenikaH/pydfs-lineup-optimizer | 20dd39dfb738b8eb114c012a1d455c201da60400 | [
"MIT"
] | null | null | null | from pydfs_lineup_optimizer.settings import BaseSettings, LineupPosition
from pydfs_lineup_optimizer.constants import Sport, Site
from pydfs_lineup_optimizer.sites.sites_registry import SitesRegistry
from pydfs_lineup_optimizer.sites.draftkings.showdown.importer import DraftKingsShowdownGolfModeCSVImporter
POSITIONS = [
LineupPosition('G', ('G',)),
LineupPosition('G', ('G',)),
LineupPosition('G', ('G',)),
LineupPosition('G', ('G',)),
LineupPosition('G', ('G',)),
LineupPosition('G', ('G',)),
]
class DraftKingsShowdownGolfModeSettings(BaseSettings):
site = Site.DRAFTKINGS_SHOWDOWN_GOLF
budget = 50000
max_from_one_team = 6
csv_importer = DraftKingsShowdownGolfModeCSVImporter
positions = [
LineupPosition('G', ('G',)),
LineupPosition('G', ('G',)),
LineupPosition('G', ('G',)),
LineupPosition('G', ('G',)),
LineupPosition('G', ('G',)),
LineupPosition('G', ('G',)),
]
@SitesRegistry.register_settings
class DraftKingsShowdownGolfSettings(DraftKingsShowdownGolfModeSettings):
sport = Sport.GOLF
positions = POSITIONS[:]
| 31.444444 | 107 | 0.690813 | 102 | 1,132 | 7.509804 | 0.313725 | 0.234987 | 0.250653 | 0.391645 | 0.446475 | 0.370757 | 0.370757 | 0.370757 | 0.370757 | 0.370757 | 0 | 0.006322 | 0.161661 | 1,132 | 35 | 108 | 32.342857 | 0.800843 | 0 | 0 | 0.413793 | 0 | 0 | 0.021201 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.172414 | 0 | 0.482759 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
21cd8e3e4efaef5b184e48ac3e2c48f9b1b2f8c3 | 1,615 | py | Python | Magic_Square.py | Sandeep6262/Logical-questions-in-python | 2923a615622090fdb23699c7301d44c2975fec36 | [
"MIT"
] | null | null | null | Magic_Square.py | Sandeep6262/Logical-questions-in-python | 2923a615622090fdb23699c7301d44c2975fec36 | [
"MIT"
] | null | null | null | Magic_Square.py | Sandeep6262/Logical-questions-in-python | 2923a615622090fdb23699c7301d44c2975fec36 | [
"MIT"
] | null | null | null | magic_square = [
[8, 3, 4],
[1, 5, 9],
[6, 7, 2]
]
print("Row")
print(magic_square[0][0]+magic_square[0][1]+magic_square[0][2])
print(magic_square[1][0]+magic_square[1][1]+magic_square[1][2])
print(magic_square[2][0]+magic_square[2][1]+magic_square[2][2])
print("colume")
print(magic_square[0][0]+magic_square[1][0]+magic_square[2][0])
print(magic_square[0][1]+magic_square[1][1]+magic_square[2][1])
print(magic_square[0][2]+magic_square[1][2]+magic_square[2][2])
print("diagonals")
print(magic_square[0][0]+magic_square[1][1]+magic_square[2][2])
print(magic_square[0][2]+magic_square[1][1]+magic_square[2][0])
# magic_square = [
# [8, 3, 4],
# [1, 5, 9],
# [6, 7, 2]
# ]
# total = 0
# for i in magic_square:
# sum_1 = 0
# for j in i:
# sum_1+=j
# # print(sum_1)
# total+=sum_1
# if total % sum_1 == 0:
# m = True
# # print(m)
# m = sum_1
# sec_total = 0
# for y in range(len(magic_square)):
# add = 0
# for i in magic_square:
# for j in range(len(i)):
# if j == y:
# a=i[j]
# # print(a)
# add+=a
# # print(add)
# sec_total+=add
# # print(sec_total)
# # print(add)
# if sec_total%add==0:
# n = True
# # print(n)
# n=add
# ples=0
# add=0
# y=0
# o=2
# for i in magic_square:
# for j in range(len(i)):
# if j == y:
# b=i[y]
# y+=1
# # print(b)
# ples+=b
# break
# # print(ples)
# for i in magic_square:
# for j in range(len(i)):
# if j == o:
# c=i[o]
# add+=c
# o-=1
# # print(c)
# break
# # print(add)
# if add==ples and add==m and m==n:
# print("magic_square hai")
# else:
# print("magic_square nahi hai")
| 18.77907 | 63 | 0.569659 | 300 | 1,615 | 2.923333 | 0.136667 | 0.413911 | 0.18244 | 0.116306 | 0.574686 | 0.554162 | 0.424173 | 0.304447 | 0.167617 | 0.167617 | 0 | 0.065574 | 0.206811 | 1,615 | 85 | 64 | 19 | 0.619048 | 0.525697 | 0 | 0 | 0 | 0 | 0.026012 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.6875 | 0 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 3 |
21d680533a4be44e6732c40401a607d45ad605dc | 188 | py | Python | 0x0A-python-inheritance/6-base_geometry.py | ricardo1470/holbertonschool-higher_level_programming | aab73c8efee665b0215958ee7b338871f13634bc | [
"CNRI-Python"
] | null | null | null | 0x0A-python-inheritance/6-base_geometry.py | ricardo1470/holbertonschool-higher_level_programming | aab73c8efee665b0215958ee7b338871f13634bc | [
"CNRI-Python"
] | null | null | null | 0x0A-python-inheritance/6-base_geometry.py | ricardo1470/holbertonschool-higher_level_programming | aab73c8efee665b0215958ee7b338871f13634bc | [
"CNRI-Python"
] | null | null | null | #!/usr/bin/python3
"""a class empty"""
class BaseGeometry():
"""create class"""
pass
def area(self):
"""area"""
raise Exception("area() is not implemented")
| 15.666667 | 52 | 0.558511 | 21 | 188 | 5 | 0.809524 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.007143 | 0.255319 | 188 | 11 | 53 | 17.090909 | 0.742857 | 0.260638 | 0 | 0 | 0 | 0 | 0.203252 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0.25 | 0 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 3 |
21da228590fc9fc17ae581924abaf6a76cdb4469 | 828 | py | Python | control_demo.py | Alinamoo/SODD | 5d0dc01927f8f9dced6eb9e67f7da82e0bf01761 | [
"MIT"
] | null | null | null | control_demo.py | Alinamoo/SODD | 5d0dc01927f8f9dced6eb9e67f7da82e0bf01761 | [
"MIT"
] | null | null | null | control_demo.py | Alinamoo/SODD | 5d0dc01927f8f9dced6eb9e67f7da82e0bf01761 | [
"MIT"
] | null | null | null | from djitellopy import Tello
import time
tello = Tello()
tello.connect()
user_input = ' '
while user_input != 'x':
user_input = input()
if user_input == 't':
print("takeoff")
tello.takeoff()
if user_input == 'l':
print("land")
tello.land()
if user_input == 'a':
print("left")
tello.move_left(30)
if user_input == 'w':
print("forward")
tello.move_forward(30)
if user_input == 'd':
print("right")
tello.move_right(30)
if user_input == 's':
print("back")
tello.move_back(30)
if user_input == 'e':
print("up")
tello.move_up(30)
if user_input == 'q':
print("down")
tello.move_down(30)
print("exit")
| 19.714286 | 31 | 0.491546 | 97 | 828 | 4.020619 | 0.319588 | 0.253846 | 0.225641 | 0.166667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.022901 | 0.36715 | 828 | 41 | 32 | 20.195122 | 0.721374 | 0 | 0 | 0 | 0 | 0 | 0.064803 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.0625 | 0 | 0.0625 | 0.28125 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
21e04da272da6204e5721ac0e715c76af39b9c45 | 453 | py | Python | day14.py | dos1/AoC21 | 9095b96b831aac76cb9f0ce06e3f639db2da3977 | [
"MIT"
] | null | null | null | day14.py | dos1/AoC21 | 9095b96b831aac76cb9f0ce06e3f639db2da3977 | [
"MIT"
] | null | null | null | day14.py | dos1/AoC21 | 9095b96b831aac76cb9f0ce06e3f639db2da3977 | [
"MIT"
] | null | null | null | def I(d,i,v):d[i]=d.setdefault(i,0)+v
L=open("inputday14").readlines();t,d,p=L[0],dict([l.strip().split(' -> ')for l in L[2:]]),{};[I(p,t[i:i+2],1)for i in range(len(t)-2)]
def E(P):o=dict(P);[(I(P,p,-o[p]),I(P,p[0]+n,o[p]),I(P,n+p[1],o[p]))for p,n in d.items()if p in o.keys()];return P
def C(P):e={};[I(e,c,v)for p,v in P.items()for c in p];return{x:-int(e[x]/2//-1)for x in e}
print((r:=[max(e:=C(E(p)).values())-min(e)for i in range(40)])[9],r[-1])
| 75.5 | 134 | 0.547461 | 129 | 453 | 1.922481 | 0.294574 | 0.032258 | 0.03629 | 0.08871 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.038278 | 0.077263 | 453 | 5 | 135 | 90.6 | 0.555024 | 0 | 0 | 0 | 0 | 0 | 0.030905 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.6 | false | 0 | 0 | 0 | 0.6 | 0.2 | 0 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
21f53aba046b659c91bf763398dadb13c3006f7a | 82 | py | Python | 2017.TensorFlow&Python/2.python_syntax/test10.py | primetong/LearningCollectionOfWitt | a15dc8ac80618a3995c2b930c634b87ed8f1f0af | [
"MIT"
] | null | null | null | 2017.TensorFlow&Python/2.python_syntax/test10.py | primetong/LearningCollectionOfWitt | a15dc8ac80618a3995c2b930c634b87ed8f1f0af | [
"MIT"
] | 14 | 2020-06-30T20:52:56.000Z | 2022-03-02T14:53:18.000Z | 2017.TensorFlow&Python/2.python_syntax/test10.py | primetong/LearningCollectionOfWitt | a15dc8ac80618a3995c2b930c634b87ed8f1f0af | [
"MIT"
] | null | null | null | import os
a = os.path.abspath('.')
for filename in os.listdir(a):
print filename
| 16.4 | 30 | 0.707317 | 14 | 82 | 4.142857 | 0.714286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.146341 | 82 | 4 | 31 | 20.5 | 0.828571 | 0 | 0 | 0 | 0 | 0 | 0.012195 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.25 | null | null | 0.25 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
0dfe026616e5a537c4c4e00665aa901d409c2565 | 138 | py | Python | eastbot/__init__.py | nexusz99/eastpot_slackbot | d7e67abf6f722cdcd06a39d4f6d89d920d7f2e25 | [
"Apache-2.0"
] | null | null | null | eastbot/__init__.py | nexusz99/eastpot_slackbot | d7e67abf6f722cdcd06a39d4f6d89d920d7f2e25 | [
"Apache-2.0"
] | null | null | null | eastbot/__init__.py | nexusz99/eastpot_slackbot | d7e67abf6f722cdcd06a39d4f6d89d920d7f2e25 | [
"Apache-2.0"
] | null | null | null | from apscheduler.schedulers.background import BackgroundScheduler
from slackbot.bot import Bot
sched = BackgroundScheduler()
bot = Bot() | 23 | 65 | 0.826087 | 15 | 138 | 7.6 | 0.6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.108696 | 138 | 6 | 66 | 23 | 0.926829 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
df2082c8994361a6c2e1ea094b2e6bff4292282e | 1,548 | py | Python | NoteBooks/Curso de Python/Python/Examples/High_Patterns/Patrones de diseño/Estructurales/Adapter.py | Alejandro-sin/Learning_Notebooks | 161d6bed4c7b1d171b45f61c0cc6fa91e9894aad | [
"MIT"
] | 1 | 2021-02-26T13:12:22.000Z | 2021-02-26T13:12:22.000Z | NoteBooks/Curso de Python/Python/Examples/High_Patterns/Patrones de diseño/Estructurales/Adapter.py | Alejandro-sin/Learning_Notebooks | 161d6bed4c7b1d171b45f61c0cc6fa91e9894aad | [
"MIT"
] | null | null | null | NoteBooks/Curso de Python/Python/Examples/High_Patterns/Patrones de diseño/Estructurales/Adapter.py | Alejandro-sin/Learning_Notebooks | 161d6bed4c7b1d171b45f61c0cc6fa91e9894aad | [
"MIT"
] | null | null | null | '''
Este snipet tiene como propósito revisar lso conceptos el patrón de diseño adaptador.
'''
class Korean:
def __ini__(self):
self.name ="Korean"
def speak_korean(self):
return "An-neyong?"
class British:
'''English spear'''
def __init__(self):
self.name ="British"
def speak_english(self):
return 'How are you?'
class Adapter:
'''Esto cambia el nomre del método genérico a nombres indiviudales'''
def __init__(self, object, **adapted_method):
'''Cambia el nombre del méotodo
Añade un diccionario que establece el mapeo entre un método genérico speak() y un méotod concreto
Recibe la palabra reservada object cualquiera instancia que recive
'''
self._object = object
# Aceptará un diccionario , la llave será el nombre dle metodo
# El valor será el nombre individualziado del método
self.__dict__.update(**adapted_method)
def __getattr__(self,attr):
'''Retorna el resto de los atributos'''
return getattr(self._object,attr)
if __name__ =='__main__':
# Lista para almacenar los objetos speaker
objects =[]
#Creo objeto korea
korean = Korean()
british = British()
# Hago un append en lal lista
objects.append(Adapter(korean, speak=korean.speak_korean))
objects.append(Adapter(british, speak=british.speak_english))
print(objects[0].__dict__)
""" for obj in objects:
print("{} says `{}` \n".format(obj.name, obj.speak()))
""" | 24.571429 | 105 | 0.649871 | 190 | 1,548 | 5.084211 | 0.526316 | 0.034161 | 0.024845 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.000863 | 0.251292 | 1,548 | 63 | 106 | 24.571429 | 0.832614 | 0.381783 | 0 | 0 | 0 | 0 | 0.053885 | 0 | 0 | 0 | 0 | 0.047619 | 0 | 1 | 0.26087 | false | 0 | 0 | 0.086957 | 0.521739 | 0.043478 | 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 | 0 | 0 | 0 | 1 | 0 | 0 | 3 |
df2c7d0bb93d126d91f0e1f6dc37cb5f7855e990 | 82 | py | Python | pygamebook/SourceCode_PyGame/File Input Output/readmyself_rstrip.py | satrapade/sofia | f8903eb48a88eb9575823b4fe9f61435b882cdd4 | [
"MIT"
] | null | null | null | pygamebook/SourceCode_PyGame/File Input Output/readmyself_rstrip.py | satrapade/sofia | f8903eb48a88eb9575823b4fe9f61435b882cdd4 | [
"MIT"
] | 9 | 2018-06-18T11:17:44.000Z | 2018-06-19T21:00:48.000Z | pygamebook/SourceCode_PyGame/File Input Output/readmyself_rstrip.py | satrapade/sofia | f8903eb48a88eb9575823b4fe9f61435b882cdd4 | [
"MIT"
] | null | null | null | import os
f = open('readmyself.py', 'r')
for line in f:
print line,
f.close() | 13.666667 | 30 | 0.621951 | 15 | 82 | 3.4 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.207317 | 82 | 6 | 31 | 13.666667 | 0.784615 | 0 | 0 | 0 | 0 | 0 | 0.168675 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.2 | null | null | 0.2 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
df507194a9b78951826034e5e5ad1e47787f90be | 1,345 | py | Python | sysinv/cgts-client/cgts-client/cgtsclient/v1/iextoam.py | etaivan/stx-config | 281e1f110973f96e077645fb01f67b646fc253cc | [
"Apache-2.0"
] | 10 | 2020-02-07T18:57:44.000Z | 2021-09-11T10:29:34.000Z | sysinv/cgts-client/cgts-client/cgtsclient/v1/iextoam.py | etaivan/stx-config | 281e1f110973f96e077645fb01f67b646fc253cc | [
"Apache-2.0"
] | 1 | 2021-01-14T12:01:55.000Z | 2021-01-14T12:01:55.000Z | sysinv/cgts-client/cgts-client/cgtsclient/v1/iextoam.py | etaivan/stx-config | 281e1f110973f96e077645fb01f67b646fc253cc | [
"Apache-2.0"
] | 10 | 2020-10-13T08:37:46.000Z | 2022-02-09T00:21:25.000Z | #
# Copyright (c) 2013-2014 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
# -*- encoding: utf-8 -*-
#
from cgtsclient.common import base
from cgtsclient import exc
CREATION_ATTRIBUTES = ['extoamservers', 'forisystemid']
class iextoam(base.Resource):
def __repr__(self):
return "<iextoam %s>" % self._info
class iextoamManager(base.Manager):
resource_class = iextoam
@staticmethod
def _path(id=None):
return '/v1/iextoam/%s' % id if id else '/v1/iextoam'
def list(self):
return self._list(self._path(), "iextoams")
def get(self, iextoam_id):
try:
return self._list(self._path(iextoam_id))[0]
except IndexError:
return None
def create(self, **kwargs):
# path = '/v1/iextoam'
new = {}
for (key, value) in kwargs.items():
if key in CREATION_ATTRIBUTES:
new[key] = value
else:
raise exc.InvalidAttribute('%s' % key)
return self._create(self._path(), new)
def delete(self, iextoam_id):
# path = '/v1/iextoam/%s' % iextoam_id
return self._delete(self._path(iextoam_id))
def update(self, iextoam_id, patch):
# path = '/v1/iextoam/%s' % iextoam_id
return self._update(self._path(iextoam_id), patch)
| 24.454545 | 61 | 0.601487 | 163 | 1,345 | 4.797546 | 0.392638 | 0.092072 | 0.038363 | 0.065217 | 0.140665 | 0.084399 | 0.084399 | 0.084399 | 0 | 0 | 0 | 0.017259 | 0.267658 | 1,345 | 54 | 62 | 24.907407 | 0.77665 | 0.150929 | 0 | 0 | 0 | 0 | 0.06366 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.233333 | false | 0 | 0.066667 | 0.166667 | 0.666667 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
df831b720e11ab51a02a48d1e4db6e52906f815e | 885 | py | Python | alerter/src/monitorables/nodes/node.py | SimplyVC/panic | 2f5c327ea0d14b6a49dc8f4599a255048bc2ff6d | [
"Apache-2.0"
] | 41 | 2019-08-23T12:40:42.000Z | 2022-03-28T11:06:02.000Z | alerter/src/monitorables/nodes/node.py | SimplyVC/panic | 2f5c327ea0d14b6a49dc8f4599a255048bc2ff6d | [
"Apache-2.0"
] | 147 | 2019-08-30T22:09:48.000Z | 2022-03-30T08:46:26.000Z | alerter/src/monitorables/nodes/node.py | SimplyVC/panic | 2f5c327ea0d14b6a49dc8f4599a255048bc2ff6d | [
"Apache-2.0"
] | 3 | 2019-09-03T21:12:28.000Z | 2021-08-18T14:27:56.000Z | from abc import abstractmethod, ABC
from typing import Any
class Node(ABC):
def __init__(self, node_name: str, node_id: str, parent_id: str) -> None:
self._node_name = node_name
self._node_id = node_id
self._parent_id = parent_id
def __str__(self) -> str:
return self._node_name
def __eq__(self, other: Any) -> bool:
return self.__dict__ == other.__dict__
@property
def node_name(self) -> str:
return self._node_name
@property
def node_id(self) -> str:
return self._node_id
@property
def parent_id(self) -> str:
return self._parent_id
def set_node_name(self, node_name: str) -> None:
self._node_name = node_name
def set_parent_id(self, parent_id: str) -> None:
self._parent_id = parent_id
@abstractmethod
def reset(self) -> None:
pass
| 23.289474 | 77 | 0.633898 | 123 | 885 | 4.113821 | 0.203252 | 0.158103 | 0.142292 | 0.134387 | 0.413043 | 0.205534 | 0.106719 | 0 | 0 | 0 | 0 | 0 | 0.272316 | 885 | 37 | 78 | 23.918919 | 0.785714 | 0 | 0 | 0.333333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0.037037 | 0.074074 | 0.185185 | 0.62963 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
10c31cb94a752244b1e3c2554ce2f87592641186 | 177 | py | Python | sak_sql/setup.py | lodrion/sak | 1ab2b151cb61688696dbc0c432420350136ba9ad | [
"MIT"
] | null | null | null | sak_sql/setup.py | lodrion/sak | 1ab2b151cb61688696dbc0c432420350136ba9ad | [
"MIT"
] | null | null | null | sak_sql/setup.py | lodrion/sak | 1ab2b151cb61688696dbc0c432420350136ba9ad | [
"MIT"
] | null | null | null | from setuptools import find_packages, setup
setup(
name='sak-sql',
version='0.0.1',
packages=find_packages(),
install_requires=[
"sqlalchemy"
],
)
| 14.75 | 43 | 0.621469 | 20 | 177 | 5.35 | 0.75 | 0.224299 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.022388 | 0.242938 | 177 | 11 | 44 | 16.090909 | 0.776119 | 0 | 0 | 0 | 0 | 0 | 0.124294 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.111111 | 0 | 0.111111 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
10c50aaff57ece032b6b4157ee1e3745167966b6 | 1,418 | py | Python | floyd_warshall.py | sara-02/dsa_sg | 7c34b17772db728419070d35664ad75c67645b1e | [
"MIT"
] | null | null | null | floyd_warshall.py | sara-02/dsa_sg | 7c34b17772db728419070d35664ad75c67645b1e | [
"MIT"
] | null | null | null | floyd_warshall.py | sara-02/dsa_sg | 7c34b17772db728419070d35664ad75c67645b1e | [
"MIT"
] | null | null | null | INF = 999999
class FloydWarshall(object):
def __init__(self, num_vertices):
self.dist = [[INF] * num_vertices for i in range(num_vertices)]
self.num_vertices = num_vertices
@classmethod
def get_graph_size(cls, graph_row):
return len(graph_row)
def initial_dist(self, graph):
for i in range(self.num_vertices):
for j in range(self.num_vertices):
self.dist[i][j] = graph[i][j]
def floyd_warshall(self):
for i in range(self.num_vertices):
for j in range(self.num_vertices):
for k in range(self.num_vertices):
self.dist[j][k] = min(
self.dist[j][k],
self.dist[j][i] + self.dist[i][k])
def print_distance_matrix(self):
for i in range(self.num_vertices):
for j in range(self.num_vertices):
d = self.dist[i][j]
if d == INF:
d = 'INF'
print d,
print "\n"
def main():
graph = [[0, 5, INF, 10],
[INF, 0, 3, INF],
[INF, INF, 0, 1],
[INF, INF, INF, 0]
]
num_vertices = FloydWarshall.get_graph_size(graph[0])
fwd = FloydWarshall(num_vertices)
fwd.initial_dist(graph)
fwd.floyd_warshall()
fwd.print_distance_matrix()
if __name__ == "__main__":
main()
| 27.269231 | 71 | 0.527504 | 185 | 1,418 | 3.827027 | 0.232432 | 0.217514 | 0.190678 | 0.138418 | 0.322034 | 0.289548 | 0.285311 | 0.231638 | 0.231638 | 0.231638 | 0 | 0.017448 | 0.353315 | 1,418 | 51 | 72 | 27.803922 | 0.754635 | 0 | 0 | 0.15 | 0 | 0 | 0.009168 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0 | null | null | 0.1 | 0 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
10fbfb348a160188f309e723551e25ae198980b6 | 1,144 | py | Python | hwtGraph/elk/fromHwt/defauts.py | Nic30/hwtGraph | d11535d61ee8c1357720e502ac254c9dbf6dab7d | [
"MIT"
] | 6 | 2018-06-20T21:28:51.000Z | 2022-03-16T18:06:39.000Z | hwtGraph/elk/fromHwt/defauts.py | Nic30/hwtGraph | d11535d61ee8c1357720e502ac254c9dbf6dab7d | [
"MIT"
] | 2 | 2021-01-05T09:13:52.000Z | 2021-03-15T22:17:07.000Z | hwtGraph/elk/fromHwt/defauts.py | Nic30/hwtGraph | d11535d61ee8c1357720e502ac254c9dbf6dab7d | [
"MIT"
] | null | null | null | from hwt.synthesizer.dummyPlatform import DummyPlatform
from hwtGraph.elk.fromHwt.extractSplits import extractSplits
from hwtGraph.elk.fromHwt.flattenTrees import flattenTrees
from hwtGraph.elk.fromHwt.mergeSplitsOnInterfaces import mergeSplitsOnInterfaces
from hwtGraph.elk.fromHwt.netlistPreprocessors import unhideResultsOfIndexingAndConcatOnPublicSignals
from hwtGraph.elk.fromHwt.reduceUselessAssignments import reduceUselessAssignments
from hwtGraph.elk.fromHwt.resolveSharedConnections import resolveSharedConnections
from hwtGraph.elk.fromHwt.sortStatementPorts import sortStatementPorts
from hwtGraph.elk.fromHwt.propagatePresets import propagatePresets
DEFAULT_PLATFORM = DummyPlatform()
DEFAULT_PLATFORM.beforeHdlArchGeneration.extend([
unhideResultsOfIndexingAndConcatOnPublicSignals,
propagatePresets,
])
DEFAULT_LAYOUT_OPTIMIZATIONS = [
# optimizations
reduceUselessAssignments,
extractSplits,
lambda root: flattenTrees(root, lambda node: node.cls == "Operator" and node.name == "CONCAT", True),
mergeSplitsOnInterfaces,
resolveSharedConnections,
# prettyfications
sortStatementPorts,
]
| 40.857143 | 105 | 0.846154 | 95 | 1,144 | 10.147368 | 0.347368 | 0.099585 | 0.124481 | 0.182573 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.097902 | 1,144 | 27 | 106 | 42.37037 | 0.934109 | 0.02535 | 0 | 0 | 0 | 0 | 0.01259 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.409091 | 0 | 0.409091 | 0 | 0 | 0 | 1 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
800c7a6103e8a74ffeb1ed325cf2415ad7ffda51 | 539 | py | Python | app/api/data/tests/test_friend.py | rummens1337/federated-social-network | e9b15342e7640a0b154787303c8660fa75acba14 | [
"MIT"
] | null | null | null | app/api/data/tests/test_friend.py | rummens1337/federated-social-network | e9b15342e7640a0b154787303c8660fa75acba14 | [
"MIT"
] | null | null | null | app/api/data/tests/test_friend.py | rummens1337/federated-social-network | e9b15342e7640a0b154787303c8660fa75acba14 | [
"MIT"
] | null | null | null | # from flask import Blueprint, request
# from app.api.utils import good_json_response, bad_json_response
# import requests
# blueprint.route('/add', methods=['POST'])
def test_register():
pass
# url = 'http://localhost:5000/json'
# resp = requests.get(url)
# assert resp.status_code == 200
# assert resp.json()["code"] == 1
# print(resp.text)
# blueprint.route('/delete', methods=['POST'])
def test_delete():
pass
def f():
return 4
def test_function():
assert f() == 4
__all__ = ('blueprint')
| 17.966667 | 65 | 0.643785 | 70 | 539 | 4.785714 | 0.571429 | 0.062687 | 0.083582 | 0.107463 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.023095 | 0.19666 | 539 | 29 | 66 | 18.586207 | 0.750577 | 0.636364 | 0 | 0.222222 | 0 | 0 | 0.048649 | 0 | 0 | 0 | 0 | 0 | 0.111111 | 1 | 0.444444 | false | 0.222222 | 0 | 0.111111 | 0.555556 | 0.111111 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 3 |
80101bbd94c02d1585a9392dd98b40bfa9499de0 | 423 | py | Python | mymm/__init__.py | jbardhan/molman | 6dcf9e15a769363c87b2d3532baba249ac0f0b82 | [
"MIT"
] | null | null | null | mymm/__init__.py | jbardhan/molman | 6dcf9e15a769363c87b2d3532baba249ac0f0b82 | [
"MIT"
] | null | null | null | mymm/__init__.py | jbardhan/molman | 6dcf9e15a769363c87b2d3532baba249ac0f0b82 | [
"MIT"
] | null | null | null | import os, sys, subprocess, re
from .atom import *
from .molecule import *
from .namd import *
from .fepoptions import *
from .mutator import *
from .spheresolute import *
from .titrationdata import *
from .titrationstate import *
from .chargingfepinput import *
from .selector import *
from .patch import *
from .radii import *
from .topology import *
from .sites import *
from .runfile import *
from .altmansrf import *
| 22.263158 | 31 | 0.751773 | 53 | 423 | 6 | 0.415094 | 0.471698 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.165485 | 423 | 18 | 32 | 23.5 | 0.90085 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
801b2b0f4542d347f10be305c1e8b55ff71e0d79 | 1,520 | py | Python | smspdu/smspdu/__main__.py | cclauss/CommunityCellularManager | 4a4e951b03380dcf5f16091d33bc52afbb3eca21 | [
"BSD-3-Clause"
] | 84 | 2016-11-03T20:51:09.000Z | 2018-09-13T04:36:18.000Z | smspdu/smspdu/__main__.py | cclauss/CommunityCellularManager | 4a4e951b03380dcf5f16091d33bc52afbb3eca21 | [
"BSD-3-Clause"
] | 79 | 2016-11-10T06:30:58.000Z | 2018-06-01T14:29:39.000Z | smspdu/smspdu/__main__.py | cclauss/CommunityCellularManager | 4a4e951b03380dcf5f16091d33bc52afbb3eca21 | [
"BSD-3-Clause"
] | 37 | 2016-11-03T22:53:22.000Z | 2018-09-07T15:32:16.000Z | #!/usr/bin/env python3
"""
Copyright (c) 2016-present, Facebook, Inc.
All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree. An additional grant
of patent rights can be found in the PATENTS file in the same directory.
"""
from .pdu import dump
if __name__ == '__main__':
import sys
dump(sys.argv[1])
# Copyright (c) 2011 eKit.com Inc (http://www.ekit.com/)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
| 42.222222 | 79 | 0.764474 | 239 | 1,520 | 4.828452 | 0.556485 | 0.076257 | 0.017331 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.007955 | 0.173026 | 1,520 | 35 | 80 | 43.428571 | 0.910103 | 0.909868 | 0 | 0 | 0 | 0 | 0.072727 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.5 | 0 | 0.5 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
8027d63aecfb0a5f9af1d3155c791bf1d6f70f14 | 263 | py | Python | modules/pm.py | freakyLuffy/Teleuserbot | d5871e919b37d6b63de7e3115fd9d1d3bb6ce33b | [
"MIT"
] | null | null | null | modules/pm.py | freakyLuffy/Teleuserbot | d5871e919b37d6b63de7e3115fd9d1d3bb6ce33b | [
"MIT"
] | null | null | null | modules/pm.py | freakyLuffy/Teleuserbot | d5871e919b37d6b63de7e3115fd9d1d3bb6ce33b | [
"MIT"
] | 1 | 2021-09-06T08:57:43.000Z | 2021-09-06T08:57:43.000Z | from start import client
from telethon import events
@client.on(events.NewMessage(incoming=True, func=lambda e: e.is_private))
async def my_event_handler(event):
if event.chat_id not in white:
await client.send_message(event.chat_id,CUSTOM_TEXT['pm']) | 43.833333 | 73 | 0.775665 | 43 | 263 | 4.581395 | 0.744186 | 0.091371 | 0.111675 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.125475 | 263 | 6 | 74 | 43.833333 | 0.856522 | 0 | 0 | 0 | 0 | 0 | 0.007576 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.333333 | 0 | 0.333333 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
80576b9e520fcec90a0191aa2686d17a6fdf6fe4 | 371 | py | Python | ch06/06_15.py | TeikyungKim/book-cryptocurrency | c44459a5ef5ca1d0d4d552472b85d75573bebb07 | [
"Apache-2.0"
] | 121 | 2019-03-23T13:53:06.000Z | 2022-03-28T15:15:03.000Z | ch06/06_15.py | TeikyungKim/book-cryptocurrency | c44459a5ef5ca1d0d4d552472b85d75573bebb07 | [
"Apache-2.0"
] | 3 | 2021-04-14T14:31:26.000Z | 2021-05-09T13:46:14.000Z | ch06/06_15.py | TeikyungKim/book-cryptocurrency | c44459a5ef5ca1d0d4d552472b85d75573bebb07 | [
"Apache-2.0"
] | 114 | 2019-03-21T13:43:03.000Z | 2022-03-31T18:42:11.000Z | import time
import datetime
now = datetime.datetime.now()
mid = datetime.datetime(now.year, now.month, now.day) + datetime.timedelta(1)
while True:
now = datetime.datetime.now()
if mid < now < mid + datetime.timedelta(seconds=10) :
print("정각입니다")
mid = datetime.datetime(now.year, now.month, now.day) + datetime.timedelta(1)
time.sleep(1)
| 26.5 | 85 | 0.673854 | 51 | 371 | 4.901961 | 0.352941 | 0.22 | 0.304 | 0.176 | 0.464 | 0.464 | 0.464 | 0.464 | 0.464 | 0.464 | 0 | 0.016556 | 0.185984 | 371 | 13 | 86 | 28.538462 | 0.811258 | 0 | 0 | 0.4 | 0 | 0 | 0.013477 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.2 | 0 | 0.2 | 0.1 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
3392f9eb4b53cd3a18f27e745776ec923137b486 | 238 | py | Python | output/models/nist_data/list_pkg/ncname/schema_instance/nistschema_sv_iv_list_ncname_pattern_2_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 1 | 2021-08-14T17:59:21.000Z | 2021-08-14T17:59:21.000Z | output/models/nist_data/list_pkg/ncname/schema_instance/nistschema_sv_iv_list_ncname_pattern_2_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 4 | 2020-02-12T21:30:44.000Z | 2020-04-15T20:06:46.000Z | output/models/nist_data/list_pkg/ncname/schema_instance/nistschema_sv_iv_list_ncname_pattern_2_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | null | null | null | from output.models.nist_data.list_pkg.ncname.schema_instance.nistschema_sv_iv_list_ncname_pattern_2_xsd.nistschema_sv_iv_list_ncname_pattern_2 import NistschemaSvIvListNcnamePattern2
__all__ = [
"NistschemaSvIvListNcnamePattern2",
]
| 39.666667 | 182 | 0.886555 | 29 | 238 | 6.586207 | 0.655172 | 0.125654 | 0.146597 | 0.188482 | 0.335079 | 0.335079 | 0.335079 | 0 | 0 | 0 | 0 | 0.017857 | 0.058824 | 238 | 5 | 183 | 47.6 | 0.834821 | 0 | 0 | 0 | 0 | 0 | 0.134454 | 0.134454 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.25 | 0 | 0.25 | 0 | 1 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
339d026962fbdb096e0ee1965911c5aed4384a09 | 159 | py | Python | sesion28/tictactoe/core/routing.py | joelibaceta/backend-codigo-10 | 75256580ce9975bcfa831fde884362787d82b71f | [
"MIT"
] | 1 | 2021-11-23T03:05:23.000Z | 2021-11-23T03:05:23.000Z | sesion28/tictactoe/core/routing.py | joelibaceta/backend-codigo-10 | 75256580ce9975bcfa831fde884362787d82b71f | [
"MIT"
] | 1 | 2021-11-23T02:49:01.000Z | 2021-11-23T02:55:14.000Z | sesion28/tictactoe/core/routing.py | joelibaceta/backend-codigo-10 | 75256580ce9975bcfa831fde884362787d82b71f | [
"MIT"
] | 1 | 2022-01-26T19:54:33.000Z | 2022-01-26T19:54:33.000Z | from django.conf.urls import url
from core.consumer import TicTacToeConsumer
websocket_urlpatterns = [
url(r'^ws/play/$', TicTacToeConsumer.as_asgi())
] | 19.875 | 51 | 0.761006 | 20 | 159 | 5.95 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.125786 | 159 | 8 | 52 | 19.875 | 0.856115 | 0 | 0 | 0 | 0 | 0 | 0.0625 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.4 | 0 | 0.4 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
33a092f53a8bc5888be974799c120b8dea9282a2 | 8,431 | py | Python | source/rttov_test/profile-datasets-py/div52_zen50deg/038.py | bucricket/projectMAScorrection | 89489026c8e247ec7c364e537798e766331fe569 | [
"BSD-3-Clause"
] | null | null | null | source/rttov_test/profile-datasets-py/div52_zen50deg/038.py | bucricket/projectMAScorrection | 89489026c8e247ec7c364e537798e766331fe569 | [
"BSD-3-Clause"
] | 1 | 2022-03-12T12:19:59.000Z | 2022-03-12T12:19:59.000Z | source/rttov_test/profile-datasets-py/div52_zen50deg/038.py | bucricket/projectMAScorrection | 89489026c8e247ec7c364e537798e766331fe569 | [
"BSD-3-Clause"
] | null | null | null | """
Profile ../profile-datasets-py/div52_zen50deg/038.py
file automaticaly created by prof_gen.py script
"""
self["ID"] = "../profile-datasets-py/div52_zen50deg/038.py"
self["Q"] = numpy.array([ 1.619327, 5.956785, 4.367512, 5.966544, 5.988635,
7.336613, 6.150054, 10.02425 , 7.748795, 6.746565,
7.848652, 8.143708, 6.399868, 6.944384, 6.637736,
5.71046 , 5.909629, 5.561485, 5.516982, 5.451449,
5.354534, 5.23527 , 5.090619, 4.882784, 4.665495,
4.445971, 4.33555 , 4.24455 , 4.228264, 4.206028,
4.109932, 4.016939, 3.978498, 3.943255, 3.926937,
3.91893 , 3.913817, 3.914332, 3.914846, 3.919975,
3.925441, 3.934397, 3.947211, 3.959719, 3.971488,
3.982999, 3.995186, 4.007807, 4.018579, 4.019045,
4.019496, 4.01493 , 4.008386, 4.016698, 4.058516,
4.099514, 4.590187, 5.10988 , 6.011561, 7.189825,
8.460967, 10.05411 , 11.61838 , 14.50413 , 17.40478 ,
19.78103 , 21.90165 , 24.44011 , 27.48018 , 30.31075 ,
32.63891 , 35.01159 , 38.0444 , 41.01917 , 41.96547 ,
42.89666 , 48.38523 , 53.96574 , 59.23674 , 64.47107 ,
70.1626 , 76.54991 , 85.13889 , 93.71093 , 102.2625 ,
107.7171 , 111.8628 , 114.223 , 114.8452 , 113.5177 ,
110.5433 , 108.2854 , 110.1149 , 104.2918 , 93.99163 ,
78.51031 , 50.08795 , 15.39714 , 14.97929 , 14.57806 ,
14.19263 ])
self["P"] = numpy.array([ 5.00000000e-03, 1.61000000e-02, 3.84000000e-02,
7.69000000e-02, 1.37000000e-01, 2.24400000e-01,
3.45400000e-01, 5.06400000e-01, 7.14000000e-01,
9.75300000e-01, 1.29720000e+00, 1.68720000e+00,
2.15260000e+00, 2.70090000e+00, 3.33980000e+00,
4.07700000e+00, 4.92040000e+00, 5.87760000e+00,
6.95670000e+00, 8.16550000e+00, 9.51190000e+00,
1.10038000e+01, 1.26492000e+01, 1.44559000e+01,
1.64318000e+01, 1.85847000e+01, 2.09224000e+01,
2.34526000e+01, 2.61829000e+01, 2.91210000e+01,
3.22744000e+01, 3.56504000e+01, 3.92566000e+01,
4.31001000e+01, 4.71882000e+01, 5.15278000e+01,
5.61259000e+01, 6.09895000e+01, 6.61252000e+01,
7.15398000e+01, 7.72395000e+01, 8.32310000e+01,
8.95203000e+01, 9.61138000e+01, 1.03017000e+02,
1.10237000e+02, 1.17777000e+02, 1.25646000e+02,
1.33846000e+02, 1.42385000e+02, 1.51266000e+02,
1.60496000e+02, 1.70078000e+02, 1.80018000e+02,
1.90320000e+02, 2.00989000e+02, 2.12028000e+02,
2.23441000e+02, 2.35234000e+02, 2.47408000e+02,
2.59969000e+02, 2.72919000e+02, 2.86262000e+02,
3.00000000e+02, 3.14137000e+02, 3.28675000e+02,
3.43618000e+02, 3.58966000e+02, 3.74724000e+02,
3.90892000e+02, 4.07474000e+02, 4.24470000e+02,
4.41882000e+02, 4.59712000e+02, 4.77961000e+02,
4.96630000e+02, 5.15720000e+02, 5.35232000e+02,
5.55167000e+02, 5.75525000e+02, 5.96306000e+02,
6.17511000e+02, 6.39140000e+02, 6.61192000e+02,
6.83667000e+02, 7.06565000e+02, 7.29886000e+02,
7.53627000e+02, 7.77789000e+02, 8.02371000e+02,
8.27371000e+02, 8.52788000e+02, 8.78620000e+02,
9.04866000e+02, 9.31523000e+02, 9.58591000e+02,
9.86066000e+02, 1.01395000e+03, 1.04223000e+03,
1.07092000e+03, 1.10000000e+03])
self["CO2"] = numpy.array([ 317.3675, 317.3661, 317.3666, 317.3661, 317.3661, 317.3657,
317.366 , 317.3648, 317.3655, 317.3659, 317.3655, 317.3654,
317.366 , 317.3658, 317.3659, 317.3662, 317.3661, 317.3662,
317.3662, 317.3663, 317.3663, 317.3663, 317.3664, 317.3665,
317.3665, 317.3666, 317.3666, 317.3667, 317.3667, 317.3667,
317.3667, 318.3637, 319.4287, 320.5647, 321.7717, 323.0537,
324.4127, 325.8497, 327.3667, 327.3667, 327.3667, 327.3667,
327.3667, 327.3667, 327.3667, 327.3667, 327.3667, 327.3667,
327.3667, 327.3667, 327.3667, 327.3667, 327.3667, 327.3667,
327.3667, 327.3667, 327.3665, 327.3663, 327.366 , 327.3656,
327.3652, 327.3647, 327.3642, 327.3633, 327.3623, 327.3615,
327.3608, 327.36 , 327.359 , 327.3581, 327.3573, 327.3565,
327.3555, 327.3546, 327.3543, 327.354 , 327.3522, 327.3503,
327.3486, 327.3469, 327.345 , 327.3429, 327.3401, 327.3373,
327.3345, 327.3327, 327.3314, 327.3306, 327.3304, 327.3308,
327.3318, 327.3326, 327.332 , 327.3339, 327.3372, 327.3423,
327.3516, 327.363 , 327.3631, 327.3632, 327.3634])
self["T"] = numpy.array([ 208.144, 225.372, 233.177, 245.265, 257.004, 262.226,
265.74 , 267.391, 269.015, 267.988, 260.633, 246.779,
232.854, 221.232, 213.507, 209.05 , 206.15 , 204.447,
203.83 , 204.139, 205.414, 207.06 , 208.488, 208.879,
208.928, 208.778, 208.504, 208.203, 207.538, 206.933,
206.776, 206.624, 206.568, 206.519, 205.985, 205.254,
204.689, 204.443, 204.205, 205.121, 206.132, 207.086,
207.98 , 208.86 , 210.119, 211.349, 212.399, 213.315,
214.179, 214.82 , 215.447, 216.055, 216.649, 217.224,
217.769, 218.303, 218.725, 219.129, 219.394, 219.556,
219.661, 219.603, 219.545, 219.437, 219.327, 219.153,
218.952, 218.772, 218.614, 218.547, 218.732, 218.952,
219.486, 220.013, 220.743, 221.461, 222.301, 223.132,
224.021, 224.901, 225.805, 226.67 , 227.448, 228.168,
228.832, 229.468, 230.089, 230.695, 231.138, 231.335,
231.256, 231.052, 231.12 , 230.943, 230.323, 229.145,
225.92 , 216.233, 216.233, 216.233, 216.233])
self["O3"] = numpy.array([ 0.4900558 , 0.519964 , 0.5800554 , 0.6837994 , 0.8980769 ,
1.136376 , 1.48558 , 1.992239 , 2.507364 , 3.082146 ,
3.839641 , 4.766185 , 5.593402 , 6.175221 , 6.486727 ,
6.579967 , 6.593362 , 6.525838 , 6.401646 , 6.232317 ,
5.973736 , 5.652493 , 5.336404 , 5.090563 , 4.898364 ,
4.739892 , 4.463794 , 4.180877 , 3.854482 , 3.558012 ,
3.486732 , 3.417758 , 3.274348 , 3.13235 , 2.961193 ,
2.780333 , 2.620231 , 2.4972 , 2.377505 , 2.279946 ,
2.186869 , 2.075623 , 1.944017 , 1.814595 , 1.639969 ,
1.469459 , 1.29283 , 1.112821 , 0.9414424 , 0.8033797 ,
0.6682922 , 0.5882987 , 0.5313038 , 0.4850611 , 0.4617138 ,
0.4388317 , 0.3812881 , 0.3218576 , 0.2606511 , 0.1984164 ,
0.1433774 , 0.1075164 , 0.07230547, 0.05926259, 0.04750463,
0.0433533 , 0.04262317, 0.04276686, 0.04394101, 0.04542562,
0.04783386, 0.0502069 , 0.052577 , 0.05490744, 0.05686248,
0.05878674, 0.06004279, 0.06125448, 0.06145147, 0.06160804,
0.06150028, 0.06146972, 0.06166167, 0.06197792, 0.06241002,
0.06286282, 0.06332897, 0.06382601, 0.06415119, 0.06443305,
0.06480372, 0.06553336, 0.06655114, 0.06732265, 0.06764013,
0.06758204, 0.06678987, 0.06998377, 0.0699838 , 0.06998383,
0.06998385])
self["CTP"] = 500.0
self["CFRACTION"] = 0.0
self["IDG"] = 0
self["ISH"] = 0
self["ELEVATION"] = 0.0
self["S2M"]["T"] = 216.233
self["S2M"]["Q"] = 15.5386538073
self["S2M"]["O"] = 0.0699837594526
self["S2M"]["P"] = 1004.71
self["S2M"]["U"] = -1.39825
self["S2M"]["V"] = -0.27037
self["S2M"]["WFETC"] = 100000.0
self["SKIN"]["SURFTYPE"] = 0
self["SKIN"]["WATERTYPE"] = 1
self["SKIN"]["T"] = 215.154
self["SKIN"]["SALINITY"] = 35.0
self["SKIN"]["FOAM_FRACTION"] = 0.0
self["SKIN"]["FASTEM"] = numpy.array([ 3. , 5. , 15. , 0.1, 0.3])
self["ZENANGLE"] = 50.0
self["AZANGLE"] = 0.0
self["SUNZENANGLE"] = 0.0
self["SUNAZANGLE"] = 0.0
self["LATITUDE"] = 67.8369
self["GAS_UNITS"] = 2
self["BE"] = 0.0
self["COSBK"] = 0.0
self["DATE"] = numpy.array([1993, 12, 15])
self["TIME"] = numpy.array([6, 0, 0])
| 55.104575 | 92 | 0.552129 | 1,291 | 8,431 | 3.601859 | 0.469404 | 0.027097 | 0.03871 | 0.051183 | 0.05914 | 0.053978 | 0.042796 | 0.027742 | 0.027742 | 0.027742 | 0 | 0.663324 | 0.278496 | 8,431 | 152 | 93 | 55.467105 | 0.101101 | 0.012335 | 0 | 0.014388 | 0 | 0 | 0.030081 | 0.005294 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
33a3ee095d9406fe660570aebe62ca788d5da6af | 207 | py | Python | modules/stage_1.py | ElijahBeach/C2-Server-Project | 89e6d418790493aa222cca5b6ea7f3f519e4e478 | [
"MIT"
] | 3 | 2022-01-14T01:55:25.000Z | 2022-03-30T01:08:16.000Z | modules/stage_1.py | ElijahBeach/C2-Server-Project | 89e6d418790493aa222cca5b6ea7f3f519e4e478 | [
"MIT"
] | null | null | null | modules/stage_1.py | ElijahBeach/C2-Server-Project | 89e6d418790493aa222cca5b6ea7f3f519e4e478 | [
"MIT"
] | 2 | 2022-01-15T14:30:55.000Z | 2022-01-15T16:04:15.000Z | import json
def run(**args):
print('[$] Enter stage 1')
basic_config =json.dumps([{"module" : "dir_lister"},{"module" : "enviro"},{"module" : "sleep"},{"module" : "stage_2_qrw"}])
return basic_config
| 29.571429 | 125 | 0.63285 | 27 | 207 | 4.666667 | 0.740741 | 0.174603 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.011111 | 0.130435 | 207 | 6 | 126 | 34.5 | 0.688889 | 0 | 0 | 0 | 0 | 0 | 0.352657 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0 | 0.2 | 0 | 0.6 | 0.2 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3 |
33aa8315bfe8d7a1e0fa6fd460a2c19cb2e4da53 | 1,182 | py | Python | pyfileconf_datacode/dchooks.py | nickderobertis/pyfileconf-datacode | cb9b8cdaca7cc680c9c75d748a024efc13b4a308 | [
"MIT"
] | null | null | null | pyfileconf_datacode/dchooks.py | nickderobertis/pyfileconf-datacode | cb9b8cdaca7cc680c9c75d748a024efc13b4a308 | [
"MIT"
] | 2 | 2021-12-20T00:10:31.000Z | 2021-12-20T00:10:32.000Z | pyfileconf_datacode/dchooks.py | nickderobertis/pyfileconf-datacode | cb9b8cdaca7cc680c9c75d748a024efc13b4a308 | [
"MIT"
] | null | null | null | """
Hooks into datacode to update pyfileconf context with datacode operations
"""
from typing import Optional
import datacode.hooks as dc_hooks
from datacode.models.pipeline.operations.operation import DataOperation
from pyfileconf import context
def update_pfc_context_to_pipeline_section_path(operation: DataOperation) -> None:
"""
Get the section path of the operation's pipeline and update
the pyfileconf currently running context to this section path
:param operation: The operation which is about to be executed
:return: None
"""
context.stack.add_running_item(operation.pipeline._section_path_str) # type: ignore
def update_pfc_context_to_original(operation: DataOperation) -> None:
"""
Revert the change to pyfileconf currently running context
made by :func:`update_pfc_context_to_pipeline_section_path`
:param operation: The operation which was just executed
:return: None
"""
context.stack.pop_frame()
def add_hooks():
dc_hooks.chain(
"on_begin_execute_operation", update_pfc_context_to_pipeline_section_path
)
dc_hooks.chain("on_end_execute_operation", update_pfc_context_to_original)
| 31.105263 | 88 | 0.773266 | 157 | 1,182 | 5.55414 | 0.382166 | 0.061927 | 0.091743 | 0.103211 | 0.383028 | 0.268349 | 0.211009 | 0 | 0 | 0 | 0 | 0 | 0.163283 | 1,182 | 37 | 89 | 31.945946 | 0.881699 | 0.401861 | 0 | 0 | 0 | 0 | 0.077519 | 0.077519 | 0 | 0 | 0 | 0 | 0 | 1 | 0.230769 | false | 0 | 0.307692 | 0 | 0.538462 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
33d044b0f48623a2e8a3f707f4fd9b01cf4e5e04 | 1,637 | py | Python | Swing/util/Scanmap.py | jiawu/Roller | a70e350905a59c2254dcefda7ab23c6417cf8f7d | [
"MIT"
] | null | null | null | Swing/util/Scanmap.py | jiawu/Roller | a70e350905a59c2254dcefda7ab23c6417cf8f7d | [
"MIT"
] | 2 | 2015-07-13T18:51:22.000Z | 2015-07-16T15:35:24.000Z | Swing/util/Scanmap.py | jiawu/Roller | a70e350905a59c2254dcefda7ab23c6417cf8f7d | [
"MIT"
] | null | null | null | class Scanmap:
"""A heatmap and line plot combined into one figure"""
def __init__(self, dim = None):
if dim:
self.set_dimensions(dim)
else:
default_dim = { 'gp_left': 0.2,
'gp_bottom': 0.1,
'gp_width': 0.7,
'gp_height': 0.2,
'padding': 0.01,
'numTFs': 20,
'dm_left': 0.2,
'dm_bottom': 0.32,
'dm_width':0.7,
'box_height':0.03,
'dm_height':0.6 }
self.set_dimensions(default_dim)
#initialize colormap
self.tableau20 = [((152,223,138),(31, 119, 180), (174, 199, 232), (255, 127, 14),(255, 187, 120), (44, 160, 44), (255, 152, 150),(148, 103, 189), (197, 176, 213), (140, 86, 75), (196, 156, 148),(227, 119, 194), (247, 182, 210), (127, 127, 127), (199, 199, 199),(188, 189, 34), (219, 219, 141), (23, 190, 207), (158, 218, 229),(214,39,40)]
for i in range(len(tableau20)):
r,g,b = self.tableau20[i]
self.tableau20[i] = (r/255., g/255., b/255.)
#initialize axes
f = plt.figure(figsize=(10,10))
d = self.dimensions
axarr2 = f.add_axes(d['gp_left'],d['gp_bottom'],d['gp_width'],d['gp_height'])
axarr1 = f.add_axes(d['dm_left'],d['dm_bottom'],d['dm_width'],d['dm_height'])
def set_dimensions(self, dim_dict):
self.dimensions = dim_dict
return(dim_dict)
| 38.97619 | 347 | 0.45449 | 212 | 1,637 | 3.363208 | 0.504717 | 0.01683 | 0.047686 | 0.025245 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.214778 | 0.379963 | 1,637 | 41 | 348 | 39.926829 | 0.487685 | 0 | 0 | 0 | 0 | 0 | 0.100194 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0 | null | null | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
33d252fe0327d46a0f541037910a341692b0b42d | 163 | py | Python | ML_Chinahadoop/04/code/test/test3.py | lsieun/learn-AI | 0a164bc2e6317de3aa03c747c0e6f15d93e7f49a | [
"Apache-2.0"
] | 1 | 2019-03-27T23:22:44.000Z | 2019-03-27T23:22:44.000Z | ML_Chinahadoop/04/code/test/test3.py | lsieun/learn-AI | 0a164bc2e6317de3aa03c747c0e6f15d93e7f49a | [
"Apache-2.0"
] | null | null | null | ML_Chinahadoop/04/code/test/test3.py | lsieun/learn-AI | 0a164bc2e6317de3aa03c747c0e6f15d93e7f49a | [
"Apache-2.0"
] | null | null | null | #coding:utf-8
import numpy as np
# d = np.random.rand(5) # [0, 1)
d = np.random.rand(5,3)
print(d)
print(d.shape)
x = [2,3]
t = tuple(x)
print(t)
print(type(t)) | 12.538462 | 32 | 0.607362 | 36 | 163 | 2.75 | 0.583333 | 0.060606 | 0.181818 | 0.262626 | 0.282828 | 0 | 0 | 0 | 0 | 0 | 0 | 0.058824 | 0.165644 | 163 | 13 | 33 | 12.538462 | 0.669118 | 0.257669 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.125 | 0 | 0.125 | 0.5 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 3 |
33dc1874ceed63291aedd783dca53879f4114561 | 1,077 | py | Python | insights/parsers/tests/test_neutron_ovs_agent_log.py | mglantz/insights-core | 6f20bbbe03f53ee786f483b2a28d256ff1ad0fd4 | [
"Apache-2.0"
] | 121 | 2017-05-30T20:23:25.000Z | 2022-03-23T12:52:15.000Z | insights/parsers/tests/test_neutron_ovs_agent_log.py | mglantz/insights-core | 6f20bbbe03f53ee786f483b2a28d256ff1ad0fd4 | [
"Apache-2.0"
] | 1,977 | 2017-05-26T14:36:03.000Z | 2022-03-31T10:38:53.000Z | insights/parsers/tests/test_neutron_ovs_agent_log.py | mglantz/insights-core | 6f20bbbe03f53ee786f483b2a28d256ff1ad0fd4 | [
"Apache-2.0"
] | 244 | 2017-05-30T20:22:57.000Z | 2022-03-26T10:09:39.000Z | from insights.parsers.neutron_ovs_agent_log import NeutronOVSAgentLog
from insights.tests import context_wrap
from datetime import datetime
LOG = """
2016-11-09 14:39:25.348 3153 WARNING oslo_config.cfg [-] Option "rabbit_password" from group "oslo_messaging_rabbit" is deprecated for removal. Its value may be silently ignored in the future.
2016-11-09 14:39:25.348 3153 WARNING oslo_config.cfg [-] Option "rabbit_userid" from group "oslo_messaging_rabbit" is deprecated for removal. Its value may be silently ignored in the future.
2016-11-09 14:39:25.352 3153 INFO ryu.base.app_manager [-] loading app neutron.plugins.ml2.drivers.openvswitch.agent.openflow.native.ovs_ryuapp
2016-11-09 14:39:27.171 3153 INFO ryu.base.app_manager [-] loading app ryu.app.ofctl.service
2016-11-09 14:39:27.190 3153 INFO ryu.base.app_manager [-] loading app ryu.controller.ofp_handler
"""
def test_neutron_ovs_agent_log():
log = NeutronOVSAgentLog(context_wrap(LOG))
assert len(log.get("WARNING")) == 2
assert len(list(log.get_after(datetime(2016, 11, 9, 14, 39, 26)))) == 2
| 56.684211 | 193 | 0.774373 | 180 | 1,077 | 4.505556 | 0.422222 | 0.04439 | 0.049322 | 0.061652 | 0.538841 | 0.538841 | 0.504316 | 0.504316 | 0.461159 | 0.367448 | 0 | 0.127368 | 0.11792 | 1,077 | 18 | 194 | 59.833333 | 0.726316 | 0 | 0 | 0 | 0 | 0.357143 | 0.67688 | 0.153203 | 0 | 0 | 0 | 0 | 0.142857 | 1 | 0.071429 | false | 0.071429 | 0.214286 | 0 | 0.285714 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 3 |
33de7fea4433b78d4b5d4914f3c786cf038c352c | 62 | py | Python | test/login.py | smartliit/gz02 | d6ccc2137538eb9035a08ee0e53b15c8cfaffc6b | [
"MIT"
] | null | null | null | test/login.py | smartliit/gz02 | d6ccc2137538eb9035a08ee0e53b15c8cfaffc6b | [
"MIT"
] | null | null | null | test/login.py | smartliit/gz02 | d6ccc2137538eb9035a08ee0e53b15c8cfaffc6b | [
"MIT"
] | null | null | null | num = 1
num1 = 10
num2 = 20
num3 = 40
num3 = 30
num4 = 50
| 5.636364 | 9 | 0.548387 | 12 | 62 | 2.833333 | 0.916667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.4 | 0.354839 | 62 | 10 | 10 | 6.2 | 0.45 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
33e4384b255fb7af165ebd7c743b407be5757e1e | 100 | py | Python | fig/example_traceback.py | bagrow/WhirlwindTourOfPython | bd77cbd8b6a68f5b854d2b29ed266d36c8170d77 | [
"CC0-1.0"
] | 7 | 2017-01-16T19:36:35.000Z | 2021-11-08T08:54:35.000Z | fig/example_traceback.py | bagrow/WhirlwindTourOfPython | bd77cbd8b6a68f5b854d2b29ed266d36c8170d77 | [
"CC0-1.0"
] | null | null | null | fig/example_traceback.py | bagrow/WhirlwindTourOfPython | bd77cbd8b6a68f5b854d2b29ed266d36c8170d77 | [
"CC0-1.0"
] | null | null | null | # example_traceback.py
def loader(filename):
fin = open(filenam)
loader("data/result_ab.txt")
| 14.285714 | 28 | 0.72 | 14 | 100 | 5 | 0.928571 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.14 | 100 | 6 | 29 | 16.666667 | 0.813953 | 0.2 | 0 | 0 | 0 | 0 | 0.230769 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0 | 0 | 0.333333 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
33f694b2af13996c72f3d160e40aa32e1652a122 | 439 | py | Python | Appointmast/pages/migrations/0009_auto_20190911_0029.py | Paresh98000/AppointMaster | c17cf43456cfadfbb90bd99c714ea7f84d51b340 | [
"bzip2-1.0.6"
] | null | null | null | Appointmast/pages/migrations/0009_auto_20190911_0029.py | Paresh98000/AppointMaster | c17cf43456cfadfbb90bd99c714ea7f84d51b340 | [
"bzip2-1.0.6"
] | 11 | 2020-06-05T23:13:03.000Z | 2022-03-11T23:59:58.000Z | Appointmast/pages/migrations/0009_auto_20190911_0029.py | Paresh98000/AppointMaster | c17cf43456cfadfbb90bd99c714ea7f84d51b340 | [
"bzip2-1.0.6"
] | null | null | null | # Generated by Django 2.2.2 on 2019-09-10 18:59
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('pages', '0008_auto_20190911_0021'),
]
operations = [
migrations.RemoveField(
model_name='appointment',
name='city',
),
migrations.RemoveField(
model_name='appointment',
name='location',
),
]
| 19.954545 | 47 | 0.567198 | 42 | 439 | 5.809524 | 0.690476 | 0.016393 | 0.213115 | 0.245902 | 0.368852 | 0.368852 | 0 | 0 | 0 | 0 | 0 | 0.104027 | 0.321185 | 439 | 21 | 48 | 20.904762 | 0.714765 | 0.102506 | 0 | 0.4 | 1 | 0 | 0.158163 | 0.058673 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.066667 | 0 | 0.266667 | 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 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
1d1cca8eb9833144e8a286f6736f6f6ae5462a63 | 2,745 | py | Python | InventorySystem/order/migrations/0014_auto_20210628_0012.py | guyueming/PythonWeb | e8a38fc26c06ec78e1de61d65055dcfc480ef8f1 | [
"MIT"
] | null | null | null | InventorySystem/order/migrations/0014_auto_20210628_0012.py | guyueming/PythonWeb | e8a38fc26c06ec78e1de61d65055dcfc480ef8f1 | [
"MIT"
] | null | null | null | InventorySystem/order/migrations/0014_auto_20210628_0012.py | guyueming/PythonWeb | e8a38fc26c06ec78e1de61d65055dcfc480ef8f1 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.3 on 2021-06-27 16:12
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('skin', '0003_skinmodel_factory'),
('paper', '0003_auto_20210618_0709'),
('order', '0013_ordernumbermodel_order_date'),
]
operations = [
migrations.AlterField(
model_name='ordermodel',
name='note',
field=models.TextField(blank=True, default='', max_length=256, verbose_name='备注'),
),
migrations.AlterField(
model_name='ordermodel',
name='other_paper',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='other_paper', to='paper.papermodel', verbose_name='纸张2'),
),
migrations.AlterField(
model_name='ordermodel',
name='other_paper_count',
field=models.IntegerField(blank=True, default=0, verbose_name='纸张数量'),
),
migrations.AlterField(
model_name='ordermodel',
name='packaging',
field=models.TextField(blank=True, default='', max_length=64, verbose_name='包装'),
),
migrations.AlterField(
model_name='ordermodel',
name='paper',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='paper.papermodel', verbose_name='纸张1'),
),
migrations.AlterField(
model_name='ordermodel',
name='paperCount',
field=models.IntegerField(blank=True, default=0, verbose_name='纸张数量'),
),
migrations.AlterField(
model_name='ordermodel',
name='skin',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='skin.skinmodel', verbose_name='桉木皮'),
),
migrations.AlterField(
model_name='ordermodel',
name='skinCount',
field=models.IntegerField(blank=True, default=0, verbose_name='桉木皮数量'),
),
migrations.AlterField(
model_name='ordermodel',
name='thickness',
field=models.TextField(blank=True, default='', max_length=64, verbose_name='厚度'),
),
migrations.AlterField(
model_name='ordermodel',
name='trademark',
field=models.TextField(blank=True, default='', max_length=64, verbose_name='商标'),
),
migrations.AlterField(
model_name='ordermodel',
name='word',
field=models.TextField(blank=True, default='', max_length=64, verbose_name='打字'),
),
]
| 38.125 | 175 | 0.598179 | 277 | 2,745 | 5.772563 | 0.270758 | 0.137586 | 0.171982 | 0.1995 | 0.762351 | 0.72858 | 0.540338 | 0.540338 | 0.449031 | 0.417136 | 0 | 0.02739 | 0.268488 | 2,745 | 71 | 176 | 38.661972 | 0.768924 | 0.016393 | 0 | 0.538462 | 1 | 0 | 0.141216 | 0.02854 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.030769 | 0 | 0.076923 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 1 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
1d34af5080c27fee9894d1dd5eac6c33f3446666 | 3,370 | py | Python | Code/controller/bridge/carla/sensor/GNSSSensor.py | tum-esi/attack_generation_framework | 5fe1fbdca7491677e57f019ab83b8b726ea50f95 | [
"MIT"
] | null | null | null | Code/controller/bridge/carla/sensor/GNSSSensor.py | tum-esi/attack_generation_framework | 5fe1fbdca7491677e57f019ab83b8b726ea50f95 | [
"MIT"
] | null | null | null | Code/controller/bridge/carla/sensor/GNSSSensor.py | tum-esi/attack_generation_framework | 5fe1fbdca7491677e57f019ab83b8b726ea50f95 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Avoid cyclic imports while using type hints
from __future__ import annotations
# Imports
import numpy as np
import math
import carla
from bridge.carla.core.VectorData import VectorData
from bridge.carla.core.Unit import Unit
from bridge.carla.sensor.Sensor import Sensor
class GNSSSensor(Sensor):
"""
"""
def __init__(self, controller: DataController, name: str, update_interval: float = 1.0) -> None:
"""Constructor"""
# Call constructor of base class
Sensor.__init__(self, controller, name, 'body', update_interval)
# Init class attributes
self.type = 'gnss'
# Create IMU sensor in carla world
self.carla_blueprint = self.controller.get_blueprint_library().find('sensor.other.gnss')
self.carla_blueprint.set_attribute('sensor_tick', f'{self.update_interval}')
self.carla_transform = carla.Transform(carla.Location(0, 0, 0), carla.Rotation(0, 0, 0))
self.respawn_sensor()
self.set_enabled(True)
def set_noise_alt_bias(self, bias: float) -> None:
self.update_sensor_attribute('noise_alt_bias', f'{bias}')
def set_noise_alt_stddev(self, stddev: float) -> None:
self.update_sensor_attribute('noise_alt_stddev', f'{stddev}')
def set_noise_lat_bias(self, bias: float) -> None:
self.update_sensor_attribute('noise_lat_bias', f'{bias}')
def set_noise_lat_stddev(self, stddev: float) -> None:
self.update_sensor_attribute('noise_lat_stddev', f'{stddev}')
def set_noise_lon_bias(self, bias: float) -> None:
self.update_sensor_attribute('noise_lon_bias', f'{bias}')
def set_noise_lon_stddev(self, stddev: float) -> None:
self.update_sensor_attribute('noise_lon_stddev', f'{stddev}')
def get_noise_alt_bias(self) -> float:
return self.carla_blueprint.get_attribute('noise_alt_bias').as_float()
def get_noise_alt_stddev(self) -> float:
return self.carla_blueprint.get_attribute('noise_alt_stddev').as_float()
def get_noise_lat_bias(self) -> float:
return self.carla_blueprint.get_attribute('noise_lat_bias').as_float()
def get_noise_lat_stddev(self) -> float:
return self.carla_blueprint.get_attribute('noise_lat_stddev').as_float()
def get_noise_lon_bias(self) -> float:
return self.carla_blueprint.get_attribute('noise_lon_bias').as_float()
def get_noise_lon_stddev(self) -> float:
return self.carla_blueprint.get_attribute('noise_lon_stddev').as_float()
def sensor_callback(self, data: carla.SensorData) -> None:
# Check if we want to process this update (only relevant if server rate is higher than user selected update rate)
if (data.frame >= self.next_frame) and self.is_enabled():
# Compute next frame when sensor data should be received
self.next_frame = data.frame + \
int(math.ceil(self.update_interval /
self.controller.get_world_step()))
# Get data
position = VectorData(Unit.GEOGRAPHIC_POSITION, data.frame, data.timestamp,
np.array([data.latitude, data.longitude, data.altitude]))
# Put data in queue for further processing
if position:
self.data_queue.put(position)
| 38.295455 | 121 | 0.680712 | 446 | 3,370 | 4.867713 | 0.262332 | 0.077384 | 0.066329 | 0.05251 | 0.422847 | 0.422847 | 0.315062 | 0.315062 | 0.306771 | 0.306771 | 0 | 0.003383 | 0.210682 | 3,370 | 87 | 122 | 38.735632 | 0.812782 | 0.120178 | 0 | 0 | 0 | 0 | 0.095303 | 0.007488 | 0 | 0 | 0 | 0 | 0 | 1 | 0.285714 | false | 0 | 0.142857 | 0.122449 | 0.571429 | 0.163265 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
1d5209bc43edb0cef67c19d935b4bdff1c153cba | 367 | py | Python | src/__init__.py | Fernando-Montes/TimeSeries | 45e882b33f4a7e1fed6d0de491f32cfb31278cb5 | [
"MIT"
] | null | null | null | src/__init__.py | Fernando-Montes/TimeSeries | 45e882b33f4a7e1fed6d0de491f32cfb31278cb5 | [
"MIT"
] | null | null | null | src/__init__.py | Fernando-Montes/TimeSeries | 45e882b33f4a7e1fed6d0de491f32cfb31278cb5 | [
"MIT"
] | null | null | null | # Importing all libraries
from src.models.utilities import *
from src.visualization.visualize import *
from src.models.RNN import *
from src.models.LSTM import *
import pandas as pd
import numpy as np
import itertools
from statsmodels.graphics import tsaplots
import matplotlib.pyplot as plt
from sklearn.metrics import mean_squared_error
plt.style.use('default')
| 22.9375 | 46 | 0.814714 | 54 | 367 | 5.5 | 0.592593 | 0.094276 | 0.131313 | 0.127946 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.125341 | 367 | 15 | 47 | 24.466667 | 0.925234 | 0.06267 | 0 | 0 | 0 | 0 | 0.020468 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.909091 | 0 | 0.909091 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
1d6310e6f4999ff88b6080b65f9b222ecf73e177 | 119 | py | Python | config.py | PMA-2020/agile | ab1f5b93897a8fe0cc71714bcf1b710ce3927adc | [
"MIT"
] | null | null | null | config.py | PMA-2020/agile | ab1f5b93897a8fe0cc71714bcf1b710ce3927adc | [
"MIT"
] | null | null | null | config.py | PMA-2020/agile | ab1f5b93897a8fe0cc71714bcf1b710ce3927adc | [
"MIT"
] | null | null | null | """Config"""
import os
PKG_PATH = os.path.dirname(os.path.realpath(__file__)) + '/'
OUTPUT_DIR = PKG_PATH + 'output/'
| 19.833333 | 60 | 0.680672 | 17 | 119 | 4.352941 | 0.588235 | 0.189189 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.117647 | 119 | 5 | 61 | 23.8 | 0.704762 | 0.05042 | 0 | 0 | 0 | 0 | 0.074766 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 0.333333 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
1d6f1a24b3aaa646e56ca4d6354b46891af42daa | 657 | py | Python | src/postal/settings.py | michael-hahn/django-postal | 082000839b20a8ee0aeaa6f8c76cc459409310e4 | [
"MIT"
] | 6 | 2015-01-07T10:01:00.000Z | 2020-03-23T21:28:12.000Z | src/postal/settings.py | michael-hahn/django-postal | 082000839b20a8ee0aeaa6f8c76cc459409310e4 | [
"MIT"
] | 5 | 2015-02-24T08:09:16.000Z | 2015-11-25T10:02:07.000Z | src/postal/settings.py | michael-hahn/django-postal | 082000839b20a8ee0aeaa6f8c76cc459409310e4 | [
"MIT"
] | 8 | 2015-01-30T05:49:54.000Z | 2021-08-17T22:06:33.000Z | from django.conf import settings
from django.utils.translation import ugettext_lazy as _
POSTAL_ADDRESS_L10N = getattr(settings, 'POSTAL_ADDRESS_L10N', True)
# each address line is a tuple of format (field_label, required)
POSTAL_ADDRESS_LINE1 = getattr(settings, "POSTAL_ADDRESS_LINE1", (_(u"Street"), False))
POSTAL_ADDRESS_LINE2 = getattr(settings, "POSTAL_ADDRESS_LINE2", (_(u"Area"), False))
POSTAL_ADDRESS_CITY = getattr(settings, "POSTAL_ADDRESS_CITY", (_(u"City"), False))
POSTAL_ADDRESS_STATE = getattr(settings, "POSTAL_ADDRESS_STATE", (_(u"State"), False))
POSTAL_ADDRESS_CODE = getattr(settings, "POSTAL_ADDRESS_CODE", (_(u"Zip code"), False)) | 59.727273 | 87 | 0.783866 | 89 | 657 | 5.426966 | 0.393258 | 0.322981 | 0.26087 | 0.347826 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.013356 | 0.08828 | 657 | 11 | 88 | 59.727273 | 0.792988 | 0.094368 | 0 | 0 | 0 | 0 | 0.242424 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.25 | 0 | 0.25 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
1d723a23b9bf3bdf90138946e21473ba46af1b58 | 129 | py | Python | src/main/python/rgb_effects/common/display_signals.py | alu0101233598/VPC2122 | 7c2ed0bb3309d20b6dd4798027290e2848840612 | [
"ISC"
] | null | null | null | src/main/python/rgb_effects/common/display_signals.py | alu0101233598/VPC2122 | 7c2ed0bb3309d20b6dd4798027290e2848840612 | [
"ISC"
] | 10 | 2021-12-10T20:37:59.000Z | 2022-01-16T19:09:17.000Z | src/main/python/rgb_effects/common/display_signals.py | alu0101233598/VPC2122 | 7c2ed0bb3309d20b6dd4798027290e2848840612 | [
"ISC"
] | null | null | null | from PyQt5.QtCore import pyqtSignal, QObject
class DisplaySignals(QObject):
done = pyqtSignal(tuple)
error = pyqtSignal(str) | 25.8 | 44 | 0.782946 | 15 | 129 | 6.733333 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.008929 | 0.131783 | 129 | 5 | 45 | 25.8 | 0.892857 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.25 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3 |
1d7599ec1e5692ac0ce7ed47842574b0c0767e65 | 290 | py | Python | Chap.17/17.4.py | joonion/daily-coding-problems | 8e313d28c3a989a41d87024588d38bd60a98b2c6 | [
"MIT"
] | null | null | null | Chap.17/17.4.py | joonion/daily-coding-problems | 8e313d28c3a989a41d87024588d38bd60a98b2c6 | [
"MIT"
] | null | null | null | Chap.17/17.4.py | joonion/daily-coding-problems | 8e313d28c3a989a41d87024588d38bd60a98b2c6 | [
"MIT"
] | null | null | null | def nth_sevenish_number(n):
answer, bit_place = 0, 0
while n > 0:
if n & 1 == 1:
answer += 7 ** bit_place
n >>= 1
bit_place += 1
return answer
# n = 1
# print(nth_sevenish_number(n))
for n in range(1, 10):
print(nth_sevenish_number(n))
| 19.333333 | 36 | 0.544828 | 46 | 290 | 3.23913 | 0.413043 | 0.221477 | 0.342282 | 0.362416 | 0.308725 | 0 | 0 | 0 | 0 | 0 | 0 | 0.061856 | 0.331034 | 290 | 14 | 37 | 20.714286 | 0.706186 | 0.12069 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.1 | false | 0 | 0 | 0 | 0.2 | 0.1 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
1d76618577dd3caa6129749e58d6fc645589cf23 | 556 | py | Python | pymatex/node/Integral.py | Gawaboumga/PyMatex | 3ccc0aa23211a064aa31a9b509b108cd606a4992 | [
"MIT"
] | 1 | 2019-03-05T09:45:04.000Z | 2019-03-05T09:45:04.000Z | pymatex/node/Integral.py | Gawaboumga/PyMatex | 3ccc0aa23211a064aa31a9b509b108cd606a4992 | [
"MIT"
] | null | null | null | pymatex/node/Integral.py | Gawaboumga/PyMatex | 3ccc0aa23211a064aa31a9b509b108cd606a4992 | [
"MIT"
] | null | null | null | from pymatex.listener import MatexASTVisitor
from pymatex.node.IterativeFunction import IterativeFunction, IterativeType
class Integral(IterativeFunction):
def __init__(self, variable, start_range, end_range, expression):
super().__init__(IterativeType.SUM, variable, start_range, end_range, expression)
def __str__(self):
return '\\int_{{{}}}^{{{}}}{{{} d{}}}'.format(self.start_range, self.end_range, self.expression, self.variable)
def accept(self, visitor: MatexASTVisitor):
return visitor.visit_integral(self)
| 37.066667 | 119 | 0.735612 | 61 | 556 | 6.377049 | 0.459016 | 0.077121 | 0.092545 | 0.107969 | 0.18509 | 0.18509 | 0 | 0 | 0 | 0 | 0 | 0 | 0.138489 | 556 | 14 | 120 | 39.714286 | 0.812109 | 0 | 0 | 0 | 0 | 0 | 0.052158 | 0.041367 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0.222222 | 0.222222 | 0.888889 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
1d8512d3ba0f35bc000e58936bd16d6cb08ae6bc | 207 | py | Python | esst/listener/__init__.py | etcher-be/esst | ac41cd0c07af8ca8532997f533756c529c9609a4 | [
"MIT"
] | 4 | 2018-06-24T14:03:44.000Z | 2019-01-21T01:20:02.000Z | esst/listener/__init__.py | etcher-be/esst | ac41cd0c07af8ca8532997f533756c529c9609a4 | [
"MIT"
] | 106 | 2018-06-24T13:59:52.000Z | 2019-11-26T09:05:14.000Z | esst/listener/__init__.py | theendsofinvention/esst | ac41cd0c07af8ca8532997f533756c529c9609a4 | [
"MIT"
] | null | null | null | # coding=utf-8
"""
Manages a UDP socket and does two things:
1. Retrieve incoming messages from DCS and update :py:class:`esst.core.status.status`
2. Sends command to the DCS application via the socket
"""
| 25.875 | 85 | 0.748792 | 35 | 207 | 4.428571 | 0.857143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.017143 | 0.154589 | 207 | 7 | 86 | 29.571429 | 0.868571 | 0.951691 | 0 | null | 0 | null | 0 | 0 | null | 0 | 0 | 0 | null | 1 | null | true | 0 | 0 | null | null | null | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
d552476c75a5ad80a50b5a912fd1f4dce56e3bcd | 7,000 | py | Python | day19.py | ecnerwala/aoc-2019 | 9a8a273804395da1d269bea94f260e320946f26c | [
"CC0-1.0"
] | 5 | 2021-01-26T03:25:01.000Z | 2021-04-12T21:56:13.000Z | day19.py | ecnerwala/aoc-2019 | 9a8a273804395da1d269bea94f260e320946f26c | [
"CC0-1.0"
] | null | null | null | day19.py | ecnerwala/aoc-2019 | 9a8a273804395da1d269bea94f260e320946f26c | [
"CC0-1.0"
] | 1 | 2021-03-02T19:33:51.000Z | 2021-03-02T19:33:51.000Z | from functools import *
from collections import *
from itertools import *
from math import *
from sys import exit
from dataclasses import dataclass
import re
from builtins import pow
from heapq import heappush, heappop, heappushpop, heapify, heapreplace
import pyperclip
def cprint(a):
print(a)
pyperclip.copy(a)
class NeedInput_():
pass
NeedInput = NeedInput_()
class Computer():
def __init__(self, prog):
self.mem = defaultdict(lambda: 0)
for i,v in enumerate(prog):
self.mem[i] = v
self.pc = 0
self.out = []
self.relative_base = 0
self.halted = False
self.out_ctr = 0
def run_with_inp(self, inp=None):
if self.halted: return self
if inp is None: inp = []
inp = iter(inp)
while True:
instr = self.mem[self.pc]
op = instr % 100
instr //= 100
next_pc = self.pc+1
def get_param():
nonlocal next_pc
nonlocal instr
v = self.mem[next_pc]
next_pc += 1
mode = instr % 10
instr //= 10
return (mode, v)
def get_read_param():
mode, v = get_param()
if mode == 0:
return self.mem[v]
elif mode == 1:
return v
elif mode == 2:
addr = self.relative_base + v
assert 0 <= addr
return self.mem[addr]
else: assert False
def get_write_addr():
mode, v = get_param()
if mode == 0:
return v
elif mode == 1:
assert False
elif mode == 2:
addr = self.relative_base + v
assert 0 <= addr
return addr
else: assert False
def do_jump(loc):
self.pc = loc
if op == 99:
self.halted = True
return self
elif op == 1:
s1 = get_read_param()
s2 = get_read_param()
d = get_write_addr()
self.mem[d] = s1 + s2
elif op == 2:
s1 = get_read_param()
s2 = get_read_param()
d = get_write_addr()
self.mem[d] = s1 * s2
elif op == 3:
try:
v = next(inp)
except StopIteration:
return self
d = get_write_addr()
self.mem[d] = v
elif op == 4:
s = get_read_param()
self.out.append(s)
elif op == 5:
s1 = get_read_param()
s2 = get_read_param()
if s1 != 0:
next_pc = s2
elif op == 6:
s1 = get_read_param()
s2 = get_read_param()
if s1 == 0:
next_pc = s2
elif op == 7:
s1 = get_read_param()
s2 = get_read_param()
d = get_write_addr()
self.mem[d] = (1 if s1 < s2 else 0)
elif op == 8:
s1 = get_read_param()
s2 = get_read_param()
d = get_write_addr()
self.mem[d] = (1 if s1 == s2 else 0)
elif op == 9:
s1 = get_read_param()
self.relative_base += s1
else: assert False
self.pc = next_pc
def pop_output(self, l=None):
if l is None:
return self.pop_output(1)[0]
assert l + self.out_ctr <= len(self.out)
self.out_ctr += l
return self.out[self.out_ctr-l:self.out_ctr]
def has_output(self, l=1):
return self.out_ctr + l <= len(self.out)
def main(inp, is_real):
if not is_real: return
inp = inp.strip()
inp = inp.split(',')
prog = tuple(map(int, inp))
def get_beam(i,j):
if i < 0 or j < 0: return False
return Computer(prog).run_with_inp([i,j]).pop_output() == 1
for i in range(1000):
if i >= 2:
assert get_beam(i, (3*i+1)//2)
for i in range(60):
s = ''
for j in range(60):
s += '.#'[get_beam(i,j)]
print(s)
def get_diag_first(s):
r = s * 2 // 5
c = s - r
while not get_beam(r, c):
r -= 1
c += 1
while get_beam(r+1, c-1):
r += 1
c -= 1
assert get_beam(r, c)
return r,c
def get_diag_width(s):
r, c = get_diag_first(s)
lo = c
hi = s+1
while hi - lo > 1:
md = (lo + hi) >> 1
if get_beam(s-md, md):
lo = md
else:
hi = md
return hi - c
s = 2500
while get_diag_width(s) < 100: s += 1
print(s)
r, c = get_diag_first(s)
x, y = r - 99, c
cprint(x*10000+y)
for i in range(100):
for j in range(100):
assert get_beam(x+i, y+j)
print(get_diag_width(s))
for i in range(-100,100):
s = ''
for j in range(-100,100):
s += '.#'[get_beam(x+i,y+j)]
print(s)
#exit(0)
samp_inp = r"""
"""
real_inp = r"""
109,424,203,1,21102,1,11,0,1106,0,282,21101,0,18,0,1106,0,259,1202,1,1,221,203,1,21101,0,31,0,1105,1,282,21102,38,1,0,1105,1,259,20102,1,23,2,21201,1,0,3,21102,1,1,1,21101,0,57,0,1105,1,303,2101,0,1,222,20102,1,221,3,21002,221,1,2,21101,0,259,1,21101,0,80,0,1106,0,225,21102,1,152,2,21101,91,0,0,1106,0,303,1201,1,0,223,21001,222,0,4,21101,0,259,3,21102,225,1,2,21101,0,225,1,21102,1,118,0,1105,1,225,20101,0,222,3,21102,61,1,2,21101,133,0,0,1106,0,303,21202,1,-1,1,22001,223,1,1,21102,148,1,0,1105,1,259,2101,0,1,223,21001,221,0,4,21001,222,0,3,21101,0,14,2,1001,132,-2,224,1002,224,2,224,1001,224,3,224,1002,132,-1,132,1,224,132,224,21001,224,1,1,21101,0,195,0,105,1,109,20207,1,223,2,20101,0,23,1,21102,-1,1,3,21102,214,1,0,1105,1,303,22101,1,1,1,204,1,99,0,0,0,0,109,5,2101,0,-4,249,21202,-3,1,1,21202,-2,1,2,21201,-1,0,3,21102,1,250,0,1106,0,225,22101,0,1,-4,109,-5,2106,0,0,109,3,22107,0,-2,-1,21202,-1,2,-1,21201,-1,-1,-1,22202,-1,-2,-2,109,-3,2105,1,0,109,3,21207,-2,0,-1,1206,-1,294,104,0,99,22102,1,-2,-2,109,-3,2105,1,0,109,5,22207,-3,-4,-1,1206,-1,346,22201,-4,-3,-4,21202,-3,-1,-1,22201,-4,-1,2,21202,2,-1,-1,22201,-4,-1,1,21202,-2,1,3,21101,343,0,0,1106,0,303,1105,1,415,22207,-2,-3,-1,1206,-1,387,22201,-3,-2,-3,21202,-2,-1,-1,22201,-3,-1,3,21202,3,-1,-1,22201,-3,-1,2,22101,0,-4,1,21101,0,384,0,1106,0,303,1105,1,415,21202,-4,-1,-4,22201,-4,-3,-4,22202,-3,-2,-2,22202,-2,-4,-4,22202,-3,-2,-3,21202,-4,-1,-2,22201,-3,-2,1,21201,1,0,-4,109,-5,2106,0,0
"""
print("Sample:")
main(samp_inp, False)
print("Actual:")
main(real_inp, True)
| 31.818182 | 1,465 | 0.481714 | 1,129 | 7,000 | 2.894597 | 0.171833 | 0.011016 | 0.05508 | 0.029988 | 0.296512 | 0.223684 | 0.205936 | 0.160343 | 0.144431 | 0.134639 | 0 | 0.244829 | 0.364571 | 7,000 | 219 | 1,466 | 31.96347 | 0.489883 | 0.001 | 0 | 0.259459 | 0 | 0.005405 | 0.212672 | 0.209525 | 0 | 0 | 0 | 0 | 0.054054 | 1 | 0.07027 | false | 0.005405 | 0.054054 | 0.005405 | 0.210811 | 0.048649 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
d5602f60583a5ee8fff192152e26a808fb8ee237 | 208 | py | Python | boxes/__init__.py | gregbugaj/form-processor | 0c803de43a98b4a02efa956803e64793995256ff | [
"MIT"
] | null | null | null | boxes/__init__.py | gregbugaj/form-processor | 0c803de43a98b4a02efa956803e64793995256ff | [
"MIT"
] | 1 | 2021-11-09T11:11:32.000Z | 2021-11-09T11:11:32.000Z | boxes/__init__.py | gregbugaj/form-processor | 0c803de43a98b4a02efa956803e64793995256ff | [
"MIT"
] | null | null | null | """
Name : __init__.py
boxes module
This import path is important to allow importing correctly as package
"""
import os, sys
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '.')))
| 23.111111 | 81 | 0.735577 | 33 | 208 | 4.393939 | 0.727273 | 0.124138 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.005464 | 0.120192 | 208 | 8 | 82 | 26 | 0.786885 | 0.490385 | 0 | 0 | 0 | 0 | 0.010204 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.5 | 0 | 0.5 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
d5705b1544fe2fc2f711adfa0a90fc24288d51e3 | 110 | py | Python | backend/harmlessBuddy/harmlessBuddy/sentiment_analysis/apps.py | alecadub/ConUHacks5 | bf3329be7866a1943883a01bdc302baefab77c17 | [
"MIT"
] | null | null | null | backend/harmlessBuddy/harmlessBuddy/sentiment_analysis/apps.py | alecadub/ConUHacks5 | bf3329be7866a1943883a01bdc302baefab77c17 | [
"MIT"
] | 13 | 2020-06-05T20:43:05.000Z | 2022-03-02T07:06:10.000Z | backend/harmlessBuddy/harmlessBuddy/sentiment_analysis/apps.py | alecadub/ConUHacks5 | bf3329be7866a1943883a01bdc302baefab77c17 | [
"MIT"
] | 1 | 2020-10-14T06:48:32.000Z | 2020-10-14T06:48:32.000Z | from django.apps import AppConfig
class SentimentAnalysisConfig(AppConfig):
name = 'sentiment_analysis'
| 18.333333 | 41 | 0.8 | 11 | 110 | 7.909091 | 0.909091 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.136364 | 110 | 5 | 42 | 22 | 0.915789 | 0 | 0 | 0 | 0 | 0 | 0.163636 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
6337a1c9f62a8aa4d32a1a131f18b20efe00d460 | 295 | py | Python | example_test.py | dprogm/bazel_pybind_sample | 8e0813ac6ad7732b89213de379e5da39f6621f5a | [
"Apache-2.0"
] | 2 | 2020-10-22T09:27:05.000Z | 2021-11-12T13:42:27.000Z | example_test.py | dprogm/bazel_pybind_sample | 8e0813ac6ad7732b89213de379e5da39f6621f5a | [
"Apache-2.0"
] | null | null | null | example_test.py | dprogm/bazel_pybind_sample | 8e0813ac6ad7732b89213de379e5da39f6621f5a | [
"Apache-2.0"
] | 2 | 2021-11-12T13:41:49.000Z | 2022-03-01T13:58:35.000Z | import os
import sys
print('about to import', file=sys.stderr)
print('python is', sys.version_info)
print('pid is', os.getpid())
import my_pb_mod
print('imported, about to call', file=sys.stderr)
result = my_pb_mod.add(2, 3)
print(result)
assert result == 5
print('done!', file=sys.stderr)
| 17.352941 | 49 | 0.718644 | 51 | 295 | 4.058824 | 0.509804 | 0.101449 | 0.188406 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.011628 | 0.125424 | 295 | 16 | 50 | 18.4375 | 0.790698 | 0 | 0 | 0 | 0 | 0 | 0.19661 | 0 | 0 | 0 | 0 | 0 | 0.090909 | 1 | 0 | false | 0 | 0.454545 | 0 | 0.454545 | 0.545455 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 3 |
634348f6beb8ae7a79d54c8ae7dedfc2a3eb5caf | 13,574 | py | Python | source/rttov_test/profile-datasets-py/div83/040.py | bucricket/projectMAScorrection | 89489026c8e247ec7c364e537798e766331fe569 | [
"BSD-3-Clause"
] | null | null | null | source/rttov_test/profile-datasets-py/div83/040.py | bucricket/projectMAScorrection | 89489026c8e247ec7c364e537798e766331fe569 | [
"BSD-3-Clause"
] | 1 | 2022-03-12T12:19:59.000Z | 2022-03-12T12:19:59.000Z | source/rttov_test/profile-datasets-py/div83/040.py | bucricket/projectMAScorrection | 89489026c8e247ec7c364e537798e766331fe569 | [
"BSD-3-Clause"
] | null | null | null | """
Profile ../profile-datasets-py/div83/040.py
file automaticaly created by prof_gen.py script
"""
self["ID"] = "../profile-datasets-py/div83/040.py"
self["Q"] = numpy.array([ 1.890026, 2.119776, 2.622053, 3.246729,
3.667537, 4.216342, 4.862296, 5.531749,
6.100783, 6.376119, 6.376069, 6.30519 ,
6.187932, 5.998564, 5.778127, 5.603999,
5.44443 , 5.194473, 4.915426, 4.653008,
4.45 , 4.296832, 4.148003, 4.015564,
3.910205, 3.839615, 3.790106, 3.753656,
3.721226, 3.693996, 3.677826, 3.674526,
3.655867, 3.640757, 3.644617, 3.663107,
3.679716, 3.683656, 3.678676, 3.667877,
3.655367, 3.648067, 3.646037, 3.644827,
3.651267, 3.691236, 3.765886, 3.858565,
3.940824, 3.994534, 4.097813, 4.351141,
4.794867, 5.49314 , 6.497828, 8.015136,
10.60419 , 15.81985 , 21.16895 , 24.30741 ,
23.60504 , 24.79699 , 27.87162 , 33.67817 ,
42.22522 , 52.68792 , 65.67979 , 82.04257 ,
102.6225 , 116.7384 , 124.9514 , 131.6637 ,
137.0252 , 130.226 , 119.7127 , 105.9718 ,
104.862 , 125.6962 , 167.5619 , 234.0722 ,
297.3785 , 359.7445 , 423.0569 , 497.9349 ,
552.8482 , 569.9959 , 545.77 , 535.4481 ,
711.82 , 1148.918 , 1499.767 , 1580.109 ,
1531.92 , 1436.304 , 1228.928 , 1011.186 ,
845.8809 , 853.3132 , 830.1563 , 807.9197 , 786.5588 ])
self["P"] = numpy.array([ 5.00000000e-03, 1.61000000e-02, 3.84000000e-02,
7.69000000e-02, 1.37000000e-01, 2.24400000e-01,
3.45400000e-01, 5.06400000e-01, 7.14000000e-01,
9.75300000e-01, 1.29720000e+00, 1.68720000e+00,
2.15260000e+00, 2.70090000e+00, 3.33980000e+00,
4.07700000e+00, 4.92040000e+00, 5.87760000e+00,
6.95670000e+00, 8.16550000e+00, 9.51190000e+00,
1.10038000e+01, 1.26492000e+01, 1.44559000e+01,
1.64318000e+01, 1.85847000e+01, 2.09224000e+01,
2.34526000e+01, 2.61829000e+01, 2.91210000e+01,
3.22744000e+01, 3.56505000e+01, 3.92566000e+01,
4.31001000e+01, 4.71882000e+01, 5.15278000e+01,
5.61260000e+01, 6.09895000e+01, 6.61253000e+01,
7.15398000e+01, 7.72396000e+01, 8.32310000e+01,
8.95204000e+01, 9.61138000e+01, 1.03017000e+02,
1.10237000e+02, 1.17778000e+02, 1.25646000e+02,
1.33846000e+02, 1.42385000e+02, 1.51266000e+02,
1.60496000e+02, 1.70078000e+02, 1.80018000e+02,
1.90320000e+02, 2.00989000e+02, 2.12028000e+02,
2.23442000e+02, 2.35234000e+02, 2.47408000e+02,
2.59969000e+02, 2.72919000e+02, 2.86262000e+02,
3.00000000e+02, 3.14137000e+02, 3.28675000e+02,
3.43618000e+02, 3.58966000e+02, 3.74724000e+02,
3.90893000e+02, 4.07474000e+02, 4.24470000e+02,
4.41882000e+02, 4.59712000e+02, 4.77961000e+02,
4.96630000e+02, 5.15720000e+02, 5.35232000e+02,
5.55167000e+02, 5.75525000e+02, 5.96306000e+02,
6.17511000e+02, 6.39140000e+02, 6.61192000e+02,
6.83667000e+02, 7.06565000e+02, 7.29886000e+02,
7.53628000e+02, 7.77790000e+02, 8.02371000e+02,
8.27371000e+02, 8.52788000e+02, 8.78620000e+02,
9.04866000e+02, 9.31524000e+02, 9.58591000e+02,
9.86067000e+02, 1.01395000e+03, 1.04223000e+03,
1.07092000e+03, 1.10000000e+03])
self["CO2"] = numpy.array([ 370.8133, 370.8152, 370.819 , 370.8248, 370.8346, 370.8484,
370.8592, 370.8579, 370.8967, 370.9416, 370.9656, 370.9707,
371.0187, 371.0558, 371.0859, 371.1189, 371.164 , 371.2181,
371.2882, 371.3753, 371.4853, 371.5974, 371.7105, 371.8065,
371.8855, 371.9556, 371.9716, 371.9786, 371.9036, 371.8306,
371.8296, 371.8286, 371.9816, 372.1516, 372.3736, 372.6286,
372.8946, 373.1656, 373.4526, 373.8036, 374.1786, 374.5586,
374.9416, 375.3396, 375.6096, 375.8926, 376.1336, 376.3425,
376.5465, 376.6605, 376.7785, 376.8464, 376.8902, 376.9449,
377.0346, 377.128 , 377.324 , 377.549 , 377.852 , 378.2698,
378.7031, 379.2006, 379.7134, 380.1292, 380.5039, 380.8129,
380.989 , 381.1627, 381.2329, 381.3075, 381.3593, 381.4038,
381.4637, 381.5393, 381.6193, 381.7075, 381.794 , 381.882 ,
381.973 , 382.0935, 382.2253, 382.3864, 382.5441, 382.6894,
382.8332, 382.9886, 383.1448, 383.2917, 383.3489, 383.3001,
383.2863, 383.3892, 383.5445, 383.7251, 383.9945, 384.3599,
385.021 , 385.4928, 385.8484, 386.0688, 386.149 ])
self["CO"] = numpy.array([ 5.07834 , 4.978429 , 4.783627 , 4.465066 , 4.009665 ,
3.428986 , 2.1168 , 0.7107151 , 0.3604568 , 0.1722319 ,
0.09253791, 0.06835487, 0.06619429, 0.06226643, 0.05921646,
0.05582889, 0.05210092, 0.04852775, 0.04563088, 0.0435902 ,
0.04266791, 0.04196062, 0.04131023, 0.04063314, 0.03983114,
0.03892895, 0.03783966, 0.03667146, 0.03530527, 0.03391147,
0.03270558, 0.03146188, 0.03095409, 0.03045309, 0.03021789,
0.03010279, 0.03018719, 0.03073179, 0.03131748, 0.03369348,
0.03659667, 0.04005435, 0.04421134, 0.04900962, 0.05320021,
0.05796649, 0.06307856, 0.06862024, 0.07462111, 0.07899018,
0.08380636, 0.08758932, 0.09090566, 0.09480198, 0.1001443 ,
0.1059952 , 0.1139498 , 0.1231891 , 0.1334292 , 0.1447495 ,
0.1573193 , 0.1683598 , 0.180545 , 0.1902606 , 0.1989896 ,
0.2064601 , 0.2107932 , 0.2151723 , 0.2166698 , 0.2182195 ,
0.2193496 , 0.220384 , 0.2215356 , 0.222791 , 0.2240452 ,
0.2252751 , 0.2264323 , 0.2273394 , 0.2281768 , 0.2287195 ,
0.2293438 , 0.2301862 , 0.2313281 , 0.2330089 , 0.234985 ,
0.2372327 , 0.2394283 , 0.2416156 , 0.2436684 , 0.2454167 ,
0.2468103 , 0.2475702 , 0.2474194 , 0.2469778 , 0.2469551 ,
0.2485434 , 0.2532306 , 0.2569715 , 0.255173 , 0.2553855 ,
0.2556078 ])
self["T"] = numpy.array([ 201.756, 208.959, 221.236, 232.895, 242.747, 248.786,
248.329, 240.903, 229.68 , 220.741, 219.585, 222.314,
223.457, 223.196, 222.551, 222.843, 222.789, 222.21 ,
221.367, 220.664, 220.666, 221.42 , 221.862, 221.833,
221.445, 221.116, 221.34 , 221.609, 221.876, 222.239,
222.762, 223.15 , 223.03 , 222.598, 221.894, 221.35 ,
221.172, 221.079, 220.7 , 220.162, 219.576, 219.085,
218.821, 218.548, 218.069, 217.619, 217.047, 216.42 ,
215.951, 215.682, 215.498, 215.293, 215.002, 214.535,
213.791, 212.72 , 211.396, 210.082, 209.266, 208.907,
209.051, 209.749, 211.078, 212.777, 214.68 , 216.699,
218.741, 220.833, 222.97 , 225.147, 227.187, 229.093,
230.856, 232.34 , 233.77 , 235.146, 236.509, 237.94 ,
239.449, 241.132, 242.895, 244.697, 246.497, 248.304,
250.093, 251.797, 253.356, 254.716, 255.748, 256.257,
256.617, 256.449, 255.921, 255.521, 254.315, 252.591,
250.969, 251.339, 251.339, 251.339, 251.339])
self["N2O"] = numpy.array([ 1.59999700e-04, 6.39998600e-04, 9.99997400e-04,
1.28999600e-03, 3.35998800e-03, 3.46998500e-03,
2.00999000e-03, 9.29994900e-04, 7.69995300e-04,
1.55999000e-03, 3.49997800e-03, 4.09997400e-03,
3.60997800e-03, 3.51997900e-03, 3.85997800e-03,
5.33997000e-03, 7.33996000e-03, 1.04899500e-02,
1.34499300e-02, 1.60199300e-02, 1.84799200e-02,
2.20899100e-02, 2.61798900e-02, 3.00898800e-02,
5.58597800e-02, 8.34796800e-02, 1.10069600e-01,
1.41009500e-01, 1.72649400e-01, 2.03189200e-01,
2.29059200e-01, 2.39769100e-01, 2.50139100e-01,
2.60199100e-01, 2.68909000e-01, 2.72829000e-01,
2.76629000e-01, 2.80329000e-01, 2.79099000e-01,
2.77989000e-01, 2.76929000e-01, 2.78389000e-01,
2.81049000e-01, 2.83589000e-01, 2.87389000e-01,
2.91148900e-01, 2.94858900e-01, 2.98488800e-01,
3.01988800e-01, 3.05358800e-01, 3.08538700e-01,
3.11508600e-01, 3.14228500e-01, 3.16658300e-01,
3.18747900e-01, 3.19607400e-01, 3.20386600e-01,
3.21084900e-01, 3.21683200e-01, 3.22162200e-01,
3.22532400e-01, 3.22752000e-01, 3.22831000e-01,
3.22829100e-01, 3.22826400e-01, 3.22823000e-01,
3.22818800e-01, 3.22813500e-01, 3.22806900e-01,
3.22802300e-01, 3.22799700e-01, 3.22797500e-01,
3.22795800e-01, 3.22798000e-01, 3.22801400e-01,
3.22805800e-01, 3.22806100e-01, 3.22799400e-01,
3.22785900e-01, 3.22764400e-01, 3.22744000e-01,
3.22723900e-01, 3.22703400e-01, 3.22679200e-01,
3.22661500e-01, 3.22656000e-01, 3.22663800e-01,
3.22667100e-01, 3.22610200e-01, 3.22469100e-01,
3.22355800e-01, 3.22329900e-01, 3.22345400e-01,
3.22376300e-01, 3.22443300e-01, 3.22513500e-01,
3.22566900e-01, 3.22564500e-01, 3.22572000e-01,
3.22579200e-01, 3.22586100e-01])
self["O3"] = numpy.array([ 0.510174 , 0.5621888 , 0.6514743 , 0.7822175 , 0.9318276 ,
1.063576 , 1.310564 , 1.76503 , 2.535005 , 3.648507 ,
4.547261 , 4.78841 , 4.92361 , 5.275468 , 5.694327 ,
5.762868 , 5.783319 , 5.893709 , 6.03422 , 6.160551 ,
6.228622 , 6.203113 , 6.153684 , 6.089276 , 6.012956 ,
5.923467 , 5.849328 , 5.783048 , 5.734829 , 5.679589 ,
5.574619 , 5.39368 , 5.244621 , 5.120821 , 4.922902 ,
4.727543 , 4.524263 , 4.246424 , 3.923376 , 3.604037 ,
3.319568 , 3.047309 , 2.75112 , 2.482241 , 2.317652 ,
2.148792 , 1.885393 , 1.603124 , 1.397604 , 1.272585 ,
1.146755 , 0.9980887 , 0.8611839 , 0.729153 , 0.5870622 ,
0.4483724 , 0.3575272 , 0.2652448 , 0.1737753 , 0.1178921 ,
0.09092905, 0.07172082, 0.05827958, 0.05142367, 0.04863645,
0.04841805, 0.04816644, 0.04715373, 0.04594748, 0.04495205,
0.0455781 , 0.04686353, 0.04873582, 0.04975662, 0.0501041 ,
0.04979462, 0.04934463, 0.04914342, 0.04915406, 0.04921568,
0.04915478, 0.04893549, 0.04849328, 0.04805416, 0.04794348,
0.04790108, 0.0476205 , 0.04700432, 0.04654844, 0.04632991,
0.04646221, 0.04573811, 0.04403783, 0.04091335, 0.03254705,
0.02640277, 0.02501912, 0.02442054, 0.02442111, 0.02442165,
0.02442218])
self["CH4"] = numpy.array([ 0.04183322, 0.07070085, 0.09215896, 0.1150766 , 0.1600424 ,
0.1895992 , 0.203706 , 0.2216318 , 0.2513385 , 0.2618113 ,
0.2802002 , 0.3011591 , 0.323238 , 0.3478319 , 0.3743778 ,
0.4088557 , 0.4408626 , 0.4700776 , 0.4956766 , 0.5058676 ,
0.5155767 , 0.5382237 , 0.5665796 , 0.5937466 , 0.6694654 ,
0.7486761 , 0.8249039 , 0.9082426 , 0.9919303 , 1.046986 ,
1.106076 , 1.169336 , 1.236905 , 1.290275 , 1.341695 ,
1.390245 , 1.434895 , 1.474525 , 1.496414 , 1.519504 ,
1.543804 , 1.569344 , 1.596164 , 1.637644 , 1.659294 ,
1.681934 , 1.697794 , 1.708283 , 1.718413 , 1.722753 ,
1.727263 , 1.729712 , 1.731132 , 1.7327 , 1.734659 ,
1.736686 , 1.740032 , 1.743762 , 1.748043 , 1.753067 ,
1.758228 , 1.763046 , 1.768011 , 1.77186 , 1.775215 ,
1.778026 , 1.779713 , 1.781404 , 1.782387 , 1.783412 ,
1.784227 , 1.784995 , 1.785885 , 1.786897 , 1.788006 ,
1.78924 , 1.790502 , 1.791825 , 1.793189 , 1.79475 ,
1.796366 , 1.798093 , 1.799748 , 1.801223 , 1.802603 ,
1.803951 , 1.805294 , 1.806622 , 1.807672 , 1.80842 ,
1.809452 , 1.811134 , 1.812978 , 1.815059 , 1.817833 ,
1.821496 , 1.829131 , 1.834953 , 1.839252 , 1.841891 ,
1.842819 ])
self["CTP"] = 500.0
self["CFRACTION"] = 0.0
self["IDG"] = 0
self["ISH"] = 0
self["ELEVATION"] = 0.0
self["S2M"]["T"] = 251.339
self["S2M"]["Q"] = 786.558838187
self["S2M"]["O"] = 0.0244221754008
self["S2M"]["P"] = 1007.16998
self["S2M"]["U"] = 0.0
self["S2M"]["V"] = 0.0
self["S2M"]["WFETC"] = 100000.0
self["SKIN"]["SURFTYPE"] = 1
self["SKIN"]["WATERTYPE"] = 1
self["SKIN"]["T"] = 251.339
self["SKIN"]["SALINITY"] = 35.0
self["SKIN"]["FOAM_FRACTION"] = 0.0
self["SKIN"]["FASTEM"] = numpy.array([ 3. , 5. , 15. , 0.1, 0.3])
self["ZENANGLE"] = 0.0
self["AZANGLE"] = 0.0
self["SUNZENANGLE"] = 0.0
self["SUNAZANGLE"] = 0.0
self["LATITUDE"] = 72.967
self["GAS_UNITS"] = 2
self["BE"] = 0.0
self["COSBK"] = 0.0
self["DATE"] = numpy.array([2007, 1, 20])
self["TIME"] = numpy.array([0, 0, 0])
| 57.516949 | 92 | 0.548549 | 2,008 | 13,574 | 3.706673 | 0.475598 | 0.022975 | 0.008867 | 0.004837 | 0.01451 | 0.01048 | 0 | 0 | 0 | 0 | 0 | 0.696544 | 0.292324 | 13,574 | 235 | 93 | 57.761702 | 0.078284 | 0.006999 | 0 | 0 | 0 | 0 | 0.018495 | 0.0026 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
639b3be3ffc4882950b2537d142e6095224bc2ad | 596 | py | Python | lawyerd/products/management_/commands/domain_check.py | loobinsk/customer_project | 4f43d4c6db2c99926715ea16451511466569c4ae | [
"MIT"
] | null | null | null | lawyerd/products/management_/commands/domain_check.py | loobinsk/customer_project | 4f43d4c6db2c99926715ea16451511466569c4ae | [
"MIT"
] | null | null | null | lawyerd/products/management_/commands/domain_check.py | loobinsk/customer_project | 4f43d4c6db2c99926715ea16451511466569c4ae | [
"MIT"
] | null | null | null | from time import sleep
from django.core.management.base import BaseCommand, CommandError
# from products.tasks import domain_check
# class Command(BaseCommand):
# help = 'Check few site'
#
# # def add_arguments(self, parser):
# # parser.add_argument('poll_ids', nargs='+', type=int)
#
# def handle(self, *args, **options):
# no_delay = True
# for i in range(100):
# res = domain_check(no_delay)
# if res == -1:
# sleep(30)
#
# self.stdout.write(self.style.SUCCESS(f'Updated sites: {res}'))
# pass
| 27.090909 | 76 | 0.588926 | 72 | 596 | 4.777778 | 0.736111 | 0.063953 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.013953 | 0.278523 | 596 | 21 | 77 | 28.380952 | 0.786047 | 0.786913 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
63a695d16dd20d6dfc932a28143d90ee5bdb2056 | 2,167 | py | Python | src/api/models.py | Dr4kk0nnys/django-schedule-api | bcb83661f19847fbd9e6d9dc576010e837e612fd | [
"MIT"
] | 2 | 2020-10-24T20:33:44.000Z | 2020-10-29T18:24:01.000Z | src/api/models.py | Dr4kk0nnys/django-schedule-api | bcb83661f19847fbd9e6d9dc576010e837e612fd | [
"MIT"
] | null | null | null | src/api/models.py | Dr4kk0nnys/django-schedule-api | bcb83661f19847fbd9e6d9dc576010e837e612fd | [
"MIT"
] | null | null | null | from django.db import models
from django.core.validators import MaxValueValidator, MinValueValidator
class User(models.Model):
email = models.EmailField(default='No email provided.')
password = models.CharField(max_length=256, default='No password provided.')
token_id = models.CharField(max_length=256, default='No token id provided.')
api_calls = models.IntegerField(default=0)
objects = models.Manager()
def __str__(self):
return self.email
class ScheduledDate(models.Model):
date = models.DateTimeField('scheduled meeting')
count = models.IntegerField(default=0, validators=[
MaxValueValidator(5),
MinValueValidator(1)
])
objects = models.Manager()
def __str__(self):
return str(self.date)
class Information(models.Model):
scheduled_date = models.ForeignKey(ScheduledDate, on_delete=models.CASCADE)
user = models.ForeignKey(User, on_delete=models.CASCADE)
def __str__(self):
return ''
class Register(models.Model):
email = models.EmailField()
password = models.CharField(max_length=256)
objects = models.Manager()
def __str__(self):
return str(self.email)
class TimeList(models.Model):
day = models.CharField(max_length=2)
month = models.CharField(max_length=2)
year = models.CharField(max_length=4)
token_id = models.CharField(max_length=256)
objects = models.Manager()
def __str__(self):
return '-'.join([self.day, self.month, self.year])
class ScheduleApi(models.Model):
day = models.CharField(max_length=2)
month = models.CharField(max_length=2)
year = models.CharField(max_length=4)
hours = models.CharField(max_length=2)
minutes = models.CharField(max_length=2)
company_name = models.CharField(max_length=200)
token_id = models.CharField(max_length=256)
objects = models.Manager()
def __str__(self):
return self.company_name
class ApiCall(models.Model):
token_id = models.CharField(max_length=256)
api_credits = models.IntegerField(default=0)
objects = models.Manager()
def __str__(self):
return self.token_id
| 26.108434 | 80 | 0.702353 | 265 | 2,167 | 5.535849 | 0.237736 | 0.153374 | 0.184049 | 0.245399 | 0.564417 | 0.486708 | 0.475801 | 0.398773 | 0.396046 | 0.361963 | 0 | 0.019274 | 0.185971 | 2,167 | 82 | 81 | 26.426829 | 0.812358 | 0 | 0 | 0.4 | 0 | 0 | 0.035994 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.127273 | false | 0.036364 | 0.036364 | 0.127273 | 0.945455 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 3 |
63b087acaf36016c331bc3fdce37ca553a022ec4 | 511 | py | Python | src/users/models.py | vinay-pad/commit_service | 6f2113ba77fad6466969173c3e518ef565096920 | [
"MIT"
] | null | null | null | src/users/models.py | vinay-pad/commit_service | 6f2113ba77fad6466969173c3e518ef565096920 | [
"MIT"
] | null | null | null | src/users/models.py | vinay-pad/commit_service | 6f2113ba77fad6466969173c3e518ef565096920 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
from django.db import models
from django.contrib.auth.models import AbstractUser
from rest_framework.authtoken.models import Token
from django.dispatch import receiver
from django.db.models.signals import post_save
from django.conf import settings
@receiver(post_save, sender=settings.AUTH_USER_MODEL)
def create_auth_token(sender, instance=None, created=False, **kwargs):
if created:
Token.objects.create(user=instance)
class User(AbstractUser):
pass
| 30.058824 | 70 | 0.812133 | 71 | 511 | 5.676056 | 0.507042 | 0.124069 | 0.059553 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.117417 | 511 | 16 | 71 | 31.9375 | 0.89357 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.076923 | false | 0.076923 | 0.538462 | 0 | 0.692308 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 3 |
63c52307946b28edaffca66cd20d561925cd8860 | 154 | py | Python | nautobot/core/management/commands/start.py | psmware-ltd/nautobot | ac516287fb8edcc3482bd011839de837c6bbf0df | [
"Apache-2.0"
] | 384 | 2021-02-24T01:40:40.000Z | 2022-03-30T10:30:59.000Z | nautobot/core/management/commands/start.py | psmware-ltd/nautobot | ac516287fb8edcc3482bd011839de837c6bbf0df | [
"Apache-2.0"
] | 1,067 | 2021-02-24T00:58:08.000Z | 2022-03-31T23:38:23.000Z | nautobot/core/management/commands/start.py | psmware-ltd/nautobot | ac516287fb8edcc3482bd011839de837c6bbf0df | [
"Apache-2.0"
] | 128 | 2021-02-24T02:45:16.000Z | 2022-03-20T18:48:36.000Z | from django_webserver.management.commands.pyuwsgi import Command as uWSGICommand
class Command(uWSGICommand):
help = "Start Nautobot uWSGI server."
| 25.666667 | 80 | 0.805195 | 18 | 154 | 6.833333 | 0.888889 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.12987 | 154 | 5 | 81 | 30.8 | 0.91791 | 0 | 0 | 0 | 0 | 0 | 0.181818 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
891d00de94862749b3d00d8d56f2a893158bdab0 | 1,474 | py | Python | hard-gists/e76e7c2a2aff228d7807/snippet.py | jjhenkel/dockerizeme | eaa4fe5366f6b9adf74399eab01c712cacaeb279 | [
"Apache-2.0"
] | 21 | 2019-07-08T08:26:45.000Z | 2022-01-24T23:53:25.000Z | hard-gists/e76e7c2a2aff228d7807/snippet.py | jjhenkel/dockerizeme | eaa4fe5366f6b9adf74399eab01c712cacaeb279 | [
"Apache-2.0"
] | 5 | 2019-06-15T14:47:47.000Z | 2022-02-26T05:02:56.000Z | hard-gists/e76e7c2a2aff228d7807/snippet.py | jjhenkel/dockerizeme | eaa4fe5366f6b9adf74399eab01c712cacaeb279 | [
"Apache-2.0"
] | 17 | 2019-05-16T03:50:34.000Z | 2021-01-14T14:35:12.000Z | # original file name: solve_sssa_attack.sage
from sage.all import *
p = 16857450949524777441941817393974784044780411511252189319
A = 16857450949524777441941817393974784044780411507861094535
B = 77986137112576
E = EllipticCurve(GF(p), [A, B])
print E.order() == p
g = E(5732560139258194764535999929325388041568732716579308775, 14532336890195013837874850588152996214121327870156054248)
v = E(2609506039090139098835068603396546214836589143940493046, 8637771092812212464887027788957801177574860926032421582)
def hensel_lift(curve, p, point):
A, B = map(long, (E.a4(), E.a6()))
x, y = map(long, point.xy())
fr = y**2 - (x**3 + A*x + B)
t = (- fr / p) % p
t *= inverse_mod(2 * y, p) # (y**2)' = 2 * y
t %= p
new_y = y + p * t
return x, new_y
# lift points
x1, y1 = hensel_lift(E, p, g)
x2, y2 = hensel_lift(E, p, v)
# calculate new A, B (actually, they will be the same here)
mod = p ** 2
A2 = y2**2 - y1**2 - (x2**3 - x1**3)
A2 = A2 * inverse_mod(x2 - x1, mod)
A2 %= mod
B2 = y1**2 - x1**3 - A2 * x1
B2 %= mod
# new curve
E2 = EllipticCurve(IntegerModRing(p**2), [A2, B2])
# calculate dlog
g2s = (p - 1) * E2(x1, y1)
v2s = (p - 1) * E2(x2, y2)
x1s, y1s = map(long, g2s.xy())
x2s, y2s = map(long, v2s.xy())
dx1 = (x1s - x1) / p % p
dx2 = (y1s - y1) / p
dy1 = (x2s - x2)
dy2 = (y2s - y2) % p
print "%d, %d, %d, %d, %d" % (dx1, dy1, dx2, dy2, p)
m = dy1 * inverse_mod(dx1, p) * dx2 * inverse_mod(dy2, p)
m %= p
print m
| 23.774194 | 120 | 0.624152 | 222 | 1,474 | 4.094595 | 0.351351 | 0.030803 | 0.009901 | 0.026403 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.362306 | 0.211669 | 1,474 | 61 | 121 | 24.163934 | 0.419966 | 0.103799 | 0 | 0 | 0 | 0 | 0.013699 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.026316 | null | null | 0.078947 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
8925ce37bab22ff983851fb7f4b5ffa1ebcbdb05 | 367 | py | Python | bmc/library.py | reich6534/SumoPY | fb03db75e3799bad2759c0017f8919893690b289 | [
"Apache-2.0"
] | null | null | null | bmc/library.py | reich6534/SumoPY | fb03db75e3799bad2759c0017f8919893690b289 | [
"Apache-2.0"
] | 4 | 2020-08-10T15:07:40.000Z | 2020-08-25T19:30:29.000Z | bmc/library.py | reich6534/SumoPY | fb03db75e3799bad2759c0017f8919893690b289 | [
"Apache-2.0"
] | 1 | 2020-06-19T14:21:26.000Z | 2020-06-19T14:21:26.000Z | class Library(object):
def __init__(self):
self.dictionary = {
"Micah": ["Judgement on Samaria and Judah", "Reason for the judgement", "Judgement on wicked leaders",
"Messianic Kingdom", "Birth of the Messiah", "Indictment 1, 2", "Promise of salvation"]
}
def get(self, book):
return self.dictionary.get(book)
| 36.7 | 114 | 0.618529 | 43 | 367 | 5.186047 | 0.72093 | 0.125561 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.00738 | 0.26158 | 367 | 9 | 115 | 40.777778 | 0.815498 | 0 | 0 | 0 | 0 | 0 | 0.430518 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0 | 0.125 | 0.5 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 3 |
893b9e065a28f5630ccaded0f017079ecfaf7dc8 | 200 | py | Python | empyres/log/__init__.py | waigore/empyres4x | aa3bbf94ea0bca280152e92d485d5825a4b352ca | [
"Apache-2.0"
] | null | null | null | empyres/log/__init__.py | waigore/empyres4x | aa3bbf94ea0bca280152e92d485d5825a4b352ca | [
"Apache-2.0"
] | null | null | null | empyres/log/__init__.py | waigore/empyres4x | aa3bbf94ea0bca280152e92d485d5825a4b352ca | [
"Apache-2.0"
] | null | null | null | import logging
import logging.config
import os
logging.config.fileConfig(os.path.join(os.path.dirname(__file__), 'logging.conf'))
logger = logging.getLogger(__name__)
logger.info('Logging set up.')
| 22.222222 | 82 | 0.785 | 28 | 200 | 5.321429 | 0.571429 | 0.174497 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.08 | 200 | 8 | 83 | 25 | 0.809783 | 0 | 0 | 0 | 0 | 0 | 0.135 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
895b9204b1c7babcc360e02ed5bd834e6e8b6c56 | 136 | py | Python | DMOJ/DMOPC/DMOPC_14_C1P1_Median_Mark.py | Togohogo1/pg | ee3c36acde47769c66ee13a227762ee677591375 | [
"MIT"
] | null | null | null | DMOJ/DMOPC/DMOPC_14_C1P1_Median_Mark.py | Togohogo1/pg | ee3c36acde47769c66ee13a227762ee677591375 | [
"MIT"
] | 1 | 2021-10-14T18:26:56.000Z | 2021-10-14T18:26:56.000Z | DMOJ/DMOPC/DMOPC_14_C1P1_Median_Mark.py | Togohogo1/pg | ee3c36acde47769c66ee13a227762ee677591375 | [
"MIT"
] | 1 | 2021-08-06T03:39:55.000Z | 2021-08-06T03:39:55.000Z | import math
import statistics
c = []
for i in range(int(input())):
c.append(int(input()))
print(math.ceil(statistics.median(c)))
| 13.6 | 38 | 0.669118 | 21 | 136 | 4.333333 | 0.666667 | 0.175824 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.147059 | 136 | 9 | 39 | 15.111111 | 0.784483 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 0.333333 | 0.166667 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
896363c649069897110f5ef453bca2a7e5aa1e13 | 5,793 | py | Python | experiments/models/dcgan.py | zhaodongsun/pnp_dip | f8f3802af8c607b3063fc7b92e20729f148d36c1 | [
"MIT"
] | 4 | 2021-10-12T09:13:08.000Z | 2022-02-14T19:59:43.000Z | experiments/models/dcgan.py | zhaodongsun/pnp_dip | f8f3802af8c607b3063fc7b92e20729f148d36c1 | [
"MIT"
] | 1 | 2021-05-20T04:22:00.000Z | 2021-05-21T06:44:47.000Z | experiments/models/dcgan.py | zhaodongsun/pnp_dip | f8f3802af8c607b3063fc7b92e20729f148d36c1 | [
"MIT"
] | 1 | 2021-11-27T11:35:06.000Z | 2021-11-27T11:35:06.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
def dcgan(inp=2,
ndf=32,
num_ups=4, need_sigmoid=True, need_bias=True, pad='zero', upsample_mode='nearest', need_convT = True):
layers= [nn.ConvTranspose2d(inp, ndf, kernel_size=3, stride=1, padding=0, bias=False),
nn.BatchNorm2d(ndf),
nn.LeakyReLU(True)]
for i in range(num_ups-3):
if need_convT:
layers += [ nn.ConvTranspose2d(ndf, ndf, kernel_size=4, stride=2, padding=1, bias=False),
nn.BatchNorm2d(ndf),
nn.LeakyReLU(True)]
else:
layers += [ nn.Upsample(scale_factor=2, mode=upsample_mode),
nn.Conv2d(ndf, ndf, kernel_size=3, stride=1, padding=1, bias=False),
nn.BatchNorm2d(ndf),
nn.LeakyReLU(True)]
if need_convT:
layers += [nn.ConvTranspose2d(ndf, 3, 4, 2, 1, bias=False),]
else:
layers += [nn.Upsample(scale_factor=2, mode='bilinear'),
nn.Conv2d(ndf, 3, kernel_size=3, stride=1, padding=1, bias=False)]
if need_sigmoid:
layers += [nn.Sigmoid()]
model =nn.Sequential(*layers)
return model
class DCGAN_XRAY(nn.Module):
def __init__(self, nz, ngf=64, output_size=256, nc=3, num_measurements=1000):
super(DCGAN_XRAY, self).__init__()
self.nc = nc
self.output_size = output_size
self.conv1 = nn.ConvTranspose2d(nz, ngf, 4, 1, 0, bias=False)
self.bn1 = nn.BatchNorm2d(ngf)
self.conv2 = nn.ConvTranspose2d(ngf, ngf, 6, 2, 2, bias=False)
self.bn2 = nn.BatchNorm2d(ngf)
self.conv3 = nn.ConvTranspose2d(ngf, ngf, 6, 2, 2, bias=False)
self.bn3 = nn.BatchNorm2d(ngf)
self.conv4 = nn.ConvTranspose2d(ngf, ngf, 6, 2, 2, bias=False)
self.bn4 = nn.BatchNorm2d(ngf)
self.conv5 = nn.ConvTranspose2d(ngf, ngf, 6, 2, 2, bias=False)
self.bn5 = nn.BatchNorm2d(ngf)
self.conv6 = nn.ConvTranspose2d(ngf, ngf, 6, 2, 2, bias=False)
self.bn6 = nn.BatchNorm2d(ngf)
self.conv7 = nn.ConvTranspose2d(ngf, nc, 4, 2, 1, bias=False) # output is image
def forward(self, z):
input_size = z.size()
x = F.relu(self.bn1(self.conv1(z)))
x = F.relu(self.bn2(self.conv2(x)))
x = F.relu(self.bn3(self.conv3(x)))
x = F.relu(self.bn4(self.conv4(x)))
x = F.relu(self.bn5(self.conv5(x)))
x = F.relu(self.bn6(self.conv6(x)))
x = torch.sigmoid(self.conv7(x, output_size=(-1, self.nc, self.output_size, self.output_size)))
return x
class DCGAN_MNIST(nn.Module):
def __init__(self, nz, ngf=64, output_size=28, nc=1, num_measurements=10):
super(DCGAN_MNIST, self).__init__()
self.nc = nc
self.output_size = output_size
self.conv1 = nn.ConvTranspose2d(nz, ngf * 8, 2, 1, 0, bias=False)
self.bn1 = nn.BatchNorm2d(ngf * 8)
self.conv2 = nn.ConvTranspose2d(ngf * 8, ngf * 4, 4, 1, 0, bias=False)
self.bn2 = nn.BatchNorm2d(ngf * 4)
self.conv3 = nn.ConvTranspose2d(ngf * 4, ngf * 2, 3, 1, 1, bias=False)
self.bn3 = nn.BatchNorm2d(ngf * 2)
self.conv4 = nn.ConvTranspose2d(ngf * 2, ngf, 3, 1, 1, bias=False)
self.bn4 = nn.BatchNorm2d(ngf)
self.conv5 = nn.ConvTranspose2d(ngf, nc, 3, 1, 1, bias=False)
def forward(self, x):
input_size = x.size()
# DCGAN_MNIST with old PyTorch version
# x = F.upsample(F.relu(self.bn1(self.conv1(x))),scale_factor=2)
# x = F.relu(self.bn2(self.conv2(x)))
# x = F.upsample(F.relu(self.bn3(self.conv3(x))),scale_factor=2)
# x = F.upsample(F.relu(self.bn4(self.conv4(x))),scale_factor=2)
# x = torch.tanh(self.conv5(x,output_size=(-1,self.nc,self.output_size,self.output_size)))
x = F.interpolate(F.relu(self.bn1(self.conv1(x))), scale_factor=2)
x = F.relu(self.bn2(self.conv2(x)))
x = F.interpolate(F.relu(self.bn3(self.conv3(x))), scale_factor=2)
x = F.interpolate(F.relu(self.bn4(self.conv4(x))), scale_factor=2)
x = torch.sigmoid(self.conv5(x, output_size=(-1, self.nc, self.output_size, self.output_size)))
return x
class DCGAN_RETINO(nn.Module):
def __init__(self, nz, ngf=64, output_size=256, nc=3, num_measurements=1000):
super(DCGAN_RETINO, self).__init__()
self.nc = nc
self.output_size = output_size
self.conv1 = nn.ConvTranspose2d(nz, ngf, 4, 1, 0, bias=False)
self.bn1 = nn.BatchNorm2d(ngf)
self.conv2 = nn.ConvTranspose2d(ngf, ngf, 6, 2, 2, bias=False)
self.bn2 = nn.BatchNorm2d(ngf)
self.conv3 = nn.ConvTranspose2d(ngf, ngf, 6, 2, 2, bias=False)
self.bn3 = nn.BatchNorm2d(ngf)
self.conv4 = nn.ConvTranspose2d(ngf, ngf, 6, 2, 2, bias=False)
self.bn4 = nn.BatchNorm2d(ngf)
self.conv5 = nn.ConvTranspose2d(ngf, ngf, 6, 2, 2, bias=False)
self.bn5 = nn.BatchNorm2d(ngf)
self.conv6 = nn.ConvTranspose2d(ngf, nc, 4, 2, 1, bias=False)
# self.fc = nn.Linear((output_size)*(output_size)*nc,num_measurements, bias=False) #fc layer - old version
def forward(self, x):
input_size = x.size()
x = F.relu(self.bn1(self.conv1(x)))
x = F.relu(self.bn2(self.conv2(x)))
x = F.relu(self.bn3(self.conv3(x)))
x = F.relu(self.bn4(self.conv4(x)))
x = F.relu(self.bn5(self.conv5(x)))
x = torch.sigmoid(self.conv6(x, output_size=(-1, self.nc, self.output_size, self.output_size)))
return x | 43.231343 | 115 | 0.582945 | 846 | 5,793 | 3.893617 | 0.117021 | 0.065574 | 0.051913 | 0.039466 | 0.81269 | 0.765938 | 0.744687 | 0.693078 | 0.626897 | 0.585914 | 0 | 0.056604 | 0.268082 | 5,793 | 134 | 116 | 43.231343 | 0.720283 | 0.081132 | 0 | 0.533981 | 0 | 0 | 0.003667 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.067961 | false | 0 | 0.029126 | 0 | 0.165049 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
8966c49bdc27990bdccb45446aa23c8fa6bda9e4 | 442 | py | Python | description_widgets.py | athrn/kognitivo | 15822338778213c09ea654ec4e06a300129f9478 | [
"Apache-2.0"
] | 80 | 2017-11-13T21:58:55.000Z | 2022-01-03T20:10:42.000Z | description_widgets.py | athrn/kognitivo | 15822338778213c09ea654ec4e06a300129f9478 | [
"Apache-2.0"
] | null | null | null | description_widgets.py | athrn/kognitivo | 15822338778213c09ea654ec4e06a300129f9478 | [
"Apache-2.0"
] | 21 | 2017-11-14T09:47:41.000Z | 2021-11-23T06:44:31.000Z | from kivy.uix.label import Label
from kivy.uix.widget import Widget
from utils import import_kv
import_kv(__file__)
class BaseDescriptionWidget(Widget):
pass
class TextDescriptionWidget(Label, BaseDescriptionWidget):
pass
class SymbolTextDescriptionWidget(Label, BaseDescriptionWidget):
def __init__(self, **kwargs):
super(SymbolTextDescriptionWidget, self).__init__(**kwargs)
self.font_name = "glyphicons"
| 22.1 | 67 | 0.771493 | 46 | 442 | 7.086957 | 0.478261 | 0.04908 | 0.067485 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.149321 | 442 | 19 | 68 | 23.263158 | 0.867021 | 0 | 0 | 0.166667 | 0 | 0 | 0.022624 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.083333 | false | 0.166667 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 3 |
897f94342875182a66572e8bd80ae93237c11276 | 962 | py | Python | easyrules/__init__.py | wffzxyl/easyrules | 8874718fec629435c69ce360cd43a281da162627 | [
"MIT"
] | 1 | 2020-10-03T12:34:01.000Z | 2020-10-03T12:34:01.000Z | easyrules/__init__.py | wffzxyl/easyrules | 8874718fec629435c69ce360cd43a281da162627 | [
"MIT"
] | null | null | null | easyrules/__init__.py | wffzxyl/easyrules | 8874718fec629435c69ce360cd43a281da162627 | [
"MIT"
] | null | null | null | # coding: utf-8
# flake8: noqa
from __future__ import absolute_import
VERSION = (0, 2, 1)
__version__ = VERSION
__versionstr__ = ".".join(map(str, VERSION))
import logging
logger = logging.getLogger("easyrules")
logger.addHandler(logging.NullHandler())
from . import config
from .api import Action
from .api import Condition
from .api import Fact
from .api import Facts
from .api import Rule
from .api import RuleDecorator
from .api import RulesEngineListener
from .api import RuleListener
from .api import Rules
from .api import RulesEngine
from .api import RulesEngineParameters
from .core import DefaultRule
from .core import DefaultRuleEngine
from .core import RuleBuilder
from .support import ActivationRuleGroup
from .support import CompositeRule
from .support import ConditionalRuleGroup
from .support import UnitRuleGroup
from .support import YamlRuleDefinitionReader
from .support import YamlRuleFactory
from .utils import logger, exception_handler
| 26.722222 | 45 | 0.816008 | 120 | 962 | 6.425 | 0.416667 | 0.09987 | 0.185473 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.005945 | 0.12578 | 962 | 35 | 46 | 27.485714 | 0.91082 | 0.027027 | 0 | 0 | 0 | 0 | 0.010718 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.827586 | 0 | 0.827586 | 0 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
8980817119457f47f4b367ebe86b8a28179da299 | 354 | py | Python | notes/my_bad_script.py | areed1192/python-for-starters | bcb38a80cff5d2087ce95f9f815c8c1909737861 | [
"MIT"
] | 1 | 2021-05-26T01:08:39.000Z | 2021-05-26T01:08:39.000Z | notes/my_bad_script.py | areed1192/python-for-starters | bcb38a80cff5d2087ce95f9f815c8c1909737861 | [
"MIT"
] | null | null | null | notes/my_bad_script.py | areed1192/python-for-starters | bcb38a80cff5d2087ce95f9f815c8c1909737861 | [
"MIT"
] | 4 | 2021-04-28T00:37:06.000Z | 2022-03-04T00:00:55.000Z |
def split_full_name(string: str) -> list:
"""Takes a full name and splits it into first and last.
Parameters
----------
string : str
The full name to be parsed.
Returns
-------
list
The first and the last name.
"""
return string.split(" ")
# Test it out.
print(split_full_name(string=100000000))
| 16.857143 | 59 | 0.581921 | 47 | 354 | 4.297872 | 0.553191 | 0.158416 | 0.128713 | 0.188119 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.035857 | 0.29096 | 354 | 20 | 60 | 17.7 | 0.768924 | 0.533898 | 0 | 0 | 0 | 0 | 0.008264 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0 | 0 | 0.666667 | 0.333333 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3 |
8990b721037221c7126af1a48dedddaaf5536512 | 1,290 | py | Python | per/migrations/0003_auto_20190416_1021.py | IFRCGo/ifrcgo-api | c1c3e0cf1076ab48d03db6aaf7a00f8485ca9e1a | [
"MIT"
] | 11 | 2018-06-11T06:05:12.000Z | 2022-03-25T09:31:44.000Z | per/migrations/0003_auto_20190416_1021.py | IFRCGo/ifrcgo-api | c1c3e0cf1076ab48d03db6aaf7a00f8485ca9e1a | [
"MIT"
] | 498 | 2017-11-07T21:20:13.000Z | 2022-03-31T14:37:18.000Z | per/migrations/0003_auto_20190416_1021.py | IFRCGo/ifrcgo-api | c1c3e0cf1076ab48d03db6aaf7a00f8485ca9e1a | [
"MIT"
] | 6 | 2018-04-11T13:29:50.000Z | 2020-07-16T16:52:11.000Z | # Generated by Django 2.0.12 on 2019-04-16 10:21
from django.db import migrations, models
import django.utils.timezone
import uuid
class Migration(migrations.Migration):
dependencies = [
('per', '0002_form_ns'),
]
operations = [
migrations.AddField(
model_name='form',
name='comment',
field=models.TextField(blank=True, null=True),
),
migrations.AddField(
model_name='form',
name='ended_at',
field=models.DateTimeField(default=django.utils.timezone.now),
),
migrations.AddField(
model_name='form',
name='started_at',
field=models.DateTimeField(default=django.utils.timezone.now),
),
migrations.AddField(
model_name='form',
name='submitted_at',
field=models.DateTimeField(default=django.utils.timezone.now),
),
migrations.AddField(
model_name='form',
name='unique_id',
field=models.UUIDField(default=uuid.uuid4, editable=False, unique=True),
),
migrations.AddField(
model_name='form',
name='validated',
field=models.BooleanField(default=False),
),
]
| 28.043478 | 84 | 0.569767 | 126 | 1,290 | 5.738095 | 0.412698 | 0.149378 | 0.190871 | 0.224066 | 0.529737 | 0.529737 | 0.481328 | 0.373444 | 0.373444 | 0.373444 | 0 | 0.023675 | 0.312403 | 1,290 | 45 | 85 | 28.666667 | 0.791432 | 0.035659 | 0 | 0.538462 | 1 | 0 | 0.075684 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.076923 | 0 | 0.153846 | 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 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
899277d3f0483bc888d114acb38804f3316ed7d3 | 198 | py | Python | python/cdp_los_angeles_backend/__init__.py | mattyweb/los-angeles | dc3354915e196fb805a87f40f35e5707f29c1652 | [
"MIT"
] | null | null | null | python/cdp_los_angeles_backend/__init__.py | mattyweb/los-angeles | dc3354915e196fb805a87f40f35e5707f29c1652 | [
"MIT"
] | null | null | null | python/cdp_los_angeles_backend/__init__.py | mattyweb/los-angeles | dc3354915e196fb805a87f40f35e5707f29c1652 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Top-level package for Los Angeles
CDP instance backend.
"""
__author__ = "Matt Webster"
__version__ = "1.0.0"
def get_module_version() -> str:
return __version__
| 14.142857 | 33 | 0.666667 | 26 | 198 | 4.538462 | 0.884615 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.024691 | 0.181818 | 198 | 13 | 34 | 15.230769 | 0.703704 | 0.393939 | 0 | 0 | 0 | 0 | 0.151786 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0 | 0.25 | 0.5 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 3 |
899315b2a317eab99147fe92d0ac2e4a2758abe4 | 139 | py | Python | src/analytics/urls.py | TolgaKara/prodai | a858d39226a072a2a52513d942dd046bb3787da8 | [
"Apache-2.0"
] | null | null | null | src/analytics/urls.py | TolgaKara/prodai | a858d39226a072a2a52513d942dd046bb3787da8 | [
"Apache-2.0"
] | 7 | 2020-10-09T09:24:28.000Z | 2022-03-12T00:14:07.000Z | src/analytics/urls.py | TolgaKara/prodai | a858d39226a072a2a52513d942dd046bb3787da8 | [
"Apache-2.0"
] | null | null | null | from django.urls import path, include
from src.analytics import views
urlpatterns = [
path('', views.analytics, name='analytics'),
]
| 17.375 | 48 | 0.719424 | 17 | 139 | 5.882353 | 0.647059 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.158273 | 139 | 7 | 49 | 19.857143 | 0.854701 | 0 | 0 | 0 | 0 | 0 | 0.064748 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.4 | 0 | 0.4 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
89bd7a1c82d4de4c7a0ffcee38c719ac45f52dc0 | 636 | py | Python | embiggen/layers/tensorflow/__init__.py | monarch-initiative/N2V | 8ae02ca125f1d24ca158c2849f2d9bb1711920b9 | [
"BSD-3-Clause"
] | 2 | 2020-01-30T11:57:37.000Z | 2020-05-02T00:05:49.000Z | embiggen/layers/tensorflow/__init__.py | monarch-initiative/N2V | 8ae02ca125f1d24ca158c2849f2d9bb1711920b9 | [
"BSD-3-Clause"
] | 93 | 2020-01-26T00:43:51.000Z | 2020-05-10T03:29:54.000Z | embiggen/layers/tensorflow/__init__.py | monarch-initiative/N2V | 8ae02ca125f1d24ca158c2849f2d9bb1711920b9 | [
"BSD-3-Clause"
] | 5 | 2020-02-13T07:18:11.000Z | 2020-03-19T08:03:34.000Z | """Submodule providing tensorflow layers."""
from embiggen.layers.tensorflow.graph_convolution_layer import GraphConvolution
from embiggen.layers.tensorflow.noise_contrastive_estimation import NoiseContrastiveEstimation
from embiggen.layers.tensorflow.sampled_softmax import SampledSoftmax
from embiggen.layers.tensorflow.embedding_lookup import EmbeddingLookup
from embiggen.layers.tensorflow.flat_embedding import FlatEmbedding
from embiggen.layers.tensorflow.l2_norm import L2Norm
__all__ = [
"GraphConvolution",
"NoiseContrastiveEstimation",
"SampledSoftmax",
"EmbeddingLookup",
"FlatEmbedding",
"L2Norm"
]
| 37.411765 | 94 | 0.830189 | 61 | 636 | 8.459016 | 0.442623 | 0.139535 | 0.209302 | 0.325581 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.005236 | 0.099057 | 636 | 16 | 95 | 39.75 | 0.895288 | 0.059748 | 0 | 0 | 0 | 0 | 0.152027 | 0.043919 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.428571 | 0 | 0.428571 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
983c65097575f5f76dccd3df94eea5f5102e6339 | 255 | py | Python | setup.py | Kesel/django | f3fc3617c4b39b18e54bfb4c2fc8940e40f8fa25 | [
"MIT"
] | null | null | null | setup.py | Kesel/django | f3fc3617c4b39b18e54bfb4c2fc8940e40f8fa25 | [
"MIT"
] | null | null | null | setup.py | Kesel/django | f3fc3617c4b39b18e54bfb4c2fc8940e40f8fa25 | [
"MIT"
] | null | null | null | from setuptools import setup
setup(name='django-on-openshift',
version='2.0',
description='Django on OpenShift',
author='Biwin John',
author_email='mail@biwin.in',
url='https://github.com/biwin/django-on-openshift',
)
| 25.5 | 57 | 0.647059 | 32 | 255 | 5.125 | 0.6875 | 0.146341 | 0.310976 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.009804 | 0.2 | 255 | 9 | 58 | 28.333333 | 0.794118 | 0 | 0 | 0 | 0 | 0 | 0.423529 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.125 | 0 | 0.125 | 0 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
98402d2772ebb180a88617d9578741a4df8acf0a | 957 | py | Python | cardbuilder/input/word_list.py | jrhoff/cardbuilder | 857360b1827494a286cee9928cb004af882e55b4 | [
"MIT"
] | null | null | null | cardbuilder/input/word_list.py | jrhoff/cardbuilder | 857360b1827494a286cee9928cb004af882e55b4 | [
"MIT"
] | null | null | null | cardbuilder/input/word_list.py | jrhoff/cardbuilder | 857360b1827494a286cee9928cb004af882e55b4 | [
"MIT"
] | null | null | null | from abc import ABC
from copy import copy
from typing import List, Iterable, Optional, Union
from cardbuilder.input.word import Word, WordForm
class WordList(ABC):
def __init__(self, word_input_forms: Iterable[str], language: str, additional_forms: Optional[List[WordForm]]):
self.words = [Word(input_form, language, additional_forms) for input_form in word_input_forms]
def __getitem__(self, index: Union[int, slice]) -> Union[Word, 'WordList']:
if isinstance(index, int):
return self.words[index]
elif isinstance(index, slice):
list_copy = copy(self)
list_copy.words = self.words[index]
return list_copy
else:
raise TypeError('WordList indices must be either integers or slices')
def __iter__(self):
return iter(self.words)
def __len__(self):
return len(self.words)
def __repr__(self):
return repr(self.words)
| 29.90625 | 115 | 0.666667 | 122 | 957 | 4.97541 | 0.385246 | 0.088962 | 0.046129 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.240334 | 957 | 31 | 116 | 30.870968 | 0.834938 | 0 | 0 | 0 | 0 | 0 | 0.060669 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.227273 | false | 0 | 0.181818 | 0.136364 | 0.681818 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
98585c83774a96ddf3fb29e2caa3b89cf21e0fa1 | 282 | py | Python | pyfor/__init__.py | brycefrank/pyfor | efd34bcd7440358abea770c1bf5cad5e05a6fbe3 | [
"MIT"
] | 68 | 2018-04-02T18:00:29.000Z | 2022-03-14T09:41:21.000Z | pyfor/__init__.py | brycefrank/PyFor | efd34bcd7440358abea770c1bf5cad5e05a6fbe3 | [
"MIT"
] | 68 | 2018-04-04T19:15:21.000Z | 2020-02-14T19:03:49.000Z | pyfor/__init__.py | brycefrank/PyFor | efd34bcd7440358abea770c1bf5cad5e05a6fbe3 | [
"MIT"
] | 23 | 2018-04-03T16:30:40.000Z | 2021-09-16T08:06:05.000Z | from __future__ import absolute_import
__version__ = "0.3.6"
from pyfor import cloud
from pyfor import rasterizer
from pyfor import gisexport
from pyfor import clip
from pyfor import ground_filter
from pyfor import collection
from pyfor import voxelizer
from pyfor import metrics
| 21.692308 | 38 | 0.836879 | 42 | 282 | 5.380952 | 0.428571 | 0.318584 | 0.530973 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.012448 | 0.14539 | 282 | 12 | 39 | 23.5 | 0.925311 | 0 | 0 | 0 | 0 | 0 | 0.017731 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.9 | 0 | 0.9 | 0 | 0 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
9869ad66b58a9f4a34f0b342f504102754bd1a4e | 1,093 | py | Python | src/pyhees/section10_j1_d.py | jjj-design/pyhees | d63e7cd84abfc2f509bc1cd1256598a10aac1825 | [
"MIT"
] | null | null | null | src/pyhees/section10_j1_d.py | jjj-design/pyhees | d63e7cd84abfc2f509bc1cd1256598a10aac1825 | [
"MIT"
] | null | null | null | src/pyhees/section10_j1_d.py | jjj-design/pyhees | d63e7cd84abfc2f509bc1cd1256598a10aac1825 | [
"MIT"
] | null | null | null | # 洗濯機
def get_E_Elc_washer_d_t(E_Elc_washer_wash_rtd, tm_washer_wash_d_t):
"""時刻別消費電力量を計算する
Parameters
----------
E_Elc_washer_wash_rtd : float
標準コースの洗濯の定格消費電力量,Wh
tm_washer_wash_d_t : ndarray(N-dimensional array)
1年間の全時間の洗濯回数を格納したND配列, 回
d日t時の洗濯回数が年開始時から8760個連続して格納されている
Returns
----------
E_Elc_toilet_seat_heater_d_t : ndarray(N-dimensional array)
1年間の全時間の消費電力量を格納したND配列, Wh
d日t時の消費電力量が年開始時から8760個連続して格納されている
"""
E_Elc_washer_wash = get_E_Elc_washer_wash(E_Elc_washer_wash_rtd)
E_Elc_washer_d_t = E_Elc_washer_wash * tm_washer_wash_d_t
E_Elc_washer_d_t = E_Elc_washer_d_t * 10**(-3)
return E_Elc_washer_d_t
def get_E_Elc_washer_wash(E_Elc_washer_wash_rtd):
"""洗濯時の消費電力量を計算する
Parameters
----------
E_Elc_washer_wash_rtd : float
標準コースの洗濯の定格消費電力量,Wh
Returns
----------
E_Elc_washer_wash : float
1回の洗濯の消費電力量,Wh
"""
E_Elc_washer_wash = 1.3503 * E_Elc_washer_wash_rtd - 42.848
return E_Elc_washer_wash
| 23.255319 | 69 | 0.674291 | 148 | 1,093 | 4.398649 | 0.256757 | 0.116743 | 0.276498 | 0.27957 | 0.579109 | 0.457757 | 0.37788 | 0.371736 | 0.337942 | 0.104455 | 0 | 0.028916 | 0.240622 | 1,093 | 46 | 70 | 23.76087 | 0.755422 | 0.477585 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0 | 0 | 0.5 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
9871e79d855a7f9da8d94e60b5f377510b9de886 | 1,759 | py | Python | api.flask.v1/controllers/status.py | davelosert/medishare | bbe1a61f185e1cf6ffe6f37b8d37577dda29a01c | [
"MIT"
] | 1 | 2020-12-14T15:20:15.000Z | 2020-12-14T15:20:15.000Z | api.flask.v1/controllers/status.py | davelosert/medishare | bbe1a61f185e1cf6ffe6f37b8d37577dda29a01c | [
"MIT"
] | 5 | 2021-10-06T14:03:45.000Z | 2022-02-27T01:33:33.000Z | api.flask.v1/controllers/status.py | davelosert/medishare | bbe1a61f185e1cf6ffe6f37b8d37577dda29a01c | [
"MIT"
] | null | null | null | from flask import request, jsonify
from flask.views import MethodView
from models import Status
from db import db
class StatusAPI(MethodView):
def get(self, id):
if id is None:
return jsonify([s.serialize for s in Status.query.all()])
else:
status = Status.query.filter_by(id=id).one_or_none()
if not status:
return jsonify({'message' : 'Status not found'}), 404
return jsonify(status.serialize)
def post(self):
new_status = Status.fromJson(request.get_json())
if new_status is None:
return jsonify({'message' : 'Status title missing'}), 400
db.session.add(new_status)
db.session.commit()
return jsonify({'message' : 'New Status created!'}), 201
def delete(self, id):
if id is None:
return jsonify({'message' : 'Invalid request'}), 400
status = Status.query.filter_by(id=id).one_or_none()
if not status:
return jsonify({'message' : 'Status not found'}), 404
db.session.delete(status)
db.session.commit()
return jsonify({'message' : 'Status deleted'}), 202
def put(self, id):
if id is None:
return jsonify({'message' : 'Invalid request'}), 400
new_status = Status.fromJson(request.get_json())
if new_status is None:
return jsonify({'message' : 'Status data missing or incomplete'}), 400
status = Status.query.filter_by(id=id).one_or_none()
if not status:
return jsonify({'message' : 'Status not found'}), 404
status.name = new_status.name
db.session.commit()
return jsonify({'message' : 'Status updated'}), 202 | 32.574074 | 82 | 0.594088 | 217 | 1,759 | 4.737327 | 0.258065 | 0.151751 | 0.194553 | 0.177043 | 0.666342 | 0.666342 | 0.666342 | 0.540856 | 0.512646 | 0.512646 | 0 | 0.023981 | 0.2888 | 1,759 | 54 | 83 | 32.574074 | 0.797762 | 0 | 0 | 0.512195 | 0 | 0 | 0.140909 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.097561 | false | 0 | 0.097561 | 0 | 0.512195 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3 |
987de15c788602a643de269378bdb5af47c0f1a0 | 2,259 | py | Python | SimpleCV/tests/DisplayTester.py | nikhilgk/SimpleCV | ee64451c16db1f40b4da221115273020a6a7b01a | [
"BSD-3-Clause"
] | 2 | 2016-04-30T12:23:05.000Z | 2022-03-02T00:01:10.000Z | SimpleCV/tests/DisplayTester.py | nikhilgk/SimpleCV | ee64451c16db1f40b4da221115273020a6a7b01a | [
"BSD-3-Clause"
] | null | null | null | SimpleCV/tests/DisplayTester.py | nikhilgk/SimpleCV | ee64451c16db1f40b4da221115273020a6a7b01a | [
"BSD-3-Clause"
] | null | null | null | import time
from SimpleCV import *
from SimpleCV.Display import Display, pg
w = 400
h = 300
t=1
display = Display(resolution = (w,h)) #create a new display to draw images on
img = Image('../sampleimages/aerospace.jpg')
img = img.scale(800,600)
img2 = img.scale(w,h)
smallWbigH = img.scale(100,400)
smallHbigW = img2.scale(500,100)
smallW = img2.scale(100,h)
smallH = img2.scale(w,100)
small = img2.scale(99,23)
big = img2.scale(555,432)
foo = "Image:"+str((img.width,img.height))
print(foo)
print('Image should scale clean')
display.writeFrame(img)
time.sleep(t)
foo = "Image:"+str((img2.width,img2.height))
print(foo)
print('Image should scale clean')
display.writeFrame(img2)
time.sleep(t)
foo = "Image:"+str((smallWbigH.width,smallWbigH.height))
print(foo)
display.writeFrame(smallWbigH)
time.sleep(t)
foo = "Image:"+str((smallHbigW.width,smallHbigW.height))
print(foo)
display.writeFrame(smallHbigW)
time.sleep(t)
foo = "Image:"+str((smallW.width,smallW.height))
print(foo)
display.writeFrame(smallW)
time.sleep(t)
foo = "Image:"+str((smallH.width,smallH.height))
print(foo)
display.writeFrame(smallH)
time.sleep(t)
foo = "Image:"+str((small.width,small.height))
print(foo)
display.writeFrame(small)
time.sleep(t)
foo = "Image:"+str((big.width,big.height))
print(foo)
display.writeFrame(big)
time.sleep(t)
foo = "Crop Image:"+str((img.width,img.height))
print(foo)
display.writeFrame(img, fit=False)
time.sleep(t)
foo = "Crop Image:"+str((img2.width,img2.height))
print(foo)
display.writeFrame(img2, fit=False)
time.sleep(t)
foo = "Crop Image:"+str((smallWbigH.width,smallWbigH.height))
print(foo)
display.writeFrame(smallWbigH, fit=False)
time.sleep(t)
foo = "Crop Image:"+str((smallHbigW.width,smallHbigW.height))
print(foo)
display.writeFrame(smallHbigW, fit=False)
time.sleep(t)
foo = "Crop Image:"+str((smallW.width,smallW.height))
print(foo)
display.writeFrame(smallW, fit=False)
time.sleep(t)
foo = "Crop Image:"+str((smallH.width,smallH.height))
print(foo)
display.writeFrame(smallH, fit=False)
time.sleep(t)
foo = "Crop Image:"+str((small.width,small.height))
print(foo)
display.writeFrame(small, fit=False)
time.sleep(t)
foo = "Crop Image:"+str((big.width,big.height))
print(foo)
display.writeFrame(big, fit=False)
time.sleep(t)
| 22.818182 | 77 | 0.73351 | 349 | 2,259 | 4.747851 | 0.151862 | 0.077248 | 0.135184 | 0.117683 | 0.799638 | 0.768256 | 0.713337 | 0.703078 | 0.642728 | 0.532287 | 0 | 0.025666 | 0.085879 | 2,259 | 98 | 78 | 23.05102 | 0.776755 | 0.016822 | 0 | 0.414634 | 0 | 0 | 0.095946 | 0.013063 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.036585 | 0 | 0.036585 | 0.219512 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
98aa429642c9bfeff4ee8a19c9d429a407cad0fd | 559 | py | Python | dns_shark/errors/dns_refused_error.py | jmiiller/dns_shark | 80ee4c7ec32fc3fec202e5142cf745d432770947 | [
"MIT"
] | 3 | 2020-01-21T20:32:35.000Z | 2020-08-01T07:14:55.000Z | dns_shark/errors/dns_refused_error.py | jmiiller/dns_shark | 80ee4c7ec32fc3fec202e5142cf745d432770947 | [
"MIT"
] | 4 | 2020-01-20T01:16:39.000Z | 2020-01-20T01:34:27.000Z | dns_shark/errors/dns_refused_error.py | jmiiller/dns_shark | 80ee4c7ec32fc3fec202e5142cf745d432770947 | [
"MIT"
] | null | null | null | from dns_shark.errors.dns_shark_error import DNSSharkError
class DNSRefusedError(DNSSharkError):
"""
An error that indicates an rcode of 5 was returned by a dns message.
'Refused - The name server refuses to perform the specified operation for policy reasons. For example, a name
server may not wish to provide the information to the particular requester, or a name server may not wish to perform
a particular operation (e.g., zone transfer) for particular data.'
see https://tools.ietf.org/rfc/rfc1035.txt for more info.
"""
| 39.928571 | 120 | 0.747764 | 85 | 559 | 4.882353 | 0.658824 | 0.072289 | 0.053012 | 0.06747 | 0.110843 | 0.110843 | 0.110843 | 0 | 0 | 0 | 0 | 0.011086 | 0.193202 | 559 | 13 | 121 | 43 | 0.909091 | 0.756708 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
7f5c908d10f8ff7c172832a0c9aad1b644569501 | 631 | py | Python | src/model/utils.py | ahamza1/instance-segmentation-mask-rcnn | b4be9dfcfeea5e56f0923bb2500b56b36cfdbd77 | [
"MIT"
] | null | null | null | src/model/utils.py | ahamza1/instance-segmentation-mask-rcnn | b4be9dfcfeea5e56f0923bb2500b56b36cfdbd77 | [
"MIT"
] | 1 | 2021-09-07T18:16:54.000Z | 2021-09-07T18:16:54.000Z | src/model/utils.py | ahamza1/instance-segmentation-mask-rcnn | b4be9dfcfeea5e56f0923bb2500b56b36cfdbd77 | [
"MIT"
] | null | null | null | import argparse
def get_args():
ap = argparse.ArgumentParser()
ap.add_argument("-d", "--data", required=True)
ap.add_argument("-l", "--labels", required=True)
ap.add_argument("-w", "--weights", required=False)
args = vars(ap.parse_args())
return args["data"], args["labels"], args["weights"]
def get_args_inference():
ap = argparse.ArgumentParser()
ap.add_argument("-i", "--image", required=True)
ap.add_argument("-l", "--labels", required=True)
ap.add_argument("-w", "--weights", required=True)
args = vars(ap.parse_args())
return args["image"], args["labels"], args["weights"]
| 31.55 | 57 | 0.638669 | 81 | 631 | 4.839506 | 0.296296 | 0.076531 | 0.19898 | 0.173469 | 0.709184 | 0.709184 | 0.520408 | 0.372449 | 0.372449 | 0.372449 | 0 | 0 | 0.152139 | 631 | 19 | 58 | 33.210526 | 0.73271 | 0 | 0 | 0.4 | 0 | 0 | 0.14897 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.133333 | false | 0 | 0.066667 | 0 | 0.333333 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
7f6504d862774e895b590da3b392c2330d3d150a | 883 | py | Python | framework/transactions/utils.py | DanielSBrown/osf.io | 98dda2ac237377197acacce78274bc0a4ce8f303 | [
"Apache-2.0"
] | 1 | 2015-10-02T18:35:53.000Z | 2015-10-02T18:35:53.000Z | framework/transactions/utils.py | DanielSBrown/osf.io | 98dda2ac237377197acacce78274bc0a4ce8f303 | [
"Apache-2.0"
] | 13 | 2020-03-24T15:29:41.000Z | 2022-03-11T23:15:28.000Z | framework/transactions/utils.py | DanielSBrown/osf.io | 98dda2ac237377197acacce78274bc0a4ce8f303 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from flask import make_response
from framework.exceptions import HTTPError
from framework.routing import JSONRenderer, render_mako_string
from website.util import is_json_request
def get_error_message(error):
"""Retrieve error message from error, if available.
"""
try:
return error.args[0]
except IndexError:
return ''
def handle_error(code):
"""Display an error thrown outside a routed view function.
:param int code: Error status code
:return: Flask `Response` object
"""
# TODO: Remove circular import
from website.routes import OsfWebRenderer
json_renderer = JSONRenderer()
web_renderer = OsfWebRenderer('', render_mako_string)
error = HTTPError(code)
renderer = json_renderer if is_json_request() else web_renderer
return make_response(renderer.handle_error(error))
| 24.527778 | 67 | 0.721404 | 109 | 883 | 5.678899 | 0.513761 | 0.038772 | 0.051696 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.002829 | 0.199321 | 883 | 35 | 68 | 25.228571 | 0.872702 | 0.261608 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.028571 | 0 | 1 | 0.125 | false | 0 | 0.3125 | 0 | 0.625 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
7f68f45294bdba63c039e75b3f968c36731a619a | 5,937 | py | Python | tests/test_avl.py | Anirban166/tstl | 73dac02f084b10e1bf2f172a5d1306bb5fbd7f7e | [
"Apache-2.0"
] | 90 | 2015-04-07T10:26:53.000Z | 2022-03-07T15:14:57.000Z | tests/test_avl.py | Anirban166/tstl | 73dac02f084b10e1bf2f172a5d1306bb5fbd7f7e | [
"Apache-2.0"
] | 14 | 2015-10-13T16:25:59.000Z | 2021-01-21T18:31:03.000Z | tests/test_avl.py | Anirban166/tstl | 73dac02f084b10e1bf2f172a5d1306bb5fbd7f7e | [
"Apache-2.0"
] | 32 | 2015-04-07T10:41:29.000Z | 2022-02-26T05:17:28.000Z | from __future__ import print_function
import os
import subprocess
import glob
from unittest import TestCase
class TestAVL(TestCase):
def setUp(self):
os.chdir("examples/AVL")
def tearDown(self):
os.chdir("../..")
def test_AVL(self):
if (os.getenv("TRAVIS") == "TRUE") and (os.getenv("TASK") != "AVL"):
return
dnull = open(os.devnull, 'w')
r = subprocess.call(["tstl", "avlbuggy.tstl"], stdout=dnull)
self.assertEqual(r, 0)
r = subprocess.call(
["tstl_rt", "--noCover", "--output", ".avltest.test", "--silentSUT"])
self.assertEqual(r, 255)
r = subprocess.call(
["tstl_rt", "--output", ".avltest.test", "--silentSUT", "--multiple",
"--quickTests", "--timeout", "45"], stdout=dnull, stderr=dnull)
self.assertEqual(r, 255)
self.assertNotEqual(len(glob.glob("quick.*.test")), 0)
r = subprocess.call(["tstl_replay", ".avltest.test"], stdout=dnull)
self.assertEqual(r, 255)
r = subprocess.call(
["tstl_reduce", ".avltest.test", ".avltest.norm.test"], stdout=dnull)
self.assertEqual(r, 0)
r = subprocess.call(
["tstl_replay", ".avltest.norm.test", "--verbose"], stdout=dnull)
self.assertEqual(r, 255)
r = subprocess.call(
["tstl_reduce", ".avltest.test", ".avltest.keepnorm.test", "--keepLast"],
stdout=dnull)
self.assertEqual(r, 0)
r = subprocess.call(
["tstl_replay", ".avltest.keepnorm.test"], stdout=dnull)
self.assertEqual(r, 255)
r = subprocess.call(
["tstl_reduce", ".avltest.full.test", ".avltest.ddnorm.test", "--ddmin"],
stdout=dnull)
self.assertEqual(r, 0)
r = subprocess.call(
["tstl_replay", ".avltest.ddnorm.test"], stdout=dnull)
self.assertEqual(r, 255)
r = subprocess.call(["tstl_generalize", ".avltest.norm.test"], stdout=dnull)
self.assertEqual(r, 0)
r = subprocess.call(
["tstl_standalone", ".avltest.norm.test", ".avltest.norm.py"], stdout=dnull)
self.assertEqual(r, 0)
r = subprocess.call(["python", ".avltest.norm.py"],
stdout=dnull, stderr=dnull)
self.assertEqual(r, 1)
r = subprocess.call(
["tstl_rt", "--swarm", "--output", ".avltest.test"], stdout=dnull)
self.assertEqual(r, 255)
r = subprocess.call(["tstl_rt",
"--exploit",
"0.8",
"--Pmutate",
"0.8",
"--output",
".avltest.test"],
stdout=dnull)
self.assertEqual(r, 255)
r = subprocess.call(["tstl_rt",
"--multiple",
"--timeout",
"20",
"--output",
".avltest.test"],
stdout=dnull)
self.assertEqual(r, 255)
r = subprocess.call(["tstl_rt",
"--multiple",
"--timeout",
"20",
"--noCover",
"--normalize",
"--output",
".avltest.test"],
stdout=dnull)
self.assertEqual(r, 255)
r = subprocess.call(
["tstl_regress .avltest*"],
shell=True,
stdout=dnull)
self.assertEqual(r, 255)
r = subprocess.call(
["tstl_rt", "--timeout", "20",
"--noCover",
"--generateLOC", ".avltest.loc",
"--uncaught", "--noCheck"],
stdout=dnull)
self.assertEqual(r, 0)
r = subprocess.call(
["tstl_rt", "--timeout", "20",
"--biasLOC", ".avltest.loc",
"--multiple", "--output", ".avltest.test"],
stdout=dnull)
self.assertEqual(r, 255)
r = subprocess.call(["tstl_triage", ".avltest*"], stdout=dnull)
self.assertEqual(r, 0)
r = subprocess.call(["tstl", "avlnew.tstl"], stdout=dnull)
self.assertEqual(r, 0)
r = subprocess.call(["tstl_rt", "--timeout", "20"], stdout=dnull)
self.assertEqual(r, 0)
r = subprocess.call(
["tstl_rt", "--timeout", "20", "--noCover"], stdout=dnull)
self.assertEqual(r, 0)
r = subprocess.call(
["tstl_rt", "--timeout", "20", "--swarm"], stdout=dnull)
self.assertEqual(r, 0)
r = subprocess.call(["tstl_rt",
"--timeout",
"20",
"--exploit",
"0.8",
"--Pmutate",
"0.8",
"--trackMaxCoverage",
".avltest.maxcov.test"],
stdout=dnull)
self.assertEqual(r, 0)
r = subprocess.call(["tstl_standalone",
".avltest.maxcov.test",
".avltest.maxcov.py",
"--regression",
"--verbose"],
stdout=dnull)
self.assertEqual(r, 0)
r = subprocess.call(["python", ".avltest.maxcov.py"],
stdout=dnull)
self.assertEqual(r, 0)
r = subprocess.call(
["tstl_regress .avltest*"],
shell=True,
stdout=dnull)
self.assertEqual(r, 0)
for f in glob.glob(".avltest*"):
os.remove(f)
os.remove("coverage.out")
| 32.983333 | 88 | 0.447196 | 529 | 5,937 | 4.960302 | 0.170132 | 0.12157 | 0.165777 | 0.224085 | 0.731326 | 0.715701 | 0.696265 | 0.657393 | 0.648628 | 0.633384 | 0 | 0.022309 | 0.395991 | 5,937 | 179 | 89 | 33.167598 | 0.709426 | 0 | 0 | 0.629371 | 0 | 0 | 0.212565 | 0.007411 | 0 | 0 | 0 | 0 | 0.20979 | 1 | 0.020979 | false | 0 | 0.034965 | 0 | 0.06993 | 0.006993 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
7f7b2058eb8418cc5265706ff8f42738c36b44a1 | 77 | py | Python | data/studio21_generated/interview/0269/starter_code.py | vijaykumawat256/Prompt-Summarization | 614f5911e2acd2933440d909de2b4f86653dc214 | [
"Apache-2.0"
] | null | null | null | data/studio21_generated/interview/0269/starter_code.py | vijaykumawat256/Prompt-Summarization | 614f5911e2acd2933440d909de2b4f86653dc214 | [
"Apache-2.0"
] | null | null | null | data/studio21_generated/interview/0269/starter_code.py | vijaykumawat256/Prompt-Summarization | 614f5911e2acd2933440d909de2b4f86653dc214 | [
"Apache-2.0"
] | null | null | null | class Solution:
def kLengthApart(self, nums: List[int], k: int) -> bool:
| 25.666667 | 60 | 0.662338 | 11 | 77 | 4.636364 | 0.909091 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.181818 | 77 | 2 | 61 | 38.5 | 0.809524 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0 | null | null | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
7f822ce131a341c7f102ca63d584a64ec1b779c0 | 843 | py | Python | tests/bench/test_MComp.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | 377 | 2016-10-13T20:52:44.000Z | 2022-03-29T18:04:14.000Z | tests/bench/test_MComp.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | 160 | 2016-10-13T16:11:53.000Z | 2022-03-28T04:21:34.000Z | tests/bench/test_MComp.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | 63 | 2017-03-09T14:51:18.000Z | 2022-03-27T20:52:57.000Z | import pyaf.Bench.TS_datasets as tsds
import pyaf.Bench.MComp as mcomp
#tester1 = mcomp.cMComp_Tester(tsds.load_M1_comp());
#tester1.testSignals('')
#tester1.testAllSignals()
#tester2 = mcomp.cMComp_Tester(tsds.load_M2_comp());
#tester1.testSignals('')
#tester2.testAllSignals()
#tester3 = mcomp.cMComp_Tester(tsds.load_M3_Y_comp());
#tester1.testSignals('')
#tester3.testAllSignals()
#tester4 = mcomp.cMComp_Tester(tsds.load_M3_Q_comp());
#tester1.testSignals('')
#tester4.testAllSignals()
#tester5 = mcomp.cMComp_Tester(tsds.load_M3_M_comp());
#tester1.testSignals('')
#tester5.testAllSignals()
#tester6 = mcomp.cMComp_Tester(tsds.load_M3_Other_comp());
#tester1.testSignals('')
#tester6.testAllSignals()
tester7 = mcomp.cMComp_Tester(tsds.load_M4_comp("FINANCE") , "M4COMP");
tester7.testSignals('FIN1')
# tester7.testAllSignals()
| 25.545455 | 71 | 0.768683 | 104 | 843 | 5.980769 | 0.307692 | 0.123794 | 0.191318 | 0.236334 | 0.294212 | 0.173633 | 0 | 0 | 0 | 0 | 0 | 0.038071 | 0.065243 | 843 | 32 | 72 | 26.34375 | 0.751269 | 0.7414 | 0 | 0 | 0 | 0 | 0.085427 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
7f83beb5e4a4d9a75218a8462a09d0d2a7efa122 | 2,583 | py | Python | python/ray/autoscaler/_private/readonly/node_provider.py | linyiyue/ray | 90d2456ec70270a1f894ec3ef6f3004533859e03 | [
"Apache-2.0"
] | 21,382 | 2016-09-26T23:12:52.000Z | 2022-03-31T21:47:45.000Z | python/ray/autoscaler/_private/readonly/node_provider.py | linyiyue/ray | 90d2456ec70270a1f894ec3ef6f3004533859e03 | [
"Apache-2.0"
] | 19,689 | 2016-09-17T08:21:25.000Z | 2022-03-31T23:59:30.000Z | python/ray/autoscaler/_private/readonly/node_provider.py | gramhagen/ray | c18caa4db36d466718bdbcb2229aa0b2dc03da1f | [
"Apache-2.0"
] | 4,114 | 2016-09-23T18:54:01.000Z | 2022-03-31T15:07:32.000Z | from typing import Tuple, List
from ray.autoscaler.node_provider import NodeProvider
from ray.autoscaler.tags import (TAG_RAY_NODE_KIND, NODE_KIND_HEAD,
TAG_RAY_USER_NODE_TYPE, TAG_RAY_NODE_NAME,
TAG_RAY_NODE_STATUS, STATUS_UP_TO_DATE)
from ray.autoscaler._private.util import format_readonly_node_type
class ReadOnlyNodeProvider(NodeProvider):
"""A node provider that merely reports the current cluster state.
This is used for laptop mode / manual cluster setup modes, in order to
provide status reporting in the same way for users."""
def __init__(self, provider_config, cluster_name):
NodeProvider.__init__(self, provider_config, cluster_name)
self.nodes = {}
def is_readonly(self):
return True
def _set_nodes(self, nodes: List[Tuple[str, str]]):
"""Update the set of nodes in the cluster.
Args:
nodes: List of (node_id, node_manager_address) tuples.
"""
new_nodes = {}
for node_id, node_manager_address in nodes:
# We make up a fake node type for each node (since each node
# could have its own unique configuration).
new_nodes[node_id] = {
# Keep prefix in sync with node config gen in monitor.py
"node_type": format_readonly_node_type(node_id),
"ip": node_manager_address,
}
self.nodes = new_nodes
def non_terminated_nodes(self, tag_filters):
return list(self.nodes.keys())
def is_running(self, node_id):
return node_id in self.nodes
def is_terminated(self, node_id):
return node_id not in self.nodes
def node_tags(self, node_id):
tags = {
TAG_RAY_NODE_KIND: NODE_KIND_HEAD,
TAG_RAY_USER_NODE_TYPE: self.nodes[node_id]["node_type"],
TAG_RAY_NODE_NAME: node_id,
TAG_RAY_NODE_STATUS: STATUS_UP_TO_DATE
}
return tags
def external_ip(self, node_id):
return node_id
def internal_ip(self, node_id):
return node_id
def set_node_tags(self, node_id, tags):
raise AssertionError("Readonly node provider cannot be updated")
def create_node(self, node_config, tags, count):
raise AssertionError("Readonly node provider cannot be updated")
def terminate_node(self, node_id):
raise AssertionError("Readonly node provider cannot be updated")
@staticmethod
def bootstrap_config(cluster_config):
return cluster_config
| 33.986842 | 75 | 0.658924 | 346 | 2,583 | 4.621387 | 0.303468 | 0.06379 | 0.043777 | 0.040025 | 0.380238 | 0.350219 | 0.231395 | 0.231395 | 0.126329 | 0.055034 | 0 | 0 | 0.272551 | 2,583 | 75 | 76 | 34.44 | 0.850985 | 0.173829 | 0 | 0.106383 | 0 | 0 | 0.06705 | 0 | 0 | 0 | 0 | 0 | 0.06383 | 1 | 0.276596 | false | 0 | 0.085106 | 0.148936 | 0.553191 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
7f998496cbf16bedaf0905ee189350d501e19416 | 2,045 | py | Python | openstreetmap-scraper/venv/lib/python3.7/site-packages/OSMPythonTools/api.py | espoo-urban-planning/urbanplanningGAN | e921211b7a9f9f02d16e8f14ea29bf81139886c2 | [
"MIT"
] | null | null | null | openstreetmap-scraper/venv/lib/python3.7/site-packages/OSMPythonTools/api.py | espoo-urban-planning/urbanplanningGAN | e921211b7a9f9f02d16e8f14ea29bf81139886c2 | [
"MIT"
] | null | null | null | openstreetmap-scraper/venv/lib/python3.7/site-packages/OSMPythonTools/api.py | espoo-urban-planning/urbanplanningGAN | e921211b7a9f9f02d16e8f14ea29bf81139886c2 | [
"MIT"
] | null | null | null | from bs4 import BeautifulSoup
from OSMPythonTools.element import Element
from OSMPythonTools.internal.cacheObject import CacheObject
def _raiseException(prefix, msg):
sys.tracebacklimit = None
raise(Exception('[OSMPythonTools.' + prefix + '] ' + msg))
class Api(CacheObject):
def __init__(self, endpoint='http://www.openstreetmap.org/api/0.6/', **kwargs):
super().__init__('api', endpoint, jsonResult=False, **kwargs)
def _queryString(self, query, params={}):
return (query, query, params)
def _queryRequest(self, endpoint, queryString, params={}):
return endpoint + queryString
def _rawToResult(self, data, queryString):
return ApiResult(data, queryString)
class ApiResult(Element):
def __init__(self, xml, queryString):
self._isValid = (xml != {} and xml is not None)
self._xml = xml
self._soup = None
soupElement = None
if self._isValid:
self._soup = BeautifulSoup(xml, 'xml')
if len(self._soup.find_all('node')) > 0:
soupElement = self._soup.node
if len(self._soup.find_all('way')) > 0:
soupElement = self._soup.way
if len(self._soup.find_all('relation')) > 0:
soupElement = self._soup.relation
super().__init__(soup=soupElement)
self._queryString = queryString
def isValid(self):
return self._isValid
def toXML(self):
return self._xml
def queryString(self):
return self._queryString
def __get(self, prop):
return self._soup.attrs[prop] if self._isValid and prop in self._soup.attrs else None
### general information
def version(self):
return self.__get('version')
def generator(self):
return self.__get('generator')
def copyright(self):
return self.__get('copyright')
def attribution(self):
return self.__get('attribution')
def license(self):
return self.__get('license')
| 32.460317 | 93 | 0.626895 | 226 | 2,045 | 5.438053 | 0.29646 | 0.065094 | 0.091131 | 0.069162 | 0.04882 | 0.04882 | 0 | 0 | 0 | 0 | 0 | 0.003966 | 0.260147 | 2,045 | 62 | 94 | 32.983871 | 0.808328 | 0.009291 | 0 | 0 | 0 | 0 | 0.058853 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.306122 | false | 0 | 0.061224 | 0.244898 | 0.653061 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
7fa9fdfc5add3e476b8eacc4fb5602386f476d00 | 1,680 | py | Python | ansys/dpf/core/operators/utility/__init__.py | jfthuong/pydpf-core | bf2895ebc546e0004f759289bfc9a23196559ac3 | [
"MIT"
] | 18 | 2021-10-16T10:38:29.000Z | 2022-03-29T11:26:42.000Z | ansys/dpf/core/operators/utility/__init__.py | jfthuong/pydpf-core | bf2895ebc546e0004f759289bfc9a23196559ac3 | [
"MIT"
] | 79 | 2021-10-11T23:18:54.000Z | 2022-03-29T14:53:14.000Z | ansys/dpf/core/operators/utility/__init__.py | jfthuong/pydpf-core | bf2895ebc546e0004f759289bfc9a23196559ac3 | [
"MIT"
] | 5 | 2021-11-29T18:35:37.000Z | 2022-03-16T16:49:21.000Z | from .merge_result_infos import merge_result_infos
from .field_to_fc import field_to_fc
from .html_doc import html_doc
from .unitary_field import unitary_field
from .extract_field import extract_field
from .bind_support import bind_support
from .scalars_to_field import scalars_to_field
from .change_location import change_location
from .strain_from_voigt import strain_from_voigt
from .set_property import set_property
from .forward_field import forward_field
from .forward_fields_container import forward_fields_container
from .forward_meshes_container import forward_meshes_container
from .forward import forward
from .txt_file_to_dpf import txt_file_to_dpf
from .bind_support_fc import bind_support_fc
from .default_value import default_value
from .extract_time_freq import extract_time_freq
from .python_generator import python_generator
from .make_overall import make_overall
from .merge_fields_containers import merge_fields_containers
from .merge_scopings import merge_scopings
from .merge_materials import merge_materials
from .merge_property_fields import merge_property_fields
from .remote_workflow_instantiate import remote_workflow_instantiate
from .remote_operator_instantiate import remote_operator_instantiate
from .merge_fields_by_label import merge_fields_by_label
from .merge_scopings_containers import merge_scopings_containers
from .merge_meshes import merge_meshes
from .merge_time_freq_supports import merge_time_freq_supports
from .merge_fields import merge_fields
from .merge_supports import merge_supports
from .merge_meshes_containers import merge_meshes_containers
from .change_shell_layers import change_shell_layers
| 48 | 69 | 0.878571 | 244 | 1,680 | 5.606557 | 0.196721 | 0.078947 | 0.032895 | 0.017544 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.10119 | 1,680 | 34 | 70 | 49.411765 | 0.90596 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 | 3 |
7fb6bd7ad92ceab221631aaebad8f831b543d2c5 | 3,095 | py | Python | python/cugraph/ktruss/ktruss_max.py | ogreen/cugraph | d94ab29f14e6212a0c8bb5ec5fbe9e300cd57594 | [
"Apache-2.0"
] | null | null | null | python/cugraph/ktruss/ktruss_max.py | ogreen/cugraph | d94ab29f14e6212a0c8bb5ec5fbe9e300cd57594 | [
"Apache-2.0"
] | null | null | null | python/cugraph/ktruss/ktruss_max.py | ogreen/cugraph | d94ab29f14e6212a0c8bb5ec5fbe9e300cd57594 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019, NVIDIA CORPORATION.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from cugraph.ktruss import ktruss_max_wrapper
def ktruss_max(G):
"""
Finds the maximal k-truss of a graph.
The k-truss of a graph is subgraph where each edge is part of at least
(k−2) triangles. The maximal k-truss in a graph, denoted by
k=k_max is the largest k-truss in the graph where the set of satisfying
edges is not empty. k-trusses are used for finding tighlty knit groups of
vertices in a graph.
A k-truss is a relaxation of a k-clique in the graph and was define in
[1]. Finding cliques is computationally demanding and finding the maximal
k-clique is known to be NP-Hard.
In contrast, finding a k-truss is computationally tractable as its
key building block, namely triangle counting counting, can be
executed in polnymomial time. Typically, it takes many iterations of
triangle counting to find the k-truss of a graph.
Yet these iterations operate on a weakly monotonically shrinking graph.
Therefore, finding the k-truss of a graph can be done in a fairly
reasonable amount of time.
The solution in cuGraph is based on a GPU algorithm first shown
in [2] and uses the triangle counting algoritm from [3].
[1] Cohen, J.,
"Trusses: Cohesive subgraphs for social network analysis"
National security agency technical report, 2008
[2] O. Green, J. Fox, E. Kim, F. Busato, et al.
“Quickly Finding a Truss in a Haystack”
IEEE High Performance Extreme Computing Conference (HPEC), 2017
https://doi.org/10.1109/HPEC.2017.8091038
[3] O. Green, P. Yalamanchili, L.M. Munguia,
“Fast Triangle Counting on GPU”
Irregular Applications: Architectures and Algorithms (IA3), 2014
Parameters
----------
G : cuGraph.Graph
cuGraph graph descriptor with connectivity information. k-Trusses are
defined for only undirected graphs as they are defined for
undirected triangle in a graph.
Returns
-------
k_max : int
The largest k in the graph s.t. a non-empty k-truss in the
graph exists.
Examples
--------
>>> M = cudf.read_csv('datasets/karate.csv', delimiter=' ',
>>> dtype=['int32', 'int32', 'float32'], header=None)
>>> sources = cudf.Series(M['0'])
>>> destinations = cudf.Series(M['1'])
>>> G = cugraph.Graph()
>>> G.add_edge_list(sources, destinations, None)
>>> k_max = cugraph.ktruss_max(G)
"""
k_max = ktruss_max_wrapper.ktruss_max(G)
return k_max
| 37.743902 | 77 | 0.69273 | 469 | 3,095 | 4.541578 | 0.49467 | 0.025352 | 0.015023 | 0.016901 | 0.04554 | 0.023944 | 0 | 0 | 0 | 0 | 0 | 0.022102 | 0.225202 | 3,095 | 81 | 78 | 38.209877 | 0.865721 | 0.882391 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.25 | 0 | 0.75 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3 |
f68a6c3b04e97ce3df8e57a9f74367abf54ae284 | 2,445 | py | Python | LDERPdjango/login/models.py | Ignoramuss/LDERP | 2524eb2a4c73a079a5d8f563c45de23cfe7836f6 | [
"Apache-2.0"
] | 3 | 2017-06-09T09:22:17.000Z | 2017-06-14T03:42:55.000Z | LDERPdjango/login/models.py | Ignoramuss/LDERP | 2524eb2a4c73a079a5d8f563c45de23cfe7836f6 | [
"Apache-2.0"
] | 2 | 2017-06-14T07:24:47.000Z | 2017-06-14T10:50:57.000Z | LDERPdjango/login/models.py | Ignoramuss/LDERP | 2524eb2a4c73a079a5d8f563c45de23cfe7836f6 | [
"Apache-2.0"
] | null | null | null | from django.db import models
from datetime import date
# Create your models here.
class LanguageDisability(models.Model):
disability_name = models.CharField(max_length=200)
def __str__(self):
return self.disability_name
# student = models.ForeignKey(StudentInfo, on_delete=models.CASCADE)
class MathematicalDisability(models.Model):
disability_name = models.CharField(max_length=200)
def __str__(self):
return self.disability_name
# student = models.ForeignKey(StudentInfo, on_delete=models.CASCADE)
class ParentalMetric(models.Model):
metric_name = models.CharField(max_length=200)
def __str__(self):
return self.metric_name
#Model of the students
class StudentInfo(models.Model):
#Personal information
stud_name = models.CharField(max_length = 200)
stud_school = models.CharField(max_length = 200)
stud_standard = models.CharField(max_length = 30)
stud_div = models.CharField(max_length = 30)
date_of_fill = models.DateField()
date_of_birth = models.DateField()
#Guardian information
#Father
father_name = models.CharField(max_length=200)
father_contact = models.CharField(max_length=10)
father_email = models.EmailField(max_length = 200)
father_education = models.CharField(max_length=200)
father_occupation = models.CharField(max_length=200)
#Mother
mother_name = models.CharField(max_length=200)
mother_contact = models.CharField(max_length=10)
mother_email = models.EmailField(max_length = 200)
mother_education = models.CharField(max_length=200)
mother_occupation = models.CharField(max_length=200)
#Academic info
stud_grades = models.TextField()
language_disabilities = models.ManyToManyField(LanguageDisability)
mathematical_disabilities = models.ManyToManyField(MathematicalDisability)
# parent_awareness_scores = models.OneToOneField(ParentAwarenessScore)
def __str__(self):
return self.stud_name
def get_language_disabilities(self):
return ", ".join([ld.disability_name for ld in self.language_disabilities.all()])
def get_mathematical_disabilities(self):
return ", ".join([md.disability_name for md in self.mathematical_disabilities.all()])
class ParentalMetricScore(models.Model):
metric_type = models.ForeignKey(ParentalMetric)
metric_score= models.IntegerField()
student = models.ForeignKey(StudentInfo, null=True) | 37.615385 | 93 | 0.754192 | 287 | 2,445 | 6.163763 | 0.278746 | 0.08649 | 0.152629 | 0.203505 | 0.481063 | 0.440362 | 0.193895 | 0.193895 | 0.193895 | 0.193895 | 0 | 0.022804 | 0.157055 | 2,445 | 65 | 94 | 37.615385 | 0.835517 | 0.128016 | 0 | 0.181818 | 0 | 0 | 0.001885 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.136364 | false | 0 | 0.045455 | 0.136364 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
f69fe25a771ef82201f3ce3b2cb530a64e86f1af | 295 | py | Python | src/vivarium/exceptions.py | ihmeuw/vivarium | 77393d2e84ff2351c926f65b33272b7225cf9628 | [
"BSD-3-Clause"
] | 41 | 2017-07-14T03:39:06.000Z | 2022-03-20T05:36:33.000Z | src/vivarium/exceptions.py | ihmeuw/vivarium | 77393d2e84ff2351c926f65b33272b7225cf9628 | [
"BSD-3-Clause"
] | 26 | 2017-08-08T22:13:44.000Z | 2021-08-18T00:14:54.000Z | src/vivarium/exceptions.py | ihmeuw/vivarium | 77393d2e84ff2351c926f65b33272b7225cf9628 | [
"BSD-3-Clause"
] | 8 | 2017-08-03T17:15:39.000Z | 2021-09-30T21:57:50.000Z | """
==========
Exceptions
==========
Module containing framework-wide exception definitions. Exceptions for
particular subsystems are defined in their respective modules.
"""
class VivariumError(Exception):
"""Generic exception raised for errors in ``vivarium`` simulations."""
pass
| 19.666667 | 74 | 0.708475 | 29 | 295 | 7.206897 | 0.827586 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.145763 | 295 | 14 | 75 | 21.071429 | 0.829365 | 0.786441 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.5 | 0 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 3 |
f6cc4e2375a4556416ea9043cc4eb25beda4e1bd | 111 | py | Python | Codewars/8kyu/super-duper-easy/Python/solution1.py | RevansChen/online-judge | ad1b07fee7bd3c49418becccda904e17505f3018 | [
"MIT"
] | 7 | 2017-09-20T16:40:39.000Z | 2021-08-31T18:15:08.000Z | Codewars/8kyu/super-duper-easy/Python/solution1.py | RevansChen/online-judge | ad1b07fee7bd3c49418becccda904e17505f3018 | [
"MIT"
] | null | null | null | Codewars/8kyu/super-duper-easy/Python/solution1.py | RevansChen/online-judge | ad1b07fee7bd3c49418becccda904e17505f3018 | [
"MIT"
] | null | null | null | # Python - 3.4.3
def problem(a):
try:
return float(a) * 50 + 6
except:
return 'Error'
| 13.875 | 32 | 0.495495 | 16 | 111 | 3.4375 | 0.8125 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.085714 | 0.369369 | 111 | 7 | 33 | 15.857143 | 0.7 | 0.126126 | 0 | 0 | 0 | 0 | 0.052632 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0 | 0 | 0 | 0.6 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3 |
f6cc6c0f42834cc66f02e39d068d2c7f6ecd17bd | 110 | py | Python | Notification/Desktop Notification.py | Amara-Manikanta/Python-Automations | 8f7d2eb7a0cd145c13f329920204ed3f311a4989 | [
"MIT"
] | null | null | null | Notification/Desktop Notification.py | Amara-Manikanta/Python-Automations | 8f7d2eb7a0cd145c13f329920204ed3f311a4989 | [
"MIT"
] | null | null | null | Notification/Desktop Notification.py | Amara-Manikanta/Python-Automations | 8f7d2eb7a0cd145c13f329920204ed3f311a4989 | [
"MIT"
] | null | null | null | import win10toast
toaster=win10toast.ToastNotifier()
toaster.show_toast('python','Hellow Mani',duration = 10) | 27.5 | 56 | 0.809091 | 13 | 110 | 6.769231 | 0.846154 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.058252 | 0.063636 | 110 | 4 | 56 | 27.5 | 0.796117 | 0 | 0 | 0 | 0 | 0 | 0.153153 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 0.333333 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
f6d5571e4a9320bd8961ea32e4d8f734a7fae9ce | 370 | py | Python | tag/timer.py | funge/ai4games | b72be3648fa0da611b999aa01aec8560728bcdd7 | [
"MIT"
] | 1 | 2020-01-11T18:53:53.000Z | 2020-01-11T18:53:53.000Z | tag/timer.py | funge/ai4games | b72be3648fa0da611b999aa01aec8560728bcdd7 | [
"MIT"
] | null | null | null | tag/timer.py | funge/ai4games | b72be3648fa0da611b999aa01aec8560728bcdd7 | [
"MIT"
] | 1 | 2019-08-27T17:24:27.000Z | 2019-08-27T17:24:27.000Z | # Source code distributed under the Copyright (c) 2008, John David Funge
# Original author: John David Funge (www.jfunge.com)
#
# Licensed under the Academic Free License version 3.0
# (for details see LICENSE.txt in this directory).
import pygame
# time is measured in milliseconds
ticksPerSec = 1000.0
def getTime():
return pygame.time.get_ticks()/ticksPerSec
| 26.428571 | 72 | 0.759459 | 54 | 370 | 5.185185 | 0.796296 | 0.057143 | 0.1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.035484 | 0.162162 | 370 | 13 | 73 | 28.461538 | 0.867742 | 0.694595 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.25 | 0.25 | 0.75 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
f6eb502e77829b816e2a8d4979b70e96248a3bf9 | 144 | py | Python | django_test/meuapp/apps.py | fmhiga/Django_study | 92193b18bb03b4deb90187b9fec0ef6e66dbd00b | [
"MIT"
] | 1 | 2021-08-19T02:38:47.000Z | 2021-08-19T02:38:47.000Z | p1/meuapp/apps.py | mentoriacompartilhada/helenamagaldi-v0 | d26e5b4ae887382b02c00092c2487437bc9ffb78 | [
"MIT"
] | null | null | null | p1/meuapp/apps.py | mentoriacompartilhada/helenamagaldi-v0 | d26e5b4ae887382b02c00092c2487437bc9ffb78 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class MeuappConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'meuapp'
| 20.571429 | 56 | 0.756944 | 17 | 144 | 6.294118 | 0.882353 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.152778 | 144 | 6 | 57 | 24 | 0.877049 | 0 | 0 | 0 | 0 | 0 | 0.243056 | 0.201389 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.25 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.