text
stringlengths
475
200k
# Copyright 2014 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
#! /usr/bin/env python """Token constants (from "token.h").""" # Taken from Python (r53757) and modified to include some tokens # originally monkeypatched in by pgen2.tokenize #--start constants-- ENDMARKER = 0 NAME = 1 NUMBER = 2 STRING = 3 NEWLINE = 4 INDENT = 5 DEDENT = 6 LPAR = 7 RPAR = 8 LSQB = 9 RSQB = 10 C...
from collections.abc import Iterable from numbers import Real, Integral from warnings import warn import numpy as np import openmc.checkvalue as cv from openmc.stats import Tabular, Univariate, Discrete, Mixture from .function import Tabulated1D, INTERPOLATION_SCHEME from .angle_energy import AngleEnergy from .data i...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 Justin Santa Barbara # 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.apach...
from copy import copy import json from django.test import TestCase from .factories import ChildModelFactory from deep_collector.compat.serializers import MultiModelInheritanceSerializer class TestMultiModelInheritanceSerializer(TestCase): def test_that_parent_model_fields_are_in_serializated_object_if_parent_is...
# Based on the chroot connection plugin by Maykel Moya # # Connection plugin for configuring docker containers # (c) 2014, Lorin Hochstein # (c) 2015, Leendert Brouwer # (c) 2015, Toshio Kuratomi <[EMAIL]> # # Maintainer: Leendert Brouwer (https://github.com/objectified) # # This file is part of Ansible # # Ansible is ...
# -*-*- encoding: utf-8 -*-*- # # This is gdata.photos.geo, implementing geological positioning in gdata structures # # $Id: __init__.py 81 2007-10-03 14:41:42Z havard.gulldahl $ # # Copyright 2007 Håvard Gulldahl # Portions copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License");...
#!/usr/bin/env python """ Python Character Mapping Codec for ROT13. This codec de/encodes from str to str. Written by Marc-Andre Lemburg ([EMAIL]). """ import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self, input, errors='strict'): return (input.translate(rot13_map), len(input)) ...
# MolMod is a collection of molecular modelling tools for python. # Copyright (C) 2007 - 2008 Toon Verstraelen <[EMAIL]> # # This file is part of MolMod. # # MolMod 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 Foundati...
from django.http import HttpResponseForbidden from django.template import Context, Template from django.conf import settings # We include the template inline since we need to be able to reliably display # this error message, especially for the sake of developers, and there isn't any # other way of making it available ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Library for gateway tests Copyright 2009 Glencoe Software, Inc. All rights reserved. Use is subject to license terms supplied in LICENSE.txt """ import omero from omero.rtypes import rstring from omero.gateway.scripts import dbhelpers dbhelpers.USERS = { ...
import pickle import io import collections from test import support from test.pickletester import AbstractPickleTests from test.pickletester import AbstractPickleModuleTests from test.pickletester import AbstractPersistentPicklerTests from test.pickletester import AbstractPicklerUnpicklerObjectTests from test.picklet...
""" Test Result ----------- Provides a TextTestResult that extends unittest's _TextTestResult to provide support for error classes (such as the builtin skip and deprecated classes), and hooks for plugins to take over or extend reporting. """ import logging try: # 2.7+ from unittest.runner import _TextTestResu...
# -*- Mode: python; coding: utf-8; tab-width: 8; indent-tabs-mode: t; -*- # # Copyright 2006, James Livingston <[EMAIL]> # Copyright 2006, Ed Catmur <[EMAIL]> # Copyright 2007, Jonathan Matthew # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public Licens...
import ConfigParser import boto.exception import boto.s3.connection import bunch import itertools import os import random import string from .utils import region_sync_meta s3 = bunch.Bunch() config = bunch.Bunch() targets = bunch.Bunch() # this will be assigned by setup() prefix = None calling_formats = dict( o...
from django.db.utils import DatabaseError try: from django.utils.six.moves import _thread as thread except ImportError: from django.utils.six.moves import _dummy_thread as thread from contextlib import contextmanager from django.conf import settings from django.db import DEFAULT_DB_ALIAS from django.db.backen...
import datetime import time from django.template import loader, RequestContext from django.core.exceptions import ObjectDoesNotExist from django.core.xheaders import populate_xheaders from django.db.models.fields import DateTimeField from django.http import Http404, HttpResponse import warnings warnings.warn( 'Fu...
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2012 Vincent Jacques <[EMAIL]> # # Copyright 2012 Zearin <[EMAIL]> #...
# Copyright 2010 Jacob Kaplan-Moss # # 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 ...
# # Copyright 2015 Peter Sprygada <[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...
from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Building(models.Model): name = models.CharField(max_length=10) def __str__(self): return "Building: %s" % self.name @python_2_unicod...
from __future__ import absolute_import import six from sentry.exceptions import InvalidConfiguration from sentry.utils import warnings class Version(tuple): def __str__(self): return '.'.join(map(six.binary_type, self)) def summarize(sequence, max=3): items = sequence[:max] remainder = len(seq...
from django.test import TestCase from django.core.files import File from django.core.urlresolvers import reverse from django.test.utils import override_settings from ratticweb.tests.helper import TestData from cred.models import Cred, Group import os here = os.path.abspath(os.path.dirname(__file__)) ssh_keys = os.pa...
import os import re import sys import copy import glob import atexit import tempfile import subprocess import shutil import multiprocessing import textwrap import importlib.util from threading import local as tlocal import distutils from distutils.errors import DistutilsError # stores temporary directory of each thre...
# 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. """Parses options for the instrumentation tests.""" import os # TODO(gkanwar): Some downstream scripts current rely on these functions # existing. Thi...
# Copyright (c) 2011 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. """SiteCompare command to time page loads Loads a series of URLs in a series of browsers (and browser versions) and measures how long the page takes to ...
__author__ = 'xuanzhui' # http://docs.python-requests.org/en/latest/user/quickstart/ import requests, re def printDebugInfo(resp): print('respond status code : ', resp.status_code) print('respond cookies : ', resp.cookies) print('respond headers : ', resp.headers) print('respond content : ', resp.con...
from io import StringIO import re import sys import datetime import unittest import tornado.escape from tornado.escape import utf8 from tornado.util import ( raise_exc_info, Configurable, exec_in, ArgReplacer, timedelta_to_seconds, import_object, re_unescape, is_finalizing, ) import ty...
# Copyright (c) 2013 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...
# Copyright (c) 2003-2014 LOGILAB S.A. (Paris, FRANCE). # 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...
#!/usr/bin/python from optparse import OptionParser import re import subprocess import sys """ This script generates a release note from the output of git log between the specified tags. Options: --issues Show output the commits with issues associated with them. --issue-numbers Show outputs issue numbers o...
# -*- 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...
# Copyright 2010-2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
#!/usr/bin/env python3 # 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 contextlib import contextmanager import json import os from selenium import webdriver from ...
# -*- coding: utf-8 -*- from openerp.osv import fields, osv class ResCompany(osv.Model): _inherit = "res.company" def _get_paypal_account(self, cr, uid, ids, name, arg, context=None): Acquirer = self.pool['payment.acquirer'] company_id = self.pool['res.users'].browse(cr, uid, uid, context=co...
# Copyright (C) 2003-2007, 2009, 2010 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED ...
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Michael DeHaan <[EMAIL]>, and others # # 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 ...
import unittest import sys import os from test import support # Skip this test if the _tkinter module wasn't built. _tkinter = support.import_module('_tkinter') # Make sure tkinter._fix runs to set up the environment tkinter = support.import_fresh_module('tkinter') from tkinter import Tcl from _tkinter import TclErr...
#!/usr/bin/python # # 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 distribut...
# Copyright 2012, 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...
#!python # -*- coding: latin-1 -*- """ (c) by nobisoft 2016- """ # Imports ## Standard from __future__ import print_function import unittest import StringIO ## Contributed ## nobi ## Project #import Model.Installer # to resolve import sequence issues from OrganizationByDate import OrganizationByDate class TestOrg...
# -*- encoding: utf-8 -*- ############################################################################## # # Stock Packaging Usability UL module for Odoo # Copyright (C) 2014 Akretion (http://www.akretion.com) # @author Alexis de Lattre <[EMAIL]> # # This program is free software: you can redistribute it an...
# -*- coding: utf-8 -*- from south.db import db from django.db import models from cuZmeura.ads.models import * class Migration: def forwards(self, orm): # Adding model 'Article' db.create_table('ads_article', ( ('id', orm['ads.article:id']), ('title', orm['ads...
#Copyright ReportLab Europe Ltd. 2000-2012 #see license.txt for license details __doc__='' __version__=''' $Id$ ''' #REPORTLAB_TEST_SCRIPT import sys from reportlab.platypus import * from reportlab.lib.styles import getSampleStyleSheet from reportlab.rl_config import defaultPageSize PAGE_HEIGHT=defaultPageSize[1] sty...
"""Generated message classes for resourceviews version v1beta1. The Resource View API allows users to create and manage logical sets of Google Compute Engine instances. """ from protorpc import messages package = 'resourceviews' class Label(messages.Message): """The Label to be applied to the resource views. ...
#!/usr/bin/env python # ex:ts=4:sw=4:sts=4:et # Opie recipe checksum rewriter # # A crude script for rewriting recipes to contain checksum information # # Some portions copied from oe-source-checker.py, copyright (C) 2007 OpenedHand import os import sys def rewrite(recpfilename, sourcedir): insrc = False srcfirst ...
#!/usr/bin/env python import getopt import sys import string import re import time sys.path.insert(1,"..") from SOAPpy import SOAP import traceback DEFAULT_SERVERS_FILE = './inventory.servers' DEFAULT_METHODS = ('SimpleBuy', 'RequestForQuote','Buy','Ping') def usage (error = None): sys.stdout = sys.std...
""" Devices controlled my the ISY are represented as "nodes" on the ISY device and with Node Objects in the API There are three types of Node Object: * IsyNode - Node Object Represent lights, switches, motion sensors * IsyScene - Scene Object Represents Scenes contains Nodes that comprise a "...
# # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation # # 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 li...
# This is a part of the external Repeat One Song plugin for Rhythmbox # # Author: Eduardo Mucelli Rezende Oliveira # E-mail: [EMAIL] or [EMAIL] # Version: 0.4 (Unstable) for Rhythmbox 3.0.1 or later # # # reworked for alternative-toolbar # Author: fossfreedom # # This program is free software: you can redistribute it a...
""" Python 'base64_codec' Codec - base64 content transfer encoding Unlike most of the other codecs which target Unicode, this codec will return Python string objects for both encode and decode. Written by Marc-Andre Lemburg ([EMAIL]). """ import codecs, base64 ### Codec APIs def base64_enco...
# This file is part of Androguard. # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # All rights reserved. # # Androguard 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 th...
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for epoll wrapper. """ import socket, errno, time from twisted.trial import unittest from twisted.python.util import untilConcludes try: from twisted.python import _epoll except ImportError: _epoll = None class EPoll(unittes...
#========================================================================= # StrSearchFunc_test.py #========================================================================= # # PyMTL Functional Model of strsearch. from pymtl import * from StrSearchOO_test import strings, docs, reference #---------------------...
""" Functions for converting from DOS to UNIX line endings """ from __future__ import division, absolute_import, print_function import sys, re, os def dos2unix(file): "Replace CRLF with LF in argument files. Print names of changed files." if os.path.isdir(file): print(file, "Directory!") ret...
# Generated by Django 2.0 on 2018-06-07 18:04 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('products', '0007_productindexpage_feed_image'), ] operations = [ migrations.AlterField( model_nam...
#!/usr/bin/env python """ A distutils installation script for txBOM. """ from distutils.core import setup import txbom long_description = """txBOM is a Python Twisted package that lets you retrieve forecasts and observations from the Australian Bureau of Meteorology (BOM). Use it to integrate non blocking retrieva...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- import os import os.path import oauth2 as oauth import json from font_colors import font_colors import getrel import setfav import time from torrentApi import torrent_api as api #name of config file where all keys get stored config = '~/.config/getrel/getrel.json' nzb_pa...
# -*- coding: utf-8 -*- #!/usr/bin/env python # # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2007 Donald N. Allingham # Copyright (C) 2002 Gary Shao # Copyright (C) 2007 Brian G. Matherly # Copyright (C) 2009 Benny Malengier # Copyright (C) 2009 Gary Burton # # This pr...
# -*- coding: utf-8 -*- from django.contrib.sites.models import Site from django.test.utils import override_settings from cms.models import Page from cms.api import create_page, assign_user_to_page from cms.cache.permissions import (get_permission_cache, set_permission_cache, clear_u...
# Copyright 2016 Joel Dunham # # 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 writi...
import numpy import chainer from chainer import cuda from chainer import function from chainer import utils from chainer.utils import type_check if cuda.cudnn_enabled: cudnn = cuda.cudnn _mode = cudnn.cudnn.CUDNN_ACTIVATION_RELU class GuidedReLU(function.Function): """Rectified Linear Unit.""" # T...
# Generated by h2py from /usr/include/sys/termios.h # Included from sys/ttydev.h B0 = 0 B50 = 0000001 B75 = 0000002 B110 = 0000003 B134 = 0000004 B150 = 0000005 B200 = 0000006 B300 = 0000007 B600 = 0000010 B1200 = 0000011 B1800 = 0000012 B2400 = 0000013 B4800 = 0000014 B9600 = 0000015 B19200 = 0000016 EXTA = 0000016 B...
# # 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...
# -*- coding: utf-8 -*- """ markupsafe._native ~~~~~~~~~~~~~~~~~~ Native Python implementation the C module is not compiled. :copyright: (c) 2010 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from markupsafe import Markup from markupsafe._compat import text_type def escape(...
# 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...
# -*- coding: utf-8 -*- from cms.models import CMSPlugin, Placeholder from cms.models.aliaspluginmodel import AliasPluginModel from cms.models.placeholderpluginmodel import PlaceholderReference from cms.plugin_base import CMSPluginBase, PluginMenuItem from cms.plugin_pool import plugin_pool from cms.plugin_rendering im...
from __future__ import division """ Author: Keith Bourgoin, Emmett Butler """ __license__ = """ Copyright 2015 Parse.ly, 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.o...
""" ========================================= Comparison of Manifold Learning methods ========================================= An illustration of dimensionality reduction on the S-curve dataset with various manifold learning methods. For a discussion and comparison of these algorithms, see the :ref:`manifold module...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import datetime, timedelta import uuid from odoo import fields, models, api, registry, _ from odoo.addons.base.models.res_partner import _tz_get from odoo.exceptions import UserError from odoo.tools.misc i...
"""Add principal group system Revision ID: 1d84b7d16aa9 Revises: 179651effcbd Create Date: 2015-08-07 00:05:42.996683 """ # revision identifiers, used by Alembic. revision = '1d84b7d16aa9' down_revision = '179651effcbd' from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql def u...
""" Classes to support XML for serial devices http://libvirt.org/formatdomain.html#elementCharSerial """ from virttest.libvirt_xml import base, accessors, xcepts from virttest.libvirt_xml.devices.character import CharacterBase class Serial(CharacterBase): __slots__ = ('protocol_type', 'target_port', 'target_ty...
#!/usr/bin/env python ######################################################################## # # (C) 2013, 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 S...
# PyDia Self Documentation Series - Part II : Object Types # Copyright (c) 2003, Hans Breuer <[EMAIL]> # # generates a new diagram which contains all the currently # registered object types sorted by their containing package # # This program is free software; you can redistribute it and/or modify # ...
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Alexander Bulimov <[EMAIL]> # based on lvol module by Jeroen Hoekx <[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 Softw...
from __future__ import unicode_literals from .common import InfoExtractor class FoxgayIE(InfoExtractor): _VALID_URL = r'http://(?:www\.)?foxgay\.com/videos/(?:\S+-)?(?P<id>\d+)\.shtml' _TEST = { 'url': 'http://foxgay.com/videos/fuck-turkish-style-2582.shtml', 'md5': '80d72beab5d04e1655a56ad37...
######################################################################### # # Copyright (c) 2003-2004 Danny Brewer [EMAIL] # Copyright (C) 2004-2010 OpenERP SA (<http://openerp.com>). # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # Li...
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ansible by Red Hat, inc # # This file is part of Ansible by Red Hat # # 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 Li...
import sys, os from subprocess import call as subcall class Detect(): doc_path = '' icon = '' def open_method(filename): pass def resource_path(relative_path): """ Get absolute path to resource, works for dev and for PyInstaller """ try: # PyInstaller creates a temp folder and sto...
import unittest from test import support # For scope testing. g = "Global variable" class DictComprehensionTest(unittest.TestCase): def test_basics(self): expected = {0: 10, 1: 11, 2: 12, 3: 13, 4: 14, 5: 15, 6: 16, 7: 17, 8: 18, 9: 19} actual = {k: k + 10 for k in range(10)...
#*************************************************************************** #* * #* Copyright (c) 2011, 2012 * #* Jose Luis Cercos Pita <[EMAIL]> * #* ...
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( parse_iso8601, int_or_none, xpath_attr, xpath_element, ) class TwentyFourVideoIE(InfoExtractor): IE_NAME = '24video' _VALID_URL = r'''(?x) https?:// ...
# Copyright (c) 2009 NHN 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 follow...
from __future__ import unicode_literals import unittest from django.db import connection, migrations, models, transaction from django.db.migrations.migration import Migration from django.db.migrations.state import ProjectState from django.db.models.fields import NOT_PROVIDED from django.db.transaction import atomic f...
#!/usr/bin/python # # Copyright (C) 2008 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 ...
# -*- coding: utf-8 -*- from collections import OrderedDict from gluon import current, URL from gluon.storage import Storage from s3 import S3ReportRepresent def config(settings): """ Settings for the SHARE Template Migration Issues: req_need.name is now length=64 (SHARE...
''' The resources module provides the Resources class for easily configuring how BokehJS code and CSS resources should be located, loaded, and embedded in Bokeh documents. Also provides some pre-configured Resources objects: Attributes: CDN : load minified BokehJS from CDN INLINE : provide minified BokehJS fr...
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2011, 2012 CERN. # # Invenio 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...
""" Python 'unicode-escape' Codec Written by Marc-Andre Lemburg ([EMAIL]). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """ import codecs ### Codec APIs class Codec(codecs.Codec): # Note: Binding these as C functions will result in the class not # converting them to methods. This is intended. ...
import os import sys import time import subprocess import threading from itertools import chain from werkzeug._internal import _log from werkzeug._compat import PY2, iteritems, text_type def _iter_module_files(): """This iterates over all relevant Python files. It goes through all loaded files from modules,...
#!/usr/bin/env python """JSON token scanner """ import re def _import_c_make_scanner(): try: from mapreduce.lib.simplejson._speedups import make_scanner return make_scanner except ImportError: return None c_make_scanner = _import_c_make_scanner() __all__ = ['make_scanner'] NUMBER_RE = ...
# syscat.py - parses some system catalogs # inspired from the PostgreSQL tutorial # adapted to Python 1995 by Pascal ANDRE print """ __________________________________________________________________ MODULE SYSCAT.PY : PARSES SOME POSTGRESQL SYSTEM CATALOGS This module is designed for being imported from python prom...
import logging import datetime import decimal import pytz from ipware.ip import get_ip from django.db.models import Q from django.conf import settings from django.contrib.auth.models import Group from django.shortcuts import redirect from django.http import ( HttpResponse, HttpResponseRedirect, HttpResponseNotFound...
#!/usr/bin/python # # Copyright (C) 2008 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...
""" An auto-completion window for IDLE, used by the AutoComplete extension """ from tkinter import * from idlelib.MultiCall import MC_SHIFT from idlelib.AutoComplete import COMPLETE_FILES, COMPLETE_ATTRIBUTES HIDE_VIRTUAL_EVENT_NAME = "<<autocompletewindow-hide>>" HIDE_SEQUENCES = ("<FocusOut>", "<ButtonPress>") KEYPR...
# -*- 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 'RestrictedCourse.disable_access_check' db.add_column('emb...
''' Plugin for CudaText editor Authors: Andrey Kvichansky (kvichans on github.com) Alexey Torgashin (CudaText) Version: '0.8.9 2021-04-05' ''' import os import cudatext as app from cudatext import ed import cudatext_cmd as cmds import cudax_lib as apx from .cd_p...
# coding=utf-8 # Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # Hope you'll enjoy and contribute to this project, # powered by Canal TP (www.canaltp.fr). # Help us simplify mobility a...
import logging from django.contrib.gis.gdal import GDALException from django.contrib.gis.geos import GEOSException, GEOSGeometry from django.forms.widgets import Textarea from django.template import loader from django.utils import six, translation # Creating a template context that contains Django settings # values n...
import attr from navmazing import NavigateToAttribute from navmazing import NavigateToSibling from cfme.common import Taggable from cfme.common import TaggableCollection from cfme.common import TagPageView from cfme.containers.provider import ContainerObjectAllBaseView from cfme.containers.provider import ContainerObj...