text stringlengths 8.04k 46.5k |
|---|
"""
MODULE DOCSTRING TBD
"""
from pathlib import Path
import pandas as pd
import pandas.util.testing as tm
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
import matplotlib.colors as mcolors
import matplotlib.gridspec as gridspec
from IPython.core.display import HTML, display_html
# ... |
from __future__ import print_function
import numpy as np
import numpy.testing as npt
import unittest
import time
import wisdem.floatingse.loading as sP
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from wisdem.commonse import gravity as g
NSECTIONS = 5
NPTS = NSECTIONS+1
def DrawTruss(myt... |
import asyncio
import time
import random
import copy
import youtube_dl
import spotipy
from spotipy.oauth2 import SpotifyClientCredentials
import pafy
import logging
import discord
import bot
from data import data
from data import __secrets
from command_prefix import COMMAND_PREFIX
import verbose.embeds
from modules.vo... |
import datetime
import random
from time import sleep
from time import time
import shortuuid
from sqlalchemy import text
from sqlalchemy import orm
from sqlalchemy.orm import selectinload
from sqlalchemy import insert
from sqlalchemy import delete
from collections import defaultdict
import argparse
import logging
import... |
#!/usr/bin/env python
"""
Written by <NAME> <<EMAIL>>
Copyright (C) 2021 <NAME>
Licensed under the Apache License version 2.0
See http://www.apache.org/licenses/LICENSE-2.0
"""
from __future__ import with_statement
import gzip
import os
import csv
import argparse
import random
import re
from sklearn import linear_m... |
# -*- coding: utf-8; py-indent-offset: 2 -*-
"""
A set of functions to act upon ChemicalEnvironment and ScatteringEnvironment and
produce a single class and vector of features for use with a classifier.
This module relies on a SVM classifier generated by the module within
phenix_dev.ion_identification.nader_ml. See th... |
'''
Brian's logging module.
Preferences
-----------
.. document_brian_prefs:: logging
'''
import atexit
import logging
import logging.handlers
import os
import shutil
import sys
import tempfile
import time
from warnings import warn
import numpy
try:
import scipy
except ImportError:
scipy = None
import sympy
... |
from __future__ import division
import torch
import random
import numpy as np
import numbers
import types
import cv2
import math
import os, sys
import collections
class Compose(object):
"""Composes several video_transforms together.
Args:
transforms (List[Transform]): list of transforms to compose.
... |
# # # # #
# Tool to downscale the CMIP5 data from the PCMDI group.
# # # # #
def shiftgrid(lon0,datain,lonsin,start=True,cyclic=360.0):
import numpy as np
"""
Shift global lat/lon grid east or west.
.. tabularcolumns:: |l|L|
============== ====================================================
Arguments D... |
# coding=utf-8
# Copyright 2020 The Tensor2Tensor 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 applicable... |
from datetime import datetime, timedelta
from tempfile import NamedTemporaryFile
from bs4 import BeautifulSoup
import pyroutelib3
import requests
import zipfile
import json
import math
import csv
import rdp
import io
import os
import re
from .utils import haversine, iter_haversine, time_limit
"""
Random shit that is ... |
# ------------------------------------------------------------------------
# QAHOI
# Copyright (c) 2021 <NAME>. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 [see LICENSE for details]
# ------------------------------------------------------------------------
import numpy as np
import os
import g... |
# -*- coding: utf-8 -*-
"""
Folium
-------
Make beautiful, interactive maps with Python and Leaflet.js
"""
from __future__ import absolute_import
import warnings
import json
from folium.six import text_type, binary_type
from .map import LegacyMap, Icon, Marker, Popup, FitBounds
from .features import (WmsTileLayer,... |
#!/usr/bin/env python
# Copyright (c) 2015, <NAME>, <NAME> and <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, ... |
# encoding: utf-8
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import numpy as np
import os
def set_axes_radius(ax, origin, radius):
ax.set_xlim3d([origin[0] - radius, origin[0] + radius])
ax.set_ylim3d([origin[1] - radius, origin[1] + radius])
ax.set_zlim3d([origin[2] - radius,... |
import tkFileDialog
import urllib
from Tkinter import *
from datetime import datetime
from threading import Thread
from time import sleep
from ttk import Style, Label, OptionMenu, Button
import os, sys
sys.path.append(os.path.join(os.path.dirname(__file__), ".."))
import cv2
import numpy as np
from PIL import Image, ... |
import re
import os
import csv
import math
import json
import string
import librosa
import argparse
import numpy as np
import soundfile as sf
from scipy.io import wavfile
from kaldiio import load_ark
SILENCE = 1
def PackZero(integer, size):
pack = size - len(str(integer))
return "0" * pack + str(integer)
cl... |
from sympy import symbols, Integral, Tuple, Dummy, Basic
from sympy.utilities.iterables import (postorder_traversal, preorder_traversal,
flatten, group, take, subsets, variations, cartes, numbered_symbols,
dict_merge, prefixes, postfixes, sift, topological_sort, rotate_left,
rotate_right, multiset_partition... |
import cv2
import os
import glob
import numpy as np
import pdb
from pathlib import Path
import csv
import threading
import keras
from keras.layers import Input, Dense, Conv2D, MaxPool2D, Flatten, Dropout, Conv2DTranspose, ConvLSTM2D, Activation, BatchNormalization, Bidirectional, TimeDistributed, AveragePooling2D
from ... |
import numpy as np
import tables
import warnings
from scipy import sparse
from flammkuchen import conf
try:
import pandas as pd
pd.io.pytables._tables()
_pandas = True
except ImportError:
_pandas = False
try:
from types import SimpleNamespace
_sns = True
except ImportError:
_sns = False
... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Copyright (c) Contributors to the Open 3D Engine Project.
For complete copyright and license terms please see the LICENSE at the root of this distribution.
SPDX-License-Identifier: Apache-2.0 OR MIT
"""
import sys
import os
sys.path.append("..")
from clr import *
import te... |
import multiprocessing
import re
import sys
import json
import logging
import os
import argparse
import time
import traceback
from getpass import getuser
from celery.signals import worker_ready
from shutil import copyfile
from contextlib import contextmanager
from celery.exceptions import NotRegistered
from firexapp.... |
# -*- coding:utf-8 -*-
#
# Copyright © 2015 The Spyder Development Team
# Copyright © 2014 <NAME> (@goanpeca)
#
# Licensed under the terms of the MIT License
"""
"""
from __future__ import (division, print_function, unicode_literals,
with_statement)
# Standard library imports
import gettext
... |
from __future__ import print_function, division
from six.moves import range
import numpy as np
from matplotlib import pyplot as plt
from matplotlib import animation
import sys
"""
Two equations system
d(rhoe)/dt + d(rhoe*vh)/dx = d(D/Te*d(pe)/dx)/dx
d(rhoe*ee)/dt + d(rhoe*ee*vh)/dx = -pe*d(vh)/dx + d(L*d(Te)/dx + g... |
# Copyright 2019 Yelp
# Copyright 2020 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 of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... |
import pygame, sys, os
from player import Player
from enemy import Enemy
from item import Item
from graphics import Graphics
from pygame.locals import *
import collections
from copy import copy
clock = pygame.time.Clock()
pygame.init() # initiates pygame
FPS = 60
pygame.display.set_caption('Pygame Pla... |
from utils import *
import consts
import logging
import random
from collections import OrderedDict
import cv2
import imageio
from PIL import Image
import torch
import torch.nn as nn
from torch.nn.functional import l1_loss, mse_loss
from torch.nn.functional import binary_cross_entropy_with_logits as bce_w... |
import numpy as np
import scipy.stats
from scipy.special import erfinv
from .base import Prior, PriorException
from bilby.core.utils import logger, infer_args_from_method, get_dict_with_properties
class BaseJointPriorDist(object):
def __init__(self, names, bounds=None):
"""
A class defining Join... |
"""
This module implements a generic SNMP Panoptes plugin that can consume enrichments for a range of device types in order
to poll those same devices.
"""
from past.builtins import basestring
import json
import re
import time
from yahoo_panoptes.framework import metrics
from yahoo_panoptes.framework import exceptions... |
# - * - encoding : utf - 8 - * -
# pylint: disable=fixme, line-too-long
"""
KMeans clustering solver.
:copyright: 2017-2018 H2O.ai, Inc.
:license: Apache License Version 2.0 (see LICENSE for details)
"""
import sys
import numpy as np
from ..solvers.utils import _check_data_content, \
_get_data, _setter
from ..... |
#!/bin/env python3
# Steps requried to use
# install requried libraries
# (root)# dnf install python3-ldap3
#
# Create python virtual environment directory
# (user)$ python3 -m venv ./venv3
#
# Enable virtual environment
# (user)$ source ./venv3/bin/activate
#
# Update pip and then install needed libary
# (user-venv3)... |
"""
MIT License
Copyright (c) 2020-2021 phenom4n4n
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, publis... |
"""
Next version for stentseg-specific graph class and functionality.
Use networkx instead of vispy.util.graph.
In progress. Step 1 and step2 of stentdirect work now.
The functions in this module that strat with "prune" are intended to
do no harm to the graph and it *should* be possible to apply them
recursively and i... |
#!/usr/bin/env python
"""
(Standard) multi-plane peak finder and fitter. This is used for both arbitrary PSF
and 3D-DAOSTORM Gaussian PSF fitting.
This provides sub-classes of the classes in storm_analysis.sa_library.fitting
Peaks are identified using ideas from this paper:
"SNSMIL, a real-time single molecule ident... |
import pyproj
from pyproj import Proj
from tsx.db import T1Survey, T1Sighting, T1Site, T2Survey, T2Sighting, T2Site, Taxon, Source, SourceType, SearchType, Unit, get_session
import tsx.util
import os
import logging
import sys
from datetime import date, datetime
import argparse
from contextlib import contextmanager
impo... |
#!/usr/bin/env python3
"""psh: a simple shell written in Python"""
#imports para los diferentes comandos
import os
import subprocess
import getpass
import shutil
import itertools
import signal
import socket
from datetime import datetime
from subprocess import check_output
#imports para el historial y autocompletado... |
#!/usr/bin/python
# Filename: nr_rrc_analyzer.py
"""
A LTE RRC analyzer.
Author: <NAME>
"""
import xml.etree.ElementTree as ET
from mobile_insight.analyzer.analyzer import *
from mobile_insight.analyzer.protocol_analyzer import *
import timeit
import time
__all__ = ["NrRrcAnalyzer"]
class NrRrcAnalyzer(ProtocolAnaly... |
"""Basic building block torch networks that can be used across a variety of
tasks."""
from typing import (
Sequence,
Dict,
Union,
cast,
List,
Callable,
Optional,
Tuple,
Any,
)
import gym
import numpy as np
import torch
from gym.spaces.dict import Dict as SpaceDict
import torch.nn as... |
# <NAME> and <NAME>
# University of California, Davis
# 2021
#### Import libraries
# import the fuctionality we need to make time stamps to measure performance
import time
import datetime
import platform
import os
import glob
import re
import yaml
### import the Metashape functionality
import Metashape
#### Helper... |
#/usr/bin/python3
import sys
import re
import serial
import binascii
from Cryptodome.Cipher import AES
import json
import signal
import logging
from logging.handlers import RotatingFileHandler
import paho.mqtt.client as mqtt
#
# Trap CTRL+C
#
def signal_handler(sig, frame):
print('Aborted by user with Ctrl+C!')
... |
"""
Created on 05.06.2014
@author: david
"""
import collections
import operator
import os
from collections import defaultdict, OrderedDict
from copy import copy
from random import shuffle
import numpy as np
from pysam import Samfile
from Gene import Gene
# from exceptions import KeyError
from Genome import Genome
fr... |
# -*- coding: utf8 -*-
# ============LICENSE_START====================================================
# org.onap.vvp/validation-scripts
# ===================================================================
# Copyright © 2019 AT&T Intellectual Property. All rights reserved.
# ===========================================... |
#!/usr/bin/python
# Copyright (c) 2012 EMC Corporation
# All Rights Reserved
# This software contains the intellectual property of EMC Corporation
# or is licensed to EMC Corporation from third parties. Use of this
# software and the intellectual property contained therein is expressly
# limited to the terms and con... |
import os
import statistics
import numpy as np
import scipy.spatial, scipy.optimize
import matplotlib
from matplotlib import pyplot as plt
from blockbased_synapseaware.utilities.dataIO import PickleData, ReadAttributePtsFile, ReadMetaData, ReadPickledData, ReadPtsFile
from blockbased_synapseaware.utilities.con... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2018, <NAME> (<EMAIL>)
# 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
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... |
#!/usr/bin/python
# This is a FIG -> Human Readable JSON parser
# Part of the Computer Architecture Simulator
# <NAME>
# Institute for Computer Architecture
# Johannes Kepler University, Linz, Austria
# December 2011
# TODO:
# 2. Do not ignore Pen style.
# 3. Do not ignore Style.
# 4. Use color codes instead of name... |
# standard libraries
import copy
import math
import ctypes
import gettext
import numpy
import threading
import typing
import logging
import os
import json
import time
# local libraries
from nion.utils import Registry
from nion.utils import Geometry
from nion.instrumentation import scan_base
from nion.instrumentation i... |
import numpy as np
import pandas as pd
import sqlite3
import os
import subprocess
from pybedtools import BedTool
from collections import defaultdict
from enum import Enum, auto
class SVTYPE(Enum):
def _generate_next_value_(name, start, count, last_values):
return name
DEL = auto()
DUP = auto()... |
# Copyright 2018 IBM. All Rights Reserved.
# Copyright 2015 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... |
# -*- coding: utf-8 -*-
"""
@Time : 2020/05/06 21:09
@Author : Tianxiaomo,modify by felixfu
@File : dataset.py
@Noice :
@Modificattion : 注释
@Author : FelixFu
@Time : 2020/10/20
@Detail : 添加注释
"""
import os
import random
import cv2
import numpy as np
import tor... |
from typing import *
import codecs
import collections
import glob
from itertools import chain, cycle # chain # DELETE
import math
from onmt.inputters.text_dataset import text_fields, TextMultiField
import os
import torch
import torchtext.data
from torchtext.data import Field, RawField
from torchtext.data.utils import ... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
test_canadapter
----------------------------------
Tests for the canadapter
"""
import collections
import io
import json
import logging
import os.path
import os
import signal
import subprocess
import sys
import time
import unittest
assert sys.version_info >= (3, ... |
# Input would be a protein fasta or both pvac-seq run output final.tsv and input annotated vcf
# python lib/vaccine_design.py test --generate-input-fasta -t tests/test_data/vaccine_design/input_parse_test_input.tsv -v tests/test_data/vaccine_design/input_parse_test_input.vcf ann H-2-Kb -o . -n 25 -l 8
# python lib/vac... |
import os
import sys
import base64
from glob import glob
from shutil import rmtree
from io import BytesIO
import time
from datetime import datetime
#import flask
#from flask import send_file, make_response
#from flask import send_from_directory
from flask_caching import Cache
import dash
import dash_player
import da... |
#!/usr/bin/python
#
# 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... |
from models import TokenDailyStats
from models import Token
import pydash
from pycoingecko import CoinGeckoAPI
from config import project_config
import os
from joblib import Parallel, delayed
from tqdm import tqdm
import numpy as np
import math
from datetime import datetime
from utils.date_util import DateUtil
from uti... |
# logic.py
# --------
# Licensing Information: You are free to use or extend these projects for
# educational purposes provided that (1) you do not distribute or publish
# solutions, (2) you retain this notice, and (3) you provide clear
# attribution to UC Berkeley, including a link to http://ai.berkeley.edu.
#
# Att... |
#!/usr/bin/env python3
import argparse
import base64
import binascii
import dns.query
import dns.tsig
import dns.tsigkeyring
import dns.zone
import fcntl
import logging
import logging.handlers
import os.path
import queue
import re
import select
import signal
import subprocess
import sys
import threading
import time
im... |
# -*- coding: utf-8 -*-
"""
Created on Wed May 26 13:29:02 2021
@author: bjkronenfeld
"""
import math as m
import utils_geom as g
def componentDistance (dr,k,len_a):
"""
Calculates the distance from a location on segment a on polyline A to
a component of polyline B.
Parameters
... |
import random
import re
import math
from dataclasses import dataclass
import numpy as np
import tensorflow as tf
from typing import Callable, Union, List, Any
from pathlib import Path
from warnings import warn
from libs.A3 import A3
from libs.DataHandler import DataLabels, MNIST
from libs.NeuralNet import NeuralNet
... |
import discord
from discord.ext import commands
import random
import pickle
import time
import threading
import asyncio
token='<PASSWORD>'
alive=True
index={} #holds guilds and related objects
#name, hp, ac, sides, times, hit bonus
monster_index=((('Goblin', 9, 10, 4, 1, 0), ('<NAME>', 8, 10, 4, 1, 1),... |
# -*- coding: utf-8 -*-
# ----------------------------------------------------------------------------
# Copyright © 2021, Spyder Line Profiler contributors
#
# Licensed under the terms of the MIT license
# ----------------------------------------------------------------------------
"""
Spyder Line Profiler Main Widget... |
from django.shortcuts import render, HttpResponseRedirect
from django.http import HttpResponse
from django.db.models import Q
from django.utils import timezone
from django.contrib.auth.decorators import login_required
from .tasks import get_issues
from .models import Redmine_issues
import os, json, datetime, calendar
... |
# -*- coding: utf-8 -*-
""" USA State fact and quiz.. """
from __future__ import print_function
import math
import string
import random
MAX_QUESTION = 5
#This is the welcome message for when a user starts the skill without a specific intent.
WELCOME_MESSAGE = ("Welcome to the United States Quiz Game! You can ask me... |
# -*- mode: python; encoding: utf-8 -*-
#
# Copyright 2012 <NAME>, Opera Software ASA
#
# 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
#
# Unl... |
##~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~##
## ##
## This file forms part of the Underworld geophysics modelling application. ##
## ... |
import argparse
import math
import random
import os
import cv2
from functools import partial
import numpy as np
import torch
from torch import nn, autograd, optim
from torch.nn import functional as F
from torch.utils import data
import torch.distributed as dist
from torchvision import transforms, utils
f... |
#!/usr/bin/env/python3
"""Recipe for training a neural speech separation system on wsjmix the
dataset. The system employs an encoder, a decoder, and a masking network.
To run this recipe, do the following:
> python train.py hparams/sepformer.yaml
> python train.py hparams/dualpath_rnn.yaml
> python train.py hparams/co... |
#!/usr/bin/env python3
from fuxi.common.thirdparty.theHarvester.discovery import *
from fuxi.common.thirdparty.theHarvester.discovery.constants import *
from fuxi.common.thirdparty.theHarvester.lib import hostchecker
from fuxi.common.thirdparty.theHarvester.lib import reportgraph
from fuxi.common.thirdparty.theHarvest... |
# -*- coding: utf-8 -*-
from pymatgen.io.vasp.sets import DictSet
#!!! The warning that is raised here is because there is no YAML! It can be ignored
class StaticEnergyCalc(DictSet):
CONFIG = {
"INCAR": {
"EDIFF": 1.0e-07,
"EDIFFG": -1e-04,
"ENCUT": 520,
"I... |
# -*- coding: utf-8 -*-
#@+leo-ver=5-thin
#@+node:ekr.20190410171646.1: * @file pyzo_support.py
#@@first
'''
pyzo_support.py: Allow access to pyzo features within Leo.
This plugin will work only if pyzo can be imported successfully.
'''
# Integrating pyzo into Leo is a very bad idea.
# See https://groups.google.com/d... |
import os
os.chdir("C:\Alina\ML IP and CV\ML IP CV Course code\computer_vision")
#%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
# fix random seed for reproducibility
seed_value = 123; np.random.seed(seed_value); #set_random_seed(seed_value) # Keras uses its source of... |
import os
import sys
# add cwd to path to allow running directly from the repo top level directory
sys.path.append(os.getcwd())
import pandas as pd
import numpy as np
import torch
import math
from learn.control.random import RandomController
from learn.control.mpc import MPController
from learn.control.pid import Pi... |
"""Simulate stocatic positioning of loop extrussion factors.
This module implements a Gillespie algorithm to simulate positioning of
loop extrusion factors on a chromatin chain.
Example:
beadsPerLoop = 500
processivity = 500.0
nloops = int(np.floor(L/beadsPerLoop))
chain = loopSim.LoopExtrusionChain(L... |
import logging
import warnings
import multiprocessing
import time
from collections import defaultdict
import itertools
import numpy as np
import scipy as sp
import statsmodels
import statsmodels.stats
import statsmodels.stats.proportion
import pandas as pd
import plotly.express as px
from tqdm import tqd... |
import time
import logging
import os
import glob
import sys
from sys import stdout
from collections import deque
import copy
import time
import argparse
import warnings
import threading
warnings.filterwarnings('ignore')
import cv2
import PIL
import numpy as np
import matplotlib.pyplot as plt
import tensorflow as tf
im... |
import argparse
import logging
import os
import pdb
import random
import shutil
import sys
from timeit import default_timer as timer
from typing import Tuple
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from sklearn.metrics import average_precision_s... |
#!/usr/bin/env python
# Edit this script to add your team's training code.
# Some functions are *required*, but you can edit most parts of required functions, remove non-required functions, and add your own function.
from helper_code import *
import numpy as np, os, sys, joblib
import time
from datetime import dateti... |
#!/usr/bin/env python
"""tests for :mod:`online_pomdp_planning.mcts`"""
from functools import partial
from math import log, sqrt
from typing import Dict
import pytest
from online_pomdp_planning.mcts import (
ActionNode,
DeterministicNode,
MuzeroInferenceOutput,
ObservationNode,
backprop_running_q... |
import torch
import torch.utils
import torch.utils.data
import torch.nn as nn
import torch.nn.functional as F
from copy import deepcopy
from .abstract_vae import AbstractVAE
from .reparameterizers import get_reparameterizer
from helpers.distributions import nll_activation as nll_activation_fn
from helpers.layers impo... |
from __future__ import division
from __future__ import print_function
from future import standard_library
standard_library.install_aliases()
from builtins import str
from builtins import range
from builtins import object
from androguard.core import androconf
from androguard.core.bytecodes.dvm_permissions import DVM_P... |
from . import utils
import os
import sys
import click
from pick import Picker
from httplib2 import Http
from oauth2client import file
from prettytable import PrettyTable
from googleapiclient.discovery import build
from prettytable import MSWORD_FRIENDLY
from mimetypes import MimeTypes
dirpath = os.path.dirname(os.pat... |
# 要添加一个新单元,输入 '# %%'
# 要添加一个新的标记单元,输入 '# %% [markdown]'
# %%
import argparse
import scipy.io as scio
import numpy as np
import torch
import torch.nn as nn
import torch.nn.parallel
import torch.backends.cudnn as cudnn
import torch.optim as optim
import random
from utils import weights_init, compute_acc
from torch.utils.... |
import numpy as np
from PIL import Image
import os
import sys
import cv2
import argparse
from tqdm import tqdm
import matplotlib.pyplot as plt
import pycocotools.mask as mask_util
import matplotlib as mpl
import matplotlib.colors as mplc
import matplotlib.figure as mplfigure
from matplotlib.backends.backend_agg import ... |
#!/bin/env python3
import sys
def eprint(*args, **kwargs): print(*args, file=sys.stderr, **kwargs)
import os
import json
import ast
import re
from ARAX_response import ARAXResponse
sys.path.append(os.path.dirname(os.path.abspath(__file__))+"/../NodeSynonymizer")
from node_synonymizer import NodeSynonymizer
sys.path... |
from hmac import trans_36
import sys
import os
from os import path
sys.path.append(path.dirname(path.dirname(path.abspath(__file__))))
from common.db_IO import Connection
import common.functions as functions
import subprocess
import common.paths as paths
import tempfile
import re
import pubmed_parser
import fetch_hered... |
import argparse
import time
import csv
import numpy as np
import torch
from torch.autograd import Variable
import torch.backends.cudnn as cudnn
import torch.optim
import torch.nn as nn
import torch.utils.data
import custom_transforms
import models
from utils import tensor2array, save_checkpoint, save_path_formatter
fr... |
#!/usr/bin/env python
###############################################################################
# Copyright (c) 2011-2013, Pacific Biosciences of California, Inc.
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the followi... |
"""
Reworking of sdintimaging for the PHANGS-ALMA Pipeline.
Essentially identical, but includes a tolerance in the
fractional flux change between minor cycles to stop it
hanging indefinitely (a problem for 7m+TP data, in
particular).
"""
import copy
import logging
import os
import shutil
from . import casaMaskingRou... |
import sys
sys.path.append("..")
import os
from collections import defaultdict
import argparse
import json
import string
import random
import numpy as np
import torch
from torch.optim.lr_scheduler import LambdaLR
from torch.utils.data import DataLoader, Dataset
from transformers import RobertaTokenizer, AutoModel, A... |
from .streams import *
def data_source(chunks):
"""Represents a compressed data provider. `chunks` should be an iterable of
chunk data, in turn represented as bytes objects. Yields a
`CompressedStreamSingle` stream."""
for chunk in chunks:
for offs in range(0, len(chunk), WI):
dat... |
# -*- coding: utf-8 -*-
#
# (c) Copyright 2001-2015 HP Development Company, L.P.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any late... |
'''
MIT License
Copyright (c) 2020 <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, publish, distri... |
from asyncio import sleep
from functools import wraps
from inspect import Parameter
from os import getenv
from re import compile as re_compile
from spotipy import Spotify
from spotipy.oauth2 import SpotifyClientCredentials
from spotipy.exceptions import SpotifyException
from typing import List, Optional, Union
from you... |
# Copyright (c) 2021, Lawrence Livermore National Laboratory, LLC.
# All rights reserved.
# LLNL-CODE-826307
# 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 copy... |
import psycopg2, psycopg2.extras
import os
import glob
import csv
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib import patches
from matplotlib.pyplot import figure
from datetime import timedelta, date
from sklearn.metrics import confusion_matrix, classification_report, f1_score... |
import pygame
from . import pygwrap
from . import stats
from . import rpgmenu
from . import image
from .items import Item
from .spells import COLORS, COLOR_NAME, Spell
EL_NAME = ( "Light", "Heavy", "Severe" )
def encumberance_desc( pc, show_ceiling=True ):
"""Return a string describing this PC's encumberance level... |
#!/usr/bin/env python
# coding: UTF-8
#
## @package treeGL
#
# A tree exhibitor based on OpenGL.
# Non-commercial use only.
#
# Fedora:
# - sudo dnf install python2-pyopengl or python3-pyopengl
#
# Ubuntu:
# - sudo apt-get install python2-opengl or python3-opengl
#
# MacOS:
# - sudo port install py27-opengl ... |
"""Solver for RTE ROADEF Challenge 2020 by <NAME>."""
import time
t0 = time.time()
import contextlib
try:
import ujson as json
except ImportError:
try:
import simplejson as json
except ImportError:
import json
from math import ceil
import os
import sys
from gurobipy import Model, GRB, LinEx... |
#!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import argparse
import os
import numpy as np
import habitat
from habitat.core.utils import try_cv2_import
from habitat.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.