text
stringlengths
6.04k
39.5k
import os import json import time as t import pandas as pd import numpy as np import seaborn as sns import matplotlib.pyplot as plt from scipy.spatial import distance import scipy.stats from sklearn import svm, datasets, metrics, preprocessing from sklearn.ensemble import RandomForestClassifier from sklearn.neighbors ...
import sqlite3 conn = sqlite3.connect('tefdb.sqlite') cur = conn.cursor() cur.executescript(''' DROP TABLE IF EXISTS User; DROP TABLE IF EXISTS restaurant; DROP TABLE IF EXISTS food; DROP TABLE IF EXISTS cart; CREATE TABLE IF NOT EXISTS User ( id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE,...
import datetime, os from django import forms from django.shortcuts import render_to_response, get_object_or_404, redirect from django.http import HttpResponseRedirect, Http404 from django.core.urlresolvers import reverse from django.template import RequestContext from django.template.loader import render_to_string fro...
# Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved. import ast from copy import deepcopy as dcpy from functools import reduce import operator from typing import List, Set, Union import warnings import dace import dace.serialize from dace import subsets, dtypes, symbolic from dace.frontend.opera...
# coding: utf-8 import tensorflow as tf import tensorflow_datasets as tfds import numpy as np import pandas as pd import os import gzip import shutil from collections import Counter from tensorflow.keras.layers import Embedding from tensorflow.keras import Sequential from tensorflow.keras.layers import SimpleRNN from...
# This code is part of Qiskit. # # (C) Copyright IBM 2017. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
from collections import defaultdict from data_structs import PinDirection, ConnectionType from utils import yield_muxes from rr_utils import add_node, connect # ============================================================================= class SwitchboxModel(object): """ Represents a model of connectivity ...
import math import numpy as np import itertools import scipy, scipy.sparse, scipy.sparse.linalg from scipy.sparse import lil_matrix as spmat # from .rref import rref #from .cy_rref import cy_rref from _c_util import fct_trans_c, get_nullspace def cofactor(M): return np.linalg.det(M)* np.linalg.inv(M).T def vec_l...
# # 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...
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Khronos Group Inc. # Copyright (c) 2015-2016 Valve Corporation # Copyright (c) 2015-2016 LunarG, Inc. # Copyright (c) 2015-2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the L...
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
# Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import logging import argparse import json from functools import reduce import tensorflow as tf from tensorflow.python.lib.io.file_io import FileIO # pylint: disable=E0611 from sciencebeam_gym.trainer.data...
from __future__ import print_function import argparse import time import torch.nn as nn import torch.backends.cudnn as cudnn from torch.autograd import Variable import torch.utils.data as data import torchvision.transforms as transforms from data_loader import SYSUData, RegDBData, TestData from data_manager import * fr...
from __future__ import division import os import sys import time import glob import logging from tqdm import tqdm import torch import torch.nn as nn import torch.utils import torch.nn.functional as F import torch.backends.cudnn as cudnn import torchvision.transforms as transforms from torch.utils.data import DataLoade...
import math import dataclasses import origami_rectangle as rect import scadnano as sc import modifications as mod def create_design() -> sc.Design: design = rect.create(num_helices=16, num_cols=28, seam_left_column=12, assign_seq=False, num_flanking_columns=2, edge_staples=False, ...
from flask import redirect, render_template, request, url_for from flask_login import login_required, current_user, login_user, logout_user, LoginManager from app import app from app import db from app.models import User, Post, Upload, Site from app.forms import LoginForm, EditForm, NewPostForm, DeleteForm, PublishFor...
# This file is part of the pyMOR project (http://www.pymor.org). # Copyright 2013-2020 pyMOR developers and contributors. All rights reserved. # License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause) """This module contains the implementation of pyMOR's parameter handling facilities. Use the |Par...
from datetime import date from pathlib import Path import sys sys.path.append("c:\\Users\\kpdav\\machine_learning\\projects\\PGA-portfolio-optimizer\\config") import config import pandas as pd import numpy as np def input_rbc_open_19(df): """Input missing data for rbc canadian open 2019 Args: df (pd....
# 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
""" Created by <NAME> at 10/6/20 followed game code from https://github.com/maurock/snake-ga """ import argparse import random import sys from collections import deque import itertools import numpy as np import pygame def update_screen(): pygame.display.update() def display(player, food, game, record): ga...
#!/bin/env python import sys import json import pywbem import argparse import logging import logging.handlers log_level = logging.CRITICAL def ecom_connect(ecom_ip, ecom_user, ecom_pass, default_namespace="/root/emc"): """ returns a connection to the ecom server """ ecom_url = "http://%s:5988" % ecom_ip ...
import pandas as pd from scaling import convert_scaling from similar import similarity from recommendation import _recommendation # 全選手と類似度を比較する def similar_all_players(df, player_id): df_data = pd.read_csv('../data/players_18.csv') df_data['similarity'] = 0 # player_idの行番号を取得 idx = df_data.reset_i...
from spira.yevon.rdd.all import * from spira.yevon.visualization import color from spira.yevon.rdd.layer import PurposeLayer from spira.yevon.rdd import RULE_DECK_DATABASE as RDD # -------------------------------- Initialize ------------------------------------ RDD.name = 'MiTLL' RDD.desc = 'Process fabrication data ...
# -*- coding: utf-8 -*- from os.path import join as JOIN from os import remove as REMOVE IDMODULO="" def VerificarModulo(modulo): #Anterior mente el modulo se verifica con el id pero se cambia al #nombre del ambiente para buscar el id if isinstance( modulo,(int,float)):return modulo if not isinstance(mo...
# -*- coding: utf-8 -*- import tkinter as tk import json import webbrowser from tkinter import messagebox from tkinter import * import pypinyin from pypinyin import Style import threading import time import systemhotkey import os import base64 from icon import MYICO,ADDICO FONT_1 = ('微软雅黑',10,'normal') F...
import abc from abc import abstractmethod, abstractproperty import collections import contextlib import sys import typing try: import collections.abc as collections_abc except ImportError: import collections as collections_abc # Fallback for PY3.2. if hasattr(typing, '_generic_new'): _generic_new = typing...
from tkinter import * from tkinter import filedialog from PIL import ImageTk import tkinter.messagebox import sys ,os ,time ,requests ,json ,yaml ,datetime import pandas as pd import numpy as np ### Funções def get_random_ua(): random_ua = '' ua_file = 'user_agents.txt' try: with open(ua_file) as...
""" Utilties for arrays/n-dimensional matrices. """ import numpy as np from scipy.linalg import eigh from aspire.utils.matlab_compat import m_reshape SQRT2 = np.sqrt(2) SQRT2_R = 1 / SQRT2 def unroll_dim(X, dim): # TODO: dim is still 1-indexed like in MATLAB to reduce headaches for now # TODO: unroll/roll ...
from functools import partial from multiprocessing.dummy import Pool as ThreadPool import pandas as pd import requests import streamlit as st from bs4 import BeautifulSoup from google_trans_new import google_translator from googletrans import Translator from aws import s3_bucket # from moto import mock_s3 SHOW_SPI...
# # Copyright 2014 Quantopian, 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 wr...
""" Resource data tree traversal. This file is part of the everest project. See LICENSE.txt for licensing, CONTRIBUTORS.txt for contributor information. Created on Apr 25, 2012. """ from collections import OrderedDict from pyramid.compat import iteritems_ from pyramid.threadlocal import get_current_registry from ev...
""" Base autoassess area metrics diagnostic. Wrapper that takes two datasets (control_model and exp_model and observational data (optionally); base for all area diags for autoassess metrics. Current areas: version.September.2018 ----------------------- monsoon -- not yet implemented stratosphere -- implemented hydroc...
# import required modules try: import os, sys, getopt import numpy as np import scvelo as scv import loompy as lp except ImportError as imperror: print(imperror) print("Unable to load required modules, exiting program") print("") sys.exit(1) # define functions def a_notin_b(list1, list...
"""RMPシミュレーション""" #from collections import deque import numpy as np import matplotlib.pyplot as plt import matplotlib.animation as anm import scipy.integrate as integrate import tqdm import time import environment from kinematics import BaxterRobotArmKinematics import rmp class PositinData: ...
# -*- coding: utf-8 -*- ''' VBEThemeColorTool (vbetctool) === This is a command line tool to apply a theme for [VBEThemeColorEditor]](https://github.com/gallaux/VBEThemeColorEditor) to VBE7.DLL. ''' __version__ = '0.1.2' __author__ = 'furyu' __author_email__ = '<EMAIL>' __copyright__ = 'Copyright (c) 2021 furyu' _...
# -*- coding: utf-8 -*- # Copyright 2020 DeepMind Technologies Limited. # # 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 ...
import datetime import json import logging import textwrap import time import typing from pathlib import Path from typing import List, Union, Dict, Optional from deprecated.sphinx import deprecated import requests from openeo.api.logs import LogEntry from openeo.internal.jupyter import render_component, render_error,...
############################################################################### # The MIT License (MIT) # # 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...
import sys sys.path.append("../M2_Speech_Signal_Processing") import os.path import cntk import numpy as np import scipy.sparse import scipy.misc import re import time import itertools from collections import namedtuple import argparse from htk_featio import read_htk_user_feat from typing import List import operator de...
import os import copy import datetime from base import PyexcelIteratorBase, create_sample_file2 from pyexcel import Reader, SeriesReader, save_as, get_sheet from pyexcel.internal.sheets import Matrix, _shared from nose.tools import eq_, raises class TestMatrixColumn: def setUp(self): self.data = [[1, 2,...
#LISTA DE PALABRAS RESERVADAS reservadas = { #Numeric Types 'smallint' : 'tSmallint', 'integer':'tInteger', 'bigint' : 'tBigint', 'decimal' : 'tDecimal', 'numeric' : 'tNumeric', 'real' : 'tReal', 'double' : 'tDouble', 'precision' : 'tPrecision', 'money' : 'tMoney', #Characte...
# coding=utf-8 # Copyright 2021 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...
import sys import os import base64 import torch import numpy as np import tensorflow as tf import crepe import scipy from scipy.io import wavfile import psola import io import nemo from nemo.collections.asr.models import EncDecCTCModel from nemo.collections.tts.models import TalkNetSpectModel from nemo.collections.tts....
from numpy import dtype from numpy.core.fromnumeric import shape import torch, sys, os, signal import networkx as nx, numpy as np from torch.nn.functional import embedding sys.path.insert(0, '../') from my_utils import utils, align_utils as autils from my_utils.alignment_features import * import my_utils.alignment_feat...
import copy from torch.utils.checkpoint import get_device_states, set_device_states # # Code borrowed from https://github.com/lucidrains/reformer-pytorch/blob/master/reformer_pytorch/reversible.py # # following example for saving and setting rng here https://pytorch.org/docs/stable/_modules/torch/utils/checkpoint.htm...
from suds.client import Client try: from . import BasicRequestHelper from .DebugPrinting import LogPlugin except: import BasicRequestHelper from DebugPrinting import LogPlugin from datetime import datetime from suds.plugin import MessagePlugin # for logging class ClientServiceCalls: """This cla...
# Copyright 2018 Autodesk, Inc. All rights reserved. # # Use of this software is subject to the terms of the Autodesk license agreement # provided at the time of installation or download, or which otherwise accompanies # this software in either electronic or hard copy form. # from __future__ import print_function imp...
import numpy as np from loginit import get_module_logger from sklearn.decomposition import PCA, KernelPCA from sklearn.model_selection import GridSearchCV, StratifiedShuffleSplit, StratifiedKFold from sklearn.model_selection import cross_validate from sklearn.kernel_ridge import KernelRidge from sklearn.metrics import...
# Copyright (C) 2019 The Raphielscape Company LLC. # # Licensed under the Raphielscape Public License, Version 1.c (the "License"); # you may not use this file except in compliance with the License. # # Recode by @mrismanaziz # @SharingUserbot """ Userbot module for keeping control who PM you. """ from sqlalchemy.exc ...
import sys, os, re import numpy as np import json import csv import matplotlib.pyplot as plt import pandas as pd class PARAMETERS_EXTRACTOR: """ This class is used to extract and analyze data from log files, which are generated by running management.py """ def __init__(self, dir, problem_set): ...
""" Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. SPDX-License-Identifier: Apache-2.0 OR MIT """ # Test case ID : C18981526 # Test Case Title : Verify when two objects with different materials collide, the re...
from __future__ import annotations import math import random import textwrap import pytest from dxtbx.model import Beam, Crystal, Goniometer from libtbx.test_utils import approx_equal from scitbx import matrix from scitbx.array_family import flex from dials.algorithms.refinement.parameterisation.scan_varying_beam_p...
# _METADATA_:Version: 11 # _METADATA_:Timestamp: 2021-03-12 01:41:55.898641+00:00 # _METADATA_:MD5: 86081db65f59e768b13b39f82fddc114 # _METADATA_:Publish: None # _METADATA_: from datetime import datetime, timedelta, timezone import random import sqlalchem...
# <NAME> import pandas as pd import numpy as np import matplotlib.pyplot as plt from pandastable import Table, TableModel from skimage import data, color from skimage.transform import rescale, resize, downscale_local_mean import tkinter as tk from tkinter import ttk from tkinter import filedialog import os ...
# nuScenes dev-kit. # Code written by <NAME>, 2019. import copy from typing import Callable, List, Optional import numpy as np from nuscenes.eval.common.data_classes import EvalBoxes from nuscenes.eval.common.utils import center_distance, scale_iou, yaw_diff, velocity_l2, attr_acc, cummean from nuscenes.eval.detectio...
"""Top down operator precedence parser. This is an implementation of <NAME>'s "Top Down Operator Precedence" parser. (http://dl.acm.org/citation.cfm?doid=512927.512931). These are some additional resources that help explain the general idea behind a Pratt parser: * http://effbot.org/zone/simple-top-down-parsing.htm ...
from typing import TYPE_CHECKING import numpy as np import pandas as pd from vivarium.framework.randomness import get_hash from vivarium_csu_sanofi_multiple_myeloma.constants import models from vivarium_csu_sanofi_multiple_myeloma.constants.metadata import SCENARIOS, HAZARD_RATE_SOURCES from vivarium_csu_sanofi_mult...
from __future__ import print_function, absolute_import, division # makes these scripts backward compatible with python 2.6 and 2.7 # Importing the Kratos Library import KratosMultiphysics import KratosMultiphysics.MappingApplication as KratosMapping # Importing the base class from co_simulation_base_io import CoSimu...
import numpy as nmp import sys from CodeEntropy.FunctionCollection import Utils, CustomFunctions from CodeEntropy.FunctionCollection import UnitsAndConversions as CONST class BeadCollection(object): """ A class that containes all the properties of the beads/particles that comprise it. Properties include values ...
# coding: utf-8 ################################################################### # Copyright (c) 2016-2020 European Synchrotron Radiation Facility # # # # Author: <NAME> # # ...
""" kbible.py - base bible object and commands """ import pandas as pd import yaml import os import subprocess __author__ = "<NAME> <<EMAIL>>" __docformat__ = "restructuredtext en" class KBible(object): """ Bible text object """ def __init__(self, version="개역한글판성경", debug=False, **kwargs): """ read ...
import json import pandas as pd import re, os, glob import numpy as np from collections import defaultdict import nltk import string from gensim.models import Phrases from gensim.utils import SaveLoad from gensim.models.phrases import Phraser from nltk.corpus import stopwords # Import the stop word list #from sklearn....
import requests import json import os import boto3 import shutil from urllib.parse import urlparse import logging logFormatter = logging.Formatter("%(asctime)s [%(threadName)-12.12s] [%(levelname)-5.5s] %(message)s") rootLogger = logging.getLogger() logging.basicConfig(level=logging.INFO) formatter = logging.Formatte...
import contextlib import signal import requests from io import BytesIO import json import time import sys from contextlib import contextmanager import os import shutil import tempfile from dataclasses import dataclass import inspect import functools import traceback from abc import ABC, abstractmethod from pathlib impo...
# Copyright (C) 2019 NTT DATA # 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 ...
from __future__ import absolute_import, print_function, division import os import sys THIS_DIR = os.path.dirname(os.path.abspath(__file__)) sys.path.insert(1, os.path.join(THIS_DIR, '../zhusuan/')) import tensorflow as tf from tensorflow.contrib import layers from six.moves import range import numpy as np import matpl...
import os import numpy as np import cv2 import tensorflow as tf from tensorflow.keras import layers from ..datasets.load_mnist import load_mnist from ..datasets.load_cifar10 import load_cifar10 from ..datasets.load_custom_data import load_custom_data_with_labels from ..losses.minmax_loss import gan_discriminator_loss, ...
# Copyright 1999-2020 Alibaba Group Holding Ltd. # # 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 a...
import datetime import os from typing import List, Union from io import BytesIO from enum import Enum from base64 import b64encode, b64decode from fastapi import Query, Response, APIRouter, Depends, File, UploadFile, Body, HTTPException, status, Path, Form from fastapi.responses import FileResponse from pydantic impor...
#!/usr/bin/env python from pprint import pprint import fileinput import sys,os from math import * import tempfile #******************************************************************************************** # Read Uniref Program * # ...
from functools import partial from pubsub import pub from threading import Lock from threading import Thread import wx from spacq.gui.tool.box import Dialog, OK_BACKGROUND_COLOR, MessageDialog from spacq.interface.units import Quantity, IncompatibleDimensions from spacq.interface.resources import AcquisitionThread ""...
# Copyright (c) 2020 PaddlePaddle 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 appli...
from AST import(Node,And,Or,Arrow,Not,Var,true,false, Forall, Exists, Pred) from Exceptions import ProofException #################################################################################### # This is a very small, and probably bad, proof checker for propositional logic # The proof rules are the same ones we h...
import inspect from functools import wraps from tempfile import mkstemp from multiprocessing import cpu_count import numpy as np import ray from ray.serve.constants import (DEFAULT_HTTP_HOST, DEFAULT_HTTP_PORT, SERVE_MASTER_NAME) from ray.serve.global_state import GlobalState, start_...
# Copyright (c) 2014 Intel Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
# Copyright (c) 2012, GlaxoSmithKline Research & Development Ltd. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # ...
#!/usr/bin/env python3 import os import json import sys import requests as requests import base64 import argparse from random import randint from time import sleep # ADD THE PREFIX FOR EACH FILE TYPE BASED ON FIELD NAME WITHIN the TGen LIMS fileTypes = { "picard_alignment_summary_metrics": { "prefix": "pi...
#!/usr/bin/env python # # Copyright 2017 Brocade Communications Systems, Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/...
#+= imports =+# try: import time import json import requests import webbrowser import os import sys import ctypes from pypresence import Presence from colorama import Fore, init os.system('cls' if os.name == 'nt' else 'clear') init(autoreset=True) # auto reset color after every print except Imp...
#!BPY # Copyright (c) 2020 SuperTuxKart author(s) # # 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...
# Copyright (c) Microsoft. All rights reserved. # Licensed under the MIT license. See LICENSE.md file in the project root # for full license information. # ============================================================================== import os import numpy as np import pytest from cntk.io import * import cntk.io.t...
""" plotting_tools: Convenience functions for plotting images and data ------------------------------------------------------------------------ Ver Date Who Comments ------- ---------- --- ------------------------------------------ 0.0.90 2015-08-10 JRM Initial prototype: complexPolarPlot 0.0.9...
import datetime import dash_bootstrap_components as dbc import icalendar import pandas as pd import plotly.express as px import plotly.graph_objects as go import recurring_ical_events import requests from dash import dcc from dash import html from dash.dependencies import Input, Output from app import app from app im...
#!/usr/bin/python3 import argparse import subprocess import os import json import glob import multiprocessing import tempfile import sklearn_json as skljson from sklearn.linear_model import LogisticRegression from itertools import repeat import pkg_resources import sys insdir = os.path.expanduser('~/POSMM/') os.syste...
# Copyright (c) 2012 Cloudera, Inc. All rights reserved. # # This test suite validates the scanners by running queries against ALL file formats and # their permutations (e.g. compression codec/compression type). This works by exhaustively # generating the table format test vectors for this specific test suite. This way...
import numpy as np import torch import torch.nn as nn import matplotlib matplotlib.use('agg') import matplotlib.pyplot as plt import active_spline.render_shape as rs import time def plt_img(img_array, name): plt.imshow(img_array) plt.savefig(name) plt.close def vis_image(pred_points, save_name): fig, ...
""" mcpython - a minecraft clone written in python licenced under the MIT-licence (https://github.com/mcpython4-coding/core) Contributors: uuk, xkcdjerry (inactive) Based on the game of fogleman (https://github.com/fogleman/Minecraft), licenced under the MIT-licence Original game "minecraft" by Mojang Studios (www.m...
"""Miscelaneous functions I wrote for conveince in using matplotlib (translated from rwkmplutil to be compatible with wxmpl and embedding in WX apps - should be compatible with all OO interface usages). This file should replace oomplutil. As I move away from pylab to OO usage, it should also replace rwkmplutil.""" fr...
from PIL import Image, ImageDraw, ImageFont from PyQt5.QtWidgets import * from PyQt5.QtCore import Qt import os, sys # A program that sets scales on many images at once. # Priority was to be as easy to use as possible for a specific microscope, so other cameras can require a bit of tweaking. # Constants ZOOM...
# -*- coding: utf-8 -*- # some cut and paste characters are not ASCII '''density estimation based on orthogonal polynomials Author: <NAME> Created: 2011-05017 License: BSD 2 versions work: based on Fourier, FPoly, and chebychev T, ChebyTPoly also hermite polynomials, HPoly, works other versions need normalization ...
""" Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. SPDX-License-Identifier: Apache-2.0 OR MIT Hydra script that is used to test the Directional Light component functionality inside the Editor. Opens the EmptyL...
#!/usr/bin/env python3 import os #import sys from pylib import * from multiprocessing.dummy import Pool as ThreadPool #from functools import partial import re import xml.etree.ElementTree as ET ##global variables isDataCentric = False isNuma = False isGeneric = False isHeap = False isAllocTimes = False isReuseDistan...
import pandas as pd import json import os import numpy import glob from zipfile import ZipFile from functools import partial from multiprocessing import Pool ### -------------------------------------Test and Help function ------------------------------------------------------- def test_me(): print("Hello World")...
import os import time from functools import wraps import json import shelve import sys import io import fileinput import string import urllib #required to open html documents #import urllib2 #required in python 2.7 import re #required to remove html tags vie regex import codecs #required to open html files import nltk ...
from __future__ import division __copyright__ = "Copyright (C) 2018 <NAME>" __license__ = """ 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...
import collections import copy import csv import math import os import shutil def rescale_samscore(u, nu, max_score, min_score): if min_score < 0: scaling_factor = 100.0 / max_score - min_score else: scaling_factor = 100.0 / max_score for read_index in u: if min_score < 0: ...
import torch import os import logging import timeit import itertools import numpy as np from tqdm import tqdm from typing import Optional from operator import itemgetter from torch import nn from torch.utils.data import SequentialSampler, DataLoader from torch.utils.data._utils.collate import default_collate from torc...
#!/usr/bin/env python import cv2 import numpy as np from time import sleep import pandas as pd import yaml from tkinter import * from tkinter import ttk import os import glob from configparser import ConfigParser from base import Annotation, AnnotationTool, Rectangle, Circle, EventHandler def flick(x): pass ...
#!/usr/bin/env python3 # Copyright (c) 2014-2020 The Bitcoin Core developers # Copyright (c) 2020 The DIVI developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Run regression test suite. This module calls down into indivi...