repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
wimnat/ansible-modules-extras
refs/heads/devel
notification/mqtt.py
15
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, 2014, Jan-Piet Mens <jpmens () gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of...
jonludlam/xen
refs/heads/master
tools/xm-test/tests/unpause/01_unpause_basic_pos.py
42
#!/usr/bin/python # Copyright (C) International Business Machines Corp., 2005 # Author: Paul Larson <pl@us.ibm.com> # Description: # Positive Tests: # Tests for xm unpause # 1) Create domain, verify it's up with console # 2) randomly pause and unpause the domain # 3) unpause it one last time # 4) verify it's still a...
cctaylor/googleads-python-lib
refs/heads/master
examples/dfp/v201502/inventory_service/get_ad_unit_hierarchy.py
3
#!/usr/bin/python # # Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
slisson/intellij-community
refs/heads/master
python/testData/quickFixes/PyUpdatePropertySignatureQuickFixTest/setter.py
80
class A(Aa): @property def <warning descr="Getter signature should be (self)">x</warning>(self, r): return r @x.setter def <warning descr="Setter signature should be (self, value)"><caret>x</warning>(self, r, t): self._x = ""
betoesquivel/fil2014
refs/heads/master
filenv/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/packages/__init__.py
2161
from __future__ import absolute_import from . import ssl_match_hostname
suyashphadtare/sajil-erp
refs/heads/develop
erpnext/stock/doctype/packing_slip/packing_slip.py
14
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import flt, cint from frappe import _ from frappe.model.document import Document class PackingSlip(Document): def...
iulian787/spack
refs/heads/develop
lib/spack/external/_pytest/nodes.py
38
SEP = "/" def _splitnode(nodeid): """Split a nodeid into constituent 'parts'. Node IDs are strings, and can be things like: '' 'testing/code' 'testing/code/test_excinfo.py' 'testing/code/test_excinfo.py::TestFormattedExcinfo::()' Return values are lists e.g. [] ...
firebitsbr/infernal-twin
refs/heads/master
infernal_wireless_gui_project.py
7
import wx #from scapy.all import * import commands, re import wless_commands from scapy.all import * import os import time from subprocess import * from bs4 import BeautifulSoup from wp2_crack import * import create_db_hotspot import urllib2, httplib, redirecthandle import wx.html import notepad import InfernalWireles...
tedder/ansible
refs/heads/devel
test/units/modules/network/f5/test_bigip_device_auth.py
37
# -*- coding: utf-8 -*- # # Copyright: (c) 2018, F5 Networks Inc. # 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 import os import json import pytest import sys if sys.version_info < (2...
ice9js/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/py/py/_path/svnurl.py
192
""" module defining a subversion path object based on the external command 'svn'. This modules aims to work with svn 1.3 and higher but might also interact well with earlier versions. """ import os, sys, time, re import py from py import path, process from py._path import common from py._path import svnwc as svncommon...
tempbottle/cjdns
refs/heads/master
node_build/dependencies/libuv/build/gyp/test/conditions/elseif/gyptest_elseif.py
102
#!/usr/bin/env python # Copyright (c) 2014 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. """ Verify that "else-if" conditions work. """ import TestGyp test = TestGyp.TestGyp() test.run_gyp('elseif.gyp') test.build('elseif.gyp'...
ZeitgeberH/nengo
refs/heads/master
nengo/networks/oscillator.py
1
import nengo class Oscillator(nengo.Network): def __init__(self, recurrent_tau, frequency, **ens_args): self.input = nengo.Node(label="In", size_in=2) self.ensemble = nengo.Ensemble( label="Oscillator", dimensions=2, **ens_args) tA = [[1, -frequency * recurrent_tau], ...
bitmazk/django-account-keeping
refs/heads/master
account_keeping/admin.py
1
"""Admin classes for the account_keeping app.""" from django.contrib import admin from . import models class BranchAdmin(admin.ModelAdmin): list_display = ['name', 'slug'] admin.site.register(models.Branch, BranchAdmin) class AccountAdmin(admin.ModelAdmin): list_display = [ 'name', 'slug', 'currenc...
cselis86/edx-platform
refs/heads/installer
lms/djangoapps/instructor_task/tests/test_base.py
13
""" Base test classes for LMS instructor-initiated background tasks """ import os import json from mock import Mock import shutil import unicodecsv from uuid import uuid4 from celery.states import SUCCESS, FAILURE from django.conf import settings from django.test.testcases import TestCase from django.contrib.auth.mod...
dhongu/l10n-romania
refs/heads/11.0
stock_balance/__manifest__.py
1
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2008 Deltatech All Rights Reserved # Dorin Hongu <dhongu(@)gmail(.)com # # This program is free software: you can redistribute it and/or modify # it under the terms of the GN...
bajibabu/merlin
refs/heads/master
src/configuration/label_config_001.py
2
################################################################################ # The Neural Network (NN) based Speech Synthesis System # https://svn.ecdf.ed.ac.uk/repo/inf/dnn_tts/ # # Centre for Speech Technology Research # University of Edinburgh, UK # ...
ruguevara/neon
refs/heads/master
neon/datasets/tests/test_mnist.py
7
# ---------------------------------------------------------------------------- # Copyright 2014 Nervana Systems 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.o...
hbrunn/OpenUpgrade
refs/heads/master
addons/website_project/__openerp__.py
391
{ 'name': 'Public Projects', 'category': 'Website', 'summary': 'Publish Your Public Projects', 'version': '1.0', 'description': """ OpenERP Projects ================ """, 'author': 'OpenERP SA', 'depends': ['website_mail', 'project'], 'data': [ 'views/website_project.xm...
tchellomello/home-assistant
refs/heads/dev
tests/components/homekit/test_type_switches.py
10
"""Test different accessory types: Switches.""" from datetime import timedelta import pytest from homeassistant.components.homekit.const import ( ATTR_VALUE, TYPE_FAUCET, TYPE_SHOWER, TYPE_SPRINKLER, TYPE_VALVE, ) from homeassistant.components.homekit.type_switches import ( DockVacuum, Out...
elit3ge/SickRage
refs/heads/master
lib/github/__init__.py
66
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> # # Copyright 2012 Zearin <zearin@gonk.net> ...
FlintHill/SUAS-Competition
refs/heads/master
env/lib/python2.7/site-packages/pip/_internal/locations.py
8
"""Locations where we look for configs, install stuff, etc""" from __future__ import absolute_import import os import os.path import platform import site import sys import sysconfig from distutils import sysconfig as distutils_sysconfig from distutils.command.install import SCHEME_KEYS # type: ignore from pip._inter...
carlosgalvezp/RGBD_Mapping
refs/heads/master
ccny_rgbd/src/ccny_rgbd/srv/_PublishKeyframe.py
1
"""autogenerated by genpy from ccny_rgbd/PublishKeyframeRequest.msg. Do not edit.""" import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct class PublishKeyframeRequest(genpy.Message): _md5sum = "c5e4a7d59c68f74eabcec876a00216aa" _type = "ccny_rgbd/PublishKeyframeRequest" ...
Endika/OpenUpgrade
refs/heads/8.0
addons/board/board.py
175
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2013 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you ca...
akshayaurora/PyDelhiMobile
refs/heads/master
pydelhiconf/libs/garden/garden.mapview/mapview/downloader.py
4
# coding=utf-8 __all__ = ["Downloader"] from kivy.clock import Clock from os.path import join, exists from os import makedirs, environ from concurrent.futures import ThreadPoolExecutor, TimeoutError, as_completed from random import choice import requests import traceback from time import time from mapview import CACH...
fxia22/ASM_xf
refs/heads/master
PythonD/site_python/twisted/enterprise/dbpassport.py
2
# Twisted, the Framework of Your Internet # Copyright (C) 2001 Matthew W. Lefkowitz # # This library is free software; you can redistribute it and/or # modify it under the terms of version 2.1 of the GNU Lesser General Public # License as published by the Free Software Foundation. # # This library is distributed in t...
dbarenas/Katja-hop
refs/heads/master
time-complexity/b7.py
1
# exercise 1 # problem: you are given an integer N. Count the total of 1 + 2 + ...+ N. # Soution: the task can be solved in several ways. A first person, who knows nothing about time complexity, may implement an algorithm in wich the result is increment by 1: # # like this: # def solution_A(N): result = 0 for i i...
asen6/amartyasenguptadotcom
refs/heads/master
django/contrib/localflavor/se/se_counties.py
396
# -*- coding: utf-8 -*- """ An alphabetical list of Swedish counties, sorted by codes. http://en.wikipedia.org/wiki/Counties_of_Sweden This exists in this standalone file so that it's only imported into memory when explicitly needed. """ from django.utils.translation import ugettext_lazy as _ COUNTY_CHOICES = ( ...
baharev/sdopt-tearing
refs/heads/master
bb3_tear.py
1
# Copyright (C) 2015 University of Vienna # All rights reserved. # BSD license. # Author: Ali Baharev <ali.baharev@gmail.com> from __future__ import print_function, division from itertools import chain from time import time from networkx import connected_component_subgraphs from namedlist import namedlist from order_ut...
m039/Void
refs/heads/master
third-party/void-boost/tools/build/test/lib_source_property.py
44
#!/usr/bin/python # Copyright (C) Vladimir Prus 2006. # Distributed under the Boost Software License, Version 1.0. (See # accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) # Regression test: if a library had no explicit sources, but only <source> # properties, it was built as if it ...
trianam/voropath
refs/heads/master
tests/test.py
1
from mpl_toolkits.mplot3d import axes3d,Axes3D import numpy as np import scipy as sp #import scipy.misc #import math import matplotlib.pyplot as plt import scipy.spatial #from scipy.spatial import Voronoi #from scipy.spatial import ConvexHull np.random.seed(0) fig = plt.figure() ax = fig.gca(projection='3d') #V = n...
nikdoof/test-auth
refs/heads/master
app/eve_proxy/urls.py
1
from django.conf.urls.defaults import * from eve_proxy.views import EVEAPIProxyView urlpatterns = patterns('eve_proxy.views', # This view can be used just like EVE API's http://api.eve-online.com. # Any parameters or URL paths are sent through the cache system and # forwarded to the EVE API site as needed...
astropy/astropy
refs/heads/main
astropy/units/format/base.py
3
# Licensed under a 3-clause BSD style license - see LICENSE.rst class Base: """ The abstract base class of all unit formats. """ registry = {} def __new__(cls, *args, **kwargs): # This __new__ is to make it clear that there is no reason to # instantiate a Formatter--if you try to y...
markhice/ghost-casper
refs/heads/master
node_modules_bak/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/build-2.7/pygments/styles/monokai.py
364
# -*- coding: utf-8 -*- """ pygments.styles.monokai ~~~~~~~~~~~~~~~~~~~~~~~ Mimic the Monokai color scheme. Based on tango.py. http://www.monokai.nl/blog/2006/07/15/textmate-color-theme/ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details....
laosiaudi/tensorflow
refs/heads/master
tensorflow/contrib/linear_optimizer/python/ops/sharded_mutable_dense_hashtable_test.py
6
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
The-Compiler/pytest
refs/heads/master
src/_pytest/_code/source.py
12
import ast import inspect import textwrap import tokenize import warnings from bisect import bisect_right from typing import Iterable from typing import Iterator from typing import List from typing import Optional from typing import Tuple from typing import Union from _pytest.compat import overload class Source: ...
mbalasso/mynumpy
refs/heads/master
doc/swig/test/testMatrix.py
22
#! /usr/bin/env python # System imports from distutils.util import get_platform import os import sys import unittest # Import NumPy import numpy as np major, minor = [ int(d) for d in np.__version__.split(".")[:2] ] if major == 0: BadListError = TypeError else: BadListError = ValueError import Matrix ###...
Pistachitos/Sick-Beard
refs/heads/Pistachitos
lib/enzyme/mpeg.py
180
# -*- coding: utf-8 -*- # enzyme - Video metadata parser # Copyright 2011-2012 Antoine Bertin <diaoulael@gmail.com> # Copyright 2003-2006 Thomas Schueppel <stain@acm.org> # Copyright 2003-2006 Dirk Meyer <dischi@freevo.org> # # This file is part of enzyme. # # enzyme is free software; you can redistribute it and/or mod...
ajjl/ITK
refs/heads/master
Modules/ThirdParty/pygccxml/src/pygccxml/parser/declarations_cache.py
12
# Copyright 2014 Insight Software Consortium. # Copyright 2004-2008 Roman Yakovenko. # Distributed under the Boost Software License, Version 1.0. # See http://www.boost.org/LICENSE_1_0.txt import os import time import hashlib try: import cPickle as pickle except ImportError: import pickle from pygccxml import ...
harisibrahimkv/django
refs/heads/master
django/db/models/fields/related.py
17
import functools import inspect from functools import partial from django import forms from django.apps import apps from django.core import checks, exceptions from django.db import connection, router from django.db.backends import utils from django.db.models import Q from django.db.models.constants import LOOKUP_SEP f...
proversity-org/edx-platform
refs/heads/master
common/lib/xmodule/xmodule/tests/test_annotator_token.py
222
""" This test will run for annotator_token.py """ import unittest from xmodule.annotator_token import retrieve_token class TokenRetriever(unittest.TestCase): """ Tests to make sure that when passed in a username and secret token, that it will be encoded correctly """ def test_token(self): """...
kokushozero/mifsaDBProject
refs/heads/master
web2py/applications/welcome/controllers/appadmin.py
31
# -*- coding: utf-8 -*- # ########################################################## # ## make sure administrator is on localhost # ########################################################### import os import socket import datetime import copy import gluon.contenttype import gluon.fileutils try: import pygraphvi...
tedelhourani/ansible
refs/heads/devel
lib/ansible/modules/cloud/google/gce.py
25
#!/usr/bin/python # Copyright 2013 Google Inc. # 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'], ...
userzimmermann/robotframework
refs/heads/python3
atest/testdata/variables/extended_variables.py
38
class ExampleObject: def __init__(self, name='<noname>'): self.name = name def greet(self, name=None): if not name: return '%s says hi!' % self.name if name == 'FAIL': raise ValueError return '%s says hi to %s!' % (self.name, name) def __str...
sajuptpm/manila
refs/heads/master
manila/share/drivers/emc/plugins/vnx/utils.py
4
# Copyright (c) 2014 EMC Corporation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
evensonbryan/yocto-autobuilder
refs/heads/master
lib/python2.7/site-packages/autobuilder/buildsteps/TriggerBuilds.py
4
''' Created on Jan 15, 2013 __author__ = "Elizabeth 'pidge' Flanagan" __copyright__ = "Copyright 2012-2013, Intel Corp." __credits__ = ["Elizabeth Flanagan"] __license__ = "GPL" __version__ = "2.0" __maintainer__ = "Elizabeth Flanagan" __email__ = "elizabeth.flanagan@intel.com" ''' from buildbot.scheduler import Sch...
crowdhackathon-transport/optimizers
refs/heads/master
crowdstance-api/venv/lib/python2.7/site-packages/pip/pep425tags.py
469
"""Generate and work with PEP 425 Compatibility Tags.""" import sys import warnings try: import sysconfig except ImportError: # pragma nocover # Python < 2.7 import distutils.sysconfig as sysconfig import distutils.util def get_abbr_impl(): """Return abbreviated implementation name.""" if hasat...
lltk/lltk
refs/heads/master
lltk/en/en.py
1
#!/usr/bin/python # -*- coding: UTF-8 -*- __all__ = ['scrapers', 'scrape', 'conjugate'] import scrapers from lltk.scraping import scrape from lltk.decorators import language ISO639_1 = 'en' scrape = language(ISO639_1)(scrape) def conjugate(word, tense = 'present'): ''' Returns the conjugation of a given verb. ''' ...
glogiotatidis/bedrock
refs/heads/master
bedrock/utils/__init__.py
18
from django.conf import settings def expand_locale_groups(locales): """ Take a list of locales and locale prefixes (groups) and expand it to a full list of locales. :param locales: list of locale strings :return: list of locale strings """ all_locales = [] for locale in locales: i...
creimers/cmsplugin-filer
refs/heads/develop
cmsplugin_filer_folder/migrations_django/0001_initial.py
13
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings import filer.fields.folder class Migration(migrations.Migration): dependencies = [ ('cms', '0003_auto_20140926_2347'), ('filer', '0001_initial'), ] o...
novafloss/django-pimpmytheme
refs/heads/master
pimpmytheme/management/commands/update_themefolder_from_git.py
2
# -*- coding: utf-8 -*- import logging import os import sys from distutils.version import LooseVersion from django.core.management.base import BaseCommand from django.core.management.base import CommandError from django.conf import settings try: import git except ImportError: sys.stderr.write("""To update pi...
plotly/plotly.py
refs/heads/master
packages/python/plotly/plotly/graph_objs/sunburst/marker/colorbar/title/_font.py
2
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "sunburst.marker.colorbar.title" _path_str = "sunburst.marker.colorbar.title.font" _valid_props...
mkaplan218/clusterverify
refs/heads/master
code/display.py
1
def to_matrix(data_array, rows, cols): M = [] for row in range(rows): new_row = [] for col in range(cols): new_row.append(data_array[row*cols + col]) M.append(new_row) return M #display a character given as a matrix, M def display_matrix(M, title = ""): if len(title) > 0: print("Printing ...
dav1x/ansible
refs/heads/devel
lib/ansible/modules/monitoring/bigpanda.py
77
#!/usr/bin/python # -*- coding: utf-8 -*- # 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. #...
jandrest2018/TWJ-2017-A
refs/heads/master
04 Angular/B-Web/node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py
1825
# 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. """GYP backend that generates Eclipse CDT settings files. This backend DOES NOT generate Eclipse CDT projects. Instead, it generates XML files that can be importe...
ricket1978/ggplot
refs/heads/master
ggplot/geoms/geom_line.py
12
from __future__ import (absolute_import, division, print_function, unicode_literals) import sys from .geom import geom class geom_line(geom): DEFAULT_AES = {'color': 'black', 'alpha': None, 'linetype': 'solid', 'size': 1.0} REQUIRED_AES = {'x', 'y'} DEFAULT_PARAMS = {'stat': 'ident...
applephil/headlyne
refs/heads/master
venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/charsetgroupprober.py
2928
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client 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 ...
evansd/django
refs/heads/master
django/contrib/gis/views.py
86
from django.http import Http404 from django.utils.translation import gettext as _ def feed(request, url, feed_dict=None): """Provided for backwards compatibility.""" if not feed_dict: raise Http404(_("No feeds are registered.")) slug = url.partition('/')[0] try: f = feed_dict[slug] ...
ProjectSWGCore/NGECore2
refs/heads/master
scripts/object/tangible/furniture/nym_themepark/nym_themepark_mixing_chamber.py
85615
import sys def setup(core, object): return
dslomov/intellij-community
refs/heads/master
python/lib/Lib/datetime.py
74
"""Concrete date/time and related types -- prototype implemented in Python. See http://www.zope.org/Members/fdrake/DateTimeWiki/FrontPage See also http://dir.yahoo.com/Reference/calendars/ For a primer on DST, including many current DST rules, see http://webexhibits.org/daylightsaving/ For more about DST than you e...
grepman/detective.io
refs/heads/master
app/detective/utils.py
3
from django.core.cache import cache from django.core.exceptions import ValidationError, SuspiciousOperation from django.core.files import File from django.core.files.storage import default_storage from django.core.files.temp import NamedTemporaryFile from django.core.validators import validate_...
b0ri5/nishe-googlecode
refs/heads/master
scons/scons-local-1.3.0/SCons/Tool/hplink.py
5
"""SCons.Tool.hplink Tool-specific initialization for the HP linker. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foun...
jryburn/google-python-exercises
refs/heads/master
logpuzzle/logpuzzle.py
1
#!/usr/bin/python # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ import os import re import sys import urllib """Logpuzzle exercise Given an apache logfile, ...
yamt/tempest
refs/heads/master
tempest/thirdparty/boto/utils/s3.py
32
# Copyright 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
MonamAgarwal/final
refs/heads/master
GTG/backends/rtm/rtm.py
1
# Python library for Remember The Milk API __author__ = 'Sridhar Ratnakumar <http://nearfar.org/>' __all__ = ( 'API', 'createRTM', 'set_log_level', ) import urllib.request, urllib.parse, urllib.error from hashlib import md5 from GTG import _ from GTG.tools.logger import Log _use_jsonlib = False try: ...
customcommander/selenium
refs/heads/master
py/selenium/webdriver/remote/mobile.py
71
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
justathoughtor2/psu-hn-laundry
refs/heads/master
laundry/status/migrations/0001_initial.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Query', fields=[ ('id', models.AutoField(verbos...
kashif/scikit-learn
refs/heads/master
examples/model_selection/plot_roc_crossval.py
37
""" ============================================================= Receiver Operating Characteristic (ROC) with cross validation ============================================================= Example of Receiver Operating Characteristic (ROC) metric to evaluate classifier output quality using cross-validation. ROC curv...
raajitr/django_hangman
refs/heads/master
env/lib/python2.7/site-packages/rest_framework/fields.py
6
from __future__ import unicode_literals import collections import copy import datetime import decimal import inspect import json import re import uuid from collections import OrderedDict from django.conf import settings from django.core.exceptions import ValidationError as DjangoValidationError from django.core.excep...
slightlymadphoenix/activityPointsApp
refs/heads/master
activitypoints/lib/python3.5/site-packages/django/core/serializers/python.py
109
""" A Python "serializer". Doesn't do much serializing per se -- just converts to and from basic Python data types (lists, dicts, strings, etc.). Useful as a basis for other serializers. """ from __future__ import unicode_literals from collections import OrderedDict from django.apps import apps from django.conf impor...
CamelBackNotation/CarnotKE
refs/heads/master
jyhton/out/test/tests/org/python/indexer/data/pkg/mineral/metal/lead.py
13
import pkg.plant.poison.eggplant print pkg print pkg.plant print pkg.plant.poison print pkg.plant.poison.eggplant
liamgh/liamgreenhughes-sl4a-tf101
refs/heads/master
python/src/Demo/tkinter/matt/subclass-existing-widgets.py
47
from Tkinter import * # This is a program that makes a simple two button application class New_Button(Button): def callback(self): print self.counter self.counter = self.counter + 1 def createWidgets(top): f = Frame(top) f.pack() f.QUIT = Button(f, text='QUIT', foreground='red', comm...
uberamd/NGECore2
refs/heads/master
scripts/object/mobile/gaping_spider_queen.py
85615
import sys def setup(core, object): return
uberamd/NGECore2
refs/heads/master
scripts/object/mobile/beast_master/bm_xandank.py
85615
import sys def setup(core, object): return
Lekensteyn/buildbot
refs/heads/master
master/buildbot/test/fake/step.py
10
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
coolbombom/CouchPotato
refs/heads/master
library/getmeta.py
10
from hachoir_parser import createParser from hachoir_metadata import extractMetadata from hachoir_core.cmd_line import unicodeFilename import datetime import json import sys import re def getMetadata(filename): filename, realname = unicodeFilename(filename), filename parser = createParser(filename, realname)...
Azulinho/ansible
refs/heads/devel
lib/ansible/modules/cloud/azure/azure_rm_resourcegroup_facts.py
22
#!/usr/bin/python # # Copyright (c) 2016 Matt Davis, <mdavis@ansible.com> # Chris Houseknecht, <house@redhat.com> # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANS...
Mignet/dpark
refs/heads/master
dpark/tabular.py
14
import os import zlib import types import socket import struct import marshal import cPickle from lz4 import compress, decompress from dpark.rdd import RDD, MultiSplit, TextFileRDD, Split, ParallelCollection, cached from dpark.util import chain from dpark.moosefs import walk from dpark.bitindex import Bloomfilter, BitI...
splav/servo
refs/heads/master
tests/wpt/web-platform-tests/client-hints/resources/echo-client-hints-received.py
5
def main(request, response): """ Simple handler that sets a response header based on which client hint request headers were received. """ response.headers.append("Access-Control-Allow-Origin", "*") response.headers.append("Access-Control-Allow-Headers", "*") response.headers.append("Access-...
andreaso/ansible
refs/heads/devel
lib/ansible/modules/windows/win_reg_stat.py
72
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Ansible, inc # # 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 o...
michivo/buergerchain
refs/heads/master
dev_support/local_handysig_proxy/urllib3/__init__.py
94
""" urllib3 - Thread-safe connection pooling and re-using. """ from __future__ import absolute_import import warnings from .connectionpool import ( HTTPConnectionPool, HTTPSConnectionPool, connection_from_url ) from . import exceptions from .filepost import encode_multipart_formdata from .poolmanager imp...
cgwire/zou
refs/heads/master
tests/models/test_output_file.py
1
from tests.base import ApiDBTestCase from zou.app.models.output_file import OutputFile from zou.app.utils import fields from zou.app.services import projects_service class OutputFileTestCase(ApiDBTestCase): def setUp(self): super(OutputFileTestCase, self).setUp() self.generate_fixture_project_st...
ScienceStacks/JViz
refs/heads/master
mysite/scisheets/plugins/groupBy.py
2
""" Get the group names and their values """ from CommonUtil.prune_nulls import pruneNulls from scisheets.core.helpers import cell_types import collections import numpy as np import pandas as pd def groupBy(category_values, grouping_values): """" Forms groups based on category values. :param Iterable-of-Iterabl...
edry/edx-platform
refs/heads/master
lms/djangoapps/instructor/tests/test_tools.py
33
""" Tests for views/tools.py. """ import datetime import mock import json import unittest from django.utils.timezone import utc from django.test.utils import override_settings from nose.plugins.attrib import attr from courseware.field_overrides import OverrideFieldData # pylint: disable=import-error from student.te...
2ndy/RaspIM
refs/heads/master
usr/lib/python2.6/logging/handlers.py
2
# Copyright 2001-2007 by Vinay Sajip. All Rights Reserved. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, # provided that the above copyright notice appear in all copies and that # both that copyright notice and this permissio...
40223240/2015cdb_g3
refs/heads/master
static/Brython3.1.0-20150301-090019/Lib/site-packages/pygame/pkgdata.py
603
"""pkgdata is a simple, extensible way for a package to acquire data file resources. The getResource function is equivalent to the standard idioms, such as the following minimal implementation:: import sys, os def getResource(identifier, pkgname=__name__): pkgpath = os.path.dirname(sys.modules[p...
assusdan/cyanogenmod_kernel_hs_puref
refs/heads/release
tools/perf/scripts/python/net_dropmonitor.py
2669
# Monitor the system for dropped packets and proudce a report of drop locations and counts import os import sys sys.path.append(os.environ['PERF_EXEC_PATH'] + \ '/scripts/python/Perf-Trace-Util/lib/Perf/Trace') from perf_trace_context import * from Core import * from Util import * drop_log = {} kallsyms = [] def...
srickardti/openthread
refs/heads/master
tools/harness-automation/cases_R140/fed_6_1_7.py
18
#!/usr/bin/env python # # Copyright (c) 2016, The OpenThread Authors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright # notic...
dimasad/numpy
refs/heads/master
doc/source/conf.py
63
# -*- coding: utf-8 -*- from __future__ import division, absolute_import, print_function import sys, os, re # Check Sphinx version import sphinx if sphinx.__version__ < "1.0.1": raise RuntimeError("Sphinx 1.0.1 or newer required") needs_sphinx = '1.0' # ----------------------------------------------------------...
SMALLplayer/smallplayer-image-creator
refs/heads/master
storage/.xbmc/addons/script.xbmc.subtitles/resources/lib/services/Divxplanet/__init__.py
2547
# Dummy file to make this directory a package.
pankajp/pyside
refs/heads/master
tests/QtGui/action_clear.py
6
from PySide.QtGui import QMenu, QWidget, QMenuBar, QToolBar import weakref import unittest from helper import UsesQApplication class TestQActionLifeCycle(UsesQApplication): def actionDestroyed(self, act): self._actionDestroyed = True def testMenu(self): self._actionDestroyed = False ...
zsoltdudas/lis-tempest
refs/heads/LIS
tempest/lib/api_schema/response/compute/v2_1/keypairs.py
38
# Copyright 2014 NEC Corporation. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required ...
urandu/rethinkdb
refs/heads/next
external/v8_3.30.33.16/build/gyp/test/hello/gyptest-all.py
351
#!/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. """ Verifies simplest-possible build of a "Hello, world!" program using an explicit build target of 'all'. """ import TestGyp test = TestG...
rayNymous/nupic
refs/heads/master
examples/opf/experiments/multistep/hotgym_best_sp_5step_16K/description.py
32
# ---------------------------------------------------------------------- # 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 apply: # # This progra...
sgraham/nope
refs/heads/master
third_party/mojo/src/mojo/public/third_party/jinja2/_compat.py
638
# -*- coding: utf-8 -*- """ jinja2._compat ~~~~~~~~~~~~~~ Some py2/py3 compatibility support based on a stripped down version of six so we don't have to depend on a specific version of it. :copyright: Copyright 2013 by the Jinja team, see AUTHORS. :license: BSD, see LICENSE for details. ""...
sffjunkie/home-assistant
refs/heads/master
homeassistant/components/garage_door/mqtt.py
8
""" Support for MQTT garage doors. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/garage_door.mqtt/ """ import logging import voluptuous as vol from homeassistant.const import (STATE_OPEN, STATE_CLOSED, SERVICE_OPEN, SER...
h3llrais3r/SickRage
refs/heads/master
lib/twilio/rest/resources/tokens.py
40
from . import InstanceResource, ListResource class Token(InstanceResource): """ A Token instance. .. attribute:: username The temporary username that uniquely identifies a Token. .. attribute:: password The temporary password that the username will use when authenticating with Twi...
rolandmansilla/microblog
refs/heads/master
flask/lib/python2.7/site-packages/openid/sreg.py
185
"""moved to L{openid.extensions.sreg}""" import warnings warnings.warn("openid.sreg has moved to openid.extensions.sreg", DeprecationWarning) from openid.extensions.sreg import *
commtrack/temp-rapidsms
refs/heads/master
apps/scheduler/tests/slow.py
2
""" the slowest set of tests tests that a schedule set to fire every minute actually does, without speedup """ import time import logging from datetime import datetime, timedelta from rapidsms.tests.scripted import TestScript import scheduler.app as scheduler_app from scheduler.models import EventSchedule, ALL cla...
Tejal011089/Medsyn2_app
refs/heads/master
patches/august_2013/p01_hr_settings.py
30
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import webnotes def execute(): webnotes.reload_doc("hr", "doctype", "hr_settings") webnotes.reload_doc("setup", "doctype", "global_defaults") h...
nthien/flaskup
refs/heads/master
setup.py
2
import re from setuptools import setup from babel.messages import frontend as babel version = '0.3.2' def parse_requirements(file_name): requirements = [] for line in open(file_name, 'r').read().split('\n'): if re.match(r'(\s*#)|(\s*$)', line): continue if re.match(r'\s*-e\s+', li...