repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
switchboardOp/ansible
refs/heads/devel
lib/ansible/modules/cloud/ovirt/ovirt_templates_facts.py
45
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2016 Red Hat, 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 #...
johankaito/fufuka
refs/heads/master
microblog/flask/venv/lib/python2.7/site-packages/redis/__init__.py
58
from redis.client import Redis, StrictRedis from redis.connection import ( BlockingConnectionPool, ConnectionPool, Connection, SSLConnection, UnixDomainSocketConnection ) from redis.utils import from_url from redis.exceptions import ( AuthenticationError, BusyLoadingError, ConnectionErro...
pinguinkiste/bioconda-recipes
refs/heads/master
recipes/t_coffee/t_coffee/config.py
19
import os import os.path as op tcoffee_install_dir = op.normpath(op.join(op.dirname(__file__), '..', '..', '..', '{{TCOFFEE_FOLDER_NAME}}')) tcoffee_bin_dir = op.join(tcoffee_install_dir, 'bin') tcoffee_exe_file = op.join(tcoffee_bin_dir, 't_coffee') tcoffee_plugins_dir = op.join(tcoffee_install_dir, 'plugins', 'linux...
inoi/trombi
refs/heads/master
test/util.py
1
# Copyright (c) 2010 Inoi Oy # # 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, distribut...
dorotan/pythontraining
refs/heads/master
env/Lib/site-packages/pip/_vendor/distlib/markers.py
1261
# -*- coding: utf-8 -*- # # Copyright (C) 2012-2013 Vinay Sajip. # Licensed to the Python Software Foundation under a contributor agreement. # See LICENSE.txt and CONTRIBUTORS.txt. # """Parser for the environment markers micro-language defined in PEP 345.""" import ast import os import sys import platform from .compa...
Arafatk/sympy
refs/heads/master
examples/intermediate/partial_differential_eqs.py
115
#!/usr/bin/env python """Partial Differential Equations example Demonstrates various ways to solve partial differential equations """ from sympy import symbols, Eq, Function, pde_separate, pprint, sin, cos, latex from sympy import Derivative as D def main(): r, phi, theta = symbols("r,phi,theta") Xi = Func...
jamesroutley/formation
refs/heads/master
formation/parameter.py
1
# -*- coding: utf-8 -*- """ formation.parameter implements the Parameter class. """ OPTIONAL_PROPERTIES = [ "allowed_pattern", "allowed_values", "constraint_description", "default", "description", "max_length", "max_value", "min_length", "min_value", "no_echo" ] class Param...
salvocambria/xen-api
refs/heads/master
scripts/examples/python/shutdown.py
14
#!/usr/bin/env python # Copyright (c) Citrix Systems. # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR...
alexvanboxel/airflow
refs/heads/master
airflow/api/common/experimental/mark_tasks.py
17
# -*- coding: utf-8 -*- # # 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 ...
proxysh/Safejumper-for-Desktop
refs/heads/master
buildlinux/env32/lib/python2.7/site-packages/zope/interface/interfaces.py
9
############################################################################## # # Copyright (c) 2002 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOF...
CloverHealth/airflow
refs/heads/clover
airflow/contrib/executors/kubernetes_executor.py
1
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
xuweiliang/Codelibrary
refs/heads/master
nova/conf/guestfs.py
9
# Copyright 2015 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...
gilir/awn-extras-debian
refs/heads/debian
shared/python/configbinder.py
3
# Copyright (C) 2009 Michal Hruby <michal.mhr@gmail.com> # Copyright (C) 2010 onox <denkpadje@gmail.com> # # This program 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 #...
khkaminska/bokeh
refs/heads/master
tests/integration/webserver.py
21
# 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...
8l/beri
refs/heads/master
cheritest/trunk/tests/cp2/test_cp2_x_cbtu_reg.py
1
#- # Copyright (c) 2013 Michael Roe # All rights reserved. # # This software was developed by SRI International and the University of # Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237 # ("CTSRD"), as part of the DARPA CRASH research programme. # # @BERI_LICENSE_HEADER_START@ # # Licensed to BER...
scrollback/kuma
refs/heads/master
vendor/packages/pyflakes/pyflakes/test/test_imports.py
6
from sys import version_info from pyflakes import messages as m from pyflakes.test import harness class Test(harness.Test): def test_unusedImport(self): self.flakes('import fu, bar', m.UnusedImport, m.UnusedImport) self.flakes('from baz import fu, bar', m.UnusedImport, m.UnusedImport) def t...
Electroscholars/P.E.E.R.S
refs/heads/master
MainWindowArrowTest/youtube_dl/extractor/cinchcast.py
21
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( unified_strdate, xpath_text, ) class CinchcastIE(InfoExtractor): _VALID_URL = r'https?://player\.cinchcast\.com/.*?assetId=(?P<id>[0-9]+)' _TEST = { # Actual test is run in generic,...
gerddie/nipype
refs/heads/master
nipype/algorithms/modelgen.py
7
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ The modelgen module provides classes for specifying designs for individual subject analysis of task-based fMRI experiments. In particular it also includes algorithms for generating regressors for sparse...
ns950/calibre
refs/heads/master
src/calibre/gui2/store/stores/sony_plugin.py
14
#!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:fdm=marker:ai from __future__ import (unicode_literals, division, absolute_import, print_function) store_version = 2 # Needed for dynamic plugin loading __license__ = 'GPL v3' __copyright__ = '2012, Kovid Goyal <kovid at ...
openstack/designate
refs/heads/master
designate/objects/rrdata_srv.py
1
# Copyright (c) 2014 Rackspace Hosting # 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 req...
vipul-sharma20/oh-mainline
refs/heads/master
vendor/packages/twisted/twisted/python/_inotify.py
18
# -*- test-case-name: twisted.internet.test.test_inotify -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Very low-level ctypes-based interface to Linux inotify(7). ctypes and a version of libc which supports inotify system calls are required. """ import ctypes import ctypes.util cl...
sander76/home-assistant
refs/heads/dev
homeassistant/components/cloudflare/__init__.py
3
"""Update the IP addresses of your Cloudflare DNS records.""" from __future__ import annotations from datetime import timedelta import logging from pycfdns import CloudflareUpdater from pycfdns.exceptions import ( CloudflareAuthenticationException, CloudflareConnectionException, CloudflareException, ) imp...
woggle/mesos-old
refs/heads/trunk
frameworks/hadoop-0.20.2/src/contrib/thriftfs/gen-py/hadoopfs/__init__.py
118
__all__ = ['ttypes', 'constants', 'ThriftHadoopFileSystem']
melodous/designate
refs/heads/stable/juno
designate/tests/test_storage/test_sqlalchemy.py
1
# Copyright 2012 Managed I.T. # # Author: Kiall Mac Innes <kiall@managedit.ie> # # 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 r...
zeldin/libsigrok
refs/heads/master
bindings/python/setup.py
11
## ## This file is part of the libsigrok project. ## ## Copyright (C) 2013 Martin Ling <martin-sigrok@earth.li> ## ## This program 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...
varlib1/servermall
refs/heads/master
rabbitmq/test_rabbitmq.py
4
# (C) Datadog, Inc. 2010-2016 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) # stdlib import sys import os # 3p import mock import requests from nose.plugins.attrib import attr import pika # project from checks import AgentCheck from tests.checks.common import AgentCheckTest CONFIG = { ...
rghe/ansible
refs/heads/devel
lib/ansible/modules/utilities/logic/include.py
39
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: Ansible Project # 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': ...
gangadhar-kadam/adb-erp
refs/heads/master
patches/may_2012/cs_server_readonly.py
6
from __future__ import unicode_literals def execute(): """Make server custom script readonly for system manager""" import webnotes.model.doc new_perms = [ { 'parent': 'Custom Script', 'parentfield': 'permissions', 'parenttype': 'DocType', 'role': 'System Manager', 'permlevel': 1, 'read': 1, ...
kenshay/ImageScripter
refs/heads/master
ProgramData/Android/ADB/platform-tools/systrace/catapult/telemetry/telemetry/core/memory_cache_http_server.py
7
# Copyright 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 BaseHTTPServer from collections import namedtuple import errno import gzip import mimetypes import os import SimpleHTTPServer import socket import Soc...
kool79/intellij-community
refs/heads/master
python/testData/inspections/importFromModuleStar/target.py
83
__all__ = ['shazam'] def shazam(): pass def xyzzy(): pass
WhireCrow/openwrt-mt7620
refs/heads/master
staging_dir/target-mipsel_r2_uClibc-0.9.33.2/usr/lib/python2.7/test/test_mimetypes.py
55
import mimetypes import StringIO import unittest import sys from test import test_support # Tell it we don't know about external files: mimetypes.knownfiles = [] mimetypes.inited = False mimetypes._default_mime_types() class MimeTypesTestCase(unittest.TestCase): def setUp(self): self.db = mimetypes.Mime...
chacoroot/planetary
refs/heads/master
addons/hw_scale/__init__.py
1894
# -*- 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...
resba/gnuradio
refs/heads/master
gnuradio-core/src/python/gnuradio/gr_xmlrunner.py
6
""" XML Test Runner for PyUnit """ # Written by Sebastian Rittau <srittau@jroger.in-berlin.de> and placed in # the Public Domain. With contributions by Paolo Borelli and others. # Added to GNU Radio Oct. 3, 2010 __version__ = "0.1" import os.path import re import sys import time import traceback import unittest from...
trtd/faker
refs/heads/master
faker/providers/date_time/__init__.py
2
# coding=utf-8 from __future__ import unicode_literals from datetime import timedelta import re from time import time, mktime from dateutil import relativedelta from dateutil.tz import tzlocal from faker.generator import random from faker.utils.datetime_safe import date, datetime, real_date, real_datetime from fake...
peter-jang/ansible
refs/heads/devel
lib/ansible/plugins/cache/memcached.py
31
# (c) 2014, Brian Coca, Josh Drake, et al # # 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. ...
gminds/rapidnewsng
refs/heads/master
django/contrib/sessions/backends/cache.py
92
from django.conf import settings from django.contrib.sessions.backends.base import SessionBase, CreateError from django.core.cache import get_cache from django.utils.six.moves import xrange KEY_PREFIX = "django.contrib.sessions.cache" class SessionStore(SessionBase): """ A cache-based session store. """ ...
tanyunshi/python-docx
refs/heads/master
docx/oxml/__init__.py
1
# encoding: utf-8 """ Initializes oxml sub-package, including registering custom element classes corresponding to Open XML elements. """ from __future__ import absolute_import from lxml import etree from .ns import NamespacePrefixedTag, nsmap # configure XML parser element_class_lookup = etree.ElementNamespaceCla...
ychen820/microblog
refs/heads/master
flask/lib/python2.7/site-packages/jinja2/testsuite/utils.py
415
# -*- coding: utf-8 -*- """ jinja2.testsuite.utils ~~~~~~~~~~~~~~~~~~~~~~ Tests utilities jinja uses. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import gc import unittest import pickle from jinja2.testsuite import JinjaTestCase from jinja2.utils imp...
asedunov/intellij-community
refs/heads/master
python/testData/inspections/PyUnresolvedReferencesInspection/typeAssertions.py
83
# PY-2308 def f(x): if isinstance(x, list): x = [] elif isinstance(x, dict): return x.items() #pass
c2corg/v6_api
refs/heads/master
c2corg_api/tests/views/test_document_delete.py
1
import datetime from c2corg_api.models.area import Area from c2corg_api.models.area_association import AreaAssociation from c2corg_api.models.article import Article, ArchiveArticle from c2corg_api.models.association import Association, AssociationLog from c2corg_api.models.book import Book, ArchiveBook from c2corg_api...
sassoftware/conary
refs/heads/master
conary/flavorcfg.py
1
# # Copyright (c) SAS Institute Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
julien78910/CouchPotatoServer
refs/heads/develop
libs/suds/reader.py
203
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will ...
danimo/qt-creator
refs/heads/master
tests/system/suite_editors/tst_qml_editor/test.py
4
############################################################################# ## ## Copyright (C) 2015 The Qt Company Ltd. ## Contact: http://www.qt.io/licensing ## ## This file is part of Qt Creator. ## ## Commercial License Usage ## Licensees holding valid commercial Qt licenses may use this file in ## accordance wit...
farm3r/ardupilot
refs/heads/master
Tools/autotest/jsb_sim/runsim.py
167
#!/usr/bin/env python # run a jsbsim model as a child process import sys, os, pexpect, socket import math, time, select, struct, signal, errno sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', 'pysim')) import util, atexit, fdpexpect from pymavlink import fgFDM class control_state(o...
zchking/odoo
refs/heads/8.0
addons/account_cancel/__init__.py
183
# -*- 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...
CTSRD-SOAAP/chromium-42.0.2311.135
refs/heads/master
chrome/browser/web_dev_style/regex_check.py
95
# Copyright 2014 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. def RegexCheck(re, line_number, line, regex, msg): """Searches for |regex| in |line| to check for a particular style violation, returning a message l...
WillGuan105/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 ...
oskopek/CryptoIM
refs/heads/master
tests/integration/TestXMPP.py
1
#!/usr/bin/env python # encoding: utf-8 """ Copyright 2014 CryptoIM Development Team 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 ...
ghosthamlet/bigcouch
refs/heads/master
couchjs/scons/scons-local-2.0.1/SCons/Tool/gas.py
61
"""SCons.Tool.gas Tool-specific initialization for as, the Gnu assembler. 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 SCon...
donkirkby/django
refs/heads/master
django/conf/locale/da/formats.py
504
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j. F Y' TIME_FORMAT = 'H:i' DATET...
albertshift/omim
refs/heads/master
3party/freetype/src/tools/docmaker/sources.py
65
# # sources.py # # Convert source code comments to multi-line blocks (library file). # # Copyright 2002-2015 by # David Turner. # # This file is part of the FreeType project, and may only be used, # modified, and distributed under the terms of the FreeType project # license, LICENSE.TXT. By continuing to use,...
GbalsaC/bitnamiP
refs/heads/master
venv/lib/python2.7/site-packages/moto/ec2/responses/placement_groups.py
3
from moto.core.responses import BaseResponse class PlacementGroups(BaseResponse): def create_placement_group(self): raise NotImplementedError('PlacementGroups.create_placement_group is not yet implemented') def delete_placement_group(self): raise NotImplementedError('PlacementGroups.delete_pl...
UstadMobile/exelearning-extjs5-mirror
refs/heads/master
twisted/plugin.py
16
# -*- test-case-name: twisted.test.test_plugin -*- # Copyright (c) 2005 Divmod, Inc. # See LICENSE for details. """ Plugin system for Twisted. @author: U{Jp Calderone<mailto:exarkun@twistedmatrix.com>} @author: U{Glyph Lefkowitz<mailto:glyph@twistedmatrix.com>} """ from __future__ import generators import os, errno...
jonnary/keystone
refs/heads/master
keystone/tests/unit/test_singular_plural.py
19
# Copyright 2012 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
mushtaqak/edx-platform
refs/heads/master
cms/djangoapps/contentstore/views/tests/test_entrance_exam.py
83
""" Test module for Entrance Exams AJAX callback handler workflows """ import json from mock import patch from django.conf import settings from django.contrib.auth.models import User from django.test.client import RequestFactory from contentstore.tests.utils import AjaxEnabledTestClient, CourseTestCase from contentst...
pwoodworth/intellij-community
refs/heads/master
python/testData/inspections/PyUnresolvedReferencesInspection/ConditionalImports/lib2.py
83
def f(x): return repr(x) def g(x): return str(x)
gr-vt/gr-signal_exciter
refs/heads/master
python/build_utils.py
252
# # Copyright 2004,2009,2012 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later ve...
wubaolin2009/yls_bishe
refs/heads/master
yls_app/migrations/0015_auto__add_field_goodsprocessedgroup_topic_distribution.py
1
# -*- 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 'GoodsProcessedGroup.topic_distribution' db.add_column(u'y...
rdowner/brooklyn-temperature-device
refs/heads/master
server.py
1
#!/usr/bin/env python # # Copyright 2015 Richard Downer # # 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...
eadgarchen/tensorflow
refs/heads/master
tensorflow/contrib/learn/python/learn/estimators/estimator.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...
dmazzella/micropython
refs/heads/master
tests/basics/list_index.py
110
a = [1, 2, 3] print(a.index(1)) print(a.index(2)) print(a.index(3)) print(a.index(3, 2)) print(a.index(1, -100)) print(a.index(1, False)) try: print(a.index(1, True)) except ValueError: print("Raised ValueError") else: print("Did not raise ValueError") try: print(a.index(3, 2, 2)) except ValueError: ...
sillywilly42/simian
refs/heads/master
src/tests/simian/mac/munki/__init__.py
1305
#!/usr/bin/env python
gerryhd/diabot-assistant
refs/heads/master
lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/exceptions.py
515
from __future__ import absolute_import # Base Exceptions class HTTPError(Exception): "Base exception used by this module." pass class HTTPWarning(Warning): "Base warning used by this module." pass class PoolError(HTTPError): "Base exception for errors caused within a pool." def __init__(se...
piquadrat/django
refs/heads/master
django/utils/jslex.py
104
"""JsLex: a lexer for Javascript""" # Originally from https://bitbucket.org/ned/jslex import re class Tok: """ A specification for a token class. """ num = 0 def __init__(self, name, regex, next=None): self.id = Tok.num Tok.num += 1 self.name = name self.regex = re...
margguo/python-ivi
refs/heads/master
ivi/agilent/agilentDSO7052B.py
7
""" Python Interchangeable Virtual Instrument Library Copyright (c) 2012-2014 Alex Forencich Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the...
afan1/rvi_backend
refs/heads/master
web/tracking/migrations/0001_initial.py
8
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('vehicles', '0003_auto_20141009_2054'), ] operations = [ migrations.CreateModel( name='Location', fie...
tanium/pytan
refs/heads/master
lib/taniumpy/object_types/action_stop.py
1
# Copyright (c) 2015 Tanium Inc # # Generated from console.wsdl version 0.0.1 # # from .base import BaseType class ActionStop(BaseType): _soap_tag = 'action_stop' def __init__(self): BaseType.__init__( self, simple_properties={'id': int}, complex_properties...
Bolinooo/Medusa
refs/heads/master
medusa/Checker.py
1
def get_amount(): """ Function to get amount of mails to sent """ while True: num = int(input("How many mails do you'd like to sent to your victim?: ")) if 0 < num < 2001: return num print("You've entered wrong amount of entries.")
ilyashrn/ilyashrn.github.io
refs/heads/master
node_modules/pygmentize-bundled/vendor/pygments/pygments/formatters/html.py
268
# -*- coding: utf-8 -*- """ pygments.formatters.html ~~~~~~~~~~~~~~~~~~~~~~~~ Formatter for HTML output. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import os import sys import os.path import StringIO from pygments.formatter impo...
pk-sam/crosswalk-test-suite
refs/heads/master
webapi/tct-xmlhttprequest-w3c-tests/inst.apk.py
903
#!/usr/bin/env python import os import shutil import glob import time import sys import subprocess from optparse import OptionParser, make_option SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) PARAMETERS = None ADB_CMD = "adb" def doCMD(cmd): # Do not need handle timeout in this short script, let tool...
gkumar7/AlGDock
refs/heads/master
Example/test_grid.py
2
import AlGDock.BindingPMF_plots import os, shutil, glob self = AlGDock.BindingPMF_plots.BPMF_plots(\ dir_dock='dock', dir_cool='cool',\ ligand_tarball='prmtopcrd/ligand.tar.gz', \ ligand_database='ligand.db', \ forcefield='prmtopcrd/gaff.dat', \ ligand_prmtop='ligand.prmtop', \ ligand_inpcrd='ligand.trans....
delighted/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/system/user.py
128
# Copyright (c) 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 of conditions and t...
eevee/cocos2d-mirror
refs/heads/master
test/test_audio_sdl_effect.py
1
# This code is so you can run the samples without installing the package import sys import os sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) # # this test is not adecuate for autotest, so no testinfo added tags = "audio SDL" import cocos from cocos.director import director from cocos.audio.effect i...
rzambre/servo
refs/heads/master
tests/wpt/web-platform-tests/service-workers/service-worker/resources/navigation-redirect-out-scope.py
330
def main(request, response): if "url" in request.GET: headers = [("Location", request.GET["url"])] return 302, headers, '' return [], ''' <!DOCTYPE html> <script> window.parent.postMessage( { id: 'last_url', result: location.href }, '*'); </script> '''
derDavidT/sympy
refs/heads/master
sympy/concrete/products.py
28
from __future__ import print_function, division from sympy.tensor.indexed import Idx from sympy.core.mul import Mul from sympy.core.singleton import S from sympy.concrete.expr_with_intlimits import ExprWithIntLimits from sympy.functions.elementary.exponential import exp, log from sympy.polys import quo, roots from sym...
benfinke/ns_python
refs/heads/master
build/lib/nssrc/com/citrix/netscaler/nitro/resource/config/vpn/vpnglobal_staserver_binding.py
3
# # Copyright (c) 2008-2015 Citrix 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.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
chrys87/fenrir
refs/heads/master
src/fenrirscreenreader/commands/commands/bookmark_5.py
1
#!/bin/python # -*- coding: utf-8 -*- # Fenrir TTY screen reader # By Chrys, Storm Dragon, and contributers. from fenrirscreenreader.core import debug from fenrirscreenreader.utils import mark_utils from fenrirscreenreader.utils import line_utils class command(): def __init__(self): self.ID = '5' def...
ucsb-cs8/ucsb-cs8.github.io
refs/heads/master
_ptopics/main_blocks/convert2.py
1
# convert2.py def kmToMiles(km): return km / 1.609344; if __name__=="__main__": print("10 km = ",kmToMiles(10)," miles")
jose36/plugin.video.Jmdl1
refs/heads/master
servers/uploaz.py
44
# -*- coding: utf-8 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Conector para uploaz # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import urlparse,urllib2,urllib,re import os from core import...
RobertWWong/WebDev
refs/heads/master
djangoApp/ENV/lib/python3.5/site-packages/django/contrib/admin/templatetags/admin_urls.py
136
from django import template from django.contrib.admin.utils import quote from django.urls import Resolver404, get_script_prefix, resolve from django.utils.http import urlencode from django.utils.six.moves.urllib.parse import parse_qsl, urlparse, urlunparse register = template.Library() @register.filter def admin_url...
sixuanwang/SAMSaaS
refs/heads/master
wirecloud-develop/src/build/lib.linux-x86_64-2.7/wirecloud/fp74caast/admin.py
5
# -*- coding: utf-8 -*- # Copyright (c) 2013 CoNWeT Lab., Universidad Politécnica de Madrid # This file is part of Wirecloud. # Wirecloud 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 versio...
andela-ifageyinbo/django
refs/heads/master
django/contrib/admindocs/__init__.py
807
default_app_config = 'django.contrib.admindocs.apps.AdminDocsConfig'
DD-L/deel.boost.python
refs/heads/master
origin/libs/python/test/extract.py
12
# Copyright David Abrahams 2004. 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) ''' >>> from extract_ext import * Just about anything has a truth value in Python >>> assert check_bool(None) >>>...
skoenig/urubu
refs/heads/master
urubu/tests/test_errors.py
1
import os from urubu import UrubuError, project from urubu.project import _error from urubu.tests import cd, raises_kind def test_undef_reflink_title(): with cd('undef_reflink_title'): with raises_kind(UrubuError, _error.undef_reflink_key): project.build() def test_undef_reflink_url(): wi...
openlabs/nereid-project
refs/heads/develop
tests/__init__.py
3
# -*- coding: utf-8 -*- """ __init__ Test Suite :copyright: (c) 2013-2014 by Openlabs Technologies & Consulting (P) Limited :license: BSD, see LICENSE for more details. """ from tests.test_views_depends import TestViewsDepends from tests.test_company import TestCompany from tests.test_project import T...
redhat-openstack/horizon
refs/heads/mitaka-patches
horizon/test/test_dashboards/dogs/puppies/panel.py
102
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
daoluan/decode-Django
refs/heads/master
Django-1.5.1/django/contrib/localflavor/nl/forms.py
100
""" NL-specific Form helpers """ from __future__ import absolute_import, unicode_literals import re from django.contrib.localflavor.nl.nl_provinces import PROVINCE_CHOICES from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import Field, Select from djang...
tersmitten/ansible
refs/heads/devel
lib/ansible/plugins/become/sesu.py
38
# -*- coding: utf-8 -*- # Copyright: (c) 2018, Ansible Project # 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 DOCUMENTATION = """ become: sesu short_description: CA Privileged A...
dannybrowne86/django-timepiece
refs/heads/develop
timepiece/entries/models.py
3
from dateutil.relativedelta import relativedelta from decimal import Decimal from django.contrib.auth.models import User from django.core import validators from django.core.exceptions import ValidationError from django.db import models from django.db.models import Q, Sum, Max, Min from django.utils import timezone fr...
shearichard/django-channels-demo
refs/heads/master
channels/channels/routing.py
1
from __future__ import unicode_literals import re import importlib from django.core.exceptions import ImproperlyConfigured from django.utils import six from .handler import ViewConsumer from .utils import name_that_thing class Router(object): """ Manages the available consumers in the project and which cha...
qifeigit/scikit-learn
refs/heads/master
examples/manifold/plot_manifold_sphere.py
258
#!/usr/bin/python # -*- coding: utf-8 -*- """ ============================================= Manifold Learning methods on a severed sphere ============================================= An application of the different :ref:`manifold` techniques on a spherical data-set. Here one can see the use of dimensionality reducti...
alzamer2/crunchy-xml-decoder
refs/heads/master
crunchy-xml-decoder/requests/packages/urllib3/exceptions.py
73
## Base Exceptions class HTTPError(Exception): "Base exception used by this module." pass class HTTPWarning(Warning): "Base warning used by this module." pass class PoolError(HTTPError): "Base exception for errors caused within a pool." def __init__(self, pool, message): self.pool ...
quartzmo/gcloud-ruby
refs/heads/master
google-cloud-asset/synth.py
1
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
Anlim/decode-Django
refs/heads/master
Django-1.5.1/django/contrib/gis/db/backends/spatialite/creation.py
100
import os from django.conf import settings from django.core.cache import get_cache from django.core.cache.backends.db import BaseDatabaseCache from django.core.exceptions import ImproperlyConfigured from django.db.backends.sqlite3.creation import DatabaseCreation class SpatiaLiteCreation(DatabaseCreation): def cr...
lucienfostier/gaffer
refs/heads/master
python/GafferTest/BoxOutTest.py
8
########################################################################## # # Copyright (c) 2017, Image Engine Design 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: # # * Redistrib...
valtech-mooc/edx-platform
refs/heads/master
lms/djangoapps/class_dashboard/urls.py
163
""" Class Dashboard API endpoint urls. """ from django.conf.urls import patterns, url from django.conf import settings COURSE_ID_PATTERN = settings.COURSE_ID_PATTERN urlpatterns = patterns( '', # Json request data for metrics for entire course url(r'^{}/all_sequential_open_distrib$'.format(settings.COURS...
lunafeng/django
refs/heads/master
django/contrib/sessions/backends/signed_cookies.py
383
from django.conf import settings from django.contrib.sessions.backends.base import SessionBase from django.core import signing class SessionStore(SessionBase): def load(self): """ We load the data from the key itself instead of fetching from some external data store. Opposite of _get_sess...
del680202/MachineLearning-memo
refs/heads/master
src/tensorflow/mnist.py
1
import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data # number 1 to 10 data mnist = input_data.read_data_sets('MNIST_data', one_hot=True) # Create the model xs = tf.placeholder(tf.float32, [None, 784]) W = tf.Variable(tf.zeros([784, 10])) b = tf.Variable(tf.zeros([10])) y = tf.matmul(xs, W...
Dhivyap/ansible
refs/heads/devel
test/units/modules/network/f5/test_bigip_dns_nameserver.py
22
# -*- 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...
JohnGriffiths/nipype
refs/heads/master
nipype/interfaces/io.py
6
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ Set of interfaces that allow interaction with data. Currently available interfaces are: DataSource: Generic nifti to named Nifti interface DataSink: Generic named output from interfaces to ...