content
stringlengths
5
1.05M
def user_helper(user) -> dict: return { "id": str(user['_id']), "fullname": user['fullname'], "email": user['email'], } def admin_helper(admin) -> dict: return user_helper(user=admin)
from typing import Optional, Sequence, List from gvm.typing import unpack_type_argument, merge_sequence_type, make_optional_type, make_sequence_type, is_subclass def test_unpack_type_arguments(): assert unpack_type_argument(Optional[int]) is int assert unpack_type_argument(Sequence[int]) is int assert un...
import ASUS.GPIO as GPIO import os from subprocess import call from time import sleep # **** Configuration **** # GpioMode = GPIO.ASUS MotionSensor = 257 TimeUntilDisplayOff = 10 # ****************************************** # GPIO.setwarnings(Fa...
""" Logset API module. """ import json import sys import requests from lecli import api_utils from lecli import response_utils def _url(provided_path_parts=()): """ Get rest query url of logset resource id. """ ordered_path_parts = ['management', 'logsets'] ordered_path_parts.extend(provided_pat...
class Credential: """ Class that generates new instances of users """ credential_list = [] # Empty user list def __init__(self,social_media,account,password): # docstring removed for simplicity self.social = social_media self.account = account self.password = pas...
#!/usr/bin/env python # encoding: utf-8 # # Copyright SAS Institute # # 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 b...
""" Rose diagram ------------ The :meth:`pygmt.Figure.rose` method can plot windrose diagrams or polar histograms. """ import pygmt # Load sample compilation of fracture lengths and azimuth as # hypothetically digitized from geological maps data = pygmt.datasets.load_fractures_compilation() fig = pygmt.Figure() fi...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import math import time import random import numpy as np import pandas as pd np.random.seed(7) tic = time.perf_counter() from nn.LSTMLayers import lstm_cell_forward, lstm_forward from nn.LSTMLayers import lstm_cell_backward, lstm_backward from nn.activations import tanh...
#! /usr/bin/env python # -*- coding: utf-8 -*- import h5py import re from core import _V, loadDset_arr, loadDset_log, getAttributes, saveAttributes, checkAttributes class Option(dict, _V): """ The Option class A Python dictionary which contains a copy of the RTTOV v11 rttov_options structure The...
# -*- coding:utf-8 -*- """ 显示界面 """ import gzip from PyQt5.QtWidgets import * from PyQt5.QtCore import * from PyQt5.QtGui import * from core.NetService import NetService class QMainView(QWidget): def __init__(self): super(QMainView, self).__init__() self.init_component() self.mNetServ...
from flask import Flask, request, jsonify import boto3 import os import logging import json from flask.templating import render_template import decimal logger = logging.getLogger() logger.setLevel(logging.INFO) AWS_REGION = 'us-east-1' MODE_DEBUG = False class DecimalEncoder(json.JSONEncoder): def default(self, ...
from server.bo.Student import Student from server.db.Mapper import Mapper class StudentMapper(Mapper): """Mapper class, that maps the student objects on relational Database. To do this, a number of methods are available, which help to search, create, modify and delete obejcts. The mapping is bidirect...
from math import tau import plotly.graph_objects as go import numpy as np def get_modulus(e1, e2, poisson_ratio, shear_modulus, theta): theta = np.radians(theta) q_reduced = reduced_stiffness_matrix(e1, e2, poisson_ratio, shear_modulus) qrt = transformed_reduced_stiffness_matrix(q_reduced, theta) modul...
from .sudoku import Sudoku name = "sudoku_lib"
result = delivery_reports_controller.check_delivery_reports()
import ctypes import typing as t from . import sdk from .enum import ActivityActionType, ActivityJoinRequestReply, Result from .event import bind_events from .model import Activity, User class ActivityManager: _internal: sdk.IDiscordActivityManager = None _garbage: t.List[t.Any] _events: sdk.IDiscordActi...
from typing import AnyStr, Dict import numpy as np def add_to_dict_valuelist(dictionary: Dict, key: AnyStr, value) -> Dict: if key not in dictionary: dictionary[key] = [value] else: dictionary[key].append(value) return dictionary def decodeMask(R): """ Decode binary mask M encod...
#!/usr/bin/env python3 # # # Copyright (c) 2021, Henry Bonath (henry@thebonaths.com) # 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 cop...
# -*- coding: utf-8 -*- """ Learn You a Haskell for Great Good! http://learnyouahaskell.com/chapters """ import re from mobify.source import MultiChapterSource, MobifySource class HaskellSource(MultiChapterSource): BASE = 'http://learnyouahaskell.com/' @staticmethod def is_my_url(url): return '...
import typing import flax import jax.numpy as jnp # noinspection PyAttributeOutsideInit class LinearModel(flax.linen.Module): num_out: int weight_init: typing.Callable[ [flax.linen.linear.PRNGKey, flax.linen.linear.Shape, flax.linen.linear.Dtype], flax.linen.linear.Array ] = flax.linen.linear.def...
from ctypes import * STD_OUTPUT_HANDLE = -11 class COORD(Structure): pass COORD._fields_ = [("X", c_short), ("Y", c_short)] class SMALL_RECT(Structure): pass SMALL_RECT._fields_ = [("Left", c_short), ("Top", c_short), ("Right", c_short), ("Bottom", c_short)] class CONSOLE_SCREEN_BUFFER_INFO(Structure): ...
""" Created on September 18, 2015 @author: oleg-toporkov """ from functools import wraps import logging def log_exception(message, logger=None): """ Decorator for function execution in try/except with first logging what tried to do and then raising an exception """ def decorator(func): @wraps...
# control module
import requests from PIL import Image import io import json import traceback server_url = "http://localhost:8080" json_endpoints = [ '/keepalive', '/location', '/date', '/version', '/time', '/metoffice/observation', '/metoffice/forecast', '/metoffice/inshore_forecast', '/metoff...
# Copyright 2017 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...
from explainer import backprop as bp import explainer.random as rand from explainer.pattern import pattern_augment def get_explainer(model, name): methods = { 'vanilla_grad': bp.VanillaGradExplainer, 'grad_x_input': bp.GradxInputExplainer, 'integrate_grad': bp.IntegrateGradExplainer, ...
import time import csv from random import randint, choice from decouple import config from gen_names import gen_male_first_name, gen_female_first_name, gen_last_name from gen_random_values import gen_cpf, gen_rg from selenium import webdriver from lists import company_list, department_list HOME = config('HOME') # page...
from . import collision, entity class Map: """ Map which houses the current game information/metadata. :ivar my_id: Current player id associated with the map :ivar width: Map width :ivar height: Map height """ def __init__(self, my_id, width, height): """ :param my_id...
import unittest import sys, os sys.path.append(os.path.dirname(os.path.abspath(__file__)) + "/../../src/util") from DataTrimer import DataTrimer class DataTrimerTest(unittest.TestCase): def test_trim_day(self): data = [1, 2, 3, 4, 5, 6, 7, 8, 9] result = DataTrimer.trim_day(data, 2, 4) exp...
from .boxes.demo import easygui_demo easygui_demo()
import os root_dir = '.' ignore_colors = [] while True: found = False for dir_name, subdir_list, file_list in os.walk(root_dir): for fname in file_list: if fname.endswith('.scss'): with open(os.path.join(dir_name, fname), 'r') as f: lines = f.readlines() ...
from io import BytesIO from dissect.cstruct.expression import Expression class BaseType(object): """Base class for cstruct type classes.""" def __init__(self, cstruct): self.cstruct = cstruct def __getitem__(self, count): return Array(self.cstruct, self, count) def __call__(self, *a...
from sense_hat import SenseHat from time import sleep sense = SenseHat() is_running = False def exit_event(event): global is_running if event.action=='pressed' and is_running: print("standby exit") is_running = False def paint_indicator(brightness): for x in range(0,2): for y in r...
class Solution: def countPrimeSetBits(self, L, R): """ :type L: int :type R: int :rtype: int """ import math count = 0 def isprime(n): if n < 2: return False for i in range(2, int(math.sqrt(n)) + 1): ...
from rest_framework.generics import RetrieveUpdateAPIView from rest_framework import status from rest_framework.permissions import AllowAny, IsAuthenticated from rest_framework.response import Response from rest_framework.views import APIView from django.http import HttpResponse from .renderers import UserJSONRenderer ...
""" MIT License Copyright (c) 2021 UltronRoBo 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, publish, di...
from structural import FBC2010 from structural.calc import BaseCalc class WindCalc(BaseCalc): def __init__(self, V, z, exposure="C", Kd=0.85, Kzt=1.0, code=FBC2010, title="", project=None, project_number="", by=""): super(WindCalc, self).__init__(title, project, project_number, by) ...
from datetime import datetime from django.db import migrations, IntegrityError from django.db.migrations import RunPython def add_new_document_statuses(apps, schema_editor): """Add additional document statuses""" db_alias = schema_editor.connection.alias # By retrieving the models via apps.get_model, w...
import string def alphabet_position(s: str) -> str: """ This function return string with replace every letter with its position in the alphabet. """ dict_of_letters: dict = {letter: str(idx) for idx, letter in enumerate(string.ascii_lowercase, start=1)} return ' '.join([dict_of_letters[i] for i in...
from django.shortcuts import render from django.http import HttpResponse from django.shortcuts import render_to_response from django.template import RequestContext import re, json import ipaddress # Create your views here. ipaddrmatch = re.compile('^(?:[0-9]{1,3}\.){3}[0-9]{1,3}(/[0-9]+)?$') cidrmatch = re.compile('/...
_base_ = ['./pose-detection_static.py', '../_base_/backends/sdk.py'] codebase_config = dict(model_type='sdk') backend_config = dict(pipeline=[ dict(type='LoadImageFromFile', channel_order='bgr'), dict( type='Collect', keys=['img'], meta_keys=[ 'image_file', 'bbox', 'rotatio...
def eyesfront(): i01.head.eyeX.moveTo(85) i01.head.eyeY.moveTo(85)
# -*- coding: utf-8 -*- ''' :codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>` ''' # Import Python libs from __future__ import absolute_import # Import Salt Testing Libs from tests.support.unit import skipIf, TestCase from tests.support.mock import ( NO_MOCK, NO_MOCK_REASON, MagicMock, pat...
import logging import unittest from config_test import build_client_from_configuration _logger = logging.getLogger(__name__) class TestServiceKeys(unittest.TestCase): def test_create_delete(self): client = build_client_from_configuration() try: instance = client.service_instances.cre...
#!/usr/bin/env python ''' Created on 23 Oct 2019 # Copyright (C) 2011-2019 DoomedRaven. # This file is part of Tools - https://github.com/doomedraven/Tools # See the file 'LICENSE.md' for copying permission. This is demo plugin of volatility3 to show community how to easilly upgrade/make an vol3 plugin Special huge t...
from .. import helpers from intel import sst_cp, topology from unittest.mock import patch def return_cores(): sockets = topology.Socket(0, { 0: topology.Core(0, { 0: topology.CPU(0), 4: topology.CPU(4) }), 1: topology.Core(1, { 1: topology.CPU(1), ...
# -*- coding: utf-8 -*- """ checkout-server.resources ~~~~~~~~~~~~ """ import json from stripe.error import InvalidRequestError from flask.views import MethodView from flask import current_app as app from flask import jsonify, abort, request, send_from_directory, make_response from checkout_server.models import Inval...
import sys sys.path.append("..") from input_package.input_manager import * from load_obj import OBJ_Loader from classes import Model from renderer import Renderer import os import pygame def main(): global width, height, input, renderer, time width = 1024 height = 768 screen = pygame.display.set_mode(...
import discord from discord.ext import commands class PortalboostCounter(commands.Cog, name="PortalboostCounter"): def __init__(self, client): self.client = client with open("cogs/portalboost.txt", "r") as f: l = f.readlines() self.portalboostnum = int(l[0].strip()) @c...
"""INGV Centro Nazionale Terremoti (Earthquakes) feed entry.""" from typing import Optional, Tuple from georss_client import FeedEntry from .consts import ( IMAGE_URL_PATTERN, REGEXP_ATTR_EVENT_ID, REGEXP_ATTR_MAGNITUDE, REGEXP_ATTR_REGION, ) class IngvCentroNazionaleTerremotiFeedEntry(FeedEntry): ...
# Generated by Django 2.1.5 on 2019-09-13 09:18 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('users', '0037_auto_20190913_1302'), ] operations = [ migrations.AddField( model_name='profile', name='facebookHandle...
# -*- coding: utf-8 -*- """ Base class for any wrapper policy. - It encapsulates another policy, and defer all methods calls to the underlying policy. - For instance, see :class:`Policies.SparseWrapper`, :class:`Policies.DoublingTrickWrapper` or :class:`Policies.SlidingWindowRestart`. """ from __future__ import divisi...
import os import pathlib from typing import Union from astro.constants import LOAD_DATAFRAME_BYTES_LIMIT, FileType def get_size(filepath: str) -> int: """ Return the size (bytes) of the given file. :param filepath: Path to a file in the filesystem :type filepath: str :return: File size in bytes ...
import sys from PyQt5.QtWidgets import QDialog, QApplication from PyQt5.QtCore import QRect, QPropertyAnimation from demoAnimation1 import * class MyForm(QDialog): def __init__(self): super().__init__() self.ui = Ui_Dialog() self.ui.setupUi(self) self.ui.pushButtonMoveDown.clicked...
# -*- coding: utf-8 -*- """ Created on Sat Mar 18 10:52:34 2017 @author: Aeolitus """ import Objekte import UI.DatenbankEditWaffeneigenschaft from PyQt5 import QtWidgets, QtCore from Wolke import Wolke class DatenbankEditWaffeneigenschaftWrapper(object): def __init__(self, datenbank, waffeneigenschaft=None, reado...
from flask import Flask, request, Response from flask_cors import CORS, cross_origin import json import pathlib import sys path = str(pathlib.Path(pathlib.Path(__file__).parent.absolute()).parent.absolute()) sys.path.insert(0, path) from di import db app = Flask(__name__) cors = CORS(app) @app.route('/deepwebhook',...
import os import argparse import collections import numpy as np import torch import torch.optim as optim from torchvision import transforms from torch.utils.data import DataLoader from retinanet import model from dataloader import CSVDataset, collater, Resizer, AspectRatioBasedSampler, Augmenter, UnNormalizer, Normal...
# An exmaple main function for prediction/inference from rnn.biLSTM_inference import biLSTM_inference from numpy import load from torch import from_numpy def main(): # data shape: [instance_size, seq_size, feature_size] data = load('data/data.npy') # example for a single instance (shape: [seq_size, feat...
from django.apps import AppConfig from django_jinja import base class DjangoJinjaAppConfig(AppConfig): name = "django_jinja" verbose_name = "Django Jinja" def ready(self): base.env.initialize()
import subprocess import paramiko import time import abc from paramiko.ssh_exception import NoValidConnectionsError, SSHException import psutil from worker import socketio from worker.utils.common_cli import CommonCli class ResourceMonitor: def __init__(self, namespace) -> None: self.watcher_num = 0 ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import pandas as pd from datetime import datetime, timedelta import numpy as np import netCDF4 as nc from netCDF4 import Dataset import os import rasterio from scipy.interpolate import griddata from scipy import interpolate Path_save = '/home/nacorreasa/Maestria/Datos_Tesi...
import PyQt5.Qt as qt from heartwave.plot import Plot import heartwave.util as util class View(qt.QWidget): """ Video canvas with overlay. """ def __init__(self, parent): qt.QWidget.__init__(self, parent) self.image = None def draw(self, im, persons): """ Display ...
from pathlib import Path import doctest import os import sys PY39 = doctest.register_optionflag("PY39") runner = doctest.DocTestRunner() parser = doctest.DocTestParser() for path in Path(".").rglob("*.md"): with open(path) as f: print(f"doctest {path}") name = os.path.basename(path) test...
# Copyright (c) 2012-2015 Netforce Co. Ltd. # # 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, publ...
from .base_dataset import BaseDataset from .blender import Blender from .deep_voxels import DeepVoxels from .dtu_mvs_idr import DTUMVSIDR from .dtu_mvs_pixel_nerf import DTUMVSPixelNeRF from .llff import LLFF from .shapes3d import Shapes3dDataset __all__ = [k for k in globals().keys() if not k.startswith("_")]
from Autonomous.Sensors.Car.PS4_Controller.PS4_Controller import PS4_Controller from Autonomous.Sensors.Car.Car_Interface import Car_Interface import pygame import tkinter as tk from threading import * class CarJoy(Thread): def __init__(self, car: Car_Interface, controller: PS4_Controller): super(CarJoy,...
import pandas as pd import numpy as np import math def gnps_filter_annotations(table_in, inchi_column, ionisation_mode='pos', max_ppm_error=10, min_cosine=0.7, shared_peaks=6, max_spec_charge=2, prefix = ''): #Apply prefix to the column name ...
""" Do clump finding on the BH_to_Eddington field for each halo in the merger tree. Usage: python tree_accretion_clumps.py <simulation filename> <merger tree filename> <BH_to_Eddington threshold> Example: python tree_accretion_clumps.py rs_normal_bg1.h5 halo_2170858/tree_2170858/tree_2170858.h5 1e-4 """ import gc imp...
""" main script to react to trade in Telegram channel and send to MT4. """ import channel.olafemi import mt4 import pyrogramconf from pyrogram import Client LOT_SIZE = 0.01 SIGNAL_CHANNEL = 'PAID Subscribers Clone' SIGNAL_CHANNEL_PREFIX = SIGNAL_CHANNEL[:16] app = Client("my_account", pyrogramconf.api_id, pyrogramcon...
import threading def calc_square(number): print(f'Square: {number * number}') def calc_quad(number): print(f'Quad: {number * number * number * number}') if __name__ == "__main__": print(f'Starting execution of {__name__}...') number = 7 thread1 = threading.Thread(target=calc_square, args=(number,...
""" Plot 4 separate maps in a grid pattern. This uses the MapView directly. """ from vispy import app from vispy.scene import SceneCanvas import vismap.view class Canvas(SceneCanvas): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.unfreeze() self.grid = self.c...
import pyrebase config = { "apiKey": "AIzaSyBEWe5NAhhwqOVge-kMvQjBUhWnm4U4Yk8", "authDomain": "learnpython-88c3f.firebaseapp.com", "databaseURL": "https://learnpython-88c3f.firebaseio.com", "projectId": "learnpython-88c3f", "storageBucket": "learnpython-88c3f.appspot.com", "messagingSenderId": ...
import serial import json import numpy as np import globals import logging import time import sys import struct import cProfile, pstats from datetime import datetime # Serial abbreviations -> s = start (checking if RPi has woken up), y = yes (indication that RPi has received start command), e = end (ending data collec...
from time import time t1 = time() high = 1 for i in range(1, 100000): j = 1 num_str = "" while len(num_str) < 9: num_str += str(i * j) j += 1 if len(set(num_str)) == 9 and len(num_str) == 9 and "0" not in num_str: current = int(num_str) if current > high: hig...
from omymodels import create_models def test_unique_and_index(): expected = """import sqlalchemy as sa from sqlalchemy import Table, Column, MetaData from sqlalchemy.dialects.postgresql import UUID from sqlalchemy.schema import UniqueConstraint from sqlalchemy import Index metadata = MetaData() table = Table(...
#!/usr/bin/env python3 # Roger Volden from setuptools import setup from setuptools import find_packages from Cython.Build import cythonize with open('README.md', 'r') as fh: long_description = fh.read() ext_modules = cythonize('conk/conk.pyx') setup( name='conk', version='1.0.0', author='Roger Volde...
# 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: D:\dev\TS4\_deploy\Client\Releasex64\Python\Generated\protocolbuffers\Roommates_pb2.py # Compiled at: 2020-12-13 14:24:01 # Size of so...
# Open URL opens selected URLs, files, folders, or googles text # Hosted at http://github.com/noahcoad/open-url # test urls: google.com ~/tmp ~/tmp/tmp c:\noah c:\noah\tmp.txt c:\noah\tmp import sublime, sublime_plugin import webbrowser, urllib, urllib.parse, threading, re, os, subprocess, platform, socket class Open...
from typing import Optional from fastapi import FastAPI from pydantic import BaseModel ############## import datetime app = FastAPI() class Telemetri(BaseModel): class GPSSaatiSubClass(BaseModel): saat: int dakika: int saniye: int milisaniye: int takim_numarasi: int IHA_...
from . import jsonapi from flask_rest_multiformat_api.format import simple_json DATA_FORMATER = { "jsonapi": jsonapi.JsonApiFormater, "simple_json": simple_json.SipleJsonFormater }
import sys import argparse import traceback import importlib from lesson07n2.main_finally import MainFinally from lesson11n90.code_gen.toml_reader_v11n90 import TomlReaderV11n90 from lesson11n100.code_gen.json_reader_v11n100 import JsonReaderV11n100 from lesson16n3.conf_obj.transition_v16n3 import TransitionV16n3 fro...
class Solution: def permute(self, nums: [int]) -> [[int]]: self.res = [] self.swap(nums, 0) return self.res def swap(self, nums, j): if j == len(nums) - 1: self.res.append(list(nums)) for i in range(j, len(nums)): nums[i], nums[j] = nums[j], nums[i] ...
#!/usr/bin/env python3 """ 3Dviewer.py particle trajectory viewer using glumpy Date: 20170814 - update for key input Date: 20170904 - update for input argument, cleanup using collection-point """ import sys import numpy as np from glumpy import app, gl from glumpy.graphics.collections import PointCollection, Segment...
# -*- coding: utf-8 -*- from bot.adapters.ccxt_adapter import CcxtAdapter from secrets import BINANCE_KEY, BINANCE_SECRET import json class BinanceAdapter(CcxtAdapter): ccxt_module_name = 'binance' apiKey = BINANCE_KEY secret = BINANCE_SECRET websocket_uri = "wss://stream.binance.com:9443" def f...
import envtest from polarization.tissue import * from polarization.tissueStack import * from polarization.tissueLayer import * from polarization.pulse import * np.random.seed(521) class TestTissue(envtest.MyTestCase): def setUp(self) -> None: pass def testRandomTissue2DMap(self): tissue = Ra...
# -*- coding: utf-8 -*- from copy import copy class VerifiableDelayFunction: def __init__(self, method, strategy, curve, delay): self.method = method self.strategy = strategy self.curve = curve self.delay = delay def __repr__(self): return 'Verifiable delay function wi...
from math import * ################################################################################ # Provide the fortran sign function. ################################################################################ def sign(x,y): sgn = y/(abs(y) + 1e-20) return x*sgn #######################################...
from setuptools import setup setup( name='scylla_django_session_store', version='0.0.4', packages=['tests', 'scylla_sessions', 'scylla_sessions.management', 'scylla_sessions.management.commands'], url='https://github.com/mwaaas/scylla_django_session_store', license='MIT', install_...
from math import * import random import time import numpy as np import math from copy import deepcopy import os.path #import bpy # # Based on the great Course CS373 from Udacity taught by Sebastian Thrun # https://www.udacity.com/course/cs373 # # 3D Erweiterung von Paul Balzer # CC-BY2.0 Lizenz #Minor modifications ...
# Copyright (c) 2016 Shotgun Software Inc. # # CONFIDENTIAL AND PROPRIETARY # # This work is provided "AS IS" and subject to the Shotgun Pipeline Toolkit # Source Code License included in this distribution package. See LICENSE. # By accessing, using, copying or modifying this work you indicate your # agreement to t...
""" Test the NEWSUMT optimizer component using a variety of problems and special cases. Problem | Objective | Linear Constraints | Nonlinear Constraints ==================================================================================== Rosen Suzuki | nonlinear | 0 ...
# 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"); you may not u...
"""Setup for gitalong. """ import os from setuptools import setup dirname = os.path.dirname(__file__) info = {} with open(os.path.join(dirname, "gitalong", "__info__.py"), mode="r") as f: exec(f.read(), info) # pylint: disable=W0122 # Get the long description from the README file. with open(os.path.join(dirnam...
""" Util functions """ from pydoc import locate __all__ = [ "get_full_module_name", "get_class_name", "get_class", "get_qual_name", ] def get_full_module_name(o, lower=False): """ Returns the full module and class name of an object o. For example, for our :class: OntonotesReader, returns ...
#!/usr/bin/env python """Provide API for validating Translator Interchange API messages.""" import re import copy import argparse from urllib.request import urlopen import yaml try: from yaml import CLoader as Loader except ImportError: from yaml import Loader import jsonschema from flask import Flask, request...
from scipy.special import betaln, gammaln, logsumexp from scipy.stats import binom import math import pysam import pandas as pd import numpy as np import re import os import sys import collections import scipy from scipy import stats import statsmodels np.seterr(divide = 'ignore') # np.seterr(divide = 'warn') def ...
from django.urls import include, path from . import views # Wire up our API using automatic URL routing. # Additionally, we include login URLs for the browsable API. urlpatterns = [ path('<str:city>/<str:date_start>/<str:date_end>' , views.TempAndHumidity.as_view()), path('<str:city>/<str:da...
from setuptools import setup, find_packages from os import path this_directory = path.abspath(path.dirname(__file__)) with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f: long_description = f.read() classifiers = ['Operating System :: Microsoft :: Windows :: Windows 10', '...
# from SimpleXMLRPCServer import SimpleXMLRPCServer # from SimpleXMLRPCServer import SimpleXMLRPCRequestHandler # import OpenOPC # # chemicalsMain = OpenOPC.open_client('172.30.246.210') # chemicalsMain.connect('SWToolbox.TOPServer.V5') # print(chemicalsMain.info()) # print(chemicalsMain.list()) # print('\n') ...
#! /usr/bin/python # Copyright (C) 2011-2020 Airbus, Louis.Granboulan@airbus.com import getopt, sys, os.path sys.path.insert(1, os.path.abspath(sys.path[0]+'/..')) from plasmasm.analyze_file import File def usage(long = False): sys.stderr.write("disass.py [-hvaITtSrLWDobs] [-[CA]d dot] [-y type] [-c cpu] [-e ep] <...