repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
bohdan-shramko/learning-python
refs/heads/master
source/sublime-packages/Packages/PyV8/win64-p3/PyV8.py
22
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys, os, re import logging import collections is_py3k = sys.version_info[0] > 2 if is_py3k: import _thread as thread from io import StringIO str = str raw_input = input else: import _thread try: from io import StringIO except ImportErr...
umitproject/openmonitor-aggregator
refs/heads/master
autoload/middleware.py
132
from django.utils.importlib import import_module from django.conf import settings # load all models.py to ensure signal handling installation or index loading # of some apps for app in settings.INSTALLED_APPS: try: import_module('%s.models' % (app)) except ImportError: pass class AutoloadMidd...
pierricgimmig/orbitprofiler
refs/heads/headless
contrib/conan/recipes/llvm-common/llvmmodulepackage.py
1
from llvmpackage import LLVMPackage from conans import tools import os class LLVMModulePackage(LLVMPackage): version = LLVMPackage.version @property def _header_only(self): return getattr(self, 'header_only', False) def build_requirements(self): if not hasattr(self, 'llvm_component'):...
elaske/tsp-data
refs/heads/develop
html5lib/tests/support.py
450
from __future__ import absolute_import, division, unicode_literals import os import sys import codecs import glob import xml.sax.handler base_path = os.path.split(__file__)[0] test_dir = os.path.join(base_path, 'testdata') sys.path.insert(0, os.path.abspath(os.path.join(base_path, ...
lmazuel/ansible
refs/heads/devel
test/integration/targets/module_utils/module_utils/spam8/ham/__init__.py
298
eggs = 'spam8:eggs'
SymbiFlow/nextpnr
refs/heads/master
ice40/tmfuzz.py
2
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # ../nextpnr-ice40 --hx8k --tmfuzz > tmfuzz_hx8k.txt # ../nextpnr-ice40 --lp8k --tmfuzz > tmfuzz_lp8k.txt # ../nextpnr-ice40 --up5k --tmfuzz > tmfuzz_up5k.txt import numpy as np import matplotlib.pyplot as plt from collections import defaultdict device = "hx8k" # device ...
ryfeus/lambda-packs
refs/heads/master
Tensorflow_Pandas_Numpy/source3.6/tensorflow/contrib/linalg/python/ops/linear_operator_udvh_update.py
31
# 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...
mqtlam/dcgan-tfslim
refs/heads/master
image_ops.py
1
from math import sqrt, ceil from PIL import Image import numpy as np def center_crop(image, crop_size=None): """Center crop image. Args: image: PIL image crop_size: if specified, size of square to center crop otherwise, fit largest square to center of image Returns: ...
codecollision/DropboxToFlickr
refs/heads/master
django/utils/dates.py
488
"Commonly-used date structures" from django.utils.translation import ugettext_lazy as _, pgettext_lazy WEEKDAYS = { 0:_('Monday'), 1:_('Tuesday'), 2:_('Wednesday'), 3:_('Thursday'), 4:_('Friday'), 5:_('Saturday'), 6:_('Sunday') } WEEKDAYS_ABBR = { 0:_('Mon'), 1:_('Tue'), 2:_('Wed'), 3:_('Thu'), 4:_('Fri')...
ktnyt/chainer
refs/heads/master
chainer/distributions/gumbel.py
2
import numpy import chainer from chainer.backends import cuda from chainer import distribution from chainer.functions.math import exponential from chainer.functions.math import lgamma EULER = 0.57721566490153286060651209008240243104215933593992 class Gumbel(distribution.Distribution): """Gumbel Distribution. ...
sudheesh001/oh-mainline
refs/heads/master
mysite/profile/migrations/0022_asheesh_add_person_tag_link.py
17
# This file is part of OpenHatch. # Copyright (C) 2009 OpenHatch, Inc. # # This program 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 your option) any later v...
dursk/django
refs/heads/master
tests/null_fk_ordering/models.py
210
""" Regression tests for proper working of ForeignKey(null=True). Tests these bugs: * #7512: including a nullable foreign key reference in Meta ordering has un xpected results """ from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible ...
jollaman999/msm-mako-lollipop-mr1
refs/heads/f2fs
Documentation/target/tcm_mod_builder.py
4981
#!/usr/bin/python # The TCM v4 multi-protocol fabric module generation script for drivers/target/$NEW_MOD # # Copyright (c) 2010 Rising Tide Systems # Copyright (c) 2010 Linux-iSCSI.org # # Author: nab@kernel.org # import os, sys import subprocess as sub import string import re import optparse tcm_dir = "" fabric_ops...
ptisserand/portage
refs/heads/master
pym/portage/package/ebuild/_ipc/QueryCommand.py
12
# Copyright 2010-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 from __future__ import unicode_literals import io import portage from portage import os from portage.dep import Atom, _repo_name_re from portage.eapi import eapi_has_repo_deps from portage.elog import messages ...
synergeticsedx/deployment-wipro
refs/heads/oxa/master.fic
common/test/acceptance/tests/lms/test_lms_edxnotes.py
8
""" Test LMS Notes """ from unittest import skip import random from uuid import uuid4 from datetime import datetime from nose.plugins.attrib import attr from common.test.acceptance.tests.helpers import UniqueCourseTest, EventsTestMixin from common.test.acceptance.fixtures.course import CourseFixture, XBlockFixtureDesc ...
highweb-project/highweb-webcl-html5spec
refs/heads/highweb-20160310
third_party/jinja2/bccache.py
241
# -*- coding: utf-8 -*- """ jinja2.bccache ~~~~~~~~~~~~~~ This module implements the bytecode cache system Jinja is optionally using. This is useful if you have very complex template situations and the compiliation of all those templates slow down your application too much. Situations whe...
lebronhkh/pythondotorg
refs/heads/master
pages/tests/test_views.py
14
from .base import BasePageTests from django.contrib.sites.models import Site from django.contrib.redirects.models import Redirect class PageViewTests(BasePageTests): def test_page_view(self): r = self.client.get('/one/') self.assertEqual(r.context['page'], self.p1) # drafts are available...
Prasad9/incubator-mxnet
refs/heads/master
example/reinforcement-learning/parallel_actor_critic/model.py
24
# 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...
hnakamur/django
refs/heads/master
django/contrib/gis/forms/__init__.py
597
from django.forms import * # NOQA from .fields import ( # NOQA GeometryCollectionField, GeometryField, LineStringField, MultiLineStringField, MultiPointField, MultiPolygonField, PointField, PolygonField, ) from .widgets import BaseGeometryWidget, OpenLayersWidget, OSMWidget # NOQA
monetizeio/django-pgmp
refs/heads/master
django_pgmp/db/fields/mpz_test/models.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # === django_pgmp.db.fields.mpz_test.models -------------------------------=== # This file is part of django-pgpm. django-pgpm is copyright © 2012, RokuSigma # Inc. and contributors. See AUTHORS and LICENSE for more details. # # django-pgpm is free software: you can redist...
ecell/epdp_ecell4_impl_temporary
refs/heads/use-ecell4-namespace
test/NetworkRules_test.py
6
#!/usr/bin/env python import _gfrd import unittest class NetworkRulesTestCase(unittest.TestCase): def setUp(self): self.m = _gfrd.Model() self.s1 = _gfrd.SpeciesType() self.m.add_species_type(self.s1) self.s2 = _gfrd.SpeciesType() self.m.add_species_type(self.s2) def te...
stevenewey/wagtail
refs/heads/master
wagtail/wagtailcore/fields.py
5
from __future__ import absolute_import, unicode_literals import json from django.db import models from django import forms from django.core.serializers.json import DjangoJSONEncoder from django.utils.six import with_metaclass from wagtail.wagtailcore.rich_text import DbWhitelister, expand_db_html from wagtail.utils....
HLFH/CouchPotatoServer
refs/heads/develop
couchpotato/core/media/movie/providers/trailer/mechanize/_sockettimeout.py
149
import socket try: _GLOBAL_DEFAULT_TIMEOUT = socket._GLOBAL_DEFAULT_TIMEOUT except AttributeError: _GLOBAL_DEFAULT_TIMEOUT = object()
drexly/openhgsenti
refs/heads/master
lib/django/core/serializers/json.py
320
""" Serialize data to/from JSON """ # Avoid shadowing the standard library json module from __future__ import absolute_import, unicode_literals import datetime import decimal import json import sys import uuid from django.core.serializers.base import DeserializationError from django.core.serializers.python import ( ...
sodafree/backend
refs/heads/master
build/selenium/build/lib.linux-i686-2.7/selenium/webdriver/support/events.py
32
#!/usr/bin/python # # Copyright 2011 Software Freedom Conservancy. # # 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 ap...
durai145/youtube-dl
refs/heads/master
youtube_dl/extractor/footyroom.py
104
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor class FootyRoomIE(InfoExtractor): _VALID_URL = r'http://footyroom\.com/(?P<id>[^/]+)' _TESTS = [{ 'url': 'http://footyroom.com/schalke-04-0-2-real-madrid-2015-02/', 'info_dict': { 'id': 'scha...
estebanlazza/GestorDeMusicos
refs/heads/master
vendor/doctrine/orm/docs/en/_exts/configurationblock.py
2577
#Copyright (c) 2010 Fabien Potencier # #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal #in the Software without restriction, including without limitation the rights #to use, copy, modify, merge, publish, distrib...
romkij/client
refs/heads/master
vendor/doctrine/orm/docs/en/_exts/configurationblock.py
2577
#Copyright (c) 2010 Fabien Potencier # #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal #in the Software without restriction, including without limitation the rights #to use, copy, modify, merge, publish, distrib...
yufengg/tensorflow
refs/heads/master
tensorflow/python/debug/wrappers/dumping_wrapper.py
26
# 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...
pyconsk/django-konfera
refs/heads/master
konfera/tests/test_templatetags.py
2
from decimal import Decimal from django.test import TestCase from konfera.templatetags.custom_filters import currency, currency_code from konfera.settings import CURRENCY class TestCurrencyTag(TestCase): def setUp(self): self.value_empty_str = '' self.value_str = 'some string' self.value...
whaleygeek/hack-iotic-sensor
refs/heads/master
devroom.py
1
# devroom.py 26/08/2014 D.J.Whale import piduino from Copro import * import RPi.GPIO as GPIO import time import datetime import urllib2 #TODO deprecate # import IoticLabs.IOTConnector as IOT # CONFIGURATION ---------------------------------------------------------- LED = 11 # same pin as piduino D13, which is th...
Mobii/twilio-python
refs/heads/master
twilio/rest/resources/connection.py
48
from .imports import ( httplib2, socks, PROXY_TYPE_HTTP, PROXY_TYPE_SOCKS4, PROXY_TYPE_SOCKS5 ) class Connection(object): '''Class for setting proxy configuration to be used for REST calls.''' _proxy_info = None @classmethod def proxy_info(cls): '''Returns the currently-se...
spectralDNS/spectralDNS
refs/heads/master
spectralDNS/config.py
2
"""Parameters for the spectralDNS solvers The parameters are kept in dictionary 'params'. The values of this dictionary may be accessed as attributes, e.g., M = config.params.M does the same thing as M = config.params['M'] Generic parameters for all solvers:: precision (str) ('double', 'single'...
chrrrles/ansible-modules-extras
refs/heads/devel
clustering/consul.py
54
#!/usr/bin/python # # (c) 2015, Steve Gargan <steve.gargan@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...
jimi-c/ansible
refs/heads/devel
lib/ansible/modules/network/avi/avi_scheduler.py
20
#!/usr/bin/python # # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Eric Anderson (eanderson@avinetworks.com) # module_check: supported # # Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ANSIB...
antb/TPT----My-old-mod
refs/heads/master
src/python/stdlib/ctypes/test/test_keeprefs.py
80
from ctypes import * import unittest class SimpleTestCase(unittest.TestCase): def test_cint(self): x = c_int() self.assertEqual(x._objects, None) x.value = 42 self.assertEqual(x._objects, None) x = c_int(99) self.assertEqual(x._objects, None) def test_ccharp(sel...
MebiusHKU/flask-web
refs/heads/master
flask/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/utf8prober.py
2918
######################## 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...
baberthal/CouchPotatoServer
refs/heads/master
libs/suds/xsd/__init__.py
206
# 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 ...
rabipanda/tensorflow
refs/heads/master
tensorflow/python/kernel_tests/dense_update_ops_test.py
76
# Copyright 2015 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...
krisrogers/textisbeautiful
refs/heads/master
tib/wsgi.py
1
""" WSGI config for tib project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION`` sett...
matpalm/drivebot
refs/heads/master
src/reset_robot_pos.py
1
# various utils for dealing with reseting robots to a random position import rospy from geometry_msgs.msg import Pose2D from stdr_msgs.srv import MoveRobot import random import math class BotPosition(object): def __init__(self, robot_id): srv_str = "/robot%s/replace" % robot_id rospy.wait_for_serv...
julien78910/CouchPotatoServer
refs/heads/develop
libs/html5lib/treewalkers/pulldom.py
1729
from __future__ import absolute_import, division, unicode_literals from xml.dom.pulldom import START_ELEMENT, END_ELEMENT, \ COMMENT, IGNORABLE_WHITESPACE, CHARACTERS from . import _base from ..constants import voidElements class TreeWalker(_base.TreeWalker): def __iter__(self): ignore_until = None...
Alshain-Oy/Cloudsnake-Application-Server
refs/heads/master
clients/get_info.py
1
#!/usr/bin/env python # Cloudsnake Application server # Licensed under Apache License, see license.txt # Author: Markus Gronholm <markus@alshain.fi> Alshain Oy import libCloudSnakeClient as SnakeClient import pprint client = SnakeClient.CloudSnakeClient( 'http://localhost:8500', 'maintenance' ) get_report = clien...
chrisseto/waterbutler
refs/heads/develop
waterbutler/providers/github/settings.py
6
try: from waterbutler import settings except ImportError: settings = {} config = settings.get('GITHUB_PROVIDER_CONFIG', {}) BASE_URL = config.get('BASE_URL', 'https://api.github.com/') VIEW_URL = config.get('VIEW_URL', 'https://github.com/') MOVE_MESSAGE = config.get('MOVE_MESSAGE', 'Moved on behalf of Wate...
bholmgren/napalm-eos
refs/heads/master
setup.py
2
"""setup.py file.""" import uuid from setuptools import setup, find_packages from pip.req import parse_requirements __author__ = 'David Barroso <dbarrosop@dravetech.com>' install_reqs = parse_requirements('requirements.txt', session=uuid.uuid1()) reqs = [str(ir.req) for ir in install_reqs] setup( name="napalm-...
r8o8s1e0/three.js
refs/heads/master
utils/exporters/blender/addons/io_three/exporter/api/material.py
55
from bpy import data, types from .. import constants, logger from .constants import MULTIPLY, WIRE, IMAGE def _material(func): """ :param func: """ def inner(name, *args, **kwargs): """ :param name: :param *args: :param **kwargs: """ if isinstance(...
dhermes/foreign-fortran
refs/heads/master
cython/check_cython.py
1
from __future__ import print_function import numpy as np from check_ctypes import MAKE_UDF_TEMPLATE from check_ctypes import SEPARATOR import example def main(): print(SEPARATOR) # foo() bar = 1.0 baz = 16.0 quux = example.foo(bar, baz) print("quux = foo({}, {}) = {}".format(bar, baz, quux))...
eesatfan/vuplus-enigma2
refs/heads/vuplus_experimental
lib/python/Plugins/SystemPlugins/FactoryTest/plugin.py
2
from Screens.Screen import Screen from Screens.MessageBox import MessageBox from Plugins.Plugin import PluginDescriptor from Components.MenuList import MenuList from Tools.Directories import fileExists from Components.ServiceList import ServiceList from Components.ActionMap import ActionMap,NumberActionMap from Compone...
rjschwei/azure-sdk-for-python
refs/heads/master
azure-mgmt-network/azure/mgmt/network/models/load_balancing_rule.py
1
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
abhitopia/tensorflow
refs/heads/master
tensorflow/python/platform/flags.py
85
# Copyright 2015 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...
mahendra-r/edx-platform
refs/heads/master
lms/djangoapps/shoppingcart/exceptions.py
191
""" Exceptions for the shoppingcart app """ # (Exception Class Names are sort of self-explanatory, so skipping docstring requirement) # pylint: disable=missing-docstring class PaymentException(Exception): pass class PurchasedCallbackException(PaymentException): pass class InvalidCartItem(PaymentException)...
CristianBB/SickRage
refs/heads/develop
lib/unidecode/x06c.py
252
data = ( 'Lu ', # 0x00 'Mu ', # 0x01 'Li ', # 0x02 'Tong ', # 0x03 'Rong ', # 0x04 'Chang ', # 0x05 'Pu ', # 0x06 'Luo ', # 0x07 'Zhan ', # 0x08 'Sao ', # 0x09 'Zhan ', # 0x0a 'Meng ', # 0x0b 'Luo ', # 0x0c 'Qu ', # 0x0d 'Die ', # 0x0e 'Shi ', # 0x0f 'Di ', # 0x10 'Min...
RCOS-Grading-Server/HWserver
refs/heads/master
migration/migrator/migrations/course/20190110000000_course_materials_owner.py
2
import os import grp from pathlib import Path def up(config, conn, semester, course): course_dir = Path(config.submitty['submitty_data_dir'], 'courses', semester, course) uploads_dir = Path(course_dir, 'uploads') php_user = config.submitty_users['php_user'] # set the owner os.system("chown "+php...
COSMOGRAIL/PyCS
refs/heads/master
demo/demo1/1_import.py
1
# In this first script we "import" the data, in this case from a simple text file with # headers (other formats are also supported, see doc) import pycs rdbfile = "data/trialcurves.txt" lcs = [ pycs.gen.lc.rdbimport(rdbfile, 'A', 'mag_A', 'magerr_A', "Trial"), pycs.gen.lc.rdbimport(rdbfile, 'B', 'mag_B', 'magerr_B...
xforce/diorama-native-modding
refs/heads/master
tools/gyp/test/mac/gyptest-app-assets-catalog.py
61
#!/usr/bin/env python # 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. """ Verifies that app bundles are built correctly. """ import TestGyp import TestMac import os import plistlib import subprocess import sy...
vnsofthe/odoo
refs/heads/8.0
openerp/addons/base/module/report/__init__.py
463
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
plotly/python-api
refs/heads/master
packages/python/plotly/plotly/validators/histogram2d/hoverlabel/font/_size.py
1
import _plotly_utils.basevalidators class SizeValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="size", parent_name="histogram2d.hoverlabel.font", **kwargs ): super(SizeValidator, self).__init__( plotly_name=plotly_name, parent_nam...
giovaroma/bootstrap4
refs/heads/master
node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py
1509
# Copyright (c) 2013 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Handle version information related to Visual Stuio.""" import errno import os import re import subprocess import sys import gyp import glob class VisualStudi...
jiadaizhao/LeetCode
refs/heads/master
0301-0400/0363-Max Sum of Rectangle No Larger Than K/0363-Max Sum of Rectangle No Larger Than K.py
1
import bisect import math class Solution: def maxSumSubmatrix(self, matrix: 'List[List[int]]', k: 'int') -> 'int': m = len(matrix) n = len(matrix[0]) maxSum = -math.inf for l in range(n): sums = [0] * m for r in range(l, n): table = [0] ...
Dyrcona/asciidoc
refs/heads/master
filters/music/music2png.py
24
#!/usr/bin/env python ''' NAME music2png - Converts textual music notation to classically notated PNG file SYNOPSIS music2png [options] INFILE DESCRIPTION This filter reads LilyPond or ABC music notation text from the input file INFILE (or stdin if INFILE is -), converts it to classical music notation...
phenoxim/cinder
refs/heads/master
cinder/policies/qos_specs.py
5
# Copyright (c) 2017 Huawei Technologies Co., Ltd. # 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 # # ...
aspidites/django
refs/heads/master
tests/i18n/tests.py
113
# -*- encoding: utf-8 -*- from __future__ import unicode_literals import datetime import decimal import gettext as gettext_module import os import pickle from contextlib import contextmanager from importlib import import_module from threading import local from unittest import skipUnless from django import forms from ...
wkentaro/conque.vim
refs/heads/master
autoload/conque_term/conque_sole.py
30
# FILE: autoload/conque_term/conque_sole.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 hereby gran...
theonion/django-bulbs
refs/heads/master
bulbs/cms_notifications/south_migrations/__init__.py
4
__author__ = 'andrewkos'
robovm/robovm-studio
refs/heads/master
python/testData/refactoring/introduceConstant/suggestUniqueNames.py
83
S = True STR = True "<caret>"
MorganBauer/gcjcupcake
refs/heads/master
commands/gcj_cupcake/ZipUtils.py
1
# -*- coding: utf-8 -*- # # GCJ Cupcake by jbernadas # Copyright (C) 2010 Jorge Bernadas (jbernadas@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 3 of the License...
Impactstory/total-impact-core
refs/heads/master
extras/functional_tests/providers_test_proxy.py
2
#!/usr/bin/env python # # Providers Test Proxy # # This is a very basic webserver which can be used to simluate commuicating # providers. It performs basic response replay for known data items. Response # data is stored in test/data/<provider> # from SimpleHTTPServer import SimpleHTTPRequestHandler from BaseHTTPServer...
repotvsupertuga/tvsupertuga.repository
refs/heads/master
instal/script.module.resolveurl/lib/resolveurl/plugins/thevid.py
2
""" Copyright (C) 2017 tknorris 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 License, or (at your option) any later version. This program is distri...
axbaretto/beam
refs/heads/master
sdks/python/.tox/docs/lib/python2.7/site-packages/google/protobuf/internal/descriptor_test.py
37
#! /usr/bin/env python # # Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions ...
mehulsbhatt/nsscache
refs/heads/master
nss_cache/config_test.py
2
# Copyright 2007 Google Inc. # # 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 (at your option) any later version. # # This program is distributed in the ho...
geekboxzone/mmallow_prebuilts_gcc_darwin-x86_aarch64_aarch64-linux-android-4.9
refs/heads/geekbox
share/gdb/python/gdb/printing.py
75
# Pretty-printer utilities. # Copyright (C) 2010-2014 Free Software Foundation, Inc. # 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 License, or # (at your option) any l...
MichaelDoyle/Diamond
refs/heads/master
src/collectors/ip/ip.py
3
# coding=utf-8 """ The IPCollector class collects metrics on IP stats #### Dependencies * /proc/net/snmp #### Allowed Metric Names <table> <tr><th>Name</th></tr> <tr><th>InAddrErrors</th></tr> <tr><th>InDelivers</th></tr> <tr><th>InDiscards</th></tr> <tr><th>InHdrErrors</th></tr> <tr><th>InReceives</th></tr> <tr><...
tjanez/ansible
refs/heads/devel
lib/ansible/modules/files/patch.py
22
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Luis Alberto Perez Lazaro <luisperlazaro@gmail.com> # (c) 2015, Jakub Jirutka <jakub@jirutka.cz> # # 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...
heronotears/devops-sso
refs/heads/master
adapter/sqlite.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- import math import sqlite3 import config from .base import BaseAdapter, Cache class SqliteAdapter(BaseAdapter): def __init__(self): super(SqliteAdapter, self).__init__() self.connect() def connect(self): self.conn = sqlite3.connect(con...
mitsuhiko/django
refs/heads/master
django/contrib/auth/models.py
2
import datetime import hashlib import urllib from django.contrib import auth from django.contrib.auth.signals import user_logged_in from django.core.exceptions import ImproperlyConfigured from django.db import models from django.db.models.manager import EmptyManager from django.contrib.contenttypes.models import Conte...
jocelynj/weboob
refs/heads/soge
weboob/applications/weboorrents/weboorrents.py
1
# -*- coding: utf-8 -*- # Copyright(C) 2010 Romain Bignon # # 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, version 3 of the License. # # This program is distributed in the hope that it will b...
JensRantil/cligh
refs/heads/master
setup.py
1
#!/usr/bin/env python from distutils.core import setup setup( name='cligh', version='0.1', description='Command-line interface to GitHub', author='Christopher M. Brannon', author_email='cmbrannon79@gmail.com', license='BSD', packages=['cligh'], scripts=['bin/cligh'])
bealdav/OCB
refs/heads/patch-1
addons/mrp_repair/__openerp__.py
55
# -*- 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...
CJ-Jewell/ThinkStats2
refs/heads/master
code/relay.py
68
"""This file contains code used in "Think Stats", by Allen B. Downey, available from greenteapress.com Copyright 2014 Allen B. Downey License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html """ from __future__ import print_function, division import numpy as np import thinkplot import thinkstats2 """ Sample line. ...
rhdedgar/openshift-tools
refs/heads/stg
openshift/installer/vendored/openshift-ansible-3.5.127/roles/lib_openshift/library/oc_serviceaccount_secret.py
12
#!/usr/bin/env python # pylint: disable=missing-docstring # flake8: noqa: T001 # ___ ___ _ _ ___ ___ _ _____ ___ ___ # / __| __| \| | __| _ \ /_\_ _| __| \ # | (_ | _|| .` | _|| / / _ \| | | _|| |) | # \___|___|_|\_|___|_|_\/_/_\_\_|_|___|___/_ _____ # | \ / _ \ | \| |/ _ \_ _| | __| \_ ...
C00kiie/Youtube-Mp3-telegram-bot
refs/heads/master
youtube_dl/extractor/polskieradio.py
50
# coding: utf-8 from __future__ import unicode_literals import itertools import re from .common import InfoExtractor from ..compat import ( compat_str, compat_urllib_parse_unquote, compat_urlparse ) from ..utils import ( extract_attributes, int_or_none, strip_or_none, unified_timestamp, ) ...
waseem18/oh-mainline
refs/heads/master
vendor/packages/scrapy/scrapy/conf.py
19
""" Scrapy settings manager See documentation in docs/topics/settings.rst """ import os import cPickle as pickle from scrapy.settings import CrawlerSettings from scrapy.utils.conf import init_env ENVVAR = 'SCRAPY_SETTINGS_MODULE' def get_project_settings(): if ENVVAR not in os.environ: project = os.env...
saquiba2/numpy2
refs/heads/master
numpy/distutils/command/__init__.py
264
"""distutils.command Package containing implementation of all the standard Distutils commands. """ from __future__ import division, absolute_import, print_function def test_na_writable_attributes_deletion(): a = np.NA(2) attr = ['payload', 'dtype'] for s in attr: assert_raises(AttributeError, de...
Seichis/seldon-server
refs/heads/master
external/predictor/python/template/example_predict.py
10
def init(config): # do any initialisation needed here print "initialised" def get_predictions(client,json): # take json, convert to format needed and return list of 3-tuples of (score,classId,confidence) return [(1.0,1,0.9)]
netsuileo/sfu-cluster-dashboard
refs/heads/master
dashboard/app/user/admin.py
1
from django.contrib import admin from models import UserProfile admin.site.register(UserProfile)
CumulusNetworks/netshow-cumulus-lib
refs/heads/master
tests/test_netshowlib/test_cache.py
1
# disable docstring checking # pylint: disable=C0111 # disable checking no-self-use # pylint: disable=R0201 # pylint: disable=W0212 # pylint: disable=W0201 # pylint: disable=F0401 from netshowlib.cumulus import cache as cumulus_cache import mock from asserts import assert_equals, mock_open_str, mod_args_generator from ...
sunny414/tryton-client
refs/heads/master
tryton/gui/window/view_form/view/graph_gtk/parser.py
1
#This file is part of Tryton. The COPYRIGHT file at the top level of #this repository contains the full copyright notices and license terms. from tryton.gui.window.view_form.view.interface import ParserInterface import tryton.common as common import gtk from bar import VerticalBar, HorizontalBar from line import Line ...
huor/incubator-hawq
refs/heads/master
tools/bin/pythonSrc/pychecker-0.8.18/test_input/test35.py
11
__pychecker__ = '--no-namedargs --no-import --no-var --no-privatevar --no-moduledoc --funcdoc' import re _NOT_USED1 = None NOT_USED2 = None def x(a, b) : pass def y(): x(b=1, a=2)
mglukhikh/intellij-community
refs/heads/master
python/testData/refactoring/introduceVariable/multiReference.after.py
83
P = {'a': 0} M = [42] a_ = P['a'] M[a_] += 1
Maspear/odoo
refs/heads/8.0
addons/board/controllers.py
348
# -*- coding: utf-8 -*- from xml.etree import ElementTree from openerp.addons.web.controllers.main import load_actions_from_ir_values from openerp.http import Controller, route, request class Board(Controller): @route('/board/add_to_dashboard', type='json', auth='user') def add_to_dashboard(self, menu_id, act...
eneldoserrata/marcos_openerp
refs/heads/master
oemedical/oemedical_emr/models/oemedical_patient.py
3
# -*- coding: utf-8 -*- #/############################################################################# # # Tech-Receptives Solutions Pvt. Ltd. # Copyright (C) 2004-TODAY Tech-Receptives(<http://www.techreceptives.com>) # Special Credit and Thanks to Thymbra Latinoamericana S.A. # # This program is free sof...
wscullin/spack
refs/heads/qmcpack
var/spack/repos/builtin/packages/zip/package.py
3
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
Rjtsahu/School-Bus-Tracking
refs/heads/restructure
BusTrack/repository/main.py
1
from BusTrack.repository import Base from BusTrack.repository import engine # import all relevant db models here. from BusTrack.repository.models.Bus import Bus from BusTrack.repository.models.UserType import UserType from BusTrack.repository.models.User import User from BusTrack.repository.models.UserLogin import Use...
GunnerJnr/_CodeInstitute
refs/heads/master
Stream-3/Full-Stack-Development/19.Djangos-Testing-Framework/4.How-To-Test-Models/we_are_social/threads/migrations/0001_initial.py
19
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-09-08 09:18 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone import tinymce.models class Migration(migrations.Migration): in...
antinet/cjdns
refs/heads/master
node_build/dependencies/libuv/build/gyp/test/hard_dependency/gyptest-exported-hard-dependency.py
350
#!/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. """ Verify that a hard_dependency that is exported is pulled in as a dependency for a target if the target is a static library and if the ge...
ProfessionalIT/professionalit-webiste
refs/heads/master
sdk/google_appengine/lib/django-1.5/django/contrib/messages/api.py
321
from django.contrib.messages import constants from django.contrib.messages.storage import default_storage __all__ = ( 'add_message', 'get_messages', 'get_level', 'set_level', 'debug', 'info', 'success', 'warning', 'error', ) class MessageFailure(Exception): pass def add_message(request, level, mess...
vmora/QGIS
refs/heads/master
python/plugins/processing/algs/qgis/ServiceAreaFromPoint.py
4
# -*- coding: utf-8 -*- """ *************************************************************************** ServiceAreaFromPoint.py --------------------- Date : December 2016 Copyright : (C) 2016 by Alexander Bruy Email : alexander dot bruy at gmail dot com ***...
atosorigin/ansible
refs/heads/devel
test/support/integration/plugins/modules/x509_crl_info.py
36
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2020, Felix Fontein <felix@fontein.de> # 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': ...
datawire/ambassador
refs/heads/master
python/ambassador/ir/iripallowdeny.py
1
from typing import ClassVar, Dict, List, Optional, Tuple, TYPE_CHECKING from typing import cast as typecast from ..config import Config from ..envoy.v2.v2cidrrange import CIDRRange from .irresource import IRResource from .irfilter import IRFilter if TYPE_CHECKING: from .ir import IR # pragma: no cover class IR...
bonewell/sdl_core
refs/heads/master
src/3rd_party-static/gmock-1.7.0/gtest/test/gtest_help_test.py
2968
#!/usr/bin/env python # # Copyright 2009, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...