text
stringlengths
3.07k
22.1k
import collections from varappx.common.genotypes import decode_int from varappx.constants.filters import ALL_VARIANT_FILTER_NAMES from varappx.main.filters.sort import Sort from varappx.models.gemini import Variants, GeneDetailed # For export to frontend _variant_genotype_expose = {0: [0,0], 1: [0,1], 2: [None,None], ...
""" `icclim.models.frequency` wraps the concept of pandas frequency in order to resample time series. `slice_mode` paramater of `icclim.index` is always converted to a `Frequency`. """ import datetime from enum import Enum from typing import Any, Callable, List, Optional, Tuple, Union import cftime impor...
"""Day 10: Monitoring Station""" from collections import defaultdict, deque from functools import partial from math import atan2, gcd, sqrt from typing import DefaultDict, Deque, Iterable, Iterator, List, NamedTuple, Set, Tuple import pytest import aoc DAY = 10 class Location(NamedTuple): across: int down:...
import json import logging import binascii from hashlib import sha256 from string import hexdigits from torba.client.baseaccount import BaseAccount from torba.client.basetransaction import TXORef log = logging.getLogger(__name__) def validate_claim_id(claim_id): if not len(claim_id) == 40: raise Except...
# coding=utf-8 # Copyright 2020 The Google Research 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 applicab...
#!/usr/bin/env python3 # TODO: Rewrite to remove unnecessary features; this program will only ever # handle metadata.json version numbers. """ Increment a version number in a JSON file. The JSON must have a top-level "version" key, as either a float or an int. Usage: python increment.py metadata.json -i 0.1 -O ...
import re from services import Boto3Service from nodes import Node, ServiceNodes from boto3_docs_parser import Boto3DocsParser, boto3_session, parser import os import boto3 from pprint import pprint from collections import namedtuple from itertools import combinations from services import is_method_attr_in_list, is_req...
from flask import Flask, request,redirect, abort,render_template,session,copy_current_request_context from flask import render_template, flash, redirect, session, url_for, request, g from flask_login import LoginManager, login_user, current_user, UserMixin from flask_socketio import SocketIO, emit, send from flask_uplo...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # import python libs import re import json import argparse import json import random from os import listdir from os.path import isfile, join from pprint import pprint as pp from collections import deque # import project libs import create_annotated_corpus # defining g...
from viewstate import ViewState from src import config import requests_html from datetime import datetime, timedelta import re base_url = "https://appiris.infofer.ro/MyTrainRO.aspx?tren={}" def get_station_id_by_name(name): if name in config.global_station_list: return config.global_station_list[name] ...
"""Code specifically used by Jinja for rendering HTML from Jinja templates. """ # TODO: move all the model stuff that's templating into here import re import os import copy import datetime import base64 from urllib.parse import urlparse from typing import Tuple from flask import request from bs4 import BeautifulSoup...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- ''' Licensed under the terms of the MIT License https://github.com/luchko/QCodeEditor @author: <NAME> (<EMAIL>) Python Highlighting added by: https://github.com/unihernandez22/QCodeEditor @author: unihernandez22 Adapted to Binary Ninja by: @author: <NAME> (https://github...
import base64 import flask from marshmallow import ValidationError import sqlalchemy as sa from . import meta from .exceptions import ApiError from .utils import if_none, iter_validation_errors # ----------------------------------------------------------------------------- class PaginationBase(object): def get...
import yaml import sys from os import path import tempfile from subprocess import check_output from os import listdir from os.path import isfile, join from shutil import copyfile import json import logging global LOGGER MANDATORY_GENERAL_PARAMETERS = [ 'pr-name', 'branch-name', 'commit-message', 'git-add', 'play...
"""This module provides a writer for serialising data to the local filesystem.""" import json import os import re from csv import DictWriter from deprecation import deprecated from hashlib import sha256 from lxml import etree from pandas import DataFrame from polymatheia import __version__ class JSONWriter(): "...
import sep import numpy as np import scarlet from scarlet.wavelet import mad_wavelet, Starlet from .utils import extract_obj, image_gaia_stars from astropy.table import Table, Column from astropy import units as u from astropy.units import Quantity from astropy.coordinates import SkyCoord from kuaizi.mock import Data...
# /usr/bin/python # encoding=utf-8 import os import sys import click import functools def singleton(cls): _instance = {} def inner(*args, **kwargs): if cls not in _instance: _instance[cls] = cls(*args, **kwargs) return _instance[cls] return inner # class singleton(object): # ...
#!/usr/bin/env python import argparse import csv import datetime import os import pytz import gspread from oauth2client.service_account import ServiceAccountCredentials from pydrive.auth import GoogleAuth from pydrive.drive import GoogleDrive from stravalib.client import Client from stravalib.model import Activity fr...
# Copyright 2013-2021 The Salish Sea MEOPAR contributors # and The University of British Columbia # # 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/...
# Extrahiert die Transaktionen aus dem Mempool def getTxnsFromPool(MasterObj): rwo = list() for i in MasterObj.mempool: rwo.append(i); MasterObj.mempool.remove(i); print('Transaction {} selected'.format(i.getTxHash())) return rwo # Gibt die Höhe aller Gebühren welche verwendet werden an def getTra...
#!/usr/bin/env python import bz2 import gzip import json import optparse import os import shutil import subprocess import sys import tarfile import tempfile import urllib.error import urllib.parse import urllib.request import zipfile from ftplib import FTP CHUNK_SIZE = 2**20 # 1mb def cleanup_before_exit(tmp_dir): ...
import matplotlib.pyplot as plt import numpy as np import os from scipy import stats from transposonmapper.statistics import dataframe_from_pergenefile def make_datafile(path_a,filelist_a,path_b,filelist_b): """Assembly the datafile name to analyze Parameters ---------- path_a : str Path o...
""" See: `libfuturize.main` """ from __future__ import (absolute_import, print_function, unicode_literals) import json import logging import optparse import os import shutil import sys from lib2to3 import refactor from lib2to3.main import warn import future.utils from do_py import DataObject, R from do_py.common.mana...
import torch import argparse import scipy import numpy as np import pickle from deeprobust.graph.targeted_attack import Nettack from deeprobust.graph.utils import * from deeprobust.graph.data import Dataset from deeprobust.graph.defense import * from sklearn.preprocessing import normalize from tqdm import tqdm from sc...
#!/usr/bin/python3.8 """ Genetic Algorithm to maximize surveillance over a population for AI Assignment. Author: Sam (eremus-dev) Repo: https://github.com/eremus-dev """ import math from collections import Counter from typing import List, Dict import numpy as np import matplotlib.pyplot as plt from test_pop import te...
import copy as _copy import math as _math import os as _os import cv2 as _cv2 import numpy as _np from PIL import Image as _IMG from easytorch.utils.logger import * """ ################################################################################################## Very useful image related utilities ##############...
# python3 # Copyright 2021 InstaDeep Ltd. 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 applic...
#!/usr/bin/env python import argparse, sys, math # covalent radius to decide a bond. bond length: r1+r2 radius = {" H": 0.25, " N": 0.65, " C": 0.70, " O": 0.60, " P": 1.00, " S": 1.00, "NA": 1.80, "CL": 1.00 } elebd_radius = {" N": 1.5,...
import os import sys import socket import asyncio import time import types import threading from functools import partial from collections import OrderedDict import signal as signal from typing import Any, Callable, Union try: import uvloop uvloop.install() except ImportError: uvloop = None import tornado....
from decimal import Decimal import csv from datetime import datetime from imap_tools import MailBox, AND from django.conf import settings from django.http import HttpResponse from django.shortcuts import render, get_object_or_404 from django.views.generic import CreateView, UpdateView, FormView, TemplateView from dja...
import numpy as np import eqsig from liquepy.element.models import ShearTest from liquepy.element import assess def test_with_one_cycle_no_dissipation(): strs = np.array([0, -1, -2, -3, -4, -3, -2, -1, 0, 1, 2, 3, 4, 3, 2, 1, 0]) tau = np.array([0, -2, -4, -6, -8, -6, -4, -2, 0, 2, 4, 6, 8, 6, 4, 2, 0]) ...
# -*- coding: utf-8 -*- import pandas as pd import re import pickle from sklearn.feature_extraction.text import CountVectorizer, TfidfTransformer import numpy as np from dl_architecture import make_charvec, build_model from keras.callbacks import ModelCheckpoint from keras import backend as K from sklearn.preprocessi...
# http://hg.openjdk.java.net/jdk6/jdk6/jdk/raw-file/tip/src/share/demo/jvmti/hprof/manual.html path = "/Users/huangjinfu/Downloads/hpr/h1j.hprof" TYPE_LEN = { 2: 4, # object 4: 1, # boolean 5: 2, # char 6: 4, # float 7: 8, # double 8: 1, # byte 9: 2, # short 10: 4, # int 11:...
"""----------------------------------------------------------------------------- Name: positional_accuracy.py Purpose: Statistically summarizes positional accuracy values that are stored in a field within a feature class. Description: This tool statistically summarizes the positional accuracy values tha...
import datetime import json from django.contrib.auth import logout as auth_logout from django.contrib.auth.decorators import login_required from django.http import JsonResponse, HttpResponse from django.shortcuts import get_object_or_404, redirect, render from django.views.decorators.cache import never_cache from djan...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # ade: # Asynchronous Differential Evolution. # # Copyright (C) 2018-19 by <NAME>, # http://edsuom.com/ade # # See edsuom.com for API documentation as well as information about # Ed's background and other projects, software and otherwise. # # Licensed under the Apache Li...
import pytest from os.path import join from EPPs.common import StepEPP from tests.test_common import TestCommon, TestEPP, NamedMock from unittest.mock import Mock, patch, PropertyMock from scripts.convert_and_dispatch_genotypes import GenotypeConversion, UploadVcfToSamples class TestGenotypeConversion(TestCommon): ...
import requests import pytest import mock import tempfile import os from datetime import datetime from obs.libs import bucket from werkzeug.datastructures import FileStorage from obs.api.app.controllers.api import storage def fake_resource(access_key, secret_key): resouce = mock.Mock() resouce.Bucket.return_...
# -*- coding:utf-8 -*- import re import logging import os.path import argparse import json import sys from collections import OrderedDict, namedtuple try: from pip.utils import get_installed_distributions except ImportError: import pkg_resources def get_installed_distributions(): return pkg_resourc...
# pip install pycocotools opencv-python opencv-contrib-python # wget https://github.com/opencv/opencv_extra/raw/master/testdata/cv/ximgproc/model.yml.gz import os import copy import time import argparse import contextlib import multiprocessing import numpy as np import cv2 import cv2.ximgproc import matplotlib.patc...
# -*- coding: utf-8 -*- # Copyright 2017-2019 ControlScan, Inc. # # This file is part of Cyphon Engine. # # Cyphon Engine 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, version 3 of the License. # # Cyphon En...
""" Utilities for building programs from assembly source files for simulated and physical hardware. """ import re from assembly.exception import AssemblyException from assembly.instruction import Instruction def apply_macros(macro_dictionary, program_string): """ Apply macros to the source code. :param...
import numpy as np import torch import torch.utils.data as data import torch.nn.functional as F import os import cv2 import math import random import json import csv import pickle import os.path as osp from glob import glob import raft3d.projective_ops as pops from . import frame_utils from .augmentation import RGB...
#!/usr/bin/env python3 import argparse import os import shutil import re from builder import Builder from database_deployer import FlywayDatabaseDeployer from token_fetcher import TokenFetcher from web_deployer import WebDeployer from web_static_deployer import WebStaticDeployer from util import extract_zipfile, get_...
from zipfile import ZipFile import os import pandas as pd import seaborn as sns import matplotlib.pyplot as plt from wordcloud import WordCloud, STOPWORDS from tqdm import tqdm import nltk import re from nltk.tokenize import word_tokenize # extract zip file def extract_zip(file): with ZipFile(file, "r") as zip: ...
""" Author: [<NAME>](https://github.com/russelljjarvis) """ import shelve import streamlit as st import os import pandas as pd import pickle import streamlit as st from holoviews import opts, dim from collections import Iterable import networkx #import bokeh_chart from auxillary_methods import author_to_coauthor_net...
import streamlit as st import pandas as pd import numpy as np import json import pandas as pd from pathlib import Path from datetime import datetime,timedelta import matplotlib.pyplot as plt from plotly_calplot import calplot import plotly.express as px from utils import ( load_config, save_config, pretty...
""" Create a representation of the NK speedCoach data file. Classes: NKSession NKDevice NKSessionFile Functions: None Misc variables: None """ import pandas from io import StringIO class NKSession(object): """ A class to containing the session data obtained from a single NK SpeedCoach ...
# Standard library imports import datetime import time import json import copy # Third party imports import traceback import requests from loguru import logger import pymysql # import requests import paramiko # Local application imports from func.save_data import save_509_data from utils import send_to_axxnr from fun...
import json import os import shutil import subprocess import sys import tempfile import unittest sys.path.append("../main") from algorithms import * port = 2222 def sshd(**kwargs): dirname = tempfile.mkdtemp() confname = dirname + "/sshd_config" logname = dirname + "/sshd.log" with open(confname,...
import numpy as num import scipy.sparse.linalg as alg import scipy.linalg as algnorm import scipy.sparse as smat import random # Operacje grafowe - może wydzielić ? def to_adiacency_row(neighbours, n): row = num.zeros(n) row[neighbours] = 1 return row def graph_to_matrix(graph): # Tworzy macierz rzadką...
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. from functools import partial import torch from torch import nn from timm.models.layers import DropPath from einops.layers.torch import Reduce from .layers import DWConv, SPATIAL_FUNC, ChannelMLP, STEM_LAYER from .misc import reshape2n...
import os import subprocess import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.nn.functional import interpolate from loguru import logger from tqdm import tqdm import numpy as np import wandb from draw_concat import draw_concat from generate_noise import generate...
# coding=utf-8 # ------------------------------------------------------------------------ # Created by <NAME> on 2013-03-20 # Copyright (c) 2013 <NAME>. All rights reserved. # ------------------------------------------------------------------------ from __future__ import absolute_import import json import logging t...
""" Author: ~wy (https://github.com/wy) Date: 25/01/2019 Description: A simulator for the Three Dice game (Sic Bo) played in Macau casinos and elsewhere. Important simplification is that all three dice are treated equally which makes the maths a bit easier. Key concepts: Criteria - does a dice configuration match a bet...
#!/usr/bin/env python import json import os import re import numpy from gem.cnvReport import BaseDocumentHtml,BaseStatistical class BuildHtmlAssembly(BaseDocumentHtml): """Base Mapping step""" def titleDocument(self): '''Title Web Document''' self.vContent.append(" <H1 id=\"title\"> <U>...
import script from script import * import shlex import edition import layout import query import player import test import graph import opendns class Color(script.Script): def __init__(self, console): super(Color, self).__init__(console) self.colors = { "red" : [ 1.0, 0.0, 0.0, 1.0 ], "green" : [ 0.0, ...
#coding: utf-8 import requests import AdvancedHTMLParser import json import datetime import html from unidecode import unidecode # Placeholder, will be replaced by reference to main cfg object # This is only to satisfy builtin vs code verifier try: cfg = None cfg.teachermap_filename = None except: pass print("SEMI...
import ipywidgets as widgets import ipywidgets from traitlets import Unicode import traitlets from traittypes import Array import logging import numpy as np from .serialize import array_cube_png_serialization, array_serialization from .transferfunction import * import warnings logger = logging.getLogger("ipyvolume") ...
import math import os import time import numpy as np from torch.utils.tensorboard import SummaryWriter import utils.loss as loss import utils.tensorboard as utb def get_probs(length, exp): probs = (np.arange(1, length + 1) / 100) ** exp last_x = int(0.9 * length) probs[last_x:] = probs[last_x] retur...
#!/usr/bin/env python3 """ corrections.py: Script to apply corrections to the images. """ import os from argparse import ArgumentParser from datetime import date, datetime from typing import Optional, Sequence import numpy as np from astropy.io import fits from dresscode.utils import load_config def main(argv: Op...
"""Block.Io API backend. Supports Bitcoin, Dogecoin and Litecoin on `block.io <https://block.io>`_ API. The backend configuration takes following parameters. :param class: Always ``cryptoassets.core.backend.blockio.BlockIo`` :param api_key: block.io API key :param password: <PASSWORD> :param network: one of ``btc...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Routines related to the canonical Chandra ACA dark current model. The model is based on smoothed twice-broken power-law fits of dark current histograms from Jan-2007 though Aug-2017. This analysis was done entirely with dark current maps scaled to -1...
# -*- coding: utf-8 -*- # Copyright 2018 <NAME> 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 ...
""" mixcoatl.admin.user ------------------- Implements access to the DCM User API """ from mixcoatl.resource import Resource from mixcoatl.decorators.lazy import lazy_property from mixcoatl.decorators.validations import required_attrs from mixcoatl.utils import camelize, camel_keys, uncamel_keys import json import tim...
from altair.vegalite.v4 import schema from altair.vegalite.v4.schema.channels import Tooltip import pandas as pd import altair as alt import numpy as np from queries import Pomodoro THEME = 'magma' # TO DO: Add docstings where needed def get_current_date(): """ Gets the current date to perform default ...
import argparse import multiprocessing import os import pickle import subprocess import sys from random import randint from time import sleep import georasters as gr import numpy as np from osgeo import gdal, osr def save_img(data, geotransform, proj, outPath, noDataValue=np.nan, split=False): # Start the gdal d...
# copytrue (c) 2020 PaddlePaddle Authors. All Rights Reserve. # # 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 applicab...
# https://www.jwz.org/doc/threading.html # https://github.com/akuchling/jwzthreading import re from collections import deque restrip_pat = re.compile("""( (Re(\[\d+\])?:) | (\[ [^]]+ \]) \s*)+ """, re.IGNORECASE | re.VERBOSE) class Container: """Contains a tree of messages. Instance attributes: .mes...
#!/usr/bin/env python ''' MonkeyTest -- test your hard drive read-write speed in Python A simplistic script to show that such system programming tasks are possible and convenient to be solved in Python The file is being created, then written with random data, randomly read and deleted, so the script doesn't waste your...
# /usr/bin/env python3.5 # -*- mode: python -*- # ============================================================================= # @@-COPYRIGHT-START-@@ # # Copyright (c) 2020, Qualcomm Innovation Center, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification,...
import logging import types from collections import defaultdict from typing import ( Any, Dict, Iterator, List, Mapping, Tuple, Type, Union, ) from .setting import Setting, PropertySetting from .setting_registry import registry from .docreader import extract_doc_comments_from_class_or_m...
#!/usr/bin/env python #------------------------------------------------------------ # Purpose: Program to straight line parameters # to data with errors in both coordinates. Compare # the results with SciPy's ODR routine. # Vog, 27 Nov, 2011 #----------------------------------------------------------...
import numpy as np import scipy import cv2 def get_pixel_neighbors(height, width): """ Estimate the 4 neighbors of every pixel in an image :param height: image height :param width: image width :return: pixel index - neighbor index lists """ pix_id = [] neighbor_id = [] for i in ra...
import math import torch import numpy as np import pandas as pd import torch.nn as nn def normal_pdf(x): import math return torch.exp(-0.5 * x**2) / math.sqrt(2 * math.pi) def normal_cdf(y, h=0.01, tau=0.5): # Approximation of Q-function given by López-Benítez & Casadevall (2011) # based on a second-...
# ****************************************************************************** # Copyright 2017-2018 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.apa...
from typing import List, Optional, Dict, Any import logging import os import json import glob from fastapi import FastAPI, HTTPException, Header, Response, Body from fastapi.responses import FileResponse from fastapi.encoders import jsonable_encoder from app.metadata import PaperStatus, Allocation from app.annotation...
import datetime import asynctest.mock import pytest from exptools.time import ( utcnow, localnow, as_local, as_utc, format_utc, format_utc_short, format_local, format_local_short, parse_utc, parse_local, diff_sec, format_sec, format_sec_fixed, format_sec_short, job_elapsed_time, format_job_count, fo...
# -*- coding: utf-8 -*- """ Created on Sun May 21 14:31:32 2017 @author: <NAME> """ import random inf = 0 prime = 2**17-1 order = 131307 # remember to check isSingular(a,b,p) == False a = 1 b = 6 # Uses the idea of squareAndMultiply to compute c*p quickly in E. # Based on algorithm on p. 266 in course literatur...
"""PFIM: Personal Finance Manager""" import os from queue import Queue import sys import sqlite3 import logging import statistics import functools from datetime import date, timedelta from enum import Enum, auto from collections import namedtuple from typing import List, Dict, Callable, Generator, Mapping, Union ## ...
import pandas as pd import numpy as np from numpy import corrcoef import matplotlib.pyplot as plt from sklearn.feature_selection import chi2 from sklearn.feature_selection import f_classif from math import * plt.style.use('ggplot') fig = plt.figure() COUNTER = 1 #Return the category dictionary,categorical variables l...
from copy import deepcopy import torch from torch import nn import torch.nn.functional as F import numpy as np from apex import amp from torch.cuda.amp import autocast as autocast from transformers import BertModel, BertTokenizer from util import text_processing from collections import OrderedDict from . import ops a...
from typing import List, Set from querio.db import data_accessor as da from querio.ml import model from querio.service.save_service import SaveService from querio.ml.expression.cond import Cond from querio.ml.expression.expression import Expression from querio.queryobject import QueryObject from querio.service.utils i...
from database.imports import * from database.models.base import Base from database.models.mixins import HasNotes, HasMetaData, HasCiteables, HasTreeStructure, HasExperiments, HasProperties ###----------------------------------- ### Hardware inventory, aka rig parts ###----------------------------------- class Hardw...
# read README.md file on my GitHub. It walks you through the instalation of necessary # libraries, helps you solve common errors and provides useful references ;) # https://github.com/scraptechguy/SpeechCheck # import library to report time in debug printing import datetime # import elements from libraries for Mi...
import os import requests from urllib.error import URLError from urllib.parse import urlparse from urllib.request import urlopen from luigi import Target, LocalTarget from hashlib import sha1 from tasks.util import (query_cartodb, underscore_slugify, OBSERVATORY_PREFIX, OBSERVATORY_SCHEMA) from tasks.meta import (OB...
import sys from PyQt4 import QtGui, QtCore from pyqtgraph.Qt import QtGui, QtCore import pyqtgraph as pg import numpy from math import sqrt, sin, cos, pi from geometry.quaternion import Quaternion class StripChart(QtGui.QWidget): """ a class to implement a stripchart using the pyqtgraph plotting utilities ...
from typing import Tuple, Dict import h5py import pandas as pd import numpy as np from loguru import logger from ruamel.yaml import YAML from joblib import load, dump from umda import EmbeddingModel from sklearn.gaussian_process import GaussianProcessRegressor, kernels from sklearn.neighbors import KNeighborsRegressor...
# # Copyright (c) 2018 ISP RAS (http://www.ispras.ru) # Ivannikov Institute for System Programming of the Russian Academy of Sciences # # 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 # # h...
import pandas as pd import numpy as np import sys import matplotlib.pyplot as plt import seaborn as sns def plot_conservation(out_path): """ Plotting the fraction of conserved binding sites for Brn2, Ebf2 and Onecut2, based on multiGPS and edgeR results from Aydin et al., 2019 (Nature Neurosciece: PMI...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # File name: tool_func.py """ Created on Thu Apr 23 17:39:40 2020 @author: Neo(<EMAIL>) Some tool functions. The comment will be added when I am free. """ from myprogs.vsh.vsh_fit import rotgli_fit_4_table from myprogs.catalog.pos_diff import radio_cat_diff_calc from ...
# | Copyright 2017 Karlsruhe Institute of Technology # | # | 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 ...
# Copyright (c) 2020, <NAME>. # All rights reserved. Distributed under the BSD License. import csv import gzip import json import logging import os.path import time from enum import Enum from typing import Optional, Generator, Dict, Callable, Tuple, Set, Any import requests _MEGABYTE = 1048576 #: Logger for all outp...
import os # path import sys # path import yaml # safe_load, YAMLError import glob # glob import importlib # import_module import pytest # skip import warnings # warn # For type hints only: from typing import Union from types import ModuleType from _pytest.config import C...
# Seenbot module. from datetime import datetime import json from michiru import db, personalities from michiru.modules import command, hook _ = personalities.localize ## Module information. __name__ = 'seenbot' __author__ = 'Shiz' __license__ = 'WTFPL' __desc__ = 'Tells when someone was last seen.' ## Database stu...
# Copyright 2016 The Johns Hopkins University Applied Physics Laboratory # # 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 ...
""" Requirements: ----------- pyngrok==5.0.5 mlflow==1.15.0 pandas==1.2.3 numpy==1.19.3 scikit-learn==0.24.1 Examples of usege can be found in the url below: https://nbviewer.jupyter.org/github/abreukuse/ml_utilities/blob/master/examples/experiments_management.ipynb """ import os import mlflow from pyngrok import ng...
from utils import * from block_descriptor import * from Crypto.Cipher import AES import hashlib import cStringIO import gzip import json import gzip_mod import os class Image: def __init__(self, image_data, read=True): self.stream = cStringIO.StringIO(image_data) self.stream_len = le...
#!/usr/bin/python # # Copyright (c) 2012 <NAME> <<EMAIL>> # # 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...
import sys import click import numpy as np import pandas as pd import tensorflow as tf import tensorflow.keras.backend as K import tensorflow_probability as tfp import statsmodels.api as sm import xgboost as xgb import matplotlib.pyplot as plt import seaborn as sns from abc import ABC, abstractmethod from pathlib...