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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6fd7fff7eb56761b35552948bf0d55083a35efa4
| 696
|
py
|
Python
|
buildchain/buildchain/targets/__init__.py
|
NicolasT/metalk8s
|
2b7413708b77b2b84c4c3f1c119aa8d1644162f7
|
[
"Apache-2.0"
] | null | null | null |
buildchain/buildchain/targets/__init__.py
|
NicolasT/metalk8s
|
2b7413708b77b2b84c4c3f1c119aa8d1644162f7
|
[
"Apache-2.0"
] | null | null | null |
buildchain/buildchain/targets/__init__.py
|
NicolasT/metalk8s
|
2b7413708b77b2b84c4c3f1c119aa8d1644162f7
|
[
"Apache-2.0"
] | null | null | null |
# coding: utf-8
"""Module gathering custom tasks producing generic and reusable targets."""
from buildchain.targets.base import Target, AtomicTarget, CompositeTarget
from buildchain.targets.checksum import Sha256Sum
from buildchain.targets.directory import Mkdir
from buildchain.targets.file_tree import FileTree
from buildchain.targets.local_image import LocalImage
from buildchain.targets.operator_image import OperatorImage
from buildchain.targets.package import Package
from buildchain.targets.remote_image import RemoteImage
from buildchain.targets.repository import Repository
from buildchain.targets.serialize import SerializedData
from buildchain.targets.template import TemplateFile
| 38.666667
| 75
| 0.862069
| 84
| 696
| 7.095238
| 0.464286
| 0.258389
| 0.387584
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.006309
| 0.08908
| 696
| 17
| 76
| 40.941176
| 0.933754
| 0.12069
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
b504d0d2dcfa6805b2db5e0fa618c05fe4aede43
| 179
|
py
|
Python
|
mssqlcredentials.py
|
FrBonnefoy/csv-sql
|
fdf08581603b3f5f06850a3c904b66e357d37f3b
|
[
"MIT"
] | null | null | null |
mssqlcredentials.py
|
FrBonnefoy/csv-sql
|
fdf08581603b3f5f06850a3c904b66e357d37f3b
|
[
"MIT"
] | null | null | null |
mssqlcredentials.py
|
FrBonnefoy/csv-sql
|
fdf08581603b3f5f06850a3c904b66e357d37f3b
|
[
"MIT"
] | null | null | null |
server='tcp:mkgsupport.database.windows.net'
database='mkgsupport'
username='mkguser'
password='Usersqlmkg123!'
driver='/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.6.so.1.1'
| 29.833333
| 66
| 0.804469
| 23
| 179
| 6.26087
| 0.869565
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.068966
| 0.027933
| 179
| 5
| 67
| 35.8
| 0.758621
| 0
| 0
| 0
| 0
| 0
| 0.687151
| 0.513966
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.2
| 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
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
d245adc100f281abe83fa74f07cea6ed2d5669af
| 109
|
py
|
Python
|
aio_goodreads/utils/exceptions.py
|
TrDex/aio-goodreads
|
c4c266d9b52b7c533fda3cdd78497c09937a041a
|
[
"MIT"
] | null | null | null |
aio_goodreads/utils/exceptions.py
|
TrDex/aio-goodreads
|
c4c266d9b52b7c533fda3cdd78497c09937a041a
|
[
"MIT"
] | null | null | null |
aio_goodreads/utils/exceptions.py
|
TrDex/aio-goodreads
|
c4c266d9b52b7c533fda3cdd78497c09937a041a
|
[
"MIT"
] | null | null | null |
class GoodreadsClientException(Exception):
pass
class NetworkError(GoodreadsClientException):
pass
| 15.571429
| 45
| 0.798165
| 8
| 109
| 10.875
| 0.625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.146789
| 109
| 6
| 46
| 18.166667
| 0.935484
| 0
| 0
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
d2551fad5f34dfe45b7f3287ee26895303b69487
| 79
|
py
|
Python
|
prive/report/__init__.py
|
alan-turing-institute/privacy-sdg-toolbox
|
cdd61e3b59d2306906a6eaf7910b9c99a19e9e15
|
[
"MIT"
] | 2
|
2022-03-24T15:17:49.000Z
|
2022-03-31T09:21:32.000Z
|
prive/report/__init__.py
|
alan-turing-institute/privacy-sdg-toolbox
|
cdd61e3b59d2306906a6eaf7910b9c99a19e9e15
|
[
"MIT"
] | 1
|
2022-03-31T10:34:48.000Z
|
2022-03-31T10:34:48.000Z
|
prive/report/__init__.py
|
alan-turing-institute/privacy-sdg-toolbox
|
cdd61e3b59d2306906a6eaf7910b9c99a19e9e15
|
[
"MIT"
] | null | null | null |
from .attack_summary import MIAttackSummary
from .report import MIAttackReport
| 26.333333
| 43
| 0.873418
| 9
| 79
| 7.555556
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.101266
| 79
| 2
| 44
| 39.5
| 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
| 1
| 0
|
0
| 5
|
d266089e4eae633258c46a2eadae2e062a55047b
| 160
|
py
|
Python
|
ecogdata/__init__.py
|
miketrumpis/ecogdata
|
ff65820198e69608634c12686a86b97ac3a77558
|
[
"BSD-3-Clause"
] | null | null | null |
ecogdata/__init__.py
|
miketrumpis/ecogdata
|
ff65820198e69608634c12686a86b97ac3a77558
|
[
"BSD-3-Clause"
] | null | null | null |
ecogdata/__init__.py
|
miketrumpis/ecogdata
|
ff65820198e69608634c12686a86b97ac3a77558
|
[
"BSD-3-Clause"
] | null | null | null |
from . import datasource
from . import datastore
from . import devices
from . import expconfig
from . import filt
from . import parallel
__version__ = '0.1.0'
| 17.777778
| 24
| 0.75625
| 22
| 160
| 5.318182
| 0.5
| 0.512821
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.022727
| 0.175
| 160
| 9
| 25
| 17.777778
| 0.863636
| 0
| 0
| 0
| 0
| 0
| 0.031056
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.857143
| 0
| 0.857143
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
9628658dccec908fad3a72f2a9005d7893c2d213
| 19,003
|
py
|
Python
|
website/south_migrations/website/0001_initial.py
|
acaciawater/wfn
|
74c5b6bb0b2065cfcf6e968daef6e7354ff971c2
|
[
"MIT"
] | null | null | null |
website/south_migrations/website/0001_initial.py
|
acaciawater/wfn
|
74c5b6bb0b2065cfcf6e968daef6e7354ff971c2
|
[
"MIT"
] | null | null | null |
website/south_migrations/website/0001_initial.py
|
acaciawater/wfn
|
74c5b6bb0b2065cfcf6e968daef6e7354ff971c2
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Download'
db.create_table(u'website_download', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('upload_file', self.gf('django.db.models.fields.files.FileField')(max_length=100)),
))
db.send_create_signal(u'website', ['Download'])
# Adding model 'People'
db.create_table(u'website_people', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('language', self.gf('django.db.models.fields.CharField')(default='en', max_length=10)),
('name_full', self.gf('django.db.models.fields.CharField')(max_length=200)),
('image', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['medialibrary.MediaFile'])),
('role', self.gf('django.db.models.fields.CharField')(max_length=200, null=True, blank=True)),
('email', self.gf('django.db.models.fields.EmailField')(max_length=200, null=True, blank=True)),
('phone', self.gf('django.db.models.fields.EmailField')(max_length=200, null=True, blank=True)),
('description', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
))
db.send_create_signal(u'website', ['People'])
# Adding model 'PublicationCategory'
db.create_table(u'website_publicationcategory', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('category', self.gf('django.db.models.fields.CharField')(max_length=200)),
))
db.send_create_signal(u'website', ['PublicationCategory'])
# Adding model 'Publication'
db.create_table(u'website_publication', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('language', self.gf('django.db.models.fields.CharField')(default='en', max_length=10)),
('date', self.gf('django.db.models.fields.DateField')()),
('description', self.gf('django.db.models.fields.TextField')()),
('download', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['website.Download'])),
('category', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['website.PublicationCategory'], null=True, blank=True)),
))
db.send_create_signal(u'website', ['Publication'])
# Adding model 'Banner'
db.create_table(u'website_banner', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('language', self.gf('django.db.models.fields.CharField')(default='en', max_length=10)),
('link', self.gf('django.db.models.fields.CharField')(max_length=200)),
('image', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['medialibrary.MediaFile'], null=True, blank=True)),
('header', self.gf('django.db.models.fields.CharField')(max_length=200, null=True, blank=True)),
('text', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
('link_text', self.gf('django.db.models.fields.CharField')(max_length=200, null=True, blank=True)),
))
db.send_create_signal(u'website', ['Banner'])
# Adding model 'NewsItem'
db.create_table(u'website_newsitem', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('title', self.gf('django.db.models.fields.CharField')(max_length=200)),
('slug', self.gf('django.db.models.fields.SlugField')(max_length=50)),
('date', self.gf('django.db.models.fields.DateField')()),
('intro', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
('language', self.gf('django.db.models.fields.CharField')(default='en', max_length=10)),
('translation_of', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='translations', null=True, to=orm['website.NewsItem'])),
('template_key', self.gf('django.db.models.fields.CharField')(default='website/newsitem_detail.html', max_length=255)),
))
db.send_create_signal(u'website', ['NewsItem'])
# Adding model 'Event'
db.create_table(u'website_event', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('title', self.gf('django.db.models.fields.CharField')(max_length=200)),
('slug', self.gf('django.db.models.fields.SlugField')(max_length=50)),
('start_date', self.gf('django.db.models.fields.DateTimeField')()),
('end_date', self.gf('django.db.models.fields.DateTimeField')()),
('place', self.gf('django.db.models.fields.CharField')(max_length=200)),
('language', self.gf('django.db.models.fields.CharField')(default='en', max_length=10)),
('translation_of', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='translations', null=True, to=orm['website.Event'])),
('template_key', self.gf('django.db.models.fields.CharField')(default='website/event_detail.html', max_length=255)),
))
db.send_create_signal(u'website', ['Event'])
# Adding model 'RichTextContentEvents'
db.create_table(u'website_event_richtextcontentevents', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('text', self.gf('feincms.contrib.richtext.RichTextField')(blank=True)),
('parent', self.gf('django.db.models.fields.related.ForeignKey')(related_name='richtextcontentevents_set', to=orm['website.Event'])),
('region', self.gf('django.db.models.fields.CharField')(max_length=255)),
('ordering', self.gf('django.db.models.fields.IntegerField')(default=0)),
))
db.send_create_signal(u'website', ['RichTextContentEvents'])
# Adding model 'BannerContentEvents'
db.create_table(u'website_event_bannercontentevents', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('parent', self.gf('django.db.models.fields.related.ForeignKey')(related_name='bannercontentevents_set', to=orm['website.Event'])),
('region', self.gf('django.db.models.fields.CharField')(max_length=255)),
('ordering', self.gf('django.db.models.fields.IntegerField')(default=0)),
('banner', self.gf('django.db.models.fields.related.ForeignKey')(related_name=u'website_bannercontentevents_set', to=orm['website.Banner'])),
))
db.send_create_signal(u'website', ['BannerContentEvents'])
# Adding model 'BannerContentNews'
db.create_table(u'website_newsitem_bannercontentnews', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('parent', self.gf('django.db.models.fields.related.ForeignKey')(related_name='bannercontentnews_set', to=orm['website.NewsItem'])),
('region', self.gf('django.db.models.fields.CharField')(max_length=255)),
('ordering', self.gf('django.db.models.fields.IntegerField')(default=0)),
('banner', self.gf('django.db.models.fields.related.ForeignKey')(related_name=u'website_bannercontentnews_set', to=orm['website.Banner'])),
))
db.send_create_signal(u'website', ['BannerContentNews'])
# Adding model 'RichTextContentNews'
db.create_table(u'website_newsitem_richtextcontentnews', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('text', self.gf('feincms.contrib.richtext.RichTextField')(blank=True)),
('parent', self.gf('django.db.models.fields.related.ForeignKey')(related_name='richtextcontentnews_set', to=orm['website.NewsItem'])),
('region', self.gf('django.db.models.fields.CharField')(max_length=255)),
('ordering', self.gf('django.db.models.fields.IntegerField')(default=0)),
))
db.send_create_signal(u'website', ['RichTextContentNews'])
def backwards(self, orm):
# Deleting model 'Download'
db.delete_table(u'website_download')
# Deleting model 'People'
db.delete_table(u'website_people')
# Deleting model 'PublicationCategory'
db.delete_table(u'website_publicationcategory')
# Deleting model 'Publication'
db.delete_table(u'website_publication')
# Deleting model 'Banner'
db.delete_table(u'website_banner')
# Deleting model 'NewsItem'
db.delete_table(u'website_newsitem')
# Deleting model 'Event'
db.delete_table(u'website_event')
# Deleting model 'RichTextContentEvents'
db.delete_table(u'website_event_richtextcontentevents')
# Deleting model 'BannerContentEvents'
db.delete_table(u'website_event_bannercontentevents')
# Deleting model 'BannerContentNews'
db.delete_table(u'website_newsitem_bannercontentnews')
# Deleting model 'RichTextContentNews'
db.delete_table(u'website_newsitem_richtextcontentnews')
models = {
u'medialibrary.category': {
'Meta': {'ordering': "['parent__title', 'title']", 'object_name': 'Category'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': u"orm['medialibrary.Category']"}),
'slug': ('django.db.models.fields.SlugField', [], {'max_length': '150'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '200'})
},
u'medialibrary.mediafile': {
'Meta': {'ordering': "['-created']", 'object_name': 'MediaFile'},
'categories': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': u"orm['medialibrary.Category']", 'null': 'True', 'blank': 'True'}),
'copyright': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'file': ('django.db.models.fields.files.FileField', [], {'max_length': '255'}),
'file_size': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'type': ('django.db.models.fields.CharField', [], {'max_length': '12'})
},
u'website.banner': {
'Meta': {'object_name': 'Banner'},
'header': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'image': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['medialibrary.MediaFile']", 'null': 'True', 'blank': 'True'}),
'language': ('django.db.models.fields.CharField', [], {'default': "'en'", 'max_length': '10'}),
'link': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
'link_text': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
'text': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'})
},
u'website.bannercontentevents': {
'Meta': {'ordering': "['ordering']", 'object_name': 'BannerContentEvents', 'db_table': "u'website_event_bannercontentevents'"},
'banner': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'website_bannercontentevents_set'", 'to': u"orm['website.Banner']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'ordering': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'bannercontentevents_set'", 'to': u"orm['website.Event']"}),
'region': ('django.db.models.fields.CharField', [], {'max_length': '255'})
},
u'website.bannercontentnews': {
'Meta': {'ordering': "['ordering']", 'object_name': 'BannerContentNews', 'db_table': "u'website_newsitem_bannercontentnews'"},
'banner': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'website_bannercontentnews_set'", 'to': u"orm['website.Banner']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'ordering': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'bannercontentnews_set'", 'to': u"orm['website.NewsItem']"}),
'region': ('django.db.models.fields.CharField', [], {'max_length': '255'})
},
u'website.download': {
'Meta': {'object_name': 'Download'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'upload_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'})
},
u'website.event': {
'Meta': {'ordering': "('start_date',)", 'object_name': 'Event'},
'end_date': ('django.db.models.fields.DateTimeField', [], {}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'language': ('django.db.models.fields.CharField', [], {'default': "'en'", 'max_length': '10'}),
'place': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}),
'start_date': ('django.db.models.fields.DateTimeField', [], {}),
'template_key': ('django.db.models.fields.CharField', [], {'default': "'website/event_detail.html'", 'max_length': '255'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
'translation_of': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'translations'", 'null': 'True', 'to': u"orm['website.Event']"})
},
u'website.newsitem': {
'Meta': {'ordering': "('date',)", 'object_name': 'NewsItem'},
'date': ('django.db.models.fields.DateField', [], {}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'intro': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'language': ('django.db.models.fields.CharField', [], {'default': "'en'", 'max_length': '10'}),
'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}),
'template_key': ('django.db.models.fields.CharField', [], {'default': "'website/newsitem_detail.html'", 'max_length': '255'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
'translation_of': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'translations'", 'null': 'True', 'to': u"orm['website.NewsItem']"})
},
u'website.people': {
'Meta': {'ordering': "('name_full',)", 'object_name': 'People'},
'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'image': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['medialibrary.MediaFile']"}),
'language': ('django.db.models.fields.CharField', [], {'default': "'en'", 'max_length': '10'}),
'name_full': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
'phone': ('django.db.models.fields.EmailField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
'role': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'})
},
u'website.publication': {
'Meta': {'ordering': "('date',)", 'object_name': 'Publication'},
'category': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['website.PublicationCategory']", 'null': 'True', 'blank': 'True'}),
'date': ('django.db.models.fields.DateField', [], {}),
'description': ('django.db.models.fields.TextField', [], {}),
'download': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['website.Download']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'language': ('django.db.models.fields.CharField', [], {'default': "'en'", 'max_length': '10'})
},
u'website.publicationcategory': {
'Meta': {'ordering': "('category',)", 'object_name': 'PublicationCategory'},
'category': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
},
u'website.richtextcontentevents': {
'Meta': {'ordering': "['ordering']", 'object_name': 'RichTextContentEvents', 'db_table': "u'website_event_richtextcontentevents'"},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'ordering': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'richtextcontentevents_set'", 'to': u"orm['website.Event']"}),
'region': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'text': ('feincms.contrib.richtext.RichTextField', [], {'blank': 'True'})
},
u'website.richtextcontentnews': {
'Meta': {'ordering': "['ordering']", 'object_name': 'RichTextContentNews', 'db_table': "u'website_newsitem_richtextcontentnews'"},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'ordering': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'richtextcontentnews_set'", 'to': u"orm['website.NewsItem']"}),
'region': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'text': ('feincms.contrib.richtext.RichTextField', [], {'blank': 'True'})
}
}
complete_apps = ['website']
| 68.111111
| 183
| 0.604378
| 2,073
| 19,003
| 5.424506
| 0.060781
| 0.093908
| 0.163095
| 0.232992
| 0.840551
| 0.771899
| 0.721476
| 0.695865
| 0.661894
| 0.623121
| 0
| 0.010299
| 0.182498
| 19,003
| 279
| 184
| 68.111111
| 0.71355
| 0.035415
| 0
| 0.328947
| 0
| 0
| 0.522478
| 0.343311
| 0
| 0
| 0
| 0
| 0
| 1
| 0.008772
| false
| 0
| 0.017544
| 0
| 0.039474
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 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
| 5
|
965880c327f01f78e29c0f17a9652214507ff8a9
| 276
|
py
|
Python
|
nes/processors/cpu/instructions/increment/increment_memory.py
|
Hexadorsimal/pynes
|
dbb3d40c1240fa27f70fa798bcec09188755eec2
|
[
"MIT"
] | 1
|
2017-05-13T18:57:09.000Z
|
2017-05-13T18:57:09.000Z
|
nes/processors/cpu/instructions/increment/increment_memory.py
|
Hexadorsimal/py6502
|
dbb3d40c1240fa27f70fa798bcec09188755eec2
|
[
"MIT"
] | 7
|
2020-10-24T17:16:56.000Z
|
2020-11-01T14:10:23.000Z
|
nes/processors/cpu/instructions/increment/increment_memory.py
|
Hexadorsimal/pynes
|
dbb3d40c1240fa27f70fa798bcec09188755eec2
|
[
"MIT"
] | null | null | null |
from .increment import IncrementInstruction
class IncrementMemoryInstruction(IncrementInstruction):
def increment(self, processor):
value = self.read_source(processor)
value += self.amount
self.write_result(processor, value)
return value
| 27.6
| 55
| 0.724638
| 26
| 276
| 7.615385
| 0.615385
| 0.212121
| 0.181818
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.206522
| 276
| 9
| 56
| 30.666667
| 0.90411
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.142857
| false
| 0
| 0.142857
| 0
| 0.571429
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
736b18b08924d51abb8cf53cbd68256577bce153
| 70
|
py
|
Python
|
app/database/models_schema/__init__.py
|
statar/chat_app_backend
|
f964c77395d400df47af3dbb663951e0c718636c
|
[
"MIT"
] | null | null | null |
app/database/models_schema/__init__.py
|
statar/chat_app_backend
|
f964c77395d400df47af3dbb663951e0c718636c
|
[
"MIT"
] | null | null | null |
app/database/models_schema/__init__.py
|
statar/chat_app_backend
|
f964c77395d400df47af3dbb663951e0c718636c
|
[
"MIT"
] | null | null | null |
# src/database/models_schema/__init__.py
from .user_schema import *
| 23.333333
| 41
| 0.785714
| 10
| 70
| 4.9
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.114286
| 70
| 3
| 42
| 23.333333
| 0.790323
| 0.542857
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
736ec9c612ed661f22b77087daf4e5cce9d62996
| 5,029
|
py
|
Python
|
src/testers/unittests/test_smt_array.py
|
HyperSine/Triton
|
1d4ef0cdf439bc28541a67506e96c4d35708332f
|
[
"Apache-2.0"
] | null | null | null |
src/testers/unittests/test_smt_array.py
|
HyperSine/Triton
|
1d4ef0cdf439bc28541a67506e96c4d35708332f
|
[
"Apache-2.0"
] | null | null | null |
src/testers/unittests/test_smt_array.py
|
HyperSine/Triton
|
1d4ef0cdf439bc28541a67506e96c4d35708332f
|
[
"Apache-2.0"
] | null | null | null |
#!/usr/bin/env python3
# coding: utf-8
"""Test SMT Array."""
import unittest
from triton import *
class TestSMTArray(unittest.TestCase):
"""Testing SMT array."""
def setUp(self):
self.ctx = TritonContext(ARCH.X86_64)
self.ast = self.ctx.getAstContext()
self.cellvar = self.ast.variable(self.ctx.newSymbolicVariable(8, 'cell var'))
self.indexvar = self.ast.variable(self.ctx.newSymbolicVariable(64, 'index var'))
self.mem = self.ast.array(64)
def test_load_store_eval(self):
node = self.ast.select(self.mem, 10)
# There is no value stored at index 10 yet
self.assertEqual(node.evaluate(), 0)
# We store 0xff at index 10 of mem
self.mem = self.ast.store(self.mem, 10, self.ast.bv(0xff, 8))
# We select the cell at index 10
node = self.ast.select(self.mem, 10)
self.assertEqual(node.evaluate(), 0xff)
# With triton we allow the evaluation of store node
node = self.ast.store(self.mem, 0x1000, self.ast.bv(0xde, 8))
self.assertEqual(node.evaluate(), 0xde)
self.assertEqual(node.getBitvectorSize(), 0) # An array do not have a size
def test_store_index_symbolic(self):
# We store 0xCC at a symbolic address
self.mem = self.ast.store(self.mem, self.indexvar, self.ast.bv(0xcc, 8))
# We select the mem cell at index 0xdead
node = self.ast.select(self.mem, 0xdead)
# We want to select the 0xcc constant
model = self.ctx.getModel(node == 0xcc)
self.assertEqual(model[1].getValue(), 0xdead)
# We can't fetch the 0xff constant
sat = self.ctx.isSat(node == 0xff)
self.assertEqual(sat, False)
def test_load_index_symbolic(self):
# We store 0xCC at the 0x1000 address
self.mem = self.ast.store(self.mem, 0x1000, self.ast.bv(0xcc, 8))
# We select the mem cell at a symbolic address
node = self.ast.select(self.mem, self.indexvar)
# We want to select the 0xcc constant
model = self.ctx.getModel(node == 0xcc)
self.assertEqual(model[1].getValue(), 0x1000)
# We can't fetch the 0xff constant
sat = self.ctx.isSat(node == 0xff)
self.assertEqual(sat, False)
def test_store_cell_symbolic(self):
# We store a "symbolic cell + 1" at 0xdead
self.mem = self.ast.store(self.mem, 0xdead, self.cellvar + 1)
# We select the mem cell at 0xdead
node = self.ast.select(self.mem, 0xdead)
# We want to select the 0xcc constant (var + 1 == 0xcc)
model = self.ctx.getModel(node == 0xcc)
self.assertEqual(model[0].getValue(), 0xcb)
def test_bitwuzla_1(self):
if VERSION.BITWUZLA_INTERFACE:
self.ctx.setSolver(SOLVER.BITWUZLA)
# We store 0xCC at a symbolic address
self.mem = self.ast.store(self.mem, self.indexvar, self.ast.bv(0xcc, 8))
# We select the mem cell at index 0xdead
node = self.ast.select(self.mem, 0xdead)
# We want to select the 0xcc constant
model = self.ctx.getModel(node == 0xcc)
self.assertEqual(model[1].getValue(), 0xdead)
# We can't fetch the 0xff constant
sat = self.ctx.isSat(node == 0xff)
self.assertEqual(sat, False)
def test_bitwuzla_2(self):
if VERSION.BITWUZLA_INTERFACE:
self.ctx.setSolver(SOLVER.BITWUZLA)
# We store 0xCC at the 0x1000 address
self.mem = self.ast.store(self.mem, 0x1000, self.ast.bv(0xcc, 8))
# We select the mem cell at a symbolic address
node = self.ast.select(self.mem, self.indexvar)
# We want to select the 0xcc constant
model = self.ctx.getModel(node == 0xcc)
self.assertEqual(model[1].getValue(), 0x1000)
# We can't fetch the 0xff constant
sat = self.ctx.isSat(node == 0xff)
self.assertEqual(sat, False)
def test_bitwuzla_3(self):
if VERSION.BITWUZLA_INTERFACE:
self.ctx.setSolver(SOLVER.BITWUZLA)
# We store a "symbolic cell + 1" at 0xdead
self.mem = self.ast.store(self.mem, 0xdead, self.cellvar + 1)
# We select the mem cell at 0xdead
node = self.ast.select(self.mem, 0xdead)
# We want to select the 0xcc constant (var + 1 == 0xcc)
model = self.ctx.getModel(node == 0xcc)
self.assertEqual(model[0].getValue(), 0xcb)
def test_lift_to_dot(self):
self.mem = self.ast.store(self.mem, 0xdead, self.cellvar + 1)
node = self.ast.select(self.mem, 0xdead)
self.assertNotEqual(len(self.ctx.liftToDot(node)), 0)
def test_lift_to_llvm(self):
if VERSION.LLVM_INTERFACE:
self.mem = self.ast.store(self.mem, 0xdead, self.cellvar + 1)
node = self.ast.select(self.mem, 0xdead)
self.assertNotEqual(len(self.ctx.liftToLLVM(node)), 0)
| 38.098485
| 88
| 0.613243
| 697
| 5,029
| 4.38307
| 0.146341
| 0.06874
| 0.050409
| 0.045827
| 0.771849
| 0.771849
| 0.745008
| 0.708347
| 0.708347
| 0.697218
| 0
| 0.03843
| 0.275602
| 5,029
| 131
| 89
| 38.389313
| 0.800165
| 0.218135
| 0
| 0.619718
| 0
| 0
| 0.004367
| 0
| 0
| 0
| 0.046751
| 0
| 0.225352
| 1
| 0.140845
| false
| 0
| 0.028169
| 0
| 0.183099
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
73a58b20477dba9d965c11b0d4c774d02a491ace
| 138
|
py
|
Python
|
src/prefect/tasks/cloud/__init__.py
|
louisditzel/prefect
|
b1a02fee623b965e756a38aa09059db780ab67eb
|
[
"ECL-2.0",
"Apache-2.0"
] | 1
|
2020-05-10T14:32:32.000Z
|
2020-05-10T14:32:32.000Z
|
src/prefect/tasks/cloud/__init__.py
|
louisditzel/prefect
|
b1a02fee623b965e756a38aa09059db780ab67eb
|
[
"ECL-2.0",
"Apache-2.0"
] | null | null | null |
src/prefect/tasks/cloud/__init__.py
|
louisditzel/prefect
|
b1a02fee623b965e756a38aa09059db780ab67eb
|
[
"ECL-2.0",
"Apache-2.0"
] | null | null | null |
"""
These tasks are classified as Cloud due to their reliance on Prefect Cloud.
"""
from prefect.tasks.cloud.flow_run import FlowRunTask
| 23
| 75
| 0.782609
| 21
| 138
| 5.095238
| 0.809524
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.144928
| 138
| 5
| 76
| 27.6
| 0.90678
| 0.543478
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
73de17ecbd42bd8f930f9a37e2494330a050e39b
| 836
|
py
|
Python
|
tests/unit/test_locations.py
|
timwarnock/globalentry
|
98daa09b1e812b3d553c697d11bdb6d63d5d40a5
|
[
"MIT"
] | null | null | null |
tests/unit/test_locations.py
|
timwarnock/globalentry
|
98daa09b1e812b3d553c697d11bdb6d63d5d40a5
|
[
"MIT"
] | null | null | null |
tests/unit/test_locations.py
|
timwarnock/globalentry
|
98daa09b1e812b3d553c697d11bdb6d63d5d40a5
|
[
"MIT"
] | null | null | null |
import json
import pytest
import globalentry
@pytest.fixture
def mocked_urllib(mocker):
return mocker.patch('globalentry.locations.__LOCATION_LIST__', new=json.load(open('tests/unit/mocked_locations.json')))
def test_get(mocked_urllib):
assert len(globalentry.locations.list()) == 25
def test_san_diego(mocked_urllib):
assert globalentry.locations.by_id(5002)['city'] == 'San Diego'
assert globalentry.locations.by_id(5002)['address'] == '2500 Paseo Internacional'
def test_california(mocked_urllib):
assert len(globalentry.locations.filter('CA')) == 2
def test_numeric():
assert globalentry.locations.__numeric('3') == 3
assert globalentry.locations.__numeric('3.141') == 3.141
assert globalentry.locations.__numeric('-.141') == -0.141
assert globalentry.locations.__numeric('NULL') == 0
| 27.866667
| 123
| 0.739234
| 106
| 836
| 5.59434
| 0.40566
| 0.303541
| 0.263069
| 0.222597
| 0.489039
| 0.252951
| 0
| 0
| 0
| 0
| 0
| 0.044959
| 0.12201
| 836
| 29
| 124
| 28.827586
| 0.762943
| 0
| 0
| 0
| 0
| 0
| 0.158084
| 0.08503
| 0
| 0
| 0
| 0
| 0.444444
| 1
| 0.277778
| false
| 0
| 0.166667
| 0.055556
| 0.5
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
73f1d205b0d412a35ec2c306db13f2ae81917f2f
| 52
|
py
|
Python
|
configclasses/__init__.py
|
headsrooms/configclasses
|
4d205afdf96487a6b944880c7b45d57de29f50a3
|
[
"MIT"
] | 9
|
2020-09-19T18:11:07.000Z
|
2022-03-28T05:06:30.000Z
|
configclasses/__init__.py
|
headsrooms/configclasses
|
4d205afdf96487a6b944880c7b45d57de29f50a3
|
[
"MIT"
] | 1
|
2021-03-09T12:07:51.000Z
|
2021-08-14T13:15:08.000Z
|
configclasses/__init__.py
|
headsrooms/configclasses
|
4d205afdf96487a6b944880c7b45d57de29f50a3
|
[
"MIT"
] | null | null | null |
from configclasses.configclasses import configclass
| 26
| 51
| 0.903846
| 5
| 52
| 9.4
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.076923
| 52
| 1
| 52
| 52
| 0.979167
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
fbba2d9f8fae203162140b29887c7cb7dd6f12f4
| 248
|
py
|
Python
|
auto_join_zoom/testgui.py
|
lwunruh/python_scripts
|
947d5fd9cfa0397df8be110eb1744b4b6b20947c
|
[
"CC0-1.0"
] | 2
|
2021-05-08T21:33:41.000Z
|
2021-06-07T22:28:36.000Z
|
auto_join_zoom/testgui.py
|
lwunruh/python_scripts
|
947d5fd9cfa0397df8be110eb1744b4b6b20947c
|
[
"CC0-1.0"
] | null | null | null |
auto_join_zoom/testgui.py
|
lwunruh/python_scripts
|
947d5fd9cfa0397df8be110eb1744b4b6b20947c
|
[
"CC0-1.0"
] | null | null | null |
import os
from PIL.ImageOps import grayscale
import pyautogui as gui
import time as t
#os.system("C:\\Users\\lukeu\\AppData\\Roaming\\Zoom\\bin\\Zoom.exe")
gui.click("C:\\Users\\lukeu\\Desktop\\Coding\\python_scripts\\auto_join_zoom\\test2.png")
| 27.555556
| 89
| 0.75
| 40
| 248
| 4.575
| 0.725
| 0.065574
| 0.120219
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.004348
| 0.072581
| 248
| 8
| 90
| 31
| 0.791304
| 0.274194
| 0
| 0
| 0
| 0
| 0.424581
| 0.424581
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.8
| 0
| 0.8
| 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
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
fbdf1e9bbe38ee8893fe391a64b21d6ba5484104
| 107
|
py
|
Python
|
packages/syft/src/syft/core/store/__init__.py
|
jackbandy/PySyft
|
0e20e90abab6a7a7ca672d6eedfa1e7f83c4981b
|
[
"Apache-2.0"
] | null | null | null |
packages/syft/src/syft/core/store/__init__.py
|
jackbandy/PySyft
|
0e20e90abab6a7a7ca672d6eedfa1e7f83c4981b
|
[
"Apache-2.0"
] | null | null | null |
packages/syft/src/syft/core/store/__init__.py
|
jackbandy/PySyft
|
0e20e90abab6a7a7ca672d6eedfa1e7f83c4981b
|
[
"Apache-2.0"
] | null | null | null |
# relative
from .dataset import Dataset # noqa: 401
from .store_interface import ObjectStore # noqa: 401
| 26.75
| 53
| 0.766355
| 14
| 107
| 5.785714
| 0.642857
| 0.17284
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.067416
| 0.168224
| 107
| 3
| 54
| 35.666667
| 0.842697
| 0.261682
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
83b0eea90564e35f3f8615bb409d6b440b24a55f
| 150
|
py
|
Python
|
django_gsuite_email/apps.py
|
slicefox/django-gsuite-email
|
c339f9b520bb6e13b51d78fb7e94abad2ce497fe
|
[
"MIT"
] | 12
|
2020-10-11T16:39:27.000Z
|
2021-09-04T10:12:58.000Z
|
django_gsuite_email/apps.py
|
slicefox/django-gsuite-email
|
c339f9b520bb6e13b51d78fb7e94abad2ce497fe
|
[
"MIT"
] | 2
|
2021-03-05T03:23:23.000Z
|
2021-06-23T17:31:14.000Z
|
django_gsuite_email/apps.py
|
slicefox/django-gsuite-email
|
c339f9b520bb6e13b51d78fb7e94abad2ce497fe
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class DjangoGSuiteEmailConfig(AppConfig):
name = 'django_gsuite_email'
verbose_name = "Django GSuite Email"
| 30
| 41
| 0.786667
| 17
| 150
| 6.764706
| 0.647059
| 0.173913
| 0.278261
| 0.365217
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.146667
| 150
| 5
| 42
| 30
| 0.898438
| 0
| 0
| 0
| 0
| 0
| 0.251656
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.25
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
83b3299043e0c9d80df3259aee7a0a91d818386a
| 196
|
py
|
Python
|
wildfly/api/__init__.py
|
bheesham/wildfly-py
|
b5a3da0c7843e22b0c76b2b12fc088f0a2c9bd2d
|
[
"Apache-2.0"
] | 1
|
2021-06-08T18:44:59.000Z
|
2021-06-08T18:44:59.000Z
|
wildfly/api/__init__.py
|
zsuzhengdu/wildfly-py
|
b5a3da0c7843e22b0c76b2b12fc088f0a2c9bd2d
|
[
"Apache-2.0"
] | null | null | null |
wildfly/api/__init__.py
|
zsuzhengdu/wildfly-py
|
b5a3da0c7843e22b0c76b2b12fc088f0a2c9bd2d
|
[
"Apache-2.0"
] | 1
|
2021-06-08T18:42:35.000Z
|
2021-06-08T18:42:35.000Z
|
# flake8: noqa
from .host import HostApiMixin
from .server import ServerApiMixin
from .deployment import DeploymentApiMixin
from .datasource import DatasourceApiMixin
from .jms import JmsApiMixin
| 28
| 42
| 0.846939
| 22
| 196
| 7.545455
| 0.636364
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.00578
| 0.117347
| 196
| 6
| 43
| 32.666667
| 0.953757
| 0.061224
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
f7de7492bd47f3281996fdd874eab7fd78bb554e
| 236
|
py
|
Python
|
src/evolvepy/integrations/tf_keras/__init__.py
|
EltonCN/evolvepy
|
4489264d6c03ea4f3c23ea665fdf12fe4ead1ccc
|
[
"MIT"
] | 1
|
2022-01-13T21:11:53.000Z
|
2022-01-13T21:11:53.000Z
|
src/evolvepy/integrations/tf_keras/__init__.py
|
EltonCN/evolvepy
|
4489264d6c03ea4f3c23ea665fdf12fe4ead1ccc
|
[
"MIT"
] | null | null | null |
src/evolvepy/integrations/tf_keras/__init__.py
|
EltonCN/evolvepy
|
4489264d6c03ea4f3c23ea665fdf12fe4ead1ccc
|
[
"MIT"
] | null | null | null |
'''
EvolvePy's integration with Tensorflow/Keras (https://www.tensorflow.org/)
'''
from .tf_keras import TFKerasEvaluator, LossFitnessFunction, transfer_weights, EvolutionaryModel, ProcessTFKerasFitnessFunction, ProcessTFKerasEvaluator
| 47.2
| 152
| 0.838983
| 21
| 236
| 9.333333
| 0.904762
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.067797
| 236
| 5
| 152
| 47.2
| 0.890909
| 0.313559
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
792b5731f6d24649765fc30dce228094c0e22caf
| 126
|
py
|
Python
|
gitsplit/log.py
|
genericmoniker/git-split
|
a46a496e44f3a365579d26359ec446e09fa8cbe5
|
[
"MIT"
] | null | null | null |
gitsplit/log.py
|
genericmoniker/git-split
|
a46a496e44f3a365579d26359ec446e09fa8cbe5
|
[
"MIT"
] | 2
|
2020-03-16T21:09:37.000Z
|
2020-03-16T21:29:58.000Z
|
gitsplit/log.py
|
genericmoniker/git-split
|
a46a496e44f3a365579d26359ec446e09fa8cbe5
|
[
"MIT"
] | null | null | null |
import logging
import sys
def setup():
logging.basicConfig(format="%(message)s", level=logging.INFO, stream=sys.stdout)
| 18
| 84
| 0.738095
| 17
| 126
| 5.470588
| 0.764706
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.119048
| 126
| 6
| 85
| 21
| 0.837838
| 0
| 0
| 0
| 0
| 0
| 0.087302
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| true
| 0
| 0.5
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
f70d4b052c0344a9f683cf607ce15c7d287a513d
| 115
|
py
|
Python
|
equity_db/api/__init__.py
|
Alexd14/equity-db
|
d41dceae048443c938c5c681e08224d31ae5b847
|
[
"MIT"
] | null | null | null |
equity_db/api/__init__.py
|
Alexd14/equity-db
|
d41dceae048443c938c5c681e08224d31ae5b847
|
[
"MIT"
] | null | null | null |
equity_db/api/__init__.py
|
Alexd14/equity-db
|
d41dceae048443c938c5c681e08224d31ae5b847
|
[
"MIT"
] | 1
|
2021-08-20T14:32:59.000Z
|
2021-08-20T14:32:59.000Z
|
from . import mongo_status
from . import mongo_connection
__all__ = [
'mongo_status',
'mongo_connection'
]
| 16.428571
| 30
| 0.721739
| 13
| 115
| 5.769231
| 0.461538
| 0.266667
| 0.4
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.191304
| 115
| 7
| 31
| 16.428571
| 0.806452
| 0
| 0
| 0
| 0
| 0
| 0.241379
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 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
| 1
| 0
| 0
| 0
|
0
| 5
|
f715bcfb6bc96e73744dd0a50b070cfdd7c67ca2
| 1,316
|
py
|
Python
|
torch_glow/tests/nodes/adaptive_avg_pool2d_test.py
|
YonginKwon/glow
|
7d316d028e1792534416755bf80af422adccdaa9
|
[
"Apache-2.0"
] | 2
|
2020-03-23T21:04:00.000Z
|
2020-04-02T22:49:49.000Z
|
torch_glow/tests/nodes/adaptive_avg_pool2d_test.py
|
YonginKwon/glow
|
7d316d028e1792534416755bf80af422adccdaa9
|
[
"Apache-2.0"
] | 1
|
2020-01-06T09:14:32.000Z
|
2020-01-06T09:14:32.000Z
|
torch_glow/tests/nodes/adaptive_avg_pool2d_test.py
|
YonginKwon/glow
|
7d316d028e1792534416755bf80af422adccdaa9
|
[
"Apache-2.0"
] | null | null | null |
from __future__ import absolute_import, division, print_function, unicode_literals
import torch
import torch.nn.functional as F
from tests.utils import jitVsGlow
import unittest
class TestAdaptiveAvgPool2d(unittest.TestCase):
def test_adaptive_avg_pool2d_basic(self):
"""Basic test of PyTorch adaptive_avg_pool2d Node."""
def test_f(inputs):
return F.adaptive_avg_pool2d(inputs, (5, 5))
inputs = torch.randn(3, 6, 14, 14)
jitVsGlow(test_f, inputs, expected_fused_ops={
"aten::adaptive_avg_pool2d"})
def test_adaptive_avg_pool2d_nonsquare_inputs(self):
"""Test of PyTorch adaptive_avg_pool2d Node with non-square inputs."""
def test_f(inputs):
return F.adaptive_avg_pool2d(inputs, (3, 3))
inputs = torch.randn(3, 6, 13, 14)
jitVsGlow(test_f, inputs, expected_fused_ops={
"aten::adaptive_avg_pool2d"})
def test_adaptive_avg_pool2d_nonsquare_outputs(self):
"""Test of PyTorch adaptive_avg_pool2d Node with non-square outputs."""
def test_f(inputs):
return F.adaptive_avg_pool2d(inputs, (5, 3))
inputs = torch.randn(3, 6, 14, 14)
jitVsGlow(test_f, inputs, expected_fused_ops={
"aten::adaptive_avg_pool2d"})
| 30.604651
| 82
| 0.668693
| 172
| 1,316
| 4.819767
| 0.27907
| 0.159228
| 0.24608
| 0.065139
| 0.720145
| 0.691194
| 0.667069
| 0.626055
| 0.626055
| 0.626055
| 0
| 0.036779
| 0.235562
| 1,316
| 42
| 83
| 31.333333
| 0.787276
| 0.135258
| 0
| 0.458333
| 0
| 0
| 0.066845
| 0.066845
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.208333
| 0.125
| 0.625
| 0.041667
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
f72bd109a480d8206801746e5910512f5d37e064
| 444
|
py
|
Python
|
tests/test_cpplibhub.py
|
iotanbo/cpplibhub
|
0758d416c8d2c0b29d70300f25ccc898a7ad64df
|
[
"MIT"
] | null | null | null |
tests/test_cpplibhub.py
|
iotanbo/cpplibhub
|
0758d416c8d2c0b29d70300f25ccc898a7ad64df
|
[
"MIT"
] | null | null | null |
tests/test_cpplibhub.py
|
iotanbo/cpplibhub
|
0758d416c8d2c0b29d70300f25ccc898a7ad64df
|
[
"MIT"
] | null | null | null |
import pytest
from click.testing import CliRunner
from cpplibhub.cli import main
@pytest.fixture(scope="module")
def runner():
return CliRunner()
def test_main(runner):
# assert main([]) == 0 # run without click
result = runner.invoke(main)
# result = runner.invoke(main, ['--name', 'Amy'])
assert result.exit_code == 0
# assert result.output == 'Hello Amy!\n'
# TODO: test more command line options and args
| 22.2
| 53
| 0.671171
| 59
| 444
| 5.016949
| 0.610169
| 0.081081
| 0.121622
| 0.148649
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005634
| 0.20045
| 444
| 19
| 54
| 23.368421
| 0.828169
| 0.38964
| 0
| 0
| 0
| 0
| 0.022727
| 0
| 0
| 0
| 0
| 0.052632
| 0.111111
| 1
| 0.222222
| false
| 0
| 0.333333
| 0.111111
| 0.666667
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 5
|
f72d842ae758c78892bcd330bd0ebd4e7323263e
| 276
|
py
|
Python
|
latex2minizinc/GenBelongsTo.py
|
rafaellc28/Latex2MiniZinc
|
5c255a712156b915469329a07d13f1e984cbd247
|
[
"MIT"
] | null | null | null |
latex2minizinc/GenBelongsTo.py
|
rafaellc28/Latex2MiniZinc
|
5c255a712156b915469329a07d13f1e984cbd247
|
[
"MIT"
] | null | null | null |
latex2minizinc/GenBelongsTo.py
|
rafaellc28/Latex2MiniZinc
|
5c255a712156b915469329a07d13f1e984cbd247
|
[
"MIT"
] | null | null | null |
from GenObj import *
class GenBelongsTo(GenObj):
def __init__(self, name, stmtIndex):
super(GenBelongsTo, self).__init__(name)
self.stmtIndex = stmtIndex
def getStmtIndex(self):
return self.stmtIndex
def setStmtIndex(self, stmtIndex):
self.stmtIndex = stmtIndex
| 21.230769
| 42
| 0.76087
| 32
| 276
| 6.3125
| 0.4375
| 0.257426
| 0.217822
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.141304
| 276
| 12
| 43
| 23
| 0.852321
| 0
| 0
| 0.222222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.111111
| 0.111111
| 0.666667
| 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
| 1
| 1
| 0
|
0
| 5
|
f7386289364e6518c0b212b58be5460b42ca82c5
| 172
|
py
|
Python
|
networkanalysis/views.py
|
keithwongg/social_network_analysis_csv_upload
|
a37ec322a583e0109e17d45185d8e3a5d0a0c6ea
|
[
"MIT"
] | null | null | null |
networkanalysis/views.py
|
keithwongg/social_network_analysis_csv_upload
|
a37ec322a583e0109e17d45185d8e3a5d0a0c6ea
|
[
"MIT"
] | 5
|
2021-03-30T14:12:31.000Z
|
2021-09-22T19:31:49.000Z
|
networkanalysis/views.py
|
keithwongg/Social_Network_Analysis_Via_CSV_Upload
|
a37ec322a583e0109e17d45185d8e3a5d0a0c6ea
|
[
"MIT"
] | null | null | null |
from django.http import HttpResponse
from django.shortcuts import render
def homepage(request):
# return HttpResponse('home')
return render(request, 'graph.html')
| 24.571429
| 40
| 0.761628
| 21
| 172
| 6.238095
| 0.666667
| 0.152672
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.145349
| 172
| 6
| 41
| 28.666667
| 0.891156
| 0.156977
| 0
| 0
| 0
| 0
| 0.06993
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.5
| 0.25
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 1
| 0
| 0
|
0
| 5
|
f74474d9aebd978b02b69236a695732210ab2a3d
| 184
|
py
|
Python
|
tips/admin.py
|
Ichinga-Samuel/Python-Tips
|
5e80621ab0d945b873aa499239b27ac2f39335c2
|
[
"MIT"
] | null | null | null |
tips/admin.py
|
Ichinga-Samuel/Python-Tips
|
5e80621ab0d945b873aa499239b27ac2f39335c2
|
[
"MIT"
] | null | null | null |
tips/admin.py
|
Ichinga-Samuel/Python-Tips
|
5e80621ab0d945b873aa499239b27ac2f39335c2
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from tips.models import Tips, Tags, Links
# Register your models here.
admin.site.register(Tips)
admin.site.register(Tags)
admin.site.register(Links)
| 23
| 41
| 0.798913
| 28
| 184
| 5.25
| 0.464286
| 0.183673
| 0.346939
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.103261
| 184
| 7
| 42
| 26.285714
| 0.890909
| 0.141304
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 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
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
e3a8b7291785585600c0c912027808c1c6e940e8
| 37
|
py
|
Python
|
DataStructuresAlgorithms/ArrayBasedSequences/test.py
|
M1NH42/python-dsa
|
297e70d68bb81aececad1279e5c16e42eb941975
|
[
"MIT"
] | null | null | null |
DataStructuresAlgorithms/ArrayBasedSequences/test.py
|
M1NH42/python-dsa
|
297e70d68bb81aececad1279e5c16e42eb941975
|
[
"MIT"
] | null | null | null |
DataStructuresAlgorithms/ArrayBasedSequences/test.py
|
M1NH42/python-dsa
|
297e70d68bb81aececad1279e5c16e42eb941975
|
[
"MIT"
] | null | null | null |
print([i*i for i in range(2, 11, 2)])
| 37
| 37
| 0.594595
| 10
| 37
| 2.2
| 0.7
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.129032
| 0.162162
| 37
| 1
| 37
| 37
| 0.580645
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
e3e18177feb8e33ddd4dc4060b814c3b6a0201e5
| 52
|
py
|
Python
|
brainframe_qt/ui/resources/mixins/__init__.py
|
aotuai/brainframe-qt
|
082cfd0694e569122ff7c63e56dd0ec4b62d5bac
|
[
"BSD-3-Clause"
] | 17
|
2021-02-11T18:19:22.000Z
|
2022-02-08T06:12:50.000Z
|
brainframe_qt/ui/resources/mixins/__init__.py
|
aotuai/brainframe-qt
|
082cfd0694e569122ff7c63e56dd0ec4b62d5bac
|
[
"BSD-3-Clause"
] | 80
|
2021-02-11T08:27:31.000Z
|
2021-10-13T21:33:22.000Z
|
brainframe_qt/ui/resources/mixins/__init__.py
|
aotuai/brainframe-qt
|
082cfd0694e569122ff7c63e56dd0ec4b62d5bac
|
[
"BSD-3-Clause"
] | 5
|
2021-02-12T09:51:34.000Z
|
2022-02-08T09:25:15.000Z
|
from .base_mixin import BaseQMixin, BaseWidgetMixin
| 26
| 51
| 0.865385
| 6
| 52
| 7.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.096154
| 52
| 1
| 52
| 52
| 0.93617
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
585239c8e474b9da3aea97ea016a908dda4c0d78
| 19
|
py
|
Python
|
a.py
|
Deep-PySean/test
|
3590417dcf286ade6fc69ad05a2fff88517dc149
|
[
"MIT"
] | null | null | null |
a.py
|
Deep-PySean/test
|
3590417dcf286ade6fc69ad05a2fff88517dc149
|
[
"MIT"
] | null | null | null |
a.py
|
Deep-PySean/test
|
3590417dcf286ade6fc69ad05a2fff88517dc149
|
[
"MIT"
] | null | null | null |
a=10
b= 100
c=3000
| 4.75
| 6
| 0.631579
| 6
| 19
| 2
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.6
| 0.210526
| 19
| 3
| 7
| 6.333333
| 0.2
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
585d5adfb3c0ff9dafa35f26104e8c08d987a335
| 65
|
py
|
Python
|
chapter-06/experiment.py
|
krastin/pp-cs3.0
|
502be9aac2d84215db176864e443c219e5e26591
|
[
"MIT"
] | null | null | null |
chapter-06/experiment.py
|
krastin/pp-cs3.0
|
502be9aac2d84215db176864e443c219e5e26591
|
[
"MIT"
] | null | null | null |
chapter-06/experiment.py
|
krastin/pp-cs3.0
|
502be9aac2d84215db176864e443c219e5e26591
|
[
"MIT"
] | null | null | null |
print("The panda's scientific name is 'Ailuropoda melanoleuca'")
| 32.5
| 64
| 0.784615
| 9
| 65
| 5.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.107692
| 65
| 1
| 65
| 65
| 0.87931
| 0
| 0
| 0
| 0
| 0
| 0.846154
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
5862f958a037696023d396bde6f4c8bb47174c4a
| 111
|
py
|
Python
|
Python/Sets/the_captains_room.py
|
LikimiaD/HackerRank
|
ad34261ea4d7d721f92a3230a369eccaac5ef88b
|
[
"MIT"
] | null | null | null |
Python/Sets/the_captains_room.py
|
LikimiaD/HackerRank
|
ad34261ea4d7d721f92a3230a369eccaac5ef88b
|
[
"MIT"
] | null | null | null |
Python/Sets/the_captains_room.py
|
LikimiaD/HackerRank
|
ad34261ea4d7d721f92a3230a369eccaac5ef88b
|
[
"MIT"
] | null | null | null |
from collections import Counter
_, x = input(),map(int, input().split())
print(Counter(x).most_common()[-1][0])
| 37
| 40
| 0.693694
| 17
| 111
| 4.411765
| 0.823529
| 0.213333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.019608
| 0.081081
| 111
| 3
| 41
| 37
| 0.715686
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0.333333
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
586cbfd33bd1f92122f416d52dcbca68bc0112ce
| 87
|
py
|
Python
|
2525.py
|
FelisCatusKR/Baekjoon_Python3
|
d84dc9421fe956001864d138b6d6ec9ebd793edf
|
[
"MIT"
] | null | null | null |
2525.py
|
FelisCatusKR/Baekjoon_Python3
|
d84dc9421fe956001864d138b6d6ec9ebd793edf
|
[
"MIT"
] | null | null | null |
2525.py
|
FelisCatusKR/Baekjoon_Python3
|
d84dc9421fe956001864d138b6d6ec9ebd793edf
|
[
"MIT"
] | null | null | null |
# 2525.py
a,b=map(int,input().split());c=int(input());print((a+(b+c)//60)%24,(b+c)%60)
| 43.5
| 76
| 0.563218
| 21
| 87
| 2.380952
| 0.619048
| 0.08
| 0.16
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.117647
| 0.022989
| 87
| 2
| 76
| 43.5
| 0.458824
| 0.08046
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 1
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
54319072d72fee70f27277e2526e29430d5b0b4d
| 434
|
py
|
Python
|
tests/__init__.py
|
stagedml/pylightnix
|
b475057f03db1d0b975500d079745c4de9c42069
|
[
"Apache-2.0"
] | 9
|
2020-01-25T12:03:12.000Z
|
2021-10-12T08:22:33.000Z
|
tests/__init__.py
|
stagedml/pylightnix
|
b475057f03db1d0b975500d079745c4de9c42069
|
[
"Apache-2.0"
] | 1
|
2020-02-16T10:47:34.000Z
|
2020-02-20T17:11:45.000Z
|
tests/__init__.py
|
stagedml/pylightnix
|
b475057f03db1d0b975500d079745c4de9c42069
|
[
"Apache-2.0"
] | null | null | null |
from tests.setup import *
from tests.generators import *
from tests.test_arch import *
from tests.test_bashlike import *
from tests.test_build import *
from tests.test_core1 import *
from tests.test_core2 import *
from tests.test_either import *
from tests.test_fetch import *
from tests.test_fetch2 import *
from tests.test_lens import *
from tests.test_repl import *
from tests.test_trivial import *
from tests.test_utils import *
| 27.125
| 33
| 0.804147
| 68
| 434
| 4.955882
| 0.264706
| 0.373887
| 0.578635
| 0.676558
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007958
| 0.131336
| 434
| 15
| 34
| 28.933333
| 0.885942
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
543386fea98def4e866d6898e75bf1cf61ab9d2f
| 14,991
|
py
|
Python
|
tests/unit/hardware/TestLaserDiode.py
|
rakhimov/rtk
|
adc35e218ccfdcf3a6e3082f6a1a1d308ed4ff63
|
[
"BSD-3-Clause"
] | null | null | null |
tests/unit/hardware/TestLaserDiode.py
|
rakhimov/rtk
|
adc35e218ccfdcf3a6e3082f6a1a1d308ed4ff63
|
[
"BSD-3-Clause"
] | null | null | null |
tests/unit/hardware/TestLaserDiode.py
|
rakhimov/rtk
|
adc35e218ccfdcf3a6e3082f6a1a1d308ed4ff63
|
[
"BSD-3-Clause"
] | 2
|
2020-04-03T04:14:42.000Z
|
2021-02-22T05:30:35.000Z
|
#!/usr/bin/env python -O
"""
This is the test class for testing Laser Diode module algorithms and models.
"""
# -*- coding: utf-8 -*-
#
# tests.unit.TestLaserDiode.py is part of The RTK Project
#
# All rights reserved.
import sys
from os.path import dirname
sys.path.insert(0, dirname(dirname(dirname(__file__))) + "/rtk", )
import unittest
from nose.plugins.attrib import attr
from hardware.component.semiconductor.optoelectronic.LaserDiode import *
__author__ = 'Andrew Rowland'
__email__ = 'andrew.rowland@reliaqual.com'
__organization__ = 'ReliaQual Associates, LLC'
__copyright__ = 'Copyright 2015 Andrew "Weibullguy" Rowland'
class TestLaserDiodeModel(unittest.TestCase):
"""
Class for testing the Optoelectronic Laser Diode data model class.
"""
def setUp(self):
"""
Setup the test fixture for the Optoelectronic Laser Diode class.
"""
self.DUT = LaserDiode()
@attr(all=True, unit=True)
def test_create(self):
"""
(TestLaserDiode) __init__ should return a Optoelectronic LaserDiode data model
"""
self.assertTrue(isinstance(self.DUT, LaserDiode))
# Verify Hardware class was properly initialized.
self.assertEqual(self.DUT.revision_id, None)
self.assertEqual(self.DUT.category_id, 0)
# Verify the Semiconductor class was properly initialized.
self.assertEqual(self.DUT.category, 2)
self.assertEqual(self.DUT.quality, 0)
self.assertEqual(self.DUT.q_override, 0.0)
self.assertEqual(self.DUT.base_hr, 0.0)
self.assertEqual(self.DUT.piQ, 0.0)
self.assertEqual(self.DUT.piE, 0.0)
self.assertEqual(self.DUT.piT, 0.0)
# Verify the Optoelectronic Laser Diode class was properly initialized.
self.assertEqual(self.DUT._lst_lambdab, [3.23, 5.65])
self.assertEqual(self.DUT._lst_piE, [1.0, 2.0, 8.0, 5.0, 12.0, 4.0,
6.0, 6.0, 8.0, 17.0, 0.5, 9.0,
24.0, 450.0])
self.assertEqual(self.DUT._lst_piQ_count, [1.0, 1.0, 3.3])
self.assertEqual(self.DUT._lst_piQ_stress, [1.0, 1.0, 3.3])
self.assertEqual(self.DUT._lambdab_count, [[5.1, 16.0, 49.0, 32.0,
110.0, 58.0, 72.0, 100.0,
170.0, 230.0, 2.6, 87.0,
350.0, 2000.0],
[8.9, 28.0, 85.0, 55.0,
190.0, 100.0, 130.0, 180.0,
300.0, 400.0, 4.5, 150.0,
600.0, 3500.0]])
self.assertEqual(self.DUT.subcategory, 24)
self.assertEqual(self.DUT.type, 0)
self.assertEqual(self.DUT.application, 0)
self.assertEqual(self.DUT.required_power, 0.0)
self.assertEqual(self.DUT.piI, 0.0)
self.assertEqual(self.DUT.piA, 0.0)
self.assertEqual(self.DUT.piP, 0.0)
@attr(all=True, unit=True)
def test_set_attributes(self):
"""
(TestLaserDiode) set_attributes should return a 0 error code on success
"""
_values = (0, 32, 'Alt Part #', 'Attachments', 'CAGE Code',
'Comp Ref Des', 0.0, 0.0, 0.0, 'Description', 100.0, 0,
0, 'Figure #', 50.0, 'LCN', 1, 0, 10.0, 'Name', 'NSN', 0,
'Page #', 0, 0, 'Part #', 1, 'Ref Des', 1.0, 0,
'Remarks', 0.0, 'Spec #', 0, 30.0, 30.0, 0.0, 2014,
1.0, 155.0, -25.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
0.0, 1.0,
0.0, 1.0, 1.0, 0.0, 0.0, 0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
1, 0.0, '', 0.0, 0.0, 0.0, 1, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0,
0, 0, 1, 0.0,
0, 0, 0.0, 30.0, 0.0, 358.0,
1.0, 0.01, 2.0, 1.0, 1.0, 0.5, 0.8, 0.03, 2.3, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 3, 2, 8)
(_error_code,
_error_msg) = self.DUT.set_attributes(_values)
self.assertEqual(_error_code, 0)
self.assertEqual(self.DUT.type, 2)
self.assertEqual(self.DUT.application, 8)
self.assertEqual(self.DUT.required_power, 0.5)
self.assertEqual(self.DUT.piI, 0.8)
self.assertEqual(self.DUT.piA, 0.03)
self.assertEqual(self.DUT.piP, 2.3)
@attr(all=True, unit=True)
def test_set_attributes_missing_index(self):
"""
(TestLaserDiode) set_attributes should return a 40 error code when too few items are passed
"""
_values = (0, 32, 'Alt Part #', 'Attachments', 'CAGE Code',
'Comp Ref Des', 0.0, 0.0, 0.0, 'Description', 100.0, 0,
0, 'Figure #', 50.0, 'LCN', 1, 0, 10.0, 'Name', 'NSN', 0,
'Page #', 0, 0, 'Part #', 1, 'Ref Des', 1.0, 0,
'Remarks', 0.0, 'Spec #', 0, 30.0, 30.0, 0.0, 2014,
1.0, 155.0, -25.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
0.0, 1.0,
0.0, 1.0, 1.0, 0.0, 0.0, 0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
1, 0.0, '', 0.0, 0.0, 0.0, 1, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0,
0, 0, 1, 0.0,
0, 0, 0.0, 30.0, 0.0, 358.0,
1.0, 2.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 3, 2)
(_error_code,
_error_msg) = self.DUT.set_attributes(_values)
self.assertEqual(_error_code, 40)
@attr(all=True, unit=True)
def test_set_attributes_type_error(self):
"""
(TestLaserDiode) set_attributes should return a 10 error code when the wrong type is passed
"""
_values = (0, 32, 'Alt Part #', 'Attachments', 'CAGE Code',
'Comp Ref Des', 0.0, 0.0, 0.0, 'Description', 100.0, 0,
0, 'Figure #', 50.0, 'LCN', 1, 0, 10.0, 'Name', 'NSN', 0,
'Page #', 0, 0, 'Part #', 1, 'Ref Des', 1.0, 0,
'Remarks', 0.0, 'Spec #', 0, 30.0, 30.0, 0.0, 2014,
1.0, 155.0, -25.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
0.0, 1.0,
0.0, 1.0, 1.0, 0.0, 0.0, 0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
1, 0.0, '', 0.0, 0.0, 0.0, 1, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0,
0, 0, 1, 0.0,
0, 0, 0.0, 30.0, 0.0, 358.0,
1.0, 1.0, 0.01, 2.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 3, '', 2)
(_error_code,
_error_msg) = self.DUT.set_attributes(_values)
self.assertEqual(_error_code, 10)
@attr(all=True, unit=True)
def test_get_attributes(self):
"""
(TestLaserDiode) get_attributes should return a tuple of attribute values
"""
_values = (None, None, '', '', '', '', 0.0, 0.0, 0.0, '', 100.0, 0, 0,
'', 50.0, '', 1, 0, 10.0, '', '', 0, '', 0, 0, '', 1, '',
1.0, 0, '', 0.0, '', 0, 30.0, 30.0, 0.0, 2014,
1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 0.0, 1.0,
0.0, 1.0, 1.0, 0.0, 0.0, 0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1,
0.0, {}, 0.0, 0.0, 0.0, 1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0,
0, 0,
0.0, 30.0, 0.0, 30.0,
0, 0.0, 0.0, 0.0, 0.0, 0.0, '', 0, 0, 0.0, 0.0, 0.0, 0.0)
self.assertEqual(self.DUT.get_attributes(), _values)
@attr(all=True, unit=True)
def test_attribute_sanity(self):
"""
(TestLaserDiode) get_attributes(set_attributes(values)) == values
"""
_in_values = (0, 32, 'Alt Part #', 'Attachments', 'CAGE Code',
'Comp Ref Des', 0.0, 0.0, 0.0, 'Description', 100.0, 0,
0, 'Figure #', 50.0, 'LCN', 1, 0, 10.0, 'Name', 'NSN', 0,
'Page #', 0, 0, 'Part #', 1, 'Ref Des', 1.0, 0,
'Remarks', 0.0, 'Spec #', 0, 30.0, 30.0, 0.0, 2014,
1.0, 155.0, -25.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
0.0, 1.0,
0.0, 1.0, 1.0, 0.0, 0.0, 0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
1, 0.0, '', 0.0, 0.0, 0.0, 1, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0,
0, 0, 1, 0.0,
0, 0, 0.0, 30.0, 0.0, 358.0,
1.0, 0.01, 2.0, 1.0, 1.0, 0.5, 0.8, 0.03, 2.3, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 3, 4, 8)
_out_values = (0, 32, 'Alt Part #', 'Attachments', 'CAGE Code',
'Comp Ref Des', 0.0, 0.0, 0.0, 'Description', 100.0, 0,
0, 'Figure #', 50.0, 'LCN', 1, 0, 10.0, 'Name', 'NSN',
0, 'Page #', 0, 0, 'Part #', 1, 'Ref Des', 1.0, 0,
'Remarks', 0.0, 'Spec #', 0, 30.0, 30.0, 0.0, 2014,
1.0, 155.0, -25.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
0.0, 1.0,
0.0, 1.0, 1.0, 0.0, 0.0, 0, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 1, 0.0, '', 0.0, 0.0, 0.0, 1, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 0.0,
0.0, 0,
0, 0, 0.0, 30.0, 0.0, 358.0,
3, 1.0, 0.01, 2.0, 1.0, 1.0, '', 4, 8, 0.5, 0.8, 0.03,
2.3)
self.DUT.set_attributes(_in_values)
_result = self.DUT.get_attributes()
self.assertEqual(_result, _out_values)
@attr(all=True, unit=True)
def test_overstressed_high_voltage(self):
"""
(TestLaserDiode) _overstressed should return False and overstress=False on success with operating voltage greater than rated
"""
self.DUT.operating_voltage = 18.0
self.DUT.rated_voltage = 25.0
self.assertFalse(self.DUT._overstressed())
self.assertTrue(self.DUT.overstress)
@attr(all=True, unit=True)
def test_overstressed_high_temperature(self):
"""
(TestLaserDiode) _overstressed should return False and overstress=False on success with junction temperature greater than 125C
"""
self.DUT.junction_temperature = 135.0
self.assertFalse(self.DUT._overstressed())
self.assertTrue(self.DUT.overstress)
@attr(all=True, unit=True)
def test_calculate_217_count_gaas(self):
"""
(TestLaserDiode) calculate_part should return False on success when calculating MIL-HDBK-217F parts count results for a GaAs laser
"""
self.DUT.quality = 1
self.DUT.environment_active = 5
self.DUT.hazard_rate_type = 1
self.DUT.type = 1
self.assertFalse(self.DUT.calculate_part())
self.assertEqual(self.DUT.hazard_rate_model['equation'],
'lambdab * piQ')
self.assertEqual(self.DUT.hazard_rate_model['lambdab'], 110.0)
self.assertEqual(self.DUT.hazard_rate_model['piQ'], 1.0)
self.assertAlmostEqual(self.DUT.hazard_rate_active, 1.1E-04)
@attr(all=True, unit=True)
def test_calculate_217_count_ingaas(self):
"""
(TestLaserDiode) calculate_part should return False on success when calculating MIL-HDBK-217F parts count results for an InGaAs laser
"""
self.DUT.quality = 1
self.DUT.environment_active = 5
self.DUT.hazard_rate_type = 1
self.DUT.type = 2
self.assertFalse(self.DUT.calculate_part())
self.assertEqual(self.DUT.hazard_rate_model['equation'],
'lambdab * piQ')
self.assertEqual(self.DUT.hazard_rate_model['lambdab'], 190.0)
self.assertEqual(self.DUT.hazard_rate_model['piQ'], 1.0)
self.assertAlmostEqual(self.DUT.hazard_rate_active, 1.9E-04)
@attr(all=True, unit=True)
def test_calculate_217_stress_gaas(self):
"""
(TestLaserDiode) calculate_part should return False on success when calculating MIL-HDBK-217F stress results
"""
self.DUT.environment_active = 2
self.DUT.hazard_rate_type = 2
self.DUT.quality = 1
self.DUT.operating_current = 2.0
self.DUT.rated_power = 33.0
self.DUT.type = 1
self.DUT.application = 1
self.DUT.required_power = 15.0
self.assertFalse(self.DUT.calculate_part())
self.assertEqual(self.DUT.hazard_rate_model['equation'],
'lambdab * piT * piQ * piI * piA * piP * piE')
self.assertEqual(self.DUT.hazard_rate_model['lambdab'], 3.23)
self.assertAlmostEqual(self.DUT.hazard_rate_model['piT'], 0.24066949)
self.assertEqual(self.DUT.hazard_rate_model['piQ'], 1.0)
self.assertAlmostEqual(self.DUT.hazard_rate_model['piI'], 1.60213976)
self.assertEqual(self.DUT.hazard_rate_model['piA'], 4.4)
self.assertAlmostEqual(self.DUT.hazard_rate_model['piP'], 0.91666667)
self.assertEqual(self.DUT.hazard_rate_model['piE'], 2.0)
self.assertAlmostEqual(self.DUT.hazard_rate_active, 1.0046576E-05)
@attr(all=True, unit=True)
def test_calculate_217_stress_ingaas(self):
"""
(TestLaserDiode) calculate_part should return False on success when calculating MIL-HDBK-217F stress results
"""
self.DUT.environment_active = 2
self.DUT.hazard_rate_type = 2
self.DUT.quality = 1
self.DUT.operating_current = 2.0
self.DUT.rated_power = 33.0
self.DUT.type = 2
self.DUT.application = 1
self.DUT.required_power = 15.0
self.assertFalse(self.DUT.calculate_part())
self.assertEqual(self.DUT.hazard_rate_model['equation'],
'lambdab * piT * piQ * piI * piA * piP * piE')
self.assertEqual(self.DUT.hazard_rate_model['lambdab'], 5.65)
self.assertAlmostEqual(self.DUT.hazard_rate_model['piT'], 0.24066949)
self.assertEqual(self.DUT.hazard_rate_model['piQ'], 1.0)
self.assertAlmostEqual(self.DUT.hazard_rate_model['piI'], 1.60213976)
self.assertEqual(self.DUT.hazard_rate_model['piA'], 4.4)
self.assertAlmostEqual(self.DUT.hazard_rate_model['piP'], 0.91666667)
self.assertEqual(self.DUT.hazard_rate_model['piE'], 2.0)
self.assertAlmostEqual(self.DUT.hazard_rate_active, 1.7573732E-05)
| 45.018018
| 141
| 0.514175
| 2,384
| 14,991
| 3.144295
| 0.099832
| 0.158218
| 0.196105
| 0.223052
| 0.787353
| 0.739861
| 0.701441
| 0.666489
| 0.640608
| 0.617263
| 0
| 0.149135
| 0.32146
| 14,991
| 332
| 142
| 45.153614
| 0.58779
| 0.114869
| 0
| 0.543103
| 0
| 0
| 0.065075
| 0.002164
| 0
| 0
| 0
| 0
| 0.288793
| 1
| 0.056034
| false
| 0
| 0.021552
| 0
| 0.081897
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 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
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
5448f806d48e66c379fe262c7a969638dda5c7bb
| 233
|
py
|
Python
|
8 kyu - Opposite number.py
|
ricardopizzimenti/Codewars
|
bbebc3f62642e22109d6a5ac0cdd638bca02e6ca
|
[
"MIT"
] | null | null | null |
8 kyu - Opposite number.py
|
ricardopizzimenti/Codewars
|
bbebc3f62642e22109d6a5ac0cdd638bca02e6ca
|
[
"MIT"
] | null | null | null |
8 kyu - Opposite number.py
|
ricardopizzimenti/Codewars
|
bbebc3f62642e22109d6a5ac0cdd638bca02e6ca
|
[
"MIT"
] | null | null | null |
"""
Very simple, given a number, find its opposite.
Examples:
1: -1
14: -14
-34: 34
"""
# OPTION 1
# def opposite(number):
# return number - number * 2
# OPTION 2
def opposite(number):
return -number
print(opposite(1))
| 10.590909
| 47
| 0.635193
| 34
| 233
| 4.352941
| 0.5
| 0.148649
| 0.22973
| 0.310811
| 0.391892
| 0
| 0
| 0
| 0
| 0
| 0
| 0.077348
| 0.223176
| 233
| 21
| 48
| 11.095238
| 0.740331
| 0.652361
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0.333333
| 0.666667
| 0.333333
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
54712eec73210cdc907a98927af264f93d7921bb
| 132
|
py
|
Python
|
math/0x02-calculus/tests/10-main.py
|
cbarros7/holbertonschool-machine_learning
|
1edb4c253441f6319b86c9c590d1e7dd3fc32bf4
|
[
"MIT"
] | 1
|
2022-03-09T19:12:22.000Z
|
2022-03-09T19:12:22.000Z
|
math/0x02-calculus/tests/10-main.py
|
cbarros7/holbertonschool-machine_learning
|
1edb4c253441f6319b86c9c590d1e7dd3fc32bf4
|
[
"MIT"
] | null | null | null |
math/0x02-calculus/tests/10-main.py
|
cbarros7/holbertonschool-machine_learning
|
1edb4c253441f6319b86c9c590d1e7dd3fc32bf4
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python3
poly_derivative = __import__('10-matisse').poly_derivative
poly = [5, 3, 0, 1]
print(poly_derivative(poly))
| 22
| 58
| 0.734848
| 20
| 132
| 4.5
| 0.7
| 0.466667
| 0.4
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.058824
| 0.098485
| 132
| 6
| 59
| 22
| 0.697479
| 0.159091
| 0
| 0
| 0
| 0
| 0.09009
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0.333333
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
549b346c130969fde7527bc1875c60521a380a37
| 425
|
py
|
Python
|
libs/sqlobject/tests/test_md5.py
|
scambra/HTPC-Manager
|
1a1440db84ae1b6e7a2610c7f3bd5b6adf0aab1d
|
[
"MIT"
] | 422
|
2015-01-08T14:08:08.000Z
|
2022-02-07T11:47:37.000Z
|
libs/sqlobject/tests/test_md5.py
|
scambra/HTPC-Manager
|
1a1440db84ae1b6e7a2610c7f3bd5b6adf0aab1d
|
[
"MIT"
] | 581
|
2015-01-01T08:07:16.000Z
|
2022-02-23T11:44:37.000Z
|
libs/sqlobject/tests/test_md5.py
|
scambra/HTPC-Manager
|
1a1440db84ae1b6e7a2610c7f3bd5b6adf0aab1d
|
[
"MIT"
] | 115
|
2015-01-08T14:41:00.000Z
|
2022-02-13T12:31:17.000Z
|
from hashlib import md5
########################################
## hashlib.md5
########################################
def test_md5():
assert md5('').hexdigest() == 'd41d8cd98f00b204e9800998ecf8427e'
assert md5('\n').hexdigest() == '68b329da9893e34099c7d8ad5cb9c940'
assert md5('123').hexdigest() == '202cb962ac59075b964b07152d234b70'
assert md5('123\n').hexdigest() == 'ba1f2511fc30423bdbb183fe33f3dd0f'
| 35.416667
| 73
| 0.585882
| 29
| 425
| 8.551724
| 0.482759
| 0.145161
| 0.096774
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.251969
| 0.103529
| 425
| 11
| 74
| 38.636364
| 0.39895
| 0.025882
| 0
| 0
| 0
| 0
| 0.416918
| 0.386707
| 0
| 0
| 0
| 0
| 0.666667
| 1
| 0.166667
| true
| 0
| 0.166667
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
54c2ee139ae0a3429287cea8673ba381871e8599
| 32
|
py
|
Python
|
server/utils/__init__.py
|
CNC-lathe/learning-factory-server
|
a686c430a5944c38c3a5fc810d78bb5f7bc5855e
|
[
"MIT"
] | null | null | null |
server/utils/__init__.py
|
CNC-lathe/learning-factory-server
|
a686c430a5944c38c3a5fc810d78bb5f7bc5855e
|
[
"MIT"
] | 1
|
2021-02-28T04:10:25.000Z
|
2021-02-28T04:10:25.000Z
|
server/utils/__init__.py
|
CNC-lathe/learning-factory-server
|
a686c430a5944c38c3a5fc810d78bb5f7bc5855e
|
[
"MIT"
] | null | null | null |
from .yaml_loader import Loader
| 16
| 31
| 0.84375
| 5
| 32
| 5.2
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.125
| 32
| 1
| 32
| 32
| 0.928571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
49ae0dc4862053d006953ef12fff2a2d02f8fa10
| 215
|
py
|
Python
|
python/setup.py
|
snitish/libgmm
|
0e987ce3de4770f2b4853d0ec111ee844ea299dc
|
[
"MIT"
] | 1
|
2018-05-08T06:57:08.000Z
|
2018-05-08T06:57:08.000Z
|
python/setup.py
|
snitish/libgmm
|
0e987ce3de4770f2b4853d0ec111ee844ea299dc
|
[
"MIT"
] | null | null | null |
python/setup.py
|
snitish/libgmm
|
0e987ce3de4770f2b4853d0ec111ee844ea299dc
|
[
"MIT"
] | null | null | null |
from distutils.core import setup, Extension
import numpy.distutils.misc_util
setup(
ext_modules=[Extension("gmm", ["gmmmodule.c", "../gmm.c"])],
include_dirs=numpy.distutils.misc_util.get_numpy_include_dirs(),
)
| 26.875
| 65
| 0.767442
| 30
| 215
| 5.266667
| 0.566667
| 0.177215
| 0.227848
| 0.278481
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.074419
| 215
| 7
| 66
| 30.714286
| 0.79397
| 0
| 0
| 0
| 0
| 0
| 0.102326
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 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
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
49e47e37b513a530c57287a51b74b80f6c1a9157
| 50
|
py
|
Python
|
scrapy_dynamic_spiders/wranglers/__init__.py
|
harootune/scrapy_dynamic_spiders
|
a443533c17af6ba906e28fc897f7a6e4d19c2ed0
|
[
"MIT"
] | null | null | null |
scrapy_dynamic_spiders/wranglers/__init__.py
|
harootune/scrapy_dynamic_spiders
|
a443533c17af6ba906e28fc897f7a6e4d19c2ed0
|
[
"MIT"
] | null | null | null |
scrapy_dynamic_spiders/wranglers/__init__.py
|
harootune/scrapy_dynamic_spiders
|
a443533c17af6ba906e28fc897f7a6e4d19c2ed0
|
[
"MIT"
] | 1
|
2020-11-24T15:48:26.000Z
|
2020-11-24T15:48:26.000Z
|
# local
from .base_wrangler import SpiderWrangler
| 16.666667
| 41
| 0.84
| 6
| 50
| 6.833333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.12
| 50
| 2
| 42
| 25
| 0.931818
| 0.1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
49faf7c8d5be8be9941e67c197629b8f04209032
| 110
|
py
|
Python
|
code/test/profle-code.py
|
mufajjul/staging_approval_mlops
|
aa8a22b63cc2c02ddeea00cc771ac87f49373b40
|
[
"MIT"
] | null | null | null |
code/test/profle-code.py
|
mufajjul/staging_approval_mlops
|
aa8a22b63cc2c02ddeea00cc771ac87f49373b40
|
[
"MIT"
] | 3
|
2022-03-16T15:00:01.000Z
|
2022-03-22T09:58:20.000Z
|
code/test/profle-code.py
|
mufajjul/staging_approval_mlops
|
aa8a22b63cc2c02ddeea00cc771ac87f49373b40
|
[
"MIT"
] | 1
|
2022-03-22T09:56:12.000Z
|
2022-03-22T09:56:12.000Z
|
import cProfile
import random
import re
cProfile.run("sum([random.randint(1,10) for i in range(1000000)])")
| 15.714286
| 67
| 0.745455
| 18
| 110
| 4.555556
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.103093
| 0.118182
| 110
| 6
| 68
| 18.333333
| 0.742268
| 0
| 0
| 0
| 0
| 0
| 0.472222
| 0.231481
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.75
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
b707939e054ccd4cda9eccf24260cb36eb70970e
| 118
|
py
|
Python
|
cvutils/misc/__init__.py
|
MercierLucas/cv_utils
|
34683bfc06857c3ed293924201c9279606029ae0
|
[
"MIT"
] | null | null | null |
cvutils/misc/__init__.py
|
MercierLucas/cv_utils
|
34683bfc06857c3ed293924201c9279606029ae0
|
[
"MIT"
] | null | null | null |
cvutils/misc/__init__.py
|
MercierLucas/cv_utils
|
34683bfc06857c3ed293924201c9279606029ae0
|
[
"MIT"
] | null | null | null |
from .iterators import Slider, SquareSlider2D
from .tuner import Tuner, TunerParameter
from .config import load_config
| 39.333333
| 45
| 0.847458
| 15
| 118
| 6.6
| 0.6
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.009524
| 0.110169
| 118
| 3
| 46
| 39.333333
| 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
| 1
| 0
|
0
| 5
|
3fd7a4c4245dbbc3bf6a840576d42a2d89c8f06d
| 45
|
py
|
Python
|
populous/messaging/concierge/exceptions.py
|
caiges/populous
|
d07094f9d6b2528d282ed99af0063002480bc00b
|
[
"BSD-3-Clause"
] | 2
|
2016-05-09T01:17:08.000Z
|
2017-07-18T23:35:01.000Z
|
populous/messaging/concierge/exceptions.py
|
caiges/populous
|
d07094f9d6b2528d282ed99af0063002480bc00b
|
[
"BSD-3-Clause"
] | null | null | null |
populous/messaging/concierge/exceptions.py
|
caiges/populous
|
d07094f9d6b2528d282ed99af0063002480bc00b
|
[
"BSD-3-Clause"
] | null | null | null |
class ConciergeError(BaseException):
pass
| 22.5
| 36
| 0.8
| 4
| 45
| 9
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.133333
| 45
| 2
| 37
| 22.5
| 0.923077
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
b7bfd2e7721c90614fa5ef8d5763c8a8e7027fe8
| 86
|
py
|
Python
|
tests/test_version.py
|
xsuite/xcol
|
5ca9d49a3a09aeecfa5fc193631ad49f7f582408
|
[
"Apache-2.0"
] | null | null | null |
tests/test_version.py
|
xsuite/xcol
|
5ca9d49a3a09aeecfa5fc193631ad49f7f582408
|
[
"Apache-2.0"
] | null | null | null |
tests/test_version.py
|
xsuite/xcol
|
5ca9d49a3a09aeecfa5fc193631ad49f7f582408
|
[
"Apache-2.0"
] | null | null | null |
from xcoll import __version__
def test_version():
assert __version__ == '0.1.1'
| 14.333333
| 33
| 0.709302
| 12
| 86
| 4.333333
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.042857
| 0.186047
| 86
| 5
| 34
| 17.2
| 0.7
| 0
| 0
| 0
| 0
| 0
| 0.058824
| 0
| 0
| 0
| 0
| 0
| 0.333333
| 1
| 0.333333
| true
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
b7d7142a6f51873ecbfb2d2f861c4c62066af210
| 8,416
|
py
|
Python
|
sdk/eventhub/azure-eventhubs/tests/livetest/asynctests/test_negative_async.py
|
GabrielHobold/azure-sdk-for-python
|
7248645bcb0d590eafdae6ffc9d25ec688a0ff68
|
[
"MIT"
] | null | null | null |
sdk/eventhub/azure-eventhubs/tests/livetest/asynctests/test_negative_async.py
|
GabrielHobold/azure-sdk-for-python
|
7248645bcb0d590eafdae6ffc9d25ec688a0ff68
|
[
"MIT"
] | null | null | null |
sdk/eventhub/azure-eventhubs/tests/livetest/asynctests/test_negative_async.py
|
GabrielHobold/azure-sdk-for-python
|
7248645bcb0d590eafdae6ffc9d25ec688a0ff68
|
[
"MIT"
] | null | null | null |
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#--------------------------------------------------------------------------
import os
import asyncio
import pytest
import time
import sys
from azure.eventhub import (
EventData,
EventPosition,
EventHubError,
ConnectError,
ConnectionLostError,
AuthenticationError,
EventDataError,
EventDataSendError,
)
from azure.eventhub.aio import EventHubClient
@pytest.mark.liveTest
@pytest.mark.asyncio
async def test_send_with_invalid_hostname_async(invalid_hostname, connstr_receivers):
_, receivers = connstr_receivers
client = EventHubClient.from_connection_string(invalid_hostname, network_tracing=False)
sender = client.create_producer()
with pytest.raises(AuthenticationError):
await sender.send(EventData("test data"))
await sender.close()
@pytest.mark.liveTest
@pytest.mark.asyncio
async def test_receive_with_invalid_hostname_async(invalid_hostname):
client = EventHubClient.from_connection_string(invalid_hostname, network_tracing=False)
receiver = client.create_consumer(consumer_group="$default", partition_id="0", event_position=EventPosition("-1"))
with pytest.raises(AuthenticationError):
await receiver.receive(timeout=3)
await receiver.close()
@pytest.mark.liveTest
@pytest.mark.asyncio
async def test_send_with_invalid_key_async(invalid_key, connstr_receivers):
_, receivers = connstr_receivers
client = EventHubClient.from_connection_string(invalid_key, network_tracing=False)
sender = client.create_producer()
with pytest.raises(AuthenticationError):
await sender.send(EventData("test data"))
await sender.close()
@pytest.mark.liveTest
@pytest.mark.asyncio
async def test_receive_with_invalid_key_async(invalid_key):
client = EventHubClient.from_connection_string(invalid_key, network_tracing=False)
receiver = client.create_consumer(consumer_group="$default", partition_id="0", event_position=EventPosition("-1"))
with pytest.raises(AuthenticationError):
await receiver.receive(timeout=3)
await receiver.close()
@pytest.mark.liveTest
@pytest.mark.asyncio
async def test_send_with_invalid_policy_async(invalid_policy, connstr_receivers):
_, receivers = connstr_receivers
client = EventHubClient.from_connection_string(invalid_policy, network_tracing=False)
sender = client.create_producer()
with pytest.raises(AuthenticationError):
await sender.send(EventData("test data"))
await sender.close()
@pytest.mark.liveTest
@pytest.mark.asyncio
async def test_receive_with_invalid_policy_async(invalid_policy):
client = EventHubClient.from_connection_string(invalid_policy, network_tracing=False)
receiver = client.create_consumer(consumer_group="$default", partition_id="0", event_position=EventPosition("-1"))
with pytest.raises(AuthenticationError):
await receiver.receive(timeout=3)
await receiver.close()
@pytest.mark.liveTest
@pytest.mark.asyncio
async def test_send_partition_key_with_partition_async(connection_str):
pytest.skip("No longer raise value error. EventData will be sent to partition_id")
client = EventHubClient.from_connection_string(connection_str, network_tracing=False)
sender = client.create_producer(partition_id="1")
try:
data = EventData(b"Data")
with pytest.raises(ValueError):
await sender.send(EventData("test data"))
finally:
await sender.close()
@pytest.mark.liveTest
@pytest.mark.asyncio
async def test_non_existing_entity_sender_async(connection_str):
client = EventHubClient.from_connection_string(connection_str, event_hub_path="nemo", network_tracing=False)
sender = client.create_producer(partition_id="1")
with pytest.raises(AuthenticationError):
await sender.send(EventData("test data"))
await sender.close()
@pytest.mark.liveTest
@pytest.mark.asyncio
async def test_non_existing_entity_receiver_async(connection_str):
client = EventHubClient.from_connection_string(connection_str, event_hub_path="nemo", network_tracing=False)
receiver = client.create_consumer(consumer_group="$default", partition_id="0", event_position=EventPosition("-1"))
with pytest.raises(AuthenticationError):
await receiver.receive(timeout=5)
await receiver.close()
@pytest.mark.liveTest
@pytest.mark.asyncio
async def test_receive_from_invalid_partitions_async(connection_str):
partitions = ["XYZ", "-1", "1000", "-"]
for p in partitions:
client = EventHubClient.from_connection_string(connection_str, network_tracing=False)
receiver = client.create_consumer(consumer_group="$default", partition_id=p, event_position=EventPosition("-1"))
with pytest.raises(ConnectError):
await receiver.receive(timeout=5)
await receiver.close()
@pytest.mark.liveTest
@pytest.mark.asyncio
async def test_send_to_invalid_partitions_async(connection_str):
partitions = ["XYZ", "-1", "1000", "-"]
for p in partitions:
client = EventHubClient.from_connection_string(connection_str, network_tracing=False)
sender = client.create_producer(partition_id=p)
with pytest.raises(ConnectError):
await sender.send(EventData("test data"))
await sender.close()
@pytest.mark.liveTest
@pytest.mark.asyncio
async def test_send_too_large_message_async(connection_str):
if sys.platform.startswith('darwin'):
pytest.skip("Skipping on OSX - open issue regarding message size")
client = EventHubClient.from_connection_string(connection_str, network_tracing=False)
sender = client.create_producer()
try:
data = EventData(b"A" * 1100000)
with pytest.raises(EventDataSendError):
await sender.send(data)
finally:
await sender.close()
@pytest.mark.liveTest
@pytest.mark.asyncio
async def test_send_null_body_async(connection_str):
client = EventHubClient.from_connection_string(connection_str, network_tracing=False)
sender = client.create_producer()
try:
with pytest.raises(ValueError):
data = EventData(None)
await sender.send(data)
finally:
await sender.close()
async def pump(receiver):
async with receiver:
messages = 0
count = 0
batch = await receiver.receive(timeout=10)
while batch and count <= 5:
count += 1
messages += len(batch)
batch = await receiver.receive(timeout=10)
return messages
@pytest.mark.liveTest
@pytest.mark.asyncio
async def test_max_receivers_async(connstr_senders):
connection_str, senders = connstr_senders
client = EventHubClient.from_connection_string(connection_str, network_tracing=False)
receivers = []
for i in range(6):
receivers.append(client.create_consumer(consumer_group="$default", partition_id="0", prefetch=1000, event_position=EventPosition('@latest')))
outputs = await asyncio.gather(
pump(receivers[0]),
pump(receivers[1]),
pump(receivers[2]),
pump(receivers[3]),
pump(receivers[4]),
pump(receivers[5]),
return_exceptions=True)
print(outputs)
failed = [o for o in outputs if isinstance(o, EventHubError)]
assert len(failed) == 1
print(failed[0].message)
@pytest.mark.liveTest
@pytest.mark.asyncio
async def test_create_batch_with_invalid_hostname_async(invalid_hostname):
client = EventHubClient.from_connection_string(invalid_hostname, network_tracing=False)
sender = client.create_producer()
try:
with pytest.raises(AuthenticationError):
batch_event_data = await sender.create_batch(max_size=300, partition_key="key")
finally:
await sender.close()
@pytest.mark.liveTest
@pytest.mark.asyncio
async def test_create_batch_with_too_large_size_async(connection_str):
client = EventHubClient.from_connection_string(connection_str, network_tracing=False)
sender = client.create_producer()
try:
with pytest.raises(ValueError):
batch_event_data = await sender.create_batch(max_size=5 * 1024 * 1024, partition_key="key")
finally:
await sender.close()
| 36.4329
| 149
| 0.728969
| 986
| 8,416
| 5.993915
| 0.154158
| 0.054146
| 0.048731
| 0.064975
| 0.789509
| 0.782741
| 0.747547
| 0.731303
| 0.721658
| 0.690355
| 0
| 0.009461
| 0.158508
| 8,416
| 230
| 150
| 36.591304
| 0.825049
| 0.035409
| 0
| 0.645503
| 0
| 0
| 0.035622
| 0
| 0
| 0
| 0
| 0
| 0.005291
| 1
| 0
| false
| 0
| 0.037037
| 0
| 0.042328
| 0.010582
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
b7e821d99c17fd5bb636c068c14747e535bc1fec
| 39
|
py
|
Python
|
tests/__init__.py
|
SuryaSankar/difftools
|
a34cff12f550b6c3f93c5d75f568f9151ab6d4dd
|
[
"MIT"
] | null | null | null |
tests/__init__.py
|
SuryaSankar/difftools
|
a34cff12f550b6c3f93c5d75f568f9151ab6d4dd
|
[
"MIT"
] | null | null | null |
tests/__init__.py
|
SuryaSankar/difftools
|
a34cff12f550b6c3f93c5d75f568f9151ab6d4dd
|
[
"MIT"
] | null | null | null |
"""Unit test package for diffbuddy."""
| 19.5
| 38
| 0.692308
| 5
| 39
| 5.4
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.128205
| 39
| 1
| 39
| 39
| 0.794118
| 0.820513
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
4d259001d01b1f96000353f04ad08794df556485
| 199
|
py
|
Python
|
projects/admin.py
|
engineer237/Awwards-clone
|
ed7ccb68ac12aaefe76a270eb8a829a6689134d1
|
[
"MIT"
] | null | null | null |
projects/admin.py
|
engineer237/Awwards-clone
|
ed7ccb68ac12aaefe76a270eb8a829a6689134d1
|
[
"MIT"
] | null | null | null |
projects/admin.py
|
engineer237/Awwards-clone
|
ed7ccb68ac12aaefe76a270eb8a829a6689134d1
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from .models import Project, Like, RatingReview
# Register your models here.
admin.site.register(Project)
admin.site.register(Like)
admin.site.register(RatingReview)
| 28.428571
| 47
| 0.819095
| 27
| 199
| 6.037037
| 0.481481
| 0.165644
| 0.312883
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.090452
| 199
| 7
| 48
| 28.428571
| 0.900552
| 0.130653
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 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
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
4d33cddda29e58003fc06ba4e8601f215e694294
| 89
|
py
|
Python
|
tccli/services/solar/__init__.py
|
zqfan/tencentcloud-cli
|
b6ad9fced2a2b340087e4e5522121d405f68b615
|
[
"Apache-2.0"
] | 47
|
2018-05-31T11:26:25.000Z
|
2022-03-08T02:12:45.000Z
|
tccli/services/solar/__init__.py
|
zqfan/tencentcloud-cli
|
b6ad9fced2a2b340087e4e5522121d405f68b615
|
[
"Apache-2.0"
] | 23
|
2018-06-14T10:46:30.000Z
|
2022-02-28T02:53:09.000Z
|
tccli/services/solar/__init__.py
|
zqfan/tencentcloud-cli
|
b6ad9fced2a2b340087e4e5522121d405f68b615
|
[
"Apache-2.0"
] | 22
|
2018-10-22T09:49:45.000Z
|
2022-03-30T08:06:04.000Z
|
# -*- coding: utf-8 -*-
from tccli.services.solar.solar_client import action_caller
| 22.25
| 59
| 0.707865
| 12
| 89
| 5.083333
| 0.916667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.013333
| 0.157303
| 89
| 4
| 60
| 22.25
| 0.8
| 0.235955
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
4d48401f2bec9dff93649bd0f366ae9af3810274
| 121
|
py
|
Python
|
pybitup/pce/__init__.py
|
jcoheur/pybitup
|
6b31cbea7ae871a09aad154829eb85e599ce9214
|
[
"MIT"
] | 2
|
2022-02-16T13:40:37.000Z
|
2022-02-16T13:41:12.000Z
|
pybitup/pce/__init__.py
|
jcoheur/pybitup
|
6b31cbea7ae871a09aad154829eb85e599ce9214
|
[
"MIT"
] | 2
|
2021-03-11T10:36:47.000Z
|
2021-03-15T16:47:44.000Z
|
pybitup/pce/__init__.py
|
jcoheur/pybitup
|
6b31cbea7ae871a09aad154829eb85e599ce9214
|
[
"MIT"
] | null | null | null |
from .tools import *
from .math import *
from .poly import *
from .coef import *
from .quad import *
from .expan import *
| 20.166667
| 20
| 0.710744
| 18
| 121
| 4.777778
| 0.444444
| 0.581395
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.190083
| 121
| 6
| 21
| 20.166667
| 0.877551
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
4d4a1c572067f82e7c80397b2be53f9f82792875
| 1,309
|
py
|
Python
|
tests/utils/test_misc.py
|
phurwicz/hover
|
c1942a445c60a4639eb68935116f135f485951da
|
[
"MIT"
] | 251
|
2020-11-22T15:02:30.000Z
|
2022-03-23T23:29:28.000Z
|
tests/utils/test_misc.py
|
phurwicz/hover
|
c1942a445c60a4639eb68935116f135f485951da
|
[
"MIT"
] | 22
|
2020-12-03T07:50:27.000Z
|
2022-02-26T01:43:41.000Z
|
tests/utils/test_misc.py
|
phurwicz/hover
|
c1942a445c60a4639eb68935116f135f485951da
|
[
"MIT"
] | 14
|
2020-11-18T06:46:02.000Z
|
2022-03-03T08:14:18.000Z
|
from hover.utils.misc import current_time, NodeUnionFind, RootUnionFind
def test_current_time():
timestamp = current_time()
assert isinstance(timestamp, str)
def test_nodeunionfind():
arr = [NodeUnionFind(i) for i in range(8)]
arr[0].union(arr[1])
arr[1].union(arr[2])
arr[3].union(arr[4])
node_data = [_node.data for _node in arr]
find_data = [_node.find().data for _node in arr]
count_arr = [_node.count for _node in arr]
assert node_data == [0, 1, 2, 3, 4, 5, 6, 7]
assert find_data == [0, 0, 0, 3, 3, 5, 6, 7]
assert count_arr == [3, 3, 3, 2, 2, 1, 1, 1]
arr[2].union(arr[4])
find_data = [_node.find().data for _node in arr]
assert find_data == [0, 0, 0, 0, 0, 5, 6, 7]
def test_rootunionfind():
arr = [RootUnionFind(i) for i in range(8)]
arr[0].union(arr[1])
arr[1].union(arr[2])
arr[3].union(arr[4])
node_data = [_node.data for _node in arr]
find_data = [_node.find().data for _node in arr]
count_arr = [_node.count for _node in arr]
assert node_data == [0, 0, 0, 3, 3, 5, 6, 7]
assert find_data == [0, 0, 0, 3, 3, 5, 6, 7]
assert count_arr == [3, 3, 3, 2, 2, 1, 1, 1]
arr[2].union(arr[4])
node_data = [_node.data for _node in arr]
assert node_data == [0, 0, 0, 0, 0, 5, 6, 7]
| 27.851064
| 71
| 0.596639
| 237
| 1,309
| 3.135021
| 0.14346
| 0.037685
| 0.036339
| 0.129206
| 0.726783
| 0.726783
| 0.713324
| 0.713324
| 0.713324
| 0.647376
| 0
| 0.082082
| 0.236822
| 1,309
| 46
| 72
| 28.456522
| 0.661662
| 0
| 0
| 0.625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.28125
| 1
| 0.09375
| false
| 0
| 0.03125
| 0
| 0.125
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
4d7976f860dc68a984bbcd63af1a0eec9b1252f6
| 822
|
py
|
Python
|
main.py
|
inventshah/FTC-Worlds2019-Vision-Demo
|
412652f801151a7608f78ea0851079273feaee54
|
[
"MIT"
] | null | null | null |
main.py
|
inventshah/FTC-Worlds2019-Vision-Demo
|
412652f801151a7608f78ea0851079273feaee54
|
[
"MIT"
] | null | null | null |
main.py
|
inventshah/FTC-Worlds2019-Vision-Demo
|
412652f801151a7608f78ea0851079273feaee54
|
[
"MIT"
] | null | null | null |
'''
Created by Sachin Shah
Copywrite 2019
'''
from flask import request, redirect, session, url_for, send_from_directory, Flask
import os
STATIC_FOLDER = './static/'
app = Flask(__name__, static_folder=STATIC_FOLDER)
@app.route('/kernel')
def start():
return send_from_directory(app.static_folder,'kernels.html')
@app.route('/kmeans')
def kmeans():
return send_from_directory(app.static_folder,'kmeans.html')
@app.route('/img-flower')
def flower():
return send_from_directory(app.static_folder,'flower.jpeg')
@app.route('/img-minerals')
def mineral():
return send_from_directory(app.static_folder,'mineral.jpeg')
@app.route('/style')
def style():
return send_from_directory(app.static_folder,'style.css')
if __name__ == '__main__':
app.run(host='localhost', port=3000, debug=True)
| 22.216216
| 81
| 0.72871
| 113
| 822
| 5.00885
| 0.39823
| 0.169611
| 0.180212
| 0.20318
| 0.335689
| 0.335689
| 0.335689
| 0
| 0
| 0
| 0
| 0.011065
| 0.120438
| 822
| 37
| 82
| 22.216216
| 0.771784
| 0.045012
| 0
| 0
| 0
| 0
| 0.162338
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.238095
| false
| 0
| 0.095238
| 0.238095
| 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
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
4d7d6b3ab4b45a9b7d1896546b815f3e868a0b24
| 233
|
py
|
Python
|
app/views.py
|
Kaiu8x/Wizapp
|
dddaf9658294bd4bb1994eaa49990510344a8499
|
[
"MIT"
] | null | null | null |
app/views.py
|
Kaiu8x/Wizapp
|
dddaf9658294bd4bb1994eaa49990510344a8499
|
[
"MIT"
] | null | null | null |
app/views.py
|
Kaiu8x/Wizapp
|
dddaf9658294bd4bb1994eaa49990510344a8499
|
[
"MIT"
] | null | null | null |
from django.shortcuts import render
# Create your views here.
from django.shortcuts import render
# Create your views here.
def login(request):
context = {}
return render(request, 'app/loginIndex.html', context)
| 21.181818
| 59
| 0.708155
| 29
| 233
| 5.689655
| 0.586207
| 0.121212
| 0.230303
| 0.30303
| 0.606061
| 0.606061
| 0.606061
| 0.606061
| 0.606061
| 0
| 0
| 0
| 0.206009
| 233
| 10
| 60
| 23.3
| 0.891892
| 0.201717
| 0
| 0.4
| 0
| 0
| 0.109827
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.4
| 0
| 0.8
| 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
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
4dc347e5da21c484103b8ee1b92a044dd92d8bc1
| 287
|
py
|
Python
|
ex074.py
|
raquelEllem/exerciciosPython
|
489c2360de84c69dbe9da7710660fb064cd605fa
|
[
"MIT"
] | null | null | null |
ex074.py
|
raquelEllem/exerciciosPython
|
489c2360de84c69dbe9da7710660fb064cd605fa
|
[
"MIT"
] | null | null | null |
ex074.py
|
raquelEllem/exerciciosPython
|
489c2360de84c69dbe9da7710660fb064cd605fa
|
[
"MIT"
] | null | null | null |
from random import randint
numeros = (randint(0,10), randint(0,10),
randint(0,10), randint(0,10),
randint(0,10))
print(f'Os valores sorteados foram {numeros}')
print(f'O maior valor sorteado foi {max(numeros)}')
print(f'O menor valor sorteado foi {min(numeros)}')
| 31.888889
| 51
| 0.66899
| 45
| 287
| 4.266667
| 0.466667
| 0.208333
| 0.260417
| 0.354167
| 0.260417
| 0.260417
| 0.260417
| 0.260417
| 0.260417
| 0.260417
| 0
| 0.063559
| 0.1777
| 287
| 8
| 52
| 35.875
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0.412587
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.142857
| 0
| 0.142857
| 0.428571
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
4de7166fcd347c4ed90414c7807c2a771bc1dbb4
| 101
|
py
|
Python
|
apps/utils/__init__.py
|
jiangyx3915/graphed
|
f4a228709783f97e73601076700e0bf37b7a4af2
|
[
"MIT"
] | 10
|
2019-03-04T14:01:09.000Z
|
2020-03-06T06:26:54.000Z
|
apps/utils/__init__.py
|
jiangyx3915/graphed
|
f4a228709783f97e73601076700e0bf37b7a4af2
|
[
"MIT"
] | 1
|
2019-03-09T09:14:22.000Z
|
2019-03-09T09:14:22.000Z
|
apps/utils/__init__.py
|
jiangyx3915/graphed
|
f4a228709783f97e73601076700e0bf37b7a4af2
|
[
"MIT"
] | 2
|
2019-10-17T11:20:52.000Z
|
2020-02-29T12:51:37.000Z
|
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
__author__= 'jiangyixin'
__time__ = 2019/2/25 22:18
"""
| 16.833333
| 26
| 0.60396
| 14
| 101
| 3.785714
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.136364
| 0.128713
| 101
| 6
| 27
| 16.833333
| 0.465909
| 0.891089
| 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
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
150399271a3b7fb45b611f92189cbbe55e701e85
| 101
|
py
|
Python
|
pony/orm/tests/__init__.py
|
luckydonald/pony
|
e733f14ef4e21514b49248b7b72aae0728029852
|
[
"Apache-2.0"
] | 1
|
2019-08-02T12:06:24.000Z
|
2019-08-02T12:06:24.000Z
|
pony/orm/tests/__init__.py
|
luckydonald/pony
|
e733f14ef4e21514b49248b7b72aae0728029852
|
[
"Apache-2.0"
] | null | null | null |
pony/orm/tests/__init__.py
|
luckydonald/pony
|
e733f14ef4e21514b49248b7b72aae0728029852
|
[
"Apache-2.0"
] | 1
|
2020-07-20T17:25:48.000Z
|
2020-07-20T17:25:48.000Z
|
import pony.orm.core, pony.options
pony.options.CUT_TRACEBACK = False
pony.orm.core.sql_debug(False)
| 25.25
| 34
| 0.811881
| 17
| 101
| 4.705882
| 0.588235
| 0.175
| 0.275
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.069307
| 101
| 4
| 35
| 25.25
| 0.851064
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
150bd62025d8057d57935b2ac2edcc9319ed3f29
| 58
|
py
|
Python
|
dataclass_wizard/wizard_cli/__init__.py
|
rnag/dataclass-wizard
|
5bccf63daea217aff6e77fd00ed8f7bed87f0377
|
[
"Apache-2.0"
] | 19
|
2021-11-05T20:29:56.000Z
|
2022-03-31T02:51:25.000Z
|
dataclass_wizard/wizard_cli/__init__.py
|
rnag/dataclass-wizard
|
5bccf63daea217aff6e77fd00ed8f7bed87f0377
|
[
"Apache-2.0"
] | 6
|
2021-10-20T23:24:04.000Z
|
2022-03-01T18:49:14.000Z
|
dataclass_wizard/wizard_cli/__init__.py
|
rnag/dataclass-wizard
|
5bccf63daea217aff6e77fd00ed8f7bed87f0377
|
[
"Apache-2.0"
] | null | null | null |
from .cli import main
from .schema import PyCodeGenerator
| 19.333333
| 35
| 0.827586
| 8
| 58
| 6
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.137931
| 58
| 2
| 36
| 29
| 0.96
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
12c9aea53b5b00613ba41bff236a5f7331dd7bde
| 113
|
py
|
Python
|
main.py
|
francescobongini/Tesi
|
af4fe7f43087d28299d26a18d4fef60d136ae7ae
|
[
"MIT"
] | null | null | null |
main.py
|
francescobongini/Tesi
|
af4fe7f43087d28299d26a18d4fef60d136ae7ae
|
[
"MIT"
] | null | null | null |
main.py
|
francescobongini/Tesi
|
af4fe7f43087d28299d26a18d4fef60d136ae7ae
|
[
"MIT"
] | null | null | null |
import torch
print(torch.cuda.is_available())
print(torch.cuda.get_device_name(0))
i=10
while i==10:
print(i)
| 18.833333
| 36
| 0.743363
| 21
| 113
| 3.857143
| 0.619048
| 0.246914
| 0.345679
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.04902
| 0.097345
| 113
| 6
| 37
| 18.833333
| 0.745098
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.166667
| 0
| 0.166667
| 0.5
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
12cc3a2b2fece7cac7c554043cc47d536c8f3c5f
| 3,107
|
py
|
Python
|
tests/test_hassuffix.py
|
forever9717/jsonclasses
|
cc9bde67ceab220425b4855ebb59d432e6fd6ddc
|
[
"MIT"
] | 50
|
2021-08-18T08:08:04.000Z
|
2022-03-20T07:23:26.000Z
|
tests/test_hassuffix.py
|
zhichao-github/jsonclasses
|
6ee8545683b446939c9c68414fc351cbc917ad41
|
[
"MIT"
] | 1
|
2021-11-23T02:12:29.000Z
|
2021-11-23T13:35:26.000Z
|
tests/test_hassuffix.py
|
zhichao-github/jsonclasses
|
6ee8545683b446939c9c68414fc351cbc917ad41
|
[
"MIT"
] | 8
|
2021-07-01T02:39:15.000Z
|
2021-12-10T02:20:18.000Z
|
from __future__ import annotations
from unittest import TestCase
from jsonclasses.excs import ValidationException
from tests.classes.super_suffix import SuperSuffix
class TestHasSuffix(TestCase):
def test_hassuffix_validates_str_param_is_suffix_of_str_val(self):
s_hs = SuperSuffix(s_hs='this is python')
s_hs.validate()
def test_hassuffix_validates_list_param_is_suffix_of_list_val(self):
l_hs = SuperSuffix(l_hs=['qq', 'dd', 'ee', 'ff'])
l_hs.validate()
def test_hassuffix_raises_if_str_param_is_not_suffix_of_str_val(self):
s_hs = SuperSuffix(s_hs='This ')
with self.assertRaises(ValidationException) as context:
s_hs.validate()
self.assertEqual(context.exception.keypath_messages['sHs'],
"suffix is not found")
def test_hassuffix_raises_if_list_param_is_not_suffix_of_list_val(self):
l_hs = SuperSuffix(l_hs=['qq'])
with self.assertRaises(ValidationException) as context:
l_hs.validate()
self.assertEqual(context.exception.keypath_messages['lHs'],
"suffix is not found")
def test_hassuffix_validates_callable_param_is_suffix_of_str_val(self):
c_hs = SuperSuffix(c_hs='this is python')
c_hs.validate()
def test_hassuffix_validates_callable_param_is_suffix_of_list_val(self):
c_l_hs = SuperSuffix(c_l_hs=['qq', 'dd', 'ee', 'ff'])
c_l_hs.validate()
def test_hassuffix_raises_if_callable_param_is_not_suffix_of_str_val(self):
c_hs = SuperSuffix(c_hs='This ')
with self.assertRaises(ValidationException) as context:
c_hs.validate()
self.assertEqual(context.exception.keypath_messages['cHs'],
"suffix is not found")
def test_hassuffix_raises_if_callable_param_is_not_suffix_of_list_val(self):
c_l_hs = SuperSuffix(c_l_hs=['qq'])
with self.assertRaises(ValidationException) as context:
c_l_hs.validate()
self.assertEqual(context.exception.keypath_messages['cLHs'],
"suffix is not found")
def test_hassuffix_validates_types_param_is_suffix_of_str_val(self):
t_hs = SuperSuffix(t_hs='this is python')
t_hs.validate()
def test_hassuffix_validates_types_param_is_suffix_of_list_val(self):
t_l_hs = SuperSuffix(t_l_hs=['qq', 'dd', 'ee', 'ff'])
t_l_hs.validate()
def test_hassuffix_raises_if_types_param_is_not_suffix_of_str_val(self):
t_hs = SuperSuffix(t_hs='This ')
with self.assertRaises(ValidationException) as context:
t_hs.validate()
self.assertEqual(context.exception.keypath_messages['tHs'],
"suffix is not found")
def test_hassuffix_raises_if_types_param_is_not_suffix_of_list_val(self):
t_l_hs = SuperSuffix(t_l_hs=['qq'])
with self.assertRaises(ValidationException) as context:
t_l_hs.validate()
self.assertEqual(context.exception.keypath_messages['tLHs'],
"suffix is not found")
| 41.986486
| 80
| 0.68748
| 416
| 3,107
| 4.704327
| 0.141827
| 0.027593
| 0.098109
| 0.076648
| 0.861012
| 0.861012
| 0.82371
| 0.814512
| 0.599387
| 0.322943
| 0
| 0
| 0.220792
| 3,107
| 73
| 81
| 42.561644
| 0.808344
| 0
| 0
| 0.40678
| 0
| 0
| 0.07113
| 0
| 0
| 0
| 0
| 0
| 0.20339
| 1
| 0.20339
| false
| 0
| 0.067797
| 0
| 0.288136
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
12db292061306253466cdc369bddb6e2fbab94f4
| 107
|
py
|
Python
|
graphgallery/nn/layers/dgl/__init__.py
|
TobiasSchmidtDE/GraphGallery
|
e627e4f454e0ce3813171305a524f5190a6e6f45
|
[
"MIT"
] | null | null | null |
graphgallery/nn/layers/dgl/__init__.py
|
TobiasSchmidtDE/GraphGallery
|
e627e4f454e0ce3813171305a524f5190a6e6f45
|
[
"MIT"
] | null | null | null |
graphgallery/nn/layers/dgl/__init__.py
|
TobiasSchmidtDE/GraphGallery
|
e627e4f454e0ce3813171305a524f5190a6e6f45
|
[
"MIT"
] | null | null | null |
from .dagnn import DAGNNConv
from .mixhop import MixHopConv
from .ala_gnn import GatedLayer, GatedAttnLayer
| 35.666667
| 47
| 0.850467
| 14
| 107
| 6.428571
| 0.714286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.11215
| 107
| 3
| 47
| 35.666667
| 0.947368
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
12e1e057093bf072ce71588109b7fe94a40b9aef
| 130
|
py
|
Python
|
typings/blend_render_info.py
|
Argmaster/PyR3
|
6786bcb6a101fe4bd4cc50fe43767b8178504b15
|
[
"MIT"
] | 2
|
2021-12-12T18:51:52.000Z
|
2022-02-23T09:49:16.000Z
|
src/blender/blender_autocomplete-master/2.92/blend_render_info.py
|
JonasWard/ClayAdventures
|
a716445ac690e4792e70658319aa1d5299f9c9e9
|
[
"MIT"
] | 2
|
2021-11-08T12:09:02.000Z
|
2021-12-12T23:01:12.000Z
|
src/blender/blender_autocomplete-master/2.92/blend_render_info.py
|
JonasWard/ClayAdventures
|
a716445ac690e4792e70658319aa1d5299f9c9e9
|
[
"MIT"
] | null | null | null |
import sys
import typing
def main():
'''
'''
pass
def read_blend_rend_chunk(path):
'''
'''
pass
| 6.842105
| 32
| 0.492308
| 14
| 130
| 4.357143
| 0.785714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.369231
| 130
| 18
| 33
| 7.222222
| 0.743902
| 0
| 0
| 0.333333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0.333333
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 1
| 0
| 1
| 0
|
0
| 5
|
12e6ef48f457992b457dc9b37997321fdb397b13
| 260
|
py
|
Python
|
squids/tfrecords/__init__.py
|
mmgalushka/squids
|
2d6e1bbeb89721a2ff232a7031997111c600abb6
|
[
"MIT"
] | null | null | null |
squids/tfrecords/__init__.py
|
mmgalushka/squids
|
2d6e1bbeb89721a2ff232a7031997111c600abb6
|
[
"MIT"
] | 37
|
2022-01-15T21:42:23.000Z
|
2022-02-23T23:43:31.000Z
|
squids/tfrecords/__init__.py
|
mmgalushka/squids
|
2d6e1bbeb89721a2ff232a7031997111c600abb6
|
[
"MIT"
] | null | null | null |
"""A TFRecords handling module."""
from .maker import create_tfrecords # noqa
from .loader import load_tfrecords # noqa
from .explorer import explore_tfrecords # noqa
from .feature import preprocess_image # noqa
from .errors import TFRecordsError # noqa
| 32.5
| 47
| 0.780769
| 33
| 260
| 6.030303
| 0.545455
| 0.160804
| 0.256281
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.153846
| 260
| 7
| 48
| 37.142857
| 0.904545
| 0.207692
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
12ebec2585f12ff7e77869c415a2c4f67c2f0c74
| 519
|
py
|
Python
|
library/utils/__init__.py
|
lizgehret/library
|
e9343bb0a4a709064b6a817b99f3b410cc7a3978
|
[
"BSD-3-Clause"
] | 2
|
2018-08-17T03:50:41.000Z
|
2018-11-19T03:49:39.000Z
|
library/utils/__init__.py
|
lizgehret/library
|
e9343bb0a4a709064b6a817b99f3b410cc7a3978
|
[
"BSD-3-Clause"
] | 15
|
2018-08-22T16:39:09.000Z
|
2021-09-28T18:28:05.000Z
|
library/utils/__init__.py
|
lizgehret/library
|
e9343bb0a4a709064b6a817b99f3b410cc7a3978
|
[
"BSD-3-Clause"
] | 10
|
2018-08-16T22:33:56.000Z
|
2022-01-05T18:18:01.000Z
|
# ----------------------------------------------------------------------------
# Copyright (c) 2018-2021, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# ----------------------------------------------------------------------------
from django.utils.text import slugify
def slug(model_instance, slugable_field_name, slug_field_name):
return slugify(getattr(model_instance, slugable_field_name))
| 37.071429
| 78
| 0.549133
| 53
| 519
| 5.226415
| 0.716981
| 0.097473
| 0.151625
| 0.187726
| 0.216607
| 0
| 0
| 0
| 0
| 0
| 0
| 0.019397
| 0.105973
| 519
| 13
| 79
| 39.923077
| 0.577586
| 0.643545
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.333333
| 0.333333
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 5
|
12ef1a4a7303697f95111387a28f3ea8fdabf9a8
| 128
|
py
|
Python
|
dbutils/__init__.py
|
gonzalo123/dbutils
|
8a9c7ad7a864da52b0a1fe40e3510a9140210e89
|
[
"MIT"
] | null | null | null |
dbutils/__init__.py
|
gonzalo123/dbutils
|
8a9c7ad7a864da52b0a1fe40e3510a9140210e89
|
[
"MIT"
] | null | null | null |
dbutils/__init__.py
|
gonzalo123/dbutils
|
8a9c7ad7a864da52b0a1fe40e3510a9140210e89
|
[
"MIT"
] | null | null | null |
from .dbutils import transactional, transactional_cursor, \
transactional_django, transactional_cursor_django, Db, DbDjango
| 42.666667
| 67
| 0.835938
| 13
| 128
| 7.923077
| 0.615385
| 0.368932
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.109375
| 128
| 2
| 68
| 64
| 0.903509
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
420ad84264a3b9df3a1eb7bdda43e2026232c022
| 2,851
|
py
|
Python
|
old/modules.py
|
Faralaks/the-game
|
cd08f1f0222eee71916763a11f99ea631dbad578
|
[
"MIT"
] | null | null | null |
old/modules.py
|
Faralaks/the-game
|
cd08f1f0222eee71916763a11f99ea631dbad578
|
[
"MIT"
] | null | null | null |
old/modules.py
|
Faralaks/the-game
|
cd08f1f0222eee71916763a11f99ea631dbad578
|
[
"MIT"
] | null | null | null |
#UTF-8
def objects_data(map_number, mode, save_meta1):
if mode == 'stoper':
adres = 'data/stoper_old/stoper' + str(map_number[0]) + '_' + str(map_number[1]) + '.frls'
try: file = open(adres)
except FileNotFoundError:
return ['']
else:
file = open(adres, 'rb')
stop_cords = save_meta1.decrypt(file.read()).decode('utf8').strip().split('+')
return stop_cords
elif mode == 'objects':
adres = 'data/objects_old/objects' + str(map_number[0]) + '_' + str(map_number[1]) + '.frls'
try: file = open(adres)
except FileNotFoundError:
return [['']]
else:
file = open(adres, 'rb')
objects = []
temp1 = save_meta1.decrypt(file.read()).decode('utf8').strip().split('+')
for temp2 in temp1:
objects.append(temp2.split('_'))
return objects
def stoper(x_object, y_object, side, stop_cords=False):
if stop_cords != False and stop_cords != ['']:
stop = True
if side == 0:
for i in stop_cords:
if i == '': continue
temp = i.split('_')
x1 = int(temp[0])
y1 = int(temp[1])
x2 = int(temp[2])
y2 = int(temp[3])
if x_object + 50 >= x1 and x_object + 10 <= x2 and y_object + 59 >= y1 and y_object + 33 <= y2:
stop = False
if side == 1:
for i in stop_cords:
if i == '': continue
temp = i.split('_')
x1 = int(temp[0])
y1 = int(temp[1])
x2 = int(temp[2])
y2 = int(temp[3])
if x_object + 50 >= x1 and x_object + 10 <= x2 and y_object + 50 >= y1 and y_object + 30 <= y2:
stop = False
if side == 2:
for i in stop_cords:
if i == '': continue
temp = i.split('_')
x1 = int(temp[0])
y1 = int(temp[1])
x2 = int(temp[2])
y2 = int(temp[3])
if x_object + 53 >= x1 and x_object + 10 <= x2 and y_object + 50 >= y1 and y_object + 33 <= y2:
stop = False
if side == 3:
for i in stop_cords:
if i == '': continue
temp = i.split('_')
x1 = int(temp[0])
y1 = int(temp[1])
x2 = int(temp[2])
y2 = int(temp[3])
if x_object + 50 >= x1 and x_object + 7 <= x2 and y_object + 50 >= y1 and y_object + 33 <= y2:
stop = False
return stop
else: return True
| 30.655914
| 111
| 0.425465
| 335
| 2,851
| 3.486567
| 0.191045
| 0.09589
| 0.068493
| 0.034247
| 0.724315
| 0.70976
| 0.70976
| 0.70976
| 0.70976
| 0.634418
| 0
| 0.061548
| 0.447212
| 2,851
| 93
| 112
| 30.655914
| 0.679569
| 0.001754
| 0
| 0.597015
| 0
| 0
| 0.031623
| 0.016163
| 0
| 0
| 0
| 0
| 0
| 1
| 0.029851
| false
| 0
| 0
| 0
| 0.104478
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
420dc509dd4049bbff67d3c4368170d2bbef02bd
| 143
|
py
|
Python
|
PCA/pca.py
|
qasim683/Machine-Learning2
|
4d5c2ad27585ec7364f17e6283c757e76a07fa35
|
[
"MIT"
] | 385
|
2019-02-25T20:59:35.000Z
|
2022-03-31T16:33:37.000Z
|
PCA/pca.py
|
Alok8/Introduction-to-Machine-Learning
|
b04fc59e6eb648fae514d843f925fde55d768f92
|
[
"MIT"
] | 3
|
2019-09-19T11:07:32.000Z
|
2021-08-12T14:20:44.000Z
|
PCA/pca.py
|
Alok8/Introduction-to-Machine-Learning
|
b04fc59e6eb648fae514d843f925fde55d768f92
|
[
"MIT"
] | 1,053
|
2019-02-27T02:32:18.000Z
|
2022-03-30T14:52:39.000Z
|
from sklearn.decomposition import PCA
import pandas as pd
from sklearn.preprocessing import StandardScaler
import matplotlib.pyplot as plt
| 15.888889
| 48
| 0.839161
| 19
| 143
| 6.315789
| 0.684211
| 0.183333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.13986
| 143
| 8
| 49
| 17.875
| 0.97561
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
4257ebe7f267615731f11a25167273e29cccb4ac
| 147
|
py
|
Python
|
src/oogeso/__init__.py
|
oogeso/oogeso
|
72c05fd02d62b29fc62f60daf4989370fd80cbe1
|
[
"MIT"
] | 2
|
2021-05-19T13:16:20.000Z
|
2021-11-05T11:47:11.000Z
|
src/oogeso/__init__.py
|
oogeso/oogeso
|
72c05fd02d62b29fc62f60daf4989370fd80cbe1
|
[
"MIT"
] | 71
|
2021-06-01T11:03:56.000Z
|
2022-03-01T09:38:37.000Z
|
src/oogeso/__init__.py
|
oogeso/oogeso
|
72c05fd02d62b29fc62f60daf4989370fd80cbe1
|
[
"MIT"
] | null | null | null |
from oogeso.core import OptimisationModel, Simulator
from . import core, dto, io, utils
from .core import devices, networks, optimiser, simulator
| 29.4
| 57
| 0.795918
| 19
| 147
| 6.157895
| 0.631579
| 0.17094
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.136054
| 147
| 4
| 58
| 36.75
| 0.92126
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
426180ab597141a68950027b2577644f33edaa6d
| 134
|
py
|
Python
|
munk/__init__.py
|
decaruju/munk
|
5efb3703176b112f2a53279d6494f7abd12afe0e
|
[
"MIT"
] | 2
|
2018-11-25T18:42:52.000Z
|
2018-11-25T18:43:01.000Z
|
munk/__init__.py
|
decaruju/munk
|
5efb3703176b112f2a53279d6494f7abd12afe0e
|
[
"MIT"
] | 10
|
2018-11-25T16:56:44.000Z
|
2018-11-25T18:39:39.000Z
|
munk/__init__.py
|
decaruju/munk
|
5efb3703176b112f2a53279d6494f7abd12afe0e
|
[
"MIT"
] | 1
|
2019-03-09T05:20:50.000Z
|
2019-03-09T05:20:50.000Z
|
from .db import DB
from .initializer import initialize_db
from .seed import seed_db
from .model import Model
from .field import Field
| 22.333333
| 38
| 0.813433
| 22
| 134
| 4.863636
| 0.363636
| 0.168224
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.149254
| 134
| 5
| 39
| 26.8
| 0.938596
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
4267c5b6b091f6db5e2819bb4e358fc5505529d0
| 198
|
py
|
Python
|
api_management/filter_plugins/custom_filters.py
|
fabien-sanglier-saggs/sagdevops-ansible-samples
|
06152947120f9d7ef8082b915ff8d1bb3315e7a9
|
[
"Apache-2.0"
] | null | null | null |
api_management/filter_plugins/custom_filters.py
|
fabien-sanglier-saggs/sagdevops-ansible-samples
|
06152947120f9d7ef8082b915ff8d1bb3315e7a9
|
[
"Apache-2.0"
] | null | null | null |
api_management/filter_plugins/custom_filters.py
|
fabien-sanglier-saggs/sagdevops-ansible-samples
|
06152947120f9d7ef8082b915ff8d1bb3315e7a9
|
[
"Apache-2.0"
] | null | null | null |
#!/usr/bin/python
class FilterModule(object):
def filters(self):
return {
'wrap': self.wrap
}
def wrap(self, list):
return [ "'" + x + "'" for x in list]
| 22
| 45
| 0.5
| 23
| 198
| 4.304348
| 0.652174
| 0.161616
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.343434
| 198
| 9
| 45
| 22
| 0.761538
| 0.080808
| 0
| 0
| 0
| 0
| 0.032967
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0
| 0
| 0.285714
| 0.714286
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
428eba3a76544ec5a193bceedfbf27efe08e7e4c
| 166
|
py
|
Python
|
scheduling/depot_policy.py
|
MALMCS/MALMCS
|
1d3c114e56fcd0767a02b25684dfbb00214eb8e0
|
[
"MIT"
] | null | null | null |
scheduling/depot_policy.py
|
MALMCS/MALMCS
|
1d3c114e56fcd0767a02b25684dfbb00214eb8e0
|
[
"MIT"
] | null | null | null |
scheduling/depot_policy.py
|
MALMCS/MALMCS
|
1d3c114e56fcd0767a02b25684dfbb00214eb8e0
|
[
"MIT"
] | null | null | null |
class DepotPolicy:
def __init__(self, depot):
self.depot = depot
def next_locations(self, cur_ts, cur_locations, already_spent_costs):
pass
| 20.75
| 73
| 0.680723
| 21
| 166
| 4.952381
| 0.666667
| 0.173077
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.240964
| 166
| 7
| 74
| 23.714286
| 0.825397
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.4
| false
| 0.2
| 0
| 0
| 0.6
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 5
|
35f22514054ab60839355122a679d75462c4ee90
| 2,798
|
py
|
Python
|
gsc_utils/sites.py
|
bearloga/gsc-utils
|
bac55670bb10c400aaa2b03e6a67d7ad9464c587
|
[
"Apache-2.0"
] | 2
|
2019-01-07T16:02:01.000Z
|
2021-02-24T04:03:26.000Z
|
gsc_utils/sites.py
|
bearloga/gsc-utils
|
bac55670bb10c400aaa2b03e6a67d7ad9464c587
|
[
"Apache-2.0"
] | null | null | null |
gsc_utils/sites.py
|
bearloga/gsc-utils
|
bac55670bb10c400aaa2b03e6a67d7ad9464c587
|
[
"Apache-2.0"
] | 1
|
2021-02-24T04:03:30.000Z
|
2021-02-24T04:03:30.000Z
|
import numpy as np
import pandas as pd
from googleapiclient.discovery import build
from gsc_utils import utils
def list(credentials):
"""
Fetch list of properties registered in Google Search Console
:param credentials: Pre-authorized credentials, loaded using `utils.load_credentials()`
:return: Pandas DataFrame with column 'siteUrl'
See https://developers.google.com/webmaster-tools/search-console-api-original/v3/sites/list for more info
"""
# Make the API request:
webmasters_service = build('webmasters', 'v3', http=credentials)
site_list = webmasters_service.sites().list().execute()
# Tidy up and output:
df = pd.DataFrame.from_dict(site_list['siteEntry'])
return df[['siteUrl']].sort_values(by=['siteUrl'], ascending=True)
def add(credentials, website):
"""
Register 1+ properties in Google Search Console, if the API credentials have sufficient authentication scope
:param credentials: Pre-authorized credentials, loaded using `utils.load_credentials()`
:param website: Full URL (e.g. 'https://commons.m.wikimedia.org/') or list of full URLs
:return: Responses, one for each requested website addition
See https://developers.google.com/webmaster-tools/search-console-api-original/v3/sites/add for more info.
"""
# refer to developers.google.com/resources/api-libraries/documentation/webmasters/v3/python/latest/
# webmasters_v3.searchanalytics.html for more information
webmasters_service = build('webmasters', 'v3', http=credentials)
if type(website) == str:
website = [website]
responses = []
for site_url in website:
response = webmasters_service.sites().add(siteUrl=site_url).execute()
responses.append(response)
return responses
def remove(credentials, website):
"""
Un-register 1+ properties in Google Search Console, if the API credentials have sufficient authentication scope
:param credentials: Pre-authorized credentials, loaded using `utils.load_credentials()`
:param website: Full URL (e.g. 'https://commons.m.wikimedia.org/') or list of full URLs
:return: Responses, one for each requested website deletion
See https://developers.google.com/webmaster-tools/search-console-api-original/v3/sites/delete for more info.
"""
# refer to developers.google.com/resources/api-libraries/documentation/webmasters/v3/python/latest/
# webmasters_v3.searchanalytics.html for more information
webmasters_service = build('webmasters', 'v3', http=credentials)
if type(website) == str:
website = [website]
responses = []
for site_url in website:
response = webmasters_service.sites().delete(siteUrl=site_url).execute()
responses.append(response)
return responses
| 38.328767
| 115
| 0.725161
| 349
| 2,798
| 5.756447
| 0.312321
| 0.041812
| 0.047287
| 0.031359
| 0.770533
| 0.770533
| 0.770533
| 0.746142
| 0.746142
| 0.687407
| 0
| 0.005159
| 0.168692
| 2,798
| 72
| 116
| 38.861111
| 0.858555
| 0.561472
| 0
| 0.555556
| 0
| 0
| 0.05212
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.111111
| false
| 0
| 0.148148
| 0
| 0.37037
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
c45f9ed27835cf7114b6b61a1f47fd706c8108a3
| 3,690
|
py
|
Python
|
qiling/examples/shellcode_run.py
|
mrTavas/owasp-fstm-auto
|
6e9ff36e46d885701c7419db3eca15f12063a7f3
|
[
"CC0-1.0"
] | 2
|
2021-05-05T12:03:01.000Z
|
2021-06-04T14:27:15.000Z
|
qiling/examples/shellcode_run.py
|
mrTavas/owasp-fstm-auto
|
6e9ff36e46d885701c7419db3eca15f12063a7f3
|
[
"CC0-1.0"
] | null | null | null |
qiling/examples/shellcode_run.py
|
mrTavas/owasp-fstm-auto
|
6e9ff36e46d885701c7419db3eca15f12063a7f3
|
[
"CC0-1.0"
] | 2
|
2021-05-05T12:03:09.000Z
|
2021-06-04T14:27:21.000Z
|
#!/usr/bin/env python3
#
# Cross Platform and Multi Architecture Advanced Binary Emulation Framework
#
from binascii import unhexlify
import sys
sys.path.append("..")
from qiling import Qiling
from qiling.const import QL_VERBOSE
X86_LIN = unhexlify('31c050682f2f7368682f62696e89e3505389e1b00bcd80')
X8664_LIN = unhexlify('31c048bbd19d9691d08c97ff48f7db53545f995257545eb03b0f05')
MIPS32EL_LIN = unhexlify('ffff0628ffffd004ffff05280110e4270ff08424ab0f02240c0101012f62696e2f7368')
X86_WIN = unhexlify('fce8820000006089e531c0648b50308b520c8b52148b72280fb74a2631ffac3c617c022c20c1cf0d01c7e2f252578b52108b4a3c8b4c1178e34801d1518b592001d38b4918e33a498b348b01d631ffacc1cf0d01c738e075f6037df83b7d2475e4588b582401d3668b0c4b8b581c01d38b048b01d0894424245b5b61595a51ffe05f5f5a8b12eb8d5d6a01eb2668318b6f87ffd5bbf0b5a25668a695bd9dffd53c067c0a80fbe07505bb4713726f6a0053ffd5e8d5ffffff63616c6300')
X8664_WIN = unhexlify('fc4881e4f0ffffffe8d0000000415141505251564831d265488b52603e488b52183e488b52203e488b72503e480fb74a4a4d31c94831c0ac3c617c022c2041c1c90d4101c1e2ed5241513e488b52203e8b423c4801d03e8b80880000004885c0746f4801d0503e8b48183e448b40204901d0e35c48ffc93e418b34884801d64d31c94831c0ac41c1c90d4101c138e075f13e4c034c24084539d175d6583e448b40244901d0663e418b0c483e448b401c4901d03e418b04884801d0415841585e595a41584159415a4883ec204152ffe05841595a3e488b12e949ffffff5d49c7c1000000003e488d95fe0000003e4c8d850f0100004831c941ba45835607ffd54831c941baf0b5a256ffd548656c6c6f2c2066726f6d204d534621004d657373616765426f7800')
ARM_LIN = unhexlify('01108fe211ff2fe102200121921a0f02193701df061c08a11022023701df3f270221301c01df0139fbd505a0921a05b469460b2701dfc046020012340a0002022f73797374656d2f62696e2f736800')
ARM64_LIN = unhexlify('420002ca210080d2400080d2c81880d2010000d4e60300aa01020010020280d2681980d2010000d4410080d2420002cae00306aa080380d2010000d4210400f165ffff54e0000010420002ca210001caa81b80d2010000d4020004d27f0000012f62696e2f736800')
X8664_FBSD = unhexlify('6a61586a025f6a015e990f054897baff02aaaa80f2ff524889e699046680c2100f05046a0f05041e4831f6990f0548976a035852488d7424f080c2100f0548b8523243427730637257488d3e48af74084831c048ffc00f055f4889d04889fe48ffceb05a0f0575f799043b48bb2f62696e2f2f73685253545f5257545e0f05')
X8664_MACOS = unhexlify('4831f65648bf2f2f62696e2f7368574889e74831d24831c0b00248c1c828b03b0f05')
if __name__ == "__main__":
print("\nLinux ARM 64bit Shellcode")
ql = Qiling(code=ARM64_LIN, archtype="arm64", ostype="linux", verbose=QL_VERBOSE.DEBUG)
ql.run()
print("\nLinux ARM 32bit Shellcode")
ql = Qiling(code=ARM_LIN, archtype="arm", ostype="linux", verbose=QL_VERBOSE.DEBUG)
ql.run()
print("\nLinux X86 32bit Shellcode")
ql = Qiling(code=X86_LIN, archtype="x86", ostype="linux", verbose=QL_VERBOSE.DEBUG)
ql.run()
print("\nLinux MIPS 32bit EL Shellcode")
ql = Qiling(code=MIPS32EL_LIN, archtype="mips", ostype="linux", verbose=QL_VERBOSE.DEBUG)
ql.run()
print("\nLinux X86 64bit Shellcode")
ql = Qiling(code=X8664_LIN, archtype="x8664", ostype="linux", verbose=QL_VERBOSE.DEBUG)
ql.run()
print("\nWindows X86 32bit Shellcode")
ql = Qiling(code=X86_WIN, archtype="x86", ostype="windows", rootfs="rootfs/x86_windows")
ql.run()
print("\nWindows X8664 64bit Shellcode")
ql = Qiling(code=X8664_WIN, archtype="x8664", ostype="windows", rootfs="rootfs/x8664_windows")
ql.run()
print("\nFreeBSD X86 64bit Shellcode")
ql = Qiling(code=X8664_FBSD, archtype="x8664", ostype="freebsd", verbose=QL_VERBOSE.DEBUG)
ql.run()
print("\nmacos X86 64bit Shellcode")
ql = Qiling(code=X8664_MACOS, archtype="x8664", ostype="macos", verbose=QL_VERBOSE.DEBUG)
ql.run()
| 62.542373
| 619
| 0.840921
| 252
| 3,690
| 12.170635
| 0.253968
| 0.032279
| 0.049886
| 0.061624
| 0.176068
| 0.159113
| 0.140528
| 0.078252
| 0.078252
| 0.064558
| 0
| 0.431825
| 0.08374
| 3,690
| 58
| 620
| 63.62069
| 0.475303
| 0.026016
| 0
| 0.214286
| 0
| 0
| 0.617827
| 0.508635
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.095238
| 0
| 0.095238
| 0.214286
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
67051185ad1c1d3eb1423e10c2988992fc929284
| 51
|
py
|
Python
|
venv/Lib/site-packages/easygui/__main__.py
|
xinkangli/graphical-user-interface
|
b511982af37a3c3977dbb75713ee0df983a32aae
|
[
"MIT"
] | 413
|
2015-01-18T01:56:41.000Z
|
2022-03-29T05:29:12.000Z
|
easygui/__main__.py
|
zadacka/easygui
|
6652d526468a98d3b5720df39dd395cf911d7015
|
[
"BSD-3-Clause"
] | 148
|
2015-01-05T00:42:22.000Z
|
2022-03-18T12:06:46.000Z
|
easygui/__main__.py
|
zadacka/easygui
|
6652d526468a98d3b5720df39dd395cf911d7015
|
[
"BSD-3-Clause"
] | 136
|
2015-01-03T11:57:19.000Z
|
2022-02-11T04:49:56.000Z
|
from .boxes.demo import easygui_demo
easygui_demo()
| 25.5
| 36
| 0.843137
| 8
| 51
| 5.125
| 0.625
| 0.536585
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.078431
| 51
| 2
| 37
| 25.5
| 0.87234
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
670e930f06d4a5c9e9bf3ec17f339bdeed159c82
| 41
|
py
|
Python
|
src/training/models/initializers/__init__.py
|
lenaWitterauf/Domain-Guided-Monitoring
|
b2b96faa66951e8dd6831e90da6f86b27ba2e9c3
|
[
"MIT"
] | 1
|
2021-10-20T14:59:41.000Z
|
2021-10-20T14:59:41.000Z
|
src/training/models/initializers/__init__.py
|
lenaWitterauf/Domain-Guided-Monitoring
|
b2b96faa66951e8dd6831e90da6f86b27ba2e9c3
|
[
"MIT"
] | null | null | null |
src/training/models/initializers/__init__.py
|
lenaWitterauf/Domain-Guided-Monitoring
|
b2b96faa66951e8dd6831e90da6f86b27ba2e9c3
|
[
"MIT"
] | null | null | null |
from .fasttext import FastTextInitializer
| 41
| 41
| 0.902439
| 4
| 41
| 9.25
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.073171
| 41
| 1
| 41
| 41
| 0.973684
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
67477200e93631f0228b6190a58fa6c8c5b82e20
| 235
|
py
|
Python
|
pybrain/rl/environments/cartpole/fast_version/__init__.py
|
sveilleux1/pybrain
|
1e1de73142c290edb84e29ca7850835f3e7bca8b
|
[
"BSD-3-Clause"
] | 2,208
|
2015-01-02T02:14:41.000Z
|
2022-03-31T04:45:46.000Z
|
pybrain/rl/environments/cartpole/fast_version/__init__.py
|
sveilleux1/pybrain
|
1e1de73142c290edb84e29ca7850835f3e7bca8b
|
[
"BSD-3-Clause"
] | 91
|
2015-01-08T16:42:16.000Z
|
2021-12-11T19:16:35.000Z
|
pybrain/rl/environments/cartpole/fast_version/__init__.py
|
sveilleux1/pybrain
|
1e1de73142c290edb84e29ca7850835f3e7bca8b
|
[
"BSD-3-Clause"
] | 786
|
2015-01-02T15:18:20.000Z
|
2022-02-23T23:42:40.000Z
|
try:
import cartpolewrap
except ImportError:
raise ImportError('This task needs to be compiled. Please use the script: cartpolecompile.py')
from pybrain.rl.environments.cartpole.fast_version.cartpoleenv import FastCartPoleTask
| 39.166667
| 98
| 0.817021
| 29
| 235
| 6.586207
| 0.931034
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.123404
| 235
| 6
| 99
| 39.166667
| 0.927184
| 0
| 0
| 0
| 0
| 0
| 0.309322
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.8
| 0
| 0.8
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
677af8c714658e5ef89071f014eb75a9f6d07d31
| 162
|
py
|
Python
|
kao_decorators/__init__.py
|
cloew/KaoDecorators
|
53e591f21bd6064237198423bf72ba9474ec5a55
|
[
"MIT"
] | null | null | null |
kao_decorators/__init__.py
|
cloew/KaoDecorators
|
53e591f21bd6064237198423bf72ba9474ec5a55
|
[
"MIT"
] | null | null | null |
kao_decorators/__init__.py
|
cloew/KaoDecorators
|
53e591f21bd6064237198423bf72ba9474ec5a55
|
[
"MIT"
] | null | null | null |
from .equality_via import equality_via
from .lazy_property import lazy_property
from .operators_via_fn import operators_via_fn
from .proxy_for import proxy_for
| 40.5
| 47
| 0.864198
| 26
| 162
| 5
| 0.384615
| 0.169231
| 0.215385
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 162
| 4
| 48
| 40.5
| 0.902778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
67828d902726e81ca4f3af9a4768f246d1061f82
| 4,737
|
py
|
Python
|
redis_natives/tests/test_list.py
|
cridenour/redis-natives-py
|
d809874507e0ef1a389e91563219554414a03ae3
|
[
"MIT"
] | null | null | null |
redis_natives/tests/test_list.py
|
cridenour/redis-natives-py
|
d809874507e0ef1a389e91563219554414a03ae3
|
[
"MIT"
] | null | null | null |
redis_natives/tests/test_list.py
|
cridenour/redis-natives-py
|
d809874507e0ef1a389e91563219554414a03ae3
|
[
"MIT"
] | null | null | null |
from redis import Redis
from redis_natives import List
from redis_natives.tests import RedisWrapper
class TestList(object):
def setup_method(self, method):
self.redis = RedisWrapper(Redis())
self.test_key = 'test_key'
self.list = List(self.redis, self.test_key)
self.redis.flushdb()
self.redis.method_calls = []
def test_length_initially_zero(self):
assert len(self.list) == 0
def test_append_value_increases_length(self):
self.list.append(1)
assert len(self.list) == 1
def test_append_saves_values_in_redis(self):
self.list.append(1)
assert self.redis.lrange('test_key', 0, 1) == ['1']
def test_remove(self):
self.list.append(1)
self.list.remove(1)
assert len(self.list) == 0
def test_contains(self):
self.list.append(1)
assert '1' in self.list
assert '2' not in self.list
def test_iterator(self):
self.list.append(1)
self.list.append(2)
assert [i for i in self.list] == ['1', '2']
def test_insert(self):
self.list.append(1)
self.list.insert(0, 2)
assert [i for i in self.list] == ['2', '1']
def test_pop(self):
self.list.append(1)
assert self.list.pop() == '1'
def test_popping_first_item_uses_lpop(self):
self.list.append(1)
self.list.append(2)
self.list.append(3)
self.redis.method_calls = []
assert self.list.pop(0) == '1'
assert self.redis.method_calls == ['lpop']
def test_redis_type(self):
self.list.append(1)
assert self.list.redis_type == 'list'
class TestIntegerList(object):
def setup_method(self, method):
self.redis = RedisWrapper(Redis())
self.redis.flushdb()
self.test_key = 'test_key'
self.list = List(self.redis, self.test_key, type=int)
self.list.append(1)
self.list.append(2)
self.list.append(3)
self.list.append(4)
self.redis.method_calls = []
def test_length_returns_list_length(self):
assert len(self.list) == 4
def test_get_list_item_by_range(self):
assert self.list[0:-1] == [1, 2, 3]
def test_get_list_item(self):
assert self.list[1] == 2
def test_set_list_item(self):
self.list[2] = 123
assert self.list[2] == 123
def test_set_items_by_range(self):
self.list[1:2] = 5
assert self.list[1] == 5
assert self.list[2] == 5
def test_pop(self):
self.list.pop() == 4
def test_remove(self):
self.list.remove(1)
assert len(self.list) == 3
def test_contains(self):
assert 1 in self.list
assert 5 not in self.list
def test_iterator(self):
assert [i for i in self.list] == [1, 2, 3, 4]
def test_insert(self):
self.list.insert(0, 2)
assert [i for i in self.list] == [2, 1, 2, 3, 4]
def test_popping_first_item_uses_lpop(self):
self.redis.method_calls = []
assert self.list.pop(0) == 1
assert self.redis.method_calls == ['lpop']
class TestBooleanList(object):
def setup_method(self, method):
self.redis = RedisWrapper(Redis())
self.redis.flushdb()
self.test_key = 'test_key'
self.list = List(self.redis, self.test_key, type=bool)
self.list.append(True)
self.list.append(False)
self.list.append(True)
self.list.append(True)
self.redis.method_calls = []
def test_length_returns_list_length(self):
assert len(self.list) == 4
def test_get_list_item_by_range(self):
assert self.list[0:-1] == [True, False, True]
def test_get_list_item(self):
assert self.list[1] == False
def test_set_list_item(self):
self.list[2] = False
assert self.list[2] == False
def test_set_items_by_range(self):
self.list[2:] = False
assert self.list[2] == False
assert self.list[3] == False
def test_pop(self):
self.list.pop() == True
def test_remove(self):
self.list.remove(False)
assert len(self.list) == 3
def test_contains(self):
assert True in self.list
assert False in self.list
assert 5 not in self.list
def test_iterator(self):
assert [i for i in self.list] == [True, False, True, True]
def test_insert(self):
self.list.insert(0, False)
assert [i for i in self.list] == [False, True, False, True, True]
def test_popping_first_item_uses_lpop(self):
self.redis.method_calls = []
assert self.list.pop(0) == True
assert self.redis.method_calls == ['lpop']
| 27.224138
| 73
| 0.601224
| 686
| 4,737
| 3.995627
| 0.091837
| 0.204305
| 0.102153
| 0.054725
| 0.83838
| 0.831448
| 0.767968
| 0.647574
| 0.578256
| 0.505655
| 0
| 0.025537
| 0.272535
| 4,737
| 173
| 74
| 27.381503
| 0.769878
| 0
| 0
| 0.623077
| 0
| 0
| 0.012033
| 0
| 0
| 0
| 0
| 0
| 0.3
| 1
| 0.269231
| false
| 0
| 0.023077
| 0
| 0.315385
| 0
| 0
| 0
| 0
| null | 1
| 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
| 5
|
6784d3273f88a32c83cedd0f48639d7d05c01f1e
| 166
|
py
|
Python
|
scripts/reactor/edelItem0.py
|
G00dBye/YYMS
|
1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb
|
[
"MIT"
] | 54
|
2019-04-16T23:24:48.000Z
|
2021-12-18T11:41:50.000Z
|
scripts/reactor/edelItem0.py
|
G00dBye/YYMS
|
1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb
|
[
"MIT"
] | 3
|
2019-05-19T15:19:41.000Z
|
2020-04-27T16:29:16.000Z
|
scripts/reactor/edelItem0.py
|
G00dBye/YYMS
|
1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb
|
[
"MIT"
] | 49
|
2020-11-25T23:29:16.000Z
|
2022-03-26T16:20:24.000Z
|
# Acorn tree reactor | edelstein
if sm.hasQuest(23003):
sm.dropItem(4034738, sm.getPosition(objectID).getX(), sm.getPosition(objectID).getY())
sm.removeReactor()
| 33.2
| 90
| 0.746988
| 21
| 166
| 5.904762
| 0.714286
| 0.209677
| 0.33871
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.08
| 0.096386
| 166
| 4
| 91
| 41.5
| 0.746667
| 0.180723
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 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
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
67af482b8bce480a9b38a3d23056222aeebdf660
| 44
|
py
|
Python
|
tests/__init__.py
|
msk-mind-apps/luna-pathology
|
f0e17ccfeb3dc93de150aed5bbef9fcd7443d6d0
|
[
"Apache-2.0"
] | null | null | null |
tests/__init__.py
|
msk-mind-apps/luna-pathology
|
f0e17ccfeb3dc93de150aed5bbef9fcd7443d6d0
|
[
"Apache-2.0"
] | 3
|
2021-07-21T20:28:37.000Z
|
2021-08-02T18:52:32.000Z
|
tests/__init__.py
|
msk-mind-apps/luna-pathology
|
f0e17ccfeb3dc93de150aed5bbef9fcd7443d6d0
|
[
"Apache-2.0"
] | null | null | null |
"""Unit test package for luna_pathology."""
| 22
| 43
| 0.727273
| 6
| 44
| 5.166667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.113636
| 44
| 1
| 44
| 44
| 0.794872
| 0.840909
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
67c3a2b30d2c9d80cd05087885c685be264a4455
| 1,663
|
py
|
Python
|
zoo_checks/migrations/0034_auto_20200219_2316.py
|
falkben/zoo-checks
|
b1d6cf980088664b1feded4a1e08a82c6f358c33
|
[
"Apache-2.0"
] | null | null | null |
zoo_checks/migrations/0034_auto_20200219_2316.py
|
falkben/zoo-checks
|
b1d6cf980088664b1feded4a1e08a82c6f358c33
|
[
"Apache-2.0"
] | 3
|
2019-06-01T14:56:19.000Z
|
2019-06-03T13:53:27.000Z
|
zoo_checks/migrations/0034_auto_20200219_2316.py
|
falkben/zoo-checks
|
b1d6cf980088664b1feded4a1e08a82c6f358c33
|
[
"Apache-2.0"
] | null | null | null |
# Generated by Django 2.2.9 on 2020-02-20 04:16
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('zoo_checks', '0033_merge_20200216_2228'),
]
operations = [
migrations.AlterField(
model_name='animal',
name='name',
field=models.CharField(db_index=True, max_length=100),
),
migrations.AlterField(
model_name='animalcount',
name='datecounted',
field=models.DateField(db_index=True, default=django.utils.timezone.localdate),
),
migrations.AlterField(
model_name='animalcount',
name='datetimecounted',
field=models.DateTimeField(db_index=True, default=django.utils.timezone.now),
),
migrations.AlterField(
model_name='groupcount',
name='datecounted',
field=models.DateField(db_index=True, default=django.utils.timezone.localdate),
),
migrations.AlterField(
model_name='groupcount',
name='datetimecounted',
field=models.DateTimeField(db_index=True, default=django.utils.timezone.now),
),
migrations.AlterField(
model_name='speciescount',
name='datecounted',
field=models.DateField(db_index=True, default=django.utils.timezone.localdate),
),
migrations.AlterField(
model_name='speciescount',
name='datetimecounted',
field=models.DateTimeField(db_index=True, default=django.utils.timezone.now),
),
]
| 33.26
| 91
| 0.610343
| 158
| 1,663
| 6.303797
| 0.310127
| 0.077309
| 0.133534
| 0.203815
| 0.73494
| 0.73494
| 0.639558
| 0.639558
| 0.639558
| 0.639558
| 0
| 0.02831
| 0.277811
| 1,663
| 49
| 92
| 33.938776
| 0.800999
| 0.02706
| 0
| 0.744186
| 1
| 0
| 0.116337
| 0.014851
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.046512
| 0
| 0.116279
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
db1590780714dc389bdb2518dcc6a72bf76cc988
| 208
|
py
|
Python
|
resources/lib/providers/fr/__init__.py
|
BreizhReloaded/plugin.video.orange.fr
|
131c21a0346228f2c0f36cd6e09c954f8ecf154b
|
[
"MIT"
] | 21
|
2021-03-28T11:09:50.000Z
|
2022-03-30T19:04:37.000Z
|
resources/lib/providers/fr/__init__.py
|
BreizhReloaded/plugin.video.orange.fr
|
131c21a0346228f2c0f36cd6e09c954f8ecf154b
|
[
"MIT"
] | 20
|
2021-03-11T19:44:43.000Z
|
2022-03-21T19:40:29.000Z
|
resources/lib/providers/fr/__init__.py
|
BreizhReloaded/plugin.video.orange.fr
|
131c21a0346228f2c0f36cd6e09c954f8ecf154b
|
[
"MIT"
] | 8
|
2021-03-31T21:58:03.000Z
|
2022-02-06T09:26:29.000Z
|
# -*- coding: utf-8 -*-
# pylint: disable=missing-module-docstring
from .orange import OrangeFranceProvider
from .orange_caraibe import OrangeCaraibeProvider
from .orange_reunion import OrangeReunionProvider
| 34.666667
| 49
| 0.822115
| 22
| 208
| 7.681818
| 0.727273
| 0.177515
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005319
| 0.096154
| 208
| 5
| 50
| 41.6
| 0.893617
| 0.298077
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
db24b3e9e41f6140311fa5abee0c51b05ca6971e
| 54
|
py
|
Python
|
interaction3/abstract/__init__.py
|
bdshieh/interaction3
|
b44c390045cf3b594125e90d2f2f4f617bc2433b
|
[
"MIT"
] | 2
|
2020-07-08T14:42:52.000Z
|
2022-03-13T05:25:55.000Z
|
interaction3/abstract/__init__.py
|
bdshieh/interaction3
|
b44c390045cf3b594125e90d2f2f4f617bc2433b
|
[
"MIT"
] | null | null | null |
interaction3/abstract/__init__.py
|
bdshieh/interaction3
|
b44c390045cf3b594125e90d2f2f4f617bc2433b
|
[
"MIT"
] | null | null | null |
from . classes import *
from . manipulations import *
| 18
| 29
| 0.740741
| 6
| 54
| 6.666667
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.185185
| 54
| 3
| 29
| 18
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
db25428d17acdaa22981a31c277946316268228c
| 1,192
|
py
|
Python
|
tests/components/islamic_prayer_times/__init__.py
|
guiguid/core
|
d43617c41d6507f2d2b77aadf4fa1ebaf0058b14
|
[
"Apache-2.0"
] | 2
|
2022-01-24T18:59:56.000Z
|
2022-02-04T22:12:48.000Z
|
tests/components/islamic_prayer_times/__init__.py
|
guiguid/core
|
d43617c41d6507f2d2b77aadf4fa1ebaf0058b14
|
[
"Apache-2.0"
] | 3
|
2021-09-08T03:31:36.000Z
|
2022-03-12T01:00:03.000Z
|
tests/components/islamic_prayer_times/__init__.py
|
guiguid/core
|
d43617c41d6507f2d2b77aadf4fa1ebaf0058b14
|
[
"Apache-2.0"
] | 1
|
2020-05-24T07:37:49.000Z
|
2020-05-24T07:37:49.000Z
|
"""Tests for the islamic_prayer_times component."""
from datetime import datetime
PRAYER_TIMES = {
"Fajr": "06:10",
"Sunrise": "07:25",
"Dhuhr": "12:30",
"Asr": "15:32",
"Maghrib": "17:35",
"Isha": "18:53",
"Midnight": "00:45",
}
PRAYER_TIMES_TIMESTAMPS = {
"Fajr": datetime(2020, 1, 1, 6, 10, 0),
"Sunrise": datetime(2020, 1, 1, 7, 25, 0),
"Dhuhr": datetime(2020, 1, 1, 12, 30, 0),
"Asr": datetime(2020, 1, 1, 15, 32, 0),
"Maghrib": datetime(2020, 1, 1, 17, 35, 0),
"Isha": datetime(2020, 1, 1, 18, 53, 0),
"Midnight": datetime(2020, 1, 1, 00, 45, 0),
}
NEW_PRAYER_TIMES = {
"Fajr": "06:00",
"Sunrise": "07:25",
"Dhuhr": "12:30",
"Asr": "15:32",
"Maghrib": "17:45",
"Isha": "18:53",
"Midnight": "00:43",
}
NEW_PRAYER_TIMES_TIMESTAMPS = {
"Fajr": datetime(2020, 1, 1, 6, 00, 0),
"Sunrise": datetime(2020, 1, 1, 7, 25, 0),
"Dhuhr": datetime(2020, 1, 1, 12, 30, 0),
"Asr": datetime(2020, 1, 1, 15, 32, 0),
"Maghrib": datetime(2020, 1, 1, 17, 45, 0),
"Isha": datetime(2020, 1, 1, 18, 53, 0),
"Midnight": datetime(2020, 1, 1, 00, 43, 0),
}
NOW = datetime(2020, 1, 1, 00, 00, 0)
| 25.913043
| 51
| 0.533557
| 185
| 1,192
| 3.383784
| 0.216216
| 0.28754
| 0.311502
| 0.335463
| 0.782748
| 0.699681
| 0.699681
| 0.699681
| 0.699681
| 0.571885
| 0
| 0.237158
| 0.232383
| 1,192
| 45
| 52
| 26.488889
| 0.446995
| 0.037752
| 0
| 0.421053
| 0
| 0
| 0.194566
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.026316
| 0
| 0.026316
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
c02512189b4e14f6c3b849fd24acee22a823070d
| 11,814
|
py
|
Python
|
test/test_remote.py
|
pgcudahy/sos
|
ee902841003c7630db501101038f370650955ef9
|
[
"BSD-3-Clause"
] | null | null | null |
test/test_remote.py
|
pgcudahy/sos
|
ee902841003c7630db501101038f370650955ef9
|
[
"BSD-3-Clause"
] | null | null | null |
test/test_remote.py
|
pgcudahy/sos
|
ee902841003c7630db501101038f370650955ef9
|
[
"BSD-3-Clause"
] | null | null | null |
#!/usr/bin/env python3
#
# Copyright (c) Bo Peng and the University of Texas MD Anderson Cancer Center
# Distributed under the terms of the 3-clause BSD License.
import os
import subprocess
import pytest
from sos.targets import file_target
from sos import execute_workflow
has_docker = True
try:
subprocess.check_output("docker ps | grep test_sos", shell=True).decode()
except subprocess.CalledProcessError:
subprocess.call("sh build_test_docker.sh", shell=True)
try:
subprocess.check_output("docker ps | grep test_sos", shell=True).decode()
except subprocess.CalledProcessError:
print("Failed to set up a docker machine with sos")
has_docker = False
@pytest.mark.skipif(not has_docker, reason="Docker container not usable")
def test_to_host_option(clear_now_and_after):
"""Test from_remote option"""
clear_now_and_after("to_host_testfile.txt", "to_host_linecount.txt")
with open("to_host_testfile.txt", "w") as tf:
for i in range(100):
tf.write(f"line {i+1}\n")
execute_workflow(
"""
[10]
output: 'to_host_linecount.txt'
task: to_host='to_host_testfile.txt'
sh:
wc -l to_host_testfile.txt > to_host_linecount.txt
""",
options={
"config_file": "~/docker.yml",
"default_queue": "docker",
"sig_mode": "force",
},
)
assert os.path.isfile("to_host_linecount.txt")
with open("to_host_linecount.txt") as lc:
assert lc.read().strip().startswith("100")
@pytest.mark.skipif(not has_docker, reason="Docker container not usable")
def test_to_host_option_with_named_path(clear_now_and_after):
"""Test from_remote option"""
clear_now_and_after(
os.path.expanduser("~/to_host_named_testfile.txt"),
"to_host_named_linecount.txt",
)
with open(os.path.expanduser("~/to_host_named_testfile.txt"), "w") as tf:
for i in range(200):
tf.write(f"line {i+1}\n")
execute_workflow(
"""
[10]
output: 'to_host_named_linecount.txt'
task: to_host='#home/to_host_named_testfile.txt'
sh:
wc -l ~/to_host_named_testfile.txt > to_host_named_linecount.txt
""",
options={
"config_file": "~/docker.yml",
"default_queue": "docker",
"sig_mode": "force",
},
)
assert os.path.isfile("to_host_named_linecount.txt")
with open("to_host_named_linecount.txt") as lc:
assert lc.read().strip().startswith("200")
@pytest.mark.skipif(not has_docker, reason="Docker container not usable")
def test_from_host_option(clear_now_and_after):
"""Test from_remote option"""
clear_now_and_after("llp")
execute_workflow(
"""
[10]
task: from_host='llp'
with open('llp', 'w') as llp:
llp.write("LLP")
""",
options={
"config_file": "~/docker.yml",
"wait_for_task": True,
"default_queue": "docker",
"sig_mode": "force",
},
)
assert os.path.isfile("llp")
@pytest.mark.skipif(not has_docker, reason="Docker container not usable")
def test_local_from_host_option(clear_now_and_after):
"""Test from_remote option"""
clear_now_and_after("llp")
execute_workflow(
"""
[10]
task: from_host='llp'
sh:
echo "LLP" > llp
""",
options={
"config_file": "~/docker.yml",
# do not wait for jobs
"wait_for_task": True,
"sig_mode": "force",
"default_queue": "localhost",
},
)
assert os.path.isfile("llp")
@pytest.mark.skipif(not has_docker, reason="Docker container not usable")
def test_local_from_host_option_with_named_path(clear_now_and_after):
"""Test from_remote option"""
clear_now_and_after(os.path.expanduser("~/llp"))
execute_workflow(
"""
[10]
task: from_host='#home/llp'
sh:
echo "LLP" > ~/llp
""",
options={
"config_file": "~/docker.yml",
# do not wait for jobs
"wait_for_task": True,
"sig_mode": "force",
"default_queue": "localhost",
},
)
assert os.path.isfile(os.path.expanduser("~/llp"))
def test_worker_procs():
# test -j option
execute_workflow(
"""
[1]
input: for_each=dict(i=range(10))
bash: expand=True
echo {i}
""",
options={"sig_mode": "force", "worker_proces": ["1", "localhost:2"]},
)
def test_worker_procs_with_task():
# test -j option
execute_workflow(
"""
[1]
input: for_each=dict(i=range(10))
task: trunk_size = 0
bash: expand=True
echo {i}
""",
options={
"sig_mode": "force",
"default_queue": "localhost",
"worker_proces": ["1", "localhost:2"],
},
)
@pytest.mark.skipif(not has_docker, reason="Docker container not usable")
def test_remote_execute(clear_now_and_after):
clear_now_and_after("result_remote.txt", "local.txt")
with open("local.txt", "w") as w:
w.write("something")
assert 0 == subprocess.call(
"sos remote push docker --files local.txt -c ~/docker.yml", shell=True
)
with open("test_remote.sos", "w") as tr:
tr.write(
"""
[10]
input: 'local.txt'
output: 'result_remote.txt'
task:
run:
cp local.txt result_remote.txt
echo 'adf' >> 'result_remote.txt'
"""
)
assert 0 == subprocess.call(
"sos run test_remote.sos -c ~/docker.yml -r docker -s force -q localhost",
shell=True,
)
assert not file_target("result_remote.txt").target_exists()
# self.assertEqual(subprocess.call('sos preview result_remote.txt -c ~/docker.yml -r docker', shell=True), 0)
# self.assertNotEqual(subprocess.call('sos preview result_remote.txt', shell=True), 0)
assert 0 == subprocess.call(
"sos remote pull docker --files result_remote.txt -c ~/docker.yml", shell=True
)
assert file_target("result_remote.txt").target_exists()
# self.assertEqual(subprocess.call('sos preview result_remote.txt', shell=True), 0)
with open("result_remote.txt") as w:
content = w.read()
assert "something" in content
assert "adf" in content
# test sos remote run
assert 0 == subprocess.call(
"sos remote run docker -c ~/docker.yml --cmd cp result_remote.txt result_remote1.txt ",
shell=True,
)
assert 0 == subprocess.call(
"sos remote pull docker --files result_remote1.txt -c ~/docker.yml", shell=True
)
assert file_target("result_remote1.txt").target_exists()
@pytest.mark.skipif(not has_docker, reason="Docker container not usable")
def test_signature_of_remote_target(clear_now_and_after, monkeypatch):
"""Test remote() target"""
monkeypatch.setenv("SOS_DEBUG", "TASK,-")
clear_now_and_after("remote_file.txt") # , "result.txt")
with open("remote_file.txt", "w") as rf:
rf.write(
"""line1
line2
line3
"""
)
assert 0 == subprocess.call(
"sos remote push docker --files remote_file.txt -c ~/docker.yml", shell=True
)
os.remove("remote_file.txt")
#
wf = """
input: remote('remote_file.txt')
output: 'result.txt'
task:
sh: expand=True
wc -l {_input} > {_output}
"""
execute_workflow(
wf,
options={
"config_file": "~/docker.yml",
"default_queue": "docker",
},
)
assert file_target("result.txt").target_exists()
assert open("result.txt").read().strip().startswith("3")
#
# now change the remote file
with open("remote_file.txt", "w") as rf:
rf.write(
"""line1
line2
line3
line4
line5
"""
)
assert 0 == subprocess.call(
"sos remote push docker --files remote_file.txt -c ~/docker.yml", shell=True
)
os.remove("remote_file.txt")
#
execute_workflow(
wf,
options={
"config_file": "~/docker.yml",
"default_queue": "docker",
},
)
assert file_target("result.txt").target_exists()
assert open("result.txt").read().strip().startswith("5")
@pytest.mark.skipif(not has_docker, reason="Docker container not usable")
def test_remote_exec(clear_now_and_after):
clear_now_and_after("result_exec.txt")
root_dir = "/root/build" if "TRAVIS" in os.environ else "/root"
execute_workflow(
"""
output: 'result_exec.txt'
task:
sh: expand=True
echo Output: {_output} > {_output}
echo PWD: `pwd`. >> {_output}
""",
options={
"config_file": "~/docker.yml",
"default_queue": "docker",
"sig_mode": "force",
},
)
assert file_target("result_exec.txt").target_exists()
with open(file_target("result_exec.txt")) as res:
result = res.read()
assert "Output: result_exec.txt" in result
assert f"PWD: {root_dir}/vatlab/sos/test." in result
@pytest.mark.skipif(not has_docker, reason="Docker container not usable")
def test_remote_exec_named_path(clear_now_and_after):
clear_now_and_after("result_named_path.txt")
root_dir = "/root/build" if "TRAVIS" in os.environ else "/root"
execute_workflow(
"""
output: '#home/result_named_path.txt'
task:
sh: expand=True
echo Output: {_output} > {_output}
echo PWD: `pwd`. >> {_output}
""",
options={
"config_file": "~/docker.yml",
"default_queue": "docker",
"sig_mode": "force",
},
)
assert file_target("#home/result_named_path.txt").target_exists()
with open(file_target("#home/result_named_path.txt")) as res:
result = res.read()
print(result)
assert "Output: /root/result_named_path.txt" in result
assert f"PWD: {root_dir}/vatlab/sos/test." in result
@pytest.mark.skipif(not has_docker, reason="Docker container not usable")
def test_remote_exec_workdir_named_path(clear_now_and_after):
clear_now_and_after(file_target("#home/wd/result_workdir_named_path.txt"))
execute_workflow(
"""
output: '#home/wd/result_workdir_named_path.txt'
task: workdir='/root'
sh: expand=True
echo Output: {_output} > {_output}
echo PWD: `pwd`. >> {_output}
""",
options={
"config_file": "~/docker.yml",
"default_queue": "docker",
"sig_mode": "force",
},
)
assert file_target("#home/wd/result_workdir_named_path.txt").target_exists()
with open(file_target("#home/wd/result_workdir_named_path.txt")) as res:
result = res.read()
assert "Output: /root/wd/result_workdir_named_path.txt" in result
assert "PWD: /root." in result
@pytest.mark.skipif(not has_docker, reason="Docker container not usable")
def test_remote_exec_workdir_wo_named_path(clear_now_and_after):
clear_now_and_after(file_target("result_workdir_wo_named.txt"))
with pytest.raises(Exception):
execute_workflow(
"""
output: 'result_workdir_wo_named.txt'
task: workdir='/other'
sh: expand=True
echo Output: {_output} > {_output}
echo PWD: `pwd`. >> {_output}
""",
options={
"config_file": "~/docker.yml",
"default_queue": "docker",
"sig_mode": "force",
},
)
| 29.833333
| 113
| 0.59548
| 1,465
| 11,814
| 4.561092
| 0.124915
| 0.019755
| 0.036217
| 0.052679
| 0.803951
| 0.764591
| 0.738551
| 0.712661
| 0.680036
| 0.617779
| 0
| 0.007174
| 0.268495
| 11,814
| 395
| 114
| 29.908861
| 0.766026
| 0.059675
| 0
| 0.460905
| 0
| 0
| 0.311323
| 0.062043
| 0
| 0
| 0
| 0
| 0.131687
| 1
| 0.053498
| false
| 0
| 0.020576
| 0
| 0.074074
| 0.00823
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
c029ca8b7296b74dbadab9aa8a42d3a5a6252f4a
| 54
|
py
|
Python
|
deepspeed/module_inject/__init__.py
|
ConnollyLeon/DeepSpeed
|
2d84d1c185ef0345eaf43a7240d61b33eda43497
|
[
"MIT"
] | 58
|
2021-01-24T08:57:03.000Z
|
2022-03-31T07:47:13.000Z
|
deepspeed/module_inject/__init__.py
|
ConnollyLeon/DeepSpeed
|
2d84d1c185ef0345eaf43a7240d61b33eda43497
|
[
"MIT"
] | 1
|
2020-12-01T04:14:15.000Z
|
2020-12-01T04:14:15.000Z
|
deepspeed/module_inject/__init__.py
|
ConnollyLeon/DeepSpeed
|
2d84d1c185ef0345eaf43a7240d61b33eda43497
|
[
"MIT"
] | 14
|
2021-01-25T03:48:44.000Z
|
2022-03-18T12:58:14.000Z
|
from .replace_module import replace_transformer_layer
| 27
| 53
| 0.907407
| 7
| 54
| 6.571429
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.074074
| 54
| 1
| 54
| 54
| 0.92
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
220721c847d45e0d9a747b1fa51319b51d3d026c
| 176
|
py
|
Python
|
tkcefview/assets/__init__.py
|
eseunghwan/tkcefview
|
ad009d69174018b332d861da1c9277270546a8ef
|
[
"MIT"
] | 2
|
2021-09-11T08:15:00.000Z
|
2021-09-20T13:58:59.000Z
|
tkcefview/assets/__init__.py
|
eseunghwan/tkcefview
|
ad009d69174018b332d861da1c9277270546a8ef
|
[
"MIT"
] | null | null | null |
tkcefview/assets/__init__.py
|
eseunghwan/tkcefview
|
ad009d69174018b332d861da1c9277270546a8ef
|
[
"MIT"
] | 1
|
2021-11-11T12:52:04.000Z
|
2021-11-11T12:52:04.000Z
|
# -*- coding: utf-8 -*-
import os
from . import __path__
base_icon_file = os.path.join(__path__[0], "tkcefview.png")
base_js_file = os.path.join(__path__[0], "tkcefview.js")
| 22
| 59
| 0.698864
| 28
| 176
| 3.821429
| 0.535714
| 0.11215
| 0.186916
| 0.261682
| 0.523364
| 0.523364
| 0.523364
| 0
| 0
| 0
| 0
| 0.019355
| 0.119318
| 176
| 7
| 60
| 25.142857
| 0.670968
| 0.119318
| 0
| 0
| 0
| 0
| 0.163399
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
2227fa96b0a6f3d9c5b38da0309ea7cbbae25708
| 1,082
|
py
|
Python
|
Python_prDelete.py
|
shamikcodes-014/Library-Management-System
|
711a76c4a0bde7354882ca9d540e6b5fbda4404d
|
[
"MIT"
] | 1
|
2021-05-19T18:36:42.000Z
|
2021-05-19T18:36:42.000Z
|
Python_prDelete.py
|
shamikcodes-014/Library-Management-System
|
711a76c4a0bde7354882ca9d540e6b5fbda4404d
|
[
"MIT"
] | null | null | null |
Python_prDelete.py
|
shamikcodes-014/Library-Management-System
|
711a76c4a0bde7354882ca9d540e6b5fbda4404d
|
[
"MIT"
] | null | null | null |
def delete():
import sqlite3
from tabulate import tabulate
conn=sqlite3.connect('library.sqlite')
curr=conn.cursor()
print("\n\n********** CURRENT LIBRARY STOCKS ***********\n\n")
curr.execute("SELECT Book_name, Author, Quantity, Book_id FROM Main")
myresult = curr.fetchall()
print(tabulate(myresult, headers=['Book Name', 'Author', 'In Stock', 'Book ID'], tablefmt='psql'))
x=input("Enter the Book id to delete :")
curr.execute('''DELETE FROM Main WHERE Book_id=?''',(x))
conn.commit()
print("\n\n********** UPDATED LIBRARY STOCKS ***********\n\n")
curr.execute("SELECT Book_name, Author, Quantity, Book_id FROM Main")
myresult = curr.fetchall()
print(tabulate(myresult, headers=['Book Name', 'Author', 'In Stock', 'Book_id'], tablefmt='psql'))
def delete_data():
import sqlite3
from tabulate import tabulate
conn=sqlite3.connect('library.sqlite')
curr=conn.cursor()
curr.execute(''' DROP TABLE IF EXISTS Main ''')
print("\n\n********** LIBRARY DATABASE DELETED SUCCESSFULLY ***********\n\n")
| 30.914286
| 101
| 0.633087
| 138
| 1,082
| 4.913043
| 0.34058
| 0.017699
| 0.082596
| 0.073746
| 0.705015
| 0.705015
| 0.705015
| 0.705015
| 0.705015
| 0.705015
| 0
| 0.004435
| 0.166359
| 1,082
| 34
| 102
| 31.823529
| 0.747228
| 0
| 0
| 0.521739
| 0
| 0
| 0.443595
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.086957
| false
| 0
| 0.173913
| 0
| 0.26087
| 0.217391
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
222948a2c756086dbe2623b8d9391adb8bfe0630
| 203
|
py
|
Python
|
home_page/views.py
|
jgold3/data-structures-game
|
c29deac38c10782883581963b2064fd6de4370b6
|
[
"Apache-2.0"
] | 4
|
2020-09-28T00:55:05.000Z
|
2021-05-23T06:32:13.000Z
|
home_page/views.py
|
jgold3/data-structures-game
|
c29deac38c10782883581963b2064fd6de4370b6
|
[
"Apache-2.0"
] | 156
|
2020-09-23T21:13:10.000Z
|
2021-03-10T14:26:16.000Z
|
home_page/views.py
|
Plongesam/data-structures-game
|
a47c849ea97763eff1005273a58aa3d8ab663ff2
|
[
"Apache-2.0"
] | 4
|
2021-02-16T19:38:56.000Z
|
2021-05-23T06:33:06.000Z
|
"""
Home Page application view. Loads the home page from React.
"""
from django.shortcuts import render
def home(request):
"""Return React front-end."""
return render(request, 'index.html')
| 22.555556
| 63
| 0.689655
| 27
| 203
| 5.185185
| 0.703704
| 0.114286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.182266
| 203
| 8
| 64
| 25.375
| 0.843373
| 0.408867
| 0
| 0
| 0
| 0
| 0.097087
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
222a1967fde34ca8465c2da69545e261c0ce46f7
| 95
|
py
|
Python
|
virtual/lib/python3.6/site-packages/pip/_vendor/pytoml/__init__.py
|
Lornakimani62/IP4-_One-Minute-Pitch
|
cabd4c9a2fc726f37fc98c5de561f3d86c6c66f9
|
[
"MIT"
] | 548
|
2020-09-20T10:31:50.000Z
|
2022-03-31T06:18:04.000Z
|
virtual/lib/python3.6/site-packages/pip/_vendor/pytoml/__init__.py
|
Lornakimani62/IP4-_One-Minute-Pitch
|
cabd4c9a2fc726f37fc98c5de561f3d86c6c66f9
|
[
"MIT"
] | 24
|
2020-06-23T13:59:30.000Z
|
2022-03-08T23:26:34.000Z
|
virtual/lib/python3.6/site-packages/pip/_vendor/pytoml/__init__.py
|
Lornakimani62/IP4-_One-Minute-Pitch
|
cabd4c9a2fc726f37fc98c5de561f3d86c6c66f9
|
[
"MIT"
] | 216
|
2020-09-20T12:57:26.000Z
|
2022-03-20T14:07:04.000Z
|
from .core import TomlError
from .parser import load, loads
from .writer import dump, dumps
| 23.75
| 32
| 0.768421
| 14
| 95
| 5.214286
| 0.714286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.178947
| 95
| 3
| 33
| 31.666667
| 0.935897
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
22461e615be135ca035d5134a34f85fe7f2849e8
| 82
|
py
|
Python
|
src/models/schema/department.py
|
solnsumei/claims-management
|
0a9db243e954fbe390f6f81f64eabd6efa4dcc81
|
[
"MIT"
] | null | null | null |
src/models/schema/department.py
|
solnsumei/claims-management
|
0a9db243e954fbe390f6f81f64eabd6efa4dcc81
|
[
"MIT"
] | null | null | null |
src/models/schema/department.py
|
solnsumei/claims-management
|
0a9db243e954fbe390f6f81f64eabd6efa4dcc81
|
[
"MIT"
] | null | null | null |
from .baseschema import NameSchema
class DepartmentSchema(NameSchema):
pass
| 13.666667
| 35
| 0.792683
| 8
| 82
| 8.125
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.158537
| 82
| 5
| 36
| 16.4
| 0.942029
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.333333
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
|
0
| 5
|
97d7eb8d203964e7ae66b664dc107b02eb4e4163
| 50
|
py
|
Python
|
src/tryceratops/files/__init__.py
|
swellander/tryceratops
|
259bf9c1eb357f2ebf737f5b3f9c52220645490f
|
[
"MIT"
] | 269
|
2021-06-21T07:13:23.000Z
|
2022-03-29T02:50:26.000Z
|
src/tryceratops/files/__init__.py
|
swellander/tryceratops
|
259bf9c1eb357f2ebf737f5b3f9c52220645490f
|
[
"MIT"
] | 36
|
2021-07-08T14:35:24.000Z
|
2022-03-21T05:57:35.000Z
|
src/tryceratops/files/__init__.py
|
swellander/tryceratops
|
259bf9c1eb357f2ebf737f5b3f9c52220645490f
|
[
"MIT"
] | 17
|
2021-07-08T13:59:59.000Z
|
2022-03-07T11:06:16.000Z
|
from .discovery import FileDiscovery, load_config
| 25
| 49
| 0.86
| 6
| 50
| 7
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1
| 50
| 1
| 50
| 50
| 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
| 1
| 0
|
0
| 5
|
3f0d4e999650187dd6965cf8c7002711fd8c86c9
| 142
|
py
|
Python
|
ymir/backend/src/pymir-app/app/schemas/msg.py
|
under-chaos/ymir
|
83e98186b23429e6027b187cdade247f5f93e5de
|
[
"Apache-2.0"
] | 1
|
2022-01-12T03:12:47.000Z
|
2022-01-12T03:12:47.000Z
|
ymir/backend/src/pymir-app/app/schemas/msg.py
|
under-chaos/ymir
|
83e98186b23429e6027b187cdade247f5f93e5de
|
[
"Apache-2.0"
] | null | null | null |
ymir/backend/src/pymir-app/app/schemas/msg.py
|
under-chaos/ymir
|
83e98186b23429e6027b187cdade247f5f93e5de
|
[
"Apache-2.0"
] | null | null | null |
from typing import Optional
from pydantic import BaseModel
from .common import Common
class Msg(Common):
result: Optional[str] = None
| 14.2
| 32
| 0.760563
| 19
| 142
| 5.684211
| 0.631579
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.183099
| 142
| 9
| 33
| 15.777778
| 0.931034
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.6
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
3f537f62b2ad606d8381e46178b10bb0b0b53742
| 136
|
py
|
Python
|
py_tdlib/constructors/passport_element_passport_registration.py
|
Mr-TelegramBot/python-tdlib
|
2e2d21a742ebcd439971a32357f2d0abd0ce61eb
|
[
"MIT"
] | 24
|
2018-10-05T13:04:30.000Z
|
2020-05-12T08:45:34.000Z
|
py_tdlib/constructors/passport_element_passport_registration.py
|
MrMahdi313/python-tdlib
|
2e2d21a742ebcd439971a32357f2d0abd0ce61eb
|
[
"MIT"
] | 3
|
2019-06-26T07:20:20.000Z
|
2021-05-24T13:06:56.000Z
|
py_tdlib/constructors/passport_element_passport_registration.py
|
MrMahdi313/python-tdlib
|
2e2d21a742ebcd439971a32357f2d0abd0ce61eb
|
[
"MIT"
] | 5
|
2018-10-05T14:29:28.000Z
|
2020-08-11T15:04:10.000Z
|
from ..factory import Type
class passportElementPassportRegistration(Type):
passport_registration = None # type: "personalDocument"
| 22.666667
| 57
| 0.808824
| 12
| 136
| 9.083333
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.117647
| 136
| 5
| 58
| 27.2
| 0.908333
| 0.176471
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.666667
| 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
| 1
| 1
| 0
| 1
| 0
|
0
| 5
|
3f53b6a267a9d35d98798cda764a12975d10a380
| 88
|
py
|
Python
|
twid.py
|
iconvinced/twid
|
cb7d2882e11aee961864ee969d10b6036d192d35
|
[
"MIT"
] | null | null | null |
twid.py
|
iconvinced/twid
|
cb7d2882e11aee961864ee969d10b6036d192d35
|
[
"MIT"
] | null | null | null |
twid.py
|
iconvinced/twid
|
cb7d2882e11aee961864ee969d10b6036d192d35
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
from twid import random
print random()
| 12.571429
| 23
| 0.647727
| 13
| 88
| 4.384615
| 0.923077
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.027397
| 0.170455
| 88
| 6
| 24
| 14.666667
| 0.753425
| 0.488636
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.5
| null | null | 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 1
|
0
| 5
|
3f736eeaea960082d33c290b536a1cd7be652029
| 311
|
py
|
Python
|
tests/__init__.py
|
alxlampe/d3rlpy
|
af7e6bd018a51f95138d121f59c50dc36ec87e3a
|
[
"MIT"
] | null | null | null |
tests/__init__.py
|
alxlampe/d3rlpy
|
af7e6bd018a51f95138d121f59c50dc36ec87e3a
|
[
"MIT"
] | null | null | null |
tests/__init__.py
|
alxlampe/d3rlpy
|
af7e6bd018a51f95138d121f59c50dc36ec87e3a
|
[
"MIT"
] | null | null | null |
import pytest
import os
from d3rlpy.encoders import PixelEncoderFactory, VectorEncoderFactory
is_skipping_performance_test = os.environ.get('TEST_PERFORMANCE') != "TRUE"
performance_test = pytest.mark.skipif(is_skipping_performance_test,
reason='skip performance tests')
| 34.555556
| 75
| 0.736334
| 33
| 311
| 6.69697
| 0.606061
| 0.20362
| 0.190045
| 0.226244
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.003984
| 0.192926
| 311
| 8
| 76
| 38.875
| 0.876494
| 0
| 0
| 0
| 0
| 0
| 0.135048
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
58d07eb6a21a2d9657010bb5d153f2a830066b84
| 28
|
py
|
Python
|
google_sheets_metrics.py
|
widgetOne/gmail_metrics
|
022f5f8eaa92d7b59afb7710fd31298d4f2b8902
|
[
"Apache-2.0"
] | null | null | null |
google_sheets_metrics.py
|
widgetOne/gmail_metrics
|
022f5f8eaa92d7b59afb7710fd31298d4f2b8902
|
[
"Apache-2.0"
] | 1
|
2021-02-08T20:19:43.000Z
|
2021-02-08T20:19:43.000Z
|
google_sheets_metrics.py
|
widgetOne/gmail_metrics
|
022f5f8eaa92d7b59afb7710fd31298d4f2b8902
|
[
"Apache-2.0"
] | null | null | null |
secondary_todo_list
| 2.8
| 19
| 0.678571
| 3
| 28
| 5.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.321429
| 28
| 9
| 20
| 3.111111
| 0.894737
| 0
| 0
| 0
| 0
| 0
| 0
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
58ddb5ff2eaadb87a877635c6b3f28c941c04a07
| 54
|
py
|
Python
|
cronpy/__init__.py
|
speedyturkey/cronpy
|
e0bf2d70649b04de029fd12502a3b0d6b497ef63
|
[
"MIT"
] | 2
|
2017-09-05T13:05:44.000Z
|
2017-09-06T01:39:00.000Z
|
cronpy/__init__.py
|
speedyturkey/cronpy
|
e0bf2d70649b04de029fd12502a3b0d6b497ef63
|
[
"MIT"
] | null | null | null |
cronpy/__init__.py
|
speedyturkey/cronpy
|
e0bf2d70649b04de029fd12502a3b0d6b497ef63
|
[
"MIT"
] | null | null | null |
from .cronpy import Cron, Task, default_cron, new_task
| 54
| 54
| 0.814815
| 9
| 54
| 4.666667
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 54
| 1
| 54
| 54
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
4525c4166294c9b0aaae23f906a85d282eb66764
| 718
|
py
|
Python
|
tests/old_tests/test_dbfunctions.py
|
aolabNeuro/brain-python-interface
|
11590717e1a1a2d5cc89a0495f02170b1b5f3c08
|
[
"Apache-2.0"
] | 2
|
2020-04-14T23:35:36.000Z
|
2020-09-11T01:34:50.000Z
|
tests/old_tests/test_dbfunctions.py
|
aolabNeuro/brain-python-interface
|
11590717e1a1a2d5cc89a0495f02170b1b5f3c08
|
[
"Apache-2.0"
] | 89
|
2020-08-03T16:54:08.000Z
|
2022-03-09T19:56:19.000Z
|
tests/old_tests/test_dbfunctions.py
|
aolabNeuro/brain-python-interface
|
11590717e1a1a2d5cc89a0495f02170b1b5f3c08
|
[
"Apache-2.0"
] | 3
|
2020-08-10T21:29:26.000Z
|
2021-01-18T18:29:09.000Z
|
#!/usr/bin/python
'''
A set of tests to ensure that all the dbfunctions are still functional
'''
import os
import django
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'db.settings')
django.setup()
from db.tracker import models
import db.dbfunctions as dbfn
id = 77
te = dbfn.TaskEntry(id)
print(dbfn.get_date(id))
print(dbfn.get_notes(id))
print(dbfn.get_subject(id))
print(dbfn.get_length(id))
print(dbfn.get_success_rate(id))
#print(dbfn.get_plx_file(id))
#print(dbfn.get_decoder_name(id))
#print(dbfn.get_decoder_name_full(id))
#print(dbfn.get_decoder(id))
#print(dbfn.get_params(id))
#print(dbfn.get_param(id, 'decoder'))
#id = 1956
#print(dbfn.get_bmiparams_file(id))
# TODO check blackrock file fns
| 19.405405
| 70
| 0.75766
| 120
| 718
| 4.366667
| 0.458333
| 0.206107
| 0.274809
| 0.293893
| 0.135496
| 0.09542
| 0
| 0
| 0
| 0
| 0
| 0.009259
| 0.097493
| 718
| 36
| 71
| 19.944444
| 0.799383
| 0.481894
| 0
| 0
| 0
| 0
| 0.093484
| 0.062323
| 0
| 0
| 0
| 0.027778
| 0
| 1
| 0
| false
| 0
| 0.307692
| 0
| 0.307692
| 0.384615
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
453b53144064198cf7d8e3e41e78bfe39f4f060b
| 557
|
py
|
Python
|
delphi/translators/for2py/math_ext.py
|
mikiec84/delphi
|
2e517f21e76e334c7dfb14325d25879ddf26d10d
|
[
"Apache-2.0"
] | 25
|
2018-03-03T11:57:57.000Z
|
2022-01-16T21:19:54.000Z
|
delphi/translators/for2py/math_ext.py
|
mikiec84/delphi
|
2e517f21e76e334c7dfb14325d25879ddf26d10d
|
[
"Apache-2.0"
] | 385
|
2018-02-21T16:52:06.000Z
|
2022-02-17T07:44:56.000Z
|
delphi/translators/for2py/math_ext.py
|
mikiec84/delphi
|
2e517f21e76e334c7dfb14325d25879ddf26d10d
|
[
"Apache-2.0"
] | 19
|
2018-03-20T01:08:11.000Z
|
2021-09-29T01:04:49.000Z
|
import math
from delphi.translators.for2py.types_ext import Float32
def apply_op(num, op):
if isinstance(num, Float32):
return Float32(op(num._val))
else:
return op(num)
def cos(num):
return apply_op(num, math.cos)
def sin(num):
return apply_op(num, math.sin)
def tan(num):
return apply_op(num, math.tan)
def acos(num):
return apply_op(num, math.acos)
def exp(num):
return apply_op(num, math.exp)
def log(num):
return apply_op(num, math.log)
def sqrt(num):
return apply_op(num, math.sqrt)
| 14.657895
| 55
| 0.662478
| 91
| 557
| 3.945055
| 0.274725
| 0.139276
| 0.222841
| 0.311978
| 0.448468
| 0.448468
| 0
| 0
| 0
| 0
| 0
| 0.016018
| 0.21544
| 557
| 37
| 56
| 15.054054
| 0.805492
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.380952
| false
| 0
| 0.095238
| 0.333333
| 0.904762
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
4540579abc8f7ffaff200081deeb8d4842bf36ac
| 3,726
|
py
|
Python
|
test/test_batch_renamer.py
|
farisachugthai/utilities
|
add440a6bfa2d2a5df03f8590e2951abe1a501af
|
[
"MIT"
] | 9
|
2018-06-01T19:19:52.000Z
|
2021-06-25T02:52:01.000Z
|
test/test_batch_renamer.py
|
farisachugthai/utilities
|
add440a6bfa2d2a5df03f8590e2951abe1a501af
|
[
"MIT"
] | 1
|
2019-09-13T10:55:51.000Z
|
2019-09-16T07:25:34.000Z
|
test/test_batch_renamer.py
|
farisachugthai/utilities
|
add440a6bfa2d2a5df03f8590e2951abe1a501af
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Test that the batch renamer handles filenames correctly.
Here's an excerpt from Python Crash Course on page 217. Certain portions
have been accentuated for emphasis.:
Unit Tests and Test Cases
--------------------------
The module :mod:`unittest` from the Python standard library provides tools
for testing your code. A **unit test** verifies that one specific aspect
of a function’s behavior is correct. A **test case** is a collection of
unit tests that together prove that a function behaves as it’s supposed
to, within the full range of situations you expect it to handle.
A good test case considers all the possible kinds of input a function could
receive and includes tests to represent each of these situations.
A test case with **full coverage** includes a full range of unit
tests covering all the possible ways you can use a function. Achieving full
coverage on a large project can be daunting. It’s often good enough to
write tests for your code’s critical behaviors and then aim for full
coverage only if the project starts to see widespread use.
A Passing Test
---------------
The syntax for setting up a test case takes some getting used to, but once
you’ve set up the test case it’s straightforward to add more unit tests
for your functions. To write a test case for a function, import the
:mod:`unittest` module and the function you want to test. Then create a
class that inherits from :class:`unittest.TestCase()`, and write a series
of methods to test different aspects of your function’s behavior.
The module itself
------------------
Now let's go on and go through this module line by line so you know what is
required for a unit testing module.
First, we import :mod:`unittest` and the function we want to test,
get_formatted_name(). We create a class called NamesTestCase, which will
contain a series of unit tests for get_formatted_name(). You can name the
class anything you want, but it’s best to call it something related to the
function you’re about to test and to use the word Test in the class name.
This class must inherit from the class :class:`unittest.TestCase()` so
Python knows how to run the tests you write.
NamesTestCase contains a single method that tests one aspect of
get_formatted_name(). We call this method test_first_last_name() because
we’re verifying that names with only a first and last name are formatted
correctly. Any method that starts with `test_` will be run automatically
when we run `test_name_function.py`. Within this test method, we call the
function we want to test and store a return value that we’re interested in
testing. In this example we call get_formatted_name() with the arguments
`janis` and `joplin`, and store the result in formatted_name.
We use one of unittest’s most useful features: an ``assert`` method.
Assert methods verify that a result you received matches the result you
expected to receive. In this case, because we know get_formatted_name() is
supposed to return a capitalized, properly spaced full name, we expect
the value in formatted_name to be Janis Joplin. To check if this is true,
we use :mod:`unittest`’s :func:`~unittest.TestCase.assertEqual()` method
and pass it formatted_name and `Janis Joplin`.
"""
import unittest
from pyutil import batch_renamer
class BatchTestCase(unittest.TestCase):
"""Tests for :mod:`~pyutil.batch_renamer.."""
def test_fix_extension(self):
"""Do filenames like 'shutil.rst.txt' work?
It was at this moment that I realized how not finished that script is.
"""
# batch_renamer
def test_fix_multipart_filename(self):
"""todo"""
pass
if __name__ == "__main__":
unittest.main()
| 42.827586
| 78
| 0.755502
| 619
| 3,726
| 4.491115
| 0.371567
| 0.03741
| 0.028777
| 0.01223
| 0.032374
| 0.016547
| 0
| 0
| 0
| 0
| 0
| 0.001299
| 0.173376
| 3,726
| 86
| 79
| 43.325581
| 0.901299
| 0.916801
| 0
| 0
| 0
| 0
| 0.029851
| 0
| 0
| 0
| 0
| 0.011628
| 0
| 1
| 0.25
| false
| 0.125
| 0.25
| 0
| 0.625
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 5
|
18b6523ef50306c5bbdf6b5113336524445756e3
| 79
|
py
|
Python
|
setup.py
|
chaosct/TUIO2HID
|
0e2c43d665975cd867c1838f95e9cc13e807a1f2
|
[
"MIT"
] | 1
|
2017-03-10T13:07:06.000Z
|
2017-03-10T13:07:06.000Z
|
setup.py
|
chaosct/TUIO2HID
|
0e2c43d665975cd867c1838f95e9cc13e807a1f2
|
[
"MIT"
] | null | null | null |
setup.py
|
chaosct/TUIO2HID
|
0e2c43d665975cd867c1838f95e9cc13e807a1f2
|
[
"MIT"
] | null | null | null |
from distutils.core import setup
import py2exe
setup(console=['TUIO2HID.py'])
| 15.8
| 32
| 0.78481
| 11
| 79
| 5.636364
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.028169
| 0.101266
| 79
| 4
| 33
| 19.75
| 0.84507
| 0
| 0
| 0
| 0
| 0
| 0.139241
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
7a1c07ffe53b4a0f858492c38b60bc0db1a328aa
| 12,868
|
py
|
Python
|
unsupervised/model/DSMSCN.py
|
solivero/DSMSCN
|
f42b68e34c6bd308c4bb630322bf72ae4ac57f6e
|
[
"MIT"
] | 1
|
2020-11-30T12:18:13.000Z
|
2020-11-30T12:18:13.000Z
|
unsupervised/model/DSMSCN.py
|
solivero/DSMSCN
|
f42b68e34c6bd308c4bb630322bf72ae4ac57f6e
|
[
"MIT"
] | null | null | null |
unsupervised/model/DSMSCN.py
|
solivero/DSMSCN
|
f42b68e34c6bd308c4bb630322bf72ae4ac57f6e
|
[
"MIT"
] | null | null | null |
import tensorflow as tf
from chrx_util.net_util import conv_2d, max_pool_2d, avg_pool_2d, fully_connected
class DSMSCN(object):
def get_model(self, Input_X, Input_Y, data_format='NHWC', is_training=True):
net_X, feature_1_X, feature_2_X, feature_3_X = self._feature_extract_layer(inputs=Input_X, name='Fea_Ext_',
data_format=data_format,
is_training=is_training)
net_Y, feature_1_Y, feature_2_Y, feature_3_Y = self._feature_extract_layer(inputs=Input_Y, name='Fea_Ext_',
data_format=data_format,
is_training=is_training,
is_reuse=True)
diff_fea_1 = tf.abs(feature_1_X - feature_1_Y) # (B, H, W, 16)
diff_fea_2 = tf.abs(feature_2_X - feature_2_Y) # (B, H, W, 32)
diff_fea_3 = tf.abs(feature_3_X - feature_3_Y) # (B, H, W, 64)
diff_net = tf.abs(net_X - net_Y) # (B, H, W, 128)
# (B, H, W, 128) --> (B, H, W, 256)
if data_format == 'NHWC':
diff_feature = tf.concat([diff_net, diff_fea_1, diff_fea_2], axis=-1)
else:
diff_feature = tf.concat([diff_net, diff_fea_1, diff_fea_2], axis=1)
# (B, 1)
diff_feature = conv_2d(inputs=diff_feature, kernel_size=[1, 1], output_channel=256, stride=[1, 1],
padding='SAME', name='diff_conv',
data_format=data_format, is_training=is_training, is_bn=True)
diff_feature = tf.contrib.layers.dropout(inputs=diff_feature, is_training=is_training, keep_prob=0.5)
net, pred = self._change_judge_layer(inputs=diff_feature, name='Cha_Jud_', data_format=data_format,
is_training=is_training)
return net, pred
def _feature_extract_layer(self, inputs, name='Fea_Ext_', data_format='NHWC', is_training=True, is_reuse=False):
with tf.variable_scope(name) as scope:
if is_reuse:
scope.reuse_variables()
# (B, H, W, C) --> (B, H, W, 32)
layer_1 = conv_2d(inputs=inputs, kernel_size=[3, 3], output_channel=16, stride=[1, 1], name='layer_1_conv',
padding='SAME', data_format=data_format, is_training=is_training, is_bn=False,
activation=tf.nn.relu)
layer_2 = conv_2d(inputs=layer_1, kernel_size=[3, 3], output_channel=16, stride=[1, 1], name='layer_2_conv',
padding='SAME', data_format=data_format, is_training=is_training, is_bn=False,
activation=tf.nn.relu)
drop_layer_2 = tf.contrib.layers.dropout(inputs=layer_2, is_training=is_training, keep_prob=0.8)
feature_1 = drop_layer_2
# (B, H/2, W/2, 32) --> (B, H/2, W/2, 64)
layer_3 = conv_2d(inputs=drop_layer_2, kernel_size=[3, 3], output_channel=32, stride=[1, 1], padding='SAME',
name='layer_3_conv', data_format=data_format, is_training=is_training, is_bn=False,
activation=tf.nn.relu)
layer_4 = conv_2d(inputs=layer_3, kernel_size=[3, 3], output_channel=32, stride=[1, 1], padding='SAME',
name='layer_4_conv', data_format=data_format, is_training=is_training, is_bn=False,
activation=tf.nn.relu)
drop_layer_4 = tf.contrib.layers.dropout(inputs=layer_4, is_training=is_training, keep_prob=0.6)
feature_2 = drop_layer_4
# (B, H/2, W/2, 64) --> (B, H/2, W/2, 64)
layer_5 = self._Inception_model_2(inputs=drop_layer_4, name='Inception_1_', stride=[1, 1],
data_format='NHWC',
is_training=is_training, activation=tf.nn.relu)
layer_6 = self._Inception_model_1(inputs=layer_5, name='Inception_2_', stride=[1, 1], data_format='NHWC',
is_training=is_training, activation=tf.nn.relu)
drop_layer_6 = tf.contrib.layers.dropout(inputs=layer_6, is_training=is_training, keep_prob=0.5)
feature_3 = drop_layer_6
# (B, H, W, 64) --> (B, H, W, 128)
layer_7 = self._Inception_model_2(inputs=layer_6, name='Inception_3_', data_format='NHWC', stride=[1, 1],
is_training=is_training, activation=tf.nn.relu)
net = self._Inception_model_1(inputs=layer_7, name='Inception_4_', data_format='NHWC', stride=[1, 1],
is_training=is_training, activation=tf.nn.relu)
return net, feature_1, feature_2,feature_3
def _change_judge_layer(self, inputs, name='Cha_Jud_', data_format='NHWC', is_training=True):
with tf.variable_scope(name) as scope:
# (B, H, W, 256) --> (B, H, W, 512)
layer_1 = self._Inception_model_2(inputs=inputs, name='Inception_1_', stride=[1, 1],
data_format=data_format,
is_training=is_training,
activation=tf.nn.relu)
layer_2 = tf.contrib.layers.dropout(inputs=layer_1, is_training=is_training, keep_prob=0.5)
layer_2 = avg_pool_2d(layer_2, kernel_size=[9, 9], stride=[1, 1], padding='VALID')
if data_format == 'NHWC':
layer_2 = tf.squeeze(layer_2, axis=[1, 2])
else:
layer_2 = tf.squeeze(layer_2, axis=[2, 3])
logits = fully_connected(layer_2, num_outputs=2, is_training=is_training, is_bn=False)
pred = tf.nn.softmax(logits)
return logits, pred
def _Inception_model_1(self, inputs, name, stride, data_format='NHWC', is_training=True, activation=None):
"""
Inception model v1, which keep the channel of outputs is same with inputs
:param inputs: (B, H, W, C)
:param name: str
:param data_format: str
:param is_training: bool
:return: net, (B, H, W, C)
"""
with tf.variable_scope(name) as scope:
if data_format == 'NHWC':
inputs_channel = inputs.get_shape().as_list()[-1]
concat_dim = 3
else:
inputs_channel = inputs.get_shape().as_list()[1]
concat_dim = 1
# 1x1 Conv
branch_11conv = conv_2d(inputs=inputs, kernel_size=[1, 1], output_channel=inputs_channel // 4,
stride=stride, name='11_conv', padding='SAME', data_format='NHWC',
is_training=is_training, is_bn=False, activation=activation)
# 3x3 Conv
branch_33conv = conv_2d(inputs=inputs, kernel_size=[1, 1], output_channel=inputs_channel // 4,
stride=stride, name='33_conv_1', padding='SAME', data_format='NHWC',
is_training=is_training, is_bn=False, activation=activation)
branch_33conv = conv_2d(inputs=branch_33conv, kernel_size=[3, 3], output_channel=inputs_channel // 2,
stride=stride, name='33_conv_2', padding='SAME', data_format='NHWC',
is_training=is_training, is_bn=False, activation=activation)
# use two 3x3 conv layer to replace 5x5 conv layer, which can reduce parameter size and improve nonlinear
branch_55conv = conv_2d(inputs=inputs, kernel_size=[1, 1], output_channel=inputs_channel // 4,
stride=stride, name='55_conv_1', padding='SAME', data_format='NHWC',
is_training=is_training, is_bn=False, activation=activation)
branch_55conv = conv_2d(inputs=branch_55conv, kernel_size=[3, 3], output_channel=inputs_channel // 8,
stride=stride, name='55_conv_2', padding='SAME', data_format='NHWC',
is_training=is_training, is_bn=False, activation=activation)
branch_55conv = conv_2d(inputs=branch_55conv, kernel_size=[3, 3], output_channel=inputs_channel // 8,
name='55_conv_3', stride=stride, padding='SAME', data_format='NHWC',
is_training=is_training, is_bn=False, activation=activation)
# Max Pool
branch_pool = max_pool_2d(inputs, kernel_size=[3, 3], stride=stride, padding='SAME')
branch_pool = conv_2d(inputs=branch_pool, kernel_size=[1, 1], output_channel=inputs_channel // 8,
stride=stride, name='max_pool_conv', padding='SAME', data_format='NHWC',
is_training=is_training, is_bn=False, activation=activation)
net = tf.concat(axis=concat_dim, values=[branch_11conv, branch_33conv, branch_55conv, branch_pool])
return net
def _Inception_model_2(self, inputs, name, stride, data_format='NHWC', is_training=True, activation=None):
"""
Inception model v2, which keep the channel of outputs is twice than inputs
:param inputs: (B, H, W, C)
:param name: str
:param data_format: str
:param is_training: bool
:return: net, (B, H, W, 2 * C)
"""
with tf.variable_scope(name) as scope:
if data_format == 'NHWC':
inputs_channel = inputs.get_shape().as_list()[-1]
concat_dim = 3
else:
inputs_channel = inputs.get_shape().as_list()[1]
concat_dim = 1
# 1x1 Conv
branch_11conv = conv_2d(inputs=inputs, kernel_size=[1, 1], output_channel=inputs_channel // 2,
name='11_conv',
stride=stride, padding='SAME', data_format='NHWC', is_training=is_training,
is_bn=False, activation=activation)
# 3x3 Conv
branch_33conv = conv_2d(inputs=inputs, kernel_size=[1, 1], output_channel=inputs_channel // 4,
name='33_conv_1',
stride=stride, padding='SAME', data_format='NHWC', is_training=is_training,
is_bn=False, activation=activation)
branch_33conv = conv_2d(inputs=branch_33conv, kernel_size=[3, 3], output_channel=inputs_channel,
stride=stride, name='33_conv_2',
padding='SAME', data_format='NHWC', is_training=is_training, is_bn=False,
activation=activation)
# use two 3x3 conv layer to replace 5x5 conv layer, which can reduce parameter size and improve nonlinear
branch_55conv = conv_2d(inputs=inputs, kernel_size=[1, 1], output_channel=inputs_channel // 4,
name='55_conv_1',
stride=stride, padding='SAME', data_format='NHWC', is_training=is_training,
is_bn=False, activation=activation)
branch_55conv = conv_2d(inputs=branch_55conv, kernel_size=[3, 3], output_channel=inputs_channel // 4,
name='55_conv_2',
stride=stride, padding='SAME', data_format='NHWC', is_training=is_training,
is_bn=False, activation=activation)
branch_55conv = conv_2d(inputs=branch_55conv, kernel_size=stride, output_channel=inputs_channel // 4,
name='55_conv_3',
stride=[1, 1], padding='SAME', data_format='NHWC', is_training=is_training,
is_bn=False, activation=activation)
# Max Pool
branch_pool = max_pool_2d(inputs, kernel_size=[3, 3], stride=stride, padding='SAME')
branch_pool = conv_2d(inputs=branch_pool, kernel_size=[1, 1], output_channel=inputs_channel // 4,
name='max_pool_conv',
stride=[1, 1], padding='SAME', data_format='NHWC', is_training=is_training,
is_bn=False, activation=activation)
net = tf.concat(axis=concat_dim, values=[branch_11conv, branch_33conv, branch_55conv, branch_pool])
return net
| 65.989744
| 120
| 0.554165
| 1,589
| 12,868
| 4.180617
| 0.084959
| 0.10989
| 0.097546
| 0.099353
| 0.833961
| 0.809725
| 0.755382
| 0.715339
| 0.659792
| 0.652266
| 0
| 0.042664
| 0.340612
| 12,868
| 194
| 121
| 66.329897
| 0.740248
| 0.072505
| 0
| 0.479167
| 0
| 0
| 0.041052
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.034722
| false
| 0
| 0.013889
| 0
| 0.090278
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
e15c8ed2438a76508c161ae5304af4783635363e
| 24
|
py
|
Python
|
cogs/guilds/dataclass.py
|
waki285/rt-bot
|
1b264d7d9fe75526766b56547cea801619d13051
|
[
"BSD-4-Clause"
] | null | null | null |
cogs/guilds/dataclass.py
|
waki285/rt-bot
|
1b264d7d9fe75526766b56547cea801619d13051
|
[
"BSD-4-Clause"
] | null | null | null |
cogs/guilds/dataclass.py
|
waki285/rt-bot
|
1b264d7d9fe75526766b56547cea801619d13051
|
[
"BSD-4-Clause"
] | null | null | null |
# RT.Guilds - Data Class
| 24
| 24
| 0.708333
| 4
| 24
| 4.25
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 24
| 1
| 24
| 24
| 0.85
| 0.916667
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.