text
stringlengths
2
999k
"""Module for conveniently managing a DASK cluster. http://distributed.dask.org """ from distributed import Client import time from typing import List, Union, Optional from subprocess import Popen from lazycluster import RuntimeTask, Runtime, RuntimeGroup from lazycluster.cluster import MasterWorkerCluster, MasterLa...
# Generated by Django 3.0.3 on 2020-04-22 21:39 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('My_Account', '0003_auto_20200423_0036'), ] operations = [ migrations.AlterField( model_name='profile_model', name='B...
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyPythonMapnik(PythonPackage): """ Python bindings for mapnik """ homepage = ...
# Generated by Django 2.1.7 on 2019-04-27 07:55 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Model1', fields=[ ...
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/component/weapon/shared_parallel_weapon_targeting_computer.iff" res...
from flask import Flask # import flask obj from FLask app = Flask(__name__) #app obj; pass __name__ is name of file passed to Flask class @app.route('/') # decorator (does what? Bruno ~agreed to Devvin's "creates a path") for this app ; '/' is homepage def hello_world(): return 'Hello, World!' @app.route("/abou...
# parameters.py """ Exp 599 - {'Initial_genes': '500', 'Host_mutation_rate': '0.03', 'TE_progeny': '0.00, 0, 0.55, 1, 0.30, 2, 0.15, 3', 'TE_Insertion_Distribution': 'Flat()', 'Carrying_capacity': '300', 'TE_excision_rate': '0.5', 'Junk_BP': '14', 'Gene_Insertion_Distribution': 'Flat()', 'mutation_effect': '0.01', 'TE...
# Copyright (c) Microsoft Corporation and contributors. # Licensed under the MIT License. import pytest import numpy as np import fairlearn.metrics as metrics # ====================================================== y_true = [0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1] y_pred = [1, 0, 1, 0, 1, 0, 0, 1, 0,...
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # https://doc.scrapy.org/en/latest/topics/items.html import scrapy class G4GscraperItem(scrapy.Item): # define the fields for your item here like: title = scrapy.Field() content = scrapy.Field()
"""The tests for the Canary sensor platform.""" import copy import unittest from unittest.mock import Mock from homeassistant.components.canary import DATA_CANARY from homeassistant.components.sensor import canary from homeassistant.components.sensor.canary import CanarySensor, \ SENSOR_TYPES, ATTR_AIR_QUALITY, ST...
#!/usr/bin/python3 from pyrob.api import * @task def task_1_1(): move_right() move_right() move_down() if __name__ == '__main__': run_tasks()
import tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['Difference'] , ['PolyTrend'] , ['Seasonal_Second'] , ['MLP'] );
# Copyright 2019-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" fil...
"""compileio URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-bas...
import logging import pyhf from pyhf import events from pyhf.exceptions import InvalidModifier from pyhf.parameters import ParamViewer from pyhf.tensor.manager import get_backend log = logging.getLogger(__name__) def required_parset(sample_data, modifier_data): # count the number of bins with nonzero, positive ...
#!/usr/bin/env python3 """ ImageNet Training Script This is intended to be a lean and easily modifiable ImageNet training script that reproduces ImageNet training results with some of the latest networks and training techniques. It favours canonical PyTorch and standard Python style over trying to be able to 'do it al...
from pathlib import Path from typing import Any, Dict, List import ee import glom from ..collections import DistrictsCollection, ImageCollection from ..collections.image_collection import central_europe_filter from ..models import Clusterer from ..models.regressor import district_predictor from ..utils.bands import B...
#TODO: import error class class Family: ''' This is the class for Family. id is the only variable that is required. If other variable does not exist, it would return None If children does not exist, it would return an empty list all date value are passed in as str, and saved as tuple with formate (...
from ingest.ingest import Ingest import click @click.command() @click.option('--pdfs-path', type=str, help='Path to pdfs directory') @click.option('--target-path', type=str, help='Path to directory where images will be saved.') @click.option('--tmp-path', type=str, help='Path to a temporary directory') def prepare(pdf...
from pyvisdk.esxcli.executer import execute_soap from pyvisdk.esxcli.base import Base class SystemModuleParameters(Base): ''' Operations that allow manipulation of parameters of VMkernel loadable modules and device drivers. Operations include list and set options. ''' moid = 'ha-cli-handler-system-mod...
import torch from torch.distributions import constraints from torch.distributions.distribution import Distribution from torch.distributions.transforms import Transform from torch.distributions.utils import _sum_rightmost class TransformedDistribution(Distribution): r""" Extension of the Distribution class, wh...
########################################################################## # # Copyright (c) 2015, John Haddon. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of so...
from asyncio.tasks import sleep import discord from discord.ext import commands import asyncio import configparser from initialize import * import psycopg2 import json import os import csv root_url = os.path.dirname(os.getcwd()) config_parser = configparser.ConfigParser() config_parser.read('bot_config.ini') config =...
# 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 # distribu...
from .on_command import OnCommand from .on_ready import OnReady def init_listeners(client): client.add_cog(OnCommand(client)) client.add_cog(OnReady(client))
# File taken from https://github.com/regebro/tzlocal/blob/master/tzlocal/windows_tz.py on 2/4/2022 under the MIT license # This file is autogenerated by the update_windows_mapping.py script # Do not edit. win_tz = {'AUS Central Standard Time': 'Australia/Darwin', 'AUS Eastern Standard Time': 'Australia/Sydney', 'Afg...
#! /usr/bin/env python """ Script to guide project setup. The basic idea here is borrowed from the Sphinx project, and in fact a significant amount of the code in this file was borrowed from there too. """ import sys import os import time import re import os.path as op _ansi_re = re.compile('\x1b\\[(\\d\\d;){0,2}\\d...
#!/usr/bin/python3 # # Mifare NFC Python Module for Heiko # Copyright (C) 2019 Christian Carlowitz <chca@cmesh.de> # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 3 of t...
import pamqp import aiormq from aiormq import Channel, Connection Props = aiormq.spec.Basic.Properties DeliveredMessage = aiormq.types.DeliveredMessage ArgumentsType = aiormq.types.ArgumentsType GetEmpty, GetOk = aiormq.spec.Basic.GetEmpty, aiormq.spec.Basic.GetOk
""" Module: config """ import platform class Config(): """ General infos of your SDK """ def __init__(self): self.__version = "2.0.9" self.__user_agent = "MercadoPago Python SDK v" + self.__version self.__product_id = "bc32bpftrpp001u8nhlg" self.__tracking_id = "platfo...
# -*- coding: utf-8 -*- # Generated by Django 1.9.6 on 2016-10-20 14:30 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('projects', '0011_auto_20161006_1149'), ('projects', '0010_auto_20161019_1403'), ] op...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
""" Django settings for package_tracking project. Generated by 'django-admin startproject' using Django 2.1.3. For more information on this file, see https://docs.djangoproject.com/en/2.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.1/ref/settings/ """ imp...
# Copyright 2022 The jax3d Authors. # # 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 wr...
#!/usr/bin/env python # -*- coding: utf-8 -*- import re from setuptools import setup, find_packages version = None with open('jaeger_client/__init__.py', 'r') as f: for line in f: m = re.match(r'^__version__\s*=\s*(["\'])([^"\']+)\1', line) if m: version = m.group(2) break ...
""" This is a stripped down copy of pride.components.database""" import sqlite3 import contextlib import os import atexit class ArgumentError(Exception): """ Raised when a necessary argument was not supplied to a method call. """ def create_assignment_string(items): """ Helper function used by Database object...
def prefix_sums(A): n = len(A) P = [0] * (n + 1) for k in range(1, n + 1): P[k] = P[k - 1] + A[k - 1] return P def solution(A): max_slice = -30000 n = len(A) pref = prefix_sums(A) for x in range(0, n - 2): for y in range(x + 1, n - 1): for z in range(y + 1, ...
# http://www.scotlandscensus.gov.uk/ods-web/data-warehouse.html#bulkdatatab from collections import OrderedDict import csv import os from luigi import Parameter from lib.csv_stream import CSVNormalizerStream from lib.copy import copy_from_csv from tasks.base_tasks import RepoFileUnzipTask, TempTableTask from tasks.m...
""" Copyright (c) 2018-2022 Intel Corporation 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 wri...
import heuristics is_greedy = False goal = [] heuristic_fn = None def calc_fScore(h, g): return h if is_greedy else g + h
import streamlit as st from streamlit_gov_uk_components import gov_uk_checkbox_small st.subheader("Smaller checkbox") selected = gov_uk_checkbox_small("HM Revenue and Customs (HMRC)", "hmrc", default=True) st.markdown("Selected: %s" % selected) selected = gov_uk_checkbox_small("Employment Tribunal", "employment-trib...
# Copyright 2021 the Ithaca Authors # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
#!/usr/bin/python3 # -*- coding: UTF-8 -*- # File name : client.py # Description : client # Website : www.adeept.com # E-mail : support@adeept.com # Author : William # Date : 2018/08/22 from socket import * import sys import time import threading as thread import tkinter as tk ip_stu=1 ...
import json from datetime import datetime import jsonschema import mock import numpy import pytest import utils from aa import js EARLY_DATE = datetime(2001, 1, 1, 1, 1) LATE_DATE = datetime(2010, 2, 3, 4, 5) EMPTY_ARRAY = numpy.array((0,)) @pytest.fixture def json_fetcher(): return js.JsonFetcher("localhost",...
#!/usr/bin/env python import unittest from mkdocs.structure.toc import get_toc from mkdocs.tests.base import dedent, get_markdown_toc # class TableOfContentsTests(unittest.TestCase): class TableOfContentsTests: def test_indented_toc(self): md = dedent(""" # Heading 1 ## Heading 2 ...
import os import cv2 import sys import shutil import imutils import numpy as np from PIL import Image from tqdm import tqdm def mkdir(folder): if os.path.exists(folder): shutil.rmtree(folder) os.makedirs(folder) test_results_folder = './test_results' example_measure_imgs_path = './test_results/examp...
#!/usr/bin/env python # coding: utf-8 # Load the gamepad and time libraries import Gamepad import time # Gamepad settings gamepadType = Gamepad.PS4 buttonHappy = 'CROSS' buttonBeep = 'CIRCLE' buttonExit = 'PS' joystickSpeed = 'LEFT-Y' joystickSteering = 'RIGHT-X' # Wait for a connection if not Gamepad.available(): ...
from cc3d.core.Validation.PDESuiteTest import PDESuiteTestSteppable class PDESuiteTest1Steppable(PDESuiteTestSteppable): def __init__(self, frequency=1): super().__init__(frequency) self.error_contours = True self.compare_solvers = True # These names correspond to those given ...
"""Tests for various magic functions specific to the terminal frontend. Needs to be run by nose (to make ipython session available). """ #----------------------------------------------------------------------------- # Imports #----------------------------------------------------------------------------- import sys f...
import py import re pytest_plugins = 'pytester' ini = """ [pytest] describe_prefixes = foo bar """ def test_collect_custom_prefix(testdir): testdir.makeini(ini) a_dir = testdir.mkpydir('a_dir') a_dir.join('test_a.py').write(py.code.Source(""" def foo_scope(): def bar_context(): ...
# Copyright 2016 Twitter. All rights reserved. # # 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 agree...
from . import views from django.urls import path urlpatterns = [ path('create',views.create), # create method url path('',views.read), # read method url but here, null because type localhost show read view path('update/<id>',views.update), # update method url path('delete/<id>',views.delete), # delete ...
import unittest from unittest import mock from decimal import Decimal from electrum_scribe.util import create_and_start_event_loop from electrum_scribe.commands import Commands, eval_bool from electrum_scribe import storage from electrum_scribe.wallet import restore_wallet_from_text from electrum_scribe.simple_config ...
import sys import typing import bpy def add_simple_uvs(): '''Add cube map uvs on mesh ''' pass def add_texture_paint_slot(type: int = 'DIFFUSE_COLOR', name: str = "Untitled", width: int = 1024, height: int = 1024, ...
# -*- coding: utf-8 -*- # # PJP documentation build configuration file, created by # sphinx-quickstart on Tue Mar 13 15:16:07 2018. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All c...
import importlib import inspect import logging import os import pkgutil import shutil import requests from requests.adapters import HTTPAdapter from urllib3 import Retry from . import servers, trackers from .job import Job from .server import Server, TorrentHelper, Tracker from .servers.local import get_local_server_...
# Copyright (c) 2015, VMRaid Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import vmraid from vmraid import _ def get_monthly_results(goal_doctype, goal_field, date_col, filter_str, aggregation = 'sum'): '''Get monthly aggre...
# Copyright 2018 The Bazel Authors. All rights reserved. # # 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 la...
#!/usr/bin/env python3 import urllib from urllib.parse import urlparse from timer import Timer import json from datetime import datetime, timedelta import dateparser import argparse import selenium from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.ui import...
import tkinter as tk import time import SPCypher class SPCyGui(tk.Frame): def __init__(self, master=None): tk.Frame.__init__(self, master) self.pack() self.createWidgets() def createWidgets(self): instr = tk.Label(self, text = "Enter A, B, and Text, and hit the button.") ...
# Copyright 2020 Nexenta by DDN, Inc. All rights reserved. # # 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 requir...
from distutils.core import setup from setuptools import find_packages setup( name='cnavconstants', version='0.0.1', url='https://github.com/konradko/cnav-constants', packages=find_packages(), long_description=open('README.md').read(), )
#!/usr/bin/env python # -*- coding: utf-8 -*- ######################################################################## # # Copyright (c) 2021 Baidu.com, Inc. All Rights Reserved # # File: a.py # Author: suweiyue(suweiyue@baidu.com) # Date: 2021/04/13 21:58:37 # ##########################################################...
import unittest from app.models import Source class SourceTest(unittest.TestCase): def setUp(self): self.new_source = Source( 9090, 'abc', 'an app is about to come to life', 'https://newsapi.org/v1/sources', 'sport', 'en', 'au') def test_instance(self): self.assertTrue(isinstance(self.new_...
import os from seizurecast.data.tu_pystream import nedc_pystream as ps import numpy.testing as testing def test_nedc_load_parameters_lbl(): train_path = '../tusz_1_5_2/edf/train' tcp_type = '01_tcp_ar' patient_group = '023' patient = '00002348' session = 's008_2015_07_21' token = '00002348_s00...
""" WSGI config for pv_pro project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTIN...
#!/usr/bin/env python3 # Copyright (c) 2016-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test label RPCs. RPCs tested are: - getaddressesbylabel - listaddressgroupings - setlabel ...
######################################################################################################################## ### ### ### This module uses a width of max. 120 characters ...
import unittest from adjudicator.named_coast import NamedCoast from adjudicator.decisions import Outcomes from adjudicator.order import Move from adjudicator.piece import Army, Fleet from adjudicator.state import State from adjudicator.territory import CoastalTerritory, InlandTerritory, SeaTerritory class TestOrder(...
import compas.plugins @compas.plugins.plugin(category="install") def installable_rhino_packages(): return ["bf3dp_fab"]
import logging import sys import threading from django.core.management.base import BaseCommand from fastapp.executors.heartbeat import HeartbeatThread, inactivate, update_status, HEARTBEAT_QUEUE from fastapp.executors.async import AsyncResponseThread from fastapp.log import LogReceiverThread from django.conf import ...
import asyncio from fusionsid import Fun async def main(): roast = await Fun.roast() print(roast) complement = await Fun.compliment() print(complement) fact = await Fun.fact() print(fact) search = await Fun.reddit_search("discord bots") print(search) loop = asyncio.new_event_loop(...
#Auto Feat API import flask import json import featurfy import requests from featurfy.model import get_db, makeRequestEndpointHeaders, check_valid_access_tokens SPOTIFY_API_URL = 'https://api.spotify.com/v1' @featurfy.app.route('/api/v1/createbpmplaylist/', methods=['POST','GET']) def audio_feat_playlist(): ''' ...
# coding:utf-8 from nose.tools import * from mock import * import email import json from base64 import b64decode from flanker.mime import create from flanker.mime.message import errors from flanker.mime.message.part import MimePart from email.parser import Parser from ... import * def from_python_message_test():...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Combine JSON reference files.""" from __future__ import print_function from __future__ import division from __future__ import unicode_literals from __future__ import absolute_import import sys import codecs import logging import json logging.basicConfig(level=logging...
import click from patrol.config import ISSUE_STATUSES, SENTRY_API_TOKEN from patrol.patrol import Patrol from patrol.utils import print_json patrol = Patrol(SENTRY_API_TOKEN) @click.group() def cli(): pass @cli.command(help="Lists project events") @click.argument("organization") @click.argument("project_name")...
""" Notes: - 1. For the conv layer we have H' = H since H' = H+2p-k+1 = H' for p=1, k=3. i.e. same as previous layer - since stride=1 as default (so only moves by 1) since you want to see all the image for a conv. - 2. For the avg pool layer we have H' = H/2 i.e. half of previous layer - since stride=kernel_siz...
# This file is part of the NESi software. # # Copyright (c) 2020 # Original Software Design by Ilya Etingof <https://github.com/etingof>. # # Software adapted by inexio <https://github.com/inexio>. # - Janis Groß <https://github.com/unkn0wn-user> # - Philip Konrath <https://github.com/Connyko65> # - Alexander Dincher <...
#!/usr/bin/env python3 """ global user-defined variables """ data_folder: str = 'data' raw_data_folder: str = f'{data_folder}/raw_data' clean_data_folder: str = f'{data_folder}/clean_data' models_folder = f'{data_folder}/models' text_vectorization_folder = f'{models_folder}/vectorization' output_folder: str = 'output'...
# ***************************************************************************** # Copyright (c) 2019, Intel Corporation All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # Redistributions of sou...
# Generated by Django 3.1.4 on 2021-03-03 17:32 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('Main', '0024_auto_20210303_2028'), ] operations = [ migrations.RemoveField( model_name='product', name='size', ...
""" Sets up the terminal color scheme. """ from builtins import object import os import sys from google.appengine._internal.django.utils import termcolors def supports_color(): """ Returns True if the running system's terminal supports color, and False otherwise. """ unsupported_platform = (sys....
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: injective/ocr/v1beta1/genesis.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflecti...
from setuptools import setup setup(name='cloudynight', version='0.0.1', description='Cloud detection from allsky camera imaging', url='http://github.com/mommermi/cloudynight', author='Michael Mommert', author_email='mommermiscience@gmail.com', license='BSD-3 clause', packages=...
#!/usr/bin/env python2 # Copyright (c) 2014 The Phtevencoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test re-org scenarios with a mempool that contains transactions # that spend (directly or indirectly) ...
""" Support for Wink Covers. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/cover.wink/ """ from homeassistant.components.cover import CoverDevice from homeassistant.components.wink import WinkDevice, DOMAIN DEPENDENCIES = ['wink'] def setup_platform...
import unittest, os, tempfile from pygromos.files.topology import top from pygromos.tests.test_files.general_file_functions import general_file_tests from pygromos.utils import bash from pygromos.tests.in_testfiles import in_test_file_path root_in = in_test_file_path+"/top" in_path = root_in+"/test.top" simple_path ...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft and contributors. All rights reserved. # # 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 ...
''' Mac OS X implementations of various commands in the "desktop" interface ''' def __virtual__(): ''' Only load on Mac systems ''' if __grains__['os'] == 'MacOS': return 'desktop' return False def get_output_volume(): ''' Get the output volume (range 0 to 100) CLI Example: ...
# -*- coding: utf-8 -*- # # Copyright 2020 Chris Myers # # 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 ...
import base64 import hashlib import hmac import pickle from typing import Any import base65536 from telegram import MessageEntity from telegram.ext import BaseFilter from bot.const import HMAC_SECRET URL_BASE = 'https://ghbot.test/' class HMACException(Exception): pass def secure_encode_64(input_data: Any, s...
from anygraph import Many, One class Node(object): parent = One('children') children = Many('parent') if __name__ == '__main__': node_1 = Node() node_2 = Node() node_3 = Node() node_4 = Node() node_1.children = [node_2, node_3] node_2.children.include(node_4) node_4.parent = nod...
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.conch.ssh.forwarding}. """ from twisted.python.reflect import requireModule cryptography = requireModule("cryptography") if cryptography: from twisted.conch.ssh import forwarding from twisted.internet.address import...
import re from maza.core.exploit import * from maza.core.http.http_client import HTTPClient class Exploit(HTTPClient): __info__ = { "name": "Misfortune Cookie", "description": "Exploit implementation for Misfortune Cookie Authentication Bypass vulnerability.", "authors": ( "Che...
# import re # import sys # import os # import time # import errno # from datetime import datetime, timedelta # from termcolor import colored from playlist.inventories.json_inventory import JSONInventory from playlist.inventories.stdout_inventory import StdoutInventory from playlist.services.spotify_service import Spoti...
from dapodik import __semester__ from . import BaseAuth from . import BaseRest from . import BaseCustomrest from . import BaseBeranda from . import BaseValidasi from . import BasePesertaDidik from . import BaseGtk from . import BaseSarpras from . import BaseRombonganBelajar from . import BaseSekolah from .constants im...
"""Per-prefix data, mapping each prefix to a dict of locale:name. Auto-generated file, do not edit by hand. """ from ..util import u # Copyright (C) 2011-2019 The Libphonenumber Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Licens...
""" pygame-menu https://github.com/ppizarror/pygame-menu MENU Menu class. """ # File constants no. 0 __all__ = ['Menu'] import math import os import sys import time import pygame import pygame.gfxdraw as gfxdraw import pygame_menu.events as _events from pygame_menu._base import Base from pygame_menu._decorator imp...
""" Global Django exception and warning classes. """ class FieldDoesNotExist(Exception): """The requested model field does not exist""" pass class AppRegistryNotReady(Exception): """The django.apps registry is not populated yet""" pass class ObjectDoesNotExist(Exception): """Th...
import collections def breathFirst(data, grid, start, icon, dead_spaces): width = data['board']['width'] height = data['board']['height'] space = ' ' wall = 'x' goal = icon queue = collections.deque([[start]]) seen = set([start]) while queue: path = queue.poplef...