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
8d4c268291eb29586ce12a2546b758069928e11c
461
py
Python
asim/models/MXGSDumpMemoryTC.py
garethcmurphy/mysite
21a8247dbed3d3196ab22c5cdd10b0c79dccb991
[ "MIT" ]
null
null
null
asim/models/MXGSDumpMemoryTC.py
garethcmurphy/mysite
21a8247dbed3d3196ab22c5cdd10b0c79dccb991
[ "MIT" ]
null
null
null
asim/models/MXGSDumpMemoryTC.py
garethcmurphy/mysite
21a8247dbed3d3196ab22c5cdd10b0c79dccb991
[ "MIT" ]
null
null
null
from django.db import models from django.utils import timezone from django.contrib.postgres.fields import ArrayField import datetime from django.contrib import admin class MXGSDumpMemoryTC (models.Model): private_header = models.IntegerField() command_length = models.IntegerField() memory_id = models.IntegerField() start_address = models.IntegerField() no_octets = models.IntegerField() dump_frequency = models.IntegerField()
32.928571
53
0.770065
52
461
6.711538
0.557692
0.309456
0.097421
0
0
0
0
0
0
0
0
0
0.156182
461
13
54
35.461538
0.897172
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.416667
0
1
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
3
a5c8991c683940d8da3d75f92ff36ec9db61adf0
662
py
Python
findance/assets/serializers.py
mccartnm/findance
5d8b980cbe3f0b3dbe5798a75f58b5749088331f
[ "MIT" ]
null
null
null
findance/assets/serializers.py
mccartnm/findance
5d8b980cbe3f0b3dbe5798a75f58b5749088331f
[ "MIT" ]
null
null
null
findance/assets/serializers.py
mccartnm/findance
5d8b980cbe3f0b3dbe5798a75f58b5749088331f
[ "MIT" ]
null
null
null
from rest_framework import serializers from .models import Asset, AssetOwnership from entity.serializers import OwningEntitySerializer class AssetSerializer(serializers.HyperlinkedModelSerializer): """ Serializer for Assets """ class Meta: model = Asset fields = ('id', 'url', 'name', 'description', 'value') class AssetOwnershipSerializer(serializers.HyperlinkedModelSerializer): """ Serializer for AssetOwnership objects """ owner = OwningEntitySerializer() asset = AssetSerializer() class Meta: model = AssetOwnership fields = ('id', 'url', 'asset', 'owner', 'percentage', 'count')
26.48
71
0.688822
55
662
8.272727
0.527273
0.162637
0.206593
0.21978
0
0
0
0
0
0
0
0
0.205438
662
25
72
26.48
0.865019
0.089124
0
0.153846
0
0
0.096154
0
0
0
0
0
0
1
0
false
0
0.230769
0
0.692308
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
3
a5c89978357a22077ff37ee31ab7a1ac4edb4a5c
565
py
Python
classic_tetris_project/util/fieldgen/gravity.py
Madv0x/classic-tetris-project
cfd8c39376ad42e6ec57055d88d79916b3debe10
[ "MIT" ]
17
2019-11-23T12:56:06.000Z
2022-02-05T21:48:00.000Z
classic_tetris_project/util/fieldgen/gravity.py
Madv0x/classic-tetris-project
cfd8c39376ad42e6ec57055d88d79916b3debe10
[ "MIT" ]
43
2019-10-03T20:16:11.000Z
2022-03-12T00:24:52.000Z
classic_tetris_project/util/fieldgen/gravity.py
Madv0x/classic-tetris-project
cfd8c39376ad42e6ec57055d88d79916b3debe10
[ "MIT" ]
17
2020-02-09T01:55:01.000Z
2021-11-12T21:16:50.000Z
class GravityFrames(object): LEVELS = [ 48, 43, 38, 33, 28, 23, 18, 13, 8, 6, 5, 5, 5, 4, 4, 4, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ] @staticmethod def get_gravityframes(level): result = 1 level %= 256 if level < 29: result = GravityFrames.LEVELS[level] return result
13.780488
48
0.300885
52
565
3.269231
0.557692
0.105882
0.141176
0.164706
0.058824
0.058824
0.058824
0.058824
0.058824
0
0
0.196347
0.612389
565
40
49
14.125
0.575342
0
0
0.487179
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
3
a5d8a0dbd9dc9f95877198753fb472ddcaff3454
25,965
py
Python
api.py
Mark-ThinkPad/BookManage
aeba4adbae55ea79e71e6eb34422a094fca8ee66
[ "WTFPL" ]
1
2020-09-15T00:29:23.000Z
2020-09-15T00:29:23.000Z
api.py
Mark-ThinkPad/BookManage
aeba4adbae55ea79e71e6eb34422a094fca8ee66
[ "WTFPL" ]
null
null
null
api.py
Mark-ThinkPad/BookManage
aeba4adbae55ea79e71e6eb34422a094fca8ee66
[ "WTFPL" ]
1
2020-03-02T08:18:38.000Z
2020-03-02T08:18:38.000Z
from flask import Blueprint, request from decorators import login_required, permission_check from sqlalchemy.exc import OperationalError, IntegrityError, ProgrammingError from sqlalchemy.orm.exc import NoResultFound, MultipleResultsFound from models import TBReader, TBReaderType, TBBook, TBBorrow, db_session, engine from random import randint import datetime api = Blueprint('api', __name__) @api.route('/user/login', methods=['POST']) def login(): uid = request.form.get('uid', False) pwd = request.form.get('pwd', False) if not (uid and pwd): return {'status': 0, 'message': '未输入用户ID或密码'} try: r: TBReader = TBReader.query.filter(TBReader.rdID == uid, TBReader.rdPwd == pwd).one() return {'status': 1, 'message': '登录成功', 'uid': r.rdID, 'pwd': pwd, 'username': r.rdName} except NoResultFound: return {'status': 0, 'message': '用户ID或密码错误'} except MultipleResultsFound: return {'status': 0, 'message': '用户数据异常'} @api.route('/user/changePwd', methods=['POST']) @login_required def changePwd(): uid = request.form.get('uid', False) old_pwd = request.form.get('old_pwd', False) new_pwd = request.form.get('new_pwd', False) if not (uid and old_pwd and new_pwd): return {'status': 0, 'message': '传入数据不完整'} try: session = db_session() r: TBReader = session.query(TBReader).filter(TBReader.rdID == uid, TBReader.rdPwd == old_pwd).one() r.rdPwd = new_pwd session.commit() session.close() except NoResultFound: return {'status': 0, 'message': '旧密码错误'} except MultipleResultsFound: return {'status': 0, 'message': '用户数据异常'} else: return {'status': 1, 'message': '密码修改成功, 请重新登录'} @api.route('/reader/type/add', methods=['POST']) @login_required @permission_check(0b0001, True) def addReaderType(): rdType = request.form.get('rdType', False) rdTypeName = request.form.get('rdTypeName', False) CanLendQty = request.form.get('CanLendQty', False) CanLendDay = request.form.get('CanLendDay', False) CanContinueTimes = request.form.get('CanContinueTimes', False) PunishRate = request.form.get('PunishRate', False) DateValid = request.form.get('DateValid', False) if not (rdType and rdTypeName and CanLendQty and CanLendDay and CanContinueTimes and PunishRate and DateValid): return {'status': 0, 'message': '传入数据不完整'} try: session = db_session() rt = TBReaderType(rdType=rdType, rdTypeName=rdTypeName, CanLendQty=CanLendQty, CanLendDay=CanLendDay, CanContinueTimes=CanContinueTimes, PunishRate=PunishRate, DateValid=DateValid) session.add(rt) session.commit() session.close() except OperationalError: return {'status': 0, 'message': '输入的数据类型可能有误'} except IntegrityError: return {'status': 0, 'message': '读者类型编号或读者类型名重复'} else: return {'status': 1, 'message': '新的读者类型添加成功'} @api.route('/reader/type/find', methods=['POST']) @login_required @permission_check(0b0001, True) def findReaderType(): rdType = request.form.get('rdType', False) rdTypeName = request.form.get('rdTypeName', False) if rdType is False and rdTypeName is False: return {'status': 0, 'message': '传入数据不完整'} try: if rdType and rdTypeName: rt: TBReaderType = TBReaderType.query.filter(TBReaderType.rdType == rdType, TBReaderType.rdTypeName == rdTypeName).one() if rdType and rdTypeName is False: rt: TBReaderType = TBReaderType.query.filter(TBReaderType.rdType == rdType).one() if rdType is False and rdTypeName: rt: TBReaderType = TBReaderType.query.filter(TBReaderType.rdTypeName == rdTypeName).one() return {'status': 1, 'message': '已找到一个读者类型', 'rdType': rt.rdType, 'rdTypeName': rt.rdTypeName, 'CanLendQty': rt.CanLendQty, 'CanLendDay': rt.CanLendDay, 'CanContinueTimes': rt.CanContinueTimes, 'PunishRate': rt.PunishRate, 'DateValid': rt.DateValid} except NoResultFound: return {'status': 0, 'message': '没有查询到相应的读者类型'} except MultipleResultsFound: return {'status': 0, 'message': '读者类型数据异常'} except OperationalError: return {'status': 0, 'message': '输入的数据类型可能有误'} @api.route('/reader/type/change', methods=['POST']) @login_required @permission_check(0b0001, True) def changeReaderType(): rdType = request.form.get('rdType', False) rdTypeName = request.form.get('rdTypeName', False) CanLendQty = request.form.get('CanLendQty', False) CanLendDay = request.form.get('CanLendDay', False) CanContinueTimes = request.form.get('CanContinueTimes', False) PunishRate = request.form.get('PunishRate', False) DateValid = request.form.get('DateValid', False) if not (rdType and rdTypeName and CanLendQty and CanLendDay and CanContinueTimes and PunishRate and DateValid): return {'status': 0, 'message': '传入数据不完整'} try: session = db_session() rt: TBReaderType = session.query(TBReaderType).filter(TBReaderType.rdType == rdType).one() rt.rdTypeName = rdTypeName rt.CanLendQty = CanLendQty rt.CanLendDay = CanLendDay rt.CanContinueTimes = CanContinueTimes rt.PunishRate = PunishRate rt.DateValid = DateValid session.commit() session.close() except NoResultFound: return {'status': 0, 'message': '未找到指定的读者类型'} except MultipleResultsFound: return {'status': 0, 'message': '读者类型数据异常'} except OperationalError: return {'status': 0, 'message': '输入的数据类型可能有误'} else: return {'status': 1, 'message': '指定的读者类型修改成功'} @api.route('/reader/type/delete', methods=['POST']) @login_required @permission_check(0b0001, True) def deleteReaderType(): rdType = request.form.get('rdType', False) rdTypeName = request.form.get('rdTypeName', False) if rdType is False and rdTypeName is False: return {'status': 0, 'message': '传入数据不完整'} try: session = db_session() if rdType and rdTypeName: rt: TBReaderType = session.query(TBReaderType).filter(TBReaderType.rdType == rdType, TBReaderType.rdTypeName == rdTypeName).one() if rdType and rdTypeName is False: rt: TBReaderType = session.query(TBReaderType).filter(TBReaderType.rdType == rdType).one() if rdType is False and rdTypeName: rt: TBReaderType = session.query(TBReaderType).filter(TBReaderType.rdTypeName == rdTypeName).one() session.delete(rt) session.commit() session.close() except NoResultFound: return {'status': 0, 'message': '未找到指定的读者类型'} except MultipleResultsFound: return {'status': 0, 'message': '读者类型数据异常'} except OperationalError: return {'status': 0, 'message': '输入的数据类型可能有误'} else: return {'status': 1, 'message': '指定的读者类型删除成功'} @api.route('/reader/add', methods=['POST']) @login_required @permission_check(0b0001, True) def addReader(): rdID = request.form.get('rdID', False) rdName = request.form.get('rdName', False) rdSex = request.form.get('rdSex', False) rdType = request.form.get('rdType', False) rdDept = request.form.get('rdDept', False) rdPhone = request.form.get('rdPhone', False) rdEmail = request.form.get('rdEmail', False) if not (rdID and rdName and rdSex and rdType and rdDept and rdPhone and rdEmail): return {'status': 0, 'message': '传入数据不完整'} try: session = db_session() r = TBReader(rdID=rdID, rdName=rdName, rdSex=rdSex, rdType=rdType, rdDept=rdDept, rdPhone=rdPhone, rdEmail=rdEmail) session.add(r) session.commit() session.close() except IntegrityError: return {'status': 0, 'message': '已存在相同的借书证编号, 无法重新创建'} except OperationalError: return {'status': 0, 'message': '输入的数据可能有误'} else: return {'status': 1, 'message': '新借书证创建成功'} @api.route('/reader/add/status', methods=['POST']) @login_required @permission_check(0b0001, True) def addReaderStatus(): rdID = request.form.get('rdID', False) if rdID is False: return {'status': 0, 'message': '传入数据不完整'} try: TBReader.query.filter(TBReader.rdID == rdID).one() except NoResultFound: return {'status': 1, 'message': '此人可以办理借书证'} except MultipleResultsFound: return {'status': 0, 'message': '借书证数据异常'} except OperationalError: return {'status': 0, 'message': '输入的数据类型可能有误'} else: return {'status': 0, 'message': '该人已办理借书证, 无需再次办理'} @api.route('/reader/change', methods=['POST']) @login_required @permission_check(0b0001, True) def changeReader(): rdID = request.form.get('rdID', False) rdName = request.form.get('rdName', False) rdSex = request.form.get('rdSex', False) rdType = request.form.get('rdType', False) rdDept = request.form.get('rdDept', False) rdPhone = request.form.get('rdPhone', False) rdEmail = request.form.get('rdEmail', False) if not (rdID and rdName and rdSex and rdType and rdDept and rdPhone and rdEmail): return {'status': 0, 'message': '传入数据不完整'} try: session = db_session() r: TBReader = session.query(TBReader).filter(TBReader.rdID == rdID).one() r.rdName = rdName r.rdSex = rdSex r.rdType = rdType r.rdDept = rdDept r.rdPhone = rdPhone r.rdEmail = rdEmail session.commit() session.close() except NoResultFound: return {'status': 0, 'message': '未找到指定的借书证'} except MultipleResultsFound: return {'status': 0, 'message': '借书证数据异常'} except OperationalError: return {'status': 0, 'message': '输入的数据可能有误'} else: return {'status': 1, 'message': '指定的借书证修改成功'} @api.route('/reader/loss/report', methods=['POST']) @login_required @permission_check(0b0001, True) def lossReport(): rdID = request.form.get('rdID', False) if rdID is False: return {'status': 0, 'message': '传入数据不完整'} try: session = db_session() r: TBReader = session.query(TBReader).filter(TBReader.rdID == rdID).one() if r.rdStatus == '有效': r.rdStatus = '挂失' session.commit() session.close() return {'status': 1, 'message': '挂失办理成功'} else: session.close() return {'status': 0, 'message': '该借书证状态不是有效, 无法办理挂失'} except NoResultFound: return {'status': 0, 'message': '未找到指定的借书证'} except MultipleResultsFound: return {'status': 0, 'message': '借书证数据异常'} except OperationalError: return {'status': 0, 'message': '输入的数据可能有误'} @api.route('/reader/loss/report/status', methods=['POST']) @login_required @permission_check(0b0001, True) def lossReportStatus(): rdID = request.form.get('rdID', False) if rdID is False: return {'status': 0, 'message': '传入数据不完整'} try: r: TBReader = TBReader.query.filter(TBReader.rdID == rdID).one() if r.rdStatus == '有效': return {'status': 1, 'message': '该借书证状态有效, 可以办理挂失'} else: return {'status': 0, 'message': '该借书证状态不是有效, 无法办理挂失'} except NoResultFound: return {'status': 0, 'message': '未找到指定的借书证'} except MultipleResultsFound: return {'status': 0, 'message': '借书证数据异常'} except OperationalError: return {'status': 0, 'message': '输入的数据可能有误'} @api.route('/reader/loss/cancel', methods=['POST']) @login_required @permission_check(0b0001, True) def lossCancel(): rdID = request.form.get('rdID', False) if rdID is False: return {'status': 0, 'message': '传入数据不完整'} try: session = db_session() r: TBReader = session.query(TBReader).filter(TBReader.rdID == rdID).one() if r.rdStatus == '挂失': r.rdStatus = '有效' session.commit() session.close() return {'status': 1, 'message': '解除挂失办理成功'} else: session.close() return {'status': 0, 'message': '该借书证状态不是挂失, 无法办理解除挂失'} except NoResultFound: return {'status': 0, 'message': '未找到指定的借书证'} except MultipleResultsFound: return {'status': 0, 'message': '借书证数据异常'} except OperationalError: return {'status': 0, 'message': '输入的数据可能有误'} @api.route('/reader/loss/cancel/status', methods=['POST']) @login_required @permission_check(0b0001, True) def lossCancelStatus(): rdID = request.form.get('rdID', False) if rdID is False: return {'status': 0, 'message': '传入数据不完整'} try: r: TBReader = TBReader.query.filter(TBReader.rdID == rdID).one() if r.rdStatus == '挂失': return {'status': 1, 'message': '该借书证状态为挂失, 可以办理解除挂失'} else: return {'status': 0, 'message': '该借书证状态不是挂失, 无法办理解除挂失'} except NoResultFound: return {'status': 0, 'message': '未找到指定的借书证'} except MultipleResultsFound: return {'status': 0, 'message': '借书证数据异常'} except OperationalError: return {'status': 0, 'message': '输入的数据可能有误'} @api.route('/reader/replace', methods=['POST']) @login_required @permission_check(0b0001, True) def replaceReader(): rdID = request.form.get('rdID', False) if rdID is False: return {'status': 0, 'message': '传入数据不完整'} try: session = db_session() r: TBReader = session.query(TBReader).filter(TBReader.rdID == rdID).one() if r.rdStatus == '挂失': r.rdStatus = '注销' rdID_n = rdID + str(randint(0, 10)) rn = TBReader(rdID=rdID_n, rdName=r.rdName, rdSex=r.rdSex, rdType=r.rdType, rdDept=r.rdDept, rdPhone=r.rdPhone, rdEmail=r.rdEmail, rdDateReg=r.rdDateReg, rdPhoto=r.rdPhoto, rdBorrowQty=r.rdBorrowQty, rdPwd=r.rdPwd, rdAdminRoles=r.rdAdminRoles) session.add(rn) session.commit() bl = session.query(TBBorrow).filter(TBBorrow.rdID == rdID).all() for i in bl: i.rdID = rdID_n session.commit() session.close() return {'status': 1, 'message': '补办成功', 'new_rdID': rdID_n} else: session.close() return {'status': 0, 'message': '该借书证状态不是挂失, 无法办理补办'} except NoResultFound: return {'status': 0, 'message': '未找到指定的借书证'} except MultipleResultsFound: return {'status': 0, 'message': '借书证数据异常'} except OperationalError: return {'status': 0, 'message': '输入的数据可能有误'} except IntegrityError: return {'status': 0, 'message': '随机产生的新编号与数据库现有的借书证号出现重复, 请再次点击办理按钮'} @api.route('/reader/delete', methods=['POST']) @login_required @permission_check(0b0001, True) def deleteReader(): rdID = request.form.get('rdID', False) if rdID is False: return {'status': 0, 'message': '传入数据不完整'} try: session = db_session() r: TBReader = session.query(TBReader).filter(TBReader.rdID == rdID).one() if r.rdBorrowQty > 0: session.close() return {'status': 0, 'message': '有未归还图书, 不能办理注销'} else: r.rdStatus = '注销' session.commit() session.close() return {'status': 1, 'message': '注销成功'} except NoResultFound: return {'status': 0, 'message': '未找到指定的借书证'} except MultipleResultsFound: return {'status': 0, 'message': '借书证数据异常'} except OperationalError: return {'status': 0, 'message': '输入的数据可能有误'} @api.route('/book/add', methods=['POST']) @login_required @permission_check(0b0010) def addBook(): bkName = request.form.get('bkName', False) bkAuthor = request.form.get('bkAuthor', False) bkPress = request.form.get('bkPress', False) bkNum = request.form.get('bkNum', False) bkNum = int(bkNum) if not (bkName and bkAuthor and bkPress): return {'status': 0, 'message': '传入数据不全'} if bkNum <= 0: return {'status': 0, 'message': '新书数量为零或负数'} try: con = engine.connect() for i in range(bkNum): con.execute(f"insert into TB_Book (bkName, bkAuthor, bkPress, bkStatus, bkPrice) values ('{bkName}', '{bkAuthor}', '{bkPress}', '在馆', 20)") con.close() except ProgrammingError: return {'status': 0, 'message': '输入的数据可能有误'} else: return {'status': 1, 'message': '新书入库成功'} @api.route('/book/find', methods=['POST']) @login_required @permission_check(0b0010) def findBook(): bkID = request.form.get('bkID', False) if bkID is False: return {'status': 0, 'message': '传入数据不完整'} try: b: TBBook = TBBook.query.filter(TBBook.bkID == bkID).one() return {'status': 1, 'message': '已找到一本图书', 'bkID': b.bkID, 'bkName': b.bkName, 'bkAuthor': b.bkAuthor, 'bkPress': b.bkPress} except NoResultFound: return {'status': 0, 'message': '没有查询到相应的图书'} except MultipleResultsFound: return {'status': 0, 'message': '图书数据异常'} except OperationalError: return {'status': 0, 'message': '输入的数据可能有误'} @api.route('/book/change', methods=['POST']) @login_required @permission_check(0b0010) def changeBook(): bkID = request.form.get('bkID', False) bkName = request.form.get('bkName', False) bkAuthor = request.form.get('bkAuthor', False) bkPress = request.form.get('bkPress', False) if not (bkName and bkAuthor and bkPress and bkID): return {'status': 0, 'message': '传入数据不全'} try: session = db_session() b: TBBook = session.query(TBBook).filter(TBBook.bkID == bkID).one() b.bkName = bkName b.bkAuthor = bkAuthor b.bkPress = bkPress session.commit() session.close() except NoResultFound: return {'status': 0, 'message': '没有查询到相应的图书'} except MultipleResultsFound: return {'status': 0, 'message': '图书数据异常'} except OperationalError: return {'status': 0, 'message': '输入的数据可能有误'} else: return {'status': 1, 'message': '修改成功'} @api.route('/book/delete', methods=['POST']) @login_required @permission_check(0b0010) def deleteBook(): bkID = request.form.get('bkID', False) if bkID is False: return {'status': 0, 'message': '传入数据不完整'} try: session = db_session() b: TBBook = session.query(TBBook).filter(TBBook.bkID == bkID).one() session.delete(b) session.commit() session.close() except NoResultFound: return {'status': 0, 'message': '没有查询到相应的图书'} except MultipleResultsFound: return {'status': 0, 'message': '图书数据异常'} except OperationalError: return {'status': 0, 'message': '输入的数据可能有误'} else: return {'status': 1, 'message': '指定的图书删除成功'} @api.route('/borrow/add', methods=['POST']) @login_required @permission_check(0b0100) def addBorrow(): rdID = request.form.get('rdID', False) bkID = request.form.get('bkID', False) op = request.cookies.get('uid', False) if rdID is False and bkID is False: return {'status': 0, 'message': '传入数据不完整'} try: session = db_session() b = TBBorrow(rdID=rdID, bkID=bkID, OperatorLend=op, IdContinueTimes=0) r: TBReader = session.query(TBReader).filter(TBReader.rdID == rdID).one() rt: TBReaderType = session.query(TBReaderType).filter(TBReaderType.rdType == r.rdType).one() b.IdDateOut = datetime.datetime.now() b.IdDateRetPlan = datetime.datetime.now() + datetime.timedelta(days=rt.CanLendDay) session.add(b) r.rdBorrowQty += 1 bk: TBBook = session.query(TBBook).filter(TBBook.bkID == bkID).one() bk.bkStatus = '借出' session.commit() session.close() except OperationalError: return {'status': 0, 'message': '输入的数据可能有误'} except (NoResultFound, MultipleResultsFound): return {'status': 0, 'message': '后台数据异常'} else: return {'status': 1, 'message': '借书办理成功'} @api.route('/borrow/add/status/reader', methods=['POST']) @login_required @permission_check(0b0100) def reader_status(): rdID = request.form.get('rdID', False) if rdID is False: return {'status': 0, 'message': '传入数据不完整'} try: r: TBReader = TBReader.query.filter(TBReader.rdID == rdID).one() if r.rdStatus in ('挂失', '注销'): return {'status': 0, 'message': '借书证状态为挂失或注销, 不能借书'} rt: TBReaderType = TBReaderType.query.filter(TBReaderType.rdType == r.rdType).one() if rt.CanLendQty <= r.rdBorrowQty: return {'status': 0, 'message': '可借书数量不足, 不能借书'} b: TBBorrow = TBBorrow.query.filter(TBBorrow.rdID == rdID).all() for i in b: if i.IsHasReturn == 0 and str(datetime.datetime.now()) > str(i.IdDateRetPlan): return {'status': 0, 'message': '存在超期未归还图书, 不能借书'} return {'status': 1, 'message': '该读者可以借书'} except NoResultFound: return {'status': 0, 'message': '没有查询到相应的借书证'} except MultipleResultsFound: return {'status': 0, 'message': '借书证数据异常'} except OperationalError: return {'status': 0, 'message': '输入的数据可能有误'} @api.route('/borrow/add/status/book', methods=['POST']) @login_required @permission_check(0b0100) def book_status(): bkID = request.form.get('bkID', False) if bkID is False: return {'status': 0, 'message': '传入数据不完整'} try: b: TBBook = TBBook.query.filter(TBBook.bkID == bkID).one() if b.bkStatus != '在馆': return {'status': 0, 'message': '该图书不在馆, 不能借书'} return {'status': 1, 'message': '该图书在馆, 可以借书'} except NoResultFound: return {'status': 0, 'message': '没有查询到相应的图书'} except MultipleResultsFound: return {'status': 0, 'message': '图书数据异常'} except OperationalError: return {'status': 0, 'message': '输入的数据可能有误'} @api.route('/borrow/continue', methods=['POST']) @login_required @permission_check(0b0100) def continueBorrow(): bkID = request.form.get('bkID', False) if bkID is False: return {'status': 0, 'message': '传入数据不完整'} try: session = db_session() bo: TBBorrow = session.query(TBBorrow).filter(TBBorrow.bkID == bkID, TBBorrow.IsHasReturn == 0).one() r: TBReader = session.query(TBReader).filter(TBReader.rdID == bo.rdID).one() rt: TBReaderType = TBReaderType.query.filter(TBReaderType.rdType == r.rdType).one() bo.IdContinueTimes += 1 bo.IdDateRetPlan += datetime.timedelta(days=rt.CanLendDay) session.commit() session.close() except NoResultFound: return {'status': 0, 'message': '没有查询到相应的借阅记录'} except MultipleResultsFound: return {'status': 0, 'message': '借阅数据异常'} except OperationalError: return {'status': 0, 'message': '输入的数据可能有误'} else: return {'status': 1, 'message': '续借办理成功'} @api.route('/borrow/continue/status', methods=['POST']) @login_required @permission_check(0b0100) def continue_status(): bkID = request.form.get('bkID', False) if bkID is False: return {'status': 0, 'message': '传入数据不完整'} try: session = db_session() bk: TBBook = session.query(TBBook).filter(TBBook.bkID == bkID).one() if bk.bkStatus != '借出': return {'status': 0, 'message': '图书不是借出状态, 不能办理续借'} bo: TBBorrow = session.query(TBBorrow).filter(TBBorrow.bkID == bkID, TBBorrow.IsHasReturn == 0).one() r: TBReader = session.query(TBReader).filter(TBReader.rdID == bo.rdID).one() if r.rdStatus in ('挂失', '注销'): return {'status': 0, 'message': '借书证状态为挂失或注销, 不能办理续借'} rt: TBReaderType = TBReaderType.query.filter(TBReaderType.rdType == r.rdType).one() if bo.IdContinueTimes >= rt.CanContinueTimes: return {'status': 0, 'message': '续借次数已用完, 不能办理续借'} session.close() return {'status': 1, 'message': '该书可以办理续借, 借书证为: ' + str(r.rdID) + ', 请借阅管理员检查读者出示的借书证是否一致'} except NoResultFound: return {'status': 0, 'message': '没有查询到相应的借阅记录'} except MultipleResultsFound: return {'status': 0, 'message': '借阅数据异常'} except OperationalError: return {'status': 0, 'message': '输入的数据可能有误'} @api.route('/borrow/return', methods=['POST']) @login_required @permission_check(0b0100) def returnBorrow(): bkID = request.form.get('bkID', False) rdID = request.form.get('rdID', False) op = request.cookies.get('uid', False) if bkID is False: return {'status': 0, 'message': '传入数据不完整'} try: session = db_session() bk: TBBook = session.query(TBBook).filter(TBBook.bkID == bkID).one() bo: TBBorrow = session.query(TBBorrow).filter(TBBorrow.bkID == bkID, TBBorrow.rdID == rdID, TBBorrow.IsHasReturn == 0).one() r: TBReader = session.query(TBReader).filter(TBReader.rdID == rdID).one() rt: TBReaderType = TBReaderType.query.filter(TBReaderType.rdType == r.rdType).one() bo.IdDateRetAct = datetime.datetime.now() overdate = datetime.datetime.now() - bo.IdDateRetPlan overdays = overdate.days if overdays > 0: bo.IdOverDay = overdays bo.IdOverMoney = overdays * rt.PunishRate bo.IdPunishMoney = overdays * rt.PunishRate bo.OperatorRet = op bo.IsHasReturn = 1 bk.bkStatus = '在馆' r.rdBorrowQty -= 1 session.commit() session.close() except NoResultFound: return {'status': 0, 'message': '没有查询到相应的借阅记录'} except MultipleResultsFound: return {'status': 0, 'message': '借阅数据异常'} except OperationalError: return {'status': 0, 'message': '输入的数据可能有误'} else: return {'status': 1, 'message': '还书成功'}
35.715268
151
0.617601
2,778
25,965
5.741181
0.088193
0.100069
0.088031
0.135432
0.775723
0.745564
0.704997
0.688382
0.622359
0.60311
0
0.013307
0.233006
25,965
726
152
35.764463
0.787547
0
0
0.681745
0
0.001616
0.162064
0.005661
0
0
0
0
0
1
0.040388
false
0
0.011309
0
0.266559
0.003231
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
a5da491358974e004f3810f34b92faab545fb481
3,498
py
Python
tests/test_data_management.py
Nathaniel-Rodriguez/neuralnetsim
c353af92fb3f44539370220963b07bdfd9822149
[ "MIT" ]
null
null
null
tests/test_data_management.py
Nathaniel-Rodriguez/neuralnetsim
c353af92fb3f44539370220963b07bdfd9822149
[ "MIT" ]
null
null
null
tests/test_data_management.py
Nathaniel-Rodriguez/neuralnetsim
c353af92fb3f44539370220963b07bdfd9822149
[ "MIT" ]
null
null
null
import unittest import neuralnetsim import numpy as np class TestDataManager(unittest.TestCase): def setUp(self): self.data = {0: np.array([0.0, 1.0, 4.0, 6.0, 7.5, 9.5, 10.0]), 2: np.array([1.0, 2.0, 5.0, 8.2, 9.0])} def test_properties(self): dm = neuralnetsim.DataManager(self.data, 1, test_ratio=0.1) self.assertAlmostEqual(dm._max_time, 10.0, 3) self.assertAlmostEqual(dm._test_bounds[0], 9.0, 3) self.assertAlmostEqual(dm._validation_bounds[0], 8.0, 3) dm = neuralnetsim.DataManager(self.data, 2, test_ratio=0.1) self.assertAlmostEqual(dm._test_bounds[1], 8.0, 3) self.assertAlmostEqual(dm._validation_bounds[1], 7.0, 3) self.assertRaises(ValueError, neuralnetsim.DataManager, self.data, 99, 0.1) self.assertRaises(ValueError, neuralnetsim.DataManager, self.data, -1, 0.1) def test_training_fold(self): dm = neuralnetsim.DataManager(self.data, 1, test_ratio=0.1) training = dm.get_training_fold(0) self.assertEqual(len(training[0]), 5) self.assertEqual(len(training[2]), 3) self.assertAlmostEqual(training[0][0], 0.0) self.assertAlmostEqual(training[0][1], 1.0) self.assertAlmostEqual(training[0][2], 4.0) self.assertAlmostEqual(training[0][3], 6.0) self.assertAlmostEqual(training[2][0], 1.0) self.assertAlmostEqual(training[2][1], 2.0) self.assertAlmostEqual(training[2][2], 5.0) dm = neuralnetsim.DataManager(self.data, 3, test_ratio=0.1) training = dm.get_training_fold(2) self.assertEqual(len(training[0]), 3) self.assertEqual(len(training[2]), 3) def test_validation_fold(self): dm = neuralnetsim.DataManager(self.data, 1, test_ratio=0.1) val = dm.get_validation_fold(0) self.assertEqual(len(val[0]), 0) self.assertEqual(len(val[2]), 1) self.assertAlmostEqual(val[2][0], 0.2) dm = neuralnetsim.DataManager(self.data, 2, test_ratio=0.1) val = dm.get_validation_fold(1) self.assertEqual(len(val[0]), 1) self.assertEqual(len(val[2]), 0) self.assertAlmostEqual(val[0][0], 0.5) def test_test_fold(self): dm = neuralnetsim.DataManager(self.data, 1, test_ratio=0.1) test = dm.get_test_fold(0) self.assertEqual(len(test[0]), 2) self.assertEqual(len(test[2]), 1) self.assertAlmostEqual(test[0][0], 0.5) self.assertAlmostEqual(test[2][0], 0.0) dm = neuralnetsim.DataManager(self.data, 2, test_ratio=0.1) test = dm.get_test_fold(1) self.assertEqual(len(test[0]), 0) self.assertEqual(len(test[2]), 2) self.assertAlmostEqual(test[2][0], 0.2) self.assertAlmostEqual(test[2][1], 1.0) self.assertRaises(ValueError, neuralnetsim.DataManager, self.data, 10) def test_duration(self): dm = neuralnetsim.DataManager(self.data, 2, test_ratio=0.1) self.assertAlmostEqual(dm.get_duration("training", 0, 2.0), 10.0) self.assertAlmostEqual(dm.get_duration("validation", 0, 2.0), 3.0) self.assertAlmostEqual(dm.get_duration("test", 0, 2.0), 3.0) self.assertAlmostEqual(dm.get_duration("training", 1, 2.0), 9.0) self.assertAlmostEqual(dm.get_duration("validation", 1, 2.0), 3.0) self.assertAlmostEqual(dm.get_duration("test", 1, 2.0), 3.0) self.assertRaises(ValueError, dm.get_duration, "incorrect", 1, 0.0)
43.185185
83
0.641224
507
3,498
4.333333
0.09073
0.229404
0.147474
0.169322
0.798817
0.569413
0.483842
0.317251
0.317251
0.253983
0
0.071506
0.204403
3,498
80
84
43.725
0.71793
0
0
0.149254
0
0
0.015152
0
0
0
0
0
0.597015
1
0.089552
false
0
0.044776
0
0.149254
0
0
0
0
null
1
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
1
0
0
0
0
0
0
0
0
0
3
a5f8cc33dab5dfb0c3cad50e5ad6872c79edf77e
282
py
Python
imagepy/core/manager/__init__.py
muxevola/imagepy
d6d8cbf214f47a4a545a0d283ae393a6932c4c0f
[ "BSD-4-Clause" ]
null
null
null
imagepy/core/manager/__init__.py
muxevola/imagepy
d6d8cbf214f47a4a545a0d283ae393a6932c4c0f
[ "BSD-4-Clause" ]
null
null
null
imagepy/core/manager/__init__.py
muxevola/imagepy
d6d8cbf214f47a4a545a0d283ae393a6932c4c0f
[ "BSD-4-Clause" ]
null
null
null
from .colormanager import * from .pluginmanager import * from .windowmanager import * from .roimanager import * from .clipbdmanager import * from .configmanager import * from .shotcutmanager import * from .taskmanager import * from .iomanager import * from .languagemanager import *
28.2
30
0.79078
30
282
7.433333
0.4
0.403587
0
0
0
0
0
0
0
0
0
0
0.138298
282
10
30
28.2
0.917695
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
3
a5fa094c01c89e05ec373fad4eb1177b74affd6b
8,034
py
Python
src/motleytestpython/tester (conflicted).py
ericmotleybytes/motleytestpython
3caf39e6709b585f960995b7bdb66872bc5389db
[ "MIT" ]
null
null
null
src/motleytestpython/tester (conflicted).py
ericmotleybytes/motleytestpython
3caf39e6709b585f960995b7bdb66872bc5389db
[ "MIT" ]
null
null
null
src/motleytestpython/tester (conflicted).py
ericmotleybytes/motleytestpython
3caf39e6709b585f960995b7bdb66872bc5389db
[ "MIT" ]
null
null
null
"""Simple and quick sanity check that Python is working correctly.""" import unittest import sys import operator import datetime class Tester(unittest.TestCase): def assert_equal(self,expected,actual,message=None): # assert exactly equal self.assertEqual(expected,actual,message) self.assertEqual(expected.__class__.__name__,actual.__class__.__name__,message) def test_addition(self): self.assert_equal(4,2+2) self.assert_equal(4.0,2+2.0) self.assert_equal(42,operator.add(20,22)) self.assert_equal(-2.5,operator.add(0.5,-3.0)) def test_subtraction(self): self.assert_equal(0,2-2) self.assert_equal(-2,3-5) self.assert_equal(-16,operator.sub(16,32)) self.assert_equal(-16.0,operator.sub(16.0,32)) self.assert_equal(4.0,6-2.0) def test_multiplication(self): self.assert_equal(16,8*2) self.assert_equal(16,-8*-2) self.assert_equal(-16,8*-2) self.assert_equal(-16,operator.mul(8,-2)) self.assert_equal(-4.2,operator.mul(-2.1,2.0)) self.assert_equal(4.2,operator.mul(2.1,2)) self.assert_equal(27.0,9.0*3) def test_division(self): self.assert_equal(2,int(5/2)) self.assert_equal(-2,int(-5/2)) self.assert_equal(0,int(1/3)) self.assert_equal(0,int(2/3)) self.assert_equal(0,int(-1/3)) self.assert_equal(0,int(-2/3)) self.assert_equal(2.0,6.0/3.0) self.assertAlmostEqual(0.333333333,1.0/3.0,7) self.assertAlmostEqual(0.333333333,1/3,7) def test_floor_division(self): self.assert_equal(2,5//2) self.assert_equal(-3,5//-2) def test_zero_division(self): try: a = 1 / 0 self.fail("Unexpected lack of ZeroDivisionError exception.") except ZeroDivisionError as e: self.assertTrue(True) except: e = sys.exc_info()[0] self.fail("Unexpected exception: " + str(e)) try: a = 1.0 / 0.0 self.fail("Unexpected lack of ZeroDivisionError exception.") except ZeroDivisionError as e: self.assertTrue(True) except: e = sys.exc_info()[0] self.fail("Unexpected exception: " + str(e)) def test_modulo(self): self.assert_equal(0,16%8) self.assert_equal(0,16%8) self.assert_equal(7,16%9) self.assert_equal(1,16%5) self.assert_equal(4,-16%5) self.assert_equal(-4,16%-5) self.assert_equal(-1,-16%-5) self.assert_equal(1.0,16.0%5) self.assert_equal(4,-16%5) self.assert_equal(-4,16%-5) self.assert_equal(-1,-16%-5) def test_exponentiation(self): self.assert_equal(8,2**3) self.assert_equal(8.0,2**3.0) self.assert_equal(8.0,2.0**3) self.assert_equal(8.0,2.0**3.0) self.assert_equal(1,2**0) self.assert_equal(1.0,2.0**0) self.assert_equal(1.0,2**0.0) self.assert_equal(-8,-2**3) self.assert_equal(0.5,2**-1) def test_bit_and(self): self.assert_equal(1,5&3) self.assert_equal(5,5&-1) self.assert_equal(0,5&8) def test_bit_or(self): self.assert_equal(7,5|3) self.assert_equal(-1,5|-1) self.assert_equal(13,5|8) def test_xor(self): self.assert_equal(1,2^3) def test_right_shift(self): self.assert_equal(4,16>>2) def test_left_shift(self): self.assert_equal(16,4<<2) def test_assignment(self): i = 5 self.assert_equal(5,i) x = 5.3 self.assert_equal(5.3,x) s = "abc" self.assert_equal("abc",s) i = 2 i += 1 self.assert_equal(3,i) i = 2.0 i += 1 self.assert_equal(3.0,i) i = 2 i *= 3 self.assert_equal(6,i) i = 2.0 i *= 3 self.assert_equal(6.0,i) i = 6 i /= 3 self.assert_equal(2.0,i) i = 2.0 i /= 3 self.assertAlmostEqual(.666666667,i,7) x = 5 x //= 2 self.assert_equal(2,x) x = -5 x //= 2 self.assert_equal(-3,x) x = 5 x &= 3 self.assert_equal(1,x) x = 5 x |= 3 self.assert_equal(7,x) x = 2 x ^= 3 self.assert_equal(1,x) x = 16 x >>= 2 self.assert_equal(4,x) x = 4 x <<= 2 self.assert_equal(16,x) def test_comparison(self): self.assertTrue(3>2.5) self.assertFalse(3>3.0) self.assertFalse(3>4.0) self.assertFalse(3<2.5) self.assertFalse(3<3.0) self.assertTrue(3<4.0) self.assertFalse(3==2.5) self.assertTrue(3==3.0) self.assertFalse(3==4.0) self.assertTrue(3>=2.5) self.assertTrue(3>=3.0) self.assertFalse(3>=4.0) self.assertFalse(3<=2.5) self.assertTrue(3<=3.0) self.assertTrue(3<=4.0) self.assertTrue(3!=2.5) self.assertFalse(3!=3.0) self.assertTrue(3!=4.0) def test_logical_operators(self): t = True f = False self.assertFalse(f and f) self.assertFalse(f and t) self.assertFalse(t and f) self.assertTrue(t and t) self.assertFalse(f or f) self.assertTrue(f or t) self.assertTrue(t or f) self.assertTrue(t or t) self.assertFalse(not t) self.assertTrue(not f) def test_is(self): dt1 = datetime.datetime.utcnow() dt2 = dt1 dt3 = datetime.datetime.utcnow() self.assertTrue(dt1 is dt2) self.assertFalse(dt1 is dt3) self.assertFalse(dt1 is not dt2) self.assertTrue(dt1 is not dt3) def test_in(self): self.assertTrue("b" in "abc") self.assertFalse("x" in "abc") self.assertFalse("b" not in "abc") self.assertTrue("x" not in "abc") self.assertTrue("b" in {"a":"apple", "b":"banana"}) self.assertFalse("x" in {"a":"apple", "b":"banana"}) self.assertTrue(2 in (1,2,3)) self.assertFalse(22 in (1,2,3)) self.assertTrue(2 in [1,2,3]) self.assertFalse(22 in [1,2,3]) self.assertTrue(2 in set((1,2,3))) self.assertFalse(22 in set((1,2,3))) def test_complex(self): self.assert_equal(2,real(complex(2,3))) self.assert_equal(3,complex(2,3).imag()) self.assert_equal(2.0,complex(2,3).real()) self.assert_equal(3.0,complex(2,3).imag()) def test_class_names(self): i = 42 self.assert_equal('int',i.__class__.__name__) x = 42.1 self.assert_equal('float',x.__class__.__name__) x = True self.assert_equal('bool',x.__class__.__name__) x = complex(1,1) self.assert_equal('complex', x.__class__.__name__) x = [1,2,3] self.assert_equal('list', x.__class__.__name__) x = (1,2,3) self.assert_equal('tuple', x.__class__.__name__) x = range(0,10,1) self.assert_equal('range', x.__class__.__name__) x = {1:11, 2:12, 3:13} self.assert_equal('dict', x.__class__.__name__) x = {1,2,3} self.assert_equal('set', x.__class__.__name__) x = frozenset({1,2,3}) self.assert_equal('frozenset', x.__class__.__name__) def test_str_concat(self): self.assert_equal("abcxyz","abc"+"xyz") @classmethod def run_tester(cls): loader = unittest.TestLoader() suite = unittest.TestSuite() suite.addTests(loader.loadTestsFromTestCase(Tester)) runner = unittest.TextTestRunner(verbosity=3) result = runner.run(suite) if __name__=='__main__': #loader = unittest.TestLoader() #suite = unittest.TestSuite() #suite.addTests(loader.loadTestsFromTestCase(Tester)) #runner = unittest.TextTestRunner(verbosity=3) #result = runner.run(suite) Tester.run_tester()
30.781609
87
0.571073
1,198
8,034
3.643573
0.115192
0.214204
0.28866
0.076976
0.617869
0.476518
0.426346
0.407331
0.384192
0.347995
0
0.079972
0.280931
8,034
260
88
30.9
0.67561
0.033234
0
0.174672
0
0
0.033136
0
0
0
0
0
0.593886
1
0.100437
false
0
0.017467
0
0.122271
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
3
a5fec48dd144a883605bda86b8e32c454edc0d3d
58
py
Python
01. Python-Fundamentals-Python-Intro/04 1-10.py
Bugzey/Softuni-Python-Fundamentals
6f66e143809988398896cfc771cce1db9220df27
[ "MIT" ]
1
2021-01-31T00:14:08.000Z
2021-01-31T00:14:08.000Z
01. Python-Fundamentals-Python-Intro/04 1-10.py
Bugzey/Softuni-Python-Fundamentals
6f66e143809988398896cfc771cce1db9220df27
[ "MIT" ]
null
null
null
01. Python-Fundamentals-Python-Intro/04 1-10.py
Bugzey/Softuni-Python-Fundamentals
6f66e143809988398896cfc771cce1db9220df27
[ "MIT" ]
null
null
null
# Print 1 to 10 for i in range(0, 10): print(i + 1)
14.5
22
0.534483
13
58
2.384615
0.692308
0
0
0
0
0
0
0
0
0
0
0.179487
0.327586
58
3
23
19.333333
0.615385
0.224138
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
3
57282d5e61cabadd4eecb7e4b3b47025fdc72c75
702
py
Python
multidb/tests/views.py
clearcare/django-multidb-router
fb983d560fe228b11ee6727ba76ec1f8bdea0c7a
[ "BSD-3-Clause" ]
null
null
null
multidb/tests/views.py
clearcare/django-multidb-router
fb983d560fe228b11ee6727ba76ec1f8bdea0c7a
[ "BSD-3-Clause" ]
1
2016-06-23T16:18:30.000Z
2016-07-01T20:01:14.000Z
multidb/tests/views.py
clearcare/django-multidb-router
fb983d560fe228b11ee6727ba76ec1f8bdea0c7a
[ "BSD-3-Clause" ]
null
null
null
from django.http import HttpResponse from django.views.generic import View from multidb.pinning import this_thread_is_pinned def _pinned(): """Return a text/plain HttpResponse with content "pinned" or "not pinned". """ result = "pinned" if this_thread_is_pinned() else "not pinned" return HttpResponse(result, content_type="text/plain") def dummy_view(request): return _pinned() class class_based_dummy_view(View): def get(self, request, *args, **kwargs): return _pinned() class object_dummy_view(object): """An example of this kind of view is django.contrib.syndication.Feed.""" def __call__(self, request, *args, **kwargs): return _pinned()
24.206897
78
0.712251
94
702
5.095745
0.468085
0.056367
0.050104
0.075157
0.137787
0.137787
0
0
0
0
0
0
0.179487
702
28
79
25.071429
0.831597
0.198006
0
0.214286
0
0
0.047532
0
0
0
0
0
0
1
0.285714
false
0
0.214286
0.214286
0.928571
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
3
572ef72fe656fe71c18a70d6e4d1a2af14a33133
287
py
Python
admin_tools/dashboard/management/commands/clear_dashboard_preferences.py
artscoop/django-admin-tools
f98189615db5114ef3b136c90983a6bc5590c9af
[ "MIT" ]
6
2016-02-18T10:00:34.000Z
2021-05-27T09:41:35.000Z
venv/lib/python2.7/site-packages/admin_tools/dashboard/management/commands/clear_dashboard_preferences.py
WhySoGeeky/DroidPot
7c3d9e975dae3835e2ccf42c425d65b26466e82a
[ "MIT" ]
6
2018-03-30T10:06:12.000Z
2021-06-10T17:59:44.000Z
admin_tools/dashboard/management/commands/clear_dashboard_preferences.py
artscoop/django-admin-tools
f98189615db5114ef3b136c90983a6bc5590c9af
[ "MIT" ]
null
null
null
from django.core.management import BaseCommand from admin_tools.dashboard.models import DashboardPreferences class Command(BaseCommand): help = """Clears dashboard preferences.""" def handle(self, *args, **options): DashboardPreferences._default_manager.all().delete()
31.888889
61
0.763066
30
287
7.2
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.132404
287
8
62
35.875
0.86747
0
0
0
0
0
0.101045
0
0
0
0
0
0
1
0.166667
false
0
0.333333
0
0.833333
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
3
5738db595e7584f3f1f06f515838f54253b46a86
10,658
py
Python
boto3_type_annotations/boto3_type_annotations/alexaforbusiness/client.py
cowboygneox/boto3_type_annotations
450dce1de4e066b939de7eac2ec560ed1a7ddaa2
[ "MIT" ]
119
2018-12-01T18:20:57.000Z
2022-02-02T10:31:29.000Z
boto3_type_annotations/boto3_type_annotations/alexaforbusiness/client.py
cowboygneox/boto3_type_annotations
450dce1de4e066b939de7eac2ec560ed1a7ddaa2
[ "MIT" ]
15
2018-11-16T00:16:44.000Z
2021-11-13T03:44:18.000Z
boto3_type_annotations/boto3_type_annotations/alexaforbusiness/client.py
cowboygneox/boto3_type_annotations
450dce1de4e066b939de7eac2ec560ed1a7ddaa2
[ "MIT" ]
11
2019-05-06T05:26:51.000Z
2021-09-28T15:27:59.000Z
from typing import Optional from botocore.client import BaseClient from typing import Dict from typing import Union from botocore.paginate import Paginator from botocore.waiter import Waiter from typing import List class Client(BaseClient): def approve_skill(self, SkillId: str) -> Dict: pass def associate_contact_with_address_book(self, ContactArn: str, AddressBookArn: str) -> Dict: pass def associate_device_with_room(self, DeviceArn: str = None, RoomArn: str = None) -> Dict: pass def associate_skill_group_with_room(self, SkillGroupArn: str = None, RoomArn: str = None) -> Dict: pass def associate_skill_with_skill_group(self, SkillId: str, SkillGroupArn: str = None) -> Dict: pass def associate_skill_with_users(self, SkillId: str) -> Dict: pass def can_paginate(self, operation_name: str = None): pass def create_address_book(self, Name: str, Description: str = None, ClientRequestToken: str = None) -> Dict: pass def create_business_report_schedule(self, Format: str, ContentRange: Dict, ScheduleName: str = None, S3BucketName: str = None, S3KeyPrefix: str = None, Recurrence: Dict = None, ClientRequestToken: str = None) -> Dict: pass def create_conference_provider(self, ConferenceProviderName: str, ConferenceProviderType: str, MeetingSetting: Dict, IPDialIn: Dict = None, PSTNDialIn: Dict = None, ClientRequestToken: str = None) -> Dict: pass def create_contact(self, FirstName: str, DisplayName: str = None, LastName: str = None, PhoneNumber: str = None, ClientRequestToken: str = None) -> Dict: pass def create_gateway_group(self, Name: str, ClientRequestToken: str, Description: str = None) -> Dict: pass def create_profile(self, ProfileName: str, Timezone: str, Address: str, DistanceUnit: str, TemperatureUnit: str, WakeWord: str, ClientRequestToken: str = None, SetupModeDisabled: bool = None, MaxVolumeLimit: int = None, PSTNEnabled: bool = None) -> Dict: pass def create_room(self, RoomName: str, Description: str = None, ProfileArn: str = None, ProviderCalendarId: str = None, ClientRequestToken: str = None, Tags: List = None) -> Dict: pass def create_skill_group(self, SkillGroupName: str, Description: str = None, ClientRequestToken: str = None) -> Dict: pass def create_user(self, UserId: str, FirstName: str = None, LastName: str = None, Email: str = None, ClientRequestToken: str = None, Tags: List = None) -> Dict: pass def delete_address_book(self, AddressBookArn: str) -> Dict: pass def delete_business_report_schedule(self, ScheduleArn: str) -> Dict: pass def delete_conference_provider(self, ConferenceProviderArn: str) -> Dict: pass def delete_contact(self, ContactArn: str) -> Dict: pass def delete_device(self, DeviceArn: str) -> Dict: pass def delete_gateway_group(self, GatewayGroupArn: str) -> Dict: pass def delete_profile(self, ProfileArn: str = None) -> Dict: pass def delete_room(self, RoomArn: str = None) -> Dict: pass def delete_room_skill_parameter(self, SkillId: str, ParameterKey: str, RoomArn: str = None) -> Dict: pass def delete_skill_authorization(self, SkillId: str, RoomArn: str = None) -> Dict: pass def delete_skill_group(self, SkillGroupArn: str = None) -> Dict: pass def delete_user(self, EnrollmentId: str, UserArn: str = None) -> Dict: pass def disassociate_contact_from_address_book(self, ContactArn: str, AddressBookArn: str) -> Dict: pass def disassociate_device_from_room(self, DeviceArn: str = None) -> Dict: pass def disassociate_skill_from_skill_group(self, SkillId: str, SkillGroupArn: str = None) -> Dict: pass def disassociate_skill_from_users(self, SkillId: str) -> Dict: pass def disassociate_skill_group_from_room(self, SkillGroupArn: str = None, RoomArn: str = None) -> Dict: pass def forget_smart_home_appliances(self, RoomArn: str) -> Dict: pass def generate_presigned_url(self, ClientMethod: str = None, Params: Dict = None, ExpiresIn: int = None, HttpMethod: str = None): pass def get_address_book(self, AddressBookArn: str) -> Dict: pass def get_conference_preference(self) -> Dict: pass def get_conference_provider(self, ConferenceProviderArn: str) -> Dict: pass def get_contact(self, ContactArn: str) -> Dict: pass def get_device(self, DeviceArn: str = None) -> Dict: pass def get_gateway(self, GatewayArn: str) -> Dict: pass def get_gateway_group(self, GatewayGroupArn: str) -> Dict: pass def get_invitation_configuration(self) -> Dict: pass def get_paginator(self, operation_name: str = None) -> Paginator: pass def get_profile(self, ProfileArn: str = None) -> Dict: pass def get_room(self, RoomArn: str = None) -> Dict: pass def get_room_skill_parameter(self, SkillId: str, ParameterKey: str, RoomArn: str = None) -> Dict: pass def get_skill_group(self, SkillGroupArn: str = None) -> Dict: pass def get_waiter(self, waiter_name: str = None) -> Waiter: pass def list_business_report_schedules(self, NextToken: str = None, MaxResults: int = None) -> Dict: pass def list_conference_providers(self, NextToken: str = None, MaxResults: int = None) -> Dict: pass def list_device_events(self, DeviceArn: str, EventType: str = None, NextToken: str = None, MaxResults: int = None) -> Dict: pass def list_gateway_groups(self, NextToken: str = None, MaxResults: int = None) -> Dict: pass def list_gateways(self, GatewayGroupArn: str = None, NextToken: str = None, MaxResults: int = None) -> Dict: pass def list_skills(self, SkillGroupArn: str = None, EnablementType: str = None, SkillType: str = None, NextToken: str = None, MaxResults: int = None) -> Dict: pass def list_skills_store_categories(self, NextToken: str = None, MaxResults: int = None) -> Dict: pass def list_skills_store_skills_by_category(self, CategoryId: int, NextToken: str = None, MaxResults: int = None) -> Dict: pass def list_smart_home_appliances(self, RoomArn: str, MaxResults: int = None, NextToken: str = None) -> Dict: pass def list_tags(self, Arn: str, NextToken: str = None, MaxResults: int = None) -> Dict: pass def put_conference_preference(self, ConferencePreference: Dict) -> Dict: pass def put_invitation_configuration(self, OrganizationName: str, ContactEmail: str = None, PrivateSkillIds: List = None) -> Dict: pass def put_room_skill_parameter(self, SkillId: str, RoomSkillParameter: Dict, RoomArn: str = None) -> Dict: pass def put_skill_authorization(self, AuthorizationResult: Dict, SkillId: str, RoomArn: str = None) -> Dict: pass def register_avs_device(self, ClientId: str, UserCode: str, ProductId: str, DeviceSerialNumber: str, AmazonId: str) -> Dict: pass def reject_skill(self, SkillId: str) -> Dict: pass def resolve_room(self, UserId: str, SkillId: str) -> Dict: pass def revoke_invitation(self, UserArn: str = None, EnrollmentId: str = None) -> Dict: pass def search_address_books(self, Filters: List = None, SortCriteria: List = None, NextToken: str = None, MaxResults: int = None) -> Dict: pass def search_contacts(self, Filters: List = None, SortCriteria: List = None, NextToken: str = None, MaxResults: int = None) -> Dict: pass def search_devices(self, NextToken: str = None, MaxResults: int = None, Filters: List = None, SortCriteria: List = None) -> Dict: pass def search_profiles(self, NextToken: str = None, MaxResults: int = None, Filters: List = None, SortCriteria: List = None) -> Dict: pass def search_rooms(self, NextToken: str = None, MaxResults: int = None, Filters: List = None, SortCriteria: List = None) -> Dict: pass def search_skill_groups(self, NextToken: str = None, MaxResults: int = None, Filters: List = None, SortCriteria: List = None) -> Dict: pass def search_users(self, NextToken: str = None, MaxResults: int = None, Filters: List = None, SortCriteria: List = None) -> Dict: pass def send_invitation(self, UserArn: str = None) -> Dict: pass def start_device_sync(self, Features: List, RoomArn: str = None, DeviceArn: str = None) -> Dict: pass def start_smart_home_appliance_discovery(self, RoomArn: str) -> Dict: pass def tag_resource(self, Arn: str, Tags: List) -> Dict: pass def untag_resource(self, Arn: str, TagKeys: List) -> Dict: pass def update_address_book(self, AddressBookArn: str, Name: str = None, Description: str = None) -> Dict: pass def update_business_report_schedule(self, ScheduleArn: str, S3BucketName: str = None, S3KeyPrefix: str = None, Format: str = None, ScheduleName: str = None, Recurrence: Dict = None) -> Dict: pass def update_conference_provider(self, ConferenceProviderArn: str, ConferenceProviderType: str, MeetingSetting: Dict, IPDialIn: Dict = None, PSTNDialIn: Dict = None) -> Dict: pass def update_contact(self, ContactArn: str, DisplayName: str = None, FirstName: str = None, LastName: str = None, PhoneNumber: str = None) -> Dict: pass def update_device(self, DeviceArn: str = None, DeviceName: str = None) -> Dict: pass def update_gateway(self, GatewayArn: str, Name: str = None, Description: str = None, SoftwareVersion: str = None) -> Dict: pass def update_gateway_group(self, GatewayGroupArn: str, Name: str = None, Description: str = None) -> Dict: pass def update_profile(self, ProfileArn: str = None, ProfileName: str = None, IsDefault: bool = None, Timezone: str = None, Address: str = None, DistanceUnit: str = None, TemperatureUnit: str = None, WakeWord: str = None, SetupModeDisabled: bool = None, MaxVolumeLimit: int = None, PSTNEnabled: bool = None) -> Dict: pass def update_room(self, RoomArn: str = None, RoomName: str = None, Description: str = None, ProviderCalendarId: str = None, ProfileArn: str = None) -> Dict: pass def update_skill_group(self, SkillGroupArn: str = None, SkillGroupName: str = None, Description: str = None) -> Dict: pass
38.476534
316
0.67189
1,283
10,658
5.445051
0.127825
0.11022
0.132265
0.124535
0.707987
0.605354
0.515746
0.461065
0.369024
0.323218
0
0.000486
0.226966
10,658
276
317
38.615942
0.847433
0
0
0.478495
0
0
0
0
0
0
0
0
0
1
0.478495
false
0.478495
0.037634
0
0.521505
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
3
5752bf31c4ffc93fcd898898821a36057656a4cd
468
py
Python
lecture0/app.py
andresallvs/student50
c00545fa56ddf0c13497d99a8c94383f014c29a8
[ "MIT" ]
null
null
null
lecture0/app.py
andresallvs/student50
c00545fa56ddf0c13497d99a8c94383f014c29a8
[ "MIT" ]
null
null
null
lecture0/app.py
andresallvs/student50
c00545fa56ddf0c13497d99a8c94383f014c29a8
[ "MIT" ]
null
null
null
from flask import Flask from flask import render_template app = Flask(__name__) @app.route('/') def index(): return render_template('index.html') @app.route('/welcome') def sign_in(): return 'SIGN IN' @app.route('/who-are-you') def sign_up(): return 'SIGN UP' @app.route('/<username>') def user_profile(username): return 'User %s PAGE' % username @app.route('/<username>/events') def user_events(username): return 'USER %s EVENTS' % username
18.72
40
0.681624
66
468
4.681818
0.378788
0.12945
0.097087
0.122977
0
0
0
0
0
0
0
0
0.153846
468
24
41
19.5
0.780303
0
0
0
0
0
0.213675
0
0
0
0
0
0
1
0.277778
false
0
0.111111
0.277778
0.666667
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
3
5753a586b950db3559ce0406c1bafefd83515818
726
py
Python
TAKfreeServer/Model/track.py
tma5/FreeTakServer
794eee7cc0086d5d54193b2033fab2396b90b0e2
[ "MIT" ]
null
null
null
TAKfreeServer/Model/track.py
tma5/FreeTakServer
794eee7cc0086d5d54193b2033fab2396b90b0e2
[ "MIT" ]
null
null
null
TAKfreeServer/Model/track.py
tma5/FreeTakServer
794eee7cc0086d5d54193b2033fab2396b90b0e2
[ "MIT" ]
null
null
null
####################################################### # # track.py # Python implementation of the Class track # Generated by Enterprise Architect # Created on: 11-Feb-2020 11:08:09 AM # Original author: Corvo # ####################################################### class track: # default constructor def __init__(self): speed = "0.00000000" # speed getter def getspeed(self): return self.speed # speed setter def setspeed(self, speed=0): self.speed=speed __course = "0.00000000" # course getter def getcourse(self): return self.course # course setter def setcourse(self, course=0): self.course=course
22.6875
55
0.513774
73
726
5.027397
0.520548
0.098093
0.054496
0
0
0
0
0
0
0
0
0.059701
0.261708
726
32
56
22.6875
0.625
0.348485
0
0
1
0
0.057307
0
0
0
0
0
0
1
0.363636
false
0
0
0.181818
0.818182
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
3
93a2c07d5d48190544db61e64ab6852762aa702f
146
py
Python
src/litcorpt/constants.py
igormorgado/litcorpt
669c1852d42231f563fe0cdcf315f4fd66cf719b
[ "MIT" ]
null
null
null
src/litcorpt/constants.py
igormorgado/litcorpt
669c1852d42231f563fe0cdcf315f4fd66cf719b
[ "MIT" ]
null
null
null
src/litcorpt/constants.py
igormorgado/litcorpt
669c1852d42231f563fe0cdcf315f4fd66cf719b
[ "MIT" ]
null
null
null
"""Define library wise constants""" __version__: str = '0.0.7' __author__: str = 'Igor Morgado' __author_email__: str = 'morgado.igor@gmail.com'
24.333333
48
0.719178
20
146
4.6
0.7
0
0
0
0
0
0
0
0
0
0
0.023438
0.123288
146
5
49
29.2
0.695313
0.19863
0
0
0
0
0.351351
0.198198
0
0
0
0
0
1
0
true
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
3
93c87e6d5c2905f7d3c2000bd18dd4729b074f5d
5,507
py
Python
pysnmp-with-texts/CISCOTRAP-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
8
2019-05-09T17:04:00.000Z
2021-06-09T06:50:51.000Z
pysnmp-with-texts/CISCOTRAP-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
4
2019-05-31T16:42:59.000Z
2020-01-31T21:57:17.000Z
pysnmp-with-texts/CISCOTRAP-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module CISCOTRAP-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCOTRAP-MIB # Produced by pysmi-0.3.4 at Wed May 1 12:24:33 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # OctetString, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") SingleValueConstraint, ValueSizeConstraint, ConstraintsUnion, ValueRangeConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ValueSizeConstraint", "ConstraintsUnion", "ValueRangeConstraint", "ConstraintsIntersection") cisco, = mibBuilder.importSymbols("CISCO-SMI", "cisco") ifType, ifIndex, ifDescr = mibBuilder.importSymbols("IF-MIB", "ifType", "ifIndex", "ifDescr") locIfReason, = mibBuilder.importSymbols("OLD-CISCO-INTERFACES-MIB", "locIfReason") authAddr, whyReload = mibBuilder.importSymbols("OLD-CISCO-SYSTEM-MIB", "authAddr", "whyReload") loctcpConnInBytes, loctcpConnOutBytes, loctcpConnElapsed = mibBuilder.importSymbols("OLD-CISCO-TCP-MIB", "loctcpConnInBytes", "loctcpConnOutBytes", "loctcpConnElapsed") tsLineUser, tslineSesType = mibBuilder.importSymbols("OLD-CISCO-TS-MIB", "tsLineUser", "tslineSesType") egpNeighAddr, = mibBuilder.importSymbols("RFC1213-MIB", "egpNeighAddr") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") sysUpTime, snmp = mibBuilder.importSymbols("SNMPv2-MIB", "sysUpTime", "snmp") ObjectIdentity, iso, Gauge32, ModuleIdentity, Counter64, MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn, NotificationType, IpAddress, Unsigned32, Integer32, Bits, NotificationType, Counter32, TimeTicks = mibBuilder.importSymbols("SNMPv2-SMI", "ObjectIdentity", "iso", "Gauge32", "ModuleIdentity", "Counter64", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "NotificationType", "IpAddress", "Unsigned32", "Integer32", "Bits", "NotificationType", "Counter32", "TimeTicks") TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString") tcpConnState, = mibBuilder.importSymbols("TCP-MIB", "tcpConnState") coldStart = NotificationType((1, 3, 6, 1, 2, 1, 11) + (0,0)).setObjects(("SNMPv2-MIB", "sysUpTime"), ("OLD-CISCO-SYSTEM-MIB", "whyReload")) if mibBuilder.loadTexts: coldStart.setDescription("A coldStart trap signifies that the sending protocol entity is reinitializing itself such that the agent's configuration or the protocol entity implementation may be altered.") linkDown = NotificationType((1, 3, 6, 1, 2, 1, 11) + (0,2)).setObjects(("IF-MIB", "ifIndex"), ("IF-MIB", "ifDescr"), ("IF-MIB", "ifType"), ("OLD-CISCO-INTERFACES-MIB", "locIfReason")) if mibBuilder.loadTexts: linkDown.setDescription("A linkDown trap signifies that the sending protocol entity recognizes a failure in one of the communication links represented in the agent's configuration.") linkUp = NotificationType((1, 3, 6, 1, 2, 1, 11) + (0,3)).setObjects(("IF-MIB", "ifIndex"), ("IF-MIB", "ifDescr"), ("IF-MIB", "ifType"), ("OLD-CISCO-INTERFACES-MIB", "locIfReason")) if mibBuilder.loadTexts: linkUp.setDescription("A linkUp trap signifies that the sending protocol entity recognizes that one of the communication links represented in the agent's configuration has come up.") authenticationFailure = NotificationType((1, 3, 6, 1, 2, 1, 11) + (0,4)).setObjects(("OLD-CISCO-SYSTEM-MIB", "authAddr")) if mibBuilder.loadTexts: authenticationFailure.setDescription('An authenticationFailure trap signifies that the sending protocol entity is the addressee of a protocol message that is not properly authenticated. While implementations of the SNMP must be capable of generating this trap, they must also be capable of suppressing the emission of such traps via an implementation- specific mechanism.') egpNeighborLoss = NotificationType((1, 3, 6, 1, 2, 1, 11) + (0,5)).setObjects(("RFC1213-MIB", "egpNeighAddr")) if mibBuilder.loadTexts: egpNeighborLoss.setDescription('An egpNeighborLoss trap signifies that an EGP neighbor for whom the sending protocol entity was an EGP peer has been marked down and the peer relationship no longer obtains.') reload = NotificationType((1, 3, 6, 1, 4, 1, 9) + (0,0)).setObjects(("SNMPv2-MIB", "sysUpTime"), ("OLD-CISCO-SYSTEM-MIB", "whyReload")) if mibBuilder.loadTexts: reload.setDescription("A reload trap signifies that the sending protocol entity is reinitializing itself such that the agent's configuration or the protocol entity implementation may be altered.") tcpConnectionClose = NotificationType((1, 3, 6, 1, 4, 1, 9) + (0,1)).setObjects(("OLD-CISCO-TS-MIB", "tslineSesType"), ("TCP-MIB", "tcpConnState"), ("OLD-CISCO-TCP-MIB", "loctcpConnElapsed"), ("OLD-CISCO-TCP-MIB", "loctcpConnInBytes"), ("OLD-CISCO-TCP-MIB", "loctcpConnOutBytes"), ("OLD-CISCO-TS-MIB", "tsLineUser")) if mibBuilder.loadTexts: tcpConnectionClose.setDescription('A tty trap signifies that a TCP connection, previously established with the sending protocol entity for the purposes of a tty session, has been terminated.') mibBuilder.exportSymbols("CISCOTRAP-MIB", linkDown=linkDown, linkUp=linkUp, tcpConnectionClose=tcpConnectionClose, reload=reload, authenticationFailure=authenticationFailure, egpNeighborLoss=egpNeighborLoss, coldStart=coldStart)
144.921053
515
0.77465
646
5,507
6.603715
0.303406
0.080872
0.029536
0.031177
0.426629
0.335677
0.335677
0.335677
0.301688
0.261603
0
0.029371
0.091157
5,507
37
516
148.837838
0.822977
0.058108
0
0
0
0.233333
0.490923
0.026458
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
93cf411545083eb185efd8e557924604a7676e02
322
py
Python
rubin_jupyter_utils/hub/authenticator/__init__.py
lsst-sqre/rubin-jupyter-hub
162abe9422332aa60ef089af2862b7a0b0417fa1
[ "MIT" ]
null
null
null
rubin_jupyter_utils/hub/authenticator/__init__.py
lsst-sqre/rubin-jupyter-hub
162abe9422332aa60ef089af2862b7a0b0417fa1
[ "MIT" ]
3
2020-09-22T21:13:13.000Z
2020-09-26T01:11:48.000Z
rubin_jupyter_utils/hub/authenticator/__init__.py
lsst-sqre/rubin-jupyter-hub
162abe9422332aa60ef089af2862b7a0b0417fa1
[ "MIT" ]
null
null
null
"""Rubin Authentication classes. """ from .rubinauthenticator import RubinAuthenticator from .rubinwebtokenauthenticator import RubinWebTokenAuthenticator from .rubinwebtokenloginhandler import RubinWebTokenLoginHandler __all__ = [ RubinAuthenticator, RubinWebTokenAuthenticator, RubinWebTokenLoginHandler, ]
26.833333
66
0.838509
19
322
14
0.473684
0
0
0
0
0
0
0
0
0
0
0
0.111801
322
11
67
29.272727
0.93007
0.090062
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.375
0
0.375
0
1
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
93d61ab4b38d9c03f0f24c7b9065badc3c50fa0b
1,706
py
Python
datacommons/__init__.py
clincoln8/api-python
616201993131a5d611a040a9b61a7dda8fca30ff
[ "Apache-2.0" ]
31
2019-09-04T08:33:25.000Z
2022-03-19T11:50:23.000Z
datacommons/__init__.py
clincoln8/api-python
616201993131a5d611a040a9b61a7dda8fca30ff
[ "Apache-2.0" ]
49
2019-08-08T22:17:09.000Z
2022-03-10T17:29:16.000Z
datacommons/__init__.py
clincoln8/api-python
616201993131a5d611a040a9b61a7dda8fca30ff
[ "Apache-2.0" ]
19
2020-01-29T22:50:22.000Z
2022-03-10T02:25:33.000Z
# Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ################################## IMPORTANT ################################# # All user-facing functions in this package must be symlinked to the # # datacommons_pandas pkg. This is so that users do not need to import both # # libraries for pd support. Please keep the below imports in sync with the # # __init__.py in the datacommons_pandas/ dir, and add a symlink when # # creating a new file. # # TODO: https://github.com/datacommonsorg/api-python/issues/149 # ############################################################################## # Data Commons SPARQL query support from datacommons.query import query # Data Commons Python API from datacommons.core import get_property_labels, get_property_values, get_triples from datacommons.places import get_places_in, get_related_places, get_stats from datacommons.populations import get_populations, get_observations, get_pop_obs, get_place_obs from datacommons.stat_vars import get_stat_value, get_stat_series, get_stat_all # Other utilities from datacommons.utils import set_api_key
48.742857
97
0.685815
230
1,706
4.952174
0.586957
0.052678
0.022827
0.028095
0
0
0
0
0
0
0
0.007857
0.179367
1,706
34
98
50.176471
0.805714
0.638335
0
0
0
0
0
0
0
0
0
0.029412
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
0
0
0
0
0
0
0
null
0
0
1
0
0
0
1
0
1
0
0
0
0
3
93d70f1f1624e21da1725177d07885c1d42c7a51
186
py
Python
web-maxiv-tangogql/tangogql/schema/base.py
snehalpersistent/snehalvgithub
c3a1bdca73c15e984d91eb5c54acc8a32f916e83
[ "BSD-3-Clause" ]
null
null
null
web-maxiv-tangogql/tangogql/schema/base.py
snehalpersistent/snehalvgithub
c3a1bdca73c15e984d91eb5c54acc8a32f916e83
[ "BSD-3-Clause" ]
null
null
null
web-maxiv-tangogql/tangogql/schema/base.py
snehalpersistent/snehalvgithub
c3a1bdca73c15e984d91eb5c54acc8a32f916e83
[ "BSD-3-Clause" ]
null
null
null
"""Module containing the Base classes for the Tango Schema.""" from tangogql.tangodb import CachedDatabase, DeviceProxyCache db = CachedDatabase(ttl=10) proxies = DeviceProxyCache()
20.666667
62
0.784946
21
186
6.952381
0.857143
0
0
0
0
0
0
0
0
0
0
0.012346
0.129032
186
8
63
23.25
0.888889
0.301075
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
93e14c910fe3d63215790484cdb9b4c5d97f5c4f
582
gyp
Python
extensions/api/vivaldi_api_registration.gyp
wedataintelligence/vivaldi-source
22a46f2c969f6a0b7ca239a05575d1ea2738768c
[ "BSD-3-Clause" ]
null
null
null
extensions/api/vivaldi_api_registration.gyp
wedataintelligence/vivaldi-source
22a46f2c969f6a0b7ca239a05575d1ea2738768c
[ "BSD-3-Clause" ]
null
null
null
extensions/api/vivaldi_api_registration.gyp
wedataintelligence/vivaldi-source
22a46f2c969f6a0b7ca239a05575d1ea2738768c
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2015 Vivaldi Technologies AS. All rights reserved { 'targets': [ { 'target_name': 'vivaldi_api_registration', 'type': 'static_library', 'msvs_disabled_warnings': [ 4267 ], 'includes': [ '../../chromium/build/json_schema_bundle_registration_compile.gypi', '../schema/vivaldi_schemas.gypi', ], 'dependencies': [ '../schema/vivaldi_api.gyp:vivaldi_chrome_api', # Different APIs include headers from these targets. "<(DEPTH)/content/content.gyp:content_browser", ], }, ], }
26.454545
76
0.613402
56
582
6.107143
0.75
0.05848
0
0
0
0
0
0
0
0
0
0.018059
0.238832
582
21
77
27.714286
0.75395
0.195876
0
0.176471
0
0
0.612903
0.492473
0
0
0
0
0
1
0
true
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
null
0
0
0
0
0
0
1
0
0
0
0
0
0
3
93ea51337995de1213fca3b2cf2203dbf966d216
987
py
Python
price_monitor/api/views/PriceListView.py
gomberg5264/django-amazon-price-monitor
c45d9f48a5bf429bfe696fcd9fc3f41f388bac2d
[ "MIT" ]
150
2015-03-17T19:27:46.000Z
2022-02-04T10:03:26.000Z
price_monitor/api/views/PriceListView.py
rozifus/django-amazon-price-monitor
c45d9f48a5bf429bfe696fcd9fc3f41f388bac2d
[ "MIT" ]
81
2015-01-28T16:42:49.000Z
2018-10-07T11:48:19.000Z
price_monitor/api/views/PriceListView.py
rozifus/django-amazon-price-monitor
c45d9f48a5bf429bfe696fcd9fc3f41f388bac2d
[ "MIT" ]
41
2015-02-10T20:34:14.000Z
2021-11-01T06:51:26.000Z
"""View for listing prices""" from ..renderers.PriceChartPNGRenderer import PriceChartPNGRenderer from ..serializers.PriceSerializer import PriceSerializer from ...models.Price import Price from datetime import timedelta from django.utils import timezone from rest_framework.generics import ListAPIView class PriceListView(ListAPIView): model = Price serializer_class = PriceSerializer renderer_classes = ListAPIView.renderer_classes + [PriceChartPNGRenderer] def get_queryset(self): """ Returns the elements matching the product's ASIN within the last 7 days. :return: QuerySet """ # FIXME this has room fro improvement, we could only show the values that changes within a wider time range - but currently I don't know how to do that return self.model.objects.filter( product__asin=self.kwargs.get('asin'), date_seen__gte=timezone.now() - timedelta(days=7), ).order_by('-date_seen')
34.034483
159
0.724417
119
987
5.907563
0.655462
0.042674
0
0
0
0
0
0
0
0
0
0.002538
0.201621
987
28
160
35.25
0.889594
0.269504
0
0
0
0
0.020468
0
0
0
0
0.035714
0
1
0.066667
false
0
0.4
0
0.8
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
0
0
0
1
0
1
0
0
3
f51ed9e8e5d2049d49a4383c820a28b22c7b8ab3
426
py
Python
Day10/Vertical_Concatenation_of_Matrix.py
tushartrip1010/100_days_code_py
ee74b429e98cdd8bdf8661cf987da67c9fee5a3e
[ "Apache-2.0" ]
null
null
null
Day10/Vertical_Concatenation_of_Matrix.py
tushartrip1010/100_days_code_py
ee74b429e98cdd8bdf8661cf987da67c9fee5a3e
[ "Apache-2.0" ]
null
null
null
Day10/Vertical_Concatenation_of_Matrix.py
tushartrip1010/100_days_code_py
ee74b429e98cdd8bdf8661cf987da67c9fee5a3e
[ "Apache-2.0" ]
null
null
null
def Vertical_Concatenation(Test_list): Result = [] n = 0 while n != len(Test_list): temp = '' for indexes in Test_list: try: temp += indexes[n] except IndexError: pass n += 1 Result.append(temp) return Result Test_list = [["Gfg", "good"], ["is", "for"], ["Best"]] print(Vertical_Concatenation(Test_list))
25.058824
55
0.495305
45
426
4.533333
0.577778
0.196078
0.245098
0.284314
0
0
0
0
0
0
0
0.007547
0.377934
426
17
56
25.058824
0.762264
0
0
0
0
0
0.038929
0
0
0
0
0
0
1
0.066667
false
0.066667
0
0
0.133333
0.066667
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
3
f53d7eb80e8b46cc415ea73d0c744f485db55285
4,082
py
Python
testcenter/api/stc_rest.py
shmir/PyTestCenter
350ec404b543d33ece6e7b364ad972a8103636a8
[ "Apache-2.0" ]
7
2017-09-04T23:25:02.000Z
2021-09-22T23:22:41.000Z
testcenter/api/stc_rest.py
shmir/PyTestCenter
350ec404b543d33ece6e7b364ad972a8103636a8
[ "Apache-2.0" ]
9
2018-01-23T08:19:45.000Z
2021-04-26T10:28:15.000Z
testcenter/api/stc_rest.py
shmir/PyTestCenter
350ec404b543d33ece6e7b364ad972a8103636a8
[ "Apache-2.0" ]
6
2018-05-10T06:33:07.000Z
2021-09-22T23:22:46.000Z
""" :author: yoram@ignissoft.com """ import getpass from random import randint from stcrestclient import stchttp class StcRestWrapper: """ STC Python API over REST Server. """ def __init__(self, logger, server, port=80, user_name=getpass.getuser(), session_name=None): """Init STC REST client. :param server: STC REST API server address. :param port: STC REST API HTTP port. :param user_name: user name, part of session ID. :param session_name: session, name part of session ID. Add logger to log STC REST commands only. This creates a clean REST script that can be used later for debug. """ debug_print = True if logger.level == 10 else False self.ls = stchttp.StcHttp(server, port, debug_print=debug_print) if session_name: self.session_id = self.ls.join_session(session_name) else: session_name = "session" + str(randint(0, 99)) self.session_id = self.ls.new_session(user_name, session_name, kill_existing=True) def disconnect(self, terminate): self.ls.end_session(terminate) def create(self, obj_type, parent, **attributes): """Creates one or more Spirent TestCenter Automation objects. :param obj_type: object type. :param parent: object parent - object will be created under this parent. :param attributes: additional attributes. :return: STC object reference. """ return self.ls.create(obj_type, under=parent.ref, **attributes) def delete(self, obj_ref): """Delete Spirent TestCenter Automation object. :param obj_ref: object handle to delete. """ self.ls.delete(obj_ref) def perform(self, command, **arguments): """Execute a command. :param command: requested command. :param arguments: additional arguments. """ if command in ["CSTestSessionConnect", "CSTestSessionDisconnect"]: return self.command_rc = self.ls.perform(command, **arguments) return self.command_rc def get(self, obj_ref, attribute=""): """Returns the value(s) of one or more object attributes or a set of object handles. :param obj_ref: requested object reference. :param attribute: requested attribute. If empty - return values of all object attributes. :return: requested value(s) as returned by get command. """ output = self.ls.get(obj_ref, attribute) return output if type(output) is str else " ".join(output) def getList(self, obj_ref, attribute): """Returns the value of the object attributes or a python list. :param obj_ref: requested object reference. :param attribute: requested attribute. :return: requested value as returned by get command. """ return self.ls.get(obj_ref, attribute).split() def config(self, obj_ref, **attributes): """Set or modifies one or more object attributes, or a relation. :param obj_ref: requested object reference. :param attributes: dictionary of {attributes: values} to configure. """ self.ls.config(obj_ref, attributes) def subscribe(self, **arguments): """Subscribe to statistics view. :param arguments: subscribe command arguments. must arguments: parent, resultParent, configType, resultType + additional arguments. :return: ResultDataSet handler """ return self.perform("ResultsSubscribe", **arguments)["ReturnedDataSet"] def unsubscribe(self, result_data_set): """Unsubscribe from statistics view. :param result_data_set: ResultDataSet handler """ self.perform("ResultDataSetUnsubscribe", ResultDataSet=result_data_set) def apply(self): """ Sends a test configuration to the Spirent TestCenter chassis. """ self.ls.apply() def wait(self): """ Wait until sequencer is finished. """ self.ls.wait_until_complete()
35.189655
97
0.650416
487
4,082
5.355236
0.312115
0.027607
0.015337
0.021856
0.178681
0.132669
0.114264
0.05138
0.05138
0.05138
0
0.002306
0.256492
4,082
115
98
35.495652
0.857002
0.447085
0
0
0
0
0.055878
0.024776
0
0
0
0
0
1
0.315789
false
0.052632
0.078947
0
0.578947
0.052632
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
3
f552854097571f87165326b009fadac2fc6fec4a
25
py
Python
eds/openmtc-gevent/server/openmtc-server/src/openmtc_server/methoddomain/filtercriteria/__init__.py
piyush82/elastest-device-emulator-service
b4d6b393d6042c54a7b3dfb5f58cad5efd00f0e7
[ "Apache-2.0" ]
null
null
null
eds/openmtc-gevent/server/openmtc-server/src/openmtc_server/methoddomain/filtercriteria/__init__.py
piyush82/elastest-device-emulator-service
b4d6b393d6042c54a7b3dfb5f58cad5efd00f0e7
[ "Apache-2.0" ]
null
null
null
eds/openmtc-gevent/server/openmtc-server/src/openmtc_server/methoddomain/filtercriteria/__init__.py
piyush82/elastest-device-emulator-service
b4d6b393d6042c54a7b3dfb5f58cad5efd00f0e7
[ "Apache-2.0" ]
null
null
null
__author__ = 'ren-local'
12.5
24
0.72
3
25
4.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.12
25
1
25
25
0.636364
0
0
0
0
0
0.36
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
f55bd7c74f09a92acd83b13f2c5e03c6b19bfad5
699
py
Python
sdk/boost_1_30_0/libs/python/pyste/tests/example_virtual.py
acidicMercury8/xray-1.0
65e85c0e31e82d612c793d980dc4b73fa186c76c
[ "Linux-OpenIB" ]
2
2020-01-30T12:51:49.000Z
2020-08-31T08:36:49.000Z
sdk/boost_1_30_0/libs/python/pyste/tests/example_virtual.py
acidicMercury8/xray-1.0
65e85c0e31e82d612c793d980dc4b73fa186c76c
[ "Linux-OpenIB" ]
null
null
null
sdk/boost_1_30_0/libs/python/pyste/tests/example_virtual.py
acidicMercury8/xray-1.0
65e85c0e31e82d612c793d980dc4b73fa186c76c
[ "Linux-OpenIB" ]
null
null
null
import unittest from virtual import * class VirtualTest(unittest.TestCase): def testIt(self): class D(C): def f_abs(self): return 3 class E(C): def f(self): return 10 def name(self): return 'E' d = D() e = E() self.assertEqual(d.f(), 3) self.assertEqual(call_f(d), 3) self.assertEqual(e.f(), 10) self.assertEqual(call_f(e), 10) self.assertEqual(d.get_name(), 'C') self.assertEqual(e.get_name(), 'E') if __name__ == '__main__': unittest.main()
21.84375
44
0.444921
77
699
3.87013
0.311688
0.302013
0.033557
0.134228
0
0
0
0
0
0
0
0.022843
0.436338
699
31
45
22.548387
0.733503
0
0
0
0
0
0.016467
0
0
0
0
0
0.272727
1
0.181818
false
0
0.090909
0.136364
0.545455
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
1
0
0
3
f560c663bdd27b2db986bb4a7911f455744353c1
195
py
Python
iso8583_dlib/segments/mti.py
eocode/ISO8583-Dlib
c757883812206504d8ad0a63077562fdaffcb118
[ "MIT" ]
null
null
null
iso8583_dlib/segments/mti.py
eocode/ISO8583-Dlib
c757883812206504d8ad0a63077562fdaffcb118
[ "MIT" ]
null
null
null
iso8583_dlib/segments/mti.py
eocode/ISO8583-Dlib
c757883812206504d8ad0a63077562fdaffcb118
[ "MIT" ]
null
null
null
"""Third segment""" from .data.mti import mti_types class MTI: start_position = 12 end_position = 16 @staticmethod def get_type(select): return mti_types.types[select]
16.25
38
0.671795
26
195
4.846154
0.730769
0.126984
0
0
0
0
0
0
0
0
0
0.026846
0.235897
195
11
39
17.727273
0.818792
0.066667
0
0
0
0
0
0
0
0
0
0
0
1
0.142857
false
0
0.142857
0.142857
0.857143
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
1
0
0
3
f57270da6b2e7d20c32719e63d168e86e8f466ff
188
py
Python
scripts/display_pickled_fig.py
caileighf/MCC_DAQ
9e72dcf8f2be3e1a436b1a7512941a036f583d7e
[ "MIT" ]
null
null
null
scripts/display_pickled_fig.py
caileighf/MCC_DAQ
9e72dcf8f2be3e1a436b1a7512941a036f583d7e
[ "MIT" ]
null
null
null
scripts/display_pickled_fig.py
caileighf/MCC_DAQ
9e72dcf8f2be3e1a436b1a7512941a036f583d7e
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import pickle as pl import numpy as np import sys file = sys.argv[1] # Load figure from disk and display fig_handle = pl.load(open(file, 'rb')) plt.show()
18.8
38
0.744681
34
188
4.088235
0.705882
0
0
0
0
0
0
0
0
0
0
0.006329
0.159574
188
9
39
20.888889
0.873418
0.175532
0
0
0
0
0.013072
0
0
0
0
0
0
1
0
false
0
0.571429
0
0.571429
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
3
f57d6b18f917dfd282180e3a35cee69e9535a14c
1,216
py
Python
other/simpleGeocodingInformation.py
slowy07/geoPy
e7b6665700b8dad0c31612cfdc6915d02694a8d3
[ "MIT" ]
null
null
null
other/simpleGeocodingInformation.py
slowy07/geoPy
e7b6665700b8dad0c31612cfdc6915d02694a8d3
[ "MIT" ]
null
null
null
other/simpleGeocodingInformation.py
slowy07/geoPy
e7b6665700b8dad0c31612cfdc6915d02694a8d3
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """slowy07Geocoding.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1F17dzeBdF6I5UQWRdv4HHfiRU0MEMzmt """ !apt install gdal-bin python-gdal python3-gdal --quiet !apt install python3-rtree --quiet !pip install git+git://github.com/geopandas/geopandas.git --quiet !pip install descartes --quiet !pip install geopy !pip install plotly_express !pip install ipython-autotime import pandas as pd import geopandas as gpd import geopy from geopy.geocoders import Nominatim from geopy.extra.rate_limiter import RateLimiter import matplotlib.pyplot as plt import folium from folium.plugins import FastMarkerCluster locator = Nominatim(user_agent="myGeocoder") location = locator.geocode("Monas, Jakarta, Indonesia") print(location.address) print("Latitude = {}, Longitude = {}".format(location.latitude, location.longitude)) from google.colab import files data_to_load = files.upload() df = pd.read_csv("dataOOF.csv") df.head() df['ADDRESS'] = df['Langsa'].astype(str) + ',' + \ df['Langsa.1'] + ',' + \ df['Langsa.2'] + ',' + \ df['Langsa.3'] + ',' + 'Langsa' df.head()
27.636364
84
0.713816
152
1,216
5.671053
0.572368
0.058005
0.052204
0
0
0
0
0
0
0
0
0.014563
0.152961
1,216
44
85
27.636364
0.82233
0.01727
0
0.071429
1
0
0.120079
0
0
0
0
0
0
0
null
null
0
0.321429
null
null
0.071429
0
0
0
null
0
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
1
0
0
0
1
0
0
0
0
3
f57dccfd26558c366c6b6614572c7176f6f427d3
271
py
Python
templatetags/profanity.py
cbedroid/django-profanity-filter
6a9ab5770c08bb9ad49b6da597ccf88d34291894
[ "BSD-3-Clause" ]
8
2019-02-21T21:40:31.000Z
2021-04-12T19:19:17.000Z
templatetags/profanity.py
cbedroid/django-profanity-filter
6a9ab5770c08bb9ad49b6da597ccf88d34291894
[ "BSD-3-Clause" ]
null
null
null
templatetags/profanity.py
cbedroid/django-profanity-filter
6a9ab5770c08bb9ad49b6da597ccf88d34291894
[ "BSD-3-Clause" ]
7
2018-08-28T20:44:23.000Z
2021-09-06T09:49:17.000Z
from django import template from profanity.extras import ProfanityFilter register = template.Library() pf = ProfanityFilter() @register.filter() def censor(value): return pf.censor(value) @register.filter() def is_profane(value): return pf.is_profane(value)
16.9375
44
0.760148
34
271
6
0.5
0.22549
0.166667
0
0
0
0
0
0
0
0
0
0.136531
271
15
45
18.066667
0.871795
0
0
0.2
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0.2
0.2
0.6
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
1
0
0
3
f59c8ba54370966b7de7f415bf7e0c09746b7546
590
py
Python
docx/parts/header.py
jmidyet/python-docx
957d9877b9935f9ee44c1c7678bbb4cedf67d335
[ "MIT" ]
null
null
null
docx/parts/header.py
jmidyet/python-docx
957d9877b9935f9ee44c1c7678bbb4cedf67d335
[ "MIT" ]
null
null
null
docx/parts/header.py
jmidyet/python-docx
957d9877b9935f9ee44c1c7678bbb4cedf67d335
[ "MIT" ]
1
2019-07-14T01:14:32.000Z
2019-07-14T01:14:32.000Z
# encoding: utf-8 """ |HeaderPart| and closely related objects """ from __future__ import ( absolute_import, division, print_function, unicode_literals ) from ..header import HeaderFooterBody from ..opc.part import XmlPart class HeaderPart(XmlPart): @property def body(self): """ A |HeaderFooterBody| proxy object for the `w:hdr` element in this part, """ # TODO write CT_HeaderFooter # element = CT_HeaderFooter(self.element) # how to access parent here? is it necessary? return HeaderFooterBody(self.element, None)
23.6
79
0.676271
68
590
5.735294
0.75
0.071795
0
0
0
0
0
0
0
0
0
0.002212
0.233898
590
24
80
24.583333
0.860619
0.40678
0
0
0
0
0
0
0
0
0
0.041667
0
1
0.111111
false
0
0.444444
0
0.777778
0.111111
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
0
0
0
1
0
1
0
0
3
f5a1d978b33005bf068ea2f03a763d860289096f
709
py
Python
tests/controllers/dummy.py
MaJyxSoftware/qab_core
44892f58dddb3702f86c370cf73ad7ec22decbb4
[ "MIT" ]
3
2021-01-20T14:54:12.000Z
2021-03-13T17:55:18.000Z
tests/controllers/dummy.py
MaJyxSoftware/qab_core
44892f58dddb3702f86c370cf73ad7ec22decbb4
[ "MIT" ]
null
null
null
tests/controllers/dummy.py
MaJyxSoftware/qab_core
44892f58dddb3702f86c370cf73ad7ec22decbb4
[ "MIT" ]
null
null
null
from qab_core.controller import Controller from bottle import request from decorator import decorator @decorator def test_decorator(func, *args, **kwargs): return func(*args, **kwargs) class DummyController(Controller): def index(self): return self.render("Mon message", data=self.app.config) def hello(self, name, lastname=""): if lastname: lastname = f" {lastname}" return f"Hello {name}{lastname}" def post(self): return self.render('This request was a post', dict(request.POST)) def multi(self, word1="", word2=""): return f"Say {word1} {word2}" @test_decorator def deco(self): return "decorated"
24.448276
73
0.637518
86
709
5.22093
0.465116
0.066815
0.062361
0.089087
0
0
0
0
0
0
0
0.007435
0.241185
709
29
74
24.448276
0.827138
0
0
0
0
0
0.133803
0
0
0
0
0
0
1
0.3
false
0
0.15
0.25
0.8
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
3
f5a3c926acbc8ae68134c696bbed7354c43c69fe
1,108
py
Python
underworld/swarm/__init__.py
longgangfan/underworld2
5c8acc17fa4d97e86a62b13b8bfb2af6e81a8ee4
[ "CC-BY-4.0" ]
116
2015-09-28T10:30:55.000Z
2022-03-22T04:12:38.000Z
underworld/swarm/__init__.py
longgangfan/underworld2
5c8acc17fa4d97e86a62b13b8bfb2af6e81a8ee4
[ "CC-BY-4.0" ]
561
2015-09-29T06:05:50.000Z
2022-03-22T23:37:29.000Z
underworld/swarm/__init__.py
longgangfan/underworld2
5c8acc17fa4d97e86a62b13b8bfb2af6e81a8ee4
[ "CC-BY-4.0" ]
68
2015-12-14T21:57:46.000Z
2021-08-25T04:54:26.000Z
##~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~## ## ## ## This file forms part of the Underworld geophysics modelling application. ## ## ## ## For full license and copyright information, please refer to the LICENSE.md file ## ## located at the project root, or contact the authors. ## ## ## ##~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~## """ This module contains routines relating to swarm type objects. """ from ._swarm import Swarm from . import _weights from ._integration_swarm import IntegrationSwarm, VoronoiIntegrationSwarm, GaussIntegrationSwarm, GaussBorderIntegrationSwarm from ._swarmabstract import SwarmAbstract from ._swarmvariable import SwarmVariable from ._population_control import PopulationControl from . import layouts
52.761905
125
0.462996
72
1,108
7.013889
0.666667
0.043564
0
0
0
0
0
0
0
0
0
0
0.338448
1,108
20
126
55.4
0.68895
0.581227
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
3
f5a600eec9f883487072a2de58dc7a1577aa01dc
590
py
Python
seguimiento/admin.py
franzj/SeguimientoSoftware
1a4ccfc15260a66db5437a5600e6a60777a91555
[ "MIT" ]
null
null
null
seguimiento/admin.py
franzj/SeguimientoSoftware
1a4ccfc15260a66db5437a5600e6a60777a91555
[ "MIT" ]
null
null
null
seguimiento/admin.py
franzj/SeguimientoSoftware
1a4ccfc15260a66db5437a5600e6a60777a91555
[ "MIT" ]
null
null
null
from django.contrib import admin from django.utils.translation import ugettext, ugettext_lazy as _ from .models import Proyecto @admin.register(Proyecto) class ProyectoAdmin(admin.ModelAdmin): fieldsets = ( (None, {'fields': ('nombre',)}), ('Información Proyecto', {'fields': ('descripcion', 'terminado',)}), (_('Important dates'), {'fields': ('fecha_creacion', 'fecha_finalizacion')}), ) list_display = ('nombre', 'fecha_creacion', 'fecha_finalizacion') list_filter = ('terminado',) readonly_fields = ('fecha_creacion', 'fecha_finalizacion',)
36.875
85
0.681356
57
590
6.842105
0.561404
0.1
0.138462
0.230769
0.282051
0
0
0
0
0
0
0
0.157627
590
15
86
39.333333
0.784708
0
0
0
0
0
0.322034
0
0
0
0
0
0
1
0
false
0
0.307692
0
0.692308
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
0
0
0
1
0
1
0
0
3
1916c389e8a43990317dbd4ed7a2b4547a2799dd
1,628
py
Python
steps/templatetags/django_steps.py
MarkusH/django-steps
53b3be04b0f98e4eb264fc6ad538882012587028
[ "BSD-3-Clause" ]
3
2015-09-16T15:33:34.000Z
2016-11-10T20:41:29.000Z
steps/templatetags/django_steps.py
MarkusH/django-steps
53b3be04b0f98e4eb264fc6ad538882012587028
[ "BSD-3-Clause" ]
null
null
null
steps/templatetags/django_steps.py
MarkusH/django-steps
53b3be04b0f98e4eb264fc6ad538882012587028
[ "BSD-3-Clause" ]
null
null
null
from django import template from ..steps import ( get_current_step, get_current_steps, get_current_url, get_next_step, get_next_url, get_previous_step, get_previous_url, get_url, ) register = template.Library() @register.assignment_tag(takes_context=True) def get_all_steps(context): return get_current_steps(context['request']) @register.assignment_tag() def step_attribute(step, attr): if step is not None and attr is not None: return getattr(step, attr) return step @register.assignment_tag(takes_context=True) def step_url(context, step, *args, **kwargs): return get_url(step, context['request'], *args, **kwargs) @register.assignment_tag(takes_context=True) def current_step(context, attr=None): step = get_current_step(context['request']) return step_attribute(step, attr) @register.assignment_tag(takes_context=True) def next_step(context, attr=None): step = get_next_step(context['request']) return step_attribute(step, attr) @register.assignment_tag(takes_context=True) def previous_step(context, attr=None): step = get_previous_step(context['request']) return step_attribute(step, attr) @register.simple_tag(takes_context=True) def current_step_url(context, *args, **kwargs): return get_current_url(context['request'], *args, **kwargs) @register.simple_tag(takes_context=True) def next_step_url(context, *args, **kwargs): return get_next_url(context['request'], *args, **kwargs) @register.simple_tag(takes_context=True) def previous_step_url(context, *args, **kwargs): return get_previous_url(context['request'], *args, **kwargs)
27.59322
72
0.7543
227
1,628
5.132159
0.145374
0.054936
0.103004
0.130472
0.654936
0.611159
0.554506
0.299571
0.299571
0.254077
0
0
0.12285
1,628
58
73
28.068966
0.815826
0
0
0.289474
0
0
0.034398
0
0
0
0
0
0
1
0.236842
false
0
0.052632
0.131579
0.552632
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
3
194088f3b3dcac4889f490d445fd6e91122281d4
234
py
Python
login/urls.py
UV-CDAT/usage
eaa859564ce571e337170bf22b71fd0f1a07a573
[ "BSD-3-Clause" ]
null
null
null
login/urls.py
UV-CDAT/usage
eaa859564ce571e337170bf22b71fd0f1a07a573
[ "BSD-3-Clause" ]
9
2017-03-21T13:39:44.000Z
2017-03-21T15:58:31.000Z
login/urls.py
CDAT/usage
eaa859564ce571e337170bf22b71fd0f1a07a573
[ "BSD-3-Clause" ]
1
2017-03-28T16:25:37.000Z
2017-03-28T16:25:37.000Z
from django.conf.urls import patterns, include, url from django.views.generic import DetailView, ListView from login import views urlpatterns = patterns('login.views', # / url(r'^/?$', 'show_login', name='login'), )
23.4
53
0.683761
29
234
5.482759
0.586207
0.125786
0
0
0
0
0
0
0
0
0
0
0.179487
234
9
54
26
0.828125
0.004274
0
0
0
0
0.12987
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
194f15cb1f7726db7d4c91dfca859a69f8ec8900
208
py
Python
backend/core/urls.py
IceKhan13/QiskitFlow
ec9a403a04145454c35b21bdfb26e893f52a428f
[ "Apache-2.0" ]
7
2020-10-21T20:51:00.000Z
2021-08-24T14:21:35.000Z
backend/core/urls.py
IceKhan13/QiskitFlow
ec9a403a04145454c35b21bdfb26e893f52a428f
[ "Apache-2.0" ]
11
2020-10-22T03:24:54.000Z
2021-02-13T02:41:06.000Z
backend/core/urls.py
IceKhan13/QiskitFlow
ec9a403a04145454c35b21bdfb26e893f52a428f
[ "Apache-2.0" ]
5
2020-10-08T17:24:59.000Z
2022-01-30T16:27:03.000Z
from rest_framework import routers from .views import ExperimentViewSet, RunViewSet router = routers.DefaultRouter() router.register(r'experiments', ExperimentViewSet) router.register(r'runs', RunViewSet)
23.111111
50
0.822115
23
208
7.391304
0.608696
0.164706
0.176471
0
0
0
0
0
0
0
0
0
0.091346
208
8
51
26
0.899471
0
0
0
0
0
0.072115
0
0
0
0
0
0
1
0
false
0
0.4
0
0.4
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
19b20edba5fc8e07bf92b59d843b25d030626592
243
py
Python
dbschema/script.py
achiku/pyscript
ff2b6577025c67506c783a89c8c7a449d224f72f
[ "MIT" ]
null
null
null
dbschema/script.py
achiku/pyscript
ff2b6577025c67506c783a89c8c7a449d224f72f
[ "MIT" ]
null
null
null
dbschema/script.py
achiku/pyscript
ff2b6577025c67506c783a89c8c7a449d224f72f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import sys # from pyscript.model.user import User from models.factories.user import User # from .model.user import User if __name__ == '__main__': u = User('8maki', 32) print(sys.path) print(u.greeting())
20.25
38
0.666667
35
243
4.4
0.571429
0.194805
0.272727
0.246753
0
0
0
0
0
0
0
0.020202
0.185185
243
11
39
22.090909
0.757576
0.358025
0
0
0
0
0.085526
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0.333333
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
5fdebbaf6c9824b3ee332dfcde3375db875bafbd
238
py
Python
tests/test_init.py
nitred/nr-blockchain
571503b45e1a8484fdc81f5701a734ae4bbd2c14
[ "MIT" ]
null
null
null
tests/test_init.py
nitred/nr-blockchain
571503b45e1a8484fdc81f5701a734ae4bbd2c14
[ "MIT" ]
null
null
null
tests/test_init.py
nitred/nr-blockchain
571503b45e1a8484fdc81f5701a734ae4bbd2c14
[ "MIT" ]
null
null
null
"""Test __init__.""" def test_init(hello_world): """Run a test.""" import nr_blockchain # Test __init__ assert hasattr(nr_blockchain, '__version__') # Test pytest fixtures assert(hello_world == "Hello World!")
18.307692
48
0.655462
28
238
4.964286
0.535714
0.172662
0
0
0
0
0
0
0
0
0
0
0.214286
238
12
49
19.833333
0.743316
0.260504
0
0
0
0
0.140244
0
0
0
0
0
0.5
1
0.25
false
0
0.25
0
0.5
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
1
0
1
0
0
0
0
0
0
0
3
5ff5bd87a58958cb49edd7292b9150b8c5042990
1,158
py
Python
asystem-anode/src/main/python/anode/application.py
ggear/asystem_archive
b97f67218e8aa60991fba386c9e73d27d20d6c47
[ "Apache-2.0" ]
null
null
null
asystem-anode/src/main/python/anode/application.py
ggear/asystem_archive
b97f67218e8aa60991fba386c9e73d27d20d6c47
[ "Apache-2.0" ]
2
2021-03-25T21:27:09.000Z
2022-02-11T03:38:48.000Z
asystem-anode/src/main/python/anode/application.py
ggear/asystem_archive
b97f67218e8aa60991fba386c9e73d27d20d6c47
[ "Apache-2.0" ]
null
null
null
import os _APP_CONF = dict( line.strip().split("=") for line in open(os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__), "application.properties"))) if not line.startswith("#") and not line.startswith("\n")) APP_NAME = _APP_CONF["APP_NAME"] APP_NAME_ESCAPED = _APP_CONF["APP_NAME_ESCAPED"] APP_VERSION = _APP_CONF["APP_VERSION"] APP_VERSION_NUMERIC = int(_APP_CONF["APP_VERSION_NUMERIC"]) _APP_MODEL_CONF = dict( line.strip().split("=") for line in open(os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__), "avro", "model.properties"))) if not line.startswith("#") and not line.startswith("\n")) APP_MODEL_VERSION = _APP_MODEL_CONF["MODEL_VERSION"] APP_MODEL_ENERGYFORECAST_INTERDAY_PROD_VERSION = _APP_MODEL_CONF["MODEL_ENERGYFORECAST_INTERDAY_PROD_VERSION"] APP_MODEL_ENERGYFORECAST_INTRADAY_PROD_VERSION = _APP_MODEL_CONF["MODEL_ENERGYFORECAST_INTRADAY_PROD_VERSION"] APP_MODEL_ENERGYFORECAST_INTERDAY_BUILD_VERSION = _APP_MODEL_CONF["MODEL_ENERGYFORECAST_INTERDAY_BUILD_VERSION"] APP_MODEL_ENERGYFORECAST_INTRADAY_BUILD_VERSION = _APP_MODEL_CONF["MODEL_ENERGYFORECAST_INTRADAY_BUILD_VERSION"]
55.142857
112
0.801382
163
1,158
5.159509
0.220859
0.130797
0.160523
0.112961
0.800238
0.719382
0.719382
0.325803
0.325803
0.325803
0
0
0.075993
1,158
20
113
57.9
0.785981
0
0
0.222222
0
0
0.247841
0.165803
0
0
0
0
0
1
0
false
0
0.055556
0
0.055556
0
0
0
0
null
0
0
0
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
5ff71622f939812e6b9bf244ad7a79943df7dd87
761
py
Python
PyFlow/Packages/PyFlowMaya/Tools/RunScriptTool.py
IlgarLunin/PyFlowMaya
d02fab352a454be9f32c3cfbf7c12679e389cf8b
[ "MIT" ]
5
2019-10-26T03:35:12.000Z
2022-01-17T10:58:48.000Z
PyFlow/Packages/PyFlowMaya/Tools/RunScriptTool.py
IlgarLunin/PyFlowMaya
d02fab352a454be9f32c3cfbf7c12679e389cf8b
[ "MIT" ]
null
null
null
PyFlow/Packages/PyFlowMaya/Tools/RunScriptTool.py
IlgarLunin/PyFlowMaya
d02fab352a454be9f32c3cfbf7c12679e389cf8b
[ "MIT" ]
2
2020-10-10T20:54:55.000Z
2020-11-14T15:15:40.000Z
from nine import str from PyFlow.UI.Tool.Tool import ShelfTool from PyFlow.Packages.PyFlowMaya.Tools import RESOURCES_DIR from Qt import QtGui class RunScriptTool(ShelfTool): """docstring for RunScriptTool.""" def __init__(self): super(RunScriptTool, self).__init__() @staticmethod def toolTip(): return "Finds all scriptEntry nodes and executes them" @staticmethod def getIcon(): return QtGui.QIcon(RESOURCES_DIR + "runScript.png") @staticmethod def name(): return str("RunScriptTool") def do(self): entryPointNodes = self.pyFlowInstance.graphManager.get().getAllNodes(classNameFilters=["scriptEntry"]) for entryNode in entryPointNodes: entryNode.compute()
26.241379
110
0.695138
80
761
6.4875
0.6
0.086705
0
0
0
0
0
0
0
0
0
0
0.211564
761
28
111
27.178571
0.865
0.036794
0
0.15
0
0
0.112792
0
0
0
0
0
0
1
0.25
false
0
0.2
0.15
0.65
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
3
27548bc1c195e272c1e9d729377c0e0e8205ee84
409
py
Python
HW2-6/HW3/Code/RidgeRegression.py
suhail-ansari/Machine-Learning-Algortihms
e116c28848a2cb2132a09fcfdc0301ae89ebcf8b
[ "MIT" ]
null
null
null
HW2-6/HW3/Code/RidgeRegression.py
suhail-ansari/Machine-Learning-Algortihms
e116c28848a2cb2132a09fcfdc0301ae89ebcf8b
[ "MIT" ]
null
null
null
HW2-6/HW3/Code/RidgeRegression.py
suhail-ansari/Machine-Learning-Algortihms
e116c28848a2cb2132a09fcfdc0301ae89ebcf8b
[ "MIT" ]
null
null
null
import numpy as np class RidgeRegression(object): def fit(self, X, y, alpha=0): #X = np.hstack((np.ones((X.shape[0], 1)), X)) G = alpha * np.eye(X.shape[1]) G[0, 0] = 1 # Don't regularize bias self.params = np.dot(np.linalg.inv(np.dot(X.T, X) + np.dot(G.T, G)), np.dot(X.T, y)) def predict(self, X): return np.dot(X, self.params)
34.083333
76
0.513447
71
409
2.957746
0.422535
0.119048
0.085714
0.066667
0
0
0
0
0
0
0
0.024476
0.300734
409
12
77
34.083333
0.70979
0.161369
0
0
0
0
0
0
0
0
0
0
0
1
0.222222
false
0
0.111111
0.111111
0.555556
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
3
2757228c1d956c794f3ad2cb750bd513a8757046
153
py
Python
pyrism/Core/Site.py
2AUK/pyrism
7067fa7a261adc2faabcffbcb2d40d395e42a3c8
[ "MIT" ]
4
2020-10-26T14:32:08.000Z
2021-03-26T01:23:37.000Z
pyrism/Core/Site.py
2AUK/pyrism
7067fa7a261adc2faabcffbcb2d40d395e42a3c8
[ "MIT" ]
1
2021-09-17T18:21:19.000Z
2021-11-22T00:01:46.000Z
pyrism/Core/Site.py
2AUK/pyrism
7067fa7a261adc2faabcffbcb2d40d395e42a3c8
[ "MIT" ]
1
2022-03-08T12:00:35.000Z
2022-03-08T12:00:35.000Z
import numpy as np from dataclasses import dataclass, field @dataclass class Site(object): atom_type: str params: list coords: np.ndarray
13.909091
40
0.72549
21
153
5.238095
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.215686
153
10
41
15.3
0.916667
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.285714
0
0.857143
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
1
0
0
3
275e3f44879e080b74adcc7f1839ca45a7e67f10
410
py
Python
vandr/populate_with_dummy_data.py
jas-ho/vandrApp
5cf2cc160c6ae402d6a7ea1db2fc8811ff2e4082
[ "MIT" ]
1
2018-09-11T06:03:45.000Z
2018-09-11T06:03:45.000Z
vandr/populate_with_dummy_data.py
jas-ho/vandrApp
5cf2cc160c6ae402d6a7ea1db2fc8811ff2e4082
[ "MIT" ]
null
null
null
vandr/populate_with_dummy_data.py
jas-ho/vandrApp
5cf2cc160c6ae402d6a7ea1db2fc8811ff2e4082
[ "MIT" ]
null
null
null
import sys import os.path sys.path.append(os.path.join(os.path.dirname(__file__), '..')) from flask_sqlalchemy import SQLAlchemy from vandr import db from vandr.models import * from vandr.dummy_data import populate_with_dummy_data db.create_all() # create new tables according to spec.s in vandr.models populate_with_dummy_data(db) # fill the temporary database with dummy data from vandr.dummy_data quit()
29.285714
96
0.804878
67
410
4.716418
0.477612
0.142405
0.123418
0.113924
0.14557
0
0
0
0
0
0
0
0.114634
410
14
97
29.285714
0.870523
0.290244
0
0
0
0
0.00692
0
0
0
0
0
0
1
0
true
0
0.6
0
0.6
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
3
277a5e35b973ad67e04e37cf2231bee8898045f2
78
py
Python
habiter/internal/commands/_utils.py
kemzeb/Habiter
cb45a00daf40e9907a1b692857dabe2abdbc89ab
[ "MIT" ]
1
2021-04-26T19:02:04.000Z
2021-04-26T19:02:04.000Z
habiter/internal/commands/_utils.py
kemzeb/Habiter
cb45a00daf40e9907a1b692857dabe2abdbc89ab
[ "MIT" ]
null
null
null
habiter/internal/commands/_utils.py
kemzeb/Habiter
cb45a00daf40e9907a1b692857dabe2abdbc89ab
[ "MIT" ]
1
2021-08-19T20:31:48.000Z
2021-08-19T20:31:48.000Z
def abort_if_false(ctx, param, value): if not value: ctx.abort()
15.6
38
0.615385
12
78
3.833333
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.269231
78
4
39
19.5
0.807018
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0
0
0.333333
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
3
277b66c6a57c94cd6ecd94cfb4bfb3b2d16154ce
126
py
Python
aiopynetdicom/__main__.py
RadiotherapyAI/aiopynetdicom
27ad2b8598594d19dc78b78471ca9efd4fcdf42c
[ "Apache-2.0" ]
null
null
null
aiopynetdicom/__main__.py
RadiotherapyAI/aiopynetdicom
27ad2b8598594d19dc78b78471ca9efd4fcdf42c
[ "Apache-2.0" ]
null
null
null
aiopynetdicom/__main__.py
RadiotherapyAI/aiopynetdicom
27ad2b8598594d19dc78b78471ca9efd4fcdf42c
[ "Apache-2.0" ]
null
null
null
import typer app = typer.Typer() @app.command() def main(port: int = 8080): from . import _loop _loop.start(port)
11.454545
27
0.642857
18
126
4.388889
0.666667
0.202532
0
0
0
0
0
0
0
0
0
0.040816
0.222222
126
10
28
12.6
0.765306
0
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
false
0
0.333333
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
277c0df0804791abb7c3d90b7e05bbd4263bf664
163
py
Python
settings.py
Cadetho/CSC4444TwitchBot
9453904fff6fff3c47cbecea5754c057df20c0b4
[ "Apache-2.0" ]
1
2017-10-07T17:40:09.000Z
2017-10-07T17:40:09.000Z
settings.py
Cadetho/CSC4444TwitchBot
9453904fff6fff3c47cbecea5754c057df20c0b4
[ "Apache-2.0" ]
null
null
null
settings.py
Cadetho/CSC4444TwitchBot
9453904fff6fff3c47cbecea5754c057df20c0b4
[ "Apache-2.0" ]
1
2019-11-18T07:13:29.000Z
2019-11-18T07:13:29.000Z
HOST = "irc.twitch.tv" PORT = 6667 OAUTH = "" # generate from http://www.twitchapps.com/tmi/ IDENT = "" # twitch account for which you used the oauth CHANNEL = ""
32.6
57
0.680982
24
163
4.625
0.916667
0
0
0
0
0
0
0
0
0
0
0.02963
0.171779
163
5
58
32.6
0.792593
0.539877
0
0
1
0
0.178082
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
2798580111aef15121ac3df03f04fcd7364761bc
964
py
Python
backend/appengine/blogs/blog_model.py
SamaraCardoso27/eMakeup
02c3099aca85b5f54214c3a32590e80eb61621e7
[ "MIT" ]
null
null
null
backend/appengine/blogs/blog_model.py
SamaraCardoso27/eMakeup
02c3099aca85b5f54214c3a32590e80eb61621e7
[ "MIT" ]
null
null
null
backend/appengine/blogs/blog_model.py
SamaraCardoso27/eMakeup
02c3099aca85b5f54214c3a32590e80eb61621e7
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from google.appengine.ext import ndb from google.appengine.ext.db import IntegerProperty from gaeforms.base import Form, StringField, IntegerField from gaeforms.ndb.form import ModelForm #class Blog(ndb.Model): # creation=ndb.DateTimeProperty(auto_now_add=True) # author=ndb.StringProperty(required=True) # title=ndb.StringProperty(required=True) # subject=ndb.StringProperty(required=True) # text=ndb.StringProperty(required=True) # file=ndb.StringProperty(required=True) # @classmethod # def query _order _by_name(cls): # return cls.query().order(Blog.author) #class BlogForm(ModelForm): # _model_class = Categoria # _include = [Blog.author] # title=StringField(required=True) # subject=StringField(required=True) # text=StringField(required=True) # file=StringField(required=True) # creation=DateTimeField(auto_now_add=True)
34.428571
57
0.753112
116
964
6.12069
0.422414
0.152113
0.176056
0.204225
0
0
0
0
0
0
0
0.001195
0.131743
964
28
58
34.428571
0.847073
0.700207
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
3
279b3080a685de62ffef4c81940a0e66dfe8f376
2,150
py
Python
Login/main_login.py
umagnanasundaram2128/WolfTrack3.0
3af060899a886cbbe0871f98d554f5f694b3e0f1
[ "MIT" ]
null
null
null
Login/main_login.py
umagnanasundaram2128/WolfTrack3.0
3af060899a886cbbe0871f98d554f5f694b3e0f1
[ "MIT" ]
24
2021-11-21T19:11:32.000Z
2021-11-29T07:22:13.000Z
Login/main_login.py
nehajaideep/WolfTrack2.0
eeff0b694f5701e768a1620d86c4ad3d2040c8e0
[ "MIT" ]
1
2021-11-29T21:45:33.000Z
2021-11-29T21:45:33.000Z
from flask import Blueprint, session, request, redirect, render_template, current_app, make_response, url_for from flask_login import LoginManager, login_user, UserMixin from datetime import datetime, timedelta from Controller.data import data, upcoming_events, profile main_login_route = Blueprint('main_login', __name__) login_manager = LoginManager() headers = {'Content-Type': 'text/html'} @main_login_route.record_once def on_load(state): login_manager.init_app(state.app) @login_manager.user_loader def load_user(userid): return User(session['userinfo']['userid']) @main_login_route.before_app_request def before_request(): session.modified = True current_app.permanent_session_lifetime = timedelta(minutes=30) if request.endpoint != 'login_manager.login': if 'userinfo' not in session: pass class User(UserMixin): def __init__(self, username) -> None: self.username = username def is_active(self): return self.active def is_anonymous(self): return False def is_authenticated(self): return True def is_valid(username, password): ''' Validate the username and password with DB ''' return True @main_login_route.route('', methods=["GET", "POST"]) def login(): print("Main Route") if request.method == 'GET': return make_response(render_template('main_login.html'), 200, headers) username = request.form['username'] password = request.form['password'] if not is_valid(username, password): pass user = User(username) session['userinfo'] = {'userid': username} user.id = username if request.method == 'POST': login_user(user) return redirect(url_for('home_route.home')) @main_login_route.route('/admin_login') def admin_login(): return make_response(render_template('admin_login.html'), 200, headers) @main_login_route.route('/user_login') def user_login(): return make_response(render_template('login.html'), 200, headers) @main_login_route.route('/admin_landing') def admin_landing(): return make_response(render_template('admin_landing.html'), 200, headers)
29.452055
109
0.71907
276
2,150
5.347826
0.307971
0.054878
0.066396
0.051491
0.171409
0.130081
0.051491
0.051491
0
0
0
0.007799
0.165116
2,150
72
110
29.861111
0.814485
0.019535
0
0.072727
0
0
0.112857
0
0
0
0
0
0
1
0.218182
false
0.090909
0.072727
0.127273
0.490909
0.054545
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
1
0
0
0
3
27b07266d37de56d88b0671b80593f3523277159
2,356
py
Python
app/server/model/userModel.py
Nidhikokande/601_final_project
2dbd18577a876c73bb0fcf7d10695257de44cafe
[ "MIT" ]
null
null
null
app/server/model/userModel.py
Nidhikokande/601_final_project
2dbd18577a876c73bb0fcf7d10695257de44cafe
[ "MIT" ]
null
null
null
app/server/model/userModel.py
Nidhikokande/601_final_project
2dbd18577a876c73bb0fcf7d10695257de44cafe
[ "MIT" ]
null
null
null
from . import db from marshmallow import Schema, fields import json from ..util import todayandnow class UserModel(db.Model): __tablename__ = 'User' id = db.Column("UserID", db.Integer, primary_key=True) username = db.Column("username",db.String(80)) password = db.Column("password",db.String(255)) name = db.Column("name",db.String(20)) email = db.Column("email",db.String(80)) phone = db.Column("phone", db.BigInteger) registered_on = db.Column(db.DateTime, nullable=False) confirmed = db.Column(db.Boolean, nullable=False, default=False) confirmed_on = db.Column(db.DateTime, nullable=True) password_reset_token = db.Column(db.String(255), nullable=True) datasets = db.relationship('DatasetModel', backref='User', lazy=True) def __init__(self, username, password,name,email,phone,confirmed, admin=False, confirmed_on=None, password_reset_token=None,register_on=todayandnow()): self.username = username self.password = password self.email = email self.phone = phone self.name = name self.admin = admin self.confirmed = confirmed self.confirmed_on = confirmed_on self.password_reset_token = password_reset_token self.registered_on = register_on def save_to_db(self): db.session.add(self) db.session.commit() @classmethod def find_by_username(cls, username): return cls.query.filter_by(username=username).first() @classmethod def find_by_id(cls, id): return cls.query.filter_by(id=id).first() @classmethod def find_by_email(cls, _email): return cls.query.filter_by(email=_email).first_or_404() def json(self): schema = UserSchema() return json.dumps(schema.dump(self)) def profile(self): return {'name':self.name, 'username':self.username,'phone':self.phone, 'email':self.email} def is_authenticated(self): return True def is_active(self): return True def is_anonymous(self): return False def get_id(self): return self.username class UserSchema(Schema): id = fields.Integer() username = fields.String() password = fields.String() email = fields.String() phone = fields.Integer() name = fields.String()
29.822785
98
0.659168
297
2,356
5.080808
0.255892
0.053015
0.026508
0.039761
0.139165
0.037111
0
0
0
0
0
0.008192
0.222835
2,356
78
99
30.205128
0.815948
0
0
0.080645
0
0
0.033107
0
0
0
0
0
0
1
0.177419
false
0.112903
0.064516
0.129032
0.709677
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
1
1
0
0
3
27ddd360ec11e06fd7a09a1cbe29368f2ee7a629
191
gyp
Python
test/binding.gyp
bengl/fast-native-fn
8e9b3def3fa39e081daf23ef3749a221bcd98e88
[ "MIT" ]
1
2021-03-13T17:16:59.000Z
2021-03-13T17:16:59.000Z
test/binding.gyp
bengl/fast-native-fn
8e9b3def3fa39e081daf23ef3749a221bcd98e88
[ "MIT" ]
null
null
null
test/binding.gyp
bengl/fast-native-fn
8e9b3def3fa39e081daf23ef3749a221bcd98e88
[ "MIT" ]
null
null
null
{ "targets": [{ "target_name" : "test", "defines": [ "V8_DEPRECATION_WARNINGS=1" ], "sources" : [ "test.cpp" ], "include_dirs": ["<!(node -e \"require('..')\")"] }] }
21.222222
53
0.47644
17
191
5.117647
0.941176
0
0
0
0
0
0
0
0
0
0
0.013699
0.235602
191
8
54
23.875
0.582192
0
0
0
0
0
0.502618
0.13089
0
0
0
0
0
1
0
true
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
3
27f80fc3ec4856e31fc0ccaaae59d17a6d1535e1
388
py
Python
common/aist_common/grammar/qualifier/qualifier_list.py
sfahad1414/AGENT
84069edc96b6190bb03ffd5099cbc8966061a563
[ "Apache-2.0" ]
15
2020-05-06T16:17:56.000Z
2022-03-30T12:25:16.000Z
common/aist_common/grammar/qualifier/qualifier_list.py
dionny/AGENT
8a833406b590e23623fcc67db99f6f964d002396
[ "Apache-2.0" ]
2
2021-08-25T16:17:16.000Z
2022-02-10T06:35:58.000Z
common/aist_common/grammar/qualifier/qualifier_list.py
dionny/AGENT
8a833406b590e23623fcc67db99f6f964d002396
[ "Apache-2.0" ]
7
2020-04-07T18:47:55.000Z
2022-03-30T12:14:58.000Z
class QualifierList: def __init__(self, qualifiers): self.qualifiers = qualifiers def insert_qualifier(self, qualifier): self.qualifiers.insert(0, qualifier) def __len__(self): return len(self.qualifiers) def __iter__(self): return self.qualifiers def __str__(self): return " ".join([str(obs) for obs in self.qualifiers])
21.555556
62
0.652062
44
388
5.363636
0.386364
0.355932
0.144068
0
0
0
0
0
0
0
0
0.003425
0.247423
388
17
63
22.823529
0.804795
0
0
0
0
0
0.002591
0
0
0
0
0
0
1
0.454545
false
0
0
0.272727
0.818182
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
3
fd6d80f6ef2707860e6b957001ddfbaa8f6d30c5
1,069
py
Python
examples/webgoat/vuln-16/vuln-16.py
gauntlt/gauntlt-demo
13a1a1306bcb4aaa70ba42c97f469b8a35c65902
[ "MIT" ]
21
2015-04-11T16:30:43.000Z
2021-08-24T21:40:51.000Z
examples/webgoat/vuln-16/vuln-16.py
gauntlt/gauntlt-demo
13a1a1306bcb4aaa70ba42c97f469b8a35c65902
[ "MIT" ]
12
2015-05-13T04:25:15.000Z
2015-12-12T06:03:38.000Z
examples/webgoat/vuln-16/vuln-16.py
gauntlt/gauntlt-demo
13a1a1306bcb4aaa70ba42c97f469b8a35c65902
[ "MIT" ]
61
2015-03-16T21:39:48.000Z
2021-05-12T17:20:28.000Z
import requests s = requests.Session() r = s.post("http://localhost:8080/WebGoat/j_spring_security_check", data={"username": "webgoat", "password": "webgoat"}) #print r.headers #print r.text #print r #print r.cookies #print s.cookies #print s.get("http://localhost:8080/WebGoat/").text inject = None for high in s.get("http://localhost:8080/WebGoat/service/lessonmenu.mvc").json(): if high['name'] == "Injection Flaws": inject = high break #print high # print high['name'] blah = None for next in inject['children']: #print next if next['name'] == "LAB: SQL Injection": blah = next #print blah #print inject attack_loc = blah['link'] + "&stage=3" #print attack_loc s.get("http://localhost:8080/WebGoat/{}".format(attack_loc)) r2 = s.post("http://localhost:8080/WebGoat/{}".format(attack_loc), data={"employee_id": 112, "password": "smith' OR '1' = '1", "action": "Login"}, cookies = r.cookies) #print r2 #print r2.text if "Welcome Back" in r2.text and "Neville" in r2.text: print "FAIL" else: print "PASS"
21.38
167
0.658559
155
1,069
4.490323
0.406452
0.093391
0.122126
0.172414
0.247126
0.247126
0.112069
0
0
0
0
0.03456
0.160898
1,069
49
168
21.816327
0.74136
0.201123
0
0
0
0
0.39881
0
0
0
0
0
0
0
null
null
0.157895
0.052632
null
null
0.105263
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
1
0
0
1
0
0
0
0
0
3
fd9849d11bcd19356b515c1575349549be199a73
75
py
Python
ecommerce/ecommerce/router.py
Naoiss/bootcamp
69af141aac8665fcc6eef62d34ea016509fe2e96
[ "MIT" ]
16
2021-11-25T11:06:06.000Z
2022-01-31T06:36:18.000Z
ecommerce/ecommerce/router.py
Naoiss/bootcamp
69af141aac8665fcc6eef62d34ea016509fe2e96
[ "MIT" ]
19
2021-11-23T21:49:08.000Z
2022-01-08T12:40:04.000Z
ecommerce/ecommerce/router.py
Naoiss/bootcamp
69af141aac8665fcc6eef62d34ea016509fe2e96
[ "MIT" ]
60
2021-11-21T08:32:10.000Z
2021-12-12T17:36:19.000Z
from rest_framework.routers import DefaultRouter router = DefaultRouter()
18.75
48
0.84
8
75
7.75
0.875
0
0
0
0
0
0
0
0
0
0
0
0.106667
75
3
49
25
0.925373
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
fdbf4f740c9e97a5cd7f12b1c39aed38f183cb0b
317
py
Python
python3/incident/fail-based-on-incident-fields.py
ibmresilient/resilient-scripts
c2d02f149b2d69747d711f95485b953381cbca0f
[ "MIT" ]
26
2017-12-22T00:26:42.000Z
2022-03-24T18:32:48.000Z
python3/incident/fail-based-on-incident-fields.py
ibmresilient/resilient-scripts
c2d02f149b2d69747d711f95485b953381cbca0f
[ "MIT" ]
3
2021-02-24T18:53:09.000Z
2022-02-22T02:30:48.000Z
python3/incident/fail-based-on-incident-fields.py
ibmresilient/resilient-scripts
c2d02f149b2d69747d711f95485b953381cbca0f
[ "MIT" ]
14
2019-02-28T11:45:44.000Z
2021-12-21T09:59:25.000Z
# (c) Copyright IBM Corp. 2010, 2020. All Rights Reserved. # Validate that incident name does not contain 'X' if 'X' in incident.name: helper.fail("The name must not contain 'X'.") # Validate length of the incident name if len(incident.name) > 100: helper.fail("The name must be less than 100 characters.")
31.7
61
0.709779
51
317
4.411765
0.607843
0.213333
0.097778
0.151111
0.186667
0
0
0
0
0
0
0.054054
0.182965
317
9
62
35.222222
0.814672
0.44795
0
0
0
0
0.426901
0
0
0
0
0
0
1
0
true
0
0
0
0
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
3
fdf57b965625dd95e1f6b7f17096ede6972e2e24
241
py
Python
elevatordistanse.py
heicj/code-katas
0075286c7eaa0d3701437d6eaf27963bbd904162
[ "MIT" ]
null
null
null
elevatordistanse.py
heicj/code-katas
0075286c7eaa0d3701437d6eaf27963bbd904162
[ "MIT" ]
null
null
null
elevatordistanse.py
heicj/code-katas
0075286c7eaa0d3701437d6eaf27963bbd904162
[ "MIT" ]
null
null
null
""" def elevator_distance(array): return sum(abs(array[i+1] - array[i]) for i in range(len(array)-1)) """ def elevator_distance(array): d = 0 for i in range(0, len(array) -1): d += abs(array[i] - array[i+1]) return d
24.1
71
0.589212
42
241
3.333333
0.357143
0.171429
0.271429
0.342857
0
0
0
0
0
0
0
0.032086
0.224066
241
9
72
26.777778
0.716578
0.419087
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0
0
0.4
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
fdf886515bb0a1f3b1fe7eb230a9662b46c1f881
177
py
Python
fun/funhome/apps.py
larryw3i/fun
e753ce6d448f7f6ec3169a4d1fa7e1c7bff70a27
[ "MIT" ]
1
2022-01-01T11:14:58.000Z
2022-01-01T11:14:58.000Z
fun/funhome/apps.py
larryw3i/osp
d9526a179876053a6b93e5a110d2de730376f511
[ "MIT" ]
4
2021-06-12T06:05:44.000Z
2021-06-13T06:20:00.000Z
fun/funhome/apps.py
larryw3i/osp
d9526a179876053a6b93e5a110d2de730376f511
[ "MIT" ]
null
null
null
from django.apps import AppConfig from django.utils.translation import gettext_lazy as _ class FunhomeConfig(AppConfig): name = 'funhome' verbose_name = _('Fun home')
22.125
54
0.757062
22
177
5.909091
0.772727
0.153846
0
0
0
0
0
0
0
0
0
0
0.163842
177
7
55
25.285714
0.878378
0
0
0
0
0
0.084746
0
0
0
0
0
0
1
0
false
0
0.4
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
8bfb3c1e8a38ee06ecc01f8f21ea5051dd79b6e6
181
py
Python
team/urls.py
bergran/pokemon_project_example
f6a406a80b99515f0e0ad5e64b0aa70046ad6fc5
[ "MIT" ]
null
null
null
team/urls.py
bergran/pokemon_project_example
f6a406a80b99515f0e0ad5e64b0aa70046ad6fc5
[ "MIT" ]
null
null
null
team/urls.py
bergran/pokemon_project_example
f6a406a80b99515f0e0ad5e64b0aa70046ad6fc5
[ "MIT" ]
null
null
null
from rest_framework.routers import SimpleRouter from team.views.teams import TeamView router = SimpleRouter() router.register("api/v1/teams", TeamView) urlpatterns = router.urls
20.111111
47
0.80663
23
181
6.304348
0.695652
0
0
0
0
0
0
0
0
0
0
0.006173
0.104972
181
8
48
22.625
0.888889
0
0
0
0
0
0.066298
0
0
0
0
0
0
1
0
false
0
0.4
0
0.4
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
e317eaf69efa217ed98ff56f9fed717145c097e8
168
py
Python
justpy/__init__.py
bnaard/justpy
19d49257d9be45f713ac23a1d1eabc0ef5c727b7
[ "Apache-2.0" ]
855
2020-02-08T16:33:34.000Z
2022-03-30T18:03:19.000Z
justpy/__init__.py
bnaard/justpy
19d49257d9be45f713ac23a1d1eabc0ef5c727b7
[ "Apache-2.0" ]
289
2020-02-10T21:23:57.000Z
2022-03-25T18:29:06.000Z
justpy/__init__.py
bnaard/justpy
19d49257d9be45f713ac23a1d1eabc0ef5c727b7
[ "Apache-2.0" ]
88
2020-02-10T18:52:57.000Z
2022-03-30T05:16:34.000Z
"""JustPy is an object-oriented, component based, high-level Python Web Framework that requires no front-end programming""" from .justpy import * __version__ = "0.2.2"
42
123
0.761905
25
168
4.96
0.92
0
0
0
0
0
0
0
0
0
0
0.020548
0.130952
168
4
124
42
0.828767
0.696429
0
0
0
0
0.108696
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
e3182d00dbfed2f1f7a7a7696334ddbf195c3ae8
1,511
py
Python
resticus/permissions.py
PrincessMooMoo/django-resticus
82b13ec331d10c397a39ab5d689fd9d7a6f24d2d
[ "Unlicense" ]
9
2019-05-14T22:14:15.000Z
2021-05-03T04:08:23.000Z
resticus/permissions.py
PrincessMooMoo/django-resticus
82b13ec331d10c397a39ab5d689fd9d7a6f24d2d
[ "Unlicense" ]
15
2019-10-23T18:43:24.000Z
2020-11-08T19:46:54.000Z
resticus/permissions.py
PrincessMooMoo/django-resticus
82b13ec331d10c397a39ab5d689fd9d7a6f24d2d
[ "Unlicense" ]
4
2016-11-10T00:06:54.000Z
2020-11-08T18:52:03.000Z
SAFE_METHODS = ("GET", "HEAD", "OPTIONS") class BasePermission(object): """ A base class from which all permission classes should inherit. """ def has_permission(self, request, view): """ Return `True` if permission is granted, `False` otherwise. """ return True def has_object_permission(self, request, view, obj): """ Return `True` if permission is granted, `False` otherwise. """ return True class AllowAny(BasePermission): """ Allow any access. This isn't strictly required, since you could use an empty permission_classes list, but it's useful because it makes the intention more explicit. """ def has_permission(self, request, view): return True class IsAuthenticated(BasePermission): """ Allows access only to authenticated users. """ def has_permission(self, request, view): return request.user and request.user.is_authenticated class IsAdminUser(BasePermission): """ Allows access only to admin users. """ def has_permission(self, request, view): return request.user and request.user.is_staff class IsAuthenticatedOrReadOnly(BasePermission): """ The request is authenticated as a user, or is a read-only request. """ def has_permission(self, request, view): return ( request.method in SAFE_METHODS or request.user and request.user.is_authenticated )
23.984127
75
0.642621
173
1,511
5.537572
0.421965
0.037578
0.131524
0.156576
0.502088
0.435282
0.435282
0.379958
0.258873
0.258873
0
0
0.268034
1,511
62
76
24.370968
0.866184
0.323627
0
0.363636
0
0
0.015766
0
0
0
0
0
0
1
0.272727
false
0
0
0.181818
0.772727
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
3
e344d34fa24bd784ae626e1e4ec56ed8cbaf631b
2,534
py
Python
pystork/activations.py
yassineameur/pystork
6d962d62c2c61e7a91e6d02936a45f66a9f6e283
[ "MIT" ]
null
null
null
pystork/activations.py
yassineameur/pystork
6d962d62c2c61e7a91e6d02936a45f66a9f6e283
[ "MIT" ]
null
null
null
pystork/activations.py
yassineameur/pystork
6d962d62c2c61e7a91e6d02936a45f66a9f6e283
[ "MIT" ]
null
null
null
""" This file represents an abstract activation function and many well-known activation functions """ from abc import ABC, abstractmethod import math import numpy as np class AbstractActivation(ABC): @abstractmethod def get_value(self, x: np.array): """ The value of the activation on the array (element wise operation) """ @abstractmethod def get_derivative(self, x: np.array, value_at_x: np.array = None): """ Get the derivative of the activation function on x (element wise operation) """ def get_approximate_derivative(self, x: np.array, eps: float = math.pow(10, -7)): """ :param x: the array on which we want to compute the approximate derivative (element wise) :param eps: the epsilon used for the approximation (we recommend to not change it) :return: the approximate derivative """ return (self.get_value(x + eps) - self.get_value(x - eps)) / (2 * eps) class Sigmoid(AbstractActivation): def get_value(self, x: np.array) -> np.array: return 1 / (1 + np.exp(-x)) def get_derivative(self, x: np.array, value_at_x: np.array = None) -> np.array: # The derivative on x is equal to sigmoid(x) * (1 - sigmoid(x)) if value_at_x is None: sigmoid_value = self.get_value(x) else: sigmoid_value = value_at_x return sigmoid_value * (1 - sigmoid_value) class Relu(AbstractActivation): def get_value(self, x: np.array) -> np.array: return np.maximum(x, 0) def get_derivative(self, x: np.array, value_at_x: np.array = None) -> np.array: # The derivative of relu is 0 when value is less than 0 else 1 # Mathematically speaking, there is no derivative on 0, but we will consider that it is # equal to 1 return x >= 0 def get_approximate_derivative(self, x: np.array, eps: float = math.pow(10, -7)): # We highly do not recommend to use the approxilate derivative when using a relu function raise Exception("Do not use derivative approximate on Relu") class Tanh(AbstractActivation): def get_value(self, x: np.array) -> np.array: return np.tanh(x) def get_derivative(self, x: np.array, value_at_x: np.array = None) -> np.array: # The derivative on x is equal to 1 + tanh^2 if value_at_x is None: tanh_value = self.get_value(x) else: tanh_value = value_at_x return 1 - np.power(tanh_value, 2)
31.283951
97
0.640095
372
2,534
4.255376
0.241935
0.08844
0.070752
0.075805
0.456728
0.412508
0.364498
0.349968
0.349968
0.349968
0
0.011809
0.264799
2,534
80
98
31.675
0.837896
0.314128
0
0.4
0
0
0.025
0
0
0
0
0
0
1
0.285714
false
0
0.085714
0.114286
0.685714
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
3
e34bfa092f6a8de96e35cea5d4e12dae5dbcc4f2
1,460
py
Python
sdklib/http/session.py
jframos/sdklib
0cc1126e94b823fad6cc47e6a00549cad6d2f771
[ "BSD-2-Clause" ]
3
2016-12-15T15:54:37.000Z
2021-08-10T03:16:18.000Z
sdklib/http/session.py
jframos/sdklib
0cc1126e94b823fad6cc47e6a00549cad6d2f771
[ "BSD-2-Clause" ]
44
2016-04-13T08:19:45.000Z
2022-01-14T12:58:44.000Z
sdklib/http/session.py
jframos/sdklib
0cc1126e94b823fad6cc47e6a00549cad6d2f771
[ "BSD-2-Clause" ]
5
2016-11-22T11:23:28.000Z
2020-01-28T12:26:10.000Z
# -*- coding: utf-8 -*- from urllib3._collections import HTTPHeaderDict from sdklib.compat import cookies class Cookie(object): """ Wrapper of python Cookie class. See https://docs.python.org/2/library/cookie.html """ def __init__(self, headers=None): self._cookie = cookies.SimpleCookie() self.load_from_headers(headers) def load_from_headers(self, headers): if not headers: return elif not isinstance(headers, HTTPHeaderDict): headers = HTTPHeaderDict(headers) set_cookie_headers = headers.getlist("Set-Cookie") if set_cookie_headers: self._cookie.load("; ".join(set_cookie_headers)) def as_cookie_header_value(self): if self.is_empty(): return "" items = list(self.items()) name, morsel = items[0] output = "%s=%s" % (name, morsel.value) for name, morsel in items[1:]: output += "; " output += "%s=%s" % (name, morsel.value) return output def is_empty(self): return (self._cookie is None) or (len(self._cookie.items()) == 0) def getcookie(self): return self._cookie def items(self): return self._cookie.items() def get(self, key, default=None): return self._cookie.get(key, default) def update(self, cookie): for key, morsel in cookie.items(): self._cookie[key] = morsel.value
27.54717
73
0.602055
175
1,460
4.862857
0.348571
0.105758
0.075206
0.070505
0.054054
0.054054
0
0
0
0
0
0.005682
0.276712
1,460
52
74
28.076923
0.800189
0.071918
0
0
0
0
0.017978
0
0
0
0
0
0
1
0.228571
false
0
0.057143
0.114286
0.514286
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
3
e35695baec503a25ab1d0f88a5950dce92dbe8e2
181
py
Python
src/secondhome/views.py
triump0870/notif
ccc36ce85b3721ea85bf22038541d375c2ff5996
[ "MIT" ]
null
null
null
src/secondhome/views.py
triump0870/notif
ccc36ce85b3721ea85bf22038541d375c2ff5996
[ "MIT" ]
null
null
null
src/secondhome/views.py
triump0870/notif
ccc36ce85b3721ea85bf22038541d375c2ff5996
[ "MIT" ]
null
null
null
from django.shortcuts import render from django.views.generic import ListView, TemplateView # Create your views here. class HomeView(TemplateView): template_name = 'app.html'
22.625
55
0.790055
23
181
6.173913
0.782609
0.140845
0
0
0
0
0
0
0
0
0
0
0.138122
181
7
56
25.857143
0.910256
0.127072
0
0
0
0
0.051282
0
0
0
0
0
0
1
0
false
0
0.5
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
e35c973ea6f0ad2692d98a82caa31e72bc24fe26
78
py
Python
GFG/find_kth_number.py
Navya-tec/100daysofDSA
fa3338122099afdcf01b0f1725d7c5613b53bed8
[ "MIT" ]
13
2021-02-27T10:27:22.000Z
2021-10-05T13:56:28.000Z
GFG/find_kth_number.py
Navya-tec/100daysofDSA
fa3338122099afdcf01b0f1725d7c5613b53bed8
[ "MIT" ]
15
2021-03-06T14:23:49.000Z
2022-01-29T07:10:21.000Z
GFG/find_kth_number.py
Navya-tec/100daysofDSA
fa3338122099afdcf01b0f1725d7c5613b53bed8
[ "MIT" ]
24
2021-03-04T06:15:12.000Z
2021-11-14T22:15:13.000Z
arr = list(map(int,input().split())) k=int(input()) arr.sort() print(arr[k-1])
19.5
36
0.628205
15
78
3.266667
0.666667
0.326531
0
0
0
0
0
0
0
0
0
0.013699
0.064103
78
4
37
19.5
0.657534
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.25
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
e378eef0f3817c5bc332989a518b511670e4c888
124
py
Python
python/url_shortener.py
aakarsh2126/HacktoberFest_2021
146387098d6119253f289c254108f537b75f1c7e
[ "MIT" ]
33
2021-10-01T17:51:53.000Z
2022-03-20T11:30:09.000Z
python/url_shortener.py
aakarsh2126/HacktoberFest_2021
146387098d6119253f289c254108f537b75f1c7e
[ "MIT" ]
69
2021-10-01T09:07:22.000Z
2021-10-20T02:21:12.000Z
python/url_shortener.py
aakarsh2126/HacktoberFest_2021
146387098d6119253f289c254108f537b75f1c7e
[ "MIT" ]
187
2021-10-01T09:06:51.000Z
2022-01-29T03:18:30.000Z
import pyshorteners url=input("Enter URL :\n") print("URL after Shortening:",pyshorteners.Shortener().tinyurl.short(url))
20.666667
74
0.758065
16
124
5.875
0.75
0
0
0
0
0
0
0
0
0
0
0
0.080645
124
5
75
24.8
0.824561
0
0
0
0
0
0.274194
0
0
0
0
0
0
1
0
false
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
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
e387bace4ab90bac7f58b6cc6fc0200983720dca
202
py
Python
python/desafios/desafio02_DiaMesAnoFormatados.py
JbRodrigues/Estudos
734e6ca80296f7d97890a0d5ad885d89711e8c1c
[ "MIT" ]
null
null
null
python/desafios/desafio02_DiaMesAnoFormatados.py
JbRodrigues/Estudos
734e6ca80296f7d97890a0d5ad885d89711e8c1c
[ "MIT" ]
null
null
null
python/desafios/desafio02_DiaMesAnoFormatados.py
JbRodrigues/Estudos
734e6ca80296f7d97890a0d5ad885d89711e8c1c
[ "MIT" ]
null
null
null
dia = input('Qual o dia do seu anivesario? ') mes = input('Qual o mes do seu aniversario? ') ano = input('Qual o ano do seu aniversario? ') print('Você nasceu dia', dia,'de',mes,'de',ano,', Correto?')
33.666667
60
0.658416
34
202
3.911765
0.441176
0.203008
0.225564
0
0
0
0
0
0
0
0
0
0.163366
202
5
61
40.4
0.786982
0
0
0
0
0
0.59901
0
0
0
0
0
0
1
0
false
0
0
0
0
0.25
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
e3884e4261175226e4b0f8ba19c7beb0305b265b
109
py
Python
apps/informesContables/apps.py
lol9519/SICproyecto
2af1be0ae07c1121e4a226f340a1e56baabf4679
[ "Apache-2.0" ]
null
null
null
apps/informesContables/apps.py
lol9519/SICproyecto
2af1be0ae07c1121e4a226f340a1e56baabf4679
[ "Apache-2.0" ]
null
null
null
apps/informesContables/apps.py
lol9519/SICproyecto
2af1be0ae07c1121e4a226f340a1e56baabf4679
[ "Apache-2.0" ]
null
null
null
from django.apps import AppConfig class InformescontablesConfig(AppConfig): name = 'informesContables'
18.166667
41
0.798165
10
109
8.7
0.9
0
0
0
0
0
0
0
0
0
0
0
0.137615
109
5
42
21.8
0.925532
0
0
0
0
0
0.155963
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
8b53bc906afcd105480cd7c0a16abf36c02438bc
121
py
Python
util.py
MarcSchaetz/CMakician
3dd52ca08018bf9f4a2aa2c44fd15c62f55f199b
[ "MIT" ]
null
null
null
util.py
MarcSchaetz/CMakician
3dd52ca08018bf9f4a2aa2c44fd15c62f55f199b
[ "MIT" ]
null
null
null
util.py
MarcSchaetz/CMakician
3dd52ca08018bf9f4a2aa2c44fd15c62f55f199b
[ "MIT" ]
null
null
null
from typing import Generator def generator2sortedlist(g: Generator) -> list: l = list(g) l.sort() return l
15.125
47
0.661157
16
121
5
0.6875
0
0
0
0
0
0
0
0
0
0
0.01087
0.239669
121
7
48
17.285714
0.858696
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0.2
0
0.6
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
3
8b552b1286efd97e84ffb808a016a1d517dc32c4
567
py
Python
modules_exp/index.py
danilo-web/geekBrains_python
30d048e087bddbf487b310ed84ec45d65e924362
[ "Apache-2.0" ]
1
2021-01-30T18:09:03.000Z
2021-01-30T18:09:03.000Z
modules_exp/index.py
danilo-web/geekbrains_python
30d048e087bddbf487b310ed84ec45d65e924362
[ "Apache-2.0" ]
null
null
null
modules_exp/index.py
danilo-web/geekbrains_python
30d048e087bddbf487b310ed84ec45d65e924362
[ "Apache-2.0" ]
null
null
null
import mod_ios # 1 импорт модуля из этой же директории from folder_external_module import mod_android # 2 импорт модуля из вложеной директории from folder_external_module.mod_android import android, printing # 3 импорт переменных из директории import script_1 # 4 from script_1 import var_1 # 5 import script_2 # 6 print(mod_ios.ios) # 1 mod_ios.printing() print(mod_android.android) # 2 mod_android.printing() print(android) # 3 так как переменные импортированы то мы используем их без префикса printing() print(script_1.var_1) # 4 print(var_1) # 5
27
101
0.779541
92
567
4.608696
0.391304
0.09434
0.066038
0.132075
0.160377
0
0
0
0
0
0
0.037815
0.160494
567
20
102
28.35
0.852941
0.338624
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.428571
0
0.428571
0.642857
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
1
0
3
8b55329fba2ed94aabefbba5b4de5e45f7bdbbdf
35,430
py
Python
pysnmp-with-texts/CISCO-DOT11-WIDS-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
8
2019-05-09T17:04:00.000Z
2021-06-09T06:50:51.000Z
pysnmp-with-texts/CISCO-DOT11-WIDS-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
4
2019-05-31T16:42:59.000Z
2020-01-31T21:57:17.000Z
pysnmp-with-texts/CISCO-DOT11-WIDS-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module CISCO-DOT11-WIDS-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-DOT11-WIDS-MIB # Produced by pysmi-0.3.4 at Wed May 1 11:55:58 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") SingleValueConstraint, ValueSizeConstraint, ConstraintsIntersection, ValueRangeConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ValueSizeConstraint", "ConstraintsIntersection", "ValueRangeConstraint", "ConstraintsUnion") ciscoMgmt, = mibBuilder.importSymbols("CISCO-SMI", "ciscoMgmt") ifIndex, = mibBuilder.importSymbols("IF-MIB", "ifIndex") NotificationGroup, ObjectGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ObjectGroup", "ModuleCompliance") ObjectIdentity, MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn, iso, Integer32, Counter32, Unsigned32, TimeTicks, Counter64, IpAddress, NotificationType, Bits, ModuleIdentity, Gauge32 = mibBuilder.importSymbols("SNMPv2-SMI", "ObjectIdentity", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "iso", "Integer32", "Counter32", "Unsigned32", "TimeTicks", "Counter64", "IpAddress", "NotificationType", "Bits", "ModuleIdentity", "Gauge32") MacAddress, TruthValue, TimeStamp, DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "MacAddress", "TruthValue", "TimeStamp", "DisplayString", "TextualConvention") ciscoDot11WidsMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 9, 456)) ciscoDot11WidsMIB.setRevisions(('2004-11-30 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: ciscoDot11WidsMIB.setRevisionsDescriptions(('Initial version of this MIB module. ',)) if mibBuilder.loadTexts: ciscoDot11WidsMIB.setLastUpdated('200411300000Z') if mibBuilder.loadTexts: ciscoDot11WidsMIB.setOrganization('Cisco System Inc.') if mibBuilder.loadTexts: ciscoDot11WidsMIB.setContactInfo(' Cisco Systems, Customer Service Postal: 170 West Tasman Drive San Jose, CA 95134 USA Tel: +1 800 553-NETS E-mail: cs-dot11@cisco.com') if mibBuilder.loadTexts: ciscoDot11WidsMIB.setDescription('This MIB is intended to be implemented on the following IOS based network entities for the purpose of providing network management stations information about the various attempts to compromise the security in the 802.11-based wireless networks. (i) 802.11 Access Points that accept wireless client associations. The MIB reports the information about the following attacks that can happen either at the initial authentication phase or during normal data communication between the client and the AP. EAPOL flooding - This is an attempt made by an invalid 802.11 client to send too many EAPOL-Start messages and bring the authentication services on the Authenticator, typically the AP, down. BlackListing - This is the process of marking a client as invalid when its authentication attempts fail. The client is put in a list when its authentication attempt fails for the first time. If the number of consecutive failed authentication attempts reach a threshold, any subsequent authentication requests made by the client will be rejected from that point for a configurable period of time. Protection Failures - These kind of failures happen when the attacker injects invalid packets onto the wireless network thereby corrupting the 802.11 data traffic between an AP and its associated wireless clients. The administrator, through the NMS, can configure the thresholds on the AP using this MIB to enable the AP detect the EAPOL flood attacks and provide related statistics to the NMS. To detect protection failures, the AP provides the relevant statistics about the protection errors in the form of MIB objects, which are compared against the thresholds configured on the NMS and appropriate events are raised by the NMS, if thresholds are found to be exceeded. The hierarchy of the AP and MNs is as follows. +~-~-~+ +~-~-~+ +~-~-~+ +~-~-~+ + + + + + + + + + AP + + AP + + AP + + AP + + + + + + + + + +~-~-~+ +~-~-~+ +~-~-~+ +~-~-~+ .. . . . .. . . . . . . . . . . . . . . . . . . . . . . . \\/ \\/ \\/ \\/ \\/ +.....+ +.....+ +-.-.-.+ +~-~-~+ +......+ + + + + + + + + + + + MN + + MN + + MN + + MN + + MN + + + + + + + + + + + +.....+ +.....+ +-.-.-.+ +~-~-~+ +......+ The wireless connections are represented as dotted lines in the above diagram. GLOSSARY Access Point ( AP ) An entity that contains an 802.11 medium access control ( MAC ) and physical layer ( PHY ) interface and provides access to the distribution services via the wireless medium for associated clients. Mobile Node ( MN ) A roaming 802.11 wireless device in a wireless network associated with an access point. Service Set Identifier (SSID) The Radio Service Set ID that is used by the mobile wireless clients for identification during the association with the APs. Temporal Key Integrity Protocol (TKIP) A security protocol defined to enhance the limitations of WEP. Message Integrity Check and per-packet keying on all WEP-encrypted frames are two significant enhancements provided by TKIP to WEP. Counter mode with CBC-MAC Protocol (CCMP) A security protocol that uses the counter mode in conjunction with cipher block chaining. This method divides the data into blocks, encrypts the first block, XORs the results with the second block, encrypts the result, XORs the result with the next block and continues till all the blocks are processed. This way, this protocol derives a 64-bit MIC which is appended to the plaintext data which is again encrypted using the counter mode. Message Integrity Check (MIC) The Message Integrity Check is an improvement over the Integrity Check Function (ICV) of the 802.11 standard. MIC adds two new fields to the wireless frames - a sequence number field for detecting out-of-order frames and a MIC field to provide a frame integrity check to overcome the mathematical shortcomings of the ICV. 802.1x The IEEE ratified standard for enforcing port based access control. This was originally intended for use on wired LANs and later extended for use in 802.11 WLAN environments. This defines an architecture with three main parts - a supplicant (Ex. an 802.11 wireless client), an authenticator (the AP) and an authentication server(a Radius server). The authenticator passes messages back and forth between the supplicant and the authentication server to enable the supplicant get authenticated to the network. Extensible Authentication Protocol Over LAN (EAPOL) This is an encapsulation method defined by 802.1x passing EAP packets over Ethernet frames. ') ciscoDot11WidsMIBNotifs = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 456, 0)) ciscoDot11WidsMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 456, 1)) ciscoDot11WidsAuthFailures = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 456, 1, 1)) ciscoDot11WidsProtectFailures = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 456, 1, 2)) ciscoDot11WidsMIBConform = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 456, 2)) ciscoDot11WidsMIBCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 456, 2, 1)) ciscoDot11WidsMIBGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 456, 2, 2)) cDot11WidsFloodDetectEnable = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 456, 1, 1, 1), TruthValue()).setMaxAccess("readwrite") if mibBuilder.loadTexts: cDot11WidsFloodDetectEnable.setStatus('current') if mibBuilder.loadTexts: cDot11WidsFloodDetectEnable.setDescription("This object is used to enable or disable the WIDS flood detection feature. Set this MIB object to 'true' to enable the flood detection and 'false' to disable it. Note that the values configured through cDot11WidsFloodThreshold and cDot11WidsEapolFloodInterval take effect only if flood detection is enabled through this MIB object. ") cDot11WidsEapolFloodThreshold = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 456, 1, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 512)).clone(3)).setUnits('attempts').setMaxAccess("readwrite") if mibBuilder.loadTexts: cDot11WidsEapolFloodThreshold.setStatus('current') if mibBuilder.loadTexts: cDot11WidsEapolFloodThreshold.setDescription('This object specifies the maximum number of authentication attempts allowed for all the clients taken together in the interval specified by cDot11WidsEapolFloodInterval. The attempts include both the successful as well as failed attempts. ') cDot11WidsEapolFloodInterval = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 456, 1, 1, 3), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 300)).clone(60)).setUnits('seconds').setMaxAccess("readwrite") if mibBuilder.loadTexts: cDot11WidsEapolFloodInterval.setStatus('current') if mibBuilder.loadTexts: cDot11WidsEapolFloodInterval.setDescription('This object specifies the time duration for which the client authentication attempts have to be monitored for detecting the flood attack. ') cDot11WidsBlackListThreshold = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 456, 1, 1, 4), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 512)).clone(3)).setUnits('attempts').setMaxAccess("readwrite") if mibBuilder.loadTexts: cDot11WidsBlackListThreshold.setStatus('current') if mibBuilder.loadTexts: cDot11WidsBlackListThreshold.setDescription('This object configures the maximum threshold on the number of unsuccessful authentication attempts, that can be made by a particular client. Once the threshold is reached, the client is retained in the list for a period of time equal to the value configured through cDot11WidsBlackListDuration, during which its attempts to get authenticated are blocked. ') cDot11WidsBlackListDuration = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 456, 1, 1, 5), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 300)).clone(60)).setUnits('seconds').setMaxAccess("readwrite") if mibBuilder.loadTexts: cDot11WidsBlackListDuration.setStatus('current') if mibBuilder.loadTexts: cDot11WidsBlackListDuration.setDescription('This object indicates the time duration for which a particular client has to be kept in the black list after the number of unsuccessful attempts reach the threshold given by cDot11WidsBlackListThreshold. ') cDot11WidsFloodMaxEntriesPerIntf = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 456, 1, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))).setMaxAccess("readwrite") if mibBuilder.loadTexts: cDot11WidsFloodMaxEntriesPerIntf.setStatus('current') if mibBuilder.loadTexts: cDot11WidsFloodMaxEntriesPerIntf.setDescription('This object indicates the maximum number of entries that can be held for a particular 802.11 radio interface identified by ifIndex. ') cDot11WidsEapolFloodTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 456, 1, 1, 7), ) if mibBuilder.loadTexts: cDot11WidsEapolFloodTable.setStatus('current') if mibBuilder.loadTexts: cDot11WidsEapolFloodTable.setDescription("This table gives the statistics on the EAPOL flood attacks observed at this radio interface. An entry in this table is created by the agent when this 802.11 station detects an EAPOL flood attack. All the columns in the entries except the cDot11WidsEapolFloodStopTime are populated when the attack is observed first. The object cDot11WidsEapolFloodStopTime is populated when no flood conditions are observed following the initial observation at the time indicated by cDot11WidsEapolFloodStartTime. This can be illustrated by the following example. Assume that the monitoring interval is configured to 1 minute through the cDot11WidsEapolFloodInterval object and the number of attempts is set to 5. At the end of the first minute after this configuration is made, client c1 is found to have made 4 attempts and another client c2 have made 3. Hence, in total, the attempt count exceeds 7 and the agent adds a new row to this table. The cDot11WidsFloodStopTime carries a value of 0 at this point in the newly added row. The MIB object cDot11WidsEapolFloodClientMac at this point holds the MAC address of c1 and cDot11WidsEapolFloodClientCount holds the value of 4. At the end of the second interval, assume that the clients are found to have made only 4 attempts in total with c1 and c2 making 3 and 1 attempt(s) respectively. Now the total count is not found to exceed the threshold. Hence the flood is observed to be stopped. The object cDot11WidsEapolFloodStopTime is now populated with this time at which the flood is observed to be stopped. The MIB object cDot11WidsEapolFloodClientMac at this point holds c1's MAC address and cDot11WidsEapolFloodClientCount would hold a value of 7. If the count is found to exceed in the next interval, it will be treated as a beginning of a new flood event and hence a new entry will be created for the same. Assume the case where, at the end of the second interval, the total count continues at the rate above the threshold, with c1 making 5 and c2 making 2 attempts respectively. Since the flood is not observed to be stopped, the object cDot11WidsFloodStopTime continues to hold a value of zero. The agent at anytime will retain only the most recent and maximum number of entries, as given by cDot11WidsFloodMaxEntriesPerIntf, for a particular value of ifIndex. The older entries are purged automatically when the number of entries for a particular ifIndex reaches its maximum. This table has a expansion dependent relationship with ifTable defined in IF-MIB. There exists a row in this table corresponding to the row for each interface of iftype ieee80211(71) found in ifTable. cDot11WidsEapolFloodIndex acts as the expansion index. ") cDot11WidsEapolFloodEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 456, 1, 1, 7, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "CISCO-DOT11-WIDS-MIB", "cDot11WidsEapolFloodIndex")) if mibBuilder.loadTexts: cDot11WidsEapolFloodEntry.setStatus('current') if mibBuilder.loadTexts: cDot11WidsEapolFloodEntry.setDescription('An entry holds the statistics about one instance of EAPOL flood attack observed at this particular radio interface. ') cDot11WidsEapolFloodIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 456, 1, 1, 7, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 100))) if mibBuilder.loadTexts: cDot11WidsEapolFloodIndex.setStatus('current') if mibBuilder.loadTexts: cDot11WidsEapolFloodIndex.setDescription('This object identifies the set of information about one instance of an EAPOL flood event observed at this radio interface between the start and stop times indicated by cDot11WidsEapolFloodStartTime and cDot11WidsEapolFloodStopTime. ') cDot11WidsEapolFloodClientMac = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 456, 1, 1, 7, 1, 2), MacAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: cDot11WidsEapolFloodClientMac.setStatus('current') if mibBuilder.loadTexts: cDot11WidsEapolFloodClientMac.setDescription('This object identifies the MAC address of the wireless client that has made the maximum number of authentication attempts in the duration specified by the cDot11WidsEapolFloodInterval object. At the end of each interval time indicated by cDot11WidsFloodInterval, the 802.11 station checks whether the total count of the number of authentication attempts made by all the clients exceed the threshold configured through the object cDot11WidsEapolFloodThreshold. If yes, then the agent populates this MIB object with the MAC of the wireless client that has made the maximum number of authentication attempts in that interval. When the flood event is observed to be stopped, as indicated by a non-zero value for the cDot11WidsEapolFloodStopTime object, this object indicates the MAC of the wireless client that has made the maximum number of attempts for the entire duration of the flood observed between the times indicated by the objects cDot11WidsEapolFloodStartTime and cDot11WidsEapolFloodStopTime respectively. ') cDot11WidsEapolFloodClientCount = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 456, 1, 1, 7, 1, 3), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cDot11WidsEapolFloodClientCount.setStatus('current') if mibBuilder.loadTexts: cDot11WidsEapolFloodClientCount.setDescription('This object provides the count associated with the client with largest number of attempts in the last interval. When the flood event is observed to be stopped, as indicated by a non-zero value for the cDot11WidsEapolFloodStopTime object, this object gives the count associated with the client with the largest number of attempts, for the entire duration of the flood observed between the times indicated by the objects cDot11WidsEapolFloodStartTime and cDot11WidsEapolFloodStopTime respectively. ') cDot11WidsEapolFloodStartTime = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 456, 1, 1, 7, 1, 4), TimeStamp()).setMaxAccess("readonly") if mibBuilder.loadTexts: cDot11WidsEapolFloodStartTime.setStatus('current') if mibBuilder.loadTexts: cDot11WidsEapolFloodStartTime.setDescription('This object indicates the time at which the EAPOL flood event identified by one entry of this table was observed first at this radio interface. ') cDot11WidsEapolFloodStopTime = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 456, 1, 1, 7, 1, 5), TimeStamp()).setMaxAccess("readonly") if mibBuilder.loadTexts: cDot11WidsEapolFloodStopTime.setStatus('current') if mibBuilder.loadTexts: cDot11WidsEapolFloodStopTime.setDescription('This object indicates the time at which the the EAPOL flood event observed first at the time indicated by cDot11WidsEapolFloodStartTime has stopped. If this 802.11 station finds that the flood conditions observed in the one or more prior intervals has ceased, it marks the flood event as stopped at the time indicated by this object. That the flood has ceased is indicated by the number of authentication attempts dropping below the value specified by the cDot11WidsEapolFloodThreshold object. A value of 0 for this object indicates that the number of authentication attempts continue to exceed the value specified by the cDot11WidsEapolFloodThreshold object. ') cDot11WidsEapolFloodTotalCount = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 456, 1, 1, 7, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cDot11WidsEapolFloodTotalCount.setStatus('current') if mibBuilder.loadTexts: cDot11WidsEapolFloodTotalCount.setDescription('This object gives the accumulated count of the number of authentication attempts made by all the clients at the time of query. ') cDot11WidsBlackListTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 456, 1, 1, 8), ) if mibBuilder.loadTexts: cDot11WidsBlackListTable.setStatus('current') if mibBuilder.loadTexts: cDot11WidsBlackListTable.setDescription('This table gives the information about the 802.11 wireless clients that have been blacklisted while attempting to get authenticated with this 802.11 station at this radio interface. An entry is added to this table when the number of consecutive failed authentication attempts made by a client equals the value configured through cDot11WidsBlackListThreshold. The client will then be blocked from getting authenticated for a time period equal to the value configured through cDot11WidsBlackListDuration. After this time elapses, the client is taken off from the list and the agent automatically removes the entry corresponding to that client from this table. This table has a expansion dependent relationship on the ifTable. For each entry in this table, there exists at least an entry in the ifTable of ifType ieee80211(71). cDot11BlackListIndex acts as the expansion index. ') cDot11WidsBlackListEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 456, 1, 1, 8, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "CISCO-DOT11-WIDS-MIB", "cDot11WidsBlackListClientMac")) if mibBuilder.loadTexts: cDot11WidsBlackListEntry.setStatus('current') if mibBuilder.loadTexts: cDot11WidsBlackListEntry.setDescription('Each entry holds the information about one 802.11 wireless client that has been blacklisted when attempting to get authenticated with this 802.11 station at this radio interface. ') cDot11WidsBlackListClientMac = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 456, 1, 1, 8, 1, 1), MacAddress()) if mibBuilder.loadTexts: cDot11WidsBlackListClientMac.setStatus('current') if mibBuilder.loadTexts: cDot11WidsBlackListClientMac.setDescription('This object indicates the Mac Address of the blacklisted client. ') cDot11WidsBlackListAttemptCount = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 456, 1, 1, 8, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cDot11WidsBlackListAttemptCount.setStatus('current') if mibBuilder.loadTexts: cDot11WidsBlackListAttemptCount.setDescription('This object counts the total number of attempts made by the client identified by cDot11WidsBlackListClientMac to get authenticated with the 802.11 station through this radio interface. ') cDot11WidsBlackListTime = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 456, 1, 1, 8, 1, 3), TimeStamp()).setMaxAccess("readonly") if mibBuilder.loadTexts: cDot11WidsBlackListTime.setStatus('current') if mibBuilder.loadTexts: cDot11WidsBlackListTime.setDescription('This object indicates the time at which the client was blacklisted after failing in its attempt to get authenticated with this 802.11 station at this radio interface. ') cDot11WidsProtectFailClientTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 456, 1, 2, 1), ) if mibBuilder.loadTexts: cDot11WidsProtectFailClientTable.setStatus('current') if mibBuilder.loadTexts: cDot11WidsProtectFailClientTable.setDescription('This table gives the statistics on the various protection failures occurred during the data communication of this 802.11 station with a particular client currently associated at this dot11 interface. Note that the agent populates this table with an entry for an associated client if and only if at least one of the error statistics, as reported by the counter-type objects of this table, has a non-zero value. This table has a expansion dependent relationship on the ifTable. For each entry in this table, there exists at least an entry in the ifTable of ifType ieee80211(71). cDot11WidsSsid and cDot11WidsClientMacAddress act as the expansion indices. ') cDot11WidsProtectFailClientEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 456, 1, 2, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "CISCO-DOT11-WIDS-MIB", "cDot11WidsSsid"), (0, "CISCO-DOT11-WIDS-MIB", "cDot11WidsClientMacAddress")) if mibBuilder.loadTexts: cDot11WidsProtectFailClientEntry.setStatus('current') if mibBuilder.loadTexts: cDot11WidsProtectFailClientEntry.setDescription('Each entry holds the information about the protection failures observed at this radio interface when this 802.11 station communicates with its associated client identified by cDot11WidsClientMacAddress at the interface identified by ifIndex. The clients are grouped according to the SSIDs they use for their association with the dot11 interface. ') cDot11WidsSsid = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 456, 1, 2, 1, 1, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 32))) if mibBuilder.loadTexts: cDot11WidsSsid.setStatus('current') if mibBuilder.loadTexts: cDot11WidsSsid.setDescription('This object specifies one of the SSIDs of this radio interface using which the client has associated with the 802.11 station. ') cDot11WidsClientMacAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 456, 1, 2, 1, 1, 2), MacAddress()) if mibBuilder.loadTexts: cDot11WidsClientMacAddress.setStatus('current') if mibBuilder.loadTexts: cDot11WidsClientMacAddress.setDescription('This object identifies the MAC address of the associated client to which this set of statistics are applicable. ') cDot11WidsSelPairWiseCipher = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 456, 1, 2, 1, 1, 3), OctetString().subtype(subtypeSpec=ValueSizeConstraint(4, 4)).setFixedLength(4)).setMaxAccess("readonly") if mibBuilder.loadTexts: cDot11WidsSelPairWiseCipher.setReference('Section 7.3.2.25.1, 802.11i Amendment 6: Medium Access Control(MAC) Security Enhancements. ') if mibBuilder.loadTexts: cDot11WidsSelPairWiseCipher.setStatus('current') if mibBuilder.loadTexts: cDot11WidsSelPairWiseCipher.setDescription('This object identifies the pairwise cipher used by the client identified by cDot11WidsClientMacAddress during its association with this 802.11 station at the interface identified by ifIndex. ') cDot11WidsTkipIcvErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 456, 1, 2, 1, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cDot11WidsTkipIcvErrors.setStatus('current') if mibBuilder.loadTexts: cDot11WidsTkipIcvErrors.setDescription("This object counts the total number of TKIP ICV Errors observed in the data communication between this 802.11 station and the client indicated by cDot11WidsClientMacAddress since the client's association with this 802.11 station at the radio interface identified by ifIndex. ") cDot11WidsTkipLocalMicFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 456, 1, 2, 1, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cDot11WidsTkipLocalMicFailures.setStatus('current') if mibBuilder.loadTexts: cDot11WidsTkipLocalMicFailures.setDescription("This object counts the total number of TKIP local MIC failures observed in the data communication between this 802.11 station and the client indicated by cDot11WidsClientMacAddress since the client's association with this 802.11 station at the radio interface identified by ifIndex. ") cDot11WidsTkipRemoteMicFailures = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 456, 1, 2, 1, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cDot11WidsTkipRemoteMicFailures.setStatus('current') if mibBuilder.loadTexts: cDot11WidsTkipRemoteMicFailures.setDescription("This object counts the total number of TKIP remote MIC failures observed in the data communication between this 802.11 station and the client indicated by cDot11WidsClientMacAddress since the client's association with this 802.11 station at the radio interface identified by ifIndex. ") cDot11WidsCcmpReplays = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 456, 1, 2, 1, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cDot11WidsCcmpReplays.setStatus('current') if mibBuilder.loadTexts: cDot11WidsCcmpReplays.setDescription("This object counts the total number of CCMP replay failures observed in the data communication between this 802.11 station and the client indicated by cDot11WidsClientMacAddress since the client's association with this 802.11 station at the radio interface identified by ifIndex. ") cDot11WidsCcmpDecryptErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 456, 1, 2, 1, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cDot11WidsCcmpDecryptErrors.setStatus('current') if mibBuilder.loadTexts: cDot11WidsCcmpDecryptErrors.setDescription("This object counts the total number of CCMP decryption failures observed in the data communication between this 802.11 station and the client indicated by cDot11WidsClientMacAddress since the client's association with this 802.11 station at the radio interface identified by ifIndex. ") cDot11WidsTkipReplays = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 456, 1, 2, 1, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cDot11WidsTkipReplays.setStatus('current') if mibBuilder.loadTexts: cDot11WidsTkipReplays.setDescription("This object counts the total number of TKIP replay failures observed in the data communication between this 802.11 station and the client indicated by cDot11WidsClientMacAddress since the client's association with this 802.11 station at the radio interface identified by ifIndex. ") cDot11WidsWepReplays = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 456, 1, 2, 1, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cDot11WidsWepReplays.setStatus('current') if mibBuilder.loadTexts: cDot11WidsWepReplays.setDescription("This object counts the total number of WEP Replay errors observed in the data communication between this 802.11 station and the client indicated by cDot11WidsClientMacAddress since the client's association with this 802.11 station at the radio interface identified by ifIndex. ") cDot11WidsWepIcvErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 456, 1, 2, 1, 1, 11), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cDot11WidsWepIcvErrors.setStatus('current') if mibBuilder.loadTexts: cDot11WidsWepIcvErrors.setDescription("This object counts the total number of WEP ICV errors observed in the data communication between this 802.11 station and the client indicated by cDot11WidsClientMacAddress since the client's association with this 802.11 station at the radio interface identified by ifIndex. ") cDot11WidsCkipReplays = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 456, 1, 2, 1, 1, 12), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cDot11WidsCkipReplays.setStatus('current') if mibBuilder.loadTexts: cDot11WidsCkipReplays.setDescription("This object counts the total number of CKIP replay errors observed in the data communication between this 802.11 station and the client indicated by cDot11WidsClientMacAddress since the client's association with this 802.11 station at the radio interface identified by ifIndex. ") cDot11WidsCkipCmicErrors = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 456, 1, 2, 1, 1, 13), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: cDot11WidsCkipCmicErrors.setStatus('current') if mibBuilder.loadTexts: cDot11WidsCkipCmicErrors.setDescription("This object counts the total number of CKIP-CMIC errors observed in the data communication between this 802.11 station and the client indicated by cDot11WidsClientMacAddress since the client's association with this 802.11 station at the radio interface identified by ifIndex. ") ciscoDot11WidsMIBCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 456, 2, 1, 1)).setObjects(("CISCO-DOT11-WIDS-MIB", "ciscoDot11WidsAuthFailGroup"), ("CISCO-DOT11-WIDS-MIB", "ciscoDot11WidsProtectFailGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoDot11WidsMIBCompliance = ciscoDot11WidsMIBCompliance.setStatus('current') if mibBuilder.loadTexts: ciscoDot11WidsMIBCompliance.setDescription('The compliance statement for the SNMP entities that implement the ciscoDot11WidsMIB module.') ciscoDot11WidsAuthFailGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 456, 2, 2, 1)).setObjects(("CISCO-DOT11-WIDS-MIB", "cDot11WidsFloodDetectEnable"), ("CISCO-DOT11-WIDS-MIB", "cDot11WidsEapolFloodThreshold"), ("CISCO-DOT11-WIDS-MIB", "cDot11WidsEapolFloodInterval"), ("CISCO-DOT11-WIDS-MIB", "cDot11WidsBlackListThreshold"), ("CISCO-DOT11-WIDS-MIB", "cDot11WidsBlackListDuration"), ("CISCO-DOT11-WIDS-MIB", "cDot11WidsFloodMaxEntriesPerIntf"), ("CISCO-DOT11-WIDS-MIB", "cDot11WidsEapolFloodTotalCount"), ("CISCO-DOT11-WIDS-MIB", "cDot11WidsEapolFloodClientMac"), ("CISCO-DOT11-WIDS-MIB", "cDot11WidsEapolFloodClientCount"), ("CISCO-DOT11-WIDS-MIB", "cDot11WidsEapolFloodStartTime"), ("CISCO-DOT11-WIDS-MIB", "cDot11WidsEapolFloodStopTime"), ("CISCO-DOT11-WIDS-MIB", "cDot11WidsBlackListAttemptCount"), ("CISCO-DOT11-WIDS-MIB", "cDot11WidsBlackListTime")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoDot11WidsAuthFailGroup = ciscoDot11WidsAuthFailGroup.setStatus('current') if mibBuilder.loadTexts: ciscoDot11WidsAuthFailGroup.setDescription('This collection of objects provide information about configuration needed on the 802.11 station to detect the EAPOL flood attacks and black-list clients, the general statistics about the detected flood flood attacks and the information about the blacklisted clients. ') ciscoDot11WidsProtectFailGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 456, 2, 2, 2)).setObjects(("CISCO-DOT11-WIDS-MIB", "cDot11WidsSelPairWiseCipher"), ("CISCO-DOT11-WIDS-MIB", "cDot11WidsTkipIcvErrors"), ("CISCO-DOT11-WIDS-MIB", "cDot11WidsTkipLocalMicFailures"), ("CISCO-DOT11-WIDS-MIB", "cDot11WidsTkipRemoteMicFailures"), ("CISCO-DOT11-WIDS-MIB", "cDot11WidsCcmpReplays"), ("CISCO-DOT11-WIDS-MIB", "cDot11WidsCcmpDecryptErrors"), ("CISCO-DOT11-WIDS-MIB", "cDot11WidsTkipReplays"), ("CISCO-DOT11-WIDS-MIB", "cDot11WidsWepReplays"), ("CISCO-DOT11-WIDS-MIB", "cDot11WidsWepIcvErrors"), ("CISCO-DOT11-WIDS-MIB", "cDot11WidsCkipReplays"), ("CISCO-DOT11-WIDS-MIB", "cDot11WidsCkipCmicErrors")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoDot11WidsProtectFailGroup = ciscoDot11WidsProtectFailGroup.setStatus('current') if mibBuilder.loadTexts: ciscoDot11WidsProtectFailGroup.setDescription("This collection of objects provide information about the various protection failures observed during the associated clients' data communications with this 802.11 station. ") mibBuilder.exportSymbols("CISCO-DOT11-WIDS-MIB", cDot11WidsCkipReplays=cDot11WidsCkipReplays, cDot11WidsEapolFloodStopTime=cDot11WidsEapolFloodStopTime, ciscoDot11WidsProtectFailures=ciscoDot11WidsProtectFailures, cDot11WidsClientMacAddress=cDot11WidsClientMacAddress, cDot11WidsEapolFloodInterval=cDot11WidsEapolFloodInterval, cDot11WidsTkipReplays=cDot11WidsTkipReplays, cDot11WidsTkipRemoteMicFailures=cDot11WidsTkipRemoteMicFailures, cDot11WidsEapolFloodThreshold=cDot11WidsEapolFloodThreshold, ciscoDot11WidsMIBCompliance=ciscoDot11WidsMIBCompliance, cDot11WidsProtectFailClientTable=cDot11WidsProtectFailClientTable, cDot11WidsBlackListTable=cDot11WidsBlackListTable, ciscoDot11WidsAuthFailGroup=ciscoDot11WidsAuthFailGroup, ciscoDot11WidsMIBNotifs=ciscoDot11WidsMIBNotifs, cDot11WidsBlackListAttemptCount=cDot11WidsBlackListAttemptCount, cDot11WidsBlackListThreshold=cDot11WidsBlackListThreshold, cDot11WidsWepReplays=cDot11WidsWepReplays, ciscoDot11WidsMIBCompliances=ciscoDot11WidsMIBCompliances, cDot11WidsBlackListTime=cDot11WidsBlackListTime, ciscoDot11WidsMIB=ciscoDot11WidsMIB, cDot11WidsSsid=cDot11WidsSsid, cDot11WidsEapolFloodStartTime=cDot11WidsEapolFloodStartTime, cDot11WidsEapolFloodTable=cDot11WidsEapolFloodTable, ciscoDot11WidsMIBObjects=ciscoDot11WidsMIBObjects, ciscoDot11WidsProtectFailGroup=ciscoDot11WidsProtectFailGroup, cDot11WidsEapolFloodClientMac=cDot11WidsEapolFloodClientMac, cDot11WidsEapolFloodClientCount=cDot11WidsEapolFloodClientCount, cDot11WidsFloodMaxEntriesPerIntf=cDot11WidsFloodMaxEntriesPerIntf, cDot11WidsEapolFloodIndex=cDot11WidsEapolFloodIndex, ciscoDot11WidsAuthFailures=ciscoDot11WidsAuthFailures, cDot11WidsCcmpDecryptErrors=cDot11WidsCcmpDecryptErrors, cDot11WidsCkipCmicErrors=cDot11WidsCkipCmicErrors, cDot11WidsTkipIcvErrors=cDot11WidsTkipIcvErrors, cDot11WidsTkipLocalMicFailures=cDot11WidsTkipLocalMicFailures, cDot11WidsEapolFloodEntry=cDot11WidsEapolFloodEntry, cDot11WidsEapolFloodTotalCount=cDot11WidsEapolFloodTotalCount, cDot11WidsCcmpReplays=cDot11WidsCcmpReplays, cDot11WidsWepIcvErrors=cDot11WidsWepIcvErrors, ciscoDot11WidsMIBGroups=ciscoDot11WidsMIBGroups, cDot11WidsSelPairWiseCipher=cDot11WidsSelPairWiseCipher, cDot11WidsBlackListEntry=cDot11WidsBlackListEntry, PYSNMP_MODULE_ID=ciscoDot11WidsMIB, cDot11WidsBlackListDuration=cDot11WidsBlackListDuration, cDot11WidsProtectFailClientEntry=cDot11WidsProtectFailClientEntry, cDot11WidsFloodDetectEnable=cDot11WidsFloodDetectEnable, cDot11WidsBlackListClientMac=cDot11WidsBlackListClientMac, ciscoDot11WidsMIBConform=ciscoDot11WidsMIBConform)
237.785235
4,519
0.803613
4,466
35,430
6.374832
0.149798
0.032455
0.056797
0.006322
0.395855
0.299122
0.261503
0.240674
0.220618
0.193994
0
0.058943
0.113661
35,430
148
4,520
239.391892
0.847658
0.009427
0
0.028777
0
0.258993
0.579103
0.060507
0
0
0
0
0
1
0
false
0.007194
0.057554
0
0.057554
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
8b5b19b0b10679567a8bdf22213c972e5a67cbdc
207
py
Python
rockit/plugins/razberry/constants.py
acreations/rockit-server
4d1e87b563d9339e73bf0e5c698a59e8e124cc01
[ "MIT" ]
null
null
null
rockit/plugins/razberry/constants.py
acreations/rockit-server
4d1e87b563d9339e73bf0e5c698a59e8e124cc01
[ "MIT" ]
null
null
null
rockit/plugins/razberry/constants.py
acreations/rockit-server
4d1e87b563d9339e73bf0e5c698a59e8e124cc01
[ "MIT" ]
null
null
null
SETTING_SERVER_CLOCK = "RAZBERRY_CLOCK" SETTING_SERVER_TIME = "RAZBERRY_TIME" SETTING_LAST_UPDATE = "LAST_UPDATED" SETTING_SERVER_ADDRRESS = "RAZBERRY_SERVER" SETTING_SERVICE_TIMEOUT = "SERVICE_TIMEOUT"
25.875
43
0.835749
25
207
6.32
0.44
0.246835
0
0
0
0
0
0
0
0
0
0
0.091787
207
8
44
25.875
0.840426
0
0
0
0
0
0.333333
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
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
3
8b657fa6647f7652f54a78bead95f6ab969517bb
616
py
Python
tests/django-files/one-to-many/models.py
gecBurton/djangorestframework-jsonschema
00d78ac3171a6924b94fa50acd4d3d936f2d0c69
[ "0BSD" ]
7
2020-10-02T13:49:30.000Z
2021-05-12T06:51:01.000Z
tests/django-files/one-to-many/models.py
gecBurton/djangorestframework-jsonschema
00d78ac3171a6924b94fa50acd4d3d936f2d0c69
[ "0BSD" ]
5
2020-05-17T20:17:07.000Z
2021-05-31T14:19:33.000Z
tests/django-files/one-to-many/models.py
gecBurton/djangorestframework-jsonschema
00d78ac3171a6924b94fa50acd4d3d936f2d0c69
[ "0BSD" ]
null
null
null
import uuid from django.core import validators from django.db import models from jsonschema2dj.valdiators import JSONSchemaValidator try: from django.contrib.postgres.fields import JSONField except ImportError: pass import pathlib DEFINITIONS = str(pathlib.Path(__file__).parent.absolute() / "schema.json") class PatientContact(models.Model): gender = models.CharField(null=True, max_length=6, choices=[('male', 'male'), ('female', 'female')]) patient = models.ForeignKey("Patient", null=True, on_delete=models.CASCADE) class Patient(models.Model): birthDate = models.DateField(null=True)
26.782609
104
0.75974
75
616
6.16
0.64
0.064935
0
0
0
0
0
0
0
0
0
0.003704
0.123377
616
22
105
28
0.851852
0
0
0
0
0
0.061688
0
0
0
0
0
0
1
0
false
0.066667
0.466667
0
0.8
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
1
0
1
0
0
3
8b678c101b6df4a51934c9413710a668362002a3
138
py
Python
payments/utils/exeptions.py
Shopyangu-engineering/Shopyangu-Payments
2a9d0b4583f2b8cc473c6e2b3a36bc4aad1194bb
[ "BSD-3-Clause" ]
null
null
null
payments/utils/exeptions.py
Shopyangu-engineering/Shopyangu-Payments
2a9d0b4583f2b8cc473c6e2b3a36bc4aad1194bb
[ "BSD-3-Clause" ]
null
null
null
payments/utils/exeptions.py
Shopyangu-engineering/Shopyangu-Payments
2a9d0b4583f2b8cc473c6e2b3a36bc4aad1194bb
[ "BSD-3-Clause" ]
null
null
null
class PaymentError(Exception): pass class MpesaError(PaymentError): pass class InvalidTransactionAmount(MpesaError): pass
12.545455
43
0.753623
12
138
8.666667
0.5
0.173077
0
0
0
0
0
0
0
0
0
0
0.181159
138
10
44
13.8
0.920354
0
0
0.5
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
3
8b7065be6c8fb4a75a29675132018242c9fdff56
1,145
py
Python
keyboards/inline/text_actions_inline.py
sololvey/editorbot
59511f460ad708b1372a506c62117538206a1a1a
[ "MIT" ]
2
2021-09-24T21:45:00.000Z
2021-09-27T15:30:14.000Z
keyboards/inline/text_actions_inline.py
vR4eslav/editorbot
59511f460ad708b1372a506c62117538206a1a1a
[ "MIT" ]
null
null
null
keyboards/inline/text_actions_inline.py
vR4eslav/editorbot
59511f460ad708b1372a506c62117538206a1a1a
[ "MIT" ]
1
2021-09-17T18:38:05.000Z
2021-09-17T18:38:05.000Z
from aiogram import types from loader import _ async def text_actions_keyboard(): markup = types.InlineKeyboardMarkup() btn1 = types.InlineKeyboardButton(text=_('📝 Посчитать символы 📝'), callback_data='count_symbols') btn2 = types.InlineKeyboardButton(text=_('📠 Посчитать слова 📠'), callback_data='count_words') markup.row(btn1, btn2) btn3 = types.InlineKeyboardButton(text=_('🔍 Проверить грамотность 🔍'), callback_data='check_spelling') btn4 = types.InlineKeyboardButton(text=_('🔁 Поменять регистр 🔁'), callback_data='change_register') markup.row(btn3, btn4) btn5 = types.InlineKeyboardButton(text=_('🔑 Сгенерировать надежный пароль 🔑'), callback_data='generate_password') markup.add(btn5) # btn6 = types.InlineKeyboardButton(text='✒️ Сделать рукописный текст ✒️', callback_data='text_to_hand') # text_actions_keyboard.add(btn6) btn7 = types.InlineKeyboardButton(text=_('🔥 ПЕРЕВЕСТИ ФОТО В ТЕКСТ(BETA) 🔥'), callback_data='photo_to_text') markup.add(btn7) btn9 = types.InlineKeyboardButton(text=_('🔙 НАЗАД В МЕНЮ 🔙'), callback_data='back_to_menu') markup.add(btn9) return markup
52.045455
117
0.734498
144
1,145
5.75
0.465278
0.241546
0.280193
0
0
0
0
0
0
0
0
0.016129
0.133624
1,145
21
118
54.52381
0.800403
0.117031
0
0
0
0
0.258929
0
0
0
0
0
0
1
0
false
0.058824
0.117647
0
0.176471
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
3
8bd3405e08b9ba1a14474725e9ec9e940bd1cca0
477
py
Python
L4-5.py
posguy99/comp644-fall2020
1d5419ee56ebf3e50d2912d9dbbda6e2f39b780d
[ "MIT" ]
null
null
null
L4-5.py
posguy99/comp644-fall2020
1d5419ee56ebf3e50d2912d9dbbda6e2f39b780d
[ "MIT" ]
null
null
null
L4-5.py
posguy99/comp644-fall2020
1d5419ee56ebf3e50d2912d9dbbda6e2f39b780d
[ "MIT" ]
null
null
null
# The mathematical modulo is used to calculate the remainder of the # integer division. As an example, 102%25 is 2. # Write a function that takes two values as parameters and returns # the calculation of a modulo from the two values. def mathematical_modulo(a, b): ''' divide a by b, return the remainder ''' return a % b print('Divide 100 by 25, remainder is: ', mathematical_modulo(100, 25)) print('Divide 102 by 25, remainder is: ', mathematical_modulo(102, 25))
36.692308
71
0.72956
77
477
4.480519
0.467532
0.208696
0.075362
0.086957
0.191304
0.191304
0
0
0
0
0
0.066838
0.184486
477
12
72
39.75
0.820051
0.551363
0
0
0
0
0.313725
0
0
0
0
0
0
1
0.25
false
0
0
0
0.5
0.5
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
1
0
3
8be00a13ca15610dc4ae8ec7109c13f7dd332985
518
py
Python
app/server/routes/your_api_token.py
garantor/ShortMe-URL-Shortener
4b7434f0d0fa658b67980c4950e9ecab90b8c396
[ "MIT" ]
25
2020-12-07T15:42:50.000Z
2022-03-05T06:07:51.000Z
app/server/routes/your_api_token.py
garantor/ShortMe-URL-Shortener
4b7434f0d0fa658b67980c4950e9ecab90b8c396
[ "MIT" ]
null
null
null
app/server/routes/your_api_token.py
garantor/ShortMe-URL-Shortener
4b7434f0d0fa658b67980c4950e9ecab90b8c396
[ "MIT" ]
9
2020-12-06T12:24:31.000Z
2022-03-14T07:48:06.000Z
# ------- 3rd party imports ------- from flask import Blueprint, render_template, request, url_for your_api_token_blueprint = Blueprint('your_api_token_blueprint', __name__, template_folder='templates') @your_api_token_blueprint.route('/your_api_token') def your_api_token(): auth_token = request.args.get("auth_token") if auth_token: return render_template('your_api_token.html', auth_token=auth_token) else: return render_template(url_for('page_not_found_blueprint.page_not_found'))
32.375
103
0.756757
71
518
5.028169
0.422535
0.117647
0.201681
0.176471
0
0
0
0
0
0
0
0.002208
0.125483
518
15
104
34.533333
0.785872
0.063707
0
0
0
0
0.240166
0.130435
0
0
0
0
0
1
0.111111
false
0
0.111111
0
0.444444
0.444444
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
3
473bdc180bff0e37a39dd9d16be11f2f2d777b72
864
py
Python
synthetic_test/BenchmarkSuite/src/direct_functions/classes/record_metrics.py
sritejakv/eval_CG
259b2d0ee39cbfe3c6961d7bbdeff8c135ec5712
[ "MIT" ]
null
null
null
synthetic_test/BenchmarkSuite/src/direct_functions/classes/record_metrics.py
sritejakv/eval_CG
259b2d0ee39cbfe3c6961d7bbdeff8c135ec5712
[ "MIT" ]
null
null
null
synthetic_test/BenchmarkSuite/src/direct_functions/classes/record_metrics.py
sritejakv/eval_CG
259b2d0ee39cbfe3c6961d7bbdeff8c135ec5712
[ "MIT" ]
null
null
null
""" :testcase_name record_metrics :author Sriteja Kummita :script_type class :description Metrics contains the getters and setter for precision and recall. RecordMetrics uses these methods to set and get the respective metrics. """ class Metrics: def __init__(self): self.precision = 0.0 self.recall = 0.0 def record_precision(self, p): self.precision = p def record_recall(self, r): self.recall = r def get_precision(self): return self.precision def get_recall(self): return self.recall class RecordMetrics: def __init__(self): self.m = Metrics() def record(self, p, r): self.m.record_precision(p) self.m.record_recall(r) def get_metrics(self): return self.m if __name__ == '__main__': obj = RecordMetrics() obj.record(10.0, 14.0)
20.093023
111
0.652778
116
864
4.637931
0.344828
0.037175
0.078067
0.055762
0
0
0
0
0
0
0
0.015504
0.253472
864
42
112
20.571429
0.818605
0.258102
0
0.086957
0
0
0.012638
0
0
0
0
0
0
1
0.347826
false
0
0
0.130435
0.565217
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
3
47420f6468e5ceb29189d0fdedac378cd46fd364
389
py
Python
trinity/chains/ropsten.py
jestersimpps/py-evm
6135904fb27b322619559e7637be40014ae254ac
[ "MIT" ]
null
null
null
trinity/chains/ropsten.py
jestersimpps/py-evm
6135904fb27b322619559e7637be40014ae254ac
[ "MIT" ]
null
null
null
trinity/chains/ropsten.py
jestersimpps/py-evm
6135904fb27b322619559e7637be40014ae254ac
[ "MIT" ]
null
null
null
from evm.chains.mainnet import MAINNET_VM_CONFIGURATION from evm.chains.ropsten import ROPSTEN_NETWORK_ID from p2p.lightchain import LightChain from typing import Type RopstenLightChain: Type[LightChain] = LightChain.configure( __name__='RopstenLightChain', vm_configuration=MAINNET_VM_CONFIGURATION, # TODO: use real ropsten configuration network_id=ROPSTEN_NETWORK_ID, )
29.923077
86
0.825193
47
389
6.531915
0.425532
0.14658
0.084691
0
0
0
0
0
0
0
0
0.002915
0.118252
389
12
87
32.416667
0.892128
0.092545
0
0
0
0
0.048433
0
0
0
0
0.083333
0
1
0
true
0
0.444444
0
0.444444
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
0
1
0
1
0
0
0
0
3
474c3b1f302b0420b76f325dbdf6adfb111d493a
2,228
py
Python
pipelineutilities/test/test_s3_sync.py
ndlib/mellon-manifest-pipeline
aa90494e73fbc30ce701771ac653d28d533217db
[ "Apache-2.0" ]
1
2021-06-27T15:16:13.000Z
2021-06-27T15:16:13.000Z
pipelineutilities/test/test_s3_sync.py
ndlib/marble-manifest-pipeline
abc036e4c81a8a5e938373a43153e2492a17cbf8
[ "Apache-2.0" ]
8
2019-11-05T18:58:23.000Z
2021-09-03T14:54:42.000Z
pipelineutilities/test/test_s3_sync.py
ndlib/mellon-manifest-pipeline
aa90494e73fbc30ce701771ac653d28d533217db
[ "Apache-2.0" ]
null
null
null
import _set_path # noqa import unittest import os from unittest.mock import patch import pipelineutilities.s3_sync class TestS3Sync(unittest.TestCase): def test_01_get_source_files_list(self): """ test _get_source_files_list """ local_folder = os.path.dirname(os.path.realpath(__file__)) files_list = pipelineutilities.s3_sync._get_source_files_list(local_folder) self.assertTrue(os.path.basename(__file__) in files_list) @patch('pipelineutilities.s3_sync._get_source_files_list') def test_02_patch_get_source_files_list(self, mock_get_source_files_list): local_folder = "/this/will/be/mocked" files_list_result = ['somedir/file.name'] mock_get_source_files_list.return_value = files_list_result files_list = pipelineutilities.s3_sync._get_source_files_list(local_folder) mock_get_source_files_list.assert_called_once_with(local_folder) self.assertTrue(files_list == files_list_result) @patch('pipelineutilities.s3_sync._get_source_files_list') def test_04_s3_sync(self, mock_get_source_files_list): files_list_result = ['somedir/file.name'] mock_get_source_files_list.return_value = files_list_result s3_bucket = "marble-manifest-prod-processbucket-13bond538rnnb" s3_root_key = "sites" local_folder_path = "/this/will/be/mocked" results = pipelineutilities.s3_sync.s3_sync(s3_bucket, s3_root_key, local_folder_path) mock_get_source_files_list.assert_called_once_with(local_folder_path) self.assertFalse(results) @patch('pipelineutilities.s3_sync._get_source_files_list') def test_05_s3_sync(self, mock_get_source_files_list): files_list_result = [os.path.basename(__file__)] mock_get_source_files_list.return_value = files_list_result s3_bucket = "fake_bucket_name" s3_root_key = "sites" local_folder_path = os.path.dirname(os.path.realpath(__file__)) results = pipelineutilities.s3_sync.s3_sync(s3_bucket, s3_root_key, local_folder_path) mock_get_source_files_list.assert_called_once_with(local_folder_path) self.assertFalse(results) if __name__ == '__main__': unittest.main()
44.56
94
0.75763
307
2,228
4.931596
0.198697
0.166447
0.157199
0.202114
0.777411
0.735139
0.691546
0.612285
0.612285
0.612285
0
0.018172
0.160233
2,228
49
95
45.469388
0.791021
0.01526
0
0.45
0
0
0.137174
0.087792
0
0
0
0
0.175
1
0.1
false
0
0.125
0
0.25
0
0
0
0
null
0
0
1
0
1
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
0
0
0
0
0
0
0
0
3
4752b64e5232efe90459a00ffbd4236ee75c32e8
1,106
py
Python
flowable_sdk/client.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
5
2019-07-31T04:11:05.000Z
2021-01-07T03:23:20.000Z
flowable_sdk/client.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
null
null
null
flowable_sdk/client.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import flowable_sdk.api.deployment.deployment_client import flowable_sdk.api.history.history_client import flowable_sdk.api.process_definition.process_definition_client import flowable_sdk.api.process_instance.process_instance_client import flowable_sdk.api.task.task_client class Client(object): def __init__(self, server_ip="", server_port=0, service_name=""): self.deployment = flowable_sdk.api.deployment.deployment_client.DeploymentClient(server_ip, server_port, service_name) self.history = flowable_sdk.api.history.history_client.HistoryClient(server_ip, server_port, service_name) self.process_definition = flowable_sdk.api.process_definition.process_definition_client.ProcessDefinitionClient(server_ip, server_port, service_name) self.process_instance = flowable_sdk.api.process_instance.process_instance_client.ProcessInstanceClient(server_ip, server_port, service_name) self.task = flowable_sdk.api.task.task_client.TaskClient(server_ip, server_port, service_name)
39.5
157
0.780289
136
1,106
5.963235
0.220588
0.135635
0.172626
0.133169
0.753391
0.738594
0.436498
0.355117
0
0
0
0.002099
0.138336
1,106
27
158
40.962963
0.848898
0.018987
0
0
0
0
0
0
0
0
0
0
0
1
0.083333
false
0
0.416667
0
0.583333
0
0
0
0
null
0
0
0
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
0
0
0
1
0
1
0
0
3
475937e389643b0d85a0203d017eb0f68e023291
1,001
py
Python
Python Basics/Conditional Statements Advanced/Exercise/Task04.py
DonikaChervenkova/SoftUni
bff579c037ec48f39ed193b34bc3502a32e90732
[ "MIT" ]
1
2022-03-16T10:23:04.000Z
2022-03-16T10:23:04.000Z
Python Basics/Conditional Statements Advance/Exercise/Task04.py
IvanTodorovBG/SoftUni
7b667f6905d9f695ab1484efbb02b6715f6d569e
[ "MIT" ]
null
null
null
Python Basics/Conditional Statements Advance/Exercise/Task04.py
IvanTodorovBG/SoftUni
7b667f6905d9f695ab1484efbb02b6715f6d569e
[ "MIT" ]
1
2021-12-04T12:30:57.000Z
2021-12-04T12:30:57.000Z
budget = int(input()) season = input() fisherman = int(input()) rent_price = 0 if season == "Spring": rent_price = 3000 elif season == "Summer" or season == "Autumn": rent_price = 4200 elif season == "Winter": rent_price = 2600 if fisherman <= 6: rent_price = rent_price - (rent_price * 0.1) elif 7 <= fisherman <= 11: rent_price = rent_price - (rent_price * 0.15) elif fisherman >= 12: rent_price = rent_price - (rent_price * 0.25) if fisherman % 2 == 0 and season == "Spring": rent_price = rent_price - (rent_price * 0.05) elif fisherman % 2 == 0 and season == "Summer": rent_price = rent_price - (rent_price * 0.05) elif fisherman % 2 == 0 and season == "Winter": rent_price = rent_price - (rent_price * 0.05) else: rent_price = rent_price if budget >= rent_price: extra_money = budget - rent_price print(f"Yes! You have {extra_money:.2f} leva left.") else: lack = rent_price - budget print(f"Not enough money! You need {lack:.2f} leva.")
29.441176
57
0.649351
150
1,001
4.14
0.286667
0.391304
0.272142
0.376812
0.389694
0.357488
0.357488
0.222222
0.173913
0.173913
0
0.055909
0.213786
1,001
34
57
29.441176
0.733164
0
0
0.166667
0
0
0.126747
0
0
0
0
0
0
1
0
false
0
0
0
0
0.066667
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
4766b0ed47cf9954cad66380f8f59d937f7365c7
7,710
py
Python
test_fovcoordinates.py
cdeil/astrometric_checks
3b5b480a9ba82e82fe7b450c08458c72db3320b5
[ "MIT" ]
null
null
null
test_fovcoordinates.py
cdeil/astrometric_checks
3b5b480a9ba82e82fe7b450c08458c72db3320b5
[ "MIT" ]
null
null
null
test_fovcoordinates.py
cdeil/astrometric_checks
3b5b480a9ba82e82fe7b450c08458c72db3320b5
[ "MIT" ]
null
null
null
#! /usr/bin/env python """ short script to test FoV coordinates from fits export """ import os import sys import numpy as np from astropy.table import Table # read in file and events hdu if not len(sys.argv)==2: sys.exit("Usage: python test_coordinates.py event-fits-file.fits") eventfile = sys.argv[1] if not os.path.isfile(eventfile): raise RuntimeError('\n file %s not found ...' %(infile)) else: print 'reading file %s...' %eventfile print ' ' table = Table.read(eventfile, hdu='EVENTS') # definitons and settings atol=1e-6 atol_nomsys=1e-1 DEG_TO_RAD = np.pi/180. RAD_TO_DEG = 180./np.pi ########################################################################### # test FOV_RADEC_LON/LAT ########################################################################### # get coordinates of tangential RADec system skyx_radec = table['SKYX_RADEC'].data skyy_radec = table['SKYY_RADEC'].data # get lon/lat fov coordinates in radec system lon_radec = table['FOV_RADEC_LON'].data lat_radec = table['FOV_RADEC_LAT'].data # calculate vector from radec lon/lat coordinates print 'Initialize vector from RADec lon/lat FoV coordinates' x = np.cos(lat_radec*DEG_TO_RAD)*np.cos(lon_radec*DEG_TO_RAD) y = np.cos(lat_radec*DEG_TO_RAD)*np.sin(lon_radec*DEG_TO_RAD) z = np.sin(lat_radec*DEG_TO_RAD) # test norm print '>> test norm of initialized vector' isnormed = np.allclose((x**2+y**2+z**2),1.) if isnormed: print '>> succeeded...' else: print '*** WARNING: could not verify norm' # calculate projection on tangential plane, use axis convention from tangential radec sys print 'Calculate projection on tangential plane' proj_x = np.divide(-z,x) * RAD_TO_DEG proj_y = np.divide(y,x) * RAD_TO_DEG # compare to coordinates of tangential RADec system print 'Compare to coordinates of tangential radec system' if np.allclose(skyx_radec, proj_x, atol=atol)and np.allclose(skyy_radec, proj_y, atol=atol): print'>> successfully verified lon/lat RADec FoV coordinates (agreement to coordinates of tangential RADec sys at level atol=%s)'%atol else: print'*** WARNING: no agreement between lon/lat RADec FoV coordinates and coordinates of tangential RADEC sys at level atol=%s)'%atol print ' ' ########################################################################### # test FOV_RADEC_THETA/PHI ########################################################################### # get theta/phi fov coordinates in radec system theta_radec = table['FOV_RADEC_THETA'].data phi_radec = table['FOV_RADEC_PHI'].data # calculate vector from radec theta/phi coordinates print 'Initialize vector from RADec offset FoV coordinates (THETA,PHI)' x = np.sin(theta_radec*DEG_TO_RAD)*np.cos(phi_radec*DEG_TO_RAD) y = np.sin(theta_radec*DEG_TO_RAD)*np.sin(phi_radec*DEG_TO_RAD) z = np.cos(theta_radec*DEG_TO_RAD) # test norm print '>> test norm of initialized vector' isnormed = np.allclose((x**2+y**2+z**2),1.) if isnormed: print '>> succeeded...' else: print '*** WARNING: could not verify norm' # calculate projection on tangential plane, use axis convention from tangential radec sys print 'Calculate projection on tangential plane' proj_x = np.divide(-y,z) * RAD_TO_DEG proj_y = np.divide(-x,z) * RAD_TO_DEG # compare to coordinates of tangential RADec system print 'Compare to coordinates of tangential radec system' if np.allclose(skyx_radec, proj_x, atol=atol)and np.allclose(skyy_radec, proj_y, atol=atol): print'>> successfully verified offset RADec FoV coordinates (agreement to coordinates of tangential RADec sys at level atol=%s)'%atol else: print'*** WARNING: no agreement between offset RADec FoV coordinates and coordinates of tangential RADEC sys at level atol=%s)'%atol print ' ' print '---------------------------------------------------------------------------------------------------------------------------' print ' ' ########################################################################### # test FOV_ALTAZ_LON/LAT ########################################################################### # get coordinates of tangential RADec system detx = table['DETX'].data dety = table['DETY'].data # get lon/lat fov coordinates in altaz system lon_altaz = table['FOV_ALTAZ_LON'].data lat_altaz = table['FOV_ALTAZ_LAT'].data # calculate vector from radec lon/lat coordinates print 'Initialize vector from AltAz lon/lat FoV coordinates' x = np.cos(lat_altaz*DEG_TO_RAD)*np.cos(lon_altaz*DEG_TO_RAD) y = np.cos(lat_altaz*DEG_TO_RAD)*np.sin(lon_altaz*DEG_TO_RAD) z = np.sin(lat_altaz*DEG_TO_RAD) # test norm print '>> test norm of initialized vector' isnormed = np.allclose((x**2+y**2+z**2),1.) if isnormed: print '>> succeeded...' else: print '*** WARNING: could not verify norm' # calculate projection on tangential plane, use axis convention from tangential radec sys print 'Calculate projection on tangential plane, switch sign due to conventions of nominal system' proj_x_lonlat = -(np.divide(-z,x) * RAD_TO_DEG) proj_y_lonlat = -(np.divide(y,x) * RAD_TO_DEG) # compare to coordinates of tangential RADec system print 'Compare to coordinates of nominal system' if np.allclose(detx, proj_x_lonlat, atol=atol_nomsys) and np.allclose(dety, proj_y_lonlat, atol=atol_nomsys): print'>> verified lon/lat AltAz FoV coordinates (agreement to coordinates of nominal sys at level atol=%s)'%atol_nomsys else: print'*** WARNING: no agreement between lon/lat RADec FoV coordinates and coordinates of nominal sys at level atol=%s)'%atol_nomsys print ' ' ########################################################################### # test FOV_ALTAZ_THETA/PHI ########################################################################### # get theta/phi fov coordinates in radec system theta_altaz = table['FOV_ALTAZ_THETA'].data phi_altaz = table['FOV_ALTAZ_PHI'].data # calculate vector from radec theta/phi coordinates print 'Initialize vector from AltAz offset FoV coordinates (THETA,PHI)' x = np.sin(theta_altaz*DEG_TO_RAD)*np.cos(phi_altaz*DEG_TO_RAD) y = np.sin(theta_altaz*DEG_TO_RAD)*np.sin(phi_altaz*DEG_TO_RAD) z = np.cos(theta_altaz*DEG_TO_RAD) # test norm print '>> test norm of initialized vector' isnormed = np.allclose((x**2+y**2+z**2),1.) if isnormed: print '>> succeeded...' else: print '*** WARNING: could not verify norm' # calculate projection on tangential plane, use axis convention from tangential radec sys print 'Calculate projection on tangential plane, switch sign du to conventions of nominal system' proj_x = -(np.divide(-y,z) * RAD_TO_DEG) proj_y = -(np.divide(-x,z) * RAD_TO_DEG) # compare to coordinates of tangential RADec system print 'Compare to coordinates of nominal system' if np.allclose(detx, proj_x, atol=atol_nomsys) and np.allclose(dety, proj_y, atol=atol_nomsys): print'>> verified offset AltAz FoV coordinates (agreement to coordinates of nominal sys at level atol=%s)'%atol_nomsys else: print'*** WARNING: no agreement between offset AltAz FoV coordinates and coordinates of nominal sys at level atol=%s)'%atol_nomsys print ' ' ########################################################################### # test agreement between FoV AltAz coordinates directly ########################################################################### print 'Test agreement of projected coordinates calculated from FOV_ALTAZ_LON/LAT and FOV_ALTAZ_THETA/PHI' print '(agreement to nominal system is only supposed at low level...)' if np.allclose(proj_x, proj_x_lonlat, atol=atol) and np.allclose(proj_y, proj_y_lonlat, atol=atol): print '>> succesfully verified agreement between AltAz FoV coordinates at level %s'%atol else: print '***WARNING: could not verify agreement at level atol=%s'%atol print ' '
37.609756
136
0.66965
1,118
7,710
4.474955
0.109123
0.020987
0.03358
0.06716
0.78293
0.755147
0.723366
0.675595
0.615631
0.578053
0
0.004141
0.122957
7,710
204
137
37.794118
0.735729
0.166278
0
0.394737
0
0.061404
0.461153
0.022019
0
0
0
0
0
0
null
null
0
0.035088
null
null
0.394737
0
0
0
null
0
0
0
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
3
476dcc143affb2c56d2ec34a397b817df8dfab5b
1,349
py
Python
aicsimageio/exceptions.py
ieivanov/aicsimageio
e3823c41ab4e873fef5381fd8a29b788b4dcb0d8
[ "BSD-3-Clause" ]
null
null
null
aicsimageio/exceptions.py
ieivanov/aicsimageio
e3823c41ab4e873fef5381fd8a29b788b4dcb0d8
[ "BSD-3-Clause" ]
null
null
null
aicsimageio/exceptions.py
ieivanov/aicsimageio
e3823c41ab4e873fef5381fd8a29b788b4dcb0d8
[ "BSD-3-Clause" ]
1
2020-05-31T21:41:30.000Z
2020-05-31T21:41:30.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- class UnsupportedFileFormatError(Exception): """ This exception is intended to communicate that the file extension is not one of the supported file types and cannot be parsed with AICSImage. """ def __init__(self, data, **kwargs): super().__init__(**kwargs) self.data = data def __str__(self): return f"AICSImage module does not support this image file type: '{self.data}'." class InvalidDimensionOrderingError(Exception): """ A general exception that can be thrown when handling dimension ordering or validation. Should be provided a message for the user to be given more context. """ def __init__(self, message: str, **kwargs): super().__init__(**kwargs) self.message = message def __str__(self): return self.message class ConflictingArgumentsError(Exception): """ This exception is returned when 2 arguments to the same function are in conflict. """ pass class InconsistentShapeError(Exception): """ A general function to use when the shape returned or requested from an array operation is invalid. """ pass class InconsistentPixelType(Exception): """ This exception is returned when the metadata has conflicting pixel types. """ pass
24.089286
88
0.677539
162
1,349
5.493827
0.537037
0.04382
0.074157
0.080899
0.137079
0.080899
0
0
0
0
0
0.001946
0.237954
1,349
55
89
24.527273
0.863813
0.440326
0
0.388889
0
0
0.105105
0
0
0
0
0
0
1
0.222222
false
0.166667
0
0.111111
0.611111
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
1
0
0
0
3
478a7f0848a3892fef669a578fc9dd34c169ac91
508
py
Python
eln/commands/weather/providers.py
lehvitus/eln
b78362af20cacffe076bf3dbfd27dcc090e43e39
[ "BSD-3-Clause" ]
2
2020-02-05T04:00:32.000Z
2020-03-18T02:12:33.000Z
eln/commands/weather/providers.py
oleoneto/eln
b78362af20cacffe076bf3dbfd27dcc090e43e39
[ "BSD-3-Clause" ]
1
2020-03-18T02:36:04.000Z
2020-03-18T02:36:04.000Z
eln/commands/weather/providers.py
oleoneto/eln
b78362af20cacffe076bf3dbfd27dcc090e43e39
[ "BSD-3-Clause" ]
null
null
null
# commands:weather:providers import requests from eln.decorators.weather_provider import weather_provider, PROVIDERS class UnsupportedProviderError(TypeError): """Unsupported provider""" def get_weather(provider, *args, **kwargs): if provider in PROVIDERS: return PROVIDERS[provider](*args, **kwargs) raise UnsupportedProviderError() @weather_provider def open_weather(*args, **kwargs): """OpenWeatherMap""" @weather_provider def dark_sky(*args, **kwargs): """DarkSky"""
20.32
71
0.734252
52
508
7.038462
0.5
0.204918
0.098361
0
0
0
0
0
0
0
0
0
0.143701
508
24
72
21.166667
0.841379
0.139764
0
0.181818
0
0
0
0
0
0
0
0
0
1
0.272727
false
0
0.181818
0
0.636364
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
3
47a139f99bd0e030dbfb60d718d68dc9cbbd51f4
210
py
Python
JDjango/api/common.py
JIYANG-PLUS/JDjango
57cbb13b2b4c07f34d546c0c637c22f60c1e692a
[ "MIT" ]
3
2020-12-28T05:09:02.000Z
2021-06-23T10:02:03.000Z
JDjango/api/common.py
JIYANG-PLUS/JDjango
57cbb13b2b4c07f34d546c0c637c22f60c1e692a
[ "MIT" ]
null
null
null
JDjango/api/common.py
JIYANG-PLUS/JDjango
57cbb13b2b4c07f34d546c0c637c22f60c1e692a
[ "MIT" ]
null
null
null
import os, json, glob, string from typing import Dict, List, Any, Tuple from functools import wraps from ._tools import * from ..api import retools from ..api import environment as env from ..settings import *
26.25
41
0.766667
32
210
5
0.625
0.0875
0.1625
0
0
0
0
0
0
0
0
0
0.161905
210
7
42
30
0.909091
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
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
3
47d88ac72583808925051908a7c078234c043767
4,710
py
Python
sdk/arena-python-sdk/arenasdk/training/job_builder.py
thliang01/arena
8ec9325f4927744bb10483dac0b9399faf12ef12
[ "ECL-2.0", "Apache-2.0" ]
502
2018-08-30T13:27:12.000Z
2022-03-17T01:59:52.000Z
sdk/arena-python-sdk/arenasdk/training/job_builder.py
thliang01/arena
8ec9325f4927744bb10483dac0b9399faf12ef12
[ "ECL-2.0", "Apache-2.0" ]
718
2018-08-30T13:15:39.000Z
2022-03-18T12:07:32.000Z
sdk/arena-python-sdk/arenasdk/training/job_builder.py
xieydd/arena
b2cd6c5287e8bdba4b91116c660c8b308cf496cf
[ "ECL-2.0", "Apache-2.0" ]
155
2018-09-02T12:56:18.000Z
2022-03-07T07:06:59.000Z
#!/usr/bin/env python from __future__ import annotations import abc from arenasdk.exceptions.arena_exception import ArenaException from arenasdk.fields.fields import * from arenasdk.enums.types import ArenaErrorType from arenasdk.enums.types import TrainingJobType from arenasdk.training.job import TrainingJob from typing import List from typing import Dict def process_items(items: List[str]): for item in items: print(item) class JobBuilder(metaclass=abc.ABCMeta): def __init__(self,job_type: TrainingJobType): self._job_type: TrainingJobType = job_type self._job_name = "" self._options: List[Field] = list() self._command = "" def build(self) -> TrainingJob: args = list() try: for field in self._options: if not isinstance(field,Field): raise ArenaException(ArenaErrorType.Unknown,"the type of option {} is not Field".format(field)) field.validate() for opt in field.options(): args.append(opt) return TrainingJob(self._job_name,self._job_type,args,self._command) except ArenaException as e: raise e def with_name(self,name: str) -> JobBuilder: self._job_name = name self._options.append(StringField("--name",name)) return self def with_image(self,image: str) -> JobBuilder: self._options.append(StringField("--image",image)) return self def with_workers(self,count: int) -> JobBuilder: self._options.append(StringField("--workers",str(count))) return self def with_image_pull_secrets(self,secrets: List[str]) -> JobBuilder: self._options.append(StringListField("--image-pull-secret",secrets)) return self def with_gpus(self,count: int) -> JobBuilder: self._options.append(StringField("--gpus",str(count))) return self def with_envs(self,envs: Dict[str,str]) -> JobBuilder: self._options.append(StringMapField("--env",envs,"=")) return self def with_node_selectors(self,selectors: Dict[str, str]) -> JobBuilder: self._options.append(StringMapField("--selector",selectors,"=")) return self def with_tolerations(self,tolerations: List[str]) -> JobBuilder: self._options.append(StringListField("--toleration",tolerations)) return self def with_config_files(self,files: Dict[str, str]) -> JobBuilder: self._options.append(StringMapField("--config-file",files,":")) return self def with_annotations(self,annotions: Dict[str, str]) -> JobBuilder: self._options.append(StringMapField("--annotation",annotions,"=")) return self def with_datas(self,datas: Dict[str,str]) -> JobBuilder: self._options.append(StringMapField("--data",datas,":")) return self def with_data_dirs(self,data_dirs: Dict[str, str]) -> JobBuilder: self._options.append(StringMapField("--data-dir",data_dirs,":")) return self def with_log_dir(self,dir: str) -> JobBuilder: self._options.append(StringField("--logdir",dir)) return self def with_priority(self,priority: str) -> JobBuilder: self._options.append(StringField("--priority",priority)) return self def enable_rdma(self) -> JobBuilder: self._options.append(BoolField("--rdma")) return self def with_sync_image(self,image: str) -> JobBuilder: self._options.append(StringField("--sync-image",image)) return self def with_sync_mode(self,mode: str) -> JobBuilder: self._options.append(StringField("--sync-mode",mode)) return self def with_sync_source(self,source: str) -> JobBuilder: self._options.append(StringField("--sync-source",source)) return self def enable_tensorboard(self) -> JobBuilder: self._options.append(BoolField("--tensorboard")) return self def with_tensorboard_image(self,image: str) -> JobBuilder: self._options.append(StringField("--tensorboard-image",image)) return self def with_working_dir(self,dir: str) -> JobBuilder: self._options.append(StringField("--working-dir",dir)) return self def with_retry_count(self,count: int) -> JobBuilder: self._options.append(StringField("--retry",str(count))) return self def enable_coscheduling(self) -> JobBuilder: self._options.append(BoolField("--gang")) return self def with_command(self,command: str) -> JobBuilder: self._command = command return self
35.681818
115
0.651168
536
4,710
5.557836
0.195896
0.092313
0.131252
0.199396
0.469956
0.407855
0.309836
0.245384
0.126553
0
0
0
0.226752
4,710
132
116
35.681818
0.817957
0.004246
0
0.23301
0
0
0.058209
0
0
0
0
0
0
1
0.262136
false
0
0.087379
0
0.601942
0.009709
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
3
47daa20d468bd8384b29d5bbdcfd8fe26bbd6ee1
90
py
Python
main.py
zkonge/must-typing
965a56b3a13d307b047b6dfd532145c06ab26745
[ "MIT" ]
13
2021-12-30T17:31:55.000Z
2022-02-19T02:02:16.000Z
main.py
zkonge/must-typing
965a56b3a13d307b047b6dfd532145c06ab26745
[ "MIT" ]
null
null
null
main.py
zkonge/must-typing
965a56b3a13d307b047b6dfd532145c06ab26745
[ "MIT" ]
null
null
null
import musttyping def f(): def f(): ... ... musttyping.must_typing()
7.5
24
0.5
9
90
4.888889
0.666667
0.181818
0
0
0
0
0
0
0
0
0
0
0.333333
90
11
25
8.181818
0.733333
0
0
0.666667
0
0
0
0
0
0
0
0
0
1
0.333333
true
0
0.166667
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
0
0
0
0
0
3
9a08d2646f329d136cdd480efcef24a5ab0cfc16
397
py
Python
tests/test_pitch.py
Nyirabazungu/pitcher-app
65f9a98d4df6a2966840d0703bf081aa27d3b324
[ "MIT" ]
null
null
null
tests/test_pitch.py
Nyirabazungu/pitcher-app
65f9a98d4df6a2966840d0703bf081aa27d3b324
[ "MIT" ]
null
null
null
tests/test_pitch.py
Nyirabazungu/pitcher-app
65f9a98d4df6a2966840d0703bf081aa27d3b324
[ "MIT" ]
null
null
null
# from app.models import Pitch,User # from app import db # def setUp(self): # self.user_James = User(username = 'James',password = 'potato', email = 'james@ms.com') # self.new_review = Review(movie_id=12345,movie_title='Review for movies',image_path="https://image.tmdb.org/t/p/w500/jdjdjdjn",movie_review='This movie is the best thing since sliced bread',user = self.user_James )
66.166667
223
0.715365
62
397
4.467742
0.677419
0.050542
0.093863
0
0
0
0
0
0
0
0
0.023529
0.143577
397
6
223
66.166667
0.791176
0.972292
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
3
9a14dd0b60488d94c00818556d412e35796f3eb9
4,506
py
Python
brutus.py
Bidon47/Brutus
75e3cb81acea0867bad6bc8c7a65ecfa27272ccf
[ "MIT" ]
null
null
null
brutus.py
Bidon47/Brutus
75e3cb81acea0867bad6bc8c7a65ecfa27272ccf
[ "MIT" ]
null
null
null
brutus.py
Bidon47/Brutus
75e3cb81acea0867bad6bc8c7a65ecfa27272ccf
[ "MIT" ]
null
null
null
import requests import sys import optparse def title(): print(''' \n BBBBBBBBBBBBBBBBB RRRRRRRRRRRRRRRRR UUUUUUUU UUUUUUUUTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUU UUUUUUUU SSSSSSSSSSSSSSS B::::::::::::::::B R::::::::::::::::R U::::::U U::::::UT:::::::::::::::::::::TU::::::U U::::::U SS:::::::::::::::S B::::::BBBBBB:::::B R::::::RRRRRR:::::R U::::::U U::::::UT:::::::::::::::::::::TU::::::U U::::::US:::::SSSSSS::::::S BB:::::B B:::::BRR:::::R R:::::RUU:::::U U:::::UUT:::::TT:::::::TT:::::TUU:::::U U:::::UUS:::::S SSSSSSS B::::B B:::::B R::::R R:::::R U:::::U U:::::U TTTTTT T:::::T TTTTTT U:::::U U:::::U S:::::S B::::B B:::::B R::::R R:::::R U:::::D D:::::U T:::::T U:::::D D:::::U S:::::S B::::BBBBBB:::::B R::::RRRRRR:::::R U:::::D D:::::U T:::::T U:::::D D:::::U S::::SSSS B:::::::::::::BB R:::::::::::::RR U:::::D D:::::U T:::::T U:::::D D:::::U SS::::::SSSSS B::::BBBBBB:::::B R::::RRRRRR:::::R U:::::D D:::::U T:::::T U:::::D D:::::U SSS::::::::SS B::::B B:::::B R::::R R:::::R U:::::D D:::::U T:::::T U:::::D D:::::U SSSSSS::::S B::::B B:::::B R::::R R:::::R U:::::D D:::::U T:::::T U:::::D D:::::U S:::::S B::::B B:::::B R::::R R:::::R U::::::U U::::::U T:::::T U::::::U U::::::U S:::::S BB:::::BBBBBB::::::BRR:::::R R:::::R U:::::::UUU:::::::U TT:::::::TT U:::::::UUU:::::::U SSSSSSS S:::::S B:::::::::::::::::B R::::::R R:::::R UU:::::::::::::UU T:::::::::T UU:::::::::::::UU S::::::SSSSSS:::::S B::::::::::::::::B R::::::R R:::::R UU:::::::::UU T:::::::::T UU:::::::::UU S:::::::::::::::SS BBBBBBBBBBBBBBBBB RRRRRRRR RRRRRRR UUUUUUUUU TTTTTTTTTTT UUUUUUUUU SSSSSSSSSSSSSSS By Bidon47 ''' ) def args(): parser = optparse.OptionParser() parser.add_option("-u", "--url", dest="address", help="URL address of site, with login panel") parser.add_option("-l", "--loginFormName", dest="login_form_name", help="Name of login form from html") parser.add_option("-p", "--passwordFormName", dest="password_form_name", help="Name of password form from html") parser.add_option("-w", "--wordlist", dest="wordlist", help="Passwords dictionary file") (options,agruments) = parser.parse_args() address = options.address login_form_name = options.login_form_name password_form_name = options.password_form_name if None in (address, login_form_name, password_form_name): print("[!] wrong args") print("Usage:\nbrutus.py -u <url> -l <login name in html form> -p <login name in html form> -w <wordlist>") sys.exit() try: f = open(options.wordlist, "r") wordlist = f.readlines() f.close() except: print("[!] Wrong wordlist file") sys.exit() return address, login_form_name, password_form_name, wordlist, options.wordlist def startBrutus(address, login_form_name, password_form_name, wordlist, wordlist_dir): s = requests.Session() test_login = input("Input login: ") login_data = { login_form_name: test_login, password_form_name:"definetly_not_pasword" } default_len = len( s.post(address , data=login_data).content ) print(f''' |###################################### |Starting Brute force password cracking |###################################### |URL: {address} |Login: {test_login} |Wordlist: {wordlist_dir} ''') i=0 while(True): # print(f"Attempt {i+1}") # print(f"Trying: '{wordlist[i]}' ") login_data ={ login_form_name: test_login, password_form_name: wordlist[i]} response = s.post(address, data=login_data) # print(response.status_code) if len(response.content) != default_len or response.status_code==302: print(f"[*]Password found!\n Password: {wordlist[i]}") break if i == len(wordlist)-1: print("[*]Password not found. Try to use different wordlist") break i=i+1 if __name__ == "__main__": title() (address, login_form_name, password_form_name, wordlist, wordlist_dir) = args() startBrutus(address, login_form_name, password_form_name, wordlist, wordlist_dir)
46.453608
125
0.481802
581
4,506
3.614458
0.22031
0.02381
0.021429
0.022857
0.380476
0.344762
0.277143
0.26
0.221905
0.221905
0
0.002635
0.242122
4,506
96
126
46.9375
0.612299
0.019086
0
0.136986
0
0.205479
0.648471
0.070215
0
0
0
0
0
1
0.041096
false
0.178082
0.041096
0
0.09589
0.09589
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
3
9a1ebfa817217c7cb37d3334b5e4cc774ec38bbf
395
py
Python
Recursive list functions/flatten_list.py
jatin69/mca101-OOPS
4a63d3e419a151e32b9894bf2c5590174363148b
[ "MIT" ]
null
null
null
Recursive list functions/flatten_list.py
jatin69/mca101-OOPS
4a63d3e419a151e32b9894bf2c5590174363148b
[ "MIT" ]
null
null
null
Recursive list functions/flatten_list.py
jatin69/mca101-OOPS
4a63d3e419a151e32b9894bf2c5590174363148b
[ "MIT" ]
null
null
null
def flatten_list(mylist,index=0,newlist=[]): if(index==len(mylist)): return newlist if(type(mylist[index])== list): newlist.extend(flatten_list(mylist[index],0,[])) else: newlist.append(mylist[index]) return flatten_list(mylist,index+1,newlist) mylist=[1,2,[3,4],[5,[6,7,[8]]],[],9] print(mylist) flat_list= flatten_list(mylist) print(flat_list)
21.944444
56
0.640506
57
395
4.333333
0.438596
0.222672
0.275304
0.267206
0.186235
0
0
0
0
0
0
0.036474
0.167089
395
17
57
23.235294
0.714286
0
0
0
0
0
0
0
0
0
0
0
0
1
0.083333
false
0
0
0
0.25
0.166667
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
9a2f2bafda3c8be21eb852ff42d14006a730e1da
767
py
Python
PhysicsTools/HeppyCore/python/framework/services/service.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
PhysicsTools/HeppyCore/python/framework/services/service.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
PhysicsTools/HeppyCore/python/framework/services/service.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
class Service(object): '''Basic service interface. If you want your own service, you should respect this interface so that your service can be used by the looper. ''' def __init__(self, cfg, comp, outdir): ''' cfg: framework.config.Service object containing whatever parameters you need comp: dummy parameter outdir: output directory for your service (feel free not to use it) Please have a look at TFileService for more information ''' def start(self): '''Start the service. Called by the looper, not by the user. ''' pass def stop(self): '''Stop the service. Called by the looper, not by the user. ''' pass
27.392857
75
0.597132
97
767
4.680412
0.587629
0.055066
0.072687
0.079295
0.189427
0.189427
0.189427
0.189427
0.189427
0.189427
0
0
0.33116
767
27
76
28.407407
0.88499
0.6206
0
0.333333
0
0
0
0
0
0
0
0
0
1
0.5
false
0.333333
0
0
0.666667
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
3
9a468cfb65adb0971eae7fca1553dacaadcb0cc9
204
wsgi
Python
files.old/camapp.wsgi
PiZep/timelapse_control
1e1d33cad02251b92df094e062a9cc8edb6ffade
[ "MIT" ]
null
null
null
files.old/camapp.wsgi
PiZep/timelapse_control
1e1d33cad02251b92df094e062a9cc8edb6ffade
[ "MIT" ]
null
null
null
files.old/camapp.wsgi
PiZep/timelapse_control
1e1d33cad02251b92df094e062a9cc8edb6ffade
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # coding: utf-8 import sys import logging logging.basicConfig(stream=sys.stderr) sys.path.insert(0, "/home/pi/projets/flask-video-streaming") from app import app as application
17
60
0.764706
32
204
4.875
0.8125
0
0
0
0
0
0
0
0
0
0
0.016484
0.107843
204
11
61
18.545455
0.840659
0.171569
0
0
0
0
0.228916
0.228916
0
0
0
0
0
1
0
true
0
0.6
0
0.6
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
3
9a6adc24ed48a017975ccdd34cc41e1c3c0a122e
205
py
Python
tools/stress.py
rbrich/termic
4d80f2f5b25404fffe7e181bd75b506bcc61458f
[ "Apache-2.0" ]
1
2022-01-13T10:19:13.000Z
2022-01-13T10:19:13.000Z
tools/stress.py
rbrich/termic
4d80f2f5b25404fffe7e181bd75b506bcc61458f
[ "Apache-2.0" ]
null
null
null
tools/stress.py
rbrich/termic
4d80f2f5b25404fffe7e181bd75b506bcc61458f
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # # Prints to stdout very fast. # # Optimal time: # time ./stress.py >/dev/null # Actual time: # time ./stress.py for i in range(1000000): print('\033[31;1m', i, '\033[0m')
17.083333
37
0.614634
33
205
3.818182
0.787879
0.126984
0.222222
0.253968
0
0
0
0
0
0
0
0.108434
0.190244
205
11
38
18.636364
0.650602
0.609756
0
0
0
0
0.236111
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
3
7bd04d95f3c1ef2dd1dcc3f2082b0c1196277ac6
83
py
Python
Chapter01/twine_error.py
PacktPublishing/Secret-Recipes-of-the-Python-Ninja
805d00c7a54927ba94c9077e9a580508ee3c5e56
[ "MIT" ]
13
2018-06-21T01:44:49.000Z
2021-12-01T10:49:53.000Z
Chapter01/twine_error.py
PacktPublishing/Secret-Recipes-of-the-Python-Ninja
805d00c7a54927ba94c9077e9a580508ee3c5e56
[ "MIT" ]
null
null
null
Chapter01/twine_error.py
PacktPublishing/Secret-Recipes-of-the-Python-Ninja
805d00c7a54927ba94c9077e9a580508ee3c5e56
[ "MIT" ]
6
2018-10-05T08:29:24.000Z
2022-01-11T14:49:50.000Z
HTTPError: 403 Client Error: You are not allowed to edit 'xyz' package information
41.5
82
0.795181
13
83
5.076923
1
0
0
0
0
0
0
0
0
0
0
0.042857
0.156627
83
1
83
83
0.9
0
0
0
0
0
0.036145
0
0
0
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
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
3
7bd5d02c4cc63a65688521c62fc74bd51f7042ef
21
py
Python
etc/pynamodb_settings.py
brystmar/breadsheet
cafdbddb116eb41813e6338f73540b72c60160e4
[ "MIT" ]
3
2019-06-22T00:13:21.000Z
2020-04-27T05:29:06.000Z
etc/pynamodb_settings.py
brystmar/breadsheet
cafdbddb116eb41813e6338f73540b72c60160e4
[ "MIT" ]
9
2019-08-24T21:21:55.000Z
2021-08-08T01:21:54.000Z
etc/pynamodb_settings.py
brystmar/breadsheet
cafdbddb116eb41813e6338f73540b72c60160e4
[ "MIT" ]
null
null
null
region = 'us-west-1'
10.5
20
0.619048
4
21
3.25
1
0
0
0
0
0
0
0
0
0
0
0.055556
0.142857
21
1
21
21
0.666667
0
0
0
0
0
0.428571
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
7bfa547f9e09fd38a0742aada7b4c29b279a999b
3,186
py
Python
_pycharm_skeletons/renderdoc/NewCaptureData.py
Lex-DRL/renderdoc-py-stubs
75d280e4f500ded506f3315a49fc432b37ab4fa6
[ "MIT" ]
null
null
null
_pycharm_skeletons/renderdoc/NewCaptureData.py
Lex-DRL/renderdoc-py-stubs
75d280e4f500ded506f3315a49fc432b37ab4fa6
[ "MIT" ]
null
null
null
_pycharm_skeletons/renderdoc/NewCaptureData.py
Lex-DRL/renderdoc-py-stubs
75d280e4f500ded506f3315a49fc432b37ab4fa6
[ "MIT" ]
null
null
null
# encoding: utf-8 # module renderdoc # from P:\1-Scripts\_Python\Py-Autocomplete\renderdoc.pyd # by generator 1.146 # no doc # imports import enum as __enum from .SwigPyObject import SwigPyObject class NewCaptureData(SwigPyObject): """ Information about the a new capture created by the target. """ def __eq__(self, *args, **kwargs): # real signature unknown """ Return self==value. """ pass def __ge__(self, *args, **kwargs): # real signature unknown """ Return self>=value. """ pass def __gt__(self, *args, **kwargs): # real signature unknown """ Return self>value. """ pass def __hash__(self, *args, **kwargs): # real signature unknown """ Return hash(self). """ pass def __init__(self, *args, **kwargs): # real signature unknown pass def __le__(self, *args, **kwargs): # real signature unknown """ Return self<=value. """ pass def __lt__(self, *args, **kwargs): # real signature unknown """ Return self<value. """ pass @staticmethod # known case of __new__ def __new__(*args, **kwargs): # real signature unknown """ Create and return a new object. See help(type) for accurate signature. """ pass def __ne__(self, *args, **kwargs): # real signature unknown """ Return self!=value. """ pass api = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """ The API used for this capture, if available. .. note:: May be empty if running with an older version of RenderDoc """ captureId = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """An identifier to use to refer to this capture.""" frameNumber = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """The frame number that this capture came from.""" local = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """``True`` if the target is running on the local system.""" path = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """The local path on the target system where the capture is saved.""" this = property(lambda self: object(), lambda self, v: None, lambda self: None) # default thisown = property(lambda self: object(), lambda self, v: None, lambda self: None) # default thumbHeight = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """The height of the image contained in :data:`thumbnail`.""" thumbnail = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """The raw bytes that contain the capture thumbnail, as RGB8 data.""" thumbWidth = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """The width of the image contained in :data:`thumbnail`.""" timestamp = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """The time the capture was created, as a unix timestamp in UTC.""" __dict__ = None # (!) real value is ''
34.630435
101
0.642185
408
3,186
4.89951
0.294118
0.165083
0.09905
0.132066
0.591796
0.576788
0.55978
0.505753
0.505753
0.505753
0
0.002859
0.231638
3,186
91
102
35.010989
0.813725
0.231638
0
0.264706
0
0
0
0
0
0
0
0
0
1
0.264706
false
0.264706
0.058824
0
0.705882
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
3
d007eb19cbfd5029447f2999fec51dc4b9abb6aa
114
py
Python
examples/hello_world.py
SatoshiIwasada/BlueDot
e93bc242593d3a3cbfd0ff97f98fcffb0fcd961a
[ "MIT" ]
112
2017-03-27T17:23:17.000Z
2022-03-13T09:51:43.000Z
examples/hello_world.py
SatoshiIwasada/BlueDot
e93bc242593d3a3cbfd0ff97f98fcffb0fcd961a
[ "MIT" ]
109
2017-03-29T11:19:54.000Z
2022-02-03T14:18:15.000Z
examples/hello_world.py
SatoshiIwasada/BlueDot
e93bc242593d3a3cbfd0ff97f98fcffb0fcd961a
[ "MIT" ]
40
2017-03-30T23:23:27.000Z
2022-01-21T17:09:11.000Z
from bluedot import BlueDot dot = BlueDot() dot.wait_for_press() print("You pressed the blue dot - Hello world")
19
47
0.754386
18
114
4.666667
0.777778
0.238095
0
0
0
0
0
0
0
0
0
0
0.149123
114
5
48
22.8
0.865979
0
0
0
0
0
0.333333
0
0
0
0
0
0
1
0
false
0
0.25
0
0.25
0.25
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
d015be6e30f246fb1eb5104b479629b4bd0e05cc
2,491
py
Python
justengel_theme/global_options.py
justengel/justengel_theme
56a7cf78c80d1b61c04d0f7a4e4bb62da37a0330
[ "MIT" ]
1
2020-11-12T06:13:30.000Z
2020-11-12T06:13:30.000Z
justengel_theme/global_options.py
justengel/justengel_theme
56a7cf78c80d1b61c04d0f7a4e4bb62da37a0330
[ "MIT" ]
null
null
null
justengel_theme/global_options.py
justengel/justengel_theme
56a7cf78c80d1b61c04d0f7a4e4bb62da37a0330
[ "MIT" ]
1
2022-03-13T02:44:39.000Z
2022-03-13T02:44:39.000Z
import os from starlette.background import BackgroundTask from .custom_template import ThemeTemplates __all__ = ['get_default_theme', 'set_default_theme', 'get_theme', 'set_theme', 'template', 'install_theme', 'add_directory', 'exists', 'set_defaults', 'get_context', 'with_theme', 'static', 'get_static_directories', 'serve_static', 'install_app'] THEME: ThemeTemplates = None DEFAULT_THEME: type = ThemeTemplates DEFAULT_KWARGS: dict = {} def get_default_theme() -> 'type': """Return the default theme type.""" global DEFAULT_THEME return DEFAULT_THEME def set_default_theme(theme_type, **default_kwargs): """Set the default theme type.""" global DEFAULT_THEME, DEFAULT_KWARGS DEFAULT_THEME = theme_type if len(default_kwargs) > 0: DEFAULT_KWARGS = default_kwargs def get_theme() -> 'ThemeTemplates': global THEME, DEFAULT_THEME, DEFAULT_KWARGS if THEME is None: THEME = DEFAULT_THEME(**DEFAULT_KWARGS) return THEME def set_theme(tmp): global THEME THEME = tmp return THEME def template(name: str, context: dict, status_code: int = 200, headers: dict = None, media_type: str = None, background: BackgroundTask = None, **kwargs): return get_theme().TemplateResponse(name, context, status_code=status_code, headers=headers, media_type=media_type, background=background, **kwargs) def install_theme(name: str, directory: str = None): return get_theme().install_theme(name, directory=directory) def add_directory(directory: str, index: int = None): return get_theme().add_directory(directory, index=index) def exists(template: str) -> bool: return get_theme().exists(template) def set_defaults(**kwargs): return get_theme().set_defaults(**kwargs) def get_context(**kwargs) -> dict: return get_theme().get_context(**kwargs) def with_theme(self, name) -> str: return get_theme().with_theme(name) def static(url: str, static_url: str = None) -> str: return get_theme().static(url, static_url=static_url) def get_static_directories(): """Iterator for static directories.""" return get_theme().get_static_directories() def serve_static(app, static_url: str = None): return get_theme().serve_static(app, static_url=static_url) def install_app(app, serve_static: bool = False, **kwargs) -> 'ThemeTemplates': return get_theme().install_app(app, serve_static=serve_static, **kwargs)
28.306818
108
0.708952
317
2,491
5.29653
0.170347
0.092912
0.091721
0.044669
0.180465
0.044074
0.044074
0
0
0
0
0.001945
0.174227
2,491
87
109
28.632184
0.814293
0.036532
0
0.04
0
0
0.087248
0.009228
0
0
0
0
0
1
0.3
false
0
0.06
0.2
0.64
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
3
d0179c8c5ab3e30321989b0b805cad72c515df37
57
py
Python
tenant_message/__init__.py
smegurus/smegurus-django
053973b5ff0b997c52bfaca8daf8e07db64a877c
[ "BSD-4-Clause" ]
1
2020-07-16T10:58:23.000Z
2020-07-16T10:58:23.000Z
tenant_message/__init__.py
smegurus/smegurus-django
053973b5ff0b997c52bfaca8daf8e07db64a877c
[ "BSD-4-Clause" ]
13
2018-11-30T02:29:39.000Z
2022-03-11T23:35:49.000Z
tenant_message/__init__.py
smegurus/smegurus-django
053973b5ff0b997c52bfaca8daf8e07db64a877c
[ "BSD-4-Clause" ]
null
null
null
default_app_config = 'tenant_message.apps.MessageConfig'
28.5
56
0.859649
7
57
6.571429
1
0
0
0
0
0
0
0
0
0
0
0
0.052632
57
1
57
57
0.851852
0
0
0
0
0
0.578947
0.578947
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
d019170079dbfa7b7056aa613a28caf6cbb432ba
11,980
py
Python
ion-channel-models/method/priors.py
sanmitraghosh/fickleheart-method-tutorials
d5ee910258a2656951201d4ada2a412804013bd5
[ "BSD-3-Clause" ]
null
null
null
ion-channel-models/method/priors.py
sanmitraghosh/fickleheart-method-tutorials
d5ee910258a2656951201d4ada2a412804013bd5
[ "BSD-3-Clause" ]
null
null
null
ion-channel-models/method/priors.py
sanmitraghosh/fickleheart-method-tutorials
d5ee910258a2656951201d4ada2a412804013bd5
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python import sys sys.path.append('../lib/') import numpy as np import scipy.stats as stats import pints # # Set up prior for Model A # class ModelALogPrior(pints.LogPrior): """ Unnormalised prior with constraint on the rate constants. # Adapted from https://github.com/CardiacModelling/hERGRapidCharacterisation # Added parameter transformation everywhere """ def __init__(self, transform, inv_transform): super(ModelALogPrior, self).__init__() # Give it a big bound... self.lower_conductance = 1e2 * 1e-3 # pA/mV self.upper_conductance = 5e5 * 1e-3 # pA/mV self.lower_alpha = 1e-7 self.upper_alpha = 1e3 self.lower_beta = 1e-7 self.upper_beta = 0.4 self.lower = np.array([ self.lower_conductance, self.lower_alpha, self.lower_beta, self.lower_alpha, self.lower_beta, self.lower_alpha, self.lower_beta, self.lower_alpha, self.lower_beta, ]) self.upper = np.array([ self.upper_conductance, self.upper_alpha, self.upper_beta, self.upper_alpha, self.upper_beta, self.upper_alpha, self.upper_beta, self.upper_alpha, self.upper_beta, ]) self.minf = -float('inf') self.rmin = 1.67e-5 self.rmax = 1000 self.vmin = -120 self.vmax = 60 self.transform = transform self.inv_transform = inv_transform def n_parameters(self): return 8 + 1 def __call__(self, parameters): debug = False log_det_Jac = np.sum(parameters) # Jacobian adjustment, Note to Chon: You need this to get the correct probability parameters = self.transform(parameters) # Check parameter boundaries if np.any(parameters < self.lower): if debug: print('Lower') return self.minf if np.any(parameters > self.upper): if debug: print('Upper') return self.minf # Check rate constant boundaries g, p1, p2, p3, p4, p5, p6, p7, p8 = parameters[:] # Check forward rates r = p1 * np.exp(p2 * self.vmax) if np.any(r < self.rmin) or np.any(r > self.rmax): if debug: print('r1') return self.minf r = p5 * np.exp(p6 * self.vmax) if np.any(r < self.rmin) or np.any(r > self.rmax): if debug: print('r2') return self.minf # Check backward rates r = p3 * np.exp(-p4 * self.vmin) if np.any(r < self.rmin) or np.any(r > self.rmax): if debug: print('r3') return self.minf r = p7 * np.exp(-p8 * self.vmin) if np.any(r < self.rmin) or np.any(r > self.rmax): if debug: print('r4') return self.minf return 0 + log_det_Jac def _sample_partial(self, v): for i in range(100): a = np.exp(np.random.uniform( np.log(self.lower_alpha), np.log(self.upper_alpha))) b = np.random.uniform(self.lower_beta, self.upper_beta) r = a * np.exp(b * v) if r >= self.rmin and r <= self.rmax: return a, b raise ValueError('Too many iterations') def sample(self, n=1): out = np.zeros((n, self.n_parameters())) for i in range(n): p = np.zeros(self.n_parameters()) # Sample forward rates p[1:3] = self._sample_partial(self.vmax) p[5:7] = self._sample_partial(self.vmax) # Sample backward rates p[3:5] = self._sample_partial(-self.vmin) p[7:9] = self._sample_partial(-self.vmin) # Sample conductance p[0] = np.random.uniform( self.lower_conductance, self.upper_conductance) out[i, :] = self.inv_transform(p) # Return return out class ModelBLogPrior(pints.LogPrior): """ Unnormalised prior with constraint on the rate constants. """ def __init__(self, transform, inv_transform): super(ModelBLogPrior, self).__init__() # Give it a big bound... self.lower_conductance = 1e2 * 1e-3 # pA/mV self.upper_conductance = 5e5 * 1e-3 # pA/mV self.lower_alpha = 1e-7 self.upper_alpha = 1e3 self.lower_beta = 1e-7 self.upper_beta = 0.4 self.rmin = 1.67e-5 self.rmax = 1000 self.vmin = -120 self.vmax = 60 self.lower = np.array( [self.lower_conductance] + [self.lower_alpha, self.lower_beta] * 2 + [self.rmin] * 2 + [self.lower_alpha, self.lower_beta] * 2 ) self.upper = np.array( [self.upper_conductance] + [self.upper_alpha, self.upper_beta] * 2 + [self.rmax] * 2 + [self.upper_alpha, self.upper_beta] * 2 ) self.minf = -float('inf') self.transform = transform self.inv_transform = inv_transform def n_parameters(self): return 10 + 1 def __call__(self, parameters): debug = False log_det_Jac = np.sum(parameters) parameters = self.transform(parameters) # Check parameter boundaries if np.any(parameters < self.lower): if debug: print('Lower') return self.minf if np.any(parameters > self.upper): if debug: print('Upper') return self.minf for j in [1, 7]: # 2 pairs of rate constants in the form A*exp(B*V) # Check forward rates r = parameters[j] * np.exp(parameters[j + 1] * self.vmax) if np.any(r < self.rmin) or np.any(r > self.rmax): if debug: print('r with p%s and p%s' % (j, j + 1)) return self.minf # Check backward rates r = parameters[j + 2] * np.exp(-parameters[j + 3] * self.vmin) if np.any(r < self.rmin) or np.any(r > self.rmax): if debug: print('r with p%s and p%s' % (j + 2, j + 3)) return self.minf for j in [5, 6]: # 2 parameters are rate constants r = parameters[j] if np.any(r < self.rmin) or np.any(r > self.rmax): if debug: print('r with p%s' % (j)) return self.minf return 0 + log_det_Jac def _sample_partial(self, v): for i in range(100): a = np.exp(np.random.uniform( np.log(self.lower_alpha), np.log(self.upper_alpha))) b = np.random.uniform(self.lower_beta, self.upper_beta) r = a * np.exp(b * v) if r >= self.rmin and r <= self.rmax: return a, b raise ValueError('Too many iterations') def sample(self, n=1): out = np.zeros((n, self.n_parameters())) for i in range(n): p = np.zeros(self.n_parameters()) # Sample forward rates p[1:3] = self._sample_partial(self.vmax) p[7:9] = self._sample_partial(self.vmax) # Sample backward rates p[3:5] = self._sample_partial(-self.vmin) p[9:11] = self._sample_partial(-self.vmin) # rates p[5] = np.random.uniform(self.rmin, self.rmax) p[6] = np.random.uniform(self.rmin, self.rmax) # Sample conductance p[0] = np.random.uniform( self.lower_conductance, self.upper_conductance) out[i, :] = self.inv_transform(p) # Return return out # # Multiple priori # class MultiPriori(pints.LogPrior): """ Combine multiple priors """ def __init__(self, priors): self._priors = priors self._n_parameters = self._priors[0].n_parameters() for p in self._priors: assert(self._n_parameters == p.n_parameters()) def n_parameters(self): return self._n_parameters def __call__(self, x): t = 0 for p in self._priors: t += p(x) return t ##### Some useful priors ##### class HalfNormalLogPrior(pints.LogPrior): def __init__(self, sd, transform=False): super(HalfNormalLogPrior, self).__init__() # Test inputs if float(sd) <= 0: raise ValueError('Scale must be positive') self._sd = float(sd) self.n_params = 1 self.transform = transform def n_parameters(self): return self.n_params def __call__(self, x): if self.transform: Utx_x = np.exp(x) logp = stats.halfnorm.logpdf(Utx_x, scale=self._sd) + x else: logp = stats.halfnorm.logpdf(x, scale=self._sd) return logp def sample(self): if self.transform: sample = np.log(stats.halfnorm(scale=self._sd).rvs(1)) else: sample = stats.halfnorm(scale=self._sd).rvs(1) return sample class InverseGammaLogPrior(pints.LogPrior): def __init__(self, alpha, beta, transform = False): super(InverseGammaLogPrior, self).__init__() # Test inputs if (float(alpha) or float(beta)) <= 0: raise ValueError('Shape and Scale must be positive') self._alpha = float(alpha) self._beta = float(beta) self.n_params = 1 self.transform = transform def n_parameters(self): return self.n_params def __call__(self, x): if self.transform: Utx_x = np.exp(x) logp = stats.invgamma.logpdf(Utx_x,a=self._alpha,scale=self._beta) + x else: logp = stats.invgamma.logpdf(x,a=self._alpha,scale=self._beta) return logp def sample(self): if self.transform: sample = np.log(stats.invgamma(a=self._alpha,scale=self._beta).rvs(1) ) else: sample = stats.invgamma(a=self._alpha,scale=self._beta).rvs(1) return sample """ class ArmaLogPrior(pints.LogPrior): def __init__(self, armax_result, left, right, scale): super(ArmaLogPrior, self).__init__() self._location = np.zeros(len(armax_result.params) - 1) self._scale = float(scale) self.a = float(left) self.b = float(right) self.n_params = len(armax_result.params) - 1 def n_parameters(self): return self.n_params def __call__(self, x): return np.sum(stats.truncnorm.logpdf(x, self.a, self.b, self._location, self._scale) ) def sample(self) : return np.array(stats.truncnorm(self.a, self.b, self._location, self._scale).rvs()) """ class ArmaNormalCentredLogPrior(pints.LogPrior): def __init__(self, armax_result, scale): super(ArmaNormalCentredLogPrior, self).__init__() self._location = np.zeros(len(armax_result.params) - 1) self._scale = float(scale) self.n_params = len(armax_result.params) - 1 def n_parameters(self): return self.n_params def __call__(self, x): return np.sum(stats.norm.logpdf(x, self._location, self._scale) ) def sample(self) : return np.array(stats.norm(self._location, self._scale).rvs()) class ArmaNormalLogPrior(pints.LogPrior): def __init__(self, armax_result, scale): super(ArmaNormalLogPrior, self).__init__() self._location = armax_result.params[1:] self._scale = float(scale) self.n_params = len(armax_result.params) - 1 def n_parameters(self): return self.n_params def __call__(self, x): return np.sum( stats.norm.logpdf(x, self._location, abs(self._location)*self._scale) ) def sample(self) : return np.array(stats.norm(self._location, abs(self._location)*self._scale).rvs())
30.956072
123
0.56394
1,542
11,980
4.211414
0.129053
0.041577
0.012935
0.021558
0.779027
0.742686
0.727133
0.66292
0.645827
0.631968
0
0.018202
0.321285
11,980
386
124
31.036269
0.78047
0.076127
0
0.653846
0
0
0.01736
0
0
0
0
0
0.003846
1
0.111538
false
0
0.015385
0.042308
0.280769
0.042308
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
d01b27ce23d24ac155c3017599946b02f2271308
203
py
Python
setup.py
andrekupka/mjpeg-http-streamer
75a3252fe4920cd2026ffd1a8ec781c59747e4be
[ "MIT" ]
null
null
null
setup.py
andrekupka/mjpeg-http-streamer
75a3252fe4920cd2026ffd1a8ec781c59747e4be
[ "MIT" ]
null
null
null
setup.py
andrekupka/mjpeg-http-streamer
75a3252fe4920cd2026ffd1a8ec781c59747e4be
[ "MIT" ]
null
null
null
from setuptools import setup # Metadata goes in setup.cfg. These are here for GitHub's dependency graph. setup( name='mjpeg_http_streamer', install_requires=[ 'aiohttp >= 3.8.1' ] )
20.3
75
0.679803
28
203
4.821429
0.928571
0
0
0
0
0
0
0
0
0
0
0.018987
0.221675
203
9
76
22.555556
0.835443
0.359606
0
0
0
0
0.273438
0
0
0
0
0
0
1
0
true
0
0.142857
0
0.142857
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
3
d01c85411008116670259d74307173c0fd32bdf5
83
py
Python
py_kor/pk_utilities/implementation/path_dict.py
vladankor/core
ae23a4e47e487e55b0a44c415a45adc2e437f2a4
[ "MIT" ]
null
null
null
py_kor/pk_utilities/implementation/path_dict.py
vladankor/core
ae23a4e47e487e55b0a44c415a45adc2e437f2a4
[ "MIT" ]
null
null
null
py_kor/pk_utilities/implementation/path_dict.py
vladankor/core
ae23a4e47e487e55b0a44c415a45adc2e437f2a4
[ "MIT" ]
1
2021-01-30T13:58:22.000Z
2021-01-30T13:58:22.000Z
class PathDictionary(dict): def update(self): d = {} d.update()
20.75
27
0.53012
9
83
4.888889
0.777778
0
0
0
0
0
0
0
0
0
0
0
0.325301
83
4
28
20.75
0.785714
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
3