text
stringlengths
1
927k
from collections import defaultdict from apps.configuration.models import Environment class MapConfigValues(object): def __init__(self, values, env_id): environments = Environment.query.all() sort_environments = sorted([x for x in environments if x.id != env_id], key=lambda x: x.priority) ...
from tensorflow.examples.tutorials.mnist import input_data import tensorflow as tf import numpy as np import matplotlib.pyplot as plt encoder_layers = [] decoder_layers = [] Normal = tf.contrib.distributions.Normal Bernoulli = tf.contrib.distributions.Bernoulli class Layer(object): def __init__(self, n, m, f=tf....
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): os.environ.setdefault("DJANGO_SETTINGS_MODULE", "arkde_31785.settings") try: from django.core.management import execute_from_command_line except ImportError as exc: raise Im...
import torch import torch.nn.functional as F from torch_geometric.utils import degree from torch_geometric.transforms import BaseTransform class OneHotDegree(BaseTransform): r"""Adds the node degree as one hot encodings to the node features. Args: max_degree (int): Maximum degree. in_degree ...
import json from pkg_resources import resource_filename def load_resource(name): with open(resource_filename('ffmpeg_db', name)) as f: return json.load(f) def ext_to_codecs_json(): return load_resource('data/ext-to-codecs.json') def codec_info_json(): return load_resource('data/codec-info.jso...
from .bugzilla import MyBugzilla import unittest import requests_mock from unittest import mock import requests class TestBugZilla(unittest.TestCase): def test_bug_id(self): zilla = MyBugzilla( 'tarek@mozilla.com', server='http://example.com' ) link = zilla.bug_link...
""" Common utilities for Stanza resources. """ import os import glob import requests from pathlib import Path import json import hashlib import zipfile import shutil import dill from tqdm.auto import tqdm from .common import ( DEFAULT_TEMPLATES_DIR, QUINDUCTOR_RESOURCES_GITHUB, MODELS, get_logger, get_defaul...
from flask_sqlalchemy import SQLAlchemy db: SQLAlchemy = SQLAlchemy()
""" GraphSense API GraphSense API # noqa: E501 The version of the OpenAPI document: 0.5 Generated by: https://openapi-generator.tech """ import re # noqa: F401 import sys # noqa: F401 from graphsense.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, Mod...
def convertsmileys_python2 (text): newtext = str(text) # new emojis newtext = newtext.replace(u'\U0001F0CF', '<img src="data/emoji_new/1F0CF.png" alt=""/>') newtext = newtext.replace(u'\U0001F191', '<img src="data/emoji_new/1F191.png" alt=""/>') newtext = newtext.replace(u'\U0001F193', '<img sr...
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. import pytest from flsim.common.pytest_helper import assertEqual, assertTrue from flsim....
# -*- coding: utf-8 -*- from setuptools import setup long_description = """ Extremely fast and easy feature based HTML generator. """ project = 'uno' setup( name=project, version='0.3.3', description=long_description, author='Jason Goldberger', author_email='jason@datamelon.io', url='https:/...
# Copyright 2018 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
import Room import Constants as c from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support.expected_conditions import presence_of_element_located from selenium.webdriver.firefox.options import Options class E11_R...
from argparse import ArgumentParser import os import matplotlib.pyplot as plt import pandas as pd filenames = "susceptible.csv exposed.csv infected.csv recovered.csv".split() def title(ax, region): return ax.set_title(region, x=0.95, y=0.9, ha="right", va="top") def legend(fig, ax): lins, labs = ax.get_l...
from bs4 import BeautifulSoup import re parse = BeautifulSoup('<html><head><title>Title of the page</title></head><body><p id="para1" align="center">This is a paragraph<b>one</b><a href="http://example1.com">Example Link 1</a> </p><p id="para2">This is a paragraph<b>two</b><a href="http://example.2com">Example Link 2<...
# -*- coding: utf-8 -*- """ Validate Finn code validator """ __author__ = 'Samir Adrik' __email__ = 'samir.adrik@gmail.com' from source.util import Assertor, Tracking from .operation import Operation from ...scrapers import Finn class ValidateFinnCode(Operation): """ Operation for validating a Finn code ...
# -*- coding: utf-8 -*- """ ------------------------------------------------- @File : test_strategyType.py Description : @Author : pchaos date: 18-5-2 ------------------------------------------------- Change Activity: 18-5-2: @Contact : p19992003#gmail.com -------...
def _if(bool, func, func2): func() if bool else func2() def truthy(): print('True') def falsey(): print('False') _if(True, truthy, falsey) # prints 'True' to the console
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import json from typing import Dict, List, NamedTuple, Union from aiohttp import ClientSession, ClientTimeout from botbuilder.schema import Activity from botbuilder.core import BotTelemetryClient, NullTelemetryClient, TurnCo...
#@+leo-ver=5-thin #@+node:tbrown.20140806084727.30174: * @file ../plugins/livecode.py """ Show results of code in another pane as it's edited. livecode-show opens the livecode pane on c.p. Thereafter, pressing return in that body pane re-evaluates the code. The livecode pane shows the results of each line. """ # By...
#!/usr/bin/env python3 """ self-contained to write legacy storage pickle files To use this script. Create an environment where you want generate pickles, say its for 0.20.3, with your pandas clone in ~/pandas . activate pandas_0.20.3 cd ~/ $ python pandas/pandas/tests/io/generate_legacy_storage_files.py \ panda...
from django.http.response import HttpResponseRedirect from .forms import MyForm from django.shortcuts import get_object_or_404, render from .models import Flower # Create your views here. def index(request): q = request.GET.get("q" , None) if q is None or q == '': flowers = Flower.objects.all() e...
"""Generated client library for container version v1.""" # NOTE: This file is autogenerated and should not be edited by hand. from apitools.base.py import base_api from googlecloudsdk.third_party.apis.container.v1 import container_v1_messages as messages class ContainerV1(base_api.BaseApiClient): """Generated clien...
#!/usr/bin/env python #-*- coding: utf-8 -*- from configbuilder.validator import Validator from configbuilder.parser import create_parser import pprint class MyValidator(Validator): def validate_protocol(self, value): """ Add validator method for type "Protocol" "Protocol" is a sub type of string. ...
from __future__ import absolute_import, division import os import fitsio import argparse import numpy as np from desiutil.log import get_logger from desispec.io import read_fiberflat,write_fiberflat,findfile,read_frame from desispec.io.fiberflat_vs_humidity import get_humidity,read_fiberflat_vs_humidity from desispe...
#!/usr/bin/python ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"...
def getVelocity(speed, vector): """ Converts a speed and vector into a velocity array [x, y, z] X is horizontal movement, Y is vertical movement, and Z is movement in/out of screen arg speed - the speed scalar arg vector - the direction in radians that the object is moving in Returns an array with the x, y, z...
# --------------------------------------------------------------- Imports ---------------------------------------------------------------- # # System from typing import List, Callable, Union, Tuple, Dict, Optional # Local from ._utils import FunctionMeasurer, Renderer from .models import FunctionStats, TableFormat #...
def main(): print("Success, you can access this via terminal!") print("Hey, if you can - contact that lazy developer and make him code! Would be glad if you contribute, as well...") if __name__ == "__main__": main()
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat Aug 19 17:53:46 2017 @author: benjaminsmith """ #do the regression in the #we need a design matrix #with linear, square, cubic time point regressors #plus intercept #plus whatever Design_Matrix files we want to put in. onsets_convolved.head() onsets...
import os.path from InputPipeline.base_dataset import BaseDataset, get_params, get_transform, get_downscale_transform from InputPipeline.image_folder import make_dataset from PIL import Image import torchvision.transforms as transforms from Training.imresize import imresize_single class AlignedDataset(BaseDataset): ...
import logging from anndata import AnnData from scvi._compat import Literal from scvi.model.base import UnsupervisedTrainingMixin from scvi.module import VAE from .base import ArchesMixin, BaseModelClass, RNASeqMixin, VAEMixin logger = logging.getLogger(__name__) class SCVI( RNASeqMixin, VAEMixin, ArchesMixin...
# IMDB Movie Review Sentiment Classification # Second Assignment Solution # NLP Course, Innopolis University, Spring 2017 # Author: Evgeny Gryaznov import numpy import ru_otzyv as ru import matplotlib.pyplot as plt from keras.models import Sequential from keras.layers import Dense from keras.layers import LSTM from ke...
#!/usr/bin/env python3 import logging import subprocess import os import time import shutil from collections import defaultdict import random import json import csv MAX_RETRY = 2 SLEEP_BETWEEN_RETRIES = 5 CLICKHOUSE_BINARY_PATH = "/usr/bin/clickhouse" CLICKHOUSE_ODBC_BRIDGE_BINARY_PATH = "/usr/bin/clickhouse-odbc-br...
# -*- coding: utf-8 -*- """ Created on Sun Sep 13 07:10:14 2020 @author: tobias """ # import requests # import time import datetime import locale from flask_babel import _ # import threading # from concurrent.futures import Future # try: # from .GPSConverter import GPSConverter # except ImportError: # for local t...
from __future__ import absolute_import import warnings from .api import _, is_validator, FancyValidator, Invalid, NoDefault from . import declarative from .exc import FERuntimeWarning import six from six.moves import map from six.moves import zip __all__ = ['Schema'] class Schema(FancyValidator): """ A sch...
import collections import logging import os import warnings from pathlib import Path from typing import List, Union import h5py from torch.utils.data import Dataset import numpy as np import models.coordconv from utils.utils import get_key_def, ordereddict_eval, compare_config_yamls from utils.geoutils import get_key...
_base_ = '../_base_/default_runtime.py' # model settings img_size = 550 model = dict( type='YOLACT', backbone=dict( type='ResNet', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=-1, # do not freeze stem norm_cfg=dict(type='BN', requires_grad=Tru...
import mock from xml.etree import ElementTree from tests.compat import unittest from evelink.thirdparty.six.moves.urllib.parse import parse_qs import evelink.api as evelink_api # Python 2.6's ElementTree raises xml.parsers.expat.ExpatError instead # of ElementTree.ParseError _xml_error = getattr(ElementTree, 'ParseE...
from .basic import *
# # Tencent is pleased to support the open source community by making Angel available. # # Copyright (C) 2017 THL 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 obtain a copy of ...
import math import os from abc import ABC, abstractmethod from concurrent.futures import ThreadPoolExecutor from typing import Tuple import numpy as np import torch from hivemind.compression.base import CompressionBase, CompressionInfo from hivemind.proto import runtime_pb2 EXECUTOR = ThreadPoolExecutor(max_workers=...
import os import torch import torch.nn.functional as F import csv import glob import argparse from datasets.dataloader import build_loader parser = argparse.ArgumentParser(description="Graph Pooling") parser.add_argument('--model', type=str, default="SAGNet", help='model name') parser.add_argument('--seed', type=int...
#!/usr/bin/env python # -*- coding: UTF-8 -*- """ SSPACE scaffolding-related operations. """ import os.path as op import sys import logging from copy import deepcopy from jcvi.formats.fasta import gaps from jcvi.formats.sizes import Sizes from jcvi.formats.base import BaseFile, read_block, write_file from jcvi.form...
export_file = '' # use '/tmp/mpm3d.ply' for exporting result to disk import numpy as np import taichi as ti ti.init(arch=ti.gpu) #dim, n_grid, steps, dt = 2, 128, 20, 2e-4 #dim, n_grid, steps, dt = 2, 256, 32, 1e-4 dim, n_grid, steps, dt = 3, 32, 25, 4e-4 #dim, n_grid, steps, dt = 3, 64, 25, 2e-4 #dim, n_grid, ste...
from django.test import TestCase from web_server.models import User class UserTest(TestCase): def create_user(self, github_username='Al Gore'): return User.objects.create(github_username=github_username) def test_user_creation(self): o1 = self.create_user() o2 = self.create_user(githu...
from checkov.common.models.enums import CheckCategories, CheckResult from checkov.kubernetes.base_spec_check import BaseK8Check class ContainerSecurityContext(BaseK8Check): def __init__(self): # CIS-1.5 5.7.3 name = "Apply security context to your pods and containers" # Security context c...
"""Utility functions used by graphchain.""" import string import sys from typing import Any, Optional, Set def _fast_get_size(obj: Any) -> int: if hasattr(obj, '__len__') and len(obj) <= 0: return 0 if hasattr(obj, 'sample') and hasattr(obj, 'memory_usage'): # DF, Series. n = min(len(obj), 10...
from baconian.core.core import Basic, Env, EnvSpec from baconian.envs.env_wrapper import Wrapper, ObservationWrapper, StepObservationWrapper from baconian.common.sampler.sampler import Sampler from baconian.common.error import * from baconian.algo.algo import Algo from typeguard import typechecked from baconian.algo.mi...
#!/usr/bin/env python # This example shows how to manually construct unstructured grids # using Python. Unstructured grids require explicit point and cell # representations, so every point and cell must be created, and then # added to the vtkUnstructuredGrid instance. import vtk # Create several unstructured grids ...
# -*- coding: utf-8 -*- """ Run method, and save results. Run as: python main.py --dataset <ds> --method <met> where dataset name should be in UCI_Datasets folder and method is piven, qd, deep-ens, mid or only-rmse. """ import argparse import json import datetime import tensorflow as tf # import tensorflow....
from __future__ import unicode_literals, division, absolute_import import logging from flexget.ui.webui import db_session, app from flask import request, render_template, flash, Blueprint from flexget.plugin import DependencyError try: from flexget.plugins.generic.archive import ArchiveEntry, search except ImportE...
# Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved # # 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 ...
#### Example of an annotation function that adds annotations to a Signal #### It adds NERC annotations to the TextSignal and returns a list of entities detected from typing import Text import requests import uuid import jsonpickle import time from emissor.representation.annotation import AnnotationType, Token, NER fro...
# write_Crosswalk_BLS_QCEW.py (scripts) # !/usr/bin/env python3 # coding=utf-8 # ingwersen.wesley@epa.gov """ Create a crosswalk for BLS QCEW to NAICS 2012. Downloaded data is already provided in NAICS """ import pandas as pd from flowsa.common import datapath, fbaoutputpath def unique_activity_names(datasource, year...
#!/usr/bin/env python # coding:utf-8 #! /usr/env python3 # -*- coding: utf-8 -*- """Example Google style docstrings. This module demonstrates documentation as specified by the `Google Python Style Guide`_. Docstrings may extend over multiple lines. Sections are created with a section header and a colon followed by a...
# Authors: Nicolas Tresegnie <nicolas.tresegnie@gmail.com> # Sergey Feldman <sergeyfeldman@gmail.com> # License: BSD 3 clause import numbers import warnings from collections import Counter import numpy as np import numpy.ma as ma from scipy import sparse as sp from scipy import stats from ..base import Base...
# Copyright (c) 2021 Graphcore Ltd. All rights reserved. # Copyright (c) 2021 lucidrains # This file has been modified by Graphcore import argparse from pathlib import Path import datetime import time from glob import glob import os import shutil from log import Logger import torch import poptorch import popart impo...
#!/usr/bin/env python # -*- coding: utf-8 -*- """The setup script.""" from setuptools import setup, find_packages with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read() requirements = [ 'Click>=6.0', 'Deprecated~=1...
# -*- coding: utf-8 -*- from __future__ import print_function import argparse import os import stat import sys # find the import for catkin's python package - either from source space or from an installed underlay if os.path.exists(os.path.join('/opt/ros/kinetic/share/catkin/cmake', 'catkinConfig.cmake.in')): sys....
import pygame from .cube import Cube # hehe to usando herença class Snack(Cube):# {{{ def __init__(self, pos):# {{{ self.pos = pos Cube.__init__(self,self.pos,(0,255,0), (0, 0))# }}} # }}}
#!/usr/bin/env python2 from __future__ import print_function import numpy as np import matplotlib #matplotlib.use('PDF') import matplotlib.pyplot as plt import sys from optparse import OptionParser # parameters defLW = 1.2 # default line width defMS = 7 # default marker size dashes = ['-', # solid line '--', # ...
"""Sphinx documentation configuration file for the pyansys developer's guide.""" from datetime import datetime from ansys_sphinx_theme import ( __version__, ansys_logo_white, ansys_logo_white_cropped, pyansys_logo_black, watermark, ) from ansys_sphinx_theme.latex import generate_preamble # Project...
from unittest.mock import patch from tests.functional.test_dynamodb_base import TestDynamoDBBase from app.models.slate_config import SlateConfigModel from app.models.slate_experiment import SlateExperimentModel from app.models.slate import SlateModel slate_config_id = 'test-slate_lineup-config-id' slate_experiment =...
# coding: utf-8 """ Isilon SDK Isilon SDK - Language bindings for the OneFS API # noqa: E501 OpenAPI spec version: 10 Contact: sdk@isilon.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six from isi_sdk_9_0_0.models.networ...
print('=== IDENTIFICANDO VOGAIS =====') words = ('Computador', 'Programaçao', 'Cadeira', 'Mousepad', 'Fone') vogais = ('a', 'e', 'i', 'o', 'u') for c in words: print(f'\nNa palavra {c} temos', end=' ') for v in c: if v.lower() in 'aeiou': print(v, end='')
# -*- coding: utf-8 -*- # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html class CorporateBondsPipeline(object): def process_item(self, item, spider): return item
pager_duty_token = ''
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
""" Feature calculations. """ import logging import types import numpy as np import multiprocessing __author__ = "Steven Kearnes" __copyright__ = "Copyright 2014, Stanford University" __license__ = "BSD 3-clause" def _featurize_complex(featurizer, mol_pdb_file, protein_pdb_file, log_message): logging.info(log_mess...
# -*- coding: utf-8 -*- # # Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
# Copyright 2019 Google LLC. 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 law or a...
from os import path import torch import torch.utils.data as data class CacheClassLabel(data.Dataset): """ A dataset wrapper that has a quick access to all labels of data. """ def __init__(self, dataset): super(CacheClassLabel, self).__init__() self.dataset = dataset self.labels...
from pathlib import Path from typing import Iterator def get_paths(path: Path) -> Iterator[Path]: """Recursively yields python files. """ if not path.exists(): raise FileNotFoundError(str(path)) if path.is_file(): if path.suffix == '.py': yield path return for s...
# Implementation of Random Forest model to classify failures in a hydraulic process # Hydraulic system can be found : https://archive.ics.uci.edu/ml/datasets/Condition+monitoring+of+hydraulic+systems # The data set contains raw process sensor data (i.e. without feature extraction) which are structured as matrices (tab-...
# -*- coding: utf-8 -*- ''' Created on 2018-09-16 @author: Basel ''' DEBUG = True
from uuid import uuid4 from api.core import Mixin from .base import db as DB class User(Mixin, DB.Model): """User model.""" __tablename__ = "users" id = DB.Column( DB.Integer, nullable=False, primary_key=True ) uuid = DB.Column( DB.String(32), unique=True...
import scrapy from bangumi.spiders.bangumi_list_spider import BangumiListSpider class BangumiAnimeListSpider(BangumiListSpider): name = 'bangumi_anime_list' type = 'anime' start_page = 1
"""Progress.""" import time import combu def _f(v1, v2): time.sleep(0.1) return v1 * v2 params_a = {'v1': range(1, 3), 'v2': range(1, 3)} for _, _ in combu.execute(_f, params_a, progress=True): pass comb = combu.Combu(_f, progress=True) params_b = {'v1': [1, 10, 100], 'v2': range(1, 11)} for _, _ in...
"""Testing the implementation with some small input""" from benchamarks.bm.knapsack_branching import knapsack_branching from benchamarks.bm.knapsack_comm import Entry def test_knapsack_branching_one() -> None: inputs = [ Entry(40, 2), Entry(50, 3.14), Entry(100, 1.98), Entry(95, 5...
""" byceps.blueprints.admin.authentication.login.views ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2014-2022 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ from flask import abort, g, redirect, request from flask_babel import gettext from .....services.authenticati...
# 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...
from setuptools import setup from setuptools import find_packages with open('README.md') as stream: long_description = stream.read() REQUIREMENTS = [ 'ascii-canvas>=1.2.2', 'ordereddict>=1.1', 'strip-hints>=0.1.7' ] setup(name='flowpipe', version='0.6.0', author='Paul Schweizer', a...
import os import logging import copy from tqdm import trange from datetime import datetime import numpy as np import torch from torch.utils.tensorboard import SummaryWriter from torchvision.utils import save_image from utils import ema from lib.dataset import DataLooper from lib.sde import VPSDE from lib.model.ddpm i...
import datetime as dt import re from typing import Optional, Union import discord from d4dj_utils.master.common_enums import EventType from d4dj_utils.master.event_master import EventMaster, EventState from miyu_bot.bot.bot import PrefContext from miyu_bot.bot.servers import Server from miyu_bot.commands.common.asset...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import gzip import pickle import threading import warnings from datetime import datetime from unittest import skipIf from botocore.exceptions import ClientError from django.conf import settings from django.core.exceptions import ImproperlyConfigured from...
import pytest, torch import numpy as np from fastai import * from tempfile import TemporaryDirectory def test_cpus(): assert num_cpus() >= 1 @pytest.mark.parametrize("p, q, expected", [ (5 , 1 , [5]), (5 , [1,1], [5, 5]), ([5], 1 , [5]), ([5], [1,1], [5, 5]), ("ab" , "cd" , ["a", "...
# local imports from . import nxadapter from . import community from _NetworKit import ParallelPartitionCoarsening # external imports import networkx def save(name, dir="."): """ Save a figure """ savefig(os.path.join(dir, "{0}.pdf".format(name)), bbox_inches="tight", transparent=True) def coloringToColorList(G, ...
from __future__ import division import os from libtbx import easy_run import time def exercise(): from mmtbx.regression.make_fake_anomalous_data import generate_zinc_inputs base = "tst_pick_approx_zn" mtz_file, pdb_file = generate_zinc_inputs(file_base=base, anonymize = True) time.sleep(2) args = ["\"%s\"" %...
import csv import os csvPath = os.path.abspath("C:/Users/li116/OneDrive/Desktop/python-Challenge/PyBank/resource/budget_data.csv") with open(csvPath,"r") as input_csv_file: csvreader = csv.reader(input_csv_file, delimiter=",") #exclude header next(csvreader) #get months list months = [ ] amounts...
from dexy.exceptions import UserFeedback, InternalDexyProblem from dexy.filter import DexyFilter import os import tempfile import json try: import pygit2 AVAILABLE = True except ImportError: AVAILABLE = False def repo_from_path(path): """ Initializes a pygit Repository instance from a local repo a...
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
# coding: utf-8 """ Jordskredvarsel API No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: v1.0.6 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 im...
import pytest from pyrpio.mdio import MDIO class TestMDIO: def test_open(self): assert True def test_transfer(self): assert True
""" @author: ahmed allam <ahmed.allam@yale.edu> """ import os import pickle import shutil from datetime import datetime from copy import deepcopy from itertools import combinations import heapq import numpy class SequenceStruct(object): r"""class for representing each sequence/segment Args: ...
"""import all external package""" from wechaty_puppet_mock.puppet_mock import PuppetMock, PuppetMockOptions from wechaty_puppet_mock.exceptions import ( MockEnvironmentError ) from wechaty_puppet_mock.mock.environment import EnvironmentMock from wechaty_puppet_mock.mock.mocker import Mocker __all__ = [ 'Puppet...
import falcon import tempfile import base64 import traceback import string from json import loads from os import path, unlink from shutil import rmtree from settings import application as app_settings from Exceptions import ValidationException class Languages: def __init__(self, docker_client): self.docker...
from re import findall, match, sub from colorifix.colorifix import erase from pymortafix._getchar import _Getch def get_sub_from_matching(dictionary, matching): index = [i for i, group in enumerate(matching.groups()) if group] matched = list(dictionary)[index[0]] if index else None return dictionary.get(...
import json import os import sys import argparse import shutil import uuid import prettytable import glob import requests import logging from datetime import datetime from zipfile import ZipFile from typing import Any, Tuple, Union from Tests.Marketplace.marketplace_services import init_storage_client, init_bigquery_cl...