text
stringlengths
8.04k
46.5k
import pandas as pd import numpy as np import collections import requests import json import gzip import shutil import pymongo import time import datetime from urllib.request import urlopen from pymongo import MongoClient import re from sshtunnel import SSHTunnelForwarder import pprint from datetime import date import ...
''' cd dropbox/codes/check_forbidden py -B cf_scripts.py python3 -B cf_scripts.py This file contains helper functions, which are basically without any side effects to UIs and Variables ''' import setup import cf_html import csv import datetime import importlib import locale import os import os.path import re import su...
''' BSD 3-Clause License Copyright (c) 2019, <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 list of condition...
import matplotlib import matplotlib.pyplot as plt from lib import agent, action, experience, parameters from torch.autograd import Variable import env as benv import xml.etree.ElementTree as ET from xml.dom import minidom import torch.optim as optim import torch.nn as nn import torch import collections impor...
import asyncio import aiohttp import discord import json import re from .utilities.formatting import realtime, pformat from .utilities.paginator import MMMenu, MMReplyMenu from .utilities.src import ( srcGame, srcGameLb, srcRequest, srcUser, UserNotFound, GameNotFound, ) from dateutil import p...
#!/usr/bin/env python3 -u # Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import c...
import os from torch.utils.data import DataLoader from dataset import VideoDataset import random import scipy.stats as stats import torchvision.models as ptmodels from models.fc_finetune import fc_finetune from models.LSTM_final import LSTM_final from models.skill_classifier import skill_classifier from models.MSTCN im...
# EIA_MECS.py (flowsa) # !/usr/bin/env python3 # coding=utf-8 import pandas as pd import numpy as np import io from flowsa.common import * from flowsa.flowbyfunctions import assign_fips_location_system import yaml """ MANUFACTURING ENERGY CONSUMPTION SURVEY (MECS) https://www.eia.gov/consumption/manufacturing/data/20...
# Copyright 2016 VMware 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 by ap...
""" Test Configuration """ import functools import mock import socket import time import unittest from nose.tools import raises import ipyroute def mocked(method, output): def wrap(func): @functools.wraps(func) def wrapped(self, *args): kwargs = { method + '.return_value': output.spli...
import csv import os import re import subprocess import sys import fiona as fiona import rasterio from rasterio.windows import Window import rasterio.features import rasterio.warp import rasterio.mask from lxml import etree import shutil import gdal from osgeo import ogr, osr def create_roi(main_image, vector_file, ...
#!/usr/bin/env python3 import itertools as it, operator as op, functools as ft from collections import ChainMap, Mapping, OrderedDict import os, sys, logging, types, re, base64 import yaml import gi gi.require_version('Gst', '1.0') from gi.repository import Gst, GObject, GLib class LogMessage(object): def __init_...
""" <NAME> Heinz-Nixdorf Chair for Distributed Information Systems Friedrich Schiller University Jena, Germany Email: <EMAIL> Website: https://github.com/Sheeba-Samuel """ from reproducemegit import settings import pandas as pd from reproducemegit.jupyter_reproducibility.db import connect, Repository, Notebook, Query,...
# 15/07/2020, <NAME>, Postdoc, Edinburgh # Read in shear data for KiDS-1000 and perform spherical harmonic transform # to get kappa maps. Also do a series of noise realisations to make # signal/noise maps. import sys import numpy as np import healpy as hp from matplotlib import rcParams from astropy.io import fits imp...
import numpy as np from PySSM import SubmodularFunctionint, SubmodularFunctionpair from collections import defaultdict import heapq import torch.nn.utils.prune as prune import torch.nn as nn from scipy.sparse.linalg import svds from scipy.interpolate import interp1d def get_module(model, module_name): module = mo...
# colourscheme.py # Copyright 2009 <NAME> # Licence: See LICENCE (BSD licence) """A chess board colour scheme chooser. """ import tkinter import tkinter.font from solentware_misc.gui.colourslider import ColourSlider from solentware_misc.gui.exceptionhandler import ExceptionHandler from pgn_read.core.parser import P...
from math import acos, sqrt, degrees from structurefinder.shelxfile import elements from structurefinder.shelxfile.cards import AFIX, PART, RESI from structurefinder.shelxfile.dsrmath import atomic_distance, frac_to_cart, Array from structurefinder.shelxfile.misc import DEBUG, split_fvar_and_parameter, ParseUnknownP...
### Figure 3 E and F - Obenhaus et al. import sys, os import os.path import numpy as np import datajoint as dj import pickle import cmasher as cmr from general import get_star, print_mannwhitneyu, print_wilcoxon # Make plots pretty from matplotlib import pyplot as plt import seaborn as sns sns.set(style='white') ...
import sys import textwrap import struct import array from PIL import Image, ImageDraw, ImageFont, ImageFilter, ImageChops import bteve as eve import zlib import wave from io import BytesIO from itertools import groupby from gameduino2.convert import convert import random import binascii def crc(s): # CRC-32 of str...
#!/usr/bin/env python # coding: utf-8 # <img style="float: left;" src="earth-lab-logo-rgb.png" width="150" height="150" /> # # # Earth Analytics Education - EA Python Course Spring 2021 # ## Important - Assignment Guidelines # # 1. Before you submit your assignment to GitHub, make sure to run the entire notebook ...
import os import shutil import time import random from itertools import chain from typing import List, Tuple, Dict import numpy as np import torch import torch.nn as nn from torch.optim import Adam, SGD from torch.nn.utils.clip_grad import clip_grad_norm_ from firelab import BaseTrainer from torchvision.datasets impor...
from gc import collect import pandas as pd from tqdm import tqdm import time import numpy as np from sklearn.metrics import classification_report from sklearn.model_selection import KFold from sklearn.metrics import roc_auc_score, roc_curve from sklearn.svm import OneClassSVM as OCSVM from sklearn.feature_extraction.te...
import os import sys import argparse import pandas as pd import numpy as np import ast import logging.config # .. other safe imports try: # z test from statsmodels.stats.proportion import proportions_ztest # bayesian bootstrap and vis import matplotlib.pyplot as plt import seaborn as sns import...
import openpyxl from openpyxl import utils import re import os from datetime import datetime import pandas from collections import namedtuple import numpy as np import shutil import numbers output_folder = "output" combined_output_xlsx = "Combined_output.xlsx" peti_output_xlsx = "Peti_output" vanda_output_xlsx = "Vand...
from __future__ import division, print_function, absolute_import import time import os import sys import re import csv import codecs import numpy as np import pandas as pd import matplotlib import matplotlib.pyplot as plt from pandas.io.parsers import read_csv import tensorflow as tf import glob from datetime import d...
#!/usr/bin/env python3 # # SLAPCHOP - Simply Looking At Pairwise Comparisons to Help Optimize Parsing # Name comes from first version that used SW alignments. # It now uses fuzzy regular expressions, so maybe it should be called something # else. But who cares. # import re import json import regex import os.path imp...
import re import abc import base64 import random import string import Levenshtein from enum import Enum from datetime import datetime, timedelta from typing import Tuple, List, Union from src.Dto.keywords import Loc, ParamKey, DataType, DocKey from src.Exception.exceptions import UnsupportedError def buildParam(info:...
"""An example to run of the minitaur gym environment with virtual-constraints-based gaits. The bezierdata_legspace file has all the gait coefficients data. To run a single gait, use the HZDPolicy() function. (set --env==0 from cmd line) To run multiple gaits succesively, use GaitLibraryPolicy() function. (set --en...
# Created by DylanPW; https://github.com/DylanPW # # A simple contacts database application, featuring exporting to csv. # # Version 0.3c; # # Please see README for additional details and changelog. # # # Please report any bugs or issues as you see fit. #Import applicable try: from Tkinter import * except: fr...
''' Simulation of car following user with 5 sensors used for the reward 3 sensors used to detect the user and determine whether or not he is in front of the car. State contains the 5 sonars and 3 BLE sensors information <NAME> ''' import sys #sys.path.append('/usr/local/lib/python3.5/dist-packages') import os im...
#!/usr/bin/python3 import base64 import random import string import subprocess import os import getopt import sys import time import netifaces import requests import socket import shutil import urllib3 import yaml import json from common.utils import try_set_file_permissions, is_node_running_dqlite urllib3.disable_w...
import random, time, json from math import floor, ceil, sqrt from tools import * class Pokedex(object): def __init__(self): with open('pokedex.json', 'r+') as file: self.entries = json.load(file) for entry in self.entries: entry['seen'] = False self.totalEntries = len(self.entries) def __str__(self): ...
''' **ENTTEC ODE Mk2**, DMX lighting with Artnet - [info](https://www.enttec.com/product/controls/dmx-ethernet-lighting-control/ethernet-to-dmx-interface/). * loads channels buffer on first use; unused channels will be left unchanged. * smoothing is done over 1200 ms @ 20 Hz unless overridden This nodes allows for si...
import torch from torch import Tensor import torch.nn.functional as F from torch.nn import Parameter from .nmf import _size_1_t, _size_2_t, _size_3_t from torch.nn.modules.utils import _single, _pair, _triple from tqdm import tqdm from typing import Union, Iterable, Optional, List, Tuple from collections.abc import Ite...
#!/usr/bin/env python # -*- coding: utf-8 -*- """base_task.""" import abc import datetime import uuid from enum import IntEnum from .base_priority_rule import ResourcePriorityRuleMode, WorkplacePriorityRuleMode class BaseTaskState(IntEnum): """BaseTaskState.""" NONE = 0 READY = 1 WORKING = 2 WO...
# -*- coding: utf-8 -*- # """ This is an RDFLib store around <NAME> et al.'s SPARQL service wrapper. This was first done in layer-cake, and then ported to RDFLib """ # Defines some SPARQL keywords LIMIT = 'LIMIT' OFFSET = 'OFFSET' ORDERBY = 'ORDER BY' import re import collections import warnings import contextlib t...
""" $Revision: 1.7 $ $Date: 2010-06-14 12:53:12 $ Author: <NAME> Affiliation: Space Telescope - European Coordinating Facility """ from __future__ import absolute_import, print_function __author__ = "<NAME> <<EMAIL>>" __date__ = "$Date: 2011-04-25 13:46:00 $" __version__ = "$Revision: 1.8 $" __credits__ = """This soft...
#!/usr/bin/env python3 # # Licensed under the Apache License, Version 4.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softwar...
############################################################################## # The development of this flowsheet/code is funded by the ARPA-E DIFFERENTIATE # project: “Machine Learning for Natural Gas to Electric Power System Design” # Project number: DE-FOA-0002107-1625. # This project is a collaborative effort betw...
""" Copyright (c) 2018-2021 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 wri...
import enum import operator import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.quantized as nnq import torch.nn.quantized.dynamic as nnqd import torch.nn.qat as nnqat import torch.nn.intrinsic.quantized as nniq import torch.nn.intrinsic.qat as nniqat import torch.nn.intrinsic as nni toq...
from __future__ import absolute_import, division, print_function, unicode_literals from ctypes import POINTER, Structure, Union, c_char from ctypes.wintypes import BOOL, LPVOID, WORD, DWORD, WCHAR, BYTE, ULONG # CHAR not in py2 from ctypes.wintypes import LPSTR, LPWSTR, LPCSTR, LPCWSTR from .. import CEnum, windll f...
import tensorflow.keras as keras from tensorflow.keras.callbacks import EarlyStopping from tensorflow.keras.layers import Dense from tensorflow.keras.layers import Embedding from tensorflow.keras.layers import GRU, LSTM, Bidirectional, TimeDistributed from tensorflow.keras.layers import Input from tensorflow.keras.mode...
# Copyright 2015 Infoblox 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 by...
# Licensed under a 3-clause BSD style license - see LICENSE.rst import os import warnings from textwrap import dedent import pytest import numpy as np import matplotlib.pyplot as plt from matplotlib.transforms import Affine2D, IdentityTransform from astropy.io import fits from astropy import units as u from astropy...
# ------------------------------------------------------------------------------------------ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. # -------------------------------------------------------------------...
#!/usr/bin/env python3 # Copyright 2020 Stanford University, NVIDIA 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 ...
""" Title: Multimodal entailment Author: [<NAME>](https://twitter.com/RisingSayak) Date created: 2021/08/08 Last modified: 2021/08/15 Description: Training a multimodal model for predicting entailment. """ """ ## Introduction In this example, we will build and train a model for predicting multimodal entailment. We wil...
#!/usr/bin/env python # tcp_sender_a.py # Copyright (C) ContinuumBridge Limited, 2015 - All Rights Reserved # Written by <NAME> # # To test: nc localhost 5003 # Default values: config = { "temperature": "True", "temp_min_change": 0.1, "irtemperature": "False", "irtemp_min_change": 0.5, "humidity": ...
# =============================================================================== # Copyright 2012 <NAME> # # 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/LI...
"""Python control flow graph generation and bytecode assembly.""" import math import os from rpython.rlib.objectmodel import we_are_translated from pypy.interpreter.astcompiler import ast, misc, symtable from pypy.interpreter.error import OperationError from pypy.interpreter.pycode import PyCode from pypy.interpreter...
#!/usr/bin/env python import sys from os import system, path import os import shutil from ..converter import * from .grid import find_parameters from .learner import * VERSION = 0 __all__ = ['VERSION', 'train_converted_text', 'train_text', \ 'predict_text', 'predict_single_text', 'PredictionResult', 'TextModel', ...
from collections import defaultdict from typing import Any, List import re import yaml from docutils import nodes from docutils.nodes import Node from docutils.parsers.rst import directives # type: ignore from rdflib import Graph, Literal, BNode, Namespace # type: ignore from rdflib.namespace import RDF, RDFS # typ...
# /******************************************************************************* # * Author : CVPR2020_EnAET # *******************************************************************************/ import torch import torch.utils.data as data import numpy as np import random import os from PIL import Image, PILLOW_VERSION...
# stdlib module imports import array import sys # third-party module imports import colorama def stringToRotor(s): '''Turn a string into an instantiated rotor''' # Get all immediate subclasses of the rotor base class classes = _RotorBase.__subclasses__() # split the argument into name and settings ...
import argparse import numpy as np import time import torch import json import torch.nn as nn import cv2 import random import torch.nn.functional as F from solver_learnToAdd import Solver from models.synthesizer import gumbel_softmax_sample from os.path import basename, exists, join, splitext from os import makedirs f...
# -*- coding: utf-8 -*- """ Created on Mon May 4 10:46:36 2020 @author: amarmore """ ### Module defining the functions used for the tests in the paper. from IPython.display import display, Markdown import numpy as np import pandas as pd pd.set_option('precision', 4) import tensorly as tl import warnings import mat...
#!/usr/bin/env python # Very simple serial terminal # (C)2002-2011 <NAME> <<EMAIL>> # Input characters are sent directly (only LF -> CR/LF/CRLF translation is # done), received characters are displayed as is (or escaped trough pythons # repr, useful for debug purposes) import sys, os, serial, threading, a...
# coding: utf-8 # Copyright (c) Max-Planck-Institut für Eisenforschung GmbH - Computational Materials Design (CM) Department # Distributed under the terms of "New BSD License", see the LICENSE file. from __future__ import print_function import numpy as np import scipy.constants from pyiron_atomistics.atomistics.maste...
import re import json import operator import sys import dateutil.parser as dp import pandas as pd from typing import List, Tuple, Set from rltk import similarity from tl.exceptions import TLException import numpy as np ccm_columns = ['type', 'score', 'property', 'row', 'col1', 'col1_item', 'col1_string'...
# # ImageViewGtk.py -- a backend for Ginga using Gtk widgets and Cairo # # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. import os import numpy as np import gtk import cairo from ginga.gtkw import GtkHelp from ginga.cairow import ImageViewCairo from ginga i...
# -*- coding: utf-8 -*- from DATA.ttypes import Message, Location from random import randint import json, ntpath def loggedIn(func): def checkLogin(*args, **kwargs): if args[0].isLogin: return func(*args, **kwargs) else: args[0].callback.default('You want to call the functi...
#!/usr/bin/env python # -*- encoding: utf-8 -*- # Copyright 2011-2020, <NAME> # # 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 re...
# $Id: references.py 8387 2019-09-06 13:16:34Z milde $ # Author: <NAME> <<EMAIL>> # Copyright: This module has been placed in the public domain. """ Transforms for resolving references. """ __docformat__ = 'reStructuredText' import sys import re from docutils import nodes, utils from docutils.transforms import Trans...
#!/usr/bin/env python ##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ##~ Copyright (C) 2002-2004 TechGame Networks, LLC. ##~ ##~ This library is free software; you can redistribute it and/or ##~ modify it under the terms of the BSD style License as found in the ##~ LICENSE file included with this distribution....
import numpy as np from collections import OrderedDict from string import ascii_uppercase from gips.utils._read_ext import read_gist_ext from gips.datastrc.gist import gist from gips.utils.misc import are_you_numpy from gips import FLOAT from gips import DOUBLE ### Written by <NAME> @ Klebe Lab, Marburg University #...
from typing import Dict from torch.distributions import Normal, kl_divergence from transformers import BertModel from transformers.modeling_gpt2 import * from . import Model from .util import Losses, VAEOut PAD, BOS, EOS = '<PAD>', '<BOS>', '<EOS>' SPECIAL = {'pad_token': PAD, 'bos_token': BOS, 'eos_token': EOS} OF...
#!/usr/bin/env python """Implementations of various collections.""" import cStringIO import itertools import struct import logging from grr.lib import aff4 from grr.lib import config_lib from grr.lib import data_store from grr.lib import rdfvalue from grr.lib import registry from grr.lib import stats from grr.lib ...
#!/usr/bin/python # Copyright (c) 2017 <NAME> # Copyright (c) 2015 <NAME> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATIO...
############################################################################### # # Copyright (c) 2020, NVIDIA CORPORATION. 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...
#!/usr/bin/env python3 import time import pickle import json import os import random import getpass import threading import errno import uuid import sqlite3 from menu_screen import * # TODO: # - Switch from personal data file to table in DB class Plant(object): # This is your boat! stage_list = [ 'se...
# (C) Copyright 2017- ECMWF. # # This software is licensed under the terms of the Apache Licence Version 2.0 # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. # # In applying this licence, ECMWF does not waive the privileges and immunities # granted to it by virtue of its status as an intergovernme...
import pygame, sys, time, os, random from pygame.locals import * from Files import Var, Sprite, InputText, Calculus, Images pygame.init() # Setup all sprites and textinput here WHITE = (255, 255, 255) Input = InputText.TextInput( initial_string="", font_family="Calibri", ...
# The MIT License (MIT) # # Copyright © 2021 <NAME> # # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated # documentation files (the “Software”), to deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge,...
""" uropa.py: UROPA - Universal RObust Peak Annotator @authors: <NAME>, <NAME>, <NAME>, <NAME> and <NAME> @license: MIT @maintainer: <NAME> @email: <EMAIL> """ import os import sys import json import argparse import datetime import time import subprocess import gzip import copy import psutil import traceback import ...
# # Copyright 2019 The FATE 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...
import csv import json import logging import os import pickle import sys import time import urllib import shutil import glob import cv2 import dlib import imutils import keras import librosa import librosa.display import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np import pandas a...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # AUTHOR = '<NAME> <<EMAIL>>' import argparse import datetime import json import os import os.path import shutil import subprocess import sys from subprocess import PIPE, Popen from random import randint from distutils.version import LooseVer...
import json import os import re import sys from shutil import copyfile from time import sleep from typing import Optional, Tuple import click from PIL import Image, UnidentifiedImageError from torch import Tensor # noinspection PyProtectedMember from torch.utils.data import Dataset, DataLoader from torchvision.transfo...
#!/usr/bin/env python from __future__ import print_function, absolute_import, division import re import sys import os import glob import traceback import importlib from contextlib import contextmanager from datetime import timedelta from multiprocessing.pool import ThreadPool from multiprocessing import cpu_count fr...
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ Surface preprocessing workflows. **sMRIPrep** uses FreeSurfer to reconstruct surfaces from T1w/T2w structural images. """ from nipype.pipeline import engine as pe from nipype.interfaces.base import Un...
import numpy as np import pandas as pd from tqdm import tqdm import datetime as dt from collections import defaultdict from dateutil.relativedelta import relativedelta def collect_dates_for_cohort(df_pop, control_reservoir, control_dates, col_names=None): ''' Fill 'control_used' dictionary with the dates (...
import sys import numpy as np import matplotlib.pyplot as plt import glob import torch from path import Path from imageio import imread import pykitti # install using pip install pykitti # from kitti_tools.kitti_raw_loader import read_calib_file, transform_from_rot_trans import deepFEPE.dsac_tools.utils_misc as utils...
import math import torch import torch.nn as nn from torchvision.models.utils import load_state_dict_from_url import copy __all__ = ['ResNet', 'resnet50'] model_urls = { 'resnet50': 'https://download.pytorch.org/models/resnet50-19c8e357.pth', } def conv3x3(in_planes, out_planes, stride=1, groups=1, dilation=1):...
import json import logging import sys import math import random from mapa import Map from tree_search import * file_handler = logging.FileHandler(filename='ai_agent.log',mode='w+') stdout_handler = logging.StreamHandler(sys.stdout) # handlers = [file_handler, stdout_handler] handlers = [stdout_handler] logging.basic...
# # Copyright (c) nexB Inc. and others. All rights reserved. # SPDX-License-Identifier: Apache-2.0 AND MIT # See http://www.apache.org/licenses/LICENSE-2.0 for the license text. # See https://github.com/nexB/debian-inspector for support or download. # See https://aboutcode.org for more information about nexB OSS projec...
# coding=utf-8 import io import logging import os import platform import re import subprocess import threading import time import wx import wx.html from smartva import config from smartva import prog_name from smartva import utils from smartva import workerthread from smartva.data.countries import COUNTRY_DEFAULT, C...
#****************************************************************************** # # tempoGAN: A Temporally Coherent, Volumetric GAN for Super-resolution Fluid Flow # Copyright 2018 <NAME>, <NAME>, <NAME>, <NAME> # # This program is free software, distributed under the terms of the # Apache License, Version 2.0 # http:...
# All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
# Copyright 2020 <NAME> and collaborators. # This program is distributed under the MIT license. from __future__ import annotations import functools import json import pathlib import string as string_module import statistics import webbrowser import time import itertools import random import logging import numbers imp...
# Check that analysis produces correct results # # RUN: python %s import unittest from lnt.server.reporting.analysis import ComparisonResult, REGRESSED, IMPROVED from lnt.server.reporting.analysis import UNCHANGED_PASS, UNCHANGED_FAIL from lnt.server.reporting.analysis import absmin_diff from lnt.util.stats import med...
import os import pandas as pd import numpy as np from itertools import chain from codifyComplexes.CodifyComplexException import CodifyComplexException from .DataLoaderClass import DataLoader class AbstractProtocol(DataLoader): ''' This class is a template for codification protocols ''' DESIRED_ORDER=["L",...
import pygame, string, os, sys import time as t pygame.init() pygame.mixer.init() def error(text = False): if not text: text = "unknow error" raise TypeError("ERROR: " + str(text)) class Window: """This is class of window. Via this class you can draw buttons, images, lines ... \n*fullscreen - Tru...
import random import time import copy import math import itertools import statistics import matplotlib import matplotlib.pyplot as plot import numpy as np n = 800 #liczba wierzcholkow populacja = 10 #licznosc populacji wstepnaPop...
# 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
import datetime from collections import defaultdict from itertools import chain import graphene from lingvodoc.models import ( Dictionary as dbDictionary, TranslationAtom as dbTranslationAtom, TranslationGist as dbTranslationGist, DBSession, Client as dbClient, Language as dbLanguage, User a...
'''Test cases for the manage.config() function. We test the following for the configurable parameters: - Exactly the expected parameters appear in the config file. - The expected parameters have the expected values in the config file. - If no phantomjs executable is found or specified, no config file is created. I...
# coding: utf-8 # In[11]: # First of all, we import all the necessary libs import nltk import re import unicodedata import string from nltk.corpus import stopwords from nltk.stem import LancasterStemmer, WordNetLemmatizer import pandas as pd import inflect import pickle import math from scipy.spatial import distan...
#!/usr/bin/python # --------------------------------------------------------------------------- # File: mipex1.py # Version 12.6.2 # --------------------------------------------------------------------------- # Licensed Materials - Property of IBM # 5725-A06 5725-A29 5724-Y48 5724-Y49 5724-Y54 5724-Y55 5655-Y21 # Copyr...
import logging import requests import json from operator import itemgetter import urllib.parse from .Exceptions import InvalidVersionPhase logger = logging.getLogger(__name__) # VERSION_DISTRIBUTION=["EXTERNAL", "SAAS", "INTERNAL", "OPENSOURCE"] # VERSION_PHASES = ["PLANNING", "DEVELOPMENT", "PRERELEASE", "RELEASED"...