gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# # 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, software # ...
# # Copyright (c) 2008-2015 Citrix Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
#!/usr/bin/env python3 # # Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. # # A script to kill hanging process. The tool will return non-zero if any # proc...
import datetime import decimal import itertools import re import time import urllib2 import urlparse import uuid import warnings from operator import itemgetter import gridfs from bson import Binary, DBRef, SON, ObjectId from mongoengine.python_support import (PY3, bin_type, txt_type, ...
# coding: utf-8 from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import six import unittest2 import warnings import httpretty as hp from coinbase.wallet.client import Client from coinbase.wallet.model import APIObject...
#!/usr/bin/python # -*- coding: utf-8 -*- """ Created on Wed Dec 17 15:08:14 2014 @author: bottero Script to watch the results of a run. TODO : _load prior profiles as well _ """ ### --- MODULES AND PACKAGES --- ### import os, sys import argparse # To deal with arguments : # https://docs.python.org/2/library...
from twilio.jwt.access_token import AccessTokenGrant import warnings import functools def deprecated(func): '''This is a decorator which can be used to mark functions as deprecated. It will result in a warning being emitted when the function is used.''' @functools.wraps(func) def new_func(*args, ...
#!/usr/bin/env python from __future__ import unicode_literals """ Copyright (C) 2012 Legoktm 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 r...
# -*- coding: utf-8 -*- u""" Make canvasNode into static one. Read input/output port into static attributes. """ import sys import textwrap import maya.api.OpenMaya as api import maya.OpenMaya as oldapi import maya.cmds as cmds import FabricEngine.Core import kraken.plugins.maya_plugin.conversion as conv # ==========...
import logging import subprocess import sys import os import shutil import binascii import time from tkinter import Tk, messagebox, Frame, Label, Entry, Button, Listbox, Scrollbar, Spinbox, END, DISABLED, StringVar, VERTICAL, NORMAL from providers.scriptedFileSearch import ScriptedFileSearch from wrappers.cardScanWra...
""" test class for zigzi """ from PEInstrument import * from keystone import * from PEManager import * from capstone.x86 import * import os import unittest # code_mnemonic = "and" # code_op_str = "dx, 0xffff" code_mnemonic = "and" code_op_str = "edx, 0x7fffffff" code = code_mnemonic + " " + code_op_str def instru...
from __future__ import absolute_import import re import json import hashlib from uuid import UUID, uuid4 from ast import literal_eval from time import sleep from subprocess import Popen, PIPE from logging import getLogger from six import string_types from celery import states from celery.app.control import flatten_rep...
""" Perceptron w = w + N * (d(k) - y) * x(k) Using perceptron network for oil analysis, with Measuring of 3 parameters that represent chemical characteristics we can classify the oil, in p1 or p2 p1 = -1 p2 = 1 """ import random class Perceptron: def __init__( self, sample...
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2016 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
# Authors: Daichi Yoshikawa <daichi.yoshikawa@gmail.com> # License: BSD 3 clause import operator from collections.abc import Iterable from functools import reduce import numpy as np import cupy as cp def prod(x): if isinstance(x, Iterable): return reduce(operator.mul, x, 1) else: return x ...
# dataset/table/_SUCCESS # 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 ...
# -*- coding: utf-8 -*- import hashlib import libtorrent as lt import logging from threading import Timer, Event import os import time from p2c.exceptions import SessionNotBindedException, TorrentHasNotMetadataYet import settings from torrent.movie import Movie SOURCE_TYPES = ("MAGNET", "TORRENT") logger = logging.ge...
# Licensed under a 3-clause BSD style license - see LICENSE.rst # TEST_UNICODE_LITERALS import os import copy from itertools import chain import numpy as np from ....extern.six.moves import cStringIO as StringIO from ... import ascii from .... import table from ....table.table_helpers import simple_table from ....te...
# Copyright 2013 Cloudbase Solutions Srl # 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 r...
import calendar import datetime as dt import inspect import re import time from collections import defaultdict from contextlib import contextmanager from types import FunctionType import param import bokeh import numpy as np from bokeh.core.json_encoder import serialize_json # noqa (API import) from bokeh.core.valid...
from __future__ import print_function import os import sys import math import numpy as np import flopy.modflow as mf import flopy.mt3d as mt3 import flopy.seawat as swt import flopy.utils as fu import matplotlib.pyplot as plt # --modify default matplotlib settings updates = {'font.family':['Univers 57 Condensed', ...
from common_fixtures import * # NOQA from cattle import ApiError import yaml RESOURCE_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'resources/certs') @pytest.fixture(scope='module') def image_uuid(context): return context.image_uuid def test_create_env_and_svc(c...
# Copyright 2012 Michael Still and Canonical 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 # # ...
# Copyright 2020 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import logging import re import pytest from pants.core.util_rules.external_tool import ( ExternalTool, ExternalToolError, ExternalToolRequest, TemplatedExternalTool, ...
########################################################################## # # Copyright (c) 2011-2012, John Haddon. All rights reserved. # Copyright (c) 2011-2014, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted prov...
from insights.core.spec_factory import SpecSet, RegistryPoint class Specs(SpecSet): abrt_ccpp_conf = RegistryPoint(filterable=True) abrt_status_bare = RegistryPoint() alternatives_display_python = RegistryPoint() amq_broker = RegistryPoint(multi_output=True) ansible_host = RegistryPoint() audi...
""" General Utilities (part of web.py) """ __all__ = [ "Storage", "storage", "storify", "iters", "rstrips", "lstrips", "strips", "TimeoutError", "timelimit", "Memoize", "memoize", "re_compile", "re_subm", "group", "IterBetter", "iterbetter", "dictreverse", "dictfind", "dictfindall", "dictincr", "d...
from copy import deepcopy from functools import wraps from django.core.exceptions import FieldError from django.db import models from django.db.models.fields.files import FileDescriptor from django.db.models.query_utils import DeferredAttribute class DescriptorMixin: tracker_instance = None def __get__(self...
# -*- coding: utf-8 -*- """ kombu.async.timer ================= Timer scheduling Python callbacks. """ from __future__ import absolute_import import heapq import sys from collections import namedtuple from datetime import datetime from functools import wraps from time import time from weakref import proxy as weakre...
# -*- coding: utf-8 -*- """ Python Markdown A Python implementation of John Gruber's Markdown. Documentation: https://python-markdown.github.io/ GitHub: https://github.com/Python-Markdown/markdown/ PyPI: https://pypi.org/project/Markdown/ Started by Manfred Stienstra (http://www.dwerg.net/). Maintained for a few yea...
from common import * # NOQA from cattle import ApiError SERVICE_KIND = 'kubernetesService' def from_context(context): return context.client, context.agent_client, context.host def test_bad_agent(super_client, new_context): _, account, agent_client = register_simulated_host(new_context, ...
# # Copyright (c) 2011-2014 Exxeleron GmbH # # 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 agre...
# # Copyright (C) 2014 Dell, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
""" Plots Arctic daily sea ice extent from June 2002-present using JAXA metadata Website : https://ads.nipr.ac.jp/vishop/vishop-extent.html Author : Zachary M. Labe Date : 15 May 2016 """ ### Import modules import numpy as np import matplotlib.pyplot as plt import matplotlib import datetime import urllib.re...
"""Tests for vumi.persist.txriak_manager.""" from twisted.internet.defer import inlineCallbacks from vumi.persist.model import Manager from vumi.tests.helpers import VumiTestCase, import_skip class DummyModel(object): bucket = "dummy_model" VERSION = None MIGRATORS = None def __init__(self, manag...
""" Array methods which are called by both the C-code for the method and the Python code for the NumPy-namespace function """ import warnings from contextlib import nullcontext from numpy.core import multiarray as mu from numpy.core import umath as um from numpy.core._asarray import asanyarray from numpy.core import ...
# Copyright (c) 2017 Ansible Project # 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 DOCUMENTATION = """ name: gcp_compute plugin_type: inventory short_description: Google Cl...
import random try: from urllib.parse import urlparse, parse_qs except ImportError: from urlparse import urlparse, parse_qs import warnings import json from django.test.utils import override_settings from django.test import TestCase from django.core.urlresolvers import reverse from django.contrib.sites.models i...
""" Functions which are common and require SciPy Base and Level 1 SciPy (special, linalg) """ from __future__ import division, print_function, absolute_import import numpy import numpy as np from numpy import (exp, log, asarray, arange, newaxis, hstack, product, array, zeros, eye, poly1d, r_, sum, ...
"""Support for Tuya number.""" from __future__ import annotations from tuya_iot import TuyaDevice, TuyaDeviceManager from homeassistant.components.number import NumberEntity, NumberEntityDescription from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant, callback from homeas...
# stdlib import collections import logging import pprint import socket import sys import time # project from checks import AGENT_METRICS_CHECK_NAME, AgentCheck, create_service_check from checks.check_status import ( CheckStatus, CollectorStatus, EmitterStatus, STATUS_ERROR, STATUS_OK, ) from checks...
''' Carousel ======== .. versionadded:: 1.4.0 The :class:`Carousel` widget provides the classic mobile-friendly carousel view where you can swipe between slides. You can add any content to the carousel and have it move horizontally or vertically. The carousel can display pages in loop or not. Example:: from kiv...
import struct import numpy as np from datasketch import MinHash class LeanMinHash(MinHash): '''Lean MinHash is MinHash with a smaller memory footprint and faster deserialization, but with its internal state frozen -- no `update()`. Lean MinHash inherits all methods from :class:`datasketch.MinHash`. ...
# Copyright (c) 2013 - 2019 Adam Caudill and Contributors. # This file is part of YAWAST which is released under the MIT license. # See the LICENSE file or go to https://yawast.org/license/ for full license details. import secrets from difflib import SequenceMatcher from http import cookiejar from multiprocessing i...
import pyfits import traceback from IPython.display import HTML, display import matplotlib.pyplot as plt import radiopadre import radiopadre.file from radiopadre.render import render_title, render_table class FITSFile(radiopadre.file.FileBase): FITSAxisLabels = dict(STOKES=["I", "Q", "U", "V", "YX", "XY", "YY", ...
# # Copyright 2015 Quantopian, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
# coding=utf-8 # Copyright 2022 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2019, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
""" 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 use this ...
import asyncio import logging import os import aiohttp.web from aiohttp.web_exceptions import HTTPBadRequest, HTTPConflict, HTTPNoContent from aiohttp.web_fileresponse import FileResponse from sqlalchemy import exc, select from sqlalchemy.ext.asyncio import AsyncSession import virtool.jobs.db import virtool.pg.utils ...
"""The tests for the Tasmota binary sensor platform.""" import copy from datetime import timedelta import json from unittest.mock import patch from hatasmota.utils import ( get_topic_stat_result, get_topic_stat_status, get_topic_tele_sensor, get_topic_tele_will, ) from homeassistant.components import ...
"""The tests for the Template automation.""" from datetime import timedelta from unittest import mock import pytest from homeassistant.core import Context from homeassistant.setup import async_setup_component import homeassistant.util.dt as dt_util import homeassistant.components.automation as automation from tests....
# -*- coding: utf-8 -*- # Copyright 2016 upvm Contributors (see CONTRIBUTORS.md file in source) # License: Apache License 2.0 (see LICENSE file in source) # Modules from standard library from __future__ import print_function import subprocess import os import tempfile from sys import exit import pwd, grp import json f...
__author__ = 'Tomasz J. Kotarba <tomasz@kotarba.net>' __copyright__ = 'Copyright (c) 2014, Tomasz J. Kotarba. All rights reserved.' from django.test import TestCase from fm.models import Area from fm.models import Facility from fm.models import Contact from fm.models import Role class AreaModelTest(TestCase): d...
#!/usr/bin/python # # Copyright (c) 2011 The Bitcoin developers # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # import time import json import pprint import hashlib import struct import re import base64 import httplib import...
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import hashlib impor...
# 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, software # d...
from __future__ import unicode_literals import datetime from django.core.exceptions import ImproperlyConfigured from django.test import TestCase, override_settings, skipUnlessDBFeature from django.test.utils import requires_tz_support from django.utils import timezone from .models import Book, BookSigning def _mak...
#!/usr/bin/python # @lint-avoid-python-3-compatibility-imports # # execsnoop Trace new processes via exec() syscalls. # For Linux, uses BCC, eBPF. Embedded C. # # USAGE: execsnoop [-h] [-t] [-x] [-n NAME] # # This currently will print up to a maximum of 19 arguments, plus the process # name, so 20 fields in t...
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
from collections import namedtuple import os import os.path as path import gzip import json import socket import sys import urllib2 from nflgame import OrderedDict import nflgame.player import nflgame.schedule import nflgame.seq import nflgame.statmap _MAX_INT = sys.maxint _jsonf = path.join(path.split(__file__)[0],...
from string import ascii_lowercase import numpy as np import pytest from pandas.compat import product as cart_product from pandas.errors import UnsupportedFunctionCall import pandas as pd from pandas import ( DataFrame, Index, MultiIndex, Series, Timestamp, compat, date_range, isna) import pandas.core.nanops as ...
""" dialogs for ErMagicBuilder """ # pylint: disable=W0612,C0111,C0103,W0201,C0301 import wx import wx.grid import numpy as np from pmagpy import contribution_builder as cb from . import pmag_widgets as pw from . import grid_frame3 class ErMagicCheckFrame3(wx.Frame): def __init__(self, parent, title, WD, contr...
from os import path import json import unittest from unittest import TestCase from mock import MagicMock, patch, call from slap.publisher import Publisher class TestMapServicePublisher(TestCase): def setUp(self): config = { 'agsUrl': 'my/server', 'mapServices': { '...
# Lint as: python2, python3 # Copyright 2018 The TensorFlow 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 # ...
from valueDict import ValueDict from handEvaluator import evalHand from decimal import * import cardsDict from math import exp, tanh, log10, log, pow, sqrt, fabs, copysign from util import hypGeoProb, multiHypGeoProb from operator import mul from numpy import zeros, count_nonzero, prod from scipy import special from c...
import locale import os import os.path import re from contextlib import suppress from copy import copy from datetime import date, datetime, time from typing import TYPE_CHECKING, Any, AnyStr, List, Mapping, Optional, Type, Union, cast from unicodedata import normalize import jinja2.filters from dateutil import parser ...
# -*- coding: utf-8 -*- # -------------------------------------------------------------------------- # # OpenERP, Open Source Management Solution # Copyright (C) 2012-Today Serpent Consulting Services PVT. LTD. # (<http://www.serpentcs.com>) # # This program is free software: you can redistribute it and/or ...
# coding=utf-8 # Copyright 2022 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
import sys import unittest import numpy from chainer import cuda from chainer import testing from chainer.testing import attr from chainer.utils import type_check as T class TestConstant(unittest.TestCase): def setUp(self): self.x = T.Constant(10) def test_str(self): self.assertEqual('10',...
# -*- coding: utf-8 -*- import pytest import os from requester.parser import ( ResponseParser, RequestParser, RequestFileParser ) class Teardown(object): def remove_temp_file(self, temporary_request_file): try: os.remove(temporary_request_file) except OSError, e: pri...
# -*- coding: utf-8 -*- """ unit test for mds """ import ConfigParser as configparser import logging import eventlet from nose.tools import eq_ from simplecfs.mds.server import MDSServer from simplecfs.common.parameters import * # NOQA from simplecfs.message.packet import MakeDirPacket, RemoveDirPacket,\ ListDirP...
"""Support for the (unofficial) Tado API.""" import asyncio from datetime import timedelta import logging from PyTado.interface import Tado from requests import RequestException import requests.exceptions import voluptuous as vol from homeassistant.components.climate.const import PRESET_AWAY, PRESET_HOME from homeass...
#!/usr/bin/env python3 # coding=utf-8 """ Integration tests for the complete framework This file automatically discovers all Compiler subclasses in 'plugins/${package}/tests/*' and runs all programs against them and their declared plugins concurrently. """ from contextlib import suppress import importlib import logg...
#!/usr/bin/env python """ 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");...
import json from django.contrib.postgres import lookups from django.contrib.postgres.forms import SimpleArrayField from django.contrib.postgres.validators import ArrayMaxLengthValidator from django.core import checks, exceptions from django.db.models import Field, IntegerField, Transform from django.utils import six f...
import textwrap import unittest from collections import OrderedDict from parameterized import parameterized from conans.paths import CONANFILE from conans.test.utils.tools import NO_SETTINGS_PACKAGE_ID, TestClient, TestServer, \ inc_package_manifest_timestamp, inc_recipe_manifest_timestamp class VersionRangesUp...
#!/usr/bin/env python # Copyright 2014 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. """Tools to control application running via dev_appserver.py. Useful for smoke and integration tests. """ # pylint: disabl...
import functools from framework.auth import Auth from website.archiver import ( StatResult, AggregateStatResult, ARCHIVER_NETWORK_ERROR, ARCHIVER_SIZE_EXCEEDED, ARCHIVER_FILE_NOT_FOUND, ) from website.archiver.model import ArchiveJob from website import ( mails, settings ) def send_archiver_...
# Copyright 2016 The TensorFlow 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 applica...
# Copyright 2017 The TensorFlow 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 applica...
""" Container for functions that work with HDF5 genotype/phenotype datasets. (Usually useful for analysing human data.) """ import h5py import scipy as sp import sys import linear_models as lm import analyze_gwas_results as agr import time import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt def c...
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import os import ctypes import platform import cgi console_encoding = sys.getfilesystemencoding() class print_style: version = "1.0.2.0" engine = None theme = None FC_BLACK = 0 FC_BLUE = 1 FC_GREEN = 2 FC_CYAN = 3 FC_RED = 4 ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import json import unittest from pyowm.airpollutionapi30 import airpollution_client, airpollution_manager, coindex, so2index, ozone, no2index, airstatus from pyowm.config import DEFAULT_CONFIG from pyowm.constants import AIRPOLLUTION_API_VERSION from pyowm.utils import tim...
# -*- coding: utf-8 -*- """ theflasktest.testsuite.testing ~~~~~~~~~~~~~~~~~~~~~~~ Test client and more. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import flask import unittest from flask.testsuite import FlaskTestCase from flask._compat import text_t...
""" This contains evaluation functions for expressions They get bound as instances-methods to the CompValue objects from parserutils using setEvalFn """ import sys import re import math import random import uuid import hashlib import urllib2 from decimal import Decimal, ROUND_HALF_UP, InvalidOperation import opera...
# Copyright 2016 The TensorFlow 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 applica...
"""Support for Acrobat Forms in ReportLab documents This module is somewhat experimental at this time. Includes basic support for textfields, select fields (drop down lists), and check buttons. The public interface consists of functions at the moment. At some later date these operations may be made into...
## CSC320 Winter 2016 ## Assignment 2 ## (c) Kyros Kutulakos ## ## DISTRIBUTION OF THIS CODE ANY FORM (ELECTRONIC OR OTHERWISE, ## AS-IS, MODIFIED OR IN PART), WITHOUT PRIOR WRITTEN AUTHORIZATION ## BY THE INSTRUCTOR IS STRICTLY PROHIBITED. VIOLATION OF THIS ## POLICY WILL BE CONSIDERED AN ACT OF ACADEMIC DISHONESTY...
from __future__ import print_function import os import glob import json import logging import datetime from time import time from collections import defaultdict from billy.core import settings, db from billy.utils import (metadata, term_for_session, fix_bill_id, JSONEncoderPlus) from billy.imp...
# -*- coding: utf-8 -*- import argparse import os import pydoc import re import subprocess import sys import uuid import webbrowser from builtins import input from django.utils.termcolors import colorize import requests from six import string_types def r(msg): return colorize(msg, fg="red") def g(msg): r...
# Testing the line trace facility. from test import test_support import unittest import sys import difflib import gc # A very basic example. If this fails, we're in deep trouble. def basic(): return 1 basic.events = [(0, 'call'), (1, 'line'), (1, 'return')] # Many of the tests b...
from flask import abort, current_app from notifications_utils.serialised_model import SerialisedModelCollection from werkzeug.utils import cached_property from app.models import JSONModel, SortByNameMixin from app.models.contact_list import ContactLists from app.models.job import ( ImmediateJobs, PaginatedJobs...
# -*- coding: utf-8 -*- # 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, software...
# -*- coding: utf-8 -*- # # 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 #...
import numpy as np import scipy.sparse as sp import pytest from sklearn.utils._testing import assert_array_almost_equal from sklearn.utils._testing import assert_array_equal from sklearn.utils._testing import assert_almost_equal from sklearn.utils._testing import assert_raises from sklearn.base import ClassifierMixi...
""" This module defines a basis of operators for the Standar Model effective lagrangian up to dimension 6. The basis is the one in arXiv:1412.8480v2_. .. _arXiv:1412.8480v2: https://arxiv.org/abs/1412.8480v2. """ from fractions import Fraction from matchingtools.core import ( tensor_op, flavor_tensor_op, D, O...
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: # # Copyright 2021 The NiPreps Developers <nipreps@gmail.com> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may...
#!/usr/bin/python # -*- coding: latin-1 -*- import os import shutil import glob import string from bs4 import BeautifulSoup from characters import CHARS from vertical import VERTICAL_OFFSET SVG_PATH = "svg" OUT_PATH = "font" OUT_NAME = ".txt" if os.path.exists( SVG_PATH ): shutil.rmtree( SVG_PATH ) os.mkdir( SVG...
#!/usr/bin/env python # Copyright 2018, 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 ag...