text
stringlengths
6.04k
39.5k
import binascii import csv import hashlib import hmac import json import logging import os import time from base64 import b64decode, b64encode from http import HTTPStatus from json.decoder import JSONDecodeError from tempfile import TemporaryDirectory from typing import Any, Callable, Dict, List, Optional, Tuple, Union...
# Copyright (c) 2014-present PlatformIO <<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 law or ag...
# (c) Continuum Analytics, Inc. / http://continuum.io # All Rights Reserved # # conda is distributed under the terms of the BSD 3-clause license. # Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause. from __future__ import print_function, division, absolute_import import os import sys import shutil im...
import binascii import getpass import os import os.path import shutil import tempfile import time from twisted.internet import defer, interfaces, protocol, reactor from twisted.internet.protocol import Factory from twisted.trial import unittest from zope.interface import implementer from txdbus import authentication,...
# Copyright 2020 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, ...
# -*- coding: utf-8 -*- """ Ephemeris calculations using SunPy coordinate frames """ import datetime import warnings import numpy as np import astropy.units as u from astropy.time import Time from astropy.coordinates import (SkyCoord, Angle, Longitude, ICRS, PrecessedGeocentric, AltAz,...
# coding=utf-8 # # Copyright 2022 Shandong University <NAME> # # Part of this code is based on the source code of Transformers # (arXiv:1910.03771) # # 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 Licens...
"""Graph diameter, radius, eccentricity and other properties.""" import networkx as nx from networkx.utils import not_implemented_for __all__ = [ "extrema_bounding", "eccentricity", "diameter", "radius", "periphery", "center", "barycenter", "resistance_distance", ] def extrema_boundi...
__all__ = ["ParseFromValue", \ "CreateValueFrom", \ "CreateElement", \ "CallAtomsJs", \ "VerifyElementClickable", \ "FindElement", \ "IsElementEnabled", \ "IsOptionElementSelected", \ "GetElementSize", \ "IsElementDisplay...
__author__ = '<NAME>' from utils import * from ospy import version from ospy.stations import stations from ospy.options import options from ospy.programs import programs, ProgramType from ospy.log import log from ospy import helpers logger = logging.getLogger('OSPyAPI') logger.setLevel(logging.DEBUG) handler = log...
import numpy as np import torch CLASSES = { 'dg_car_20': ['background', 'back_bumper', 'bumper', 'car_body', 'car_lights', 'door', 'fender','grilles','handles', 'hoods', 'licensePlate', 'mirror','roof', 'running_boards', 'tailLight','tire', 'trunk_lids','wheelhub', 'window', 'windshield'], 'dg_...
# coding: utf-8 from __future__ import unicode_literals import re from hashlib import sha1 from .common import InfoExtractor from ..compat import compat_str from ..utils import ( ExtractorError, determine_ext, float_or_none, int_or_none, unified_strdate, ) class ProSiebenSat1BaseIE(InfoExtractor...
from __future__ import print_function, absolute_import, division from collections import defaultdict import json from os.path import dirname, join, abspath from warnings import warn import cobra import pandas from six import iteritems import cobrame from bacillusme import corrections ecoli_files_dir = join(dirname(...
""" Miscellaneous matrix plotting utilities. """ import warnings import numpy as np import pandas as pd import matplotlib.pyplot as plt import matplotlib.patches as mpatches from matplotlib.tight_layout import get_renderer from matplotlib.colorbar import make_axes with warnings.catch_warnings(): warnings.simplefilt...
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
from __future__ import print_function import collections import sys import time import astropy.units as u import os import re import warnings from astromodels.core.my_yaml import my_yaml from astromodels.functions.function import get_function_class from astromodels.utils import get_user_data_path class XSpecNotAvail...
#!/usr/bin/env python3 # This file is a part of toml++ and is subject to the the terms of the MIT license. # Copyright (c) <NAME> <<EMAIL>> # See https://github.com/marzer/tomlplusplus/blob/master/LICENSE for the full license text. # SPDX-License-Identifier: MIT import sys import utils import io import re import json ...
import argparse import os from math import log10 from pathlib import Path import pandas as pd import torch import torch.optim as optim import torchvision import yaml from torch.utils.data import DataLoader from tqdm import tqdm from tensorboardX import SummaryWriter from config import cfg from models.l...
import copy from inspect import signature, Signature, Parameter from typing import Any, Callable from collections import OrderedDict from .interface import register, dumps, loads __all__ = ['MISSING', 'field', 'field_property', 'DataclassMeta', 'DataClass', 'dataclass', 'Message'] class MISSING(object): pass ...
import os import numpy as np from scipy import ndimage as ndi from skimage import color, data, transform from skimage import img_as_uint, img_as_ubyte, data_dir from skimage.morphology import grey, selem from skimage._shared._warnings import expected_warnings from skimage._shared import testing from skimage._shared.t...
#!/usr/bin/env python # coding=utf-8 # Copyright (c) 2015-2021 UT-BATTELLE, LLC # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyrigh...
# Convergence diagnostics and model validation import numpy as np from . import Matplot, flib from .utils import autocorr, autocov from copy import copy import pdb try: from statsmodels.regression.linear_model import yule_walker has_sm = True except ImportError: has_sm = False from . import six from .six ...
# Copyright 2019 Google LLC. 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 a...
import logging from collections import OrderedDict from pathlib import Path from typing import Text, Any, List, Dict, Tuple, Union, Iterator, Optional, Callable import rasa.shared.data from rasa.shared.core.domain import Domain from rasa.shared.exceptions import YamlException from rasa.shared.utils import validation f...
# coding:utf8 import tkinter as tk import os import tkinter.ttk import tkinter.filedialog import random from docx import Document from docx.shared import Inches from vulscan import * global output def handlerAdaptor(fun, **kwds): return lambda event, fun=fun, kwds=kwds: fun(event, **kwds) ...
import itertools import fiona.crs import geopandas as gpd import logging import warnings from shapely.ops import unary_union # import internal modules from ost.helpers import vector as vec logger = logging.getLogger(__name__) def _remove_double_entries(inventory_df): """Removing acquisitions that appear twice...
""" Unit tests for trust-region iterative subproblem. To run it in its simplest form:: nosetests test_optimize.py """ from __future__ import division, print_function, absolute_import import numpy as np from scipy.optimize._trustregion_exact import ( estimate_smallest_singular_value, singular_leading_submat...
# <NAME> -- almostimplemented.com # ======================================= # A checkers agent implementaiton based # on Ar<NAME>'s historic program. # # Last updated: July 21, 2014 import sys from functools import reduce # Constants BLACK, WHITE = 0, 1 VALID_SQUARES = 0x7FBFDFEFF INFINITY = sys.maxsize # Feature fu...
import random import time import xyppy.term as term from xyppy.debug import warn from xyppy.six.moves import range # warning: hack filled nonsense follows, since I'm # converting a system that expects full control over # the screen to something that prints linearly in # the terminal def write_char(c, fg_col, bg_col...
import numpy as np from scipy.linalg import eigh class Diffusion: """ Regression weights of kernel Laplacian kernel regularization Notes ----- This implementation has not been optimized in term of memory. Memory scales in O(p^2 nd) while it could scale in O(nd + p^2). Examples -----...
# MegEngine is Licensed under the Apache License, Version 2.0 (the "License") # # Copyright (c) 2014-2020 Megvii Inc. All rights reserved. # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY ...
import clip import sys import torch from torchvision import transforms from torchvision.transforms import functional as TF from torch import nn from torch.nn import functional as F import lpips from PIL import Image import kornia.augmentation as K sys.path.append("./guided-diffusion") from guided_diffusion.script_uti...
""" Holds basic functions to fit a curve to data. """ import gpflow import warnings import tensorflow as tf import tensorflow_probability as tfp import numpy as np from scipy import stats from scipy.optimize import curve_fit from gpflow.ci_utils import ci_niter from tensorflow_probability import distributions as tfd g...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2019 Huawei # GNU General Public License v3.0+ (see COPYING or # https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type #################################################################...
# stdlib import os import types import platform import warnings # stdlib, in support of the the 'probe' method import socket import datetime import time # 3rd-party packages from lxml import etree from ncclient import manager as netconf_ssh import ncclient.transport.errors as NcErrors import ncclient.operations.error...
# -*- coding: utf-8 -*- import datetime import hashlib import logging import urllib from functools import reduce from django.conf import settings from django.contrib.auth.models import AbstractUser, Group from django.db import models from django.urls import reverse from django.utils import timezone from django.utils....
import browser_cookie3 import urllib3 import requests import re import time import random import sys import argparse import colorama from bs4 import BeautifulSoup from pathlib import Path from __banner.banner import banner from __colors__.colors import * from __functions.functions import * from __constants.constants im...
""" This script runs cheXNet training, expects the data to be in the form of raw images. Please update paths to reflect images downloaded from the NIH dataset. """ import tensorflow as tf import os import argparse import pickle import numpy as np from time import time from tensorflow.keras import backend as K from ...
import json import os import pytest import re import subprocess import sys from threadpoolctl import threadpool_limits, threadpool_info, _ThreadpoolInfo from threadpoolctl import _ALL_PREFIXES, _ALL_USER_APIS from .utils import cython_extensions_compiled from .utils import libopenblas_paths from .utils import scipy f...
import warnings with warnings.catch_warnings(): warnings.filterwarnings("ignore", category=FutureWarning) import tensorflow as tf #--------------------------------------------------------------------- # Misc #--------------------------------------------------------------------- def preprocess_img(x): x =...
import string import time from typing import Any, Dict, List, Optional, Tuple, Union from kubernetes import client as kube_client from kubernetes.client.models import ( V1Container, V1Deployment, V1DeploymentSpec, V1EnvVar, V1Job, V1LabelSelector, V1NetworkPolicy, V1NetworkPolicyIngress...
class Line: """ Class to model a lane-line. """ def __init__(self, buffer_len=10): # flag to mark if the line was detected the last iteration self.detected = False # polynomial coefficients fitted on the last iteration self.last_fit_pixel = None self.last_fit_me...
import math from typing import Optional import torch # import torchsearchsorted def img2mse(img_src, img_tgt): return torch.nn.functional.mse_loss(img_src, img_tgt) def mse2psnr(mse): # For numerical stability, avoid a zero mse loss. if mse == 0: mse = 1e-5 return -10.0 * math.log10(mse) ...
#! /usr/bin/env python3 # -*- coding: utf-8 -*- """ Run a YOLOv3/YOLOv2 style detection model on test images. """ import colorsys import os, sys, argparse import cv2 import time from timeit import default_timer as timer import tensorflow as tf import numpy as np from tensorflow.keras import backend as K ...
"""Utility functions for ICA-AROMA.""" import os import os.path as op import shutil import nibabel as nib import numpy as np from nilearn import image, masking def runICA(fsl_dir, in_file, out_dir, mel_dir_in, mask, dim, TR): """Run MELODIC and merge the thresholded ICs into a single 4D nifti file. Paramete...
import os, sys import unittest from uuid import uuid4 import numpy as np from astropy.io import fits from astropy.table import Table from desitarget.targetmask import desi_mask from desispec.resolution import Resolution from desispec.frame import Frame from desispec.fiberflat import FiberFlat from desispec.sky impo...
#!/usr/bin/env python3 """Extend a ttx file with additional data. Takes a ttx file and one or more directories containing image files named after sequences of codepoints, extends the cmap, hmtx, GSUB, and GlyphOrder tables in the source ttx file based on these sequences, and writes out a new ttx file. This can also ...
# Copyright (c) OpenMMLab. All rights reserved. import argparse import os import os.path as osp import time import warnings import torch import deep3dmap.core from deep3dmap.core.utils import Config, DictAction from deep3dmap.core.utils import fuse_conv_bn from deep3dmap.parallel import MMDataParallel, MMDistributedD...
""" OLD MODULE, needs reimplemenetation of select features and deprication This module should handle all things elliptical """ from __future__ import absolute_import, division, print_function from six.moves import zip, range # from numpy.core.umath_tests import matrix_multiply import operator as op import scipy.signal...
# # This source file is part of the EdgeDB open source project. # # Copyright 2008-present MagicStack Inc. and the EdgeDB authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http...
from datetime import datetime from urllib.parse import urlencode from urllib import request from collections import defaultdict, OrderedDict from lxml import etree class OnTracError(Exception): pass class OnTracService(object): TEST_URL = 'https://www.shipontrac.net/OnTracTestWebServices/OnTracServices.svc/V2/{a...
""" Description : This file implements the log key extraction algorithm for log parsing Author : LogPAI team License : MIT """ import math from datetime import datetime from ..logmatch import regexmatch import re import os import sys import pandas as pd import hashlib import numpy as np SAVED...
# coding=UTF-8 # vim: set fileencoding=UTF-8 : ''' DESCRIPTION Tournaments is module of classes for simulating tournaments (tennis, football, hockey, etc.) ''' import math import random class MatchInfoError(LookupError): ''' Error indicates problem, that MatchInfo object is not exists. ''' p...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import division import re import os import logging from pathlib import Path import numpy as np from Chandra.Time import DateTime class NotFoundError(Exception): pass ORBIT_POINTS_DTYPE = [('date', 'U21'), ('name', 'U8'), ...
############################################################################### # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. ############################################################################### im...
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, 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 cop...
import logging import keras.backend as K import numpy as np import tensorflow as tf from keras import optimizers from keras.layers import Input, Dense from keras.layers.merge import concatenate from keras.models import Model from keras.optimizers import SGD from keras.regularizers import l2 from sklearn.utils import c...
# Disable 'not-callable' warnings in this file, which flag all of the calls to # torch.tensor() for reasons that have not yet been discovered. # pylint: disable=not-callable import copy import json import logging import os.path from typing import Any, Dict, List, Tuple import torch from torch.utils.data import Tensor...
"""Drawable objects """ from math import cos, pi, sin from typing import ClassVar, List, Tuple import pyglet from .geometry import Point C3F = Tuple[float, float, float] C4F = Tuple[float, float, float, float] C3I = Tuple[int, int, int] C4I = Tuple[int, int, int, int] class GeoDrawer: """A static class conta...
# SPDX-FileCopyrightText: 2022 <NAME>, written for Adafruit Industries # # SPDX-License-Identifier: Unlicense """ PyPortal winamp displayio widget classes. """ import os import time import json import board import displayio import terminalio from audioio import AudioOut from audiomp3 import MP3Decoder from adafruit_dis...
""" `ymlparsers` and `parser` modules serves as Low-Level API for this module. You may need to install some 3-rd party dependencies, in order to use it, you should have installed first. To do it run `python3 -m pip install alex-ber-utils[yml]` in order to use it. See https://medium.com/analytics-vidhya/my-major-init-...
#!/usr/bin/env python """ MAVProxy checklist, implemented in a child process Created by <NAME> (<EMAIL>) """ class CheckItem(): '''Checklist item used for information transfer between threads/processes/pipes''' def __init__(self, name, state): self.name = name self.state = state clas...
#!/usr/bin/env python # coding: utf-8 # # Supervised sentiment: dense feature representations and neural networks # In[1]: __author__ = "<NAME>" __version__ = "CS224u, Stanford, Spring 2020" # ## Contents # # 1. [Overview](#Overview) # 1. [Set-up](#Set-up) # 1. [Distributed representations as features](#Distribu...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import argparse import os import sys if not os.path.abspath('..') in sys.path: sys.path.append(os.path.abspath('..')) import time import torch from torch.utils.data import DataLoader import torch.nn as nn from collections import defaultdict import train_func_ae a...
""" .. module:: gibson :synopsis: A high-performance XML difference engine for comparing XML pairs, and extracting data from pairs whose text elements are formatted in a specific "mo money" manner. .. moduleauthor:: <NAME> <<EMAIL>> """ import re import logging from dateutil import pars...
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. # -------------------------------------------------------------------------- import functools import io import logging import onnx import onnxruntime...
""" Copyright 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 required by applicable law or agreed to in writing...
"""coBib's configuration. This file contains both, the actual implementation of the `Config` class, as well as the runtime `config` object, which gets exposed on the module level as `cobib.config.config`. Note, that this last link will not point to the correct location in the online documentation due to the nature of ...
import struct import zlib from zlib import crc32 from collections import deque from itertools import cycle from enum import IntEnum class Chunk(): @classmethod def from_buffer(cls, buf): """read a single chunk from the head of the buffer""" new = cls() length = struct.unpack(">I", buf...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # coding=utf8 import asyncio import unittest from collections import defaultdict from copy import de...
# -*- coding: utf-8 -*- import os import pandapower as pp import pytest import numpy as np try: from pandaplan.core import pplog as logging except ImportError: import logging import json logger = logging.getLogger(__name__) testfiles_path = os.path.join(pp.pp_dir, 'test', 'converter', 'testfiles') try: ...
# -*- coding: utf-8 -*- from django.db import models, IntegrityError from django.conf import settings from django.core.exceptions import PermissionDenied from django.contrib import auth from django.contrib.auth.models import Permission from django.contrib.contenttypes.models import ContentType from django.contrib.conte...
#!/usr/bin/env python ############################################################################# ## ## Copyright (C) 2013 Riverbank Computing Limited ## Copyright (C) 2010 <NAME> <<EMAIL>>. ## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ## All rights reserved. ## ## This file is part of the e...
#!/usr/bin/env python3 from collections import namedtuple import numba as nb import numpy as np import awkward as ak import uproot3 from km3io.definitions import reconstruction as krec from km3io.definitions import trigger as ktrg from km3io.definitions import fitparameters as kfit from km3io.definitions import w2list...
#!/usr/bin/env python3 import argparse import collections import csv import datetime import decimal import json import re import shlex import subprocess import sys device_info_re = re.compile(r'^(?P<k>[^:]+?)(?:(?:\sis|):)\s*(?P<v>.*)$') ata_error_count_re = re.compile( r'^Error (\d+) \[\d+\] occurred', re.MULTIL...
""" IMPORTING LIBS """ import dgl import numpy as np import os import socket import time import random import glob import argparse, json import pickle import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.utils.data import DataLoader from tensorboardX imp...
from ast import parse from base64 import standard_b64encode import builtins from importlib.abc import MetaPathFinder, Loader from importlib.machinery import ModuleSpec from importlib.util import find_spec import inspect import io import os import sys import types from pathlib import Path from .code_tracer import trace...
import math import threading from dataclasses import dataclass from typing import List import scipy.linalg.lapack as scll import torch from falkon.utils.cyblas import zero_triang, copy_triang from falkon.cuda.cublas_gpu import * from falkon.cuda.cudart_gpu import cuda_memcpy2d_async from falkon.utils.cuda_helpers imp...
import copy import ipaddress import json import utilities_common.multi_asic as multi_asic_util from sonic_py_common import multi_asic from utilities_common import constants ''' show ip(v6) route helper methods start Helper routines to support print_ip_routes() ''' def get_status_output_char(info, nhp_i): NH_F_I...
import requests import json import sys import numpy as np from Group import Group # python3 migrate_users_and_groups.py.py qa 0000000000000000000000000000000000000000000000000000000000000000 qa 0000000000000000000000000000000000000000000000000000000000000000 def get_groups(env, admin_api_key): api_url = "https:/...
""" model.py - warpper and utility functions for network training Compute loss, back-prop, update parameters, logging, etc. """ import os import time import subprocess import torch import torch.nn as nn import torch.optim as optim from torch.nn import functional as F from model.network import RDE_VOS from model.loss...
import os import sys import subprocess import threading import shutil import zipfile import importlib from flask import Blueprint, g, request, send_file, jsonify, abort, \ url_for, redirect from werkzeug.utils import secure_filename from sqlalchemy import create_engine from database import create_session from de...
#!/usr/bin/env python import sys import math import argparse cssnames = { "black":0x000000, "silver":0xc0c0c0, "gray":0x808080, "white":0xffffff, "maroon":0x800000, "red":0xff0000, "purple":0x800080, "fuchsia":0xff00ff, "green":0x008000, "lime":0x00ff00, "olive":0x808000, ...
import os import logging from django.db import transaction from django.dispatch import receiver from django.core.files.uploadedfile import UploadedFile from django.core.exceptions import ValidationError from hs_core.hydroshare import utils from hs_core.signals import post_create_resource, pre_metadata_element_create,...
import argparse import logging import os import shutil from glob import glob from overrides import overrides from subprocess import Popen, PIPE from typing import Dict, List, Tuple from sacrerouge.commands import MetricSetupSubcommand from sacrerouge.common import DATA_ROOT, TemporaryDirectory from sacrerouge.data imp...
import os, sys, json, uuid, optparse, difflib, platform, subprocess class Registry(): def __init__(self): self.reg = {} self.reg_str = [] # suppose the input file using utf-16 because it's default encoding of regedit exported file self.reg_file_encode = "utf-16" self.regedi...
import copy from typing import Tuple from functools import wraps from collections import defaultdict import idlib from sparcur import schemas as sc from sparcur import exceptions as exc from sparcur import normalization as nml from sparcur.core import log, logd, JPointer, HasErrors from sparcur.utils import register_ty...
import os import numpy as np import numpy.random as npr from scipy import sparse from datetime import date, timedelta from neymanscott.background import NodeAndTimeAndMarkBackground, UniformTimeBackground, MultinomialBackground from neymanscott.clusters import NodeAndTimeAndMarkCluster, ExponentialTimeCluster, Multino...
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distri...
# -*- coding: utf-8 -*- """A module adding additional functionality to owlready2. The main additions includes: - Visualisation of taxonomy and ontology as graphs (using pydot, see ontograph.py). The class extension is defined within. If desirable some of this may be moved back into owlready2. """ import sys imp...
""".. Ignore pydocstyle D400. =================== Resolwe Test Runner =================== """ import asyncio import contextlib import copy import logging import os import re import subprocess import sys from unittest.mock import patch import yaml import zmq import zmq.asyncio from channels.db import database_sync_to...
"""Utilities for fast persistence of big data, with optional compression.""" # Author: <NAME> <gael dot varoquaux at normalesup dot org> # Copyright (c) 2009 <NAME> # License: BSD Style, 3 clauses. import pickle import sys import io import zlib import gzip import warnings import contextlib from contextlib import clos...
# # Copyright Sonrai Security All Rights Reserved. # SPDX-License-Identifier: MIT-0 # # 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 rig...
# -*- coding: utf-8 -*- """ tests.urls ~~~~~~~~~~ URL helper tests. :copyright: 2007 Pallets :license: BSD-3-Clause """ import pytest from . import strict_eq from werkzeug import urls from werkzeug._compat import BytesIO from werkzeug._compat import NativeStringIO from werkzeug._compat import tex...
#!/usr/bin/env python3 # # variables.py r""" Documenter for module level variables, similar to :rst:dir:`autodata` but with a different appearance and more customisation options. .. versionadded:: 0.6.0 .. extensions:: sphinx_toolbox.more_autodoc.variables .. versionchanged:: 0.7.0 Added ``*AttributeDocumenter``\s ....
""" Copyright 2017 The Johns Hopkins University Applied Physics Laboratory LLC and <NAME> 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/license...
from typing import Callable import webbrowser import bpy from bpy.props import BoolProperty, StringProperty import arm.logicnode.arm_nodes as arm_nodes import arm.logicnode.replacement import arm.logicnode import arm.props_traits import arm.ui_icons as ui_icons import arm.utils if arm.is_reload(__name__): arm_no...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
#!/usr/bin/python3 import json import configparser import logging import sys import os import magic from enum import Enum from json.decoder import JSONDecodeError from keyman_config import secure_lookup class KMFileTypes(Enum): KM_ICON = 1 KM_SOURCE = 2 KM_OSK_SOURCE = 3 KM_KMX = 4 KM_OSK = 5 ...
# Title: AWG - Akemi's Word Game # Author: <NAME> # Date: June 13, 2015 # Files: AWG_App_py2.py; SINGLE.TXT (dictionary words file) # Tested: python 2.61 # Info: Akemi's Word Game: The game where you try and guess the computer's randomly # selected word! Each letter appears only once. import sys import ...