repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
Daniel-CA/odoo
refs/heads/8.0
addons/point_of_sale/__openerp__.py
261
# -*- 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...
praemdonck/micropython
refs/heads/master
tests/basics/bytearray_append.py
63
# test bytearray.append method a = bytearray(4) print(a) # append should append a single byte a.append(2) print(a) # a should not be modified if append fails try: a.append(None) except TypeError: print('TypeError') print(a)
allotria/intellij-community
refs/heads/master
python/testData/refactoring/move/relativeImportsToModulesInSameMovedPackageNotUpdated/after/src/subpkg/m1.py
41
from . import m2 import m3 import subsubpkg as foo from . import subsubpkg as bar from .subsubpkg import m4 from pkg import m5 print(m2, m3, m4, m5, foo, bar)
tangyiyong/odoo
refs/heads/8.0
addons/edi/models/res_currency.py
437
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2011-2012 OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of t...
40223119/2015cd_0505
refs/heads/master
static/Brython3.1.1-20150328-091302/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") ...
bhavin04890/finaldashboard
refs/heads/master
controllers/fire.py
5
# -*- coding: utf-8 -*- module = request.controller resourcename = request.function if not settings.has_module(module): raise HTTP(404, body="Module disabled: %s" % module) # ----------------------------------------------------------------------------- def index(): """ Module Homepage """ # @todo: have ...
jecel0911/ImageLocalFinder
refs/heads/master
image_finder/migrations/0007_auto_20160408_1454.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.9.1 on 2016-04-08 20:54 from __future__ import unicode_literals from django.db import migrations, models import functools import image_finder.models class Migration(migrations.Migration): dependencies = [ ('image_finder', '0006_auto_20160408_1437'), ] ...
miptliot/edx-platform
refs/heads/ginkgo_openedu_docker
cms/djangoapps/cms_user_tasks/apps.py
26
""" CMS user tasks application configuration Signal handlers are connected here. """ from django.apps import AppConfig class CmsUserTasksConfig(AppConfig): """ Application Configuration for cms_user_tasks. """ name = u'cms_user_tasks' def ready(self): """ Connect signal handlers....
ZHAW-INES/rioxo-uClinux-dist
refs/heads/rtsp
lib/freetype/freetype-2.3.5/builds/mac/ascii2mpw.py
830
#!/usr/bin/env python import sys import string if len( sys.argv ) == 1 : for asc_line in sys.stdin.readlines(): mpw_line = string.replace(asc_line, "\\xA5", "\245") mpw_line = string.replace(mpw_line, "\\xB6", "\266") mpw_line = string.replace(mpw_line, "\\xC4", "\304") mpw_line = string.replace(mpw_...
3D-e-Chem/python-modified-tanimoto
refs/heads/master
kripodb/pdb.py
2
# Copyright 2016 Netherlands eScience Center # # 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...
ysekky/GPy
refs/heads/devel
GPy/models/gp_coregionalized_regression.py
5
# Copyright (c) 2012 - 2014 the GPy Austhors (see AUTHORS.txt) # Licensed under the BSD 3-clause license (see LICENSE.txt) import numpy as np from ..core import GP from .. import likelihoods from .. import kern from .. import util class GPCoregionalizedRegression(GP): """ Gaussian Process model for heterosced...
godLoveLucifer/viewfinder
refs/heads/master
backend/www/admin/metrics.py
13
# Copyright 2013 Viewfinder Inc. All Rights Reserved. """Handlers for database administration. MetricsHandler: main handler for detailed metrics. We don't use ajax-y tables, so there is no data handler. """ from tornado.escape import url_escape __author__ = 'marc@emailscrubbed.com (Marc Berhault)' import base64 i...
oshtaier/robottelo
refs/heads/master
robottelo/ui/puppetclasses.py
3
""" Implements Puppet Classes UI """ from robottelo.ui.base import Base from robottelo.ui.locators import locators, common_locators from robottelo.ui.navigator import Navigator class PuppetClasses(Base): """ Provides the CRUD functionality for Puppet-classes. """ def create(self, name, environment=N...
GheRivero/ansible
refs/heads/devel
test/integration/targets/module_utils/module_utils/spam5/ham/eggs.py
298
data = 'spam5:eggs'
Candreas/mapreduce
refs/heads/master
python/test/mapreduce/api/map_job/model_datastore_input_reader_test.py
15
#!/usr/bin/env python """Model Datastore Input Reader tests for the map_job API.""" # os_compat must be first to ensure timezones are UTC. # pylint: disable=g-bad-import-order from google.appengine.tools import os_compat # pylint: disable=unused-import import datetime import unittest from google.appengine.ext import...
asm666/sympy
refs/heads/master
sympy/combinatorics/polyhedron.py
42
from __future__ import print_function, division from sympy.core import Basic, Tuple from sympy.sets import FiniteSet from sympy.core.compatibility import as_int, range from sympy.combinatorics import Permutation as Perm from sympy.combinatorics.perm_groups import PermutationGroup from sympy.utilities.iterables import ...
31415us/trajectory
refs/heads/master
py/env/lib/python2.7/site-packages/pip/vendor/html5lib/__init__.py
249
""" HTML parsing library based on the WHATWG "HTML5" specification. The parser is designed to be compatible with existing HTML found in the wild and implements well-defined error recovery that is largely compatible with modern desktop web browsers. Example usage: import html5lib f = open("my_document.html") tree = ht...
tekromancr/pyNES
refs/heads/0.1.x
pynes/tests/lda_test.py
28
# -*- coding: utf-8 -*- ''' LDA, Load Accumulator Test This is one of the Memory Operations in the c6502 ''' import unittest from pynes.compiler import lexical, syntax, semantic class LdaTest(unittest.TestCase): def test_lda_imm(self): tokens = list(lexical('LDA #$10')) self.assertEquals(2, le...
Mazecreator/tensorflow
refs/heads/master
tensorflow/contrib/sparsemax/python/kernel_tests/sparsemax_loss_test.py
64
# 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...
Dhivyap/ansible
refs/heads/devel
lib/ansible/modules/packaging/os/opkg.py
95
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Patrick Pelletier <pp.pelletier@gmail.com> # Based on pacman (Afterburn) and pkgin (Shaun Zinck) modules # # 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...
matteobachetti/srt-single-dish-tools
refs/heads/master
srttools/tests/test_opacity.py
1
from srttools.opacity import calculate_opacity, main_opacity, HAS_MPL import numpy as np import os class TestOpacity(object): @classmethod def setup_class(klass): import os klass.curdir = os.path.dirname(__file__) klass.datadir = os.path.join(klass.curdir, 'data') klass.fname...
ThomasSweijen/yadesolute2
refs/heads/master
py/tests/pbc.py
5
# encoding: utf-8 # 2010 © Václav Šmilauer <eudoxos@arcig.cz> ''' Various computations affected by the periodic boundary conditions. ''' import unittest import random,math from yade.wrapper import * from yade._customConverters import * from yade import utils from yade import * try: from minieigen import * except Im...
yuezhou/telephony
refs/heads/master
telephony/Classes/pjproject-2.2.1/tests/pjsua/scripts-recvfrom/301_timer_good_retry_after_422.py
57
# $Id: 301_timer_good_retry_after_422.py 3287 2010-08-18 14:30:17Z nanang $ import inc_sip as sip import inc_sdp as sdp # Session timers retry after 422 pjsua = "--null-audio sip:127.0.0.1:$PORT --timer-min-se 100 --timer-se 1000" # First INVITE with timer rejected with 422 req1 = sip.RecvfromTransaction("INVITE wi...
apollo13/ansible
refs/heads/devel
lib/ansible/vars/fact_cache.py
34
# Copyright: (c) 2014, Michael DeHaan <michael.dehaan@gmail.com> # Copyright: (c) 2018, Ansible Project # 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 from ansible import constants a...
codecollision/DropboxToFlickr
refs/heads/master
django/conf/locale/pt_BR/formats.py
231
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = r'j \de N \de Y' TIME_FORMAT = 'H:i' DATETIME_FORMAT = r'j \de N \de Y à\s...
PrefPy/opra
refs/heads/master
compsocsite/polls/migrations/0055_response_anonymous_id.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.9.6 on 2016-07-22 15:01 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('polls', '0054_merge'), ] operations = [ migrations.AddField( mod...
tedder/ansible
refs/heads/devel
lib/ansible/plugins/filter/ipaddr.py
25
# (c) 2014, Maciej Delmanowski <drybjed@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) any later ...
eusi/MissionPlanerHM
refs/heads/master
Lib/site-packages/numpy/oldnumeric/precision.py
88
# Lifted from Precision.py. This is for compatibility only. # # The character strings are still for "new" NumPy # which is the only Incompatibility with Numeric __all__ = ['Character', 'Complex', 'Float', 'PrecisionError', 'PyObject', 'Int', 'UInt', 'UnsignedInt', 'UnsignedInteger', 'string',...
kimjaejoong/nova
refs/heads/master
nova/tests/functional/v3/test_create_backup.py
29
# Copyright 2012 Nebula, Inc. # Copyright 2013 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...
SummerLW/Perf-Insight-Report
refs/heads/test
third_party/mapreduce/mapreduce/lib/input_reader/__init__.py
35
#!/usr/bin/env python """Various libraries regarding input readers and input in general.""" from mapreduce.lib.input_reader._gcs import GCSInputReader from mapreduce.lib.input_reader._gcs import GCSRecordInputReader from mapreduce.lib.input_reader._gcs import PathFilter
kumarkrishna/sympy
refs/heads/master
sympy/simplify/hyperexpand_doc.py
117
""" This module cooks up a docstring when imported. Its only purpose is to be displayed in the sphinx documentation. """ from __future__ import print_function, division from sympy.simplify.hyperexpand import FormulaCollection from sympy import latex, Eq, hyper c = FormulaCollection() doc = "" for f in c.formul...
odooindia/odoo
refs/heads/master
addons/web_tests_demo/__openerp__.py
384
{ 'name': "Demonstration of web/javascript tests", 'category': 'Hidden', 'description': """ OpenERP Web demo of a test suite ================================ Test suite example, same code as that used in the testing documentation. """, 'depends': ['web'], 'data' : [ 'views/web_tests_dem...
durai145/youtube-dl
refs/heads/master
youtube_dl/extractor/franceculture.py
116
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..compat import ( compat_urlparse, ) from ..utils import ( determine_ext, int_or_none, ) class FranceCultureIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?franceculture\.fr/player/reecouter\?play=(?P<...
dgwartney-io/import-io-api-python
refs/heads/master
tests/unit/importio2/commands/test_csv_to_db.py
1
# # Copyright 2017 Import.io # # 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, ...
MartinHjelmare/home-assistant
refs/heads/dev
tests/components/homematic/__init__.py
36
"""Tests for the homematic component."""
xboxfanj/android_kernel_oneplus_one
refs/heads/lollipop
tools/perf/util/setup.py
4998
#!/usr/bin/python2 from distutils.core import setup, Extension from os import getenv from distutils.command.build_ext import build_ext as _build_ext from distutils.command.install_lib import install_lib as _install_lib class build_ext(_build_ext): def finalize_options(self): _build_ext.finalize_optio...
weebygames/boto
refs/heads/develop
tests/unit/sts/test_credentials.py
129
import unittest from boto.sts.credentials import Credentials class STSCredentialsTest(unittest.TestCase): sts = True def setUp(self): super(STSCredentialsTest, self).setUp() self.creds = Credentials() def test_to_dict(self): # This would fail miserably if ``Credentials.request_i...
RyanNoelk/OpenEats
refs/heads/master
api/v1/common/deletion.py
2
#!/usr/bin/env python # encoding: utf-8 from __future__ import unicode_literals from functools import partial import six import graphene from graphene.utils.is_base_type import is_base_type from graphene.utils.get_unbound_function import get_unbound_function from graphene.utils.props import props from graphene.types.f...
jkshaver/virtualenv-1.8.2
refs/heads/master
env/lib/python2.7/site-packages/django/contrib/flatpages/forms.py
79
from django import forms from django.conf import settings from django.contrib.flatpages.models import FlatPage from django.utils.translation import ugettext, ugettext_lazy as _ class FlatpageForm(forms.ModelForm): url = forms.RegexField(label=_("URL"), max_length=100, regex=r'^[-\w/\.~]+$', help_text = _("...
jacobsenanaizabel/shoop
refs/heads/master
shoop/admin/modules/sales_units/__init__.py
5
# -*- coding: utf-8 -*- # This file is part of Shoop. # # Copyright (c) 2012-2015, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from __future__ import unicode_literals from shoop.admin.base import AdminMo...
tseaver/google-cloud-python
refs/heads/master
bigquery_storage/google/cloud/bigquery_storage_v1beta1/proto/read_options_pb2.py
2
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/bigquery/storage_v1beta1/proto/read_options.proto import sys _b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) from google.protobuf import descriptor as _descriptor from google.prot...
20tab/django-filer
refs/heads/develop
filer/templatetags/filer_admin_tags.py
24
import django from django.conf import settings from django.template import Library from distutils.version import LooseVersion register = Library() def filer_actions(context): """ Track the number of times the action field has been rendered on the page, so we know which value to use. """ context['a...
TeamExodus/external_chromium_org
refs/heads/EXODUS-5.1
tools/perf/page_sets/browser_control.py
33
# 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. from telemetry.page import page as page_module from telemetry.page import page_set as page_set_module class BrowserControlPage(page_module.Page): """ Why:...
automicus/XBMC-ISY-Events
refs/heads/master
resources/Lib/myCollections.py
1
class histlist(object): ''' histlist The history list (histlist) is a list that tracks the history of a value. The history list can also notify when the value is changed, This is referred to as a step. There are two kinds of steps that can be tracked. A regular step (value is changed) and a del...
kvar/ansible
refs/heads/seas_master_2.9.5
lib/ansible/modules/network/fortios/fortios_wireless_controller_inter_controller.py
13
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lic...
aliib/electron
refs/heads/master
tools/js2c.py
22
#!/usr/bin/env python import contextlib import glob import os import subprocess import sys SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) def main(): natives = os.path.abspath(sys.argv[1]) js_source_files = glob.glob('{0}/*.js'.format(sys.argv[2])) call_js2c(natives, js_source_fil...
smathot/qnotero
refs/heads/master
libqnotero/qnoteroItem.py
1
""" This file is part of qnotero. qnotero 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. qnotero is distributed in the hope that it will b...
gpoesia/servo
refs/heads/master
tests/wpt/css-tests/tools/html5lib/html5lib/treeadapters/sax.py
1835
from __future__ import absolute_import, division, unicode_literals from xml.sax.xmlreader import AttributesNSImpl from ..constants import adjustForeignAttributes, unadjustForeignAttributes prefix_mapping = {} for prefix, localName, namespace in adjustForeignAttributes.values(): if prefix is not None: pre...
uclmr/inferbeddings
refs/heads/master
scripts/schematic-memory/filtered/UCL_ARRAY_WN18_FILTERED_v1.py
1
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import itertools import os import os.path import sys import argparse import logging def cartesian_product(dicts): return (dict(zip(dicts, x)) for x in itertools.product(*dicts.values())) def summary(configuration): kvs = sorted([(k, v) for k, v in configurati...
ahupp/python-magic
refs/heads/master
magic/__init__.py
1
""" magic is a wrapper around the libmagic file identification library. See README for more information. Usage: >>> import magic >>> magic.from_file("testdata/test.pdf") 'PDF document, version 1.2' >>> magic.from_file("testdata/test.pdf", mime=True) 'application/pdf' >>> magic.from_buffer(open("testdata/test.pdf").r...
maohongyuan/kbengine
refs/heads/master
kbe/src/lib/python/Lib/test/test_import.py
60
# We import importlib *ASAP* in order to test #15386 import importlib import importlib.util from importlib._bootstrap import _get_sourcefile import builtins import marshal import os import platform import py_compile import random import stat import sys import unittest import unittest.mock as mock import textwrap import...
acutesoftware/AIKIF
refs/heads/master
aikif/.z_prototype/view.py
1
# coding: utf-8 # view.py written by Duncan Murray 22/3/2014 (C) Acute Software # searches AIKIF import os import sys sys.path.append('..//..//aspytk') import lib_data as dat import lib_file as fle import lib_net as net import AIKIF_utils as aikif import fileMapping as filemap if len(sys.argv) == 2: viewStructure =...
qilicun/python
refs/heads/master
python2/PyMOTW-1.132/PyMOTW/pdb/pdb_function_arguments.py
1
#!/usr/bin/env python # encoding: utf-8 # # Copyright (c) 2010 Doug Hellmann. All rights reserved. # import pdb def recursive_function(n=5, output='to be printed'): if n > 0: recursive_function(n-1) else: pdb.set_trace() print output return if __name__ == '__main__': recursiv...
comocheng/RMG-Py
refs/heads/master
examples/rmg/methylformate/input.py
2
# Data sources database( thermoLibraries = ['primaryThermoLibrary','DFT_QCI_thermo','GRI-Mech3.0'], reactionLibraries = [('Methylformate',False),('Glarborg/highP',False)], seedMechanisms = ['Glarborg/C2'], kineticsDepositories = ['training'], kineticsFamilies = ['!Intra_Disproportionation','!Substit...
MaclawStudio/aosp_kernel
refs/heads/master
scripts/build-all.py
282
#! /usr/bin/env python # Copyright (c) 2009, Code Aurora Forum. 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...
mrquim/repository.mrquim
refs/heads/master
repo/script.module.myconnpy/lib/mysql/connector/conversion.py
13
# MySQL Connector/Python - MySQL driver written in Python. # Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. # MySQL Connector/Python is licensed under the terms of the GPLv2 # <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most # MySQL Connectors. There are special exceptio...
finway-china/p2pool
refs/heads/master
litecoin_scrypt/setup.py
254
from distutils.core import setup, Extension ltc_scrypt_module = Extension('ltc_scrypt', sources = ['scryptmodule.c', 'scrypt.c'], include_dirs=['.']) setup (name = 'ltc_scrypt', version = '1.0', descr...
darren-clark/android_platform_external_bluetooth_glib
refs/heads/kitkat-x86
gio/gdbus-2.0/codegen/dbustypes.py
13
# -*- Mode: Python -*- # GDBus - GLib D-Bus Library # # Copyright (C) 2008-2011 Red Hat, Inc. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at ...
Ju1ien/Arducopter_Cruise_Mode
refs/heads/Cruise_Mode
Tools/autotest/pysim/multicopter.py
67
#!/usr/bin/env python from aircraft import Aircraft import util, time, math from math import degrees, radians from rotmat import Vector3, Matrix3 class Motor(object): def __init__(self, angle, clockwise, servo): self.angle = angle # angle in degrees from front self.clockwise = clockwise # clockwis...
foodszhang/kbengine
refs/heads/master
kbe/src/lib/python/Lib/idlelib/TreeWidget.py
61
# XXX TO DO: # - popup menu # - support partial or total redisplay # - key bindings (instead of quick-n-dirty bindings on Canvas): # - up/down arrow keys to move focus around # - ditto for page up/down, home/end # - left/right arrows to expand/collapse & move out/in # - more doc strings # - add icons for "file", ...
sharhar/USB-Thing
refs/heads/master
UpdaterFiles/Lib/python-3.5.1.amd64/Lib/distutils/cygwinccompiler.py
10
"""distutils.cygwinccompiler Provides the CygwinCCompiler class, a subclass of UnixCCompiler that handles the Cygwin port of the GNU C compiler to Windows. It also contains the Mingw32CCompiler class which handles the mingw32 port of GCC (same as cygwin in no-cygwin mode). """ # problems: # # * if you use a msvc com...
nwiizo/workspace_2017
refs/heads/master
ansible-modules-core/network/junos/junos_config.py
15
#!/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...
bzcheeseman/Py_Cpp
refs/heads/master
tests/gtest/test/gtest_test_utils.py
344
#!/usr/bin/env python # # Copyright 2006, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
agepoly/truffe2
refs/heads/master
truffe2/rights/admin.py
13848
from django.contrib import admin # Register your models here.
leonardocintra/campeonato
refs/heads/master
clube/models.py
1
from django.db import models class Clube(models.Model): nome = models.CharField(max_length=200, unique=True) data_fundacao = models.DateTimeField(null=True, blank=True) #mascote = CloudinaryField('Foto Mascote', blank=True, null=True) #escudo = CloudinaryField('Foto Escudo', blank=True, null=True) ...
asposetasks/Aspose_Tasks_Cloud
refs/heads/master
Examples/Python/RetrieveTaskInformation.py
2
import asposetaskscloud from asposetaskscloud.TasksApi import TasksApi from asposetaskscloud.TasksApi import ApiException import asposestoragecloud from asposestoragecloud.StorageApi import StorageApi from asposestoragecloud.StorageApi import ResponseMessage apiKey = "XXXXX" #sepcify App Key appSid = "XXXXX" #sepcify...
agiliq/django
refs/heads/master
tests/urlpatterns_reverse/erroneous_urls.py
23
import warnings from django.conf.urls import url from . import views # Test deprecated behavior of passing strings as view to url(). # Some of these can be removed in Django 2.0 as they aren't convertable to # callabls. with warnings.catch_warnings(record=True): warnings.filterwarnings('ignore', module='django.c...
badloop/SickRage
refs/heads/master
lib/hachoir_parser/archive/lzx.py
74
"""LZX data stream parser. Also includes a decompression function (slow!!) which can decompress LZX data stored in a Hachoir stream. Author: Robert Xiao Creation date: July 18, 2007 """ from hachoir_parser import Parser from hachoir_core.field import (FieldSet, UInt32, Bit, Bits, PaddingBits, RawBytes, Parser...
slisson/intellij-community
refs/heads/master
python/lib/Lib/pkgutil.py
80
"""Utilities to support packages.""" # NOTE: This module must remain compatible with Python 2.3, as it is shared # by setuptools for distribution with Python 2.3 and up. import os import sys import imp import os.path from types import ModuleType from org.python.core import imp as _imp, BytecodeLoader __all__ = [ ...
Kodiack/WhileyWeb
refs/heads/master
lib/cherrypy/test/test_session.py
36
import os localDir = os.path.dirname(__file__) import sys import threading import time import cherrypy from cherrypy._cpcompat import copykeys, HTTPConnection, HTTPSConnection from cherrypy.lib import sessions from cherrypy.lib.httputil import response_codes def http_methods_allowed(methods=['GET', 'HEAD']): meth...
dtaht/ns-3-codel-dev
refs/heads/master
waf-tools/shellcmd.py
137
# Copyright (C) 2008 Gustavo J. A. M. Carneiro <gjcarneiro@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 of the License, or # (at your option) any later version. ...
mviniciusleal/vinisandbox
refs/heads/master
ViniSandbox/bin/Debug/Tools/AnalyzePE-master/plugins/ole2.py
4
#!/usr/bin/env python """ This file is part of Pyew Copyright (C) 2009, 2010 Joxean Koret 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 la...
cewood/ansible-modules-core
refs/heads/devel
cloud/amazon/iam.py
7
#!/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...
st135yle/django-site
refs/heads/master
dbenv/lib/python3.4/site-packages/pip/_vendor/retrying.py
934
## Copyright 2013-2014 Ray Holder ## ## 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 ...
ronaldahmed/robot-navigation
refs/heads/master
neural-navigation-with-lstm/MARCO/nltk_contrib/upenn/cis530/fall2001/brent_gray/wsd_schutze/cluster.py
2
## cluster.py ## clustering utilities for word sense discrimination ## Brent Gray -- CIS 530 from math import sqrt def calcCentroid(tAList): result = [] for t1 in tAList: temp1 = t1.getContextVector() if not result: result = temp1 else: for i in range(len(res...
fernandojunior/searching-techniques
refs/heads/master
python/lib/python3.4/site-packages/pip/compat/__init__.py
248
"""Stuff that differs in different Python versions and platform distributions.""" from __future__ import absolute_import, division import os import sys from pip._vendor.six import text_type try: from logging.config import dictConfig as logging_dictConfig except ImportError: from pip.compat.dictconfig import ...
pushkarajthorat/learnword
refs/heads/master
another2.py
1
from lxml import etree from lxml.html.clean import Cleaner import sys doc = open(sys.argv[1]).read() cleaner = Cleaner(page_structure=False) doc=cleaner.clean_html(doc) tree = etree.HTML(doc) # gives the heading # heading = tree.xpath('//*[@id="firstClickFreeAllowed"]/div[1]/div/div[1]/div/div/div/...
Thecrazyskull/kernel_msm
refs/heads/cm-12.1-caf
arch/ia64/scripts/unwcheck.py
13143
#!/usr/bin/python # # Usage: unwcheck.py FILE # # This script checks the unwind info of each function in file FILE # and verifies that the sum of the region-lengths matches the total # length of the function. # # Based on a shell/awk script originally written by Harish Patil, # which was converted to Perl by Matthew Ch...
40123210/2015cd-midterm2
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/unittest/test/test_loader.py
738
import sys import types import unittest class Test_TestLoader(unittest.TestCase): ### Tests for TestLoader.loadTestsFromTestCase ################################################################ # "Return a suite of all tests cases contained in the TestCase-derived # class testCaseClass" def te...
fuzeman/Catalytic
refs/heads/master
deluge/ui/gtkui/__init__.py
14
from gtkui import start
abhishek-ch/hue
refs/heads/master
desktop/libs/liboozie/src/liboozie/types.py
4
#!/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...
hoosteeno/mozillians
refs/heads/master
vendor-local/lib/python/djcelery/__init__.py
11
"""Django Celery Integration.""" # :copyright: (c) 2009 - 2012 by Ask Solem. # :license: BSD, see LICENSE for more details. from __future__ import absolute_import import os VERSION = (2, 5, 5) __version__ = ".".join(map(str, VERSION[0:3])) + "".join(VERSION[3:]) __author__ = "Ask Solem" __contact__ = "ask@celerypro...
ytaben/cyphesis
refs/heads/master
rulesets/deeds/world/objects/buildings/StoneHouse.py
3
#This file is distributed under the terms of the GNU General Public license. #Copyright (C) 1999 Kosh (See the file COPYING for details). from atlas import * from common import const from world.objects.buildings.House import House class Stonehouse(House): """This class is a stone house it does not burn"""
danilito19/django
refs/heads/master
django/contrib/admin/views/main.py
327
import sys from collections import OrderedDict from django.contrib.admin import FieldListFilter from django.contrib.admin.exceptions import ( DisallowedModelAdminLookup, DisallowedModelAdminToField, ) from django.contrib.admin.options import ( IS_POPUP_VAR, TO_FIELD_VAR, IncorrectLookupParameters, ) from djang...
LizzHale/twiliolunch
refs/heads/master
app.py
1
import os from flask import Flask from flask import Response from flask import request from flask import render_template from flask import redirect from twilio import twiml from twilio.rest import TwilioRestClient # Pull in configuration from system environment variables TWILIO_ACCOUNT_SID = os.environ.get('TWILIO_AC...
smasala/phantomjs
refs/heads/master
src/breakpad/src/tools/gyp/test/copies-link/src/copy.py
153
#!/usr/bin/python # Copyright (c) 2009 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. import shutil import sys def main(argv): if len(argv) != 3: print 'USAGE: copy.py <src> <dst>' return 1 shutil.copy(argv[1], argv...
pdufour/sqlalchemy
refs/heads/master
lib/sqlalchemy/dialects/mssql/adodbapi.py
80
# mssql/adodbapi.py # Copyright (C) 2005-2015 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: mssql+adodbapi :name: adodbapi :dbapi: adodbapi :conn...
jasimpson/gnuradio-jasimpson
refs/heads/master
gnuradio-examples/python/digital-bert/benchmark_rx.py
10
#!/usr/bin/env python # # Copyright 2008 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # ...
HybridF5/tempest_debug
refs/heads/master
tempest/api/volume/admin/test_volume_snapshot_quotas_negative.py
6
# Copyright 2014 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...
ryanpdwyer/FreqDemod
refs/heads/master
freqdemod/docs/wavplot.py
2
#! /usr/bin/env python # http://people.csail.mit.edu/hubert/pyaudio/ # # jam99 # 2014/07/23 # install pyaudio using the Canopy/Enthought package manager # pyaudio 0.2.4 # # Adapted from # http://stackoverflow.com/questions/18625085/how-to-plot-a-wav-file import matplotlib.pyplot as plt import numpy as np import wave ...
skycucumber/restful
refs/heads/master
python/venv/lib/python2.7/site-packages/flask/json.py
428
# -*- coding: utf-8 -*- """ flask.jsonimpl ~~~~~~~~~~~~~~ Implementation helpers for the JSON support in Flask. :copyright: (c) 2012 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import io import uuid from datetime import datetime from .globals import current_app, request fro...
p1c2u/k2
refs/heads/master
map/settings.py
2
from django.conf import settings MAP_GOOGLE_MAPS_API_KEY = getattr(settings, 'GOOGLE_MAPS_API_KEY', 'ABQIAAAANRcMfC_cyoA3QdUOo_Hu5hTQAu85EtnTZTzCCgC_HtAMXZ3pxBTahN958SX-8H5LbiYHW6TGxvNEwg')
marcosmodesto/django-testapp
refs/heads/master
django/db/models/base.py
19
import copy import sys from functools import update_wrapper from itertools import izip import django.db.models.manager # Imported to register signal handler. from django.conf import settings from django.core.exceptions import (ObjectDoesNotExist, MultipleObjectsReturned, FieldError, ValidationError, NON_FIELD_...
ppwwyyxx/tensorflow
refs/heads/master
tensorflow/python/training/input.py
20
# 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...
archf/ansible
refs/heads/devel
lib/ansible/modules/cloud/centurylink/clc_group.py
26
#!/usr/bin/python # # Copyright (c) 2015 CenturyLink # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['previ...
mewtaylor/django
refs/heads/master
tests/staticfiles_tests/settings.py
147
from __future__ import unicode_literals import os.path from django.utils._os import upath TEST_ROOT = os.path.dirname(upath(__file__)) TESTFILES_PATH = os.path.join(TEST_ROOT, 'apps', 'test', 'static', 'test') TEST_SETTINGS = { 'DEBUG': True, 'MEDIA_URL': '/media/', 'STATIC_URL': '/static/', 'MEDIA...
dcroc16/skunk_works
refs/heads/master
google_appengine/lib/django-1.4/tests/modeltests/unmanaged_models/__init__.py
45382
BorgERP/borg-erp-6of3
refs/heads/master
addons/document/test_cindex.py
444
#!/usr/bin/python import sys import os import glob import time import logging from optparse import OptionParser logging.basicConfig(level=logging.DEBUG) parser = OptionParser() parser.add_option("-q", "--quiet", action="store_false", dest="verbose", default=True, help="don't prin...
fursov/tellhist
refs/heads/master
tellprox/configObserver.py
2
from UserDict import IterableUserDict from configobj import ConfigObj class ConfigObserver(ConfigObj): def __init__(self, *args, **kw): self.observers = [] self.observeKeys = {} self.validator = None self.validating = False super(ConfigObserver, self).__init__(*args, **kw) def setValidator(self, valid...
onitake/ansible
refs/heads/devel
lib/ansible/modules/crypto/openssl_privatekey.py
25
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Yanis Guenane <yanis+ansible@guenane.org> # 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': '...