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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c66fe287b8cf299dffd45d05bddb4674275ee88a
| 210
|
py
|
Python
|
microservices-test-roadmap.py
|
emmanuelneri/microservices-roadmap
|
4bdb041e6ad2abcfb258942e105ef14b7b1d3896
|
[
"Apache-2.0"
] | 6
|
2020-06-28T14:47:18.000Z
|
2022-01-16T03:47:56.000Z
|
microservices-test-roadmap.py
|
emmanuelneri/microservices-roadmap
|
4bdb041e6ad2abcfb258942e105ef14b7b1d3896
|
[
"Apache-2.0"
] | null | null | null |
microservices-test-roadmap.py
|
emmanuelneri/microservices-roadmap
|
4bdb041e6ad2abcfb258942e105ef14b7b1d3896
|
[
"Apache-2.0"
] | null | null | null |
from graphviz import Digraph
from model.test import Test
dot = Digraph(comment='Microservices Test Roadmap', format='png')
test = Test()
test.build(dot)
dot.render('images/microservices-test-roadmap.gv')
| 19.090909
| 65
| 0.757143
| 29
| 210
| 5.482759
| 0.551724
| 0.213836
| 0.301887
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.119048
| 210
| 10
| 66
| 21
| 0.859459
| 0
| 0
| 0
| 0
| 0
| 0.309524
| 0.171429
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
c6855b94a1f40f4bc55e37525615f0065b4af7ce
| 2,527
|
py
|
Python
|
stubs.min/System/Windows/__init___parts/FontSizeConverter.py
|
ricardyn/ironpython-stubs
|
4d2b405eda3ceed186e8adca55dd97c332c6f49d
|
[
"MIT"
] | 1
|
2021-02-02T13:39:16.000Z
|
2021-02-02T13:39:16.000Z
|
stubs.min/System/Windows/__init___parts/FontSizeConverter.py
|
hdm-dt-fb/ironpython-stubs
|
4d2b405eda3ceed186e8adca55dd97c332c6f49d
|
[
"MIT"
] | null | null | null |
stubs.min/System/Windows/__init___parts/FontSizeConverter.py
|
hdm-dt-fb/ironpython-stubs
|
4d2b405eda3ceed186e8adca55dd97c332c6f49d
|
[
"MIT"
] | null | null | null |
class FontSizeConverter(TypeConverter):
"""
Converts font size values to and from other type representations.
FontSizeConverter()
"""
def CanConvertFrom(self,*__args):
"""
CanConvertFrom(self: FontSizeConverter,context: ITypeDescriptorContext,sourceType: Type) -> bool
Determines if conversion from a specified type to a System.Double value is
possible.
context: Describes context information of a component such as its container and
System.ComponentModel.PropertyDescriptor.
sourceType: Identifies the data type to evaluate for purposes of conversion.
Returns: true if sourceType can be converted to System.Double; otherwise,false.
"""
pass
def CanConvertTo(self,*__args):
"""
CanConvertTo(self: FontSizeConverter,context: ITypeDescriptorContext,destinationType: Type) -> bool
Determines if conversion of a font size value to a specified type is possible.
context: Context information of a component such as its container and
System.ComponentModel.PropertyDescriptor.
destinationType: The data type to evaluate for purposes of conversion.
Returns: true if this type can be converted; otherwise,false.
"""
pass
def ConvertFrom(self,*__args):
"""
ConvertFrom(self: FontSizeConverter,context: ITypeDescriptorContext,culture: CultureInfo,value: object) -> object
Converts a specified type to a System.Double.
context: Context information of a component such as its container and
System.ComponentModel.PropertyDescriptor.
culture: Cultural specific information,including the writing system and calendar used.
value: The value which is being converted to a font size value.
Returns: A System.Double value that represents the converted font size value.
"""
pass
def ConvertTo(self,*__args):
"""
ConvertTo(self: FontSizeConverter,context: ITypeDescriptorContext,culture: CultureInfo,value: object,destinationType: Type) -> object
Converts a System.Double value to a specified type.
context: Context information of a component such as its container and
System.ComponentModel.PropertyDescriptor.
culture: Cultural specific information,including writing system and calendar used.
value: The System.Object being converted.
destinationType: The data type this font size value is being converted to.
Returns: A new System.Object that is the value of the conversion.
"""
pass
| 39.484375
| 137
| 0.73051
| 292
| 2,527
| 6.294521
| 0.253425
| 0.021763
| 0.060936
| 0.108814
| 0.526115
| 0.47062
| 0.47062
| 0.399891
| 0.313928
| 0.313928
| 0
| 0
| 0.208943
| 2,527
| 63
| 138
| 40.111111
| 0.91946
| 0.839731
| 0
| 0.444444
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.444444
| false
| 0.444444
| 0
| 0
| 0.555556
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
c6c8f0edf82c277ca1f8b18142689fa613d515ed
| 128
|
py
|
Python
|
kbsite/apps.py
|
PerpetuumCommunity/simplePostKB
|
f5afa9711bc9352d9032ede3e92d26bc088f1603
|
[
"MIT"
] | 1
|
2018-05-21T10:55:37.000Z
|
2018-05-21T10:55:37.000Z
|
kbsite/apps.py
|
PerpetuumCommunity/simplePostKB
|
f5afa9711bc9352d9032ede3e92d26bc088f1603
|
[
"MIT"
] | null | null | null |
kbsite/apps.py
|
PerpetuumCommunity/simplePostKB
|
f5afa9711bc9352d9032ede3e92d26bc088f1603
|
[
"MIT"
] | null | null | null |
from __future__ import unicode_literals
from django.apps import AppConfig
class KbsiteConfig(AppConfig):
name = 'kbsite'
| 16
| 39
| 0.789063
| 15
| 128
| 6.4
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.15625
| 128
| 7
| 40
| 18.285714
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0.046875
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
c6f65b9e07b7ff6559f5cbe3f6a12a8cdd142ab6
| 353
|
py
|
Python
|
tests/route_decorator/test_route_decorator.py
|
Bakhtiyar-Garashov/flake8-fastapi
|
81e774defcae377e77c1986ca780a922b27d2757
|
[
"MIT"
] | 20
|
2021-06-01T20:53:46.000Z
|
2022-01-29T21:35:46.000Z
|
tests/route_decorator/test_route_decorator.py
|
Bakhtiyar-Garashov/flake8-fastapi
|
81e774defcae377e77c1986ca780a922b27d2757
|
[
"MIT"
] | 13
|
2021-06-02T15:26:22.000Z
|
2021-07-25T13:27:59.000Z
|
tests/route_decorator/test_route_decorator.py
|
Bakhtiyar-Garashov/flake8-fastapi
|
81e774defcae377e77c1986ca780a922b27d2757
|
[
"MIT"
] | 3
|
2021-06-01T21:16:58.000Z
|
2022-01-29T21:39:29.000Z
|
from flake8_plugin_utils import assert_error, assert_not_error
from flake8_fastapi.errors import RouteDecoratorError
from flake8_fastapi.visitors import RouteDecorator
def test_code_with_error(code: str):
assert_error(RouteDecorator, code, RouteDecoratorError)
def test_code_without_error(code: str):
assert_not_error(RouteDecorator, code)
| 27.153846
| 62
| 0.844193
| 46
| 353
| 6.130435
| 0.413043
| 0.106383
| 0.099291
| 0.12766
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.009494
| 0.104816
| 353
| 12
| 63
| 29.416667
| 0.882911
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.428571
| 1
| 0.285714
| false
| 0
| 0.428571
| 0
| 0.714286
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
c6f6d3fd555f96b503f5a8a51e465811afb7ba6a
| 5,240
|
py
|
Python
|
datahub/investment/project/test/test_signals.py
|
Staberinde/data-hub-api
|
3d0467dbceaf62a47158eea412a3dba827073300
|
[
"MIT"
] | 6
|
2019-12-02T16:11:24.000Z
|
2022-03-18T10:02:02.000Z
|
datahub/investment/project/test/test_signals.py
|
Staberinde/data-hub-api
|
3d0467dbceaf62a47158eea412a3dba827073300
|
[
"MIT"
] | 1,696
|
2019-10-31T14:08:37.000Z
|
2022-03-29T12:35:57.000Z
|
datahub/investment/project/test/test_signals.py
|
Staberinde/data-hub-api
|
3d0467dbceaf62a47158eea412a3dba827073300
|
[
"MIT"
] | 9
|
2019-11-22T12:42:03.000Z
|
2021-09-03T14:25:05.000Z
|
from unittest.mock import Mock
import pytest
from datahub.company.test.factories import CompanyFactory
from datahub.core.constants import (
Country as CountryConstant,
InvestmentProjectStage as InvestmentProjectStageConstant,
)
from datahub.core.test_utils import random_obj_for_model
from datahub.investment.project.test.factories import InvestmentProjectFactory
from datahub.metadata.models import InvestmentBusinessActivity
@pytest.mark.django_db
class TestUpdateGVAOnBusinessActivitiesM2MChanged:
"""
Tests for the update_gross_value_added_on_project_business_activities_m2m_changed
signal receiver.
"""
def test_add(self, monkeypatch):
"""
Test that the GVA of a project is updated when a business activity is added to the
project.
"""
project = InvestmentProjectFactory()
set_gross_value_added_for_investment_project_mock = Mock()
monkeypatch.setattr(
'datahub.investment.project.signals.set_gross_value_added_for_investment_project',
set_gross_value_added_for_investment_project_mock,
)
business_activity = random_obj_for_model(InvestmentBusinessActivity)
project.business_activities.add(business_activity)
set_gross_value_added_for_investment_project_mock.assert_called_once_with(project)
def test_remove(self, monkeypatch):
"""
Test that the GVA of a project is updated when a business activity is removed from
the project.
"""
business_activity = random_obj_for_model(InvestmentBusinessActivity)
project = InvestmentProjectFactory(business_activities=[business_activity])
set_gross_value_added_for_investment_project_mock = Mock()
monkeypatch.setattr(
'datahub.investment.project.signals.set_gross_value_added_for_investment_project',
set_gross_value_added_for_investment_project_mock,
)
project.business_activities.remove(business_activity)
set_gross_value_added_for_investment_project_mock.assert_called_once_with(project)
def test_clear(self, monkeypatch):
"""Test that the GVA of a project is updated when its business activities are cleared."""
business_activity = random_obj_for_model(InvestmentBusinessActivity)
project = InvestmentProjectFactory(business_activities=[business_activity])
set_gross_value_added_for_investment_project_mock = Mock()
monkeypatch.setattr(
'datahub.investment.project.signals.set_gross_value_added_for_investment_project',
set_gross_value_added_for_investment_project_mock,
)
project.business_activities.clear()
set_gross_value_added_for_investment_project_mock.assert_called_once_with(project)
@pytest.mark.django_db
class TestInvestorCompanyUpdate:
"""
Tests for the update_country_investment_originates_from_post_save signal receiver.
"""
def test_update_investor_company_updates_country_of_origin_for_in_progress_project(self):
"""
Test that in progress investment projects' country investment originates from field
is updated when corresponding investor company address country is updated.
"""
investor_company = CompanyFactory(
address_country_id=CountryConstant.japan.value.id,
)
projects = InvestmentProjectFactory.create_batch(
2,
investor_company=investor_company,
stage_id=InvestmentProjectStageConstant.prospect.value.id,
)
for project in projects:
assert (
str(project.country_investment_originates_from_id)
== CountryConstant.japan.value.id
)
investor_company.address_country_id = CountryConstant.united_states.value.id
investor_company.save()
for project in projects:
project.refresh_from_db()
assert (
str(project.country_investment_originates_from_id)
== CountryConstant.united_states.value.id
)
def test_update_investor_company_doesnt_update_country_of_origin_for_won_project(self):
"""
Test that won investment projects' country investment originates from field
is not updated when corresponding investor company address country is updated.
"""
investor_company = CompanyFactory(
address_country_id=CountryConstant.japan.value.id,
)
projects = InvestmentProjectFactory.create_batch(
2,
investor_company=investor_company,
stage_id=InvestmentProjectStageConstant.won.value.id,
)
for project in projects:
assert (
str(project.country_investment_originates_from_id)
== CountryConstant.japan.value.id
)
investor_company.address_country_id = CountryConstant.united_states.value.id
investor_company.save()
for project in projects:
project.refresh_from_db()
assert (
str(project.country_investment_originates_from_id)
== CountryConstant.japan.value.id
)
| 37.697842
| 97
| 0.712595
| 553
| 5,240
| 6.38698
| 0.179024
| 0.07701
| 0.05521
| 0.061155
| 0.751133
| 0.722254
| 0.716874
| 0.716874
| 0.666478
| 0.666478
| 0
| 0.000995
| 0.232443
| 5,240
| 138
| 98
| 37.971014
| 0.877176
| 0.146374
| 0
| 0.602273
| 0
| 0
| 0.055001
| 0.055001
| 0
| 0
| 0
| 0
| 0.079545
| 1
| 0.056818
| false
| 0
| 0.079545
| 0
| 0.159091
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
05aa4d8faad006e282020d7a7dea476b0357eb4c
| 171
|
py
|
Python
|
backend/healthify/wsgi.py
|
Rahul91/Real-Time-Chat-App
|
b6938a1f18115558a144bb3fc070cc8737b4d540
|
[
"MIT"
] | 2
|
2016-10-04T06:26:43.000Z
|
2020-12-15T20:15:43.000Z
|
backend/healthify/wsgi.py
|
Rahul91/Real-Time-Chat-App
|
b6938a1f18115558a144bb3fc070cc8737b4d540
|
[
"MIT"
] | null | null | null |
backend/healthify/wsgi.py
|
Rahul91/Real-Time-Chat-App
|
b6938a1f18115558a144bb3fc070cc8737b4d540
|
[
"MIT"
] | null | null | null |
from healthify import config
from healthify.app import app
__author__ = 'rahul'
if __name__ == "__main__":
app.run(debug=config.FLASK_DEBUG, port=config.FLASK_PORT)
| 21.375
| 61
| 0.766082
| 24
| 171
| 4.875
| 0.583333
| 0.222222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.134503
| 171
| 7
| 62
| 24.428571
| 0.790541
| 0
| 0
| 0
| 0
| 0
| 0.076023
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.4
| 0
| 0.4
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
05c33a28e41d27019c59c692e645b33e2c6b2cae
| 61
|
py
|
Python
|
baekjoon/2163.py
|
phillip5094/algorithm-practice
|
4d3c42cc73fbcc6158d04bbaaa511fee2fa08ef8
|
[
"Apache-2.0"
] | null | null | null |
baekjoon/2163.py
|
phillip5094/algorithm-practice
|
4d3c42cc73fbcc6158d04bbaaa511fee2fa08ef8
|
[
"Apache-2.0"
] | null | null | null |
baekjoon/2163.py
|
phillip5094/algorithm-practice
|
4d3c42cc73fbcc6158d04bbaaa511fee2fa08ef8
|
[
"Apache-2.0"
] | null | null | null |
n, m = map(int, input().split())
print(n - 1 + n * (m - 1))
| 15.25
| 32
| 0.459016
| 12
| 61
| 2.333333
| 0.666667
| 0.142857
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.043478
| 0.245902
| 61
| 3
| 33
| 20.333333
| 0.565217
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 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
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
05c5f0b25abbe65d5bb70b8d1b39197b8dced460
| 206
|
py
|
Python
|
tests/unit/test_ServiceDiscovery.py
|
giupo/ServiceDiscovery
|
c09ae4fe50d4e284fca0dc1a2c940fe316c80756
|
[
"BSD-3-Clause"
] | null | null | null |
tests/unit/test_ServiceDiscovery.py
|
giupo/ServiceDiscovery
|
c09ae4fe50d4e284fca0dc1a2c940fe316c80756
|
[
"BSD-3-Clause"
] | null | null | null |
tests/unit/test_ServiceDiscovery.py
|
giupo/ServiceDiscovery
|
c09ae4fe50d4e284fca0dc1a2c940fe316c80756
|
[
"BSD-3-Clause"
] | null | null | null |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_ServiceDiscovery
----------------------------------
Tests for `ServiceDiscovery` module.
"""
import unittest
from ServiceDiscovery import discovery
| 15.846154
| 38
| 0.606796
| 19
| 206
| 6.526316
| 0.842105
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005495
| 0.116505
| 206
| 12
| 39
| 17.166667
| 0.675824
| 0.665049
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
05e70ba7c5287e46e5cff1fe5b396f7b7d76fe8d
| 248
|
py
|
Python
|
mythril/rpc/exceptions.py
|
mbeacom/mythril
|
57593f8d664e27d78fb23c89ed4a7d2a617c06a7
|
[
"MIT"
] | 166
|
2015-09-14T16:57:01.000Z
|
2022-01-23T04:30:48.000Z
|
mythril/rpc/exceptions.py
|
kayuri/mythril
|
e8e5842a25782a86bdc8783e71f12cab892cd44f
|
[
"MIT"
] | 37
|
2015-09-07T04:48:27.000Z
|
2020-08-18T14:11:49.000Z
|
mythril/rpc/exceptions.py
|
kayuri/mythril
|
e8e5842a25782a86bdc8783e71f12cab892cd44f
|
[
"MIT"
] | 117
|
2015-09-15T14:59:49.000Z
|
2022-03-31T00:54:05.000Z
|
class EthJsonRpcError(Exception):
pass
class ConnectionError(EthJsonRpcError):
pass
class BadStatusCodeError(EthJsonRpcError):
pass
class BadJsonError(EthJsonRpcError):
pass
class BadResponseError(EthJsonRpcError):
pass
| 13.052632
| 42
| 0.766129
| 20
| 248
| 9.5
| 0.4
| 0.189474
| 0.378947
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.173387
| 248
| 18
| 43
| 13.777778
| 0.926829
| 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 | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
af1ec2712f6075a432b33270dc5687d33bbef417
| 59
|
py
|
Python
|
tasks/components/dialogs.py
|
JuacyWillian/TasksApp
|
e9b1a492cc9ba6ee3bddff24aaa200de52464dc7
|
[
"MIT"
] | 1
|
2018-11-18T13:31:26.000Z
|
2018-11-18T13:31:26.000Z
|
tasks/components/dialogs.py
|
JuacyWillian/TasksApp
|
e9b1a492cc9ba6ee3bddff24aaa200de52464dc7
|
[
"MIT"
] | null | null | null |
tasks/components/dialogs.py
|
JuacyWillian/TasksApp
|
e9b1a492cc9ba6ee3bddff24aaa200de52464dc7
|
[
"MIT"
] | null | null | null |
from kivy.lang import Builder
Builder.load_string("""""")
| 14.75
| 29
| 0.728814
| 8
| 59
| 5.25
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.101695
| 59
| 3
| 30
| 19.666667
| 0.792453
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
afa1cd8d10ec4805d27fab6291c2e5531f5c62a3
| 74
|
py
|
Python
|
main.py
|
M-Mabrouk/GhostWriter
|
07e5fa1cef4cd0e75559edfaf3d91e5a8b442f7f
|
[
"MIT"
] | 2
|
2020-02-27T07:21:33.000Z
|
2020-06-24T12:54:30.000Z
|
main.py
|
M-Mabrouk/GhostWriter
|
07e5fa1cef4cd0e75559edfaf3d91e5a8b442f7f
|
[
"MIT"
] | null | null | null |
main.py
|
M-Mabrouk/GhostWriter
|
07e5fa1cef4cd0e75559edfaf3d91e5a8b442f7f
|
[
"MIT"
] | 1
|
2020-06-27T13:30:20.000Z
|
2020-06-27T13:30:20.000Z
|
from src.tracker import Tracker
if __name__ == "__main__":
Tracker()
| 14.8
| 31
| 0.702703
| 9
| 74
| 4.888889
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.189189
| 74
| 4
| 32
| 18.5
| 0.733333
| 0
| 0
| 0
| 0
| 0
| 0.108108
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
afa40a7d59974ff49b86538798bed5eb80183630
| 340
|
py
|
Python
|
EJERCICIO_PRACTICO_#5.py
|
FreyderUrbano/Python_Programas
|
8a11729d1148c319d8fa145ad18038cc7d63f0d9
|
[
"MIT"
] | null | null | null |
EJERCICIO_PRACTICO_#5.py
|
FreyderUrbano/Python_Programas
|
8a11729d1148c319d8fa145ad18038cc7d63f0d9
|
[
"MIT"
] | null | null | null |
EJERCICIO_PRACTICO_#5.py
|
FreyderUrbano/Python_Programas
|
8a11729d1148c319d8fa145ad18038cc7d63f0d9
|
[
"MIT"
] | null | null | null |
#EJERCICIO PRACTICO NUMERO 5
print("===========================")
print("EJERCICIO PRACTICO NUMERO 5")
print("===========================\n")
print("=====================")
print("SUCESION DE FIBONACC1")
print("=====================\n")
x, y= 0, 1
while y <= 1597:
print(x, y, end = " ")
x = x + y
y = x + y
print("\nFin.")
| 21.25
| 38
| 0.405882
| 38
| 340
| 3.631579
| 0.447368
| 0.057971
| 0.333333
| 0.347826
| 0.42029
| 0
| 0
| 0
| 0
| 0
| 0
| 0.03169
| 0.164706
| 340
| 16
| 39
| 21.25
| 0.454225
| 0.079412
| 0
| 0
| 0
| 0
| 0.495208
| 0.319489
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.666667
| 0
| 0
| 0
| null | 0
| 1
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
afb7d6024fa731beb7c3601bb65fe3b6cbdaa896
| 89
|
py
|
Python
|
Chapter01/back_slash.py
|
LuisPereda/Learning_Python
|
e89e69346c5584be10d991010f39b59329793ba5
|
[
"MIT"
] | null | null | null |
Chapter01/back_slash.py
|
LuisPereda/Learning_Python
|
e89e69346c5584be10d991010f39b59329793ba5
|
[
"MIT"
] | null | null | null |
Chapter01/back_slash.py
|
LuisPereda/Learning_Python
|
e89e69346c5584be10d991010f39b59329793ba5
|
[
"MIT"
] | null | null | null |
print ("Hello \
world")
# Backslash(\) is a special character that creates whitespace
| 17.8
| 61
| 0.719101
| 11
| 89
| 5.818182
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.179775
| 89
| 4
| 62
| 22.25
| 0.876712
| 0.662921
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 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
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
afd56500a9067c2c6b2ef81610cb2c8572a3792e
| 197
|
py
|
Python
|
day_1/if_2.py
|
YugoNishio/python_study
|
11a6a51ca43ba1cb7a1283d99e0fd6bedda40bcd
|
[
"MIT"
] | null | null | null |
day_1/if_2.py
|
YugoNishio/python_study
|
11a6a51ca43ba1cb7a1283d99e0fd6bedda40bcd
|
[
"MIT"
] | null | null | null |
day_1/if_2.py
|
YugoNishio/python_study
|
11a6a51ca43ba1cb7a1283d99e0fd6bedda40bcd
|
[
"MIT"
] | null | null | null |
#条件について
if int(input("整数を入力してください")): #整数が入力されれば条件がTrue
print("整数が入力されました")
else: #整数が入力されなかったら?
print("整数が入力されませんでした")
#残念ながら整数以外を入力するとエラーが起きてしまいました。
#どうすれば良かったのでしょうか...(error_1.pyに続く…)
| 19.7
| 47
| 0.746193
| 18
| 197
| 8.277778
| 0.944444
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.00565
| 0.101523
| 197
| 9
| 48
| 21.888889
| 0.819209
| 0.497462
| 0
| 0
| 0
| 0
| 0.361702
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 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
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
bb6e0041d4e4dbf58e0f45d0c70840b0e9d0fb3b
| 22
|
py
|
Python
|
pydhc/version.py
|
paulstapor/pyDHC
|
a8413b2cd1ee18177e061adcdfc879c0682afe5c
|
[
"MIT"
] | null | null | null |
pydhc/version.py
|
paulstapor/pyDHC
|
a8413b2cd1ee18177e061adcdfc879c0682afe5c
|
[
"MIT"
] | null | null | null |
pydhc/version.py
|
paulstapor/pyDHC
|
a8413b2cd1ee18177e061adcdfc879c0682afe5c
|
[
"MIT"
] | null | null | null |
__version__ = "0.0.0a"
| 22
| 22
| 0.681818
| 4
| 22
| 2.75
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.15
| 0.090909
| 22
| 1
| 22
| 22
| 0.4
| 0
| 0
| 0
| 0
| 0
| 0.26087
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
bb86e1f99f7e08b72d6ae1de918b9e8ec73a107e
| 136
|
py
|
Python
|
bayesian_inferences/bayesian_hacker_unsupervised_clustering.py
|
danhphan/bayesian-inferences
|
d5976f7fde560b0d0bd47c0144d87724d4ac96b3
|
[
"Apache-2.0"
] | null | null | null |
bayesian_inferences/bayesian_hacker_unsupervised_clustering.py
|
danhphan/bayesian-inferences
|
d5976f7fde560b0d0bd47c0144d87724d4ac96b3
|
[
"Apache-2.0"
] | null | null | null |
bayesian_inferences/bayesian_hacker_unsupervised_clustering.py
|
danhphan/bayesian-inferences
|
d5976f7fde560b0d0bd47c0144d87724d4ac96b3
|
[
"Apache-2.0"
] | null | null | null |
# AUTOGENERATED! DO NOT EDIT! File to edit: 13_bayesian_hacker_unsupervised_clustering.ipynb (unless otherwise specified).
__all__ = []
| 45.333333
| 122
| 0.808824
| 17
| 136
| 6
| 0.941176
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.016529
| 0.110294
| 136
| 3
| 123
| 45.333333
| 0.826446
| 0.882353
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
bb9d4b6d409daa7a03449d5515005279a126b566
| 96
|
py
|
Python
|
pizzaiola_backend/apps/public_ward/apps.py
|
eddyraz/pizzaiola
|
04092ebcbc4aabe5bd12c307cb6a6f8c995a8e24
|
[
"MIT"
] | null | null | null |
pizzaiola_backend/apps/public_ward/apps.py
|
eddyraz/pizzaiola
|
04092ebcbc4aabe5bd12c307cb6a6f8c995a8e24
|
[
"MIT"
] | 12
|
2021-02-08T20:41:52.000Z
|
2022-03-12T00:22:24.000Z
|
pizzaiola_backend/apps/public_ward/apps.py
|
eddyraz/pizzaiola
|
04092ebcbc4aabe5bd12c307cb6a6f8c995a8e24
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class PublicWardConfig(AppConfig):
name = 'public_ward'
| 16
| 34
| 0.770833
| 11
| 96
| 6.636364
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.15625
| 96
| 5
| 35
| 19.2
| 0.901235
| 0
| 0
| 0
| 0
| 0
| 0.114583
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
bbc8f92acefa4ba8ffb815cc53257e91b3a3cab1
| 80,714
|
py
|
Python
|
mpsp/src/parser_test.py
|
danielfireman-ifal/coletores
|
7bb3237ceb6376a536cde3435ded62ea6b9a4502
|
[
"MIT"
] | 18
|
2019-10-30T01:18:40.000Z
|
2022-03-15T11:52:45.000Z
|
mpsp/src/parser_test.py
|
danielfireman-ifal/coletores
|
7bb3237ceb6376a536cde3435ded62ea6b9a4502
|
[
"MIT"
] | 174
|
2019-11-01T18:57:16.000Z
|
2021-09-18T02:35:27.000Z
|
mpsp/src/parser_test.py
|
danielfireman-ifal/coletores
|
7bb3237ceb6376a536cde3435ded62ea6b9a4502
|
[
"MIT"
] | 9
|
2020-01-16T16:33:46.000Z
|
2022-01-13T07:39:00.000Z
|
import os
import parser
import unittest
class TestParser(unittest.TestCase):
# Tests for parsers for the months from July 2019 to November 2020
def test_active_members_jan_2020(self):
self.maxDiff = None
expected = {
"reg": "3725",
"name": "ABNER CASTORINO",
"role": "PROMOTOR DE JUSTICA (ENTRANCIA FINAL)",
"type": "membro",
"workplace": "PROMOTORIA DE JUSTICA DE SAO BERNARDO DO CAMPO",
"active": True,
"income": {
"total": 40253.32,
"wage": 33689.1,
"perks": {
"total": 960.0,
"food": 960.0,
"vacation_pecuniary": 0.0,
"premium_license_pecuniary": 0.0,
},
"other": {
"total": 5604.22,
"trust_position": 0.0,
"others_total": 5604.22,
"others": {
"Gratificação Natalina": 0.0,
"Férias (1/3 constitucional)": 0.0,
"Abono de Permanência": 0.0,
"GRAT. CUMULATIVA": 5604.22,
"GRAT. NATUREZA ESPECIAL": 0.0,
"GRAT. DE GRUPO DE ATUAÇÃO ESPECIAL": 0.0,
},
},
},
"discounts": {
"total": 12623.0,
"prev_contribution": 3705.8,
"ceil_retention": 0.0,
"income_tax": 8917.2,
},
}
files = (
"./output_test/Membros_ativos-01-2020.ods",
"./output_test/Membros_ativos-Verbas Indenizatorias-01-2020.ods",
)
employees = parser.parse_active_members(files, "01", "2020")
# Verificações
self.assertEqual(1, len(employees))
self.assertDictEqual(employees[0], expected)
def test_active_members_aug_2019(self):
self.maxDiff = None
expected = {
"reg": "2602",
"name": "CLEVER RODOLFO C VASCONCELOS",
"role": "PROMOTOR DE JUSTICA (ENTRANCIA FINAL)",
"type": "membro",
"workplace": "PROMOTORIA DE JUSTICA MILITAR",
"active": True,
"income": {
"total": 40213.32,
"wage": 33689.1,
"perks": {"total": 920.0, "food": 920.0, "vacation_pecuniary": 0.0},
"other": {
"total": 5604.22,
"trust_position": 0.0,
"others_total": 5604.22,
"others": {
"Gratificação Natalina": 0.0,
"Férias (1/3 constitucional)": 0.0,
"Abono de Permanência": 0.0,
"GRAT. CUMULATIVA": 5604.22,
"GRAT. NATUREZA ESPECIAL": 0.0,
},
},
},
"discounts": {
"total": 12518.73,
"prev_contribution": 3705.8,
"ceil_retention": 0.0,
"income_tax": 8812.93,
},
}
files = (
"./output_test/Membros_ativos-08-2019.ods",
"./output_test/Membros_ativos-Verbas Indenizatorias-08-2019.ods",
)
employees = parser.parse_active_members(files, "08", "2019")
# Verificações
self.assertEqual(1, len(employees))
self.assertDictEqual(employees[0], expected)
def test_active_members_dez_2019(self):
self.maxDiff = None
expected = {
"reg": "2970",
"name": "ADINAN APARECIDO DE OLIVEIRA",
"role": "PROMOTOR DE JUSTICA (ENTRANCIA FINAL)",
"type": "membro",
"workplace": "PROMOTORIA DE JUSTICA DE JABOTICABAL",
"active": True,
"income": {
"total": 89843.27,
"wage": 33689.1,
"perks": {"total": 33900.45},
"other": {
"total": 22253.72,
"trust_position": 0.0,
"others_total": 22253.72,
"others": {
"Gratificação Natalina": 22253.72,
"Férias (1/3 constitucional)": 0.0,
"Abono de Permanência": 0.0,
},
},
},
"discounts": {
"total": 23764.14,
"prev_contribution": 9859.5,
"ceil_retention": 0.0,
"income_tax": 13904.64,
},
}
files = ("./output_test/Membros_ativos-12-2019.ods",)
employees = parser.parse_active_members(files, "12", "2019")
# Verificações
self.assertEqual(1, len(employees))
self.assertDictEqual(employees[0], expected)
def test_inactive_members_jan_2020(self):
self.maxDiff = None
expected = {
"reg": "137707",
"name": "ABEL PEDRO RIBEIRO",
"role": "PROMOTOR DE JUSTICA (ENTRANCIA FINAL)",
"type": "membro",
"workplace": "PROMOTORIAS DE JUSTICA",
"active": False,
"income": {
"total": 52739.74,
"wage": 35159.83,
"perks": {"total": 0.0},
"other": {
"total": 17579.91,
"trust_position": 0.0,
"others_total": 17579.91,
"others": {
"Gratificação Natalina": 17579.91,
"Férias (1/3 constitucional)": 0.0,
"Abono de Permanência": 0.0,
},
},
},
"discounts": {
"total": 11884.88,
"prev_contribution": 4487.91,
"ceil_retention": 0.0,
"income_tax": 7396.97,
},
}
files = ("./output_test/Membros_inativos-01-2020.ods",)
employees = parser.unused_parse_inactive_members(files, "01", "2020")
# Verificações
self.assertEqual(1, len(employees))
self.assertDictEqual(employees[0], expected)
def test_inactive_members_dez_2019(self):
self.maxDiff = None
expected = {
"reg": "948780",
"name": "AGENOR NAKAZONE",
"role": "PROCURADOR DE JUSTICA",
"type": "membro",
"workplace": "PROCURADORIA DE JUSTICA CRIMINAL",
"active": False,
"income": {
"total": 57373.46,
"wage": 36742.01,
"perks": {"total": 0.0},
"other": {
"total": 20631.45,
"trust_position": 1506.96,
"others_total": 19124.49,
"others": {
"Gratificação Natalina": 19124.49,
"Férias (1/3 constitucional)": 0.0,
"Abono de Permanência": 0.0,
},
},
},
"discounts": {
"total": 24777.39,
"prev_contribution": 8591.43,
"ceil_retention": 0.0,
"income_tax": 16185.96,
},
}
files = ("./output_test/Membros_inativos-12-2019.ods",)
employees = parser.unused_parse_inactive_members(files, "12", "2019")
# Verificações
self.assertEqual(1, len(employees))
self.assertDictEqual(employees[0], expected)
def test_inactive_servants_jan_2020(self):
self.maxDiff = None
expected = {
"reg": "1174",
"name": "ABIGAIR MONTEIRO",
"role": "OFICIAL DE PROMOTORIA I",
"type": "servidor",
"workplace": "AREA REGIONAL DE SAO JOSE DO RIO PRETO",
"active": False,
"income": {
"total": 8458.57,
"wage": 8458.57,
"perks": {"total": 0.0},
"other": {
"total": 0.0,
"trust_position": 0.0,
"others_total": 0.0,
"others": {
"Gratificação Natalina": 0.0,
"Férias (1/3 constitucional)": 0.0,
"Abono de Permanência": 0.0,
},
},
},
"discounts": {
"total": 1372.38,
"prev_contribution": 604.18,
"ceil_retention": 0.0,
"income_tax": 768.2,
},
}
files = ("./output_test/Servidores_inativos-01-2020.ods",)
employees = parser.unused_parse_inactive_servants(files, "01", "2020")
# Verificações
self.assertEqual(1, len(employees))
self.assertDictEqual(employees[0], expected)
def test_inactive_servants_dez_2019(self):
self.maxDiff = None
expected = {
"reg": "953273",
"name": "ALCIDES CAETANO",
"role": "AUXILIAR DE PROMOTORIA I",
"type": "servidor",
"workplace": "AREA DE TRANSPORTES",
"active": False,
"income": {
"total": 10768.1,
"wage": 6674.54,
"perks": {"total": 356.24},
"other": {
"total": 3737.32,
"trust_position": 0.0,
"others_total": 3737.32,
"others": {
"Gratificação Natalina": 3737.32,
"Férias (1/3 constitucional)": 0.0,
"Abono de Permanência": 0.0,
},
},
},
"discounts": {
"total": 1546.78,
"prev_contribution": 447.16,
"ceil_retention": 0.0,
"income_tax": 1099.62,
},
}
files = ("./output_test/Servidores_inativos-12-2019.ods",)
employees = parser.unused_parse_inactive_servants(files, "12", "2019")
# Verificações
self.assertEqual(1, len(employees))
self.assertDictEqual(employees[0], expected)
def test_active_servants_jan_2020(self):
self.maxDiff = None
expected = {
"reg": "1469",
"name": "ABEL VIEIRA DE MENEZES FILHO",
"role": " AUXILIAR DE PROMOTORIA I ",
"type": "servidor",
"workplace": " AREA REGIONAL DA CAPITAL ",
"active": True,
"income": {
"total": 7874.06,
"wage": 6623.36,
"perks": {"total": 1250.7},
"other": {
"total": 0.0,
"trust_position": 0.0,
"others_total": 0.0,
"others": {
"Gratificação Natalina": 0.0,
"Férias (1/3 constitucional)": 0.0,
"Abono de Permanência": 0.0,
},
},
},
"discounts": {
"total": 1612.73,
"prev_contribution": 861.02,
"ceil_retention": 0.0,
"income_tax": 751.71,
},
}
files = ("./output_test/Servidores_ativos-01-2020.ods",)
employees = parser.unused_parse_active_servants(files, "01", "2020")
# Verificações
self.assertEqual(1, len(employees))
self.assertDictEqual(employees[0], expected)
def test_active_servants_dez_2019(self):
self.maxDiff = None
expected = {
"reg": "4895",
"name": "ADRIANA SALTO",
"role": "OFICIAL DE PROMOTORIA I",
"type": "servidor",
"workplace": "SERVICO TECNICO ADMINISTRATIVO DE TIETE",
"active": True,
"income": {
"total": 11246.37,
"wage": 6267.32,
"perks": {"total": 1169.44},
"other": {
"total": 3809.61,
"trust_position": 333.44,
"others_total": 3476.17,
"others": {
"Gratificação Natalina": 3476.17,
"Férias (1/3 constitucional)": 0.0,
"Abono de Permanência": 0.0,
},
},
},
"discounts": {
"total": 3259.08,
"prev_contribution": 1757.98,
"ceil_retention": 0.0,
"income_tax": 1501.1,
},
}
files = ("./output_test/Servidores_ativos-12-2019.ods",)
employees = parser.unused_parse_active_servants(files, "12", "2019")
# Verificações
self.assertEqual(1, len(employees))
self.assertDictEqual(employees[0], expected)
# Tests for active members who have different table formats
def test_active_members_january_2019(self):
self.maxDiff = None
expected = {
"reg": "3725",
"name": "ABNER CASTORINO",
"role": "PROMOTOR DE JUSTICA (ENTRANCIA FINAL)",
"type": "membro",
"workplace": "PROMOTORIA DE JUSTICA DE SAO BERNARDO DO CAMPO",
"active": True,
"income": {
"total": 34609.1,
"wage": 33689.1,
"perks": {"total": 920.0, "food": 920.0, "housing_aid": 0.0},
"other": {
"total": 0.0,
"trust_position": 0.0,
"others_total": 0.0,
"others": {
"Gratificação Natalina": 0.0,
"Férias (1/3 constitucional)": 0.0,
"Abono de Permanência": 0.0,
"Outras remunerações temporárias": 0.0,
},
},
},
"discounts": {
"total": 11081.84,
"prev_contribution": 3705.8,
"ceil_retention": 0.0,
"income_tax": 7376.04,
},
}
files = ("./output_test/Membros_ativos-01-2019.ods",)
employees = parser.parse_active_members(files, "01", "2019")
# Verificações
self.assertEqual(1, len(employees))
self.assertDictEqual(employees[0], expected)
def test_active_members_march_2019(self):
self.maxDiff = None
expected = {
"reg": "3725",
"name": "ABNER CASTORINO",
"role": "PROMOTOR DE JUSTICA (ENTRANCIA FINAL)",
"type": "membro",
"workplace": "PROMOTORIA DE JUSTICA DE SAO BERNARDO DO CAMPO",
"active": True,
"income": {
"total": 38651.78,
"wage": 33689.1,
"perks": {"total": 920.0, "food": 920.0, "ferias em pecunia": 0.0},
"other": {
"total": 4042.68,
"trust_position": 0.0,
"others_total": 4042.68,
"others": {
"Gratificação Natalina": 0.0,
"Férias (1/3 constitucional)": 0.0,
"Abono de Permanência": 0.0,
"Outras remunerações temporárias": 4042.68,
},
},
},
"discounts": {
"total": 12193.58,
"prev_contribution": 3705.8,
"ceil_retention": 0.0,
"income_tax": 8487.78,
},
}
files = ("./output_test/Membros_ativos-03-2019.ods",)
employees = parser.parse_active_members(files, "03", "2019")
# Verificações
self.assertEqual(1, len(employees))
self.assertDictEqual(employees[0], expected)
def test_active_members_june_2019(self):
self.maxDiff = None
expected = {
"reg": "207",
"name": "FREDERICO AUGUSTO NEVES ARAUJO",
"role": "PROMOTOR DE JUSTICA (ENTRANCIA FINAL)",
"type": "membro",
"workplace": "PROMOTORIA DE JUSTICA DE TAUBATE",
"active": True,
"income": {
"total": 34609.1,
"wage": 33689.1,
"perks": {
"total": 920.0,
"food": 920.0,
"ferias em pecunia": 0.0,
"LP em pecunia": 0.0,
},
"other": {
"total": 0.0,
"trust_position": 0.0,
"others_total": 0.0,
"others": {
"Gratificação Natalina": 0.0,
"Férias (1/3 constitucional)": 0.0,
"Abono de Permanência": 0.0,
"Outras remunerações temporarias": 0.0,
},
},
},
"discounts": {
"total": 11081.84,
"prev_contribution": 3705.8,
"income_tax": 7376.04,
},
}
files = ("./output_test/Membros_ativos-06-2019.ods",)
employees = parser.parse_active_members(files, "06", "2019")
# Verificações
self.assertEqual(1, len(employees))
self.assertDictEqual(employees[0], expected)
# # Tests for inactive members who have different table formats
def test_inactive_members_january_2019(self):
self.maxDiff = None
expected = {
"reg": "137707",
"name": "ABEL PEDRO RIBEIRO",
"role": "PROMOTOR DE JUSTICA (ENTRANCIA FINAL)",
"type": "membro",
"workplace": "PROMOTORIAS DE JUSTICA",
"active": False,
"income": {
"total": 45627.43,
"wage": 30418.28,
"other": {
"total": 15209.15,
"others_total": 15209.15,
"others": {"Gratificação Natalina": 15209.15},
},
},
"discounts": {
"total": 18959.9,
"prev_contribution": 6514.5,
"ceil_retention": 0.0,
"income_tax": 26667.53,
},
}
files = ("./output_test/Membros_inativos-01-2019.ods",)
employees = parser.unused_parse_inactive_members(files, "01", "2019")
# Verificações
self.assertEqual(1, len(employees))
self.assertDictEqual(employees[0], expected)
def test_inactive_members_may_2019(self):
self.maxDiff = None
expected = {
"reg": "137707",
"name": "ABEL PEDRO RIBEIRO",
"role": "PROMOTOR DE JUSTICA (ENTRANCIA FINAL)",
"type": "membro",
"workplace": "PROMOTORIAS DE JUSTICA",
"active": False,
"income": {
"total": 35159.83,
"wage": 35159.83,
"perks": {"total": 0.0, "food": 0.0, "ferias em pecunia": 0.0},
"other": {
"total": 0.0,
"trust_position": 0.0,
"others_total": 0.0,
"others": {
"Gratificação Natalina": 0.0,
"Férias (1/3 constitucional)": 0.0,
"Abono de Permanência": 0.0,
},
},
},
"discounts": {
"total": 10614.29,
"prev_contribution": 3225.24,
"income_tax": 7389.05,
"ceil_retention": 0.0,
},
}
files = ("./output_test/Membros_inativos-05-2019.ods",)
employees = parser.unused_parse_inactive_members(files, "05", "2019")
# Verificações
self.assertEqual(1, len(employees))
self.assertDictEqual(employees[0], expected)
def test_inactive_members_june_2019(self):
self.maxDiff = None
expected = {
"reg": "137707",
"name": "ABEL PEDRO RIBEIRO",
"role": "PROMOTOR DE JUSTICA (ENTRANCIA FINAL)",
"type": "membro",
"workplace": "PROMOTORIAS DE JUSTICA",
"active": False,
"income": {
"total": 35159.83,
"wage": 35159.83,
"perks": {"total": 0.0, "food": 0.0, "ferias em pecunia": 0.0},
"other": {
"total": 0.0,
"others_total": 0.0,
"others": {
"Gratificação Natalina": 0.0,
"Abono de Permanência": 0.0,
},
},
},
"discounts": {
"total": 10614.29,
"prev_contribution": 3225.24,
"income_tax": 7389.05,
"ceil_retention": 0.0,
},
}
files = ("./output_test/Membros_inativos-06-2019.ods",)
employees = parser.unused_parse_inactive_members(files, "06", "2019")
# Verificações
self.assertEqual(1, len(employees))
self.assertDictEqual(employees[0], expected)
# Tests for Active servants who have different table formats
def test_active_servants_january_2019(self):
self.maxDiff = None
expected = {
"reg": "1469",
"name": "ABEL VIEIRA DE MENEZES FILHO",
"role": "AREA REGIONAL DA CAPITAL",
"type": "servidor",
"workplace": "AUXILIAR DE PROMOTORIA I",
"active": True,
"income": {
"total": 7573.02,
"wage": 6371.44,
"perks": {
"total": 1201.58,
"food": 920.0,
"transportation": 281.58,
"pre_school": 0.0,
},
"other": {
"total": 0.0,
"trust_position": 0.0,
"others_total": 0.0,
"others": {
"Gratificação Natalina": 0.0,
"Férias (1/3 constitucional)": 0.0,
"Abono de Permanência": 0.0,
"Gratificação de Qualificação": 0.0,
},
},
},
"discounts": {
"total": 1518.32,
"prev_contribution": 828.27,
"ceil_retention": 0.0,
"income_tax": 690.05,
},
}
files = ("./output_test/Servidores_ativos-01-2019.ods",)
employees = parser.unused_parse_active_servants(files, "01", "2019")
# Verificações
self.assertEqual(1, len(employees))
self.assertDictEqual(employees[0], expected)
# Tests for Active servants who have different table formats
def test_inactive_servants_january_2019(self):
self.maxDiff = None
expected = {
"reg": "1174",
"name": "ABIGAIR MONTEIRO",
"role": "OFICIAL DE PROMOTORIA I",
"type": "servidor",
"workplace": "AREA REGIONAL DE SAO JOSE DO RIO PRETO",
"active": False,
"income": {
"total": 8180.43,
"wage": 8180.43,
"other": {
"total": 0.0,
"others_total": 0.0,
"others": {"Gratificação Natalina": 0.0},
},
},
"discounts": {
"total": 1266.27,
"prev_contribution": 584.7,
"income_tax": 681.57,
},
}
files = ("./output_test/Servidores_inativos-01-2019.ods",)
employees = parser.unused_parse_inactive_servants(files, "01", "2019")
# Verificações
self.assertEqual(1, len(employees))
self.assertDictEqual(employees[0], expected)
def test_inactive_servants_may_2019(self):
self.maxDiff = None
expected = {
"reg": "4324",
"name": "MILTON RANGEL DE QUADROS",
"role": "OFICIAL DE PROMOTORIA I",
"type": "servidor",
"workplace": "SERVICO TECNICO ADMINISTRATIVO DE ARACATUBA",
"active": False,
"income": {
"total": 8900.62,
"wage": 5244.0,
"perks": {
"total": 3496.0,
"food": 0.0,
"transportation": 0.0,
"ferias em pecunia": 3496.0,
},
"other": {
"total": 160.62,
"trust_position": 80.31,
"others_total": 80.31,
"others": {
"Gratificação Natalina": 0.0,
"Abono de Permanência": 0.0,
"Outras Remunerações Temporárias": 80.31,
},
},
},
"discounts": {
"total": 701.3,
"prev_contribution": 106.48,
"income_tax": 594.82,
},
}
files = ("./output_test/Servidores_inativos-05-2019.ods",)
employees = parser.unused_parse_inactive_servants(files, "05", "2019")
# Verificações
self.assertEqual(1, len(employees))
self.assertDictEqual(employees[0], expected)
def test_inactive_servants_june_2019(self):
self.maxDiff = None
expected = {
"reg": "386921",
"name": "ANTONIA MARIA DE MATOS",
"role": "AUXILIAR DE PROMOTORIA I",
"type": "servidor",
"workplace": "AREA DE ATIVIDADES COMPLEMENTARES",
"active": False,
"income": {
"total": 6313.87,
"wage": 5259.27,
"perks": {"total": 726.78, "food": 562.22, "transportation": 164.56},
"other": {
"total": 327.82,
"trust_position": 0.0,
"others_total": 327.82,
"others": {
"Gratificação Natalina": 0.0,
"Abono de Permanência": 327.82,
"Gratificação de Qualificação": 0.0,
},
},
},
"discounts": {
"total": 559.27,
"prev_contribution": 459.95,
"income_tax": 99.32,
},
}
files = ("./output_test/Servidores_inativos-06-2019.ods",)
employees = parser.unused_parse_inactive_servants(files, "06", "2019")
# Verificações
self.assertEqual(1, len(employees))
self.assertDictEqual(employees[0], expected)
# Tests for archives containing indemnity funds and temporary remuneration
def test_inactive_members_aug(self):
self.maxDiff = None
expected = {
"reg": "322959",
"name": "WALERIA GARCELAN LOMA GARCIA",
"role": "PROCURADOR DE JUSTICA",
"type": "membro",
"workplace": "PROCURADORIA DE JUSTICA CRIMINAL",
"active": False,
"income": {
"total": 88834.87,
"wage": 38072.09,
"perks": {"total": 50762.78, "vacation_pecuniary": 50762.78},
"other": {
"total": 0.0,
"trust_position": 0.0,
"others_total": 0.0,
"others": {
"Gratificação Natalina": 0.0,
"Férias (1/3 constitucional)": 0.0,
"Abono de Permanência": 0.0,
},
},
},
"discounts": {
"total": 11004.51,
"prev_contribution": 5115.36,
"ceil_retention": 0.0,
"income_tax": 16119.87,
},
}
files = (
"./output_test/Membros_inativos-08-2020.ods",
"./output_test/Membros_inativos-Verbas Indenizatorias-08-2020.ods",
)
employees = parser.unused_parse_inactive_members(files, "08", "2020")
# Verificações
self.assertEqual(1, len(employees))
self.assertDictEqual(employees[0], expected)
def test_inactive_members_sept(self):
self.maxDiff = None
expected = {
"reg": "730",
"name": "DIANA MARIA SILVA BRAUS",
"role": "PROMOTOR DE JUSTICA (ENTRANCIA INTERMEDIARIA)",
"type": "membro",
"workplace": "PROMOTORIA DE JUSTICA DE BIRIGUI",
"active": False,
"income": {
"total": 46228.93,
"wage": 32004.65,
"perks": {
"total": 14224.28,
"food": 0.0,
"vacation_pecuniary": 14224.28,
},
"other": {
"total": 0.0,
"trust_position": 0.0,
"others_total": 0.0,
"others": {
"Gratificação Natalina": 0.0,
"Férias (1/3 constitucional)": 0.0,
"Abono de Permanência": 0.0,
},
},
},
"discounts": {
"total": 10936.73,
"prev_contribution": 4144.57,
"ceil_retention": 0.0,
"income_tax": 6792.16,
},
}
files = (
"./output_test/Membros_inativos-09-2020.ods",
"./output_test/Membros_inativos-Verbas Indenizatorias-09-2020.ods",
)
employees = parser.unused_parse_inactive_members(files, "09", "2020")
# Verificações
self.assertEqual(1, len(employees))
self.assertDictEqual(employees[0], expected)
def test_inactive_members_nov(self):
self.maxDiff = None
expected = {
"reg": "204231",
"name": "AIRTON GRAZZIOLI",
"role": "PROCURADOR DE JUSTICA",
"type": "membro",
"workplace": "PROCURADORIA DE JUSTICA CRIMINAL",
"active": False,
"income": {
"total": 54466.36,
"wage": 37707.48,
"perks": {
"total": 16758.88,
"vacation_pecuniary": 16758.88,
"premium_license_pecuniary": 0.0,
},
"other": {
"total": 0.0,
"trust_position": 0.0,
"others_total": 0.0,
"others": {
"Gratificação Natalina": 0.0,
"Férias (1/3 constitucional)": 0.0,
"Abono de Permanência": 0.0,
},
},
},
"discounts": {
"total": 13651.37,
"prev_contribution": 5725.76,
"ceil_retention": 0.0,
"income_tax": 7925.61,
},
}
files = (
"./output_test/Membros_inativos-11-2020.ods",
"./output_test/Membros_inativos-Verbas Indenizatorias-11-2020.ods",
)
employees = parser.unused_parse_inactive_members(files, "11", "2020")
# Verificações
self.assertEqual(1, len(employees))
self.assertDictEqual(employees[0], expected)
def test_inactive_servants_sept(self):
self.maxDiff = None
expected = {
"reg": "165",
"name": "CLAUDIA REGINA DA SILVA LOPEZ ANTAO",
"role": "OFICIAL DE PROMOTORIA I",
"type": "servidor",
"workplace": "CENTRAL DE INQUERITOS POLICIAIS E PROCESSOS - CIPP",
"active": False,
"income": {
"total": 20577.06,
"wage": 12543.02,
"perks": {"total": 487.75, "food": 457.15, "transportation": 30.6},
"other": {
"total": 7546.29,
"trust_position": 0.0,
"others_total": 7546.29,
"others": {
"Gratificação Natalina": 6271.5,
"Férias (1/3 constitucional)": 0.0,
"Abono de Permanência": 961.22,
"INSALUBRIDADE": 0.0,
"QUALIFICACAO": 313.57,
},
},
},
"discounts": {
"total": 3838.08,
"prev_contribution": 1557.99,
"ceil_retention": 0.0,
"income_tax": 2280.09,
},
}
files = (
"./output_test/Servidores_inativos-09-2020.ods",
"./output_test/Servidores_inativos-Verbas Indenizatorias-09-2020.ods",
)
employees = parser.unused_parse_inactive_servants(files, "09", "2020")
# Verificações
self.assertEqual(1, len(employees))
self.assertDictEqual(employees[0], expected)
def test_inactive_servants_aug(self):
self.maxDiff = None
expected = {
"reg": "551283",
"name": "GLORIMAR MAIA",
"role": "OFICIAL DE PROMOTORIA I",
"type": "servidor",
"workplace": "AREA DE DOCUMENTACAO E DIVULGACAO",
"active": False,
"income": {
"total": 12298.84,
"wage": 10295.25,
"perks": {
"total": 563.32,
"food": 685.72,
"transportation": -122.4,
"vacation_pecuniary": 0.0,
},
"other": {
"total": 1440.27,
"trust_position": 0.0,
"others_total": 1440.27,
"others": {
"Gratificação Natalina": 0.0,
"Férias (1/3 constitucional)": 0.0,
"Abono de Permanência": 1061.07,
"INSALUBRIDADE": 0.0,
"QUALIFICACAO": 379.2,
},
},
},
"discounts": {
"total": 3061.69,
"prev_contribution": 713.81,
"ceil_retention": 0.0,
"income_tax": 2347.88,
},
}
files = (
"./output_test/Servidores_inativos-08-2020.ods",
"./output_test/Servidores_inativos-Verbas Indenizatorias-08-2020.ods",
)
employees = parser.unused_parse_inactive_servants(files, "08", "2020")
# Verificações
self.assertEqual(1, len(employees))
self.assertDictEqual(employees[0], expected)
def test_active_members_july_2019(self):
self.maxDiff = None
expected = {
"reg": "3725",
"name": "ABNER CASTORINO",
"role": "PROMOTOR DE JUSTICA (ENTRANCIA FINAL)",
"type": "membro",
"workplace": "PROMOTORIA DE JUSTICA DE SAO BERNARDO DO CAMPO",
"active": True,
"income": {
"total": 40213.32,
"wage": 33689.1,
"perks": {"total": 920.0, "food": 920.0, "vacation_pecuniary": 0.0},
"other": {
"total": 5604.22,
"trust_position": 0.0,
"others_total": 5604.22,
"others": {
"Gratificação Natalina": 0.0,
"Férias (1/3 constitucional)": 0.0,
"Abono de Permanência": 0.0,
"GRAT. CUMULATIVA": 5604.22,
"GRAT. NATUREZA ESPECIAL": 0.0,
},
},
},
"discounts": {
"total": 12623.0,
"prev_contribution": 3705.8,
"ceil_retention": 0.0,
"income_tax": 8917.2,
},
}
files = (
"./output_test/Membros_ativos-07-2019.ods",
"./output_test/Membros_ativos-Verbas Indenizatorias-07-2019.ods",
)
employees = parser.parse_active_members(files, "07", "2019")
# Verificações
self.assertEqual(1, len(employees))
self.assertDictEqual(employees[0], expected)
def test_active_members_march_2020(self):
self.maxDiff = None
expected = {
"reg": "3725",
"name": "ABNER CASTORINO",
"role": "PROMOTOR DE JUSTICA (ENTRANCIA FINAL)",
"type": "membro",
"workplace": "PROMOTORIA DE JUSTICA DE SAO BERNARDO DO CAMPO",
"active": True,
"income": {
"total": 54113.85,
"wage": 33689.1,
"perks": {
"total": 15932.93,
"food": 960.0,
"compensatory_leave": 0.0,
"vacation_pecuniary": 14972.93,
"premium_license_pecuniary": 0.0,
},
"other": {
"total": 4491.82,
"trust_position": 0.0,
"others_total": 4491.82,
"others": {
"Gratificação Natalina": 0.0,
"Férias (1/3 constitucional)": 0.0,
"Abono de Permanência": 0.0,
"GRAT. CUMULATIVA": 4491.82,
"GRAT. NATUREZA ESPECIAL": 0.0,
"GRAT. DE GRUPO DE ATUAÇÃO ESPECIAL": 0.0,
},
},
},
"discounts": {
"total": 12317.09,
"prev_contribution": 3705.8,
"ceil_retention": 0.0,
"income_tax": 8611.29,
},
}
files = (
"./output_test/Membros_ativos-03-2020.ods",
"./output_test/Membros_ativos-Verbas Indenizatorias-03-2020.ods",
)
employees = parser.parse_active_members(files, "03", "2020")
# Verificações
self.assertEqual(1, len(employees))
self.assertDictEqual(employees[0], expected)
def test_active_members_april_2020(self):
self.maxDiff = None
expected = {
"reg": "2526",
"name": "ALEXANDRA FACCIOLLI MARTINS",
"role": "PROMOTOR DE JUSTICA (ENTRANCIA FINAL)",
"type": "membro",
"workplace": "PROMOTORIA DE JUSTICA DE PIRACICABA",
"active": True,
"income": {
"total": 50745.0,
"wage": 33689.1,
"perks": {
"total": 15932.93,
"food": 960.0,
"compensatory_leave": 0.0,
"vacation_pecuniary": 14972.93,
},
"other": {
"total": 1122.97,
"trust_position": 0.0,
"others_total": 1122.97,
"others": {
"Gratificação Natalina": 0.0,
"Férias (1/3 constitucional)": 0.0,
"Abono de Permanência": 0.0,
"GRAT. CUMULATIVA": 0.0,
"GRAT. NATUREZA ESPECIAL": 0.0,
"GRAT. DE GRUPO DE ATUAÇÃO ESPECIAL": 1122.97,
},
},
},
"discounts": {
"total": 11390.66,
"prev_contribution": 3705.8,
"ceil_retention": 0.0,
"income_tax": 7684.86,
},
}
files = (
"./output_test/Membros_ativos-04-2020.ods",
"./output_test/Membros_ativos-Verbas Indenizatorias-04-2020.ods",
)
employees = parser.parse_active_members(files, "04", "2020")
# Verificações
self.assertEqual(1, len(employees))
self.assertDictEqual(employees[0], expected)
def test_active_members_aug_2020(self):
self.maxDiff = None
expected = {
"reg": "8505",
"name": "BRUNO GONDIM RODRIGUES",
"role": "PROMOTOR DE JUSTICA (ENTRANCIA INICIAL)",
"type": "membro",
"workplace": "PROMOTORIA DE JUSTICA DE ITARARE",
"active": True,
"income": {
"total": 54428.71,
"wage": 30405.3,
"perks": {
"total": 960.0,
"food": 960.0,
"transportation": 0.0,
"pre_school": 0.0,
"vacation_pecuniary": 0.0,
"premium_license_pecuniary": 0.0,
"compensatory_leave": 0.0,
},
"other": {
"total": 23063.41,
"trust_position": 0.0,
"others_total": 23063.41,
"others": {
"Gratificação Natalina": 15202.65,
"Férias (1/3 constitucional)": 0.0,
"Abono de Permanência": 0.0,
"INSALUBRIDADE": 0.0,
"SUBS. DE FUNÇÃO": 0.0,
"VIATURA": 0.0,
"GRAT. CUMULATIVA": 6737.8,
"GRAT. DE QUALIFICAÇÃO": 0.0,
"GRAT. NATUREZA ESPECIAL": 1122.96,
"GRAT. DE GRUPO DE ATUAÇÃO ESPECIAL": 0.0,
},
},
},
"discounts": {
"total": 15281.2,
"prev_contribution": 6912.3,
"ceil_retention": 0.0,
"income_tax": 8368.9,
},
}
files = (
"./output_test/Membros_ativos-08-2020.ods",
"./output_test/Membros_ativos-Verbas Indenizatorias-08-2020.ods",
)
employees = parser.parse_active_members(files, "08", "2020")
# Verificações
self.assertEqual(1, len(employees))
self.assertDictEqual(employees[0], expected)
def test_active_members_aug_2020(self):
self.maxDiff = None
expected = {
"reg": "4435",
"name": "ALEXANDRE AFFONSO CASTILHO",
"role": "PROMOTOR DE JUSTICA (ENTRANCIA FINAL)",
"type": "membro",
"workplace": "PROMOTORIA DE JUSTICA DE GUARULHOS",
"active": True,
"income": {
"total": 40263.97,
"wage": 33689.1,
"perks": {"total": 960.0, "vacation_pecuniary": 0.0},
"other": {
"total": 5614.87,
"trust_position": 0.0,
"others_total": 5614.87,
"others": {
"Gratificação Natalina": 0.0,
"Férias (1/3 constitucional)": 0.0,
"Abono de Permanência": 0.0,
"GRAT. CUMULATIVA": 0.0,
"GRAT. NATUREZA ESPECIAL": 4491.9,
"GRAT. DE GRUPO DE ATUAÇÃO ESPECIAL": 1122.97,
},
},
},
"discounts": {
"total": 13707.61,
"prev_contribution": 5197.77,
"ceil_retention": 0.0,
"income_tax": 8509.84,
},
}
files = (
"./output_test/Membros_ativos-10-2020.ods",
"./output_test/Membros_ativos-Verbas Indenizatorias-10-2020.ods",
)
employees = parser.parse_active_members(files, "10", "2020")
# Verificações
self.assertEqual(1, len(employees))
self.assertDictEqual(employees[0], expected)
def test_active_servants_july_2019(self):
self.maxDiff = None
expected = {
"reg": "7103",
"name": "ADEMAR RODRIGO CARETTA",
"role": "AUXILIAR DE PROMOTORIA I",
"type": "servidor",
"workplace": "CENTRO TEC. INF. E COMUNICACAO",
"active": True,
"income": {
"total": 6967.67,
"wage": 3108.6,
"perks": {
"total": 3781.36,
"food": 920.0,
"transportation": 314.16,
"pre_school": 423.0,
"vacation_pecuniary": 2124.2,
},
"other": {
"total": 77.71,
"trust_position": 0.0,
"others_total": 77.71,
"others": {
"Gratificação Natalina": 0.0,
"Férias (1/3 constitucional)": 0.0,
"Abono de Permanência": 0.0,
"INSALUBRIDADE": 0.0,
"SUBSTITUIÇÃO DE FUNÇÃO": 0.0,
"VIATURA": 0.0,
"GRAT. DE QUALIFICAÇÂO": 77.71,
},
},
},
"discounts": {
"total": 475.96,
"prev_contribution": 404.11,
"ceil_retention": 0.0,
"income_tax": 71.85,
},
}
files = (
"./output_test/Servidores_ativos-07-2019.ods",
"./output_test/Servidores_ativos-Verbas Indenizatorias-07-2019.ods",
)
employees = parser.unused_parse_active_servants(files, "07", "2019")
# Verificações
self.assertEqual(1, len(employees))
self.assertDictEqual(employees[0], expected)
def test_active_servants_oct_2019(self):
self.maxDiff = None
expected = {
"reg": "5641",
"name": "ADELSON SANTOS DA CRUZ",
"role": "AUXILIAR DE PROMOTORIA I",
"type": "servidor",
"workplace": "SERVICO TECNICO ADMINISTRATIVO DE SANTOS",
"active": True,
"income": {
"total": 8711.12,
"wage": 3170.76,
"perks": {
"total": 3887.73,
"transportation": 314.16,
"food": 920.0,
"pre_school": 0.0,
"vacation_pecuniary": 2653.57,
"premium_license_pecuniary": 0.0,
},
"other": {
"total": 1652.63,
"trust_position": 712.52,
"others_total": 940.11,
"others": {
"Gratificação Natalina": 0.0,
"Férias (1/3 constitucional)": 0.0,
"Abono de Permanência": 0.0,
"Adic. Insalubridade": 712.52,
"Subst. Eventual": 0.0,
"Ato Norm 766/2013": 130.51,
"Gratificação Qualificação": 97.08,
},
},
},
"discounts": {
"total": 705.18,
"prev_contribution": 507.43,
"ceil_retention": 0.0,
"income_tax": 197.75,
},
}
files = (
"./output_test/Servidores_ativos-10-2019.ods",
"./output_test/Servidores_ativos-Verbas Indenizatorias-10-2019.ods",
)
employees = parser.unused_parse_active_servants(files, "10", "2019")
# Verificações
self.assertEqual(1, len(employees))
self.assertDictEqual(employees[0], expected)
def test_active_servants_nov_2019(self):
self.maxDiff = None
expected = {
"reg": "4921",
"name": "ADRIANE MOREIRA TEMPEST",
"role": "ASSESSOR DO MP",
"type": "servidor",
"workplace": "SERVICO TECNICO ADMINISTRATIVO DE SANTOS",
"active": True,
"income": {
"total": 19286.37,
"wage": 16552.89,
"perks": {
"total": 1259.2,
"transportation": 299.2,
"food": 960.0,
"pre_school": 0.0,
"vacation_pecuniary": 0.0,
"premium_license_pecuniary": 0.0,
},
"other": {
"total": 1474.28,
"trust_position": 761.76,
"others_total": 712.52,
"others": {
"Gratificação Natalina": 0.0,
"Férias (1/3 constitucional)": 0.0,
"Abono de Permanência": 0.0,
"Adic. Insalubridade": 712.52,
"Subst. Eventual": 0.0,
"Ato Norm 766/2013": 0.0,
"Gratificação Qualificação": 0.0,
},
},
},
"discounts": {
"total": 4899.1,
"prev_contribution": 987.63,
"ceil_retention": 0.0,
"income_tax": 3911.47,
},
}
files = (
"./output_test/Servidores_ativos-11-2019.ods",
"./output_test/Servidores_ativos-Verbas Indenizatorias-11-2019.ods",
)
employees = parser.unused_parse_active_servants(files, "11", "2019")
# Verificações
self.assertEqual(1, len(employees))
self.assertDictEqual(employees[0], expected)
def test_active_servants_mar_2020(self):
self.maxDiff = None
expected = {
"reg": "5641",
"name": "ADELSON SANTOS DA CRUZ",
"role": " AUXILIAR DE PROMOTORIA I ",
"type": "servidor",
"workplace": " SERVICO TECNICO ADMINISTRATIVO DE SANTOS ",
"active": True,
"income": {
"total": 6117.71,
"wage": 3295.87,
"perks": {
"total": 1296.6,
"transportation": 336.6,
"food": 960.0,
"pre_school": 0.0,
"vacation_pecuniary": 0.0,
"premium_license_pecuniary": 0.0,
},
"other": {
"total": 1525.24,
"trust_position": 712.52,
"others_total": 812.72,
"others": {
"Gratificação Natalina": 0.0,
"Férias (1/3 constitucional)": 0.0,
"Abono de Permanência": 0.0,
"Adic. Insalubridade": 712.52,
"Subst. Eventual": 0.0,
"Ato Norm 766/2013": 0.0,
"Gratificação Qualificação": 100.2,
},
},
},
"discounts": {
"total": 716.43,
"prev_contribution": 521.08,
"ceil_retention": 0.0,
"income_tax": 195.35,
},
}
files = (
"./output_test/Servidores_ativos-03-2020.ods",
"./output_test/Servidores_ativos-Verbas Indenizatorias-03-2020.ods",
)
employees = parser.unused_parse_active_servants(files, "03", "2020")
# Verificações
self.assertEqual(1, len(employees))
self.assertDictEqual(employees[0], expected)
def test_active_servants_april_2020(self):
self.maxDiff = None
expected = {
"reg": "5057",
"name": "ALEX SANDRO CLEMENTE DE OLIVEIRA",
"role": " AUXILIAR DE PROMOTORIA I ",
"type": "servidor",
"workplace": " SERVICO TECNICO ADMINISTRATIVO DE PRESIDENTE PRUDENTE ",
"active": True,
"income": {
"total": 8602.73,
"wage": 3738.17,
"perks": {
"total": 1113.0,
"transportation": 153.0,
"food": 960.0,
"pre_school": 0.0,
"vacation_pecuniary": 0.0,
},
"other": {
"total": 3751.56,
"trust_position": 712.52,
"others_total": 3039.04,
"others": {
"Gratificação Natalina": 2215.25,
"Férias (1/3 constitucional)": 0.0,
"Abono de Permanência": 0.0,
"Adic. Insalubridade": 712.52,
"Subst. Eventual": 0.0,
"Ato Norm 766/2013": 0.0,
"Gratificação Qualificação": 111.27,
},
},
},
"discounts": {
"total": 1192.12,
"prev_contribution": 981.03,
"ceil_retention": 0.0,
"income_tax": 211.09,
},
}
files = (
"./output_test/Servidores_ativos-04-2020.ods",
"./output_test/Servidores_ativos-Verbas Indenizatorias-04-2020.ods",
)
employees = parser.unused_parse_active_servants(files, "04", "2020")
# Verificações
self.assertEqual(1, len(employees))
self.assertDictEqual(employees[0], expected)
def test_active_servants_aug_2020(self):
self.maxDiff = None
expected = {
"reg": "5068",
"name": "JULIANO SIMAO MOREIRA",
"role": "AUXILIAR DE PROMOTORIA I",
"type": "servidor",
"workplace": "SERVICO TECNICO-ADMINISTRATIVO DE RIBEIRAO PRETO",
"active": True,
"income": {
"total": 5392.04,
"wage": 3609.93,
"perks": {
"total": 929.4,
"transportation": -30.6,
"food": 960.0,
"pre_school": 0.0,
"vacation_pecuniary": 0.0,
"premium_license_pecuniary": 0.0,
},
"other": {
"total": 852.71,
"trust_position": 0.0,
"others_total": 852.71,
"others": {
"Gratificação Natalina": 0.0,
"Férias (1/3 constitucional)": 0.0,
"Abono de Permanência": 0.0,
"Adic. Insalubridade": 743.87,
"Substituição de Função": 0.0,
"Viatura": 0.0,
"Gratificação Qualificação": 108.84,
},
},
},
"discounts": {
"total": 785.75,
"prev_contribution": 539.08,
"ceil_retention": 0.0,
"income_tax": 246.67,
},
}
files = (
"./output_test/Servidores_ativos-08-2020.ods",
"./output_test/Servidores_ativos-Verbas Indenizatorias-08-2020.ods",
)
employees = parser.unused_parse_active_servants(files, "08", "2020")
# Verificações
self.assertEqual(1, len(employees))
self.assertDictEqual(employees[0], expected)
def test_active_servants_oct_2020(self):
self.maxDiff = None
expected = {
"reg": "1469",
"name": "ABEL VIEIRA DE MENEZES FILHO",
"role": "AUX. DE PROMOTORIA ENCARREGADO",
"type": "servidor",
"workplace": "AREA REGIONAL DA CAPITAL",
"active": True,
"income": {
"total": 7705.76,
"wage": 6623.36,
"perks": {
"total": 1082.4,
"transportation": 122.4,
"food": 960.0,
"pre_school": 0.0,
"vacation_pecuniary": 0.0,
},
"other": {
"total": 0.0,
"trust_position": 0.0,
"others_total": 0.0,
"others": {
"Gratificação Natalina": 0.0,
"Férias (1/3 constitucional)": 0.0,
"Abono de Permanência": 0.0,
"Adic. Insalubridade": 0.0,
"Substituição de Função": 0.0,
"Viatura": 0.0,
"Gratificação Qualificação": 0.0,
},
},
},
"discounts": {
"total": 1580.82,
"prev_contribution": 867.25,
"ceil_retention": 0.0,
"income_tax": 713.57,
},
}
files = (
"./output_test/Servidores_ativos-10-2020.ods",
"./output_test/Servidores_ativos-Verbas Indenizatorias-10-2020.ods",
)
employees = parser.unused_parse_active_servants(files, "10", "2020")
# Verificações
self.assertEqual(1, len(employees))
self.assertDictEqual(employees[0], expected)
def test_active_memberes_dez_2020(self):
self.maxDiff = None
expected = {
"reg": "2250",
"name": "ADELMO PINHO",
"role": "PROMOTOR DE JUSTICA (ENTRANCIA FINAL)",
"type": "membro",
"workplace": "PROMOTORIA DE JUSTICA DE ARACATUBA",
"active": True,
"income": {
"total": 87007.52,
"wage": 33689.1,
"perks": {
"total": 30905.86,
"food": 960.0,
"vacation_pecuniary": 29945.86,
},
"other": {
"total": 22412.56,
"trust_position": 0.0,
"others_total": 22412.56,
"others": {
"Gratificação Natalina": 20728.12,
"Férias (1/3 constitucional)": 0.0,
"Abono de Permanência": 0.0,
"GRAT. CUMULATIVA": 0.0,
"GRAT. NATUREZA ESPECIAL": 1684.44,
"GRAT. DE GRUPO DE ATUAÇÃO ESPECIAL": 0.0,
},
},
},
"discounts": {
"total": 23737.92,
"prev_contribution": 8461.43,
"ceil_retention": 0.0,
"income_tax": 15276.49,
},
}
files = (
"./output_test/Membros_ativos-12-2020.ods",
"./output_test/Membros_ativos-Verbas Indenizatorias-12-2020.ods",
)
employees = parser.parse_active_members(files, "12", "2020")
# Verificações
self.assertEqual(1, len(employees))
self.assertDictEqual(employees[0], expected)
def test_active_servants_dez_2020(self):
self.maxDiff = None
expected = {
"reg": "10322",
"name": "ADAMO VINICIUS PINHEIRO CAROL",
"role": "ANALISTA JURIDICO DO MP",
"type": "servidor",
"workplace": "AREA REGIONAL DA CAPITAL",
"active": True,
"income": {
"total": 25645.96,
"wage": 8145.02,
"perks": {
"total": 12512.12,
"transportation": -122.4,
"food": 960.0,
"pre_school": 0.0,
"vacation_pecuniary": 11674.52,
"premium_license_pecuniary": 0.0,
},
"other": {
"total": 4988.82,
"trust_position": 0.0,
"others_total": 4988.82,
"others": {
"Gratificação Natalina": 4377.95,
"Férias (1/3 constitucional)": 0.0,
"Abono de Permanência": 0.0,
"Adic. Insalubridade": 0.0,
"Substituição de Função": 0.0,
"Gratificação Qualificação": 610.87,
},
},
},
"discounts": {
"total": 3636.88,
"prev_contribution": 978.0,
"ceil_retention": 0.0,
"income_tax": 2658.88,
},
}
files = (
"./output_test/Servidores_ativos-12-2020.ods",
"./output_test/Servidores_ativos-Verbas Indenizatorias-12-2020.ods",
)
employees = parser.unused_parse_active_servants(files, "12", "2020")
# Verificações
self.assertEqual(1, len(employees))
self.assertDictEqual(employees[0], expected)
def test_inactive_servants_dez_2020(self):
self.maxDiff = None
expected = {
"reg": "1210",
"name": "ANTONIO AUGUSTO TAVARES",
"role": "OFICIAL DE PROMOTORIA I",
"type": "servidor",
"workplace": "SERVICO TECNICO-ADMINISTRATIVO DE CAMPINAS",
"active": False,
"income": {
"total": 15203.92,
"wage": 11468.15,
"perks": {
"total": -1266.0,
"food": -960.0,
"transportation": -306.0,
"vacation_pecuniary": 0.0,
"premium_license_pecuniary": 0.0,
},
"other": {
"total": 5001.77,
"trust_position": 0.0,
"others_total": 5001.77,
"others": {
"Gratificação Natalina": 5734.08,
"Férias (1/3 constitucional)": 0.0,
"Abono de Permanência": -732.31,
"INSALUBRIDADE": 0.0,
},
},
},
"discounts": {
"total": 4349.13,
"prev_contribution": 1709.24,
"ceil_retention": 0.0,
"income_tax": 2639.89,
},
}
files = (
"./output_test/Servidores_inativos-12-2020.ods",
"./output_test/Servidores_inativos-Verbas Indenizatorias-12-2020.ods",
)
employees = parser.unused_parse_inactive_servants(files, "12", "2020")
# Verificações
self.assertEqual(1, len(employees))
self.assertDictEqual(employees[0], expected)
def test_active_members_jan_2018(self):
self.maxDiff = None
expected = {
"reg": "1632",
"name": "ADALBERTO DENSER DE SA JUNIOR",
"role": "PROMOTOR DE JUSTICA (ENTRANCIA FINAL)",
"type": "membro",
"workplace": "PROMOTORIA DE JUSTICA DA CAPITAL",
"active": True,
"income": {
"total": 40321.3,
"wage": 28947.55,
"perks": {
"total": 5277.73,
"food": 900.0,
"housing_aid": 4377.73,
"vacation_pecuniary": 0.0,
"premium_license_pecuniary": 0.0,
},
"other": {
"total": 6096.02,
"trust_position": 0.0,
"others_total": 6096.02,
"others": {
"Gratificação Natalina": 0.0,
"Férias (1/3 constitucional)": 0.0,
"Abono de Permanência": 0.0,
"Outras remunerações temporárias": 6096.02,
},
},
},
"discounts": {
"total": 10357.72,
"prev_contribution": 3184.23,
"ceil_retention": 0.0,
"income_tax": 7173.49,
},
}
files = ("./output_test/Membros_ativos-01-2018.ods",)
employees = parser.parse_active_members(files, "01", "2018")
# Verificações
self.assertEqual(1, len(employees))
self.assertDictEqual(employees[0], expected)
def test_active_members_jan_2018(self):
self.maxDiff = None
expected = {
"reg": "3339",
"name": "ADONAI GABRIEL",
"role": "PROMOTOR DE JUSTICA (ENTRANCIA FINAL)",
"type": "membro",
"workplace": "PROMOTORIA DE JUSTICA DE BRAGANCA PAULISTA",
"active": True,
"income": {
"total": 76325.45,
"wage": 28947.55,
"perks": {
"total": 43894.46,
"food": 920.0,
"housing_aid": 4377.73,
"vacation_pecuniary": 38596.73,
},
"other": {
"total": 3483.44,
"trust_position": 0.0,
"others_total": 3483.44,
"others": {
"Gratificação Natalina": 0.0,
"Férias (1/3 constitucional)": 0.0,
"Abono de Permanência": 0.0,
"Outras remunerações temporárias": 3483.44,
},
},
},
"discounts": {
"total": 10253.45,
"prev_contribution": 3184.23,
"ceil_retention": 0.0,
"income_tax": 7069.22,
},
}
files = ("./output_test/Membros_ativos-10-2018.ods",)
employees = parser.parse_active_members(files, "10", "2018")
# Verificações
self.assertEqual(1, len(employees))
self.assertDictEqual(employees[0], expected)
def test_active_members_fev_2019(self):
self.maxDiff = None
expected = [
{
"reg": "3818",
"name": "YURI GIUSEPPE CASTIGLIONE",
"role": "PROMOTOR DE JUSTICA (ENTRANCIA FINAL)",
"type": "membro",
"workplace": "PROMOTORIA DE JUSTICA DA REGIONAL DA LAPA",
"active": True,
"income": {
"total": 35944.25,
"wage": 33689.1,
"perks": {"total": 920.0, "food": 920.0, "ferias em pecunia": 0.0},
"other": {
"total": 1335.15,
"trust_position": 1335.15,
"others_total": 0.0,
"others": {
"Gratificação Natalina": 0.0,
"Férias (1/3 constitucional)": 0.0,
"Abono de Permanência": 0.0,
"Outras remunerações temporárias": 0.0,
},
},
},
"discounts": {
"total": 11864.3,
"prev_contribution": 3852.66,
"ceil_retention": 0.0,
"income_tax": 8011.64,
},
},
{
"reg": "594674",
"name": "YVES ATAHUALPA PINTO",
"role": "PROMOTOR DE JUSTICA (ENTRANCIA FINAL)",
"type": "membro",
"workplace": "PROMOTORIA DE JUSTICA DE CATANDUVA",
"active": True,
"income": {
"total": 39424.55,
"wage": 33689.1,
"perks": {"total": 920.0, "food": 920.0, "ferias em pecunia": 0.0},
"other": {
"total": 4815.45,
"trust_position": 0.0,
"others_total": 4815.45,
"others": {
"Gratificação Natalina": 0.0,
"Férias (1/3 constitucional)": 0.0,
"Abono de Permanência": 0.0,
"Outras remunerações temporárias": 4815.45,
},
},
},
"discounts": {
"total": 12486.15,
"prev_contribution": 3746.79,
"ceil_retention": 0.0,
"income_tax": 8739.36,
},
},
{
"reg": "2245",
"name": "ZENON LOTUFO TERTIUS",
"role": "PROMOTOR DE JUSTICA (ENTRANCIA FINAL)",
"type": "membro",
"workplace": "PROMOTORIA DE JUSTICA DE GUARULHOS",
"active": True,
"income": {
"total": 35944.25,
"wage": 33689.1,
"perks": {"total": 920.0, "food": 920.0, "ferias em pecunia": 0.0},
"other": {
"total": 1335.15,
"trust_position": 1335.15,
"others_total": 0.0,
"others": {
"Gratificação Natalina": 0.0,
"Férias (1/3 constitucional)": 0.0,
"Abono de Permanência": 0.0,
"Outras remunerações temporárias": 0.0,
},
},
},
"discounts": {
"total": 12614.14,
"prev_contribution": 3893.66,
"ceil_retention": 0.0,
"income_tax": 8720.48,
},
},
]
files = ("./output_test/Membros_ativos-02-2019.ods",)
employees = parser.parse_active_members(files, "02", "2019")
# Verificações
self.assertEqual(3, len(employees))
self.assertEqual(employees, expected)
def test_active_members_nov_2020(self):
self.maxDiff = None
expected = [
{
"reg": "3818",
"name": "YURI GIUSEPPE CASTIGLIONE",
"role": "PROMOTOR DE JUSTICA (ENTRANCIA FINAL)",
"type": "membro",
"workplace": "PROMOTORIA DE JUSTICA REGIONAL DA LAPA",
"active": True,
"income": {
"total": 49622.03,
"wage": 33689.1,
"perks": {
"total": 15932.93,
"food": 960.0,
"vacation_pecuniary": 14972.93,
"premium_license_pecuniary": 0.0,
},
"other": {
"total": 0.0,
"trust_position": 0.0,
"others_total": 0.0,
"others": {
"Gratificação Natalina": 0.0,
"Férias (1/3 constitucional)": 0.0,
"Abono de Permanência": 0.0,
"GRAT. CUMULATIVA": 0.0,
"GRAT. NATUREZA ESPECIAL": 0.0,
"GRAT. DE GRUPO DE ATUAÇÃO ESPECIAL": 0.0,
},
},
},
"discounts": {
"total": 13043.27,
"prev_contribution": 5557.77,
"ceil_retention": 0.0,
"income_tax": 7485.5,
},
},
{
"reg": "594674",
"name": "YVES ATAHUALPA PINTO",
"role": "PROMOTOR DE JUSTICA (ENTRANCIA FINAL)",
"type": "membro",
"workplace": "PROMOTORIA DE JUSTICA DE CATANDUVA",
"active": True,
"income": {
"total": 49622.03,
"wage": 33689.1,
"perks": {
"total": 15932.93,
"food": 960.0,
"vacation_pecuniary": 14972.93,
"premium_license_pecuniary": 0.0,
},
"other": {
"total": 0.0,
"trust_position": 0.0,
"others_total": 0.0,
"others": {
"Gratificação Natalina": 0.0,
"Férias (1/3 constitucional)": 0.0,
"Abono de Permanência": 0.0,
"GRAT. CUMULATIVA": 0.0,
"GRAT. NATUREZA ESPECIAL": 0.0,
"GRAT. DE GRUPO DE ATUAÇÃO ESPECIAL": 0.0,
},
},
},
"discounts": {
"total": 9054.1,
"prev_contribution": 5197.77,
"ceil_retention": 0.0,
"income_tax": 3856.33,
},
},
{
"reg": "2245",
"name": "ZENON LOTUFO TERTIUS",
"role": "PROMOTOR DE JUSTICA (ENTRANCIA FINAL)",
"type": "membro",
"workplace": "PROMOTORIA DE JUSTICA DO PATRIMONIO PUBLICO E SOCIAL",
"active": True,
"income": {
"total": 51550.58,
"wage": 34601.97,
"perks": {
"total": 16526.33,
"food": 960.0,
"vacation_pecuniary": 15566.33,
"premium_license_pecuniary": 0.0,
},
"other": {
"total": 422.28,
"trust_position": 422.28,
"others_total": 0.0,
"others": {
"Gratificação Natalina": 0.0,
"Férias (1/3 constitucional)": 0.0,
"Abono de Permanência": 0.0,
"GRAT. CUMULATIVA": 0.0,
"GRAT. NATUREZA ESPECIAL": 0.0,
"GRAT. DE GRUPO DE ATUAÇÃO ESPECIAL": 0.0,
},
},
},
"discounts": {
"total": 12685.57,
"prev_contribution": 5411.4,
"ceil_retention": 0.0,
"income_tax": 7274.17,
},
},
]
files = (
"./output_test/Membros_ativos-11-2020.ods",
"./output_test/Membros_ativos-Verbas Indenizatorias-11-2020.ods",
)
employees = parser.parse_active_members(files, "11", "2020")
# Verificações
self.assertEqual(3, len(employees))
self.assertEqual(employees, expected)
def test_active_members_jan_2021(self):
self.maxDiff = None
expected = {
"reg": "2250",
"name": "ADELMO PINHO",
"role": "PROMOTOR DE JUSTICA (ENTRANCIA FINAL)",
"type": "membro",
"workplace": "PROMOTORIA DE JUSTICA DE ARACATUBA",
"active": True,
"income": {
"total": 56546.97,
"wage": 33689.1,
"perks": {"total": 960.0, "food": 960.0},
"other": {
"total": 21897.87,
"trust_position": 0.0,
"others_total": 21897.87,
"others": {
"Gratificação Natalina": 16844.55,
"Férias (1/3 constitucional)": 0.0,
"Abono de Permanência": 0.0,
"GRAT. CUMULATIVA": 0.0,
"GRAT. NATUREZA ESPECIAL": 5053.32,
"GRAT. DE GRUPO DE ATUAÇÃO ESPECIAL": 0.0,
},
},
},
"discounts": {
"total": 14637.3,
"prev_contribution": 7679.57,
"ceil_retention": 0.0,
"income_tax": 6957.73,
},
}
files = (
"./output_test/Membros_ativos-01-2021.ods",
"./output_test/Membros_ativos-Verbas Indenizatorias-01-2021.ods",
)
employees = parser.parse_active_members(files, "01", "2021")
# Verificações
self.assertEqual(1, len(employees))
self.assertDictEqual(employees[0], expected)
def test_active_members_fev_2021(self):
self.maxDiff = None
expected = {
"reg": "3182",
"name": "ADOLFO CESAR DE CASTRO E ASSIS",
"role": "PROMOTOR DE JUSTICA (ENTRANCIA FINAL)",
"type": "membro",
"workplace": "PROMOTORIA DE JUSTICA DE SAO BERNARDO DO CAMPO",
"active": True,
"income": {
"total": 56659.29,
"wage": 33689.1,
"perks": {"total": 960.0, "food": 960.0, "vacation_pecuniary": 0.0},
"other": {
"total": 22010.19,
"trust_position": 0.0,
"others_total": 22010.19,
"others": {
"Gratificação Natalina": 16844.55,
"Férias (1/3 constitucional)": 0.0,
"Abono de Permanência": 0.0,
"GRAT. CUMULATIVA": 4042.68,
"GRAT. NATUREZA ESPECIAL": 1122.96,
"GRAT. DE GRUPO DE ATUAÇÃO ESPECIAL": 0.0,
},
},
},
"discounts": {
"total": 16068.74,
"prev_contribution": 7679.57,
"ceil_retention": 0.0,
"income_tax": 8389.17,
},
}
files = (
"./output_test/Membros_ativos-02-2021.ods",
"./output_test/Membros_ativos-Verbas Indenizatorias-02-2021.ods",
)
employees = parser.parse_active_members(files, "02", "2021")
# Verificações
self.assertEqual(1, len(employees))
self.assertDictEqual(employees[0], expected)
def test_active_members_mar_2021(self):
self.maxDiff = None
expected = {
"reg": "3339",
"name": "ADONAI GABRIEL",
"role": "PROMOTOR DE JUSTICA (ENTRANCIA FINAL)",
"type": "membro",
"workplace": "PROMOTORIA DE JUSTICA DE BRAGANCA PAULISTA",
"active": True,
"income": {
"total": 49659.38,
"wage": 33689.1,
"perks": {
"total": 10467.8,
"food": 960.0,
"vacation_pecuniary": 7486.46,
"health": 2021.34,
},
"other": {
"total": 5502.48,
"trust_position": 0.0,
"others_total": 5502.48,
"others": {
"Gratificação Natalina": 0.0,
"Férias (1/3 constitucional)": 0.0,
"Abono de Permanência": 0.0,
"GRAT. CUMULATIVA": 3818.04,
"GRAT. NATUREZA ESPECIAL": 1684.44,
"GRAT. DE GRUPO DE ATUAÇÃO ESPECIAL": 0.0,
},
},
},
"discounts": {
"total": 13564.87,
"prev_contribution": 5187.35,
"ceil_retention": 0.0,
"income_tax": 8377.52,
},
}
files = (
"./output_test/Membros_ativos-03-2021.ods",
"./output_test/Membros_ativos-Verbas Indenizatorias-03-2021.ods",
)
employees = parser.parse_active_members(files, "03", "2021")
# Verificações
self.assertEqual(1, len(employees))
self.assertDictEqual(employees[0], expected)
if __name__ == "__main__":
unittest.main()
| 35.572499
| 87
| 0.423124
| 6,743
| 80,714
| 4.951357
| 0.112116
| 0.021326
| 0.013418
| 0.012939
| 0.826699
| 0.804145
| 0.74553
| 0.710187
| 0.632072
| 0.579447
| 0
| 0.109894
| 0.453887
| 80,714
| 2,268
| 88
| 35.588183
| 0.647542
| 0.012092
| 0
| 0.557853
| 0
| 0
| 0.289895
| 0.049621
| 0
| 0
| 0
| 0
| 0.045298
| 1
| 0.022649
| false
| 0
| 0.001477
| 0
| 0.024618
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
bbd9cfdf46e938f8963f7da05a8c2aa0e9199dbc
| 142
|
py
|
Python
|
kdl_wagtail/people/apps.py
|
kingsdigitallab/django-kdl-wagtail
|
457623a35057f88ee575397ac2c68797f35085e1
|
[
"MIT"
] | 3
|
2020-02-18T07:19:13.000Z
|
2021-06-14T20:35:08.000Z
|
kdl_wagtail/people/apps.py
|
kingsdigitallab/django-kdl-wagtail
|
457623a35057f88ee575397ac2c68797f35085e1
|
[
"MIT"
] | 16
|
2019-02-08T19:39:27.000Z
|
2020-07-30T20:01:38.000Z
|
kdl_wagtail/people/apps.py
|
kingsdigitallab/django-kdl-wagtail
|
457623a35057f88ee575397ac2c68797f35085e1
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class KdlWagtailPeopleConfig(AppConfig):
name = 'kdl_wagtail.people'
label = 'kdl_wagtail_people'
| 20.285714
| 40
| 0.767606
| 16
| 142
| 6.625
| 0.75
| 0.188679
| 0.301887
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.15493
| 142
| 6
| 41
| 23.666667
| 0.883333
| 0
| 0
| 0
| 0
| 0
| 0.253521
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.25
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
bbecf45df45b658899aa7e1d2dde8fa575f34e05
| 1,382
|
py
|
Python
|
input4/source/inval.py
|
jhfatehi/brewpc
|
bf2e2370af4dbf1f297073faf3a67c3f14406d33
|
[
"BSD-3-Clause"
] | null | null | null |
input4/source/inval.py
|
jhfatehi/brewpc
|
bf2e2370af4dbf1f297073faf3a67c3f14406d33
|
[
"BSD-3-Clause"
] | null | null | null |
input4/source/inval.py
|
jhfatehi/brewpc
|
bf2e2370af4dbf1f297073faf3a67c3f14406d33
|
[
"BSD-3-Clause"
] | null | null | null |
import mysql.connector
def check_brew_batch(db_path, brew_num, batch):
query = '''SELECT count(1)
from mash
where brew_num = %s and batch_num = %s'''
conn = mysql.connector.connect(
user=db_path.get('mysql', 'usr'),
password=db_path.get('mysql', 'pw'),
host='127.0.0.1',
database=db_path.get('mysql', 'db'),
port=db_path.get('mysql', 'local_bind_port'))
cur = conn.cursor()
cur.execute(query, (brew_num, batch))
rows = cur.fetchall()
return rows[0][0]
def check_brew(db_path, brew_num):
query = '''SELECT count(1)
from brews
where brew_num = %s'''
conn = mysql.connector.connect(
user=db_path.get('mysql', 'usr'),
password=db_path.get('mysql', 'pw'),
host='127.0.0.1',
database=db_path.get('mysql', 'db'),
port=db_path.get('mysql', 'local_bind_port'))
cur = conn.cursor()
cur.execute(query, (brew_num,))
rows = cur.fetchall()
return rows[0][0]
def check_int(x):
try:
int(x)
except:
return 0
return 1
def check_brand(db_path, brand):
query = '''SELECT count(1)
from process
where brand = %s'''
conn = mysql.connector.connect(
user=db_path.get('mysql', 'usr'),
password=db_path.get('mysql', 'pw'),
host='127.0.0.1',
database=db_path.get('mysql', 'db'),
port=db_path.get('mysql', 'local_bind_port'))
cur = conn.cursor()
cur.execute(query, (brand,))
rows = cur.fetchall()
return rows[0][0]
| 26.075472
| 48
| 0.649783
| 220
| 1,382
| 3.931818
| 0.209091
| 0.104046
| 0.124855
| 0.19422
| 0.776879
| 0.704046
| 0.704046
| 0.672832
| 0.672832
| 0.591908
| 0
| 0.024914
| 0.157742
| 1,382
| 53
| 49
| 26.075472
| 0.718213
| 0
| 0
| 0.612245
| 0
| 0
| 0.238612
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.081633
| false
| 0.061224
| 0.020408
| 0
| 0.204082
| 0
| 0
| 0
| 0
| null | 0
| 0
| 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
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
a544649ed12ce7034988d7647aac6d27419d86e7
| 157
|
py
|
Python
|
Dataset/Leetcode/valid/94/771.py
|
kkcookies99/UAST
|
fff81885aa07901786141a71e5600a08d7cb4868
|
[
"MIT"
] | null | null | null |
Dataset/Leetcode/valid/94/771.py
|
kkcookies99/UAST
|
fff81885aa07901786141a71e5600a08d7cb4868
|
[
"MIT"
] | null | null | null |
Dataset/Leetcode/valid/94/771.py
|
kkcookies99/UAST
|
fff81885aa07901786141a71e5600a08d7cb4868
|
[
"MIT"
] | null | null | null |
class Solution:
def XXX(self, root: TreeNode) -> List[int]:
return [] if not root else self.XXX(root.left) + [root.val] + self.XXX(root.right)
| 31.4
| 90
| 0.630573
| 24
| 157
| 4.125
| 0.666667
| 0.141414
| 0.222222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.210191
| 157
| 4
| 91
| 39.25
| 0.798387
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
a54ac99c017e150710855a2532445add6b97daf4
| 249
|
py
|
Python
|
scripts/registration/testRegistration.py
|
hz-ants/LabelFusion-docker2-
|
8dc116064a1bdcfa2c2dd814580b5f43d46c6f40
|
[
"BSD-3-Clause"
] | 313
|
2017-07-16T02:00:16.000Z
|
2022-03-31T11:00:10.000Z
|
scripts/registration/testRegistration.py
|
hz-ants/LabelFusion-docker2-
|
8dc116064a1bdcfa2c2dd814580b5f43d46c6f40
|
[
"BSD-3-Clause"
] | 94
|
2017-07-16T19:59:06.000Z
|
2022-03-30T08:14:22.000Z
|
scripts/registration/testRegistration.py
|
hz-ants/LabelFusion-docker2-
|
8dc116064a1bdcfa2c2dd814580b5f43d46c6f40
|
[
"BSD-3-Clause"
] | 87
|
2017-07-14T16:01:54.000Z
|
2022-03-23T17:33:47.000Z
|
"""
Usage:
drake-visualizer --script testRegistration.py
"""
from labelfusion.registration import GlobalRegistration
globalRegistration = GlobalRegistration(view, measurementPanel)
gr = globalRegistration
# globalRegistration.testSuperPCS4()
| 20.75
| 63
| 0.811245
| 19
| 249
| 10.631579
| 0.789474
| 0.534653
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.004484
| 0.104418
| 249
| 11
| 64
| 22.636364
| 0.901345
| 0.369478
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 1
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
a55f1fe1acfa765388bee67d15a1a733b7aafe21
| 126
|
py
|
Python
|
common_logger/utils1.py
|
NathanKr/python-logger-playground
|
8a10f9199bfd7cf42902e9e66984299013f52e7e
|
[
"MIT"
] | null | null | null |
common_logger/utils1.py
|
NathanKr/python-logger-playground
|
8a10f9199bfd7cf42902e9e66984299013f52e7e
|
[
"MIT"
] | null | null | null |
common_logger/utils1.py
|
NathanKr/python-logger-playground
|
8a10f9199bfd7cf42902e9e66984299013f52e7e
|
[
"MIT"
] | null | null | null |
import logging
def add(num1 : float,num2 : float)->float:
logging.warning(f'args : {num1} , {num2}')
return num1+num2
| 25.2
| 46
| 0.65873
| 18
| 126
| 4.611111
| 0.611111
| 0.192771
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.058252
| 0.18254
| 126
| 5
| 47
| 25.2
| 0.747573
| 0
| 0
| 0
| 0
| 0
| 0.173228
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
a5829e23f881bdcb15a14c615503376f83d6a984
| 27
|
py
|
Python
|
ask_fandom/__init__.py
|
Wikia/ask-fandom
|
cc1d6f9b73a41c0e67b62512c8c0731d340b3015
|
[
"MIT"
] | 5
|
2019-03-09T11:25:47.000Z
|
2021-11-03T09:44:03.000Z
|
ask_fandom/__init__.py
|
Wikia/ask-fandom
|
cc1d6f9b73a41c0e67b62512c8c0731d340b3015
|
[
"MIT"
] | 11
|
2019-03-08T17:58:25.000Z
|
2019-03-24T10:57:26.000Z
|
ask_fandom/__init__.py
|
Wikia/ask-fandom
|
cc1d6f9b73a41c0e67b62512c8c0731d340b3015
|
[
"MIT"
] | 1
|
2019-03-18T17:39:55.000Z
|
2019-03-18T17:39:55.000Z
|
"""
Ask Fandom project
"""
| 6.75
| 18
| 0.592593
| 3
| 27
| 5.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.185185
| 27
| 3
| 19
| 9
| 0.727273
| 0.666667
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
a583ab68eb555435cc6676d15f863f2c0afb281f
| 87
|
py
|
Python
|
indigo/apps.py
|
OpenDataServices/indigo-app
|
db41caa4f6f115d47c1dab465361f7b7e44c6807
|
[
"MIT"
] | 1
|
2020-08-06T09:11:06.000Z
|
2020-08-06T09:11:06.000Z
|
indigo/apps.py
|
INDIGO-Initiative/database-app
|
0bb8ef553ea01b6e3cc8ce045322b3337cb2364a
|
[
"MIT"
] | 61
|
2020-07-02T17:23:04.000Z
|
2022-03-25T16:45:56.000Z
|
indigo/apps.py
|
OpenDataServices/indigo-app
|
db41caa4f6f115d47c1dab465361f7b7e44c6807
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class IndigoConfig(AppConfig):
name = "indigo"
| 14.5
| 33
| 0.747126
| 10
| 87
| 6.5
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.172414
| 87
| 5
| 34
| 17.4
| 0.902778
| 0
| 0
| 0
| 0
| 0
| 0.068966
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
a587da4f4b3f8f865cd57487b6cfa635b8d65872
| 149
|
py
|
Python
|
src/djnydus/db/__init__.py
|
disqus/nydus-django
|
b652ea28d7f801f453a64e4ec78899e2acfc7606
|
[
"Apache-2.0"
] | 5
|
2015-08-29T18:07:49.000Z
|
2015-12-06T05:54:30.000Z
|
src/djnydus/db/__init__.py
|
disqus/nydus-django
|
b652ea28d7f801f453a64e4ec78899e2acfc7606
|
[
"Apache-2.0"
] | null | null | null |
src/djnydus/db/__init__.py
|
disqus/nydus-django
|
b652ea28d7f801f453a64e4ec78899e2acfc7606
|
[
"Apache-2.0"
] | null | null | null |
"""
djnydus.db
~~~~~~~~~~
:copyright: (c) 2012 DISQUS.
:license: Apache License 2.0, see LICENSE for more details.
"""
from .base import * # NOQA
| 14.9
| 59
| 0.624161
| 20
| 149
| 4.65
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.04878
| 0.174497
| 149
| 9
| 60
| 16.555556
| 0.707317
| 0.785235
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
a5a59e5d3f792ef5c8f6782cc2c14f50b6342c6d
| 165
|
py
|
Python
|
cst/__init__.py
|
gely/coseis
|
8b608a5f7a5eab570bbd17a6d6caf278e787ada0
|
[
"BSD-2-Clause"
] | 7
|
2015-11-22T16:16:45.000Z
|
2019-08-21T09:19:27.000Z
|
cst/__init__.py
|
gely/coseis
|
8b608a5f7a5eab570bbd17a6d6caf278e787ada0
|
[
"BSD-2-Clause"
] | null | null | null |
cst/__init__.py
|
gely/coseis
|
8b608a5f7a5eab570bbd17a6d6caf278e787ada0
|
[
"BSD-2-Clause"
] | 5
|
2016-06-09T22:34:27.000Z
|
2020-04-12T01:31:11.000Z
|
"""
CST: Computational Seismology Tools
"""
import os
home = os.path.realpath(__file__)
home = os.path.dirname(home)
home = os.path.dirname(home) + os.sep
del(os)
| 15
| 37
| 0.709091
| 25
| 165
| 4.52
| 0.52
| 0.212389
| 0.265487
| 0.300885
| 0.371681
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.133333
| 165
| 10
| 38
| 16.5
| 0.79021
| 0.212121
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.2
| 0
| 0.2
| 0
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
3c17dca1c86cb11ecd750c6afcce688239a59313
| 287
|
py
|
Python
|
tests/test_get_coordinates.py
|
blackglowen/mkad
|
73036651ff15cb5a3697e2987fee14ec82a26a6d
|
[
"MIT"
] | null | null | null |
tests/test_get_coordinates.py
|
blackglowen/mkad
|
73036651ff15cb5a3697e2987fee14ec82a26a6d
|
[
"MIT"
] | null | null | null |
tests/test_get_coordinates.py
|
blackglowen/mkad
|
73036651ff15cb5a3697e2987fee14ec82a26a6d
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
#-*- coding: utf-8 -*-
import pytest
from mkad.wsgi.api import get_coordinates
@pytest.fixture
def address():
return 'Svobody ulitsa, Molodezhnaya ulitsa'
def test_get_coordinates(address):
matches = get_coordinates(address)
assert len(matches) == 10
| 22.076923
| 48
| 0.731707
| 38
| 287
| 5.421053
| 0.710526
| 0.203884
| 0.203884
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.012295
| 0.149826
| 287
| 13
| 49
| 22.076923
| 0.831967
| 0.142857
| 0
| 0
| 0
| 0
| 0.142857
| 0
| 0
| 0
| 0
| 0
| 0.125
| 1
| 0.25
| false
| 0
| 0.25
| 0.125
| 0.625
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 4
|
3c1a3a493ea344e3a7f16cc6dcc060348b9ae755
| 33
|
py
|
Python
|
code/sample_4-2-10.py
|
KoyanagiHitoshi/AtCoder-Python-Introduction
|
6d014e333a873f545b4d32d438e57cf428b10b96
|
[
"MIT"
] | 1
|
2022-03-29T13:50:12.000Z
|
2022-03-29T13:50:12.000Z
|
code/sample_4-2-10.py
|
KoyanagiHitoshi/AtCoder-Python-Introduction
|
6d014e333a873f545b4d32d438e57cf428b10b96
|
[
"MIT"
] | null | null | null |
code/sample_4-2-10.py
|
KoyanagiHitoshi/AtCoder-Python-Introduction
|
6d014e333a873f545b4d32d438e57cf428b10b96
|
[
"MIT"
] | null | null | null |
x = "abcdcc"
print(x.index("c"))
| 11
| 19
| 0.575758
| 6
| 33
| 3.166667
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.121212
| 33
| 2
| 20
| 16.5
| 0.655172
| 0
| 0
| 0
| 0
| 0
| 0.212121
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
3c22a22386278a36b89c50d405766371eb0beba8
| 441
|
py
|
Python
|
importing_custom_modules.py
|
JonTheWong/pySnippets
|
dd59bd151280945bb590a59da0eaa7cd706194ce
|
[
"Linux-OpenIB"
] | null | null | null |
importing_custom_modules.py
|
JonTheWong/pySnippets
|
dd59bd151280945bb590a59da0eaa7cd706194ce
|
[
"Linux-OpenIB"
] | null | null | null |
importing_custom_modules.py
|
JonTheWong/pySnippets
|
dd59bd151280945bb590a59da0eaa7cd706194ce
|
[
"Linux-OpenIB"
] | null | null | null |
from code import readfile, readcsv
# Documentation - https://docs.python.org/3.7/library/importlib.html
# Based on https://stackoverflow.com/a/20749411/8949196, https://stackoverflow.com/questions/1057431/how-to-load-all-modules-in-a-folder/20753073#20753073
# Atom + pyflakes doesnt like * will have to define them manually; but python doesnt complain.
print(readfile.readfile('data/file0.txt'))
print(readcsv.readcsv('data/file0.csv'))
| 44.1
| 154
| 0.780045
| 64
| 441
| 5.375
| 0.75
| 0.104651
| 0.122093
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.103704
| 0.081633
| 441
| 9
| 155
| 49
| 0.745679
| 0.705215
| 0
| 0
| 0
| 0
| 0.224
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0.666667
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
|
0
| 4
|
3c2d1b5d92f1cb3b6c17add7aefa8bdb6a3f5abf
| 164
|
py
|
Python
|
classes/exception/IncorrectOperatorInstanceException.py
|
dimartinot/Data-Analysis-of-a-document-tracker
|
818fff04e870ffc508011dddb199da2d5b618c2b
|
[
"MIT"
] | null | null | null |
classes/exception/IncorrectOperatorInstanceException.py
|
dimartinot/Data-Analysis-of-a-document-tracker
|
818fff04e870ffc508011dddb199da2d5b618c2b
|
[
"MIT"
] | 6
|
2020-03-31T10:22:54.000Z
|
2021-12-13T20:28:24.000Z
|
classes/exception/IncorrectOperatorInstanceException.py
|
dimartinot/Data-Analysis-of-a-document-tracker
|
818fff04e870ffc508011dddb199da2d5b618c2b
|
[
"MIT"
] | null | null | null |
class IncorrectOperatorInstanceException(Exception):
"""Raised when an incorrect instance of Operator is passed to the Factory creating a GUI object"""
pass
| 54.666667
| 102
| 0.786585
| 20
| 164
| 6.45
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.158537
| 164
| 3
| 103
| 54.666667
| 0.934783
| 0.560976
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 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
| 4
|
3c9fd2dc06d333d50438281fc27d11070d14dfd5
| 10,754
|
py
|
Python
|
scripts/al_run.py
|
tyo-nu/SimAL
|
8e9c289bbd77ce2a0bcd998f2dee27990af74a0f
|
[
"MIT"
] | 2
|
2018-11-18T01:49:27.000Z
|
2021-08-24T01:49:00.000Z
|
scripts/al_run.py
|
tyo-nu/SimAL
|
8e9c289bbd77ce2a0bcd998f2dee27990af74a0f
|
[
"MIT"
] | null | null | null |
scripts/al_run.py
|
tyo-nu/SimAL
|
8e9c289bbd77ce2a0bcd998f2dee27990af74a0f
|
[
"MIT"
] | 1
|
2020-08-17T14:00:48.000Z
|
2020-08-17T14:00:48.000Z
|
__author__ = 'Dante'
import os
import math
import machines
import density_weight as dw
from structures.isozyme import BrendaIsozyme as bi
from databases import db_queries as dbq
from structures import fingerprinter as fptr
import numpy as np
import routines
import pybel
CHEMPATH = os.path.join(os.path.dirname(os.path.dirname(__file__)), "chem")
def al_run(org, ec, neg, k, beta=1, pos=None, ent=False, kernel='rbf', degree=3, zinc=True, zinc_tol_l=1, zinc_tol_r=1, greedy=False, vl=None, simfp=fptr.integer_sim, C=5, target_bits=None, screen=None):
#Collects isozyme data into the Isozyme class.
a = bi(org, ec)
if pos:
a.add_from_sdf(pos, k, pos=True)
a.add_from_sdf(neg, k, pos=False)
#Two branches here; one pulls potential test data from ZINC, another pulls from KEGG.
if zinc:
res_ = [(page["smiles"], fptr.integer_fp(str(page["smiles"])), page["vendors"], page["_id"]) for page in dbq.zinc_pull(target_bits, a.mass_avg[k], a.mass_std[k], zinc_tol_l=zinc_tol_l, zinc_tol_r=zinc_tol_r) if u'R' not in page["smiles"] and 'vendors' in page]
res_s = [rr for rr in res_ if rr[1] is not None]
if screen is not None:
patt = [pybel.Smarts(smarts) for smarts in screen.split('|')]
if len(patt) > 2:
raise IOError('al_run only supports OR filters for two SMARTS queries at this time.')
res = [rr for rr in res_s if len(patt[0].findall(pybel.readstring('smi', str(rr[0])))) > 0 or len(patt[1].findall(pybel.readstring('smi', str(rr[0])))) > 0]
else:
res = res_s
else:
res = [(page["SMILES"], np.array(fptr.integer_fp(str(page["SMILES"])))) for page in dbq.kegg_pull(target_bits) if u'R' not in page["SMILES"] and np.array(fptr.integer_fp(str(page["SMILES"]))) is not None]
labels = machines.svm_clf(a.pos[k], a.neg[k], res, kernel=kernel, degree=degree, ent=ent, C=C)
test_a = np.vstack(tuple([np.array(x[1]) for x in res if x[1] is not None and len(x[1]) == 313]))
tc_u = dw.avg_proximity(test_a, test_a, f=simfp)
if greedy:
if ent:
xis = [l * dw.weight(dw.entropy(p), tc_u[i], beta=beta) for i, (l, p) in enumerate(labels)]
else:
xis = [l * dw.weight(dw.hyper_distance(d), tc_u[i], beta=beta) for i, (l, d) in enumerate(labels)]
else:
if ent:
xis = [dw.weight(dw.entropy(p), tc_u[i], beta=beta) for i, (l, p) in enumerate(labels)]
else:
xis = [dw.weight(dw.hyper_distance(d), tc_u[i], beta=beta) for i, (l, d) in enumerate(labels)]
if zinc:
dw.generate_report(sorted(zip([s for s, fp, vend, z in res if fp is not None], xis, [lab[0] for lab in labels], [vend for s, fp, vend, z in res if fp is not None], [z for s, fp, vend, z in res if fp is not None]), key=lambda y: y[1], reverse=True), vendors_list=vl, outfile="%s_ec%s_beta%s_%s_zinc%s%s_C%s.sdf" % (org, ec.replace('.', '_'), str(beta), kernel, str(zinc_tol_l).replace('.', '_'), str(zinc_tol_r).replace('.', '_'), str(C)))
f = open("%s_ec%s_beta%s_%s_zinc%s%s_C%s.txt" % (org, ec.replace('.', '_'), str(beta), kernel, str(zinc_tol_l).replace('.', '_'), str(zinc_tol_r).replace('.', '_'), str(C)), 'w')
else:
dw.generate_report(sorted(zip([s for s, fp in res], xis, [lab[0] for lab in labels]), key=lambda y: y[1], reverse=True), outfile="%s_ec%s_beta%s_%s.sdf" % (org, ec.replace('.', '_'), str(beta), kernel), zinc=False)
f = open("%s_ec%s_beta%s_%s.txt" % (org, ec.replace('.', '_'), str(beta), kernel), 'w')
for score in xis:
f.write(str(score) + '\n')
f.close()
def dissim_run(org, ec, neg, k, pos=None, zinc=False, zinc_tol_l=1, zinc_tol_r=1, vl=None, simfp=fptr.integer_sim, target_bits=None, screen=None):
# Collects isozyme data into the Isozyme class.
a = bi(org, ec)
bits = a.analyze_reactions()
if pos:
a.add_from_sdf(pos, k, pos=True)
a.add_from_sdf(neg, k, pos=False)
#Two branches here; one pulls potential test data from ZINC, another pulls from KEGG.
res_ = [(page["smiles"], fptr.integer_fp(str(page["smiles"])), page["vendors"], page["_id"]) for page in dbq.zinc_pull(target_bits, a.mass_avg[k], a.mass_std[k], zinc_tol_l=zinc_tol_l, zinc_tol_r=zinc_tol_r) if u'R' not in page["smiles"] and 'vendors' in page]
res_s = [rr for rr in res_ if rr[1] is not None]
if screen is not None:
patt = [pybel.Smarts(smarts) for smarts in screen.split('|')]
if len(patt) > 2:
raise IOError('al_run only supports OR filters for two SMARTS queries at this time.')
res = [rr for rr in res_s if len(patt[0].findall(pybel.readstring('smi', str(rr[0])))) > 0 or len(patt[1].findall(pybel.readstring('smi', str(rr[0])))) > 0]
else:
res = res_s
x_pos_array = np.vstack(tuple([t[1] for t in a.pos[k]]))
x_neg_array = np.vstack(tuple([t[1] for t in a.neg[k]]))
x_array = np.vstack((x_pos_array, x_neg_array))
centroid = np.mean(x_array, axis=0)
test_a = np.vstack(tuple([np.array(x[1]) for x in res if x[1] is not None]))
test_centroid = np.mean(test_a, axis=0)
tc_u = dw.avg_proximity(test_a, test_a, f=simfp)
xis_a = [(x[0], fptr.integer_sim(centroid, x[1]), 1, x[2], x[3]) for x in res if x[1] is not None]
xis_b = [(x[0], tc_u[i] * (-math.log(fptr.integer_sim(centroid, x[1]), 2)), 1, x[2], x[3]) for i, x in enumerate(res) if x[1] is not None]
dw.generate_report(sorted(xis_a, key=lambda y: y[1]), vendors_list=vl, outfile="%s_ec%s_dissim_zinc%s%s.sdf" % (org, ec.replace('.', '_'), str(zinc_tol_l).replace('.', '_'), str(zinc_tol_r).replace('.', '_')))
dw.generate_report(sorted(xis_b, key=lambda y: y[1]), vendors_list=vl, outfile="%s_ec%s_dissimcentral_zinc%s%s.sdf" % (org, ec.replace('.', '_'), str(zinc_tol_l).replace('.', '_'), str(zinc_tol_r).replace('.', '_')))
def al_xval_ins(org, ec, k, neg=None, pos=None, beta=1.0, kernel='rbf', gamma=0.005, iterations=100, batch=1, C=1.0, initial=2, decf=True, simfp=fptr.integer_sim):
a = bi(org, ec)
if neg is not None:
if pos:
a.add_from_sdf(pos, k, pos=True)
a.add_from_sdf(neg, k, pos=False)
a.xval_selection(k, beta=beta, batch=batch, kernel=kernel, iterations=iterations, initial=initial, c=C, gamma=gamma, decf=decf, simfp=simfp)
else:
a.xval_selection_random(k, beta=beta, batch=batch, kernel=kernel, iterations=iterations, initial=initial, c=C, gamma=gamma, decf=decf, simfp=simfp)
def al_exp_val(org, ec, k, exp, neg=None, beta=1.0, kernel='rbf', degree=3, gamma=0.005, iterations=100, batch=1, C=1.0, initial=2, decf=False, random_seed=None, pos=None, simfp=fptr.integer_sim):
a = bi(org, ec)
if neg is not None:
if pos:
a.add_from_sdf(pos, k, pos=True)
a.add_from_sdf(neg, k, pos=False)
suppl = pybel.readfile('sdf', os.path.join(CHEMPATH, exp))
excl = []
for mol in suppl:
smi = mol.write('can').strip()
cls = int(mol.data['label'])
a.add_from_smiles(smi, k, cls)
excl.append(smi)
a.expval_selection(k, excl, c=C, gamma=gamma, iterations=iterations, batch=batch, degree=degree, kernel=kernel, beta=beta, decf=decf, seed=random_seed, simfp=simfp, initial=initial)
else:
a.expval_selection_random(k, exp, c=C, gamma=gamma, iterations=iterations, batch=batch, degree=degree, kernel=kernel, beta=beta, decf=decf, seed=random_seed, simfp=simfp, initial=initial)
def al_exp_ins(org, ec, k, exp, neg=None, beta=1.0, kernel='rbf', degree=3, gamma=0.005, iterations=100, batch=1, C=1.0, initial=2, decf=False, random_seed=None, fp='FP4', simfp=fptr.integer_sim):
a = bi(org, ec)
if neg is not None:
a.add_from_sdf(neg, k, pos=False)
else:
a.random_negatives(k)
suppl = pybel.readfile('sdf', os.path.join(CHEMPATH, exp))
excl = []
for mol in suppl:
smi = mol.write('can').strip()
cls = int(mol.data['label'])
a.add_from_smiles(smi, k, cls)
excl.append(smi)
smiles_access = [t[0] for t in a.pos[k]] + [t[0] for t in a.neg[k]]
n = max([len(str(x)) for x in smiles_access])
if fp == 'FP4':
x_pos_array = np.vstack(tuple([t[1] for t in a.pos[k]]))
x_neg_array = np.vstack(tuple([t[1] for t in a.neg[k]]))
y_obj = []
y_obj += [1] * x_pos_array.shape[0]
y_obj += [-1] * x_neg_array.shape[0]
x = np.vstack((x_pos_array, x_neg_array))
y = np.array(zip(y_obj, smiles_access), dtype=[('label', 'i4'), ('smiles', '|S%s' % str(n))])
elif fp == 'FP2':
x_pos_array = np.vstack(tuple([np.array(fptr.reconstruct_fp(t[0], fptype='FP2')) for t in a.pos[k]]))
x_neg_array = np.vstack(tuple([np.array(fptr.reconstruct_fp(t[0], fptype='FP2')) for t in a.neg[k]]))
y_obj = []
y_obj += [1] * x_pos_array.shape[0]
y_obj += [-1] * x_neg_array.shape[0]
x = np.vstack((x_pos_array, x_neg_array))
y = np.array(zip(y_obj, smiles_access), dtype=[('label', 'i4'), ('smiles', '|S%s' % str(n))])
else:
raise IOError("Valid values for fp are FP2 and FP4.")
outfile = "al_expins_%s_%s_beta%s_batch%s_%s_rseed%s" % (org, ec, str(beta).replace('.', ''), str(batch), kernel, str(random_seed))
out = routines.dw_exp_ins(x, y, outfile, smiles_access, excl, C=C, gamma=gamma, iterations=iterations, batch=batch, degree=degree, kernel=kernel, beta=beta, decf=decf, seed=random_seed, simfp=simfp, initial=initial)
if __name__ == "__main__":
#prog = al_xval("Xanthomonas citri", "3.1.1.43", 0, neg="AAEHNegatives.sdf", C=5, batch=1, beta=1, iterations=1000, total_tc=True, fp='FP4', kernel='rbf', decf=True)
#al_inspect("rhodochrous", "4.2.1.84", "NHaseNegatives.sdf", 0, C=5, batch=1, beta=1, iterations=1000)
#al_inspect("Xanthomonas citri", "3.1.1.43", "AAEHNegatives.sdf", 0, C=5, batch=1, beta=1, iterations=1000, decf=True)
#al_xval_ins("Escherichia coli K12", "2.2.1.9", 0, neg="MenDNegatives.sdf", pos="MenDPositives_extra.sdf", C=5, batch=1, beta=1, iterations=1000, kernel='rbf', decf=True)
#al_xval_ins("iowensis", "1.2.99.6", 0, neg="CarNegatives.sdf", pos="CarPositives.sdf", C=5, batch=1, beta=1, iterations=1000, kernel='rbf', decf=True)
#al_xval_ins("putida", "1.14.13.84", 0, neg="HAPMONegatives.sdf", C=5, batch=1, beta=1, iterations=1000, kernel='rbf', decf=True)
#al_xval_ins("Xanthomonas citri", "3.1.1.43", 0, neg="AAEHNegatives.sdf", C=5, batch=1, beta=1, iterations=1000, kernel='rbf', decf=True)
#al_inspect("Escherichia coli K12", "2.2.1.9", "MenDNegatives.sdf", 0, C=5, batch=1, beta=1, iterations=1000, decf=True)
#al_exp_val("Escherichia coli K12", "2.2.1.9", 0, "MenD_rd1.sdf", neg="MenDNegatives_extra.sdf", pos="MenDPositives_extra.sdf", C=5, batch=1, beta=1, iterations=1000, decf=True, kernel='rbf')
#al_exp_ins("Escherichia coli K12", "2.2.1.9", 0, "MenD_rd1.sdf", neg="MenDNegatives.sdf", C=5, batch=1, beta=1, iterations=1000, decf=True)
al_run("iowensis", "1.2.99.6", "CarNegatives.sdf", 0, pos="CarPositives.sdf", zinc=False, target_bits='84')
| 51.701923
| 441
| 0.660126
| 1,969
| 10,754
| 3.459116
| 0.123921
| 0.020555
| 0.019821
| 0.011746
| 0.797093
| 0.780502
| 0.749082
| 0.725297
| 0.687711
| 0.674938
| 0
| 0.029044
| 0.151572
| 10,754
| 208
| 442
| 51.701923
| 0.717448
| 0.155477
| 0
| 0.589928
| 0
| 0
| 0.076506
| 0.023922
| 0
| 0
| 0
| 0
| 0
| 1
| 0.035971
| false
| 0
| 0.071942
| 0
| 0.107914
| 0.007194
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
b1b573619cab3a9c7560f026cab889366503a23f
| 362
|
py
|
Python
|
matplot/basic plot.py
|
satyamuralidhar/data_numpy
|
8963c2e781f429a7f23ea8418838faf56783631b
|
[
"Apache-2.0"
] | null | null | null |
matplot/basic plot.py
|
satyamuralidhar/data_numpy
|
8963c2e781f429a7f23ea8418838faf56783631b
|
[
"Apache-2.0"
] | null | null | null |
matplot/basic plot.py
|
satyamuralidhar/data_numpy
|
8963c2e781f429a7f23ea8418838faf56783631b
|
[
"Apache-2.0"
] | null | null | null |
import numpy as np
import matplotlib.pyplot as plt
x = np.linspace(np.pi , -np.pi , 256 , endpoint = True)
x
s , c , z = np.sin(x) , np.cos(x) , np.tan(x)
plt.plot(x , s)
plt.plot(x , c)
plt.plot(x , z)
plt.plot(x , s)
plt.plot(x , z)
plt.show()
plt.plot(x , c)
plt.plot(x , z)
plt.show()
plt.plot(x , s)
plt.plot(x , c)
plt.plot(x , z)
plt.show()
| 10.969697
| 55
| 0.577348
| 78
| 362
| 2.679487
| 0.269231
| 0.334928
| 0.382775
| 0.172249
| 0.5311
| 0.5311
| 0.5311
| 0.502392
| 0.502392
| 0.425837
| 0
| 0.010563
| 0.21547
| 362
| 32
| 56
| 11.3125
| 0.725352
| 0
| 0
| 0.722222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.111111
| 0
| 0.111111
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
b1caa73fa8c84f1e59f5dbcb5c9deb7b6c500b03
| 819
|
py
|
Python
|
tests/treepath/conftest.py
|
monkeydevtools/treepath-python
|
56f6cbf662f8a4c13f0c9e753a839fc9f6323dba
|
[
"Apache-2.0"
] | 2
|
2021-05-26T08:26:25.000Z
|
2021-09-24T21:26:01.000Z
|
tests/treepath/conftest.py
|
monkeydevtools/treepath-python
|
56f6cbf662f8a4c13f0c9e753a839fc9f6323dba
|
[
"Apache-2.0"
] | null | null | null |
tests/treepath/conftest.py
|
monkeydevtools/treepath-python
|
56f6cbf662f8a4c13f0c9e753a839fc9f6323dba
|
[
"Apache-2.0"
] | null | null | null |
import pytest
from tests.data.data import get_keys, get_three_dimensional_list, get_a_k_k_a_k_k_k_a, get_k_a_a_k_a_a_a_k, \
get_all_data_types, get_dash, get_solar_system, get_solar_system_json
@pytest.fixture
def dash() -> dict:
return get_dash()
@pytest.fixture
def keys() -> dict:
return get_keys()
@pytest.fixture
def three_dimensional_list() -> list:
return get_three_dimensional_list()
@pytest.fixture
def a_k_k_a_k_k_k_a() -> list:
return get_a_k_k_a_k_k_k_a()
@pytest.fixture
def k_a_a_k_a_a_a_k() -> dict:
return get_k_a_a_k_a_a_a_k()
@pytest.fixture
def all_data_types() -> dict:
return get_all_data_types()
@pytest.fixture
def solar_system() -> dict:
return get_solar_system()
@pytest.fixture
def solar_system_json() -> str:
return get_solar_system_json()
| 18.613636
| 109
| 0.750916
| 150
| 819
| 3.573333
| 0.153333
| 0.044776
| 0.238806
| 0.022388
| 0.212687
| 0.11194
| 0.11194
| 0.11194
| 0.08209
| 0
| 0
| 0
| 0.148962
| 819
| 43
| 110
| 19.046512
| 0.76901
| 0
| 0
| 0.296296
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.296296
| true
| 0
| 0.074074
| 0.296296
| 0.666667
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 1
| 0
| 0
|
0
| 4
|
b1dfdaef940aa1534b001d55505bbc175a2102c4
| 40
|
py
|
Python
|
sauri/sensors/gpio/states.py
|
healem/sauri
|
3233106c830fdb2901d647a7019d61b290f9c727
|
[
"MIT"
] | null | null | null |
sauri/sensors/gpio/states.py
|
healem/sauri
|
3233106c830fdb2901d647a7019d61b290f9c727
|
[
"MIT"
] | null | null | null |
sauri/sensors/gpio/states.py
|
healem/sauri
|
3233106c830fdb2901d647a7019d61b290f9c727
|
[
"MIT"
] | null | null | null |
class State:
OPEN = 1
CLOSED = 0
| 13.333333
| 14
| 0.55
| 6
| 40
| 3.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.08
| 0.375
| 40
| 3
| 14
| 13.333333
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 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
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
591ff97ceb1788597460d75ea1e0355612e2c12d
| 250
|
py
|
Python
|
amadeus/namespaces/_location.py
|
minjikarin/amadeus-python
|
14a004912ee8c36ee4fd79651ea1b23afe6b2a6e
|
[
"MIT"
] | 125
|
2018-04-09T07:27:24.000Z
|
2022-02-22T11:45:20.000Z
|
amadeus/namespaces/_location.py
|
minjikarin/amadeus-python
|
14a004912ee8c36ee4fd79651ea1b23afe6b2a6e
|
[
"MIT"
] | 58
|
2018-03-29T14:58:01.000Z
|
2022-03-17T10:18:07.000Z
|
amadeus/namespaces/_location.py
|
minjikarin/amadeus-python
|
14a004912ee8c36ee4fd79651ea1b23afe6b2a6e
|
[
"MIT"
] | 58
|
2018-04-06T10:56:20.000Z
|
2022-03-04T01:23:24.000Z
|
from amadeus.client.decorator import Decorator
from amadeus.location._analytics import Analytics
class Location(Decorator, object):
def __init__(self, client):
Decorator.__init__(self, client)
self.analytics = Analytics(client)
| 27.777778
| 49
| 0.756
| 28
| 250
| 6.428571
| 0.428571
| 0.122222
| 0.155556
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.164
| 250
| 8
| 50
| 31.25
| 0.861244
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
592da13f84285b6d70c677de9d9adebf22ba7346
| 780
|
py
|
Python
|
tests/test_1805.py
|
sungho-joo/leetcode2github
|
ce7730ef40f6051df23681dd3c0e1e657abba620
|
[
"MIT"
] | 2
|
2020-12-08T13:59:10.000Z
|
2021-05-01T05:07:39.000Z
|
tests/test_1805.py
|
sungho-joo/leetcode2github
|
ce7730ef40f6051df23681dd3c0e1e657abba620
|
[
"MIT"
] | null | null | null |
tests/test_1805.py
|
sungho-joo/leetcode2github
|
ce7730ef40f6051df23681dd3c0e1e657abba620
|
[
"MIT"
] | 1
|
2021-05-02T17:42:02.000Z
|
2021-05-02T17:42:02.000Z
|
#!/usr/bin/env python
import pytest
"""
Test 1805. Number of Different Integers in a String
"""
@pytest.fixture(scope="session")
def init_variables_1805():
from src.leetcode_1805_number_of_different_integers_in_a_string import Solution
solution = Solution()
def _init_variables_1805():
return solution
yield _init_variables_1805
class TestClass1805:
def test_solution_0(self, init_variables_1805):
assert init_variables_1805().numDifferentIntegers("a123bc34d8ef34") == 3
def test_solution_1(self, init_variables_1805):
assert init_variables_1805().numDifferentIntegers("leet1234code234") == 2
def test_solution_2(self, init_variables_1805):
assert init_variables_1805().numDifferentIntegers("a1b01c001") == 1
| 25.16129
| 83
| 0.751282
| 95
| 780
| 5.810526
| 0.410526
| 0.211957
| 0.277174
| 0.11413
| 0.485507
| 0.485507
| 0.485507
| 0.485507
| 0.347826
| 0
| 0
| 0.114504
| 0.160256
| 780
| 30
| 84
| 26
| 0.728244
| 0.025641
| 0
| 0
| 0
| 0
| 0.064286
| 0
| 0
| 0
| 0
| 0
| 0.2
| 1
| 0.333333
| false
| 0
| 0.133333
| 0.066667
| 0.6
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
593f873875db7ea35243d94f9505b29d6d01fb92
| 93
|
py
|
Python
|
devrun_reloader.py
|
OSUSVT/osusvt-telemetry
|
ce35538b869096ac0443a2190d4b8340c9e9e573
|
[
"MIT"
] | 1
|
2020-04-28T20:06:34.000Z
|
2020-04-28T20:06:34.000Z
|
devrun_reloader.py
|
OSUSVT/osusvt-telemetry
|
ce35538b869096ac0443a2190d4b8340c9e9e573
|
[
"MIT"
] | null | null | null |
devrun_reloader.py
|
OSUSVT/osusvt-telemetry
|
ce35538b869096ac0443a2190d4b8340c9e9e573
|
[
"MIT"
] | null | null | null |
#!env/bin/python
from app import app
app.run(debug=True, host='0.0.0.0', use_reloader=True)
| 18.6
| 54
| 0.72043
| 19
| 93
| 3.473684
| 0.684211
| 0.090909
| 0.090909
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.047619
| 0.096774
| 93
| 4
| 55
| 23.25
| 0.738095
| 0.16129
| 0
| 0
| 0
| 0
| 0.090909
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
3ca896400cfec92796443bd23b7aadd7cc359088
| 292
|
py
|
Python
|
frontpage/admin.py
|
IMCTA/imcta.ru
|
35e47a742dd984250fc5c7c71eff9e8c7f13cbf1
|
[
"MIT"
] | null | null | null |
frontpage/admin.py
|
IMCTA/imcta.ru
|
35e47a742dd984250fc5c7c71eff9e8c7f13cbf1
|
[
"MIT"
] | null | null | null |
frontpage/admin.py
|
IMCTA/imcta.ru
|
35e47a742dd984250fc5c7c71eff9e8c7f13cbf1
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from modeltranslation.admin import TabbedTranslationAdmin
from solo.admin import SingletonModelAdmin
from .models import FrontPage
class FrontPageAdmin(TabbedTranslationAdmin, SingletonModelAdmin):
pass
admin.site.register(FrontPage, FrontPageAdmin)
| 22.461538
| 66
| 0.849315
| 29
| 292
| 8.551724
| 0.551724
| 0.08871
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.106164
| 292
| 12
| 67
| 24.333333
| 0.950192
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.142857
| 0.571429
| 0
| 0.714286
| 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
| 0
| 0
|
0
| 4
|
3cf8b2c7b64541754ae86b6324e5efb53be61933
| 178
|
py
|
Python
|
tests/sample/models.py
|
nathan-osman/django-archive
|
c244a854a18d801082f7bf68151e5920b9fc9f74
|
[
"MIT"
] | 28
|
2015-09-29T06:50:25.000Z
|
2022-02-14T05:58:14.000Z
|
tests/sample/models.py
|
nathan-osman/django-archive
|
c244a854a18d801082f7bf68151e5920b9fc9f74
|
[
"MIT"
] | 10
|
2015-01-05T21:00:22.000Z
|
2021-08-24T09:09:49.000Z
|
tests/sample/models.py
|
nathan-osman/django-archive
|
c244a854a18d801082f7bf68151e5920b9fc9f74
|
[
"MIT"
] | 5
|
2016-03-17T16:26:34.000Z
|
2020-07-19T22:06:17.000Z
|
from django.db import models
class Sample(models.Model):
"""
A sample model that exists for testing
"""
attachment = models.FileField(upload_to='attachments')
| 17.8
| 58
| 0.691011
| 22
| 178
| 5.545455
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.207865
| 178
| 9
| 59
| 19.777778
| 0.865248
| 0.213483
| 0
| 0
| 0
| 0
| 0.08871
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
a718cc58660230db99cfce1f888aa2d682bff2cb
| 643
|
py
|
Python
|
Patterns/pattern_1.py
|
jarvis-1805/DSAwithPYTHON
|
872073d1b8d0001ea8b1a54b5e327dd0c1c406f2
|
[
"Apache-2.0"
] | 1
|
2021-03-21T18:54:34.000Z
|
2021-03-21T18:54:34.000Z
|
Patterns/pattern_1.py
|
jarvis-1805/DSAwithPYTHON
|
872073d1b8d0001ea8b1a54b5e327dd0c1c406f2
|
[
"Apache-2.0"
] | null | null | null |
Patterns/pattern_1.py
|
jarvis-1805/DSAwithPYTHON
|
872073d1b8d0001ea8b1a54b5e327dd0c1c406f2
|
[
"Apache-2.0"
] | null | null | null |
'''
*
***
*****
*******
*********
*******
*****
***
*
'''
n = int(input())
i = 0
while i < (n//2) + 1:
j = 1
while j <= (n//2) - i:
print(' ', end='')
j += 1
k = 0
while k <= i:
print('*', end='')
k += 1
l = i
while l >= 1:
print('*', end='')
l -= 1
print()
i += 1
i = 0
while i < (n//2):
j = 0
while j <= i:
print(' ', end='')
j += 1
k = 1
while k <= (n//2) - i:
print('*', end='')
k += 1
l = 0
while l < (n//2) - i - 1:
print('*', end='')
l += 1
print()
i += 1
| 14.288889
| 29
| 0.25661
| 83
| 643
| 1.987952
| 0.156627
| 0.290909
| 0.218182
| 0.09697
| 0.654545
| 0.630303
| 0.218182
| 0.218182
| 0
| 0
| 0
| 0.067055
| 0.466563
| 643
| 45
| 30
| 14.288889
| 0.413994
| 0.101089
| 0
| 0.484848
| 0
| 0
| 0.010582
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.242424
| 0
| 0
| 1
| null | 1
| 1
| 0
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
a737efeef966cd9a8ce6c078fe605baa1a92349a
| 8,112
|
py
|
Python
|
awwwards/jury_list.py
|
gViro/name-based-scraper
|
b13751aa64f4c944b6a6c425316c62b02d667d62
|
[
"MIT"
] | null | null | null |
awwwards/jury_list.py
|
gViro/name-based-scraper
|
b13751aa64f4c944b6a6c425316c62b02d667d62
|
[
"MIT"
] | null | null | null |
awwwards/jury_list.py
|
gViro/name-based-scraper
|
b13751aa64f4c944b6a6c425316c62b02d667d62
|
[
"MIT"
] | null | null | null |
# scrapy shell variable, response is from each single jury page
# using this response >> jurors = response.css('h3::text').extract()
all_jurors = ['Charles de Dreuille', 'Edwin Tofslie', 'Felipe Medeiros', 'Gabriel Segura', 'Georgios Athanassiadis', 'Goksel Eryigit', 'Irene Demetri', 'Lea Verou', 'Loïc Dupasquier', 'Mark Unger', 'Nuno Trafaria', 'CreativePeople', 'Trent Walton', 'Lee Munroe', 'Brian Sugden', 'Rosa van Wyk', 'Juan Ciapessoni', 'Tomáš Silný', 'Rodesk', 'Paulo Bernini', 'Edwin Toh', 'Haraldur Thorleifsson', 'Marcus Stenbeck', 'Brian Hoff', 'Creative People', 'Alexey Abramov', 'Jacob', 'Damian Madray', 'ivan alekis', 'Klippoglim', 'Gonzalo Perez', 'Vadim Sherbakov', 'David Navarro', 'brushgunz', 'Ines Maria Gamler', 'Mathias Paumgarten', 'Aaron Powell', 'Leandro Puca', 'Helio Medeiros', 'Addy Osmani', 'Antón Molleda', 'Rolf Jensen', 'Jack Doud', 'Zack Bonebrake', 'Stevijn van Olst', 'Davy Rudolph', 'Fernando Ramirez', 'Julien Renau', 'Richard Boiteux', 'Jürgen Genser', 'Charlie Montagut', 'Du Haihang', 'Sebastiano Guerriero', 'Olga Shevchenko', 'Michael P. Pfeiffer', 'Jessica Travieso', 'Paul Boag', 'Aarron Walter', 'John Percival', 'Luke Finch', 'Stéphane Guigné', 'Emilie Salles', 'Anthony Du Pont', 'Bastien Leprince', 'Kuba Bogaczynski', 'Joe Hochgreve', 'Fred Paquet', 'Ralf Sohl', 'Neal Drasbeck', 'Guilherme Pangnotta', 'Xavier Cussó', 'Alexander Radsby', 'Bruno Ribeiro', 'Pablo Vio', 'Kamil Lehmann', 'Jeremie Werner', 'Michael Nilsson', 'Marie Benoist', 'Gilles Tossoukpé', 'Matthieu Kobler', 'Arthur Muchir', 'Dario Merz', 'Valentin Cervellera', 'Chris Biron', 'Agencia EGO', 'Anthony Dart', 'Antonio Lupetti', 'Ido Zemach', 'Bulent Shik', 'Fabio Sasso', 'Israel Pastrana', 'Jay Hollywood', 'JB Grasset', 'Jeff Toll', 'Mark Dearman', 'Sean Klassen', 'Shyam Soni', 'Simon Spreckley', 'Vicki Tourtouras', 'Aravind Ajith', 'Robert Podgorski', 'David Hellmann', 'Juan Mora', 'Tom Kershaw', 'Rich Brown', 'Ahmad Ktaech', 'Manoela Ilic', 'Juan Velasco', 'Blackmoon', 'Jean-Maxime Brais', 'Mert Gutav', 'James Noble', 'Fabio Merlin', 'Kenta Toshikura', 'Shawn Petersen', 'Claudio Guglieri', 'Franc Cheetham', 'Arek Romanski', 'Carlos Molina', 'Bjarne Christensen', 'Abigail Smith', 'Brave People', 'Robby Leonardi', 'Kiran Jonnalagadda', 'John Bristowe', 'Thomas Lempa', 'Izaias Cavalcanti', 'Luca Quattrin', 'Andreas Shabelnikov', 'Malte Gruhl', 'Bartek Drozdz', 'Aaron Gustafson', 'Jonathan Hills', 'Benoit Challand', 'Filippo Spiezia', 'Derek Boateng', 'Luke Li', 'Andy Thelander', 'James Monaghan', 'Joris Rigerl', 'Nathan Riley', 'Mathias Høst Normark', 'Michi Del Rosso', 'Iris Lješnjanin', 'Denise Jacobs', 'Michal Pasternak', 'Eran Zeevi', 'Vanessa Nunes', 'Aude Degrassat', 'Michele Gallina', 'Francesco Milanesio', 'Alice Mourou', 'Miguel Trias', 'Geovanny Panchame', 'Nemanja Ivanovic', 'Serkan Bayburtlu', 'Jack De Caluwe', 'Jacob Grubbe', 'Gregg Lawrence', 'Michael John', 'Marc Belle', 'Sue Murphy', 'Matthew Bayliss', 'Sylvain Theyssens', 'Jon Vlasach', 'Roman Trilo', 'Diego Quintana', 'Igor Suslov', 'Luisa Tatoli', 'Samuel Bismes', 'Arne Van Kauter', 'Gláuber Sampaio', 'Piotr Swierkowski', 'Baptiste Dumas', 'Joakim Norman', 'Klaus-Martin Michaelis', 'Julia Ammor', 'Dmitry Petrov', 'Mustafa Demirkent', 'Peter Coolen', 'Alessandro Risso', 'Oui Will', 'Julie Muckensturm', 'Priscilla Gomez', 'Thieb', 'Alessandro Rigobello', 'Antwan van der Mooren', 'Maxime Berthelot', 'Robert Bue', 'Hannah Purmort', 'Eyal Zuri', 'Marco Coppeto', 'Marissa Louie', 'Laura Geley', 'Fabricio Teixeira', 'Ryan Warrender', 'Leopat Magnus', 'inTacto Digital Partner', 'David Arias', 'Emil Gustafsson', 'Gopal Raju', 'Josh Hemsley', 'Joshua Long', 'Kevin Sweeney', 'Mark Hirst', 'Paul Mosig', 'Raffael Stüken', 'Ray Cheung', 'Rob Barwell', 'Ivan Aleksic', 'Patrick Kranzlmüller', 'Marcus Fuchs', 'Matt D. Smith', 'Ness Higson', '60fps', 'Basile Tournier', 'Lee Monroe', 'Lukas Majzlan', 'Cristian van_der_henst', 'Awwwards Users', 'Sarri Maxime', 'Lucas Nikitczuk', 'Jonas Lempa', 'Wesley ter Haar', 'Sun Law', 'Uli Schöberl', 'Jakob Stenqvist', 'Colin Lamberton', 'Murat Pak', 'Gary Paitre', 'Gabriel Shaoolian', 'Rachel Andrew', 'Javier Usobiaga', 'Aidan Huang', 'Bryan Saftler', 'Stephanie Troeth', 'Yaprak Gültay', 'Daan Klaver', 'Sam Dallyn', 'Antoine Arnoux', 'Clément Pavageau', 'Lionel Durimel', 'Daniel Schroermeyer', 'Harry Wu', 'George Kvasnikov', 'Barny Collis', 'Marek Suchanek', 'Kosmas Apatangelos', 'Jordi Romkema', 'Hrvoje Grubišić', 'Lukasz Gorka', 'Franco Bouly', 'Trouble', 'Paul Irish', 'Isaac Leon', 'Vito Salvatore', 'Douglas Hughmanick', 'Christin Malén Andreassen', 'Peter Kang', 'Greg Valvano', 'Burak Canpolat', 'Henrik Dreijer-Pedesen', 'Thomas Gorree', 'Bruno Porrio', 'Rob Trostle', 'Pascal van der Haar', 'Rosie Manning', 'Charles de Dreuille', 'Martijn van der Does', 'Xuan Pham', 'Roland Lösslein', 'Rob Martin', 'Nicolas Rajabaly', 'Sunny Bonnell', 'Alexis Malin', 'keeley laures', 'Louis Moncouyoux', 'Miro Koljanin', 'Corentin Fardeau', 'Fabian Irsara', 'Iván Soria', 'Julie Flogeac', 'Roman Stetskov', 'Alex Leduc', 'Carl Rosekilly', 'David Basso', 'Dries Van haver', 'Irena Zablotska', 'Kevin Wong', 'Mike Lane', 'Óscar Pérez.', 'Sebastian Deutsch', 'Stefano Scozzese', 'Wing Cheng', 'Rally', 'Damian Madray', 'Paul Andrew', 'Henry Daubrez', 'Le Graphoir', 'Sang Han', 'TRÜF', 'Alexander Kaiser', 'Aravind Ajith', 'Paul Andrew', 'Mike Kus', 'Alfredo Aponte', 'Simon Daufresne', 'Nick de Jardine', 'DOMANI Studios', 'Daniel Eckler', 'Corey Szopinski', 'Julio Spinetto', 'Matthias Mentasti', 'Simon Lindsay', 'Ulises Valencia', 'Elegant Seagulls', 'Brian Williams', 'Peter Cooper', 'Tomomi Imura', 'Dave Methvin', 'Matija Vujovic', 'Monika Kehrer', 'Sean Hobman', 'Steve Mahn', 'Peter Jupp', 'Paul Woods', 'Ronny Wieckardt', 'Fadi Shuman', 'Héctor Ayuso', 'Charlie Clark', 'Luciano Borromei', 'Julian Shapiro', 'Blake Carroll', 'Aral Balkan', 'Brad Frost', 'Enea Rossi', 'Matteo Rostagno', 'Pedro Burneiko', 'Melanie Daveid', 'Aleksandr Motin', 'Dorian Camilleri', 'Timothy Noah', 'Grzegorz Matyszewski', 'Sebastian Gram', 'Matt Sundstrom', 'Mark Goldstein', 'Matthias Mentasti', 'Soren Bo Bastian', 'Kenneth Graupner', 'Brendan Kearns', 'Garth Sykes', 'Louis Paquet', 'Tsukasa Toukura', 'Imran Sheikh', 'Ronaldo Jardim', 'Julien Vasseur', 'Lissy Lamoreaux', 'Alex Engzell', 'Tore Holmberg', 'Alessio Fasciolo', 'Frédéric Marchand', 'Samuel Honigstein', 'Julio Spinetto', 'Arnaud Desjardins', 'Art Tsymbal', 'Ellie Hardy', 'Jonas Emmertsen', 'Shunsuke Iseki', 'Thales Ribeiro', 'Nicholas Ruggeri', 'Rinat Magomedov', 'Ludmilla Maury', 'Mustafa Çelik', 'Jenny Gove', 'Brian Lovell', 'Drew Europeo', 'Florian Wögerer', 'Jason Hardy', 'Kamil Kaniuk', 'Michael Hinderling', 'Nikola Arežina', 'Pablo Zarate', 'Philip Winberg', 'Rehan Syed Muhammad', 'Romain Colin', 'Shaz Sedighzadeh', 'Siddharth Arun', 'Simon Foster', 'Juanma Teixidó', 'Tobias van Schneider', 'Gustav Espenes', 'Alexander Kaiser', 'Alexey Abramov', 'Umut Muhaddisoglu', 'Emmanuel Dumont', 'Paul Kotz', 'Tom Ajello', 'Danilo Figueiredo', 'Umut M.', 'Mohit Aneja', 'Sarah Camp', 'Rob Morris', 'SNOOP MEDIA', 'Trent Walton', 'Alexandre Gomes', 'Kenji Saito', 'Panagiotis Thomoglou', 'Karim Maaloul', 'Keitaro Suzuki', 'Tiago Varandas', 'Francesco Bertelli', 'Brijan', 'David Walsh', 'Eric Meyer', 'Karl Stanton', 'Jorge Castillo', 'Kris Hermansson', 'Michael Sevilla', 'Jamie Nicoll', 'Baptiste Briel', 'Ariadne Gomes', 'Dan Cederholm', 'Alejandro Lazos', 'Heiko Winter', 'Bojan Wilytsch', 'Roel Kok', 'Chryssa Gagosi', 'Natalie Brown', 'Michael Farley', 'Rich Stewart', 'Magnus Lowing Swahn', 'Samuel Kantala Delgado', 'Pim van Helten', 'Ruben Sanchez', 'Rick Dias', 'Ambroise Maupate', 'Younus Abdalla', 'Lu Yu', 'Jeremy Sutton', 'Jean Naudy', 'Anton Zykin', 'Mira Sestan', 'Anastasia Gorodetskaya', 'Anatoliy Gromov', 'Filip Nordin', 'Hernan Puente', 'Kai Brueckers', 'Michał Markowski', 'Tommy Treadway', 'Luigi De Rosa', 'Pablo Bacchetta', 'Petr Tichy', 'Warre Buysse', 'John Magas', 'Andreas Panagiotopoulos']
first_names = [i.split()[0] for i in all_jurors]
print(first_names)
| 1,622.4
| 7,911
| 0.709566
| 967
| 8,112
| 5.946225
| 0.857291
| 0.004174
| 0.005913
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.000559
| 0.11785
| 8,112
| 5
| 7,912
| 1,622.4
| 0.802963
| 0.015779
| 0
| 0
| 0
| 0
| 0.761463
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.333333
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
595e4bdda7424d0d7e223b6d9a1be48523eafa39
| 141
|
py
|
Python
|
setup.py
|
SABS-Group-2-2021-22/drug-discovery-game-backend
|
1697f87b51ba3fc793098a199b760aa43c8b575c
|
[
"MIT"
] | 1
|
2022-01-25T11:57:07.000Z
|
2022-01-25T11:57:07.000Z
|
setup.py
|
SABS-Group-2-2021-22/drug-discovery-game-backend
|
1697f87b51ba3fc793098a199b760aa43c8b575c
|
[
"MIT"
] | 50
|
2021-12-08T13:12:42.000Z
|
2022-03-18T11:28:53.000Z
|
setup.py
|
SABS-Group-2-2021-22/drug-discovery-game-backend
|
1697f87b51ba3fc793098a199b760aa43c8b575c
|
[
"MIT"
] | null | null | null |
from setuptools import setup, find_packages
setup(name="drug-discovery-game-backend",
version='0.1.0',
packages=find_packages())
| 28.2
| 43
| 0.723404
| 19
| 141
| 5.263158
| 0.736842
| 0.24
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.024793
| 0.141844
| 141
| 4
| 44
| 35.25
| 0.801653
| 0
| 0
| 0
| 0
| 0
| 0.22695
| 0.191489
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.25
| 0
| 0.25
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
596d5f48bc3a3d444e28a2b0d4a01a8cd7f6464a
| 165
|
py
|
Python
|
phyton/Exercicio017_Hipotenusa.py
|
felipebaloneker/Practice
|
6c4f9b9f91c872350b566927fe9df10aed6930be
|
[
"MIT"
] | null | null | null |
phyton/Exercicio017_Hipotenusa.py
|
felipebaloneker/Practice
|
6c4f9b9f91c872350b566927fe9df10aed6930be
|
[
"MIT"
] | null | null | null |
phyton/Exercicio017_Hipotenusa.py
|
felipebaloneker/Practice
|
6c4f9b9f91c872350b566927fe9df10aed6930be
|
[
"MIT"
] | null | null | null |
import math
o = float(input('Valor do cateto Oposto:'))
a = float(input('Valor do cateto Adjasente:'))
h = math.hypot(o,a)
print('Sua Hipotenuza vale:{}'.format(h))
| 27.5
| 46
| 0.690909
| 27
| 165
| 4.222222
| 0.666667
| 0.175439
| 0.263158
| 0.298246
| 0.403509
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.121212
| 165
| 5
| 47
| 33
| 0.786207
| 0
| 0
| 0
| 0
| 0
| 0.430303
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.2
| 0
| 0.2
| 0.2
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
5980deb5c04ee487ca79a56ddf3afc2088a72df4
| 1,796
|
py
|
Python
|
tests/unit/project/libs/user/domain/properties_mothers.py
|
ticdenis/python-skeleton
|
cb1dc68fa4453709545af4072775aeb373d20df8
|
[
"MIT"
] | 2
|
2020-08-14T21:01:22.000Z
|
2021-02-03T12:04:39.000Z
|
tests/unit/project/libs/user/domain/properties_mothers.py
|
ticdenis/python-skeleton
|
cb1dc68fa4453709545af4072775aeb373d20df8
|
[
"MIT"
] | null | null | null |
tests/unit/project/libs/user/domain/properties_mothers.py
|
ticdenis/python-skeleton
|
cb1dc68fa4453709545af4072775aeb373d20df8
|
[
"MIT"
] | 1
|
2022-01-10T16:03:59.000Z
|
2022-01-10T16:03:59.000Z
|
from secrets import randbelow
from typing import final
from project.libs.user.domain.properties import (
UserEmail,
UserId,
UserPassword,
UserRefreshToken,
UserRefreshTokenExpirationIn,
)
from tests.unit.project.libs.shared.infrastructure.tests.faker import FAKE
class UserIdMother:
@staticmethod
def create(value: str) -> UserId:
return UserId(value)
@classmethod
def random(cls) -> UserId:
return cls.create(UserId.generate().value())
@final
class UserEmailMother:
@staticmethod
def create(value: str) -> UserEmail:
return UserEmail(value)
@classmethod
def random(cls) -> UserEmail:
return cls.create(FAKE.email('project.com'))
@final
class UserPasswordMother:
@staticmethod
def create(value: str, hashed: bool = False) -> UserPassword:
return UserPassword(value, hashed)
@classmethod
def random(cls) -> UserPassword:
return cls.create(FAKE.random_element(['secret123456', '123456secret', 'password123456', '123456password']))
@final
class UserRefreshTokenMother:
@staticmethod
def create(value: str) -> UserRefreshToken:
return UserRefreshToken(value)
@classmethod
def random(cls) -> UserRefreshToken:
return cls.create(''.join([str(randbelow(9)) for _ in range(6)]))
@final
class UserRefreshTokenExpirationInMother:
@staticmethod
def create(value: int) -> UserRefreshTokenExpirationIn:
return UserRefreshTokenExpirationIn(value)
@classmethod
def now(cls) -> UserRefreshTokenExpirationIn:
return cls.create(UserRefreshTokenExpirationIn.now().value())
@classmethod
def random(cls) -> UserRefreshTokenExpirationIn:
return cls.create(int(FAKE.date_time_between('+15m').timestamp()))
| 25.657143
| 116
| 0.704343
| 174
| 1,796
| 7.247126
| 0.350575
| 0.066614
| 0.071372
| 0.103093
| 0.251388
| 0
| 0
| 0
| 0
| 0
| 0
| 0.01927
| 0.19098
| 1,796
| 69
| 117
| 26.028986
| 0.848589
| 0
| 0
| 0.288462
| 0
| 0
| 0.037305
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.211538
| false
| 0.115385
| 0.076923
| 0.211538
| 0.596154
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 4
|
59ba6881a67187e29b4fe32a5e787174a1bbc28a
| 1,111
|
py
|
Python
|
file_util.py
|
d4yvie/advent_of_code_2021
|
bb74b9dc7b23c5ba338dcd8d2e698c7ea4e34c59
|
[
"Apache-2.0"
] | null | null | null |
file_util.py
|
d4yvie/advent_of_code_2021
|
bb74b9dc7b23c5ba338dcd8d2e698c7ea4e34c59
|
[
"Apache-2.0"
] | null | null | null |
file_util.py
|
d4yvie/advent_of_code_2021
|
bb74b9dc7b23c5ba338dcd8d2e698c7ea4e34c59
|
[
"Apache-2.0"
] | null | null | null |
from functools import reduce
import numpy as np
def read_all(file_name="measurements") -> str:
with open(file_name) as f:
return reduce(lambda a, b: a + b, f, "")
def read_lines(file_name="measurements") -> list[str]:
with open(file_name) as f:
return [line.strip() for line in f]
def read_first_line(file_name="measurements") -> str:
return read_lines(file_name)[0]
def line_to_integers(line: str) -> list[int]:
return list(map(int, line.split(",")))
def read_first_line_as_integers(file_name="measurements") -> list[int]:
return line_to_integers(read_first_line(file_name))
def read_line_seperated_data_sets(file_name="measurements") -> list[str]:
with open(file_name) as f:
return f.read().rstrip().split('\n\n')
def read_lines_as_int(file_name="measurements") -> list[list[int]]:
lines = read_lines(file_name)
return [[int(char) for char in x] for x in lines]
def read_lines_as_np_matrix(file_name="measurements") -> np.ndarray:
lines = read_lines(file_name)
return np.array([[float(char) for char in line] for line in lines])
| 27.775
| 73
| 0.69937
| 178
| 1,111
| 4.129213
| 0.252809
| 0.152381
| 0.190476
| 0.092517
| 0.312925
| 0.255782
| 0.179592
| 0.179592
| 0.141497
| 0.141497
| 0
| 0.001078
| 0.164716
| 1,111
| 39
| 74
| 28.487179
| 0.790948
| 0
| 0
| 0.217391
| 0
| 0
| 0.080108
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.347826
| false
| 0
| 0.086957
| 0.130435
| 0.782609
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
59c5d9842a696b41fd36cb0694a45fac3b921c60
| 97
|
py
|
Python
|
cayennelpp/__init__.py
|
CrispyCrafter/pycayennelpp
|
aee916d84a525bd3fe76593f3c66fd846598d462
|
[
"MIT"
] | 1
|
2020-01-22T20:41:27.000Z
|
2020-01-22T20:41:27.000Z
|
cayennelpp/__init__.py
|
CrispyCrafter/pycayennelpp
|
aee916d84a525bd3fe76593f3c66fd846598d462
|
[
"MIT"
] | 1
|
2020-01-21T10:44:28.000Z
|
2020-01-21T10:44:28.000Z
|
cayennelpp/__init__.py
|
CrispyCrafter/pycayennelpp
|
aee916d84a525bd3fe76593f3c66fd846598d462
|
[
"MIT"
] | 1
|
2020-09-20T09:02:54.000Z
|
2020-09-20T09:02:54.000Z
|
from .lpp_data import LppData
from .lpp_frame import LppFrame
__all__ = ['LppData', 'LppFrame']
| 19.4
| 33
| 0.762887
| 13
| 97
| 5.230769
| 0.615385
| 0.205882
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.134021
| 97
| 4
| 34
| 24.25
| 0.809524
| 0
| 0
| 0
| 0
| 0
| 0.154639
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
ab942ea530a8e9a4f19570919c8df74eeb1e5dfb
| 32
|
py
|
Python
|
tests/conftest.py
|
Aetton/fastapi-example
|
24edd0a338dfaa58686b4bdc93b4146d86e76f5b
|
[
"MIT"
] | 95
|
2019-12-21T06:01:16.000Z
|
2022-03-10T07:30:40.000Z
|
tests/conftest.py
|
Aetton/fastapi-example
|
24edd0a338dfaa58686b4bdc93b4146d86e76f5b
|
[
"MIT"
] | 6
|
2019-11-29T07:41:10.000Z
|
2020-12-17T12:36:30.000Z
|
tests/conftest.py
|
Aetton/fastapi-example
|
24edd0a338dfaa58686b4bdc93b4146d86e76f5b
|
[
"MIT"
] | 17
|
2019-12-07T16:04:52.000Z
|
2021-12-13T18:15:56.000Z
|
"""
Place something here...
"""
| 8
| 23
| 0.5625
| 3
| 32
| 6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.15625
| 32
| 3
| 24
| 10.666667
| 0.666667
| 0.71875
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
aba51d8e77235a1d282a00dd90e755282754f1f3
| 96
|
py
|
Python
|
src/main.py
|
deeplearningunb/NextValue
|
50c04ea55fa3141009d1f018197e02344fdda327
|
[
"MIT"
] | null | null | null |
src/main.py
|
deeplearningunb/NextValue
|
50c04ea55fa3141009d1f018197e02344fdda327
|
[
"MIT"
] | 9
|
2021-04-10T22:33:36.000Z
|
2021-05-13T01:47:04.000Z
|
src/main.py
|
deeplearningunb/NextValue
|
50c04ea55fa3141009d1f018197e02344fdda327
|
[
"MIT"
] | null | null | null |
from App import App
app = App()
app.title("NextValue")
app.geometry("1200x800")
app.mainloop()
| 13.714286
| 24
| 0.71875
| 14
| 96
| 4.928571
| 0.571429
| 0.26087
| 0.26087
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.082353
| 0.114583
| 96
| 6
| 25
| 16
| 0.729412
| 0
| 0
| 0
| 0
| 0
| 0.177083
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.2
| 0
| 0.2
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
abbcdf6ed96c23ba7608b54b29cab0d425ccb3f1
| 2,919
|
py
|
Python
|
python/flask/extreme_startup.py
|
billyang98/extreme_startup_servers
|
c5bd94cc20929d71441a20dcda71930fa7dd98d9
|
[
"BSD-2-Clause"
] | null | null | null |
python/flask/extreme_startup.py
|
billyang98/extreme_startup_servers
|
c5bd94cc20929d71441a20dcda71930fa7dd98d9
|
[
"BSD-2-Clause"
] | null | null | null |
python/flask/extreme_startup.py
|
billyang98/extreme_startup_servers
|
c5bd94cc20929d71441a20dcda71930fa7dd98d9
|
[
"BSD-2-Clause"
] | null | null | null |
import math
from flask import Flask, request
app = Flask(__name__)
@app.route("/")
def answer():
q = request.args.get("q", "")
print q
def get_nums(s):
c_idx = q.rindex(':')
substr = q[c_idx+1:]
nums = substr.split(",")
nums = [ int(n) for n in nums]
return nums
def is_prime(a):
return all(a % i for i in range(2,a))
def is_square(a):
return int(a**(1./2))**2 == a
def is_cube(a):
return int(a**(1./3)) ** 3 == a
if 'plus' in q:
words = q.split(" ")
num1 = int(words[-1])
num2 = int(words[-3])
print num1 + num2
return str(num1 + num2)
elif 'largest' in q:
nums = get_nums(q)
return str(max(nums))
elif 'primes' in q:
nums = get_nums(q)
primes = [n for n in nums if is_prime(n)]
strs = [str(n) for n in primes]
return ", ".join(strs)
elif 'square' in q and 'cube' in q:
nums = get_nums(q)
words = [n for n in nums if is_square(n) and is_cube(n)]
strs = [str(n) for n in words]
return ", ".join(strs)
elif 'minus' in q:
nums = [int(s) for s in q.split() if s.isdigit()]
return str(nums[0] - nums[1])
elif 'Fibonacci' in q:
num = q[index('th number')- 1: index('th number')]
return str(fibonacci())
elif 'Prime Minister' in q:
return 'Theresa May'
elif 'James Bond' in q:
return 'Sean Connery'
return "Cancun"
fibs = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711, 28657, 46368, 75025, 121393, 196418, 317811, 514229, 832040, 1346269, 2178309, 3524578, 5702887, 9227465, 14930352, 24157817, 39088169, 63245986, 102334155, 165580141, 267914296, 433494437, 701408733, 1134903170, 1836311903, 2971215073, 4807526976, 7778742049, 12586269025, 20365011074, 32951280099, 53316291173, 86267571272, 139583862445, 225851433717, 365435296162, 591286729879, 956722026041, 1548008755920, 2504730781961, 4052739537881, 6557470319842, 10610209857723, 17167680177565, 27777890035288, 44945570212853, 72723460248141, 117669030460994, 190392490709135, 308061521170129, 498454011879264, 806515533049393, 1304969544928657, 2111485077978050, 3416454622906707, 5527939700884757, 8944394323791464, 14472334024676221, 23416728348467685, 37889062373143906, 61305790721611591, 99194853094755497, 160500643816367088, 259695496911122585, 420196140727489673, 679891637638612258, 1100087778366101931, 1779979416004714189, 2880067194370816120, 4660046610375530309, 7540113804746346429, 12200160415121876738, 19740274219868223167, 31940434634990099905, 51680708854858323072, 83621143489848422977, 135301852344706746049, 218922995834555169026, 354224848179261915075, 573147844013817084101, 927372692193078999176]
if __name__ == "__main__":
app.run(debug=True, host='0.0.0.0')
| 44.227273
| 1,329
| 0.664611
| 350
| 2,919
| 5.474286
| 0.485714
| 0.015658
| 0.013048
| 0.018267
| 0.073069
| 0.054802
| 0.031315
| 0
| 0
| 0
| 0
| 0.496938
| 0.216855
| 2,919
| 65
| 1,330
| 44.907692
| 0.341207
| 0
| 0
| 0.096154
| 0
| 0
| 0.046607
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.038462
| null | null | 0.038462
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
abc249ab0893937d49293ca0558357874d8c3ed5
| 629
|
py
|
Python
|
product/views.py
|
cybrvybe/AU7OMA7A-BI
|
1895abdd4b1ec0908b08ece65df460fc23925f25
|
[
"MIT"
] | null | null | null |
product/views.py
|
cybrvybe/AU7OMA7A-BI
|
1895abdd4b1ec0908b08ece65df460fc23925f25
|
[
"MIT"
] | null | null | null |
product/views.py
|
cybrvybe/AU7OMA7A-BI
|
1895abdd4b1ec0908b08ece65df460fc23925f25
|
[
"MIT"
] | null | null | null |
from django.shortcuts import render
from rest_framework import viewsets
from .models import Product, PriceObj, Service
from .serializers import ProductPriceObjSerializer, ProductSerializer, ServiceSerializer
# Create your views here.
class ProductView(viewsets.ModelViewSet):
serializer_class = ProductSerializer
queryset = Product.objects.all()
class ServiceView(viewsets.ModelViewSet):
serializer_class = ServiceSerializer
queryset = Service.objects.all()
class ProductPriceObjView(viewsets.ModelViewSet):
serializer_class = ProductPriceObjSerializer
queryset = PriceObj.objects.all()
| 37
| 89
| 0.793323
| 59
| 629
| 8.389831
| 0.491525
| 0.121212
| 0.181818
| 0.212121
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.144674
| 629
| 17
| 90
| 37
| 0.920074
| 0.036566
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.307692
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
abdbda30089b3a5081b05015e491f6a7b20d5fc7
| 5,936
|
py
|
Python
|
pykotor/resource/formats/ssf/io_binary.py
|
NickHugi/PyKotor
|
cab1089f8a8a135861bef45340203718d39f5e1f
|
[
"MIT"
] | 1
|
2022-02-21T15:17:28.000Z
|
2022-02-21T15:17:28.000Z
|
pykotor/resource/formats/ssf/io_binary.py
|
NickHugi/PyKotor
|
cab1089f8a8a135861bef45340203718d39f5e1f
|
[
"MIT"
] | 1
|
2022-03-12T16:06:23.000Z
|
2022-03-12T16:06:23.000Z
|
pykotor/resource/formats/ssf/io_binary.py
|
NickHugi/PyKotor
|
cab1089f8a8a135861bef45340203718d39f5e1f
|
[
"MIT"
] | null | null | null |
from __future__ import annotations
from typing import Optional
from pykotor.resource.formats.ssf.data import SSF, SSFSound
from pykotor.resource.type import TARGET_TYPES, SOURCE_TYPES, ResourceReader, ResourceWriter
class SSFBinaryReader(ResourceReader):
def __init__(self, source: SOURCE_TYPES, offset: int = 0, size: int = 0):
super().__init__(source, offset, size)
self._ssf: Optional[SSF] = None
def load(self, auto_close: bool = True) -> SSF:
self._ssf = SSF()
file_type = self._reader.read_string(4)
file_version = self._reader.read_string(4)
if file_type != "SSF ":
raise TypeError("Attempted to load an invalid SSF was loaded.")
if file_version != "V1.1":
raise TypeError("The supplied SSF file version is not supported.")
sounds_offset = self._reader.read_uint32()
self._reader.seek(sounds_offset)
self._ssf.set(SSFSound.BATTLE_CRY_1, self._reader.read_uint32())
self._ssf.set(SSFSound.BATTLE_CRY_2, self._reader.read_uint32())
self._ssf.set(SSFSound.BATTLE_CRY_3, self._reader.read_uint32())
self._ssf.set(SSFSound.BATTLE_CRY_4, self._reader.read_uint32())
self._ssf.set(SSFSound.BATTLE_CRY_5, self._reader.read_uint32())
self._ssf.set(SSFSound.BATTLE_CRY_6, self._reader.read_uint32())
self._ssf.set(SSFSound.SELECT_1, self._reader.read_uint32())
self._ssf.set(SSFSound.SELECT_2, self._reader.read_uint32())
self._ssf.set(SSFSound.SELECT_3, self._reader.read_uint32())
self._ssf.set(SSFSound.ATTACK_GRUNT_1, self._reader.read_uint32())
self._ssf.set(SSFSound.ATTACK_GRUNT_2, self._reader.read_uint32())
self._ssf.set(SSFSound.ATTACK_GRUNT_3, self._reader.read_uint32())
self._ssf.set(SSFSound.PAIN_GRUNT_1, self._reader.read_uint32())
self._ssf.set(SSFSound.PAIN_GRUNT_2, self._reader.read_uint32())
self._ssf.set(SSFSound.LOW_HEALTH, self._reader.read_uint32())
self._ssf.set(SSFSound.DEAD, self._reader.read_uint32())
self._ssf.set(SSFSound.CRITICAL_HIT, self._reader.read_uint32())
self._ssf.set(SSFSound.TARGET_IMMUNE, self._reader.read_uint32())
self._ssf.set(SSFSound.LAY_MINE, self._reader.read_uint32())
self._ssf.set(SSFSound.DISARM_MINE, self._reader.read_uint32())
self._ssf.set(SSFSound.BEGIN_STEALTH, self._reader.read_uint32())
self._ssf.set(SSFSound.BEGIN_SEARCH, self._reader.read_uint32())
self._ssf.set(SSFSound.BEGIN_UNLOCK, self._reader.read_uint32())
self._ssf.set(SSFSound.UNLOCK_FAILED, self._reader.read_uint32())
self._ssf.set(SSFSound.UNLOCK_SUCCESS, self._reader.read_uint32())
self._ssf.set(SSFSound.SEPARATED_FROM_PARTY, self._reader.read_uint32())
self._ssf.set(SSFSound.REJOINED_PARTY, self._reader.read_uint32())
self._ssf.set(SSFSound.POISONED, self._reader.read_uint32())
if auto_close:
self._reader.close()
return self._ssf
class SSFBinaryWriter(ResourceWriter):
def __init__(self, ssf: SSF, target: TARGET_TYPES):
super().__init__(target)
self._ssf: SSF = ssf
def write(self, auto_close: bool = True) -> None:
self._writer.write_string("SSF ")
self._writer.write_string("V1.1")
self._writer.write_uint32(12)
self._writer.write_uint32(self._ssf.get(SSFSound.BATTLE_CRY_1), max_neg1=True)
self._writer.write_uint32(self._ssf.get(SSFSound.BATTLE_CRY_2), max_neg1=True)
self._writer.write_uint32(self._ssf.get(SSFSound.BATTLE_CRY_3), max_neg1=True)
self._writer.write_uint32(self._ssf.get(SSFSound.BATTLE_CRY_4), max_neg1=True)
self._writer.write_uint32(self._ssf.get(SSFSound.BATTLE_CRY_5), max_neg1=True)
self._writer.write_uint32(self._ssf.get(SSFSound.BATTLE_CRY_6), max_neg1=True)
self._writer.write_uint32(self._ssf.get(SSFSound.SELECT_1), max_neg1=True)
self._writer.write_uint32(self._ssf.get(SSFSound.SELECT_2), max_neg1=True)
self._writer.write_uint32(self._ssf.get(SSFSound.SELECT_3), max_neg1=True)
self._writer.write_uint32(self._ssf.get(SSFSound.ATTACK_GRUNT_1), max_neg1=True)
self._writer.write_uint32(self._ssf.get(SSFSound.ATTACK_GRUNT_2), max_neg1=True)
self._writer.write_uint32(self._ssf.get(SSFSound.ATTACK_GRUNT_3), max_neg1=True)
self._writer.write_uint32(self._ssf.get(SSFSound.PAIN_GRUNT_1), max_neg1=True)
self._writer.write_uint32(self._ssf.get(SSFSound.PAIN_GRUNT_2), max_neg1=True)
self._writer.write_uint32(self._ssf.get(SSFSound.LOW_HEALTH), max_neg1=True)
self._writer.write_uint32(self._ssf.get(SSFSound.DEAD), max_neg1=True)
self._writer.write_uint32(self._ssf.get(SSFSound.CRITICAL_HIT), max_neg1=True)
self._writer.write_uint32(self._ssf.get(SSFSound.TARGET_IMMUNE), max_neg1=True)
self._writer.write_uint32(self._ssf.get(SSFSound.LAY_MINE), max_neg1=True)
self._writer.write_uint32(self._ssf.get(SSFSound.DISARM_MINE), max_neg1=True)
self._writer.write_uint32(self._ssf.get(SSFSound.BEGIN_STEALTH), max_neg1=True)
self._writer.write_uint32(self._ssf.get(SSFSound.BEGIN_SEARCH), max_neg1=True)
self._writer.write_uint32(self._ssf.get(SSFSound.BEGIN_UNLOCK), max_neg1=True)
self._writer.write_uint32(self._ssf.get(SSFSound.UNLOCK_FAILED), max_neg1=True)
self._writer.write_uint32(self._ssf.get(SSFSound.UNLOCK_SUCCESS), max_neg1=True)
self._writer.write_uint32(self._ssf.get(SSFSound.SEPARATED_FROM_PARTY), max_neg1=True)
self._writer.write_uint32(self._ssf.get(SSFSound.REJOINED_PARTY), max_neg1=True)
self._writer.write_uint32(self._ssf.get(SSFSound.POISONED), max_neg1=True)
for i in range(8):
self._writer.write_uint32(0xFFFFFFFF)
if auto_close:
self._writer.close()
| 54.962963
| 94
| 0.720013
| 849
| 5,936
| 4.648999
| 0.121319
| 0.108183
| 0.18115
| 0.159615
| 0.734482
| 0.707119
| 0.700279
| 0.700279
| 0.652141
| 0.528503
| 0
| 0.037118
| 0.155829
| 5,936
| 107
| 95
| 55.476636
| 0.750549
| 0
| 0
| 0.022472
| 0
| 0
| 0.018026
| 0
| 0
| 0
| 0.001685
| 0
| 0
| 1
| 0.044944
| false
| 0
| 0.044944
| 0
| 0.123596
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
abfa627ac65a07bc561d2f1fd92c1352820c066f
| 38
|
py
|
Python
|
foiamachine/local/lib/python2.7/encodings/cp1258.py
|
dwillis/foiamachine
|
26d3b02870227696cdaab639c39d47b2a7a42ae5
|
[
"Unlicense",
"MIT"
] | 3
|
2021-08-07T04:01:55.000Z
|
2021-08-07T05:12:11.000Z
|
foiamachine/local/lib/python2.7/encodings/cp1258.py
|
dwillis/foiamachine
|
26d3b02870227696cdaab639c39d47b2a7a42ae5
|
[
"Unlicense",
"MIT"
] | null | null | null |
foiamachine/local/lib/python2.7/encodings/cp1258.py
|
dwillis/foiamachine
|
26d3b02870227696cdaab639c39d47b2a7a42ae5
|
[
"Unlicense",
"MIT"
] | 1
|
2021-08-05T22:51:14.000Z
|
2021-08-05T22:51:14.000Z
|
/usr/lib/python2.7/encodings/cp1258.py
| 38
| 38
| 0.815789
| 7
| 38
| 4.428571
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.157895
| 0
| 38
| 1
| 38
| 38
| 0.657895
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
e649b8a2e7af8313f6816ceb2e80b7de9ad0f7df
| 92
|
py
|
Python
|
codes_auto/461.hamming-distance.py
|
smartmark-pro/leetcode_record
|
6504b733d892a705571eb4eac836fb10e94e56db
|
[
"MIT"
] | null | null | null |
codes_auto/461.hamming-distance.py
|
smartmark-pro/leetcode_record
|
6504b733d892a705571eb4eac836fb10e94e56db
|
[
"MIT"
] | null | null | null |
codes_auto/461.hamming-distance.py
|
smartmark-pro/leetcode_record
|
6504b733d892a705571eb4eac836fb10e94e56db
|
[
"MIT"
] | null | null | null |
#
# @lc app=leetcode.cn id=461 lang=python3
#
# [461] hamming-distance
#
None
# @lc code=end
| 13.142857
| 41
| 0.673913
| 15
| 92
| 4.133333
| 0.866667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.089744
| 0.152174
| 92
| 7
| 42
| 13.142857
| 0.705128
| 0.815217
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
e64c377061e2c7b01279ca69b308eb4f91864c97
| 350
|
py
|
Python
|
geotrek/trekking/tests/base.py
|
GeotrekCE/Geotrek
|
c1393925c1940ac795ab7fc04819cd8c78bc79fb
|
[
"BSD-2-Clause"
] | null | null | null |
geotrek/trekking/tests/base.py
|
GeotrekCE/Geotrek
|
c1393925c1940ac795ab7fc04819cd8c78bc79fb
|
[
"BSD-2-Clause"
] | null | null | null |
geotrek/trekking/tests/base.py
|
GeotrekCE/Geotrek
|
c1393925c1940ac795ab7fc04819cd8c78bc79fb
|
[
"BSD-2-Clause"
] | null | null | null |
from geotrek.authent.tests.base import AuthentFixturesTest
from geotrek.authent.tests.factories import TrekkingManagerFactory
class TrekkingManagerTest(AuthentFixturesTest):
@classmethod
def setUpTestData(cls):
cls.user = TrekkingManagerFactory(password='booh')
def login(self):
self.client.force_login(user=self.user)
| 29.166667
| 66
| 0.774286
| 36
| 350
| 7.5
| 0.611111
| 0.081481
| 0.133333
| 0.17037
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 350
| 11
| 67
| 31.818182
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0.011429
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0.125
| 0.25
| 0
| 0.625
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
05049df9e30fb057ee7bbf44d5efe4da8ffe22e8
| 44
|
py
|
Python
|
fastrelease/__init__.py
|
Nilanshrajput/fastrelease
|
2364eeef6527e61934f3d45ecc23d45dbc342541
|
[
"Apache-2.0"
] | null | null | null |
fastrelease/__init__.py
|
Nilanshrajput/fastrelease
|
2364eeef6527e61934f3d45ecc23d45dbc342541
|
[
"Apache-2.0"
] | null | null | null |
fastrelease/__init__.py
|
Nilanshrajput/fastrelease
|
2364eeef6527e61934f3d45ecc23d45dbc342541
|
[
"Apache-2.0"
] | null | null | null |
__version__ = "0.0.9"
from .core import *
| 8.8
| 21
| 0.636364
| 7
| 44
| 3.428571
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.085714
| 0.204545
| 44
| 4
| 22
| 11
| 0.6
| 0
| 0
| 0
| 0
| 0
| 0.116279
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
051a38063a57e4c2c983f282a7879ef1f0d54398
| 163
|
py
|
Python
|
src/pipedown/utils/empty.py
|
brendanhasz/drainpype
|
a183acec7cae1ef9fde260868e2b021516a8cd7f
|
[
"MIT"
] | 2
|
2021-03-03T12:11:24.000Z
|
2021-03-18T15:09:52.000Z
|
src/pipedown/utils/empty.py
|
brendanhasz/pipedown
|
a183acec7cae1ef9fde260868e2b021516a8cd7f
|
[
"MIT"
] | null | null | null |
src/pipedown/utils/empty.py
|
brendanhasz/pipedown
|
a183acec7cae1ef9fde260868e2b021516a8cd7f
|
[
"MIT"
] | null | null | null |
class EmptyObject:
pass
EMPTY = EmptyObject() # sentinel object to represent empty node output
def is_empty(obj):
return isinstance(obj, EmptyObject)
| 16.3
| 71
| 0.736196
| 20
| 163
| 5.95
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.196319
| 163
| 9
| 72
| 18.111111
| 0.908397
| 0.282209
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0.2
| 0
| 0.2
| 0.6
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
|
0
| 4
|
05284f4a75c4a6256045c97f39e266bcfb87f222
| 297
|
py
|
Python
|
tests/commands/test_split_record_packages.py
|
mariob0y/ocdskit
|
be377c35644d93b037e7ff7a6ad3014ccb20747f
|
[
"BSD-3-Clause"
] | 12
|
2018-12-04T08:53:33.000Z
|
2022-01-17T18:23:45.000Z
|
tests/commands/test_split_record_packages.py
|
mariob0y/ocdskit
|
be377c35644d93b037e7ff7a6ad3014ccb20747f
|
[
"BSD-3-Clause"
] | 166
|
2017-11-19T01:42:19.000Z
|
2022-02-10T22:04:31.000Z
|
tests/commands/test_split_record_packages.py
|
mariob0y/ocdskit
|
be377c35644d93b037e7ff7a6ad3014ccb20747f
|
[
"BSD-3-Clause"
] | 5
|
2018-08-01T16:59:08.000Z
|
2021-06-16T14:01:36.000Z
|
from ocdskit.cli.__main__ import main
from tests import assert_streaming
def test_command(capsys, monkeypatch):
assert_streaming(capsys, monkeypatch, main, ['split-record-packages', '1'],
['realdata/record-package_package.json'], ['realdata/record-package_split.json'])
| 37.125
| 102
| 0.727273
| 35
| 297
| 5.914286
| 0.571429
| 0.144928
| 0.202899
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.003968
| 0.151515
| 297
| 7
| 103
| 42.428571
| 0.81746
| 0
| 0
| 0
| 0
| 0
| 0.309764
| 0.306397
| 0
| 0
| 0
| 0
| 0.4
| 1
| 0.2
| false
| 0
| 0.4
| 0
| 0.6
| 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
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
05554be5eacf4645cadcea7c0aaac1734931080e
| 14,714
|
py
|
Python
|
mayacal/utils/utils.py
|
jonbleiberg88/mayacal
|
0045ddafa631484804e631848a473ee2618d90e1
|
[
"MIT"
] | 1
|
2019-11-30T04:23:45.000Z
|
2019-11-30T04:23:45.000Z
|
mayacal/utils/utils.py
|
jonbleiberg88/mayacal
|
0045ddafa631484804e631848a473ee2618d90e1
|
[
"MIT"
] | 2
|
2022-01-10T16:26:23.000Z
|
2022-01-21T02:07:30.000Z
|
mayacal/utils/utils.py
|
jonbleiberg88/mayacal
|
0045ddafa631484804e631848a473ee2618d90e1
|
[
"MIT"
] | null | null | null |
import math
import datetime
__all__ = [
"JulianDate",
"GregorianDate",
"julian_day_to_julian",
"julian_day_to_gregorian",
"datetime_to_gregorian",
"datetime_to_julian",
"datetime_to_julian_day",
"datetime_to_mayadate",
]
class JulianDate:
"""Basic class to handle (proleptic) Julian calendar dates and conversions
Note that this class uses the astronomical year convention for years before 1 CE,
i.e. 1 BCE = 0, 2 BCE = -1, etc.
Attributes:
day (int): The day of the Julian calendar date
month (int): The month number of the Julian calendar date
year (int): The (astronomical) year number of the Julian calendar date
"""
def __init__(self, day, month, year):
"""Creates a new JulianDate object
Note that this class uses the astronomical year convention for years before 1 CE,
i.e. 1 BCE = 0, 2 BCE = -1, etc.
Args:
day (int): The day of the Julian calendar date
month (int): The month number of the Julian calendar date
year (int): The (astronomical) year number of the Julian calendar date
"""
if day > 31 or day < 1:
raise ValueError("Invalid day, must be integer between 1 and 31")
self.day = day
if month > 12 or month < 1:
raise ValueError("Invalid month, must be integer between 1 and 12")
self.month = month
self.year = year
self.__check_month_days()
def to_julian_day(self):
"""Converts the Julian Calendar date to its corresponding Julian Day number
Note that the algorithm is only valid for Julian Day numbers greater than or
equal to zero, i.e. Julian calendar years after -4712 (4713 BCE). Earlier
calendar years will raise a ValueError.
Adapted from: https://www.researchgate.net/publication/316558298_Date_Algorithms#pf5
Returns:
(int): The Julian Day number corresponding to the Julian Calendar date
"""
if self.year < -4712:
raise ValueError(
"Algorithm only valid for Julian year greater than or equal to -4712"
)
if self.month < 3:
M = self.month + 12
Y = self.year - 1
else:
M = self.month
Y = self.year
D = self.day
return D + (153 * M - 457) // 5 + 365 * Y + math.floor(Y / 4) + 1721116.5
def to_gregorian(self, as_datetime=False):
"""Converts the Julian calendar date to its Gregorian calendar equivalent
Returns:
(GregorianDate): The Gregorian calendar date corresponding to the
Julian calendar date.
"""
return julian_day_to_gregorian(math.ceil(self.to_julian_day()))
def to_mayadate(self, correlation=584283):
"""Converts the Julian calendar date to its Mayan calendar equivalent
Returns:
(Mayadate): The Mayan calendar date corresponding to the Gregorian
calendar date.
"""
from .long_count import LongCount, kin_to_long_count
from .mayadate import Mayadate
num_kin = math.ceil(self.to_julian_day()) - correlation
long_count = kin_to_long_count(num_kin)
return Mayadate(long_count, None)
def is_leap_year(self):
"""Determines whether the year of the JulianDate object is a leap year
Returns:
(bool): True if the year is a leap year, False otherwise
"""
if self.year % 4 == 0:
return True
return False
def __check_month_days(self):
"""Raises error if the current configuration of month, day, year is invalid"""
max_days = {
1: 31,
2: 28,
3: 31,
4: 30,
5: 31,
6: 30,
7: 31,
8: 31,
9: 30,
10: 31,
11: 30,
12: 31,
}
if self.is_leap_year():
max_days[2] = 29
if max_days[self.month] < self.day:
raise ValueError(f"Invalid day, month combination {self.month}/{self.day}")
def __eq__(self, other):
return (
self.day == other.day
and self.month == other.month
and self.year == other.year
)
def __repr__(self):
return f"({self.day}, {self.month}, {self.year})"
def __str__(self):
if self.year > 0:
return f"{_num_to_month(self.month)} {self.day}, {self.year} CE"
elif self.year <= 0:
return f"{_num_to_month(self.month)} {self.day}, {abs(self.year) + 1} BCE"
class GregorianDate:
"""Basic class to handle (proleptic) Gregorian calendar dates and conversions
Note that this class uses the astronomical year convention for years before 1 CE,
i.e. 1 BCE = 0, 2 BCE = -1, etc.
Attributes:
day (int): The day of the Gregorian calendar date
month (int): The month number of the Gregorian calendar date
year (int): The (astronomical) year number of the Gregorian calendar date
"""
def __init__(self, day, month, year):
"""Creates a new GregorianDate object
Note that this class uses the astronomical year convention for years before 1 CE,
i.e. 1 BCE = 0, 2 BCE = -1, etc.
Args:
day (int): The day of the Gregorian calendar date
month (int): The month number of the Gregorian calendar date
year (int): The (astronomical) year number of the Gregorian calendar date
"""
if day > 31 or day < 1:
raise ValueError("Invalid day, must be integer between 1 and 31")
self.day = day
if month > 12 or month < 1:
raise ValueError("Invalid month, must be integer between 1 and 12")
self.month = month
self.year = year
self.__check_month_days()
def to_julian_day(self):
"""Converts the Gregorian calendar date to its Julian Day number equivalent
Adapted from: https://www.researchgate.net/publication/316558298_Date_Algorithms#pf5
Returns:
(float): The Julian day number corresponding to the Gregorian calendar
date.
"""
if self.month < 3:
M = self.month + 12
Y = self.year - 1
else:
M = self.month
Y = self.year
D = self.day
return (
D
+ (153 * M - 457) // 5
+ 365 * Y
+ math.floor(Y / 4)
- math.floor(Y / 100)
+ math.floor(Y / 400)
+ 1721118.5
)
def to_julian(self):
"""Converts the Gregorian calendar date to its Julian calendar equivalent
Returns:
(JulianDate): The Julian calendar date corresponding to the Gregorian
calendar date.
"""
return julian_day_to_julian(math.ceil(self.to_julian_day()))
def to_mayadate(self, correlation=584283):
"""Converts the Gregorian calendar date to its Mayan calendar equivalent
Returns:
(Mayadate): The Mayan calendar date corresponding to the Gregorian
calendar date.
"""
from .long_count import LongCount, kin_to_long_count
from .mayadate import Mayadate
num_kin = math.ceil(self.to_julian_day()) - correlation
long_count = kin_to_long_count(num_kin)
return Mayadate(long_count, None)
def to_datetime(self):
"""Converts the GregorianDate object to a datetime.date object
Note that datetime.date objects do not support years before 1 CE. Attempting
to convert GregorianDate objects with year before 1 CE will raise a ValueError.
Returns:
(datetime.date): The datetime.date object corresponding to the Gregorian
calendar date.
"""
if self.year < 1:
raise ValueError("datetime.date objects do not support years before 1 CE")
return datetime.date(self.year, self.month, self.day)
def is_leap_year(self):
"""Determines whether the year of the GregorianDate object is a leap year
Returns:
(bool): True if the year is a leap year, False otherwise
"""
if self.year % 4 == 0:
if self.year % 100 == 0 and self.year % 400 != 0:
return False
else:
return True
return False
def __check_month_days(self):
"""Raises error if the current configuration of month, day, year is invalid"""
max_days = {
1: 31,
2: 28,
3: 31,
4: 30,
5: 31,
6: 30,
7: 31,
8: 31,
9: 30,
10: 31,
11: 30,
12: 31,
}
if self.is_leap_year():
max_days[2] = 29
if max_days[self.month] < self.day:
raise ValueError(f"Invalid day, month combination {self.month}/{self.day}")
def __eq__(self, other):
return (
self.day == other.day
and self.month == other.month
and self.year == other.year
)
def __repr__(self):
return f"({self.day}, {self.month}, {self.year})"
def __str__(self):
if self.year > 0:
return f"{_num_to_month(self.month)} {self.day}, {self.year} CE"
elif self.year <= 0:
return f"{_num_to_month(self.month)} {self.day}, {abs(self.year) + 1} BCE"
def _convert_julian_day(julian_day, mode="julian"):
"""Converts a Julian Day number to its (proleptic) Julian or Gregorian calendar equivalent
Adapted from: https://en.wikipedia.org/wiki/Julian_day#Julian_or_Gregorian_calendar_from_Julian_day_number
Note that the algorithm is only valid for Julian Day numbers greater than or
equal to zero. Negative arguments for julian_day will raise a ValueError.
Args:
julian_day (int): Julian Day number to convert, must be greater than or
equal to 0
mode (str): The target calendar to convert to, either 'julian' or
'gregorian'. Defaults to 'julian'.
Returns:
A (day, month, year) tuple representing the day, month, and year in the
target calendar.
"""
if julian_day < 0:
raise ValueError(
"Algorithm only valid for Julian Day greater than or equal to zero"
)
julian_day = math.ceil(julian_day)
# algorithm parameters
y = 4716
j = 1401
m = 2
n = 12
r = 4
p = 1461
v = 3
u = 5
s = 153
w = 2
B = 274277
C = -38
# intermediate calculations
if mode == "julian":
f = julian_day + j
elif mode == "gregorian":
f = julian_day + j + (((4 * julian_day + B) // 146097) * 3) // 4 + C
else:
raise ValueError("Unrecognized mode - supports 'julian' or 'gregorian'")
e = r * f + v
g = (e % p) // r
h = u * g + w
day = (h % s) // u + 1 # day in target calendar
month = ((h // s + m) % n) + 1 # month in target calendar
year = (e // p) - y + ((n + m - month) // n) # year in target calendar
return day, month, year
def julian_day_to_julian(julian_day):
"""Converts a Julian Day number to its (proleptic) Julian calendar equivalent
Adapted from: https://en.wikipedia.org/wiki/Julian_day#Julian_or_Gregorian_calendar_from_Julian_day_number
Note that the algorithm is only valid for Julian Day numbers greater than or
equal to zero. Negative arguments for julian_day will raise a ValueError.
Args:
julian_day (int): Julian Day number to convert, must be greater than or
equal to 0
Returns:
A (day, month, year) tuple representing the day, month, and year in the
Julian calendar.
"""
day, month, year = _convert_julian_day(julian_day, mode="julian")
return JulianDate(day, month, year)
def julian_day_to_gregorian(julian_day):
"""Converts a Julian Day number to its (proleptic) Gregorian calendar equivalent
Adapted from: https://en.wikipedia.org/wiki/Julian_day#Julian_or_Gregorian_calendar_from_Julian_day_number
Note that the algorithm is only valid for Julian Day numbers greater than or
equal to zero. Negative arguments for julian_day will raise a ValueError.
Args:
julian_day (int): Julian Day number to convert, must be greater than or
equal to 0
Returns:
A (day, month, year) tuple representing the day, month, and year in the
Gregorian calendar.
"""
day, month, year = _convert_julian_day(julian_day, mode="gregorian")
return GregorianDate(day, month, year)
def datetime_to_gregorian(date):
"""Converts a datetime.date object to a GregorianDate object
Args:
date (datetime.date): The datetime.date object to convert
Returns:
(GregorianDate): The corresponding GregorianDate object
"""
return GregorianDate(date.day, date.month, date.year)
def datetime_to_julian(date):
"""Converts a datetime.date object to the corresponding Julian calendar date
Args:
date (datetime.date): The datetime.date object to convert
Returns:
(JulianDate): The corresponding Julian calendar date
"""
g = GregorianDate(date.day, date.month, date.year)
return g.to_julian()
def datetime_to_julian_day(date):
"""Converts a datetime.date object to the corresponding Julian Day number
Args:
date (datetime.date): The datetime.date object to convert
Returns:
(float): The corresponding Julian Day number
"""
g = GregorianDate(date.day, date.month, date.year)
return g.to_julian_day()
def datetime_to_mayadate(date):
"""Converts a datetime.date object to the corresponding Maya calendar date
Args:
date (datetime.date): The datetime.date object to convert
Returns:
(Mayadate): The corresponding Mayan calendar date.
"""
g = GregorianDate(date.day, date.month, date.year)
return g.to_mayadate()
def _num_to_month(num):
"""Helper function to convert month number to short name
Args:
num (int): the month number to convert
Returns:
(str): The three letter short name of the corresponding month
"""
return {
1: "Jan",
2: "Feb",
3: "Mar",
4: "Apr",
5: "May",
6: "Jun",
7: "Jul",
8: "Aug",
9: "Sep",
10: "Oct",
11: "Nov",
12: "Dec",
}[num]
| 28.85098
| 110
| 0.597322
| 1,930
| 14,714
| 4.442487
| 0.110363
| 0.060882
| 0.037322
| 0.041987
| 0.794028
| 0.772918
| 0.752274
| 0.708771
| 0.693025
| 0.672265
| 0
| 0.030827
| 0.316569
| 14,714
| 509
| 111
| 28.907662
| 0.821798
| 0.443659
| 0
| 0.559091
| 0
| 0.009091
| 0.145358
| 0.030083
| 0
| 0
| 0
| 0
| 0
| 1
| 0.122727
| false
| 0
| 0.027273
| 0.018182
| 0.286364
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
055b52050546a204f740ed65a0d87c0c333374af
| 1,891
|
py
|
Python
|
src/game_of_life/python_coderetreat_socramob/cr_socrakassel01/gol01_test.py
|
hemmerling/codingdojo
|
3e8860b78e96ac15cde6a12db3b2431e8b63714f
|
[
"Apache-2.0"
] | null | null | null |
src/game_of_life/python_coderetreat_socramob/cr_socrakassel01/gol01_test.py
|
hemmerling/codingdojo
|
3e8860b78e96ac15cde6a12db3b2431e8b63714f
|
[
"Apache-2.0"
] | null | null | null |
src/game_of_life/python_coderetreat_socramob/cr_socrakassel01/gol01_test.py
|
hemmerling/codingdojo
|
3e8860b78e96ac15cde6a12db3b2431e8b63714f
|
[
"Apache-2.0"
] | null | null | null |
#This file was originally generated by PyScripter's unitest wizard
import unittest
from gol01 import Gol01
def dummy():
""" Dummy function for comparison of the return values """
return
# tdd = test first
# input -> output
# Ich moechte testen, ob ein Feld 0 Nachbarn hat
# Ich teste die Nachbarn ob sie leben
class Gol01Test(unittest.TestCase):
# Given
def setUp(self):
self.gol = Gol01()
pass
def tearDown(self):
pass
# When
# Then
def testHat0Nachbarn(self):
assert (self.gol.nachbar(0,0) == False) \
and (self.gol.nachbar(0,1) == False) \
and (self.gol.nachbar(0,2) == False) \
and (self.gol.nachbar(1,0) == False) \
and (self.gol.nachbar(1,2) == False) \
and (self.gol.nachbar(2,0) == False) \
and (self.gol.nachbar(2,1) == False) \
and (self.gol.nachbar(2,2) == False) \
, 'Gol01.get_size() does not provide the right return value'
pass
def testHat1NachbarnAuf00(self):
self.gol.setNachbar(0,0)
assert (self.gol.nachbar(0,0) == True) \
and (self.gol.nachbar(0,1) == False) \
and (self.gol.nachbar(0,2) == False) \
and (self.gol.nachbar(1,0) == False) \
and (self.gol.nachbar(1,2) == False) \
and (self.gol.nachbar(2,0) == False) \
and (self.gol.nachbar(2,1) == False) \
and (self.gol.nachbar(2,2) == False) \
, 'Gol01.get_size() does not provide the right return value'
pass
# run all tests
if __name__ == "__main__":
try:
unittest.main()
except SystemExit as inst:
if inst.args[0] is True: # raised by sys.exit(True) when tests failed
raise
| 32.050847
| 78
| 0.532522
| 239
| 1,891
| 4.171548
| 0.364017
| 0.126379
| 0.224674
| 0.238716
| 0.484453
| 0.484453
| 0.435306
| 0.435306
| 0.435306
| 0.435306
| 0
| 0.041767
| 0.341618
| 1,891
| 58
| 79
| 32.603448
| 0.759036
| 0.161819
| 0
| 0.512821
| 1
| 0
| 0.07947
| 0
| 0
| 0
| 0
| 0
| 0.051282
| 1
| 0.128205
| false
| 0.102564
| 0.051282
| 0
| 0.230769
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
055fd2acf8bce94bc1632dd32b716cc69b603faa
| 415
|
py
|
Python
|
Funciones y creación de png y pdf/1.-Tipos_Funciones.py
|
DataEngel/Solucion-de-Ecuaciones-Diferenciales-con-Python-
|
2c1db2178e154e64d95d01c04db9ada91292961c
|
[
"MIT"
] | null | null | null |
Funciones y creación de png y pdf/1.-Tipos_Funciones.py
|
DataEngel/Solucion-de-Ecuaciones-Diferenciales-con-Python-
|
2c1db2178e154e64d95d01c04db9ada91292961c
|
[
"MIT"
] | null | null | null |
Funciones y creación de png y pdf/1.-Tipos_Funciones.py
|
DataEngel/Solucion-de-Ecuaciones-Diferenciales-con-Python-
|
2c1db2178e154e64d95d01c04db9ada91292961c
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
"""
Spyder Editor
This is a temporary script file.
"""
import numpy as np
def funcion(x,y=2):
return x + 2 + y
print('El resultado de la funcion basica es: ', funcion(2))
def funcion_basic(x):
return np.sin(x)
print('El resultado operacion de la funcion lamda es: ', funcion_basic(np.pi/2))
f = lambda x,y=3 : x + 2
print('El resultado de la funcion lambda ', f(2))
| 17.291667
| 80
| 0.638554
| 72
| 415
| 3.652778
| 0.5
| 0.079848
| 0.18251
| 0.136882
| 0.205323
| 0.205323
| 0
| 0
| 0
| 0
| 0
| 0.024691
| 0.219277
| 415
| 23
| 81
| 18.043478
| 0.787037
| 0.168675
| 0
| 0
| 0
| 0
| 0.353116
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.222222
| false
| 0
| 0.111111
| 0.222222
| 0.555556
| 0.333333
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
05684b36bb68c5d2caa7128872ded4553b1fe387
| 96
|
py
|
Python
|
src/magic-power/run.py
|
rickymax/mp-boshrelease
|
3476a24a302db2c8f3a4dd496f3814b4fc20f082
|
[
"Apache-2.0"
] | null | null | null |
src/magic-power/run.py
|
rickymax/mp-boshrelease
|
3476a24a302db2c8f3a4dd496f3814b4fc20f082
|
[
"Apache-2.0"
] | null | null | null |
src/magic-power/run.py
|
rickymax/mp-boshrelease
|
3476a24a302db2c8f3a4dd496f3814b4fc20f082
|
[
"Apache-2.0"
] | null | null | null |
#!venv/bin/python
from magic_power import app
app.run(host='0.0.0.0', port=8080, debug = True)
| 19.2
| 48
| 0.708333
| 19
| 96
| 3.526316
| 0.789474
| 0.089552
| 0.089552
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.094118
| 0.114583
| 96
| 4
| 49
| 24
| 0.694118
| 0.166667
| 0
| 0
| 0
| 0
| 0.088608
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
0582ed0a59ae0d37f829c4458733d680e6ef2976
| 83
|
py
|
Python
|
main.py
|
naseemap47/PoseTracking-ComputerVision-python
|
de4f8f38d96b3e1c7c82fd5d26fb83fad6ada78e
|
[
"MIT"
] | 1
|
2022-03-09T11:04:23.000Z
|
2022-03-09T11:04:23.000Z
|
main.py
|
naseemap47/PoseTracking-ComputerVision-python
|
de4f8f38d96b3e1c7c82fd5d26fb83fad6ada78e
|
[
"MIT"
] | null | null | null |
main.py
|
naseemap47/PoseTracking-ComputerVision-python
|
de4f8f38d96b3e1c7c82fd5d26fb83fad6ada78e
|
[
"MIT"
] | null | null | null |
from posetracking_module import trackpose
if __name__=='__main__':
trackpose()
| 20.75
| 41
| 0.783133
| 9
| 83
| 6.222222
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.13253
| 83
| 4
| 42
| 20.75
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0.095238
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
058e3040d20d1eedeb9c49b96b82869012241f92
| 10,235
|
py
|
Python
|
glue-codes/kitefast/preprocessor/src/main_set.py
|
OpenFAST/KiteFAST
|
a7329f7c454aab102fadd77771b741a923abd0a7
|
[
"Apache-2.0"
] | 6
|
2020-12-22T18:21:36.000Z
|
2021-11-16T10:13:27.000Z
|
glue-codes/kitefast/preprocessor/src/main_set.py
|
OpenFAST/KiteFAST
|
a7329f7c454aab102fadd77771b741a923abd0a7
|
[
"Apache-2.0"
] | null | null | null |
glue-codes/kitefast/preprocessor/src/main_set.py
|
OpenFAST/KiteFAST
|
a7329f7c454aab102fadd77771b741a923abd0a7
|
[
"Apache-2.0"
] | 2
|
2020-10-13T11:39:01.000Z
|
2021-04-20T21:04:46.000Z
|
#
# Copyright 2018 National Renewable Energy Laboratory
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
from .iohandler import Output
class MainSet():
def __init__(self,
simulation_type,
mip_reference_frame,
components):
self.simulation_type = simulation_type
self.mip_reference_frame = mip_reference_frame
if self.simulation_type < 3:
self.fuselage = components[0]
self.starboard_wing = components[1]
self.port_wing = components[2]
self.vstab = components[3]
self.starboard_hstab = components[4]
self.port_hstab = components[5]
self.starboard_pylons = components[6] # this is [Pylon]
self.port_pylons = components[7] # this is [Pylon]
self.starboard_rotors = components[8] # this is [Rotor]
self.port_rotors = components[9] # this is [Rotor]
if self.simulation_type > 1:
self.platform = components[-1]
def export_set_file(self, output_directory):
output = Output("{}/KiteMain.set".format(output_directory))
output.write_line("# This file sets the reference id's and counters")
output.write_empty_line()
output.write_line("# *** Reference ***")
output.write_empty_line()
output.write_line("set: integer mip_rf = 10;")
output.write_line("{}".format(self.mip_reference_frame))
output.write_empty_line()
if self.simulation_type < 3:
output.write_line("# *** Fuselage ***")
output.write_line("set: integer {}_root_node = {};".format(self.fuselage.component_name, self.fuselage.mbdyn_ref_index))
output.write_line("set: integer {}_node_count = {};".format(self.fuselage.component_name, self.fuselage.node_count))
output.write_line("set: integer {}_body_count = {};".format(self.fuselage.component_name, self.fuselage.body_count))
output.write_line("set: integer {}_beam_count = {};".format(self.fuselage.component_name, self.fuselage.beam_count))
output.write_empty_line()
output.write_line("# *** Wing ***")
output.write_line("set: integer {}_root_node = {};".format(self.starboard_wing.component_name, self.starboard_wing.mbdyn_ref_index))
output.write_line("set: integer {}_node_count = {};".format(self.starboard_wing.component_name, self.starboard_wing.node_count))
output.write_line("set: integer {}_body_count = {};".format(self.starboard_wing.component_name, self.starboard_wing.body_count))
output.write_line("set: integer {}_beam_count = {};".format(self.starboard_wing.component_name, self.starboard_wing.beam_count))
output.write_empty_line()
output.write_line("set: integer {}_root_node = {};".format(self.port_wing.component_name, self.port_wing.mbdyn_ref_index))
output.write_line("set: integer {}_node_count = {};".format(self.port_wing.component_name, self.port_wing.node_count))
output.write_line("set: integer {}_body_count = {};".format(self.port_wing.component_name, self.port_wing.body_count))
output.write_line("set: integer {}_beam_count = {};".format(self.port_wing.component_name, self.port_wing.beam_count))
output.write_empty_line()
output.write_line("# *** Horizontal Stabilizer ***")
output.write_line("set: integer {}_root_node = {};".format(self.starboard_hstab.component_name, self.starboard_hstab.mbdyn_ref_index))
output.write_line("set: integer {}_node_count = {};".format(self.starboard_hstab.component_name, self.starboard_hstab.node_count))
output.write_line("set: integer {}_body_count = {};".format(self.starboard_hstab.component_name, self.starboard_hstab.body_count))
output.write_line("set: integer {}_beam_count = {};".format(self.starboard_hstab.component_name, self.starboard_hstab.beam_count))
output.write_empty_line()
output.write_line("set: integer {}_root_node = {};".format(self.port_hstab.component_name, self.port_hstab.mbdyn_ref_index))
output.write_line("set: integer {}_node_count = {};".format(self.port_hstab.component_name, self.port_hstab.node_count))
output.write_line("set: integer {}_body_count = {};".format(self.port_hstab.component_name, self.port_hstab.body_count))
output.write_line("set: integer {}_beam_count = {};".format(self.port_hstab.component_name, self.port_hstab.beam_count))
output.write_empty_line()
output.write_line("# *** Vertical Stabilizer ***")
output.write_line("set: integer {}_root_node = {};".format(self.vstab.component_name, self.vstab.mbdyn_ref_index))
output.write_line("set: integer {}_node_count = {};".format(self.vstab.component_name, self.vstab.node_count))
output.write_line("set: integer {}_body_count = {};".format(self.vstab.component_name, self.vstab.body_count))
output.write_line("set: integer {}_beam_count = {};".format(self.vstab.component_name, self.vstab.beam_count))
output.write_empty_line()
output.write_line("# *** Pylons ***")
for pylon in self.starboard_pylons:
output.write_line("set: integer {}_root_node = {};".format(pylon.component_name, pylon.mbdyn_ref_index))
output.write_line("set: integer {}_node_count = {};".format(pylon.component_name, pylon.node_count))
output.write_line("set: integer {}_body_count = {};".format(pylon.component_name, pylon.body_count))
output.write_line("set: integer {}_beam_count = {};".format(pylon.component_name, pylon.beam_count))
for pylon in self.port_pylons:
output.write_line("set: integer {}_root_node = {};".format(pylon.component_name, pylon.mbdyn_ref_index))
output.write_line("set: integer {}_node_count = {};".format(pylon.component_name, pylon.node_count))
output.write_line("set: integer {}_body_count = {};".format(pylon.component_name, pylon.body_count))
output.write_line("set: integer {}_beam_count = {};".format(pylon.component_name, pylon.beam_count))
output.write_empty_line()
output.write_line("# *** Rotors ***")
for component in self.starboard_rotors + self.port_rotors:
output.write_line("set: integer {}_reference_frame = {};".format(component.component_name, component.mbdyn_ref_index))
output.write_line("set: integer {}_root_node = {};".format(component.component_name, component.mbdyn_ref_index))
output.write_line("set: integer {}_node_count = {};".format(component.component_name, component.node_count))
if self.simulation_type > 1:
output.write_line("# *** Platform ***")
output.write_line("set: integer {}_root_node = {};".format(self.platform.component_name, self.platform.mbdyn_ref_index))
output.write_empty_line()
output.write_line("# Initialize variables for reuse later")
output.write_line("set: integer current_beam = 0;")
output.write_line("set: real twist1 = 0.0;")
output.write_line("set: real twist2 = 0.0;")
output.write_line("set: integer beam_node1 = 0;")
output.write_line("set: integer beam_node2 = 0;")
output.write_line("set: integer beam_node3 = 0;")
output.write_line("set: real k1_11 = 0.0;")
output.write_line("set: real k1_12 = 0.0;")
output.write_line("set: real k1_13 = 0.0;")
output.write_line("set: real k1_14 = 0.0;")
output.write_line("set: real k1_15 = 0.0;")
output.write_line("set: real k1_16 = 0.0;")
output.write_line("set: real k1_22 = 0.0;")
output.write_line("set: real k1_23 = 0.0;")
output.write_line("set: real k1_24 = 0.0;")
output.write_line("set: real k1_25 = 0.0;")
output.write_line("set: real k1_26 = 0.0;")
output.write_line("set: real k1_33 = 0.0;")
output.write_line("set: real k1_34 = 0.0;")
output.write_line("set: real k1_35 = 0.0;")
output.write_line("set: real k1_36 = 0.0;")
output.write_line("set: real k1_44 = 0.0;")
output.write_line("set: real k1_45 = 0.0;")
output.write_line("set: real k1_46 = 0.0;")
output.write_line("set: real k1_55 = 0.0;")
output.write_line("set: real k1_56 = 0.0;")
output.write_line("set: real k1_66 = 0.0;")
output.write_line("set: real k2_11 = 0.0;")
output.write_line("set: real k2_12 = 0.0;")
output.write_line("set: real k2_13 = 0.0;")
output.write_line("set: real k2_14 = 0.0;")
output.write_line("set: real k2_15 = 0.0;")
output.write_line("set: real k2_16 = 0.0;")
output.write_line("set: real k2_22 = 0.0;")
output.write_line("set: real k2_23 = 0.0;")
output.write_line("set: real k2_24 = 0.0;")
output.write_line("set: real k2_25 = 0.0;")
output.write_line("set: real k2_26 = 0.0;")
output.write_line("set: real k2_33 = 0.0;")
output.write_line("set: real k2_34 = 0.0;")
output.write_line("set: real k2_35 = 0.0;")
output.write_line("set: real k2_36 = 0.0;")
output.write_line("set: real k2_44 = 0.0;")
output.write_line("set: real k2_45 = 0.0;")
output.write_line("set: real k2_46 = 0.0;")
output.write_line("set: real k2_55 = 0.0;")
output.write_line("set: real k2_56 = 0.0;")
output.write_line("set: real k2_66 = 0.0;")
output.end()
| 63.179012
| 146
| 0.649927
| 1,377
| 10,235
| 4.549746
| 0.118373
| 0.187869
| 0.229848
| 0.244214
| 0.766321
| 0.737909
| 0.734078
| 0.691141
| 0.478212
| 0.419793
| 0
| 0.030663
| 0.20977
| 10,235
| 161
| 147
| 63.571429
| 0.743942
| 0.062237
| 0
| 0.169118
| 0
| 0
| 0.263103
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.014706
| false
| 0
| 0.007353
| 0
| 0.029412
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
5533d603b521fbd198268592bb5ff254951cd44f
| 79
|
py
|
Python
|
dfdata/source/collect/futures/__init__.py
|
Eric2827/DFdata
|
4db142232fc7127da3faae7c608772c72005cd25
|
[
"MIT"
] | null | null | null |
dfdata/source/collect/futures/__init__.py
|
Eric2827/DFdata
|
4db142232fc7127da3faae7c608772c72005cd25
|
[
"MIT"
] | null | null | null |
dfdata/source/collect/futures/__init__.py
|
Eric2827/DFdata
|
4db142232fc7127da3faae7c608772c72005cd25
|
[
"MIT"
] | null | null | null |
from dfdata.source.collect.futures.futures import (
get_futures_contract,
)
| 26.333333
| 51
| 0.797468
| 10
| 79
| 6.1
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.113924
| 79
| 3
| 52
| 26.333333
| 0.871429
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
5542b3e511a87a643020b2b17edce0732309f6f6
| 135
|
py
|
Python
|
wsgi.py
|
Nurul-GC/gcrypter-api
|
3ef74f3ad37c98ae7575116c81bbfa7131d2e561
|
[
"BSD-3-Clause"
] | 1
|
2021-10-10T02:15:05.000Z
|
2021-10-10T02:15:05.000Z
|
wsgi.py
|
ArtesGC/gcrypter-api
|
3ef74f3ad37c98ae7575116c81bbfa7131d2e561
|
[
"BSD-3-Clause"
] | 1
|
2021-10-10T02:26:27.000Z
|
2021-10-10T02:26:27.000Z
|
wsgi.py
|
ArtesGC/gcrypter-api
|
3ef74f3ad37c98ae7575116c81bbfa7131d2e561
|
[
"BSD-3-Clause"
] | null | null | null |
"""
here we'll
activate our app instance
"""
from app import app
if __name__ == '__main__':
app.run(host='127.0.0.1', port=8000)
| 13.5
| 40
| 0.651852
| 23
| 135
| 3.478261
| 0.826087
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.09009
| 0.177778
| 135
| 9
| 41
| 15
| 0.630631
| 0.266667
| 0
| 0
| 0
| 0
| 0.186813
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
5582ef1b835960e08b22f41570b32db39f2a9daf
| 8,491
|
py
|
Python
|
src/means/tests/test_eq_central_moments.py
|
nicktimko/means
|
fe164916a1d84ab2a4fa039871d38ccdf638b1db
|
[
"MIT"
] | 10
|
2016-05-25T08:28:39.000Z
|
2020-06-04T03:19:50.000Z
|
src/means/tests/test_eq_central_moments.py
|
nicktimko/means
|
fe164916a1d84ab2a4fa039871d38ccdf638b1db
|
[
"MIT"
] | 5
|
2015-12-08T14:01:15.000Z
|
2020-01-10T22:42:18.000Z
|
src/means/tests/test_eq_central_moments.py
|
nicktimko/means
|
fe164916a1d84ab2a4fa039871d38ccdf638b1db
|
[
"MIT"
] | 6
|
2015-12-10T17:24:11.000Z
|
2021-03-22T16:12:17.000Z
|
import unittest
import sympy
from means.approximation.mea.eq_central_moments import eq_central_moments
from means.core import Moment
from means.util.sympyhelpers import to_sympy_matrix, assert_sympy_expressions_equal
class CentralMomentsTestCase(unittest.TestCase):
def test_centralmoments_using_p53model(self):
"""
Given the p53 model hard codded bellow,the result of central moment should match exactly the expected one
:return:
"""
counter_nvecs = [[0, 0, 0], [0, 0, 2], [0, 1, 1], [0, 2, 0], [1, 0, 1], [1, 1, 0], [2, 0, 0]]
mcounter_nvecs = [[0, 0, 0], [0, 0, 1], [0, 1, 0], [1, 0, 0], [0, 0, 2], [0, 1, 1], [0, 2, 0],
[1, 0, 1], [1, 1, 0], [2, 0, 0]]
counter = [Moment(c,sympy.Symbol("YU{0}".format(i))) for i,c in enumerate(counter_nvecs)]
mcounter = [Moment(c,sympy.Symbol("y_{0}".format(i))) for i,c in enumerate(mcounter_nvecs)]
m = to_sympy_matrix([
['c_0 - c_1*y_0 - c_2*y_0*y_2/(c_6 + y_0)',
0,
0,
0,
'c_2*y_0/(c_6 + y_0)**2 - c_2/(c_6 + y_0)',
0,
'-c_2*y_0*y_2/(c_6 + y_0)**3 + c_2*y_2/(c_6 + y_0)**2'],
[
'c_3*y_0 - c_4*y_1',
0,
0,
0,
0,
0,
0],
[
'c_4*y_1 - c_5*y_2',
0,
0,
0,
0,
0,
0
]])
species = to_sympy_matrix(['y_0', 'y_1', 'y_2'])
propensities = to_sympy_matrix(['c_0',
'c_1 * y_0',
'c_2*y_0*y_2/(c_6 + y_0)',
'c_3*y_0',
'c_4*y_1',
'c_5*y_2'])
stoichiometry_matrix = to_sympy_matrix([[1, -1, -1, 0, 0, 0],
[0, 0, 0, 1, -1, 0],
[0, 0, 0, 0, 1, -1]])
answer = eq_central_moments(counter, mcounter, m, species, propensities, stoichiometry_matrix, 2)
expected = to_sympy_matrix([
[" 2*c_4*y_1*y_2 + c_4*y_1 - 2*c_5*y_2**2 + c_5*y_2 - 2*y_1*(c_4*y_1 - c_5*y_2)"," -2*c_5"," 2*c_4"," 0"," 0"," 0"," 0"],
["c_3*y_0*y_2 + c_4*y_1**2 - c_4*y_1*y_2 - c_4*y_1 - c_5*y_1*y_2 - y_1*(c_3*y_0 - c_4*y_1) - y_2*(c_4*y_1 - c_5*y_2)"," 0"," -c_4 - c_5"," c_4"," c_3"," 0"," 0"],
["2*c_3*y_0*y_1 + c_3*y_0 - 2*c_4*y_1**2 + c_4*y_1 - 2*y_2*(c_3*y_0 - c_4*y_1)"," 0"," 0"," -2*c_4"," 0"," 2*c_3","0"],
["c_0*y_2 - c_1*y_0*y_2 - c_2*y_0*y_2**2/(c_6 + y_0) + c_4*y_0*y_1 - c_5*y_0*y_2 - y_1*(c_0 - c_1*y_0 - c_2*y_0*y_2/(c_6 + y_0)) - y_3*(c_4*y_1 - c_5*y_2)"," -c_2*y_0/(c_6 + y_0)"," 0"," 0"," -c_1 + 2*c_2*y_0*y_2/(c_6 + y_0)**2 - 2*c_2*y_2/(c_6 + y_0) - c_5 - y_1*(c_2*y_0/(c_6 + y_0)**2 - c_2/(c_6 + y_0))","c_4"," -c_2*y_0*y_2**2/(c_6 + y_0)**3 + c_2*y_2**2/(c_6 + y_0)**2 - y_1*(-c_2*y_0*y_2/(c_6 + y_0)**3 + c_2*y_2/(c_6 + y_0)**2)"],
["c_0*y_1 - c_1*y_0*y_1 - c_2*y_0*y_1*y_2/(c_6 + y_0) + c_3*y_0**2 - c_4*y_0*y_1 - y_2*(c_0 - c_1*y_0 - c_2*y_0*y_2/(c_6 + y_0)) - y_3*(c_3*y_0 - c_4*y_1)"," 0"," -c_2*y_0/(c_6 + y_0)"," 0"," c_2*y_0*y_1/(c_6 + y_0)**2 - c_2*y_1/(c_6 + y_0) - y_2*(c_2*y_0/(c_6 + y_0)**2 - c_2/(c_6 + y_0))"," -c_1 + c_2*y_0*y_2/(c_6 + y_0)**2 - c_2*y_2/(c_6 + y_0) - c_4"," -c_2*y_0*y_1*y_2/(c_6 + y_0)**3 + c_2*y_1*y_2/(c_6 + y_0)**2 + c_3 - y_2*(-c_2*y_0*y_2/(c_6 + y_0)**3 + c_2*y_2/(c_6 + y_0)**2)"],
["2*c_0*y_0 + c_0 - 2*c_1*y_0**2 + c_1*y_0 - 2*c_2*y_0**2*y_2/(c_6 + y_0) + c_2*y_0*y_2/(c_6 + y_0) - 2*y_3*(c_0 - c_1*y_0 - c_2*y_0*y_2/(c_6 + y_0))"," 0"," 0"," 0"," 2*c_2*y_0**2/(c_6 + y_0)**2 - 4*c_2*y_0/(c_6 + y_0) - c_2*y_0/(c_6 + y_0)**2 + c_2/(c_6 + y_0) - 2*y_3*(c_2*y_0/(c_6 + y_0)**2 - c_2/(c_6 + y_0))"," 0"," -2*c_1 - 2*c_2*y_0**2*y_2/(c_6 + y_0)**3 + 4*c_2*y_0*y_2/(c_6 + y_0)**2 + c_2*y_0*y_2/(c_6 + y_0)**3 - 2*c_2*y_2/(c_6 + y_0) - c_2*y_2/(c_6 + y_0)**2 - 2*y_3*(-c_2*y_0*y_2/(c_6 + y_0)**3 + c_2*y_2/(c_6 + y_0)**2)"]
])
assert_sympy_expressions_equal(answer, expected)
def test_centralmoments_using_MM_model(self):
"""
Given the MM model hard codded bellow,the result of central moment should match exactly the expected one
:return:
"""
counter_nvecs = [[0, 0], [0, 2], [1, 1], [2, 0]]
mcounter_nvecs = [[0, 0], [0, 1], [1, 0], [0, 2], [1, 1], [2, 0]]
counter = [Moment(c,sympy.Symbol("YU{0}".format(i))) for i,c in enumerate(counter_nvecs)]
mcounter = [Moment(c,sympy.Symbol("y_{0}".format(i))) for i,c in enumerate(mcounter_nvecs)]
m = to_sympy_matrix([
['-c_0*y_0*(y_0 + y_1 - 181) + c_1*(-y_0 - y_1 + 301)',
0,
'-c_0',
'-c_0'],
[
'c_2*(-y_0 - y_1 + 301)',
0,
0,
0]
])
species = sympy.Matrix(map(sympy.var, ['y_0', 'y_1']))
propensities = to_sympy_matrix(['c_0*y_0*(y_0 + y_1 - 181)',
'c_1*(-y_0 - y_1 + 301)',
'c_2*(-y_0 - y_1 + 301)'])
stoichiometry_matrix = sympy.Matrix([[-1, 1, 0],
[0, 0, 1]])
expected = to_sympy_matrix([
["c_2*(-y_0 - y_1 + 301)"," -2*c_2"," -2*c_2"," 0"],
["-c_0*y_0*y_1*(y_0 + y_1 - 181) + c_1*y_1*(-y_0 - y_1 + 301) + c_2*y_0*(-y_0 - y_1 + 301) - c_2*y_2*(-y_0 - y_1 + 301) - y_1*(-c_0*y_0*(y_0 + y_1 - 181) + c_1*(-y_0 - y_1 + 301))"," -c_0*y_0 - c_1"," -c_0*y_0 - c_0*(y_0 + y_1 - 181) - c_1 - c_2"," -c_2"],
["-2*c_0*y_0**2*(y_0 + y_1 - 181) + c_0*y_0*(y_0 + y_1 - 181) + 2*c_1*y_0*(-y_0 - y_1 + 301) + c_1*(-y_0 - y_1 + 301) - 2*y_2*(-c_0*y_0*(y_0 + y_1 - 181) + c_1*(-y_0 - y_1 + 301))"," 0"," -4*c_0*y_0 + 2*c_0*y_2 + c_0 - 2*c_1"," -4*c_0*y_0 + 2*c_0*y_2 - 2*c_0*(y_0 + y_1 - 181) + c_0 - 2*c_1"]
])
answer = eq_central_moments(counter, mcounter, m, species, propensities, stoichiometry_matrix, 2)
assert_sympy_expressions_equal(answer, expected)
| 73.834783
| 657
| 0.346367
| 1,370
| 8,491
| 1.776642
| 0.052555
| 0.11175
| 0.073952
| 0.075596
| 0.786771
| 0.766228
| 0.711175
| 0.627362
| 0.581758
| 0.561216
| 0
| 0.170188
| 0.492757
| 8,491
| 115
| 658
| 73.834783
| 0.394938
| 0.026852
| 0
| 0.372093
| 0
| 0.197674
| 0.516035
| 0.015974
| 0
| 0
| 0
| 0
| 0.034884
| 1
| 0.023256
| false
| 0
| 0.05814
| 0
| 0.093023
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 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
| 4
|
e9585c2583ce3b3cc5f154b6607a5227fe5fb0fc
| 1,107
|
py
|
Python
|
sql_faker/sql_faker/values.py
|
lkmc2/python-sql-faker
|
a68ac9a011b75b23f20d961fa1da08597ebe9445
|
[
"MIT"
] | 12
|
2018-10-12T14:22:35.000Z
|
2021-05-04T08:39:12.000Z
|
sql_faker/sql_faker/values.py
|
lkmc2/python-sql-faker
|
a68ac9a011b75b23f20d961fa1da08597ebe9445
|
[
"MIT"
] | null | null | null |
sql_faker/sql_faker/values.py
|
lkmc2/python-sql-faker
|
a68ac9a011b75b23f20d961fa1da08597ebe9445
|
[
"MIT"
] | 2
|
2019-09-11T13:11:32.000Z
|
2020-12-17T03:43:14.000Z
|
# coding=utf-8
import random
import datetime
class Values:
"""取值范围设置器"""
@staticmethod
def of(*args):
"""在给定的参数中随机选一个作为返回值"""
class ValueCreator:
def create(self):
return random.choice(args)
return ValueCreator
@staticmethod
def of_int_range(start, end):
"""在[start, end]区间随机返回一个整数值"""
class ValueCreator:
def create(self):
return random.randint(start, end)
return ValueCreator
@staticmethod
def of_float_range(start, end, precision=2):
"""在[start, end]区间随机返回一个浮点数,最多精确到小数点后10位"""
class ValueCreator:
def create(self):
return round(random.uniform(start, end), precision)
return ValueCreator
@staticmethod
def of_time_range(start_time, end_time):
"""在[start, end]区间随机返回一个时间值"""
class ValueCreator:
def create(self):
timestamp = random.randint(start_time, end_time)
return datetime.datetime.fromtimestamp(timestamp)
return ValueCreator
| 23.0625
| 67
| 0.594399
| 109
| 1,107
| 5.944954
| 0.33945
| 0.08642
| 0.104938
| 0.160494
| 0.393519
| 0.185185
| 0.12963
| 0
| 0
| 0
| 0
| 0.005242
| 0.31075
| 1,107
| 47
| 68
| 23.553191
| 0.844037
| 0.114724
| 0
| 0.571429
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0
| 0.071429
| 0.107143
| 0.821429
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
e98a5035288fb82afdb18a6f9a1e87462d61d2f9
| 67
|
py
|
Python
|
src/py_dss_interface/utils/__init__.py
|
davilamds/py_dss_interface
|
a447c97787aeac962381db88dd622ccb235eef4b
|
[
"MIT"
] | 8
|
2020-08-15T12:56:03.000Z
|
2022-01-04T15:51:14.000Z
|
src/py_dss_interface/utils/__init__.py
|
rodolfoplondero/py_dss_interface
|
cb6771b34ed322a5df7ef1cc194611e794f26441
|
[
"MIT"
] | 24
|
2021-04-24T18:33:19.000Z
|
2021-11-13T14:59:54.000Z
|
src/py_dss_interface/utils/__init__.py
|
rodolfoplondero/py_dss_interface
|
cb6771b34ed322a5df7ef1cc194611e794f26441
|
[
"MIT"
] | 7
|
2020-08-15T12:56:04.000Z
|
2021-10-04T16:14:30.000Z
|
# -*- encoding: utf-8 -*-
"""
Created by eniocc at 11/10/2020
"""
| 13.4
| 32
| 0.552239
| 10
| 67
| 3.7
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 0.19403
| 67
| 4
| 33
| 16.75
| 0.518519
| 0.835821
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
e9996ea6aadbbd9cc68645b5015ca47f50bed7f6
| 706
|
py
|
Python
|
products/context_processors.py
|
MattiMatt8/ship-o-cereal
|
26d8dd045f2043fade7b6068e84e5a5be5748546
|
[
"MIT"
] | 1
|
2021-05-14T20:18:09.000Z
|
2021-05-14T20:18:09.000Z
|
products/context_processors.py
|
MattiMatt8/ship-o-cereal
|
26d8dd045f2043fade7b6068e84e5a5be5748546
|
[
"MIT"
] | null | null | null |
products/context_processors.py
|
MattiMatt8/ship-o-cereal
|
26d8dd045f2043fade7b6068e84e5a5be5748546
|
[
"MIT"
] | null | null | null |
from products.models import Category, Brand, Label
def menu_categories(request):
"""Context processor that provides access to product categories as a context variable."""
return {"categories": Category.objects.all()}
def product_brands(request):
"""Context processor that provides access to product brands as a context variable."""
return {"brands": Brand.objects.all()}
def product_labels(request):
"""Context processor that provides access to product labels as a context variable."""
return {"labels": Label.objects.all()}
def get_cart(request):
"""Context processor to be able to access the cart on every page."""
return {"cart": request.session.get("cart")}
| 27.153846
| 93
| 0.71813
| 92
| 706
| 5.467391
| 0.380435
| 0.111332
| 0.182903
| 0.161034
| 0.441352
| 0.298211
| 0.298211
| 0.298211
| 0
| 0
| 0
| 0
| 0.167139
| 706
| 25
| 94
| 28.24
| 0.855442
| 0.433428
| 0
| 0
| 0
| 0
| 0.079156
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.444444
| false
| 0
| 0.111111
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
e9a37ce3c170242aaebfe210c2f191f5cdbb61d1
| 157
|
py
|
Python
|
enforce_typing/exceptions.py
|
mr-strawberry66/python-type-enforcement
|
afb4cf66f1e46104d5952fa08db8756d1a802a8f
|
[
"MIT"
] | 1
|
2022-03-16T14:28:27.000Z
|
2022-03-16T14:28:27.000Z
|
enforce_typing/exceptions.py
|
mr-strawberry66/python-static-type-checking
|
afb4cf66f1e46104d5952fa08db8756d1a802a8f
|
[
"MIT"
] | 1
|
2022-03-16T14:27:00.000Z
|
2022-03-16T14:43:46.000Z
|
enforce_typing/exceptions.py
|
mr-strawberry66/python-static-type-checking
|
afb4cf66f1e46104d5952fa08db8756d1a802a8f
|
[
"MIT"
] | null | null | null |
"""Module to store EnforceTyping exceptions."""
class EnforcedTypingError(TypeError):
"""Class to raise errors relating to static typing decorator."""
| 26.166667
| 68
| 0.751592
| 17
| 157
| 6.941176
| 0.823529
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.140127
| 157
| 5
| 69
| 31.4
| 0.874074
| 0.636943
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
e9a90c14213c8ee5735bc67b74295e813d7b1aab
| 28
|
py
|
Python
|
Python/100Excersises/.history/51 to 75/74/74_20201119130143.py
|
magusikrak/NAMI-TERM-I-GroupWork
|
f0a9a5f219ccbec024eb5316361db3fca46e171c
|
[
"MIT"
] | null | null | null |
Python/100Excersises/.history/51 to 75/74/74_20201119130143.py
|
magusikrak/NAMI-TERM-I-GroupWork
|
f0a9a5f219ccbec024eb5316361db3fca46e171c
|
[
"MIT"
] | 1
|
2021-07-24T03:18:30.000Z
|
2021-07-24T12:45:07.000Z
|
Python/100Excersises/.history/51 to 75/74/74_20201119130143.py
|
magusikrak/NAMI-TERM-I-GroupWork
|
f0a9a5f219ccbec024eb5316361db3fca46e171c
|
[
"MIT"
] | null | null | null |
import pandas as p
d1=p.read
| 14
| 18
| 0.785714
| 7
| 28
| 3.142857
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.041667
| 0.142857
| 28
| 2
| 19
| 14
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
e9af0ee3927d1c6136a323a6ac33034a575cf8e6
| 18
|
py
|
Python
|
test_looper_tests/test_projects/sample_data_artifact/data1.py
|
ufora/test-looper
|
2a803c08dbf1c7d20966998a7744f65c30fc505a
|
[
"ECL-2.0",
"Apache-2.0"
] | 3
|
2018-02-03T22:05:44.000Z
|
2019-07-30T01:12:31.000Z
|
test_looper_tests/test_projects/sample_data_artifact/data1.py
|
ufora/test-looper
|
2a803c08dbf1c7d20966998a7744f65c30fc505a
|
[
"ECL-2.0",
"Apache-2.0"
] | 43
|
2018-01-30T19:46:38.000Z
|
2018-06-13T15:59:24.000Z
|
test_looper_tests/test_projects/sample_data_artifact/data1.py
|
ufora/test-looper
|
2a803c08dbf1c7d20966998a7744f65c30fc505a
|
[
"ECL-2.0",
"Apache-2.0"
] | 3
|
2017-10-07T14:29:42.000Z
|
2018-07-23T19:59:59.000Z
|
This is some data
| 9
| 17
| 0.777778
| 4
| 18
| 3.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.222222
| 18
| 1
| 18
| 18
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
e9ce187d916d32afbf05b156128f8c967adfc811
| 93
|
py
|
Python
|
pathfinder/charsheet/apps.py
|
Tenebrar/codebase
|
59c9a35289fb29afedad0e3edd0519b67372ef9f
|
[
"Unlicense"
] | 1
|
2020-04-21T11:39:25.000Z
|
2020-04-21T11:39:25.000Z
|
pathfinder/charsheet/apps.py
|
Tenebrar/codebase
|
59c9a35289fb29afedad0e3edd0519b67372ef9f
|
[
"Unlicense"
] | 7
|
2020-02-12T01:08:01.000Z
|
2022-02-10T11:56:56.000Z
|
pathfinder/charsheet/apps.py
|
Tenebrar/codebase
|
59c9a35289fb29afedad0e3edd0519b67372ef9f
|
[
"Unlicense"
] | null | null | null |
from django.apps import AppConfig
class CharsheetConfig(AppConfig):
name = 'charsheet'
| 15.5
| 33
| 0.763441
| 10
| 93
| 7.1
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.16129
| 93
| 5
| 34
| 18.6
| 0.910256
| 0
| 0
| 0
| 0
| 0
| 0.096774
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
756850171b8411b7cd4ef5db662751aac6c7b8c1
| 104
|
py
|
Python
|
django_directed/apps.py
|
jacklinke/django-directed
|
8ef8cd8a71e9a03a8628dce6465351f676f542ff
|
[
"Apache-2.0"
] | 2
|
2022-02-09T10:15:40.000Z
|
2022-02-22T14:11:03.000Z
|
django_directed/apps.py
|
jacklinke/django-directed
|
8ef8cd8a71e9a03a8628dce6465351f676f542ff
|
[
"Apache-2.0"
] | 1
|
2022-02-20T14:49:37.000Z
|
2022-02-20T14:49:37.000Z
|
django_directed/apps.py
|
jacklinke/django-directed
|
8ef8cd8a71e9a03a8628dce6465351f676f542ff
|
[
"Apache-2.0"
] | null | null | null |
from django.apps import AppConfig
class DjangoDirectedConfig(AppConfig):
name = "django_directed"
| 17.333333
| 38
| 0.788462
| 11
| 104
| 7.363636
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.144231
| 104
| 5
| 39
| 20.8
| 0.910112
| 0
| 0
| 0
| 0
| 0
| 0.144231
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
75854b761b1441bc1191064e7984f23cf7eecfdc
| 303
|
py
|
Python
|
lib/JumpScale/lib/aggregator/__init__.py
|
rudecs/jumpscale_core7
|
30c03f26f1cdad3edbb9d79d50fbada8acc974f5
|
[
"Apache-2.0"
] | null | null | null |
lib/JumpScale/lib/aggregator/__init__.py
|
rudecs/jumpscale_core7
|
30c03f26f1cdad3edbb9d79d50fbada8acc974f5
|
[
"Apache-2.0"
] | 4
|
2016-08-25T12:08:39.000Z
|
2018-04-12T12:36:01.000Z
|
lib/JumpScale/lib/aggregator/__init__.py
|
rudecs/jumpscale_core7
|
30c03f26f1cdad3edbb9d79d50fbada8acc974f5
|
[
"Apache-2.0"
] | 3
|
2016-03-08T07:49:34.000Z
|
2018-10-19T13:56:43.000Z
|
from JumpScale import j
def aggregator():
from .Aggregator import Aggregator
return Aggregator()
def realityprocess():
from .RealityProcess import RealityProcess
return RealityProcess()
j.tools._register('aggregator', aggregator)
j.tools._register('realityprocess', realityprocess)
| 21.642857
| 51
| 0.765677
| 30
| 303
| 7.666667
| 0.333333
| 0.052174
| 0.121739
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.148515
| 303
| 13
| 52
| 23.307692
| 0.891473
| 0
| 0
| 0
| 0
| 0
| 0.079208
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.222222
| true
| 0
| 0.333333
| 0
| 0.777778
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
75c830a65ab1833fb61649ac2ee6e84d3a32de27
| 2,285
|
py
|
Python
|
module_config.py
|
Relintai/broken_seals_2di
|
31a423be4e724e52715faf48e4a05e4271891c75
|
[
"MIT"
] | null | null | null |
module_config.py
|
Relintai/broken_seals_2di
|
31a423be4e724e52715faf48e4a05e4271891c75
|
[
"MIT"
] | null | null | null |
module_config.py
|
Relintai/broken_seals_2di
|
31a423be4e724e52715faf48e4a05e4271891c75
|
[
"MIT"
] | 1
|
2020-01-08T13:01:41.000Z
|
2020-01-08T13:01:41.000Z
|
engine_repository = [ ['https://github.com/Relintai/godot.git', 'git@github.com:Relintai/godot.git'], 'engine', '' ]
module_repositories = [
[ ['https://github.com/Relintai/entity_spell_system.git', 'git@github.com:Relintai/entity_spell_system.git'], 'entity_spell_system', '' ],
[ ['https://github.com/Relintai/ui_extensions.git', 'git@github.com:Relintai/ui_extensions.git'], 'ui_extensions', '' ],
[ ['https://github.com/Relintai/texture_packer.git', 'git@github.com:Relintai/texture_packer.git'], 'texture_packer', '' ],
[ ['https://github.com/Relintai/godot_fastnoise.git', 'git@github.com:Relintai/godot_fastnoise.git'], 'fastnoise', '' ],
[ ['https://github.com/Relintai/thread_pool.git', 'git@github.com:Relintai/thread_pool.git'], 'thread_pool', '' ],
[ ['https://github.com/Relintai/mesh_data_resource.git', 'git@github.com:Relintai/mesh_data_resource.git'], 'mesh_data_resource', '' ],
[ ['https://github.com/Relintai/mesh_utils.git', 'git@github.com:Relintai/mesh_utils.git'], 'mesh_utils', '' ],
[ ['https://github.com/Relintai/broken_seals_module.git', 'git@github.com:Relintai/broken_seals_module.git'], 'broken_seals_module', '' ],
[ ['https://github.com/Relintai/rtile_map.git', 'git@github.com:Relintai/rtile_map.git'], 'rtile_map', '' ],
]
removed_modules = [
[ ['https://github.com/Relintai/world_generator.git', 'git@github.com:Relintai/world_generator.git'], 'world_generator', '' ],
[ ['https://github.com/Relintai/terraman_2d.git', 'git@github.com:Relintai/terraman_2d.git'], 'terraman_2d', '' ],
[ ['https://github.com/Relintai/props.git', 'git@github.com:Relintai/props.git'], 'props', '' ],
]
addon_repositories = [
]
third_party_addon_repositories = [
]
godot_branch = '3.x'
slim_args = 'module_webm_enabled=no module_arkit_enabled=no module_visual_script_enabled=no module_gdnative_enabled=no module_mobile_vr_enabled=no module_theora_enabled=no module_xatlas_unwrap_enabled=no no_editor_splash=yes module_bullet_enabled=no module_camera_enabled=no module_csg_enabled=no module_denoise_enabled=no module_fbx_enabled=no module_gridmap_enabled=no module_hdr_enabled=no module_lightmapper_cpu_enabled=no module_raycast_enabled=no module_recast_enabled=no module_vhacd_enabled=no module_webxr_enabled=no'
| 73.709677
| 526
| 0.746608
| 312
| 2,285
| 5.166667
| 0.227564
| 0.145161
| 0.274194
| 0.177419
| 0.545285
| 0.469603
| 0.136476
| 0
| 0
| 0
| 0
| 0.001897
| 0.077024
| 2,285
| 30
| 527
| 76.166667
| 0.762447
| 0
| 0
| 0
| 0
| 0.043478
| 0.779869
| 0.438074
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 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
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
75e7fbe9ab95452b9f91ecb26fef90ec62f36165
| 216
|
py
|
Python
|
scieio/food_processing/apps.py
|
arnelimperial/scieio
|
279a25766f20d074a3df824c0fbc8b2d8e35f272
|
[
"MIT"
] | null | null | null |
scieio/food_processing/apps.py
|
arnelimperial/scieio
|
279a25766f20d074a3df824c0fbc8b2d8e35f272
|
[
"MIT"
] | 8
|
2021-03-19T01:56:44.000Z
|
2022-03-12T00:24:21.000Z
|
scieio/food_processing/apps.py
|
arnelimperial/scieio
|
279a25766f20d074a3df824c0fbc8b2d8e35f272
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class FoodProcessingConfig(AppConfig):
name = 'scieio.food_processing'
verbose_name = _("Food Processing Equipment")
| 27
| 54
| 0.791667
| 25
| 216
| 6.64
| 0.72
| 0.120482
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.138889
| 216
| 7
| 55
| 30.857143
| 0.892473
| 0
| 0
| 0
| 0
| 0
| 0.217593
| 0.101852
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.4
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
75fd46d9b9065d668ed327ee7d08f453ee0e87c0
| 81
|
py
|
Python
|
pdbox/tui/__init__.py
|
christopher-dG/pdbox
|
294e8fa4036243e550d9db37c8b34986c85af683
|
[
"MIT"
] | null | null | null |
pdbox/tui/__init__.py
|
christopher-dG/pdbox
|
294e8fa4036243e550d9db37c8b34986c85af683
|
[
"MIT"
] | null | null | null |
pdbox/tui/__init__.py
|
christopher-dG/pdbox
|
294e8fa4036243e550d9db37c8b34986c85af683
|
[
"MIT"
] | null | null | null |
from .tui import TUI
def run():
TUI()
print("Thanks for using pdbox!")
| 11.571429
| 36
| 0.604938
| 12
| 81
| 4.083333
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.259259
| 81
| 6
| 37
| 13.5
| 0.816667
| 0
| 0
| 0
| 0
| 0
| 0.283951
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| true
| 0
| 0.25
| 0
| 0.5
| 0.25
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
f948ee1898af0420d93474f5af61224b062a348e
| 164
|
py
|
Python
|
wardrobe/webapp/extensions.py
|
wardrobe-auth/wardrobe
|
fd2f95e50c1d035a2a60e0fdc68685ce45b6e653
|
[
"MIT"
] | null | null | null |
wardrobe/webapp/extensions.py
|
wardrobe-auth/wardrobe
|
fd2f95e50c1d035a2a60e0fdc68685ce45b6e653
|
[
"MIT"
] | null | null | null |
wardrobe/webapp/extensions.py
|
wardrobe-auth/wardrobe
|
fd2f95e50c1d035a2a60e0fdc68685ce45b6e653
|
[
"MIT"
] | null | null | null |
from flask_assets import Environment
from flask_cors import CORS
from flask_marshmallow import Marshmallow
assets = Environment()
cors = CORS()
ma = Marshmallow()
| 20.5
| 41
| 0.810976
| 21
| 164
| 6.190476
| 0.380952
| 0.207692
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.134146
| 164
| 7
| 42
| 23.428571
| 0.915493
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
f94cdab657f8dee0f3b0fadca29123f4bb7f405a
| 90
|
py
|
Python
|
src/duo_auth/apps.py
|
Elemnir/djano-duo-auth
|
ff8180714e71dc9e3b8348a9d64303e504157817
|
[
"BSD-3-Clause"
] | 8
|
2019-11-20T22:40:39.000Z
|
2021-09-09T20:20:38.000Z
|
src/duo_auth/apps.py
|
Elemnir/djano-duo-auth
|
ff8180714e71dc9e3b8348a9d64303e504157817
|
[
"BSD-3-Clause"
] | 5
|
2020-04-27T09:29:01.000Z
|
2022-03-14T03:55:05.000Z
|
src/duo_auth/apps.py
|
Elemnir/djano-duo-auth
|
ff8180714e71dc9e3b8348a9d64303e504157817
|
[
"BSD-3-Clause"
] | 4
|
2021-03-01T14:18:49.000Z
|
2021-12-25T03:11:50.000Z
|
from django.apps import AppConfig
class DuoAuthConfig(AppConfig):
name = 'duo_auth'
| 15
| 33
| 0.755556
| 11
| 90
| 6.090909
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 90
| 5
| 34
| 18
| 0.893333
| 0
| 0
| 0
| 0
| 0
| 0.088889
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
f976844c91c5069b72279dd77b9b1d522a8a1b02
| 322
|
py
|
Python
|
test/random/test_gaussian.py
|
ctgk/bayes
|
96eab9305eaeecc5a5b032cdf92a8285de4f60bf
|
[
"MIT"
] | 21
|
2019-01-08T05:58:41.000Z
|
2021-11-26T14:24:11.000Z
|
test/random/test_gaussian.py
|
ctgk/bayes
|
96eab9305eaeecc5a5b032cdf92a8285de4f60bf
|
[
"MIT"
] | null | null | null |
test/random/test_gaussian.py
|
ctgk/bayes
|
96eab9305eaeecc5a5b032cdf92a8285de4f60bf
|
[
"MIT"
] | 11
|
2019-05-04T13:44:19.000Z
|
2021-08-05T04:26:19.000Z
|
import unittest
import numpy as np
import bayesnet as bn
class TestGaussian(unittest.TestCase):
def test_gaussian(self):
self.assertRaises(ValueError, bn.random.Gaussian, 0, -1)
self.assertRaises(ValueError, bn.random.Gaussian, 0, np.array([1, -1]))
if __name__ == '__main__':
unittest.main()
| 21.466667
| 79
| 0.701863
| 42
| 322
| 5.166667
| 0.547619
| 0.147465
| 0.239631
| 0.258065
| 0.396313
| 0.396313
| 0.396313
| 0
| 0
| 0
| 0
| 0.018868
| 0.177019
| 322
| 14
| 80
| 23
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0.024845
| 0
| 0
| 0
| 0
| 0
| 0.222222
| 1
| 0.111111
| false
| 0
| 0.333333
| 0
| 0.555556
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
f986463b555320c0d2c7d89d169c4be5993d612f
| 53
|
py
|
Python
|
kospeech/checkpoint/__init__.py
|
21jun/KoSpeech
|
8aeb67fa6e10caf997d5a4f971739fa79405fc7f
|
[
"Apache-2.0"
] | 2
|
2021-01-18T06:22:48.000Z
|
2021-04-01T07:18:51.000Z
|
kospeech/checkpoint/__init__.py
|
21jun/KoSpeech
|
8aeb67fa6e10caf997d5a4f971739fa79405fc7f
|
[
"Apache-2.0"
] | null | null | null |
kospeech/checkpoint/__init__.py
|
21jun/KoSpeech
|
8aeb67fa6e10caf997d5a4f971739fa79405fc7f
|
[
"Apache-2.0"
] | 1
|
2021-12-31T08:51:59.000Z
|
2021-12-31T08:51:59.000Z
|
from kospeech.checkpoint.checkpoint import Checkpoint
| 53
| 53
| 0.90566
| 6
| 53
| 8
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.056604
| 53
| 1
| 53
| 53
| 0.96
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
f9cd4d78ebad0a52142cf6e4ef5d995d8cbf80f5
| 89
|
py
|
Python
|
finitewave/cpuwave3D/fibers/__init__.py
|
ArsOkenov/Finitewave
|
14274d74be824a395b47a5c53ba18188798ab70d
|
[
"MIT"
] | null | null | null |
finitewave/cpuwave3D/fibers/__init__.py
|
ArsOkenov/Finitewave
|
14274d74be824a395b47a5c53ba18188798ab70d
|
[
"MIT"
] | null | null | null |
finitewave/cpuwave3D/fibers/__init__.py
|
ArsOkenov/Finitewave
|
14274d74be824a395b47a5c53ba18188798ab70d
|
[
"MIT"
] | null | null | null |
from finitewave.cpuwave3D.fibers.rotational_anisotropy \
import RotationalAnisotropy
| 29.666667
| 56
| 0.853933
| 8
| 89
| 9.375
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.0125
| 0.101124
| 89
| 2
| 57
| 44.5
| 0.925
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
f9df91865e780bb3d38db50fdfbce3be99a6bd8e
| 85
|
py
|
Python
|
cms/apps.py
|
Manny27nyc/pythondotorg
|
257c96d3a94755451a5a5cdcd2abad1e27ea299b
|
[
"Apache-2.0"
] | 911
|
2015-01-03T22:16:06.000Z
|
2022-03-31T23:56:22.000Z
|
cms/apps.py
|
Manny27nyc/pythondotorg
|
257c96d3a94755451a5a5cdcd2abad1e27ea299b
|
[
"Apache-2.0"
] | 1,342
|
2015-01-02T16:14:45.000Z
|
2022-03-28T08:01:20.000Z
|
cms/apps.py
|
Manny27nyc/pythondotorg
|
257c96d3a94755451a5a5cdcd2abad1e27ea299b
|
[
"Apache-2.0"
] | 551
|
2015-01-04T02:17:31.000Z
|
2022-03-23T11:59:25.000Z
|
from django.apps import AppConfig
class CmsAppConfig(AppConfig):
name = 'cms'
| 12.142857
| 33
| 0.729412
| 10
| 85
| 6.2
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.188235
| 85
| 6
| 34
| 14.166667
| 0.898551
| 0
| 0
| 0
| 0
| 0
| 0.035294
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
fb0c7d4aae6b7f726a4fce4c8595925d8b240a1b
| 201
|
py
|
Python
|
tron/serialize/runstate/__init__.py
|
antworldpkc2021/Pkc
|
c58d1a24b978c3f50ad05313d7a735cd8fec5082
|
[
"Apache-2.0"
] | null | null | null |
tron/serialize/runstate/__init__.py
|
antworldpkc2021/Pkc
|
c58d1a24b978c3f50ad05313d7a735cd8fec5082
|
[
"Apache-2.0"
] | 14
|
2021-05-14T22:49:22.000Z
|
2022-03-29T22:14:44.000Z
|
tron/serialize/runstate/__init__.py
|
antworldpkc2021/Pkc
|
c58d1a24b978c3f50ad05313d7a735cd8fec5082
|
[
"Apache-2.0"
] | null | null | null |
# State types
from __future__ import absolute_import
from __future__ import unicode_literals
JOB_STATE = 'job_state'
JOB_RUN_STATE = 'job_run_state'
MCP_STATE = 'mcp_state'
MESOS_STATE = 'mesos_state'
| 25.125
| 39
| 0.820896
| 30
| 201
| 4.833333
| 0.4
| 0.165517
| 0.22069
| 0.22069
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.114428
| 201
| 7
| 40
| 28.714286
| 0.814607
| 0.054726
| 0
| 0
| 0
| 0
| 0.223404
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
fb319f34045953f3608907fe2cb86d2108b1e187
| 29
|
py
|
Python
|
modules/2.79/bpy/types/ParticleEdit.py
|
cmbasnett/fake-bpy-module
|
acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55
|
[
"MIT"
] | null | null | null |
modules/2.79/bpy/types/ParticleEdit.py
|
cmbasnett/fake-bpy-module
|
acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55
|
[
"MIT"
] | null | null | null |
modules/2.79/bpy/types/ParticleEdit.py
|
cmbasnett/fake-bpy-module
|
acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55
|
[
"MIT"
] | null | null | null |
ParticleEdit.object = None
| 7.25
| 26
| 0.758621
| 3
| 29
| 7.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.172414
| 29
| 3
| 27
| 9.666667
| 0.916667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
fb3a071606056946f4252f1a80068df54e11bf73
| 85
|
py
|
Python
|
conftest.py
|
scottdalgliesh/labelit
|
e2b56d5fef0a935873a2755a927d92a4b3b89c81
|
[
"MIT"
] | null | null | null |
conftest.py
|
scottdalgliesh/labelit
|
e2b56d5fef0a935873a2755a927d92a4b3b89c81
|
[
"MIT"
] | null | null | null |
conftest.py
|
scottdalgliesh/labelit
|
e2b56d5fef0a935873a2755a927d92a4b3b89c81
|
[
"MIT"
] | null | null | null |
# intentionally empty file
# file provides context for package import into test files
| 42.5
| 58
| 0.823529
| 12
| 85
| 5.833333
| 0.916667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.152941
| 85
| 2
| 58
| 42.5
| 0.972222
| 0.952941
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
3498b40ae7cc81cad35836f89be1138c07b23705
| 65
|
py
|
Python
|
tests/syntax_highlighting.py
|
Suffyx/SuffyxIDE
|
0ff5ff50d327bcfc0853c21160a54c6c6715fe0e
|
[
"Apache-2.0"
] | null | null | null |
tests/syntax_highlighting.py
|
Suffyx/SuffyxIDE
|
0ff5ff50d327bcfc0853c21160a54c6c6715fe0e
|
[
"Apache-2.0"
] | null | null | null |
tests/syntax_highlighting.py
|
Suffyx/SuffyxIDE
|
0ff5ff50d327bcfc0853c21160a54c6c6715fe0e
|
[
"Apache-2.0"
] | null | null | null |
i = 0
v = "test"
c = 0.1
print("{0} {1} {2}".format(i, c, v))
| 8.125
| 36
| 0.415385
| 15
| 65
| 1.8
| 0.6
| 0.148148
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.125
| 0.261538
| 65
| 7
| 37
| 9.285714
| 0.4375
| 0
| 0
| 0
| 0
| 0
| 0.230769
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.25
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
34b7bf0f3e67a2f6711fa69144602606728814b6
| 212
|
py
|
Python
|
gpytranslate/types/__init__.py
|
simbadmorehod/gpytranslate
|
795d09673a1c9086a2ed02c7f53dd8da9d0df269
|
[
"MIT"
] | 34
|
2020-08-26T13:15:30.000Z
|
2022-03-24T13:49:36.000Z
|
gpytranslate/types/__init__.py
|
simbadmorehod/gpytranslate
|
795d09673a1c9086a2ed02c7f53dd8da9d0df269
|
[
"MIT"
] | 8
|
2020-09-12T20:25:21.000Z
|
2022-03-01T23:11:45.000Z
|
gpytranslate/types/__init__.py
|
simbadmorehod/gpytranslate
|
795d09673a1c9086a2ed02c7f53dd8da9d0df269
|
[
"MIT"
] | 5
|
2021-03-07T02:58:18.000Z
|
2021-12-20T12:59:11.000Z
|
from .translated_object import TranslatedObject
from .base_translator import BaseTranslator
BASE_HEADERS: dict = {
"User-Agent": "GoogleTranslate/6.6.1.RC09.302039986 (Linux; U; Android 9; Redmi Note 8)",
}
| 30.285714
| 93
| 0.764151
| 28
| 212
| 5.678571
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.086486
| 0.127358
| 212
| 6
| 94
| 35.333333
| 0.772973
| 0
| 0
| 0
| 0
| 0.2
| 0.386792
| 0.169811
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.4
| 0
| 0.4
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
34c197bded55f7385d23fdd73241ed0ca331e12d
| 23
|
py
|
Python
|
TEP-IFPI-2017_8-master/restaurapp-api-master/core/backends.py
|
danieldsf/ads-activities
|
3da8168f685dfdbe146e20023fbdaefd46c21b54
|
[
"Apache-2.0"
] | 1
|
2021-08-19T12:13:21.000Z
|
2021-08-19T12:13:21.000Z
|
TEP-IFPI-2017_8-master/restaurapp-api-master/core/backends.py
|
danieldsf/ads-activities
|
3da8168f685dfdbe146e20023fbdaefd46c21b54
|
[
"Apache-2.0"
] | null | null | null |
TEP-IFPI-2017_8-master/restaurapp-api-master/core/backends.py
|
danieldsf/ads-activities
|
3da8168f685dfdbe146e20023fbdaefd46c21b54
|
[
"Apache-2.0"
] | null | null | null |
# Generics in Here:
| 7.666667
| 20
| 0.608696
| 3
| 23
| 4.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.304348
| 23
| 2
| 21
| 11.5
| 0.875
| 0.73913
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
34c3d9dbfa96dc7cb3731b5e853eafe53bd3456c
| 113
|
py
|
Python
|
mlx/__main__.py
|
melexis/xunit2rst
|
80f70ba0a5f1a33fd98918be4477de323ebcc10b
|
[
"Apache-2.0"
] | 2
|
2019-12-03T13:01:24.000Z
|
2020-07-01T19:26:01.000Z
|
mlx/__main__.py
|
melexis/xunit2rst
|
80f70ba0a5f1a33fd98918be4477de323ebcc10b
|
[
"Apache-2.0"
] | 15
|
2019-12-12T16:19:43.000Z
|
2021-11-29T14:27:43.000Z
|
mlx/__main__.py
|
melexis/xunit2rst
|
80f70ba0a5f1a33fd98918be4477de323ebcc10b
|
[
"Apache-2.0"
] | null | null | null |
""" Entry point of swcc.xunit2rst package """
from .xunit2rst import main
if __name__ == '__main__':
main()
| 18.833333
| 45
| 0.681416
| 14
| 113
| 4.928571
| 0.785714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.021739
| 0.185841
| 113
| 5
| 46
| 22.6
| 0.728261
| 0.327434
| 0
| 0
| 0
| 0
| 0.117647
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
34db9673d0279003ac4fd236584bee8ddb9edb1b
| 34
|
py
|
Python
|
letsencrypt-nginx/letsencrypt_nginx/__init__.py
|
impressiver/letsencrypt
|
f2a83e9e942e9f5776a2e9f8c76d7a21bbbf27aa
|
[
"Apache-2.0"
] | 6
|
2015-09-13T21:58:27.000Z
|
2019-11-15T07:07:36.000Z
|
letsencrypt-nginx/letsencrypt_nginx/__init__.py
|
ingochris/letsencrypt
|
f2a83e9e942e9f5776a2e9f8c76d7a21bbbf27aa
|
[
"Apache-2.0"
] | null | null | null |
letsencrypt-nginx/letsencrypt_nginx/__init__.py
|
ingochris/letsencrypt
|
f2a83e9e942e9f5776a2e9f8c76d7a21bbbf27aa
|
[
"Apache-2.0"
] | 7
|
2017-08-10T21:33:51.000Z
|
2021-06-03T15:53:50.000Z
|
"""Let's Encrypt nginx plugin."""
| 17
| 33
| 0.647059
| 5
| 34
| 4.4
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.117647
| 34
| 1
| 34
| 34
| 0.733333
| 0.794118
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
34feef9b167af995083624813d01a8cd4131a8f5
| 141
|
py
|
Python
|
class.py
|
DiscoverForever/HelloPython
|
0cab5a8ac3bf74e3812c76815c18adcbf024836d
|
[
"MIT"
] | null | null | null |
class.py
|
DiscoverForever/HelloPython
|
0cab5a8ac3bf74e3812c76815c18adcbf024836d
|
[
"MIT"
] | null | null | null |
class.py
|
DiscoverForever/HelloPython
|
0cab5a8ac3bf74e3812c76815c18adcbf024836d
|
[
"MIT"
] | null | null | null |
#!/usr/bin/python
# coding=utf-8
"""
@author: tangyueyang
@file: class.py
@time: 2017/7/17 下午5:23
"""
from time import time
print time()
| 11.75
| 23
| 0.659574
| 23
| 141
| 4.043478
| 0.869565
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.092437
| 0.156028
| 141
| 12
| 24
| 11.75
| 0.689076
| 0.219858
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.5
| null | null | 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 1
|
0
| 4
|
5501193df22deabd0796b6151f20cea81d530954
| 332
|
py
|
Python
|
backend/comedianModel/api/v1/serializers.py
|
crowdbotics-apps/comedianapp-28670
|
64dd299cb947d79ff74394f8d8ccb00f5b5589a0
|
[
"FTL",
"AML",
"RSA-MD"
] | null | null | null |
backend/comedianModel/api/v1/serializers.py
|
crowdbotics-apps/comedianapp-28670
|
64dd299cb947d79ff74394f8d8ccb00f5b5589a0
|
[
"FTL",
"AML",
"RSA-MD"
] | null | null | null |
backend/comedianModel/api/v1/serializers.py
|
crowdbotics-apps/comedianapp-28670
|
64dd299cb947d79ff74394f8d8ccb00f5b5589a0
|
[
"FTL",
"AML",
"RSA-MD"
] | null | null | null |
from rest_framework import serializers
from comedianModel.models import Comedian, Jokes
class ComedianSerializer(serializers.ModelSerializer):
class Meta:
model = Comedian
fields = "__all__"
class JokesSerializer(serializers.ModelSerializer):
class Meta:
model = Jokes
fields = "__all__"
| 22.133333
| 54
| 0.71988
| 31
| 332
| 7.419355
| 0.548387
| 0.226087
| 0.269565
| 0.304348
| 0.347826
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.21988
| 332
| 14
| 55
| 23.714286
| 0.888031
| 0
| 0
| 0.4
| 0
| 0
| 0.042169
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.2
| 0
| 0.6
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
9b3e08d778293625c0f575e021641370fb2dfd8a
| 269
|
py
|
Python
|
custom_textblob/textblob_fr/__init__.py
|
ouassimBenMosbah/python_nlp
|
732500722e046480a5f0d127b17389b6bc28fcc7
|
[
"MIT"
] | null | null | null |
custom_textblob/textblob_fr/__init__.py
|
ouassimBenMosbah/python_nlp
|
732500722e046480a5f0d127b17389b6bc28fcc7
|
[
"MIT"
] | null | null | null |
custom_textblob/textblob_fr/__init__.py
|
ouassimBenMosbah/python_nlp
|
732500722e046480a5f0d127b17389b6bc28fcc7
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from custom_textblob.textblob_fr.taggers import PatternTagger
from custom_textblob.textblob_fr.sentiments import PatternAnalyzer
__version__ = '0.1.0'
__author__ = 'Ouassim et bouboul'
__license__ = "MIT"
| 29.888889
| 66
| 0.802974
| 34
| 269
| 5.735294
| 0.676471
| 0.102564
| 0.184615
| 0.266667
| 0.287179
| 0
| 0
| 0
| 0
| 0
| 0
| 0.016667
| 0.107807
| 269
| 8
| 67
| 33.625
| 0.795833
| 0.078067
| 0
| 0
| 0
| 0
| 0.105691
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
9b5bc7f23245b6d5bad85e6f898e6726d76f5b00
| 287
|
py
|
Python
|
pystiche/enc/preprocessing.py
|
jbueltemeier/pystiche
|
0d0707121e63c4355303446e62a4894e86a7b763
|
[
"BSD-3-Clause"
] | null | null | null |
pystiche/enc/preprocessing.py
|
jbueltemeier/pystiche
|
0d0707121e63c4355303446e62a4894e86a7b763
|
[
"BSD-3-Clause"
] | null | null | null |
pystiche/enc/preprocessing.py
|
jbueltemeier/pystiche
|
0d0707121e63c4355303446e62a4894e86a7b763
|
[
"BSD-3-Clause"
] | null | null | null |
from torch import nn
from pystiche.image import CaffePreprocessing, TorchPreprocessing
PREPROCESSORS = {"torch": TorchPreprocessing, "caffe": CaffePreprocessing}
__all__ = ["get_preprocessor"]
def get_preprocessor(framework: str) -> nn.Module:
return PREPROCESSORS[framework]()
| 23.916667
| 74
| 0.783972
| 28
| 287
| 7.821429
| 0.642857
| 0.136986
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.118467
| 287
| 11
| 75
| 26.090909
| 0.865613
| 0
| 0
| 0
| 0
| 0
| 0.090592
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0.333333
| 0.166667
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 4
|
9b67242cf2dcd1e0a60024ff272ac71efb1f54bb
| 32
|
py
|
Python
|
UNET_NIH_DATASET/UNET_QUANT_NIH_TERNARY/config.py
|
hossein1387/U-Net-Fixed-Point-Quantization-for-Medical-Image-Segmentation
|
f919935b975461052d5196372a837356379f973a
|
[
"MIT"
] | 69
|
2019-07-28T06:53:55.000Z
|
2022-03-22T01:07:28.000Z
|
UNET_NIH_DATASET/UNET_QUANT_NIH_a8_8_w8_8/config.py
|
hossein1387/Fixed-Point-U-Net-Quantization-for-Medical-Image-Segmentation
|
4835a3d08b38617b952023f19bf59679126f5f59
|
[
"MIT"
] | 6
|
2019-08-02T07:47:09.000Z
|
2021-06-11T14:35:53.000Z
|
UNET_NIH_DATASET/UNET_QUANT_NIH_a8_8_w8_8/config.py
|
hossein1387/Fixed-Point-U-Net-Quantization-for-Medical-Image-Segmentation
|
4835a3d08b38617b952023f19bf59679126f5f59
|
[
"MIT"
] | 20
|
2019-08-10T07:08:56.000Z
|
2021-10-09T17:02:30.000Z
|
../UNET_QUANT_NIH_BASE/config.py
| 32
| 32
| 0.84375
| 6
| 32
| 4
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 32
| 1
| 32
| 32
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
9b75cace7e4e09fe0b372f77ff11044b058198e1
| 95
|
py
|
Python
|
DBExplorer/apps.py
|
PitKoro/4-course-budget-manager
|
5f16e1e566c6a44c30f9f791819a63821c7303aa
|
[
"MIT"
] | 1
|
2020-09-18T13:23:21.000Z
|
2020-09-18T13:23:21.000Z
|
DBExplorer/apps.py
|
PitKoro/4-course-budget-manager
|
5f16e1e566c6a44c30f9f791819a63821c7303aa
|
[
"MIT"
] | 13
|
2020-09-18T13:08:30.000Z
|
2020-11-06T07:54:53.000Z
|
DBExplorer/apps.py
|
PitKoro/4-course-budget-manager
|
5f16e1e566c6a44c30f9f791819a63821c7303aa
|
[
"MIT"
] | 2
|
2020-11-17T12:12:29.000Z
|
2021-01-23T15:08:52.000Z
|
from django.apps import AppConfig
class DbexplorerConfig(AppConfig):
name = 'DBExplorer'
| 15.833333
| 34
| 0.768421
| 10
| 95
| 7.3
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.157895
| 95
| 5
| 35
| 19
| 0.9125
| 0
| 0
| 0
| 0
| 0
| 0.105263
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
9b8b8881b346b3092d1958cd010564fefaf4e2d5
| 82
|
py
|
Python
|
src/spaceone/inventory/connector/aws_efs_connector/__init__.py
|
jean1042/plugin-aws-cloud-services
|
1cf192557b03478af33ae81f40b2a49f735716bb
|
[
"Apache-2.0"
] | 4
|
2020-06-22T01:48:07.000Z
|
2020-08-24T00:51:09.000Z
|
src/spaceone/inventory/connector/aws_efs_connector/__init__.py
|
jean1042/plugin-aws-cloud-services
|
1cf192557b03478af33ae81f40b2a49f735716bb
|
[
"Apache-2.0"
] | 2
|
2020-07-20T01:58:32.000Z
|
2020-08-04T07:41:37.000Z
|
src/spaceone/inventory/connector/aws_efs_connector/__init__.py
|
jean1042/plugin-aws-cloud-services
|
1cf192557b03478af33ae81f40b2a49f735716bb
|
[
"Apache-2.0"
] | 6
|
2020-06-22T09:19:40.000Z
|
2020-09-17T06:35:37.000Z
|
from spaceone.inventory.connector.aws_efs_connector.connector import EFSConnector
| 41
| 81
| 0.902439
| 10
| 82
| 7.2
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.04878
| 82
| 1
| 82
| 82
| 0.923077
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.