text
stringlengths
6.04k
39.5k
import torch import torch.nn as nn import torch.nn.functional as F from mmdet.core import (bbox_target, delta2bbox, force_fp32, multiclass_nms) from ..builder import build_loss from ..losses import accuracy from ..registry import HEADS from mmdet.models import builder from mmdet.core import bb...
import re import inflect import nltk from src.pre_process.common_nlp import lemmatizer, text_into_sentence from src.identify_relationship import binary_relationship_dic_list, ternary_relationship_list, \ unary_relationship_dic_list from src.utils.file_manipulation import get_root_of_input_xml one_to_one_relation...
import os.path import errno import math from nipype.interfaces.base import ( File, Directory, TraitedSpec, isdefined, traits, InputMultiPath) from nipype.interfaces.mrtrix3.reconst import ( MRTrix3Base, MRTrix3BaseInputSpec) from arcana.utils import split_extension # TODO: Write MRtrixBaseInputSpecMixin with ...
import argparse import boto3 import copy import csv import itertools import json import os import logging import shlex import random from tempfile import gettempdir from time import sleep from multiprocessing import Process from pprint import pprint import google.protobuf.text_format as text_format from numpy import i...
#!/usr/bin/env python _MODULE_NAME = "misc" _MODULE_VERSION = "v0.1.0" _REVISION_DATE = "2019-01-10" _AUTHORS = "<NAME> (<EMAIL>) and <NAME> (<EMAIL>)" _DESCRIPTION = "This is a module for miscellaneous, general purpose functions." import sys import os import struct import time import datetime import subprocess impor...
import os import sys import nbformat import pytest sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir))) import separate_print as sp @pytest.fixture def sample_cell() -> str: return ( 'print(\'\'\'3.2.5.2\'\'\')\n' 'f = sy.Function(\'f\')\n' 'print("f...
import os import re from contextlib import contextmanager from .config import Config, DataProxy from .exceptions import Failure, AuthFailure, ResponseNotAccepted from .runners import Result from .util import raise_from, iteritems from .watchers import FailingResponder class Context(DataProxy): """ Context-a...
# uncompyle6 version 3.2.4 # Python bytecode 2.7 (62211) # Decompiled from: Python 2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:30:26) [MSC v.1500 64 bit (AMD64)] # Embedded file name: lib.coginvasion.npc.DisneyCharGlobals from panda3d.core import Point3 from lib.coginvasion.globals import CIGlobals MICKEY = 0 MINNIE = ...
import logging import os import copy import json import torch from torch.utils.data import TensorDataset from .read_data import NerProcessor logger = logging.getLogger(__name__) class InputFeatures(object): """A single set of features of data.""" def __init__(self, input_ids, input_mask, input_len,segment_i...
# -*- coding: utf-8 -*- import math import random import torch import torch.nn as nn import torch.optim as optim from torch.autograd import Variable import numpy as np import logging from argParser import args from utils.nlp import mask_tokens if args.task == "detection": import os import sys from torch....
import sys from math import pi import larch from larch import Group, ValidateLarchPlugin from larch_plugins.xray import (R_ELECTRON_CM, AVOGADRO, PLANCK_HC, xrayDB, chemparse) MODNAME = '_xray' MODDOC = ''' Functions for accessing and using data from X-ray Databases and Tables. Many ...
"""adodbapi.remote - A python DB API 2.0 (PEP 249) interface to Microsoft ADO Copyright (C) 2002 <NAME>, version 2.1 by <NAME> * http://sourceforge.net/projects/pywin32 * http://sourceforge.net/projects/adodbapi This library is free software; you can redistribute it and/or modify it under the terms of the GNU...
""" These are the utilities used for text processing, batching and tokenisation. """ import os import sys import re import csv import copy import numpy as np import torch from torch.utils.data import Dataset, DataLoader csv.field_size_limit(sys.maxsize) class WGDataset(Dataset): """ This class processes ...
# StockClassification module for automatic stock selection # For supervised learning __author__ = '<NAME> <EMAIL>' import sys, os, re, subprocess, importlib required_modules={#'google.colab':'google.colab', 'yahooquery':'yahooquery', #'numba':'numba', #'o...
import base64 import config from datetime import datetime, timedelta import sys import os from flask import request, Blueprint import flask_restful import logging import re import subprocess from time import time import json import traceback import types from indigo import Indigo from indigo.renderer import IndigoRend...
# -*- coding: utf-8 -*- """ chemreac.core ============= In ``chemreac.core`` you will find :py:class:`ReactionDiffusion` which is the class describing the system of ODEs. """ from __future__ import (absolute_import, division, print_function) from collections import defaultdict, OrderedDict from functools import reduc...
"""tests/test_output_format.py Tests that the hug routing functionality works as expected Copyright (C) 2016 <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...
from __future__ import print_function import sys import json import os from os.path import join as pjoin, exists as pexists from importlib import import_module import random import numpy as np import torch import wandb import time import glob from utils.options import parse_args from utils.log_utils import save_args fr...
from collections import defaultdict from optuna.logging import get_logger from optuna.structs import StudyDirection from optuna.structs import TrialState from optuna.study import Study # NOQA from optuna import type_checking logger = get_logger(__name__) if type_checking.TYPE_CHECKING: from plotly.graph_objs im...
"""This script defines the parametric 3d face model for Deep3DFaceRecon_pytorch """ import numpy as np, torch, torch.nn.functional as F, os from scipy.io import loadmat from util.load_mats import transferBFM09 # add for visualization () from utils_mesh import MeshOperator import open3d as op3d def perspective_project...
#@title Defining a time-dependent score-based model (double click to expand or collapse) import torch import torch.nn as nn import torch.nn.functional as F import numpy as np import functools from losses import loss_fn, loss_fn_MY from utils import * from torch.utils.data import DataLoader import torchvision.transfor...
import numpy as np import sys import operator import math from numba import jit from collections import defaultdict def MakeHMMfile(state_names, starting_probabilities, transitions, emissions, outprefix): with open(outprefix + '.hmm','w') as out: out.write('# State names (only used for decoding)\n') ...
import os import re import random import sys import io import pickle import math from shared_ddr_processing import * import multiprocessing from multiprocessing import Pool #Note: Requires both ddr_finder and ddr_to_generic to be run first #will dynamically construct both the MND's data and the output to compare again...
''' credit: <NAME>., <NAME>., & <NAME>. (2018). Large scale gan training for high fidelity natural image synthesis. arXiv preprint arXiv:1809.11096. github: https://github.com/ajbrock/BigGAN-PyTorch paras: ch=96, AC-clsss=1000: 256*256: netD:99,226,890, netG:82,108,548, 128*128: netD:87,983,370, n...
""" https://jedisct1.github.io/minisign """ from __future__ import annotations import base64 import enum import hashlib import os import secrets import time from dataclasses import dataclass from pathlib import Path from typing import ( BinaryIO, Optional, Union, ) from cryptography.exceptions import Inv...
from datetime import datetime, timedelta, date from cPickle import load, dump import numpy as np import os from numpy import nanmean import sys import glob """ Description: ------------ This library parses the geophysical indices from the yearly files located in ./kpap/ and ./dst/ . The files are obtained by running...
#! /usr/bin/env python # -*- coding: utf-8 -*- # Pocket PiAP # ...................................................................... # Copyright (c) 2017-2020, <NAME> # ...................................................................... # Licensed under MIT (the "License"); # you may not use this file except in co...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Set of functions that can be useful <NAME> MeteoSwiss/EPFL <EMAIL> December 2019 """ # Global imports import datetime import io import os from collections import OrderedDict import numpy as np from scipy.stats import energy_distance from dateutil import parser import...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import math from typing import Callable, Optional import torch from fairseq import utils from fairseq.modules import LayerNorm, PositionalEmbedding, LayerDropModuleList from fairseq.modules.fairseq_dropout import FairseqDrop...
import torch from saliency.saliency import Saliency import numpy as np from scipy.ndimage import label import torchvision from torch.autograd import Variable from torch.autograd import Variable import torch.nn as nn import torch.nn.functional as F import torchvision import torchvision.transforms as transforms import to...
"""Database schema functions and information for Toron node files. Toron nodes are stored as individual files. The file format is managed, internally, as a relational database. The schema for this database is shown below as a simplified ERD (entity relationship diagram). SQL foreign key relationships are represented w...
from tkinter import* import random import time root = Tk() root.geometry("1600x700+0+0") root.title("Restaurant Management System") Tops = Frame(root,bg="white",width = 1600,height=50,relief=SUNKEN) Tops.pack(side=TOP) f1 = Frame(root,width = 900,height=700,relief=SUNKEN) f1.pack(side=LEFT) f2 = Frame(root ,width =...
import os import torch import torch.nn as nn import numpy as np from contextlib import contextmanager from functools import partial from torch.optim import Adam, SGD from spirl.utils.general_utils import ParamDict, get_clipped_optimizer, AttrDict, prefix_dict, map_dict, \ nan_ho...
# pylint: disable=unused-argument,too-many-nested-blocks """Create label data from OSM QA tiles for specified classes""" import sys from os import makedirs, path as op from subprocess import run, Popen, PIPE import json from functools import partial import numpy as np import mapbox_vector_tile import pyproj from shap...
# coding: utf-8 # In[1]: from IPython.core.display import HTML HTML( open('my_css.css').read() ) # https://anaconda.org/bfiedler/data/1/download/my_css.css # v1.31, 14 September 2018, by <NAME> # # *alternatives to basemap and netcdf4 are now included* # # # netCDF data of Sea Surface Temperature # # Here we w...
""" DANK Assisted Netlisting Kit by <NAME> <EMAIL> """ import os from waflib.Task import Task from waflib.Configure import conf from waflib.Scripting import autoconfigure from waflib.TaskGen import extension, feature, before_method, after_method, taskgen_method from waflib import Utils, Context, Errors, Logs NETLIST...
import os import subprocess import json import datetime from decimal import Decimal from django.db import transaction from oscar.apps.address.models import Country from ledger.accounts.models import EmailUser, Address from mooringlicensing.components.proposals.models import ( Proposal, Vessel, Owner, Ve...
""" This module contains functions related to orbit calculations """ # Standard library imports from typing import Any,Dict,List,Tuple,Sequence #https://mypy.readthedocs.io/en/stable/cheat_sheet_py3.html from math import isclose # Third party imports import numpy as np from numpy import sqrt, cos, sin, cosh, sinh, t...
from __future__ import print_function import os import os.path as op from nose.tools import assert_true, assert_raises from nose.plugins.skip import SkipTest import numpy as np from numpy.testing import assert_array_equal, assert_allclose, assert_equal import warnings from mne.datasets import sample from mne import (...
#!/usr/bin/env python # # See top-level LICENSE file for Copyright information # # -*- coding: utf-8 -*- """ This script runs PypeIt on a pair of NIRES images (A-B) """ import os import argparse import numpy as np import copy from astropy.io import fits from pypeit import pypeit from pypeit import par, msgs from pyp...
# Copyright (c) Microsoft. All rights reserved. # Licensed under the MIT license. See LICENSE.md file in the project root # for full license information. # ============================================================================== from __future__ import division, print_function import numpy as np import cntk as C...
import easytree import pandas as pd import numpy as np import datetime import simplejson import re import easychart.encoders as encoders import easychart.internals as internals class SeriesCollection(easytree.Tree): """ Series collection """ def append(self, data=None, **kwargs): if "legend" ...
import os.path import re import importlib import sys import inspect import traceback import time import tempfile import argparse import subprocess from unittest import mock from glob2 import glob from junit_xml import TestSuite, TestCase from flowp import files # for traceback passing in test results TESTING_FRAME = T...
import OpenGL import numpy as np from OpenGL.GL import * class Tessellator: def __init__(self,bufsize=5000): self.bufferSize = bufsize self.drawMode = 0 self.hasNormal = True self.hasColor = True self.hasTexture = True self.isDrawing = False self.reset() def startDrawingQuads(self): self.startDraw...
import datetime import calendar from luna.common.exceptions import InputException, ConsistencyException from luna.datatypes.auxiliary import SlotSpan try: from dateutil.tz import tzoffset except ImportError: tzoffset = None import pytz #-------------------------- # Logger #-------------------------- impor...
# -*- coding: utf-8 -*- """Utility functions for manipulating data """ # Author: <NAME> <<EMAIL>> # Author: <NAME> <<EMAIL>> # License: BSD 2 clause from __future__ import division from __future__ import print_function from warnings import warn import numpy as np from sklearn.datasets import make_blobs from sklearn....
from esper.stdlib import * from esper.prelude import * from esper.spark import * from esper.validation import * import pyspark.sql.functions as func from pyspark.sql.types import BooleanType, IntegerType, StringType, DoubleType from collections import defaultdict, Counter import datetime import calendar spark = Spark...
""" NFCTSocket -- low level connection tracking API See also: pyroute2.conntrack """ import socket from pyroute2.netlink import NLMSG_ERROR from pyroute2.netlink import NLM_F_REQUEST from pyroute2.netlink import NLM_F_DUMP from pyroute2.netlink import NLM_F_ACK from pyroute2.netlink import NLM_F_EXCL from pyroute2.ne...
# -*- coding: utf-8 -*- from __future__ import (absolute_import, print_function, unicode_literals) from builtins import input from future.standard_library import install_aliases install_aliases() from collections import OrderedDict import base64 import datetime from hashlib import sha1, sha256 import hmac import simp...
#!/usr/bin/python3 # -*- coding: utf-8 -*- import os import re import time import shutil import subprocess from threading import Thread from datetime import datetime from api import douyu_opencdn from utils.common import makesure_dir from utils.common import kill_pid from utils.common import list_only_dir from utils....
import numpy as np import matplotlib.pyplot as plt from scipy.interpolate import UnivariateSpline, interp1d from scipy.integrate import quad import collections from imripy import halo from imripy import merger_system as ms from imripy import inspiral from imripy import waveform inspiral.Classic.ln_Lambda=3. def Meff...
from django.shortcuts import render from django.http import HttpResponse, HttpResponseRedirect, JsonResponse from django.shortcuts import get_object_or_404 from django.urls import reverse, reverse_lazy from django.views import generic from django.views.generic.edit import CreateView, UpdateView from django.contrib.aut...
from flatland import Flatland from operator import itemgetter from copy import copy import random import math class Direction(): """Represents North, East, South and West in tuples for coordinates""" N = (0, -1) NN = (0, -2) NNN = (0, -3) E = (1, 0) EE = (2, 0) EEE = (3, 0) S = (0, 1) ...
from myPEG import * class Form: def __str__(self): return self.repr() def __repr__(self): return str(self) def __eq__(self, other): return hash(self)==hash(other) def __hash__(self): return self.prefixstr().__hash__()#self.__repr__().__hash__() def prefixstr(se...
# # Copyright 2014 eNovance # # Authors: <NAME> <<EMAIL>> # # 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...
# 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, ...
from math import ceil from random import shuffle from datetime import datetime, time, timedelta from django.db import models from django.template.loader import render_to_string from django.utils.translation import ugettext as _ from django.conf import settings from wouso.core.game.models import Game from wouso.core.qpo...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from datetime import datetime import tensorflow as tf import numpy as np from PIL import Image from sklearn.metrics import confusion_matrix from sklearn.metrics import average_precision_score from sklearn.metri...
import numpy as np import pdb from .base import StructuredModel from struntho.inference.maxmin_spmp_sequence import maxmin_spmp_sequence_p, maxmin_spmp_sequence_p2 from struntho.inference.sum_product_chain import sum_product_p from struntho.inference._maxmin_spmp_sequence import maxmin_spmp_sequence_c, maxmin_spmp_se...
import abc try: import anndata except ImportError: anndata = None import batchglm.api as glm import dask import logging import numpy as np import pandas as pd import scipy import scipy.sparse import sparse from typing import Union from .det import _DifferentialExpressionTestSingle, DifferentialExpressionTestWa...
''' Orbit discipline for CADRE ''' from math import sqrt import numpy as np from openmdao.lib.datatypes.api import Float, Array from openmdao.main.api import Component import rk4 # Allow non-standard variable names for scientific calc # pylint: disable-msg=C0103 # Constants mu = 398600.44 Re = 6378.137 J2 = 1.082...
print(f'Loading {__file__}...') import epics import os import collections import numpy as np import time as ttime import matplotlib.pyplot as plt import bluesky.plans as bp from bluesky.plans import outer_product_scan, scan from bluesky.callbacks import LiveGrid from bluesky.callbacks.fitting import PeakStats from b...
import sys sys.path.append('../') from pathlib import Path import time import numpy as np import scipy.optimize import pickle import matplotlib.pyplot as plt from py_diff_pd.common.common import ndarray, create_folder from py_diff_pd.common.common import print_info, print_ok, print_error, print_warning from py_diff_p...
import os import urllib.request import tarfile import numpy as np import torch import torch.nn import torch.nn.functional import pytorch_lightning as pl from pytorch_lightning import loggers as pl_loggers from typing import Sequence, Tuple, Union, Optional from torch.utils.data import DataLoader import networks impor...
from django.shortcuts import render,HttpResponse,redirect import boto3 from boto3.dynamodb.conditions import Key, Attr import random # Create your views here. def explore(request): uid=request.session['uid'] dynamoDB=boto3.resource('dynamodb') dynamoTable=dynamoDB.Table('recipe') names=[] imglinks=...
# -*- mode:python; coding:utf-8 -*- # Copyright (c) 2020 IBM Corp. 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 # #...
"""Utilities for creating XDMF metadata from results stored in HDF5. XDMF utilities are separate from the core xdmf to reduce core dependencies. See: - core.xdmf license: HDF5Application/license.txt """ import xml.etree.ElementTree as ET import os import warnings from itertools import chain from contextlib import ...
# Standard libraray imports from __future__ import print_function from collections import deque import json import multiprocessing import os import shlex import shutil import subprocess import sys import time # External module imports. import psutil def _make_command_list(command): if not isinstance(command, (l...
import datetime import subprocess import uuid from functions.misc_functions import get_mod_date, get_filepath_of_potential_symlink from setup_django import setup_django setup_django() import luigi import glob import os import shutil from xchem_db.models import * from .config_classes import SoakDBConfig, Directories...
#!/usr/bin/env python # coding: utf-8 ''' MEDICAL SURVEYS RESPONSE PREDICTOR --- Goal: Given a directory of TIFF Scans of Survey Responses, prepare a CSV file with predicted responses. The predictor is trained for two surveys: UROLOGY ONCOLOGY BENIGN (UOB) AND UROLOGY PROSTATE SYMPTOM (UPS) --- Format of CSV File Colu...
from constants import ALL_MOVES from constants import CENTERS, EDGES, CORNERS from constants import D, CW, ACW from constants import NEIGHBORS, OPPOSITE from random import choice class RubikUtilities: @staticmethod def shuffle(rubik, steps): for _ in range(steps): direction, face = RubikUt...
import argparse import cv2 import numpy as np import torch from torch.autograd import Function from torchvision import models import os from pathlib import Path import sys ## importing our U-Net pytorch model sys.path.append(str(Path("/isi/w/lb27/repos/phase_segmentation_pytorch"))) import Unet_model_multiclass_mini_a...
r"""@package motsfinder.utils General utilities for simplifying certain tasks in Python. """ from __future__ import print_function import functools import importlib.util from builtins import range, map from tempfile import NamedTemporaryFile from glob import glob import os import os.path as op import re import subpr...
import pygame from pygame.locals import * pygame.init() import numpy as np import sys import time from math import sqrt, pi, sin, cos, radians from random import randint, random from itertools import combinations import os class Wall(pygame.sprite.Sprite): def __init__(self, topleft, bottomright, colour): ...
from __future__ import division from __future__ import print_function from builtins import range from past.utils import old_div import numpy as np import math import tqdm from tqdm import trange USE_BETTER_RESOLUTION = True PRINT_DETAILS = True RANDOM_NOISE = 0 # this will override density with random noise # number...
"""Using transfer learning to predict one or more labels in a single domain. """ from .base import BaseBayesianTransfer import numpy as np from scipy import stats from sklearn.exceptions import NotFittedError from abc import abstractmethod from functools import reduce from operator import add class BaseSingleDom...
import numpy as np import pandas as pd import os import platform import datetime import re CHAR={ 'menu' : u'\u2630', 'tridot' : u'\u26EC', 'apply' : u'\u1809', 'compute' : u'\u2699', 'close' : u'\u274C', 'add' : u'\u2795', 'add_small': u'\ufe62', 'clear' : u'-', 'sun' : u'\u2600', 'suncloud'...
"""Operations for dannce.""" import numpy as np import cv2 import time from typing import Text import torch import torch.nn.functional as F class Camera: def __init__(self, R, t, K, tdist, rdist, name=""): self.R = np.array(R).copy() assert self.R.shape == (3, 3) self.t = np.array(t).copy(...
from multiprocessing import Pool from multiprocessing.dummy import Pool as ThreadPool from lib.collection_utils import * from lib.math_utils import * from lib.processing_utils import * from lib.audio_utils import getDurationFromAudioFile def isClipVisible(clip, width, height): isInFrame = clip["x"]+clip["width"] ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # images/palette.py # Copyright 2009-2010 <NAME> (aka DiegoHH) <diegohh90 [at] hotmail [dot] com> # lazynds 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; eith...
import os import pandas as pd import numpy as np import json import io import requests import sys import pickle import itertools import base64 from io import BytesIO from collections import defaultdict from datetime import datetime from urllib.parse import urlparse, unquote # Tesseract import pytesseract from PIL imp...
# Copyright 2021 DeepMind Technologies Limited. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
import signal, time, random, itertools, copy, math, sys import pickle as pkl # numpy imports import numpy as np # torch imports import torch import torch.autograd as ta import torch.nn.functional as F import torch.nn as nn # code imports from nn_classes import * #### # Pointer network #### class MatcherNetwork(nn.Mod...
#!/usr/bin/env python # flake8: noqa # type: ignore import asyncio import time import click import numpy import pandas as pd from kaiju import utils from kaiju.robotGrid import RobotGridCalib from sdsstools.daemonizer import cli_coro # hardcoded defaults MET_LED = 6 # leds 1 and 2 AP_LED = 16 # led 3 BOSS_LED = ...
#=============================================AI================================================== # Expectimax Maximization & Evaluation Functions # AI Concepts from https://www.youtube.com/watch?v=l-hh51ncgDI # ML concepts from https://www.youtube.com/watch?v=bVQUSndDllU&list=PLFt_AvWsXl0frsCrmv4fKfZ2OQIwoUuYO&index=...
# -*- coding: utf-8 -*- # # Copyright (c) 2013--2014, <NAME> # 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 notice, this # l...
import tkinter as tk # módulo tkinter para criar a GUI from tkinter import ttk # importa o ttk dentro do tkinter from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg # módulo para plotar os gráficos from Desembolso_Mensal import Desembolso # arquivo onde faz as buscas na base de dados # Criando a j...
import os, sys #os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID" os.environ["CUDA_VISIBLE_DEVICES"]="1" import numpy as np import pandas as pd import matplotlib.pyplot as plt import skimage.io from skimage.transform import resize from imgaug import augmenters as iaa from tqdm import tqdm import PIL from PIL import Image...
# -*- coding: utf-8 -*- # Imports #================================================== import json, keras, gensim, codecs import tensorflow as tf import numpy as np import keras.preprocessing.text as kpt from keras.callbacks import Callback from keras.layers import Dropout, Input, Dense, Embedding, LSTM, Bidirectional ...
# -*- coding: utf-8 -*- ######### start of header ###################################### # Program Name: puts.py # Author: <NAME> (lsleeper) # Description: PUTS (Python Utility Testing system) # Python shared module containing common routines for utility testing # Category: Shared Mo...
# -*- coding: utf-8 -*- # Copyright (c) 2016-2018 by University of Kassel and Fraunhofer Institute for Energy Economics # and Energy System Technology (IEE), Kassel. All rights reserved. import pytest import os from functools import partial import pandapower as pp from pandapower.test.consistency_checks impo...
# # Syntax and grammar specifications of a subset of C language # import sys import ast, tool.ply.lex, tool.ply.yacc from orio.main.util.globals import * # ------------------------------------------------ # reserved words reserved = ["IF", "ELSE", "FOR"] tokens = reserved + [ # literals (identifier, integer con...
from django.shortcuts import render, redirect import datetime from django.http import HttpResponse from django.conf import settings from django.views.generic.base import TemplateView from users.utils import validarCedula, validateAge from users.models import Profile from game.models import Game, Reward, Stock, Conteo...
# MIT License # # Copyright (c) 2018-2019 <NAME> / Retrieva, Inc. # # 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, co...
import os import sys import itertools import threading from concurrent.futures import ThreadPoolExecutor from src.python.preprocess2 import * from blast import * from tempfile import gettempdir tmp_dir = gettempdir() out_dir = "./Data" from scipy.stats import * import pickle NUM_CPU = 8 eps = 10e-6 E = Threa...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compli...
# https://stackoverflow.com/questions/34276663/tkinter-gui-layout-using-frames-and-grid import time import traceback import multiprocessing as mp from multiprocessing.managers import BaseManager import threading import logging import numpy as np import tkinter as tk from PIL import Image, ImageTk from c...
# -*- coding: utf-8 -*- # Tested on Markdown 2.3.1 # # Copyright (c) 2014, <NAME> # Copyright (c) 2014, <NAME> # The MIT License (MIT) # # 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 witho...
''' Created on Aug 13, 2020 @author: <NAME> ''' import os import torch import torch.optim as optim import torch.nn as nn import torch.cuda as cuda import functools import argparse from torch.utils.data import DataLoader from torch.autograd import Variable from torchvision.utils import save_image imp...
# Copyright (c) 2021 AccelByte Inc. All Rights Reserved. # This is licensed software from AccelByte Inc, for limitations # and restrictions contact your company contract manager. # # Code generated. DO NOT EDIT! # template file: justice_py_sdk_codegen/__main__.py # pylint: disable=duplicate-code # pylint: disable=li...