text
stringlengths
6.04k
39.5k
# -*- coding: utf-8 -*- from __future__ import unicode_literals import json from django.db import models from django.template import Template, Context from django.utils.translation import ugettext_lazy as _ from app.setting import constants from app.core.models import Department from lib.formats import dict_compatibil...
#!/usr/bin/env python # coding: utf-8 # This is a demo, given a LINEMOD image 0002.png and the mask-RCNN result(mask and 2D boundingbox), do 6D pose estimation for the lamp: # First based on RGB, then use depth map to refine the z-direction, finally refine both rotation and translation. #Prerequisite before generating ...
# ------------------------------------------------------------------------------ # Panoptic-Deeplab output mathematics # Written by <NAME> (<EMAIL>) # ------------------------------------------------------------------------------ import abc import collections import torch import torch.nn as nn import torch.nn.functi...
# continual_learning_svhn.py from collections.abc import Iterable import numpy as np import torch import torchvision from torch import nn as nn import imagenet_classes as imagenet from torch.utils.data import DataLoader, sampler #import matplotlib.pyplot as plt #import matplotlib.patches as patches import h5py from PIL...
from __future__ import print_function # import os # import sys # print(sys.path) # sys.path.append(os.path.dirname(os.getcwd())) # print(sys.path) import logging import torch import torch.nn as nn import torch.nn.parallel import torch.utils.data from torch.autograd import Variable import numpy as np import torch.nn.fu...
from math import isnan import matplotlib.pyplot as plt from mpl_toolkits import mplot3d import tkinter as tk class Goujon : def __init__(self,num): self.coordX = [] self.coordY = [] self.coordZ = [] self.nbContact = 0 self.liste_contact = [] self.contact_avec = [] ...
# -*- coding: utf-8 -*- """ Created on Sun Nov 20 17:49:56 2016 @author: hannes """ import inspect from importlib import import_module import sys import guidata.qt.QtGui as qtgui import guidata.qt.QtCore as QtCore from guidata.configtools import get_icon from guidata.qt.QtGui import QApplication, QWidget, \ QVBoxL...
#!/usr/bin/env python3 # Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # http://www.apache.org/licenses/LICENSE-2.0 # ...
# Copyright 2016-2020 Swiss National Supercomputing Centre (CSCS/ETH Zurich) # ReFrame Project Developers. See the top-level LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause import itertools import pytest import reframe as rfm import reframe.core.runtime as rt import reframe.frontend.dependency as ...
""" The AyarLayoutGenerator module implements classes to generate full-custom layout without a grid. It allows designers to describe layout generation scripts in the Python language and automate the layout process. """ # General imports import abc from typing import Union, Tuple, List, Optional import re import yaml i...
import os,errno,hashlib,shutil,datetime,random,csv as csvm from .status import error,success,info from .functions.functions import * from .functions.subclass import subclass from .operators import * from pathlib import Path class pi7db: def __init__(self,db_name,db_path=""): self.db_np,self.db_name,self.doc_size,...
# Generic/Built-in import datetime import math import os import pandas as pd import pvlib import numpy as np from dataclasses_json import dataclass_json from dataclasses import dataclass from typing import List # Owned from hisim.component import Component, SingleTimeStepValues, ComponentInput, ComponentOutput from hi...
# Licensed to Modin Development Team under one or more contributor license agreements. # See the NOTICE file distributed with this work for additional information regarding # copyright ownership. The Modin Development Team licenses this file to you under the # Apache License, Version 2.0 (the "License"); you may not u...
# -*- coding: utf-8 -*- import conf import errors import pytz import logbook import json from datetime import datetime from re import compile as regex_compile, IGNORECASE from abc import ABCMeta from decimal import getcontext, Context, Decimal as BaseDecimal from babel import Locale as BabelLocale, UnknownLocaleError f...
import gym import gym_schafkopf #used for batches and memory: import random from copy import deepcopy # used for baches and memory import numpy as np import datetime # use for PPO Training: import torch # pip3 install torch import torch.nn as nn from torch.distributions import Categoric...
# Copyright 2021 The QHBM Library 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
import json import logging.config import os from pathlib import Path from typing import Dict import validators from SPARQLWrapper import SPARQLWrapper, POST, JSONLD, DIGEST from SPARQLWrapper.SPARQLExceptions import EndPointInternalError, QueryBadFormed, Unauthorized, EndPointNotFound from pyld import jsonld from rdfl...
# -*- coding: utf-8 -*- # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved. # This program is free software; you can redistribute it and/or modify # it under the terms of the MIT License. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the...
import os import pickle import hashlib import io import json import zipfile import shutil import tempfile import threading import configparser import logging import sys import semver import time from datetime import datetime import multiprocessing import cherrypy from colorama import Fore from docopt import docopt fro...
import argparse import os import random import time import warnings import sys import numpy as np import math import utils import pickle from PIL import Image, ImageOps, ImageDraw import torch import torch.nn as nn import torch.nn.parallel import torch.backends.cudnn as cudnn import torch.optim import torch.utils.data...
# Copyright (c) Meta Platforms, Inc. and affiliates. All Rights Reserved. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from typing import Dict, List, Optional import torch import torch.nn as nn import torch.nn.functional as F from torch ...
#! -*- coding: utf-8 import torch import torch.nn as nn __all__ = ["BasicBlock", "Bottleneck", "conv3x3", "conv1x1", "ResNet", "resnet10", "resnet18", "resnet32", "resnet50", "resnet101", "resnet152"] def conv3x3(in_planes, out_planes, stride=1, groups=1, dilation=1): ...
# -*- coding: utf-8 -*- """ Created on Fri Jul 26 07:57:58 2019 @author: buriona """ from datetime import datetime as dt import numpy as np import pandas as pd import folium import plotly.graph_objs as go STATIC_URL = "https://www.usbr.gov/uc/water/hydrodata/assets" def get_plotly_js(): return f"{STATIC_URL}/p...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This module deals with hexagonal twinboundary structure. """ from copy import deepcopy import math import numpy as np from twinpy.structure.base import _BaseTwinStructure from twinpy.structure.shear import ShearStructure class TwinBoundaryStructure(_BaseTwinStructur...
# -*- coding: utf-8 -*- """ Created on Thu May 1 16:56:49 2014 @author: rlabbe """ import filterpy.stats as stats from filterpy.stats import plot_covariance_ellipse import numpy as np from matplotlib.patches import Ellipse import matplotlib.pyplot as plt from matplotlib import cm from mpl_toolkits.mplot3d...
from __future__ import print_function from __future__ import absolute_import from past.builtins import basestring import moby2 import os import numpy as np import pylab as pl def load_reduced_fpfit(template, tod_id): """ Load the reduced fp_fit data for this observation. """ fn = template.format(tod_id...
''' Copyright 2022 Airbus SAS 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 dis...
#!/usr/bin/env python3 # coding: utf8 # Author: <NAME>, 2016 ''' Skeleton of the pipeline. Make sure all components are connected with each other according to the parameters. This module: - provides iterators for looping through paths/IDs/documents - defines a class for running the pipeline in server mode - takes ...
''' * @author Waldinsamkeit * @email <EMAIL> * @create date 2020-08-24 23:05:58 * @desc ''' import os import sys import random from collections import Counter from tqdm import tqdm import operator import src.config.args as args from src.utils.common import overrides import json import numpy as np def line2char(l...
""" Declares and exports the main class of BiblioAlly, the Catalog class and some utility functions. """ import datetime from functools import reduce from sqlalchemy import create_engine from sqlalchemy.orm import Session, aliased from sqlalchemy.sql.expression import select from BiblioAlly import domain TAG_SELECTE...
#/* # * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more # * contributor license agreements. See the NOTICE file distributed with # * this work for additional information regarding copyright ownership. # * The OpenAirInterface Software Alliance licenses this file to You under # * the OAI Publ...
import numpy as np from netCDF4 import Dataset from datetime import datetime from datetime import timedelta import os import sys import matplotlib.pyplot as plt from matplotlib.colors import BoundaryNorm from tools_LT import read_evar4d_nc, get_eGLM, get_GLM DEBUG = True DEBUG = False quick = True quick = False L...
import click from src.visualization.explainer.html_components import build_header import src.visualization.visualize as viz from mlflow.tracking import MlflowClient from datetime import datetime import dash from dash.dependencies import Input, Output, State import dash_core_components as dcc import dash_html_components...
"""Databases.py: This file contains MINE database classes including database loading and writing functions.""" import datetime import multiprocessing import os import platform import sys from copy import deepcopy from math import ceil from shutil import move from subprocess import call from typing import List, Union i...
""" <NAME>. Locally Linear Meta Embedding Learning. """ import numpy from sklearn import manifold from sklearn.utils.extmath import randomized_svd from sklearn.neighbors import NearestNeighbors from wordreps import WordReps from scipy.sparse import csr_matrix, eye from scipy.sparse.linalg import eigsh from scipy.sp...
#-*- coding: utf-8 -* # # Copyright 2011 msx.com # by <EMAIL> # 2012-3-7 # # Sputnik Logging # # ToDoList: # import os import sys import thread import logging import logging.handlers import time from SpuUtil import * try: import curses except ImportError: curses = None logging_config = None ## from loggin...
# -*- coding: utf-8 -*- """ Created on Sat Aug 15 23:09:25 2020 @author: badat """ import os,sys pwd = os.getcwd() sys.path.insert(0,pwd) #%% print('-'*30) print(os.getcwd()) print('-'*30) #%% import torch import torchvision import torch.nn as nn import torch.optim as optim from torchvision import transforms from tor...
from enum import Enum import queue import random import errors_algs import network_layer_utils as netl handler = None class Data(Enum): Null = "Null" One = "1" Zero = "0" class Packet: def __init__(self, mac_ori , ori_ip, des_ip, data): self.ori_ip = ori_ip self.des_ip = des_ip ...
#!/usr/bin/env python # Authors: <NAME> & <NAME> # This is the priliminary control script that will talk # with the competition rostopics from __future__ import print_function import roslib roslib.load_manifest('convolution_net') import sys import rospy import cv2 from std_msgs.msg import String from sensor_msgs.msg...
#!/usr/bin/env python import os import re from textwrap import dedent import requests import requests_cache from slack import RTMClient, WebClient from slack.errors import SlackApiError import ombi_functions SLACK_TOKEN = os.environ.get("SLACK_TOKEN") OMBI_API_KEY = os.environ.get("OMBI_API_KEY") OMBI_URL = os.envir...
from typing import Dict from typing import FrozenSet from typing import Optional from ddtrace import config from ..constants import AUTO_KEEP from ..constants import AUTO_REJECT from ..constants import USER_KEEP from ..context import Context from ..internal.compat import ensure_text from ..internal.constants import P...
import functools import gzip import json import math import os import pwd import shutil import msgpack import numpy import msgpack_numpy from prettytable import PrettyTable # Physical Constants _h = 4.13566733e-15 # eV.s _c = 299792458e10 # A/s # direction vector of kappa axis on 08B1-1 when omega is at 0.0 deg K...
from flask import render_template, redirect, request,json, session, jsonify, flash import requests import json import pprint import re import sqlalchemy from datetime import date from app import app, db from hidden import mash_key from models import User, Event, Recipe, Cookbook, Api from hashy import check_pw_has...
#!/usr/bin/env python import os import argparse import datetime import pandas as pd import numpy as np import matplotlib.pyplot as plt import plotly.graph_objects as go from plotly.subplots import make_subplots from plotly.offline import plot as poff import git import shutil _datetime_fmt = "%Y-%m-%d" parser = argpa...
# Copyright (c) 2020. CSIRO Australia. # # 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, publis...
# author: <NAME> # license: see, LICENSE # No Warranties, see LICENSE from modules.detector.tf_detector.research.object_detection.protos.string_int_label_map_pb2 import StringIntLabelMap from google.protobuf import json_format from google.protobuf import text_format import os import sys import numpy as np import ten...
import pyttsx3 import subprocess #system command import speech_recognition as sr import datetime import wikipedia import webbrowser #control web browser import random import wolframalpha import ctypes import winshell import os import cv2 #openCV moduals import time import...
import datetime import logging from django.db import DatabaseError from django.utils import timezone from accounts.models import Teachers, StudyGroups, Apprentices from accounts.services import get_profile_from_user, get_study_group_apprentices from journal.models import Lessons, Disciples, Marks, Homeworks logger =...
# coding: utf-8 # # Moster plot for as many galaxies as possible # In[135]: class Dummy(): def __init__(self): pass def radial_profile_cut(star, den_lim=2e6, den_lim2=5e6, mag_lim=25, nbins=100, rmax=50, dr=0.5, debug=False): # 2D...
""" table submodule This submodule contains the File class, and it's closely related Layout class. """ import csv from pathlib import Path from typing import Union, Dict, List, Iterable from uuid import uuid4 from rumydata import exception as ex from rumydata import field from rumydata._base import _BaseSubject from ...
# coding: utf-8 # In[289]: import numpy as np import matplotlib.pyplot as plt import krotov import qutip import scipy import os import copy π = np.pi sqrt = np.sqrt basis = qutip.basis tensor = qutip.tensor coherent = qutip.coherent # In[290]: def plot_fid_convergence(ax, info_vals, T): ax.plot3D(range(0,le...
from django.contrib.auth.models import User from django.http import response from django.shortcuts import redirect, render from django.contrib.auth.decorators import login_required from rest_framework import serializers, status from rest_framework.views import APIView from rest_framework.decorators import api_view fr...
""" functions for use with the substances and related tables...""" from django.db.models import Q from substances.external import * from substances.models import * from contexts.models import * from datetime import datetime from workflow.log_functions import * import json import os import random import string def add...
# # Copyright (c) 2013,2014, Oracle and/or its affiliates. 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 Foundation; version 2 of the License. # # This program is distributed in the...
import numpy as np from time import time from scipy.spatial.transform import Rotation as srot from scipy.optimize import least_squares # 0 for prismatic, 1 for revolute JOINT_TYPE = [-1, 1] # Checks if a matrix is a valid rotation matrix. def isRotationMatrix(R): Rt = np.transpose(R) shouldBeIdentity = np.dot...
# # Copyright (c) 2018 ISP RAS (http://www.ispras.ru) # Ivannikov Institute for System Programming of the Russian Academy of Sciences # # 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 # # h...
import networkx as nx import string import itertools import matplotlib from AHU_Algorithm import * ######### ##Functions for generating vertices' names automatically. def get_int(used=[]): """ Generator of numbers that are not in 'used' """ a=0 while True: if a not in used: yield a a=a+1 def get_str(used=...
#!/usr/bin/env python3 # coding=utf-8 # the following as I started having issues with the final fig.savefig on my mac import platform print('platform.system(): {}'.format(platform.system())) if platform.system() == 'Darwin': import matplotlib print('Switching from backend: {}'.format(matplotlib.get_backend()))...
import pandas as pd import numpy as np import json import os import time def jhu_data(remote=True): """Fetch data from JHU set on Github and partially parse it. Inputs: - remote: if True, pull files from Github. Otherwise, use local copies. Outputs: - cases_df: # of confirm...
#kitchen.py ##############NETWORK CONFIG############### import csv import os allfile = os.listdir() def Save(data): with open('config_kitchen.csv','w',newline='') as file: #fw = 'file writer' fw = csv.writer(file) fw.writerows(data) print('Save Done!') def Read(): if 'config_kitchen.csv' n...
#!/usr/bin/env python3.8 # -*- coding: utf-8 -*- """dash_tools module containing objects frequently used in Dash applications.""" from abc import ABC from pandas import DataFrame from copy import deepcopy import dash_html_components as html import dash_core_components as dcc import dash_bootstrap_components as dbc im...
#!/usr/bin/env python from __future__ import print_function import os, random, re, sys try: from cStringIO import StringIO as BytesIO except ImportError: from io import BytesIO import unittest global VERBOSE VERBOSE=False import zfec from pyutil import fileutil from base64 import b32encode def ab(x): # ...
"""Mist Io DAL DAL can stand for 'Database Abstraction Layer', 'Data Access Layer' or any of several more similar combinations. The role of this DAL is to take control over all persistence related operations like reading from and writing to some storage. The rest of the application knows nothing about how the storage...
import copy from datetime import datetime import numpy as np import ChiantiPy import ChiantiPy.tools.data as chdata import ChiantiPy.tools.constants as const import ChiantiPy.tools.filters as chfilters import ChiantiPy.tools.util as util import ChiantiPy.Gui as chGui from ChiantiPy.base import ionTrails from ChiantiP...
#!/usr/bin/env python # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved """ Detection Training Script. This scripts reads a given config file and runs the training or evaluation. It is an entry point that is made to train standard models in detectron2. In order to let one script support training ...
#!/usr/bin/env python # Software License Agreement (Apache License) # # Copyright 2016 Open Source Robotics Foundation # # 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.apac...
from ringbuffer import RingBuffer import time from adafruit_datetime import datetime, time import board import busio # Network import wifi import ssl import socketpool import adafruit_ntp import adafruit_requests as requests from timezone_amsterdam import TimeZoneAmsterdam # Display import displayio impor...
import deck import players import hand from itertools import combinations import json import random RANKS = {'ace':1,'two':2,'three':3,'four':4,'five':5,'six':6,'seven':7,'eight':8, 'nine':9,'ten':10,'jack':11,'queen':12,'king':13} SUITS = ['clubs','diamonds','hearts','spades'] discard_outcomes = {} #template: ...
import configparser import os import sys import netCDF4 as nc import numpy as np from helperFunctions import temperature_array_from_result from helperFunctions import surface_temperature_array_from_result DEPTH = 10 def print_results(section, temp_mean, temp_max, temp_min, temp_std_dev): print('Mean temp of {}:...
# -*- coding:utf-8 -*- """ The Kernel Module of simple_ml """ from simple_ml.base.base_model import * from simple_ml.base.base_error import * from simple_ml.base.base_enum import * from simple_ml.data_handle import * from simple_ml.feature_select import * from simple_ml.logistic import * from simple_ml.support_vector...
from discord.ext import commands, menus from discord.ext.commands import Greedy from typing import Union, Optional import discord from custom_funcs import * def maybe_first_snipe_msg(ctx): embed = embed_create(ctx.author, title='⚠ Warning!', description='That channel seems to...
from enum import Enum from nest import Create, Connect from the_second_level.src.tools.multimeter import add_multimeter class Params(Enum): NUM_SUBLEVELS = 6 NUM_SPIKES = 6 RATE = 40 SIMULATION_TIME = 175. INH_COEF = 1. PLOT_SLICES_SHIFT = 8. # ms TO_PLOT = { 'node1.1': 'Node 1.1'...
from __future__ import print_function, division from keras.utils import Sequence import numpy as np import os import gc import sys import datetime import h5py class ModelDataInterface(object): def __init__(self, data_file_path, dim_x = 32, dim_y = 32, dim_z = 32, n_classes = 10): 'Initialization' s...
"""Tools for solving inequalities and systems of inequalities. """ from collections import defaultdict from ..core import Dummy, Eq, Ge, Integer, Lt, S, Symbol, oo from ..core.compatibility import iterable from ..core.relational import Relational from ..functions import Abs, Piecewise from ..logic import And, false, ...
# Copyright (c) 2022 Horizon Robotics and ALF Contributors. 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...
import re import shlex import itertools from collections.abc import Iterable GROUP_REGEX = r'(\S+) ?(.*?) ?\{([^\{\}]*)\}' PARAMETER_REGEX = r'(\S+?)( (.+))?;' class ParserError(Exception): pass class Group: GROUP_CASTERS = {} def __init__(self, type_, properties=None, parameters=None, subgroups=Non...
import os import time import matplotlib.pyplot as plt import numpy as np import torch import nni from sklearn.metrics import f1_score from loggers import EmptyLogger, CSVLogger, PrintLogger, FileLogger, multi_logger from model import GCN import pickle class ModelRunner: def __init__(self, params, log...
import threading from real.client_sockets import * import real.voice_client import canshu import real.videoClient import os import time import real.screenClient import real.c2 import real.s2 import sys from PyQt5.QtWidgets import * from PyQt5.QtCore import * from PyQt5.QtGui import *##引入前端组件 vodio_port=0#其实是audio_por...
#!/bin/python import sys import numpy as np class Transcript_t(object): def __init__(self, _TransID, _GeneID, _GeneName, _Chr, _Strand, _StartPos, _EndPos): self.TransID=_TransID self.GeneID=_GeneID self.GeneName=_GeneName self.Chr = _Chr self.Strand = _Strand self.StartPos = _StartPos self.EndPos = _E...
from _typeshed import ReadableBuffer import logging import boto3 import json import dropbox import sys import os import configparser from botocore.exceptions import ClientError from dropbox import files from dropbox.files import WriteMode from dropbox.exceptions import ApiError, AuthError from botocore.config import Co...
#!/usr/bin/env python3 import numpy as np from seq2vec import HashSeq2Vec from joblib import Parallel, delayed import sys import h5py import os def raw_file_list(tld_path): tld_path += '/financial_statement_data' raw_files = [] for quarter_dir in os.listdir(tld_path): if quarter_dir == '.DS_Store...
# 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 required by applica...
import csv import matplotlib import matplotlib.pyplot as plt import numpy as np import sys def translationError(pose_error): return np.sqrt(pose_error[0, 2]**2 + pose_error[1, 2]**2) def get_inverse_tf(T): T2 = np.identity(3) R = T[0:2, 0:2] t = T[0:2, 2] t = np.reshape(t, (2, 1)) T2[0:2, 0:2]...
#!/usr/bin/env python """ Toytree viewer. Created Jan 2021 Copyright (C) <NAME> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at yo...
# -------------------------------------------------- # Imports # -------------------------------------------------- import argparse import curses import logging import math from serial import Serial, PARITY_ODD, PARITY_NONE import time import pandas as pd # -------------------------------------------------- # GC...
import os from datetime import datetime as dt from datetime import timedelta as td from uuid import uuid4 import json import pandas as pd import numpy as np from kivy.app import App from kivy.uix.screenmanager import ScreenManager, Screen from kivy.config import Config from kivy.uix.boxlayout import BoxLayout from ki...
import numpy as np import scipy.optimize as opt from collections import defaultdict BATCHES = np.array([0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 65, 70]) CATEGORIES = np.array([1, 1, 2, 3, 5, 4, 2, 3, 4, 5, 6, 3, 4, 6, 2, 5, 4, 5, ...
#!/usr/bin/python usageStr = \ """CreateMakeFile.py targetBinary1 [target2 ...] [-shared sharedDir1 dir2 ...] Create a c++ Makefile in the current directory, given a list of target executable files. -To trigger the use of a compiler flag, add a commented line to the c++ file that requires it. e.g. to turn o...
# -- coding: utf-8 -- ''' the shape of sparsetensor is a tuuple, like this (array([[ 0, 297], [ 0, 296], [ 0, 295], ..., [161, 2], [161, 1], [161, 0]], dtype=int32), array([0.00323625, 0.00485437, 0.00323625, ..., 0.00646204, 0.00161551, 0.00161551], dtype=float...
""" Viscotester: a Python script to process data from a viscosimeter Visco Tester 6L Haake. The documentation is in English but the program is used in a Brazilian laboratory, so the language of the prints is Portuguese-BR. This program is made specifically for Visco Tester 6L Haake and Windows OS. A viscosimeter is a e...
import time from bluesky.run_engine import Msg from ophyd import Component as C from ophyd import EpicsSignalRO, Device, EpicsSignal from ophyd.areadetector import ( GreatEyesDetector, GreatEyesDetectorCam, ImagePlugin, TIFFPlugin, ROIPlugin, TransformPlugin, ) from ophyd.areadetector.filestore_...
# This notebook is for finding the segmentation threshold that most clearly finds worms in a recording. # It is intended as an alternative method of validating the MultiWorm Tracker's results. from __future__ import absolute_import, division, print_function # standard library import sys import json # third party impo...
from ..Screen import Screen import pygame from ..logic.GameHandler import GameHandler # from ..UIConstants import SCREEN_WIDTH, SCREEN_HEIGHT from ..aspects.Label import Label from ..aspects.LabeledButton import LabeledButton from ..aspects.Button import Button from ..aspects.Circle import Circle from ..aspects...
''' MIT License Copyright (c) 2020 <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 ...
from FaceTools import * import scipy.io as sio from scipy.signal import sosfilt, sosfiltfilt, butter, periodogram from SlidingWindow import * import os import glob import subprocess TEMP_FOLDERNAME = "tempvideo" def get_video_filepaths(path): """ Create a list of file paths corresponding to a video. If th...
""" minimalistic WSGI: Python Web Server Gateway Interface. An intermediate application that allows any server and any framework to talk and work together. E.g. you can use Waitress, Nginx, Gunicorn as servers, and Pyramid, Flash, or Django as frameworks. As long as the web server implements the server portion of the W...
import logging import os import json import requests import datetime import copy import time import math _regionServiceLayerUrl = "https://services.arcgis.com/emS4w7iyWEQiulAb/arcgis/rest/services/SelfServiceStoryMapping2020_Regions/FeatureServer/0" _sssServiceLayerUrl = "https://services.arcgis.com/emS4w7iyWEQiulAb/A...
import re, io, copy, os, sys, argparse, json, pdb, jsonlines from tqdm import tqdm from collections import Counter from pprint import pprint sys.path.insert(0, '../purification/') from domain_knowledge import Domain_Knowledge knowledge_container = Domain_Knowledge() DELIM = "│" # ---------------------- # # --- add ga...
import networkx as nx import matplotlib.pyplot as plt import dijkstra_original as do import re import random def nodeConnectivity(G, layout): graphs = list() figures = list() graphData, bridges, articulationPoints = list(), list(), list() sortedNodes = sorted(dict(G.nodes), key=lambda g: g[0]) gr...
from Animation import * from utilities import * from pygame.locals import * from globals import pygame from .BasicComponents import * from .locals import * from os.path import join as j_path import logging class MoveComponent(StatesComponent, VelocityComponent): def __init__(self): super(MoveComponent, self)._...