text stringlengths 8.04k 46.5k |
|---|
"""
Modified on Sun Jul 27 2020 by <NAME>, DS @ AWS MLSL
Cleaned up for the tutorial.
Original author: avanetten
Read in a list of wkt linestrings, render to networkx graph, with geo coords
Note:
osmnx.simplify_graph() is fragile and often returns erroneous projections
"""
import os, time
import argparse
# from ... |
import json
import os
from unittest.mock import MagicMock, patch
from common.licenses import LicenseInfo
from providers.provider_api_scripts import flickr
from requests import Response, codes
RESOURCES = os.path.join(os.path.abspath(os.path.dirname(__file__)), "resources/flickr")
def _get_resource_json(json_name):... |
import subprocess
import tempfile
import re
from typing import Optional, Tuple, Dict
import matplotlib.pyplot as plt
from matplotlib.figure import Figure
import matplotlib as mpl
import region_set_profiler.utils as ut
from region_set_profiler.plot import MidpointNormalize, get_text_width_height
import numpy as np
im... |
# coding: utf-8
"""
This modules holds methods for generating predictions from a model.
"""
import os
import sys
from typing import List, Optional
from logging import Logger
import numpy as np
import torch
from torchtext.data import Dataset, Field
from torch import Tensor
from joeynmt.helpers import bpe_postprocess,... |
import discord, asyncio, json, os, requests, psutil
from discord.ext import commands
from datetime import datetime, date, timedelta
from ftplib import FTP
from subprocess import check_output
__version__ = 2.0
__author__ = "QuentiumYT"
__filename__ = "QuentiumBot"
debug = False
windows = os.name == "nt"
startup_cogs ... |
# Copyright (c) 2018-2021, NVIDIA Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of condit... |
""" SMARS Python library
<NAME> September 2018
Purpose: Provides library routines for the SMARS robot and quad robots
You will need to install the following python libraries for this to work:
# sudo apt-get install python-smbus
# sudo apt-get install i2c-tools
You will also need to enable the I2C interface using... |
import numpy as np
import scipy as sp
import scipy.optimize
from .Bhattacharya import path_integral, alignment
from .Ao import Ao_pot_map
# import autograd.numpy as autonp
# from autograd import grad, jacobian # calculate gradient and jacobian
from .Wang import Wang_action, Wang_LAP
# the LAP method should be rewrit... |
#!/usr/bin/env python3
import sys
import json
import inspect
import pathlib
import argparse
import dataclasses
from xml.etree import ElementTree
import md_extensions
from schema_lib import Schema
class BlockDef:
_blocks = {}
def __init__(self, type, values={}, fields={}):
self.type = type
... |
from __future__ import print_function
import argparse
import os
import random
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 torch.utils.data
import torchvision.datasets as dset
import torchvision.transforms as trans... |
"""
Classical KGX graph summary module.
"""
from typing import Dict, List, Optional, Any, Callable
import re
import yaml
from json import dump
from json.encoder import JSONEncoder
from kgx.error_detection import ErrorType, MessageLevel, ErrorDetecting
from kgx.utils.kgx_utils import GraphEntityType
from kgx.graph.ba... |
from __future__ import annotations
import abc
import asyncio
import asyncio.events
import datetime
import functools
import heapq
import time
import traceback
from dataclasses import dataclass, field
from types import TracebackType
from typing import (
Any,
Callable,
Dict,
Generator,
Iterable,
L... |
""" Implementation for the dataset and GenesisTextDataset class, which handles dataloading from ipfs
"""
# The MIT License (MIT)
# Copyright © 2021 <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 th... |
# coding=utf-8
import os
import time
import subprocess
header = """
_ _ ___ ______
(_) | / _ \ | ___ \\
_ __ ___ _| |_ _ __ ___ / /_\ \| |_/ /
| '_ ` _ \| | __| '_ ` _ \| _ || __/
| | | | | | | |_| | | | | | | | || |
|_| |_| |_|_|\__|_| |_| |_\_| |_/\_| 2.2
"""
try:... |
import os
import re
import weakref
import numpy as np
from yt.data_objects.index_subobjects.grid_patch import AMRGridPatch
from yt.data_objects.static_output import Dataset
from yt.fields.magnetic_field import get_magnetic_normalization
from yt.funcs import mylog, sglob
from yt.geometry.geometry_handler import YTData... |
from pathlib import Path
from numpy.lib.function_base import iterable
import spacy
import json
from collections import OrderedDict
from tqdm import tqdm
from argparse import ArgumentParser
import re
from difflib import Differ
import networkx as nx
import matplotlib.pyplot as plt
import numpy as np
import math
from typi... |
import numpy as np
from collections import Counter
import logging
import os, json, pickle, h5py
from keras.callbacks import Callback
from . import select_doc_pos
from keras.utils import plot_model
from utils.config import contextdir
logger = logging.getLogger('pacrr')
class DumpWeight(Callback):
def __init__(sel... |
#!/usr/bin/env python
# native Python imports
import os.path
import sys
import sqlite3
import numpy as np
from itertools import repeat
import json
# third-party imports
import cyvcf as vcf
# gemini modules
import version
from ped import default_ped_fields, load_ped_file
import gene_table
import infotag
import databa... |
# Copyright 2022 Accenture Global Solutions Limited
#
# 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 ... |
# Copyright 2018 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 applicab... |
# Copyright 2015-2018 ARM Limited
#
# 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 w... |
from __future__ import print_function, absolute_import, division #makes KratosMultiphysics backward compatible with python 2.6 and 2.7
import KratosMultiphysics as Kratos
from KratosMultiphysics import Array3, Logger
import KratosMultiphysics.DEMApplication as DEM
import KratosMultiphysics.SwimmingDEMApplication as SDE... |
#!/usr/bin/env python3
#
# Copyright (c) 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 required by applicable law or... |
from __future__ import division
from __future__ import print_function
"""
------------ Follow The Regularized Leader - Proximal ------------
FTRL-P is an online classification algorithm that combines both L1 and L2
norms, particularly suited for large data sets with extremely high dimensionality.
This implementatio... |
# --------------------------------------------------------
# Tensorflow Faster R-CNN
# Licensed under The MIT License [see LICENSE for details]
# Written by <NAME>, <NAME>, based on code from <NAME>
# --------------------------------------------------------
from __future__ import absolute_import
from __future__ import ... |
#!/usr/bin/env python3
import fire
import logging
import os, sys, traceback
from IsoNet.util.dict2attr import Arg,check_parse,idx2list
from fire import core
from IsoNet.util.metadata import MetaData,Label,Item
class ISONET:
"""
ISONET: Train on tomograms and Predict to restore missing-wedge\n
for detail di... |
#!/usr/bin/env python3
import sys
import os
import subprocess
import logging
import functools
import json
import time
import random
from argparse import ArgumentParser, RawDescriptionHelpFormatter
def enable_logging(level=logging.DEBUG):
"""Enable logging in the function with the specified logging level
Arg... |
# -*- coding: utf-8 -*-
from collections import defaultdict
from django.utils import timezone
from datetime import datetime
from math import log
from operator import itemgetter
from uuid import uuid4
from markdown2 import markdown
from unidecode import unidecode
from django.utils.html import escape
from django.core im... |
# -*- coding: utf-8 -*-
########################################################################
#
# License: BSD
# Created: April 9, 2013
# Author: <NAME> - <EMAIL>
#
# $Id$
#
########################################################################
"""A module with no PyTables dependencies that helps with deprecati... |
from builtins import range
from ...core.utils.py3 import textstring
import numpy as np
from ...core.devio import SCPI, data_format #@UnresolvedImport
from ...core.utils import funcargparse, general #@UnresolvedImport
_depends_local=["...core.devio.SCPI"]
class ITektronixScope(SCPI.SCPIDevice):
"""
Gener... |
import glob
import os
import sys
import subprocess
from configparser import ConfigParser
import numpy as np
import pandas as pd
from astropy import units as u
from astropy.io import ascii
from astropy.io import fits as pyfits
from radio_beam import Beam, Beams, commonbeam
import fits_magic as fm
def load_config(c... |
# -*- encoding: utf-8 -*-
#
# 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, so... |
from __future__ import print_function
from . import _
# Plugin definition
from Plugins.Plugin import PluginDescriptor
from Screens import PluginBrowser
from Screens.MessageBox import MessageBox
from Screens.ChoiceBox import ChoiceBox
from Components.PluginComponent import PluginComponent, plugins
from Components.Lab... |
__author__ = '<NAME>(<EMAIL>)'
__version__ = '1.16.1'
''' Extension to Cobras model class to make models ready for CAFBA
by default we deal with homogenous case as in mori et al.
This code is only compatabile with models using Biggs Notation. NB may work with KBASE models if flag KBASE =True set.
This feature was... |
# Python imports
import os
import math
# Django imports
from django.db.models import Manager as GeoManager
from django.contrib.gis.db import models
from django.contrib.contenttypes.models import ContentType
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from django.apps import apps
from django... |
from typing import Dict, Tuple
import logging
import pandas as pd
import numpy as np
import warnings
import attr
from attr.validators import instance_of
from enum import Enum
from pysight.nd_hist_generator.movie import ImagingSoftware
from ..line_signal_validators.scanimage import ScanImageLineValidator
from ..line_sig... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# king_phisher/catalog.py
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this lis... |
from __future__ import absolute_import, division, print_function
import argparse
import glob
import logging
import os
import random
import json
import numpy as np
import torch
from torch.utils.data import (DataLoader, RandomSampler, SequentialSampler,
TensorDataset)
from tor... |
import inspect
from matplotlib.pyplot import figure, savefig, text
import matplotlib.pyplot as plt
from matplotlib.patches import Rectangle
from numpy import dtype
import numpy as np
from . import colorify
def microshow(images=None, cmaps=None, flip_map=False, rescale_type=None, limits=None, num_colors=256,
... |
# Copyright 2013 the Neutrino authors (see AUTHORS).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
# Neutrino syntax tree definitions
from abc import abstractmethod
import data
import plankton
# Syntax tree visitor. The default behavior of each visit method is to apply
# the visitor recursively.
cl... |
# (c) 2005 <NAME> and contributors; written for Paste
# (http://pythonpaste.org) Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license.php
#
# For discussion of daemonizing:
# http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/278731
#
# Code taken also from QP: http://www.mems-exchange.... |
#!/usr/bin/env python
# MIT License
#
# Copyright (c) 2019 <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... |
import logging
import pickle
import glob
import datetime
import shutil
import pandas as pd
import numpy as np
from .metrics import metric_map
from .store import *
from .textset import get_textset_list
from .context import get_dataset_folder
from .folders import get_folder_list
from .xyset import XySet
log = logging.g... |
__author__ = ['<NAME>']
__bpydoc__ = 'Mesh module of KRI exporter.'
import mathutils
from io_kri.common import *
def calc_TBN(verts, uvs):
va = verts[1].co - verts[0].co
vb = verts[2].co - verts[0].co
n0 = n1 = va.cross(vb)
tan,bit,hand = None,None,1.0
if uvs!=None and n1.length_squared>0.0:
ta = uvs[1] - uvs... |
'''
The following code is used to read in NuSTAR spectral data and create spectral models.
'''
import sys
from os.path import *
import os
import numpy as np
from astropy.io import fits
from scipy.special import beta
def read_xspec_txt(f):
''' Takes a the output .txt file from XSPEC and extracts useful information... |
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright 2015-2018 by ExopyHqcLegacy Authors, see AUTHORS for more details.
#
# Distributed under the terms of the BSD license.
#
# The full license is in the file LICENCE, distributed with this software.
# ------... |
import math
import numpy as np
from PIL import Image
import cv2
import os
from glob import glob
import torch
import torchvision
import neural_renderer as nr
EPS = 1e-7
def get_renderer(world_ori=[0,0,1], image_size=128, fov=30, renderer_min_depth=0.1, renderer_max_depth=10, fill_back=True, device='cuda:0'):
###... |
#!/usr/bin/env python3
#
# bccases.py
#
# bccases.py is part of a web application written in Python and using
# Streamlit as the presentation method.
#
"""bccases page shows BC Covid Cases"""
import datetime
from datetime import timedelta
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
import nump... |
# MIT License
#
# Copyright (c) 2019 <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, publi... |
__author__ = 'DafniAntotsiou'
"""
This script is heavily based on @openai/baselines.gail.run_mujoco
"""
import argparse
import os.path as osp
import logging
from mpi4py import MPI
from tqdm import tqdm
import numpy as np
import gym
from cat_dauggi.mlp_policy_ext import MlpPolicy as mlp_policy
from baselines.common im... |
import argparse
import json
import os
import sys
import mip
from mip import Model, BINARY, INTEGER
class TournamentParams:
"""
Intended to collect some constants to describe tournament parameters.
N: Number of wrestlers in the tournament
D: Number of days in the tournametn
B: Upper bo... |
from mapmath import *
import map
# A basic Mission_list structure is [ (targer.x, targer.y), [(p1x,p1y),(p2x,p2y)...]]
# each UAV contain a few Mission_list
# and M_list store all of 15 UAVs' Mission_lists
#M_list = None
T_list = None # include original T_note and T_old
# Start with the same position as it in T_list ... |
#!/usr/bin/python2.7
"""
Copyright (C) 2014 Reinventing Geospatial, Inc.
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 3 of the License, or
(at your option) any later version.
This ... |
import os
import logging
# import collections
import yaml
import numpy as np
import joblib
from matplotlib import pyplot as plt
import graphviz as gv
# import scipy
import torch
from mathtools import utils, metrics, torchutils
from seqtools import torchutils as sequtils
from blocks.core import labels
from blocks.anal... |
import pyqtgraph as pg
import numpy as np
from functools import partial
from scipy import fft
from pyqtgraph import functions as fn
from scipy import signal
numValLen = 8
alpha = 255
blackforeground = pg.mkPen(0, 0, 0, alpha)
blackbackground = pg.mkBrush(48, 48, 48, alpha)
whiteforeground = pg.mkPen(0, 0, 0, alpha)
w... |
import numpy as np
import heapq
#输入
from scoreManagement.models import MajorCourses as MajorCourses
from scoreManagement.models import Teaching as original_Teaching
from backstage.models import ClassRoom, Student, AdmClass, MajorPlan
#输出
from courseScheduling.models import Schedule_result, Teacher_Schedule_result, Clas... |
#!/usr/bin/env python
from multiprocessing import Pool
from sys import breakpointhook
import numpy as np
import os
import matplotlib.pyplot as plt
from functools import partial
import time
import copy
import pandas as pd
import pickle
import pyapprox
from scipy import stats
# from scipy.optimize import root
from scipy... |
# Copyright 2019 QuantRocket - All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... |
import numpy as np
from phonopy.units import THzToEv, Kb
import phonopy.structure.spglib as spg
from phonopy.structure.symmetry import Symmetry
from phonopy.structure.tetrahedron_method import TetrahedronMethod
from phonopy.structure.grid_points import extract_ir_grid_points
from phonopy.cui.settings import *
#(get_per... |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
"""
Interact with Pipes metadata via SQLConnector.
"""
from __future__ import annotations
from meerschaum.utils.typing import (
Union, Any, Sequence, SuccessTuple, Mapping, Tuple, Dict, Optional, List
)
def register_pipe(
self,
pipe :... |
# container-service-extension
# Copyright (c) 2021 VMware, Inc. All Rights Reserved.
# SPDX-License-Identifier: BSD-2-Clause
from dataclasses import dataclass
from typing import List, Optional
from dataclasses_json import dataclass_json, LetterCase
import yaml
import container_service_extension.common.constants.serv... |
import os
import requests
import json
import shutil
import sqlite3
try:
from core import initLog, picturesToGallery
from color import *
except ImportError:
from .core import initLog, picturesToGallery
from .color import *
# Globals
#####################################################################... |
"""
runner_browndye.py
A command-line tool for running SEEKR calculations using the BrownDye
engine either locally or on a computing resource.
"""
import os
import re
import argparse
import glob
import seekr2.modules.common_base as base
import seekr2.modules.common_sim_browndye2 as sim_browndye2
REACTION_FILENAME = ... |
"""This module contains the code to sample ``two4two.SceneParameters``."""
from __future__ import annotations
import copy
import dataclasses
from typing import Any, Callable, Dict, Optional, Sequence, Union
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
import scipy.stats
from two4two i... |
"""Performs principle component analysis on input datasets.
This module performs principle component analysis on input datasets using
functions from scikit-learn. It is optimized to data formats used in
diff_classifier, but can potentially be extended to other applications.
"""
import random
import pandas as pd
impo... |
"""Helper functions for the import functionality"""
import pathlib
from datetime import datetime
import typing
from json import JSONDecodeError
import httpx
import numpy as np
import pandas as pd
from castoredc_api.client.castoredc_api_client import CastorException
if typing.TYPE_CHECKING:
from castoredc_api impo... |
import pygame
import sys
import os
import random
import pickle
WIN = 800
ROWS = 50
CAPTION = '2048'
SCREEN = pygame.display.set_mode((WIN, WIN))
YELLOW = (250, 248, 239)
BROWN = (187, 173, 161)
DBROWN = (119, 110, 102)
LBROWN = (214, 205, 196)
ARROWDARK = (119, 84, 71)
ARROWLIGHT = (219, 184, 171)
STARTDARK = (245, 1... |
# coding: utf-8
import sugartensor as tf
from tensorflow.python.framework import tensor_shape
from tensorflow.python.ops import array_ops
def _state_size_with_prefix2(state_size, prefix=None):
result_state_size = tensor_shape.as_shape(state_size).as_list()
if prefix is not None:
if not isinstance(prefi... |
# requirements
from __future__ import print_function
from dash.dependencies import Input, Output
import plotly.graph_objs as go
import dash_html_components as html
import dash_core_components as dcc
import dash
import pandas as pd
###############
# Import data #
###############
df_budget = pd.read_csv("data.csv")
# ... |
#@title Core imports
"""
Contains the core classes for making multi-agent grid world games.
"""
import numpy as np
#import matplotlib.pyplot as plt
import tensorflow as tf
#import sonnet as snt
import six
#tfe = tf.contrib.eager
#tf.enable_eager_execution()
__metaclass__ = type
class Map:
def __init__(self,... |
from .logger import *
from .package_level import *
import bpy
from base64 import b64encode
from mathutils import Color
from os import path, remove
from shutil import copy
from sys import exc_info # for writing errors to log file
# used in Texture constructor, defined in BABYLON.Texture
CLAMP_ADDRESSMODE = 0
WRAP_ADDR... |
# Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
# Copyright (C) 2001-2017 Nominum, Inc.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose with or without fee is hereby granted,
# provided that the above copyright notice and this permis... |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# 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.
import unittest
from typing import Optional, Tuple
import numpy as np
import torch
from common_testing import ... |
import numpy as np
import ansatz_class_package as acp
import pauli_class_package as pcp
import hamiltonian_class_package as hcp
import matrix_class_package as mcp
import scipy
#import qutip as qt
import optimizers as opt_package
from abc import ABC, abstractmethod
from scipy.integrate import ode
import scipy as s... |
"""Module containing different I/O functions to load time log data, subject condition lists, questionnaire data, etc."""
import datetime
from pathlib import Path
from typing import Dict, Optional, Sequence, Tuple, Union
import numpy as np
import pandas as pd
import pytz
from nilspodlib import Dataset
from biopsykit.... |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
from pulp import LpProblem, LpStatus, lpSum, LpVariable, GLPK, LpMinimize
OBJ_EPSILON = 1e-12
class Game(object):
def __init__(self, config, env, random_seed=1000):
self.random... |
#!/usr/bin/env python
from generator.actions import Actions
import random, string, struct
def random_string(size=20):
return ''.join([random.choice(string.ascii_letters + string.digits) for x in xrange(random.randint(8,size))])
def random_string_s(size=20):
return ''.join([random.choice(string.ascii_letters +... |
"""
Copyright (c) 2018 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in wri... |
"""
mpdb: Material Property Data Base as python module
HKF.py: aqueous electrolyte EOS
Revision Date: 2021.08.15
SPDX-License-Identifier: BSD-2-Clause
Copyright (c) 2021 <NAME>. All rights reserved.
"""
from mpdb.sandbox.waterDielectric import waterDielectric as wD
from math import log
class aqEOS(wD):
def __i... |
import csv
import io
import json
import random
import re
from django import http
from django.contrib import messages
from django.contrib.auth import get_user_model
from django.contrib.auth.decorators import login_required, permission_required
from django.contrib.auth.mixins import LoginRequiredMixin
from django.core i... |
import warnings
from typing import Iterable
import numpy as np
import pandas as pd
from .common import default_session, _set_verbose
from .frame import DataFrame
from .indexes import Index, IndexOpsMixin
from .internal import _ConstantSP, _InternalFrame
from .operator import ArithExpression, BooleanExpression
from .s... |
# Copyright (C) 2012 <NAME> <<EMAIL>>
# This file is released under the GNU LGPL, version 2.1 or a later revision.
import urwid
from urwid import AttrMap, Text, WidgetWrap, ListBox, Columns, SolidFill
from urwid import signals
__all__ = [
'TreeDecorationError', 'TreeListWalker', 'TreeBox', 'CachingMixin',
... |
import os
import glob
import time
from datetime import datetime
import pandas as pd
import torch
import numpy as np
import argparse
import gym
from env.gym_cancer.envs.cancercontrol import CancerControl
from torch.utils.tensorboard import SummaryWriter
# import roboschool
import matplotlib.pyplot as plt
# import pybull... |
from __future__ import division
import numpy as np
import cea.config
import cea.globalvar
import cea.inputlocator
import cea.technologies.chiller_vapor_compression as chiller_vapor_compression
import cea.technologies.chiller_absorption as chiller_absorption
import cea.technologies.storage_tank as storage_tank
from cea.... |
# 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
# d... |
#!/usr/bin/env python
# coding: utf8
#
# Copyright (c) 2020 Centre National d'Etudes Spatiales (CNES).
#
# This file is part of PANDORA
#
# https://github.com/CNES/Pandora
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may... |
#!/usr/bin/env python
# coding: utf-8
# # Android Data from PlayStore
# In[ ]:
get_ipython().run_line_magic('matplotlib', 'inline')
get_ipython().run_line_magic('load_ext', 'autoreload')
get_ipython().run_line_magic('autoreload', '2')
from IPython.core.interactiveshell import InteractiveShell
InteractiveShell.ast_... |
#!/usr/bin/env python
# ==============================================================================
# --General imports ------------------------------------------------------------
# ==============================================================================
import time
import math
import rospy
import os
import ... |
import dgl
import numpy as np
import torch
import torch.nn as nn
from torch_scatter import scatter_softmax, scatter_sum
from models import utils
from models.utils import GaussianSmearing, MLP, get_h_dist, get_r_feat
class BaseX2HAttLayer(nn.Module):
def __init__(self, input_dim, hidden_dim, output_dim, n_heads, ... |
import os
import sys
from collections import OrderedDict
from SteamworksParser import steamworksparser
g_SkippedFiles = (
# We don't currently support the following interfaces because they don't provide a factory of their own.
# You are expected to call GetISteamGeneric to get them.
"isteamappticket.h",
... |
"""ML-Ensemble
:author: <NAME>
:copyright: 2017-2018
:license: MIT
Parallel processing backend classes. Manages memory-mapping of data, estimation
caching and job scheduling.
"""
# pylint: disable=too-few-public-methods
# pylint: disable=too-many-arguments
# pylint: disable=too-many-instance-attributes
# pylint: disa... |
"""
vending_machine
=====
Simulates a vending machine.
Configurable parameters::
{
"product_catalogue" : (optional) [ "name" : "<NAME>", "price" : 0.80, "category" : "snack", "lifetime" : "P1000D", ... ]
"send_available_positions" : (optional) False
"cashless_to_cash_ratio" : (... |
import logging
import random
from math import sqrt, log
from stellar_system import Star
from stellar_system import Planetesimal
from stellar_system import Protoplanet
from stellar_system import Protomoon
from stellar_system import Planet
from stellar_system import Orbit
from accrete import CircumstellarDisk
from consta... |
# imports from dante files
from arguments.input import nonempty_file
from arguments import yaml_reader
# imports from global libraries
import argparse
import pandas as pd
import ensembl_rest
import re
import sys
import yaml
import textwrap
from dataclasses import dataclass
import math
from copy import deepcopy
@data... |
"""Python module for manipulating datasets."""
from __future__ import absolute_import
import random
import os
import os.path
import logging
import multiprocessing
from functools import partial
import pandas as pd
import numpy as np
from sklearn import cross_validation, preprocessing
from sklearn.decomposition import P... |
import os
import numpy
import scipy
import pandas
import datetime
import operator
import time
# CSEP Imports
from csep.utils.time import epoch_time_to_utc_datetime, timedelta_from_years, datetime_to_utc_epoch
class BaseCatalog:
"""
Base class for CSEP2 catalogs.
Todo:
Come up with idea on how to... |
__author__ = 'Ardalan'
CODE_FOLDER = "/home/ardalan/Documents/kaggle/bnp/"
# CODE_FOLDER = "/home/arda/Documents/kaggle/bnp/"
SAVE_FOLDER = CODE_FOLDER + "/diclogs/stage1/"
import theano.sandbox.cuda
theano.sandbox.cuda.use("cpu")
import os, sys, time, re, zipfile, pickle, operator
import pandas as pd
import numpy a... |
from data.base_config import dataset_specific_import, overwrite_args_from_json, \
overwrite_params_from_json, MEANS
from data.base_dataset import detection_collate, enforce_size
from utils.augmentations import SSDAugmentation, BaseTransform
from utils.functions import MovingAverage, Save... |
# Copyright (C) 2012 <NAME> <<EMAIL>>
# Date: 2012/2/20
# ##### 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 y... |
# pylint: disable=not-callable, no-member, invalid-name, line-too-long
"""
Some functions related to SO3 and his usual representations
Using ZYZ Euler angles parametrisation
"""
import math
import torch
from se3cnn.util.cache_file import cached_dirpklgz
from se3cnn.util.default_dtype import torch_default_dtype
def... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.