text stringlengths 8.04k 46.5k |
|---|
"""MCEq Flux Models
This script implements the use of MCEq flux models via the IceCube standard
method of getFlux(ptype, energy, costheta). As such it may be used as a
drop-in replacement for other fluxes. Weighting in IceCube is performed
by multiplying the flux by the normalized one weight:
NuGen:
(with generat... |
import pandas as pd
import numpy as np
from .base import register_verb, register_type_methods_as_verbs
from .column_spec import parse_column_specification, series_and_strings_to_names
# register all pandas.DataFrame functions and properties.
DataFrameGroupBy = pd.core.groupby.DataFrameGroupBy
SeriesGroupBy = pd.core.g... |
import numpy as np
from scipy import interpolate
from scipy.optimize import curve_fit
from mosaic.utilities import normInverse
import logging
from matplotlib import pyplot as plt
from mosaic.fitEllipse import fit_ellipse
from matplotlib.patches import Ellipse
loggerFormat = '%(asctime)-15s %(filename)s %(message)s'
... |
import os as _os
import shutil as _shutil
from apodeixi.util.a6i_error import ApodeixiError
from apodeixi.util.path_utils import PathUtils, FolderHierarchy
from apodeixi.util.yam... |
# -*- coding: utf-8 -*-
from aiida.common.exceptions import (
ConfigurationError, DbContentError, InvalidOperation,
MissingPluginError)
from aiida.common.utils import classproperty
__copyright__ = u"Copyright (c), 2015, ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE (Theory and Simulation of Materials (THEOS) and Na... |
'''
Created on 18 Feb 2012
@author: Qasim
Coordinates start from 0,0 in an image
'''
import time
import os.path
import logging
import math as maths
from PIL import ImageGrab, Image
import win32api, win32con
from dna import Tower
import dna
DEBUG = False
#(x,y) mouse locations in game_view for the locations in DNA... |
from __future__ import absolute_import
import os
from functools import reduce
import numpy as np
from ocrd import Processor
from ocrd_utils import getLogger, concat_padded, xywh_from_points, points_from_xywh, MIMETYPE_PAGE
from ocrd_modelfactory import page_from_file
from ocrd_models.ocrd_page import (
to_xml,
... |
from __future__ import annotations
from .geom import *
from deepsvg.difflib.tensor import SVGTensor
from .util_fns import get_roots
from enum import Enum
import torch
import math
from typing import List, Union
Num = Union[int, float]
class SVGCmdEnum(Enum):
MOVE_TO = "m"
LINE_TO = "l"
CUBIC_BEZIER = "c"
... |
#!/usr/bin/env python3
# Pygame Sprite Module
"""Two-Dimentional Game Base Module"""
NAME = '2d Game Base Module'
__version__ = '0.0.1'
import pygame
from math import *
from pygame.locals import *
from Vector2 import Vector2
from random import randint
class Base2DError(Exception):
"""Base2D Exceptions"""
# ... |
# coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. 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 cop... |
import numpy as np
import pandas as pd
import matplotlib as mpl
import matplotlib.pyplot as plt
from mpl_toolkits.basemap import Basemap
from matplotlib.patches import Polygon
from matplotlib.patches import Patch
import matplotlib.path as mplPath
# area and centroids for polygons in shapefiles
from choropie import po... |
# 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 logging
import math
from dataclasses import dataclass, field
from typing import Optional
from omegaconf import II
import torch
import... |
"""
Seamless shareserver REST protocol
Short version:
ctx.a.share() =>
- http://localhost:5813/ctx/a gives the value of the cell (HTTP GET)
- At the same address, the value of the cell can be changed with a HTTP PUT request
- An update to ctx.a sends a notification to ws://localhost:5138/ctx
- http://localhost:5813/ct... |
import selenium
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.support.ui import WebDriverWait
import time, os, re, requests, logging
from requests.exceptions import Timeout
from selenium.webdriver.chrome.optio... |
import os
import collections
import subprocess
import sys
import time
import warnings
from copy import deepcopy
from distutils import dir_util
from multiprocessing import Process
import numpy as np
import avod
import avod.builders.config_builder_util as config_builder
from avod.builders.dataset_builder import DatasetB... |
# coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HugginFace Inc. team.
#
# 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/LICENS... |
import pandas as pd
import numpy as np
from prettytable import PrettyTable
import matplotlib.pyplot as plt
import pyromat as pyro
from prettytable import ALL
tabelaA3 = pd.read_csv("termo.csv", sep = ' ')
Pmax = tabelaA3.loc[tabelaA3['PRESSAO']== tabelaA3['PRESSAO'].max()]
Pmax = float(Pmax['PRESSAO'])
Pmin = tabelaA... |
from selenium import webdriver
import csv;
class RocketLeagueStats:
wins = 0 # Number of wins
goalShotRatio = 0.0 # How many shots did score ratio
goals = 0 # Number of goals
shots = 0 # Number of shots
assists = 0 # Number of Assists
saves = 0 # Number of saves
mvps = 0 # Number of MVPS
... |
# coding=utf-8
# Copyright 2022 The Google Research 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 applicab... |
"""
This script contains functions for plotting the results
"""
from collections import OrderedDict
from typing import List, Union, Tuple
from warnings import warn
import numpy as np
from scipy.stats import gaussian_kde
from scipy.special import expit as sigmoid
from matplotlib import pyplot as plt
from matplotlib... |
"""Functions from the Sass "standard library", i.e., built into the original
Ruby implementation.
"""
from __future__ import absolute_import
from __future__ import division
import logging
import math
from six.moves import xrange
from scss.functions.library import FunctionLibrary
from scss.types import Boolean, Colo... |
from socket import *
import threading
import tkinter as tk
from tkinter import PhotoImage, messagebox
from threading import *
import re
from time import sleep
import sys
from tkinter.font import BOLD
# costanti
BUFSIZE = 4096
FORMAT = 'utf-8' # prima era 'utf8'
HOST = '127.0.0.1'
PORT = 53000
ADDR = (... |
from flask import render_template, request
from app import app, host, port, user, passwd, db
from app.recommend_dinner import recommend_dinner, historical_dinner_match, generated_dinner_match
from app.top_foods import top_eight_foods
from flask import flash, redirect
from gensim.models import word2vec as gword2vec
fr... |
#!/usr/bin/python
# -*- encoding: utf-8 -*-
'''
@Time : 2021/03/16 10:34:57
@Author : Camille
@Version : 0.7beta
'''
import ast
import json
from logging import error, fatal
import socket
import struct
import time
from enum import Enum
from threading import Thread, enumerate
from auxiliaryTools import Pretty... |
"""
Defines the DataFrameViewer class to display DataFrames as a table. The DataFrameViewer is made up of three separate
QTableWidgets... DataTableView for the DataFrame's contents, and two HeaderView widgets for the column and index headers
"""
from PyQt5 import QtGui, QtCore, QtWidgets
from PyQt5.QtCore import QAbst... |
import argparse
import io
import json
import logging
import logging.config
import os
import sys
from base64 import b64encode
from collections import Counter
from datetime import datetime
from dcicutils.ff_utils import get_authentication_with_server, search_metadata, post_metadata
from uuid import uuid4
from ..commands... |
#
# BSD 3-Clause License
#
# Copyright (c) 2021, <NAME>
# All rights reserved.
#
# For more information on the WSJT-X protocol look at the file
# NetworkMessage.hpp located in the wsjt-x source directory
# (src/wsjtx/Network/NetworkMessage.hpp)
#
# I use the camel case names to match the names in WSJT-X
# pylint: disab... |
import numpy as np
import mcubes
import sys
import os
def read_sdf(filepath):
"""
Read SDF, i.e. from a text file containing one 60*40*60 dim vector.
:param filepath: file to read
:type filepath: str
:return: sdf values
:rtype: numpy.ndarray
"""
values = []
with open(filepath, 'r'... |
# -*- coding: utf-8 -*-
"""
Continuously take an optical density reading (more accurately: a turbidity reading, which is a proxy for OD).
Topics published to
pioreactor/<unit>/<experiment>/od_reading/od_raw/<channel>
Ex:
pioreactor/pioreactor1/trial15/od_reading/od_raw/1
a json file like:
{
"vo... |
"""DFT jobs workflow related methods.
"""
#| - Import Modules
import os
import sys
import random
import json
from pathlib import Path
from shutil import copyfile
import numpy as np
import pandas as pd
# #########################################################
from proj_data import compenv
# ######################... |
# coding=utf8
class Node(object):
def __init__(self, key):
self.key = key
self.parent = None
self.left_child = None
self.right_child = None
self.height = 0
self.size = 1
def __iter__(self):
""" Return all nodes that are in the current subtree (sorted by ... |
#!/usr/bin/env python
# encoding: utf-8
"""Tests for circlify"""
import unittest
import circlify as circ
import hypothesis as h
import hypothesis.strategies as hst
# Set this variable to True to get a display of the layout (req matlplotlib)
display_layout = False
class CircleTest(unittest.TestCase):
"""Check ... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2014 <NAME> <<EMAIL>>
# Copyright: (c) 2020, <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
DOCUMENTATION = ... |
# Copyright (c) 2018 <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, distribute, ... |
import numpy as np
from joblib import Parallel, delayed
np.seterr(all='raise', divide='raise', over='raise', under='raise', invalid='raise')
def euclidean_distance(point1_xy, point2_xy, x_coord=0, y_coord=1, c_coord=2):
diff_x = point2_xy[x_coord] - point1_xy[x_coord]
diff_y = point2_xy[y_coord] - point1_xy[... |
# coding=utf-8
# Copyright 2017-2019 The THUMT Authors
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import copy
import tensorflow as tf
import thumt.layers as layers
import thumt.losses as losses
import thumt.utils as utils
from thumt.models.model impo... |
import os
import pickle
import warnings
from typing import Dict, List, Optional, Tuple
import matplotlib as mpl
import numpy as np
import pandas as pd
import seaborn as sns
from pandas.plotting import register_matplotlib_converters
from sklearn.metrics import accuracy_score
from sklearn.model_selection import Randomiz... |
#
# Copyright (c) 2018, Salesforce, Inc.
# The Board of Trustees of the Leland Stanford Junior University
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions ... |
import pickle
import scipy.io as sio
import scipy.misc as scm
import numpy as np
import street_config as cfg
from easydict import EasyDict as edict
import matplotlib.pyplot as plt
import os
from os import path as osp
import other_utils as ou
import pascal_exp as pep
import subprocess
import pdb
import cv2
from sklearn.... |
# Copyright 2020 <NAME> (<EMAIL>).
# Copyright 2018 The TensorFlow Authors All Rights Reserved.
r"""Provides EPOS model definition and helper functions.
Based on DeepLab model:
https://github.com/tensorflow/models/blob/master/research/deeplab/model.py
"""
import tensorflow as tf
from epos_lib import common
from epos... |
# -*- coding:utf-8 -*-
# --------------------------------------------------------
# Copyright (C), 2016-2020, lizhe, All rights reserved
# --------------------------------------------------------
# @Name: can_service.py
# @Author: lizhe
# @Created: 2021/5/1 - 23:42
# ------------------------------------... |
import time
import torch
from torch.utils.data import DataLoader
import torch.optim as optim
import torch.optim.lr_scheduler as lr_scheduler
from chebygin import *
from utils import *
from graphdata import *
import torch.multiprocessing as mp
import multiprocessing
try:
import ax
from ax.service.managed_loop im... |
from collections import MutableMapping
from unittest import mock
import matplotlib
import numpy as np
import pytest
from hrv.rri import (
RRi,
RRiDetrended,
_create_time_array,
_prepare_table,
_validate_rri,
_validate_time,
)
from tests.test_utils import FAKE_RRI
class TestRRiClassArguments:
... |
##################################################################
# #
# Procedural Dungeon Generator v1.1 #
# #
# By Jay (Battery) ... |
# module for processing networkx graphs in various ways
import pandas as pd
import numpy as np
import csv
import gzip
from tqdm import tqdm
import matplotlib.pyplot as plt
import seaborn as sns
import pymaid
from tqdm import tqdm
from joblib import Parallel, delayed
import networkx as nx
import networkx.utils as nxu
... |
"""
This implementation is converted from
https://github.com/Kuree/cgra_pnr/blob/master/cyclone/src/graph.hh
with adjustments due to language difference.
"""
import enum
from typing import List, Tuple, Dict, Union, NamedTuple, Iterator
from ordered_set import OrderedSet
from abc import abstractmethod
MAX_DEFAULT_DEL... |
from flask import json, request, abort, make_response, g
from flask import render_template
import sys, os
import datetime, re, copy
from werkzeug.security import check_password_hash
from collections import defaultdict
import redis
import analytics
import requests
from totalimpact import app, tiredis, collection, incom... |
from __future__ import print_function
# modiofied based on PythTB python tight binding module.
import numpy as np
from builtins import range, zip
from pyglib.iface.wannierio import get_wannier_data
def tb_wigner_seitz(ngrid,lat):
deg_ws = []
rvec_ws = []
ndiff = np.zeros(3)
for n0 in range(-ngrid[0... |
import sqlite3
import hashlib
import AdminControls
# First connect to the database
# I am terrible at OOP
sqlite_file = 'waste_management.db'
conn = sqlite3.connect(sqlite_file)
c = conn.cursor()
# Identifiers for pbkdf2_hmac that must not be changed
# Salting the password is random and gives extra protection
# Iter... |
from __future__ import absolute_import
from __future__ import print_function
from keras import backend as K
import os
import argparse
import warnings
import numpy as np
import tensorflow as tf
import keras.backend as K
import keras
from keras.models import Sequential
from keras.layers import Dense, Dropout, Flatten
fr... |
import os
import numpy as np
import bisect
from pyImagingMSpec.ion_datacube import ion_datacube
from pyMSpec import instrument
from array import array
from pyImagingMSpec.utils import find_nearest
import json
def imsDataset(filename):
def clean_ext(ext):
return ext.lower().strip('.')
KNOWN_EXT = {'imz... |
# %%
import re
from numba import jit
import numpy as np
from konlpy.tag import Mecab
mecab = Mecab()
import utils
re_var = re.compile(r'((@[ns]?|#|\$)[0-9]+)(\D|$)')
re_number = re.compile(r'[0-9]+([.][0-9]+)?(/[0-9]+([.][0-9]+)?)?')
re_numvar = re.compile(r'[A-Z]')
re_numexpr = re.compile(r'[0-9A-Z\(][0-9A-Z\(\)\.\+... |
import argparse
import copy
import json
import os
import threading
import time
import sys
from robustness import airsim
import numpy as np
import PIL
import torch
import torchvision.models as models
import torchvision.transforms as transforms
from IPython import embed
import cv2
from tools.attacks import PGD, Normali... |
from json import dumps as json_dumps
from typing import Optional, List
from pydantic import Field, PrivateAttr
from pydantic.main import BaseModel
# todo: add select carousel
# todo: add select list
class OpenUrlAction(BaseModel):
url: str
class Image(BaseModel):
url: str
accessibilityText: str
class I... |
# -*- coding: utf-8 -*-
"""
Created on Tue Oct 26 16:46:44 2021
@author: OTPS
"""
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.colors import LogNorm
import scipy as scipy
from CQED_fit import fit
from CQED_fit import avoided_crossing_direct_coupling_flat
from CQED_fit import avoided_crossing_dir... |
"""
COAsT add on with shoothill api wrapper
Created on 2021-11-04
@author: jelt
This package augements the COAsT package acting as a wrapper for the Shoothill
API. This does require a key to be setup. It is assumed that the key is
privately stored in
config_keys.py
The shoothill API aggregates data across the count... |
#!/usr/bin/env python
# Contributed September 2019 by Fraunhofer SIT (https://www.sit.fraunhofer.de/en/).
import unittest
import os
import cle
from cle.backends.macho.binding import BindingState,read_sleb,read_uleb
from cle.backends.macho.binding import n_opcode_done,n_opcode_set_dylib_ordinal_imm,n_opcode_set_dylib... |
"""
The Linux version of my original WinShutdown application.
https://github.com/jcemerson/WinShutdown
This was strictly designed to meet the requirements my wife defined
for her needs, namely:
1. Simple, easy-to-use interface
2. Large buttons for convenient selection
3. Preset time-settings fo... |
"""MEVM for stlye tasks: Writer ID and Repr"""
import argparse
import json
import logging
import os
import pickle
import sys
import h5py
import numpy as np
import pandas as pd
from ruamel.yaml import YAML
from sklearn.decomposition import PCA, IncrementalPCA
import torch
from exputils import io
from hwr_novelty.mode... |
# -*- coding: utf-8 -*-
"""
Created on Wed Feb 28 13:11:07 2018
@author: neh69
"""
import sys
import numpy as np
#import matplotlib
import pandas as pd
#import mplcursors
from uncertainties import ufloat
import t2fit
import lmfit as lm
from matplotlib import pyplot as plt
#import seaborn as sns
f... |
#!/usr/bin/env python3
### vcfMerger2
###
### MIT License
###
### Copyright (c) 2018 Translational Genomics Research Institute
###
### 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 witho... |
import os
import numpy as np
import argparse
import glob
import cv2
import time
import sys
import scipy
from sklearn.decomposition import PCA
import torch
from torch.autograd import Variable
from torch.utils.data import DataLoader, Dataset, TensorDataset
import torchvision.transforms as transforms
import torchvision.... |
"""The wx gridder!
[o] "wawa" Gridded NWS Watch Warning Advisory codes
[o] "ptype" Precip type (int flag) -> MRMS
[o] "tmpc" 2m Air Temperature
[o] "dwpc" 2m Dew Point
[o] "smps" 10m Wind Speed
[o] "drct" 10m Wind Direction (no u/v components)
[o] "vsby" Visibility, understandin... |
"""Some basic example datasets for testing."""
from distutils.version import LooseVersion
from itertools import product
import os
from pathlib import Path
import shutil
import mne
from mne import minimum_norm as mn
import numpy as np
from .. import _info, load
from .._data_obj import Dataset, Factor, Var, NDVar, Case... |
# Copyright 2017, 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 2012 by <NAME>. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Bio.SearchIO parser for BLAT output formats.
This module adds support for parsing BLAT outputs. B... |
import inspect
import logging
from furl import furl
from django.apps import apps
from django.contrib.admin.utils import (
help_text_for_field, label_for_field
)
from django.core.exceptions import (
FieldDoesNotExist, ImproperlyConfigured, PermissionDenied
)
from django.db.models.constants import LOOKUP_SEP
fr... |
from copy import deepcopy
from enum import Enum, auto
from typing import *
import operator
# region Helper Classes and Methods
class Point(tuple):
"""
This type wraps Tuple[int, int] to provide additional operators and convenience members.
Point are expressed in the form (x, y) where x is the board column... |
# Copyright 2014 eBay Software 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 ... |
# Copyright (c) MONAI Consortium
# 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... |
import os
import uuid
from datetime import date
import pandas as pd
import paypalrestsdk
from flask import Flask, render_template, request, redirect, url_for, flash, jsonify, session
import Item
import Product
import User
from Forms import *
UPLOAD_FOLDER = 'static/files'
ALLOWED_EXTENSIONS = {'png', 'jpg', 'jpeg', ... |
from enum import Enum
from typing import Any, Dict, List, Optional
from rest_framework import serializers
from rest_framework.exceptions import NotFound, ValidationError
from web3.exceptions import BadFunctionCallOutput
from gnosis.eth import EthereumClientProvider
from gnosis.eth.django.serializers import (EthereumA... |
# Copyright 2009-2011 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 in writing, softwa... |
import json
import logging
import multiprocessing
import os
from pathlib import Path
from typing import Optional, Tuple, List
import psutil as ps
import re
import shutil
import subprocess
import tempfile
import time
import traceback
from datetime import datetime, timezone
from ddtrace import tracer
from ddtrace.ext i... |
# -*- coding: utf-8 -*-
"""This module contains the user interface blueprint for the application."""
import datetime
import logging
import sys
from collections import defaultdict
from operator import itemgetter
import flask
from flask import current_app, flash, redirect, render_template, request, url_for
from flask_... |
#!/usr/bin/env python
import sys
import yaml
import rospy
import numpy as np
import time
import tf_conversions
from std_srvs.srv import Empty
import std_msgs
from crazyswarm.srv import *
from crazyswarm.msg import TrajectoryPolynomialPiece, FullState, Position, VelocityWorld
from tf import TransformListener
from .vis... |
# Copyright (c) 2018, salesforce.com, inc.
# All rights reserved.
# SPDX-License-Identifier: BSD-3-Clause
# For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
"""BERT finetuning runner."""
from __future__ import absolute_import, division, print_function
impor... |
import numpy as np
from scipy import signal
import scipy.ndimage as ndimage
import re
import collections
from scipy import interpolate
import qcodes
# from . import data_array
from qcodes.data import data_array
## supporting functions for data processing
def create_kernel(x_dev, y_dev, cutoff, distr):
distribut... |
class Interaction:
r"""Base interaction class
"""
def __init__():
r"""Initialize self. See help(type(self)) for accurate signature.
"""
pass
class MembraneForces(Interaction):
r"""
Abstract class for membrane interactions.
Mesh-based forces acting on a membrane ... |
from direct.interval.IntervalGlobal import *
from BattleBase import *
from BattleProps import *
from direct.directnotify import DirectNotifyGlobal
import random
from direct.particles import ParticleEffect
import BattleParticles
import BattleProps
from toontown.toonbase import TTLocalizer
notify = DirectNotifyGlobal.dir... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#/******************************************************************************
# * $Id$
# *
# * Project: GDAL
# * Purpose: GDAL API_PROXY server written in Python
# * Author: <NAME>, <even dot rouault at mines-paris dot org>
# *
# *****************************************... |
import numpy as np
import deepchem as dc
from deepchem.feat import Featurizer
from deepchem.feat.atomic_coordinates import ComplexNeighborListFragmentAtomicCoordinates
from deepchem.feat.mol_graphs import ConvMol, WeaveMol
from deepchem.data import DiskDataset
import multiprocessing
import logging
def _featurize_com... |
import logging
import multiprocessing
import pickle
import warnings
from abc import ABCMeta, abstractmethod
from concurrent.futures.process import ProcessPoolExecutor
from dataclasses import asdict, dataclass, is_dataclass
from itertools import chain
from math import isclose
from pathlib import Path
from typing import ... |
#!/usr/bin/env python
# encoding: utf-8
# <NAME>, 2005-2008 (ita)
"base for all c/c++ programs and libraries"
import os, sys, re
import TaskGen, Task, Utils, preproc, Logs, Build, Options
from Logs import error, debug, warn
from Utils import md5
from TaskGen import taskgen, after, before, feature
from Constants impor... |
#!/usr/bin/env python3
#
# M3TIOR 2018
#
# This is a small internal research library. Meant to help my brain work
# through a hypothesis I've recently developed regarding the use of dna within
# micro-organisms.
#
# Basically, I'm a weird person, and by weird, I mean I'm constantly attempting
# to find ways to disprov... |
#!/usr/bin/env python
#
# Azure Linux extension
#
# Copyright (c) Microsoft Corporation
# All rights reserved.
# MIT License
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
# documentation files (the ""Software""), to deal in the Software without restrictio... |
'''
Manages YAML config files as layered configurations with imports.
:class:PathConfig loads YAML files from a path::
pc = PathConfig('/path/to/file.yaml')
This can be reloaded via the ``+`` operator. ``+pc`` reloads the YAML file
(but only if it is newer than before.)
:class:ChainConfig chains multiple YAML f... |
# Importing modules
import logging
import logging.handlers
from contextlib import suppress
import os
def make_logger():
with suppress(FileExistsError): os.mkdir('logs')
LOG_FILENAME = 'logs/main.log'
# Set up a specific logger with our desired output level
log = logging.getLogger('MainLogger')
log.s... |
import math
from typing import List, Optional, Tuple
import torch
from torchaudio.models.emformer import _EmformerAttention, _EmformerImpl, _get_weight_init_gains
def _get_activation_module(activation: str) -> torch.nn.Module:
if activation == "relu":
return torch.nn.ReLU()
elif activation == "gelu":... |
import datetime
import decimal
import re
import post_office.models
import pytz
from django.contrib.auth.models import User
from django.core.exceptions import ValidationError
from django.core.signals import request_finished
from django.core.validators import validate_slug
from django.db import models
from django.db.mod... |
# Copyright 2019 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... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# DCASE 2018
# Task 5: Monitoring of domestic activities based on multi-channel acoustics
# Baseline system
# ---------------------------------------------
# Author: <NAME> ( <EMAIL> ) and <NAME> ( <EMAIL> )
# KU Leuven University / Advanced Integrated Sensing lab (ADVISE)... |
from collections import deque
import logging
import os
import pathlib
import pandas as pd
import opendssdirect as dss
from PyDSS.pyLogger import getLoggerTag
from PyDSS.unitDefinations import unit_info
from PyDSS.dataset_buffer import DatasetBuffer
from PyDSS.exceptions import InvalidConfiguration, InvalidParameter
... |
#!/usr/bin/env python
"""AFF4 Objects to enforce ACL policies."""
import email
import jinja2
from grr import config
from grr.lib import rdfvalue
from grr.lib import utils
from grr.lib.rdfvalues import client as rdf_client
from grr.server import access_control
from grr.server import aff4
from grr.server import email_... |
""" Provides template object `source_template` for kernels C source code.
"""
# Author: <NAME>
# Created: May 2018
from collections import defaultdict
from copy import deepcopy
from .templating import Template, Predicate, flatten
from . import utils
#
# Predicate functions
#
def has(key):
return Predicate(lambda ... |
# Copyright 2012-2014 MongoDB, 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 or agreed to in writin... |
import bisect
import copy
import collections
import copy
import math
import random
from collections import defaultdict
import mmcv
import numpy as np
from mmcv.utils import build_from_cfg, print_log
from torch.utils.data.dataset import ConcatDataset as _ConcatDataset
from .builder import DATASETS, PIPELINES
from .coc... |
# -*- coding: utf-8 -*-
# Copyright 2011 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/LICE... |
import json
import copy
import os
import sys
import time
import logging
from collections import defaultdict
import tensorflow as tf
import numpy as np
from sklearn import decomposition
from . import labeler_utils
from .base_model import BaseModel, BaseTrainableModel
from .base_model import AutoSubRegistrationMeta
_f... |
"""
Module for customising opensim segmented muscle points by host mesh fitting
the bone surface
"""
import os
import numpy as np
import copy
from gias2.fieldwork.field import geometric_field
from gias2.fieldwork.field.tools import fitting_tools
from gias2.common import transform3D
from gias2.registration import alignm... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.