text stringlengths 8.04k 46.5k |
|---|
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
# This s... |
import sys
sys.path.append('./')
import os
from vtkplotter import shapes, load, merge
import pandas as pd
import numpy as np
import allensdk.core.swc as allen_swc
from brainrender.Utils.data_io import load_json, listdir, save_json
from brainrender.Utils.data_manipulation import get_coords
from brainrender.Utils.act... |
import numpy as np
import pickle
from scipy import interpolate,pi
import pygfunction as gt
import os.path
import matplotlib.pyplot as plt
import functools
from tkinter import filedialog
import openpyxl
def timeValues():
"""This function calculates the default time values for the gfunction."""
dt = ... |
import csv
import codecs
import config
import calendar
#-------------------------------------------------------------------#
#----------------------------Date Formatter-------------------------#
#-------------------------------------------------------------------#
#fullMonthDay = the day and month
#year = year of even... |
import re
import os
import json
import time
import sys
import babel
import tensorflow as tf
import numpy as np
from babel import numbers
from wtq import evaluator
from decimal import Decimal
from nsm import agent_factory
from nsm import model_factory
from nsm import data_utils
from nsm import graph_factory
from nsm ... |
import os
import io
import re
import sys
import gzip
import glob
import time
import json
import base64
import urllib
import socket
import datetime
import traceback
import threading
from urllib.parse import quote
from urllib.request import url2pathname
from queue import Queue, Empty
from socketserver import ThreadingMi... |
# _*_ coding:utf8
import tkinter
from win32com.client import Dispatch
from tkinter import filedialog,messagebox
from tkinter import *
import sys
from sys import exit
import cv2
import numpy as np
import scipy.io
import matplotlib.mlab as mlab
import matplotlib.pyplot as plt
from MyDIPUtils.hole import f... |
import numpy as np
import tensorflow as tf
from tensorflow.python.ops.rnn_cell import GRUCell
from tensorflow.python.ops.rnn_cell import LSTMCell
from tensorflow.python.ops.rnn import bidirectional_dynamic_rnn as bi_rnn
from rnn import dynamic_rnn
from rnn import dynamic_att_rnn
from utils import *
from Dice import dic... |
# -*- coding: utf-8 -*-
###############################################################################
# Copyright (c), Forschungszentrum Jülich GmbH, IAS-1/PGI-1, Germany. #
# All rights reserved. #
# This file is part of the Masci-tools package. ... |
"""
This module is a fork of amplify-education/python-hcl2.
Some reasons not using python-hcl2:
* It returns Dict, instead of an AST. For the Runflow's use case, we
need to populate some fields in the runtime.
* The library seems problematic for a while:
* It cannot parse exp values: 1e7 => lark.exceptions.Unexp... |
#!/usr/bin/python3
# Disassembler for Western Digital CP16xx/WD21xx Microcode
# Copyright 2015 <NAME> <<EMAIL>>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3
# as published by the Free Software Foundation.
# This program is dis... |
# This file is part of GridCal.
#
# GridCal 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.
#
# GridCal is distributed in the hope that... |
"""The checks module contains two classes that are used to verify
conda packages and recipes: CondaPackageCheck and CondaRecipeCheck.
Each class contains specific checks that relate to validating packages
and recipes. These checks start with the letter 'C', which is an
abbreviation for 'conda'.
Checks C1101 through C... |
from __future__ import annotations
import collections
import sys
import typing
from lxslt import MatchNameCondition, Rule, TransformChildren,\
MatchName, TreeNode, NodeSet, select, SelectStep, DeepDive,\
apply_templates, Transformer, Replace, apply_templates_iter,\
project_children, Drop, flatten_node_sets... |
# ----------------------------------------------------------------------------
# Copyright (c) 2020, <NAME>.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# -----------------------------------------------------------------------... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
import os, sys, time, datetime, logging, readline
import threading, serial, requests, time
from enum import Enum
import codecs, binascii
from logging.handlers import TimedRotatingFileHandler
from openhab import openHAB
oh_host = 'localhost'
base_url = 'http://{oh_host}:8080/re... |
from torch import nn
import torch
import torch.nn.functional as F
from torch.autograd import Variable
from torch.nn import Parameter
import math
import copy
from functools import reduce
import operator
# Cite from https://github.com/jhhuang96/ConvLSTM-PyTorch, Thanks!
class ConvLSTM_cell(nn.Module):
"""ConvLSTMC... |
# -*- coding: utf-8 -*-
################# exact algorithm #################
import random
def subsetsum(input, target):
row, col = len(input) + 1, target + 1
db = [[False] * col] * row
for i in range(row):
db[i][0] = True
for i in range(1, row):
for j in range(1, col):... |
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
import os
import torch
import os.path
import numpy as np
import pandas as pd
from PIL import Image, ImageFile
from torchvision import transforms
import torchvision.datasets.folder
from torch.utils.data import TensorDataset, Subset
import torch.uti... |
''' bring-ex - a set of routines used throughout my work on my
minor thesis at Leiden University, including everything I need
to do the BRING simulations
'''
import sys, getopt, os
import numpy as np
from astropy.io import fits
from astropy.table import Table, Column
from astropy.io import ascii
import matplotlib as m... |
import math
import numpy as np
import owl
import time
import matplotlib.pyplot as plt
import matplotlib.animation as anim
from mpl_toolkits.mplot3d import Axes3D
import serial
def normalize(v):
norm = np.sqrt(np.sum(v**2))
if norm == 0:
return v
return v / norm
def lowpass(new, old)... |
import fornax.select
import fornax.opt
import sqlalchemy
import itertools
import collections
import json
import os
import sys
import hashlib
import typing
from sqlalchemy import event
from contextlib import contextmanager
from sqlalchemy.engine import Engine
import fornax.model as model
# TODO: sqlalchemy database in... |
#!/usr/bin/python
# encoding: utf-8
#
# Copyright 2020 <NAME>.
#
# based on Greg Neagle's 'installinstallmacos.py'
# https://github.com/munki/macadmin-scripts/blob/main/installinstallmacos.py
#
# with many thanks to <NAME> for the original script and lots of advice
# and <NAME> for helping me figure out the software up... |
# ___ ____ ____ ____ _ ____
# |__] | | | __ | __ | |___
# | |__| |__] |__] |___ |___ .py
#
# This is the main program file. It contains the main game loop,
# controller objects that inherit the model classes stored in other
# files, a couple graphics objects, and a rudi... |
####################################################################################################
# File: hm_utils.py
# Purpose: Module for storing and dealing with the Modes of Limited Transposition [MOLT] (1944).
#
# Author: <NAME>
#
# Location: NYC, 2021
####################################################... |
# Copyright (C) 2015-2020 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import re
import time
import json
import datetime
from flask import (
render_template,
request,
url_for,
redirect,
flash,
abort,
Blueprint)
from werkzeug import http as werkzeug_http
from . import (
crash,... |
'''
Copyleft 2019 by <NAME>, all rights reversed
'''
from __future__ import division, print_function
import pymol
import tempfile
import subprocess
import re
import os
import gzip
import random
import Bio.PDB
try: CODE = Bio.PDB.protein_letters_3to1
except AttributeError: CODE = Bio.PDB.to_one_letter_code
class Numb... |
import random
import pygame
import time
import math
from utils import scale_image, blit_rotate_center, blit_text_center
pygame.font.init()
TRACK = scale_image(pygame.image.load("imgs/track.png"), 0.6)
GRASS = scale_image(pygame.image.load("imgs/grass.jpg"), 2.5)
GRASS_BORDER = scale_image(pygame.image.load("imgs/gra... |
import numpy as np
import torch
from torch import nn
from torch.nn import BatchNorm1d as BN1d
from torch.nn import BatchNorm2d as BN2d
import torch.nn.functional as F
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
DILATION = 1
SIZE = 32
L_SIZE = 32
F_SIZE = 16
class MLP(torch.nn.Module):
... |
# Our (lexicographic) learning algorithms
from networks import *
import math, random, pickle, copy, time
import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
import torchvision.transforms as T
from torch.distributions import Categorical
from torch.autograd import Variable
#... |
from abstract import State, JSClosure, JSObject, JSUndefNaN, JSTop, JSRef, JSSimFct, JSPrimitive, JSValue
from debug import debug
import esprima
import plugin_manager
import output
import config
import sys
class Stats:
computed_values = 0
beta_reductions = 0
steps = 0
class Interpreter(object):
def ... |
# cython: profile=False
print("Importing `.materials.database`")
__doc__ = """
DATABASE DOCUMENTATION:
https://www-nds.iaea.org/epics/DOCUMENTS/ENDL2002.pdf
https://www-nds.iaea.org/epics/
"""
__author__ = "<NAME>"
#External Imports
from numpy import * #array, geomspace, flip, load, searchsorted
#Internal Imp... |
import logging
import numpy as np
import itertools as it
from collections import namedtuple
from scipy.spatial.distance import pdist, squareform
from ape.intcoords.constants import BOHR2ANG
from ape.intcoords.helpers_pure import log, sort_by_central, merge_sets
from ape.intcoords.elem_data import VDW_RADII, COVALENT_R... |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
The transform modules includes:
- Coordinate conversions between ACA Pixels and ACA Y-angle, Z-angle
- Mag to count conversions
- Science target coordinate to ACA frame conversions
"""
import numpy as np
from chandra_aca import dark_model
from Quate... |
import pickle
import os
import multiprocessing
from multiprocessing.pool import ThreadPool
import subprocess
from time import perf_counter
import consensx.graph as graph
from consensx import thirdparty
from .measure import correlation, q_value, rmsd
from consensx.parse import ChemShiftRecord
from consensx.misc.natura... |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... |
import random
import sys
import os
import multiprocessing as mp
from os import mkdir
from os.path import join
import numpy as np
import json
import argparse
import logging
from math import floor
logger = logging.getLogger('overlap')
def config_logger(args):
# Set file
log_file = sys.stdout
if args.log !... |
import re
from collections import OrderedDict
from functools import partial
import itertools
from six import string_types
from tabulate import tabulate
import numpy as np
from artemis.experiments.experiment_record import NoSavedResultError, ExpInfoFields, ExperimentRecord, \
load_experiment_record, is_matplotlib_i... |
# Calculates the probability of each discrete answer (i.e., 1, 2, 3, 4 or 5) assuming the normal model of subject
# responses. The normal model is understood as a normal distribution N(psi, sigma), where psi is a so called "true
# quality" and sigma is an error term.
#
# The probabilities are calculated for a grid of p... |
"""Module to run the clustered Neural Network Simulations as in Litwin-Kumar & Doiron 2012"""
__author__ = '<NAME>'
import os
import numpy as np
import matplotlib.pyplot as plt
from pypet.trajectory import Trajectory
from pypet.brian2.parameter import Brian2Parameter, Brian2MonitorResult
from pypet.brian2.network im... |
"""
Main script, where Lime classes are redefined in order to calculate stability indices.
To do so, the original class LimeTabularExplainer gets overridden by the LimeTabularExplainerOvr,
which allows for the same usage done in original Lime.
Moreover it contains the check_stability method, which calculates CSI and VS... |
from dataclasses import dataclass
import math
from poemsai.data import LabelsType, LabelsDecoderExplained, PoemsFileConfig
from poemsai.metrics import compute_lm_metrics, ConditionalGenLoss, MetadataLessLoss, SimpleMetadataLessLoss
import torch
import torch.nn as nn
import torch.nn.functional as F
from typing import Li... |
# coding=UTF-8
"""
LJ OSC and Websockets laser commands
v0.7.0
LICENCE : CC
by <NAME>, Loloster
from /team/laser
Commands reference. Use commands from websocket (webUI) or OSC, do not set values in redis directly except for /pl.
DAChecks()
UpdateAllwww()
/forwardui "htmlid args"
/scale/X/lasernumber value
/s... |
"""
Class Features
Name: drv_dataset_hmc_io_type
Author(s): <NAME> (<EMAIL>)
Date: '20200401'
Version: '3.0.0'
"""
#######################################################################################
# Library
import logging
import os
import numpy as np
import pandas as pd
from copy i... |
import os
from datetime import datetime
from typing import List
import numpy as np
from numpy import floor, ceil
from sklearn.cluster import KMeans
import digit_classification
import cv_utils
import state
import cfg
import cv2
os.system('unset SESSION_MANAGER')
def get_median_line_color_in_img(line, img, show_median... |
"""
Radial Basis Function N-dim fitting. See :ref:`rbf` for details.
"""
import math
import numpy as np
from scipy import optimize
import scipy.linalg as linalg
from pwtools import num
try:
from sklearn.model_selection import RepeatedKFold
except ImportError:
class RepeatedKFold:
def __init__(*args... |
import os
from torchsummary import summary
os.environ['OMP_NUM_THREADS'] = '1'
# import argparse
# import torch
# from src.env import create_train_env
# from src.model import PPO
# from gym_super_mario_bros.actions import SIMPLE_MOVEMENT, COMPLEX_MOVEMENT, RIGHT_ONLY
# import torch.nn.functional as F
import argparse
i... |
import os
import sys
import argparse
import motmetrics as mm
import numpy as np
import pandas as pd
def get3Dpos(df, cam, task):
"""
Returns the 3D position in a dataset
Input:
df: Pandas dataframe
cam: Camera view
task: Not used
Output:
pos: Numpy array of size [n_id... |
# Support module for the xlrd3 package.
#
# Portions copyright (c) 2005-2008 <NAME>, Lingfo Pty Ltd
# This module is part of the xlrd package, which is released under a
# BSD-style licence.
#
# 2010-12-08 mozman refactoring for python 3
# 2008-02-10 SJM BIFF2 BLANK record
# 2008-02-08 SJM Preparation for Excel ... |
"""Utility script to generate the HTML used for IEMBot Channel Documentation
"""
import re
import psycopg2.extras
from pyiem.util import get_dbconn, logger
from pyiem.reference import prodDefinitions
from pyiem.nws.ugc import UGC
from pyiem.nws.nwsli import NWSLI
from pyiem.nws.products.vtec import parser as vtec_pars... |
from __future__ import absolute_import, division, print_function
import os.path
import datetime
from warnings import warn
import copy
import csv
import sqlite3
import numpy as np
from astropy.io import fits
import pandas
from sunpy.time import parse_time
from sunpy import config
from sunpy.util.net import check_down... |
# Copyright 2017 The Bazel 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 applicable la... |
# stdlib
import json
import os
import re
import stat
import subprocess
from typing import Any
from typing import Dict as TypeDict
from typing import List as TypeList
from typing import Optional
from typing import Tuple as TypeTuple
from typing import cast
# third party
import click
# relative
from .art import hagrid
... |
"""
SparseArray data structure
"""
from __future__ import division
# pylint: disable=E1101,E1103,W0231
import numpy as np
import warnings
import pandas as pd
from pandas.core.base import PandasObject
from pandas import compat
from pandas.compat import range
from pandas.compat.numpy import function as nv
from pandas... |
# Copyright 2018 University of Basel, Center for medical Image Analysis and Navigation
#
# 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
#
# U... |
# coding=utf-8
# Copyright 2021 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... |
# -*- coding: utf-8 -*-
"""
Functions for mapping AHBA microarray dataset to atlases and and parcellations
"""
from functools import reduce
import nibabel as nib
import numpy as np
import pandas as pd
from . import correct, datasets, io, probes_, samples_, utils
from .utils import first_entry, flatten_dict
import l... |
import os
import sys
import os.path
from os.path import join as pjoin, dirname as pdirname
from distutils.errors import DistutilsPlatformError
from distutils.errors import DistutilsExecError, DistutilsSetupError
from numpy.distutils.command.build_ext import build_ext as old_build_ext
from numpy.distutils.ccompiler im... |
# -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2019, 2020.
#
# 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... |
import numpy as np
import tensorflow as tf
from tfsnippet.utils import (add_name_arg_doc, get_static_shape, concat_shapes,
get_shape, is_tensor_object, assert_deps,
InputSpec)
from .control_flows import smart_cond
from .assertions import assert_rank, assert_ran... |
# -*- coding: utf-8 -*-
import os
import re
from .._compat import pjoin
from .._globals import IDENTITY, LOGGER, THREAD_LOCAL
from .._load import classobj, gae, ndb, NDBDecimalProperty, GAEDecimalProperty, \
namespace_manager, Key, NDBPolyModel, PolyModel, rdbms, have_serializers, \
serializers, simplejson
fro... |
from datetime import (
datetime,
date,
timedelta)
from flask_marshmallow.fields import fields
from marshmallow import (
post_load,
ValidationError,
validates,
validates_schema,
pre_load,
pre_dump,
post_dump, validate
)
from marshmallow_sqlalchemy import field_for
from notificati... |
#!/usr/bin/env python
# stdlib modules
import copy
# third party imports
import numpy as np
from openquake.hazardlib.geo.point import Point
from openquake.hazardlib.geo.utils import get_orthographic_projection
from impactutils.vectorutils.ecef import latlon2ecef
from impactutils.vectorutils.vector import Vector
from... |
from __future__ import annotations
import datetime
import pathlib
import re
from dataclasses import dataclass, field
from typing import Any, ClassVar, Dict, List, Optional, Union
import lark
from . import settings, transformer
from .common import AnyPath, FullLoadContext, ShellStateHandler
from .db import RecordInst... |
import re
import json
import datetime
import traceback
import dns.name
import dns.reversename
from distutils.version import StrictVersion
from flask import Blueprint, render_template, make_response, url_for, current_app, request, redirect, abort, jsonify, g, session
from flask_login import login_required, current_user,... |
import numpy as np
import astropy.units as u
from astropy.io import fits
from .. import poppy_core
from .. import optics
from .. import zernike
from .. import wfe
from .. import physical_wavefront
NWAVES = 0.5
WAVELENGTH = 1e-6
RADIUS = 1.0
NPIX = 101
DIAM = 3.0
def test_ZernikeAberration(display=False):
# veri... |
# -*- coding: utf-8 -*-
# Copyright (c) 2015, Frappe Technologies and contributors
# License: MIT. See LICENSE
import traceback
import json
from rq.timeouts import JobTimeoutException
import smtplib
import quopri
from email.parser import Parser
from email.policy import SMTPUTF8
from html2text import html2text
from si... |
# coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, <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 Lic... |
from django.shortcuts import render, get_object_or_404, redirect
from django.contrib.auth.decorators import login_required
from .models import Anuncio, AnuncioFoto, AnuncioCidade, Conversa, Mensagem
from .forms import AnuncioForm, AnuncioFotoForm, ConversaForm, MensagemForm
from usuarios.models import Usuario
from djan... |
# Copyright 2020 The DDSP Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... |
import collections
import itertools
import json
import os
import re
from datetime import date, datetime
from pathlib import Path
from typing import Any, Iterable, Optional, Union
from zoneinfo import ZoneInfo
import attrs
import httpx
import yaml
import roman
# From https://stackoverflow.com/questions/1175208/elegan... |
import copy
from dataclasses import asdict, dataclass
from typing import Any, Dict, List, Optional, Set, Union
from pyparsing import (
Literal,
ParseException,
ParseResults,
Suppress,
Word,
ZeroOrMore,
alphanums,
alphas,
nums,
)
import great_expectations.exceptions as ge_exceptions... |
# -*- coding: utf-8 -*-
"""
Copyright <NAME> <<EMAIL>> 2020
Functions that process HTTP connections
"""
from datetime import timedelta, datetime
import tempfile
import os
import pathlib
from bs4 import BeautifulSoup
import openpyxl
from logzero import logger
from django.http import HttpResponseRedirect, JsonResponse,... |
from matplotlib import pyplot as plt
from matplotlib import gridspec
import configparser
import os
import pickle
import glob
import tqdm
import numpy as np
from skimage import morphology
from bird import loader
from bird import utils
from bird import preprocessing as pp
from bird import signal_processing as sp
from b... |
import itertools
import math
import numpy as np
from scipy import ndimage as ndi
from scipy.ndimage import filters as ndif
from collections import OrderedDict
from ..exposure import histogram
from .._shared.utils import assert_nD, warn
from ..transform import integral_image
from .. import util
from skimage import dtype... |
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
# ... |
import numpy as np
from sklearn.base import BaseEstimator
#import matplotlib.pyplot as plt
#import tensorflow as tf
#from .utils import InputError, is_positive_integer, ceil
#from sklearn.manifold import *
#from sklearn.decomposition import *
#from sklearn.linear_model import *
#from sklearn.model_selection import *
#... |
import pytest
import numpy as np
from scipy import sparse
import io
from sklearn.utils.testing import assert_allclose
from sklearn.utils.testing import assert_allclose_dense_sparse
from sklearn.utils.testing import assert_array_equal
from sklearn.utils.testing import assert_array_almost_equal
from sklearn.utils.test... |
'''
Importing pandasTools enables several features that allow for using RDKit molecules as columns of a Pandas dataframe.
If the dataframe is containing a molecule format in a column (e.g. smiles), like in this example:
>>> from rdkit.Chem import PandasTools
>>> import pandas as pd
>>> import os
>>> from rdkit import R... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# File: model.py
import tensorflow as tf
from tensorpack.tfutils import get_current_tower_context
from tensorpack.tfutils.summary import add_moving_summary
from tensorpack.tfutils.argscope import argscope
from tensorpack.tfutils.scope_utils import under_name_scope
from ten... |
#!/usr/bin/env python3
# -*- coding:utf-8 -*-
#
####
# File: bruteForceModel.py
# Project: NN
#-----
# Created Date: Wednesday 20.01.2021, 19:52
# Author: Apop85
# #-----
# Last Modified: Wednesday 20.01.2021, 19:52
#-----
# Copyright (c) 2021 Apop85
# # This software is published under the MIT license.
# Check htt... |
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# Copyright (c) 2014-2021 <NAME> <<EMAIL>>
# Py-cpuinfo gets CPU info with pure Python 2 & 3
# It uses the MIT License
# It is hosted at: https://github.com/workhorsy/py-cpuinfo
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this soft... |
from __future__ import absolute_import
import difflib
from functools import wraps, partial
import re
from flask import request, url_for, current_app
from flask import abort as original_flask_abort
from flask import make_response as original_flask_make_response
from flask.views import MethodView
from flask.signals impor... |
from __future__ import print_function
from __future__ import absolute_import
################################################################################
# RelMon: a tool for automatic Release Comparison
# https://twiki.cern.ch/twiki/bin/view/CMSPublic/RelMon
#
#
# ... |
# ----------------------------------------------------------------------
# Name: wx.lib.splitter
# Purpose: A class similar to wx.SplitterWindow but that allows more
# than a single split
#
# Author: <NAME>
#
# Created: 9-June-2005
# RCS-ID: $Id$
# Copyright: (c) 2005 by Total Co... |
# -*- coding: utf-8 -*-
"""
.. created on Thu Jan 18 23:55:19 2018
.. author: PE LLC <EMAIL>
.. copyright: 2018, <NAME>. Apache 2.0 v2 licensed.
:method: makeBuild() internal call
Compile the exe or dll files given the user information
Use modified pyc.py to compile with subprocess call to
IronPython ipy.exe.
Stop ... |
#!/usr/bin/python3
from __future__ import division
import unittest
import math
#import logging
#logging.basicConfig(level = logging.DEBUG)
from gi.repository import Vips
Vips.leak_set(True)
unsigned_formats = [Vips.BandFormat.UCHAR,
Vips.BandFormat.USHORT,
Vips.BandForma... |
from flask import Flask, request, jsonify, render_template, send_from_directory, flash, redirect
from werkzeug.utils import secure_filename
from flask import make_response
from flask_sqlalchemy import SQLAlchemy
from flask_marshmallow import Marshmallow
from flask_mail import Mail
from flask_mail import Message
from wa... |
from __future__ import annotations
import hashlib
import importlib
import os
import re
import shutil
import tempfile
from datetime import datetime
from functools import lru_cache
from pathlib import Path
from types import SimpleNamespace
from typing import Any, Dict, FrozenSet, Iterable, List, Optional, Set, Tuple, Ty... |
import numpy as np
import os
import math
import random
from numpy import genfromtxt
import numpy as npimport
from numpy import genfromtxt
import pandas as pd
# import re
import glob
import subprocess
from molecule_json import Molecule
from molecule_json import MoleculeList
def CFOUR_input_files(
method, basis_set,... |
from iguanas.metrics import FScore, AlertsPerDay
from iguanas.utils.types import PandasDataFrame
import iguanas.utils as utils
import pytest
import numpy as np
import pandas as pd
import json
from sklearn.metrics import fbeta_score, precision_score, recall_score
import string
from tqdm import tqdm
@pytest.fixture
def... |
from configs import USER_HOME, kgbert_data_dir
from nn_utils.help import *
from torch.utils.data import Dataset, TensorDataset, DataLoader
from os.path import join
from utils.common import save_json, load_json, save_list_to_file, load_list_from_file, file_exists
from tqdm import tqdm, trange
import collections
import l... |
#!/usr/bin/env python
""" Provides a general purpose HTTP server that can be configured with content location,
service gateway and web sockets """
__author__ = '<NAME>, <NAME>'
import flask
from flask import Flask, Response, request, render_template
from flask_socketio import SocketIO, SocketIOServer
from flask_oaut... |
"""
modeldimensions module. Contains the model dimension information
"""
import sys
from .simulationtime import SimulationTime
from .modelgrid import UnstructuredModelGrid, ModelGrid
from ..mfbase import StructException, FlopyException, VerbosityLevel
from ..data.mfstructure import DatumType
from ..utils.mfenums im... |
import itertools
from datetime import datetime
from logging import getLogger
from typing import List, Optional
import numpy as np
import pandas as pd
import scipy.sparse as sp
import tensorflow as tf
import redshells
from redshells.model.early_stopping import EarlyStopping
from redshells.model.gcmc_dataset import Gcm... |
from flask import Flask, render_template, url_for, request, redirect
# from node_form import Node_Form
import pprint
pp = pprint.PrettyPrinter(indent=4)
import json
import os
app = Flask(__name__)
app.config['SECRET_KEY'] = 'notsecretkey'
class Data():
def __init__(self):
self.currentFolder = 'root'
... |
# This file is part of QuTiP: Quantum Toolbox in Python.
#
# Copyright (c) 2011 and later, <NAME> and <NAME>.
# 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. Redistribut... |
r"""
Segment module
This module provides a number of tools that can be used to enumerate
or work with segments within a database.
The base argument type for some of the utilities within this module
is the ``idaapi.segment_t``. This type is interchangeable with the
address or the segment name and so either can be used... |
#!/usr/bin/python3
# A Python script to generate training data given ELF or PE files including their
# relevant debug info.
#
# This Python script is meant to replace the horrible bash script that is
# currently responsible for doing this.
import subprocess, os, fnmatch, codecs, random, shutil, multiprocessing, glob
... |
from typing import (
Any,
Callable,
Dict,
Iterable,
Iterator,
NamedTuple,
Optional,
Set,
)
from contextlib import contextmanager
import pendulum
import prefect
from prefect.core import Edge, Flow, Task
from prefect.engine.result import Result
from prefect.engine.results import ConstantR... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.