text stringlengths 6.04k 39.5k |
|---|
import numpy as np
import networkx as nx
import copy
import matplotlib.pyplot as plt
from networkx.drawing.nx_agraph import graphviz_layout
import seaborn as sns
import random
import os
##########################################################
# Construct a hexagonal grid
###########################################... |
# -*- coding: utf-8 -*- #
"""
Image Process
=============
This plugin process images according to their class attribute.
"""
from __future__ import unicode_literals
import copy
import collections
import functools
import os.path
import re
import six
from PIL import Image, ImageFilter
from bs4 import BeautifulSoup
fro... |
#
# Copyright (c) 2012 <NAME>
# This file is part of pynetdicom, released under a modified MIT license.
# See the file license.txt included with this distribution, also
# available at http://pynetdicom.googlecode.com
#
# Implementation of the OSI Upper Layer Services
# DICOM, Part 8, Section 7
import socket
impo... |
# Enable import from parent package
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import dataio
import utils
import training
import loss_functions
import pruning_functions
import modules
from torch.utils.data import DataLoader
import configargparse
from functools impo... |
"""
pg_replication_activity.
author: <NAME> <<EMAIL>>
license: PostgreSQL License
Copyright (c) 2012 - 2018, <NAME>
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose, without fee, and without a written
agreement is hereby granted, provided that the above copyright no... |
from cube2common.utils.enum import enum
MAPVERSION = 33
PROTOCOL_VERSION = 259
# match constants
INTERMISSIONLEN = 10
RESETFLAGTIME = 10000
# string length constants
MAXSERVERDESCLEN = 25
MAXSERVERLEN = 13
MAXNAMELEN = 15
MAXTEAMLEN = 4
MAXAUTHNAMELEN = 100
MAXROOMLEN = 7
AUTHCHALLEN = 49
AUTHANSLEN = 48
AUTHPUBKEYL... |
#!/usr/bin/env python3
#
# Copyright (c) 2021 Seagate Technology LLC and/or its Affiliates
#
# 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
#
... |
import os
import time
import json
import torch
import argparse
import numpy as np
import utils
from codebase.networks import NSGANetV2
from codebase.run_manager import get_run_config
from ofa_mbv3_fr import OFAMobileNetV3
from run_manager import RunManager
from ofa.elastic_nn.modules.dynamic_op import DynamicSeparable... |
# -*- coding:utf-8 -*-
# pylint: disable=too-few-public-methods, line-too-long
"""
Common data structure for model converter
"""
from __future__ import absolute_import
import logging
import numpy
import warnings
with warnings.catch_warnings():
warnings.simplefilter('ignore')
from .thirdparty import transforma... |
#!/usr/bin/env python3
import configparser
import os, h5py, sys
import numpy as np
from matplotlib import pyplot as plt
thisDir = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0,thisDir)
#get around extra wrapper layer thanks to scikit-build
from pycrtm import pycrtm as p
pycrtm = p.pycrtm
from crtm_io im... |
# ------------------------------------------------------------
# Copyright (c) 2017-present, SeetaTech, Co.,Ltd.
#
# Licensed under the BSD 2-Clause License.
# You should have received a copy of the BSD 2-Clause License
# along with the software. If not, See,
#
# <https://opensource.org/licenses/BSD-2-Clause>
#
# ... |
import json
import argparse
#import asyncio
#import pg_yonk_library
#import mysql_yonk_library
import evdev
#import multiprocessing
#from multiprocessing import Manager
import signal
import logging
import errno
import os
import time
import sys
import serial
mydatabase = 'off'
#to add to/use a serial device you need ... |
# draw.py
import matplotlib.pyplot as plt
from matplotlib.figure import Figure
import mpl_toolkits.mplot3d.art3d as art3d
from matplotlib.patches import Circle
plt.style.use('seaborn-whitegrid')
# We can't expect that the users have latex
# plt.rc('text', usetex=True)
plt.rc('font', family='serif')
import numpy as n... |
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
import numpy as np
import multiprocessing
import copy
import pickle
from functools import partial
from scipy.constants import c
from scipy import signal
from pyrem.skymodel import sky_moment_returner
from pyrem.radiotelescope import mwa_dipole_locations
from pyrem.radiotelescope import beam_width
from pyrem.powerspect... |
#!/usr/bin/env python
# coding: utf-8
# In[ ]:
# In[ ]:
### Install Requirement
get_ipython().system("pip install -r requirements.txt")
# In[98]:
get_ipython().run_line_magic("load_ext", "autoreload")
get_ipython().run_line_magic("autoreload", "")
get_ipython().run_line_magic("matplotlib", "inline")
get_ipytho... |
#!/usr/bin/env python
"""
Sampling error estimates and diagnostic tests for nested sampling runs.
"""
import warnings
import numpy as np
import pandas as pd
import scipy.stats
import nestcheck.ns_run_utils
# Bootstrap resampling
# --------------------
def bootstrap_resample_run(ns_run, threads=None, ninit_sep=Fals... |
'''
tilemap: Tilemap Renderer
Renderer tilemaps loaded with pytmx or built in functions. Uses
the pygame._sdl2 GPU renderer.
This file is part of renderpyg
renderpyg is a python package providing higher level features for
pygame. It uses the pygame._sdl2.video API to provide hardware GPU
texture rendering.
renderpy... |
import abc
import logging
import os
import random
import time
import numpy as np
import tensorflow as tf
import torch
import pymia.data.assembler as asmbl
import pymia.deeplearning.config as cfg
import pymia.deeplearning.data_handler as hdlr
import pymia.deeplearning.logging as log
import pymia.deeplearning.model as ... |
# Copyright 2016 The FilterForward 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 app... |
#!/usr/bin/env python
#------------------------------
"""
Class :py:class:`SegGeometryEpix10kaV1` describes the Epix100 V1 sensor geometry
===============================================================================
In this class we use natural matrix notations like in data array
\n We assume that
\n * sensor consi... |
import json
from pycocotools.mask import decode
from pycocotools import mask as maskUtils
import cv2
import numpy as np
import os
from scipy import io
import time
import joblib
from pycococreatortools import create_image_info, create_annotation_info
import torch
import random
from pycocotools import coco
def annToRLE... |
import os
import random
import time
from PyQt5.QtWidgets import QGraphicsScene, \
QGraphicsView
from PyQt5.QtGui import QBrush, QPen, QTransform
from mGesf.main_page_tabs.gesture_tab import help_btn_action, generate_char_set
from mGesf.main_page_tabs.gesture_tab.indexPen.key_detection import ReturnKeyDetectionWidg... |
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
from __future__ import print_function
import os
import argparse
import torch
import torch.nn as nn
import torch.nn.functional as F
import torchvision
import torch.optim as optim
from torchvision import datasets, transforms
from torch.autograd import Variable
from models import *
from utils import progress... |
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib import cm
from matplotlib import mlab
from scipy.ndimage.filters import gaussian_filter
import argparse
def get_args():
parser = argparse.ArgumentParser(
"Program to Generate Petroleomic Data from Formula ID results output ... |
"""lg-rez / bdd / Modèle de données
Déclaration de toutes les tables et leurs colonnes
"""
import discord
import sqlalchemy
from lgrez import config
from lgrez.bdd import base
from lgrez.bdd.base import (autodoc_Column, autodoc_ManyToOne,
autodoc_OneToMany, autodoc_DynamicOneToMany,
... |
#! /usr/bin/env python
"""This module creates a superbias reference file that can be used
in the JWST calibration pipeline.
Author
------
- <NAME>
Use
---
This module can be imported and used as such:
::
from jwst_reffiles.superbias import superbias
superbias.make_superbias(arguments)
N... |
from __future__ import print_function
from functools import reduce
import numpy as np
import re
# noinspection PyPep8Naming
from typing import List, Tuple
from pycparser import c_ast
from popsicle.code_transform_utils.exceptions import ParseException
from popsicle.code_transform_utils.expr_estimator import ExprEstimat... |
#!/bin/env python
#
#
# Tax Free Holiday
#
# import wxversion
# wxversion.select('2.8')
import wx
#import wx.calendar as cal
import wx.grid as gridlib
import sys,re
import faulthandler
#import psycopg2
import json
import pout
import xml.etree.cElementTree as ET
import wx.lib.masked as masked
import datetime
import han... |
"""
Implement the API used by the "Export to a shared directory" plugin.
"""
import sys
import os
import re
import json
import hashlib
from pathlib import Path
from requests.utils import quote
from flask import request, jsonify, make_response
from sqlalchemy import func, and_, asc, or_
from sqlalchemy.orm... |
'''
1- load a file
2- extract segments
3- augment
4- pad the signal (if necessary)
5- extracting log spectrogram from signal
6- normalize spectrogram
7- save the normalized spectrogram
Preprocessing Pipeline
'''
# https://www.youtube.com/watch?v=O04v3cgHNeM&ab_channel=ValerioVelardo-TheSoundofAI&loop=0
import libro... |
import os
import numpy as np
import pandas as pd
import itertools
import z3
import math
import opendp.whitenoise.core as wn
'''
load data
'''
def load_data():
# load data
# data = pd.read_csv(os.path.join('data', 'pums_1000.csv')) #TODO: add back after testing
# data['agebinned'] = pd.cut(data['age'], b... |
import bisect
import statistics
import numpy as np
from collections import deque
from abc import abstractmethod
from sklearn import decomposition
from sklearn.svm import SVC
from memory_profiler import profile
class Parser(object):
"""
Handle special data type
"""
@staticmethod
def write_by_line... |
import torch
import torch.nn as nn
from data_utils.collations import *
latent_features = {
'SparseResNet14': 512,
'SparseResNet18': 1024,
'SparseResNet34': 2048,
'SparseResNet50': 2048,
'SparseResNet101': 2048,
'MinkUNet': 96,
'MinkUNetSMLP': 96,
'MinkUNet14': 96,
'MinkUNet18': 1024... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Dec 20 16:28:59 2020
@author: <NAME>
"""
import pandas as pd
import numpy as np
import sys
import networkx as nx
import matplotlib.pyplot as plt
import matplotlib.colors as colors
import matplotlib.cm as cmx
from pairsnp import calculate_snp_matrix, cal... |
import numpy as np
from matplotlib import pyplot as plt
#----- Utility Functions ------------------------------------------------------
def digseq(seq,step):
'''Original MATLAB preamble
digseq - Whit Rappole
DIGITIZESEQ Map a sequence onto digital timing loop
dseq = digseq(seq,step)
... |
# Copyright 2013-2021 The Salish Sea MEOPAR contributors
# and The University of British Columbia
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat May 12 10:57:02 2018
@author: therealrussellkim
"""
import numpy as np
from scipy.stats import norm
import matplotlib.pyplot as plt
# In[Functions]:
# Knowledge Gradient with Correlated Beliefs (KGCB)
# notation for the following:
# K is the numb... |
# Copyright 2020, Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... |
# Name: Tournament draw generator (enwiki)
# Author: Somnifuguist
# Date: 10-10-2020
# Content: Generates wikitext for tennis tournament draws
import itertools
from nameparser import HumanName
from num2words import num2words
import re
import sys
sys.path.append('data')
from ClassSupportFunctions import *
f... |
import os
from copy import deepcopy
from typing import Any, Dict, Iterable, Optional, Tuple, Union, Generator
import dask.array as da
import intake
import numpy as np
import xarray as xr
def get_axes(x: Any) -> str:
"""
Get axis order given image, shape or number of dimensions.
.. list-table:: Supported... |
# Copyright (c) 2013 The SAYCBridge Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from z3b import enum
import core.suit as suit
import z3
_honor_names = ('ace', 'king', 'queen', 'jack', 'ten')
_honor_values = (4, 3, 2, 1, 0)
def... |
"""Automatically making flask webservices from python objects"""
from numpy import ndarray
from pandas import Series, DataFrame
import re
import json
from ut.others.lru_cache import lru_cache
# from werkzeug.exceptions import InternalServerError
import ut.wserv.errors as err
# args_info = defaultdict(lambda: {'type'... |
from models.base_gls import ControlInputs
import os
import inspect
from copy import copy
from typing import List, NamedTuple, Union
from shutil import copyfile
from collections import namedtuple
import math
from box import Box
import datetime
import numpy as np
import torch
import torch.distributions
from torch import ... |
# Leo colorizer control file for b mode.
# This file is in the public domain.
# Properties for b mode.
properties = {
"commentEnd": "*/",
"commentStart": "/*",
"indentNextLine": "\\s*(((ANY|ASSERT|CASE|CHOICE|IF|LET|PRE|SELECT|VAR|WHILE|WHEN)\\s*\\(|ELSE|ELSEIF|EITHER|OR|VARIANT|INVARIANT)[^;]*|for\... |
#!/usr/bin/env python
import rospy
from geometry_msgs.msg import Twist
from sensor_msgs.msg import NavSatFix
from math import *
from sensor_msgs.msg import Imu
from tf.transformations import euler_from_quaternion
from ros_service.srv import *
import time
#OBJECT CREATION
ob1 = Twist()
ob2 = NavSatFix()
ob3 = NavSatFix... |
import datetime
import decimal
import functools
from typing import List, Optional, Tuple, Sequence
from django.core.exceptions import ValidationError
import pytz
from django.contrib.auth.models import User
from django.db import models
from django.db.models import Sum
from django.utils.translation import gettext_lazy a... |
#!/usr/bin/env python3
from pyDNM.Backend import err_fh,tokenize,try_index
from pyDNM.Features import Feature
import numpy as np
import sys
def genotype_pl_index(gt=None):
"""
In presence of the GT field the same
ploidy is expected and the canonical order is used; without GT field, diploidy is assu... |
import numpy as np
from . import _base
class SO3Matrix(_base.SOMatrixBase):
"""Rotation matrix in :math:`SO(3)` using active (alibi) transformations.
.. math::
SO(3) &= \\left\\{ \\mathbf{C} \\in \\mathbb{R}^{3 \\times 3} ~\\middle|~ \\mathbf{C}\\mathbf{C}^T = \\mathbf{1}, \\det \\mathbf{C} = 1 \\ri... |
##################################################
## Set relative file paths ##
import csv
import sys
import os
import numpy as np
absFilePath = os.path.abspath(__file__)
fileDir = os.path.dirname(os.path.abspath(__file__))
parentDir = os.path.dirname(fileDir)
newPath = os.path.join(parentDir, 'core')
sys.path.appe... |
"""
[1] <NAME>, et al. "Wide & deep learning for recommender systems." Proceedings of the 1st workshop on deep learning for recommender systems. ACM, 2016.
"""
import os
from typing import List, Tuple, Any
import pandas as pd
import tensorflow as tf
from tensorflow import feature_column as fc
# 定义输入参数
flags = tf.... |
# Copyright(c) Microsoft Corporation.
# Licensed under the MIT license.
import abc
import dill
import inspect
import textwrap
import warnings
from pandas import DataFrame
from typing import Callable, List
"""
_SQLBuilder implementations are used to generate SQL scripts to execute_function_in_sql Python fu... |
# -----------------------------------------------------------------------------
# WSDM Cup 2017 Classification and Evaluation
#
# Copyright (c) 2017 <NAME>, <NAME>, <NAME>, <NAME>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the ... |
#! /usr/bin/env python
# scriptedfun.com Arinoid
# http://www.scriptedfun.com/
# June 1, 2006
# MIT License
# arinoid_master.bmp
# taken from the Spritelib by <NAME>
# http://www.flyingyogi.com/fun/spritelib.html
# Common Public License
import math, os, pygame, random
from pygame.locals import *
# ga... |
# -*- coding: utf-8 -*-
# Copyright or © or Copr. <NAME> (2014)
#
# <EMAIL>
#
# This software is a computer program whose purpose is to ease offline edition
# of Minecraft save files.
#
# This software is governed by the CeCILL-C license under French law and
# abiding by the rules of distribution of free software. Y... |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
import os
import random
import math
import glob
import util
from imp import reload
import cv2
import numpy as np
import time
import json
from tensorflow.python import debug as tf_debug... |
import random
import matplotlib.pyplot as plt
from matplotlib import cm
import networkx as nx
import metis
from collections import Counter
import numpy as np
import time
import numpy.linalg as la
import scipy.cluster.vq as vq
import itertools
import operator
import math
import copy
from mpmath import *
from itertools i... |
"""
MIT License
Copyright (c) 2017 <NAME>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distri... |
#!/usr/bin/env python
# _
# ___ _ _| |__ ___ _ __ _ _
# / __| | | | '_ \ / _ \ | '_ \| | | |
#| (__| |_| | |_) | __/_| |_) | |_| |
# \___|\__,_|_.__/ \___(_) .__/ \__, |
# |_| |___/
#
# A rubiks cube program and library.
# Running this prog... |
import traceback
import numpy as np
import litenn as nn
import litenn.core as nc
from litenn.core import CLKernelHelper as ph
class DualWiseOpKernel:
"""
Base class for kernels to use in dual_wise_op()
"""
def get_forward_kernel_text(self):
"""
return kernel C code block for forward ... |
#!/usr/bin/env python
# Instance generator for the ICON Challenge, 2014
#
# Energy-Cost Aware Scheduling/Forecasting Competition
# <NAME>, <NAME>, <NAME>, <NAME>, <NAME>
#
# The file format is straight forward and described in the above document. Tasks
# are generated by partitioning the resource capacity across the da... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import core
import core.widgets
import core.readwrite
class Menu(core.Screen):
menu_items = []
img_background = None
def __init__(self):
core.Screen.__init__(self, 1)
self.img_title = None
self.frame_title = None
self.menu_comm... |
import pytest
from datetime import datetime
from uuid import uuid4
from emit import transports, adapters, event
from emit.globals import conf
from emit.event import Event
from emit.emitters import Emitter, EmittingEventContext
from ..helpers import (
TestCase, tevent, teventr_expect, tevent_stack, temitter)
class... |
#!/usr/bin/env python
import rospy
from sensor_msgs.msg import Image
from sensor_msgs.msg import CameraInfo
from std_msgs.msg import UInt8MultiArray
import ros_numpy
import numpy as np
import numpy as np
import time
import cv2
import pyrealsense2 as rs
import random
import math
import argparse
from sensor_msgs.msg ... |
### measure libraby version 1.9.2s
import numpy as np
import matplotlib.pyplot as plt
from scipy.optimize import curve_fit
from scipy.stats import chi2 as _chi2
from numpy import loadtxt
# Settings
linreg_change = 0.00001 # min relative change per step to end linear regression
minfloat = 1e-80 # replaces zeros in linr... |
"""
MIT License
Copyright (c) 2022, Lawrence Livermore National Security, LLC
Written by <NAME> et al.
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 limit... |
#!/usr/bin/env python3
import os
import shutil
import json
from PIL import Image, UnidentifiedImageError, ExifTags
from bs4 import BeautifulSoup
SUPPORTED_EXTENSIONS = ('.jpg', '.jpeg', '.gif', '.png')
class SiteGenerator:
def __init__(self, site_name, input_photos_dir, people_enabled, watermark_enabled, w... |
#!/usr/bin/env python
# coding=utf-8
# Copyright 2020 The HuggingFace Team 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-... |
import matplotlib.pyplot as plt
from TamLib import *
from matplotlib import cm, colors
from scipy.integrate import odeint
import numpy as np
import math as mth
import scipy
import scipy.sparse as sparse
from qutip import *
from scipy import sparse, linalg
from scipy.interpolate import interp1d
import itertools as it
fr... |
'''ScoreBox Cross Country Manager'''
import time
import csv
import json
from io import StringIO
from operator import itemgetter
from threading import Thread
import websock
# COLORS = {
# 'red': 'CC0000',
# 'orange': 'CC6E00',
# 'yellow': 'C8C81A',
# 'green': '09CF64',
# 'blue': '097ACF',
# 'pu... |
import unittest
import filecmp
from allocation_service.annotation_events import EventCollection, AnnotationEvent
from allocation_service.event_output import AnnotationEventFile
from allocation_service.genomic_features import ProteinCodingGene, Feature
from allocation_service.event_output import GFFAnnotations
from allo... |
from __future__ import with_statement
from nose.tools import assert_equal, assert_not_equal # @UnresolvedImport
import copy
from whoosh import fields, qparser, query
from whoosh.compat import u
from whoosh.filedb.filestore import RamStorage
from whoosh.qparser import QueryParser
from whoosh.query import (And, AndMa... |
import traversalHelper as tr
from itertools import combinations
import helper as hr
import math, time
import multiprocessing
from multiprocessing import Pool, Manager
from functools import partial
import numpy as np
from statistics import mean
import json, sys, os
from collections import defaultdict
import random as rn... |
#!/usr/bin/env python
# coding: utf-8
# In[ ]:
# jupyter nbconvert --to python 03_train_submit.ipynb
# 在命令行下将本文件转为python文件 挂在tmux下运行 网络不稳定 在notebook内训练会丢失结果
# In[1]:
import os
from os import path
import cv2
import glob
import pydicom
import numpy as np
import pandas as pd
import torch
import torch.nn.functional ... |
"""
1Channel XBMC Addon
Copyright (C) 2014 tknorris
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
... |
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
from utils import *
def run_vqa(X, X_obj, X_att, ml, q_t, q_hidden, box, wvecs=None, do_wvec=False):
"""
Run VQA module
"""
# Importance function
G = ml['VQAController'](q_t, mode='importance_fu... |
import io, json, logging, math, os, re, subprocess, tempfile
from collections import Counter
from shlex import quote
from scipy.stats import norm
import numpy as np
import pandas as pd
import pysam
import pybedtools.bedtool as bed
NO_LIB_LABEL = "UNLABELED"
GENERIC_LIB_LABEL = "GENERIC"
GC_ROUNDING_DIGITS = 2
def s... |
#! /usr/bin/env python
# -*- coding: latin1 -*-
"""etbcinf8.py contains selected Command Info Services classes Info_*
Info_broker, Info_conversation, Info_clientserver, Info_psf
Info_service
Generally the Info_* classes are imported from etbcinf.py
But the classes mentioned above have changed in Brok... |
'''
Variants.py -
======================================================
:Tags: Python
Code
----
'''
import collections
from CGAT import Experiment as E
from CGAT import Genomics as Genomics
from CGAT import NCL as ncl
Variant = collections.namedtuple("Variant",
"pos, reference, g... |
import numpy as np
from collections import deque
class Retrospective:
"""
Hierarchical Sequential D-MDL algorithm with SCAW2 (Prospective)
"""
def __init__(
self,
encoding_func,
d,
M=5,
min_datapoints=1,
delta_0=0.05,
delta_1=0.05,
delta... |
import csv
import os
import sys
import unicodedata
import nltk
import numpy as np
from numpy.linalg import norm
from scipy.stats import pearsonr
from scipy.stats import spearmanr
from sklearn.datasets import fetch_20newsgroups
from sklearn.linear_model import LogisticRegressionCV as LogitCV
from sklearn.linear_model im... |
import torch
from matplotlib import pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from hocontact.hodatasets.hoquery import BaseQueries, TransQueries
def visualize_joints_2d(
ax, joints, joint_idxs=True, links=None, alpha=1, scatter=True, linewidth=2, color=None, axis_equal=True,
):
if links is None:
... |
import os
import logging
import time
import copy
import socket
import typing
import inspect
import random
import subprocess
import pathlib
import collections
from functools import partial, reduce, wraps
import numpy
import torch
import torch.hub as hub
import torch.nn as nn
import torch.optim as optim
import torch.cud... |
from __future__ import unicode_literals
import youtube_dl
import os
import shutil
import time
import json
import numpy as np
import yaml
PATH_PROJ = '/'
with open("../config.yaml", "r") as ymlfile:
cfg = yaml.load(ymlfile, Loader=yaml.FullLoader)
PATH_OMVG = cfg["lib"]["openMVG"]
PATH_OMVS = cfg["lib"]["openMVS... |
import webbrowser
from anytree import NodeMixin, RenderTree
from anytree.search import find
from anytree.exporter import DotExporter
from functools import lru_cache, cached_property
from frozendict import frozendict
from deprecated import deprecated
import random as rand
from sklearn.linear_model import L... |
from burp import IBurpExtender
from thread import start_new_thread
from burp import ITab
from burp import IContextMenuFactory
from burp import IContextMenuInvocation
from burp import IScanIssue
from java.awt import Component
from java.awt import Dimension
from org.python.core.util import RelativeFile
from java.io impor... |
# Imports
import os
import shutil
import time
import numpy as np
import warnings
import numbers
from numpy.lib.stride_tricks import as_strided
import matplotlib.pyplot as plt
import albumentations as albu
import torch
import torch.utils.model_zoo as model_zoo
import segmentation_models_pytorch as smp
from itertools im... |
import matplotlib.pyplot as plt
import seaborn as sns
#from mpl_toolkits.mplot3d import Axes3D
import scipy.io as sio
import skimage.io
from scipy import ndimage
import numpy as np
import numpy.linalg as linalg
import time
import os
import robust_laplacian
import polyscope as ps
import scipy.sparse.linalg as sla
from s... |
import logging
from promocija import Promocija
KRALJ = 'kralj'
KRALJICA = 'kraljica'
TRDNJAVA = 'trdnjava'
LOVEC = 'lovec'
KONJ = 'konj'
KMET = 'kmet'
PRAZNO = 'prazno'
BELI = 'beli'
CRNI = 'crni'
REMI = 'remi'
def v_sahovnici(polozaj):
x, y = polozaj
return 0 <= x <= 7 and 0 <= y <= 7
class Figura:
de... |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
geom --- Solar System geometry.
===============================
Class
-----
Geom
Function
--------
proper_motion
"""
from ..util import autodoc
__all__ = ['Geom', 'proper_motion']
from datetime import datetime
from collections import Mapping
impor... |
import numpy as np
import math
import os
from matplotlib import pyplot as plt
from matplotlib import patches as patches
from astropy.io import fits as pyfits
from astropy.visualization import (PercentileInterval, ImageNormalize,
SqrtStretch, LogStretch, LinearStretch)
from copy import... |
#!/bin/env python
import tkinter as tk
from tkinter import messagebox
from tkinter import ttk
from datetime import datetime
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
from requests import get
from requests.exceptions import RequestException
from contextlib import closing
from bs4 import BeautifulSo... |
"""magics --- make assignment authoring easier.
This python package provides functions and magics that make authoring
of master assignment notebooks more convenient. The functionality it provides:
* Capture canonical solution with %%solution magic
* Anticipate incorrect submissions and test them with %%submission mag... |
#!/usr/bin/env python
"""
All set_methods will send commands to hardware to change state
they will not return (block( until hardware reflects changes,
after timeout exception
Some set_methods (e.g. temperature controller, axis position)
may return IF the command takes time to complete, these
commands will have a... |
# -*- coding: utf-8 -*-
# @File : client.py
# @Date : 2019/8/28
# @Desc :
#
#
import argparse
import struct
import threading
import ipaddr
from MODULES_DATA.CommandAndControl_MultibandCommunication_Socks5ByWebshell.config import *
try:
from socketserver import BaseRequestHandler
from socketserver import... |
"""Test routines for local_problems module"""
from unittest import TestCase
from amfeti.local_problems import LinearStaticLocalProblem, LinearDynamicLocalProblem, IntegratorBase
from amfeti.local_problems.local_problem_base import LocalProblemBase
from amfeti.scaling import MultiplicityScaling
from amfeti.precondition... |
from abc import ABC
import torch
import torch.utils.data
import torchvision
import pickle
import random
from cole.helper import *
__BASE_DATA_PATH = '../data'
def set_data_path(path: str):
global __BASE_DATA_PATH
__BASE_DATA_PATH = path
class CLDataLoader:
"""
Sequential dataloader for continual l... |
# Project name: Shepard tone in Python from first principals
# Author: <NAME>
# Date: 2021.03.30
# License: MIT Open Source License
#
# Description: This is my attempt to do a sound illusion called The Shepard
# Tone from first principles in Python. I say that it is my
# ... |
import mailbox
import threading
import src.multi_agent.elements.room as room
from src import constants
from src.multi_agent.agent.agent import Agent
from src.multi_agent.agent.agent_interacting_room_camera_representation import AgentCamRepresentation
from src.multi_agent.agent.agent_interacting_room_representation impo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.