text stringlengths 8.04k 46.5k |
|---|
from os import(
path as os_path,
remove as remove
)
from sys import exit as sys_exit
from tempfile import NamedTemporaryFile
from pandas import (
DataFrame as pd_DataFrame,
read_csv as pd_read_csv
)
import numpy as np
from rdkit import (
Chem,
DataStructs,
RDLogger
)
from rdkit.Chem import A... |
# -*- coding: utf-8 -*-
"""
Created on Sun Nov 26 21:36:08 2017
@author: abalas18
"""
import os
#os.chdir('your project folder')
import pandas as pd
import csv as csv
import glob
import pandas as pd
import matplotlib.pyplot as plt
from datetime import datetime
from datetime import date
from plotly.off... |
import copy
import os
import re
from collections import defaultdict
import marshmallow as ma
import paramtools as pt
import numpy as np
import requests
import taxcalc
from taxcalc.growfactors import GrowFactors
from taxcalc.utils import json_to_dict
class CompatibleDataSchema(ma.Schema):
"""
... |
from statistics import mean
import geopandas
from shapely.geometry import LineString
import numpy as np
import pandas as pd
_MAP_KWARGS = [
"location",
"prefer_canvas",
"no_touch",
"disable_3d",
"png_enabled",
"zoom_control",
"crs",
"zoom_start",
"left",
"top",
"position",
... |
from __future__ import annotations
import asyncio
import bisect
import collections
import contextlib
import dataclasses
import hashlib
import itertools
import logging
import os
import threading
import time
from argparse import ArgumentParser
from concurrent.futures.thread import ThreadPoolExecutor
from contextlib impo... |
"""OpenSCHC Reception Functionality
"""
#---------------------------------------------------------------------------
from base_import import * # used for now for differing modules in py/upy
import schcmsg
from schcbitmap import find_missing_tiles, sort_tile_list, find_missing_tiles_no_all_1, find_missing_tiles_mic_... |
import os, sys, argparse, codecs, getpass
from xml.dom.minidom import parse
from urllib.parse import unquote
from platform import system
from re import search, sub
from tkinter import Tk
from tkinter.filedialog import askopenfilename, askdirectory
##################################################################
## C... |
# coding=utf-8
import json
import os
import itertools
import numpy as np
from plyfile import PlyData, PlyElement
from pyobb.obb import OBB
import sys
import util
import random
import colorsys
from concurrent.futures import ProcessPoolExecutor
from scipy.spatial import ConvexHull
from util import remove_none
MAPPING_JS... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Jul 16 15:41:33 2019
@author: nooteboom
"""
import numpy as np
import matplotlib.pylab as plt
from netCDF4 import Dataset
import matplotlib
import cartopy.crs as ccrs
import seaborn as sns
from cartopy.mpl.gridliner import LONGITUDE_FORMATTER, LATITUDE... |
import os
from copy import copy, deepcopy
import dateutil.parser
import pystac
from pystac import (STACError, STACObjectType)
from pystac.link import Link, LinkType
from pystac.stac_object import STACObject
from pystac.utils import (is_absolute_href, make_absolute_href, make_relative_href, datetime_to_str,
... |
# pyOCD debugger
# Copyright (c) 2015-2020 Arm Limited
# SPDX-License-Identifier: Apache-2.0
#
# 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... |
from __future__ import print_function
from ROOT import TStyle, kWhite, kTRUE
from ROOT import gROOT, gStyle
from ROOT import kGray, kAzure, kMagenta, kOrange, kWhite
from ROOT import kRed, kBlue, kGreen, kPink, kYellow
from ROOT import TLine, TLatex, TColor
from collections import namedtuple, OrderedDict
from math imp... |
""" Utilities for viewing MRI images and interactively identify electrodes
Includes version of OrthoSlicer3D code originally written by:
<NAME>, <NAME>, <NAME>
"""
from __future__ import division, print_function
from time import time
import itertools
from pandas import DataFrame as df
from mpl_toolkits.mplot3d import... |
from __future__ import print_function
from warnings import warn
from functools import partial
from .gff4 import *
from array import array
class LazyStructure(object):
def __init__(self, *args, **kwargs):
self._changed = set()
super(LazyStructure, self).__init__(*args, **kwargs)
de... |
# -*- coding:utf-8 -*-
# Copyright xmuspeech (Author: Snowdar 2019-05-29)
import numpy as np
import torch
import torch.nn.functional as F
from .activation import Nonlinearity
from libs.support.utils import to_device
import libs.support.utils as utils
### There are some basic custom components/layers. ###
## Bas... |
import datetime
import os
import time
from typing import Callable
import gym
import numpy as np
from sacred import Experiment
from sacred.observers import FileStorageObserver, RunObserver
from active_reward_learning.common.constants import LABELS, PLOTS_PATH
from active_reward_learning.envs import (
FirstStateTra... |
import requests
import pandas as pd
import re
import datetime as dt
from bs4 import BeautifulSoup as bs
# comprehend list for years
years = [str(2000 + i) for i in range(5,19)]
this_year = '2019'
# print(years)
# multiple functions for cleaning data
# regex for finding round names
pattern = re.compile("^(Round|Week|S... |
import copy
import unittest
import warnings
import mock
import numpy as np
import pytest
import chainer
from chainer import backend
from chainer.backends import cuda
from chainer import optimizer
from chainer import optimizers
from chainer import serializer
from chainer import testing
from chainer.testing import attr... |
"""Serializers for Indicator objects used on the IPTT (JSON-React App and Excel for downloads)
Labels Serializers (Labels = indicator data for all reports i.e. name/number/filter data):
IPTTJSONIndicatorLabelsSerializer - serializes labels (not report-specific) data for the IPTT (filters/labels)
... |
from bs4 import BeautifulSoup
import requests
import os.path
import re
import pandas as pd
import numpy as np
import csv
import json
from datetime import datetime
from tqdm import tqdm
from collections import defaultdict
from collections import Counter
from IPython.core.display import HTML
import time
import nltk
impor... |
"""NurbsCurve creation functions"""
# TODO: Finish documentation
#############################################
# GLOBAL
#############################################
from functools import wraps
import pymel.core as pm
from pymel.core import datatypes
import json
import maya.mel as mel
import maya.OpenMaya as om
fro... |
"""
The :mod:`~kotti.resources` module contains all the classes for Kotti's
persistence layer, which is based on SQLAlchemy.
Inheritance Diagram
-------------------
.. inheritance-diagram:: kotti.resources
"""
import abc
import datetime
import os
import warnings
from cgi import FieldStorage
from collections.abc impor... |
import platform
from pynput import keyboard
from tkinter import *
from tkinter import messagebox
import getopt
from tkinter import ttk
import time
import json
import os
import threading
import traceback
import win32api
import win32con
import win32gui_struct
import win32gui
_main = None
class SysTrayIcon(object):
... |
from functools import partial
import collections
import keras.layers
import numpy as np
import math
import logging
from .helper import named_apply, adapt_input_conv
from .register import register_model
from .layer import Mlp, DropPath, PatchEmbed
import tensorflow as tf
from tensorflow.keras import layers
import tensor... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Example usage and tests for :mod:`orion.client.experiment`."""
import copy
import os
import signal
import time
from contextlib import contextmanager
from multiprocessing import Process
from threading import Thread
import pytest
from orion.client.runner import LazyWorke... |
"""
This file contains classes, describing functions which set values to fields.
"""
import datetime
from typing import Type, Optional, Any, Tuple, Dict
import django
from copy import copy
from django.core.exceptions import FieldError
from django.db.models import Field, Model
from django.db.models.sql import UpdateQue... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created: Aug 2017
@author: D34D9001@9R0GR4M13
"""
import kerri
import os
import time
import webbrowser
import random
import subprocess
import sys
import urllib
from bs4 import BeautifulSoup as bs
from termcolor import colored
###########
# STALKER #
#########... |
from itertools import combinations
import numpy as np
from sklearn.utils import as_float_array, check_array
from sklearn.utils.validation import check_is_fitted
from sklearn.base import clone
from sklearn.preprocessing import scale
from scipy.sparse import triu, coo_matrix
import joblib
from joblib import Parallel, de... |
# -*- coding: utf-8 -*-
#
# Markov Logic Networks
#
# (C) 2012-2015 by <NAME>
# 2006-2011 by <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
# with... |
from copy import deepcopy
import numpy as np
from .imprt import preset_import
from .log import get_logger
logger = get_logger()
def normalize_uint(arr):
r"""Normalizes the input ``uint`` array such that its ``dtype`` maximum
becomes :math:`1`.
Args:
arr (numpy.ndarray): Input array of type ``ui... |
"""
Copyright (c) 2017 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.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in wri... |
from __future__ import annotations
import os
from graphviz import Digraph
from nltk.corpus import propbank as pb
from nltk.corpus import nombank as nb
import dataclasses as dc
from typing import Optional, List, Tuple, Dict
DICT_MODIFIERS = {
"AM-LOC": "location",
"AM-COM": "companion",
"AM-TMP": "time",
... |
"""
A Lambda function that is triggered by the Control Tower CloudWatch Event 'CreateManagedAccount'.
It automates configuration items that are not included in Control Tower.
The Amazon copyright covers the GuardDuty functions taken from:
https://github.com/aws-samples/amazon-guardduty-multiaccount-scripts
Copyright ... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""overall code framework is adapped from https://github.com/weigq/3d_pose_baseline_pytorch"""
from __future__ import print_function, absolute_import, division
import os
import time
import torch
import torch.nn as nn
import torch.optim
from torch.utils.data import DataLoad... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
The *nussl* External File Zoo (EFZ) is a server that houses all files that are too large to
bundle with *nussl* when distributing it through ``pip`` or Github. These types of files include
audio examples, benchmark files for tests, and trained neural network models.
*n... |
# Author: <NAME> <<EMAIL>> KTH 2018
import gensim
import numpy as np
import tensorflow as tf
from tensorflow.contrib import learn
import pyspark
import json
import operator
from nltk.stem import WordNetLemmatizer
from snorkel import SnorkelSession
from snorkel.learning.gen_learning import GenerativeModel
from scipy.sp... |
'''
Qtui
all callbacks can either be overridden in subclass or
provided in callback dict
*** todo :
really needs way to run background jobs and keep
running self.qapp.processEvents every short while
until bg jobs complete
really, a more general joecceasy wide system should exist fo... |
# -*- coding: utf-8 -*-
"""
The a module sets up three objects from class functions.
- input_data() establishes where data is loaded from.
- configuration() establishes various configuration variables used in the rest of the code.
- output_data() establishes where data is written to.
These are intended to be chang... |
"""
This hopes to recreate the functionality of the ACRG repo function
footprints_data_merge
"""
from pandas import Timestamp
from xarray import Dataset, DataArray
from typing import List, Optional, Tuple, Union, Dict, Any
from openghg.dataobjects import FootprintData
# from openghg.dataobjects import FluxData
__all... |
# ============================================================================
#
# Copyright (C) 2007-2016 Conceptive Engineering bvba.
# www.conceptive.be / <EMAIL>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
... |
import csv
import datetime as dt
import io
import json
from itertools import chain
from operator import attrgetter
from api.renderers import stream_csv
from api.views import (ProjectSerializer, TimecardList, UserDataSerializer,
get_timecardobjects)
from django.conf import settings
from django.co... |
import math
import matplotlib.pyplot as plt
import numpy as np
import pytest
from kneed.data_generator import DataGenerator as dg
from kneed.knee_locator import KneeLocator
from kneed.shape_detector import find_shape
@pytest.mark.parametrize("interp_method", ["interp1d", "polynomial"])
def test_figure2(interp_method)... |
# -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making BK-BASE 蓝鲸基础平台 available.
Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
BK-BASE 蓝鲸基础平台 is licensed under the MIT License.
License for BK-BASE 蓝鲸基础平台:
---------------------------------------------... |
import copy
import itertools
import multiprocessing
import string
import traceback
import warnings
from multiprocessing import Pool
from operator import itemgetter
import jellyfish as jf
import numpy as np
import pandas as pd
from scipy.optimize import linear_sum_assignment
from scipy.stats import wasserstein_distance... |
import os
import sys
import re
import json
import traceback
import pathlib
from typing import Dict, Optional
from asyncio import sleep
import yaml
import requests
import aiofiles
import git # type: ignore[import]
from logzero import logger # type: ignore[import]
from discord import errors, File, Message, Embed, Te... |
import json
import sys
import time
import webbrowser
import uuid
import subprocess as sub
from win32api import GetSystemMetrics
import pyautogui
import requests
import game
import utils
import constants
class Bot:
miniclipURL = "https://www.miniclip.com/games/8-ball-pool-multiplayer/en/focus/"
def __init__... |
"""
Work to make a catcher for EDDN monitoring.
Will have the following parts:
- Connect and monitor eddn messages.
- Pick out messages we want and parse them
- Update relevant bits of EDDB database.
"""
import argparse
import datetime
import logging
import os
import pprint
import shutil
import sys
import t... |
#!/usr/bin/env python3
# broker3.py
# Herewith a truly ridiculous number of imports.
import os
import re
import time
import json
from NewTraceFac import NTRC,ntrace,ntracef
import sys
from catchex import catchex
import searchspace
import searchdatabasemongo
import util
import brokercli
i... |
'''
brt.py
Created by <NAME>
<EMAIL>
version 1.1 -- 7.15.2017
Buffalo Ray Trace (BRT) is an interactive GUI for plotting image
predictions for a lens model. BRT is written in Python, utilizing the
tkinter GUI library, the matplotlib plotting library, the astropy
library of tools for astrophysical data analysis. All a... |
# pylint: disable-msg=line-too-long
from typing import Any, Callable, Dict, Iterable, List, Optional, TypeVar, Union
from warnings import warn
import copy
import os
__all__ = [
"Step",
"Configuration",
"set_project_root",
"get_project_root"
]
class Step:
"""
An instance of this class defines... |
# Author: <NAME>, <EMAIL>
import numpy as np
import pandas as pd
import random
import math
import matplotlib.pyplot as plt
dataset = pd.read_csv('housing3.csv')
Y, X = dataset.Class, dataset.iloc[:, 0:13]
col_names = list(dataset.columns)
unique_class = list(Y.unique())
data_values, class_values = X.values, Y.values
... |
# execute essa linha de código para importar as funções do 'plot_helper'
import numpy
from numpy.linalg import inv, eig
from math import ceil
from matplotlib import pyplot, ticker, get_backend, rc
from mpl_toolkits.mplot3d import Axes3D
from itertools import cycle
# interactive backends
_int_backends = ['GTK3Agg', 'G... |
#/***********************************************************************
# * Licensed Materials - Property of IBM
# *
# * IBM SPSS Products: Statistics Common
# *
# * (C) Copyright IBM Corp. 1989, 2020
# *
# * US Government Users Restricted Rights - Use, duplication or disclosure
# * restricted by GSA ADP Schedule Co... |
import math
import random
import operator
import sys
import numpy as np
from codes.e_utils.experience import ExperienceSource, ExperienceSourceFirstLast
from codes.e_utils.experience_single import ExperienceSourceSingleEnvFirstLast
class TrajectoryBuffer:
def __init__(self, experience_source):
self.expe... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import glob
import h5py
import pickle
import ruamel.yaml as yaml
import numpy as np
import random # np.random.choice doesn't like a list of tuples.
from scipy.spatial.transform import Rotation
from torch.utils.data import Dataset
from sklearn.neighbors... |
#!/usr/bin/env python
"""
Generates an I2C init module for an Si5341 PLL chip
"""
import argparse
from jinja2 import Template
def main():
parser = argparse.ArgumentParser(description=__doc__.strip())
parser.add_argument('-r', '--regs', type=str, help="register list")
parser.add_argument('-n', '--name', ... |
from datetime import datetime, timedelta
import logging
from django.core.urlresolvers import reverse
from django.http import Http404
from django.utils import html
from django.utils.safestring import mark_safe
import pytz
from corehq import Domain
from corehq.apps import reports
from corehq.apps.app_manager.models impor... |
# Required imported python libraries
# Python default libraries, no need to install
import os
import datetime
import sys
import logging
import argparse
# This tool originally used vtools (written by <NAME> CADWR)
# to read *.dss data, but vtools required Py2.7
# This tool now uses pyhecdss which is a tool writ... |
# basics
from typing import List, Sequence, Tuple, DefaultDict, Dict, Union
import functools
from itertools import chain, repeat
import numpy as np
from numpy.lib.arraysetops import isin
import pandas as pd
# pytorch
import torch
from torch import Tensor
import torch.nn as nn
import torch.nn.functional as F
# netwo... |
# STEP 1.1
# Import many helpful packages that we will use
import math, random, time, copy, multiprocessing, itertools, sys, PIL
import networkx as nx
import matplotlib.pyplot as plt
import IPython, io, os
import numpy as np
from urllib.request import urlopen
from io import BytesIO
# STEP 1.2
# Colab does not have a... |
import matplotlib.pyplot as plt
# plotting
from vivarium.plots.simulation_output import plot_variables
from vivarium.plots.agents_multigen import plot_agents_multigen
from vivarium_multibody.plots.snapshots import format_snapshot_data, plot_snapshots, plot_tags
import copy
def plot_single(
output,
var... |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
from os.path import join, basename, exists
import six
import numpy as np
import utool as ut
print, rrr, profile = ut.inject2(__name__)
@six.add_metaclass(ut.ReloadingMetaclass)
class DataSet(ut.NiceRepr):
"... |
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
# ... |
from __future__ import division, absolute_import, print_function
__copyright__ = "Copyright (C) 2016 <NAME>"
__license__ = """
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,... |
# SPDX-License-Identifier: MIT
from __future__ import annotations
import shelve
from cmd import Cmd
from collections import Counter
from enum import Enum
from itertools import chain, islice
from pathlib import Path
from textwrap import dedent
from typing import Callable, Iterable, cast, Any, Sequence, TYPE_CHECKING
i... |
from __future__ import print_function
import argparse
import glob
import os
from datetime import datetime
from os import path
import numpy as np
import pandas as pd
import scipy.io as sio
from h5py import File
from nwbext_ecog import CorticalSurfaces, ECoGSubject
from pynwb import NWBFile, TimeSeries, get_manager, NW... |
import collections
import datetime
import types
import unittest
from io import BytesIO
from ebmlite.core import loadSchema, parseSchema, BinaryElement, DateElement, \
Element, FloatElement, IntegerElement, MasterElement, StringElement, \
UIntegerElement, UnicodeElement, VoidElement, UnknownElement
class test... |
# Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd
"""FLT task to be manually triggered to convert launch issues."""
from __future__ import print_... |
from z3.z3 import Distinct
from .esilclasses import *
import z3
import sys
import random
import time
import socket
import os
from struct import pack, unpack
import logging
logger = logging.getLogger("esilsolve")
def puts(state, addr):
addr = state.evaluate(addr).as_long()
length, last = state.mem_search(addr... |
import argparse
import numpy as np
import os
import pprint
import yaml
# HACK: Get logger to print to stdout
import sys
sys.ps1 = '>>> ' # Make it "interactive"
import tensorflow as tf
from multiprocessing import Queue
from lib.config import cfg_from_file, cfg_from_list, cfg
from lib.data_process import make_data_p... |
import ast
import os
import re
from abc import abstractmethod
from ast import _splitlines_no_ff as splitlines
from collections import Counter
from contextlib import contextmanager
from contextvars import ContextVar
from dataclasses import dataclass, field, replace as dc_replace
from types import CodeType, ModuleType
fr... |
# -*- coding: utf-8 -*-
# Copyright 2019 ICON Foundation
#
# 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 ... |
import scipy.sparse as sp
from scipy.sparse import linalg
import numpy as np
import torch
import torch.nn as nn
from logging import getLogger
from libcity.model.abstract_traffic_state_model import AbstractTrafficStateModel
from libcity.model import loss
def calculate_normalized_laplacian(adj):
"""
L = D^-1/2 ... |
"""
N phase calculation engine
(c) <NAME>, 2018
"""
import numpy as np
from scipy.sparse.linalg import spsolve
from scipy.sparse import csc_matrix, hstack, vstack
from scipy.sparse.linalg import factorized
from scipy.sparse.linalg import splu
def gauss_seidel_power_flow(Vbus, Sbus, Ibus, Ybus,
... |
import itertools
import pickle
import random
from collections import deque
from copy import copy
from math import comb as binomial
from pathlib import Path
from synbio.utils import (
aminoacids, kdHydrophobicity, rNTPs, rna_basepairing, triplet_rna_codons,
)
# define scope of package
__all__ = [
# definitions... |
"""
Preprocess videos from the "Gonzalo's dataset" for learning NeRF-like 3D portraits.
1. В калиброванных timestamp'ах кадров ищем два соседних со вспышкой по её timestamp'у и выкидываем их.
2. Выкидываем первые 40%.
3. Выкидываем кадры, где OpenCV не нашёл открытых глаз.
4. Равномерно выкидываем кадры так, чтобы ост... |
'''
This is just meant to create a csv with the data for the final LSTM model. The data used
will be based around specific item categories and state in the final model. Due to how much
time this takes each time the LSTM model runs, this is now being done in a separate file (this one)
and the csv will be used in the... |
from matplotlib.colors import ListedColormap,LogNorm
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
import cmasher as cma
import pandas as pd
from matplotlib.ticker import LogLocator,AutoLocator,AutoMinorLocator,MaxNLocator
from .sampler import to_time_series, TigressWindSampler
discrete_cm... |
import concurrent.futures
import datetime
import hashlib
import mimetypes
import re
from dataclasses import dataclass
from functools import cached_property
from itertools import chain
from pathlib import Path
import boto3
import click
from boto3.s3.transfer import S3TransferConfig
from dateutil.tz import UTC
from .co... |
# File: prepare/views.py
from datetime import date
from django.core.exceptions import ValidationError
from django.db.models.lookups import BuiltinLookup
from django import forms
from django.http import HttpRequest, HttpResponse, HttpResponseRedirect, request, response
from django.shortcuts import render
from djan... |
# Copyright 2021 <NAME>
#
# 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,... |
# Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... |
# Pythn 2/3 compatibility
from __future__ import print_function
import sys
if sys.version_info[0]!=2:
from importlib import reload
import numpy as np
import os
import re
from time import time
import dispatch_data as dd
reload(dd)
def dispatch_utils():
'''
Main methods: patches, cache
patches() ... |
import numpy as np
from scipy.fftpack import fft, ifft, fftshift
__all__ = ['cwt', 'ccwt', 'icwt', 'SDG', 'Morlet']
class MotherWavelet(object):
"""Class for MotherWavelets.
Contains methods related to mother wavelets. Also used to ensure that new
mother wavelet objects contain the minimum requirements ... |
# /mpcutilities/mpcutilities/classes.py
"""
--------------------------------------------------------------
Oct 2018
Payne
Intended classes.py to contain classes used by;
(i) functions in mpcutilities
(ii) functions used across a broad range of MPC-packages
[when they have no obvious better home-package... |
import collections
import logging
import os
import pathlib
import re
import string
import sys
import time
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
import numpy as np
import matplotlib.pyplot as plt
from tensorflow_text.tools.wordpiece_vocab import bert_vocab_from_dataset as bert_vocab
import tensorflow_dat... |
import sys, time, string, os, yaml, datetime, socket
from functools import partial
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtWidgets import QMainWindow
sys.path.append("Client")
import client
with open("config.yml", 'r') as cfg: # open config to populate certain areas of the GUI
config = yaml.load(cf... |
"""AUTOMATIC ASSESSMENT OF FACILITY LAYOUTS
1. Create a target graph that models the specifications
of a plant layout.
2. Launch AutoCAD (if necessary).
3. Open a layout drawing in .dwg format.
3. Automatically convert the layout into a graph.
4. Simplify the resulting graph.
5. Check that the layout is compliant w... |
#! /usr/bin/env python
"""
Version: 1.0.0 (Jan 10, 2019)
Author: <NAME> - <EMAIL>
"""
import os
import sqlite3
import argparse
import random
import numpy as np
import re
from multiprocessing import Pool , cpu_count
from toolbox import tools, downloader, crawler , alphabet, transformer
def create_query():
# s... |
# encoding: utf-8
"""Test suite of the french morphology rules."""
import pytest
from ..morphology.fr import FrenchMorphologyRules
from ..spec.phrase import PhraseElement
from ..spec.string import StringElement
from ..lexicon.feature.category import ADJECTIVE, VERB_PHRASE, NOUN_PHRASE, VERB
from ..lexicon.feature.le... |
#! /usr/bin/env python3
import collections
import copy
import csv
import json
import logging
import os
import pathlib
import shlex
import shutil
import subprocess
import sys
import uuid
import par_upload
import validate
import nanopore
cfg = None
logging.basicConfig(
level=logging.DEBUG,
format="%(asctime)s.... |
# Copyright (c) 2016-2020, <NAME>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and the... |
# worker.py
#
# Hawkeye worker thread for analyzing and transcoding videos.
#
# Copyright 2019 <NAME> (<EMAIL>)
import os
import sys
import io
import time
import subprocess
import platform
import json
from math import gcd
from PySide2.QtCore import QObject, QThread, Signal, Slot
from hawkeye.tracker import VideoScan... |
#!/usr/bin/env python3
import argparse
import datetime
import gzip
import multiprocessing
import os
import subprocess
import sys
import tarfile
import urllib.request
import about
import check
import shared
import tax
def parse_arguments():
date = str(datetime.datetime.now().date())
parser = argparse.Ar... |
from itertools import product
from sys import maxsize
from time import time
from typing import List
import Bio.Seq as Seq
import Bio.SeqUtils as SeqUtil
import Bio.SeqUtils.MeltingTemp as Tm
import numpy as np
import pandas as pd
from dill import dump
from sklearn.preprocessing import OneHotEncoder, LabelEncoder
from... |
#!/usr/bin/env python
# coding: utf8
#
# Copyright (c) 2020 Centre National d'Etudes Spatiales (CNES).
#
# This file is part of CARS
# (see https://github.com/CNES/cars).
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obta... |
import math
import torch
import torch.nn as nn
import torch.nn.functional as F
class deeplabv3plus(nn.Module):
def __init__(self, n_classes=21):
super(deeplabv3plus, self).__init__()
# Atrous Conv
self.xception_features = Xception()
# ASPP
rates = [1, 6, 12, 18]
... |
# Graph ensemble for AMR
from random import shuffle
import argparse
import penman
from amrlib.evaluate.smatch_enhanced import compute_smatch
from ensemble.utils import match_pair, align, get_entries
import re
from penman.model import Model
import time
import warnings
model = Model()
warnings.filterwarnings("ignore")... |
import matplotlib.pyplot as plt
from pathlib import Path
import pandas as pd
import os
import numpy as np
def get_file_paths(file_directory):
file_paths = os.listdir(file_directory)
file_paths = list(filter(lambda f_path: os.path.isdir(file_directory / f_path), file_paths))
return file_paths
def plot_da... |
#! /usr/bin/env python
#<NAME>
#<EMAIL>
import argparse
import os
import sys
import errno
import shutil
import subprocess
import itertools
import re
import pyparanoid.pyparanoid as pp
import multiprocessing as mp
from Bio import SeqIO
def parse_args():
parser = argparse.ArgumentParser(description='''
Master script f... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.