text stringlengths 8.04k 46.5k |
|---|
"""
Basic two sided matching markets.
"""
import numpy as np
from MatchingMarkets.util import InvalidPrefsError, InvalidCapsError, MaxHeap, \
generate_prefs_from_random_scores, generate_caps_given_sum, round_caps_to_meet_sum
from MatchingMarkets.matching_alg import deferred_acceptance
class ManyToOneMarket(objec... |
#!/usr/bin/env python
"""
Client library to communicate with a OpenRefine server.
"""
# Copyright (c) 2011 <NAME>, Real Programmers. All rights reserved.
# 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 Fo... |
import requests, json
import numpy as np
from ftplib import FTP
from osgeo import ogr
from osgeo import osr
import os.path
import zipfile
import time
from math import floor, ceil, atan2, pi, sqrt
import pickle
import simplekml
from osgeo import gdal
import urllib.request
def loadMapsWCS(bbox, dim, mapTyp... |
# Lint as: python3
# Copyright 2020 DeepMind Technologies Limited. 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
#
# U... |
# ----------------------------------------------------------------------------
# cocos2d
# Copyright (c) 2008-2012 <NAME>, <NAME>, <NAME>,
# <NAME>
# Copyright (c) 2009-2019 <NAME>, <NAME>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provid... |
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import os
import re
import sys
import time
import argparse
import subprocess
try:
import rich, Crypto
except ModuleNotFoundError as e:
print('\n[!] 遇到致命错误!')
print('\n[!] 模块rich, pycryptodome未安装, 请在终端中执行命令`pip3 install rich pycryptodome`进行安装.\n')
print('[!] 程... |
"""
The fusion strategy. The goal of the fusion strategy is to find a pair of
adjacent rows, or adjacent columns such that they can be viewed as a single
column, with a line drawn between them. When this fusion happens, an assumption
that we can count the number of points in the fused row or column is added.
When we m... |
# Copyright 2004-2008 <NAME>.
# Distributed under the Boost Software License, Version 1.0. (See
# accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
"""contains classes that allow to configure code generation for free\\member functions, operators and etc."""
import os
from . import u... |
# -*- coding: utf-8 -*-
from future import standard_library
standard_library.install_aliases()
from builtins import str
from builtins import map
from builtins import object
import re
class HocrSpecProperties(object):
class HocrSpecProperty(object):
"""
Definition of a 'title' property
... |
# Copyright (C) 2015-2016 Red Hat, Inc. All rights reserved.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions
# of the GNU General Public License v.2.
#
# You should have received a copy of the GNU General Public License
# a... |
#
# Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... |
from __future__ import print_function
import numpy as np
np.set_printoptions(threshold='nan')
import h5py
import theano
import argparse
import itertools
import subprocess
import logging
import time
import codecs
import os
from copy import deepcopy
import math
import sys
from data_generator import VisualWordDataGener... |
#!/usr/bin/env python
# -*- coding:utf-8 -*-
# @Filename: field.py
# @License: BSD 3-clause (http://www.opensource.org/licenses/BSD-3-Clause)
import numpy as np
import fitsio
import scipy.optimize as optimize
import matplotlib.pyplot as plt
import ortools.sat.python.cp_model as cp_model
import kaiju
import kaiju.ro... |
#!/opt/local/bin/python
# Physics Equation Graph
# <NAME> <<EMAIL>>
# automate entry of content
import yaml # for reading "config.input"
import readline # for auto-complete # https://pymotw.com/2/readline/
import rlcompleter # for auto-complete
import time # for pauses
import sys
import os
lib_path = ... |
# -*- coding: utf-8 -*-
from typing import TYPE_CHECKING, Optional, Dict, Any, Tuple, List, Iterable, Sequence
import abc
import importlib
import itertools
import os
import yaml
from bag import float_to_si_string
from bag.io import read_yaml, open_file, load_sim_results, save_sim_results, load_sim_file
from bag.lay... |
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.patches import ConnectionPatch
from matplotlib.transforms import Bbox
import seaborn as sns
import utils
from utils import filters, maxima, segment, merge
import warnings
def pipeline(img, low, high, roi_percentile=85, focal_scope='global', maxima_are... |
# coding: utf-8
# Copyright 2015 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 req... |
import pprint
import re
from typing import Any, Dict
import numpy as np
import pytest
from qcelemental.molutil import compute_scramble
from qcengine.programs.tests.standard_suite_contracts import (
contractual_accsd_prt_pr,
contractual_ccd,
contractual_ccsd,
contractual_ccsd_prt_pr,
contractual_ccs... |
__author__ = "<NAME>"
__email__ = "<EMAIL>"
import pymel.core as pm
import mgear.rigbits.sdk_io as sdk_io
import mgear.core.pickWalk as pickWalk
SDK_ANIMCURVES_TYPE = ("animCurveUA", "animCurveUL", "animCurveUU")
# reload(sdk_io)
# ================================================= #
# MATH
# =======================... |
#!/usr/bin/env python
"""
Scheduling tactician.
"""
import os
import logging
import numpy as np
import ephem
from collections import OrderedDict as odict
from obztak import get_survey
from obztak.utils.projector import angsep
from obztak.utils import projector as proj
from obztak.ctio import CTIO
from obztak.utils i... |
#exec(open("C:\\dev\\blender\\blogo\\src\\blogo.py").read())
import bpy
import math
import mathutils
import numpy as np
import runpy
#exec(open("C:\\dev\\blender\\blogo\\src\\blogo_colours.py").read())
import blogo_colours
import blogo
# TODO
# Clean up functions
# Add config file reading (with defau... |
# The experiment logic and analysis
import copy
import gym
import json
import matplotlib
import multiprocessing as mp
import warnings
import numpy as np
import platform
import pandas as pd
import traceback
from keras import backend as K
from os import path, environ
from rl.util import *
from rl.agent import *
from rl.m... |
# typelib <unable to determine filename>
_lcid = 0 # change this if required
from ctypes import *
WSTRING = c_wchar_p
from comtypes import IUnknown
LONG_PTR = c_int
from comtypes import GUID
from comtypes import IUnknown
from ctypes import HRESULT
from comtypes import helpstring
from comtypes import COMMETHOD... |
#!/usr/bin/env python
# bamPlot.py
'''
The MIT License (MIT)
Copyright (c) 2013 <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 righ... |
import pysplishsplash
import gym
import pickle
import numpy as np
import torch
import argparse
import os,sys
import time
from scipy.ndimage import gaussian_filter,gaussian_filter1d
from scipy.stats import linregress
from scipy.spatial.transform import Rotation as R
import math
import matplotlib.pyplot as plt
from tqdm... |
# 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... |
# Copyright (C) 2019 <NAME>
# Copyright (C) 2020 Sony Mobile Communications Inc.
# Licensed under the LICENSE.
'''
Parses hprof files' main record stream.
'''
import struct
import codecs
import gc
from contextlib import contextmanager
from enum import Enum
from .error import FormatError, HprofError, UnexpectedEof, ... |
import multiprocessing
import time
from multiprocessing import Queue
import numpy as np
import os
from keras import Input, Model
from keras.layers import Dense, Conv2D, MaxPooling2D, concatenate, Flatten
from keras_vggface.vggface import VGGFace
from skimage.feature import hog
from skimage.metrics import structural_si... |
#The_Glit-ch#4859
#https://github.com/The-Glit-ch
#4/4/21
#<----->
import discord, json, os, uuid, asyncio
#<----->
from discord.ext import commands
from discord.errors import *
#Vars
Key = ""
__author__ = 557339295325880320
ProfilesDir = os.path.abspath(__file__).replace("\ArtistUnited.py","\Profi... |
from datetime import date,datetime,timedelta
from random import randint
from bokeh.io import output_file, show
from bokeh.layouts import widgetbox, Spacer
from bokeh.models import ColumnDataSource,CustomJS,Div
from bokeh.models.widgets import DataTable, DateFormatter, TableColumn, Tabs, Panel
from bokeh.models.widgets ... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
libG(oogle)Reader
Copyright (C) 2010 <NAME> <<EMAIL>> http://asktherelic.com
Python library for working with the unofficial Google Reader API.
Google may break this at anytime, I am not responsible for damages from that
breakage, but I will try my best to fix it.
Us... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
import os
import mock
import pytest
import dallinger.db
import datetime
import signal
from dallinger.config import get_config
from dallinger.heroku import app_name
from dallinger.heroku.messages import EmailingHITMessenger
from dallinger.heroku.messages import EmailConfig
@py... |
import abc, logging, os, anytree
from dbac_lib.dbac_primitives import IPrimitiveCollection, HardMiningSVM
from dbac_lib.dbac_feature_ext import IFeatureExtractor
from dbac_lib.dbac_util import CycleIterator, batch_iterator, TicToc
from dbac_lib import dbac_expression
import numpy as np
import tensorflow as tf
import te... |
import numpy as np
import pandas as pd
import sys
import hashlib
import io
import os
from . import glob_var
from . import structures
from . import type_conversions
def decompress_motifs_from_bitstring(bitstring):
motifs_list = []
total_length = len(bitstring)
current_spot = 0
while current_spot < t... |
#! /usr/bin/python
import struct
import argparse
from xml.dom.minidom import *
header = '''\
#! /usr/bin/python
import struct
from types import *
class LLRPError(Exception):
def __str__(self, message = ""):
return message
class LLRPResponseError(LLRPError):
def __str__(self, message = ""):
... |
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
use this code to extract these four metrics:
1. ROUGE
2. METEOR
3. REPETITION WITHIN SUMMARY
4. OVERLAP WITH ARTICLE
5. AVG SENTS and LEN SUMMARIES
"""
import os
import glob
import json
import pyrouge
import hashlib
import logging
import subproces... |
#
# Copyright 2016 Pixar
#
# Licensed under the Apache License, Version 2.0 (the "Apache License")
# with the following modification; you may not use this file except in
# compliance with the Apache License and the following modification to it:
# Section 6. Trademarks. is deleted and replaced with:
#
# 6. Trademarks. T... |
# import libraries
import os
import numpy as np
import pandas as pd
import xarray as xray
import ftplib, wget, urllib
import dask as da
from dask.diagnostics import ProgressBar
from multiprocessing.pool import ThreadPool
import matplotlib.pyplot as plt
import shapely.ops
from shapely.geometry import box, Polygon
from m... |
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import cm
import math
"""
############# GENERAL GAS CLASS ###########
"""
class Gas():
def __init__(self,T,P,R_u=8.31447):
self.T = T
self.P = P
self.R_u=R_u
self.normalshock=self.Shock(s... |
from icemac.addressbook.address import phone_number_entity
from icemac.addressbook.address import postal_address_entity
from icemac.addressbook.addressbook import address_book_entity
from icemac.addressbook.entities import Entities, PersistentEntities, Field
from icemac.addressbook.entities import Entity, get_bound_sch... |
#! /usr/bin/env python3
import os, sys, sqlite3, functools, configparser, textwrap
import os.path as op
from datetime import datetime, timezone
from . import cli_parser, utils, data_access, core
from .rainbow import ColoredStr, cstr
from .data_access import DataAccess
from .utils import (
DATA_DIR, DB_PATH, VERSION_... |
import tkinter as tk #possibly nessesary unsure
import cv2
import numpy as np
import matplotlib.pyplot as plt
import time
import sys
import os
import re
SCALEDOWNFACTOR = 0.2 #This is a magic number but what can ya do. I dont have a good way of getting image resolution.
SCALEUPFACTOR = 2.0
GAIN = 13.2
DIST... |
#!/usr/bin/env python
# coding: utf-8
# In[24]:
import json
import random
import numpy as np
from pathlib import Path
from typing import Tuple, List
import math
import matplotlib.pyplot as plt
#get_ipython().run_line_magic('matplotlib', 'inline')
from tensorflow.keras.layers import Input, Dense, Conv2D, MaxPooling2... |
#
# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
# or more contributor license agreements. Licensed under the Elastic License 2.0;
# you may not use this file except in compliance with the Elastic License 2.0.
#
"""sync_sharepoint module allows to sync data to Elastic Enterprise Search.
... |
'''
'''
#
# Adapted from MATLAB code written by <NAME> (see Nishimoto, et al., 2011).
# <NAME> (Jan, 2016)
#
# Updates:
# <NAME> (Apr, 2020)
#
import itertools
from PIL import Image
import numpy as np
from moten.utils import (DotDict,
iterator_func,
log_compress,
... |
#!/usr/bin/env python
from __future__ import division
"""@package etddf
ROS interface script for delta tiering filter
Filter operates in ENU
"""
from etddf.delta_tier import DeltaTier
import rospy
import threading
from minau.msg import ControlStatus
from etddf.msg import Measurement, MeasurementPackage, NetworkEsti... |
import time
import fero
import uuid
import io
import datetime
from fero import FeroError
import pandas as pd
from marshmallow import (
Schema,
fields,
validate,
validates_schema,
ValidationError,
EXCLUDE,
)
from typing import Union, List, Optional, IO
from .common import FeroObject
VALID_GOALS... |
import logging
from functools import partial
import numpy as np
import torch
from torch import nn
from deepqmc import Molecule
from deepqmc.physics import pairwise_diffs, pairwise_distance
from deepqmc.torchext import sloglindet, triu_flat
from deepqmc.utils import NULL_DEBUG
from deepqmc.wf import WaveFunction
from... |
#%matplotlib inline
import matplotlib.pyplot as plt
import tensorflow as tf
import numpy as np
from sklearn.metrics import confusion_matrix
import time
from datetime import timedelta
import math
import os
tf.logging.set_verbosity(tf.logging.INFO)
log_dir = 'tmp/loopy-nn/board/loop004' # Tensorboard log dir
save_dir =... |
from mutation import *
from evolocity_graph import *
import evolocity as evo
np.random.seed(1)
random.seed(1)
def parse_args():
import argparse
parser = argparse.ArgumentParser(description='Flu NP sequence analysis')
parser.add_argument('model_name', type=str,
help='Type of languag... |
#Genel
import sys, os, math, csv, random, time, datetime, webbrowser, subprocess
#PyQt5
from PyQt5 import QtWidgets, QtCore, QtGui
from tasarim import Ui_MainWindow
from PyQt5.QtWidgets import QFileDialog, QMessageBox
#TensorFlow
import tensorflow as tf
import tensorflow.keras
from tensorflow.keras.models import Se... |
# MIT License
#
# Copyright (c) 2016-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, ... |
from __future__ import absolute_import
from ..coordinate import Coordinate
from ..roi import Roi
from .shared_graph_provider import\
SharedGraphProvider, SharedSubGraph
from ..graph import Graph, DiGraph
from pymongo import MongoClient, ASCENDING, ReplaceOne, UpdateOne
from pymongo.errors import BulkWriteError, Wri... |
import os.path
from data.base_dataset import BaseDataset, get_transform
from data.image_folder import make_dataset
from PIL import Image
import random
import cv2 as cv
import numpy as np
import os
class ROI_transforms(object):
def __init__(self, size=(128, 128)):
super(ROI_transforms).__init__()
s... |
#!/usr/bin/env python
# The MIT License (MIT)
# Copyright (c) 2016 <NAME>, <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... |
import matplotlib
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
sns.set_style("dark")
plt.rcParams['figure.figsize'] = 16, 12
import pandas as pd
from tqdm import tqdm_notebook, tqdm
import io
from PIL import Image
from glob import glob
from collections import defaultdict
import os
import pic... |
"""Transformation of the FERC Form 714 data."""
import logging
import pathlib
import re
import geopandas
import numpy as np
import pandas as pd
import pudl
import pudl.constants as pc
logger = logging.getLogger(__name__)
##############################################################################
# Constants req... |
"""
Implements modification of human attributes at different levels.
###################### Quarantining / Behavior change logic ########################
Following orders takes care of the person faced with multiple quarantining triggers (each trigger has a suggested duration for quarantine) -
(i) (not app-base... |
'''
Code generator for shader libraries.
'''
Version = 49
import os, platform, json
import genutil as util
from util import glslcompiler, shdc
from mod import log
import zlib # only for crc32
if platform.system() == 'Windows' :
from util import hlslcompiler
if platform.system() == 'Darwin' :
from util impor... |
# Copyright © 2018 VMware, Inc. All Rights Reserved.
# SPDX-License-Identifier: BSD-2-Clause OR GPL-3.0-only
#!/usr/bin/python
ANSIBLE_METADATA = {
'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'
}
DOCUMENTATION = '''
---
module: vcd_vapp_vm_nic
short_description: Ansible Mo... |
from . import tools
import os
from datetime import datetime
import logging
import matplotlib.cm as mplcm
import matplotlib.pyplot as plt
import numpy as np
from ipywidgets import Layout
import ipywidgets as widgets
from IPython.display import display
import cv2
DEFAULT_EXTENSIONS = ['jpg', 'png', 'tif', 'iff', '... |
import numpy as np
import featureflow as ff
import zounds
from torch import nn
import torch
from torch.autograd import Variable
import argparse
import glob
import os
from pytorch_wgan2 import \
BaseGenerator, BaseCritic, CriticLayer, GeneratorLayer, FinalGeneratorLayer
from scipy.signal import resample, tukey
from... |
"""Testing the MutableBaseModel and NewBaseModel objects of cbc_sdk.base"""
import pytest
import logging
from cbc_sdk.base import MutableBaseModel, NewBaseModel
from cbc_sdk.endpoint_standard import Policy, Event, Recommendation
from cbc_sdk.platform import Process
from cbc_sdk.rest_api import CBCloudAPI
from cbc_sdk.... |
from astropy.cosmology import WMAP7 as cosmo
from astropy.constants import c as C
from astropy import units as u
from astropy.table import Table
from astropy.io import ascii
import numpy as np
from linetools import utils as ltu
from linetools.isgm.abscomponent import AbsComponent
from linetools.spectra.io import readsp... |
"""Classes wrapping :class:`~boto3.resources.base.ServiceResource` objects.
The methods and arguments on these classes somtimes differ in name from those in Boto3's
Resources to make them easier to understand in this context..
Glossary:
service_name:
The snake_case name of an AWS service (e.g. ``ec2``)
... |
"""Module providing machine and buffer classes for simprod simulations
The module provides definitions for for class `Machine` and `Storage`.
Example
-------
TODO
Notes
-----
TODO
Attributes
----------
TODO
"""
# Generic imports
from enum import Enum
import random
# SimPy related imports
from simpy import Even... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright Kitware 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 ... |
import struct
from StringIO import StringIO
class Structure(object):
def __init__(self):
if not hasattr(self, "_fields_"):
raise NotImplementedError("No _fields_ in structure")
self.__size__ = 0
self.__struct_fields__ = {}
for _, field_type in self._fiel... |
import copy
import logging
from collections.abc import Collection, Mapping
from dataclasses import FrozenInstanceError, asdict, dataclass, field, replace
from typing import List, Optional, Union
from . import __version__
from .composition import AdapterCompositionBlock
from .utils import get_adapter_config_hash, resol... |
import contextlib
import os
import pickle
import sys
import time
from collections import Counter
from pathlib import Path
from typing import Dict, List, Optional, Union
import joblib
import numpy as np
import pandas as pd
import rdkit.Chem as Chem
import rdkit.Chem.AllChem as AllChem
from joblib import Parallel, delay... |
"""
Draw Figures - Chapter 4
This script generates all of the figures that appear in Chapter 4 of the textbook.
Ported from MATLAB Code
<NAME>
24 March 2021
"""
import utils
from utils.unit_conversions import lin_to_db, db_to_lin
import matplotlib.pyplot as plt
from matplotlib.patches import Ellipse
import numpy as... |
#! BPY
#add-on information
bl_info = {
"name": "BOB Exporter (text)",
"description": "Export mesh data with UV's into Binary Object Format (Bob) text format",
"author": "<NAME>",
"version": (2018, 3, 11),
"blender": (2, 79, 0),
"location": "File > Import-Export",
"warning": "",
"wiki_ur... |
# -*- coding: utf-8 -*-
"""
@author: NysanAskar
"""
import numpy as np
import tensorflow as tf
from keras import backend as K
import keras
from tensorflow.keras.layers import (
Add,
Input,
)
from utils import xywh_to_x1y1x2y2, broadcast_iou, binary_cross_entropy
anchors_wh = np.array([[10, 13... |
import asyncio
from concurrent.futures import CancelledError
import itertools
from typing import (
Dict,
FrozenSet,
Iterable,
Set,
Tuple,
Type,
)
from eth_hash.auto import keccak
from eth_utils import (
encode_hex,
to_checksum_address,
ValidationError,
)
from eth_typing import (
... |
from functools import reduce
import re
strings = []
number_of_strings = -1
def top_level_split(s):
"""
Split `s` by top-level commas only. Commas within parentheses are ignored.
"""
# Parse the string tracking whether the current character is within
# parentheses.
balance = 0
parts = ... |
from collections import Counter, defaultdict, OrderedDict
from sklearn.neighbors.kde import KernelDensity
import itertools
import numpy as np
import os
import pysam
import random as rnd
import sys
import matplotlib
matplotlib.use('Agg') # required if X11 display is not present
import matplotlib.pyplot as plt... |
from linlearn import BinaryClassifier, MultiClassifier
from linlearn.robust_means import Holland_catoni_estimator, gmom, alg2
import numpy as np
import gzip
import logging
import pickle
from datetime import datetime
import sys
import seaborn as sns
import matplotlib.pyplot as plt
import pandas as pd
from scipy.special ... |
import argparse
import sys
from collections import defaultdict
from collections.abc import Sequence as AbstractSequence
from contextlib import suppress
from functools import partial
from typing import (
Any,
Callable,
Dict,
NamedTuple,
Optional,
Sequence,
Type,
TypeVar,
Union,
)
if ... |
import numpy as np
from .muscle_simulation_stepupdate import step_update_state
class MuscleTendonComplex:
def __init__(self, nameMuscle, frcmax, vmax, lslack, lopt,
lce, r, phiref, phimaxref, rho, dirAng, phiScale,
offsetCorr, timestep, angJoi, eref=0.04, act=0.01,
... |
'''
A status combo box for quickly choosing statuses.
Also doubles as a searchbox for the buddylist.
'''
from __future__ import with_statement
import wx
from gui import skin
from gui.uberwidgets.UberCombo import UberCombo
from gui.uberwidgets.UberButton import UberButton
from gui.uberwidgets.simpleme... |
from collections import namedtuple
from itertools import islice
import numpy as np
import pandas as pd
from dataclasses import dataclass
@dataclass
class BinningInfo(object):
"""Docstring for BinningInfo."""
variable_extents: tuple
step: float
num_bins: int
bin_indicies: np.ndarray
def buil... |
import torch
from torch import nn
from torch.distributions import Categorical
from torch.optim import Adam, SGD, ASGD
import torch.multiprocessing as mp
import os
from multiprocessing import Process, Queue
import queue
import numpy
import argparse
import glob
#from matplotlib import pyplot as plot
import copy... |
import sys
import os
import shutil
import time
import json
from typing import List, Union
import torch
from torch import nn
from torch.autograd import Variable
from torch.optim import SGD
import numpy as np
from torchmetrics import Accuracy, Precision, Recall
from Metrics import AreaUnderPrecisionCurve, T... |
import numpy as np
from scipy.integrate import odeint
import matplotlib.pyplot as plt
import itertools
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from scipy.integrate import odeint
import scipy.integrate
from sklearn.metrics import mean_squared_error
from scipy.linalg import svd
from scipy.... |
import os
import sys
import shutil
import typing as t
import tarfile
import platform
import subprocess
from pathlib import Path
import conda_pack
import virtualenv
from loguru import logger
from starwhale.utils import console, is_linux, is_darwin, is_windows
from starwhale.consts import (
ENV_VENV,
ENV_CONDA,... |
from datetime import datetime
import json
import logging
from multiprocessing.queues import Empty
from multiprocessing import Process, Queue
import random
import re
import requests
import pickle
import sys
import time
import threading
import traceback
from sleekxmpp import ClientXMPP
from sleekxmpp.exceptions import I... |
# Copyright (c) 2003-2015 by <NAME>
#
# TreeCorr is free software: 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 conditions... |
#!/usr/bin/env python
# donut_plot_with_subgroups_from_dataframe.py
__author__ = "<NAME>" #fomightez on GitHub
__license__ = "MIT"
__version__ = "0.1.0"
# donut_plot_with_subgroups_from_dataframe.py by <NAME>
# ver 0.1
#
#*******************************************************************************
# Verified compa... |
"""
.. currentmodule:: clifford
========================================
clifford (:mod:`clifford`)
========================================
The Main Module. Provides two classes, Layout and MultiVector, and several helper functions to implement the algebras.
Classes
===============
.. autosummary::
:toctree:... |
import torch
import torch.nn as nn
from torch.nn.parameter import Parameter
from torchvision import models
from linear_attention_transformer import ImageLinearAttention
class ResnetGenerator(nn.Module):
def __init__(self, input_nc, output_nc, ngf=64, n_blocks=6, img_size=256):
assert(n_blocks >= 0)... |
# -*- coding: utf-8 -*-
"""
@author: LeeZChuan
"""
import pandas as pd
import numpy as np
import requests
import os
from pandas.core.frame import DataFrame
import json
import datetime
import time
pd.set_option('display.max_columns',1000)
pd.set_option('display.width', 1000)
pd.set_option('display.max_colwidth',100... |
#!/usr/bin/env python3
#
# Short description of the program/script's operation/function.
#
import sys
import argparse
import os
import re
import subprocess
import time
import shutil
import filecmp
FILENAME = os.path.basename(sys.argv[0])
class ArgumentParserUsage(argparse.ArgumentParser):
"""Argparse override to... |
'''
This File Provides the Funktions for the Montecarlo simulation
To start use MLG.Start
'''
from MLG import path,default_table, message_folder, Version,Subversion
from MLG.Simulation import RawData
from MLG.Simulation import RealData
from MLG.Modeling import fitting_micro , fitting_motion
from MLG.Math import... |
#__init__ file.
## TK opgl Window:
# An opengl frame for pyopengl-tkinter based on ctypes (no togl compilation)
#
# Collected together by <NAME>, Jan 2018.
#
# Based on the work of others:
# C + Tcl/Tk
# http://github.com/codeplea/opengl-tcltk/
# (zlib license)
# Article at:
# https://codeplea.com/opengl-with-c-and-t... |
"""
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 agreed to in writing... |
# Copyright (c) <NAME>
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
"""
Manning's counter-ion condensation theory for thermodynamics of ions
in charged membranes.
"""
import warnings
import math
from membrane_toolkit.core.unitized im... |
import copy
import logging
import six
from sqlalchemy.orm import (
class_mapper, object_session, properties, attributes)
from sqlalchemy.orm.collections import InstrumentedList
from sqlalchemy.exc import (
InvalidRequestError, IntegrityError, DataError)
from sqlalchemy.orm.exc import MultipleResultsFound, NoRe... |
from argparse import ArgumentParser
from pathlib import Path
import os
import time
import glob
import torch
import logging
import json
import random
import numpy as np
import pandas as pd
from contextlib import contextmanager
from collections import namedtuple, defaultdict
from tempfile import TemporaryDirectory
impor... |
# ---
# jupyter:
# jupytext:
# cell_markers: region,endregion
# formats: ipynb,py:light
# text_representation:
# extension: .py
# format_name: light
# format_version: '1.4'
# jupytext_version: 1.1.1
# kernelspec:
# display_name: Python 3
# language: python
# name: pyt... |
#!/usr/bin/python3
import pyaudio
import os
import numpy as np
from scipy.interpolate import UnivariateSpline
from scipy.signal import butter, lfilter, filtfilt, resample
from scipy.optimize import curve_fit
import scipy as sp
import time
import pygame
from pygame.locals import *
from pygame import gfxdraw
from pygame ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.