repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
garbled1/ansible | refs/heads/devel | lib/ansible/modules/network/illumos/dladm_vlan.py | 33 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2016, Adam Števko <adam.stevko@gmail.com>
# 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',
... |
CiscoSystems/quantum | refs/heads/master | neutron/db/__init__.py | 32 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 Nicira 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.apach... |
OpenAds/OpenAds | refs/heads/develop | OpenAds/settings.py | 1 | # Django settings for openads project.
import os
DEBUG = True
TEMPLATE_DEBUG = DEBUG
BASE_PATH = os.path.join(os.path.dirname(__file__), '..')
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3', # Only mysql s... |
freedomtan/tensorflow | refs/heads/master | tensorflow/python/kernel_tests/random/multinomial_op_big_test.py | 27 | # 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... |
v-iam/azure-sdk-for-python | refs/heads/master | azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/models/deployment_validate_result.py | 2 | # 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 ... |
illicitonion/givabit | refs/heads/master | lib/sdks/google_appengine_1.7.1/google_appengine/google/appengine/_internal/django/utils/tzinfo.py | 23 | "Implementation of tzinfo classes for use with datetime.datetime."
import time
from datetime import timedelta, tzinfo
from google.appengine._internal.django.utils.encoding import smart_unicode, smart_str, DEFAULT_LOCALE_ENCODING
class FixedOffset(tzinfo):
"Fixed offset in minutes east from UTC."
def __init__(... |
leeseuljeong/leeseulstack_neutron | refs/heads/master | neutron/tests/unit/brocade/test_brocade_db.py | 26 | # Copyright (c) 2013 OpenStack Foundation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... |
PopCap/GameIdea | refs/heads/master | Engine/Source/ThirdParty/HTML5/emsdk/Win64/python/2.7.5.3_64bit/Lib/site-packages/simplejson/tests/test_encode_basestring_ascii.py | 147 | from unittest import TestCase
import simplejson.encoder
from simplejson.compat import b
CASES = [
(u'/\\"\ucafe\ubabe\uab98\ufcde\ubcda\uef4a\x08\x0c\n\r\t`1~!@#$%^&*()_+-=[]{}|;:\',./<>?', '"/\\\\\\"\\ucafe\\ubabe\\uab98\\ufcde\\ubcda\\uef4a\\b\\f\\n\\r\\t`1~!@#$%^&*()_+-=[]{}|;:\',./<>?"'),
(u'\u0123\u4567\... |
sajeeshcs/nested_quota_latest | refs/heads/master | nova/tests/unit/test_cinder.py | 55 | # Copyright 2011 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... |
mozvip/CouchPotatoServer | refs/heads/develop | libs/requests/packages/chardet/euckrprober.py | 236 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org 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 Reserved.
#
# Con... |
hwu25/AppPkg | refs/heads/trunk | Applications/Python/Python-2.7.2/Lib/encodings/idna.py | 51 | # This module implements the RFCs 3490 (IDNA) and 3491 (Nameprep)
import stringprep, re, codecs
from unicodedata import ucd_3_2_0 as unicodedata
# IDNA section 3.1
dots = re.compile(u"[\u002E\u3002\uFF0E\uFF61]")
# IDNA section 5
ace_prefix = "xn--"
uace_prefix = unicode(ace_prefix, "ascii")
# This assu... |
DarrelHsu/cvsClient | refs/heads/master | third_party/pylint/pyreverse/diadefslib.py | 24 | # Copyright (c) 2000-2010 LOGILAB S.A. (Paris, FRANCE).
# http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# 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, o... |
elieux/pacman | refs/heads/master | test/pacman/tests/sync102.py | 27 | self.description = "Sysupgrade with a newer local package"
sp = pmpkg("dummy", "0.9-1")
sp.files = ["bin/foo", "bin/bar"]
lp = pmpkg("dummy")
lp.files = ["bin/foo", "bin/baz"]
self.addpkg2db("sync", sp)
self.addpkg2db("local", lp)
self.args = "-Su"
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_VERSION=dummy|1.... |
yoe/veyepar | refs/heads/master | dj/scripts/ckblip.py | 3 | #!/usr/bin/python
# ckblip.py
# checks metadata on blib
# like 'is there a flash version?'
# or 'if a format is not on blip, is it local?'
# and maybe upload it.
# and maybe delete it:
# if the .fvl is not the same file size as the local copy on disk,
# delete the one on blip.
import os
import xml.etree.ElementTree
... |
sarnold/exaile | refs/heads/master | plugins/awn/awn_prefs.py | 5 | # Copyright (C) 2009-2010 Abhishek Mukherjee <abhishek.mukher.g@gmail.com>
#
# 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, or (at your option)
# any later version.
#
# This p... |
ReganBell/QReview | refs/heads/master | build/lib/networkx/algorithms/approximation/dominating_set.py | 33 | # -*- coding: utf-8 -*-
"""
**************************************
Minimum Vertex and Edge Dominating Set
**************************************
A dominating set for a graph G = (V, E) is a subset D of V such that every
vertex not in D is joined to at least one member of D by some edge. The
domination number gamma(G)... |
KitKatXperience/platform_external_chromium_org | refs/heads/kk | tools/bisect-perf-regression.py | 23 | #!/usr/bin/env python
# Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Performance Test Bisect Tool
This script bisects a series of changelists using binary search. It starts at
a bad revision where... |
abhishek-ch/hue | refs/heads/master | desktop/core/ext-py/Django-1.6.10/django/core/checks/compatibility/base.py | 119 | from __future__ import unicode_literals
import warnings
from django.core.checks.compatibility import django_1_6_0
COMPAT_CHECKS = [
# Add new modules at the top, so we keep things in descending order.
# After two-three minor releases, old versions should get dropped.
django_1_6_0,
]
def check_compatibi... |
Conflei/ATI | refs/heads/master | [ATI] Misfenterest/Frontend/env/lib/python2.6/site-packages/pip/wheel.py | 51 | """
Support for installing and building the "wheel" binary package format.
"""
from __future__ import absolute_import
import compileall
import csv
import errno
import functools
import hashlib
import logging
import os
import os.path
import re
import shutil
import stat
import sys
import tempfile
import warnings
from ba... |
sustainingtechnologies/django-guardian | refs/heads/master | guardian/testapp/tests/mixins_test.py | 42 | from __future__ import unicode_literals
from django.contrib.contenttypes.models import ContentType
from django.contrib.auth.models import AnonymousUser
from django.core.exceptions import ImproperlyConfigured
from django.core.exceptions import PermissionDenied
from django.http import HttpResponse
from django.test impor... |
kennethreitz/pipenv | refs/heads/master | pipenv/patched/notpip/_internal/commands/search.py | 1 | # The following comment should be removed at some point in the future.
# mypy: disallow-untyped-defs=False
from __future__ import absolute_import
import logging
import sys
import textwrap
from collections import OrderedDict
from pipenv.patched.notpip._vendor import pkg_resources
from pipenv.patched.notpip._vendor.pa... |
estaban/pyload | refs/heads/stable | module/remote/socketbackend/create_ttypes.py | 41 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import inspect
import sys
from os.path import abspath, dirname, join
path = dirname(abspath(__file__))
module = join(path, "..", "..")
sys.path.append(join(module, "lib"))
sys.path.append(join(module, "remote"))
from thriftbackend.thriftgen.pyload import ttypes
from thr... |
dastin1015/android_kernel_htc_villec2 | refs/heads/master | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Core.py | 11088 | # Core.py - Python extension for perf script, core functions
#
# Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com>
#
# This software may be distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
from collections import defaultdict
def aut... |
rcdosado/URO-MIS | refs/heads/master | employees/migrations/0001_initial.py | 1 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-02-16 04:30
from __future__ import unicode_literals
import datetime
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
... |
obi-two/Rebelion | refs/heads/master | data/scripts/templates/object/static/structure/corellia/shared_corl_imprv_wall_4x32_s03.py | 2 | #### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Static()
result.template = "object/static/structure/corellia/shared_corl_imprv_wall_4x32_s03.iff"
result.attribut... |
alajara/servo | refs/heads/master | components/script/dom/bindings/codegen/parser/tests/test_exposed_extended_attribute.py | 127 | import WebIDL
def WebIDLTest(parser, harness):
parser.parse("""
[PrimaryGlobal] interface Foo {};
[Global=(Bar1,Bar2)] interface Bar {};
[Global=Baz2] interface Baz {};
[Exposed=(Foo,Bar1)]
interface Iface {
void method1();
[Exposed=Bar1]
readonly attribute a... |
CENDARI/scrapyd | refs/heads/master | scrapyd/__init__.py | 9 | import pkgutil
__version__ = pkgutil.get_data(__package__, 'VERSION').strip()
version_info = tuple(__version__.split('.')[:3])
from scrapy.utils.misc import load_object
from scrapyd.config import Config
def get_application(config=None):
if config is None:
config = Config()
apppath = config.get('appli... |
WarmongeR1/django-categories | refs/heads/master | doc_src/code_examples/custom_categories1.py | 13 | from categories.models import CategoryBase
class SimpleCategory(CategoryBase):
"""
A simple of catgorizing example
"""
class Meta:
verbose_name_plural = 'simple categories'
|
chengduoZH/Paddle | refs/heads/develop | python/paddle/fluid/core.py | 2 | # Copyright (c) 2019 PaddlePaddle 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 appli... |
hainm/binder | refs/heads/master | binder/binderd/log_reader.py | 1 | import datetime
import os
from binder.binderd.module import BinderDModule
from binder.settings import LogSettings
from binder.log import *
class LogReader(BinderDModule):
TAG = "log_reader"
def _parse_time(self, t):
return datetime.datetime.strptime(t, LogSettings.TIME_FORMAT)
def _parse_time_l... |
2ndQuadrant/ansible | refs/heads/master | test/runner/lib/__init__.py | 174 | """Support code for Ansible testing infrastructure."""
|
DarthMaulware/EquationGroupLeaks | refs/heads/master | Leak #5 - Lost In Translation/windows/exploits/ZIBE/pyreadline/console/console_attributes.py | 11 |
FOREGROUND_BLUE = 0x0001
FOREGROUND_GREEN = 0x0002
FOREGROUND_RED = 0x0004
FOREGROUND_INTENSITY = 0x0008
BACKGROUND_BLUE = 0x0010
BACKGROUND_GREEN = 0x0020
BACKGROUND_RED = 0x0040
BACKGROUND_INTENSITY = 0x0080
COMMON_LVB_LEADING_BYTE = 0x0100
COMM... |
saurabh6790/omnitech-app | refs/heads/master | utilities/doctype/address/__init__.py | 37694 | from __future__ import unicode_literals
|
nisse3000/pymatgen | refs/heads/master | pymatgen/io/abinit/tests/__init__.py | 37694 | from __future__ import unicode_literals
|
47lining/ansible-modules-core | refs/heads/devel | cloud/amazon/rds_subnet_group.py | 3 | #!/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 distributed... |
2014c2g12/c2g12 | refs/heads/master | wsgi/exts/w2/static/Brython2.0.0-20140209-164925/Lib/struct.py | 817 | __all__ = [
# Functions
'calcsize', 'pack', 'pack_into', 'unpack', 'unpack_from',
# Classes
'Struct',
# Exceptions
'error'
]
from _struct import *
from _struct import _clearcache
from _struct import __doc__
|
anryko/ansible | refs/heads/devel | lib/ansible/modules/network/cloudengine/ce_stp.py | 13 | #!/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... |
2013Commons/HUE-SHARK | refs/heads/master | build/env/lib/python2.7/site-packages/Django-1.2.3-py2.7.egg/django/db/backends/postgresql/introspection.py | 308 | from django.db.backends import BaseDatabaseIntrospection
class DatabaseIntrospection(BaseDatabaseIntrospection):
# Maps type codes to Django Field types.
data_types_reverse = {
16: 'BooleanField',
20: 'BigIntegerField',
21: 'SmallIntegerField',
23: 'IntegerField',
25: 'T... |
MGautier/security-sensor | refs/heads/master | branches/webenv/secproject/secapp/kernel/databasemodel.py | 2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sqlite3 as db
import sys
from columnsdatabase import ColumnsDatabase
from rowsdatabase import RowsDatabase
from datetime import datetime
# Author: Moisés Gautier Gómez
# Proyecto fin de carrera - Ing. en Informática
# Universidad de Granada
class DatabaseModel(ob... |
ysekky/chainer | refs/heads/master | chainer/links/connection/tree_lstm.py | 2 | from chainer.functions.activation import tree_lstm
from chainer.functions.array import concat
from chainer.functions.array import split_axis
from chainer.links.connection import linear
from chainer import link
from chainer import utils
class ChildSumTreeLSTM(link.Chain):
"""Child-Sum TreeLSTM unit.
This is ... |
aeklant/scipy | refs/heads/master | scipy/sparse/spfuncs.py | 14 | """ Functions that operate on sparse matrices
"""
__all__ = ['count_blocks','estimate_blocksize']
from .csr import isspmatrix_csr, csr_matrix
from .csc import isspmatrix_csc
from ._sparsetools import csr_count_blocks
def extract_diagonal(A):
raise NotImplementedError('use .diagonal() instead')
#def extract_dia... |
ClaudeZoo/volatility | refs/heads/master | volatility/protos.py | 58 | protos = {
0:"HOPOPT",
1:"ICMP",
2:"IGMP",
3:"GGP",
4:"IPv4",
5:"ST",
6:"TCP",
7:"CBT",
8:"EGP",
9:"IGP",
10:"BBN-RCC-MON",
11:"NVP-II",
12:"PUP",
13:"ARGUS",
14:"EMCON",... |
palladius/gcloud | refs/heads/master | packages/gsutil/boto/boto/s3/multidelete.py | 244 | # Copyright (c) 2011 Mitch Garnaat http://garnaat.org/
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, m... |
protochron/aurora | refs/heads/master | src/test/python/apache/aurora/executor/common/test_executor_timeout.py | 13 | #
# 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
# distributed under ... |
zachcp/qiime | refs/heads/master | scripts/merge_mapping_files.py | 15 | #!/usr/bin/env python
# File created on 09 Feb 2010
from __future__ import division
__author__ = "Greg Caporaso"
__copyright__ = "Copyright 2011, The QIIME Project"
__credits__ = ["Greg Caporaso", "Adam Robbins-Pianka"]
__license__ = "GPL"
__version__ = "1.9.1-dev"
__maintainer__ = "Greg Caporaso"
__email__ = "gregcap... |
teslaji/homebase | refs/heads/master | venv/HomeBase/lib/python2.7/site-packages/pip/_vendor/colorama/winterm.py | 442 | # Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
from . import win32
# from wincon.h
class WinColor(object):
BLACK = 0
BLUE = 1
GREEN = 2
CYAN = 3
RED = 4
MAGENTA = 5
YELLOW = 6
GREY = 7
# from wincon.h
class WinStyle(object):
NORMAL ... |
meejah/crossbarexamples | refs/heads/master | work/apidoc/generate.py | 6 | import mistune
from pygments import highlight
from pygments.lexers import get_lexer_by_name
from pygments.formatters import HtmlFormatter
import json
TEMPLATE = """
<!doctype html>
<html>
<head>
<style>
{0}
</style>
</head>
<body>
{1}
</body>
</html>
"""
class MyRenderer(mistun... |
fmassaretto/Introduction-Programming-Python | refs/heads/master | PythonApplication2/PythonApplication2/PythonApplication2.py | 19 | import turtle
#nbrsides = 5
#for weirdname in range(nbrsides) :
# turtle.forward(100)
# turtle.right(360/nbrsides)
# for steps in range(nbrsides) :
# turtle.forward(50)
# turtle.right(360/nbrsides)
for colour in ['red','green','blue','black'] :
turtle.color(colour)
turtle.forward(100)
... |
NickDaly/GemRB-FixConfig-Branch | refs/heads/master | gemrb/GUIScripts/CommonWindow.py | 2 | # -*-python-*-
# GemRB - Infinity Engine Emulator
# Copyright (C) 2010 The GemRB Project
#
# 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) ... |
librecore-org/librecore | refs/heads/coreboot-cleaned | util/ipqheader/mbncat.py | 12 | #!/usr/bin/env python2
# Copyright (c) 2014, The Linux Foundation. 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
# noti... |
2015fallhw/user9999 | refs/heads/master | js/Brython3.2.2-20150927-180218/Lib/VFS_import.py | 738 | import os
from browser import doc
#_scripts=doc.createElement('script')
#_scripts.src="/src/py_VFS.js"
#_scripts.type="text/javascript"
#doc.get(tag='head')[0].appendChild(_scripts)
VFS=dict(JSObject(__BRYTHON__.py_VFS))
class VFSModuleFinder:
def __init__(self, path_entry):
print("in VFSModuleFinder")
... |
feist/pcs | refs/heads/master | pcs/lib/commands/constraint/order.py | 1 | from functools import partial
from pcs.lib.cib.constraint import order
import pcs.lib.commands.constraint.common
#configure common constraint command
show = partial(
pcs.lib.commands.constraint.common.show,
order.TAG_NAME,
lambda element: element.attrib.has_key('first')
)
#configure common constraint comm... |
taedla01/MissionPlanner | refs/heads/master | Lib/site-packages/scipy/ndimage/tests/test_filters.py | 55 | ''' Some tests for filters '''
import numpy as np
from numpy.testing import assert_equal, assert_raises
import scipy.ndimage as sndi
def test_ticket_701():
# Test generic filter sizes
arr = np.arange(4).reshape((2,2))
func = lambda x: np.min(x)
res = sndi.generic_filter(arr, func, size=(1,1))
#... |
goddardl/gaffer | refs/heads/master | startup/gui/formats.py | 2 | ##########################################################################
#
# Copyright (c) 2013, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistrib... |
gangadharkadam/saloon_frappe_install | refs/heads/master | frappe/patches/v4_0/website_sitemap_hierarchy.py | 73 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
# frappe.db.sql("""update `tabWebsite Route` ws set ref_doctype=(select wsc.ref_doctype
# from `tabWebsite Template` wsc where wsc.name=ws.websit... |
marc-sensenich/ansible | refs/heads/devel | lib/ansible/modules/network/eos/eos_user.py | 58 | #!/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... |
b-carter/numpy | refs/heads/master | tools/test-installed-numpy.py | 106 | #!/usr/bin/env python
from __future__ import division, absolute_import, print_function
# A simple script to test the installed version of numpy by calling
# 'numpy.test()'. Key features:
# -- convenient command-line syntax
# -- sets exit status appropriately, useful for automated test environments
# It would be b... |
twister/twister.github.io | refs/heads/master | client/executionprocess/TestCaseRunner.py | 1 |
# File: TestCaseRunner.py ; This file is part of Twister.
# version: 2.018
# Copyright (C) 2012-2013 , Luxoft
# Authors:
# Adrian Toader <adtoader@luxoft.com>
# Andrei Costachi <acostachi@luxoft.com>
# Andrei Toma <atoma@luxoft.com>
# Cristi Constantin <crconstantin@luxoft.com>
# Daniel Cioata <dcioa... |
esarafianou/rupture | refs/heads/develop | backend/breach/migrations/0011_auto_20160325_1244.py | 4 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.2 on 2016-03-25 12:44
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('breach', '0010_auto_20160318_0018'),
]
operations = [
migrations.AddField(
... |
Azure/azure-sdk-for-python | refs/heads/sync-eng/common-js-nightly-docs-2-1768-ForTestPipeline | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_04_01/aio/operations/__init__.py | 4 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... |
Ashaba/rms | refs/heads/master | rmslocalenv/lib/python2.7/site-packages/django/core/files/images.py | 429 | """
Utility functions for handling images.
Requires Pillow as you might imagine.
"""
import struct
import zlib
from django.core.files import File
class ImageFile(File):
"""
A mixin for use alongside django.core.files.base.File, which provides
additional features for dealing with images.
"""
def ... |
gauribhoite/personfinder | refs/heads/master | env/site-packages/django/contrib/gis/geos/factory.py | 586 | from django.contrib.gis.geos.geometry import GEOSGeometry, hex_regex, wkt_regex
from django.utils import six
def fromfile(file_h):
"""
Given a string file name, returns a GEOSGeometry. The file may contain WKB,
WKT, or HEX.
"""
# If given a file name, get a real handle.
if isinstance(file_h, s... |
facundobatista/kilink | refs/heads/master | tests/test_server.py | 1 | # encoding: utf8
# Copyright 2011-2017 Facundo Batista, Nicolás César
# All Rigths Reserved
"""Some tests for the serving part."""
import json
from unittest import TestCase
from mock import patch
from sqlalchemy import create_engine
from kilink import kilink, backend
from kilink.config import config
class Servin... |
stvstnfrd/edx-platform | refs/heads/master | import_shims/lms/third_party_auth/tests/test_middleware.py | 4 | """Deprecated import support. Auto-generated by import_shims/generate_shims.sh."""
# pylint: disable=redefined-builtin,wrong-import-position,wildcard-import,useless-suppression,line-too-long
from import_shims.warn import warn_deprecated_import
warn_deprecated_import('third_party_auth.tests.test_middleware', 'common.d... |
StefanRijnhart/OpenUpgrade | refs/heads/master | addons/base_report_designer/plugin/openerp_report_designer/bin/script/ConvertFieldsToBraces.py | 384 | #########################################################################
#
# Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com
# 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 Gene... |
HalcyonChimera/osf.io | refs/heads/develop | scripts/fix_user_mailchimp.py | 21 | import logging
import pytz
import sys
from datetime import datetime
from django.db import transaction
from website.app import setup_django
setup_django()
from osf.models import OSFUser
from scripts import utils as script_utils
from website.mailchimp_utils import subscribe_mailchimp
from website import settings
logge... |
proxysh/Safejumper-for-Desktop | refs/heads/master | buildlinux/env32/lib/python2.7/site-packages/pip/utils/logging.py | 516 | from __future__ import absolute_import
import contextlib
import logging
import logging.handlers
import os
try:
import threading
except ImportError:
import dummy_threading as threading
from pip.compat import WINDOWS
from pip.utils import ensure_dir
try:
from pip._vendor import colorama
# Lots of differen... |
cchristelis/inasafe | refs/heads/develop | safe/impact_functions/generic/classified_raster_population/metadata_definitions.py | 3 | # coding=utf-8
"""InaSAFE Disaster risk tool by Australian Aid - Metadata for generic Impact
function on Population for Classified Hazard.
Contact : ole.moller.nielsen@gmail.com
.. note:: This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as ... |
opalytics/opalytics-ticdat | refs/heads/master | examples/expert_section/echo_solver.py | 1 | #!/usr/bin/python
# Copyright 2015, 2016, 2017 Opalytics, Inc.
#
# Simple toy solver to begin playing around with Python and ticdat.
# This solver does nothing but validate the input data passed sanity checks,
# and writes this same data back out as the 'solution'. This solver serves
# no purpose other than to provid... |
ketjow4/NOV | refs/heads/master | Lib/json/encoder.py | 103 | """Implementation of JSONEncoder
"""
import re
try:
from _json import encode_basestring_ascii as c_encode_basestring_ascii
except ImportError:
c_encode_basestring_ascii = None
try:
from _json import make_encoder as c_make_encoder
except ImportError:
c_make_encoder = None
ESCAPE = re.compile(r'[\x00-\x... |
beeftornado/sentry | refs/heads/master | src/sentry/auth/__init__.py | 2 | from __future__ import absolute_import, print_function
from .manager import ProviderManager
manager = ProviderManager()
register = manager.register
unregister = manager.unregister
|
SnappleCap/oh-mainline | refs/heads/master | mysite/missions/irc/views.py | 13 | from mysite.base.decorators import view
from mysite.missions.irc import forms
from mysite.missions.models import IrcMissionSession
from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse
from django.contrib.auth.decorators import login_required
from django.conf import settings
@login... |
ProfessorX/Config | refs/heads/master | .PyCharm30/system/python_stubs/-1247972723/PyQt4/QtGui/__init__/QStyleOptionTabV2.py | 2 | # encoding: utf-8
# module PyQt4.QtGui
# from /usr/lib/python2.7/dist-packages/PyQt4/QtGui.so
# by generator 1.135
# no doc
# imports
import PyQt4.QtCore as __PyQt4_QtCore
from QStyleOptionTab import QStyleOptionTab
class QStyleOptionTabV2(QStyleOptionTab):
"""
QStyleOptionTabV2()
QStyleOptionTabV2(QSty... |
scottcunningham/ansible | refs/heads/devel | lib/ansible/executor/task_result.py | 130 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# 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) an... |
SHornung1/AliPhysics | refs/heads/master | PWGJE/EMCALJetTasks/Tracks/analysis/base/HepDataReader.py | 41 | #**************************************************************************
#* Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. *
#* *
#* Author: The ALICE Off-line Project. *
#* Contributors ... |
4shadoww/usploit | refs/heads/master | core/lib/scapy/modules/geoip.py | 8 | ## This file is part of Scapy
## See http://www.secdev.org/projects/scapy for more informations
## Copyright (C) Philippe Biondi <phil@secdev.org>
## This program is published under a GPLv2 license
"""
GeoIP: find out the geographical location of IP addresses
"""
from scapy.data import KnowledgeBase
from scapy.config... |
espdev/readthedocs.org | refs/heads/master | readthedocs/core/subdomain_urls.py | 32 | from django.conf.urls import url, patterns
from readthedocs.projects.constants import LANGUAGES_REGEX
from readthedocs.urls import urlpatterns as main_patterns
handler500 = 'readthedocs.core.views.server_error'
handler404 = 'readthedocs.core.views.server_error_404'
urlpatterns = patterns(
'', # base view, flake... |
akretion/l10n-brazil | refs/heads/10.0 | l10n_br_delivery/models/sale.py | 5 | # -*- coding: utf-8 -*-
# Copyright (C) 2009 Renato Lima - Akretion
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
import time
from openerp import models, api, _
from openerp.exceptions import Warning as UserError
class SaleOrder(models.Model):
_inherit = 'sale.order'
@api.model
def ... |
techtonik/numpy | refs/heads/master | numpy/doc/__init__.py | 262 | from __future__ import division, absolute_import, print_function
import os
ref_dir = os.path.join(os.path.dirname(__file__))
__all__ = sorted(f[:-3] for f in os.listdir(ref_dir) if f.endswith('.py') and
not f.startswith('__'))
for f in __all__:
__import__(__name__ + '.' + f)
del f, ref_dir
__doc__ ... |
cjhak/b2share | refs/heads/master | invenio/modules/workflows/tasks/marcxml_tasks.py | 13 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2013, 2014, 2015 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 optio... |
ianmiell/OLD-shutitdist | refs/heads/master | cabal/cabal.py | 1 | """ShutIt module. See http://shutit.tk
"""
from shutit_module import ShutItModule
class cabal(ShutItModule):
def is_installed(self, shutit):
return shutit.file_exists('/root/shutit_build/module_record/' + self.module_id + '/built')
def build(self, shutit):
shutit.send('apt-get install -y ghc haddock')
shu... |
HousekeepLtd/django | refs/heads/master | tests/forms_tests/tests/test_fields.py | 21 | # -*- coding: utf-8 -*-
"""
##########
# Fields #
##########
Each Field class does some sort of validation. Each Field has a clean() method,
which either raises django.forms.ValidationError or returns the "clean"
data -- usually a Unicode object, but, in some rare cases, a list.
Each Field's __init__() takes at least... |
gsingers/rtfmbot | refs/heads/master | src/python/adapters/SlackPythonOutputAdapter.py | 1 | from chatterbot.adapters.output import OutputAdapter
from slack import SlackUtil
from chatterbot.conversation import Statement
class SlackPythonOutputAdapter(OutputAdapter):
def __init__(self, **kwargs):
super(SlackPythonOutputAdapter, self).__init__(**kwargs)
output_channel_name = kwargs.get("sl... |
GreenRecycleBin/servo | refs/heads/master | tests/wpt/web-platform-tests/encoding/resources/text-plain-charset.py | 243 | def main(request, response):
response.headers.set("Content-Type", "text/plain;charset=" + request.GET.first("label"))
response.content = "hello encoding"
|
sspreitzer/webegg | refs/heads/master | src/webegg/__init__.py | 1 | '''
Copyright Sascha Spreitzer, 2014, GPLv2
'''
from webegg.loader import load
from webegg.loader import xload
|
nvzard/rtfd-cli | refs/heads/master | rtfd/helpers.py | 1 | from colorama import Style
#Colorize the output statement if colored is true
def formatstr(string, color, colored):
if colored:
print(color + string + Style.RESET_ALL)
else:
print(string)
|
rsvip/BootStrap | refs/heads/master | test-infra/s3_cache.py | 2166 | #!/usr/bin/env python2.7
# pylint: disable=C0301
from __future__ import absolute_import, unicode_literals, print_function, division
from sys import argv
from os import environ, stat, chdir, remove as _delete_file
from os.path import dirname, basename, abspath, realpath, expandvars
from hashlib import sha256
from subpr... |
askalbania/piernik | refs/heads/master | bin/qa.py | 1 | #!/usr/bin/python
import re
import sys
import hashlib
import subprocess as sp
import numpy as np
debug = False
typ1 = np.dtype([('name', 'a50'), ('beg', 'i'), ('end', 'i'), ('type', 'a4')])
# starts with spaces or spaces and one of { 'end', 'pure', ... }
# if function it can have a type next goes subroutine or funct... |
varunarya10/stevedore | refs/heads/master | stevedore/example/fields.py | 80 | import textwrap
from stevedore.example import base
class FieldList(base.FormatterBase):
"""Format values as a reStructuredText field list.
For example::
: name1 : value
: name2 : value
: name3 : a long value
will be wrapped with
a hanging indent
"""
def format... |
flotre/sickbeard-vfvo | refs/heads/master | lib/enzyme/mpeg.py | 180 | # -*- coding: utf-8 -*-
# enzyme - Video metadata parser
# Copyright 2011-2012 Antoine Bertin <diaoulael@gmail.com>
# Copyright 2003-2006 Thomas Schueppel <stain@acm.org>
# Copyright 2003-2006 Dirk Meyer <dischi@freevo.org>
#
# This file is part of enzyme.
#
# enzyme is free software; you can redistribute it and/or mod... |
Acidburn0zzz/readthedocs.org | refs/heads/master | readthedocs/rtd_tests/tests/test_search_json_parsing.py | 3 | import os
from django.test import TestCase
from search.parse_json import process_file
base_dir = os.path.dirname(os.path.dirname(__file__))
class TestHacks(TestCase):
def test_h2_parsing(self):
data = process_file(
os.path.join(
base_dir,
'files/api.fjson',
... |
xq262144/hue | refs/heads/master | apps/search/src/search/management/commands/search_setup.py | 3 | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... |
vberaudi/scipy | refs/heads/master | scipy/constants/tests/test_constants.py | 71 | from __future__ import division, print_function, absolute_import
from numpy.testing import run_module_suite, assert_equal
import scipy.constants as sc
def test_fahrenheit_to_celcius():
assert_equal(sc.F2C(32), 0)
assert_equal(sc.F2C([32, 32]), [0, 0])
def test_celcius_to_kelvin():
assert_equal(sc.C2K([... |
2014c2g12/c2g12 | refs/heads/master | exts/zh.py | 38 | # -*- coding: utf-8 -*-
# 需要 exts 目錄下的 sphinx.search.py
from sphinx.search import SearchLanguage
# 使用結巴套件執行中文分詞, 使用前必須先安裝結巴分詞套件
# https://github.com/fxsjy/jieba
import jieba
class SearchChinese(SearchLanguage):
lang = 'zh'
def init(self, options):
print ("Start to execute zh.py")
def split(self, ... |
Nowheresly/odoo | refs/heads/8.0 | addons/mrp_operations/report/mrp_workorder_analysis.py | 312 | # -*- 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... |
mglukhikh/intellij-community | refs/heads/master | python/testData/refactoring/introduceVariable/simpleSubstring.py | 83 | print("<selection>hello</selection> world") |
rconradharris/pyhole | refs/heads/master | plugins/redmine.py | 1 | # Copyright 2010-2011 Josh Kearney
#
# 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 agre... |
citrix-openstack-build/nova | refs/heads/master | nova/scheduler/filters/aggregate_multitenancy_isolation.py | 7 | # Copyright (c) 2011-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
#
# Un... |
olapaola/olapaola-android-scripting | refs/heads/master | python/src/Lib/plat-irix5/IOCTL.py | 132 | # These lines were mostly generated by h2py.py (see demo/scripts)
# from <sys/ioctl.h>, <sys/termio.h> and <termios.h> on Irix 4.0.2
# with some manual changes to cope with imperfections in h2py.py.
# The applicability on other systems is not clear; especially non-SYSV
# systems may have a totally different set of ioct... |
webmasterraj/FogOrNot | refs/heads/master | flask/lib/python2.7/site-packages/boto3/s3/inject.py | 10 | # Copyright 2015 Amazon.com, Inc. or its affiliates. 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. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompa... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.