repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
navycrow/Sick-Beard
refs/heads/development
lib/hachoir_parser/misc/msoffice.py
90
""" Parsers for the different streams and fragments found in an OLE2 file. Documents: - goffice source code Author: Robert Xiao, Victor Stinner Creation: 2006-04-23 """ from lib.hachoir_parser import HachoirParser from lib.hachoir_core.field import FieldSet, RootSeekableFieldSet, RawBytes from lib.hachoir_core.endi...
plotly/python-api
refs/heads/master
packages/python/plotly/plotly/validators/scatter3d/error_y/__init__.py
4
import sys if sys.version_info < (3, 7): from ._width import WidthValidator from ._visible import VisibleValidator from ._valueminus import ValueminusValidator from ._value import ValueValidator from ._type import TypeValidator from ._tracerefminus import TracerefminusValidator from ._trace...
sbellem/django
refs/heads/master
django/contrib/gis/utils/wkt.py
589
""" Utilities for manipulating Geometry WKT. """ from django.utils import six def precision_wkt(geom, prec): """ Returns WKT text of the geometry according to the given precision (an integer or a string). If the precision is an integer, then the decimal places of coordinates WKT will be truncated t...
krisb78/py-couchdb
refs/heads/master
pycouchdb/__init__.py
3
# -*- coding: utf-8 -*- __author__ = "Andrey Antukh" __license__ = "BSD" __version__ = "1.12" __maintainer__ = "Rinat Sabitov" __email__ = "rinat.sabitov@gmail.com" __status__ = "Development" from .client import Server
tlatzko/spmcluster
refs/heads/master
.tox/2.6-cover/lib/python2.6/site-packages/nose/sphinx/__init__.py
1307
pass
MarkWh1te/xueqiu_predict
refs/heads/master
python3_env/lib/python3.4/site-packages/sqlalchemy/orm/scoping.py
55
# orm/scoping.py # Copyright (C) 2005-2016 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from .. import exc as sa_exc from ..util import ScopedRegistry, ThreadLocalRegistry, ...
daodaoliang/python-phonenumbers
refs/heads/dev
python/phonenumbers/shortdata/region_CX.py
11
"""Auto-generated file, do not edit by hand. CX metadata""" from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata PHONE_METADATA_CX = PhoneMetadata(id='CX', country_code=None, international_prefix=None, general_desc=PhoneNumberDesc(national_number_pattern='[01]\\d{2}', possible_number_pattern='\...
0Knowledge/googletest
refs/heads/master
test/gtest_xml_output_unittest.py
1815
#!/usr/bin/env python # # Copyright 2006, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
geekboxzone/lollipop_external_chromium_org_testing_gtest
refs/heads/geekbox
test/gtest_xml_output_unittest.py
1815
#!/usr/bin/env python # # Copyright 2006, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
Xaxetrov/OSCAR
refs/heads/master
oscar/agent/learning_agent.py
1
from oscar.agent.learning_structure import LearningStructure from oscar.agent.custom_agent import CustomAgent class LearningAgent(LearningStructure, CustomAgent): """ An abstract class to build learning agent Sub class must implement the following LearningStructure methods: - _step - _format_...
xsynergy510x/android_external_chromium_org
refs/heads/cm-12.1
chrome/test/chromeos/autotest/files/client/deps/chrome_test/common.py
187
# Copyright (c) 2010 The Chromium OS 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 os, sys dirname = os.path.dirname(sys.modules[__name__].__file__) client_dir = os.path.abspath(os.path.join(dirname, "../../")) sys.path.insert...
ReganBell/QReview
refs/heads/master
examples/graph/atlas.py
54
#!/usr/bin/env python """ Atlas of all graphs of 6 nodes or less. """ __author__ = """Aric Hagberg (hagberg@lanl.gov)""" # Copyright (C) 2004 by # Aric Hagberg <hagberg@lanl.gov> # Dan Schult <dschult@colgate.edu> # Pieter Swart <swart@lanl.gov> # All rights reserved. # BSD license. import networkx...
xiaonanln/myleetcode-python
refs/heads/master
src/684. Redundant Connection.py
1
class UF(object): def __init__(self, N): self.list = [i for i in xrange(N+1)] # every V points to self def connect(self, u, v): id1 = self.id(u) id2 = self.id(v) self.list[id2] = id1 def id(self, v): pv = self.list[v] if pv == v: return v res = self.list[v] = self.id(pv) return res class Solu...
christianurich/VIBe2UrbanSim
refs/heads/master
3rdparty/opus/src/biocomplexity/land_cover/dmu.py
2
# Opus/UrbanSim urban simulation software. # Copyright (C) 2005-2009 University of Washington # See opus_core/LICENSE from numpy import greater_equal, less_equal from opus_core.variables.variable import Variable from biocomplexity.land_cover.variable_functions import my_attribute_label class dmu(Variable): ...
CLOSER-Cohorts/us2caddies
refs/heads/master
us2caddies/caddies/objects/response_domain_text.py
1
__author__ = 'pwidqssg' from base import CaddiesObject class ResponseDomainText(CaddiesObject): def __init__(self, id, maxlen = None, label = ''): self.id = id self.maxlen = maxlen self.label = label
WilliamMayor/nics
refs/heads/master
tests/test_parser.py
1
from datetime import date from datetime import datetime from datetime import timedelta from datetime import time import pytz from nics import parse def test_can_parse_simple_lines(): assert ['first', 'second'] == list(parse.text_into_lines('first\r\nsecond')) def test_can_parse_folded_lines_with_space(): ...
x303597316/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/tests/queries/tests.py
44
from __future__ import absolute_import,unicode_literals import datetime from operator import attrgetter import pickle import sys from django.conf import settings from django.core.exceptions import FieldError from django.db import DatabaseError, connection, connections, DEFAULT_DB_ALIAS from django.db.models import Co...
TRex22/Sick-Beard
refs/heads/master
lib/hachoir_parser/misc/torrent.py
90
""" .torrent metainfo file parser http://wiki.theory.org/BitTorrentSpecification#Metainfo_File_Structure Status: To statufy Author: Christophe Gisquet <christophe.gisquet@free.fr> """ from lib.hachoir_parser import Parser from lib.hachoir_core.field import (FieldSet, ParserError, String, RawBytes) from lib.hacho...
queria/my-tempest
refs/heads/juno
tempest/scenario/test_volume_boot_pattern.py
2
# 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...
yetship/blog_codes
refs/heads/master
python/basic/forbitpyc/flask-main.py
1
#!/usr/bin/env python # encoding: utf-8 from flask import Flask from a import A app = Flask(__name__) @app.route('/') def index(): return A().a() if __name__ == "__main__": app.run()
thanhphat11/kernel-cm12.1-910
refs/heads/master
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py
12527
# Util.py - Python extension for perf script, miscellaneous utility code # # Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com> # # This software may be distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. import errno, os FUTEX_WAIT = 0...
Kozea/Pynuts
refs/heads/master
tests/test_git.py
1
""" Test suite of the Git module. """ import os.path import unittest import shutil import tempfile import jinja2 from pynuts.git import (Git, ObjectTypeError, NotFoundError, ConflictError) from dulwich.repo import Repo class TestGit(unittest.TestCase): """Test suite for the Git module""...
tsufiev/horizon
refs/heads/master
openstack_dashboard/test/integration_tests/basewebobject.py
2
# 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...
SiCKRAGETV/SickRage
refs/heads/master
sickrage/notifiers/emby.py
2
# Author: echel0n <echel0n@sickrage.ca> # URL: https://sickrage.ca # # This file is part of SickRage. # # SickRage 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...
buchuki/pyjaco
refs/heads/devel
tests/functions/uplus.py
5
x = +7623 print x
kapilrastogi/Impala
refs/heads/cdh5-trunk
thirdparty/thrift-0.9.0/lib/py/src/transport/TTransport.py
105
# # 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...
Titulacion-Sistemas/PythonTitulacion-EV
refs/heads/master
Lib/site-packages/pylint/test/functional/invalid_slice_index.py
17
"""Errors for invalid slice indices""" # pylint: disable=too-few-public-methods, no-self-use TESTLIST = [1, 2, 3] # Invalid indices def function1(): """functions used as indices""" return TESTLIST[id:id:] # [invalid-slice-index,invalid-slice-index] def function2(): """strings used as indices""" ret...
elgambitero/FreeCAD_sf_master
refs/heads/master
src/Tools/fcbt.py
26
#!python # FreeCAD Build Tool # (c) 2004 Juergen Riegel import os,sys,string help1 = """ FreeCAD Build Tool Usage: fcbt <command name> [command parameter] possible commands are: - DistSrc (DS) Build a source Distr. of the current source tree - DistBin (DB) Build a binary Distr....
Honry/crosswalk-test-suite
refs/heads/master
webapi/tct-csp-w3c-tests/csp-py/csp_ro_frame-src_self_allowed_int-manual.py
30
def main(request, response): import simplejson as json f = file('config.json') source = f.read() s = json.JSONDecoder().decode(source) url1 = "http://" + s['host'] + ":" + str(s['ports']['http'][1]) url2 = "http://" + s['host'] + ":" + str(s['ports']['http'][0]) _CSP = "frame-src 'self'" ...
heytcass/homeassistant-config
refs/heads/master
deps/cherrypy/test/checkerdemo.py
29
"""Demonstration app for cherrypy.checker. This application is intentionally broken and badly designed. To demonstrate the output of the CherryPy Checker, simply execute this module. """ import os import cherrypy thisdir = os.path.dirname(os.path.abspath(__file__)) class Root: pass if __name__ == '__main__': ...
Ronak6892/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/html5lib/html5lib/treewalkers/__init__.py
1229
"""A collection of modules for iterating through different kinds of tree, generating tokens identical to those produced by the tokenizer module. To create a tree walker for a new type of tree, you need to do implement a tree walker object (called TreeWalker by convention) that implements a 'serialize' method taking a ...
humrochagf/tapioca-discourse
refs/heads/master
tapioca_discourse/resource_mapping/upload.py
1
# -*- coding: utf-8 -*- UPLOAD_MAPPING = { 'upload_file': { 'resource': 'uploads.json', 'docs': ('http://docs.discourse.org/#tag/' 'Upload%2Fpaths%2F~1uploads.json%2Fpost'), 'methods': ['POST'], }, }
hopeall/odoo
refs/heads/8.0
addons/hw_scale/__openerp__.py
220
# -*- 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...
xin3liang/platform_external_chromium_org_tools_gyp
refs/heads/master
test/win/gyptest-link-update-manifest.py
226
#!/usr/bin/env python # Copyright (c) 2013 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. """ Make sure binary is relinked when manifest settings are changed. """ import TestGyp import os import sys if sys.platform == 'win32': ...
PopCap/GameIdea
refs/heads/master
Engine/Source/ThirdParty/HTML5/emsdk/Win64/python/2.7.5.3_64bit/Lib/site-packages/win32/test/test_win32inet.py
17
from win32inet import * from win32inetcon import * import winerror from pywin32_testutil import str2bytes # py3k-friendly helper import unittest class CookieTests(unittest.TestCase): def testCookies(self): data = "TestData=Test" InternetSetCookie("http://www.python.org", None, data) got = ...
mkraemer67/pylearn2
refs/heads/master
pylearn2/utils/utlc.py
49
"""Several utilities for experimenting upon utlc datasets""" # Standard library imports import logging import os import inspect import zipfile from tempfile import TemporaryFile # Third-party imports import numpy import theano from pylearn2.datasets.utlc import load_ndarray_dataset, load_sparse_dataset from pylearn2.u...
highweb-project/highweb-webcl-html5spec
refs/heads/highweb-20160310
tools/bisect_test.py
166
# 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 unittest bisect_builds = __import__('bisect-builds') class BisectTest(unittest.TestCase): patched = [] max_rev = 10000 def monkey_patch...
hcsturix74/django
refs/heads/master
django/contrib/auth/migrations/0002_alter_permission_name_max_length.py
586
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('auth', '0001_initial'), ] operations = [ migrations.AlterField( model_name='permission', name='name'...
alexproca/askbot-devel
refs/heads/master
askbot/utils/console.py
9
"""functions that directly handle user input """ import sys import time import logging from askbot.utils import path def start_printing_db_queries(): """starts logging database queries into console, should be used for debugging only""" logger = logging.getLogger('django.db.backends') logger.setLevel(lo...
feliperfranca/django-nonrel-example
refs/heads/master
django/contrib/localflavor/pe/forms.py
309
# -*- coding: utf-8 -*- """ PE-specific Form helpers. """ from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import RegexField, CharField, Select from django.utils.translation import ugettext_lazy as _ class PERegionSelect(Select): """ A Select wi...
3cky/kubernetes
refs/heads/master
cluster/juju/charms/trusty/kubernetes-master/hooks/hooks.py
202
#!/usr/bin/env python # Copyright 2015 The Kubernetes 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 # # Unle...
mitchrule/Miscellaneous
refs/heads/master
Django_Project/django/Lib/_weakrefset.py
162
# Access WeakSet through the weakref module. # This code is separated-out because it is needed # by abc.py to load everything else at startup. from _weakref import ref __all__ = ['WeakSet'] class _IterationGuard(object): # This context manager registers itself in the current iterators of the # weak containe...
simonlynen/yaml-cpp.new-api
refs/heads/master
test/gmock-1.7.0/gtest/scripts/fuse_gtest_files.py
2577
#!/usr/bin/env python # # Copyright 2009, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
seocam/django
refs/heads/master
tests/migrations/migrations_test_apps/unspecified_app_with_conflict/migrations/0001_initial.py
2995
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): operations = [ migrations.CreateModel( "Author", [ ("id", models.AutoField(primary_key=True)), ("name",...
ltilve/ChromiumGStreamerBackend
refs/heads/master
build/android/pylib/device/logcat_monitor.py
24
# Copyright 2015 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. # pylint: disable=unused-wildcard-import # pylint: disable=wildcard-import from devil.android.logcat_monitor import *
bsipocz/seaborn
refs/heads/master
examples/paired_pointplots.py
26
""" Paired discrete plots ===================== """ import seaborn as sns sns.set(style="whitegrid") # Load the example Titanic dataset titanic = sns.load_dataset("titanic") # Set up a grid to plot survival probability against several variables g = sns.PairGrid(titanic, y_vars="survived", x_vars=["c...
thegapnetball/hello
refs/heads/master
guestbook.py
1
import jinja2 import os import webapp2 from google.appengine.api import users from google.appengine.ext import ndb # We set a parent key on the 'Greetings' to ensure that they are all in the same # entity group. Queries across the single entity group will be consistent. # However, the write rate should be ...
jdmonaco/knlx
refs/heads/master
lib/knlx.py
1
# encoding: utf-8 """ knlx.py -- Library of functions for reading Neuralynx files for events (.Nev), position tracking (Pos.p), and continuous records (.Ncs) Requires: numpy, bitstring Copyright (c) 2011-2013 Johns Hopkins University. All rights reserved. This software is provided AS IS under the terms of the ...
StevenBlack/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/checkout/checkout_unittest.py
115
# Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
0x0all/nupic
refs/heads/master
py/nupic/frameworks/opf/exceptions.py
58
class CLAModelException(Exception): """ base exception class for cla model exceptions """ def __init__(self, errorString, debugInfo=None): """ Parameters: ----------------------------------------------------------------------- errorString: Error code/msg: e.g., "Invalid request object." de...
abourget/formalchemy-abourget
refs/heads/master
formalchemy/tests/test_aliases.py
3
# -*- coding: utf-8 -*- from formalchemy.tests import * def test_aliases(): fs = FieldSet(Aliases) fs.bind(Aliases) assert fs.id.name == 'id' def test_render_aliases(): """ >>> alias = session.query(Aliases).first() >>> alias >>> fs = FieldSet(Aliases) >>> print fs.render() <div> ...
Pablo126/SSBW
refs/heads/master
Tarea4/tarea4/lib/python3.5/site-packages/pip/_vendor/distlib/_backport/__init__.py
1429
"""Modules copied from Python 3 standard libraries, for internal use only. Individual classes and functions are found in d2._backport.misc. Intended usage is to always import things missing from 3.1 from that module: the built-in/stdlib objects will be used if found. """
xysec/androguard
refs/heads/master
androguard/decompiler/dad/tests/rpo_test.py
2
"""Tests for rpo.""" import sys sys.path.append('.') import unittest from androguard.decompiler.dad import graph from androguard.decompiler.dad import node class NodeTest(node.Node): def __init__(self, name): super(NodeTest, self).__init__(name) def __str__(self): return '%s (%d)' % (self.n...
rabitdash/practice
refs/heads/master
python-pj/mine_sweeper/main.py
4
from data.tools import Control from data.states import init, run, halt fuck = Control() fuck.setup_states({'Init': init.Init(), 'Run': run.Run(), 'Halt': halt.Halt() }, 'Init') fuck.main()
dylanGeng/BuildingMachineLearningSystemsWithPython
refs/heads/master
ch10/neighbors.py
21
# This code is supporting material for the book # Building Machine Learning Systems with Python # by Willi Richert and Luis Pedro Coelho # published by PACKT Publishing import numpy as np import mahotas as mh from glob import glob from features import texture, color_histogram from matplotlib import pyplot as plt from ...
icejoywoo/tornado
refs/heads/master
demos/helloworld/helloworld.py
100
#!/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...
Yukinoshita47/Yuki-Chan-The-Auto-Pentest
refs/heads/master
Module/Spaghetti/lib/__init__.py
1307
pass
cypod/arsenalsuite
refs/heads/master
cpp/lib/PyQt4/examples/network/fortuneserver.py
20
#!/usr/bin/env python ############################################################################# ## ## Copyright (C) 2010 Riverbank Computing Limited. ## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ## All rights reserved. ## ## This file is part of the examples of PyQt. ## ## $QT_BEGIN_LICENS...
sosguns2002/interactive-mining
refs/heads/master
interactive-mining-3rdparty-madis/madis/src/functions/sqltransform.py
4
# coding: utf-8 import setpath import sqlparse.sql import sqlparse import re from sqlparse.tokens import * import zlib import functions try: from collections import OrderedDict except ImportError: # Python 2.6 from lib.collections26 import OrderedDict break_inversion_subquery = re.compile(r"""\s*((?:(?:(...
colinnewell/odoo
refs/heads/8.0
openerp/conf/__init__.py
442
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the G...
zsdonghao/tensorlayer
refs/heads/master
examples/reinforcement_learning/tutorial_atari_pong.py
1
#! /usr/bin/python # -*- coding: utf-8 -*- """Monte-Carlo Policy Network π(a|s) (REINFORCE). To understand Reinforcement Learning, we let computer to learn how to play Pong game from the original screen inputs. Before we start, we highly recommend you to go through a famous blog called “Deep Reinforcement Learning: P...
hfut721/RPN
refs/heads/master
lib/datasets/__init__.py
212
# -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # --------------------------------------------------------
mikeireland/pynrm
refs/heads/master
popCSV.py
1
"""Notes: This should additionally have the total integration time for the scan. Also - a counter for the number fo visits in a night for 1 target. """ import numpy as np import pbclass, os, matplotlib.pyplot as plt try: import pyfits except: import astropy.io.fits as pyfits import tools, warnings warnings.filterwa...
dave1010/doctrine2
refs/heads/master
docs/en/_exts/configurationblock.py
2577
#Copyright (c) 2010 Fabien Potencier # #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal #in the Software without restriction, including without limitation the rights #to use, copy, modify, merge, publish, distrib...
HelloOrganization/facemimic
refs/heads/master
views/todos.py
1
# coding: utf-8 from leancloud import Object from leancloud import Query from leancloud import LeanCloudError from flask import Blueprint from flask import request from flask import redirect from flask import url_for from flask import render_template class Todo(Object): pass todos_view = Blueprin...
doismellburning/edx-platform
refs/heads/master
lms/djangoapps/survey/migrations/0002_auto__add_field_surveyanswer_course_key.py
39
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'SurveyAnswer.course_key' db.add_column('survey_surveyansw...
WarrenWeckesser/scipy
refs/heads/master
scipy/spatial/tests/test_distance.py
10
# # Author: Damian Eads # Date: April 17, 2008 # # Copyright (C) 2008 Damian Eads # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this...
ychen820/microblog
refs/heads/master
y/google-cloud-sdk/.install/.backup/platform/gsutil/third_party/boto/boto/cacerts/__init__.py
260
# Copyright 2010 Google Inc. # 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 to use, copy, modify, merg...
ryfeus/lambda-packs
refs/heads/master
Lxml_requests/source/affine/tests/test_pickle.py
5
""" Validate that instances of `affine.Affine()` can be pickled and unpickled. """ import pickle from multiprocessing import Pool import affine def test_pickle(): a = affine.Affine(1, 2, 3, 4, 5, 6) assert pickle.loads(pickle.dumps(a)) == a def _mp_proc(x): # A helper function - needed for test_with_...
ibm-watson-iot/iot-python
refs/heads/master
src/wiotp/sdk/api/usage/__init__.py
2
# ***************************************************************************** # Copyright (c) 2018 IBM Corporation and other Contributors. # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 # which accompanies this distribution,...
onceuponatimeforever/oh-mainline
refs/heads/master
vendor/packages/celery/celery/tests/test_task/test_result.py
18
from __future__ import absolute_import from __future__ import with_statement from celery import states from celery.app import app_or_default from celery.utils import uuid from celery.utils.serialization import pickle from celery.result import AsyncResult, EagerResult, TaskSetResult, ResultSet from celery.exceptions im...
dleecefft/pcapstats
refs/heads/master
pbin/csv2df1.py
1
#!/usr/bin/env python # import os, sys, getopt from datetime import datetime if __name__ == "__main__": # input and output file data, adjust line grep statements if needed to match a different log line. logfile='' line1grep = 'Accepted' line2grep = 'Recieved' logoutlist = [] csv = True ...
gangadhar-kadam/church-erpnext
refs/heads/master
patches/december_2012/deprecate_tds.py
3
def execute(): import webnotes from webnotes.model import delete_doc from webnotes.model.code import get_obj from webnotes.model.doc import addchild # delete doctypes and tables for dt in ["TDS Payment", "TDS Return Acknowledgement", "Form 16A", "TDS Rate Chart", "TDS Category", "TDS Control", "TDS Detail",...
gitqwerty777/myGspread
refs/heads/master
tests/test.py
2
# -*- coding: utf-8 -*- import os import re import time import random import hashlib import unittest import ConfigParser import itertools import gspread class GspreadTest(unittest.TestCase): def setUp(self): creds_filename = "tests.config" try: config_filename = os.path.join( ...
malishevg/edugraph
refs/heads/master
cms/envs/dev_shared_preview.py
57
""" This configuration is have localdev use a preview.localhost hostname for the preview LMS so that we can share the same process between preview and published """ # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files # pylint: disable=W0401, W0614 ...
msebire/intellij-community
refs/heads/master
python/testData/mover/lastLine_afterDown.py
83
print "first" print "second"
peteraldaron/runotar
refs/heads/master
main.py
1
''' use python3 ''' import query, db, word, utils q = query.Query(); word = q.getWordEntryForLanguage("-n", language= "Finnish") dataBase = db.DataBase(); dataBase.upsertOneToCollection(word.toObject(), word.hashValueDict, "name-test"); ''' print(word.suffix_match("sattua", "vapua")); print(word.suffix_match_vowels(...
r-mart/scikit-learn
refs/heads/master
sklearn/manifold/setup.py
198
import os import numpy from numpy.distutils.misc_util import Configuration def configuration(parent_package="", top_path=None): config = Configuration("manifold", parent_package, top_path) libraries = [] if os.name == 'posix': libraries.append('m') config.add_extension("_utils", ...
TshepangRas/tshilo-dikotla
refs/heads/develop
td_maternal/tests/factories/rapid_test_result_factory.py
2
import factory from django.utils import timezone from edc_registration.tests.factories import RegisteredSubjectFactory from edc_constants.choices import YES, NO, POS, NEG, NOT_APPLICABLE from td_maternal.models import RapidTestResult from .maternal_visit_factory import MaternalVisitFactory class RapidTestResultFa...
saydulk/newfies-dialer
refs/heads/develop
newfies/dialer_cdr/constants.py
4
# # Newfies-Dialer License # http://www.newfies-dialer.org # # 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/. # # Copyright (C) 2011-2015 Star2Billing S.L. # # The primar...
TomTranter/OpenPNM
refs/heads/master
openpnm/__init__.py
1
r""" :: o-o o--o o o o o o o | | |\ | |\ /| | | o-o o-o o-o o--o | \ | | o | o o | | |-' | | | | \| | | o-o o-o o-o o o o o o o o | o **OpenPNM** OpenPNM is a package for performing pore network simulations o...
joglomedia/p2pool
refs/heads/master
p2pool/test/bitcoin/test_getwork.py
275
import unittest from p2pool.bitcoin import getwork, data as bitcoin_data class Test(unittest.TestCase): def test_all(self): cases = [ { 'target': '0000000000000000000000000000000000000000000000f2b944000000000000', 'midstate': '5982f893102dec03e374b472647c4f19b1b...
FireballDWF/cloud-custodian
refs/heads/master
tools/c7n_mailer/c7n_mailer/sqs_queue_processor.py
5
# Copyright 2017 Capital One Services, 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
abhilashnta/edx-platform
refs/heads/master
common/djangoapps/third_party_auth/admin.py
40
# -*- coding: utf-8 -*- """ Admin site configuration for third party authentication """ from django.contrib import admin from config_models.admin import ConfigurationModelAdmin, KeyedConfigurationModelAdmin from .models import OAuth2ProviderConfig, SAMLProviderConfig, SAMLConfiguration, SAMLProviderData from .tasks i...
Moussee/Fun-with-StarWars-people
refs/heads/master
node_modules/node-gyp/gyp/setup.py
2462
#!/usr/bin/env python # Copyright (c) 2009 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from setuptools import setup setup( name='gyp', version='0.1', description='Generate Your Projects', author='Chromium Authors', a...
guewen/OpenUpgrade
refs/heads/master
addons/account/tests/test_search.py
204
from openerp.tests.common import TransactionCase class TestSearch(TransactionCase): """Tests for search on name_search (account.account) The name search on account.account is quite complexe, make sure we have all the correct results """ def setUp(self): super(TestSearch, self).setUp() ...
devendermishrajio/nova
refs/heads/master
nova/tests/unit/scheduler/filters/test_numa_topology_filters.py
18
# 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...
anhdiepmmk/yowsup
refs/heads/master
yowsup/layers/protocol_groups/protocolentities/iq_groups_create.py
41
from yowsup.structs import ProtocolEntity, ProtocolTreeNode from .iq_groups import GroupsIqProtocolEntity class CreateGroupsIqProtocolEntity(GroupsIqProtocolEntity): ''' <iq type="set" id="{{id}}" xmlns="w:g2", to="g.us"> <create subject="{{subject}}"> <participant jid="{{jid}}"></participa...
grshane/monthofmud
refs/heads/master
web/themes/custom/mom/node_modules/node-gyp/gyp/pylib/gyp/MSVSUserFile.py
2710
# 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. """Visual Studio user preferences file writer.""" import os import re import socket # for gethostname import gyp.common import gyp.easy_xml as easy_xml #------...
vikas-Avnish/google-blog-converters-appengine
refs/heads/master
src/movabletype2blogger/mt2b.py
30
#!/usr/bin/python2.4 # Copyright 2008 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.txt # # Unless required by applicable law or ...
iModels/ffci
refs/heads/master
moleculeci/models.py
1
# from django.db import models # from django.conf import settings # # # class UserProfile(models.Model): # # user = models.OneToOneField(settings.AUTH_USER_MODEL) # github_name = models.CharField(max_length=255, default='github_name') # class GithubInfo(models.Model): # # github_name = models.CharField(ma...
poguez/datacats
refs/heads/master
datacats/cli/less.py
10
# Copyright 2014-2015 Boxkite Inc. # This file is part of the DataCats package and is released under # the terms of the GNU Affero General Public License version 3.0. # See LICENSE.txt or http://www.fsf.org/licensing/licenses/agpl-3.0.html from datacats.cli.util import require_extra_image LESSC_IMAGE = 'datacats/le...
shahar-stratoscale/nova
refs/heads/master
nova/tests/virt/libvirt/test_dmcrypt.py
21
# Copyright (c) 2014 The Johns Hopkins University/Applied Physics Laboratory # 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...
himleyb85/django
refs/heads/master
tests/template_tests/test_origin.py
165
from unittest import TestCase from django.template import Engine from .utils import TEMPLATE_DIR class OriginTestCase(TestCase): def setUp(self): self.engine = Engine(dirs=[TEMPLATE_DIR]) def test_origin_compares_equal(self): a = self.engine.get_template('index.html') b = self.engin...
aosagie/spark
refs/heads/master
examples/src/main/python/ml/generalized_linear_regression_example.py
52
# # 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 us...
atheed/servo
refs/heads/master
tests/wpt/css-tests/tools/webdriver/webdriver/transport.py
59
# 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/. import httplib import json import urlparse HTTP_TIMEOUT = 5 class Response(object): """Describes an HTTP response ...
PepperPD/edx-pepper-platform
refs/heads/master
common/djangoapps/student/migrations/0012_auto__add_field_userprofile_gender__add_field_userprofile_date_of_birt.py
188
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'UserProfile.gender' db.add_column('auth_userprofile', 'gender', self.g...
atsuyim/pupy
refs/heads/master
client/sources/resources/iter_files.py
35
#!/usr/bin/env python # -*- coding: UTF8 -*- import marshal, zlib modules = marshal.loads(zlib.decompress(open("library_compressed_string.txt",'rb').read())) for f in sorted([x for x in modules.iterkeys()]): print f
CTSRD-SOAAP/chromium-42.0.2311.135
refs/heads/master
tools/mac/symbolicate_crash.py
178
#!/usr/bin/env python # 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. """ This script can take an Apple-style CrashReporter log and symbolicate it. This is useful for when a user's reports aren't being...
rob-smallshire/pycpt
refs/heads/master
pycpt/colors.py
1
__author__ = 'rjs' from collections import namedtuple HSVColor = namedtuple('HSVColor', ['hue', 'saturation', 'value']) RGBColor = namedtuple('RGBColor', ['red', 'green', 'blue']) CMYKColor = namedtuple('CMYKColor', ['cyan', 'magenta', 'yellow', 'black'])