text
stringlengths
475
200k
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) s2010-2011 Umeå University # # 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/LICENS...
#!/usr/bin/env python3 """Python binding of LED wrapper of LetMeCreate library.""" import ctypes _LIB = ctypes.CDLL('libletmecreate_core.so') LED_0 = 0x01 LED_1 = 0x02 LED_2 = 0x04 LED_3 = 0x08 LED_4 = 0x10 LED_5 = 0x20 LED_6 = 0x40 LED_HEARTBEAT = LED_7 = 0x80 ALL_LEDS = 0xFF LED_CNT = 8 ON_OFF_MODE = 0 TIMER_MOD...
# 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 2019 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 or agreed to in writing, ...
# 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 ...
#!/usr/bin/python # -*- coding: utf-8 -*- # With the MindfulClock you turn your device into a Bell of Mindfulness. # Concept, Design: Marcurs Möller # <[EMAIL]> # <http://apps.microsoft.com/windows/de-de/app/ # mindfulclock/58063160-9cc6-4dee-9d92-17df4ce4318a> # Pro...
# 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 __future__ import unicode_literals from django.contrib.localflavor.cz.forms import (CZPostalCodeField, CZRegionSelect, CZBirthNumberField, CZICNumberField) from django.core.exceptions import ValidationError from django.test import SimpleTestCase class CZLocalFlavorTests(SimpleTestCase): def test_CZRegi...
# This file is part of DEAP. # # DEAP is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation, either version 3 of # the License, or (at your option) any later version. # # DEAP is distributed ...
r"""Test correct treatment of various string literals by the parser. There are four types of string literals: 'abc' -- normal str r'abc' -- raw str b'xyz' -- normal bytes br'xyz' -- raw bytes The difference between normal and raw strings is of course that in a raw string, \ escapes (while still u...
#!/usr/bin/python # # OSPatching extension # # Copyright 2014 Microsoft Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unle...
# Copyright 2015 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 2015 The Switch Authors. All rights reserved. # Licensed under the Apache License, Version 2, which is in the LICENSE file. """ This module describes fuel use with considerations of unit commitment and incremental heat rates using piecewise linear expressions. If you want to use this module directly in a ...
# Copyright (C) 2015 Red Hat, 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...
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.python.versions}. """ from __future__ import division, absolute_import import sys import operator from io import BytesIO from twisted.python.versions import getVersionString, IncomparableVersions from twisted.python.vers...
# Copyright 2013 Netease, 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 appli...
# Module wordnet.py # # Original author: Oliver Steele <[EMAIL]> # Project Page: http://sourceforge.net/projects/pywordnet # # Copyright (c) 1998-2004 by Oliver Steele. Use is permitted under # the Artistic License # <http://www.opensource.org/licenses/artistic-license.html> """An OO interface to the WordNet database...
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=80: import os try: from lxml import etree as ET except ImportError: try: import xml.etree.cElementTree as ET except ImportError: try: import xml.etree.ElementTree as ET except ImportError: print "Failed to ...
# -*- coding: utf-8 -*- import codecs from distutils.spawn import find_executable import logging import click from path import Path import ruamel.yaml from chanjo.store.api import ChanjoDB from chanjo.init.bootstrap import pull, BED_NAME, DB_NAME from chanjo.init.demo import setup_demo, DEMO_BED_NAME LOG = logging.g...
#/usr/bin/env python # author: Mylene Campana ([EMAIL]) # Script which goes with hpp-rbprm-corba package. from hpp.corbaserver.rbprm.rbprmbuilder import Builder from hpp.corbaserver.rbprm.rbprmfullbody import FullBody from hpp.corbaserver.rbprm.problem_solver import ProblemSolver from hpp.gepetto import Viewer, PathPl...
# Copyright (c) 2011 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """gypd output module This module produces gyp input as its output. Output files are given the .gypd extension to avoid overwriting the .gyp files that they are ...
# -*- coding: utf-8 -*- # Copyright(C) 2013 Florent Fourcot # # This file is part of weboob. # # weboob is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your op...
# -*- coding: utf-8 -*- from django.conf import settings from django.utils.translation import ugettext from notification import backends MOBILE_NUMBER_SETTING_KEY = "NOTIFICATION_TWILIO_USER_MOBILE_NUMBER" TWILIO_ACCOUNT_SETTING_KEY = "TWILIO_ACCOUNT_SID" TWILIO_AUTH_SETTING_KEY = "TWILIO_AUTH_TOKEN" TWILIO_FROM_SETT...
# -*- coding: utf-8 -*- # # Sphinx documentation build configuration file, created by # sphinx-quickstart.py on Sat Mar 8 21:47:50 2008. # # This file is execfile()d with the current directory set to its containing dir. # # The contents of this file are pickled, so don't put values in the namespace # that aren't pickl...
import logging import pytest from pip._vendor.packaging.specifiers import SpecifierSet from pip._internal.index.collector import LinkCollector from pip._internal.index.package_finder import ( CandidateEvaluator, CandidatePreferences, FormatControl, LinkEvaluator, PackageFinder, _check_link_req...
# -*- coding: utf-8 -*- """Tests for jslex.""" # originally from https://bitbucket.org/ned/jslex from __future__ import unicode_literals from django.test import SimpleTestCase from django.utils.jslex import JsLexer, prepare_js_for_gettext class JsTokensTest(SimpleTestCase): LEX_CASES = [ # ids ("...
from __future__ import division from fractions import Fraction from pyparsing import (Literal, StringEnd, OneOrMore, ParseException) import nltk from nltk.tree import Tree ARROWS = ('<->', '->') ## Defines a simple pyparsing tokenizer for chemical equations elements = ['Ac', 'Ag', 'Al', 'Am', 'Ar', 'As', 'At', 'Au',...
from collections import Mapping from inspect import isgeneratorfunction from functools import wraps, partial from asyncio import Future, CancelledError, TimeoutError, async, sleep from .consts import MAX_ASYNC_WHILE from .access import get_event_loop, LOGGER, isfuture, is_async __all__ = ['maybe_async', '...
__author__ = "Ian Goodfellow" import numpy as np from theano import function from theano import tensor as T from pylearn2.compat import OrderedDict from pylearn2.sandbox.lisa_rl.bandit.agent import Agent from pylearn2.utils import sharedX class AverageAgent(Agent): """ A simple n-armed bandit playing agent...
# Copyright (C) 2010-2014 GRNET S.A. # # 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 3 of the License, or # (at your option) any later version. # # This program is distributed i...
# -*- test-case-name: openid.test.test_xri -*- """Utility functions for handling XRIs. @see: XRI Syntax v2.0 at the U{OASIS XRI Technical Committee<http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=xri>} """ import re XRI_AUTHORITIES = ['!', '=', '@', '+', '$', '('] try: unichr(0x10000) except ValueErr...
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will ...
import mock import datetime import urlparse from django.test import TestCase from django.core.files.base import ContentFile from boto.s3.key import Key from storages.backends import s3boto __all__ = ( 'ParseTsExtendedCase', 'SafeJoinTest', 'S3BotoStorageTests', #'S3BotoStorageFileTest...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
""" lockfile.py - Platform-independent advisory file locks. Requires Python 2.5 unless you apply 2.4.diff Locking is done on a per-thread basis instead of a per-process basis. Usage: >>> lock = FileLock('somefile') >>> try: ... lock.acquire() ... except AlreadyLocked: ... print 'somefile', 'is locked alread...
# As a test suite for the os module, this is woefully inadequate, but this # does add tests for a few functions which have been determined to be more # portable than they had been thought to be. import os import unittest import warnings import sys from test import test_support warnings.filterwarnings("ignore", "tempn...
# # Copyright 2013, 2015 Red Hat, Inc. # Copyright(c) FUJITSU Limited 2007. # # Cloning a virtual machine module. # # This work is licensed under the GNU GPLv2 or later. # See the COPYING file in the top-level directory. import re import os import libvirt from . import generatename from . import progress from . impo...
# -*- coding: utf-8 -*- ''' Copyright (C) 2011,2012 Maximilian Maahn, IGMK ([EMAIL]) make quicklooks from IMProToo NetCDF files. use: python batch_makeQuicklooks.py pathIn pathOut site requires: numpy, matplotlib, netcdf4-python or python-netcdf ''' import sys import numpy as np import glob import calendar imp...
"""Here we define the exported functions, types, etc... which need to be exported through a global C pointer. Each dictionary contains name -> index pair. Whenever you change one index, you break the ABI (and the ABI version number should be incremented). Whenever you add an item to one of the dict, the API needs to ...
# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modi...
# # Copyright (c) 2008--2015 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. You should have received a c...
#-*- coding:utf-8 -*- ############################################################################## # # Copyright (C) 2012 Michael Telahun Makonnen <[EMAIL]>. # All Rights Reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Publi...
import os import numpy import vigra from functools import partial from StringIO import StringIO ## Instead of importing requests and PIL here, ## use late imports (below) so people who don't use TiledVolume don't have to have them # New dependency: requests is way more convenient than urllib or httplib #import reque...
from decimal import Decimal from sys import float_info from unittest import TestCase from django.utils.numberformat import format as nformat class TestNumberFormat(TestCase): def test_format_number(self): self.assertEqual(nformat(1234, '.'), '1234') self.assertEqual(nformat(1234.2, '.'), '1234.2...
# Default Django settings. Override these with settings in the module # pointed-to by the DJANGO_SETTINGS_MODULE environment variable. # This is defined here as a do-nothing function because we can't import # django.utils.translation -- that module depends on the settings. gettext_noop = lambda s: s #################...
# Keypoints descriptor example. # This example shows how to save a keypoints descriptor to file. Show the camera an object # and then run the script. The script will extract and save a keypoints descriptor and the image. # You can use the keypoints_editor.py util to remove unwanted keypoints. # # NOTE: Please reset the...
""" Cisco_IOS_XR_infra_correlator_oper This module contains a collection of YANG definitions for Cisco IOS\-XR infra\-correlator package operational data. This module contains definitions for the following management objects\: suppression\: Suppression operational data correlator\: correlator Copyright (c) 2013...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2016 F5 Networks Inc. # # This file is part of Ansible # # Ansible 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 3 of the License, or # ...
from __future__ import division, absolute_import, print_function import sys if 'setuptools' in sys.modules: import setuptools.command.install as old_install_mod have_setuptools = True else: import distutils.command.install as old_install_mod have_setuptools = False from distutils.file_util import write...
# SOAPpy modules from Config import Config from Types import * from NS import NS from Utilities import * import string import fpconst import xml.sax from wstools.XMLname import fromXMLname try: from M2Crypto import SSL except: pass ident = '$Id: Parser.py 1497 2010-03-08 06:06:52Z pooryorick $' from ve...
# 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...
__author__ = 'bromix' class AbstractContextUI(object): def __init__(self): pass def create_progress_dialog(self, heading, text=None, background=False): raise NotImplementedError() def set_view_mode(self, view_mode): raise NotImplementedError() def get_view_mode(self): ...
import os import sys import storm class EmitterBase(object): DEFAULT_PYTHON = 'python%d.%d' % (sys.version_info.major, sys.version_info.minor) def __init__(self, script): # We assume 'script' is in the current directory. We simply get the # base part and turn it into a .py name for inclusion ...
# -*- coding: utf-8 -*- from multiprocessing import pool import multiprocessing import contextlib import clipboard import traceback import parmap import signal import time import pdb import sys __version__ = "$Id: task.py 2130 2015-09-11 16:56:55Z fmullall $" __URL__ = "$URL: svn+ssh://flux/home/fmullall/svn/kepler...
import os, sys; sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) import unittest import time import math from pattern import metrics try: PATH = os.path.dirname(os.path.realpath(__file__)) except: PATH = "" #------------------------------------------------------------------------------------...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe import _ from erpnext.accounts.report.accounts_receivable.accounts_receivable import get_ageing_data from frappe.utils import ...
import collections import re import sys import warnings from bs4.dammit import EntitySubstitution DEFAULT_OUTPUT_ENCODING = "utf-8" PY3K = (sys.version_info[0] > 2) whitespace_re = re.compile("\s+") def _alias(attr): """Alias one attribute name to another for backward compatibility""" @property def alias...
#-*- coding: UTF-8 -* ############################################################################ ############################################################################ #### Person responsible for this pure evil spaghetti code : #### #### Paul Bonijol -> paul [.] bnjl ['AT'] gmail [.] com #### #### Works...
# Copyright (c) 2011 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 ...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models from identityprovider.models import InvalidatedEmailAddress class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'InvalidatedEmailAddress.date_invalidated...
"""View to accept incoming websocket connection.""" import asyncio from contextlib import suppress from functools import partial import json import logging from aiohttp import web, WSMsgType import async_timeout from homeassistant.const import EVENT_HOMEASSISTANT_STOP from homeassistant.core import callback from home...
# -*- coding: utf-8 -*- """ pygments.styles.fruity ~~~~~~~~~~~~~~~~~~~~~~ pygments version of my "fruity" vim theme. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.style import Style from pygments.token import Token, Co...
# Rekall Memory Forensics # Copyright 2013 Google Inc. All Rights Reserved. # # 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 ver...
from __future__ import absolute_import from rest_framework import serializers from rest_framework.response import Response from sentry.api.bases.organization import OrganizationEndpoint from sentry.api.exceptions import ResourceDoesNotExist from sentry.models import ( AuditLogEntryEvent, OrganizationAccessRequest...
# A part of pdfrw (pdfrw.googlecode.com) # Copyright (C) 2006-2012 Patrick Maupin, Austin, Texas # MIT license -- See LICENSE.txt for details import re class PdfString(str): ''' A PdfString is an encoded string. It has a decode method to get the actual string data out, and there is an encode cla...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.utils.translation import ugettext_lazy as _ # This module defines the dictionary of countries (ISO-3166) supported by # Braintree, with Alpha2 codes as keys and translatable country names as values # Data originally copied from # https://de...
# darcs.py - darcs support for the convert extension # # Copyright 2007-2009 Matt Mackall <[EMAIL]> and others # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. from common import NoRepo, checktool, commandline, commit, converter_s...
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Michael DeHaan <[EMAIL]> # # This file is part of Ansible # # Ansible 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 3 of the License, or ...
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Maciej Delmanowski <[EMAIL]> # 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 ANSIBLE_METADATA = {'metadata_version': '1.1', ...
#!/usr/bin/env python # SOME UGLY CODE HERE import sys lines_gaff = sys.stdin.readlines() dihedral_style_name = 'fourier' in_dihedral_coeffs = [] for i in range(0, len(lines_gaff)): line = lines_gaff[i] atypes = line[:11].split('-') atype1 = atypes[0].strip() atype2 = atypes[1].strip() atype3 =...
# Copyright (C) 2008 Libresoft # # 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 distributed in the ...
import numpy as np import unittest import chainer from chainer.backends.cuda import to_cpu from chainer.function import Function from chainer import testing from chainer.testing import attr from chainercv.links import PickableSequentialChain from chainercv.utils.testing import ConstantStubLink class DummyFunc(Funct...
#! /usr/bin/env python # encoding: utf-8 # Federico Pellegrin, 2017 (fedepell) """ Provides Java Unit test support using :py:class:`waflib.Tools.waf_unit_test.utest` task via the **javatest** feature. This gives the possibility to run unit test and have them integrated into the standard waf unit test environment. It ...
""" This module defines the database schema of the node. Each model class defines a table in the database. The fields define the columns of this table. """ # library import from django.db.models import * from django.core.exceptions import ValidationError from vamdctap import bibtextools import re import datetime ...
#!/usr/bin/env python # # Copyright 2009 The Closure Library 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 ...
"""Support gathering system information of hosts which are running netdata.""" from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ( CONF_HOST, CONF_ICON, CONF_NAME, CONF_PORT, CONF_RESOURCES) from homea...
import xbmc, xbmcgui import os import util, config from util import * ACTION_CANCEL_DIALOG = (9,10,51,92,110) CONTROL_BUTTON_EXIT = 5101 class DialogBaseEdit(xbmcgui.WindowXMLDialog): def getControlById(self, controlId): try: control = self.getControl(controlId) except: return None...
# 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...
""" Utilities for manipulating Geometry WKT. """ from django.utils import six def precision_wkt(geom, prec): """ Returns WKT text of the geometry according to the given precision (an integer or a string). If the precision is an integer, then the decimal places of coordinates WKT will be truncated t...
from django.http import HttpResponse from django.utils import six from .loader import get_template, select_template class ContentNotRenderedError(Exception): pass class SimpleTemplateResponse(HttpResponse): rendering_attrs = ['template_name', 'context_data', '_post_render_callbacks'] def __init__(self...
""" numerictypes: Define the numeric type objects This module is designed so "from numerictypes import \\*" is safe. Exported symbols include: Dictionary with all registered number types (including aliases): typeDict Type objects (not all will be available, depends on platform): see variable sctypes fo...
""" pyyaml legacy Copyright (c) 2001 Steve Howell and Friends; All Rights Reserved (see open source license information in docs/ directory) """ import re import string def indentLevel(line): n = 0 while n < len(line) and line[n] == ' ': n = n + 1 return n class LineNumberStream: ...
#!/usr/bin/env python from __future__ import print_function import json import os import sys import urllib2 import ast import csv def main(transfer_path): basename = os.path.basename(transfer_path) try: comp_num, comp_id, obj_id = basename.split('---') except ValueError: return 1 # pr...
# 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...
# 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 u...
"""RFC 2822 message manipulation. Note: This is only a very rough sketch of a full RFC-822 parser; in particular the tokenizing of addresses does not adhere to all the quoting rules. Note: RFC 2822 is a long awaited update to RFC 822. This module should conform to RFC 2822, and is thus mis-named (it's not worth rena...
# coding: utf-8 import pytest import itertools import string from pandas import Series, DataFrame, MultiIndex from pandas.compat import range, lzip import pandas.util.testing as tm import pandas.util._test_decorators as td import numpy as np from numpy import random import pandas.plotting as plotting from pandas.t...
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j F Y' TIME_FORMAT = 'H:i:s' DATETIME_FORMAT = 'j F Y H:i:s' YEAR_MONTH_F...
# Copyright 2011 Isaku Yamahata <yamahata@valinux co jp> # 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...
# -*- coding: utf-8 -*- # This file is part of Gertrude. # # Gertrude 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 3 of the License, or # (at your option) any later version. #...
#!/usr/bin/env python # # Copyright 2006, 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...
from modules.module_base import ModuleBase import requests from lxml import html from urllib.parse import urljoin from urllib.request import urlretrieve class ModuleXKCD(ModuleBase): def __init__(self, bot): ModuleBase.__init__(self, bot) self.name = "xkcd" def getXKCDImage(self, chat, path = ...
# Copyright 2011 Justin Santa Barbara # Copyright 2012 Hewlett-Packard Development Company, L.P. # # 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/lic...
# (c) 2015, Ansible, Inc # # This file is part of Ansible # # Ansible 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 3 of the License, or # (at your option) any later version. # # Ansible is di...
## # Copyright 2012-2015 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en), # the Hercules foundation (htt...
"""Class returned by TLSConnection.makefile().""" class FileObject: """This class provides a file object interface to a L{tlslite.TLSConnection.TLSConnection}. Call makefile() on a TLSConnection to create a FileObject instance. This class was copied, with minor modifications, from the _fileobject...
# Copyright (c) 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 ...
# Copyright 2013 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 mojom # mojom_pack provides a mechanism for determining the packed order and offsets # of a mojom.Struct. # # ps = mojom_pack.PackedStruct(struct) # ...
"""**Tests for map creation in QGIS plugin.** """ __author__ = 'Tim Sutton <[EMAIL]>' __revision__ = '$Format:%H$' __date__ = '01/11/2010' __license__ = "GPL" __copyright__ = 'Copyright 2012, Australia Indonesia Facility for ' __copyright__ += 'Disaster Reduction' import unittest from unittest import expectedFailure...
from django.conf import settings from django.core.signals import got_request_exception from rest_framework import status from rest_framework.exceptions import APIException, ParseError as DRFParseError from rest_framework.response import Response from rest_framework.views import exception_handler class AlreadyPurchas...