text stringlengths 8.04k 46.5k |
|---|
import os
import document_distance as ds
import unittest
import string
#Constants
a1 = ['from', 'time', 'to', 'time', 'this',
'submerged', 'or', 'latent', 'theater',
'in', 'becomes', 'almost', 'overt', 'it',
'is', 'close', 'to', 'the', 'surface', 'in',
'hamlets', 'pretense', 'of', 'madness', 't... |
#!/usr/bin/env python
# Copyright (c) 2006, The Regents of the University of California, through
# Lawrence Berkeley National Laboratory (subject to receipt of any required
# approvals from the U.S. Dept. of Energy). All rights reserved.
# This software is distributed under the new BSD Open Source License.
# <h... |
import numpy as np
import pycircstat
import logging
import scipy.ndimage.filters as filters
import scipy.stats as stats
from imlib.radial.misc import opposite_angle
from imlib.array.locate import peak_nd_array
from imlib.array.fit import max_polyfit
from spikey.descriptive.radial import radial_tuning_stability
impo... |
import datetime
from collections import OrderedDict
from decimal import Decimal as D
from decimal import InvalidOperation
from django.conf import settings
from django.contrib import messages
from django.core.exceptions import ObjectDoesNotExist
from django.core.urlresolvers import reverse
from django.db.models import ... |
r"""
Covariant Functorial Constructions
A *functorial construction* is a collection of functors
`(F_{Cat})_{Cat}` (indexed by a collection of categories) which associate
to a sequence of parents `(A, B, ...)` in a category `Cat` a parent
`F_{Cat}(A, B, ...)`. Typical examples of functorial
constructions are :obj:`cart... |
import subprocess
import json
import vim
import re
import os
import sys
from sys import platform
enclosing_types = [] # nothing to see here
current_enclosing = -1
atom_bound = re.compile('[a-z_0-9A-Z\'`.]')
re_wspaces = re.compile("[\n ]+")
protocol_version = 3
######## ERROR MANAGEMENT
class MerlinExc(Exception):
... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2017 Google
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
#
... |
from DataGenerator import *
#from DataLengthRandomizer import *
from LengthStandardizer import *
from Encoder import *
from keras.models import Model
from keras.layers import Dense, Activation, Flatten, Input, Dropout, MaxPooling1D, Convolution1D
from keras.layers import LSTM, Lambda, merge, Masking
from keras.layers i... |
# Lint as: python3
# Copyright 2020 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 ... |
# -*- coding: utf-8 -*-
import os
import re
import random
import traceback
import xml.etree.ElementTree as ET
import xbmc
import xbmcgui
import sys
import xbmcvfs
# Add JSON support for queries
if sys.version_info < (2, 7):
import simplejson
else:
import json as simplejson
# Import the common settings
from se... |
r"""
Composition Tableaux
AUTHORS:
- <NAME>, <NAME> (2012-9): Initial version
"""
from sage.sets.disjoint_union_enumerated_sets import DisjointUnionEnumeratedSets
from sage.sets.non_negative_integers import NonNegativeIntegers
from sage.sets.family import Family
from sage.misc.classcall_metaclass import ClasscallMet... |
# To import required modules:
import numpy as np
import matplotlib.cm as cm #for color maps
import matplotlib.pyplot as plt
from matplotlib.gridspec import GridSpec #for specifying plot attributes
#from matplotlib import ticker #for setting contour plots to log scale
import corner #corner.py package for corner plots
... |
from hail import ir
import abc
from typing import Sequence, MutableSequence, List, Set, Dict, Optional
from collections import namedtuple
class Renderable(object):
@abc.abstractmethod
def render_head(self, r: 'Renderer') -> str:
...
@abc.abstractmethod
def render_tail(self, r: 'Renderer') -> ... |
import os, sys, csv, ast, time, json
import numpy as np
from __init__ import *
import opc_python
from opc_python import * # Import constants.
ROOT_PATH = os.path.split(opc_python.__path__[0])[0]
from opc_python.utils import scoring,search
DATA_PATH = os.path.join(ROOT_PATH,'data')
PREDICTION_PATH = os.path.join(RO... |
"""
tests the pysat coords area
"""
import numpy as np
import warnings
import pandas as pds
from nose.tools import raises
import pysat
from pysat.utils import coords, time
class TestBasics():
def setup(self):
"""Runs before every method to create a clean testing setup."""
self.test_angles = np.a... |
from collections import OrderedDict
from mujoco_py import MjSim, MjRenderContextOffscreen
from mujoco_py import load_model_from_xml
from robosuite.utils import SimulationError, XMLError, MujocoPyRenderer
import robosuite.utils.macros as macros
from robosuite.models.base import MujocoModel
import numpy as np
REGISTER... |
# --------------------------------------------------------------------------
# Source file provided under Apache License, Version 2.0, January 2004,
# http://www.apache.org/licenses/
# (c) Copyright IBM Corp. 2015, 2018
# --------------------------------------------------------------------------
from collections impor... |
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
'''Utilities used by GRIT.
'''
from __future__ import print_function
import codecs
import io
import os
import re
import shutil
import sys
import tempfi... |
from sympy.core import Function, S, sympify
from sympy.utilities.iterables import sift
from sympy.core.add import Add
from sympy.core.containers import Tuple
from sympy.core.operations import LatticeOp, ShortCircuit
from sympy.core.function import (Application, Lambda,
ArgumentIndexError)
from sympy.core.expr impor... |
# Copyright 2020 The PyMC Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... |
# -*- coding: utf-8 -*-
# @author: Elie
# run on laptop vscode under env py37_xgboost_ml (python 3.7.9)
#%%
# Libraries
import pandas as pd
import os
import numpy as np
import datetime
#plotting
import seaborn as sns
import matplotlib as mpl
from matplotlib import pyplot as plt
import umap
# import math
pd.options.mod... |
#!/usr/bin/env python2
# -*- coding: utf8 -*-
#
# Copyright (c) 2019 unfoldingWord
# http://creativecommons.org/licenses/MIT/
# See LICENSE file for details.
#
# Contributors:
# <NAME> <<EMAIL>>
"""
This script generates the HTML and PDF documents for tA
"""
from __future__ import unicode_literals, print_function... |
# coding: utf-8
from __future__ import unicode_literals
import hashlib
import itertools
import re
from .common import InfoExtractor, SearchInfoExtractor
from ..compat import (
compat_str,
compat_urllib_parse,
)
from ..utils import (
clean_html,
int_or_none,
mimetype2ext,
parse_iso8601,
smu... |
# -*- coding: utf-8 -*-
"""
ticker.py
Websocket implementation for kite ticker
:copyright: (c) 2017 by Zerodha Technology.
:license: see LICENSE for details.
"""
import six
import sys
import time
import json
import struct
import logging
import threading
from datetime import datetime
from twisted.inter... |
"""Pretraining Example for Electra Model on the OpenWebText dataset"""
import os
import time
import shutil
import logging
import argparse
import functools
import collections
import mxnet as mx
import numpy as np
from mxnet.lr_scheduler import PolyScheduler
from sklearn import metrics
from pretraining_utils import El... |
# coding=utf-8
# Copyright 2020 The HuggingFace 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/LICENSE-2.0
#
# Unless required by applicable... |
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
import six
assert six.PY3, "FasterRCNN requires Python 3!"
import tensorflow as tf
import math
from tensorpack import *
from tensorpack.tfutils import optimizer
from tensorpack.tfutils.summary import add_mov... |
# coding=utf-8
# Copyright 2018 The Google AI Language Team 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 ... |
""" Define some geometrical classes with an interface similar to karta
(https://github.com/fortyninemaps/karta)
If karta is not available, this module will be loaded instead and provides some
bare-bones geometrical and geodetic capabilities.
"""
from __future__ import print_function, division
import warnings
from mat... |
import torch
from pathlib import Path
from sklearn.preprocessing import MinMaxScaler, StandardScaler
from scipy.integrate import odeint
import numpy as np
import pandas as pd
from scipy.io import loadmat
from alfi.datasets import load_barenco_puma
from alfi.utilities.data import generate_neural_dataset_2d
from . impor... |
import os
from argparse import ArgumentParser
import numpy as np
import tensorflow as tf
from net_utils import create_dir, one_hot, imagen_grande
from dataset_utils import EMNIST
from AAE import AAE
from sklearn.utils import shuffle
from OpenMax import OpenMax
from tqdm import tqdm
from generators import Inpu... |
# -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import numpy as np
from ... import units as u
from ...extern import six
from ...tests.helper import (pytest, quantity_al... |
#!/usr/bin/env python3
# Copyright 2019 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Methods to generate the verification payload from the HWID database."""
import collections
import functools
import hashlib
impor... |
# Certipy - Active Directory certificate abuse
#
# Description:
# Find certificate templates
#
# Authors:
# @ly4k (https://github.com/ly4k)
#
# References:
# https://stackoverflow.com/questions/38878647/python-convert-filetime-to-datetime-for-dates-before-1970
# https://github.com/GhostPack/Certify/blob/2b15303... |
from .sparsevecvalder import register, SparseVecValDer
import warnings
import scipy.sparse
from . import true_np as np
import numpy as modded_np
cls = SparseVecValDer
# On 5-Stage Ring Oscillator example from PyMAPP, using this instead of
# np.ndindex reduced a 200 s simulation to 150 s.
def _ndindex(shape):
sta... |
import os, math
from .constants_gzrs2 import *
from .classes_gzrs2 import *
from .io_gzrs2 import *
def readRs(self, path, state: GZRS2State):
file = open(path, 'rb')
id = readUInt(file)
version = readUInt(file)
matCount = readInt(file)
for i in range(matCount): # skip material string... |
# Author: <NAME> 2021-10-01
#
# Amazon has a new format for their website
#
# copy text of your Kindle library to a *.txt file
# entries will look a little like this:
#
# King of Thorns (The Broken Empire Book 2)
# <NAME>
# Acquired on September 24, 2021
# In2
# Collections
# 1
# Device
# Deliver or Remove from Device
... |
"""Core OGCServer classes and functions."""
import re
import sys
import copy
from sys import exc_info
from StringIO import StringIO
from xml.etree import ElementTree
from traceback import format_exception, format_exception_only
# 本句从mapnik导入Map, Color, Envelope, render, Image, Layer, Style, Projection,Coord, mapnik_ve... |
import textwrap
from datetime import datetime, timedelta
import finnhub
import numpy as np
import pandas as pd
import plotly.graph_objects as go
import pytz
import requests
import yfinance as yf
from binance.client import Client
from plotly.subplots import make_subplots
from scipy import stats
from bots import imps
... |
#!/usr/bin/env python
__author__ = 'thomasvangurp'
# Date created: 22/11/2014 (europe date)
# Function: Pipeline for mapping reads to reference
#Python version: 2.7.3
#External dependencies: samtools,pysam,methylation_calling.py
#Known bugs: None
#Modifications: None
import pysam
import argparse
import subprocess
impor... |
# -*- coding: utf-8 -*-
# python imports
import warnings
# project imports
from ..parser_core import Tokens
class RootGenerator:
def __init__(self, code_editor):
self._code_editor = code_editor
def gen_root(self):
code_editor = self._code_editor
self._gen_imports()
code_... |
# ******************************************************************************
# Copyright 2017-2019 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.apa... |
# !/usr/bin/python
# -*- coding: latin-1 -*-
# WAVELET Torrence and Combo translate from Matlab to Python
# author: <NAME>
# INPE
# 23/01/2013
# https://github.com/mabelcalim/waipy/blob/master/Waipy%20Examples%20/waipy_pr%C3%AAt-%C3%A0-porter.ipynb
"Baseado : Torrence e Combo"
# data from http://paos.colora... |
import torch
import pprint
import warnings
import numpy as np
from copy import deepcopy
from numbers import Number
from collections.abc import Collection
from typing import Any, List, Tuple, Union, Iterator, KeysView, ValuesView, \
ItemsView, Optional
# Disable pickle warning related to torch, since it has been re... |
#!/usr/bin/env python
#
# Cloudlet Infrastructure for Mobile Computing
# - Task Assistance
#
# Author: <NAME> <<EMAIL>>
#
# Copyright (C) 2011-2013 Carnegie Mellon University
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# ... |
from collections import defaultdict, OrderedDict
from utils.sortedcollection import SortedCollection
from bisect import bisect_left
from math import log, exp
import sampling
from sortedcontainers import SortedListWithKey
measure_average = "Average_Restore_Old_Err"
class Sampling_Frequency(sampling.Sampling):
def... |
# -*- coding: utf-8 -*-
"""Commad line facility for SIMBAD scripts"""
__author__ = "<NAME>"
__date__ = "14 Apr 2017"
__version__ = "0.1"
from distutils.version import StrictVersion
import argparse
import logging
import os
import platform
import sys
import time
from enum import Enum
from pyjob import cexec
from pyj... |
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.widgets import Slider, Button, RadioButtons
from sunpy.lightcurve import GOESLightCurve
from sunpy.time import TimeRange
from cwt_modified_methods_01 import *
from cwt_modified_methods_01 import _filter_ridge_lines
from scipy import signal
from matp... |
# coding=utf-8
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import hashlib
import io
import logging
import os
import json
import errno
import tensorflow as tf
import copy
import random
import numpy
import scipy
import math
import threading
import time
imp... |
# Copyright 2021 Cylynx
#
# 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, soft... |
# -*- coding: utf-8 -*-
"""
Created on Sat Feb 13 19:00:43 2016
@author: ajaver
"""
import collections
import os
import numpy as np
import pandas as pd
import tables
from scipy.ndimage.filters import median_filter, minimum_filter, maximum_filter
from tierpsy.analysis.int_ske_orient.checkFinalOrientation import check... |
import json
from math import radians
from typing import Any, Dict, List, Optional, Set, Tuple, Union
import bpy
from mathutils import Matrix
from ..common.vrm_types import Vrm0
from .template_mesh_maker import IcypTemplateMeshMaker
class ICYP_OT_make_armature(bpy.types.Operator): # type: ignore[misc] # noqa: N801
... |
from contextlib import redirect_stderr
import glob
import imp
from IPython.display import Image
from matplotlib.colors import Normalize
import matplotlib.pyplot as plt
from matplotlib.figure import Figure #!20220210
import scipy.stats
import numpy as np
import pandas as pd
import os
import json #!20220119
import tor... |
import numpy as np
# import uproot
import json
import datetime
import pytz
import os
import matplotlib
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
import matplotlib.lines as mlines
import matplotlib.ticker as ticker
from matplotlib.font_manager import FontProperties
# Define some plot constan... |
#
# The top level script for the DDRPi floor.
# This is what you run
#
# Configuration options can be given either by:
# - Including them in a config.yaml file
# - Including them in a config file as described by the option --config=
# - Defining/Overriding them on the command line with --<option>=<value>
# Options ... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2013 <NAME>
#
# 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; Applies version 2 of the License.
#
# This program is... |
from __future__ import (
absolute_import,
unicode_literals,
)
from collections import (
OrderedDict,
defaultdict,
)
from functools import wraps
import re
import sys
from types import TracebackType
from typing import (
Any,
Callable,
Dict,
Iterable,
List,
Mapping,
Optional,
... |
import logging
import calendar
import copy
import dateutil
import numpy
import datetime
from couchdbkit.ext.django.schema import Document, StringProperty, IntegerProperty, DateTimeProperty
from couchdbkit.schema.base import DocumentSchema
from couchdbkit.schema.properties import LazyDict
from casexml.apps.case.models i... |
# /home/aashish/Documents/deep_learning/attendance_deep_learning
import tensorflow as tf
from scipy import misc
import numpy as np
import argparse
import facenet
import cv2
import sys
import os
import math
import pickle
from sklearn.svm import SVC
from PIL import Image
from face_aligner import FaceAligner
import detec... |
import numpy as np
import math
import pdb
np.cat = np.concatenate
np.random.seed(100)
import torch as t
import torch.nn as nn
import torch.nn.functional as f
import torch.optim as opt
import os.path
from torch import FloatTensor as FT
from variational_methods import *
from gutenberg_data import *
from decoders import ... |
# Copyright 2020 The ElasticDL 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 law... |
"""Base classes for carbondesign Template Tags.
"""
import html
import logging
import re
from typing import Sequence
from uuid import uuid4
#-
from django import template
from django.template.base import TextNode # pylint:disable=unused-import
from django.template.base import FilterExpression, Variable
from django.util... |
from typing import Union
from typing import List
from typing import Tuple
from typing import Optional
from typing import Dict
from typing import Any
import copy
import random
import itertools
from loguru import logger
from rdkit import Chem
from rdkit.Chem import rdmolops
from rdkit.Chem.MolStandardize import rdMolS... |
from __future__ import absolute_import
import logging
from abc import ABCMeta, abstractmethod
from collections import Iterable
import six
from frontera.core import models
from frontera.core.components import Backend, DistributedBackend, Middleware, CanonicalSolver
from frontera.exceptions import NotConfigured
from f... |
import sys
import re
import yaml
import random
from glob import glob
from collections import defaultdict
from fractions import Fraction
import argparse
# Bresenham's line algorithm from Rosetta Code
# https://rosettacode.org/wiki/Bitmap/Bresenham%27s_line_algorithm#Not_relying_on_floats
def line(xy0, xy1)... |
#!/usr/bin/env python2
######################################################################
#
# File: durability.py
#
# Copyright 2018 Backblaze Inc. All Rights Reserved.
#
######################################################################
import argparse
import math
import sys
import unittest
class Table(o... |
#Video guide for setting up PyDrive: https://www.youtube.com/watch?v=j31iVbkknzM
from pydrive.auth import GoogleAuth
from pydrive.drive import GoogleDrive
from re import search
from tkinter import Tk, constants, Label, Button, font, Scrollbar, Frame, StringVar, Radiobutton
from tkinter.ttk import Treeview
from collect... |
# Copyright 2017 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 python3
import numpy as np
import h5py as h5
import os
import totalMassEvolvedPerZ as MPZ
import astropy.units as u
class COMPASData(object):
def __init__(
self,
path=None,
lazyData=True,
Mlower=None,
Mupper=None,
m2_min=None,
binaryFraction=No... |
################################################################################
# Copyright (c) 2019, <NAME>
# <NAME>
# <NAME>
# <NAME>
# <NAME>
# <NAME>
# Contact: milan.radulovic [at] bsc [dot] es
... |
from dataclasses import dataclass, asdict
from dispersals import DispersalsLogger
from typing import List, Tuple
import os
import re
import json
import pandas as pd
from general import (
GLJournal,
GLJournalLine,
GeneralLedgerTransactions,
GeneralLedger,
InMemoryChartOfAccounts,
NewNominal,
)
... |
#!/usr/bin/env python
import keras
from keras.models import Sequential
from keras.models import Model
from keras.layers import Input, Dense, Activation, Lambda
from keras.layers.convolutional import Conv2D
from keras.layers.pooling import MaxPooling2D
from keras.layers.normalization import BatchNormalization
from kera... |
# Copyright (c) 2015-2019, Activision Publishing, Inc.
# 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 ... |
import collections
import datetime
import glob
import ipaddress
import mimetypes
import os
from pathlib import Path
import re
import sys
from typing import Any, List, Callable, Tuple, Union, Dict
import uuid
from zipfile import ZipFile
import click
import croniter
import pytz
import tzlocal
import requests
import yaml... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Component models."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import datetime
from decimal import Decimal
from django.db import models as db
from django.utils.... |
""" Module containing classes that act as minimisers in a fit.
"""
import numpy
from echidna.fit.fit_results import FitResults
import copy
import abc
class Minimiser(object):
""" Base class for minimiser objects.
Args:
name (string): Name of minimiser.
per_bin (bool, optional): Flag if minimise... |
# encoding: utf-8
"""
Utilities for the optic variation method (Optikvarianzmethode) for beam
alignment.
"""
from __future__ import absolute_import
import numpy as np
from madgui.core import wx
from madgui.util.unit import format_quantity, strip_unit, get_raw_label
from madgui.widget.input import Widget
from madgui.... |
from manimlib.imports import *
# To run the code:
# cd.. back into C: drive
# cd manim\manim-master
# To run and produce video
# python -m manim work\animations\advanced_fludis\"file_name.py" Scene -pl
class Lecture2_Introduction(Scene):
def construct(self):
# title card: can work one something which can ... |
import ast
from multiprocessing.pool import Pool
from path_process import get_test_files
from dependency_analysis import get_classless_functions, get_all_class_methods, get_call
import time
class TestSmell:
"""Checks for violations of a particular test smell
Subclass this to create classes responsible for de... |
import argparse
import os
import sys
import random
import timeit
import datetime
import numpy as np
import pickle
import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
import torch.backends.cudnn as cudnn
from torch.utils import data, model_zoo
from torch.autograd import Variabl... |
#!/usr/bin/env python3
#title :app.py
#description :creates a flask application for web interface
#author :<NAME>
#date :20171128
#version :0.1
#usage :
#notes :
#python_version :3.6.0
#=======================================================================... |
#!/usr/bin/env python
import os
import uuid
import time
import logging
import hug
import json
import threading
import ev3dev.ev3 as ev3
from PIL import Image
from hug.api import INTRO
from falcon import HTTP_400, HTTP_200
from wsgiref.simple_server import make_server
from marshmallow import fields
from marshmallow.v... |
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import decimal
import calendar
import cStringIO
import datetime
from bob.csvutil import UnicodeReader
from bob.menu import MenuItem, MenuHeader
f... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Oct 18 02:07:17 2019
@author: lumi
"""
import pandas as pd
import numpy as np
from bs4 import BeautifulSoup
import tensorflow as tf
import re
from nltk.corpus import stopwords
import time
from tensorflow.python.layers.core import Dense
#from tensorflo... |
#!/usr/bin/env python3
# Copyright 2019 <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 agree... |
"""
Multiplication of distributions.
Example usage
-------------
Distribution * a constant::
>>> distribution = chaospy.Uniform(0, 1) * 4
>>> print(distribution)
Mul(Uniform(lower=0, upper=1), 4)
>>> print(numpy.around(distribution.sample(5), 4))
[2.6144 0.46 3.8011 1.9288 3.4899]
>>> print... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2013-2020 European Commission (JRC);
# Licensed under the EUPL (the 'Licence');
# You may not use this work except in compliance with the Licence.
# You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl
"""
Utils for manipulating h5db with ac... |
import time
from collections import defaultdict
from functools import partial
import numpy as np
import tensorflow as tf
from utils import get_segment_ids, get_unique, groupby_2cols_nlargest, groupby_1cols_nlargest, groupby_1cols_merge
class Graph(object):
def __init__(self, graph_triples, n_ents, n_rels, rever... |
"""paletteviz.py -- A customized and more flexible Paletteviz plotting module.
This module provides a customized and more flexible function for PaletteViz [1]_
plotting. This module also provides different relevant fucntions, parameters and tools.
Copyright (C) 2016
Computational Optimization and In... |
# -*- coding: utf-8 -*-
"""
SMC samplers.
Overview
========
This module implements:
* `StaticModel`: a base class for defining static models (and the
corresponding target distributions).
* `FeynmanKac` sub-classes that correspond to the following SMC samplers:
+ `IBIS`
+ `AdaptiveTempe... |
'''
(*)~---------------------------------------------------------------------------
Pupil - eye tracking platform
Copyright (C) 2012-2018 Pupil Labs
Distributed under the terms of the GNU
Lesser General Public License (LGPL v3.0).
See COPYING and COPYING.LESSER for license details.
------------------------------------... |
import xml.etree.ElementTree as xml
import os,sys
from PIL import Image
#
# Represents a collection of custom properties.
#
class CustomPropertyCollection:
def __init__(self):
self.properties = {} # properties defined
self.hasKey = False
def set(self,propertyName,propertyValue):
propertyName = ... |
import numpy as np
import os
import pickle
import pysam
from math import ceil, floor
from arcsv.constants import ALTERED_QNAME_MAX_LEN
from arcsv.helper import path_to_string, block_gap, fetch_seq, GenomeInterval
from arcsv.sv_affected_len import sv_affected_len
from arcsv.sv_classify import classify_paths
from arcsv.... |
# -*- coding: utf-8 -*-
""" Count contact between balls. """
import math
import os
import pygame
import pygame.locals
import random
import re
import sys
import time
class params:
def __init__(self):
# default params.
self.START_WAIT = 0
self.MAX_WIDTH = 640
self.MAX_HEIGHT = 480
... |
import os, io, datetime, struct
from pathlib import Path
from rdkit.Chem.inchi import MolToInchiKey
from utils.cheminformatics_tools_std_include import standardise_mol_remove_salts, standardise_smiles_remove_salts, usrcat_binary_struct_format_string, KeepNHighest
from rdkit.Chem.AllChem import GetMorganFingerprint
from... |
"""powerpoint_win32.py implements App and Presentation for Powerpoint in Windows using COM interface.
"""
import enum
import traceback
# pip install pywin32
import pywintypes
import win32api
import win32com.client
from process_exists import process_exists
from powerpoint_base import SlideCache, PresentationBase, PP... |
# Run inference.py to get result from one specified input
import math
import json
import os
import copy
import itertools
import ddpg
import option
import data
import model
import view
import detector
from utility import Timer
from vertebraLandmark import spineFinder
import yolo_for_chest
import numpy as np
from PIL ... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
interpret_qspr_models.py
This script contains interpretability of the qspr models. We will use the Shapley
values as a method of quantifying the feature importance.
Created on: Tue Jul 13 10:32:42 2021
Author: <NAME> (<EMAIL>)
Copyright Schrodinger, LLC. All right... |
#!/groups/kemi/mharris/.conda/envs/rdkit_2020_09/bin/python
"""
Find reactant products for the input SMILES (atom-mapped) string using
xTB meta-dynamics
"""
import os
import sys
import shutil
import subprocess
import textwrap
import hashlib
import random
import xyz2mol_local
import numpy as np
import pandas as pd
fro... |
"""
"Консольный файловый менеджер"
В проекте реализовать следующий функционал:
После запуска программы пользователь видит меню, состоящее из следующих пунктов:
- создать папку;
- удалить (файл/папку);
- копировать (файл/папку);
- просмотр содержимого рабочей директории;
- посмотреть только папки;
- посмотреть только ф... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.