content
stringlengths
5
1.05M
import os import re import sys import platform import subprocess from setuptools import setup, Extension from setuptools.command.build_ext import build_ext from distutils.version import LooseVersion from distutils.util import get_platform from wheel.bdist_wheel import bdist_wheel as bdist_wheel_ class CMakeExtension...
print(f"{1if'yes'else'no'}") print(f'{x for x in [1]}'[:17]) print(f'{x for x in [1]} {x for x in [1]}'[:17]) print(f'{x for x in [1]=}'[:32]) def foo(x=0): if x == 0: print(f"{yield 'end' = }") return print(f'hello {yield 88} world') print(f'yet {(yield "99")} another') print(f'{yield...
""" example cmdline: python test/surrogate/plot.py --mths gp,gp_mcmc,prf,tpe,lightgbm --problem branin --n 200 """ import sys import pickle as pkl import os import argparse import numpy as np import matplotlib.pyplot as plt #import seaborn as sns # sns.set_style(style='whitegrid') # plt.rc('text', usetex=True) # pl...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'links.ui' # # Created: Sat Feb 1 00:10:33 2014 # by: pyside-uic 0.2.13 running on PySide 1.1.0 # # WARNING! All changes made in this file will be lost! from PySide import QtCore, QtGui class Ui_Links(object): def setupUi(self, Li...
class Solution: def addTwoNumbers(self, l1: ListNode, l2: ListNode) -> ListNode: c=0 temp=l1.val+l2.val+c c=int(temp/10) res = ListNode(temp%10, None) l1=l1.next l2=l2.next ans=res while l1 != None or l2 != None or c!=0: tl2 = 0 if...
# -*- coding: utf-8 -*- """ author: Richard Bonye (github Boyne272) Last updated on Tue Aug 27 18:23:14 2019 """ import numpy as np import matplotlib.pyplot as plt import scipy.linalg as la from ..tools import progress_bar class AGNES(): """ Clusters the given feature vectors by the AGNES algor...
import itertools a = [1, 2, 3] b = ["One", "Two"] result1 = list(zip(a, b)) result2 = list(itertools.zip_longest(a, b)) print(result1) print(result2)
#!/usr/bin/env python3 import argparse import random import glob import logging import math import os import pathlib import shutil import signal import socket import subprocess import threading import time import docker import grpc_requests import minio import requests import toml import urllib3 ioxperf_name = "ioxp...
import uuid import wtforms_json from sqlalchemy import not_ from sqlalchemy.dialects.postgresql import UUID from wtforms import Form from wtforms.fields import FormField, FieldList from wtforms.validators import Length from flask import current_app as app from flask import request, json, jsonify, abort from flask.ext....
#1 def power (x, n): res = 1 for i in range(n): res = res * x return res #2 def power(x, n): if n == 0: return 1 temp = power (x, int(n/2)) temp = temp * temp if n % 2 == 0: return temp else: return temp * x print(power(5, 3))
def how_much_water(water, load, clothes): if clothes > 2*load: return 'Too much clothes' elif clothes < load: return 'Not enough clothes' else: amount = water * 1.1**( clothes - load ) return round(amount,2)
from .subnet import *
import py import sys from pypy.interpreter import gateway, module, error class TestInterpreter: def codetest(self, source, functionname, args): """Compile and run the given code string, and then call its function named by 'functionname' with arguments 'args'.""" space = self.space ...
""" The pipeline module contains the transformations and actions API of PyFunctional """ from __future__ import division, absolute_import from operator import mul, add import collections from functools import reduce, wraps, partial import json import csv import sqlite3 import re import six from tabulate import tabu...
#!/usr/bin/env python import sys import time import rospy, rostopic import numpy as np import cv2 import matplotlib.pyplot as plt import matplotlib.animation as animation from sensor_msgs.msg import Image, CompressedImage, Imu from tello_driver.msg import TelloStatus from cv_bridge import CvBridge, CvBridgeError fr...
from django.shortcuts import render, redirect, get_object_or_404 from django.contrib.auth.mixins import LoginRequiredMixin from django.contrib.auth.decorators import login_required from django.views.generic import DetailView from django.contrib import messages from .forms import UserRegisterForm, UserUpdateForm from dj...
from django.db import models from django.db.models import Q from django.utils.encoding import force_text from django.utils.timezone import localdate from backports import csv try: from wagtail.core.models import Page except ImportError: # pragma: no cover; fallback for Wagtail < 2.0 from wagtail.wagtailcore...
def main(): x = y = z = w = 100
# Package config from .configurize import Configurize
""" Copyright BOOSTRY 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 Unless required by applicable law or agreed to in writing, software distr...
import unittest from examples.paired_assoc import PairedAssociatesSimulation class PairedAssociatesTest(unittest.TestCase): def test_paired_associates(self, output=False): sim = PairedAssociatesSimulation(n_sims=2) result_correct, result_rt = sim.run() self.assertGreater(result_correct.r...
import tkinter as tk from tkinter import X, Y, TOP, BOTTOM, LEFT, RIGHT, HORIZONTAL, VERTICAL, END, BOTH, ACTIVE, WORD, N, E, NSEW, EW from tkinter import ttk # from dmltk import panels import panels class Notebook(ttk.Frame): """""" def __init__(self, isapp: bool=True, master: tk.Tk=None, name: str='notebookde...
""" Some colors """ from v_palette import get_colors from constants import names EXPENSES = get_colors(("red", 500)) INCOMES = get_colors(("green", 500)) INCOMES_PASSIVE = get_colors(("green", 700)) EBIT = get_colors(("amber", 500)) EBIT_CUM = get_colors(("blue", 500)) LIQUID = get_colors(("blue", 400)) LIQUID_...
""" Test handling of the private typecodes: _C_UNICHAR This typecode doesn't actually exists in the ObjC runtime but are private to PyObjC. We use these to simplify the bridge code while at the same time getting a higher fidelity bridge. - Add tests for calling methods from ObjC """ from __future__ import unicode_li...
# Generated by Django 3.0.5 on 2020-07-25 09:09 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
cmd.do('select oxygen, elem O')
#!/usr/bin/env python # Copyright 2016 Cisco Systems, 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....
#!/user/bin/env python '''game.py: Provides the game class interface for implementing full information games.''' ################################################################################ class Game: nbr_players = 2 state_dim = 27 def __init__(self): return def visualize(): r...
print('This is Branch_1')
# -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-07-28 05:40 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('custom_attributes', '0007_auto_20160208_1751'), ] operations = [ # Function:...
import numpy as np import pytest from hypothesis import given from hypothesis.extra.pandas import series @given(s=series(dtype=np.number)) def test_ecdf(s): """A simple execution test.""" if s.isna().sum() > 0: with pytest.raises(ValueError): x, y = s.ecdf() else: x, y = s.ecdf...
my_pi = 3.14159 def add(a,b): return a+b
from discord_api import *
# -*- coding:utf-8 -*- # # Tencent is pleased to support the open source community by making QTA available. # Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved. # Licensed under the BSD 3-Clause License (the "License"); you may not use this # file except in compliance with the License. You may ...
from utils.tokens import TokenType as _TokenType from utils.tokens import Token as _Token class ScanError(Exception): def __init__(self, line: int, message: str): self.line = line self.message = message def report(self): return f"\033[93m[ScanError on line {self.line}]\033[0m {s...
#!/usr/local/bin/python2.7 """list ISY vars demo app Usage: %(program)s [options] [var=val] Options: --list """ #this is Ugly code and should be cleaned up __author__ = "Peter Shipley" import ISY import sys import getopt def list_vars_bash(myisy, csh=0): if csh : fmt = "set {0}={1}" else...
from OBlog import app import sys if __name__ == '__main__': args = sys.argv if len(sys.argv) == 1: app.run(debug=True, threaded=True, host='0.0.0.0', port=8000) else: import importlib importlib.import_module('tools.'+args[1])
#!/usr/bin/env python import rospy from swings import Swings from sensor_msgs.msg import Joy class JoystickSwings(): def __init__(self): self.swing = Swings() self.sub = rospy.Subscriber("joy", Joy, self.callback) self.buttons = { 'up': 4, 'down': 6, ...
# Copyright 2021 The Distla Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
from nltk import ngrams def ngram_toks(sents, n=1): ntoks =[] for sent in sents: ntok = list(ngrams(sent.split(), n)) newtoks = [tok for tok in ntok] ntoks+= newtoks return ntoks def ndistinct(sents, n=1): total_tokens = ngram_toks(sents, n) unique_toks = set(total_toke...
import joblib from nltk import ngrams as nltk_ngrams import ngrams_lib as ng from harmonic_lib import ngram_hsim CHORDS_PATH = "./sonar_databundle.joblib" NGRAMS_PATH = "./sonar_ngrams.joblib" def compute_similarity(ngrams_bag, ngrams_bag_dict): track_ids = list(ngrams_bag_dict.keys()) hsim_map = {track_id:...
# Given a sentence text (A sentence is a string of space-separated words) in the following format: # First letter is in upper case. # Each word in text are separated by a single space. # Your task is to rearrange the words in text such that all words are rearranged in an increasing order of their lengths. If two words...
import tensorflow as tf from My_Data.TF_Reader import TF_Reader from My_Data.Data_Argument import * from My_Trainer import Trainer from Attention_Model import Attention_Model from tensorflow.python.platform import flags import common_flags import My_Log.Log_Manager as LM import tensorflow.contrib.slim as slim import sy...
import random import math import time k = 10000 kp = 12000 c = 0.1 delta = 0.1 s = c * math.log(k/delta) * math.sqrt(k) print 'S = ', s print 'k/s = ', k/s source = [] for i in range(k): source.append(i) def uniform(lo, hi): return lo + int(random.random() * (hi + 1 - lo)) def cdf(lo, hi, dist): cdf =...
"""' Calculate historic returns for an asset/portfolio Function Signature: mvn_historical_returns (Maven_Asset_ID, Price_Type, *Currency*, [Period_Start], *[Period_End], Normalisation, CompoundingFrequency*) returns [FLOAT] Function Inputs: - Maven Asset ID - STRING - Price Type - STRING - Currency - STRING o...
from mock import ANY from tests.testcase import TestCase from socket import AF_INET, SOCK_STREAM from raptiformica.distributed.ping import check_port_open class TestCheckPortOpen(TestCase): def setUp(self): self.log = self.set_up_patch( 'raptiformica.distributed.ping.log' ) s...
from skimage import io from skimage.color import rgb2gray import numpy as np import glob as gl ############################################################################### # CONVERT IMAGES TO GREYSCALE AND RELABEL def convert_to_greyscale (filename_in, filename_out): img_color = io.imread(filename_in) ...
""" Test AnsibleGate State Module """ import os import shutil import tempfile import pytest import salt.utils.files import salt.utils.path import yaml from tests.support.case import ModuleCase from tests.support.helpers import flaky, requires_system_grains from tests.support.mixins import SaltReturnAssertsMixin from ...
from math import ceil from functools import partial import tkinter from tkinter import N, W, S, E, ttk from typing import Callable, Optional from resources import ArkhesResource from tooltip import CreateToolTip from spotifyWrapper import spotify_wrapper from arkhesPlaylists import ArkhesPlaylists class ...
from httpx import AsyncClient class Config: enabled: bool index_prefix: str client: AsyncClient def __init__(self): self.enabled = False CONFIG = Config()
"""Package-level information""" __MAJOR__ = 0 __MINOR__ = 0 __MICRO__ = 1 __VERSION__ = (__MAJOR__, __MINOR__, __MICRO__) __version__ = '.'.join(str(n) for n in __VERSION__) __github_url__ = 'https://github.com/JWKennington/CompPhys' from compphys.tests import run_tests # top level function for running test suite, an...
from nltk.tokenize import word_tokenize class Tokenizer(object): """ Interface. """ def __init__(self, text): """ Constructor. """ self.text = text def execute(self): """ Raises NotImplementedError. """ raise NotImplementedError("Tokenizer is an abstract class. In must be ...
from requests.models import REDIRECT_STATI, HTTPError from riotwatcher import LolWatcher from riotwatcher._apis.league_of_legends.SummonerApiV4 import SummonerApiV4 from riotwatcher._apis.league_of_legends.MatchApiV5 import MatchApiV5 import functions as fun import time as t DeathKingScore = 20 NoItemScore = 10 BadSpe...
# URLify: replace all spaces in a string with '%20' def urlify(s: str, n: int) -> str: return s.strip().replace(" ", "%20") def urlify2(s) -> str: """ Perform URLify in place. """ # Get the original byte array b = bytearray(s.encode("utf-8")) print(f"Start: {b}") # Strip spaces ...
''' Show what versions of 3dsMax is installed on your Windows nodes in the 'Extra Info 0' column. ''' from System.Diagnostics import * from System.IO import * from System import * import os from Deadline.Events import * from Deadline.Scripting import * def GetDeadlineEventListener(): re...
import codecademylib3_seaborn import numpy as np from matplotlib import pyplot as plt from sklearn import datasets from sklearn.cluster import KMeans digits = datasets.load_digits() model = KMeans(n_clusters=10, random_state=42) model.fit(digits.data) fig = plt.figure(figsize=(8, 3)) fig.suptitle('Cluser Center Image...
#!/usr/bin/env python # coding: utf8 # # Copyright (c) 2020 Centre National d'Etudes Spatiales (CNES). # # This file is part of PANDORA # # https://github.com/CNES/Pandora_pandora # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. #...
import pandas as pd from evalml.exceptions import MethodPropertyNotFoundError from evalml.pipelines.components.transformers import Transformer from evalml.utils import ( _convert_woodwork_types_wrapper, _retain_custom_types_and_initalize_woodwork, infer_feature_types ) class FeatureSelector(Transformer):...
from PyQt5.QtWidgets import QWidget, QLineEdit, QPushButton, QGridLayout, QHBoxLayout, QMessageBox from PyQt5.QtGui import QIcon from PyQt5.QtCore import Qt from settings import font, symbol_lst, symbol_lst_2 from functions import text_update, get_formula, get_trans class CreateFormulaWin(QWidget): def __init__(sel...
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import os import sys from collections import defaultdict import numpy as np import PIL import pkg_resources import torch import torchvision from tabulate import tabulate __all__ = ["collect_env_info"] def collect_torch_env(): """ If to...
# -*- coding: utf-8 -*- # Libaddon for Anki # # Copyright (C) 2018 Aristotelis P. <https//glutanimate.com/> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # L...
from __future__ import print_function import argparse import csv import datetime import glob import multiprocessing import numpy as np import os.path import pandas as pd import sys import matplotlib as mpl import pybedtools # to prevent DISPLAY weirdness when running in the cluster: mpl.use('Agg') import matplotlib.pyp...
class SnakemakeRuleBuilder: '''Simplistic class to build a snakemake rule string.''' def __init__(self, ruleName): self.name = ruleName self.inputs = None self.output = '' self.run = '' self.params = {} self.local = True def addInput(self, *args): '...
from .base import * # noqa: F403,F401 DEBUG = False ALLOWED_HOSTS = [ 'art-backend.herokuapp.com' ] CORS_ORIGIN_WHITELIST = ( 'art-dashboard-staging.herokuapp.com' ) CORS_ORIGIN_REGEX_WHITELIST = \ (r'^(https?:\/\/)?(\w+\.)?((localhost)|(127\.0\.0\.1)):\d{4}', )
import os import scipy import numpy as np import tensorflow as tf def load_mnist(batch_size, is_training=True): path = os.path.join('data', 'mnist') if is_training: fd = open(os.path.join(path, 'train-images-idx3-ubyte')) loaded = np.fromfile(file=fd, dtype=np.uint8) # trainX = loaded[...
# -*- coding: utf-8 -*- # Copyright © 2017 Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can # be found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from __future__ import print_function as _ from __future__ import division as _ from...
from collections import defaultdict import decimal import os import time import traceback from parse import Parser, ParseError from tokens import EOF, Value, REPL from common import ExecutionError, StopError, ReturnError from pitybas.io.simple import IO from expression import Base class Interpreter(object): @cla...
from unittest import TestCase from contextlib import contextmanager from galileosky import Packet, tags class Test(TestCase): @staticmethod @contextmanager def register_custom_tag(tag): old_tag = tags.tags[tag.id] Packet.register(tag) yield Packet.register(old_tag) de...
ZALO_CRE = { 'access_token': "M8fh75NE51jMZMOMNSaM4rQ3O1PLtsXI1fKRDLQo14mWg1KKBwuaKZYhKrDLc2m59e5IOIYbKnD1v59D2iLp76U1S1fbfKDcQQCq8X2PG6Haequ14UXFHsZTMnKutN9ETDjxJ7_6Mqunt2zFRUOd5J-X9MPZeYaU4OfQQHAvQZz1gc562fOBHro3741NkmiQNhesOGoOC196hor21RvREcR-MaqNxIGLVUzISIhgS0Wa-mHFHh4a80-kDo14fJfI6R1D9cpwH74lvpOkOD9ST2_3Vm0jnW...
import os import os.path import SCons.Options import SCons.Variables try: import subprocess except ImportError: pass import string import glob import shutil import sys Variables = SCons.Variables BoolVariable = SCons.Variables.BoolVariable def get_version(): import re fname = os.path.join(os.path.di...
# coding: utf-8 # Copyright (c) 2015 Fabian Barkhau <fabian.barkhau@gmail.com> # License: MIT (see LICENSE file) from __future__ import print_function from __future__ import unicode_literals import json import sys import signal import argparse import inspect import pyjsonrpc import traceback from BaseHTTPServer impor...
# -*- coding: utf-8 -*- """ app.extensions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Module for initialising app extensions package. -- Create a MainDB instance. -- Create PyMongo instance. -- Create JWTManager instance. :copyright: (c)2020 by rico0821 """ from flask_jwt_extended import JWTManager fr...
from .UdonPie import * # IGNORE_LINE def _start(): a = 5 b = 7 c = add(a, b) Debug.Log(Object("add result: " + Convert.ToString(c))) # 12 Debug.Log(Object("a = " + Convert.ToString(a))) # 5 Debug.Log(Object("b = " + Convert.ToString(b))) # 7 var_test(a, b) Debug.Log(Object(...
def register_search_config_from_dict(config_registry, config_dict): from snosearch.configs import SearchConfig name = config_dict['name'] search_config = SearchConfig(name, config_dict) config_registry.add(search_config)
# This file holds custom filters for Django from django import template, forms from django.core.urlresolvers import reverse import datetime from pages.models import * register = template.Library() @register.inclusion_tag('pages/inclusionTemplates/repoInfo.html') def repoInfo(repo): return repo @register.filter def...
""" https://leetcode.com/problems/best-time-to-buy-and-sell-stock/ Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transaction (i.e., buy one and sell one share of the stock), design an algorithm to find the maximum profit. Not...
def is_unstable_pair(a, b): return (a.upper() < b.upper()) != ( a < b)
from flask import Response, request import json from lizard.client import APP from lizard.client import client_events from lizard import client, events API_MIME_TYPE = 'application/json' def respond_error(status=500): """ Respond with a http error :status: http status code :returns: flask response ...
#!/usr/bin/env python """ A module for visualizing labeled images. Info: type: eta.core.types.Module version: 0.1.0 Copyright 2017-2021, Voxel51, Inc. voxel51.com """ # pragma pylint: disable=redefined-builtin # pragma pylint: disable=unused-wildcard-import # pragma pylint: disable=wildcard-import from __futu...
# Generated by Django 3.0.8 on 2020-11-26 09:20 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("datasets", "0061_toolqueryauditlog"), ] operations = [ migrations.AddField( model_name="visualisationcatalogueitem", ...
import mysql.connector from model.contact import Contact from model.group import Group class DbFixture: def __init__(self, host, name, user, password): self.host = host self.name = name self.user = user self.password = password self.connection = mysql.connector.connect(hos...
from django.urls import path from .views import CandidatoCreate, VagaCreate, CandidaturaCrate, VagaUpdate, EmpresaCreate from .views import VagaDelete from .views import VagaList, CandidaturaView, VagasDashboardView, CandidatoDashboardView, CandidaturasListView from .views import pie_chart, pie_char_candidate urlpatte...
import arcpy arcpy.env.overwriteOutput = True arcpy.CheckOutExtension('Spatial') import file_functions from file_functions import * import logging def least_cost_centerline(DEM, source): '''returns a rough centerline using least cost path from source''' check_use([DEM, source]) try: # make direct...
from django.forms import ModelForm from iseteam.buddies.models import Buddy class BuddyForm(ModelForm): class Meta: model = Buddy exclude = ('owner','staff', )
import pytest from qabal import Item, Session, inject from types import ModuleType def foo(item): item['foo'] = 'foo' def bar(item): item['bar'] = 'bar' def baz(item): item['baz'] = 'baz' return item def bar_baz(item): item['bar'] = 'bar!' item['baz'] = 'baz!' return item def sig_based_...
from .bert import BERT from .languageModel import BERTLM
''' erzeugt den code für die tower damit ich nicht den code für die tower programmieren muss ''' class DataBase(object): def __init__(self): self.output = "" self.towerNames = [] self.ranges = [] self.shootTimes = [] self.isBoostings = [] self.projectileTypes = [] ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # michael a.g. aïvázis # orthologue # (c) 1998-2022 all rights reserved # """ Exercise the simple filesystem explorer """ def test(): # my package import pyre.filesystem # make a filesystem fs = pyre.filesystem.virtual() # create a couple of node...
# -*- coding: utf8 from __future__ import division, print_function from pyksc import dist from pyksc import ksc import ioutil import numpy as np import os import plac def main(tseries_fpath, base_folder, k): k = int(k) idx_fpath = os.path.join(os.path.join(base_folder, '..'), 'train.dat') X = iouti...
import json from pathlib import Path from typing import List, Optional from app.database.models import User from app.internal.audio import ( get_audio_settings, handle_vol, SoundKind, Sound, init_audio_tracks, save_audio_settings, DEFAULT_MUSIC, DEFAULT_MUSIC_VOL, DEFAULT_SFX, D...
#encoding:utf-8 subreddit = 'funnystories' t_channel = '@r_funnystories' def send_post(submission, r2t): return r2t.send_simple(submission)
import acl import numpy as np import datetime from atlas_utils.utils import * from atlas_utils.acl_image import AclImage class Model(object): def __init__(self, acl_resource, model_path): self._run_mode = acl_resource.run_mode self.model_path = model_path # string self.model_id = None ...
from .coinex import CoinEx, CoinExResponse __all__ = [ 'CoinEx', 'CoinExResponse' ]
time = ['flamengo','atletico','cruzeiro','botafogo'] time[0],time[-1] = time[-1],time[0] print(time)
print('vamos calcular sua idade em anos, meses e dias!') d1 = int(input('Que dia vc nasceu? ')) m1 = int(input('Qual mes vc nasceu? ')) a1 = int(input('Que ano vc nasceu? ')) d2 = int(input('Qual dia atual? ')) m2 = int(input('Qual mes atual? ')) a2 = int(input('Qual ano atual? ')) ano = a2 - a1 print(f'H...
#!/bin/python3 import math import os import random import re import sys # # Complete the 'solve' function below. # # The function accepts following parameters: # 1. DOUBLE meal_cost # 2. INTEGER tip_percent # 3. INTEGER tax_percent # def solve(meal_cost, tip_percent, tax_percent): mealCost = float(meal_cost) ...
#!/usr/bin/env python3 import logging import vantage_api_auto_submit as vn from logging.handlers import TimedRotatingFileHandler def set_logger(): """Setup logging configuration """ logger = logging.getLogger("vantage_api_auto_submit") logger.setLevel(logging.DEBUG) handler = TimedRotatingFileHan...
import re import openapiart.goserver.string_util as util from jsonpath_ng import parse class Server(object): @property def basepath(self) -> [str]: return self._basepath def __init__(self, serverobj): self._obj = serverobj self._basepath = '' try: self._basepath...
"""Top-level package for Chess Tuning Tools.""" __author__ = """Karlson Pfannschmidt""" __email__ = "kiudee@mail.upb.de" __version__ = "0.3.0" from tune.utils import expected_ucb from tune.db_workers import TuningClient, TuningServer
#!/usr/bin/env python from subprocess import call import numpy as np import sys import argparse """ This script will create 'nprocs' parallel processes and on each one calculate the speed distribution at the detector for a range of values of gamma (using CalcVelDist.py). It will then calculate the number of events ...