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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a40c9aa5952f718989c1f128588b1884795a7a3a
| 235
|
py
|
Python
|
plumbing/trees/newick.py
|
svetlyak40wt/plumbing
|
928e7900d8b55f3ae031c3acfeeb374150df268a
|
[
"MIT"
] | null | null | null |
plumbing/trees/newick.py
|
svetlyak40wt/plumbing
|
928e7900d8b55f3ae031c3acfeeb374150df268a
|
[
"MIT"
] | null | null | null |
plumbing/trees/newick.py
|
svetlyak40wt/plumbing
|
928e7900d8b55f3ae031c3acfeeb374150df268a
|
[
"MIT"
] | 1
|
2019-06-10T16:14:24.000Z
|
2019-06-10T16:14:24.000Z
|
"""http://stackoverflow.com/a/23173968/287297"""
################################################################################
def parse_newick(path):
"""Parse a newick-formated text file and return a "Tree" object."""
pass
| 39.166667
| 80
| 0.451064
| 22
| 235
| 4.772727
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.066038
| 0.097872
| 235
| 6
| 81
| 39.166667
| 0.429245
| 0.442553
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 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
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
320609bbea15c1f1f7e9da2db3030278a24023be
| 148
|
py
|
Python
|
app/api/errors/__init__.py
|
rwhughes91/glenn_has_range
|
7460a2694f6126956a778e0fc80add189509e749
|
[
"MIT"
] | null | null | null |
app/api/errors/__init__.py
|
rwhughes91/glenn_has_range
|
7460a2694f6126956a778e0fc80add189509e749
|
[
"MIT"
] | null | null | null |
app/api/errors/__init__.py
|
rwhughes91/glenn_has_range
|
7460a2694f6126956a778e0fc80add189509e749
|
[
"MIT"
] | null | null | null |
from .handlers import add_error_handlers
from .errors import BadRequest, StatusCodes
__all__ = ["add_error_handlers", "BadRequest", "StatusCodes"]
| 29.6
| 61
| 0.804054
| 17
| 148
| 6.529412
| 0.529412
| 0.144144
| 0.288288
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.101351
| 148
| 4
| 62
| 37
| 0.834586
| 0
| 0
| 0
| 0
| 0
| 0.263514
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
32079e360500b60b99f203f549f56a522ee30bba
| 78
|
py
|
Python
|
microsoft/submaintenance/__init__.py
|
grecoe/SubscriptionPolicy
|
2f77ea8efaf812272b2a910f5b6d654339227c07
|
[
"MIT"
] | 1
|
2021-07-23T16:37:17.000Z
|
2021-07-23T16:37:17.000Z
|
microsoft/submaintenance/__init__.py
|
grecoe/SubscriptionPolicy
|
2f77ea8efaf812272b2a910f5b6d654339227c07
|
[
"MIT"
] | null | null | null |
microsoft/submaintenance/__init__.py
|
grecoe/SubscriptionPolicy
|
2f77ea8efaf812272b2a910f5b6d654339227c07
|
[
"MIT"
] | 1
|
2021-06-16T20:12:35.000Z
|
2021-06-16T20:12:35.000Z
|
from .identity import AzIdentities
from .rgcompliance import AzGroupCompliance
| 39
| 43
| 0.884615
| 8
| 78
| 8.625
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.089744
| 78
| 2
| 43
| 39
| 0.971831
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
5c8ee69e26932868f53373442f4efd2dfa82f348
| 149
|
py
|
Python
|
openslides/config/exceptions.py
|
DebVortex/OpenSlides
|
f17f1a723a034dd7ebe80cd4ff4385d97d020c5f
|
[
"MIT"
] | null | null | null |
openslides/config/exceptions.py
|
DebVortex/OpenSlides
|
f17f1a723a034dd7ebe80cd4ff4385d97d020c5f
|
[
"MIT"
] | null | null | null |
openslides/config/exceptions.py
|
DebVortex/OpenSlides
|
f17f1a723a034dd7ebe80cd4ff4385d97d020c5f
|
[
"MIT"
] | null | null | null |
from openslides.utils.exceptions import OpenSlidesError
class ConfigError(OpenSlidesError):
pass
class ConfigNotFound(ConfigError):
pass
| 14.9
| 55
| 0.798658
| 14
| 149
| 8.5
| 0.714286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.147651
| 149
| 9
| 56
| 16.555556
| 0.937008
| 0
| 0
| 0.4
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.4
| 0.2
| 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
| 1
| 1
| 0
| 0
| 1
| 0
|
0
| 5
|
7a3c2216dba02d2416bbc24b2d8b4b645beebd80
| 2,895
|
py
|
Python
|
api/migrations/0001_initial.py
|
BehindLoader/bandcamp-parser
|
bb1d2278d8275bd29888ce9a4fd5627400543cd0
|
[
"MIT"
] | null | null | null |
api/migrations/0001_initial.py
|
BehindLoader/bandcamp-parser
|
bb1d2278d8275bd29888ce9a4fd5627400543cd0
|
[
"MIT"
] | null | null | null |
api/migrations/0001_initial.py
|
BehindLoader/bandcamp-parser
|
bb1d2278d8275bd29888ce9a4fd5627400543cd0
|
[
"MIT"
] | null | null | null |
# Generated by Django 2.0.5 on 2018-05-03 08:57
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Genre',
fields=[
('id', models.AutoField(primary_key=True, serialize=False)),
('name', models.CharField(max_length=128, verbose_name='Название жанра')),
('tags', models.TextField(default='[]', help_text='LIST()', verbose_name='Теги через запятую')),
('relation', models.TextField(default='{}', help_text='JSON()', verbose_name='Отношения к жанрам')),
],
),
migrations.CreateModel(
name='Release',
fields=[
('id', models.AutoField(primary_key=True, serialize=False)),
('name', models.CharField(max_length=128, verbose_name='Название релиза')),
('date', models.DateField(null=True, verbose_name='Дата релиза')),
('type', models.CharField(default='Other', max_length=32, verbose_name='Тип релиза')),
('tags', models.TextField(default='[]', help_text='LIST()', verbose_name='Теги через запятую')),
('relation', models.TextField(default='{}', help_text='JSON()', verbose_name='Отношения к жанрам')),
],
),
migrations.CreateModel(
name='Singer',
fields=[
('id', models.AutoField(primary_key=True, serialize=False)),
('name', models.CharField(max_length=128, verbose_name='Имя исполнителя')),
('city', models.TextField(default='[]', help_text='LIST()', verbose_name='Города через запятую')),
('tags', models.TextField(default='[]', help_text='LIST()', verbose_name='Теги через запятую')),
('relation', models.TextField(default='{}', help_text='JSON()', verbose_name='Отношения к жанрам')),
],
),
migrations.CreateModel(
name='Track',
fields=[
('id', models.AutoField(primary_key=True, serialize=False)),
('name', models.CharField(max_length=128, verbose_name='Название')),
('tags', models.TextField(default='[]', help_text='LIST()', verbose_name='Теги через запятую')),
('relation', models.TextField(default='{}', help_text='JSON()', verbose_name='Отношения к жанрам')),
('release', models.ManyToManyField(to='api.Release', verbose_name='Релиз')),
('singer', models.ManyToManyField(to='api.Singer', verbose_name='Исполнители')),
],
),
migrations.AddField(
model_name='release',
name='singer',
field=models.ManyToManyField(to='api.Singer', verbose_name='Исполнители'),
),
]
| 47.459016
| 116
| 0.568912
| 280
| 2,895
| 5.75
| 0.278571
| 0.122981
| 0.122981
| 0.145342
| 0.720497
| 0.720497
| 0.720497
| 0.720497
| 0.625466
| 0.625466
| 0
| 0.013647
| 0.265976
| 2,895
| 60
| 117
| 48.25
| 0.744
| 0.015544
| 0
| 0.54717
| 1
| 0
| 0.177317
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.018868
| 0
| 0.09434
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
7a46daf2471083eb09852adb90791ab2828ec777
| 176
|
py
|
Python
|
llvm/utils/lit/lit/llvm/__init__.py
|
medismailben/llvm-project
|
e334a839032fe500c3bba22bf976ab7af13ce1c1
|
[
"Apache-2.0"
] | 7,470
|
2019-07-11T15:56:58.000Z
|
2022-03-31T08:39:29.000Z
|
llvm/utils/lit/lit/llvm/__init__.py
|
medismailben/llvm-project
|
e334a839032fe500c3bba22bf976ab7af13ce1c1
|
[
"Apache-2.0"
] | 11,789
|
2015-01-05T04:50:15.000Z
|
2022-03-31T23:39:19.000Z
|
llvm/utils/lit/lit/llvm/__init__.py
|
medismailben/llvm-project
|
e334a839032fe500c3bba22bf976ab7af13ce1c1
|
[
"Apache-2.0"
] | 2,543
|
2015-01-01T11:18:36.000Z
|
2022-03-22T21:32:36.000Z
|
from lit.llvm import config
llvm_config = None
def initialize(lit_config, test_config):
global llvm_config
llvm_config = config.LLVMConfig(lit_config, test_config)
| 17.6
| 60
| 0.778409
| 25
| 176
| 5.2
| 0.44
| 0.230769
| 0.246154
| 0.292308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.159091
| 176
| 9
| 61
| 19.555556
| 0.878378
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.2
| 0
| 0.4
| 0
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
7a5ece7c3136c659c9a254705999d0e1a20d9eb2
| 9,122
|
py
|
Python
|
defenses/pixelcnn/convert_tf_model.py
|
samuel930930/Dual-Manifold-Adversarial-Training
|
8c7fe4fd7a4763f4aaa7ffa10957d3f81ec3f1d6
|
[
"MIT"
] | 4
|
2021-08-16T13:20:05.000Z
|
2022-02-20T13:58:11.000Z
|
defenses/pixelcnn/convert_tf_model.py
|
samuel930930/Dual-Manifold-Adversarial-Training
|
8c7fe4fd7a4763f4aaa7ffa10957d3f81ec3f1d6
|
[
"MIT"
] | null | null | null |
defenses/pixelcnn/convert_tf_model.py
|
samuel930930/Dual-Manifold-Adversarial-Training
|
8c7fe4fd7a4763f4aaa7ffa10957d3f81ec3f1d6
|
[
"MIT"
] | 2
|
2021-05-11T06:33:54.000Z
|
2021-05-27T04:32:00.000Z
|
import os
import sys
import pickle
import numpy as np
import tensorflow as tf
import h5py
import torch
from collections import defaultdict
from model import PixelCNN
class TF2Pytorch(object):
V = 'V.ExponentialMovingAverage'
g = 'g.ExponentialMovingAverage'
b = 'b.ExponentialMovingAverage'
def __init__(self, tf_weights):
self.state_dict = {}
self.layer_count = defaultdict(int)
self.tf_weights = tf_weights
def load_tf_tensor(self, prefix, var):
name = '.'.join([prefix, var])
return torch.from_numpy(self.tf_weights[name][:])
def load_conv2d(self, name_torch, name_tf):
self.state_dict[name_torch + '.weight_v'] = self.load_tf_tensor(name_tf, self.V).permute(3, 2, 0, 1)
self.state_dict[name_torch + '.weight_g'] = self.load_tf_tensor(name_tf, self.g)[:, None, None, None]
self.state_dict[name_torch + '.bias'] = self.load_tf_tensor(name_tf, self.b).squeeze()
self.layer_count['conv2d'] += 1
def load_deconv2d(self, name_torch, name_tf):
self.state_dict[name_torch + '.weight_v'] = self.load_tf_tensor(name_tf, self.V).permute(3, 2, 0, 1)
self.state_dict[name_torch + '.weight_g'] = self.load_tf_tensor(name_tf, self.g)[:, None, None, None]
self.state_dict[name_torch + '.bias'] = self.load_tf_tensor(name_tf, self.b).squeeze()
self.layer_count['deconv2d'] += 1
def load_dense(self, name_torch, name_tf):
self.state_dict[name_torch + '.weight_v'] = self.load_tf_tensor(name_tf, self.V).permute(1, 0)
self.state_dict[name_torch + '.weight_g'] = self.load_tf_tensor(name_tf, self.g)[:, None]
self.state_dict[name_torch + '.bias'] = self.load_tf_tensor(name_tf, self.b)
self.layer_count['dense'] += 1
def load_pixelcnn(self):
torch_to_tf_dict = {}
layer_count = {}
up_nr_resnet = [5, 5, 5]
down_nr_resnet = [5, 6, 6]
TF_ROOT = 'model'
# ////// input //////
conv_count = self.layer_count['conv2d']
tf_conv2d_name = '.'.join([TF_ROOT, f'conv2d_{conv_count}'])
self.load_conv2d('u_init.conv', tf_conv2d_name)
conv_count = self.layer_count['conv2d']
tf_conv2d_name = '.'.join([TF_ROOT, f'conv2d_{conv_count}'])
self.load_conv2d('ul_init.0.conv', tf_conv2d_name)
conv_count = self.layer_count['conv2d']
tf_conv2d_name = '.'.join([TF_ROOT, f'conv2d_{conv_count}'])
self.load_conv2d('ul_init.1.conv', tf_conv2d_name)
# ////// up //////
torch_name = 'up_layers'
for block_id, nr_resnet in enumerate(up_nr_resnet):
layer_name = '.'.join([torch_name, str(block_id)])
for j in range(nr_resnet):
# ////// u_stream //////
u_stream_prefix = '.'.join([layer_name, 'u_stream', str(j)])
torch_conv2d_name = '.'.join([u_stream_prefix, 'conv_input', 'conv'])
conv_count = self.layer_count['conv2d']
tf_conv2d_name = '.'.join([TF_ROOT, f'conv2d_{conv_count}'])
self.load_conv2d(torch_conv2d_name, tf_conv2d_name)
torch_conv2d_name = '.'.join([u_stream_prefix, 'conv_out', 'conv'])
conv_count = self.layer_count['conv2d']
tf_conv2d_name = '.'.join([TF_ROOT, f'conv2d_{conv_count}'])
self.load_conv2d(torch_conv2d_name, tf_conv2d_name)
# ////// ul stream //////
ul_stream_prefix = '.'.join([layer_name, 'ul_stream', str(j)])
torch_conv2d_name = '.'.join([ul_stream_prefix, 'conv_input', 'conv'])
conv_count = self.layer_count['conv2d']
tf_conv2d_name = '.'.join([TF_ROOT, f'conv2d_{conv_count}'])
self.load_conv2d(torch_conv2d_name, tf_conv2d_name)
torch_dense_name = '.'.join([ul_stream_prefix, 'nin_skip', 'lin_a'])
dense_count = self.layer_count['dense']
tf_dense_name = '.'.join([TF_ROOT, f'dense_{dense_count}'])
self.load_dense(torch_dense_name, tf_dense_name)
torch_conv2d_name = '.'.join([ul_stream_prefix, 'conv_out', 'conv'])
conv_count = self.layer_count['conv2d']
tf_conv2d_name = '.'.join([TF_ROOT, f'conv2d_{conv_count}'])
self.load_conv2d(torch_conv2d_name, tf_conv2d_name)
if block_id != 2:
torch_conv2d_name = '.'.join(['downsize_u_stream', str(block_id), 'conv'])
conv_count = self.layer_count['conv2d']
tf_conv2d_name = '.'.join([TF_ROOT, f'conv2d_{conv_count}'])
self.load_conv2d(torch_conv2d_name, tf_conv2d_name)
torch_conv2d_name = '.'.join(['downsize_ul_stream', str(block_id), 'conv'])
conv_count = self.layer_count['conv2d']
tf_conv2d_name = '.'.join([TF_ROOT, f'conv2d_{conv_count}'])
self.load_conv2d(torch_conv2d_name, tf_conv2d_name)
# ////// down //////
torch_name = 'down_layers'
for block_id, nr_resnet in enumerate(down_nr_resnet):
layer_name = '.'.join([torch_name, str(block_id)])
for j in range(nr_resnet):
# ////// u_stream //////
u_stream_prefix = '.'.join([layer_name, 'u_stream', str(j)])
torch_conv2d_name = '.'.join([u_stream_prefix, 'conv_input', 'conv'])
conv_count = self.layer_count['conv2d']
tf_conv2d_name = '.'.join([TF_ROOT, f'conv2d_{conv_count}'])
self.load_conv2d(torch_conv2d_name, tf_conv2d_name)
torch_dense_name = '.'.join([u_stream_prefix, 'nin_skip', 'lin_a'])
dense_count = self.layer_count['dense']
tf_dense_name = '.'.join([TF_ROOT, f'dense_{dense_count}'])
self.load_dense(torch_dense_name, tf_dense_name)
torch_conv2d_name = '.'.join([u_stream_prefix, 'conv_out', 'conv'])
conv_count = self.layer_count['conv2d']
tf_conv2d_name = '.'.join([TF_ROOT, f'conv2d_{conv_count}'])
self.load_conv2d(torch_conv2d_name, tf_conv2d_name)
# ////// ul stream //////
ul_stream_prefix = '.'.join([layer_name, 'ul_stream', str(j)])
torch_conv2d_name = '.'.join([ul_stream_prefix, 'conv_input', 'conv'])
conv_count = self.layer_count['conv2d']
tf_conv2d_name = '.'.join([TF_ROOT, f'conv2d_{conv_count}'])
self.load_conv2d(torch_conv2d_name, tf_conv2d_name)
torch_dense_name = '.'.join([ul_stream_prefix, 'nin_skip', 'lin_a'])
dense_count = self.layer_count['dense']
tf_dense_name = '.'.join([TF_ROOT, f'dense_{dense_count}'])
self.load_dense(torch_dense_name, tf_dense_name)
torch_conv2d_name = '.'.join([ul_stream_prefix, 'conv_out', 'conv'])
conv_count = self.layer_count['conv2d']
tf_conv2d_name = '.'.join([TF_ROOT, f'conv2d_{conv_count}'])
self.load_conv2d(torch_conv2d_name, tf_conv2d_name)
if block_id != 2:
torch_deconv2d_name = '.'.join(['upsize_u_stream', str(block_id), 'deconv'])
deconv_count = self.layer_count['deconv2d']
tf_deconv2d_name = '.'.join([TF_ROOT, f'deconv2d_{deconv_count}'])
self.load_deconv2d(torch_deconv2d_name, tf_deconv2d_name)
torch_deconv2d_name = '.'.join(['upsize_ul_stream', str(block_id), 'deconv'])
deconv_count = self.layer_count['deconv2d']
tf_deconv2d_name = '.'.join([TF_ROOT, f'deconv2d_{deconv_count}'])
self.load_deconv2d(torch_deconv2d_name, tf_deconv2d_name)
# ////// output //////
dense_count = self.layer_count['dense']
tf_dense_name = '.'.join([TF_ROOT, f'dense_{dense_count}'])
self.load_dense('nin_out.lin_a', tf_dense_name)
tf_path = './tf_model/params_cifar.ckpt'
hdf5_path = './tf_model/tf_weights.h5'
ckpt_path = './tf_model/pixelcnn.pth'
init_vars = tf.train.list_variables(tf_path)
if os.path.isfile(hdf5_path):
h5f = h5py.File(hdf5_path, 'r')
else:
with h5py.File(hdf5_path, 'w') as h5f:
for name, shape in init_vars:
val = tf.train.load_variable(tf_path, name)
print(val.dtype)
print("Loading TF weight {} with shape {}, {}".format(name, shape, val.shape))
torch.from_numpy(np.array(val))
if 'model' in name:
new_name = name.replace('/', '.')
print(new_name)
h5f.create_dataset(str(new_name), data=val)
h5f = h5py.File(hdf5_path, 'r')
model = PixelCNN(nr_resnet=5, nr_filters=160,
input_channels=3, nr_logistic_mix=10)
#print(model.state_dict().keys())
converter = TF2Pytorch(h5f)
converter.load_pixelcnn()
model.load_state_dict(converter.state_dict)
torch.save(model.state_dict(), ckpt_path)
h5f.close()
| 43.855769
| 109
| 0.600307
| 1,194
| 9,122
| 4.197655
| 0.10469
| 0.09178
| 0.067438
| 0.072027
| 0.751995
| 0.734836
| 0.726856
| 0.726856
| 0.712889
| 0.712889
| 0
| 0.02218
| 0.253672
| 9,122
| 207
| 110
| 44.067633
| 0.714013
| 0.022912
| 0
| 0.532895
| 0
| 0
| 0.129521
| 0.022355
| 0
| 0
| 0
| 0
| 0
| 1
| 0.039474
| false
| 0
| 0.059211
| 0
| 0.131579
| 0.019737
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
7a5fa3736b1e81ccbb8dbd9f477a17ca0598ed23
| 420
|
py
|
Python
|
rulm/__init__.py
|
IlyaGusev/rulm
|
4e78a495eba6cd6ea1fea839463c8145ed7051f2
|
[
"Apache-2.0"
] | null | null | null |
rulm/__init__.py
|
IlyaGusev/rulm
|
4e78a495eba6cd6ea1fea839463c8145ed7051f2
|
[
"Apache-2.0"
] | null | null | null |
rulm/__init__.py
|
IlyaGusev/rulm
|
4e78a495eba6cd6ea1fea839463c8145ed7051f2
|
[
"Apache-2.0"
] | null | null | null |
from rulm.language_model import LanguageModel
from rulm.models.neural_net.encoder_only import EncoderOnlyLanguageModel
from rulm.models.neural_net import NeuralNetLanguageModel
from rulm.models.n_gram import NGramLanguageModel
from rulm.models.vocabulary_chain import VocabularyChainLanguageModel
from rulm.models.equiprobable import EquiprobableLanguageModel
from rulm.stream_reader import LanguageModelingStreamReader
| 52.5
| 72
| 0.902381
| 48
| 420
| 7.75
| 0.5
| 0.150538
| 0.188172
| 0.107527
| 0.123656
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.066667
| 420
| 7
| 73
| 60
| 0.94898
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
7a7dc397552621d035e688687679b4afeee16919
| 4,347
|
py
|
Python
|
zoomus/components/live_stream.py
|
renefs/zoomus
|
1fd11c980c46712bd75f6a3c3ee9776f4adea3c9
|
[
"Apache-2.0"
] | 1
|
2020-11-26T14:26:02.000Z
|
2020-11-26T14:26:02.000Z
|
zoomus/components/live_stream.py
|
renefs/zoomus
|
1fd11c980c46712bd75f6a3c3ee9776f4adea3c9
|
[
"Apache-2.0"
] | null | null | null |
zoomus/components/live_stream.py
|
renefs/zoomus
|
1fd11c980c46712bd75f6a3c3ee9776f4adea3c9
|
[
"Apache-2.0"
] | null | null | null |
from __future__ import absolute_import
from zoomus import util
from zoomus.components import base
class LiveStreamComponentV2(base.BaseComponent):
def update(self, **kwargs):
"""
Use this API to update the meeting's stream information.
Expects:
- meeting_id: int
- stream_url: string (URL)
- stream_key: string
- page_url: string (URL)
Response content sample:
```json
{
"page_url": "https://example.com/livestream/123",
"stream_key": "contact-it@example.com",
"stream_url": "https://example.com/livestream"
}
```
Returns:
requests.Response: The response object
"""
util.require_keys(kwargs, "meeting_id")
return self.patch_request(
"/meetings/{}/livestream".format(kwargs.get("meeting_id")), data=kwargs
)
def update_status(self, **kwargs):
"""
Use this API to update the status of a meeting's live stream.
Expects:
- meeting_id: int
- action (start|stop)
- settings: dict
Response content sample:
```json
{
"action": "start",
"settings": {
"active_speaker_name": true,
"display_name": "Jill Chill"
}
```
Returns:
requests.Response: The response object
"""
util.require_keys(kwargs, "meeting_id")
return self.patch_request(
"/meetings/{}/livestream/status".format(kwargs.get("meeting_id")),
data=kwargs,
)
def get_livestream(self, **kwargs):
"""
Get the meeting's live stream details
Expects:
- meeting_id: int
Response content sample:
```json
{
"page_url": "https://example.com/livestream/123",
"stream_key": "contact-ic@example.com",
"stream_url": "https://example.com/livestream"
}
```
Returns:
requests.Response: The response object
"""
util.require_keys(kwargs, "meeting_id")
return self.get_request(
"/meetings/{}/livestream".format(kwargs.get("meeting_id")), params=kwargs
)
def update_webinar(self, **kwargs):
"""
Use this API to update the webinar's stream information.
Expects:
- webinar_id: int
- stream_url: string (URL)
- stream_key: string
- page_url: string (URL)
Response content sample:
```json
{
"page_url": "https://example.com/livestream/123",
"stream_key": "contact-it@example.com",
"stream_url": "https://example.com/livestream"
}
```
Returns:
requests.Response: The response object
"""
util.require_keys(kwargs, "webinar_id")
return self.patch_request(
"/webinars/{}/livestream".format(kwargs.get("webinar_id")), data=kwargs
)
def update_webinar_status(self, **kwargs):
"""
Use this API to update the status of a webinar's live stream.
Expects:
- webinar_id: int
- action (start|stop)
- settings: dict
Response content sample:
```json
{
"action": "start",
"settings": {
"active_speaker_name": true,
"display_name": "Jill Chill"
}
```
Returns:
requests.Response: The response object
"""
util.require_keys(kwargs, "webinar_id")
return self.patch_request(
"/webinars/{}/livestream/status".format(kwargs.get("webinar_id")),
data=kwargs,
)
def get_webinar_livestream(self, **kwargs):
"""Get the webinar's live stream details
Expects:
- webinar_id: int
Response content sample:
```json
{
"page_url": "https://example.com/livestream/123",
"stream_key": "contact-ic@example.com",
"stream_url": "https://example.com/livestream"
}
```
Returns:
requests.Response: The response object
"""
util.require_keys(kwargs, "webinar_id")
return self.get_request(
"/webinars/{}/livestream".format(kwargs.get("webinar_id")), params=kwargs
)
| 28.045161
| 85
| 0.552105
| 439
| 4,347
| 5.316629
| 0.170843
| 0.051414
| 0.051414
| 0.061697
| 0.847472
| 0.788346
| 0.788346
| 0.788346
| 0.656384
| 0.656384
| 0
| 0.004435
| 0.325742
| 4,347
| 154
| 86
| 28.227273
| 0.79188
| 0.457327
| 0
| 0.388889
| 0
| 0
| 0.174695
| 0.097624
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0.083333
| 0
| 0.444444
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
7ac2def1a3c048576701c4528481d9d708d64c08
| 51
|
py
|
Python
|
config/__init__.py
|
beesk135/ReID-Survey
|
d1467c0ce5d3ca78640196360a05df9ff9f9f42a
|
[
"MIT"
] | 501
|
2020-01-14T06:31:35.000Z
|
2022-03-31T05:34:05.000Z
|
config/__init__.py
|
beesk135/ReID-Survey
|
d1467c0ce5d3ca78640196360a05df9ff9f9f42a
|
[
"MIT"
] | 19
|
2020-01-15T06:07:16.000Z
|
2022-03-01T11:46:00.000Z
|
config/__init__.py
|
beesk135/ReID-Survey
|
d1467c0ce5d3ca78640196360a05df9ff9f9f42a
|
[
"MIT"
] | 88
|
2020-01-15T03:44:22.000Z
|
2022-03-23T11:41:55.000Z
|
# encoding: utf-8
from .defaults import _C as cfg
| 12.75
| 31
| 0.72549
| 9
| 51
| 4
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.02439
| 0.196078
| 51
| 3
| 32
| 17
| 0.853659
| 0.294118
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
8f9716f72ace6e52224a98b4fab455b2e5532a3c
| 119
|
py
|
Python
|
data/__init__.py
|
renjunxiang/Word_Segmentation_PyTorch
|
47e02745caaf8df7b7a15b0a7342808efd0d5e7e
|
[
"MIT"
] | 7
|
2019-04-13T16:07:17.000Z
|
2022-03-15T06:34:42.000Z
|
data/__init__.py
|
renjunxiang/Word_Segmentation_PyTorch
|
47e02745caaf8df7b7a15b0a7342808efd0d5e7e
|
[
"MIT"
] | 1
|
2019-12-30T10:21:39.000Z
|
2019-12-30T10:21:39.000Z
|
data/__init__.py
|
renjunxiang/Word_Segmentation_PyTorch
|
47e02745caaf8df7b7a15b0a7342808efd0d5e7e
|
[
"MIT"
] | 4
|
2019-03-25T00:57:34.000Z
|
2021-03-17T13:40:40.000Z
|
from .load_data import load_data
from .process import Process
from .tag import tag_to_ix, START_TAG, STOP_TAG, PAD_TAG
| 29.75
| 56
| 0.823529
| 22
| 119
| 4.136364
| 0.5
| 0.175824
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.12605
| 119
| 3
| 57
| 39.666667
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
8fc830a521e8ed2ec01bcd3afa62d6adae336d25
| 170
|
py
|
Python
|
toxicity/__init__.py
|
bkimmig/kaggle-toxic-comment
|
dbfbcec575fd76255abcbe2a46a512010cf77013
|
[
"MIT"
] | null | null | null |
toxicity/__init__.py
|
bkimmig/kaggle-toxic-comment
|
dbfbcec575fd76255abcbe2a46a512010cf77013
|
[
"MIT"
] | null | null | null |
toxicity/__init__.py
|
bkimmig/kaggle-toxic-comment
|
dbfbcec575fd76255abcbe2a46a512010cf77013
|
[
"MIT"
] | null | null | null |
base_dir = os.path.split(os.path.dirname(__file__))[0]
data_dir = os.path.join(
base_dir,
"data",
)
resource_dir = os.path.join(
base_dir,
"resources",
)
| 17
| 54
| 0.647059
| 26
| 170
| 3.884615
| 0.461538
| 0.237624
| 0.267327
| 0.257426
| 0.39604
| 0.39604
| 0
| 0
| 0
| 0
| 0
| 0.007194
| 0.182353
| 170
| 9
| 55
| 18.888889
| 0.719424
| 0
| 0
| 0.222222
| 0
| 0
| 0.076471
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
8fcc29135af27dbb8f41eefa006335db6025dc90
| 150
|
py
|
Python
|
apps/odoo/lib/odoo-10.0.post20170615-py2.7.egg/odoo/addons/hr_expense/models/__init__.py
|
gtfarng/Odoo_migrade
|
9cc28fae4c379e407645248a29d22139925eafe7
|
[
"Apache-2.0"
] | 1
|
2019-12-19T01:53:13.000Z
|
2019-12-19T01:53:13.000Z
|
apps/odoo/lib/odoo-10.0.post20170615-py2.7.egg/odoo/addons/hr_expense/models/__init__.py
|
gtfarng/Odoo_migrade
|
9cc28fae4c379e407645248a29d22139925eafe7
|
[
"Apache-2.0"
] | null | null | null |
apps/odoo/lib/odoo-10.0.post20170615-py2.7.egg/odoo/addons/hr_expense/models/__init__.py
|
gtfarng/Odoo_migrade
|
9cc28fae4c379e407645248a29d22139925eafe7
|
[
"Apache-2.0"
] | null | null | null |
# -*- coding: utf-8 -*-
import account_move_line
import hr_department
import hr_expense
import product_template
import res_config
import web_planner
| 16.666667
| 24
| 0.82
| 22
| 150
| 5.272727
| 0.727273
| 0.137931
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007576
| 0.12
| 150
| 8
| 25
| 18.75
| 0.871212
| 0.14
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
8f21429d15ee032029bae1a1e16bf617afabbb52
| 1,129
|
py
|
Python
|
daemon/certs.py
|
Aberdeener/namelessmc_hosting
|
6e9b2bcb0afe161ff6f14d59393079677c12b055
|
[
"MIT"
] | null | null | null |
daemon/certs.py
|
Aberdeener/namelessmc_hosting
|
6e9b2bcb0afe161ff6f14d59393079677c12b055
|
[
"MIT"
] | null | null | null |
daemon/certs.py
|
Aberdeener/namelessmc_hosting
|
6e9b2bcb0afe161ff6f14d59393079677c12b055
|
[
"MIT"
] | null | null | null |
import os
ZFS_ROOT = os.environ['ZFS_ROOT']
def has_certs(website_id, domain):
return os.path.exists(f'/{ZFS_ROOT}/{website_id}/certs/live/{domain}/fullchain.pem')
def get_cert(website_id, domain):
dataset = f'/{ZFS_ROOT}/{website_id}'
os.system(f'docker run -it --rm -v {dataset}/web:/web -v {dataset}/certs:/etc/letsencrypt certbot/certbot certonly -n --webroot --register-unsafely-without-email --agree-tos -d {domain} --webroot-path /web')
def renew_cert(website_id):
dataset = f'/{ZFS_ROOT}/{website_id}'
os.system(f'docker run -it --rm -v {dataset}/web:/web -v {dataset}/certs:/etc/letsencrypt certbot/certbot renew')
def copy_certs(website_id, domain):
# TODO Is rm necessary?
os.system(f'rm -f /ssd/container/namelessmc/proxy/certs/{domain}.cert')
os.system(f'rm -f /ssd/container/namelessmc/proxy/certs/{domain}.key')
os.system(f'cp /{ZFS_ROOT}/{website_id}/certs/live/{domain}/fullchain.pem /ssd/container/namelessmc/proxy/certs/{domain}.cert')
os.system(f'cp /{ZFS_ROOT}/{website_id}/certs/live/{domain}/privkey.pem /ssd/container/namelessmc/proxy/certs/{domain}.key')
| 43.423077
| 211
| 0.71302
| 176
| 1,129
| 4.460227
| 0.301136
| 0.103185
| 0.06879
| 0.101911
| 0.681529
| 0.680255
| 0.680255
| 0.620382
| 0.620382
| 0.550318
| 0
| 0
| 0.104517
| 1,129
| 25
| 212
| 45.16
| 0.776459
| 0.018601
| 0
| 0.133333
| 0
| 0.266667
| 0.670886
| 0.469259
| 0
| 0
| 0
| 0.04
| 0
| 1
| 0.266667
| false
| 0
| 0.066667
| 0.066667
| 0.4
| 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
| 1
| null | 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
8f2f0873a212522d01786b01447035f8e60ed1ff
| 152
|
py
|
Python
|
two_snakes/manager/service.py
|
rinman24/two-snakes
|
75e7b2ec61d47a06f19d517963fc0b18bef817a2
|
[
"MIT"
] | null | null | null |
two_snakes/manager/service.py
|
rinman24/two-snakes
|
75e7b2ec61d47a06f19d517963fc0b18bef817a2
|
[
"MIT"
] | null | null | null |
two_snakes/manager/service.py
|
rinman24/two-snakes
|
75e7b2ec61d47a06f19d517963fc0b18bef817a2
|
[
"MIT"
] | null | null | null |
"""Manager service."""
class Manager:
"""Encapsulation of manager service."""
def __init__(self) -> None:
self._instance: bool = True
| 19
| 43
| 0.625
| 16
| 152
| 5.625
| 0.75
| 0.311111
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.223684
| 152
| 7
| 44
| 21.714286
| 0.762712
| 0.328947
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
8f38f09a99790a3c6fa59990e333d1d2e1000412
| 55
|
py
|
Python
|
RUNME.py
|
leifdenby/DIPOLE
|
2f9dcec99d28667fdf85ab5e2e86850ee75f20dd
|
[
"MIT"
] | 4
|
2021-08-30T23:50:57.000Z
|
2022-03-14T09:07:03.000Z
|
RUNME.py
|
leifdenby/DIPOLE
|
2f9dcec99d28667fdf85ab5e2e86850ee75f20dd
|
[
"MIT"
] | 4
|
2021-08-30T23:48:03.000Z
|
2022-01-12T18:53:49.000Z
|
RUNME.py
|
leifdenby/DIPOLE
|
2f9dcec99d28667fdf85ab5e2e86850ee75f20dd
|
[
"MIT"
] | 2
|
2021-08-25T16:25:41.000Z
|
2022-02-04T04:52:42.000Z
|
import processing
import visualizations
import analysis
| 18.333333
| 21
| 0.909091
| 6
| 55
| 8.333333
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.090909
| 55
| 3
| 22
| 18.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
8f4be4310da690f87d2bf2508934b12e2223068e
| 681
|
py
|
Python
|
ef/config/components/__init__.py
|
JacobMSD/ef_python
|
13d785c10dd293c60ab90065c518e5afb14e5a02
|
[
"MIT"
] | 6
|
2019-04-14T06:19:40.000Z
|
2021-09-14T13:46:26.000Z
|
ef/config/components/__init__.py
|
JacobMSD/ef_python
|
13d785c10dd293c60ab90065c518e5afb14e5a02
|
[
"MIT"
] | 31
|
2018-03-02T12:05:20.000Z
|
2019-02-20T09:29:08.000Z
|
ef/config/components/__init__.py
|
JacobMSD/ef_python
|
13d785c10dd293c60ab90065c518e5afb14e5a02
|
[
"MIT"
] | 10
|
2017-12-21T15:16:55.000Z
|
2020-10-31T23:59:50.000Z
|
"""This package contains all supported configuration components
use "from components import *" before turning a configparser object into components
to make sure all config section names are registered in ef.config.section:ConfigSection"""
from ef.config.components.fields import *
from ef.config.components.boundary_conditions import *
from ef.config.components.inner_region import *
from ef.config.components.output_file import *
from ef.config.components.particle_interaction_model import *
from ef.config.components.particle_source import *
from ef.config.components.shapes import *
from ef.config.components.spatial_mesh import *
from ef.config.components.time_grid import *
| 45.4
| 90
| 0.829662
| 94
| 681
| 5.925532
| 0.457447
| 0.143627
| 0.193896
| 0.355476
| 0.43088
| 0.129264
| 0
| 0
| 0
| 0
| 0
| 0
| 0.099853
| 681
| 14
| 91
| 48.642857
| 0.908646
| 0.342144
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
8f7055496889aaaccf5be4915dc218cd65b6f00b
| 3,304
|
py
|
Python
|
src/optimizer/pass_support.py
|
ssarangi/python_type_inference
|
d04c4021b8a3f971015703f78f5742b002fbe9dd
|
[
"MIT"
] | null | null | null |
src/optimizer/pass_support.py
|
ssarangi/python_type_inference
|
d04c4021b8a3f971015703f78f5742b002fbe9dd
|
[
"MIT"
] | null | null | null |
src/optimizer/pass_support.py
|
ssarangi/python_type_inference
|
d04c4021b8a3f971015703f78f5742b002fbe9dd
|
[
"MIT"
] | null | null | null |
__author__ = 'sarangis'
class ModulePass:
def __init__(self):
pass
def run_on_module(self, node):
raise NotImplementedError("Derived passes class should implement run_on_module")
class FunctionPass:
def __init__(self):
pass
def run_on_function(self, node):
raise NotImplementedError("Derived passes class should implement run_on_function")
class InstVisitorPass:
def __init__(self):
pass
def visit(self, node):
name = "visit_%s" % type(node).__name__.lower()
if hasattr(self, name):
return getattr(self, name)(node)
else:
return self.generic_visit(node)
def generic_visit(self, node):
raise NotImplementedError("Generic Visitor not implemented")
def visit_module(self, node):
# Iterate through all the functions in the module
results = [self.visit_function(f) for f in node.functions]
return results
def visit_function(self, node):
# Iterate through all the basic blocks in the module
results = [self.visit_basicblock(bb) for bb in node.basic_blocks]
return results
def visit_basicblock(self, node):
# Iterate through all the instructions in the module
results = [self.visit(i) for i in node.instructions]
return results
def visit_callinstruction(self, node):
pass
def visit_terminateinstruction(self, node):
pass
def visit_returninstruction(self, node):
pass
def visit_selectinstruction(self, node):
pass
def visit_loadinstruction(self, node):
pass
def visit_storeinstruction(self, node):
pass
def visit_addinstruction(self, node):
pass
def visit_subinstruction(self, node):
pass
def visit_mulinstruction(self, node):
pass
def visit_divinstruction(self, node):
pass
def visit_faddinstruction(self, node):
pass
def visit_fsubinstruction(self, node):
pass
def visit_fmulinstruction(self, node):
pass
def visit_fdivinstruction(self, node):
pass
def visit_allocainstruction(self, node):
pass
def visit_phiinstruction(self, node):
pass
def visit_branchinstruction(self, node):
pass
def visit_conditionalbranchinstruction(self, node):
pass
def visit_indirectbranchinstruction(self, node):
pass
def visit_switchinstruction(self, node):
pass
def visit_selectinstruction(self, node):
pass
def visit_icmpinstruction(self, node):
pass
def visit_fcmpinstruction(self, node):
pass
def visit_castinstruction(self, node):
pass
def visit_gepinstruction(self, node):
pass
def visit_extractelementinstruction(self, node):
pass
def visit_insertelementinstruction(self, node):
pass
def visit_shiftleftinstruction(self, node):
pass
def visit_logicalshiftrightinstruction(self, node):
pass
def visit_arithmeticshiftrightinstruction(self, node):
pass
def visit_andinstruction(self, node):
pass
def visit_orinstruction(self, node):
pass
def visit_xorinstruction(self, node):
pass
| 22.944444
| 90
| 0.654661
| 363
| 3,304
| 5.76584
| 0.225895
| 0.152891
| 0.189202
| 0.229336
| 0.498328
| 0.222169
| 0.143335
| 0.121357
| 0.121357
| 0.121357
| 0
| 0
| 0.274213
| 3,304
| 144
| 91
| 22.944444
| 0.872811
| 0.045097
| 0
| 0.453608
| 0
| 0
| 0.047906
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.443299
| false
| 0.42268
| 0
| 0
| 0.525773
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 5
|
56c91f451f3beaeadb0b69820698ccfe2c2d7c27
| 38
|
py
|
Python
|
cupy_alias/sparse/coo.py
|
fixstars/clpy
|
693485f85397cc110fa45803c36c30c24c297df0
|
[
"BSD-3-Clause"
] | 142
|
2018-06-07T07:43:10.000Z
|
2021-10-30T21:06:32.000Z
|
cupy_alias/sparse/coo.py
|
fixstars/clpy
|
693485f85397cc110fa45803c36c30c24c297df0
|
[
"BSD-3-Clause"
] | 282
|
2018-06-07T08:35:03.000Z
|
2021-03-31T03:14:32.000Z
|
cupy_alias/sparse/coo.py
|
fixstars/clpy
|
693485f85397cc110fa45803c36c30c24c297df0
|
[
"BSD-3-Clause"
] | 19
|
2018-06-19T11:07:53.000Z
|
2021-05-13T20:57:04.000Z
|
from clpy.sparse.coo import * # NOQA
| 19
| 37
| 0.710526
| 6
| 38
| 4.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.184211
| 38
| 1
| 38
| 38
| 0.870968
| 0.105263
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
56f8777c7abc7f48a08dfab3bfb541a28cb98f7f
| 199
|
py
|
Python
|
core/src/zeit/cmp/browser/resources.py
|
rickdg/vivi
|
16134ac954bf8425646d4ad47bdd1f372e089355
|
[
"BSD-3-Clause"
] | 5
|
2019-05-16T09:51:29.000Z
|
2021-05-31T09:30:03.000Z
|
core/src/zeit/cmp/browser/resources.py
|
rickdg/vivi
|
16134ac954bf8425646d4ad47bdd1f372e089355
|
[
"BSD-3-Clause"
] | 107
|
2019-05-24T12:19:02.000Z
|
2022-03-23T15:05:56.000Z
|
core/src/zeit/cmp/browser/resources.py
|
rickdg/vivi
|
16134ac954bf8425646d4ad47bdd1f372e089355
|
[
"BSD-3-Clause"
] | 3
|
2020-08-14T11:01:17.000Z
|
2022-01-08T17:32:19.000Z
|
from zeit.cms.browser.resources import Resource, Library
import zeit.cms.browser.resources
lib = Library('zeit.cmp', 'resources')
Resource('cmp.js', depends=[
zeit.cms.browser.resources.base])
| 24.875
| 56
| 0.753769
| 27
| 199
| 5.555556
| 0.481481
| 0.14
| 0.28
| 0.46
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.100503
| 199
| 7
| 57
| 28.428571
| 0.837989
| 0
| 0
| 0
| 0
| 0
| 0.115578
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.4
| 0
| 0.4
| 0
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
713c63487e9dfa4549d23eb68b046f459fd1b6a0
| 57
|
py
|
Python
|
asgard/backends/mesos/__init__.py
|
pabarros/asgard-api
|
3c10d5f99f584df5e8011558cf42e8b201d567e9
|
[
"MIT"
] | 3
|
2020-01-10T02:16:09.000Z
|
2020-02-19T18:42:37.000Z
|
asgard/backends/mesos/__init__.py
|
pabarros/asgard-api
|
3c10d5f99f584df5e8011558cf42e8b201d567e9
|
[
"MIT"
] | 13
|
2020-01-15T18:22:35.000Z
|
2021-03-31T19:21:54.000Z
|
asgard/backends/mesos/__init__.py
|
rockerbacon/asgard-api
|
1c1eb19225ace4bbecb06b65b1b9c4ab131eb24a
|
[
"MIT"
] | 6
|
2020-03-07T09:49:19.000Z
|
2021-07-25T03:14:10.000Z
|
from asgard.backends.mesos.impl import MesosOrchestrator
| 28.5
| 56
| 0.877193
| 7
| 57
| 7.142857
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.070175
| 57
| 1
| 57
| 57
| 0.943396
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
85464a651df4af34bda4f3394834cae0cf169d56
| 202
|
py
|
Python
|
transform_data.py
|
timcopelandoh/KidsMathTest
|
0d82fba83b6d7dc6f2a4a6af050045293d4cd343
|
[
"MIT"
] | null | null | null |
transform_data.py
|
timcopelandoh/KidsMathTest
|
0d82fba83b6d7dc6f2a4a6af050045293d4cd343
|
[
"MIT"
] | null | null | null |
transform_data.py
|
timcopelandoh/KidsMathTest
|
0d82fba83b6d7dc6f2a4a6af050045293d4cd343
|
[
"MIT"
] | null | null | null |
import datetime
def modify_date(date):
'''
Transforms date in integer format to python datetime
'''
return datetime.date(date % 10000, date // 1000000, (date % 1000000) // 10000)
| 20.2
| 82
| 0.648515
| 24
| 202
| 5.416667
| 0.583333
| 0.123077
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.156863
| 0.242574
| 202
| 9
| 83
| 22.444444
| 0.69281
| 0.257426
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| 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
| 1
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
8568e52a638529b71366a6bca2fdb33a08babeb3
| 101
|
py
|
Python
|
Chapter 09/ch9_20.py
|
bpbpublications/TEST-YOUR-SKILLS-IN-PYTHON-LANGUAGE
|
f6a4194684515495d00aa38347a725dd08f39a0c
|
[
"MIT"
] | null | null | null |
Chapter 09/ch9_20.py
|
bpbpublications/TEST-YOUR-SKILLS-IN-PYTHON-LANGUAGE
|
f6a4194684515495d00aa38347a725dd08f39a0c
|
[
"MIT"
] | null | null | null |
Chapter 09/ch9_20.py
|
bpbpublications/TEST-YOUR-SKILLS-IN-PYTHON-LANGUAGE
|
f6a4194684515495d00aa38347a725dd08f39a0c
|
[
"MIT"
] | null | null | null |
romanNums = {'I':101, 'II':201, 'III':301 }
print(romanNums.popitem())
print(romanNums.popitem())
| 25.25
| 44
| 0.653465
| 13
| 101
| 5.076923
| 0.692308
| 0.424242
| 0.636364
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1
| 0.108911
| 101
| 3
| 45
| 33.666667
| 0.633333
| 0
| 0
| 0.666667
| 0
| 0
| 0.061224
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.666667
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
8571731c8c82585c5291c46243140170a789437e
| 88
|
py
|
Python
|
handler.py
|
ericnchen/aws-lambda-latex
|
5084d9508f55ab7f254f821916a8ef10d189f541
|
[
"MIT"
] | null | null | null |
handler.py
|
ericnchen/aws-lambda-latex
|
5084d9508f55ab7f254f821916a8ef10d189f541
|
[
"MIT"
] | null | null | null |
handler.py
|
ericnchen/aws-lambda-latex
|
5084d9508f55ab7f254f821916a8ef10d189f541
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
# noinspection PyUnresolvedReferences
from lambdalatex import *
| 22
| 37
| 0.738636
| 8
| 88
| 8.125
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.013158
| 0.136364
| 88
| 3
| 38
| 29.333333
| 0.842105
| 0.647727
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
a4330496b0e37c0b4a859bf554fc76a9aa563881
| 218
|
py
|
Python
|
cloud_pgadmin/files/root/config_local.py
|
bayrell/dockerfiles
|
ff258073b3eeda96fb87725d0ef23e6c829b8704
|
[
"MIT"
] | 3
|
2018-03-19T16:22:32.000Z
|
2020-04-13T10:25:59.000Z
|
pgadmin/files/root/config_local.py
|
bayrell/dockerfiles
|
ff258073b3eeda96fb87725d0ef23e6c829b8704
|
[
"MIT"
] | null | null | null |
pgadmin/files/root/config_local.py
|
bayrell/dockerfiles
|
ff258073b3eeda96fb87725d0ef23e6c829b8704
|
[
"MIT"
] | null | null | null |
LOG_FILE = '/var/lib/pgadmin/pgadmin.log'
SQLITE_PATH = '/var/lib/pgadmin/pgadmin.db'
SESSION_DB_PATH = '/var/lib/pgadmin/sessions'
STORAGE_DIR = '/var/lib/pgadmin/storage'
SERVER_MODE = True
ALLOW_SAVE_PASSWORD = True
| 36.333333
| 45
| 0.775229
| 34
| 218
| 4.735294
| 0.529412
| 0.149068
| 0.322981
| 0.248447
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.077982
| 218
| 6
| 46
| 36.333333
| 0.800995
| 0
| 0
| 0
| 0
| 0
| 0.474886
| 0.474886
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.166667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
f10af5837bd22fd3d8be4ff19523bdef0baa977e
| 738
|
py
|
Python
|
PHP Companion.py
|
risingphoenix/SublimePHPCompanion
|
0dd69fb1f3aa4485fbcf1f4edbaba03154e5882b
|
[
"MIT"
] | 979
|
2015-01-21T06:43:51.000Z
|
2022-02-06T00:20:35.000Z
|
PHP Companion.py
|
w1lldone/SublimePHPCompanion
|
dddc614fe89d93eeb398837a2e01ff171cecaf00
|
[
"MIT",
"Unlicense"
] | 112
|
2015-03-18T15:26:50.000Z
|
2022-03-28T00:44:10.000Z
|
PHP Companion.py
|
w1lldone/SublimePHPCompanion
|
dddc614fe89d93eeb398837a2e01ff171cecaf00
|
[
"MIT",
"Unlicense"
] | 163
|
2015-02-24T20:27:12.000Z
|
2021-11-05T16:29:13.000Z
|
from .php_companion.commands.expand_fqcn_command import ExpandFqcnCommand
from .php_companion.commands.find_use_command import FindUseCommand
from .php_companion.commands.import_namespace_command import ImportNamespaceCommand
from .php_companion.commands.import_use_command import ImportUseCommand
from .php_companion.commands.replace_fqcn_command import ReplaceFqcnCommand
from .php_companion.commands.goto_definition_scope import GotoDefinitionScopeCommand
from .php_companion.commands.insert_php_constructor_property import InsertPhpConstructorPropertyCommand
from .php_companion.commands.implement import ImplementCommand
from .php_companion.commands.parse import ParseCommand
from .php_companion.commands.create import CreateCommand
| 67.090909
| 103
| 0.905149
| 85
| 738
| 7.564706
| 0.364706
| 0.108865
| 0.248834
| 0.37325
| 0.093313
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.054201
| 738
| 10
| 104
| 73.8
| 0.921203
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
f1354c48a63b7ef803876d40f23cf31828971187
| 1,378
|
py
|
Python
|
src/sdk/test/test_setting_metas_api.py
|
Chace-wang/bk-user
|
057f270d66a1834312306c9fba1f4e95521f10b1
|
[
"MIT"
] | null | null | null |
src/sdk/test/test_setting_metas_api.py
|
Chace-wang/bk-user
|
057f270d66a1834312306c9fba1f4e95521f10b1
|
[
"MIT"
] | null | null | null |
src/sdk/test/test_setting_metas_api.py
|
Chace-wang/bk-user
|
057f270d66a1834312306c9fba1f4e95521f10b1
|
[
"MIT"
] | 1
|
2021-12-31T06:48:41.000Z
|
2021-12-31T06:48:41.000Z
|
# coding: utf-8
"""
蓝鲸用户管理 API
User management APIs for BlueKing # noqa: E501
OpenAPI spec version: v2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import bkuser_sdk
from api.setting_metas_api import SettingMetasApi # noqa: E501
from bkuser_sdk.rest import ApiException
class TestSettingMetasApi(unittest.TestCase):
"""SettingMetasApi unit test stubs"""
def setUp(self):
self.api = api.setting_metas_api.SettingMetasApi() # noqa: E501
def tearDown(self):
pass
def test_v2_setting_metas_create(self):
"""Test case for v2_setting_metas_create
"""
pass
def test_v2_setting_metas_delete(self):
"""Test case for v2_setting_metas_delete
"""
pass
def test_v2_setting_metas_list(self):
"""Test case for v2_setting_metas_list
"""
pass
def test_v2_setting_metas_partial_update(self):
"""Test case for v2_setting_metas_partial_update
"""
pass
def test_v2_setting_metas_read(self):
"""Test case for v2_setting_metas_read
"""
pass
def test_v2_setting_metas_update(self):
"""Test case for v2_setting_metas_update
"""
pass
if __name__ == '__main__':
unittest.main()
| 19.685714
| 72
| 0.6582
| 172
| 1,378
| 4.906977
| 0.331395
| 0.199052
| 0.199052
| 0.092417
| 0.421801
| 0.398104
| 0.220379
| 0.082938
| 0
| 0
| 0
| 0.022571
| 0.260523
| 1,378
| 69
| 73
| 19.971014
| 0.805692
| 0.371553
| 0
| 0.291667
| 1
| 0
| 0.009988
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0.291667
| 0.208333
| 0
| 0.583333
| 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
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 5
|
f1542a277984aabf4f824c5624a0219363825a2f
| 140
|
py
|
Python
|
launchers/data.py
|
BidGem/WeatherPE
|
ca353511869375b96ca848a5c9a6499f3a94537a
|
[
"MIT"
] | 2
|
2020-03-05T08:09:32.000Z
|
2020-03-05T10:55:58.000Z
|
launchers/data.py
|
BidGem/WeatherPE
|
ca353511869375b96ca848a5c9a6499f3a94537a
|
[
"MIT"
] | null | null | null |
launchers/data.py
|
BidGem/WeatherPE
|
ca353511869375b96ca848a5c9a6499f3a94537a
|
[
"MIT"
] | null | null | null |
from weape.argv import get_data_from_xlsx
pressure, hospitalizations = get_data_from_xlsx(11, 13)
pressure.plot()
hospitalizations.plot()
| 20
| 55
| 0.821429
| 20
| 140
| 5.45
| 0.6
| 0.12844
| 0.201835
| 0.275229
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.031496
| 0.092857
| 140
| 6
| 56
| 23.333333
| 0.826772
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.25
| 0
| 0.25
| 0
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
f1776bf02425828f9886f6f9cc56fe204298c469
| 26
|
py
|
Python
|
python/__init__.py
|
larsks/libomron
|
7febf1792621f381050881ee827b186bbd6ed610
|
[
"BSD-3-Clause"
] | 53
|
2015-01-12T20:51:57.000Z
|
2021-12-15T03:34:44.000Z
|
python/__init__.py
|
larsks/libomron
|
7febf1792621f381050881ee827b186bbd6ed610
|
[
"BSD-3-Clause"
] | 2
|
2015-06-20T13:56:55.000Z
|
2017-07-22T16:35:40.000Z
|
python/__init__.py
|
larsks/libomron
|
7febf1792621f381050881ee827b186bbd6ed610
|
[
"BSD-3-Clause"
] | 15
|
2015-02-01T07:42:33.000Z
|
2022-01-11T18:53:39.000Z
|
# this is a python module
| 13
| 25
| 0.730769
| 5
| 26
| 3.8
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.230769
| 26
| 1
| 26
| 26
| 0.95
| 0.884615
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
74f0279209b1caf51674e5f6cf0a7c4ea54dfb14
| 49
|
py
|
Python
|
src/pylubridate/utils.py
|
qiushiyan/pylubridate
|
f033798caafff574b7e7eedf368cb7bf023b97ba
|
[
"MIT"
] | null | null | null |
src/pylubridate/utils.py
|
qiushiyan/pylubridate
|
f033798caafff574b7e7eedf368cb7bf023b97ba
|
[
"MIT"
] | null | null | null |
src/pylubridate/utils.py
|
qiushiyan/pylubridate
|
f033798caafff574b7e7eedf368cb7bf023b97ba
|
[
"MIT"
] | null | null | null |
def pstr(x):
return map(lambda i: str(i), x)
| 16.333333
| 35
| 0.591837
| 10
| 49
| 2.9
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.22449
| 49
| 2
| 36
| 24.5
| 0.763158
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0.5
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 5
|
74f0ef5b1125dd47fe7909843607d45e15af3890
| 175
|
py
|
Python
|
tutproject/todo/forms.py
|
Fatemeh-Khorshidi/python_course
|
a70a986e42ffc60b94ec9e1ee9fbc6b86c6ff0cd
|
[
"Apache-2.0"
] | 1
|
2021-11-27T12:02:11.000Z
|
2021-11-27T12:02:11.000Z
|
tutproject/todo/forms.py
|
Fatemeh-Khorshidi/python_course
|
a70a986e42ffc60b94ec9e1ee9fbc6b86c6ff0cd
|
[
"Apache-2.0"
] | null | null | null |
tutproject/todo/forms.py
|
Fatemeh-Khorshidi/python_course
|
a70a986e42ffc60b94ec9e1ee9fbc6b86c6ff0cd
|
[
"Apache-2.0"
] | null | null | null |
from django import forms
class SimpleForm(forms.Form):
title = forms.CharField( max_length=10, )
description = forms.CharField( max_length=10,widget=forms.Textarea)
| 25
| 71
| 0.754286
| 23
| 175
| 5.652174
| 0.652174
| 0.215385
| 0.261538
| 0.353846
| 0.384615
| 0
| 0
| 0
| 0
| 0
| 0
| 0.026667
| 0.142857
| 175
| 7
| 71
| 25
| 0.84
| 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 | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
2d12c52a3666b4d65b41757ff0c868bc01aa0801
| 36
|
py
|
Python
|
tests/__init__.py
|
loeiten/htma_py
|
360d5ba3d3c22d111e0a0fe00e3ae5cf00ca16c8
|
[
"Unlicense"
] | null | null | null |
tests/__init__.py
|
loeiten/htma_py
|
360d5ba3d3c22d111e0a0fe00e3ae5cf00ca16c8
|
[
"Unlicense"
] | 2
|
2021-05-05T20:43:48.000Z
|
2021-05-05T20:43:57.000Z
|
tests/__init__.py
|
loeiten/htma_py
|
360d5ba3d3c22d111e0a0fe00e3ae5cf00ca16c8
|
[
"Unlicense"
] | null | null | null |
"""Package containing the tests."""
| 18
| 35
| 0.694444
| 4
| 36
| 6.25
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 36
| 1
| 36
| 36
| 0.78125
| 0.805556
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
2d2e69da56082c618f5840c05ab432fadc20c8cc
| 197
|
py
|
Python
|
1.py
|
christi-john/codechef-practice
|
2f52cb72cbc5df4f4978fdd1cf77b1f01bc583b0
|
[
"MIT"
] | null | null | null |
1.py
|
christi-john/codechef-practice
|
2f52cb72cbc5df4f4978fdd1cf77b1f01bc583b0
|
[
"MIT"
] | null | null | null |
1.py
|
christi-john/codechef-practice
|
2f52cb72cbc5df4f4978fdd1cf77b1f01bc583b0
|
[
"MIT"
] | null | null | null |
# HS08TEST
amt,bal=map(float,input().split())
if(int(amt)%5==0):
if(amt<=(bal-0.5)): print("{:.2f}".format(bal-0.5-amt))
else: print("{:.2f}".format(bal))
else: print("{:.2f}".format(bal))
| 28.142857
| 59
| 0.573604
| 34
| 197
| 3.323529
| 0.441176
| 0.185841
| 0.345133
| 0.424779
| 0.353982
| 0
| 0
| 0
| 0
| 0
| 0
| 0.061453
| 0.091371
| 197
| 7
| 60
| 28.142857
| 0.569832
| 0.040609
| 0
| 0.4
| 0
| 0
| 0.095745
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0.6
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
74112342222c19cb8ac320598c1e3fd75eabca1b
| 97
|
py
|
Python
|
myprojects/message_and_list/admin.py
|
borko81/django_core
|
65699480b2aacd5136ffc6b18cc7bbd8cf89a559
|
[
"MIT"
] | null | null | null |
myprojects/message_and_list/admin.py
|
borko81/django_core
|
65699480b2aacd5136ffc6b18cc7bbd8cf89a559
|
[
"MIT"
] | null | null | null |
myprojects/message_and_list/admin.py
|
borko81/django_core
|
65699480b2aacd5136ffc6b18cc7bbd8cf89a559
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from .models import Product
admin.site.register(Product)
| 16.166667
| 33
| 0.773196
| 13
| 97
| 5.769231
| 0.692308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.164948
| 97
| 5
| 34
| 19.4
| 0.925926
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
74a27e89192c847d9d61b2edf81e6cd1adbb31cf
| 112
|
py
|
Python
|
ros2console/utilities/converter/__init__.py
|
cpc-lab-robotics/ros2console
|
56b9795641ef4be6a0ef6114209ee848312a17d9
|
[
"Apache-2.0"
] | null | null | null |
ros2console/utilities/converter/__init__.py
|
cpc-lab-robotics/ros2console
|
56b9795641ef4be6a0ef6114209ee848312a17d9
|
[
"Apache-2.0"
] | null | null | null |
ros2console/utilities/converter/__init__.py
|
cpc-lab-robotics/ros2console
|
56b9795641ef4be6a0ef6114209ee848312a17d9
|
[
"Apache-2.0"
] | null | null | null |
from .catkin_pkg_package import convert_catkin_pkg_to_dict
from .key_name import props_to_camel, props_to_snake
| 37.333333
| 58
| 0.892857
| 20
| 112
| 4.45
| 0.65
| 0.202247
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.080357
| 112
| 2
| 59
| 56
| 0.864078
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
77b92ad4f62e062a874cacab692bf777c55b60b4
| 442
|
py
|
Python
|
dqc/rule/basic/factor_common_value_not_in_range.py
|
Indexical-Metrics-Measure-Advisory/watchmen-dqc
|
91196d8da29415f33b35d800c424534880162a12
|
[
"MIT"
] | 1
|
2021-07-29T10:44:50.000Z
|
2021-07-29T10:44:50.000Z
|
dqc/rule/basic/factor_common_value_not_in_range.py
|
Indexical-Metrics-Measure-Advisory/watchmen-dqc
|
91196d8da29415f33b35d800c424534880162a12
|
[
"MIT"
] | null | null | null |
dqc/rule/basic/factor_common_value_not_in_range.py
|
Indexical-Metrics-Measure-Advisory/watchmen-dqc
|
91196d8da29415f33b35d800c424534880162a12
|
[
"MIT"
] | null | null | null |
from pandas import DataFrame
from dqc.model.analysis.monitor_rule import MonitorRule
from dqc.rule.utils.factor_utils import check_common_value_not_in_range
from dqc.rule.utils.topic_utils import check_factor_value
def init():
def factor_common_value_not_in_range(df: DataFrame, topic, rule: MonitorRule):
return check_factor_value(df, topic, rule, check_common_value_not_in_range)
return factor_common_value_not_in_range
| 34
| 83
| 0.830317
| 69
| 442
| 4.927536
| 0.333333
| 0.129412
| 0.164706
| 0.188235
| 0.311765
| 0.311765
| 0
| 0
| 0
| 0
| 0
| 0
| 0.115385
| 442
| 12
| 84
| 36.833333
| 0.869565
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.5
| 0.125
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 5
|
77d5da596553a98ab84e350e0d72b8a995e33c1c
| 103
|
py
|
Python
|
Step 3 - Data Analysis/py/libs/__init__.py
|
UNITUSLabs/Ready-Steady-Go-AI
|
d5a3b81703f7b484cf6d5785ea6b21c059b2f143
|
[
"MIT"
] | 4
|
2021-09-15T23:52:48.000Z
|
2021-09-17T19:53:52.000Z
|
Step 3 - Data Analysis/py/libs/__init__.py
|
UNITUSLabs/Ready-Steady-Go-AI
|
d5a3b81703f7b484cf6d5785ea6b21c059b2f143
|
[
"MIT"
] | null | null | null |
Step 3 - Data Analysis/py/libs/__init__.py
|
UNITUSLabs/Ready-Steady-Go-AI
|
d5a3b81703f7b484cf6d5785ea6b21c059b2f143
|
[
"MIT"
] | 3
|
2021-09-14T00:27:09.000Z
|
2022-01-21T04:40:11.000Z
|
from .dataloaders import *
from .dcnnModelBuilder import *
from .getFiles import *
from .tools import *
| 25.75
| 31
| 0.776699
| 12
| 103
| 6.666667
| 0.5
| 0.375
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.145631
| 103
| 4
| 32
| 25.75
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
7ac3f63f30fcf89f99adc980c405856c21959adc
| 87
|
py
|
Python
|
py_tea_code/2.mypro_io/file01.py
|
qq4215279/study_python
|
b0eb9dedfc4abb2fd6c024a599e7375869c3d77a
|
[
"Apache-2.0"
] | null | null | null |
py_tea_code/2.mypro_io/file01.py
|
qq4215279/study_python
|
b0eb9dedfc4abb2fd6c024a599e7375869c3d77a
|
[
"Apache-2.0"
] | null | null | null |
py_tea_code/2.mypro_io/file01.py
|
qq4215279/study_python
|
b0eb9dedfc4abb2fd6c024a599e7375869c3d77a
|
[
"Apache-2.0"
] | null | null | null |
#f = open(r"d:\a.txt","a")
f = open(r"a.txt","a")
f.write("itbaizhan\nsxt\n")
f.close()
| 21.75
| 27
| 0.563218
| 20
| 87
| 2.45
| 0.55
| 0.204082
| 0.244898
| 0.244898
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.08046
| 87
| 4
| 28
| 21.75
| 0.6125
| 0.287356
| 0
| 0
| 0
| 0
| 0.354839
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
7aeece307870cb7326afc048f79b508e70a01bce
| 235
|
py
|
Python
|
plugins/logstash/komand_logstash/actions/__init__.py
|
lukaszlaszuk/insightconnect-plugins
|
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
|
[
"MIT"
] | 46
|
2019-06-05T20:47:58.000Z
|
2022-03-29T10:18:01.000Z
|
plugins/logstash/komand_logstash/actions/__init__.py
|
lukaszlaszuk/insightconnect-plugins
|
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
|
[
"MIT"
] | 386
|
2019-06-07T20:20:39.000Z
|
2022-03-30T17:35:01.000Z
|
plugins/logstash/komand_logstash/actions/__init__.py
|
lukaszlaszuk/insightconnect-plugins
|
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
|
[
"MIT"
] | 43
|
2019-07-09T14:13:58.000Z
|
2022-03-28T12:04:46.000Z
|
# GENERATED BY KOMAND SDK - DO NOT EDIT
from .general_info.action import GeneralInfo
from .hot_threads.action import HotThreads
from .node.action import Node
from .node_stats.action import NodeStats
from .plugins.action import Plugins
| 33.571429
| 44
| 0.825532
| 35
| 235
| 5.457143
| 0.571429
| 0.314136
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.123404
| 235
| 6
| 45
| 39.166667
| 0.927184
| 0.157447
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
7af4cf0dbd213591c559f29813ca033adc0cf7eb
| 25
|
py
|
Python
|
2014-2015/round-2/2-palindrome/python/2a.py
|
fabianm/olympiad
|
43e0acf507ec17d60a3675044c2cf374b1fc2412
|
[
"Apache-2.0"
] | 1
|
2019-11-02T08:09:42.000Z
|
2019-11-02T08:09:42.000Z
|
2014-2015/round-2/2-palindrome/python/2a.py
|
fabianm/olympiad
|
43e0acf507ec17d60a3675044c2cf374b1fc2412
|
[
"Apache-2.0"
] | null | null | null |
2014-2015/round-2/2-palindrome/python/2a.py
|
fabianm/olympiad
|
43e0acf507ec17d60a3675044c2cf374b1fc2412
|
[
"Apache-2.0"
] | null | null | null |
print(len(set(input())))
| 12.5
| 24
| 0.64
| 4
| 25
| 4
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.04
| 25
| 1
| 25
| 25
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
bb188aefaf757b6b8fde1df50e07234054c6d3bd
| 24,662
|
py
|
Python
|
fsl_sub/tests/test_config.py
|
mcraig-ibme/fsl_sub
|
6db9b70e90579c6fc6965c5a4eeeb8206267011c
|
[
"FTL",
"CNRI-Python",
"RSA-MD",
"Linux-OpenIB"
] | null | null | null |
fsl_sub/tests/test_config.py
|
mcraig-ibme/fsl_sub
|
6db9b70e90579c6fc6965c5a4eeeb8206267011c
|
[
"FTL",
"CNRI-Python",
"RSA-MD",
"Linux-OpenIB"
] | null | null | null |
fsl_sub/tests/test_config.py
|
mcraig-ibme/fsl_sub
|
6db9b70e90579c6fc6965c5a4eeeb8206267011c
|
[
"FTL",
"CNRI-Python",
"RSA-MD",
"Linux-OpenIB"
] | null | null | null |
#!/usr/bin/env python
import unittest
import fsl_sub.config
import os
import shutil
import subprocess
import tempfile
from ruamel.yaml import YAML
from unittest.mock import patch
class TestConfig(unittest.TestCase):
@patch('fsl_sub.config.os.path.expanduser', autospec=True)
def test_find_config_file(
self, mock_expanduser):
test_dir = tempfile.mkdtemp()
try:
test_file = os.path.join(test_dir, '.fsl_sub.yml')
with open(test_file, 'w') as tf:
tf.write('something')
with patch.dict(
'fsl_sub.config.os.environ',
{'RANDOMENV': 'A', },
clear=True):
with self.subTest('Expand user'):
mock_expanduser.return_value = test_dir
self.assertEqual(
fsl_sub.config.find_config_file(),
test_file
)
os.unlink(test_file)
test_file = os.path.join(test_dir, 'fsl_sub.yml')
with open(test_file, 'w') as tf:
tf.write('something')
with self.subTest('Environment variable'):
with patch.dict(
'fsl_sub.config.os.environ',
{'FSLSUB_CONF': test_file, },
clear=True):
self.assertEqual(
fsl_sub.config.find_config_file(),
test_file
)
os.unlink(test_file)
fsl_dir = os.path.join(test_dir, 'etc', 'fslconf')
os.makedirs(fsl_dir)
test_file = os.path.join(fsl_dir, 'fsl_sub.yml')
with open(test_file, 'w') as tf:
tf.write('something')
with patch.dict(
'fsl_sub.config.os.environ',
{'FSLDIR': test_dir, },
clear=True):
with self.subTest('FSLDIR'):
self.assertEqual(
fsl_sub.config.find_config_file(),
os.path.realpath(test_file)
)
shutil.rmtree(os.path.join(test_dir, 'etc'))
with self.subTest('Missing configuration'):
with patch(
'fsl_sub.config.os.path.exists',
return_value=False):
self.assertRaises(
fsl_sub.config.MissingConfiguration,
fsl_sub.config.find_config_file
)
with self.subTest('No FSLDIR'):
with patch.dict(
'fsl_sub.config.os.environ',
clear=True):
location = os.path.abspath(
os.path.join(
os.path.dirname(fsl_sub.config.__file__),
'plugins',
'fsl_sub_shell.yml')
)
self.assertEqual(
fsl_sub.config.find_config_file(),
location
)
finally:
shutil.rmtree(test_dir)
@patch('fsl_sub.config.get_plugin_default_conf')
@patch('fsl_sub.config._internal_config_file')
@patch('fsl_sub.config.get_plugin_queue_defs', return_value='')
def test_example_conf(self, mock_gpqd, mock_dcf, mock_gpe):
self.maxDiff = None
yaml = YAML()
base_cpopt = '''baseopt: bits
'''
base_config = '''modulecmd: false
thread_control:
- OMP_NUM_THREADS
method_opts: {}
queues: {}
coproc_opts: {}
'''
coproc_config = '''---
coproc_opts:
cuda:
resource: somethingelse
'''
def_coproc_config = '''---
coproc_opts:
cuda:
''' + base_cpopt
queue_config = '''---
queues:
short.q:
runtime: 100
'''
method_config = (
'''method: shell
method_opts:
shell:
queues: false''',
'''method: sge
method_opts:
sge:
queues: true''', )
merged_method_config = '''method_opts:
shell:
queues: false
sge:
queues: true'''
expected_output = (
"---\nmethod: sge\n"
+ base_config.replace(
'method_opts: {}\n', '').replace(
'queues: {}\n', '').replace(
'coproc_opts: {}\n', '')
+ merged_method_config + '\n'
+ coproc_config.replace('---\n', '').replace('cuda:\n', 'cuda:\n ' + base_cpopt)
+ queue_config.replace('---\n', '')
)
mock_gpqd.return_value = ''
with self.subTest('Single quoted method'):
with tempfile.NamedTemporaryFile(mode='w') as ntf:
ntf.write("---\nmethod: 'shell'\n" + base_config)
ntf.flush()
with tempfile.NamedTemporaryFile(mode='w') as ntf_cp:
ntf_cp.write(coproc_config)
ntf_cp.flush()
with tempfile.NamedTemporaryFile(mode='w') as ntf_cq:
ntf_cq.write(queue_config)
ntf_cq.flush()
with tempfile.NamedTemporaryFile(mode='w') as ntf_dcp:
ntf_dcp.write(def_coproc_config)
ntf_dcp.flush()
mock_dcf.side_effect = (ntf.name, ntf_dcp.name, ntf_cq.name, ntf_cp.name)
mock_gpe.side_effect = method_config
c_od = fsl_sub.config.example_config(method='sge')
e_od = yaml.load(expected_output)
self.assertEqual(c_od, e_od)
mock_dcf.reset_mock(return_value=True, side_effect=True)
mock_gpe.reset_mock(return_value=True, side_effect=True)
with self.subTest('Double quoted method'):
with tempfile.NamedTemporaryFile(mode='w') as ntf:
ntf.write('---\nmethod: "shell"\n' + base_config)
ntf.flush()
with tempfile.NamedTemporaryFile(mode='w') as ntf_cp:
ntf_cp.write(coproc_config)
ntf_cp.flush()
with tempfile.NamedTemporaryFile(mode='w') as ntf_cq:
ntf_cq.write(queue_config)
ntf_cq.flush()
with tempfile.NamedTemporaryFile(mode='w') as ntf_dcp:
ntf_dcp.write(def_coproc_config)
ntf_dcp.flush()
mock_dcf.side_effect = (ntf.name, ntf_dcp.name, ntf_cq.name, ntf_cp.name)
mock_gpe.side_effect = method_config
c_od = fsl_sub.config.example_config(method='sge')
e_od = yaml.load(expected_output)
self.assertEqual(c_od, e_od)
mock_dcf.reset_mock(return_value=True, side_effect=True)
mock_gpe.reset_mock(return_value=True, side_effect=True)
with self.subTest('unquoted quoted method'):
with tempfile.NamedTemporaryFile(mode='w') as ntf:
ntf.write('---\nmethod: shell\n' + base_config)
ntf.flush()
with tempfile.NamedTemporaryFile(mode='w') as ntf_cp:
ntf_cp.write(coproc_config)
ntf_cp.flush()
with tempfile.NamedTemporaryFile(mode='w') as ntf_cq:
ntf_cq.write(queue_config)
ntf_cq.flush()
with tempfile.NamedTemporaryFile(mode='w') as ntf_dcp:
ntf_dcp.write(def_coproc_config)
ntf_dcp.flush()
mock_dcf.side_effect = (ntf.name, ntf_dcp.name, ntf_cq.name, ntf_cp.name)
mock_gpe.side_effect = method_config
c_od = fsl_sub.config.example_config(method='sge')
e_od = yaml.load(expected_output)
self.assertEqual(c_od, e_od)
mock_dcf.reset_mock(return_value=True, side_effect=True)
mock_gpe.reset_mock(return_value=True, side_effect=True)
with self.subTest('Queue capture'):
q_def = '''queues:
a.q:
time: 1'''
qc_expected_output = (
"---\nmethod: 'sge'\n"
+ base_config.replace(
'method_opts: {}\n', '').replace(
'queues: {}\n', '').replace(
'coproc_opts: {}\n', '')
+ merged_method_config + '\n'
+ coproc_config.replace('---\n', '').replace('cuda:\n', 'cuda:\n ' + base_cpopt)
+ q_def
)
mock_gpqd.return_value = YAML().load(q_def)
with tempfile.NamedTemporaryFile(mode='w') as ntf:
ntf.write("---\nmethod: 'shell'\n" + base_config)
ntf.flush()
with tempfile.NamedTemporaryFile(mode='w') as ntf_cp:
ntf_cp.write(coproc_config)
ntf_cp.flush()
with tempfile.NamedTemporaryFile(mode='w') as ntf_cq:
ntf_cq.write(queue_config)
ntf_cq.flush()
with tempfile.NamedTemporaryFile(mode='w') as ntf_dcp:
ntf_dcp.write(def_coproc_config)
ntf_dcp.flush()
mock_dcf.side_effect = (ntf.name, ntf_dcp.name, ntf_cq.name, ntf_cp.name)
mock_gpe.side_effect = method_config
c_od = fsl_sub.config.example_config(method='sge')
e_od = yaml.load(qc_expected_output)
self.assertEqual(c_od, e_od)
mock_dcf.reset_mock(return_value=True, side_effect=True)
mock_gpe.reset_mock(return_value=True, side_effect=True)
@patch(
'fsl_sub.config.load_default_config',
autospec=True,
return_value={'bdict': "somevalue", })
@patch('fsl_sub.config.find_config_file', autospec=True)
def test_read_config_merge(self, mock_find_config_file, mock_ldc):
fsl_sub.config.read_config.cache_clear()
example_yaml = '''
adict:
alist:
- 1
- 2
astring: hello
'''
mock_find_config_file.return_value = '/etc/fsl_sub.conf'
with patch(
'fsl_sub.config.open',
unittest.mock.mock_open(read_data=example_yaml)) as m:
self.assertDictEqual(
fsl_sub.config.read_config(),
{
'adict': {
'alist': [1, 2],
'astring': 'hello',
},
'bdict': 'somevalue',
}
)
m.assert_called_once_with('/etc/fsl_sub.conf', 'r')
@patch('fsl_sub.config._internal_config_file', autospec=True)
@patch('fsl_sub.config.get_plugin_default_conf', autospec=True)
@patch('fsl_sub.config.available_plugins', autospec=True)
def test_load_default_config(self, mock_ap, mock_gpec, mock__icf):
base_conf = '''---
method: 'shell'
thread_control: []
method_opts: {}
coproc_opts: {}
queues: {}
'''
plugins = [
'''---
method_opts:
shell:
queues: False
''',
'''---
method: 'sge'
method_opts:
sge:
queues: True
''', ]
expected_config = {
'method': 'shell',
'thread_control': [],
'method_opts': {
'shell': {
'queues': False,
},
'sge': {
'queues': True,
},
},
'coproc_opts': {},
'queues': {},
}
with tempfile.NamedTemporaryFile(mode='w') as ntf:
ntf.write(base_conf)
ntf.flush()
mock_ap.return_value = ['shell', 'sge', ]
mock__icf.return_value = ntf.name
mock_gpec.side_effect = plugins
self.assertDictEqual(fsl_sub.config.load_default_config(), expected_config)
mock_ap.reset_mock()
mock__icf.reset_mock()
mock_gpec.reset_mock()
@patch(
'fsl_sub.config.load_default_config',
autospec=True,
return_value={})
@patch('fsl_sub.config.find_config_file', autospec=True)
def test_read_config(self, mock_find_config_file, mock_ldc):
with self.subTest("Test good read"):
fsl_sub.config.read_config.cache_clear()
example_yaml = '''
adict:
alist:
- 1
- 2
astring: hello
'''
mock_find_config_file.return_value = '/etc/fsl_sub.conf'
with patch(
'fsl_sub.config.open',
unittest.mock.mock_open(read_data=example_yaml)) as m:
self.assertDictEqual(
fsl_sub.config.read_config(),
{'adict': {
'alist': [1, 2],
'astring': 'hello',
}}
)
m.assert_called_once_with('/etc/fsl_sub.conf', 'r')
with self.subTest("Test bad read"):
fsl_sub.config.read_config.cache_clear()
bad_yaml = "unbalanced: ]["
with patch(
'fsl_sub.config.open',
unittest.mock.mock_open(read_data=bad_yaml)) as m:
self.assertRaises(
fsl_sub.config.BadConfiguration,
fsl_sub.config.read_config)
@patch(
'fsl_sub.config.load_default_config',
autospec=True,
return_value={})
@patch('fsl_sub.config.read_config', autospec=True)
def test_method_config(self, mock_read_config, mock_ldc):
with self.subTest('Test 1'):
mock_read_config.return_value = {
'method_opts': {'method': 'config', }, }
self.assertEqual('config', fsl_sub.config.method_config('method'))
with self.subTest('Test 2'):
self.assertRaises(
TypeError,
fsl_sub.config.method_config
)
with self.subTest('Test 3'):
mock_read_config.return_value = {
'method_o': {'method': 'config', }, }
with self.assertRaises(fsl_sub.config.BadConfiguration) as me:
fsl_sub.config.method_config('method')
self.assertEqual(
me.exception.args[0],
"Unable to find method configuration dictionary")
with self.subTest('Test 4'):
mock_read_config.return_value = {
'method_opts': {'method': 'config', }, }
self.assertEqual('config', fsl_sub.config.method_config('method'))
with self.assertRaises(fsl_sub.config.BadConfiguration) as me:
fsl_sub.config.method_config('method2')
self.assertEqual(
me.exception.args[0],
"Unable to find configuration for method2")
@patch(
'fsl_sub.config.load_default_config',
autospec=True,
return_value={})
@patch('fsl_sub.config.read_config', autospec=True)
def test_coprocessor_config(self, mock_read_config, mock_ldc):
with self.subTest('Test 1'):
mock_read_config.return_value = {
'coproc_opts': {'cuda': 'option', }, }
self.assertEqual(
'option', fsl_sub.config.coprocessor_config('cuda'))
with self.subTest('Test 2'):
self.assertRaises(
TypeError,
fsl_sub.config.coprocessor_config
)
with self.subTest('Test 3'):
mock_read_config.return_value = {
'coproc_o': {'cuda': 'option', }, }
with self.assertRaises(fsl_sub.config.BadConfiguration) as me:
fsl_sub.config.coprocessor_config('cuda')
self.assertEqual(
me.exception.args[0],
"Unable to find coprocessor configuration dictionary")
with self.subTest('Test 4'):
mock_read_config.return_value = {
'coproc_opts': {'cuda': 'option', }, }
with self.assertRaises(fsl_sub.config.BadConfiguration) as me:
fsl_sub.config.coprocessor_config('phi')
self.assertEqual(
me.exception.args[0],
"Unable to find configuration for phi")
@patch(
'fsl_sub.config.load_default_config',
autospec=True,
return_value={})
@patch('fsl_sub.config.read_config', autospec=True)
def test_queue_config(self, mock_read_config, mock_ldc):
mock_read_config.return_value = {
'queues': {'short.q': 'option', }, }
with self.subTest('Test 1'):
self.assertEqual(
'option', fsl_sub.config.queue_config('short.q'))
with self.subTest('Test 2'):
self.assertDictEqual(
{'short.q': 'option', },
fsl_sub.config.queue_config())
with self.subTest('Test 3'):
with self.assertRaises(fsl_sub.config.BadConfiguration) as me:
fsl_sub.config.queue_config('long.q')
self.assertEqual(
me.exception.args[0],
"Unable to find definition for queue long.q")
with self.subTest('Test 4'):
mock_read_config.return_value = {
'q': {'short.q': 'option', }, }
with self.assertRaises(fsl_sub.config.BadConfiguration) as me:
fsl_sub.config.queue_config()
self.assertEqual(
me.exception.args[0],
"Unable to find queue definitions")
@patch(
'fsl_sub.config.load_default_config',
autospec=True,
return_value={})
@patch('fsl_sub.config.read_config', autospec=True)
def test_uses_projects(self, mock_read_config, mock_ldc):
with self.subTest('Test 1'):
mock_read_config.return_value = {
'method': 'method',
'method_opts': {'method': {'projects': False, }, }, }
self.assertFalse(fsl_sub.config.uses_projects())
with self.subTest('Test 2'):
mock_read_config.return_value = {
'method': 'method',
'method_opts': {'method': {'projects': True, }, }, }
self.assertTrue(fsl_sub.config.uses_projects())
@patch('fsl_sub.config.read_config', autospec=True)
def test_has_queues(self, mock_rc):
with self.subTest("No queues"):
mock_rc.return_value = {
'method': 'shell',
'method_opts': {
'shell': {'queues': False, },
},
'queues': {}
}
self.assertFalse(fsl_sub.config.has_queues())
self.assertFalse(fsl_sub.config.has_queues('shell'))
self.assertRaises(
fsl_sub.config.BadConfiguration,
fsl_sub.config.has_queues,
'nonsense'
)
with self.subTest("Has queues/not configured"):
mock_rc.return_value = {
'method': 'shell',
'method_opts': {
'shell': {'queues': True, },
},
'queues': {}
}
self.assertFalse(fsl_sub.config.has_queues())
self.assertFalse(fsl_sub.config.has_queues('shell'))
with self.subTest("Has queues and configured"):
mock_rc.return_value = {
'method': 'shell',
'method_opts': {
'shell': {'queues': True, },
},
'queues': {
'queue1': {},
},
}
self.assertTrue(fsl_sub.config.has_queues())
self.assertTrue(fsl_sub.config.has_queues('shell'))
@patch('fsl_sub.config.get_plugin_already_queued', autospec=True)
@patch('fsl_sub.config.read_config', autospec=True)
@patch('fsl_sub.config.sp.run', autospec=True)
@patch('fsl_sub.config.which', autospec=True)
def test_has_coprocessor(self, mock_which, mock_spr, mock_rc, mock_gpaq):
with self.subTest("No coprocessor"):
mock_gpaq.return_value = False
mock_rc.return_value = {
'method': 'something',
'queues': {'aq': {}, },
'coproc_opts': {},
}
self.assertFalse(fsl_sub.config.has_coprocessor('cuda'))
with self.subTest("Has coprocessor definition - no queue"):
mock_spr.reset_mock()
mock_which.reset_mock()
mock_gpaq.return_value = False
mock_spr.return_value = subprocess.CompletedProcess(
['/usr/bin/nvidia-smi'], returncode=0
)
mock_which.return_value = '/usr/bin/nvidia-smi'
mock_rc.return_value = {
'method': 'something',
'queues': {'aq': {}, },
'coproc_opts': {'cuda': {'presence_test': 'nvidia-smi', }, },
}
self.assertFalse(fsl_sub.config.has_coprocessor('cuda'))
with self.subTest("Has coprocessor definition - with queue"):
mock_spr.reset_mock()
mock_which.reset_mock()
mock_gpaq.return_value = False
mock_spr.return_value = subprocess.CompletedProcess(
['/usr/bin/nvidia-smi'], returncode=0
)
mock_which.return_value = '/usr/bin/nvidia-smi'
mock_rc.return_value = {
'method': 'something',
'queues': {'aq': {'copros': {'cuda': {}, }, }, },
'coproc_opts': {'cuda': {'presence_test': 'nvidia-smi', }, },
}
self.assertTrue(fsl_sub.config.has_coprocessor('cuda'))
with self.subTest("Already queued + CUDA"):
mock_spr.reset_mock()
mock_which.reset_mock()
mock_gpaq.return_value = True
self.assertTrue(fsl_sub.config.has_coprocessor('cuda'))
mock_which.assert_called_once_with(
'nvidia-smi'
)
mock_spr.assert_called_once_with(
['/usr/bin/nvidia-smi']
)
with self.subTest("Shell method + CUDA"):
mock_spr.reset_mock()
mock_which.reset_mock()
mock_gpaq.return_value = False
mock_rc.return_value = {
'method': 'shell',
'queues': {},
'coproc_opts': {'cuda': {'presence_test': 'nvidia-smi'}, },
}
self.assertTrue(fsl_sub.config.has_coprocessor('cuda'))
mock_which.assert_called_once_with(
'nvidia-smi'
)
mock_spr.assert_called_once_with(
['/usr/bin/nvidia-smi']
)
with self.subTest("Shell method - CUDA devices not found"):
mock_spr.reset_mock()
mock_which.reset_mock()
mock_gpaq.return_value = False
mock_rc.return_value = {
'method': 'shell',
'queues': {},
'coproc_opts': {'cuda': {'presence_test': 'nvidia-smi'}, },
}
mock_spr.return_value = subprocess.CompletedProcess(
['/usr/bin/nvidia-smi'], returncode=6
)
self.assertFalse(fsl_sub.config.has_coprocessor('cuda'))
mock_spr.assert_called_once_with(
['/usr/bin/nvidia-smi']
)
mock_which.assert_called_once_with(
'nvidia-smi'
)
with self.subTest("Shell method - no SMI"):
mock_spr.reset_mock()
mock_which.reset_mock()
mock_gpaq.return_value = False
mock_rc.return_value = {
'method': 'shell',
'queues': {},
'coproc_opts': {'cuda': {'presence_test': 'nvidia-smi'}, },
}
mock_which.return_value = None
self.assertFalse(fsl_sub.config.has_coprocessor('cuda'))
mock_which.assert_called_once_with(
'nvidia-smi'
)
if __name__ == '__main__':
unittest.main()
| 39.146032
| 101
| 0.513421
| 2,511
| 24,662
| 4.771008
| 0.085623
| 0.04808
| 0.088147
| 0.039733
| 0.841987
| 0.807429
| 0.757262
| 0.734641
| 0.697579
| 0.661102
| 0
| 0.002446
| 0.370043
| 24,662
| 629
| 102
| 39.208267
| 0.768666
| 0.000811
| 0
| 0.612847
| 0
| 0
| 0.159766
| 0.035262
| 0
| 0
| 0
| 0
| 0.098958
| 1
| 0.019097
| false
| 0
| 0.013889
| 0
| 0.034722
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
bb3d018c7204182b5c4dac1f800b639ead01b4e9
| 113
|
py
|
Python
|
backend/domain/rules/order/__init__.py
|
uesleicarvalhoo/Ecommerce
|
1d8d0f0c522dcd27fd90e315989b6fa93caf62b8
|
[
"MIT"
] | null | null | null |
backend/domain/rules/order/__init__.py
|
uesleicarvalhoo/Ecommerce
|
1d8d0f0c522dcd27fd90e315989b6fa93caf62b8
|
[
"MIT"
] | null | null | null |
backend/domain/rules/order/__init__.py
|
uesleicarvalhoo/Ecommerce
|
1d8d0f0c522dcd27fd90e315989b6fa93caf62b8
|
[
"MIT"
] | null | null | null |
from .cancel import CancelOrder
from .checkout import OrderCheckout
from .update_status import UpdateOrderStatus
| 28.25
| 44
| 0.867257
| 13
| 113
| 7.461538
| 0.692308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.106195
| 113
| 3
| 45
| 37.666667
| 0.960396
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
bb4f19f978427617524aa3da8127c69227545e2b
| 114
|
py
|
Python
|
telethon_asyncpg/sessions/__init__.py
|
ukinti/telethon_asyncpg
|
12fdfba905b493ac2c677a5f65c72c2051f02eb9
|
[
"MIT"
] | 7
|
2020-12-06T13:16:15.000Z
|
2021-11-08T09:58:01.000Z
|
telethon_asyncpg/sessions/__init__.py
|
ukinti/telethon_asyncpg
|
12fdfba905b493ac2c677a5f65c72c2051f02eb9
|
[
"MIT"
] | null | null | null |
telethon_asyncpg/sessions/__init__.py
|
ukinti/telethon_asyncpg
|
12fdfba905b493ac2c677a5f65c72c2051f02eb9
|
[
"MIT"
] | null | null | null |
from .abstract import AbstractAsyncSession
from .base import BaseAsyncSession
from .asyncpg import AsyncpgSession
| 28.5
| 42
| 0.868421
| 12
| 114
| 8.25
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.105263
| 114
| 3
| 43
| 38
| 0.970588
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
24a2b9fb4f795d7a0affcd5a16a26f1a9cdbcd60
| 68
|
py
|
Python
|
Ranmath/__init__.py
|
pawel-ta/ranmath
|
f52a15b10bdb5830a50c43da11fed5f182026587
|
[
"MIT"
] | null | null | null |
Ranmath/__init__.py
|
pawel-ta/ranmath
|
f52a15b10bdb5830a50c43da11fed5f182026587
|
[
"MIT"
] | null | null | null |
Ranmath/__init__.py
|
pawel-ta/ranmath
|
f52a15b10bdb5830a50c43da11fed5f182026587
|
[
"MIT"
] | null | null | null |
from .TimeSeriesMatrix import TimeSeriesMatrix
from .Norms import *
| 22.666667
| 46
| 0.838235
| 7
| 68
| 8.142857
| 0.571429
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.117647
| 68
| 3
| 47
| 22.666667
| 0.95
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
24ba36f67615a84c13de7425fdbe1f911f4e09aa
| 186
|
py
|
Python
|
Lib/dbm/gnu.py
|
Hadron/python
|
73137f499ed658169f49273eee46845e3b53e800
|
[
"PSF-2.0"
] | 13
|
2020-03-22T11:05:51.000Z
|
2021-01-27T06:39:45.000Z
|
Lib/dbm/gnu.py
|
Hadron/python
|
73137f499ed658169f49273eee46845e3b53e800
|
[
"PSF-2.0"
] | 3
|
2021-02-20T21:57:15.000Z
|
2021-06-02T01:14:30.000Z
|
Lib/dbm/gnu.py
|
Hadron/python
|
73137f499ed658169f49273eee46845e3b53e800
|
[
"PSF-2.0"
] | 3
|
2018-01-21T17:53:17.000Z
|
2021-09-08T10:22:05.000Z
|
"""Provide the _gdbm module as a dbm submodule."""
try:
from _gdbm import *
except ImportError as msg:
raise ImportError(str(msg) + ', please install the python3-gdbm package')
| 26.571429
| 77
| 0.709677
| 26
| 186
| 5
| 0.769231
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.006623
| 0.188172
| 186
| 6
| 78
| 31
| 0.854305
| 0.236559
| 0
| 0
| 0
| 0
| 0.301471
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.75
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
24e2a4ee8cd56c02c02a1769b0aa5162921cf86a
| 5,885
|
py
|
Python
|
convertmask/utils/xml2json/xml2json.py
|
wwdok/mask2json
|
403c6b3df677185d5951239d13187b55bda6465a
|
[
"Apache-2.0"
] | null | null | null |
convertmask/utils/xml2json/xml2json.py
|
wwdok/mask2json
|
403c6b3df677185d5951239d13187b55bda6465a
|
[
"Apache-2.0"
] | null | null | null |
convertmask/utils/xml2json/xml2json.py
|
wwdok/mask2json
|
403c6b3df677185d5951239d13187b55bda6465a
|
[
"Apache-2.0"
] | null | null | null |
'''
lanhuage: python
Descripttion:
version: beta
Author: xiaoshuyui
Date: 2020-09-24 09:03:04
LastEditors: xiaoshuyui
LastEditTime: 2020-10-16 10:22:28
'''
import json
import os
import traceback
import xml.etree.ElementTree as ET
from convertmask.utils.methods.img2base64 import imgEncode
from convertmask.utils.methods.logger import logger
from skimage import io
# import numpy as np
# import cv2
try:
from labelme import __version__ as labelmeVersion
except:
from convertmask.labelme_sub import __version__ as labelmeVersion
# __version__ = '4.2.9'
def x2jConvert(xmlpath, originImgPath, flag=True):
# pass
if not os.path.exists(xmlpath) or not os.path.exists(originImgPath):
logger.error('file not exist')
return
base64Code = imgEncode(originImgPath)
shapes = getPolygon(xmlpath)
(fatherPath, filename_ext) = os.path.split(originImgPath)
(filename, _) = os.path.splitext(filename_ext)
ob = dict()
ob['imageData'] = base64Code
ob['flags'] = {}
ob['version'] = labelmeVersion
ob['imagePath'] = filename_ext
img = io.imread(originImgPath)
imgShape = img.shape
del img
ob['imageHeight'] = imgShape[0]
ob['imageWidth'] = imgShape[1]
ob['shapes'] = shapes
if flag:
with open(fatherPath + os.sep + filename + '.json',
'w',
encoding='utf-8') as f:
j = json.dumps(ob, sort_keys=True, indent=4)
f.write(j)
logger.info('save to path {}'.format(fatherPath + os.sep + filename +
'.json'))
return fatherPath + os.sep + filename + '.json'
else:
return json.dumps(ob, sort_keys=True, indent=4)
def x2jConvert_pascal(xmlpath, originImgPath, flag=True):
# pass
if not os.path.exists(xmlpath) or not os.path.exists(originImgPath):
logger.error('file not exist')
return
base64Code = imgEncode(originImgPath)
shapes = getPolygonPascal(xmlpath)
(fatherPath, filename_ext) = os.path.split(originImgPath)
(filename, _) = os.path.splitext(filename_ext)
ob = dict()
ob['imageData'] = base64Code
ob['flags'] = {}
ob['version'] = labelmeVersion
ob['imagePath'] = filename_ext
img = io.imread(originImgPath)
imgShape = img.shape
del img
ob['imageHeight'] = imgShape[0]
ob['imageWidth'] = imgShape[1]
ob['shapes'] = shapes
if flag:
with open(fatherPath + os.sep + filename + '_p.json',
'w',
encoding='utf-8') as f:
j = json.dumps(ob, sort_keys=True, indent=4)
f.write(j)
logger.info('save to path {}'.format(fatherPath + os.sep + filename +
'_p.json'))
return fatherPath + os.sep + filename + '_p.json'
else:
return json.dumps(ob, sort_keys=True, indent=4)
def getImgShape(xmlPath):
in_file = open(xmlPath)
tree = ET.parse(in_file)
root = tree.getroot()
imgSize = root.find('size')
imgwidth = imgSize.find('width').text
imgheight = imgSize.find('height').text
return imgwidth, imgheight
def getPolygon(xmlPath):
in_file = open(xmlPath)
tree = ET.parse(in_file)
root = tree.getroot()
shapes = []
try:
for obj in root.iter('object'):
flags = {}
group_id = 'null'
shape_type = 'polygon'
# pass
dic = dict()
label = obj.find('name').text
polygon = obj.find('polygon')
# print(len(polygon))
if len(polygon) > 2:
points = []
for i in range(0, len(polygon)):
# print(polygon.find('point{}'.format(i)).text)
tmp = polygon.find('point{}'.format(i)).text.split(',')
point = [int(tmp[0]), int(tmp[1])]
# print(point)
points.append(point)
del tmp, point
dic['flags'] = flags
dic['group_id'] = group_id
dic['shape_type'] = shape_type
dic['points'] = points
dic['label'] = label
shapes.append(dic)
# print(shapes)
return shapes
except Exception:
logger.error(traceback.print_exc())
def getPolygonPascal(xmlPath):
in_file = open(xmlPath)
tree = ET.parse(in_file)
root = tree.getroot()
shapes = []
try:
for obj in root.iter('object'):
flags = {}
group_id = 'null'
shape_type = 'polygon'
# pass
dic = dict()
label = obj.find('name').text
polygon = obj.find('bndbox')
# print(len(polygon))
# if len(polygon)>2:
# points = []
# for i in range(0,len(polygon)):
xmin = int(polygon.find('xmin').text)
ymin = int(polygon.find('ymin').text)
xmax = int(polygon.find('xmax').text)
ymax = int(polygon.find('ymax').text)
# print(polygon.find('point{}'.format(i)).text)
# tmp = polygon.find('point{}'.format(i)).text.split(',')
# point = [int(tmp[0]),int(tmp[1])]
# print(point)
p1 = [xmin, ymin]
p2 = [xmax, ymax]
p3 = [xmin, ymax]
p4 = [xmax, ymin]
# points.append(point)
points = [p1, p2, p3, p4]
# del tmp,point
dic['flags'] = flags
dic['group_id'] = group_id
dic['shape_type'] = shape_type
dic['points'] = points
dic['label'] = label
shapes.append(dic)
# print(shapes)
return shapes
except Exception:
logger.error(traceback.print_exc())
| 28.990148
| 77
| 0.544775
| 660
| 5,885
| 4.783333
| 0.233333
| 0.015204
| 0.028508
| 0.043712
| 0.735192
| 0.735192
| 0.713335
| 0.713335
| 0.713335
| 0.713335
| 0
| 0.017884
| 0.325404
| 5,885
| 202
| 78
| 29.133663
| 0.77733
| 0.101105
| 0
| 0.676259
| 0
| 0
| 0.07261
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.035971
| false
| 0
| 0.064748
| 0
| 0.165468
| 0.014388
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
70061d09be2fc8d14fc780a7b5a83109846a0735
| 1,186
|
py
|
Python
|
tests/unit/test_config.py
|
kevinjqiu/cdbcli
|
f7b570acdba2e22300963dd843a44d870c62415d
|
[
"Apache-2.0"
] | 21
|
2016-08-05T05:51:58.000Z
|
2021-12-01T22:16:09.000Z
|
tests/unit/test_config.py
|
kevinjqiu/cdbcli
|
f7b570acdba2e22300963dd843a44d870c62415d
|
[
"Apache-2.0"
] | 49
|
2016-07-27T23:27:19.000Z
|
2016-08-15T22:33:51.000Z
|
tests/unit/test_config.py
|
kevinjqiu/cdbcli
|
f7b570acdba2e22300963dd843a44d870c62415d
|
[
"Apache-2.0"
] | 1
|
2016-07-28T13:30:06.000Z
|
2016-07-28T13:30:06.000Z
|
from cdbcli.main import Config
def test_no_cred_str_if_neither_username_password_given():
cfg = Config('localhost', 5984, None, None, False, '')
assert cfg.url == 'http://localhost:5984'
def test_cred_str_when_only_username_is_given():
cfg = Config('localhost', 5984, 'user', None, False, '')
assert cfg.url == 'http://localhost:5984'
def test_cred_str_when_username_and_password_given():
cfg = Config('localhost', 5984, 'user', 'pwd', False, '')
assert cfg.url == 'http://user:pwd@localhost:5984'
def test_cred_str_default_username_to_admin_when_only_pwd_given():
cfg = Config('localhost', 5984, None, 'pwd', False, '')
assert cfg.url == 'http://admin:pwd@localhost:5984'
def test_cred_str_default_username_to_nobody_when_no_pwd_given():
cfg = Config('localhost', 5984, None, None, False, '')
assert cfg.url == 'http://localhost:5984'
def test_no_tls_means_http():
cfg = Config('localhost', 5984, 'admin', 'pwd', False, '')
assert cfg.url == 'http://admin:pwd@localhost:5984'
def test_tls_means_https():
cfg = Config('localhost', 5984, 'admin', 'pwd', True, '')
assert cfg.url == 'https://admin:pwd@localhost:5984'
| 32.054054
| 66
| 0.692243
| 167
| 1,186
| 4.622754
| 0.221557
| 0.235751
| 0.163212
| 0.199482
| 0.764249
| 0.764249
| 0.55829
| 0.510363
| 0.510363
| 0.510363
| 0
| 0.055227
| 0.145025
| 1,186
| 36
| 67
| 32.944444
| 0.706114
| 0
| 0
| 0.318182
| 0
| 0
| 0.236088
| 0
| 0
| 0
| 0
| 0
| 0.318182
| 1
| 0.318182
| false
| 0.090909
| 0.045455
| 0
| 0.363636
| 0
| 0
| 0
| 0
| null | 1
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
70120a44c974aed27a77981a6683817bd2b22637
| 196
|
py
|
Python
|
funagru.py
|
parasshaha/Python-
|
6c0bdae04cf74aa2742585ebcedb2274075fa644
|
[
"Unlicense"
] | null | null | null |
funagru.py
|
parasshaha/Python-
|
6c0bdae04cf74aa2742585ebcedb2274075fa644
|
[
"Unlicense"
] | null | null | null |
funagru.py
|
parasshaha/Python-
|
6c0bdae04cf74aa2742585ebcedb2274075fa644
|
[
"Unlicense"
] | null | null | null |
def adder(a,b,c=0,d=0,e=0):
return a+b+c+d+e
def main():
print adder(10,20)
print adder(10,20,30)
print adder(10,20,33,44)
print adder(10,20,1,2,3)
if __name__ == '__main__':
main()
| 12.25
| 27
| 0.617347
| 44
| 196
| 2.568182
| 0.477273
| 0.353982
| 0.424779
| 0.495575
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.171779
| 0.168367
| 196
| 15
| 28
| 13.066667
| 0.521472
| 0
| 0
| 0
| 0
| 0
| 0.041451
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0.444444
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
708597af9d37af5f663d85e062a35980c466b160
| 22,030
|
py
|
Python
|
python/patch_validate.py
|
TruX-DTF/fixminer_source
|
5ab2d6f582743c377eadb21cd466a3a25809bc2d
|
[
"MIT"
] | 5
|
2021-07-19T12:30:00.000Z
|
2022-01-14T16:41:00.000Z
|
python/patch_validate.py
|
SerVal-DTF/fixminer_source
|
5ab2d6f582743c377eadb21cd466a3a25809bc2d
|
[
"MIT"
] | 10
|
2020-04-06T09:52:19.000Z
|
2021-06-01T08:05:25.000Z
|
python/patch_validate.py
|
SerVal-DTF/fixminer_source
|
5ab2d6f582743c377eadb21cd466a3a25809bc2d
|
[
"MIT"
] | 5
|
2019-08-26T11:02:35.000Z
|
2021-03-23T15:42:09.000Z
|
import bugzoo
from bugzoo import server, Container
import csv
import os
from common.commons import *
DATA_PATH = os.environ["DATA_PATH"]
def readTestSuite(testPath):
regex = r"([p|n0-9]+)\)"
with open(testPath,mode='r') as testFile:
test_str = testFile.read()
matches = re.finditer(regex, test_str, re.MULTILINE)
testList = []
for matchNum, match in enumerate(matches, start=1):
for groupNum in range(0, len(match.groups())):
groupNum = groupNum + 1
testList.append(match.group(groupNum))
return testList
def myvalidateCore(t):
bugName, port = t
container = None
with bugzoo.server.ephemeral(port=port, verbose=False, timeout_connection=30000) as client:
try:
bug = client.bugs[bugName]
if client.bugs.is_installed(bug):
pass
else:
client.bugs.build(bug)
fix = 'failure'
output = ''
output += 'bugName:' + bugName + ', '
container = client.containers.provision(bug)
# output += 'First_test:'
preId, postId = bugName.split(':')[-1].split('-')[-2:]
originalBugs = get_filepaths(join(DATA_PATH, 'manybugs', bugName, 'diffs'), preId)
# for ob in originalBugs:
# filepath = ob.split('diffs')[-1]
# cmd = 'cp /experiment/diffs' + filepath + ' src' + filepath.replace('-' + preId, '')
# client.containers.exec(container=container, command=cmd, context='/experiment/')
validTests = readTestSuite(join(DATA_PATH, 'manybugs', bugName, 'test.sh'))
output += 'total ' + str(len(bug.tests._tests)) + ' newtotal ' + str(len(validTests))
# client.containers.build(container)
# pre_failure_cases, pre_failure, total, pre_test_outcomes = test_all(bug, container, client,validTests)
# if pre_failure == 0:
# logging.error(bugName + ' no failed test initially')
# return ''
# output += '@fail:' + ','.join(pre_failure) + '@total:' + str(total) + ', ' + '@newtotal:' + str(len(validTests)) + ', '
#
# fixBugs = get_filepaths(join(DATA_PATH, 'manybugs', bugName, 'diffs'), postId)
# for ob in fixBugs:
# filepath = ob.split('diffs')[-1]
# cmd = 'cp /experiment/diffs' + filepath + ' src' + filepath.replace('-' + postId, '')
# client.containers.exec(container=container, command=cmd, context='/experiment/')
# client.containers.build(container)
# diff_files = get_diff(bug.name, client, container)
# patch_result = patch_application(client, container, diff_files)
# if not patch_result:
# print("@{}@".format(patch_result))
# continue
# print("@{}@".format(patch_result),end=' ')
#
#
# print("Second_test:",end=' ')
# post_test_outcomes = {}
# post_failure_cases, post_failure, total, post_test_outcomes = test_all(bug, container, client,validTests)
# output += ','.join(post_failure) + ' '
# if len(post_failure) == 0:
# # times += 1
# fix = 'success'
# # print("fix {} by {}".format(bugName, patch_name))
# output += 'fix {} '.format(bugName)
# patch_names = os.listdir(join(DATA_PATH,'manybugs',bugName,'patched'))
# patch_names = [i for i in patch_names if not i.endswith('.DS_Store')]
# if len(originalBugs) != 1:
# members = []
#
# for member in set([i.split('-')[0] for i in patch_names]):
# members.append([i for i in patch_names if i.startswith(member)])
#
# patch_names= list(itertools.product(*members))
# patch_names
# times = 0
# for patch_name in patch_names:
# if isinstance(patch_name, tuple):
# for i in patch_name:
# copyPatch(bugName, client, container, originalBugs, i, preId)
# else:
# copyPatch(bugName, client, container, originalBugs, patch_name, preId)
#
# patch_result = client.containers.build(container)
# if not patch_result.successful:
# output += '@False@F '
# continue
# output += '@True@'
#
# post_test_outcomes = {}
# post_failure_cases, post_failure, total, post_test_outcomes = test_all(bug, container, client,validTests)
#
# output += ','.join(post_failure) + ' '
# if len(post_failure) == 0:
# # times += 1
# fix = 'success'
# # print("fix {} by {}".format(bugName, patch_name))
# output += 'fix {} '.format(bugName)
#
# output += 'times:{}, '.format(times) + fix
print(output)
return output
except Exception as e:
logging.error(e)
# continue
finally:
# ''
cmd = 'docker stop {}'.format(container.id)
out, e = shellGitCheckout(cmd)
# docker stop $(docker ps -q)
def validateCore(t):
bugName, port = t
container = None
with bugzoo.server.ephemeral(port=port, verbose=False, timeout_connection=30000) as client:
try:
bug = client.bugs[bugName]
if client.bugs.is_installed(bug):
pass
else:
client.bugs.build(bug)
fix = 'failure'
output = ''
output += 'bugName:' + bugName + ', '
container = client.containers.provision(bug)
output += 'First_test:'
preId, postId = bugName.split(':')[-1].split('-')[-2:]
failing = join(DATA_PATH, 'manybugs', bugName, 'failing.tests.txt')
passing = join(DATA_PATH, 'manybugs', bugName, 'passing.tests.txt')
if not (isfile(failing)):
return
cmd = 'docker cp ' +failing+ ' '+container.id +':/experiment/failing.tests.txt '
o,e = shellGitCheckout(cmd)
cmd = 'sudo chown $(whoami):$(whoami) "{}"'
cmd = cmd.format('failing.tests.txt')
o = client.containers.exec(container=container, command=cmd, context='/experiment/')
cmd = 'docker cp ' +passing+ ' '+container.id +':/experiment/passing.tests.txt '
o,e = shellGitCheckout(cmd)
cmd = 'sudo chown $(whoami):$(whoami) "{}"'
cmd = cmd.format('passing.tests.txt')
o = client.containers.exec(container=container, command=cmd, context='/experiment/')
originalBugs = get_filepaths(join(DATA_PATH, 'manybugs', bugName, 'diffs'), preId)
for ob in originalBugs:
filepath = ob.split('diffs')[-1]
cmd = 'cp diffs' + filepath + ' src' + filepath.replace('-' + preId, '')
client.containers.exec(container=container, command=cmd, context='/experiment/')
validTests = readTestSuite(join(DATA_PATH, 'manybugs', bugName, 'test.sh'))
client.containers.build(container)
pre_failure_cases, pre_failure, total, pre_test_outcomes = test_all(bug, container, client,validTests)
if pre_failure == 0:
logging.error(bugName + ' no failed test initially')
return ''
output += '@fail:' + ','.join(pre_failure) + '@total:' + str(total) + ', ' + '@newtotal:' + str(len(validTests)) + ', '
fixBugs = get_filepaths(join(DATA_PATH, 'manybugs', bugName, 'diffs'), postId)
for ob in fixBugs:
filepath = ob.split('diffs')[-1]
cmd = 'cp diffs' + filepath + ' src' + filepath.replace('-' + postId, '')
client.containers.exec(container=container, command=cmd, context='/experiment/')
client.containers.build(container)
# diff_files = get_diff(bug.name, client, container)
# patch_result = patch_application(client, container, diff_files)
# if not patch_result:
# print("@{}@".format(patch_result))
# continue
# print("@{}@".format(patch_result),end=' ')
#
#
# print("Second_test:",end=' ')
# post_test_outcomes = {}
post_failure_cases, post_failure, total, post_test_outcomes = test_all(bug, container, client,validTests)
output += ','.join(post_failure) + ' '
if len(post_failure) == 0:
# times += 1
fix = 'success'
# print("fix {} by {}".format(bugName, patch_name))
output += 'fix {} '.format(bugName)
# patch_names = os.listdir(join(DATA_PATH,'manybugs',bugName,'patched'))
# patch_names = [i for i in patch_names if not i.endswith('.DS_Store')]
# if len(originalBugs) != 1:
# members = []
#
# for member in set([i.split('-')[0] for i in patch_names]):
# members.append([i for i in patch_names if i.startswith(member)])
#
# patch_names= list(itertools.product(*members))
# patch_names
# times = 0
# for patch_name in patch_names:
# if isinstance(patch_name, tuple):
# for i in patch_name:
# copyPatch(bugName, client, container, originalBugs, i, preId)
# else:
# copyPatch(bugName, client, container, originalBugs, patch_name, preId)
#
# patch_result = client.containers.build(container)
# if not patch_result.successful:
# output += '@False@F '
# continue
# output += '@True@'
#
# post_test_outcomes = {}
# post_failure_cases, post_failure, total, post_test_outcomes = test_all(bug, container, client)
#
# output += str(post_failure) + ' '
# if post_failure == 0:
# times += 1
# fix = 'success'
# output += 'fix {} by {} '.format(bugName, patch_name)
#
# output += 'times:{}, '.format(times) + fix
print(output)
return output
except Exception as e:
logging.error(e)
# continue
finally:
# ''
cmd = 'docker stop {}'.format(container.id)
out, e = shellGitCheckout(cmd)
# docker stop $(docker ps -q)
def copyPatch(bugName, client, container, originalBugs, patch_name, preId):
originalBugName = patch_name.split('-' + preId)[0]
originalBugPaths = [i.split('diffs')[-1].split(originalBugName)[0] for i in originalBugs if
i.split('/')[-1].startswith(originalBugName)]
if len(originalBugPaths) == 1:
originalBugPath = originalBugPaths[0]
else:
logging.error('too many paths')
cmd = 'docker cp ' + join(DATA_PATH, 'manybugs', bugName, 'patched',
patch_name) + ' ' + container.id + ':/experiment/src' + originalBugPath + originalBugName
o, e = shellGitCheckout(cmd)
cmd = 'sudo chown $(whoami):$(whoami) "{}"'
cmd = cmd.format('src' + originalBugPath + originalBugName)
o = client.containers.exec(container=container, command=cmd, context='/experiment/')
cmd = 'rm -rf "{}"'
cmd = cmd.format('src' + originalBugPath + originalBugName.replace('.c','.o'))
o = client.containers.exec(container=container, command=cmd, context='/experiment/')
def patch_validate():
logger = logging.getLogger()
for k,v in logger.manager.loggerDict.items():
if(k.startswith('bugzoo')):
if isinstance(v,logging.Logger):
v.setLevel(logging.ERROR)
buglist = listdir(join(DATA_PATH,'manybugs'))
# for i in range(0,len(bugList)):
bugList = []
port = 6000
for b in buglist:
if b== '.DS_Store':
continue
t = b, port
if (b.startswith('manybugs:php:')):
bugList.append(t)
if port == 6300:
port = 6000
port += 1
# bugList = [('manybugs:python:69783-69784', 6000)]
# bugList = [('manybugs:python:69709-69710', 6027)]
# bugList = [('manybugs:python:69223-69224', 6027)]
# bugList = [('manybugs:php:2012-02-25-c1322d2505-cfa9c90b20', 6027)]
# parallelRun(fixTests,bugList)
# parallelRun(findTests,bugList,max_workers=1)
results = parallelRunMerge(validateCore, bugList)
# #
with open(join(DATA_PATH, 'mayBugsValidateNew'), 'w',
encoding='utf-8') as writeFile:
# if levelPatch == 0:
writeFile.write('\n'.join(results))
# print(results)
def findTests(t):
bugName, port = t
preId, postId = bugName.split(':')[-1].split('-')[-2:]
preTests= join(DATA_PATH, 'manybugs', bugName,'test-' + preId + '.out')
postTests = join(DATA_PATH, 'manybugs', bugName,'test-' + postId + '.out')
with open(preTests,mode='r') as preTestFile:
preTestResults = preTestFile.read()
with open(postTests,mode='r') as postTestFile:
postTestResults = postTestFile.read()
preTestResults
preFails = findAllTests(r"FAIL .*\[(.*)\]", preTestResults)
prePasses = findAllTests(r"PASS .*\[(.*)\]", preTestResults)
postFails = findAllTests(r"FAIL .*\[(.*)\]", postTestResults)
postPasses = findAllTests(r"PASS .*\[(.*)\]", postTestResults)
existingTests = get_filepaths(join(DATA_PATH, 'manybugs', bugName, 'src'), '.phpt')
existingTests = [i.split(join(DATA_PATH, 'manybugs', bugName, 'src/'))[-1] for i in existingTests]
postPasses
if( set(preFails).difference(set(postFails)) == set(postPasses).difference(set(prePasses))):
failingList = list(set(preFails).difference(set(postFails)))
passingList = list(set(postPasses).intersection(set(prePasses)))
failingList = [i for i in failingList if i in existingTests]
passingList = [i for i in passingList if i in existingTests]
if( len(failingList) > 0 and len(passingList)> 0):
with open(join(DATA_PATH, 'manybugs', bugName, 'failing.tests.txt'),mode='w') as failFile:
failFile.write('\n'.join(failingList))
with open(join(DATA_PATH, 'manybugs', bugName, 'passing.tests.txt'),mode='w') as passFile:
passFile.write('\n'.join(passingList))
else:
print('something wrong ' + bugName)
else:
print('something wrong ' + bugName)
def findAllTests(regex,test_str):
matches = re.finditer(regex, test_str, re.MULTILINE)
res = []
for matchNum, match in enumerate(matches, start=1):
# print("Match {matchNum} was found at {start}-{end}: {match}".format(matchNum=matchNum, start=match.start(),
# end=match.end(), match=match.group()))
for groupNum in range(0, len(match.groups())):
groupNum = groupNum + 1
res.append(match.group(groupNum))
# print("Group {groupNum} found at {start}-{end}: {group}".format(groupNum=groupNum,
# start=match.start(groupNum),
# end=match.end(groupNum),
# group=match.group(groupNum)))
return res
def patch_validate_mine():
logger = logging.getLogger()
for k,v in logger.manager.loggerDict.items():
if(k.startswith('bugzoo')):
if isinstance(v,logging.Logger):
v.setLevel(logging.ERROR)
buglist = listdir(join(DATA_PATH,'manybugs'))
# for i in range(0,len(bugList)):
bugList = []
port = 6000
for b in buglist:
if b== '.DS_Store':
continue
t = b, port
bugList.append(t)
if port == 6300:
port = 6000
port += 1
# bugList = [('manybugs:python:69783-69784', 6000)]
# bugList = [('manybugs:python:69709-69710', 6027)]
# bugList = [('manybugs:python:69223-69224', 6027)]
results = parallelRunMerge(myvalidateCore, bugList,max_workers=12)
with open(join(DATA_PATH, 'mayBugsPatchResults'), 'w',
encoding='utf-8') as writeFile:
# if levelPatch == 0:
writeFile.write('\n'.join(results))
print(results)
from bugzoo import Patch, Client
def test_all(bug, container, client,validTests):
test_outcomes = {} # type: Dict[TestCase, TestOutcome]
failure_cases = []
failure = []
total = len(bug.tests._tests)
for test in bug.tests:
# if test.name in validTests:
test_outcomes[test] = client.containers.test(container, test)
# if test.expected_outcome != test_outcomes[test].passed:
if test_outcomes[test].passed != True:
failure.append(test.name)
failure_cases.append(test.command)
break
return failure_cases, failure, total, test_outcomes
def fixTests(t):
bugName, port = t
container = None
with bugzoo.server.ephemeral(port=port, verbose=False, timeout_connection=30000) as client:
try:
bug = client.bugs[bugName]
if client.bugs.is_installed(bug):
pass
else:
client.bugs.build(bug)
container = client.containers.provision(bug)
preId, postId = bugName.split(':')[-1].split('-')[-2:]
cmd = 'make distclean'
o = client.containers.exec(container=container, command=cmd, context='/experiment/src')
cmd = 'git reset --hard && git clean -fd'
o = client.containers.exec(container=container, command=cmd, context='/experiment/src')
cmd = 'git checkout "{}"'.format(preId)
o = client.containers.exec(container=container, command=cmd, context='/experiment/src')
cmd ='cat ../libxml.patch | patch -p0'
o = client.containers.exec(container=container, command=cmd, context='/experiment/src')
cmd = 'find . -name tests -type d -exec git checkout {} {{}} \;'.format(postId)
o = client.containers.exec(container=container, command=cmd, context='/experiment/src')
cmd ='./buildconf'
o = client.containers.exec(container=container, command=cmd, context='/experiment/src')
if preId in ['74343ca506', '8138f7de40']:
cmd ='./configure --disable-phar "CFLAGS=-fprofile-arcs -ftest-coverage" "CXXFLAGS=-fprofile-arcs -ftest-coverage" "LDFLAGS=-lgcov"'
else:
cmd = './configure "CFLAGS=-fprofile-arcs -ftest-coverage" "CXXFLAGS=-fprofile-arcs -ftest-coverage" "LDFLAGS=-lgcov"'
o = client.containers.exec(container=container, command=cmd, context='/experiment/src')
cmd = 'make -j{}'.format(4)
o = client.containers.exec(container=container, command=cmd, context='/experiment/src')
cmd = 'no | make test -s > ../test-'+preId+'.out'
o = client.containers.exec(container=container, command=cmd, context='/experiment/src')
###
cmd = 'make distclean'
o = client.containers.exec(container=container, command=cmd, context='/experiment/src')
cmd = 'git reset --hard && git clean -fd'
o = client.containers.exec(container=container, command=cmd, context='/experiment/src')
cmd = 'git checkout "{}"'.format(postId)
o = client.containers.exec(container=container, command=cmd, context='/experiment/src')
cmd = 'cat ../libxml.patch | patch -p0'
o = client.containers.exec(container=container, command=cmd, context='/experiment/src')
cmd = './buildconf'
o = client.containers.exec(container=container, command=cmd, context='/experiment/src')
if preId in ['74343ca506', '8138f7de40']:
cmd = './configure --disable-phar "CFLAGS=-fprofile-arcs -ftest-coverage" "CXXFLAGS=-fprofile-arcs -ftest-coverage" "LDFLAGS=-lgcov"'
else:
cmd = './configure "CFLAGS=-fprofile-arcs -ftest-coverage" "CXXFLAGS=-fprofile-arcs -ftest-coverage" "LDFLAGS=-lgcov"'
o = client.containers.exec(container=container, command=cmd, context='/experiment/src')
cmd = 'make -j{}'.format(4)
o = client.containers.exec(container=container, command=cmd, context='/experiment/src')
cmd = 'no | make test -s > ../test-' + postId + '.out'
o = client.containers.exec(container=container, command=cmd, context='/experiment/src')
cmd = 'docker cp ' + container.id +':/experiment/test-'+preId+'.out ' + join(DATA_PATH,'manybugs',bugName,'test-'+preId+'.out')
o,e = shellGitCheckout(cmd)
print(o, e)
cmd = 'docker cp ' + container.id +':/experiment/test-'+postId+'.out ' +join(DATA_PATH,'manybugs',bugName,'test-'+postId+'.out')
o,e = shellGitCheckout(cmd)
print(o,e)
except Exception as e:
logging.error(e)
# continue
finally:
# ''
cmd = 'docker stop {}'.format(container.id)
out, e = shellGitCheckout(cmd)
# docker stop $(docker ps -q)
if __name__ == "__main__":
patch_validate()
| 43.196078
| 149
| 0.554017
| 2,256
| 22,030
| 5.329787
| 0.127216
| 0.046574
| 0.041584
| 0.060296
| 0.786178
| 0.76813
| 0.755988
| 0.732369
| 0.682552
| 0.682552
| 0
| 0.01557
| 0.306128
| 22,030
| 509
| 150
| 43.280943
| 0.771032
| 0.256151
| 0
| 0.6
| 0
| 0.014286
| 0.140797
| 0.015035
| 0.003571
| 0
| 0
| 0
| 0
| 1
| 0.035714
| false
| 0.057143
| 0.021429
| 0
| 0.082143
| 0.025
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
564077cbdf7b52ec3b4c4c093a1ef80f09e572ee
| 178
|
py
|
Python
|
head_segmentation/__init__.py
|
wiktorlazarski/head-segmentation
|
6ce0d0cd7da3e0f59cf1f7fd322a175fd9a93411
|
[
"Apache-2.0"
] | null | null | null |
head_segmentation/__init__.py
|
wiktorlazarski/head-segmentation
|
6ce0d0cd7da3e0f59cf1f7fd322a175fd9a93411
|
[
"Apache-2.0"
] | null | null | null |
head_segmentation/__init__.py
|
wiktorlazarski/head-segmentation
|
6ce0d0cd7da3e0f59cf1f7fd322a175fd9a93411
|
[
"Apache-2.0"
] | null | null | null |
from ._version import __version__
from .constants import *
from .image_processing import *
from .model import *
from .segmentation_pipeline import *
from .visualization import *
| 25.428571
| 36
| 0.803371
| 21
| 178
| 6.47619
| 0.47619
| 0.294118
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.134831
| 178
| 6
| 37
| 29.666667
| 0.883117
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
5692a66862afd003ea9c6b9b2df6fdb03d72fff5
| 122
|
py
|
Python
|
programming-laboratory-I/8p51/media.py
|
MisaelAugusto/computer-science
|
d21335a2dc824b54ffe828370f0e6717fd0c7c27
|
[
"MIT"
] | null | null | null |
programming-laboratory-I/8p51/media.py
|
MisaelAugusto/computer-science
|
d21335a2dc824b54ffe828370f0e6717fd0c7c27
|
[
"MIT"
] | null | null | null |
programming-laboratory-I/8p51/media.py
|
MisaelAugusto/computer-science
|
d21335a2dc824b54ffe828370f0e6717fd0c7c27
|
[
"MIT"
] | null | null | null |
nota1 = float(raw_input())
nota2 = float(raw_input())
nota3 = float(raw_input())
print nota1*0.2 + nota2*0.3 + nota3*0.5
| 20.333333
| 39
| 0.680328
| 22
| 122
| 3.636364
| 0.5
| 0.3
| 0.4875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.113208
| 0.131148
| 122
| 5
| 40
| 24.4
| 0.641509
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0.25
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
3b2852f8ca168a6b52d2b9c0a30087b49255b21c
| 97
|
py
|
Python
|
photostudio/picture/tests.py
|
Grantone/Photo-Studio
|
a45e5df5fd44562c6c294ce670d5a704acf5295e
|
[
"MIT",
"Unlicense"
] | null | null | null |
photostudio/picture/tests.py
|
Grantone/Photo-Studio
|
a45e5df5fd44562c6c294ce670d5a704acf5295e
|
[
"MIT",
"Unlicense"
] | null | null | null |
photostudio/picture/tests.py
|
Grantone/Photo-Studio
|
a45e5df5fd44562c6c294ce670d5a704acf5295e
|
[
"MIT",
"Unlicense"
] | null | null | null |
from django.test import TestCase
from .models import User, Post, tags
# Create your tests here.
| 19.4
| 36
| 0.773196
| 15
| 97
| 5
| 0.866667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.164948
| 97
| 4
| 37
| 24.25
| 0.925926
| 0.237113
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
8e89134b87b407f79d2aedeeb24177cdde3f79cc
| 390
|
py
|
Python
|
bacon/all.py
|
aholkner/bacon
|
edf3810dcb211942d392a8637945871399b0650d
|
[
"MIT"
] | 37
|
2015-01-29T17:42:11.000Z
|
2021-12-14T22:11:33.000Z
|
bacon/all.py
|
aholkner/bacon
|
edf3810dcb211942d392a8637945871399b0650d
|
[
"MIT"
] | 3
|
2015-08-13T17:38:05.000Z
|
2020-09-25T17:21:31.000Z
|
bacon/all.py
|
aholkner/bacon
|
edf3810dcb211942d392a8637945871399b0650d
|
[
"MIT"
] | 7
|
2015-02-12T17:54:35.000Z
|
2022-01-31T14:50:09.000Z
|
from bacon.core import *
from bacon.controller import *
from bacon.font import *
from bacon.game import *
from bacon.graphics import *
from bacon.image import *
from bacon.keyboard import *
from bacon.mouse_input import *
from bacon.resource import *
from bacon.shader import *
from bacon.sound import *
from bacon.text import *
from bacon.window import *
import bacon.controller_profiles
| 24.375
| 32
| 0.789744
| 57
| 390
| 5.368421
| 0.315789
| 0.382353
| 0.588235
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.141026
| 390
| 15
| 33
| 26
| 0.913433
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
8ec6363f19089cd91156206fb8129df81b678bd5
| 2,512
|
py
|
Python
|
t2dm/manager/intelligence/interactions/eye_care0.py
|
nhsx-mirror/SynPath_Diabetes
|
1d9bd1c83f20820a35125c94e8b058bdd1a6ac3c
|
[
"MIT"
] | null | null | null |
t2dm/manager/intelligence/interactions/eye_care0.py
|
nhsx-mirror/SynPath_Diabetes
|
1d9bd1c83f20820a35125c94e8b058bdd1a6ac3c
|
[
"MIT"
] | null | null | null |
t2dm/manager/intelligence/interactions/eye_care0.py
|
nhsx-mirror/SynPath_Diabetes
|
1d9bd1c83f20820a35125c94e8b058bdd1a6ac3c
|
[
"MIT"
] | 1
|
2021-09-29T10:00:23.000Z
|
2021-09-29T10:00:23.000Z
|
import datetime
# Interactions for eye care services in the community
# "retinopathy_screening"
# Eye care 1: Retinopathy service
# Appointments for screening and advice within a specialist antenatal service
def retinopathy_screening(patient, environment, patient_time):
encounter = {
"resource_type": "Encounter",
"name" : "retinopathy screening",
"start": patient_time,
}
entry = {
"resource_type" : "Observation",
"name": "retinopathy screening",
"start": encounter["start"] + datetime.timedelta(minutes=15),
"cost": 74, # NHS Ref costs
"glucose": 0, # dummy glucose impact, to be updated
"carbon": 22, # update for more accurate figure
}
new_patient_record_entries = [encounter, entry]
next_environment_id_to_prob = {23: 0.5, 27: 0.5} # afilbercept and inpatient for retinal procedure
next_environment_id_to_time = {
23: datetime.timedelta(days=10), # TODO: from initial patient_time (not last)
27: datetime.timedelta(days=20),
}
update_data = {"new_patient_record_entries": new_patient_record_entries}
return (
patient,
environment,
update_data,
next_environment_id_to_prob,
next_environment_id_to_time,
)
# Eye care 2: Afilbercept prescription for AMD (high cost drug)
# Drug used to treat wet age-related macular degeneration
def aflibercept_prescription(patient, environment, patient_time):
encounter = {
"resource_type": "Encounter",
"name" : "afilbercept prescription",
"start": patient_time,
}
entry = {
"resource_type" : "Observation",
"name": "afilbercept prescription",
"start": encounter["start"] + datetime.timedelta(minutes=15),
"cost": 809, # NHS Ref costs
"glucose": 0, # dummy glucose impact, to be updated
"carbon": 22, # update for more accurate figure
}
new_patient_record_entries = [encounter, entry]
next_environment_id_to_prob = {0: 0.5, 27: 0.5} # gp and inpatient for retinal procedure
next_environment_id_to_time = {
0: datetime.timedelta(days=10), # TODO: from initial patient_time (not last)
27: datetime.timedelta(days=20),
}
update_data = {"new_patient_record_entries": new_patient_record_entries}
return (
patient,
environment,
update_data,
next_environment_id_to_prob,
next_environment_id_to_time,
)
| 32.205128
| 102
| 0.657643
| 288
| 2,512
| 5.503472
| 0.315972
| 0.07571
| 0.085804
| 0.095899
| 0.731861
| 0.72429
| 0.72429
| 0.72429
| 0.601893
| 0.522397
| 0
| 0.024855
| 0.247213
| 2,512
| 78
| 103
| 32.205128
| 0.813326
| 0.253981
| 0
| 0.701754
| 0
| 0
| 0.168999
| 0.027987
| 0
| 0
| 0
| 0.012821
| 0
| 1
| 0.035088
| false
| 0
| 0.017544
| 0
| 0.087719
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 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
| 0
| 0
|
0
| 5
|
d971b1fc1a8a49e91b16c62023c779e7d30b9e66
| 7,154
|
py
|
Python
|
File-Eater.py
|
xortio/File-Eater
|
0e2712c27d547c9ba6d7435cec4cbdfba307901b
|
[
"BSL-1.0"
] | null | null | null |
File-Eater.py
|
xortio/File-Eater
|
0e2712c27d547c9ba6d7435cec4cbdfba307901b
|
[
"BSL-1.0"
] | null | null | null |
File-Eater.py
|
xortio/File-Eater
|
0e2712c27d547c9ba6d7435cec4cbdfba307901b
|
[
"BSL-1.0"
] | null | null | null |
import pickle
import os
sudo=str(input('''enter your path
O===(ZZZZZZZ> '''))
print('''
´´´´´´´´´´´´´´´´´´´ ¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶´´´´´´´´´´´´´´´´´´´`
´´´´´´´´´´´´´´´´´¶¶¶¶¶¶´´´´´´´´´´´´´¶¶¶¶¶¶¶´´´´´´´´´´´´´´´´
´´´´´´´´´´´´´´¶¶¶¶´´´´´´´´´´´´´´´´´´´´´´´¶¶¶¶´´´´´´´´´´´´´´
´´´´´´´´´´´´´¶¶¶´´´´´´´´´´´´´´´´´´´´´´´´´´´´´¶¶´´´´´´´´´´´´
´´´´´´´´´´´´¶¶´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´¶¶´´´´´´´´´´´
´´´´´´´´´´´¶¶´´´´´´´´´´´´´´´´´´´´´`´´´´´´´´´´´¶¶´´´´´´´´´´`
´´´´´´´´´´¶¶´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´¶¶´´´´´´´´´´
´´´´´´´´´´¶¶´¶¶´´´´´´´´´´´´´´´´´´´´´´´´´´´´´¶¶´¶¶´´´´´´´´´´
´´´´´´´´´´¶¶´¶¶´´´´´´´´´´´´´´´´´´´´´´´´´´´´´¶¶´´¶´´´´´´´´´´
´´´´´´´´´´¶¶´¶¶´´´´´´´´´´´´´´´´´´´´´´´´´´´´´¶¶´´¶´´´´´´´´´´
´´´´´´´´´´¶¶´´¶¶´´´´´´´´´´´´´´´´´´´´´´´´´´´´¶¶´¶¶´´´´´´´´´´
´´´´´´´´´´¶¶´´¶¶´´´´´´´´´´´´´´´´´´´´´´´´´´´¶¶´´¶¶´´´´´´´´´´
´´´´´´´´´´´¶¶´¶¶´´´¶¶¶¶¶¶¶¶´´´´´¶¶¶¶¶¶¶¶´´´¶¶´¶¶´´´´´´´´´´´
´´´´´´´´´´´´¶¶¶¶´¶¶¶¶¶¶¶¶¶¶´´´´´¶¶¶¶¶¶¶¶¶¶´¶¶¶¶¶´´´´´´´´´´´
´´´´´´´´´´´´´¶¶¶´¶¶¶¶¶¶¶¶¶¶´´´´´¶¶¶¶¶¶¶¶¶¶´¶¶¶´´´´´´´´´´´´´
´´´´¶¶¶´´´´´´´¶¶´´¶¶¶¶¶¶¶¶´´´´´´´¶¶¶¶¶¶¶¶¶´´¶¶´´´´´´¶¶¶¶´´´
´´´¶¶¶¶¶´´´´´¶¶´´´¶¶¶¶¶¶¶´´´¶¶¶´´´¶¶¶¶¶¶¶´´´¶¶´´´´´¶¶¶¶¶¶´´
´´¶¶´´´¶¶´´´´¶¶´´´´´¶¶¶´´´´¶¶¶¶¶´´´´¶¶¶´´´´´¶¶´´´´¶¶´´´¶¶´´
´¶¶¶´´´´¶¶¶¶´´¶¶´´´´´´´´´´¶¶¶¶¶¶¶´´´´´´´´´´¶¶´´¶¶¶¶´´´´¶¶¶´
¶¶´´´´´´´´´¶¶¶¶¶¶¶¶´´´´´´´¶¶¶¶¶¶¶´´´´´´´¶¶¶¶¶¶¶¶¶´´´´´´´´¶¶
¶¶¶¶¶¶¶¶¶´´´´´¶¶¶¶¶¶¶¶´´´´¶¶¶¶¶¶¶´´´´¶¶¶¶¶¶¶¶´´´´´´¶¶¶¶¶¶¶¶
´´¶¶¶¶´¶¶¶¶¶´´´´´´¶¶¶¶¶´´´´´´´´´´´´´´¶¶¶´¶¶´´´´´¶¶¶¶¶¶´¶¶¶´
´´´´´´´´´´¶¶¶¶¶¶´´¶¶¶´´¶¶´´´´´´´´´´´¶¶´´¶¶¶´´¶¶¶¶¶¶´´´´´´´´
´´´´´´´´´´´´´´¶¶¶¶¶¶´¶¶´¶¶¶¶¶¶¶¶¶¶¶´¶¶´¶¶¶¶¶¶´´´´´´´´´´´´´´
´´´´´´´´´´´´´´´´´´¶¶´¶¶´¶´¶´¶´¶´¶´¶´¶´¶´¶¶´´´´´´´´´´´´´´´´´
´´´´´´´´´´´´´´´´¶¶¶¶´´¶´¶´¶´¶´¶´¶´¶´¶´´´¶¶¶¶¶´´´´´´´´´´´´´´
´´´´´´´´´´´´¶¶¶¶¶´¶¶´´´¶¶¶¶¶¶¶¶¶¶¶¶¶´´´¶¶´¶¶¶¶¶´´´´´´´´´´´´
´´´´¶¶¶¶¶¶¶¶¶¶´´´´´¶¶´´´´´´´´´´´´´´´´´¶¶´´´´´´¶¶¶¶¶¶¶¶¶´´´´
´´´¶¶´´´´´´´´´´´¶¶¶¶¶¶¶´´´´´´´´´´´´´¶¶¶¶¶¶¶¶´´´´´´´´´´¶¶´´´
´´´´¶¶¶´´´´´¶¶¶¶¶´´´´´¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶´´´´´¶¶¶¶¶´´´´´¶¶¶´´´´
´´´´´´¶¶´´´¶¶¶´´´´´´´´´´´¶¶¶¶¶¶¶¶¶´´´´´´´´´´´¶¶¶´´´¶¶´´´´´´
´´´´´´¶¶´´¶¶´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´¶¶´´¶¶´´´´´´
´´´´´´´¶¶¶¶´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´´¶¶¶¶´´´´´´´
''')
shred=open(sudo,'wb')
junk='''
eyJtZXNzYWdlIjoiMTVkNTRjZWI1ZmNlMDU2N2I5NjJhZjg1Yjk0OWEzM2Q4
MWUxYmEyMzA3ZWFjNzJiMzJkMGYzZjdlODRmMjQzYmFiZWM1MzNhYTQzYWZh
NTY3Y2Q2ZmQ5ZDQyNjMwOTNjODM4Y2RiMGNiZWYyNmQxMGJkYTJlZjg4NGU1
MzY0M2JmY2JhNGU3MTk1YmE5ZWY3OTU0NjlhYzRjMDQyZjhkYzEzZmNmZDQ0
ZDRmZDY4NTk0NzI5MjgyN2E0ZjljYTU1NmM2MjQ4ODhlYTJjNjRlYjQ4YmY0
YTVkOGQwY2JlYTZiZTZjNWJjMDI0OTdlZmU4NWNmNzI4MDIyODE2ZmM1ZGNj
NjI3MWY2MjYzMDI3NWNjNWRhNThiZTVlY2FlNmM4ODhmMTYzYTVlODIyY2Fk
MDdkYjkwZTVlZDczYmI3NDdiYzI4YTA5YmYxNDhmNDgyOGFkMTRhMDdkOWZh
ODM3OWE0N2MyNTU5YmNkNmFiZDcwNzhkYjc4MTkyYmUxZmFlNmI5NjExZjJi
NzNkZDM2YTUxODM2ZDRjZDU3ZTBkNWFjNTM1ODFhYmJmNTE2ZWI0NWQxNmQ0
YzE5NDA4MTljNTg4MDU4MGJkNWJjNzFjOGYwMzc3ZTYzNzQxNTExNTNkZmQ2
NmM4MjllNjQwNDYwYTRiZGQ0NGQ1MzA2N2I0Nzc4ODIyNjYyNzU4YmNlZjBm
ZmIwNzE3ODkwYmM0MDQ3NDRjNjcyMTVmNjA2ZjJjZjA2NTNlMzgyM2EzZGYz
YWYwZDY5ZGJkNDc0N2ZiM2FlYzAxM2ZmZjZlZjQyMTVhYmNjZmJjNzczMjc1
OTk5ZGVkZGMxZjk4MTZmNzZiN2NmMTNjMzAxZWYwYWRjZmM3YWNiMDhkNmU4
M2ZiYThmNjZhMjhlYzEyNGFlMGNhZDlmMDE4Mzk3OTBhNDc3YjgyYjFjZTY5
ZjJlM2Y2ZDkwZDUwMThhYmM0NzUwMTE3ODhhZjY1MDE4ZWUwNDc3NGEzM2Jl
MDM4NmY1YWRjZmNlOTJjNjUyM2U0MDQ1N2M5NjkwNWExNTE0NWUxOWJlOTdi
MmM2NmRjZWQwZTU3Yzk4MWM5ZGM5MTEzMWNmZmM2NDI1YWMzM2MyOGY0MzBl
N2I2ZGRlODc2MTQ4ZDMyMzI5MWZhMjdiZjVjNjk1ZDM1ZWYwMDdiZTIzNWI1
MDhmOTAzYjdlNDhkMDRlNWVlODRhNTJhOWMwMGNhYTc3MGYyMWQxNGM1ZDM5
N2E2YzBhNWQ4OWZlZjAzZDA3NGM2ODAwOTEyNWQ4YThlMWE5ZjllYmI0YTJi
YTAwMGM5NGRmMTE3ZDBlMDA0NzcyYjI0YzBhZDQ2ZmE1MGNkMzQwMzM4ZjUx
ZWZlMjUyYWQ0ZjdkNDY0MTAzNWM0OWZkOWNiYWQzODc4ZTE2MGE0MDI5YjYy
NjBhMmYxZjZhZjhkNmNmMTY0NjRjM2U0Y2ViNTFiMWQyZGM3NWE4YzQ4NGQ3
ODRiZDcyZTVjNTQ1YjBmNTMzNTU0YzQ1NTYwNDZhNzU2NjhkNmNmY2YxYzc1
NTVjODRiODljMjU5ZThhYWY5YTcwYjQ5OThhMzVlNzZhNmQzYWNkYzQ0NWJk
ZmI3Y2Y3NGM0NGNlYTk0NDEyOWNkODBmZWQ1NTYxNGIzMjM1NjE0ZjE2MjMx
ZjFhMjBiMmQzYmI5ZGVkYTI4MmI0OWNiMWYwMjI2ZjQ3MDhlOTVkYTk2YTZk
ZWVjYjNmMmI1OGVjOWMyZjM4N2EzNzE3Zjc0NDU1ZTVlMTUyYjIyMmIzNDMy
MGJlNjRhOGNkMmU5MTk2OTllOWIzNzEyMWIxMGExNTg3OTkwZmRkYzU0MzQ2
YTNkYTM5YTNjMTM5MDg5OTJlNTZjMzY3MjE3MTk2OTBjNTE3YWYwMGI4MGFh
YmJjYWEwZjU0YmE4NzBkOWNkNjkyNGZiOGViYjM0OGExMDg5OTBhYzJkMWM3
Nzg0NzA5ZTVlOTVkN2ZjMmQwMDRkNjFiYjJiMmU5NWYwNTQ3NWUyNmE3Zjdk
MjNjMzQ0MjNiOGI5YjQ1YzIyYWNiOWI3ZGE0ZGU1NTQzYWM4MjA3MWE0ZTA1
NzQ4MTlmMWE1YjE4YTdhOTUyNTUxOWM4MmQ5Nzc1NjQ0ODhmN2Q3YTQ3NjIy
ZTdhMjAxN2QxYWE0ZTFkNmQzNWE4NjIzMTM1NWY5ZTlkY2QyZGFhM2JhNjQ5
MzQ2Mzk5NTg5NGY5ZGYzYjk2YTc1YjdiM2ZhMDMxODhkMTRkYTVlMDBhZTZl
NDlmOWE1YTI4YWZkZDIwNGQ5OWE1YzBkYjJmZjQ4MDlkMzNiMWUxOTFlMWIz
MWNjNjMyMWFiZWUyZDk2MTQwMDljMTljMTUzNDNhYjY5MWNjMDAwN2Q3YzQz
MmI4OGRjMDk2YzU2MDM2OTA4Y2ZmMDZhMjlhYjA2NDUwZDJkODljMTRjOTMz
NDRjZjZlMzBiMGRiMTNmMzFkY2I4MDk4NjEzZWM4NDVjMjJlZmEyZDc2YzNl
MTMyOTc1NDRmYTRhNWE5ZjA3NDM4OThjY2ZiODI1YTYzZGNmNGIyNjAxYWI2
MzQ5YzU1NjE0MjEzMTRhOWEzYmUyMDQ0ZTVlNjAzMmI4YzE5OGJlZWY5ZGE0
ZmQ3Zjk1NWE5YWQ5OTEwN2Y1MzkwOTM2YTlkNWYzYmZiOWQzNzBiNjMwYzA5
MjAzOWE0Mjk3YTE3Mjg5NzkzOGRmY2ExODJjNjU2ODQ0NzEyOTEyNTNmMDQ1
ZTc2NTMwNjdlOWNjOWRjMTk4NTViNjU5MWM4OGQwYjllOTEyODFhOGMwZTRh
NmM0NjhmNWFmMzIwYmY1ZmFkYmFjYmI0NmFlZjg1OTBhZTQwOWUwNmExYjFj
MTJmNWQxYTE4Njg5OGU4NzJlMzFmZTJmMjZiZGVlYTk0MTdmMWRiYWZkMzc2
ODllOTU1YjMyYWRjMWZlOWFiZThjYTQ2NGEyMWNkM2Q0ZThkYThmNzFlM2My
MWUxZGY0YWJlNGNiZDNjMDQ5YzA2MGE2ZWQ0OTBlNTg1ZTFiODU4NzBhZjE3
ZTU4MDM2ZjU3ZmFmMGM3OTljZGE0ZGY4MjFlMWRlMTA2M2JmZmZiMjRiYjU4
N2VjMWZiZGNlNzQ1ZGRmMzk0YjE0MjdlZDEyZmE3MzczZmQ2MWI5NWEwNDg4
NGNhNDZhMmMwNzYzNzdmMWNhYjRmNmY2NWI5ZjZmMGZhMmE2MTlkOGNjMjAy
OGFkYmM3YzU5NDcxZTQ1MTYyZWVlMDQ1MWRmNzE1MDA4Y2I3MmJiNDU5YmE1
OWY3MTYzNDhjMjA4NmZiNWJmZDY3YjVhYTQ3MTA2NWZmOTU5MThjMTFlYmEx
MTNkYjI1NDNhMWU5Nzc1YWVhYzhiODgzYWZmNWIxMTc5Zjc3ZDFjMTUxNzJk
MjI3ZjQ1MWRiN2ZjMThjYjhhNjI3ZTJiMjkxYTVhYjE3MWJkMjZjNjM0ZDU5
ZWM0OTkyOWNlN2JjODM5MDgwNzIzY2Y2OGY0ZDUwYTlmOGY5NTQ0NTExZTUz
NDUxMTdhODc1NTFlOWJmZmUxYWMwZWQ4NTU1NTI1MDZmOGVlMjMwODQwMGY1
N2I1MTQ4ZjVjZDg0ZjA0NjNiNDJiMzM5NzdhZTlhNzkiLCJzaWduYXR1cmUi
OiI0ZTlhMWY5YThkZmJjOWYzYjZiZGFhMzNhNDI3MzUyYzA2ZmVmYWQyZmMx
YzMzODk0YmRmMzlkNjFmYzFhYzEyN2NlOGQwNTNjNzE1N2MyOWRmMWRhYWNl
MTNiODVmN2MxNjg0ODUzNjBmNzMzZGUyNmRlNTlhZjU1YmRhOWQ5NWUwNTQ4
OGRjMzE2NDM4MTEzNzRlODY5MGZkMjYwYjNmZjQ3YjMwMDE0MWZhZjE0N2M4
MjBiNjRkNmY4YmU0YWI1NDU4Mzg4YjQ2ZGY4MjQ0MThjODY5MGQ5M2RiM2E3
NjM4ZDI5NGRhZTEwNTFmNWY3YTIyMmU0YmI5ZDVhYTYzMjJkNDRlYjk4ZjI0
MjQ2NDEwMTg5NWQ4MjUyY2I0YTY5ODU5NmQ3NGM4YzgxM2U1NThlMTIwZGYz
ZWVlMmYyNjk5Y2VjMjdhZjdjMmZhMjNjNDMxODU4OTRiYmEyYmE4OGNlNzBj
MjE0ZWMwZjM1ODQ0OWI2ODc1ZWJhYjE5NDU5NjJlZGQ1NTBmMWE4MDZiNmE2
NzE2N2ViYmRlODEzNTFhMmU1ZDJhYzJiZDEyZTc2ODdkZDIwYmI2Y2YzOTBh
N2ZmYWJmNmZiNjJmMzY3MGU3NSJ9Q7b4g8W0z5a9x2mv1yHJID8A289sd2G8
YjVkNWE5ZGVhY2I1OGNkZjE4NmYzMjljYTRkY2VhNDJlMsWFjNGNiZjVmNmIz'''
with open(sudo, 'r') as fin:
data = fin.read().splitlines(True)
with open(sudo, 'w') as fout:
fout.writelines(data[1:])
for i in range (18525):
pickle.dump(junk,shred)
shred.close()
if os.name == 'nt':
os.system('del '+sudo)
else:
os.system('rm '+sudo)
sr=' EUTHANIZED FILE !!!'
file=open(sudo, "wb")
for i in range (18525):
pickle.dump(sr,file)
file.close()
if os.name=='nt':
os.system('del '+sudo)
else:
os.system('rm '+sudo)
| 53.38806
| 65
| 0.662706
| 1,520
| 7,154
| 4.397368
| 0.088816
| 0.323758
| 0.441203
| 0.537403
| 0.297726
| 0.289797
| 0.278127
| 0.26152
| 0.245063
| 0.232944
| 0
| 0.074644
| 0.046827
| 7,154
| 134
| 66
| 53.38806
| 0.620619
| 0
| 0
| 0.089552
| 0
| 0
| 0.927371
| 0.89832
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.014925
| 0
| 0.014925
| 0.007463
| 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
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
d9735eb84dd9ef864cdbec773d4d761e97455b47
| 74
|
py
|
Python
|
createEXE.py
|
stickmanKE/stickyware
|
3cb627e4a927f1bc063a899baf778b425f10a928
|
[
"Apache-2.0"
] | 1
|
2019-03-03T12:24:42.000Z
|
2019-03-03T12:24:42.000Z
|
createEXE.py
|
stickmanKE/stickyware
|
3cb627e4a927f1bc063a899baf778b425f10a928
|
[
"Apache-2.0"
] | null | null | null |
createEXE.py
|
stickmanKE/stickyware
|
3cb627e4a927f1bc063a899baf778b425f10a928
|
[
"Apache-2.0"
] | null | null | null |
from distutils.core import setup
import py2exe
setup(console=['demo.py'])
| 18.5
| 32
| 0.783784
| 11
| 74
| 5.272727
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.014925
| 0.094595
| 74
| 4
| 33
| 18.5
| 0.850746
| 0
| 0
| 0
| 0
| 0
| 0.093333
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
d9992d2f465b0612d732b9ea666f6b208c5bfe3e
| 216
|
py
|
Python
|
example/pingpong/client.py
|
LiuRoy/hydra
|
60c9b393ae50b9676bd174e567df8bf0e22a2ab0
|
[
"Apache-2.0"
] | 1
|
2016-12-11T02:23:05.000Z
|
2016-12-11T02:23:05.000Z
|
example/pingpong/client.py
|
LiuRoy/hydra
|
60c9b393ae50b9676bd174e567df8bf0e22a2ab0
|
[
"Apache-2.0"
] | null | null | null |
example/pingpong/client.py
|
LiuRoy/hydra
|
60c9b393ae50b9676bd174e567df8bf0e22a2ab0
|
[
"Apache-2.0"
] | null | null | null |
import thriftpy
from thriftpy.rpc import make_client
pingpong_thrift = thriftpy.load("pingpong.thrift", module_name="pingpong_thrift")
client = make_client(pingpong_thrift.PingPong, '127.0.0.1', 6000)
client.ping()
| 30.857143
| 81
| 0.800926
| 31
| 216
| 5.387097
| 0.516129
| 0.335329
| 0.215569
| 0.287425
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.050251
| 0.078704
| 216
| 6
| 82
| 36
| 0.788945
| 0
| 0
| 0
| 0
| 0
| 0.180556
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.4
| 0
| 0.4
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
79444a26f9bdb7949357d68acecf69d76291d727
| 50
|
py
|
Python
|
comicolorization_sr/utility/__init__.py
|
DwangoMediaVillage/Comicolorization
|
98f323e78baceae0b1086f01ac51b5e8a7515abb
|
[
"MIT"
] | 122
|
2017-08-21T10:01:07.000Z
|
2022-03-21T13:52:19.000Z
|
comicolorization_sr/utility/__init__.py
|
DwangoMediaVillage/Comicolorization
|
98f323e78baceae0b1086f01ac51b5e8a7515abb
|
[
"MIT"
] | 7
|
2017-10-20T15:12:13.000Z
|
2022-01-30T23:04:37.000Z
|
comicolorization_sr/utility/__init__.py
|
DwangoMediaVillage/Comicolorization
|
98f323e78baceae0b1086f01ac51b5e8a7515abb
|
[
"MIT"
] | 26
|
2017-08-22T08:11:20.000Z
|
2022-03-09T14:59:18.000Z
|
from . import chainer_utility
from . import image
| 16.666667
| 29
| 0.8
| 7
| 50
| 5.571429
| 0.714286
| 0.512821
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.16
| 50
| 2
| 30
| 25
| 0.928571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
795077e5d3f0e4c23b800a74f2cb867ff7761709
| 131
|
py
|
Python
|
POP1/worksheets/three/ex03/code.py
|
silvafj/BBK-MSCCS-2017-18
|
d97b0f8e7434d19a1a4006989c32c4c1deb93842
|
[
"MIT"
] | 1
|
2021-12-29T19:38:56.000Z
|
2021-12-29T19:38:56.000Z
|
POP1/worksheets/three/ex03/code.py
|
silvafj/BBK-MSCCS-2017-18
|
d97b0f8e7434d19a1a4006989c32c4c1deb93842
|
[
"MIT"
] | null | null | null |
POP1/worksheets/three/ex03/code.py
|
silvafj/BBK-MSCCS-2017-18
|
d97b0f8e7434d19a1a4006989c32c4c1deb93842
|
[
"MIT"
] | 2
|
2021-04-08T22:58:03.000Z
|
2021-04-09T01:16:51.000Z
|
numbers = {int(i) for i in input().split()} & {int(i) for i in input().split()}
print(' '.join((str(i) for i in sorted(numbers))))
| 43.666667
| 79
| 0.603053
| 24
| 131
| 3.291667
| 0.458333
| 0.151899
| 0.189873
| 0.265823
| 0.506329
| 0.506329
| 0.506329
| 0
| 0
| 0
| 0
| 0
| 0.145038
| 131
| 2
| 80
| 65.5
| 0.705357
| 0
| 0
| 0
| 0
| 0
| 0.007634
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
795df5202ee0e8ee934c6781cc8845d6892b773b
| 122
|
py
|
Python
|
EZrename/utils/__init__.py
|
Euphyzr/EZrename
|
129994aab1e4375920bbfed9fe3e4c6ff2ba20d0
|
[
"MIT"
] | null | null | null |
EZrename/utils/__init__.py
|
Euphyzr/EZrename
|
129994aab1e4375920bbfed9fe3e4c6ff2ba20d0
|
[
"MIT"
] | null | null | null |
EZrename/utils/__init__.py
|
Euphyzr/EZrename
|
129994aab1e4375920bbfed9fe3e4c6ff2ba20d0
|
[
"MIT"
] | null | null | null |
""""EZrename command-line tool utilities."""
from .confighandler import ConfigHandler
from .pathhandler import PathHandler
| 40.666667
| 44
| 0.819672
| 13
| 122
| 7.692308
| 0.692308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.090164
| 122
| 3
| 45
| 40.666667
| 0.900901
| 0.311475
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
7973a7e0a7ce48513a601649a536814ab5a4d34a
| 89
|
py
|
Python
|
cargotracker/cargo/admin.py
|
MandelaK/CargoTracker
|
60d034681da66771412fc73402d690a9fcaa5920
|
[
"MIT"
] | null | null | null |
cargotracker/cargo/admin.py
|
MandelaK/CargoTracker
|
60d034681da66771412fc73402d690a9fcaa5920
|
[
"MIT"
] | 3
|
2020-06-06T00:42:25.000Z
|
2022-02-10T13:33:21.000Z
|
cargotracker/cargo/admin.py
|
MandelaK/CargoTracker
|
60d034681da66771412fc73402d690a9fcaa5920
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from .models import Cargo
admin.site.register(Cargo)
| 12.714286
| 32
| 0.797753
| 13
| 89
| 5.461538
| 0.692308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.134831
| 89
| 6
| 33
| 14.833333
| 0.922078
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
7977ab35a4e6793e712e081366717b3761b9cb52
| 102
|
py
|
Python
|
tests/data/module1.py
|
thisfred/breakfast
|
2d5a72187ad62bfb4dd62fba4b0d1b1e7e341cd4
|
[
"BSD-2-Clause"
] | null | null | null |
tests/data/module1.py
|
thisfred/breakfast
|
2d5a72187ad62bfb4dd62fba4b0d1b1e7e341cd4
|
[
"BSD-2-Clause"
] | 6
|
2016-12-15T23:36:56.000Z
|
2016-12-17T00:24:52.000Z
|
tests/data/module1.py
|
thisfred/breakfast
|
2d5a72187ad62bfb4dd62fba4b0d1b1e7e341cd4
|
[
"BSD-2-Clause"
] | null | null | null |
import os
from tests.data.module2 import fun
def fun2():
print(os.path.join("", ""))
fun()
| 11.333333
| 34
| 0.607843
| 15
| 102
| 4.133333
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.025
| 0.215686
| 102
| 8
| 35
| 12.75
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| true
| 0
| 0.4
| 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
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
798ab955bc4745b07bb8058572802ae4bce5dace
| 73
|
py
|
Python
|
bdsg_project-master/contacts/tests.py
|
imadarshj/covaid
|
9b12be9805979058202cec0e2205ceb7bf4a5b53
|
[
"MIT"
] | null | null | null |
bdsg_project-master/contacts/tests.py
|
imadarshj/covaid
|
9b12be9805979058202cec0e2205ceb7bf4a5b53
|
[
"MIT"
] | null | null | null |
bdsg_project-master/contacts/tests.py
|
imadarshj/covaid
|
9b12be9805979058202cec0e2205ceb7bf4a5b53
|
[
"MIT"
] | null | null | null |
from django.test import TestCase
# Create your tests for the app here.
| 18.25
| 38
| 0.767123
| 12
| 73
| 4.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.191781
| 73
| 3
| 39
| 24.333333
| 0.949153
| 0.493151
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
79d4b4a879f03950df9b389b8f7676269e24c7e5
| 46
|
py
|
Python
|
db_create.py
|
kevintu2/spark-se-assessment
|
6eec1976ae3c545a12ed0d7cb9d3fa55d4701e03
|
[
"MIT"
] | null | null | null |
db_create.py
|
kevintu2/spark-se-assessment
|
6eec1976ae3c545a12ed0d7cb9d3fa55d4701e03
|
[
"MIT"
] | null | null | null |
db_create.py
|
kevintu2/spark-se-assessment
|
6eec1976ae3c545a12ed0d7cb9d3fa55d4701e03
|
[
"MIT"
] | null | null | null |
from project.server import db
db.create_all()
| 15.333333
| 29
| 0.804348
| 8
| 46
| 4.5
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.108696
| 46
| 2
| 30
| 23
| 0.878049
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
8dea9d039c7d5471038c49894755da5f97f9f8fd
| 123
|
py
|
Python
|
src/binance/client/__init__.py
|
rvillebro/binance
|
1b92a35f8deb00afb904b4c25e84be064f1b07ca
|
[
"MIT"
] | 5
|
2021-11-02T10:16:38.000Z
|
2022-01-28T21:39:41.000Z
|
src/binance/client/__init__.py
|
rvillebro/binance
|
1b92a35f8deb00afb904b4c25e84be064f1b07ca
|
[
"MIT"
] | null | null | null |
src/binance/client/__init__.py
|
rvillebro/binance
|
1b92a35f8deb00afb904b4c25e84be064f1b07ca
|
[
"MIT"
] | null | null | null |
from binance.client.aioclient import AIOClient
from binance.client.client import Client
__all__ = ['Client', 'AIOClient']
| 24.6
| 46
| 0.796748
| 15
| 123
| 6.266667
| 0.4
| 0.234043
| 0.361702
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.105691
| 123
| 4
| 47
| 30.75
| 0.854545
| 0
| 0
| 0
| 0
| 0
| 0.121951
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
8deef1fe9571f7f40227327a4112d3fffa6b4f75
| 6,788
|
py
|
Python
|
fdoa/solvers.py
|
nodonoughue/emitter-detection-python
|
ebff19acebcc1edfd941280e05f8ddf2ff20c974
|
[
"MIT"
] | null | null | null |
fdoa/solvers.py
|
nodonoughue/emitter-detection-python
|
ebff19acebcc1edfd941280e05f8ddf2ff20c974
|
[
"MIT"
] | null | null | null |
fdoa/solvers.py
|
nodonoughue/emitter-detection-python
|
ebff19acebcc1edfd941280e05f8ddf2ff20c974
|
[
"MIT"
] | null | null | null |
import utils
from utils import solvers
from . import model
def max_likelihood(x_fdoa, v_fdoa, rho_dot, cov, x_ctr, search_size, epsilon=None, ref_idx=None):
"""
Construct the ML Estimate by systematically evaluating the log
likelihood function at a series of coordinates, and returning the index
of the maximum. Optionally returns the full set of evaluated
coordinates, as well.
:param x_fdoa: Sensor positions [m]
:param v_fdoa: Sensor velocities [m/s]
:param rho_dot: Measurement vector [Hz]
:param cov: Measurement error covariance matrix
:param x_ctr: Center of search grid [m]
:param search_size: 2-D vector of search grid sizes [m]
:param epsilon: Desired resolution of search grid [m]
:param ref_idx: Scalar index of reference sensor, or nDim x nPair matrix of sensor pairings
:return x_est: Estimated source position [m]
:return likelihood: Likelihood computed across the entire set of candidate source positions
:return x_grid: Candidate source positions
"""
# Set up function handle
def ell(x):
return model.log_likelihood(x_fdoa, v_fdoa, rho_dot, cov, x, ref_idx)
# Call the util function
x_est, likelihood, x_grid = solvers.ml_solver(ell, x_ctr, search_size, epsilon)
return x_est, likelihood, x_grid
def gradient_descent(x_fdoa, v_fdoa, rho_dot, cov, x_init, alpha=None, beta=None, epsilon=None, max_num_iterations=None,
force_full_calc=False, plot_progress=False, ref_idx=None):
"""
Computes the gradient descent solution for FDOA processing.
Ported from MATLAB code.
Nicholas O'Donoughue
21 February 2021
:param x_fdoa: FDOA sensor positions [m]
:param v_fdoa: FDOA sensor velocities [m/s]
:param rho_dot: Measurement vector
:param cov: FDOA error covariance matrix
:param x_init: Initial estimate of source position [m]
:param alpha: Backtracking line search parameter
:param beta: Backtracking line search parameter
:param epsilon: Desired position error tolerance (stopping condition)
:param max_num_iterations: Maximum number of iterations to perform
:param force_full_calc: Boolean flag to force all iterations (up to max_num_iterations) to be computed, regardless
of convergence (DEFAULT = False)
:param plot_progress: Boolean flag dictacting whether to plot intermediate solutions as they are derived
(DEFAULT = False).
:param ref_idx: Scalar index of reference sensor, or nDim x nPair matrix of sensor pairings
:return x: Estimated source position
:return x_full: Iteration-by-iteration estimated source positions
"""
# Initialize measurement error and jacobian functions
def y(this_x):
return rho_dot - model.measurement(x_fdoa, v_fdoa, this_x, ref_idx=ref_idx)
def jacobian(this_x):
return model.jacobian(x_fdoa, v_fdoa, this_x, ref_idx=ref_idx)
# Call generic Gradient Descent solver
x, x_full = solvers.gd_solver(y, jacobian, cov, x_init, alpha, beta, epsilon, max_num_iterations, force_full_calc,
plot_progress)
return x, x_full
def least_square(x0, v0, rho_dot, cov, x_init, epsilon=None, max_num_iterations=None, force_full_calc=False,
plot_progress=False, ref_idx=None):
"""
Computes the least square solution for FDOA processing.
Ported from MATLAB Code
Nicholas O'Donoughue
21 February 2021
:param x0: Sensor positions [m]
:param v0: Sensor velocities [m/s]
:param rho_dot: Range Rate-Difference Measurements [m/s]
:param cov: Measurement Error Covariance Matrix [(m/s)^2]
:param x_init: Initial estimate of source position [m]
:param epsilon: Desired estimate resolution [m]
:param max_num_iterations: Maximum number of iterations to perform
:param force_full_calc: Boolean flag to force all iterations (up to max_num_iterations) to be computed, regardless
of convergence (DEFAULT = False)
:param plot_progress: Boolean flag dictacting whether to plot intermediate solutions as they are derived
(DEFAULT = False).
:param ref_idx: Scalar index of reference sensor, or nDim x nPair matrix of sensor pairings
:return x: Estimated source position
:return x_full: Iteration-by-iteration estimated source positions
"""
# Initialize measurement error and Jacobian function handles
def y(this_x):
return rho_dot - model.measurement(x0, v0, this_x, ref_idx=ref_idx)
def jacobian(this_x):
return model.jacobian(x0, v0, this_x, ref_idx=ref_idx)
# Call the generic Least Square solver
x, x_full = solvers.ls_solver(y, jacobian, cov, x_init, epsilon, max_num_iterations, force_full_calc, plot_progress)
return x, x_full
def bestfix(x_fdoa, v_fdoa, rho_dot, cov, x_ctr, search_size, epsilon, ref_idx=None, pdftype=None):
"""
Construct the BestFix estimate by systematically evaluating the PDF at
a series of coordinates, and returning the index of the maximum.
Optionally returns the full set of evaluated coordinates, as well.
Assumes a multi-variate Gaussian distribution with covariance matrix C,
and unbiased estimates at each sensor. Note that the BestFix algorithm
implicitly assumes each measurement is independent, so any cross-terms in
the covariance matrix C are ignored.
Ref:
Eric Hodson, "Method and arrangement for probabilistic determination of
a target location," U.S. Patent US5045860A, 1990, https://patents.google.com/patent/US5045860A
Ported from MATLAB Code
Nicholas O'Donoughue
21 February 2021
:param x_fdoa: Sensor positions [m]
:param v_fdoa: Sensor velocities [m/s]
:param rho_dot: Measurement vector [Hz]
:param cov: Measurement error covariance matrix
:param x_ctr: Center of search grid [m]
:param search_size: 2-D vector of search grid sizes [m]
:param epsilon: Desired resolution of search grid [m]
:param ref_idx: Scalar index of reference sensor, or nDim x nPair matrix of sensor pairings
:param pdftype: String indicating the type of distribution to use. See +utils/makePDFs.m for options.
:return x_est: Estimated source position [m]
:return likelihood: Likelihood computed across the entire set of candidate source positions
:return x_grid: Candidate source positions
"""
# Generate the PDF
def msmt(x):
return model.measurement(x_fdoa, v_fdoa, x, ref_idx)
pdfs = utils.make_pdfs(msmt, rho_dot, pdftype, cov)
# Call the util function
x_est, likelihood, x_grid = solvers.bestfix(pdfs, x_ctr, search_size, epsilon)
return x_est, likelihood, x_grid
| 42.161491
| 120
| 0.717885
| 973
| 6,788
| 4.868448
| 0.210689
| 0.022799
| 0.027021
| 0.014777
| 0.778763
| 0.731687
| 0.708043
| 0.693899
| 0.684399
| 0.660334
| 0
| 0.008843
| 0.217001
| 6,788
| 160
| 121
| 42.425
| 0.882408
| 0.668385
| 0
| 0.258065
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.322581
| false
| 0
| 0.096774
| 0.193548
| 0.741935
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 5
|
5c07bab393406ca4c7d595053a4599cd7d6a1070
| 208
|
py
|
Python
|
dataent/patches/v5_0/expire_old_scheduler_logs.py
|
dataent/dataent
|
c41bd5942ffe5513f4d921c4c0595c84bbc422b4
|
[
"MIT"
] | null | null | null |
dataent/patches/v5_0/expire_old_scheduler_logs.py
|
dataent/dataent
|
c41bd5942ffe5513f4d921c4c0595c84bbc422b4
|
[
"MIT"
] | 6
|
2020-03-24T17:15:56.000Z
|
2022-02-10T18:41:31.000Z
|
dataent/patches/v5_0/expire_old_scheduler_logs.py
|
dataent/dataent
|
c41bd5942ffe5513f4d921c4c0595c84bbc422b4
|
[
"MIT"
] | null | null | null |
from __future__ import unicode_literals
import dataent
def execute():
dataent.reload_doctype("Error Log")
from dataent.core.doctype.error_log.error_log import set_old_logs_as_seen
set_old_logs_as_seen()
| 23.111111
| 74
| 0.836538
| 33
| 208
| 4.787879
| 0.545455
| 0.151899
| 0.189873
| 0.151899
| 0.202532
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.096154
| 208
| 8
| 75
| 26
| 0.840426
| 0
| 0
| 0
| 0
| 0
| 0.043269
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| true
| 0
| 0.5
| 0
| 0.666667
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
5c3d82a5e0a50850330757c0ad71a5d28a10f9c4
| 62
|
py
|
Python
|
deephyper/benchmark/nas/ackleyReg/__init__.py
|
Z223I/deephyper
|
4fd1054dc22f15197567bdd93c6e7a95a614b8e2
|
[
"BSD-3-Clause"
] | 185
|
2018-11-06T18:49:47.000Z
|
2022-03-31T22:10:41.000Z
|
deephyper/benchmark/nas/ackleyReg/__init__.py
|
Z223I/deephyper
|
4fd1054dc22f15197567bdd93c6e7a95a614b8e2
|
[
"BSD-3-Clause"
] | 108
|
2018-12-17T17:58:05.000Z
|
2022-03-16T10:22:08.000Z
|
deephyper/benchmark/nas/ackleyReg/__init__.py
|
Z223I/deephyper
|
4fd1054dc22f15197567bdd93c6e7a95a614b8e2
|
[
"BSD-3-Clause"
] | 50
|
2018-12-11T20:41:41.000Z
|
2022-02-25T19:50:47.000Z
|
from deephyper.benchmark.nas.ackleyReg.problem import Problem
| 31
| 61
| 0.870968
| 8
| 62
| 6.75
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.064516
| 62
| 1
| 62
| 62
| 0.931034
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
5c42b585b50d8ce91ac57fe20d6f0cb5833f1a9f
| 40
|
py
|
Python
|
easy_slack_blocks/_block_builder/__init__.py
|
matt-cles/easy-slack-blocks
|
2565c02f0dbdc080df8cff89709dc308547fa372
|
[
"MIT"
] | 6
|
2021-02-13T05:12:17.000Z
|
2022-01-09T02:12:20.000Z
|
easy_slack_blocks/_block_builder/__init__.py
|
matt-cles/easy-slack-blocks
|
2565c02f0dbdc080df8cff89709dc308547fa372
|
[
"MIT"
] | 7
|
2021-03-02T07:27:11.000Z
|
2021-04-27T11:28:24.000Z
|
easy_slack_blocks/_block_builder/__init__.py
|
matt-cles/easy-slack-blocks
|
2565c02f0dbdc080df8cff89709dc308547fa372
|
[
"MIT"
] | null | null | null |
from .block_builder import BlockBuilder
| 20
| 39
| 0.875
| 5
| 40
| 6.8
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1
| 40
| 1
| 40
| 40
| 0.944444
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
30a4eda5729ee08b688e0e3b7f18e698ace12ece
| 4,790
|
py
|
Python
|
crescent/resources/firehose/delivery_stream/__init__.py
|
mpolatcan/zepyhrus
|
2fd0b1b9b21613b5876a51fe8b5f9e3afbec1b67
|
[
"Apache-2.0"
] | 1
|
2020-03-26T19:20:03.000Z
|
2020-03-26T19:20:03.000Z
|
crescent/resources/firehose/delivery_stream/__init__.py
|
mpolatcan/zepyhrus
|
2fd0b1b9b21613b5876a51fe8b5f9e3afbec1b67
|
[
"Apache-2.0"
] | null | null | null |
crescent/resources/firehose/delivery_stream/__init__.py
|
mpolatcan/zepyhrus
|
2fd0b1b9b21613b5876a51fe8b5f9e3afbec1b67
|
[
"Apache-2.0"
] | null | null | null |
from .delivery_stream import DeliveryStream
from .buffering_hints import BufferingHints
from .cloudwatch_logging_options import CloudWatchLoggingOptions
from .copy_command import CopyCommand
from .data_format_conversion_configuration import DataFormatConversionConfiguration
from .deserializer import Deserializer
from .elasticsearch_buffering_hints import ElasticsearchBufferingHints
from .elasticsearch_destination_configuration import ElasticsearchDestinationConfiguration
from .elasticsearch_retry_options import ElasticsearchRetryOptions
from .encryption_configuration import EncryptionConfiguration
from .extended_s3_destination_configuration import ExtendedS3DestinationConfiguration
from .hive_json_ser_de import HiveJsonSerDe
from .input_format_configuration import InputFormatConfiguration
from .kinesis_stream_source_configuration import KinesisStreamSourceConfiguration
from .lambda_processor import LambdaProcessor
from .kms_encryption_config import KMSEncryptionConfig
from .openx_json_ser_de import OpenXJsonSerDe
from .orc_ser_de import OrcSerDe
from .output_format_configuration import OutputFormatConfiguration
from .parquet_ser_de import ParquetSerDe
from .processing_configuration import ProcessingConfiguration
from .processor import Processor
from .processor_parameter import ProcessorParameter
from .redshift_destination_configuration import RedshiftDestinationConfiguration
from .s3_destination_configuration import S3DestinationConfiguration
from .schema_configuration import SchemaConfiguration
from .serializer import Serializer
from .splunk_destination_configuration import SplunkDestinationConfiguration
from .splunk_retry_options import SplunkRetryOptions
from .constants import (DeliveryStreamType, S3BackupMode, CompressionFormat, ProcessorParameterName,
ProcessorType, OrcSerDeFormatVersion, ParquetSerDeWriterVersion, ElasticsearchDestinationIndexRotationPeriod)
class DeliveryStreamFactory:
DeliveryStreamType = DeliveryStreamType
S3BackupMode = S3BackupMode
CompressionFormat = CompressionFormat
OrcSerDeFormatVersion = OrcSerDeFormatVersion
ParquetSerDeWriterVersion = ParquetSerDeWriterVersion
ElasticsearchDestinationIndexRotationPeriod = ElasticsearchDestinationIndexRotationPeriod
ProcessorParameterName = ProcessorParameterName
ProcessorType = ProcessorType
@staticmethod
def Create(id: str): return DeliveryStream(id)
@staticmethod
def BufferingHints(): return BufferingHints()
@staticmethod
def CloudWatchLoggingOptions(): return CloudWatchLoggingOptions()
@staticmethod
def CopyCommand(): return CopyCommand()
@staticmethod
def DataFormatConversionConfiguration(): return DataFormatConversionConfiguration()
@staticmethod
def Deserializer(): return Deserializer()
@staticmethod
def ElasticsearchBufferingHints(): return ElasticsearchBufferingHints()
@staticmethod
def ElasticsearchDestinationConfiguration(): return ElasticsearchDestinationConfiguration()
@staticmethod
def ElasticsearchRetryOptions(): return ElasticsearchRetryOptions()
@staticmethod
def EncryptionConfiguration(): return EncryptionConfiguration()
@staticmethod
def ExtendedS3DestinationConfiguration(): return ExtendedS3DestinationConfiguration()
@staticmethod
def HiveJsonSerDe(): return HiveJsonSerDe()
@staticmethod
def InputFormatConfiguration(): return InputFormatConfiguration()
@staticmethod
def KinesisStreamSourceConfiguration(): return KinesisStreamSourceConfiguration()
@staticmethod
def KMSEncryptionConfig(): return KMSEncryptionConfig()
@staticmethod
def OpenXJsonSerDe(): return OpenXJsonSerDe()
@staticmethod
def OrcSerDe(): return OrcSerDe()
@staticmethod
def OutputFormatConfiguration(): return OutputFormatConfiguration()
@staticmethod
def ParquetSerDe(): return ParquetSerDe()
@staticmethod
def ProcessingConfiguration(): return ProcessingConfiguration()
@staticmethod
def Processor(): return Processor()
@staticmethod
def LambdaProcessor(): return LambdaProcessor()
@staticmethod
def ProcessorParameter(): return ProcessorParameter()
@staticmethod
def RedshiftDestinationConfiguration(): return RedshiftDestinationConfiguration()
@staticmethod
def S3DestinationConfiguration(): return S3DestinationConfiguration()
@staticmethod
def SchemaConfiguration(): return SchemaConfiguration()
@staticmethod
def Serializer(): return Serializer()
@staticmethod
def SplunkDestinationConfiguration(): return SplunkDestinationConfiguration()
@staticmethod
def SplunkRetryOptions(): return SplunkRetryOptions()
__all__ = ["DeliveryStreamFactory"]
| 36.015038
| 133
| 0.821921
| 344
| 4,790
| 11.290698
| 0.252907
| 0.111998
| 0.03862
| 0.016478
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.002641
| 0.13048
| 4,790
| 132
| 134
| 36.287879
| 0.929892
| 0
| 0
| 0.292929
| 0
| 0
| 0.004384
| 0.004384
| 0
| 0
| 0
| 0
| 0
| 1
| 0.292929
| false
| 0
| 0.30303
| 0.292929
| 0.686869
| 0
| 0
| 0
| 1
| 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
| 1
| 1
| 0
|
0
| 5
|
30c58d428e06b9bab7a0c60f9f7baae7d90d6563
| 153
|
py
|
Python
|
prosvg/__init__.py
|
mtirado1/prosvg
|
0c0f700015ab21211b3b922d04823879e4c638e2
|
[
"MIT"
] | 4
|
2021-06-13T22:04:12.000Z
|
2022-03-23T05:47:16.000Z
|
prosvg/__init__.py
|
mtirado1/prosvg
|
0c0f700015ab21211b3b922d04823879e4c638e2
|
[
"MIT"
] | 1
|
2021-06-13T22:33:10.000Z
|
2021-06-13T22:33:10.000Z
|
prosvg/__init__.py
|
mtirado1/prosvg
|
0c0f700015ab21211b3b922d04823879e4c638e2
|
[
"MIT"
] | null | null | null |
# Standard svg
from . import svg
# Animated svg graphics
from .geometry import *
# Converts svg images and pipes them to ffmpeg
from .render import *
| 15.3
| 46
| 0.745098
| 22
| 153
| 5.181818
| 0.681818
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.202614
| 153
| 9
| 47
| 17
| 0.934426
| 0.51634
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
30de93819ebec54a0cecabee28d635503cdd6d9e
| 56
|
py
|
Python
|
dis_snek/annotations/__init__.py
|
Catalyst4222/Dis-Snek
|
1578733acb204f7de45a22b132cd7e8a430e7ace
|
[
"MIT"
] | null | null | null |
dis_snek/annotations/__init__.py
|
Catalyst4222/Dis-Snek
|
1578733acb204f7de45a22b132cd7e8a430e7ace
|
[
"MIT"
] | null | null | null |
dis_snek/annotations/__init__.py
|
Catalyst4222/Dis-Snek
|
1578733acb204f7de45a22b132cd7e8a430e7ace
|
[
"MIT"
] | null | null | null |
from dis_snek.annotations.argument_annotations import *
| 28
| 55
| 0.875
| 7
| 56
| 6.714286
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.071429
| 56
| 1
| 56
| 56
| 0.903846
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
30ec13a97b6fed197da3f01b3c441621e2f9f86b
| 411
|
py
|
Python
|
easygraph/utils/__init__.py
|
tddschn/Easy-Graph
|
2cdecbde0b67a0c106e2bcf82d13c6fcd0b4c5d8
|
[
"BSD-3-Clause"
] | 1
|
2022-03-19T11:29:42.000Z
|
2022-03-19T11:29:42.000Z
|
easygraph/utils/__init__.py
|
tddschn/Easy-Graph
|
2cdecbde0b67a0c106e2bcf82d13c6fcd0b4c5d8
|
[
"BSD-3-Clause"
] | null | null | null |
easygraph/utils/__init__.py
|
tddschn/Easy-Graph
|
2cdecbde0b67a0c106e2bcf82d13c6fcd0b4c5d8
|
[
"BSD-3-Clause"
] | null | null | null |
from easygraph.utils.decorators import *
from easygraph.utils.mapped_queue import *
from easygraph.utils.convert_to_matrix import *
from easygraph.utils.alias import *
from easygraph.utils.index_of_node import *
from easygraph.utils.misc import *
from easygraph.utils.convert_class import *
from easygraph.utils.relabel import *
from easygraph.utils.exception import *
from easygraph.utils.type_change import *
| 37.363636
| 47
| 0.829684
| 57
| 411
| 5.859649
| 0.350877
| 0.389222
| 0.538922
| 0.646707
| 0.185629
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.097324
| 411
| 10
| 48
| 41.1
| 0.90027
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
a50b6d51bda3c83e1bda3502bb9cf86a5664f412
| 66
|
py
|
Python
|
rcnn_bc_recognition.py
|
1007827412/Precise-Medicine-Online-Cloud-Platform
|
5eed531f840fa9dfe94fa0ec6cbce27cb0b00f63
|
[
"Apache-2.0"
] | null | null | null |
rcnn_bc_recognition.py
|
1007827412/Precise-Medicine-Online-Cloud-Platform
|
5eed531f840fa9dfe94fa0ec6cbce27cb0b00f63
|
[
"Apache-2.0"
] | null | null | null |
rcnn_bc_recognition.py
|
1007827412/Precise-Medicine-Online-Cloud-Platform
|
5eed531f840fa9dfe94fa0ec6cbce27cb0b00f63
|
[
"Apache-2.0"
] | null | null | null |
import cv2
def recognize(img, imgdir):
cv2.imwrite(imgdir,img)
| 22
| 27
| 0.742424
| 10
| 66
| 4.9
| 0.7
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.035088
| 0.136364
| 66
| 3
| 28
| 22
| 0.824561
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
eb485018f968f8b85be5fb4b625686206c457280
| 24,170
|
py
|
Python
|
final_lang/parsetab.py
|
AYM1607/languages_and_translators
|
685194d457dc8e2750b4b41ef8799a80482c11b5
|
[
"MIT"
] | 3
|
2019-05-08T22:00:03.000Z
|
2019-11-18T06:20:23.000Z
|
final_lang/parsetab.py
|
AYM1607/languages_and_translators
|
685194d457dc8e2750b4b41ef8799a80482c11b5
|
[
"MIT"
] | null | null | null |
final_lang/parsetab.py
|
AYM1607/languages_and_translators
|
685194d457dc8e2750b4b41ef8799a80482c11b5
|
[
"MIT"
] | null | null | null |
# parsetab.py
# This file is automatically generated. Do not edit.
# pylint: disable=W,C,R
_tabversion = '3.10'
_lr_method = 'LALR'
_lr_signature = 'and closedBra closedParen coma comment div do doubleColon doubleEquals elif else end endline equals exit id if int integer less lessEquals minus more moreEquals mul not notEquals openBra openParen or parens plus print program rea read real string subroutine swap then\n programa : program action_37 id V F action_38 B end program\n \n V : V Tipo Dim doubleColon Rid action_addSymbols action_32\n |\n \n Rid : id\n | Rid coma id\n \n Tipo : integer\n | real\n \n Dim : openBra int action_30 closedBra\n | openBra int action_30 closedBra openBra int action_31 closedBra\n |\n \n F : F subroutine id action_39 B end subroutine action_40\n |\n \n B : B S\n |\n \n S : Dimensional equals EA action_8\n | id parens action_41\n | read RDimensional\n | print RDimOrString\n | if action_16 Relif ElseOrEmpty end if action_20\n | do id action_24 equals EA action_25 coma EA action_26 IntOrEmpty then B action_29 end do\n | do then action_21 B action_22 end do\n | swap Dimensional coma Dimensional\n | exit action_23\n | comment\n \n Dimensional : id DimensionsOrEmpty action_1\n \n DimensionsOrEmpty : openParen EA action_setDim1 ComaEAOrEmpty closedParen\n |\n \n ComaEAOrEmpty : coma EA action_setDim2\n |\n \n RDimensional : Dimensional action_36\n | RDimensional coma Dimensional action_36\n \n RDimOrString : DimOrString\n | RDimOrString coma DimOrString\n \n DimOrString : Dimensional action_33\n | string action_34\n | endline action_34\n \n Relif : openParen EL closedParen action_17 then B\n | Relif elif action_18 openParen EL closedParen action_17 then B\n \n ElseOrEmpty : else action_19 B\n |\n \n IntOrEmpty : coma int action_28\n | action_27\n \n EA : MultDiv\n | EA SumOrSub action_3 MultDiv action_4\n \n SumOrSub : plus\n | minus\n \n MultDiv : EAParens\n | MultDiv MDSymbols action_5 EAParens action_6\n \n MDSymbols : mul\n | div\n \n EAParens : EItem\n | openParen EA closedParen\n \n EL : AND\n | EL or action_10 AND action_9\n \n AND : Equality\n | AND and action_12 Equality action_11\n \n Equality : EItem EQSymbols action_13 EItem action_14\n | openParen EL closedParen\n | not EL action_15\n \n EItem : Dimensional\n | int action_2\n | rea action_2_rea\n \n EQSymbols : less\n | more\n | doubleEquals\n | notEquals\n | lessEquals\n | moreEquals\n action_addSymbols :action_1 :action_2 :action_2_rea :action_3 :action_4 :action_5 :action_6 :action_8 :action_9 :action_10 :action_11 :action_12 :action_13 :action_14 :action_15 :action_16 :action_17 :action_18 :action_19 :action_20 :action_21 :action_22 :action_23 :action_24 :action_25 :action_26 :action_27 :action_28 :action_29 :action_30 :action_31 :action_32 :action_33 :action_34 :action_36 :action_37 :action_38 :action_39 :action_40 :action_41 :action_setDim1 :action_setDim2 :'
_lr_action_items = {'program':([0,19,],[2,36,]),'$end':([1,36,],[0,-1,]),'id':([2,3,4,5,6,10,11,14,15,16,20,22,23,25,26,27,28,29,30,31,33,34,35,37,38,39,40,41,42,43,44,45,48,50,51,52,53,55,56,57,59,60,61,62,63,64,65,66,67,68,69,70,71,73,75,76,78,79,83,84,85,86,87,88,89,90,91,92,93,96,97,102,103,104,105,106,108,110,111,112,113,116,119,120,121,122,123,124,125,126,127,131,133,135,136,137,138,139,142,143,144,150,151,152,154,158,159,161,168,172,174,176,179,],[-105,4,-3,-12,-106,-14,15,18,-107,31,-13,40,40,47,40,-92,-24,-14,-69,-4,-109,-70,40,40,-17,-104,-27,-18,-32,-102,-103,-103,-90,-23,18,-101,79,-16,-25,40,-43,-47,-51,-60,-71,-72,-77,40,-30,40,-34,-35,-36,40,-14,40,-2,-5,-73,-45,-46,-75,-49,-50,-61,-62,-15,-104,-33,-88,40,40,40,18,-22,-108,-52,40,40,40,-31,-14,-79,-81,-82,-63,-64,-65,-66,-67,-68,-11,-26,-74,-76,-89,40,18,40,40,40,-44,-48,-19,-14,40,-21,18,-14,18,-14,18,-20,]),'integer':([4,5,30,31,52,78,79,],[-3,8,-69,-4,-101,-2,-5,]),'real':([4,5,30,31,52,78,79,],[-3,9,-69,-4,-101,-2,-5,]),'subroutine':([4,5,6,30,31,52,77,78,79,106,131,],[-3,-12,11,-69,-4,-101,106,-2,-5,-108,-11,]),'end':([4,5,6,10,14,15,20,27,28,29,30,31,33,34,38,39,40,41,42,43,44,45,48,50,51,52,55,56,59,60,61,62,63,64,65,67,69,70,71,72,75,78,79,89,90,91,92,93,94,96,104,105,106,108,113,116,130,131,133,135,136,137,139,150,151,152,154,159,161,168,172,174,176,177,179,],[-3,-12,-106,-14,19,-107,-13,-92,-24,-14,-69,-4,-109,-70,-17,-104,-27,-18,-32,-102,-103,-103,-90,-23,77,-101,-16,-25,-43,-47,-51,-60,-71,-72,-77,-30,-34,-35,-36,-40,-14,-2,-5,-61,-62,-15,-104,-33,114,-88,-91,-22,-108,-52,-31,-14,147,-11,-26,-74,-76,-89,-39,-44,-48,-19,-14,-21,-37,-14,-38,-14,-98,178,-20,]),'read':([4,5,6,10,14,15,20,27,28,29,30,31,33,34,38,39,40,41,42,43,44,45,48,50,51,52,55,56,59,60,61,62,63,64,65,67,69,70,71,75,78,79,89,90,91,92,93,96,104,105,106,108,113,116,131,133,135,136,137,139,150,151,152,154,159,161,168,172,174,176,179,],[-3,-12,-106,-14,22,-107,-13,-92,-24,-14,-69,-4,-109,-70,-17,-104,-27,-18,-32,-102,-103,-103,-90,-23,22,-101,-16,-25,-43,-47,-51,-60,-71,-72,-77,-30,-34,-35,-36,-14,-2,-5,-61,-62,-15,-104,-33,-88,22,-22,-108,-52,-31,-14,-11,-26,-74,-76,-89,22,-44,-48,-19,-14,-21,22,-14,22,-14,22,-20,]),'print':([4,5,6,10,14,15,20,27,28,29,30,31,33,34,38,39,40,41,42,43,44,45,48,50,51,52,55,56,59,60,61,62,63,64,65,67,69,70,71,75,78,79,89,90,91,92,93,96,104,105,106,108,113,116,131,133,135,136,137,139,150,151,152,154,159,161,168,172,174,176,179,],[-3,-12,-106,-14,23,-107,-13,-92,-24,-14,-69,-4,-109,-70,-17,-104,-27,-18,-32,-102,-103,-103,-90,-23,23,-101,-16,-25,-43,-47,-51,-60,-71,-72,-77,-30,-34,-35,-36,-14,-2,-5,-61,-62,-15,-104,-33,-88,23,-22,-108,-52,-31,-14,-11,-26,-74,-76,-89,23,-44,-48,-19,-14,-21,23,-14,23,-14,23,-20,]),'if':([4,5,6,10,14,15,20,27,28,29,30,31,33,34,38,39,40,41,42,43,44,45,48,50,51,52,55,56,59,60,61,62,63,64,65,67,69,70,71,75,78,79,89,90,91,92,93,96,104,105,106,108,113,114,116,131,133,135,136,137,139,150,151,152,154,159,161,168,172,174,176,179,],[-3,-12,-106,-14,24,-107,-13,-92,-24,-14,-69,-4,-109,-70,-17,-104,-27,-18,-32,-102,-103,-103,-90,-23,24,-101,-16,-25,-43,-47,-51,-60,-71,-72,-77,-30,-34,-35,-36,-14,-2,-5,-61,-62,-15,-104,-33,-88,24,-22,-108,-52,-31,137,-14,-11,-26,-74,-76,-89,24,-44,-48,-19,-14,-21,24,-14,24,-14,24,-20,]),'do':([4,5,6,10,14,15,20,27,28,29,30,31,33,34,38,39,40,41,42,43,44,45,48,50,51,52,55,56,59,60,61,62,63,64,65,67,69,70,71,75,78,79,89,90,91,92,93,96,104,105,106,108,113,116,131,133,135,136,137,139,147,150,151,152,154,159,161,168,172,174,176,178,179,],[-3,-12,-106,-14,25,-107,-13,-92,-24,-14,-69,-4,-109,-70,-17,-104,-27,-18,-32,-102,-103,-103,-90,-23,25,-101,-16,-25,-43,-47,-51,-60,-71,-72,-77,-30,-34,-35,-36,-14,-2,-5,-61,-62,-15,-104,-33,-88,25,-22,-108,-52,-31,-14,-11,-26,-74,-76,-89,25,159,-44,-48,-19,-14,-21,25,-14,25,-14,25,179,-20,]),'swap':([4,5,6,10,14,15,20,27,28,29,30,31,33,34,38,39,40,41,42,43,44,45,48,50,51,52,55,56,59,60,61,62,63,64,65,67,69,70,71,75,78,79,89,90,91,92,93,96,104,105,106,108,113,116,131,133,135,136,137,139,150,151,152,154,159,161,168,172,174,176,179,],[-3,-12,-106,-14,26,-107,-13,-92,-24,-14,-69,-4,-109,-70,-17,-104,-27,-18,-32,-102,-103,-103,-90,-23,26,-101,-16,-25,-43,-47,-51,-60,-71,-72,-77,-30,-34,-35,-36,-14,-2,-5,-61,-62,-15,-104,-33,-88,26,-22,-108,-52,-31,-14,-11,-26,-74,-76,-89,26,-44,-48,-19,-14,-21,26,-14,26,-14,26,-20,]),'exit':([4,5,6,10,14,15,20,27,28,29,30,31,33,34,38,39,40,41,42,43,44,45,48,50,51,52,55,56,59,60,61,62,63,64,65,67,69,70,71,75,78,79,89,90,91,92,93,96,104,105,106,108,113,116,131,133,135,136,137,139,150,151,152,154,159,161,168,172,174,176,179,],[-3,-12,-106,-14,27,-107,-13,-92,-24,-14,-69,-4,-109,-70,-17,-104,-27,-18,-32,-102,-103,-103,-90,-23,27,-101,-16,-25,-43,-47,-51,-60,-71,-72,-77,-30,-34,-35,-36,-14,-2,-5,-61,-62,-15,-104,-33,-88,27,-22,-108,-52,-31,-14,-11,-26,-74,-76,-89,27,-44,-48,-19,-14,-21,27,-14,27,-14,27,-20,]),'comment':([4,5,6,10,14,15,20,27,28,29,30,31,33,34,38,39,40,41,42,43,44,45,48,50,51,52,55,56,59,60,61,62,63,64,65,67,69,70,71,75,78,79,89,90,91,92,93,96,104,105,106,108,113,116,131,133,135,136,137,139,150,151,152,154,159,161,168,172,174,176,179,],[-3,-12,-106,-14,28,-107,-13,-92,-24,-14,-69,-4,-109,-70,-17,-104,-27,-18,-32,-102,-103,-103,-90,-23,28,-101,-16,-25,-43,-47,-51,-60,-71,-72,-77,-30,-34,-35,-36,-14,-2,-5,-61,-62,-15,-104,-33,-88,28,-22,-108,-52,-31,-14,-11,-26,-74,-76,-89,28,-44,-48,-19,-14,-21,28,-14,28,-14,28,-20,]),'openBra':([7,8,9,54,],[13,-6,-7,80,]),'doubleColon':([7,8,9,12,54,148,],[-10,-6,-7,16,-8,-9,]),'int':([13,35,37,57,73,80,83,84,85,86,87,88,97,102,103,110,111,112,119,120,121,122,123,124,125,126,127,138,142,143,144,158,169,],[17,63,63,63,63,107,-73,-45,-46,-75,-49,-50,63,63,63,63,63,63,-79,-81,-82,-63,-64,-65,-66,-67,-68,63,63,63,63,63,173,]),'closedBra':([17,32,107,132,],[-99,54,-100,148,]),'parens':([18,],[33,]),'openParen':([18,24,35,37,40,46,57,73,83,84,85,86,87,88,95,97,102,103,110,111,112,115,119,120,138,142,143,158,],[35,-85,57,57,35,73,57,97,-73,-45,-46,-75,-49,-50,-87,97,97,57,57,57,57,138,-79,-81,97,97,97,57,]),'equals':([18,21,34,47,56,74,133,],[-27,37,-70,-93,-25,103,-26,]),'elif':([20,27,28,33,34,38,39,40,41,42,43,44,45,50,55,56,59,60,61,62,63,64,65,67,69,70,71,72,89,90,91,92,93,105,108,113,133,135,136,137,150,151,152,154,159,161,168,172,179,],[-13,-92,-24,-109,-70,-17,-104,-27,-18,-32,-102,-103,-103,-23,-16,-25,-43,-47,-51,-60,-71,-72,-77,-30,-34,-35,-36,95,-61,-62,-15,-104,-33,-22,-52,-31,-26,-74,-76,-89,-44,-48,-19,-14,-21,-37,-14,-38,-20,]),'else':([20,27,28,33,34,38,39,40,41,42,43,44,45,50,55,56,59,60,61,62,63,64,65,67,69,70,71,72,89,90,91,92,93,105,108,113,133,135,136,137,150,151,152,154,159,161,168,172,179,],[-13,-92,-24,-109,-70,-17,-104,-27,-18,-32,-102,-103,-103,-23,-16,-25,-43,-47,-51,-60,-71,-72,-77,-30,-34,-35,-36,96,-61,-62,-15,-104,-33,-22,-52,-31,-26,-74,-76,-89,-44,-48,-19,-14,-21,-37,-14,-38,-20,]),'string':([23,68,],[44,44,]),'endline':([23,68,],[45,45,]),'then':([25,34,40,56,59,60,61,62,63,64,89,90,108,118,133,135,136,141,150,151,160,165,166,167,170,171,173,175,],[48,-70,-27,-25,-43,-47,-51,-60,-71,-72,-61,-62,-52,-86,-26,-74,-76,154,-44,-48,-86,-95,168,-96,174,-42,-97,-41,]),'coma':([30,31,34,38,39,40,41,42,43,44,45,49,56,58,59,60,61,62,63,64,67,69,70,71,79,82,89,90,92,93,108,113,129,133,135,136,146,150,151,165,167,],[53,-4,-70,66,-104,-27,68,-32,-102,-103,-103,76,-25,-110,-43,-47,-51,-60,-71,-72,-30,-34,-35,-36,-5,110,-61,-62,-104,-33,-52,-31,-94,-26,-74,-76,158,-44,-48,-95,169,]),'mul':([34,40,56,59,60,61,62,63,64,89,90,108,133,135,136,151,],[-70,-27,-25,87,-47,-51,-60,-71,-72,-61,-62,-52,-26,87,-76,-48,]),'div':([34,40,56,59,60,61,62,63,64,89,90,108,133,135,136,151,],[-70,-27,-25,88,-47,-51,-60,-71,-72,-61,-62,-52,-26,88,-76,-48,]),'plus':([34,40,56,58,59,60,61,62,63,64,65,81,89,90,108,129,133,134,135,136,150,151,165,],[-70,-27,-25,84,-43,-47,-51,-60,-71,-72,84,84,-61,-62,-52,84,-26,84,-74,-76,-44,-48,84,]),'minus':([34,40,56,58,59,60,61,62,63,64,65,81,89,90,108,129,133,134,135,136,150,151,165,],[-70,-27,-25,85,-43,-47,-51,-60,-71,-72,85,85,-61,-62,-52,85,-26,85,-74,-76,-44,-48,85,]),'closedParen':([34,40,56,58,59,60,61,62,63,64,81,82,89,90,98,99,100,108,109,117,128,133,134,135,136,140,145,149,150,151,153,155,156,157,162,163,164,],[-70,-27,-25,-110,-43,-47,-51,-60,-71,-72,108,-29,-61,-62,118,-53,-55,-52,133,140,-84,-26,-111,-74,-76,-58,-59,-28,-44,-48,160,-78,-80,-83,-54,-56,-57,]),'less':([34,40,56,62,63,64,89,90,101,133,],[-70,-27,-25,-60,-71,-72,-61,-62,122,-26,]),'more':([34,40,56,62,63,64,89,90,101,133,],[-70,-27,-25,-60,-71,-72,-61,-62,123,-26,]),'doubleEquals':([34,40,56,62,63,64,89,90,101,133,],[-70,-27,-25,-60,-71,-72,-61,-62,124,-26,]),'notEquals':([34,40,56,62,63,64,89,90,101,133,],[-70,-27,-25,-60,-71,-72,-61,-62,125,-26,]),'lessEquals':([34,40,56,62,63,64,89,90,101,133,],[-70,-27,-25,-60,-71,-72,-61,-62,126,-26,]),'moreEquals':([34,40,56,62,63,64,89,90,101,133,],[-70,-27,-25,-60,-71,-72,-61,-62,127,-26,]),'and':([34,40,56,62,63,64,89,90,99,100,128,133,140,145,155,156,157,162,163,164,],[-70,-27,-25,-60,-71,-72,-61,-62,120,-55,-84,-26,-58,-59,120,-80,-83,-54,-56,-57,]),'or':([34,40,56,62,63,64,89,90,98,99,100,117,128,133,140,145,153,155,156,157,162,163,164,],[-70,-27,-25,-60,-71,-72,-61,-62,119,-53,-55,119,119,-26,-58,-59,119,-78,-80,-83,-54,-56,-57,]),'rea':([35,37,57,73,83,84,85,86,87,88,97,102,103,110,111,112,119,120,121,122,123,124,125,126,127,138,142,143,144,158,],[64,64,64,64,-73,-45,-46,-75,-49,-50,64,64,64,64,64,64,-79,-81,-82,-63,-64,-65,-66,-67,-68,64,64,64,64,64,]),'not':([73,97,102,119,120,138,142,143,],[102,102,102,-79,-81,102,102,102,]),}
_lr_action = {}
for _k, _v in _lr_action_items.items():
for _x,_y in zip(_v[0],_v[1]):
if not _x in _lr_action: _lr_action[_x] = {}
_lr_action[_x][_k] = _y
del _lr_action_items
_lr_goto_items = {'programa':([0,],[1,]),'action_37':([2,],[3,]),'V':([4,],[5,]),'F':([5,],[6,]),'Tipo':([5,],[7,]),'action_38':([6,],[10,]),'Dim':([7,],[12,]),'B':([10,29,75,116,154,168,174,],[14,51,104,139,161,172,176,]),'S':([14,51,104,139,161,172,176,],[20,20,20,20,20,20,20,]),'Dimensional':([14,22,23,26,35,37,51,57,66,68,73,76,97,102,103,104,110,111,112,138,139,142,143,144,158,161,172,176,],[21,39,43,49,62,62,21,62,92,43,62,105,62,62,62,21,62,62,62,62,21,62,62,62,62,21,21,21,]),'action_39':([15,],[29,]),'Rid':([16,],[30,]),'action_30':([17,],[32,]),'DimensionsOrEmpty':([18,40,],[34,34,]),'RDimensional':([22,],[38,]),'RDimOrString':([23,],[41,]),'DimOrString':([23,68,],[42,93,]),'action_16':([24,],[46,]),'action_23':([27,],[50,]),'action_addSymbols':([30,],[52,]),'action_41':([33,],[55,]),'action_1':([34,],[56,]),'EA':([35,37,57,103,110,158,],[58,65,81,129,134,165,]),'MultDiv':([35,37,57,103,110,111,158,],[59,59,59,59,59,135,59,]),'EAParens':([35,37,57,103,110,111,112,158,],[60,60,60,60,60,60,136,60,]),'EItem':([35,37,57,73,97,102,103,110,111,112,138,142,143,144,158,],[61,61,61,101,101,101,61,61,61,61,101,101,101,157,61,]),'action_36':([39,92,],[67,113,]),'action_33':([43,],[69,]),'action_34':([44,45,],[70,71,]),'Relif':([46,],[72,]),'action_24':([47,],[74,]),'action_21':([48,],[75,]),'action_32':([52,],[78,]),'action_setDim1':([58,],[82,]),'SumOrSub':([58,65,81,129,134,165,],[83,83,83,83,83,83,]),'MDSymbols':([59,135,],[86,86,]),'action_2':([63,],[89,]),'action_2_rea':([64,],[90,]),'action_8':([65,],[91,]),'ElseOrEmpty':([72,],[94,]),'EL':([73,97,102,138,],[98,117,128,153,]),'AND':([73,97,102,138,142,],[99,99,99,99,155,]),'Equality':([73,97,102,138,142,143,],[100,100,100,100,100,156,]),'ComaEAOrEmpty':([82,],[109,]),'action_3':([83,],[111,]),'action_5':([86,],[112,]),'action_18':([95,],[115,]),'action_19':([96,],[116,]),'EQSymbols':([101,],[121,]),'action_22':([104,],[130,]),'action_40':([106,],[131,]),'action_31':([107,],[132,]),'action_17':([118,160,],[141,166,]),'action_10':([119,],[142,]),'action_12':([120,],[143,]),'action_13':([121,],[144,]),'action_15':([128,],[145,]),'action_25':([129,],[146,]),'action_setDim2':([134,],[149,]),'action_4':([135,],[150,]),'action_6':([136,],[151,]),'action_20':([137,],[152,]),'action_9':([155,],[162,]),'action_11':([156,],[163,]),'action_14':([157,],[164,]),'action_26':([165,],[167,]),'IntOrEmpty':([167,],[170,]),'action_27':([167,],[171,]),'action_28':([173,],[175,]),'action_29':([176,],[177,]),}
_lr_goto = {}
for _k, _v in _lr_goto_items.items():
for _x, _y in zip(_v[0], _v[1]):
if not _x in _lr_goto: _lr_goto[_x] = {}
_lr_goto[_x][_k] = _y
del _lr_goto_items
_lr_productions = [
("S' -> programa","S'",1,None,None,None),
('programa -> program action_37 id V F action_38 B end program','programa',9,'p_programa','fort.py',225),
('V -> V Tipo Dim doubleColon Rid action_addSymbols action_32','V',7,'p_V','fort.py',232),
('V -> <empty>','V',0,'p_V','fort.py',233),
('Rid -> id','Rid',1,'p_Rid','fort.py',239),
('Rid -> Rid coma id','Rid',3,'p_Rid','fort.py',240),
('Tipo -> integer','Tipo',1,'p_Tipo','fort.py',252),
('Tipo -> real','Tipo',1,'p_Tipo','fort.py',253),
('Dim -> openBra int action_30 closedBra','Dim',4,'p_Dim','fort.py',261),
('Dim -> openBra int action_30 closedBra openBra int action_31 closedBra','Dim',8,'p_Dim','fort.py',262),
('Dim -> <empty>','Dim',0,'p_Dim','fort.py',263),
('F -> F subroutine id action_39 B end subroutine action_40','F',8,'p_F','fort.py',269),
('F -> <empty>','F',0,'p_F','fort.py',270),
('B -> B S','B',2,'p_B','fort.py',276),
('B -> <empty>','B',0,'p_B','fort.py',277),
('S -> Dimensional equals EA action_8','S',4,'p_S','fort.py',283),
('S -> id parens action_41','S',3,'p_S','fort.py',284),
('S -> read RDimensional','S',2,'p_S','fort.py',285),
('S -> print RDimOrString','S',2,'p_S','fort.py',286),
('S -> if action_16 Relif ElseOrEmpty end if action_20','S',7,'p_S','fort.py',287),
('S -> do id action_24 equals EA action_25 coma EA action_26 IntOrEmpty then B action_29 end do','S',15,'p_S','fort.py',288),
('S -> do then action_21 B action_22 end do','S',7,'p_S','fort.py',289),
('S -> swap Dimensional coma Dimensional','S',4,'p_S','fort.py',290),
('S -> exit action_23','S',2,'p_S','fort.py',291),
('S -> comment','S',1,'p_S','fort.py',292),
('Dimensional -> id DimensionsOrEmpty action_1','Dimensional',3,'p_Dimensional','fort.py',300),
('DimensionsOrEmpty -> openParen EA action_setDim1 ComaEAOrEmpty closedParen','DimensionsOrEmpty',5,'p_DimensionsOrEmpty','fort.py',307),
('DimensionsOrEmpty -> <empty>','DimensionsOrEmpty',0,'p_DimensionsOrEmpty','fort.py',308),
('ComaEAOrEmpty -> coma EA action_setDim2','ComaEAOrEmpty',3,'p_ComaEAOrEmpty','fort.py',314),
('ComaEAOrEmpty -> <empty>','ComaEAOrEmpty',0,'p_ComaEAOrEmpty','fort.py',315),
('RDimensional -> Dimensional action_36','RDimensional',2,'p_RDimensional','fort.py',321),
('RDimensional -> RDimensional coma Dimensional action_36','RDimensional',4,'p_RDimensional','fort.py',322),
('RDimOrString -> DimOrString','RDimOrString',1,'p_RDimOrString','fort.py',328),
('RDimOrString -> RDimOrString coma DimOrString','RDimOrString',3,'p_RDimOrString','fort.py',329),
('DimOrString -> Dimensional action_33','DimOrString',2,'p_DimOrString','fort.py',335),
('DimOrString -> string action_34','DimOrString',2,'p_DimOrString','fort.py',336),
('DimOrString -> endline action_34','DimOrString',2,'p_DimOrString','fort.py',337),
('Relif -> openParen EL closedParen action_17 then B','Relif',6,'p_Relif','fort.py',343),
('Relif -> Relif elif action_18 openParen EL closedParen action_17 then B','Relif',9,'p_Relif','fort.py',344),
('ElseOrEmpty -> else action_19 B','ElseOrEmpty',3,'p_ElseOrEmpty','fort.py',350),
('ElseOrEmpty -> <empty>','ElseOrEmpty',0,'p_ElseOrEmpty','fort.py',351),
('IntOrEmpty -> coma int action_28','IntOrEmpty',3,'p_IntOrEmpty','fort.py',357),
('IntOrEmpty -> action_27','IntOrEmpty',1,'p_IntOrEmpty','fort.py',358),
('EA -> MultDiv','EA',1,'p_EA','fort.py',364),
('EA -> EA SumOrSub action_3 MultDiv action_4','EA',5,'p_EA','fort.py',365),
('SumOrSub -> plus','SumOrSub',1,'p_SumOrSub','fort.py',371),
('SumOrSub -> minus','SumOrSub',1,'p_SumOrSub','fort.py',372),
('MultDiv -> EAParens','MultDiv',1,'p_MultDiv','fort.py',379),
('MultDiv -> MultDiv MDSymbols action_5 EAParens action_6','MultDiv',5,'p_MultDiv','fort.py',380),
('MDSymbols -> mul','MDSymbols',1,'p_MDSymbols','fort.py',386),
('MDSymbols -> div','MDSymbols',1,'p_MDSymbols','fort.py',387),
('EAParens -> EItem','EAParens',1,'p_EAParens','fort.py',394),
('EAParens -> openParen EA closedParen','EAParens',3,'p_EAParens','fort.py',395),
('EL -> AND','EL',1,'p_EL','fort.py',401),
('EL -> EL or action_10 AND action_9','EL',5,'p_EL','fort.py',402),
('AND -> Equality','AND',1,'p_AND','fort.py',408),
('AND -> AND and action_12 Equality action_11','AND',5,'p_AND','fort.py',409),
('Equality -> EItem EQSymbols action_13 EItem action_14','Equality',5,'p_Equality','fort.py',415),
('Equality -> openParen EL closedParen','Equality',3,'p_Equality','fort.py',416),
('Equality -> not EL action_15','Equality',3,'p_Equality','fort.py',417),
('EItem -> Dimensional','EItem',1,'p_EItem','fort.py',423),
('EItem -> int action_2','EItem',2,'p_EItem','fort.py',424),
('EItem -> rea action_2_rea','EItem',2,'p_EItem','fort.py',425),
('EQSymbols -> less','EQSymbols',1,'p_EQSymbols','fort.py',431),
('EQSymbols -> more','EQSymbols',1,'p_EQSymbols','fort.py',432),
('EQSymbols -> doubleEquals','EQSymbols',1,'p_EQSymbols','fort.py',433),
('EQSymbols -> notEquals','EQSymbols',1,'p_EQSymbols','fort.py',434),
('EQSymbols -> lessEquals','EQSymbols',1,'p_EQSymbols','fort.py',435),
('EQSymbols -> moreEquals','EQSymbols',1,'p_EQSymbols','fort.py',436),
('action_addSymbols -> <empty>','action_addSymbols',0,'p_action_addSymbols','fort.py',446),
('action_1 -> <empty>','action_1',0,'p_action_1','fort.py',452),
('action_2 -> <empty>','action_2',0,'p_action_2','fort.py',500),
('action_2_rea -> <empty>','action_2_rea',0,'p_action_2_rea','fort.py',506),
('action_3 -> <empty>','action_3',0,'p_action_3','fort.py',512),
('action_4 -> <empty>','action_4',0,'p_action_4','fort.py',517),
('action_5 -> <empty>','action_5',0,'p_action_5','fort.py',540),
('action_6 -> <empty>','action_6',0,'p_action_6','fort.py',545),
('action_8 -> <empty>','action_8',0,'p_action_8','fort.py',568),
('action_9 -> <empty>','action_9',0,'p_action_9','fort.py',588),
('action_10 -> <empty>','action_10',0,'p_action_10','fort.py',611),
('action_11 -> <empty>','action_11',0,'p_action_11','fort.py',616),
('action_12 -> <empty>','action_12',0,'p_action_12','fort.py',639),
('action_13 -> <empty>','action_13',0,'p_action_13','fort.py',644),
('action_14 -> <empty>','action_14',0,'p_action_14','fort.py',649),
('action_15 -> <empty>','action_15',0,'p_action_15','fort.py',672),
('action_16 -> <empty>','action_16',0,'p_action_16','fort.py',687),
('action_17 -> <empty>','action_17',0,'p_action_17','fort.py',692),
('action_18 -> <empty>','action_18',0,'p_action_18','fort.py',708),
('action_19 -> <empty>','action_19',0,'p_action_19','fort.py',718),
('action_20 -> <empty>','action_20',0,'p_action_20','fort.py',728),
('action_21 -> <empty>','action_21',0,'p_action_21','fort.py',736),
('action_22 -> <empty>','action_22',0,'p_action_22','fort.py',742),
('action_23 -> <empty>','action_23',0,'p_action_23','fort.py',755),
('action_24 -> <empty>','action_24',0,'p_action_24','fort.py',764),
('action_25 -> <empty>','action_25',0,'p_action_25','fort.py',778),
('action_26 -> <empty>','action_26',0,'p_action_26','fort.py',796),
('action_27 -> <empty>','action_27',0,'p_action_27','fort.py',820),
('action_28 -> <empty>','action_28',0,'p_action_28','fort.py',826),
('action_29 -> <empty>','action_29',0,'p_action_29','fort.py',832),
('action_30 -> <empty>','action_30',0,'p_action_30','fort.py',856),
('action_31 -> <empty>','action_31',0,'p_action_31','fort.py',864),
('action_32 -> <empty>','action_32',0,'p_action_32','fort.py',872),
('action_33 -> <empty>','action_33',0,'p_action_33','fort.py',882),
('action_34 -> <empty>','action_34',0,'p_action_34','fort.py',894),
('action_36 -> <empty>','action_36',0,'p_action_36','fort.py',901),
('action_37 -> <empty>','action_37',0,'p_action_37','fort.py',910),
('action_38 -> <empty>','action_38',0,'p_action_38','fort.py',917),
('action_39 -> <empty>','action_39',0,'p_action_39','fort.py',923),
('action_40 -> <empty>','action_40',0,'p_action_40','fort.py',930),
('action_41 -> <empty>','action_41',0,'p_action_41','fort.py',937),
('action_setDim1 -> <empty>','action_setDim1',0,'p_action_setDim1','fort.py',949),
('action_setDim2 -> <empty>','action_setDim2',0,'p_action_setDim2','fort.py',960),
]
| 170.211268
| 9,580
| 0.614026
| 4,854
| 24,170
| 2.956531
| 0.081376
| 0.046408
| 0.02397
| 0.010034
| 0.478294
| 0.428472
| 0.367291
| 0.331684
| 0.300815
| 0.28012
| 0
| 0.319828
| 0.073769
| 24,170
| 141
| 9,581
| 171.41844
| 0.321213
| 0.003475
| 0
| 0.015267
| 1
| 0.007634
| 0.406295
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.022901
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
eb5d1c4e48290ae85e7ea8f4a1ea606af11a6865
| 30
|
py
|
Python
|
model/__init__.py
|
nachiket273/pytorch_resnet_rs
|
5b400951e822bd21667142e4bc2dde2fb3167532
|
[
"MIT"
] | 13
|
2021-09-22T10:53:36.000Z
|
2022-03-31T12:15:52.000Z
|
model/__init__.py
|
nachiket273/pytorch_resnet_rs
|
5b400951e822bd21667142e4bc2dde2fb3167532
|
[
"MIT"
] | 1
|
2022-02-11T17:09:24.000Z
|
2022-02-12T03:31:44.000Z
|
model/__init__.py
|
nachiket273/pytorch_resnet_rs
|
5b400951e822bd21667142e4bc2dde2fb3167532
|
[
"MIT"
] | 2
|
2021-12-08T09:08:40.000Z
|
2021-12-19T19:55:54.000Z
|
from .resnetrs import ResnetRS
| 30
| 30
| 0.866667
| 4
| 30
| 6.5
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1
| 30
| 1
| 30
| 30
| 0.962963
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
eb9286ec487e4910e2e2fda2127a05ef68cb1464
| 61
|
py
|
Python
|
src/sunstruck/api/helpers/__init__.py
|
la-mar/sunstruck-api
|
90074a55d3b243f7f0eee6e897a98699d2cebc43
|
[
"MIT"
] | 3
|
2021-04-04T07:48:48.000Z
|
2022-02-19T17:42:12.000Z
|
src/sunstruck/api/helpers/__init__.py
|
la-mar/sunstruck-api
|
90074a55d3b243f7f0eee6e897a98699d2cebc43
|
[
"MIT"
] | null | null | null |
src/sunstruck/api/helpers/__init__.py
|
la-mar/sunstruck-api
|
90074a55d3b243f7f0eee6e897a98699d2cebc43
|
[
"MIT"
] | null | null | null |
# flake8: noqa
from api.helpers.pagination import Pagination
| 20.333333
| 45
| 0.819672
| 8
| 61
| 6.25
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.018519
| 0.114754
| 61
| 2
| 46
| 30.5
| 0.907407
| 0.196721
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
eba073e87f64e006d75d9a5f0e6856c9158d24cc
| 41
|
py
|
Python
|
src/pygs/__init__.py
|
psiergiejuk/Pygs
|
2539ac30cd91284359ec60fe7ecc67f643ab5ad4
|
[
"MIT"
] | null | null | null |
src/pygs/__init__.py
|
psiergiejuk/Pygs
|
2539ac30cd91284359ec60fe7ecc67f643ab5ad4
|
[
"MIT"
] | null | null | null |
src/pygs/__init__.py
|
psiergiejuk/Pygs
|
2539ac30cd91284359ec60fe7ecc67f643ab5ad4
|
[
"MIT"
] | null | null | null |
"""Main package of Python Game System"""
| 20.5
| 40
| 0.707317
| 6
| 41
| 4.833333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.146341
| 41
| 1
| 41
| 41
| 0.828571
| 0.829268
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
eba4e301cbf977efbdd9bc608afec2a4a9465cea
| 227
|
py
|
Python
|
PersonalBlog/article/urls.py
|
VagetalbleDog/Django-Vue-Personal-Blog
|
a3174fe66204647811c5ff88e0debd42e7442929
|
[
"MIT"
] | null | null | null |
PersonalBlog/article/urls.py
|
VagetalbleDog/Django-Vue-Personal-Blog
|
a3174fe66204647811c5ff88e0debd42e7442929
|
[
"MIT"
] | null | null | null |
PersonalBlog/article/urls.py
|
VagetalbleDog/Django-Vue-Personal-Blog
|
a3174fe66204647811c5ff88e0debd42e7442929
|
[
"MIT"
] | null | null | null |
# from django.urls import path
# from article import views
#
# urlpatterns = [
# path('<int:pk>/', views.ArticleDetail.as_view(), name='article_detail'),
# path('', views.ArticleList.as_view(), name='article_list')
# ]
| 28.375
| 78
| 0.669604
| 28
| 227
| 5.285714
| 0.607143
| 0.081081
| 0.135135
| 0.22973
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.145374
| 227
| 7
| 79
| 32.428571
| 0.762887
| 0.933921
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
cce061ea2c5430e019e81f9346c37c122ae66032
| 222
|
py
|
Python
|
UNIOA/algs/__init__.py
|
Huilin-Li/UNIOA
|
0f2527eac955a7193406775e5b71fab35f064422
|
[
"MIT"
] | null | null | null |
UNIOA/algs/__init__.py
|
Huilin-Li/UNIOA
|
0f2527eac955a7193406775e5b71fab35f064422
|
[
"MIT"
] | null | null | null |
UNIOA/algs/__init__.py
|
Huilin-Li/UNIOA
|
0f2527eac955a7193406775e5b71fab35f064422
|
[
"MIT"
] | null | null | null |
from .unioaMFO import MFO_UNIOA
from .unioaPSO import PSO_UNIOA
from .unioaMBO import MBO_UNIOA
from .unioaGOA import GOA_UNIOA
from .unioaBA import BA_UNIOA
from .unioaCSA import CSA_UNIOA
from .unioaBOA import BOA_UNIOA
| 27.75
| 31
| 0.842342
| 35
| 222
| 5.142857
| 0.485714
| 0.3
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.126126
| 222
| 7
| 32
| 31.714286
| 0.927835
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
ccfc9c0564f89887e9d5280bb43fbbae30f16559
| 63
|
py
|
Python
|
trainingFB/__init__.py
|
nathanbangwa243/FacialBeauty-AI
|
550cc133fad2f4c9e522144de61ee0ece9b07bf2
|
[
"MIT"
] | null | null | null |
trainingFB/__init__.py
|
nathanbangwa243/FacialBeauty-AI
|
550cc133fad2f4c9e522144de61ee0ece9b07bf2
|
[
"MIT"
] | null | null | null |
trainingFB/__init__.py
|
nathanbangwa243/FacialBeauty-AI
|
550cc133fad2f4c9e522144de61ee0ece9b07bf2
|
[
"MIT"
] | null | null | null |
from . import loadData
from . import config
from . import train
| 21
| 22
| 0.777778
| 9
| 63
| 5.444444
| 0.555556
| 0.612245
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.174603
| 63
| 3
| 23
| 21
| 0.942308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
690c9806ae0567e425766a94985d1ad2e37c39d7
| 236
|
py
|
Python
|
tomorrow_pdf_converter/t_parser/statement.py
|
sebwarnke/tomorrow-bank-statement-converter
|
693b41e089a8479a32391d11ae0a0e536d6ca0ae
|
[
"MIT"
] | null | null | null |
tomorrow_pdf_converter/t_parser/statement.py
|
sebwarnke/tomorrow-bank-statement-converter
|
693b41e089a8479a32391d11ae0a0e536d6ca0ae
|
[
"MIT"
] | null | null | null |
tomorrow_pdf_converter/t_parser/statement.py
|
sebwarnke/tomorrow-bank-statement-converter
|
693b41e089a8479a32391d11ae0a0e536d6ca0ae
|
[
"MIT"
] | null | null | null |
class Statement:
transactions = []
def append_transaction(self, transaction):
self.transactions.append(transaction)
def print(self):
for transaction in self.transactions:
print(str(transaction))
| 26.222222
| 46
| 0.669492
| 23
| 236
| 6.826087
| 0.478261
| 0.216561
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.241525
| 236
| 9
| 47
| 26.222222
| 0.877095
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0
| 0
| 0
| 0.571429
| 0.285714
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
69152ec1d122288a7267ec1dc9c0c20cae7489ac
| 77
|
py
|
Python
|
suggestion/__init__.py
|
jlowe77/Eris-Cogs
|
2ade8f82db3477527af3cff3b48ebb281e1a6987
|
[
"Apache-2.0"
] | 6
|
2020-05-13T20:43:53.000Z
|
2021-06-23T16:10:13.000Z
|
suggestion/__init__.py
|
jlowe77/Eris-Cogs
|
2ade8f82db3477527af3cff3b48ebb281e1a6987
|
[
"Apache-2.0"
] | 12
|
2019-04-02T13:29:10.000Z
|
2020-03-27T18:07:16.000Z
|
suggestion/__init__.py
|
jlowe77/Eris-Cogs
|
2ade8f82db3477527af3cff3b48ebb281e1a6987
|
[
"Apache-2.0"
] | 9
|
2020-06-07T21:46:54.000Z
|
2022-03-01T22:49:02.000Z
|
from .suggest import Suggest
def setup(bot):
bot.add_cog(Suggest(bot))
| 12.833333
| 29
| 0.714286
| 12
| 77
| 4.5
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.168831
| 77
| 5
| 30
| 15.4
| 0.84375
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
691688b08e20142feb6c7d2dbcb16f835fde4002
| 69
|
py
|
Python
|
neural_style/__init__.py
|
JCBrouwer/maua
|
4208023020bc56dd81f6933347f9c4e7c1853318
|
[
"BSD-2-Clause"
] | 9
|
2019-03-07T18:26:12.000Z
|
2022-03-12T20:57:03.000Z
|
neural_style/__init__.py
|
JCBrouwer/maua
|
4208023020bc56dd81f6933347f9c4e7c1853318
|
[
"BSD-2-Clause"
] | null | null | null |
neural_style/__init__.py
|
JCBrouwer/maua
|
4208023020bc56dd81f6933347f9c4e7c1853318
|
[
"BSD-2-Clause"
] | 3
|
2020-09-06T18:53:55.000Z
|
2021-01-07T01:24:37.000Z
|
from .multiscale import MultiscaleStyle
from .base import NeuralStyle
| 34.5
| 39
| 0.869565
| 8
| 69
| 7.5
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.101449
| 69
| 2
| 40
| 34.5
| 0.967742
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
696bc35790041e7bf623739da1ce0c563cb677f1
| 55
|
py
|
Python
|
easymd/core/evaluation/__init__.py
|
zhiqi-li/Panoptic-SegFormer
|
cdb9b68059e9ef825a3f7079c37aa835b1711227
|
[
"Apache-2.0"
] | 97
|
2021-11-20T17:09:24.000Z
|
2022-03-31T03:03:38.000Z
|
easymd/core/evaluation/__init__.py
|
zhiqi-li/Panoptic-SegFormer
|
cdb9b68059e9ef825a3f7079c37aa835b1711227
|
[
"Apache-2.0"
] | 3
|
2021-12-04T10:01:04.000Z
|
2022-02-25T06:18:57.000Z
|
easymd/core/evaluation/__init__.py
|
zhiqi-li/Panoptic-SegFormer
|
cdb9b68059e9ef825a3f7079c37aa835b1711227
|
[
"Apache-2.0"
] | 9
|
2021-12-03T08:39:04.000Z
|
2022-03-27T14:09:04.000Z
|
from .eval_hooks import EvalHook_plus,DistEvalHook_plus
| 55
| 55
| 0.909091
| 8
| 55
| 5.875
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.054545
| 55
| 1
| 55
| 55
| 0.903846
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
6972a2d05e3a504091d7d7cd5f239cb70c46d70e
| 5,496
|
py
|
Python
|
estracao-informacao-imagens/deteccaoDaDoenca.py
|
wemerson-henrique/machine-learning
|
cc88d55477eb56a07f4acc7b7f79f9504be54169
|
[
"MIT"
] | null | null | null |
estracao-informacao-imagens/deteccaoDaDoenca.py
|
wemerson-henrique/machine-learning
|
cc88d55477eb56a07f4acc7b7f79f9504be54169
|
[
"MIT"
] | null | null | null |
estracao-informacao-imagens/deteccaoDaDoenca.py
|
wemerson-henrique/machine-learning
|
cc88d55477eb56a07f4acc7b7f79f9504be54169
|
[
"MIT"
] | null | null | null |
import numpy as np
import cv2
import matplotlib.pyplot as plt
#original_image = cv2.imread("img/entrada/folha-de-mamao-sem-fundo.jpg")
'''original_image = cv2.imread("img/imagensDeTesteSaida/banana-brg/imagem1.jpg")
original_image = cv2.imread("img/imagensDeTesteSaida/banana-brg/imagem2.jpg")
original_image = cv2.imread("img/imagensDeTesteSaida/banana-brg/imagem4.jpg")
original_image = cv2.imread("img/imagensDeTesteSaida/banana-brg/imagem22.jpg")
original_image = cv2.imread("img/entrada/sigatoka.jpg")#k=4, 200 valor para doença em claro
original_image = cv2.imread("img/entrada/sigatoka5.jpg")#k=8, 160 valor para doença em escuro
original_image = cv2.imread("img/entrada/sigatoka6.jpg")#k=8, 132 valor para doença em escuro'''
original_image = cv2.imread("img/entrada/sigatoka7.1.jpg")#k=13, acima de 160 para claro e abaixo de 80 para escuro/// resulado mais enteressante
'''#-----------------------Imagem YCrCb -------------------------------------
image_YCrCb = cv2.cvtColor(original_image, cv2.COLOR_YCrCb2BGR)
cv2.imshow("Imagem Original",image_YCrCb)
gray = cv2.cvtColor(image_YCrCb, cv2.COLOR_BGR2GRAY)
cv2.imshow("preto e branco",gray)
#Função calcHist para calcular o hisograma da imagem
h = cv2.calcHist([gray], [0], None, [256], [0, 256])
plt.figure()
plt.title("Histograma P&B")
plt.xlabel("Intensidade")
plt.ylabel("Qtde de Pixels")
plt.plot(h)
plt.xlim([0, 256])
plt.show()
ret3, otsu1 = cv2.threshold (gray, 0,255, cv2.THRESH_BINARY + cv2.THRESH_OTSU)
cv2.imshow("binarização",otsu1)
image = original_image
mask = np.zeros(image.shape[:2], dtype="uint8")
cv2.rectangle(mask, (0, 90), (290, 450), 255, -1)
masked = cv2.bitwise_and(image, image, mask=otsu1)
cv2.imshow("masked",masked)
ret3, otsu1YCrCb = cv2.threshold (gray, 80,255, cv2.THRESH_BINARY + cv2.THRESH_BINARY)
cv2.imshow("binarização com THRESH_BINARY",otsu1)
image = original_image
mask = np.zeros(image.shape[:2], dtype="uint8")
cv2.rectangle(mask, (0, 90), (290, 450), 255, -1)
masked1 = cv2.bitwise_and(image, image, mask=otsu1YCrCb)
cv2.imshow("masked com THRESH_BINARY",masked1)
#-----------------------Fim Imagem YCrCb -------------------------------------'''
'''#-----------------------Imagem YCrCb com kmeans-------------------------------------
image_YCrCb = cv2.cvtColor(original_image, cv2.COLOR_YCrCb2BGR)
imagem = image_YCrCb
cv2.imshow("Imagem Original",image_YCrCb)
Z = np.float32(imagem.reshape((-1, 3)))
criteria = (cv2.TERM_CRITERIA_EPS + cv2.TERM_CRITERIA_MAX_ITER, 10, 1.0)
k = 6
ret, label, center = cv2.kmeans(Z, k, None, criteria, 10, cv2.KMEANS_RANDOM_CENTERS)
center = np.uint8(center)
res = center[label.flatten()]
res1YCrCb = res.reshape((imagem.shape))
cv2.imshow("Aplicacao do kmeansBRG",res1YCrCb)
gray = cv2.cvtColor(res1YCrCb, cv2.COLOR_BGR2GRAY)
cv2.imshow("preto e branco",gray)
#Função calcHist para calcular o hisograma da imagem
h = cv2.calcHist([gray], [0], None, [256], [0, 256])
plt.figure()
plt.title("Histograma P&B")
plt.xlabel("Intensidade")
plt.ylabel("Qtde de Pixels")
plt.plot(h)
plt.xlim([0, 256])
plt.show()
ret3, otsu1 = cv2.threshold (gray, 0,255, cv2.THRESH_BINARY + cv2.THRESH_OTSU)
cv2.imshow("binarização",otsu1)
image = original_image
mask = np.zeros(image.shape[:2], dtype="uint8")
cv2.rectangle(mask, (0, 90), (290, 450), 255, -1)
masked = cv2.bitwise_and(image, image, mask=otsu1)
cv2.imshow("masked",masked)
ret3, otsu1YCrCb = cv2.threshold (gray, 45,255, cv2.THRESH_BINARY + cv2.THRESH_BINARY)
cv2.imshow("binarização com THRESH_BINARY",otsu1YCrCb)
image = original_image
mask = np.zeros(image.shape[:2], dtype="uint8")
cv2.rectangle(mask, (0, 90), (290, 450), 255, -1)
masked1 = cv2.bitwise_and(image, image, mask=otsu1YCrCb)
cv2.imshow("masked com THRESH_BINARY",masked1)
#-----------------------Fim Imagem YCrCb com kmeans-------------------------------------'''
#-----------------------Imagem BRG -------------------------------------
imagem = original_image
Z = np.float32(imagem.reshape((-1, 3)))
criteria = (cv2.TERM_CRITERIA_EPS + cv2.TERM_CRITERIA_MAX_ITER, 10, 1.0)
k = 13
ret, label, center = cv2.kmeans(Z, k, None, criteria, 10, cv2.KMEANS_RANDOM_CENTERS)
center = np.uint8(center)
res = center[label.flatten()]
res2BRG = res.reshape((imagem.shape))
cv2.imshow("Aplicacao do kmeansBRG",res2BRG)
grayBRG = cv2.cvtColor(res2BRG, cv2.COLOR_BGR2GRAY)
cv2.imshow("Preto e branco",grayBRG)
#Função calcHist para calcular o hisograma da imagem
h = cv2.calcHist([grayBRG], [0], None, [256], [0, 256])
plt.figure()
plt.title("Histograma P&B")
plt.xlabel("Intensidade")
plt.ylabel("Qtde de Pixels")
plt.plot(h)
plt.xlim([0, 256])
plt.show()
ret3, otsu1BRG = cv2.threshold (grayBRG, 160,255, cv2.THRESH_BINARY + cv2.THRESH_BINARY)
cv2.imshow("binarizacao doente",otsu1BRG)
image = original_image
mask = np.zeros(image.shape[:2], dtype="uint8")
cv2.rectangle(mask, (0, 90), (290, 450), 255, -1)
maskedBRG = cv2.bitwise_and(image, image, mask=otsu1BRG)
cv2.imshow("masked brg doente",maskedBRG)
ret3, otsu2BRG = cv2.threshold (grayBRG, 80,255, cv2.THRESH_BINARY + cv2.THRESH_BINARY_INV)
cv2.imshow("binarizacao saldavel",otsu2BRG)
image = original_image
mask = np.zeros(image.shape[:2], dtype="uint8")
cv2.rectangle(mask, (0, 90), (290, 450), 255, -1)
maskedBRG = cv2.bitwise_and(image, image, mask=otsu2BRG)
cv2.imshow("masked brg saldavel",maskedBRG)
#-----------------------Fim Imagem BRG -------------------------------------
cv2.imshow("original_image",original_image)
#cv2.imshow("image_YCrCb",image_YCrCb)
cv2.waitKey(0)
| 38.704225
| 145
| 0.694505
| 792
| 5,496
| 4.731061
| 0.180556
| 0.076328
| 0.051241
| 0.052842
| 0.795303
| 0.795303
| 0.751268
| 0.751268
| 0.731519
| 0.606619
| 0
| 0.066319
| 0.091885
| 5,496
| 142
| 146
| 38.704225
| 0.684432
| 0.071143
| 0
| 0.153846
| 0
| 0
| 0.127959
| 0.017274
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.076923
| 0
| 0.076923
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
15f48f95898c78bcfa643c682798c0cb576b93aa
| 407
|
py
|
Python
|
src/olympia/users/tests/test_backends.py
|
jpetto/olympia
|
f4e9badac9634657068dfbd4733ab5d17798e3f6
|
[
"BSD-3-Clause"
] | null | null | null |
src/olympia/users/tests/test_backends.py
|
jpetto/olympia
|
f4e9badac9634657068dfbd4733ab5d17798e3f6
|
[
"BSD-3-Clause"
] | null | null | null |
src/olympia/users/tests/test_backends.py
|
jpetto/olympia
|
f4e9badac9634657068dfbd4733ab5d17798e3f6
|
[
"BSD-3-Clause"
] | null | null | null |
from django.contrib.auth import authenticate
from olympia.amo.tests import TestCase
class TestAmoUserBackend(TestCase):
fixtures = ['users/test_backends']
def test_success(self):
assert authenticate(username='jbalogh@mozilla.com',
password='password')
def test_failure(self):
assert not authenticate(username='jbalogh@mozilla.com', password='x')
| 27.133333
| 77
| 0.690418
| 44
| 407
| 6.318182
| 0.636364
| 0.05036
| 0.194245
| 0.244604
| 0.323741
| 0.323741
| 0
| 0
| 0
| 0
| 0
| 0
| 0.208845
| 407
| 14
| 78
| 29.071429
| 0.863354
| 0
| 0
| 0
| 0
| 0
| 0.162162
| 0
| 0
| 0
| 0
| 0
| 0.222222
| 1
| 0.222222
| false
| 0.222222
| 0.222222
| 0
| 0.666667
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 5
|
15f4a2d7260ae482993d0434cea2ffac3eb14d24
| 66
|
py
|
Python
|
dgg_chat/overrustle_logs/__init__.py
|
gabrieljablonski/dgg-chat
|
eca3ef22a0952e9fb1d54b9900d5eaec59f85940
|
[
"MIT"
] | null | null | null |
dgg_chat/overrustle_logs/__init__.py
|
gabrieljablonski/dgg-chat
|
eca3ef22a0952e9fb1d54b9900d5eaec59f85940
|
[
"MIT"
] | null | null | null |
dgg_chat/overrustle_logs/__init__.py
|
gabrieljablonski/dgg-chat
|
eca3ef22a0952e9fb1d54b9900d5eaec59f85940
|
[
"MIT"
] | null | null | null |
from ._logs import DGGLogs
from ._chat_message import ChatMessage
| 22
| 38
| 0.848485
| 9
| 66
| 5.888889
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.121212
| 66
| 2
| 39
| 33
| 0.913793
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
c601828c7b10c5ed62abda7710bc47dd04cad95f
| 78
|
py
|
Python
|
editfrontmatter/__init__.py
|
karlredman/EditFrontMatter.py
|
73dd6e84f9b9740774ca00c0f02897410d3a320b
|
[
"MIT"
] | 3
|
2019-10-27T19:11:26.000Z
|
2021-09-25T04:16:41.000Z
|
editfrontmatter/__init__.py
|
karlredman/EditFrontMatter.py
|
73dd6e84f9b9740774ca00c0f02897410d3a320b
|
[
"MIT"
] | null | null | null |
editfrontmatter/__init__.py
|
karlredman/EditFrontMatter.py
|
73dd6e84f9b9740774ca00c0f02897410d3a320b
|
[
"MIT"
] | 1
|
2021-04-28T05:03:15.000Z
|
2021-04-28T05:03:15.000Z
|
from .EditFrontMatter import EditFrontMatter,EditFrontMatter_Exception # noqa
| 39
| 77
| 0.884615
| 7
| 78
| 9.714286
| 0.714286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.076923
| 78
| 1
| 78
| 78
| 0.944444
| 0.051282
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
c62522661a9925a249f56481b6ebbedabfe37b13
| 219
|
py
|
Python
|
adonai/project/permission.py
|
Egnod/adonai
|
b365d81c826fd7b626c9145154ee0136ea73fac1
|
[
"MIT"
] | 6
|
2020-01-20T20:02:09.000Z
|
2020-02-24T08:40:23.000Z
|
adonai/project/permission.py
|
Egnod/adonai
|
b365d81c826fd7b626c9145154ee0136ea73fac1
|
[
"MIT"
] | null | null | null |
adonai/project/permission.py
|
Egnod/adonai
|
b365d81c826fd7b626c9145154ee0136ea73fac1
|
[
"MIT"
] | null | null | null |
from ..permission.internal.defaults import CRUDPermissions
from ..permission.internal.permission_set import InternalPermissionSet
class ProjectPermissions(InternalPermissionSet, CRUDPermissions):
name = "project"
| 31.285714
| 70
| 0.840183
| 19
| 219
| 9.631579
| 0.631579
| 0.153005
| 0.240437
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.091324
| 219
| 6
| 71
| 36.5
| 0.919598
| 0
| 0
| 0
| 0
| 0
| 0.031963
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
d6bd9f6cf06a48ed7405eea95a13aac12ef71b37
| 69
|
py
|
Python
|
sparsePlane/sparseplane/data/datasets/__init__.py
|
jinlinyi/SparsePlanes
|
fb063dc48f4e2e1a03dd47702275e1b8a4f5c223
|
[
"MIT"
] | 69
|
2021-03-26T17:56:47.000Z
|
2022-03-24T21:51:21.000Z
|
sparsePlane/sparseplane/data/datasets/__init__.py
|
jinlinyi/SparsePlanes
|
fb063dc48f4e2e1a03dd47702275e1b8a4f5c223
|
[
"MIT"
] | 7
|
2021-08-13T08:50:33.000Z
|
2022-03-13T15:27:01.000Z
|
sparsePlane/sparseplane/data/datasets/__init__.py
|
jinlinyi/SparsePlanes
|
fb063dc48f4e2e1a03dd47702275e1b8a4f5c223
|
[
"MIT"
] | 7
|
2021-03-29T07:56:52.000Z
|
2021-09-19T16:27:22.000Z
|
from .mp3d import load_mp3d_json # isort:skip
from . import builtin
| 23
| 46
| 0.782609
| 11
| 69
| 4.727273
| 0.727273
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.034483
| 0.15942
| 69
| 2
| 47
| 34.5
| 0.862069
| 0.144928
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
d6cd59180563767673de0c2a7b2ac73a89e7acac
| 60
|
py
|
Python
|
kw3pan/pancakeswap/factory/wbnb/__init__.py
|
kkristof200/py_web3_pancakeswap
|
ae9dc7021b7da2365ce675f29f89e103fe44d77f
|
[
"MIT"
] | 6
|
2021-05-09T12:43:37.000Z
|
2021-12-07T01:56:02.000Z
|
kw3pan/pancakeswap/factory/wbnb/__init__.py
|
kkristof200/py_web3_pancakeswap
|
ae9dc7021b7da2365ce675f29f89e103fe44d77f
|
[
"MIT"
] | null | null | null |
kw3pan/pancakeswap/factory/wbnb/__init__.py
|
kkristof200/py_web3_pancakeswap
|
ae9dc7021b7da2365ce675f29f89e103fe44d77f
|
[
"MIT"
] | null | null | null |
from .pancakeswap_wbnb_factory import PancakeswapWbnbFactory
| 60
| 60
| 0.933333
| 6
| 60
| 9
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.05
| 60
| 1
| 60
| 60
| 0.947368
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
d6faa077ca417fcf603b265edd7379d255c22b7b
| 299
|
py
|
Python
|
tests/resources/user_role/test_user_role.py
|
gitter-badger/charybdis
|
1505258db0a43c5cb6e64e0513c74c6651df92fd
|
[
"MIT"
] | null | null | null |
tests/resources/user_role/test_user_role.py
|
gitter-badger/charybdis
|
1505258db0a43c5cb6e64e0513c74c6651df92fd
|
[
"MIT"
] | null | null | null |
tests/resources/user_role/test_user_role.py
|
gitter-badger/charybdis
|
1505258db0a43c5cb6e64e0513c74c6651df92fd
|
[
"MIT"
] | 1
|
2019-10-10T23:46:33.000Z
|
2019-10-10T23:46:33.000Z
|
def test_role_check(test_role):
test_role = test_role.refresh()
assert test_role.id
assert test_role.slug == "test"
def test_role_update(test_role):
assert test_role.slug == "test"
test_role.slug = "test1"
test_role.save()
assert test_role.refresh().slug == "test1"
| 19.933333
| 46
| 0.685619
| 44
| 299
| 4.340909
| 0.25
| 0.502618
| 0.293194
| 0.167539
| 0.230366
| 0
| 0
| 0
| 0
| 0
| 0
| 0.008299
| 0.19398
| 299
| 14
| 47
| 21.357143
| 0.784232
| 0
| 0
| 0.222222
| 0
| 0
| 0.060201
| 0
| 0
| 0
| 0
| 0
| 0.444444
| 1
| 0.222222
| false
| 0
| 0
| 0
| 0.222222
| 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
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
ba3f652710200a95b0ad351fbe268e500214853d
| 129
|
py
|
Python
|
LeetCode/Easy/Python/Reverse Integer.py
|
KHJcode/Algorithm-study
|
fa08d3c752fcb3557fd45fb394157926afc0de4a
|
[
"MIT"
] | 2
|
2020-05-23T01:55:38.000Z
|
2020-07-07T15:59:00.000Z
|
LeetCode/Easy/Python/Reverse Integer.py
|
KHJcode/Algorithm-study
|
fa08d3c752fcb3557fd45fb394157926afc0de4a
|
[
"MIT"
] | null | null | null |
LeetCode/Easy/Python/Reverse Integer.py
|
KHJcode/Algorithm-study
|
fa08d3c752fcb3557fd45fb394157926afc0de4a
|
[
"MIT"
] | null | null | null |
def reverse(self, x):
_x = int(str(x)[::-1] if 0 <= x else '-' + str(x)[1:][::-1])
return _x if -2**31 < _x < 2**31-1 else 0
| 32.25
| 62
| 0.488372
| 28
| 129
| 2.142857
| 0.464286
| 0.133333
| 0.166667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.118812
| 0.217054
| 129
| 3
| 63
| 43
| 0.475248
| 0
| 0
| 0
| 0
| 0
| 0.007752
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
ba9a24360a12762c9c5bc6ec1bb3e89f3ec2652f
| 80
|
py
|
Python
|
HelloGithub.py
|
qlums/dw_matrix
|
682fc6ef6f03268887af03a06c34768276757605
|
[
"MIT"
] | null | null | null |
HelloGithub.py
|
qlums/dw_matrix
|
682fc6ef6f03268887af03a06c34768276757605
|
[
"MIT"
] | null | null | null |
HelloGithub.py
|
qlums/dw_matrix
|
682fc6ef6f03268887af03a06c34768276757605
|
[
"MIT"
] | null | null | null |
import pandas as pd
import numpy as np
print("Hello Capstone Project Course!")
| 16
| 39
| 0.775
| 13
| 80
| 4.769231
| 0.846154
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1625
| 80
| 4
| 40
| 20
| 0.925373
| 0
| 0
| 0
| 0
| 0
| 0.375
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0.333333
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
242cbbdd20dfc326322ca6f59292d4c77e424a24
| 9,160
|
py
|
Python
|
tests/test_finders.py
|
iguazio/graphite-api
|
9b73a6e9137db31996d28c5224b3d9bc02745017
|
[
"Apache-2.0"
] | 315
|
2015-01-02T09:03:44.000Z
|
2022-02-08T11:22:20.000Z
|
tests/test_finders.py
|
iguazio/graphite-api
|
9b73a6e9137db31996d28c5224b3d9bc02745017
|
[
"Apache-2.0"
] | 169
|
2015-01-09T15:29:17.000Z
|
2021-08-24T07:56:31.000Z
|
tests/test_finders.py
|
iguazio/graphite-api
|
9b73a6e9137db31996d28c5224b3d9bc02745017
|
[
"Apache-2.0"
] | 139
|
2015-01-22T11:04:53.000Z
|
2021-12-11T16:50:13.000Z
|
import gzip
import os
import random
import shutil
import time
try:
from unittest.mock import patch
except ImportError:
from mock import patch
from graphite_api._vendor import whisper
from graphite_api.app import app
from graphite_api.finders.whisper import scandir
from graphite_api.intervals import Interval, IntervalSet
from graphite_api.node import BranchNode, LeafNode
from graphite_api.storage import Store
from . import TestCase, WHISPER_DIR
class FinderTest(TestCase):
def test_custom_finder(self):
store = Store([DummyFinder()])
nodes = list(store.find("foo"))
self.assertEqual(len(nodes), 1)
self.assertEqual(nodes[0].path, 'foo')
nodes = list(store.find('bar.*'))
self.assertEqual(len(nodes), 10)
node = nodes[0]
self.assertEqual(node.path.split('.')[0], 'bar')
time_info, series = node.fetch(100, 200)
self.assertEqual(time_info, (100, 200, 10))
self.assertEqual(len(series), 10)
def test_multi_finder(self):
store = Store([DummyFinder(), DummyFinder()])
nodes = list(store.find("foo"))
self.assertEqual(len(nodes), 1)
self.assertEqual(nodes[0].path, 'foo')
nodes = list(store.find('bar.*'))
self.assertEqual(len(nodes), 10)
node = nodes[0]
self.assertEqual(node.path.split('.')[0], 'bar')
time_info, series = node.fetch(100, 200)
self.assertEqual(time_info, (100, 200, 10))
self.assertEqual(len(series), 10)
class DummyReader(object):
__slots__ = ('path',)
def __init__(self, path):
self.path = path
def fetch(self, start_time, end_time):
npoints = (end_time - start_time) // 10
return (start_time, end_time, 10), [
random.choice([None, 1, 2, 3]) for i in range(npoints)
]
def get_intervals(self):
return IntervalSet([Interval(time.time() - 3600, time.time())])
class DummyFinder(object):
def find_nodes(self, query):
if query.pattern == 'foo':
yield BranchNode('foo')
elif query.pattern == 'bar.*':
for i in range(10):
path = 'bar.{0}'.format(i)
yield LeafNode(path, DummyReader(path))
class WhisperFinderTest(TestCase):
def scandir_mock(d):
return scandir(d)
@patch('graphite_api.finders.whisper.scandir', wraps=scandir_mock)
def test_whisper_finder(self, scandir_mocked):
for db in (
('whisper_finder', 'foo.wsp'),
('whisper_finder', 'foo', 'bar', 'baz.wsp'),
('whisper_finder', 'bar', 'baz', 'baz.wsp'),
):
db_path = os.path.join(WHISPER_DIR, *db)
if not os.path.exists(os.path.dirname(db_path)):
os.makedirs(os.path.dirname(db_path))
whisper.create(db_path, [(1, 60)])
try:
store = app.config['GRAPHITE']['store']
scandir_mocked.call_count = 0
nodes = store.find('whisper_finder.foo')
self.assertEqual(len(list(nodes)), 2)
self.assertEqual(scandir_mocked.call_count, 0)
scandir_mocked.call_count = 0
nodes = store.find('whisper_finder.foo.bar.baz')
self.assertEqual(len(list(nodes)), 1)
self.assertEqual(scandir_mocked.call_count, 0)
scandir_mocked.call_count = 0
nodes = store.find('whisper_finder.*.ba?.{baz,foo}')
self.assertEqual(len(list(nodes)), 2)
self.assertEqual(scandir_mocked.call_count, 5)
scandir_mocked.call_count = 0
nodes = store.find('whisper_finder.{foo,bar}.{baz,bar}.{baz,foo}')
self.assertEqual(len(list(nodes)), 2)
self.assertEqual(scandir_mocked.call_count, 5)
scandir_mocked.call_count = 0
nodes = store.find('whisper_finder.{foo}.bar.*')
self.assertEqual(len(list(nodes)), 1)
self.assertEqual(scandir_mocked.call_count, 2)
scandir_mocked.call_count = 0
nodes = store.find('whisper_finder.foo.{ba{r,z},baz}.baz')
self.assertEqual(len(list(nodes)), 1)
self.assertEqual(scandir_mocked.call_count, 1)
scandir_mocked.call_count = 0
nodes = store.find('whisper_finder.{foo,garbage}.bar.baz')
self.assertEqual(len(list(nodes)), 1)
self.assertEqual(scandir_mocked.call_count, 1)
scandir_mocked.call_count = 0
nodes = store.find('whisper_finder.{fo{o}}.bar.baz')
self.assertEqual(len(list(nodes)), 1)
self.assertEqual(scandir_mocked.call_count, 1)
scandir_mocked.call_count = 0
nodes = store.find('whisper_finder.foo{}.bar.baz')
self.assertEqual(len(list(nodes)), 1)
self.assertEqual(scandir_mocked.call_count, 1)
scandir_mocked.call_count = 0
nodes = store.find('whisper_finder.{fo,ba}{o}.bar.baz')
self.assertEqual(len(list(nodes)), 1)
self.assertEqual(scandir_mocked.call_count, 1)
scandir_mocked.call_count = 0
nodes = store.find('whisper_finder.{fo,ba}{o,o}.bar.baz')
self.assertEqual(len(list(nodes)), 1)
self.assertEqual(scandir_mocked.call_count, 1)
scandir_mocked.call_count = 0
nodes = store.find('whisper_finder.{fo,ba}{o,z}.bar.baz')
self.assertEqual(len(list(nodes)), 1)
self.assertEqual(scandir_mocked.call_count, 1)
finally:
scandir_mocked.call_count = 0
@patch('graphite_api.finders.whisper.scandir', wraps=scandir_mock)
def test_gzipped_whisper_finder(self, scandir_mocked):
for db in (
('gzwhisper_finder', 'foo.wsp'),
('gzwhisper_finder', 'foo', 'bar', 'baz.wsp'),
('gzwhisper_finder', 'bar', 'baz', 'baz.wsp'),
):
db_path = os.path.join(WHISPER_DIR, *db)
if not os.path.exists(os.path.dirname(db_path)):
os.makedirs(os.path.dirname(db_path))
whisper.create(db_path, [(1, 60)])
with open(db_path, 'rb') as f_in:
f_out = gzip.open("%s.gz" % db_path, 'wb')
shutil.copyfileobj(f_in, f_out)
f_out.close()
os.remove(db_path)
try:
store = app.config['GRAPHITE']['store']
scandir_mocked.call_count = 0
nodes = store.find('gzwhisper_finder.foo')
self.assertEqual(len(list(nodes)), 2)
self.assertEqual(scandir_mocked.call_count, 0)
scandir_mocked.call_count = 0
nodes = store.find('gzwhisper_finder.foo{}.bar.baz')
self.assertEqual(len(list(nodes)), 1)
self.assertEqual(scandir_mocked.call_count, 1)
finally:
scandir_mocked.call_count = 0
def test_globstar(self):
store = app.config['GRAPHITE']['store']
query = "x.**.x"
hits = ["x.x", "x._.x", "x._._.x"]
misses = ["x.x.o", "o.x.x", "x._.x._.o", "o._.x._.x"]
for path in hits + misses:
db_path = os.path.join(WHISPER_DIR, path.replace(".", os.sep))
if not os.path.exists(os.path.dirname(db_path)):
os.makedirs(os.path.dirname(db_path))
whisper.create(db_path + '.wsp', [(1, 60)])
paths = [node.path for node in store.find(query, local=True)]
for hit in hits:
self.assertIn(hit, paths)
for miss in misses:
self.assertNotIn(miss, paths)
def test_multiple_globstars(self):
store = app.config['GRAPHITE']['store']
query = "y.**.y.**.y"
hits = [
"y.y.y", "y._.y.y", "y.y._.y", "y._.y._.y",
"y._._.y.y", "y.y._._.y"
]
misses = [
"y.o.y", "o.y.y", "y.y.o", "o.y.y.y", "y.y.y.o",
"o._.y._.y", "y._.o._.y", "y._.y._.o"
]
for path in hits + misses:
db_path = os.path.join(WHISPER_DIR, path.replace(".", os.sep))
if not os.path.exists(os.path.dirname(db_path)):
os.makedirs(os.path.dirname(db_path))
whisper.create(db_path + '.wsp', [(1, 60)])
paths = [node.path for node in store.find(query, local=True)]
for hit in hits:
self.assertIn(hit, paths)
for miss in misses:
self.assertNotIn(miss, paths)
def test_terminal_globstar(self):
store = app.config['GRAPHITE']['store']
query = "z.**"
hits = ["z._", "z._._", "z._._._"]
misses = ["z", "o._", "o.z._", "o._.z"]
for path in hits + misses:
db_path = os.path.join(WHISPER_DIR, path.replace(".", os.sep))
if not os.path.exists(os.path.dirname(db_path)):
os.makedirs(os.path.dirname(db_path))
whisper.create(db_path + '.wsp', [(1, 60)])
paths = [node.path for node in store.find(query, local=True)]
for hit in hits:
self.assertIn(hit, paths)
for miss in misses:
self.assertNotIn(miss, paths)
| 36.494024
| 78
| 0.574563
| 1,172
| 9,160
| 4.326792
| 0.116041
| 0.11832
| 0.100572
| 0.130152
| 0.777559
| 0.754683
| 0.752317
| 0.745218
| 0.713272
| 0.709919
| 0
| 0.017711
| 0.278821
| 9,160
| 250
| 79
| 36.64
| 0.749924
| 0
| 0
| 0.570732
| 0
| 0
| 0.108188
| 0.050328
| 0
| 0
| 0
| 0
| 0.22439
| 1
| 0.058537
| false
| 0
| 0.073171
| 0.009756
| 0.170732
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
0308893e958c1849cd387aa2369253aaceb3eced
| 197
|
py
|
Python
|
tests/aa_pbs_exporter/test_resources.py
|
DonalChilde/aa_pbs_exporter
|
a627cd9fbd76f4cf27e83e0867074e9d2091dbd9
|
[
"MIT"
] | null | null | null |
tests/aa_pbs_exporter/test_resources.py
|
DonalChilde/aa_pbs_exporter
|
a627cd9fbd76f4cf27e83e0867074e9d2091dbd9
|
[
"MIT"
] | null | null | null |
tests/aa_pbs_exporter/test_resources.py
|
DonalChilde/aa_pbs_exporter
|
a627cd9fbd76f4cf27e83e0867074e9d2091dbd9
|
[
"MIT"
] | null | null | null |
def test_example_resource(example_resource):
"""Check that the example resource was loaded correctly."""
assert len(example_resource) == 4
assert example_resource[0]["average"] == 6.29
| 39.4
| 63
| 0.730964
| 26
| 197
| 5.346154
| 0.653846
| 0.539568
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.02994
| 0.152284
| 197
| 4
| 64
| 49.25
| 0.802395
| 0.269036
| 0
| 0
| 0
| 0
| 0.050725
| 0
| 0
| 0
| 0
| 0
| 0.666667
| 1
| 0.333333
| false
| 0
| 0
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
032a08b984b4ebc28d7a95f6ce6dcf1b16e47be0
| 52
|
py
|
Python
|
infrastructure/__init__.py
|
Simon1093/book-shop
|
03b9b9af9ee671adaa19b05700aba94a51b5a7c6
|
[
"MIT"
] | null | null | null |
infrastructure/__init__.py
|
Simon1093/book-shop
|
03b9b9af9ee671adaa19b05700aba94a51b5a7c6
|
[
"MIT"
] | null | null | null |
infrastructure/__init__.py
|
Simon1093/book-shop
|
03b9b9af9ee671adaa19b05700aba94a51b5a7c6
|
[
"MIT"
] | null | null | null |
from .environment_manager import EnvironmentManager
| 26
| 51
| 0.903846
| 5
| 52
| 9.2
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.076923
| 52
| 1
| 52
| 52
| 0.958333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
032b121696508e18b8abbfc9cbe8688a452a4990
| 131
|
py
|
Python
|
module4/0homework/ftp_system/ftp_server/bin/run.py
|
Strugglingrookie/oldboy2
|
8ed6723cab1f54f2ff8ea0947c6f982aef7e1b47
|
[
"Apache-2.0"
] | 1
|
2021-06-15T07:01:23.000Z
|
2021-06-15T07:01:23.000Z
|
module4/0homework/ftp_system/ftp_server/bin/run.py
|
Strugglingrookie/oldboy2
|
8ed6723cab1f54f2ff8ea0947c6f982aef7e1b47
|
[
"Apache-2.0"
] | 3
|
2020-02-13T14:35:36.000Z
|
2021-06-10T21:27:14.000Z
|
module4/0homework/ftp_system/ftp_server/bin/run.py
|
Strugglingrookie/oldboy2
|
8ed6723cab1f54f2ff8ea0947c6f982aef7e1b47
|
[
"Apache-2.0"
] | 1
|
2020-04-09T02:13:12.000Z
|
2020-04-09T02:13:12.000Z
|
# -*- coding:utf-8 -*-
# __author__="X1gang"
# Date:2018/12/16
from core.server import Myserver
def start():
Myserver.run()
| 13.1
| 32
| 0.648855
| 18
| 131
| 4.5
| 0.944444
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.091743
| 0.167939
| 131
| 10
| 33
| 13.1
| 0.651376
| 0.427481
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| true
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
0342ff195b7b10fd44ce4b3a074659c3777131c4
| 348
|
py
|
Python
|
src/core/resource_loader.py
|
cloostefis/quong
|
df3b7991f46dd6459dc9cfe3ba495f5a71141b50
|
[
"MIT"
] | null | null | null |
src/core/resource_loader.py
|
cloostefis/quong
|
df3b7991f46dd6459dc9cfe3ba495f5a71141b50
|
[
"MIT"
] | null | null | null |
src/core/resource_loader.py
|
cloostefis/quong
|
df3b7991f46dd6459dc9cfe3ba495f5a71141b50
|
[
"MIT"
] | null | null | null |
import os
class ResourceLoader:
@staticmethod
def directory():
return os.path.dirname(os.path.realpath(__file__))
@staticmethod
def sound(name):
return ResourceLoader.directory() + '/../../res/sounds/' + name + '.wav'
@staticmethod
def texture(name):
return ResourceLoader.directory() + '/../../res/textures/' + name + '.png'
| 15.818182
| 76
| 0.672414
| 37
| 348
| 6.216216
| 0.540541
| 0.195652
| 0.208696
| 0.286957
| 0.313043
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.152299
| 348
| 21
| 77
| 16.571429
| 0.779661
| 0
| 0
| 0.272727
| 0
| 0
| 0.132184
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.272727
| false
| 0
| 0.090909
| 0.272727
| 0.727273
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.