repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
ingkebil/trost
refs/heads/master
scripts/maintanance/compare_plants_aliquots.py
1
#!/usr/bin/env python import sys import sql def main(argv): aliquots = sql.fetch_all('aliquots', { '1': '1'}) print "Found %d aliquots ..." % len(aliquots) for aliquot in aliquots: aliquot_id = aliquot['id'] sys.stdout.write("Checking %d ...\r" % aliquot_id) a_plants = sql.fetch_a...
filias/django
refs/heads/master
tests/admin_docs/urls.py
384
from django.conf.urls import include, url from django.contrib import admin from . import views ns_patterns = ([ url(r'^xview/func/$', views.xview_dec(views.xview), name='func'), ], 'test') urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^admindocs/', include('django.contrib.admindocs.urls')), ...
dlazz/ansible
refs/heads/devel
lib/ansible/utils/module_docs_fragments/a10.py
8
# # (c) 2016, John Barker <jobarker@redhat.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 ver...
kensho-technologies/graphql-compiler
refs/heads/main
graphql_compiler/schema_generation/__init__.py
7
# Copyright 2019-present Kensho Technologies, LLC.
ScienceStacks/SciSheets
refs/heads/master
mysite/user/guest/python/michaelis.py
2
# Export of the table MichaelisMenten def michaelis(S, V): from scisheets.core import api as api s = api.APIPlugin('/home/ubuntu/SciSheets/mysite/user/guest/python/michaelis.scish') s.initialize() _table = s.getTable() s.controller.startBlock('Prologue') # Prologue import math as mt import num...
wooga/airflow
refs/heads/master
airflow/api/auth/__init__.py
5130
# # 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...
samthor/intellij-community
refs/heads/master
python/helpers/python-skeletons/os/__init__.py
49
"""Skeleton for 'os' stdlib module.""" from __future__ import unicode_literals import sys error = OSError def ctermid(): """Return the filename corresponding to the controlling terminal of the process. :rtype: string """ return '' def getegid(): """Return the effective group id of the c...
i52gagrj/backgestdoc
refs/heads/master
vendor/sonata-project/block-bundle/Resources/doc/conf.py
62
# -*- coding: utf-8 -*- # # IoC documentation build configuration file, created by # sphinx-quickstart on Fri Mar 29 01:43:00 2013. # # 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 # autogenerated file. # # All con...
bbsan2k/nzbToMedia
refs/heads/nightly
libs/dateutil/easter.py
291
""" Copyright (c) 2003-2007 Gustavo Niemeyer <gustavo@niemeyer.net> This module offers extensions to the standard python 2.3+ datetime module. """ __author__ = "Gustavo Niemeyer <gustavo@niemeyer.net>" __license__ = "PSF License" import datetime __all__ = ["easter", "EASTER_JULIAN", "EASTER_ORTHODOX", "EASTER_WESTE...
nopjmp/SickRage
refs/heads/master
lib/pgi/clib/gir/gicallableinfo.py
19
# Copyright 2012 Christoph Reiter # # 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.1 of the License, or (at your option) any later version. from ctypes import c_char_...
bohlian/erpnext
refs/heads/develop
erpnext/setup/doctype/email_digest/email_digest.py
14
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils import fmt_money, formatdate, format_time, now_datetime, \ get_url_to_form, get_url_to_list, flt f...
singlebrook/AWS-ElasticBeanstalk-CLI
refs/heads/master
eb/macosx/python3/lib/aws/requests/packages/charade/latin1prober.py
950
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
TApplencourt/CloudChallenge_FranceGrilles
refs/heads/master
csm_cipsi.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import time import subprocess import random import cPickle as pickle from collections import defaultdict HOST = "localhost" PORT = 8001 URL = "http://%s:%d"%(HOST,PORT) RSYNC_INTERVAL = 5*60 + random.randint(-30,30) PATH = "/root/Cipsi/" PATH...
literaldumb/Godot-CustomSpeech
refs/heads/master
customspeech/config.py
3
def can_build(platform): return platform=="android" def configure(env): if env['platform'] == 'android': # android specific code env.android_add_to_manifest("AndroidManifest.xml") env.android_add_dependency("compile files('android.jar')")
mlalic/servo
refs/heads/master
python/mach/mach/dispatcher.py
46
# 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 absolute_import, unicode_literals import argparse import difflib import sys from operator impor...
yvan-sraka/wprevents
refs/heads/master
vendor-local/lib/python/unidecode/x09f.py
252
data = ( 'Cu ', # 0x00 'Qu ', # 0x01 'Chao ', # 0x02 'Wa ', # 0x03 'Zhu ', # 0x04 'Zhi ', # 0x05 'Mang ', # 0x06 'Ao ', # 0x07 'Bie ', # 0x08 'Tuo ', # 0x09 'Bi ', # 0x0a 'Yuan ', # 0x0b 'Chao ', # 0x0c 'Tuo ', # 0x0d 'Ding ', # 0x0e 'Mi ', # 0x0f 'Nai ', # 0x10 'Ding ...
sivel/ansible-modules-extras
refs/heads/devel
packaging/os/pacman.py
11
#!/usr/bin/python -tt # -*- coding: utf-8 -*- # (c) 2012, Afterburn <http://github.com/afterburn> # (c) 2013, Aaron Bull Schaefer <aaron@elasticdog.com> # (c) 2015, Indrajit Raychaudhuri <irc+code@indrajit.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it un...
albertjan/pypyjs-presentation
refs/heads/gh-pages
assets/js/pypy.js-0.3.1/lib/modules/_codecs_iso2022.py
14
# this getcodec() function supports any multibyte codec, although # for compatibility with CPython it should only be used for the # codecs from this module, i.e.: # # 'iso2022_kr', 'iso2022_jp', 'iso2022_jp_1', 'iso2022_jp_2', # 'iso2022_jp_2004', 'iso2022_jp_3', 'iso2022_jp_ext' from _multibytecodec import __ge...
amisrs/one-eighty
refs/heads/master
angular_flask/lib/python2.7/site-packages/requests/models.py
43
# -*- coding: utf-8 -*- """ requests.models ~~~~~~~~~~~~~~~ This module contains the primary objects that power Requests. """ import collections import logging import datetime from io import BytesIO from .hooks import default_hooks from .structures import CaseInsensitiveDict from .auth import HTTPBasicAuth from .c...
pas256/ansible
refs/heads/devel
contrib/inventory/nsot.py
52
#!/bin/env python ''' nsot ==== Ansible Dynamic Inventory to pull hosts from NSoT, a flexible CMDB by Dropbox Features -------- * Define host groups in form of NSoT device attribute criteria * All parameters defined by the spec as of 2015-09-05 are supported. + ``--list``: Returns JSON hash of host groups -> ho...
mmagnus/rnastruc_evo_clustix
refs/heads/master
benchmark/evoxx.py
2
#!/usr/bin/env python # -*- coding: utf-8 -*- """ A mother script to run evox.py. If no --case selected, it will be executed on all folder in the current directory or defined by --path. Improvements: - ln for structures, not copying any more! """ from __future__ import print_function import argparse import os impor...
giggsey/SickRage
refs/heads/master
lib/unidecode/x0d6.py
253
data = ( 'hyeo', # 0x00 'hyeog', # 0x01 'hyeogg', # 0x02 'hyeogs', # 0x03 'hyeon', # 0x04 'hyeonj', # 0x05 'hyeonh', # 0x06 'hyeod', # 0x07 'hyeol', # 0x08 'hyeolg', # 0x09 'hyeolm', # 0x0a 'hyeolb', # 0x0b 'hyeols', # 0x0c 'hyeolt', # 0x0d 'hyeolp', # 0x0e 'hyeolh', # 0x...
wechatpy/wechatpy
refs/heads/master
wechatpy/pay/api/__init__.py
2
# -*- coding: utf-8 -*- from wechatpy.pay.api.redpack import WeChatRedpack # NOQA from wechatpy.pay.api.transfer import WeChatTransfer # NOQA from wechatpy.pay.api.coupon import WeChatCoupon # NOQA from wechatpy.pay.api.order import WeChatOrder # NOQA from wechatpy.pay.api.refund import WeChatRefund # NOQA from w...
chanceraine/nupic
refs/heads/master
examples/tp/tp_test.py
34
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions ...
CloudServer/nova
refs/heads/master
nova/volume/cinder.py
26
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # 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 ...
miller-lover/jingwei-sea
refs/heads/master
zhongnan/lsh-mr/lsh_reducre.py
1
#lsh_reducre.py __author__ = 'raj' import sys prev_band_id, prev_band_hash = None, None cluster = [] cid = 0 for line in sys.stdin: band_id, band_hash, doc_id = line.strip().split("\t", 3) if prev_band_id is None and prev_band_hash is None: prev_band_id, prev_band_hash = band_id, band_h...
KennethPierce/pylearnk
refs/heads/fixNogil/master
pylearn2/models/tests/test_mlp.py
1
from itertools import product import numpy as np import theano from theano import tensor from pylearn2.models.mlp import (MLP, Linear, Softmax, Sigmoid, exhaustive_dropout_average, sampled_dropout_average, CompositeLayer) from pylearn2.space import Vec...
vvw/linearAlgebra-coursera
refs/heads/master
assignment 3/mat/vecutil.py
35
from vec import Vec def list2vec(L): """Given a list L of field elements, return a Vec with domain {0...len(L)-1} whose entry i is L[i] >>> list2vec([10, 20, 30]) Vec({0, 1, 2},{0: 10, 1: 20, 2: 30}) """ return Vec(set(range(len(L))), {k:L[k] for k in range(len(L))}) def zero_vec(D): """R...
jeremiedecock/snippets
refs/heads/master
python/blender/blender_background_hello.py
1
# USAGE: blender --background --python blender_background_hello.py # See http://wiki.blender.org/index.php/Doc:2.6/Manual/Extensions/Python import bpy print('Prints the names of all objects belonging to the Blender scene with name "Scene":') for object in bpy.data.scenes['Scene'].objects: print(object.name)
DeathPoison/tinker-cnc
refs/heads/master
tinkerforge/bricklet_current25.py
1
# -*- coding: utf-8 -*- ############################################################# # This file was automatically generated on 2013-07-04. # # # # Bindings Version 2.0.8 # # ...
Matt-Deacalion/django
refs/heads/master
tests/migrations/test_migrations_backwards_deps_1/0002_second.py
416
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [('migrations', '0001_initial')] operations = []
gylian/sickbeard
refs/heads/master
lib/guessit/transfo/guess_filetype.py
50
#!/usr/bin/env python # -*- coding: utf-8 -*- # # GuessIt - A library for guessing information from filenames # Copyright (c) 2012 Nicolas Wack <wackou@gmail.com> # # GuessIt is free software; you can redistribute it and/or modify it under # the terms of the Lesser GNU General Public License as published by # the Free ...
UrusTeam/android_ndk_toolchain_cross
refs/heads/master
lib/python2.7/test/test_urlparse.py
51
#! /usr/bin/env python from test import test_support import unittest import urlparse RFC1808_BASE = "http://a/b/c/d;p?q#f" RFC2396_BASE = "http://a/b/c/d;p?q" RFC3986_BASE = 'http://a/b/c/d;p?q' SIMPLE_BASE = 'http://a/b/c/d' # A list of test cases. Each test case is a two-tuple that contains # a string with the q...
mitar/django
refs/heads/master
django/conf/locale/bs/formats.py
433
# -*- 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 = 'j. N Y.' TIME_FORMAT = 'G:i' DATETIME_FORMAT = 'j. N. Y. G:i T' YEAR_MONT...
dagwieers/ansible
refs/heads/devel
lib/ansible/modules/network/netscaler/netscaler_gslb_vserver.py
124
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2017 Citrix Systems # 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', ...
grman157/socket_udp
refs/heads/master
samples/push-guestbook/guestbook-srv/third_party/httplib2/__init__.py
33
from __future__ import generators """ httplib2 A caching http interface that supports ETags and gzip to conserve bandwidth. Requires Python 2.3 or later Changelog: 2007-08-18, Rick: Modified so it's able to use a socks proxy if needed. """ __author__ = "Joe Gregorio (joe@bitworking.org)" __copyright__ = "Copyright...
blademainer/intellij-community
refs/heads/master
python/testData/mover/multiLineSelection8_afterUp.py
83
class Test(object): <caret><selection> a = 1 b = 2 </selection> def q(self): pass
youdonghai/intellij-community
refs/heads/master
python/testData/inspections/ReplacePrintComment.py
71
<warning descr="Statement seems to have no effect and can be replaced with function call to have effect">print</warning><error descr="End of statement expected"> </error><warning descr="Statement seems to have no effect">'%s %s %s %s' % bar</warning> # <- doesn't work either
kamisama91/service.skin.smartplaylist.widgets
refs/heads/master
playlistCollection.py
1
import helper import moviePlaylist as mpl import episodePlaylist as epl import musicvideoPlaylist as mvpl import songPlaylist as spl MAX_PLAYLIST = 15 class PlaylistCollection(): def __init__(self): self.__playlists = [] def __get_playlist_details (self, playlistPath): pla...
cooniur/ansible-modules-core
refs/heads/devel
network/nxos/nxos_evpn_global.py
21
#!/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...
bikong2/django
refs/heads/master
tests/properties/models.py
542
""" Using properties on models Use properties on models just like on any other Python object. """ from django.db import models class Person(models.Model): first_name = models.CharField(max_length=30) last_name = models.CharField(max_length=30) def _get_full_name(self): return "%s %s" % (self.fi...
rickyzhang82/linux-odroid-u2
refs/heads/odroid-3.0.y
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...
larsks/drifter
refs/heads/master
drifter/commands/command_ip.py
1
#!/usr/bin/python import os import sys from ..command import Command class CommandIp (Command): def build_subparser(self): p = self.parser.add_parser('ip', help='Output the ip address of a named instance.') p.add_argument('name') p.set_defaults(handler=self.run) def h...
smmribeiro/intellij-community
refs/heads/master
python/testData/pyi/type/genericClassDefinitionInSameFile/GenericClassDefinitionInSameFile.py
21
class Holder: def __init__(self, x): self.x = x def get(self): return self.x ex<caret>pr = Holder(42).get()
hejuna/bite-project
refs/heads/master
deps/gdata-python-client/samples/apps/marketplace_sample/gdata/tlslite/utils/__init__.py
409
"""Toolkit for crypto and other stuff.""" __all__ = ["AES", "ASN1Parser", "cipherfactory", "codec", "Cryptlib_AES", "Cryptlib_RC4", "Cryptlib_TripleDES", "cryptomath: cryptomath module", "dateFuncs", "hmac", "...
selentd/pythontools
refs/heads/master
pytools/src/IndexEval/indexdata.py
1
''' Created on 03.09.2013 @author: selen00r ''' import collections import csv import datetime import string class MeanSet: ''' MeanSet defines a set of mean values used for index analysis. Currently there are mean values defined for 5 days 13 days 38 days 89 days and ...
cadencewatches/frappe
refs/heads/master
frappe/core/doctype/defaultvalue/__init__.py
2292
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals
noseka1/ansible-modules-core
refs/heads/devel
cloud/amazon/rds_param_group.py
16
#!/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...
heke123/chromium-crosswalk
refs/heads/master
third_party/cython/src/Cython/Compiler/CodeGeneration.py
99
from Cython.Compiler.Visitor import VisitorTransform from Cython.Compiler.Nodes import StatListNode class ExtractPxdCode(VisitorTransform): """ Finds nodes in a pxd file that should generate code, and returns them in a StatListNode. The result is a tuple (StatListNode, ModuleScope), i.e. everythin...
vfaronov/geany
refs/heads/master
tests/ctags/simple.py
85
"""A long string literal """ from bsddb import btopen # Public global constants VERSION = '1.2.0' # Flags for list() and children() ALL = 0xff KEY = 0x01 TREEID = 0x02 INDENT = 0x04 DATA = 0x08 # Used by dbtreedata class one: x = lambda x: x y = 0 def __init__(self, filename, pathsep='', treegap...
mlperf/training_results_v0.6
refs/heads/master
Fujitsu/benchmarks/resnet/implementations/mxnet/example/recommenders/crossentropy.py
14
#!/usr/bin/env python # 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 # "L...
shubhamgupta123/erpnext
refs/heads/master
erpnext/agriculture/doctype/soil_analysis/soil_analysis.py
23
# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class SoilAnalysis(Document): def load_contents(self): docs = frappe.get_al...
RuanJG/paparazzi
refs/heads/master
sw/lib/python/pprz_msg/pprz_transport.py
24
""" Paparazzi transport encoding utilities """ from __future__ import absolute_import, division, print_function import struct from .message import PprzMessage # use Enum from python 3.4 if available (https://www.python.org/dev/peps/pep-0435/) # (backports as enum34 on pypi) try: from enum import Enum except Impo...
Titan-C/learn-dmft
refs/heads/master
dmft/twosite.py
1
# -*- coding: utf-8 -*- """ Two Site Dynamical Mean Field Theory ==================================== The two site DMFT approach given by M. Potthoff [Potthoff2001]_ on how to treat the impurity bath as a sigle site of the DMFT. Work is around a single impurity Anderson model. .. [Potthoff2001] M. Potthoff PRB, 64, 16...
agualis/test-django-nonrel
refs/heads/master
django/core/management/commands/sqlsequencereset.py
312
from optparse import make_option from django.core.management.base import AppCommand from django.db import connections, models, DEFAULT_DB_ALIAS class Command(AppCommand): help = 'Prints the SQL statements for resetting sequences for the given app name(s).' option_list = AppCommand.option_list + ( mak...
emile2016/mezzanine
refs/heads/master
mezzanine/core/management/commands/createdb.py
3
from __future__ import print_function, unicode_literals from future.builtins import int, input from optparse import make_option from socket import gethostname from django import VERSION from django.core.management.base import BaseCommand, CommandError from django.contrib.auth import get_user_model from django.contrib...
bootandy/imps
refs/heads/master
imps/tests/__init__.py
29
from __future__ import absolute_import, division, print_function
amurzeau/streamlink-debian
refs/heads/master
tests/test_localization.py
3
import unittest from unittest.mock import patch import streamlink.utils.l10n as l10n try: import iso639 # noqa: F401 import iso3166 # noqa: F401 ISO639 = True except ImportError: # pragma: no cover ISO639 = False try: import pycountry # noqa: F401 PYCOUNTRY = True except ImportError: #...
Jannes123/django-oscar
refs/heads/master
src/oscar/apps/catalogue/reviews/views.py
15
from django.conf import settings from django.contrib import messages from django.shortcuts import get_object_or_404, redirect from django.utils.translation import ugettext_lazy as _ from django.views.generic import CreateView, DetailView, ListView, View from oscar.apps.catalogue.reviews.signals import review_added fro...
Trinitaria/namebench
refs/heads/master
nb_third_party/dns/rdataclass.py
248
# Copyright (C) 2001-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 ...
Alwnikrotikz/opencamlib
refs/heads/master
scripts/ocl_bounding-box.py
8
import ocl import camvtk import time import vtk import datetime import math def drawBB(myscreen, bb): lines=[] # x-direction lines, red color lines.append( camvtk.Line( p1=(bb.minpt.x, bb.minpt.y, bb.minpt.z), p2=(bb.maxpt.x, bb.minpt.y, bb.minpt.z), color=camvtk.red) ) lines.append( camvtk.Line( p1=(b...
Barbarian1010/pychess
refs/heads/master
lib/pychess/Database/model.py
20
# -*- coding: utf-8 -*- import os from sqlalchemy import create_engine, MetaData, Table, Column, Sequence, Integer, String, SmallInteger, CHAR, LargeBinary, UnicodeText from pychess.Utils.const import LOCAL, ARTIFICIAL, REMOTE from pychess.System.prefix import addUserDataPrefix engine = None def set_engine(url, ech...
Suwings/Yeinw
refs/heads/master
src/Crypto/SelfTest/PublicKey/test_ElGamal.py
112
# -*- coding: utf-8 -*- # # SelfTest/PublicKey/test_ElGamal.py: Self-test for the ElGamal primitive # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public domain is not available, # everyone ...
sid-kap/pants
refs/heads/master
src/python/pants/backend/jvm/targets/java_library.py
16
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from pants.backend.j...
rodolfochicone/djangoecommerce
refs/heads/master
djangoecommerce/wsgi.py
13
""" WSGI config for djangoecommerce project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJAN...
uberamd/NGECore2
refs/heads/master
scripts/object/mobile/dressed_sennex_pirate_05.py
85615
import sys def setup(core, object): return
ProjectSWGCore/NGECore2
refs/heads/master
scripts/object/mobile/hologram/corellian_slice_hound.py
85615
import sys def setup(core, object): return
mangadul/WhatsAppy
refs/heads/master
yowsup/layers/protocol_privacy/protocolentities/__init__.py
68
from .privacylist_iq import PrivacyListIqProtocolEntity
SimonSapin/servo
refs/heads/master
tests/wpt/web-platform-tests/content-security-policy/support/echo-policy.py
107
def main(request, response): policy = request.GET.first("policy"); return [("Content-Type", "text/html"), ("Content-Security-Policy", policy)], "<!DOCTYPE html><title>Echo.</title>"
orangeYao/twiOpinion
refs/heads/master
readJson.py
1
import re import json import sys from pprint import pprint from random import randint from nltk import PorterStemmer from nltk import FreqDist from nltk.corpus import stopwords stop = stopwords.words('english') #from guess_language import guess_language #in combo from guess_language import guessLanguage #in local fro...
JianyuWang/nova
refs/heads/master
nova/db/sqlalchemy/migrate_repo/versions/297_add_forced_down_for_services.py
62
# 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...
thyagostall/pong-api
refs/heads/master
api/views.py
1
from django.views.decorators.csrf import csrf_exempt from django.shortcuts import render from django.http import JsonResponse, Http404 from api.models import Score def convert(score): return { 'player': score.player, 'computer': score.computer, 'name': score.name, 'timestamp': sco...
rebost/django
refs/heads/master
django/core/management/commands/sqlindexes.py
242
from __future__ import unicode_literals from optparse import make_option from django.core.management.base import AppCommand from django.core.management.sql import sql_indexes from django.db import connections, DEFAULT_DB_ALIAS class Command(AppCommand): help = "Prints the CREATE INDEX SQL statements for the give...
da1z/intellij-community
refs/heads/master
python/testData/inspections/EmptyListOfBaseClasses_after.py
239
class C: pass
bonitadecker77/python-for-android
refs/heads/master
python-modules/twisted/twisted/cred/error.py
62
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. """Cred errors.""" class Unauthorized(Exception): """Standard unauthorized error.""" class LoginFailed(Exception): """ The user's request to log in failed for some reason. """ class UnauthorizedLogin(LoginFailed, ...
lowiki-org/localwiki-backend-server
refs/heads/master
localwiki/links/tests.py
3
from django.test import TestCase from links import extract_internal_links, extract_included_pagenames, extract_included_tags class ExtractLinkTest(TestCase): def test_simple_extraction(self): html = """ <p>I love <a href="Parks">awesome parks</a>.</p> """ links = extract_internal_links(ht...
befelix/GPy
refs/heads/devel
GPy/plotting/matplot_dep/visualize.py
6
import numpy as np import time from ...core.parameterization.variational import VariationalPosterior try: import matplotlib.pyplot as plt import matplotlib as mpl from mpl_toolkits.mplot3d import Axes3D import visual visual_available = True except ImportError: visual_available = False class ...
RadioFreeAsia/RDacity
refs/heads/master
lib-src/lv2/sord/waflib/Tools/qt4.py
177
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file try: from xml.sax import make_parser from xml.sax.handler import ContentHandler except ImportError: has_xml=False ContentHandler=object else: has_xml=True import os,sys f...
xifle/greensc
refs/heads/master
tools/scons/scons-local-2.0.1/SCons/Platform/darwin.py
61
"""engine.SCons.Platform.darwin Platform-specific initialization for Mac OS X systems. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Platform.Platform() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008...
Shanto/ajenti
refs/heads/master
plugins/loadavg_linux/__init__.py
4
from ajenti.app.plugins import require require('loadavg') from main import *
GbalsaC/bitnamiP
refs/heads/master
pyfs/fs/osfs/watch.py
10
""" fs.osfs.watch ============= Change watcher support for OSFS """ import os import sys import errno import threading from fs.errors import * from fs.path import * from fs.watch import * OSFSWatchMixin = None # Try using native implementation on win32 if sys.platform == "win32": try: from fs.osfs.wa...
temasek/android_external_chromium_org_third_party_WebKit
refs/heads/cm-12.1
Tools/Scripts/webkitpy/tool/commands/queries_unittest.py
36
# Copyright (C) 2009 Google Inc. All rights reserved. # Copyright (C) 2012 Intel Corporation. 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 th...
OSSESAC/odoopubarquiluz
refs/heads/7.0
addons/project/__init__.py
436
# -*- 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...
apdmatos/geostatistics
refs/heads/master
scripts/lib/OpenLayers-2.12/tools/shrinksafe.py
293
#!/usr/bin/env python # # Script to provide a wrapper around the ShrinkSafe "web service" # <http://shrinksafe.dojotoolkit.org/> # # # We use this script for two reasons: # # * This avoids having to install and configure Java and the standalone # ShrinkSafe utility. # # * The current ShrinkSafe standalone utility...
alexander-barabash/KVM-replay
refs/heads/master
tools/perf/scripts/python/event_analyzing_sample.py
4719
# event_analyzing_sample.py: general event handler in python # # Current perf report is already very powerful with the annotation integrated, # and this script is not trying to be as powerful as perf report, but # providing end user/developer a flexible way to analyze the events other # than trace points. # # The 2 dat...
bzennn/blog_flask
refs/heads/master
python/lib/python3.5/site-packages/pip/_vendor/requests/packages/chardet/codingstatemachine.py
2930
######################## 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...
openstack/oslo.log
refs/heads/master
oslo_log/tests/unit/test_helpers.py
1
# 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...
quanvm009/codev7
refs/heads/master
openerp/addons/portal_project/__openerp__.py
55
# -*- 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...
xlhtc007/blaze
refs/heads/master
blaze/expr/tests/test_slicing.py
17
from blaze.expr import symbol import numpy as np from datashape import dshape, isscalar def test_array_dshape(): x = symbol('x', '5 * 3 * float32') assert x.shape == (5, 3) assert x.schema == dshape('float32') assert len(x) == 5 assert x.ndim == 2 def test_element(): x = symbol('x', '5 * 3 *...
watchcat/cbu-rotterdam
refs/heads/master
framework/emailer.py
3
""" :copyright: (c) 2011 Local Projects, all rights reserved :license: Affero GNU GPL v3, see LICENSE for more details. """ """ Emailing utility. Emailing is ultimately handled through webpy. """ import smtplib import os import helpers.custom_filters as custom_filters from email.mime.text import MIMEText fro...
Nick-OpusVL/odoo
refs/heads/8.0
addons/stock_invoice_directly/stock_invoice_directly.py
337
# -*- 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...
delhivery/django
refs/heads/master
tests/gis_tests/rasterapp/models.py
291
from ..models import models class RasterModel(models.Model): rast = models.RasterField('A Verbose Raster Name', null=True, srid=4326, spatial_index=True, blank=True) class Meta: required_db_features = ['supports_raster'] def __str__(self): return str(self.id)
zaffra/Inquire
refs/heads/master
GAE/django/db/models/sql/where.py
289
""" Code to manage the creation and SQL rendering of 'where' constraints. """ import datetime from itertools import repeat from django.utils import tree from django.db.models.fields import Field from django.db.models.query_utils import QueryWrapper from datastructures import EmptyResultSet, FullResultSet # Connection...
gitromand/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/net/bugzilla/bug.py
125
# Copyright (c) 2009 Google Inc. All rights reserved. # Copyright (c) 2009 Apple Inc. All rights reserved. # Copyright (c) 2010 Research In Motion Limited. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are...
nathanielvarona/airflow
refs/heads/master
airflow/api_connexion/schemas/connection_schema.py
1
# # 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...
agry/NGECore2
refs/heads/master
scripts/object/tangible/loot/creature_loot/collections/meatlump_lint_08.py
85615
import sys def setup(core, object): return
ProjectSWGCore/NGECore2
refs/heads/master
scripts/object/mobile/dressed_captain_derlin_remembrance_day.py
85615
import sys def setup(core, object): return
CGATOxford/CGATPipelines
refs/heads/master
CGATPipelines/Pipeline/Files.py
2
"""Files.py - Working with files in ruffus pipelines ==================================================== Reference --------- """ import os import tempfile import CGAT.IOTools as IOTools # Set from Pipeline.py PARAMS = {} def getTempFile(dir=None, shared=False, suffix="", mode="w+", encoding="utf-8"): '''get ...
jerryz1982/neutron
refs/heads/master
neutron/tests/retargetable/test_example.py
53
# 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 ...
yinchunlong/abelkhan-1
refs/heads/master
ext/c++/thirdpart/c++/boost/tools/quickbook/test/python/output-deps.py
34
#!/usr/bin/env python # Copyright 2012-2013 Daniel James # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) import sys, os, subprocess, tempfile, re def main(args, directory): if len(args) != 1: print "Usage: outp...