text stringlengths 8.04k 46.5k |
|---|
# -*- coding: utf-8 -*-
"""Core of OCFL Object library."""
import copy
import hashlib
import json
import os.path
import re
import logging
from urllib.parse import quote as urlquote
import fs
import fs.path
import fs.copy
from .digest import file_digest, normalized_digest
from .inventory_validator import InventoryVali... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (C) 2016-2020 <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 r... |
#!/usr/bin/env python
# coding: utf-8
# # Loading data
import pandas as pd
import plotly.express as px
from tqdm import tqdm
import functools
import numpy as np
from difflib import SequenceMatcher
from oauthlib.oauth2 import BackendApplicationClient
from requests_oauthlib import OAuth2Session
from datetime import d... |
# ##### BEGIN GPL LICENSE BLOCK #####
#
# 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 later version.
#
# This program is distrib... |
#!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible 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.
#
# Ansible is distribut... |
import tensorflow as tf
import numpy as np
import os
from ..util import force_tuple
from typing import Union, Tuple, Callable, List
WINDOWS = os.name == 'nt'
def new_io(
inputs: tf.Tensor,
return_list=False
) -> Union[Tuple[Callable, Callable], Tuple[List[tf.Tensor], Callable, Callable]]:
"""
... |
#Apply IDA FLIRT signatures for Ghidra
# original code from
# https://github.com/thebabush/nampa/blob/b04a506ea83e6ac48c1e13288ce155d97d42922d/nampa/flirt.py
# https://github.com/radare/radare2/blob/0948f9536b20be553bfbdbf1fc877b80fad3efa0/libr/anal/flirt.c
#@author NWMonster
#@category FunctionID
#@menupath Tool... |
"""
JupyterHub Spawner to spawn user notebooks on a Kubernetes cluster in per-
user namespaces.
This module exports `NamespacedKubeSpawner` class, which is the spawner
implementation that should be used by JupyterHub.
"""
import asyncio
import os
import sys
from tornado import gen
from tornado.ioloop import IOLoop
... |
import dataclasses
import os
import time
import warnings
from typing import Union, Callable, List, Sequence, Optional
import numpy as np
import speechbrain
import torchaudio.backend.soundfile_backend
from speechbrain.lobes.augment import TimeDomainSpecAugment
from speechbrain.nnet.containers import Sequential
from spe... |
# Copyright 2021 NREL
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distri... |
# candidate/controllers.py
# Brought to you by We Vote. Be good.
# -*- coding: UTF-8 -*-
from .models import CandidateCampaignListManager, CandidateCampaignManager
from ballot.models import CANDIDATE
from config.base import get_environment_variable
from django.contrib import messages
from django.http import HttpRespon... |
import scipy.io as sio
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
import os
from PIL import Image
from torchvision import transforms
import torchvision.datasets.folder as torch_folder
from torch.utils.data import DataLoader,TensorDataset
fro... |
# -*- coding: utf-8 -*-
"""Pygame Drawing algorithms written in Python. (Work in Progress)
Implement Pygame's Drawing Algorithms in a Python version for testing
and debugging.
"""
from __future__ import absolute_import, division
from collections import namedtuple
import sys
if sys.version_info >= (3, 0, 0):... |
from numpy.testing import assert_array_equal, assert_almost_equal, \
assert_array_almost_equal, assert_raises, assert_equal
import numpy as np
import math
from skimage.measure._regionprops import (regionprops, PROPS, perimeter,
_parse_docs)
SAMPLE = np.array(
[[0, 0,... |
# Copyright 2022 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
"""
The API basically only provides one class. You can create a :class:`Script` and
use its methods.
Additionally you can add a debug function with :func:`set_debug_function` and
catch :exc:`NotFoundError` which is being raised if your completion is not
possible.
.. warning:: Please, note that Jedi is **not thread sa... |
from rl.utils import ReplayBuffer_remote
from rl.utils import AdaptiveParamNoiseSpec, distance_metric, perturb_actor_parameters
from rl.policies.actor import Scaled_FF_Actor as O_Actor
from rl.policies.critic import Dual_Q_Critic as Critic
# Plot results
from apex import create_logger
import time
import os
from coll... |
import numpy as np
import warnings
import json
import numpy as np
from ..utils import ordinal_str
import random
import string
try:
import matplotlib.pyplot as pl
except ImportError:
warnings.warn("matplotlib could not be loaded!")
pass
from . import colors
from ..utils._legacy import kmeans
from IPython.cor... |
#!/usr/bin/python
# Copyright (c) 2020, <NAME>
# BSD 2-Clause License
ANSIBLE_METADATA = {
'metadata_version': '1.1.',
'status': ['preview'],
'supported_by': 'community',
}
DOCUMENTATION = r'''
---
module: openafs_build
short_description: Build OpenAFS binaries from source
description:
- Build OpenAF... |
# Copyright 2020 The PyMC Developers
#
# 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... |
import argparse
import gzip
import re
import shutil
import tarfile
import zipfile
from pathlib import Path
from urllib.parse import urlparse
from urllib.request import urlretrieve
from zipfile import ZipFile
import numpy as np
import pandas as pd
import torch
from marius.tools.config_generator import output_config
fr... |
import copy
import logging
import os
import re
import shutil
from tqdm import tqdm
from collections import OrderedDict
from pprint import pprint
import arxiv
import bibtexparser
import pyparsing as pp
import sh
import utils
logger = utils.initialize_logging('pybib')
MONTH_STRINGS = ['jan', 'feb', 'mar', 'apr', 'm... |
import torch
import torch.nn as nn
import torch.optim as optim
import torch.autograd as autograd
import torch.nn.functional as F
import spacy
import numpy as np
import re
from typing import List, Mapping, Any, Optional
from collections import defaultdict
from torch.autograd import Variable
import os
from glob import ... |
###########################################################################################
# front end for Asteroid
#
# (c) <NAME>, University of Rhode Island
###########################################################################################
import os
import sys
from pathlib import Path, PurePath
from aster... |
import sys
import random
from collections import OrderedDict, Counter
import pandas as pd
from .basic import *
from . import translation
from .all_genes import all_genes, gap_character
from .genetic_code import genetic_code, reverse_genetic_code
from . import logo_tools
all_trbd_nucseq = {}
for organism in all_genes:
... |
import ast
from collections import Counter
import builtins
import copy
import enum
import itertools
import functools
import random
import time
import threading
import traceback
from dataclasses import dataclass
from dataclasses import field
from typing import *
import z3 # type: ignore
from crosshair import dynamic_... |
# This code calculates the Weyl scalars psi0, psi1, psi2, psi3, and psi4. It does so by following the paper
# Baker, Campanelli, and Lousto. PRD 65, 044001 (2002), gr-qc/0104063 and the example set by the Kranc-
# generated ETK thorn which can be found at https://bitbucket.org/einsteintoolkit/einsteinanalysis/src
# As... |
# Copyright (c) - 2015, <NAME>
# Copyright (c) - 2015, <NAME>
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICEN... |
# MySQL Connector/Python - MySQL driver written in Python.
# Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
# MySQL Connector/Python is licensed under the terms of the GPLv2
# <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most
# MySQL Connectors. There are special exceptio... |
import json
import csv
import re
from utils import untokenize, get_DD_by_ID, create_full_DD_dialogue
from tqdm import tqdm
def convert_CIDER_dialogue_to_NLI_format(CIDER_dialogue):
NLI_format = ""
CIDER_dialogue = CIDER_dialogue.split(' ')
for utterance in CIDER_dialogue:
utterance = utterance.r... |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import... |
# simulator.py
from enum import Enum
import torch
import numpy as np
import pickle
from intersim.utils import ssdot_to_simstates, to_circle, get_map_path, get_svt, powerseries
from intersim import Box, StackedVehicleTraj, InteractionGraph
from intersim.viz import animate, build_map
from intersim.collisions import ch... |
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... |
import json
import time
from datetime import datetime, timedelta
from operator import itemgetter
import numpy as np
import requests
from beem.account import Account
from beem.comment import Comment
from dateutil.parser import parse
from prettytable import PrettyTable
from watson_developer_cloud.natural_language_unders... |
import requests
from datetime import datetime, timedelta
from bs4 import BeautifulSoup
import pandas as pd
from google.cloud import bigquery
import os
def get_max_game_date():
project_id = os.environ.get('GCP_PROJECT')
client = bigquery.Client(project=project_id)
QUERY = (
"SELECT date_add(max(g... |
"""
DIRBS REST-ful IMEI API module.
Copyright (c) 2018 Qualcomm Technologies, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the
limitations in the disclaimer below) provided that the following conditions are met:
* Redistr... |
'''
Classes to represent game files.
Note on newline encoding:
File contents written to loose system files should use the system
newline encoding (eg. \r\n on windows), otherwise some oddities
were observed (eg. ship names not loading).
However, newlines should be simple \n when file contents are writ... |
"""
Tools for computing and plotting the ROCE values of different classification models
at different enrichment factors.
"""
import copy
import pickle
import json
import math
import argparse
from matplotlib import pyplot as plt
from matplotlib import rcParams
import numpy as np
from nff.utils import read_csv
# he... |
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the... |
"""
Shortcuts for retrieving input from the user.
If you are using this library for retrieving some input from the user (as a
pure Python replacement for GNU readline), probably for 90% of the use cases,
the :func:`.prompt` function is all you need. It's the easiest shortcut which
does a lot of the underlying work lik... |
# -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2018, 2019.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any... |
from __future__ import (
print_function, division, absolute_import, unicode_literals)
from collections import OrderedDict
import fontTools.voltLib.ast as ast
from fontTools.voltLib.lexer import Lexer
from fontTools.voltLib.error import VoltLibError
from io import open
PARSE_FUNCS = {
"DEF_GLYPH": "parse_def_gl... |
import os
from abc import ABC, abstractmethod
from threading import Condition, Lock
from filelock import FileLock
import rospy
import rospkg
import json
import yaml
import numpy as np
from nav_msgs.msg import OccupancyGrid
from nav_msgs.srv import GetMap
from geometry_msgs.msg import Pose2D
from rospy.exceptions impor... |
#!/usr/bin/env python3
"""
Copyright <NAME> 2012
<EMAIL>
Distributed under GNU General Public Licence v3
This script produces chart of nuclides in svg format from data
provided in xml document.
usage: ChartDrawer.py [-h] [--names] [--halflives] [--magic] [--numbers]
[--z Z Z] [--n N N]
... |
# * Standard Library Imports -->
# * Standard Library Imports ---------------------------------------------------------------------------->
import os
import sys
import asyncio
from concurrent.futures import ThreadPoolExecutor
from functools import wraps
from io import BytesIO
from asyncio import get_event_loop
from dat... |
# CoMix Framework training code
import os
import torch
import torch.optim as optim
from torch import nn
import torch.nn.functional as F
import math
import numpy as np
import params
from utils import *
from models.graph_model import *
import time
import datetime
import copy
from torch.autograd import Function
from core... |
import json
import subprocess
import pytest
import sys
import copy
import collections
import shutil
from unittest import mock
import logging
from pathlib import Path
from BALSAMIC import __version__ as balsamic_version
from BALSAMIC.utils.exc import BalsamicError, WorkflowRunError
from BALSAMIC.utils.constants impo... |
#!/usr/bin/env python
import rospy
from geometry_msgs.msg import Twist, Pose, PointStamped
from nav_msgs.msg import OccupancyGrid
from std_msgs.msg import Bool, String
import numpy as np
from math import radians
class HighLevelController:
def __init__(self, starting_state="idle"):
# Initialize current ... |
import json
import socket
import datetime
import argparse
import struct
import random
import time
import weakref
from binascii import hexlify, unhexlify
from cryptokit import target_from_diff, uint256_from_str
from gevent import sleep, with_timeout
from gevent.queue import Queue
from gevent.pool import Pool
from geven... |
import torch
import torch.optim as opt
import torch.nn as nn
from types import MethodType
import models
from utils.metric import accuracy, AverageMeter, Timer
from interval.layers import LinearInterval, Conv2dInterval
from interval.hyperparam_scheduler import LinearScheduler
from torch.utils.tensorboard import SummaryW... |
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... |
# from tkinter import *
from math import *
from tkinter.filedialog import *
import numpy as np
import scipy
from PIL import ImageTk, Image
from cv2 import *
from scipy import ndimage
from scipy import signal
np.set_printoptions(threshold=np.inf, linewidth=850)
# import cv2.cv2 as cv
def choosePic():
global im... |
import numpy as np
class SingleAxisTrajectory:
"""A trajectory along one axis.
This is used to construct the optimal trajectory in one axis, planning
in the jerk to achieve position, velocity, and/or acceleration final
conditions. The trajectory is initialised with a position, velocity and
ac... |
'hotspotter.algos contains algorithm poltpori'
from __future__ import division, print_function
from hscom import __common__
(print, print_, print_on, print_off,
rrr, profile, printDBG) = __common__.init(__name__, '[algos]', DEBUG=False)
# Python
from itertools import izip
from os.path import join
import os
import sys
... |
import tensorflow as tf
import tensorflow_addons as tfa
import tensorflow_datasets as tfds
import numpy as np
# @tf.function
def parse_aug_fn(dataset, input_size=(416, 416)):
"""
Image Augmentation function
"""
ih, iw = input_size
# (None, None, 3)
x = tf.cast(dataset['image'], tf.float32)
... |
# -*- coding: utf-8 -*-
"""PSD layer classes.
"""
from __future__ import absolute_import, unicode_literals
import logging
from psd_tools.constants import (
TaggedBlock, SectionDivider, BlendMode, TextProperty, PlacedLayerProperty,
SzProperty)
from psd_tools.decoder.actions import Descriptor
from psd_tools.user... |
import numpy as np
import os
import nibabel as nib
import re
import warnings
from os.path import join as jph
# --- text-files utils ---
def unique_words_in_string(in_string):
ulist = []
[ulist.append(s) for s in in_string.split() if s not in ulist]
return ulist[0]
def indians_file_parser(s, sh=None):
... |
from multiprocessing import Pool
import pickle
import math
import time
import os
import numpy as np
from osgeo import gdal
from osgeo import osr
import skimage
from skimage.feature import local_binary_pattern
from skimage.filters import gaussian
from skimage.color import rgb2gray
from skimage._shared._war... |
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
# Copyright 2013 Openstack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import absolute_import, division, print_function, unicode_literals
import copy
import logging
import numpy as np
from collections import OrderedDict
from astropy.io import fits
from astropy.table import Table
from astropy.convolution import... |
# Copyright (C) 2009, 2010, <NAME> <<EMAIL>>
# Copyright (C) 2010, <NAME> <<EMAIL>>
import os
import sys
import time
import shutil
from pyjs import linker
from pyjs import translator
if translator.name == 'proto':
required_modules = [
'pyjslib', 'sys', 'imp', 'dynamic', 'pyjamas', 'pyjamas.DOM',
]
... |
import csv
import math
import multiprocessing
import os
import sys
import argparse
from collections import defaultdict
from pathlib import Path
from PolTools.utils.check_dependencies import check_dependencies
from PolTools.utils.constants import rna_blacklist_file, hg38_chrom_sizes_file, annotation_file
from PolTools... |
#
# Copyright (c) 2007 <NAME> <<EMAIL>>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish... |
#!/usr/local/bin/python3.5
import argparse
import os
#from SentiCR.SentiCR import SentiCR
from SentiSW.code.classification.classifier import Classifier
from SentiSW.code.entity.training_set_generation import get_entity
import pickle
import asyncio
import aiohttp
import time
import datetime
import numpy as np
import mat... |
# Class to include several price providers that work together to update a
# list of pricing databases
# The databases are saved in the pickle format as pandas df for later use
# The field dictionary is a list of column names for the provider to
# associate with the standardized field names for the dataframe
# Standardi... |
from datetime import timedelta
import uuid
from pytz import UTC
from ichnaea.models import (
Radio,
CellObservation,
WifiObservation,
)
from ichnaea.models import constants
from ichnaea.models.schema import normalized_time
from ichnaea.tests.base import TestCase
from ichnaea.tests.base import (
FREMON... |
#! /usr/bin/env python3
from argparse import ArgumentParser
import csv
from datetime import datetime
import logging
import json
from matplotlib import pyplot as plt
import numpy as np
import pandas as pd
from pathlib import Path
import optuna
import cmsmodel
import hatmodel_ug_gamb
import hatmodel_ss
import hatmodel_... |
# Author: <NAME>, <NAME>
import datetime
import numpy as np
import pickle
import shutil
import time
import torch
import torch.nn as nn
import sys
from models.quantizers import compute_perplexity
from .util import *
def map_skip_none(fn, it):
"""
emulate list(map(fn, it)) but leave None as it is.
"""
... |
# encoding: UTF-8
'''
vn.sec的gateway接入
'''
from __future__ import print_function
import json
from datetime import datetime, timedelta
from copy import copy
from math import pow
from vnpy.api.huobi import TradeApi, DataApi
from vnpy.trader.vtGateway import *
from vnpy.trader.vtFunction import getJsonPath
# 委托状态类型映射... |
from subprocess import call
from subprocess import DEVNULL
import tempfile
import os
import re
from io import BytesIO
from collections import OrderedDict
from fs_helpers import *
from wwlib.yaz0 import Yaz0
from wwlib.rel import REL
from paths import ASM_PATH
def disassemble_all_code(self):
if not os.path.isfile(r... |
from PyQt5 import QtGui, QtWidgets
from PyQt5.QtWidgets import QApplication, QMainWindow, QWidget, QScrollArea, QPushButton, QVBoxLayout, QHBoxLayout, QLabel, QLineEdit, QFormLayout
from PyQt5.QtGui import QPainter, QBrush, QPen, QPolygonF, QLinearGradient, QColor
from PyQt5.QtCore import Qt, QPointF, QTimer, QRect
fro... |
import seaborn as sns
import pandas as pd
from collections import defaultdict
from matplotlib import colors
import matplotlib.pylab as plt
from scipy.stats import zscore
import scanpy as sc
import matplotlib.pyplot as plt
#______ UTILS________
def reorder_from_labels(labels, index):
# order based on labels:
cl... |
# Report significant differences in the buildhistory repository since a specific revision
#
# Copyright (C) 2012-2013, 2016-2017 Intel Corporation
# Author: <NAME> <<EMAIL>>
#
# SPDX-License-Identifier: GPL-2.0-only
#
# Note: requires GitPython 0.3.1+
#
# You can use this from the command line by running scripts/buildh... |
import optuna
import logging
import sys
import random
import torch
import torch.nn as nn
import torch.optim as optim
import numpy as np
from src.dataloader import create_dataloader
from src.model import Model
from src.utils.torch_utils import model_info, check_runtime, autopad
from src.trainer import TorchTr... |
import numpy as np
import pandas as pd
import pulp as lp
import pickle as pkl
import time
import os
import plotly.express as px
import plotly.graph_objects as go
class ALMplanner:
def __init__(self, start = np.datetime64("2021-01-01"), end = np.datetime64("2070-12-31"), path_scenario = "scenario", scen_name = "S... |
##################################################
# Author: {<NAME>}
# Copyright: Copyright {2020}, {ICAM}
# License: {MIT license}
# Credits: {<NAME>}, {2019}, {https://github.com/HsinYingLee/MDMM}
##################################################
import numpy as np
import torch
import torch.nn as nn
from torch.auto... |
"""
Draw laser scans
"""
import math
import io
import pathlib
from datetime import timedelta
from collections import defaultdict
import os
os.environ['PYGAME_HIDE_SUPPORT_PROMPT'] = "1"
import pygame
from pygame.locals import *
import cv2 # for video output
import numpy as np # faster depth data processing
from o... |
from time import time
import glm
from itbl import Ray, Shader
from itbl.accelerators import SDF, BVHAccel
from itbl.cameras import TrackballCamera
from itbl.shapes import Box
from itbl.util import get_color, get_data
from itbl.viewer import Application, Viewer
from itbl.viewer.backend import *
from wilson import *
i... |
#!/usr/bin/env python
# _*_ coding: UTF-8 _*_
import time
import torch
import torch.nn as nn
import torch.distributed as dist
import os
import numpy as np
from tqdm import tqdm
import logging
import matplotlib.pyplot as plt
from loader_audio_visual_pdf import get_data_loader
from network.network_index import AVSRWork... |
# training script for NFL
# arutema47
import argparse
# parsers
parser = argparse.ArgumentParser(description='NFL')
parser.add_argument('--imsize', default=768, type=int)
parser.add_argument('--enum', default=25, type=int)
parser.add_argument('--bs', default=4, type=int)
parser.add_argument('--lr', default=2e-4, type=... |
# ======================================================================== #
#
# Copyright (c) 2017 - 2020 scVAE 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.apac... |
import argparse
import gc
import os
import pandas as pd
# import torch.multiprocessing as mp
import torch.nn as nn
import torch.optim as optim
import torch.utils.data
from torch.autograd import Variable
from torch.utils.data import DataLoader
from tqdm import tqdm
import random
from copy import deepcopy
import logger... |
from __future__ import absolute_import
import weakref
import abc
import gc
from collections import namedtuple
from operator import mul
from functools import reduce
from ctypes import POINTER, byref
import numpy as np
import sympy
from devito.parameters import configuration
from devito.tools import ArgProvider, Enrich... |
#!/usr/bin/python2.4
#
# Copyright 2008 Google Inc.
#
# 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 o... |
from django.shortcuts import render
from django.contrib.auth.models import User
from django.contrib.auth import logout
from django.http import HttpResponse, HttpResponseRedirect, \
HttpResponseNotFound
from django.template import RequestContext
from django.contrib.auth.decorators import login_required
from django.s... |
# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... |
"""
analytics functions and data structures for turning a
an AttributeTree representing a taxonomy
with each taxa having a set of attributes representing
analytics of the otus below it
"""
import math
import numpy
import skbio.diversity.alpha
import random
from nest_py.omix.jobs.attribute_tree import AttributeTree
fro... |
import tensorflow as tf
import _init_paths
from network import Network
import numpy as np
class vgg_test_net(Network):
def __init__(self, num_classes, num_units, trainable=False, is_train=False):
# self.inputs = []
self.num_classes = num_classes
self.num_units = num_units
self.tra... |
# -*- coding: utf-8 -*-
import os
import random
import xml.etree.ElementTree as ET
import time
import openpyxl
import numpy as np
def creat_train_data_list():
'''生成列表, 将所有数据按文件夹放入Data路径下'''
folder_input='Data'
folder_names=os.listdir(folder_input) #寻找所有的文件夹
folder_names_real=[]
for folder_name in ... |
import numpy as np
import random
import pandas as pd
import os
import gc
import tensorflow.compat.v1 as tf
from matplotlib import pyplot as plt
from tqdm.notebook import tqdm
from pathos.multiprocessing import Pool
from scipy.spatial.distance import cdist
from scipy.spatial import cKD... |
import argparse
import pandas as pd
import os
import re
import time
from tqdm import tqdm
import numpy as np
import csv
import sys
import random
import logging
import urllib3
import json
import pickle
import itertools
import openpyxl
from sklearn.metrics import f1_score
from sklearn.metrics import confusion_matrix, Co... |
from copy import deepcopy
import networkx as nx
import numpy as np
from scipy.stats import norm
from simtk import unit
from bayes_implicit_solvent.constants import RADIUS_UNIT
from bayes_implicit_solvent.smarts import atomic_number_dict
from bayes_implicit_solvent.utils import smarts_to_subsearch, convert_to_unitd_ar... |
import os
import glob
import csv
import time
from collections import OrderedDict
from collections import namedtuple
import routine
from itertools import islice
import numpy as np
from datetime import date
import random
EMPTY_STRING = " "
HEADERFILENAME = 'headers.txt'
OBSOLETE_HEA... |
import os
from tensorflow.python.platform import gfile
import tensorflow as tf
import re
import random
import datetime as dt
import moviepy.editor as mpy
import pandas as pd
import json
from matplotlib import pyplot as plt
import matplotlib
matplotlib.use("TkAgg")
import numpy as np
import seaborn as sn
from moviepy.ed... |
from __future__ import print_function
from psychopy import sound, monitors, core, visual, event, data, gui, logging, info
import numpy as np
from copy import deepcopy
from math import atan, cos, sin, pi, sqrt, pow
import time, sys, platform, os, StringIO
from pandas import DataFrame
from calcUnderOvercorrect import cal... |
import os
import re
import sys
import ssl
import json
import time
import requests
import logging
import shutil
import argparse
import threading
from dateutil.parser import parse
from watchdog.observers import Observer
from watchdog.events import PatternMatchingEventHandler
from http.server import HTTPServer, SimpleHTT... |
import numpy as np
##############################################################
# CCD Program for neutron matter with the Minnesota potential.
#
# <NAME>, July/August 2018
#
# License: Free Software following Version 3 of GNU General Public License,
# see https://www.gnu.org/licenses/gpl.html
#######
############... |
# -*- coding: utf-8 -*-
"""Created on Thu Jan 24 13:50:03 2019
@author: <NAME>, Shehnaaz.
"""
#########################################################################################################################
# Importing Packages
############################################################################... |
import copy
import datetime
import itertools
import json
import logging
import math
import os
import statistics
import threading
from concurrent.futures import ProcessPoolExecutor, ThreadPoolExecutor
from typing import Any, Dict, List, Type, Union
from django import db
from django.core.cache import cache
from django.c... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.