text
stringlengths
475
200k
# ext/orderinglist.py # Copyright (C) 2005-2021 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: https://www.opensource.org/licenses/mit-license.php """A custom list that manages index/position information for contained elements...
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, [EMAIL], All rights reserved. # LLNL-CODE-647188 # # F...
# -*- 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...
#!/usr/bin/env python # # Copyright 2013 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. # # Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or # http://www.apache.org/licenses/LICENSE-2.0> or the MIT license #...
""" MySQL database backend for Django. Requires mysqlclient: https://pypi.python.org/pypi/mysqlclient/ MySQLdb is supported for Python 2 only: http://sourceforge.net/projects/mysql-python """ from __future__ import unicode_literals import datetime import re import sys import warnings from django.conf import settings...
# -*- coding: utf-8 -*- # # # Author: Guewen Baconnier, Yannick Vaucher # Copyright 2013-2015 Camptocamp SA # # This program 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...
# =============================================================================== # Copyright (C) 2010 Diego Duclos # # This file is part of eos. # # eos 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, ...
# URL extractor # Copyright 2004, Paul McGuire from pyparsing import Literal,Suppress,CharsNotIn,CaselessLiteral,\ Word,dblQuotedString,alphanums,SkipTo import urllib import pprint # Define the pyparsing grammar for a URL, that is: # URLlink ::= <a href= URL>linkText</a> # URL ::= doubleQuotedSt...
from __future__ import division from sympy import (Add, Basic, S, Symbol, Wild, Float, Integer, Rational, I, sin, cos, tan, exp, log, nan, oo, sqrt, symbols, Integral, sympify, WildFunction, Poly, Function, Derivative, Number, pi, NumberSymbol, zoo, Piecewise, Mul, Pow, nsimplify, ratsimp, trigsimp, radsim...
# # 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...
import unittest from datetime import datetime, timedelta from fs.memoryfs import MemoryFS from mock import Mock, patch import itertools from xblock.runtime import KvsFieldData, DictKeyValueStore import xmodule.course_module from xmodule.modulestore.xml import ImportSystem, XMLModuleStore from opaque_keys.edx.locati...
#!/usr/bin/env python # # Copyright 2004,2007,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at you...
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import strip_html from frappe.website.utils import scrub_relative_urls from jinja2.utils import concat from jinja2 import meta import re def r...
# Copyright (C) 2015 by Per Unneberg import math import pandas.core.common as com from bokeh.palettes import brewer as bokeh_brewer from .palettes import brewer as snakemakelib_brewer import logging logger = logging.getLogger(__name__) MINSIZE = 3 MAXSIZE = 9 # FIXME: some palettes have 9 as max, some 11 brewer = b...
#!/usr/bin/env python from __future__ import print_function import traceback import sys import os import time from optparse import OptionParser, OptionGroup import random import cProfile import visualizer.visualize_locally import json try: from StringIO import StringIO except ImportError: from io import StringI...
#! /usr/bin/env python # # 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 ...
############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2014 OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Publi...
# -*- coding:utf-8 -*- # This code is automatically transpiled by Saklient Translator import six from .httpexception import HttpException from .httpbadgatewayexception import HttpBadGatewayException from .httpbadrequestexception import HttpBadRequestException from .httpconflictexception import HttpConflictException f...
#!/usr/bin/python # Copyright 2011 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 appli...
# Copyright (c) 2012 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. """ Helper functions to be used in bench_pictures.cfg. """ def Config(**kwargs): config = {} for key in kwargs: config[key] = kwargs[key] re...
#!/usr/bin/env python # # Copyright 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...
#!/usr/bin/env python import os import vtk from vtk.test import Testing from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() # Create the RenderWindow, Renderer and interactive renderer # ren1 = vtk.vtkRenderer() renWin = vtk.vtkRenderWindow() renWin.SetMultiSamples(0) renWin.AddRenderer(ren1) ire...
# Copyright (c) 2012 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. r"""Code to validate and convert settings of the Microsoft build tools. This file contains code to validate and convert settings of the Microsoft build tools. Th...
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..compat import compat_str class VyboryMosIE(InfoExtractor): _VALID_URL = r'https?://vybory\.mos\.ru/(?:#precinct/|account/channels\?.*?\bstation_id=)(?P<id>\d+)' _TESTS = [{ 'url': 'http://vybory.mos.ru/#p...
import django.test from django.contrib.auth.models import User from django.conf import settings from django.http import Http404 from django.test.utils import override_settings from mock import call, patch from student.models import CourseEnrollment from student.tests.factories import UserFactory from course_groups.mo...
# (c) The James Hutton Institute 2013 # Author: Leighton Pritchard # # Contact: # [EMAIL] # # Leighton Pritchard, # Information and Computing Sciences, # James Hutton Institute, # Errol Road, # Invergowrie, # Dundee, # DD6 9LH, # Scotland, # UK # # The MIT License # # Copyright (c) 2010-2014 The James Hutton Institute...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ pyLATTICE is... """ from __future__ import division #necessary for python2 from __future__ import unicode_literals # define authorship information __authors__ = ['Evan Groopman', 'Thomas Bernatowicz'] __author__ = ','.join(__authors__) __credits__...
from rez.package_repository import package_repository_manager from rez.package_resources_ import PackageFamilyResource, PackageResource, \ VariantResource, package_family_schema, package_schema, variant_schema, \ package_release_keys from rez.package_serialise import dump_package_data from rez.utils.data_utils ...
""" Unit tests for the differential global minimization algorithm. """ from scipy.optimize import _differentialevolution from scipy.optimize._differentialevolution import DifferentialEvolutionSolver from scipy.optimize import differential_evolution import numpy as np from scipy.optimize import rosen from numpy.testing ...
# (c) 2014 James Cammarata, <[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 # (at your option) any later version. # # ...
#!/usr/bin/env python ''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import code import sys import traceback import pyglet.event import pyglet.text from pyglet.window import key from pyglet.gl import * class Console(object): def __init__(self, width, height, globals=None, locals=None): ...
# Copyright 2011 Sybren A. Stüvel <[EMAIL]> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
""" Tools for sending email. """ from __future__ import unicode_literals from django.conf import settings from django.utils.module_loading import import_string # Imported for backwards compatibility, and for the sake # of a cleaner namespace. These symbols used to be in # django/core/mail.py before the introduction o...
""" Python Character Mapping Codec mac_iceland generated from 'MAPPINGS/VENDORS/APPLE/ICELAND.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input...
# 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...
# Waltz # Compare results between wild type and mutant # coding=utf-8 import numpy as np import matplotlib.pyplot as plt import pandas as pd import csv from scipy import stats from pylab import plot, show, savefig, xlim, figure, \ hold, ylim, legend, boxplot, setp, axes import pylab from numpy import *...
from __future__ import absolute_import, unicode_literals import warnings class RemovedInWagtail17Warning(DeprecationWarning): pass removed_in_next_version_warning = RemovedInWagtail17Warning class RemovedInWagtail18Warning(PendingDeprecationWarning): pass class ThisShouldBeAList(list): """ Some...
#!/usr/bin/python import os import sys import codecs import operator from unidecode import unidecode def usage(): return ''' This script extracts words and counts from a 2006 wiktionary word frequency study over American television and movies. To use, first visit the study and download, as .html files, all 26 of...
import string, types, sys, os, StringIO, re, shlex, json, zipfile from collections import OrderedDict from itertools import chain from django.contrib.auth.decorators import login_required from django.core.servers.basehttp import FileWrapper from django.http import HttpResponse, HttpResponseNotFound from django.shortcut...
import os import csv import xlrd # Assumes the directory with the workbook is relative to the script's location. directory = 'workbooks/' file = os.listdir(directory)[0] workbook = (f'{directory}/{file}') # Preps the workbook that contains the information desired. wb = xlrd.open_workbook(workbook) sh = wb.sheet_by_i...
from collections import OrderedDict import numpy as np from bokeh.plotting import ColumnDataSource, figure, show, output_file from bokeh.models import HoverTool from bokeh.sampledata.unemployment1948 import data # Read in the data with pandas. Convert the year column to string data['Year'] = [str(x) for x in data['Y...
def WebIDLTest(parser, harness): parser.parse(""" dictionary Dict { any foo; [ChromeOnly] any bar; }; """) results = parser.finish() harness.check(len(results), 1, "Should have a dictionary") members = results[0].members; harness.check(len(members), 2, "Should have tw...
''' This file is part of VoIPER. VoIPER 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. VoIPER is distributed in the hope that it will be u...
""" Objects for dealing with polynomials. This module provides a number of objects (mostly functions) useful for dealing with polynomials, including a `Polynomial` class that encapsulates the usual arithmetic operations. (General information on how this module represents and works with polynomial objects is in the do...
# 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...
################################################################################ # 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...
"""XML-RPC methods for Zinnia""" ZINNIA_XMLRPC_PINGBACK = [ ('zinnia.xmlrpc.pingback.pingback_ping', 'pingback.ping'), ('zinnia.xmlrpc.pingback.pingback_extensions_get_pingbacks', 'pingback.extensions.getPingbacks')] ZINNIA_XMLRPC_METAWEBLOG = [ ('zinnia.xmlrpc.metaweblog.get_users_blogs', ...
import json import re from collections import namedtuple import string # INPUT OUTPUT def file_to_list(path): with open(path, 'r') as inputFile: return inputFile.readlines() def json_file_to_dict(path): with open(path, 'r') as jsonFile: return json.load(jsonFile) def to_json(x, path): wi...
#!/usr/bin/env python # -*- encoding: 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...
#!/usr/bin/env python # # Copyright 2008, 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...
"""Generic thread tests. Meant to be used by dummy_thread and thread. To allow for different modules to be used, test_main() can be called with the module to use as the thread implementation as its sole argument. """ import dummy_thread as _thread import time import Queue import random import unittest from test impo...
#!/usr/bin/env python # # Copyright 2009, 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...
''' this is the module for the hamiltonian ''' import numpy as np import os import pickle import datetime from quantumpropagator import (printDict, printDictKeys, loadInputYAML, bring_input_to_AU, warning, labTranformA, gaussian2, makeJustAnother2DgraphComplex, fromHartreetoCmMin1, makeJustAnother2Dg...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011, Cisco 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-...
#!/usr/bin/env python # # # FreeType 2 glyph name builder # # Copyright 1996-2000, 2003, 2005, 2007 by # David Turner, Robert Wilhelm, and Werner Lemberg. # # This file is part of the FreeType project, and may only be used, modified, # and distributed under the terms of the FreeType project license, # LICENSE.TXT. ...
# 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 ...
#;+ #; NAME: #; x_getsdssimg #; Version 1.1 #; #; PURPOSE: #; Returns an Image by querying the SDSS website #; Will use DSS2-red as a backup #; #; CALLING SEQUENCE: #; #; INPUTS: #; #; RETURNS: #; #; OUTPUTS: #; #; OPTIONAL KEYWORDS: #; #; OPTIONAL OUTPUTS: #; #; COMMENTS: #; #; EXAMPLES: #; #; PROCEDURES/...
# *************************************************************************** # * Copyright (c) 2009, 2010 Yorik van Havre <[EMAIL]> * # * Copyright (c) 2009, 2010 Ken Cline <[EMAIL]> * # * Copyright (c) 2020 Carlo Pavan <[EMAIL]> * # * Copyright (c) 2020 Eliud Cabrera...
"""Driver for running multiple profiles concurrently against a cluster. The list of profiles are passed via flag each of which are defined in the profile_details module. """ __author__ = '[EMAIL]' import json import logging from multiprocessing import Process from multiprocessing import Queue import time from absl ...
""" Python Character Mapping Codec cp775 generated from 'VENDORS/MICSFT/PC/CP775.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_map) def decode(self,input,e...
# Volatility # Copyright (C) 2007-2013 Volatility Foundation # # This file is part of Volatility. # # Volatility 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 ...
# -*- coding: utf-8 -*- # Mathmaker creates automatically maths exercises sheets # with their answers # Copyright 2006-2017 Nicolas Hainaux <[EMAIL]> # This file is part of Mathmaker. # Mathmaker is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as publish...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Author: Jan Zikes, Radim Rehurek # Copyright (C) 2014 Radim Rehurek <[EMAIL]> # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """ Latent Dirichlet Allocation (LDA) in Python, using all CPU cores to parallelize and speed up model training. Th...
__all__ = ["send", "track_send_item", "send_shipment", "receive", "track_recv_item", "recv_shipment", "recv_sent_shipment", "send_rec", "send_get_id", "send_get_ref", "recv_rec", "recv_get_id", ...
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from __future__ import absolute_import from __future__ import unicode_literals from django import forms from shipping.mo...
#*************************************************************************** #* * #* Copyright (c) 2012 Sebastian Hoogen <[EMAIL]> * #* * #* This program is free soft...
# Copyright 2014 Arista Networks, 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 requ...
# $language = "python" # $interface = "1.0" import os import sys import logging # Add script directory to the PYTHONPATH so we can import our modules (only if run from SecureCRT) if 'crt' in globals(): script_dir, script_name = os.path.split(crt.ScriptFullName) if script_dir not in sys.path: sys.path....
from vtk import * source = vtkRandomGraphSource() source.SetNumberOfVertices(200) source.SetEdgeProbability(0.01) source.SetUseEdgeProbability(True) source.SetStartWithTree(True) source.IncludeEdgeWeightsOn() source.AllowParallelEdgesOn() # Connect to the vtkVertexDegree filter. degree_filter = vtkVertexDegree() degr...
# 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...
### # Copyright (c) 2002-2005, Jeremiah Fincher # Copyright (c) 2008, James McCoy # 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 copyr...
#!/usr/bin/python -u # # this tests the entities substitutions with the XmlTextReader interface # import sys import libxml2 try: import StringIO str_io = StringIO.StringIO except: import io str_io = io.StringIO docstr="""<?xml version='1.0'?> <!DOCTYPE doc [ <!ENTITY tst "<p>test</p>"> ]> <doc>&tst;</d...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2017, F5 Networks Inc. # 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', ...
# (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 # (at your option) any later version. # # A...
import sys import json import unittest from datetime import datetime sys.path.insert(0, ".") from coalib.output.JSONEncoder import JSONEncoder class TestClass1(object): def __init__(self): self.a = 0 class TestClass2(object): def __init__(self): self.a = 0 self.b = TestClass1() cl...
import time from electrum.i18n import _ from electrum.util import PrintError, UserCancelled from electrum.wallet import BIP44_Wallet class GuiMixin(object): # Requires: self.proto, self.device messages = { 3: _("Confirm the transaction output on your %s device"), 4: _("Confirm internal entro...
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
#: E261:1:5 pass # an inline comment #: E262:1:12 x = x + 1 #Increment x #: E262:1:12 x = x + 1 # Increment x #: E262:1:12 x = y + 1 #: Increment x #: E265:1:1 #Block comment a = 1 #: E265:2:1 m = 42 #! This is important mx = 42 - 42 #: E266:3:5 E266:6:5 def how_it_feel(r): ### This is a variable ### a = ...
# Copyright 2007 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Fixer for callable(). This converts callable(obj) into isinstance(obj, collections.Callable), adding a collections import if needed.""" # Local imports from lib2to3 import fixer_base from lib2to3.fixer_util import ...
#!/usr/bin/python import sys import os import glob import os.path from subprocess import call, PIPE import unittest stdout = os.open("/dev/null",0) #sys.stdout stderr = os.open("/dev/null",0) # sys.stderr apt_args = [] # ["-o","Debug::pkgAcquire::Auth=true"] class testAuthentication(unittest.TestCase): """ ...
# Copyright (C) 2011 - Soren Hansen # Copyright (C) 2013 - Red Hat, 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 requir...
# -*- test-case-name: twisted.web.test.test_httpauth -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ HTTP BASIC authentication. @see: U{http://tools.ietf.org/html/rfc1945} @see: U{http://tools.ietf.org/html/rfc2616} @see: U{http://tools.ietf.org/html/rfc2617} """ import binascii from...
# This file is part of PyEMMA. # # Copyright (c) 2015, 2014 Computational Molecular Biology Group, Freie Universitaet Berlin (GER) # # PyEMMA 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 vers...
# GUI Application automation and testing library # Copyright (C) 2006 Mark Mc Mahon # # This library 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 2.1 # of the License, or (at you...
# csvBuild from Adventure 6. # import required modules import mcpi.minecraft as minecraft import mcpi.block as block # connect to minecraft mc = minecraft.Minecraft.create() # define some constants GAP = block.AIR.id WALL = block.GOLD_BLOCK.id FLOOR = block.GRASS.id # Open the file containing maze data FILENAME = "...
############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public L...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2014-Today OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Presidentielcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # BlockStore: a helper class that keeps a map of blocks and implements # helper funct...
from __future__ import print_function import email.Utils from gi.repository import Gtk import math import pychess import random import signal import subprocess from threading import Thread from pychess.compat import urlopen, urlencode from pychess.Players.PyChess import PyChess from pychess.System.prefix import addDa...
from __future__ import unicode_literals import unittest from django.contrib.admindocs import views from django.db import models from django.db.models import fields from django.utils.translation import ugettext as _ class CustomField(models.Field): description = "A custom field type" class DescriptionLackingFi...
# 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...
#!/usr/bin/python # # (c) 2015, Steve Gargan <[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', 'status': ['prev...
from sqlalchemy import Integer, ForeignKey, String from sqlalchemy.types import PickleType, TypeDecorator, VARCHAR from sqlalchemy.orm import mapper, Session, composite from sqlalchemy.orm.mapper import Mapper from sqlalchemy.orm.instrumentation import ClassManager from sqlalchemy.testing.schema import Table, Column fr...
from __future__ import absolute_import from __future__ import with_statement import socket import sys from collections import deque from datetime import datetime, timedelta from Queue import Empty from kombu.transport.base import Message from kombu.connection import BrokerConnection from mock import Mock, patch from...
"""thumbnail.py - Thumbnail module for Comix implementing (most of) the freedesktop.org "standard" at http://jens.triq.net/thumbnail-spec/ Only normal size (i.e. 128x128 px) thumbnails are supported. """ import os from urllib import pathname2url, url2pathname try: # The md5 module is deprecated as of Python 2.5, repl...
#!/usr/bin/env python # # Copyright 2008, 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...
#! /usr/bin/env python3 import sys from os.path import abspath, expanduser, dirname, join from itertools import chain import json import argparse from vis import vis, unvis, VIS_WHITE __dir__ = dirname(abspath(__file__)) OUTPUT_FILE = join(__dir__, '..', 'fixtures', 'unvis_fixtures.json') # Add custom fixtures her...
"""A setup module for psidPy Based on the pypa sample project. A tool to download data and build psid panels based on psidR by Florian Oswald. See: https://github.com/floswald/psidR https://github.com/tyler-abbot/psidPy """ from setuptools import setup, find_packages from codecs import open from os import path her...
# # utils.py # # Auxiliary functions for the `docmaker' tool (library file). # # Copyright 2002-2015 by # David Turner. # # This file is part of the FreeType project, and may only be used, # modified, and distributed under the terms of the FreeType project # license, LICENSE.TXT. By continuing to use, modify,...
# -*- coding: utf-8 -*- import os ccdir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) template = """<!DOCTYPE html> <meta charset=utf-8> """ errors = { "date-year-0000": "0000-12-09", "date-month-00": "2002-00-15", "date-month-13": "2002-13-15", "date-0005-02-29": "0005-02-29", "date...