text
stringlengths
1
927k
import json from enum import Enum from triple_agent.reports.generation.generic_query import populate_data_properties def generate_external_reports( games, data_query_properties, json_file_path, html_file_path ): _, data_props = populate_data_properties(games, data_query_properties) # https://github.com/...
try: runCount += 1 except: isoIn = False clIn = False cataIn = False closePlots = False resultsIn = False clusterList = [] clusters=[] isochrones = [] isoList = [] catalogue = [] runCount = 1 class resultClusterObj: def __init__(self,cl): import numpy as np ...
""" Saving model output. """ import json import pickle from copy import deepcopy import os import numpy as np import xarray as xr def save_to_pickle(datafield, filename): """ Save datafield to pickle file. Keep in mind that restoring a pickle requires that the internal structure of the types for the pi...
from vizdoomgym.envs.vizdoomenv import VizdoomEnv class VizdoomTakeCover(VizdoomEnv): def __init__(self): super(VizdoomTakeCover, self).__init__(7)
# -*- coding: utf-8 -*- """ Tests for the tensor transform functions. Run with pytest. Created on Sat May 9 00:09:00 2020 @author: aripekka """ import sys import os.path import numpy as np sys.path.insert(1, os.path.join(os.path.dirname(__file__),'..')) from tbcalc.transverse_deformation import * from tbcalc impo...
import asyncio import base64 import hashlib import json import logging import time import urllib.parse import uuid import requests import websockets from ecdsa import NIST256p, SigningKey from ecdsa.util import sigencode_der logging.basicConfig( level=logging.INFO, format="%(asctime)s [%(levelname)s] %(messag...
raio = float(input()) n = 3.14159 area = n * pow(raio,2) print('A={:.4f}'.format(area))
import argparse, yaml, os, os.path parser = argparse.ArgumentParser() parser.add_argument("-i", "--input") parser.add_argument("-o", "--output") parser.add_argument("--tm2", "--tm", action="store_const", const="tm2", dest="action") parser.add_argument("--tm2source", "--tmsource", action="store_const", const="tm2source...
# coding:utf-8 # # The MIT License (MIT) # # Copyright (c) 2016-2018 yutiansut/QUANTAXIS # # 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 th...
class Helpers: _cache = {} @classmethod def cached(cls, key, scope=None, func=None): if scope is not None: if scope not in cls._cache: cls._cache[scope] = {} if key in cls._cache[scope]: return cls._cache[scope][key] else: ...
""" PyTorch Forecasting package for timeseries forecasting with PyTorch. """ from pytorch_forecasting.data import EncoderNormalizer, GroupNormalizer, TimeSeriesDataSet from pytorch_forecasting.models import Baseline, NBeats, TemporalFusionTransformer __all__ = [ "TimeSeriesDataSet", "GroupNormalizer", "Enc...
# Copyright (C) 2019 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...
# # FILE: Fantasy_Realm.py # AUTHOR: Bob Thomas (Sirian) # PURPOSE: Regional map script - Fantastical terrain, X and Y Wrap #----------------------------------------------------------------------------- # Copyright (c) 2005 Firaxis Games, Inc. All rights reserved. #----------------------------------------------------...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # issho documentation build configuration file, created by # sphinx-quickstart on Fri Jun 9 13:47:02 2017. # # 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 # autog...
from flask import Flask, render_template, request, jsonify import base64 import logging import numpy as np from deepface import DeepFace from PIL import Image from io import BytesIO import subprocess import os import cv2 import random import webbrowser app = Flask(__name__) log = logging.getLogger('werkzeug') log.setL...
from torch.utils.tensorboard.summary import hparams from model import Generator_3 as Generator from model import InterpLnr import matplotlib.pyplot as plt import torch import torch.nn.functional as F import numpy as np import os import time import datetime import pickle from utils import pad_seq_to_2, quantize_f0_torc...
from cms.admin.placeholderadmin import PlaceholderAdmin from cms.test_utils.project.placeholderapp.models import (Example1, MultilingualExample1, TwoPlaceholderExample) from django.contrib import admin from hvad.admin import TranslatableAdmin class MixinAdmin(admin.ModelAdmin): def formfield_for_dbfield(self, db_...
from setuptools import setup, find_packages with open("README.md", "r") as f: long_description = f.read() setup( name="alasan", version="0.0.1", author="Lucas Hild", author_email="contact@lucas-hild.de", description="Alasan helps you build Alexa skills on AWS Lambda using Python.", long_de...
# Copyright 2013-2022 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.package import * class PerlMathCdf(PerlPackage): """Generate probabilities and quantiles from several sta...
import copy from collections import OrderedDict from enum import Enum from typing import Any, Dict, Optional, Tuple, Type, Union from vyper import ast as vy_ast from vyper.context.types.abstract import AbstractDataType from vyper.exceptions import ( CompilerPanic, ImmutableViolation, InvalidLiteral, In...
# Copyright 1999-2020 Alibaba Group Holding Ltd. # # 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 a...
#------------------------------------------------------------------------------- # This file is part of PyMad. # # Copyright (c) 2011, CERN. 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...
from pypro.modulos import facade def listar_modulos(request): return {'MODULOS': facade.listar_modulos_ordenados()}
#!/usr/bin/env python # # Bitmap to multi-console CHR converter using PIL or Pillow # # Copyright 2014 Damian Yerrick # Copying and distribution of this file, with or without # modification, are permitted in any medium without royalty # provided the copyright notice and this notice are preserved. # This file is offered...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
from operator import attrgetter import pyangbind.lib.xpathhelper as xpathhelper from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType from pyangbind.lib.base import PybindBase from de...
""" Classes to parse NDS files and create pandas DataFrames to hold eyetracking information. """ import numpy as np import pandas as pd class EyeDataParser(object): def __init__(self, data_fpath): self.data_fpath = data_fpath # Make dictionaries to hold our data with repitions as keys s...
#encoding=utf-8 import astar_config import heapq #from simulator.visualization.config.aircraft_config import aircraft_obj def gen_aircraft_obj(): ret_val = [] # for i in range(-8, 8): # for j in range(-8, 8): # ret_val.append((i, j, 0)) # # ret_val.append((0, 0, -2)) for i in ...
#!/usr/bin/python # Copyright 2015 Google 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 required by a...
#!/usr/bin/env python # coding: utf-8 import sys import numpy as np import scipy.sparse as sp from scipy.sparse.linalg import norm from scipy.io import loadmat, savemat from nbs_class import Ppi, Patient from subprocess import call # import h5py import os import glob import time import datetime # NOTE mutationProfileD...
""" Credit to original code https://github.com/tryolabs/norfair/blob/master/norfair/video.py modified to get output file path as user provided filename suffix and changed constructor of Video class """ import os import os.path as osp import time from typing import List, Optional, Union, Tuple import cv2 import numpy ...
import socket from tensorflow.keras.models import load_model from PIL import ImageGrab import numpy as np import cv2 import os #Load the model. model = load_model(r"D:\Unity Game\Self Driving Car\SDCProgram\Best Models\data-003.h5") # Directory to load the model # Socket Tcp Connection. host = "127.0.0.1" port =...
""" Classes and functions for element-level operations """ import numpy as np import astropy.units as u import plasmapy import fiasco __all__ = ['Element'] class Element(fiasco.IonCollection): """ Collection of all ions for a particular element. The `Element` object provides a way to logically group to...
import datetime from pyramid import testing from whoahqa.models import ( DBSession, ReportingPeriodFactory, ReportingPeriod,) from whoahqa.tests.test_base import TestBase class TestReportingPeriodFactory(TestBase): def test_get_item_retrieves_by_id(self): period = ReportingPeriod( ...
import tensorflow as tf from base.base_model import BaseModel from utils.alad_utils import get_getter import utils.alad_utils as sn class SENCEBGAN(BaseModel): def __init__(self, config): super(SENCEBGAN, self).__init__(config) self.build_model() self.init_saver() def build_model(sel...
#: GRIPPER_OPEN_CLOSE_THRESH = 0.04 # .06 for fig8 (thick rope), 0.04 for thin rope (overhand) #: ROPE_RADIUS = .005 #: ROPE_ANG_STIFFNESS = .1 #: ROPE_ANG_DAMPING = 1 #: ROPE_LIN_DAMPING = .75 #: ROPE_ANG_LIMIT = .4 #: ROPE_LIN_STOP_ERP = .2 #: ROPE_MASS = 1.0 #: ROPE_RADIUS_THICK = .008 #:...
def factorial(n): l = range(1,n+1) import operator return reduce(operator.mul,l,1) def sumDigit(n): s = str(n) return sum([int(i) for i in s]) print sumDigit(factorial(100))
#!/usr/bin/env python3 from setuptools import setup import sys if sys.version_info < (3,0): sys.exit ("Python version < 3.0 is not supported") elif sys.version_info < (3,6): print ("Using Python version < 3.6 would cause issue relevant to the order of windows generated") setup (name = 'console_ui', version = '1...
""" Created on June 21, 2018 @author: Moritz """ import numpy as np from spn.algorithms.Inference import add_node_likelihood from spn.experiments.AQP.leaves.static.StaticNumeric import StaticNumeric def static_likelihood_range(node, ranges, dtype=np.float64, **kwargs): assert len(node.scope) == 1, node.scope ...
""" sphinx.writers.html ~~~~~~~~~~~~~~~~~~~ docutils writers handling Sphinx' custom nodes. :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import copy import os import posixpath import sys import warnings from typing import Iterable, c...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # """RAMSES RF - Protocol/Transport layer. Helper functions. """ import ctypes import sys import time from datetime import datetime as dt from typing import Optional, Union from .const import DEVICE_TYPES, NON_DEVICE_ID, NUL_DEVICE_ID class FILETIME(ctypes.Structure):...
import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable import math from functools import partial import numpy as np __all__ = [ 'ResNet', 'resnet10', 'resnet18', 'resnet34', 'resnet50', 'resnet101', 'resnet152', 'resnet200' ] def look_bottleneck_global(glo): ...
from Stage.stage import * class Stage4(Stage): def deployEnemy(self): Boss2((self.scr_rect.width//2, 200))
# Generated by Django 2.1.2 on 2018-11-20 12:48 from django.conf import settings import django.core.validators from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ...
import numpy as np llf = np.array([-242.89663276735]) nobs = np.array([ 202]) k = np.array([ 3]) k_exog = np.array([ 1]) sigma = np.array([ .8053519404535]) chi2 = np.array([ 15723.381396967]) df_model = np.array([ 2]) k_ar = np.array([ 1]) k...
class Script(object): START_MSG = """<b>Hello {} How are you, I'm an advanced filter bot with many capabilities! Made by @RJMALLU See <i>/help</i> for commands and more details.</b> """ HELP_MSG = """ <i>Add me as admin in your group and start filtering :)</i> <b>Basic Commands;</b> /start - Check if I'...
#!/usr/bin/env python """Simple Tk example to manually test event loop integration. This is meant to run tests manually in ipython as: In [5]: %gui tk In [6]: %run gui-tk.py """ from Tkinter import * class MyApp: def __init__(self, root): frame = Frame(root) frame.pack() self.button =...
# -*- coding: utf-8 -*- """ sphinx.writers.text ~~~~~~~~~~~~~~~~~~~ Custom docutils writer for plain text. :copyright: Copyright 2007-2017 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import os import re import textwrap from itertools import groupby import warnings ...
load("@io_bazel_rules_scala//scala:providers.bzl", "create_scala_provider") load( "@io_bazel_rules_scala//scala/private:common.bzl", "collect_jars", "collect_srcjars", "sanitize_string_for_usage", "write_manifest", ) load( "@io_bazel_rules_scala//scala/private:common_attributes.bzl", "common...
import torch from torch_sparse import SparseTensor from torch_geometric.nn import FiLMConv def test_film_conv(): x1 = torch.randn(4, 4) x2 = torch.randn(2, 16) edge_index = torch.tensor([[0, 1, 1, 2, 2, 3], [0, 0, 1, 0, 1, 1]]) edge_type = torch.tensor([0, 1, 1, 0, 0, 1]) row, col = edge_index ...
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # Exercise the listtransactions API from test_framework.test_framework import BitcoinTestFramework from ...
from output.models.ms_data.element.elem_z003_xsd.elem_z003 import ( AType, BType, Container1, CType, DType, EType, FType, GType, A, B, C, Container, D, E, F, G, ) __all__ = [ "AType", "BType", "Container1", "CType", "DType", "EType...
# -*- coding: utf-8 -*- """Base class for all lexers.""" import re from funcparserlib.lexer import Token class LexerError(Exception): """General lexer error.""" def __init__(self, msg, pos, char, lnum, brace_level, line): """Initialise with information on where the error occurred.""" self.m...
# Comparing He vs She from transformers import pipeline import pandas as pd from utils import diagnoses, get_target_probability, get_top_k, print_stats, plot_male_and_female import matplotlib.pylab as plt import seaborn as sns import argparse templates = [ "<mask> has [diagnosis]", "<mask> is diagnosed with [d...
"""Future-returning APIs for coroutines.""" # Copyright (c) PyZMQ Developers. # Distributed under the terms of the Modified BSD License. from collections import namedtuple, deque from itertools import chain from typing import Type from zmq import EVENTS, POLLOUT, POLLIN import zmq as _zmq _FutureEvent = namedtuple(...
# can't get the output to stop putting extra space after baby name before punctuation. """ A Baby class and functions that use/test it. Authors: Dave Fisher, David Mutchler, Vibha Alangar, Matt Boutell, Mark Hays, Amanda Stouder, Derek Whitley, their colleagues, and Seth Mutchler. """ # DONE: ...
from pathlib import Path from PyQt5.QtWidgets import * from PyQt5.QtGui import QIcon from PyQt5.Qt import Qt from PyQt5.QtCore import QDateTime class Filter(QDialog): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.setWindowTitle("Traffic Monitor") self.image_p...
import os import time import numpy as np import yaml import utils from . import vrep from ..robot import Robot as BaseRobot from ..robot import Reward from ..data import Data as TextData import random from bisect import bisect_right import cv2 import os class SimRobot(BaseRobot): def __init__(self, obj_mesh_dir, n...
""" New World OCR Node Detector Created: 2021-10-07 Dev: Wes H. Uses OCR to get coordinates from top right of the NW game window and imposes that against a list of possible nodes. When you're close to one it will play a bell noise! """ import winsound from PIL import ImageGrab, ImageOps, Image import pytesseract impor...
from config.database import db from dateutil import parser as DateParser from flask_socketio import emit from utils.log import logger_set import datetime from config.log import LOG_DATABASE_FILE from mobile import push_ios as ios from mobile import push_android as android logger = logger_set(module=__name__, file=LOG_...
""" Add tracks to customer orders. (c) Ameryn Media LLC, 2015. All rights reserved. """ import wave, os, pydub, datetime, struct import multiprocessing import csv import shutil # Input file parameters (name & location) input_filename_series = False input_whole_folder = True input_filename = '4-track.wav' input_filena...
# Cross-section: Off_Off # Run:30806 ###################################################################### #Python Script Generated by GeneratePythonScript Algorithm ###################################################################### LoadEventNexus(Filename='/SNS/REF_M/IPTS-21391/nexus/REF_M_30794.nxs.h5', ...
"""prompt-toolkit utilities Everything in this module is a private API, not to be used outside IPython. """ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. import unicodedata from wcwidth import wcwidth from IPython.core.completer import ( provisionalcomplete...
from DeepEI.utils import ms2vec, get_cdk_fingerprints, get_cdk_descriptors from matchms.importing import load_from_msp import json import numpy as np from scipy.sparse import csr_matrix, save_npz from rdkit import Chem from rdkit.Chem import AllChem from rdkit.Chem.rdMolDescriptors import CalcExactMolWt # incompatible...
from ..Distance import Distance from ..CloudCoverage import CloudCoverage from ..Constant import Constant from .BaseComponent import BaseComponent class SkyCoverComponent(BaseComponent): ''' handle GA1..GA8 sky component types ''' CLOUD_TYPES = { "00": "Cirrus (Ci)", "01": "Cirrocumulus (Cc)", "02": "...
import unittest from ddt import data, ddt from django.core.exceptions import ValidationError from rest_framework import status, test from waldur_core.quotas import signals as quota_signals from waldur_core.structure.tests import fixtures as structure_fixtures from waldur_mastermind.marketplace import models from wald...
# -*- coding: utf-8 -*- from django.test import TestCase from django_dynamic_fixture import get, new from readthedocs.builds.constants import ( BRANCH, LATEST, STABLE, TAG, EXTERNAL, ) from readthedocs.builds.models import Version from readthedocs.projects.constants import REPO_TYPE_GIT, REPO_TYPE_...
import logging import threading import time from typing import Any class SetInterval: def __init__(self, interval: float, action: Any) -> None: """コンストラクタ Args: interval (float): 呼び出し間隔 action (Any): 呼ぶ出す関数 """ logging.info("init") self.interval = i...
import ctypes import enum import os import sys class _Structure(ctypes.Structure): def cptr(self): return ctypes.pointer(self) def __str__(self): strs = [] for k in [m for m in dir(self) if (m[0] != '_') and (m != 'cptr')]: s = getattr(self, k) if 'c_int_Array' in type(s).__name__: ...
from django.conf import settings from django.db import models class Cart(models.Model): owner = models.ForeignKey(settings.AUTH_USER_MODEL)
import msgpack def dump(obj, fp, default=None): msgpack.pack(obj, fp, use_bin_type=True, default=default) def dumps(obj, default=None): return msgpack.packb(obj, use_bin_type=True, default=default) def load(fp, object_hook=None): return msgpack.unpack(fp, object_hook=object_hook, encoding='utf8') de...
""" PyColourChooser Copyright (C) 2002 Michael Gilfix <mgilfix@eecs.tufts.edu> This file is part of PyColourChooser. This version of PyColourChooser is open source; you can redistribute it and/or modify it under the licensed terms. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRA...
#!/usr/bin/env python3 import argparse import os import subprocess def naive_config_read(cfg): for line in cfg: key, val = line.strip().split(':') if key == 'pipe': return val.strip() else: print("Input pipe not found in config") exit(0) def main(config_file): ...
import datetime import discord import os import random import re import string from utils.checks import is_staff from discord.ext import commands from discord import TextChannel class Extras(commands.Cog): """ Extra things. """ def __init__(self, bot): self.bot = bot self.nick_pattern...
#!/usr/bin/python3 -i # # Copyright (c) 2015-2021 The Khronos Group Inc. # Copyright (c) 2015-2021 Valve Corporation # Copyright (c) 2015-2021 LunarG, Inc. # Copyright (c) 2015-2021 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the ...
from flask import Flask from flask_restful import Api from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate from flask_session import Session from datetime import timedelta app = Flask(__name__) ###################### for testing ######################### @app.route('/') def hello_world(): ...
""" This script joins: * the EventLogging (EL) data based on webrequest beacons (in my experience, most complete / simplest) * Google Forms survey responses * EditAttemptStep data based on hive tables There are two outputs for each language: * CSV w/ survey responses + EL details (e.g., datetime, pageID) + webrequ...
#!/usr/bin/env python3 # Copyright (c) 2014-2017 Wladimir J. van der Laan # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Script to generate list of seed nodes for chainparams.cpp. This script expects two text files in the dir...
# ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ from azure.core.pipeline.transport import ( HttpRequest, AsyncHttpResponse, AsyncHttpTransport, ) from azure.core.pipeline import AsyncPipeline from azure.co...
from app.api.services import ( briefs ) def get_briefs(user_id, status=None): return briefs.get_buyer_dashboard_briefs(user_id, status) def get_brief_counts(user_id): return briefs.get_brief_counts(user_id)
from .cmd_base import DoitCmdBase, check_tasks_exist from .cmd_base import tasks_and_deps_iter, subtasks_iter opt_forget_taskdep = { 'name': 'forget_sub', 'short': 's', 'long': 'follow-sub', 'type': bool, 'default': False, 'help': 'forget task dependencies too', } opt_disable_default = { ...
### This script calculates the cumulative above and belowground carbon gain in non-mangrove planted forest pixels from 2001-2015. ### It multiplies the annual biomass gain rate by the number of years of gain by the biomass-to-carbon conversion. import datetime import subprocess import sys sys.path.append('../') import...
import requests import urllib.request import time import xlwt from bs4 import BeautifulSoup def addHeadersToSheet(worksheet): #Add Style for the Headers style_text_wrap_font_bold_black_color = xlwt.easyxf('align:wrap on; font: bold on, color-index black') col_width = 128*30 worksheet.write(0, 0, "BREED...
import librosa import numpy as np from PIL import Image from typing import Optional from sklearn.base import BaseEstimator, TransformerMixin from matplotlib.cm import ScalarMappable __all__ = [ "Denoising", "MelSpectogram", "ColoredSpectogram", ] class BaseTransformer(BaseEstimator, TransformerMixin): ...
from udsoncan.client import Client from udsoncan import services, MemoryLocation, DataFormatIdentifier from udsoncan.exceptions import * from test.ClientServerTest import ClientServerTest class TestRequestUpload(ClientServerTest): def __init__(self, *args, **kwargs): ClientServerTest.__init__(self, *args, **kwargs...
from LinkedList import * class Solution(LinkedList): def reverse(self, head): pre = None while head: next = head.next head.next = pre pre = head head = next return pre def reorderList(self, head: ListNode) -> None: ...
import json class FileUtil: @classmethod def read_as_dict(cls, file) -> dict: string = cls.read_as_str(file) return json.loads(string) @classmethod def read_as_str(cls, file) -> str: with open(file, mode="r", encoding="utf-8") as f: return f.read()
constants.physical_constants["muon-proton mag. mom. ratio"]
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.async_support.base.exchange import Exchange # ----------------------------------------------------------------------------- try...
import asyncio from datetime import datetime from typing import Union, Callable, Optional, List, TYPE_CHECKING from ..config import Side, TradingType, ExitRoutine, InstrumentType from ..core import Trade, Instrument, ExchangeType, Order, OrderBook from ..exchange import Exchange from ..engine.managers import Periodic ...
import setuptools setuptools.setup( name='randomproto', version='0.0.1', py_modules=('randomproto',), install_requires=[ 'protobuf>=3.6.0', ], setup_requires=[ 'pytest-runner', ], tests_require=[ 'pytest==4.2.1', 'pytest-cov==2.6.1', 'pytest-mock...
from ..script import tools from ...serialize import b2h from .ScriptType import ScriptType class ScriptNulldata(ScriptType): TEMPLATE = tools.compile("OP_RETURN OP_NULLDATA") def __init__(self, nulldata): self.nulldata = nulldata self._script = None @classmethod def from_script(cls...
'''Autogenerated by xml_generate script, do not edit!''' from OpenGL import platform as _p, arrays # Code generation uses this from OpenGL.raw.GLES2 import _types as _cs # End users want this... from OpenGL.raw.GLES2._types import * from OpenGL.raw.GLES2 import _errors from OpenGL.constant import Constant as _C import...
import argparse import requests import time import random def get_arguments(): parser = argparse.ArgumentParser(description="path") parser.add_argument("--url-file", type=str, default='', help="url file path", required=True) parser.add_argument("--output-dir"...
import json from fastapi import APIRouter, HTTPException from util.helm import Helm from models.deployRequest import DeployRequest from models.rollbackRequest import RollbackRequest from util.utilityHelpers import Utils from util.kubernetes import Kubernentes import etcd3 router = APIRouter() etcd = etcd3.client() ...
# 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 from ... import _utilities, _tables __a...
#%% import numpy as np import matplotlib.pyplot as plt from astropy.visualization import astropy_mpl_style plt.style.use(astropy_mpl_style) from matplotlib import rc rc('font',**{'family':'serif','serif':['Palatino']}) rc('text', usetex=True) rc('text.latex', preamble=r'''\usepackage{amsmath} \usepackage{phy...
#coding=utf-8 # coding=utf-8 ''' Created on 2014-1-5 @author: ETHAN ''' from django.conf.urls import patterns,url urlpatterns = patterns( )
import random import boto3 import tweepy import twitter_config # 先ほど取得した各種キーを代入する CK=twitter_config.CONSUMER_KEY CS=twitter_config.CONSUMER_SECRET AT=twitter_config.ACCESS_TOKEN AS=twitter_config.ACCESS_TOKEN_SECRET # Twitterオブジェクトの生成 auth = tweepy.OAuthHandler(CK, CS) auth.set_access_token(AT, AS) api = tweepy.API...
# Copyright (C) 2010 Google Inc. All rights reserved. # Copyright (C) 2009 Torch Mobile Inc. # Copyright (C) 2009 Apple Inc. All rights reserved. # Copyright (C) 2010 Chris Jerdonek (chris.jerdonek@gmail.com) # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided t...