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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
41a6e893cbe3ca7a1124f0b298c9c467747d8dce
| 87
|
py
|
Python
|
algorithms/root_finding/__init__.py
|
Chichilele/algorithms
|
acc7470631b3ced2a8e126011af1e6ff1ff62394
|
[
"MIT"
] | null | null | null |
algorithms/root_finding/__init__.py
|
Chichilele/algorithms
|
acc7470631b3ced2a8e126011af1e6ff1ff62394
|
[
"MIT"
] | null | null | null |
algorithms/root_finding/__init__.py
|
Chichilele/algorithms
|
acc7470631b3ced2a8e126011af1e6ff1ff62394
|
[
"MIT"
] | null | null | null |
from .bisection import Bisection
from .newton import Newton
from .secant import Secant
| 21.75
| 32
| 0.827586
| 12
| 87
| 6
| 0.416667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.137931
| 87
| 3
| 33
| 29
| 0.96
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
68c593b95060e5533cd732b27e0295a8ae74658d
| 237
|
py
|
Python
|
library/admin.py
|
Elcaveman/Universias
|
252a4bdaabbaa723d5afa9a070efd33c5d37ec87
|
[
"MIT"
] | null | null | null |
library/admin.py
|
Elcaveman/Universias
|
252a4bdaabbaa723d5afa9a070efd33c5d37ec87
|
[
"MIT"
] | 8
|
2021-03-19T03:06:36.000Z
|
2022-01-13T02:41:19.000Z
|
library/admin.py
|
Elcaveman/Universias
|
252a4bdaabbaa723d5afa9a070efd33c5d37ec87
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from . import models as m
# Register your models here.
admin.site.register(m.Post)
admin.site.register(m.Laboratory)
admin.site.register(m.Team)
admin.site.register(m.Revue)
admin.site.register(m.Profile)
| 29.625
| 33
| 0.797468
| 39
| 237
| 4.846154
| 0.435897
| 0.238095
| 0.449735
| 0.47619
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.080169
| 237
| 8
| 34
| 29.625
| 0.866972
| 0.109705
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.285714
| 0
| 0.285714
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
68f2d89b479da9be11e0aad7b5b5ca6c97ccda95
| 14,873
|
py
|
Python
|
ro_py/gamepersistence.py
|
jmkd3v/ro.py
|
7c50267ccc1eed333e73c5cfb0740aec00a62989
|
[
"MIT"
] | null | null | null |
ro_py/gamepersistence.py
|
jmkd3v/ro.py
|
7c50267ccc1eed333e73c5cfb0740aec00a62989
|
[
"MIT"
] | null | null | null |
ro_py/gamepersistence.py
|
jmkd3v/ro.py
|
7c50267ccc1eed333e73c5cfb0740aec00a62989
|
[
"MIT"
] | null | null | null |
"""
This file houses functions used for tampering with Roblox Datastores
"""
from urllib.parse import quote
from math import floor
import re
from ro_py.utilities.url import url
endpoint = url("gamepersistence")
class DataStore:
"""
Represents the in-game datastore system for storing data for games (https://gamepersistence.roblox.com).
This is only available for authenticated clients, and games that they own.
Parameters
----------
requests : ro_py.utilities.requests.Requests
Requests object to use for API requests.
place_id : int
PlaceId to modify the DataStores for,
if the currently authenticated user doesn't have sufficient permissions,
it will raise a NotAuthorizedToModifyPlaceDataStores exception
name : str
The name of the DataStore,
as in the Second Parameter of
`std::shared_ptr<RBX::Instance> DataStoreService::getDataStore(const DataStoreService* this, std::string name, std::string scope = "global")`
scope : str, optional
The scope of the DataStore,
as on the Second Parameter of
`std::shared_ptr<RBX::Instance> DataStoreService::getDataStore(const DataStoreService* this, std::string name, std::string scope = "global")`
legacy : bool, optional
Describes whether or not this will use the legacy endpoints,
over the new v1 endpoints (Does not apply to getSortedValues)
legacy_naming_scheme : bool, optional
Describes whether or not this will use legacy names for data stores, if true, the qkeys[idx].scope will match the current scope (global by default),
there will be no qkeys[idx].target (normally the key that is passed into each method),
and the qkeys[idx].key will match the key passed into each method.
"""
def __init__(self, requests, place_id, name, scope, legacy=True, legacy_naming_scheme=False):
self.requests = requests
self.place_id = place_id
self.legacy = legacy
self.legacy_naming_scheme = legacy_naming_scheme
self.name = name
self.scope = scope if scope is not None else "global"
async def get(self, key):
"""
Represents a get request to a data store,
using legacy works the same
Parameters
----------
key : str
The key of the value you wish to get,
as in the Second Parameter of
`void DataStore::getAsync(const DataStore* this, std::string key, boost::function<void(RBX::Reflection::Variant)> resumeFunction, boost::function<void(std::string)> errorFunction)`
Returns
-------
typing.Any
"""
if self.legacy:
data = f"qkeys[0].scope={quote(self.scope)}&qkeys[0].target=&qkeys[0].key={quote(key)}" if self.legacy_naming_scheme == True else f"qkeys[0].scope={quote(self.scope)}&qkeys[0].target={quote(key)}&qkeys[0].key={quote(self.name)}"
r = await self.requests.post(
url=endpoint + f"persistence/getV2?placeId={str(self.place_id)}&type=standard&scope={quote(self.scope)}",
headers={
'Roblox-Place-Id': str(self.place_id),
'Content-Type': 'application/x-www-form-urlencoded'
}, data=data)
if len(r.json()['data']) == 0:
return None
else:
return r.json()['data'][0]['Value']
else:
url = endpoint + f"v1/persistence/ro_py?type=standard&key={quote(key)}&scope={quote(self.scope)}&target=" if self.legacy_naming_scheme == True else endpoint + f"v1/persistence/ro_py?type=standard&key={quote(self.name)}&scope={quote(self.scope)}&target={quote(key)}"
r = await self.requests.get(
url=url,
headers={
'Roblox-Place-Id': str(self.place_id)
})
if r.status_code == 204:
return None
else:
return r.text
async def set(self, key, value):
"""
Represents a set request to a data store,
using legacy works the same
Parameters
----------
key : str
The key of the value you wish to get,
as in the Second Parameter of
`void DataStore::getAsync(const DataStore* this, std::string key, boost::function<void(RBX::Reflection::Variant)> resumeFunction, boost::function<void(std::string)> errorFunction)`
value
The value to set for the key,
as in the 3rd parameter of
`void DataStore::setAsync(const DataStore* this, std::string key, RBX::Reflection::Variant value, boost::function<void()> resumeFunction, boost::function<void(std::string)> errorFunction)`
Returns
-------
typing.Any
"""
if self.legacy:
data = f"value={quote(str(value))}"
url = endpoint + f"persistence/set?placeId={self.place_id}&type=standard&key={quote(key)}&type=standard&scope={quote(self.scope)}&target=&valueLength={str(len(str(value)))}" if self.legacy_naming_scheme == True else endpoint + f"persistence/set?placeId={str(self.place_id)}&type=standard&key={quote(self.name)}&type=standard&scope={quote(self.scope)}&target={quote(key)}&valueLength={str(len(str(value)))}"
r = await self.requests.post(
url=url,
headers={
'Roblox-Place-Id': str(self.place_id),
'Content-Type': 'application/x-www-form-urlencoded'
}, data=data)
if len(r.json()['data']) == 0:
return None
else:
return r.json()['data']
else:
url = endpoint + f"v1/persistence/ro_py?type=standard&key={quote(key)}&scope={quote(self.scope)}&target=" if self.legacy_naming_scheme == True else endpoint + f"v1/persistence/ro_py?type=standard&key={quote(self.name)}&scope={quote(self.scope)}&target={quote(key)}"
r = await self.requests.post(
url=url,
headers={
'Roblox-Place-Id': str(self.place_id),
'Content-Type': '*/*',
'Content-Length': str(len(str(value)))
}, data=quote(str(value)))
if r.status_code == 200:
return value
async def set_if_value(self, key, value, expected_value):
"""
Represents a conditional set request to a data store,
only supports legacy
Parameters
----------
key : str
The key of the value you wish to get,
as in the Second Parameter of
`void DataStore::getAsync(const DataStore* this, std::string key, boost::function<void(RBX::Reflection::Variant)> resumeFunction, boost::function<void(std::string)> errorFunction)`
value
The value to set for the key,
as in the 3rd parameter of
`void DataStore::setAsync(const DataStore* this, std::string key, RBX::Reflection::Variant value, boost::function<void()> resumeFunction, boost::function<void(std::string)> errorFunction)`
expected_value
The expected_value for that key, if you know the key doesn't exist, then set this as None
Returns
-------
typing.Any
"""
data = f"value={quote(str(value))}&expectedValue={quote(str(expected_value)) if expected_value is not None else ''}"
url = endpoint + f"persistence/set?placeId={str(self.place_id)}&type=standard&key={quote(key)}&type=standard&scope={quote(self.scope)}&target=&valueLength={str(len(str(value)))}&expectedValueLength={str(len(str(expected_value))) if expected_value is not None else str(0)}" if self.legacy_naming_scheme == True else endpoint + f"persistence/set?placeId={str(self.place_id)}&type=standard&key={quote(self.name)}&type=standard&scope={quote(self.scope)}&target={quote(key)}&valueLength={str(len(str(value)))}&expectedValueLength={str(len(str(expected_value))) if expected_value is not None else str(0)}"
r = await self.requests.post(
url=url,
headers={
'Roblox-Place-Id': str(self.place_id),
'Content-Type': 'application/x-www-form-urlencoded'
}, data=data)
try:
if r.json()['data'] != 0:
return r.json()['data']
except KeyError:
return r.json()['error']
async def set_if_idx(self, key, value, idx):
"""
Represents a conditional set request to a data store,
only supports new endpoints,
Parameters
----------
key : str
The key of the value you wish to get,
as in the Second Parameter of
`void DataStore::getAsync(const DataStore* this, std::string key, boost::function<void(RBX::Reflection::Variant)> resumeFunction, boost::function<void(std::string)> errorFunction)`
value
The value to set for the key,
as in the 3rd parameter of
`void DataStore::setAsync(const DataStore* this, std::string key, RBX::Reflection::Variant value, boost::function<void()> resumeFunction, boost::function<void(std::string)> errorFunction)`
idx : int
The expectedidx, there
Returns
-------
typing.Any
"""
url = endpoint + f"v1/persistence/ro_py?type=standard&key={quote(key)}&scope={quote(self.scope)}&target=" if self.legacy_naming_scheme == True else endpoint + f"v1/persistence/ro_py?type=standard&key={quote(self.name)}&scope={quote(self.scope)}&target={quote(key)}&usn=0.0"
r = await self.requests.post(
url=url,
headers={
'Roblox-Place-Id': str(self.place_id),
'Content-Type': '*/*',
'Content-Length': str(len(str(value)))
}, data=quote(str(value)))
if r.status_code == 409:
usn = r.headers['roblox-usn']
split = usn.split('.')
msn_hash = split[0]
current_value = split[1]
url = endpoint + f"v1/persistence/ro_py?type=standard&key={quote(key)}&scope={quote(self.scope)}&target=" if self.legacy_naming_scheme == True else endpoint + f"v1/persistence/ro_py?type=standard&key={quote(self.name)}&scope={quote(self.scope)}&target={quote(key)}&usn={msn_hash}.{hex(idx).split('x')[1]}"
r2 = await self.requests.post(
url=url,
headers={
'Roblox-Place-Id': str(self.place_id),
'Content-Type': '*/*',
'Content-Length': str(len(str(value)))
}, data=quote(str(value)))
if r2.status_code == 409:
return "Expected idx did not match current idx, current idx is " + str(floor(int(current_value, 16)))
else:
return value
async def increment(self, key, delta=0):
"""
Represents a conditional set request to a data store,
only supports legacy
Parameters
----------
key : str
The key of the value you wish to get,
as in the Second Parameter of
`void DataStore::getAsync(const DataStore* this, std::string key, boost::function<void(RBX::Reflection::Variant)> resumeFunction, boost::function<void(std::string)> errorFunction)`
delta : int, optional
The value to set for the key,
as in the 3rd parameter of
`void DataStore::setAsync(const DataStore* this, std::string key, RBX::Reflection::Variant value, boost::function<void()> resumeFunction, boost::function<void(std::string)> errorFunction)`
Returns
-------
typing.Any
"""
data = ""
url = endpoint + f"persistence/increment?placeId={str(self.place_id)}&type=standard&key={quote(key)}&type=standard&scope={quote(self.scope)}&target=&value={str(delta)}" if self.legacy_naming_scheme else endpoint + f"persistence/increment?placeId={str(self.place_id)}&type=standard&key={quote(self.name)}&type=standard&scope={quote(self.scope)}&target={quote(key)}&value={str(delta)}"
r = await self.requests.post(
url=url,
headers={
'Roblox-Place-Id': str(self.place_id),
'Content-Type': 'application/x-www-form-urlencoded'
}, data=data)
try:
if r.json()['data'] != 0:
return r.json()['data']
except KeyError:
cap = re.search("\(.+\)", r.json()['error'])
reason = cap.group(0).replace("(", "").replace(")", "")
if reason == "ExistingValueNotNumeric":
return "The requested key you tried to increment had a different value other than byte, short, int, long, long long, float, double or long double"
async def remove(self, key):
"""
Represents a get request to a data store,
using legacy works the same
Parameters
----------
key : str
The key of the value you wish to remove,
as in the Second Parameter of
`void DataStore::removeAsync(const DataStore* this, std::string key, boost::function<void(RBX::Reflection::Variant)> resumeFunction, boost::function<void(std::string)> errorFunction)`
Returns
-------
typing.Any
"""
if self.legacy:
data = ""
url = endpoint + f"persistence/remove?placeId={str(self.place_id)}&type=standard&key={quote(key)}&type=standard&scope={quote(self.scope)}&target=" if self.legacy_naming_scheme else endpoint + f"persistence/remove?placeId={str(self.place_id)}&type=standard&key={quote(self.name)}&type=standard&scope={quote(self.scope)}&target={quote(key)}"
r = await self.requests.post(
url=url,
headers={
'Roblox-Place-Id': str(self.place_id),
'Content-Type': 'application/x-www-form-urlencoded'
}, data=data)
if r.json()['data'] is None:
return None
else:
return r.json()['data']
else:
url = endpoint + f"v1/persistence/ro_py/remove?type=standard&key={quote(key)}&scope={quote(self.scope)}&target=" if self.legacy_naming_scheme == True else endpoint + f"v1/persistence/ro_py/remove?type=standard&key={quote(self.name)}&scope={quote(self.scope)}&target={quote(key)}"
r = await self.requests.post(
url=url,
headers={
'Roblox-Place-Id': str(self.place_id)
})
if r.status_code == 204:
return None
else:
return r.text
| 49.576667
| 607
| 0.594635
| 1,841
| 14,873
| 4.754481
| 0.12113
| 0.026391
| 0.033588
| 0.045584
| 0.765338
| 0.764195
| 0.749572
| 0.742146
| 0.737918
| 0.724209
| 0
| 0.005091
| 0.27365
| 14,873
| 299
| 608
| 49.742475
| 0.805147
| 0.10314
| 0
| 0.673611
| 0
| 0.159722
| 0.408631
| 0.328109
| 0
| 0
| 0
| 0
| 0
| 1
| 0.006944
| false
| 0
| 0.027778
| 0
| 0.159722
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
68f6ce603e1b87c98765510fcbf4a9ec49dd5779
| 177
|
py
|
Python
|
tests/web_platform/css_flexbox_1/test_css_flexbox_column_reverse_wrap.py
|
jonboland/colosseum
|
cbf974be54fd7f6fddbe7285704cfaf7a866c5c5
|
[
"BSD-3-Clause"
] | 71
|
2015-04-13T09:44:14.000Z
|
2019-03-24T01:03:02.000Z
|
tests/web_platform/css_flexbox_1/test_css_flexbox_column_reverse_wrap.py
|
jonboland/colosseum
|
cbf974be54fd7f6fddbe7285704cfaf7a866c5c5
|
[
"BSD-3-Clause"
] | 35
|
2019-05-06T15:26:09.000Z
|
2022-03-28T06:30:33.000Z
|
tests/web_platform/css_flexbox_1/test_css_flexbox_column_reverse_wrap.py
|
jonboland/colosseum
|
cbf974be54fd7f6fddbe7285704cfaf7a866c5c5
|
[
"BSD-3-Clause"
] | 139
|
2015-05-30T18:37:43.000Z
|
2019-03-27T17:14:05.000Z
|
from tests.utils import W3CTestCase
class TestCssFlexboxColumnReverseWrap(W3CTestCase):
vars().update(W3CTestCase.find_tests(__file__, 'css-flexbox-column-reverse-wrap'))
| 29.5
| 86
| 0.813559
| 19
| 177
| 7.315789
| 0.842105
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.018405
| 0.079096
| 177
| 5
| 87
| 35.4
| 0.834356
| 0
| 0
| 0
| 0
| 0
| 0.175141
| 0.175141
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
ec04cd4260b692ceec5d7d62782a8e48066f074e
| 116
|
py
|
Python
|
wikilabels/database/__init__.py
|
aryan040501/wikilabels
|
ea110da2b969cc978a0f288c4da6250dc9d67e72
|
[
"MIT"
] | 15
|
2015-07-16T17:56:43.000Z
|
2018-08-20T14:59:16.000Z
|
wikilabels/database/__init__.py
|
aryan040501/wikilabels
|
ea110da2b969cc978a0f288c4da6250dc9d67e72
|
[
"MIT"
] | 122
|
2015-06-10T15:58:11.000Z
|
2018-08-16T14:56:23.000Z
|
wikilabels/database/__init__.py
|
aryan040501/wikilabels
|
ea110da2b969cc978a0f288c4da6250dc9d67e72
|
[
"MIT"
] | 27
|
2015-07-15T22:12:35.000Z
|
2018-08-06T23:10:28.000Z
|
from .db import DB
from .errors import NotFoundError, IntegrityError
__all__ = (DB, NotFoundError, IntegrityError)
| 23.2
| 49
| 0.801724
| 13
| 116
| 6.846154
| 0.538462
| 0.606742
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.12931
| 116
| 4
| 50
| 29
| 0.881188
| 0
| 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 | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
ec23072b77ed273721a6b2659bf665baecfa3a56
| 96
|
py
|
Python
|
venv/lib/python3.8/site-packages/setuptools/_distutils/bcppcompiler.py
|
GiulianaPola/select_repeats
|
17a0d053d4f874e42cf654dd142168c2ec8fbd11
|
[
"MIT"
] | 2
|
2022-03-13T01:58:52.000Z
|
2022-03-31T06:07:54.000Z
|
venv/lib/python3.8/site-packages/setuptools/_distutils/bcppcompiler.py
|
DesmoSearch/Desmobot
|
b70b45df3485351f471080deb5c785c4bc5c4beb
|
[
"MIT"
] | 19
|
2021-11-20T04:09:18.000Z
|
2022-03-23T15:05:55.000Z
|
venv/lib/python3.8/site-packages/setuptools/_distutils/bcppcompiler.py
|
DesmoSearch/Desmobot
|
b70b45df3485351f471080deb5c785c4bc5c4beb
|
[
"MIT"
] | null | null | null |
/home/runner/.cache/pip/pool/38/90/d5/a425265fa1fcbffee5575ce27d5d5f731f760abd9d862521ebdf3d5092
| 96
| 96
| 0.895833
| 9
| 96
| 9.555556
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.395833
| 0
| 96
| 1
| 96
| 96
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
ec30203317350094fdccc91341110d30acf84ea7
| 169
|
py
|
Python
|
exer8.py
|
IuryBRIGNOLI/infosatc-lp-avaliativo-01
|
d443619b0dc8fc0bbde0b6f4bb1f4a49c6ef200a
|
[
"MIT"
] | null | null | null |
exer8.py
|
IuryBRIGNOLI/infosatc-lp-avaliativo-01
|
d443619b0dc8fc0bbde0b6f4bb1f4a49c6ef200a
|
[
"MIT"
] | null | null | null |
exer8.py
|
IuryBRIGNOLI/infosatc-lp-avaliativo-01
|
d443619b0dc8fc0bbde0b6f4bb1f4a49c6ef200a
|
[
"MIT"
] | null | null | null |
mq = float(input("Digite uma área em metros quadrados: "))
print("O valor digitado em metros quadrados é {} e convertido em hectáres é {:.2f} ".format(mq,(mq*0.0001)))
| 84.5
| 110
| 0.698225
| 28
| 169
| 4.214286
| 0.75
| 0.135593
| 0.288136
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.041667
| 0.147929
| 169
| 2
| 110
| 84.5
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0.676471
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 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
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
6b8aea701362430a57e7d6d4155d1f0207b0f2ec
| 202
|
py
|
Python
|
otk/rt2/rt2_scalar_qt.py
|
draustin/otk
|
c6e91423ec79b85b380ee9385f6d27c91f92503d
|
[
"MIT"
] | 7
|
2020-05-17T14:26:42.000Z
|
2022-02-14T04:52:54.000Z
|
otk/rt2/rt2_scalar_qt.py
|
uamhforever/otk
|
c6e91423ec79b85b380ee9385f6d27c91f92503d
|
[
"MIT"
] | 17
|
2020-04-10T22:50:00.000Z
|
2020-06-18T04:54:19.000Z
|
otk/rt2/rt2_scalar_qt.py
|
uamhforever/otk
|
c6e91423ec79b85b380ee9385f6d27c91f92503d
|
[
"MIT"
] | 1
|
2022-02-14T04:52:45.000Z
|
2022-02-14T04:52:45.000Z
|
"""Convenience namespace incorporating rt2 with scalar ray processing and Qt graphics.
Suggested usage:
from otk import rt2_scalar_qt as rt2.
"""
from . import *
from .scalar import *
from .qt import *
| 25.25
| 86
| 0.767327
| 29
| 202
| 5.275862
| 0.586207
| 0.130719
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.017647
| 0.158416
| 202
| 8
| 87
| 25.25
| 0.882353
| 0.688119
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
6b9f49de90a7f1bb76ab62e084472001c484c8a5
| 30
|
py
|
Python
|
tests/test_practice.py
|
lori94/practice
|
c028552b7aa937421b7373bd98a89014520a6089
|
[
"MIT"
] | null | null | null |
tests/test_practice.py
|
lori94/practice
|
c028552b7aa937421b7373bd98a89014520a6089
|
[
"MIT"
] | null | null | null |
tests/test_practice.py
|
lori94/practice
|
c028552b7aa937421b7373bd98a89014520a6089
|
[
"MIT"
] | null | null | null |
from practice import practice
| 15
| 29
| 0.866667
| 4
| 30
| 6.5
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.133333
| 30
| 1
| 30
| 30
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
d423d95987f5a50ec3651752e1d0919f4247cd7e
| 132
|
py
|
Python
|
pyecs/entity.py
|
en0/pyecs
|
500e241b4cd647c520faff85225238c8c3875b4a
|
[
"MIT"
] | null | null | null |
pyecs/entity.py
|
en0/pyecs
|
500e241b4cd647c520faff85225238c8c3875b4a
|
[
"MIT"
] | null | null | null |
pyecs/entity.py
|
en0/pyecs
|
500e241b4cd647c520faff85225238c8c3875b4a
|
[
"MIT"
] | null | null | null |
class Entity(dict):
identity: int = 0
def __repr__(self):
return f"<Entity-{self.identity}:{super().__repr__()}>"
| 18.857143
| 63
| 0.606061
| 16
| 132
| 4.5
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.009615
| 0.212121
| 132
| 6
| 64
| 22
| 0.682692
| 0
| 0
| 0
| 0
| 0
| 0.340909
| 0.340909
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 0.25
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
d433bbfdd2d1f4dbfff44e1bede00acbdd388509
| 34
|
py
|
Python
|
mppsolar/__main__.py
|
ltowarek/mpp-solar
|
d49f16ba2ad72c1d53b2d798ecf5eac6830e8863
|
[
"MIT"
] | 1
|
2021-05-24T08:49:25.000Z
|
2021-05-24T08:49:25.000Z
|
mppsolar/__main__.py
|
ltowarek/mpp-solar
|
d49f16ba2ad72c1d53b2d798ecf5eac6830e8863
|
[
"MIT"
] | null | null | null |
mppsolar/__main__.py
|
ltowarek/mpp-solar
|
d49f16ba2ad72c1d53b2d798ecf5eac6830e8863
|
[
"MIT"
] | null | null | null |
from mppsolar import main
main()
| 8.5
| 25
| 0.764706
| 5
| 34
| 5.2
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.176471
| 34
| 3
| 26
| 11.333333
| 0.928571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
d44aab996d86dddddf6ba05868c3a5a31f4336b1
| 37
|
py
|
Python
|
utils/__init__.py
|
davidov312/guide_for_WSI_data
|
5b1e77f4a614e24c299abce14177e9fb98f9cd03
|
[
"MIT"
] | null | null | null |
utils/__init__.py
|
davidov312/guide_for_WSI_data
|
5b1e77f4a614e24c299abce14177e9fb98f9cd03
|
[
"MIT"
] | null | null | null |
utils/__init__.py
|
davidov312/guide_for_WSI_data
|
5b1e77f4a614e24c299abce14177e9fb98f9cd03
|
[
"MIT"
] | null | null | null |
# author: david dov
# date: 21/11/21
| 12.333333
| 19
| 0.648649
| 7
| 37
| 3.428571
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.2
| 0.189189
| 37
| 2
| 20
| 18.5
| 0.6
| 0.864865
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
d46496cd3ca91084106d6db7e998cafe74e25e22
| 3,995
|
py
|
Python
|
library/calelib/__init__.py
|
IAmDrozdov/task-tracker
|
ddc237c89769e3e2e0943862edd6aa09cbe3ee62
|
[
"MIT"
] | null | null | null |
library/calelib/__init__.py
|
IAmDrozdov/task-tracker
|
ddc237c89769e3e2e0943862edd6aa09cbe3ee62
|
[
"MIT"
] | null | null | null |
library/calelib/__init__.py
|
IAmDrozdov/task-tracker
|
ddc237c89769e3e2e0943862edd6aa09cbe3ee62
|
[
"MIT"
] | null | null | null |
"""Calendoola Library
A library from which you can create your to-do application. There is also
support for users and transfer tasks between them. On the github repository
https://bitbucket.org/sashasashadrozdov/calendoola you can find examples of
integrating this library into a console or web application.
First steps:
>>> from calelib import configure_database
>>> configure_database()
>>> from calelib.crud import Calendoola
>>> my_todo = Calendoola()
First of all you should configure user database.
Function 'configure_database' "works out of the box" with settings file
if directory 'database settings' called 'settings.py'. So you can use
your own settings file by passing its path as parameter to this function.
Calendoola is main object of your application. When you create new instance
of application config file and logging file creates automatically. To work
with this application you must have at least one user.
Usage:
Below is a brief overview of the functionality of the library, for detailed
use, use the help() function for the library modules.
In the following examples of using the application, we will work with the
object created in the section below.
Users:
The first instance you need to create for using this library. This
entity holds all the plans, tasks and reminders. Through the nickname
of the user you will get access to all data.
To create user you need to:
>>> my_todo.create_user(nickname='new_user')
This function takes 1 required arguments - it is users nickname, using
which you will work with application.
For more details use help(crud) or help(customer).
Tasks:
The whole essence of this application lies in the tasks. You can do
anything with them: create, delete, edit, transfer to users for shared
deletion, move to archive, return all, by id or filtering.
To create task you need to:
>>> my_todo.create_task(username, info)
This function takes 2 required arguments: username - nickname of user
what create task and info - description of this task.
Also you can add arguments like priority, deadline, tags and parent
task id.
For more details use help(crud) or help(task).
Plans:
Plans is an instance, that create tasks periodically. You can set
time to create and period of creating, what can be interpreted as
'create every N days in M:M o'clock'.
To create plan you need to:
>>> my_todo.create_plan(username, info, period_type, period_value)
This function takes 4 required arguments, the first to you know
from the 'tasks', next 2 are period_type - type of periodicity this
plan(see 'constants.py') and period_value what will describe days
when plan should create task. Also this function takes 1 more argument
which calls 'time', its describe time, when plan should create task.
For more details use help(crud) or help(plan).
Reminders:
Reminders is an instance, that will remind you about tasks deadline.
You can set time before reminding what can be interpreted as 'remind
me about the tasks N time before their deadline'.
To create reminder you need to:
>>> my_todo.create_reminder(username, remind_type, remind_before)
THis function takes only 3 required arguments? the first you already
know, the next 2 are remind_type - the unit of time(see 'constants.py')
in which to be measured next argument remind_before - value of
remind_type units, before this instance reminder will remind you about
task.
For more details use help(crud) or help(reminder).
"""
from .constants import Constants, Status
from .custom_exceptions import CycleError
from .database_settings.configurator import configure_database
| 43.423913
| 79
| 0.707635
| 580
| 3,995
| 4.831034
| 0.32931
| 0.014989
| 0.01606
| 0.015703
| 0.108494
| 0.077088
| 0.047109
| 0.047109
| 0.024982
| 0
| 0
| 0.002323
| 0.245557
| 3,995
| 91
| 80
| 43.901099
| 0.927339
| 0.961202
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.054945
| 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
| 1
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
00f66149c0e8fcefdd64983e819399f14d0e5c21
| 236
|
py
|
Python
|
cronicl/exceptions/toxic_combination_error.py
|
joocer/cronicl
|
5ab215554939699683752cb7b8549756edff9ea5
|
[
"Apache-2.0"
] | null | null | null |
cronicl/exceptions/toxic_combination_error.py
|
joocer/cronicl
|
5ab215554939699683752cb7b8549756edff9ea5
|
[
"Apache-2.0"
] | 73
|
2020-10-05T21:00:48.000Z
|
2020-11-16T23:29:41.000Z
|
cronicl/exceptions/toxic_combination_error.py
|
joocer/cronicl
|
5ab215554939699683752cb7b8549756edff9ea5
|
[
"Apache-2.0"
] | null | null | null |
"""
Toxic Combination
Trigger/Dispatcher combinations that should never be seen,
even in development and test environments.
"""
from .cronicl_exception import CroniclException
class ToxicCombinationError(CroniclException):
pass
| 18.153846
| 58
| 0.809322
| 25
| 236
| 7.6
| 0.96
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.135593
| 236
| 12
| 59
| 19.666667
| 0.931373
| 0.508475
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.333333
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
|
0
| 5
|
2e0fe90b0dbf367859c7899f639cc8b7c0536332
| 190
|
py
|
Python
|
script/youtube.py
|
colemanja91/get_lauren_a_raise
|
cb038b74347abedc72882a3a16e81ad1d975021b
|
[
"Apache-2.0"
] | null | null | null |
script/youtube.py
|
colemanja91/get_lauren_a_raise
|
cb038b74347abedc72882a3a16e81ad1d975021b
|
[
"Apache-2.0"
] | null | null | null |
script/youtube.py
|
colemanja91/get_lauren_a_raise
|
cb038b74347abedc72882a3a16e81ad1d975021b
|
[
"Apache-2.0"
] | null | null | null |
#!/usr/bin/python3
from os import environ
from googleapiclient.discovery import build
api_key = environ["YT_API_KEY"]
def youtube():
return build('youtube', 'v3', developerKey=api_key)
| 19
| 53
| 0.757895
| 27
| 190
| 5.185185
| 0.666667
| 0.128571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.011976
| 0.121053
| 190
| 9
| 54
| 21.111111
| 0.826347
| 0.089474
| 0
| 0
| 0
| 0
| 0.110465
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.4
| 0.2
| 0.8
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 5
|
2e27dcb3ce8dfaab099c1f4e67c5f0abb2bed915
| 173
|
py
|
Python
|
tasks/EPAM/python_course/foundation-python/l7/m7-4-fixing.py
|
AleksNeStu/projects
|
1a4c68dfbdcb77228f0f3617e58fd18fcb1f5dbb
|
[
"Apache-2.0"
] | 2
|
2022-01-19T18:01:35.000Z
|
2022-02-06T06:54:38.000Z
|
tasks/EPAM/python_course/foundation-python/l7/m7-4-fixing.py
|
AleksNeStu/projects
|
1a4c68dfbdcb77228f0f3617e58fd18fcb1f5dbb
|
[
"Apache-2.0"
] | null | null | null |
tasks/EPAM/python_course/foundation-python/l7/m7-4-fixing.py
|
AleksNeStu/projects
|
1a4c68dfbdcb77228f0f3617e58fd18fcb1f5dbb
|
[
"Apache-2.0"
] | null | null | null |
"Talk."
# https://www.jetbrains.com/help/pycharm/part-1-debugging-python-code.html#7bf477d0 - IDE
# https://wiki.python.org/moin/PythonDebuggingTools - debug
print('sds')
| 24.714286
| 89
| 0.745665
| 24
| 173
| 5.375
| 0.916667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.037267
| 0.069364
| 173
| 7
| 90
| 24.714286
| 0.763975
| 0.872832
| 0
| 0
| 0
| 0
| 0.307692
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
2e5ff59f4889d24a0f1fba11467f9bb30a9435cc
| 3,030
|
py
|
Python
|
filecopy.py
|
xthekrakenx/python-filecopy
|
32d6dd22665344a43a7cb68a9fd7678f7dbf5323
|
[
"MIT"
] | null | null | null |
filecopy.py
|
xthekrakenx/python-filecopy
|
32d6dd22665344a43a7cb68a9fd7678f7dbf5323
|
[
"MIT"
] | null | null | null |
filecopy.py
|
xthekrakenx/python-filecopy
|
32d6dd22665344a43a7cb68a9fd7678f7dbf5323
|
[
"MIT"
] | null | null | null |
from shutil import copyfile, copy
from datetime import date
import calendar
import os
'''
Another fine...
#############################################################################################################################################
## |||| https://mykraken.tech |||| https://mykraken.tech |||| https://mykraken.tech |||| https://mykraken.tech |||| https://mykraken.tech ##
#############################################################################################################################################
## /$$ /$$ /$$ /$$ /$$ /$$ /$$ ##
## | $$$ /$$$ | $$ /$$/ | $$ | $$ | $$ ##
## | $$$$ /$$$$ /$$ /$$| $$ /$$/ /$$$$$$ /$$$$$$ | $$ /$$ /$$$$$$ /$$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$$| $$$$$$$ ##
## | $$ $$/$$ $$| $$ | $$| $$$$$/ /$$__ $$|____ $$| $$ /$$/ /$$__ $$| $$__ $$ |_ $$_/ /$$__ $$ /$$_____/| $$__ $$ ##
## | $$ $$$| $$| $$ | $$| $$ $$ | $$ \__/ /$$$$$$$| $$$$$$/ | $$$$$$$$| $$ \ $$ | $$ | $$$$$$$$| $$ | $$ \ $$ ##
## | $$\ $ | $$| $$ | $$| $$\ $$ | $$ /$$__ $$| $$_ $$ | $$_____/| $$ | $$ | $$ /$$| $$_____/| $$ | $$ | $$ ##
## | $$ \/ | $$| $$$$$$$| $$ \ $$| $$ | $$$$$$$| $$ \ $$| $$$$$$$| $$ | $$ /$$| $$$$/| $$$$$$$| $$$$$$$| $$ | $$ ##
## |__/ |__/ \____ $$|__/ \__/|__/ \_______/|__/ \__/ \_______/|__/ |__/|__/ \___/ \_______/ \_______/|__/ |__/ ##
## /$$ | $$ ##
## | $$$$$$/ ##
## \______/ ##
#############################################################################################################################################
## https://mykraken.tech |||| https://mykraken.tech |||| https://mykraken.tech |||| https://mykraken.tech |||| https://mykraken.tech |||| ##
#############################################################################################################################################
...Creation.
'''
#Grab current day
myDate = date.today()
#Grab human readable day
currentDay = calendar.day_name[myDate.weekday()]
#Absolute path to source file (for backup)
sourceFile = os.path.normpath("//networkaddress/path/to/file.xlsx")
#Destination filename built with day of week appended to original name.
destinationFile = os.path.normpath("//networkaddress/path/to/backup/" + currentDay + ".xlsx")
#Copy Source to Destination (Overwrites file if it exists)
copy(sourceFile, destinationFile)
| 67.333333
| 141
| 0.243894
| 111
| 3,030
| 5.738739
| 0.441441
| 0.204082
| 0.266876
| 0.310832
| 0.373626
| 0.373626
| 0.266876
| 0.266876
| 0.266876
| 0.266876
| 0
| 0
| 0.346865
| 3,030
| 44
| 142
| 68.863636
| 0.32188
| 0.068317
| 0
| 0
| 0
| 0
| 0.194521
| 0.180822
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.444444
| 0
| 0.444444
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
2e67e1338de5d0d5af317de815c0bc48de196bac
| 1,267
|
py
|
Python
|
src/network/ipy_mod.py
|
liuguanglin/Learn_Python
|
ad7437c983dae3d3386162f51dd4259a8a6c475a
|
[
"MIT"
] | null | null | null |
src/network/ipy_mod.py
|
liuguanglin/Learn_Python
|
ad7437c983dae3d3386162f51dd4259a8a6c475a
|
[
"MIT"
] | null | null | null |
src/network/ipy_mod.py
|
liuguanglin/Learn_Python
|
ad7437c983dae3d3386162f51dd4259a8a6c475a
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from IPy import IP, IPSet
print('IP类型')
print(IP('192.168.1.0/24').version())
print(IP('::1').version())
print('\n显示格式')
print(IP('192.168.1.0/24').strNormal())
print(IP('192.168.1.0/24').strNormal(0))
print(IP('192.168.1.0/24').strNormal(1))
print(IP('192.168.1.0/24').strNormal(2))
print(IP('192.168.1.0/24').strNormal(3))
print('\n子网容量: ', IP('192.168.1.0/28').len())
print('子网掩码: ', IP('172.17.0.0/18').netmask())
print('广播地址: ', IP('172.17.0.0/17').broadcast())
print('转换为对应的网络: ', IP('172.17.33.44').make_net('255.255.128.0'))
print('\n进制转换')
print(IP('192.168.1.1').int())
print(IP('192.168.1.1').strBin())
print(IP('192.168.1.1').strHex())
print('\n反向解析')
print(IP('127.0.0.1').reverseName())
print('\nIP类型')
print(IP('1.2.3.4').iptype())
print(IP('127.5.5.5').iptype())
print(IP('255.255.255.255').iptype())
print('\n判断IP或网段是否包含于另一网段')
print('192.168.1.1' in IP('192.168.1.0/24'))
print('192.168.1.0/28' in IP('192.168.1.0/24'))
print('\n判断IP段是否重叠')
print(IP('192.168.1.0/24').overlaps('192.168.1.0/28'))
print('\n地址比较')
print(IP('192.168.1.0/24') > IP('172.17.0.0/16'))
print('\nIP地址聚合')
a1 = IP('192.168.1.192/26')
a2 = IP('192.168.1.160/27')
a3 = IP('192.168.1.224/27')
print(IPSet([a1, a2, a3]))
| 25.34
| 65
| 0.614049
| 252
| 1,267
| 3.083333
| 0.261905
| 0.15444
| 0.18018
| 0.196911
| 0.415701
| 0.339768
| 0.281853
| 0.216216
| 0
| 0
| 0
| 0.240101
| 0.063141
| 1,267
| 49
| 66
| 25.857143
| 0.41449
| 0.033938
| 0
| 0
| 0
| 0
| 0.394435
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.027778
| 0
| 0.027778
| 0.888889
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
5cff8720c33b4adedf3a09015f9f891aa0e597d5
| 56
|
py
|
Python
|
teste/operador logico.py
|
DanielSurf10/Python
|
cf6c1675c62f43e57b8e78ea2041a6289bfa0b3e
|
[
"MIT"
] | null | null | null |
teste/operador logico.py
|
DanielSurf10/Python
|
cf6c1675c62f43e57b8e78ea2041a6289bfa0b3e
|
[
"MIT"
] | null | null | null |
teste/operador logico.py
|
DanielSurf10/Python
|
cf6c1675c62f43e57b8e78ea2041a6289bfa0b3e
|
[
"MIT"
] | null | null | null |
a = 15
# print(1 & 15)
# print(2 & 15)
# print(4 & 15)
| 9.333333
| 15
| 0.482143
| 11
| 56
| 2.454545
| 0.545455
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.275
| 0.285714
| 56
| 5
| 16
| 11.2
| 0.4
| 0.732143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
cf195d5fef4a56e7a7594f1dcf361dc4bf70522f
| 1,191
|
py
|
Python
|
autogluon/utils/tabular/ml/models/lgb/lgb_utils.py
|
zhanghang1989/autogluon
|
8bfe6b0da8915020eeb9895fd18d7688c0d604c1
|
[
"Apache-2.0"
] | 2
|
2021-09-14T21:28:54.000Z
|
2021-11-17T09:52:41.000Z
|
autogluon/utils/tabular/ml/models/lgb/lgb_utils.py
|
zhanghang1989/autogluon
|
8bfe6b0da8915020eeb9895fd18d7688c0d604c1
|
[
"Apache-2.0"
] | null | null | null |
autogluon/utils/tabular/ml/models/lgb/lgb_utils.py
|
zhanghang1989/autogluon
|
8bfe6b0da8915020eeb9895fd18d7688c0d604c1
|
[
"Apache-2.0"
] | 1
|
2021-09-14T21:28:55.000Z
|
2021-09-14T21:28:55.000Z
|
import numpy as np
from ...constants import MULTICLASS
def func_generator(metric, is_higher_better, needs_pred_proba, problem_type):
if needs_pred_proba:
if problem_type == MULTICLASS:
def function_template(y_hat, data):
y_true = data.get_label()
y_hat = y_hat.reshape(len(np.unique(y_true)), -1).T
return metric.name, metric(y_true, y_hat), is_higher_better
else:
def function_template(y_hat, data):
y_true = data.get_label()
return metric.name, metric(y_true, y_hat), is_higher_better
else:
if problem_type == MULTICLASS:
def function_template(y_hat, data):
y_true = data.get_label()
y_hat = y_hat.reshape(len(np.unique(y_true)), -1)
y_hat = y_hat.argmax(axis=0)
return metric.name, metric(y_true, y_hat), is_higher_better
else:
def function_template(y_hat, data):
y_true = data.get_label()
y_hat = np.round(y_hat)
return metric.name, metric(y_true, y_hat), is_higher_better
return function_template
| 37.21875
| 77
| 0.595298
| 162
| 1,191
| 4.049383
| 0.246914
| 0.097561
| 0.106707
| 0.121951
| 0.734756
| 0.734756
| 0.734756
| 0.734756
| 0.734756
| 0.734756
| 0
| 0.003676
| 0.314861
| 1,191
| 31
| 78
| 38.419355
| 0.800245
| 0
| 0
| 0.653846
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.192308
| false
| 0
| 0.076923
| 0
| 0.461538
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
cf792fe78cf636c698702ca1c33586c7523a0890
| 43,067
|
py
|
Python
|
shenfun/chebyshev/matrices.py
|
jaisw7/shenfun
|
7482beb5b35580bc45f72704b69343cc6fc1d773
|
[
"BSD-2-Clause"
] | 1
|
2021-03-06T09:29:39.000Z
|
2021-03-06T09:29:39.000Z
|
shenfun/chebyshev/matrices.py
|
jaisw7/shenfun
|
7482beb5b35580bc45f72704b69343cc6fc1d773
|
[
"BSD-2-Clause"
] | null | null | null |
shenfun/chebyshev/matrices.py
|
jaisw7/shenfun
|
7482beb5b35580bc45f72704b69343cc6fc1d773
|
[
"BSD-2-Clause"
] | null | null | null |
r"""
This module contains specific inner product matrices for the different bases in
the Chebyshev family.
A naming convention is used for the first three capital letters for all matrices.
The first letter refers to type of matrix.
- Mass matrices start with `B`
- One derivative start with `C`
- Two derivatives (Laplace) start with `A`
- Four derivatives (Biharmonic) start with `S`
The next two letters refer to the test and trialfunctions, respectively
- Dirichlet: `D`
- Neumann: `N`
- Chebyshev: `T`
- Biharmonic: `B`
As such, there are 4 symmetric mass matrices, BDDmat, BNNmat, BTTmat and BBBmat,
corresponding to the four bases above.
A matrix may consist of different types of test and trialfunctions as long as
they are all in the Chebyshev family. A mass matrix using Dirichlet test and
Neumann trial is named BDNmat.
All matrices in this module may be looked up using the 'mat' dictionary,
which takes test and trialfunctions along with the number of derivatives
to be applied to each. As such the mass matrix BDDmat may be looked up
as
>>> from shenfun.chebyshev.matrices import mat
>>> from shenfun.chebyshev.bases import ShenDirichlet as SD
>>> B = mat[((SD, 0), (SD, 0))]
and an instance of the matrix can be created as
>>> B0 = SD(10)
>>> BM = B((B0, 0), (B0, 0))
>>> import numpy as np
>>> d = {-2: np.array([-np.pi/2]),
... 0: np.array([ 1.5*np.pi, np.pi, np.pi, np.pi, np.pi, np.pi, np.pi, np.pi]),
... 2: np.array([-np.pi/2])}
>>> [np.all(BM[k] == v) for k, v in d.items()]
[True, True, True]
However, this way of creating matrices is not reccommended use. It is far
more elegant to use the TrialFunction/TestFunction interface, and to
generate the matrix as an inner product:
>>> from shenfun import TrialFunction, TestFunction, inner
>>> u = TrialFunction(B0)
>>> v = TestFunction(B0)
>>> BM = inner(u, v)
>>> [np.all(BM[k] == v) for k, v in d.items()]
[True, True, True]
To see that this is in fact the BDDmat:
>>> print(BM.__class__)
<class 'shenfun.chebyshev.matrices.BDDmat'>
"""
#pylint: disable=bad-continuation, redefined-builtin
from __future__ import division
import functools
import numpy as np
from shenfun.optimization import cython
from shenfun.matrixbase import SpectralMatrix
from shenfun.la import TDMA as neumann_TDMA
from .la import TDMA
from . import bases
# Short names for instances of bases
CB = bases.Orthogonal
SD = bases.ShenDirichlet
SB = bases.ShenBiharmonic
SN = bases.ShenNeumann
BD = bases.BCDirichlet
BB = bases.BCBiharmonic
def get_ck(N, quad):
"""Return array ck, parameter in Chebyshev expansions
Parameters
----------
N : int
Number of quadrature points
quad : str
Type of quadrature
- GL - Chebyshev-Gauss-Lobatto
- GC - Chebyshev-Gauss
"""
ck = np.ones(N, int)
ck[0] = 2
if quad == "GL":
ck[-1] = 2
return ck
def dmax(N, M, d):
Z = min(N, M)
return Z-abs(d)+min(max((M-N)*int(d/abs(d)), 0), abs(d))
class BDDmat(SpectralMatrix):
r"""Matrix for inner product
.. math::
B_{kj}=(\phi_j, \phi_k)_w
where
.. math::
j = 0, 1, ..., N-2 \text{ and } k = 0, 1, ..., N-2
and :math:`\phi_j` is a Shen Dirichlet basis function.
"""
def __init__(self, test, trial, measure=1):
assert isinstance(test[0], SD)
assert isinstance(trial[0], SD)
ck = get_ck(test[0].N, test[0].quad)
d = {0: np.pi/2*(ck[:-2]+ck[2:]),
2: np.array([-np.pi/2])}
d[-2] = d[2]
SpectralMatrix.__init__(self, d, test, trial, measure=measure)
self.solve = TDMA(self)
self._matvec_methods += ['cython', 'self']
def matvec(self, v, c, format='cython', axis=0):
N, M = self.shape
c.fill(0)
# Cython implementation only handles square matrix
if not M == N:
format = 'csr'
if format == 'cython' and v.ndim == 3:
ld = self[-2]*np.ones(M-2)
cython.Matvec.Tridiagonal_matvec3D_ptr(v, c, ld, self[0], ld, axis)
self.scale_array(c)
elif format == 'cython' and v.ndim == 2:
ld = self[-2]*np.ones(M-2)
cython.Matvec.Tridiagonal_matvec2D_ptr(v, c, ld, self[0], ld, axis)
self.scale_array(c)
elif format == 'cython' and v.ndim == 1:
ld = self[-2]*np.ones(M-2)
cython.Matvec.Tridiagonal_matvec(v, c, ld, self[0], ld)
self.scale_array(c)
elif format == 'self':
if axis > 0:
v = np.moveaxis(v, axis, 0)
c = np.moveaxis(c, axis, 0)
s = (slice(0, M),)+(np.newaxis,)*(v.ndim-1) # broadcasting
sm2 = (slice(0, M-2),)+(np.newaxis,)*(v.ndim-1) # broadcasting
c[:(M-2)] = self[2][sm2]*v[2:M]
c[:M] += self[0][s]*v[:M]
c[2:M] += self[-2][sm2]*v[:(M-2)]
if axis > 0:
v = np.moveaxis(v, 0, axis)
c = np.moveaxis(c, 0, axis)
self.scale_array(c)
else:
c = super(BDDmat, self).matvec(v, c, format=format, axis=axis)
return c
class BNDmat(SpectralMatrix):
r"""Mass matrix for inner product
.. math::
B_{kj} = (\phi_j, \psi_k)_w
where
.. math::
j = 0, 1, ..., N-2 \text{ and } k = 1, 2, ..., N-2
:math:`\psi_k` is the Shen Dirichlet basis function and :math:`\phi_j` is a
Shen Neumann basis function.
For simplicity, the matrix is stored including the zero index row
(:math:`k=0`)
"""
def __init__(self, test, trial, measure=1):
assert isinstance(test[0], SN)
assert isinstance(trial[0], SD)
N = test[0].N
M = trial[0].N
Q = min(N, M)
ck = get_ck(Q, test[0].quad)
k = np.arange(Q-2, dtype=np.float)
d = {-2: -np.pi/2,
0: np.pi/2.*(ck[:-2]+ck[2:]*(k/(k+2))**2)}
d2 = -np.pi/2*(k/(k+2))**2
d[2] = d2[:dmax(N-2, M-2, 2)]
SpectralMatrix.__init__(self, d, test, trial, measure=measure)
def matvec(self, v, c, format='csr', axis=0):
c = super(BNDmat, self).matvec(v, c, format=format, axis=axis)
s = [slice(None),]*v.ndim
s[axis] = 0
c[tuple(s)] = 0
return c
class BDNmat(SpectralMatrix):
r"""Mass matrix for inner product
.. math::
B_{kj} = (\psi_j, \phi_k)_w
where
.. math::
j = 1, 2, ..., N-2 \text{ and } k = 0, 1, ..., N-2
:math:`\psi_j` is the Shen Dirichlet basis function and :math:`\phi_k` is a
Shen Neumann basis function.
For simplicity, the matrix is stored including the zero index column
(:math:`j=0`)
"""
def __init__(self, test, trial, measure=1):
assert isinstance(test[0], SD)
assert isinstance(trial[0], SN)
N = test[0].N
M = trial[0].N
Q = min(N, M)
ck = get_ck(Q, test[0].quad)
k = np.arange(Q-2, dtype=np.float)
d = {0: np.pi/2.*(ck[:-2]+ck[2:]*(k/(k+2))**2),
2: -np.pi/2}
d[-2] = (-np.pi/2*(k/(k+2))**2)[:dmax(N-2, M-2, -2)]
SpectralMatrix.__init__(self, d, test, trial, measure=measure)
self._matvec_methods += ['cython']
def matvec(self, v, c, format='cython', axis=0):
c.fill(0)
N, M = self.shape
if not M == N:
format = 'csr'
if format == 'cython' and v.ndim == 3:
cython.Matvec.BDN_matvec3D_ptr(v, c, self[-2], self[0], self[2], axis)
self.scale_array(c)
elif format == 'cython' and v.ndim == 2:
cython.Matvec.BDN_matvec2D_ptr(v, c, self[-2], self[0], self[2], axis)
self.scale_array(c)
elif format == 'cython' and v.ndim == 1:
cython.Matvec.BDN_matvec1D_ptr(v, c, self[-2], self[0], self[2])
self.scale_array(c)
else:
c = super(BDNmat, self).matvec(v, c, format=format, axis=axis)
return c
class BNTmat(SpectralMatrix):
r"""Mass matrix for inner product
.. math::
B_{kj} = (T_j, \phi_k)_w
where
.. math::
j = 0, 1, ..., N \text{ and } k = 1, 2, ..., N-2
:math:`\phi_k` is the Shen Neumann basis function and :math:`T_j` is a
Chebyshev basis function.
For simplicity, the matrix is stored including the zero index row
(:math:`k=0`)
"""
def __init__(self, test, trial, measure=1):
assert isinstance(test[0], SN)
assert isinstance(trial[0], CB)
SpectralMatrix.__init__(self, {}, test, trial)
def matvec(self, v, c, format='csr', axis=0):
c = super(BNTmat, self).matvec(v, c, format=format, axis=axis)
s = [slice(None),]*v.ndim
s[axis] = 0
c[tuple(s)] = 0
return c
class BNBmat(SpectralMatrix):
r"""Mass matrix for inner product
.. math::
B_{kj} = (\phi_j, \psi_k)_w
where
.. math::
j = 0, 1, ..., N-4 \text{ and } k = 1, 2, ..., N-2
:math:`\psi_k` is the Shen Neumann basis function and :math:`\phi_j` is a
Shen biharmonic basis function.
For simplicity, the matrix is stored including the zero index row
(:math:`k=0`)
"""
def __init__(self, test, trial, measure=1):
assert isinstance(test[0], SN)
assert isinstance(trial[0], SB)
SpectralMatrix.__init__(self, {}, test, trial)
def matvec(self, v, c, format='csr', axis=0):
c = super(BNBmat, self).matvec(v, c, format=format, axis=axis)
s = [slice(None),]*v.ndim
s[axis] = 0
c[tuple(s)] = 0
return c
class BTTmat(SpectralMatrix):
r"""Mass matrix for inner product
.. math::
B_{kj} = (T_j, T_k)_w
where
.. math::
j = 0, 1, ..., N \text{ and } k = 0, 1, ..., N
and :math:`T_j` is the jth order Chebyshev function of the first kind.
"""
def __init__(self, test, trial, measure=1):
assert isinstance(test[0], CB)
assert isinstance(trial[0], CB)
ck = get_ck(min(test[0].N, trial[0].N), test[0].quad)
SpectralMatrix.__init__(self, {0: np.pi/2*ck}, test, trial)
self._matvec_methods += ['self']
def matvec(self, v, c, format='csr', axis=0):
c.fill(0)
N, M = self.shape
if not M == N:
format = 'csr'
if format == 'self':
s = [np.newaxis,]*v.ndim # broadcasting
d = tuple(slice(0, m) for m in v.shape)
N, M = self.shape
s[axis] = slice(0, M)
s = tuple(s)
c[d] = self[0][s]*v[d]
self.scale_array(c)
else:
c = super(BTTmat, self).matvec(v, c, format=format, axis=axis)
return c
def solve(self, b, u=None, axis=0):
s = self.trialfunction[0].slice()
if u is None:
u = b
else:
assert u.shape == b.shape
sl = [np.newaxis]*u.ndim
sl[axis] = s
sl = tuple(sl)
ss = self.trialfunction[0].sl[s]
d = (1./self.scale)/self[0]
u[ss] = b[ss]*d[sl]
return u
class BNNmat(SpectralMatrix):
r"""Mass matrix for inner product
.. math::
B_{kj} = (\phi_j, \phi_k)_w
where
.. math::
j = 1, 2, ..., N-2 \text{ and } k = 1, 2, ..., N-2
and :math:`\phi_j` is the Shen Neumann basis function.
The matrix is stored including the zero index row and column
"""
def __init__(self, test, trial, measure=1):
assert isinstance(test[0], SN)
assert isinstance(trial[0], SN)
N = test[0].N
M = trial[0].N
Q = min(N, M)
ck = get_ck(Q, test[0].quad)
k = np.arange(Q-2, dtype=np.float)
d = {0: np.pi/2*(ck[:-2]+ck[2:]*(k[:]/(k[:]+2))**4)}
dp = dmax(N-2, M-2, 2)
d[2] = -np.pi/2*(k[:dp]/(k[:dp]+2))**2
dm = dmax(N-2, M-2, -2)
d[-2] = -np.pi/2*(k[:dm]/(k[:dm]+2))**2
SpectralMatrix.__init__(self, d, test, trial, measure=measure)
self.solve = neumann_TDMA(self)
def matvec(self, v, c, format='csr', axis=0):
c = super(BNNmat, self).matvec(v, c, format=format, axis=axis)
s = [slice(None),]*v.ndim
s[axis] = 0
c[tuple(s)] = 0
return c
class BDTmat(SpectralMatrix):
r"""Mass matrix for inner product
.. math::
B_{kj} = (T_j, \phi_k)_w
where
.. math::
j = 0, 1, ..., N \text{ and } k = 0, 1, ..., N-2
:math:`\phi_k` is the Shen Dirichlet basis function and :math:`T_j` is the
Chebyshev basis function.
"""
def __init__(self, test, trial, measure=1):
assert isinstance(test[0], SD)
assert isinstance(trial[0], CB)
N = test[0].N-2
M = trial[0].N
Q = min(N, M)
ck = get_ck(Q+2, test[0].quad)
d = {0: np.pi/2*ck[:Q],
2: -np.pi/2*ck[2:(dmax(N, M, 2)+2)]}
SpectralMatrix.__init__(self, d, test, trial, measure=measure)
class BTDmat(SpectralMatrix):
r"""Mass matrix for inner product
.. math::
B_{kj} = (\phi_j, T_k)_w
where
.. math::
j = 0, 1, ..., N-2 \text{ and } k = 0, 1, ..., N
:math:`\phi_j` is the Shen Dirichlet basis function and :math:`T_k` is the
Chebyshev basis function.
"""
def __init__(self, test, trial, measure=1):
assert isinstance(test[0], CB)
assert isinstance(trial[0], SD)
N = test[0].N
M = trial[0].N-2
Q = min(N, M)
ck = get_ck(N, test[0].quad)
d = {0: np.pi/2*ck[:Q]}
d[-2] = -np.pi/2*ck[2:(dmax(N, M, -2)+2)]
SpectralMatrix.__init__(self, d, test, trial, measure=measure)
class BTNmat(SpectralMatrix):
r"""Mass matrix for inner product
.. math::
B_{kj} = (\phi_j, T_k)_w
where
.. math::
j = 1, 2, ..., N-2 \text{ and } k = 0, 1, ..., N
:math:`\phi_j` is the Shen Neumann basis function and :math:`T_k` is the
Chebyshev basis function.
"""
def __init__(self, test, trial, measure=1):
assert isinstance(test[0], CB)
assert isinstance(trial[0], SN)
N = test[0].N
ck = get_ck(N, test[0].quad)
k = np.arange(N, dtype=np.float)
d = {-2: -np.pi/2*ck[2:]*((k[2:]-2)/k[2:])**2,
0: np.pi/2*ck[:-2]}
SpectralMatrix.__init__(self, d, test, trial, measure=measure)
class BBBmat(SpectralMatrix):
r"""Mass matrix for inner product
.. math::
B_{kj} = (\psi_j, \psi_k)_w
where
.. math::
j = 0, 1, ..., N-4 \text{ and } k = 0, 1, ..., N-4
and :math:`\psi_j` is the Shen Biharmonic basis function.
"""
def __init__(self, test, trial, measure=1):
assert isinstance(test[0], SB)
assert isinstance(trial[0], SB)
from shenfun.la import PDMA
N = test[0].N
M = trial[0].N
Q = min(N, M)
ck = get_ck(Q, test[0].quad)
k = np.arange(Q-4, dtype=np.float)
d = {0: (ck[:Q-4] + 4*((k+2)/(k+3))**2 + ck[4:]*((k+1)/(k+3))**2)*np.pi/2.}
d4 = (k+1)/(k+3)*np.pi/2
d2 = -((k+2)/(k+3)+(k+4)*(k+1)/((k+5)*(k+3)))*np.pi
d[2] = d2[:dmax(N-4, M-4, 2)]
d[4] = d4[:dmax(N-4, M-4, 4)]
d[-2] = d2[:dmax(N-4, M-4, -2)]
d[-4] = d4[:dmax(N-4, M-4, -4)]
SpectralMatrix.__init__(self, d, test, trial, measure=measure)
self.solve = PDMA(self)
self._matvec_methods += ['cython', 'self']
def matvec(self, v, c, format='cython', axis=0):
c.fill(0)
N, M = self.shape
if not M == N:
format = 'csr'
if format == 'self':
if axis > 0:
v = np.moveaxis(v, axis, 0)
c = np.moveaxis(c, axis, 0)
vv = v[:-4]
s = (slice(None),) + (np.newaxis,)*(v.ndim-1) # broadcasting
c[:N] = self[0][s] * vv[:]
c[:N-2] += self[2][s] * vv[2:]
c[:N-4] += self[4][s] * vv[4:]
c[2:N] += self[-2][s] * vv[:-2]
c[4:N] += self[-4][s] * vv[:-4]
if axis > 0:
v = np.moveaxis(v, 0, axis)
c = np.moveaxis(c, 0, axis)
self.scale_array(c)
elif format == 'cython' and v.ndim == 3:
cython.Matvec.Pentadiagonal_matvec3D_ptr(v, c, self[-4], self[-2], self[0],
self[2], self[4], axis)
self.scale_array(c)
elif format == 'cython' and v.ndim == 2:
cython.Matvec.Pentadiagonal_matvec2D_ptr(v, c, self[-4], self[-2], self[0],
self[2], self[4], axis)
self.scale_array(c)
elif format == 'cython' and v.ndim == 1:
cython.Matvec.Pentadiagonal_matvec(v, c, self[-4], self[-2], self[0],
self[2], self[4])
self.scale_array(c)
else:
c = super(BBBmat, self).matvec(v, c, format=format, axis=axis)
return c
class BBDmat(SpectralMatrix):
r"""Mass matrix for inner product
.. math::
B_{kj} = (\phi_j, \psi_k)_w
where
.. math::
j = 0, 1, ..., N-2 \text{ and } k = 0, 1, ..., N-4
and :math:`\phi_j` is the Shen Dirichlet basis function and :math:`\psi_k`
the Shen Biharmonic basis function.
"""
def __init__(self, test, trial, measure=1):
assert isinstance(test[0], SB)
assert isinstance(trial[0], SD)
N = test[0].N
ck = get_ck(N, test[0].quad)
k = np.arange(N-4, dtype=np.float)
a = 2*(k+2)/(k+3)
b = (k[:N-4]+1)/(k[:N-4]+3)
d = {-2: -np.pi/2,
0: (ck[:N-4] + a)*np.pi/2,
2: -(a+b*ck[4:])*np.pi/2,
4: b[:-2]*np.pi/2}
SpectralMatrix.__init__(self, d, test, trial, measure=measure)
self._matvec_methods += ['cython', 'self']
def matvec(self, v, c, format='cython', axis=0):
c.fill(0)
N = self.shape[0]
if format == 'self':
if axis > 0:
v = np.moveaxis(v, axis, 0)
c = np.moveaxis(c, axis, 0)
vv = v[:-2]
s = (slice(None),) + (np.newaxis,)*(v.ndim-1) # broadcasting
c[:N] = self[0][s] * vv[:-2]
c[:N] += self[2][s] * vv[2:]
c[:N-2] += self[4][s] * vv[4:]
c[2:N] += self[-2] * vv[:-4]
if axis > 0:
c = np.moveaxis(c, 0, axis)
v = np.moveaxis(v, 0, axis)
self.scale_array(c)
elif format == 'cython' and v.ndim == 3:
cython.Matvec.BBD_matvec3D_ptr(v, c, self[-2], self[0], self[2], self[4], axis)
self.scale_array(c)
elif format == 'cython' and v.ndim == 2:
cython.Matvec.BBD_matvec2D_ptr(v, c, self[-2], self[0], self[2], self[4], axis)
self.scale_array(c)
elif format == 'cython' and v.ndim == 1:
cython.Matvec.BBD_matvec1D_ptr(v, c, self[-2], self[0], self[2], self[4])
self.scale_array(c)
else:
c = super(BBDmat, self).matvec(v, c, format=format, axis=axis)
return c
class CDNmat(SpectralMatrix):
r"""Matrix for inner product
.. math::
C_{kj} = (\psi'_j, \phi_k)_w
where
.. math::
j = 1, 2, ..., N-2 \text{ and } k = 0, 1, ..., N-2
and :math:`\phi_k` is the Shen Dirichlet basis function and :math:`\psi_j`
the Shen Neumann basis function.
For simplicity, the matrix is stored including the zero index row (k=0)
"""
def __init__(self, test, trial, measure=1):
assert isinstance(test[0], SD)
assert isinstance(trial[0], SN)
N = test[0].N
k = np.arange(N-2, dtype=np.float)
d = {-1: -((k[1:]-1)/(k[1:]+1))**2*(k[1:]+1)*np.pi,
1: (k[:-1]+1)*np.pi}
SpectralMatrix.__init__(self, d, test, trial, measure=measure)
self._matvec_methods += ['cython']
def matvec(self, v, c, format='cython', axis=0):
c.fill(0)
if format == 'cython' and v.ndim == 3:
cython.Matvec.CDN_matvec3D_ptr(v, c, self[-1], self[1], axis)
self.scale_array(c)
elif format == 'cython' and v.ndim == 2:
cython.Matvec.CDN_matvec2D_ptr(v, c, self[-1], self[1], axis)
self.scale_array(c)
elif format == 'cython' and v.ndim == 1:
cython.Matvec.CDN_matvec1D_ptr(v, c, self[-1], self[1])
self.scale_array(c)
else:
c = super(CDNmat, self).matvec(v, c, format=format, axis=axis)
return c
class CDDmat(SpectralMatrix):
r"""Matrix for inner product
.. math::
C_{kj} = (\phi'_j, \phi_k)_w
where
.. math::
j = 0, 1, ..., N-2 \text{ and } k = 0, 1, ..., N-2
and :math:`\phi_k` is the Shen Dirichlet basis function.
"""
def __init__(self, test, trial, measure=1):
assert isinstance(test[0], SD)
assert isinstance(trial[0], SD)
N = test[0].N
k = np.arange(N, dtype=np.float)
d = {-1: -(k[1:N-2]+1)*np.pi,
1: (k[:(N-3)]+1)*np.pi}
SpectralMatrix.__init__(self, d, test, trial, measure=measure)
self._matvec_methods += ['cython', 'self']
def matvec(self, v, c, format='cython', axis=0):
N = self.shape[0]
c.fill(0)
if format == 'self':
if axis > 0:
v = np.moveaxis(v, axis, 0)
c = np.moveaxis(c, axis, 0)
s = (slice(None),) + (np.newaxis,)*(v.ndim-1) # broadcasting
c[:N-1] = self[1][s]*v[1:N]
c[1:N] += self[-1][s]*v[:(N-1)]
if axis > 0:
v = np.moveaxis(v, 0, axis)
c = np.moveaxis(c, 0, axis)
self.scale_array(c)
elif format == 'cython' and v.ndim == 3:
cython.Matvec.CDD_matvec3D_ptr(v, c, self[-1], self[1], axis)
self.scale_array(c)
elif format == 'cython' and v.ndim == 2:
cython.Matvec.CDD_matvec2D_ptr(v, c, self[-1], self[1], axis)
self.scale_array(c)
elif format == 'cython' and v.ndim == 1:
cython.Matvec.CDD_matvec1D_ptr(v, c, self[-1], self[1])
self.scale_array(c)
else:
c = super(CDDmat, self).matvec(v, c, format=format, axis=axis)
return c
class CNDmat(SpectralMatrix):
r"""Matrix for inner product
.. math::
C_{kj} = (\phi'_j, \psi_k)_w
where
.. math::
j = 0, 1, ..., N-2 \text{ and } k = 1, 2, ..., N-2
and :math:`\phi_j` is the Shen Dirichlet basis function and :math:`\psi_k`
the Shen Neumann basis function.
For simplicity, the matrix is stored including the zero index coloumn (j=0)
"""
def __init__(self, test, trial, measure=1):
assert isinstance(test[0], SN)
assert isinstance(trial[0], SD)
N = test[0].N
k = np.arange(N-2, dtype=np.float)
d = {-1: -(k[1:]+1)*np.pi,
1: -(2-k[:-1]**2/(k[:-1]+2)**2*(k[:-1]+3))*np.pi}
for i in range(3, N-1, 2):
d[i] = -(1-k[:-i]**2/(k[:-i]+2)**2)*2*np.pi
SpectralMatrix.__init__(self, d, test, trial, measure=measure)
def matvec(self, v, c, format='csr', axis=0):
c = super(CNDmat, self).matvec(v, c, format=format, axis=axis)
s = [slice(None),]*v.ndim
s[axis] = 0
c[tuple(s)] = 0
return c
class CTDmat(SpectralMatrix):
r"""Matrix for inner product
.. math::
C_{kj} = (\phi'_j, T_k)_w
where
.. math::
j = 0, 1, ..., N-2 \text{ and } k = 0, 1, ..., N
:math:`\phi_j` is the Shen Dirichlet basis function and :math:`T_k` is the
Chebyshev basis function.
"""
def __init__(self, test, trial, measure=1):
assert isinstance(test[0], CB)
assert isinstance(trial[0], SD)
N = test[0].N
k = np.arange(N, dtype=np.float)
d = {-1: -(k[1:N-1]+1)*np.pi,
1: -2*np.pi}
for i in range(3, N-2, 2):
d[i] = -2*np.pi
SpectralMatrix.__init__(self, d, test, trial, measure=measure)
class CDTmat(SpectralMatrix):
r"""Matrix for inner product
.. math::
C_{kj} = (T'_j, \phi_k)_w
where
.. math::
j = 0, 1, ..., N \text{ and } k = 0, 1, ..., N-2
:math:`\phi_k` is the Shen Dirichlet basis function and :math:`T_j` is the
Chebyshev basis function.
"""
def __init__(self, test, trial, measure=1):
assert isinstance(test[0], SD)
assert isinstance(trial[0], CB)
N = test[0].N
k = np.arange(N, dtype=np.float)
d = {1: np.pi*(k[:N-2]+1)}
SpectralMatrix.__init__(self, d, test, trial, measure=measure)
class CTTmat(SpectralMatrix):
r"""Matrix for inner product
.. math::
C_{kj} = (T'_j, T_k)_w
where
.. math::
j = 0, 1, ..., N \text{ and } k = 0, 1, ..., N
:math:`T_k` is the Chebyshev basis function.
"""
def __init__(self, test, trial, measure=1):
assert isinstance(test[0], CB)
assert isinstance(trial[0], CB)
N = test[0].N
k = np.arange(N, dtype=np.float)
d = {}
for i in range(1, N, 2):
d[i] = np.pi*k[i:]
SpectralMatrix.__init__(self, d, test, trial, measure=measure)
self._matvec_methods += ['cython']
def matvec(self, v, c, format='cython', axis=0):
c.fill(0)
if format == 'cython' and v.ndim == 3:
cython.Matvec.CTT_matvec3D_ptr(v, c, axis)
self.scale_array(c)
elif format == 'cython' and v.ndim == 2:
cython.Matvec.CTT_matvec2D_ptr(v, c, axis)
self.scale_array(c)
elif format == 'cython' and v.ndim == 1:
cython.Matvec.CTT_matvec(v, c)
self.scale_array(c)
else:
c = super(CTTmat, self).matvec(v, c, format=format, axis=axis)
return c
class CBDmat(SpectralMatrix):
r"""Matrix for inner product
.. math::
C_{kj} = (\phi'_j, \psi_k)_w
where
.. math::
j = 0, 1, ..., N-2 \text{ and } k = 0, 1, ..., N-4
:math:`\phi_j` is the Shen Dirichlet basis and :math:`\psi_k` the Shen
Biharmonic basis function.
"""
def __init__(self, test, trial, measure=1):
assert isinstance(test[0], SB)
assert isinstance(trial[0], SD)
N = test[0].N
k = np.arange(N, dtype=np.float)
d = {-1: -(k[1:N-4]+1)*np.pi,
1: 2*(k[:N-4]+1)*np.pi,
3: -(k[:N-5]+1)*np.pi}
SpectralMatrix.__init__(self, d, test, trial, measure=measure)
self._matvec_methods += ['cython', 'self']
def matvec(self, v, c, format='cython', axis=0):
N, M = self.shape
c.fill(0)
if format == 'self':
if axis > 0:
c = np.moveaxis(c, axis, 0)
v = np.moveaxis(v, axis, 0)
s = (slice(None),) + (np.newaxis,)*(v.ndim-1) # broadcasting
c[1:N] = self[-1][s]*v[:M-3]
c[:N] += self[1][s]*v[1:M-1]
c[:N-1] += self[3][s]*v[3:M]
if axis > 0:
c = np.moveaxis(c, 0, axis)
v = np.moveaxis(v, 0, axis)
self.scale_array(c)
elif format == 'cython' and v.ndim == 3:
cython.Matvec.CBD_matvec3D_ptr(v, c, self[-1], self[1], self[3], axis)
self.scale_array(c)
elif format == 'cython' and v.ndim == 2:
cython.Matvec.CBD_matvec2D_ptr(v, c, self[-1], self[1], self[3], axis)
self.scale_array(c)
elif format == 'cython' and v.ndim == 1:
cython.Matvec.CBD_matvec(v, c, self[-1], self[1], self[3])
self.scale_array(c)
else:
c = super(CBDmat, self).matvec(v, c, format=format, axis=axis)
return c
class CDBmat(SpectralMatrix):
r"""Matrix for inner product
.. math::
C_{kj} = (\psi'_j, \phi_k)_w
where
j = 0, 1, ..., N-4 \text{ and } k = 0, 1, ..., N-2
:math:`\phi_k` is the Shen Dirichlet basis function and :math:`\psi_j` the
Shen Biharmonic basis function.
"""
def __init__(self, test, trial, measure=1):
assert isinstance(test[0], SD)
assert isinstance(trial[0], SB)
N = test[0].N
k = np.arange(N, dtype=np.float)
d = {-3: (k[3:-2]-2)*(k[3:-2]+1)/k[3:-2]*np.pi,
-1: -2*(k[1:-3]+1)**2/(k[1:-3]+2)*np.pi,
1: (k[:-5]+1)*np.pi}
SpectralMatrix.__init__(self, d, test, trial, measure=measure)
self._matvec_methods += ['cython', 'self']
def matvec(self, v, c, format='cython', axis=0):
N, M = self.shape
c.fill(0)
if format == 'self':
if axis > 0:
c = np.moveaxis(c, axis, 0)
v = np.moveaxis(v, axis, 0)
s = (slice(None),) + (np.newaxis,)*(v.ndim-1) # broadcasting
c[3:N] = self[-3][s] * v[:M-1]
c[1:N-1] += self[-1][s] * v[:M]
c[:N-3] += self[1][s] * v[1:M]
if axis > 0:
c = np.moveaxis(c, 0, axis)
v = np.moveaxis(v, 0, axis)
self.scale_array(c)
elif format == 'cython' and v.ndim == 3:
cython.Matvec.CDB_matvec3D_ptr(v, c, self[-3], self[-1], self[1], axis)
self.scale_array(c)
elif format == 'cython' and v.ndim == 2:
cython.Matvec.CDB_matvec2D_ptr(v, c, self[-3], self[-1], self[1], axis)
self.scale_array(c)
elif format == 'cython' and v.ndim == 1:
cython.Matvec.CDB_matvec(v, c, self[-3], self[-1], self[1])
self.scale_array(c)
else:
c = super(CDBmat, self).matvec(v, c, format=format, axis=axis)
return c
class ABBmat(SpectralMatrix):
r"""Stiffness matrix for inner product
.. math::
A_{kj} = (\psi''_j, \psi_k)_w
where
.. math::
j = 0, 1, ..., N-4 \text{ and } k = 0, 1, ..., N-4
and :math:`\psi_k` is the Shen Biharmonic basis function.
"""
def __init__(self, test, trial, measure=1):
assert isinstance(test[0], SB)
assert isinstance(trial[0], SB)
N = test[0].N
k = np.arange(N-4, dtype=np.float)
d = {-2: 2*(k[2:]-1)*(k[2:]+2)*np.pi,
0: -4*((k+1)*(k+2)**2)/(k+3)*np.pi,
2: 2*(k[:-2]+1)*(k[:-2]+2)*np.pi}
SpectralMatrix.__init__(self, d, test, trial, measure=measure)
self._matvec_methods += ['cython', 'self']
def matvec(self, v, c, format='cython', axis=0):
N = self.shape[0]
c.fill(0)
if format == 'self':
if axis > 0:
c = np.moveaxis(c, axis, 0)
v = np.moveaxis(v, axis, 0)
s = (slice(None),) + (np.newaxis,)*(v.ndim-1) # broadcasting
c[:N] = self[0][s] * v[:N]
c[:N-2] += self[2][s] * v[2:N]
c[2:N] += self[-2][s] * v[:N-2]
if axis > 0:
c = np.moveaxis(c, 0, axis)
v = np.moveaxis(v, 0, axis)
self.scale_array(c)
elif format == 'cython' and v.ndim == 3:
cython.Matvec.Tridiagonal_matvec3D_ptr(v, c, self[-2], self[0], self[2], axis)
self.scale_array(c)
elif format == 'cython' and v.ndim == 2:
cython.Matvec.Tridiagonal_matvec2D_ptr(v, c, self[-2], self[0], self[2], axis)
self.scale_array(c)
elif format == 'cython' and v.ndim == 1:
cython.Matvec.Tridiagonal_matvec(v, c, self[-2], self[0], self[2])
self.scale_array(c)
else:
c = super(ABBmat, self).matvec(v, c, format=format, axis=axis)
return c
class ADDmat(SpectralMatrix):
r"""Stiffness matrix for inner product
.. math::
A_{kj} = (\psi''_j, \psi_k)_w
where
.. math::
j = 0, 1, ..., N-2 \text{ and } k = 0, 1, ..., N-2
and :math:`\psi_k` is the Shen Dirichlet basis function.
"""
def __init__(self, test, trial, measure=1):
assert isinstance(test[0], SD)
assert isinstance(trial[0], SD)
N = test[0].N
k = np.arange(N, dtype=np.float)
d = {0: -2*np.pi*(k[:N-2]+1)*(k[:N-2]+2)}
for i in range(2, N-2, 2):
d[i] = -4*np.pi*(k[:-(i+2)]+1)
SpectralMatrix.__init__(self, d, test, trial, measure=measure)
self._matvec_methods += ['cython']
# Following storage more efficient, but requires effort in iadd/isub...
# d = {0: -2*np.pi*(k[:N-2]+1)*(k[:N-2]+2),
# 2: -4*np.pi*(k[:-4]+1)}
# for i in range(4, N-2, 2):
# d[i] = d[2][:2-i]
def matvec(self, v, c, format='cython', axis=0):
c.fill(0)
if format == 'cython' and v.ndim == 3:
cython.Matvec.ADD_matvec3D_ptr(v, c, self[0], axis)
self.scale_array(c)
elif format == 'cython' and v.ndim == 2:
cython.Matvec.ADD_matvec2D_ptr(v, c, self[0], axis)
self.scale_array(c)
elif format == 'cython' and v.ndim == 1:
cython.Matvec.ADD_matvec(v, c, self[0])
self.scale_array(c)
else:
c = super(ADDmat, self).matvec(v, c, format=format, axis=axis)
return c
def solve(self, b, u=None, axis=0):
N = self.shape[0] + 2
assert N == b.shape[0]
s = self.trialfunction[0].slice()
if u is None:
u = b
else:
assert u.shape == b.shape
# Move axis to first
if axis > 0:
u = np.moveaxis(u, axis, 0)
if u is not b:
b = np.moveaxis(b, axis, 0)
bs = b[s]
us = u[s]
if len(b.shape) == 1:
se = 0.0
so = 0.0
else:
se = np.zeros(us.shape[1:])
so = np.zeros(us.shape[1:])
d = self[0]
d1 = self[2]
M = us.shape
us[-1] = bs[-1] / d[-1]
us[-2] = bs[-2] / d[-2]
for k in range(M[0]-3, -1, -1):
if k%2 == 0:
se += us[k+2]
us[k] = bs[k] - d1[k]*se
else:
so += us[k+2]
us[k] = bs[k] - d1[k]*so
us[k] /= d[k]
u /= self.scale
self.testfunction[0].bc.set_boundary_dofs(u, True)
if axis > 0:
u = np.moveaxis(u, 0, axis)
if u is not b:
b = np.moveaxis(b, 0, axis)
return u
class ANNmat(SpectralMatrix):
r"""Stiffness matrix for inner product
.. math::
A_{kj} = (\phi''_j, \phi_k)_w
where
.. math::
j = 1, 2, ..., N-2 \text{ and } k = 1, 2, ..., N-2
and :math:`\phi_k` is the Shen Neumann basis function.
"""
def __init__(self, test, trial, measure=1):
assert isinstance(test[0], SN)
assert isinstance(trial[0], SN)
N = test[0].N
k = np.arange(N-2, dtype=np.float)
d = {0: -2*np.pi*k**2*(k+1)/(k+2)}
for i in range(2, N-2, 2):
d[i] = -4*np.pi*(k[:-i]+i)**2*(k[:-i]+1)/(k[:-i]+2)**2
SpectralMatrix.__init__(self, d, test, trial, measure=measure)
def matvec(self, v, c, format='csr', axis=0):
c = super(ANNmat, self).matvec(v, c, format=format, axis=axis)
s = [slice(None),]*v.ndim
s[axis] = 0
c[tuple(s)] = self.testfunction[0].mean*np.pi
return c
def solve(self, b, u=None, axis=0):
assert self.shape[0] + 2 == b.shape[0]
s = self.trialfunction[0].slice()
if u is None:
u = b
else:
assert u.shape == b.shape
# Move axis to first
if axis > 0:
u = np.moveaxis(u, axis, 0)
if u is not b:
b = np.moveaxis(b, axis, 0)
bs = b[s]
us = u[s]
j2 = np.arange(self.shape[0])**2
j2[0] = 1
j2 = 1./j2
if len(b.shape) == 1:
se = 0.0
so = 0.0
else:
se = np.zeros(u.shape[1:])
so = np.zeros(u.shape[1:])
j2.repeat(np.prod(bs.shape[1:])).reshape(bs.shape)
d = self[0]*j2
d1 = self[2]*j2[2:]
M = us.shape
us[-1] = bs[-1] / d[-1]
us[-2] = bs[-2] / d[-2]
for k in range(M[0]-3, 0, -1):
if k%2 == 0:
se += us[k+2]
us[k] = bs[k] - d1[k]*se
else:
so += us[k+2]
us[k] = bs[k] - d1[k]*so
us[k] /= d[k]
sl = [np.newaxis]*b.ndim
sl[0] = slice(None)
us *= j2[tuple(sl)]
u /= self.scale
u[0] = self.testfunction[0].mean/(np.pi/self.testfunction[0].domain_factor())
self.testfunction[0].bc.set_boundary_dofs(u, True)
if axis > 0:
u = np.moveaxis(u, 0, axis)
if u is not b:
b = np.moveaxis(b, 0, axis)
return u
class ATTmat(SpectralMatrix):
r"""Stiffness matrix for inner product
.. math::
A_{kj} = (\psi''_j, \psi_k)_w
where
.. math::
j = 0, 1, ..., N \text{ and } k = 0, 1, ..., N
and :math:`\psi_k` is the Chebyshev basis function.
"""
def __init__(self, test, trial, measure=1):
assert isinstance(test[0], CB)
assert isinstance(trial[0], CB)
N = test[0].N
k = np.arange(N, dtype=np.float)
d = {}
for j in range(2, N, 2):
d[j] = k[j:]*(k[j:]**2-k[:-j]**2)*np.pi/2.
SpectralMatrix.__init__(self, d, test, trial, measure=measure)
self._matvec_methods += ['cython']
def matvec(self, v, c, format='cython', axis=0):
c.fill(0)
if format == 'cython' and v.ndim == 3:
cython.Matvec.ATT_matvec3D_ptr(v, c, axis)
self.scale_array(c)
elif format == 'cython' and v.ndim == 2:
cython.Matvec.ATT_matvec2D_ptr(v, c, axis)
self.scale_array(c)
elif format == 'cython' and v.ndim == 1:
cython.Matvec.ATT_matvec(v, c)
self.scale_array(c)
else:
c = super(ATTmat, self).matvec(v, c, format=format, axis=axis)
return c
class SBBmat(SpectralMatrix):
r"""Biharmonic matrix for inner product
.. math::
S_{kj} = (\psi''''_j, \psi_k)_w
where
.. math::
j = 0, 1, ..., N-4 \text{ and } k = 0, 1, ..., N-4
and :math:`\psi_k` is the Shen Biharmonic basis function.
"""
def __init__(self, test, trial, measure=1):
assert isinstance(test[0], SB)
assert isinstance(trial[0], SB)
N = test[0].N
ki = np.arange(N-4)
k = np.arange(N-4, dtype=np.float)
i = 8*(ki+1)**2*(ki+2)*(ki+4)
d = {0: i*np.pi}
for j in range(2, N-4, 2):
i = 8*(ki[:-j]+1)*(ki[:-j]+2)*(ki[:-j]*(ki[:-j]+4)+3*(ki[j:]+2)**2)
d[j] = np.array(i*np.pi/(k[j:]+3))
SpectralMatrix.__init__(self, d, test, trial, measure=measure)
self._matvec_methods += ['cython']
def matvec(self, v, c, format='cython', axis=0):
c.fill(0)
if format == 'cython' and v.ndim == 3:
cython.Matvec.SBB_matvec3D_ptr(v, c, self[0], axis)
self.scale_array(c)
elif format == 'cython' and v.ndim == 2:
cython.Matvec.SBB_matvec2D_ptr(v, c, self[0], axis)
self.scale_array(c)
elif format == 'cython' and v.ndim == 1:
cython.Matvec.SBBmat_matvec(v, c, self[0])
self.scale_array(c)
else:
c = super(SBBmat, self).matvec(v, c, format=format, axis=axis)
return c
class BCDmat(SpectralMatrix):
r"""Mass matrix for inner product
.. math::
B_{kj} = (\psi_j, \phi_k)_w
where
.. math::
j = 0, 1 \text{ and } k = 0, 1, ..., N-2
and :math:`\psi_j` is the Dirichlet boundary basis and
:math:`\phi_k` is the Shen Dirichlet basis function.
"""
def __init__(self, test, trial, measure=1):
assert isinstance(test[0], SD)
assert isinstance(trial[0], BD)
d = {0: np.array([np.pi/2, np.pi/4]),
1: np.array([np.pi/2]),
-1: np.array([-np.pi/4, 0])}
SpectralMatrix.__init__(self, d, test, trial, measure=measure)
class BCBmat(SpectralMatrix):
r"""Mass matrix for inner product
.. math::
B_{kj} = (\psi_j, \phi_k)_w
where
.. math::
j = 0, 1, 2, 3 \text{ and } k = 0, 1, ..., N-4
and :math:`\psi_j` is the Biharmonic boundary basis and
:math:`\phi_k` is the Shen Biharmonic basis function.
"""
def __init__(self, test, trial, measure=1):
assert isinstance(test[0], SB)
assert isinstance(trial[0], BB)
d = {0: np.array([np.pi/2, np.pi*21/64, -np.pi/16, np.pi/32]),
1: np.array([np.pi/2, -np.pi*5/64, np.pi/16]),
2: np.array([np.pi*5/24, -np.pi*5/64]),
3: np.array([-np.pi*5/24]),
-1: np.array([-np.pi*21/64, 0, np.pi/32, 0]),
-2: np.array([0, -np.pi/32, 0, 0]),
-3: np.array([np.pi/32, 0, 0, 0])}
SpectralMatrix.__init__(self, d, test, trial, measure=measure)
class _Chebmatrix(SpectralMatrix):
def __init__(self, test, trial, measure=1):
SpectralMatrix.__init__(self, {}, test, trial, measure=measure)
class _ChebMatDict(dict):
"""Dictionary of inner product matrices
Matrices that are missing keys are generated from Vandermonde type
computations.
"""
def __missing__(self, key):
measure = 1 if len(key) == 2 else key[3]
c = functools.partial(_Chebmatrix, measure=measure)
self[key] = c
return c
def __getitem__(self, key):
matrix = dict.__getitem__(self, key)
assert key[0][1] == 0, 'Test cannot be differentiated (weighted space)'
return matrix
# Define dictionary to hold all predefined matrices
# When looked up, missing matrices will be generated automatically
mat = _ChebMatDict({
((CB, 0), (CB, 0)): BTTmat,
((SD, 0), (SD, 0)): BDDmat,
((SB, 0), (SB, 0)): BBBmat,
((SN, 0), (SN, 0)): BNNmat,
((SN, 0), (CB, 0)): BNTmat,
((SN, 0), (SB, 0)): BNBmat,
((SD, 0), (SN, 0)): BDNmat,
((SN, 0), (SD, 0)): BNDmat,
((CB, 0), (SN, 0)): BTNmat,
((SB, 0), (SD, 0)): BBDmat,
((CB, 0), (SD, 0)): BTDmat,
((SD, 0), (CB, 0)): BDTmat,
((SD, 0), (SD, 2)): ADDmat,
((CB, 0), (CB, 2)): ATTmat,
((SN, 0), (SN, 2)): ANNmat,
((SB, 0), (SB, 2)): ABBmat,
((SB, 0), (SB, 4)): SBBmat,
((SD, 0), (SN, 1)): CDNmat,
((SB, 0), (SD, 1)): CBDmat,
((CB, 0), (SD, 1)): CTDmat,
((CB, 0), (CB, 1)): CTTmat,
((SD, 0), (SD, 1)): CDDmat,
((SN, 0), (SD, 1)): CNDmat,
((SD, 0), (SB, 1)): CDBmat,
((SD, 0), (CB, 1)): CDTmat,
((SD, 0), (BD, 0)): BCDmat,
((SB, 0), (BB, 0)): BCBmat,
})
| 29.68091
| 91
| 0.507953
| 6,542
| 43,067
| 3.258178
| 0.052583
| 0.015951
| 0.039784
| 0.033075
| 0.799765
| 0.780905
| 0.762749
| 0.750223
| 0.740558
| 0.724138
| 0
| 0.039859
| 0.316089
| 43,067
| 1,450
| 92
| 29.701379
| 0.683812
| 0.22804
| 0
| 0.603593
| 0
| 0
| 0.016655
| 0
| 0
| 0
| 0
| 0
| 0.071856
| 1
| 0.065868
| false
| 0
| 0.010778
| 0
| 0.143713
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
d8591235599b35a14a122fcc02144b4e8bc278c2
| 148
|
py
|
Python
|
main.py
|
code2cat/rpg-name-generator
|
4be1b7577d29d299074275748def90827c1d87c3
|
[
"MIT"
] | null | null | null |
main.py
|
code2cat/rpg-name-generator
|
4be1b7577d29d299074275748def90827c1d87c3
|
[
"MIT"
] | null | null | null |
main.py
|
code2cat/rpg-name-generator
|
4be1b7577d29d299074275748def90827c1d87c3
|
[
"MIT"
] | null | null | null |
#!/usr/bin/python3
# Author: 沈麻呆
# Date: 2021-10-3
from generator import generator
if __name__ == '__main__':
print(generator.generate_one())
| 16.444444
| 35
| 0.709459
| 20
| 148
| 4.8
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.063492
| 0.148649
| 148
| 8
| 36
| 18.5
| 0.698413
| 0.304054
| 0
| 0
| 1
| 0
| 0.080808
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0.333333
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
d88c1dd54ed6821fc385f6a08a312acdfb2850ca
| 51
|
py
|
Python
|
lino_avanti/lib/households/fixtures/demo.py
|
khchine5/avanti
|
5a5f9d1ddfa20ae0eb8fa33cb906daf78d9568b1
|
[
"BSD-2-Clause"
] | null | null | null |
lino_avanti/lib/households/fixtures/demo.py
|
khchine5/avanti
|
5a5f9d1ddfa20ae0eb8fa33cb906daf78d9568b1
|
[
"BSD-2-Clause"
] | null | null | null |
lino_avanti/lib/households/fixtures/demo.py
|
khchine5/avanti
|
5a5f9d1ddfa20ae0eb8fa33cb906daf78d9568b1
|
[
"BSD-2-Clause"
] | null | null | null |
from lino_xl.lib.households.fixtures.demo import *
| 25.5
| 50
| 0.823529
| 8
| 51
| 5.125
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.078431
| 51
| 1
| 51
| 51
| 0.87234
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
d8a7d8d4625f7c58bc3d2970d00d7509649918e6
| 205
|
py
|
Python
|
libs/finance_methods.py
|
kush-josh/smart-content
|
6070a72d4e190eb5de63495c094785ab4c190b5b
|
[
"MIT"
] | null | null | null |
libs/finance_methods.py
|
kush-josh/smart-content
|
6070a72d4e190eb5de63495c094785ab4c190b5b
|
[
"MIT"
] | 7
|
2018-02-23T09:35:55.000Z
|
2018-02-23T11:56:18.000Z
|
libs/finance_methods.py
|
joshtechnologygroup/smart-content
|
6070a72d4e190eb5de63495c094785ab4c190b5b
|
[
"MIT"
] | 1
|
2018-02-25T18:56:33.000Z
|
2018-02-25T18:56:33.000Z
|
def transfer_money(from_addr, to_addr, value):
"""
A simple stub to show that money is being transferred
"""
print("Transferring {} UNITS From {} TO {}".format(value, from_addr, to_addr))
| 29.285714
| 82
| 0.668293
| 29
| 205
| 4.551724
| 0.655172
| 0.121212
| 0.151515
| 0.212121
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.204878
| 205
| 6
| 83
| 34.166667
| 0.809816
| 0.258537
| 0
| 0
| 0
| 0
| 0.257353
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0
| 0.5
| 0.5
| 1
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
d8d4e322e29e0de3a893b13c465ca274ef8bbcb3
| 683
|
py
|
Python
|
pagral/graph/directedgraph.py
|
mazzalab/pagral
|
c824ca453591a135716b59958d4f8b5f985b77cb
|
[
"MIT"
] | null | null | null |
pagral/graph/directedgraph.py
|
mazzalab/pagral
|
c824ca453591a135716b59958d4f8b5f985b77cb
|
[
"MIT"
] | null | null | null |
pagral/graph/directedgraph.py
|
mazzalab/pagral
|
c824ca453591a135716b59958d4f8b5f985b77cb
|
[
"MIT"
] | null | null | null |
from graph.basegraph import BaseGraph
class DGraph(BaseGraph):
def ecount(self):
return self._adj_matrix.nonzero_count()
def add_edge(self, source_vertex: str, target_vertex: str, weight=1):
# TODO: check vertex names existing in graph
src_idx = self.V.get_index(source_vertex)
trg_idx = self.V.get_index(target_vertex)
self._adj_matrix[src_idx, trg_idx] = weight
def delete_edge(self, source_vertex: str, target_vertex: str):
# TODO: check vertex names existing in graph
src_idx = self.V.get_index(source_vertex)
trg_idx = self.V.get_index(target_vertex)
self._adj_matrix[src_idx, trg_idx] = 0
| 35.947368
| 73
| 0.695461
| 101
| 683
| 4.415842
| 0.346535
| 0.107623
| 0.071749
| 0.098655
| 0.717489
| 0.717489
| 0.717489
| 0.717489
| 0.547085
| 0.547085
| 0
| 0.003731
| 0.215227
| 683
| 18
| 74
| 37.944444
| 0.828358
| 0.124451
| 0
| 0.333333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.055556
| 0
| 1
| 0.25
| false
| 0
| 0.083333
| 0.083333
| 0.5
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
2b205b2a33533f01e8ff0fee96da1189be831723
| 83
|
py
|
Python
|
Searching/search_functions.py
|
Zereck12/Algrow
|
70e3217af815acdcbc013fc4a950132d70631162
|
[
"MIT"
] | 1
|
2021-05-04T23:52:19.000Z
|
2021-05-04T23:52:19.000Z
|
Searching/search_functions.py
|
saad-afridi/Algrow
|
70e3217af815acdcbc013fc4a950132d70631162
|
[
"MIT"
] | null | null | null |
Searching/search_functions.py
|
saad-afridi/Algrow
|
70e3217af815acdcbc013fc4a950132d70631162
|
[
"MIT"
] | null | null | null |
from typing import List
class SearchSteps:
def __init__(self):
pass
| 10.375
| 23
| 0.662651
| 10
| 83
| 5.1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.289157
| 83
| 7
| 24
| 11.857143
| 0.864407
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0.25
| 0.25
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 5
|
2b249ccfcd94ae5f892888d85078859049348c16
| 117
|
py
|
Python
|
Databaselayer/IFetchJobDetails.py
|
rohitgs28/FindMyEmployer
|
d4b369eb488f44e40ef371ac09847f8ccc39994c
|
[
"MIT"
] | null | null | null |
Databaselayer/IFetchJobDetails.py
|
rohitgs28/FindMyEmployer
|
d4b369eb488f44e40ef371ac09847f8ccc39994c
|
[
"MIT"
] | null | null | null |
Databaselayer/IFetchJobDetails.py
|
rohitgs28/FindMyEmployer
|
d4b369eb488f44e40ef371ac09847f8ccc39994c
|
[
"MIT"
] | null | null | null |
import hashlib, os
import logging
class IFetchJobDetails:
def getJob_DBL(Self,jobId): raise NotImplementedError
| 19.5
| 57
| 0.811966
| 14
| 117
| 6.714286
| 0.928571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.136752
| 117
| 5
| 58
| 23.4
| 0.930693
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| 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
| 1
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
2b591c9bb2e1d141b837147048f802a338ec83cb
| 129
|
py
|
Python
|
dit/pid/__init__.py
|
Ejjaffe/dit
|
c9d206f03d1de5a0a298b1d0ea9d79ea5e789ee1
|
[
"BSD-3-Clause"
] | 1
|
2020-03-13T10:30:11.000Z
|
2020-03-13T10:30:11.000Z
|
dit/pid/__init__.py
|
Ejjaffe/dit
|
c9d206f03d1de5a0a298b1d0ea9d79ea5e789ee1
|
[
"BSD-3-Clause"
] | null | null | null |
dit/pid/__init__.py
|
Ejjaffe/dit
|
c9d206f03d1de5a0a298b1d0ea9d79ea5e789ee1
|
[
"BSD-3-Clause"
] | null | null | null |
"""
Import all the PIDs.
"""
from .distributions import bivariates, trivariates
from .hcs import PED_CS
from .measures import *
| 16.125
| 50
| 0.751938
| 17
| 129
| 5.647059
| 0.705882
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.155039
| 129
| 7
| 51
| 18.428571
| 0.880734
| 0.155039
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
993941c978c4c1a2ed53e3e8a797f95183d38959
| 97
|
py
|
Python
|
snappiershot/serializers/__init__.py
|
MORSECorp/snappiershot
|
acb6a8d01d4496abe0f2fe83c7e7af9cf77aac8e
|
[
"Apache-2.0"
] | 27
|
2020-10-15T18:36:25.000Z
|
2022-03-02T19:11:44.000Z
|
snappiershot/serializers/__init__.py
|
MORSECorp/snappiershot
|
acb6a8d01d4496abe0f2fe83c7e7af9cf77aac8e
|
[
"Apache-2.0"
] | 33
|
2020-10-15T15:03:37.000Z
|
2022-03-24T21:00:34.000Z
|
snappiershot/serializers/__init__.py
|
MORSECorp/snappiershot
|
acb6a8d01d4496abe0f2fe83c7e7af9cf77aac8e
|
[
"Apache-2.0"
] | 5
|
2020-10-15T16:30:00.000Z
|
2022-03-30T15:07:28.000Z
|
""" Module level imports for serializers. """
from .json import JsonDeserializer, JsonSerializer
| 32.333333
| 50
| 0.783505
| 10
| 97
| 7.6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.123711
| 97
| 2
| 51
| 48.5
| 0.894118
| 0.381443
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
9948c846f02e303106f1258e1f0143ad1e3a65d7
| 87
|
py
|
Python
|
flaskcelerymail/ext/mail/__init__.py
|
AndreAmorim05/flask-celery-mail
|
b95cb3b02c805980b8d7aef9d7d851fe8b5fc6fe
|
[
"MIT"
] | null | null | null |
flaskcelerymail/ext/mail/__init__.py
|
AndreAmorim05/flask-celery-mail
|
b95cb3b02c805980b8d7aef9d7d851fe8b5fc6fe
|
[
"MIT"
] | 141
|
2021-03-03T01:38:10.000Z
|
2022-01-16T15:42:02.000Z
|
app/ext/mail.py
|
fredsonchaves07/foodfy
|
5bff04434749f369f982090b00590cca31fce186
|
[
"MIT"
] | null | null | null |
from flask_mail import Mail
mail = Mail()
def init_app(app):
mail.init_app(app)
| 10.875
| 27
| 0.701149
| 15
| 87
| 3.866667
| 0.466667
| 0.275862
| 0.344828
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.195402
| 87
| 7
| 28
| 12.428571
| 0.828571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
9963e127b757414a46d2b084f81c38063e163c68
| 15
|
py
|
Python
|
tests/syntax/scripts/dels.py
|
toddrme2178/pyccel
|
deec37503ab0c5d0bcca1a035f7909f7ce8ef653
|
[
"MIT"
] | null | null | null |
tests/syntax/scripts/dels.py
|
toddrme2178/pyccel
|
deec37503ab0c5d0bcca1a035f7909f7ce8ef653
|
[
"MIT"
] | null | null | null |
tests/syntax/scripts/dels.py
|
toddrme2178/pyccel
|
deec37503ab0c5d0bcca1a035f7909f7ce8ef653
|
[
"MIT"
] | null | null | null |
del a
del b, c
| 5
| 8
| 0.6
| 5
| 15
| 1.8
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.333333
| 15
| 2
| 9
| 7.5
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
9996480bd3aa60f5cf72b1c64af3f32d557cd004
| 57
|
py
|
Python
|
src/rss/model/feed/input/__init__.py
|
hiroshinakasone/rss-oop-sample
|
9cc8ac63fa34a754367297bfa009df0f394a7adc
|
[
"BSD-2-Clause"
] | null | null | null |
src/rss/model/feed/input/__init__.py
|
hiroshinakasone/rss-oop-sample
|
9cc8ac63fa34a754367297bfa009df0f394a7adc
|
[
"BSD-2-Clause"
] | null | null | null |
src/rss/model/feed/input/__init__.py
|
hiroshinakasone/rss-oop-sample
|
9cc8ac63fa34a754367297bfa009df0f394a7adc
|
[
"BSD-2-Clause"
] | null | null | null |
# -*- coding: utf-8 -*-
from .input import FeedUriInput
| 14.25
| 31
| 0.649123
| 7
| 57
| 5.285714
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.021277
| 0.175439
| 57
| 3
| 32
| 19
| 0.765957
| 0.368421
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
99a723ff12a00568d6bc6f6f6b91075bf9b6b0c3
| 63
|
py
|
Python
|
SOSAT/risk_analysis/__init__.py
|
pnnl/SOSAT
|
610f99e0bb80f2f5e7836e7e3b6b816e029838bb
|
[
"BSD-3-Clause"
] | null | null | null |
SOSAT/risk_analysis/__init__.py
|
pnnl/SOSAT
|
610f99e0bb80f2f5e7836e7e3b6b816e029838bb
|
[
"BSD-3-Clause"
] | 1
|
2021-03-22T18:59:05.000Z
|
2021-03-22T18:59:05.000Z
|
SOSAT/risk_analysis/__init__.py
|
pnnl/SOSAT
|
610f99e0bb80f2f5e7836e7e3b6b816e029838bb
|
[
"BSD-3-Clause"
] | null | null | null |
from .critically_oriented_fault import CriticalFaultActivation
| 31.5
| 62
| 0.920635
| 6
| 63
| 9.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.063492
| 63
| 1
| 63
| 63
| 0.949153
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
41e9bccd528ec651fc092e516595937edfa761d8
| 1,362
|
py
|
Python
|
tests/test_utilities.py
|
ludwiglierhammer/pyhomogenize
|
339cd823b0e8ce618f1b2e42a69c20fb92ca7485
|
[
"MIT"
] | null | null | null |
tests/test_utilities.py
|
ludwiglierhammer/pyhomogenize
|
339cd823b0e8ce618f1b2e42a69c20fb92ca7485
|
[
"MIT"
] | null | null | null |
tests/test_utilities.py
|
ludwiglierhammer/pyhomogenize
|
339cd823b0e8ce618f1b2e42a69c20fb92ca7485
|
[
"MIT"
] | null | null | null |
import pytest
import pyhomogenize as pyh
def test_check_existance():
pyh.utilities.check_existance([])
pyh.utilities.check_existance(pyh.test_netcdf)
pyh.utilities.check_existance(['test_netcdf'])
pyh.utilities.check_existance(pyh.test_netcdf + ['test_netcdf'])
def test_get_operator_none():
pyh.utilities.get_operator(pyh.op, '', type='operator')
def test_get_operator_false():
pyh.utilities.get_operator(pyh.op, 'test', type='operator')
def test_get_operator_merge():
assert pyh.utilities.get_operator(pyh.op, 'merge', type='operator')
def test_get_operator_showvar():
assert pyh.utilities.get_operator(pyh.op, 'showvar', type='operator')
def test_get_operator_seltimerange():
assert pyh.utilities.get_operator(pyh.op, 'seltimerange', type='operator')
def test_get_operator_showtimestamps():
assert pyh.utilities.get_operator(pyh.op, 'showtimestamps', type='operator')
def test_get_operator_showdups():
assert pyh.utilities.get_operator(pyh.op, 'showdups', type='operator')
def test_get_operator_showmiss():
assert pyh.utilities.get_operator(pyh.op, 'showmiss', type='operator')
def test_get_operator_showreds():
assert pyh.utilities.get_operator(pyh.op, 'showreds', type='operator')
def test_get_operator_timecheck():
assert pyh.utilities.get_operator(pyh.op, 'timecheck', type='operator')
| 33.219512
| 80
| 0.762849
| 183
| 1,362
| 5.404372
| 0.142077
| 0.222447
| 0.101112
| 0.182002
| 0.760364
| 0.760364
| 0.394338
| 0
| 0
| 0
| 0
| 0
| 0.103524
| 1,362
| 40
| 81
| 34.05
| 0.809992
| 0
| 0
| 0
| 0
| 0
| 0.130051
| 0
| 0
| 0
| 0
| 0
| 0.296296
| 1
| 0.407407
| true
| 0
| 0.074074
| 0
| 0.481481
| 0
| 0
| 0
| 0
| null | 1
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
41f234213fa46695bfcbd2d2affc49590f77e017
| 2,823
|
py
|
Python
|
Scene_house.py
|
ZerethjiN/SweetNightmare
|
18dc60794f9c09b434df07a21974fa23e945d53b
|
[
"MIT"
] | null | null | null |
Scene_house.py
|
ZerethjiN/SweetNightmare
|
18dc60794f9c09b434df07a21974fa23e945d53b
|
[
"MIT"
] | null | null | null |
Scene_house.py
|
ZerethjiN/SweetNightmare
|
18dc60794f9c09b434df07a21974fa23e945d53b
|
[
"MIT"
] | null | null | null |
import Entities_Tile as Tile
import Utils_Position as Position
import Utils_Scene as Scene
def createSceneHouse(tileTexture, assetTexture):
scene2 = Scene.Scene()
tilemap = [
12, 14, 4, 14, 14, 14, 14, 4, 14, 13,
44, 20, 20, 20, 20, 20, 20, 20, 20, 45,
44, 20, 20, 20, 20, 20, 20, 20, 20, 45,
44, 20, 20, 20, 20, 20, 20, 20, 20, 45,
44, 20, 20, 20, 20, 20, 20, 20, 20, 45,
44, 20, 20, 20, 20, 20, 20, 20, 20, 45,
44, 20, 20, 20, 20, 20, 20, 20, 20, 45,
44, 20, 20, 20, 20, 20, 20, 20, 20, 45,
28, 15, 15, 15, 15, 15, 15, 15, 15, 29,
]
tileCollider = [
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 0, 0, 0, 0, 0, 0, 0, 0, 1,
1, 0, 0, 0, 0, 0, 0, 0, 0, 1,
1, 0, 0, 0, 0, 0, 0, 0, 0, 1,
1, 0, 0, 0, 0, 0, 0, 0, 0, 1,
1, 0, 0, 0, 0, 0, 0, 0, 0, 1,
1, 0, 0, 0, 0, 0, 0, 0, 0, 1,
1, 0, 0, 0, 0, 0, 0, 0, 0, 1,
1, 1, 1, 0, 0, 0, 1, 1, 1, 1,
]
tiles = []
for i in range(0, len(tilemap)):
if tilemap[i] != 0:
tile = Tile.Tile(tileTexture)
tile.position = Position.Position(i % 10 * 16, int(i / 10) * 16)
tile.texPos = Position.Position(tilemap[i] % 16 * 16, int(tilemap[i] / 16) * 16)
if tileCollider[i] == 1:
tile.collider = True
tiles.append(tile)
assetmap = [
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 35, 0, 0, 0, 0, 0,
]
assetCollider = [
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
]
assets = []
for i in range(0, len(assetmap)):
if assetmap[i] != 0:
asset = Tile.Tile(assetTexture)
asset.position = Position.Position(i % 10 * 16, int(i / 10) * 16)
asset.texPos = Position.Position(assetmap[i] % 16 * 16, int(assetmap[i] / 16) * 16)
if assetCollider[i] == 1:
asset.collider = True
assets.append(asset)
plantes = []
scene2.tiles = tiles
scene2.assets = assets
scene2.plantes = plantes
return scene2
| 36.192308
| 95
| 0.395324
| 498
| 2,823
| 2.23494
| 0.094378
| 0.407907
| 0.58221
| 0.736748
| 0.475292
| 0.4708
| 0.443845
| 0.421384
| 0.421384
| 0.421384
| 0
| 0.304267
| 0.427205
| 2,823
| 78
| 96
| 36.192308
| 0.384045
| 0
| 0
| 0.430556
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.013889
| false
| 0
| 0.041667
| 0
| 0.069444
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
51046e99cb22df49244a2d2ba9bfd2ab7ccb6b96
| 1,634
|
py
|
Python
|
sdk/python/pulumi_azure_nextgen/logic/v20160601/__init__.py
|
test-wiz-sec/pulumi-azure-nextgen
|
20a695af0d020b34b0f1c336e1b69702755174cc
|
[
"Apache-2.0"
] | null | null | null |
sdk/python/pulumi_azure_nextgen/logic/v20160601/__init__.py
|
test-wiz-sec/pulumi-azure-nextgen
|
20a695af0d020b34b0f1c336e1b69702755174cc
|
[
"Apache-2.0"
] | null | null | null |
sdk/python/pulumi_azure_nextgen/logic/v20160601/__init__.py
|
test-wiz-sec/pulumi-azure-nextgen
|
20a695af0d020b34b0f1c336e1b69702755174cc
|
[
"Apache-2.0"
] | null | null | null |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
# Export this package's modules as members:
from .agreement import *
from .certificate import *
from .get_agreement import *
from .get_certificate import *
from .get_integration_account import *
from .get_integration_account_assembly import *
from .get_integration_account_batch_configuration import *
from .get_map import *
from .get_partner import *
from .get_rosetta_net_process_configuration import *
from .get_schema import *
from .get_session import *
from .get_workflow import *
from .integration_account import *
from .integration_account_assembly import *
from .integration_account_batch_configuration import *
from .list_agreement_content_callback_url import *
from .list_integration_account_assembly_content_callback_url import *
from .list_integration_account_callback_url import *
from .list_integration_account_key_vault_keys import *
from .list_map_content_callback_url import *
from .list_partner_content_callback_url import *
from .list_schema_content_callback_url import *
from .list_workflow_callback_url import *
from .list_workflow_run_action_expression_traces import *
from .list_workflow_run_action_repetition_expression_traces import *
from .list_workflow_trigger_callback_url import *
from .list_workflow_version_callback_url import *
from .map import *
from .partner import *
from .rosetta_net_process_configuration import *
from .schema import *
from .session import *
from .workflow import *
from ._inputs import *
from . import outputs
| 38.904762
| 80
| 0.829253
| 225
| 1,634
| 5.653333
| 0.288889
| 0.275157
| 0.132075
| 0.148585
| 0.548742
| 0.455189
| 0.112421
| 0.078616
| 0
| 0
| 0
| 0.00069
| 0.112607
| 1,634
| 41
| 81
| 39.853659
| 0.876552
| 0.124235
| 0
| 0
| 1
| 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
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
510e8d6cef088b45a3b2f876d495525fa6dc8f53
| 139
|
py
|
Python
|
classes/create_all_tables.py
|
Susmit-A/AIDoc
|
618bae8f830ad32989c954b51775d0e0b666b9af
|
[
"MIT"
] | 3
|
2020-05-25T04:56:14.000Z
|
2020-06-23T17:41:20.000Z
|
classes/create_all_tables.py
|
Susmit-A/AIDoc
|
618bae8f830ad32989c954b51775d0e0b666b9af
|
[
"MIT"
] | 3
|
2021-05-21T16:23:29.000Z
|
2022-02-10T01:54:24.000Z
|
classes/create_all_tables.py
|
Susmit-A/AIDoc
|
618bae8f830ad32989c954b51775d0e0b666b9af
|
[
"MIT"
] | null | null | null |
from .User import User
from .Post import Post
from .Message import Message
User.create_table()
Post.create_table()
Message.create_table()
| 17.375
| 28
| 0.798561
| 21
| 139
| 5.142857
| 0.333333
| 0.305556
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.115108
| 139
| 7
| 29
| 19.857143
| 0.878049
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
5151655444488475ef238d580d61a57c9f91f768
| 54
|
py
|
Python
|
OpenPGPAbs/__init__.py
|
KOLANICH/OpenPGPAbs
|
1052422a74c3970990491972f81be8eb142d2dd7
|
[
"Unlicense"
] | null | null | null |
OpenPGPAbs/__init__.py
|
KOLANICH/OpenPGPAbs
|
1052422a74c3970990491972f81be8eb142d2dd7
|
[
"Unlicense"
] | null | null | null |
OpenPGPAbs/__init__.py
|
KOLANICH/OpenPGPAbs
|
1052422a74c3970990491972f81be8eb142d2dd7
|
[
"Unlicense"
] | null | null | null |
from .gpgBackends.gpgme import GPGMe as ChosenBackend
| 27
| 53
| 0.851852
| 7
| 54
| 6.571429
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 54
| 1
| 54
| 54
| 0.958333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
5a8bd74cd0f2f9cb5517dabaab4e172dcb4455e7
| 597
|
py
|
Python
|
test/assets/rewards/trader_rewards.py
|
Adm28/spiceai
|
87df2bf085911ae87e45ceaec0fe883f901c23e5
|
[
"Apache-2.0"
] | null | null | null |
test/assets/rewards/trader_rewards.py
|
Adm28/spiceai
|
87df2bf085911ae87e45ceaec0fe883f901c23e5
|
[
"Apache-2.0"
] | null | null | null |
test/assets/rewards/trader_rewards.py
|
Adm28/spiceai
|
87df2bf085911ae87e45ceaec0fe883f901c23e5
|
[
"Apache-2.0"
] | null | null | null |
def calculate_price_change(curr_state: dict, new_state: dict):
curr_price = curr_state["coinbase_btcusd_close"]
next_price = new_state["coinbase_btcusd_close"]
return curr_price - next_price
def buy(curr_state: dict, prev_interps, new_state: dict, new_interps):
return calculate_price_change(curr_state=curr_state, new_state=new_state)
def sell(curr_state: dict, prev_interps, new_state: dict, new_interps):
return -calculate_price_change(curr_state=curr_state, new_state=new_state)
def hold(curr_state: dict, prev_interps, new_state: dict, new_interps):
return -0.1
| 35.117647
| 78
| 0.785595
| 92
| 597
| 4.684783
| 0.217391
| 0.187935
| 0.12065
| 0.167053
| 0.693736
| 0.62645
| 0.62645
| 0.62645
| 0.62645
| 0.62645
| 0
| 0.003824
| 0.123953
| 597
| 16
| 79
| 37.3125
| 0.820268
| 0
| 0
| 0
| 0
| 0
| 0.070352
| 0.070352
| 0
| 0
| 0
| 0
| 0
| 1
| 0.4
| false
| 0
| 0
| 0.3
| 0.8
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
5aa0a13f598d19f424e46bb7f1963517ff92f505
| 48
|
py
|
Python
|
core/arxiv/submission/domain/tests/__init__.py
|
NeolithEra/arxiv-submission-core
|
d4f20be62a882d2d5f3d1584eda69e7d90ca2c12
|
[
"MIT"
] | 14
|
2019-05-26T22:52:17.000Z
|
2021-11-05T12:26:46.000Z
|
core/arxiv/submission/domain/tests/__init__.py
|
NeolithEra/arxiv-submission-core
|
d4f20be62a882d2d5f3d1584eda69e7d90ca2c12
|
[
"MIT"
] | 30
|
2018-01-31T19:16:08.000Z
|
2018-12-08T08:41:04.000Z
|
core/arxiv/submission/domain/tests/__init__.py
|
NeolithEra/arxiv-submission-core
|
d4f20be62a882d2d5f3d1584eda69e7d90ca2c12
|
[
"MIT"
] | 8
|
2019-01-10T22:01:39.000Z
|
2021-11-20T21:44:51.000Z
|
"""Tests for :mod:`arxiv.submission.domain`."""
| 24
| 47
| 0.666667
| 6
| 48
| 5.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.0625
| 48
| 1
| 48
| 48
| 0.711111
| 0.854167
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
5abba6925404cdf32b3a4bf961e47c5b7e7e06d4
| 46
|
py
|
Python
|
autodiff/__init__.py
|
lutsker/simple-autodiff
|
3eaecbae7e46566a51f12c923d72af305d39b4ee
|
[
"MIT"
] | null | null | null |
autodiff/__init__.py
|
lutsker/simple-autodiff
|
3eaecbae7e46566a51f12c923d72af305d39b4ee
|
[
"MIT"
] | null | null | null |
autodiff/__init__.py
|
lutsker/simple-autodiff
|
3eaecbae7e46566a51f12c923d72af305d39b4ee
|
[
"MIT"
] | null | null | null |
from .numtor import Numtor
from .ops import *
| 15.333333
| 26
| 0.76087
| 7
| 46
| 5
| 0.571429
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.173913
| 46
| 2
| 27
| 23
| 0.921053
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
5ad29a8affdc5df1e42eec1c4cafa1dc4894010b
| 144
|
py
|
Python
|
tests/data/trailing_comma_optional_parens1.py
|
AppliedIntuition/black
|
bc0c5ca9d41956bf5ed9fc851202579f9e52a338
|
[
"MIT"
] | 16,110
|
2019-07-22T21:54:54.000Z
|
2022-03-31T22:52:39.000Z
|
tests/data/trailing_comma_optional_parens1.py
|
AppliedIntuition/black
|
bc0c5ca9d41956bf5ed9fc851202579f9e52a338
|
[
"MIT"
] | 1,981
|
2019-07-22T21:26:16.000Z
|
2022-03-31T23:14:35.000Z
|
tests/data/trailing_comma_optional_parens1.py
|
AppliedIntuition/black
|
bc0c5ca9d41956bf5ed9fc851202579f9e52a338
|
[
"MIT"
] | 1,762
|
2019-07-22T21:23:00.000Z
|
2022-03-31T06:10:22.000Z
|
if e1234123412341234.winerror not in (_winapi.ERROR_SEM_TIMEOUT,
_winapi.ERROR_PIPE_BUSY) or _check_timeout(t):
pass
| 48
| 70
| 0.6875
| 18
| 144
| 5.055556
| 0.833333
| 0.241758
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.148148
| 0.25
| 144
| 3
| 71
| 48
| 0.694444
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.333333
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
5afb45c1824b37c18218132802d2ea263e07ce0a
| 70
|
py
|
Python
|
codewof/programming/content/en/bookends/solution.py
|
uccser-admin/programming-practice-prototype
|
3af4c7d85308ac5bb35bb13be3ec18cac4eb8308
|
[
"MIT"
] | 3
|
2019-08-29T04:11:22.000Z
|
2021-06-22T16:05:51.000Z
|
codewof/programming/content/en/bookends/solution.py
|
uccser-admin/programming-practice-prototype
|
3af4c7d85308ac5bb35bb13be3ec18cac4eb8308
|
[
"MIT"
] | 265
|
2019-05-30T03:51:46.000Z
|
2022-03-31T01:05:12.000Z
|
codewof/programming/content/en/bookends/solution.py
|
samuelsandri/codewof
|
c9b8b378c06b15a0c42ae863b8f46581de04fdfc
|
[
"MIT"
] | 7
|
2019-06-29T12:13:37.000Z
|
2021-09-06T06:49:14.000Z
|
def add_bookends(books):
return ['Bookend'] + books + ['Bookend']
| 23.333333
| 44
| 0.642857
| 8
| 70
| 5.5
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.171429
| 70
| 2
| 45
| 35
| 0.758621
| 0
| 0
| 0
| 0
| 0
| 0.2
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0.5
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
850fac80f01376abd435b94068652a96da8297b6
| 48
|
py
|
Python
|
config.py
|
mostm/pywow
|
470887bf1a7b6a189b21a05189d43f9f670233c9
|
[
"MIT"
] | null | null | null |
config.py
|
mostm/pywow
|
470887bf1a7b6a189b21a05189d43f9f670233c9
|
[
"MIT"
] | 1
|
2017-12-20T03:06:00.000Z
|
2017-12-20T03:06:09.000Z
|
config.py
|
mostm/pywow
|
470887bf1a7b6a189b21a05189d43f9f670233c9
|
[
"MIT"
] | null | null | null |
blizzard_key = 'Your_WoW_Community_APIKEY_here'
| 24
| 47
| 0.875
| 7
| 48
| 5.285714
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.0625
| 48
| 1
| 48
| 48
| 0.822222
| 0
| 0
| 0
| 0
| 0
| 0.625
| 0.625
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
5172bef7eedfc140810822a2e05bb29158392364
| 115
|
py
|
Python
|
endaq/__init__.py
|
MideTechnology/endaq-python
|
a878efdd65f718c1324d92d467b19fd3b4142cd0
|
[
"MIT"
] | 5
|
2021-12-02T04:41:52.000Z
|
2022-02-01T19:44:41.000Z
|
endaq/__init__.py
|
MideTechnology/endaq-python
|
a878efdd65f718c1324d92d467b19fd3b4142cd0
|
[
"MIT"
] | 136
|
2021-09-28T17:45:20.000Z
|
2022-03-30T11:35:15.000Z
|
endaq/__init__.py
|
MideTechnology/endaq-python
|
a878efdd65f718c1324d92d467b19fd3b4142cd0
|
[
"MIT"
] | 2
|
2021-11-08T19:22:17.000Z
|
2021-12-15T20:25:04.000Z
|
import endaq.calc
import endaq.cloud
import endaq.ide
import endaq.plot
import endaq.batch
__version__ = "1.4.0"
| 12.777778
| 21
| 0.782609
| 19
| 115
| 4.526316
| 0.578947
| 0.639535
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.03
| 0.130435
| 115
| 8
| 22
| 14.375
| 0.83
| 0
| 0
| 0
| 0
| 0
| 0.043478
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.833333
| 0
| 0.833333
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
51c23efb0d999a63cbe8715269bb24b3afbcc920
| 126
|
py
|
Python
|
funchacks/sig/__init__.py
|
Animatea/funchacks
|
1589cdc3e042d96e8bb3e6b665111dc8d23208b1
|
[
"Apache-2.0"
] | 6
|
2021-12-30T11:54:25.000Z
|
2022-02-01T15:56:03.000Z
|
funchacks/sig/__init__.py
|
Animatea/funchacks
|
1589cdc3e042d96e8bb3e6b665111dc8d23208b1
|
[
"Apache-2.0"
] | null | null | null |
funchacks/sig/__init__.py
|
Animatea/funchacks
|
1589cdc3e042d96e8bb3e6b665111dc8d23208b1
|
[
"Apache-2.0"
] | null | null | null |
from .impl import *
from .localvars import *
from .marks import *
__all__ = impl.__all__ + localvars.__all__ + marks.__all__
| 21
| 58
| 0.746032
| 16
| 126
| 4.875
| 0.375
| 0.25641
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.15873
| 126
| 5
| 59
| 25.2
| 0.735849
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.75
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
a40bfbecd07a626c1d5c6f2bcae96f4c67c11397
| 118
|
py
|
Python
|
status/admin.py
|
DK-Nguyen/Django_Social_Network
|
6061e28b7574a612a71ba2661eabf6d024b930cd
|
[
"MIT"
] | 14
|
2020-12-05T08:20:21.000Z
|
2022-03-07T12:18:40.000Z
|
status/admin.py
|
szdytom/segmentoj
|
f1fe9aab48b76165302ed2e34499afb78747e1f0
|
[
"MIT"
] | 33
|
2020-02-14T10:57:50.000Z
|
2022-03-12T00:25:14.000Z
|
status/admin.py
|
szdytom/segmentoj
|
f1fe9aab48b76165302ed2e34499afb78747e1f0
|
[
"MIT"
] | 13
|
2020-10-20T09:32:46.000Z
|
2022-01-02T00:27:51.000Z
|
from django.contrib import admin
from .models import Status
# Register your models here.
admin.site.register(Status)
| 19.666667
| 32
| 0.805085
| 17
| 118
| 5.588235
| 0.647059
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.127119
| 118
| 5
| 33
| 23.6
| 0.92233
| 0.220339
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
cfc43e1556a3ec4e8a3fa1760e736fcb3286e778
| 370
|
py
|
Python
|
app/lib/common.py
|
saiho/future-foods-raspberry
|
a1883ac5aa56b90422cda84dbcb94afba8f9010c
|
[
"MIT"
] | null | null | null |
app/lib/common.py
|
saiho/future-foods-raspberry
|
a1883ac5aa56b90422cda84dbcb94afba8f9010c
|
[
"MIT"
] | null | null | null |
app/lib/common.py
|
saiho/future-foods-raspberry
|
a1883ac5aa56b90422cda84dbcb94afba8f9010c
|
[
"MIT"
] | null | null | null |
from datetime import timedelta
version: int = 202111162251
measurement_interval: timedelta = timedelta(minutes=5)
post_data_interval: timedelta = timedelta(hours=2)
picture_take_interval: timedelta = timedelta(days=1)
picture_format: str = "webp"
scd30_temperature_offset_correction_interval: timedelta = timedelta(hours=6)
scd30_temperature_offset_max: float = 2 # ℃
| 37
| 76
| 0.821622
| 48
| 370
| 6.104167
| 0.645833
| 0.232082
| 0.354949
| 0.211604
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.062874
| 0.097297
| 370
| 9
| 77
| 41.111111
| 0.808383
| 0.002703
| 0
| 0
| 0
| 0
| 0.010899
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.125
| 0
| 0.125
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
cfd559390b3417f07b78ac93e2120a08876e4b16
| 157
|
py
|
Python
|
patches/data/__init__.py
|
sflippl/patches
|
c19889e676e231af44669a01c61854e9e5791227
|
[
"MIT"
] | null | null | null |
patches/data/__init__.py
|
sflippl/patches
|
c19889e676e231af44669a01c61854e9e5791227
|
[
"MIT"
] | null | null | null |
patches/data/__init__.py
|
sflippl/patches
|
c19889e676e231af44669a01c61854e9e5791227
|
[
"MIT"
] | null | null | null |
"""Datasets that are suitable for contrastive predictive coding.
"""
from .contrastive_data import *
from .hidden_markov import *
from .timeseries import *
| 22.428571
| 64
| 0.77707
| 19
| 157
| 6.315789
| 0.736842
| 0.166667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.140127
| 157
| 6
| 65
| 26.166667
| 0.888889
| 0.388535
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
320fae5d72a3cd8ee0b01ca68240fdee8cc114eb
| 137
|
py
|
Python
|
apps/users/admin.py
|
michaldomino/Voice-interface-optimization-server
|
fff59d4c5db599e35d4b5f3915bbb272d2000a26
|
[
"MIT"
] | null | null | null |
apps/users/admin.py
|
michaldomino/Voice-interface-optimization-server
|
fff59d4c5db599e35d4b5f3915bbb272d2000a26
|
[
"MIT"
] | null | null | null |
apps/users/admin.py
|
michaldomino/Voice-interface-optimization-server
|
fff59d4c5db599e35d4b5f3915bbb272d2000a26
|
[
"MIT"
] | 1
|
2022-01-13T15:54:43.000Z
|
2022-01-13T15:54:43.000Z
|
from django.contrib import admin
# Register your models here.
from apps.users.models import CustomUser
admin.site.register(CustomUser)
| 19.571429
| 40
| 0.817518
| 19
| 137
| 5.894737
| 0.684211
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.116788
| 137
| 6
| 41
| 22.833333
| 0.92562
| 0.189781
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
32114b3eec05262f375883c0b90f2817e37cbbd1
| 97
|
py
|
Python
|
Libraries/utils.py
|
GalaxyGameNFT/DiamondSetter
|
2739d32327ff57a08b042f2bd269597143040334
|
[
"MIT"
] | 33
|
2020-06-11T20:44:56.000Z
|
2022-03-26T18:42:34.000Z
|
Libraries/utils.py
|
GalaxyGameNFT/DiamondSetter
|
2739d32327ff57a08b042f2bd269597143040334
|
[
"MIT"
] | 6
|
2020-06-15T08:42:57.000Z
|
2022-03-22T21:47:26.000Z
|
Libraries/utils.py
|
lampshade9909/DiamondSetter
|
2739d32327ff57a08b042f2bd269597143040334
|
[
"MIT"
] | 7
|
2020-07-12T09:13:44.000Z
|
2022-01-27T22:51:29.000Z
|
def ConvertListOfStringsToLowercaseListOfStrings(myList):
return [x.lower() for x in myList]
| 32.333333
| 57
| 0.793814
| 10
| 97
| 7.7
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.123711
| 97
| 2
| 58
| 48.5
| 0.905882
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| false
| 0
| 0
| 0.5
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
5c68439460e052fba9e9e9df10d8a6426f5d6b17
| 30
|
py
|
Python
|
.devcontainer/copilot/scraper.py
|
draschke/vsc-sap-hana-mta-dev-env-node16x
|
ac5b41e404d07125660f20b057d40bbf6b198773
|
[
"MIT"
] | 1
|
2021-08-31T20:10:21.000Z
|
2021-08-31T20:10:21.000Z
|
.devcontainer/copilot/scraper.py
|
draschke/vsc-sap-hana-mta-dev-env-node16x
|
ac5b41e404d07125660f20b057d40bbf6b198773
|
[
"MIT"
] | 2
|
2021-12-18T06:57:11.000Z
|
2021-12-18T06:57:25.000Z
|
.devcontainer/copilot/scraper.py
|
draschke/vsc-sap-hana-mta-dev-env-node16x
|
ac5b41e404d07125660f20b057d40bbf6b198773
|
[
"MIT"
] | 7
|
2021-11-04T13:52:09.000Z
|
2021-11-12T19:15:59.000Z
|
# Download all the images from
| 30
| 30
| 0.8
| 5
| 30
| 4.8
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 30
| 1
| 30
| 30
| 0.96
| 0.933333
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
5c7ebd361d085cfec8fde291650ea1e319f91da6
| 2,111
|
py
|
Python
|
tests/unit/api/commands/test_reissue_command.py
|
antonku/ncssl_api_client
|
c463b000960d50368d39bde2a180499f1da3a29a
|
[
"MIT"
] | 8
|
2017-11-28T11:05:52.000Z
|
2021-11-16T13:52:45.000Z
|
tests/unit/api/commands/test_reissue_command.py
|
antonku/ncssl_api_client
|
c463b000960d50368d39bde2a180499f1da3a29a
|
[
"MIT"
] | 4
|
2018-12-23T14:52:11.000Z
|
2019-08-09T21:01:44.000Z
|
tests/unit/api/commands/test_reissue_command.py
|
antonku/ncssl_api_client
|
c463b000960d50368d39bde2a180499f1da3a29a
|
[
"MIT"
] | 2
|
2017-11-28T14:38:24.000Z
|
2017-11-29T09:03:20.000Z
|
import mock
from unittest import TestCase
from ncssl_api_client.api.commands.reissue_command import ReissueCommand
@mock.patch('ncssl_api_client.api.api_client.ApiClient')
class ReissueCommandTest(TestCase):
@mock.patch('ncssl_api_client.api.commands.activate_command.CsrGenerator')
@mock.patch('ncssl_api_client.api.commands.activate_command.ConfigManager')
def test_returns_api_response(self, csr_generator_mock, config_manager_mock, api_client_mock):
command_params = {'common_name': 'test'}
api_client_mock.send_call.return_value = 'test api response'
command = ReissueCommand(command_params, api_client_mock)
result = command.execute()
self.assertEqual(result, 'test api response')
@mock.patch('ncssl_api_client.api.commands.activate_command.CsrGenerator')
@mock.patch('ncssl_api_client.api.commands.activate_command.ConfigManager')
def test_does_not_enable_key_encryption_by_default(self, csr_generator_mock, config_manager_mock, api_client_mock):
crypto_config_mock = mock.MagicMock()
config_manager_mock.get_crypto_config.return_value = crypto_config_mock
command_params = {'common_name': 'test'}
api_client_mock.send_call.return_value = 'test api response'
command = ReissueCommand(command_params, api_client_mock)
command.execute()
crypto_config_mock.enable_key_encryption.assert_not_called()
@mock.patch('ncssl_api_client.api.commands.activate_command.CsrGenerator')
@mock.patch('ncssl_api_client.api.commands.activate_command.ConfigManager')
def test_enables_key_encryption(self, config_manager_mock, csr_generator_mock, api_client_mock):
crypto_config_mock = mock.MagicMock()
config_manager_mock.get_crypto_config.return_value = crypto_config_mock
command_params = {'common_name': 'test', 'encrypt': True}
api_client_mock.send_call.return_value = 'test api response'
command = ReissueCommand(command_params, api_client_mock)
command.execute()
crypto_config_mock.enable_key_encryption.assert_called_once()
| 54.128205
| 119
| 0.774041
| 268
| 2,111
| 5.679104
| 0.201493
| 0.106439
| 0.076873
| 0.089356
| 0.793035
| 0.77661
| 0.759527
| 0.759527
| 0.759527
| 0.759527
| 0
| 0
| 0.137849
| 2,111
| 38
| 120
| 55.552632
| 0.836264
| 0
| 0
| 0.606061
| 0
| 0
| 0.245381
| 0.188536
| 0
| 0
| 0
| 0
| 0.090909
| 1
| 0.090909
| false
| 0
| 0.090909
| 0
| 0.212121
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
5c9f80c48aa75e84fe27637d3844f18c4dd05db5
| 121
|
py
|
Python
|
models/armedforces/formations/units/unitfactory.py
|
MaksNech/pylab2018_ht_4-5
|
81ba35b8181095af506ee2fc5c51257db5cf15ce
|
[
"MIT"
] | null | null | null |
models/armedforces/formations/units/unitfactory.py
|
MaksNech/pylab2018_ht_4-5
|
81ba35b8181095af506ee2fc5c51257db5cf15ce
|
[
"MIT"
] | 1
|
2021-06-01T23:19:17.000Z
|
2021-06-01T23:19:17.000Z
|
models/armedforces/formations/units/unitfactory.py
|
MaksNech/python3_battle_simulator
|
81ba35b8181095af506ee2fc5c51257db5cf15ce
|
[
"MIT"
] | null | null | null |
from abc import ABC, abstractmethod
class UnitFactory(ABC):
@abstractmethod
def new_unit(self):
pass
| 12.1
| 35
| 0.677686
| 14
| 121
| 5.785714
| 0.785714
| 0.419753
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.256198
| 121
| 9
| 36
| 13.444444
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0.2
| 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
| 1
| 0
| 0
| 1
| 0
|
0
| 5
|
5ce60a37f7540bf70e78dec449417e6236f3af15
| 585
|
py
|
Python
|
terrascript/bigip/d.py
|
mjuenema/python-terrascript
|
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
|
[
"BSD-2-Clause"
] | 507
|
2017-07-26T02:58:38.000Z
|
2022-01-21T12:35:13.000Z
|
terrascript/bigip/d.py
|
mjuenema/python-terrascript
|
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
|
[
"BSD-2-Clause"
] | 135
|
2017-07-20T12:01:59.000Z
|
2021-10-04T22:25:40.000Z
|
terrascript/bigip/d.py
|
mjuenema/python-terrascript
|
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
|
[
"BSD-2-Clause"
] | 81
|
2018-02-20T17:55:28.000Z
|
2022-01-31T07:08:40.000Z
|
# terrascript/bigip/d.py
# Automatically generated by tools/makecode.py ()
import warnings
warnings.warn(
"using the 'legacy layout' is deprecated", DeprecationWarning, stacklevel=2
)
import terrascript
class bigip_ltm_datagroup(terrascript.Data):
pass
class bigip_ltm_irule(terrascript.Data):
pass
class bigip_ltm_monitor(terrascript.Data):
pass
class bigip_ltm_node(terrascript.Data):
pass
class bigip_ltm_pool(terrascript.Data):
pass
class bigip_ssl_certificate(terrascript.Data):
pass
class bigip_vwan_config(terrascript.Data):
pass
| 15.394737
| 79
| 0.764103
| 74
| 585
| 5.851351
| 0.459459
| 0.161663
| 0.307159
| 0.332564
| 0.429561
| 0.295612
| 0
| 0
| 0
| 0
| 0
| 0.002024
| 0.155556
| 585
| 37
| 80
| 15.810811
| 0.874494
| 0.119658
| 0
| 0.368421
| 1
| 0
| 0.076172
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.368421
| 0.105263
| 0
| 0.473684
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
5ce78b688f98d93c41f0b9bbb26de81f72678ffd
| 163
|
py
|
Python
|
eosdis_store/__init__.py
|
nasa/zarr-eosdis-store
|
15790b875926185846eb3dc4e34596c8050ceda1
|
[
"Apache-2.0"
] | 6
|
2021-05-06T14:22:51.000Z
|
2021-08-16T03:49:27.000Z
|
eosdis_store/__init__.py
|
nasa/zarr-eosdis-store
|
15790b875926185846eb3dc4e34596c8050ceda1
|
[
"Apache-2.0"
] | 4
|
2021-05-06T16:19:44.000Z
|
2021-11-17T17:09:56.000Z
|
eosdis_store/__init__.py
|
nasa/zarr-eosdis-store
|
15790b875926185846eb3dc4e34596c8050ceda1
|
[
"Apache-2.0"
] | 2
|
2021-05-06T16:30:47.000Z
|
2021-08-16T15:02:18.000Z
|
from .stores import EosdisStore, ConsolidatedChunkStore
from .version import __version__
__all__ = ['EosdisStore', '__version__', 'version']
version = __version__
| 32.6
| 55
| 0.803681
| 15
| 163
| 7.666667
| 0.466667
| 0.365217
| 0.365217
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.104294
| 163
| 5
| 56
| 32.6
| 0.787671
| 0
| 0
| 0
| 0
| 0
| 0.176829
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
7a64618f5ce41d0edd674e8a1b493ca6bc283680
| 16,456
|
py
|
Python
|
src/layers.py
|
adaliuBC/DropEdge
|
c2bc536fec052559a3bbcbbe3dd27af2aae57440
|
[
"MIT"
] | null | null | null |
src/layers.py
|
adaliuBC/DropEdge
|
c2bc536fec052559a3bbcbbe3dd27af2aae57440
|
[
"MIT"
] | null | null | null |
src/layers.py
|
adaliuBC/DropEdge
|
c2bc536fec052559a3bbcbbe3dd27af2aae57440
|
[
"MIT"
] | null | null | null |
import math
import torch
from torch.nn.parameter import Parameter
from torch.nn.modules.module import Module
from torch import nn
import torch.nn.functional as F
from torch.nn.utils import weight_norm
from base_layers import GraphBaseBlock, GraphConvolutionBS
class MultiLayerGCNBlock(Module):
"""
Muti-Layer GCN with same hidden dimension.
"""
def __init__(self, in_features, out_features, nbaselayer,
withbn=False, withloop=False, withgn=False, withnn=False, withse=False, supweight=False,
activation=F.relu, dropout=True, aggrmethod=None, dense=None):
"""
The multiple layer GCN block.
:param in_features: the input feature dimension.
:param out_features: the hidden feature dimension.
:param nbaselayer: the number of layers in the base block.
:param withbn: using batch normalization in graph convolution.
:param withloop: using self feature modeling in graph convolution.
:param activation: the activation function, default is ReLu.
:param dropout: the dropout ratio.
:param aggrmethod: not applied.
:param dense: not applied.
"""
super(MultiLayerGCNBlock, self).__init__()
self.model = GraphBaseBlock(in_features=in_features,
out_features=out_features,
nbaselayer=nbaselayer,
withbn=withbn,
withloop=withloop,
withgn=withgn,
withnn=withnn,
withse=withse,
supweight = supweight,
activation=activation,
dropout=dropout,
dense=False,
aggrmethod="nores")
def forward(self, input, adj):
return self.model.forward(input, adj)
def get_outdim(self):
return self.model.get_outdim()
def __repr__(self):
return "%s %s (%d - [%d:%d] > %d)" % (self.__class__.__name__,
self.aggrmethod,
self.model.in_features,
self.model.hiddendim,
self.model.nhiddenlayer,
self.model.out_features)
class ResGCNBlock(Module):
"""
The multiple layer GCN with residual connection block.
"""
def __init__(self, in_features, out_features, nbaselayer,
withbn=False, withloop=False, withgn=False, withnn=False, withse=False, supweight=False,
activation=F.relu, dropout=True, aggrmethod=None, dense=None):
"""
The multiple layer GCN with residual connection block.
:param in_features: the input feature dimension.
:param out_features: the hidden feature dimension.
:param nbaselayer: the number of layers in the base block.
:param withbn: using batch normalization in graph convolution.
:param withloop: using self feature modeling in graph convolution.
:param activation: the activation function, default is ReLu.
:param dropout: the dropout ratio.
:param aggrmethod: not applied.
:param dense: not applied.
"""
super(ResGCNBlock, self).__init__()
self.model = GraphBaseBlock(in_features=in_features,
out_features=out_features,
nbaselayer=nbaselayer,
withbn=withbn,
withloop=withloop,
withgn=withgn,
withnn=withnn,
withse=withse,
supweight = supweight,
activation=activation,
dropout=dropout,
dense=False,
aggrmethod="add")
def forward(self, input, adj):
return self.model.forward(input, adj)
def get_outdim(self):
return self.model.get_outdim()
def __repr__(self):
return "%s %s (%d - [%d:%d] > %d)" % (self.__class__.__name__,
self.aggrmethod,
self.model.in_features,
self.model.hiddendim,
self.model.nhiddenlayer,
self.model.out_features)
class DenseGCNBlock(Module):
"""
The multiple layer GCN with dense connection block.
"""
def __init__(self, in_features, out_features, nbaselayer,
withbn=False, withloop=False, withgn=False, withnn=False, withse=False, supweight=False,
activation=F.relu, dropout=True, aggrmethod="concat", dense=True):
"""
The multiple layer GCN with dense connection block.
:param in_features: the input feature dimension.
:param out_features: the hidden feature dimension.
:param nbaselayer: the number of layers in the base block.
:param withbn: using batch normalization in graph convolution.
:param withloop: using self feature modeling in graph convolution.
:param activation: the activation function, default is ReLu.
:param dropout: the dropout ratio.
:param aggrmethod: the aggregation function for the output. For denseblock, default is "concat".
:param dense: default is True, cannot be changed.
"""
super(DenseGCNBlock, self).__init__()
self.model = GraphBaseBlock(in_features=in_features,
out_features=out_features,
nbaselayer=nbaselayer,
withbn=withbn,
withloop=withloop,
withgn=withgn,
withnn=withnn,
withse=withse,
supweight = supweight,
activation=activation,
dropout=dropout,
dense=True,
aggrmethod=aggrmethod)
def forward(self, input, adj):
return self.model.forward(input, adj)
def get_outdim(self):
return self.model.get_outdim()
def __repr__(self):
return "%s %s (%d - [%d:%d] > %d)" % (self.__class__.__name__,
self.aggrmethod,
self.model.in_features,
self.model.hiddendim,
self.model.nhiddenlayer,
self.model.out_features)
class InecptionGCNBlock(Module):
"""
The multiple layer GCN with inception connection block.
"""
def __init__(self, in_features, out_features, nbaselayer,
withbn=False, withloop=False, withgn=False, withnn=False, withse=False, supweight=False,
activation=F.relu, dropout=True, aggrmethod="concat", dense=False):
"""
The multiple layer GCN with inception connection block.
:param in_features: the input feature dimension.
:param out_features: the hidden feature dimension.
:param nbaselayer: the number of layers in the base block.
:param withbn: using batch normalization in graph convolution.
:param withloop: using self feature modeling in graph convolution.
:param activation: the activation function, default is ReLu.
:param dropout: the dropout ratio.
:param aggrmethod: the aggregation function for baseblock, can be "concat" and "add". For "resgcn", the default
is "add", for others the default is "concat".
:param dense: not applied. The default is False, cannot be changed.
"""
super(InecptionGCNBlock, self).__init__()
self.in_features = in_features
self.out_features = out_features
self.hiddendim = out_features
self.nbaselayer = nbaselayer
self.activation = activation
self.aggrmethod = aggrmethod
self.dropout = dropout
self.withbn = withbn
self.withloop = withloop
self.withgn=withgn
self.withnn=withnn
self.withse=withse
self.supweight = supweight
self.midlayers = nn.ModuleList()
self.__makehidden()
if self.aggrmethod == "concat":
self.out_features = in_features + out_features * nbaselayer
elif self.aggrmethod == "add":
if in_features != self.hiddendim:
raise RuntimeError("The dimension of in_features and hiddendim should be matched in 'add' model.")
self.out_features = out_features
else:
raise NotImplementedError("The aggregation method only support 'concat', 'add'.")
def __makehidden(self):
# for j in xrange(self.nhiddenlayer):
for j in range(self.nbaselayer):
reslayer = nn.ModuleList()
# for i in xrange(j + 1):
for i in range(j + 1):
if i == 0:
layer = GraphConvolutionBS(self.in_features, self.hiddendim, self.activation, self.withbn,
self.withloop, withgn=self.withgn, withnn=self.withnn, withse=self.withse,
supweight=self.supweight)
else:
layer = GraphConvolutionBS(self.hiddendim, self.hiddendim, self.activation, self.withbn,
self.withloop, withgn=self.withgn, withnn=self.withnn, withse=self.withse,
supweight=self.supweight)
reslayer.append(layer)
self.midlayers.append(reslayer)
def forward(self, input, adj):
x = input
for reslayer in self.midlayers:
subx = input
for gc in reslayer:
subx = gc(subx, adj)
subx = F.dropout(subx, self.dropout, training=self.training)
x = self._doconcat(x, subx)
return x
def get_outdim(self):
return self.out_features
def _doconcat(self, x, subx):
if self.aggrmethod == "concat":
return torch.cat((x, subx), 1)
elif self.aggrmethod == "add":
return x + subx
def __repr__(self):
return "%s %s (%d - [%d:%d] > %d)" % (self.__class__.__name__,
self.aggrmethod,
self.in_features,
self.hiddendim,
self.nbaselayer,
self.out_features)
class IdmapResGCNBlock(Module):
"""
The multiple layer GCN with residual connection block.
"""
def __init__(self, in_features, out_features, nbaselayer,
withbn=False, withloop=False, withgn=False, withnn=False, withse=False, supweight=False,
activation=F.relu, dropout=True, aggrmethod=None, dense=None):
"""
The multiple layer GCN with residual connection block.
:param in_features: the input feature dimension.
:param out_features: the hidden feature dimension.
:param nbaselayer: the number of layers in the base block.
:param withbn: using batch normalization in graph convolution.
:param withloop: using self feature modeling in graph convolution.
:param activation: the activation function, default is ReLu.
:param dropout: the dropout ratio.
:param aggrmethod: not applied.
:param dense: not applied.
"""
super(IdmapResGCNBlock, self).__init__()
self.model = GraphBaseBlock(in_features=in_features,
out_features=out_features,
nbaselayer=nbaselayer,
withbn=False,
withloop=withloop,
withgn=withgn,
withnn=withnn,
withse=withse,
supweight = supweight,
activation=activation,
dropout=dropout,
dense=False,
idmap=True,
aggrmethod="add")
def forward(self, input, adj):
return self.model.forward(input, adj)
def get_outdim(self):
return self.model.get_outdim()
def __repr__(self):
return "%s %s (%d - [%d:%d] > %d)" % (self.__class__.__name__,
self.aggrmethod,
self.model.in_features,
self.model.hiddendim,
self.model.nhiddenlayer,
self.model.out_features)
class HebbGCNBlock(Module):
"""
The multiple layer GCN with residual connection block.
"""
def __init__(self, in_features, out_features, nbaselayer,
withbn=False, withloop=False, withgn=False, withnn=False, withse=False, supweight=False,
activation=F.relu, dropout=True, aggrmethod=None, dense=None):
"""
The multiple layer GCN with residual connection block.
:param in_features: the input feature dimension.
:param out_features: the hidden feature dimension.
:param nbaselayer: the number of layers in the base block.
:param withbn: using batch normalization in graph convolution.
:param withloop: using self feature modeling in graph convolution.
:param activation: the activation function, default is ReLu.
:param dropout: the dropout ratio.
:param aggrmethod: not applied.
:param dense: not applied.
"""
super(HebbGCNBlock, self).__init__()
self.model = GraphBaseBlock(in_features=in_features,
out_features=out_features,
nbaselayer=nbaselayer,
withbn=withbn,
withloop=withloop,
withgn=withgn,
withnn=withnn,
withse=withse,
supweight=supweight,
activation=activation,
dropout=dropout,
dense=False,
ishebb=True,
aggrmethod="nores")
def forward(self, input, adj):
return self.model.forward(input, adj)
def get_outdim(self):
return self.model.get_outdim()
def __repr__(self):
return "%s %s (%d - [%d:%d] > %d)" % (self.__class__.__name__,
self.aggrmethod,
self.model.in_features,
self.model.hiddendim,
self.model.nhiddenlayer,
self.model.out_features)
| 46.224719
| 122
| 0.503221
| 1,458
| 16,456
| 5.536351
| 0.091907
| 0.049058
| 0.044723
| 0.031219
| 0.792121
| 0.771928
| 0.762141
| 0.762141
| 0.747275
| 0.747275
| 0
| 0.000423
| 0.425134
| 16,456
| 355
| 123
| 46.35493
| 0.852854
| 0.219798
| 0
| 0.681818
| 0
| 0
| 0.027427
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.118182
| false
| 0
| 0.036364
| 0.077273
| 0.272727
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
7a6b80c0a507d586b5fa283e85250025acdb22e1
| 33
|
py
|
Python
|
python/20190308/flask_qa_app/app/utils/__init__.py
|
Realize0917/career
|
b5d02ac53cfc3ce3a2ca38d11480c51560283e67
|
[
"MIT"
] | 3
|
2019-01-17T05:50:51.000Z
|
2019-03-15T10:10:07.000Z
|
python/20190308/flask_qa_app/app/utils/__init__.py
|
Realize0917/career
|
b5d02ac53cfc3ce3a2ca38d11480c51560283e67
|
[
"MIT"
] | 10
|
2019-01-17T06:07:03.000Z
|
2019-02-19T05:55:25.000Z
|
python/20190308/flask_qa_app/app/utils/__init__.py
|
Realize0917/career
|
b5d02ac53cfc3ce3a2ca38d11480c51560283e67
|
[
"MIT"
] | 4
|
2018-12-22T07:32:55.000Z
|
2019-03-06T09:13:48.000Z
|
from .tools import fetch_question
| 33
| 33
| 0.878788
| 5
| 33
| 5.6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.090909
| 33
| 1
| 33
| 33
| 0.933333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
7a702175226268a0ea557e3d0e684fb2d1b60cca
| 85
|
py
|
Python
|
segmentation_rt/util/__init__.py
|
BrouBoni/segmentation_RT
|
e44f4fafe23652f3122a5e65bd8515283dcfdbe0
|
[
"MIT"
] | 6
|
2021-02-11T15:59:56.000Z
|
2021-12-17T20:15:35.000Z
|
segmentation_rt/util/__init__.py
|
liuhd073/segmentation_RT
|
e44f4fafe23652f3122a5e65bd8515283dcfdbe0
|
[
"MIT"
] | null | null | null |
segmentation_rt/util/__init__.py
|
liuhd073/segmentation_RT
|
e44f4fafe23652f3122a5e65bd8515283dcfdbe0
|
[
"MIT"
] | 3
|
2021-04-09T17:08:02.000Z
|
2021-08-03T07:20:20.000Z
|
from .util import print_log, format_log, listdir_full_path, save_image, get_subjects
| 42.5
| 84
| 0.847059
| 14
| 85
| 4.714286
| 0.928571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.094118
| 85
| 1
| 85
| 85
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 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
| 1
| 0
| 0
| 1
|
0
| 5
|
7aa52fbade559bcccf454e188ee42bc799e3a0cf
| 294
|
py
|
Python
|
03/03/capitalize.py
|
pylangstudy/201708
|
126b1af96a1d1f57522d5a1d435b58597bea2e57
|
[
"CC0-1.0"
] | null | null | null |
03/03/capitalize.py
|
pylangstudy/201708
|
126b1af96a1d1f57522d5a1d435b58597bea2e57
|
[
"CC0-1.0"
] | 39
|
2017-07-31T22:54:01.000Z
|
2017-08-31T00:19:03.000Z
|
03/03/capitalize.py
|
pylangstudy/201708
|
126b1af96a1d1f57522d5a1d435b58597bea2e57
|
[
"CC0-1.0"
] | null | null | null |
#最初の文字を大文字にし、残りを小文字に
print(b'abcdefg'.capitalize())
print(b'ABCDEFG'.capitalize())
print(b'abcdefg'.upper())
print(b'ABCDEFG'.lower())
print(bytearray(b'abcdefg').capitalize())
print(bytearray(b'ABCDEFG').capitalize())
print(bytearray(b'abcdefg').upper())
print(bytearray(b'ABCDEFG').lower())
| 26.727273
| 41
| 0.741497
| 38
| 294
| 5.736842
| 0.236842
| 0.293578
| 0.238532
| 0.422018
| 0.665138
| 0.665138
| 0.665138
| 0.394495
| 0.394495
| 0
| 0
| 0
| 0.034014
| 294
| 10
| 42
| 29.4
| 0.767606
| 0.064626
| 0
| 0
| 0
| 0
| 0.20438
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 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
| 1
|
0
| 5
|
8fc0effe167d8459e331cc699b17c13f5f76c58a
| 103
|
py
|
Python
|
BOJ/17000~17999/17200~17299/17256.py
|
shinkeonkim/today-ps
|
f3e5e38c5215f19579bb0422f303a9c18c626afa
|
[
"Apache-2.0"
] | 2
|
2020-01-29T06:54:41.000Z
|
2021-11-07T13:23:27.000Z
|
BOJ/17000~17999/17200~17299/17256.py
|
shinkeonkim/Today_PS
|
bb0cda0ee1b9c57e1cfa38355e29d0f1c6167a44
|
[
"Apache-2.0"
] | null | null | null |
BOJ/17000~17999/17200~17299/17256.py
|
shinkeonkim/Today_PS
|
bb0cda0ee1b9c57e1cfa38355e29d0f1c6167a44
|
[
"Apache-2.0"
] | null | null | null |
A=list(map(int,input().split()))
C=list(map(int,input().split()))
print(C[0]-A[2],C[1]//A[1],C[2]-A[0])
| 34.333333
| 37
| 0.572816
| 25
| 103
| 2.36
| 0.44
| 0.237288
| 0.338983
| 0.508475
| 0.677966
| 0
| 0
| 0
| 0
| 0
| 0
| 0.059406
| 0.019417
| 103
| 3
| 37
| 34.333333
| 0.524752
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.333333
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
8fdd06e147a109f01d2c7676a3dc4e03fcaa410b
| 144
|
py
|
Python
|
core_get/actions/login/login_options.py
|
core-get/core-get
|
8fb960e4e51d0d46b5e3b2f4832eb4a39e0e60f7
|
[
"MIT"
] | null | null | null |
core_get/actions/login/login_options.py
|
core-get/core-get
|
8fb960e4e51d0d46b5e3b2f4832eb4a39e0e60f7
|
[
"MIT"
] | null | null | null |
core_get/actions/login/login_options.py
|
core-get/core-get
|
8fb960e4e51d0d46b5e3b2f4832eb4a39e0e60f7
|
[
"MIT"
] | null | null | null |
from dataclasses import dataclass
from core_get.options.options import Options
@dataclass
class LoginOptions(Options):
access_token: str
| 16
| 44
| 0.8125
| 18
| 144
| 6.388889
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.138889
| 144
| 8
| 45
| 18
| 0.927419
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.4
| 0
| 0.8
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
890544bdc4fe6572e8a9aeff94f4aebac016b2d3
| 46
|
py
|
Python
|
DataWeb/run.py
|
MathGon/datacourses
|
954b8939a0c8cf10966312031107156d25321d4b
|
[
"MIT"
] | 1
|
2020-07-13T17:50:03.000Z
|
2020-07-13T17:50:03.000Z
|
DataWeb/run.py
|
martinprobson/DataWeb_Template
|
da50bdc0fc9b4d3640c6153dc3eb3078c76892fe
|
[
"MIT"
] | null | null | null |
DataWeb/run.py
|
martinprobson/DataWeb_Template
|
da50bdc0fc9b4d3640c6153dc3eb3078c76892fe
|
[
"MIT"
] | null | null | null |
from DataWeb import app
app.run(debug=True)
| 9.2
| 23
| 0.76087
| 8
| 46
| 4.375
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.152174
| 46
| 4
| 24
| 11.5
| 0.897436
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
8f30d0df68d9961b45c2020b371c9614df0b4664
| 118
|
py
|
Python
|
chapter-09/exercise002.py
|
krastin/pp-cs3.0
|
502be9aac2d84215db176864e443c219e5e26591
|
[
"MIT"
] | null | null | null |
chapter-09/exercise002.py
|
krastin/pp-cs3.0
|
502be9aac2d84215db176864e443c219e5e26591
|
[
"MIT"
] | null | null | null |
chapter-09/exercise002.py
|
krastin/pp-cs3.0
|
502be9aac2d84215db176864e443c219e5e26591
|
[
"MIT"
] | null | null | null |
half_lives = [87.74, 24110.0, 6537.0, 14.4, 376000.0]
for element in half_lives:
print(element, end=' ')
print("")
| 29.5
| 53
| 0.652542
| 21
| 118
| 3.571429
| 0.714286
| 0.24
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.25
| 0.152542
| 118
| 4
| 54
| 29.5
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0.008403
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
8f7a657d92777f55f002d86dccec6d8a5f5867a2
| 116
|
py
|
Python
|
src/gmx_flow/flow/__init__.py
|
pjohansson/gmx_flow_utils
|
d73318035b647ca12274ab5d615b7f51bfc67e86
|
[
"BlueOak-1.0.0"
] | null | null | null |
src/gmx_flow/flow/__init__.py
|
pjohansson/gmx_flow_utils
|
d73318035b647ca12274ab5d615b7f51bfc67e86
|
[
"BlueOak-1.0.0"
] | null | null | null |
src/gmx_flow/flow/__init__.py
|
pjohansson/gmx_flow_utils
|
d73318035b647ca12274ab5d615b7f51bfc67e86
|
[
"BlueOak-1.0.0"
] | null | null | null |
from .average import average_data
from .convert import convert_gmx_flow_1_to_2
from .supersample import supersample
| 29
| 44
| 0.87069
| 18
| 116
| 5.277778
| 0.611111
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.019231
| 0.103448
| 116
| 3
| 45
| 38.666667
| 0.894231
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
56f82e7b92c27c3fe231d5abd0ae870d65d3102b
| 790
|
py
|
Python
|
test/solution_tests/CHK/test_chk.py
|
DPNT-Sourcecode/CHK-cylq01
|
a8ca9e25b3577370ebf0d35da8298ee523f8e46b
|
[
"Apache-2.0"
] | null | null | null |
test/solution_tests/CHK/test_chk.py
|
DPNT-Sourcecode/CHK-cylq01
|
a8ca9e25b3577370ebf0d35da8298ee523f8e46b
|
[
"Apache-2.0"
] | null | null | null |
test/solution_tests/CHK/test_chk.py
|
DPNT-Sourcecode/CHK-cylq01
|
a8ca9e25b3577370ebf0d35da8298ee523f8e46b
|
[
"Apache-2.0"
] | null | null | null |
import unittest
from solutions.CHK import checkout_solution
class TestSum(unittest.TestCase):
def test_invalid(self):
self.assertEqual(checkout_solution.checkout('ABCa'), -1)
def test_empty_checkout(self):
self.assertEqual(checkout_solution.checkout(''), 0)
def test_one_of_each(self):
self.assertEqual(checkout_solution.checkout('ABCD'), 50 + 30 +20 + 15)
def test_special_offer(self):
self.assertEqual(checkout_solution.checkout('AAABBB'), 130 + 75)
def test_multi_special_offers(self):
self.assertEqual(checkout_solution.checkout('AAAAAAAAA'), 200 + 130 + 50)
def test_buy_2E_get_B_free(self):
self.assertEqual(checkout_solution.checkout('BBBBEE'), 45+30+80)
if __name__ == '__main__':
unittest.main()
| 29.259259
| 81
| 0.712658
| 100
| 790
| 5.32
| 0.47
| 0.210526
| 0.214286
| 0.304511
| 0.484962
| 0.484962
| 0
| 0
| 0
| 0
| 0
| 0.045662
| 0.168354
| 790
| 26
| 82
| 30.384615
| 0.764079
| 0
| 0
| 0
| 0
| 0
| 0.046835
| 0
| 0
| 0
| 0
| 0
| 0.352941
| 1
| 0.352941
| false
| 0
| 0.117647
| 0
| 0.529412
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
710c69888f12a028bceeedb65de5bd1ae2bdd883
| 312
|
py
|
Python
|
Copy_files.py
|
maainul/Paython
|
c72d7fff3b00bc4f379ca6f9dbef0678f01b55f9
|
[
"DOC"
] | null | null | null |
Copy_files.py
|
maainul/Paython
|
c72d7fff3b00bc4f379ca6f9dbef0678f01b55f9
|
[
"DOC"
] | null | null | null |
Copy_files.py
|
maainul/Paython
|
c72d7fff3b00bc4f379ca6f9dbef0678f01b55f9
|
[
"DOC"
] | null | null | null |
import openpyxl,shutil,os
os.chdir('/home/mainul/Desktop/copy_files/automate_online-materials')
shutil.copy('/home/mainul/PycharmProjects/Automate_The_Boring_stuff/practice projects/Chapter_12/chapter_11_exer.py','/home/mainul/Desktop/copy_files/automate_online-materials/chapter_11_all.py')
print(os.getcwd())
| 62.4
| 195
| 0.842949
| 46
| 312
| 5.456522
| 0.586957
| 0.119522
| 0.135458
| 0.167331
| 0.390438
| 0.390438
| 0.390438
| 0.390438
| 0
| 0
| 0
| 0.019672
| 0.022436
| 312
| 4
| 196
| 78
| 0.803279
| 0
| 0
| 0
| 0
| 0
| 0.75
| 0.746795
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.25
| 0
| 0.25
| 0.25
| 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
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
71181055317c1681a5f7c5eff8e4833c928f2714
| 3,862
|
py
|
Python
|
src/models/metrics.py
|
abhipec/fnet
|
551390d8f7e5ecd1c5f6501d8164d17ecfe9062f
|
[
"MIT"
] | 21
|
2017-02-23T23:23:08.000Z
|
2021-07-16T04:03:04.000Z
|
src/models/metrics.py
|
abhipec/fnet
|
551390d8f7e5ecd1c5f6501d8164d17ecfe9062f
|
[
"MIT"
] | 5
|
2018-08-10T08:59:47.000Z
|
2019-01-26T02:02:59.000Z
|
src/models/metrics.py
|
abhipec/fnet
|
551390d8f7e5ecd1c5f6501d8164d17ecfe9062f
|
[
"MIT"
] | 9
|
2017-03-14T03:52:21.000Z
|
2020-08-14T23:09:25.000Z
|
"""
Evaluation metrics for fnet.
"""
import numpy as np
def f1_score(precision, recall):
"""
Compute f1 score.
"""
if precision or recall:
return 2 * precision * recall / (precision + recall)
else:
return 0
def strict(predictions,
targets):
"""
Implementation of strict evaluation metric used by Ling et al.
Since all entities are already identified, in our case P = T.
Args:
predictions: A numpy array of shape [batch_size, labels].
targets: A numpy array of shape [batch_size, labels]
"""
assert predictions.shape == targets.shape,\
"Prediction and target shape should be equal."
ids_that_model_has_predicted = np.sum(predictions, 1) > 0
P = np.sum(ids_that_model_has_predicted)
ids_that_have_target = np.sum(targets, 1) > 0
T = np.sum(ids_that_have_target)
ids_intersection = ids_that_model_has_predicted & ids_that_have_target
predictions = predictions[ids_intersection]
targets = targets[ids_intersection]
_, L = targets.shape
precision = np.sum(np.sum(predictions == targets, 1) == L) / P
recall = np.sum(np.sum(predictions == targets, 1) == L) / T
return f1_score(precision, recall)
def loose_macro(predictions, targets):
"""
Implemetation of loose macro evaluation metric used by Ling et al.
Since all entities are already identified, in our case P = T.
Args:
predictions: A numpy array of shape [batch_size, labels].
targets: A numpy array of shape [batch_size, labels]
"""
assert predictions.shape == targets.shape,\
"Prediction and target shape should be equal."
ids_that_model_has_predicted = np.sum(predictions, 1) > 0
P = np.sum(ids_that_model_has_predicted)
p = predictions[ids_that_model_has_predicted]
t = targets[ids_that_model_has_predicted]
precision = np.sum(np.sum((p != 0) & (t != 0), 1) / np.sum(p, 1)) / P
ids_that_have_target = np.sum(targets, 1) > 0
T = np.sum(ids_that_have_target)
p = predictions[ids_that_have_target]
t = targets[ids_that_have_target]
recall = np.sum(np.sum((p != 0) & (t != 0), 1) / np.sum(t, 1)) / T
return f1_score(precision, recall)
def loose_micro(predictions, targets):
"""
Implemetation of loose micro evaluation metric used by Ling et al.
Since all entities are already identified, in our case P = T.
Args:
predictions: A numpy array of shape [batch_size, labels].
targets: A numpy array of shape [batch_size, labels]
"""
assert predictions.shape == targets.shape,\
"Prediction and target shape should be equal."
ids_that_model_has_predicted = np.sum(predictions, 1) > 0
P = np.sum(ids_that_model_has_predicted)
p = predictions[ids_that_model_has_predicted]
t = targets[ids_that_model_has_predicted]
precision = np.sum(np.sum((p != 0) & (t != 0), 1)) / np.sum(np.sum(p, 1))
ids_that_have_target = np.sum(targets, 1) > 0
T = np.sum(ids_that_have_target)
p = predictions[ids_that_have_target]
t = targets[ids_that_have_target]
recall = np.sum(np.sum((p != 0) & (t != 0), 1)) / np.sum(np.sum(t, 1))
return f1_score(precision, recall)
def _non_exhaustive_check():
predictions = np.array([
[0, 0, 1],
[0, 0, 1],
[1, 0, 1],
[1, 1, 1],
[0, 1, 1],
[1, 1, 0],
[1, 0, 0]
])
targets = np.array([
[0, 0, 1],
[0, 1, 0],
[1, 0, 1],
[0, 1, 1],
[1, 1, 0],
[1, 1, 0],
[0, 1, 0]
])
assert np.abs(0.428571 - strict(predictions, targets)) < 1e-5
assert np.abs(0.618131 - loose_macro(predictions, targets)) < 1e-5
assert np.abs(0.695652 - loose_micro(predictions, targets)) < 1e-5
if __name__ == '__main__':
_non_exhaustive_check()
| 31.655738
| 77
| 0.63102
| 564
| 3,862
| 4.12766
| 0.143617
| 0.064433
| 0.056701
| 0.070876
| 0.800258
| 0.760739
| 0.739261
| 0.739261
| 0.650344
| 0.622852
| 0
| 0.036451
| 0.247022
| 3,862
| 121
| 78
| 31.917355
| 0.764099
| 0.208182
| 0
| 0.561644
| 0
| 0
| 0.047587
| 0
| 0
| 0
| 0
| 0
| 0.082192
| 1
| 0.068493
| false
| 0
| 0.013699
| 0
| 0.150685
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
855dd525bad5036d5b7848a8d374b556621ba761
| 76
|
py
|
Python
|
gofish_project/gofish/views/__init__.py
|
nadvamir/gofish-lite
|
9235da1445375975ff6b931f7bd82aad6a9a5d4f
|
[
"Apache-2.0"
] | null | null | null |
gofish_project/gofish/views/__init__.py
|
nadvamir/gofish-lite
|
9235da1445375975ff6b931f7bd82aad6a9a5d4f
|
[
"Apache-2.0"
] | null | null | null |
gofish_project/gofish/views/__init__.py
|
nadvamir/gofish-lite
|
9235da1445375975ff6b931f7bd82aad6a9a5d4f
|
[
"Apache-2.0"
] | null | null | null |
from main import *
from ascii import *
from api import *
from api2 import *
| 15.2
| 19
| 0.736842
| 12
| 76
| 4.666667
| 0.5
| 0.535714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.016667
| 0.210526
| 76
| 4
| 20
| 19
| 0.916667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
858471109b1cda9dd322001bcff15cfaacd641cf
| 8,450
|
py
|
Python
|
server/apps/school_co/migrations/0001_initial.py
|
vmstarchenko/school-co
|
b0f789a9b5d73a2dbb3d71d5d5e0771eb9e2d3ac
|
[
"MIT"
] | 1
|
2021-12-07T14:39:49.000Z
|
2021-12-07T14:39:49.000Z
|
server/apps/school_co/migrations/0001_initial.py
|
vmstarchenko/school-co
|
b0f789a9b5d73a2dbb3d71d5d5e0771eb9e2d3ac
|
[
"MIT"
] | null | null | null |
server/apps/school_co/migrations/0001_initial.py
|
vmstarchenko/school-co
|
b0f789a9b5d73a2dbb3d71d5d5e0771eb9e2d3ac
|
[
"MIT"
] | null | null | null |
# Generated by Django 3.2.8 on 2021-11-02 12:11
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='AnnotationType',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(help_text='человекочитаемое название', max_length=64)),
('key', models.CharField(help_text='ключи являются materialized path и позволяют делать из типов аннотаций иерархичную структуру', max_length=64)),
],
),
migrations.CreateModel(
name='LearnerTextGenre',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(help_text='человекочитаемое название жанра', max_length=128)),
],
),
migrations.CreateModel(
name='Pupil',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('full_name', models.CharField(help_text='ФИО', max_length=128)),
('education_level', models.IntegerField(help_text='класс')),
],
),
migrations.CreateModel(
name='Region',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(help_text='регион РФ, где живет ученик', max_length=128)),
],
),
migrations.CreateModel(
name='School',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(help_text='название школы в которой учится ученик', max_length=128)),
],
),
migrations.CreateModel(
name='Teacher',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('full_name', models.CharField(help_text='ФИО', max_length=128)),
('school', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='school_co.school')),
],
),
migrations.CreateModel(
name='ScanText',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('date_published', models.DateField(auto_now_add=True)),
('name', models.CharField(help_text='название текста', max_length=128)),
('status', models.IntegerField(choices=[(1, 'New'), (10, 'Checked')])),
('marked', models.IntegerField(choices=[(1, 'Marked'), (0, 'Unmarked')])),
('genre', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='school_co.learnertextgenre')),
('pupil', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='school_co.pupil')),
('teacher', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='school_co.teacher')),
],
),
migrations.CreateModel(
name='ScanPage',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created', models.DateTimeField(auto_now_add=True)),
('file', models.ImageField(upload_to='learner_text_scan_page')),
('n', models.PositiveSmallIntegerField(help_text='номер страницы')),
('object', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='school_co.scantext')),
('user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='ScanAnnotation',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('begin_offset_x', models.PositiveSmallIntegerField(help_text='offset x начала аннотации')),
('end_offset_x', models.PositiveSmallIntegerField(help_text='offset x окончания аннотации')),
('begin_offset_y', models.PositiveSmallIntegerField(help_text='offset y начала аннотации')),
('end_offset_y', models.PositiveSmallIntegerField(help_text='offset y окончания аннотации')),
('correct_text', models.TextField(blank=True, help_text='иcправление аннотации (текст с правильный вариантом. Если в изначальном тексте подстроку [offset_begin:offset_end] заменить на исправление, то должен получиться корректный текст)')),
('comment', models.TextField(blank=True, default='')),
('ann_page', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='school_co.scanpage')),
('annotation_type', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='school_co.annotationtype')),
('checker', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
],
),
migrations.AddField(
model_name='pupil',
name='region',
field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='school_co.region'),
),
migrations.AddField(
model_name='pupil',
name='school',
field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='school_co.school'),
),
migrations.AddField(
model_name='pupil',
name='teacher',
field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='school_co.teacher'),
),
migrations.CreateModel(
name='PrintText',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('text', models.TextField()),
('date_published', models.DateField(auto_now_add=True)),
('name', models.CharField(help_text='название текста', max_length=128)),
('status', models.IntegerField(choices=[(1, 'New'), (10, 'Checked')])),
('marked', models.IntegerField(choices=[(1, 'Marked'), (0, 'Unmarked')])),
('genre', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='school_co.learnertextgenre')),
('pupil', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='school_co.pupil')),
('teacher', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='school_co.teacher')),
],
),
migrations.CreateModel(
name='PrintAnnotation',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('begin_offset', models.PositiveSmallIntegerField(help_text='offset начала аннотации')),
('end_offset', models.PositiveSmallIntegerField(help_text='offset окончания аннотации')),
('correct_text', models.TextField(blank=True, help_text='иcправление аннотации (текст с правильный вариантом. Если в изначальном тексте подстроку [offset_begin:offset_end] заменить на исправление, то должен получиться корректный текст)')),
('comment', models.TextField(blank=True, default='')),
('annotation_type', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='school_co.annotationtype')),
('checker', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
('print_text', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='school_co.printtext')),
],
),
]
| 57.482993
| 255
| 0.61645
| 864
| 8,450
| 5.865741
| 0.188657
| 0.031571
| 0.052486
| 0.082478
| 0.792226
| 0.792226
| 0.731058
| 0.714088
| 0.673441
| 0.673441
| 0
| 0.007843
| 0.245562
| 8,450
| 146
| 256
| 57.876712
| 0.787137
| 0.005325
| 0
| 0.633094
| 1
| 0.014388
| 0.199929
| 0.020469
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.021583
| 0
| 0.05036
| 0.007194
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
85957493eb751907309efd5413c58412c18192aa
| 761
|
py
|
Python
|
src/benchmark/procedure/generic.py
|
edvgui/LEPL2990-Benchmark-tool
|
be9bf7e62be215ec14ee5fddb91166bb8861090e
|
[
"MIT"
] | 3
|
2020-06-11T18:33:27.000Z
|
2021-02-21T13:48:06.000Z
|
src/benchmark/procedure/generic.py
|
edvgui/LEPL2990-Benchmark-tool
|
be9bf7e62be215ec14ee5fddb91166bb8861090e
|
[
"MIT"
] | null | null | null |
src/benchmark/procedure/generic.py
|
edvgui/LEPL2990-Benchmark-tool
|
be9bf7e62be215ec14ee5fddb91166bb8861090e
|
[
"MIT"
] | null | null | null |
from abc import ABC, abstractmethod
class Generic(ABC):
def __init__(self):
super().__init__()
self.functions = {
'docker': self.docker,
'podman': self.podman,
'lxd': self.lxd,
'contingious': self.contingious
}
@abstractmethod
def name(self):
pass
@abstractmethod
def response_len(self):
pass
@abstractmethod
def response_legend(self):
pass
@abstractmethod
def docker(self, image, runtime):
pass
@abstractmethod
def podman(self, image, runtime):
pass
@abstractmethod
def lxd(self, image, runtime):
pass
@abstractmethod
def contingious(self, image, runtime):
pass
| 18.119048
| 43
| 0.570302
| 72
| 761
| 5.888889
| 0.305556
| 0.28066
| 0.29717
| 0.188679
| 0.417453
| 0.261792
| 0
| 0
| 0
| 0
| 0
| 0
| 0.336399
| 761
| 41
| 44
| 18.560976
| 0.839604
| 0
| 0
| 0.451613
| 0
| 0
| 0.034166
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.258065
| false
| 0.225806
| 0.032258
| 0
| 0.322581
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
a426f27aa6c8edbb83418e2d8e000c630531d10a
| 123
|
py
|
Python
|
Taller Estructuras de Control de Repeticion/Untitled-3.py
|
SantiVillarreal/Taller_Estructuras
|
577f2b50d0fc7210ca9e27670cbf64323ee79fcc
|
[
"MIT"
] | null | null | null |
Taller Estructuras de Control de Repeticion/Untitled-3.py
|
SantiVillarreal/Taller_Estructuras
|
577f2b50d0fc7210ca9e27670cbf64323ee79fcc
|
[
"MIT"
] | null | null | null |
Taller Estructuras de Control de Repeticion/Untitled-3.py
|
SantiVillarreal/Taller_Estructuras
|
577f2b50d0fc7210ca9e27670cbf64323ee79fcc
|
[
"MIT"
] | null | null | null |
a=97
b= 98
while(a>=97 and a <=1003):
if(a%2==0):
print("{:.0f}".format(c))
a= a+1
c= (a+b)*226.5
| 13.666667
| 33
| 0.414634
| 26
| 123
| 1.961538
| 0.653846
| 0.117647
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.211765
| 0.308943
| 123
| 9
| 34
| 13.666667
| 0.388235
| 0
| 0
| 0
| 0
| 0
| 0.048387
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.142857
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
a42aaf51a11c497607b07c4f4275e6fc6557613f
| 974
|
py
|
Python
|
src/CancerDrugTest/Model.py
|
chatkausik/Cancer-Detection-And-Early-Detection-Tool
|
62bd4710af511b77bd3ad7fea180ede0bdb7379b
|
[
"MIT"
] | 1
|
2019-10-25T11:58:21.000Z
|
2019-10-25T11:58:21.000Z
|
src/CancerDrugTest/Model.py
|
chatkausik/Cancer-Detection-And-Early-Detection-Tool
|
62bd4710af511b77bd3ad7fea180ede0bdb7379b
|
[
"MIT"
] | 14
|
2020-01-28T23:04:43.000Z
|
2022-03-12T00:02:57.000Z
|
src/CancerDrugTest/Model.py
|
chatkausik/Cancer-Detection-And-Early-Detection-Tool
|
62bd4710af511b77bd3ad7fea180ede0bdb7379b
|
[
"MIT"
] | null | null | null |
import torch.nn.functional as F
from torch.nn import Module, Linear, Dropout
import torch
class MultiClassNet(Module):
def __init__(self):
super().__init__()
self.layer1 = Linear(80, 96)
self.dropout1 = Dropout(0.4)
self.layer2 = Linear(96, 64)
self.dropout2 = Dropout(0.3)
self.layer3 = Linear(64, 10)
def forward(self, x):
x = F.relu(self.layer1(x))
x = F.relu(self.dropout1(x))
x = F.relu(self.layer2(x))
x = F.relu(self.dropout2(x))
x = F.relu(self.layer3(x))
return F.softmax(x, dim=1)
class BinaryNet(Module):
def __init__(self):
super().__init__()
self.layer1 = Linear(80, 96)
self.dropout1 = Dropout(0.4)
self.layer2 = Linear(96, 64)
self.dropout2 = Dropout(0.2)
self.layer3 = Linear(64, 1)
def forward(self, x):
x = F.relu(self.layer1(x))
x = F.relu(self.dropout1(x))
x = F.relu(self.dropout2(x))
x = F.relu(self.layer2(x))
x = F.relu(self.dropout2(x))
x = F.relu(self.layer3(x))
return torch.sigmoid(x)
| 23.190476
| 44
| 0.658111
| 165
| 974
| 3.787879
| 0.230303
| 0.0352
| 0.0528
| 0.1232
| 0.7248
| 0.7248
| 0.7248
| 0.7248
| 0.7248
| 0.7248
| 0
| 0.065351
| 0.167351
| 974
| 41
| 45
| 23.756098
| 0.705302
| 0
| 0
| 0.676471
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.117647
| false
| 0
| 0.088235
| 0
| 0.323529
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
a497a5f5f5dc4403f6809f91f82c8c5c7e2f7c7c
| 87
|
py
|
Python
|
src/qutip_qip/decompose/__init__.py
|
bopardikarsoham/qutip-qip
|
5b8416255c48b66c41d304f78fe39ec5c1ae3bf3
|
[
"BSD-3-Clause"
] | 36
|
2020-05-22T10:51:13.000Z
|
2022-03-07T05:41:08.000Z
|
src/qutip_qip/decompose/__init__.py
|
bopardikarsoham/qutip-qip
|
5b8416255c48b66c41d304f78fe39ec5c1ae3bf3
|
[
"BSD-3-Clause"
] | 73
|
2020-07-14T07:26:48.000Z
|
2022-03-25T08:00:43.000Z
|
src/qutip_qip/decompose/__init__.py
|
BoxiLi/qutip-qip
|
04962ded1f6f21620f06f52869b61c4f392e9dea
|
[
"BSD-3-Clause"
] | 24
|
2020-06-18T22:59:20.000Z
|
2022-03-12T05:11:59.000Z
|
"""Unitary decomposition. (experimental)"""
from .decompose_single_qubit_gate import *
| 29
| 43
| 0.793103
| 9
| 87
| 7.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.08046
| 87
| 2
| 44
| 43.5
| 0.825
| 0.425287
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
f14a0818854d8494a5246b62659171630d6db78a
| 188
|
py
|
Python
|
batch/lib/probability.py
|
makiichikawa/kabucalculator
|
283e4de96d3c1e5ac124fbe2abe5089902bd50c3
|
[
"MIT"
] | null | null | null |
batch/lib/probability.py
|
makiichikawa/kabucalculator
|
283e4de96d3c1e5ac124fbe2abe5089902bd50c3
|
[
"MIT"
] | 80
|
2021-09-23T04:48:36.000Z
|
2022-03-27T13:42:10.000Z
|
batch/lib/probability.py
|
makiichikawa/kabucalculator
|
283e4de96d3c1e5ac124fbe2abe5089902bd50c3
|
[
"MIT"
] | null | null | null |
from abc import ABCMeta, abstractclassmethod
class Probability(metaclass=ABCMeta):
@abstractclassmethod
def calculate_upper_probability(self, stochastic_variable):
pass
| 20.888889
| 63
| 0.781915
| 18
| 188
| 8
| 0.833333
| 0.361111
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.164894
| 188
| 8
| 64
| 23.5
| 0.917197
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0.2
| 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
| 1
| 0
| 0
| 1
| 0
|
0
| 5
|
f159cb9d752f3f45483c685415065eef7b3c8830
| 93
|
py
|
Python
|
FormularioAlura/passagens/apps.py
|
AdrianaViabL/cursosAlura
|
356237fd1b77d32c9ffef128012b07edeebd14ef
|
[
"Apache-2.0"
] | null | null | null |
FormularioAlura/passagens/apps.py
|
AdrianaViabL/cursosAlura
|
356237fd1b77d32c9ffef128012b07edeebd14ef
|
[
"Apache-2.0"
] | 5
|
2021-03-30T13:43:44.000Z
|
2021-09-22T19:20:06.000Z
|
FormularioAlura/passagens/apps.py
|
AdrianaViabL/cursosAlura
|
356237fd1b77d32c9ffef128012b07edeebd14ef
|
[
"Apache-2.0"
] | null | null | null |
from django.apps import AppConfig
class PassagensConfig(AppConfig):
name = 'passagens'
| 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.666667
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
|
0
| 5
|
74e66cb0ec44395dd704bc179b53328f5d14dac7
| 93
|
py
|
Python
|
mapillary_tools/error.py
|
didier2020/mapillary_tools
|
23b8f422559f8dfdabdebc26d0d2001d40fbe2ef
|
[
"BSD-2-Clause"
] | 1
|
2021-07-24T23:37:17.000Z
|
2021-07-24T23:37:17.000Z
|
mapillary_tools/error.py
|
didier2020/mapillary_tools
|
23b8f422559f8dfdabdebc26d0d2001d40fbe2ef
|
[
"BSD-2-Clause"
] | null | null | null |
mapillary_tools/error.py
|
didier2020/mapillary_tools
|
23b8f422559f8dfdabdebc26d0d2001d40fbe2ef
|
[
"BSD-2-Clause"
] | null | null | null |
from . import ipc
def print_error(message):
print(message)
ipc.send_error(message)
| 13.285714
| 27
| 0.709677
| 13
| 93
| 4.923077
| 0.615385
| 0.375
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.193548
| 93
| 6
| 28
| 15.5
| 0.853333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0
| 0.5
| 0.5
| 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
| 1
|
0
| 5
|
2d11adde18c7c7984dfec7b11e36c5a002ae6795
| 203
|
py
|
Python
|
CA117/Exam_1/league_61.py
|
PRITI1999/OneLineWonders
|
91a7368e0796e5a3b5839c9165f9fbe5460879f5
|
[
"MIT"
] | 6
|
2016-02-04T00:15:20.000Z
|
2019-10-13T13:53:16.000Z
|
CA117/Exam_1/league_61.py
|
PRITI1999/OneLineWonders
|
91a7368e0796e5a3b5839c9165f9fbe5460879f5
|
[
"MIT"
] | 2
|
2016-03-14T04:01:36.000Z
|
2019-10-16T12:45:34.000Z
|
CA117/Exam_1/league_61.py
|
PRITI1999/OneLineWonders
|
91a7368e0796e5a3b5839c9165f9fbe5460879f5
|
[
"MIT"
] | 10
|
2016-02-09T14:38:32.000Z
|
2021-05-25T08:16:26.000Z
|
_=[print("%s: %d points"%T)for T in sorted([(T[0],sum([int(s)for s in T[1].split()]))for R in __import__("sys").stdin for T in[R.split(":")]if all(x.isdigit()for x in T[1].split())],key=lambda x:-x[1])]
| 101.5
| 202
| 0.605911
| 46
| 203
| 2.565217
| 0.5
| 0.067797
| 0.101695
| 0.152542
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.021858
| 0.098522
| 203
| 1
| 203
| 203
| 0.622951
| 0
| 0
| 0
| 0
| 0
| 0.083744
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 1
| 0
| 1
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 1
|
0
| 5
|
2d2e8ff08a0075ab44d83801e635339249628363
| 1,575
|
py
|
Python
|
version_II/app/helpers/data_helper.py
|
Ubaid-Manzoor/Attendance-APP
|
14b25b58a8f4dfa8d956c764c6e14769db8347b5
|
[
"CC0-1.0"
] | null | null | null |
version_II/app/helpers/data_helper.py
|
Ubaid-Manzoor/Attendance-APP
|
14b25b58a8f4dfa8d956c764c6e14769db8347b5
|
[
"CC0-1.0"
] | 4
|
2020-03-20T17:11:15.000Z
|
2020-04-02T19:11:46.000Z
|
version_II/app/helpers/data_helper.py
|
Ubaid-Manzoor/Attendance-APP
|
14b25b58a8f4dfa8d956c764c6e14769db8347b5
|
[
"CC0-1.0"
] | 2
|
2020-06-14T11:02:29.000Z
|
2020-09-02T07:24:39.000Z
|
import json
import random
import numpy as np
def extract_json(byte_data):
return json.loads(byte_data.decode('utf8'))
def ConnectDatabase():
pass
def closeDatabase():
pass
def get_student_encoding(students_data:dict):
# print(students_data)
return [student_data['encoding'] for student_data in students_data]
def get_student_rolls(students_data:dict):
return [student_data['roll_no'] for student_data in students_data]
def generate_student_encoding():
return [random.uniform(1e-4,1e-1) for _ in range(128)]
## Attendence Schema
# {
# "Class_name_1":{
# "Date_1":{
# "roll_no":True,
# "roll_no":True,
# "roll_no":False,
# },
# "Date_2":{
# "roll_no":True,
# "roll_no":True,
# "roll_no":False,
# }
# },
# "Class_name_2":{
# "Date_1":{
# "roll_no":True,
# "roll_no":True,
# "roll_no":False,
# },
# "Date_2":{
# "roll_no":True,
# "roll_no":True,
# "roll_no":False,
# }
# }
# }
# # Class Schema
# {
# "Class_name_1":{
# "roll_no":{
# "name":"",
# "encoding":""
# },
# "roll_no":{
# "name":"",
# "encoding":""
# }
# },
# "Class_name_2":{
# "roll_no":{
# "name":"",
# "encoding":""
# },
# "roll_no":{
# "name":"",
# "encoding":""
# }
# }
# }
| 19.936709
| 71
| 0.457778
| 155
| 1,575
| 4.341935
| 0.277419
| 0.15156
| 0.118871
| 0.166419
| 0.427935
| 0.427935
| 0.427935
| 0.33581
| 0.228826
| 0.228826
| 0
| 0.016194
| 0.372698
| 1,575
| 79
| 72
| 19.936709
| 0.66498
| 0.600635
| 0
| 0.133333
| 0
| 0
| 0.032986
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.4
| false
| 0.133333
| 0.2
| 0.266667
| 0.866667
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 5
|
7477ba092199b671fc7b82055cbd76022b5e1550
| 117
|
py
|
Python
|
Calender.py
|
harry-dell/exceptor
|
d65e2a6688b8f445a9fd962d7a2884e5beb74605
|
[
"MIT"
] | null | null | null |
Calender.py
|
harry-dell/exceptor
|
d65e2a6688b8f445a9fd962d7a2884e5beb74605
|
[
"MIT"
] | 4
|
2020-10-11T15:22:14.000Z
|
2020-10-12T07:39:38.000Z
|
Calender.py
|
RM001-mishra/exepector
|
5ab9217573e7f372f21d639e0f0d14153b94fa7e
|
[
"MIT"
] | 1
|
2020-10-11T14:50:27.000Z
|
2020-10-11T14:50:27.000Z
|
import calendar
y = int(input("Input the year : "))
m = int(input("Input the month : "))
print(calendar.month(y, m))
| 23.4
| 36
| 0.65812
| 19
| 117
| 4.052632
| 0.526316
| 0.207792
| 0.337662
| 0.415584
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.153846
| 117
| 4
| 37
| 29.25
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0.299145
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.25
| 0
| 0.25
| 0.25
| 1
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
776ca549085f1f2059b71e71360ee41adafbf54d
| 114
|
py
|
Python
|
aiomisc/log/formatter/__init__.py
|
vasiliykovalev/aiomisc
|
fba1c175c6214c7023cbbb0eba070d91f46d637a
|
[
"MIT"
] | 1
|
2019-03-07T11:13:30.000Z
|
2019-03-07T11:13:30.000Z
|
aiomisc/log/formatter/__init__.py
|
vasiliykovalev/aiomisc
|
fba1c175c6214c7023cbbb0eba070d91f46d637a
|
[
"MIT"
] | null | null | null |
aiomisc/log/formatter/__init__.py
|
vasiliykovalev/aiomisc
|
fba1c175c6214c7023cbbb0eba070d91f46d637a
|
[
"MIT"
] | null | null | null |
from .color import color_formatter
from .json import json_handler
__all__ = ("color_formatter", "json_handler")
| 19
| 45
| 0.789474
| 15
| 114
| 5.466667
| 0.466667
| 0.341463
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.122807
| 114
| 5
| 46
| 22.8
| 0.82
| 0
| 0
| 0
| 0
| 0
| 0.236842
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
77754343723971e13d28bae5dda2e8a9c14c7ed1
| 240
|
py
|
Python
|
tester.py
|
himanshu-nain/Medic
|
3c7ef4a8aa18362010152b4f03cac83def97657f
|
[
"MIT"
] | null | null | null |
tester.py
|
himanshu-nain/Medic
|
3c7ef4a8aa18362010152b4f03cac83def97657f
|
[
"MIT"
] | null | null | null |
tester.py
|
himanshu-nain/Medic
|
3c7ef4a8aa18362010152b4f03cac83def97657f
|
[
"MIT"
] | 2
|
2018-03-19T17:51:13.000Z
|
2018-10-11T07:49:22.000Z
|
from classifier import classifier
from Disease import Disease
from dbutils import getDiseases, init
init()
all = getDiseases(['nausea','headache','fever','abdominal pain'])
classifier(all, ['nausea','headache','fever','abdominal pain'])
| 26.666667
| 65
| 0.754167
| 28
| 240
| 6.464286
| 0.464286
| 0.154696
| 0.209945
| 0.309392
| 0.353591
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1
| 240
| 8
| 66
| 30
| 0.837963
| 0
| 0
| 0
| 0
| 0
| 0.275
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
777761df55b141caa3f7504fa473ad70f3636a70
| 55
|
py
|
Python
|
deep_qa/__init__.py
|
mrbot-ai/deep_qa
|
a1731331e12b921b4dbb43433f9c028b362495e8
|
[
"Apache-2.0"
] | null | null | null |
deep_qa/__init__.py
|
mrbot-ai/deep_qa
|
a1731331e12b921b4dbb43433f9c028b362495e8
|
[
"Apache-2.0"
] | null | null | null |
deep_qa/__init__.py
|
mrbot-ai/deep_qa
|
a1731331e12b921b4dbb43433f9c028b362495e8
|
[
"Apache-2.0"
] | 1
|
2019-01-04T13:08:27.000Z
|
2019-01-04T13:08:27.000Z
|
from .run import run_model, evaluate_model, load_model
| 27.5
| 54
| 0.836364
| 9
| 55
| 4.777778
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.109091
| 55
| 1
| 55
| 55
| 0.877551
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
779d6ae65a6f3e24cd46eeec8716e64e04144faa
| 35
|
py
|
Python
|
src/rsh.py
|
zhichul/pi-bob
|
b9ed7cb3614f50c51c6273665d8cd2b62dcab886
|
[
"MIT"
] | null | null | null |
src/rsh.py
|
zhichul/pi-bob
|
b9ed7cb3614f50c51c6273665d8cd2b62dcab886
|
[
"MIT"
] | null | null | null |
src/rsh.py
|
zhichul/pi-bob
|
b9ed7cb3614f50c51c6273665d8cd2b62dcab886
|
[
"MIT"
] | null | null | null |
from rsystem import rsh
rsh.main()
| 11.666667
| 23
| 0.771429
| 6
| 35
| 4.5
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 35
| 2
| 24
| 17.5
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
77c06d65d86736a14fa6ca62ce9f1e59a286ce57
| 5,247
|
py
|
Python
|
python/lib/Lib/site-packages/django/contrib/gis/tests/distapp/data.py
|
truthiswill/intellij-community
|
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
|
[
"Apache-2.0"
] | 19
|
2015-05-01T19:59:03.000Z
|
2021-12-09T08:03:16.000Z
|
django/contrib/gis/tests/distapp/data.py
|
joetyson/django
|
c3699190186561d5c216b2a77ecbfc487d42a734
|
[
"BSD-3-Clause"
] | 1
|
2021-06-30T10:10:56.000Z
|
2021-06-30T10:10:56.000Z
|
django/contrib/gis/tests/distapp/data.py
|
joetyson/django
|
c3699190186561d5c216b2a77ecbfc487d42a734
|
[
"BSD-3-Clause"
] | 30
|
2015-03-25T19:40:07.000Z
|
2021-05-28T22:59:26.000Z
|
au_cities = (('Wollongong', 150.902, -34.4245),
('Shellharbour', 150.87, -34.5789),
('Thirroul', 150.924, -34.3147),
('Mittagong', 150.449, -34.4509),
('Batemans Bay', 150.175, -35.7082),
('Canberra', 144.963, -37.8143),
('Melbourne', 145.963, -37.8143),
('Sydney', 151.26071, -33.887034),
('Hobart', 147.33, -42.8827),
('Adelaide', 138.6, -34.9258),
('Hillsdale', 151.231341, -33.952685),
)
stx_cities = (('Downtown Houston', -95.363151, 29.763374),
('West University Place', -95.448601, 29.713803),
('Southside Place', -95.436920, 29.705777),
('Bellaire', -95.458732, 29.705614),
('Pearland', -95.287303, 29.563568),
('Galveston', -94.797489, 29.301336),
('Sealy', -96.156952, 29.780918),
('San Antonio', -98.493183, 29.424170),
('Saint Hedwig', -98.199820, 29.414197),
)
# Data from U.S. Census ZCTA cartographic boundary file for Texas (`zt48_d00.shp`).
stx_zips = (('77002', 'POLYGON ((-95.365015 29.772327, -95.362415 29.772327, -95.360915 29.771827, -95.354615 29.771827, -95.351515 29.772527, -95.350915 29.765327, -95.351015 29.762436, -95.350115 29.760328, -95.347515 29.758528, -95.352315 29.753928, -95.356415 29.756328, -95.358215 29.754028, -95.360215 29.756328, -95.363415 29.757128, -95.364014 29.75638, -95.363415 29.753928, -95.360015 29.751828, -95.361815 29.749528, -95.362715 29.750028, -95.367516 29.744128, -95.369316 29.745128, -95.373916 29.744128, -95.380116 29.738028, -95.387916 29.727929, -95.388516 29.729629, -95.387916 29.732129, -95.382916 29.737428, -95.376616 29.742228, -95.372616 29.747228, -95.378601 29.750846, -95.378616 29.752028, -95.378616 29.754428, -95.376016 29.754528, -95.374616 29.759828, -95.373616 29.761128, -95.371916 29.763928, -95.372316 29.768727, -95.365884 29.76791, -95.366015 29.767127, -95.358715 29.765327, -95.358615 29.766327, -95.359115 29.767227, -95.360215 29.767027, -95.362783 29.768267, -95.365315 29.770527, -95.365015 29.772327))'),
('77005', 'POLYGON ((-95.447918 29.727275, -95.428017 29.728729, -95.421117 29.729029, -95.418617 29.727629, -95.418517 29.726429, -95.402117 29.726629, -95.402117 29.725729, -95.395316 29.725729, -95.391916 29.726229, -95.389716 29.725829, -95.396517 29.715429, -95.397517 29.715929, -95.400917 29.711429, -95.411417 29.715029, -95.418417 29.714729, -95.418317 29.70623, -95.440818 29.70593, -95.445018 29.70683, -95.446618 29.70763, -95.447418 29.71003, -95.447918 29.727275))'),
('77025', 'POLYGON ((-95.418317 29.70623, -95.414717 29.706129, -95.414617 29.70533, -95.418217 29.70533, -95.419817 29.69533, -95.419484 29.694196, -95.417166 29.690901, -95.414517 29.69433, -95.413317 29.69263, -95.412617 29.68973, -95.412817 29.68753, -95.414087 29.685055, -95.419165 29.685428, -95.421617 29.68513, -95.425717 29.67983, -95.425017 29.67923, -95.424517 29.67763, -95.427418 29.67763, -95.438018 29.664631, -95.436713 29.664411, -95.440118 29.662231, -95.439218 29.661031, -95.437718 29.660131, -95.435718 29.659731, -95.431818 29.660331, -95.441418 29.656631, -95.441318 29.656331, -95.441818 29.656131, -95.441718 29.659031, -95.441118 29.661031, -95.446718 29.656431, -95.446518 29.673431, -95.446918 29.69013, -95.447418 29.71003, -95.446618 29.70763, -95.445018 29.70683, -95.440818 29.70593, -95.418317 29.70623))'),
('77401', 'POLYGON ((-95.447918 29.727275, -95.447418 29.71003, -95.446918 29.69013, -95.454318 29.68893, -95.475819 29.68903, -95.475819 29.69113, -95.484419 29.69103, -95.484519 29.69903, -95.480419 29.70133, -95.480419 29.69833, -95.474119 29.69833, -95.474119 29.70453, -95.472719 29.71283, -95.468019 29.71293, -95.468219 29.720229, -95.464018 29.720229, -95.464118 29.724529, -95.463018 29.725929, -95.459818 29.726129, -95.459918 29.720329, -95.451418 29.720429, -95.451775 29.726303, -95.451318 29.727029, -95.447918 29.727275))'),
)
interstates = (('I-25', 'LINESTRING(-104.4780170766108 36.66698791870694, -104.4468522338495 36.79925409393386, -104.46212692626 36.9372149776075, -104.5126119783768 37.08163268820887, -104.5247764602161 37.29300499892048, -104.7084397427668 37.49150259925398, -104.8126599016282 37.69514285621863, -104.8452887035466 37.87613395659479, -104.7160169341003 38.05951763337799, -104.6165437927668 38.30432045855106, -104.6437227858174 38.53979986564737, -104.7596170387259 38.7322907594295, -104.8380078676822 38.89998460604341, -104.8501253693506 39.09980189213358, -104.8791648316464 39.24368776457503, -104.8635041274215 39.3785278162751, -104.8894471170052 39.5929228239605, -104.9721242843344 39.69528482419685, -105.0112104500356 39.7273080432394, -105.0010368577104 39.76677607811571, -104.981835619 39.81466504121967, -104.9858891550477 39.88806911250832, -104.9873548059578 39.98117234571016, -104.9766220487419 40.09796423450692, -104.9818565932953 40.36056530662884, -104.9912746373997 40.74904484447656)'),
)
stx_interstates = (('I-10', 'LINESTRING(924952.5 4220931.6,925065.3 4220931.6,929568.4 4221057.8)'),
)
| 141.810811
| 1,046
| 0.677911
| 776
| 5,247
| 4.57732
| 0.5
| 0.010135
| 0.011261
| 0.018018
| 0.079673
| 0.014077
| 0
| 0
| 0
| 0
| 0
| 0.715244
| 0.147322
| 5,247
| 36
| 1,047
| 145.75
| 0.078677
| 0.015437
| 0
| 0
| 0
| 0.193548
| 0.798606
| 0.005616
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
77e9edb97e1ff4b3cacf1bec0e25dd011f2fedd0
| 44
|
py
|
Python
|
xicam/spectral/operations/filtering.py
|
lchen23/Xi-cam.spectral
|
db3046f269443a58a6a4958f3092bfad8b71dcfa
|
[
"BSD-3-Clause"
] | null | null | null |
xicam/spectral/operations/filtering.py
|
lchen23/Xi-cam.spectral
|
db3046f269443a58a6a4958f3092bfad8b71dcfa
|
[
"BSD-3-Clause"
] | 10
|
2020-09-15T03:16:26.000Z
|
2021-02-06T08:17:47.000Z
|
xicam/spectral/operations/filtering.py
|
lchen23/Xi-cam.spectral
|
db3046f269443a58a6a4958f3092bfad8b71dcfa
|
[
"BSD-3-Clause"
] | 1
|
2020-10-20T17:06:43.000Z
|
2020-10-20T17:06:43.000Z
|
# Clustered Data
## Outlier rejection (WIP)
| 14.666667
| 26
| 0.727273
| 5
| 44
| 6.4
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.159091
| 44
| 2
| 27
| 22
| 0.864865
| 0.863636
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
7adc1cf38368de5905bc3a1bd89fec7d98e4a7f8
| 117
|
py
|
Python
|
src/pytools/viz/dendrogram/base/__init__.py
|
BCG-Gamma/pytools
|
d7be703e0665917cd75b671564d5c0163f13b77b
|
[
"Apache-2.0"
] | 17
|
2021-01-12T08:07:11.000Z
|
2022-03-03T22:59:04.000Z
|
src/pytools/viz/dendrogram/base/__init__.py
|
BCG-Gamma/pytools
|
d7be703e0665917cd75b671564d5c0163f13b77b
|
[
"Apache-2.0"
] | 10
|
2021-01-08T17:04:39.000Z
|
2022-01-18T13:21:52.000Z
|
src/pytools/viz/dendrogram/base/__init__.py
|
BCG-Gamma/pytools
|
d7be703e0665917cd75b671564d5c0163f13b77b
|
[
"Apache-2.0"
] | 1
|
2021-11-06T00:16:43.000Z
|
2021-11-06T00:16:43.000Z
|
"""
Base classes for dendrogram representations of linkage trees.
"""
from ._linkage import *
from ._style import *
| 16.714286
| 61
| 0.74359
| 14
| 117
| 6.071429
| 0.785714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.162393
| 117
| 6
| 62
| 19.5
| 0.867347
| 0.521368
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
bb06f29a2c4c579b5b63c8219272a8af285fecae
| 86
|
py
|
Python
|
language_fix.py
|
adarsh1mehra/30-seconds-of-python
|
4635fa8a811b1417f0e93ad69bdc57b865327f0c
|
[
"CC0-1.0"
] | 5,789
|
2019-08-21T09:52:42.000Z
|
2022-03-31T16:20:40.000Z
|
language_fix.py
|
adarsh1mehra/30-seconds-of-python
|
4635fa8a811b1417f0e93ad69bdc57b865327f0c
|
[
"CC0-1.0"
] | 224
|
2019-08-21T07:43:04.000Z
|
2021-09-30T10:35:39.000Z
|
language_fix.py
|
adarsh1mehra/30-seconds-of-python
|
4635fa8a811b1417f0e93ad69bdc57b865327f0c
|
[
"CC0-1.0"
] | 1,155
|
2019-08-21T17:35:02.000Z
|
2022-03-27T10:43:05.000Z
|
print('This file is here only to tag the repository language. Do not delete, please!')
| 86
| 86
| 0.767442
| 15
| 86
| 4.4
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.151163
| 86
| 1
| 86
| 86
| 0.90411
| 0
| 0
| 0
| 0
| 0
| 0.885057
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
bb0910e5a5f2f63701687a770c5f85d5079e8e27
| 145
|
py
|
Python
|
donkeybarn/__init__.py
|
autorope/donkeybarn
|
f7e985e850dea3c2a4352e00cb6337a9ab357113
|
[
"MIT"
] | 4
|
2019-01-05T04:43:04.000Z
|
2021-04-05T11:54:20.000Z
|
donkeybarn/__init__.py
|
autorope/donkeybarn
|
f7e985e850dea3c2a4352e00cb6337a9ab357113
|
[
"MIT"
] | null | null | null |
donkeybarn/__init__.py
|
autorope/donkeybarn
|
f7e985e850dea3c2a4352e00cb6337a9ab357113
|
[
"MIT"
] | 2
|
2019-01-05T04:43:05.000Z
|
2019-11-08T02:17:29.000Z
|
from . import show
from . import datasets
from . import cv
from . import configs
import os
BARN_DATA_DIR = os.path.expanduser('~/.donkey_data')
| 18.125
| 52
| 0.751724
| 22
| 145
| 4.818182
| 0.590909
| 0.377358
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.151724
| 145
| 8
| 52
| 18.125
| 0.861789
| 0
| 0
| 0
| 0
| 0
| 0.09589
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.833333
| 0
| 0.833333
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
bb0aa68268be8756cb2818d0617637c5ea75231e
| 664
|
py
|
Python
|
backend/tests/helpers/auth/test_password.py
|
shvixxl/tablic
|
3ca2f026d84fab9692e7e5adde74a9716266ff5e
|
[
"MIT"
] | 2
|
2021-02-05T16:55:41.000Z
|
2021-02-07T21:46:37.000Z
|
backend/tests/helpers/auth/test_password.py
|
shvixxl/tablic
|
3ca2f026d84fab9692e7e5adde74a9716266ff5e
|
[
"MIT"
] | 1
|
2021-10-30T15:42:53.000Z
|
2021-10-30T15:42:53.000Z
|
backend/tests/helpers/auth/test_password.py
|
shvixxl/tablic
|
3ca2f026d84fab9692e7e5adde74a9716266ff5e
|
[
"MIT"
] | null | null | null |
"""Test cases for auth module password helpers."""
from app.helpers.auth import generate_password_hash, check_password_hash
def test_generate_password_hash(password):
"""Test `generate_password_hash` function."""
password_hash = generate_password_hash(password)
assert password_hash is not None
assert isinstance(password_hash, bytes)
def test_check_password_hash(faker, password):
"""Test `check_password_hash` function."""
password_hash = generate_password_hash(password)
wrong_password = faker.password()
assert check_password_hash(password, password_hash)
assert not check_password_hash(wrong_password, password_hash)
| 33.2
| 72
| 0.784639
| 84
| 664
| 5.845238
| 0.27381
| 0.391039
| 0.203666
| 0.171079
| 0.244399
| 0.244399
| 0.244399
| 0.244399
| 0.244399
| 0
| 0
| 0
| 0.134036
| 664
| 19
| 73
| 34.947368
| 0.853913
| 0.182229
| 0
| 0.2
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.4
| 1
| 0.2
| false
| 1
| 0.1
| 0
| 0.3
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
bb29c67e97bd7e4e3c617184d9bc0c824f8f5834
| 270
|
py
|
Python
|
tests/test_spyd/test_permissions/test_functionality.py
|
DanSeraf/spyd
|
af893b7f9c67785613b25754eb2cf150523a9fe4
|
[
"Zlib"
] | 4
|
2015-05-05T16:44:42.000Z
|
2020-10-27T09:45:23.000Z
|
tests/test_spyd/test_permissions/test_functionality.py
|
DanSeraf/spyd
|
af893b7f9c67785613b25754eb2cf150523a9fe4
|
[
"Zlib"
] | null | null | null |
tests/test_spyd/test_permissions/test_functionality.py
|
DanSeraf/spyd
|
af893b7f9c67785613b25754eb2cf150523a9fe4
|
[
"Zlib"
] | 2
|
2016-12-13T22:21:08.000Z
|
2020-03-14T16:44:20.000Z
|
import unittest
from spyd.permissions.functionality import Functionality
class TestFunctionality(unittest.TestCase):
def test_functionality(self):
f = Functionality('test', 'No access to test.')
self.assertEqual(repr(f), "<Functionality: 'test'>")
| 30
| 60
| 0.72963
| 29
| 270
| 6.758621
| 0.62069
| 0.142857
| 0.183673
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.155556
| 270
| 8
| 61
| 33.75
| 0.859649
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 1
| 0.166667
| false
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
bb33ea1cf15ad866efecb1297ba5c5e71ed2095d
| 164
|
py
|
Python
|
rvpvp/isa/rvf/fcvt_s_w.py
|
ultrafive/riscv-pvp
|
843e38422c3d545352b955764927d5e7847e5453
|
[
"Unlicense"
] | 5
|
2021-05-10T09:57:00.000Z
|
2021-10-05T14:39:20.000Z
|
rvpvp/isa/rvf/fcvt_s_w.py
|
ultrafive/riscv-pvp
|
843e38422c3d545352b955764927d5e7847e5453
|
[
"Unlicense"
] | null | null | null |
rvpvp/isa/rvf/fcvt_s_w.py
|
ultrafive/riscv-pvp
|
843e38422c3d545352b955764927d5e7847e5453
|
[
"Unlicense"
] | 1
|
2021-05-14T20:24:11.000Z
|
2021-05-14T20:24:11.000Z
|
from ...isa.inst import *
import numpy as np
class Fcvt_s_w(Inst):
name = 'fcvt.s.w'
def golden(self):
return float(self['val1'])
| 16.4
| 34
| 0.554878
| 24
| 164
| 3.708333
| 0.75
| 0.11236
| 0.134831
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.00885
| 0.310976
| 164
| 9
| 35
| 18.222222
| 0.778761
| 0
| 0
| 0
| 0
| 0
| 0.073171
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0.333333
| 0.166667
| 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
| 1
| 1
| 0
|
0
| 5
|
2487997c1e7a974ba1602c9f9e96496aab7c8023
| 76
|
py
|
Python
|
tests/test_fileprovider.py
|
sideffect0/django-fileprovider
|
fde283ecd3041e6348b2b9911036afe22b348aa3
|
[
"BSD-3-Clause"
] | 4
|
2018-01-03T19:36:45.000Z
|
2019-08-08T00:17:39.000Z
|
tests/test_fileprovider.py
|
sideffect0/django-fileprovider
|
fde283ecd3041e6348b2b9911036afe22b348aa3
|
[
"BSD-3-Clause"
] | 4
|
2017-10-28T17:36:54.000Z
|
2018-03-27T10:46:36.000Z
|
tests/test_fileprovider.py
|
sideffect0/django-fileprovider
|
fde283ecd3041e6348b2b9911036afe22b348aa3
|
[
"BSD-3-Clause"
] | 3
|
2017-10-28T17:47:59.000Z
|
2018-04-06T18:34:14.000Z
|
def test_version():
# starting django,python pair version test
pass
| 19
| 46
| 0.710526
| 10
| 76
| 5.3
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.223684
| 76
| 3
| 47
| 25.333333
| 0.898305
| 0.526316
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.5
| 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
| 1
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
2493f61a73f4ff4710e9ab54309eb7eedff81f6e
| 96
|
py
|
Python
|
vkbottle/dispatch/views/bot/__init__.py
|
homus32/vkbottle
|
8247665ef74835abe0c2c5e5981826540d0ecdb5
|
[
"MIT"
] | 698
|
2019-08-09T17:32:52.000Z
|
2021-07-22T08:30:32.000Z
|
vkbottle/dispatch/views/bot/__init__.py
|
homus32/vkbottle
|
8247665ef74835abe0c2c5e5981826540d0ecdb5
|
[
"MIT"
] | 216
|
2019-08-18T19:22:50.000Z
|
2021-07-30T12:15:17.000Z
|
vkbottle/dispatch/views/bot/__init__.py
|
homus32/vkbottle
|
8247665ef74835abe0c2c5e5981826540d0ecdb5
|
[
"MIT"
] | 268
|
2019-08-10T14:52:04.000Z
|
2021-07-28T07:06:42.000Z
|
from .message import MessageView, ABCMessageView
from .raw import HandlerBasement, RawEventView
| 32
| 48
| 0.854167
| 10
| 96
| 8.2
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.104167
| 96
| 2
| 49
| 48
| 0.953488
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
2494259af5ab769b7518d7c4e37525b7b165fbca
| 40
|
py
|
Python
|
angr/engines/vex/claripy/__init__.py
|
Kyle-Kyle/angr
|
345b2131a7a67e3a6ffc7d9fd475146a3e12f837
|
[
"BSD-2-Clause"
] | 6,132
|
2015-08-06T23:24:47.000Z
|
2022-03-31T21:49:34.000Z
|
angr/engines/vex/claripy/__init__.py
|
Kyle-Kyle/angr
|
345b2131a7a67e3a6ffc7d9fd475146a3e12f837
|
[
"BSD-2-Clause"
] | 2,272
|
2015-08-10T08:40:07.000Z
|
2022-03-31T23:46:44.000Z
|
angr/engines/vex/claripy/__init__.py
|
Kyle-Kyle/angr
|
345b2131a7a67e3a6ffc7d9fd475146a3e12f837
|
[
"BSD-2-Clause"
] | 1,155
|
2015-08-06T23:37:39.000Z
|
2022-03-31T05:54:11.000Z
|
from .datalayer import ClaripyDataMixin
| 20
| 39
| 0.875
| 4
| 40
| 8.75
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1
| 40
| 1
| 40
| 40
| 0.972222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
24a969e09a8cb0195adbc1f583a9cb9efa9b70a3
| 1,976
|
py
|
Python
|
tests/business/mock/mock_timetable_service.py
|
public-transport-quality-grades/oevgk18-generator
|
e467587d3d3c600a66139756e95bd84040d58c99
|
[
"MIT"
] | null | null | null |
tests/business/mock/mock_timetable_service.py
|
public-transport-quality-grades/oevgk18-generator
|
e467587d3d3c600a66139756e95bd84040d58c99
|
[
"MIT"
] | 3
|
2018-04-30T06:51:33.000Z
|
2018-05-30T18:22:58.000Z
|
tests/business/mock/mock_timetable_service.py
|
public-transport-quality-grades/oevgk18-generator
|
e467587d3d3c600a66139756e95bd84040d58c99
|
[
"MIT"
] | null | null | null |
from contextlib import contextmanager
from datetime import datetime
from typing import Dict, List
mocked_directions_count = {
8503400: 9,
8503125: 5,
8591382: 0,
8593245: 6,
8504532: 4
}
mocked_departure_times = {
8503400: [datetime(2018, 4, 23, 6, 35), datetime(2018, 4, 23, 7, 15)],
8503125: [datetime(2018, 4, 23, 9, 0), datetime(2018, 4, 23, 9, 15), datetime(2018, 4, 23, 9, 30),
datetime(2018, 4, 23, 9, 45), datetime(2018, 4, 23, 10, 0), datetime(2018, 4, 23, 10, 15),
datetime(2018, 4, 23, 10, 30), datetime(2018, 4, 23, 10, 45), datetime(2018, 4, 23, 11, 0),
datetime(2018, 4, 23, 11, 15), datetime(2018, 4, 23, 11, 30), datetime(2018, 4, 23, 11, 45),
datetime(2018, 4, 23, 12, 0), datetime(2018, 4, 23, 12, 15), datetime(2018, 4, 23, 12, 30),
datetime(2018, 4, 23, 12, 45), datetime(2018, 4, 23, 13, 0), datetime(2018, 4, 23, 13, 15),
datetime(2018, 4, 23, 13, 30), datetime(2018, 4, 23, 13, 45), datetime(2018, 4, 23, 14, 0),
datetime(2018, 4, 23, 14, 15), datetime(2018, 4, 23, 14, 30), datetime(2018, 4, 23, 14, 45),
datetime(2018, 4, 23, 15, 0), datetime(2018, 4, 23, 15, 15), datetime(2018, 4, 23, 15, 30),
datetime(2018, 4, 23, 15, 45), datetime(2018, 4, 23, 16, 0), datetime(2018, 4, 23, 16, 15),
datetime(2018, 4, 23, 16, 30), datetime(2018, 4, 23, 16, 45)],
8591382: [datetime(2018, 4, 23, 9, 1), datetime(2018, 4, 23, 9, 2), datetime(2018, 4, 23, 10, 1),
datetime(2018, 4, 23, 10, 2), datetime(2018, 4, 23, 11, 0), datetime(2018, 4, 23, 11, 5)]
}
@contextmanager
def db_connection(db_config: dict):
yield None
def get_count_of_distinct_next_stops(db_config, relevant_stops) -> Dict[int, int]:
return mocked_directions_count
def get_all_departure_times(db_config: dict, due_date: datetime) -> Dict[int, List[datetime]]:
return mocked_departure_times
| 44.909091
| 106
| 0.59666
| 318
| 1,976
| 3.638365
| 0.172956
| 0.414866
| 0.449438
| 0.518583
| 0.604149
| 0.060501
| 0.060501
| 0.060501
| 0.060501
| 0.060501
| 0
| 0.317219
| 0.23583
| 1,976
| 43
| 107
| 45.953488
| 0.449007
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.090909
| false
| 0
| 0.090909
| 0.060606
| 0.242424
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
24fa7a9e010a732cd1d27cedbbf6874ee8587a16
| 127
|
py
|
Python
|
news/admin.py
|
trangdang168/social_media_aggregator
|
34b4ce4e95a7c4d8d846bf4402e17653a99adab6
|
[
"MIT"
] | null | null | null |
news/admin.py
|
trangdang168/social_media_aggregator
|
34b4ce4e95a7c4d8d846bf4402e17653a99adab6
|
[
"MIT"
] | null | null | null |
news/admin.py
|
trangdang168/social_media_aggregator
|
34b4ce4e95a7c4d8d846bf4402e17653a99adab6
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from news.models import Headline
# Register your models here.
admin.site.register(Headline)
| 18.142857
| 32
| 0.811024
| 18
| 127
| 5.722222
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.125984
| 127
| 6
| 33
| 21.166667
| 0.927928
| 0.204724
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
24fa95a5f892ac3217f38ddc40b697914cb3bf17
| 1,196
|
py
|
Python
|
spinup/__init__.py
|
vlad-filin/spinningup_curiousity
|
02bfa7d0ff90c080a38628882bfb2b8518914a28
|
[
"MIT"
] | 1
|
2020-12-22T09:51:24.000Z
|
2020-12-22T09:51:24.000Z
|
spinup/__init__.py
|
vlad-filin/spinningup_curiousity
|
02bfa7d0ff90c080a38628882bfb2b8518914a28
|
[
"MIT"
] | 1
|
2020-06-02T10:29:04.000Z
|
2020-06-02T10:29:04.000Z
|
spinup/__init__.py
|
vlad-filin/spinningup_curiousity
|
02bfa7d0ff90c080a38628882bfb2b8518914a28
|
[
"MIT"
] | null | null | null |
import tensorflow as tf
from spinup.algos.pytorch.ddpg.ddpg import ddpg as ddpg_pytorch
from spinup.algos.pytorch.ppo.ppo import ppo as ppo_pytorch
from spinup.algos.pytorch.ppo.ppo_fd_1head import ppo as ppo_fd_1head_pytorch
from spinup.algos.pytorch.ppo.ppo_fd_2heads import ppo as ppo_fd_2heads_pytorch
from spinup.algos.pytorch.ppo.ppo_rnd import ppo as ppo_rnd_pytorch
from spinup.algos.pytorch.ppo.ppo_icm import ppo as ppo_icm_pytorch
from spinup.algos.pytorch.sac.sac import sac as sac_pytorch
from spinup.algos.pytorch.td3.td3 import td3 as td3_pytorch
from spinup.algos.pytorch.trpo.trpo import trpo as trpo_pytorch
from spinup.algos.pytorch.vpg.vpg import vpg as vpg_pytorch
# Algorithms
from spinup.algos.tf1.ddpg.ddpg import ddpg as ddpg_tf1
from spinup.algos.tf1.ppo.ppo import ppo as ppo_tf1
from spinup.algos.tf1.sac.sac import sac as sac_tf1
from spinup.algos.tf1.td3.td3 import td3 as td3_tf1
from spinup.algos.tf1.trpo.trpo import trpo as trpo_tf1
from spinup.algos.tf1.vpg.vpg import vpg as vpg_tf1
# Loggers
from spinup.utils.logx import EpochLogger, Logger
# Version
from spinup.version import __version__
tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.ERROR)
| 41.241379
| 79
| 0.831104
| 218
| 1,196
| 4.408257
| 0.151376
| 0.187305
| 0.24974
| 0.228928
| 0.709677
| 0.44641
| 0.186264
| 0.077003
| 0
| 0
| 0
| 0.024186
| 0.101171
| 1,196
| 28
| 80
| 42.714286
| 0.869767
| 0.021739
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.95
| 0
| 0.95
| 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
| 1
| 0
|
0
| 5
|
7036226bad3c2a8cbb00a714b036b5c06fd512de
| 54
|
py
|
Python
|
yaml2pyclass/__init__.py
|
a-nau/yaml2pyclass
|
5b0db4e00e911f1080c79535d6ed3ecade28f2a0
|
[
"BSD-3-Clause"
] | 2
|
2021-03-12T19:28:31.000Z
|
2021-03-26T08:31:05.000Z
|
yaml2pyclass/__init__.py
|
a-nau/yaml2pyclass
|
5b0db4e00e911f1080c79535d6ed3ecade28f2a0
|
[
"BSD-3-Clause"
] | null | null | null |
yaml2pyclass/__init__.py
|
a-nau/yaml2pyclass
|
5b0db4e00e911f1080c79535d6ed3ecade28f2a0
|
[
"BSD-3-Clause"
] | 1
|
2021-12-30T07:35:23.000Z
|
2021-12-30T07:35:23.000Z
|
from yaml2pyclass.code_generator import CodeGenerator
| 27
| 53
| 0.907407
| 6
| 54
| 8
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.02
| 0.074074
| 54
| 1
| 54
| 54
| 0.94
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
7042e3e822deee74c69ffeb77ceab08adac56ee1
| 138
|
py
|
Python
|
src/PlantStation/core/helpers/__init__.py
|
j-kk/PlantStation
|
d0bfb68b2fd79d66f626c6d0a9ba25c4db53905c
|
[
"MIT"
] | null | null | null |
src/PlantStation/core/helpers/__init__.py
|
j-kk/PlantStation
|
d0bfb68b2fd79d66f626c6d0a9ba25c4db53905c
|
[
"MIT"
] | 2
|
2020-03-05T13:39:47.000Z
|
2020-04-12T21:53:48.000Z
|
src/PlantStation/core/helpers/__init__.py
|
j-kk/PlantStation
|
d0bfb68b2fd79d66f626c6d0a9ba25c4db53905c
|
[
"MIT"
] | null | null | null |
# coding=utf-8
"""
Helper package for PlantStation project.
"""
from .format_validators import parse_time
from .helpers import does_throw
| 19.714286
| 41
| 0.789855
| 19
| 138
| 5.578947
| 0.894737
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.008264
| 0.123188
| 138
| 7
| 42
| 19.714286
| 0.867769
| 0.391304
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.