text
stringlengths
3.07k
22.1k
# -*- coding: utf-8 -*- """ Created on Sun Feb 7 13:43:01 2016 @author: fergal A series of metrics to quantify the noise in a lightcurve: Includes: x sgCdpp x Marshall's noise estimate o An FT based estimate of 6 hour artifact strength. o A per thruster firing estimate of 6 hour artifact strength. $Id$ $URL$ """ ...
#!/usr/bin/env python import base64, json, pika from xml.etree.ElementTree import Element, tostring, fromstring # RabbitMQ Connection Information RABBIT_HOST = 'vcd-cell1.lab.orange.sk' RABBIT_HOST = 'oblak.orange.sk' RABBIT_PORT = '5672' RABBIT_USER = 'vcdext' RABBIT_PASSWORD = '<PASSWORD>.' # Exchange and Queue we ...
import warnings import numpy as np import scipy.sparse as sp from joblib import Parallel, delayed from scipy.special import expit from sklearn.exceptions import ConvergenceWarning from sklearn.utils import check_array, check_random_state from sklearn.linear_model import LogisticRegression from tqdm import tqdm from ...
# -*- coding: utf-8 -*- ## \package dbr.log # MIT licensing # See: docs/LICENSE.txt import os, sys from fileio.fileio import AppendFile from globals.dateinfo import GetDate from globals.dateinfo import GetTime from globals.dateinfo import dtfmt from globals.paths import PATH_logs from globals.strings import GetM...
from tkinter import * from tkinter import messagebox import sys import os import signal import time from subprocess import * from tkinter.scrolledtext import ScrolledText import sqlite3 def file_previous_close(): try: with open('home_id.txt', 'r') as f: lines = f.read().splitlines() ...
import datetime from django.conf import settings from django.contrib.auth import get_user_model from django.core.cache import cache from django.db import transaction, IntegrityError from django.db.models import Q from django.utils.translation import gettext as _ from django.utils.translation import ngettext from rest_...
# -*- coding: utf-8 -*- """Electrical billing for small consumers in Spain using PVPC. Bill dataclasses.""" from datetime import datetime from typing import Iterator, List import attr import pandas as pd from pvpcbill.base import Base from pvpcbill.official import ( MARGEN_COMERC_EUR_KW_YEAR_MCF, round_money,...
import logging, tqdm import numpy as np import rawpy import colour_demosaicing as cd import HDRutils.io as io from HDRutils.utils import * logger = logging.getLogger(__name__) def merge(files, do_align=False, demosaic_first=True, normalize=False, color_space='sRGB', wb=None, saturation_percent=0.98, black_leve...
# Author: <NAME> (<EMAIL>) 08/25/2016 """SqueezeDet Demo. In image detection mode, for a given image, detect objects and draw bounding boxes around them. In video detection mode, perform real-time detection on the video stream. """ from __future__ import absolute_import from __future__ import division from __future_...
#!/usr/bin/python from __future__ import absolute_import, division, print_function import sys import os import codecs import io import re ESCAPE_SEQUENCE_RE = re.compile(r''' ( \\x.. # 2-digit hex escapes | \\[\\'"abfnrtv] # Single-character escapes )''', re.UNICODE | re.VERBOS...
import os import numpy as np import numpy.random as rnd import matplotlib.pyplot as plt import logging from pandas import DataFrame from common.gen_samples import * from common.data_plotter import * from aad.aad_globals import * from aad.aad_support import * from aad.forest_description import * from aad.anomaly_data...
import math import torch import numpy as np from collections import OrderedDict, defaultdict from transformers import BertTokenizer sentiment2id = {'negative': 3, 'neutral': 4, 'positive': 5} label = ['N', 'B-A', 'I-A', 'A', 'B-O', 'I-O', 'O', 'negative', 'neutral', 'positive'] # label2id = {'N': 0, 'B-A': 1, 'I-A':...
# -*- coding: utf-8 -*- # Copyright (C) <NAME> <<EMAIL>> # # 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,...
# encoding: utf-8 # Copyright 2011 Tree.io Limited # This file is part of Treeio. # License www.tree.io/license """ Project management models """ from django.db import models from django.core.urlresolvers import reverse from django.utils.translation import ugettext as _ from treeio.core.models import Object, User from...
from Bio.Data.IUPACData import protein_letters_3to1_extended import os import pandas as pd import re import sys # Note: the 'logging' module does not work with unit tests for some reason, replaced to 'print' for now # logging.basicConfig(level=logging.DEBUG) COL__INFO = 'INFO' def eprint(*a): """Print message ...
from decimal import Decimal import json import logging from django.shortcuts import render from django.core.serializers.json import DjangoJSONEncoder from django.http import (HttpResponse) from django.views.generic import View from rest_framework import status from rest_framework.views import APIView from api.models i...
#!/usr/bin/python2.6 # Copyright 2011 Google 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/licenses/LICENSE-2.0 # # Unless required ...
import argparse import os import sys import torch from torch import nn, optim from torch.optim import optimizer from torchvision import datasets, models, transforms parser = argparse.ArgumentParser(description="Trains a neural network") parser.add_argument('data_dir', metavar='dir', type=str, help...
# -*- coding: utf-8 -*- """ :author: T8840 :tag: Thinking is a good thing! 纸上得来终觉浅,绝知此事要躬行! :description: 1.部署相关信息来自于nacos配置 { "server_info": { "host": "10.201.5.161", "port":22, "user" : "user", ...
# -*- coding: utf-8 -*- """ Functions for plotting reliability diagrams: smooths of simulated vs observed outcomes on the y-axis against predicted probabilities on the x-axis. """ from __future__ import absolute_import import matplotlib.pyplot as plt import numpy as np import seaborn as sbn from .plot_utils import _l...
from collections import OrderedDict import torch import torch.nn as nn import torch.nn.functional as F import logging from libs.modules.FuseBlock import MakeFB from .resnet_dilation import resnet50, resnet101, Bottleneck, conv1x1 BN_MOMENTUM = 0.1 logger = logging.getLogger(__name__) def conv3x3(in_planes, out_plan...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
import os import tempfile import pytest import numpy as np try: import h5py except ImportError: h5py = None from msl.io import read, HDF5Writer, JSONWriter from msl.io.readers import HDF5Reader from helper import read_sample, roots_equal @pytest.mark.skipif(h5py is None, reason='h5py not installed') def te...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Dec 27 14:39:08 2020 @author: ravi """ import scipy.io as scio import scipy.io.wavfile as scwav import numpy as np import joblib import pyworld as pw import os import warnings warnings.filterwarnings('ignore') from tqdm import tqdm from concurrent.fut...
import numpy as np from typing import List, Tuple class InterfaceSolver(): """ Informal interface for solving class needed to interact with rubiks environment. """ def __init__(self, depth:int, possible_moves: List[str]) -> None: """ Will be passed depth, i.e. number of backwa...
""" **Project Name:** MakeHuman **Product Home Page:** http://www.makehuman.org/ **Code Home Page:** http://code.google.com/p/makehuman/ **Authors:** <NAME> **Copyright(c):** MakeHuman Team 2001-2009 **Licensing:** GPL3 (see also http://sites.google.com/site/makehumandocs...
from abc import ABC, abstractmethod import collections import statistics import numpy as np import sklearn.metrics import torch class Evaluator(ABC): """Class to evaluate model outputs and report the result. """ def __init__(self): self.reset() @abstractmethod def add_predictions(self, p...
from __future__ import annotations import json import os import shutil import subprocess import tempfile import uuid from abc import ABC, abstractmethod from typing import Any, Union from urllib.error import HTTPError from urllib.request import urlopen, urlretrieve import warnings import meerkat as mk import pandas a...
#!/usr/bin/env python3.6 """Sherlock: Find Usernames Across Social Networks Module This module contains the main logic to search for usernames at social networks. """ import requests import csv import json import os import re from argparse import ArgumentParser, RawDescriptionHelpFormatter import platform module_nam...
from math import ceil from objects import * global VERBOSE_OUT VERBOSE_OUT = False # Converts a series of bytes from a list into a String by interpreting them as ASCII values def asciiBytesToString(headerBytes, byteStart, byteEnd): string = "" for i in range(byteStart, byteEnd): string += chr(header...
import numpy as np import matplotlib as plt from collections import Counter from math import log import sys import time class ListQueue: def __init__(self, capacity): self.__capacity = capacity self.__data = [None] * self.__capacity self.__size = 0 self.__front = 0 ...
import numpy as np from keras import layers from keras import Model from keras import backend from ConfigSpace import ConfigurationSpace from ConfigSpace import UniformIntegerHyperparameter, CategoricalHyperparameter from alphaml.engine.components.models.base_dl_model import BaseImageClassificationModel from alphaml.u...
import frappe from frappe.utils import today, getdate, cint, now, add_days, parse_val,add_to_date,nowdate from frappe.utils.safe_exec import get_safe_globals def create_task_for_event(doc, method): try: if (frappe.flags.in_import and frappe.flags.mute_emails) or frappe.flags.in_patch or frappe.flags.in_inst...
# -*- coding: utf-8 -*- from tflearn.data_utils import * from os.path import join import numpy as np from skimage import io, transform from keras.models import load_model from skimage.color import rgb2lab, lab2rgb import time from functools import wraps import warnings from tensorflow.python.ops.image_ops import rgb_to...
# -*- coding: utf-8 -*- """ Created on Sun Jun 5 15:54:03 2016 @author: waffleboy """ from flask import Flask, render_template import requests import ast from datetime import datetime from datetime import timedelta import pandas as pd import pickle,json from pandas_highcharts.core import serialize from collections im...
""" Methods to search an ImageCollection with brute force, exhaustive search. """ import cgi import abc import cPickle import numpy as np from sklearn.decomposition import PCA from sklearn.metrics.pairwise import \ manhattan_distances, euclidean_distances, additive_chi2_kernel import pyflann from scipy.spatial imp...
from solid import * from math import * from functools import reduce from random import randint import operator # 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 w...
#!/usr/bin/env python3 # # SPDX-License-Identifier: MIT # # This file is formatted with Python Black """ A Parser helper function to convert a byte array to a Python object and the other way around. The conversion is specified in a list of :class:`Spec` instances, for example: >>> data = bytes(range(16)) >>> ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys from os.path import join, dirname sys.path.insert(0, join(dirname(__file__), '../../')) import os import random import argparse from datetime import datetime import matplotlib.pyplot as plt plt.rcParams.update({'figure.max_open_warning': 0}) import torch impor...
#!env python import collections import queue import logging import enum import functools import json import time import os import gzip import shutil import random # ONLY USED FOR RANDOM DELAY AT BEGINNING. import numpy as np import argparse import sys sys.path.append("../src-testbed") import events import common imp...
import collections from contextlib import contextmanager import json import os import pytest import consul.base CB = consul.base.CB Response = consul.base.Response Request = collections.namedtuple( 'Request', ['method', 'path', 'params', 'data']) class HTTPClient(object): def __init__(self, base_uri, ver...
# coding=utf-8 import os import re from collections import OrderedDict from xml.dom import minidom from xml.etree import ElementTree from xml.etree.ElementTree import Element, SubElement from letterparser import build, parse, utils, zip_lib # max level of recursion adding content blocks supported MAX_LEVEL = 5 def...
import pandas as pd import matplotlib.pyplot as plt from src.utils.function_libraries import * from src.utils.data_utils import * from src.utils.identification.PI_Identifier import PI_Identifier from src.utils.solution_processing import * from differentiation.spectral_derivative import compute_spectral_derivative from ...
#!/usr/bin/python3 import requests import json import searchguard.settings as settings from searchguard.exceptions import RoleMappingException, CheckRoleMappingExistsException, ViewRoleMappingException, \ DeleteRoleMappingException, CreateRoleMappingException, ModifyRoleMappingException, CheckRoleExistsException, ...
import os, sys from pathlib import Path import numpy as np import pandas as pd import matplotlib.pyplot as plt import matplotlib.patches as patches try: from data_handle.mid_object import * except: sys.path.append(os.path.join(os.path.dirname(__file__), '..')) from data_handle.mid_object import * ''' Th...
from utils.stats_trajectories import trajectory_arclength import statistics as stats import numpy as np import logging # Returns a matrix of trajectories: # the entry (i,j) has the paths that go from the goal i to the goal j def separate_trajectories_between_goals(trajectories, goals_areas): goals_n = len(goals_are...
from __future__ import absolute_import import logging import os import json from dxlbootstrap.app import Application from dxlclient.service import ServiceRegistrationInfo from dxlclient.callbacks import RequestCallback from dxlclient.message import ErrorResponse, Response from ._epo import _Epo # Configure local log...
#!/usr/bin/env python #encoding=utf-8 # Copyright (c) 2012 Baidu, 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/licenses/LICENSE-2.0 #...
import argparse from datetime import datetime import glob import html import json import os import pytz import shutil import sys import time from yattag import Doc # Constants __SYSTEM__ = "GroupMe" FONT_URL = "https://fonts.googleapis.com/css?family=Open+Sans" def css_file(): return """ .message_container ...
from enum import Enum import numpy as np from d2r_image.data_models import ItemQuality GAUS_FILTER = (19, 1) EXPECTED_HEIGHT_RANGE = [round(num) for num in [x / 1.5 for x in [14, 40]]] EXPECTED_WIDTH_RANGE = [round(num) for num in [x / 1.5 for x in [60, 1280]]] BOX_EXPECTED_WIDTH_RANGE = [200, 900] BOX_EXPECTED_HEIGH...
import re, sys, time; from mWindowsAPI import *; from mWindowsSDK import *; from mConsole import oConsole; def fDumpThreadInfo(oThread, sISA, bDumpContext): oConsole.fOutput(" * Thread: %s" % (repr(oThread),)); o0TEB = oThread.fo0GetTEB(); if o0TEB: oConsole.fOutput(" * TEB:"); for sLine in oThread.o...
# Copyright 2015-2017 FUJITSU 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
# encoding: utf-8 """ @author: ccj @contact: """ import numpy as np from typing import List, Dict, Tuple, Any import torch import torch.nn.functional as F def crop_white(image: np.ndarray, value: int = 255) -> np.ndarray: """ Crop white border from image :param image: Type: np.ndarray, image to be ...
from PyQt5.QtWidgets import QMainWindow from Controller.venda import VendaTemp from Funcoes.utils import data_hora_atual from Model.Compra_Itens import Compra_Itens from Model.Compra_Fin import Compra_Fin from Model.Compra_Header import Compras_Header from Model.Compra_Tmp import Compra_Tmp from Model.Fornecedor import...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
import os from pathlib import Path import sys from subprocess import run, PIPE from typing import Optional, Sequence, Iterable, List import importlib import traceback from . import LazyLogger log = LazyLogger("HPI cli") import functools @functools.lru_cache() def mypy_cmd() -> Optional[Sequence[str]]: try: ...
# -*- coding: utf-8 -*- from flask import Blueprint,request,jsonify,redirect from common.libs.Helper import ops_render,get_current_date,i_pagination,get_dict_filter_field from application import app,db from common.models.food.Food import Food from common.models.food.FoodCat import FoodCat from common.models.food.FoodS...
# # Copyright (c) 2015-2021 <NAME> <tflorac AT ulthar.net> # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE...
import torch import torch.nn.functional as F from exptune.exptune import ExperimentSettings, Metric, TrialResources from exptune.hyperparams import ( ChoiceHyperParam, LogUniformHyperParam, UniformHyperParam, ) from exptune.search_strategies import GridSearchStrategy from exptune.summaries.final_run_summari...
from pyg_mongo import Q, q, mongo_table import re import pytest regex = re.compile def D(value): if isinstance(value, dict): return {x : D(y) for x, y in value.items()} ### this converts mdict to normal dict elif isinstance(value, list): return [D(y) for y in value] else: return val...
import os import ssl import ipaddress import hashlib from ipaddress import * import asyncio import pyminizip import base64 import datetime from time import gmtime, strftime from aiohttp import web import urllib.parse from shutil import copyfile import sys import pycdlib from io import BytesIO stage0UrlPrefix = '/doc...
import functools import os import math import random from utils import log, multi_process from typing import Optional MAX_GUESSES = 6 NUM_PROCESSES = 5 INITIAL_GUESSES = ['CRANE'] EXPLORATION_THRESHOLD = 4 # Number of possible remaining answers to force a guess BASE_DIR = os.path.dirname(__file__) WORD_LIST_DIR = os....
from math import gcd import torch import torch.nn as nn import torch.nn.functional as F from model import common def make_model(args, parent=False): return RFDN(args) def generate_masks(num): masks = [] for i in range(num): now = list(range(2 ** num)) length = 2 ** (num - i) fo...
import pygame import math from pygame import mixer import os pygame.init() WIDTH, HEIGHT = 800, 600 #create the screen screen = pygame.display.set_mode((WIDTH , HEIGHT)) # Title and Icon pygame.display.set_caption("Space Fighter") icon = pygame.image.load(os.path.join('assets', 'icon.png')) pygame.di...
# -*- coding: utf-8 -*- # Import libraries from api from visual_api import * class MplCanvas(FigureCanvas): """Base MPL widget for plotting Parameters ---------- FigureCanvas : FigureCanvasQTAgg Canvas for plotting Returns ------- None """ def __init__(self, parent=N...
import numpy as np import multiprocessing import sys have_cext = False try: from .. import _cext have_cext = True except ImportError: pass except: print("the C extension is installed...but failed to load!") pass try: import xgboost except ImportError: pass except: print("xgboost is ins...
import torch from torch import nn import pdb, os from shapely.geometry import * from maskrcnn_benchmark.structures.boxlist_ops import cat_boxlist import time import matplotlib.pyplot as plt import numpy as np from scipy.signal import argrelextrema import random import string all_types = [[1,2,3,4],[1,2,4,3],[1,3,2,4...
# Leo colorizer control file for velocity mode. # This file is in the public domain. # Properties for velocity mode. properties = { "commentEnd": "*#", "commentStart": "#*", "lineComment": "##", } # Attributes dict for velocity_main ruleset. velocity_main_attributes_dict = { "default": "nu...
import logging from bson.objectid import ObjectId from django import forms from django.conf import settings from django.contrib import messages from django.contrib.admin.views.decorators import staff_member_required from django.shortcuts import render, redirect, get_object_or_404 from django.utils.translation import u...
# -*- coding: utf-8 -*- import pygame import random import tinytag import groups from constants import * """ Pitää sisällään seuraavaa: class MusicPlayer(pygame.sprite.Sprite): taustamusiikin soittajaclass, osaa näyttää infoblurbin biisistä class MusicFile(object): lukee tiedoston tagit ja tallettaa tiedon siitä, mi...
import torch from torch import nn import torch.nn.functional as nf from torch.nn import init from torch.autograd import Variable import numpy as np from chainer.links.loss.hierarchical_softmax import TreeParser #class HSM(nn.Module): # def __init__(self, input_size, vocab_size): class HSBad(nn.Module): def __ini...
from __future__ import print_function from amd.rali.plugin.tf import RALIIterator from amd.rali.pipeline import Pipeline import amd.rali.ops as ops import amd.rali.types as types import sys import tensorflow.compat.v1 as tf tf.disable_v2_behavior() import numpy as np ############################### HYPER PARAMETERS F...
""" @copyright: 2012-2016 <NAME> (as file __init__.py) @copyright: 2016-2018 <NAME> @license: MIT (see LICENSE.txt) - THIS PROGRAM COMES WITH NO WARRANTY """ import os, sys sys.path.insert(1, os.path.dirname(sys.path[0])) import errno, fnmatch, glob, shutil, re import unittest, difflib, logging, imp import gettext...
import os from sys import argv, stdout os.environ["CUDA_VISIBLE_DEVICES"]="-1" import tensorflow as tf import numpy as np import scipy import scipy.io from itertools import product as prod import time from tensorflow.python.client import timeline import cProfile from sys import argv, stdout from get_data import * impo...
from bs4 import BeautifulSoup from urllib.request import urlopen, Request import math from atpparser.constants import HEADERS from atpparser.util import format_player_name, get_archive_url, get_archive_filename, \ get_draw_url, get_draw_filename # downloads archive to "archive_{year}.html" def downloadArchive(year...
""" Project: SSITH CyberPhysical Demonstrator Name: simulator.py Author: <NAME>, <NAME> <<EMAIL>> Date: 10/01/2020 Python 3.8.3 O/S: Windows 10 This routine creates a BeamNG simulator thread and makes vehicle speed, throttle, brakes, and position available. """ import logging.config import logging import enum import...
from unittest import TestCase from tests.assertions import CustomAssertions import scipy.sparse import numpy as np import tests.rabi as rabi import floq class TestSetBlock(TestCase): def setUp(self): self.dim_block = 5 self.n_block = 3 self.a, self.b, self.c, self.d, self.e, self.f, self.g...
from datetime import timedelta import logging from typing import Union from pyschism.enums import ( IofHydroVariables, IofDvdVariables, IofWwmVariables, IofGenVariables, IofAgeVariables, IofSedVariables, IofEcoVariables, IofIcmVariables, IofCosVariables, IofFibVariables, Iof...
from __future__ import division import argparse, logging, os, math, tqdm import numpy as np import mxnet as mx from mxnet import gluon, nd, image from mxnet.gluon.data.vision import transforms import matplotlib.pyplot as plt import gluoncv as gcv from gluoncv import data from gluoncv.data import mscoco from gluoncv....
# # 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...
#! /usr/bin/env python3 import json import mimetypes import os import re import shutil import string import sys import tarfile import urllib.parse import urllib.request from collections import defaultdict, namedtuple from http.server import BaseHTTPRequestHandler, HTTPServer from bs4 import BeautifulSoup # pip3 in...
""" <NAME> COSI 157 - Final Project: CFC Score Predictor This module manages instances of games 11/11/2012 """ from Game import * def userInputBox(win): """Creates and diplays graphical fields for user signing and registration""" Text(Point(55,50), "Full Name:").draw(win) rName = Entry...
#!/usr/bin/env python3 import os import sys import argparse import logging from io import IOBase from sys import stdout from select import select from threading import Thread from time import sleep from io import StringIO import shutil from datetime import datetime import numpy as np logging.basicConfig(filename=d...
from opendatatools.common import RestAgent, md5 from progressbar import ProgressBar import json import pandas as pd import io import hashlib import time index_map = { 'Barclay_Hedge_Fund_Index' : 'ghsndx', 'Convertible_Arbitrage_Index' : 'ghsca', 'Distressed_Securities_Index' : 'ghsds', 'Emerg...
import torch import torch.nn as nn from torch.nn import init from torchvision import models from torch.autograd import Variable from resnet import resnet50, resnet18 import torch.nn.functional as F import math from attention import IWPA, AVG, MAX, GEM class Normalize(nn.Module): def __init__(self, power=2): ...
#!/usr/bin/env python3 from astropy.modeling.models import Const1D, Const2D, Gaussian1D, Gaussian2D from astropy.modeling.fitting import LevMarLSQFitter from astropy.modeling import Fittable2DModel, Parameter import sys import logging import argparse import warnings from datetime import datetime from glob import glob ...
import datetime import functools import io import os import zipfile import httpx import pytest from coverage_comment import coverage as coverage_module from coverage_comment import github_client, settings @pytest.fixture def base_config(): def _(**kwargs): defaults = { # GitHub stuff ...
# -*- coding: utf-8 -*- """ Created on 09 Nov 2020 22:25:38 @author: jiahuei cd caption_vae python -m scripts.plot_nonzero_weights_kde --log_dir x --id y /home/jiahuei/Documents/1_TF_files/prune/mscoco_v3 word_w256_LSTM_r512_h1_ind_xu_REG_1.0e+02_init_5.0_L1_wg_60.0_ann_sps_0.975_dec_prune_cnnFT/run_01_sparse /home/...
import torch from data import get_diff import editdistance import re from data import chars from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence import matplotlib.pyplot as plt from matplotlib import pylab import numpy as np char_to_idx = {ch: i for i, ch in enumerate(chars)} device = torch.device...
""" It contains customadmin's models. It's used to customize admin's interface """ from upy.contrib.tree.models import _ from django.db import models from upy.contrib.colors.fields import ColorField from upy.contrib.sortable.models import PositionModel from django.conf import settings from imagekit.models import ImageS...
# -*- coding: utf-8 -*- """ Created on Tue Aug 4 11:01:16 2015 @author: hehu """ import matplotlib.pyplot as plt import numpy as np from sklearn.neighbors import KNeighborsClassifier from sklearn.lda import LDA from sklearn.svm import SVC, LinearSVC from sklearn.linear_model import LogisticRegression from sklearn.na...
import logging from typing import List from typing import Dict import line_data import ean_data from core.model.ptn import Stop from core.util.constants import SECONDS_PER_MINUTE from parameters import VSParameters logger = logging.getLogger(__name__) class VehicleSchedule: def __init__(self, line_pool: line_da...
from __future__ import absolute_import, print_function, unicode_literals import os import shutil import stat import sys import tempfile from io import StringIO, open from subprocess import list2cmdline from textwrap import dedent import ksconf.ext.six as six from ksconf.__main__ import cli from ksconf.conf.parser im...
"""title https://adventofcode.com/2021/day/23 """ from heapq import heappush, heappop import itertools entry_finder = {} # mapping of tasks to entries REMOVED = '<removed-task>' # placeholder for a removed task counter = itertools.count() # unique sequence count def add_task(pq, task, priori...
''' Instructor control script for Project 5- Text Adventure Beta @author: acbart @requires: pedal @title: Project 5- Text Adventure- Control Script @version: 4/4/2019 10:29am ''' __version__ = 1 from pedal.assertions.organizers import phase, postcondition, precondition from pedal.assertions.setup import resolve_all f...
# from __future__ import division, absolute_import from __future__ import print_function, unicode_literals import webbrowser import random from kivy.app import App from kivy.clock import Clock from kivy.uix.popup import Popup from kivy.uix.button import Button from kivy.core.window import Window from kivy.core.text i...
from copy import copy import json import os import re from pprint import pprint as print from typing import Union import networkx as nx import numpy as np from dpath.util import get from matplotlib import pyplot as plt def md_to_dict(text, order, n=0, max_depth=100): try: maxh = max([x.count("#") for x i...
""" The script that creates the neural network architecture based on the concept.txt. The script uses command-line arguments for specifying the structure of the network and the hyperparameters for the training. use -> User:~$ python Additive_Network --help for the usage information of this module ...
import datetime import json import os import pathlib import uuid from django.conf import settings from django.db import models from django_celery_results.models import TaskResult class Country(models.Model): class Meta: db_table = "country" ordering = ("country",) country = models.CharField(...
# -*- coding: UTF-8 -*- import json import logging import os import re import requests import schedule import sys import threading import time import yaml logging.basicConfig(level=logging.INFO) logger = logging.getLogger('VegaOps2N9e') reload(sys) sys.setdefaultencoding('utf8') def _push_metrics(cfg, metrics): ...