text
stringlengths
6.04k
39.5k
import os import logging from itertools import repeat import numpy as np import pandas as pd import pyoorb as oo from .orbits import Orbits from .utils import get_oorb_data_dir import time __all__ = ['PyOrbEphemerides'] def dtime(time_prev): return (time.time() - time_prev, time.time()) class PyOrbEphemerides...
from __future__ import with_statement import struct import logging import util import oscar x01_name="Generic" log = logging.getLogger('oscar.snac.x01') version = 4 tlv_types = {0x05: 'server_addr', 0x06: 'cookie', 0x0d: 'service_id',} subcodes = {} ignorable = [ ...
import collections import copy import enum import functools import json import re import asdl import attr from seq2struct import ast_util from seq2struct.utils import registry class HoleType(enum.Enum): ReplaceSelf = 1 AddChild = 2 class MissingValue: pass @attr.s class SeqField: type_name = att...
# Copyright (c) 2019, Andrey "Limych" Khrolenok <<EMAIL>> # Creative Commons BY-NC-SA 4.0 International Public License # (see LICENSE.md or https://creativecommons.org/licenses/by-nc-sa/4.0/) """ The Average Sensor. For more details about this sensor, please refer to the documentation at https://github.com/Limych/...
""" Equivalencies between different kinds of units """ # ----------------------------------------------------------------------------- # Copyright (c) 2018, yt Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the LICENSE file, distributed with this software. # ...
import numpy as np from scipy.io import loadmat import matplotlib.pyplot as plt import itertools import random import os from collections import deque import sklearn from sklearn.utils import shuffle from sklearn.preprocessing import MinMaxScaler from sklearn.discriminant_analysis import LinearDiscriminantAnalysis as...
#!/usr/bin/env python3 import glob import os import sys import random import time import sys import numpy as np import cv2 import math from collections import deque import tensorflow as tf from keras.applications.xception import Xception from keras.layers import Dense, GlobalAveragePooling2D, Flatten from keras.optimiz...
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import datetime import logging from collections import defaultdict, OrderedDict from smtplib import SMTPException from dateutil import relatived...
''' Created on Oct 10, 2020 @author: Bill ''' import csv import datetime import os import shapefile from distro import linux_distribution from pip._internal.vcs import git from OWI_sqlfile import execute_statements_from_file from OWI_sqlite import c4db from OWI_config import OWI_version_40 as C from OWI_config imp...
import torch.nn as nn import torch import inspect from transformers.models.bert import BertPreTrainedModel from transformers.models.bert.modeling_bert import BertEmbeddings, BertPooler, BaseModelOutputWithPoolingAndCrossAttentions, BertAttention, BertIntermediate, BaseModelOutputWithPastAndCrossAttentions from typing ...
import hashlib import json import markdown from flask import Blueprint, render_template, request, abort, redirect, Markup, current_app from assemblyline.common.isotime import iso_to_local from assemblyline.common import forge from assemblyline_ui.config import STORAGE, ORGANISATION, get_signup_queue, get_reset_queue,...
import cv2 import numpy as np from collections import namedtuple from math import ceil, sqrt, exp, pi, floor, sin, cos, atan2, gcd class HandRegion: """ Attributes: pd_score : detection score pd_box : detection box [x, y, w, h], normalized [0,1] in the squared image pd_kps : detect...
from models import * from utils.utils import load_classes, non_max_suppression, label_img_to_color import argparse from PIL import Image import cv2 import torch import torch.utils.data from torchvision import transforms from torch.autograd import Variable from segmentation_model.deeplabv3 import DeepLabV3 from movin...
# Copyright 2017-2020 typed_python Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
# IMPORTS # from datetime import datetime from datetime import date import date as ndate from flask import Flask,session, request, flash, url_for, redirect, render_template, abort ,g, make_response from flask_sqlalchemy import SQLAlchemy from sqlalchemy import asc from flask.ext.login import LoginManager from flask.ext...
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT license. See LICENSE file in the project root for full license information. import argparse import json import os import sys import traceback from datetime import datetime from adal import AuthenticationContext from azure.identity ...
# coding=utf-8 # Copyright 2022 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
from bayes_opt import BayesianOptimization import numpy as np from matplotlib import pyplot as plt from sklearn.gaussian_process.kernels import Matern from sklearn.gaussian_process import GaussianProcessRegressor from scipy.stats import norm from bayes_opt.util import augKernel from bayes_opt import JSONLogger from bay...
#!/usr/bin/env python3 # GmailTools # Copyright (C) 2020, <NAME> # # All rights reserved. # # This source code is licensed under the 3-clause BSD license found in the # LICENSE file in the root directory of this source tree. # import argparse import json import logging import os import re import sys import time # da...
""" Copyright 2016-2017 Ellation, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, sof...
from __future__ import division import torchvision.transforms as transforms_old import torch import math import sys import random from PIL import Image try: import accimage except ImportError: accimage = None import numpy as np import numbers import types import collections import warnings import cv2 from torc...
""" Author: <NAME>, <NAME>, <NAME> """ from sqlalchemy import create_engine import io import psycopg2 as psy import pandas as pd import numpy as np import matplotlib.pyplot as plt from sklearn.model_selection import train_test_split from sklearn.preprocessing import StandardScaler from sklearn.ensemble import RandomFor...
""" We need to somehow work with the typing objects. Since the typing objects are pretty bare we need to add all the Jedi customizations to make them work as values. This file deals with all the typing.py cases. """ from jedi._compatibility import unicode, force_unicode from jedi import debug from jedi.inference.cache...
# cableController.py # shotmanager # # The cable movement controller. # Runs as a DroneKit-Python script. # # Created by <NAME> and <NAME> on 1/21/2015. # Copyright (c) 2016 3D Robotics. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the L...
""" Basic monobit test coverage usage:: $ python3 -m tests.test_monobit $ coverage run tests/test_monobit.py $ coverage report monobit/*py """ import os import io import tempfile import unittest import logging from pathlib import Path import monobit class BaseTester(unittest.TestCase): """Base cl...
#!/usr/bin/env python3 """ A driver script to run clang-tidy on changes detected via git. By default, clang-tidy runs on all files you point it at. This means that even if you changed only parts of that file, you will get warnings for the whole file. This script has the ability to ask git for the exact lines that have...
from typing import List, Tuple, NamedTuple from brah.a_scanner import Source, Token from brah.f_utils import * from brah.constants.tokens import * from brah.constants.scanner import * from brah.constants.errors import * __all__ = [ 'TokenError', 'TokenStream', 'Lexer', 'Tkn', ] # ---------------------...
import argparse import os import cv2 import time import random import json import logging import pycocotools import numpy as np import matplotlib.pyplot as plt from collections import defaultdict from PIL import Image import torch import torch.backends.cudnn as cudnn from torch.autograd import Variable from models.yo...
import enum import logging import re from typing import Mapping, Optional, Sequence, Text, Tuple import numpy as np import tensorflow.compat.v2 as tf import tensorflow_datasets as tfds import tensorflow_probability as tfp import autoaugment Batch = Mapping[Text, np.ndarray] MEAN_RGB = (0.485 * 255, 0.456 * 255, 0.40...
#!/usr/bin/env python3 # parsing from "NT LAN Manager (NTLM) Authentication Protocol" v20190923, revision 31.0 # https://winprotocoldoc.blob.core.windows.net/productionwindowsarchives/MS-NLMP/%5bMS-NLMP%5d.pdf # Source: https://github.com/b17zr/ntlm_challenger import argparse import base64 import datetime import sys...
from abc import (ABC, abstractmethod) from itertools import groupby from operator import attrgetter from typing import (Iterable, List, Sequence, Union as Union_) from ground.base import (Context, Orientation, ...
# -*- coding: utf-8 -*- # Copyright (c) 2016-2017 by University of Kassel and Fraunhofer Institute for Wind Energy and # Energy System Technology (IWES), Kassel. All rights reserved. Use of this source code is governed # by a BSD-style license that can be found in the LICENSE file. import matplotlib.pyplot as plt imp...
import pandas as pd from sciencebasepy import SbSession import sqlite3 from zipfile import ZipFile import os from datetime import datetime import pycountry usnvc_source_item = "5aa827a2e4b0b1c392ef337a" def db_connection(): """ Makes a connection to the SQLite database by first getting the appropriate data f...
import pandas as pd from pandas import HDFStore import numpy as np import subprocess import io import matplotlib.pyplot as plt import gc import os from scipy.stats import ks_2samp from functools import lru_cache ''' Analyze wsprspots logs (prepared by WSPRLog2Pandas) All manipulations are performed against an HDF5 ...
#!/usr/bin/env python """Extracts data for tagger model.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import sys import argparse import re import string import StringIO import ConfigParser import spacy from .swda_utils.swda import CorpusRea...
#-*- coding: utf-8 -*- # https://github.com/Kodi-vStream/venom-xbmc-addons from resources.lib.gui.hoster import cHosterGui from resources.lib.gui.gui import cGui from resources.lib.handler.inputParameterHandler import cInputParameterHandler from resources.lib.handler.outputParameterHandler import cOutputParameterHandle...
from collections import defaultdict from copy import deepcopy import json import re from atlas.conf import settings from atlas.modules import constants, exceptions, mixins from atlas.modules.transformer import profile_constants from atlas.modules.transformer.base import models from atlas.modules.transformer.artillery ...
import collections from collections import defaultdict from .isax import * import operator # dictionary that maps operator functions, useful for select operations OPMAP = { '<': operator.lt, '>': operator.gt, '==': operator.eq, '!=': operator.ne, '<=': operator.le, '>=': operator.ge } def me...
import itertools import os from contextlib import contextmanager from dataclasses import dataclass from typing import Literal from typing import Optional from typing import Union, List, Callable, Tuple, Dict, Any, NamedTuple import fitz import pdfminer import unicodedata from pdfminer.high_level import extract_pages f...
from collections import namedtuple, OrderedDict import re import os import functools import stat import sys import zipfile import io import csv import string import codecs import datetime import time import argparse import fnmatch EOL = '\n' COLSEP = '\t' COLUMN_SEPARATOR = COLSEP g_logs = [] # get with get_log() g...
#!/usr/bin/python2 # -*- coding: latin-1 -*- """ doi.py DOI handling functions. This module gets publication data from a DOI identifier. It currently hinges on the CrossRef.org website POST format. This can be inspected by looking at the POST requests when using the form on the webpage. At present, it resolves to this ...
import re import math import logging import datetime import pysolr from urllib.parse import urlencode, unquote from django import urls from django.core.paginator import Paginator, Page from django.db import connection, reset_queries from django.http import QueryDict from django.conf import settings from core import m...
#!/usr/bin/python # -*- coding: utf-8 -*- """ author: <NAME> <EMAIL> 2016 """ import math, time, scipy from numpy.random import * from distutils.dir_util import mkpath #~ from graph_tool.all import * try: from graph_tool.all import * except ImportError: pass # a wrapper for a simple two-dimensional matrix w...
import os import json import glob import pytest from datetime import datetime from alignment.AlignSubPeptides import align_sub_peptides, split_sub_peptides, extract_sub_peptide, \ helm2fasta, fasta2helm, convert2helm, get_common_subpeptides, get_aligned_sequences, get_alignment_score, \ cleanup # Pytest fixt...
# import python import time from datetime import datetime, timedelta from homeassistant.const import ( LENGTH_FEET, LENGTH_KILOMETERS, LENGTH_METERS, LENGTH_MILES, ) from homeassistant.util.distance import convert as dist_convert # import HA KM_PER_MI = dist_convert(1, LENGTH_MILES, LENGTH_KILOMETER...
"""Contains functions needed to process reaction SMILES and their tokens""" from __future__ import absolute_import, division, print_function, unicode_literals import logging import re import numpy as np from functools import partial from typing import * from rdkit import Chem from rdkit.Chem import AllChem from funct...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Arduino lock-in amplifier """ __author__ = "<NAME>" __authoremail__ = "<EMAIL>" __url__ = "https://github.com/Dennis-van-Gils/DvG_Arduino_lock-in_amp" __date__ = "31-08-2021" __version__ = "2.0.0" # pylint: disable=invalid-name import os import sys import time as Time...
""" Tests internal math routines """ import random import itertools import numpy as np import pytest import moldesign from moldesign import units as u from moldesign.mathutils import spherical_harmonics as harmonics from . import helpers from .molecule_fixtures import * registered_types = {} __PYTEST_MARK__ = ['m...
from random import randrange def random_campground(): if 'campgrounds' not in random_campground.__dict__: random_campground.campgrounds = campgrounds() i = randrange(0,len(random_campground.campgrounds)) return random_campground.campgrounds[i] def campgrounds(): return [{"parkId":"banff", "cam...
#!/usr/bin/python # ex:set fileencoding=utf-8: from __future__ import unicode_literals from django import forms from django.apps import apps from django.conf import settings from django.conf.urls import patterns, url, include from django.contrib.admin.sites import AlreadyRegistered from django.contrib.admin.sites imp...
""" Copyright 2018-2019 CS Systèmes d'Information 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 wr...
import pandas as pd import numpy as np from tqdm import tqdm from typing import Dict, Tuple, List, Generator from sklearn.model_selection import train_test_split import tensorflow as tf from .config import SequenceConfig import logging class SequenceMetadata: def __init__( self, max_x_length, ...
# 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
# # Copyright (c) 2019-2020 Mike's Pub, see https://github.com/mikespub-org # (c) 2010 <NAME>; see CloudDAV http://clouddav.googlecode.com/ # Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php # # The original source for this module was taken from gaedav: # (c) 2009 <NAME> (http://gaedav...
# A set of utilities for audio IO and essential handling # # Data Formats: # audio data is passed as (float32) numpy arrays using the 'implicit mono' convention ( librosa) # + (n_samples,_) for mono # + (n_channels,n_samples) for multichannel data # # Alternatives: # (i) PyTorchAudio uses Explicit mono with c...
from typing import Dict, List, Optional, cast from constants import rmem_key_currently_under_siege, role_mineral_hauler, role_mineral_miner, role_recycling from creeps.base import RoleBase from jstools.screeps import * from utilities import movement __pragma__('noalias', 'name') __pragma__('noalias', 'undefined') __p...
# -*- coding: utf-8 -*- #Plotting is on python since this will make it much easier to debug and adjsut #no need to recompile everytime i change graph color.... #needs a serious refactor from matplotlib import pyplot as plt import numpy as np from .nputil import mid, minmax, vector_apply from util import parse_arg, de...
"""Do some fun analytics on the wordle word sets""" import string import matplotlib.pyplot as plt from colorama import init init() class Colors: """Colors class:reset all colors with colors.reset; two sub classes fg for foreground and bg for background; use as colors.subclass.colorname. i.e. colors...
# Copyright 2020 Virginia Polytechnic Institute and State University. """ Collection of ensemble-based Bayesian inversion techniques. """ # standard library imports import warnings import os import sys import importlib import logging # third party imports import numpy as np logger = logging.getLogger(__name__) # ...
#!/usr/bin/python3 # -*- coding: utf-8 -*- # # Huawei KoBackup backups decryptor. # # Version History # - 20190729: first public release # # Released under MIT License # # Copyright (c) 2019 Francesco "dfirfpi" Picasso, Reality Net System Solutions # # Permission is hereby granted, free of charge, to any person obtaini...
import tensorflow as tf def build_VGG19_feature_extractor(input_shape): x = tf.keras.Input(shape=input_shape) base_model = VGG19(weights='imagenet', include_top=False) outputs = [] out = x for layer in base_model.layers: out = layer(out) if layer.name in ['bl...
# coding=utf-8 import datetime import os import os.path import argparse import glob,StringIO from lxml import etree as ET, objectify import inventory from inventory import Geo_PntType,List_Of_Geo_PntType def open_xml_file(xml_filepath): """ Open the given filepath and return the dom if not None :param xml_...
#! /usr/bin/python import os SCRIPT_PATH = os.path.dirname(os.path.realpath(__file__)) import sys # Class containg statistic information gained from a dataset # Should be characteristic of a sequencing patform # This class is used from importing FQSTQSim profiles class FQSProfile: def __init__(self, name): ...
# # Copyright 2019 Xilinx Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
import os import datetime import json from PIL import Image import numpy as np from glob import glob from PIL import Image, ImageDraw from scipy import ndimage, misc import scipy.misc import imageio import cv2 # http://scikit-image.org/docs/dev/auto_examples/filters/plot_denoise.html from skimage.util import random_no...
# test_form_file_large_randompdfs.py from MAXENT3D_PID import pid, MAXENT3D_PID_Exception import time from random import random from sys import argv import pickle import numpy as np from collections import defaultdict # test_from_file_randompdf.py -- part of MAXENT3D_PID (https://github.com/Abzinger/MAXENT3D_...
import dataclasses import math from typing import List, Tuple, Dict, Iterable, Optional, Set, Any, AbstractSet import stim from hcb.tools.gen.circuit_canvas import CircuitCanvas, Loc, LocOp, complex_key from hcb.tools.gen.measurement_tracker import MeasurementTracker, Prev from hcb.tools.gen.viewer import tag_str AL...
# -*- coding: utf-8 -*- import numpy as np import json import os import sys import time import warnings warnings.filterwarnings('ignore') import matplotlib.pyplot as plt import torch import torch.nn as nn import torch.optim as optim import torchvision.utils from torchvision import models import torchvision.datasets ...
# Copyright (c) 2021 PPViT 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...
import os import torch from torch.utils.data import Dataset, DataLoader import numpy as np import glob import cv2 import json import utils.data_utils as util_ from . import data_augmentation from models.clip import tokenize import matplotlib.pyplot as plt import IPython import random from datasets.ocid_data_loader imp...
import re from itertools import chain import collections import math from nltk.translate.bleu_score import sentence_bleu, SmoothingFunction, ngrams, brevity_penalty from collections import Counter from fractions import Fraction from .wer import * import numpy as np from rouge import Rouge import logging logging.basicCo...
from models import User, User_in_chat, Telegram_chat, Telegram_message from typing import Optional, Tuple, List, Dict import logging class UserNotFound(Exception): pass class NoUserReactsFound(Exception): pass def get_user_by_user_id(user_id: int, conn) -> User: with conn: with conn.cursor() a...
import dataclasses import io import logging import re import typing as t from pathlib import Path from databind.core.settings import Alias, ExtraKeys from slap.application import Application, Command, argument, option from slap.changelog import Changelog, ChangelogEntry, ChangelogManager, ManagedChangelog from slap.p...
# Author: <NAME> # Copyright <NAME> 2021 Released under the MIT license # Created on 2021-02-07 __updated__ = "2021-02-10" __version__ = "0.3" from micropython import const # from wlan_link_libs.crc import crc16 import errno import time from wlan_link_libs.uart import WUart from .profiler import Profiler import stru...
""" Independent filter calculation code - no IOC logic should be mixed in here. References ---------- <NAME>, <NAME>, and <NAME>, X-ray interactions: photoabsorption, scattering, transmission, and reflection at E=50-30000 eV, Z=1-92, Atomic Data and Nuclear Data Tables 54 no.2, 181-342 (July 1993). <NAME>, Elements o...
"""int/parser.py Functions for parsing interaction files and extracting information from their file names """ from __future__ import print_function from parse import get_files_r, filename_elts_list, elt_from_felts from parse import content_lines, comment_lines from constants import FN_PARSE_INT_ELT_SPLIT as ELT_SPLIT...
from apq import KeyedItem, KeyedPQ from dataclasses import dataclass, field import functools import itertools import math from typing import Callable, cast, Iterable, Optional, Union from ..state import AccessInfo, FileID, SimpleAccessReader, StateDrivenProcessor, StateDrivenOfflineProcessor, Storage from ...dstructur...
#! python from behave import given, then from renderer.bolts import Tuple, Point, Vector, Color from math import isclose, sqrt, pi from renderer.matrix import IdentityMatrix EPSILON = 0.0001 #def determineValue(stringval): # if stringval == 'π': # return pi # else: # return float(stringval) #def...
from PIL import Image import numpy as np import os import torch import torch.nn as nn import torch.utils.data as utils import torch.nn.functional as F import higher import pickle from torch.utils.data import Dataset, DataLoader, Subset from torchvision import datasets, transforms from torch.autograd import grad from tq...
# 脚本 by affggh import os import sys import subprocess import tkinter as tk from tkinter.filedialog import * from tkinter import ttk from tkinter import * import time import webbrowser import threading # Hide console , need ```pip install pywin32``` import win32gui, win32con the_program_to_hide = win32gu...
import ast import collections import marshal import sys FLOAT_TYPES = (int, float) COMPLEX_TYPES = FLOAT_TYPES + (complex,) STR_TYPES = (bytes, str) # Primitive Python types (not containers) PRIMITIVE_TYPES = (type(None), bool, int, float, complex, bytes, str) # Iterable types ITERABLE_TYPES = (str, bytes, tuple, f...
## # \file DataReader.py # \brief Reads data and returns Stack objects # # \author <NAME> (<EMAIL>) # \date July 2017 # import os import re import six import natsort import numpy as np import nibabel as nib import SimpleITK as sitk from abc import ABCMeta, abstractmethod import pysitk.python_helper as...
import gzip import hashlib import importlib.metadata import locale import logging import os import pathlib import platform import shutil import socket import stat import struct import sys import tempfile from contextlib import contextmanager from dataclasses import dataclass from datetime import datetime, timezone from...
import re import inspect import copy import torch from pykeops.torch.kernel_product.formula import Formula from pykeops.torch.kernel_product.features_kernels import FeaturesKP # Define the standard kernel building blocks. # They will be concatenated depending on the "name" argument of Kernel.__init__ # Feel free to ...
import numpy as np import numbers from sympy import Symbol, Matrix from itertools import product from sympy.core import Float def set_difference(lst1,lst2): """ returns the elements and indicies of elements in lst1 that are not in lst2""" elements = [] indicies = [] for indx,item in enumerate(lst1): ...
import base64 import datetime from django.utils import timezone from django.views import generic from django.shortcuts import render, get_object_or_404, HttpResponseRedirect, HttpResponse from django.core.paginator import (Paginator, PageNotAnInteger, EmptyPage) from django.contrib.auth.models import Group, User from...
import pandas as pd import numpy as np import os from sim.Bus import Bus from sim.Route import Route from sim.Busstop import Bus_stop from sim.Passenger import Passenger import matplotlib.pyplot as plt pd.options.mode.chained_assignment = None def getBusRoute(data): my_path = os.path.abspath(os.path.dirname(__fi...
import time import math from random import * from dataclasses import dataclass from rpi_ws281x import Color, PixelStrip, ws # LED strip configuration: LED_COUNT = 144 # Number of LED pixels. LED_PIN = 18 # GPIO pin connected to the pixels (must support PWM!). LED_FREQ_HZ = 800000 # LED signal fr...
import numpy as np import math from .utils import ( MinCurve, get_nev, get_vec, get_angles, HLA_to_NEV, NEV_to_HLA, get_sigmas ) from welleng.error import ErrorModel from welleng.exchange.wbp import TurnPoint class Survey: def __init__( self, md, inc, a...
from pertussis import * from pprint import pprint from time import clock, sleep from scipy.integrate import odeint from copy import copy import numpy as np def difference_model(state_0, start, end, rho, om, phi, f, e, r=1, full_output=False): '''r is a hyper ...
from datetime import datetime from marshmallow import ( Schema, fields, post_load, post_dump, validates_schema, ValidationError, pre_load, pre_dump, INCLUDE, EXCLUDE, ) import collections import re from .. import config from .custom_fields import ( serverOptionUICpuValue, ...
# 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, software # distributed under t...
from itertools import combinations, chain from functools import partial from bisect import bisect_left import multiprocessing import numpy as np from scipy.sparse import lil_matrix from pydigree.ibs import get_ibs_states from pydigree.cydigree.cyfuncs import set_intervals_to_value, runs_gte_uint8 from pydigree.io imp...
#!/usr/bin/env python2 import sys, pdb import bitcoin import bitcoin.rpc import bitcoin.core import bitcoin.wallet import time import types import datetime from decimal import * import httplib import socket import random import threading #bitcoin.SelectParams('testnet') bitcoin.SelectParams('regtest') BTC = 100000000...
#!/usr/bin/python3 import sys, time, re, math #import matplotlib.pyplot as plt import matplotlib matplotlib.use('agg') import matplotlib.pyplot as plt import pandas as pd import tensorflow as tf import numpy as np from keras.models import Sequential from keras.layers import LSTM from keras.layers import Dense from ke...
""" sparse tables ============= Might look like this: level 1 level 2 level 3 columns columns columns idx a b c d e f idx g h i j k l idx m n o p ___ _ _ _ _ _ _ ___ _ _ _ _ _ _ |_0_|_|_|_|_|_|_||_0_|_|_|_|_|_|_| |_1_|_|_|_|_|_|_| |_2_|_|_|_...
from math import floor import random from random import Random import copy from datetime import datetime from time import sleep from threading import Lock from shared.ThreadManager import ThreadManager from shared.LogParser import LogParser from shared.utils import get_rnd, get_time, get_rnd_seed from shared.RedisMan...
import torch as th import torch.nn as nn import dgl import numpy as np from onmt.decoders.modules.pointer_net import PointerNet from onmt.decoders.modules.mst import * from onmt.utils.span import DepSpanNode from onmt.utils.constants import * from collections import defaultdict import copy import gc class DependencyT...
#!/usr/bin/env python import rospy import math from Path import getPerpLine, WAYPOINT_REACHED_DISTANCE from sailbot_msg.msg import path, latlon import utilities as utils import obstacles as obs import Sailbot as sbot from matplotlib import pyplot as plt from matplotlib import patches # Constants VISUALIZER_UPDATE_PERI...
from __future__ import (division, print_function) import os import numpy as np import pickle from collections import defaultdict from tqdm import tqdm import torch import torch.nn as nn import torch.utils.data import torch.optim as optim from torch.utils.tensorboard.writer import SummaryWriter from model import * fro...