text
stringlengths
2
999k
# -*- coding: utf-8 -*- """ PyQtGraph - Scientific Graphics and GUI Library for Python www.pyqtgraph.org """ __version__ = '0.9.10' ### import all the goodies and add some helper functions for easy CLI use ## 'Qt' is a local module; it is intended mainly to cover up the differences ## between PyQt4 and PySide. from ...
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_bcrypt import Bcrypt from flask_login import LoginManager import json with open("/etc/make_meme/config.json") as config_file: config = json.load(config_file) app = Flask(__name__) app.config["SECRET_KEY"] = config["SECRET_KEY"] # CORS(app)...
import numpy as np import pytest import astropy.units as u from astropy.coordinates import SkyCoord from astropy.time import Time import sunpy.coordinates import sunpy.io import sunpy.map import sunpy.sun from sunpy.coordinates import sun from sunpy.data.test import get_dummy_map_from_header, get_test_filepath @pyt...
"""DBPool.py Implements a pool of cached connections to a database for any DB-API 2 compliant database module. This should result in a speedup for persistent applications like Webware. The pool of connections is threadsafe regardless of whether the used DB-API 2 general has a threadsafety of 1 or 2. For more informat...
# This app is for educational purpose only. Insights gained is not financial advice. Use at your own risk! import streamlit as st from PIL import Image import pandas as pd import base64 import matplotlib.pyplot as plt from bs4 import BeautifulSoup import requests import json import time import tweepy import datetime fr...
""" Retrying utilities. """ import time from typing import Callable, TypeVar T = TypeVar("T") def retry_while_false( func: Callable[[], T], attempts: int = 1, delay: float = 0.1, predicate: Callable[[T], bool] = bool, ) -> T: if attempts < 1: raise ValueError(f"`attempts` must be posit...
import matplotlib.pyplot as plt import aerosandbox.numpy as np from typing import Union, Callable from scipy.integrate import quad # Welcome to the unsteady aerodynamics library! # In here you will find analytical, time-domain models for the # unsteady lift response of thin airfoils. Here is a quick overview ...
# -*- coding: utf-8 -*- from django import forms from django.contrib.contenttypes.generic import BaseGenericInlineFormSet from django.contrib.contenttypes.models import ContentType from civil.library.utils.reload import force_reload from civil.library.fields.code import PythonCodeField from .models import ContentTyp...
from webull import webull, streamconn # cli.py import click import pickle import os HEADER = '\033[95m' BLUE = '\033[94m' CYAN = '\033[96m' GREEN = '\033[92m' WARNING = '\033[93m' FAIL = '\033[91m' ENDC = '\033[0m' BOLD = '\033[1m' UNDERLINE = '\033[4m' RED = '\u001b[31m' YELLOW = '\u001b[33m' MAGENTA = '\u001b[35m' S...
# Copyright (c) 2019-2021, NVIDIA CORPORATION & 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. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
# Copyright 2017 The TensorFlow 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 applica...
import json import re import subprocess import urllib.error import urllib.request import xml.etree.ElementTree as ET from pathlib import Path from typing import List, Optional, Tuple from urllib.parse import urljoin, urlparse from .error import NurError from .manifest import LockedVersion, Repo, RepoType def fetch_c...
# Function to add camera noise from typing import Optional import numpy from numpy.random import RandomState # from numpy.typing import ArrayLike def simulate_camera_image( photons_per_second, exposure_time_s: float = 0.20, quantum_efficiency: float = 0.82, gain: float = 2.22, gain_sigma: float...
from .bert import * # from .language_model import BERTLM
#!/usr/bin/env python import visvis as vv import numpy as np # Define angles angs = 0.1 + np.linspace(-90, 90, 181) # 0.1+ get rid of singularity angsRads = np.pi * angs / 180.0 # Define magnitude mag = 10 * np.log10(np.abs(np.sin(10 * angsRads) / angsRads)) + angsRads mag = mag - np.max(mag) # Plot two versions o...
VERSION = (0, 0, 2, "a", 0) # following PEP 386 DEV_N = None import os import sys from fnmatch import fnmatchcase from distutils.util import convert_path from setuptools import setup, find_packages def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() # Provided as an attribute, so...
#!/usr/bin/env python3 # # linearize-hashes.py: List blocks in a linear, no-fork version of the chain. # # Copyright (c) 2013-2018 The Pocketcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # from __future__ i...
import base64 import json import os import pathlib import sys import time from test.apps.openapi.schema import OpenAPIVersion from test.utils import HERE, SIMPLE_PATH from urllib.parse import urljoin import hypothesis import pytest import requests import trustme import yaml from _pytest.main import ExitCode from hypot...
# ----------------------------------------------------------------------------- # # Copyright 2013-2019 lispers.net - Dino Farinacci <farinacci@gmail.com> # # 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...
# -*- coding: utf-8 -*- from odoo import models, fields, api from odoo.exceptions import ValidationError class Catalog(models.Model): _name = 'crm.catalog' _description = "Catálogo" _parent_name = "parent_id" _parent_store = True _rec_name = 'complete_name' _order = 'complete_name' name ...
from distutils.core import setup setup( name='scintilla', version='0.0.3', packages=['scintilla'], url='https://github.com/goncaloccastro/scintilla', license='MIT', author='Gonçalo Castro', author_email='goncaloccastro@gmail.com', description='Scintilla - Generate DataFrames for propert...
""" WSGI config for DjFacilito 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.7/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "DjFacilito.settings") from django....
# -*- coding: utf-8 -*- import MySQLdb import re import nltk import pymorphy2 from indic_transliteration import sanscript from indic_transliteration.sanscript import transliterate from transliterate import translit, get_available_language_codes import requests import json from difflib import SequenceMatcher dictionary...
#!/usr/bin/env python # The main action server that provides local recovery behaviour from __future__ import print_function, division import pickle import rospy import actionlib from actionlib_msgs.msg import GoalStatus from assistance_msgs.msg import (RequestAssistanceAction, Reque...
# Generated by Django 2.1.3 on 2018-11-20 22:16 import django.core.validators from django.db import migrations, models import home.models class Migration(migrations.Migration): dependencies = [("home", "0002_better_satellites")] operations = [ migrations.CreateModel( name="GroundStation...
from django.conf import settings from django.db.models.signals import pre_save from django.dispatch import receiver from metaci.repository.models import Repository @receiver(pre_save, sender=Repository) def get_github_id(sender, **kwargs): repo = kwargs["instance"] if not repo.github_id: repo.github_i...
from sqlite3.dbapi2 import DatabaseError from flask import current_app as app from typing import Any import sqlite3 import os # TODO Think about unit testing for this. def db_edit(filename: str, folder: str, function: Any) -> Any: """Decorator function that automatically connects to the database.""" def wra...
# Copyright 2016 Google LLC # # 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, s...
import sqlite3, time from monocker_registry import settings #============================================================================== # creates the database and registry table #============================================================================== def createRegistryDB(): conn = sqlite3.connect(setting...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # Copyright (c) Yiming Wang # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Train a new model on one or across multiple GPUs. """ import logging import math import...
from craigsbot.boundary.helpers import ( create_boundary, is_coordinate_in_boundary, )
import torch.utils.data from torch.utils.data.dataloader import default_collate from torch_geometric.data import Data, Batch from torch._six import container_abcs, string_classes, int_classes class Collater(object): def __init__(self, follow_batch, exclude_keys): self.follow_batch = follow_batch ...
from flask_wtf import Form from wtforms.ext.sqlalchemy.fields import QuerySelectMultipleField, QuerySelectField from wtforms.fields import StringField, SubmitField, TextAreaField, SelectField from wtforms.validators import InputRequired from .. import db from ..models import ClubCategory, User class NewClubForm(Form...
import os import warnings import json import matplotlib.pyplot as plt from ..settings import simulator_settings from .line import Line class Plot: def __init__(self, path_to_models, sim): if not simulator_settings["show_plot"]: return self.path_to_models = path_to_models self.s...
import glob class ListaGen(object): def __init__(self, filenev): self.filenev = str(filenev) def gen(self): dirz = './xlsek' fajl = open(self.filenev, 'w') for file in glob.glob(dirz + "/*.xls"): fajl.write(file) fajl.write('\n') fajl.close() ...
# Copyright 2016 The TensorFlow 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 app...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ This class is an implementation of the BenchmarkModel interface (a python way of doing it, without decorations) It implements the actions necessary to prepare for the build, build, prepare for the run and run Dr. Ryutaro Himeno's benchmark. """ from ...
# coding=utf-8 # Copyright 2019 The Google Research 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 applicab...
#!/usr/bin/env python ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License")...
"""intranet URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-ba...
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # (C) British Crown Copyright 2017-2021 Met Office. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions a...
# uncompyle6 version 3.7.4 # Python bytecode 3.7 (3394) # Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)] # Embedded file name: T:\InGame\Gameplay\Scripts\Server\venues\lounge_zone_director.py # Compiled at: 2017-01-13 23:58:39 # Size of source mod 2**32: 390 by...
""" Django settings for Continuous_Integration project. Generated by 'django-admin startproject' using Django 2.1.7. 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/ ""...
from django.urls import path from django.conf.urls import url from . import views app_name = 'accounts' urlpatterns = [ url(r'^signup/', views.sign_up, name='signup'), url(r'^login/', views.show_login, name='login'), url(r'^logout/', views.show_logout, name='logout'), ]
import json import os from collections import defaultdict import numpy as np from .base import BaseParser from .utils import filter_imgs class COCOParser(BaseParser): """Class of parser for COCO data format. Args: anno_path (str): Path of annotation file. ignore (bool): If set True, some qu...
import numpy as np import collections from qcodes.utils.helpers import DelegateAttributes, full_class, warn_units class DataArray(DelegateAttributes): """ A container for one parameter in a measurement loop. If this is a measured parameter, This object doesn't contain the data of the setpoints it w...
''' Author: Geeticka Chauhan Main file to be run for replicating experiments in this work ''' from __future__ import print_function from __future__ import division import numpy as np import tensorflow as tf import logging import os import sys sys.path.append('..') import time import random import uuid # for generati...
import glob import shutil from pathlib import Path import src.calculate_energy_density as energy_func import src.calculate_h1 as h1_func import src.calculate_sfr as sfr_func import src.helper as helper import src.calculate_surface_density as surf_func import src.calculate_radio_sfr as radio_sfr def copy_to_out(confi...
# This scripts also follows standard Flower tutorial from # https://flower.dev/docs/example-pytorch-from-centralized-to-federated.html # ======================================================= import os import matplotlib.pyplot as plt # import cv2 from PIL import Image import numpy as np import nibabel as nib # !pi...
import os.path ROOT_PATH = os.path.dirname(__file__) TEMPLATE_DEBUG = DEBUG = True MANAGERS = ADMINS = () DATABASE_ENGINE = 'sqlite3' DATABASE_NAME = os.path.join(ROOT_PATH, 'testdb.sqlite') TIME_ZONE = 'America/Chicago' LANGUAGE_CODE = 'en-us' SITE_ID = 1 USE_I18N = True MEDIA_ROOT = '' MEDIA_URL = '' ADMIN_MEDIA_PR...
# !/usr/local/python/bin/python # -*- coding: utf-8 -*- # (C) Wu Dong, 2019 # All rights reserved # @Author: 'Wu Dong <wudong@eastwu.cn>' # @Time: '2020-03-17 15:34' class BaseFilter: """ Base class for filter object """ def __init__(self, key, value, rule): """ 初始化过滤器 :param key:...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import pandas as pd import xarray as xr from . import parameterized, randn, requires_dask nx = 3000 ny = 2000 nt = 1000 window = 20 class Rolling(object): def setup(self, *args, **kwa...
"""Taken from detectron2/blob/master/detectron2/modeling/box_regression.py. This class is used to get the the regression offsets between boxes and ground truth and apply deltas to original anchors.""" import math import torch # Value for clamping large dw and dh predictions. The heuristic is that we clamp # such t...
import logging import time from typing import List from spaceone.core.utils import * from spaceone.inventory.connector.aws_kinesis_data_stream_connector.schema.data import StreamDescription, Consumers from spaceone.inventory.connector.aws_kinesis_data_stream_connector.schema.resource import StreamResource, KDSResponse...
# Copyright 2022 Mycroft AI 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 writin...
from hashlib import new import pygame import json from command import Command from enums import ButtonKey from enums import CommandType from sender import Sender ################################# LOAD UP A BASIC SETTINGS ############################ pygame.init() pygame.font.init() running = True clock = p...
from .common import random_str import kubernetes from .conftest import kubernetes_api_client, user_project_client CERT = """-----BEGIN CERTIFICATE----- MIIDEDCCAfgCCQC+HwE8rpMN7jANBgkqhkiG9w0BAQUFADBKMQswCQYDVQQGEwJV UzEQMA4GA1UECBMHQXJpem9uYTEVMBMGA1UEChMMUmFuY2hlciBMYWJzMRIwEAYD VQQDEwlsb2NhbGhvc3QwHhcNMTYwNjMwMDExM...
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'djangoino.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise Impo...
from datetime import timedelta import re import numpy as np import pytest import pandas as pd from pandas import ( DataFrame, Index, Int64Index, Series, Timedelta, TimedeltaIndex, date_range, timedelta_range) import pandas.util.testing as tm from pandas.util.testing import ( assert_almost_equal, assert_in...
#!/usr/bin/python """ # ============================== # flowlib.py # library for optical flow processing # Author: Ruoteng Li # Date: 6th Aug 2016 # ============================== # Taken from: https://github.com/liruoteng/OpticalFlowToolkit/blob/master/lib/flowlib.py """ import png # import pfm import numpy as np imp...
# -*- coding: utf-8 -*- """Supports SuperMAG ground magnetometer measurements and SML/SMU indices. Downloading is supported; please follow their rules of the road: http://supermag.jhuapl.edu/info/?page=rulesoftheroad Parameters ---------- platform : string 'supermag' name : string 'magnetometer' tag : stri...
# -*- coding: utf-8 -*- def test_stars_add(slack_time): assert slack_time.stars.add def test_stars_list(slack_time): assert slack_time.stars.list def test_stars_remove(slack_time): assert slack_time.stars.remove
#!/home/ravisharma/Desktop/venv/bin/python # # The Python Imaging Library # $Id$ # # convert sequence format to GIF animation # # history: # 97-01-03 fl created # # Copyright (c) Secret Labs AB 1997. All rights reserved. # Copyright (c) Fredrik Lundh 1997. # # See the README file for information on usage and...
"""Wallet base class.""" from abc import ABC, abstractmethod from typing import Sequence from ..ledger.base import BaseLedger from ..ledger.endpoint_type import EndpointType from .did_posture import DIDPosture from .did_info import DIDInfo, KeyInfo class BaseWallet(ABC): """Abstract wallet interface.""" @...
# MIT License # # Copyright (c) 2018-2019 Red Hat, Inc. # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, m...
from .scromxblockng import ScormXBlock
from django.conf.urls import url, include from . import views from rest_framework.urlpatterns import format_suffix_patterns from rest_framework_jwt.views import obtain_jwt_token urlpatterns = [ url(r'^auth', include('rest_framework.urls', namespace='rest_framework')), url(r'^roles/?$', views.RoleList.as_view()...
from unittest import mock from django.conf.urls import url from django.contrib import admin from django.contrib.auth.admin import UserAdmin from django.contrib.auth.models import User from django.db import connections from django.test import TestCase, override_settings from django.urls import reverse clas...
# (Be in -*- python -*- mode.) # # ==================================================================== # Copyright (c) 2000-2008 CollabNet. All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also availabl...
import re from django import forms import commonware.log import happyforms from tower import ugettext_lazy as _lazy import amo from market.models import PriceCurrency from mkt.site.forms import PotatoCaptchaForm from users.forms import BaseAdminUserEditForm from users.models import UserProfile log = commonware.log....
# # Copyright 2019 Venafi, 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, ...
_base_ = [ '../_base_/datasets/coco_detection.py', '../_base_/schedules/schedule_1x.py', '../_base_/default_runtime.py' ] # model settings model = dict( type='VFNet', backbone=dict( type='ResNet', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=1, ...
from keras import Model from keras.models import Sequential from keras.layers import Dense, Dropout, Embedding, Conv1D, MaxPooling1D, Flatten from keras import regularizers import numpy as np from keras.optimizers import Adam def base_cnn(vocabulary_size: int, embedding_size: int, max_seq_length: int, embedding_matri...
""" Name: Implement strStr() Source: LeetCode - 28 Link: https://leetcode.com/problems/implement-strstr/ Description: Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. """ # Real life implementation # Runtime: 36 ms # Memory Usage: 13.4 MB def strS...
from django.db import models from django.conf import settings from django.core.exceptions import ObjectDoesNotExist # from django.template.defaultfilters import slugify from django.utils import timezone from django.utils.translation import gettext_lazy as _ from djchoices import ChoiceItem, DjangoChoices from slugify i...
# Copyright 2019 SAP SE # # 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 ...
# coding=utf-8 # Copyright 2018 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os import thr...
""" Adapters are HTTP client implementations used by geocoders. Some adapters might support keep-alives, request retries, http2, persistence of Cookies, response compression and so on. Adapters should be considered an implementation detail. Most of the time you wouldn't need to know about their existence unless you w...
import numpy as np import lookup from toolbox import loop3d from krakenUtils import mdist2d, idx2coord ## PARAMETERS FOODGATHERED = 20 MAXSTEPS = 50 PHEROMONEDECAY = 0.8 ## BLOCK HARDNESS IMPASSABLE = ("minecraft:stone", "minecraft:granite", "minecraft:diorite", "minecraft:andesite") AIR = ("minecraft:water",) + look...
import numpy as np def modular_inv(a, p): x, y, m = 1, 0, p while a > 1: q = a // m t = m m = np.mod(a, m) a = t t = y y, x = x - np.int64(q) * np.int64(y), t if x < 0: x = np.mod(x, p) return np.mod(x, p) def divmod(_num, _den, _p):...
from setuptools import setup # Metadata goes in setup.cfg. These are here for GitHub's dependency graph. setup( name="Jinja2", install_requires=["MarkupSafe>=2.0"], extras_require={"i18n": ["Babel>=2.7"]}, )
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): """Run administrative tasks.""" os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'netocraft.settings') try: from django.core.management import execute_from_command_line except Im...
#! /usr/bin/env/ python3 # coding:utf-8 from collections import deque from copy import deepcopy, copy from z3 import ( And, Or, Not, BitVecRef, BitVecNumRef, BoolRef, BitVec, BitVecVal, Concat, Extract, simplify, Int, Solver, unsat, sat, ZeroExt, Expr...
import argparse import os from tqdm import tqdm from datetime import datetime import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.data as data from torch.utils.tensorboard import SummaryWriter import deepab from deepab.models.AbResNet import AbResNet, load_model from deepab.models.Pai...
from typing import Any, List, Literal, TypedDict from .FHIR_CodeableConcept import FHIR_CodeableConcept from .FHIR_Quantity import FHIR_Quantity from .FHIR_string import FHIR_string # Details of a Health Insurance product/plan provided by an organization. FHIR_InsurancePlan_Cost = TypedDict( "FHIR_InsurancePlan_C...
from sqlalchemy import Column, BigInteger, ForeignKey from sqlalchemy.orm import relationship from . import Project, Snapshot, SnapViolationDiff, Diff from .Base import Base class MapDiff(Base): __tablename__ = "map_diff" map_id = Column(BigInteger, primary_key=True) project_id = Column(BigInteger, For...
# Copyright 2017 The TensorFlow 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...
class PydubException(Exception): """ Base class for any Pydub exception """ class TooManyMissingFrames(PydubException): pass class InvalidDuration(PydubException): pass class InvalidTag(PydubException): pass class InvalidID3TagVersion(PydubException): pass class CouldntDecodeError(...
""" ======================= Simple Axis Direction01 ======================= """ import matplotlib.pyplot as plt import mpl_toolkits.axisartist as axisartist fig = plt.figure(figsize=(4, 2.5)) ax1 = fig.add_subplot(axisartist.Subplot(fig, "111")) fig.subplots_adjust(right=0.8) ax1.axis["left"].major_ticklabels.set_ax...
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function import os import datetime import json import logging import mock import six import zlib from sentry import tagstore from django.conf import settings from django.core.urlresolvers import reverse from django.test.utils import override_setti...
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="moip-sdk-python", version="0.0.1", author="Mastertech", description="Integrate Wirecard to your Python application.", long_description=long_description, long_description_content_type="...
from .operator import Operator
# coding=utf-8 import requests def test_conexao_boleto_itau(): # ENDPOINT Válido endpoint = 'https://oauth.itau.com.br/identity/connect/token' # Client fictício client_id = u'B0RKj1UmUV-M0' # Secret Fictício client_secret = u'8YrXLEMP0G_HIyM43RsOOez-stj50j3co_uUBq' params = dict( ...
class Forbidden(Exception): pass class Unauthorized(Exception): pass class Missing(Exception): pass class BadRequest(Exception): pass
# Copyright 2013 IBM Corp. # # 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...
# MIT License # # Copyright (c) 2018 Haoxintong # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, p...
from Crypto.Cipher import AES import base64 from hashlib import md5 import warnings import requests_cache import requests import logging from anime_downloader.sites.anime import Anime, AnimeEpisode, SearchResult from anime_downloader.sites import helpers from anime_downloader.util import eval_in_node logger = loggin...
import evidence as evi def _get_reference_from_dbreference(dbtype, dbid): if dbtype=='UniProtKB': ref = evi.reference({'database':'UniProtKB', 'id':dbid}) elif dbtype=='PubMed': ref = evi.reference({'database':'PubMed', 'id':dbid}) elif dbtype=='DOI': ref = evi.reference({'database...
import collections import json import sys from abc import abstractmethod from .helpers import resolve_bc, parse_version, _camel_hyphen DEFAULT_STACK_VERSION = "8.0" DEFAULT_APM_SERVER_URL = "http://apm-server:8200" DEFAULT_APM_JS_SERVER_URL = "http://localhost:8200" DEFAULT_APM_LOG_LEVEL = "info" DEFAULT_SERVICE_VER...
#!/usr/bin/python3 import sys import os from Crypto.Cipher import AES from base64 import b64encode bs = 16 # blocksize flag = open('flag.txt', 'rb').read().strip() key = open('key.txt', 'r').read().strip().encode() # my usual password def enc(pt): cipher = AES.new(key, AES.MODE_ECB) ct = cipher.encrypt(pad(pt...