text stringlengths 8.04k 46.5k |
|---|
#!/usr/bin/python
# 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... |
#!/usr/bin/env python3
import imageio
import numpy as np
from scanf import scanf
import time
import os.path
#from readimg import sbf, plifimg
from camview.winspec import SpeFile
class imformat:
"""Function skeleton for image reader class
"""
def __init__(self, filename):
"""[summary]
Args:... |
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
from torch.autograd.function import InplaceFunction
from torch.autograd import Function
from itertools import repeat
import numpy as np
import shutil, os
from typing import List, Tuple
from scipy.stats import t as stu... |
"""PyTorch compatible samplers.
These determine the order of iteration through a dataset.
Authors:
* <NAME> 2020
* <NAME> 2020
* <NAME> 2020
* <NAME> 2021
"""
import torch
import logging
from operator import itemgetter
from torch.utils.data import (
RandomSampler,
WeightedRandomSampler,
Distribute... |
from pypy.rpython.lltypesystem import rffi, lltype
from pypy.interpreter.error import OperationError
from pypy.interpreter.baseobjspace import W_Root, ObjSpace, Wrappable
from pypy.interpreter.typedef import TypeDef
from pypy.interpreter.gateway import interp2app
from pypy.rpython.tool import rffi_platform
from pypy.tr... |
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright 2019.12.19 <NAME>
# Distributed under terms of the MIT license.
"""
the effective functions for SHS4py
Available Class:
PlumedDatClass : CLass structure of Plumed infomation (plumed.dat)
Available functions:
TARGZandexit: tar and ... |
from django.shortcuts import render, redirect, get_object_or_404
from django.http import HttpResponse
from django.contrib.auth.decorators import login_required
from django.contrib.auth import login, logout, authenticate
from .models import InPut, User, Balance, OutPut, Status, Currency, Subscriber
from django.http... |
import datasets
from transformers import AutoModelForMaskedLM, AutoTokenizer
from transformers import RobertaTokenizer, RobertaForMaskedLM
import torch
import sys, random, os
from math import ceil
DEBUG = 1
#Do not repeat this RUN_ID. Every time you run, use a new one. Also, use different ranges so that we don't ove... |
#!/usr/bin/env python3
"""Exploratory Data Analysis Module for Alzheimer's Capstone 1.
This module contains functions used for Data Storytelling.
The functions within wrangle and format data for visualizations.
Inputs for these functions can be obtained using adnidatawrangling module.
Required modules for all function... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
This module is part of the opsi PackageBuilder
see: https://forum.opsi.org/viewforum.php?f=22
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
... |
# This file is part of the Printrun suite.
#
# Printrun is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Printrun is distributed in ... |
"""
Google_images_download_async main module.
"""
# Builtin imports:
import asyncio
import json
import os
import time
from datetime import datetime
from pathlib import Path
from urllib.parse import unquote, quote
import math
import re
# Third party imports:
from selenium import webdriver
from selenium.common.exceptio... |
#\ save the file to csv
#\ reference:
# https://stackoverflow.com/questions/28162358/append-a-header-for-csv-file
# https://stackoverflow.com/questions/50701023/insert-new-line-in-csv-at-second-row-via-python
# http://zetcode.com/python/csv/
# https://blog.csdn.net/chuatony/article/details/71436582
# https://www.itread... |
# -*- coding: utf8 -*-
# Standard library imports
from itertools import chain
from math import pi
# PyPI library imports
import numpy as np
# Local library imports
from dmppl.base import dbg, info, verb, rdTxt, joinP, utf8NameToHtml
from dmppl.math import ptShift, ptsMkPolygon, subsample, downsample, l2Norm
from dm... |
""" harvesterCore
dent earl, dearl (a) soe ucsc edu
March 2012
Functions shared between the web and stand-alone versions
of Structure Harvester.
http://www.structureharvester.com/
https://github.com/dentearl/structureHarvester/
http://taylor0.biology.ucla.edu/structureHarvester/
http://users.soe.ucsc.edu/~dearl/softw... |
# Copyright 2009-2012 Yelp and Contributors
# Copyright 2013 <NAME>
# Copyright 2014-2016 Yelp and Contributors
# Copyright 2017-2018 Yelp
# Copyright 2019 Yelp
#
# 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 ... |
from __future__ import division
from __future__ import print_function
import time
import argparse
import pickle
import os
import datetime
import torch.optim as optim
from torch.optim import lr_scheduler
from utils import *
from modules_clevrer import *
from clevrer.clevrer_dataset_v2 import load_obj_track, get_one_h... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# system.py
# SciML-Bench
# Copyright © 2021 Scientific Machine Learning Research Group
# Scientific Computing Department, Rutherford Appleton Laboratory
# Science and Technology Facilities Council, UK.
# All rights reserved.
"""
System info and monitoring
"""
import... |
import os
import re
from collections import Mapping
class JsonSyntaxError(Exception):
pass
class JsonObjectRemovalFailed(Exception):
pass
class JsonNotLoaded(Exception):
pass
class InvalidJson(Exception):
pass
class JsonToken:
NONE = 0
OBJ_OPEN = 1
OBJ_CLOSE = 2
ARR_OPEN = 3
... |
## Copyright (c) <NAME>, <NAME>. All rights reserved.
## See LICENSE file for details.
## This software is distributed WITHOUT ANY WARRANTY; without even
## the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
## PURPOSE. See the above copyright notices for more information.
from ... |
# The MIT License
#
# Copyright (c) 2010 <NAME>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, p... |
import io
import json
import time
import jsonfield
import os
import threading
import uuid
from celery.contrib.abortable import AbortableAsyncResult
from django_celery_beat.models import CrontabSchedule, PeriodicTask
from jsonfield.encoder import JSONEncoder as JsonfieldJSONEncoder
from django.conf import settings
fr... |
#!/usr/bin/env python
"""Run a Gene Ontology Enrichment Analysis (GOEA), plots, etc.
Nature 2014_0126;
Computational analysis of cell-to-cell heterogeneity
in single-cell RNA-sequencing data reveals hidden
subpopulations of cells
http://www.nature.com/nbt/journal/v33/n2/full/nbt.3102.html#metho... |
# -*- coding: utf-8 -*-
"""
(C) 2015 <NAME>
Calculate the near-field of a grating-based metasurface lens
"""
from __future__ import division, print_function
import math
from math import pi
degree = pi / 180
import numpy as np
#http://pythonhosted.org/numericalunits/
import numericalunits as nu
from numericalunits imp... |
from __future__ import print_function
import os.path as osp
from torch_geometric.datasets import Planetoid
import torch_geometric.transforms as T
#from torch_geometric.nn import GCNConv, ChebConv # noqa
import argparse
import torch
import torch.nn.functional as F
import torch.optim as optim
import numpy as np
from lo... |
''' show_hsrp.py
NXOS parsers for show commands:
* 'show hsrp summary'
* 'show hsrp all'
* 'show hsrp delay'
'''
# Python
import re
# Metaparser
from genie.metaparser import MetaParser
from genie.metaparser.util.schemaengine import Schema, Any, Or, Optional
# ==============================
# Schema for... |
from utils.pointconv_util import knn_point
import numpy as np
import torch
from time import time
import h5py
import os
import matplotlib.pyplot as plt
from scipy.spatial import KDTree as kdtree
from mpl_toolkits.mplot3d import Axes3D
eps = 1e-10
def svd_points(data, normal):
B, N, K, C = data.shape
data = d... |
import numpy as np
import random
import sys
import pickle
import sys
import math
import gc
import os
import warnings
import pandas as pd
sys.path.append("..")
warnings.filterwarnings("ignore")
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.utils.data as Data
from torch_optimizer impor... |
'''
The module used to execute states in salt. A state is unlike a module execution
in that instead of just executing a command it ensure that a certain state is
present on the system.
The data sent to the state calls is as follows:
{ 'state': '<state module name>',
'fun': '<state function name>',
'nam... |
#!/usr/bin/env python
"""Functions covering the user interaction with the GUI."""
from __future__ import division, print_function
import os
import numpy as np
import matplotlib.pyplot as plt
import segmentator.config as cfg
from segmentator.utils import map_2D_hist_to_ima
from nibabel import save, Nifti1Image
from sci... |
from .. import util
import h5py
import numpy as np
import limepy as lp
from astropy import units as u
from ssptools import evolve_mf_3 as emf3
import fnmatch
import logging
__all__ = ['DEFAULT_INITIALS', 'Model', 'Observations']
# TODO maybe change the name of this to like DEFAULT_THETA
# The order of this is imp... |
import os
from datetime import datetime
import pandas
import numpy
import numbers
import re
import warnings
from ._dataset import Dataset
from ..enumerations import VariableType, AssayRole, SampleType
from ..utilities._nmr import qcCheckBaseline, qcCheckSolventPeak
from plotly.offline import iplot
class NMRDataset(D... |
import tempfile
from project.preprocessing.get_input import ProcessInput
import os, subprocess
import re, logging
from pathlib import Path
from langdetect import detect
import enchant, spacy, json
from collections import Counter
from timeit import default_timer as timer
from langdetect import DetectorFactory
DetectorF... |
"""
This module contains utils for the Starling framework.
"""
import os
import subprocess
import logging
import json
import geopandas
import pandas as pd
import numpy as np
import gtfs_kit as gt
import osmnx as ox
import gzip
import shutil
import copy
from shapely.geometry import Polygon, LineString
from numbers impo... |
#!/usr/bin/env python3
# Sneakernet/users.py
"""
if no my_feed.json exists:
create? n -> exit
create
if no log dir exists:
create dir
if no log file 0 exists:
create pcap file
read pcap file
if unequal to feedID:
abort
if 'display_name' option:
ask for name
append about event
... |
# ----------------------------------------------#
# hqs.bot © #
# by phillip.hqs ∫ Thanks to alphaSnosh #
# ----------------------------------------------#
from discord.ext import commands
from library.icons import links
from library.cog_text import about_text as wm
from libr... |
from isaacgym import gymapi
from isaacgym import gymutil
from isaacgym import gymtorch
from isaacgym.torch_utils import *
from tasks.dual_franka import *
import argparse
import configparser
from omegaconf import DictConfig, OmegaConf
from hydra.utils import to_absolute_path
from isaacgymenvs.utils.reformat import ome... |
import dask
import dask.array as da
import numpy as np
import pytest
from dask.array import from_array
from numpy_groupies.aggregate_numpy import aggregate
from dask_groupby.core import (
_get_optimal_chunks_for_groups,
find_group_cohorts,
groupby_reduce,
rechunk_for_cohorts,
reindex_,
)
from . im... |
# fhttp - An application which is capable of exploiting techniques such as ARP cache poisoning,
# and which uses the positions acquired by exploiting these vulnerabilities for things such as stealing insecure cookies
# <NAME> & <NAME>
# MIT license
import os
import re
import socket
import tkFont as tkfont
import tkMes... |
import os
import xml.etree.ElementTree as ElementTree
from collections import OrderedDict
from decimal import Decimal
from nifpga import DataType
from numbers import Number
from warnings import warn
import ctypes
class Bitfile(object):
""" Class that represents the contents of the .lvbitx file.
Bitfile is a ... |
# Copyright (C) 2018-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
import math
import hpopt
import os
import glob
import json
from statistics import median
import time
from enum import IntEnum
import logging
from typing import Optional, Union, List, Dict, Any
import numpy as np
import torch
from torc... |
# set operations: intersection : A & B \equiv A \cap B
import dolfin
import sys
from utils import ColorPrint
from ufl import sqrt, inner, dot, conditional, derivative, ge, le
import os
# from slepc_eigensolver import EigenSolver
from slepc4py import SLEPc
import ufl
from functools import reduce
import numpy as... |
import demistomock as demisto
from CommonServerPython import *
import json
import requests
import traceback
import dateparser
from datetime import timedelta
from typing import Any, Dict, Tuple, List, Optional, Set
# Disable insecure warnings
requests.packages.urllib3.disable_warnings()
''' CONSTANTS '''
MAX_INCIDEN... |
import numpy as np
import pandas as pd
import datetime
import cv2
import json
import itertools as it
import tensorflow as tf
from tensorflow.keras import layers, models
from tensorflow.keras import backend as kb
from tensorflow.keras import preprocessing
from tensorflow.keras import regularizers
from tensorflow.keras i... |
import numpy as np
import matplotlib.pyplot as plt
import multiprocessing
import warnings
from functools import partial
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
import pyqtgraph as pg
from supra.Utils.pso import pso
from supra.GUI.Tools.Theme import theme
from supra.GUI.Tools... |
from __init__ import *
from utils import *
import plots
def censi(dataset, sequence, scan_ref, scan_in):
base_path = os.path.join(Param.results_path, sequence, str(scan_ref))
pose_path = os.path.join(base_path, "T_censi.txt")
cov_path = os.path.join(base_path, "cov_censi.txt")
if not Param.b_cov_icp a... |
from langpractice.experience import DataCollector
from langpractice.models import * # SimpleCNN, SimpleLSTM
from langpractice.recorders import Recorder
from langpractice.utils.save_io import load_checkpoint
from langpractice.utils.utils import try_key, get_loss_and_accs
from langpractice.utils.training import get_resum... |
#!/usr/bin/env python
"""
load_MITBIH.py
Download .csv files and annotations from:
kaggle.com/mondejar/mitbih-database
VARPA, University of Coruna
<NAME>, <NAME>.
23 Oct 2017
"""
import os
import csv
import gc
import cPickle as pickle
import numpy as np
import matplotlib.pyplot as plt
from scipy.signal import ... |
#!/usr/bin/python
#
# * This library is free software; you can redistribute it and/or
# * modify it under the terms of the GNU Lesser General Public
# * License as published by the Free Software Foundation; either
# * version 2.1 of the License, or (at your option) any later version.
# *
# * This library is distributed... |
"""Proximal Policy Optimization (clip objective)."""
from copy import deepcopy
import torch
import torch.optim as optim
from torch.utils.data.sampler import BatchSampler, SubsetRandomSampler
from torch.distributions import kl_divergence
from torch.nn.utils.rnn import pad_sequence
import time
import numpy as np
impo... |
# Copyright 2019 HUAWEI, 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 ap... |
import typing
import sys
import os
from decimal import Decimal
import subprocess
from pprint import pprint
from threading import RLock, Thread, Condition
from utils import better_repr, is_git_dir, time_stamp
import better_exchook
import time
class BuyItem:
def __init__(self, intern_name, shown_name, price):
... |
from scipy.spatial import Delaunay
import numpy as np
import random
import itertools
import csv
import math
from scipy.optimize import curve_fit
from sklearn.gaussian_process import GaussianProcessRegressor
from sklearn.gaussian_process.kernels import RBF, ConstantKernel as C
from sklearn.linear_model import LinearReg... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Generating T-trees from dialogue acts.
Usage: ./tgen.py <action> <argument1 ...>
Actions:
candgen_train -- train candidate generator (probability distributions)
- arguments: [-l] [-n] [-p prune_threshold] [-c <lemma|node>:limit] [-s] train-das train-ttrees outp... |
#!/usr/bin/env python3
#
# Copyright (c) 2016-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
... |
"""Galaxy luminosity functions (Schechter functions).
The `LFHistory` class implements a luminosity function history,
encapsulating the changes in the galaxy luminosity distribution
parameters as a function of redshift.
"""
from __future__ import absolute_import, division, print_function
import os
import optparse
... |
from dummy import Hyper, Param, Var, Runtime, Input, Output, Inline
#### Parameters to the model (changes in this block should not require
#### any changes in the actual model)
inputNum = Hyper()
inputStackSize = Hyper()
prefixLength = Hyper()
lambdaLength = Hyper()
suffixLength = Hyper()
extraRegisterNum = Hyper()
#... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
__author__ = 'Justin'
__mtime__ = '2019-07-31'
"""
import datetime
import os
import random
import numpy as np
import torch
import torch.nn as nn
import torch.utils.data as Data
from modelsummary import summary
from scipy.interpolate import griddata
from scipy.sparse i... |
'''
MIT License
Copyright 2019 Oak Ridge National Laboratory
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, mer... |
#!/usr/bin/python
# coding:utf-8
# https://github.com/zeusintuivo/SublimeText3-GoogleT
__version__ = "1.0.0"
import sublime
try:
# Python 3 assumption
from urllib.request import urlopen, build_opener, Request
from urllib.parse import urlencode, quote, unquote
except ImportError:
# Python 2 assumption... |
import numpy
import random
import GenerateData as generate
import Plot as plot
import time
### generate data ###
h_inter_arrival = generate.generate(20)
l_inter_arrival = generate.generate(30)
service_time_1 = generate.generate(30)
service_time_2 = generate.generate(30)
if_serve_first = [] # a list of float betwween ... |
from __future__ import print_function
import argparse
import logging
import pprint
import time,re
import numpy as np
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
logger = logging.getLogger()
args = None
p = dict()
def checkrange(x,mini,maxi):
x = float(x)
if x < mini:
ra... |
from collections import OrderedDict
import os.path as osp
from copy import deepcopy
import numpy as np
from scipy.misc import imsave
import torch
import torch.optim as optim
from torch import nn as nn
from torch import autograd
from torch.autograd import Variable
import torch.nn.functional as F
import rlkit.torch.py... |
"""
backup.py
Author: <NAME>
Functionality to copy multiple files from one location to another efficiently.
"""
import os
import shutil
import time
from datetime import datetime
import concurrent.futures
from threading import Lock
import util
import configuration
import log
from observer import observable
# Constant... |
#!/usr/bin/env python
# --------------------------------------------------------------------
# Filename: libgse2.py
# Purpose: Python wrapper for gse_functions of Stefan Stange
# Author: <NAME>
# Email: <EMAIL>
#
# Copyright (C) 2008-2012 <NAME>
# ------------------------------------------------------------------... |
# -*- coding: utf-8 -*-
"""
Created on Tue Apr 23 20:29:36 2019
@author: 李畅
"""
from os import path, listdir, remove, mkdir, rename
import gensim
import numpy as np
from multiprocessing import Pool, Manager
import math
import pickle
import copy
# import io
# import sys
# sys.stdout = io.TextIOWrappe... |
import copy
import json
import importlib
import inspect
import itertools
import re
import os
import sys
from pprint import pprint
from datacatalog.logger import get_logger
from datacatalog.hashable import picklecache, jsoncache
from datacatalog.mongo import db_connection
from datacatalog.identifiers import tacc
from fu... |
import collections
import struct
import os
from fractions import Fraction
import pytest
from . import tools as test_tools
import gmalthgtparser.parser as hgt
@pytest.fixture
def srtm1_hgt_path():
return os.path.join(os.path.dirname(os.path.realpath(__file__)), 'srtm1', 'N00E010.hgt')
@pytest.fixture
def srtm3... |
#############################################################################
#
# Author: <NAME>, <NAME>
#
# Copyright: <NAME> TSRI 2000
#
#############################################################################
#
# $Header: /opt/cvs/python/packages/share1.5/Pmv/deleteCommands.py,v 1.56.2.9 2012/03/14 21:01:06 s... |
import io
import logging
import os
import matplotlib.pyplot as plt
import numpy as np
import tensorflow
import tensorflow as tf
from tensorflow.keras import backend as K
from tensorflow.keras.callbacks import Callback
from tensorflow.keras.callbacks import EarlyStopping, ModelCheckpoint
from tensorflow.keras.callbacks... |
"""
Basic image registration, generally best suited most suited for coherent image
collection. This is based pretty directly on an approach developed at Sandia and
generally referred to by the name "regi".
The relevant matlab code appears to be authored by <NAME>,
Sandia National Laboratories, and modified by <NAME>, ... |
#!/usr/bin/env python3
print('gnomodkit vG1.9 -- https://github.com/Nefaro/gnoll')
print()
import argparse
import hashlib
import json
import os
import shutil
import subprocess
import sys
import urllib.request
import string
BUILD_DIR = 'build'
CACHE_DIR = 'cache'
SDK_DIR = 'sdk'
MODS_DIR = 'Gnoll Mods'
DATA_DIR = 'Da... |
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
import sys
import os
sys.path.append(os.path.dirname(__file__))
import shutil
import time
#import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import skimage
import matplotlib.pyplot as plt
#from torchvision.utils import make_grid
impor... |
""" Usage:
model [--train=TRAIN_FN] [--dev=DEV_FN] --test=TEST_FN [--pretrained=MODEL_DIR] [--load_hyperparams=MODEL_JSON] [--saveto=MODEL_DIR]
"""
import numpy as np
import math
import pandas
import time
from docopt import docopt
from keras.models import Sequential, Model
from keras.layers import Input, Dense, LST... |
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Wed May 10 10:52:22 2017
@author: jakobg
"""
from __future__ import division, print_function
import surveysim.music2.interpolate as interpolate
import surveysim.music2.loadsnap as loadsnap
import numpy as np
import clusterbuster.mathut as math
import clu... |
import io
from abc import abstractmethod
from collections import OrderedDict, namedtuple
import pandas as pd
from interface_meta import quirk_docs, override
from omniduct.duct import Duct
from omniduct.utils.decorators import require_connection
from omniduct.utils.magics import MagicsProvider, process_line_arguments
... |
"""
A module which provides utilities for reading, writing, creating and updating
association tables and shift files.
:author: <NAME>, <NAME>
:version: '0.1 (2008-01-03)'
"""
from __future__ import absolute_import, division, print_function # confidence high
from . import fileutil as fu
from . import wcsutil
import a... |
#!/usr/bin/env python
# encoding=utf-8
'''
Author: zhiyang.zzy
Date: 2020-10-25 11:07:55
Contact: <EMAIL>
FilePath: /dssm/base_model.py
Desc: 基础模型,包含基本功能
'''
# here put the import lib
# here put the import lib
import numpy as np
import os
import tensorflow as tf
import nni
# from tensorflow.python.ops import r... |
import SimpleITK as sitk
import visualization.utilsviz as utilsviz
import math
import os
from os.path import join
import numpy as np
import cv2
from skimage import measure
from scipy.ndimage.morphology import binary_fill_holes
def resampleImage(in_img, new_spacing, interpolator, defaultValue):
''' Resamples the i... |
"""
Custom Firetasks for the DFTTK
"""
import subprocess
import os
import numpy as np
import six
import shlex
from pymatgen import Structure
from custodian.custodian import Custodian
from custodian.vasp.handlers import VaspErrorHandler, AliasingErrorHandler, \
MeshSymmetryErrorHandler, UnconvergedErrorHandler, Pot... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
PPI-based gene-list enrichment tool.
P-value calculation and KEGG enrichment part.
"""
# Author: <NAME> <<EMAIL>>
# BSD-3 License
import os
import sys
import math
import pickle
import warnings
import argparse
import scipy.stats
import numpy as np
import networkx as nx... |
import json
from calendar import monthrange
from datetime import timedelta, date, datetime
from django.conf import settings
from django.db.models import Q
from django.forms import CharField, ChoiceField
from django.http import JsonResponse
from django.shortcuts import get_object_or_404
from django.template import Temp... |
# Copyright 2017 <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 (C) 2020 Johns Hopkins University Applied Physics Laboratory
#
# All Rights Reserved.
# For any other permission, please contact the Legal Office at JHU/APL.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# y... |
#!/usr/bin/env python3
# -*- encoding: UTF-8 -*-
from selenium import webdriver
from selenium.common.exceptions import WebDriverException, NoSuchElementException
from gettext import ngettext
from json.decoder import JSONDecodeError
import os
import sys
import json
import re
import time
import subprocess
import argpar... |
# -*- coding: utf-8 -*-
"""
Python script to assign commodity flows on the road network
Created on Wed March 06 2018
@author: <NAME>
"""
import pandas as pd
import os
import psycopg2
import networkx as nx
import csv
import itertools
import operator
import ast
from sqlalchemy import create_engine
import numpy as np
im... |
from __future__ import unicode_literals
from __future__ import absolute_import, division, print_function
"""
Tests for site module
"""
__author__ = "<NAME> (<EMAIL>)"
__copyright__ = "Copyright 2014, <NAME>"
__license__ = "MIT (http://opensource.org/licenses/MIT)"
import os
import unittest
import json
im... |
# Copyright 2020 MIT Probabilistic Computing Project.
# See LICENSE.txt
import scipy.stats
import sympy
class Distribution():
def __rmul__(self, x):
from .sym_util import sympify_number
try:
x_val = sympify_number(x)
if not 0 < x_val < 1:
raise ValueError('i... |
import mmap
import math
import os
import sys
import os.path, time
import re
## Mecionamos la codificación que usaremos, en el caso de nuestro ejercicio es ASCII
codificacion = 'ASCII'
class SuperBloque:
tamanio_entrada = 64
def __init__(self):
##Intentamos abrir la imagen del sistema de archivos
... |
import os
import json
import io
import logging
import pandas as pd
import xml.dom
import xml.dom.minidom
from shutil import copy2
from enum import Enum
from datetime import datetime
from glob import glob
from collections import Mapping, defaultdict
from operator import itemgetter
from copy import deepcopy
from label_... |
#!/usr/bin/python
#
# Copyright 2016 Canonical Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... |
"""
ice.py
A command-line program for computing approximated potential paths across sea ice charts that caribou could take.
See README.md for usage instructions.
@authors: <NAME>, <NAME>, <NAME>, <NAME>
"""
# noinspection PyUnresolvedReferences
import patch_env
import argparse
import logging
import os
from glob imp... |
from __future__ import print_function
from six.moves import configparser
import numpy as np
import os
import logging
import sys
from collections import OrderedDict
from PyQt4 import QtGui, QtCore
from .colormap import Colormap
from .data import DatFile, Data2D
from .export import ExportWidget
from .linecut import Li... |
# SPDX-License-Identifier: Apache-2.0
"""
An example console application that uses the subarulink package.
For more details about this api, please refer to the documentation at
https://github.com/G-Two/subarulink
"""
import argparse
import asyncio
from datetime import datetime
import json
import logging
import os.pat... |
import pygame as pg
import sys
from random import randint
import time
import os
from collections import deque
# Used to modify the window size, values must be a multiple of 40
screen_width = 600
screen_height = 400
# Controls where the window appears on the screen
os.environ['SDL_VIDEO_WINDOW_POS'] = "%d,%d" % (0, 30... |
import nextcord as discord
from nextcord.ext import tasks, commands
from PIL import Image, ImageFont, ImageDraw, ImageOps, ImageSequence, ImageFilter
import io
from io import BytesIO
import requests
import sys
import random
from random import choice
import asyncio
import time
import pymongo
import pprint
import os
sy... |
# Copyright (C) 2021 Xilinx, Inc
#
# SPDX-License-Identifier: BSD-3-Clause
from enum import Enum
import numpy as np
import json
import os
from pynq import DefaultIP
from pynq.ps import CPU_ARCH, ZU_ARCH
import struct
__author__ = "<NAME>"
__copyright__ = "Copyright 2021, Xilinx"
__email__ = "<EMAIL>"
def _float2int... |
# Copyright (c) 2021 Boston Dynamics, Inc. All rights reserved.
#
# Downloading, reproducing, distributing or otherwise using the SDK Software
# is subject to the terms and conditions of the Boston Dynamics Software
# Development Kit License (20191101-BDSDK-SL).
# Git hub page -- https://github.com/boston-dynamics/spo... |
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
# SJ编程规范
# 命名:
# 1. 见名思意,变量的名字必须准确反映它的含义和内容
# 2. 遵循当前语言的变量命名规则
# 3. 不要对不同使用目的的变量使用同一个变量名
# 4. 同个项目不要使用不同名称表述同个东西
# 5. 函数/方法 使用动词+名词组合,其它使用名词组合
# 设计原则:
# 1. KISS原则: Keep it simple and stupid !
# 2. SOLID原则: S: 单一职责 O: 开闭原则 L: 迪米特... |
import io
import shutil
import unittest
import warnings
from pathlib import Path
import numpy as np
from proMAD import ArrayAnalyse
from helper import hash_file, hash_mem, hash_array
from helper import get_stdout
class TestARY022B(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.aa = Array... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.