repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
ammarkhann/FinalSeniorCode
refs/heads/master
lib/python2.7/site-packages/django/views/generic/list.py
471
from __future__ import unicode_literals from django.core.exceptions import ImproperlyConfigured from django.core.paginator import InvalidPage, Paginator from django.db.models.query import QuerySet from django.http import Http404 from django.utils import six from django.utils.translation import ugettext as _ from djang...
cevap/ion
refs/heads/master
build_msvc/msvc-autogen.py
2
#!/usr/bin/env python3 import os import re SOURCE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'src')) libs = [ 'libion_cli', 'libion_common', 'libion_crypto', 'libion_server', 'libion_util', 'libion_wallet', 'libion_zmq', ] ignore_list = [ ] lib_sources = {} de...
WillisXChen/django-oscar
refs/heads/master
oscar/lib/python2.7/site-packages/docutils/parsers/rst/languages/ja.py
128
# -*- coding: utf-8 -*- # $Id: ja.py 7119 2011-09-02 13:00:23Z milde $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. # New language mappings are welcome. Before doing a new translation, please # read <http://docutils.sf.net/docs/howto/i18n.html>. Two file...
gpfreitas/bokeh
refs/heads/master
bokeh/models/callbacks.py
4
""" Client-side interactivity. """ from __future__ import absolute_import from ..plot_object import PlotObject from ..properties import abstract from ..properties import Dict, Instance, String, Enum from ..enums import ScriptingLanguage @abstract class Callback(PlotObject): """ Base class for interactive callbac...
kaushik94/boto
refs/heads/develop
boto/vpc/subnet.py
168
# Copyright (c) 2009-2010 Mitch Garnaat http://garnaat.org/ # # 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, modi...
saumishr/django
refs/heads/master
django/contrib/contenttypes/__init__.py
12133432
macks22/scikit-learn
refs/heads/master
examples/exercises/plot_cv_digits.py
232
""" ============================================= Cross-validation on Digits Dataset Exercise ============================================= A tutorial exercise using Cross-validation with an SVM on the Digits dataset. This exercise is used in the :ref:`cv_generators_tut` part of the :ref:`model_selection_tut` section...
aral/isvat
refs/heads/master
django/conf/locale/ka/formats.py
106
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'l, j F, Y' TIME_FORMAT = 'h:i:s a' DATETIME_FORMAT = 'j F, Y h:i:s a' YEA...
gvangool/django-extensions
refs/heads/master
django_extensions/management/commands/clear_cache.py
65
# -*- coding: utf-8 -*- # Author: AxiaCore S.A.S. http://axiacore.com from django.core.cache import cache from django.core.management.base import BaseCommand from django_extensions.management.utils import signalcommand class Command(BaseCommand): """A simple management command which clears the site-wide cache.""...
horkko/biomaj-postgres
refs/heads/master
biomaj/download/direct.py
1
from future import standard_library standard_library.install_aliases() from builtins import str import datetime import logging import pycurl import io import os import re import urllib.request, urllib.parse, urllib.error import hashlib from biomaj.download.interface import DownloadInterface from biomaj.download.ftp im...
dongjoon-hyun/tensorflow
refs/heads/master
tensorflow/contrib/quantize/python/quantize.py
3
# Copyright 2017 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...
grantsewell/nzbToMedia
refs/heads/master
libs/unidecode/x073.py
252
data = ( 'Sha ', # 0x00 'Li ', # 0x01 'Han ', # 0x02 'Xian ', # 0x03 'Jing ', # 0x04 'Pai ', # 0x05 'Fei ', # 0x06 'Yao ', # 0x07 'Ba ', # 0x08 'Qi ', # 0x09 'Ni ', # 0x0a 'Biao ', # 0x0b 'Yin ', # 0x0c 'Lai ', # 0x0d 'Xi ', # 0x0e 'Jian ', # 0x0f 'Qiang ', # 0x10 'Kun...
iTaa/soja_box
refs/heads/master
upload_api/soja_find.py
1
import fnmatch import os def find_files(path, types): """ Find files from path with types :param path: Where you will find. :param types: Which types you will find. :return: files """ matches = [] for root, dirnames, filenames in os.walk(path): for extensions in types: ...
mbauskar/helpdesk-erpnext
refs/heads/master
erpnext/patches/v4_0/rename_sitemap_to_route.py
88
from __future__ import unicode_literals import frappe import frappe.model def execute(): frappe.reload_doc("setup", "doctype", "item_group") frappe.reload_doc("stock", "doctype", "item") frappe.reload_doc("setup", "doctype", "sales_partner") try: frappe.model.rename_field("Item Group", "parent_website_sitemap"...
felipenaselva/felipe.repository
refs/heads/master
plugin.video.streamhub/resources/lib/sources/en/bobby.py
9
# -*- coding: utf-8 -*- ''' Covenant Add-on 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 prog...
fujita-shintaro/readthedocs.org
refs/heads/master
readthedocs/settings/sqlite.py
29
import os from .base import * # noqa DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(SITE_ROOT, 'dev.db'), } } REDIS = { 'host': 'localhost', 'port': 6379, 'db': 0, } BROKER_URL = 'redis://localhost:6379/0' CELERY_RESULT_BACKEND = 'redis:/...
MissionCriticalCloud/marvin
refs/heads/master
marvin/cloudstackAPI/updateAccount.py
1
"""Updates account information for the authenticated user""" from baseCmd import * from baseResponse import * class updateAccountCmd (baseCmd): typeInfo = {} def __init__(self): self.isAsync = "false" """new name for the account""" """Required""" self.newname = None se...
lokeshh/stem
refs/heads/run_tests.py_fix
test/unit/tutorial_examples.py
2
""" Tests for the examples given in stem's tutorial. """ import itertools import unittest try: from StringIO import StringIO except ImportError: from io import StringIO import stem.response import stem.descriptor.remote from stem import str_type from stem.control import Controller from stem.descriptor.remote im...
lcharleux/numerical_analysis
refs/heads/master
doc/Traitement_signal/Example_code/temp/exemple_aliasing.py
2
# listings/exemple_aliasing.py from matplotlib import pyplot as plt from math import sin, pi from signal_sinusoidal import signal_sinusoidal as signal from numpy import arange, floor beaucoup = 1000 f = 1. # Frequence du signal D = 2./f # Duree d'observation t_min = 0. # Debut du calcul du signal t_max = t_min+D # Fin ...
youtube/spitfire
refs/heads/master
spitfire/runtime/filters.py
3
# Copyright 2008 The Spitfire Authors. All Rights Reserved. # # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. # a few helpful filter functions import functools import types from spitfire import runtime from spitfire.runtime import udn # decorate a function objec...
aoakeson/home-assistant
refs/heads/dev
homeassistant/components/light/insteon_hub.py
5
""" Support for Insteon Hub lights. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/insteon_hub/ """ from homeassistant.components.insteon_hub import INSTEON, InsteonToggleDevice def setup_platform(hass, config, add_devices, discovery_info=None): ""...
ahmadassaf/zulip
refs/heads/master
confirmation/views.py
31
# -*- coding: utf-8 -*- # Copyright: (c) 2008, Jarek Zgoda <jarek.zgoda@gmail.com> __revision__ = '$Id: views.py 21 2008-12-05 09:21:03Z jarek.zgoda $' from django.shortcuts import render_to_response from django.template import RequestContext from django.conf import settings from django.http import HttpRequest, Htt...
saxix/django-excel-data-sync
refs/heads/develop
tests/example/example/management/__init__.py
6
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import logging logger = logging.getLogger(__name__)
agarciamontoro/root
refs/heads/master
tutorials/tmva/keras/ClassificationKeras.py
20
#!/usr/bin/env python from ROOT import TMVA, TFile, TTree, TCut from subprocess import call from os.path import isfile from keras.models import Sequential from keras.layers.core import Dense, Activation from keras.regularizers import l2 from keras import initializations from keras.optimizers import SGD # Setup TMVA ...
jmhutch/dotvim
refs/heads/master
vim/autoload/conque_term/conque_subprocess.py
30
# FILE: autoload/conque_term/conque_subprocess.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 hereb...
pmarques/ansible
refs/heads/devel
test/integration/targets/collections/collection_root_user/ansible_collections/testns/testcoll/plugins/modules/module_subdir/subdir_ping_module.py
66
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) __metaclass__ = type import json def main(): print(json.dumps(dict(changed=False, source='user'))) if __name__ == '__main__': main()
titansgroup/python-phonenumbers
refs/heads/dev
python/phonenumbers/data/region_TW.py
11
"""Auto-generated file, do not edit by hand. TW metadata""" from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata PHONE_METADATA_TW = PhoneMetadata(id='TW', country_code=886, international_prefix='0(?:0[25679]|19)', general_desc=PhoneNumberDesc(national_number_pattern='[2-689]\\d{7,8}|7\\d{7,9}'...
akamel001/Sick-Beard
refs/heads/master
lib/imdb/locale/msgfmt.py
6
#!/usr/bin/env python2 # -*- coding: iso-8859-1 -*- """Generate binary message catalog from textual translation description. This program converts a textual Uniforum-style message catalog (.po file) into a binary GNU catalog (.mo file). This is essentially the same function as the GNU msgfmt program, however, it is a...
robin1885/algorithms-exercises-using-python
refs/heads/master
source-code-from-author-book/Listings-for-Second-Edition/listing_6_31.py
1
else: # this node has one child if currentNode.hasLeftChild(): if currentNode.isLeftChild(): currentNode.leftChild.parent = currentNode.parent currentNode.parent.leftChild = currentNode.leftChild elif currentNode.isRightChild(): currentNode.leftChild.parent = currentNode.pare...
lebauce/edeploy
refs/heads/master
tools/cardiff/utils.py
1
import fnmatch import math import os class Levels: INFO = 1 << 0 WARNING = 1 << 1 ERROR = 1 << 2 SUMMARY = 1 << 3 DETAIL = 1 << 4 message = {INFO: 'INFO', WARNING: 'WARNING', ERROR: 'ERROR', SUMMARY: 'SUMMARY', DETAIL: 'DETAIL'} # Default level is to print every...
sixtomay/react-native
refs/heads/master
JSCLegacyProfiler/smap.py
375
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals """ adapted from https://github.com/martine/python-sourcemap into a reuasable module """ """ Apache License ...
lucashmorais/x-Bench
refs/heads/master
mozmill-env/linux/python-lib/mozinfo/__init__.py
72
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. """ interface to transform introspected system information to a format palatable to Mozilla Module variables: .. attri...
caisq/tensorflow
refs/heads/master
tensorflow/python/kernel_tests/reduction_ops_test_big.py
20
# 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...
scrollback/kuma
refs/heads/master
vendor/packages/ipython/IPython/history.py
7
# -*- coding: utf-8 -*- """ History related magics and functionality """ # Stdlib imports import fnmatch import os # IPython imports from IPython.genutils import Term, ask_yes_no, warn import IPython.ipapi def magic_history(self, parameter_s = ''): """Print input history (_i<n> variables), with most recent last....
oskopek/carcv
refs/heads/master
carcv-cpp/python_ocr_alpr/OCRtrain.py
2
''' /* * Copyright 2012 CarCV 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 * * Unless required by applicable law or...
robertvi/rjv
refs/heads/master
compare_map_lgs.py
1
#!/usr/bin/python ''' count how many markers have changed linkage group requires a file giving the old and new LG numbers ''' import sys usage=\ ''' usage: compare_map_lgs.py csv_file csv_file lg_numbers ''' if len(sys.argv) != 4: print usage exit() file1 = sys.argv[1] file2 = sys.argv[2] numbs = sys.a...
florianjacob/pelican-plugins
refs/heads/master
liquid_tags/b64img.py
312
""" Image Tag --------- This implements a Liquid-style image tag for Pelican, based on the liquid img tag which is based on the octopress image tag [1]_ Syntax ------ {% b64img [class name(s)] [http[s]:/]/path/to/image [width [height]] [title text | "title text" ["alt text"]] %} Examples -------- {% b64img /images/ni...
Ca2Patton/PythonStuff
refs/heads/master
gpsStuff.py
1
#!/opt/local/bin/python from geopy.geocoders import Nominatim import unittest geolocator = Nominatim() location = geolocator.geocode("5010 Hawxhurt Ct Antioch CA", timeout=None) print(location.address)
pelya/commandergenius
refs/heads/sdl_android
project/jni/python/src/Lib/test/test_bz2.py
55
#!/usr/bin/python from test import test_support from test.test_support import TESTFN import unittest from cStringIO import StringIO import os import subprocess import sys import bz2 from bz2 import BZ2File, BZ2Compressor, BZ2Decompressor has_cmdline_bunzip2 = sys.platform not in ("win32", "os2emx", "riscos") class ...
bigplus/thefuck
refs/heads/master
tests/rules/test_rm_dir.py
7
import pytest from thefuck.rules.rm_dir import match, get_new_command from tests.utils import Command @pytest.mark.parametrize('command', [ Command('rm foo', stderr='rm: foo: is a directory'), Command('rm foo', stderr='rm: foo: Is a directory'), Command('hdfs dfs -rm foo', stderr='rm: `foo`: Is a director...
tbeadle/django
refs/heads/master
django/core/checks/compatibility/django_1_10.py
108
from __future__ import unicode_literals from django.conf import global_settings, settings from .. import Tags, Warning, register @register(Tags.compatibility) def check_duplicate_middleware_settings(app_configs, **kwargs): if settings.MIDDLEWARE is not None and settings.MIDDLEWARE_CLASSES != global_settings.MID...
shaufi/odoo
refs/heads/8.0
addons/l10n_be_intrastat/__openerp__.py
257
# -*- encoding: utf-8 -*- ############################################################################## # # Odoo, Open Source Business Applications # Copyright (C) 2014-2015 Odoo S.A. <http://www.odoo.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the ...
malishevg/edugraph
refs/heads/master
common/djangoapps/student/views.py
1
""" Student Views """ import datetime import json import logging import re import urllib import uuid import time from collections import defaultdict from pytz import UTC from __builtin__ import xrange from django.conf import settings from django.contrib.auth import logout, authenticate, login from django.contrib.auth....
xodus7/tensorflow
refs/heads/master
tensorflow/python/keras/engine/topology_test.py
2
# 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...
ekaakurniawan/Bioinformatics-Tools
refs/heads/master
QuantumMechanics/Electron.py
1
# Copyright (C) 2013 by Eka A. Kurniawan # eka.a.kurniawan(ta)gmail(tod)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; version 2 of the License. # # This program is distributed in the hop...
synergeticsedx/deployment-wipro
refs/heads/oxa/master.fic
openedx/core/djangoapps/credit/migrations/0001_initial.py
20
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import openedx.core.djangoapps.credit.models import model_utils.fields import jsonfield.fields import django.db.models.deletion import django.utils.timezone from django.conf import settings import django.core.valid...
Aliced3645/DataCenterMarketing
refs/heads/master
impacket/setup.py
2
#!/usr/bin/python # $Id: setup.py 613 2012-07-18 13:13:22Z bethus@gmail.com $ import glob import os from distutils.core import setup PACKAGE_NAME = "Impacket" setup(name = PACKAGE_NAME, version = "0.9.9.0-dev", description = "Network protocols Constructors and Dissectors", url = "http...
google/adcase
refs/heads/master
src/lib/adcase/formats/format_111-html5-tag/__init__.py
12133432
pyve/pyconve-site
refs/heads/master
pyconve_site/users/migrations/__init__.py
12133432
shujaatak/UAV_MissionPlanner
refs/heads/master
Lib/encodings/utf_32.py
375
""" Python 'utf-32' Codec """ import codecs, sys ### Codec APIs encode = codecs.utf_32_encode def decode(input, errors='strict'): return codecs.utf_32_decode(input, errors, True) class IncrementalEncoder(codecs.IncrementalEncoder): def __init__(self, errors='strict'): codecs.IncrementalEncoder.__ini...
hishehim/MERA-Dispenser-Unit
refs/heads/master
DispenserCode/example.py
1
import RPi.GPIO as GPIO import PinManager as PMan import time import Dispensing as DispRoute import CONSTANTS as CONST try: while(True): time.sleep(0.5) #button debouncing print "READY...." PMan.setLEDState("READY") while(PMan.getButton()): #While button is not pressed do nothing continue print...
rooshilp/CMPUT410Lab6
refs/heads/master
virt_env/virt1/lib/python2.7/site-packages/django/db/models/query_utils.py
67
""" Various data structures used in query construction. Factored out from django.db.models.query to avoid making the main module very large and/or so that they can be used by other modules without getting into circular import difficulties. """ from __future__ import unicode_literals from django.apps import apps from ...
jcushman/pywb
refs/heads/master
pywb/webapp/replay_views.py
1
import re import logging from io import BytesIO from urlparse import urlsplit from itertools import chain from pywb.utils.statusandheaders import StatusAndHeaders from pywb.utils.wbexception import WbException, NotFoundException from pywb.utils.loaders import LimitReader from pywb.utils.timeutils import timestamp_now...
harmy/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/warnings.py
3
"""Python part of the warnings subsystem.""" # Note: function level imports should *not* be used # in this module as it may cause import lock deadlock. # See bug 683658. import linecache import sys __all__ = ["warn", "showwarning", "formatwarning", "filterwarnings", "resetwarnings", "catch_warning...
myarjunar/QGIS
refs/heads/master
python/plugins/db_manager/layer_preview.py
2
# -*- coding: utf-8 -*- """ /*************************************************************************** Name : DB Manager Description : Database manager plugin for QGIS Date : May 23, 2011 copyright : (C) 2011 by Giuseppe Sucameli email : brush.tyler@...
Zettelkastenfreunde/zettelpy
refs/heads/master
cod/__init__.py
12133432
hatwar/buyback-erpnext
refs/heads/master
erpnext/support/doctype/issue/__init__.py
12133432
enthought/etsproxy
refs/heads/master
enthought/plugins/debug/__init__.py
12133432
Kast0rTr0y/ansible
refs/heads/devel
lib/ansible/modules/network/panos/__init__.py
12133432
byterom/android_external_chromium_org
refs/heads/12.1
build/android/pylib/utils/__init__.py
12133432
yakky/django-admin-bootstrapped
refs/heads/master
django_admin_bootstrapped/admin/__init__.py
12133432
dnozay/lettuce
refs/heads/master
tests/integration/lib/Django-1.2.5/django/contrib/sessions/__init__.py
12133432
JeyZeta/Dangerous
refs/heads/master
Dangerous/Golismero/thirdparty_libs/django/conf/locale/eu/__init__.py
12133432
hnakamur/django
refs/heads/master
tests/check_framework/__init__.py
12133432
ZeitOnline/zeit.content.cp
refs/heads/master
src/zeit/content/cp/tests/test_area.py
1
import lxml.etree import lxml.objectify import zeit.content.cp.testing import zope.lifecycleevent class OverflowBlocks(zeit.content.cp.testing.FunctionalTestCase): def setUp(self): super(OverflowBlocks, self).setUp() self.cp = zeit.content.cp.centerpage.CenterPage() self.region = self.cp....
Galexrt/zulip
refs/heads/master
zerver/lib/stream_topic.py
2
from typing import (Dict, List, Text, Set) from django.db.models.query import QuerySet from zerver.lib.stream_subscription import ( get_active_subscriptions_for_stream_id, ) from zerver.models import ( MutedTopic, ) class StreamTopicTarget(object): ''' This class is designed to help us move to a ...
stevekew/oakleydb
refs/heads/master
infra/importexport/oakleyforumexporter.py
1
from core.logger import Logger from core.unicodecsv import * import os class OakleyForumDbExporter(object): def __init__(self, connection_pool): self.logger = Logger(self.__class__.__name__).get() self.connection_pool = connection_pool def export_database(self, export_path): export_na...
abencz/libcanopen
refs/heads/master
doc/source/conf.py
4
# -*- coding: utf-8 -*- # # libCANopen documentation build configuration file, created by # sphinx-quickstart on Wed Jan 18 14:01:41 2012. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # ...
robmadole/jig
refs/heads/develop
src/jig/backports.py
1
import subprocess from packages.argparse import argparse def check_output(*popenargs, **kwargs): """ Run command with arguments and return its output as a byte string. Backported from Python 2.7 as it's implemented as pure python on stdlib. >>> check_output(['/usr/bin/python', '--version']) Pyt...
mlalic/servo
refs/heads/master
tests/wpt/css-tests/tools/pywebsocket/src/test/test_stream_hixie75.py
496
#!/usr/bin/env python # # Copyright 2011, 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...
jddixon/rnglib
refs/heads/master
tests/test_files.py
1
#!/usr/bin/env python3 # testDataFile.py """ Exercise DataFile functionality. """ import unittest import rnglib class TestDataFile(unittest.TestCase): """ Exercise DataFile functionality. """ def setUp(self): pass def tearDown(self): pass def test_simplest_constructor(self): ...
pratap101/friendsandfriend
refs/heads/master
cash.py
1
from openerp import fields, models,api class PayCash(models.TransientModel): _name = "pay.cash" payment_type = fields.Char(default=lambda self: self._get_default_name(), readonly=True) party_name = fields.Char(required=True) amount = fields.Float(required=True) date = fields.Date(required=Tru...
aspectron/jsx
refs/heads/master
build/tools/gyp/test/msvs/props/gyptest-props.py
343
#!/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 props files are added by using a props file to set the name of the built executable. """ import TestGyp test = TestGyp.TestGy...
asarazan/bazel
refs/heads/master
tools/build_defs/docker/archive.py
4
# Copyright 2015 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
sagemathinc/cocalc
refs/heads/master
src/smc_pyutil/smc_pyutil/jupyter_notebook.py
1
#!/usr/bin/python # -*- coding: utf-8 -*- ###################################################################### # This is a daemon-ization script for the IPython notebook, for running # it under a specific URL behind a given proxy server. It is probably # only of use directly in https://cocalc.com. # # This is writt...
waseem18/oh-mainline
refs/heads/master
vendor/packages/gdata/src/gdata/Crypto/__init__.py
275
"""Python Cryptography Toolkit A collection of cryptographic modules implementing various algorithms and protocols. Subpackages: Crypto.Cipher Secret-key encryption algorithms (AES, DES, ARC4) Crypto.Hash Hashing algorithms (MD5, SHA, HMAC) Crypto.Protocol Cryptographic protocols ...
NeCTAR-RC/neutron
refs/heads/master
neutron/tests/tempest/services/identity/v3/json/region_client.py
17
# Copyright 2014 Hewlett-Packard Development Company, L.P # 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....
deformio/python-deform
refs/heads/master
pydeform/__init__.py
1
__version__ = '0.1.1' VERSION = __version__ from pydeform.client import Client # flake8: noqa
joksnet/youtube-dl
refs/heads/master
youtube_dl/extractor/bliptv.py
4
import datetime import json import os import re import socket from .common import InfoExtractor from ..utils import ( compat_http_client, compat_parse_qs, compat_str, compat_urllib_error, compat_urllib_parse_urlparse, compat_urllib_request, ExtractorError, unescapeHTML, ) class BlipT...
denis-pitul/django
refs/heads/master
django/core/handlers/base.py
15
from __future__ import unicode_literals import logging import sys import types import warnings from django import http from django.conf import settings from django.core import signals, urlresolvers from django.core.exceptions import ( MiddlewareNotUsed, PermissionDenied, SuspiciousOperation, ) from django.db impo...
pamfilos/invenio
refs/heads/master-sql-fixes
modules/bibclassify/lib/bibclassify_regression_tests.py
1
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2007, 2008, 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 ## ...
aral/isvat
refs/heads/master
django/contrib/sites/models.py
103
from django.db import models from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import python_2_unicode_compatible SITE_CACHE = {} class SiteManager(models.Manager): def get_current(self): """ Returns the current ``Site`` based on the SITE_ID in the proje...
Yinameah/linux-show-player
refs/heads/master
lisp/modules/gst_backend/gst_media_settings.py
3
# -*- coding: utf-8 -*- # # This file is part of Linux Show Player # # Copyright 2012-2016 Francesco Ceruti <ceppofrancy@gmail.com> # # Linux Show Player 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 ...
valmynd/MediaFetcher
refs/heads/master
src/plugins/youtube_dl/youtube_dl/extractor/youjizz.py
1
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( determine_ext, int_or_none, parse_duration, url_or_none, ) class YouJizzIE(InfoExtractor): _VALID_URL = r'https?://(?:\w+\.)?youjizz\.com/videos/(?:[^/#?]*-(?P<id>\d+)\.html|embed/(?P<embed_id>\d+))' _TES...
mastizada/kuma
refs/heads/master
vendor/packages/nose/functional_tests/doc_tests/test_restricted_plugin_options/support/test.py
121
def test(): pass
vganapath/rally
refs/heads/master
rally/plugins/openstack/scenarios/sahara/__init__.py
12133432
szeged/servo
refs/heads/master
tests/wpt/web-platform-tests/webdriver/tests/find_elements/__init__.py
12133432
bnoordhuis/suv
refs/heads/master
deps/gyp/test/mac/gyptest-clang-cxx-language-standard.py
264
#!/usr/bin/env python # Copyright (c) 2013 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that CLANG_CXX_LANGUAGE_STANDARD works. """ import TestGyp import sys if sys.platform == 'darwin': test = TestGyp.TestGyp(...
Ircam-Web/mezzanine-organization
refs/heads/master
organization/pages/migrations/0034_auto_20190130_1553.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2019-01-30 14:53 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('organization-pages', '0033_merge_20190123_1036'), ] operations = [ migratio...
bowang/tensorflow
refs/heads/master
tensorflow/python/debug/cli/profile_analyzer_cli.py
37
# Copyright 2017 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...
LeslieW/minion
refs/heads/master
generators/StillLife/stilllife.py
1
#!/usr/bin/python import sys, os, getopt (optargs, other)=getopt.gnu_getopt(sys.argv, "", ["size=", "period=", "table", "test", "lighttable", "sum"]) n=-1 layers=-1 usetest=False usetable=False tabctname="lighttable" usesum=False for i in optargs: (a1, a2)=i if a1=="--size": n=int(a2) elif a1...
cristianquaglio/odoo
refs/heads/master
addons/product_visible_discount/__init__.py
433
############################################################################## # # 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 GNU Affero General Public L...
shail2810/nova
refs/heads/master
nova/api/openstack/compute/legacy_v2/contrib/evacuate.py
61
# Copyright 2013 OpenStack Foundation # # 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...
RP7/R7-OCM
refs/heads/master
src/host/python/gsmlib/SDCCH.py
2
from CCH import CCH class SDCCH(CCH): def __init__(self,n,slot): CCH.__init__(self) self.name = "SDCCH" if slot==0: n += 4 s = n/2 s *= 10 s += 2 s += (n%2)*4 print "config SDCCH",n,range(s,s+4) self.config = (range(s,s+4),0) elif slot==1 or slot==3: s = n*4 print "config SDCCH",...
erickt/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/django/views/generic/detail.py
77
from __future__ import unicode_literals from django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist from django.db import models from django.http import Http404 from django.utils.translation import ugettext as _ from django.views.generic.base import TemplateResponseMixin, ContextMixin, View class Sin...
NikNitro/Python-iBeacon-Scan
refs/heads/master
sympy/polys/tests/test_polyfuncs.py
42
"""Tests for high-level polynomials manipulation functions. """ from sympy.polys.polyfuncs import ( symmetrize, horner, interpolate, rational_interpolate, viete, ) from sympy.polys.polyerrors import ( MultivariatePolynomialError, ) from sympy import symbols from sympy.utilities.pytest import raises from sym...
davidam/python-examples
refs/heads/master
security/md5/test/test_md5py.py
1
#!/usr/bin/env python import unittest from app.md5py import MD5 class TddInPythonExample(unittest.TestCase): def test_object_program(self): m = MD5() m.update("1234") hexdigest = m.hexdigest() self.assertEqual("81dc9bdb52d04dc20036dbd8313ed055", hexdigest) if __name__ == ...
takis/django
refs/heads/master
tests/template_tests/templatetags/custom.py
152
import operator import warnings from django import template from django.template.defaultfilters import stringfilter from django.utils import six from django.utils.html import escape, format_html register = template.Library() @register.filter @stringfilter def trim(value, num): return value[:num] @register.fil...
gmr/queries
refs/heads/master
tests/pool_tests.py
1
""" Tests for functionality in the pool module """ import time import unittest import uuid import mock from queries import pool MAX_POOL_SIZE = 100 def mock_connection(): conn = mock.MagicMock('psycopg2.extensions.connection') conn.close = mock.Mock() conn.closed = True conn.isexecuting = mock.Moc...
ad-m/foundation-manager
refs/heads/master
foundation/press/models.py
2
from django.db import models # Create your models here. from django.utils.translation import ugettext_lazy as _ from django.core.urlresolvers import reverse from django.conf import settings from model_utils.models import TimeStampedModel from autoslug.fields import AutoSlugField from ckeditor.fields import RichTextFie...