repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
ProjectSWGCore/NGECore2
refs/heads/master
scripts/object/ship/bwing_tier6.py
85615
import sys def setup(core, object): return
bicephale/OctoPrint
refs/heads/master
tests/printer/test_estimation.py
9
# coding=utf-8 from __future__ import absolute_import, division, print_function from octoprint.printer.estimation import TimeEstimationHelper __author__ = "Gina Häußge <osd@foosel.net>" __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html' __copyright__ = "Copyright (C) 2014 The OctoP...
ptisserand/portage
refs/heads/master
pym/portage/tests/ebuild/test_config.py
4
# Copyright 2010-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 from __future__ import unicode_literals import io import tempfile import portage from portage import os, shutil, _encodings from portage.const import USER_CONFIG_PATH from portage.dep import Atom from portage.p...
silverbulleters/vanessa-behavoir
refs/heads/develop
tools/Sikuli/SaveChangesCtrls.sikuli/AtomIsOpen.py
30
if not exists(Pattern("1463230028949.png").similar(0.80)): exit(1) click(Pattern("1463230028949.png").similar(0.80).targetOffset(10,0)) type("n",KeyModifier.CTRL) click("Edit.png") wait("SelectGramma.png",30) click("SelectGramma.png") sleep(2) paste("Gherkin-ru") sleep(1) type(Key.ENTER) exit(0)
GaetanCambier/CouchPotatoServer
refs/heads/develop
couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/nrk.py
28
# encoding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( ExtractorError, float_or_none, unified_strdate, ) class NRKIE(InfoExtractor): _VALID_URL = r'http://(?:www\.)?nrk\.no/(?:video|lyd)/[^/]+/(?P<id>[\dA-F]{16})' _TESTS = [ ...
hypriot/compose
refs/heads/raspbian
compose/cli/errors.py
4
from __future__ import absolute_import from textwrap import dedent class UserError(Exception): def __init__(self, msg): self.msg = dedent(msg).strip() def __unicode__(self): return self.msg __str__ = __unicode__ class DockerNotFoundMac(UserError): def __init__(self): super(...
allenp/odoo
refs/heads/9.0
addons/l10n_multilang/__openerp__.py
27
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Multi Language Chart of Accounts', 'version': '1.1', 'category': 'Hidden/Dependency', 'description': """ * Multi language support for Chart of Accounts, Taxes, Tax Codes, Journals, Ac...
jimperio/pelican
refs/heads/master
pelican/tests/support.py
23
# -*- coding: utf-8 -*- from __future__ import print_function, unicode_literals import locale import logging import os import re import subprocess import sys import unittest from contextlib import contextmanager from functools import wraps from logging.handlers import BufferingHandler from shutil import rmtree from te...
dresden-weekly/ansible
refs/heads/release1.9.1-clean
lib/ansible/runner/lookup_plugins/together.py
174
# (c) 2013, Bradley Young <young.bradley@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 the License, or # (at your option) any later...
Rima-B/mica2
refs/heads/master
mica-python-client/src/main/python/mica/access_collected_dataset.py
1
""" Apply access on a study dataset. """ import sys import mica.core import mica.access def add_arguments(parser): """ Add command specific options """ mica.access.add_permission_arguments(parser, True) parser.add_argument('id', help='Collected dataset ID') def do_command(args): """ Execu...
auduny/home-assistant
refs/heads/dev
homeassistant/components/yandextts/tts.py
5
"""Support for the yandex speechkit tts service.""" import asyncio import logging import aiohttp import async_timeout import voluptuous as vol from homeassistant.components.tts import CONF_LANG, PLATFORM_SCHEMA, Provider from homeassistant.const import CONF_API_KEY from homeassistant.helpers.aiohttp_client import as...
Semi-global/edx-platform
refs/heads/master
common/lib/xmodule/xmodule/tests/test_progress.py
49
"""Module progress tests""" import unittest from mock import Mock from xblock.field_data import DictFieldData from xmodule.progress import Progress from xmodule import x_module from . import get_test_system class ProgressTest(unittest.TestCase): ''' Test that basic Progress objects work. A Progress represent...
yannrouillard/weboob
refs/heads/master
modules/bouygues/pages/login.py
5
# -*- coding: utf-8 -*- # Copyright(C) 2010-2011 Christophe Benz # # This file is part of weboob. # # weboob is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at yo...
sicotronic/sunfish
refs/heads/master
sunfish_project.py
1
#!/usr/bin/env pypy # -*- coding: utf-8 -*- from __future__ import print_function import sys from itertools import count from collections import Counter, OrderedDict, namedtuple import re import datetime # The table size is the maximum number of elements in the transposition table. TABLE_SIZE = 1e6 # This constant c...
ZehLuckmann/Roger
refs/heads/master
src/roger/talk.py
1
#encoding: utf-8 #!/usr/bin/env python from textblob.classifiers import NaiveBayesClassifier from textblob import TextBlob import logging class Talk(object): """A classe Talk é responsável por retornar a resposta de uma frase, baseando nas informações exportadas. Utilizando a classificação de acordo com o ...
WSDC-NITWarangal/django
refs/heads/master
django/contrib/gis/db/backends/spatialite/adapter.py
586
from django.contrib.gis.db.backends.base.adapter import WKTAdapter from django.db.backends.sqlite3.base import Database class SpatiaLiteAdapter(WKTAdapter): "SQLite adaptor for geometry objects." def __conform__(self, protocol): if protocol is Database.PrepareProtocol: return str(self)
Russell-IO/ansible
refs/heads/devel
lib/ansible/modules/network/avi/avi_gslbservice.py
26
#!/usr/bin/python # # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Eric Anderson (eanderson@avinetworks.com) # module_check: supported # Avi Version: 17.1.1 # # Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses...
JiangKlijna/leetcode-learning
refs/heads/master
py/268 Missing Number/MissingNumber.py
1
# Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array. # For example, Given nums = [0, 1, 3] return 2. class Solution(object): def missingNumber(self, nums): """ :type nums: List[int] :rtype: int """ #return le...
2014c2g9/c2g9
refs/heads/master
wsgi/static/reeborg/src/libraries/brython/Lib/browser/indexed_db.py
11
class EventListener: def __init__(self, events=[]): self._events=events def append(self, event): self._events.append(event) def fire(self, e): for _event in self._events: _event(e) class IndexedDB: def __init__(self): if not __BRYTHON__.has_indexedDB: raise NotImple...
espadrine/opera
refs/heads/master
chromium/src/third_party/python_26/Lib/md5.py
62
# $Id: md5.py 58064 2007-09-09 20:25:00Z gregory.p.smith $ # # Copyright (C) 2005 Gregory P. Smith (greg@krypto.org) # Licensed to PSF under a Contributor Agreement. import warnings warnings.warn("the md5 module is deprecated; use hashlib instead", DeprecationWarning, 2) from hashlib import md5 ne...
pombredanne/frappe
refs/heads/develop
frappe/patches/v4_0/replace_deprecated_timezones.py
73
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe.utils.momentjs import data as momentjs_data def execute(): frappe.reload_doc("core", "doctype", "user") ss = frappe.get_doc("System Settings", "Syste...
weijia/django-app-plugins
refs/heads/master
app_plugins/__init__.py
5
""" """ from library import Library VERSION = (0, 1, 2, "rc2") def get_version(): if VERSION[3] != "final": return "%s.%s.%s%s" % (VERSION[0], VERSION[1], VERSION[2], VERSION[3]) else: return "%s.%s.%s" % (VERSION[0], VERSION[1], VERSION[2]) __version__ = get_version()
prakxys/flask
refs/heads/master
Work/TriviaMVA/TriviaMVA/env/Lib/site-packages/pip/vcs/git.py
473
import tempfile import re import os.path from pip.util import call_subprocess from pip.util import display_path, rmtree from pip.vcs import vcs, VersionControl from pip.log import logger from pip.backwardcompat import url2pathname, urlparse urlsplit = urlparse.urlsplit urlunsplit = urlparse.urlunsplit class Git(Versi...
ryandougherty/mwa-capstone
refs/heads/heroku
MWA_Tools/build/matplotlib/examples/pylab_examples/stem_plot.py
13
#!/usr/bin/env python from pylab import * x = linspace(0.1, 2*pi, 10) markerline, stemlines, baseline = stem(x, cos(x), '-.') setp(markerline, 'markerfacecolor', 'b') setp(baseline, 'color','r', 'linewidth', 2) show()
indrajitr/ansible
refs/heads/devel
test/lib/ansible_test/_internal/cloud/aws.py
19
"""AWS plugin for integration tests.""" from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os from ..util import ( ApplicationError, display, ConfigParser, ) from . import ( CloudProvider, CloudEnvironment, CloudEnvironmentConfig, ) from ..core_ci ...
caglar10ur/certmaster
refs/heads/devel
certmaster/utils.py
1
""" Copyright 2007-2008, Red Hat, Inc see AUTHORS This software may be freely redistributed under the terms of the GNU general public license. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 021...
davidwboswell/documentation_autoresponse
refs/heads/master
vendor-local/packages/chardet/chardet/escsm.py
235
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
shenguoquan/kafka
refs/heads/0.8.1
system_test/utils/__init__.py
20578
RockySteveJobs/python-for-android
refs/heads/master
python-build/python-libs/gdata/tests/atom_test.py
87
#!/usr/bin/python # -*-*- encoding: utf-8 -*-*- # # Copyright (C) 2006 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 # # Unle...
johnbryan/jbryanOrg
refs/heads/master
lib/itsdangerous/encoding.py
11
import base64 import string import struct from ._compat import text_type from .exc import BadData def want_bytes(s, encoding="utf-8", errors="strict"): if isinstance(s, text_type): s = s.encode(encoding, errors) return s def base64_encode(string): """Base64 encode a string of bytes or text. The...
Chilledheart/chromium
refs/heads/master
tools/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-edgedata/pkg/function_conditional_import2_existing.py
728
""" $fname """
bitcity/django
refs/heads/master
tests/gis_tests/gdal_tests/test_srs.py
304
import unittest from unittest import skipUnless from django.contrib.gis.gdal import HAS_GDAL if HAS_GDAL: from django.contrib.gis.gdal import SpatialReference, CoordTransform, GDALException, SRSException class TestSRS: def __init__(self, wkt, **kwargs): self.wkt = wkt for key, value in kwarg...
benjaminjkraft/django
refs/heads/master
django/core/files/images.py
429
""" Utility functions for handling images. Requires Pillow as you might imagine. """ import struct import zlib from django.core.files import File class ImageFile(File): """ A mixin for use alongside django.core.files.base.File, which provides additional features for dealing with images. """ def ...
elsdrm/Conque-Shell
refs/heads/master
autoload/conque_term/conque_sole_wrapper.py
30
# FILE: autoload/conque_term/conque_sole_wrapper.py # AUTHOR: Nico Raffo <nicoraffo@gmail.com> # WEBSITE: http://conque.googlecode.com # MODIFIED: 2011-09-02 # VERSION: 2.3, for Vim 7.0 # LICENSE: # Conque - Vim terminal/console emulator # Copyright (C) 2009-2011 Nico Raffo # # MIT License # # Permission is he...
asedunov/intellij-community
refs/heads/master
python/testData/inspections/PyDunderSlotsInspection/inheritedClassAttrAssignmentAndOwnAndInheritedWithDictSlots.py
35
class B(object): attr = 'baz' __slots__ = ['f', 'b', '__dict__'] class C(B): __slots__ = ['foo', 'bar'] C.attr = 'spam' print(C.attr) c = C() c.attr = 'spam' print(c.attr)
m-wichmann/local_seriesly
refs/heads/master
src/__init__.py
2
"""local_serisly src package"""
mtmarsh2/thingscoop
refs/heads/master
thingscoop/__init__.py
6
import cv2 import glob import multiprocessing import os import pydoc import subprocess import tempfile from collections import defaultdict from progressbar import ProgressBar, Percentage, Bar, ETA from .classifier import ImageClassifier from .models import clear_models from .models import download_model from .models ...
byu-stats-sports/shoecontracts
refs/heads/master
shoecontracts/downloader.py
1
import nba_py.player import nba_py.team import nba_py.game import nba_py.league import nba_py.draftcombine import dateutil.parser import datetime import sys sys.path.append('/Users/chris/Desktop/NBA Injury Data/shoecontracts') import shoecontracts import shoecontracts.utils import logging from pprint import pprint from...
catapult-project/catapult
refs/heads/master
third_party/gsutil/gslib/tests/test_mv.py
4
# -*- coding: utf-8 -*- # Copyright 2013 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
Varentsov/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/html5lib/html5lib/trie/_base.py
1735
from __future__ import absolute_import, division, unicode_literals from collections import Mapping class Trie(Mapping): """Abstract base class for tries""" def keys(self, prefix=None): keys = super().keys() if prefix is None: return set(keys) # Python 2.6: no set compre...
ppiotr/Invenio
refs/heads/docextract
modules/websubmit/web/yoursubmissions.py
25
## This file is part of Invenio. ## Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010, 2011, 2012 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at...
shadowmint/nwidget
refs/heads/master
lib/pyglet-1.4.4/tests/app/EVENT_LOOP.py
26
#!/usr/bin/python '''Test that the event loop can do timing. The test will display a series of intervals, iterations and sleep times. It should then display an incrementing number up to 2x the number of iterations, at a rate determined by the interval. ''' import sys import unittest import pyglet __non...
tych0/criu
refs/heads/master
test/inhfd/socket.py
8
import socket import os def create_fds(): (sk1, sk2) = socket.socketpair(socket.AF_UNIX, socket.SOCK_STREAM) return (sk1.makefile("w"), sk2.makefile("r")) def __sock_ino(sockf): return os.fstat(sockf.fileno()).st_ino def filename(sockf): return 'socket:[%d]' % __sock_ino(sockf) def dump_opts(sockf): return ['-...
botswana-harvard/bcpp-export
refs/heads/develop
bcpp_export/old_export/derived_variables.py
1
import sys import numpy as np import pandas as pd from dateutil.relativedelta import relativedelta from django.utils import timezone from .communities import communities, intervention from .constants import (YES, NO, DEFAULTER, NAIVE, NEG, ON_ART, POS, UNK, SUBJECT_IDENTIFIER, edc_ART_PRESCRI...
poldracklab/niworkflows
refs/heads/master
niworkflows/viz/__init__.py
2
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: from .plots import plot_carpet from .utils import SVGNS __all__ = ["plot_carpet", "SVGNS"]
meghana1995/sympy
refs/heads/master
sympy/polys/polyfuncs.py
45
"""High-level polynomials manipulation functions. """ from __future__ import print_function, division from sympy.polys.polytools import ( poly_from_expr, parallel_poly_from_expr, Poly) from sympy.polys.polyoptions import allowed_flags from sympy.polys.specialpolys import ( symmetric_poly, interpolating_poly)...
Netuitive/netuitive-diamond
refs/heads/master
src/collectors/dropwizard/dropwizard.py
16
# coding=utf-8 """ Collect [dropwizard](http://dropwizard.codahale.com/) stats for the local node """ import urllib2 try: import json except ImportError: import simplejson as json import diamond.collector class DropwizardCollector(diamond.collector.Collector): def get_default_config_help(self): ...
kgori/treeCl
refs/heads/master
setup.py
1
# -*- coding: utf-8 -*- from __future__ import print_function try: from setuptools import setup, find_packages, Extension except ImportError: from distutils.core import setup, Extension def find_packages(): return ['treeCl', 'treeCl.interfacing', 'treeCl.tasks', 'treeCl.utils'] from Cython.Distut...
chongtianfeiyu/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/site-packages/pip/_vendor/requests/hooks.py
1891
# -*- coding: utf-8 -*- """ requests.hooks ~~~~~~~~~~~~~~ This module provides the capabilities for the Requests hooks system. Available hooks: ``response``: The response generated from a Request. """ HOOKS = ['response'] def default_hooks(): hooks = {} for event in HOOKS: hooks[event] = []...
chadhahn/POSTMan-Chrome-Extension
refs/heads/master
tools/lesscss.py
32
#!/usr/bin/python2.6 from pyquery import PyQuery as pq import sys # These selectors are kept regardless of whether this script thinks they are used. # Most of these match nodes that are dynamically inserted or manipulated by script # after the page has loaded, which is why a static analysis thinks they're unus...
BlackHole/enigma2-1
refs/heads/master
lib/python/Components/Renderer/Label.py
119
from Components.VariableText import VariableText from Renderer import Renderer from enigma import eLabel class Label(VariableText, Renderer): def __init__(self): Renderer.__init__(self) VariableText.__init__(self) GUI_WIDGET = eLabel def connect(self, source): Renderer.connect(self, source) self.changed(...
postatum/ra
refs/heads/master
ra/validate.py
3
import jsonschema from .raml import named_params_to_json_schema class RAMLValidator(object): def __init__(self, response, raml): self.response = response self.raml = raml self.raml_response = raml.responses.get(response.status_code) def validate(self, validate=["headers", "body"]): ...
Hoekz/hackness-monster
refs/heads/master
venv/lib/python2.7/site-packages/setuptools/monkey.py
71
""" Monkey patching of distutils. """ import sys import distutils.filelist import platform import types import functools from .py26compat import import_module from setuptools.extern import six import setuptools __all__ = [] """ Everything is private. Contact the project team if you think you need this functionality...
quantmind/lux
refs/heads/master
tests/core/test_memory_model.py
1
from lux.utils import test from lux.models.memory import Model class TestDictModel(test.TestCase): config_file = 'tests.rest' def test_instance(self): model = Model('test', fields=('id', 'foo', 'name')) self.assertDictEqual(model.create_instance(), {}) o = model.instance() mod...
prarthitm/edxplatform
refs/heads/master
lms/djangoapps/ccx/tasks.py
17
""" Asynchronous tasks for the CCX app. """ from django.dispatch import receiver import logging from opaque_keys import InvalidKeyError from opaque_keys.edx.locator import CourseLocator from ccx_keys.locator import CCXLocator from xmodule.modulestore.django import SignalHandler from lms import CELERY_APP from lms.dj...
locationlabs/mockredis
refs/heads/master
mockredis/tests/test_string.py
1
from datetime import timedelta from nose.tools import eq_, ok_ from mockredis.client import get_total_milliseconds from mockredis.tests.fixtures import ( raises_response_error, setup, teardown, ) class TestRedisString(object): """string tests""" def setup(self): setup(self) def tea...
komsas/OpenUpgrade
refs/heads/master
addons/website_crm/controllers/main.py
20
# -*- coding: utf-8 -*- import base64 from openerp.addons.web import http from openerp.addons.web.http import request from openerp import SUPERUSER_ID import werkzeug.urls class contactus(http.Controller): def generate_google_map_url(self, street, city, city_zip, country_name): url = "http://maps.googl...
aagallag/nexmon
refs/heads/rpi3-crosscompile
app/app/src/main/external/src/libwireshark_helper/wireshark/epan/wspython/wspy_libws.py
6
# wspy_libws.py # # $Id: wspy_libws.py 34848 2010-11-12 13:32:04Z stig $ # # Wireshark Protocol Python Binding # # Copyright (c) 2009 by Sebastien Tandel <sebastien [AT] tandel [dot] be> # Copyright (c) 2001 by Gerald Combs <gerald@wireshark.org> # # This program is free software; you can redistribute it and/or # modif...
amolkahat/pandas
refs/heads/master
pandas/tests/frame/test_convert_to.py
4
# -*- coding: utf-8 -*- from datetime import datetime import pytest import pytz import collections from collections import OrderedDict, defaultdict import numpy as np from pandas import compat from pandas.compat import long from pandas import (DataFrame, Series, MultiIndex, Timestamp, date_range)...
pvagner/orca
refs/heads/master
test/keystrokes/firefox/say_all_role_links.py
1
#!/usr/bin/python """Test of sayAll.""" from macaroon.playback import * import utils sequence = MacroSequence() sequence.append(utils.StartRecordingAction()) sequence.append(KeyComboAction("KP_Add")) sequence.append(utils.AssertPresentationAction( "1. KP_Add to do a SayAll", ["SPEECH OUTPUT: 'Here are some ...
stupidamigo/lice-python
refs/heads/master
lice/__init__.py
1
from lice.core import *
yukoba/DeepLearningTutorials
refs/heads/master
code/imdb_preprocess.py
36
""" This script is what created the dataset pickled. 1) You need to download this file and put it in the same directory as this file. https://github.com/moses-smt/mosesdecoder/raw/master/scripts/tokenizer/tokenizer.perl . Give it execution permission. 2) Get the dataset from http://ai.stanford.edu/~amaas/data/sentime...
mvesper/invenio
refs/heads/master
modules/websubmit/lib/functions/Move_Files_Archive.py
3
# This file is part of Invenio. # Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010, 2011 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option)...
CERNDocumentServer/invenio
refs/heads/prod
modules/oaiharvest/lib/oai_harvest_getter.py
1
# -*- mode: python; coding: utf-8; -*- # # This file is part of Invenio. # Copyright (C) 2009, 2010, 2011, 2012 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # Licen...
neilLasrado/erpnext
refs/heads/develop
erpnext/controllers/taxes_and_totals.py
1
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import json import frappe, erpnext from frappe import _, scrub from frappe.utils import cint, flt, round_based_on_smallest_currency_fraction from erpnex...
prutseltje/ansible
refs/heads/devel
lib/ansible/modules/network/junos/junos_user.py
14
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ansible by Red Hat, 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', ...
tomchristie/django
refs/heads/master
tests/forms_tests/tests/test_error_messages.py
80
from django.core.files.uploadedfile import SimpleUploadedFile from django.forms import ( BooleanField, CharField, ChoiceField, DateField, DateTimeField, DecimalField, EmailField, FileField, FloatField, Form, GenericIPAddressField, IntegerField, ModelChoiceField, ModelMultipleChoiceField, MultipleChoiceF...
joker946/nova
refs/heads/master
nova/api/openstack/extensions.py
7
# Copyright 2011 OpenStack Foundation # Copyright 2011 Justin Santa Barbara # 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...
ixs/func
refs/heads/master
func/yaml/__init__.py
15
""" pyyaml legacy Copyright (c) 2001 Steve Howell and Friends; All Rights Reserved (see open source license information in docs/ directory) """ __version__ = "0.32" from load import loadFile, load, Parser, l from dump import dump, dumpToFile, Dumper, d from stream import YamlLoaderException, StringStream, Fil...
MLWave/auto-sklearn
refs/heads/master
autosklearn/data/util.py
5
# Functions performing various data conversions for the ChaLearn AutoML challenge # Main contributors: Arthur Pesah and Isabelle Guyon, August-October 2014 # ALL INFORMATION, SOFTWARE, DOCUMENTATION, AND DATA ARE PROVIDED "AS-IS". # ISABELLE GUYON, CHALEARN, AND/OR OTHER ORGANIZERS OR CODE AUTHORS DISCLAIM # ANY EXP...
aioue/ansible
refs/heads/devel
lib/ansible/modules/cloud/cloudstack/cs_template.py
22
#!/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...
RBE-Avionik/skylines
refs/heads/master
skylines/commands/tracking/__init__.py
3
from flask_script import Manager from .clear import Clear from .delete_old import DeleteOld from .export import Export from .fill_missing_keys import FillMissingKeys from .generate import Generate from .generate_through_daemon import GenerateThroughDaemon from .server import Server from .stats import Stats manager = ...
CaledoniaProject/Empire
refs/heads/master
lib/modules/privesc/bypassuac.py
5
from lib.common import helpers class Module: def __init__(self, mainMenu, params=[]): self.info = { 'Name': 'Invoke-BypassUAC', 'Author': ['@harmyj0', '@sixdub'], 'Description': ('Runs a BypassUAC attack to escape from a medium integrity process ' ...
MatthewWilkes/django
refs/heads/master
tests/staticfiles_tests/test_templatetags.py
317
from __future__ import unicode_literals from .cases import StaticFilesTestCase class TestTemplateTag(StaticFilesTestCase): def test_template_tag(self): self.assertStaticRenders("does/not/exist.png", "/static/does/not/exist.png") self.assertStaticRenders("testfile.txt", "/static/testfile.txt")
gnulinooks/sympy
refs/heads/master
sympy/thirdparty/pyglet/pyglet/lib.py
4
'''Functions for loading dynamic libraries. These extend and correct ctypes functions. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import os import re import sys import ctypes import ctypes.util class LibraryLoader(object): def load_library(self, *names, **kwargs): '''Find and load a ...
linkedin/simoorg
refs/heads/master
src/simoorg/plugins/healthcheck/__init__.py
8
# # Copyright 2015 LinkedIn Corp. 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 applicable law or ...
affansyed/bcc
refs/heads/master
tests/python/test_callchain.py
6
#!/usr/bin/env python # Copyright (c) PLUMgrid, Inc. # Licensed under the Apache License, Version 2.0 (the "License") from bcc import BPF import time from unittest import main, TestCase class TestCallchain(TestCase): def test_callchain1(self): hist = {} def cb(pid, callchain): counter ...
akiokio/centralfitestoque
refs/heads/master
src/salesReport/management/__init__.py
9
# -*- coding: utf-8 -*- __author__ = 'akiokio'
hlzz/dotfiles
refs/heads/master
graphics/VTK-7.0.0/ThirdParty/Twisted/twisted/mail/test/test_pop3client.py
2
# -*- test-case-name: twisted.mail.test.test_pop3client -*- # Copyright (c) 2001-2004 Divmod Inc. # See LICENSE for details. import sys import inspect from zope.interface import directlyProvides from twisted.mail.pop3 import AdvancedPOP3Client as POP3Client from twisted.mail.pop3 import InsecureAuthenticat...
monkeysecurity/npyscreen
refs/heads/master
npyscreen/wgmultilineeditable.py
15
import curses from . import wgwidget from . import wgmultiline from . import wgtextbox as textbox from . import wgboxwidget class MultiLineEditable(wgmultiline.MultiLine): _contained_widgets = textbox.Textfield CHECK_VALUE = True ALLOW_CONTINUE_EDITING = True CONTINUE_EDITING_AFTER_...
dslomov/intellij-community
refs/heads/master
python/lib/Lib/email/test/test_email_torture.py
144
# Copyright (C) 2002-2004 Python Software Foundation # # A torture test of the email package. This should not be run as part of the # standard Python test suite since it requires several meg of email messages # collected in the wild. These source messages are not checked into the # Python distro, but are available as...
BayMinimum/Hacktoberfest-Mathematics
refs/heads/master
algebra/gcd/python/gcd.py
1
""" euclid_gcd(0 is used to find the gcd of two numbers using euclidean algorithm @input: a, b numbers @output gcd(a,b) """ def euclid_gcd(a, b): if a < b: return euclid_gcd(b, a) while b != 0: (a, b) = (b, a%b) return a
nck0405/MyOwn
refs/heads/master
static/scripts/tools/jsmin.py
513
#!/usr/bin/python # This code is original from jsmin by Douglas Crockford, it was translated to # Python by Baruch Even. The original code had the following copyright and # license. # # /* jsmin.c # 2007-01-08 # # Copyright (c) 2002 Douglas Crockford (www.crockford.com) # # Permission is hereby granted, free of ch...
krame505/rocketrobot
refs/heads/master
bin/cxxtest-4.3/build_tools/SCons/test/globbing/TestDef.py
461
#------------------------------------------------------------------------- # CxxTest: A lightweight C++ unit testing library. # Copyright (c) 2008 Sandia Corporation. # This software is distributed under the LGPL License v3 # For more information, see the COPYING file in the top CxxTest directory. # Under the terms of ...
darkleons/BE
refs/heads/master
addons/auth_oauth/__init__.py
433
import controllers import auth_oauth import res_users import res_config import ir_configparameter
fidomason/kbengine
refs/heads/master
kbe/src/lib/python/Lib/test/badsyntax_future4.py
383
"""This is a test""" import __future__ from __future__ import nested_scopes def f(x): def g(y): return x + y return g result = f(2)(4)
CoolCloud/ansible
refs/heads/devel
test/units/template/test_safe_eval.py
205
# (c) 2012-2014, Michael DeHaan <michael.dehaan@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 the License, or # (at your option) an...
jhayworth/config
refs/heads/master
.emacs.d/elpy/rpc-venv/lib/python2.7/site-packages/yapf/yapflib/identify_container.py
5
# Copyright 2018 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 by applicable law or a...
klen/django_markdown
refs/heads/develop
tests/__init__.py
4
import os os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'tests.settings') from django import VERSION if VERSION >= (1, 7): from django.conf import settings from django.apps import apps apps.populate(settings.INSTALLED_APPS) from django.core.management import call_command call_command('syncdb', intera...
Nikoala/CouchPotatoServer
refs/heads/develop
couchpotato/core/media/movie/providers/trailer/mechanize/_mechanize.py
133
"""Stateful programmatic WWW navigation, after Perl's WWW::Mechanize. Copyright 2003-2006 John J. Lee <jjl@pobox.com> Copyright 2003 Andy Lester (original Perl code) This code is free software; you can redistribute it and/or modify it under the terms of the BSD or ZPL 2.1 licenses (see the file COPYING.txt included w...
gquirozbogner/contentbox-master
refs/heads/master
third_party/autoload/__init__.py
132
def autodiscover(module_name): """ Automatically loads modules specified by module_name for each app in installed apps. """ from django.conf import settings from django.utils.importlib import import_module from django.utils.module_loading import module_has_submodule for app in settings....
tianweizhang/nova
refs/heads/v0
nova/virt/libvirt/rbd_utils.py
2
# Copyright 2012 Grid Dynamics # Copyright 2013 Inktank Storage, Inc. # Copyright 2014 Mirantis, 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.or...
AlanZatarain/cortex-vfx
refs/heads/master
test/IECoreHoudini/ops/parameters/groupParam/groupParam-1.py
12
import IECore class groupParam( IECore.Op ) : def __init__( self ) : IECore.Op.__init__( self, "Op that has group parameters.", IECore.PrimitiveParameter( name = "result", description = "A pass through the first child of the input parameter.", defaultValue = IECore.MeshPrimitive() ) ) ...
redhat-openstack/glance
refs/heads/f22-patches
glance/tests/unit/test_context.py
2
# Copyright 2010-2011 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...
EdgarSun/Django-Demo
refs/heads/master
django/utils/_os.py
153
import os import stat from os.path import join, normcase, normpath, abspath, isabs, sep from django.utils.encoding import force_unicode # Define our own abspath function that can handle joining # unicode paths to a current working directory that has non-ASCII # characters in it. This isn't necessary on Windows since...
pselle/calibre
refs/heads/master
src/cherrypy/_cpthreadinglocal.py
194
# This is a backport of Python-2.4's threading.local() implementation """Thread-local objects (Note that this module provides a Python version of thread threading.local class. Depending on the version of Python you're using, there may be a faster one available. You should always import the local class from threa...
nyuwireless/ns3-mmwave
refs/heads/master
src/mobility/bindings/callbacks_list.py
181
callback_classes = [ ['void', 'ns3::Ptr<ns3::NetDevice>', 'ns3::Ptr<ns3::Packet const>', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'], ['void', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::e...
inspyration/odoo
refs/heads/master
addons/calendar/controllers/__init__.py
829
import main # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
home-assistant/home-assistant
refs/heads/dev
tests/components/twinkly/test_init.py
8
"""Tests of the initialization of the twinly integration.""" from unittest.mock import patch from uuid import uuid4 from homeassistant.components.twinkly import async_setup_entry, async_unload_entry from homeassistant.components.twinkly.const import ( CONF_ENTRY_HOST, CONF_ENTRY_ID, CONF_ENTRY_MODEL, ...
Petr-Kovalev/nupic-win32
refs/heads/master
py/nupic/data/stream_reader.py
1
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have purchased from # Numenta, Inc. a separate commercial license for this software code, the # following terms and conditio...