repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
shipci/boto
refs/heads/develop
boto/rds/statusinfo.py
180
# Copyright (c) 2013 Amazon.com, Inc. or its affiliates. # All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights...
ahmetdaglarbas/e-commerce
refs/heads/tez
oscar/apps/basket/south_migrations/0002_auto__add_field_line_price_incl_tax.py
18
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models from oscar.core.compat import AUTH_USER_MODEL, AUTH_USER_MODEL_NAME class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Line.price_incl_tax' d...
tedder/ansible
refs/heads/devel
lib/ansible/modules/network/aci/aci_contract_subject.py
12
#!/usr/bin/python # -*- coding: utf-8 -*- # 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': ['preview'], ...
ToontownUprising/src
refs/heads/master
toontown/catalog/CatalogFurnitureItem.py
3
import CatalogAtticItem import CatalogItem import random from toontown.toonbase import TTLocalizer from toontown.toonbase import ToontownGlobals FTModelName = 0 FTColor = 1 FTColorOptions = 2 FTBasePrice = 3 FTFlags = 4 FTScale = 5 FLBank = 1 FLCloset = 2 FLRug = 4 FLPainting = 8 FLOnTable = 16 FLIsTable = 32 FLPhone ...
FlorianLudwig/odoo
refs/heads/8.0
addons/website_blog/tests/test_website_blog_flow.py
269
# -*- coding: utf-8 -*- from openerp.addons.website_blog.tests.common import TestWebsiteBlogCommon class TestWebsiteBlogFlow(TestWebsiteBlogCommon): def test_website_blog_followers(self): """ Test the flow of followers and notifications for blogs. Intended flow : - people subscribe to ...
intrack/BoofCV-master
refs/heads/master
main/geo/generate/python/utilsymbolic.py
2
# Copyright (c) 2011-2012, Peter Abeles. All Rights Reserved. # # This file is part of BoofCV (http://boofcv.org). # # 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/...
mattixpet/python-bach_machine
refs/heads/master
bach_version1.01/MIDIUtil-0.89/src/midiutil/MidiFile3.py
12
#----------------------------------------------------------------------------- # Name: MidiFile.py # Purpose: MIDI file manipulation utilities # # Author: Mark Conway Wirt <emergentmusics) at (gmail . com> # # Created: 2008/04/17 # Copyright: (c) 2009 Mark Conway Wirt # License: Please see Lic...
benrudolph/commcare-hq
refs/heads/master
corehq/apps/app_manager/xform.py
1
from collections import defaultdict, OrderedDict from functools import wraps import logging from django.utils.translation import ugettext_lazy as _ from casexml.apps.case.xml import V2_NAMESPACE from corehq.apps.app_manager.const import APP_V1, SCHEDULE_PHASE, SCHEDULE_LAST_VISIT, SCHEDULE_LAST_VISIT_DATE, \ CASE_I...
thaumos/ansible
refs/heads/devel
lib/ansible/modules/remote_management/ucs/ucs_ntp_server.py
64
#!/usr/bin/python # -*- coding: utf-8 -*- # 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': ['preview'], ...
SamaraCardoso27/eMakeup
refs/heads/master
backend/appengine/routes/login/google.py
66
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from google.appengine.api import users from config.template_middleware import TemplateResponse from gaecookie.decorator import no_csrf from gaepermission import facade from gaepermission.decorator import login_not_required from tekton impo...
diegoguimaraes/django
refs/heads/master
django/contrib/gis/tests/geoapp/__init__.py
12133432
hlin117/statsmodels
refs/heads/master
statsmodels/emplike/tests/results/__init__.py
42
# Init for results
jlopezmalla/spark
refs/heads/master
python/pyspark/cloudpickle.py
32
""" This class is defined to override standard pickle functionality The goals of it follow: -Serialize lambdas and nested functions to compiled byte code -Deal with main module correctly -Deal with other non-serializable objects It does not include an unpickler, as standard python unpickling suffices. This module wa...
hanbing718/OMOOC2py
refs/heads/master
_src/om2py2w/2wex2/__init__.py
12133432
nava45/junction
refs/heads/master
junction/profiles/migrations/__init__.py
12133432
xuegang/gpdb
refs/heads/master
src/test/tinc/tincrepo/mpp/gpdb/tests/storage/filerep/Filerep_Resync/schema/__init__.py
12133432
1013553207/django
refs/heads/master
django/contrib/gis/gdal/raster/__init__.py
12133432
TeachAtTUM/edx-platform
refs/heads/master
common/test/acceptance/tests/video/__init__.py
12133432
edmundgentle/schoolscript
refs/heads/master
SchoolScript/bin/Debug/pythonlib/Lib/test/test_multibytecodec_support.py
3
#!/usr/bin/env python3 # # test_multibytecodec_support.py # Common Unittest Routines for CJK codecs # import codecs import os import re import sys import unittest from http.client import HTTPException from test import support from io import BytesIO class TestBase: encoding = '' # codec ...
OrOz77/Sneaker_Scraper_Bot
refs/heads/master
Bot/Sneaker_Scraper/spiders/html_output_spider.py
1
import scrapy #a spider to retrieve HTML doc from a URL class HTMLSpider(scrapy.Spider): name = "HTML" start_urls = [ 'http://store.nike.com/us/en_us/pd/flyknit-racer-unisex-running-shoe/pid-10064409/pgid-11809455', #Nike sample product page ] def parse(self, response): page = response...
anhstudios/swganh
refs/heads/develop
data/scripts/templates/object/building/poi/hq/shared_hutt_sm.py
2
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Building() result.template = "object/building/poi/hq/shared_hutt_sm.iff" result.attribute_template_id = -1 resul...
JioCloud/horizon
refs/heads/master
horizon/browsers/__init__.py
85
# Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
vijayendrabvs/hap
refs/heads/master
neutron/plugins/embrane/common/utils.py
10
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Embrane, 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/l...
Centre-Alt-Rendiment-Esportiu/att
refs/heads/master
old_project/Python/win_libs/numpy/core/tests/test_scalarinherit.py
59
# -*- coding: utf-8 -*- """ Test printing of scalar types. """ import numpy as np from numpy.testing import TestCase, run_module_suite class A(object): pass class B(A, np.float64): pass class C(B): pass class D(C, B): pass class B0(np.float64, A): pass class C0(B0): pass class TestInherit(TestCase): def test...
amisrs/angular-flask
refs/heads/master
angular_flask/lib/python2.7/site-packages/flask/globals.py
783
# -*- coding: utf-8 -*- """ flask.globals ~~~~~~~~~~~~~ Defines all the global objects that are proxies to the current active context. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from functools import partial from werkzeug.local import LocalStack, ...
arkem/top1m
refs/heads/main
top1m-redirector.py
1
#!/usr/bin/python3 import sys import urllib.parse maxsites = 5000 failurl = 'http://arkem.org/failurl.html' sites = {l.split(',')[1].strip() for l in open('/home/arkem/top-1m.csv') if int(l.split(',')[0]) <= maxsites} sites.add(urllib.parse.urlparse(failurl).netloc) for l in sys.stdin: try: fqdn = urllib....
freevoid/yawf
refs/heads/master
yawf/tests/__init__.py
1
from __future__ import absolute_import from .permissions import * from .message_specs import *
GabrielNicolasAvellaneda/dd-agent
refs/heads/master
checks.d/apache.py
27
# stdlib import urlparse # 3rd party import requests # project from checks import AgentCheck from util import headers class Apache(AgentCheck): """Tracks basic connection/requests/workers metrics See http://httpd.apache.org/docs/2.2/mod/mod_status.html for more details """ GAUGES = { 'IdleW...
margguo/python-ivi
refs/heads/master
ivi/agilent/agilentDSAX92004A.py
7
""" Python Interchangeable Virtual Instrument Library Copyright (c) 2012-2014 Alex Forencich Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the...
pra85/calibre
refs/heads/master
src/calibre/ebooks/markdown/__init__.py
12133432
joedeller/pymine
refs/heads/master
horserace.py
1
#! /usr/bin/python # Joe Deller 2014 # A Day at the Minecraft Races # Level : Intermediate # Uses : Libraries, variables, loops, lists, methods, loops and logic # This example introduces lists as a way of keeping track of information that is changing # It uses the random number generator to simulate a race between 6...
yarbelk/django-allauth
refs/heads/master
allauth/socialaccount/providers/oauth/urls.py
69
from django.conf.urls import patterns, url, include def default_urlpatterns(provider): urlpatterns = patterns(provider.package + '.views', url('^login/$', 'oauth_login', name=provider.id + "_login"), url('^login/callback/$', 'oa...
alex/html5lib-python
refs/heads/master
html5lib/treebuilders/__init__.py
1730
"""A collection of modules for building different kinds of tree from HTML documents. To create a treebuilder for a new type of tree, you need to do implement several things: 1) A set of classes for various types of elements: Document, Doctype, Comment, Element. These must implement the interface of _base.treebuilders...
indie1982/osmc-fixes
refs/heads/master
package/mediacenter-skin-osmc/files/usr/share/kodi/addons/script.module.unidecode/lib/unidecode/x090.py
251
data = ( 'Tui ', # 0x00 'Song ', # 0x01 'Gua ', # 0x02 'Tao ', # 0x03 'Pang ', # 0x04 'Hou ', # 0x05 'Ni ', # 0x06 'Dun ', # 0x07 'Jiong ', # 0x08 'Xuan ', # 0x09 'Xun ', # 0x0a 'Bu ', # 0x0b 'You ', # 0x0c 'Xiao ', # 0x0d 'Qiu ', # 0x0e 'Tou ', # 0x0f 'Zhu ', # 0x10 '...
PeterDaveHello/eden
refs/heads/master
static/fonts/setfonts.py
34
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Downloads fonts for full unicode support on reportlab. author: Shiv Deepak <idlecool@gmail.com> """ import tarfile import urllib import os import shutil import gzip # Set fonts to be downloaded downloadfonts = [ "arabic", # Urdu language support "unifont",...
gnieboer/gnuradio
refs/heads/android
gr-digital/python/digital/qa_ofdm_insert_preamble.py
57
#!/usr/bin/env python # # Copyright 2007,2010-2013 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 you...
etgalloway/mpld3
refs/heads/master
mpld3/test_plots/test_patches.py
19
"""Plot to test patches""" import matplotlib.pyplot as plt from matplotlib import patches import numpy as np import mpld3 def create_plot(): fig, ax = plt.subplots() ax.grid(color='lightgray') rcolor = lambda: np.random.random(3) p = [patches.Arrow(0.75, 0.75, 0.5, 0.5), patches.Circle((1, ...
cfobel/python___pymunk
refs/heads/master
pymunk/_chipmunk.py
1
from ctypes import * from .vec2d import Vec2d cpVect = Vec2d STRING = c_char_p from .libload import load_library, platform_specific_functions try: import pymunkoptions _lib_debug = pymunkoptions.options["debug"] except: _lib_debug = True #Set to True to print the Chipmunk path. chipmunk_lib = load_libra...
Djabbz/scikit-learn
refs/heads/master
sklearn/tests/test_metaestimators.py
226
"""Common tests for metaestimators""" import functools import numpy as np from sklearn.base import BaseEstimator from sklearn.externals.six import iterkeys from sklearn.datasets import make_classification from sklearn.utils.testing import assert_true, assert_false, assert_raises from sklearn.pipeline import Pipeline...
bcrochet/python-ironicclient
refs/heads/master
ironicclient/tests/unit/utils.py
2
# -*- coding: utf-8 -*- # # Copyright 2012 OpenStack LLC. # 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....
agermanidis/Pattern
refs/heads/master
web/soup/__init__.py
12133432
mikesun/xen-cow-checkpointing
refs/heads/master
tools/python/xen/sv/HTMLBase.py
46
from xen.sv.util import * class HTMLBase: isLeaf = True def __init__( self ): pass def render_POST( self, request ): self.perform( request ) return self.render_GET( request ) def render_GET( self, request ): pass def write_BODY( self, request ): ...
AtaraxiaEta/linux
refs/heads/master
scripts/gdb/linux/__init__.py
2010
# nothing to do for the initialization of this package
ByteInternet/libcloud
refs/heads/byte
docs/examples/loadbalancer/softlayer/list_balancers.py
9
from libcloud.loadbalancer.types import Provider from libcloud.loadbalancer.providers import get_driver USER_NAME = 'your user name' SECRET_KEY = 'your secret key' cls = get_driver(Provider.SOFTLAYER) driver = cls(key=USER_NAME, secret=SECRET_KEY) balancers = driver.list_balancers() for balancer in balancers: p...
lgarren/spack
refs/heads/develop
var/spack/repos/builtin/packages/fastjar/package.py
3
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
JamesShaeffer/QGIS
refs/heads/master
python/plugins/processing/gui/ToolboxAction.py
45
# -*- coding: utf-8 -*- """ *************************************************************************** ToolboxAction.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com *************************...
jwren/intellij-community
refs/heads/master
python/testData/completion/notImportedQualifiedName/DirectModuleAttributesSuggestedForNonEmptyAttributePrefix/main.after.py
8
import foo foo.bar()
nxnfufunezn/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/manifest/utils.py
113
import os import urlparse from StringIO import StringIO blacklist = ["/", "/tools/", "/resources/", "/common/", "/conformance-checkers/", "_certs"] def rel_path_to_url(rel_path, url_base="/"): assert not os.path.isabs(rel_path) if url_base[0] != "/": url_base = "/" + url_base if url_base[-1] != "/...
web30s/odoo-9.0c-20160402
refs/heads/master
hello/templates/openerp/addons/mail/models/html2text.py
77
#!/usr/bin/env python """html2text: Turn HTML into equivalent Markdown-structured text.""" __version__ = "2.36" __author__ = "Aaron Swartz (me@aaronsw.com)" __copyright__ = "(C) 2004-2008 Aaron Swartz. GNU GPL 3." __contributors__ = ["Martin 'Joey' Schulze", "Ricardo Reyes", "Kevin Jay North"] # TODO: # Support deco...
hms-dbmi/clodius
refs/heads/develop
test/bedfile_test.py
1
from __future__ import print_function import click.testing as clt import clodius.cli.aggregate as cca import clodius.tiles.beddb as ctb import os import os.path as op import sqlite3 import tempfile testdir = op.realpath(op.dirname(__file__)) def test_nonstandard_chrom(): filename = "test/sample_data/test_non_st...
sssllliang/silverberry
refs/heads/master
lib/pbr/tests/test_util.py
21
# Copyright (c) 2015 Hewlett-Packard Development Company, L.P. (HP) # # 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 ...
gauravbose/digital-menu
refs/heads/master
digimenu2/tests/urlpatterns_reverse/nonimported_module.py
633
def view(request): """Stub view""" pass
salaria/odoo
refs/heads/8.0
addons/web/doc/_themes/flask_theme_support.py
2228
# flasky extensions. flasky pygments style based on tango style from pygments.style import Style from pygments.token import Keyword, Name, Comment, String, Error, \ Number, Operator, Generic, Whitespace, Punctuation, Other, Literal class FlaskyStyle(Style): background_color = "#f8f8f8" default_style = "...
lunyang/pylearn2
refs/heads/master
pylearn2/testing/datasets.py
32
""" Simple datasets to be used for unit tests. """ __authors__ = "Ian Goodfellow" __copyright__ = "Copyright 2010-2012, Universite de Montreal" __credits__ = ["Ian Goodfellow"] __license__ = "3-clause BSD" __maintainer__ = "LISA Lab" __email__ = "pylearn-dev@googlegroups" import numpy as np from theano.compat.six.move...
USGSDenverPychron/pychron
refs/heads/develop
pychron/spectrometer/tasks/inspector/scan_inspector_task.py
1
# =============================================================================== # Copyright 2014 Jake Ross # # 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...
cetic/ansible
refs/heads/devel
lib/ansible/modules/cloud/cloudstack/cs_iso.py
18
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2015, René Moser <mail@renemoser.net> # # 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 Lice...
salguarnieri/intellij-community
refs/heads/master
python/testData/copyPaste/multiLine/IndentMulti22.after.py
996
class C: def foo(self): x = 1 y = 2 y = 2
niieani/rethinkdb
refs/heads/next
test/rql_test/connections/http_support/jinja2/sandbox.py
637
# -*- coding: utf-8 -*- """ jinja2.sandbox ~~~~~~~~~~~~~~ Adds a sandbox layer to Jinja as it was the default behavior in the old Jinja 1 releases. This sandbox is slightly different from Jinja 1 as the default behavior is easier to use. The behavior can be changed by subclassing the environm...
artefvck/Artefvck_kernel
refs/heads/master
tools/perf/tests/attr.py
3174
#! /usr/bin/python import os import sys import glob import optparse import tempfile import logging import shutil import ConfigParser class Fail(Exception): def __init__(self, test, msg): self.msg = msg self.test = test def getMsg(self): return '\'%s\' - %s' % (self.test.path, self.msg)...
weaver-viii/h2o-3
refs/heads/master
py2/h2o_log.py
29
import re import h2o_util import h2o_nodes from h2o_test import check_sandbox_for_errors, get_sandbox_name def checkH2OLogs(timeoutSecs=3, expectedMinLines=12, suffix="-1-trace"): # download logs from node 0 (this will overwrite) h2o_nodes.nodes[0].log_download(timeoutSecs=timeoutSecs) # I guess we reall...
kaarl/pyload
refs/heads/stable
module/plugins/crypter/DepositfilesComFolder.py
5
# -*- coding: utf-8 -*- from module.plugins.internal.SimpleCrypter import SimpleCrypter class DepositfilesComFolder(SimpleCrypter): __name__ = "DepositfilesComFolder" __type__ = "crypter" __version__ = "0.06" __status__ = "testing" __pattern__ = r'http://(?:www\.)?depositfiles\.com/folder...
KureFM/Xenon
refs/heads/master
src/packages/bs4/__init__.py
417
"""Beautiful Soup Elixir and Tonic "The Screen-Scraper's Friend" http://www.crummy.com/software/BeautifulSoup/ Beautiful Soup uses a pluggable XML or HTML parser to parse a (possibly invalid) document into a tree representation. Beautiful Soup provides provides methods and Pythonic idioms that make it easy to navigate...
googleinterns/audio_synthesis
refs/heads/master
structures/learned_basis_function.py
1
# Copyright 2020 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
QualiApps/obdlib
refs/heads/master
obdlib/scanner.py
2
import time import obdlib.uart as uart import obdlib.elm327 as elm327 from obdlib.obd import commands from obdlib.obd import sensors from obdlib.response import Response from obdlib.logging import logger class OBDScanner(object): """ ELM327 OBD-II Scanner Information about OBD-II PIDs htt...
mdietrichc2c/OCB
refs/heads/8.0
openerp/addons/base/ir/ir_exports.py
338
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
jvanveen/django-ws-core
refs/heads/master
dws/core/parts/router.py
1
# -*- coding: utf-8 -*- """ services.web_ui.models.ws_router ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Websocket routing handlers :copyright: Copyright 2011-2012 OS-Networks :license: LGPL, See LICENSE for details. """ import random from datetime import datetime from collections import deque from twisted....
ultmaster/eoj3
refs/heads/master
utils/jinja2/__init__.py
12133432
teltek/edx-platform
refs/heads/master
docs/__init__.py
12133432
huntxu/neutron
refs/heads/master
neutron/conf/plugins/ml2/drivers/mech_sriov/__init__.py
12133432
tmimori/erpnext
refs/heads/develop
erpnext/accounts/doctype/fiscal_year_company/__init__.py
12133432
ArteliaTelemac/PostTelemac
refs/heads/master
PostTelemac/meshlayerlibs/pyqtgraph/widgets/DataFilterWidget.py
4
from ..Qt import QtGui, QtCore from .. import parametertree as ptree import numpy as np from ..pgcollections import OrderedDict from .. import functions as fn from ..python2_3 import basestring __all__ = ['DataFilterWidget'] class DataFilterWidget(ptree.ParameterTree): """ This class allows the user to filte...
katstalk/android_external_chromium_org
refs/heads/kk44
chrome/common/extensions/docs/server2/sidenav_data_source.py
23
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import copy import logging from compiled_file_system import SingleFile, Unicode from data_source import DataSource from extensions_paths import JSON_TEM...
Smarsh/django
refs/heads/master
django/contrib/messages/tests/fallback.py
311
from django.contrib.messages import constants from django.contrib.messages.storage.fallback import FallbackStorage, \ CookieStorage from django.contrib.messages.tests.base import BaseTest from django.contrib.messages.tests.cookie import set_cookie_data, \ stored_cookie_messages_count from django.contrib.message...
CitizenScienceInAstronomyWorkshop/pyIBCC
refs/heads/master
python/tests/config/sparse_gold5.py
2
import numpy as np scores = np.array([0,1,2,3,4]) nScores = len(scores) nClasses = 5 inputFile = "./data/crowdlabels_sparse5.csv" outputFile = "./data/test.out" confMatFile = "./data/test_ibcc.mat" goldFile = "./data/gold5.csv" nu0 = np.array([50,50,50,50,50]) alpha0 = np.array([[2, 1, 1, 1, 1], [1, 2, 1, 1, 1], [1, 1,...
Vishluck/sympy
refs/heads/master
sympy/vector/vector.py
42
from sympy.core.assumptions import StdFactKB from sympy.core import S, Pow from sympy.core.expr import AtomicExpr from sympy.core.compatibility import range from sympy import diff as df, sqrt, ImmutableMatrix as Matrix from sympy.vector.coordsysrect import CoordSysCartesian from sympy.vector.basisdependent import Basis...
goldeneye-source/ges-python
refs/heads/master
lib/distutils/tests/test_unixccompiler.py
91
"""Tests for distutils.unixccompiler.""" import os import sys import unittest from test.support import EnvironmentVarGuard, run_unittest from distutils import sysconfig from distutils.unixccompiler import UnixCCompiler class UnixCCompilerTestCase(unittest.TestCase): def setUp(self): self._backup_platform...
flzyup/gnexus_kernel
refs/heads/master
tools/perf/scripts/python/sched-migration.py
11215
#!/usr/bin/python # # Cpu task migration overview toy # # Copyright (C) 2010 Frederic Weisbecker <fweisbec@gmail.com> # # perf script event handlers have been generated by perf script -g python # # This software is distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Fre...
Lambdanaut/crits
refs/heads/master
crits/dashboards/handlers.py
13
""" This File will often refer to 'default dashboard tables.' They currently are: Counts, Top Campaigns, Recent Indicators, Recent Emails, and Recent Samples in that order. The user has the ability to change they're positioning, size, columns, and sort order but they are always there and their names cannot be changed...
fyffyt/pylearn2
refs/heads/master
pylearn2/scripts/tutorials/__init__.py
12133432
devs4v/devs4v-information-retrieval15
refs/heads/master
project/venv/lib/python2.7/site-packages/django/conf/locale/ca/__init__.py
12133432
britcey/ansible
refs/heads/devel
test/units/template/__init__.py
12133432
elena/django
refs/heads/master
django/conf/locale/mk/__init__.py
12133432
ridfrustum/lettuce
refs/heads/master
tests/integration/lib/Django-1.2.5/django/conf/locale/bn/__init__.py
12133432
pk400/catering
refs/heads/master
myvenv/lib/python3.4/site-packages/django/contrib/admindocs/tests/__init__.py
12133432
kcpawan/django
refs/heads/master
tests/postgres_tests/test_json.py
284
import datetime import unittest from django.core import exceptions, serializers from django.db import connection from django.test import TestCase from . import PostgreSQLTestCase from .models import JSONModel try: from django.contrib.postgres import forms from django.contrib.postgres.fields import JSONField ...
Tejal011089/paypal_erpnext
refs/heads/develop
erpnext/hr/doctype/hr_settings/hr_settings.py
113
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class HRSettings(Document): def validate(...
nttks/edx-platform
refs/heads/gacco/dogwood
lms/djangoapps/lms_xblock/migrations/__init__.py
12133432
migdall/python-poo
refs/heads/master
cards/__init__.py
12133432
yiyuanlu/zbar
refs/heads/master
iphone/doc/conf.py
11
import sys, os from plistlib import readPlist # General configuration extensions = [] templates_path = ['ext'] source_suffix = '.rst' master_doc = 'index' exclude_patterns = ['.#*'] project = u'ZBar iPhone SDK' copyright = u'2010, Jeff Brown et al' today_fmt = '%Y-%m-%d' info = readPlist('../res/ZBarSDK-Info.plist'...
lduarte1991/edx-platform
refs/heads/master
common/djangoapps/third_party_auth/tests/specs/__init__.py
12133432
kashefy/caffe_sandbox
refs/heads/master
nideep/proto/proto_utils.py
3
''' Created on Sep 21, 2015 @author: kashefy ''' from google.protobuf import text_format from caffe.proto import caffe_pb2 def copy_msg(src, typ): dst = typ() dst.CopyFrom(src) return dst def copy_net_params(src): return copy_msg(src, caffe_pb2.NetParameter) class Parser(object): ''' class...
zengboming/python
refs/heads/master
html1.py
1
#html1 from HTMLParser import HTMLParser from htmlentitydefs import name2codepoint class MyHTMLParser(HTMLParser): def handle_starttag(self,tag,attrs): print '<%s>' %tag def hangle_endtag(self,tag): print '</%s>' %tag def handle_startendtag(self,tag,attrs): print '<%s>' %tag def handle_data(self,data): pr...
RPi-Distro/python-gpiozero
refs/heads/master
docs/examples/reaction_game.py
4
from gpiozero import Button, LED from time import sleep import random led = LED(17) player_1 = Button(2) player_2 = Button(3) time = random.uniform(5, 10) sleep(time) led.on() while True: if player_1.is_pressed: print("Player 1 wins!") break if player_2.is_pressed: print("Player 2 wi...
kobolabs/calibre
refs/heads/kobo
src/calibre/ebooks/mobi/writer2/__init__.py
10
#!/usr/bin/env python # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2011, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' UNCOMPRESSED ...
mpvoss/RickAndMortyWeatherTweets
refs/heads/master
env/lib/python3.5/site-packages/PIL/ImageDraw2.py
17
# # The Python Imaging Library # $Id$ # # WCK-style drawing interface operations # # History: # 2003-12-07 fl created # 2005-05-15 fl updated; added to PIL as ImageDraw2 # 2005-05-15 fl added text support # 2005-05-20 fl added arc/chord/pieslice support # # Copyright (c) 2003-2005 by Secret Labs AB # Copyright ...
shashankrajput/seq2seq
refs/heads/master
bin/tools/generate_toy_data.py
5
#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
kenglishhi/gae-django-sandbox
refs/heads/master
django/conf/locale/zh_TW/formats.py
238
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # DATE_FORMAT = # TIME_FORMAT = # DATETIME_FORMAT = # YEAR_MONTH_FORMAT = # MONTH_DAY_FORMAT = # SHORT_DATE_FORMAT = # SHORT_DATETIME_FORMAT = # FIRST_DAY_OF_WEEK = # DATE_INPUT_FORMATS = # TIME_INPUT_FORMATS ...
hms-dbmi/fourfront
refs/heads/master
src/encoded/upgrade/publication.py
2
from snovault import upgrade_step @upgrade_step('publication', '1', '2') def publication_1_2(value, system): if 'authors' in value: try: author_list = value['authors'].split(',') author_list = [a.strip() for a in author_list] value['authors'] = author_list excep...
sivakuna-aap/superdesk
refs/heads/master
server/apps/archive/__init__.py
2
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license """Media ar...
rbalda/neural_ocr
refs/heads/master
env/lib/python2.7/site-packages/django/conf/locale/fa/formats.py
586
# -*- 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' DATETI...