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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
94029d149267ac0df5288deafb1110dc4ed48e81
| 13,919
|
py
|
Python
|
finicityapi/controllers/verify_income_and_employment_controller.py
|
monarchmoney/finicity-python
|
b2ab1ded435db75c78d42261f5e4acd2a3061487
|
[
"MIT"
] | null | null | null |
finicityapi/controllers/verify_income_and_employment_controller.py
|
monarchmoney/finicity-python
|
b2ab1ded435db75c78d42261f5e4acd2a3061487
|
[
"MIT"
] | null | null | null |
finicityapi/controllers/verify_income_and_employment_controller.py
|
monarchmoney/finicity-python
|
b2ab1ded435db75c78d42261f5e4acd2a3061487
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
from finicityapi.api_helper import APIHelper
from finicityapi.configuration import Configuration
from finicityapi.controllers.base_controller import BaseController
from finicityapi.http.auth.custom_header_auth import CustomHeaderAuth
from finicityapi.models.generate_pay_statement_report_response import GeneratePayStatementReportResponse
from finicityapi.models.generate_voie_paystub_with_txverify_report_response import GenerateVOIEPaystubWithTxverifyReportResponse
from finicityapi.models.refresh_voie_payroll_report_response import RefreshVOIEPayrollReportResponse
from finicityapi.exceptions.error_1_error_exception import Error1ErrorException
class VerifyIncomeAndEmploymentController(BaseController):
"""A Controller to access Endpoints in the finicityapi API."""
def generate_pay_statement_report(self,
customer_id,
accept,
content_type,
body,
callback_url=None):
"""Does a POST request to /decisioning/v2/customers/{customerId}/payStatement.
Generate Pay Statement Extraction Report for the given customer. This
service accepts asset IDs of the stored pay statements to generate a
Pay Statement Extraction Report.
This is a premium service. The billing rate is the variable rate for
Pay Statement Extraction Report under the current subscription plan.
The billable event is the successful generation of a Pay Statement
Extraction Report.
The service returns immediately with status HTTP 202 (Accepted) if
successful. When finished, a notification will be sent to the
specified report callback URL, if specified.
After making this call, the client app may wait for a notification to
be sent to the Report Listener Service, or it may enter a loop, which
should wait 20 seconds and then call the service Get Report to see if
the report is finished. While the report is being generated, Get
Report will return a minimal report including status inProgress. The
loop should repeat every 20 seconds until Get Report returns a
different status.
The service will return HTTP 400 (Bad Request) if the asset ID does
not exist within Finicity?s system.
Args:
customer_id (long|int): Finicity ID of the customer
accept (string): Replace 'json' with 'xml' if preferred
content_type (string): Replace 'json' with 'xml' if preferred
body (PayStatementConstraints): TODO: type description here.
Example:
callback_url (string, optional): The Report Listener URL to
receive notifications (optional, must be URL-encoded).
Returns:
GeneratePayStatementReportResponse: Response from the API.
Accepted
Raises:
APIException: When an error occurs while fetching the data from
the remote API. This exception includes the HTTP Response
code, an error message, and the HTTP body that was received in
the request.
"""
# Validate required parameters
self.validate_parameters(customer_id=customer_id,
accept=accept,
content_type=content_type,
body=body)
# Prepare query URL
_url_path = '/decisioning/v2/customers/{customerId}/payStatement'
_url_path = APIHelper.append_url_with_template_parameters(_url_path, {
'customerId': customer_id
})
_query_builder = Configuration.get_base_uri()
_query_builder += _url_path
_query_parameters = {
'callbackUrl': callback_url
}
_query_builder = APIHelper.append_url_with_query_parameters(_query_builder,
_query_parameters, Configuration.array_serialization)
_query_url = APIHelper.clean_url(_query_builder)
# Prepare headers
_headers = {
'Finicity-App-Key': Configuration.finicity_app_key,
'Accept': accept,
'Content-Type': content_type
}
# Prepare and execute request
_request = self.http_client.post(_query_url, headers=_headers, parameters=APIHelper.json_serialize(body))
CustomHeaderAuth.apply(_request)
_context = self.execute_request(_request)
# Endpoint and global error handling using HTTP status codes.
if _context.response.status_code == 400:
raise Error1ErrorException('Bad Request', _context)
self.validate_response(_context)
# Return appropriate type
return APIHelper.json_deserialize(_context.response.raw_body, GeneratePayStatementReportResponse.from_dictionary)
def generate_voie_paystub_with_txverify_report(self,
customer_id,
accept,
content_type,
body,
callback_url=None):
"""Does a POST request to /decisioning/v2/customers/{customerId}/voieTxVerify/withInterview.
Generate a VOIE - Paystub (with TXVerify) with Interview report for
all checking and savings under the given customer. This service
retrieves up to two years of transaction history for the given
accounts. It then uses this information as well as the provided
paystubs to generate the VOIE TXVerify report.
This is a premium service. The billing rate is the variable rate for
VOIE TXVerify under the current subscription plan. The billable event
is the successful generation of a VOIE TXVerify Report.
The service returns immediately with status HTTP 202 (Accepted). When
finished, a notification will be sent to the specified report callback
URL, if specified.
After making this call, the client app may wait for a notification to
be sent to the Report Listener Service, or it may enter a loop, which
should wait 20 seconds and then call the service Get Report to see if
the report is finished. While the report is being generated, Get
Report will return a minimal report including status inProgress. The
loop should repeat every 20 seconds until Get Report returns a
different status.
When the call cannot be processed due to invalid input, the service
will return HTTP 400 (Bad Request).
Args:
customer_id (long|int): Finicity ID for the customer
accept (string): application/json or application/xml
content_type (string): application/json or application/xml
body (VOIETxverifyConstraints): TODO: type description here.
Example:
callback_url (string, optional): The Report Listener URL to
receive notifications (optional, must be URL-encoded).
Returns:
GenerateVOIEPaystubWithTxverifyReportResponse: Response from the
API. Accepted
Raises:
APIException: When an error occurs while fetching the data from
the remote API. This exception includes the HTTP Response
code, an error message, and the HTTP body that was received in
the request.
"""
# Validate required parameters
self.validate_parameters(customer_id=customer_id,
accept=accept,
content_type=content_type,
body=body)
# Prepare query URL
_url_path = '/decisioning/v2/customers/{customerId}/voieTxVerify/withInterview'
_url_path = APIHelper.append_url_with_template_parameters(_url_path, {
'customerId': customer_id
})
_query_builder = Configuration.get_base_uri()
_query_builder += _url_path
_query_parameters = {
'callbackUrl': callback_url
}
_query_builder = APIHelper.append_url_with_query_parameters(_query_builder,
_query_parameters, Configuration.array_serialization)
_query_url = APIHelper.clean_url(_query_builder)
# Prepare headers
_headers = {
'Finicity-App-Key': Configuration.finicity_app_key,
'Accept': accept,
'Content-Type': content_type
}
# Prepare and execute request
_request = self.http_client.post(_query_url, headers=_headers, parameters=APIHelper.json_serialize(body))
CustomHeaderAuth.apply(_request)
_context = self.execute_request(_request)
# Endpoint and global error handling using HTTP status codes.
if _context.response.status_code == 400:
raise Error1ErrorException('Bad Request', _context)
self.validate_response(_context)
# Return appropriate type
return APIHelper.json_deserialize(_context.response.raw_body, GenerateVOIEPaystubWithTxverifyReportResponse.from_dictionary)
def refresh_voie_payroll_report(self,
customer_id,
accept,
content_type,
body,
callback_url=None):
"""Does a POST request to /decisioning/v2/customers/{customerId}/voiePayrollProvider.
The VOIE – Payroll report generates when the customer completes
Connect. Lenders, who commonly use this report for pre-close
verification employment check, can refresh this report by passing the
consumer’s SSN, DOB, and the `reportId` from the first VOIE – Payroll
report they received.
We’ll refresh this report and update any new pay histories since the
first report generated, including borrower’s employment status as
active or not.
Note: Lenders can only refresh this report one time in a 60-day period
starting from the date of the first report. Any further report
refreshes will incur additional charges.
The service immediately returns the status HTTP 202 (accepted). A
notification gets sent to the report callback URL, if specified.
After the call is made, the client’s application can wait for a
notification sent by the Report Listener Service. Or it may enter a
loop, which waits about 20 seconds and then calls the service, Get
Report to check if the report is finished.
While the report’s generating, Get Report returns a minimal report
with a status of InProgress. The loop repeats every 20 seconds until
Get Report returns a different status.
Args:
customer_id (long|int): Finicity ID for the customer
accept (string): application/json
content_type (string): application/json
body (VOIEPayrollReportRefreshConstraints): TODO: type description
here. Example:
callback_url (string, optional): The Report Listener URL to
receive notifications (optional, must be URL-encoded).
Returns:
RefreshVOIEPayrollReportResponse: Response from the API. Accepted
Raises:
APIException: When an error occurs while fetching the data from
the remote API. This exception includes the HTTP Response
code, an error message, and the HTTP body that was received in
the request.
"""
# Validate required parameters
self.validate_parameters(customer_id=customer_id,
accept=accept,
content_type=content_type,
body=body)
# Prepare query URL
_url_path = '/decisioning/v2/customers/{customerId}/voiePayrollProvider'
_url_path = APIHelper.append_url_with_template_parameters(_url_path, {
'customerId': customer_id
})
_query_builder = Configuration.get_base_uri()
_query_builder += _url_path
_query_parameters = {
'callbackUrl': callback_url
}
_query_builder = APIHelper.append_url_with_query_parameters(_query_builder,
_query_parameters, Configuration.array_serialization)
_query_url = APIHelper.clean_url(_query_builder)
# Prepare headers
_headers = {
'Finicity-App-Key': Configuration.finicity_app_key,
'Accept': accept,
'Content-Type': content_type
}
# Prepare and execute request
_request = self.http_client.post(_query_url, headers=_headers, parameters=APIHelper.json_serialize(body))
CustomHeaderAuth.apply(_request)
_context = self.execute_request(_request)
# Endpoint and global error handling using HTTP status codes.
if _context.response.status_code == 400:
raise Error1ErrorException('Bad Request', _context)
self.validate_response(_context)
# Return appropriate type
return APIHelper.json_deserialize(_context.response.raw_body, RefreshVOIEPayrollReportResponse.from_dictionary)
| 48.16263
| 133
| 0.632876
| 1,473
| 13,919
| 5.813306
| 0.192125
| 0.023123
| 0.017868
| 0.022422
| 0.731286
| 0.70501
| 0.681187
| 0.669392
| 0.656662
| 0.656662
| 0
| 0.005282
| 0.319851
| 13,919
| 288
| 134
| 48.329861
| 0.899018
| 0.463683
| 0
| 0.783784
| 0
| 0
| 0.059807
| 0.027974
| 0
| 0
| 0
| 0.010417
| 0
| 1
| 0.027027
| false
| 0
| 0.072072
| 0
| 0.135135
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
940a9949da55768d8b3736f0be19f00194bc57e4
| 122
|
py
|
Python
|
fbone/modules/frontend/commands.py
|
jessekl/twiliochallenge
|
2bba8bc2e0928880f1e2abe6b53b96dbc67ef34f
|
[
"MIT"
] | 5
|
2015-03-21T20:55:41.000Z
|
2017-02-12T05:51:54.000Z
|
fbone/modules/frontend/commands.py
|
jessekl/twiliochallenge
|
2bba8bc2e0928880f1e2abe6b53b96dbc67ef34f
|
[
"MIT"
] | null | null | null |
fbone/modules/frontend/commands.py
|
jessekl/twiliochallenge
|
2bba8bc2e0928880f1e2abe6b53b96dbc67ef34f
|
[
"MIT"
] | 5
|
2015-05-27T22:16:51.000Z
|
2021-02-02T15:19:16.000Z
|
# -*- coding: utf-8 -*-
"""
fbone.modules.frontend
~~~~~~~~~~~~~~~~~~~~~~~~
frontend management commands
"""
| 15.25
| 32
| 0.459016
| 9
| 122
| 6.222222
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.010309
| 0.204918
| 122
| 7
| 33
| 17.428571
| 0.56701
| 0.819672
| 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
|
942b45499b6b6d2fbb8942511e53478daa25f992
| 101
|
py
|
Python
|
src/abc185_c.py
|
06keito/study-atcoder
|
c859e542079b550d19fa5e5e632e982a0dbb9578
|
[
"MIT"
] | 1
|
2021-08-19T07:21:47.000Z
|
2021-08-19T07:21:47.000Z
|
src/abc185_c.py
|
06keito/main-repository
|
c859e542079b550d19fa5e5e632e982a0dbb9578
|
[
"MIT"
] | null | null | null |
src/abc185_c.py
|
06keito/main-repository
|
c859e542079b550d19fa5e5e632e982a0dbb9578
|
[
"MIT"
] | null | null | null |
from math import factorial
L = int(input())
print(factorial(L-1) // factorial(11) // factorial(L-12))
| 33.666667
| 57
| 0.70297
| 16
| 101
| 4.4375
| 0.6875
| 0.422535
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.055556
| 0.108911
| 101
| 3
| 57
| 33.666667
| 0.733333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0.333333
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
942d0bf53365bc3407841b12ab1e39d00c4f73c5
| 119
|
py
|
Python
|
conf/__init__.py
|
EOSIO-HACKATHON2020/eosform
|
49d283634567858aff24dac139aefab2d9ab3395
|
[
"Apache-2.0"
] | null | null | null |
conf/__init__.py
|
EOSIO-HACKATHON2020/eosform
|
49d283634567858aff24dac139aefab2d9ab3395
|
[
"Apache-2.0"
] | null | null | null |
conf/__init__.py
|
EOSIO-HACKATHON2020/eosform
|
49d283634567858aff24dac139aefab2d9ab3395
|
[
"Apache-2.0"
] | null | null | null |
from __future__ import absolute_import, unicode_literals
from .celery import app as celery_app
__all__ = ('eosform',)
| 23.8
| 56
| 0.806723
| 16
| 119
| 5.3125
| 0.6875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.12605
| 119
| 4
| 57
| 29.75
| 0.817308
| 0
| 0
| 0
| 0
| 0
| 0.058824
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
94400ff52c86d61ea35a3d8ac0fd264ba10be347
| 118
|
py
|
Python
|
crawlers/EpisodeQuality.py
|
HidekiHrk/br-ani-cli
|
30508e3dba2d11d1cbbf1d6bdba3b980a9e98347
|
[
"MIT"
] | 1
|
2022-01-19T02:56:25.000Z
|
2022-01-19T02:56:25.000Z
|
crawlers/EpisodeQuality.py
|
HidekiHrk/br-ani-cli
|
30508e3dba2d11d1cbbf1d6bdba3b980a9e98347
|
[
"MIT"
] | null | null | null |
crawlers/EpisodeQuality.py
|
HidekiHrk/br-ani-cli
|
30508e3dba2d11d1cbbf1d6bdba3b980a9e98347
|
[
"MIT"
] | null | null | null |
class EpisodeQuality:
def __init__(self, title: str, url: str):
self.title = title
self.url = url
| 23.6
| 45
| 0.610169
| 15
| 118
| 4.533333
| 0.533333
| 0.264706
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.288136
| 118
| 4
| 46
| 29.5
| 0.809524
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
944e83eaa106b8705cd50b84224dc6fd48e93d9f
| 2,482
|
py
|
Python
|
generatedFiles/generateDataset.py
|
technoligest/kmeansII
|
d5326421786990f29fbd1ec18b3bccf4207fd2c0
|
[
"MIT"
] | 1
|
2019-11-15T14:36:27.000Z
|
2019-11-15T14:36:27.000Z
|
generatedFiles/generateDataset.py
|
technoligest/kmeansII
|
d5326421786990f29fbd1ec18b3bccf4207fd2c0
|
[
"MIT"
] | null | null | null |
generatedFiles/generateDataset.py
|
technoligest/kmeansII
|
d5326421786990f29fbd1ec18b3bccf4207fd2c0
|
[
"MIT"
] | null | null | null |
#!/usr/bin/python3
import numpy as np
import matplotlib.pyplot as plt
from pathlib import Path
import itertools
from generatedFiles.home import HOME
from generatedFiles.Dataset import Dataset
"""
Every plot consists of 3 values
-The list of sizes of the clusters
-The list of means of each cluster
-The list of co-variances for each cluster
"""
plots = {
"<10% overlap":
([
5000,
5000,
5000,
5000
],
[[-1000, -1000],
[+1000, +1000],
[-1000, +1000],
[+1000, -1000]
],
[[[200000, 0], [0, 200000]],
[[200000, 0], [0, 200000]],
[[200000, 0], [0, 200000]],
[[200000, 0], [0, 200000]]
]
),
"50% overlap per pair of clusters":([
5000,
5000,
5000,
5000
],
[[-500, -1000],
[+500, +1000],
[-500, +1000],
[+500, -1000]
],
[[[200000, 0], [0, 200000]],
[[200000, 0], [0, 200000]],
[[200000, 0], [0, 200000]],
[[200000, 0], [0, 200000]]
]
),
"~20% overlap":([
5000,
5000,
5000
],
[
[+1000, +1000],
[-1000, +1000],
[0, -1000]
],
[[[300000, 0], [0, 300000]],
[[300000, 0], [0, 300000]],
[[300000, 0], [0, 300000]],
[[300000, 0], [0, 300000]]
]
),
"~20% overlap ":([
500,
500,
500,
500,
500
],
[[0, 0],
[-1000, -1000],
[+1000, +1000],
[-1000, +1000],
[+1000, -1000]
],
[[[300000, 0], [0, 300000]],
[[300000, 0], [0, 300000]],
[[300000, 0], [0, 300000]],
[[300000, 0], [0, 300000]],
[[300000, 0], [0, 300000]]
]
),
5:([
500,
1000,
1000,
1000,
1000
],
[[0, 0],
[-800, -800],
[+800, +800],
[-800, +800],
[+800, -800]
],
[[[10000, 0], [0, 10000]],
[[250000, 0], [0, 250000]],
[[250000, 0], [0, 250000]],
[[250000, 0], [0, 250000]],
[[250000, 0], [0, 250000]]
]
)
}
def createDatasets(datasetInfo):
"""
:param datasetInfo: A dictionary of datasets with values in format (sizes, means, covariance) of clusters
:return:
"""
datasets = []
i=0
dir = HOME + '/generatedFiles/datasets/'
for key in plots:
(sizes, means, covs) = plots[key]
dataset = Dataset(sizes, means, covs)
dataset.printToFile(dir)
dataset.plot(plt)
plt.show()
i+=1
plt.show()
| 18.80303
| 107
| 0.455681
| 273
| 2,482
| 4.142857
| 0.252747
| 0.04244
| 0.169761
| 0.169761
| 0.41733
| 0.401415
| 0.380195
| 0.323607
| 0.274094
| 0.274094
| 0
| 0.330467
| 0.344077
| 2,482
| 131
| 108
| 18.946565
| 0.364251
| 0.053183
| 0
| 0.603604
| 1
| 0
| 0.043139
| 0.011473
| 0
| 0
| 0
| 0
| 0
| 1
| 0.009009
| false
| 0
| 0.054054
| 0
| 0.063063
| 0.009009
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
94549ba2005441317fec8620213f62b5c69501e6
| 91
|
py
|
Python
|
project-skel/django_project/settings/base.py
|
wheelcms/wheelcms_project
|
e3cc3b6cb787ac83732aea1b7fb81c7f62c981f7
|
[
"BSD-2-Clause"
] | null | null | null |
project-skel/django_project/settings/base.py
|
wheelcms/wheelcms_project
|
e3cc3b6cb787ac83732aea1b7fb81c7f62c981f7
|
[
"BSD-2-Clause"
] | null | null | null |
project-skel/django_project/settings/base.py
|
wheelcms/wheelcms_project
|
e3cc3b6cb787ac83732aea1b7fb81c7f62c981f7
|
[
"BSD-2-Clause"
] | null | null | null |
from wheelcms_project.settings.base import *
INSTALLED_APPS += (
# project specific...
)
| 13
| 44
| 0.736264
| 10
| 91
| 6.5
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 91
| 6
| 45
| 15.166667
| 0.833333
| 0.208791
| 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
|
945ddde1f999245b95f608c151da15c5583b86c6
| 578
|
py
|
Python
|
18.py
|
nursyah21/project-euler
|
af819a561c1ca90794d5851121366855f3914c49
|
[
"MIT"
] | null | null | null |
18.py
|
nursyah21/project-euler
|
af819a561c1ca90794d5851121366855f3914c49
|
[
"MIT"
] | null | null | null |
18.py
|
nursyah21/project-euler
|
af819a561c1ca90794d5851121366855f3914c49
|
[
"MIT"
] | null | null | null |
num="""\
75
95 64
17 47 82
18 35 87 10
20 04 82 47 65
19 01 23 75 03 34
88 02 77 73 07 63 67
99 65 04 28 06 16 70 92
41 41 26 56 83 40 80 70 33
41 48 72 33 47 32 37 16 94 29
53 71 44 65 25 43 91 52 97 51 14
70 11 33 28 77 73 17 78 39 68 17 57
91 71 52 38 17 14 91 43 58 50 27 29 48
63 66 04 68 89 53 67 30 73 16 69 87 40 31
04 62 98 27 23 09 70 98 73 93 38 53 60 04 23"""
num = [[int(i) for i in row.split()] for row in num.split('\n')]
for i in range(len(num)-1,0,-1):
for j in range(len(num[i])-1):
num[i-1][j] += max(num[i][j],num[i][j+1])
print(num[0][0])
| 19.266667
| 64
| 0.605536
| 168
| 578
| 2.083333
| 0.52381
| 0.045714
| 0.034286
| 0.074286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.596154
| 0.280277
| 578
| 29
| 65
| 19.931034
| 0.245192
| 0
| 0
| 0
| 0
| 0
| 0.631304
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.047619
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
8470309c8ac1b6414293a4179b0629993c4798e2
| 324
|
py
|
Python
|
pyrho/gui/__init__.py
|
bdevans/PyRhO
|
3bb12210b68d84e3432911d8095f47fa40a1cbf4
|
[
"BSD-3-Clause"
] | 30
|
2016-02-17T22:28:14.000Z
|
2022-03-09T02:29:52.000Z
|
pyrho/gui/__init__.py
|
bdevans/PyRhO
|
3bb12210b68d84e3432911d8095f47fa40a1cbf4
|
[
"BSD-3-Clause"
] | 2
|
2016-08-31T16:07:28.000Z
|
2021-11-05T17:49:16.000Z
|
pyrho/gui/__init__.py
|
bdevans/PyRhO
|
3bb12210b68d84e3432911d8095f47fa40a1cbf4
|
[
"BSD-3-Clause"
] | 4
|
2016-08-31T17:01:35.000Z
|
2021-06-04T22:50:37.000Z
|
from pkg_resources import resource_filename
# resource_filename(package_or_requirement, resource_name)
# TODO: Boilerplate for widgets and notebook environment
try:
import ipywidgets as widgets
from IPython.display import display
from IPython.display import clear_output
except ImportError:
widgets = None
| 27
| 58
| 0.808642
| 40
| 324
| 6.375
| 0.675
| 0.12549
| 0.141176
| 0.188235
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.157407
| 324
| 11
| 59
| 29.454545
| 0.934066
| 0.342593
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.090909
| 0
| 1
| 0
| false
| 0
| 0.714286
| 0
| 0.714286
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
848ce1334fc63df1de6c30f5dcd1f0a397f8083e
| 153
|
py
|
Python
|
docassemble_base/docassemble/base/rtfng/exceptions.py
|
amsclark/docassemble
|
ae5c194831faabb52681a6c827ec30c106273eb7
|
[
"MIT"
] | 5
|
2015-01-27T08:08:08.000Z
|
2022-03-30T10:43:31.000Z
|
docassemble_base/docassemble/base/rtfng/exceptions.py
|
amsclark/docassemble
|
ae5c194831faabb52681a6c827ec30c106273eb7
|
[
"MIT"
] | null | null | null |
docassemble_base/docassemble/base/rtfng/exceptions.py
|
amsclark/docassemble
|
ae5c194831faabb52681a6c827ec30c106273eb7
|
[
"MIT"
] | 4
|
2015-12-11T07:41:24.000Z
|
2022-03-30T09:48:55.000Z
|
"""
pyrtf-ng Errors and Exceptions
"""
class RTFError(Exception):
pass
class ParseError(RTFError):
"""
Unable to parse the RTF data.
"""
| 11.769231
| 32
| 0.640523
| 18
| 153
| 5.444444
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.228758
| 153
| 12
| 33
| 12.75
| 0.830508
| 0.392157
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.333333
| 0
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
84a60e8114616063b9ea753e4c76a7b07485c46a
| 110
|
py
|
Python
|
zulip_botserver/tests/__init__.py
|
dimisjim/python-zulip-api
|
095d5d8f4e1854a98025b8ee92d004fe373d6a88
|
[
"Apache-2.0"
] | 351
|
2017-07-07T22:44:48.000Z
|
2022-03-30T04:52:12.000Z
|
zulip_botserver/tests/__init__.py
|
dimisjim/python-zulip-api
|
095d5d8f4e1854a98025b8ee92d004fe373d6a88
|
[
"Apache-2.0"
] | 631
|
2017-07-06T18:56:47.000Z
|
2022-03-16T20:32:50.000Z
|
zulip_botserver/tests/__init__.py
|
dimisjim/python-zulip-api
|
095d5d8f4e1854a98025b8ee92d004fe373d6a88
|
[
"Apache-2.0"
] | 371
|
2017-07-06T19:56:29.000Z
|
2022-03-31T16:07:30.000Z
|
import pkgutil
from typing import List
__path__ = pkgutil.extend_path(__path__, __name__) # type: List[str]
| 22
| 69
| 0.781818
| 15
| 110
| 4.866667
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.136364
| 110
| 4
| 70
| 27.5
| 0.768421
| 0.136364
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
ca05e22dd0f1e487c4f5f6d8e27275b6a0f1ba68
| 174
|
py
|
Python
|
coders/curso_regex/caracteres/ou.py
|
flaviogf/Cursos
|
2b120dbcd24a907121f58482fdcdfa01b164872c
|
[
"MIT"
] | 2
|
2021-02-20T23:50:07.000Z
|
2021-08-15T03:04:35.000Z
|
coders/curso_regex/caracteres/ou.py
|
flaviogf/Cursos
|
2b120dbcd24a907121f58482fdcdfa01b164872c
|
[
"MIT"
] | 18
|
2019-08-07T02:33:00.000Z
|
2021-03-18T22:52:38.000Z
|
coders/curso_regex/caracteres/ou.py
|
flaviogf/Cursos
|
2b120dbcd24a907121f58482fdcdfa01b164872c
|
[
"MIT"
] | 2
|
2020-09-28T13:00:09.000Z
|
2021-12-30T12:21:08.000Z
|
import re
texto = 'Diga sim não ou, não sei'
print(re.findall(r'sim|não|sei', texto))
print(re.findall(r'sim|não sei|não', texto))
print(re.findall(r'sim|n.o|sei', texto))
| 21.75
| 44
| 0.689655
| 35
| 174
| 3.428571
| 0.371429
| 0.15
| 0.35
| 0.375
| 0.633333
| 0.633333
| 0.4
| 0
| 0
| 0
| 0
| 0
| 0.109195
| 174
| 7
| 45
| 24.857143
| 0.774194
| 0
| 0
| 0
| 0
| 0
| 0.350575
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.2
| 0
| 0.2
| 0.6
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
ca0b77bb5dc78976eaf83db24398aaad6298c664
| 71
|
py
|
Python
|
skxray/tests/test_diffraction.py
|
celiafish/scikit-xray
|
660a37821d58544b6443c5b8cd9c96daef577ed2
|
[
"BSD-3-Clause"
] | null | null | null |
skxray/tests/test_diffraction.py
|
celiafish/scikit-xray
|
660a37821d58544b6443c5b8cd9c96daef577ed2
|
[
"BSD-3-Clause"
] | null | null | null |
skxray/tests/test_diffraction.py
|
celiafish/scikit-xray
|
660a37821d58544b6443c5b8cd9c96daef577ed2
|
[
"BSD-3-Clause"
] | 1
|
2019-03-04T07:12:02.000Z
|
2019-03-04T07:12:02.000Z
|
# smoketest the diffraction namespace
from skxray.diffraction import *
| 23.666667
| 37
| 0.830986
| 8
| 71
| 7.375
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.126761
| 71
| 2
| 38
| 35.5
| 0.951613
| 0.492958
| 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
|
ca0d0e025ab3b0a265efe91b2f93efb86f7d9e01
| 20
|
py
|
Python
|
chocopy-rs/test/original/pa2/bad_return_top.py
|
wwylele/chocopy-wwylele
|
ef60c94cc9c2d7c8ac11cf2761b724a717ac36aa
|
[
"MIT"
] | 7
|
2021-08-28T18:20:45.000Z
|
2022-02-01T07:35:59.000Z
|
chocopy-rs/test/original/pa2/bad_return_top.py
|
wwylele/chocopy-wwylele
|
ef60c94cc9c2d7c8ac11cf2761b724a717ac36aa
|
[
"MIT"
] | 5
|
2020-03-04T23:49:17.000Z
|
2021-12-09T21:42:55.000Z
|
tests/typecheck/bad_return_top.py
|
yangdanny97/chocopy-python-frontend
|
d0fb63fc744771640fa4d06076743f42089899c1
|
[
"MIT"
] | 3
|
2019-11-07T23:54:49.000Z
|
2021-06-21T20:45:54.000Z
|
x:int = 0
return x
| 5
| 9
| 0.6
| 5
| 20
| 2.4
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.071429
| 0.3
| 20
| 3
| 10
| 6.666667
| 0.785714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
ca31cb896eaca3ec969d438a414cdead0c041916
| 133
|
py
|
Python
|
meteor/publisher/base.py
|
h0wang/meteor
|
d8d16fd22c05712ce1ab2d9568f89961f7a54194
|
[
"Apache-2.0"
] | 3
|
2020-11-15T15:29:03.000Z
|
2021-11-01T18:21:30.000Z
|
meteor/publisher/base.py
|
h0wang/meteor
|
d8d16fd22c05712ce1ab2d9568f89961f7a54194
|
[
"Apache-2.0"
] | 1
|
2020-11-13T12:48:06.000Z
|
2020-11-15T15:28:11.000Z
|
meteor/publisher/base.py
|
h0wang/meteor
|
d8d16fd22c05712ce1ab2d9568f89961f7a54194
|
[
"Apache-2.0"
] | 1
|
2021-03-18T22:46:31.000Z
|
2021-03-18T22:46:31.000Z
|
import asyncio
import abc
class Publisher:
@abc.abstractmethod
async def publish(self):
raise NotImplementedError
| 13.3
| 33
| 0.721805
| 14
| 133
| 6.857143
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.233083
| 133
| 9
| 34
| 14.777778
| 0.941176
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 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
|
046c0361bead3a2a837a7b1736dc514359ff7800
| 143
|
py
|
Python
|
Arrays/1228. Missing Number In Arithmetic Progression.py
|
thewires2/Leetcode
|
a37ff81d60dd9195ba637b970b40aabbea5f4680
|
[
"Unlicense"
] | 1
|
2021-06-30T17:51:56.000Z
|
2021-06-30T17:51:56.000Z
|
Arrays/1228. Missing Number In Arithmetic Progression.py
|
thewires2/Leetcode
|
a37ff81d60dd9195ba637b970b40aabbea5f4680
|
[
"Unlicense"
] | null | null | null |
Arrays/1228. Missing Number In Arithmetic Progression.py
|
thewires2/Leetcode
|
a37ff81d60dd9195ba637b970b40aabbea5f4680
|
[
"Unlicense"
] | null | null | null |
class Solution:
def missingNumber(self, arr: List[int]) -> int:
x=int(((len(arr)+1)/2)*(arr[0]+arr[-1]))
return x-sum(arr)
| 28.6
| 51
| 0.552448
| 23
| 143
| 3.434783
| 0.652174
| 0.101266
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.035714
| 0.216783
| 143
| 4
| 52
| 35.75
| 0.669643
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 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
|
046e585d858b326c6e8f38e91bab236a8cc866f3
| 330
|
py
|
Python
|
作业/作业5/nack-oriented-reliable-multicast-master/norm-1.5r6/build/lib/pynorm/__init__.py
|
He-Ze/Distributed-System-SYSU
|
61bcff6e271c77bf3a3ad5f9fc531c1ceb9b9087
|
[
"MIT"
] | 7
|
2020-11-09T09:24:42.000Z
|
2021-09-17T07:35:05.000Z
|
作业/作业5/nack-oriented-reliable-multicast-master/norm-1.5r6/src/pynorm/__init__.py
|
He-Ze/Distributed-System-SYSU
|
61bcff6e271c77bf3a3ad5f9fc531c1ceb9b9087
|
[
"MIT"
] | null | null | null |
作业/作业5/nack-oriented-reliable-multicast-master/norm-1.5r6/src/pynorm/__init__.py
|
He-Ze/Distributed-System-SYSU
|
61bcff6e271c77bf3a3ad5f9fc531c1ceb9b9087
|
[
"MIT"
] | 1
|
2022-01-21T03:23:14.000Z
|
2022-01-21T03:23:14.000Z
|
"""
pynorm - Python wrapper for NRL's libnorm
By: Tom Wambold <wambold@itd.nrl.navy.mil>
"""
from pynorm.instance import Instance
from pynorm.core import libnorm, NormError
from pynorm.constants import *
def setDebugLevel(level):
libnorm.NormSetDebugLevel(level)
def getDebugLevel():
return libnorm.NormGetDebugLevel()
| 22
| 42
| 0.769697
| 41
| 330
| 6.195122
| 0.634146
| 0.11811
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.133333
| 330
| 14
| 43
| 23.571429
| 0.888112
| 0.254545
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0
| 0.428571
| 0.142857
| 0.857143
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 4
|
04706e95afa925963e9d727791f9bfc0123da093
| 544
|
py
|
Python
|
tests/test_441.py
|
sungho-joo/leetcode2github
|
ce7730ef40f6051df23681dd3c0e1e657abba620
|
[
"MIT"
] | null | null | null |
tests/test_441.py
|
sungho-joo/leetcode2github
|
ce7730ef40f6051df23681dd3c0e1e657abba620
|
[
"MIT"
] | null | null | null |
tests/test_441.py
|
sungho-joo/leetcode2github
|
ce7730ef40f6051df23681dd3c0e1e657abba620
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
import pytest
"""
Test 441. Arranging Coins
"""
@pytest.fixture(scope="session")
def init_variables_441():
from src.leetcode_441_arranging_coins import Solution
solution = Solution()
def _init_variables_441():
return solution
yield _init_variables_441
class TestClass441:
def test_solution_0(self, init_variables_441):
assert init_variables_441().arrangeCoins(5) == 2
def test_solution_1(self, init_variables_441):
assert init_variables_441().arrangeCoins(8) == 3
| 19.428571
| 57
| 0.720588
| 70
| 544
| 5.271429
| 0.471429
| 0.246612
| 0.303523
| 0.102981
| 0.292683
| 0.292683
| 0.292683
| 0.292683
| 0.292683
| 0
| 0
| 0.081081
| 0.183824
| 544
| 27
| 58
| 20.148148
| 0.75
| 0.036765
| 0
| 0
| 0
| 0
| 0.014286
| 0
| 0
| 0
| 0
| 0
| 0.153846
| 1
| 0.307692
| false
| 0
| 0.153846
| 0.076923
| 0.615385
| 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
|
047c7246867559cfd70e1ddee10b755074359525
| 190
|
py
|
Python
|
pillbox/pillbox_support/xtime.py
|
xasync/pillbox
|
49f3ed08aff63ea458a9d80a19846339e02447f8
|
[
"Apache-2.0"
] | null | null | null |
pillbox/pillbox_support/xtime.py
|
xasync/pillbox
|
49f3ed08aff63ea458a9d80a19846339e02447f8
|
[
"Apache-2.0"
] | null | null | null |
pillbox/pillbox_support/xtime.py
|
xasync/pillbox
|
49f3ed08aff63ea458a9d80a19846339e02447f8
|
[
"Apache-2.0"
] | null | null | null |
import time
def now_unix():
return int(time.time())
def now_millis():
return int(round(time.time() * 1000))
def now_millis_with_delta(millis):
return now_millis() + millis
| 13.571429
| 41
| 0.678947
| 28
| 190
| 4.392857
| 0.428571
| 0.146341
| 0.162602
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.025974
| 0.189474
| 190
| 13
| 42
| 14.615385
| 0.772727
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.428571
| false
| 0
| 0.142857
| 0.428571
| 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
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
049cca7620c0431bd679ebe9a3b8e4144e954fce
| 78
|
py
|
Python
|
src/mydemo/example.py
|
arunmastermind/pythonPackaging
|
da27c3b6c9077d0750c38ad713208b3bc11504fb
|
[
"BSD-2-Clause"
] | null | null | null |
src/mydemo/example.py
|
arunmastermind/pythonPackaging
|
da27c3b6c9077d0750c38ad713208b3bc11504fb
|
[
"BSD-2-Clause"
] | null | null | null |
src/mydemo/example.py
|
arunmastermind/pythonPackaging
|
da27c3b6c9077d0750c38ad713208b3bc11504fb
|
[
"BSD-2-Clause"
] | null | null | null |
def sayHello(name):
'''say hello to given name'''
print(f'Hello, {name}')
| 13
| 30
| 0.628205
| 12
| 78
| 4.083333
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 78
| 5
| 31
| 15.6
| 0.753846
| 0.294872
| 0
| 0
| 0
| 0
| 0.276596
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0
| 0.5
| 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
04cfdd65f29a11027eecdb3ab5e27896805ebaaa
| 12,160
|
py
|
Python
|
switch_code/p4_sq/ptf-tests/test.py
|
netx-repo/RackSched
|
ba3a4c4dfc100701df4733462dc83dec0d6851fd
|
[
"Apache-2.0"
] | 15
|
2020-10-30T18:20:39.000Z
|
2022-03-10T13:14:01.000Z
|
switch_code/p4_sq/ptf-tests/test.py
|
netx-repo/RackSched
|
ba3a4c4dfc100701df4733462dc83dec0d6851fd
|
[
"Apache-2.0"
] | null | null | null |
switch_code/p4_sq/ptf-tests/test.py
|
netx-repo/RackSched
|
ba3a4c4dfc100701df4733462dc83dec0d6851fd
|
[
"Apache-2.0"
] | 5
|
2020-10-19T16:28:10.000Z
|
2021-05-27T03:07:26.000Z
|
import pd_base_tests
import pdb
from collections import OrderedDict
from ptf import config
from ptf.testutils import *
from ptf.thriftutils import *
from p4_sq.p4_pd_rpc.ttypes import *
from res_pd_rpc.ttypes import *
from pal_rpc.ttypes import *
from mirror_pd_rpc.ttypes import *
from pkt_pd_rpc.ttypes import *
import time
dev_id = 0
handle_ipv4 = []
handle_mac = []
def addPorts(test):
swports = [188, 184, 180, 176, 172, 168, 164, 160, 156, 152, 148, 144]
test.pal.pal_port_add_all(dev_id, pal_port_speed_t.BF_SPEED_40G, pal_fec_type_t.BF_FEC_TYP_NONE)
test.pal.pal_port_enable_all(dev_id)
ports_not_up = True
print "Waiting for ports to come up..."
sys.stdout.flush()
num_tries = 12
i = 0
while ports_not_up:
ports_not_up = False
for p in swports:
x = test.pal.pal_port_oper_status_get(dev_id, p)
if x == pal_oper_status_t.BF_PORT_DOWN:
ports_not_up = True
print " port", p, "is down"
sys.stdout.flush()
time.sleep(3)
break
i = i + 1
if i >= num_tries:
break
assert ports_not_up == False
print "All ports up."
sys.stdout.flush()
return
class Test(pd_base_tests.ThriftInterfaceDataPlane):
def __init__(self):
pd_base_tests.ThriftInterfaceDataPlane.__init__(self, ["p4_sq"])
# veth0 and veth2 are clients.
# veth4 is the primary server while veth6 and veth8 are the backups
def runTest(self):
sess_hdl = self.conn_mgr.client_init()
dev_tgt = DevTarget_t(0, hex_to_i16(0xFFFF))
addPorts(self)
start_ip = 0x0a010001
switch_portbase = 188
server_num = 12
for i in range(server_num):
match_spec = p4_sq_ipv4_route_match_spec_t(start_ip+i)
action_spec = p4_sq_act_rewrite_iface_action_spec_t(switch_portbase-4*i)
self.client.ipv4_route_table_add_with_act_rewrite_iface(sess_hdl,dev_tgt, match_spec, action_spec)
if i < 8:
match_spec = p4_sq_send_to_curserver_match_spec_t(i)
action_spec = p4_sq_act_rewrite_iface_action_spec_t(switch_portbase-4*i)
self.client.send_to_curserver_table_add_with_act_rewrite_iface(sess_hdl,dev_tgt, match_spec, action_spec)
for i in xrange(server_num):
match_spec = p4_sq_assign_random1_match_spec_t(i)
if i == 0:
self.client.assign_random1_table_add_with_act_random1_qlen1(sess_hdl,dev_tgt,match_spec)
elif i == 1:
self.client.assign_random1_table_add_with_act_random1_qlen2(sess_hdl,dev_tgt,match_spec)
elif i == 2:
self.client.assign_random1_table_add_with_act_random1_qlen3(sess_hdl,dev_tgt,match_spec)
elif i == 3:
self.client.assign_random1_table_add_with_act_random1_qlen4(sess_hdl,dev_tgt,match_spec)
elif i == 4:
self.client.assign_random1_table_add_with_act_random1_qlen5(sess_hdl,dev_tgt,match_spec)
elif i == 5:
self.client.assign_random1_table_add_with_act_random1_qlen6(sess_hdl,dev_tgt,match_spec)
elif i == 6:
self.client.assign_random1_table_add_with_act_random1_qlen7(sess_hdl,dev_tgt,match_spec)
elif i == 7:
self.client.assign_random1_table_add_with_act_random1_qlen8(sess_hdl,dev_tgt,match_spec)
for i in xrange(server_num):
match_spec = p4_sq_assign_random2_match_spec_t(i)
if i == 0:
self.client.assign_random2_table_add_with_act_random2_qlen1(sess_hdl,dev_tgt,match_spec)
elif i == 1:
self.client.assign_random2_table_add_with_act_random2_qlen2(sess_hdl,dev_tgt,match_spec)
elif i == 2:
self.client.assign_random2_table_add_with_act_random2_qlen3(sess_hdl,dev_tgt,match_spec)
elif i == 3:
self.client.assign_random2_table_add_with_act_random2_qlen4(sess_hdl,dev_tgt,match_spec)
elif i == 4:
self.client.assign_random2_table_add_with_act_random2_qlen5(sess_hdl,dev_tgt,match_spec)
elif i == 5:
self.client.assign_random2_table_add_with_act_random2_qlen6(sess_hdl,dev_tgt,match_spec)
elif i == 6:
self.client.assign_random2_table_add_with_act_random2_qlen7(sess_hdl,dev_tgt,match_spec)
elif i == 7:
self.client.assign_random2_table_add_with_act_random2_qlen8(sess_hdl,dev_tgt,match_spec)
for i in xrange(server_num):
match_spec = p4_sq_assign_random3_match_spec_t(i)
if i == 0:
self.client.assign_random3_table_add_with_act_random3_qlen1(sess_hdl,dev_tgt,match_spec)
elif i == 1:
self.client.assign_random3_table_add_with_act_random3_qlen2(sess_hdl,dev_tgt,match_spec)
elif i == 2:
self.client.assign_random3_table_add_with_act_random3_qlen3(sess_hdl,dev_tgt,match_spec)
elif i == 3:
self.client.assign_random3_table_add_with_act_random3_qlen4(sess_hdl,dev_tgt,match_spec)
elif i == 4:
self.client.assign_random3_table_add_with_act_random3_qlen5(sess_hdl,dev_tgt,match_spec)
elif i == 5:
self.client.assign_random3_table_add_with_act_random3_qlen6(sess_hdl,dev_tgt,match_spec)
elif i == 6:
self.client.assign_random3_table_add_with_act_random3_qlen7(sess_hdl,dev_tgt,match_spec)
elif i == 7:
self.client.assign_random3_table_add_with_act_random3_qlen8(sess_hdl,dev_tgt,match_spec)
for i in xrange(server_num):
match_spec = p4_sq_assign_random4_match_spec_t(i)
if i == 0:
self.client.assign_random4_table_add_with_act_random4_qlen1(sess_hdl,dev_tgt,match_spec)
elif i == 1:
self.client.assign_random4_table_add_with_act_random4_qlen2(sess_hdl,dev_tgt,match_spec)
elif i == 2:
self.client.assign_random4_table_add_with_act_random4_qlen3(sess_hdl,dev_tgt,match_spec)
elif i == 3:
self.client.assign_random4_table_add_with_act_random4_qlen4(sess_hdl,dev_tgt,match_spec)
elif i == 4:
self.client.assign_random4_table_add_with_act_random4_qlen5(sess_hdl,dev_tgt,match_spec)
elif i == 5:
self.client.assign_random4_table_add_with_act_random4_qlen6(sess_hdl,dev_tgt,match_spec)
elif i == 6:
self.client.assign_random4_table_add_with_act_random4_qlen7(sess_hdl,dev_tgt,match_spec)
elif i == 7:
self.client.assign_random4_table_add_with_act_random4_qlen8(sess_hdl,dev_tgt,match_spec)
# add entries for table "set_mac"
match_spec = p4_sq_set_mac_match_spec_t(188)
action_spec = p4_sq_act_set_mac_action_spec_t("\xa8\x2b\xb5\xde\x92\x2e", "\x3c\xfd\xfe\xab\xde\xd8", start_ip)
result = self.client.set_mac_table_add_with_act_set_mac(sess_hdl, dev_tgt, match_spec, action_spec)
handle_mac.append(result)
match_spec = p4_sq_set_mac_match_spec_t(184)
action_spec = p4_sq_act_set_mac_action_spec_t("\xa8\x2b\xb5\xde\x92\x32", "\x3c\xfd\xfe\xa6\xeb\x10", start_ip+1)
result = self.client.set_mac_table_add_with_act_set_mac(sess_hdl, dev_tgt, match_spec, action_spec)
handle_mac.append(result)
match_spec = p4_sq_set_mac_match_spec_t(180)
action_spec = p4_sq_act_set_mac_action_spec_t("\xa8\x2b\xb5\xde\x92\x36", "\x3c\xfd\xfe\xaa\x5d\x00", start_ip+2)
result = self.client.set_mac_table_add_with_act_set_mac(sess_hdl, dev_tgt, match_spec, action_spec)
handle_mac.append(result)
match_spec = p4_sq_set_mac_match_spec_t(176)
action_spec = p4_sq_act_set_mac_action_spec_t("\xa8\x2b\xb5\xde\x92\x3a", "\x3c\xfd\xfe\xaa\x46\x68", start_ip+3)
result = self.client.set_mac_table_add_with_act_set_mac(sess_hdl, dev_tgt, match_spec, action_spec)
handle_mac.append(result)
match_spec = p4_sq_set_mac_match_spec_t(172)
action_spec = p4_sq_act_set_mac_action_spec_t("\xa8\x2b\xb5\xde\x92\x3e", "\x3c\xfd\xfe\xab\xde\xf0", start_ip+4)
result = self.client.set_mac_table_add_with_act_set_mac(sess_hdl, dev_tgt, match_spec, action_spec)
handle_mac.append(result)
match_spec = p4_sq_set_mac_match_spec_t(168)
action_spec = p4_sq_act_set_mac_action_spec_t("\xa8\x2b\xb5\xde\x92\x42", "\x3c\xfd\xfe\xab\xdf\x90", start_ip+5)
result = self.client.set_mac_table_add_with_act_set_mac(sess_hdl, dev_tgt, match_spec, action_spec)
handle_mac.append(result)
match_spec = p4_sq_set_mac_match_spec_t(164)
action_spec = p4_sq_act_set_mac_action_spec_t("\xa8\x2b\xb5\xde\x92\x46", "\x3c\xfd\xfe\xab\xe0\x50", start_ip+6)
result = self.client.set_mac_table_add_with_act_set_mac(sess_hdl, dev_tgt, match_spec, action_spec)
handle_mac.append(result)
match_spec = p4_sq_set_mac_match_spec_t(160)
action_spec = p4_sq_act_set_mac_action_spec_t("\xa8\x2b\xb5\xde\x92\x4a", "\x3c\xfd\xfe\xab\xd9\xf0", start_ip+7)
result = self.client.set_mac_table_add_with_act_set_mac(sess_hdl, dev_tgt, match_spec, action_spec)
handle_mac.append(result)
match_spec = p4_sq_set_mac_match_spec_t(156)
action_spec = p4_sq_act_set_mac_action_spec_t("\xa8\x2b\xb5\xde\x92\x4e", "\x3c\xfd\xfe\xc3\xdf\xe0", start_ip+8)
result = self.client.set_mac_table_add_with_act_set_mac(sess_hdl, dev_tgt, match_spec, action_spec)
handle_mac.append(result)
match_spec = p4_sq_set_mac_match_spec_t(152)
action_spec = p4_sq_act_set_mac_action_spec_t("\xa8\x2b\xb5\xde\x92\x52", "\x3c\xfd\xfe\xc3\xe9\xf0", start_ip+9)
result = self.client.set_mac_table_add_with_act_set_mac(sess_hdl, dev_tgt, match_spec, action_spec)
handle_mac.append(result)
match_spec = p4_sq_set_mac_match_spec_t(148)
action_spec = p4_sq_act_set_mac_action_spec_t("\xa8\x2b\xb5\xde\x92\x56", "\x3c\xfd\xfe\xc3\xe0\x60", start_ip+10)
result = self.client.set_mac_table_add_with_act_set_mac(sess_hdl, dev_tgt, match_spec, action_spec)
handle_mac.append(result)
match_spec = p4_sq_set_mac_match_spec_t(144)
action_spec = p4_sq_act_set_mac_action_spec_t("\xa8\x2b\xb5\xde\x92\x5a", "\x3c\xfd\xfe\xc3\xe9\xb0", start_ip+11)
result = self.client.set_mac_table_add_with_act_set_mac(sess_hdl, dev_tgt, match_spec, action_spec)
handle_mac.append(result)
self.conn_mgr.complete_operations(sess_hdl);
queue_list = [0]*8
while True:
time.sleep(1)
flags = p4_sq_register_flags_t(read_hw_sync = True)
for i in xrange(8):
if i == 0:
value_t = self.client.register_read_server_qlen1(sess_hdl, dev_tgt, 2, flags)
elif i == 1:
value_t = self.client.register_read_server_qlen2(sess_hdl, dev_tgt, 2, flags)
elif i == 2:
value_t = self.client.register_read_server_qlen3(sess_hdl, dev_tgt, 2, flags)
elif i == 3:
value_t = self.client.register_read_server_qlen4(sess_hdl, dev_tgt, 2, flags)
elif i == 4:
value_t = self.client.register_read_server_qlen5(sess_hdl, dev_tgt, 2, flags)
elif i == 5:
value_t = self.client.register_read_server_qlen6(sess_hdl, dev_tgt, 2, flags)
elif i == 6:
value_t = self.client.register_read_server_qlen7(sess_hdl, dev_tgt, 2, flags)
elif i == 7:
value_t = self.client.register_read_server_qlen8(sess_hdl, dev_tgt, 2, flags)
queue_list[i] = value_t[1].f1
# print value1[1], value2[1]
print queue_list
print '\n'
| 51.092437
| 122
| 0.675905
| 1,915
| 12,160
| 3.828721
| 0.111227
| 0.100655
| 0.07365
| 0.095745
| 0.779324
| 0.751909
| 0.746318
| 0.705537
| 0.682624
| 0.5521
| 0
| 0.047917
| 0.237993
| 12,160
| 237
| 123
| 51.308017
| 0.743363
| 0.012582
| 0
| 0.377451
| 0
| 0
| 0.053324
| 0.047992
| 0
| 0
| 0.001333
| 0
| 0.004902
| 0
| null | null | 0
| 0.058824
| null | null | 0.02451
| 0
| 0
| 0
| null | 0
| 0
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
04d1de96b1de936a5d04aff211687ebb2ee25ba1
| 167
|
py
|
Python
|
models/__init__.py
|
SantiagoHerreG/AirBnB_clone
|
aa8c8b042f991deb0184a3b2c37b1de2e5f0baa6
|
[
"MIT"
] | 1
|
2019-11-09T23:12:05.000Z
|
2019-11-09T23:12:05.000Z
|
models/__init__.py
|
SantiagoHerreG/AirBnB_clone
|
aa8c8b042f991deb0184a3b2c37b1de2e5f0baa6
|
[
"MIT"
] | null | null | null |
models/__init__.py
|
SantiagoHerreG/AirBnB_clone
|
aa8c8b042f991deb0184a3b2c37b1de2e5f0baa6
|
[
"MIT"
] | 2
|
2019-11-13T18:37:50.000Z
|
2019-11-15T18:30:03.000Z
|
#!/usr/bin/python3
""" Creates a unique instance of FileStorage Class
"""
from models.engine.file_storage import FileStorage
storage = FileStorage()
storage.reload()
| 20.875
| 50
| 0.772455
| 21
| 167
| 6.095238
| 0.809524
| 0.28125
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.006757
| 0.113772
| 167
| 7
| 51
| 23.857143
| 0.858108
| 0.383234
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
04e2ef8e7dd370b3b0a8743a02676b74b3f54af4
| 181
|
py
|
Python
|
imarket_env/bin/django-admin.py
|
iXpress-Group/saleor
|
2dca2f249a0bb120d19cabbe8eca44d64dccffb2
|
[
"BSD-3-Clause"
] | 1
|
2019-07-18T13:16:09.000Z
|
2019-07-18T13:16:09.000Z
|
imarket_env/bin/django-admin.py
|
iXpress-Group/saleor
|
2dca2f249a0bb120d19cabbe8eca44d64dccffb2
|
[
"BSD-3-Clause"
] | null | null | null |
imarket_env/bin/django-admin.py
|
iXpress-Group/saleor
|
2dca2f249a0bb120d19cabbe8eca44d64dccffb2
|
[
"BSD-3-Clause"
] | null | null | null |
#!/home/engineersticity/Documents/newSaleor/saleor/imarket_env/bin/python3
from django.core import management
if __name__ == "__main__":
management.execute_from_command_line()
| 30.166667
| 74
| 0.812155
| 22
| 181
| 6.136364
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.006024
| 0.082873
| 181
| 5
| 75
| 36.2
| 0.807229
| 0.403315
| 0
| 0
| 0
| 0
| 0.074766
| 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
|
b6e3271161b2958e94529c1693fde0c2bed71302
| 62
|
py
|
Python
|
leetcode-life/heap/heap.py
|
sunrong1990/PythonLife
|
ce288e4fcccc76cd647c80f47f83bf16117269ba
|
[
"MIT"
] | null | null | null |
leetcode-life/heap/heap.py
|
sunrong1990/PythonLife
|
ce288e4fcccc76cd647c80f47f83bf16117269ba
|
[
"MIT"
] | null | null | null |
leetcode-life/heap/heap.py
|
sunrong1990/PythonLife
|
ce288e4fcccc76cd647c80f47f83bf16117269ba
|
[
"MIT"
] | null | null | null |
'''
堆是特殊空间的有顺序的完全二叉树,root是最大值的是大顶堆,其他未小顶堆
堆:数据流中的第K大(小)问题
'''
| 12.4
| 37
| 0.758065
| 7
| 62
| 6.714286
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.064516
| 62
| 4
| 38
| 15.5
| 0.810345
| 0.854839
| 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
|
8e06ead42a853c8147c2850dd92423d5e650c7b8
| 119
|
py
|
Python
|
media/name_generator.py
|
anitapietrzyk112/Chmura
|
40eb5d1e66b36126f48e84d89951d38eaab4acd1
|
[
"MIT"
] | null | null | null |
media/name_generator.py
|
anitapietrzyk112/Chmura
|
40eb5d1e66b36126f48e84d89951d38eaab4acd1
|
[
"MIT"
] | 1
|
2021-04-30T20:34:18.000Z
|
2021-04-30T20:34:18.000Z
|
media/name_generator.py
|
anitapietrzyk112/Chmura
|
40eb5d1e66b36126f48e84d89951d38eaab4acd1
|
[
"MIT"
] | null | null | null |
import uuid
def generate_name(filename):
return "{}/{}/{}".format(
"uploads",
uuid.uuid4(),
filename
)
| 14.875
| 28
| 0.588235
| 12
| 119
| 5.75
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.010753
| 0.218487
| 119
| 7
| 29
| 17
| 0.731183
| 0
| 0
| 0
| 1
| 0
| 0.12605
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.142857
| false
| 0
| 0.142857
| 0.142857
| 0.428571
| 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
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 4
|
8e2cd1afeb61686fc249aa8bd0784d6e4ab836ce
| 119
|
py
|
Python
|
tests/unit/test_mock.py
|
jacksmith15/delfino
|
38972e0e0e610c2694462306250a51537a04b1e9
|
[
"MIT"
] | 5
|
2022-01-13T11:31:12.000Z
|
2022-02-05T15:30:04.000Z
|
tests/unit/test_mock.py
|
radeklat/toolbox
|
33537eb20fcf342cff315710cb6584dfbea0ea87
|
[
"MIT"
] | 9
|
2021-11-26T20:29:14.000Z
|
2022-01-28T15:31:09.000Z
|
tests/unit/test_mock.py
|
radeklat/rads-toolbox
|
33537eb20fcf342cff315710cb6584dfbea0ea87
|
[
"MIT"
] | 1
|
2022-01-21T13:35:24.000Z
|
2022-01-21T13:35:24.000Z
|
from delfino.main import main
class TestProject:
@staticmethod
def should_have_a_main():
assert main
| 14.875
| 29
| 0.705882
| 15
| 119
| 5.4
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.243697
| 119
| 7
| 30
| 17
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.2
| 1
| 0.2
| true
| 0
| 0.2
| 0
| 0.6
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
8e3483b572255efda141f53626823c8a620d0df4
| 68
|
py
|
Python
|
network_machine_learning_in_python/_build/jupyter_execute/foundations/ch1/examples-of-applications.py
|
Laknath1996/graph-stats-book
|
4b10c2f99dbfb5e05a72c98130f8c4338d7c9a21
|
[
"MIT"
] | 10
|
2020-09-15T19:09:53.000Z
|
2022-03-17T21:24:14.000Z
|
network_machine_learning_in_python/_build/jupyter_execute/foundations/ch1/examples-of-applications.py
|
Laknath1996/graph-stats-book
|
4b10c2f99dbfb5e05a72c98130f8c4338d7c9a21
|
[
"MIT"
] | 30
|
2020-09-15T19:15:11.000Z
|
2022-03-10T15:33:24.000Z
|
network_machine_learning_in_python/_build/jupyter_execute/foundations/ch1/examples-of-applications.py
|
Laknath1996/graph-stats-book
|
4b10c2f99dbfb5e05a72c98130f8c4338d7c9a21
|
[
"MIT"
] | 2
|
2021-04-12T05:08:00.000Z
|
2021-10-04T09:42:21.000Z
|
#!/usr/bin/env python
# coding: utf-8
# # Examples of applications
| 13.6
| 28
| 0.691176
| 10
| 68
| 4.7
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.017544
| 0.161765
| 68
| 4
| 29
| 17
| 0.807018
| 0.882353
| 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
|
f3e147a5e9e1425656d9dee76164433f63e3100e
| 99
|
py
|
Python
|
2020/Scripts/Python/hello_world_randy.py
|
SPal-14/ProjectMRU
|
cf7effdf7eb310da445a5ecbf958760c27706ca8
|
[
"CC0-1.0"
] | 9
|
2020-10-06T08:12:28.000Z
|
2020-10-24T20:32:46.000Z
|
2020/Scripts/Python/hello_world_randy.py
|
SPal-14/ProjectMRU
|
cf7effdf7eb310da445a5ecbf958760c27706ca8
|
[
"CC0-1.0"
] | 5
|
2020-10-09T04:54:43.000Z
|
2020-10-31T06:31:03.000Z
|
2020/Scripts/Python/hello_world_randy.py
|
SPal-14/ProjectMRU
|
cf7effdf7eb310da445a5ecbf958760c27706ca8
|
[
"CC0-1.0"
] | 33
|
2020-10-05T20:02:12.000Z
|
2020-10-31T05:05:48.000Z
|
# LANGUAGE: Python
# AUTHOR: randy
# GITHUB: https://github.com/randy1369
print('Hello, python!')
| 19.8
| 38
| 0.707071
| 12
| 99
| 5.833333
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.045977
| 0.121212
| 99
| 5
| 39
| 19.8
| 0.758621
| 0.686869
| 0
| 0
| 0
| 0
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
f3e5823efd4a42f7051f550ff515e2665e5302e0
| 488
|
py
|
Python
|
Modules.py
|
Cipalex/session3
|
fe0866db54d719687f5a89a71ddc17657c91089e
|
[
"MIT"
] | null | null | null |
Modules.py
|
Cipalex/session3
|
fe0866db54d719687f5a89a71ddc17657c91089e
|
[
"MIT"
] | null | null | null |
Modules.py
|
Cipalex/session3
|
fe0866db54d719687f5a89a71ddc17657c91089e
|
[
"MIT"
] | null | null | null |
"""Import modules """
import Module1
from Module1 import *
from Module1 import f
"""from .Module1 import f"""
f()
# When we have several modules with same function name, import using as
from Module1 import f as f1
from Module2 import f as f2
#from .Module1 import f
f1()
f2()
# A package is a directory which has file __init__.py. Inside this file we declare which modules are seen
# This file can also have code written
# An init file empty, means that all modules are seen outside
| 23.238095
| 105
| 0.747951
| 83
| 488
| 4.349398
| 0.506024
| 0.152355
| 0.235457
| 0.199446
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.027848
| 0.190574
| 488
| 21
| 106
| 23.238095
| 0.886076
| 0.633197
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.625
| 0
| 0.625
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
f3f770bc4918861d274003678a966d5732a06d24
| 604
|
py
|
Python
|
bot/platforms/vk/commands/start/utilities/keyboards.py
|
AiratK/kaishnik-bot
|
c42351611a40a04d78c8ae481b97339adbd321e5
|
[
"MIT"
] | 15
|
2019-04-30T14:37:15.000Z
|
2022-02-09T06:43:00.000Z
|
bot/platforms/vk/commands/start/utilities/keyboards.py
|
AiratK/kaishnik-bot
|
c42351611a40a04d78c8ae481b97339adbd321e5
|
[
"MIT"
] | 4
|
2019-03-18T06:09:38.000Z
|
2021-12-10T06:12:26.000Z
|
bot/platforms/vk/commands/start/utilities/keyboards.py
|
AiratK/kaishnik-bot
|
c42351611a40a04d78c8ae481b97339adbd321e5
|
[
"MIT"
] | 2
|
2020-04-12T10:31:52.000Z
|
2021-06-07T20:18:08.000Z
|
from vkwave.bots.utils.keyboards import Keyboard
from bot.platforms.vk.utilities.types import CommandOfVK
from bot.utilities.types import Command
def make_login() -> str:
make_login_keyboard: Keyboard = Keyboard(one_time=True, inline=True)
make_login_keyboard.add_text_button(text=CommandOfVK.LOGIN_NEW_USER.value, payload={ "callback": Command.LOGIN.value })
make_login_keyboard.add_row()
make_login_keyboard.add_text_button(text=CommandOfVK.LOGIN_VIA_TELEGRAM.value, payload={ "callback": Command.LOGIN_PLATFORM.value })
return make_login_keyboard.get_keyboard()
| 35.529412
| 136
| 0.784768
| 81
| 604
| 5.567901
| 0.444444
| 0.119734
| 0.18847
| 0.133038
| 0.363636
| 0.221729
| 0.221729
| 0.221729
| 0.221729
| 0
| 0
| 0
| 0.120861
| 604
| 16
| 137
| 37.75
| 0.849341
| 0
| 0
| 0
| 0
| 0
| 0.02649
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.111111
| true
| 0
| 0.333333
| 0
| 0.555556
| 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
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
6d1f299c0a7d5f471103b248db3c35b395acc8f4
| 1,784
|
py
|
Python
|
src/multiColorSpiral.py
|
janaSunrise/turtle-art
|
54bb90c061daf723d895e42e3ab03be25d388c1f
|
[
"MIT"
] | 2
|
2020-10-03T08:15:44.000Z
|
2020-10-27T13:43:28.000Z
|
src/multiColorSpiral.py
|
janaSunrise/turtle-art
|
54bb90c061daf723d895e42e3ab03be25d388c1f
|
[
"MIT"
] | 2
|
2020-11-11T13:58:24.000Z
|
2020-11-11T14:25:20.000Z
|
src/multiColorSpiral.py
|
janaSunrise/turtle-art
|
54bb90c061daf723d895e42e3ab03be25d388c1f
|
[
"MIT"
] | 1
|
2020-11-11T13:48:24.000Z
|
2020-11-11T13:48:24.000Z
|
import turtle
import math
import random
wn = turtle.Screen()
wn.bgcolor("black")
turtle1 = turtle.Turtle()
turtle1.speed(0)
turtle1.color("white")
rotate = int(360)
def drawCircles(t, size):
for i in range(10):
t.circle(size)
size = size - 4
def drawSpecial(t, size, repeat):
for i in range(repeat):
drawCircles(t, size)
t.right(360 / repeat)
drawSpecial(turtle1, 100, 10)
turtle2 = turtle.Turtle()
turtle2.speed(0)
turtle2.color("yellow")
rotate = int(90)
def drawCircles(t, size):
for i in range(4):
t.circle(size)
size = size - 10
def drawSpecial(t, size, repeat):
for i in range(repeat):
drawCircles(t, size)
t.right(360 / repeat)
drawSpecial(turtle2, 100, 10)
turtle3 = turtle.Turtle()
turtle3.speed(0)
turtle3.color("blue")
rotate = int(80)
def drawCircles(t, size):
for i in range(4):
t.circle(size)
size = size - 5
def drawSpecial(t, size, repeat):
for i in range(repeat):
drawCircles(t, size)
t.right(360 / repeat)
drawSpecial(turtle3, 100, 10)
turtle4 = turtle.Turtle()
turtle4.speed(0)
turtle4.color("orange")
rotate = int(90)
def drawCircles(t, size):
for i in range(4):
t.circle(size)
size = size - 19
def drawSpecial(t, size, repeat):
for i in range(repeat):
drawCircles(t, size)
t.right(360 / repeat)
drawSpecial(turtle4, 100, 10)
turtle4 = turtle.Turtle()
turtle4.speed(0)
turtle4.color("pink")
rotate = int(90)
def drawCircles(t, size):
for i in range(4):
t.circle(size)
size = size - 20
def drawSpecial(t, size, repeat):
for i in range(repeat):
drawCircles(t, size)
t.right(360 / repeat)
drawSpecial(turtle4, 100, 10)
wn.exitonclick()
| 17.320388
| 33
| 0.625
| 254
| 1,784
| 4.389764
| 0.173228
| 0.067265
| 0.143498
| 0.098655
| 0.734529
| 0.717489
| 0.717489
| 0.717489
| 0.690583
| 0.690583
| 0
| 0.066323
| 0.23935
| 1,784
| 102
| 34
| 17.490196
| 0.755343
| 0
| 0
| 0.605634
| 0
| 0
| 0.016816
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.140845
| false
| 0
| 0.042254
| 0
| 0.183099
| 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
|
6d2b5b0d3d12ef480b1acebdcee982443302452b
| 1,221
|
py
|
Python
|
src/controllers/Decorators.py
|
emarroquinb/grupo8
|
a5ea201c3d73761d534209c899f29a57b17738b5
|
[
"MIT"
] | 1
|
2021-09-25T00:18:34.000Z
|
2021-09-25T00:18:34.000Z
|
src/controllers/Decorators.py
|
emarrokin/grupo8
|
a5ea201c3d73761d534209c899f29a57b17738b5
|
[
"MIT"
] | null | null | null |
src/controllers/Decorators.py
|
emarrokin/grupo8
|
a5ea201c3d73761d534209c899f29a57b17738b5
|
[
"MIT"
] | 1
|
2021-10-13T00:49:39.000Z
|
2021-10-13T00:49:39.000Z
|
from flask import redirect, request, session, flash
from functools import wraps
class Autorize:
def login(f):
@wraps(f)
def wrap(*args, **kwargs):
if 'logged' in session:
return f(*args, **kwargs)
else:
flash('No ha podido acceder.')
return redirect('/login')
return wrap
def is_admin(f):
@wraps(f)
def wrap(*args, **kwargs):
if session['role'] == 1:
return f(*args, **kwargs)
else:
flash('Perfil no autorizado')
return redirect('/login')
return wrap
def is_professor(f):
@wraps(f)
def wrap(*args, **kwargs):
if session['role'] == 2:
return f(*args, **kwargs)
else:
flash('Perfil no autorizado')
return redirect('/login')
return wrap
def is_student(f):
@wraps(f)
def wrap(*args, **kwargs):
if session['role'] == 3:
return f(*args, **kwargs)
else:
flash('Perfil no autorizado')
return redirect('/login')
return wrap
| 26.543478
| 51
| 0.468468
| 125
| 1,221
| 4.552
| 0.288
| 0.140598
| 0.049209
| 0.070299
| 0.748682
| 0.748682
| 0.702988
| 0.643234
| 0.59754
| 0.59754
| 0
| 0.004184
| 0.412776
| 1,221
| 45
| 52
| 27.133333
| 0.7894
| 0
| 0
| 0.692308
| 0
| 0
| 0.100737
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.205128
| false
| 0
| 0.051282
| 0
| 0.589744
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 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
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
6d36f57fe9f16a80fe8acf3188e24da712bbd828
| 261
|
py
|
Python
|
odin_securities/queries/gets/symbols_for_vendor.py
|
JamesBrofos/Odin-Securities
|
a07d3a21bcd3f78513ef394d4e8b620b7ca7fad8
|
[
"MIT"
] | 13
|
2017-02-04T08:41:10.000Z
|
2020-06-09T12:43:09.000Z
|
odin_securities/queries/gets/symbols_for_vendor.py
|
JamesBrofos/Odin-Securities
|
a07d3a21bcd3f78513ef394d4e8b620b7ca7fad8
|
[
"MIT"
] | 1
|
2020-11-15T05:32:18.000Z
|
2020-11-15T05:32:18.000Z
|
odin_securities/queries/gets/symbols_for_vendor.py
|
JamesBrofos/Odin-Securities
|
a07d3a21bcd3f78513ef394d4e8b620b7ca7fad8
|
[
"MIT"
] | 9
|
2017-02-05T21:51:44.000Z
|
2020-03-23T10:55:11.000Z
|
import pandas as pd
from ...connection_cursor import conn
def symbols_for_vendor(vid):
return pd.read_sql("""
SELECT * FROM symbols AS s JOIN symbol_vendor AS sv ON s.id=sv.symbol_id
WHERE sv.vendor_id={}""".format(vid), conn, index_col="symbol")
| 29
| 76
| 0.720307
| 44
| 261
| 4.090909
| 0.613636
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.16092
| 261
| 8
| 77
| 32.625
| 0.821918
| 0
| 0
| 0
| 0
| 0
| 0.417625
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0.333333
| 0.166667
| 0.666667
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 4
|
6d4137b835c561011ceff1fea808629c1d59fbd2
| 114
|
py
|
Python
|
staff/serializers/__init__.py
|
The-Politico/django-politico-staff
|
119c1cd3ba70d18e733d4c0cb2d4dc2f89be5428
|
[
"MIT"
] | null | null | null |
staff/serializers/__init__.py
|
The-Politico/django-politico-staff
|
119c1cd3ba70d18e733d4c0cb2d4dc2f89be5428
|
[
"MIT"
] | 11
|
2019-02-04T02:18:27.000Z
|
2022-02-26T14:41:19.000Z
|
staff/serializers/__init__.py
|
The-Politico/django-politico-staff
|
119c1cd3ba70d18e733d4c0cb2d4dc2f89be5428
|
[
"MIT"
] | null | null | null |
# flake8: noqa
from .profile import ProfileSerializer, EditableProfileSerializer
from .user import UserSerializer
| 28.5
| 65
| 0.850877
| 11
| 114
| 8.818182
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.009804
| 0.105263
| 114
| 3
| 66
| 38
| 0.941176
| 0.105263
| 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
|
6d4d4c52e0b0ac4dd858855aeaa4c30b4a3f28fc
| 200
|
py
|
Python
|
product/context_processors.py
|
Medinaaz/Vodafone-Payment
|
a98397cd0f490dd2e63b009ead02f052f59ed992
|
[
"MIT"
] | null | null | null |
product/context_processors.py
|
Medinaaz/Vodafone-Payment
|
a98397cd0f490dd2e63b009ead02f052f59ed992
|
[
"MIT"
] | 9
|
2020-06-05T23:54:44.000Z
|
2022-01-13T02:44:28.000Z
|
product/context_processors.py
|
Medinaaz/Vodafone-Payment
|
a98397cd0f490dd2e63b009ead02f052f59ed992
|
[
"MIT"
] | null | null | null |
from product.models import ProductCategory
def product_categories(request):
"""All product categories."""
return {
"categories": ProductCategory.objects.all().order_by("rank")
}
| 22.222222
| 68
| 0.695
| 20
| 200
| 6.85
| 0.7
| 0.248175
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.18
| 200
| 8
| 69
| 25
| 0.835366
| 0.115
| 0
| 0
| 0
| 0
| 0.081871
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.2
| 0
| 0.6
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
6d60815f9b0fd3049b300e11f1bcc0e09452fe83
| 211
|
py
|
Python
|
tests/project_name/test_models.py
|
ohing504/django-drf-project-template
|
1944b0d76a986ebe777abb7f6e42446e5d160e29
|
[
"Unlicense",
"MIT"
] | 1
|
2021-04-10T22:06:23.000Z
|
2021-04-10T22:06:23.000Z
|
tests/project_name/test_models.py
|
ohing504/django-drf-project-template
|
1944b0d76a986ebe777abb7f6e42446e5d160e29
|
[
"Unlicense",
"MIT"
] | null | null | null |
tests/project_name/test_models.py
|
ohing504/django-drf-project-template
|
1944b0d76a986ebe777abb7f6e42446e5d160e29
|
[
"Unlicense",
"MIT"
] | null | null | null |
import pytest
from tests.factories.users import UserFactory
@pytest.mark.django_db
def test_factory_fixture():
user = UserFactory(username="Charles Dickens")
assert user.username == "Charles Dickens"
| 21.1
| 50
| 0.772512
| 26
| 211
| 6.153846
| 0.730769
| 0.1875
| 0.275
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.137441
| 211
| 9
| 51
| 23.444444
| 0.879121
| 0
| 0
| 0
| 0
| 0
| 0.14218
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 1
| 0.166667
| false
| 0
| 0.333333
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
6d61c724d4817276ac0a2fa759d1b4ab285a3c35
| 268
|
py
|
Python
|
snek/tests/__init__.py
|
timoguic/snek
|
cd1e29942dbb25508411860c519137aa7adbc417
|
[
"Apache-2.0"
] | 4
|
2019-12-26T23:34:29.000Z
|
2020-03-29T00:32:36.000Z
|
snek/tests/__init__.py
|
timoguic/snek
|
cd1e29942dbb25508411860c519137aa7adbc417
|
[
"Apache-2.0"
] | 1
|
2020-03-25T18:38:02.000Z
|
2020-04-16T18:07:25.000Z
|
snek/tests/__init__.py
|
timoguic/snek
|
cd1e29942dbb25508411860c519137aa7adbc417
|
[
"Apache-2.0"
] | 1
|
2020-03-25T16:46:22.000Z
|
2020-03-25T16:46:22.000Z
|
"""
snek.tests Package: Unit & integration tests for Snek.
"""
#-------------------------------------------------------------------------------
# Constants
#-------------------------------------------------------------------------------
MOCKS_FOLDER = './tests/mocks'
| 33.5
| 80
| 0.276119
| 13
| 268
| 5.615385
| 0.692308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.063433
| 268
| 7
| 81
| 38.285714
| 0.290837
| 0.83209
| 0
| 0
| 0
| 0
| 0.371429
| 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
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
edaab8a7227eb2030311246d88cfa842c5a2cc28
| 304
|
py
|
Python
|
cms/test_utils/project/customuserapp/models.py
|
360youlun/django-cms
|
bc1240fd46de4c04f3b5402be99a81728a4a324c
|
[
"BSD-3-Clause"
] | 1
|
2015-06-11T19:25:26.000Z
|
2015-06-11T19:25:26.000Z
|
cms/test_utils/project/customuserapp/models.py
|
damianmoore/django-cms
|
2d3e10a01e792ec7da5c1418811c1be5ac84e5e2
|
[
"BSD-3-Clause"
] | 5
|
2021-03-19T15:39:27.000Z
|
2021-09-08T02:47:21.000Z
|
cms/test_utils/project/customuserapp/models.py
|
Acidburn0zzz/django-cms
|
5a105a1c75eeb4c8a4c1c34301d93855e6724407
|
[
"BSD-3-Clause"
] | null | null | null |
# -*- coding: utf-8 -*-
from django.db import models
try:
from django.contrib.auth.models import AbstractUser
class User(AbstractUser):
my_new_field = models.IntegerField(null=True, blank=True, default=42)
except ImportError:
from django.contrib.auth.models import User # nopyflakes
| 33.777778
| 77
| 0.733553
| 40
| 304
| 5.525
| 0.65
| 0.135747
| 0.153846
| 0.190045
| 0.298643
| 0.298643
| 0
| 0
| 0
| 0
| 0
| 0.011811
| 0.164474
| 304
| 8
| 78
| 38
| 0.858268
| 0.105263
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.571429
| 0
| 0.857143
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
edd63906a404ad8c346076aa9f39ad9f1e8891c7
| 168
|
py
|
Python
|
aoc2020/day_15/part_2.py
|
en0/aoc2020
|
a2f41b909dffe1f366682b3d03fd5fbdbc924ec0
|
[
"MIT"
] | null | null | null |
aoc2020/day_15/part_2.py
|
en0/aoc2020
|
a2f41b909dffe1f366682b3d03fd5fbdbc924ec0
|
[
"MIT"
] | null | null | null |
aoc2020/day_15/part_2.py
|
en0/aoc2020
|
a2f41b909dffe1f366682b3d03fd5fbdbc924ec0
|
[
"MIT"
] | null | null | null |
from .part_1 import Solution as Part1
class Solution(Part1):
expected = 436
def solve(self) -> any:
# /shrug
return self.spoken_at(30000000)
| 16.8
| 39
| 0.636905
| 22
| 168
| 4.772727
| 0.863636
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.114754
| 0.27381
| 168
| 9
| 40
| 18.666667
| 0.745902
| 0.035714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.2
| 0.2
| 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
| 0
| 1
| 1
| 0
|
0
| 4
|
61052a4a0701288253eafe733de7600035753152
| 529
|
bzl
|
Python
|
python/repositories.bzl
|
ewianda/rules_python
|
6ed1fe53f8b36ecd404d98634d8e7411531cd6f8
|
[
"Apache-2.0"
] | 3
|
2020-11-30T15:35:37.000Z
|
2022-01-06T14:17:18.000Z
|
python/repositories.bzl
|
ewianda/rules_python
|
6ed1fe53f8b36ecd404d98634d8e7411531cd6f8
|
[
"Apache-2.0"
] | 54
|
2020-06-23T17:34:04.000Z
|
2022-03-31T02:04:06.000Z
|
python/repositories.bzl
|
ewianda/rules_python
|
6ed1fe53f8b36ecd404d98634d8e7411531cd6f8
|
[
"Apache-2.0"
] | 12
|
2020-07-14T23:59:57.000Z
|
2022-03-22T09:59:18.000Z
|
"""This file contains macros to be called during WORKSPACE evaluation.
For historic reasons, pip_repositories() is defined in //python:pip.bzl.
"""
def py_repositories():
"""Pull in dependencies needed to use the core Python rules."""
# At the moment this is a placeholder hook, in that it does not actually
# pull in any dependencies. Users should still call this function to make
# it less likely that they need to update their WORKSPACE files, in case
# this function is changed in the future.
pass
| 37.785714
| 77
| 0.731569
| 81
| 529
| 4.753086
| 0.703704
| 0.031169
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.206049
| 529
| 13
| 78
| 40.692308
| 0.916667
| 0.858223
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| true
| 0.5
| 0
| 0
| 0.5
| 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
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
b63a8ea0e2f6eda803635a133fc8daf092bf84d8
| 73
|
py
|
Python
|
odooreq/cli.py
|
destroT/odoo-requirements
|
bedf6b7f6729fa607dd112c1c9e98ab79ca89a3a
|
[
"MIT"
] | null | null | null |
odooreq/cli.py
|
destroT/odoo-requirements
|
bedf6b7f6729fa607dd112c1c9e98ab79ca89a3a
|
[
"MIT"
] | null | null | null |
odooreq/cli.py
|
destroT/odoo-requirements
|
bedf6b7f6729fa607dd112c1c9e98ab79ca89a3a
|
[
"MIT"
] | null | null | null |
import click
@click.command()
def cli():
click.echo('Hello, world')
| 14.6
| 30
| 0.657534
| 10
| 73
| 4.8
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.164384
| 73
| 5
| 30
| 14.6
| 0.786885
| 0
| 0
| 0
| 0
| 0
| 0.162162
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| true
| 0
| 0.25
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
b65912d777109a4f4dab1a632bba9aad52314e6c
| 115
|
py
|
Python
|
ecosystem/exception.py
|
ryanfmandelbaum/ecosystem
|
ca78ffe6dc4fd5589286d796a90655866a13b02a
|
[
"Apache-2.0"
] | 13
|
2021-08-11T06:58:01.000Z
|
2022-02-01T12:23:51.000Z
|
ecosystem/exception.py
|
ryanfmandelbaum/ecosystem
|
ca78ffe6dc4fd5589286d796a90655866a13b02a
|
[
"Apache-2.0"
] | 79
|
2021-08-09T20:57:33.000Z
|
2022-03-24T09:22:07.000Z
|
ecosystem/exception.py
|
mickahell/ecosystem
|
ae6879f13df22c98f26f242feddb049a69895ef0
|
[
"Apache-2.0"
] | 7
|
2021-08-16T21:25:10.000Z
|
2022-03-22T15:32:43.000Z
|
"""Ecosystem exception."""
class QiskitEcosystemException(Exception):
"""Exceptions for qiskit ecosystem."""
| 19.166667
| 42
| 0.730435
| 9
| 115
| 9.333333
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.121739
| 115
| 5
| 43
| 23
| 0.831683
| 0.46087
| 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
|
b66968129c7b0850bb069390fc7b71799d664eaa
| 27
|
py
|
Python
|
packages/snet_cli/snet/snet_cli/version.py
|
pratik-vii/snet-cli
|
2a19dbb345181eadf6308fd629dfae37148682fe
|
[
"MIT"
] | null | null | null |
packages/snet_cli/snet/snet_cli/version.py
|
pratik-vii/snet-cli
|
2a19dbb345181eadf6308fd629dfae37148682fe
|
[
"MIT"
] | null | null | null |
packages/snet_cli/snet/snet_cli/version.py
|
pratik-vii/snet-cli
|
2a19dbb345181eadf6308fd629dfae37148682fe
|
[
"MIT"
] | null | null | null |
__version__ = "sdk-v0.2.1"
| 13.5
| 26
| 0.666667
| 5
| 27
| 2.8
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.125
| 0.111111
| 27
| 1
| 27
| 27
| 0.458333
| 0
| 0
| 0
| 0
| 0
| 0.37037
| 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
|
b6728a0882de261f49d15bddbe563a5a906d23a7
| 71
|
py
|
Python
|
addons/jupyterhub/__init__.py
|
tsukaeru/RDM-osf.io
|
2dc3e539322b6110e51772f8bd25ebdeb8e12d0e
|
[
"Apache-2.0"
] | 11
|
2018-12-11T16:39:40.000Z
|
2022-02-26T09:51:32.000Z
|
addons/jupyterhub/__init__.py
|
tsukaeru/RDM-osf.io
|
2dc3e539322b6110e51772f8bd25ebdeb8e12d0e
|
[
"Apache-2.0"
] | 52
|
2018-04-13T05:03:21.000Z
|
2022-03-22T02:56:19.000Z
|
addons/jupyterhub/__init__.py
|
tsukaeru/RDM-osf.io
|
2dc3e539322b6110e51772f8bd25ebdeb8e12d0e
|
[
"Apache-2.0"
] | 16
|
2018-07-09T01:44:51.000Z
|
2021-06-30T01:57:16.000Z
|
default_app_config = 'addons.jupyterhub.apps.JupyterhubAddonAppConfig'
| 35.5
| 70
| 0.873239
| 7
| 71
| 8.571429
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.042254
| 71
| 1
| 71
| 71
| 0.882353
| 0
| 0
| 0
| 0
| 0
| 0.661972
| 0.661972
| 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
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
b6b0798dafa3bfaeca3ec1927a5a0fc516ed98c8
| 25
|
py
|
Python
|
src/ansys/templates/python/pyace_flask/{{cookiecutter.__project_name_slug}}/src/blueprints/__init__.py
|
pyansys/pyansys-templates
|
dbbcc7e89c1014bb68e065bf70af30c10ecfadb6
|
[
"MIT"
] | null | null | null |
src/ansys/templates/python/pyace_flask/{{cookiecutter.__project_name_slug}}/src/blueprints/__init__.py
|
pyansys/pyansys-templates
|
dbbcc7e89c1014bb68e065bf70af30c10ecfadb6
|
[
"MIT"
] | 16
|
2022-03-18T09:17:10.000Z
|
2022-03-28T06:52:05.000Z
|
src/ansys/templates/python/pyace_flask/{{cookiecutter.__project_name_slug}}/src/blueprints/__init__.py
|
pyansys/ansys-templates
|
f7def562e23c5c8db51c17d56a7c34f62f77077d
|
[
"MIT"
] | 1
|
2022-03-16T18:23:12.000Z
|
2022-03-16T18:23:12.000Z
|
"""Blueprints module."""
| 12.5
| 24
| 0.64
| 2
| 25
| 8
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.08
| 25
| 1
| 25
| 25
| 0.695652
| 0.72
| 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
|
fcd3d5739ec6eac1e1b6d8b69879aa0efa6c2a80
| 47
|
py
|
Python
|
first.py
|
rzvjerkovic/rl_test
|
68ae1693dce6489aef437f04471734781db8ab74
|
[
"MIT"
] | null | null | null |
first.py
|
rzvjerkovic/rl_test
|
68ae1693dce6489aef437f04471734781db8ab74
|
[
"MIT"
] | null | null | null |
first.py
|
rzvjerkovic/rl_test
|
68ae1693dce6489aef437f04471734781db8ab74
|
[
"MIT"
] | null | null | null |
# Merge files by ID
def merge:
def sort:
| 7.833333
| 19
| 0.617021
| 8
| 47
| 3.625
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.319149
| 47
| 6
| 20
| 7.833333
| 0.90625
| 0.361702
| 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
|
fcdabd5ee700b36555846beb8bfb378da4b49412
| 217
|
py
|
Python
|
demoapp/views.py
|
damsonn/django-docker-compose
|
8ca8ac95235e03391e1d5130bd2c61b62df9ce79
|
[
"MIT"
] | 32
|
2015-10-29T17:32:08.000Z
|
2020-02-22T07:44:22.000Z
|
demoapp/views.py
|
damsonn/django-docker-compose
|
8ca8ac95235e03391e1d5130bd2c61b62df9ce79
|
[
"MIT"
] | null | null | null |
demoapp/views.py
|
damsonn/django-docker-compose
|
8ca8ac95235e03391e1d5130bd2c61b62df9ce79
|
[
"MIT"
] | 10
|
2016-01-06T18:16:39.000Z
|
2021-04-05T12:09:08.000Z
|
from django.shortcuts import render
from django.http import HttpResponse
from demoapp.tasks import hello
def Hello(request):
greeting = 'Hello, World!'
hello.delay(greeting)
return HttpResponse(greeting)
| 24.111111
| 36
| 0.769585
| 27
| 217
| 6.185185
| 0.592593
| 0.11976
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.156682
| 217
| 8
| 37
| 27.125
| 0.912568
| 0
| 0
| 0
| 0
| 0
| 0.059908
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.142857
| false
| 0
| 0.428571
| 0
| 0.714286
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
fcfc85fd9b015d61126eff2d7e9160fe8151ca9b
| 299
|
py
|
Python
|
day04/test_part1.py
|
Olson3R/aoc-2019-py
|
3abf686ec2b2784edf618322576692846f5a00e7
|
[
"MIT"
] | null | null | null |
day04/test_part1.py
|
Olson3R/aoc-2019-py
|
3abf686ec2b2784edf618322576692846f5a00e7
|
[
"MIT"
] | null | null | null |
day04/test_part1.py
|
Olson3R/aoc-2019-py
|
3abf686ec2b2784edf618322576692846f5a00e7
|
[
"MIT"
] | null | null | null |
from part1 import test_num
def test_test_num():
assert test_num(111111) == True, "Expected 111111 to pass"
assert test_num(223450) == False, "Expected 223450 to fail"
assert test_num(123789) == False, "Expected 123789 to fail"
print("Passed!")
if __name__ == "__main__":
test_test_num()
| 27.181818
| 61
| 0.719064
| 44
| 299
| 4.522727
| 0.477273
| 0.211055
| 0.19598
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.14741
| 0.160535
| 299
| 10
| 62
| 29.9
| 0.645418
| 0
| 0
| 0
| 0
| 0
| 0.280936
| 0
| 0
| 0
| 0
| 0
| 0.375
| 1
| 0.125
| true
| 0.25
| 0.125
| 0
| 0.25
| 0.125
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
1e20f89878dd38764d2b9694d9b793b3999b16d7
| 302
|
py
|
Python
|
xenonpy/model/training/__init__.py
|
mori0711/XenonPy
|
e36ca0ea112b45ee629cd980c88e80cd6c96c514
|
[
"BSD-3-Clause"
] | 93
|
2018-02-11T23:43:47.000Z
|
2022-03-11T02:40:11.000Z
|
xenonpy/model/training/__init__.py
|
mori0711/XenonPy
|
e36ca0ea112b45ee629cd980c88e80cd6c96c514
|
[
"BSD-3-Clause"
] | 192
|
2018-04-20T04:32:12.000Z
|
2022-03-24T05:59:18.000Z
|
xenonpy/model/training/__init__.py
|
mori0711/XenonPy
|
e36ca0ea112b45ee629cd980c88e80cd6c96c514
|
[
"BSD-3-Clause"
] | 51
|
2018-01-18T08:08:55.000Z
|
2022-03-01T05:52:22.000Z
|
# Copyright (c) 2021. TsumiNa. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
from .checker import *
from .clip_grad import *
from .loss import *
from .lr_scheduler import *
from .optimizer import *
from .trainer import *
| 27.454545
| 53
| 0.738411
| 47
| 302
| 4.702128
| 0.765957
| 0.226244
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.016327
| 0.188742
| 302
| 10
| 54
| 30.2
| 0.885714
| 0.493377
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
1eb73f624a4086ee4d7fcde0e4b7d748a70438ce
| 181
|
py
|
Python
|
tools/parse_filename.py
|
RoboJackets/concourse-pipeline-library
|
6aacce7b5f4eaa9aa86512e1b886a9c6c4c6d917
|
[
"MIT"
] | null | null | null |
tools/parse_filename.py
|
RoboJackets/concourse-pipeline-library
|
6aacce7b5f4eaa9aa86512e1b886a9c6c4c6d917
|
[
"MIT"
] | 1
|
2020-08-17T19:35:50.000Z
|
2020-08-29T00:14:54.000Z
|
tools/parse_filename.py
|
RoboJackets/concourse-pipeline-library
|
6aacce7b5f4eaa9aa86512e1b886a9c6c4c6d917
|
[
"MIT"
] | null | null | null |
#/bin/python3
from re import fullmatch
from sys import stdin, argv
print(fullmatch(r"pipelines/(?P<team>[a-z-]+)/(?P<pipeline>[a-z-]+).yml", stdin.read().strip()).group(argv[1]))
| 25.857143
| 111
| 0.674033
| 30
| 181
| 4.066667
| 0.733333
| 0.032787
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.011976
| 0.077348
| 181
| 6
| 112
| 30.166667
| 0.718563
| 0.066298
| 0
| 0
| 0
| 0
| 0.315476
| 0.315476
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0.333333
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
1ecc9acb0b7972834e8b1623a80680cf14e42ad0
| 498
|
bzl
|
Python
|
deps.bzl
|
parisholley/buildbuddy-toolchain
|
f0ba44d137eec3af0fa80b3ca1def0d739d82005
|
[
"MIT"
] | 5
|
2020-09-01T01:03:04.000Z
|
2021-11-21T13:39:44.000Z
|
deps.bzl
|
parisholley/buildbuddy-toolchain
|
f0ba44d137eec3af0fa80b3ca1def0d739d82005
|
[
"MIT"
] | 1
|
2020-09-10T17:41:46.000Z
|
2020-09-10T17:45:01.000Z
|
deps.bzl
|
parisholley/buildbuddy-toolchain
|
f0ba44d137eec3af0fa80b3ca1def0d739d82005
|
[
"MIT"
] | 4
|
2020-09-10T14:15:47.000Z
|
2021-09-22T11:37:36.000Z
|
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
def buildbuddy_deps():
maybe(
http_archive,
name = "rules_cc",
sha256 = "b6f34b3261ec02f85dbc5a8bdc9414ce548e1f5f67e000d7069571799cb88b25",
strip_prefix = "rules_cc-726dd8157557f1456b3656e26ab21a1646653405",
urls = ["https://github.com/bazelbuild/rules_cc/archive/726dd8157557f1456b3656e26ab21a1646653405.tar.gz"],
)
| 41.5
| 114
| 0.732932
| 48
| 498
| 7.375
| 0.604167
| 0.059322
| 0.079096
| 0.107345
| 0.180791
| 0.180791
| 0.180791
| 0
| 0
| 0
| 0
| 0.252336
| 0.140562
| 498
| 11
| 115
| 45.272727
| 0.574766
| 0
| 0
| 0
| 0
| 0
| 0.644578
| 0.405622
| 0
| 0
| 0
| 0
| 0
| 1
| 0.1
| true
| 0
| 0
| 0
| 0.1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
949117e5adc19e948508452b58144cc5b051893c
| 4,180
|
py
|
Python
|
lighter/functional/metric.py
|
Xpitfire/lighter
|
3ef21b1c6c6a19f6535e6b16b95bc52e2aaf05a3
|
[
"BSD-3-Clause"
] | 2
|
2019-11-26T09:07:20.000Z
|
2021-05-27T11:29:09.000Z
|
lighter/functional/metric.py
|
Xpitfire/lighter
|
3ef21b1c6c6a19f6535e6b16b95bc52e2aaf05a3
|
[
"BSD-3-Clause"
] | null | null | null |
lighter/functional/metric.py
|
Xpitfire/lighter
|
3ef21b1c6c6a19f6535e6b16b95bc52e2aaf05a3
|
[
"BSD-3-Clause"
] | 1
|
2021-05-27T11:31:23.000Z
|
2021-05-27T11:31:23.000Z
|
def TP(target, prediction):
"""
True positives.
:param target: target value
:param prediction: prediction value
:return:
"""
return (target.float() * prediction.float().round()).sum()
def TN(target, prediction):
"""
True negatives.
:param target: target value
:param prediction: prediction value
:return:
"""
return ((target == 0).float() * (prediction.float().round() == 0).float()).sum()
def FP(target, prediction):
"""
False positives.
:param target: target value
:param prediction: prediction value
:return:
"""
return ((target == 0).float() * prediction.float().round()).sum()
def FN(target, prediction):
"""
False negatives.
:param target: target value
:param prediction: prediction value
:return:
"""
return (target.float() * (prediction.float().round() == 0).float()).sum()
def TPR(target, prediction, eps=1e-7):
"""
True positive rate metric.
:param target: target value
:param prediction: prediction value
:param eps: epsilon to avoid zero division
:return:
"""
tp = TP(target, prediction)
fn = FN(target, prediction)
s = tp + fn + eps
return tp / s
def TNR(target, prediction, eps=1e-7):
"""
True negative rate metric.
:param target: target value
:param prediction: prediction value
:param eps: epsilon to avoid zero division
:return:
"""
tn = TN(target, prediction)
fp = FP(target, prediction)
s = (tn + fp + eps)
assert (s > 0)
return tn / s
def FPR(target, prediction, eps=1e-7):
"""
False positive rate metric.
:param target: target value
:param prediction: prediction value
:param eps: epsilon to avoid zero division
:return:
"""
fp = FP(target, prediction)
tn = TN(target, prediction)
s = fp + tn + eps
assert (s > 0)
return fp / s
def FNR(target, prediction, eps=1e-7):
"""
False negative rate metric.
:param target: target value
:param prediction: prediction value
:param eps: epsilon to avoid zero division
:return:
"""
fn = FN(target, prediction)
tp = TP(target, prediction)
s = fn + tp + eps
assert (s > 0)
return fn / s
def ACC(target, prediction, eps=1e-7):
"""
Accuracy metric.
:param target: target value
:param prediction: prediction value
:param eps: epsilon to avoid zero division
:return:
"""
tp = TP(target, prediction)
tn = TN(target, prediction)
p = target.sum().float()
n = (target == 0).sum().float()
s = p + n + eps
assert (s > 0)
return (tp + tn) / s
def BACC(target, prediction, eps=1e-7):
"""
Balanced accuracy metric.
:param target: target value
:param prediction: prediction value
:param eps: epsilon to avoid zero division
:return:
"""
tp = TP(target, prediction)
tn = TN(target, prediction)
p = target.sum().float()
n = (target == 0).sum().float()
s = (p + eps) + tn / (n + eps)
assert (s > 0)
return 0.5 * (tp / s)
def precision(target, prediction, eps=1e-7):
"""
Precision metric.
:param target: target value
:param prediction: prediction value
:param eps: epsilon to avoid zero division
:return:
"""
tp = TP(target, prediction)
fp = FP(target, prediction)
s = (tp + fp + eps)
assert (s > 0)
return tp / s
def recall(target, prediction, eps=1e-7):
"""
Recall metric.
:param target: target value
:param prediction: prediction value
:param eps: epsilon to avoid zero division
:return:
"""
tp = TP(target, prediction)
fn = FN(target, prediction)
s = (tp + fn + eps)
assert (s > 0)
return tp / s
def f1_score(target, prediction, eps=1e-7):
"""
F1-score metric.
:param target: target value
:param prediction: prediction value
:param eps: epsilon to avoid zero division
:return:
"""
precision_ = precision(target, prediction)
recall_ = recall(target, prediction)
n = (precision_ * recall_)
s = (precision_ + recall_ + eps)
assert (s > 0)
return 2 * (n / s)
| 23.483146
| 84
| 0.599043
| 516
| 4,180
| 4.839147
| 0.093023
| 0.198638
| 0.088506
| 0.114537
| 0.851021
| 0.786544
| 0.701241
| 0.678014
| 0.651181
| 0.651181
| 0
| 0.012135
| 0.270574
| 4,180
| 177
| 85
| 23.615819
| 0.806822
| 0.383732
| 0
| 0.469697
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.121212
| 1
| 0.19697
| false
| 0
| 0
| 0
| 0.393939
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
94b000441bbd587d46c33ca8b10113d243fcf567
| 462
|
py
|
Python
|
no_cloud/remote/base.py
|
saalaa/no-cloud
|
69f53ae8194850b7f307315fee90089b34728204
|
[
"BSD-3-Clause"
] | null | null | null |
no_cloud/remote/base.py
|
saalaa/no-cloud
|
69f53ae8194850b7f307315fee90089b34728204
|
[
"BSD-3-Clause"
] | 2
|
2021-03-25T21:45:20.000Z
|
2021-03-31T18:43:22.000Z
|
no_cloud/remote/base.py
|
saalaa/no-cloud
|
69f53ae8194850b7f307315fee90089b34728204
|
[
"BSD-3-Clause"
] | null | null | null |
# Copyright (C) 2016 Benoit Myard <myardbenoit@gmail.com>
# Released under the terms of the BSD license.
class BaseRemoteStorage(object):
def __init__(self, config, root):
self.config = config
self.root = root
def __enter__(self):
raise NotImplementedError
def __exit__(self, *args):
pass
def push(self, filename):
raise NotImplementedError
def pull(self, path):
raise NotImplementedError
| 23.1
| 57
| 0.662338
| 52
| 462
| 5.653846
| 0.634615
| 0.244898
| 0.183673
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.011662
| 0.257576
| 462
| 19
| 58
| 24.315789
| 0.845481
| 0.21645
| 0
| 0.25
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.416667
| false
| 0.083333
| 0
| 0
| 0.5
| 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
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
94db52eef502867e35479c93d70c82251e9b881d
| 202
|
py
|
Python
|
runway/core/components/__init__.py
|
troyready/runway
|
4fd299961a4b73df39e14f4f19a7236f7be17dd8
|
[
"Apache-2.0"
] | null | null | null |
runway/core/components/__init__.py
|
troyready/runway
|
4fd299961a4b73df39e14f4f19a7236f7be17dd8
|
[
"Apache-2.0"
] | null | null | null |
runway/core/components/__init__.py
|
troyready/runway
|
4fd299961a4b73df39e14f4f19a7236f7be17dd8
|
[
"Apache-2.0"
] | null | null | null |
"""Core Runway components."""
from ._deploy_environment import DeployEnvironment
from ._deployment import Deployment
from ._module import Module
__all__ = ["DeployEnvironment", "Deployment", "Module"]
| 28.857143
| 55
| 0.792079
| 20
| 202
| 7.6
| 0.55
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.10396
| 202
| 6
| 56
| 33.666667
| 0.839779
| 0.113861
| 0
| 0
| 0
| 0
| 0.190751
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.75
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
a20a7a67d6f4936ce6eed575e7e1390aed9ba3a7
| 77
|
py
|
Python
|
ceph_medic/checks/__init__.py
|
gabriellasroman/ceph-medic
|
50f72b1640a0c26d56a2974861ff62e6738b9b27
|
[
"MIT"
] | 21
|
2017-06-27T15:20:33.000Z
|
2021-09-30T21:50:31.000Z
|
ceph_medic/checks/__init__.py
|
gabriellasroman/ceph-medic
|
50f72b1640a0c26d56a2974861ff62e6738b9b27
|
[
"MIT"
] | 86
|
2017-06-21T20:10:13.000Z
|
2021-10-30T00:04:05.000Z
|
ceph_medic/checks/__init__.py
|
gabriellasroman/ceph-medic
|
50f72b1640a0c26d56a2974861ff62e6738b9b27
|
[
"MIT"
] | 22
|
2017-08-07T14:34:39.000Z
|
2021-04-07T05:15:26.000Z
|
from . import osds, mons, clients, rgws, mdss, common, mgrs, cluster # noqa
| 38.5
| 76
| 0.701299
| 11
| 77
| 4.909091
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.181818
| 77
| 1
| 77
| 77
| 0.857143
| 0.051948
| 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
|
a2268d86699240e374ecf7d0a58ed2741aeb2829
| 114
|
py
|
Python
|
RoomControl/RoomControl/sequence/Sequence.py
|
apuly/RoomControl
|
b9f037377a89a6f9363fdbe8118f3475e6eada24
|
[
"Apache-2.0"
] | null | null | null |
RoomControl/RoomControl/sequence/Sequence.py
|
apuly/RoomControl
|
b9f037377a89a6f9363fdbe8118f3475e6eada24
|
[
"Apache-2.0"
] | null | null | null |
RoomControl/RoomControl/sequence/Sequence.py
|
apuly/RoomControl
|
b9f037377a89a6f9363fdbe8118f3475e6eada24
|
[
"Apache-2.0"
] | null | null | null |
"""
Stuff
"""
class Sequence(object):
def __init__(self, *_seq):
self.seq = tuple(_seq)
pass;
| 9.5
| 30
| 0.552632
| 13
| 114
| 4.384615
| 0.769231
| 0.245614
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.280702
| 114
| 12
| 31
| 9.5
| 0.695122
| 0.04386
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0.25
| 0
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
bfb133e55d307472baf05cf0bdc2c27fb1c62258
| 51
|
py
|
Python
|
aflux_assurance_server/config/local.py
|
AfluxSystems/aflux-assurance-server
|
a703a8cd412cb761e51262d73aface4f59576427
|
[
"0BSD"
] | null | null | null |
aflux_assurance_server/config/local.py
|
AfluxSystems/aflux-assurance-server
|
a703a8cd412cb761e51262d73aface4f59576427
|
[
"0BSD"
] | null | null | null |
aflux_assurance_server/config/local.py
|
AfluxSystems/aflux-assurance-server
|
a703a8cd412cb761e51262d73aface4f59576427
|
[
"0BSD"
] | null | null | null |
from aflux_assurance_server.config.common import *
| 25.5
| 50
| 0.862745
| 7
| 51
| 6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.078431
| 51
| 1
| 51
| 51
| 0.893617
| 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
|
bfbdee073404156fd770f757eb0d4828728acd59
| 242
|
py
|
Python
|
pmfp/entrypoint/schema/__init__.py
|
Python-Tools/pmfp
|
832273890eec08e84f9c68d03f3316b2c8139133
|
[
"MIT"
] | 4
|
2017-09-15T03:38:56.000Z
|
2019-12-16T02:03:14.000Z
|
pmfp/entrypoint/schema/__init__.py
|
Python-Tools/pmfp
|
832273890eec08e84f9c68d03f3316b2c8139133
|
[
"MIT"
] | 1
|
2021-04-27T10:51:42.000Z
|
2021-04-27T10:51:42.000Z
|
pmfp/entrypoint/schema/__init__.py
|
Python-Tools/pmfp
|
832273890eec08e84f9c68d03f3316b2c8139133
|
[
"MIT"
] | null | null | null |
from .check import check_schema
from .clone import clone_schema
from .move import move_schema
from .new import new_schema
from .test_ import test_schema
__all__ = ["check_schema", "clone_schema", "move_schema", "new_schema", "test_schema"]
| 26.888889
| 86
| 0.789256
| 36
| 242
| 4.888889
| 0.25
| 0.227273
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.119835
| 242
| 8
| 87
| 30.25
| 0.826291
| 0
| 0
| 0
| 0
| 0
| 0.231405
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.833333
| 0
| 0.833333
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
44c03f2d2cbca7f7b37b3077aa6f31e026e0420f
| 93
|
py
|
Python
|
broadcast/apps.py
|
Shivansh1805/MY-RIDE
|
e689fbf90380220b374704a07d32e68af7ea71da
|
[
"MIT"
] | 52
|
2016-07-14T08:08:25.000Z
|
2022-01-05T12:22:57.000Z
|
broadcast/apps.py
|
Shivansh1805/MY-RIDE
|
e689fbf90380220b374704a07d32e68af7ea71da
|
[
"MIT"
] | 8
|
2017-08-30T21:00:40.000Z
|
2021-09-07T23:50:54.000Z
|
broadcast/apps.py
|
Shivansh1805/MY-RIDE
|
e689fbf90380220b374704a07d32e68af7ea71da
|
[
"MIT"
] | 33
|
2016-11-02T23:31:38.000Z
|
2022-02-27T16:41:04.000Z
|
from django.apps import AppConfig
class BroadcastConfig(AppConfig):
name = 'broadcast'
| 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
|
44de97a5ad805fb510e4f7f3c971e7c44fb91acf
| 13
|
py
|
Python
|
karateclub/graph_embedding/tester.py
|
Laeyoung/ainized-karateclub
|
26d8e10d9cb15a7ae6bf43db6ec338a6ae4f9aa0
|
[
"MIT"
] | null | null | null |
karateclub/graph_embedding/tester.py
|
Laeyoung/ainized-karateclub
|
26d8e10d9cb15a7ae6bf43db6ec338a6ae4f9aa0
|
[
"MIT"
] | null | null | null |
karateclub/graph_embedding/tester.py
|
Laeyoung/ainized-karateclub
|
26d8e10d9cb15a7ae6bf43db6ec338a6ae4f9aa0
|
[
"MIT"
] | 1
|
2020-01-08T07:38:37.000Z
|
2020-01-08T07:38:37.000Z
|
"""tester"""
| 6.5
| 12
| 0.461538
| 1
| 13
| 6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.076923
| 13
| 1
| 13
| 13
| 0.5
| 0.461538
| 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
|
44df91ea189fc4350b24c36853a2b5c71c8bf337
| 123
|
py
|
Python
|
hdfs_datanode/datadog_checks/hdfs_datanode/__init__.py
|
michael-go/integrations-core
|
b094befc63a479e6496ad0d0c7bb340be63699fc
|
[
"BSD-3-Clause"
] | null | null | null |
hdfs_datanode/datadog_checks/hdfs_datanode/__init__.py
|
michael-go/integrations-core
|
b094befc63a479e6496ad0d0c7bb340be63699fc
|
[
"BSD-3-Clause"
] | null | null | null |
hdfs_datanode/datadog_checks/hdfs_datanode/__init__.py
|
michael-go/integrations-core
|
b094befc63a479e6496ad0d0c7bb340be63699fc
|
[
"BSD-3-Clause"
] | null | null | null |
from . import hdfs_datanode
HDFSDataNode = hdfs_datanode.HDFSDataNode
__version__ = "1.1.0"
__all__ = ['hdfs_datanode']
| 15.375
| 41
| 0.764228
| 15
| 123
| 5.533333
| 0.6
| 0.433735
| 0.578313
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.028037
| 0.130081
| 123
| 7
| 42
| 17.571429
| 0.747664
| 0
| 0
| 0
| 0
| 0
| 0.146341
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.25
| 0
| 0.25
| 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
|
44e1981e458a78d4fb9b2a21971b93d44dfe76d5
| 393
|
py
|
Python
|
sbr_ui/routes/__init__.py
|
ajorpheus/sbr-ui
|
ea79ace6abb0b2c4aea8c4040c7134da9b873a4c
|
[
"MIT"
] | 1
|
2019-01-11T12:34:16.000Z
|
2019-01-11T12:34:16.000Z
|
sbr_ui/routes/__init__.py
|
ajorpheus/sbr-ui
|
ea79ace6abb0b2c4aea8c4040c7134da9b873a4c
|
[
"MIT"
] | 2
|
2017-10-11T09:40:12.000Z
|
2018-10-17T14:06:19.000Z
|
sbr_ui/routes/__init__.py
|
ajorpheus/sbr-ui
|
ea79ace6abb0b2c4aea8c4040c7134da9b873a4c
|
[
"MIT"
] | 4
|
2017-10-19T09:24:57.000Z
|
2021-04-11T08:10:09.000Z
|
from sbr_ui import app
from sbr_ui.routes.authentication import authentication_bp
from sbr_ui.routes.errors import error_bp
from sbr_ui.routes.unit_pages import search_bp, unit_pages_bp
app.register_blueprint(authentication_bp, url_prefix='/')
app.register_blueprint(error_bp, url_prefix='/Error')
app.register_blueprint(search_bp)
app.register_blueprint(unit_pages_bp, url_prefix='/Search')
| 39.3
| 61
| 0.849873
| 62
| 393
| 5.032258
| 0.274194
| 0.089744
| 0.115385
| 0.144231
| 0.108974
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.063613
| 393
| 9
| 62
| 43.666667
| 0.847826
| 0
| 0
| 0
| 0
| 0
| 0.035623
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0.5
| 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
|
44ff854b88f7a6762b78277cb0380232da5da4a2
| 35
|
py
|
Python
|
lib/python3.6/reprlib.py
|
trikyas/django-project
|
d258d8e0d40def6c382aadde112de0f58b7fac6c
|
[
"MIT"
] | 1
|
2021-02-08T10:04:39.000Z
|
2021-02-08T10:04:39.000Z
|
lib/python3.6/reprlib.py
|
trikyas/django-project
|
d258d8e0d40def6c382aadde112de0f58b7fac6c
|
[
"MIT"
] | 7
|
2020-02-11T23:52:31.000Z
|
2022-02-10T09:10:58.000Z
|
lib/python3.6/reprlib.py
|
trikyas/django-project
|
d258d8e0d40def6c382aadde112de0f58b7fac6c
|
[
"MIT"
] | 1
|
2019-03-26T00:23:02.000Z
|
2019-03-26T00:23:02.000Z
|
/anaconda3/lib/python3.6/reprlib.py
| 35
| 35
| 0.828571
| 6
| 35
| 4.833333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.085714
| 0
| 35
| 1
| 35
| 35
| 0.742857
| 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
|
781043f2727fbdf44c80f3410481da403f37cea6
| 1,636
|
py
|
Python
|
test/test_parsers.py
|
csb-comren/dbinterfacer
|
b69b5885e092ca5d913437642886e03cfe93504f
|
[
"MIT"
] | null | null | null |
test/test_parsers.py
|
csb-comren/dbinterfacer
|
b69b5885e092ca5d913437642886e03cfe93504f
|
[
"MIT"
] | null | null | null |
test/test_parsers.py
|
csb-comren/dbinterfacer
|
b69b5885e092ca5d913437642886e03cfe93504f
|
[
"MIT"
] | null | null | null |
import unittest
from dbinterfacer.uploaders import CidcoUploader, GeoJsonUploader, NmeaUploader
from .secret import local_url
class TestParsing(unittest.TestCase):
def test_parse_json(self):
f = open('test/data/geojson_small.json', 'rb')
u = GeoJsonUploader(local_url, 'simple depth')
u.parse_file(f)
f.close()
self.assertEqual(len(u.points), 610)
self.assertAlmostEqual(float(u.max_lon), -64.295992)
self.assertAlmostEqual(float(u.min_lon), -65.322957)
self.assertAlmostEqual(float(u.max_lat), 44.170195)
self.assertAlmostEqual(float(u.min_lat), 43.757667)
def test_parse_nmea(self):
f = open('test/data/NMEA.txt', 'rb')
u = NmeaUploader(local_url, 'simple depth')
u.parse_file(f)
f.close()
self.assertEqual(len(u.points), 980)
self.assertAlmostEqual(float(u.max_lon), -53.1323188779000023487)
self.assertAlmostEqual(float(u.min_lon), -53.134679757603332191706)
self.assertAlmostEqual(float(u.max_lat), 47.3900974159199966209143)
self.assertAlmostEqual(float(u.min_lat), 47.386470099866665094623)
def test_parse_cidco(self):
f = open('test/data/soundingExport.txt', 'rb')
u = CidcoUploader(local_url, 'cidco processed')
u.parse_file(f)
f.close()
self.assertEqual(len(u.points), 883)
self.assertAlmostEqual(float(u.max_lon), -53.1323084)
self.assertAlmostEqual(float(u.min_lon), -53.1346818)
self.assertAlmostEqual(float(u.max_lat), 47.3900793)
self.assertAlmostEqual(float(u.min_lat), 47.3864477)
| 36.355556
| 79
| 0.676039
| 205
| 1,636
| 5.268293
| 0.317073
| 0.233333
| 0.288889
| 0.3
| 0.580556
| 0.533333
| 0.411111
| 0.151852
| 0.151852
| 0.151852
| 0
| 0.127757
| 0.19621
| 1,636
| 44
| 80
| 37.181818
| 0.693536
| 0
| 0
| 0.176471
| 0
| 0
| 0.072738
| 0.03423
| 0
| 0
| 0
| 0
| 0.441176
| 1
| 0.088235
| false
| 0
| 0.088235
| 0
| 0.205882
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
78451d448d841f682168c6b48ac70dce8ade58b2
| 55
|
py
|
Python
|
t1.py
|
alvaroiramirez/SensorTile
|
ccb0c1261c9e97a1081e26d86bf77ee3070873b8
|
[
"MIT"
] | 1
|
2021-12-16T05:26:52.000Z
|
2021-12-16T05:26:52.000Z
|
t1.py
|
alvaroiramirez/SensorTile
|
ccb0c1261c9e97a1081e26d86bf77ee3070873b8
|
[
"MIT"
] | null | null | null |
t1.py
|
alvaroiramirez/SensorTile
|
ccb0c1261c9e97a1081e26d86bf77ee3070873b8
|
[
"MIT"
] | null | null | null |
def f(a,b,c):
return "Good!"
t = [1,2,3]
print(f(*t))
| 13.75
| 16
| 0.509091
| 14
| 55
| 2
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.065217
| 0.163636
| 55
| 4
| 17
| 13.75
| 0.543478
| 0
| 0
| 0
| 0
| 0
| 0.089286
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 0.25
| 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
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 4
|
784ec48b5823051102e7b407d092081163c1fc2d
| 740
|
py
|
Python
|
test/test_cran_package.py
|
total-impact/software
|
9a61bf68cba9e95bbd2e2d5f0791ddf1746d2c99
|
[
"MIT"
] | 169
|
2015-10-13T01:42:57.000Z
|
2019-10-17T04:17:20.000Z
|
test/test_cran_package.py
|
resslerruntime/depsy
|
9a61bf68cba9e95bbd2e2d5f0791ddf1746d2c99
|
[
"MIT"
] | 111
|
2015-11-09T20:44:37.000Z
|
2018-11-27T20:10:13.000Z
|
test/test_cran_package.py
|
resslerruntime/depsy
|
9a61bf68cba9e95bbd2e2d5f0791ddf1746d2c99
|
[
"MIT"
] | 14
|
2015-11-10T23:08:25.000Z
|
2019-07-01T18:51:32.000Z
|
from models import cran_package
from test.utils import http
import unittest
from nose.tools import assert_equals
from nose.tools import assert_not_equals
from nose.tools import assert_true
from nose.tools import assert_items_equal
class TestCranPackage(unittest.TestCase):
pass
# @http
# def test_get_tags(self):
# response = cran_package.get_tags("knitr")
# expected = ['ReproducibleResearch']
# assert_equals(response, expected)
# response = cran_package.get_tags("MASS")
# expected = ['Distributions', 'Econometrics', 'Environmetrics', 'Multivariate', 'NumericalMathematics', 'Pharmacokinetics', 'Psychometrics', 'Robust', 'SocialSciences']
# assert_equals(response, expected)
| 30.833333
| 177
| 0.733784
| 81
| 740
| 6.518519
| 0.481481
| 0.060606
| 0.098485
| 0.143939
| 0.310606
| 0.117424
| 0
| 0
| 0
| 0
| 0
| 0
| 0.167568
| 740
| 23
| 178
| 32.173913
| 0.857143
| 0.581081
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.444444
| 1
| 0
| true
| 0.111111
| 0.777778
| 0
| 0.888889
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
|
0
| 4
|
786f4c4d705d082cb78ad9ab61a42a131e890c06
| 51
|
py
|
Python
|
docs/snippets/download.py
|
Microserf/bulbs
|
022db4b7a3b84840e171847bd1b4a386df658fb8
|
[
"BSD-3-Clause"
] | 234
|
2015-01-06T20:39:38.000Z
|
2022-01-09T06:37:51.000Z
|
docs/snippets/download.py
|
rpedigoni/bulbs
|
0c0f4e5883ba796dff1afae5413b0388491eb55d
|
[
"BSD-3-Clause"
] | 10
|
2015-02-10T18:44:04.000Z
|
2020-03-06T04:15:51.000Z
|
docs/snippets/download.py
|
rpedigoni/bulbs
|
0c0f4e5883ba796dff1afae5413b0388491eb55d
|
[
"BSD-3-Clause"
] | 30
|
2015-01-06T08:06:19.000Z
|
2020-03-05T16:18:02.000Z
|
>>> from bulbs import graph
>>> g = graph.Graph()
| 12.75
| 27
| 0.607843
| 7
| 51
| 4.428571
| 0.714286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.196078
| 51
| 3
| 28
| 17
| 0.756098
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.5
| null | null | 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
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
78a6f1c1f3f2fb5a4b5c34eca77e7a5531a54d42
| 169
|
py
|
Python
|
7KYU/collision.py
|
yaznasivasai/python_codewars
|
25493591dde4649dc9c1ec3bece8191a3bed6818
|
[
"MIT"
] | 4
|
2021-07-17T22:48:03.000Z
|
2022-03-25T14:10:58.000Z
|
7KYU/collision.py
|
yaznasivasai/python_codewars
|
25493591dde4649dc9c1ec3bece8191a3bed6818
|
[
"MIT"
] | null | null | null |
7KYU/collision.py
|
yaznasivasai/python_codewars
|
25493591dde4649dc9c1ec3bece8191a3bed6818
|
[
"MIT"
] | 3
|
2021-06-14T14:18:16.000Z
|
2022-03-16T06:02:02.000Z
|
def collision(x1, y1, radius1, x2, y2, radius2) -> bool:
if ((x1 - x2) ** 2 + (y1 - y2) ** 2) <= (radius1 + radius2) ** 2:
return True
return False
| 33.8
| 69
| 0.508876
| 23
| 169
| 3.73913
| 0.608696
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.128205
| 0.307692
| 169
| 5
| 70
| 33.8
| 0.606838
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 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
|
78c740d0fbfd602bb4fcfe0e2e098a2ab2eeeb0f
| 506
|
py
|
Python
|
src/Hash/Sha/txtToShaClass.py
|
edouard-lebas/CryptoGenerator
|
d43f2b3fa472493f49015e8402e382681692a63c
|
[
"MIT"
] | null | null | null |
src/Hash/Sha/txtToShaClass.py
|
edouard-lebas/CryptoGenerator
|
d43f2b3fa472493f49015e8402e382681692a63c
|
[
"MIT"
] | null | null | null |
src/Hash/Sha/txtToShaClass.py
|
edouard-lebas/CryptoGenerator
|
d43f2b3fa472493f49015e8402e382681692a63c
|
[
"MIT"
] | null | null | null |
import hashlib
class txtToShaClass:
def __init__(self, text):
self.text = text
def processSha1(self):
return hashlib.sha1(self.text).hexdigest()
def processSha224(self):
return hashlib.sha224(self.text).hexdigest()
def processSha256(self):
return hashlib.sha256(self.text).hexdigest()
def processSha384(self):
return hashlib.sha384(self.text).hexdigest()
def processSha512(self):
return hashlib.sha512(self.text).hexdigest()
| 25.3
| 52
| 0.667984
| 56
| 506
| 5.964286
| 0.357143
| 0.167665
| 0.254491
| 0.239521
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.065823
| 0.219368
| 506
| 20
| 53
| 25.3
| 0.779747
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.428571
| false
| 0
| 0.071429
| 0.357143
| 0.928571
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 4
|
15574148d6dcd2e03fa9227d68d2148d2c92b3ef
| 94
|
py
|
Python
|
theape/documentation/developer/explorations/explore_singletons/test_1.py
|
rsnakamura/theape
|
c480fc197eef49c73fa25f3948e3cf45d79e4abe
|
[
"MIT"
] | null | null | null |
theape/documentation/developer/explorations/explore_singletons/test_1.py
|
rsnakamura/theape
|
c480fc197eef49c73fa25f3948e3cf45d79e4abe
|
[
"MIT"
] | null | null | null |
theape/documentation/developer/explorations/explore_singletons/test_1.py
|
rsnakamura/theape
|
c480fc197eef49c73fa25f3948e3cf45d79e4abe
|
[
"MIT"
] | null | null | null |
import singleton_source
t1 = singleton_source.get()
test_1 = singleton_source.test_instance
| 15.666667
| 39
| 0.829787
| 13
| 94
| 5.615385
| 0.615385
| 0.616438
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.02381
| 0.106383
| 94
| 5
| 40
| 18.8
| 0.845238
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
155818f2c4cded9ce31816326f165a5cbe403ccc
| 107
|
py
|
Python
|
tests/simlin_tests.py
|
alaudet/simlin
|
ac184eef25b233525af0317115bfbdd2d700fe6b
|
[
"MIT"
] | null | null | null |
tests/simlin_tests.py
|
alaudet/simlin
|
ac184eef25b233525af0317115bfbdd2d700fe6b
|
[
"MIT"
] | null | null | null |
tests/simlin_tests.py
|
alaudet/simlin
|
ac184eef25b233525af0317115bfbdd2d700fe6b
|
[
"MIT"
] | null | null | null |
from nose.tools import *
'''
def setup():
print "SETUP!"
def teardown():
print "TEAR DOWN!"
'''
| 9.727273
| 24
| 0.570093
| 13
| 107
| 4.692308
| 0.769231
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.242991
| 107
| 10
| 25
| 10.7
| 0.753086
| 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
| 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
|
157dd8274f5f93e253e6aaf3a0cc05309d5bad2f
| 128
|
py
|
Python
|
python/ray/air/train/__init__.py
|
orcahmlee/ray
|
298742d7241681ee1f307ec0dd3cd7e9713a3c7d
|
[
"Apache-2.0"
] | null | null | null |
python/ray/air/train/__init__.py
|
orcahmlee/ray
|
298742d7241681ee1f307ec0dd3cd7e9713a3c7d
|
[
"Apache-2.0"
] | 41
|
2021-09-21T01:13:48.000Z
|
2022-03-19T07:12:22.000Z
|
python/ray/air/train/__init__.py
|
LaudateCorpus1/ray
|
20cf2edfef7103c269358a49a48c2159315ee132
|
[
"Apache-2.0"
] | null | null | null |
from ray.air.constants import TRAIN_DATASET_KEY
from ray.air.trainer import Trainer
__all__ = ["TRAIN_DATASET_KEY", "Trainer"]
| 25.6
| 47
| 0.804688
| 19
| 128
| 5
| 0.526316
| 0.147368
| 0.210526
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.101563
| 128
| 4
| 48
| 32
| 0.826087
| 0
| 0
| 0
| 0
| 0
| 0.1875
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
158599eac927fdef9f6506251006068d46c044f6
| 230
|
py
|
Python
|
DesignPatterns/03_decorator/1_no_decorator/2_subclass/cars/economy_6cyl_white_vinyl.py
|
eduardormonteiro/PythonPersonalLibrary
|
561733bb8305c4e25a08f99c28b60ec77251ad67
|
[
"MIT"
] | null | null | null |
DesignPatterns/03_decorator/1_no_decorator/2_subclass/cars/economy_6cyl_white_vinyl.py
|
eduardormonteiro/PythonPersonalLibrary
|
561733bb8305c4e25a08f99c28b60ec77251ad67
|
[
"MIT"
] | null | null | null |
DesignPatterns/03_decorator/1_no_decorator/2_subclass/cars/economy_6cyl_white_vinyl.py
|
eduardormonteiro/PythonPersonalLibrary
|
561733bb8305c4e25a08f99c28b60ec77251ad67
|
[
"MIT"
] | null | null | null |
from .economy import Economy
class Economy6CylWhiteVinyl(Economy):
@property
def description(self):
return 'Economy, 6 cylinder, white, vinyl upholstery'
@property
def cost(self):
return 13500.00
| 20.909091
| 61
| 0.682609
| 25
| 230
| 6.28
| 0.72
| 0.140127
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.051429
| 0.23913
| 230
| 10
| 62
| 23
| 0.845714
| 0
| 0
| 0.25
| 0
| 0
| 0.191304
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.125
| 0.25
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
15ae21d6c2910e2d591606139de970ebe1931ea1
| 228
|
py
|
Python
|
message_types/info_message.py
|
VladislavKorecky/pylogs
|
796336a3ce6056f06dcfd578779daaed0e88711a
|
[
"MIT"
] | null | null | null |
message_types/info_message.py
|
VladislavKorecky/pylogs
|
796336a3ce6056f06dcfd578779daaed0e88711a
|
[
"MIT"
] | null | null | null |
message_types/info_message.py
|
VladislavKorecky/pylogs
|
796336a3ce6056f06dcfd578779daaed0e88711a
|
[
"MIT"
] | null | null | null |
from message_type import MessageType
from terminal_colors import TerminalColors
class InfoMessage(MessageType):
def get_name(self):
return "INFO"
def get_color_code(self):
return TerminalColors.OKBLUE
| 20.727273
| 42
| 0.75
| 27
| 228
| 6.148148
| 0.703704
| 0.072289
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.197368
| 228
| 10
| 43
| 22.8
| 0.907104
| 0
| 0
| 0
| 0
| 0
| 0.017544
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0
| 0.285714
| 0.285714
| 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
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
ec6d0407a25885adb007c19cd5726ce8e1e2060e
| 7,450
|
py
|
Python
|
tests/appevents_test.py
|
bretttegart/treadmill
|
812109e31c503a6eddaee2d3f2e1faf2833b6aaf
|
[
"Apache-2.0"
] | 2
|
2017-10-31T18:48:20.000Z
|
2018-03-04T20:35:20.000Z
|
tests/appevents_test.py
|
bretttegart/treadmill
|
812109e31c503a6eddaee2d3f2e1faf2833b6aaf
|
[
"Apache-2.0"
] | null | null | null |
tests/appevents_test.py
|
bretttegart/treadmill
|
812109e31c503a6eddaee2d3f2e1faf2833b6aaf
|
[
"Apache-2.0"
] | null | null | null |
"""Unit test for appevents.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import os
import shutil
import tempfile
import unittest
from tests.testutils import mockzk
import kazoo
import mock
from treadmill import appevents
from treadmill import zkutils
from treadmill.apptrace import events
class AppeventsTest(mockzk.MockZookeeperTestCase):
"""Tests for teadmill.appevents."""
def setUp(self):
super(AppeventsTest, self).setUp()
self.root = tempfile.mkdtemp()
def tearDown(self):
if self.root and os.path.isdir(self.root):
shutil.rmtree(self.root)
super(AppeventsTest, self).tearDown()
@mock.patch('time.time', mock.Mock(return_value=100))
@mock.patch('treadmill.appevents._HOSTNAME', 'baz')
def test_post(self):
"""Test appevents.post."""
# Disable W0212(protected-access)
# pylint: disable=W0212
zkclient_mock = mock.Mock()
zkclient_mock.get_children.return_value = []
watcher = appevents.AppEventsWatcher(zkclient_mock, self.root)
appevents.post(
self.root,
events.PendingTraceEvent(
instanceid='foo.bar#123',
why='created',
)
)
path = os.path.join(
self.root, '100,foo.bar#123,pending,created'
)
self.assertTrue(os.path.exists(path))
watcher._on_created(path)
zkclient_mock.create.assert_called_once_with(
'/trace/007B/foo.bar#123,100,baz,pending,created',
b'',
ephemeral=False, makepath=True, sequence=False,
acl=mock.ANY
)
zkclient_mock.reset_mock()
appevents.post(
self.root,
events.PendingDeleteTraceEvent(
instanceid='foo.bar#123',
why='deleted'
)
)
path = os.path.join(
self.root, '100,foo.bar#123,pending_delete,deleted'
)
self.assertTrue(os.path.exists(path))
watcher._on_created(path)
zkclient_mock.create.assert_called_once_with(
'/trace/007B/foo.bar#123,100,baz,pending_delete,deleted',
b'',
ephemeral=False, makepath=True, sequence=False,
acl=mock.ANY
)
zkclient_mock.reset_mock()
appevents.post(
self.root,
events.AbortedTraceEvent(
instanceid='foo.bar#123',
why='test'
)
)
path = os.path.join(
self.root, '100,foo.bar#123,aborted,test'
)
self.assertTrue(os.path.exists(path))
watcher._on_created(path)
self.assertEqual(zkclient_mock.create.call_args_list, [
mock.call(
'/trace/007B/foo.bar#123,100,baz,aborted,test',
b'',
ephemeral=False, makepath=True, sequence=False,
acl=mock.ANY
),
mock.call(
'/finished/foo.bar#123',
b'{data: test, host: baz, state: aborted, when: \'100\'}\n',
makepath=True,
ephemeral=False,
acl=mock.ANY,
sequence=False
)
])
@mock.patch('time.time', mock.Mock(return_value=100))
@mock.patch('treadmill.appevents._HOSTNAME', 'baz')
def test_post_zk(self):
"""Test appevents.post.zk."""
zkclient_mock = mock.Mock()
zkclient_mock.get_children.return_value = []
appevents.post_zk(
zkclient_mock,
events.PendingTraceEvent(
instanceid='foo.bar#123',
why='created',
payload=''
)
)
zkclient_mock.create.assert_called_once_with(
'/trace/007B/foo.bar#123,100,baz,pending,created',
b'',
ephemeral=False, makepath=True, sequence=False,
acl=mock.ANY
)
zkclient_mock.reset_mock()
appevents.post_zk(
zkclient_mock,
events.PendingDeleteTraceEvent(
instanceid='foo.bar#123',
why='deleted'
)
)
zkclient_mock.create.assert_called_once_with(
'/trace/007B/foo.bar#123,100,baz,pending_delete,deleted',
b'',
ephemeral=False, makepath=True, sequence=False,
acl=mock.ANY
)
zkclient_mock.reset_mock()
appevents.post_zk(
zkclient_mock,
events.AbortedTraceEvent(
instanceid='foo.bar#123',
why='test'
)
)
zkclient_mock.create.assert_has_calls([
mock.call(
'/trace/007B/foo.bar#123,100,baz,aborted,test',
b'',
ephemeral=False, makepath=True, sequence=False,
acl=mock.ANY
),
mock.call(
'/finished/foo.bar#123',
b'{data: test, host: baz, state: aborted, when: \'100\'}\n',
ephemeral=False, makepath=True, sequence=False,
acl=mock.ANY
)
])
@mock.patch('kazoo.client.KazooClient.get_children', mock.Mock())
@mock.patch('kazoo.client.KazooClient.get', mock.Mock())
@mock.patch('kazoo.client.KazooClient.exists', mock.Mock())
@mock.patch('kazoo.client.KazooClient.delete', mock.Mock())
@mock.patch('treadmill.zkutils.ensure_deleted', mock.Mock())
@mock.patch('treadmill.appevents._HOSTNAME', 'host_x')
def test_unschedule(self):
"""Tests unschedule when server owns placement."""
# Disable W0212: accessing protected members.
# pylint: disable=W0212
zk_content = {
'placement': {
'host_x': {
'app#1': {},
},
'host_y': {
},
},
'scheduled': {
'app#1': {
},
},
}
self.make_mock_zk(zk_content)
zkclient = kazoo.client.KazooClient()
appevents._unschedule(zkclient, 'app#1')
zkutils.ensure_deleted.assert_called_with(zkclient, '/scheduled/app#1')
@mock.patch('kazoo.client.KazooClient.get_children', mock.Mock())
@mock.patch('kazoo.client.KazooClient.get', mock.Mock())
@mock.patch('kazoo.client.KazooClient.exists', mock.Mock())
@mock.patch('kazoo.client.KazooClient.delete', mock.Mock())
@mock.patch('treadmill.zkutils.ensure_deleted', mock.Mock())
@mock.patch('treadmill.appevents._HOSTNAME', 'host_x')
def test_unschedule_stale(self):
"""Tests unschedule when server does not own placement."""
# Disable W0212: accessing protected members.
# pylint: disable=W0212
zk_content = {
'placement': {
'host_x': {
},
'host_y': {
'app#1': {},
},
},
'scheduled': {
'app#1': {
},
},
}
self.make_mock_zk(zk_content)
zkclient = kazoo.client.KazooClient()
appevents._unschedule(zkclient, 'app#1')
self.assertFalse(zkutils.ensure_deleted.called)
if __name__ == '__main__':
unittest.main()
| 31.302521
| 79
| 0.549664
| 753
| 7,450
| 5.282869
| 0.172643
| 0.052288
| 0.038462
| 0.042735
| 0.74912
| 0.72549
| 0.718703
| 0.718703
| 0.644796
| 0.644796
| 0
| 0.027794
| 0.328725
| 7,450
| 237
| 80
| 31.434599
| 0.767646
| 0.051544
| 0
| 0.628141
| 0
| 0
| 0.172855
| 0.122777
| 0
| 0
| 0
| 0
| 0.055276
| 1
| 0.030151
| false
| 0
| 0.070352
| 0
| 0.105528
| 0.005025
| 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
|
ec7eabf4c258b2d4d4c2dc62568a5a897051984d
| 85
|
py
|
Python
|
omens/apps.py
|
acdh-oeaw/bestiarium
|
49652a0471ba9aae3ea5246e694129c91256f651
|
[
"MIT"
] | null | null | null |
omens/apps.py
|
acdh-oeaw/bestiarium
|
49652a0471ba9aae3ea5246e694129c91256f651
|
[
"MIT"
] | 14
|
2021-11-08T09:24:04.000Z
|
2022-03-09T15:49:57.000Z
|
omens/apps.py
|
acdh-oeaw/bestiarium
|
49652a0471ba9aae3ea5246e694129c91256f651
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class OmensConfig(AppConfig):
name = 'omens'
| 14.166667
| 33
| 0.741176
| 10
| 85
| 6.3
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.176471
| 85
| 5
| 34
| 17
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0.058824
| 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
|
ec84e8b55916ba62a1b920cb0fafec9e07990e27
| 169
|
py
|
Python
|
evap/development/urls.py
|
PFischbeck/EvaP
|
33c4f07186966e0ef2636174aec1e6f330a91226
|
[
"MIT"
] | null | null | null |
evap/development/urls.py
|
PFischbeck/EvaP
|
33c4f07186966e0ef2636174aec1e6f330a91226
|
[
"MIT"
] | null | null | null |
evap/development/urls.py
|
PFischbeck/EvaP
|
33c4f07186966e0ef2636174aec1e6f330a91226
|
[
"MIT"
] | null | null | null |
from django.urls import path
from evap.development import views
urlpatterns = [
path("components", views.development_components, name="development_components"),
]
| 21.125
| 84
| 0.781065
| 19
| 169
| 6.842105
| 0.578947
| 0.323077
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.12426
| 169
| 7
| 85
| 24.142857
| 0.878378
| 0
| 0
| 0
| 0
| 0
| 0.189349
| 0.130178
| 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
|
ec9af02ae7546492fede5ea700fa7c3fdf43fbd7
| 1,395
|
py
|
Python
|
setup.py
|
staranjeet/subtitle-cli
|
54abb00f048420d368caac60d958e5db7528a9f1
|
[
"MIT"
] | 1
|
2015-11-23T19:00:53.000Z
|
2015-11-23T19:00:53.000Z
|
setup.py
|
staranjeet/subtitle-cli
|
54abb00f048420d368caac60d958e5db7528a9f1
|
[
"MIT"
] | null | null | null |
setup.py
|
staranjeet/subtitle-cli
|
54abb00f048420d368caac60d958e5db7528a9f1
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
from setuptools import setup
import sys
setup(
name='subtitli',
version='0.0.1',
description='Downloads the subtitle for a movie',
long_description=open('README.rst').read(),
author='Taranjeet Singh',
license='MIT',
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: Console',
'Intended Audience :: Developers',
'Intended Audience :: Information Technology',
'Natural Language :: English',
'Topic :: Software Development :: Build Tools',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.0',
'Programming Language :: Python :: 3.1',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
],
keywords="subtitle cli, movie video, subtitle-cli",
author_email='reachtotj@gmail.com',
url='https://github.com/staranjeet/subtitli',
packages=['subtitli'],
install_requires=[
'requests==2.7.0',
],
entry_points={
'console_scripts': [
'subtitli = subtitli.subtitle:main'
],
}
)
| 31.704545
| 55
| 0.58853
| 139
| 1,395
| 5.870504
| 0.546763
| 0.209559
| 0.275735
| 0.191176
| 0.066176
| 0
| 0
| 0
| 0
| 0
| 0
| 0.022374
| 0.263082
| 1,395
| 43
| 56
| 32.44186
| 0.771401
| 0.014337
| 0
| 0.075
| 0
| 0
| 0.587336
| 0.016012
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.05
| 0
| 0.05
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
ecaf38ddb838a0ff5242b8622649f180b94ab2b1
| 56
|
py
|
Python
|
src/Wython.example/basic/example3.py
|
JRasmusBm/metaborg-python
|
ffc47439744be53c3a8f3bf7bbd55fbfc3f9f193
|
[
"Apache-2.0"
] | 2
|
2020-09-18T13:10:29.000Z
|
2021-09-23T21:04:46.000Z
|
src/Wython.example/basic/example3.py
|
MetaBorgCube/metaborg-python
|
f16cbfd7840e1c762b947eb743cfad1cdd60c237
|
[
"Apache-2.0"
] | 3
|
2018-05-04T21:01:59.000Z
|
2018-06-15T20:39:06.000Z
|
src/Wython.example/basic/example3.py
|
JRasmusBm/metaborg-python
|
ffc47439744be53c3a8f3bf7bbd55fbfc3f9f193
|
[
"Apache-2.0"
] | 2
|
2018-05-04T13:51:53.000Z
|
2019-03-11T08:09:37.000Z
|
if True:
pass
elif (banana):
pass
else:
pass
| 9.333333
| 14
| 0.571429
| 8
| 56
| 4
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.339286
| 56
| 6
| 15
| 9.333333
| 0.864865
| 0
| 0
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
ecc1ac8a11f75df32c663821464e1099600024a2
| 1,162
|
py
|
Python
|
cerberus_list_schema/tests/test_data/multiuse_schema.py
|
Firepubes/galbadia
|
0c579a347620ffc51bed18a9eae8cb80cd2809b4
|
[
"MIT"
] | 2
|
2020-11-10T22:09:24.000Z
|
2021-11-01T15:34:50.000Z
|
cerberus_list_schema/tests/test_data/multiuse_schema.py
|
Firepubes/galbadia
|
0c579a347620ffc51bed18a9eae8cb80cd2809b4
|
[
"MIT"
] | null | null | null |
cerberus_list_schema/tests/test_data/multiuse_schema.py
|
Firepubes/galbadia
|
0c579a347620ffc51bed18a9eae8cb80cd2809b4
|
[
"MIT"
] | 1
|
2021-11-10T14:39:11.000Z
|
2021-11-10T14:39:11.000Z
|
other_schema = {
"type": "list",
"items": [
{"type": "string"},
{"type": "integer", "min": 500},
{
"type": "list",
"items": [
{"type": "string"},
{"type": "integer", "name": "nd_int"},
{"type": "integer"},
{"type": "integer", "min": 50},
],
},
],
}
schema = {
"list_of_values": {
"type": "list",
"name": "hello",
"items": [
{"type": "string"},
{"type": "integer", "min": 500},
{
"type": "list",
"items": [
{"type": "string"},
{"type": "integer"},
{"type": "integer", "name": "hi"},
{
"type": "dict",
"schema": {
"field1": {"type": "string", "name": "field01231"},
"field2": {"type": "integer"},
},
},
],
},
],
},
"list_of_values_2": other_schema,
}
| 26.409091
| 79
| 0.285714
| 70
| 1,162
| 4.628571
| 0.314286
| 0.271605
| 0.185185
| 0.234568
| 0.432099
| 0.432099
| 0.432099
| 0.407407
| 0.407407
| 0.407407
| 0
| 0.028419
| 0.515491
| 1,162
| 43
| 80
| 27.023256
| 0.547069
| 0
| 0
| 0.47619
| 0
| 0
| 0.253012
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
01a08488ea799feffb56c5324790df9663b69d90
| 991
|
py
|
Python
|
test_laskenta.py
|
pohjanjoki/painonhallinta
|
6285ecc9221c02a2e9dcd98502cbf59ec3573f88
|
[
"CC0-1.0"
] | null | null | null |
test_laskenta.py
|
pohjanjoki/painonhallinta
|
6285ecc9221c02a2e9dcd98502cbf59ec3573f88
|
[
"CC0-1.0"
] | 1
|
2021-02-19T13:06:15.000Z
|
2021-02-19T13:06:15.000Z
|
test_laskenta.py
|
pohjanjoki/painonhallinta
|
6285ecc9221c02a2e9dcd98502cbf59ec3573f88
|
[
"CC0-1.0"
] | 3
|
2021-03-14T13:11:23.000Z
|
2021-04-07T06:19:25.000Z
|
# Modulin laskenta.py testit
# Modulien ja kirjastojen lataukset
import laskenta
# Ensimmäinen testi lasketaan painoindeksi ja verrataan tulosta ennalta laskettuun arvoon, huom sentit
def test_painoideksi():
assert round(laskenta.bmi(74, 171), 2) == 25.31 # huom. pyöristys
# Aikuisen naisen rasvaprosentti, kun bmi on 25 ja ikä 40
def test_aikuisen_rasvaprosentti_nainen():
assert round(laskenta.rasvaprosentti(25,40, 0), 1) == 33.8 # huom. pyöristys
# Aikuisen miehen rasvaprosentti, kun bmi on 25 ja ikä 40
def test_aikuisen_rasvaprosentti_mies():
assert round(laskenta.rasvaprosentti(25,40, 1), 1) == 23.0 # huom. pyöristys
# Tytön rasvaprosentti, kun bmi on 25 ja ika 16
def test_lapsen_rasvaprosentti_tytto():
assert round(laskenta.rasvaprosentti(25,16, 0), 1) == 27.9 # huom. pyöristys
# Pojan rasvaprosentti, kun bmi on 25 ja ika 16
def test_lapsen_rasvaprosentti_poika():
assert round(laskenta.rasvaprosentti(25,16, 1), 1) == 24.3 # huom. pyöristys
| 41.291667
| 102
| 0.751766
| 142
| 991
| 5.15493
| 0.408451
| 0.047814
| 0.129781
| 0.120219
| 0.52459
| 0.52459
| 0.322404
| 0.322404
| 0.322404
| 0.322404
| 0
| 0.074074
| 0.155399
| 991
| 24
| 103
| 41.291667
| 0.800478
| 0.453078
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.454545
| 1
| 0.454545
| true
| 0
| 0.090909
| 0
| 0.545455
| 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
| 1
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
01f616c2e7223be0ab979f23fdcd1caf81919225
| 109
|
py
|
Python
|
HackRPI/Search_Courses/apps.py
|
LouisLu705/HitHubDemo
|
057964f67bbf84469dc5e7a342a28d1479eaafec
|
[
"MIT"
] | null | null | null |
HackRPI/Search_Courses/apps.py
|
LouisLu705/HitHubDemo
|
057964f67bbf84469dc5e7a342a28d1479eaafec
|
[
"MIT"
] | null | null | null |
HackRPI/Search_Courses/apps.py
|
LouisLu705/HitHubDemo
|
057964f67bbf84469dc5e7a342a28d1479eaafec
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class SearchCoursesConfig(AppConfig):
name = 'Search_Courses'
| 15.571429
| 38
| 0.733945
| 11
| 109
| 7.181818
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.201835
| 109
| 6
| 39
| 18.166667
| 0.908046
| 0
| 0
| 0
| 0
| 0
| 0.137255
| 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
|
bf0c83018e255cd338e948b4f092f3afcd1c12bd
| 90
|
py
|
Python
|
shellaccrete/plot.py
|
gfeiden/shellaccrete
|
e7b1e2de7fe5fbd8e4ec06924d3129453969a8e0
|
[
"MIT"
] | null | null | null |
shellaccrete/plot.py
|
gfeiden/shellaccrete
|
e7b1e2de7fe5fbd8e4ec06924d3129453969a8e0
|
[
"MIT"
] | null | null | null |
shellaccrete/plot.py
|
gfeiden/shellaccrete
|
e7b1e2de7fe5fbd8e4ec06924d3129453969a8e0
|
[
"MIT"
] | null | null | null |
class Plot(object):
""" """
def __init__(self):
""" """
return 0
| 12.857143
| 23
| 0.411111
| 8
| 90
| 4.125
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.018182
| 0.388889
| 90
| 6
| 24
| 15
| 0.581818
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 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
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
bf3b0c15d01ac9d4364d3335b3806d973072fa8c
| 3,798
|
py
|
Python
|
tests/test_value.py
|
kervi/kervi-core
|
3c1e3c8a17a7b4d085d8a28b99180ff2a96b0e23
|
[
"MIT"
] | null | null | null |
tests/test_value.py
|
kervi/kervi-core
|
3c1e3c8a17a7b4d085d8a28b99180ff2a96b0e23
|
[
"MIT"
] | null | null | null |
tests/test_value.py
|
kervi/kervi-core
|
3c1e3c8a17a7b4d085d8a28b99180ff2a96b0e23
|
[
"MIT"
] | null | null | null |
from mockup_spine import MockupSpine
from kervi.values import KerviValue, NumberValue, BooleanValue
def test_value_instantitation_input():
spine = MockupSpine()
value = KerviValue("Dynamic Value", "Dynamic-test-value", value_id="dv", spine=spine)
assert value.value_id == "dv"
assert value.name == "Dynamic Value"
assert value.value == None
assert value.is_input == True
def test_value_instantitation_output():
spine = MockupSpine()
value = KerviValue("Dynamic Value", "Dynamic-test-value", is_input=False, value_id="dv", spine=spine)
assert value.value_id == "dv"
assert value.name == "Dynamic Value"
assert value.value == None
assert value.is_input == False
def test_number_instantiation():
spine = MockupSpine()
number = NumberValue("Dynamic Number", value_id="dn", spine=spine)
assert number.value_id == "dn"
assert number.name == "Dynamic Number"
assert number.value == 0
assert number.is_input == True
def test_number_set_value():
spine = MockupSpine()
number = NumberValue("Dynamic Number", value_id="dn", spine=spine)
number.value = 10
assert number.value == 10
def test_set_value_events():
spine = MockupSpine()
number = NumberValue("Dynamic Number", value_id="dn", spine=spine)
number.value = 10
assert "valueChanged" in spine.events.keys()
assert spine.events["valueChanged"]["args"][0]["value"] == 10
def test_set_value_events_delta():
spine = MockupSpine()
number = NumberValue("Dynamic Number", value_id="dn", spine=spine)
number.delta =10
assert number.value == 0
number.value = 5
assert number.value == 0
assert "valueChanged" not in spine.events.keys()
spine.events = {}
number.value = 10
assert number.value == 10
assert spine.events["valueChanged"]["args"][0]["value"] == 10
spine.events = {}
number.value = 7
assert number.value == 10
assert "valueChanged" not in spine.events.keys()
spine.events = {}
number.value = 0
assert number.value == 0
assert spine.events["valueChanged"]["args"][0]["value"] == 0
def test_boolean_instantiation():
spine = MockupSpine()
number = BooleanValue("Dynamic Boolean", value_id="db", spine=spine)
assert number.value_id == "db"
assert number.name == "Dynamic Boolean"
assert number.value == False
def test_boolean_set_value():
spine = MockupSpine()
number = BooleanValue("Dynamic Boolean", value_id="db", spine=spine)
number.value = True
assert number.value == True
number.value = False
assert number.value == False
def test_linking_in_to_out():
spine = MockupSpine()
number_out = NumberValue("Dynamic Number", is_input=False, value_id="dno", spine=spine)
number_in = NumberValue("Dynamic Number", value_id="dni", spine=spine)
assert number_out.value == 0
assert number_in.value == 0
number_in.link_to(number_out)
number_out.value = 10
assert number_in.value == 10
def test_linking_out_to_in():
spine = MockupSpine()
number_out = NumberValue("Dynamic Number", is_input=False, value_id="dn", spine=spine)
number_in = NumberValue("Dynamic Number", value_id="dn", spine=spine)
assert number_out.value == 0
assert number_in.value == 0
number_out.link_to(number_in)
number_out.value = 10
assert number_in.value == 10
def test_linking_transformation():
spine = MockupSpine()
number_out = NumberValue("Dynamic Number", is_input=False, value_id="dn", spine=spine)
number_in = NumberValue("Dynamic Number", value_id="dn", spine=spine)
assert number_out.value == 0
assert number_in.value == 0
number_out.link_to(number_in, lambda x:-2*x)
number_out.value = 10
assert number_in.value == -20
| 28.772727
| 105
| 0.684308
| 498
| 3,798
| 5.046185
| 0.106426
| 0.118185
| 0.081178
| 0.044568
| 0.808993
| 0.747314
| 0.713888
| 0.668126
| 0.621568
| 0.555113
| 0
| 0.01563
| 0.191417
| 3,798
| 131
| 106
| 28.992366
| 0.80267
| 0
| 0
| 0.606383
| 0
| 0
| 0.111638
| 0
| 0
| 0
| 0
| 0
| 0.404255
| 1
| 0.117021
| false
| 0
| 0.021277
| 0
| 0.138298
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
173d65de9c68a303209910464adf8cc095c678fb
| 410
|
py
|
Python
|
Estudo Python/ProgOrientadoObjeto/POO/main.py
|
ErickFernan/Estudos-de-Pyhton
|
ce6818b7ba1fcede0d0e6708488a6f55f5ae6351
|
[
"MIT"
] | null | null | null |
Estudo Python/ProgOrientadoObjeto/POO/main.py
|
ErickFernan/Estudos-de-Pyhton
|
ce6818b7ba1fcede0d0e6708488a6f55f5ae6351
|
[
"MIT"
] | null | null | null |
Estudo Python/ProgOrientadoObjeto/POO/main.py
|
ErickFernan/Estudos-de-Pyhton
|
ce6818b7ba1fcede0d0e6708488a6f55f5ae6351
|
[
"MIT"
] | null | null | null |
# PARTE 1
from pessoa import Pessoa
# p1 = Pessoa('Luiz', 29)
# p1.comer('maçã')
# p1.falar('POO')
# p1.pararcomer()
# p1.falar('POO')
# p1.comer('alimento')
# p1.pararfalar()
# p1.falar('assunto')
#
# p1 = Pessoa('Luiz', 29)
# p2 = Pessoa('João', 32)
# p1.falar('POO')
# # p2.falar('Filmes')
# p1.comer('Churrasco')
# p2.comer('Sorverte')
# print(p1.get_ano_nascimento())
# print(p2.get_ano_nascimento())
| 17.083333
| 32
| 0.629268
| 59
| 410
| 4.305085
| 0.440678
| 0.110236
| 0.11811
| 0.110236
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.064607
| 0.131707
| 410
| 23
| 33
| 17.826087
| 0.648876
| 0.834146
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
1752dc654ff2693d7ea400a63f883133f72ec07b
| 626
|
py
|
Python
|
alpha.py
|
morenomitrovic/kapycat
|
3a7a26041d98ffe9534fd06ecaf814b457d58847
|
[
"MIT"
] | null | null | null |
alpha.py
|
morenomitrovic/kapycat
|
3a7a26041d98ffe9534fd06ecaf814b457d58847
|
[
"MIT"
] | null | null | null |
alpha.py
|
morenomitrovic/kapycat
|
3a7a26041d98ffe9534fd06ecaf814b457d58847
|
[
"MIT"
] | null | null | null |
class Alpha(object):
#===================================== A L P H A B E T =====================================================
alpha = ["•", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s",
"t", "u", "v", "w", "x", "y", "z"]
#===========================================================================================================
@classmethod
def index(cls,val):
return cls.alpha.index(val)
@classmethod
def get(cls,pos):
return cls.alpha[pos]
@classmethod
def len(cls):
return len(cls.alpha)
| 34.777778
| 112
| 0.285942
| 66
| 626
| 2.727273
| 0.590909
| 0.233333
| 0.155556
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.21885
| 626
| 17
| 113
| 36.823529
| 0.366053
| 0.341853
| 0
| 0.25
| 0
| 0
| 0.066015
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 0.25
| 0.666667
| 0
| 0
| 0
| 0
| null | 1
| 0
| 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
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 4
|
1770b3155ef974979f93ae677f73792277bb67c1
| 271
|
py
|
Python
|
photos/forms.py
|
AhteshamSid/Company-Website-Django
|
90248b1d593126a31ac019408e8021ce8735dbe8
|
[
"MIT"
] | null | null | null |
photos/forms.py
|
AhteshamSid/Company-Website-Django
|
90248b1d593126a31ac019408e8021ce8735dbe8
|
[
"MIT"
] | null | null | null |
photos/forms.py
|
AhteshamSid/Company-Website-Django
|
90248b1d593126a31ac019408e8021ce8735dbe8
|
[
"MIT"
] | null | null | null |
from django.forms import ModelForm
from .models import Contact
class ContactForm(ModelForm):
class Meta:
model = Contact
fields = '__all__'
class AddForm(ModelForm):
class Meta:
model = Contact
fields = '__all__'
| 18.066667
| 35
| 0.616236
| 27
| 271
| 5.888889
| 0.518519
| 0.176101
| 0.226415
| 0.289308
| 0.490566
| 0.490566
| 0.490566
| 0
| 0
| 0
| 0
| 0
| 0.317343
| 271
| 14
| 36
| 19.357143
| 0.859459
| 0
| 0
| 0.6
| 0
| 0
| 0.054688
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.2
| 0
| 0.6
| 0
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
177abe530419b3282dc2d2c1faa251b8c849497c
| 231
|
py
|
Python
|
workflows/connectors/storage.py
|
zdenulo/cloud-workflows
|
98c137e0e6e118c5f865769d486fd14f47ef6e4b
|
[
"MIT"
] | 1
|
2021-12-06T19:16:27.000Z
|
2021-12-06T19:16:27.000Z
|
workflows/connectors/storage.py
|
zdenulo/cloud-workflows
|
98c137e0e6e118c5f865769d486fd14f47ef6e4b
|
[
"MIT"
] | null | null | null |
workflows/connectors/storage.py
|
zdenulo/cloud-workflows
|
98c137e0e6e118c5f865769d486fd14f47ef6e4b
|
[
"MIT"
] | null | null | null |
from workflows import Call
# class Storage(object):
#
# def create(self, bucket, name, body):
# api = 'googleapis.storage.v1.buckets.insert'
# return Call(api, args={'project_id': 'project_id', 'body': {}})
| 21
| 73
| 0.623377
| 28
| 231
| 5.071429
| 0.785714
| 0.126761
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005495
| 0.212121
| 231
| 10
| 74
| 23.1
| 0.774725
| 0.818182
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
177ae518ac680bae46d239435683a3ee4fd2915c
| 157
|
py
|
Python
|
qatrack/qatrack_core/forms.py
|
crcrewso/qatrackplus
|
b9da3bc542d9e3eca8b7291bb631d1c7255d528e
|
[
"MIT"
] | 20
|
2021-03-11T18:37:32.000Z
|
2022-03-23T19:38:07.000Z
|
qatrack/qatrack_core/forms.py
|
crcrewso/qatrackplus
|
b9da3bc542d9e3eca8b7291bb631d1c7255d528e
|
[
"MIT"
] | 75
|
2021-02-12T02:37:33.000Z
|
2022-03-29T20:56:16.000Z
|
qatrack/qatrack_core/forms.py
|
crcrewso/qatrackplus
|
b9da3bc542d9e3eca8b7291bb631d1c7255d528e
|
[
"MIT"
] | 5
|
2021-04-07T15:46:53.000Z
|
2021-09-18T16:55:00.000Z
|
from django import forms
class MultipleCharField(forms.CharField):
widget = forms.SelectMultiple
def to_python(self, value):
return value
| 17.444444
| 41
| 0.726115
| 18
| 157
| 6.277778
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.210191
| 157
| 8
| 42
| 19.625
| 0.91129
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.2
| 0.2
| 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
| 0
| 1
| 1
| 0
|
0
| 4
|
1788635cf2cec7300748e0c9ae08336c006d6205
| 147
|
py
|
Python
|
src/search/urls.py
|
parezj/PartsView
|
a59a3804b574b11efd8f0472deae4dae1c16eb67
|
[
"WTFPL"
] | 3
|
2020-05-10T08:40:36.000Z
|
2020-10-28T18:09:31.000Z
|
src/search/urls.py
|
parezj/PartsView
|
a59a3804b574b11efd8f0472deae4dae1c16eb67
|
[
"WTFPL"
] | 1
|
2019-12-17T23:41:17.000Z
|
2019-12-17T23:42:43.000Z
|
src/search/urls.py
|
parezj/PartsView
|
a59a3804b574b11efd8f0472deae4dae1c16eb67
|
[
"WTFPL"
] | 1
|
2021-06-11T10:49:10.000Z
|
2021-06-11T10:49:10.000Z
|
from django.urls import include, path
from . import views
app_name = "search"
urlpatterns = [
path('', views.search, name='search'),
]
| 18.375
| 43
| 0.653061
| 18
| 147
| 5.277778
| 0.611111
| 0.210526
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.210884
| 147
| 8
| 44
| 18.375
| 0.818966
| 0
| 0
| 0
| 0
| 0
| 0.085106
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
17907bb546d359b2fd39c2d4b17ff605fb2081f8
| 141
|
py
|
Python
|
Semana8/series/urls.py
|
SPFelipe/TECSUP-DAE-2021-2
|
ec218d0a7fa66a73e3e0a8889e325cf2ce2a74d3
|
[
"MIT"
] | null | null | null |
Semana8/series/urls.py
|
SPFelipe/TECSUP-DAE-2021-2
|
ec218d0a7fa66a73e3e0a8889e325cf2ce2a74d3
|
[
"MIT"
] | null | null | null |
Semana8/series/urls.py
|
SPFelipe/TECSUP-DAE-2021-2
|
ec218d0a7fa66a73e3e0a8889e325cf2ce2a74d3
|
[
"MIT"
] | null | null | null |
from django.urls import path
from . import views
urlpatterns = [
path('', views.serie_list),
path('<int:pk>',views.serie_detail)
]
| 15.666667
| 39
| 0.673759
| 19
| 141
| 4.894737
| 0.631579
| 0.215054
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.177305
| 141
| 8
| 40
| 17.625
| 0.801724
| 0
| 0
| 0
| 0
| 0
| 0.056738
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
1793d13c32a68676a4a1f151bb36d3819e07548c
| 149
|
py
|
Python
|
ex004.py
|
wcalazans81/Exercicios-Python
|
d9abb9505bbf9151d3515cc9ca5b9bd32435699e
|
[
"MIT"
] | null | null | null |
ex004.py
|
wcalazans81/Exercicios-Python
|
d9abb9505bbf9151d3515cc9ca5b9bd32435699e
|
[
"MIT"
] | null | null | null |
ex004.py
|
wcalazans81/Exercicios-Python
|
d9abb9505bbf9151d3515cc9ca5b9bd32435699e
|
[
"MIT"
] | null | null | null |
n = float(input('Digite um valor '))
n1 = float(input('Digite outro valor '))
s = n + n1
print('A soma entre {} + {} é iqual a {}'.format(n, n1, s))
| 29.8
| 59
| 0.590604
| 26
| 149
| 3.384615
| 0.615385
| 0.227273
| 0.363636
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.025
| 0.194631
| 149
| 4
| 60
| 37.25
| 0.708333
| 0
| 0
| 0
| 0
| 0
| 0.456376
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.25
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
17996981d9b5efac37e9cc90cb3cbbbefd5daafe
| 51
|
py
|
Python
|
envoy.dependency.pip_check/envoy/dependency/pip_check/exceptions.py
|
Nordix/pytooling
|
b48e70e9098c283d0f17db8016d2f32a2b103a57
|
[
"Apache-2.0"
] | 1
|
2021-12-09T19:24:48.000Z
|
2021-12-09T19:24:48.000Z
|
envoy.dependency.pip_check/envoy/dependency/pip_check/exceptions.py
|
Nordix/pytooling
|
b48e70e9098c283d0f17db8016d2f32a2b103a57
|
[
"Apache-2.0"
] | 392
|
2021-08-24T15:55:32.000Z
|
2022-03-28T14:26:22.000Z
|
envoy.dependency.pip_check/envoy/dependency/pip_check/exceptions.py
|
Nordix/pytooling
|
b48e70e9098c283d0f17db8016d2f32a2b103a57
|
[
"Apache-2.0"
] | 3
|
2021-10-06T13:43:11.000Z
|
2021-11-29T13:48:56.000Z
|
class PipConfigurationError(Exception):
pass
| 10.2
| 39
| 0.764706
| 4
| 51
| 9.75
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.176471
| 51
| 4
| 40
| 12.75
| 0.928571
| 0
| 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
|
bd987ee238a11c902994886a3822e78d3d20d103
| 45
|
py
|
Python
|
github/__init__.py
|
johnewart/github-py
|
6fe8c7b650b334413b6e752ad1724576ec1e7724
|
[
"0BSD"
] | 12
|
2018-11-04T12:52:24.000Z
|
2020-11-30T03:49:30.000Z
|
github/__init__.py
|
johnewart/github-py
|
6fe8c7b650b334413b6e752ad1724576ec1e7724
|
[
"0BSD"
] | 2
|
2019-12-16T16:07:51.000Z
|
2019-12-16T16:20:34.000Z
|
github/__init__.py
|
mike-north/github-app-demo.py
|
b384ae859ec61234c2bb76f4c994559d3088f785
|
[
"ISC"
] | 10
|
2019-03-07T13:39:20.000Z
|
2021-12-01T11:28:42.000Z
|
from .apps import GitHubApp
App = GitHubApp
| 11.25
| 27
| 0.777778
| 6
| 45
| 5.833333
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.177778
| 45
| 3
| 28
| 15
| 0.945946
| 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
|
bdaebcf014c7d358057e05febd299345e3ad7647
| 191
|
py
|
Python
|
testproject/testapp/forms.py
|
cho-leukeleu/django-richtextfield
|
db4e32214fd279a2bca49f70e569b65cb77fe7c8
|
[
"MIT"
] | null | null | null |
testproject/testapp/forms.py
|
cho-leukeleu/django-richtextfield
|
db4e32214fd279a2bca49f70e569b65cb77fe7c8
|
[
"MIT"
] | null | null | null |
testproject/testapp/forms.py
|
cho-leukeleu/django-richtextfield
|
db4e32214fd279a2bca49f70e569b65cb77fe7c8
|
[
"MIT"
] | null | null | null |
from django import forms
from djrichtextfield.widgets import RichTextWidget
class CommentForm(forms.ModelForm):
content = forms.CharField(widget=RichTextWidget(field_settings='mini'))
| 23.875
| 75
| 0.816754
| 21
| 191
| 7.380952
| 0.761905
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.104712
| 191
| 7
| 76
| 27.285714
| 0.906433
| 0
| 0
| 0
| 0
| 0
| 0.020942
| 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
|
bdb276a0dd1a2a7098c74bf3afda660aabee1662
| 256
|
py
|
Python
|
preconvert/output/simplejson.py
|
timothycrosley/preconvert
|
828a35998908162695543ae7781b0527485cda77
|
[
"MIT"
] | 12
|
2019-08-20T16:01:49.000Z
|
2022-02-09T16:08:36.000Z
|
preconvert/output/simplejson.py
|
timothycrosley/preconvert
|
828a35998908162695543ae7781b0527485cda77
|
[
"MIT"
] | 4
|
2019-08-21T09:18:09.000Z
|
2021-06-02T00:02:18.000Z
|
preconvert/output/simplejson.py
|
timothycrosley/preconvert
|
828a35998908162695543ae7781b0527485cda77
|
[
"MIT"
] | 3
|
2019-08-18T11:07:07.000Z
|
2021-02-27T21:34:42.000Z
|
from functools import partial
import simplejson
from simplejson import *
from preconvert.output import convert
dumps = partial(simplejson.dumps, default=convert.json) # type: ignore
dump = partial(simplejson.dump, default=convert.json) # type: ignore
| 25.6
| 71
| 0.792969
| 32
| 256
| 6.34375
| 0.4375
| 0.167488
| 0.17734
| 0.216749
| 0.275862
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.128906
| 256
| 9
| 72
| 28.444444
| 0.910314
| 0.097656
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
bdb83a7366428e9e40945ad106d60bfe4ab73f69
| 334
|
py
|
Python
|
greatsoft/service/serializers.py
|
YakhyaevRasul/greatsoft-new
|
146f669786cfca0e68ed37c40b904f30bf05e99c
|
[
"MIT"
] | null | null | null |
greatsoft/service/serializers.py
|
YakhyaevRasul/greatsoft-new
|
146f669786cfca0e68ed37c40b904f30bf05e99c
|
[
"MIT"
] | null | null | null |
greatsoft/service/serializers.py
|
YakhyaevRasul/greatsoft-new
|
146f669786cfca0e68ed37c40b904f30bf05e99c
|
[
"MIT"
] | null | null | null |
from rest_framework import serializers
from .models import Service
class ServiceListSerializer(serializers.ModelSerializer):
class Meta:
model = Service
fields = ('name', 'image')
class ServiceDetailSerializer(serializers.ModelSerializer):
class Meta:
model = Service
fields = '__all__'
| 19.647059
| 59
| 0.700599
| 30
| 334
| 7.633333
| 0.566667
| 0.227074
| 0.270742
| 0.305677
| 0.462882
| 0.462882
| 0.462882
| 0
| 0
| 0
| 0
| 0
| 0.227545
| 334
| 16
| 60
| 20.875
| 0.887597
| 0
| 0
| 0.4
| 0
| 0
| 0.048048
| 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
|
bdc4116759ad7bfb80a8a26a5defa6f78c5b32aa
| 171
|
py
|
Python
|
{{cookiecutter.project_name}}/tests/test_template.py
|
KasperJuunge/cookiecutter-data-science
|
c0217802fd06f78a6739fd29b6315c3d874a30a5
|
[
"MIT"
] | 2
|
2021-02-25T17:33:40.000Z
|
2021-02-25T20:32:21.000Z
|
{{cookiecutter.project_name}}/tests/test_template.py
|
KasperJuunge/cookiecutter-data-science
|
c0217802fd06f78a6739fd29b6315c3d874a30a5
|
[
"MIT"
] | 56
|
2020-06-10T04:07:30.000Z
|
2022-03-28T04:03:15.000Z
|
{{cookiecutter.project_name}}/tests/test_template.py
|
KasperJuunge/cookiecutter-data-science
|
c0217802fd06f78a6739fd29b6315c3d874a30a5
|
[
"MIT"
] | 3
|
2020-07-06T11:40:50.000Z
|
2021-06-22T05:48:38.000Z
|
"""Simple test scaffold."""
from {{cookiecutter.package_name}} import __version__
def test_version():
"""Sample test function."""
assert __version__ == "0.1.0"
| 19
| 53
| 0.678363
| 20
| 171
| 5.3
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.020833
| 0.157895
| 171
| 8
| 54
| 21.375
| 0.715278
| 0
| 0
| 0
| 0
| 0
| 0.042735
| 0
| 0
| 0
| 0
| 0
| 0.333333
| 0
| null | null | 0
| 0.333333
| null | null | 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
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
bdc653b066c972b1f3bc34f31d7b8b0e462d77bb
| 131
|
py
|
Python
|
cde-root/usr/lib64/python2.4/site-packages/numpy/matrixlib/__init__.py
|
NirBenTalLab/proorigami-cde-package
|
273379075830a9b94d3f2884661a54f853777ff6
|
[
"MIT"
] | 5
|
2015-08-12T17:34:13.000Z
|
2020-04-13T07:59:10.000Z
|
cde-root/usr/lib64/python2.4/site-packages/numpy/matrixlib/__init__.py
|
NirBenTalLab/proorigami-cde-package
|
273379075830a9b94d3f2884661a54f853777ff6
|
[
"MIT"
] | null | null | null |
cde-root/usr/lib64/python2.4/site-packages/numpy/matrixlib/__init__.py
|
NirBenTalLab/proorigami-cde-package
|
273379075830a9b94d3f2884661a54f853777ff6
|
[
"MIT"
] | 4
|
2019-11-02T04:16:22.000Z
|
2021-02-23T06:53:41.000Z
|
from defmatrix import *
__all__ = defmatrix.__all__
from numpy.testing import Tester
test = Tester().test
bench = Tester().bench
| 16.375
| 32
| 0.763359
| 17
| 131
| 5.411765
| 0.529412
| 0.217391
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.145038
| 131
| 7
| 33
| 18.714286
| 0.821429
| 0
| 0
| 0
| 0
| 0
| 0
| 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
|
bdd4a4ce6d23cb9b32735161b178140b8aac500b
| 68
|
py
|
Python
|
utils/generate_txt/__init__.py
|
dywlavender/multi-label-classification
|
ec8567169b3f1b08c7dafeb71f007275621a5a95
|
[
"MIT"
] | 17
|
2019-10-16T04:39:27.000Z
|
2022-01-24T03:21:58.000Z
|
utils/generate_txt/__init__.py
|
dywlavender/multi-label-classification
|
ec8567169b3f1b08c7dafeb71f007275621a5a95
|
[
"MIT"
] | null | null | null |
utils/generate_txt/__init__.py
|
dywlavender/multi-label-classification
|
ec8567169b3f1b08c7dafeb71f007275621a5a95
|
[
"MIT"
] | 5
|
2020-03-04T09:08:02.000Z
|
2021-07-20T02:28:57.000Z
|
# -*- coding: utf-8 -*-
"""
File __init__.py
@author: ZhengYuwei
"""
| 13.6
| 23
| 0.588235
| 8
| 68
| 4.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.017241
| 0.147059
| 68
| 5
| 24
| 13.6
| 0.603448
| 0.867647
| 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
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.