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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bdd0b5a2c7eccc4bf7ae664e464e4eb1b7daf026
| 1,772
|
py
|
Python
|
carpyncho1/skdjango/management/commands/skshell.py
|
carpyncho/yeolde_carpyncho
|
fba72ebf9d4a3e4e4ea18160310058c6812a0457
|
[
"BSD-3-Clause"
] | null | null | null |
carpyncho1/skdjango/management/commands/skshell.py
|
carpyncho/yeolde_carpyncho
|
fba72ebf9d4a3e4e4ea18160310058c6812a0457
|
[
"BSD-3-Clause"
] | 2
|
2020-06-05T19:37:26.000Z
|
2020-06-05T19:40:38.000Z
|
carpyncho1/skdjango/management/commands/skshell.py
|
carpyncho/yeolde_carpyncho
|
fba72ebf9d4a3e4e4ea18160310058c6812a0457
|
[
"BSD-3-Clause"
] | null | null | null |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#==============================================================================
# DOCS
#==============================================================================
"""Move data
"""
#==============================================================================
# IMPORTS
#==============================================================================
import logging
import numpy as np
import matplotlib.pyplot as plt
import scipy.stats as stats
import pandas as pd
from django_extensions.management import shells
from django_extensions.management.shells import import_objects as _oio
from ... import extra_stats as estats
#==============================================================================
# PATCH IMPORT OBJECTS
#==============================================================================
def sk_import_objects(*args, **kwargs):
data = _oio(*args, **kwargs)
data.update(np=np, plt=plt, stats=stats, estats=estats, pd=pd)
return data
shells.import_objects = sk_import_objects
#==============================================================================
# LOGGER
#==============================================================================
logger = logging.getLogger("carpyncho")
#==============================================================================
# COMMAND
#==============================================================================
from django_extensions.management.commands import shell_plus
class Command(shell_plus.Command):
pass
#==============================================================================
# MAIN
#==============================================================================
if __name__ == "__main__":
print(__doc__)
| 27.261538
| 79
| 0.337472
| 112
| 1,772
| 5.107143
| 0.473214
| 0.113636
| 0.104895
| 0.157343
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.000615
| 0.081828
| 1,772
| 64
| 80
| 27.6875
| 0.350953
| 0.588036
| 0
| 0
| 0
| 0
| 0.024182
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0.052632
| false
| 0.052632
| 0.578947
| 0
| 0.736842
| 0.052632
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
|
0
| 5
|
da38a5ca9427cc212f0b791e31276318e0da9206
| 168
|
py
|
Python
|
main.py
|
AkshayRaul/Rise2Code_PackHackers
|
1caecfd7a9335b37e4c10ef6cbe7f202adaa3941
|
[
"MIT"
] | null | null | null |
main.py
|
AkshayRaul/Rise2Code_PackHackers
|
1caecfd7a9335b37e4c10ef6cbe7f202adaa3941
|
[
"MIT"
] | null | null | null |
main.py
|
AkshayRaul/Rise2Code_PackHackers
|
1caecfd7a9335b37e4c10ef6cbe7f202adaa3941
|
[
"MIT"
] | null | null | null |
import relevance
import main
import requests
from bs4 import BeautifulSoup, SoupStrainer
import urllib3
import urllib
from lxml import etree
import html2text
import re
| 16.8
| 43
| 0.857143
| 23
| 168
| 6.26087
| 0.608696
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.02069
| 0.136905
| 168
| 9
| 44
| 18.666667
| 0.972414
| 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
|
da69eb929fb74976ebdd5d66d40d445120cae3db
| 184
|
py
|
Python
|
main_app/admin.py
|
donavonelli/Wayfarer
|
703207f37aabfac4469929f59bd86fb3f80cc559
|
[
"MIT"
] | 1
|
2020-11-19T16:07:27.000Z
|
2020-11-19T16:07:27.000Z
|
main_app/admin.py
|
qmsparks/Wayfarer
|
cd67e8548131c8777632290fd89b69e7e47d0354
|
[
"MIT"
] | 1
|
2020-10-14T21:36:54.000Z
|
2020-10-14T21:36:54.000Z
|
main_app/admin.py
|
qmsparks/Wayfarer
|
cd67e8548131c8777632290fd89b69e7e47d0354
|
[
"MIT"
] | 2
|
2020-10-14T19:45:55.000Z
|
2020-11-30T14:41:52.000Z
|
from django.contrib import admin
from .models import City, Profile, Post
# Register your models here.
admin.site.register(City)
admin.site.register(Profile)
admin.site.register(Post)
| 23
| 39
| 0.798913
| 27
| 184
| 5.444444
| 0.481481
| 0.183673
| 0.346939
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.103261
| 184
| 7
| 40
| 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
|
e527290a961b1c2c0f7534c693a649c73c8ceef6
| 162
|
py
|
Python
|
simulation/src/simulation_evaluation/src/state_machine/__init__.py
|
LeonardII/KitCarFork
|
b2802c5b08cc8250446ce3731cb622af064db4ca
|
[
"MIT"
] | 13
|
2020-06-30T17:18:28.000Z
|
2021-07-20T16:55:35.000Z
|
simulation/src/simulation_evaluation/src/state_machine/__init__.py
|
LeonardII/KitCarFork
|
b2802c5b08cc8250446ce3731cb622af064db4ca
|
[
"MIT"
] | 1
|
2020-11-10T20:15:42.000Z
|
2020-12-25T18:27:56.000Z
|
simulation/src/simulation_evaluation/src/state_machine/__init__.py
|
LeonardII/KitCarFork
|
b2802c5b08cc8250446ce3731cb622af064db4ca
|
[
"MIT"
] | 3
|
2020-07-20T09:09:08.000Z
|
2021-07-20T17:00:37.000Z
|
"""The StateMachineNode handels multiple state machines.
It subscribes to the speaker, parses the messages to the state machines and publishes it's
changes.
"""
| 27
| 90
| 0.790123
| 23
| 162
| 5.565217
| 0.695652
| 0.203125
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.148148
| 162
| 5
| 91
| 32.4
| 0.927536
| 0.950617
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
e5784c159c8aa4b5dcd479aaf551f232e404bfb4
| 34
|
py
|
Python
|
st_library/utils/api_client/__init__.py
|
vartagg/dataprovider-py
|
e392af3dab21c99c51a32345710fcd0dc4023462
|
[
"Apache-2.0"
] | null | null | null |
st_library/utils/api_client/__init__.py
|
vartagg/dataprovider-py
|
e392af3dab21c99c51a32345710fcd0dc4023462
|
[
"Apache-2.0"
] | 2
|
2018-03-27T11:06:46.000Z
|
2020-10-27T20:48:51.000Z
|
st_library/utils/api_client/__init__.py
|
vartagg/dataprovider-py
|
e392af3dab21c99c51a32345710fcd0dc4023462
|
[
"Apache-2.0"
] | 4
|
2018-02-26T08:12:39.000Z
|
2018-05-18T06:01:01.000Z
|
from .api_client import ApiClient
| 17
| 33
| 0.852941
| 5
| 34
| 5.6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.117647
| 34
| 1
| 34
| 34
| 0.933333
| 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
|
e5b2b393dd5789680dc4cdb5b2b003b2a18e9876
| 14,304
|
py
|
Python
|
custom/ilsgateway/migrations/0002_auto__add_organizationsummary__add_productavailabilitydata__add_supply.py
|
dslowikowski/commcare-hq
|
ad8885cf8dab69dc85cb64f37aeaf06106124797
|
[
"BSD-3-Clause"
] | 1
|
2017-02-10T03:14:51.000Z
|
2017-02-10T03:14:51.000Z
|
custom/ilsgateway/migrations/0002_auto__add_organizationsummary__add_productavailabilitydata__add_supply.py
|
dslowikowski/commcare-hq
|
ad8885cf8dab69dc85cb64f37aeaf06106124797
|
[
"BSD-3-Clause"
] | null | null | null |
custom/ilsgateway/migrations/0002_auto__add_organizationsummary__add_productavailabilitydata__add_supply.py
|
dslowikowski/commcare-hq
|
ad8885cf8dab69dc85cb64f37aeaf06106124797
|
[
"BSD-3-Clause"
] | null | null | null |
# encoding: utf-8
import 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 'OrganizationSummary'
db.create_table(u'ilsgateway_organizationsummary', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('supply_point', self.gf('django.db.models.fields.CharField')(max_length=100, db_index=True)),
('create_date', self.gf('django.db.models.fields.DateTimeField')()),
('update_date', self.gf('django.db.models.fields.DateTimeField')()),
('external_id', self.gf('django.db.models.fields.PositiveIntegerField')(null=True, db_index=True)),
('date', self.gf('django.db.models.fields.DateTimeField')()),
('total_orgs', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
('average_lead_time_in_days', self.gf('django.db.models.fields.FloatField')(default=0)),
))
db.send_create_signal(u'ilsgateway', ['OrganizationSummary'])
# Adding model 'ProductAvailabilityData'
db.create_table(u'ilsgateway_productavailabilitydata', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('supply_point', self.gf('django.db.models.fields.CharField')(max_length=100, db_index=True)),
('create_date', self.gf('django.db.models.fields.DateTimeField')()),
('update_date', self.gf('django.db.models.fields.DateTimeField')()),
('external_id', self.gf('django.db.models.fields.PositiveIntegerField')(null=True, db_index=True)),
('date', self.gf('django.db.models.fields.DateTimeField')()),
('product', self.gf('django.db.models.fields.CharField')(max_length=100, db_index=True)),
('total', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
('with_stock', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
('without_stock', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
('without_data', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
))
db.send_create_signal(u'ilsgateway', ['ProductAvailabilityData'])
# Adding model 'SupplyPointWarehouseRecord'
db.create_table(u'ilsgateway_supplypointwarehouserecord', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('supply_point', self.gf('django.db.models.fields.CharField')(max_length=100, db_index=True)),
('create_date', self.gf('django.db.models.fields.DateTimeField')()),
))
db.send_create_signal(u'ilsgateway', ['SupplyPointWarehouseRecord'])
# Adding model 'Alert'
db.create_table(u'ilsgateway_alert', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('supply_point', self.gf('django.db.models.fields.CharField')(max_length=100, db_index=True)),
('create_date', self.gf('django.db.models.fields.DateTimeField')()),
('update_date', self.gf('django.db.models.fields.DateTimeField')()),
('external_id', self.gf('django.db.models.fields.PositiveIntegerField')(null=True, db_index=True)),
('date', self.gf('django.db.models.fields.DateTimeField')()),
('type', self.gf('django.db.models.fields.CharField')(max_length=50, null=True, blank=True)),
('number', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
('text', self.gf('django.db.models.fields.TextField')()),
('url', self.gf('django.db.models.fields.CharField')(max_length=100, null=True, blank=True)),
('expires', self.gf('django.db.models.fields.DateTimeField')()),
))
db.send_create_signal(u'ilsgateway', ['Alert'])
# Adding model 'GroupSummary'
db.create_table(u'ilsgateway_groupsummary', (
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('org_summary',
self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ilsgateway.OrganizationSummary'])),
('title', self.gf('django.db.models.fields.CharField')(max_length=50, null=True, blank=True)),
('total', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
('responded', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
('on_time', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
('complete', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
('external_id', self.gf('django.db.models.fields.PositiveIntegerField')(null=True, db_index=True)),
))
db.send_create_signal(u'ilsgateway', ['GroupSummary'])
# Adding field 'DeliveryGroupReport.external_id'
db.add_column(u'ilsgateway_deliverygroupreport', 'external_id',
self.gf('django.db.models.fields.PositiveIntegerField')(null=True, db_index=True),
keep_default=False)
# Changing field 'DeliveryGroupReport.report_date'
db.alter_column(u'ilsgateway_deliverygroupreport', 'report_date',
self.gf('django.db.models.fields.DateTimeField')())
# Adding field 'SupplyPointStatus.external_id'
db.add_column(u'ilsgateway_supplypointstatus', 'external_id',
self.gf('django.db.models.fields.PositiveIntegerField')(null=True, db_index=True),
keep_default=False)
def backwards(self, orm):
# Deleting model 'OrganizationSummary'
db.delete_table(u'ilsgateway_organizationsummary')
# Deleting model 'ProductAvailabilityData'
db.delete_table(u'ilsgateway_productavailabilitydata')
# Deleting model 'SupplyPointWarehouseRecord'
db.delete_table(u'ilsgateway_supplypointwarehouserecord')
# Deleting model 'Alert'
db.delete_table(u'ilsgateway_alert')
# Deleting model 'GroupSummary'
db.delete_table(u'ilsgateway_groupsummary')
# Deleting field 'DeliveryGroupReport.external_id'
db.delete_column(u'ilsgateway_deliverygroupreport', 'external_id')
# Changing field 'DeliveryGroupReport.report_date'
db.alter_column(u'ilsgateway_deliverygroupreport', 'report_date',
self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True))
# Deleting field 'SupplyPointStatus.external_id'
db.delete_column(u'ilsgateway_supplypointstatus', 'external_id')
models = {
u'ilsgateway.alert': {
'Meta': {'object_name': 'Alert'},
'create_date': ('django.db.models.fields.DateTimeField', [], {}),
'date': ('django.db.models.fields.DateTimeField', [], {}),
'expires': ('django.db.models.fields.DateTimeField', [], {}),
'external_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True',
'db_index': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'number': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'supply_point': ('django.db.models.fields.CharField', [], {'max_length': '100', 'db_index': 'True'}),
'text': ('django.db.models.fields.TextField', [], {}),
'type': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True',
'blank': 'True'}),
'update_date': ('django.db.models.fields.DateTimeField', [], {}),
'url': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True',
'blank': 'True'})
},
u'ilsgateway.deliverygroupreport': {
'Meta': {'ordering': "('-report_date',)", 'object_name': 'DeliveryGroupReport'},
'delivery_group': ('django.db.models.fields.CharField', [], {'max_length': '1'}),
'external_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True',
'db_index': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'message': ('django.db.models.fields.CharField', [], {'max_length': '100', 'db_index': 'True'}),
'quantity': ('django.db.models.fields.IntegerField', [], {}),
'report_date': ('django.db.models.fields.DateTimeField', [],
{'default': 'datetime.datetime(2014, 10, 16, 9, 25, 21, 907582)'}),
'supply_point': ('django.db.models.fields.CharField', [], {'max_length': '100', 'db_index': 'True'})
},
u'ilsgateway.groupsummary': {
'Meta': {'object_name': 'GroupSummary'},
'complete': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'external_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True',
'db_index': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'on_time': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'org_summary': ('django.db.models.fields.related.ForeignKey', [],
{'to': u"orm['ilsgateway.OrganizationSummary']"}),
'responded': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True',
'blank': 'True'}),
'total': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'})
},
u'ilsgateway.ilsmigrationcheckpoint': {
'Meta': {'object_name': 'ILSMigrationCheckpoint'},
'api': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'date': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}),
'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'limit': ('django.db.models.fields.PositiveIntegerField', [], {}),
'offset': ('django.db.models.fields.PositiveIntegerField', [], {})
},
u'ilsgateway.organizationsummary': {
'Meta': {'object_name': 'OrganizationSummary'},
'average_lead_time_in_days': ('django.db.models.fields.FloatField', [], {'default': '0'}),
'create_date': ('django.db.models.fields.DateTimeField', [], {}),
'date': ('django.db.models.fields.DateTimeField', [], {}),
'external_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True',
'db_index': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'supply_point': ('django.db.models.fields.CharField', [], {'max_length': '100', 'db_index': 'True'}),
'total_orgs': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'update_date': ('django.db.models.fields.DateTimeField', [], {})
},
u'ilsgateway.productavailabilitydata': {
'Meta': {'object_name': 'ProductAvailabilityData'},
'create_date': ('django.db.models.fields.DateTimeField', [], {}),
'date': ('django.db.models.fields.DateTimeField', [], {}),
'external_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True',
'db_index': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'product': ('django.db.models.fields.CharField', [], {'max_length': '100', 'db_index': 'True'}),
'supply_point': ('django.db.models.fields.CharField', [], {'max_length': '100', 'db_index': 'True'}),
'total': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'update_date': ('django.db.models.fields.DateTimeField', [], {}),
'with_stock': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'without_data': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'without_stock': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'})
},
u'ilsgateway.supplypointstatus': {
'Meta': {'ordering': "('-status_date',)", 'object_name': 'SupplyPointStatus'},
'external_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True',
'db_index': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'status_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.utcnow'}),
'status_type': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
'status_value': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
'supply_point': ('django.db.models.fields.CharField', [], {'max_length': '100', 'db_index': 'True'})
},
u'ilsgateway.supplypointwarehouserecord': {
'Meta': {'object_name': 'SupplyPointWarehouseRecord'},
'create_date': ('django.db.models.fields.DateTimeField', [], {}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'supply_point': ('django.db.models.fields.CharField', [], {'max_length': '100', 'db_index': 'True'})
}
}
complete_apps = ['ilsgateway']
| 65.315068
| 114
| 0.580537
| 1,403
| 14,304
| 5.783321
| 0.088382
| 0.104511
| 0.181168
| 0.258812
| 0.800099
| 0.739463
| 0.715307
| 0.647646
| 0.62386
| 0.527607
| 0
| 0.009756
| 0.233221
| 14,304
| 218
| 115
| 65.614679
| 0.730033
| 0.044813
| 0
| 0.407821
| 0
| 0
| 0.502528
| 0.358593
| 0
| 0
| 0
| 0
| 0
| 1
| 0.011173
| false
| 0
| 0.022346
| 0
| 0.050279
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
e5c5d25d93a695ed46b1d4b445afae8a53b26a21
| 156
|
py
|
Python
|
notes/admin.py
|
JekyllAndHyde8999/LetsNote
|
5ebbfbf16d95d85ed475daadf39ad3a850ac1079
|
[
"Apache-2.0"
] | 5
|
2019-10-29T17:58:01.000Z
|
2021-01-08T09:07:43.000Z
|
notes/admin.py
|
JekyllAndHyde8999/LetsNote
|
5ebbfbf16d95d85ed475daadf39ad3a850ac1079
|
[
"Apache-2.0"
] | 1
|
2020-06-05T20:15:04.000Z
|
2020-06-05T20:15:04.000Z
|
notes/admin.py
|
JekyllAndHyde8999/LetsNote
|
5ebbfbf16d95d85ed475daadf39ad3a850ac1079
|
[
"Apache-2.0"
] | 2
|
2019-04-07T00:21:49.000Z
|
2020-09-25T15:40:56.000Z
|
from django.contrib import admin
from .models import Notes, Note_Tag
# Register your models here.
admin.site.register(Notes)
admin.site.register(Note_Tag)
| 22.285714
| 35
| 0.807692
| 24
| 156
| 5.166667
| 0.541667
| 0.112903
| 0.274194
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.108974
| 156
| 6
| 36
| 26
| 0.892086
| 0.166667
| 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 | 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
|
f9233fc30e155121175590715648df755ecb95d4
| 149
|
py
|
Python
|
mini/admin.py
|
VGichuki/minimusic
|
1092b42ea5b4b3f291a64814543675cdb118dde3
|
[
"MIT",
"Unlicense"
] | null | null | null |
mini/admin.py
|
VGichuki/minimusic
|
1092b42ea5b4b3f291a64814543675cdb118dde3
|
[
"MIT",
"Unlicense"
] | null | null | null |
mini/admin.py
|
VGichuki/minimusic
|
1092b42ea5b4b3f291a64814543675cdb118dde3
|
[
"MIT",
"Unlicense"
] | null | null | null |
from django.contrib import admin
from .models import Music,Album
# Register your models here.
admin.site.register(Music)
admin.site.register(Album)
| 21.285714
| 32
| 0.805369
| 22
| 149
| 5.454545
| 0.545455
| 0.15
| 0.283333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.107383
| 149
| 6
| 33
| 24.833333
| 0.902256
| 0.174497
| 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 | 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
|
006d2fd56e6d4ba9804d6b1040cfbb3c1ddd8295
| 623
|
py
|
Python
|
units/energy/kilowatt_hours.py
|
putridparrot/PyUnits
|
4f1095c6fc0bee6ba936921c391913dbefd9307c
|
[
"MIT"
] | null | null | null |
units/energy/kilowatt_hours.py
|
putridparrot/PyUnits
|
4f1095c6fc0bee6ba936921c391913dbefd9307c
|
[
"MIT"
] | null | null | null |
units/energy/kilowatt_hours.py
|
putridparrot/PyUnits
|
4f1095c6fc0bee6ba936921c391913dbefd9307c
|
[
"MIT"
] | null | null | null |
# <auto-generated>
# This code was generated by the UnitCodeGenerator tool
#
# Changes to this file will be lost if the code is regenerated
# </auto-generated>
def to_kilojoules(value):
return value * 3600.0
def to_kilocalories(value):
return value * 860.421
def to_joules(value):
return value * 3.6e+6
def to_btu(value):
return value * 3412.14
def to_calories(value):
return value * 860421.0
def to_u_s_therms(value):
return value / 29.3001
def to_watt_hours(value):
return value * 1000.0
def to_foot_pounds(value):
return value / 0.00000037662
def to_electronvolts(value):
return value * 2.246943e+25
| 23.961538
| 62
| 0.743178
| 102
| 623
| 4.411765
| 0.5
| 0.1
| 0.32
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.113027
| 0.162119
| 623
| 25
| 63
| 24.92
| 0.749042
| 0.239165
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0.5
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
00a50acd477e90bcae1974f45e00734af562cb35
| 103
|
py
|
Python
|
src/lobber/share/admin.py
|
SUNET/lobber
|
2ba707ebd8a6513bff7236262930a24f5e0e9492
|
[
"BSD-2-Clause-FreeBSD"
] | 1
|
2015-11-10T17:08:57.000Z
|
2015-11-10T17:08:57.000Z
|
src/lobber/share/admin.py
|
SUNET/lobber
|
2ba707ebd8a6513bff7236262930a24f5e0e9492
|
[
"BSD-2-Clause-FreeBSD"
] | null | null | null |
src/lobber/share/admin.py
|
SUNET/lobber
|
2ba707ebd8a6513bff7236262930a24f5e0e9492
|
[
"BSD-2-Clause-FreeBSD"
] | null | null | null |
from lobber.share.models import Torrent
from django.contrib import admin
admin.site.register(Torrent)
| 20.6
| 39
| 0.834951
| 15
| 103
| 5.733333
| 0.733333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.097087
| 103
| 4
| 40
| 25.75
| 0.924731
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
00d8a57eaf241d04957bc49f12bd88c73a191ccb
| 35
|
py
|
Python
|
modules/http_requests/__init__.py
|
WMDA/weapy
|
11eb6e24f22915116fd81da398305d9b3af79299
|
[
"MIT"
] | 1
|
2021-11-17T09:49:48.000Z
|
2021-11-17T09:49:48.000Z
|
modules/http_requests/__init__.py
|
WMDA/weapy
|
11eb6e24f22915116fd81da398305d9b3af79299
|
[
"MIT"
] | null | null | null |
modules/http_requests/__init__.py
|
WMDA/weapy
|
11eb6e24f22915116fd81da398305d9b3af79299
|
[
"MIT"
] | null | null | null |
from modules.http_requests import *
| 35
| 35
| 0.857143
| 5
| 35
| 5.8
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.085714
| 35
| 1
| 35
| 35
| 0.90625
| 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
|
00dddb52edfac7ff3af9c06f1bf03384e281ce92
| 189
|
py
|
Python
|
Patient/admin.py
|
s0hailAnsari/ARCIT
|
b1d6a0596efaa887a498c518e6a387adc7ec12c6
|
[
"MIT"
] | null | null | null |
Patient/admin.py
|
s0hailAnsari/ARCIT
|
b1d6a0596efaa887a498c518e6a387adc7ec12c6
|
[
"MIT"
] | 20
|
2021-04-19T11:31:48.000Z
|
2021-09-07T07:51:10.000Z
|
Patient/admin.py
|
s0hailAnsari/ARCIT
|
b1d6a0596efaa887a498c518e6a387adc7ec12c6
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from .models import Patient, PatientHistory, Appointment
admin.site.register(Patient)
admin.site.register(PatientHistory)
admin.site.register(Appointment)
| 27
| 56
| 0.84127
| 23
| 189
| 6.913043
| 0.478261
| 0.169811
| 0.320755
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.074074
| 189
| 6
| 57
| 31.5
| 0.908571
| 0
| 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
|
00f5e1455ed96092abe4bbd02875e150c56b000f
| 1,980
|
py
|
Python
|
src/server/proxyServer.py
|
josexy/proxyGet
|
4f770b176f83969a173bdf0c63846fa3ae8bcd2d
|
[
"MIT"
] | null | null | null |
src/server/proxyServer.py
|
josexy/proxyGet
|
4f770b176f83969a173bdf0c63846fa3ae8bcd2d
|
[
"MIT"
] | null | null | null |
src/server/proxyServer.py
|
josexy/proxyGet
|
4f770b176f83969a173bdf0c63846fa3ae8bcd2d
|
[
"MIT"
] | null | null | null |
class ProxyServerBase(object):
def __init__(self,url=None):
super().__init__()
self._url=url
def url():
return self._url
def __str__(self):
return self._url
def proxy_types(self):
return ['common','high_anonymous','http','https']
class XilaProxy(ProxyServerBase):
def __init__(self,url='http://www.xiladaili.com'):
super().__init__(url=url)
def commmon_proxy(self):
return self._url+"/putong"
def high_anonymous_proxy(self):
return self._url+"/gaoni"
def http_proxy(self):
return self._url+"/http"
def https_proxy(self):
return self._url+"/https"
class NimaProxy(ProxyServerBase):
def __init__(self, url='http://www.nimadaili.com'):
super().__init__(url=url)
def commmon_proxy(self):
return self._url+"/putong"
def high_anonymous_proxy(self):
return self._url+"/gaoni"
def http_proxy(self):
return self._url+"/http"
def https_proxy(self):
return self._url+"/https"
class XiciProxy(ProxyServerBase):
def __init__(self, url='https://www.xicidaili.com'):
super().__init__(url=url)
def commmon_proxy(self):
return self._url+"/nt"
def high_anonymous_proxy(self):
return self._url+"/nn"
def http_proxy(self):
return self._url+"/wt"
def https_proxy(self):
return self._url+"/wn"
class KuaiProxy(ProxyServerBase):
def __init__(self, url='https://www.kuaidaili.com'):
super().__init__(url=url)
def commmon_proxy(self):
return self._url+"/free/intr"
def high_anonymous_proxy(self):
return self._url+"/free/inha"
def proxy_types(self):
return ['common','high_anonymous']
class Yip7Proxy(ProxyServerBase):
def __init__(self, url='https://www.7yip.cn'):
super().__init__(url=url)
def http_proxy(self):
return self._url+'/free'
def proxy_types(self):
return ['http']
| 30
| 57
| 0.633838
| 250
| 1,980
| 4.648
| 0.168
| 0.144578
| 0.190189
| 0.234079
| 0.796041
| 0.763339
| 0.753012
| 0.519793
| 0.3821
| 0.3821
| 0
| 0.0013
| 0.222727
| 1,980
| 65
| 58
| 30.461538
| 0.753086
| 0
| 0
| 0.559322
| 0
| 0
| 0.128918
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
dab9908cd93e9d06a08384046b4e376d768aeebe
| 53
|
py
|
Python
|
src/models/products/__init__.py
|
nnecklace/webi-shoppi
|
140d1e6ea8d019aa10ee2104e1bbd2baf0b9aa0f
|
[
"MIT"
] | null | null | null |
src/models/products/__init__.py
|
nnecklace/webi-shoppi
|
140d1e6ea8d019aa10ee2104e1bbd2baf0b9aa0f
|
[
"MIT"
] | 2
|
2020-06-02T13:55:02.000Z
|
2020-06-16T17:58:55.000Z
|
src/models/products/__init__.py
|
nnecklace/webi-shoppi
|
140d1e6ea8d019aa10ee2104e1bbd2baf0b9aa0f
|
[
"MIT"
] | null | null | null |
from . import products
from .products import Product
| 17.666667
| 29
| 0.811321
| 7
| 53
| 6.142857
| 0.571429
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.150943
| 53
| 2
| 30
| 26.5
| 0.955556
| 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
|
daba124b9b1a6ff9d4ccb535ab01c9fbf24b2fd2
| 37
|
py
|
Python
|
__init__.py
|
snbcypher/yolov4
|
2b680a928142e4edb0b2ca901554c5f8871e966a
|
[
"Apache-2.0"
] | null | null | null |
__init__.py
|
snbcypher/yolov4
|
2b680a928142e4edb0b2ca901554c5f8871e966a
|
[
"Apache-2.0"
] | null | null | null |
__init__.py
|
snbcypher/yolov4
|
2b680a928142e4edb0b2ca901554c5f8871e966a
|
[
"Apache-2.0"
] | null | null | null |
import sys
sys.path.append("yolov4")
| 12.333333
| 25
| 0.756757
| 6
| 37
| 4.666667
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.029412
| 0.081081
| 37
| 3
| 25
| 12.333333
| 0.794118
| 0
| 0
| 0
| 0
| 0
| 0.157895
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
dac27f670b0b59c0b303e50a528e73c9dbd13a4f
| 91
|
py
|
Python
|
test_community_repos/generative_collections/__run.py
|
esc/builder
|
5af4e79729213d683df3638c1444da09c9fffe68
|
[
"BSD-2-Clause"
] | null | null | null |
test_community_repos/generative_collections/__run.py
|
esc/builder
|
5af4e79729213d683df3638c1444da09c9fffe68
|
[
"BSD-2-Clause"
] | null | null | null |
test_community_repos/generative_collections/__run.py
|
esc/builder
|
5af4e79729213d683df3638c1444da09c9fffe68
|
[
"BSD-2-Clause"
] | null | null | null |
import matplotlib.pyplot
matplotlib.pyplot.switch_backend('agg')
import main
main.main()
| 13
| 39
| 0.802198
| 12
| 91
| 6
| 0.583333
| 0.444444
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.087912
| 91
| 6
| 40
| 15.166667
| 0.86747
| 0
| 0
| 0
| 0
| 0
| 0.033333
| 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
|
dacc54c0030fc8a40133142293aafa272d0da3ec
| 43
|
py
|
Python
|
test/test_celery.py
|
Niracler/display-back-end
|
e84e95c70bc0713f29eb5ea7be70f706c7c1e746
|
[
"MIT"
] | null | null | null |
test/test_celery.py
|
Niracler/display-back-end
|
e84e95c70bc0713f29eb5ea7be70f706c7c1e746
|
[
"MIT"
] | 7
|
2020-02-12T02:37:08.000Z
|
2021-06-09T18:19:44.000Z
|
test/test_celery.py
|
game-news/display-back-end
|
e84e95c70bc0713f29eb5ea7be70f706c7c1e746
|
[
"MIT"
] | 1
|
2019-08-12T00:40:11.000Z
|
2019-08-12T00:40:11.000Z
|
from test.tasks import add
add.delay(4, 4)
| 14.333333
| 26
| 0.744186
| 9
| 43
| 3.555556
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.054054
| 0.139535
| 43
| 3
| 27
| 14.333333
| 0.810811
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
97165a060e2f57bca7f9a57987dd92189a83c951
| 55
|
py
|
Python
|
reactopya/templates/_other/NewWidget/__init__.py
|
flatironinstitute/reactopy
|
ec78d0ca6628e959017c58a6b6a09ef172de6d96
|
[
"Apache-2.0"
] | 7
|
2020-03-01T22:39:49.000Z
|
2021-11-17T01:14:15.000Z
|
reactopya/templates/_other/NewWidget/__init__.py
|
flatironinstitute/reactopy
|
ec78d0ca6628e959017c58a6b6a09ef172de6d96
|
[
"Apache-2.0"
] | 3
|
2019-11-29T07:12:54.000Z
|
2019-12-04T18:43:41.000Z
|
reactopya/templates/_other/NewWidget/__init__.py
|
flatironinstitute/reactopy
|
ec78d0ca6628e959017c58a6b6a09ef172de6d96
|
[
"Apache-2.0"
] | 2
|
2019-12-04T18:32:59.000Z
|
2021-09-23T01:07:06.000Z
|
from .{{ NewWidget.type }} import {{ NewWidget.type }}
| 27.5
| 54
| 0.654545
| 6
| 55
| 6
| 0.666667
| 0.722222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.145455
| 55
| 1
| 55
| 55
| 0.765957
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 1
| null | null | 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
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
973dc2a4aa1bba85e4ef4d5e3da1dbe14ccd81c6
| 62
|
py
|
Python
|
playlist.py
|
dylanrees/djqueue
|
b9809811e0b170d8e9af9184b64eee1937d6522c
|
[
"Unlicense"
] | null | null | null |
playlist.py
|
dylanrees/djqueue
|
b9809811e0b170d8e9af9184b64eee1937d6522c
|
[
"Unlicense"
] | null | null | null |
playlist.py
|
dylanrees/djqueue
|
b9809811e0b170d8e9af9184b64eee1937d6522c
|
[
"Unlicense"
] | null | null | null |
#this will be the script that actually generates the playlist
| 31
| 61
| 0.822581
| 10
| 62
| 5.1
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.16129
| 62
| 1
| 62
| 62
| 0.980769
| 0.967742
| 0
| null | 1
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
97591de792b555ae0413ec22a1fbf809ffccc97a
| 120
|
py
|
Python
|
fastapi_rss/__init__.py
|
elreydetoda/fastapi_rss
|
94539937fed408a6918ab45a378e46a6cf179bde
|
[
"MIT"
] | 8
|
2021-03-23T10:37:12.000Z
|
2022-02-05T07:47:12.000Z
|
fastapi_rss/__init__.py
|
elreydetoda/fastapi_rss
|
94539937fed408a6918ab45a378e46a6cf179bde
|
[
"MIT"
] | 1
|
2022-03-25T23:26:55.000Z
|
2022-03-31T19:50:18.000Z
|
fastapi_rss/__init__.py
|
elreydetoda/fastapi_rss
|
94539937fed408a6918ab45a378e46a6cf179bde
|
[
"MIT"
] | 3
|
2021-04-13T06:16:05.000Z
|
2022-01-13T03:38:33.000Z
|
# flake8: noqa
__version__ = '0.1.3'
from fastapi_rss.models import *
from fastapi_rss.rss_response import RSSResponse
| 20
| 48
| 0.791667
| 18
| 120
| 4.888889
| 0.722222
| 0.25
| 0.318182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.038095
| 0.125
| 120
| 6
| 48
| 20
| 0.8
| 0.1
| 0
| 0
| 0
| 0
| 0.046729
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
9773ab4e72d5cab55966870576ff7d9fc9c2d3b2
| 99
|
py
|
Python
|
datagets/__init__.py
|
gaford/datagets
|
afb34620f06d3cf82f8a67f8aefd5ebccd2b3313
|
[
"MIT"
] | null | null | null |
datagets/__init__.py
|
gaford/datagets
|
afb34620f06d3cf82f8a67f8aefd5ebccd2b3313
|
[
"MIT"
] | null | null | null |
datagets/__init__.py
|
gaford/datagets
|
afb34620f06d3cf82f8a67f8aefd5ebccd2b3313
|
[
"MIT"
] | null | null | null |
"""
Datagets: A collection of data science gadgets and utilities.
"""
from .evaluators import *
| 14.142857
| 62
| 0.717172
| 12
| 99
| 5.916667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.181818
| 99
| 6
| 63
| 16.5
| 0.876543
| 0.626263
| 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
|
977f7fe3fd8a2b45706374c2b86af0221d50e764
| 126
|
py
|
Python
|
spexxy/grid/__init__.py
|
thusser/spexxy
|
14a8d121076b9e043bdf2e27222a65088f771ff9
|
[
"MIT"
] | 4
|
2019-05-13T21:36:31.000Z
|
2021-09-06T01:56:36.000Z
|
spexxy/grid/__init__.py
|
thusser/spexxy
|
14a8d121076b9e043bdf2e27222a65088f771ff9
|
[
"MIT"
] | 2
|
2020-02-12T14:36:39.000Z
|
2020-07-14T11:43:10.000Z
|
spexxy/grid/__init__.py
|
thusser/spexxy
|
14a8d121076b9e043bdf2e27222a65088f771ff9
|
[
"MIT"
] | 1
|
2019-11-08T09:26:23.000Z
|
2019-11-08T09:26:23.000Z
|
from .grid import Grid, GridAxis
from .files import FilesGrid
from .values import ValuesGrid
from .synspec import SynspecGrid
| 25.2
| 32
| 0.825397
| 17
| 126
| 6.117647
| 0.588235
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.134921
| 126
| 4
| 33
| 31.5
| 0.954128
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
978b913bc38db978e5409fc2f729bc2a75f5181a
| 124
|
py
|
Python
|
nesmdb/vgm/__init__.py
|
youngmg1995/NES-Music-Maker
|
aeda10a541cfd439cfa46c45e63411e0d98e41c1
|
[
"MIT"
] | 3
|
2020-06-26T22:02:35.000Z
|
2021-11-20T19:24:33.000Z
|
nesmdb/vgm/__init__.py
|
youngmg1995/NES-Music-Maker
|
aeda10a541cfd439cfa46c45e63411e0d98e41c1
|
[
"MIT"
] | null | null | null |
nesmdb/vgm/__init__.py
|
youngmg1995/NES-Music-Maker
|
aeda10a541cfd439cfa46c45e63411e0d98e41c1
|
[
"MIT"
] | null | null | null |
from .ndr_ndf import ndf_to_ndr
from .vgm_ndr import ndr_to_vgm
from .vgm_to_wav import vgm_to_wav, load_vgmwav, save_vgmwav
| 41.333333
| 60
| 0.854839
| 26
| 124
| 3.615385
| 0.384615
| 0.148936
| 0.170213
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.104839
| 124
| 3
| 60
| 41.333333
| 0.846847
| 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
|
97add447032a21e98a8c4c2ba4411315b379f5c7
| 125
|
py
|
Python
|
pkg/sub2/relative2.py
|
wweiradio/pkg-relative-import
|
c4e733c1dfd17fcf41927499f3eca07822059005
|
[
"Apache-2.0"
] | 12
|
2018-04-12T20:09:59.000Z
|
2021-04-22T10:13:20.000Z
|
pkg/sub2/relative2.py
|
wweiradio/pkg-relative-import
|
c4e733c1dfd17fcf41927499f3eca07822059005
|
[
"Apache-2.0"
] | null | null | null |
pkg/sub2/relative2.py
|
wweiradio/pkg-relative-import
|
c4e733c1dfd17fcf41927499f3eca07822059005
|
[
"Apache-2.0"
] | 2
|
2018-07-10T12:36:46.000Z
|
2020-09-07T21:50:34.000Z
|
#! /usr/bin/env python
# -*- coding: utf-8
__author__ = 'THINK'
import parent
from .. import parent
print "in sub2 relative2"
| 20.833333
| 25
| 0.704
| 18
| 125
| 4.666667
| 0.888889
| 0.285714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.028302
| 0.152
| 125
| 6
| 25
| 20.833333
| 0.764151
| 0.312
| 0
| 0
| 0
| 0
| 0.258824
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.5
| null | null | 0.25
| 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
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
c10c2a5c49d8f361efb3166b7ea2259e7440589c
| 55
|
py
|
Python
|
module.py
|
BinhMinhs10/pyEncryptor
|
8c99135a6486bcdd542d8e69d39940999c204885
|
[
"MIT"
] | null | null | null |
module.py
|
BinhMinhs10/pyEncryptor
|
8c99135a6486bcdd542d8e69d39940999c204885
|
[
"MIT"
] | null | null | null |
module.py
|
BinhMinhs10/pyEncryptor
|
8c99135a6486bcdd542d8e69d39940999c204885
|
[
"MIT"
] | null | null | null |
def hello_world():
print("How Minh Secure code!")
| 13.75
| 34
| 0.654545
| 8
| 55
| 4.375
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.2
| 55
| 3
| 35
| 18.333333
| 0.795455
| 0
| 0
| 0
| 0
| 0
| 0.388889
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| true
| 0
| 0
| 0
| 0.5
| 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
c1701707e764f66c00d9872a054d0a3145aa9908
| 132
|
py
|
Python
|
bank_accounts/admin.py
|
mathemaat/afscheck
|
2899cca2d759c6433fceda8482c7400b161d7b3b
|
[
"MIT"
] | null | null | null |
bank_accounts/admin.py
|
mathemaat/afscheck
|
2899cca2d759c6433fceda8482c7400b161d7b3b
|
[
"MIT"
] | 4
|
2019-02-25T17:24:09.000Z
|
2019-02-25T17:25:05.000Z
|
bank_accounts/admin.py
|
mathemaat/afscheck
|
2899cca2d759c6433fceda8482c7400b161d7b3b
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from .models import Bank, BankAccount
admin.site.register(Bank)
admin.site.register(BankAccount)
| 18.857143
| 37
| 0.818182
| 18
| 132
| 6
| 0.555556
| 0.166667
| 0.314815
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.098485
| 132
| 6
| 38
| 22
| 0.907563
| 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 | 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
|
e72bd1bc4bc61dfa38a37ab4434efe9c27eee898
| 52
|
py
|
Python
|
FoodScan/ShopSync/__init__.py
|
danielBreitlauch/FoodScan
|
cf84209c4da84a8cb56deccdbde9c305eee1b8c3
|
[
"MIT"
] | 1
|
2017-03-16T00:59:01.000Z
|
2017-03-16T00:59:01.000Z
|
FoodScan/ShopSync/__init__.py
|
danielBreitlauch/FoodScan
|
cf84209c4da84a8cb56deccdbde9c305eee1b8c3
|
[
"MIT"
] | null | null | null |
FoodScan/ShopSync/__init__.py
|
danielBreitlauch/FoodScan
|
cf84209c4da84a8cb56deccdbde9c305eee1b8c3
|
[
"MIT"
] | null | null | null |
from .shopSync import ShopSync
from .Shops import *
| 17.333333
| 30
| 0.788462
| 7
| 52
| 5.857143
| 0.571429
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.153846
| 52
| 2
| 31
| 26
| 0.931818
| 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
|
e72d1dea5732f4c154237fe1311d12ff542f79e7
| 27
|
py
|
Python
|
constants/ip_addr_constants.py
|
chrisruenes1/Collisions-I
|
176a14884c483a422e1e457efa61d79140f77893
|
[
"MIT"
] | null | null | null |
constants/ip_addr_constants.py
|
chrisruenes1/Collisions-I
|
176a14884c483a422e1e457efa61d79140f77893
|
[
"MIT"
] | null | null | null |
constants/ip_addr_constants.py
|
chrisruenes1/Collisions-I
|
176a14884c483a422e1e457efa61d79140f77893
|
[
"MIT"
] | null | null | null |
BLUE_ROBOT_IP = "10.0.0.28"
| 27
| 27
| 0.703704
| 7
| 27
| 2.428571
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.24
| 0.074074
| 27
| 1
| 27
| 27
| 0.44
| 0
| 0
| 0
| 0
| 0
| 0.321429
| 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
|
e770c4214b843d2bbfbe39e9560e68bfdd5f2610
| 216
|
py
|
Python
|
mmdet2trt/core/bbox/coder/__init__.py
|
jackweiwang/mmdetection-to-tensorrt
|
f988ba8e923764fb1173385a1c7160b8f8b5bd99
|
[
"Apache-2.0"
] | 1
|
2021-08-23T10:09:37.000Z
|
2021-08-23T10:09:37.000Z
|
mmdet2trt/core/bbox/coder/__init__.py
|
gcong18/mmdetection-to-tensorrt
|
c31c32ee4720ff56010bcda77bacf3a110d0526c
|
[
"Apache-2.0"
] | null | null | null |
mmdet2trt/core/bbox/coder/__init__.py
|
gcong18/mmdetection-to-tensorrt
|
c31c32ee4720ff56010bcda77bacf3a110d0526c
|
[
"Apache-2.0"
] | null | null | null |
from .delta_xywh_bbox_coder import DeltaXYWHBBoxCoderWraper
from .tblr_bbox_coder import TBLRBBoxCoderWraper
from .yolo_bbox_coder import YOLOBBoxCoderWraper
from .bucketing_bbox_coder import BucketingBBoxCoderWraper
| 54
| 59
| 0.912037
| 25
| 216
| 7.52
| 0.52
| 0.191489
| 0.319149
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.069444
| 216
| 4
| 60
| 54
| 0.935323
| 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
|
e7a303338ad99255f27bb5aaa44e6a6835b389bb
| 29
|
py
|
Python
|
NBA_News/NBA_Scrapy/__init__.py
|
papagorgio23/NBA_News_Spiders
|
ca5c12bf50e1a8b422b0afc315a6b61ba3b67588
|
[
"MIT"
] | 3
|
2020-07-20T22:10:02.000Z
|
2022-02-09T22:04:37.000Z
|
NBA_News/NBA_Scrapy/__init__.py
|
papagorgio23/NBA_News_Spiders
|
ca5c12bf50e1a8b422b0afc315a6b61ba3b67588
|
[
"MIT"
] | null | null | null |
NBA_News/NBA_Scrapy/__init__.py
|
papagorgio23/NBA_News_Spiders
|
ca5c12bf50e1a8b422b0afc315a6b61ba3b67588
|
[
"MIT"
] | null | null | null |
# get this show on the road!
| 14.5
| 28
| 0.689655
| 6
| 29
| 3.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.241379
| 29
| 1
| 29
| 29
| 0.909091
| 0.896552
| 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
|
e7d72316584d5596fbf9c84f3f3ab4d1e0ec6288
| 431
|
py
|
Python
|
python/anyascii/_data/_003.py
|
casept/anyascii
|
d4f426b91751254b68eaa84c6cd23099edd668e6
|
[
"ISC"
] | null | null | null |
python/anyascii/_data/_003.py
|
casept/anyascii
|
d4f426b91751254b68eaa84c6cd23099edd668e6
|
[
"ISC"
] | null | null | null |
python/anyascii/_data/_003.py
|
casept/anyascii
|
d4f426b91751254b68eaa84c6cd23099edd668e6
|
[
"ISC"
] | null | null | null |
b=" a e i o u c d h m r t v x H h S s ' , W w i s s. s. ? J ' \"' A ; E I I O Y O i A V G D E Z I Th I K L M N X O P R S T Y F Ch Ps O I Y a e i i y a v g d e z i th i k l m n x o p r s s t y f ch ps o i y o y o & b th Y Y Y ph p & Q q St st W w Q q S s Sh sh F f X x H h J j Q q Ti ti k r s j Th e e Sh sh S S s r. S S. S."
| 431
| 431
| 0.366589
| 141
| 431
| 1.120567
| 0.234043
| 0.113924
| 0.056962
| 0.050633
| 0.373418
| 0.373418
| 0.373418
| 0.373418
| 0.373418
| 0.240506
| 0
| 0
| 0.591647
| 431
| 1
| 431
| 431
| 0.897727
| 0
| 0
| 0
| 0
| 1
| 0.37963
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
99b302145b2f99f826e2f83ee226d68206e803b3
| 148
|
py
|
Python
|
pylinkage/output_mode.py
|
Drumato/pylinkage
|
2033112c95a15722efcd9271c08fd919df635eae
|
[
"MIT"
] | null | null | null |
pylinkage/output_mode.py
|
Drumato/pylinkage
|
2033112c95a15722efcd9271c08fd919df635eae
|
[
"MIT"
] | null | null | null |
pylinkage/output_mode.py
|
Drumato/pylinkage
|
2033112c95a15722efcd9271c08fd919df635eae
|
[
"MIT"
] | null | null | null |
from __future__ import annotations
import enum
class OutputMode(enum.Enum):
YAML = enum.auto()
SCRIPT = enum.auto()
NONE = enum.auto()
| 18.5
| 34
| 0.689189
| 19
| 148
| 5.157895
| 0.578947
| 0.244898
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.202703
| 148
| 8
| 35
| 18.5
| 0.830508
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
82070ed867d1d9a4e1075b7b286b9218ff029629
| 31
|
py
|
Python
|
src/Products/Five/viewlet/__init__.py
|
tseaver/Zope-RFA
|
08634f39b0f8b56403a2a9daaa6ee4479ef0c625
|
[
"ZPL-2.1"
] | 2
|
2015-12-21T10:34:56.000Z
|
2017-09-24T11:07:58.000Z
|
src/Products/Five/viewlet/__init__.py
|
MatthewWilkes/Zope
|
740f934fc9409ae0062e8f0cd6dcfd8b2df00376
|
[
"ZPL-2.1"
] | null | null | null |
src/Products/Five/viewlet/__init__.py
|
MatthewWilkes/Zope
|
740f934fc9409ae0062e8f0cd6dcfd8b2df00376
|
[
"ZPL-2.1"
] | null | null | null |
# A package for viewlet support
| 31
| 31
| 0.806452
| 5
| 31
| 5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.16129
| 31
| 1
| 31
| 31
| 0.961538
| 0.935484
| 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
|
823e6abb06792e637e8b7c0d170702fadef6de2b
| 32
|
py
|
Python
|
yusheng_shuai/play.py
|
YoungRainy/HY_coorprate
|
89661ad737863fd2b65cb8731f5c613e0ed13b99
|
[
"MIT"
] | null | null | null |
yusheng_shuai/play.py
|
YoungRainy/HY_coorprate
|
89661ad737863fd2b65cb8731f5c613e0ed13b99
|
[
"MIT"
] | null | null | null |
yusheng_shuai/play.py
|
YoungRainy/HY_coorprate
|
89661ad737863fd2b65cb8731f5c613e0ed13b99
|
[
"MIT"
] | null | null | null |
import numpy as np
np.random(3)
| 10.666667
| 18
| 0.75
| 7
| 32
| 3.428571
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.037037
| 0.15625
| 32
| 2
| 19
| 16
| 0.851852
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
415d1fcdfb8105ca358bbfd0c1e023264f35dd57
| 87
|
py
|
Python
|
nodemcu_kernel/__init__.py
|
nealmcb/nodemcu_kernel
|
ccd97a4fccb99d3c05ed7e22b15c1e28218676fe
|
[
"MIT"
] | 4
|
2017-02-18T19:28:33.000Z
|
2020-12-10T07:48:21.000Z
|
nodemcu_kernel/__init__.py
|
nealmcb/nodemcu_kernel
|
ccd97a4fccb99d3c05ed7e22b15c1e28218676fe
|
[
"MIT"
] | 1
|
2018-01-05T08:15:30.000Z
|
2018-01-05T08:15:30.000Z
|
nodemcu_kernel/__init__.py
|
nealmcb/nodemcu_kernel
|
ccd97a4fccb99d3c05ed7e22b15c1e28218676fe
|
[
"MIT"
] | 2
|
2019-04-12T14:18:51.000Z
|
2019-09-25T16:39:58.000Z
|
'''A Jupyter kernel for MicroPython on the NodeMcu'''
from .kernel import __version__
| 21.75
| 53
| 0.770115
| 12
| 87
| 5.25
| 0.916667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.149425
| 87
| 3
| 54
| 29
| 0.851351
| 0.54023
| 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
|
41905ca3c4bf79bb076c8c99081c5b0beb636d6a
| 506
|
py
|
Python
|
studio/houdini/scripts/hurl_resolver.py
|
astips/tk-astips-app-url-resolver
|
fd1a5d49d1ef1590a05ad640fb4f74a9579721ab
|
[
"MIT"
] | null | null | null |
studio/houdini/scripts/hurl_resolver.py
|
astips/tk-astips-app-url-resolver
|
fd1a5d49d1ef1590a05ad640fb4f74a9579721ab
|
[
"MIT"
] | null | null | null |
studio/houdini/scripts/hurl_resolver.py
|
astips/tk-astips-app-url-resolver
|
fd1a5d49d1ef1590a05ad640fb4f74a9579721ab
|
[
"MIT"
] | 3
|
2018-06-07T14:26:51.000Z
|
2021-11-30T12:49:18.000Z
|
# -*- coding: utf-8 -*-
###########################################################################################
#
# Author: astips (animator.well)
#
# Date: 2017.05
#
# Url: https://github.com/astips
#
# Description: Houdini url resolver scripts
#
###########################################################################################
from studiourl import StudioUrl
def hurl_checker(burl):
return StudioUrl(burl).is_valid
def hurl_helper(burl):
return StudioUrl(burl).real_path
| 22
| 91
| 0.440711
| 42
| 506
| 5.214286
| 0.738095
| 0.063927
| 0.173516
| 0.210046
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.015625
| 0.114625
| 506
| 22
| 92
| 23
| 0.473214
| 0.274704
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.4
| false
| 0
| 0.2
| 0.4
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
41bd908258cd815839aeadd7e01142ec8cefcea3
| 376
|
py
|
Python
|
hb_quant/huobi/model/subuser/__init__.py
|
wenli135/Binance-volatility-trading-bot
|
75a03ad61df0e95492128fb6f1f419d4dc256ab3
|
[
"MIT"
] | 611
|
2019-07-10T08:17:50.000Z
|
2022-03-21T18:56:39.000Z
|
hb_quant/huobi/model/subuser/__init__.py
|
wenli135/Binance-volatility-trading-bot
|
75a03ad61df0e95492128fb6f1f419d4dc256ab3
|
[
"MIT"
] | 105
|
2019-07-12T03:43:41.000Z
|
2022-03-30T10:33:06.000Z
|
hb_quant/huobi/model/subuser/__init__.py
|
wenli135/Binance-volatility-trading-bot
|
75a03ad61df0e95492128fb6f1f419d4dc256ab3
|
[
"MIT"
] | 325
|
2019-07-12T02:46:54.000Z
|
2022-03-21T18:56:41.000Z
|
from huobi.model.subuser.subuser_creation import SubuserCreation
from huobi.model.subuser.subuser_transferability import SubuserTransferability
from huobi.model.subuser.subuser_apikey_generation import SubuserApikeyGeneration
from huobi.model.subuser.user_apikey_info import UserApikeyInfo
from huobi.model.subuser.subuser_apikey_modification import SubuserApikeyModification
| 62.666667
| 85
| 0.906915
| 43
| 376
| 7.744186
| 0.395349
| 0.135135
| 0.21021
| 0.315315
| 0.372372
| 0.204204
| 0
| 0
| 0
| 0
| 0
| 0
| 0.053191
| 376
| 5
| 86
| 75.2
| 0.935393
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 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
|
41bf043e80501a4aa68eec55a77c5887d106c190
| 29
|
py
|
Python
|
src/UnitTests/TestData/Grammar/IncompleteMemberExpr.py
|
jamesralstin/python-language-server
|
53eb5886776c9e75590bf2f5a787ba4015879c4d
|
[
"Apache-2.0"
] | 695
|
2019-05-06T23:49:37.000Z
|
2022-03-30T01:56:00.000Z
|
src/UnitTests/TestData/Grammar/IncompleteMemberExpr.py
|
jamesralstin/python-language-server
|
53eb5886776c9e75590bf2f5a787ba4015879c4d
|
[
"Apache-2.0"
] | 1,043
|
2019-05-07T02:24:11.000Z
|
2022-03-31T22:21:24.000Z
|
src/UnitTests/TestData/Grammar/IncompleteMemberExpr.py
|
jamesralstin/python-language-server
|
53eb5886776c9e75590bf2f5a787ba4015879c4d
|
[
"Apache-2.0"
] | 131
|
2019-05-09T15:34:23.000Z
|
2022-03-23T17:52:35.000Z
|
a. #comment
x = 1
b.
x = 2
c.
| 5.8
| 11
| 0.482759
| 8
| 29
| 1.75
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1
| 0.310345
| 29
| 5
| 12
| 5.8
| 0.6
| 0.241379
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0
| 1
| 1
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
68c5c52d6cf678a03286021eed6b143f70715bdf
| 85
|
py
|
Python
|
tests/deep_cnn/cifar/__init__.py
|
neil-tan/utensor_cgen
|
ffaf692bf6d1f8572039ad7e82e695f97b050cd2
|
[
"Apache-2.0"
] | null | null | null |
tests/deep_cnn/cifar/__init__.py
|
neil-tan/utensor_cgen
|
ffaf692bf6d1f8572039ad7e82e695f97b050cd2
|
[
"Apache-2.0"
] | null | null | null |
tests/deep_cnn/cifar/__init__.py
|
neil-tan/utensor_cgen
|
ffaf692bf6d1f8572039ad7e82e695f97b050cd2
|
[
"Apache-2.0"
] | null | null | null |
# -*- coding: utf8 -*-
from __future__ import absolute_import
from ._cifar import *
| 17
| 38
| 0.717647
| 10
| 85
| 5.5
| 0.7
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.014085
| 0.164706
| 85
| 4
| 39
| 21.25
| 0.760563
| 0.235294
| 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
|
ec1208166e8e97248d1e4a35ce8299c1e22adf35
| 42
|
py
|
Python
|
tests/__init__.py
|
thejeffreyli/pySimpleMask
|
8c7155acaf413b4eca78f812a9d038e2a366341a
|
[
"MIT"
] | null | null | null |
tests/__init__.py
|
thejeffreyli/pySimpleMask
|
8c7155acaf413b4eca78f812a9d038e2a366341a
|
[
"MIT"
] | null | null | null |
tests/__init__.py
|
thejeffreyli/pySimpleMask
|
8c7155acaf413b4eca78f812a9d038e2a366341a
|
[
"MIT"
] | 1
|
2021-11-03T16:11:57.000Z
|
2021-11-03T16:11:57.000Z
|
"""Unit test package for pysimplemask."""
| 21
| 41
| 0.714286
| 5
| 42
| 6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.119048
| 42
| 1
| 42
| 42
| 0.810811
| 0.833333
| 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
|
ec260dced77a95f205ac8e41358ea0b35544eb96
| 181
|
py
|
Python
|
pydantabase/__init__.py
|
tombulled/pydantable
|
32c36f5f03395c26997861de1a8b7c26cf2a96e5
|
[
"MIT"
] | 1
|
2022-01-07T01:09:07.000Z
|
2022-01-07T01:09:07.000Z
|
pydantabase/__init__.py
|
tombulled/pydantable
|
32c36f5f03395c26997861de1a8b7c26cf2a96e5
|
[
"MIT"
] | null | null | null |
pydantabase/__init__.py
|
tombulled/pydantable
|
32c36f5f03395c26997861de1a8b7c26cf2a96e5
|
[
"MIT"
] | null | null | null |
from tinydb import Query
from .database import Database
from .document import Document
from .mixins import ModelMixin
from .models import BaseModel
from .table import Table
| 22.625
| 32
| 0.79558
| 24
| 181
| 6
| 0.458333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.176796
| 181
| 7
| 33
| 25.857143
| 0.966443
| 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
|
ec47d853a5b3a0ce331ed362f9a8d1afbf9b79fc
| 12,617
|
py
|
Python
|
sim/cocotb_sim/stc0_tests.py
|
russellfriesenhahn/stc0
|
0fa75db9109a528c4751cf78987575f1eede39ae
|
[
"BSD-3-Clause"
] | null | null | null |
sim/cocotb_sim/stc0_tests.py
|
russellfriesenhahn/stc0
|
0fa75db9109a528c4751cf78987575f1eede39ae
|
[
"BSD-3-Clause"
] | null | null | null |
sim/cocotb_sim/stc0_tests.py
|
russellfriesenhahn/stc0
|
0fa75db9109a528c4751cf78987575f1eede39ae
|
[
"BSD-3-Clause"
] | null | null | null |
# Simple tests for an adder module
import cocotb
#from cocotb.triggers import Timer
from cocotb.triggers import *
from cocotb.result import TestFailure
from cocotb.clock import Clock
import random
from ft245 import FT245
import numpy
import sys
sys.path.append("../../sw")
sys.path.append("../../modules/housekeeper/sw")
from hk import *
from stc0 import *
from stc0SIMcocotb import *
from lfsr32 import *
from crc32 import *
async def reset_dut(reset_n, duration_ns):
reset_n <= 1
await Timer(duration_ns, units='ns')
reset_n <= 0
reset_n._log.debug("Reset complete")
CLK_PERIOD_NS = 10
def setup_dut(dut):
cocotb.fork(Clock(dut.Clk, CLK_PERIOD_NS, units='ns').start())
@cocotb.test(skip = False)
def stc0_load_tw(dut):
"""
This test loads the Twiddle RAM up with LFSRY data, then reads it back
out verifying the ability to load and read the Twiddle factors.
"""
numpy.set_printoptions(formatter={'int':lambda x:hex(int(x))})
dut.ARst <= 1
stc0 = stc0SIMcocotb(dut, CLK_PERIOD_NS)
cocotb.fork(Clock(dut.Clk, CLK_PERIOD_NS, units='ns').start())
yield Timer(CLK_PERIOD_NS * 10, units='ns')
dut.ARst <= 0
yield Timer(CLK_PERIOD_NS * 10, units='ns')
yield stc0.hk.reset()
seedValA = 0x1
seedValB = 0x2
crcValA = 0x0
crcValB = 0x0
yield stc0.hk.set_sfifoWrSrc(hk.HW_SFFWRSRC_INGRESS)
bf0Ctrl = (stc0.HW_CTRL_BF0 << stc0.HW_RB_CTRL_ADDR) | (0x1 << stc0.HW_RB_BFCTRL_TWWR)
yield stc0.hk.send_write_command(0x1, stc0.HW_FA_CTRL_CTRLWORD, [bf0Ctrl])
esCtrl = (stc0.HW_CTRL_ES << stc0.HW_RB_CTRL_ADDR) | (0x0 << stc0.HW_RB_EGRESSCTRL_OUTPUTEN) | (0x1 << stc0.HW_RB_EGRESSCTRL_CRCBYPASS)|(0x2 << stc0.HW_RB_EGRESSCTRL_OUTPUTMUX)
#yield stc0.hk.send_write_command(0x1, (stc0.HW_RM_CTRL << stc0.HW_RML) | (stc0.HW_RA_CTRL_CTRLWORD << stc0.HW_RAL), [esCtrl])
yield stc0.hk.send_write_command(0x1, stc0.HW_FA_CTRL_CTRLWORD, [esCtrl])
yield stc0.configAndStartLFSRs(0x1, 512, 0x0, 0x1, 0x2)
yield Timer(CLK_PERIOD_NS * 1050, units='ns')
print(hex(bf0Ctrl))
bf0Ctrl ^= (0x1 << stc0.HW_RB_BFCTRL_TWWR)
print(hex(bf0Ctrl))
bf0Ctrl |= (0x1 << stc0.HW_RB_BFCTRL_TWRD)
print(hex(bf0Ctrl))
yield stc0.hk.send_write_command(0x1, stc0.HW_FA_CTRL_CTRLWORD, [bf0Ctrl])
esCtrl |= (0x1 << stc0.HW_RB_EGRESSCTRL_OUTPUTEN)
esCtrl |= (0x2 << stc0.HW_RB_EGRESSCTRL_OUTPUTMUX)
yield stc0.hk.send_write_command(0x1, stc0.HW_FA_CTRL_CTRLWORD, [esCtrl])
yield stc0.configAndStartLFSRs(0x4, 512, 0x0, 0x0, 0x0)
yield Timer(CLK_PERIOD_NS * 530 * 4, units='ns')
#yield Timer(CLK_PERIOD_NS * 30, units='ns')
yield stc0.hk.send_write_command(stc0.hk.HW_HK_WRITE, stc0.hk.HW_ADDR_SFFRB_NUMBYTES, [512*4])
yield Timer(CLK_PERIOD_NS * 5, units='ns')
a = yield stc0.hk.ft245m.read_bytes(512*4)
yield Timer(CLK_PERIOD_NS * 40, units='ns')
data = numpy.arange(512)
for i in range(0,512):
data[i] = seedValB
crcValB = crc32(crcValB, seedValB)
seedValB = lfsr32(seedValB, 1)
#print(data)
#print(a)
print("crcA is " + hex(crcValA))
print("crcB is " + hex(crcValB))
if numpy.array_equal(data, a) is False:
# Fail
raise TestFailure("Readback data does not match")
@cocotb.test(skip = False)
def stc0_both_crc_test(dut):
"""Verify CRC operations.
The LFSRs' data goes to the CRC blocks. Only the two final CRC values
are transmitted from the DUT for comparison
"""
numpy.set_printoptions(formatter={'int':lambda x:hex(int(x))})
dut.ARst <= 1
stc0 = stc0SIMcocotb(dut, CLK_PERIOD_NS)
cocotb.fork(Clock(dut.Clk, CLK_PERIOD_NS, units='ns').start())
yield Timer(CLK_PERIOD_NS * 10, units='ns')
dut.ARst <= 0
yield Timer(CLK_PERIOD_NS * 10, units='ns')
yield stc0.hk.reset()
seedValA = 0x1
seedValB = 0x2
crcValA = 0x0
crcValB = 0x0
yield stc0.hk.set_sfifoWrSrc(hk.HW_SFFWRSRC_INGRESS)
yield stc0.hk.send_write_command(0x1, (stc0.HW_RM_CTRL << stc0.HW_RML) | (stc0.HW_RA_CTRL_CTRLWORD << stc0.HW_RAL), [(stc0.HW_CTRL_BF0 << stc0.HW_RB_CTRL_ADDR) | (0x1 << stc0.HW_RB_BFCTRL_BFBYPASS)])
yield stc0.hk.send_write_command(0x1, (stc0.HW_RM_CTRL << stc0.HW_RML) | (stc0.HW_RA_CTRL_CTRLWORD << stc0.HW_RAL), [(stc0.HW_CTRL_ES << stc0.HW_RB_CTRL_ADDR) | (0x0 << stc0.HW_RB_EGRESSCTRL_OUTPUTEN) | (0x0 << stc0.HW_RB_EGRESSCTRL_CRCBYPASS)|(0x0 << stc0.HW_RB_EGRESSCTRL_OUTPUTMUX) ])
yield stc0.configAndStartLFSRs(0x1, 0x10, 0x0, 0x1, 0x2)
yield Timer(CLK_PERIOD_NS * 30, units='ns')
yield stc0.hk.send_write_command(0x1, (stc0.HW_RM_CTRL << stc0.HW_RML) | (stc0.HW_RA_CTRL_CTRLWORD << stc0.HW_RAL), [(stc0.HW_CTRL_ES << stc0.HW_RB_CTRL_ADDR) | (0x1 << stc0.HW_RB_EGRESSCTRL_OUTPUTEN) | (0x0 << stc0.HW_RB_EGRESSCTRL_CRCBYPASS)|(0x0 << stc0.HW_RB_EGRESSCTRL_OUTPUTMUX) ])
yield stc0.hk.send_write_command(stc0.hk.HW_HK_WRITE, stc0.hk.HW_ADDR_SFFRB_NUMBYTES, [8])
yield Timer(CLK_PERIOD_NS * 5, units='ns')
a = yield stc0.hk.ft245m.read_bytes(8)
yield Timer(CLK_PERIOD_NS * 40, units='ns')
data = numpy.arange(32)
for i in range(0,32,2):
data[i] = seedValA
data[i+1] = seedValB
crcValA = crc32(crcValA, seedValA)
seedValA = lfsr32(seedValA, 1)
crcValB = crc32(crcValB, seedValB)
seedValB = lfsr32(seedValB, 1)
print(a)
print("crcA is " + hex(crcValA))
print("crcB is " + hex(crcValB))
if numpy.array_equal([crcValA,crcValB], a) is False:
# Fail
raise TestFailure("Readback data does not match")
@cocotb.test(skip = False)
def stc0_both_lfsr_test(dut):
"""Verifies both LFSRs and transmitting data from both streams.
The LFSRs are run and LFSR values are streamed out for comparison.
Due to the egress setup, the LFSR values are interleaved.
"""
numpy.set_printoptions(formatter={'int':lambda x:hex(int(x))})
dut.ARst <= 1
stc0 = stc0SIMcocotb(dut, CLK_PERIOD_NS)
cocotb.fork(Clock(dut.Clk, CLK_PERIOD_NS, units='ns').start())
yield Timer(CLK_PERIOD_NS * 10, units='ns')
dut.ARst <= 0
yield Timer(CLK_PERIOD_NS * 10, units='ns')
yield stc0.hk.reset()
seedValA = 0x1
seedValB = 0x2
yield stc0.hk.set_sfifoWrSrc(hk.HW_SFFWRSRC_INGRESS)
yield stc0.hk.send_write_command(0x1, (stc0.HW_RM_CTRL << stc0.HW_RML) | (stc0.HW_RA_CTRL_CTRLWORD << stc0.HW_RAL), [(stc0.HW_CTRL_BF0 << stc0.HW_RB_CTRL_ADDR) | (0x1 << stc0.HW_RB_BFCTRL_BFBYPASS)])
yield stc0.hk.send_write_command(0x1, (stc0.HW_RM_CTRL << stc0.HW_RML) | (stc0.HW_RA_CTRL_CTRLWORD << stc0.HW_RAL), [(stc0.HW_CTRL_ES << stc0.HW_RB_CTRL_ADDR) | (0x1 << stc0.HW_RB_EGRESSCTRL_OUTPUTEN) | (0x1 << stc0.HW_RB_EGRESSCTRL_CRCBYPASS)|(0x0 << stc0.HW_RB_EGRESSCTRL_OUTPUTMUX) ])
yield stc0.configAndStartLFSRs(0x8, 0x10, 0x0, 0x1, 0x2)
yield stc0.hk.send_write_command(stc0.hk.HW_HK_WRITE, stc0.hk.HW_ADDR_SFFRB_NUMBYTES, [128])
yield Timer(CLK_PERIOD_NS * 5, units='ns')
a = yield stc0.hk.ft245m.read_bytes(128)
yield Timer(CLK_PERIOD_NS * 40, units='ns')
data = numpy.arange(32)
for i in range(0,32,2):
data[i] = seedValA
data[i+1] = seedValB
seedValA = lfsr32(seedValA, 1)
seedValB = lfsr32(seedValB, 1)
print(data)
print(a)
if numpy.array_equal(data, a) is False:
# Fail
raise TestFailure("Readback data does not match")
@cocotb.test(skip = False)
def stc0_lfsr_test(dut):
"""Verifies basic LFSR X operation.
The LFSR is run and LFSR values are streamed out for comparison.
"""
numpy.set_printoptions(formatter={'int':lambda x:hex(int(x))})
dut.ARst <= 1
stc0 = stc0SIMcocotb(dut, CLK_PERIOD_NS)
cocotb.fork(Clock(dut.Clk, CLK_PERIOD_NS, units='ns').start())
yield Timer(CLK_PERIOD_NS * 10, units='ns')
dut.ARst <= 0
yield Timer(CLK_PERIOD_NS * 10, units='ns')
yield stc0.hk.reset()
seedVal = 0x1
yield stc0.hk.set_sfifoWrSrc(hk.HW_SFFWRSRC_INGRESS)
yield stc0.hk.send_write_command(0x1, (stc0.HW_RM_CTRL << stc0.HW_RML) | (stc0.HW_RA_CTRL_CTRLWORD << stc0.HW_RAL), [(stc0.HW_CTRL_BF0 << stc0.HW_RB_CTRL_ADDR) | (0x1 << stc0.HW_RB_BFCTRL_BFBYPASS)])
yield stc0.hk.send_write_command(0x1, (stc0.HW_RM_CTRL << stc0.HW_RML) | (stc0.HW_RA_CTRL_CTRLWORD << stc0.HW_RAL), [(stc0.HW_CTRL_ES << stc0.HW_RB_CTRL_ADDR) | (0x1 << stc0.HW_RB_EGRESSCTRL_OUTPUTEN) | (0x1 << stc0.HW_RB_EGRESSCTRL_CRCBYPASS)|(0x1 << stc0.HW_RB_EGRESSCTRL_OUTPUTMUX) ])
yield stc0.configAndStartLFSRs(0x4, 0x10, 0x0, 0x1, 0x1)
#yield stc0.hk.send_write_command(0x1, (stc0.HW_RM_CTRL << stc0.HW_RML) | (stc0.HW_RA_CTRL_MUXCTRL << stc0.HW_RAL), [0x1])
#yield stc0.hk.send_write_command(0x1, (stc0.HW_RM_CTRL << stc0.HW_RML) | (stc0.HW_RA_CTRL_LFSRS_STRIDE << stc0.HW_RAL), [0x3])
#yield stc0.hk.send_write_command(0x1, (stc0.HW_RM_CTRL << stc0.HW_RML) | (stc0.HW_RA_CTRL_LFSRS_ITERATIONS << stc0.HW_RAL), [0x10])
#yield stc0.hk.send_write_command(0x1, (stc0.HW_RM_CTRL << stc0.HW_RML) | (stc0.HW_RA_CTRL_LFSRX_SEED << stc0.HW_RAL), [seedVal])
#yield stc0.hk.send_write_command(0x1, (stc0.HW_RM_CTRL << stc0.HW_RML) | (stc0.HW_RA_CTRL_LFSRS_CTRL << stc0.HW_RAL), [0x1])
yield stc0.hk.send_write_command(stc0.hk.HW_HK_WRITE, stc0.hk.HW_ADDR_SFFRB_NUMBYTES, [64])
yield Timer(CLK_PERIOD_NS * 5, units='ns')
a = yield stc0.hk.ft245m.read_bytes(64)
yield Timer(CLK_PERIOD_NS * 30, units='ns')
data = numpy.arange(16)
for i in range(16):
data[i] = seedVal
seedVal = lfsr32(seedVal, 1)
print(data)
print(a)
if numpy.array_equal(data, a) is False:
# Fail
raise TestFailure("Readback data does not match")
# Test the stc0 simulation class
# This test no longer works because it expects the output of the HK FPGA to be
# looped back
@cocotb.test(skip = True)
def stc0_basic_test(dut):
"""Tests Housekeeper sending and receiving data.
This test requires an external loopback which is no longer present
due to the actual DUT wired up to the Housekeeper FPGA
"""
dut.ARst <= 1
stc0 = stc0SIMcocotb(dut, CLK_PERIOD_NS)
cocotb.fork(Clock(dut.Clk, CLK_PERIOD_NS, units='ns').start())
yield Timer(CLK_PERIOD_NS * 10, units='ns')
dut.ARst <= 0
yield Timer(CLK_PERIOD_NS * 10, units='ns')
yield stc0.hk.reset()
data = numpy.arange(10)
data[0] = 0xA5B6C7D8
data[8] = 0x12345678
data[9] = 0xDEADC0DE
yield stc0.hk.set_sfifoWrSrc(hk.HW_SFFWRSRC_INGRESS)
yield stc0.hk.send_write_command(0x1, 0x1, data)
yield Timer(CLK_PERIOD_NS * 20, units='ns')
yield stc0.hk.send_write_command(stc0.hk.HW_HK_WRITE, stc0.hk.HW_ADDR_SFFRB_NUMBYTES, [40])
yield Timer(CLK_PERIOD_NS * 5, units='ns')
a = yield stc0.hk.ft245m.read_bytes(40)
numpy.set_printoptions(formatter={'int':lambda x:hex(int(x))})
print(data)
print(a)
if numpy.array_equal(data, a) is False:
# Fail
raise TestFailure("Readback data does not match")
# Test the housekeeper simulation class
@cocotb.test()
def stc0_housekeeper_test(dut):
"""Tests basic Housekeeper FPGA functionality using internal loopback.
FPGA is configured for loopback and data streamed in.
"""
dut.ARst <= 1
hk = hkSIMcocotb(dut, CLK_PERIOD_NS)
cocotb.fork(Clock(dut.Clk, CLK_PERIOD_NS, units='ns').start())
yield Timer(CLK_PERIOD_NS * 10, units='ns')
dut.ARst <= 0
yield Timer(CLK_PERIOD_NS * 10, units='ns')
yield hk.reset()
data = numpy.arange(10)
data[0] = 0xA5B6C7D8
data[8] = 0x12345678
data[9] = 0xDEADC0DE
yield hk.set_sfifoWrSrc(hk.HW_SFFWRSRC_LOOPBACK)
yield hk.send_write_command(0x1, 0x1, data)
yield Timer(CLK_PERIOD_NS * 20, units='ns')
yield hk.send_write_command(hk.HW_HK_WRITE, hk.HW_ADDR_SFFRB_NUMBYTES, [52])
yield Timer(CLK_PERIOD_NS * 5, units='ns')
a = yield hk.ft245m.read_bytes(52)
numpy.set_printoptions(formatter={'int':lambda x:hex(int(x))})
#vhex = numpy.vectorize(hex)
#print(vhex(a))
print(sys.path)
print(data)
print(a[2:-1])
if numpy.array_equal(data, a[2:-1]) is False:
# Fail
raise TestFailure("Readback data does not match")
#yield hk.set_sfifoWrSrc(hk.HW_SFFWRSRC_INGRESS)
#yield hk.send_write_command(0x1, 0x1, data)
#yield hk.send_write_command(hk.HW_HK_WRITE, hk.HW_ADDR_SFFRB_NUMBYTES, [40])
#a = yield hk.ft245m.read_bytes(40)
#print(data)
#print(a)
#if numpy.array_equal(data, a) is False:
## Fail
#raise TestFailure("Readback data does not match")
| 41.367213
| 291
| 0.69129
| 1,979
| 12,617
| 4.175846
| 0.112683
| 0.070426
| 0.055905
| 0.064376
| 0.792715
| 0.784003
| 0.766941
| 0.762101
| 0.739835
| 0.704259
| 0
| 0.056649
| 0.178727
| 12,617
| 304
| 292
| 41.503289
| 0.74088
| 0.180312
| 0
| 0.635071
| 0
| 0
| 0.033137
| 0.002745
| 0
| 0
| 0.027353
| 0
| 0
| 1
| 0.033175
| false
| 0.037915
| 0.061611
| 0
| 0.094787
| 0.109005
| 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
|
ec5213f64fbcef54d8e190ee52abd017c3e0b262
| 47
|
py
|
Python
|
bot/utilities/__init__.py
|
Bellyria/monkalot
|
1ae6117b7989dcf692ac77acb23f00a63e658a06
|
[
"MIT"
] | 20
|
2017-09-08T21:13:38.000Z
|
2022-01-29T03:24:13.000Z
|
bot/utilities/__init__.py
|
Bellyria/monkalot
|
1ae6117b7989dcf692ac77acb23f00a63e658a06
|
[
"MIT"
] | 32
|
2017-08-20T17:46:14.000Z
|
2021-11-18T22:54:59.000Z
|
bot/utilities/__init__.py
|
Bellyria/monkalot
|
1ae6117b7989dcf692ac77acb23f00a63e658a06
|
[
"MIT"
] | 10
|
2017-08-19T01:13:41.000Z
|
2021-08-07T08:45:30.000Z
|
"""Contains a variety of utility functions."""
| 23.5
| 46
| 0.723404
| 6
| 47
| 5.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.12766
| 47
| 1
| 47
| 47
| 0.829268
| 0.851064
| 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
|
6b9ba643a68dd9aaa437c96f928025f094da715d
| 223
|
py
|
Python
|
src/test/data/pa3/sample/call.py
|
Leo-Enrique-Wu/chocopy_compiler_code_generation
|
4606be0531b3de77411572aae98f73169f46b3b9
|
[
"BSD-2-Clause"
] | 7
|
2021-08-28T18:20:45.000Z
|
2022-02-01T07:35:59.000Z
|
src/test/data/pa3/sample/call.py
|
Leo-Enrique-Wu/chocopy_compiler_code_generation
|
4606be0531b3de77411572aae98f73169f46b3b9
|
[
"BSD-2-Clause"
] | 4
|
2020-05-18T01:06:15.000Z
|
2020-06-12T19:33:14.000Z
|
src/test/data/pa3/sample/call.py
|
Leo-Enrique-Wu/chocopy_compiler_code_generation
|
4606be0531b3de77411572aae98f73169f46b3b9
|
[
"BSD-2-Clause"
] | 5
|
2019-11-27T05:11:05.000Z
|
2021-06-29T14:31:14.000Z
|
def f() -> int:
print("start f")
g()
print("end f")
return 42
def g() -> object:
print("start g")
h()
print("end g")
def h() -> object:
print("start h")
print("end h")
print(f())
| 12.388889
| 20
| 0.461883
| 33
| 223
| 3.121212
| 0.333333
| 0.291262
| 0.31068
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.013333
| 0.327354
| 223
| 17
| 21
| 13.117647
| 0.673333
| 0
| 0
| 0
| 0
| 0
| 0.161435
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.230769
| true
| 0
| 0
| 0
| 0.307692
| 0.538462
| 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
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
6ba1361d0a4f71222637bd8af029a502fbdbba3e
| 89
|
py
|
Python
|
venv/Lib/site-packages/apiclient/__init__.py
|
nfuster2017/AmazonWebCrawler
|
d45e2dec826b5cadd632ed8a94c2c4c127430000
|
[
"MIT"
] | 70
|
2015-02-20T11:23:53.000Z
|
2022-03-08T22:10:40.000Z
|
venv/Lib/site-packages/apiclient/__init__.py
|
nfuster2017/AmazonWebCrawler
|
d45e2dec826b5cadd632ed8a94c2c4c127430000
|
[
"MIT"
] | 11
|
2015-04-23T18:01:37.000Z
|
2021-08-16T14:08:06.000Z
|
venv/Lib/site-packages/apiclient/__init__.py
|
nfuster2017/AmazonWebCrawler
|
d45e2dec826b5cadd632ed8a94c2c4c127430000
|
[
"MIT"
] | 20
|
2015-01-16T19:57:53.000Z
|
2022-02-12T16:17:27.000Z
|
from .base import APIClient, APIClient_SharedSecret
from .ratelimiter import RateLimiter
| 29.666667
| 51
| 0.865169
| 10
| 89
| 7.6
| 0.6
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.101124
| 89
| 2
| 52
| 44.5
| 0.95
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
6bbdcf5b4934b969f28b0ea0388e608fa2079e11
| 276
|
py
|
Python
|
edge/space/__init__.py
|
Data-Science-in-Mechanical-Engineering/edge
|
586eaba2f0957e75940f4f19fa774603f57eae89
|
[
"MIT"
] | null | null | null |
edge/space/__init__.py
|
Data-Science-in-Mechanical-Engineering/edge
|
586eaba2f0957e75940f4f19fa774603f57eae89
|
[
"MIT"
] | null | null | null |
edge/space/__init__.py
|
Data-Science-in-Mechanical-Engineering/edge
|
586eaba2f0957e75940f4f19fa774603f57eae89
|
[
"MIT"
] | null | null | null |
from .space import Space, DiscretizableSpace, ProductSpace
from .stateaction_space import StateActionSpace
from .box import Segment, Box
from .discrete import Discrete
__all__ = ['Segment', 'Box', 'StateActionSpace',
'Space', 'DiscretizableSpace', 'ProductSpace']
| 34.5
| 58
| 0.76087
| 27
| 276
| 7.592593
| 0.407407
| 0.107317
| 0.341463
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.141304
| 276
| 7
| 59
| 39.428571
| 0.864979
| 0
| 0
| 0
| 0
| 0
| 0.221014
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
6bc72fde03b44e94e5626f848935be35dcfebd95
| 4,380
|
py
|
Python
|
test/test_state_manager.py
|
xray/py-tic-tac-toe
|
d3375d90d4464a2aae6d6ead5e115efd908d9581
|
[
"Unlicense"
] | null | null | null |
test/test_state_manager.py
|
xray/py-tic-tac-toe
|
d3375d90d4464a2aae6d6ead5e115efd908d9581
|
[
"Unlicense"
] | null | null | null |
test/test_state_manager.py
|
xray/py-tic-tac-toe
|
d3375d90d4464a2aae6d6ead5e115efd908d9581
|
[
"Unlicense"
] | null | null | null |
from game.state_manager import StateManager
def test_new_state():
sm = StateManager()
new_state = sm.create({"game_id": "debug_testing"})
assert new_state.board == {'size': 3, 'status': [[0, 0, 0], [0, 0, 0], [0, 0, 0]]}
assert new_state.player_turn == 1
assert new_state.player_count == 2
assert new_state.history == []
def test_update_state():
sm = StateManager()
new_state = sm.create({"game_id": "debug_testing"})
updated_state = sm.update(new_state, {"coordinates": [1, 1]})
assert updated_state.board == {'size': 3, 'status': [[0, 0, 0], [0, 1, 0], [0, 0, 0]]}
assert updated_state.player_turn == 2
def test_update_state_three_times():
sm = StateManager()
new_state = sm.create({"game_id": "debug_testing"})
updated_state = sm.update(new_state, {"coordinates": [1, 1]})
assert updated_state.board == {'size': 3, 'status': [[0, 0, 0], [0, 1, 0], [0, 0, 0]]}
assert updated_state.player_turn == 2
updated_state = sm.update(updated_state, {"coordinates": [0, 1]})
assert updated_state.board == {'size': 3, 'status': [[0, 2, 0], [0, 1, 0], [0, 0, 0]]}
assert updated_state.player_turn == 1
def test_update_board():
sm = StateManager()
new_state = sm.create({"game_id": "debug_testing"})
updated_board = sm.update_board(new_state, [1,1])
assert updated_board["board"] == {'size': 3, 'status': [[0, 0, 0], [0, 1, 0], [0, 0, 0]]}
def test_dynamic_board():
sm = StateManager()
new_state = sm.create({"board_size": 5, "game_id": "debug_testing"})
assert new_state.board["status"] == [[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]]
def test_board_size():
sm = StateManager()
assert sm.regulate_board_size(5) == 5
def test_board_size_too_big():
sm = StateManager()
assert sm.regulate_board_size(10) == 9
def test_win_top_row():
sm = StateManager()
class MockState:
def __init__(self):
self.board = {
"status": [[1, 1, 1], [0, 0, 0], [0, 0, 0]],
"size": 3
}
assert sm.is_game_complete(MockState()) == (True, False)
def test_win_left_column():
sm = StateManager()
class MockState:
def __init__(self):
self.board = {
"status": [[1, 0, 0], [1, 0, 0], [1, 0, 0]],
"size": 3
}
assert sm.is_game_complete(MockState()) == (True, False)
def test_win_middle_column():
sm = StateManager()
class MockState:
def __init__(self):
self.board = {
"status": [[0, 1, 0], [0, 1, 0], [0, 1, 0]],
"size": 3
}
assert sm.is_game_complete(MockState()) == (True, False)
def test_incomplete_left_column():
sm = StateManager()
class MockState:
def __init__(self):
self.board = {
"status": [[1, 0, 0], [1, 0, 0], [0, 0, 0]],
"size": 3
}
assert sm.is_game_complete(MockState()) == (False, False)
def test_incomplete_left_column_one_move():
sm = StateManager()
class MockState:
def __init__(self):
self.board = {
"status": [[1, 0, 0], [0, 0, 0], [0, 0, 0]],
"size": 3
}
assert sm.is_game_complete(MockState()) == (False, False)
def test_diagonal_left_to_right():
sm = StateManager()
class MockState:
def __init__(self):
self.board = {
"status": [[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]],
"size": 4
}
assert sm.is_game_complete(MockState()) == (True, False)
def test_diagonal_right_to_left():
sm = StateManager()
class MockState:
def __init__(self):
self.board = {
"status": [[0, 0, 0, 1], [0, 0, 1, 0], [0, 1, 0, 0], [1, 0, 0, 0]],
"size": 4
}
assert sm.is_game_complete(MockState()) == (True, False)
def test_cats_game():
sm = StateManager()
class MockState:
def __init__(self):
self.board = {
"status": [[1, 2, 1, 2], [2, 1, 2, 1], [2, 1, 2, 1], [1, 2, 1, 2]],
"size": 4
}
assert sm.is_game_complete(MockState()) == (True, True)
def test_check_identical_values_all_ones():
sm = StateManager()
test_array = [1, 1, 1, 1]
assert sm.check_identical_values(test_array) == True
def test_check_identical_values_all_twos():
sm = StateManager()
test_array = [2, 2, 2, 2]
assert sm.check_identical_values(test_array) == True
def test_check_identical_values_all_zeros():
sm = StateManager()
test_array = [0, 0, 0, 0]
assert sm.check_identical_values(test_array) == False
| 30.84507
| 123
| 0.601826
| 654
| 4,380
| 3.775229
| 0.103976
| 0.076954
| 0.081409
| 0.079384
| 0.801134
| 0.797084
| 0.776023
| 0.698663
| 0.680032
| 0.639935
| 0
| 0.059913
| 0.211187
| 4,380
| 141
| 124
| 31.06383
| 0.654703
| 0
| 0
| 0.565574
| 0
| 0
| 0.06484
| 0
| 0
| 0
| 0
| 0
| 0.204918
| 1
| 0.213115
| false
| 0
| 0.008197
| 0
| 0.286885
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
6bcd12429f7db4d55c222f6416b5e5a8fcee3fdc
| 28
|
py
|
Python
|
khed/api/__init__.py
|
bnu123/Khed
|
dd7d53bf400e9ba59ac623aba8bb6c4f96347117
|
[
"MIT"
] | 14
|
2019-02-02T17:35:04.000Z
|
2021-07-07T12:13:50.000Z
|
khed/api/__init__.py
|
bnu123/Khed
|
dd7d53bf400e9ba59ac623aba8bb6c4f96347117
|
[
"MIT"
] | 3
|
2019-02-02T20:05:15.000Z
|
2019-05-03T17:44:35.000Z
|
khed/api/__init__.py
|
bnu123/Khed
|
dd7d53bf400e9ba59ac623aba8bb6c4f96347117
|
[
"MIT"
] | 4
|
2019-02-02T15:02:13.000Z
|
2021-12-30T11:09:30.000Z
|
from .sites import ChiaAnime
| 28
| 28
| 0.857143
| 4
| 28
| 6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.107143
| 28
| 1
| 28
| 28
| 0.96
| 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
|
d4419fe2518510b496a89a310bcf0c4b3bbc8fe0
| 71
|
py
|
Python
|
Contributions/example.py
|
sattwik21/Hacktoberfest2021-1
|
74c8edd54f9c967c0f301f74dec31526dffa8222
|
[
"MIT"
] | 215
|
2021-10-01T08:18:16.000Z
|
2022-03-29T04:12:03.000Z
|
Contributions/example.py
|
sattwik21/Hacktoberfest2021-1
|
74c8edd54f9c967c0f301f74dec31526dffa8222
|
[
"MIT"
] | 51
|
2021-10-01T08:16:42.000Z
|
2021-10-31T13:51:51.000Z
|
Contributions/example.py
|
sattwik21/Hacktoberfest2021-1
|
74c8edd54f9c967c0f301f74dec31526dffa8222
|
[
"MIT"
] | 807
|
2021-10-01T08:11:45.000Z
|
2021-11-21T18:57:09.000Z
|
print("This is an example file showing how to contribute to the repo")
| 35.5
| 70
| 0.774648
| 13
| 71
| 4.230769
| 0.923077
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.169014
| 71
| 1
| 71
| 71
| 0.932203
| 0
| 0
| 0
| 0
| 0
| 0.859155
| 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
|
d477367fee5d3e85c1153489b13953d3d09b36ae
| 244
|
py
|
Python
|
tests/data.py
|
lmmx/range-streams
|
4d7385e0f71c57486e990af5ae9b94e8ed43c626
|
[
"MIT"
] | 4
|
2021-07-29T08:34:13.000Z
|
2022-02-13T22:33:55.000Z
|
tests/data.py
|
lmmx/range-streams
|
4d7385e0f71c57486e990af5ae9b94e8ed43c626
|
[
"MIT"
] | 40
|
2021-07-01T22:16:16.000Z
|
2021-12-18T20:53:16.000Z
|
tests/data.py
|
lmmx/range-streams
|
4d7385e0f71c57486e990af5ae9b94e8ed43c626
|
[
"MIT"
] | null | null | null |
EXAMPLE_URL = "https://raw.githubusercontent.com/lmmx/range-streams/master/data/example_text_file.txt"
EXAMPLE_FILE_LENGTH = 11
EXAMPLE_SMALL_PNG_URL = (
"https://raw.githubusercontent.com/lmmx/range-streams/master/data/red_square.png"
)
| 30.5
| 102
| 0.795082
| 35
| 244
| 5.285714
| 0.571429
| 0.086486
| 0.118919
| 0.302703
| 0.616216
| 0.616216
| 0.616216
| 0.616216
| 0.616216
| 0.616216
| 0
| 0.008811
| 0.069672
| 244
| 7
| 103
| 34.857143
| 0.806167
| 0
| 0
| 0
| 0
| 0.4
| 0.67623
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
d48569d73ac4ac9a5b2c739d68037081fdf95359
| 187
|
py
|
Python
|
tests/conftest.py
|
chomechome/charamel
|
f5d664f19b8be70c2361f4037a4f065959e050bd
|
[
"Apache-2.0"
] | 37
|
2020-05-12T05:58:17.000Z
|
2022-03-04T14:43:11.000Z
|
tests/conftest.py
|
chomechome/charamel
|
f5d664f19b8be70c2361f4037a4f065959e050bd
|
[
"Apache-2.0"
] | 5
|
2020-05-11T15:45:55.000Z
|
2021-03-01T11:52:50.000Z
|
tests/conftest.py
|
chomechome/charamel
|
f5d664f19b8be70c2361f4037a4f065959e050bd
|
[
"Apache-2.0"
] | 1
|
2020-05-28T04:59:22.000Z
|
2020-05-28T04:59:22.000Z
|
from typing import Any
def pytest_make_parametrize_id(val: Any, argname: str):
"""
Format argument for `pytest.mark.parametrize` test item
"""
return f'{argname}={val}'
| 20.777778
| 59
| 0.679144
| 25
| 187
| 4.96
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.197861
| 187
| 8
| 60
| 23.375
| 0.826667
| 0.294118
| 0
| 0
| 0
| 0
| 0.12931
| 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
|
00fdae49d3898f49f3138f67c8bf631b007cf46a
| 112
|
py
|
Python
|
pyopversion/__init__.py
|
pcaston/pyopversion
|
f95ad6bdd1cd188620bc957acd8b9052a1cf4859
|
[
"MIT"
] | null | null | null |
pyopversion/__init__.py
|
pcaston/pyopversion
|
f95ad6bdd1cd188620bc957acd8b9052a1cf4859
|
[
"MIT"
] | 21
|
2021-07-19T06:08:27.000Z
|
2022-03-29T06:08:08.000Z
|
pyopversion/__init__.py
|
pcaston/pyopversion
|
f95ad6bdd1cd188620bc957acd8b9052a1cf4859
|
[
"MIT"
] | null | null | null |
"""pyopversion package."""
from .consts import OpVersionChannel, OpVersionSource
from .version import OpVersion
| 28
| 53
| 0.8125
| 11
| 112
| 8.272727
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.098214
| 112
| 3
| 54
| 37.333333
| 0.90099
| 0.178571
| 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
|
2e0a72cc1734b45f278aee7e1f94bc50c841bbc2
| 52
|
py
|
Python
|
KD_Lib/KD/vision/DML/__init__.py
|
PiaCuk/KD_Lib
|
153299d484e4c6b33793749709dbb0f33419f190
|
[
"MIT"
] | null | null | null |
KD_Lib/KD/vision/DML/__init__.py
|
PiaCuk/KD_Lib
|
153299d484e4c6b33793749709dbb0f33419f190
|
[
"MIT"
] | null | null | null |
KD_Lib/KD/vision/DML/__init__.py
|
PiaCuk/KD_Lib
|
153299d484e4c6b33793749709dbb0f33419f190
|
[
"MIT"
] | null | null | null |
from .dml import DML
from .dml_e import DMLEnsemble
| 17.333333
| 30
| 0.807692
| 9
| 52
| 4.555556
| 0.555556
| 0.341463
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.153846
| 52
| 2
| 31
| 26
| 0.931818
| 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
|
2e70dc629b5231bc5de19bb43e63c3f798e36ed3
| 35
|
py
|
Python
|
makelove/__main__.py
|
jiaaro/makelove
|
3d74e60b48623fb1c6cfee2c45e7004e44810829
|
[
"MIT"
] | 56
|
2020-02-21T20:46:19.000Z
|
2022-03-30T11:54:19.000Z
|
makelove/__main__.py
|
jiaaro/makelove
|
3d74e60b48623fb1c6cfee2c45e7004e44810829
|
[
"MIT"
] | 22
|
2020-02-20T23:10:11.000Z
|
2022-03-29T01:58:23.000Z
|
makelove/__main__.py
|
jiaaro/makelove
|
3d74e60b48623fb1c6cfee2c45e7004e44810829
|
[
"MIT"
] | 6
|
2020-05-22T17:04:26.000Z
|
2021-12-12T20:00:42.000Z
|
from .makelove import main
main()
| 8.75
| 26
| 0.742857
| 5
| 35
| 5.2
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.171429
| 35
| 3
| 27
| 11.666667
| 0.896552
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
2e772784b56947a6954538607cefd32e43347128
| 98
|
py
|
Python
|
pattern_matching/core/__init__.py
|
Xython/pattern-matching
|
17ccdb68189353f1c63032013f5ef6f1ca4c0902
|
[
"MIT"
] | 20
|
2017-12-31T05:45:47.000Z
|
2021-05-15T22:08:21.000Z
|
pattern_matching/core/__init__.py
|
Xython/Destruct.py
|
17ccdb68189353f1c63032013f5ef6f1ca4c0902
|
[
"MIT"
] | null | null | null |
pattern_matching/core/__init__.py
|
Xython/Destruct.py
|
17ccdb68189353f1c63032013f5ef6f1ca4c0902
|
[
"MIT"
] | 1
|
2018-01-12T04:54:19.000Z
|
2018-01-12T04:54:19.000Z
|
from .match import Match, Overload, when, overwrite
from .pattern import var, T, t, match_err, _
| 24.5
| 51
| 0.744898
| 15
| 98
| 4.733333
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.163265
| 98
| 3
| 52
| 32.666667
| 0.865854
| 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
|
5cebd97512ca45d1fcf596012ceefaadbf3be1db
| 65
|
py
|
Python
|
sklift/utils/__init__.py
|
rishawsingh/scikit-uplift
|
a46f11d24025f8489577640271abfc4d847d0334
|
[
"MIT"
] | 403
|
2019-12-21T09:36:57.000Z
|
2022-03-30T09:36:56.000Z
|
sklift/utils/__init__.py
|
fspofficial/scikit-uplift
|
c9dd56aa0277e81ef7c4be62bf2fd33432e46f36
|
[
"MIT"
] | 100
|
2020-02-29T11:52:21.000Z
|
2022-03-29T23:14:33.000Z
|
sklift/utils/__init__.py
|
fspofficial/scikit-uplift
|
c9dd56aa0277e81ef7c4be62bf2fd33432e46f36
|
[
"MIT"
] | 81
|
2019-12-26T08:28:44.000Z
|
2022-03-22T09:08:54.000Z
|
from .utils import check_is_binary
__all__ = ['check_is_binary']
| 21.666667
| 34
| 0.8
| 10
| 65
| 4.4
| 0.7
| 0.318182
| 0.590909
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.107692
| 65
| 3
| 35
| 21.666667
| 0.758621
| 0
| 0
| 0
| 0
| 0
| 0.227273
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
cf074165abba699349e8af47fc5501e8a3899103
| 52,869
|
py
|
Python
|
numerblox/evaluation.py
|
crowdcent/numerblox
|
e014a30eb22ce64cdc590e32d776367a7132cb39
|
[
"Apache-2.0"
] | 30
|
2022-03-17T03:23:20.000Z
|
2022-03-30T15:20:19.000Z
|
numerblox/evaluation.py
|
crowdcent/numerblox
|
e014a30eb22ce64cdc590e32d776367a7132cb39
|
[
"Apache-2.0"
] | 8
|
2022-03-18T10:31:44.000Z
|
2022-03-31T15:43:46.000Z
|
numerblox/evaluation.py
|
crowdcent/numerblox
|
e014a30eb22ce64cdc590e32d776367a7132cb39
|
[
"Apache-2.0"
] | 5
|
2022-03-18T10:24:38.000Z
|
2022-03-30T14:40:08.000Z
|
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/07_evaluation.ipynb (unless otherwise specified).
__all__ = ['FNCV3_FEATURES', 'MEDIUM_FEATURES', 'BaseEvaluator', 'NumeraiClassicEvaluator', 'NumeraiSignalsEvaluator']
# Cell
import time
import json
import numpy as np
import pandas as pd
from tqdm.auto import tqdm
import matplotlib.pyplot as plt
from typing import Tuple, Union
from numerapi import SignalsAPI
from rich import print as rich_print
from .numerframe import NumerFrame, create_numerframe
from .postprocessing import FeatureNeutralizer
from .key import Key
# Cell
# hide
FNCV3_FEATURES = ["feature_honoured_observational_balaamite", "feature_polaroid_vadose_quinze", "feature_untidy_withdrawn_bargeman", "feature_genuine_kyphotic_trehala", "feature_unenthralled_sportful_schoolhouse", "feature_divulsive_explanatory_ideologue", "feature_ichthyotic_roofed_yeshiva", "feature_waggly_outlandish_carbonisation", "feature_floriated_amish_sprite", "feature_iconoclastic_parietal_agonist", "feature_demolished_unfrightened_superpower", "feature_styloid_subdermal_cytotoxin", "feature_ironfisted_nonvintage_chlorpromazine", "feature_torose_unspiritualised_kylie", "feature_tearing_unkingly_adulthood", "feature_stylolitic_brown_spume", "feature_ferial_incumbent_engraving", "feature_litigant_unsizable_rhebok", "feature_floatiest_quintuplicate_carpentering", "feature_tuberculate_patelliform_paging", "feature_cuddlesome_undernamed_incidental", "feature_loony_zirconic_hoofer", "feature_indign_tardier_borough", "feature_fair_papal_vinaigrette", "feature_attack_unlit_milling", "feature_froggier_unlearned_underworkman", "feature_peninsular_pulsatile_vapor", "feature_midmost_perspiratory_hubert", "feature_laminable_unspecified_gynoecium", "feature_bally_bathymetrical_isadora", "feature_skim_unmeant_bandsman", "feature_ungenuine_sporophytic_evangelist", "feature_supercelestial_telic_dyfed", "feature_inconsiderate_unbooted_ricer", "feature_inured_conservable_forcer", "feature_glibber_deficient_jakarta", "feature_morbific_irredentist_interregnum", "feature_conjoint_transverse_superstructure", "feature_tingling_large_primordiality", "feature_phyllopod_unconstrainable_blubberer", "feature_deformable_unitary_schistosity", "feature_unprovisioned_aquatic_deuterogamy", "feature_equipped_undoubted_athanasian", "feature_inflammable_numb_anticline", "feature_kinky_benzal_holotype", "feature_ruptured_designing_interpolator", "feature_hierologic_expectable_maiolica", "feature_boiling_won_rama", "feature_lovelorn_aided_limiter", "feature_soviet_zibeline_profiler", "feature_altimetrical_muddled_symbolism", "feature_bratty_disrespectable_bookstand", "feature_unshaken_ahorse_wehrmacht", "feature_mightier_chivalric_kana", "feature_gambrel_unblessed_gigantomachy", "feature_ethiopic_anhedonic_stob", "feature_overstrung_dysmenorrheal_ingolstadt", "feature_rose_buttoned_dandy", "feature_recipient_perched_dendrochronologist", "feature_spikier_ordinate_taira", "feature_mercian_luddite_aganippe", "feature_faint_consociate_rhytidectomy", "feature_unpressed_mahratta_dah", "feature_maxillary_orphic_despicability", "feature_clasping_fast_menstruation", "feature_obeliscal_bewildered_reviewer", "feature_babist_moribund_myna", "feature_underdressed_tanagrine_prying", "feature_corniest_undue_scall", "feature_reduplicative_appalling_metastable", "feature_wrathful_prolix_colotomy", "feature_limonitic_issuable_melancholy", "feature_approximal_telautographic_sharkskin", "feature_fribble_gusseted_stickjaw", "feature_spec_subversive_plotter", "feature_unsinkable_dumbstruck_octuplet", "feature_integrative_reviviscent_governed", "feature_tamil_grungy_empathy", "feature_canopic_exigible_schoolgirl", "feature_plumular_constantinian_repositing", "feature_serpentiform_trinary_imponderability", "feature_gyroidal_embowed_pilcher", "feature_unlivable_armenian_wedge", "feature_flawed_demonological_toady", "feature_pruinose_raploch_roubaix", "feature_seediest_ramshackle_reclamation", "feature_hagiological_refer_vitamin", "feature_alcibiadean_lumpier_origan", "feature_encased_unamiable_hasidism", "feature_evocable_woollen_guarder", "feature_hunchbacked_unturning_meditation", "feature_circumnavigable_naughty_retranslation", "feature_testicular_slashed_ventosity", "feature_potential_subsessile_disconnection", "feature_unswaddled_inenarrable_goody", "feature_stellular_paler_centralisation", "feature_angevin_fitful_sultan", "feature_subinfeudatory_brainy_carmel", "feature_simpatico_cadential_pup", "feature_esculent_erotic_epoxy", "feature_milliary_hyperpyretic_medea", "feature_coraciiform_sciurine_reef", "feature_weightiest_protozoic_brawler", "feature_cooled_perkiest_electrodeposition", "feature_differing_peptizing_womaniser", "feature_gleaming_monosyllabic_scrod", "feature_unyielding_dismal_divertissement", "feature_rankine_meaty_port", "feature_southernmost_unhuman_arbiter", "feature_singhalese_cerographical_ego", "feature_malignant_campodeid_pluton", "feature_dure_jaspery_mugging", "feature_educational_caustic_mythologisation", "feature_diverted_astral_dunghill", "feature_degenerate_diaphragmatic_literalizer", "feature_laced_scraggly_grimalkin", "feature_wheezier_unjaundiced_game", "feature_unimpressed_uninflected_theophylline", "feature_shiite_overfed_mense", "feature_irritant_reciprocal_pelage", "feature_bricky_runed_bottleful", "feature_phyletic_separate_genuflexion", "feature_peckish_impetrative_kanpur", "feature_unshrinking_semiarid_floccule", "feature_heartier_salverform_nephew", "feature_geostrophic_adaptative_karla", "feature_navigational_enured_condensability", "feature_confusable_pursy_plosion", "feature_clenched_wayward_coelostat", "feature_developed_arbitrary_traditionalist", "feature_unnameable_abysmal_net", "feature_completive_pedantical_sinecurist", "feature_witchy_orange_muley", "feature_misfeatured_sometime_tunneler", "feature_agaze_lancinate_zohar", "feature_subservient_wedged_limping", "feature_urticant_ultracentrifugal_wane", "feature_pulverized_unified_dupery", "feature_stoichiometric_unanswerable_leveller", "feature_cyanophyte_emasculated_turpin", "feature_unruly_salian_impetuosity", "feature_ataractic_swept_rubeola", "feature_pansophical_agitato_theatricality", "feature_recreational_homiletic_nubian", "feature_burning_phrygian_axinomancy", "feature_protractive_moral_forswearing", "feature_certificated_putrescent_godship", "feature_dietetic_unscholarly_methamphetamine", "feature_vegetable_manlier_macaco", "feature_anthropoid_pithy_newscast", "feature_verifying_imagism_sublease", "feature_deckled_exaggerative_algol", "feature_songful_intercostal_frightener", "feature_additive_untrustworthy_hierologist", "feature_translative_quantitative_eschewer", "feature_coseismic_surpassable_invariance", "feature_blubbery_octahedral_bushfire", "feature_continued_conjugated_natalia", "feature_dissident_templed_shippon", "feature_wally_unrotted_eccrinology", "feature_unforgivable_airtight_reinsurance", "feature_unrelenting_intravascular_mesenchyme", "feature_linear_scummiest_insobriety", "feature_ovine_bramblier_leaven", "feature_uninforming_predictable_pepino", "feature_pluviometrical_biannual_saiga", "feature_affettuoso_taxidermic_greg", "feature_lateral_confervoid_belgravia", "feature_coalier_hircine_brokerage", "feature_undiverted_analyzed_accidie", "feature_favourable_swankiest_tympanist", "feature_refractory_topped_dependance", "feature_bustled_fieriest_doukhobor", "feature_isobilateral_olden_nephron", "feature_circassian_leathern_impugner", "feature_signed_ringent_sunna", "feature_cornute_potentiometric_tinhorn", "feature_veristic_parklike_halcyon", "feature_geochemical_unsavoury_collection", "feature_guerrilla_arrested_flavine", "feature_undependable_stedfast_donegal", "feature_bijou_penetrant_syringa", "feature_lamarckian_tarnal_egestion", "feature_horticultural_footworn_superscription", "feature_unwithered_personate_dilatation", "feature_wrought_muckier_temporality", "feature_rival_undepraved_countermarch", "feature_irrevocable_unlawful_oral", "feature_flawy_caller_superior", "feature_elohistic_totalitarian_underline", "feature_unrecognisable_waxier_paging", "feature_paraffinoid_flashiest_brotherhood", "feature_depauperate_armipotent_decentralisation", "feature_palpebral_univalve_pennoncel", "feature_received_veiniest_tamarix", "feature_scissile_dejected_kainite", "feature_narcotized_collectivist_evzone", "feature_jamesian_scutiform_ionium", "feature_gambogian_feudalist_diocletian", "feature_moneyed_mesophytic_lester", "feature_purblind_autarkic_pyrenoid", "feature_paleolithic_myalgic_lech", "feature_fortyish_neptunian_catechumenate", "feature_tricksiest_pending_voile", "feature_forcipate_laced_greenlet", "feature_overjoyed_undriven_sauna", "feature_small_cumulative_graywacke", "feature_incertain_catchable_zibet", "feature_unsustaining_chewier_adnoun", "feature_ruthenic_peremptory_truth", "feature_blind_concordant_tribalist", "feature_strigose_rugose_interjector", "feature_binding_lanky_rushing", "feature_carolean_tearable_smoothie", "feature_nappiest_unportioned_readjustment", "feature_sarmatia_foldable_eutectic", "feature_plum_anemometrical_guessing", "feature_gubernacular_liguloid_frankie", "feature_castigatory_hundredfold_hearthrug", "feature_pennsylvanian_sibylic_chanoyu", "feature_unreaving_intensive_docudrama", "feature_relinquished_incognizable_batholith", "feature_indusiate_canned_cosh", "feature_maglemosian_kittle_coachbuilding", "feature_unreeling_homeothermic_macedonia", "feature_asteriated_invigorated_penitence", "feature_anucleate_knotted_nonage", "feature_shrinelike_unreplaceable_nitrogenization", "feature_lacerable_backmost_vaseline", "feature_unreceipted_latest_lesser", "feature_unimaginable_sec_kaka", "feature_goidelic_gobelin_ledge", "feature_incondite_undisappointing_telephotograph", "feature_concoctive_symmetric_abulia", "feature_anglophobic_unformed_maneuverer", "feature_gravimetric_ski_enigma", "feature_balmiest_spinal_roundelay", "feature_required_bibliological_tonga", "feature_amoroso_wimpish_maturing", "feature_exertive_unmodernised_scaup", "feature_rude_booziest_ilium", "feature_uncompelled_curvy_amerindian", "feature_septuple_bonapartean_sanbenito", "feature_tottery_unmetalled_codder", "feature_tachygraphical_sedimentological_mesoderm", "feature_adsorbed_blizzardy_burlesque", "feature_wistful_tussive_cycloserine", "feature_superjacent_grubby_axillary", "feature_biological_caprine_cannoneer", "feature_unreversed_fain_jute", "feature_unexalted_rebel_kofta", "feature_doggish_mouthwatering_abelard", "feature_forfeit_contributing_joinder", "feature_necked_moresque_lowell", "feature_footling_unpuckered_lophophore", "feature_thorniest_laughable_hindustani", "feature_hotter_cattish_aridity", "feature_developing_behind_joan", "feature_ectodermal_mandaean_saffian", "feature_crimpier_gude_housedog", "feature_probationary_readying_roundelay", "feature_inserted_inconvertible_functioning", "feature_manifold_melodramatic_girl", "feature_drizzling_refrigerative_imperfection", "feature_sardonic_primary_shadwell", "feature_monocyclic_galliambic_par", "feature_smutty_prohibited_sullivan", "feature_productile_auriform_fil", "feature_accommodable_crinite_cleft", "feature_clipped_kurdish_grainer", "feature_dustproof_unafraid_stampede", "feature_neutered_postpositive_writ", "feature_twelve_haphazard_pantography", "feature_riskier_ended_typo", "feature_smaller_colored_immurement", "feature_snatchy_xylic_institution", "feature_conchal_angriest_oophyte", "feature_multiseriate_oak_benzidine", "feature_gobioid_transhuman_interconnection", "feature_reservable_peristomal_emden", "feature_inestimable_unmoral_extraversion", "feature_nubby_sissified_value", "feature_incorporating_abominable_daily", "feature_herbaged_brownish_consubstantialist", "feature_solemn_wordier_needlework", "feature_evangelistic_cruel_dissimilitude", "feature_impetratory_shuttered_chewer", "feature_referenced_biliteral_chiropody", "feature_eleatic_fellow_auctioneer", "feature_malpighian_vaporized_biogen", "feature_expiscatory_wriest_colportage", "feature_yelled_hysteretic_eath", "feature_bitterish_buttocked_turtleneck", "feature_percipient_atelectatic_cinnamon", "feature_gobony_premonitory_twinkler", "feature_twittery_tai_attainment", "feature_crooked_wally_lobation", "feature_crookback_workable_infringement", "feature_brawling_unpeppered_comedian", "feature_glyphographic_reparable_empyrean", "feature_noctilucent_subcortical_proportionality", "feature_guardian_frore_rolling", "feature_denuded_typed_wattmeter", "feature_unreachable_neritic_saracen", "feature_enzymatic_poorest_advocaat", "feature_wariest_vulnerable_unmorality", "feature_guttering_half_spondee", "feature_distressed_bloated_disquietude", "feature_leaky_overloaded_rhodium", "feature_unsapped_anionic_catherine", "feature_kissable_forfeit_egotism", "feature_unsizable_ancestral_collocutor", "feature_healthier_unconnected_clave", "feature_cirsoid_buddhism_vespa", "feature_rid_conveyable_cinchonization", "feature_donsie_folkish_renitency", "feature_agee_sold_microhabitat", "feature_newfangled_huddled_gest", "feature_clandestine_inkiest_silkworm", "feature_unutterable_softening_roper", "feature_balaamitical_electropositive_exhaustibility", "feature_unvalued_untangled_keener", "feature_undisturbing_quadrifid_reinhardt", "feature_bucked_costume_malagasy", "feature_joint_unreturning_basalt", "feature_coordinate_shyer_evildoing", "feature_carunculate_discursive_hectare", "feature_cynic_unreckonable_feoffment", "feature_cnidarian_micrologic_sousaphone", "feature_unperceivable_unrumpled_appendant", "feature_dissolvable_chrismal_obtund", "feature_choosier_uncongenial_coachwood", "feature_grimmest_prostate_doctrinaire", "feature_granulative_uncritical_agostini", "feature_convalescence_deuteranopic_lemuroid", "feature_disintegrable_snakier_zion", "feature_thoughtful_accommodable_lack", "feature_basophil_urdy_matzo", "feature_repellant_unwanted_clarinetist", "feature_antimonarchist_ordainable_quarterage", "feature_hardback_saturnalian_cyclometer", "feature_mythic_florentine_psammite", "feature_serpentiform_incomplete_bessarabia", "feature_unappeasable_employed_photoelectron", "feature_seaboard_adducent_polynesian", "feature_genoese_uncreditable_subregion", "feature_dexter_unstifled_snoring", "feature_protonematal_springtime_varioloid", "feature_orchitic_reported_coloration", "feature_stelliform_curling_trawler", "feature_athenian_pragmatism_isomorphism", "feature_abating_unadaptable_weakfish", "feature_instructional_desensitized_symmetallism", "feature_disarrayed_rarefactive_trisulphide", "feature_partible_amphibrachic_classicism", "feature_ecstatic_foundational_crinoidea", "feature_unimproved_courtliest_uncongeniality", "feature_cosy_microtonal_cedar", "feature_heedful_argyle_russianization", "feature_unhonoured_detested_xenocryst", "feature_sicker_spelaean_endplay", "feature_coordinated_astir_vituperation", "feature_stratocratic_aerodynamic_herero", "feature_uneasy_unaccommodating_immortality", "feature_professional_platonic_marten", "feature_detrital_respected_parlance", "feature_contraceptive_cartelist_beast", "feature_tapestried_madding_acclimatiser", "feature_optic_mycelial_whimper", "feature_liftable_direful_polyploid", "feature_objective_micro_langton", "feature_entopic_interpreted_subsidiary", "feature_saclike_hyphal_postulator", "feature_recent_shorty_preferment", "feature_strip_honoured_trail", "feature_unsheltered_doughtiest_episiotomy", "feature_acclimatisable_unfeigned_maghreb", "feature_galactopoietic_luckiest_protecting", "feature_scarcest_vaporized_max", "feature_spicier_unstripped_initial", "feature_hooly_chekhovian_phytogeographer", "feature_smouldering_underground_wingspan", "feature_phantasmal_extenuative_britain", "feature_sciurine_stibial_lintwhite", "feature_eucharistic_widowed_misfeasance", "feature_libratory_seizable_orlando", "feature_brackish_obstructed_almighty", "feature_translucid_neuroanatomical_sego", "feature_unheeded_stylar_planarian", "feature_preceptive_rushed_swedenborgian", "feature_sumerian_descendible_kalpa", "feature_jazziest_spellbinding_philabeg", "feature_dormie_sodden_steed", "feature_directoire_propositional_clydebank", "feature_triangled_rubber_skein", "feature_vendean_thwartwise_resistant", "feature_preoral_tonsorial_souk", "feature_virescent_telugu_neighbour", "feature_prefigurative_downstream_transvaluation", "feature_undepreciated_partitive_ipomoea", "feature_coactive_bandoleered_trogon", "feature_southerly_assonant_amicability", "feature_cortical_halt_catcher", "feature_queenliest_childing_ritual", "feature_antarthritic_syzygial_wonderland", "feature_revitalizing_rutilant_swastika", "feature_holy_chic_cali", "feature_hermitical_stark_serfhood", "feature_deformable_productile_piglet", "feature_lentissimo_ducky_quadroon", "feature_happening_tristful_yodeling", "feature_guardant_giocoso_natterjack", "feature_bootleg_clement_joe", "feature_thousandth_hierarchal_plight", "feature_unhoped_hex_ventriloquism", "feature_unappreciated_humiliated_misapprehension", "feature_cragged_sacred_malabo", "feature_idled_unwieldy_improvement", "feature_censorial_leachier_rickshaw", "feature_carbuncled_athanasian_ampul"]
MEDIUM_FEATURES = ["feature_abstersive_emotional_misinterpreter", "feature_accessorial_aroused_crochet", "feature_acerb_venusian_piety", "feature_affricative_bromic_raftsman", "feature_agile_unrespited_gaucho", "feature_agronomic_cryptal_advisor", "feature_alkaline_pistachio_sunstone", "feature_altern_unnoticed_impregnation", "feature_ambisexual_boiled_blunderer", "feature_amoebaean_wolfish_heeler", "feature_amygdaloidal_intersectional_canonry", "feature_antipathetical_terrorful_ife", "feature_antipodal_unable_thievery", "feature_antisubmarine_foregoing_cryosurgery", "feature_apomictical_motorized_vaporisation", "feature_apophthegmatical_catechetical_millet", "feature_apostate_impercipient_knighthood", "feature_appraisive_anagrammatical_tentacle", "feature_arillate_nickelic_hemorrhage", "feature_armoured_finable_skywriter", "feature_assenting_darn_arthropod", "feature_assertive_worsened_scarper", "feature_atlantic_uveal_incommunicability", "feature_attuned_southward_heckle", "feature_autarkic_constabulary_dukedom", "feature_autodidactic_gnarlier_pericardium", "feature_axillary_reluctant_shorty", "feature_aztecan_encomiastic_pitcherful", "feature_barest_kempt_crowd", "feature_basaltic_arid_scallion", "feature_base_ingrain_calligrapher", "feature_beady_unkind_barret", "feature_belgravian_salopian_sheugh", "feature_biannual_maleficent_thack", "feature_bifacial_hexastyle_hemialgia", "feature_bleeding_arabesque_pneuma", "feature_bloodied_twinkling_andante", "feature_brawny_confocal_frail", "feature_brickier_heterostyled_scrutiny", "feature_built_reincarnate_sherbet", "feature_bushwhacking_unaligned_imperturbability", "feature_busty_unfitted_keratotomy", "feature_buxom_curtained_sienna", "feature_caecilian_unexperienced_ova", "feature_caespitose_unverifiable_intent", "feature_cairned_fumiest_ordaining", "feature_calceolate_pudgy_armure", "feature_calculating_unenchanted_microscopium", "feature_calefactive_anapaestic_jerome", "feature_calycled_living_birmingham", "feature_camphorated_spry_freemartin", "feature_caressive_cognate_cubature", "feature_casemated_ibsenian_grantee", "feature_castrated_presented_quizzer", "feature_casuistic_barbarian_monochromy", "feature_centric_shaggier_cranko", "feature_cerebrovascular_weeny_advocate", "feature_chafed_undenominational_backstitch", "feature_chaldean_vixenly_propylite", "feature_chaotic_granitoid_theist", "feature_chartered_conceptual_spitting", "feature_cheering_protonemal_herd", "feature_chelonian_pyknic_delphi", "feature_chopfallen_fasciate_orchidologist", "feature_christadelphian_euclidean_boon", "feature_chuffier_analectic_conchiolin", "feature_churrigueresque_talc_archaicism", "feature_clawed_unwept_adaptability", "feature_clerkish_flowing_chapati", "feature_coalier_typhoid_muntin", "feature_collective_stigmatic_handfasting", "feature_commensurable_industrial_jungfrau", "feature_communicatory_unrecommended_velure", "feature_conceding_ingrate_tablespoonful", "feature_confiscatory_triennial_pelting", "feature_congealed_lee_steek", "feature_congenial_transmigrant_isobel", "feature_congenital_conched_perithecium", "feature_conjugal_postvocalic_rowe", "feature_consecrate_legislative_cavitation", "feature_contaminative_intrusive_tagrag", "feature_continuate_unprocurable_haversine", "feature_contused_festal_geochemistry", "feature_coordinated_undecipherable_gag", "feature_covalent_methodological_brash", "feature_covalent_unreformed_frogbit", "feature_crablike_panniered_gloating", "feature_criticisable_authentical_deprecation", "feature_croupiest_shaded_thermotropism", "feature_ctenoid_moaning_fontainebleau", "feature_culinary_pro_offering", "feature_curling_aurorean_iseult", "feature_curtained_gushier_tranquilizer", "feature_cyrenaic_unschooled_silurian", "feature_decent_solo_stickup", "feature_degenerate_officinal_feasibility", "feature_demisable_expiring_millepede", "feature_demure_groutiest_housedog", "feature_dendritic_prothallium_sweeper", "feature_dentilingual_removed_osmometer", "feature_descendent_decanal_hon", "feature_desiderative_commiserative_epizoa", "feature_designer_notchy_epiploon", "feature_dichasial_hammier_spawner", "feature_dipped_sent_giuseppe", "feature_discrepant_ventral_shicker", "feature_dismaying_chaldean_tallith", "feature_dispiriting_araeostyle_jersey", "feature_diverticular_punjabi_matronship", "feature_doggish_whacking_headscarf", "feature_dovetailed_winy_hanaper", "feature_draconic_contractible_romper", "feature_emmetropic_heraclitean_conducting", "feature_encompassing_skeptical_salience", "feature_endangered_unthreaded_firebrick", "feature_enlightening_mirthful_laurencin", "feature_epicurean_fetal_seising", "feature_epidermic_scruffiest_prosperity", "feature_epitaxial_loathsome_essen", "feature_eruptive_seasoned_pharmacognosy", "feature_escutcheoned_timocratic_kotwal", "feature_euterpean_frazzled_williamsburg", "feature_exacerbating_presentationism_apagoge", "feature_expressed_abhominable_pruning", "feature_extractable_serrulate_swing", "feature_fake_trident_agitator", "feature_faltering_tergal_tip", "feature_farcical_spinal_samantha", "feature_faustian_unventilated_lackluster", "feature_favoring_prescript_unorthodoxy", "feature_festering_controvertible_hostler", "feature_fierier_goofier_follicle", "feature_fissirostral_multifoliate_chillon", "feature_flakiest_fleecy_novelese", "feature_flavourful_seismic_erica", "feature_fleshly_bedimmed_enfacement", "feature_foamy_undrilled_glaciology", "feature_fragrant_fifteen_brian", "feature_frequentative_participial_waft", "feature_fumarolic_known_sharkskin", "feature_fustiest_voiced_janet", "feature_galvanometric_sturdied_billingsgate", "feature_ganoid_osiered_mineralogy", "feature_generative_honorific_tughrik", "feature_glare_factional_assessment", "feature_glyptic_unrubbed_holloway", "feature_gone_honduran_worshipper", "feature_gossamer_placable_wycliffite", "feature_grazed_blameful_desiderative", "feature_greedier_favorable_enthymeme", "feature_groggy_undescried_geosphere", "feature_gullable_sanguine_incongruity", "feature_gutta_exploitive_simpson", "feature_haematoid_runaway_nightjar", "feature_hawkish_domiciliary_duramen", "feature_headhunting_unsatisfied_phenomena", "feature_hellenistic_scraggly_comfort", "feature_helpable_chanciest_fractionisation", "feature_hemispherical_unabsolved_aeolipile", "feature_hendecagonal_deathly_stiver", "feature_hexametric_ventricose_limnology", "feature_hibernating_soritic_croupe", "feature_highland_eocene_berean", "feature_hillier_unpitied_theobromine", "feature_himyarite_tetragonal_deceit", "feature_horizontal_snug_description", "feature_hotfoot_behaviorist_terylene", "feature_huskiest_compartmental_jacquerie", "feature_hydrologic_cymric_nyctophobia", "feature_hypermetropic_unsighted_forsyth", "feature_hypersonic_volcanological_footwear", "feature_hypogastric_effectual_sunlight", "feature_hypothetic_distressing_endemic", "feature_hysteric_mechanized_recklinghausen", "feature_iconomatic_boozier_age", "feature_illiterate_stomachal_terpene", "feature_impractical_endorsed_tide", "feature_incitant_trochoidal_oculist", "feature_incommensurable_diffused_curability", "feature_indefatigable_enterprising_calf", "feature_indentured_communicant_tulipomania", "feature_indirect_concrete_canaille", "feature_induplicate_hoarse_disbursement", "feature_inexpugnable_gleg_candelilla", "feature_inflexed_lamaism_crit", "feature_inhabited_pettier_veinlet", "feature_inhibited_snowiest_drawing", "feature_inseminated_filarial_mesoderm", "feature_insociable_exultant_tatum", "feature_instrumentalist_extrovert_cassini", "feature_integrated_extroversive_ambivalence", "feature_intended_involute_highbinder", "feature_intercalative_helvetian_infirmarian", "feature_interdental_mongolian_anarchism", "feature_intermontane_vertical_moo", "feature_interrogatory_isohyetal_atacamite", "feature_intersubjective_juristic_sagebrush", "feature_intertwined_leeriest_suffragette", "feature_introvert_symphysial_assegai", "feature_intrusive_effluent_hokkaido", "feature_invalid_chromatographic_cornishman", "feature_invalid_extortionary_titillation", "feature_iridic_unpropertied_spline", "feature_irresponsive_compositive_ramson", "feature_irritant_euphuistic_weka", "feature_isotopic_hymenial_starwort", "feature_jerkwater_eustatic_electrocardiograph", "feature_jiggish_tritheist_probity", "feature_juvenalian_paunchy_uniformitarianism", "feature_kerygmatic_splashed_ziegfeld", "feature_koranic_rude_corf", "feature_leaky_maroon_pyrometry", "feature_learned_claustral_quiddity", "feature_leggiest_slaggiest_inez", "feature_leisurable_dehortatory_pretoria", "feature_leukemic_paler_millikan", "feature_levigate_kindly_dyspareunia", "feature_liege_unexercised_ennoblement", "feature_limitable_astable_physiology", "feature_lipogrammatic_blowsier_seismometry", "feature_log_unregenerate_babel", "feature_lordly_lamellicorn_buxtehude", "feature_loricate_cryptocrystalline_ethnology", "feature_lost_quirky_botel", "feature_loyal_fishy_pith", "feature_malacological_differential_defeated", "feature_malagasy_abounding_circumciser", "feature_massed_nonracial_ecclesiologist", "feature_mattery_past_moro", "feature_maximal_unobserving_desalinisation", "feature_mazy_superrefined_punishment", "feature_merovingian_tenebrism_hartshorn", "feature_methylated_necrophilic_serendipity", "feature_midget_noncognizable_plenary", "feature_migrant_reliable_chirurgery", "feature_mined_game_curse", "feature_misanthropic_knurliest_freebooty", "feature_more_hindoo_diageotropism", "feature_mucky_loanable_gastrostomy", "feature_multilinear_sharpened_mouse", "feature_myographic_gawkier_timbale", "feature_naval_edified_decarbonize", "feature_nebule_barmier_bibliomania", "feature_nubblier_plosive_deepening", "feature_nucleophilic_uremic_endogen", "feature_obeisant_vicarial_passibility", "feature_offshore_defamatory_catalog", "feature_outdated_tapered_speciation", "feature_outsized_admonishing_errantry", "feature_oversea_permed_insulter", "feature_ovular_powered_neckar", "feature_padded_peripteral_pericranium", "feature_palatalized_unsucceeded_induration", "feature_palmy_superfluid_argyrodite", "feature_pansophic_merino_pintado", "feature_paraffinoid_irreplevisable_ombu", "feature_paramagnetic_complex_gish", "feature_passerine_ultraist_neon", "feature_patristical_analysable_langouste", "feature_peaty_vulgar_branchia", "feature_peculiar_sheenier_quintal", "feature_peltate_okay_info", "feature_perceivable_gasiform_psammite", "feature_perigean_bewitching_thruster", "feature_periscopic_thirteenth_cartage", "feature_permanent_cottony_ballpen", "feature_pert_performative_hormuz", "feature_petitionary_evanescent_diallage", "feature_phellogenetic_vibrational_jocelyn", "feature_piffling_inflamed_jupiter", "feature_planar_unessential_bride", "feature_planned_superimposed_bend", "feature_plexiform_won_elk", "feature_polaroid_squalliest_applause", "feature_precooled_inoperable_credence", "feature_puberulent_nondescript_laparoscope", "feature_publishable_apiarian_rollick", "feature_quadratic_untouched_liberty", "feature_questionable_diplex_caesarist", "feature_quinsied_increased_braincase", "feature_ratlike_matrilinear_collapsability", "feature_recidivism_petitory_methyltestosterone", "feature_reclaimed_fallibilist_turpentine", "feature_reclinate_cruciform_lilo", "feature_reconciling_dauby_database", "feature_reduplicate_conoid_albite", "feature_refreshed_untombed_skinhead", "feature_reminiscent_unpained_ukulele", "feature_renegade_undomestic_milord", "feature_reported_slimy_rhapsody", "feature_reserved_cleanable_soldan", "feature_restricted_aggregately_workmanship", "feature_resuscitative_communicable_brede", "feature_retinoscopy_flinty_wool", "feature_revealable_aeonian_elvira", "feature_revitalizing_dashing_photomultiplier", "feature_rheumy_epistemic_prancer", "feature_rimmed_conditional_archipelago", "feature_roasting_slaked_reposition", "feature_roiling_trimeric_kurosawa", "feature_rowable_unshod_noise", "feature_rubblier_chlorotic_stogy", "feature_ruffianly_uncommercial_anatole", "feature_rural_inquisitional_trotline", "feature_rusted_unassisting_menaquinone", "feature_ruthenian_uncluttered_vocalizing", "feature_salian_suggested_ephemeron", "feature_sallowish_cognisant_romaunt", "feature_scenic_cormophytic_bilirubin", "feature_scenographical_dissentient_trek", "feature_scorbutic_intellectualism_mongoloid", "feature_scrobiculate_unexcitable_alder", "feature_seamier_jansenism_inflator", "feature_seclusive_emendatory_plangency", "feature_seemlier_reorient_monandry", "feature_severe_tricky_pinochle", "feature_sixteen_inbreed_are", "feature_sludgy_implemental_sicily", "feature_smoggy_niftiest_lunch", "feature_smugger_hydroponic_farnesol", "feature_softish_unseparated_caudex", "feature_sorted_ignitable_sagitta", "feature_spagyric_echt_alum", "feature_spookiest_expedite_overnighter", "feature_springlike_crackjaw_bheesty", "feature_squishiest_unsectarian_support", "feature_stelar_balmiest_pellitory", "feature_stereotypic_ebracteate_louise", "feature_strychnic_structuralist_chital", "feature_stylistic_honduran_comprador", "feature_subapostolic_dungy_fermion", "feature_subdued_spiffier_kano", "feature_subglobular_unsalable_patzer", "feature_substandard_permissible_paresthesia", "feature_sudsy_polymeric_posteriority", "feature_supergene_legible_antarthritic", "feature_synoptic_botryose_earthwork", "feature_syrian_coital_counterproof", "feature_tarry_meet_chapel", "feature_telephonic_shakable_bollock", "feature_terrific_epigamic_affectivity", "feature_tittering_virgilian_decliner", "feature_together_suppositive_aster", "feature_tonal_graptolitic_corsac", "feature_tortured_arsenical_arable", "feature_torturesome_estimable_preferrer", "feature_tossing_denominative_threshing", "feature_trabeate_eutherian_valedictory", "feature_tranquilizing_abashed_glyceria", "feature_transmontane_clerkly_value", "feature_travelled_semipermeable_perruquier", "feature_tribal_germinable_yarraman", "feature_trim_axial_suffocation", "feature_unaimed_yonder_filmland", "feature_unamazed_tumular_photomicrograph", "feature_unapplicable_jerkiest_klemperer", "feature_unbeaten_orological_dentin", "feature_unbreakable_nosological_comedian", "feature_unburied_exponent_pace", "feature_uncertified_myrmecological_nagger", "feature_uncharged_unovercome_smolder", "feature_unco_terefah_thirster", "feature_uncomplimentary_malignant_scoff", "feature_uncompromising_fancy_kyle", "feature_uncurtailed_translucid_coccid", "feature_undescribed_methylic_friday", "feature_undetermined_idle_aftergrowth", "feature_undirected_perdu_ylem", "feature_undisguised_whatever_gaul", "feature_undivorced_unsatisfying_praetorium", "feature_undrossy_serpentiform_sack", "feature_unextinct_smectic_isa", "feature_uninclosed_handcrafted_springing", "feature_univalve_abdicant_distrail", "feature_unknown_reusable_cabbage", "feature_unlawful_superintendent_brunet", "feature_unlivable_morbific_traveling", "feature_unliving_bit_bengaline", "feature_unluckiest_mulley_benzyl", "feature_unmalleable_resistant_kingston", "feature_unmodernized_vasodilator_galenist", "feature_unmoved_alt_spoonerism", "feature_unnetted_bay_premillennialist", "feature_unnourishing_indiscreet_occiput", "feature_unperfect_implemental_cellarage", "feature_unrated_intact_balmoral", "feature_unrelieved_rawish_cement", "feature_unrequired_waxing_skeptic", "feature_unscheduled_malignant_shingling", "feature_unsparing_moralistic_commissary", "feature_unsparred_scarabaeid_anthologist", "feature_unspotted_practiced_gland", "feature_unstacked_trackable_blizzard", "feature_unsurveyed_boyish_aleph", "feature_unsurveyed_chopped_feldspathoid", "feature_untellable_penal_allegorization", "feature_untouchable_unsolvable_agouti", "feature_untrimmed_monaxial_accompanist", "feature_untumbled_histologic_inion", "feature_unvaried_social_bangkok", "feature_unweary_congolese_captain", "feature_uretic_seral_decoding", "feature_urochordal_swallowed_curn", "feature_vedic_mitral_swiz", "feature_venatic_intermetallic_darling", "feature_vestmental_hoofed_transpose", "feature_vizierial_courtlier_hampton", "feature_volitional_ascensive_selfhood", "feature_voltairean_consolidative_parallel", "feature_voltairean_dyslogistic_epagoge", "feature_vulcanological_sepulchral_spean", "feature_wale_planned_tolstoy", "feature_westering_immunosuppressive_crapaud", "feature_whistleable_unbedimmed_chokey", "feature_whitened_remanent_blast", "feature_whopping_eminent_attempter", "feature_wieldable_defiled_aperitive", "feature_wombed_reverberatory_colourer", "feature_zarathustrian_albigensian_itch", "feature_zymotic_varnished_mulga"]
# Cell
class BaseEvaluator:
"""
Evaluation functionality that is relevant for both
Numerai Classic and Numerai Signals.
:param era_col: Column name pointing to eras. \n
Most commonly "era" for Numerai Classic and "friday_date" for Numerai Signals. \n
:param fast_mode: Will skip compute intensive metrics if set to True,
namely max_exposure, feature neutral mean, TB200 and TB500.
"""
def __init__(self, era_col: str = "era", fast_mode=False):
self.era_col = era_col
self.fast_mode = fast_mode
def full_evaluation(
self,
dataf: NumerFrame,
example_col: str,
pred_cols: list = None,
target_col: str = "target",
) -> pd.DataFrame:
"""
Perform evaluation for each prediction column in the NumerFrame
against give target and example prediction column.
"""
val_stats = pd.DataFrame()
cat_cols = dataf.get_feature_data.select_dtypes(include=['category']).columns.to_list()
if cat_cols:
rich_print(f":warning: WARNING: Categorical features detected that cannot be used for neutralization. Removing columns: '{cat_cols}' for evaluation. :warning:")
dataf.loc[:, dataf.feature_cols] = dataf.get_feature_data.select_dtypes(exclude=['category'])
dataf = dataf.fillna(0.5)
pred_cols = dataf.prediction_cols if not pred_cols else pred_cols
for col in tqdm(pred_cols, desc="Evaluation: "):
col_stats = self.evaluation_one_col(
dataf=dataf,
pred_col=col,
target_col=target_col,
example_col=example_col,
)
val_stats = pd.concat([val_stats, col_stats], axis=0)
return val_stats
def evaluation_one_col(
self,
dataf: NumerFrame,
pred_col: str,
target_col: str,
example_col: str,
):
"""
Perform evaluation for one prediction column
against given target and example prediction column.
"""
col_stats = pd.DataFrame()
# Compute stats
val_corrs = self.per_era_corrs(
dataf=dataf, pred_col=pred_col, target_col=target_col
)
mean, std, sharpe = self.mean_std_sharpe(era_corrs=val_corrs)
max_drawdown = self.max_drawdown(era_corrs=val_corrs)
apy = self.apy(era_corrs=val_corrs)
example_corr = self.example_correlation(
dataf=dataf, pred_col=pred_col, example_col=example_col
)
mmc_mean, mmc_std, mmc_sharpe = self.mmc(
dataf=dataf,
pred_col=pred_col,
target_col=target_col,
example_col=example_col,
)
col_stats.loc[pred_col, "target"] = target_col
col_stats.loc[pred_col, "mean"] = mean
col_stats.loc[pred_col, "std"] = std
col_stats.loc[pred_col, "sharpe"] = sharpe
col_stats.loc[pred_col, "max_drawdown"] = max_drawdown
col_stats.loc[pred_col, "apy"] = apy
col_stats.loc[pred_col, "mmc_mean"] = mmc_mean
col_stats.loc[pred_col, "mmc_std"] = mmc_std
col_stats.loc[pred_col, "mmc_sharpe"] = mmc_sharpe
col_stats.loc[pred_col, "corr_with_example_preds"] = example_corr
# Compute intensive stats
if not self.fast_mode:
max_feature_exposure = self.max_feature_exposure(
dataf=dataf, pred_col=pred_col
)
fn_mean, fn_std, fn_sharpe = self.feature_neutral_mean_std_sharpe(
dataf=dataf, pred_col=pred_col, target_col=target_col
)
tb200_mean, tb200_std, tb200_sharpe = self.tbx_mean_std_sharpe(
dataf=dataf, pred_col=pred_col, target_col=target_col, tb=200
)
tb500_mean, tb500_std, tb500_sharpe = self.tbx_mean_std_sharpe(
dataf=dataf, pred_col=pred_col, target_col=target_col, tb=500
)
ex_diss = self.exposure_dissimilarity(
dataf=dataf, pred_col=pred_col, example_col=example_col
)
col_stats.loc[pred_col, "max_feature_exposure"] = max_feature_exposure
col_stats.loc[pred_col, "feature_neutral_mean"] = fn_mean
col_stats.loc[pred_col, "feature_neutral_std"] = fn_std
col_stats.loc[pred_col, "feature_neutral_sharpe"] = fn_sharpe
col_stats.loc[pred_col, "tb200_mean"] = tb200_mean
col_stats.loc[pred_col, "tb200_std"] = tb200_std
col_stats.loc[pred_col, "tb200_sharpe"] = tb200_sharpe
col_stats.loc[pred_col, "tb500_mean"] = tb500_mean
col_stats.loc[pred_col, "tb500_std"] = tb500_std
col_stats.loc[pred_col, "tb500_sharpe"] = tb500_sharpe
col_stats.loc[pred_col, "exposure_dissimilarity"] = ex_diss
return col_stats
def per_era_corrs(
self, dataf: pd.DataFrame, pred_col: str, target_col: str
) -> pd.Series:
"""Correlation between prediction and target for each era."""
return dataf.groupby(dataf[self.era_col]).apply(
lambda d: self._normalize_uniform(d[pred_col].fillna(0.5)).corr(
d[target_col]
)
)
def mean_std_sharpe(
self, era_corrs: pd.Series
) -> Tuple[np.float64, np.float64, np.float64]:
"""
Average, standard deviation and Sharpe ratio for
correlations per era.
"""
mean = pd.Series(era_corrs.mean()).item()
std = pd.Series(era_corrs.std(ddof=0)).item()
sharpe = mean / std
return mean, std, sharpe
@staticmethod
def max_drawdown(era_corrs: pd.Series) -> np.float64:
"""Maximum drawdown per era."""
# Arbitrarily large window
rolling_max = (
(era_corrs + 1).cumprod().rolling(window=9000, min_periods=1).max()
)
daily_value = (era_corrs + 1).cumprod()
max_drawdown = -((rolling_max - daily_value) / rolling_max).max()
return max_drawdown
@staticmethod
def apy(era_corrs: pd.Series, stake_compounding_lag: int = 4) -> np.float64:
"""
Annual percentage yield.
:param era_corrs: Correlation scores by era
:param stake_compounding_lag: Compounding lag for Numerai rounds (4 for Numerai Classic)
"""
payout_scores = era_corrs.clip(-0.25, 0.25)
payout_daily_value = (payout_scores + 1).cumprod()
apy = (
((payout_daily_value.dropna().iloc[-1]) ** (1 / len(payout_scores)))
** (
52 - stake_compounding_lag
) # 52 weeks of compounding minus n for stake compounding lag
- 1
) * 100
return apy
def example_correlation(
self, dataf: Union[pd.DataFrame, NumerFrame], pred_col: str, example_col: str
):
"""Correlations with example predictions."""
return self.per_era_corrs(
dataf=dataf,
pred_col=pred_col,
target_col=example_col,
).mean()
def max_feature_exposure(
self, dataf: Union[pd.DataFrame, NumerFrame], pred_col: str
) -> np.float64:
"""Maximum exposure over all features."""
max_per_era = dataf.groupby(self.era_col).apply(
lambda d: d[dataf.feature_cols].corrwith(d[pred_col]).abs().max()
)
max_feature_exposure = max_per_era.mean(skipna=True)
return max_feature_exposure
def feature_neutral_mean_std_sharpe(
self, dataf: Union[pd.DataFrame, NumerFrame], pred_col: str, target_col: str, feature_names: list = None
) -> Tuple[np.float64, np.float64, np.float64]:
"""
Feature neutralized mean performance.
More info: https://docs.numer.ai/tournament/feature-neutral-correlation
"""
fn = FeatureNeutralizer(pred_name=pred_col,
feature_names=feature_names,
proportion=1.0)
neutralized_dataf = fn(dataf=dataf)
neutral_corrs = self.per_era_corrs(
dataf=neutralized_dataf,
pred_col=f"{pred_col}_neutralized_1.0",
target_col=target_col,
)
mean, std, sharpe = self.mean_std_sharpe(era_corrs=neutral_corrs)
return mean, std, sharpe
def tbx_mean_std_sharpe(
self, dataf: pd.DataFrame, pred_col: str, target_col: str, tb: int = 200
) -> Tuple[np.float64, np.float64, np.float64]:
"""
Calculate Mean, Standard deviation and Sharpe ratio
when we focus on the x top and x bottom predictions.
:param tb: How many of top and bottom predictions to focus on.
TB200 and TB500 are the most common situations.
"""
tb_val_corrs = self._score_by_date(
dataf=dataf, columns=[pred_col], target=target_col, tb=tb
)
return self.mean_std_sharpe(era_corrs=tb_val_corrs)
def mmc(
self, dataf: pd.DataFrame, pred_col: str, target_col: str, example_col: str
) -> Tuple[np.float64, np.float64, np.float64]:
"""
MMC Mean, standard deviation and Sharpe ratio.
More info: https://docs.numer.ai/tournament/metamodel-contribution
"""
mmc_scores = []
corr_scores = []
for _, x in dataf.groupby(self.era_col):
series = self._neutralize_series(
self._normalize_uniform(x[pred_col]), (x[example_col])
)
mmc_scores.append(np.cov(series, x[target_col])[0, 1] / (0.29 ** 2))
corr_scores.append(self._normalize_uniform(x[pred_col]).corr(x[target_col]))
val_mmc_mean = np.mean(mmc_scores)
val_mmc_std = np.std(mmc_scores)
corr_plus_mmcs = [c + m for c, m in zip(corr_scores, mmc_scores)]
corr_plus_mmc_sharpe = np.mean(corr_plus_mmcs) / np.std(corr_plus_mmcs)
return val_mmc_mean, val_mmc_std, corr_plus_mmc_sharpe
def exposure_dissimilarity(self, dataf: NumerFrame, pred_col: str, example_col: str) -> np.float32:
"""
Model pattern of feature exposure to the example column.
See TC details forum post: https://forum.numer.ai/t/true-contribution-details/5128/4
"""
U = dataf.get_feature_data.corrwith(dataf[pred_col]).values
E = dataf.get_feature_data.corrwith(dataf[example_col]).values
exp_dis = 1 - np.dot(U, E) / np.dot(E, E)
return exp_dis
@staticmethod
def _neutralize_series(series, by, proportion=1.0):
scores = series.values.reshape(-1, 1)
exposures = by.values.reshape(-1, 1)
# this line makes series neutral to a constant column so that it's centered and for sure gets corr 0 with exposures
exposures = np.hstack(
(exposures, np.array([np.mean(series)] * len(exposures)).reshape(-1, 1))
)
correction = proportion * (
exposures.dot(np.linalg.lstsq(exposures, scores, rcond=None)[0])
)
corrected_scores = scores - correction
neutralized = pd.Series(corrected_scores.ravel(), index=series.index)
return neutralized
def _score_by_date(
self, dataf: pd.DataFrame, columns: list, target: str, tb: int = None
):
"""
Get era correlation based on given TB (x top and bottom predictions).
:param tb: How many of top and bottom predictions to focus on.
TB200 is the most common situation.
"""
unique_eras = dataf[self.era_col].unique()
computed = []
for u in unique_eras:
df_era = dataf[dataf[self.era_col] == u]
era_pred = np.float64(df_era[columns].values.T)
era_target = np.float64(df_era[target].values.T)
if tb is None:
ccs = np.corrcoef(era_target, era_pred)[0, 1:]
else:
tbidx = np.argsort(era_pred, axis=1)
tbidx = np.concatenate([tbidx[:, :tb], tbidx[:, -tb:]], axis=1)
ccs = [
np.corrcoef(era_target[idx], pred[idx])[0, 1]
for idx, pred in zip(tbidx, era_pred)
]
ccs = np.array(ccs)
computed.append(ccs)
return pd.DataFrame(
np.array(computed), columns=columns, index=dataf[self.era_col].unique()
)
@staticmethod
def _normalize_uniform(df: pd.DataFrame) -> pd.Series:
"""Normalize predictions uniformly using ranks."""
x = (df.rank(method="first") - 0.5) / len(df)
return pd.Series(x, index=df.index)
def plot_correlations(
self,
dataf: NumerFrame,
pred_cols: list = None,
target_col: str = "target",
roll_mean: int = 20,
):
"""
Plot per era correlations over time.
:param roll_mean: How many eras should be averaged to compute a rolling score.
"""
validation_by_eras = pd.DataFrame()
pred_cols = dataf.prediction_cols if not pred_cols else pred_cols
for pred_col in pred_cols:
per_era_corrs = self.per_era_corrs(
dataf, pred_col=pred_col, target_col=target_col
)
validation_by_eras.loc[:, pred_col] = per_era_corrs
validation_by_eras.rolling(roll_mean).mean().plot(
kind="line",
marker="o",
ms=4,
title=f"Rolling Per Era Correlation Mean (rolling window size: {roll_mean})",
figsize=(15, 5),
)
plt.legend(
loc="upper center",
bbox_to_anchor=(0.5, -0.05),
fancybox=True,
shadow=True,
ncol=1,
)
plt.axhline(y=0.0, color="r", linestyle="--")
plt.show()
validation_by_eras.cumsum().plot(
title="Cumulative Sum of Era Correlations", figsize=(15, 5)
)
plt.legend(
loc="upper center",
bbox_to_anchor=(0.5, -0.05),
fancybox=True,
shadow=True,
ncol=1,
)
plt.axhline(y=0.0, color="r", linestyle="--")
plt.show()
return
# Cell
class NumeraiClassicEvaluator(BaseEvaluator):
"""Evaluator for all metrics that are relevant in Numerai Classic."""
def __init__(self, era_col: str = "era", fast_mode=False):
super().__init__(era_col=era_col, fast_mode=fast_mode)
self.fncv3_features = FNCV3_FEATURES
self.medium_features = MEDIUM_FEATURES
def full_evaluation(
self,
dataf: NumerFrame,
example_col: str,
pred_cols: list = None,
target_col: str = "target",
) -> pd.DataFrame:
val_stats = pd.DataFrame()
dataf = dataf.fillna(0.5)
pred_cols = dataf.prediction_cols if not pred_cols else pred_cols
# Check if sufficient columns are present in dataf to compute FNCv3
if set(self.fncv3_features).issubset(set(dataf.columns)):
valid_features = self.fncv3_features
elif set(self.medium_features).issubset(set(dataf.columns)):
print("WARNING: 'v4/fncv3_features' are not present in the DataFrame. Falling back on 'v3/medium' features.")
valid_features = self.medium_features
else:
print("WARNING: neither 'v4/fncv3_features' nor 'v3/medium' features are defined in DataFrame. Skipping calculation of v3 metrics.")
valid_features = []
for col in tqdm(pred_cols, desc="Evaluation: "):
# Metrics that can be calculated for both Numerai Classic and Signals
col_stats = self.evaluation_one_col(
dataf=dataf,
pred_col=col,
target_col=target_col,
example_col=example_col,
)
# Numerai Classic specific metrics
if not self.fast_mode and valid_features:
fnc_v3, fn_std_v3, fn_sharpe_v3 = self.feature_neutral_mean_std_sharpe(
dataf=dataf, pred_col=col, target_col=target_col, feature_names=valid_features
)
col_stats.loc[col, "feature_neutral_mean_v3"] = fnc_v3
col_stats.loc[col, "feature_neutral_std_v3"] = fn_std_v3
col_stats.loc[col, "feature_neutral_sharpe_v3"] = fn_sharpe_v3
val_stats = pd.concat([val_stats, col_stats], axis=0)
return val_stats
def __load_json(self, json_path: str) -> dict:
with open(json_path, 'r') as f:
data = json.load(f)
return data
# Cell
class NumeraiSignalsEvaluator(BaseEvaluator):
"""Evaluator for all metrics that are relevant in Numerai Signals."""
def __init__(self, era_col: str = "friday_date", fast_mode=False):
super().__init__(era_col=era_col, fast_mode=fast_mode)
def get_neutralized_corr(self, val_dataf: pd.DataFrame, model_name: str, key: Key, timeout_min: int = 2) -> pd.Series:
"""
Retrieved neutralized validation correlation by era. \n
Calculated on Numerai servers. \n
:param val_dataf: A DataFrame containing prediction, friday_date, era and data_type columns. \n
data_type column should contain 'validation' instances. \n
:param model_name: Any model name for which you have authentication credentials. \n
:param key: Key object to authenticate upload of diagnostics. \n
:param timeout_min: How many minutes to wait on diagnostics processing on Numerai servers before timing out. \n
2 minutes by default. \n
:return: Pandas Series with era as index and neutralized validation correlations (validationCorr).
"""
api = SignalsAPI(public_id=key.pub_id, secret_key=key.secret_key)
model_id = api.get_models()[model_name]
api.upload_diagnostics(df=val_dataf, model_id=model_id)
data = self.__await_diagnostics(api=api, model_id=model_id, timeout_min=timeout_min)
dataf = pd.DataFrame(data['perEraDiagnostics']).set_index("era")['validationCorr']
dataf.index = pd.to_datetime(dataf.index)
return dataf
@staticmethod
def __await_diagnostics(api: SignalsAPI, model_id: str, timeout_min: int, interval_sec: int = 15):
"""
Wait for diagnostics to be uploaded.
Try every 'interval_sec' seconds until 'timeout_min' minutes have passed.
"""
timeout = time.time() + 60 * timeout_min
data = {"status": "not_done"}
while time.time() < timeout:
data = api.diagnostics(model_id=model_id)[0]
if data['status'] == 'done':
break
else:
print(f"Diagnostics not processed yet. Sleeping for another {interval_sec} seconds.")
time.sleep(interval_sec)
if not data['status'] == 'done':
raise Exception(f"Diagnostics couldn't be retrieved within {timeout_min} minutes after uploading. Check if Numerai API is offline.")
return data
| 111.303158
| 16,656
| 0.796289
| 5,862
| 52,869
| 6.65029
| 0.488912
| 0.011312
| 0.006772
| 0.00808
| 0.106993
| 0.09468
| 0.07462
| 0.062051
| 0.059512
| 0.05333
| 0
| 0.005157
| 0.119692
| 52,869
| 475
| 16,657
| 111.303158
| 0.83247
| 0.061416
| 0
| 0.273775
| 1
| 0.011527
| 0.63518
| 0.613536
| 0
| 0
| 0
| 0
| 0.002882
| 1
| 0.066282
| false
| 0.005764
| 0.034582
| 0
| 0.167147
| 0.014409
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
cf095d1cc1c0a7aeb1bfa725fcbb0567a3a1ff93
| 100
|
py
|
Python
|
votedperceptron/__init__.py
|
bmgee/votedperceptron
|
166aa1fd581fa1df05bdb3608c6eff8012ec3b20
|
[
"Apache-2.0"
] | 1
|
2021-03-16T03:05:35.000Z
|
2021-03-16T03:05:35.000Z
|
votedperceptron/__init__.py
|
bmgee/votedperceptron
|
166aa1fd581fa1df05bdb3608c6eff8012ec3b20
|
[
"Apache-2.0"
] | null | null | null |
votedperceptron/__init__.py
|
bmgee/votedperceptron
|
166aa1fd581fa1df05bdb3608c6eff8012ec3b20
|
[
"Apache-2.0"
] | 2
|
2020-03-06T15:59:46.000Z
|
2022-01-04T13:47:11.000Z
|
from .votedperceptron import VotedPerceptron
from .multiclassclassifier import MulticlassClassifier
| 33.333333
| 54
| 0.9
| 8
| 100
| 11.25
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.08
| 100
| 2
| 55
| 50
| 0.978261
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 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
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
cf401b682e08d73e9b854d1617ebcf53e2b8b846
| 46
|
py
|
Python
|
msbd/varieta/__init__.py
|
mnslarcher/metodi-statistici-big-data
|
4587b4e4104557e50d09d028259d6c42c44d2814
|
[
"MIT"
] | 1
|
2019-02-17T09:28:04.000Z
|
2019-02-17T09:28:04.000Z
|
msbd/varieta/__init__.py
|
mnslarcher/metodi-statistici-big-data
|
4587b4e4104557e50d09d028259d6c42c44d2814
|
[
"MIT"
] | null | null | null |
msbd/varieta/__init__.py
|
mnslarcher/metodi-statistici-big-data
|
4587b4e4104557e50d09d028259d6c42c44d2814
|
[
"MIT"
] | null | null | null |
from .curva_principale import CurvaPrincipale
| 23
| 45
| 0.891304
| 5
| 46
| 8
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.086957
| 46
| 1
| 46
| 46
| 0.952381
| 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
|
cf57147f53c8c4411cbef0b3146294daf662edb7
| 370
|
py
|
Python
|
lliregistration_back/api/views/__init__.py
|
ydang5/final-project-back
|
ae8b0ff2b340b521b70e3b0c25ab8cb4b64ac453
|
[
"BSD-3-Clause"
] | null | null | null |
lliregistration_back/api/views/__init__.py
|
ydang5/final-project-back
|
ae8b0ff2b340b521b70e3b0c25ab8cb4b64ac453
|
[
"BSD-3-Clause"
] | null | null | null |
lliregistration_back/api/views/__init__.py
|
ydang5/final-project-back
|
ae8b0ff2b340b521b70e3b0c25ab8cb4b64ac453
|
[
"BSD-3-Clause"
] | null | null | null |
from api.views.homepage.views import GetVersion
from api.views.gateway.views import UserLogoutAPI
from api.views.file_upload.views import LLIStudentMasterSheetUploadAPIView
from api.views.data_organizer.views import ImmiStatusValidCheckAPI
from api.views.data_organizer.views import PaymentValidCheckAPI
from api.views.data_organizer.views import InsuranceValidCheckAPI
| 52.857143
| 74
| 0.886486
| 46
| 370
| 7.043478
| 0.347826
| 0.12963
| 0.222222
| 0.148148
| 0.333333
| 0.333333
| 0.333333
| 0
| 0
| 0
| 0
| 0
| 0.064865
| 370
| 6
| 75
| 61.666667
| 0.936416
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
cf66d235f27e1bdf651245e9001d38bc8109f3f6
| 67
|
py
|
Python
|
models/fpnssd/__init__.py
|
lihaojia24/pytorch-dt
|
0a8bda73d2055e960ac4840c651b5dff61bc4f5f
|
[
"MIT"
] | null | null | null |
models/fpnssd/__init__.py
|
lihaojia24/pytorch-dt
|
0a8bda73d2055e960ac4840c651b5dff61bc4f5f
|
[
"MIT"
] | null | null | null |
models/fpnssd/__init__.py
|
lihaojia24/pytorch-dt
|
0a8bda73d2055e960ac4840c651b5dff61bc4f5f
|
[
"MIT"
] | null | null | null |
from .net import FPNSSD512
from .box_coder import FPNSSDBoxCoder
| 22.333333
| 38
| 0.820896
| 9
| 67
| 6
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.052632
| 0.149254
| 67
| 2
| 39
| 33.5
| 0.894737
| 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
|
cf7faef5ea7fed012acfa5a75de0f4402ca3848c
| 93
|
py
|
Python
|
gie/tests/test_modules/basic.py
|
Kerdek/gie
|
ebcd1aec6dc34de46145e4013afd6d5dad194a9f
|
[
"BSD-3-Clause-Clear"
] | 57
|
2019-06-21T21:15:03.000Z
|
2022-03-30T18:17:56.000Z
|
gie/tests/test_modules/basic.py
|
Kerdek/gie
|
ebcd1aec6dc34de46145e4013afd6d5dad194a9f
|
[
"BSD-3-Clause-Clear"
] | 2
|
2020-08-04T05:45:03.000Z
|
2021-02-26T10:21:16.000Z
|
gie/tests/test_modules/basic.py
|
Kerdek/gie
|
ebcd1aec6dc34de46145e4013afd6d5dad194a9f
|
[
"BSD-3-Clause-Clear"
] | 8
|
2019-11-24T07:57:46.000Z
|
2021-05-05T07:58:29.000Z
|
def to_string(x: int) -> str:
return str(x)
def to_int(x: str) -> int:
return int(x)
| 18.6
| 29
| 0.591398
| 18
| 93
| 2.944444
| 0.388889
| 0.188679
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.236559
| 93
| 5
| 30
| 18.6
| 0.746479
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0.5
| 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
| 0
| 1
| 1
| 0
|
0
| 5
|
d85427ebe2efa0c5a204f78dd43cf6bf56bd6a11
| 208
|
py
|
Python
|
main/academy/admin.py
|
UsamaKashif/studentutor
|
7aa5407ac81134a49e474726220e48beaadc9390
|
[
"MIT"
] | 7
|
2021-01-17T23:10:15.000Z
|
2021-02-01T21:35:36.000Z
|
main/academy/admin.py
|
DiveshTheReal/studentutor
|
0d3ef57887bde4dd2ee40d68015598f9c8052ffd
|
[
"MIT"
] | 7
|
2021-01-17T15:10:47.000Z
|
2022-03-12T00:53:49.000Z
|
main/academy/admin.py
|
DiveshTheReal/studentutor
|
0d3ef57887bde4dd2ee40d68015598f9c8052ffd
|
[
"MIT"
] | 3
|
2021-01-18T09:36:16.000Z
|
2021-01-20T16:29:40.000Z
|
from django.contrib import admin
from .models import Academy, PostAnAd, Invitations
# Register your models here.
admin.site.register(Academy)
admin.site.register(PostAnAd)
admin.site.register(Invitations)
| 20.8
| 50
| 0.8125
| 27
| 208
| 6.259259
| 0.481481
| 0.159763
| 0.301775
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.100962
| 208
| 9
| 51
| 23.111111
| 0.903743
| 0.125
| 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
|
d874aeea6ae50f04b5a49191f30e4996a02bd636
| 284
|
py
|
Python
|
singUpSystem/scheme.py
|
xodbox/prediccionf1
|
0f20931493947d3c655a9d50fe9290dfdd722eb9
|
[
"MIT"
] | null | null | null |
singUpSystem/scheme.py
|
xodbox/prediccionf1
|
0f20931493947d3c655a9d50fe9290dfdd722eb9
|
[
"MIT"
] | null | null | null |
singUpSystem/scheme.py
|
xodbox/prediccionf1
|
0f20931493947d3c655a9d50fe9290dfdd722eb9
|
[
"MIT"
] | null | null | null |
from google.appengine.ext import db
class UserInfo(db.Model):
username = db.StringProperty(required = True)
password = db.StringProperty(required = True)
email = db.StringProperty
def query(*q):
if len(q) == 1:
return db.GqlQuery(q[0])
else:
return db.GqlQuery(q[0], q[1])
| 21.846154
| 46
| 0.707746
| 43
| 284
| 4.674419
| 0.581395
| 0.238806
| 0.238806
| 0.278607
| 0.179104
| 0
| 0
| 0
| 0
| 0
| 0
| 0.016529
| 0.147887
| 284
| 12
| 47
| 23.666667
| 0.81405
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.1
| false
| 0.1
| 0.1
| 0
| 0.8
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 5
|
d8767fc661f736407fd24243a091071e0d120a95
| 56
|
py
|
Python
|
scivision/io/__init__.py
|
RaoOfPhysics/scivision
|
880914f0606c51743794fa69a667b181929b5c21
|
[
"BSD-3-Clause"
] | null | null | null |
scivision/io/__init__.py
|
RaoOfPhysics/scivision
|
880914f0606c51743794fa69a667b181929b5c21
|
[
"BSD-3-Clause"
] | null | null | null |
scivision/io/__init__.py
|
RaoOfPhysics/scivision
|
880914f0606c51743794fa69a667b181929b5c21
|
[
"BSD-3-Clause"
] | null | null | null |
from .reader import load_pretrained_model, load_dataset
| 28
| 55
| 0.875
| 8
| 56
| 5.75
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.089286
| 56
| 1
| 56
| 56
| 0.901961
| 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
|
d87c975e8fdd557e379e81e17a5ab0904535773e
| 84
|
py
|
Python
|
andes/models/vcomp/__init__.py
|
cuihantao/Andes
|
6cdc057986c4a8382194ef440b6e92b8dfb77e25
|
[
"Apache-2.0"
] | 16
|
2017-06-16T14:21:04.000Z
|
2018-08-18T08:52:27.000Z
|
andes/models/vcomp/__init__.py
|
cuihantao/Andes
|
6cdc057986c4a8382194ef440b6e92b8dfb77e25
|
[
"Apache-2.0"
] | 1
|
2017-12-12T07:51:16.000Z
|
2017-12-12T07:51:16.000Z
|
andes/models/vcomp/__init__.py
|
cuihantao/Andes
|
6cdc057986c4a8382194ef440b6e92b8dfb77e25
|
[
"Apache-2.0"
] | 7
|
2017-12-10T07:32:36.000Z
|
2018-09-19T16:38:30.000Z
|
"""
Voltage compensators.
"""
from andes.models.vcomp.ieeevc import IEEEVC # NOQA
| 14
| 52
| 0.72619
| 10
| 84
| 6.1
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 84
| 5
| 53
| 16.8
| 0.847222
| 0.321429
| 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
|
d87e4a321437c9a315d69e11baa4c92fee9ca7cc
| 18,841
|
py
|
Python
|
examples/python/oracle_arb_finder/core/smartcontracts.py
|
edd34/OrFeed
|
25d22ef79817861d7f7acef333cf1f9db395fffc
|
[
"Apache-2.0"
] | null | null | null |
examples/python/oracle_arb_finder/core/smartcontracts.py
|
edd34/OrFeed
|
25d22ef79817861d7f7acef333cf1f9db395fffc
|
[
"Apache-2.0"
] | null | null | null |
examples/python/oracle_arb_finder/core/smartcontracts.py
|
edd34/OrFeed
|
25d22ef79817861d7f7acef333cf1f9db395fffc
|
[
"Apache-2.0"
] | null | null | null |
import os
from dotenv import load_dotenv
load_dotenv()
orfeed_contract_address_mainnet = "0x8316b082621cfedab95bf4a44a1d4b64a6ffc336"
registry_contract_address_mainnet = "0x74b5CE2330389391cC61bF2287BDC9Ac73757891"
aave_liquidity_provider = "0x3dfd23a6c5e8bbcfc9581d2e864a68feb6a076d3"
registry_abi_mainnet = [
{
"constant": False,
"inputs": [
{"name": "name", "type": "string"},
{"name": "newOrSameOracleAddress", "type": "address"},
],
"name": "editOracleAddress",
"outputs": [{"name": "", "type": "bool"}],
"payable": True,
"stateMutability": "payable",
"type": "function",
},
{
"constant": True,
"inputs": [
{"name": "selectedOracle", "type": "string"},
{"name": "fromParam", "type": "string"},
{"name": "toParam", "type": "string"},
{"name": "side", "type": "string"},
{"name": "amount", "type": "uint256"},
],
"name": "getPriceFromOracle",
"outputs": [{"name": "", "type": "uint256"}],
"payable": False,
"stateMutability": "view",
"type": "function",
},
{
"constant": False,
"inputs": [],
"name": "withdrawBalance",
"outputs": [{"name": "", "type": "bool"}],
"payable": False,
"stateMutability": "nonpayable",
"type": "function",
},
{
"constant": True,
"inputs": [],
"name": "getAllOracles",
"outputs": [{"name": "", "type": "string[]"}],
"payable": False,
"stateMutability": "view",
"type": "function",
},
{
"constant": False,
"inputs": [{"name": "newFee", "type": "uint256"}],
"name": "changeFee",
"outputs": [{"name": "", "type": "bool"}],
"payable": False,
"stateMutability": "nonpayable",
"type": "function",
},
{
"constant": False,
"inputs": [
{"name": "name", "type": "string"},
{"name": "requestedAddress", "type": "address"},
{"name": "info", "type": "string"},
],
"name": "registerOracle",
"outputs": [{"name": "", "type": "bool"}],
"payable": True,
"stateMutability": "payable",
"type": "function",
},
{
"constant": True,
"inputs": [{"name": "nameReference", "type": "string"}],
"name": "getOracleInfo",
"outputs": [{"name": "", "type": "string"}],
"payable": False,
"stateMutability": "view",
"type": "function",
},
{
"constant": True,
"inputs": [{"name": "nameReference", "type": "string"}],
"name": "getOracleOwner",
"outputs": [{"name": "", "type": "address"}],
"payable": False,
"stateMutability": "view",
"type": "function",
},
{
"constant": False,
"inputs": [
{"name": "name", "type": "string"},
{"name": "info", "type": "string"},
],
"name": "editOracleInfo",
"outputs": [{"name": "", "type": "bool"}],
"payable": True,
"stateMutability": "payable",
"type": "function",
},
{
"constant": False,
"inputs": [{"name": "newOwner", "type": "address"}],
"name": "changeOwner",
"outputs": [{"name": "", "type": "bool"}],
"payable": False,
"stateMutability": "nonpayable",
"type": "function",
},
{
"constant": True,
"inputs": [{"name": "nameReference", "type": "string"}],
"name": "getOracleAddress",
"outputs": [{"name": "", "type": "address"}],
"payable": False,
"stateMutability": "view",
"type": "function",
},
{
"constant": False,
"inputs": [
{"name": "name", "type": "string"},
{"name": "toAddress", "type": "address"},
],
"name": "transferOracleName",
"outputs": [{"name": "", "type": "bool"}],
"payable": False,
"stateMutability": "nonpayable",
"type": "function",
},
{
"inputs": [],
"payable": True,
"stateMutability": "payable",
"type": "constructor",
},
]
orfeed_abi_mainnet = [
{
"constant": False,
"inputs": [
{"name": "symb", "type": "string"},
{"name": "tokenAddress", "type": "address"},
{"name": "byteCode", "type": "bytes32"},
],
"name": "addFreeCurrency",
"outputs": [{"name": "", "type": "bool"}],
"payable": False,
"stateMutability": "nonpayable",
"type": "function",
},
{
"constant": True,
"inputs": [
{"name": "fromSymbol", "type": "string"},
{"name": "toSymbol", "type": "string"},
{"name": "venue", "type": "string"},
{"name": "amount", "type": "uint256"},
{"name": "referenceId", "type": "string"},
],
"name": "requestAsyncExchangeRateResult",
"outputs": [{"name": "", "type": "uint256"}],
"payable": False,
"stateMutability": "view",
"type": "function",
},
{
"constant": True,
"inputs": [
{"name": "eventName", "type": "string"},
{"name": "source", "type": "string"},
{"name": "referenceId", "type": "string"},
],
"name": "getAsyncEventResult",
"outputs": [{"name": "", "type": "string"}],
"payable": False,
"stateMutability": "view",
"type": "function",
},
{
"constant": False,
"inputs": [
{"name": "newDiv", "type": "uint256"},
{"name": "newMul", "type": "uint256"},
],
"name": "updateMulDivConverter2",
"outputs": [{"name": "", "type": "bool"}],
"payable": False,
"stateMutability": "nonpayable",
"type": "function",
},
{
"constant": False,
"inputs": [
{"name": "synth", "type": "bytes32"},
{"name": "token", "type": "address"},
{"name": "inputAmount", "type": "uint256"},
],
"name": "getSynthToTokenOutputAmount",
"outputs": [{"name": "", "type": "uint256"}],
"payable": False,
"stateMutability": "nonpayable",
"type": "function",
},
{
"constant": False,
"inputs": [
{"name": "symb", "type": "string"},
{"name": "tokenAddress", "type": "address"},
],
"name": "addFreeToken",
"outputs": [{"name": "", "type": "bool"}],
"payable": False,
"stateMutability": "nonpayable",
"type": "function",
},
{
"constant": False,
"inputs": [{"name": "_a", "type": "string"}, {"name": "_b", "type": "string"}],
"name": "compare",
"outputs": [{"name": "", "type": "int256"}],
"payable": False,
"stateMutability": "nonpayable",
"type": "function",
},
{
"constant": False,
"inputs": [{"name": "newOracle", "type": "address"}],
"name": "updateForexOracleAddress",
"outputs": [{"name": "", "type": "bool"}],
"payable": False,
"stateMutability": "nonpayable",
"type": "function",
},
{
"constant": False,
"inputs": [{"name": "_a", "type": "string"}, {"name": "_b", "type": "string"}],
"name": "equal",
"outputs": [{"name": "", "type": "bool"}],
"payable": False,
"stateMutability": "nonpayable",
"type": "function",
},
{
"constant": True,
"inputs": [
{"name": "eventName", "type": "string"},
{"name": "source", "type": "string"},
],
"name": "getEventResult",
"outputs": [{"name": "", "type": "string"}],
"payable": False,
"stateMutability": "view",
"type": "function",
},
{
"constant": False,
"inputs": [{"name": "newOracle", "type": "address"}],
"name": "updateSynthAddress",
"outputs": [{"name": "", "type": "bool"}],
"payable": False,
"stateMutability": "nonpayable",
"type": "function",
},
{
"constant": False,
"inputs": [
{"name": "newDiv", "type": "uint256"},
{"name": "newMul", "type": "uint256"},
],
"name": "updateMulDivConverter1",
"outputs": [{"name": "", "type": "bool"}],
"payable": False,
"stateMutability": "nonpayable",
"type": "function",
},
{
"constant": False,
"inputs": [
{"name": "newDiv", "type": "uint256"},
{"name": "newMul", "type": "uint256"},
],
"name": "updateMulDivConverter3",
"outputs": [{"name": "", "type": "bool"}],
"payable": False,
"stateMutability": "nonpayable",
"type": "function",
},
{
"constant": True,
"inputs": [
{"name": "fromSymbol", "type": "string"},
{"name": "toSymbol", "type": "string"},
{"name": "venue", "type": "string"},
{"name": "amount", "type": "uint256"},
],
"name": "getExchangeRate",
"outputs": [{"name": "", "type": "uint256"}],
"payable": False,
"stateMutability": "view",
"type": "function",
},
{
"constant": False,
"inputs": [{"name": "symb", "type": "string"}],
"name": "removeFreeToken",
"outputs": [{"name": "", "type": "bool"}],
"payable": False,
"stateMutability": "nonpayable",
"type": "function",
},
{
"constant": False,
"inputs": [{"name": "newOracle", "type": "address"}],
"name": "updateEthTokenAddress",
"outputs": [{"name": "", "type": "bool"}],
"payable": False,
"stateMutability": "nonpayable",
"type": "function",
},
{
"constant": False,
"inputs": [
{"name": "fundsReturnToAddress", "type": "address"},
{"name": "liquidityProviderContractAddress", "type": "address"},
{"name": "tokens", "type": "string[]"},
{"name": "amount", "type": "uint256"},
{"name": "exchanges", "type": "string[]"},
],
"name": "arb",
"outputs": [{"name": "", "type": "bool"}],
"payable": True,
"stateMutability": "payable",
"type": "function",
},
{
"constant": False,
"inputs": [{"name": "newOracle", "type": "address"}],
"name": "updatePremiumSubOracleAddress",
"outputs": [{"name": "", "type": "bool"}],
"payable": False,
"stateMutability": "nonpayable",
"type": "function",
},
{
"constant": False,
"inputs": [
{"name": "_haystack", "type": "string"},
{"name": "_needle", "type": "string"},
],
"name": "indexOf",
"outputs": [{"name": "", "type": "int256"}],
"payable": False,
"stateMutability": "nonpayable",
"type": "function",
},
{
"constant": False,
"inputs": [{"name": "symb", "type": "string"}],
"name": "removeFreeCurrency",
"outputs": [{"name": "", "type": "bool"}],
"payable": False,
"stateMutability": "nonpayable",
"type": "function",
},
{
"constant": False,
"inputs": [{"name": "newOracle", "type": "address"}],
"name": "updateAsyncOracleAddress",
"outputs": [{"name": "", "type": "bool"}],
"payable": False,
"stateMutability": "nonpayable",
"type": "function",
},
{
"constant": False,
"inputs": [{"name": "venueToCheck", "type": "string"}],
"name": "isFreeVenueCheck",
"outputs": [{"name": "", "type": "bool"}],
"payable": False,
"stateMutability": "nonpayable",
"type": "function",
},
{
"constant": False,
"inputs": [{"name": "symToCheck", "type": "string"}],
"name": "isFree",
"outputs": [{"name": "", "type": "bool"}],
"payable": False,
"stateMutability": "nonpayable",
"type": "function",
},
{
"constant": False,
"inputs": [{"name": "newAddress", "type": "address"}],
"name": "updateArbContractAddress",
"outputs": [{"name": "", "type": "bool"}],
"payable": False,
"stateMutability": "nonpayable",
"type": "function",
},
{
"constant": False,
"inputs": [{"name": "newOwner", "type": "address"}],
"name": "changeOwner",
"outputs": [{"name": "", "type": "bool"}],
"payable": False,
"stateMutability": "nonpayable",
"type": "function",
},
{
"constant": False,
"inputs": [{"name": "newOracle", "type": "address"}],
"name": "updateAsyncEventsAddress",
"outputs": [{"name": "", "type": "bool"}],
"payable": False,
"stateMutability": "nonpayable",
"type": "function",
},
{
"constant": True,
"inputs": [{"name": "tokenAddress", "type": "address"}],
"name": "getTokenDecimalCount",
"outputs": [{"name": "", "type": "uint256"}],
"payable": False,
"stateMutability": "view",
"type": "function",
},
{
"constant": True,
"inputs": [{"name": "a", "type": "string"}, {"name": "b", "type": "string"}],
"name": "compareStrings",
"outputs": [{"name": "", "type": "bool"}],
"payable": False,
"stateMutability": "view",
"type": "function",
},
{
"constant": False,
"inputs": [
{"name": "eventName", "type": "string"},
{"name": "source", "type": "string"},
],
"name": "requestAsyncEvent",
"outputs": [{"name": "", "type": "string"}],
"payable": False,
"stateMutability": "nonpayable",
"type": "function",
},
{
"constant": True,
"inputs": [{"name": "symbol", "type": "string"}],
"name": "getTokenAddress",
"outputs": [{"name": "", "type": "address"}],
"payable": False,
"stateMutability": "view",
"type": "function",
},
{
"constant": False,
"inputs": [
{"name": "token", "type": "address"},
{"name": "synth", "type": "bytes32"},
{"name": "inputAmount", "type": "uint256"},
],
"name": "getTokenToSynthOutputAmount",
"outputs": [{"name": "", "type": "uint256"}],
"payable": False,
"stateMutability": "nonpayable",
"type": "function",
},
{
"constant": False,
"inputs": [{"name": "source", "type": "string"}],
"name": "stringToBytes32",
"outputs": [{"name": "result", "type": "bytes32"}],
"payable": False,
"stateMutability": "nonpayable",
"type": "function",
},
{
"constant": False,
"inputs": [
{"name": "fromSymbol", "type": "string"},
{"name": "toSymbol", "type": "string"},
{"name": "venue", "type": "string"},
{"name": "amount", "type": "uint256"},
],
"name": "requestAsyncExchangeRate",
"outputs": [{"name": "", "type": "string"}],
"payable": False,
"stateMutability": "nonpayable",
"type": "function",
},
{
"constant": False,
"inputs": [{"name": "newOracle", "type": "address"}],
"name": "updateTokenOracleAddress2",
"outputs": [{"name": "", "type": "bool"}],
"payable": False,
"stateMutability": "nonpayable",
"type": "function",
},
{
"constant": False,
"inputs": [{"name": "newOracle", "type": "address"}],
"name": "updateSyncEventsAddress",
"outputs": [{"name": "", "type": "bool"}],
"payable": False,
"stateMutability": "nonpayable",
"type": "function",
},
{
"constant": True,
"inputs": [{"name": "symbol", "type": "string"}],
"name": "getSynthBytes32",
"outputs": [{"name": "", "type": "bytes32"}],
"payable": False,
"stateMutability": "view",
"type": "function",
},
{
"constant": False,
"inputs": [
{"name": "fromSymb", "type": "string"},
{"name": "toSymb", "type": "string"},
{"name": "amount", "type": "uint256"},
],
"name": "getFreeExchangeRate",
"outputs": [{"name": "", "type": "uint256"}],
"payable": False,
"stateMutability": "nonpayable",
"type": "function",
},
{
"constant": False,
"inputs": [{"name": "newOracle", "type": "address"}],
"name": "updateTokenOracleAddress",
"outputs": [{"name": "", "type": "bool"}],
"payable": False,
"stateMutability": "nonpayable",
"type": "function",
},
{
"constant": False,
"inputs": [
{"name": "newDiv", "type": "uint256"},
{"name": "newMul", "type": "uint256"},
],
"name": "updateMulDivConverter4",
"outputs": [{"name": "", "type": "bool"}],
"payable": False,
"stateMutability": "nonpayable",
"type": "function",
},
{
"constant": True,
"inputs": [{"name": "symbol", "type": "string"}],
"name": "getForexAddress",
"outputs": [{"name": "", "type": "address"}],
"payable": False,
"stateMutability": "view",
"type": "function",
},
{
"constant": False,
"inputs": [
{"name": "param1", "type": "string"},
{"name": "param2", "type": "string"},
{"name": "param3", "type": "string"},
{"name": "param4", "type": "string"},
],
"name": "callExtraFunction",
"outputs": [{"name": "", "type": "string"}],
"payable": False,
"stateMutability": "nonpayable",
"type": "function",
},
{
"inputs": [],
"payable": True,
"stateMutability": "payable",
"type": "constructor",
},
{"payable": True, "stateMutability": "payable", "type": "fallback"},
]
my_smartcontracts = {}
if os.getenv("NETWORK") == "mainnet":
my_smartcontracts["orfeed"] = {
"address": orfeed_contract_address_mainnet,
"abi": orfeed_abi_mainnet,
}
my_smartcontracts["registry"] = {
"address": registry_contract_address_mainnet,
"abi": registry_abi_mainnet,
}
| 31.090759
| 87
| 0.452046
| 1,268
| 18,841
| 6.690852
| 0.109621
| 0.074257
| 0.092409
| 0.105728
| 0.772159
| 0.733498
| 0.731141
| 0.716525
| 0.711693
| 0.711693
| 0
| 0.013689
| 0.317605
| 18,841
| 605
| 88
| 31.142149
| 0.646185
| 0
| 0
| 0.646667
| 0
| 0
| 0.406826
| 0.031527
| 0
| 0
| 0.006688
| 0
| 0
| 1
| 0
| false
| 0
| 0.003333
| 0
| 0.003333
| 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
|
d8ae9c65994b7b29b7ea692215d948759739b279
| 1,982
|
py
|
Python
|
mak/libs/pyxx/cxx/grammar/declaration/specifier/type/simple.py
|
bugengine/BugEngine
|
1b3831d494ee06b0bd74a8227c939dd774b91226
|
[
"BSD-3-Clause"
] | 4
|
2015-05-13T16:28:36.000Z
|
2017-05-24T15:34:14.000Z
|
mak/libs/pyxx/cxx/grammar/declaration/specifier/type/simple.py
|
bugengine/BugEngine
|
1b3831d494ee06b0bd74a8227c939dd774b91226
|
[
"BSD-3-Clause"
] | null | null | null |
mak/libs/pyxx/cxx/grammar/declaration/specifier/type/simple.py
|
bugengine/BugEngine
|
1b3831d494ee06b0bd74a8227c939dd774b91226
|
[
"BSD-3-Clause"
] | 1
|
2017-03-21T08:28:07.000Z
|
2017-03-21T08:28:07.000Z
|
"""
simple-type-specifier:
nested-name-specifier? type-name
nested-name-specifier template simple-template-id
decltype-specifier
placeholder-type-specifier
nested-name-specifier? template-name
char
char8_t
char16_t
char32_t
wchar_t
bool
short
int
long
signed
unsigned
float
double
void
type-name:
class-name
enum-name
typedef-name
"""
import glrp
from .....parser import cxx98
from be_typing import TYPE_CHECKING
@glrp.rule('simple-type-specifier : nested-name-specifier? type-name')
@glrp.rule('simple-type-specifier : nested-name-specifier "template" simple-template-id')
@glrp.rule('simple-type-specifier : decltype-specifier')
@glrp.rule('simple-type-specifier : placeholder-type-specifier')
@glrp.rule('simple-type-specifier[split] : nested-name-specifier? template-name')
@glrp.rule('simple-type-specifier : [split]"char"')
@glrp.rule('simple-type-specifier : [split]"char8_t"')
@glrp.rule('simple-type-specifier : [split]"char16_t"')
@glrp.rule('simple-type-specifier : [split]"char32_t"')
@glrp.rule('simple-type-specifier : [split]"wchar_t"')
@glrp.rule('simple-type-specifier : [split]"bool"')
@glrp.rule('simple-type-specifier : [split]"short"')
@glrp.rule('simple-type-specifier : [split]"int"')
@glrp.rule('simple-type-specifier : [split]"long"')
@glrp.rule('simple-type-specifier : [split]"signed"')
@glrp.rule('simple-type-specifier : [split]"unsigned"')
@glrp.rule('simple-type-specifier : [split]"float"')
@glrp.rule('simple-type-specifier : [split]"double"')
@glrp.rule('simple-type-specifier : [split]"void"')
@cxx98
def simple_type_specifier(self, p):
# type: (CxxParser, glrp.Production) -> None
pass
@glrp.rule('type-name : class-name')
@glrp.rule('type-name : enum-name')
@glrp.rule('type-name : typedef-name')
@cxx98
def type_name(self, p):
# type: (CxxParser, glrp.Production) -> None
pass
if TYPE_CHECKING:
from .....parser import CxxParser
| 28.724638
| 89
| 0.701312
| 263
| 1,982
| 5.231939
| 0.171103
| 0.217297
| 0.289971
| 0.248547
| 0.700581
| 0.62936
| 0.308866
| 0.164244
| 0
| 0
| 0
| 0.009254
| 0.127649
| 1,982
| 69
| 90
| 28.724638
| 0.786582
| 0.25328
| 0
| 0.121212
| 0
| 0
| 0.610054
| 0.337636
| 0
| 0
| 0
| 0
| 0
| 1
| 0.060606
| false
| 0.060606
| 0.121212
| 0
| 0.181818
| 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
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
2b0e76299e6b3309a09aa302c08a25d5f283cba1
| 138
|
py
|
Python
|
sqller/exceptions.py
|
VoIlAlex/sqller
|
93cd15a6d6eab195fa12e52d1e83e214405cfd35
|
[
"MIT"
] | 1
|
2020-12-13T20:25:44.000Z
|
2020-12-13T20:25:44.000Z
|
sqller/exceptions.py
|
VoIlAlex/sqller
|
93cd15a6d6eab195fa12e52d1e83e214405cfd35
|
[
"MIT"
] | 1
|
2020-03-13T23:31:45.000Z
|
2020-03-13T23:31:45.000Z
|
sqller/exceptions.py
|
VoIlAlex/sqller
|
93cd15a6d6eab195fa12e52d1e83e214405cfd35
|
[
"MIT"
] | null | null | null |
class ConventionViolationError(Exception):
pass
class SQLError(Exception):
pass
class CustomSQLBuildError(SQLError):
pass
| 12.545455
| 42
| 0.753623
| 12
| 138
| 8.666667
| 0.5
| 0.25
| 0.346154
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.181159
| 138
| 10
| 43
| 13.8
| 0.920354
| 0
| 0
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
2b281ab08bac2e0164ab0eb7ac71cbb696d61dc4
| 178
|
py
|
Python
|
data-storage-manager/src/simcore_service_dsm/rest/generated_code/models/__init__.py
|
mguidon/aiohttp-dsm
|
612e4c7f6f73df7d6752269965c428fda0276191
|
[
"MIT"
] | null | null | null |
data-storage-manager/src/simcore_service_dsm/rest/generated_code/models/__init__.py
|
mguidon/aiohttp-dsm
|
612e4c7f6f73df7d6752269965c428fda0276191
|
[
"MIT"
] | null | null | null |
data-storage-manager/src/simcore_service_dsm/rest/generated_code/models/__init__.py
|
mguidon/aiohttp-dsm
|
612e4c7f6f73df7d6752269965c428fda0276191
|
[
"MIT"
] | null | null | null |
# coding: utf-8
# flake8: noqa
from __future__ import absolute_import
# import models into model package
from .error_model import ErrorModel
from .health_info import HealthInfo
| 22.25
| 38
| 0.814607
| 25
| 178
| 5.52
| 0.72
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.013072
| 0.140449
| 178
| 7
| 39
| 25.428571
| 0.888889
| 0.331461
| 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
|
9924b0e1f6dc69d0994fcd13ad12ea4d63ea6722
| 12
|
py
|
Python
|
py1.py
|
saksitdGtec/pygit
|
80759eaac3500eb62761641eb4f94b77a52872a5
|
[
"MIT"
] | null | null | null |
py1.py
|
saksitdGtec/pygit
|
80759eaac3500eb62761641eb4f94b77a52872a5
|
[
"MIT"
] | null | null | null |
py1.py
|
saksitdGtec/pygit
|
80759eaac3500eb62761641eb4f94b77a52872a5
|
[
"MIT"
] | null | null | null |
print("tst")
| 12
| 12
| 0.666667
| 2
| 12
| 4
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 12
| 1
| 12
| 12
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0.230769
| 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
|
995bedc3206b3dfaae418d3f810fa960e09c82a8
| 56
|
py
|
Python
|
src/compare-qrels/__init__.py
|
giguru/compare-qrels
|
dfc119c3b1403748333a48ba880c7e7372055eeb
|
[
"MIT"
] | null | null | null |
src/compare-qrels/__init__.py
|
giguru/compare-qrels
|
dfc119c3b1403748333a48ba880c7e7372055eeb
|
[
"MIT"
] | null | null | null |
src/compare-qrels/__init__.py
|
giguru/compare-qrels
|
dfc119c3b1403748333a48ba880c7e7372055eeb
|
[
"MIT"
] | null | null | null |
from .compare_qrels import CompareData, compute_qrels_df
| 56
| 56
| 0.892857
| 8
| 56
| 5.875
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.071429
| 56
| 1
| 56
| 56
| 0.903846
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
9967fb395b4df0cd22f3e65736785a0fc1fb1b13
| 124
|
py
|
Python
|
fulmo/core/__init__.py
|
jexio/fulmo
|
daa4bd4f1cf3b8bd785a9024a413db9a0238f10c
|
[
"MIT"
] | null | null | null |
fulmo/core/__init__.py
|
jexio/fulmo
|
daa4bd4f1cf3b8bd785a9024a413db9a0238f10c
|
[
"MIT"
] | 80
|
2021-07-13T12:58:25.000Z
|
2022-03-24T03:17:08.000Z
|
fulmo/core/__init__.py
|
jexio/fulmo
|
daa4bd4f1cf3b8bd785a9024a413db9a0238f10c
|
[
"MIT"
] | null | null | null |
from .datamodule import BaseDataModule, BaseDataModuleParameters # noqa: F401
from .module import BaseModule # noqa: F401
| 41.333333
| 78
| 0.806452
| 13
| 124
| 7.692308
| 0.692308
| 0.16
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.056075
| 0.137097
| 124
| 2
| 79
| 62
| 0.878505
| 0.169355
| 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
|
41e0383f02d8496f17b9fcb2474615635ee15eef
| 72
|
py
|
Python
|
stubs/3/django/core/management/base.py
|
ucdstudent95618/pyre-check
|
032c67c5b75d573e0f645545b01c0f0f30475ed7
|
[
"MIT"
] | null | null | null |
stubs/3/django/core/management/base.py
|
ucdstudent95618/pyre-check
|
032c67c5b75d573e0f645545b01c0f0f30475ed7
|
[
"MIT"
] | null | null | null |
stubs/3/django/core/management/base.py
|
ucdstudent95618/pyre-check
|
032c67c5b75d573e0f645545b01c0f0f30475ed7
|
[
"MIT"
] | null | null | null |
from typing import TextIO
class BaseCommand:
stdout: TextIO = ...
| 12
| 25
| 0.694444
| 8
| 72
| 6.25
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.222222
| 72
| 5
| 26
| 14.4
| 0.892857
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
41e7f1d33b3fd6289352c62c825975bc458e8969
| 31
|
py
|
Python
|
client.py
|
Li-Pro/P2P-Remote_Party
|
120144e5fdacb30c77981e59d9d242e541178b89
|
[
"Apache-2.0"
] | 1
|
2020-04-10T10:15:53.000Z
|
2020-04-10T10:15:53.000Z
|
client.py
|
Li-Pro/P2P-Remote-Party
|
7aff94c3bf4dea8327b2b49a1f7dd5abe3c60bfe
|
[
"Apache-2.0"
] | null | null | null |
client.py
|
Li-Pro/P2P-Remote-Party
|
7aff94c3bf4dea8327b2b49a1f7dd5abe3c60bfe
|
[
"Apache-2.0"
] | null | null | null |
import p2prp
p2prp.runClient()
| 10.333333
| 17
| 0.806452
| 4
| 31
| 6.25
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.071429
| 0.096774
| 31
| 3
| 17
| 10.333333
| 0.821429
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
5138e61620fec34db702857307274dc51dde32e5
| 45
|
py
|
Python
|
corehq/ex-submodules/soil/exceptions.py
|
johan--/commcare-hq
|
86ee99c54f55ee94e4c8f2f6f30fc44e10e69ebd
|
[
"BSD-3-Clause"
] | null | null | null |
corehq/ex-submodules/soil/exceptions.py
|
johan--/commcare-hq
|
86ee99c54f55ee94e4c8f2f6f30fc44e10e69ebd
|
[
"BSD-3-Clause"
] | 1
|
2022-03-12T01:03:25.000Z
|
2022-03-12T01:03:25.000Z
|
corehq/ex-submodules/soil/exceptions.py
|
johan--/commcare-hq
|
86ee99c54f55ee94e4c8f2f6f30fc44e10e69ebd
|
[
"BSD-3-Clause"
] | null | null | null |
class TaskFailedError(Exception):
pass
| 9
| 33
| 0.733333
| 4
| 45
| 8.25
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.2
| 45
| 4
| 34
| 11.25
| 0.916667
| 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
|
513cbfc7811faa01881ceb4a2b4633891c1f1611
| 181
|
py
|
Python
|
mp_sort/virtenv/lib/python3.6/site-packages/transcrypt/development/automated_tests/warnings/autotest.py
|
ang-jason/fip_powerx_mini_projects-foxtrot
|
37e3671969b516369e2d1c7cab5890b75c489f56
|
[
"MIT"
] | 2,200
|
2016-10-12T16:47:13.000Z
|
2022-03-30T16:40:35.000Z
|
mp_sort/virtenv/lib/python3.6/site-packages/transcrypt/development/automated_tests/warnings/autotest.py
|
ang-jason/fip_powerx_mini_projects-foxtrot
|
37e3671969b516369e2d1c7cab5890b75c489f56
|
[
"MIT"
] | 672
|
2016-10-12T16:36:48.000Z
|
2022-03-25T00:57:04.000Z
|
mp_sort/virtenv/lib/python3.6/site-packages/transcrypt/development/automated_tests/warnings/autotest.py
|
ang-jason/fip_powerx_mini_projects-foxtrot
|
37e3671969b516369e2d1c7cab5890b75c489f56
|
[
"MIT"
] | 230
|
2016-10-20T14:31:40.000Z
|
2022-03-16T15:57:15.000Z
|
import org.transcrypt.autotester
import basic_tests
autoTester = org.transcrypt.autotester.AutoTester ()
autoTester.run( basic_tests, "basic_tests" )
autoTester.done()
| 18.1
| 53
| 0.762431
| 20
| 181
| 6.75
| 0.4
| 0.222222
| 0.340741
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.143646
| 181
| 9
| 54
| 20.111111
| 0.870968
| 0
| 0
| 0
| 0
| 0
| 0.064327
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.4
| 0
| 0.4
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
513df9df3b51c7e82927b77a25aa7b9f0bc47f92
| 1,237
|
py
|
Python
|
syslinkats/data_file_retrievers.py
|
stick152/SystemLink-Python-ATS
|
82b0fac9bae22b808ba519fa4425a931ff3c77aa
|
[
"MIT"
] | null | null | null |
syslinkats/data_file_retrievers.py
|
stick152/SystemLink-Python-ATS
|
82b0fac9bae22b808ba519fa4425a931ff3c77aa
|
[
"MIT"
] | null | null | null |
syslinkats/data_file_retrievers.py
|
stick152/SystemLink-Python-ATS
|
82b0fac9bae22b808ba519fa4425a931ff3c77aa
|
[
"MIT"
] | null | null | null |
"""
data_file_retrievers.py
This module contains methods for retrieving paths to all configuration .json files.
"""
import pkg_resources
def ats_config_file():
return pkg_resources.resource_filename(
'syslinkats', 'tests/default_conf.json')
def installation_config_file():
return pkg_resources.resource_filename(
'syslinkats', 'tests/setup/installation/data/config.json')
def instance_config_file():
return pkg_resources.resource_filename(
'syslinkats', 'tests/setup/instances/data/config.json')
def systemlink_server_config_file():
return pkg_resources.resource_filename(
'syslinkats', 'tests/setup/systemlink_server/data/config.json')
def user_config_file():
return pkg_resources.resource_filename(
'syslinkats', 'tests/setup/users/data/config.json')
def workspaces_config_file():
return pkg_resources.resource_filename(
'syslinkats', 'tests/setup/workspaces/data/config.json')
def security_config_file():
return pkg_resources.resource_filename(
'syslinkats', 'tests/setup/security/data/config.json'
)
def mongo_config_file():
return pkg_resources.resource_filename(
'syslinkats', 'tests/setup/mongo/data/config.json')
| 26.319149
| 83
| 0.744543
| 147
| 1,237
| 6.006803
| 0.272109
| 0.12231
| 0.14496
| 0.17214
| 0.574179
| 0.574179
| 0.574179
| 0.574179
| 0.574179
| 0.507361
| 0
| 0
| 0.14713
| 1,237
| 46
| 84
| 26.891304
| 0.836967
| 0.087308
| 0
| 0.307692
| 0
| 0
| 0.331847
| 0.260482
| 0
| 0
| 0
| 0
| 0
| 1
| 0.307692
| true
| 0
| 0.038462
| 0.307692
| 0.653846
| 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
| 1
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
5159d57992cfe8e0f9134838535f34f4a3d105a3
| 212
|
py
|
Python
|
discordbot/src/helpers/__init__.py
|
knabb215/discord-masz
|
a1b8434ca8e6e31cb61a8a6069338fdd34698ea2
|
[
"MIT"
] | null | null | null |
discordbot/src/helpers/__init__.py
|
knabb215/discord-masz
|
a1b8434ca8e6e31cb61a8a6069338fdd34698ea2
|
[
"MIT"
] | null | null | null |
discordbot/src/helpers/__init__.py
|
knabb215/discord-masz
|
a1b8434ca8e6e31cb61a8a6069338fdd34698ea2
|
[
"MIT"
] | null | null | null |
from .console import console
from .create_whois_embed import create_whois_embed
from .parse_timedeltas import parse_delta
from .get_prefix import get_prefix
from .create_modcase_embed import create_modcase_embed
| 35.333333
| 54
| 0.882075
| 32
| 212
| 5.46875
| 0.375
| 0.114286
| 0.182857
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.09434
| 212
| 5
| 55
| 42.4
| 0.911458
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
5aa920ed6ae0a3641b45fac1985c9cd5005d2b94
| 351
|
py
|
Python
|
example/tutorial.py
|
vyahello/python-package-template
|
a0133915d1ead210eef87e421f880812f6035986
|
[
"MIT"
] | null | null | null |
example/tutorial.py
|
vyahello/python-package-template
|
a0133915d1ead210eef87e421f880812f6035986
|
[
"MIT"
] | null | null | null |
example/tutorial.py
|
vyahello/python-package-template
|
a0133915d1ead210eef87e421f880812f6035986
|
[
"MIT"
] | null | null | null |
class Tutorial:
AUTHOR: str = "Volodymyr Yahello"
def __init__(self, foo: str, bar: str) -> None:
self._foo: str = foo
self._bar: str = bar
def foo(self) -> str:
return self._foo
def bar(self) -> str:
return self._bar
def meta(self) -> str:
return f"Packaging tutorial by {self.AUTHOR}"
| 21.9375
| 53
| 0.57265
| 47
| 351
| 4.106383
| 0.361702
| 0.108808
| 0.202073
| 0.176166
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.307692
| 351
| 15
| 54
| 23.4
| 0.794239
| 0
| 0
| 0
| 0
| 0
| 0.148148
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.363636
| false
| 0
| 0
| 0.272727
| 0.818182
| 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
|
5ab9a6ca71b1c1e60e2ac3819acce22a329d418e
| 215
|
py
|
Python
|
omnisci_olio/ipython/__init__.py
|
omnisci/omnisci-olio.py
|
e8b33d660b49bc7677d82845ed384e57582ef0f8
|
[
"Apache-2.0"
] | 2
|
2022-03-16T20:46:26.000Z
|
2022-03-16T20:46:28.000Z
|
omnisci_olio/ipython/__init__.py
|
heavyai/heavyai-olio.py
|
e8b33d660b49bc7677d82845ed384e57582ef0f8
|
[
"Apache-2.0"
] | 1
|
2022-02-05T12:16:09.000Z
|
2022-02-05T12:16:09.000Z
|
omnisci_olio/ipython/__init__.py
|
omnisci/omnisci-olio.py
|
e8b33d660b49bc7677d82845ed384e57582ef0f8
|
[
"Apache-2.0"
] | null | null | null |
"""OmniSciDB SQL magic"""
# https://ipython.readthedocs.io/en/stable/config/custommagics.html
from .magic import OmniSciSqlMagic
def load_ipython_extension(ipython):
ipython.register_magics(OmniSciSqlMagic)
| 21.5
| 67
| 0.795349
| 25
| 215
| 6.72
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.093023
| 215
| 9
| 68
| 23.888889
| 0.861538
| 0.4
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
5afd2a647e51a760adaede709c477c6c09b74021
| 95
|
py
|
Python
|
analysisstore/test/test_api_smoke.py
|
JunAishima/analysisstore
|
d38d17a1ad9dff15b51740893d811b61312609b7
|
[
"BSD-3-Clause"
] | 1
|
2016-05-18T22:04:26.000Z
|
2016-05-18T22:04:26.000Z
|
analysisstore/test/test_api_smoke.py
|
JunAishima/analysisstore
|
d38d17a1ad9dff15b51740893d811b61312609b7
|
[
"BSD-3-Clause"
] | 15
|
2015-10-16T19:50:34.000Z
|
2022-01-27T23:19:28.000Z
|
analysisstore/test/test_api_smoke.py
|
JunAishima/analysisstore
|
d38d17a1ad9dff15b51740893d811b61312609b7
|
[
"BSD-3-Clause"
] | 7
|
2015-10-28T18:48:33.000Z
|
2021-11-24T23:20:08.000Z
|
from ..client.commands import AnalysisClient
def test_client_api():
cli = AnalysisClient
| 15.833333
| 44
| 0.768421
| 11
| 95
| 6.454545
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.157895
| 95
| 5
| 45
| 19
| 0.8875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
85035d9092c4d2ae1d7fc2010d0e75ccb767ccd6
| 96
|
py
|
Python
|
addresses/admin.py
|
DKMDebugin/ecommerce
|
427d18f19cabd128fe21c716d965e85b8e91a169
|
[
"MIT"
] | null | null | null |
addresses/admin.py
|
DKMDebugin/ecommerce
|
427d18f19cabd128fe21c716d965e85b8e91a169
|
[
"MIT"
] | null | null | null |
addresses/admin.py
|
DKMDebugin/ecommerce
|
427d18f19cabd128fe21c716d965e85b8e91a169
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from .models import Addresses
admin.site.register(Addresses)
| 16
| 32
| 0.822917
| 13
| 96
| 6.076923
| 0.692308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.114583
| 96
| 5
| 33
| 19.2
| 0.929412
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
852662684c00e2024b215119e385ce6dedf675ec
| 12,945
|
py
|
Python
|
benchmarks/cifar_exp/plot_time_space.py
|
KhelmholtzR/ProgLearn
|
f5177c720e53d2f5936272998b94e0746135a3b9
|
[
"MIT"
] | 18
|
2020-05-17T21:56:36.000Z
|
2020-09-18T17:39:26.000Z
|
benchmarks/cifar_exp/plot_time_space.py
|
KhelmholtzR/ProgLearn
|
f5177c720e53d2f5936272998b94e0746135a3b9
|
[
"MIT"
] | 209
|
2020-06-05T19:08:51.000Z
|
2020-10-03T16:49:39.000Z
|
benchmarks/cifar_exp/plot_time_space.py
|
KhelmholtzR/ProgLearn
|
f5177c720e53d2f5936272998b94e0746135a3b9
|
[
"MIT"
] | 33
|
2020-06-10T23:12:09.000Z
|
2020-09-28T05:09:44.000Z
|
#%%
import pickle
import matplotlib.pyplot as plt
from matplotlib import rcParams
rcParams.update({"figure.autolayout": True})
import numpy as np
from itertools import product
import seaborn as sns
### MAIN HYPERPARAMS ###
ntrees = 10
slots = 1
shifts = 6
task_num = 10
model = "uf"
########################
#%%
def unpickle(file):
with open(file, "rb") as fo:
dict = pickle.load(fo, encoding="bytes")
return dict
def get_fte_bte(err, single_err, ntrees):
bte = [[] for i in range(10)]
te = [[] for i in range(10)]
fte = []
for i in range(10):
for j in range(i, 10):
# print(err[j][i],j,i)
bte[i].append(err[i][i] / err[j][i])
te[i].append(single_err[i] / err[j][i])
for i in range(10):
# print(single_err[i],err[i][i])
fte.append(single_err[i] / err[i][i])
return fte, bte, te
def calc_mean_bte(btes, task_num=10, reps=6):
mean_bte = [[] for i in range(task_num)]
for j in range(task_num):
tmp = 0
for i in range(reps):
tmp += np.array(btes[i][j])
tmp = tmp / reps
mean_bte[j].extend(tmp)
return mean_bte
def calc_mean_te(tes, task_num=10, reps=6):
mean_te = [[] for i in range(task_num)]
for j in range(task_num):
tmp = 0
for i in range(reps):
tmp += np.array(tes[i][j])
tmp = tmp / reps
mean_te[j].extend(tmp)
return mean_te
def calc_mean_fte(ftes, task_num=10, reps=6):
fte = np.asarray(ftes)
return list(np.mean(np.asarray(fte), axis=0))
def calc_mean_err(err, task_num=10, reps=6):
mean_err = [[] for i in range(task_num)]
for j in range(task_num):
tmp = 0
for i in range(reps):
tmp += np.array(err[i][j])
tmp = tmp / reps
# print(tmp)
mean_err[j].extend([tmp])
return mean_err
def calc_mean_multitask_time(multitask_time, task_num=10, reps=6):
mean_multitask_time = [[] for i in range(task_num)]
for j in range(task_num):
tmp = 0
for i in range(reps):
tmp += np.array(multitask_time[i][j])
tmp = tmp / reps
# print(tmp)
mean_multitask_time[j].extend([tmp])
return mean_multitask_time
def calc_mean_multitask_space(multitask_space, task_num=10, reps=6):
mean_multitask_space = [[] for i in range(task_num)]
for j in range(task_num):
tmp = 0
for i in range(reps):
tmp += np.array(multitask_space[i][j])
tmp = tmp / reps
# print(tmp)
mean_multitask_space[j].extend([tmp])
return mean_multitask_space
#%%
reps = slots * shifts
btes = [[] for i in range(task_num)]
ftes = [[] for i in range(task_num)]
tes = [[] for i in range(task_num)]
err_ = [[] for i in range(task_num)]
te_tmp = [[] for _ in range(reps)]
bte_tmp = [[] for _ in range(reps)]
fte_tmp = [[] for _ in range(reps)]
err_tmp = [[] for _ in range(reps)]
train_time_tmp = [[] for _ in range(reps)]
single_task_inference_time_tmp = [[] for _ in range(reps)]
multitask_inference_time_tmp = [[] for _ in range(reps)]
multitask_inference_space_tmp = [[] for _ in range(reps)]
count = 0
for slot in range(slots):
for shift in range(shifts):
filename = (
"result/result/increased_sample_"
+ model
+ str(ntrees)
+ "_"
+ str(shift + 1)
+ "_"
+ str(slot)
+ ".pickle"
)
multitask_df, single_task_df = unpickle(filename)
err = [[] for _ in range(10)]
multitask_inference_times = [[] for _ in range(10)]
for ii in range(10):
err[ii].extend(
1
- np.array(
multitask_df[multitask_df["base_task"] == ii + 1]["accuracy"]
)
)
multitask_inference_times[ii].extend(
np.array(
multitask_df[multitask_df["base_task"] == ii + 1][
"multitask_inference_times"
]
)
)
single_err = 1 - np.array(single_task_df["accuracy"])
fte, bte, te = get_fte_bte(err, single_err, ntrees)
err_ = [[] for i in range(task_num)]
for i in range(task_num):
for j in range(task_num - i):
# print(err[i+j][i])
err_[i].append(err[i + j][i])
train_time_tmp[count].extend(np.array(single_task_df["train_times"]))
single_task_inference_time_tmp[count].extend(
np.array(single_task_df["single_task_inference_times"])
)
multitask_inference_time_tmp[count].extend(multitask_inference_times)
multitask_inference_space_tmp[count].extend(
np.array(single_task_df["model_size"]) / 1024
)
te_tmp[count].extend(te)
bte_tmp[count].extend(bte)
fte_tmp[count].extend(fte)
err_tmp[count].extend(err_)
count += 1
te = calc_mean_te(te_tmp, reps=reps)
bte = calc_mean_bte(bte_tmp, reps=reps)
fte = calc_mean_fte(fte_tmp, reps=reps)
error = calc_mean_err(err_tmp, reps=reps)
train_time = np.mean(train_time_tmp, axis=0)
single_task_inference_time = np.mean(single_task_inference_time_tmp, axis=0)
multitask_inference_time = calc_mean_multitask_time(multitask_inference_time_tmp)
multitask_inference_time = [
np.mean(multitask_inference_time[i]) for i in range(len(multitask_inference_time))
]
multitask_inference_space = calc_mean_multitask_space(multitask_inference_space_tmp)
#%%
btes = [[] for i in range(task_num)]
ftes = [[] for i in range(task_num)]
tes = [[] for i in range(task_num)]
err_ = [[] for i in range(task_num)]
te_tmp = [[] for _ in range(reps)]
bte_tmp = [[] for _ in range(reps)]
fte_tmp = [[] for _ in range(reps)]
err_tmp = [[] for _ in range(reps)]
train_time_tmp = [[] for _ in range(reps)]
single_task_inference_time_tmp = [[] for _ in range(reps)]
multitask_inference_time_tmp = [[] for _ in range(reps)]
multitask_inference_space_tmp = [[] for _ in range(reps)]
count = 0
for slot in range(slots):
for shift in range(shifts):
filename = (
"result/result/increased_sample_dnn0"
+ "_"
+ str(shift + 1)
+ "_"
+ str(slot)
+ ".pickle"
)
multitask_df, single_task_df = unpickle(filename)
err = [[] for _ in range(10)]
multitask_inference_times = [[] for _ in range(10)]
for ii in range(10):
err[ii].extend(
1
- np.array(
multitask_df[multitask_df["base_task"] == ii + 1]["accuracy"]
)
)
multitask_inference_times[ii].extend(
np.array(
multitask_df[multitask_df["base_task"] == ii + 1][
"multitask_inference_times"
]
)
)
single_err = 1 - np.array(single_task_df["accuracy"])
fte, bte, te = get_fte_bte(err, single_err, ntrees)
err_ = [[] for i in range(task_num)]
for i in range(task_num):
for j in range(task_num - i):
# print(err[i+j][i])
err_[i].append(err[i + j][i])
train_time_tmp[count].extend(np.array(single_task_df["train_times"]))
single_task_inference_time_tmp[count].extend(
np.array(single_task_df["single_task_inference_times"])
)
multitask_inference_time_tmp[count].extend(multitask_inference_times)
multitask_inference_space_tmp[count].extend(
np.array(single_task_df["model_size"]) / 1024
)
te_tmp[count].extend(te)
bte_tmp[count].extend(bte)
fte_tmp[count].extend(fte)
err_tmp[count].extend(err_)
count += 1
te_ = calc_mean_te(te_tmp, reps=reps)
bte_ = calc_mean_bte(bte_tmp, reps=reps)
fte_ = calc_mean_fte(fte_tmp, reps=reps)
error_ = calc_mean_err(err_tmp, reps=reps)
train_time_ = np.mean(train_time_tmp, axis=0)
single_task_inference_time_ = np.mean(single_task_inference_time_tmp, axis=0)
multitask_inference_time_ = calc_mean_multitask_time(multitask_inference_time_tmp)
multitask_inference_time_ = [
np.mean(multitask_inference_time_[i]) for i in range(len(multitask_inference_time_))
]
multitask_inference_space_ = calc_mean_multitask_space(multitask_inference_space_tmp)
#%%
sns.set_context("talk")
n_tasks = 10
clr = ["#e41a1c", "#a65628", "#377eb8", "#4daf4a", "#984ea3", "#ff7f00", "#CCCC00"]
# c = sns.color_palette(clr, n_colors=len(clr))
fontsize = 22
ticksize = 20
fig, ax = plt.subplots(3, 2, figsize=(24, 15))
# fig.suptitle('ntrees = '+str(ntrees),fontsize=25)
ax[0][0].plot(
np.arange(1, n_tasks + 1),
fte,
label="L2F",
c="red",
marker=".",
markersize=14,
linewidth=3,
)
ax[0][0].plot(
np.arange(1, n_tasks + 1),
fte_,
label="L2N",
c="blue",
marker=".",
markersize=14,
linewidth=3,
)
ax[0][0].hlines(1, 1, n_tasks, colors="grey", linestyles="dashed", linewidth=1.5)
ax[0][0].tick_params(labelsize=ticksize)
ax[0][0].set_xlabel("Number of tasks seen", fontsize=fontsize)
ax[0][0].set_ylabel("FTE", fontsize=fontsize)
ax[0][0].legend(fontsize=22)
for i in range(n_tasks):
et = np.asarray(bte[i])
et_ = np.asarray(bte_[i])
ns = np.arange(i + 1, n_tasks + 1)
ax[0][1].plot(ns, et, c="red", label="L2F", linewidth=2.6)
ax[0][1].plot(ns, et_, c="blue", label="L2N", linewidth=2.6)
ax[0][1].set_xlabel("Number of tasks seen", fontsize=fontsize)
ax[0][1].set_ylabel("BTE", fontsize=fontsize)
# ax[0][1].set_xticks(np.arange(1,10))
ax[0][1].tick_params(labelsize=ticksize)
ax[0][1].hlines(1, 1, n_tasks, colors="grey", linestyles="dashed", linewidth=1.5)
for i in range(n_tasks):
et = np.asarray(te[i])
et_ = np.asarray(te_[i])
ns = np.arange(i + 1, n_tasks + 1)
ax[1][0].plot(ns, et, c="red", linewidth=2.6)
ax[1][0].plot(ns, et_, c="blue", linewidth=2.6)
ax[1][0].set_xlabel("Number of tasks seen", fontsize=fontsize)
ax[1][0].set_ylabel("Transfer Efficiency", fontsize=fontsize)
# ax[1][0].set_xticks(np.arange(1,10))
ax[1][0].tick_params(labelsize=ticksize)
ax[1][0].hlines(1, 1, n_tasks, colors="grey", linestyles="dashed", linewidth=1.5)
"""for rep in range(reps):
_, single_task_df = unpickle('./result/'+model+str(ntrees)+'__'+str(rep+1)+'.pickle')
single_err = 1 - np.array(single_task_df['accuracy'])
for i in range(n_tasks):
et = np.asarray(err_tmp[rep][i])
ns = np.arange(i + 1, n_tasks + 1)
ax[1][1].plot(i+1, 1-single_err[i], marker='o',c=c[rep])
if i==0:
ax[1][1].plot(ns, 1-et, c=c[rep], label='rep '+str(rep+1) ,linewidth = 2.6)
else:
ax[1][1].plot(ns, 1-et, c=c[rep], linewidth = 2.6)
"""
for i in range(n_tasks):
et = np.asarray(error[i][0])
et_ = np.asarray(error_[i][0])
ns = np.arange(i + 1, n_tasks + 1)
ax[1][1].plot(ns, 1 - et, c="red", linewidth=2.6)
ax[1][1].plot(ns, 1 - et_, c="blue", linewidth=2.6)
# ax[1][1].legend(loc='center left', bbox_to_anchor=(1, 0.5), fontsize=22)
ax[1][1].set_xlabel("Number of tasks seen", fontsize=fontsize)
ax[1][1].set_ylabel("Accuracy", fontsize=fontsize)
# ax[1][1].set_yticks([.4,.6,.8,.9,1, 1.1,1.2])
# ax[1][1].set_xticks(np.arange(1,10))
# ax[1][1].set_ylim(0.89, 1.15)
ax[1][1].tick_params(labelsize=ticksize)
ax[2][0].plot(
range(1, len(multitask_inference_time) + 1),
multitask_inference_time / multitask_inference_time[0],
c="red",
linewidth=3,
linestyle="solid",
label="Multi-Task Inference Time",
)
ax[2][0].plot(
range(1, len(multitask_inference_time_) + 1),
multitask_inference_time_ / multitask_inference_time_[0],
c="blue",
linewidth=3,
linestyle="solid",
label="Multi-Task Inference Time",
)
ax[2][0].set_yscale("log")
ax[2][0].set_xlabel("Number of Tasks Seen", fontsize=fontsize)
ax[2][0].set_ylabel("Time (seconds)", fontsize=fontsize)
ax[2][0].tick_params(labelsize=ticksize)
# plt.savefig('./result/figs/fig_trees'+str(ntrees)+"__"+model+'.pdf',dpi=300)
# plt.close()
ax[2][1].plot(
range(1, len(multitask_inference_space) + 1),
np.array(multitask_inference_space) / multitask_inference_space[0],
c="red",
linewidth=3,
linestyle="solid",
label="Multi-Task Inference Time",
)
ax[2][1].plot(
range(1, len(multitask_inference_space_) + 1),
np.array(multitask_inference_space_) / multitask_inference_space_[0],
c="blue",
linewidth=3,
linestyle="solid",
label="Multi-Task Inference Time",
)
ax[2][1].set_yscale("log")
ax[2][1].set_xlabel("Number of Tasks Seen", fontsize=fontsize)
ax[2][1].set_ylabel("Size of the model (kB)", fontsize=fontsize)
ax[2][1].tick_params(labelsize=ticksize)
plt.savefig("./result/figs/space_time_efficiency2.pdf")
# %%
| 29.622426
| 89
| 0.609193
| 1,947
| 12,945
| 3.823318
| 0.094504
| 0.063004
| 0.025793
| 0.047286
| 0.838393
| 0.787614
| 0.731327
| 0.715341
| 0.669264
| 0.640785
| 0
| 0.032141
| 0.233295
| 12,945
| 436
| 90
| 29.690367
| 0.717884
| 0.046273
| 0
| 0.498423
| 0
| 0
| 0.069664
| 0.017885
| 0
| 0
| 0
| 0
| 0
| 1
| 0.025237
| false
| 0
| 0.018927
| 0
| 0.069401
| 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
|
852a65045e396235f50c4184e16172c4412e3463
| 741
|
py
|
Python
|
detection/export/persistence.py
|
adamivora/ecg_arrhythmia_classification
|
70f9a79c45c5b0315b496057dd8be6cf1f57b66a
|
[
"MIT"
] | 3
|
2020-07-19T07:01:36.000Z
|
2021-12-06T06:29:54.000Z
|
detection/export/persistence.py
|
adamivora/ecg_arrhythmia_classification
|
70f9a79c45c5b0315b496057dd8be6cf1f57b66a
|
[
"MIT"
] | null | null | null |
detection/export/persistence.py
|
adamivora/ecg_arrhythmia_classification
|
70f9a79c45c5b0315b496057dd8be6cf1f57b66a
|
[
"MIT"
] | null | null | null |
from os import path
from detection.utils.filesystem import ensure_directory_exists
def trained_model_exists(model, dataset, models_dir):
return path.isfile(get_model_fullname(model, dataset, models_dir))
def get_model_fullname(model, dataset, models_dir):
return path.join(models_dir, f'{dataset.name()}_{model.name()}.gz')
def save_model(model, dataset, models_dir):
ensure_directory_exists(models_dir)
model.save(get_model_fullname(model, dataset, models_dir))
def load_model(model, dataset, models_dir):
try:
return model.load(get_model_fullname(model, dataset, models_dir))
except Exception as e:
print(f'[ERROR] Cannot load trained model. Original exception: {e}.')
return model
| 29.64
| 77
| 0.748988
| 104
| 741
| 5.086538
| 0.336538
| 0.153119
| 0.238185
| 0.277883
| 0.466919
| 0.36862
| 0.291115
| 0.151229
| 0
| 0
| 0
| 0
| 0.149798
| 741
| 24
| 78
| 30.875
| 0.839683
| 0
| 0
| 0
| 0
| 0
| 0.125506
| 0.045884
| 0
| 0
| 0
| 0
| 0
| 1
| 0.266667
| false
| 0
| 0.133333
| 0.133333
| 0.666667
| 0.066667
| 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
|
5187febde7b45a31670d5effdc737b237081210c
| 115
|
py
|
Python
|
build/firefox_dev.py
|
geajack/Language-Assistant
|
63c5b12383ab2324799d15d14460f5fe8ef4da66
|
[
"MIT"
] | 19
|
2018-07-27T17:31:14.000Z
|
2022-03-19T12:48:28.000Z
|
build/firefox_dev.py
|
geajack/Language-Assistant
|
63c5b12383ab2324799d15d14460f5fe8ef4da66
|
[
"MIT"
] | 15
|
2018-07-28T23:02:50.000Z
|
2021-03-18T03:57:01.000Z
|
build/firefox_dev.py
|
geajack/Language-Assistant
|
63c5b12383ab2324799d15d14460f5fe8ef4da66
|
[
"MIT"
] | 6
|
2018-08-16T15:26:20.000Z
|
2021-03-18T04:43:17.000Z
|
from build import copy
if __name__ == "__main__":
copy("manifest-firefox-dev.json", "../Builds/2/Development")
| 28.75
| 64
| 0.704348
| 15
| 115
| 4.866667
| 0.933333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.009901
| 0.121739
| 115
| 4
| 64
| 28.75
| 0.712871
| 0
| 0
| 0
| 0
| 0
| 0.482759
| 0.413793
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
51bc00c04ccbc14cab06954798f8d4610d1c8691
| 170
|
py
|
Python
|
auditinater/views.py
|
uktrade/auditinater
|
405042c3bfa1fa00136e095d61baf267be35a02d
|
[
"MIT"
] | null | null | null |
auditinater/views.py
|
uktrade/auditinater
|
405042c3bfa1fa00136e095d61baf267be35a02d
|
[
"MIT"
] | 3
|
2021-06-29T15:05:17.000Z
|
2021-09-23T16:32:21.000Z
|
auditinater/views.py
|
uktrade/auditinater
|
405042c3bfa1fa00136e095d61baf267be35a02d
|
[
"MIT"
] | null | null | null |
from django.http import HttpResponse
def index(request):
"""A super basic site root rather than 400 bad request.
"""
return HttpResponse("🚀 auditinater 🚀")
| 21.25
| 59
| 0.694118
| 23
| 170
| 5.217391
| 0.869565
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.022222
| 0.205882
| 170
| 7
| 60
| 24.285714
| 0.851852
| 0.305882
| 0
| 0
| 0
| 0
| 0.140187
| 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
|
51c81999313b3167ce12a75f00cbbb45606e01a3
| 232
|
py
|
Python
|
ileco1_fin/ileco1_fin/doctype/voucher_legacy_series/test_voucher_legacy_series.py
|
josephalbaph/ileco1_fin
|
a0d2e332da59500306631dd671a0f00d52354901
|
[
"MIT"
] | null | null | null |
ileco1_fin/ileco1_fin/doctype/voucher_legacy_series/test_voucher_legacy_series.py
|
josephalbaph/ileco1_fin
|
a0d2e332da59500306631dd671a0f00d52354901
|
[
"MIT"
] | null | null | null |
ileco1_fin/ileco1_fin/doctype/voucher_legacy_series/test_voucher_legacy_series.py
|
josephalbaph/ileco1_fin
|
a0d2e332da59500306631dd671a0f00d52354901
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
# Copyright (c) 2020, Joseph Marie M. Alba and Contributors
# See license.txt
from __future__ import unicode_literals
# import frappe
import unittest
class TestVoucherLegacySeries(unittest.TestCase):
pass
| 21.090909
| 59
| 0.767241
| 29
| 232
| 5.965517
| 0.896552
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.025126
| 0.142241
| 232
| 10
| 60
| 23.2
| 0.844221
| 0.469828
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.25
| 0.5
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
|
0
| 5
|
cf8d2c50821700327a107004b70beaaac97f89fd
| 235
|
py
|
Python
|
app/views/sobre.py
|
yasminbraga/ufopa-reports
|
6d8b213eb0dfce6775d0bb0fd277e8dc09da041c
|
[
"MIT"
] | null | null | null |
app/views/sobre.py
|
yasminbraga/ufopa-reports
|
6d8b213eb0dfce6775d0bb0fd277e8dc09da041c
|
[
"MIT"
] | null | null | null |
app/views/sobre.py
|
yasminbraga/ufopa-reports
|
6d8b213eb0dfce6775d0bb0fd277e8dc09da041c
|
[
"MIT"
] | 2
|
2019-11-24T13:30:35.000Z
|
2022-01-12T11:47:11.000Z
|
from flask import Blueprint, render_template
sobre_bp = Blueprint('sobre',
__name__,
url_prefix='/')
@sobre_bp.route('/sobre')
def index_sobre():
return render_template('sobre/index.html')
| 23.5
| 46
| 0.621277
| 26
| 235
| 5.230769
| 0.615385
| 0.205882
| 0.279412
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.259574
| 235
| 9
| 47
| 26.111111
| 0.781609
| 0
| 0
| 0
| 0
| 0
| 0.119149
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.142857
| false
| 0
| 0.142857
| 0.142857
| 0.428571
| 0.285714
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 5
|
cf8fff7602243de743b3fd76aef7ff324282e396
| 356
|
py
|
Python
|
testing/regression/mcas/argparse_cfg_mapstore.py
|
omriarad/mcas
|
f47aab12754c91ebd75b0e1881c8a7cc7aa81278
|
[
"Apache-2.0"
] | 60
|
2020-04-28T08:15:07.000Z
|
2022-03-08T10:35:15.000Z
|
testing/regression/mcas/argparse_cfg_mapstore.py
|
omriarad/mcas
|
f47aab12754c91ebd75b0e1881c8a7cc7aa81278
|
[
"Apache-2.0"
] | 66
|
2020-09-03T23:40:48.000Z
|
2022-03-07T20:34:52.000Z
|
testing/regression/mcas/argparse_cfg_mapstore.py
|
omriarad/mcas
|
f47aab12754c91ebd75b0e1881c8a7cc7aa81278
|
[
"Apache-2.0"
] | 13
|
2019-11-02T06:30:36.000Z
|
2022-01-26T01:56:42.000Z
|
#!/usr/bin/python3
from argparse_cfg_ipaddr import argparse_cfg_ipaddr
class argparse_cfg_mapstore(argparse_cfg_ipaddr):
def __init__(self, description='Generate a JSON document for mapstore testing.'):
argparse_cfg_ipaddr.__init__(self, description)
self.add_argument("--core", type=int, default=0, help="base of CPUs cores to use")
| 39.555556
| 90
| 0.764045
| 50
| 356
| 5.06
| 0.68
| 0.217391
| 0.268775
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.006515
| 0.13764
| 356
| 8
| 91
| 44.5
| 0.81759
| 0.047753
| 0
| 0
| 1
| 0
| 0.227811
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.2
| 0
| 0.6
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
cfcf99dad78a7cf4f5197f791a6f5eebf63ffe2f
| 226
|
py
|
Python
|
esg_leipzig_homepage_2015/context_processors.py
|
ESG-Leipzig/Homepage-2015
|
6b77451881031dcb640d2e61ce862617d634f9ac
|
[
"MIT"
] | null | null | null |
esg_leipzig_homepage_2015/context_processors.py
|
ESG-Leipzig/Homepage-2015
|
6b77451881031dcb640d2e61ce862617d634f9ac
|
[
"MIT"
] | 4
|
2015-03-31T22:37:09.000Z
|
2015-10-22T21:37:17.000Z
|
esg_leipzig_homepage_2015/context_processors.py
|
ESG-Leipzig/Homepage-2015
|
6b77451881031dcb640d2e61ce862617d634f9ac
|
[
"MIT"
] | 3
|
2015-02-03T10:23:24.000Z
|
2018-04-11T12:29:23.000Z
|
from .models import FlatPage
def flatpages(request):
"""
Adds a queryset of all root flatpages (without parents) to the template
context.
"""
return {'flatpages': FlatPage.objects.filter(parent_id=None)}
| 22.6
| 75
| 0.69469
| 28
| 226
| 5.571429
| 0.892857
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.20354
| 226
| 9
| 76
| 25.111111
| 0.866667
| 0.353982
| 0
| 0
| 0
| 0
| 0.071429
| 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
|
cfd136a26576b089e4d815b1cc817883629e1405
| 817
|
py
|
Python
|
src/dot/entities/dotheart.py
|
alisonbento/steering-all
|
99797f99180dd64189ea5ed85ff71b66bfd9cf6f
|
[
"MIT"
] | 3
|
2016-10-10T18:34:55.000Z
|
2017-08-02T15:18:28.000Z
|
src/dot/entities/dotheart.py
|
alisonbento/steering-all
|
99797f99180dd64189ea5ed85ff71b66bfd9cf6f
|
[
"MIT"
] | null | null | null |
src/dot/entities/dotheart.py
|
alisonbento/steering-all
|
99797f99180dd64189ea5ed85ff71b66bfd9cf6f
|
[
"MIT"
] | null | null | null |
import src.dot.dotentity
class DotHeart(src.dot.dotentity.DotEntity):
def __init__(self):
res = [
"assets/img/red-brick.png",
"assets/img/black-brick.png"
]
grid = [
[0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0],
[0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0],
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
[0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0],
[0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0],
[0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0],
[0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0]
]
src.dot.dotentity.DotEntity.__init__(self, grid, res)
def setSmall(self):
self.setDotScale(0.5)
def setMedium(self):
self.setDotScale(0.75)
def setLarge(self):
self.setDotScale(1)
| 23.342857
| 57
| 0.455324
| 163
| 817
| 2.233129
| 0.153374
| 0.32967
| 0.42033
| 0.483516
| 0.302198
| 0.302198
| 0.288462
| 0.288462
| 0.28022
| 0.25
| 0
| 0.207513
| 0.315789
| 817
| 34
| 58
| 24.029412
| 0.443649
| 0
| 0
| 0.115385
| 0
| 0
| 0.0612
| 0.0612
| 0
| 0
| 0
| 0
| 0
| 1
| 0.153846
| false
| 0
| 0.038462
| 0
| 0.230769
| 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
|
5c6a08aa00deddeab8243da9b32381db956dab0c
| 4,960
|
py
|
Python
|
src/genie/libs/parser/iosxe/tests/ShowIpv6PimNeighborDetail/cli/equal/golden_output_expected.py
|
balmasea/genieparser
|
d1e71a96dfb081e0a8591707b9d4872decd5d9d3
|
[
"Apache-2.0"
] | 204
|
2018-06-27T00:55:27.000Z
|
2022-03-06T21:12:18.000Z
|
src/genie/libs/parser/iosxe/tests/ShowIpv6PimNeighborDetail/cli/equal/golden_output_expected.py
|
balmasea/genieparser
|
d1e71a96dfb081e0a8591707b9d4872decd5d9d3
|
[
"Apache-2.0"
] | 468
|
2018-06-19T00:33:18.000Z
|
2022-03-31T23:23:35.000Z
|
src/genie/libs/parser/iosxe/tests/ShowIpv6PimNeighborDetail/cli/equal/golden_output_expected.py
|
balmasea/genieparser
|
d1e71a96dfb081e0a8591707b9d4872decd5d9d3
|
[
"Apache-2.0"
] | 309
|
2019-01-16T20:21:07.000Z
|
2022-03-30T12:56:41.000Z
|
expected_output = {
"vrf": {
"default": {
"interfaces": {
"Port-channel1.100": {
"address_family": {
"ipv6": {
"neighbors": {
"secondary_address": ["2001::1:1"],
"FE80::21A:30FF:FE47:6EC0": {
"up_time": "3w3d",
"dr_priority": 1,
"expiration": "00:01:37",
"interface": "Port-channel1.100",
"genid_capable": True,
"bidir_capable": True,
},
}
}
}
},
"Port-channel1.101": {
"address_family": {
"ipv6": {
"neighbors": {
"secondary_address": ["2001:1::1:1"],
"FE80::21A:30FF:FE47:6EC0": {
"up_time": "3w3d",
"dr_priority": 1,
"expiration": "00:01:38",
"interface": "Port-channel1.101",
"genid_capable": True,
"bidir_capable": True,
},
}
}
}
},
"GigabitEthernet0/2/3.100": {
"address_family": {
"ipv6": {
"neighbors": {
"secondary_address": ["2001::4:2"],
"FE80::2D7:8FFF:FECB:8602": {
"up_time": "3w3d",
"designated_router": True,
"dr_priority": 1,
"expiration": "00:01:25",
"interface": "GigabitEthernet0/2/3.100",
"genid_capable": True,
"bidir_capable": True,
},
}
}
}
},
"GigabitEthernet0/2/0.101": {
"address_family": {
"ipv6": {
"neighbors": {
"FE80::21A:30FF:FE47:6E01": {
"up_time": "3w3d",
"dr_priority": 1,
"expiration": "00:01:24",
"interface": "GigabitEthernet0/2/0.101",
"genid_capable": True,
"bidir_capable": True,
},
"secondary_address": ["2001:1::1"],
}
}
}
},
"GigabitEthernet0/2/3.101": {
"address_family": {
"ipv6": {
"neighbors": {
"secondary_address": ["2001:1::4:2"],
"FE80::2D7:8FFF:FECB:8602": {
"up_time": "3w3d",
"designated_router": True,
"dr_priority": 1,
"expiration": "00:01:42",
"interface": "GigabitEthernet0/2/3.101",
"genid_capable": True,
"bidir_capable": True,
},
}
}
}
},
"GigabitEthernet0/2/0.100": {
"address_family": {
"ipv6": {
"neighbors": {
"FE80::21A:30FF:FE47:6E01": {
"up_time": "3w3d",
"dr_priority": 1,
"expiration": "00:01:33",
"interface": "GigabitEthernet0/2/0.100",
"genid_capable": True,
"bidir_capable": True,
},
"secondary_address": ["2001::1"],
}
}
}
},
}
}
}
}
| 43.893805
| 76
| 0.244355
| 242
| 4,960
| 4.847107
| 0.214876
| 0.112532
| 0.086957
| 0.132992
| 0.796249
| 0.790281
| 0.790281
| 0.752771
| 0.70844
| 0.451833
| 0
| 0.128414
| 0.653024
| 4,960
| 112
| 77
| 44.285714
| 0.553167
| 0
| 0
| 0.446429
| 0
| 0
| 0.247581
| 0.067742
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 1
| 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
|
5c72bf022b5dbe080ddf71661592315dcdc57f9b
| 44
|
py
|
Python
|
__init__.py
|
nwu63/pyhyp
|
d29715f509c7c460d6705183301eda14da217755
|
[
"Apache-2.0"
] | null | null | null |
__init__.py
|
nwu63/pyhyp
|
d29715f509c7c460d6705183301eda14da217755
|
[
"Apache-2.0"
] | null | null | null |
__init__.py
|
nwu63/pyhyp
|
d29715f509c7c460d6705183301eda14da217755
|
[
"Apache-2.0"
] | null | null | null |
from .python.pyHyp import pyHyp, pyHypMulti
| 22
| 43
| 0.818182
| 6
| 44
| 6
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.113636
| 44
| 1
| 44
| 44
| 0.923077
| 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
|
5ce25790cfff82975729caf1a1e15b9d91ef1c58
| 211
|
py
|
Python
|
shortener_app.py
|
hedythedev/hello-flask
|
c196dd20133d96a994767def1ee79861e00df7a5
|
[
"MIT"
] | null | null | null |
shortener_app.py
|
hedythedev/hello-flask
|
c196dd20133d96a994767def1ee79861e00df7a5
|
[
"MIT"
] | null | null | null |
shortener_app.py
|
hedythedev/hello-flask
|
c196dd20133d96a994767def1ee79861e00df7a5
|
[
"MIT"
] | null | null | null |
from app import app, db
from app.models import ShortURL
from app.shortener import shorten
@app.shell_context_processor
def make_shell_context():
return {'db': db, 'ShortURL': ShortURL, 'shorten': shorten}
| 23.444444
| 63
| 0.763033
| 30
| 211
| 5.233333
| 0.466667
| 0.133758
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.137441
| 211
| 8
| 64
| 26.375
| 0.862637
| 0
| 0
| 0
| 0
| 0
| 0.080569
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| true
| 0
| 0.5
| 0.166667
| 0.833333
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 1
| 1
| 0
|
0
| 5
|
7a7836af1f65c9759c853fc6bda0becfafca30ff
| 802
|
py
|
Python
|
sdk/python/v0.1-rc.4/opentelematicsapi/controllers/__init__.py
|
nmfta-repo/nmfta-opentelematics-prototype
|
729e9391879e273545a4818558677b2e47261f08
|
[
"Apache-2.0"
] | 2
|
2021-12-15T08:37:03.000Z
|
2022-02-11T20:40:42.000Z
|
sdk/python/v0.1-rc.4/opentelematicsapi/controllers/__init__.py
|
nmfta-repo/nmfta-opentelematics-prototype
|
729e9391879e273545a4818558677b2e47261f08
|
[
"Apache-2.0"
] | 8
|
2019-12-04T22:56:46.000Z
|
2022-02-10T08:23:29.000Z
|
sdk/python/v0.1-rc.4/opentelematicsapi/controllers/__init__.py
|
nmfta-repo/nmfta-opentelematics-prototype
|
729e9391879e273545a4818558677b2e47261f08
|
[
"Apache-2.0"
] | null | null | null |
__all__ = [
'base_controller',
'open_telematics_data_model_controller',
'use_case_check_provider_state_of_health_controller',
'use_case_data_export_controller',
'use_case_driver_availability_controller',
'use_case_driver_route_directions_communication_controller',
'use_case_driver_route_directions_start_controller',
'use_case_driver_route_and_directions_done_controller',
'use_case_driver_messaging_by_geo_location_controller',
'use_case_vehicle_location_time_history_tracking_controller',
'use_case_human_resources_process_payroll_controller',
'use_case_carrier_custom_business_intelligence_controller',
'use_case_compliance_and_safety_monitoring_controller',
'use_case_in_field_maintenance_repair_controller',
'localization_controller',
]
| 47.176471
| 65
| 0.842893
| 94
| 802
| 6.319149
| 0.5
| 0.262626
| 0.343434
| 0.193603
| 0.175084
| 0.127946
| 0
| 0
| 0
| 0
| 0
| 0
| 0.097257
| 802
| 17
| 66
| 47.176471
| 0.820442
| 0
| 0
| 0
| 0
| 0
| 0.833126
| 0.814446
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 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
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
7a9168c22495440214de525928886eba9960f1ad
| 6,021
|
py
|
Python
|
tests/test_foss_cli_logger.py
|
thsetz/fossology-python
|
1c7394624f8bf2deb0aece6ef0db443cf10c791b
|
[
"MIT"
] | 12
|
2019-12-10T09:57:27.000Z
|
2022-01-05T19:09:34.000Z
|
tests/test_foss_cli_logger.py
|
thsetz/fossology-python
|
1c7394624f8bf2deb0aece6ef0db443cf10c791b
|
[
"MIT"
] | 66
|
2019-12-11T12:22:33.000Z
|
2022-03-01T02:53:09.000Z
|
tests/test_foss_cli_logger.py
|
thsetz/fossology-python
|
1c7394624f8bf2deb0aece6ef0db443cf10c791b
|
[
"MIT"
] | 9
|
2020-05-08T19:45:29.000Z
|
2022-01-05T19:09:24.000Z
|
__doc__ = """Test the logging of the foss_cli
foss_cli distinguishes the verbosity levels 0,1,2
defined in foss_cli.py
FOSS_LOGGING_MAP = {0: logging.WARNING, 1: logging.INFO, 2: logging.DEBUG}
and set with:
logger.setLevel(FOSS_LOGGING_MAP.get(verbose, logging.DEBUG))
in the cli main command.
The Log command uses:
Log --log-level 0 ==> logger.debug
Log --log-level 1 ==> logger.info
Log --log-level 2 ==> logger.warning
"""
import os
from fossology import foss_cli
TEST_MESSAGE = "This is a Test Message."
TEST_LOG_FILE_NAME = "my.log"
TEST_RESULT_DIR = "test_result_dir"
def test_with_verbosity_0(runner, click_test_dict):
# Should be seen on console
d = click_test_dict
result = runner.invoke(
foss_cli.cli,
["log", "--log_level", "2", "--message_text", TEST_MESSAGE],
obj=d,
)
assert result.exit_code == 0
assert TEST_MESSAGE in result.output
# Should not be seen on console
result = runner.invoke(
foss_cli.cli,
["log", "--log_level", "1", "--message_text", TEST_MESSAGE],
obj=d,
)
assert result.exit_code == 0
assert TEST_MESSAGE not in result.output
# Should not be seen on console
result = runner.invoke(
foss_cli.cli,
["log", "--log_level", "0", "--message_text", TEST_MESSAGE],
obj=d,
)
assert result.exit_code == 0
assert TEST_MESSAGE not in result.output
def test_with_verbosity_1(runner, click_test_dict):
# Should be seen on console
d = click_test_dict
result = runner.invoke(
foss_cli.cli,
["-v", "log", "--log_level", "2", "--message_text", TEST_MESSAGE],
obj=d,
)
assert result.exit_code == 0
assert TEST_MESSAGE in result.output
# Should be seen on console
result = runner.invoke(
foss_cli.cli,
["-v", "log", "--log_level", "1", "--message_text", TEST_MESSAGE],
obj=d,
)
assert result.exit_code == 0
assert TEST_MESSAGE in result.output
# Should not be seen on console
result = runner.invoke(
foss_cli.cli,
["-v", "log", "--log_level", "0", "--message_text", TEST_MESSAGE],
obj=d,
)
assert result.exit_code == 0
assert TEST_MESSAGE not in result.output
def test_with_verbosity_2(runner, click_test_dict):
# Should be seen on console
d = click_test_dict
result = runner.invoke(
foss_cli.cli,
["-vv", "log", "--log_level", "2", "--message_text", TEST_MESSAGE],
obj=d,
)
assert result.exit_code == 0
assert TEST_MESSAGE in result.output
# Should be seen on console
result = runner.invoke(
foss_cli.cli,
["-vv", "log", "--log_level", "1", "--message_text", TEST_MESSAGE],
obj=d,
)
assert result.exit_code == 0
assert TEST_MESSAGE in result.output
# Should be seen on console
result = runner.invoke(
foss_cli.cli,
["-vv", "log", "--log_level", "0", "--message_text", TEST_MESSAGE],
obj=d,
)
assert result.exit_code == 0
assert TEST_MESSAGE in result.output
# As console and filehandler work the same way corresponding to verbosity, it suffices to test the
# --log_to_file/log_file_name conceirning output to the correct file and dir.
def test_log_to_default_file(runner, click_test_dict):
d = click_test_dict
with runner.isolated_filesystem():
result = runner.invoke(
foss_cli.cli,
[
"--log_to_file",
"-vv",
"log",
"--log_level",
"2",
"--message_text",
TEST_MESSAGE,
],
obj=d,
)
assert result.exit_code == 0
filename = os.path.join(
foss_cli.DEFAULT_RESULT_DIR, foss_cli.DEFAULT_LOG_FILE_NAME
)
assert os.path.exists(filename)
assert TEST_MESSAGE in open(filename).read()
def test_log_to_userdefined_file(runner, click_test_dict):
d = click_test_dict
with runner.isolated_filesystem():
result = runner.invoke(
foss_cli.cli,
[
"--log_to_file",
"-vv",
"--log_file_name",
TEST_LOG_FILE_NAME,
"log",
"--log_level",
"2",
"--message_text",
TEST_MESSAGE,
],
obj=d,
)
assert result.exit_code == 0
filename = os.path.join(foss_cli.DEFAULT_RESULT_DIR, TEST_LOG_FILE_NAME)
assert os.path.isdir(foss_cli.DEFAULT_RESULT_DIR)
assert os.path.exists(filename)
assert TEST_MESSAGE in open(filename).read()
def test_log_to_userdefined_file_in_userdefined_result_dir(runner, click_test_dict):
d = click_test_dict
with runner.isolated_filesystem():
result = runner.invoke(
foss_cli.cli,
[
"--log_to_file",
"-vv",
"--result_dir",
TEST_RESULT_DIR,
"--log_file_name",
TEST_LOG_FILE_NAME,
"log",
"--log_level",
"2",
"--message_text",
TEST_MESSAGE,
],
obj=d,
)
assert result.exit_code == 0
filename = os.path.join(TEST_RESULT_DIR, TEST_LOG_FILE_NAME)
assert os.path.isdir(TEST_RESULT_DIR)
assert os.path.exists(filename)
assert TEST_MESSAGE in open(filename).read()
def test_debug_and_verbosity_is_captured_in_context(runner, click_test_dict):
with runner.isolated_filesystem():
d = click_test_dict
result = runner.invoke(foss_cli.cli, ["-vv", "--debug", "log",], obj=d,)
assert result.exit_code == 0
assert d["VERBOSE"] == 2
assert d["DEBUG"]
| 31.036082
| 99
| 0.575486
| 755
| 6,021
| 4.319205
| 0.117881
| 0.087703
| 0.050598
| 0.087703
| 0.788102
| 0.770316
| 0.766943
| 0.75437
| 0.744864
| 0.744864
| 0
| 0.009201
| 0.314067
| 6,021
| 193
| 100
| 31.196891
| 0.780387
| 0.070254
| 0
| 0.631902
| 0
| 0.006135
| 0.190297
| 0.008056
| 0
| 0
| 0
| 0
| 0.196319
| 1
| 0.042945
| false
| 0
| 0.01227
| 0
| 0.055215
| 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
|
7aa01b7d357773880cc674b1eee490211cd66efa
| 8,286
|
py
|
Python
|
US_Crime_Analytics/analysis/rates.py
|
salma-shaik/research-projects-new
|
3bc0efb58e18d13bb614ec48f139dfbac46e5904
|
[
"MIT"
] | null | null | null |
US_Crime_Analytics/analysis/rates.py
|
salma-shaik/research-projects-new
|
3bc0efb58e18d13bb614ec48f139dfbac46e5904
|
[
"MIT"
] | null | null | null |
US_Crime_Analytics/analysis/rates.py
|
salma-shaik/research-projects-new
|
3bc0efb58e18d13bb614ec48f139dfbac46e5904
|
[
"MIT"
] | null | null | null |
import pandas as pd
import numpy as np
main_df = pd.read_csv('/Users/salma/Studies/Research/Criminal_Justice/research_projects/US_Crime_Analytics/data/analysis/final_main.csv')
main_df['black_count_county'] = main_df[['blackmale_count_county', 'blackfemale_count_county']].sum(axis=1)
main_df['white_count_county'] = main_df[['whitemale_count_county', 'whitefemale_count_county']].sum(axis=1)
main_df['hispanic_count_county'] = main_df[['hispmale_count_county', 'hispfem_count_county']].sum(axis=1)
"""
Create rates for the below crime variables
murder
manslaughter
rape
robbery
gun_robbery
knife_robbery
aggravated_assault
gun_assault
knife_assault
simple_assault
burglary
larceny
auto_theft
officers_assaulted
officers_killed_by_felony
officers_killed_by_accident
total_crime
violent_crime
property_crime
crimes_against_officers
population - crime pop
"""
def create_rates(var_list, pop_var=None, var_group=None):
rate_multiplier = 10000
if var_group == 'crime':
rate_multiplier = 100000
for rate_var in var_list:
main_df[f'{rate_var}_rate'] = (main_df[f'{rate_var}']/main_df['population'])*rate_multiplier
# # Drop the crime count columns
# main_df.drop(var_list, axis=1, inplace=True)
# Create crime rates
crime_vars = ['murder', 'manslaughter', 'rape', 'robbery', 'gun_robbery', 'knife_robbery', 'aggravated_assault',
'gun_assault', 'knife_assault', 'simple_assault','burglary', 'larceny', 'auto_theft', 'officers_assaulted',
'officers_killed_by_felony','officers_killed_by_accident', 'total_crime', 'violent_crime','property_crime',
'crimes_against_officers']
create_rates(crime_vars, 'population', 'crime')
"""
Create rates for the below arrests variables
agg_assault_tot_arrests
agg_assault_tot_black
agg_assault_tot_white
all_other_tot_arrests
all_other_tot_black
all_other_tot_white
arson_tot_arrests
arson_tot_black
arson_tot_white
burglary_tot_arrests
burglary_tot_black
burglary_tot_white
mtr_veh_theft_tot_arrests
mtr_veh_theft_tot_black
mtr_veh_theft_tot_white
murder_tot_arrests
murder_tot_black
murder_tot_white
rape_tot_arrests
rape_tot_black
rape_tot_white
robbery_tot_arrests
robbery_tot_black
robbery_tot_white
sale_cannabis_tot_arrests
sale_cannabis_tot_black
sale_cannabis_tot_white
sale_drug_total_tot_arrests
sale_drug_total_tot_black
sale_drug_total_tot_white
weapons_tot_arrests
weapons_tot_black
weapons_tot_white
poss_cannabis_tot_arrests
poss_cannabis_tot_black
poss_cannabis_tot_white
poss_drug_total_tot_arrests
poss_drug_total_tot_black
poss_drug_total_tot_white
disorder_arrests_tot_index
disorder_arrests_black_index
disorder_arrests_white_index
larceny_theft_arrests_tot
larceny_theft_arrests_black
larceny_theft_arrests_white
arrests_vars = ['agg_assault_tot_arrests','agg_assault_tot_black','agg_assault_tot_white','all_other_tot_arrests','all_other_tot_black','all_other_tot_white',
'arson_tot_arrests','arson_tot_black','arson_tot_white','burglary_tot_arrests','burglary_tot_black','burglary_tot_white','mtr_veh_theft_tot_arrests',
'mtr_veh_theft_tot_black','mtr_veh_theft_tot_white','murder_tot_arrests','murder_tot_black','murder_tot_white','rape_tot_arrests','rape_tot_black',
'rape_tot_white','robbery_tot_arrests','robbery_tot_black','robbery_tot_white','sale_cannabis_tot_arrests','sale_cannabis_tot_black','sale_cannabis_tot_white',
'sale_drug_total_tot_arrests','sale_drug_total_tot_black','sale_drug_total_tot_white','weapons_tot_arrests','weapons_tot_black','weapons_tot_white',
'poss_cannabis_tot_arrests','poss_cannabis_tot_black','poss_cannabis_tot_white','poss_drug_total_tot_arrests','poss_drug_total_tot_black',
'poss_drug_total_tot_white','disorder_arrests_tot_index','disorder_arrests_black_index','disorder_arrests_white_index','larceny_theft_arrests_tot',
'larceny_theft_arrests_black','larceny_theft_arrests_white']
"""
"""
Create rates for the below arrests total variables
agg_assault_tot_arrests
all_other_tot_arrests
arson_tot_arrests
burglary_tot_arrests
mtr_veh_theft_tot_arrests
murder_tot_arrests
rape_tot_arrests
robbery_tot_arrests
sale_cannabis_tot_arrests
sale_drug_total_tot_arrests
weapons_tot_arrests
poss_cannabis_tot_arrests
poss_drug_total_tot_arrests
disorder_arrests_tot_index
larceny_theft_arrests_tot
"""
arrests_total_vars = ['agg_assault_tot_arrests','all_other_tot_arrests','arson_tot_arrests','burglary_tot_arrests','mtr_veh_theft_tot_arrests',
'murder_tot_arrests','rape_tot_arrests','robbery_tot_arrests','sale_cannabis_tot_arrests','sale_drug_total_tot_arrests',
'weapons_tot_arrests','poss_cannabis_tot_arrests','poss_drug_total_tot_arrests','disorder_arrests_tot_index','larceny_theft_arrests_tot']
create_rates(arrests_total_vars)
"""
Create rates for the below arrests black variables
agg_assault_tot_black
all_other_tot_black
arson_tot_black
burglary_tot_black
mtr_veh_theft_tot_black
murder_tot_black
rape_tot_black
robbery_tot_black
sale_cannabis_tot_black
sale_drug_total_tot_black
weapons_tot_black
poss_cannabis_tot_black
poss_drug_total_tot_black
disorder_arrests_black_index
larceny_theft_arrests_black
"""
main_df['drug_arrests_black'] = main_df[['sale_drug_total_tot_black', 'poss_drug_total_tot_black']].sum(axis=1)
arrests_black_vars = ['agg_assault_tot_black','all_other_tot_black','arson_tot_black','burglary_tot_black','mtr_veh_theft_tot_black',
'murder_tot_black','rape_tot_black','robbery_tot_black','drug_arrests_black','sale_cannabis_tot_black','sale_drug_total_tot_black',
'weapons_tot_black','poss_cannabis_tot_black','poss_drug_total_tot_black','disorder_arrests_black_index','larceny_theft_arrests_black']
# create_rates(arrests_black_vars, 'Black_count')
"""
Create rates for the below arrests white variables
agg_assault_tot_white
all_other_tot_white
arson_tot_white
burglary_tot_white
mtr_veh_theft_tot_white
murder_tot_white
rape_tot_white
robbery_tot_white
sale_cannabis_tot_white
sale_drug_total_tot_white
weapons_tot_white
poss_cannabis_tot_white
poss_drug_total_tot_white
disorder_arrests_white_index
larceny_theft_arrests_white
"""
main_df['drug_arrests_white'] = main_df[['sale_drug_total_tot_white', 'poss_drug_total_tot_white']].sum(axis=1)
arrests_white_vars = ['agg_assault_tot_white','all_other_tot_white','arson_tot_white','burglary_tot_white','mtr_veh_theft_tot_white',
'murder_tot_white','rape_tot_white','robbery_tot_white','drug_arrests_white','sale_cannabis_tot_white','sale_drug_total_tot_white',
'weapons_tot_white','poss_cannabis_tot_white','poss_drug_total_tot_white','disorder_arrests_white_index','larceny_theft_arrests_white']
# create_rates(arrests_white_vars, 'White_count')
"""
Create rates for the below incarceration variables
total_jail_pop
black_jail_pop
latino_jail_pop
white_jail_pop
total_prison_pop
black_prison_pop
latino_prison_pop
white_prison_pop
"""
#incarc_tot_vars = ['total_jail_pop', 'total_prison_pop']
# create_rates(incarc_tot_vars, 'county_pop_final')
#incarc_black_vars = ['black_jail_pop', 'black_prison_pop']
# create_rates(incarc_black_vars, 'black_count_county')
#incarc_white_vars = ['white_jail_pop', 'white_prison_pop']
# create_rates(incarc_white_vars, 'white_count_county')
#incarc_hispanic_vars = ['latino_jail_pop', 'latino_prison_pop']
# create_rates(incarc_hispanic_vars, 'hispanic_count_county')
# some populations are zero so divide by zero gets infinity so replace them with 0
main_df.replace(np.inf, 0, inplace=True)
main_df.to_csv('/Users/salma/Studies/Research/Criminal_Justice/research_projects/US_Crime_Analytics/data/analysis/final_main_rates.csv', index=False)
| 36.991071
| 175
| 0.779628
| 1,169
| 8,286
| 4.919589
| 0.103507
| 0.075117
| 0.058425
| 0.03895
| 0.790645
| 0.750304
| 0.717614
| 0.703008
| 0.69727
| 0.69727
| 0
| 0.002674
| 0.14253
| 8,286
| 223
| 176
| 37.156951
| 0.806756
| 0.087135
| 0
| 0
| 0
| 0.064516
| 0.609135
| 0.376183
| 0
| 0
| 0
| 0
| 0
| 1
| 0.032258
| false
| 0
| 0.064516
| 0
| 0.096774
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
7ab5932d1e1ea995a96efb7b3761f21b06e22c89
| 82
|
py
|
Python
|
__init__.py
|
ab-ten/tornado_graceful_terminator
|
5cd8884daff30c886611b55100e716a0f48bea63
|
[
"MIT"
] | null | null | null |
__init__.py
|
ab-ten/tornado_graceful_terminator
|
5cd8884daff30c886611b55100e716a0f48bea63
|
[
"MIT"
] | null | null | null |
__init__.py
|
ab-ten/tornado_graceful_terminator
|
5cd8884daff30c886611b55100e716a0f48bea63
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8-unix; -*-
from .graceful_terminator import GracefulTerminator
| 27.333333
| 51
| 0.743902
| 9
| 82
| 6.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.013699
| 0.109756
| 82
| 2
| 52
| 41
| 0.808219
| 0.329268
| 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
|
7ac003a7c676d6f65036601037593513dda53ad6
| 85
|
py
|
Python
|
aim/sdk/configs.py
|
fairhopeweb/aim
|
f17b309e0e415e8798b6330b9ee71436a1b3994e
|
[
"Apache-2.0"
] | null | null | null |
aim/sdk/configs.py
|
fairhopeweb/aim
|
f17b309e0e415e8798b6330b9ee71436a1b3994e
|
[
"Apache-2.0"
] | null | null | null |
aim/sdk/configs.py
|
fairhopeweb/aim
|
f17b309e0e415e8798b6330b9ee71436a1b3994e
|
[
"Apache-2.0"
] | null | null | null |
AIM_REPO_NAME = '.aim'
AIM_ENABLE_TRACKING_THREAD = '__AIM_ENABLE_TRACKING_THREAD__'
| 28.333333
| 61
| 0.847059
| 12
| 85
| 5
| 0.5
| 0.3
| 0.566667
| 0.766667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.070588
| 85
| 2
| 62
| 42.5
| 0.759494
| 0
| 0
| 0
| 0
| 0
| 0.4
| 0.352941
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.