text
stringlengths
475
200k
# -*- 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...
#!/usr/bin/python # 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, sof...
import json import logging import re from django.conf import settings from django.core.urlresolvers import reverse logger = logging.getLogger(__name__) LEAK_RE = re.compile(r'\d+ bytes leaked \((.+)\)$') CRASH_RE = re.compile(r'.+ application crashed \[@ (.+)\]$') MOZHARNESS_RE = re.compile( r'^\d+:\d+:\d+[ ]+(...
import unittest from kmatch import KmatchTestMixin class MixinTestUsingMixin(KmatchTestMixin, unittest.TestCase): def test_matches(self): """ Test .assertMatches() using the mixin on a true match """ self.assertKmatches(['<=', 'f', 0], {'f': -1}) def test_matches_raises_erro...
# # 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...
#!/usr/bin/python # # Copyright (c) 2016 Matt Davis, <[EMAIL]> # Chris Houseknecht, <[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 = {'me...
import math from ..libmp.backend import xrange class QuadratureRule(object): """ Quadrature rules are implemented using this class, in order to simplify the code and provide a common infrastructure for tasks such as error estimation and node caching. You can implement a custom quadrature rule by ...
# -*- coding: utf-8 -*- # # # Copyright (c) 2008 JAILLET Simon - CrysaLEAD - www.crysalead.fr # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsability of assessing all potential # consequences resulting from its eventual inadequacies and bugs # End users w...
# Copyright (c) 2005-2014 LOGILAB S.A. (Paris, FRANCE). # http://www.logilab.fr/ -- mailto:[EMAIL] # # 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 ...
#!/usr/bin/python # Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = { 'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community' } DOCUMENTATION = ''' --- module: aws_ses_identity_policy s...
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
# 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 ...
# 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 th...
## # Copyright (c) 2006-2013 Apple 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 l...
# 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...
"""Macintosh-specific module for conversion between pathnames and URLs. Do not import directly; use urllib instead.""" import urllib import os __all__ = ["url2pathname","pathname2url"] def url2pathname(pathname): """OS-specific conversion from a relative URL of the 'file' scheme to a file system path; not r...
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from datetime import datetime, timedelta import re import types from unittest import TestCase from django.core.exceptions import ValidationError from django.core.validators import ( BaseValidator, EmailValidator, MaxLengthValidator, MaxValueValidator...
""" ======================================= Receiver Operating Characteristic (ROC) ======================================= Example of Receiver Operating Characteristic (ROC) metric to evaluate classifier output quality. ROC curves typically feature true positive rate on the Y axis, and false positive rate on the X a...
# Copyright 2015, 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...
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) conexus.at # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public ...
"""SWF Event Types Possible Decider Events: http://boto3.readthedocs.org/en/latest/reference/services/swf.html#SWF.Client.poll_for_decision_task WorkflowExecutionStarted WorkflowExecutionCancelRequested WorkflowExecutionCompleted CompleteWorkflowExecutionFailed WorkflowExecutionFailed FailWorkflowExecutionFailed Work...
# Copyright 2014 Hewlett-Packard Development Company, L.P. # 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...
from sympy import ( adjoint, conjugate, DiracDelta, Heaviside, nan, pi, sign, sqrt, symbols, transpose, Symbol, Piecewise, I, S, Eq ) from sympy.utilities.pytest import raises from sympy.core.function import ArgumentIndexError x, y = symbols('x y') def test_DiracDelta(): assert DiracDelta(1) == 0 a...
def main(request, response): response.headers.set("Access-Control-Allow-Origin", request.headers.get("origin") ) response.headers.set("Access-Control-Expose-Headers", "X-Request-Method") if request.method == 'OPTIONS': response.headers.set("Access-Control-Allow-Methods", "GET, CHICKEN, HEAD, POST,...
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# 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...
""" The PyQt4 GUI classes for the bgvdata package. """ from __future__ import print_function, division import logging from os.path import splitext try: from PyQt4.QtGui import QMainWindow, QDockWidget from PyQt4 import QtCore except ImportError: from PyQt5.QtWidgets import QMainWindow, QDockWidget fr...
# -*- coding: utf-8 -*- """ Created on Mon Dec 10 09:18:14 2012 Author: Josef Perktold """ import numpy as np from numpy.testing import assert_almost_equal, assert_equal from statsmodels.stats.inter_rater import (fleiss_kappa, cohens_kappa, to_table, aggregate_raters) cla...
""" Tests of ModelAdmin system checks logic. """ from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.db import models from django.utils.encoding import python_2_unicode_compatible class Album(models.Model): title = models.CharFie...
from __future__ import division import StringIO import json import random import sys from twisted.internet import defer import p2pool from p2pool.bitcoin import data as bitcoin_data, getwork from p2pool.util import expiring_dict, jsonrpc, pack, variable class _Provider(object): def __init__(self, parent, long_p...
# -*- coding: utf-8 -*- # Automatic provisioning of GCE Images. import os import libcloud.common.google from nixops.util import attr_property from nixops.gce_common import ResourceDefinition, ResourceState class GCEImageDefinition(ResourceDefinition): """Definition of a GCE Image""" @classmethod def g...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2013 OpenERP SA (<http://www.openerp.com>) # # This program is free software: you c...
import pytest import unittest boto3 = pytest.importorskip("boto3") botocore = pytest.importorskip("botocore") import ansible.modules.cloud.amazon.kinesis_stream as kinesis_stream aws_region = 'us-west-2' class AnsibleKinesisStreamFunctions(unittest.TestCase): def test_convert_to_lower(self): example =...
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest import re import sys import os import glob from . import helper from .mockable_test_result import MockableTestResult from runner import path_to_enlightenment from libs.colorama import init, Fore, Style init() # init colorama class Sensei(MockableTestResu...
# 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...
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os import re ...
# $Id: nl.py 4564 2006-05-21 20:44:42Z wiemann $ # Author: Martijn Pieters <[EMAIL]> # Copyright: This module has been placed in the public domain. # New language mappings are welcome. Before doing a new translation, please # read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must be # translated for each...
""" raven.contrib.bottle.utils ~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import logging from raven.utils.compat import _urlparse from raven.utils.wsgi import get_header...
"""Suite Microsoft Internet Explorer Suite: Events defined by Internet Explorer Level 1, version 1 Generated from /Applications/Internet Explorer.app AETE/AEUT resource version 1/0, language 0, script 0 """ import aetools import MacOS _code = 'MSIE' class Microsoft_Internet_Explorer_Events: def GetSource(self,...
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Ansible Project # Copyright: (c) 2018, Abhijeet Kasurde <[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...
from os import path as os_path from Components.config import config, ConfigSubsection, ConfigSlider, ConfigSelection, ConfigBoolean, ConfigNothing, NoSave # The "VideoEnhancement" is the interface to /proc/stb/vmpeg/0. class VideoEnhancement: firstRun = True def __init__(self): self.last_modes_preferred = [ ] ...
import sqlite3 import urllib import re from urllib.request import urlopen from bs4 import BeautifulSoup from phyllo.phyllo_logger import logger import nltk from itertools import cycle nltk.download('punkt') from nltk import sent_tokenize anselmSOUP="" idx = -1 cha_array=[] suburl = [] verse = [] ...
##!/usr/bin/python import numpy as np import pylab as plt data = np.genfromtxt(fname='t100/wf.dat') data1 = np.genfromtxt(fname='t300/wf.dat') data2 = np.genfromtxt(fname='t500/wf.dat') data3 = np.genfromtxt(fname='t600/wf.dat') data00 = np.genfromtxt('../spo_1d/t100') data01 = np.genfromtxt('../spo_1d/t300') data02 ...
# 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. import json import optparse import os import sys import webgl_conformance_expectations from telemetry import benchmark as benchmark_module from telemetr...
import os import sys import json from datetime import datetime import time import math import numpy as np import scipy as sp import matplotlib.pyplot as plt import pylab as pl import pickle ###### ### Configurations ###### UUID_FILE = 'finland_ids.csv' #DATA_FOLDER = 'VTT_week/' DATA_FOLDER = 'data_year/' DATA_EXT = ...
# -*- encoding: utf-8 -*- ############################################################################## # # Daniel Campos ([EMAIL]) Date: 29/09/2014 # # 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 ...
"""This library is free software; you can redistribute it and/or modify it under the terms of the IBM Common Public License as published by the IBM Corporation; either version 1.0 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT A...
""" Django settings for {{ project_name }} project. Generated by 'django-admin startproject' using Django {{ django_version }}. For more information on this file, see https://docs.djangoproject.com/en/{{ docs_version }}/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.c...
# -*- coding: utf-8 -*- # (c) 2017 Tuomas Airaksinen # # This file is part of Serviceform. # # Serviceform 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)...
from __future__ import absolute_import, division, unicode_literals import os import sys import unittest import warnings from difflib import unified_diff try: unittest.TestCase.assertEqual except AttributeError: unittest.TestCase.assertEqual = unittest.TestCase.assertEquals from .support import get_data_files...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2011 OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GN...
# 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. """This module handles the JSON de/serialization of the core classes. This is needed for both long term storage (e.g., loading/storing traces to local files...
"""distutils.command.check Implements the Distutils 'check' command. """ __revision__ = "$Id$" from distutils.core import Command from distutils.dist import PKG_INFO_ENCODING from distutils.errors import DistutilsSetupError try: # docutils is installed from docutils.utils import Reporter from docutils.pa...
# Copyright (C) 2014 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 ...
from __future__ import absolute_import from django.http import HttpRequest, HttpResponse from typing import Text from typing import Iterable, Optional, Sequence from zerver.lib.actions import do_events_register from zerver.lib.request import REQ, has_request_variables from zerver.lib.response import json_success from...
# Copyright (C) 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 of conditions and the...
#!/usr/bin/env python # This script outputs a Swift source with randomly-generated type definitions, # which can be used for ABI or layout algorithm fuzzing. # TODO: generate types with generics, existentials, compositions from __future__ import print_function import random import sys maxDepth = 5 maxMembers = 5 t...
# 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 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 file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Author: Barbara Casati <[EMAIL]> # Author: Stephane Chamberland <[EMAIL]> """ Interpolate RPNSTD rec to latlon points """ import sys import optparse import numpy as np from scipy import interpolate import rpnpy.librmn.all as rmn if __name__ == "__main__": inttyp...
"""Factory functions for symmetric cryptography.""" import os import Python_AES import Python_RC4 import cryptomath tripleDESPresent = False if cryptomath.m2cryptoLoaded: import OpenSSL_AES import OpenSSL_RC4 import OpenSSL_TripleDES tripleDESPresent = True if cryptomath.cryptlibpyLoaded: impo...
""" Dialog that allows user to specify a new config file section name. Used to get new highlight theme and keybinding set names. """ from Tkinter import * import tkMessageBox class GetCfgSectionNameDialog(Toplevel): def __init__(self,parent,title,message,usedNames): """ message - string, informatio...
# -*- coding: utf-8 -*- ############################################################################## # # This file is part of base_user_reset_access, # an Odoo module. # # Copyright (c) 2015 ACSONE SA/NV (<http://acsone.eu>) # # base_user_reset_access is free software: # you can redistribute it an...
#!/usr/bin/env python # 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. """ Make sure we generate a manifest file when linking binaries, including handling AdditionalManifestFiles. """ import TestGyp import sys...
#!/usr/bin/env python3 # encoding: UTF-8 import argparse import datetime import functools import logging import operator import os.path import platform import re import sqlite3 import sys import uuid import bcrypt from pyramid.authentication import AuthTktAuthenticationPolicy from pyramid.authorization import ACLA...
# -*- coding: utf-8 -*- # # Copyright © 2008, 2010 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, modify, # copy, or redistribute it subject to the terms and conditions of the GNU # General Public License v.2, or (at your option) any later version. This # program is distribute...
#!/usr/bin/python # -*- coding: utf-8 -*- # multipermute.py - permutations of a multiset # Erik Garrison <[EMAIL]> 2010 """ This module encodes functions to generate the permutations of a multiset following this algorithm: Algorithm 1 Visits the permutations of multiset E. The permutations are stored in a singly-lin...
import collections import sys from django.conf import settings from django.core.management.color import color_style from django.utils.encoding import force_str from django.utils.itercompat import is_iterable from django.utils import six class ModelErrorCollection: def __init__(self, outfile=sys.stdout): ...
# 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...
# 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 datetime import datetime import dateutil from django.core.cache import cache from django.core.urlresolvers import reverse from corehq.apps.casegroups.models import CommCareCaseGroup from corehq.apps.groups.models import Group from corehq.apps.reports import util from corehq.apps.reports.dispatcher import ProjectRe...
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
from django import template from django.utils.encoding import iri_to_uri from django.utils.six.moves.urllib.parse import urljoin register = template.Library() class PrefixNode(template.Node): def __repr__(self): return "<PrefixNode for %r>" % self.name def __init__(self, varname=None, name=None): ...
# -*- coding: utf-8 -*- """ Sahana Eden Fire Models @copyright: 2009-2013 (c) Sahana Software Foundation @license: MIT 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...
""" * --------------------- * | | | Coding Game Server | | | * --------------------- * Authors: M. Pecheux (based on T. Hilaire and J. Brajard template file) Licence: GPL File: aliceRandomPlayer.py Contains the class aliceRandomPlayer -> defines a dummy Alice player t...
# Copyright 2012 IBM Corp. # # 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 t...
""" XML handler for region condition """ # Standard library modules. # Third party modules. # Local modules. from pyhmsa.spec.condition.region import RegionOfInterest from pyhmsa.fileformat.xmlhandler.condition.condition import _ConditionXMLHandler # Globals and constants variables. class RegionOfInterestXMLHandle...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
''' xbmcswift2 ---------- A micro framework to enable rapid development of XBMC plugins. :copyright: (c) 2012 by Jonathan Beluch :license: GPLv3, see LICENSE for more details. ''' from types import ModuleType class module(ModuleType): '''A wrapper class for a module used to override __getatt...
# ================================================================================================== # Copyright 2014 Twitter, Inc. # -------------------------------------------------------------------------------------------------- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use thi...
"""AMQPStorm Exception.""" AMQP_ERROR_MAPPING = { 311: ('CONTENT-TOO-LARGE', 'The client attempted to transfer content larger than the ' 'server could accept at the present time. The client may ' 'retry at a later time.'), 312: ('NO-ROUTE', 'Undocumented AMQP Soft Error'), 31...
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: [EMAIL] # Maintained By: [EMAIL] import datetime from dateutil import relativedelta from cycle_calculator import CycleCalculator class AnnuallyCy...
"""Skeleton for 'nose.tools' module. Project: nose 1.3 <https://nose.readthedocs.org/> Skeleton by: Andrey Vlasovskikh <[EMAIL]> """ import sys def assert_equal(first, second, msg=None): """Fail if the two objects are unequal as determined by the '==' operator. """ pass def assert_not_equal(first, se...
# 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 (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. # Notes: # # This generates makefiles suitable for inclusion into the Android build system # via an Android.mk file. It is based on make.py, the standard makefile ...
#! /usr/bin/env python import sys from optparse import OptionParser import random parser = OptionParser() parser.add_option('-s', '--seed', default=0, help='the random seed', action='store', type='int', dest='seed') parser.add_option('-j', '--jobs', default=3, help='number of jobs in the system', action=...
import unittest from ctypes import * from binascii import hexlify import re def dump(obj): # helper function to dump memory contents in hex, with a hyphen # between the bytes. h = hexlify(memoryview(obj)) return re.sub(r"(..)", r"\1-", h)[:-1] class Value(Structure): _fields_ = [("val", c_byte)] ...
from ctypes import POINTER, c_char_p, c_int, c_size_t, c_ubyte from django.contrib.gis.geos.libgeos import CS_PTR, GEOM_PTR, GEOSFuncFactory from django.contrib.gis.geos.prototypes.errcheck import ( check_geom, check_minus_one, check_sized_string, check_string, check_zero, ) # This is the return type used by bina...
# -*- 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 field 'CourseOverview.created' db.add_column('course_overviews_c...
""" Tests for uu module. Nick Mathewson """ import unittest from test import test_support import sys, os, uu, cStringIO import uu plaintext = "The smooth-scaled python crept over the sleeping dog\n" encodedtext = """\ M5&AE('-M;V]T:\"US8V%L960@<'ET:&]N(&-R97!T(&]V97(@=&AE('-L965P (:6YG(&1O9PH """ encodedtextwrappe...
#!/usr/bin/env python3 # # Copyright (c) 2019, The OpenThread Authors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright # ...
# (c) 2012-2014, 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. ...
""" Support for MS-SQL via mxODBC. mxODBC is available at: http://www.egenix.com/ This was tested with mxODBC 3.1.2 and the SQL Server Native Client connected to MSSQL 2005 and 2008 Express Editions. Connecting ~~~~~~~~~~ Connection is via DSN:: mssql+mxodbc://<username>:<password>@<dsnname> Executio...
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
from __future__ import unicode_literals from django.test import TestCase from .models import Author, Article, SystemInfo, Forum, Post, Comment class NullFkOrderingTests(TestCase): def test_ordering_across_null_fk(self): """ Regression test for #7512 ordering across nullable Foreign Key...
""" mbed SDK Copyright (c) 2011-2013 ARM Limited Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in wr...
# -*- coding: utf-8 -*- # Copyright (C) 2014-2016 Andrey Antukh <[EMAIL]> # Copyright (C) 2014-2016 Jesús Espino <[EMAIL]> # Copyright (C) 2014-2016 David Barragán <[EMAIL]> # Copyright (C) 2014-2016 Alejandro Alonso <[EMAIL]> # This program is free software: you can redistribute it and/or modify # it under the terms o...
#!/usr/bin/env python # # Copyright 2007 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...