repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
djosborne/libcalico
refs/heads/master
calico_containers/pycalico/__init__.py
5
# Copyright 2015 Metaswitch Networks # # 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 w...
cneill/designate
refs/heads/master
contrib/dns_dump_dnspy.py
10
#!/usr/bin/env python # Copyright 2014 Hewlett-Packard Development Company, L.P. # # Author: Kiall Mac Innes <kiall@hp.com> # # 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...
Endika/connector-accountedge
refs/heads/8.0
hr_expense_line_sequence/__init__.py
1
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010 Savoir-faire Linux (<http://www.savoirfairelinux.com>). # # This program is free software: you can redistribute it and/or modify # it und...
enoex/django-shop
refs/heads/master
docs/OLD-out-of-date/snippets/products.py
20
# This should be read as pseudo-code, it's not meant to be executable # Just a rough draft/proposal of how the products could be handled, similar to what Satchmo does class Product(): # Product very general stuff goes here name = models.CharField(mx_length=255) class ProductAttribute(): ''' ''' name = 'ISBN...
atul-bhouraskar/django
refs/heads/master
tests/proxy_models/models.py
192
""" By specifying the 'proxy' Meta attribute, model subclasses can specify that they will take data directly from the table of their base class table rather than using a new table of their own. This allows them to act as simple proxies, providing a modified interface to the data from the base class. """ from django.db ...
hn8841182/w1112
refs/heads/master
setup.py
135
from setuptools import setup setup( name='YourAppName', version='1.0', description='OpenShift App', author='Your Name', author_email='example@example.com', url='http://www.python.org/sigs/distutils-sig/', install_requires=['CherryPy', 'mako'], # install_requires=['Django>=1.3'], )
mmezzavilla/ns3-mmwave
refs/heads/master
src/lte/bindings/callbacks_list.py
40
callback_classes = [ ['void', 'ns3::Ptr<ns3::Packet>', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], ['void', 'unsigned short', 'ns3::Ptr<ns3::SpectrumValue>', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', '...
semicode-ltd/sara
refs/heads/master
plugins/youtube/youtube.py
2
#!/usr/bin/env python # -*- coding: utf-8 -*- # # youtube.py # # Copyright 2016 Semicode Inc <aye7@archost> # # 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...
robovm/robovm-studio
refs/heads/master
python/lib/Lib/site-packages/django/contrib/gis/forms/fields.py
405
from django import forms from django.utils.translation import ugettext_lazy as _ # While this couples the geographic forms to the GEOS library, # it decouples from database (by not importing SpatialBackend). from django.contrib.gis.geos import GEOSGeometry class GeometryField(forms.Field): """ This is the bas...
daisychainme/daisychain
refs/heads/master
daisychain/core/views.py
6445
from django.shortcuts import render # Create your views here.
keedio/hue
refs/heads/master
desktop/core/ext-py/pysqlite/doc/sphinx/conf.py
40
# -*- coding: utf-8 -*- # # pysqlite documentation build configuration file, created by # sphinx-quickstart.py on Sat Mar 22 02:47:54 2008. # # This file is execfile()d with the current directory set to its containing dir. # # The contents of this file are pickled, so don't put values in the namespace # that aren't pic...
sathnaga/avocado-vt
refs/heads/master
virttest/ssh_key.py
1
import os import logging import aexpect from aexpect import remote from avocado.utils import process from avocado.utils import path from virttest import remote as remote_old def get_public_key(): """ Return a valid string ssh public key for the user executing autoserv or autotest. If there's no DSA or ...
agry/NGECore2
refs/heads/master
scripts/object/draft_schematic/space/chassis/texture_kit_xwing_s06.py
85615
import sys def setup(core, object): return
uberamd/NGECore2
refs/heads/master
scripts/object/static/creature/yavin4_skreeg.py
85615
import sys def setup(core, object): return
minhphung171093/GreenERP_V7
refs/heads/master
openerp/addons/sale/res_config.py
19
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms o...
blueboxgroup/horizon
refs/heads/master
horizon/templatetags/form_helpers.py
61
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
angela278/UPDream
refs/heads/master
lib/oauthlib/oauth2/rfc6749/endpoints/token.py
71
# -*- coding: utf-8 -*- """ oauthlib.oauth2.rfc6749 ~~~~~~~~~~~~~~~~~~~~~~~ This module is an implementation of various logic needed for consuming and providing OAuth 2.0 RFC6749. """ from __future__ import absolute_import, unicode_literals import logging from oauthlib.common import Request from .base import BaseEn...
abhiQmar/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/html5lib/utils/spider.py
436
#!/usr/bin/env python """Spider to try and find bugs in the parser. Requires httplib2 and elementtree usage: import spider s = spider.Spider() s.spider("http://www.google.com", maxURLs=100) """ import urllib.request, urllib.error, urllib.parse import urllib.robotparser import md5 import httplib2 import html5lib fro...
wkentaro/chainer
refs/heads/master
tests/chainermn_tests/iterators_tests/test_iterator_compatibility.py
8
# This test is based on Chainer's iterator compatibility test. # The major changed point is that we do not test # the order SerialIterator -> MultiNodeIterator, # because slave iterator must synchronize the batch order with master # thus should not accept overwriting the batch order by serialization. # See: chainer/t...
mozilla/FlightDeck
refs/heads/master
apps/jetpack/tests/module_tests.py
1
# coding=utf-8 import commonware import json from test_utils import TestCase from nose.tools import eq_ from django.contrib.auth.models import User from django.core.urlresolvers import reverse from jetpack.models import Package, PackageRevision, Module from jetpack.errors import UpdateDeniedException, IllegalFilenam...
mobo95/pyload
refs/heads/stable
module/lib/bottle.py
41
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Bottle is a fast and simple micro-framework for small web applications. It offers request dispatching (Routes) with url parameter support, templates, a built-in HTTP Server and adapters for many third party WSGI/HTTP-server and template engines - all in a single file an...
maelstrom59/ArchMap
refs/heads/master
docs/conf.py
2
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # ArchMap documentation build configuration file, created by # sphinx-quickstart on Sat Apr 19 11:17:53 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # au...
SGenheden/Scripts
refs/heads/master
Projects/Trehalose/calc_hbonds_twocomp.py
1
# Author: Samuel Genheden samuel.genheden@gmail.com """ Program to count hydrogen bonds in a two-component system Examples: python calc_hbonds_twocomp.py -f r1_md2_whole.xtc -s r1_md2.tpr --sel "all" -out r1_hbonds.pickle python calc_hbonds_twocomp.py -f template.xyz wt1kalpotAllAtoms.xyz -s template.pdb --an...
helldorado/ansible
refs/heads/devel
lib/ansible/modules/network/fortios/fortios_log_gui_display.py
24
#!/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...
rupak0577/ginga
refs/heads/master
ginga/_astropy_init.py
52
# Licensed under a 3-clause BSD style license - see LICENSE.rst __all__ = ['__version__', '__githash__', 'test'] # this indicates whether or not we are in the package's setup.py try: _ASTROPY_SETUP_ except NameError: from sys import version_info if version_info[0] >= 3: import builtins else: ...
zejn/babbage
refs/heads/master
babbage/api.py
1
# Flask web api # TODO: consider making this it's own Python package? from datetime import date from decimal import Decimal from werkzeug.exceptions import NotFound from flask import Blueprint, Response, request, current_app, json, url_for from babbage.exc import BabbageException blueprint = Blueprint('babbage_api',...
tchernomax/ansible
refs/heads/devel
lib/ansible/modules/cloud/azure/azure_rm_aks.py
15
#!/usr/bin/python # # Copyright (c) 2018 Sertac Ozercan, <seozerca@microsoft.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', ...
hurricup/intellij-community
refs/heads/master
plugins/hg4idea/testData/bin/hgext/convert/bzr.py
94
# bzr.py - bzr support for the convert extension # # Copyright 2008, 2009 Marek Kubica <marek@xivilization.net> and others # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. # This module is for handling 'bzr', that was formerly kno...
tmpgit/intellij-community
refs/heads/master
python/testData/inspections/PyDictCreationInspection/test.py
83
<weak_warning descr="This dictionary creation could be rewritten as a dictionary literal">dict = {"n": "n"}</weak_warning> dict["a"], dict["b"] = "a", "b" dict["k"] = "k" dict, a = {"n": "n"} dict["a"], a["b"] = "a", "b" dict["k"] = "k" d = {} foo() d["a"] = 3 def someiter(): yield 1 yield 2 dikt = { 'result...
18padx08/PPTex
refs/heads/master
PPTexEnv_x86_64/lib/python2.7/site-packages/numpy/distutils/tests/gen_ext/__init__.py
1094
from __future__ import division, absolute_import, print_function
RadioFreeAsia/RDacity
refs/heads/master
lib-src/lv2/lv2/plugins/eg-amp.lv2/waflib/Tools/javaw.py
266
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import os,re,tempfile,shutil from waflib import TaskGen,Task,Utils,Options,Build,Errors,Node,Logs from waflib.Configure import conf from waflib.TaskGen import feature,before_m...
hidekb/espressopp
refs/heads/master
contrib/mpi4py/mpi4py-2.0.0/demo/vampirtrace/ring.py
9
#!/usr/bin/env python # If you want VampirTrace to log MPI calls, you have to add the two # lines below at the very beginning of your main bootstrap script. import mpi4py mpi4py.rc.threads = False mpi4py.profile('vt-mpi', logfile='ring') from mpi4py import MPI comm = MPI.COMM_WORLD size = comm.Get_size() rank = comm...
zephyrplugins/zephyr
refs/heads/master
zephyr.plugin.jython/jython2.5.2rc3/Lib/test/test_uu.py
19
""" Tests for uu module. Nick Mathewson """ import unittest from test import test_support import sys, os, uu, cStringIO import uu from StringIO import StringIO plaintext = "The smooth-scaled python crept over the sleeping dog\n" encodedtext = """\ M5&AE('-M;V]T:\"US8V%L960@<'ET:&]N(&-R97!T(&]V97(@=&AE('-L965P (:6YG...
semonte/intellij-community
refs/heads/master
python/testData/completion/fakeNameInQualifiedReference.after.py
83
foo = dict() foo.Intelli = 2
tlodge/homehub.nox
refs/heads/master
src/nox/lib/packet/packet_exceptions.py
11
# Copyright 2008 (C) Nicira, Inc. # # This file is part of NOX. # # NOX 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. # # NOX is d...
alexp25/d4w_app_lab
refs/heads/master
backend/modules/core/runner.py
2
import json import threading import time import traceback from threading import Thread import datetime from modules.api.HIL_socket_API import HIL_socket from modules.data import variables from modules.data.constants import Constants class TestRunner(Thread): """ class used for calling the API for...
wldcordeiro/servo
refs/heads/master
tests/wpt/web-platform-tests/html/semantics/embedded-content/media-elements/track/track-element/cors/support/cors-tester.py
238
from wptserve.handlers import HTTPException import urllib def main(request, response): if request.method != "GET": raise HTTPException(400, message="Method was not GET") if not "id" in request.GET: raise HTTPException(400, message="No id") id = request.GET['id'] if "read" in request....
zhjunlang/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/encodings/iso8859_5.py
272
""" Python Character Mapping Codec iso8859_5 generated from 'MAPPINGS/ISO8859/8859-5.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input,errors='...
evennia/evdemo
refs/heads/master
evdemo/server/conf/lockfuncs.py
26
""" Lockfuncs Lock functions are functions available when defining lock strings, which in turn limits access to various game systems. All functions defined globally in this module are assumed to be available for use in lockstrings to determine access. See the Evennia documentation for more info on locks. A lock fun...
Tk-Glitch/Glitch_Flo_AOSP
refs/heads/marshmallow
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...
chitranshi21/home_service_ionic
refs/heads/master
node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py
1363
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import filecmp import gyp.common import gyp.xcodeproj_file import gyp.xcode_ninja import errno import os import sys import posixpath import re import shutil import...
brockwhittaker/zulip
refs/heads/master
tools/linter_lib/exclude.py
17
# Exclude some directories and files from lint checking EXCLUDED_FILES = [ # Third-party code that doesn't match our style "puppet/apt/.forge-release", "puppet/apt/README.md", "static/third", # Transifex syncs translation.json files without trailing # newlines; there's nothing other than trailin...
hlzz/dotfiles
refs/heads/master
graphics/VTK-7.0.0/ThirdParty/Twisted/twisted/test/process_signal.py
2
import sys, signal signal.signal(signal.SIGINT, signal.SIG_DFL) if getattr(signal, "SIGHUP", None) is not None: signal.signal(signal.SIGHUP, signal.SIG_DFL) print 'ok, signal us' sys.stdin.read() sys.exit(1)
gurkirt/actNet-inAct
refs/heads/master
processing/code/TaskIII_SaveClassifcationWindow.py
1
import os.path from Mytools import GestureSample import Mytools as mytools import scipy.io as sio import numpy as np import pickle as pickle def saveClfOut(QuadDir,OutDir,halfwins,Numberofframe,svmclf,nbc): for halfwin in halfwins: outFile = '{}Classfication_nbc_{}_half...
AtTheMatinee/Roguelike-Core
refs/heads/master
objects.py
1
''' objects.py ''' ''' ==================== Objects ==================== ''' import libtcodpy as libtcod import random import statusEffects from objectClass import Object import actors class Stairs(Object): def __init__(self, game, x, y, char, name, color, destination, blocks=False, properNoun = False, alwaysVisib...
alexbruy/QGIS
refs/heads/master
tests/src/python/test_qgsserver.py
3
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsServer. .. note:: 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. """ __auth...
volatilityfoundation/volatility
refs/heads/master
volatility/plugins/malware/threads.py
3
# Volatility # Copyright (C) 2007-2013 Volatility Foundation # Copyright (c) 2010, 2011, 2012 Michael Ligh <michael.ligh@mnin.org> # # This file is part of Volatility. # # Volatility is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free...
axelkennedal/dissen
refs/heads/master
dissenEnv/lib/python3.5/site-packages/django/conf/locale/et/formats.py
560
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j F Y' TIME_FORMAT = 'G:i' # DATE...
marcore/edx-platform
refs/heads/master
cms/lib/xblock/test/test_runtime.py
148
""" Tests of edX Studio runtime functionality """ from urlparse import urlparse from mock import Mock from unittest import TestCase from cms.lib.xblock.runtime import handler_url class TestHandlerUrl(TestCase): """Test the LMS handler_url""" def setUp(self): super(TestHandlerUrl, self).setUp() ...
samfpetersen/gnuradio
refs/heads/master
gnuradio-runtime/examples/mp-sched/wfm_rcv_pll_to_wav.py
18
#!/usr/bin/env python # # Copyright 2005,2006,2007 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 ...
fgesora/odoo
refs/heads/8.0
addons/mrp/wizard/mrp_product_produce.py
168
# -*- 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...
wsyzxcn/tornado
refs/heads/master
tornado/httputil.py
13
#!/usr/bin/env python # # Copyright 2009 Facebook # # 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 a...
berkeley-stat159/project-kappa
refs/heads/master
code/utils/tests/test_randomForest.py
5
# # This file is for random forest # import numpy as np # from sklearn.ensemble import RandomForestClassifier
mzdaniel/oh-mainline
refs/heads/master
vendor/packages/kombu/funtests/tests/test_redis.py
6
from funtests import transport class test_redis(transport.TransportCase): transport = "redis" prefix = "redis" def after_connect(self, connection): client = connection.channel().client client.info() def test_cant_connect_raises_connection_error(self): conn = self.get_connecti...
ProfessionalIT/professionalit-webiste
refs/heads/master
src/web/contrib/template.py
100
""" Interface to various templating engines. """ import os.path __all__ = [ "render_cheetah", "render_genshi", "render_mako", "cache", ] class render_cheetah: """Rendering interface to Cheetah Templates. Example: render = render_cheetah('templates') render.hello(name="cheetah") ...
lcamacho/airmozilla
refs/heads/master
airmozilla/manage/views/recruitmentmessages.py
7
from django.contrib import messages from django.shortcuts import render, redirect from django.db import transaction from airmozilla.main.models import Event, RecruitmentMessage from airmozilla.manage import forms from .decorators import ( staff_required, permission_required, cancel_redirect ) @staff_req...
unnikrishnankgs/va
refs/heads/master
venv/lib/python3.5/site-packages/IPython/core/tests/test_displayhook.py
2
from IPython.testing.tools import AssertPrints, AssertNotPrints ip = get_ipython() def test_output_displayed(): """Checking to make sure that output is displayed""" with AssertPrints('2'): ip.run_cell('1+1', store_history=True) with AssertPrints('2'): ip.run_cell('1+1 # comment wi...
uppalk1/RackHD
refs/heads/master
test/tests/rackhd20/test_rackhd20_api_notifications.py
10
''' Copyright 2017 Dell Inc. or its subsidiaries. All Rights Reserved. Author(s): This file tests the redfish alert feature in RackHD. RacKHD is enabled to received redfish alerts from compute nodes on the following route: /"API/2.0/notifications/alerts". The test here simulates a node sending a redfish alert by post...
mpetyx/pychatbot
refs/heads/master
AIML/CAML/semiotics/quepy/examples/dbpedia/dbpedia/settings.py
1
#!/usr/bin/env python # coding: utf-8 # Copyright (c) 2012, Machinalis S.R.L. # This file is part of quepy and is distributed under the Modified BSD License. # You should have received a copy of license in the LICENSE file. # # Authors: Rafael Carrascosa <rcarrascosa@machinalis.com> # Gonzalo Garcia Berrotara...
fuselock/odoo
refs/heads/8.0
addons/l10n_cr/__init__.py
438
# -*- encoding: utf-8 -*- ############################################################################## # # __init__.py # l10n_cr_account # First author: Carlos Vásquez <carlos.vasquez@clearcorp.co.cr> (ClearCorp S.A.) # Copyright (c) 2010-TODAY ClearCorp S.A. (http://clearcorp.co.cr). All rights reserved....
staranjeet/fjord
refs/heads/master
vendor/packages/translate-toolkit/translate/search/indexing/test_indexers.py
3
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2008 Zuza Software Foundation # # This file is part of translate. # # translate 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 t...
TAMU-CPT/galaxy-tools
refs/heads/master
tools/webapollo/gga-apollo/delete_features.py
3
#!/usr/bin/env python from __future__ import print_function import argparse import logging import random from apollo import accessible_organisms from apollo.util import GuessOrg, OrgOrGuess, retry from arrow.apollo import get_apollo_instance from webapollo import UserObj, handle_credentials logging.basicConfig(lev...
EchO-KID/google-breakpad
refs/heads/master
src/tools/gyp/test/compiler-override/my_ld.py
980
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys print sys.argv
ps-intelegencia-analytics/testRepo
refs/heads/master
sites/all/libraries/openlayers3/closure-library/closure/bin/build/depstree_test.py
354
#!/usr/bin/env python # # Copyright 2009 The Closure Library 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 ...
bespike/litecoin
refs/heads/0.18
contrib/macdeploy/custom_dsstore.py
4
#!/usr/bin/env python3 # Copyright (c) 2013-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. import biplist from ds_store import DSStore from mac_alias import Alias import sys output_file = sys.argv...
wengyanqing/incubator-hawq
refs/heads/master
tools/bin/gppylib/db/test/__init__.py
12
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
v0idwalker/mgr-sources
refs/heads/master
crawl/crawl/spiders/independent.py
1
# -*- coding: utf-8 -*- import scrapy from crawl.items import theIndependentItem class IndependentSpider(scrapy.Spider): name = "www.independent.co.uk" baseURL = "https://www.independent.co.uk" allowed_domains = ["https://www.independent.co.uk"] start_urls = ['https://www.independent.co.uk/'] def...
40223139/203739test
refs/heads/master
static/Brython3.1.3-20150514-095342/Lib/urllib/request.py
616
from browser import ajax class FileIO: def __init__(self, data): self._data=data def read(self): return self._data def urlopen(url, data=None, timeout=None): global result result=None def on_complete(req): global result result=req _ajax=ajax.ajax() _ajax.bind('co...
CCEM/nlp-heroku-app
refs/heads/master
reddex/reddex/models/meta.py
30
from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.schema import MetaData # Recommended naming convention used by Alembic, as various different database # providers will autogenerate vastly different names making migrations more # difficult. See: http://alembic.zzzcomputing.com/en/latest/naming.ht...
hacklabr/paralapraca
refs/heads/master
paralapraca/management/commands/import_users_groups.py
3
# -*- coding: utf-8 -*- from django.core.management.base import BaseCommand, CommandError from django.contrib.auth import get_user_model from django.contrib.auth.models import Group from django.db import transaction import unicodecsv User = get_user_model() sizes = { 'username': 30, 'last_name': 30, 'fir...
siddhika1889/Pydev-Editor
refs/heads/master
tests/pysrc/simpleimport.py
11
#on line 5 because of some tests import xml.dom.domreg
megakevin/single-authored-code-evolution-analysis
refs/heads/master
extract_complexity_metrics_from_git_repo.py
1
#Usage: $ python extract_complexity_metrics_from_git_repo.py <REPO-PATH> # Extract code metrics for each release in the Git-repo <REPO-PATH> __author__ = 'harold' import sys import os import subprocess from dateutil import parser import time # Install Understand-scitootls # ---------------------------- # 1. Include...
KaranToor/MA450
refs/heads/master
google-cloud-sdk/platform/gsutil/gslib/addlhelp/subdirs.py
3
# -*- coding: utf-8 -*- # Copyright 2012 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 require...
quanvm009/codev7
refs/heads/master
openerp/addons/portal_sale/__openerp__.py
56
# -*- 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...
nzavagli/UnrealPy
refs/heads/master
UnrealPyEmbed/Source/Python/Lib/python27/lib-tk/test/test_tkinter/test_loadtk.py
130
import os import sys import unittest from test import test_support from Tkinter import Tcl, TclError test_support.requires('gui') class TkLoadTest(unittest.TestCase): @unittest.skipIf('DISPLAY' not in os.environ, 'No $DISPLAY set.') def testLoadTk(self): tcl = Tcl() self.assertRaises(TclError...
erudit/zenon
refs/heads/master
eruditorg/core/editor/migrations/0008_auto_20180717_1339.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.11.14 on 2018-07-17 18:39 from __future__ import unicode_literals from django.db import migrations import django_fsm class Migration(migrations.Migration): dependencies = [ ('editor', '0007_merge'), ] operations = [ migrations.AlterField( ...
phy0/namebench
refs/heads/master
nb_third_party/dns/rdtypes/ANY/DNAME.py
248
# 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 ...
blacklin/kbengine
refs/heads/master
kbe/src/lib/python/Lib/lib2to3/fixes/fix_getcwdu.py
203
""" Fixer that changes os.getcwdu() to os.getcwd(). """ # Author: Victor Stinner # Local imports from .. import fixer_base from ..fixer_util import Name class FixGetcwdu(fixer_base.BaseFix): BM_compatible = True PATTERN = """ power< 'os' trailer< dot='.' name='getcwdu' > any* > ""...
mollstam/UnrealPy
refs/heads/master
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/Python-2.7.10/Lib/SimpleHTTPServer.py
15
"""Simple HTTP Server. This module builds on BaseHTTPServer by implementing the standard GET and HEAD requests in a fairly straightforward manner. """ __version__ = "0.6" __all__ = ["SimpleHTTPRequestHandler"] import os import posixpath import BaseHTTPServer import urllib import urlparse import cgi import sys imp...
ebukoz/thrive
refs/heads/develop
erpnext/healthcare/doctype/dosage_strength/dosage_strength.py
30
# -*- coding: utf-8 -*- # Copyright (c) 2015, ESS LLP and contributors # For license information, please see license.txt from __future__ import unicode_literals from frappe.model.document import Document class DosageStrength(Document): pass
JCA-Developpement/Odoo
refs/heads/master
addons/base_vat/__init__.py
440
# -*- 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...
meh/servo
refs/heads/master
python/mach/mach/test/providers/conditions_invalid.py
128
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from __future__ import unicode_literals from mach.decorators import ( CommandProvider, Command, ) @CommandProv...
khara914/cf-phpbuildpack
refs/heads/master
lib/httpd/extension.py
9
# 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 use ...
spblightadv/rethinkdb
refs/heads/next
external/v8_3.30.33.16/tools/gen-postmortem-metadata.py
40
#!/usr/bin/env python # # Copyright 2012 the V8 project authors. All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # not...
priver/webmon
refs/heads/master
webmon/monitor/filters.py
1
# -*- coding: utf-8 -*- import django_filters from django import forms from django.utils.translation import ugettext_lazy as _ from .models import CallDataRecord class CallDataRecordFilter(django_filters.FilterSet): start_from = django_filters.DateFilter(name='start', lookup_type='gt', label=_('From')) start...
mendillorriapps/konpartsapp
refs/heads/master
albuma.py
1
import kivy from kivy.app import App from kivy.uix.label import Label from kivy.uix.button import Button from kivy.uix.boxlayout import BoxLayout from kivy.uix.gridlayout import GridLayout from kivy.uix.scrollview import ScrollView from kivy.core.window import Window from kivy.uix.image import Image from kivy.app im...
flyfei/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/encodings/bz2_codec.py
55
"""Python 'bz2_codec' Codec - bz2 compression encoding. This codec de/encodes from bytes to bytes and is therefore usable with bytes.transform() and bytes.untransform(). Adapted by Raymond Hettinger from zlib_codec.py which was written by Marc-Andre Lemburg (mal@lemburg.com). """ import codecs import bz2 # this code...
cherepski/django-storages
refs/heads/master
examples/libcloud_project/settings.py
28
# Django settings for libcloud_project project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. ...
samtx/whatsmyrankine
refs/heads/master
venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/gb2312prober.py
2993
######################## 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...
psiwczak/openstack
refs/heads/master
nova/tests/integrated/api/__init__.py
68
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2011 Justin Santa Barbara # # 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/L...
google-research/seed_rl
refs/heads/master
agents/policy_gradient/modules/input_normalization_test.py
1
# coding=utf-8 # Copyright 2019 The SEED Authors # 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...
androidarmv6/android_external_chromium_org
refs/heads/cm-11.0
chrome/common/extensions/docs/server2/test_servlet.py
43
# Copyright 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. from extensions_paths import PUBLIC_TEMPLATES from instance_servlet import ( InstanceServlet, InstanceServletRenderServletDelegate) from link_error_detec...
dsfsdgsbngfggb/odoo
refs/heads/8.0
addons/account_voucher/__openerp__.py
260
# -*- 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...
shawnhero/photo-mood
refs/heads/master
lib/werkzeug/security.py
302
# -*- coding: utf-8 -*- """ werkzeug.security ~~~~~~~~~~~~~~~~~ Security related helpers such as secure password hashing tools. :copyright: (c) 2013 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import os import hmac import hashlib import posi...
Code-In-Action/python-in-action
refs/heads/master
flask/todo-api/flask/lib/python3.6/site-packages/pip/_vendor/distlib/version.py
335
# -*- coding: utf-8 -*- # # Copyright (C) 2012-2016 The Python Software Foundation. # See LICENSE.txt and CONTRIBUTORS.txt. # """ Implementation of a flexible versioning scheme providing support for PEP-440, setuptools-compatible and semantic versioning. """ import logging import re from .compat import string_types ...
chainer/chainer
refs/heads/master
chainer/functions/math/erfcinv.py
8
try: from scipy import special available_cpu = True except ImportError as e: available_cpu = False _import_error = e import math import chainer from chainer.backends import cuda from chainer import function_node from chainer import utils from chainer.utils import type_check BACKWORDC = math.pi ** 0.5...
zhanxin1990/gpudb
refs/heads/master
SQL2XML/YSmartParser.py
9
null
valdecdev/odoo
refs/heads/master
addons/report_webkit/__init__.py
47
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # Copyright (c) 2010 Camptocamp SA (http://www.camptocamp.com) # Author : Nicolas Bessi (Camptocamp) import header import company import report_helper import webkit_report import ir_report import wizard import convert i...
hadware/lexicographer-rest-api
refs/heads/master
models/caching.py
1
from os import makedirs __author__ = 'hadware' from os.path import dirname, join, isdir from werkzeug.contrib.cache import FileSystemCache CACHE_TIMEOUT = 300 CACHE_DIRNAME = join(dirname(__file__), "cache") if not isdir(CACHE_DIRNAME): try: makedirs(CACHE_DIRNAME) except OSError: pass cach...
SebasSBM/django
refs/heads/master
tests/urlpatterns_reverse/urls_error_handlers.py
560
# Used by the ErrorHandlerResolutionTests test case. urlpatterns = [] handler400 = 'urlpatterns_reverse.views.empty_view' handler404 = 'urlpatterns_reverse.views.empty_view' handler500 = 'urlpatterns_reverse.views.empty_view'