content
stringlengths
5
1.05M
from src.basic.systems.human_system import HumanSystem __author__ = 'anushabala' import sqlite3 import json from src.basic.event import Event from src.basic.dataset import Example from src.basic.kb import KB from argparse import ArgumentParser from src.basic.scenario_db import add_scenario_arguments, ScenarioDB from s...
__author__ = "Ian Goodfellow" class Agent(object): pass
import numpy as np import cv2 from math import sin, cos def find_T_matrix(pts,t_pts): A = np.zeros((8,9)) for i in range(0,4): xi = pts[:,i]; xil = t_pts[:,i]; xi = xi.T A[i*2, 3:6] = -xil[2]*xi A[i*2, 6: ] = xil[1]*xi A[i*2+1, :3] = xil[2]*xi A[i*2+1, 6: ] = -xil[0]*xi ...
import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from ellipsoid_fit import ellipsoid_fit, ellipsoid_plot, data_regularize if __name__=='__main__': data = np.loadtxt("mag_out.txt") data2 = data_regularize(data, divs=8) center, evecs, radii, v = ellipsoid_fit(data...
import numpy as np import chainer from chainer import cuda import chainer.functions as F import chainer.links as L class OptimizerByNet(object): def __init__(self, optnet, grand_optmizer): self.grand_optimizer = grand_optmizer self.grand_optimizer.setup(optnet) self.optnet = optnet ...
from repacolors.convert import * import random def test_yiq_reverse(): for _ in range(100): c = RGBTuple(random.random(), random.random(), random.random()) c2 = yiq2rgb(rgb2yiq(c)) assert abs(c.red - c2.red) < 0.005 assert abs(c.green - c2.green) < 0.005 assert abs(c.blue -...
#!/usr/bin/env python from __future__ import print_function import argparse import dxpy import os import subprocess import sys import time import util here = os.path.dirname(sys.argv[0]) top_dir = os.path.dirname(os.path.abspath(here)) HOME_REGION = "aws:us-east-1" TEST_DICT = { "aws:us-east-1" : "dxWDL_playgro...
from cvpods.layers import ShapeSpec from cvpods.modeling.backbone import Backbone from cvpods.modeling.backbone.fpn import build_resnet_fpn_backbone from cvpods.modeling.meta_arch.solo import SOLO from cvpods.modeling.meta_arch.solo_decoupled import DecoupledSOLO def build_backbone(cfg, input_shape=None): if inpu...
""" A simple terminal tool, nicely plotting all messages send by contrast over ZeroMQ as text. """ import os import sys import zmq import h5py import json import time import numpy as np class zmq_listener(object): """ Subscribes to a contrast stream recordes zmq stream. Prints the zmq streamed dictionar...
""" Set Constants """ ALLOWED_SOURCES = ["jhu", "worldometer", "imedd", "govgr", "who", "sch"] COLUMN_MAPPINGS = { "Country,Other": "country", "TotalCases": "cases", "NewCases": "new_cases", "TotalDeaths": "deaths", "NewDeaths": "new_deaths", "TotalRecovered": "recovered", "NewRecovered": "...
#!/usr/bin/env python from __future__ import division, absolute_import, print_function import os import sys def find_in_path(filename): """ Find the file named filename in the sys.path. Returns the full path name if found, None if not found. Definition ---------- def find_...
from chess_engine.chess_db.utils import execute def create_moves_table(cursor, conn): create_table_games = '''CREATE TABLE moves ( id SERIAL PRIMARY KEY NOT NULL, created time DEFAULT CURRENT_TIMESTAMP, deleted time, game_id int NOT NULL, player_hash char(32), game_state varchar (100), san varchar (10), FO...
from flask import jsonify from . import main @main.app_errorhandler(400) def bad_request(e): # TODO: log the error return jsonify(error=e.description), 400 @main.app_errorhandler(401) def unauthorized(e): error_message = "Unauthorized, bearer token must be provided" return jsonify(error=error_messag...
from django.conf import settings # Custom context processors for sikteeri def is_production(request): ''' Add the constant 'is_production' to current context ''' return dict(is_production=settings.PRODUCTION)
import mnist_loader as ml import network1 as nw def main(): training_data, validation_data, test_data = ml.load_data_wrapper() net = nw.Network([784, 30, 10]) net.SGD(training_data, 30, 10, 3.0, test_data=test_data) # hidden_layers_topologies = [15, 25, [30, 10], 60, 80] # hidden_layers_topologie...
from pathlib import Path import os from statistics import mean import matplotlib.pyplot as plt from random import randint import pickle from akkadian.build_data import build_signs_and_transcriptions, break_into_sentences from akkadian.data import from_key_to_text_and_line_numbers from akkadian.parse_xml import parse_xm...
from django.apps import AppConfig class WagtailDjangoAdminConfig(AppConfig): name = 'wagtail_django_admin'
from app import db __author__ = 'kapnuu' class Visitor(db.Model): __tablename__ = 'visitor' id = db.Column(db.Integer, primary_key=True) etag = db.Column(db.String(32), index=True) remote_addr = db.Column(db.String(16), index=True) t_last_seen = db.Column(db.DateTime) last_cat_idx = db.Colum...
# Copyright 2017 Hugh Salimbeni # # 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...
from typing import Optional from PyQt5 import QtWidgets, QtCore from .scanview_ui import Ui_Form from ..utils.plotscan import PlotScan from ..utils.window import WindowRequiresDevices from ...core2.dataclasses import Scan class ScanViewer(QtWidgets.QWidget, WindowRequiresDevices, Ui_Form): def __init__(self, **...
#!/usr/bin/env python """This module takes two classification outputs from source and targer puppet infrastructure and takes the user defintions from the source and adds them to the infrastructure defintions of the target. Allowing the ability to restore a backup of user node definitions""" import json import sys para...
from collections import UserList from numbers import Real from typing import List, Optional, Iterable, Union, Set, Iterator, Dict from ....file.report import Report, DataType, Field, AbstractField from ._LocatedObject import LocatedObject from . import constants class LocatedObjects(UserList): def __init__(self,...
import pathlib from setuptools import setup # type: ignore setup( name="dynamo-dao", version="0.0.7", description="Dynamo Dao", author="Quinn Weber", author_email="quinn@quinnweber.com", maintainer="Quinn Weber", maintainer_email="quinn@quinnweber.com", url="https://github.com/qsweber...
# Copyright (c) 2021, Weslati Baha Eddine and contributors # For license information, please see license.txt # import frappe from frappe.model.document import Document class Font(Document): def validate(self): if self.type =="Google Fonts" : self.css=self.googlelinks if self.type=="Otf file": if self.is_ur...
# --- # jupyter: # jupytext: # formats: ipynb,py:percent # notebook_metadata_filter: all # text_representation: # extension: .py # format_name: percent # format_version: '1.3' # jupytext_version: 1.13.1 # kernelspec: # display_name: Python 3 # language: python # name:...
#------------------------------------------------------------------------------- # NodeCoupling #------------------------------------------------------------------------------- from PYB11Generator import * @PYB11module("SpheralSPH") class NodeCoupling: "A functor base class encapsulating how we couple pairs of nod...
from django.apps import AppConfig class MovieRaterApiConfig(AppConfig): name = 'movie_rater_api'
from torch.nn.functional import conv2d, conv3d from torch.nn.modules.utils import _pair, _triple from .reparam_layers import RTLayer, LRTLayer class Conv2dRT(RTLayer): def __init__(self, in_channels, out_channels, kernel_size, bias=True, ...
import torch import torch.nn as nn from torchvision import models from torch.autograd import Variable pretrained_model = models.resnet152(pretrained=True) class Resnet152Feats(nn.Module): def __init__(self): super(Resnet152Feats, self).__init__() self.resnet = nn.Sequential(*list(pretrained_model.children()...
import hashlib from typing import List from cryptography import x509 from cryptography.exceptions import InvalidSignature from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives.asymmetric.ec import ( SECP256R1, EllipticCurvePublicKey, ) from webauthn.helpers import aaguid...
from allennlp.data.iterators import EpochTrackingBucketIterator from allennlp.tests.data.iterators.basic_iterator_test import IteratorTest class EpochTrackingBucketIteratorTest(IteratorTest): def setUp(self): # The super class creates a self.instances field and populates it with some instances with ...
from numpy import array A = array([[1,2],[3,4]]) C = A * 10.0 D = A / 2.0 print('C = ',mult) print('D = ',divi)
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
# # Pure python logging mechanism for logging to AlertViz from # pure python (ie not JEP). DO NOT USE IN PYTHON CALLED # FROM JAVA. # # # SOFTWARE HISTORY # # Date Ticket# Engineer Description # ------------ ---------- ----------- -------------------------- # 11/03/10 ...
from collections import OrderedDict, defaultdict from multiprocessing import Pool import copy import json import io import yaml import os import progressbar import warnings warnings.filterwarnings("ignore", message="numpy.dtype size changed") warnings.filterwarnings("ignore", message="numpy.ufunc size changed") warnin...
# Shortest Path in Binary Matrix from queue import Queue class Solution: def shortestPathBinaryMatrix(self, grid): rows = len(grid) cols = len(grid[0]) dx = [1, 1, 1, 0, -1, -1, -1, 0] dy = [1, 0, -1, -1, -1, 0, 1, 1] if grid[0][0] == 1: return -1 if r...
import nox @nox.session(python=["3.8"], reuse_venv=True) def build(session): session.install(".") @nox.session(python=["3.8"], reuse_venv=True) def test(session): session.install(".[test]") session.run("pytest", *session.posargs)
from dvc.utils import is_binary def is_conda(): try: from .build import PKG # patched during conda package build return PKG == "conda" except ImportError: return False def get_linux(): import distro if not is_binary(): return "pip" package_managers = { ...
import argparse from ydk.services import CRUDService from ydk.providers import NetconfServiceProvider from ydk.models.cisco_ios_xr import Cisco_IOS_XR_l2vpn_cfg as l2vpn_xr_cfg from ydk.models.cisco_ios_xe import Cisco_IOS_XE_native as xe_native from ydk.types import Empty import logging import re import sys log = log...
#!/usr/bin/env python # coding: utf-8 # # Meta-Analytic Subtraction Analysis # In[1]: # First, import the necessary modules and functions import os from datetime import datetime import matplotlib.pyplot as plt from myst_nb import glue from nilearn import image, plotting from repo2data.repo2data import Repo2Data i...
from .w2v import Word2Vec __all__ = ["Word2Vec"]
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2019 Apple Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyrig...
from flask import Flask from flask import Response from flask import redirect from flask import url_for from oop import override from template_context import context _route_extensions = [] def route_extension_method(route_extension): # type: (callable) -> callable _route_extensions.append(route_extension) ...
try: from simplegeneric import * except ImportError: from _simplegeneric import *
import SQLDataManager import DateParser import ICSFileCreator import EmailReceiver import EmailMessageValidator import EmailSender import Cleanup import datetime def main(): received_emails = EmailReceiver.get_unread_emails() validated_emails = EmailMessageValidator.validate_messages(received_emails) fo...
import json from flask import Flask, render_template, Response, request, make_response from flask_restful import Resource, Api, reqparse from datetime import datetime as dt, timedelta as td, date as d from flask_cors import CORS from urllib.request import urlopen, Request app = Flask(__name__) api = Api(app) CORS(app)...
#!/usr/bin/env python3 # Standard libraries from re import error, escape, search # Lists class class Lists: # Match @staticmethod def match(items, name, ignore_case, no_regex): # Search without regex if name in items: return True # Search with regex if not no...
#django from django.db import models #utils from cinema.utils.models import CinemaModel class Category(CinemaModel): """ Category model Category movie like childs, or adults. Also they have a price of the ticket for each category """ category = models.CharField('movie category', max_length=10...
import argparse import sys from sys import stdin import numpy as np from utils import read_eval_file def get_score(prop, props, power): try: i_prop = props.index(prop) except ValueError: i_prop = len(props) score = (1 - (i_prop / len(props)) ** power)**(1/power) return score if __n...
import os.path import os import urllib2 import urllib from urllib2 import Request from urllib import urlencode from requests import post import sys import pandas import json x = pandas.read_csv("sub_med.csv") ndar_compare = x.columns.values.tolist() token = "" data = { 'token': '', 'co...
# coding: utf-8 """ This scripts scrapy the DOI of the scielo documents from the website and load them into the Articlemeta, this process is necessary because the legacy databases does not have the doi persisted for each document. """ import re import os import sys import argparse import logging import logging.config f...
from . import game_interface
# -*- coding: utf-8 -*- from datetime import timedelta import operator from string import ascii_lowercase import warnings import numpy as np import pytest from pandas.compat import lrange import pandas.util._test_decorators as td import pandas as pd from pandas import ( Categorical, DataFrame, MultiIndex, Serie...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ @author: ogouvert Variational Inference algorithm for Ordinal Non-Negative Matrix Factorization (OrdNMF) - DCPF MODEL: W ~ Gamma(aphaW,betaW) ## UxK (size of W) H ~ Gamma(aphaH,betaH) ## IxK C ~ OrdNMF(W*H) ## UxI - VARIATIONAL INFERENCE: p(W,H...
import unittest class StackTraceTests(unittest.TestCase): def test_bad_import(self): obj = Utility() obj.instance_method_a() def test_not_equal(self): self.assertEqual(1, 2) def global_func(): def local_func(): import not_a_module # trigger exception local_func() clas...
__author__ = "Andrea Tramacere" try: from sherpa.models.model import ArithmeticModel, modelCacher1d, RegriddableModel1D from sherpa.models.parameter import Parameter from sherpa import data from sherpa.fit import Fit from sherpa.stats import Chi2 from sherpa.optmethods import LevMar from s...
# -*- coding: utf-8 -*- from __future__ import print_function import os import sys import argparse import tqdm # Adapted from # https://gist.github.com/serycjon/c9ad58ecc3176d87c49b69b598f4d6c6 import tensorflow as tf def parse_arguments(): parser = argparse.ArgumentParser(description='') parser.add_argument...
# Adaptive Card Design Schema for a sample form. # To learn more about designing and working with buttons and cards, # checkout https://developer.webex.com/docs/api/guides/cards BUSY_CARD_CONTENT = { "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", "type": "AdaptiveCard", "version": "1.2", ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # This file is part of "Linux Studio Installer" project # # Author: Roman Gladyshev <remicollab@gmail.com> # License: MIT License # # SPDX-License-Identifier: MIT # License text is available in the LICENSE file and online: # http://www.opensource.org/licenses/MIT #...
# Usage of \n in a print() function between the strings will create new line print("Hello World!\nHello World!\nHello World!")
#!/usr/bin/env python # -*- coding: utf8 -*- from astropy.io import fits import numpy as np import os import time import sys from scipy.fftpack import fft,ifft,fft2,ifft2 def bignfft(pm, first,last,dimx,dimy,bxdim,bydim): str0 = "work/" xdim = dimx ydim = dimy x_inf=0 y_inf = 0 if xdim%2 != 0: xdim = xdim - 1 ...
from abstract.apps import AbstractConfig from .loader import LetsPartyLoader from .elastic_models import ElasticLetsPartyModel, lets_party_idx class LetsPartyConfig(AbstractConfig): name = "lets_party" verbose_name = "Фінансові звіти партій та кандидатів" short_name = "Звіти" loader_class = LetsParty...
from sparknlp_jsl.annotator import NerConverterInternal class NerToChunkConverterLicensed: @staticmethod def get_default_model(): return NerConverterInternal() \ .setInputCols(["sentence", "token", "ner"]) \ .setOutputCol("entities")
"""Checks the validity of MachO binary signatures MachO binaries sometimes include a LC_CODE_SIGNATURE load command and corresponding section in the __LINKEDIT segment that together work to "sign" the binary. This script is used to check the validity of this signature. Usage: ./code-signature-check.py my_binary 8...
def sticks_game_l2(): ''' Level 2 Game Rules Allow each user to input a username. Ensure that the user is able to enter how many sticks to remove (1, 2, or 3) The user should ONLY be able to remove 1, 2, or 3 sticks. Ensure that player turns are kept track of. When the game is down to a small number of st...
# # RAMFS. # ################################################## # import ################################################## import uos ################################################## # function ################################################## class RAMFlashDev: def __init__(self): self.fs_size = ...
# Copyright (c) 2011 OpenStack Foundation # # 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 ...
from typing import Dict from moz_library.books import Books from moz_library.rental_books import RentalBooks from moz_library.reserved_books import ReservedBooks from moz_library.rental_book_filter import RentalBookFilter from moz_library.rental_book_expired_filter import RentalBookExpiredFilter from moz_library.rental...
import warnings from typing import List, Optional, Type, Union import htmlgenerator as hg from django import forms from .helpers import ErrorList, HelpText, Label from .widgets import BaseWidget, HiddenInput, TextInput DEFAULT_FORM_CONTEXTNAME = "__bread_form" DEFAULT_FORMSET_CONTEXTNAME = "__bread_formset_form" c...
from pymysql import connect # DB 연결 def get_connection(): return connect(host='192.168.25.60', user='pi', password='Wkddmsgk0613!', db='raspi', charset='utf8')
""" Created on Tue Jan 26 19:32:08 2021 @author: Lucas Valentim """ #Yield Strength (Fty) #Ultimate Strength (Ftu) #modulo de elasticidade (E) #coeficiente de poisson (v) mec_prop={ 'aço c 1010 laminação quente':{ 'Fty':165, 'Ftu':296, 'E':200100, 'v':0.32}, 'aço c ...
__version__ = '2.31.2'
__all__ = ["PortReservation", \ "PortManager", \ "PortServer"] import sys import socket import select import os import re import random from browser.status import * from base.log import VLOG from base.bind import Bind class PortReservation(object): def __init__(self, on_free_func, port): ...
# ----------------------------------------------------------------------------- # Copyright (C) 2018 Nicolas P. Rougier # Distributed under the terms of the BSD License. # ----------------------------------------------------------------------------- import numpy as np # Result is NaN print(0 * np.nan) # Result is Fa...
from django.contrib.auth.models import User from django.core.exceptions import ValidationError from django.core.validators import RegexValidator from .models import ForbiddenUsername class UsernameValidator(RegexValidator): regex = '^[a-z0-9-]+$' message = 'Username can only contains a-z, -, 0-9' def emai...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** 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...
#!python from numpy import * import matplotlib.pyplot as plt import os, string, sys import numpy as np import math import csv import numbers from sklearn.decomposition import PCA from sklearn import preprocessing from matplotlib.patches import FancyArrowPatch from matplotlib import pyplot as plt from mpl_toolkits.mplot...
import os import re import sys import logging from ipaddress import IPv4Network, IPv4Address import urllib.parse import string from utils import constant_time_is_equal, normalise_environment from flask import Flask, request, Response, render_template from random import choices import urllib3 app = Flask(__name__, te...
def category_robotics(ctx): return ctx.channel.category.name.lower() == "robotics facility" def chan(ctx, name): return ctx.channel.name == name def chan_staff(ctx): return chan(ctx, "staff") def chan_commands(ctx): return chan(ctx, "bot-commands") def chan_assignment(ctx): return chan(ctx, ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated from FHIR 4.0.0-a53ec6ee1b (http://hl7.org/fhir/StructureDefinition/ProdCharacteristic) on 2019-01-22. # 2019, SMART Health IT. from . import backboneelement class ProdCharacteristic(backboneelement.BackboneElement): """ T h e m a...
import numpy as np import matplotlib.pyplot as plt from scipy.optimize import least_squares from scipy import interpolate from scipy.signal import savgol_filter from scipy.optimize import minimize from numpy.linalg import inv import find_nearest as fn import Liquid_Phase_O2_Analysis as lp from matplotlib import rcParam...
import cPickle as pickle import numpy as np file = open('/tmp/data_pos.out', 'r') coordinates = [] for line in file.readlines(): t1, t2, t3 = map(float, line.split()) temp = np.array([t1, t2, t3]) coordinates.append(temp) file.close() file = open('/tmp/data_face.out', 'r') face_data = [] for line in file...
import pdb import re """ availableWorkers = 2 minimumStepLength = 1 inputFileName = "7test.txt" """ availableWorkers = 5 minimumStepLength = 61 inputFileName = "7.txt" def stepSeconds(step): return ord(step) - ord('A') + minimumStepLength def tick(workers): """ Subtract one second from each worker task. """ fo...
#-*- coding:utf8 -*- # ============================================================================= # FileName: fonts.py # Desc: 加入自定义字体 # Author: ysw(zjuysw) # Email: yinshaowen241@gmail.com # HomePage: http://my.oschina.net/zjuysw # Version: 0.0.1 # LastChange: 2014-12-28 ...
import time import timeit def main(): start_time = timeit.default_timer() print("TimeIt Module Demo - Start") time.sleep(2) print("TimeIt Module Demo - End") stop_time = timeit.default_timer() print("[Finished in %.1fs]" % (stop_time - start_time)) if __name__ == "__main__": main()
import matplotlib.pyplot as plt """ Loss=0,Corruption=0,t=0.1,m=10000 X-axis: Window size; Y-axis: Throughput (ABT, GBN and SR) in one graph/plot. """ def graph_one(): # X-axis (ABT, GBN, SR) wsize = [10, 50, 100, 200, 500] # Y-axis (ABT) abt_throughput = [0.0696589, 0.0696589, 0.0696589, 0.0696589, 0.0696589] pl...
from distutils.core import setup from setuptools import find_packages setup( name='mean_average_precision', version='0.1', packages=find_packages(), url='', license='MIT', author='Mathieu Garon', author_email='mathieugaron91@gmail.com', description='' )
#!/usr/bin/env python # Copyright 2019 The FastEstimator 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 # # U...
from lxml import etree from common import NSM, setx, mmf, NSW, getap, ntf, setap, Body from copy import deepcopy import ct, txt def xhspace(nd): s = nd.attributes['len'] n = int(s.em*6) t = txt.tr(u"\u2006"*n) getap(nd).append(t)
from typing import Dict, Any # noqa: F401 from vint.linting.config.config_source import ConfigSource class ConfigAbstractDynamicSource(ConfigSource): """ A abstract class for ConfigSource that dynamically changed when linting. """ def __init__(self): pass def get_config_dict(self): # ty...
from django.db.models.fields.related import ManyToManyField from django.forms.models import ModelMultipleChoiceField from _helpers.models import areas_ar_en, areas_en from typing import Any, List, Optional, Sequence, Tuple from django import forms from django.contrib import admin from django.contrib.admin.options impor...
from fileinput import filename from tweepy.streaming import StreamListener from tweepy import OAuthHandler from tweepy import Stream import json tweets = [] #Variables that contains the user credentials to access Twitter API access_token = "access_token" access_token_secret = "access_token_secret" consumer_key = "consu...
# Copyright 2021 Huawei Technologies Co., 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 # # less required by applicable law or agreed to i...
#!/usr/bin/env python3 # encoding: utf-8 #end_pymotw_header import sys print(sys.byteorder)
from antarest.study.storage.rawstudy.model.filesystem.config.model import ( FileStudyTreeConfig, ) from antarest.study.storage.rawstudy.model.filesystem.context import ( ContextServer, ) from antarest.study.storage.rawstudy.model.filesystem.folder_node import ( FolderNode, ) from antarest.study.storage.raws...
# -*- coding: utf-8 -*- """ This module allows for plotting of annotated graphs using matplotlib """ import matplotlib.pyplot as plt from matplotlib import gridspec import matplotlib.patches as mpatches import matplotlib.path as mpath import numpy as np Path=mpath.Path def _draw_beta(ax,start,stop,label="",linewidth...
import logging import os from flask import Flask, make_response, redirect, render_template, request from btfs import sessions from btfs.auth import AuthorizedUser, find_auth_user app = Flask(__name__) app.debug = True @app.route("/auth/users") @sessions.flask_authorize("admin") def auth_users(): """Manage list...
""" SleekXMPP: The Sleek XMPP Library Copyright (C) 2013 Nathanael C. Fritz, Lance J.T. Stout This file is part of SleekXMPP. See the file LICENSE for copying permission. """ from datetime import datetime, timedelta from sleekxmpp.stanza import Presence from sleekxmpp.plugins import BasePlugin from s...
import traceback import time from kernel import OpenStratKernel from util import DataHandler class OpenStrat: def __init__(self): self.info_keys=['Symbol', 'FrontMonth', 'BackMonth', 'NetDebit', 'MaxLoss', ...
import typing from std_number_validation import typings class BaseValidator: def __init__(self, number: int, algorithm: typing.Type[typings.BaseAlgorithmType], exc_to_raise: typing.Type[typings.BaseExceptionType] = None): self.param = number self.algori...