text
stringlengths
3.07k
22.1k
# -*- coding: utf-8 -*- """ Created on 2021/1/13 @author: <NAME> """ import os import sys import random import requests import re import logging import time from bs4 import BeautifulSoup def get_work_names(html): """ 获取电影/美剧的中文和英文名称 电影/美剧名称是一大类,比如一个美剧可能有几个字幕文件 :return: """ soup = BeautifulSou...
from .const import ORG from .record import Record from .obj import Slot from .span import envelop_spans from .norm import normalize, syntax_normalize class Record(Record): def __repr__(self): return compact_repr(self) def _repr_pretty_(self, printer, cycle): printer.text(repr(self)) class ...
""" The macros defined macros.py are exported as IntEnum. """ from enum import IntEnum from .ca import ffi, libca from .compat import to_string from .macros import * __all__ = ['ChannelState', 'CA_OP', 'CA_PRIORITY', 'CA_K', 'ECA', 'DBE', 'AlarmSeverity', 'AlarmCondition'] class ChannelState(I...
from django.shortcuts import render, redirect from .models import * from .searializers import * from pages.models import * # Create your views here. def dashHome(request): # print(request.user) transfers = Trans.objects.all() profile = UserProfile.objects.filter(user = request.user) permissions = Us...
############################################################################# ## ## Copyright (C) 2019 The Qt Company Ltd. ## Contact: http://www.qt.io/licensing/ ## ## This file is part of the Qt for Python examples of the Qt Toolkit. ## ## $QT_BEGIN_LICENSE:BSD$ ## You may use this file under the terms of the BSD lic...
from tkinter import messagebox from tkinter import * from tkinter import simpledialog import tkinter from tkinter import filedialog from tkinter.filedialog import askopenfilename import numpy as np import pandas as pd import matplotlib.pyplot as plt from sklearn.model_selection import train_test_split from sklearn.pr...
''' @author: <NAME> @date: 2020/05/18 Various functions used throughout the project. Elaborate explanation on each. ''' import numpy as np import librosa import os from pydub import AudioSegment import matplotlib.pyplot as plt from matplotlib.gridspec import GridSpec def array_reshape(array, factor): """ Ar...
""" Responsible for reading in configuration files, validating the proper format and providing sane defaults for parts that don't have any. """ import json import logging from os import path import platform import sys import yaml from helper import NullHandler (major, minor, rev) = platform.python_version_tuple() if...
# coding: utf-8 # Copyright (c) MR.Net Development Team. # Distributed under the terms of the MIT License. import copy from typing import Any, Dict, List, Optional, Tuple import networkx as nx import numpy as np from monty.json import MSONable from pymatgen.analysis.graphs import MoleculeGraph, MolGraphSplitError fro...
from __future__ import (absolute_import, division, print_function) import json from hashlib import md5 import logging import os import pyinotify import signal import sys import time # ################## # configure logging # ################## LOG_NAME = 'livereduce' # constant for logging LOG_FILE = '/var/log/SNS_ap...
# The idea here is to store all the different things you need for Code in one module # Code can then import the module and call whatever functions are needed # <NAME> 27 - 10 - 2020 MOD_NAME_STR = "Measurement" # import the necessary modules import board import time import digitalio from analogio import AnalogOut fro...
#!/usr/bin/env python3 """ Functions and Classes for processing Deep Mutational Scanning data """ import fileinput import re import copy import pandas as pd from smart_open import smart_open # TODO enforce expected types of fields # TODO move meta data to general class properties? DM_FILE_VERSION = '2.1.0' RE_NUMERIC...
# SPDX-FileCopyrightText: 2021 <NAME> # SPDX-License-Identifier: Apache-2.0 """Package initialization and entry-point for console application.""" # type annotations from __future__ import annotations from typing import List, Dict, Optional, Callable, Type, Any # standard libs import re import sys import time import...
""" The main model declaration """ import logging import os import numpy as np import tensorflow as tf from common_definitions import (KERNEL_INITIALIZER, GAMMA, RHO, STD_DEV, BUFFER_SIZE, BATCH_SIZE, CRITIC_LR, ACTOR_LR) from buffer import ReplayBuffer from utils import OUActionNoise ...
import time import math import sys import numpy as np import matplotlib.pyplot as plt from matplotlib.figure import Figure from matplotlib.backends.backend_agg import FigureCanvas from scipy.stats import multivariate_normal from scipy.spatial import Voronoi, voronoi_plot_2d import scipy.spatial from skimage.draw import...
# -*- coding: utf-8 -*- """ Functions for printing figures in the paper. Authors: <NAME>, <NAME> URL: https://github.com/adriapr/crowdairway """ import pandas as pd import numpy as np import os.path import matplotlib.pyplot as plt import matplotlib.image as mpimg import seaborn as sns from zipfile import ZipFile im...
import math import pytest from plusminus import ArithmeticParser, ArithmeticParseException import sys sys.setrecursionlimit(4000) # Normally this would be kept in a "fixtures.py" file or similar, for access by all test scripts. @pytest.fixture def basic_arithmetic_parser(): arith_parser = ArithmeticParser() ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from flask import Flask, request, render_template, jsonify, make_response from flask_migrate import Migrate from flask_cors import CORS, cross_origin from sqlalchemy import exc from textblob import TextBlob from langdetect import detect_langs, DetectorFactory from google...
#!/usr/bin/env python import argparse import json import os import shlex import shutil import subprocess import sys import tarfile import tempfile from argparse import ArgumentTypeError from pathlib import Path import requests ETCD_DATA_DIR = "/var/lib/dcos/etcd/default.etcd" CLUSTER_NODES_PATH = "/var/lib/dcos/etc...
import sys import json, gzip import numpy as np import pandas as pd import matplotlib.pyplot as plt import datasets def combine_results(*jsons): jsons0 = [] for js in zip(*jsons): j0 = {} for j in js: for k, v in j.items(): j0[k] = v jsons0.append(j0) r...
# Copyright 2022 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 # # Unless required by applicable law or agreed to...
# -*- coding: utf-8 -*- """ @Time : 2021/9/13 20:00 @Author : <NAME> @FileName: preprocess.py @Software: PyCharm """ import argparse import logging import math import spacy # since we don't need process raw data, we got the processed data # import json import torch # python process bar from tqdm import tqdm from t...
from apodeixi.knowledge_base.isolation_kb_store import Isolation_KBStore_Impl from apodeixi.util.a6i_error import ApodeixiError, FunctionalTrace from apodeixi.controllers.admin.static_data.products import ProductsController from apodeixi.controllers...
#!/usr/bin/python3 # -*- coding: utf-8 -*- # Auteurs: <NAME> et <NAME> import os import sys import shlex import re # Cette méthode permet d'exécuter une ligne du shell def run(line): # Split la ligne du shell en tokens try: cmd_tokens = shlex.split(line) except ValueError as e: sys.stdo...
# Copyright 2015 National Research Foundation (South African Radio Astronomy Observatory) # BSD license - see LICENSE for details from __future__ import absolute_import, division, print_function from future import standard_library standard_library.install_aliases() # noqa: E402 import copy from builtins import obje...
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from pathlib import Path, PurePath from typing import Callable, Dict, List, Optional, cast from packaging.version import Version from pants.backend.python.python_artifact import PythonAr...
""" StarryPy Discord Plugin Provides a Discord bot that echos conversations between the game server and a Discord guild channel. Original authors: kharidiron """ import re import logging import asyncio import discord from base_plugin import BasePlugin from utilities import ChatSendMode, ChatReceiveMode, link_plugi...
from colliding_pucks import * import sortedcontainers import pytest from collections import namedtuple from locutius.multimethods import multi, multimethod, method from typing import Dict from unittest import TestCase import pytest def test_named_tuple_type_equality(): """Like each call of 'namedtuple' crea...
from fract import * from frase import * from frmq import * from fradb import * import json, logging, re, time from config import CONFIG class FractMan(object): def __init__(self): self.pub = TaskPublisher() self.pub.open(CONFIG['mq']['host'], CONFIG['mq']['port']) self.mj = mongojson(CONFI...
import ast import asyncio from typing import Iterable, Iterator, List, Sequence import aiohttp import inspect import io import textwrap import traceback import types import re from contextlib import redirect_stdout from copy import copy import discord from discord.ext import commands """ Notice: Most of this code b...
import torch import torch.nn as nn import torch.nn.functional as F from torch import Tensor, is_tensor #Resnet originial implementation for imagenet class BasicBlock(nn.Module): expansion = 1 def __init__(self, in_planes, planes, stride=1): super(BasicBlock, self).__init__() self.conv1...
import re import html import datetime import asyncio import shlex import requests import discord from tinydb import TinyDB, Query from geopy import geocoders from modules.botModule import * import modules.reactionscroll as rs STATION_LIST_URL = "https://tidesandcurrents.noaa.gov/stations.html?type=All%20Stations&sor...
from collections import Counter, namedtuple import functools import operator from ..utils import utils # FIXME: Corner case of singleton self loop component def component_roots(gm): r = var_reachability(gm) #print('Var reachability: {}'.format(r)) srcs = set(r) trgls = utils.flatten(r.values()) t...
""" Training Zephod feature detection network Usage: train_zephod -h | --help train_zephod -v | --version train_zephod --dataset=<dataset> --model=<model> [options] Options: -h --help show this message and exit. -v --version show version information...
import hashlib import itertools import sys import warnings import numpy as np from randomgen import ( DSFMT, EFIIX64, HC128, JSF, LXM, MT64, MT19937, PCG32, PCG64, PCG64DXSM, SFC64, SFMT, SPECK128, AESCounter, ChaCha, LCG128Mix, Philox, Romu, ...
import numpy as np import os from sklearn.metrics import roc_curve, auc, precision_recall_curve, average_precision_score, accuracy_score, r2_score from scipy import interp from sklearn.preprocessing import label_binarize from tensorboard.backend.event_processing.event_accumulator import EventAccumulator def store_pre...
import cv2 import skimage.io as io import numpy as np import scipy from skimage.morphology import binary_erosion, binary_dilation, binary_closing,skeletonize, thin from scipy.signal import convolve2d from statistics import mode,variance from math import sqrt from skimage.measure import find_contours import matplotlib.p...
# This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful,...
import requests import stripe import transaction from cached_property import cached_property from contextlib import contextmanager from datetime import datetime from decimal import Decimal from html import escape from onegov.core.orm.mixins import meta_property from onegov.pay import log from onegov.pay.models.payment...
# -*- coding: utf-8 -*- import attr import os import toml from .api.compute import ComputeAPI from .api.dns import DnsAPI from .api.storage import StorageAPI from .api.runstatus import RunstatusAPI from .api.iam import IamAPI _API_KEY_ENVVAR = "EXOSCALE_API_KEY" _API_SECRET_ENVVAR = "EXOSCALE_API_SECRET" _COMPUTE_API...
# coding: utf-8 # # Experiment PAMAP2 with mcfly # This experiment finds an optimal model for the PAMAP2 dataset. # ## Import required Python modules # In[1]: import sys import os import numpy as np import pandas as pd # mcfly from mcfly import modelgen, find_architecture, storage # In[11]: trainsize = 500 val...
# coding=utf-8 import os import sys sys.path.append("./display") from display.display import display import serial import time import cv2 import numpy as np import imutils import logging import spidev as SPI import RPi.GPIO as GPIO from lib import LCD_2inch4 from PIL import Image,ImageDraw,ImageFont import pyzbar.pyzba...
"""Pytorch class conditional WGAN GP implementation. Notes - Test on other datasets. - Understand more clearly and simplify code. - Find a way to remove `drop_last` and correct implementation of save every N steps. References - WGAN and WGAN-GP implementation, https://www.youtube.com/watch?v=pG0QZ7Odd...
# Lint as: python3 # Copyright 2020 The TensorFlow 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 ...
#!/usr/bin/env python3 # # subfunction for generating the MOC in density co-ordinates # adapted from CDFTOOLS/cdfmocsig: # !!====================================================================== # !! *** PROGRAM cdfmocsig *** # !!===============================================================...
import json import logging from django.conf import settings from django.contrib.auth import authenticate, login from django.contrib.auth.views import password_reset from django.contrib.sites.models import Site from django.contrib.sites.shortcuts import get_current_site from django.core.exceptions import ObjectDoesNotE...
import os import boto3 import ask_sdk_core.utils as ask_utils from ask_sdk_core.skill_builder import CustomSkillBuilder from ask_sdk_dynamodb.adapter import DynamoDbAdapter from ask_sdk_core.skill_builder import SkillBuilder from ask_sdk_core.dispatch_components import AbstractRequestHandler from ask_sdk_core.dispatch...
import json import os from abc import ABC, abstractmethod from typing import List, Union import numpy as np from jinja2 import FileSystemLoader, Environment from sklearn import metrics from sklearn.ensemble import RandomForestClassifier, GradientBoostingClassifier from constants import LIBFUZZER_TEMPLATE_PATH, BYTES_...
import csv import json import os import lmdb import numpy as np import pyarrow as pa import torch from skimage.transform import resize from torch.utils.data import DataLoader, Dataset from ..base import BaseDataset from .schemas import BigEarthNetSchema LABELS = { "original_labels": { "Continuous urban ...
# pyright: reportUnusedClass=false from __future__ import annotations from dataclasses import dataclass from typing import Any, cast, Iterator, List, Optional, Type, TypeVar import pytest from typing_extensions import Protocol from antidote import implements, inject, interface, world from antidote.lib.injectable imp...
#!/usr/bin/env python # coding: utf-8 # # CE-40717: Machine Learning # ## HW7-Regression # ### Please fill this part # # # 1. Full Name: <NAME> # 2. Student Number: 99210259 # In[2]: # You are not allowed to import other packages. import numpy as np import pandas as pd from matplotlib import pyplot as plt...
# -*- coding: utf-8 -*- # The MIT License (MIT) # Copyright (c) 2016-2019 <NAME> # 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...
''' Author: <NAME> RGA Pressure server. The following script should only be called through a separate python interpreter. It's basic functionality is to start a pressure logger that can be asynchronously read by an external python interpreter. This is done using h5py's SWMR functionality. Due to the fact that the SWM...
import intelhex import wdc import foenix import srec import configparser import re import sys import argparse import os from serial.tools import list_ports FLASH_SIZE = 524288 # Required size of flash file: 512 KB CHUNK_SIZE = 4096 # Size of block of binary data to transfer label_file = "" to_send = "" por...
# Taken from Layout Example in http://awesome-streamlit.org/ import io from typing import List, Optional import markdown import matplotlib import matplotlib.pyplot as plt import pandas as pd import plotly.graph_objects as go import streamlit as st from plotly import express as px from plotly.subplots import make_subp...
#!/usr/bin/python3 import argparse from dreamutils.file import recursive_directory_data import os import logging import filetype from typing import Dict, Union, Text from json import dump from ..database import Type from zipfile import ZipFile, ZIP_DEFLATED # creating the logger logger = logging.getLogger('athnos c...
import os import hashlib import requests import tempfile import mimetypes import numpy as np from PIL import Image from io import BytesIO from fnmatch import fnmatch from datetime import datetime from . import config API_URL = 'https://api.abraia.me' tempdir = tempfile.gettempdir() def file_path(f, userid): r...
import numpy as np from typing import List, Tuple, Dict, Union from graphviz import Digraph from utilities.utils import histogram from classifiers.tree.splitter import Splitter, split ########################################### # utility functions for generating graphs # ########################################### ...
import enum from collections import defaultdict from typing import List, Optional, NamedTuple, DefaultDict from pandas import DataFrame FULL_ANGLE = 360.0 ANTI_MERIDIAN = FULL_ANGLE / 2 __all__ = [ 'split_by_antimeridian' ] def split_by_antimeridian(df: DataFrame) -> DataFrame: x_col_name = set(df.columns....
import markdownify, html2text from bs4 import Comment import re def parse_series(content, description_format="markdown"): """ Parse series info from mangaupdates. Parameters ---------- content : BeautifulSoup BeautifulSoup object of series page html. description_format : str, optional...
#!/usr/bin/env python import argparse import json import os import subprocess import sys import time import logging import re import random # Symbols chainID = 'kratos-mainnet' mainChainSymbol = 'kratos' coreCoinSymbol = 'kts' coreCoinDenom = '%s/%s' % (mainChainSymbol, coreCoinSymbol) cliCmd = 'kucli' nodeCmd = 'kuc...
from pbxproj import XcodeProject import os ########################################################################### # # this module meant to inject/remove files in any xcode project # ########################################################################### from pbxproj.pbxextensions import ProjectFiles SYSTEM_FR...
# -*- coding: utf-8 -*- """ Created on Mon Dec 2 12:25:37 2019 @author: Parth """ from assets import keys import os import urllib import collections import re from nltk.probability import FreqDist from nltk.tokenize import word_tokenize from nltk.corpus import stopwords from collections import Counter import pickle ...
import re from enum import Enum from .frange import frange class ItemType(Enum): TRACKS = "tracks" TRACK = "track" PLAYLIST = "playlist" ARTIST = "artist" ALBUM = "album" class TimeRange(Enum): SHORT_TERM = "short_term" MEDIUM_TERM = "medium_term" LONG_TERM = "long_term" class Vol...
import torch import torch.nn as nn import torch.nn.functional as F class MobileNetUNet(nn.Module): def __init__(self, n_semantic_classes): super(MobileNetUNet, self).__init__() self.encoder = MobileNetEncoder() self.rgb_decoder = UNetDecoder(3) self.semantic_seg_decoder = UNetDecod...
from datetime import datetime import itertools import numpy as np import pandas as pd import matplotlib.pyplot as plt from utils.matrix_convert import MatrixConversion from calculations.AllMetrics import Metrics from utils.constants import TYPES from utils.helpers import remove_offset_from_julian_date from params impor...
#!/usr/bin/env python # -*- coding: utf-8 -*- import logging import typing import aprs # pylint: disable=R0801 AprsFrame = typing.TypeVar('AprsFrame', bound='aprs.Frame') class Frame(object): """ Frame Class. Defines the components of an AX.25/APRS Frame. """ __slots__ = ['source', 'destinat...
"""Thanks to njsmith for developing Trio guest mode and sharing the first example integration with Qt. """ import contextlib import functools import math import os import time import typing import attr import httpcore._async.http11 import httpx import hyperlink import trio import trio_typing import qtrio import qtrio...
""" Contains classes and functions for experiments. """ import os import json import importlib import shutil import logging import pkg_resources from meggie.subject import Subject from meggie.utilities.filemanager import open_raw from meggie.utilities.filemanager import save_raw from meggie.utilities.channels import...
import numpy as np from numpy import * import os import time import six.moves.urllib as urllib import sys import tarfile import tensorflow as tf import zipfile import matplotlib import cv2 import matplotlib.pyplot as plt from collections import defaultdict from io import StringIO from PIL import Image from object_detec...
from django.core.exceptions import ValidationError from django.core.files.storage import get_storage_class from django.db.models import F, Sum from easy_thumbnails.fields import ThumbnailerImageField import os from django.db import models from django.contrib.auth.models import User from django.conf import settings from...
import xml.etree.ElementTree as ET from .leaf_element import LeafElement, Element class BehaviorFile (Element): def __init__(self): Element.__init__(self, 'BFSM') def add_state(self, state): if not hasattr(state, "output_xml_element"): raise ValueError("state provided is not an E...
"""Utils functions for the structure prediction """ from numpy import array, flip, concatenate from numpy import sum as npsum from scipy.signal import convolve from RNA import fold_compound, md class Glob_parms: "Store all non redundant information" def __init__(self, sequence, nb_mode, max_stack, max_branch...
"""Packets that are not described in COSMOS files or too complex (like FM packets)""" import struct from scapy.all import * from ccsds_base import CCSDSPacket class CosmosPreidentifiedPkt(Packet): """Cosmos PREIDENTIFIED protocol""" name = "CosmosPreidentifiedPkt" fields_desc = [ # Flags: COSMOS4_...
from datetime import date from pony.orm import * app_name = "susm" def requirements(): """ Other modules required for kinship: base. """ return ['base'] def definitions(db, scope): # So the other modules are present. globals().update(scope) # New columns for entities in required modu...
"""Parser for beermenus dot com""" from decimal import Decimal import datetime from dataclasses import dataclass import logging import os from typing import List, Union from dateutil.parser import parse import requests from bs4 import BeautifulSoup from bs4.element import Tag from pytz import UTC import configuration...
import threading from datetime import datetime from datetime import timedelta import os import zipfile import logging from GardenModules.luxSensor.luxSensor import LuxSensor from GardenModules.pump.pump import WaterPump from GardenModules.soilMoisture.soil import SoilMoisture from GardenModules.gardenServer.gardenServe...
# Copyright (c) 2020 fortiss GmbH # # Authors: <NAME>, <NAME>, <NAME>, and # <NAME> # # This software is released under the MIT License. # https://opensource.org/licenses/MIT import os import numpy as np from bark.runtime.viewer.matplotlib_viewer import MPViewer from bark.runtime.scenario.scenario_generation.config_wi...
# Copyright (c) 2015 <NAME>. All rights reserved. # Restrictions are listed in the LICENSE file distributed with this package. import math, numpy as np def eurotate(pt, alpha, beta, gamma, passive=False): ''' Perform an Euler rotation (or N rotations) of the given 3-vector (or N-by-3 list of 3 vectors) pt using p...
from epidag.fitting import BayesResult from epidag.fitting.alg.fitter import Fitter import numpy as np import numpy.random as rd from abc import ABCMeta, abstractmethod __author__ = 'TimeWz667' __all__ = ['ABCSMC'] class AbsStepper(metaclass=ABCMeta): def __init__(self, name, lo, up): self.Name = name ...
# -*- coding: utf-8 -*- # Copyright (C) 2011-2016 Mag. <NAME> All rights reserved # Glasauergasse 32, A--1130 Wien, Austria. <EMAIL> # #*** <License> ************************************************************# # This module is part of the package MOM.Attr. # # This module is licensed under the terms of the BSD 3-Clau...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Jul 31 13:06:31 2019 @author: amaya """ import numpy as np from collections import defaultdict from minisom import MiniSom from sklearn.preprocessing import MinMaxScaler class altersom(MiniSom): def __init__(self, dynamic=False, *args, **kwargs):...
""" ********************************************************* * * * Project Name: Idlorcs * * Author: github.com/kirigaine * * Description: An idle game based around orcs * * Requirements: pip instal...
"""Test cases for the 'comms' module.""" from configparser import ConfigParser import pytest import tweepy from f451_comms.comms import Comms from f451_comms.providers.mailgun import Mailgun from f451_comms.providers.slack import Slack from f451_comms.providers.twilio import Twilio from f451_comms.providers.twitter i...
import discord from discord.ext import commands from .utils import helper_functions as hf import asyncio from datetime import datetime, timedelta, date from .utils import helper_functions as hf import re from textblob import TextBlob as tb import textblob import requests import json from Levenshtein import distance as ...
#import sys import os, cv2, glob import numpy as np import pandas as pd import torch import torch.utils.data as data from torchvision import datasets, models, transforms from PIL import Image from sklearn.utils import shuffle import random #sys.path.append('../recognition') import settings from albumentations import (...
# -*- coding: utf-8 -*- """Simulated Annealing workchain""" import os import functools import ase from aiida.plugins import CalculationFactory, DataFactory, WorkflowFactory from aiida.orm import Dict, Str from aiida.engine import calcfunction from aiida.engine import WorkChain, ToContext, append_, while_ from aiida_ls...
from rest_framework import serializers,fields from core.models import ( Partner,Branch,Area, Product,ProductCategory, JournalEntry,Account,JournalItem, # ChildInvoice,Parent, InvoiceLineOld, InvoiceLine, SalesInvoice, SalesInvoiceNu, AccountDefault...
import matplotlib.pyplot as plt import numpy as np import seaborn as sns import pandas as pd from math import dist import imageio def set_params(k=2, half_of_points=20, dims=2, means=(5, 15), stdevs=(1, 1)): """ Determine the parameters of the algorithm Args: None Returns: k: int, d...
# ================================================================= # # Authors: <NAME> <<EMAIL>> # # Copyright (C) 2020 EOX IT Services GmbH <https://eox.at> # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation # files (the "Software"), to dea...
# region [Imports] # * Standard Library Imports --> import os from typing import TYPE_CHECKING from tempfile import TemporaryDirectory import asyncio from zipfile import ZipFile, ZIP_LZMA from tempfile import TemporaryDirectory from textwrap import dedent from typing import Iterable, Union, List # * Third Party Impor...
# encoding = utf-8 import os import sys import time import datetime import requests from requests.exceptions import HTTPError import json import re from builtins import object import logging import logging.handlers import configparser import boto3 import socket config = configparser.ConfigParser() config.read('./conf...
# File: main.py # File Created: Saturday, 8th June 2019 9:38:18 am # Author: <NAME> (<EMAIL>) """ Main woker script for regression problems. """ import os import sys import argparse from time import time from functools import partial import json import numpy as np import scipy import matplotlib.pyplot as plt from gp...
#!/usr/bin/env python3 """ i dunno what i'm doing here... """ import sys from random import randint, seed, choice import string from bruhat.gset import Perm, Group, Coset, mulclose from bruhat.argv import argv # Todd-Coxeter algorithm: compute finite group from generators and relations. # Implementation from: # h...
# -*- coding: utf-8 -*- """This script downloads and parses IntAct data and maps the interaction types to BEL.""" import pandas as pd from typing import List from protmapper.uniprot_client import get_mnemonic from bio2bel.utils import ensure_path import pybel.dsl from pybel import BELGraph SEP = '\t' INTACT2BEL_MA...
# -*- coding: utf-8 -*- """Rubrix Client Init Method Methods for using the Rubrix Client, called from the module init file. """ import logging from typing import Any, Dict, Iterable, List, Optional, Union import httpx import pandas from rubrix.client.models import ( BulkResponse, DatasetSnapshot, Record...
# # debug.py # # Author(s): # <NAME> <<EMAIL>> # # Copyright (c) 2020-2021 ETH Zurich. # # 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 # #...
# Coding=ASCII import sys import os import subprocess import pandas as pd from easyexception.exception import easyexception from PyQt5.QtCore import pyqtSlot from PyQt5.QtWidgets import QMainWindow, QApplication, QMessageBox, \ QFileDialog, QHeaderView, QTableWidgetItem sys.path.append(os.path.dirname(os.path.re...
__author__ = 'Inego' import re vowels = ('а', 'я', 'э', 'е', 'ы', 'и', 'о', 'ё', 'у', 'ю') rare = ('х', 'ц', 'ч', 'ш', 'щ') voiceless = ('к', 'п', 'с', 'т', 'ф', 'х', 'ц', 'ч', 'ш', 'щ') NO_OBSCENE = True def bad_A(p, grp, grqty, prev): if grp < 0: return True return False def bad_B(p, grp, grq...
import os import json from glob import glob from utils import get_code, SexpCache, set_paths, extract_code, dst_filename from serapi import SerAPI from time import time import sexpdata from proof_tree import ProofTree from extract_proof import goal_is_prop, check_topology import pdb def close_proof(sexp_cache, serap...