gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# Copyright (c) 2010-2012 OpenStack Foundation # # 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 agree...
import sys import logging from urllib2 import Request, urlopen, HTTPError from urlparse import urlparse from email.utils import formatdate import PyV8, w3c import BeautifulSoup class Navigator(PyV8.JSClass): log = logging.getLogger("navigator.base") def __init__(self, win=None): self._win = win ...
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import platform import stat import unittest from telemetry import decorators from telemetry.internal.platform.tracing_agent import chrome_tracing_a...
from datetime import datetime from app import app from app.authentication import with_login from flask import Blueprint, jsonify, request, Response from app.generate_csv import generate_csv_clean from app.msol_util import get_next_update_estimation_message_aws from app.es.awsmetric import AWSMetric from app.es.awsstat ...
# -*- coding: utf-8 -*- from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListTy...
"""Diff processing and filtering logic.""" import re from reviewboard.diffviewer.diffutils import (get_diff_data_chunks_info, split_line_endings) from reviewboard.diffviewer.features import filter_interdiffs_v2_feature #: Regex for matching a diff chunk line. #: #: Depr...
try: from AG_fft_tools import correlate2d,fast_ffts from AG_fft_tools import dftups,upsample_image,shift except ImportError: from image_registration.fft_tools import correlate2d,fast_ffts from image_registration.fft_tools import dftups,upsample_image,shift import warnings import numpy as np __all__ = ...
# Python Tools for Visual Studio # Copyright(c) Microsoft 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 at http://www.apache.org/licenses/LICENSE-2.0 # # THIS ...
PING_WAIT = 300 # Seconds PING_MIN_WAIT = 30 MINIMUM_WAIT = 60 EXTRA_WAIT = 20 MAXIMUM_WAITED = 2 # limit for amount of !wait's STATS_RATE_LIMIT = 15 VOTES_RATE_LIMIT = 15 ADMINS_RATE_LIMIT = 300 SHOTS_MULTIPLIER = .12 # ceil(shots_multiplier * len_players) = bullets given MAX_PLAYERS = 30 DRUNK_SHOTS_MULTIPLIER = ...
"Test the functionality of Python classes implementing operators." import unittest from test import support testmeths = [ # Binary operations "add", "radd", "sub", "rsub", "mul", "rmul", "truediv", "rtruediv", "mod", "rmod", "divmod", "rdivmod", "pow", "rpow",...
# -*- coding: utf-8 -*- # # Copyright 2015-2020 BigML # # 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 ...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
data = ( 'Kay ', # 0x00 'Kayng ', # 0x01 'Ke ', # 0x02 'Ko ', # 0x03 'Kol ', # 0x04 'Koc ', # 0x05 'Kwi ', # 0x06 'Kwi ', # 0x07 'Kyun ', # 0x08 'Kul ', # 0x09 'Kum ', # 0x0a 'Na ', # 0x0b 'Na ', # 0x0c 'Na ', # 0x0d 'La ', # 0x0e 'Na ', # 0x0f 'Na ', # 0x10 'Na ', ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Justin Santa Barbara # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may #...
# -*- coding: utf-8 -*- # This technical data was produced for the U. S. Government under Contract No. W15P7T-13-C-F600, and # is subject to the Rights in Technical Data-Noncommercial Items clause at DFARS 252.227-7014 (FEB 2012) import os import sys import time from paver.easy import * from paver.setuputils import s...
# Copyright 2012 OpenStack Foundation. # 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 requ...
from nose.tools import assert_almost_equal, assert_raises from mapproxy_webconf import defaults from mapproxy_webconf.lib.geojson import ConfigGeoJSONGrid, polygons, \ point_feature, polygon_feature, features, \ InvalidGridBBoxTransformationException, InvalidTileBBoxTransformationException GLOBAL_BBOX_4326 = ...
"""I/O helper functions for pylinac.""" import os import os.path as osp import struct import zipfile from tempfile import TemporaryDirectory from typing import Callable, List, Tuple from urllib.error import HTTPError, URLError from urllib.request import urlretrieve, urlopen import numpy as np import pydicom from tqdm ...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'FormBlock' db.create_table(u'fancypages_formblock', ( ...
from __future__ import absolute_import, division, print_function, with_statement import traceback from tornado.concurrent import Future from tornado import gen from tornado.httpclient import HTTPError, HTTPRequest from tornado.log import gen_log, app_log from tornado.testing import AsyncHTTPTestCase, gen_test, bind_u...
# -*- coding: utf-8 -*- """ werkzeug.contrib.atom ~~~~~~~~~~~~~~~~~~~~~ This module provides a class called :class:`AtomFeed` which can be used to generate feeds in the Atom syndication format (see :rfc:`4287`). Example:: def atom_feed(request): feed = AtomFeed("My Blog", feed...
#!/usr/bin/env python """Replace the old Makefile system for testing and installing """ import os import sys from PDielec.preader import main as main_preader from PDielec.pdgui import main as main_pdgui from PDielec.checkcsv import main as main_checkcsv from PDielec.checkexcel import main as main_checkex...
"""Tests for the seqls script (seqparse.cli.seqls).""" # "Future" Libraries from __future__ import print_function # Standard Libraries import copy import os import shlex import time import unittest # Third Party Libraries import mock from builtins import range from . import (DirEntry, generate_entries, initialise_m...
# The MIT License # # Copyright (c) 2015 Scriber (http://scriber.io) # Copyright (c) 2010-2011 Stripe (http://stripe.com) # # 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...
import yaml import socket import argparse import datetime import setproctitle import gevent import gevent.hub import signal import subprocess import powerpool import time import logging import sys from gevent_helpers import BlockingDetector from gevent import sleep from gevent.monkey import patch_all from gevent.serve...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'ArtefactRepresentation.photographer' db.add_column('mediaman_artefactrepresentation', 'photo...
#!/usr/bin/env python import numpy as np from astropy.io import fits import os def logHeader(logfilename): # adds a header to a log file logfile = open(logfilename, 'w') logfile.write('# filename tile ob ra dec mjdobs expTime airmass seeing_prhdu seeing_median esograde ext1count ext2count ext3count ext4count ext5...
# BridgeDB by Nick Mathewson. # Copyright (c) 2007-2009, The Tor Project, Inc. # See LICENSE for licensing information """ This module has low-level functionality for parsing bridges and arranging them in rings. """ import binascii import bisect import hmac import logging import re import sha import socket import tim...
#!/usr/bin/env python # # Copyright 2017 Google 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 o...
# Copyright 2012 OpenStack Foundation # 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 requ...
# Copyright 2011 Grid Dynamics # Copyright 2011 OpenStack Foundation # 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...
# Natural Language Toolkit: Decision Tree Classifiers # # Copyright (C) 2001-2011 NLTK Project # Author: Edward Loper <edloper@gradient.cis.upenn.edu> # URL: <http://www.nltk.org/> # For license information, see LICENSE.TXT # # $Id: naivebayes.py 2063 2004-07-17 21:02:24Z edloper $ """ A classifier model that decides ...
import os from peewee import * from peewee import sqlite3 from playhouse.sqlite_ext import CYTHON_SQLITE_EXTENSIONS from playhouse.sqlite_ext import * from playhouse._sqlite_ext import BloomFilter from .base import BaseTestCase from .base import DatabaseTestCase from .base import db_loader from .base import skip_unle...
#!/usr/bin/env python # -*- coding: utf-8 -*- from vocabulary.vocabulary import Vocabulary as vb from vocabulary.responselib import Response as rp import unittest import sys try: import simplejson as json except ImportError: import json try: from unittest import mock except Exception as e: import mock...
# -*- coding: utf-8 -*- from kivy.lang import Builder from kivy.uix.modalview import ModalView from kivymd.label import MDLabel from kivymd.theming import ThemableBehavior from kivy.uix.floatlayout import FloatLayout from kivymd.elevationbehavior import ElevationBehavior import calendar from datetime import date import...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Feb 27 12:40:48 2018 @author: BallBlueMeercat """ import matplotlib.pyplot as plt import numpy as np import os import time from results import load def stat(hue, var, var_true, var_name, slnprob, zpicks, mag, sigma, nsteps, nwalkers, sa...
import distutils import logging import os import time from shlex import quote from ray import services from ray.tune.cluster_info import get_ssh_key, get_ssh_user from ray.tune.sync_client import (CommandBasedClient, get_sync_client, get_cloud_sync_client, NOOP) logger = logging.get...
"""Support for AlarmDecoder devices.""" from datetime import timedelta import logging from adext import AdExt from alarmdecoder.devices import SerialDevice, SocketDevice, USBDevice from alarmdecoder.util import NoDeviceError import voluptuous as vol from homeassistant.components.binary_sensor import DEVICE_CLASSES_SC...
# -*- mode: python; coding: utf-8 -*- # Copyright 2019 the HERA Collaboration # Licensed under the 2-clause BSD license. from sqlalchemy import Column, Integer, String import sqlalchemy from sqlalchemy.ext.declarative import declarative_base, declared_attr from sqlalchemy.ext.hybrid import hybrid_property from sqlalch...
from pandac.PandaModules import * from toontown.toonbase.ToonBaseGlobal import * from toontown.toonbase.ToontownGlobals import GlobalDialogColor from DistributedMinigame import * from direct.fsm import ClassicFSM, State from direct.fsm import State from toontown.toonbase import TTLocalizer from toontown.toonbase import...
# 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...
# # 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) 2010 Google Inc. 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 conditions and the f...
#!/usr/bin/python # -*- coding: utf-8 -*- import datetime import hashlib import random import uuid from action import base_manager from bottle import redirect from entity import user as user_entity from helper import hint from helper import translator from helper import url class UserManager(base_manager.BaseManager...
# External Module Dependencies from xml.dom import minidom import re from time import time as current_time import os # Internal Module Dependencies from misc4rings import isCCW, closestColor, isApproxClosedPath from andysmod import format_time, Radius, consecutive_pairs from andysSVGpathTools import polylineStr2pathSt...
""" Basically a parser that is faster, because it tries to parse only parts and if anything changes, it only reparses the changed parts. But because it's not finished (and still not working as I want), I won't document it any further. """ import re from jedi._compatibility import use_metaclass from jedi import setting...
# file openpyxl/writer/straight_worksheet.py # Copyright (c) 2010 openpyxl # # 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...
r""" This paver file is intended to help with the release process as much as possible. It relies on virtualenv to generate 'bootstrap' environments as independent from the user system as possible (e.g. to make sure the sphinx doc is built against the built numpy, not an installed one). Building changelog + notes =====...
#!/usr/bin/env python2.6 # -*- coding: utf-8 -*- """ Open and modify Microsoft Word 2007 docx files (called 'OpenXML' and 'Office OpenXML' by Microsoft) Part of Python's docx module - http://github.com/mikemaccana/python-docx See LICENSE for licensing information. """ import logging from lxml import etree try: fr...
# -*- coding:utf-8 -*- # # Copyright 2014 Hewlett-Packard Development Company, L.P. # Copyright 2015 Nebula, 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.or...
# -*- coding: utf-8 -*- """Tests for multiset methods in module pymsetmath Test specification ------------------ - test internal methods - test i/o arguments - test math - test functionality :Author: Hy Carrinski """ from decimal import Decimal import math import random import unittest from...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'LogicalGroup.owner' db.add_column(u'ddsc_core_logicalgroup', 'owner', ...
from panda3d.core import * from panda3d.direct import * from toontown.toonbase.ToonBaseGlobal import * from direct.interval.IntervalGlobal import * from direct.task import Task from direct.directnotify import DirectNotifyGlobal from math import * from direct.distributed.ClockDelta import * from toontown.golf import Gol...
# -*- coding: utf-8 -*- import pytest from punch import version_part as vpart def test_integer_version_part_init_with_integer(): vp = vpart.IntegerVersionPart('major', 4) assert vp.value == 4 def test_integer_version_part_init_with_string(): vp = vpart.IntegerVersionPart('major', '4') assert vp.va...
#!/usr/bin/python # # Generate a list of built-in strings required by Duktape code, output # duk_strings.h (defines) and duk_strings.c (string data). Raw string # data is also written to duk_strings.bin. # # These strings may be required by execution and/or compilation, or # built-in code. Strings are included h...
#!/usr/bin/env python """Widgets to load and run opscore.actor.ScriptRunner scripts. ScriptModuleWdg loads a script from a specified module. ScriptFileWdg loads a script from a python source file (i.e. a module, but one that need not be on the python path) History: 2010-02-17 ROwen Adapted from RO.Wdg.ScriptWdg....
from datetime import datetime from .base import MarathonResource, MarathonObject, assert_valid_path from .constraint import MarathonConstraint from .container import MarathonContainer from .deployment import MarathonDeployment from .task import MarathonTask class MarathonApp(MarathonResource): """Marathon Appli...
# coding=utf-8 # Copyright 2018 The Tensor2Tensor 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 applicable...
import re from collections import defaultdict from adder import utils from adder import problem class LogicOperator: Conjuction = "&" Disjunction = "|" Negation = "!" Implication = "=>" Equivalence = "<=>" Every = "V" Exists = "E" Very = "Very" Fairly = "Fairly" LogicOperator.Al...
"""Functions for working with STIX2 granular markings.""" from stix2 import exceptions from stix2.markings import utils from stix2.utils import is_marking from stix2.versioning import new_version def get_markings(obj, selectors, inherited=False, descendants=False, marking_ref=True, lang=True): """ Get all gr...
############################################################################### # # Worksheet - A class for writing Excel Worksheets. # # Copyright 2013-2017, John McNamara, jmcnamara@cpan.org # import re import datetime from warnings import warn COL_NAMES = {} range_parts = re.compile(r'(\$?)([A-Z]{1,3})(\$?)(\d+)') ...
# ---------------------------------------------------------------------------- # Copyright (c) 2016-2017, QIIME 2 development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
from splitwise.debt import Debt from splitwise.balance import Balance class Group(object): """ Represents a splitwise group. Attributes: id(long, optional): ID of the group name(str, optional): Name of the group updated_at(str, optional): ISO 8601 Date time. The last updated date time...
import traceback import numpy as np from pycqed.analysis_v3 import helper_functions from pycqed.measurement.waveform_control.sequence import Sequence from pycqed.utilities.general import temporary_value from pycqed.utilities.timer import Timer, Checkpoint from pycqed.measurement.waveform_control.circuit_builder impor...
import bisect import itertools import math from abc import ABCMeta, abstractmethod import typing as tp from satella.coding.concurrent.monitor import RMonitor from satella.coding.recast_exceptions import silence_excs from satella.coding.sequences import try_close from satella.coding.typing import V, K, KVTuple class ...
# # 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...
# Copyright 2011 OpenStack Foundation. # 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 req...
""" This module implements various types of multipliers using algorithms like Booth's and Robertson's """ from BinPy.bittools.bittools import * import itertools def booths_multiply(multiplicand, multiplier, bits=None, signed=False): """ Multiply the multiplicand ( binary represented ) and multiplier ( binary ...
# Copyright (c) 2010 OpenStack, 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 wr...
import unittest import copy from xformmanager.xformdef import FormDef, ElementDef, Differences class CompatibilityTestCase(unittest.TestCase): def testEmptyWithEmpty(self): self._do_two_way_compatibility_check(FormDef(), FormDef(), True) def testEmptyWithFilled(self): filled = se...
#!/usr/bin/env python import sys import logging import multiprocessing from itertools import imap, chain, islice import argparse import numpy as np import h5py import gomill import gomill.sgf, gomill.sgf_moves from gomill.gtp_states import History_move from deepgo import cubes, state, rank """ This reads sgf's from...
""" Base and utility classes for tseries type pandas objects. """ import operator from typing import Set import warnings import numpy as np from pandas._libs import NaT, iNaT, lib from pandas._libs.algos import unique_deltas from pandas.compat.numpy import function as nv from pandas.errors import AbstractMethodError ...
"""Decide which plugins to use for authentication & installation""" from __future__ import print_function import os import logging import zope.component from certbot import errors from certbot import interfaces from certbot.display import util as display_util logger = logging.getLogger(__name__) z_util = zope.comp...
# This file is part of gorm, an object relational mapper for versioned graphs. # Copyright (C) 2014 Zachary Spector. from collections import defaultdict, deque from .graph import ( Graph, DiGraph, MultiGraph, MultiDiGraph, ) from .query import QueryEngine from .cache import Cache, NodesCache, EdgesCache...
# -*- coding: utf-8 -*- import json from tests import TestElasticmock, INDEX_NAME, DOC_TYPE, BODY, DOC_ID class TestBulk(TestElasticmock): def test_should_bulk_index_documents_index_creates(self): action = {'index': {'_index': INDEX_NAME, '_type': DOC_TYPE}} action_json = json.dumps(action) ...
from FWCore.ParameterSet.VarParsing import VarParsing options = VarParsing('analysis') options.register('config', default = '', mult = VarParsing.multiplicity.singleton, mytype = VarParsing.varType.string, info = 'Single-switch config. Values: Prompt17, Summer16') options.register('globaltag', default = '', mult = Var...
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redi...
# Copyright 2016-2017 Capital One Services, 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 ...
from django.conf import settings from django.db.models.sql import aggregates as sqlaggregates from django.db.models.sql.compiler import SQLCompiler from django.db.models.sql.constants import LOOKUP_SEP, MULTI, SINGLE from django.db.models.sql.where import AND, OR from django.db.utils import DatabaseError, IntegrityErro...
########################################################################## # # Copyright (c) 2016, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistrib...
#!/usr/bin/env python #=============================================================================# # # # NAME: verify_image_data.py # # ...
# Copyright 2014 # The Cloudscaling Group, 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...
#!/usr/bin/python import os import re import json from lxml import etree as et import pcbmode.config as config from . import messages as msg # pcbmode modules from . import svg from . import utils from . import place import copy from .style import Style from .point import Point from .shape import Shape class Fo...
# Copyright 2014 Violin Memory, 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 requi...
import h2o from h2o.estimators import H2OGradientBoostingEstimator, H2OGeneralizedLinearEstimator from tests import pyunit_utils import os import sys from pandas.testing import assert_frame_equal TEMPLATE = """ import java.util.HashMap; import java.util.Map; import hex.genmodel.GenModel; import hex.genmodel.annotatio...
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import webnotes, json from webnotes.utils import cint, now, cstr from webnotes import _ #sql = webnotes.conn.sql class DocType: def __init__(self, doc, doclist): self.doc ...
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2015, Anaconda, Inc. All rights reserved. # # Powered by the Bokeh Development Team. # # The full license is in the file LICENSE.txt, distributed with this software. #---------------------------------------------------...
#!/usr/bin/env python # encoding: utf-8 """ tesla.py Copyright (c) 2015 Rob Mason 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 u...
# Copyright 2010 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
#!/usr/bin/env python # -*- coding: UTF-8 -*- class Rect(object): def __init__(self, x1, y1, x2, y2): self.__x1 = x1 self.__x2 = x2 self.__y1 = y1 self.__y2 = y2 def x1(self): return self.__x1 def x2(self): return self.__x2 def y1(self): return self.__y1 def y2(self): return self.__y2 def xmid(self): re...
""" Support for native homogeneous sets. """ import collections import contextlib import math import operator from llvmlite import ir from numba.core import types, typing, cgutils from numba.core.imputils import (lower_builtin, lower_cast, iternext_impl, impl_ret_borrowed, ...
#!/usr/bin/env python # encoding: utf-8 """Contains the SnippetManager facade used by all Vim Functions.""" from collections import defaultdict from functools import wraps import os import platform import traceback from UltiSnips import _vim from UltiSnips._diff import diff, guess_edit from UltiSnips.compatibility i...
# # 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 us...
''' Copyright (C) 2015 Dato, Inc. All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. ''' # from nose import with_setup # -*- coding: utf-8 -*- from ..data_structures.sarray import SArray import pandas as pd import numpy as np import ...
import os import sys import hashlib import shutil if sys.version_info[0] == 2: # pragma: no cover from urllib import urlretrieve from ConfigParser import RawConfigParser else: from urllib.request import urlretrieve from configparser import RawConfigParser _CONFIG_PATH = os.path.expanduser(os.path.join...
""" Progress bar ------------ """ from __future__ import print_function, division import warnings from abc import abstractmethod import datetime from plumbum.lib import six from plumbum.cli.termsize import get_terminal_size import sys class ProgressBase(six.ABC): """Base class for progress bars. Customize for type...
"""Tests for the Profile model and related views.""" from django.test import TestCase, Client, RequestFactory from django.contrib.auth import get_user from django.contrib.auth.models import User, AnonymousUser from my_profile.models import NMHWProfile import factory import json from faker import Faker from django.forms...
# -*- coding: utf-8 -*- # Tests ported from tests/test_models.py and tests/test_user.py import os import json import datetime as dt import urlparse from django.utils import timezone import mock import itsdangerous import pytest import pytz from framework.auth.exceptions import ExpiredTokenError, InvalidTokenError, Ch...
#!/usr/bin/env python import argparse import multiprocessing import os import queue import re import pandas import pandas.io.formats.excel from Bio import SeqIO # Maximum columns allowed in a LibreOffice # spreadsheet is 1024. Excel allows for # 16,384 columns, but we'll set the lower # number as the maximum. Some...