repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
jaimeMF/youtube-dl
refs/heads/master
youtube_dl/extractor/zingmp3.py
36
# coding=utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ExtractorError class ZingMp3BaseInfoExtractor(InfoExtractor): def _extract_item(self, item, fatal=True): error_message = item.find('./errormessage').text if error_message: ...
robovm/robovm-studio
refs/heads/master
python/testData/codeInsight/smartEnter/parenthesized_after.py
83
class A: def foo(self): self.a = (1, 1, 2, 3)<caret>
nebolsin/tyk
refs/heads/master
coprocess/bindings/python/coprocess_return_overrides_pb2.py
2
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: coprocess_return_overrides.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import r...
abstract-open-solutions/OCB
refs/heads/8.0
addons/mrp_repair/mrp_repair.py
27
# -*- 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...
WA4OSH/Learn_Python
refs/heads/master
oldLady.py
1
#------------------------------------------------------------------------------- # Name: oldLady.py # Purpose: Demo of program control, loops, branches, etc. # # Author: Konrad Roeder, adapted from the nusery rhyme # There was an Old Lady song from the # Secret History of Nurse...
cloudzfy/euler
refs/heads/master
src/27.py
1
# Euler discovered the remarkable quadratic formula: # n^2 + n + 41 # It turns out that the formula will produce 40 primes for the consecutive integer # values 0 <= n <= 39. However, when n = 40, 40^2 + 40 + 41 = 40 (40 + 1) + 41 is # divisible by 41, and certainly when n = 41, 41^2 + 41 + 41 is clearly divisible # b...
GhostThrone/django
refs/heads/master
tests/known_related_objects/__init__.py
12133432
rahuldhote/edge
refs/heads/master
src/project_name/__init__.py
12133432
26lights/PlayR
refs/heads/master
src/sphinx/ext/__init__.py
12133432
neeraj9/hyde
refs/heads/master
hydeengine/templatetags/__init__.py
12133432
welex91/ansible-modules-core
refs/heads/devel
packaging/os/package.py
117
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Ansible, inc # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your o...
wyg3958/django-cms
refs/heads/develop
cms/models/placeholdermodel.py
29
# -*- coding: utf-8 -*- from cms.utils.compat import DJANGO_1_7 from django.contrib import admin from django.contrib.auth import get_permission_codename from django.db import models from django.template.defaultfilters import title from django.utils.encoding import python_2_unicode_compatible from django.utils.translati...
popazerty/e2-gui
refs/heads/master
lib/python/Components/Converter/RemainingToText.py
6
from Components.Converter.Converter import Converter from Poll import Poll from Components.Element import cached from Components.config import config class RemainingToText(Poll, Converter, object): DEFAULT = 0 WITH_SECONDS = 2 NO_SECONDS = 2 IN_SECONDS = 3 PERCENTAGE = 4 VFD = 5 VFD_WITH_SECONDS = 6 VFD_NO_SEC...
Fusion-Rom/android_external_skia
refs/heads/lp5.1
platform_tools/android/gyp_gen/gypd_parser.py
144
#!/usr/bin/python # Copyright 2014 Google Inc. # # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Functions for parsing the gypd output from gyp. """ import os def parse_dictionary(var_dict, d, current_target_name, dest_dir): """Helper function to get the ...
kumar303/olympia
refs/heads/master
src/olympia/stats/utils.py
6
from olympia.stats.models import ThemeUpdateCount, UpdateCount def migrate_theme_update_count(lwt, static_theme, **kw): """Create UpdateCount instances from ThemeUpdateCount instances. By default all instances for the specified lwt (lightweight theme) are copied. Any additional **kw are passed to the fil...
CoDEmanX/ArangoDB
refs/heads/devel
3rdParty/V8-4.3.61/third_party/python_26/Lib/test/test_mimetypes.py
77
import mimetypes import StringIO import unittest 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.MimeTypes() ...
joequery/django
refs/heads/master
django/conf/locale/fr/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' DATETI...
hiepcm/update-script
refs/heads/master
tests/ltsi-3.10/controller/common/tcp_check.py
6
#!/usr/bin/python import errno import getopt import os import subprocess import sys import time import signal def try_kill (proc): try: proc.kill() except OSError, e: if e.errno != errno.ESRCH: print >>sys.stderr, 'error: kill failed:', e return False return True ...
hynekcer/django
refs/heads/master
tests/admin_views/__init__.py
12133432
myvoice-nigeria/myvoice
refs/heads/develop
myvoice/clinics/management/__init__.py
12133432
bangoocms/bangoo
refs/heads/master
bangoo/theming/management/__init__.py
12133432
LINKIWI/linkr
refs/heads/master
test/backend/__init__.py
12133432
gsehub/edx-platform
refs/heads/gsehub-release
lms/djangoapps/instructor/tests/test_services.py
19
""" Tests for the InstructorService """ import json import mock from nose.plugins.attrib import attr from courseware.models import StudentModule from lms.djangoapps.instructor.access import allow_access from lms.djangoapps.instructor.services import InstructorService from lms.djangoapps.instructor.tests.test_tools i...
alazyer/oscar
refs/heads/master
frobshop/oscar/apps/catalogue/signals.py
35
import django.dispatch product_viewed = django.dispatch.Signal( providing_args=["product", "user", "request", "response"])
douglaskastle/pypcapfile
refs/heads/master
pcapfile/protocols/transport/tcp.py
2
""" TCP transport definition """ import ctypes import struct class TCP(ctypes.Structure): """ Represents a TCP packet """ _fields_ = [('src_port', ctypes.c_ushort), # source port ('dst_port', ctypes.c_ushort), # destination port ('seqnum', ctypes.c_uint), # s...
wiki2014/Learning-Summary
refs/heads/master
alps/cts/apps/CameraITS/tests/scene1/test_yuv_plus_raw.py
1
# Copyright 2014 The Android Open Source Project # # 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...
KrisCheng/ML-Learning
refs/heads/master
archive/MOOC/Deeplearning_AI/NeuralNetworksandDeepLearning/BuildingyourDeepNeuralNetworkStepbyStep/Deep+Neural+Network+-+Application+v3.py
1
# coding: utf-8 # # Deep Neural Network for Image Classification: Application # # When you finish this, you will have finished the last programming assignment of Week 4, and also the last programming assignment of this course! # # You will use use the functions you'd implemented in the previous assignment to build...
dcunited001/gtfs-editor
refs/heads/master
scripts/load.py
7
#!/usr/bin/python # bulk-load feeds to the GTFS Editor from sys import argv from getpass import getpass import urllib2 from urllib import urlencode from cookielib import CookieJar from poster.encode import multipart_encode from poster.streaminghttp import register_openers server = argv[-1] if len(argv) < 3: prin...
NicovincX2/Python-3.5
refs/heads/master
Physique/Mesure physique/Traitement du signal/Filtre (électronique)/bode.py
1
# -*- coding: utf-8 -*- ''' Petit module pour rassembler la procédure de tracé de diagramme de Bode pour pouvoir se concentrer uniquement sur ce qu'il y a autour. ''' import matplotlib.pyplot as plt # Pour les dessins def diag_bode(f, GdB, phase, out_file, titre=None): '''Dessine un diagramme de bode quand on...
sc0ttkclark/elasticsearch
refs/heads/master
dev-tools/upload-s3.py
255
# Licensed to Elasticsearch under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. Elasticsearch licenses this file to you under # the Apache License, Version 2.0 (the "License"); you may # not use this file except...
ericblau/ipf-xsede
refs/heads/master
ipf/glue2/moab.py
1
############################################################################### # Copyright 2011-2014 The University of Texas at Austin # # # # Licensed under the Apache License, Version 2.0 (the "License"); #...
SaschaMester/delicium
refs/heads/master
build/android/pylib/instrumentation/instrumentation_test_instance_test.py
49
#!/usr/bin/env python # 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. """Unit tests for instrumentation.TestRunner.""" # pylint: disable=W0212 import os import sys import unittest from pylib import con...
tboyce021/home-assistant
refs/heads/dev
homeassistant/components/tibber/sensor.py
7
"""Support for Tibber sensors.""" import asyncio from datetime import timedelta import logging from random import randrange import aiohttp from homeassistant.components.sensor import DEVICE_CLASS_POWER from homeassistant.const import POWER_WATT from homeassistant.exceptions import PlatformNotReady from homeassistant....
eLBati/odoo
refs/heads/master
addons/portal_project/project.py
103
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013-TODAY OpenERP S.A (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms...
zubair-arbi/edx-platform
refs/heads/master
common/test/acceptance/fixtures/edxnotes.py
48
""" Tools for creating edxnotes content fixture data. """ import json import factory import requests from . import EDXNOTES_STUB_URL class Range(factory.Factory): class Meta(object): model = dict start = "/div[1]/p[1]" end = "/div[1]/p[1]" startOffset = 0 endOffset = 8 class Note(fact...
EricSchles/pattern
refs/heads/master
pattern/text/xx/inflect.py
1
#### PATTERN | XX | INFLECT ######################################################################## # -*- coding: utf-8 -*- # Copyright (c) # Author: # License: # http://www.clips.ua.ac.be/pages/pattern #################################################################################################### # Template for...
Abando/esupa
refs/heads/develop
esupa/__init__.py
2
# -*- coding: utf-8 -*- # # Copyright 2015, Ekevoo.com. # # 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...
cslzchen/osf.io
refs/heads/develop
api_tests/conftest.py
10
from __future__ import print_function import pytest from website.app import init_app from tests.json_api_test_app import JSONAPITestApp @pytest.fixture() def app(): return JSONAPITestApp() # NOTE: autouse so that ADDONS_REQUESTED gets set on website.settings @pytest.fixture(autouse=True, scope='session') def a...
ebar0n/django
refs/heads/master
django/db/migrations/operations/fields.py
5
from django.core.exceptions import FieldDoesNotExist from django.db.models.fields import NOT_PROVIDED from django.utils.functional import cached_property from .base import Operation from .utils import is_referenced_by_foreign_key class FieldOperation(Operation): def __init__(self, model_name, name): self...
proversity-org/edx-platform
refs/heads/master
openedx/core/djangoapps/ace_common/apps.py
1
""" Configuration for the ace_common Django app. """ from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ from openedx.core.djangoapps.plugins.constants import ProjectType, PluginSettings, SettingsType class AceCommonConfig(AppConfig): """ Configuration class for the ace_...
OmniLayer/omnicore
refs/heads/master
test/functional/wallet_multiwallet.py
3
#!/usr/bin/env python3 # Copyright (c) 2017-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test multiwallet. Verify that a bitcoind node can load multiple wallet files """ from threading import...
HyperloopTeam/FullOpenMDAO
refs/heads/master
lib/python2.7/site-packages/pycrypto-2.3-py2.7-macosx-10.10-x86_64.egg/Crypto/Util/number.py
10
# # number.py : Number-theoretic functions # # Part of the Python Cryptography Toolkit # # Written by Andrew M. Kuchling, Barry A. Warsaw, and others # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedicati...
kazemakase/scikit-learn
refs/heads/master
examples/cluster/plot_kmeans_silhouette_analysis.py
242
""" =============================================================================== Selecting the number of clusters with silhouette analysis on KMeans clustering =============================================================================== Silhouette analysis can be used to study the separation distance between the...
syncboard/syncboard
refs/heads/master
src/gui.py
1
""" Cross-platform clipboard syncing tool Copyright (C) 2013 Syncboard 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 opt...
izonder/intellij-community
refs/heads/master
python/testData/inspections/PyCallingNonCallableInspection/structuralType.py
79
def f(x): x.foo + x.bar x(0)
AZMAG/smartpy_core
refs/heads/master
smartpy_core/gis.py
1
""" This module (will) contain methods and utilities for working w/ GIS files and functions totally indendent of ESRI/arcpy. Instead will rely on a combination of GDAL, Fiona and Geopandas. """ import pandas as pd import fiona import geopandas as gpd def open_gdb_table(gdb, table, flds=None, index_fld=None): ""...
cshields/satnogs-client
refs/heads/master
satnogsclient/__init__.py
1
import logging.config from os import environ from validators.url import url from satnogsclient.settings import (SATNOGS_API_TOKEN, DEFAULT_LOGGING, SATNOGS_STATION_ID, SATNOGS_STATION_LAT, SATNOGS_STATION_LON, SATNOGS_STATION_ELEV, SATNOGS_NETWOR...
antoinecarme/sklearn2sql_heroku
refs/heads/master
tests/classification/FourClass_500/ws_FourClass_500_MLPClassifier_hive_code_gen.py
1
from sklearn2sql_heroku.tests.classification import generic as class_gen class_gen.test_model("MLPClassifier" , "FourClass_500" , "hive")
ortylp/scipy
refs/heads/master
scipy/special/tests/test_spfun_stats.py
127
from __future__ import division, print_function, absolute_import import numpy as np from numpy.testing import assert_array_equal, TestCase, run_module_suite, \ assert_array_almost_equal_nulp, assert_raises, assert_almost_equal from scipy.special import gammaln, multigammaln class TestMultiGammaLn(TestCase): ...
grap/odoo-script
refs/heads/master
data_integration/__init__.py
3
#! /usr/bin/env python # -*- encoding: utf-8 -*-
OpenWinCon/OpenWinNet
refs/heads/master
agent/OpenWRT_agent/MP_sub.py
1
#!/usr/bin/python2.7 from os import system import os f = open("topology.out", 'w') f.close system("iw dev wlan0 scan | grep -e wlan0 -e SSID -e signal > topology.out 2>&1") system("/etc/config/time")
frankrousseau/weboob
refs/heads/master
modules/agendadulibre/__init__.py
7
# -*- coding: utf-8 -*- # Copyright(C) 2014 Bezleputh # # This file is part of weboob. # # weboob is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your opt...
lifedb/lifedb
refs/heads/master
setup.py
1
from setuptools import setup setup( name='lifedb', version='0.0.1', packages=['lifedb'], url='https://lifedb.io', license='MIT', author='dsuo', author_email='dsuo@post.harvard.edu', description='', install_requires=[ 'cherrypy', 'google-api-python-client', 'f...
openstreams/wflow
refs/heads/master
openda_bmi/openda/bmi/thrift/constants.py
3
# # Autogenerated by Thrift Compiler (0.11.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py:new_style # from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException from thrift.protocol.TProtocol import TProtocolException from thrift.TRecu...
ox-it/humfrey
refs/heads/master
humfrey/sparql/results.py
1
import types import weakref import rdflib class SparqlResultBinding(dict): def __init__(self, bindings): if isinstance(bindings, (list, tuple, types.GeneratorType)): bindings = dict(zip(self._fields, bindings)) for field in self._fields: if field not in bindings: ...
forwis/KVMGT-kernel
refs/heads/master
tools/perf/tests/attr.py
3174
#! /usr/bin/python import os import sys import glob import optparse import tempfile import logging import shutil import ConfigParser class Fail(Exception): def __init__(self, test, msg): self.msg = msg self.test = test def getMsg(self): return '\'%s\' - %s' % (self.test.path, self.msg)...
iafan/zing
refs/heads/master
pootle/apps/pootle_statistics/migrations/0003_scorelog_translated_wordcount.py
10
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('pootle_statistics', '0002_update_submission_ordering'), ] operations = [ migrations.AddField( model_name='scorel...
SNoiraud/gramps
refs/heads/master
gramps/gen/filters/rules/event/_hassourcecount.py
5
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2002-2007 Donald N. Allingham # Copyright (C) 2007-2009 Brian G. Matherly # Copyright (C) 2009 Benny Malengier # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as publish...
Tisseo/navitia
refs/heads/dev
source/jormungandr/tests/isochrone_tests.py
2
# Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # Hope you'll enjoy and contribute to this project, # powered by Canal TP (www.canaltp.fr). # Help us simplify mobility and open public tr...
talha131/pelican-plugins
refs/heads/master
ctags_generator/__init__.py
9
from .ctags_generator import *
fdupoux/ansible-modules-extras
refs/heads/fdevel
cloud/cloudstack/cs_instancegroup.py
17
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2015, René Moser <mail@renemoser.net> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lice...
percy-g2/Novathor_xperia_u8500
refs/heads/master
6.2.A.1.100/external/webkit/Tools/Scripts/webkitpy/common/system/stack_utils.py
215
# Copyright (C) 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 of conditions and the ...
edisonlz/fruit
refs/heads/master
web_project/api/view/doc.py
1
#coding=utf-8 import tornado.web import simplejson from view.api_doc import * import tornado class ThirdPartLoginPage(tornado.web.RequestHandler): def get(self): self.render('templates/docs/websocket.html',**{}) class ApiDocHandler(tornado.web.RequestHandler): def get(self): ...
kaushik94/unishark
refs/heads/master
tests/test_testprogram.py
1
import unittest import unishark import os import shutil class TestProgramTestCase(unittest.TestCase): def setUp(self): super(TestProgramTestCase, self).setUp() self.dest = 'results' if os.path.exists(self.dest): shutil.rmtree(self.dest) def tearDown(self): if os.pa...
azumimuo/family-xbmc-addon
refs/heads/master
script.mrknow.urlresolver/lib/urlresolver9/plugins/vidag.py
4
''' thevideo urlresolver plugin Copyright (C) 2014 Eldorado 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 di...
csrocha/OpenUpgrade
refs/heads/8.0
openerp/addons/base/__openerp__.py
336
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2012 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you ca...
wong2/sentry
refs/heads/master
src/sentry/plugins/bases/tag.py
23
""" sentry.plugins.bases.tag ~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import from sentry.constants import MAX_TAG_VALUE_LENGTH from sentry.plugins import Plugin2 class TagPlug...
cgwire/zou
refs/heads/master
zou/app/models/serializer.py
1
import sqlalchemy.orm as orm from sqlalchemy.inspection import inspect from zou.app.utils.fields import serialize_value class SerializerMixin(object): """ Helpers to facilitate JSON serialization of models. """ def is_join(self, attr): return isinstance( getattr(self.__class__, at...
mgr01/antfs-cli
refs/heads/master
scripts/40-convert_to_tcx.py
1
#!/usr/bin/python # # Script to run the FIT-to-TCX converter on every new FIT file that is being # downloaded by antfs-cli # # Adjust the fittotcx path to point to where you have put the FIT-to-TCX files. # # Copyright (c) 2012, Gustav Tiger <gustav@tiger.name> # # Permission is hereby granted, free of charge, to any p...
pselle/calibre
refs/heads/master
src/calibre/ebooks/markdown/extensions/footnotes.py
46
""" ========================= FOOTNOTES ================================= This section adds footnote handling to markdown. It can be used as an example for extending python-markdown with relatively complex functionality. While in this case the extension is included inside the module itself, it could just as easily b...
dulems/hue
refs/heads/master
desktop/core/ext-py/avro-1.7.6/src/avro/ipc.py
42
# 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...
jlspyaozhongkai/Uter
refs/heads/master
third_party_build/Python-2.7.9/lib/python2.7/test/test_unary.py
137
"""Test compiler changes for unary ops (+, -, ~) introduced in Python 2.2""" import unittest from test.test_support import run_unittest, have_unicode class UnaryOpTestCase(unittest.TestCase): def test_negative(self): self.assertTrue(-2 == 0 - 2) self.assertTrue(-0 == 0) self.assertTrue(--...
vishdha/erpnext
refs/heads/develop
erpnext/stock/doctype/item/item.py
5
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe import erpnext import json import itertools from frappe import msgprint, _ from frappe.utils import (cstr, flt, cint, getdate, now_datetim...
sfriesel/suds
refs/heads/master
suds/transport/__init__.py
2
# 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 b...
fangxingli/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/django/conf/locale/bs/formats.py
118
# -*- 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. N Y.' TIME_FORMAT = 'G:i' DATE...
paweljasinski/ironpython3
refs/heads/master
Src/StdLib/Lib/timeit.py
72
#! /usr/bin/env python3 """Tool for measuring execution time of small code snippets. This module avoids a number of common traps for measuring execution times. See also Tim Peters' introduction to the Algorithms chapter in the Python Cookbook, published by O'Reilly. Library usage: see the Timer class. Command line...
sahat/cloudbucket
refs/heads/master
py/pdfminer/pdffont.py
2
#!/usr/bin/env python2 import sys import struct try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from cmapdb import CMapDB, CMapParser, FileUnicodeMap, CMap from encodingdb import EncodingDB, name2unicode from psparser import PSStackParser from psparser import PSSyntaxError,...
mavit/ansible
refs/heads/devel
lib/ansible/modules/network/nxos/nxos_ping.py
37
#!/usr/bin/python # # 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. # # Ansible is distribut...
pongem/python-bot-project
refs/heads/master
storage/cloud-client/encryption_test.py
3
# Copyright 2016 Google, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
cshallue/models
refs/heads/master
research/minigo/evaluation.py
2
# Copyright 2018 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...
R3v1L/pyevo
refs/heads/master
pyevo/checksum.py
2
# -*- coding: utf-8 -*- """ PyEVO checksum utility functions =============================================== .. module:: pyevo.checksum :platform: Unix, Windows :synopsis: Checksum utility functions .. moduleauthor:: (C) 2013 Oliver Gutiérrez """ # Python imports import string def mod10(value): """ L...
marcore/edx-platform
refs/heads/master
lms/djangoapps/commerce/migrations/0004_auto_20160531_0950.py
50
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('commerce', '0003_auto_20160329_0709'), ] operations = [ migrations.AddField( model_name='commerceconfiguration',...
loco-odoo/localizacion_co
refs/heads/master
openerp/addons/warning/__openerp__.py
261
# -*- 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...
gw0/myhdl
refs/heads/master
myhdl/test/bugs/test_issue_122.py
2
from __future__ import absolute_import from myhdl import * from myhdl.conversion import verify def issue_122(dout, i): d = i*10+1 @instance def write(): # dout[i].next = int(i) dout[i].next = i yield delay(d) print(int(dout[i])) if i == 0: ret...
stonegithubs/micropython
refs/heads/master
tests/basics/bytearray_add.py
22
# test bytearray + bytearray b = bytearray(2) b[0] = 1 b[1] = 2 print(b + bytearray(2)) # inplace add b += bytearray(3) print(b) # extend b.extend(bytearray(4)) print(b)
quickresolve/accel.ai
refs/heads/master
flask-aws/lib/python2.7/site-packages/ebcli/objects/tier.py
5
# Copyright 2014 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
slorg1/heroku-buildpack-python
refs/heads/master
vendor/pip-pop/pip/_vendor/requests/packages/chardet/big5prober.py
2930
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
RobinD42/pyside
refs/heads/master
tests/QtDeclarative/bug_997.py
6
from PySide import QtCore, QtDeclarative import unittest from helper import adjust_filename, UsesQApplication class TestBug(UsesQApplication): def testQMLFunctionCall(self): ownerData = QtDeclarative.QDeclarativePropertyMap() ownerData.insert('name', 'John Smith') ownerData.insert('phone'...
joone/chromium-crosswalk
refs/heads/2016.04.css-round-display-edtior-draft-1
tools/telemetry/third_party/pyfakefs/pyfakefs/fake_filesystem_unittest_test.py
21
#! /usr/bin/env python # # Copyright 2014 Altera Corporation. All Rights Reserved. # Author: John McGehee # # 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/licens...
NaturalGIS/naturalgis_qgis
refs/heads/master
tests/src/python/test_qgsbinarywidget.py
45
# -*- coding: utf-8 -*- """QGIS Unit tests for binary editor widgets. .. note:: 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....
Varentsov/servo
refs/heads/master
tests/wpt/web-platform-tests/websockets/handlers/wrong_accept_key_wsh.py
242
#!/usr/bin/python import sys, urllib, time from mod_pywebsocket import common, msgutil, util def web_socket_do_extra_handshake(request): request.connection.write('HTTP/1.1 101 Switching Protocols:\x0D\x0AConnection: Upgrade\x0D\x0AUpgrade: WebSocket\x0D\x0ASec-WebSocket-Origin: '+request.ws_origin+'\x0D\x0ASec-We...
simone/web-scuola-janua
refs/heads/master
mezzajanua/settings.py
1
from __future__ import absolute_import, unicode_literals import os from django import VERSION as DJANGO_VERSION from django.utils.translation import ugettext_lazy as _ ###################### # MEZZANINE SETTINGS # ###################### # The following settings are already defined with default values in # the ``de...
dagwieers/ansible
refs/heads/devel
lib/ansible/modules/cloud/cloudstack/cs_vpc_offering.py
25
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2017, David Passante (@dpassante) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'commu...
liyichao/spark
refs/heads/master
sql/hive/src/test/resources/data/scripts/cat.py
105
# # 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...
jmcarp/django
refs/heads/master
tests/migrations/test_migrations_no_default/0001_initial.py
381
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='SillyModel', fields=[ ('id', models.AutoField(v...
belvedere-trading/ChronosES
refs/heads/master
Chronos/tests/unit/test_Core.py
2
#pylint: skip-file import mock import unittest import sys from nose_parameterized import parameterized class CoreBaseClassTest(unittest.TestCase): def setUp(self): googleMock = mock.MagicMock() protobufMock = googleMock.protobuf protobufMock.message = mock.MagicMock() protobufMock.m...
peterm-itr/edx-platform
refs/heads/master
lms/djangoapps/instructor_task/subtasks.py
11
""" This module contains celery task functions for handling the management of subtasks. """ from time import time import json from uuid import uuid4 import math import psutil from contextlib import contextmanager from celery.utils.log import get_task_logger from celery.states import SUCCESS, READY_STATES, RETRY import...
pgaref/HTTP_Request_Randomizer
refs/heads/master
tests/__init__.py
12133432
Jorge-Rodriguez/ansible
refs/heads/devel
test/integration/targets/module_utils/other_mu_dir/a/__init__.py
12133432
erikr/django
refs/heads/master
tests/sites_tests/__init__.py
12133432