text
stringlengths
8.04k
46.5k
''' @author: <NAME> (jakpra) @copyright: Copyright 2020, <NAME> @license: Apache 2.0 ''' import sys import re import sexpdata import ast import json from ..ccg.category import Category, InvalidCategoryError from ..ccg.combinator import HARD_COMBINATORS from ..ccg.derivation import Derivation, DerivationLeafNode, Der...
import astropy.units as u import numpy as np import pytest from ctapipe.core import non_abstract_children from ctapipe.image.extractor import ( FixedWindowSum, FullWaveformSum, ImageExtractor, NeighborPeakWindowSum, SlidingWindowMaxSum, TwoPassWindowSum, extract_around_peak, extract_slid...
import logging from pathlib import Path import re import scipy.stats as ss import matplotlib.pyplot as plt import numpy as np import pandas as pd import statsmodels.stats.multitest as multitest import sklearn.metrics from intermine.webservice import Service import biclust_comp.utils as utils def plot_sample_enrichm...
import tikzplotlib import matplotlib import matplotlib.pyplot as plt import os import torch import pickle import json from pytracking.evaluation.environment import env_settings from pytracking.analysis.extract_results import extract_results def get_plot_draw_styles(): plot_draw_style = [{'color': (1.0, 0.0, 0.0),...
from django.core.urlresolvers import reverse_lazy, reverse from django.db.models import Count from django.views.generic.detail import DetailView from django.views.generic.edit import CreateView, UpdateView, DeleteView from django.views.generic.list import ListView from django.http import StreamingHttpResponse, Http404,...
import sys import os import mxnet as mx #sys.path.append(os.path.join(os.path.dirname(__file__), '..')) from config import config, default import numpy as np from mxnet.gluon import nn swish_index = 0 def gluon_act(act_type): if act_type=='prelu': return nn.PReLU() else: return nn.Activation(a...
# Standard library import os import json import uuid import logging import itertools from copy import deepcopy from uuid import uuid4, UUID # Third party from fuzzywuzzy import process from flanker.addresslib import address from ratelimit import UNSAFE from ratelimit.mixins import RatelimitMixin from django_filters.re...
# Copyright 2017 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 required by applica...
import math import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import sys import os import argparse import json from torch.utils.data import Dataset, DataLoader import logging import skimage.io as io import cv2 FORMATTER = logging.Formatter("%(asctime)s — %(name)s — %(leveln...
# Copyright (c) 2018, Palo Alto Networks # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS...
import os import copy import time import ipdb import dill import torch import collections import functools import hashlib from datetime import datetime import numpy as np from tqdm import tqdm from typing import Any, Callable, Dict, List, Optional, Tuple, Union from ..transformers.modeling_utils import PreTrainedModel...
from codegen.dag import Dag class PatternMatcher: def __init__(self, name): self.name = name def match(self, node, values, idx, dag): return None class MatcherResult: def __init__(self, name, value, sub_values=None): if not sub_values: sub_values = [] self.n...
""" TSQL -- Test Suite Query Language """ from typing import ( List, Tuple, Dict, Set, Optional, Union, Any, Type, Iterator, Callable, cast as typing_cast) import operator import re from datetime import datetime from delphin.exceptions import PyDelphinException, PyDelphinSyntaxError from delphin import util ...
# Copyright The IETF Trust 2007, All Rights Reserved # Django settings for ietf project. # BASE_DIR and "settings_local" are from # http://code.djangoproject.com/wiki/SplitSettings import os try: import syslog syslog.openlog("datatracker", syslog.LOG_PID, syslog.LOG_USER) except ImportError: pass BASE_DI...
r""" Graph-linked unified embedding (GLUE) for single-cell multi-omics data integration """ import os from itertools import chain from math import ceil from typing import List, Mapping, Optional, Tuple import anndata import ignite import networkx as nx import numpy as np import pandas as pd import torch import torch....
"""API Doc templates generator.""" from typing import Any, Dict, List, Optional, Union from urllib.parse import quote, urljoin class HydraDoc: """Class for an API Doc.""" def __init__(self, API: str, title: str, desc: str, entrypoint: str, base_url: str, doc_name: str) -> None: """In...
# Copyright 2021 NREL # 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 # distri...
#!/usr/bin/env python3 import sys, random, math, time, subprocess random.seed(time.time()) class Config(object): config = None @staticmethod def Singleton(): if Config.config is None: Config.config = Config() return Config.config def __init__(self): self.MAX_NOP_P_...
from __future__ import absolute_import, division, print_function import torch import torch.nn as nn import torch.nn.functional as tf import logging from utils.interpolation import interpolate2d_as from utils.sceneflow_util import pixel2pts_ms, pts2pixel_ms, pts2pixel from utils.sceneflow_util import pixel2pts_ms_and...
import typing import os import re import sqlalchemy import pandas import psycopg2 from .db_object import db, table_names from .exceptions import * if typing.TYPE_CHECKING: from .data_version import DataVersion def delete_table(table_id: int) -> bool: """ Delete the table in the database :param tabl...
""" For Allele Registry API specification - @see http://reg.clinicalgenome.org/doc/AlleleRegistry_1.01.xx_api_v1.pdf A variant with coordinates ('14', 45628283, 'TTA', 'T') looks like this: http://reg.test.genome.network/allele/CA7169043 api_response["genomicAlleles"] coordinates look like: {"allele": "", "end": 4...
# ------------------------------------------------------------------------------- # Copyright (C) 2016 DjAlex88 (https://github.com/djalex88/) # # 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 Softwa...
''' This file defines a Spectogram class. ''' import librosa import librosa.display import numpy as np import pandas as pd import matplotlib.pyplot as plt import os import jams import plotly import plotly.graph_objs as go from tabgen.sounds import play_audio import scipy.signal import mir_eval class Spectog...
from __future__ import print_function import ConfigParser import argparse import shelve import sys import os import subprocess import shutil import time import re sys.path.append("../plottingTools") shelve_name = "dump.shelve" # contains all the measurement objects and plot objects history_file = "history.log" clock_i...
# Test for evaluering af hvert forecast og sammenligning mellem forecast import pandas as pd import numpy as np from numpy.random import rand from numpy import ix_ from itertools import product import chart_studio.plotly as py import chart_studio import plotly.graph_objs as go import statsmodels.api as sm chart_studio...
"""Module contianing functions for saving FYs, Projects, etc. to a db.""" from datetime import datetime from app.updater import gl from app.updater import fiscal_years from app.models import MasterDetails, ProjectDetails def save_master_details(app, item_details): """Save item details relevant to searching.. ...
# Written by <NAME>, 2018 """ From Wikipedia "Retina": Although there are more than 130 million retinal receptors, there are only approximately 1.2 million fibres (axons) in the optic nerve; a large amount of pre-processing is performed within the retina. The fovea produces the most accurate information. Despite occup...
""" Finite field elements implemented via PARI's POLMOD type (deprecated) EXAMPLES:: sage: K = FiniteField(2) sage: V = VectorSpace(K,3) sage: w = V([0,1,2]) sage: K(1)*w (0, 1, 0) We do some arithmetic involving a bigger field and a Conway polynomial, i.e., we verify compatibility condition. ::...
''' * Copyright (c) 2021, salesforce.com, inc. * All rights reserved. * SPDX-License-Identifier: BSD-3-Clause * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause ''' import logging import os import random import itertools import torch from torch.utils.dat...
# https://stable-baselines.readthedocs.io/en/master/guide/custom_env.html import math import copy import json import gym from gym import spaces import pandas as pd import numpy as np import shapely.geometry as geom from analysis.obspy_copy import degrees2kilometers from gym.envs.classic_control import rendering from ...
# # Image and annotations preprocessing for lightnet networks # The image transformations work with both Pillow and OpenCV images # The annotation transformations work with brambox.annotations.Annotation objects # Copyright EAVISE # # modified by mileistone import random import collections import logging as l...
import inspect import socket import re from typing import TYPE_CHECKING, Optional, Union, Callable, Any, Literal, List, Tuple, Type, Dict, cast from types import TracebackType from unittest.mock import MagicMock from urllib.parse import urlparse from mypy_extensions import VarArg, KwArg from os import chdir, environ, ...
""" Copies data and metadata files from a source DSS to a DCP/2 staging bucket. """ import argparse from concurrent.futures import ( CancelledError, Future, ThreadPoolExecutor, as_completed, ) import copy from datetime import ( datetime, ) from functools import ( lru_cache, ) import json import ...
from core.utils import decode_cfg, load_weights from core.image import draw_bboxes, preprocess_image, postprocess_image, read_image, read_video, Shader import matplotlib.pyplot as plt import time import cv2 import numpy as np import tensorflow as tf import sys #header file to convert model output to into boxes, scor...
import os,socket,threading,sys,ast, queue, shutil, xattr from pathlib import Path lock = threading.Lock() Q = queue.Queue() # ''' To do: 3) Deleting Replicated Files 4) Connecting using hostname 5) Smart client and file transfer with data server direct 6) Making directory and file 7) Removing from list ''' MAX_MSG = 1...
import numpy as np from math import acos, pi from TriSoupMesh import TriSoupMesh from Utilities import * # Use euclid for rotations import euclid as eu # Iniialize the global counters for id numbers # NOTE: Global ID numbers mainly exist so that human debugging is easier # and doesn't require looking at memory add...
# -*- coding: utf-8 -*- # # Dell EMC OpenManage Ansible Modules # Version 3.3.0 # Copyright (C) 2021 Dell Inc. or its subsidiaries. All Rights Reserved. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # from __future__ import (absolute_import, division, print_function) _...
# plugin for fritz box # # Author: belze # """ <plugin key="FritzBox" name="Fritz!Box Plugin" author="belze" version="0.6.4" > <!-- wikilink="https://github.com/belzetrigger/domoticz-FritzBox" externallink="" //--> <description> <h2>Fritz!Box</h2><br/> Add your FritzBox to Domoti...
import asyncio import datetime import json import math import os import random import struct import time import urllib.parse from ast import literal_eval from io import BytesIO import aiohttp import discord import websockets from PIL import Image from discord.ext import commands from discord.ext.commands import Bot ...
#!/usr/bin/env python3 import os import random import requests import json from .arguments import args from .logger import logger TEXT_GEN_API_VAR = 'DEEP_AI_KEY' DEFAULT_KEY = '9d414130-ca3d-4169-ab5e-0c0c2f17b65f' words = [ 'The', 'he', 'at', 'but', 'there', 'of', 'was', 'be', 'not', 'use', 'and', 'for', 'this'...
from compiler import parse import sys, unittest from traits.testing.api import doctest_for_module from codetools.util.functional import partial import codetools.blocks.analysis as analysis from codetools.blocks.analysis import ( ConstAssignExtractor, Transformer, free_vars, local_vars, conditional...
""" Runs a Montecarlo simulation to calculate the probability of winning with a certain pokerhand and a given amount of player. """ from tools.hand_evaluator import eval_best_hand __author__ = '<NAME>' # pylint: skip-file import logging import operator import time from collections import Counter from copy import cop...
from platypus import NSGAII, Problem, Real, Integer, InjectedPopulation,GAOperator,HUX, BitFlip, SBX,PM,PCX,nondominated,ProcessPoolEvaluator # I use platypus library to solve the muli-objective optimization problem: # https://platypus.readthedocs.io/en/latest/getting-started.html from pyomo.opt import SolverFactory...
# emacs: -*- mode: python-mode; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See COPYING file distributed along with the NiBabel package for the # copyright and license terms. # ### ### ### #...
import argparse import copy import getpass import logging import pathlib import random from datetime import datetime from time import perf_counter import numpy as np import pandas as pd import pandapower as pp from planning_benchmark.seeds import seeds as seed_dict user = getpass.getuser() logger = logging.getLogger...
import numpy as np import collections import miditoolkit import copy import utils.chord_inference as chord_inference from collections import defaultdict # parameters for input # DEFAULT_VELOCITY_BINS = np.linspace(0, 128, 32+1, dtype=np.int) DEFAULT_FRACTION = 32 # 16 for REMI DEFAULT_DURATION_STEP = 60 #120,60 3840/...
""" Numba implementation of the Fortran program surf96. This module is not a one-to-one translation from Fortran to Python. The code has been adapted and optimized for Numba. .. COMPUTER PROGRAMS IN SEISMOLOGY VOLUME IV COPYRIGHT 1986, 1991 <NAME>, <NAME> Department of Earth and Atmospheric Scie...
import sys import os import pickle from os.path import expanduser, join import time from scipy.interpolate import CubicSpline import numpy as np from lxml import etree import math home = expanduser("~") def annotation_to_xml(params): volumes_creation_start = time.time() [dataset_name, dim, depth_axis, radiu...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Storage testcase using xfstests. """ __copyright__ = \ """ Copyright (C) 2012-2015 Oracle Corporation This file is part of VirtualBox Open Source Edition (OSE), as available from http://www.virtualbox.org. This file is free software; you can redistribute it and/or mo...
# -*- coding: utf-8 -*- # -------------------------- # Copyright © 2014 - Qentinel Group. # # 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/LIC...
# iput = input from map import * from os import path from objs import * from pyglet.sprite import Sprite from pyglet.window import key from hud import * from weapons import * from Nodes import * import _thread, socket, site, os, sys, platform, datetime HOST = '' # Standard loopback interface address (loca...
# QML as Q Learning function approximator # Need to specify STATE input format # Computational Basis Encoding # action output is still softmax [a_0, a_1, a_2, a_3, a_4, a_5] # Deep Q-Learning DQN # Experimence Replay (For i.i.d sampling) # Target Network (Updata every C episodes) ==> Another Circuit Parameter Set # T...
"""archetypal ZoneDefinition module.""" import collections import sqlite3 import time from eppy.bunch_subclass import BadEPFieldError from sigfig import round from validator_collection import validators from archetypal.template.conditioning import ZoneConditioning from archetypal.template.constructions.internal_mass...
""" This tests whether the Study object was created correctly. No computation or visualization tests yet. """ from __future__ import absolute_import, division, print_function from __future__ import unicode_literals from six import iteritems from collections import Iterable import itertools import json import matplotl...
"""Main module.""" import time as _time import math from copy import deepcopy as _dcopy from mathphys.functions import get_namedtuple as _get_namedtuple import numpy as np import matplotlib.pyplot as plt import matplotlib.gridspec as mpl_gs from siriuspy.namesys import SiriusPVName as _PVName from siriuspy.devices im...
""" This playbook processes IP addresses not in bogon_list and creates a task note for every indicator for review by the analyst """ import phantom.rules as phantom import json from datetime import datetime, timedelta def on_start(container): phantom.debug('on_start() called') # call 'check_ip_address' bl...
#!/usr/bin/env python3 import os import glob import re import sys import math # use cases and their directory names tests = [ "CP3-4.8.5", "CP1-4.8.5", "CP3-4.8.9", "CP1-4.8.9", "ADT-CP3-4.8.5", "ADT-CP1-4.8.5", "ADT-CP3-4.8.9", "ADT-CP1-4.8.9", "CP3-4.8.8", "CP1-4.8.8", "ADT-CP3-4.8.8", "ADT-CP1-4.8.8" ] loc...
import math import numpy as np import os from osim.env.utils.mygym import convert_to_gym import gym import opensim import random import osim ## OpenSim interface # The amin purpose of this class is to provide wrap all # the necessery elements of OpenSim in one place # The actual RL environment then only needs to: # -...
''' This module provides movie tools for level 2 IRIS SJI fits file ''' from datetime import timedelta import warnings import numpy as np from astropy.io import fits import astropy.units as u from astropy.wcs import WCS from sunpy.time import parse_time from sunpy.map import GenericMap from ndcube import NDCube from ...
#!/usr/bin/env python # coding:utf-8 import os import sys import glob import binascii import time import random import base64 import hashlib import threading import subprocess import datetime current_path = os.path.dirname(os.path.abspath(__file__)) python_path = os.path.abspath( os.path.join(current_path, os.pardir,...
from collections import Counter, namedtuple from typing import Dict, List, Union from string import ascii_letters import neo4j from improving_agent import models # TODO: replace with direct imports after fixing definitions from improving_agent.exceptions import MissingComponentError, NonLinearQueryError from improvin...
#!/usr/bin/env python u""" grace_months_html.py Written by <NAME> (10/2020) Creates a html file with the start and end days for each dataset Shows the range of each month for CSR/GFZ/JPL (RL06) and GSFC (rl06v1.0) Shows which months are missing for each dataset as **missing** Similar to ftp://podaac.jpl.nasa.gov/allD...
######################################################################################################################### # # # OpenFold Pipeline - From Sequence to Folded Protein ...
""" Evaluator client side API. """ import copy import json import logging import socket import traceback from collections import defaultdict from enum import Enum from time import sleep from openff.evaluator.attributes import UNDEFINED, Attribute, AttributeClass from openff.evaluator.datasets import PhysicalPropertyDa...
# coding=utf-8 # Copyright 2022 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...
from typing import Callable, Dict, List, Optional, Union import numpy as np from desdeo_mcdm.interactive.InteractiveMethod import InteractiveMethod from desdeo_problem.Objective import VectorObjective, _ScalarObjective from desdeo_problem.Problem import MOProblem from desdeo_problem.Variable import variable_builder fr...
import boto3 import json import argparse import copy import ipaddress from typing import Union parser = argparse.ArgumentParser( description="A Script to load existing cidrs to DDB Cidr Pool table and generate new config based for upgrade" ) parser.add_argument('--AcceleratorPrefix', default='ASEA-', ...
#Copyright (C) 2021. Huawei Technologies Co., Ltd. All rights reserved. #This program is free software; #you can redistribute it and/or modify #it under the terms of the MIT License. #This program is distributed in the hope that it will be useful, #but WITHOUT ANY WARRANTY; without even the implied warranty of #MERCHA...
""" 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 or agreed to in writing, software di...
""" Handles communication with Nordic Power Profiler Kit (PPK) hardware using Segger's Real-Time Transfer functionality. """ import time import struct import re import math class PPKError(Exception): """PPK exception class, inherits from the built-in Exception class.""" def __init__(self, error=None): ...
import datetime import math import re from typing import List import bs4 from tibiapy import abc from tibiapy.enums import PvpType, TournamentPhase, Vocation from tibiapy.errors import InvalidContent from tibiapy.utils import get_tibia_url, parse_integer, parse_popup, parse_tibia_datetime, parse_tibia_full_date, \ ...
# Copyright (c) 2019 PaddlePaddle 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 app...
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Read SAS XPORT/XPT files from SAS Version 5 or 6. ''' from collections import namedtuple from collections.abc import Mapping, Sequence from datetime import datetime from io import BytesIO from itertools import accumulate import os, re, struct #######################...
import os import math import re import numpy as np import tensorflow as tf from tqdm import tqdm from skimage import io from getch import getch # a class to store variables in a dictionary class Vars(object): def __init__(self): self.d = dict() def get(self, key): return self.d[key] def ...
import os, time import numpy as np from PIL import Image from io import BytesIO from skimage import io, transform from torch.autograd import Variable from django.core.files.uploadedfile import InMemoryUploadedFile """ Name: U^2-Net lib Description: The main module of the neural network. Source url: https://github.co...
import numpy as np import argparse import os # torch import torch # Data loading from torch.utils.data import DataLoader, SubsetRandomSampler # Dat set from era5dataset.FrontDataset import * # ERA Extractors from era5dataset.EraExtractors import * # networks from Models.FDU3D import * from MyLossFunctions import * ...
# -*- coding: utf-8 -* """ This module is very useful... """ from bisect import bisect_left import os import sys import re from datetime import datetime, timedelta # import spice from plotly.graph_objs import Scatter def all_same(items): return all(x == items[0] for x in items) def background_colors(top_limit=7...
"""Run from motion_imitation/retarget_motion to find data correctly.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirn...
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER # Copyright (c) 2018 Juniper Networks, Inc. # All rights reserved. # Use is subject to license terms. # # Author: cklewar class LogTaskProcessor(object): TASKP = 'TASKPROCESSOR' TASKP_LOAD_TASK_SEQ = 'Loading task plugin sequence <{0}>' TASKP_F...
import os import zipfile from pathlib import Path import streamlit as st import pandas as pd import shutil import pickle from source.bracket_pdf_parser import load_or_generate_bracket_data, create_empty_score_csv_from_directory, \ generate_bracket_df_from_directory, create_empty_score_csv_from_df, get_score_dict_f...
"""Jinja templates for Jerikan.""" import os import re import functools import subprocess import netaddr import shlex import logging import collections import requests import ipaddress import inspect from datetime import timedelta, datetime, time import ansible.plugins.filter.core import ansible_collections.ansible.ne...
#!/usr/bin/python3 # Copyright (c) 2017, <NAME> import os import sys import getopt import glob import json import collections import copy import re from argparse import ArgumentParser from argparse import RawDescriptionHelpFormatter import textwrap output_path = os.path.join(os.path.dirname(__file__), '..', 'public',...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Sep 11 12:53:05 2020 @author: <NAME> This script calculates the absorption cross section fit coefficients from the harmonized Hitran absorption cross sections and stores the output for each species as ARTS-XsecRecord. If desired, the script produces 9 ...
""" ******************************************************************************** Prototype Cookie Clicker Garden simulator ******************************************************************************** Save valuable time and cookies with this simulator """ import sys try: # for Python2 from Tkinter impor...
"""OpenAI gym environment for Carla. Run this file for a demo.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from datetime import datetime import atexit import cv2 import os import json import random import signal import subprocess import sys import ti...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Disable pylint invalid module name complaint. # pylint : disable = C0103 """ Pre-commit script for invoking linters and auto-formatters.""" # Make sure we use the new print function from __future__ import print_function import datetime import imp import os import re im...
from tkinter import Tk, TclError from tkinter import Label, Button, Entry, Checkbutton, Scrollbar, Listbox, PhotoImage, Radiobutton, Scale, Frame from tkinter import StringVar, BooleanVar, DoubleVar, IntVar from tkinter import DISABLED, NORMAL, END, RIGHT, LEFT, BOTH, Y, HORIZONTAL import tkinter.ttk as ttk from tkin...
import angr import os import ntpath from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter # this list contains all the opcode in the two binaries opcode_list = [] # this dictionary stores the predecessors and successors of nodes # per_block_neighbors_bids[block_id] = [[predecessors],[successors]] per_blo...
#!/usr/bin/env python import glob from rdkit import Chem from rdkit.Chem import AllChem, Draw from rdkit.Geometry import Point3D import json import os import shutil import warnings import csv #import pypdb import numpy as np import gemmi import shutil class Ligand: def __init__(self, target_name, infile, RESULTS...
from cas import CASClient from django.contrib.auth import authenticate, login as auth_login, \ logout as auth_logout, REDIRECT_FIELD_NAME from django.contrib.auth import get_user_model, update_session_auth_hash from django.contrib.auth.views import PasswordResetCompleteView, \ PasswordResetConfirmView, ...
from enum import Enum class Category(Enum): free = "zip" furniture = "hsh" class Area(Enum): anywhere = "" brooklyn = "brk" queens = "que" bronx = "brx" staton = "stn" manhattan = "mnh" jersey = "jsy" class Region(Enum): sarasota_bradenton = "sarasota" dallas_fort_worth...
# -*- coding: utf-8 -*- # # Copyright (c) 2014 Metaswitch Networks # Copyright (c) 2013 OpenStack Foundation # 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 # ...
# -o-- """ MOSRTcmix.py (module) Provide glue between MOSOSC and RTcmix score files. * Share a common OSC message format between RTcmix and Python, via Minc struct OSCData. Defined in MOSToolKit/demos/MO...
import os import math from annogesiclib.gff3 import Gff3Parser from annogesiclib.parser_wig import WigParser from annogesiclib.helper import Helper def get_primary_locus_tag(tss): tsss = [] tss_types = tss.attributes["type"].split(",") tss_locus_tags = tss.attributes["associated_gene"].split(",") tss_...
#!/usr/bin/env python3 import json import logging import re import time from datetime import datetime, timedelta, timezone import iso8601 from prometheus_client import parser as prom_parser import pytest from seaworthy.ps import build_process_tree from seaworthy.stream.matchers import OrderedMatcher, RegexMatcher f...
# Saving and Loading Functions # === IMPORT MODULES ============================================= import copy, threading, shutil try: import cPickle as pickle except ImportError: import pickle # Custom imports from . import GlobalConstants as GC from . import configuration as cf from . import static_random fro...
from __future__ import division, print_function import configparser import json import logging import os import sys import threading import time import traceback import Queue import numpy as np import pybursts from probeEnrichInfo import probeEnrichInfo from pprint import PrettyPrinter import gzip import collections f...
""" Helper utilities for using Google Drive """ import functools import io import json import logging import os from pathlib import Path import socket import urllib from urllib.parse import urlencode from urllib.error import HTTPError from apiclient.http import MediaIoBaseDownload from google.auth.transport.requests i...
#!/usr/bin/env python # Possibilities: # 1. Search database on GSEA. Use some sort of gene ID. # A. If provide platform, then use it. # B. Try to guess platform. # C. If Gene Symbol, turn off collapse_dataset. # D. If Gene ID, convert to Gene Symbol (not implemented). # 2. Search own database (w...
import numpy as np import os import re # from PIL import Image import pandas as pd pd.options.mode.chained_assignment = None # import torchvision.transforms as transforms import pickle from collections import OrderedDict, defaultdict from itertools import combinations def onehottify_2d_array(a): """ https://st...